New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hub-text-notes-layer

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hub-text-notes-layer - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

2

dist/HubTextNotesLayer.js

@@ -1,1 +0,1 @@

define(["esri/layers/Layer","esri/geometry/geometryEngine","esri/geometry/Point","esri/views/2d/layers/BaseLayerView2D","esri/Graphic"],(function(t,e,n,r,i){"use strict";var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t,e){return t(e={exports:{}},e.exports),e.exports}var l=function(t){return t&&t.Math==Math&&t},c=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof o&&o)||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},u=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,y={f:h&&!f.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:f},m=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d={}.toString,p=function(t){return d.call(t).slice(8,-1)},g="".split,v=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?g.call(t,""):Object(t)}:Object,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},x=function(t){return v(b(t))},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},E=function(t,e){if(!w(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!w(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},S={}.hasOwnProperty,P=function(t,e){return S.call(t,e)},O=c.document,T=w(O)&&w(O.createElement),A=function(t){return T?O.createElement(t):{}},j=!u&&!s((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),N=Object.getOwnPropertyDescriptor,L={f:u?N:function(t,e){if(t=x(t),e=E(e,!0),j)try{return N(t,e)}catch(t){}if(P(t,e))return m(!y.f.call(t,e),t[e])}},R=function(t){if(!w(t))throw TypeError(String(t)+" is not an object");return t},k=Object.defineProperty,C={f:u?k:function(t,e,n){if(R(t),e=E(e,!0),R(n),j)try{return k(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},I=u?function(t,e,n){return C.f(t,e,m(1,n))}:function(t,e,n){return t[e]=n,t},M=function(t,e){try{I(c,t,e)}catch(n){c[t]=e}return e},_=c["__core-js_shared__"]||M("__core-js_shared__",{}),D=Function.toString;"function"!=typeof _.inspectSource&&(_.inspectSource=function(t){return D.call(t)});var F,U,z,G=_.inspectSource,H=c.WeakMap,B="function"==typeof H&&/native code/.test(G(H)),W=a((function(t){(t.exports=function(t,e){return _[t]||(_[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),V=0,J=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++V+J).toString(36)},q=W("keys"),$=function(t){return q[t]||(q[t]=K(t))},Y={},Q=c.WeakMap;if(B){var Z=new Q,X=Z.get,tt=Z.has,et=Z.set;F=function(t,e){return et.call(Z,t,e),e},U=function(t){return X.call(Z,t)||{}},z=function(t){return tt.call(Z,t)}}else{var nt=$("state");Y[nt]=!0,F=function(t,e){return I(t,nt,e),e},U=function(t){return P(t,nt)?t[nt]:{}},z=function(t){return P(t,nt)}}var rt,it,ot={set:F,get:U,has:z,enforce:function(t){return z(t)?U(t):F(t,{})},getterFor:function(t){return function(e){var n;if(!w(e)||(n=U(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},at=a((function(t){var e=ot.get,n=ot.enforce,r=String(String).split("String");(t.exports=function(t,e,i,o){var a=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,s=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof e||P(i,"name")||I(i,"name",e),n(i).source=r.join("string"==typeof e?e:"")),t!==c?(a?!s&&t[e]&&(l=!0):delete t[e],l?t[e]=i:I(t,e,i)):l?t[e]=i:M(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||G(this)}))})),lt=c,ct=function(t){return"function"==typeof t?t:void 0},st=function(t,e){return arguments.length<2?ct(lt[t])||ct(c[t]):lt[t]&&lt[t][e]||c[t]&&c[t][e]},ut=Math.ceil,ft=Math.floor,ht=function(t){return isNaN(t=+t)?0:(t>0?ft:ut)(t)},yt=Math.min,mt=function(t){return t>0?yt(ht(t),9007199254740991):0},dt=Math.max,pt=Math.min,gt=function(t){return function(e,n,r){var i,o=x(e),a=mt(o.length),l=function(t,e){var n=ht(t);return n<0?dt(n+e,0):pt(n,e)}(r,a);if(t&&n!=n){for(;a>l;)if((i=o[l++])!=i)return!0}else for(;a>l;l++)if((t||l in o)&&o[l]===n)return t||l||0;return!t&&-1}},vt={includes:gt(!0),indexOf:gt(!1)},bt=vt.indexOf,xt=function(t,e){var n,r=x(t),i=0,o=[];for(n in r)!P(Y,n)&&P(r,n)&&o.push(n);for(;e.length>i;)P(r,n=e[i++])&&(~bt(o,n)||o.push(n));return o},wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Et=wt.concat("length","prototype"),St={f:Object.getOwnPropertyNames||function(t){return xt(t,Et)}},Pt={f:Object.getOwnPropertySymbols},Ot=st("Reflect","ownKeys")||function(t){var e=St.f(R(t)),n=Pt.f;return n?e.concat(n(t)):e},Tt=function(t,e){for(var n=Ot(e),r=C.f,i=L.f,o=0;o<n.length;o++){var a=n[o];P(t,a)||r(t,a,i(e,a))}},At=/#|\.prototype\./,jt=function(t,e){var n=Lt[Nt(t)];return n==kt||n!=Rt&&("function"==typeof e?s(e):!!e)},Nt=jt.normalize=function(t){return String(t).replace(At,".").toLowerCase()},Lt=jt.data={},Rt=jt.NATIVE="N",kt=jt.POLYFILL="P",Ct=jt,It=L.f,Mt=function(t,e){var n,r,i,o,a,l=t.target,s=t.global,u=t.stat;if(n=s?c:u?c[l]||M(l,{}):(c[l]||{}).prototype)for(r in e){if(o=e[r],i=t.noTargetGet?(a=It(n,r))&&a.value:n[r],!Ct(s?r:l+(u?".":"#")+r,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;Tt(o,i)}(t.sham||i&&i.sham)&&I(o,"sham",!0),at(n,r,o,t)}},_t=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Dt=function(t,e,n){if(_t(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},Ft=function(t){return Object(b(t))},Ut=Array.isArray||function(t){return"Array"==p(t)},zt=!!Object.getOwnPropertySymbols&&!s((function(){return!String(Symbol())})),Gt=zt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ht=W("wks"),Bt=c.Symbol,Wt=Gt?Bt:Bt&&Bt.withoutSetter||K,Vt=function(t){return P(Ht,t)||(zt&&P(Bt,t)?Ht[t]=Bt[t]:Ht[t]=Wt("Symbol."+t)),Ht[t]},Jt=Vt("species"),Kt=function(t,e){var n;return Ut(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Ut(n.prototype)?w(n)&&null===(n=n[Jt])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},qt=[].push,$t=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,a=5==t||o;return function(l,c,s,u){for(var f,h,y=Ft(l),m=v(y),d=Dt(c,s,3),p=mt(m.length),g=0,b=u||Kt,x=e?b(l,p):n?b(l,0):void 0;p>g;g++)if((a||g in m)&&(h=d(f=m[g],g,y),t))if(e)x[g]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return g;case 2:qt.call(x,f)}else if(i)return!1;return o?-1:r||i?i:x}},Yt={forEach:$t(0),map:$t(1),filter:$t(2),some:$t(3),every:$t(4),find:$t(5),findIndex:$t(6)},Qt=st("navigator","userAgent")||"",Zt=c.process,Xt=Zt&&Zt.versions,te=Xt&&Xt.v8;te?it=(rt=te.split("."))[0]+rt[1]:Qt&&(!(rt=Qt.match(/Edge\/(\d+)/))||rt[1]>=74)&&(rt=Qt.match(/Chrome\/(\d+)/))&&(it=rt[1]);var ee=it&&+it,ne=Vt("species"),re=function(t){return ee>=51||!s((function(){var e=[];return(e.constructor={})[ne]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ie=Object.defineProperty,oe={},ae=function(t){throw t},le=function(t,e){if(P(oe,t))return oe[t];e||(e={});var n=[][t],r=!!P(e,"ACCESSORS")&&e.ACCESSORS,i=P(e,0)?e[0]:ae,o=P(e,1)?e[1]:void 0;return oe[t]=!!n&&!s((function(){if(r&&!u)return!0;var t={length:-1};r?ie(t,1,{enumerable:!0,get:ae}):t[1]=1,n.call(t,i,o)}))},ce=Yt.filter,se=re("filter"),ue=le("filter");Mt({target:"Array",proto:!0,forced:!se||!ue},{filter:function(t){return ce(this,t,arguments.length>1?arguments[1]:void 0)}});var fe,he=Object.keys||function(t){return xt(t,wt)},ye=u?Object.defineProperties:function(t,e){R(t);for(var n,r=he(e),i=r.length,o=0;i>o;)C.f(t,n=r[o++],e[n]);return t},me=st("document","documentElement"),de=$("IE_PROTO"),pe=function(){},ge=function(t){return"<script>"+t+"<\/script>"},ve=function(){try{fe=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;ve=fe?function(t){t.write(ge("")),t.close();var e=t.parentWindow.Object;return t=null,e}(fe):((e=A("iframe")).style.display="none",me.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(ge("document.F=Object")),t.close(),t.F);for(var n=wt.length;n--;)delete ve.prototype[wt[n]];return ve()};Y[de]=!0;var be=Object.create||function(t,e){var n;return null!==t?(pe.prototype=R(t),n=new pe,pe.prototype=null,n[de]=t):n=ve(),void 0===e?n:ye(n,e)},xe=Vt("unscopables"),we=Array.prototype;null==we[xe]&&C.f(we,xe,{configurable:!0,value:be(null)});var Ee=function(t){we[xe][t]=!0},Se=Yt.find,Pe=!0,Oe=le("find");"find"in[]&&Array(1).find((function(){Pe=!1})),Mt({target:"Array",proto:!0,forced:Pe||!Oe},{find:function(t){return Se(this,t,arguments.length>1?arguments[1]:void 0)}}),Ee("find");var Te=function(t,e){var n=[][t];return!!n&&s((function(){n.call(null,e||function(){throw 1},1)}))},Ae=Yt.forEach,je=Te("forEach"),Ne=le("forEach"),Le=je&&Ne?[].forEach:function(t){return Ae(this,t,arguments.length>1?arguments[1]:void 0)};Mt({target:"Array",proto:!0,forced:[].forEach!=Le},{forEach:Le});var Re,ke,Ce,Ie={},Me=!s((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),_e=$("IE_PROTO"),De=Object.prototype,Fe=Me?Object.getPrototypeOf:function(t){return t=Ft(t),P(t,_e)?t[_e]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?De:null},Ue=Vt("iterator"),ze=!1;[].keys&&("next"in(Ce=[].keys())?(ke=Fe(Fe(Ce)))!==Object.prototype&&(Re=ke):ze=!0),null==Re&&(Re={}),P(Re,Ue)||I(Re,Ue,(function(){return this}));var Ge={IteratorPrototype:Re,BUGGY_SAFARI_ITERATORS:ze},He=C.f,Be=Vt("toStringTag"),We=function(t,e,n){t&&!P(t=n?t:t.prototype,Be)&&He(t,Be,{configurable:!0,value:e})},Ve=Ge.IteratorPrototype,Je=function(){return this},Ke=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return R(n),function(t){if(!w(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),qe=Ge.IteratorPrototype,$e=Ge.BUGGY_SAFARI_ITERATORS,Ye=Vt("iterator"),Qe=function(){return this},Ze=function(t,e,n,r,i,o,a){!function(t,e,n){var r=e+" Iterator";t.prototype=be(Ve,{next:m(1,n)}),We(t,r,!1),Ie[r]=Je}(n,e,r);var l,c,s,u=function(t){if(t===i&&p)return p;if(!$e&&t in y)return y[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",h=!1,y=t.prototype,d=y[Ye]||y["@@iterator"]||i&&y[i],p=!$e&&d||u(i),g="Array"==e&&y.entries||d;if(g&&(l=Fe(g.call(new t)),qe!==Object.prototype&&l.next&&(Fe(l)!==qe&&(Ke?Ke(l,qe):"function"!=typeof l[Ye]&&I(l,Ye,Qe)),We(l,f,!0))),"values"==i&&d&&"values"!==d.name&&(h=!0,p=function(){return d.call(this)}),y[Ye]!==p&&I(y,Ye,p),Ie[e]=p,i)if(c={values:u("values"),keys:o?p:u("keys"),entries:u("entries")},a)for(s in c)($e||h||!(s in y))&&at(y,s,c[s]);else Mt({target:e,proto:!0,forced:$e||h},c);return c},Xe=ot.set,tn=ot.getterFor("Array Iterator"),en=Ze(Array,"Array",(function(t,e){Xe(this,{type:"Array Iterator",target:x(t),index:0,kind:e})}),(function(){var t=tn(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");Ie.Arguments=Ie.Array,Ee("keys"),Ee("values"),Ee("entries");var nn=Yt.map,rn=re("map"),on=le("map");Mt({target:"Array",proto:!0,forced:!rn||!on},{map:function(t){return nn(this,t,arguments.length>1?arguments[1]:void 0)}});var an=Object.assign,ln=Object.defineProperty,cn=!an||s((function(){if(u&&1!==an({b:1},an(ln({},"a",{enumerable:!0,get:function(){ln(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=an({},t)[n]||"abcdefghijklmnopqrst"!=he(an({},e)).join("")}))?function(t,e){for(var n=Ft(t),r=arguments.length,i=1,o=Pt.f,a=y.f;r>i;)for(var l,c=v(arguments[i++]),s=o?he(c).concat(o(c)):he(c),f=s.length,h=0;f>h;)l=s[h++],u&&!a.call(c,l)||(n[l]=c[l]);return n}:an;Mt({target:"Object",stat:!0,forced:Object.assign!==cn},{assign:cn});var sn={};sn[Vt("toStringTag")]="z";var un="[object z]"===String(sn),fn=Vt("toStringTag"),hn="Arguments"==p(function(){return arguments}()),yn=un?p:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),fn))?n:hn?p(e):"Object"==(r=p(e))&&"function"==typeof e.callee?"Arguments":r},mn=un?{}.toString:function(){return"[object "+yn(this)+"]"};un||at(Object.prototype,"toString",mn,{unsafe:!0});var dn=!s((function(){return Object.isExtensible(Object.preventExtensions({}))})),pn=a((function(t){var e=C.f,n=K("meta"),r=0,i=Object.isExtensible||function(){return!0},o=function(t){e(t,n,{value:{objectID:"O"+ ++r,weakData:{}}})},a=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!w(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!P(t,n)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[n].objectID},getWeakData:function(t,e){if(!P(t,n)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[n].weakData},onFreeze:function(t){return dn&&a.REQUIRED&&i(t)&&!P(t,n)&&o(t),t}};Y[n]=!0})),gn=(pn.REQUIRED,pn.fastKey,pn.getWeakData,pn.onFreeze,Vt("iterator")),vn=Array.prototype,bn=Vt("iterator"),xn=function(t,e,n,r){try{return r?e(R(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&R(i.call(t)),e}},wn=a((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,n,r,i,o){var a,l,c,s,u,f,h,y,m=Dt(n,r,i?2:1);if(o)a=t;else{if("function"!=typeof(l=function(t){if(null!=t)return t[bn]||t["@@iterator"]||Ie[yn(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(y=l)&&(Ie.Array===y||vn[gn]===y)){for(c=0,s=mt(t.length);s>c;c++)if((u=i?m(R(h=t[c])[0],h[1]):m(t[c]))&&u instanceof e)return u;return new e(!1)}a=l.call(t)}for(f=a.next;!(h=f.call(a)).done;)if("object"==typeof(u=xn(a,m,h.value,i))&&u&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}})),En=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t},Sn=Vt("iterator"),Pn=!1;try{var On=0,Tn={next:function(){return{done:!!On++}},return:function(){Pn=!0}};Tn[Sn]=function(){return this},Array.from(Tn,(function(){throw 2}))}catch(t){}var An=function(t,e){if(!e&&!Pn)return!1;var n=!1;try{var r={};r[Sn]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},jn=function(t,e,n){for(var r in e)at(t,r,e[r],n);return t},Nn=Vt("species"),Ln=function(t){var e=st(t),n=C.f;u&&e&&!e[Nn]&&n(e,Nn,{configurable:!0,get:function(){return this}})},Rn=C.f,kn=pn.fastKey,Cn=ot.set,In=ot.getterFor,Mn=(function(t,e,n){var r=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),o=r?"set":"add",a=c[t],l=a&&a.prototype,u=a,f={},h=function(t){var e=l[t];at(l,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!w(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return i&&!w(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!w(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(Ct(t,"function"!=typeof a||!(i||l.forEach&&!s((function(){(new a).entries().next()})))))u=n.getConstructor(e,t,r,o),pn.REQUIRED=!0;else if(Ct(t,!0)){var y=new u,m=y[o](i?{}:-0,1)!=y,d=s((function(){y.has(1)})),p=An((function(t){new a(t)})),g=!i&&s((function(){for(var t=new a,e=5;e--;)t[o](e,e);return!t.has(-0)}));p||((u=e((function(e,n){En(e,u,t);var i=function(t,e,n){var r,i;return Ke&&"function"==typeof(r=e.constructor)&&r!==n&&w(i=r.prototype)&&i!==n.prototype&&Ke(t,i),t}(new a,e,u);return null!=n&&wn(n,i[o],i,r),i}))).prototype=l,l.constructor=u),(d||g)&&(h("delete"),h("has"),r&&h("get")),(g||m)&&h(o),i&&l.clear&&delete l.clear}f[t]=u,Mt({global:!0,forced:u!=a},f),We(u,t),i||n.setStrong(u,t,r)}("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,e,n,r){var i=t((function(t,o){En(t,i,e),Cn(t,{type:e,index:be(null),first:void 0,last:void 0,size:0}),u||(t.size=0),null!=o&&wn(o,t[r],t,n)})),o=In(e),a=function(t,e,n){var r,i,a=o(t),c=l(t,e);return c?c.value=n:(a.last=c={index:i=kn(e,!0),key:e,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||(a.first=c),r&&(r.next=c),u?a.size++:t.size++,"F"!==i&&(a.index[i]=c)),t},l=function(t,e){var n,r=o(t),i=kn(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return jn(i.prototype,{clear:function(){for(var t=o(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,u?t.size=0:this.size=0},delete:function(t){var e=o(this),n=l(this,t);if(n){var r=n.next,i=n.previous;delete e.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),e.first==n&&(e.first=r),e.last==n&&(e.last=i),u?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=o(this),r=Dt(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!l(this,t)}}),jn(i.prototype,n?{get:function(t){var e=l(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),u&&Rn(i.prototype,"size",{get:function(){return o(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=In(e),o=In(r);Ze(t,e,(function(t,e){Cn(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),Ln(e)}}),function(t){return function(e,n){var r,i,o=String(b(e)),a=ht(n),l=o.length;return a<0||a>=l?t?"":void 0:(r=o.charCodeAt(a))<55296||r>56319||a+1===l||(i=o.charCodeAt(a+1))<56320||i>57343?t?o.charAt(a):r:t?o.slice(a,a+2):i-56320+(r-55296<<10)+65536}}),_n={codeAt:Mn(!1),charAt:Mn(!0)},Dn=_n.charAt,Fn=ot.set,Un=ot.getterFor("String Iterator");Ze(String,"String",(function(t){Fn(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Un(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=Dn(n,r),e.index+=t.length,{value:t,done:!1})}));var zn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var Gn in zn){var Hn=c[Gn],Bn=Hn&&Hn.prototype;if(Bn&&Bn.forEach!==Le)try{I(Bn,"forEach",Le)}catch(t){Bn.forEach=Le}}var Wn=Vt("iterator"),Vn=Vt("toStringTag"),Jn=en.values;for(var Kn in zn){var qn=c[Kn],$n=qn&&qn.prototype;if($n){if($n[Wn]!==Jn)try{I($n,Wn,Jn)}catch(t){$n[Wn]=Jn}if($n[Vn]||I($n,Vn,Kn),zn[Kn])for(var Yn in en)if($n[Yn]!==en[Yn])try{I($n,Yn,en[Yn])}catch(t){$n[Yn]=en[Yn]}}}function Qn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var tr=function(t){return function(e,n,r,i){_t(n);var o=Ft(e),a=v(o),l=mt(o.length),c=t?l-1:0,s=t?-1:1;if(r<2)for(;;){if(c in a){i=a[c],c+=s;break}if(c+=s,t?c<0:l<=c)throw TypeError("Reduce of empty array with no initial value")}for(;t?c>=0:l>c;c+=s)c in a&&(i=n(i,a[c],c,o));return i}},er={left:tr(!1),right:tr(!0)}.left,nr=Te("reduce"),rr=le("reduce",{1:0});Mt({target:"Array",proto:!0,forced:!nr||!rr},{reduce:function(t){return er(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var ir=Yt.some,or=Te("some"),ar=le("some");Mt({target:"Array",proto:!0,forced:!or||!ar},{some:function(t){return ir(this,t,arguments.length>1?arguments[1]:void 0)}});var lr=function(){var t=R(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function cr(t,e){return RegExp(t,e)}var sr,ur,fr={UNSUPPORTED_Y:s((function(){var t=cr("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:s((function(){var t=cr("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},hr=RegExp.prototype.exec,yr=String.prototype.replace,mr=hr,dr=(sr=/a/,ur=/b*/g,hr.call(sr,"a"),hr.call(ur,"a"),0!==sr.lastIndex||0!==ur.lastIndex),pr=fr.UNSUPPORTED_Y||fr.BROKEN_CARET,gr=void 0!==/()??/.exec("")[1];(dr||gr||pr)&&(mr=function(t){var e,n,r,i,o=this,a=pr&&o.sticky,l=lr.call(o),c=o.source,s=0,u=t;return a&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),u=String(t).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==t[o.lastIndex-1])&&(c="(?: "+c+")",u=" "+u,s++),n=new RegExp("^(?:"+c+")",l)),gr&&(n=new RegExp("^"+c+"$(?!\\s)",l)),dr&&(e=o.lastIndex),r=hr.call(a?n:o,u),a?r?(r.input=r.input.slice(s),r[0]=r[0].slice(s),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:dr&&r&&(o.lastIndex=o.global?r.index+r[0].length:e),gr&&r&&r.length>1&&yr.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var vr=mr;Mt({target:"RegExp",proto:!0,forced:/./.exec!==vr},{exec:vr});var br=Vt("species"),xr=!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),wr="$0"==="a".replace(/./,"$0"),Er=Vt("replace"),Sr=!!/./[Er]&&""===/./[Er]("a","$0"),Pr=!s((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Or=function(t,e,n,r){var i=Vt(t),o=!s((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),a=o&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[br]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](""),!e}));if(!o||!a||"replace"===t&&(!xr||!wr||Sr)||"split"===t&&!Pr){var l=/./[i],c=n(i,""[t],(function(t,e,n,r,i){return e.exec===vr?o&&!i?{done:!0,value:l.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:wr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Sr}),u=c[0],f=c[1];at(String.prototype,t,u),at(RegExp.prototype,i,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}r&&I(RegExp.prototype[i],"sham",!0)},Tr=_n.charAt,Ar=function(t,e,n){return e+(n?Tr(t,e).length:1)},jr=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==p(t))throw TypeError("RegExp#exec called on incompatible receiver");return vr.call(t,e)};Or("match",1,(function(t,e,n){return[function(e){var n=b(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=R(t),o=String(this);if(!i.global)return jr(i,o);var a=i.unicode;i.lastIndex=0;for(var l,c=[],s=0;null!==(l=jr(i,o));){var u=String(l[0]);c[s]=u,""===u&&(i.lastIndex=Ar(o,mt(i.lastIndex),a)),s++}return 0===s?null:c}]}));var Nr=Vt("match"),Lr=Vt("species"),Rr=function(t,e){var n,r=R(t).constructor;return void 0===r||null==(n=R(r)[Lr])?e:_t(n)},kr=[].push,Cr=Math.min,Ir=!s((function(){return!RegExp(4294967295,"y")}));Or("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r,i,o=String(b(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===t)return[o];if(!w(r=t)||!(void 0!==(i=r[Nr])?i:"RegExp"==p(r)))return e.call(o,t,a);for(var l,c,s,u=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,y=new RegExp(t.source,f+"g");(l=vr.call(y,o))&&!((c=y.lastIndex)>h&&(u.push(o.slice(h,l.index)),l.length>1&&l.index<o.length&&kr.apply(u,l.slice(1)),s=l[0].length,h=c,u.length>=a));)y.lastIndex===l.index&&y.lastIndex++;return h===o.length?!s&&y.test("")||u.push(""):u.push(o.slice(h)),u.length>a?u.slice(0,a):u}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=b(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var o=n(r,t,this,i,r!==e);if(o.done)return o.value;var a=R(t),l=String(this),c=Rr(a,RegExp),s=a.unicode,u=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Ir?"y":"g"),f=new c(Ir?a:"^(?:"+a.source+")",u),h=void 0===i?4294967295:i>>>0;if(0===h)return[];if(0===l.length)return null===jr(f,l)?[l]:[];for(var y=0,m=0,d=[];m<l.length;){f.lastIndex=Ir?m:0;var p,g=jr(f,Ir?l:l.slice(m));if(null===g||(p=Cr(mt(f.lastIndex+(Ir?0:m)),l.length))===y)m=Ar(l,m,s);else{if(d.push(l.slice(y,m)),d.length===h)return d;for(var v=1;v<=g.length-1;v++)if(d.push(g[v]),d.length===h)return d;m=y=p}}return d.push(l.slice(y)),d}]}),!Ir);var Mr="\t\n\v\f\r                 \u2028\u2029\ufeff",_r="["+Mr+"]",Dr=RegExp("^"+_r+_r+"*"),Fr=RegExp(_r+_r+"*$"),Ur=function(t){return function(e){var n=String(b(e));return 1&t&&(n=n.replace(Dr,"")),2&t&&(n=n.replace(Fr,"")),n}},zr={start:Ur(1),end:Ur(2),trim:Ur(3)},Gr=zr.trim;Mt({target:"String",proto:!0,forced:function(t){return s((function(){return!!Mr[t]()||"​…᠎"!="​…᠎"[t]()||Mr[t].name!==t}))}("trim")},{trim:function(){return Gr(this)}});var Hr=/"/g;Mt({target:"String",proto:!0,forced:function(t){return s((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}("anchor")},{anchor:function(t){return e="a",n="name",r=t,i=String(b(this)),o="<"+e,""!==n&&(o+=" "+n+'="'+String(r).replace(Hr,"&quot;")+'"'),o+">"+i+"</"+e+">";var e,n,r,i,o}});var Br=vt.includes,Wr=le("indexOf",{ACCESSORS:!0,1:0});function Vr(t){var e=t.fontFamily,n=t.fontStyle,r=t.fontWeight,i=t.fontSize;e=e||Jr.family,n=n||Jr.style,i=i||Jr.size,["normal","bold"].includes(r)||(r=parseInt(r)>=700?"bold":Jr.weight);var o,a,l,c,s=(e=e.split(",")[0]).match(/([\w\d\s]+)/);return s&&(e=s[0]),a=(o={family:e,style:n,weight:r}).family,l=o.style,c=o.weight,Boolean(Kr.find((function(t){return t.family===a&&t.style===l&&t.weight===c})))||(e=Jr.family,n=Jr.style,r=Jr.weight),{fontFamily:e,fontStyle:n,fontWeight:r,fontSize:i}}Mt({target:"Array",proto:!0,forced:!Wr},{includes:function(t){return Br(this,t,arguments.length>1?arguments[1]:void 0)}}),Ee("includes");var Jr={family:"Arial",style:"normal",weight:"normal",size:"16px"},Kr=[{family:"Abril Fatface",style:"normal",weight:"normal"},{family:"Alegreya",style:"normal",weight:"bold"},{family:"Alegreya",style:"italic",weight:"bold"},{family:"Alegreya",style:"italic",weight:"normal"},{family:"Alegreya",style:"normal",weight:"normal"},{family:"Alegreya Sans",style:"italic",weight:"normal"},{family:"Alegreya SC",style:"normal",weight:"bold"},{family:"Alegreya SC",style:"italic",weight:"normal"},{family:"Alegreya SC",style:"normal",weight:"normal"},{family:"Amarante",style:"normal",weight:"normal"},{family:"Amatic SC",style:"normal",weight:"bold"},{family:"Arial",style:"normal",weight:"bold"},{family:"Arial",style:"italic",weight:"bold"},{family:"Arial",style:"italic",weight:"normal"},{family:"Arial",style:"normal",weight:"normal"},{family:"Arial Unicode MS",style:"normal",weight:"bold"},{family:"Arial Unicode MS",style:"normal",weight:"normal"},{family:"Atomic Age",style:"normal",weight:"normal"},{family:"Audiowide",style:"normal",weight:"normal"},{family:"Avenir Next LT Pro",style:"normal",weight:"bold"},{family:"Avenir Next LT Pro",style:"italic",weight:"bold"},{family:"Avenir Next LT Pro Demi",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro Light",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro",style:"normal",weight:"normal"},{family:"Avenir Next LT Pro Light",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro Light",style:"normal",weight:"normal"},{family:"Avenir Next LT Pro Medium",style:"normal",weight:"bold"},{family:"Avenir Next LT Pro Medium",style:"italic",weight:"bold"},{family:"Avenir Next LT Pro Regular",style:"normal",weight:"bold"},{family:"Avenir Next LT Pro Regular",style:"italic",weight:"bold"},{family:"Avenir Next LT Pro Regular",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro Regular",style:"normal",weight:"normal"},{family:"Belleza",style:"normal",weight:"normal"},{family:"Black Ops One",style:"normal",weight:"normal"},{family:"Cabin Sketch",style:"normal",weight:"bold"},{family:"Cabin Sketch",style:"normal",weight:"normal"},{family:"Coming Soon",style:"normal",weight:"normal"},{family:"CalciteWebCoreIcons",style:"normal",weight:"normal"},{family:"Homemade Apple",style:"normal",weight:"normal"},{family:"IM FELL DW Pica PRO",style:"italic",weight:"normal"},{family:"IM FELL DW Pica PRO",style:"normal",weight:"normal"},{family:"Josefin Sans",style:"normal",weight:"normal"},{family:"Josefin Sans Semibold",style:"italic",weight:"normal"},{family:"Josefin Slab",style:"normal",weight:"bold"},{family:"Josefin Slab",style:"italic",weight:"bold"},{family:"Josefin Slab",style:"italic",weight:"normal"},{family:"Josefin Slab Light",style:"italic",weight:"normal"},{family:"Josefin Slab",style:"normal",weight:"normal"},{family:"Josefin Slab Semibold",style:"italic",weight:"normal"},{family:"Josefin Slab Thin",style:"italic",weight:"normal"},{family:"Just Another Hand",style:"normal",weight:"normal"},{family:"Kranky",style:"normal",weight:"normal"},{family:"Life Savers",style:"normal",weight:"bold"},{family:"Loved By The King",style:"normal",weight:"normal"},{family:"Merriweather",style:"normal",weight:"bold"},{family:"Merriweather",style:"italic",weight:"bold"},{family:"Merriweather",style:"italic",weight:"normal"},{family:"Merriweather",style:"normal",weight:"normal"},{family:"Montserrat",style:"normal",weight:"bold"},{family:"Montserrat",style:"italic",weight:"normal"},{family:"Montserrat Medium",style:"italic",weight:"normal"},{family:"Montserrat",style:"normal",weight:"normal"},{family:"Montserrat Semibold",style:"italic",weight:"normal"},{family:"Noto Sans",style:"normal",weight:"bold"},{family:"Noto Sans",style:"italic",weight:"bold"},{family:"Noto Sans",style:"italic",weight:"normal"},{family:"Noto Sans",style:"normal",weight:"normal"},{family:"Noto Serif",style:"normal",weight:"bold"},{family:"Noto Serif",style:"italic",weight:"bold"},{family:"Noto Serif",style:"italic",weight:"normal"},{family:"Noto Serif",style:"normal",weight:"normal"},{family:"Old Standard TT",style:"normal",weight:"bold"},{family:"Old Standard TT",style:"italic",weight:"normal"},{family:"Old Standard TT",style:"normal",weight:"normal"},{family:"Orbitron",style:"normal",weight:"bold"},{family:"Orbitron",style:"normal",weight:"normal"},{family:"Oregano",style:"italic",weight:"normal"},{family:"Oregano",style:"normal",weight:"normal"},{family:"Oswald",style:"normal",weight:"bold"},{family:"Oswald",style:"normal",weight:"normal"},{family:"Pacifico",style:"normal",weight:"normal"},{family:"Palatino Linotype",style:"normal",weight:"normal"},{family:"Playfair Display Black",style:"normal",weight:"normal"},{family:"Playfair Display",style:"normal",weight:"bold"},{family:"Playfair Display",style:"italic",weight:"bold"},{family:"Playfair Display",style:"italic",weight:"normal"},{family:"Playfair Display",style:"normal",weight:"normal"},{family:"Playfair Display SC",style:"normal",weight:"bold"},{family:"Playfair Display SC",style:"normal",weight:"normal"},{family:"Redressed",style:"normal",weight:"normal"},{family:"Risque",style:"normal",weight:"normal"},{family:"Roboto Condensed",style:"italic",weight:"normal"},{family:"Roboto Condensed Light",style:"italic",weight:"normal"},{family:"Rye",style:"normal",weight:"normal"},{family:"Special Elite",style:"normal",weight:"normal"},{family:"Syncopate",style:"normal",weight:"bold"},{family:"Syncopate",style:"normal",weight:"normal"},{family:"Tangerine",style:"normal",weight:"normal"},{family:"Ubuntu",style:"normal",weight:"bold"},{family:"Ubuntu",style:"italic",weight:"bold"},{family:"Ubuntu Condensed",style:"normal",weight:"normal"},{family:"Ubuntu",style:"italic",weight:"normal"},{family:"Ubuntu Light",style:"normal",weight:"bold"},{family:"Ubuntu Light",style:"italic",weight:"bold"},{family:"Ubuntu Light",style:"italic",weight:"normal"},{family:"Ubuntu Light",style:"normal",weight:"normal"},{family:"Ubuntu Medium",style:"italic",weight:"normal"},{family:"Ubuntu Mono",style:"normal",weight:"bold"},{family:"Ubuntu Mono",style:"italic",weight:"bold"},{family:"Ubuntu Mono",style:"italic",weight:"normal"},{family:"Ubuntu Mono",style:"normal",weight:"normal"},{family:"Ubuntu",style:"normal",weight:"normal"},{family:"UnifrakturCook",style:"normal",weight:"bold"},{family:"Vast Shadow",style:"normal",weight:"normal"},{family:"Walter Turncoat",style:"normal",weight:"normal"}],qr=function(){function t(e){var n=e.id,r=e.editable,i=void 0!==r&&r,o=e.graphic,a=e.text,l=void 0===a?"":a,c=e.textPlaceholder,s=void 0===c?"":c,u=e.textClass,f=e.placementHint,h=e.onNoteEvent;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object.assign(this,{id:n,editable:i,graphic:o,text:l,textPlaceholder:s,textClass:u,placementHint:f}),this.onNoteEvent="function"==typeof h?h:function(){},this.anchor=null,this.mapPoint=null}var e,n,r;return e=t,(n=[{key:"destroy",value:function(){this.textElement&&this.textElement.parentElement.removeChild(this.textElement)}},{key:"focus",value:function(){this.textElement&&this.textElement.focus()}},{key:"focused",value:function(){return this.textElement===document.activeElement}},{key:"hovered",value:function(){return this.textElement&&this.textElement.classList.contains("note-hover")}},{key:"selected",value:function(){return this.textElement&&this.textElement.classList.contains("note-select")}},{key:"hidden",value:function(){return this.textElement&&0===parseFloat(this.textElement.style.opacity)}},{key:"setVisibility",value:function(t){this.textElement&&(this.textElement.style.opacity=t?1:0,this.textElement.style.pointerEvents=t?"auto":"none")}},{key:"setHover",value:function(t){if(this.textElement){var e=this.hovered();t?this.textElement.classList.add("note-hover"):this.textElement.classList.remove("note-hover"),t!==e&&this.onNoteEvent("hover",this,{type:"hover"})}}},{key:"setSelect",value:function(t){var e=this.selected();this.textElement&&(t?this.textElement.classList.add("note-select"):this.textElement.classList.remove("note-select"),t!==e&&this.onNoteEvent("select",this,{type:"select"}))}},{key:"createTextElement",value:function(t){var e=this;this.textElement=document.createElement("div"),this.textElement.contentEditable=this.editable,this.textElement.innerText=this.text,this.textElement.setAttribute("data-placeholder",this.textPlaceholder),this.textElement.tabIndex=1,this.textClass&&this.textElement.classList.add(this.textClass),this.textElement.style="\n position: absolute; /* position notes relative to map container */\n -webkit-user-select: auto; /* mobile safari needs this for contenteditable to work properly */\n",this.textElement.addEventListener("input",(function(n){"insertText"!==n.inputType&&"insertParagraph"!==n.inputType||null!=n.data||(e.textElement.innerText=e.text,e.textElement.blur()),e.text=e.textElement.innerText,e.updatePosition(t),e.onNoteEvent("update-text",e,n)})),["keydown","keyup","pointerdown","pointerup","click"].forEach((function(t){e.textElement.addEventListener(t,(function(t){return t.stopPropagation()}))})),this.textElement.addEventListener("pointermove",(function(t){(e.selected()||e.hovered())&&t.stopPropagation()})),this.textElement.addEventListener("focus",(function(t){e.hidden()?(t.stopPropagation(),e.textElement.blur()):e.onNoteEvent("focus",e,t)})),this.textElement.addEventListener("blur",(function(n){e.empty=!e.textElement.innerText||0===e.textElement.innerText.length,e.setHover(!1),e.updatePosition(t),e.onNoteEvent("blur",e,n)})),t.surface.appendChild(this.textElement),this.updatePosition(t)}},{key:"updatePosition",value:function(t){this.updateMapPoint(t),this.updateTextElement(t)}},{key:"updateTextElement",value:function(t){if(t.ready){var e=t.toScreen(this.mapPoint);e.x-=this.textElement.offsetWidth/2,e.y-=this.textElement.offsetHeight/2,e.x=Math.round(e.x),e.y=Math.round(e.y),this.textElement.style.left="".concat(e.x,"px"),this.textElement.style.top="".concat(e.y,"px")}}},{key:"updateMapPoint",value:function(e){var n;null==this.initialZoom&&(this.initialZoom=e.zoom),"point"===this.graphic.geometry.type?n=this.placePointNote(e):"polyline"===this.graphic.geometry.type?n=this.placeLineNote(e):"polygon"===this.graphic.geometry.type&&(n=this.placePolygonNote(e)),this.mapPoint=new t.Point({spatialReference:this.graphic.geometry.spatialReference,x:n.x,y:n.y})}},{key:"placePointNote",value:function(t){this.anchor||(this.anchor=this.graphic.geometry.clone(),this.buffer=3);var e=(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t/.75}("picture-marker"===this.graphic.symbol.type?this.graphic.symbol.height:this.graphic.symbol.size+this.graphic.symbol.outline.width)+this.textElement.offsetHeight)/2-this.graphic.symbol.yoffset+this.buffer,n=t.toScreen(this.anchor);return t.toMap({x:n.x,y:n.y+e})}},{key:"placeLineNote",value:function(e){if(!this.anchor){var n=this.graphic.geometry,r=this.placementHint;if(r)this.anchor=t.geometryEngine.nearestCoordinate(n,r).coordinate,this.vector=$r([this.anchor.x-r.x,this.anchor.y-r.y]);else{var i=n.paths[0].reduce((function(t,e){return[t[0]+e[0],t[1]+e[1]]}),[0,0]).map((function(t){return t/n.paths[0].length})),o=t.Point({type:"point",spatialReference:n.spatialReference,x:i[0],y:i[1]});this.anchor=t.geometryEngine.nearestCoordinate(n,o).coordinate;var a=n.paths[0][0],l=n.paths[0][n.paths[0].length-1];this.vector=$r([-(l[1]-a[1]),l[0]-a[0]])}}return this.computeAnchoredPosition(e)}},{key:"placePolygonNote",value:function(e){if(!this.anchor){var n=this.graphic.geometry,r=this.placementHint;if(!r){var i=n.extent;r=i.width>i.height?{type:"point",x:(i.xmin+i.xmax)/2,y:i.ymin,spatialReference:n.spatialReference}:{type:"point",x:i.xmax,y:(i.ymin+i.ymax)/2,spatialReference:n.spatialReference}}var o={type:"polyline",paths:[n.rings[0]],spatialReference:n.spatialReference};this.anchor=t.geometryEngine.nearestCoordinate(o,r).coordinate,this.vector=$r([n.centroid.x-this.anchor.x,n.centroid.y-this.anchor.y])}return this.computeAnchoredPosition(e)}},{key:"computeAnchoredPosition",value:function(t){var e=this.textElement.offsetWidth,n=this.textElement.offsetHeight,r=15;r*=1-Math.min(Math.max(this.initialZoom-t.zoom,0),3)/3*.5;var i={x:this.anchor.x-this.vector[0]*r*t.resolution,y:this.anchor.y-this.vector[1]*r*t.resolution},o=[[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1],[0,-1],[1,-1]],a=Math.atan2(this.vector[1],this.vector[0]),l=Math.round(8*a/(2*Math.PI)+8)%8;return i.x-=o[l][0]*e/2*t.resolution,i.y-=o[l][1]*n/2*t.resolution,i}},{key:"toGraphic",value:function(t){if(this.textElement){var e=window.getComputedStyle(this.textElement),n=Yr(e,"color",!1)||[0,0,0,255],r=Yr(e,"backgroundColor",!1)||[255,255,255,255],i=n.some((function(t,e){return r[e]!==t})),o=Vr(e),a={x:t.toScreen(this.mapPoint).x-t.toScreen(this.anchor).x,y:t.toScreen(this.mapPoint).y-t.toScreen(this.anchor).y};return{geometry:this.anchor,symbol:{type:"esriTS",text:this.textElement.innerText,color:n,font:{size:o.fontSize,style:o.fontStyle,weight:o.fontWeight,family:o.fontFamily},haloSize:i?2:0,haloColor:i?r:null,horizontalAlignment:"center",verticalAlignment:"middle",xoffset:a.x,yoffset:-a.y},attributes:{OBJECTID:this.id,text:this.text}}}}}])&&Qn(e.prototype,n),r&&Qn(e,r),t}();function $r(t){var e=function(t){return Math.sqrt(t.map((function(t){return t*t})).reduce((function(t,e){return t+e})))}(t);return e>0?t.map((function(t){return t/e})):t}function Yr(t,e,n){var r=t[e];if(r){var i=r.match(/\((.*)\)/);if(i&&i.length>1){var o=i[1].split(",").map((function(t){return parseFloat(t.trim())}));return o[3]=n&&null!=o[3]?255*o[3]:255,o}}}Zn(qr,"Point",n),Zn(qr,"geometryEngine",e);var Qr,Zr,Xr,ti=c.Promise,ei=/(iphone|ipod|ipad).*applewebkit/i.test(Qt),ni=c.location,ri=c.setImmediate,ii=c.clearImmediate,oi=c.process,ai=c.MessageChannel,li=c.Dispatch,ci=0,si={},ui=function(t){if(si.hasOwnProperty(t)){var e=si[t];delete si[t],e()}},fi=function(t){return function(){ui(t)}},hi=function(t){ui(t.data)},yi=function(t){c.postMessage(t+"",ni.protocol+"//"+ni.host)};ri&&ii||(ri=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return si[++ci]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Qr(ci),ci},ii=function(t){delete si[t]},"process"==p(oi)?Qr=function(t){oi.nextTick(fi(t))}:li&&li.now?Qr=function(t){li.now(fi(t))}:ai&&!ei?(Xr=(Zr=new ai).port2,Zr.port1.onmessage=hi,Qr=Dt(Xr.postMessage,Xr,1)):!c.addEventListener||"function"!=typeof postMessage||c.importScripts||s(yi)||"file:"===ni.protocol?Qr="onreadystatechange"in A("script")?function(t){me.appendChild(A("script")).onreadystatechange=function(){me.removeChild(this),ui(t)}}:function(t){setTimeout(fi(t),0)}:(Qr=yi,c.addEventListener("message",hi,!1)));var mi,di,pi,gi,vi,bi,xi,wi,Ei={set:ri,clear:ii},Si=L.f,Pi=Ei.set,Oi=c.MutationObserver||c.WebKitMutationObserver,Ti=c.process,Ai=c.Promise,ji="process"==p(Ti),Ni=Si(c,"queueMicrotask"),Li=Ni&&Ni.value;Li||(mi=function(){var t,e;for(ji&&(t=Ti.domain)&&t.exit();di;){e=di.fn,di=di.next;try{e()}catch(t){throw di?gi():pi=void 0,t}}pi=void 0,t&&t.enter()},ji?gi=function(){Ti.nextTick(mi)}:Oi&&!ei?(vi=!0,bi=document.createTextNode(""),new Oi(mi).observe(bi,{characterData:!0}),gi=function(){bi.data=vi=!vi}):Ai&&Ai.resolve?(xi=Ai.resolve(void 0),wi=xi.then,gi=function(){wi.call(xi,mi)}):gi=function(){Pi.call(c,mi)});var Ri,ki,Ci,Ii,Mi=Li||function(t){var e={fn:t,next:void 0};pi&&(pi.next=e),di||(di=e,gi()),pi=e},_i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=_t(e),this.reject=_t(n)},Di={f:function(t){return new _i(t)}},Fi=function(t,e){if(R(t),w(e)&&e.constructor===t)return e;var n=Di.f(t);return(0,n.resolve)(e),n.promise},Ui=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},zi=Ei.set,Gi=Vt("species"),Hi="Promise",Bi=ot.get,Wi=ot.set,Vi=ot.getterFor(Hi),Ji=ti,Ki=c.TypeError,qi=c.document,$i=c.process,Yi=st("fetch"),Qi=Di.f,Zi=Qi,Xi="process"==p($i),to=!!(qi&&qi.createEvent&&c.dispatchEvent),eo=Ct(Hi,(function(){if(!(G(Ji)!==String(Ji))){if(66===ee)return!0;if(!Xi&&"function"!=typeof PromiseRejectionEvent)return!0}if(ee>=51&&/native code/.test(Ji))return!1;var t=Ji.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[Gi]=e,!(t.then((function(){}))instanceof e)})),no=eo||!An((function(t){Ji.all(t).catch((function(){}))})),ro=function(t){var e;return!(!w(t)||"function"!=typeof(e=t.then))&&e},io=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;Mi((function(){for(var i=e.value,o=1==e.state,a=0;r.length>a;){var l,c,s,u=r[a++],f=o?u.ok:u.fail,h=u.resolve,y=u.reject,m=u.domain;try{f?(o||(2===e.rejection&&co(t,e),e.rejection=1),!0===f?l=i:(m&&m.enter(),l=f(i),m&&(m.exit(),s=!0)),l===u.promise?y(Ki("Promise-chain cycle")):(c=ro(l))?c.call(l,h,y):h(l)):y(i)}catch(t){m&&!s&&m.exit(),y(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&ao(t,e)}))}},oo=function(t,e,n){var r,i;to?((r=qi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},(i=c["on"+t])?i(r):"unhandledrejection"===t&&function(t,e){var n=c.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},ao=function(t,e){zi.call(c,(function(){var n,r=e.value;if(lo(e)&&(n=Ui((function(){Xi?$i.emit("unhandledRejection",r,t):oo("unhandledrejection",t,r)})),e.rejection=Xi||lo(e)?2:1,n.error))throw n.value}))},lo=function(t){return 1!==t.rejection&&!t.parent},co=function(t,e){zi.call(c,(function(){Xi?$i.emit("rejectionHandled",t):oo("rejectionhandled",t,e.value)}))},so=function(t,e,n,r){return function(i){t(e,n,i,r)}},uo=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,io(t,e,!0))},fo=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw Ki("Promise can't be resolved itself");var i=ro(n);i?Mi((function(){var r={done:!1};try{i.call(n,so(fo,t,r,e),so(uo,t,r,e))}catch(n){uo(t,r,n,e)}})):(e.value=n,e.state=1,io(t,e,!1))}catch(n){uo(t,{done:!1},n,e)}}};eo&&(Ji=function(t){En(this,Ji,Hi),_t(t),Ri.call(this);var e=Bi(this);try{t(so(fo,this,e),so(uo,this,e))}catch(t){uo(this,e,t)}},(Ri=function(t){Wi(this,{type:Hi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=jn(Ji.prototype,{then:function(t,e){var n=Vi(this),r=Qi(Rr(this,Ji));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=Xi?$i.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&io(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),ki=function(){var t=new Ri,e=Bi(t);this.promise=t,this.resolve=so(fo,t,e),this.reject=so(uo,t,e)},Di.f=Qi=function(t){return t===Ji||t===Ci?new ki(t):Zi(t)},"function"==typeof ti&&(Ii=ti.prototype.then,at(ti.prototype,"then",(function(t,e){var n=this;return new Ji((function(t,e){Ii.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof Yi&&Mt({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Fi(Ji,Yi.apply(c,arguments))}}))),Mt({global:!0,wrap:!0,forced:eo},{Promise:Ji}),We(Ji,Hi,!1),Ln(Hi),Ci=st(Hi),Mt({target:Hi,stat:!0,forced:eo},{reject:function(t){var e=Qi(this);return e.reject.call(void 0,t),e.promise}}),Mt({target:Hi,stat:!0,forced:eo},{resolve:function(t){return Fi(this,t)}}),Mt({target:Hi,stat:!0,forced:no},{all:function(t){var e=this,n=Qi(e),r=n.resolve,i=n.reject,o=Ui((function(){var n=_t(e.resolve),o=[],a=0,l=1;wn(t,(function(t){var c=a++,s=!1;o.push(void 0),l++,n.call(e,t).then((function(t){s||(s=!0,o[c]=t,--l||r(o))}),i)})),--l||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=Qi(e),r=n.reject,i=Ui((function(){var i=_t(e.resolve);wn(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var ho=r.createSubclass({declaredClass:"HubTextNotesLayerView2D",constructor:function(){this._handles=[],this._dirty=!1},attach:function(){var t=this;this.layer.hubNotes.forEach((function(e){return t.addNoteTextElement(e)})),this._handles.push(this.layer.on("note-add",(function(e){return t.addNoteTextElement(e.note)}))),this._handles.push(this.layer.on("note-select",(function(){return t.setDirty(!0)}))),this._handles.push(this.view.watch("extent",(function(){return t.setDirty(!0)})))},detach:function(){this._handles.forEach((function(t){return t.remove()}))},setDirty:function(t){this._dirty=t,this._dirty&&this.requestRender()},addNoteTextElement:function(t){t.createTextElement(this.view),this.setDirty(!0)},render:function(){var t=this;this.layer.hubNotes.filter((function(t){return t.empty})).forEach((function(e){return t.layer.removeNoteForGraphic(e.graphic)})),this._dirty&&(this.setDirty(!1),this.layer.updateNotePositions(this.view),this.layer.collideNotes())},hitTest:function(t,e){var n=this.layer.hubNotes.filter((function(t){return!t.hidden()})).filter((function(n){return n.textElement&&function(t,e){var n=e.x,r=e.y,i=t.parentNode?t.parentNode.getBoundingClientRect():{left:0,top:0},o=t.getBoundingClientRect(),a={left:o.left-i.left,right:o.right-i.left,top:o.top-i.top,bottom:o.bottom-i.top};return n>=a.left&&n<=a.right&&r>=a.top&&r<=a.bottom}(n.textElement,{x:t,y:e})})),r=n[0]&&new i({geometry:n[0].mapPoint,attributes:{id:n[0].id,text:n[0].text},layer:this.layer,sourceLayer:this.layer});return Promise.resolve(r)}});function yo(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return!(n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}return t.createSubclass({declaredClass:"HubTextNotesLayer",noteId:0,constructor:function(t){var e=t.editable,n=t.textPlaceholder,r=t.textClass;Object.assign(this,{editable:e,textPlaceholder:n,textClass:r}),this.hubNotes=[]},createLayerView:function(t){if("2d"===t.type)return new ho({view:t,layer:this})},onNoteEvent:function(t,e,n){this.emit("note-".concat(t),function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xn(Object(n),!0).forEach((function(e){Zn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({note:e},n))},addNoteForGraphic:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.text,r=e.placementHint,i=new qr({id:this.noteId++,editable:this.editable,graphic:t,text:n,textPlaceholder:this.textPlaceholder,textClass:this.textClass,placementHint:r,onNoteEvent:this.onNoteEvent.bind(this)});return this.hubNotes.push(i),this.emit("note-add",{note:i}),i},removeNoteForGraphic:function(t){var e=this.findNoteForGraphic(t);if(e){this.hubNotes=this.hubNotes.filter((function(t){return t!==e}));var n=e.id;e.destroy(),this.emit("note-remove",{noteId:n,graphic:t})}},findNoteForId:function(t){return this.hubNotes.find((function(e){return e.id===t}))},findNoteForGraphic:function(t){return this.hubNotes.find((function(e){return e.graphic===t}))},setHoveredNoteForGraphic:function(t){var e=this.findNoteForGraphic(t);this.hubNotes.filter((function(t){return t.textElement})).forEach((function(t){t.setHover(t===e)}))},setSelectedNoteForGraphic:function(t){var e=this.findNoteForGraphic(t);this.hubNotes.filter((function(t){return t.textElement})).forEach((function(t){t.setSelect(t===e)}))},updateNotePositions:function(t){this.hubNotes.forEach((function(e){return e.updatePosition(t)}))},collideNotes:function(){for(var t=this.hubNotes.filter((function(t){return t.textElement})),e=new Set,n=0;n<t.length;n++){var r=t[n];if(!e.has(r))for(var i=n+1;i<t.length;i++){var o=t[i];yo(r.textElement,o.textElement)&&(r.focused()?e.add(o):o.focused()?e.add(r):r.selected()?e.add(o):o.selected()?e.add(r):e.add(n>=i?o:r))}}this.hubNotes.forEach((function(t){return t.setVisibility(!e.has(t))}))},toGraphics:function(t){return this.hubNotes.map((function(e){return e.toGraphic(t)})).filter((function(t){return t}))}})}));
define(["esri/layers/Layer","esri/geometry/geometryEngine","esri/geometry/Point","esri/views/2d/layers/BaseLayerView2D","esri/Graphic"],(function(t,e,n,r,i){"use strict";var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t,e){return t(e={exports:{}},e.exports),e.exports}var l=function(t){return t&&t.Math==Math&&t},c=l("object"==typeof globalThis&&globalThis)||l("object"==typeof window&&window)||l("object"==typeof self&&self)||l("object"==typeof o&&o)||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},u=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,y={f:h&&!f.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:f},m=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d={}.toString,p=function(t){return d.call(t).slice(8,-1)},g="".split,v=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?g.call(t,""):Object(t)}:Object,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},x=function(t){return v(b(t))},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},E=function(t,e){if(!w(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!w(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!w(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},S={}.hasOwnProperty,P=function(t,e){return S.call(t,e)},O=c.document,T=w(O)&&w(O.createElement),A=function(t){return T?O.createElement(t):{}},j=!u&&!s((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),N=Object.getOwnPropertyDescriptor,L={f:u?N:function(t,e){if(t=x(t),e=E(e,!0),j)try{return N(t,e)}catch(t){}if(P(t,e))return m(!y.f.call(t,e),t[e])}},R=function(t){if(!w(t))throw TypeError(String(t)+" is not an object");return t},k=Object.defineProperty,C={f:u?k:function(t,e,n){if(R(t),e=E(e,!0),R(n),j)try{return k(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},I=u?function(t,e,n){return C.f(t,e,m(1,n))}:function(t,e,n){return t[e]=n,t},M=function(t,e){try{I(c,t,e)}catch(n){c[t]=e}return e},_=c["__core-js_shared__"]||M("__core-js_shared__",{}),D=Function.toString;"function"!=typeof _.inspectSource&&(_.inspectSource=function(t){return D.call(t)});var F,U,z,G=_.inspectSource,H=c.WeakMap,B="function"==typeof H&&/native code/.test(G(H)),W=a((function(t){(t.exports=function(t,e){return _[t]||(_[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),V=0,J=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++V+J).toString(36)},q=W("keys"),$=function(t){return q[t]||(q[t]=K(t))},Y={},Q=c.WeakMap;if(B){var Z=new Q,X=Z.get,tt=Z.has,et=Z.set;F=function(t,e){return et.call(Z,t,e),e},U=function(t){return X.call(Z,t)||{}},z=function(t){return tt.call(Z,t)}}else{var nt=$("state");Y[nt]=!0,F=function(t,e){return I(t,nt,e),e},U=function(t){return P(t,nt)?t[nt]:{}},z=function(t){return P(t,nt)}}var rt,it,ot={set:F,get:U,has:z,enforce:function(t){return z(t)?U(t):F(t,{})},getterFor:function(t){return function(e){var n;if(!w(e)||(n=U(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},at=a((function(t){var e=ot.get,n=ot.enforce,r=String(String).split("String");(t.exports=function(t,e,i,o){var a=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,s=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof e||P(i,"name")||I(i,"name",e),n(i).source=r.join("string"==typeof e?e:"")),t!==c?(a?!s&&t[e]&&(l=!0):delete t[e],l?t[e]=i:I(t,e,i)):l?t[e]=i:M(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||G(this)}))})),lt=c,ct=function(t){return"function"==typeof t?t:void 0},st=function(t,e){return arguments.length<2?ct(lt[t])||ct(c[t]):lt[t]&&lt[t][e]||c[t]&&c[t][e]},ut=Math.ceil,ft=Math.floor,ht=function(t){return isNaN(t=+t)?0:(t>0?ft:ut)(t)},yt=Math.min,mt=function(t){return t>0?yt(ht(t),9007199254740991):0},dt=Math.max,pt=Math.min,gt=function(t){return function(e,n,r){var i,o=x(e),a=mt(o.length),l=function(t,e){var n=ht(t);return n<0?dt(n+e,0):pt(n,e)}(r,a);if(t&&n!=n){for(;a>l;)if((i=o[l++])!=i)return!0}else for(;a>l;l++)if((t||l in o)&&o[l]===n)return t||l||0;return!t&&-1}},vt={includes:gt(!0),indexOf:gt(!1)},bt=vt.indexOf,xt=function(t,e){var n,r=x(t),i=0,o=[];for(n in r)!P(Y,n)&&P(r,n)&&o.push(n);for(;e.length>i;)P(r,n=e[i++])&&(~bt(o,n)||o.push(n));return o},wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Et=wt.concat("length","prototype"),St={f:Object.getOwnPropertyNames||function(t){return xt(t,Et)}},Pt={f:Object.getOwnPropertySymbols},Ot=st("Reflect","ownKeys")||function(t){var e=St.f(R(t)),n=Pt.f;return n?e.concat(n(t)):e},Tt=function(t,e){for(var n=Ot(e),r=C.f,i=L.f,o=0;o<n.length;o++){var a=n[o];P(t,a)||r(t,a,i(e,a))}},At=/#|\.prototype\./,jt=function(t,e){var n=Lt[Nt(t)];return n==kt||n!=Rt&&("function"==typeof e?s(e):!!e)},Nt=jt.normalize=function(t){return String(t).replace(At,".").toLowerCase()},Lt=jt.data={},Rt=jt.NATIVE="N",kt=jt.POLYFILL="P",Ct=jt,It=L.f,Mt=function(t,e){var n,r,i,o,a,l=t.target,s=t.global,u=t.stat;if(n=s?c:u?c[l]||M(l,{}):(c[l]||{}).prototype)for(r in e){if(o=e[r],i=t.noTargetGet?(a=It(n,r))&&a.value:n[r],!Ct(s?r:l+(u?".":"#")+r,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;Tt(o,i)}(t.sham||i&&i.sham)&&I(o,"sham",!0),at(n,r,o,t)}},_t=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Dt=function(t,e,n){if(_t(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},Ft=function(t){return Object(b(t))},Ut=Array.isArray||function(t){return"Array"==p(t)},zt=!!Object.getOwnPropertySymbols&&!s((function(){return!String(Symbol())})),Gt=zt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ht=W("wks"),Bt=c.Symbol,Wt=Gt?Bt:Bt&&Bt.withoutSetter||K,Vt=function(t){return P(Ht,t)||(zt&&P(Bt,t)?Ht[t]=Bt[t]:Ht[t]=Wt("Symbol."+t)),Ht[t]},Jt=Vt("species"),Kt=function(t,e){var n;return Ut(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Ut(n.prototype)?w(n)&&null===(n=n[Jt])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},qt=[].push,$t=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,a=5==t||o;return function(l,c,s,u){for(var f,h,y=Ft(l),m=v(y),d=Dt(c,s,3),p=mt(m.length),g=0,b=u||Kt,x=e?b(l,p):n?b(l,0):void 0;p>g;g++)if((a||g in m)&&(h=d(f=m[g],g,y),t))if(e)x[g]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return g;case 2:qt.call(x,f)}else if(i)return!1;return o?-1:r||i?i:x}},Yt={forEach:$t(0),map:$t(1),filter:$t(2),some:$t(3),every:$t(4),find:$t(5),findIndex:$t(6)},Qt=st("navigator","userAgent")||"",Zt=c.process,Xt=Zt&&Zt.versions,te=Xt&&Xt.v8;te?it=(rt=te.split("."))[0]+rt[1]:Qt&&(!(rt=Qt.match(/Edge\/(\d+)/))||rt[1]>=74)&&(rt=Qt.match(/Chrome\/(\d+)/))&&(it=rt[1]);var ee=it&&+it,ne=Vt("species"),re=function(t){return ee>=51||!s((function(){var e=[];return(e.constructor={})[ne]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ie=Object.defineProperty,oe={},ae=function(t){throw t},le=function(t,e){if(P(oe,t))return oe[t];e||(e={});var n=[][t],r=!!P(e,"ACCESSORS")&&e.ACCESSORS,i=P(e,0)?e[0]:ae,o=P(e,1)?e[1]:void 0;return oe[t]=!!n&&!s((function(){if(r&&!u)return!0;var t={length:-1};r?ie(t,1,{enumerable:!0,get:ae}):t[1]=1,n.call(t,i,o)}))},ce=Yt.filter,se=re("filter"),ue=le("filter");Mt({target:"Array",proto:!0,forced:!se||!ue},{filter:function(t){return ce(this,t,arguments.length>1?arguments[1]:void 0)}});var fe,he=Object.keys||function(t){return xt(t,wt)},ye=u?Object.defineProperties:function(t,e){R(t);for(var n,r=he(e),i=r.length,o=0;i>o;)C.f(t,n=r[o++],e[n]);return t},me=st("document","documentElement"),de=$("IE_PROTO"),pe=function(){},ge=function(t){return"<script>"+t+"<\/script>"},ve=function(){try{fe=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;ve=fe?function(t){t.write(ge("")),t.close();var e=t.parentWindow.Object;return t=null,e}(fe):((e=A("iframe")).style.display="none",me.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(ge("document.F=Object")),t.close(),t.F);for(var n=wt.length;n--;)delete ve.prototype[wt[n]];return ve()};Y[de]=!0;var be=Object.create||function(t,e){var n;return null!==t?(pe.prototype=R(t),n=new pe,pe.prototype=null,n[de]=t):n=ve(),void 0===e?n:ye(n,e)},xe=Vt("unscopables"),we=Array.prototype;null==we[xe]&&C.f(we,xe,{configurable:!0,value:be(null)});var Ee=function(t){we[xe][t]=!0},Se=Yt.find,Pe=!0,Oe=le("find");"find"in[]&&Array(1).find((function(){Pe=!1})),Mt({target:"Array",proto:!0,forced:Pe||!Oe},{find:function(t){return Se(this,t,arguments.length>1?arguments[1]:void 0)}}),Ee("find");var Te=function(t,e){var n=[][t];return!!n&&s((function(){n.call(null,e||function(){throw 1},1)}))},Ae=Yt.forEach,je=Te("forEach"),Ne=le("forEach"),Le=je&&Ne?[].forEach:function(t){return Ae(this,t,arguments.length>1?arguments[1]:void 0)};Mt({target:"Array",proto:!0,forced:[].forEach!=Le},{forEach:Le});var Re,ke,Ce,Ie={},Me=!s((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),_e=$("IE_PROTO"),De=Object.prototype,Fe=Me?Object.getPrototypeOf:function(t){return t=Ft(t),P(t,_e)?t[_e]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?De:null},Ue=Vt("iterator"),ze=!1;[].keys&&("next"in(Ce=[].keys())?(ke=Fe(Fe(Ce)))!==Object.prototype&&(Re=ke):ze=!0),null==Re&&(Re={}),P(Re,Ue)||I(Re,Ue,(function(){return this}));var Ge={IteratorPrototype:Re,BUGGY_SAFARI_ITERATORS:ze},He=C.f,Be=Vt("toStringTag"),We=function(t,e,n){t&&!P(t=n?t:t.prototype,Be)&&He(t,Be,{configurable:!0,value:e})},Ve=Ge.IteratorPrototype,Je=function(){return this},Ke=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return R(n),function(t){if(!w(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),qe=Ge.IteratorPrototype,$e=Ge.BUGGY_SAFARI_ITERATORS,Ye=Vt("iterator"),Qe=function(){return this},Ze=function(t,e,n,r,i,o,a){!function(t,e,n){var r=e+" Iterator";t.prototype=be(Ve,{next:m(1,n)}),We(t,r,!1),Ie[r]=Je}(n,e,r);var l,c,s,u=function(t){if(t===i&&p)return p;if(!$e&&t in y)return y[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",h=!1,y=t.prototype,d=y[Ye]||y["@@iterator"]||i&&y[i],p=!$e&&d||u(i),g="Array"==e&&y.entries||d;if(g&&(l=Fe(g.call(new t)),qe!==Object.prototype&&l.next&&(Fe(l)!==qe&&(Ke?Ke(l,qe):"function"!=typeof l[Ye]&&I(l,Ye,Qe)),We(l,f,!0))),"values"==i&&d&&"values"!==d.name&&(h=!0,p=function(){return d.call(this)}),y[Ye]!==p&&I(y,Ye,p),Ie[e]=p,i)if(c={values:u("values"),keys:o?p:u("keys"),entries:u("entries")},a)for(s in c)($e||h||!(s in y))&&at(y,s,c[s]);else Mt({target:e,proto:!0,forced:$e||h},c);return c},Xe=ot.set,tn=ot.getterFor("Array Iterator"),en=Ze(Array,"Array",(function(t,e){Xe(this,{type:"Array Iterator",target:x(t),index:0,kind:e})}),(function(){var t=tn(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");Ie.Arguments=Ie.Array,Ee("keys"),Ee("values"),Ee("entries");var nn=Yt.map,rn=re("map"),on=le("map");Mt({target:"Array",proto:!0,forced:!rn||!on},{map:function(t){return nn(this,t,arguments.length>1?arguments[1]:void 0)}});var an=Object.assign,ln=Object.defineProperty,cn=!an||s((function(){if(u&&1!==an({b:1},an(ln({},"a",{enumerable:!0,get:function(){ln(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=an({},t)[n]||"abcdefghijklmnopqrst"!=he(an({},e)).join("")}))?function(t,e){for(var n=Ft(t),r=arguments.length,i=1,o=Pt.f,a=y.f;r>i;)for(var l,c=v(arguments[i++]),s=o?he(c).concat(o(c)):he(c),f=s.length,h=0;f>h;)l=s[h++],u&&!a.call(c,l)||(n[l]=c[l]);return n}:an;Mt({target:"Object",stat:!0,forced:Object.assign!==cn},{assign:cn});var sn={};sn[Vt("toStringTag")]="z";var un="[object z]"===String(sn),fn=Vt("toStringTag"),hn="Arguments"==p(function(){return arguments}()),yn=un?p:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),fn))?n:hn?p(e):"Object"==(r=p(e))&&"function"==typeof e.callee?"Arguments":r},mn=un?{}.toString:function(){return"[object "+yn(this)+"]"};un||at(Object.prototype,"toString",mn,{unsafe:!0});var dn=!s((function(){return Object.isExtensible(Object.preventExtensions({}))})),pn=a((function(t){var e=C.f,n=K("meta"),r=0,i=Object.isExtensible||function(){return!0},o=function(t){e(t,n,{value:{objectID:"O"+ ++r,weakData:{}}})},a=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!w(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!P(t,n)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[n].objectID},getWeakData:function(t,e){if(!P(t,n)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[n].weakData},onFreeze:function(t){return dn&&a.REQUIRED&&i(t)&&!P(t,n)&&o(t),t}};Y[n]=!0})),gn=(pn.REQUIRED,pn.fastKey,pn.getWeakData,pn.onFreeze,Vt("iterator")),vn=Array.prototype,bn=Vt("iterator"),xn=function(t,e,n,r){try{return r?e(R(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&R(i.call(t)),e}},wn=a((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,n,r,i,o){var a,l,c,s,u,f,h,y,m=Dt(n,r,i?2:1);if(o)a=t;else{if("function"!=typeof(l=function(t){if(null!=t)return t[bn]||t["@@iterator"]||Ie[yn(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(y=l)&&(Ie.Array===y||vn[gn]===y)){for(c=0,s=mt(t.length);s>c;c++)if((u=i?m(R(h=t[c])[0],h[1]):m(t[c]))&&u instanceof e)return u;return new e(!1)}a=l.call(t)}for(f=a.next;!(h=f.call(a)).done;)if("object"==typeof(u=xn(a,m,h.value,i))&&u&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}})),En=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t},Sn=Vt("iterator"),Pn=!1;try{var On=0,Tn={next:function(){return{done:!!On++}},return:function(){Pn=!0}};Tn[Sn]=function(){return this},Array.from(Tn,(function(){throw 2}))}catch(t){}var An=function(t,e){if(!e&&!Pn)return!1;var n=!1;try{var r={};r[Sn]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},jn=function(t,e,n){for(var r in e)at(t,r,e[r],n);return t},Nn=Vt("species"),Ln=function(t){var e=st(t),n=C.f;u&&e&&!e[Nn]&&n(e,Nn,{configurable:!0,get:function(){return this}})},Rn=C.f,kn=pn.fastKey,Cn=ot.set,In=ot.getterFor,Mn=(function(t,e,n){var r=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),o=r?"set":"add",a=c[t],l=a&&a.prototype,u=a,f={},h=function(t){var e=l[t];at(l,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!w(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return i&&!w(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!w(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(Ct(t,"function"!=typeof a||!(i||l.forEach&&!s((function(){(new a).entries().next()})))))u=n.getConstructor(e,t,r,o),pn.REQUIRED=!0;else if(Ct(t,!0)){var y=new u,m=y[o](i?{}:-0,1)!=y,d=s((function(){y.has(1)})),p=An((function(t){new a(t)})),g=!i&&s((function(){for(var t=new a,e=5;e--;)t[o](e,e);return!t.has(-0)}));p||((u=e((function(e,n){En(e,u,t);var i=function(t,e,n){var r,i;return Ke&&"function"==typeof(r=e.constructor)&&r!==n&&w(i=r.prototype)&&i!==n.prototype&&Ke(t,i),t}(new a,e,u);return null!=n&&wn(n,i[o],i,r),i}))).prototype=l,l.constructor=u),(d||g)&&(h("delete"),h("has"),r&&h("get")),(g||m)&&h(o),i&&l.clear&&delete l.clear}f[t]=u,Mt({global:!0,forced:u!=a},f),We(u,t),i||n.setStrong(u,t,r)}("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,e,n,r){var i=t((function(t,o){En(t,i,e),Cn(t,{type:e,index:be(null),first:void 0,last:void 0,size:0}),u||(t.size=0),null!=o&&wn(o,t[r],t,n)})),o=In(e),a=function(t,e,n){var r,i,a=o(t),c=l(t,e);return c?c.value=n:(a.last=c={index:i=kn(e,!0),key:e,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||(a.first=c),r&&(r.next=c),u?a.size++:t.size++,"F"!==i&&(a.index[i]=c)),t},l=function(t,e){var n,r=o(t),i=kn(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return jn(i.prototype,{clear:function(){for(var t=o(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,u?t.size=0:this.size=0},delete:function(t){var e=o(this),n=l(this,t);if(n){var r=n.next,i=n.previous;delete e.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),e.first==n&&(e.first=r),e.last==n&&(e.last=i),u?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=o(this),r=Dt(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!l(this,t)}}),jn(i.prototype,n?{get:function(t){var e=l(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),u&&Rn(i.prototype,"size",{get:function(){return o(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=In(e),o=In(r);Ze(t,e,(function(t,e){Cn(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),Ln(e)}}),function(t){return function(e,n){var r,i,o=String(b(e)),a=ht(n),l=o.length;return a<0||a>=l?t?"":void 0:(r=o.charCodeAt(a))<55296||r>56319||a+1===l||(i=o.charCodeAt(a+1))<56320||i>57343?t?o.charAt(a):r:t?o.slice(a,a+2):i-56320+(r-55296<<10)+65536}}),_n={codeAt:Mn(!1),charAt:Mn(!0)},Dn=_n.charAt,Fn=ot.set,Un=ot.getterFor("String Iterator");Ze(String,"String",(function(t){Fn(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Un(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=Dn(n,r),e.index+=t.length,{value:t,done:!1})}));var zn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var Gn in zn){var Hn=c[Gn],Bn=Hn&&Hn.prototype;if(Bn&&Bn.forEach!==Le)try{I(Bn,"forEach",Le)}catch(t){Bn.forEach=Le}}var Wn=Vt("iterator"),Vn=Vt("toStringTag"),Jn=en.values;for(var Kn in zn){var qn=c[Kn],$n=qn&&qn.prototype;if($n){if($n[Wn]!==Jn)try{I($n,Wn,Jn)}catch(t){$n[Wn]=Jn}if($n[Vn]||I($n,Vn,Kn),zn[Kn])for(var Yn in en)if($n[Yn]!==en[Yn])try{I($n,Yn,en[Yn])}catch(t){$n[Yn]=en[Yn]}}}function Qn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var tr=function(t){return function(e,n,r,i){_t(n);var o=Ft(e),a=v(o),l=mt(o.length),c=t?l-1:0,s=t?-1:1;if(r<2)for(;;){if(c in a){i=a[c],c+=s;break}if(c+=s,t?c<0:l<=c)throw TypeError("Reduce of empty array with no initial value")}for(;t?c>=0:l>c;c+=s)c in a&&(i=n(i,a[c],c,o));return i}},er={left:tr(!1),right:tr(!0)}.left,nr=Te("reduce"),rr=le("reduce",{1:0});Mt({target:"Array",proto:!0,forced:!nr||!rr},{reduce:function(t){return er(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var ir=Yt.some,or=Te("some"),ar=le("some");Mt({target:"Array",proto:!0,forced:!or||!ar},{some:function(t){return ir(this,t,arguments.length>1?arguments[1]:void 0)}});var lr=function(){var t=R(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function cr(t,e){return RegExp(t,e)}var sr,ur,fr={UNSUPPORTED_Y:s((function(){var t=cr("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:s((function(){var t=cr("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},hr=RegExp.prototype.exec,yr=String.prototype.replace,mr=hr,dr=(sr=/a/,ur=/b*/g,hr.call(sr,"a"),hr.call(ur,"a"),0!==sr.lastIndex||0!==ur.lastIndex),pr=fr.UNSUPPORTED_Y||fr.BROKEN_CARET,gr=void 0!==/()??/.exec("")[1];(dr||gr||pr)&&(mr=function(t){var e,n,r,i,o=this,a=pr&&o.sticky,l=lr.call(o),c=o.source,s=0,u=t;return a&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),u=String(t).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==t[o.lastIndex-1])&&(c="(?: "+c+")",u=" "+u,s++),n=new RegExp("^(?:"+c+")",l)),gr&&(n=new RegExp("^"+c+"$(?!\\s)",l)),dr&&(e=o.lastIndex),r=hr.call(a?n:o,u),a?r?(r.input=r.input.slice(s),r[0]=r[0].slice(s),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:dr&&r&&(o.lastIndex=o.global?r.index+r[0].length:e),gr&&r&&r.length>1&&yr.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var vr=mr;Mt({target:"RegExp",proto:!0,forced:/./.exec!==vr},{exec:vr});var br=Vt("species"),xr=!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),wr="$0"==="a".replace(/./,"$0"),Er=Vt("replace"),Sr=!!/./[Er]&&""===/./[Er]("a","$0"),Pr=!s((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Or=function(t,e,n,r){var i=Vt(t),o=!s((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),a=o&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[br]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](""),!e}));if(!o||!a||"replace"===t&&(!xr||!wr||Sr)||"split"===t&&!Pr){var l=/./[i],c=n(i,""[t],(function(t,e,n,r,i){return e.exec===vr?o&&!i?{done:!0,value:l.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:wr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Sr}),u=c[0],f=c[1];at(String.prototype,t,u),at(RegExp.prototype,i,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}r&&I(RegExp.prototype[i],"sham",!0)},Tr=_n.charAt,Ar=function(t,e,n){return e+(n?Tr(t,e).length:1)},jr=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==p(t))throw TypeError("RegExp#exec called on incompatible receiver");return vr.call(t,e)};Or("match",1,(function(t,e,n){return[function(e){var n=b(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=R(t),o=String(this);if(!i.global)return jr(i,o);var a=i.unicode;i.lastIndex=0;for(var l,c=[],s=0;null!==(l=jr(i,o));){var u=String(l[0]);c[s]=u,""===u&&(i.lastIndex=Ar(o,mt(i.lastIndex),a)),s++}return 0===s?null:c}]}));var Nr=Vt("match"),Lr=Vt("species"),Rr=function(t,e){var n,r=R(t).constructor;return void 0===r||null==(n=R(r)[Lr])?e:_t(n)},kr=[].push,Cr=Math.min,Ir=!s((function(){return!RegExp(4294967295,"y")}));Or("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r,i,o=String(b(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===t)return[o];if(!w(r=t)||!(void 0!==(i=r[Nr])?i:"RegExp"==p(r)))return e.call(o,t,a);for(var l,c,s,u=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,y=new RegExp(t.source,f+"g");(l=vr.call(y,o))&&!((c=y.lastIndex)>h&&(u.push(o.slice(h,l.index)),l.length>1&&l.index<o.length&&kr.apply(u,l.slice(1)),s=l[0].length,h=c,u.length>=a));)y.lastIndex===l.index&&y.lastIndex++;return h===o.length?!s&&y.test("")||u.push(""):u.push(o.slice(h)),u.length>a?u.slice(0,a):u}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=b(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var o=n(r,t,this,i,r!==e);if(o.done)return o.value;var a=R(t),l=String(this),c=Rr(a,RegExp),s=a.unicode,u=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Ir?"y":"g"),f=new c(Ir?a:"^(?:"+a.source+")",u),h=void 0===i?4294967295:i>>>0;if(0===h)return[];if(0===l.length)return null===jr(f,l)?[l]:[];for(var y=0,m=0,d=[];m<l.length;){f.lastIndex=Ir?m:0;var p,g=jr(f,Ir?l:l.slice(m));if(null===g||(p=Cr(mt(f.lastIndex+(Ir?0:m)),l.length))===y)m=Ar(l,m,s);else{if(d.push(l.slice(y,m)),d.length===h)return d;for(var v=1;v<=g.length-1;v++)if(d.push(g[v]),d.length===h)return d;m=y=p}}return d.push(l.slice(y)),d}]}),!Ir);var Mr="\t\n\v\f\r                 \u2028\u2029\ufeff",_r="["+Mr+"]",Dr=RegExp("^"+_r+_r+"*"),Fr=RegExp(_r+_r+"*$"),Ur=function(t){return function(e){var n=String(b(e));return 1&t&&(n=n.replace(Dr,"")),2&t&&(n=n.replace(Fr,"")),n}},zr={start:Ur(1),end:Ur(2),trim:Ur(3)},Gr=zr.trim;Mt({target:"String",proto:!0,forced:function(t){return s((function(){return!!Mr[t]()||"​…᠎"!="​…᠎"[t]()||Mr[t].name!==t}))}("trim")},{trim:function(){return Gr(this)}});var Hr=/"/g;Mt({target:"String",proto:!0,forced:function(t){return s((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}("anchor")},{anchor:function(t){return e="a",n="name",r=t,i=String(b(this)),o="<"+e,""!==n&&(o+=" "+n+'="'+String(r).replace(Hr,"&quot;")+'"'),o+">"+i+"</"+e+">";var e,n,r,i,o}});var Br=vt.includes,Wr=le("indexOf",{ACCESSORS:!0,1:0});function Vr(t){var e=t.fontFamily,n=t.fontStyle,r=t.fontWeight,i=t.fontSize;e=e||Jr.family,n=n||Jr.style,i=i||Jr.size,["normal","bold"].includes(r)||(r=parseInt(r)>=700?"bold":Jr.weight);var o,a,l,c,s=(e=e.split(",")[0]).match(/([\w\d\s]+)/);return s&&(e=s[0]),a=(o={family:e,style:n,weight:r}).family,l=o.style,c=o.weight,Boolean(Kr.find((function(t){return t.family===a&&t.style===l&&t.weight===c})))||(e=Jr.family,n=Jr.style,r=Jr.weight),{fontFamily:e,fontStyle:n,fontWeight:r,fontSize:i}}Mt({target:"Array",proto:!0,forced:!Wr},{includes:function(t){return Br(this,t,arguments.length>1?arguments[1]:void 0)}}),Ee("includes");var Jr={family:"Arial",style:"normal",weight:"normal",size:"16px"},Kr=[{family:"Abril Fatface",style:"normal",weight:"normal"},{family:"Alegreya",style:"normal",weight:"bold"},{family:"Alegreya",style:"italic",weight:"bold"},{family:"Alegreya",style:"italic",weight:"normal"},{family:"Alegreya",style:"normal",weight:"normal"},{family:"Alegreya Sans",style:"italic",weight:"normal"},{family:"Alegreya SC",style:"normal",weight:"bold"},{family:"Alegreya SC",style:"italic",weight:"normal"},{family:"Alegreya SC",style:"normal",weight:"normal"},{family:"Amarante",style:"normal",weight:"normal"},{family:"Amatic SC",style:"normal",weight:"bold"},{family:"Arial",style:"normal",weight:"bold"},{family:"Arial",style:"italic",weight:"bold"},{family:"Arial",style:"italic",weight:"normal"},{family:"Arial",style:"normal",weight:"normal"},{family:"Arial Unicode MS",style:"normal",weight:"bold"},{family:"Arial Unicode MS",style:"normal",weight:"normal"},{family:"Atomic Age",style:"normal",weight:"normal"},{family:"Audiowide",style:"normal",weight:"normal"},{family:"Avenir Next LT Pro",style:"normal",weight:"bold"},{family:"Avenir Next LT Pro",style:"italic",weight:"bold"},{family:"Avenir Next LT Pro Demi",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro Light",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro",style:"normal",weight:"normal"},{family:"Avenir Next LT Pro Light",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro Light",style:"normal",weight:"normal"},{family:"Avenir Next LT Pro Medium",style:"normal",weight:"bold"},{family:"Avenir Next LT Pro Medium",style:"italic",weight:"bold"},{family:"Avenir Next LT Pro Regular",style:"normal",weight:"bold"},{family:"Avenir Next LT Pro Regular",style:"italic",weight:"bold"},{family:"Avenir Next LT Pro Regular",style:"italic",weight:"normal"},{family:"Avenir Next LT Pro Regular",style:"normal",weight:"normal"},{family:"Belleza",style:"normal",weight:"normal"},{family:"Black Ops One",style:"normal",weight:"normal"},{family:"Cabin Sketch",style:"normal",weight:"bold"},{family:"Cabin Sketch",style:"normal",weight:"normal"},{family:"Coming Soon",style:"normal",weight:"normal"},{family:"CalciteWebCoreIcons",style:"normal",weight:"normal"},{family:"Homemade Apple",style:"normal",weight:"normal"},{family:"IM FELL DW Pica PRO",style:"italic",weight:"normal"},{family:"IM FELL DW Pica PRO",style:"normal",weight:"normal"},{family:"Josefin Sans",style:"normal",weight:"normal"},{family:"Josefin Sans Semibold",style:"italic",weight:"normal"},{family:"Josefin Slab",style:"normal",weight:"bold"},{family:"Josefin Slab",style:"italic",weight:"bold"},{family:"Josefin Slab",style:"italic",weight:"normal"},{family:"Josefin Slab Light",style:"italic",weight:"normal"},{family:"Josefin Slab",style:"normal",weight:"normal"},{family:"Josefin Slab Semibold",style:"italic",weight:"normal"},{family:"Josefin Slab Thin",style:"italic",weight:"normal"},{family:"Just Another Hand",style:"normal",weight:"normal"},{family:"Kranky",style:"normal",weight:"normal"},{family:"Life Savers",style:"normal",weight:"bold"},{family:"Loved By The King",style:"normal",weight:"normal"},{family:"Merriweather",style:"normal",weight:"bold"},{family:"Merriweather",style:"italic",weight:"bold"},{family:"Merriweather",style:"italic",weight:"normal"},{family:"Merriweather",style:"normal",weight:"normal"},{family:"Montserrat",style:"normal",weight:"bold"},{family:"Montserrat",style:"italic",weight:"normal"},{family:"Montserrat Medium",style:"italic",weight:"normal"},{family:"Montserrat",style:"normal",weight:"normal"},{family:"Montserrat Semibold",style:"italic",weight:"normal"},{family:"Noto Sans",style:"normal",weight:"bold"},{family:"Noto Sans",style:"italic",weight:"bold"},{family:"Noto Sans",style:"italic",weight:"normal"},{family:"Noto Sans",style:"normal",weight:"normal"},{family:"Noto Serif",style:"normal",weight:"bold"},{family:"Noto Serif",style:"italic",weight:"bold"},{family:"Noto Serif",style:"italic",weight:"normal"},{family:"Noto Serif",style:"normal",weight:"normal"},{family:"Old Standard TT",style:"normal",weight:"bold"},{family:"Old Standard TT",style:"italic",weight:"normal"},{family:"Old Standard TT",style:"normal",weight:"normal"},{family:"Orbitron",style:"normal",weight:"bold"},{family:"Orbitron",style:"normal",weight:"normal"},{family:"Oregano",style:"italic",weight:"normal"},{family:"Oregano",style:"normal",weight:"normal"},{family:"Oswald",style:"normal",weight:"bold"},{family:"Oswald",style:"normal",weight:"normal"},{family:"Pacifico",style:"normal",weight:"normal"},{family:"Palatino Linotype",style:"normal",weight:"normal"},{family:"Playfair Display Black",style:"normal",weight:"normal"},{family:"Playfair Display",style:"normal",weight:"bold"},{family:"Playfair Display",style:"italic",weight:"bold"},{family:"Playfair Display",style:"italic",weight:"normal"},{family:"Playfair Display",style:"normal",weight:"normal"},{family:"Playfair Display SC",style:"normal",weight:"bold"},{family:"Playfair Display SC",style:"normal",weight:"normal"},{family:"Redressed",style:"normal",weight:"normal"},{family:"Risque",style:"normal",weight:"normal"},{family:"Roboto Condensed",style:"italic",weight:"normal"},{family:"Roboto Condensed Light",style:"italic",weight:"normal"},{family:"Rye",style:"normal",weight:"normal"},{family:"Special Elite",style:"normal",weight:"normal"},{family:"Syncopate",style:"normal",weight:"bold"},{family:"Syncopate",style:"normal",weight:"normal"},{family:"Tangerine",style:"normal",weight:"normal"},{family:"Ubuntu",style:"normal",weight:"bold"},{family:"Ubuntu",style:"italic",weight:"bold"},{family:"Ubuntu Condensed",style:"normal",weight:"normal"},{family:"Ubuntu",style:"italic",weight:"normal"},{family:"Ubuntu Light",style:"normal",weight:"bold"},{family:"Ubuntu Light",style:"italic",weight:"bold"},{family:"Ubuntu Light",style:"italic",weight:"normal"},{family:"Ubuntu Light",style:"normal",weight:"normal"},{family:"Ubuntu Medium",style:"italic",weight:"normal"},{family:"Ubuntu Mono",style:"normal",weight:"bold"},{family:"Ubuntu Mono",style:"italic",weight:"bold"},{family:"Ubuntu Mono",style:"italic",weight:"normal"},{family:"Ubuntu Mono",style:"normal",weight:"normal"},{family:"Ubuntu",style:"normal",weight:"normal"},{family:"UnifrakturCook",style:"normal",weight:"bold"},{family:"Vast Shadow",style:"normal",weight:"normal"},{family:"Walter Turncoat",style:"normal",weight:"normal"}],qr=function(){function t(e){var n=e.id,r=e.editable,i=void 0!==r&&r,o=e.graphic,a=e.text,l=void 0===a?"":a,c=e.textPlaceholder,s=void 0===c?"":c,u=e.textClass,f=e.placementHint,h=e.onNoteEvent;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Object.assign(this,{id:n,editable:i,graphic:o,text:l,textPlaceholder:s,textClass:u}),this.onNoteEvent="function"==typeof h?h:function(){},this.anchor=null,this.mapPoint=null,f&&(this.placementHint=new t.Point(f))}var e,n,r;return e=t,(n=[{key:"destroy",value:function(){this.textElement&&this.textElement.parentElement.removeChild(this.textElement)}},{key:"focus",value:function(){this.textElement&&this.textElement.focus()}},{key:"focused",value:function(){return this.textElement===document.activeElement}},{key:"hovered",value:function(){return this.textElement&&this.textElement.classList.contains("note-hover")}},{key:"selected",value:function(){return this.textElement&&this.textElement.classList.contains("note-select")}},{key:"hidden",value:function(){return this.textElement&&0===parseFloat(this.textElement.style.opacity)}},{key:"setVisibility",value:function(t){this.textElement&&(this.textElement.style.opacity=t?1:0,this.textElement.style.pointerEvents=t?"auto":"none")}},{key:"setHover",value:function(t){if(this.textElement){var e=this.hovered();t?this.textElement.classList.add("note-hover"):this.textElement.classList.remove("note-hover"),t!==e&&this.onNoteEvent("hover",this,{type:"hover"})}}},{key:"setSelect",value:function(t){var e=this.selected();this.textElement&&(t?this.textElement.classList.add("note-select"):this.textElement.classList.remove("note-select"),t!==e&&this.onNoteEvent("select",this,{type:"select"}))}},{key:"createTextElement",value:function(t){var e=this;this.textElement=document.createElement("div"),this.textElement.contentEditable=this.editable,this.textElement.innerText=this.text,this.textElement.setAttribute("data-placeholder",this.textPlaceholder),this.textElement.tabIndex=1,this.textClass&&this.textElement.classList.add(this.textClass),this.textElement.style="\n position: absolute; /* position notes relative to map container */\n -webkit-user-select: auto; /* mobile safari needs this for contenteditable to work properly */\n",this.textElement.addEventListener("input",(function(n){"insertText"!==n.inputType&&"insertParagraph"!==n.inputType||null!=n.data||(e.textElement.innerText=e.text,e.textElement.blur()),e.text=e.textElement.innerText,e.updatePosition(t),e.onNoteEvent("update-text",e,n)})),["keydown","keyup","pointerdown","pointerup","click"].forEach((function(t){e.textElement.addEventListener(t,(function(t){return t.stopPropagation()}))})),this.textElement.addEventListener("pointermove",(function(t){(e.selected()||e.hovered())&&t.stopPropagation()})),this.textElement.addEventListener("focus",(function(t){e.hidden()?(t.stopPropagation(),e.textElement.blur()):e.onNoteEvent("focus",e,t)})),this.textElement.addEventListener("blur",(function(n){e.empty=!e.textElement.innerText||0===e.textElement.innerText.length,e.setHover(!1),e.updatePosition(t),e.onNoteEvent("blur",e,n)})),t.surface.appendChild(this.textElement),this.updatePosition(t)}},{key:"updatePosition",value:function(t){this.updateMapPoint(t),this.updateTextElement(t)}},{key:"updateTextElement",value:function(t){if(t.ready){var e=t.toScreen(this.mapPoint);e.x-=this.textElement.offsetWidth/2,e.y-=this.textElement.offsetHeight/2,e.x=Math.round(e.x),e.y=Math.round(e.y),this.textElement.style.left="".concat(e.x,"px"),this.textElement.style.top="".concat(e.y,"px")}}},{key:"updateMapPoint",value:function(e){var n;null==this.initialZoom&&(this.initialZoom=e.zoom),"point"===this.graphic.geometry.type?n=this.placePointNote(e):"polyline"===this.graphic.geometry.type?n=this.placeLineNote(e):"polygon"===this.graphic.geometry.type&&(n=this.placePolygonNote(e)),this.mapPoint=new t.Point({spatialReference:this.graphic.geometry.spatialReference,x:n.x,y:n.y})}},{key:"placePointNote",value:function(t){this.anchor||(this.anchor=this.graphic.geometry.clone(),this.buffer=3);var e=(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t/.75}("picture-marker"===this.graphic.symbol.type?this.graphic.symbol.height:this.graphic.symbol.size+this.graphic.symbol.outline.width)+this.textElement.offsetHeight)/2-this.graphic.symbol.yoffset+this.buffer,n=t.toScreen(this.anchor);return t.toMap({x:n.x,y:n.y+e})}},{key:"placeLineNote",value:function(e){if(!this.anchor){var n=this.graphic.geometry,r=this.placementHint;if(r)this.anchor=t.geometryEngine.nearestCoordinate(n,r).coordinate,this.vector=$r([this.anchor.x-r.x,this.anchor.y-r.y]);else{var i=n.paths[0].reduce((function(t,e){return[t[0]+e[0],t[1]+e[1]]}),[0,0]).map((function(t){return t/n.paths[0].length})),o=t.Point({type:"point",spatialReference:n.spatialReference,x:i[0],y:i[1]});this.anchor=t.geometryEngine.nearestCoordinate(n,o).coordinate;var a=n.paths[0][0],l=n.paths[0][n.paths[0].length-1];this.vector=$r([-(l[1]-a[1]),l[0]-a[0]])}}return this.computeAnchoredPosition(e)}},{key:"placePolygonNote",value:function(e){if(!this.anchor){var n=this.graphic.geometry,r=this.placementHint;if(!r){var i=n.extent;r=i.width>i.height?{type:"point",x:(i.xmin+i.xmax)/2,y:i.ymin,spatialReference:n.spatialReference}:{type:"point",x:i.xmax,y:(i.ymin+i.ymax)/2,spatialReference:n.spatialReference}}var o={type:"polyline",paths:[n.rings[0]],spatialReference:n.spatialReference};this.anchor=t.geometryEngine.nearestCoordinate(o,r).coordinate,this.vector=$r([n.centroid.x-this.anchor.x,n.centroid.y-this.anchor.y])}return this.computeAnchoredPosition(e)}},{key:"computeAnchoredPosition",value:function(t){var e=this.textElement.offsetWidth,n=this.textElement.offsetHeight,r=15;r*=1-Math.min(Math.max(this.initialZoom-t.zoom,0),3)/3*.5;var i={x:this.anchor.x-this.vector[0]*r*t.resolution,y:this.anchor.y-this.vector[1]*r*t.resolution},o=[[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1],[0,-1],[1,-1]],a=Math.atan2(this.vector[1],this.vector[0]),l=Math.round(8*a/(2*Math.PI)+8)%8;return i.x-=o[l][0]*e/2*t.resolution,i.y-=o[l][1]*n/2*t.resolution,i}},{key:"toGraphic",value:function(t){if(this.textElement){var e=window.getComputedStyle(this.textElement),n=Yr(e,"color",!1)||[0,0,0,255],r=Yr(e,"backgroundColor",!1)||[255,255,255,255],i=n.some((function(t,e){return r[e]!==t})),o=Vr(e),a={x:t.toScreen(this.mapPoint).x-t.toScreen(this.anchor).x,y:t.toScreen(this.mapPoint).y-t.toScreen(this.anchor).y};return{geometry:this.anchor,symbol:{type:"esriTS",text:this.textElement.innerText,color:n,font:{size:o.fontSize,style:o.fontStyle,weight:o.fontWeight,family:o.fontFamily},haloSize:i?2:0,haloColor:i?r:null,horizontalAlignment:"center",verticalAlignment:"middle",xoffset:a.x,yoffset:-a.y},attributes:{OBJECTID:this.id,text:this.text}}}}}])&&Qn(e.prototype,n),r&&Qn(e,r),t}();function $r(t){var e=function(t){return Math.sqrt(t.map((function(t){return t*t})).reduce((function(t,e){return t+e})))}(t);return e>0?t.map((function(t){return t/e})):t}function Yr(t,e,n){var r=t[e];if(r){var i=r.match(/\((.*)\)/);if(i&&i.length>1){var o=i[1].split(",").map((function(t){return parseFloat(t.trim())}));return o[3]=n&&null!=o[3]?255*o[3]:255,o}}}Zn(qr,"Point",n),Zn(qr,"geometryEngine",e);var Qr,Zr,Xr,ti=c.Promise,ei=/(iphone|ipod|ipad).*applewebkit/i.test(Qt),ni=c.location,ri=c.setImmediate,ii=c.clearImmediate,oi=c.process,ai=c.MessageChannel,li=c.Dispatch,ci=0,si={},ui=function(t){if(si.hasOwnProperty(t)){var e=si[t];delete si[t],e()}},fi=function(t){return function(){ui(t)}},hi=function(t){ui(t.data)},yi=function(t){c.postMessage(t+"",ni.protocol+"//"+ni.host)};ri&&ii||(ri=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return si[++ci]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Qr(ci),ci},ii=function(t){delete si[t]},"process"==p(oi)?Qr=function(t){oi.nextTick(fi(t))}:li&&li.now?Qr=function(t){li.now(fi(t))}:ai&&!ei?(Xr=(Zr=new ai).port2,Zr.port1.onmessage=hi,Qr=Dt(Xr.postMessage,Xr,1)):!c.addEventListener||"function"!=typeof postMessage||c.importScripts||s(yi)||"file:"===ni.protocol?Qr="onreadystatechange"in A("script")?function(t){me.appendChild(A("script")).onreadystatechange=function(){me.removeChild(this),ui(t)}}:function(t){setTimeout(fi(t),0)}:(Qr=yi,c.addEventListener("message",hi,!1)));var mi,di,pi,gi,vi,bi,xi,wi,Ei={set:ri,clear:ii},Si=L.f,Pi=Ei.set,Oi=c.MutationObserver||c.WebKitMutationObserver,Ti=c.process,Ai=c.Promise,ji="process"==p(Ti),Ni=Si(c,"queueMicrotask"),Li=Ni&&Ni.value;Li||(mi=function(){var t,e;for(ji&&(t=Ti.domain)&&t.exit();di;){e=di.fn,di=di.next;try{e()}catch(t){throw di?gi():pi=void 0,t}}pi=void 0,t&&t.enter()},ji?gi=function(){Ti.nextTick(mi)}:Oi&&!ei?(vi=!0,bi=document.createTextNode(""),new Oi(mi).observe(bi,{characterData:!0}),gi=function(){bi.data=vi=!vi}):Ai&&Ai.resolve?(xi=Ai.resolve(void 0),wi=xi.then,gi=function(){wi.call(xi,mi)}):gi=function(){Pi.call(c,mi)});var Ri,ki,Ci,Ii,Mi=Li||function(t){var e={fn:t,next:void 0};pi&&(pi.next=e),di||(di=e,gi()),pi=e},_i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=_t(e),this.reject=_t(n)},Di={f:function(t){return new _i(t)}},Fi=function(t,e){if(R(t),w(e)&&e.constructor===t)return e;var n=Di.f(t);return(0,n.resolve)(e),n.promise},Ui=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},zi=Ei.set,Gi=Vt("species"),Hi="Promise",Bi=ot.get,Wi=ot.set,Vi=ot.getterFor(Hi),Ji=ti,Ki=c.TypeError,qi=c.document,$i=c.process,Yi=st("fetch"),Qi=Di.f,Zi=Qi,Xi="process"==p($i),to=!!(qi&&qi.createEvent&&c.dispatchEvent),eo=Ct(Hi,(function(){if(!(G(Ji)!==String(Ji))){if(66===ee)return!0;if(!Xi&&"function"!=typeof PromiseRejectionEvent)return!0}if(ee>=51&&/native code/.test(Ji))return!1;var t=Ji.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[Gi]=e,!(t.then((function(){}))instanceof e)})),no=eo||!An((function(t){Ji.all(t).catch((function(){}))})),ro=function(t){var e;return!(!w(t)||"function"!=typeof(e=t.then))&&e},io=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;Mi((function(){for(var i=e.value,o=1==e.state,a=0;r.length>a;){var l,c,s,u=r[a++],f=o?u.ok:u.fail,h=u.resolve,y=u.reject,m=u.domain;try{f?(o||(2===e.rejection&&co(t,e),e.rejection=1),!0===f?l=i:(m&&m.enter(),l=f(i),m&&(m.exit(),s=!0)),l===u.promise?y(Ki("Promise-chain cycle")):(c=ro(l))?c.call(l,h,y):h(l)):y(i)}catch(t){m&&!s&&m.exit(),y(t)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&ao(t,e)}))}},oo=function(t,e,n){var r,i;to?((r=qi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},(i=c["on"+t])?i(r):"unhandledrejection"===t&&function(t,e){var n=c.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},ao=function(t,e){zi.call(c,(function(){var n,r=e.value;if(lo(e)&&(n=Ui((function(){Xi?$i.emit("unhandledRejection",r,t):oo("unhandledrejection",t,r)})),e.rejection=Xi||lo(e)?2:1,n.error))throw n.value}))},lo=function(t){return 1!==t.rejection&&!t.parent},co=function(t,e){zi.call(c,(function(){Xi?$i.emit("rejectionHandled",t):oo("rejectionhandled",t,e.value)}))},so=function(t,e,n,r){return function(i){t(e,n,i,r)}},uo=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,io(t,e,!0))},fo=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw Ki("Promise can't be resolved itself");var i=ro(n);i?Mi((function(){var r={done:!1};try{i.call(n,so(fo,t,r,e),so(uo,t,r,e))}catch(n){uo(t,r,n,e)}})):(e.value=n,e.state=1,io(t,e,!1))}catch(n){uo(t,{done:!1},n,e)}}};eo&&(Ji=function(t){En(this,Ji,Hi),_t(t),Ri.call(this);var e=Bi(this);try{t(so(fo,this,e),so(uo,this,e))}catch(t){uo(this,e,t)}},(Ri=function(t){Wi(this,{type:Hi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=jn(Ji.prototype,{then:function(t,e){var n=Vi(this),r=Qi(Rr(this,Ji));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=Xi?$i.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&io(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),ki=function(){var t=new Ri,e=Bi(t);this.promise=t,this.resolve=so(fo,t,e),this.reject=so(uo,t,e)},Di.f=Qi=function(t){return t===Ji||t===Ci?new ki(t):Zi(t)},"function"==typeof ti&&(Ii=ti.prototype.then,at(ti.prototype,"then",(function(t,e){var n=this;return new Ji((function(t,e){Ii.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof Yi&&Mt({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Fi(Ji,Yi.apply(c,arguments))}}))),Mt({global:!0,wrap:!0,forced:eo},{Promise:Ji}),We(Ji,Hi,!1),Ln(Hi),Ci=st(Hi),Mt({target:Hi,stat:!0,forced:eo},{reject:function(t){var e=Qi(this);return e.reject.call(void 0,t),e.promise}}),Mt({target:Hi,stat:!0,forced:eo},{resolve:function(t){return Fi(this,t)}}),Mt({target:Hi,stat:!0,forced:no},{all:function(t){var e=this,n=Qi(e),r=n.resolve,i=n.reject,o=Ui((function(){var n=_t(e.resolve),o=[],a=0,l=1;wn(t,(function(t){var c=a++,s=!1;o.push(void 0),l++,n.call(e,t).then((function(t){s||(s=!0,o[c]=t,--l||r(o))}),i)})),--l||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=Qi(e),r=n.reject,i=Ui((function(){var i=_t(e.resolve);wn(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var ho=r.createSubclass({declaredClass:"HubTextNotesLayerView2D",constructor:function(){this._handles=[],this._dirty=!1},attach:function(){var t=this;this.layer.hubNotes.forEach((function(e){return t.addNoteTextElement(e)})),this._handles.push(this.layer.on("note-add",(function(e){return t.addNoteTextElement(e.note)}))),this._handles.push(this.layer.on("note-select",(function(){return t.setDirty(!0)}))),this._handles.push(this.view.watch("extent",(function(){return t.setDirty(!0)})))},detach:function(){this._handles.forEach((function(t){return t.remove()}))},setDirty:function(t){this._dirty=t,this._dirty&&this.requestRender()},addNoteTextElement:function(t){t.createTextElement(this.view),this.setDirty(!0)},render:function(){var t=this;this.layer.hubNotes.filter((function(t){return t.empty})).forEach((function(e){return t.layer.removeNoteForGraphic(e.graphic)})),this._dirty&&(this.setDirty(!1),this.layer.updateNotePositions(this.view),this.layer.collideNotes())},hitTest:function(t,e){var n=this.layer.hubNotes.filter((function(t){return!t.hidden()})).filter((function(n){return n.textElement&&function(t,e){var n=e.x,r=e.y,i=t.parentNode?t.parentNode.getBoundingClientRect():{left:0,top:0},o=t.getBoundingClientRect(),a={left:o.left-i.left,right:o.right-i.left,top:o.top-i.top,bottom:o.bottom-i.top};return n>=a.left&&n<=a.right&&r>=a.top&&r<=a.bottom}(n.textElement,{x:t,y:e})})),r=n[0]&&new i({geometry:n[0].mapPoint,attributes:{id:n[0].id,text:n[0].text},layer:this.layer,sourceLayer:this.layer});return Promise.resolve(r)}});function yo(t,e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return!(n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}return t.createSubclass({declaredClass:"HubTextNotesLayer",noteId:0,constructor:function(t){var e=t.editable,n=t.textPlaceholder,r=t.textClass;Object.assign(this,{editable:e,textPlaceholder:n,textClass:r}),this.hubNotes=[]},createLayerView:function(t){if("2d"===t.type)return new ho({view:t,layer:this})},onNoteEvent:function(t,e,n){this.emit("note-".concat(t),function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xn(Object(n),!0).forEach((function(e){Zn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({note:e},n))},addNoteForGraphic:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.text,r=e.placementHint,i=new qr({id:this.noteId++,editable:this.editable,graphic:t,text:n,textPlaceholder:this.textPlaceholder,textClass:this.textClass,placementHint:r,onNoteEvent:this.onNoteEvent.bind(this)});return this.hubNotes.push(i),this.emit("note-add",{note:i}),i},removeNoteForGraphic:function(t){var e=this.findNoteForGraphic(t);if(e){this.hubNotes=this.hubNotes.filter((function(t){return t!==e}));var n=e.id;e.destroy(),this.emit("note-remove",{noteId:n,graphic:t})}},findNoteForId:function(t){return this.hubNotes.find((function(e){return e.id===t}))},findNoteForGraphic:function(t){return this.hubNotes.find((function(e){return e.graphic===t}))},setHoveredNoteForGraphic:function(t){var e=this.findNoteForGraphic(t);this.hubNotes.filter((function(t){return t.textElement})).forEach((function(t){t.setHover(t===e)}))},setSelectedNoteForGraphic:function(t){var e=this.findNoteForGraphic(t);this.hubNotes.filter((function(t){return t.textElement})).forEach((function(t){t.setSelect(t===e)}))},updateNotePositions:function(t){this.hubNotes.forEach((function(e){return e.updatePosition(t)}))},collideNotes:function(){for(var t=this.hubNotes.filter((function(t){return t.textElement})),e=new Set,n=0;n<t.length;n++){var r=t[n];if(!e.has(r))for(var i=n+1;i<t.length;i++){var o=t[i];yo(r.textElement,o.textElement)&&(r.focused()?e.add(o):o.focused()?e.add(r):r.selected()?e.add(o):o.selected()?e.add(r):e.add(n>=i?o:r))}}this.hubNotes.forEach((function(t){return t.setVisibility(!e.has(t))}))},toGraphics:function(t){return this.hubNotes.map((function(e){return e.toGraphic(t)})).filter((function(t){return t}))}})}));
{
"name": "hub-text-notes-layer",
"version": "0.3.1",
"version": "0.3.2",
"description": "Custom JSAPI layer for Hub text notes",
"main": "HubTextNotesLayer.js",
"main": "dist/HubTextNotesLayer.js",
"scripts": {

@@ -7,0 +7,0 @@ "build": "yarn run rollup -c rollup.config.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc