!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 n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=84)}([function(e,t,n){"use strict";t.a=function(e){return null!=e}},function(e,t,n){"use strict";function i(e,t){return null!=e?e:t}i.EMPTY_OBJECT=Object.freeze({}),t.a=i},function(e,t,n){"use strict";var i=n(0);function r(e){let t;this.name="DeveloperError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}Object(i.a)(Object.create)&&(r.prototype=Object.create(Error.prototype),r.prototype.constructor=r),r.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return Object(i.a)(this.stack)&&(e+="\n"+this.stack.toString()),e},r.throwInstantiationError=function(){throw new r("This function defines an interface and should not be called directly.")},t.a=r},function(e,t,n){"use strict";var i=n(0),r=n(2);const o={};function a(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}o.typeOf={},o.defined=function(e,t){if(!Object(i.a)(t))throw new r.a(function(e){return e+" is required, actual value was undefined"}(e))},o.typeOf.func=function(e,t){if("function"!=typeof t)throw new r.a(a(typeof t,"function",e))},o.typeOf.string=function(e,t){if("string"!=typeof t)throw new r.a(a(typeof t,"string",e))},o.typeOf.number=function(e,t){if("number"!=typeof t)throw new r.a(a(typeof t,"number",e))},o.typeOf.number.lessThan=function(e,t,n){if(o.typeOf.number(e,t),t>=n)throw new r.a(`Expected ${e} to be less than ${n}, actual value was ${t}`)},o.typeOf.number.lessThanOrEquals=function(e,t,n){if(o.typeOf.number(e,t),t>n)throw new r.a(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)},o.typeOf.number.greaterThan=function(e,t,n){if(o.typeOf.number(e,t),t<=n)throw new r.a(`Expected ${e} to be greater than ${n}, actual value was ${t}`)},o.typeOf.number.greaterThanOrEquals=function(e,t,n){if(o.typeOf.number(e,t),t0?1:-1})),c.signNotZero=function(e){return e<0?-1:1},c.toSNorm=function(e,t){return t=Object(o.a)(t,255),Math.round((.5*c.clamp(e,-1,1)+.5)*t)},c.fromSNorm=function(e,t){return t=Object(o.a)(t,255),c.clamp(e,0,t)/t*2-1},c.normalize=function(e,t,n){return 0===(n=Math.max(n-t,0))?0:c.clamp((e-t)/n,0,1)},c.sinh=Object(o.a)(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),c.cosh=Object(o.a)(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),c.lerp=function(e,t,n){return(1-n)*e+n*t},c.PI=Math.PI,c.ONE_OVER_PI=1/Math.PI,c.PI_OVER_TWO=Math.PI/2,c.PI_OVER_THREE=Math.PI/3,c.PI_OVER_FOUR=Math.PI/4,c.PI_OVER_SIX=Math.PI/6,c.THREE_PI_OVER_TWO=3*Math.PI/2,c.TWO_PI=2*Math.PI,c.ONE_OVER_TWO_PI=1/(2*Math.PI),c.RADIANS_PER_DEGREE=Math.PI/180,c.DEGREES_PER_RADIAN=180/Math.PI,c.RADIANS_PER_ARCSECOND=c.RADIANS_PER_DEGREE/3600,c.toRadians=function(e){if(!Object(a.a)(e))throw new s.a("degrees is required.");return e*c.RADIANS_PER_DEGREE},c.toDegrees=function(e){if(!Object(a.a)(e))throw new s.a("radians is required.");return e*c.DEGREES_PER_RADIAN},c.convertLongitudeRange=function(e){if(!Object(a.a)(e))throw new s.a("angle is required.");const t=c.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n},c.clampToLatitudeRange=function(e){if(!Object(a.a)(e))throw new s.a("angle is required.");return c.clamp(e,-1*c.PI_OVER_TWO,c.PI_OVER_TWO)},c.negativePiToPi=function(e){if(!Object(a.a)(e))throw new s.a("angle is required.");return e>=-c.PI&&e<=c.PI?e:c.zeroToTwoPi(e+c.PI)-c.PI},c.zeroToTwoPi=function(e){if(!Object(a.a)(e))throw new s.a("angle is required.");if(e>=0&&e<=c.TWO_PI)return e;const t=c.mod(e,c.TWO_PI);return Math.abs(t)c.EPSILON14?c.TWO_PI:t},c.mod=function(e,t){if(!Object(a.a)(e))throw new s.a("m is required.");if(!Object(a.a)(t))throw new s.a("n is required.");if(0===t)throw new s.a("divisor cannot be 0.");return c.sign(e)===c.sign(t)&&Math.abs(e)n},c.greaterThanOrEquals=function(e,t,n){if(!Object(a.a)(e))throw new s.a("first is required.");if(!Object(a.a)(t))throw new s.a("second is required.");if(!Object(a.a)(n))throw new s.a("absoluteEpsilon is required.");return e-t>-n};const l=[1];c.factorial=function(e){if("number"!=typeof e||e<0)throw new s.a("A number greater than or equal to 0 is required.");const t=l.length;if(e>=t){let n=l[t-1];for(let i=t;i<=e;i++){const e=n*i;l.push(e),n=e}}return l[e]},c.incrementWrap=function(e,t,n){if(n=Object(o.a)(n,0),!Object(a.a)(e))throw new s.a("n is required.");if(t<=n)throw new s.a("maximumValue must be greater than minimumValue.");return++e>t&&(e=n),e},c.isPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>4294967295)throw new s.a("A number between 0 and (2^32)-1 is required.");return 0!==e&&0==(e&e-1)},c.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>2147483648)throw new s.a("A number between 0 and 2^31 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},c.previousPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>4294967295)throw new s.a("A number between 0 and (2^32)-1 is required.");return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e=((e|=e>>32)>>>0)-(e>>>1)},c.clamp=function(e,t,n){return r.a.typeOf.number("value",e),r.a.typeOf.number("min",t),r.a.typeOf.number("max",n),en?n:e};let u=new i.a;c.setRandomNumberSeed=function(e){if(!Object(a.a)(e))throw new s.a("seed is required.");u=new i.a(e)},c.nextRandomNumber=function(){return u.random()},c.randomBetween=function(e,t){return c.nextRandomNumber()*(t-e)+e},c.acosClamped=function(e){if(!Object(a.a)(e))throw new s.a("value is required.");return Math.acos(c.clamp(e,-1,1))},c.asinClamped=function(e){if(!Object(a.a)(e))throw new s.a("value is required.");return Math.asin(c.clamp(e,-1,1))},c.chordLength=function(e,t){if(!Object(a.a)(e))throw new s.a("angle is required.");if(!Object(a.a)(t))throw new s.a("radius is required.");return 2*t*Math.sin(.5*e)},c.logBase=function(e,t){if(!Object(a.a)(e))throw new s.a("number is required.");if(!Object(a.a)(t))throw new s.a("base is required.");return Math.log(e)/Math.log(t)},c.cbrt=Object(o.a)(Math.cbrt,(function(e){const t=Math.pow(Math.abs(e),1/3);return e<0?-t:t})),c.log2=Object(o.a)(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),c.fog=function(e,t){const n=e*t;return 1-Math.exp(-n*n)},c.fastApproximateAtan=function(e){return r.a.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},c.fastApproximateAtan2=function(e,t){let n;r.a.typeOf.number("x",e),r.a.typeOf.number("y",t);let i=Math.abs(e);n=Math.abs(t);const o=Math.max(i,n);n=Math.min(i,n);const a=n/o;if(isNaN(a))throw new s.a("either x or y must be nonzero");return i=c.fastApproximateAtan(a),i=Math.abs(t)>Math.abs(e)?c.PI_OVER_TWO-i:i,i=e<0?c.PI-i:i,i=t<0?-i:i,i},t.a=c},function(e,t,n){"use strict";var i=n(0);function r(e){let t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}Object(i.a)(Object.create)&&(r.prototype=Object.create(Error.prototype),r.prototype.constructor=r),r.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return Object(i.a)(this.stack)&&(e+="\n"+this.stack.toString()),e},t.a=r},function(e,t,n){"use strict";var i=n(3),r=n(0);function o(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function a(e,t){return t-e}Object.defineProperties(o.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),o.prototype.addEventListener=function(e,t){i.a.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);const n=this;return function(){n.removeEventListener(e,t)}},o.prototype.removeEventListener=function(e,t){i.a.typeOf.func("listener",e);const n=this._listeners,r=this._scopes;let o=-1;for(let i=0;i0){for(o.sort(a),e=0;e0}}}),M.prototype.toString=function(){return this.getUrlComponent(!0,!0)},M.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;const n=new i.a(this._url);e&&function(e,t){const n=t._queryParameters,i=Object.keys(n);1!==i.length||Object(u.a)(n[i[0]])?e.search(Object(O.a)(n)):e.search(i[0])}(n,this);let r=n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}");const o=this._templateValues;return r=r.replace(/{(.*?)}/g,(function(e,t){const n=o[t];return Object(u.a)(n)?encodeURIComponent(n):e})),t&&Object(u.a)(this.proxy)&&(r=this.proxy.getURL(r)),r},M.prototype.setQueryParameters=function(e,t){this._queryParameters=t?j(this._queryParameters,e,!1):j(e,this._queryParameters,!1)},M.prototype.appendQueryParameters=function(e){this._queryParameters=j(e,this._queryParameters,!0)},M.prototype.setTemplateValues=function(e,t){this._templateValues=t?Object(s.a)(this._templateValues,e):Object(s.a)(e,this._templateValues)},M.prototype.getDerivedResource=function(e){const t=this.clone();if(t._retryCount=0,Object(u.a)(e.url)){const n=new i.a(e.url);P(n,t,!0,Object(c.a)(e.preserveQueryParameters,!1)),n.fragment(""),""!==n.scheme()?t._url=n.toString():t._url=n.absoluteTo(new i.a(Object(d.a)(this._url))).toString()}return Object(u.a)(e.queryParameters)&&(t._queryParameters=Object(s.a)(e.queryParameters,t._queryParameters)),Object(u.a)(e.templateValues)&&(t._templateValues=Object(s.a)(e.templateValues,t.templateValues)),Object(u.a)(e.headers)&&(t.headers=Object(s.a)(e.headers,t.headers)),Object(u.a)(e.proxy)&&(t.proxy=e.proxy),Object(u.a)(e.request)&&(t.request=e.request),Object(u.a)(e.retryCallback)&&(t.retryCallback=e.retryCallback),Object(u.a)(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},M.prototype.retryOnError=function(e){const t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);const n=this;return Promise.resolve(t(this,e)).then((function(e){return++n._retryCount,e}))},M.prototype.clone=function(e){return Object(u.a)(e)||(e=new M({url:this._url})),e._url=this._url,e._queryParameters=Object(a.a)(this._queryParameters),e._templateValues=Object(a.a)(this._templateValues),e.headers=Object(a.a)(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},M.prototype.getBaseUri=function(e){return Object(f.a)(this.getUrlComponent(e),e)},M.prototype.appendForwardSlash=function(){this._url=Object(r.a)(this._url)},M.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},M.fetchArrayBuffer=function(e){return new M(e).fetchArrayBuffer()},M.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},M.fetchBlob=function(e){return new M(e).fetchBlob()},M.prototype.fetchImage=function(e){e=Object(c.a)(e,c.a.EMPTY_OBJECT);const t=Object(c.a)(e.preferImageBitmap,!1),n=Object(c.a)(e.preferBlob,!1),i=Object(c.a)(e.flipY,!1),r=Object(c.a)(e.skipColorSpaceConversion,!1);if(R(this.request),!I||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return N({resource:this,flipY:i,skipColorSpaceConversion:r,preferImageBitmap:t});const o=this.fetchBlob();if(!Object(u.a)(o))return;let a,s,l,h;return M.supportsImageBitmapOptions().then((function(e){return a=e,s=a&&t,o})).then((function(e){if(!Object(u.a)(e))return;if(h=e,s)return M.createImageBitmapFromBlob(e,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:r});const t=window.URL.createObjectURL(e);return l=new M({url:t}),N({resource:l,flipY:i,skipColorSpaceConversion:r,preferImageBitmap:!1})})).then((function(e){if(Object(u.a)(e))return e.blob=h,s||window.URL.revokeObjectURL(l.url),e})).catch((function(e){return Object(u.a)(l)&&window.URL.revokeObjectURL(l.url),e.blob=h,Promise.reject(e)}))},M.fetchImage=function(e){return new M(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},M.prototype.fetchText=function(){return this.fetch({responseType:"text"})},M.fetchText=function(e){return new M(e).fetchText()},M.prototype.fetchJson=function(){const e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(Object(u.a)(e))return e.then((function(e){if(Object(u.a)(e))return JSON.parse(e)}))},M.fetchJson=function(e){return new M(e).fetchJson()},M.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},M.fetchXML=function(e){return new M(e).fetchXML()},M.prototype.fetchJsonp=function(e){let t;e=Object(c.a)(e,"callback"),R(this.request);do{t="loadJsonp"+v.a.nextRandomNumber().toString().substring(2,8)}while(Object(u.a)(window[t]));return function e(t,n,i){const r={};r[n]=i,t.setQueryParameters(r);const o=t.request;o.url=t.url,o.requestFunction=function(){const e=Object(l.a)();return window[i]=function(t){e.resolve(t);try{delete window[i]}catch(e){window[i]=void 0}},M._Implementations.loadAndExecuteScript(t.url,i,e),e.promise};const a=T.a.request(o);if(!Object(u.a)(a))return;return a.catch((function(r){return o.state!==C.a.FAILED?Promise.reject(r):t.retryOnError(r).then((function(a){return a?(o.state=C.a.UNISSUED,o.deferred=void 0,e(t,n,i)):Promise.reject(r)}))}))}(this,e,t)},M.fetchJsonp=function(e){return new M(e).fetchJsonp(e.callbackParameterName)},M.prototype._makeRequest=function(e){const t=this;R(t.request);const n=t.request;n.url=t.url,n.requestFunction=function(){const i=e.responseType,r=Object(s.a)(e.headers,t.headers),o=e.overrideMimeType,a=e.method,c=e.data,h=Object(l.a)(),d=M._Implementations.loadWithXhr(t.url,i,a,c,r,h,o);return Object(u.a)(d)&&Object(u.a)(d.abort)&&(n.cancelFunction=function(){d.abort()}),h.promise};const i=T.a.request(n);if(Object(u.a)(i))return i.then((function(e){return n.cancelFunction=void 0,e})).catch((function(i){return n.cancelFunction=void 0,n.state!==C.a.FAILED?Promise.reject(i):t.retryOnError(i).then((function(r){return r?(n.state=C.a.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(i)}))}))};const B=/^data:(.*?)(;base64)?,(.*)$/;function F(e,t){const n=decodeURIComponent(t);return e?atob(n):n}function z(e,t){const n=F(e,t),i=new ArrayBuffer(n.length),r=new Uint8Array(i);for(let e=0;e=300)return void s.reject(new E.a(t.statusCode,t,t.headers));const n=[];t.on("data",(function(e){n.push(e)})),t.on("end",(function(){const r=e.concat(n);"gzip"===t.headers["content-encoding"]?h.gunzip(r,(function(e,t){e?s.reject(new x.a("Error decompressing response.")):s.resolve(k(t,i))})):s.resolve(k(r,i))}))})).on("error",(function(e){s.reject(new E.a)})).end()}(t,i,r,0,a,s);const f=new XMLHttpRequest;if(S.a.contains(t)&&(f.withCredentials=!0),f.open(r,t,!0),Object(u.a)(l)&&Object(u.a)(f.overrideMimeType)&&f.overrideMimeType(l),Object(u.a)(a))for(const e in a)a.hasOwnProperty(e)&&f.setRequestHeader(e,a[e]);Object(u.a)(i)&&(f.responseType=i);let p=!1;return"string"==typeof t&&(p=0===t.indexOf("file://")||"undefined"!=typeof window&&"file://"===window.location.origin),f.onload=function(){if((f.status<200||f.status>=300)&&(!p||0!==f.status))return void s.reject(new E.a(f.status,f.response,f.getAllResponseHeaders()));const e=f.response,t=f.responseType;if("HEAD"===r||"OPTIONS"===r){const e=f.getAllResponseHeaders().trim().split(/[\r\n]+/),t={};return e.forEach((function(e){const n=e.split(": "),i=n.shift();t[i]=n.join(": ")})),void s.resolve(t)}if(204===f.status)s.resolve();else if(!Object(u.a)(e)||Object(u.a)(i)&&t!==i)if("json"===i&&"string"==typeof e)try{s.resolve(JSON.parse(e))}catch(e){s.reject(e)}else(""===t||"document"===t)&&Object(u.a)(f.responseXML)&&f.responseXML.hasChildNodes()?s.resolve(f.responseXML):""!==t&&"text"!==t||!Object(u.a)(f.responseText)?s.reject(new x.a("Invalid XMLHttpRequest response type.")):s.resolve(f.responseText);else s.resolve(e)},f.onerror=function(e){s.reject(new E.a)},f.send(o),f},M._Implementations.loadAndExecuteScript=function(e,t,n){return Object(b.a)(e,t).catch((function(e){n.reject(e)}))},M._DefaultImplementations={},M._DefaultImplementations.createImage=M._Implementations.createImage,M._DefaultImplementations.loadWithXhr=M._Implementations.loadWithXhr,M._DefaultImplementations.loadAndExecuteScript=M._Implementations.loadAndExecuteScript,M.DEFAULT=Object.freeze(new M({url:"undefined"==typeof document?"":document.location.href.split("?")[0]})),t.a=M}).call(this,n(18).Buffer)},function(e,t,n){"use strict";var i=n(1);t.a=function e(t,n){if(null===t||"object"!=typeof t)return t;n=Object(i.a)(n,!1);const r=new t.constructor;for(const i in t)if(t.hasOwnProperty(i)){let o=t[i];n&&(o=e(o,n)),r[i]=o}return r}},function(e,t,n){"use strict";var i=n(1),r=n(0);t.a=function e(t,n,o){o=Object(i.a)(o,!1);const a={},s=Object(r.a)(t),c=Object(r.a)(n);let l,u,h;if(s)for(l in t)t.hasOwnProperty(l)&&(u=t[l],c&&o&&"object"==typeof u&&n.hasOwnProperty(l)?(h=n[l],a[l]="object"==typeof h?e(u,h,o):u):a[l]=u);if(c)for(l in n)n.hasOwnProperty(l)&&!a.hasOwnProperty(l)&&(h=n[l],a[l]=h);return a}},function(e,t,n){"use strict";var i=n(50),r=n.n(i);n.d(t,"a",(function(){return r.a}))},function(e,t,n){"use strict";t.a=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5})},function(e,t,n){"use strict";var i=n(1),r=n(0),o=n(11),a=n(13);function s(e){e=Object(i.a)(e,i.a.EMPTY_OBJECT);const t=Object(i.a)(e.throttleByServer,!1),n=Object(i.a)(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=Object(i.a)(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=Object(i.a)(e.type,a.a.OTHER),this.serverKey=void 0,this.state=o.a.UNISSUED,this.deferred=void 0,this.cancelled=!1}s.prototype.cancel=function(){this.cancelled=!0},s.prototype.clone=function(e){return Object(r.a)(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 s(this)},t.a=s},function(e,t,n){"use strict";t.a=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3})},function(e,t,n){"use strict";t.a=function(){let e,t;const n=new Promise((function(n,i){e=n,t=i}));return{resolve:e,reject:t,promise:n}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var i=n(10),r=n(3),o=n(1),a=n(14),s=n(0),c=n(6),l=n(42),u=n(29),h=n(25),d=n(11);const f={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let p=20;const m=new l.a({comparator:function(e,t){return e.priority-t.priority}});m.maximumLength=p,m.reserve(p);const g=[];let _={};const y="undefined"!=typeof document?new i.a(document.location.href):new i.a,b=new c.a;function v(){}function O(e){Object(s.a)(e.priorityFunction)&&(e.priority=e.priorityFunction())}function w(e){return e.state===d.a.UNISSUED&&(e.state=d.a.ISSUED,e.deferred=Object(a.a)()),e.deferred.promise}function A(e){const t=w(e);return e.state=d.a.ACTIVE,g.push(e),++f.numberOfActiveRequests,++f.numberOfActiveRequestsEver,++_[e.serverKey],e.requestFunction().then(function(e){return function(t){if(e.state===d.a.CANCELLED)return;const n=e.deferred;--f.numberOfActiveRequests,--_[e.serverKey],b.raiseEvent(),e.state=d.a.RECEIVED,e.deferred=void 0,n.resolve(t)}}(e)).catch(function(e){return function(t){e.state!==d.a.CANCELLED&&(++f.numberOfFailedRequests,--f.numberOfActiveRequests,--_[e.serverKey],b.raiseEvent(t),e.state=d.a.FAILED,e.deferred.reject(t))}}(e)),t}function E(e){const t=e.state===d.a.ACTIVE;if(e.state=d.a.CANCELLED,++f.numberOfCancelledRequests,Object(s.a)(e.deferred)){const t=e.deferred;e.deferred=void 0,t.reject()}t&&(--f.numberOfActiveRequests,--_[e.serverKey],++f.numberOfCancelledActiveRequests),Object(s.a)(e.cancelFunction)&&e.cancelFunction()}v.maximumRequests=50,v.maximumRequestsPerServer=6,v.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},v.throttleRequests=!0,v.debugShowStatistics=!1,v.requestCompletedEvent=b,Object.defineProperties(v,{statistics:{get:function(){return f}},priorityHeapLength:{get:function(){return p},set:function(e){if(ee;){E(m.pop())}p=e,m.maximumLength=e,m.reserve(e)}}}),v.serverHasOpenSlots=function(e,t){t=Object(o.a)(t,1);const n=Object(o.a)(v.requestsByServer[e],v.maximumRequestsPerServer);return _[e]+t<=n},v.heapHasOpenSlots=function(e){return m.length+e<=p},v.update=function(){let e,t,n=0;const i=g.length;for(e=0;e0&&(g[e-n]=t):++n;g.length-=n;const r=m.internalArray,o=m.length;for(e=0;e0;)t=m.pop(),t.cancelled?E(t):!t.throttleByServer||v.serverHasOpenSlots(t.serverKey)?(A(t),++s):E(t);!function(){if(!v.debugShowStatistics)return;0===f.numberOfActiveRequests&&f.lastNumberOfActiveRequests>0&&(f.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+f.numberOfAttemptedRequests),f.numberOfAttemptedRequests=0),f.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+f.numberOfCancelledRequests),f.numberOfCancelledRequests=0),f.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+f.numberOfCancelledActiveRequests),f.numberOfCancelledActiveRequests=0),f.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+f.numberOfFailedRequests),f.numberOfFailedRequests=0));f.lastNumberOfActiveRequests=f.numberOfActiveRequests}()},v.getServerKey=function(e){r.a.typeOf.string("url",e);let t=new i.a(e);""===t.scheme()&&(t=new i.a(e).absoluteTo(y),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${"https"===t.scheme()?"443":"80"}`);const o=_[n];return Object(s.a)(o)||(_[n]=0),n},v.request=function(e){if(r.a.typeOf.object("request",e),r.a.typeOf.string("request.url",e.url),r.a.typeOf.func("request.requestFunction",e.requestFunction),Object(h.a)(e.url)||Object(u.a)(e.url))return b.raiseEvent(),e.state=d.a.RECEIVED,e.requestFunction();if(++f.numberOfAttemptedRequests,Object(s.a)(e.serverKey)||(e.serverKey=v.getServerKey(e.url)),v.throttleRequests&&e.throttleByServer&&!v.serverHasOpenSlots(e.serverKey))return;if(!v.throttleRequests||!e.throttle)return A(e);if(g.length>=v.maximumRequests)return;O(e);const t=m.insert(e);if(Object(s.a)(t)){if(t===e)return;E(t)}return w(e)},v.clearForSpecs=function(){for(;m.length>0;){E(m.pop())}const e=g.length;for(let t=0;t * @license MIT */ var i=n(85),r=n(86),o=n(54);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(c.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 n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return k(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(i)return k(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return S(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function _(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){var o,a=1,s=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var u=-1;for(o=n;os&&(n=s-c),o=n;o>=0;o--){for(var h=!0,d=0;dr&&(i=r):i=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;a>8,r=n%256,o.push(r),o.push(i);return o}(t,e.length-n),e,n,i)}function T(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r239?4:l>223?3:l>191?2:1;if(r+h<=n)switch(h){case 1:l<128&&(u=l);break;case 2:128==(192&(o=e[r+1]))&&(c=(31&l)<<6|63&o)>127&&(u=c);break;case 3:o=e[r+1],a=e[r+2],128==(192&o)&&128==(192&a)&&(c=(15&l)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[r+1],a=e[r+2],s=e[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,h=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),r+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,i,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(i,r),u=e.slice(t,n),h=0;hr)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":return O(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;ri)&&(n=i);for(var r="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,i,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function j(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(i?r:1-r)}function M(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(i?r:3-r)&255}function L(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,i,o){return o||L(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function B(e,t,n,i,o){return o||L(e,0,n,8),r.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t0&&(r*=256);)i+=this[e+--t]*r;return i},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var i=this[e],r=1,o=0;++o=(r*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+r]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--r)e[r+t]=this[r+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,i){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(15))},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var c,l=[],u=!1,h=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(c=l,l=[];++h1)for(var n=1;n{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");const i=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,i.removeChild(t),e()},t.onerror=function(e){n(e)},i.appendChild(t)})}},function(e,t,n){"use strict";var i=n(0),r=n(2);t.a=function(e){if(!Object(i.a)(e))throw new r.a("obj is required.");let t="";for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],r=encodeURIComponent(n)+"=";if(Array.isArray(i))for(let e=0,n=i.length;ev.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,n){var i=[];if(e)for(var r=0,o=e.length;ri?n&&e.push(t):n||e.splice(i,1)},Ba:h,extend:s,setPrototypeOf:c,Ab:h?c:s,P:a,Ga:function(e,t,n){if(!e)return e;var i,r={};for(i in e)u.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r},Tb:function(e){for(;e.firstChild;)v.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=v.a.la(e))[0]&&e[0].ownerDocument||n).createElement("div"),i=0,r=e.length;i_?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 v.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!v.a.Lb(e,v.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return v.onError?function(){try{return e.apply(this,arguments)}catch(e){throw v.onError&&v.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(v.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw v.onError&&v.onError(e),e}),0)},B:function(e,t,n){var i=v.a.Ac(n);if(n=g[t],v.options.useOnlyNativeEvents||n||!r)if(n||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){i.call(e,t)},a="on"+t;e.attachEvent(a,o),v.a.K.za(e,(function(){e.detachEvent(a,o)}))}else e.addEventListener(t,i,!1);else m||(m="function"==typeof r(e).on?"on":"bind"),r(e)[m](t,i)},Fb:function(e,i){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var o;if(o=!("input"!==v.a.R(e)||!e.type||"click"!=i.toLowerCase()||"checkbox"!=(o=e.type)&&"radio"!=o),v.options.useOnlyNativeEvents||!r||o)if("function"==typeof n.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(o=n.createEvent(p[i]||"HTMLEvents")).initEvent(i,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(o&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+i)}else r(e).trigger(i)},f:function(e){return v.O(e)?e():e},bc:function(e){return v.O(e)?e.v():e},Eb:function(e,t,n){var i;t&&("object"==typeof e.classList?(i=e.classList[n?"add":"remove"],v.a.D(t.match(y),(function(t){i.call(e.classList,t)}))):"string"==typeof e.className.baseVal?l(e.className,"baseVal",t,n):l(e,"className",t,n))},Bb:function(t,n){var i=v.a.f(n);null!==i&&i!==e||(i="");var r=v.h.firstChild(t);!r||3!=r.nodeType||v.h.nextSibling(r)?v.h.va(t,[t.ownerDocument.createTextNode(i)]):r.data=i,v.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=_)try{var i=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(n.createElement(""),!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=v.a.f(e),t=v.a.f(t);for(var n=[],i=e;i<=t;i++)n.push(i);return n},la:function(e){for(var t=[],n=0,i=e.length;n",""],tbody:m,tfoot:m,tr:[2,"","
"],td:g=[3,"","
"],th:g,option:_=[1,""],optgroup:_},b=8>=v.a.W,v.a.ua=function(e,i){var o;if(r){if(r.parseHTML)o=r.parseHTML(e,i)||[];else if((o=r.clean([e],i))&&o[0]){for(var a=o[0];a.parentNode&&11!==a.parentNode.nodeType;)a=a.parentNode;a.parentNode&&a.parentNode.removeChild(a)}}else{(o=i)||(o=n),a=o.parentWindow||o.defaultView||t;var s,c=v.a.Db(e).toLowerCase(),l=o.createElement("div");for(s=(c=c.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&y[c[1]]||p,c=s[0],s="ignored
"+s[1]+e+s[2]+"
","function"==typeof a.innerShiv?l.appendChild(a.innerShiv(s)):(b&&o.body.appendChild(l),l.innerHTML=s,b&&l.parentNode.removeChild(l));c--;)l=l.lastChild;o=v.a.la(l.lastChild.childNodes)}return o},v.a.Md=function(e,t){var n=v.a.ua(e,t);return n.length&&n[0].parentElement||v.a.Yb(n)},v.a.fc=function(t,n){if(v.a.Tb(t),null!==(n=v.a.f(n))&&n!==e)if("string"!=typeof n&&(n=n.toString()),r)r(t).html(n);else for(var i=v.a.ua(n,t.ownerDocument),o=0;ot){if(5e3<=++n){s=o,v.a.Gc(Error("'Too much recursion' after processing "+n+" task groups."));break}t=o}try{e()}catch(e){v.a.Gc(e)}}}function i(){e(),s=o=r.length=0}var r=[],o=0,a=1,s=0;return{scheduler:t.MutationObserver?function(e){var t=n.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(i):n&&"onreadystatechange"in n.createElement("script")?function(e){var t=n.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,n.documentElement.removeChild(t),t=null,e()},n.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},zb:function(e){return o||v.na.scheduler(i),r[o++]=e,a++},cancel:function(e){(e-=a-o)>=s&&en[0]?o+n[0]:n[0]),o),o=1===a?o:Math.min(t+(n[1]||0),o),a=t+a-2,u=Math.max(o,a);for(var h=[],d=[],f=2;tt;t++)e=e();return e}))},v.toJSON=function(e,t,n){return e=v.ad(e),v.a.hc(e,t,n)},n.prototype={constructor:n,save:function(e,t){var n=v.a.A(this.keys,e);0<=n?this.values[n]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=v.a.A(this.keys,t))?this.values[t]:e}}}(),v.b("toJS",v.ad),v.b("toJSON",v.toJSON),v.Wd=function(e,t,n){function i(t){var i=v.xb(e,n).extend({ma:"always"}),r=i.subscribe((function(e){e&&(r.s(),t(e))}));return i.notifySubscribers(i.v()),r}return"function"!=typeof Promise||t?i(t.bind(n)):new Promise(i)},v.b("when",v.Wd),v.w={M:function(t){switch(v.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?v.a.g.get(t,v.c.options.$b):7>=v.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?v.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,n,i){switch(v.a.R(t)){case"option":"string"==typeof n?(v.a.g.set(t,v.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=n):(v.a.g.set(t,v.c.options.$b,n),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof n?n:"");break;case"select":""!==n&&null!==n||(n=e);for(var r,o=-1,a=0,s=t.options.length;a=c){n.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=c=0,s=[];continue}}else if(58===h){if(!c&&!t&&1===s.length){t=s.pop();continue}}else{if(47===h&&1arguments.length){if(!(i=n.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!i||1!==i.nodeType&&8!==i.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(p(e,o),i)},v.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:v.Td(t)},v.Ec=function(t){return(t=v.Dc(t))?t.$data:e},v.b("bindingHandlers",v.c),v.b("bindingEvent",v.i),v.b("bindingEvent.subscribe",v.i.subscribe),v.b("bindingEvent.startPossiblyAsyncContentBinding",v.i.Cb),v.b("applyBindings",v.vc),v.b("applyBindingsToDescendants",v.Oa),v.b("applyBindingAccessorsToNode",v.ib),v.b("applyBindingsToNode",v.ld),v.b("contextFor",v.Dc),v.b("dataFor",v.Ec)}(),function(e){function t(t,i){var a,s=Object.prototype.hasOwnProperty.call(r,t)?r[t]:e;s?s.subscribe(i):((s=r[t]=new v.T).subscribe(i),n(t,(function(e,n){var i=!(!n||!n.synchronous);o[t]={definition:e,Gd:i},delete r[t],a||i?s.notifySubscribers(e):v.na.zb((function(){s.notifySubscribers(e)}))})),a=!0)}function n(e,t){i("getConfig",[e],(function(n){n?i("loadComponent",[e,n],(function(e){t(e,n)})):t(null,null)}))}function i(t,n,r,o){o||(o=v.j.loaders.slice(0));var a=o.shift();if(a){var s=a[t];if(s){var c=!1;if(s.apply(a,n.concat((function(e){c?r(null):null!==e?r(e):i(t,n,r,o)})))!==e&&(c=!0,!a.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else i(t,n,r,o)}else r(null)}var r={},o={};v.j={get:function(n,i){var r=Object.prototype.hasOwnProperty.call(o,n)?o[n]:e;r?r.Gd?v.u.G((function(){i(r.definition)})):v.na.zb((function(){i(r.definition)})):t(n,i)},Bc:function(e){delete o[e]},oc:i},v.j.loaders=[],v.b("components",v.j),v.b("components.get",v.j.get),v.b("components.clearCachedDefinition",v.j.Bc)}(),function(){function e(e,t,n,i){function r(){0==--s&&i(a)}var a={},s=2,c=n.template;n=n.viewModel,c?o(t,c,(function(t){v.j.oc("loadTemplate",[e,t],(function(e){a.template=e,r()}))})):r(),n?o(t,n,(function(t){v.j.oc("loadViewModel",[e,t],(function(e){a[l]=e,r()}))})):r()}function i(e){switch(v.a.R(e)){case"script":return v.a.ua(e.text);case"textarea":return v.a.ua(e.value);case"template":if(r(e.content))return v.a.Ca(e.content.childNodes)}return v.a.Ca(e.childNodes)}function r(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function o(e,n,i){"string"==typeof n.require?s||t.require?(s||t.require)([n.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),i(e)})):e("Uses require, but no AMD loader is present"):i(n)}function a(e){return function(t){throw Error("Component '"+e+"': "+t)}}var c={};v.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(v.j.tb(e))throw Error("Component "+e+" is already registered");c[e]=t},v.j.tb=function(e){return Object.prototype.hasOwnProperty.call(c,e)},v.j.unregister=function(e){delete c[e],v.j.Bc(e)},v.j.Fc={getConfig:function(e,t){t(v.j.tb(e)?c[e]:null)},loadComponent:function(t,n,i){var r=a(t);o(r,n,(function(n){e(t,r,n,i)}))},loadTemplate:function(e,o,s){if(e=a(e),"string"==typeof o)s(v.a.ua(o));else if(o instanceof Array)s(o);else if(r(o))s(v.a.la(o.childNodes));else if(o.element)if(o=o.element,t.HTMLElement?o instanceof HTMLElement:o&&o.tagName&&1===o.nodeType)s(i(o));else if("string"==typeof o){var c=n.getElementById(o);c?s(i(c)):e("Cannot find element with ID "+o)}else e("Unknown element type: "+o);else e("Unknown template value: "+o)},loadViewModel:function(e,t,n){!function e(t,n,i){if("function"==typeof n)i((function(e){return new n(e)}));else if("function"==typeof n[l])i(n[l]);else if("instance"in n){var r=n.instance;i((function(){return r}))}else"viewModel"in n?e(t,n.viewModel,i):t("Unknown viewModel value: "+n)}(a(e),t,n)}};var l="createViewModel";v.b("components.register",v.j.register),v.b("components.isRegistered",v.j.tb),v.b("components.unregister",v.j.unregister),v.b("components.defaultLoader",v.j.Fc),v.j.loaders.push(v.j.Fc),v.j.dd=c}(),function(){function e(e,n){if(i=e.getAttribute("params")){var i=t.parseBindingsString(i,n,e,{valueAccessors:!0,bindingParams:!0}),r=(i=v.a.Ga(i,(function(t){return v.o(t,null,{l:e})})),v.a.Ga(i,(function(t){var n=t.v();return t.ja()?v.o({read:function(){return v.a.f(t())},write:v.Za(n)&&function(e){t()(e)},l:e}):n})));return Object.prototype.hasOwnProperty.call(r,"$raw")||(r.$raw=i),r}return{$raw:{}}}v.j.getComponentNameForNode=function(e){var t=v.a.R(e);if(v.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=v.a.W&&e.tagName===t))return t},v.j.tc=function(t,n,i,r){if(1===n.nodeType){var o=v.j.getComponentNameForNode(n);if(o){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var a={name:o,params:e(n,i)};t.component=r?function(){return a}:a}}return t};var t=new v.ga;9>v.a.W&&(v.j.register=function(e){return function(t){return e.apply(this,arguments)}}(v.j.register),n.createDocumentFragment=function(e){return function(){var t,n=e(),i=v.j.dd;for(t in i);return n}}(n.createDocumentFragment))}(),function(){var e=0;v.c.component={init:function(t,n,i,r,o){function a(){var e=s&&s.dispose;"function"==typeof e&&e.call(s),l&&l.s(),c=s=l=null}var s,c,l,u=v.a.la(v.h.childNodes(t));return v.h.Ea(t),v.a.K.za(t,a),v.o((function(){var i,r,h=v.a.f(n());if("string"==typeof h?i=h:(i=v.a.f(h.name),r=v.a.f(h.params)),!i)throw Error("No component name specified");var d=v.i.Cb(t,o),f=c=++e;v.j.get(i,(function(e){if(c===f){if(a(),!e)throw Error("Unknown component '"+i+"'");!function(e,t,n){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=v.a.Ca(t),v.h.va(n,e)}(i,e,t);var n=function(e,t,n){var i=e.createViewModel;return i?i.call(e,t,n):t}(e,r,{element:t,templateNodes:u});e=d.createChildContext(n,{extend:function(e){e.$component=n,e.$componentTemplateNodes=u}}),n&&n.koDescendantsComplete&&(l=v.i.subscribe(t,v.i.pa,n.koDescendantsComplete,n)),s=n,v.Oa(e,t)}}))}),null,{l:t}),{controlsDescendantBindings:!0}}},v.h.ea.component=!0}();var D={class:"className",for:"htmlFor"};v.c.attr={update:function(t,n){var i=v.a.f(n())||{};v.a.P(i,(function(n,i){i=v.a.f(i);var r=n.indexOf(":"),o=(r="lookupNamespaceURI"in t&&0=v.a.W&&n in D?(n=D[n],o?t.removeAttribute(n):t[n]=i):o||(r?t.setAttributeNS(r,n,i):t.setAttribute(n,i)),"name"===n&&v.a.Yc(t,o?"":i)}))}},v.c.checked={after:["value","attr"],init:function(t,n,i){function r(){var r=t.checked,c=o();if(!v.S.Ya()&&(r||!s&&!v.S.qa())){var h=v.u.G(n);if(l){var f=u?h.v():h,p=d;d=c,p!==c?r&&(v.a.Na(f,c,!0),v.a.Na(f,p,!1)):v.a.Na(f,c,r),u&&v.Za(h)&&h(f)}else a&&(c===e?c=r:r||(c=e)),v.m.eb(h,i,"checked",c,!0)}}var o=v.xb((function(){return i.has("checkedValue")?v.a.f(i.get("checkedValue")):h?i.has("value")?v.a.f(i.get("value")):t.value:void 0})),a="checkbox"==t.type,s="radio"==t.type;if(a||s){var c=n(),l=a&&v.a.f(c)instanceof Array,u=!(l&&c.push&&c.splice),h=s||l,d=l?o():e;s&&!t.name&&v.c.uniqueName.init(t,(function(){return!0})),v.o(r,null,{l:t}),v.a.B(t,"click",r),v.o((function(){var i=v.a.f(n()),r=o();l?(t.checked=0<=v.a.A(i,r),d=r):t.checked=a&&r===e?!!i:o()===i}),null,{l:t}),c=e}}},v.m.wa.checked=!0,v.c.checkedValue={update:function(e,t){e.value=v.a.f(t())}},v.c.class={update:function(e,t){var n=v.a.Db(v.a.f(t()));v.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=n,v.a.Eb(e,n,!0)}},v.c.css={update:function(e,t){var n=v.a.f(t());null!==n&&"object"==typeof n?v.a.P(n,(function(t,n){n=v.a.f(n),v.a.Eb(e,t,n)})):v.c.class.update(e,t)}},v.c.enable={update:function(e,t){var n=v.a.f(t());n&&e.disabled?e.removeAttribute("disabled"):n||e.disabled||(e.disabled=!0)}},v.c.disable={update:function(e,t){v.c.enable.update(e,(function(){return!v.a.f(t())}))}},v.c.event={init:function(e,t,n,i,r){var o=t()||{};v.a.P(o,(function(o){"string"==typeof o&&v.a.B(e,o,(function(e){var a,s=t()[o];if(s){try{var c=v.a.la(arguments);i=r.$data,c.unshift(i),a=s.apply(i,c)}finally{!0!==a&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===n.get(o+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},v.c.foreach={Rc:function(e){return function(){var t=e(),n=v.a.bc(t);return n&&"number"!=typeof n.length?(v.a.f(t),{foreach:n.data,as:n.as,noChildContext:n.noChildContext,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:v.ba.Ma}):{foreach:t,templateEngine:v.ba.Ma}}},init:function(e,t){return v.c.template.init(e,v.c.foreach.Rc(t))},update:function(e,t,n,i,r){return v.c.template.update(e,v.c.foreach.Rc(t),n,i,r)}},v.m.Ra.foreach=!1,v.h.ea.foreach=!0,v.c.hasfocus={init:function(e,t,n){function i(i){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch(e){o=r.body}i=o===e}r=t(),v.m.eb(r,n,"hasfocus",i,!0),e.__ko_hasfocusLastValue=i,e.__ko_hasfocusUpdating=!1}var r=i.bind(null,!0),o=i.bind(null,!1);v.a.B(e,"focus",r),v.a.B(e,"focusin",r),v.a.B(e,"blur",o),v.a.B(e,"focusout",o),e.__ko_hasfocusLastValue=!1},update:function(e,t){var n=!!v.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===n||(n?e.focus():e.blur(),!n&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),v.u.G(v.a.Fb,null,[e,n?"focusin":"focusout"]))}},v.m.wa.hasfocus=!0,v.c.hasFocus=v.c.hasfocus,v.m.wa.hasFocus="hasfocus",v.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){v.a.fc(e,t())}},function(){function e(e,t,n){v.c[e]={init:function(e,i,r,o,a){var s,c,l,u,h,d={};if(t){o=r.get("as");var f=r.get("noChildContext");d={as:o,noChildContext:f,exportDependencies:h=!(o&&f)}}return u=(l="render"==r.get("completeOn"))||r.has(v.i.pa),v.o((function(){var r,o=v.a.f(i()),f=!n!=!o,p=!c;(h||f!==s)&&(u&&(a=v.i.Cb(e,a)),f&&(t&&!h||(d.dataDependency=v.S.o()),r=t?a.createChildContext("function"==typeof o?o:i,d):v.S.qa()?a.extend(null,d):a),p&&v.S.qa()&&(c=v.a.Ca(v.h.childNodes(e),!0)),f?(p||v.h.va(e,v.a.Ca(c)),v.Oa(r,e)):(v.h.Ea(e),l||v.i.ma(e,v.i.H)),s=f)}),null,{l:e}),{controlsDescendantBindings:!0}}},v.m.Ra[e]=!1,v.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),v.c.let={init:function(e,t,n,i,r){return t=r.extend(t),v.Oa(t,e),{controlsDescendantBindings:!0}}},v.h.ea.let=!0;var R={};v.c.options={init:function(e){if("select"!==v.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0o)var l=v.a.g.Z(),u=v.a.g.Z(),h=function(e){var t=this.activeElement;(t=t&&v.a.g.get(t,u))&&t(e)},d=function(e,t){var n=e.ownerDocument;v.a.g.get(n,l)||(v.a.g.set(n,l,!0),v.a.B(n,"selectionchange",h)),v.a.g.set(e,u,t)};v.c.textInput={init:function(t,s,c){function l(e,n){v.a.B(t,e,n)}function u(){f||(p=t.value,f=v.a.setTimeout(h,4))}function h(){clearTimeout(f),p=f=e;var n=t.value;m!==n&&(m=n,v.m.eb(s(),c,"textInput",n))}var f,p,m=t.value,g=9==v.a.W?u:h,_=!1;o&&l("keypress",h),11>o&&l("propertychange",(function(e){_||"value"!==e.propertyName||g(e)})),8==o&&(l("keyup",h),l("keydown",h)),d&&(d(t,g),l("dragend",u)),(!o||9<=o)&&l("input",g),5>i&&"textarea"===v.a.R(t)?(l("keydown",u),l("paste",u),l("cut",u)):11>n?l("keydown",u):4>r?(l("DOMAutoComplete",h),l("dragdrop",h),l("drop",h)):a&&"number"===t.type&&l("keydown",u),l("change",h),l("blur",h),v.o((function n(){var i=v.a.f(s());null!==i&&i!==e||(i=""),p!==e&&i===p?v.a.setTimeout(n,4):t.value!==i&&(_=!0,t.value=i,_=!1,m=t.value)}),null,{l:t})}},v.m.wa.textInput=!0,v.c.textinput={preprocess:function(e,t,n){n("textInput",e)}}}(),v.c.uniqueName={init:function(e,t){if(t()){var n="ko_unique_"+ ++v.c.uniqueName.rd;v.a.Yc(e,n)}}},v.c.uniqueName.rd=0,v.c.using={init:function(e,t,n,i,r){var o;return n.has("as")&&(o={as:n.get("as"),noChildContext:n.get("noChildContext")}),t=r.createChildContext(t,o),v.Oa(t,e),{controlsDescendantBindings:!0}}},v.h.ea.using=!0,v.c.value={init:function(t,n,i){var r=v.a.R(t),o="input"==r;if(!o||"checkbox"!=t.type&&"radio"!=t.type){var a=[],s=i.get("valueUpdate"),c=!1,l=null;s&&(a="string"==typeof s?[s]:v.a.wc(s),v.a.Pa(a,"change"));var u,h,d=function(){l=null,c=!1;var e=n(),r=v.w.M(t);v.m.eb(e,i,"value",r)};!v.a.W||!o||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=v.a.A(a,"propertychange")||(v.a.B(t,"propertychange",(function(){c=!0})),v.a.B(t,"focus",(function(){c=!1})),v.a.B(t,"blur",(function(){c&&d()}))),v.a.D(a,(function(e){var n=d;v.a.Ud(e,"after")&&(n=function(){l=v.w.M(t),v.a.setTimeout(d,0)},e=e.substring(5)),v.a.B(t,e,n)})),u=o&&"file"==t.type?function(){var i=v.a.f(n());null===i||i===e||""===i?t.value="":v.u.G(d)}:function(){var o=v.a.f(n()),a=v.w.M(t);null!==l&&o===l?v.a.setTimeout(u,0):o===a&&a!==e||("select"===r?(a=i.get("valueAllowUnset"),v.w.cb(t,o,a),a||o===v.w.M(t)||v.u.G(d)):v.w.cb(t,o))},"select"===r?v.i.subscribe(t,v.i.H,(function(){h?i.get("valueAllowUnset")?u():d():(v.a.B(t,"change",d),h=v.o(u,null,{l:t}))}),null,{notifyImmediately:!0}):(v.a.B(t,"change",d),v.o(u,null,{l:t}))}else v.ib(t,{checkedValue:n})},update:function(){}},v.m.wa.value=!0,v.c.visible={update:function(e,t){var n=v.a.f(t()),i="none"!=e.style.display;n&&!i?e.style.display="":!n&&i&&(e.style.display="none")}},v.c.hidden={update:function(e,t){v.c.visible.update(e,(function(){return!v.a.f(t())}))}},function(e){v.c[e]={init:function(t,n,i,r,o){return v.c.event.init.call(this,t,(function(){var t={};return t[e]=n(),t}),i,r,o)}}}("click"),v.ca=function(){},v.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},v.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},v.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var i=(t=t||n).getElementById(e);if(!i)throw Error("Cannot find template with ID "+e);return new v.C.F(i)}if(1==e.nodeType||8==e.nodeType)return new v.C.ia(e);throw Error("Unknown template type: "+e)},v.ca.prototype.renderTemplate=function(e,t,n,i){return e=this.makeTemplateSource(e,i),this.renderTemplateSource(e,t,n,i)},v.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},v.ca.prototype.rewriteTemplate=function(e,t,n){t=t((e=this.makeTemplateSource(e,n)).text()),e.text(t),e.data("isRewritten",!0)},v.b("templateEngine",v.ca),v.kc=function(){function e(e,t,n,i){e=v.m.ac(e);for(var r=v.m.Ra,o=0;o]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,n){t.isTemplateRewritten(e,n)||t.rewriteTemplate(e,(function(e){return v.kc.Ld(e,t)}),n)},Ld:function(i,r){return i.replace(t,(function(t,n,i,o,a){return e(a,n,i,r)})).replace(n,(function(t,n){return e(n,"\x3c!-- ko --\x3e","#comment",r)}))},md:function(e,t){return v.aa.Xb((function(n,i){var r=n.nextSibling;r&&r.nodeName.toLowerCase()===t&&v.ib(r,e,i)}))}}}(),v.b("__tr_ambtns",v.kc.md),function(){v.C={},v.C.F=function(e){if(this.F=e){var t=v.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},v.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?v.a.fc(this.F,t):this.F[e]=t};var t=v.a.g.Z()+"_";v.C.F.prototype.data=function(e){if(1===arguments.length)return v.a.g.get(this.F,t+e);v.a.g.set(this.F,t+e,arguments[1])};var n=v.a.g.Z();v.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var i=v.a.g.get(t,n)||{},r=i.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!r||i.jd){var o=this.text();o&&o!==i.bb&&(r=v.a.Md(o,t.ownerDocument),v.a.g.set(t,n,{lb:r,bb:o,jd:!0}))}return r}i=arguments[0],this.ab!==e&&this.text(""),v.a.g.set(t,n,{lb:i})},v.C.ia=function(e){this.F=e},v.C.ia.prototype=new v.C.F,v.C.ia.prototype.constructor=v.C.ia,v.C.ia.prototype.text=function(){if(0==arguments.length){var t=v.a.g.get(this.F,n)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}v.a.g.set(this.F,n,{bb:arguments[0]})},v.b("templateSources",v.C),v.b("templateSources.domElement",v.C.F),v.b("templateSources.anonymousTemplate",v.C.ia)}(),function(){function t(e,t,n){var i;for(t=v.h.nextSibling(t);e&&(i=e)!==t;)n(i,e=v.h.nextSibling(i))}function n(e,n){if(e.length){var i=e[0],r=e[e.length-1],o=i.parentNode,a=v.ga.instance,s=a.preprocessNode;if(s){if(t(i,r,(function(e,t){var n=e.previousSibling,o=s.call(a,e);o&&(e===i&&(i=o[0]||t),e===r&&(r=o[o.length-1]||n))})),e.length=0,!i)return;i===r?e.push(i):(e.push(i,r),v.a.Ua(e,o))}t(i,r,(function(e){1!==e.nodeType&&8!==e.nodeType||v.vc(n,e)})),t(i,r,(function(e){1!==e.nodeType&&8!==e.nodeType||v.aa.cd(e,[n])})),v.a.Ua(e,o)}}function i(e){return e.nodeType?e:0v.a.W||!e.nodes?null:e.nodes())?v.a.la(t.cloneNode(!0).childNodes):(e=e.text(),v.a.ua(e,i))},v.ba.Ma=new v.ba,v.gc(v.ba.Ma),v.b("nativeTemplateEngine",v.ba),function(){v.$a=function(){var e=this.Hd=function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,i,o,a){if(a=a||n,o=o||{},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=r.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[i.$data],i=r.extend({koBindingContext:i},o.templateOptions),(i=r.tmpl(s,t,i)).appendTo(a.createElement("div")),r.fragments={},i},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){n.write("