@eox/layercontrol 0.17.5 → 0.17.6-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +1207 -1146
- package/dist/eox-layercontrol.umd.cjs +69 -69
- package/package.json +3 -3
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(function(C,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(C=typeof globalThis<"u"?globalThis:C||self,_(C["eox-layercontrol"]={}))})(this,function(C){"use strict";var
|
|
1
|
+
(function(C,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(C=typeof globalThis<"u"?globalThis:C||self,_(C["eox-layercontrol"]={}))})(this,function(C){"use strict";var ca=Object.defineProperty;var bo=C=>{throw TypeError(C)};var da=(C,_,H)=>_ in C?ca(C,_,{enumerable:!0,configurable:!0,writable:!0,value:H}):C[_]=H;var L=(C,_,H)=>da(C,typeof _!="symbol"?_+"":_,H),qn=(C,_,H)=>_.has(C)||bo("Cannot "+H);var N=(C,_,H)=>(qn(C,_,"read from private field"),H?H.call(C):_.get(C)),O=(C,_,H)=>_.has(C)?bo("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(C):_.set(C,H),$e=(C,_,H,Jt)=>(qn(C,_,"write to private field"),Jt?Jt.call(C,H):_.set(C,H),H),Y=(C,_,H)=>(qn(C,_,"access private method"),H);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var
|
|
5
|
+
*/var mo,Wt,ye,be,Ze,vo,Xe,Ye,ve,qe,We,Ge,Je,Ct,dn,wo,Ke,Qe,tn,en,nn,on,rn,Eo,Z,xo,So,Wn,$o,_o,hn,sn,an,Gt,ln,Ao,un;const _=globalThis,H=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Jt=Symbol(),Gn=new WeakMap;let Co=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Jt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(H&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Gn.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Gn.set(e,t))}return t}toString(){return this.cssText}};const To=n=>new Co(typeof n=="string"?n:n+"",void 0,Jt),Po=(n,t)=>{if(H)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),o=_.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,n.appendChild(i)}},Jn=H?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return To(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:Oo,defineProperty:Ro,getOwnPropertyDescriptor:Do,getOwnPropertyNames:No,getOwnPropertySymbols:Mo,getPrototypeOf:Io}=Object,xt=globalThis,Kn=xt.trustedTypes,Ho=Kn?Kn.emptyScript:"",pn=xt.reactiveElementPolyfillSupport,Kt=(n,t)=>n,fn={toAttribute(n,t){switch(t){case Boolean:n=n?Ho:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Qn=(n,t)=>!Oo(n,t),ti={attribute:!0,type:String,converter:fn,reflect:!1,hasChanged:Qn};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),xt.litPropertyMetadata??(xt.litPropertyMetadata=new WeakMap);class kt extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ti){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Ro(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=Do(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get(){return o==null?void 0:o.call(this)},set(s){const a=o==null?void 0:o.call(this);r.call(this,s),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ti}static _$Ei(){if(this.hasOwnProperty(Kt("elementProperties")))return;const t=Io(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Kt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Kt("properties"))){const e=this.properties,i=[...No(e),...Mo(e)];for(const o of i)this.createProperty(o,e[o])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,o]of e)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const o=this._$Eu(e,i);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(Jn(o))}else t!==void 0&&e.push(Jn(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Po(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var r;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const s=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:fn).toAttribute(e,i.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){var r;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const s=i.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((r=s.converter)==null?void 0:r.fromAttribute)!==void 0?s.converter:fn;this._$Em=o,this[o]=a.fromAttribute(e,s.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??Qn)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[r,s]of o)s.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(o=>{var r;return(r=o.hostUpdate)==null?void 0:r.call(o)}),this.update(e)):this._$EU()}catch(o){throw t=!1,this._$EU(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}kt.elementStyles=[],kt.shadowRootOptions={mode:"open"},kt[Kt("elementProperties")]=new Map,kt[Kt("finalized")]=new Map,pn==null||pn({ReactiveElement:kt}),(xt.reactiveElementVersions??(xt.reactiveElementVersions=[])).push("2.0.4");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),si=/'/g,ai=/"/g,li=/^(?:script|style|textarea|title)$/i,
|
|
13
|
+
*/const Qt=globalThis,_e=Qt.trustedTypes,ei=_e?_e.createPolicy("lit-html",{createHTML:n=>n}):void 0,gn="$lit$",gt=`lit$${(Math.random()+"").slice(9)}$`,mn="?"+gt,Bo=`<${mn}>`,Ot=document,te=()=>Ot.createComment(""),ee=n=>n===null||typeof n!="object"&&typeof n!="function",ni=Array.isArray,ii=n=>ni(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",yn=`[
|
|
14
|
+
\f\r]`,ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,oi=/-->/g,ri=/>/g,Rt=RegExp(`>|${yn}(?:([^\\s"'>=/]+)(${yn}*=${yn}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),si=/'/g,ai=/"/g,li=/^(?:script|style|textarea|title)$/i,Vo=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),x=Vo(1),st=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),ui=new WeakMap,Dt=Ot.createTreeWalker(Ot,129);function ci(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return ei!==void 0?ei.createHTML(t):t}const di=(n,t)=>{const e=n.length-1,i=[];let o,r=t===2?"<svg>":"",s=ne;for(let a=0;a<e;a++){const l=n[a];let u,d,c=-1,p=0;for(;p<l.length&&(s.lastIndex=p,d=s.exec(l),d!==null);)p=s.lastIndex,s===ne?d[1]==="!--"?s=oi:d[1]!==void 0?s=ri:d[2]!==void 0?(li.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=Rt):d[3]!==void 0&&(s=Rt):s===Rt?d[0]===">"?(s=o??ne,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?Rt:d[3]==='"'?ai:si):s===ai||s===si?s=Rt:s===oi||s===ri?s=ne:(s=Rt,o=void 0);const f=s===Rt&&n[a+1].startsWith("/>")?" ":"";r+=s===ne?l+Bo:c>=0?(i.push(u),l.slice(0,c)+gn+l.slice(c)+gt+f):l+gt+(c===-2?a:f)}return[ci(n,r+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class ie{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const a=t.length-1,l=this.parts,[u,d]=di(t,e);if(this.el=ie.createElement(u,i),Dt.currentNode=this.el.content,e===2){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=Dt.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const c of o.getAttributeNames())if(c.endsWith(gn)){const p=d[s++],f=o.getAttribute(c).split(gt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:g[2],strings:f,ctor:g[1]==="."?pi:g[1]==="?"?fi:g[1]==="@"?gi:oe}),o.removeAttribute(c)}else c.startsWith(gt)&&(l.push({type:6,index:r}),o.removeAttribute(c));if(li.test(o.tagName)){const c=o.textContent.split(gt),p=c.length-1;if(p>0){o.textContent=_e?_e.emptyScript:"";for(let f=0;f<p;f++)o.append(c[f],te()),Dt.nextNode(),l.push({type:2,index:++r});o.append(c[p],te())}}}else if(o.nodeType===8)if(o.data===mn)l.push({type:2,index:r});else{let c=-1;for(;(c=o.data.indexOf(gt,c+1))!==-1;)l.push({type:7,index:r}),c+=gt.length-1}r++}}static createElement(t,e){const i=Ot.createElement("template");return i.innerHTML=t,i}}function Nt(n,t,e=n,i){var s,a;if(t===st)return t;let o=i!==void 0?(s=e._$Co)==null?void 0:s[i]:e._$Cl;const r=ee(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(n),o._$AT(n,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=o:e._$Cl=o),o!==void 0&&(t=Nt(n,o._$AS(n,t.values),o,i)),t}class hi{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,o=((t==null?void 0:t.creationScope)??Ot).importNode(e,!0);Dt.currentNode=o;let r=Dt.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let u;l.type===2?u=new Ut(r,r.nextSibling,this,t):l.type===1?u=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(u=new mi(r,this,t)),this._$AV.push(u),l=i[++a]}s!==(l==null?void 0:l.index)&&(r=Dt.nextNode(),s++)}return Dt.currentNode=Ot,o}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Ut{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Nt(this,t,e),ee(t)?t===T||t==null||t===""?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==st&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ii(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==T&&ee(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ot.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=ie.createElement(ci(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(e);else{const s=new hi(o,this),a=s.u(this.options);s.p(e),this.T(a),this._$AH=s}}_$AC(t){let e=ui.get(t.strings);return e===void 0&&ui.set(t.strings,e=new ie(t)),e}k(t){ni(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new Ut(this.S(te()),this.S(te()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class oe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,r){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=T}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(r===void 0)t=Nt(this,t,e,0),s=!ee(t)||t!==this._$AH&&t!==st,s&&(this._$AH=t);else{const a=t;let l,u;for(t=r[0],l=0;l<r.length-1;l++)u=Nt(this,a[i+l],e,l),u===st&&(u=this._$AH[l]),s||(s=!ee(u)||u!==this._$AH[l]),u===T?t=T:t!==T&&(t+=(u??"")+r[l+1]),this._$AH[l]=u}s&&!o&&this.j(t)}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class pi extends oe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===T?void 0:t}}class fi extends oe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class gi extends oe{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){if((t=Nt(this,t,e,0)??T)===st)return;const i=this._$AH,o=t===T&&i!==T||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==T&&(i===T||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class mi{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Nt(this,t)}}const Lo={P:gn,A:gt,C:mn,M:1,L:di,R:hi,D:ii,V:Nt,I:Ut,H:oe,N:fi,U:gi,B:pi,F:mi},bn=Qt.litHtmlPolyfillSupport;bn==null||bn(ie,Ut),(Qt.litHtmlVersions??(Qt.litHtmlVersions=[])).push("3.1.2");const ko=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let o=i._$litPart$;if(o===void 0){const r=(e==null?void 0:e.renderBefore)??null;i._$litPart$=o=new Ut(t.insertBefore(te(),r),r,void 0,e??{})}return o._$AI(n),o};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let et=class extends kt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=
|
|
19
|
+
*/let et=class extends kt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ko(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return st}};et._$litElement$=!0,et.finalized=!0,(mo=globalThis.litElementHydrateSupport)==null||mo.call(globalThis,{LitElement:et});const vn=globalThis.litElementPolyfillSupport;vn==null||vn({LitElement:et}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -28,30 +28,30 @@
|
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{I:
|
|
31
|
+
*/const{I:Uo}=Lo,Fo=n=>n.strings===void 0,yi=()=>document.createComment(""),re=(n,t,e)=>{var r;const i=n._$AA.parentNode,o=t===void 0?n._$AB:t._$AA;if(e===void 0){const s=i.insertBefore(yi(),o),a=i.insertBefore(yi(),o);e=new Uo(s,a,n,n.options)}else{const s=e._$AB.nextSibling,a=e._$AM,l=a!==n;if(l){let u;(r=e._$AQ)==null||r.call(e,n),e._$AM=n,e._$AP!==void 0&&(u=n._$AU)!==a._$AU&&e._$AP(u)}if(s!==o||l){let u=e._$AA;for(;u!==s;){const d=u.nextSibling;i.insertBefore(u,o),u=d}}}return e},Mt=(n,t,e=n)=>(n._$AI(t,e),n),jo={},bi=(n,t=jo)=>n._$AH=t,zo=n=>n._$AH,xn=n=>{var i;(i=n._$AP)==null||i.call(n,!1,!0);let t=n._$AA;const e=n._$AB.nextSibling;for(;t!==e;){const o=t.nextSibling;t.remove(),t=o}};/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const vi=(n,t,e)=>{const i=new Map;for(let o=t;o<=e;o++)i.set(n[o],o);return i},
|
|
35
|
+
*/const vi=(n,t,e)=>{const i=new Map;for(let o=t;o<=e;o++)i.set(n[o],o);return i},Zo=wn(class extends En{constructor(n){if(super(n),n.type!==St.CHILD)throw Error("repeat() can only be used in text expressions")}dt(n,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const o=[],r=[];let s=0;for(const a of n)o[s]=i?i(a,s):s,r[s]=e(a,s),s++;return{values:r,keys:o}}render(n,t,e){return this.dt(n,t,e).values}update(n,[t,e,i]){const o=zo(n),{values:r,keys:s}=this.dt(t,e,i);if(!Array.isArray(o))return this.ut=s,r;const a=this.ut??(this.ut=[]),l=[];let u,d,c=0,p=o.length-1,f=0,g=r.length-1;for(;c<=p&&f<=g;)if(o[c]===null)c++;else if(o[p]===null)p--;else if(a[c]===s[f])l[f]=Mt(o[c],r[f]),c++,f++;else if(a[p]===s[g])l[g]=Mt(o[p],r[g]),p--,g--;else if(a[c]===s[g])l[g]=Mt(o[c],r[g]),re(n,l[g+1],o[c]),c++,g--;else if(a[p]===s[f])l[f]=Mt(o[p],r[f]),re(n,o[c],o[p]),p--,f++;else if(u===void 0&&(u=vi(s,f,g),d=vi(a,c,p)),u.has(a[c]))if(u.has(a[p])){const y=d.get(s[f]),D=y!==void 0?o[y]:null;if(D===null){const X=re(n,o[c]);Mt(X,r[f]),l[f]=X}else l[f]=Mt(D,r[f]),re(n,o[c],D),o[y]=null;f++}else xn(o[p]),p--;else xn(o[c]),c++;for(;f<=g;){const y=re(n,l[g+1]);Mt(y,r[f]),l[f++]=y}for(;c<=p;){const y=o[c++];y!==null&&xn(y)}return this.ut=s,bi(n,l),st}});/**
|
|
36
36
|
* wms-capabilities @0.6.0
|
|
37
37
|
* @description WMS service Capabilities > JSON, based on openlayers
|
|
38
38
|
* @license BSD-2-Clause
|
|
39
39
|
* @preserve
|
|
40
|
-
*/var E=n=>n!==void 0,wi=(n,t,e)=>t in n?n[t]:n[t]=e;const
|
|
40
|
+
*/var E=n=>n!==void 0,wi=(n,t,e)=>t in n?n[t]:n[t]=e;const se={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class Xo{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,e){return Ae(t,e).join("")}}function Ae(n,t){return Ei(n,t,[]).join("")}function Ei(n,t,e){if(n.nodeType===se.CDATA_SECTION||n.nodeType===se.TEXT)t?e.push(String(n.nodeValue).replace(/(\r\n|\r|\n)/g,"")):e.push(n.nodeValue);else{var i;for(i=n.firstChild;i;i=i.nextSibling)Ei(i,t,e)}return e}function Yo(n,t,e,i){for(var o=qo(t);o;o=Wo(o)){var r=o.namespaceURI||null,s=n[r];if(E(s)){var a=s[o.localName];E(a)&&a.call(i,o,e)}}}function qo(n){let t=n.firstElementChild||n.firstChild;for(;t&&t.nodeType!==se.ELEMENT;)t=t.nextSibling;return t}function Wo(n){let t=n.nextElementSibling||n.nextSibling;for(;t&&t.nodeType!==se.ELEMENT;)t=t.nextSibling;return t}function F(n,t,e){return Go(n,t,e)}function Go(n,t,e){var i=E(e)?e:{},o,r;for(o=0,r=n.length;o<r;++o)i[n[o]]=t;return i}function xi(n,t){return function(e,i){var o=n.call(E(t)?t:this,e,i);if(E(o)){var r=i[i.length-1];r.push(o)}}}function k(n,t,e,i,o){return i.push(n),Yo(t,e,i,o),i.pop()}function m(n,t,e){return function(i,o){let r=n.call(E(e)?e:this,i,o);if(E(r)){var s=o[o.length-1],a=E(t)?t:i.localName;s[a]=r}}}function Q(n,t,e){return function(i,o){var r=n.call(E(e)?e:this,i,o);if(E(r)){var s=o[o.length-1],a=E(t)?t:i.localName,l=wi(s,a,[]);l.push(r)}}}const Jo=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function Ko(n){return n.replace(Jo,"")}function It(n){const t=/^\s*(true|1)|(false|0)\s*$/.exec(n);if(t)return E(t[1])||!1}function Ft(n){return mt(Ae(n,!1))}function mt(n){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n);if(t)return parseFloat(t[1])}function Sn(n){return Ce(Ae(n,!1))}function Ce(n){const t=/^\s*(\d+)\s*$/.exec(n);if(t)return parseInt(t[1],10)}function $(n){return Ko(Ae(n,!1))}const Qo="http://www.w3.org/1999/xlink";function $n(n){return n.getAttributeNS(Qo,"href")}function tr(n,t){return k({},Cr,n,t)}function Si(n){return[mt(n.getAttribute("minx")),mt(n.getAttribute("miny")),mt(n.getAttribute("maxx")),mt(n.getAttribute("maxy"))]}function er(n,t){const e=Si(n),i=[mt(n.getAttribute("resx")),mt(n.getAttribute("resy"))];return{crs:n.getAttribute("CRS")||n.getAttribute("SRS"),extent:e,res:i}}function nr(n,t){const e=Si(n);if(!(!E(e[0])||!E(e[1])||!E(e[2])||!E(e[3])))return e}function ir(n,t){const e=parseFloat(n.getAttribute("min")),i=parseFloat(n.getAttribute("max"));return{min:e,max:i}}function or(n,t){const e=k({},Tr,n,t);if(!E(e))return;const i=e.westBoundLongitude,o=e.southBoundLatitude,r=e.eastBoundLongitude,s=e.northBoundLatitude;if(!(!E(i)||!E(o)||!E(r)||!E(s)))return[i,o,r,s]}function rr(n,t){return k({},Er,n,t)}function sr(n,t){return k({},xr,n,t)}function ar(n,t){return k({},Sr,n,t)}function lr(n,t){return k({},$r,n,t)}function ur(n,t){return k({},_r,n,t)}function cr(n,t){return k([],Ar,n,t)}function dr(n,t){const e=It(n.getAttribute("queryable"));return k({queryable:E(e)?e:!1},Ai,n,t)}function hr(n,t){var e=t[t.length-1];const i=k({},Ai,n,t);if(!E(i))return;let o=It(n.getAttribute("queryable"));E(o)||(o=e.queryable),i.queryable=E(o)?o:!1;let r=Ce(n.getAttribute("cascaded"));E(r)||(r=e.cascaded),i.cascaded=r;let s=It(n.getAttribute("opaque"));E(s)||(s=e.opaque),i.opaque=E(s)?s:!1;let a=It(n.getAttribute("noSubsets"));E(a)||(a=e.noSubsets),i.noSubsets=E(a)?a:!1;let l=mt(n.getAttribute("fixedWidth"));E(l)||(l=e.fixedWidth),i.fixedWidth=l;let u=mt(n.getAttribute("fixedHeight"));E(u)||(u=e.fixedHeight),i.fixedHeight=u;const d=["Style","CRS","AuthorityURL"];for(let p=0,f=d.length;p<f;p++){const g=d[p],y=e[g];if(E(y)){let D=wi(i,g,[]);D=D.concat(y),i[g]=D}}const c=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let p=0,f=c.length;p<f;p++){const g=c[p],y=i[g];if(!E(y)){const D=e[g];i[g]=D}}return i}function pr(n,t){return{name:n.getAttribute("name"),units:n.getAttribute("units"),unitSymbol:n.getAttribute("unitSymbol"),default:n.getAttribute("default"),multipleValues:It(n.getAttribute("multipleValues")),nearestValue:It(n.getAttribute("nearestValue")),current:It(n.getAttribute("current")),values:$(n)}}function yt(n,t){return k({},Mr,n,t)}function fr(n,t){return k({},Pr,n,t)}function gr(n,t){return k({},Rr,n,t)}function mr(n,t){return k({},Dr,n,t)}function _n(n,t){return k({},Or,n,t)}function $i(n,t){var e=yt(n,t);if(E(e)){const i=[Ce(n.getAttribute("width")),Ce(n.getAttribute("height"))];return e.size=i,e}}function yr(n,t){var e=yt(n,t);if(E(e))return e.name=n.getAttribute("name"),e}function br(n,t){var e=yt(n,t);if(E(e))return e.type=n.getAttribute("type"),e}function vr(n,t){return k({},Nr,n,t)}function _i(n,t){return k([],Ir,n,t)}const j=[null,"http://www.opengis.net/wms"],wr=F(j,{Service:m(sr),Capability:m(rr)}),Er=F(j,{Request:m(fr),Exception:m(cr),Layer:m(dr)}),xr=F(j,{Name:m($),Title:m($),Abstract:m($),KeywordList:m(_i),OnlineResource:m($n),ContactInformation:m(ar),Fees:m($),AccessConstraints:m($),LayerLimit:m(Sn),MaxWidth:m(Sn),MaxHeight:m(Sn)}),Sr=F(j,{ContactPersonPrimary:m(lr),ContactPosition:m($),ContactAddress:m(ur),ContactVoiceTelephone:m($),ContactFacsimileTelephone:m($),ContactElectronicMailAddress:m($)}),$r=F(j,{ContactPerson:m($),ContactOrganization:m($)}),_r=F(j,{AddressType:m($),Address:m($),City:m($),StateOrProvince:m($),PostCode:m($),Country:m($)}),Ar=F(j,{Format:xi($)}),Ai=F(j,{Name:m($),Title:m($),Abstract:m($),KeywordList:m(_i),CRS:Q($),SRS:Q($),EX_GeographicBoundingBox:m(or),LatLonBoundingBox:m(nr),BoundingBox:Q(er),Dimension:Q(pr),Attribution:m(tr),AuthorityURL:Q(yr),Identifier:Q($),MetadataURL:Q(br),DataURL:Q(yt),FeatureListURL:Q(yt),Style:Q(vr),MinScaleDenominator:m(Ft),MaxScaleDenominator:m(Ft),ScaleHint:m(ir),Layer:Q(hr)}),Cr=F(j,{Title:m($),OnlineResource:m($n),LogoURL:m($i)}),Tr=F(j,{westBoundLongitude:m(Ft),eastBoundLongitude:m(Ft),southBoundLatitude:m(Ft),northBoundLatitude:m(Ft)}),Pr=F(j,{GetCapabilities:m(_n),GetMap:m(_n),GetFeatureInfo:m(_n)}),Or=F(j,{Format:Q($),DCPType:Q(gr)}),Rr=F(j,{HTTP:m(mr)}),Dr=F(j,{Get:m(yt),Post:m(yt)}),Nr=F(j,{Name:m($),Title:m($),Abstract:m($),LegendURL:Q($i),StyleSheetURL:m(yt),StyleURL:m(yt)}),Mr=F(j,{Format:m($),OnlineResource:m($n)}),Ir=F(j,{Keyword:xi($)});class Hr{constructor(t,e){!e&&typeof window<"u"&&(e=window.DOMParser),this.version=void 0,this._parser=new Xo(e),this._data=t}data(t){return this._data=t,this}toJSON(t){return t=t||this._data,this.parse(t)}parse(t){return this.readFromDocument(this._parser.toDocument(t))}readFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==se.ELEMENT)return this.readFromNode(e);return null}readFromNode(t){return this.version=t.getAttribute("version"),k({version:this.version},wr,t,[])||null}}async function Br(n){let t=new URL(n),e=t.searchParams;e.set("SERVICE","WMS"),e.set("REQUEST","GetCapabilities");let i=t.toString();const o=await fetch(i);if(o.ok){const r=await o.text();return new Hr(r).toJSON()}else throw new Error(`Error: ${o.status}`)}function An(n){const t=/\b(?:wms|ows)\b/i,e=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return t.test(n)?"TileWMS":e.test(n)?"XYZ":!1}function Vr(n){const e=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(n),i=An(n);return!!(n&&e&&i)}function Ci(n){return n.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function Lr(n){try{return JSON.parse(Ci(n)),!!n}catch{return!1}}function kr(n,t){const e=new URL(n).searchParams;Object.entries(t).forEach(([s,a])=>{typeof a=="object"&&!Array.isArray(a)&&a!==null?Object.keys(a).forEach(l=>{e.set(l,a[l])}):e.set(s,a)});const i=n.split("?")[0],o=e.toString();return`${i}?${o}`}/**!
|
|
41
41
|
* Sortable 1.15.2
|
|
42
42
|
* @author RubaXa <trash@rubaxa.org>
|
|
43
43
|
* @author owenm <owen23355@gmail.com>
|
|
44
44
|
* @license MIT
|
|
45
|
-
*/function Ti(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,i)}return e}function pt(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Ti(Object(e),!0).forEach(function(i){kr(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Ti(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function Te(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Te=function(t){return typeof t}:Te=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(n)}function kr(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function bt(){return bt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},bt.apply(this,arguments)}function Ur(n,t){if(n==null)return{};var e={},i=Object.keys(n),o,r;for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&(e[o]=n[o]);return e}function Fr(n,t){if(n==null)return{};var e=Ur(n,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}var jr="1.15.2";function vt(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var wt=vt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),se=vt(/Edge/i),Pi=vt(/firefox/i),ae=vt(/safari/i)&&!vt(/chrome/i)&&!vt(/android/i),Oi=vt(/iP(ad|od|hone)/i),Ri=vt(/chrome/i)&&vt(/android/i),Di={capture:!1,passive:!1};function A(n,t,e){n.addEventListener(t,e,!wt&&Di)}function S(n,t,e){n.removeEventListener(t,e,!wt&&Di)}function Pe(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function zr(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function ut(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Pe(n,t):Pe(n,t))||i&&n===e)return n;if(n===e)break}while(n=zr(n))}return null}var Ni=/\s+/g;function nt(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Ni," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Ni," ")}}function b(n,t,e){var i=n&&n.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function jt(n,t){var e="";if(typeof n=="string")e=n;else do{var i=b(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function Mi(n,t,e){if(n){var i=n.getElementsByTagName(t),o=0,r=i.length;if(e)for(;o<r;o++)e(i[o],o);return i}return[]}function ft(){var n=document.scrollingElement;return n||document.documentElement}function B(n,t,e,i,o){if(!(!n.getBoundingClientRect&&n!==window)){var r,s,a,l,u,d,c;if(n!==window&&n.parentNode&&n!==ft()?(r=n.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,u=r.right,d=r.height,c=r.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,d=window.innerHeight,c=window.innerWidth),(t||e)&&n!==window&&(o=o||n.parentNode,!wt))do if(o&&o.getBoundingClientRect&&(b(o,"transform")!=="none"||e&&b(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(b(o,"border-top-width")),a-=p.left+parseInt(b(o,"border-left-width")),l=s+r.height,u=a+r.width;break}while(o=o.parentNode);if(i&&n!==window){var f=jt(o||n),g=f&&f.a,y=f&&f.d;f&&(s/=y,a/=g,c/=g,d/=y,l=s+d,u=a+c)}return{top:s,left:a,bottom:l,right:u,width:c,height:d}}}function Ii(n,t,e){for(var i=$t(n,!0),o=B(n)[t];i;){var r=B(i)[e],s=void 0;if(e==="top"||e==="left"?s=o>=r:s=o<=r,!s)return i;if(i===ft())break;i=$t(i,!1)}return!1}function zt(n,t,e,i){for(var o=0,r=0,s=n.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==v.ghost&&(i||s[r]!==v.dragged)&&ut(s[r],e.draggable,n,!1)){if(o===t)return s[r];o++}r++}return null}function Cn(n,t){for(var e=n.lastElementChild;e&&(e===v.ghost||b(e,"display")==="none"||t&&!Pe(e,t));)e=e.previousElementSibling;return e||null}function lt(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==v.clone&&(!t||Pe(n,t))&&e++;return e}function Hi(n){var t=0,e=0,i=ft();if(n)do{var o=jt(n),r=o.a,s=o.d;t+=n.scrollLeft*r,e+=n.scrollTop*s}while(n!==i&&(n=n.parentNode));return[t,e]}function Zr(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===n[e][i])return Number(e)}return-1}function $t(n,t){if(!n||!n.getBoundingClientRect)return ft();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var o=b(e);if(e.clientWidth<e.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return ft();if(i||t)return e;i=!0}}while(e=e.parentNode);return ft()}function Xr(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function Tn(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var le;function Bi(n,t){return function(){if(!le){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),le=setTimeout(function(){le=void 0},t)}}}function Yr(){clearTimeout(le),le=void 0}function Vi(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function Li(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}function ki(n,t,e){var i={};return Array.from(n.children).forEach(function(o){var r,s,a,l;if(!(!ut(o,t.draggable,n,!1)||o.animated||o===e)){var u=B(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,u.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,u.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,u.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,u.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var it="Sortable"+new Date().getTime();function qr(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(b(o,"display")==="none"||o===v.ghost)){n.push({target:o,rect:B(o)});var r=pt({},n[n.length-1].rect);if(o.thisAnimationDuration){var s=jt(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(Zr(n,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;n.forEach(function(a){var l=0,u=a.target,d=u.fromRect,c=B(u),p=u.prevFromRect,f=u.prevToRect,g=a.rect,y=jt(u,!0);y&&(c.top-=y.f,c.left-=y.e),u.toRect=c,u.thisAnimationDuration&&Tn(p,c)&&!Tn(d,c)&&(g.top-c.top)/(g.left-c.left)===(d.top-c.top)/(d.left-c.left)&&(l=Gr(g,p,f,o.options)),Tn(c,d)||(u.prevFromRect=d,u.prevToRect=c,l||(l=o.options.animation),o.animate(u,g,c,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),n=[]},animate:function(i,o,r,s){if(s){b(i,"transition",""),b(i,"transform","");var a=jt(this.el),l=a&&a.a,u=a&&a.d,d=(o.left-r.left)/(l||1),c=(o.top-r.top)/(u||1);i.animatingX=!!d,i.animatingY=!!c,b(i,"transform","translate3d("+d+"px,"+c+"px,0)"),this.forRepaintDummy=Wr(i),b(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),b(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){b(i,"transition",""),b(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function Wr(n){return n.offsetWidth}function Gr(n,t,e,i){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*i.animation}var Zt=[],Pn={initializeByDefault:!0},ue={mount:function(t){for(var e in Pn)Pn.hasOwnProperty(e)&&!(e in t)&&(t[e]=Pn[e]);Zt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Zt.push(t)},pluginEvent:function(t,e,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var r=t+"Global";Zt.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][r]&&e[s.pluginName][r](pt({sortable:e},i)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](pt({sortable:e},i)))})},initializePlugins:function(t,e,i,o){Zt.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var u=new a(t,e,t.options);u.sortable=t,u.options=t.options,t[l]=u,bt(i,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,e){var i={};return Zt.forEach(function(o){typeof o.eventProperties=="function"&&bt(i,o.eventProperties.call(e[o.pluginName],t))}),i},modifyOption:function(t,e,i){var o;return Zt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(o=r.optionListeners[e].call(t[r.pluginName],i))}),o}};function Jr(n){var t=n.sortable,e=n.rootEl,i=n.name,o=n.targetEl,r=n.cloneEl,s=n.toEl,a=n.fromEl,l=n.oldIndex,u=n.newIndex,d=n.oldDraggableIndex,c=n.newDraggableIndex,p=n.originalEvent,f=n.putSortable,g=n.extraEventProperties;if(t=t||e&&e[it],!!t){var y,D=t.options,X="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!wt&&!se?y=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(i,!0,!0)),y.to=s||e,y.from=a||e,y.item=o||e,y.clone=r,y.oldIndex=l,y.newIndex=u,y.oldDraggableIndex=d,y.newDraggableIndex=c,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var U=pt(pt({},g),ue.getEventProperties(i,t));for(var rt in U)y[rt]=U[rt];e&&e.dispatchEvent(y),D[X]&&D[X].call(t,y)}}var Kr=["evt"],tt=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=Fr(i,Kr);ue.pluginEvent.bind(v)(t,e,pt({dragEl:h,parentEl:I,ghostEl:w,rootEl:R,nextEl:Ht,lastDownEl:Oe,cloneEl:N,cloneHidden:_t,dragStarted:de,putSortable:z,activeSortable:v.active,originalEvent:o,oldIndex:Xt,oldDraggableIndex:ce,newIndex:ot,newDraggableIndex:At,hideGhostForTarget:Yi,unhideGhostForTarget:qi,cloneNowHidden:function(){_t=!0},cloneNowShown:function(){_t=!1},dispatchSortableEvent:function(a){J({sortable:e,name:a,originalEvent:o})}},r))};function J(n){Jr(pt({putSortable:z,cloneEl:N,targetEl:h,rootEl:R,oldIndex:Xt,oldDraggableIndex:ce,newIndex:ot,newDraggableIndex:At},n))}var h,I,w,R,Ht,Oe,N,_t,Xt,ot,ce,At,Re,z,Yt=!1,De=!1,Ne=[],Bt,ct,On,Rn,Ui,Fi,de,qt,he,pe=!1,Me=!1,Ie,q,Dn=[],Nn=!1,He=[],Be=typeof document<"u",Ve=Oi,ji=se||wt?"cssFloat":"float",Qr=Be&&!Ri&&!Oi&&"draggable"in document.createElement("div"),zi=function(){if(Be){if(wt)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Zi=function(t,e){var i=b(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=zt(t,0,e),s=zt(t,1,e),a=r&&b(r),l=s&&b(s),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+B(r).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+B(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var c=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===c)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&i[ji]==="none"||s&&i[ji]==="none"&&u+d>o)?"vertical":"horizontal"},ts=function(t,e,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,a=i?e.left:e.top,l=i?e.right:e.bottom,u=i?e.width:e.height;return o===a||r===l||o+s/2===a+u/2},es=function(t,e){var i;return Ne.some(function(o){var r=o[it].options.emptyInsertThreshold;if(!(!r||Cn(o))){var s=B(o),a=t>=s.left-r&&t<=s.right+r,l=e>=s.top-r&&e<=s.bottom+r;if(a&&l)return i=o}}),i},Xi=function(t){function e(r,s){return function(a,l,u,d){var c=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||c))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(a,l,u,d),s)(a,l,u,d);var p=(s?a:l).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},o=t.group;(!o||Te(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=e(o.pull,!0),i.checkPut=e(o.put),i.revertClone=o.revertClone,t.group=i},Yi=function(){!zi&&w&&b(w,"display","none")},qi=function(){!zi&&w&&b(w,"display","")};Be&&!Ri&&document.addEventListener("click",function(n){if(De)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),De=!1,!1},!0);var Vt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=es(t.clientX,t.clientY);if(e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[it]._onDragOver(i)}}},ns=function(t){h&&h.parentNode[it]._isOutsideThisEl(t.target)};function v(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=bt({},t),n[it]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Zi(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:v.supportPointer!==!1&&"PointerEvent"in window&&!ae,emptyInsertThreshold:5};ue.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Xi(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:Qr,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?A(n,"pointerdown",this._onTapStart):(A(n,"mousedown",this._onTapStart),A(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(A(n,"dragover",this),A(n,"dragenter",this)),Ne.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bt(this,qr())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(qt=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,o=this.options,r=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=o.filter;if(cs(i),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&ae&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ut(l,o.draggable,i,!1),!(l&&l.animated)&&Oe!==l)){if(Xt=lt(l),ce=lt(l,o.draggable),typeof d=="function"){if(d.call(this,t,l,this)){J({sortable:e,rootEl:u,name:"filter",targetEl:l,toEl:i,fromEl:i}),tt("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(c){if(c=ut(u,c.trim(),i,!1),c)return J({sortable:e,rootEl:c,name:"filter",targetEl:l,fromEl:i,toEl:i}),tt("filter",e,{evt:t}),!0}),d)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!ut(u,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,i){var o=this,r=o.el,s=o.options,a=r.ownerDocument,l;if(i&&!h&&i.parentNode===r){var u=B(i);if(R=r,h=i,I=h.parentNode,Ht=h.nextSibling,Oe=i,Re=s.group,v.dragged=h,Bt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},Ui=Bt.clientX-u.left,Fi=Bt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",l=function(){if(tt("delayEnded",o,{evt:t}),v.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Pi&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,e),J({sortable:o,name:"choose",originalEvent:t}),nt(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(d){Mi(h,d.trim(),Mn)}),A(a,"dragover",Vt),A(a,"mousemove",Vt),A(a,"touchmove",Vt),A(a,"mouseup",o._onDrop),A(a,"touchend",o._onDrop),A(a,"touchcancel",o._onDrop),Pi&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),tt("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(se||wt))){if(v.eventCanceled){this._onDrop();return}A(a,"mouseup",o._disableDelayedDrag),A(a,"touchend",o._disableDelayedDrag),A(a,"touchcancel",o._disableDelayedDrag),A(a,"mousemove",o._delayedDragTouchMoveHandler),A(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&A(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Mn(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._disableDelayedDrag),S(t,"touchend",this._disableDelayedDrag),S(t,"touchcancel",this._disableDelayedDrag),S(t,"mousemove",this._delayedDragTouchMoveHandler),S(t,"touchmove",this._delayedDragTouchMoveHandler),S(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?A(document,"pointermove",this._onTouchMove):e?A(document,"touchmove",this._onTouchMove):A(document,"mousemove",this._onTouchMove):(A(h,"dragend",this),A(R,"dragstart",this._onDragStart));try{document.selection?ke(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Yt=!1,R&&h){tt("dragStarted",this,{evt:e}),this.nativeDraggable&&A(document,"dragover",ns);var i=this.options;!t&&nt(h,i.dragClass,!1),nt(h,i.ghostClass,!0),v.active=this,t&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ct){this._lastX=ct.clientX,this._lastY=ct.clientY,Yi();for(var t=document.elementFromPoint(ct.clientX,ct.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ct.clientX,ct.clientY),t!==e);)e=t;if(h.parentNode[it]._isOutsideThisEl(t),e)do{if(e[it]){var i=void 0;if(i=e[it]._onDragOver({clientX:ct.clientX,clientY:ct.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);qi()}},_onTouchMove:function(t){if(Bt){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=w&&jt(w,!0),a=w&&s&&s.a,l=w&&s&&s.d,u=Ve&&q&&Hi(q),d=(r.clientX-Bt.clientX+o.x)/(a||1)+(u?u[0]-Dn[0]:0)/(a||1),c=(r.clientY-Bt.clientY+o.y)/(l||1)+(u?u[1]-Dn[1]:0)/(l||1);if(!v.active&&!Yt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(w){s?(s.e+=d-(On||0),s.f+=c-(Rn||0)):s={a:1,b:0,c:0,d:1,e:d,f:c};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");b(w,"webkitTransform",p),b(w,"mozTransform",p),b(w,"msTransform",p),b(w,"transform",p),On=d,Rn=c,ct=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!w){var t=this.options.fallbackOnBody?document.body:R,e=B(h,!0,Ve,!0,t),i=this.options;if(Ve){for(q=t;b(q,"position")==="static"&&b(q,"transform")==="none"&&q!==document;)q=q.parentNode;q!==document.body&&q!==document.documentElement?(q===document&&(q=ft()),e.top+=q.scrollTop,e.left+=q.scrollLeft):q=ft(),Dn=Hi(q)}w=h.cloneNode(!0),nt(w,i.ghostClass,!1),nt(w,i.fallbackClass,!0),nt(w,i.dragClass,!0),b(w,"transition",""),b(w,"transform",""),b(w,"box-sizing","border-box"),b(w,"margin",0),b(w,"top",e.top),b(w,"left",e.left),b(w,"width",e.width),b(w,"height",e.height),b(w,"opacity","0.8"),b(w,"position",Ve?"absolute":"fixed"),b(w,"zIndex","100000"),b(w,"pointerEvents","none"),v.ghost=w,t.appendChild(w),b(w,"transform-origin",Ui/parseInt(w.style.width)*100+"% "+Fi/parseInt(w.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,o=t.dataTransfer,r=i.options;if(tt("dragStart",this,{evt:t}),v.eventCanceled){this._onDrop();return}tt("setupClone",this),v.eventCanceled||(N=Li(h),N.removeAttribute("id"),N.draggable=!1,N.style["will-change"]="",this._hideClone(),nt(N,this.options.chosenClass,!1),v.clone=N),i.cloneId=ke(function(){tt("clone",i),!v.eventCanceled&&(i.options.removeCloneOnHide||R.insertBefore(N,h),i._hideClone(),J({sortable:i,name:"clone"}))}),!e&&nt(h,r.dragClass,!0),e?(De=!0,i._loopId=setInterval(i._emulateDragOver,50)):(S(document,"mouseup",i._onDrop),S(document,"touchend",i._onDrop),S(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(i,o,h)),A(document,"drop",i),b(h,"transform","translateZ(0)")),Yt=!0,i._dragStartId=ke(i._dragStarted.bind(i,e,t)),A(document,"selectstart",i),de=!0,ae&&b(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,o,r,s,a=this.options,l=a.group,u=v.active,d=Re===l,c=a.sort,p=z||u,f,g=this,y=!1;if(Nn)return;function D(Se,ra){tt(Se,g,pt({evt:t,isOwner:d,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:c,fromSortable:p,target:i,completed:U,onMove:function(mo,sa){return Le(R,e,h,o,mo,B(mo),t,sa)},changed:rt},ra))}function X(){D("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function U(Se){return D("dragOverCompleted",{insertion:Se}),Se&&(d?u._hideClone():u._showClone(g),g!==p&&(nt(h,z?z.options.ghostClass:u.options.ghostClass,!1),nt(h,a.ghostClass,!0)),z!==g&&g!==v.active?z=g:g===v.active&&z&&(z=null),p===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){D("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(qt=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[it]._isOutsideThisEl(t.target),!Se&&Vt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function rt(){ot=lt(h),At=lt(h,a.draggable),J({sortable:g,name:"change",toEl:e,newIndex:ot,newDraggableIndex:At,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=ut(i,a.draggable,e,!0),D("dragOver"),v.eventCanceled)return y;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return U(!1);if(De=!1,u&&!a.disabled&&(d?c||(s=I!==R):z===this||(this.lastPutMode=Re.checkPull(this,u,h,t))&&l.checkPut(this,u,h,t))){if(f=this._getDirection(t,i)==="vertical",o=B(h),D("dragOverValid"),v.eventCanceled)return y;if(s)return I=R,X(),this._hideClone(),D("revert"),v.eventCanceled||(Ht?R.insertBefore(h,Ht):R.appendChild(h)),U(!0);var K=Cn(e,a.draggable);if(!K||ss(t,f,this)&&!K.animated){if(K===h)return U(!1);if(K&&e===t.target&&(i=K),i&&(r=B(i)),Le(R,e,h,o,i,r,t,!!i)!==!1)return X(),K&&K.nextSibling?e.insertBefore(h,K.nextSibling):e.appendChild(h),I=e,rt(),U(!0)}else if(K&&rs(t,f,this)){var dt=zt(e,0,a,!0);if(dt===h)return U(!1);if(i=dt,r=B(i),Le(R,e,h,o,i,r,t,!1)!==!1)return X(),e.insertBefore(h,dt),I=e,rt(),U(!0)}else if(i.parentNode===e){r=B(i);var P=0,W,ht=h.parentNode!==e,G=!ts(h.animated&&h.toRect||o,i.animated&&i.toRect||r,f),we=f?"top":"left",Tt=Ii(i,"top","top")||Ii(h,"top","top"),Ee=Tt?Tt.scrollTop:void 0;qt!==i&&(W=r[we],pe=!1,Me=!G&&a.invertSwap||ht),P=as(t,i,r,f,G?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Me,qt===i);var Et;if(P!==0){var Lt=lt(h);do Lt-=P,Et=I.children[Lt];while(Et&&(b(Et,"display")==="none"||Et===w))}if(P===0||Et===i)return U(!1);qt=i,he=P;var xe=i.nextElementSibling,Pt=!1;Pt=P===1;var cn=Le(R,e,h,o,i,r,t,Pt);if(cn!==!1)return(cn===1||cn===-1)&&(Pt=cn===1),Nn=!0,setTimeout(os,30),X(),Pt&&!xe?e.appendChild(h):i.parentNode.insertBefore(h,Pt?xe:i),Tt&&Vi(Tt,0,Ee-Tt.scrollTop),I=h.parentNode,W!==void 0&&!Me&&(Ie=Math.abs(W-B(i)[we])),rt(),U(!0)}if(e.contains(h))return U(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove),S(document,"touchmove",this._onTouchMove),S(document,"pointermove",this._onTouchMove),S(document,"dragover",Vt),S(document,"mousemove",Vt),S(document,"touchmove",Vt)},_offUpEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._onDrop),S(t,"touchend",this._onDrop),S(t,"pointerup",this._onDrop),S(t,"touchcancel",this._onDrop),S(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(ot=lt(h),At=lt(h,i.draggable),tt("drop",this,{evt:t}),I=h&&h.parentNode,ot=lt(h),At=lt(h,i.draggable),v.eventCanceled){this._nulling();return}Yt=!1,Me=!1,pe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),In(this.cloneId),In(this._dragStartId),this.nativeDraggable&&(S(document,"drop",this),S(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ae&&b(document.body,"user-select",""),b(h,"transform",""),t&&(de&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(R===I||z&&z.lastPutMode!=="clone")&&N&&N.parentNode&&N.parentNode.removeChild(N),h&&(this.nativeDraggable&&S(h,"dragend",this),Mn(h),h.style["will-change"]="",de&&!Yt&&nt(h,z?z.options.ghostClass:this.options.ghostClass,!1),nt(h,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:I,newIndex:null,newDraggableIndex:null,originalEvent:t}),R!==I?(ot>=0&&(J({rootEl:I,name:"add",toEl:I,fromEl:R,originalEvent:t}),J({sortable:this,name:"remove",toEl:I,originalEvent:t}),J({rootEl:I,name:"sort",toEl:I,fromEl:R,originalEvent:t}),J({sortable:this,name:"sort",toEl:I,originalEvent:t})),z&&z.save()):ot!==Xt&&ot>=0&&(J({sortable:this,name:"update",toEl:I,originalEvent:t}),J({sortable:this,name:"sort",toEl:I,originalEvent:t})),v.active&&((ot==null||ot===-1)&&(ot=Xt,At=ce),J({sortable:this,name:"end",toEl:I,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){tt("nulling",this),R=h=I=w=Ht=N=Oe=_t=Bt=ct=de=ot=At=Xt=ce=qt=he=z=Re=v.dragged=v.ghost=v.clone=v.active=null,He.forEach(function(t){t.checked=!0}),He.length=On=Rn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),is(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,o=0,r=i.length,s=this.options;o<r;o++)e=i[o],ut(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||us(e));return t},sort:function(t,e){var i={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];ut(a,this.options.draggable,o,!1)&&(i[r]=a)},this),e&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(o.removeChild(i[r]),o.appendChild(i[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ut(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var o=ue.modifyOption(this,t,e);typeof o<"u"?i[t]=o:i[t]=e,t==="group"&&Xi(i)},destroy:function(){tt("destroy",this);var t=this.el;t[it]=null,S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart),S(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ne.splice(Ne.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_t){if(tt("hideClone",this),v.eventCanceled)return;b(N,"display","none"),this.options.removeCloneOnHide&&N.parentNode&&N.parentNode.removeChild(N),_t=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(_t){if(tt("showClone",this),v.eventCanceled)return;h.parentNode==R&&!this.options.group.revertClone?R.insertBefore(N,h):Ht?R.insertBefore(N,Ht):R.appendChild(N),this.options.group.revertClone&&this.animate(h,N),b(N,"display",""),_t=!1}}};function is(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Le(n,t,e,i,o,r,s,a){var l,u=n[it],d=u.options.onMove,c;return window.CustomEvent&&!wt&&!se?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=n,l.dragged=e,l.draggedRect=i,l.related=o||t,l.relatedRect=r||B(t),l.willInsertAfter=a,l.originalEvent=s,n.dispatchEvent(l),d&&(c=d.call(u,l,s)),c}function Mn(n){n.draggable=!1}function os(){Nn=!1}function rs(n,t,e){var i=B(zt(e.el,0,e.options,!0)),o=ki(e.el,e.options,w),r=10;return t?n.clientX<o.left-r||n.clientY<i.top&&n.clientX<i.right:n.clientY<o.top-r||n.clientY<i.bottom&&n.clientX<i.left}function ss(n,t,e){var i=B(Cn(e.el,e.options.draggable)),o=ki(e.el,e.options,w),r=10;return t?n.clientX>o.right+r||n.clientY>i.bottom&&n.clientX>i.left:n.clientY>o.bottom+r||n.clientX>i.right&&n.clientY>i.top}function as(n,t,e,i,o,r,s,a){var l=i?n.clientY:n.clientX,u=i?e.height:e.width,d=i?e.top:e.left,c=i?e.bottom:e.right,p=!1;if(!s){if(a&&Ie<u*o){if(!pe&&(he===1?l>d+u*r/2:l<c-u*r/2)&&(pe=!0),pe)p=!0;else if(he===1?l<d+Ie:l>c-Ie)return-he}else if(l>d+u*(1-o)/2&&l<c-u*(1-o)/2)return ls(t)}return p=p||s,p&&(l<d+u*r/2||l>c-u*r/2)?l>d+u/2?1:-1:0}function ls(n){return lt(h)<lt(n)?1:-1}function us(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,i=0;e--;)i+=t.charCodeAt(e);return i.toString(36)}function cs(n){He.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&He.push(i)}}function ke(n){return setTimeout(n,0)}function In(n){return clearTimeout(n)}Be&&A(document,"touchmove",function(n){(v.active||Yt)&&n.cancelable&&n.preventDefault()}),v.utils={on:A,off:S,css:b,find:Mi,is:function(t,e){return!!ut(t,e,t,!1)},extend:Xr,throttle:Bi,closest:ut,toggleClass:nt,clone:Li,index:lt,nextTick:ke,cancelNextTick:In,detectDirection:Zi,getChild:zt},v.get=function(n){return n[it]},v.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(v.utils=pt(pt({},v.utils),i.utils)),ue.mount(i)})},v.create=function(n,t){return new v(n,t)},v.version=jr;var V=[],fe,Hn,Bn=!1,Vn,Ln,Ue,ge;function ds(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(e){var i=e.originalEvent;this.sortable.nativeDraggable?A(document,"dragover",this._handleAutoScroll):this.options.supportPointer?A(document,"pointermove",this._handleFallbackAutoScroll):i.touches?A(document,"touchmove",this._handleFallbackAutoScroll):A(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):(S(document,"pointermove",this._handleFallbackAutoScroll),S(document,"touchmove",this._handleFallbackAutoScroll),S(document,"mousemove",this._handleFallbackAutoScroll)),Wi(),Fe(),Yr()},nulling:function(){Ue=Hn=fe=Bn=ge=Vn=Ln=null,V.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var o=this,r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,s);if(Ue=e,i||this.options.forceAutoScrollFallback||se||wt||ae){kn(e,this.options,a,i);var l=$t(a,!0);Bn&&(!ge||r!==Vn||s!==Ln)&&(ge&&Wi(),ge=setInterval(function(){var u=$t(document.elementFromPoint(r,s),!0);u!==l&&(l=u,Fe()),kn(e,o.options,u,i)},10),Vn=r,Ln=s)}else{if(!this.options.bubbleScroll||$t(a,!0)===ft()){Fe();return}kn(e,this.options,$t(a,!1),!1)}}},bt(n,{pluginName:"scroll",initializeByDefault:!0})}function Fe(){V.forEach(function(n){clearInterval(n.pid)}),V=[]}function Wi(){clearInterval(ge)}var kn=Bi(function(n,t,e,i){if(t.scroll){var o=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=ft(),u=!1,d;Hn!==e&&(Hn=e,Fe(),fe=t.scroll,d=t.scrollFn,fe===!0&&(fe=$t(e,!0)));var c=0,p=fe;do{var f=p,g=B(f),y=g.top,D=g.bottom,X=g.left,U=g.right,rt=g.width,K=g.height,dt=void 0,P=void 0,W=f.scrollWidth,ht=f.scrollHeight,G=b(f),we=f.scrollLeft,Tt=f.scrollTop;f===l?(dt=rt<W&&(G.overflowX==="auto"||G.overflowX==="scroll"||G.overflowX==="visible"),P=K<ht&&(G.overflowY==="auto"||G.overflowY==="scroll"||G.overflowY==="visible")):(dt=rt<W&&(G.overflowX==="auto"||G.overflowX==="scroll"),P=K<ht&&(G.overflowY==="auto"||G.overflowY==="scroll"));var Ee=dt&&(Math.abs(U-o)<=s&&we+rt<W)-(Math.abs(X-o)<=s&&!!we),Et=P&&(Math.abs(D-r)<=s&&Tt+K<ht)-(Math.abs(y-r)<=s&&!!Tt);if(!V[c])for(var Lt=0;Lt<=c;Lt++)V[Lt]||(V[Lt]={});(V[c].vx!=Ee||V[c].vy!=Et||V[c].el!==f)&&(V[c].el=f,V[c].vx=Ee,V[c].vy=Et,clearInterval(V[c].pid),(Ee!=0||Et!=0)&&(u=!0,V[c].pid=setInterval((function(){i&&this.layer===0&&v.active._onTouchMove(Ue);var xe=V[this.layer].vy?V[this.layer].vy*a:0,Pt=V[this.layer].vx?V[this.layer].vx*a:0;typeof d=="function"&&d.call(v.dragged.parentNode[it],Pt,xe,n,Ue,V[this.layer].el)!=="continue"||Vi(V[this.layer].el,Pt,xe)}).bind({layer:c}),24))),c++}while(t.bubbleScroll&&p!==l&&(p=$t(p,!1)));Bn=u}},30),Gi=function(t){var e=t.originalEvent,i=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var u=i||r;a();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(d.clientX,d.clientY);l(),u&&!u.el.contains(c)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function Un(){}Un.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=zt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Gi},bt(Un,{pluginName:"revertOnSpill"});function Fn(){}Fn.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:Gi},bt(Fn,{pluginName:"removeOnSpill"}),v.mount(new ds),v.mount(Fn,Un);const hs=n=>{const t=n.item;let e=Array.prototype.slice.call(t.parentNode.childNodes);return e=e.filter(i=>i.nodeType!=Node.ELEMENT_NODE||!i.classList.contains("sortable-fallback")),e},ps=(n,t,e,i,o,r)=>{const a=n.item.parentNode;for(const y of e)a.appendChild(y);if(n.oldIndex==n.newIndex)return;const l=i.getArray(),u=n.item.querySelector("eox-layercontrol-layer").layer.get(o),d=l.find(y=>y.get(o)===u),c=r.dataset.layer,p=l.find(y=>y.get(o)==c);let f,g;for(f=0;f<l.length;f++)if(l[f]==d){i.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?i.insertAt(g,d):i.insertAt(g+1,d);break}t.requestUpdate()};function fs(n,t,e,i){let o=[],r=null;n._sortable=v.create(n,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>o=hs(s),onMove:s=>{r=s.related},onEnd:s=>ps(s,i,o,t,e,r)})}function gs(n,t,e,i){const o=n.getArray();let r=!1;o.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),r=!0),s.get(e)||(s.set(e,`layer ${a}`),r=!0),r&&i.requestUpdate()})}function jn(n,t,e){let i=[];const o=(r,s,a)=>{i=[...i,...r.filter(u=>u.get(s)===a)];const l=r.filter(u=>u.getLayers);return l.length>0&&l.forEach(u=>o(u.getLayers().getArray(),s,a)),i};return o(n,t,e),i}function ms(n,t,e){if(!n||!t)return!1;if(!Ji(n,e))return!0;const i=n.get("minZoom"),o=n.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<o}function Ji(n,t){const e=n.get("minZoom"),i=n.get("maxZoom");return!!(t&&(e!==-1/0||i!==1/0))}function ys(n,t){var o,r,s;return!n||!t?void 0:n.getLayers?"group":((s=(o=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:o.ol_uid)==null?void 0:s.includes(n.getSource?(r=n.getSource())==null?void 0:r.ol_uid:void 0))?"draw":n.declutter_!==void 0?"vector":"raster"}function Ki(n,t){var i;let e={};for(const o in n){const r=n[o].type;if(r&&r!=="object")e[o]=r==="number"?Number(t[o]):t[o];else if(typeof n[o]=="object"&&((i=n[o])!=null&&i.properties)){const s=Ki(n[o].properties,t);Object.keys(s).length>0&&(e[o]=s)}}return e}function bs(n,t){var r;if(!t||!n.getSource().getTileUrlFunction())return null;const e=new URL(n.getSource().getTileUrlFunction()([0,0,0])),i=Object.fromEntries(e.searchParams.entries()),o=Ki(((r=t.schema)==null?void 0:r.properties)||t.schema,i);return Object.keys(o).length?o:null}const vs=(n,t)=>n==null?void 0:n.filter(e=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(e)),ws=(n,t)=>n==null?void 0:n.filter(e=>{let i=!0;return["remove","sort"].includes(e)&&(i=!1),e==="info"&&(i=t.get("description")),e==="config"&&(i=t.get("layerConfig")),i}),Es=(n,t)=>x`
|
|
45
|
+
*/function Ti(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,i)}return e}function pt(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Ti(Object(e),!0).forEach(function(i){Ur(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Ti(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function Te(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Te=function(t){return typeof t}:Te=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(n)}function Ur(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function bt(){return bt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},bt.apply(this,arguments)}function Fr(n,t){if(n==null)return{};var e={},i=Object.keys(n),o,r;for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&(e[o]=n[o]);return e}function jr(n,t){if(n==null)return{};var e=Fr(n,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}var zr="1.15.2";function vt(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var wt=vt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ae=vt(/Edge/i),Pi=vt(/firefox/i),le=vt(/safari/i)&&!vt(/chrome/i)&&!vt(/android/i),Oi=vt(/iP(ad|od|hone)/i),Ri=vt(/chrome/i)&&vt(/android/i),Di={capture:!1,passive:!1};function A(n,t,e){n.addEventListener(t,e,!wt&&Di)}function S(n,t,e){n.removeEventListener(t,e,!wt&&Di)}function Pe(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function Zr(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function ut(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Pe(n,t):Pe(n,t))||i&&n===e)return n;if(n===e)break}while(n=Zr(n))}return null}var Ni=/\s+/g;function nt(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Ni," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Ni," ")}}function b(n,t,e){var i=n&&n.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function jt(n,t){var e="";if(typeof n=="string")e=n;else do{var i=b(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function Mi(n,t,e){if(n){var i=n.getElementsByTagName(t),o=0,r=i.length;if(e)for(;o<r;o++)e(i[o],o);return i}return[]}function ft(){var n=document.scrollingElement;return n||document.documentElement}function B(n,t,e,i,o){if(!(!n.getBoundingClientRect&&n!==window)){var r,s,a,l,u,d,c;if(n!==window&&n.parentNode&&n!==ft()?(r=n.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,u=r.right,d=r.height,c=r.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,d=window.innerHeight,c=window.innerWidth),(t||e)&&n!==window&&(o=o||n.parentNode,!wt))do if(o&&o.getBoundingClientRect&&(b(o,"transform")!=="none"||e&&b(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(b(o,"border-top-width")),a-=p.left+parseInt(b(o,"border-left-width")),l=s+r.height,u=a+r.width;break}while(o=o.parentNode);if(i&&n!==window){var f=jt(o||n),g=f&&f.a,y=f&&f.d;f&&(s/=y,a/=g,c/=g,d/=y,l=s+d,u=a+c)}return{top:s,left:a,bottom:l,right:u,width:c,height:d}}}function Ii(n,t,e){for(var i=$t(n,!0),o=B(n)[t];i;){var r=B(i)[e],s=void 0;if(e==="top"||e==="left"?s=o>=r:s=o<=r,!s)return i;if(i===ft())break;i=$t(i,!1)}return!1}function zt(n,t,e,i){for(var o=0,r=0,s=n.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==v.ghost&&(i||s[r]!==v.dragged)&&ut(s[r],e.draggable,n,!1)){if(o===t)return s[r];o++}r++}return null}function Cn(n,t){for(var e=n.lastElementChild;e&&(e===v.ghost||b(e,"display")==="none"||t&&!Pe(e,t));)e=e.previousElementSibling;return e||null}function lt(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==v.clone&&(!t||Pe(n,t))&&e++;return e}function Hi(n){var t=0,e=0,i=ft();if(n)do{var o=jt(n),r=o.a,s=o.d;t+=n.scrollLeft*r,e+=n.scrollTop*s}while(n!==i&&(n=n.parentNode));return[t,e]}function Xr(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===n[e][i])return Number(e)}return-1}function $t(n,t){if(!n||!n.getBoundingClientRect)return ft();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var o=b(e);if(e.clientWidth<e.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return ft();if(i||t)return e;i=!0}}while(e=e.parentNode);return ft()}function Yr(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function Tn(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var ue;function Bi(n,t){return function(){if(!ue){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),ue=setTimeout(function(){ue=void 0},t)}}}function qr(){clearTimeout(ue),ue=void 0}function Vi(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function Li(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}function ki(n,t,e){var i={};return Array.from(n.children).forEach(function(o){var r,s,a,l;if(!(!ut(o,t.draggable,n,!1)||o.animated||o===e)){var u=B(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,u.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,u.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,u.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,u.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var it="Sortable"+new Date().getTime();function Wr(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(b(o,"display")==="none"||o===v.ghost)){n.push({target:o,rect:B(o)});var r=pt({},n[n.length-1].rect);if(o.thisAnimationDuration){var s=jt(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(Xr(n,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;n.forEach(function(a){var l=0,u=a.target,d=u.fromRect,c=B(u),p=u.prevFromRect,f=u.prevToRect,g=a.rect,y=jt(u,!0);y&&(c.top-=y.f,c.left-=y.e),u.toRect=c,u.thisAnimationDuration&&Tn(p,c)&&!Tn(d,c)&&(g.top-c.top)/(g.left-c.left)===(d.top-c.top)/(d.left-c.left)&&(l=Jr(g,p,f,o.options)),Tn(c,d)||(u.prevFromRect=d,u.prevToRect=c,l||(l=o.options.animation),o.animate(u,g,c,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),n=[]},animate:function(i,o,r,s){if(s){b(i,"transition",""),b(i,"transform","");var a=jt(this.el),l=a&&a.a,u=a&&a.d,d=(o.left-r.left)/(l||1),c=(o.top-r.top)/(u||1);i.animatingX=!!d,i.animatingY=!!c,b(i,"transform","translate3d("+d+"px,"+c+"px,0)"),this.forRepaintDummy=Gr(i),b(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),b(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){b(i,"transition",""),b(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function Gr(n){return n.offsetWidth}function Jr(n,t,e,i){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*i.animation}var Zt=[],Pn={initializeByDefault:!0},ce={mount:function(t){for(var e in Pn)Pn.hasOwnProperty(e)&&!(e in t)&&(t[e]=Pn[e]);Zt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Zt.push(t)},pluginEvent:function(t,e,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var r=t+"Global";Zt.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][r]&&e[s.pluginName][r](pt({sortable:e},i)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](pt({sortable:e},i)))})},initializePlugins:function(t,e,i,o){Zt.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var u=new a(t,e,t.options);u.sortable=t,u.options=t.options,t[l]=u,bt(i,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,e){var i={};return Zt.forEach(function(o){typeof o.eventProperties=="function"&&bt(i,o.eventProperties.call(e[o.pluginName],t))}),i},modifyOption:function(t,e,i){var o;return Zt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(o=r.optionListeners[e].call(t[r.pluginName],i))}),o}};function Kr(n){var t=n.sortable,e=n.rootEl,i=n.name,o=n.targetEl,r=n.cloneEl,s=n.toEl,a=n.fromEl,l=n.oldIndex,u=n.newIndex,d=n.oldDraggableIndex,c=n.newDraggableIndex,p=n.originalEvent,f=n.putSortable,g=n.extraEventProperties;if(t=t||e&&e[it],!!t){var y,D=t.options,X="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!wt&&!ae?y=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(i,!0,!0)),y.to=s||e,y.from=a||e,y.item=o||e,y.clone=r,y.oldIndex=l,y.newIndex=u,y.oldDraggableIndex=d,y.newDraggableIndex=c,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var U=pt(pt({},g),ce.getEventProperties(i,t));for(var rt in U)y[rt]=U[rt];e&&e.dispatchEvent(y),D[X]&&D[X].call(t,y)}}var Qr=["evt"],tt=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=jr(i,Qr);ce.pluginEvent.bind(v)(t,e,pt({dragEl:h,parentEl:I,ghostEl:w,rootEl:R,nextEl:Ht,lastDownEl:Oe,cloneEl:M,cloneHidden:_t,dragStarted:he,putSortable:z,activeSortable:v.active,originalEvent:o,oldIndex:Xt,oldDraggableIndex:de,newIndex:ot,newDraggableIndex:At,hideGhostForTarget:Yi,unhideGhostForTarget:qi,cloneNowHidden:function(){_t=!0},cloneNowShown:function(){_t=!1},dispatchSortableEvent:function(a){J({sortable:e,name:a,originalEvent:o})}},r))};function J(n){Kr(pt({putSortable:z,cloneEl:M,targetEl:h,rootEl:R,oldIndex:Xt,oldDraggableIndex:de,newIndex:ot,newDraggableIndex:At},n))}var h,I,w,R,Ht,Oe,M,_t,Xt,ot,de,At,Re,z,Yt=!1,De=!1,Ne=[],Bt,ct,On,Rn,Ui,Fi,he,qt,pe,fe=!1,Me=!1,Ie,q,Dn=[],Nn=!1,He=[],Be=typeof document<"u",Ve=Oi,ji=ae||wt?"cssFloat":"float",ts=Be&&!Ri&&!Oi&&"draggable"in document.createElement("div"),zi=function(){if(Be){if(wt)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Zi=function(t,e){var i=b(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=zt(t,0,e),s=zt(t,1,e),a=r&&b(r),l=s&&b(s),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+B(r).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+B(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var c=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===c)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&i[ji]==="none"||s&&i[ji]==="none"&&u+d>o)?"vertical":"horizontal"},es=function(t,e,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,a=i?e.left:e.top,l=i?e.right:e.bottom,u=i?e.width:e.height;return o===a||r===l||o+s/2===a+u/2},ns=function(t,e){var i;return Ne.some(function(o){var r=o[it].options.emptyInsertThreshold;if(!(!r||Cn(o))){var s=B(o),a=t>=s.left-r&&t<=s.right+r,l=e>=s.top-r&&e<=s.bottom+r;if(a&&l)return i=o}}),i},Xi=function(t){function e(r,s){return function(a,l,u,d){var c=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||c))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(a,l,u,d),s)(a,l,u,d);var p=(s?a:l).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},o=t.group;(!o||Te(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=e(o.pull,!0),i.checkPut=e(o.put),i.revertClone=o.revertClone,t.group=i},Yi=function(){!zi&&w&&b(w,"display","none")},qi=function(){!zi&&w&&b(w,"display","")};Be&&!Ri&&document.addEventListener("click",function(n){if(De)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),De=!1,!1},!0);var Vt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=ns(t.clientX,t.clientY);if(e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[it]._onDragOver(i)}}},is=function(t){h&&h.parentNode[it]._isOutsideThisEl(t.target)};function v(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=bt({},t),n[it]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Zi(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:v.supportPointer!==!1&&"PointerEvent"in window&&!le,emptyInsertThreshold:5};ce.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Xi(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:ts,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?A(n,"pointerdown",this._onTapStart):(A(n,"mousedown",this._onTapStart),A(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(A(n,"dragover",this),A(n,"dragenter",this)),Ne.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bt(this,Wr())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(qt=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,o=this.options,r=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=o.filter;if(ds(i),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&le&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ut(l,o.draggable,i,!1),!(l&&l.animated)&&Oe!==l)){if(Xt=lt(l),de=lt(l,o.draggable),typeof d=="function"){if(d.call(this,t,l,this)){J({sortable:e,rootEl:u,name:"filter",targetEl:l,toEl:i,fromEl:i}),tt("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(c){if(c=ut(u,c.trim(),i,!1),c)return J({sortable:e,rootEl:c,name:"filter",targetEl:l,fromEl:i,toEl:i}),tt("filter",e,{evt:t}),!0}),d)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!ut(u,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,i){var o=this,r=o.el,s=o.options,a=r.ownerDocument,l;if(i&&!h&&i.parentNode===r){var u=B(i);if(R=r,h=i,I=h.parentNode,Ht=h.nextSibling,Oe=i,Re=s.group,v.dragged=h,Bt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},Ui=Bt.clientX-u.left,Fi=Bt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",l=function(){if(tt("delayEnded",o,{evt:t}),v.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Pi&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,e),J({sortable:o,name:"choose",originalEvent:t}),nt(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(d){Mi(h,d.trim(),Mn)}),A(a,"dragover",Vt),A(a,"mousemove",Vt),A(a,"touchmove",Vt),A(a,"mouseup",o._onDrop),A(a,"touchend",o._onDrop),A(a,"touchcancel",o._onDrop),Pi&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),tt("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(ae||wt))){if(v.eventCanceled){this._onDrop();return}A(a,"mouseup",o._disableDelayedDrag),A(a,"touchend",o._disableDelayedDrag),A(a,"touchcancel",o._disableDelayedDrag),A(a,"mousemove",o._delayedDragTouchMoveHandler),A(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&A(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Mn(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._disableDelayedDrag),S(t,"touchend",this._disableDelayedDrag),S(t,"touchcancel",this._disableDelayedDrag),S(t,"mousemove",this._delayedDragTouchMoveHandler),S(t,"touchmove",this._delayedDragTouchMoveHandler),S(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?A(document,"pointermove",this._onTouchMove):e?A(document,"touchmove",this._onTouchMove):A(document,"mousemove",this._onTouchMove):(A(h,"dragend",this),A(R,"dragstart",this._onDragStart));try{document.selection?ke(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Yt=!1,R&&h){tt("dragStarted",this,{evt:e}),this.nativeDraggable&&A(document,"dragover",is);var i=this.options;!t&&nt(h,i.dragClass,!1),nt(h,i.ghostClass,!0),v.active=this,t&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ct){this._lastX=ct.clientX,this._lastY=ct.clientY,Yi();for(var t=document.elementFromPoint(ct.clientX,ct.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ct.clientX,ct.clientY),t!==e);)e=t;if(h.parentNode[it]._isOutsideThisEl(t),e)do{if(e[it]){var i=void 0;if(i=e[it]._onDragOver({clientX:ct.clientX,clientY:ct.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);qi()}},_onTouchMove:function(t){if(Bt){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=w&&jt(w,!0),a=w&&s&&s.a,l=w&&s&&s.d,u=Ve&&q&&Hi(q),d=(r.clientX-Bt.clientX+o.x)/(a||1)+(u?u[0]-Dn[0]:0)/(a||1),c=(r.clientY-Bt.clientY+o.y)/(l||1)+(u?u[1]-Dn[1]:0)/(l||1);if(!v.active&&!Yt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(w){s?(s.e+=d-(On||0),s.f+=c-(Rn||0)):s={a:1,b:0,c:0,d:1,e:d,f:c};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");b(w,"webkitTransform",p),b(w,"mozTransform",p),b(w,"msTransform",p),b(w,"transform",p),On=d,Rn=c,ct=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!w){var t=this.options.fallbackOnBody?document.body:R,e=B(h,!0,Ve,!0,t),i=this.options;if(Ve){for(q=t;b(q,"position")==="static"&&b(q,"transform")==="none"&&q!==document;)q=q.parentNode;q!==document.body&&q!==document.documentElement?(q===document&&(q=ft()),e.top+=q.scrollTop,e.left+=q.scrollLeft):q=ft(),Dn=Hi(q)}w=h.cloneNode(!0),nt(w,i.ghostClass,!1),nt(w,i.fallbackClass,!0),nt(w,i.dragClass,!0),b(w,"transition",""),b(w,"transform",""),b(w,"box-sizing","border-box"),b(w,"margin",0),b(w,"top",e.top),b(w,"left",e.left),b(w,"width",e.width),b(w,"height",e.height),b(w,"opacity","0.8"),b(w,"position",Ve?"absolute":"fixed"),b(w,"zIndex","100000"),b(w,"pointerEvents","none"),v.ghost=w,t.appendChild(w),b(w,"transform-origin",Ui/parseInt(w.style.width)*100+"% "+Fi/parseInt(w.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,o=t.dataTransfer,r=i.options;if(tt("dragStart",this,{evt:t}),v.eventCanceled){this._onDrop();return}tt("setupClone",this),v.eventCanceled||(M=Li(h),M.removeAttribute("id"),M.draggable=!1,M.style["will-change"]="",this._hideClone(),nt(M,this.options.chosenClass,!1),v.clone=M),i.cloneId=ke(function(){tt("clone",i),!v.eventCanceled&&(i.options.removeCloneOnHide||R.insertBefore(M,h),i._hideClone(),J({sortable:i,name:"clone"}))}),!e&&nt(h,r.dragClass,!0),e?(De=!0,i._loopId=setInterval(i._emulateDragOver,50)):(S(document,"mouseup",i._onDrop),S(document,"touchend",i._onDrop),S(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(i,o,h)),A(document,"drop",i),b(h,"transform","translateZ(0)")),Yt=!0,i._dragStartId=ke(i._dragStarted.bind(i,e,t)),A(document,"selectstart",i),he=!0,le&&b(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,o,r,s,a=this.options,l=a.group,u=v.active,d=Re===l,c=a.sort,p=z||u,f,g=this,y=!1;if(Nn)return;function D(Se,la){tt(Se,g,pt({evt:t,isOwner:d,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:c,fromSortable:p,target:i,completed:U,onMove:function(yo,ua){return Le(R,e,h,o,yo,B(yo),t,ua)},changed:rt},la))}function X(){D("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function U(Se){return D("dragOverCompleted",{insertion:Se}),Se&&(d?u._hideClone():u._showClone(g),g!==p&&(nt(h,z?z.options.ghostClass:u.options.ghostClass,!1),nt(h,a.ghostClass,!0)),z!==g&&g!==v.active?z=g:g===v.active&&z&&(z=null),p===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){D("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(qt=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[it]._isOutsideThisEl(t.target),!Se&&Vt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function rt(){ot=lt(h),At=lt(h,a.draggable),J({sortable:g,name:"change",toEl:e,newIndex:ot,newDraggableIndex:At,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=ut(i,a.draggable,e,!0),D("dragOver"),v.eventCanceled)return y;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return U(!1);if(De=!1,u&&!a.disabled&&(d?c||(s=I!==R):z===this||(this.lastPutMode=Re.checkPull(this,u,h,t))&&l.checkPut(this,u,h,t))){if(f=this._getDirection(t,i)==="vertical",o=B(h),D("dragOverValid"),v.eventCanceled)return y;if(s)return I=R,X(),this._hideClone(),D("revert"),v.eventCanceled||(Ht?R.insertBefore(h,Ht):R.appendChild(h)),U(!0);var K=Cn(e,a.draggable);if(!K||as(t,f,this)&&!K.animated){if(K===h)return U(!1);if(K&&e===t.target&&(i=K),i&&(r=B(i)),Le(R,e,h,o,i,r,t,!!i)!==!1)return X(),K&&K.nextSibling?e.insertBefore(h,K.nextSibling):e.appendChild(h),I=e,rt(),U(!0)}else if(K&&ss(t,f,this)){var dt=zt(e,0,a,!0);if(dt===h)return U(!1);if(i=dt,r=B(i),Le(R,e,h,o,i,r,t,!1)!==!1)return X(),e.insertBefore(h,dt),I=e,rt(),U(!0)}else if(i.parentNode===e){r=B(i);var P=0,W,ht=h.parentNode!==e,G=!es(h.animated&&h.toRect||o,i.animated&&i.toRect||r,f),we=f?"top":"left",Tt=Ii(i,"top","top")||Ii(h,"top","top"),Ee=Tt?Tt.scrollTop:void 0;qt!==i&&(W=r[we],fe=!1,Me=!G&&a.invertSwap||ht),P=ls(t,i,r,f,G?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Me,qt===i);var Et;if(P!==0){var Lt=lt(h);do Lt-=P,Et=I.children[Lt];while(Et&&(b(Et,"display")==="none"||Et===w))}if(P===0||Et===i)return U(!1);qt=i,pe=P;var xe=i.nextElementSibling,Pt=!1;Pt=P===1;var cn=Le(R,e,h,o,i,r,t,Pt);if(cn!==!1)return(cn===1||cn===-1)&&(Pt=cn===1),Nn=!0,setTimeout(rs,30),X(),Pt&&!xe?e.appendChild(h):i.parentNode.insertBefore(h,Pt?xe:i),Tt&&Vi(Tt,0,Ee-Tt.scrollTop),I=h.parentNode,W!==void 0&&!Me&&(Ie=Math.abs(W-B(i)[we])),rt(),U(!0)}if(e.contains(h))return U(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove),S(document,"touchmove",this._onTouchMove),S(document,"pointermove",this._onTouchMove),S(document,"dragover",Vt),S(document,"mousemove",Vt),S(document,"touchmove",Vt)},_offUpEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._onDrop),S(t,"touchend",this._onDrop),S(t,"pointerup",this._onDrop),S(t,"touchcancel",this._onDrop),S(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(ot=lt(h),At=lt(h,i.draggable),tt("drop",this,{evt:t}),I=h&&h.parentNode,ot=lt(h),At=lt(h,i.draggable),v.eventCanceled){this._nulling();return}Yt=!1,Me=!1,fe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),In(this.cloneId),In(this._dragStartId),this.nativeDraggable&&(S(document,"drop",this),S(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),le&&b(document.body,"user-select",""),b(h,"transform",""),t&&(he&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(R===I||z&&z.lastPutMode!=="clone")&&M&&M.parentNode&&M.parentNode.removeChild(M),h&&(this.nativeDraggable&&S(h,"dragend",this),Mn(h),h.style["will-change"]="",he&&!Yt&&nt(h,z?z.options.ghostClass:this.options.ghostClass,!1),nt(h,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:I,newIndex:null,newDraggableIndex:null,originalEvent:t}),R!==I?(ot>=0&&(J({rootEl:I,name:"add",toEl:I,fromEl:R,originalEvent:t}),J({sortable:this,name:"remove",toEl:I,originalEvent:t}),J({rootEl:I,name:"sort",toEl:I,fromEl:R,originalEvent:t}),J({sortable:this,name:"sort",toEl:I,originalEvent:t})),z&&z.save()):ot!==Xt&&ot>=0&&(J({sortable:this,name:"update",toEl:I,originalEvent:t}),J({sortable:this,name:"sort",toEl:I,originalEvent:t})),v.active&&((ot==null||ot===-1)&&(ot=Xt,At=de),J({sortable:this,name:"end",toEl:I,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){tt("nulling",this),R=h=I=w=Ht=M=Oe=_t=Bt=ct=he=ot=At=Xt=de=qt=pe=z=Re=v.dragged=v.ghost=v.clone=v.active=null,He.forEach(function(t){t.checked=!0}),He.length=On=Rn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),os(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,o=0,r=i.length,s=this.options;o<r;o++)e=i[o],ut(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||cs(e));return t},sort:function(t,e){var i={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];ut(a,this.options.draggable,o,!1)&&(i[r]=a)},this),e&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(o.removeChild(i[r]),o.appendChild(i[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ut(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var o=ce.modifyOption(this,t,e);typeof o<"u"?i[t]=o:i[t]=e,t==="group"&&Xi(i)},destroy:function(){tt("destroy",this);var t=this.el;t[it]=null,S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart),S(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ne.splice(Ne.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_t){if(tt("hideClone",this),v.eventCanceled)return;b(M,"display","none"),this.options.removeCloneOnHide&&M.parentNode&&M.parentNode.removeChild(M),_t=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(_t){if(tt("showClone",this),v.eventCanceled)return;h.parentNode==R&&!this.options.group.revertClone?R.insertBefore(M,h):Ht?R.insertBefore(M,Ht):R.appendChild(M),this.options.group.revertClone&&this.animate(h,M),b(M,"display",""),_t=!1}}};function os(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Le(n,t,e,i,o,r,s,a){var l,u=n[it],d=u.options.onMove,c;return window.CustomEvent&&!wt&&!ae?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=n,l.dragged=e,l.draggedRect=i,l.related=o||t,l.relatedRect=r||B(t),l.willInsertAfter=a,l.originalEvent=s,n.dispatchEvent(l),d&&(c=d.call(u,l,s)),c}function Mn(n){n.draggable=!1}function rs(){Nn=!1}function ss(n,t,e){var i=B(zt(e.el,0,e.options,!0)),o=ki(e.el,e.options,w),r=10;return t?n.clientX<o.left-r||n.clientY<i.top&&n.clientX<i.right:n.clientY<o.top-r||n.clientY<i.bottom&&n.clientX<i.left}function as(n,t,e){var i=B(Cn(e.el,e.options.draggable)),o=ki(e.el,e.options,w),r=10;return t?n.clientX>o.right+r||n.clientY>i.bottom&&n.clientX>i.left:n.clientY>o.bottom+r||n.clientX>i.right&&n.clientY>i.top}function ls(n,t,e,i,o,r,s,a){var l=i?n.clientY:n.clientX,u=i?e.height:e.width,d=i?e.top:e.left,c=i?e.bottom:e.right,p=!1;if(!s){if(a&&Ie<u*o){if(!fe&&(pe===1?l>d+u*r/2:l<c-u*r/2)&&(fe=!0),fe)p=!0;else if(pe===1?l<d+Ie:l>c-Ie)return-pe}else if(l>d+u*(1-o)/2&&l<c-u*(1-o)/2)return us(t)}return p=p||s,p&&(l<d+u*r/2||l>c-u*r/2)?l>d+u/2?1:-1:0}function us(n){return lt(h)<lt(n)?1:-1}function cs(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,i=0;e--;)i+=t.charCodeAt(e);return i.toString(36)}function ds(n){He.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&He.push(i)}}function ke(n){return setTimeout(n,0)}function In(n){return clearTimeout(n)}Be&&A(document,"touchmove",function(n){(v.active||Yt)&&n.cancelable&&n.preventDefault()}),v.utils={on:A,off:S,css:b,find:Mi,is:function(t,e){return!!ut(t,e,t,!1)},extend:Yr,throttle:Bi,closest:ut,toggleClass:nt,clone:Li,index:lt,nextTick:ke,cancelNextTick:In,detectDirection:Zi,getChild:zt},v.get=function(n){return n[it]},v.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(v.utils=pt(pt({},v.utils),i.utils)),ce.mount(i)})},v.create=function(n,t){return new v(n,t)},v.version=zr;var V=[],ge,Hn,Bn=!1,Vn,Ln,Ue,me;function hs(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(e){var i=e.originalEvent;this.sortable.nativeDraggable?A(document,"dragover",this._handleAutoScroll):this.options.supportPointer?A(document,"pointermove",this._handleFallbackAutoScroll):i.touches?A(document,"touchmove",this._handleFallbackAutoScroll):A(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):(S(document,"pointermove",this._handleFallbackAutoScroll),S(document,"touchmove",this._handleFallbackAutoScroll),S(document,"mousemove",this._handleFallbackAutoScroll)),Wi(),Fe(),qr()},nulling:function(){Ue=Hn=ge=Bn=me=Vn=Ln=null,V.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var o=this,r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,s);if(Ue=e,i||this.options.forceAutoScrollFallback||ae||wt||le){kn(e,this.options,a,i);var l=$t(a,!0);Bn&&(!me||r!==Vn||s!==Ln)&&(me&&Wi(),me=setInterval(function(){var u=$t(document.elementFromPoint(r,s),!0);u!==l&&(l=u,Fe()),kn(e,o.options,u,i)},10),Vn=r,Ln=s)}else{if(!this.options.bubbleScroll||$t(a,!0)===ft()){Fe();return}kn(e,this.options,$t(a,!1),!1)}}},bt(n,{pluginName:"scroll",initializeByDefault:!0})}function Fe(){V.forEach(function(n){clearInterval(n.pid)}),V=[]}function Wi(){clearInterval(me)}var kn=Bi(function(n,t,e,i){if(t.scroll){var o=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=ft(),u=!1,d;Hn!==e&&(Hn=e,Fe(),ge=t.scroll,d=t.scrollFn,ge===!0&&(ge=$t(e,!0)));var c=0,p=ge;do{var f=p,g=B(f),y=g.top,D=g.bottom,X=g.left,U=g.right,rt=g.width,K=g.height,dt=void 0,P=void 0,W=f.scrollWidth,ht=f.scrollHeight,G=b(f),we=f.scrollLeft,Tt=f.scrollTop;f===l?(dt=rt<W&&(G.overflowX==="auto"||G.overflowX==="scroll"||G.overflowX==="visible"),P=K<ht&&(G.overflowY==="auto"||G.overflowY==="scroll"||G.overflowY==="visible")):(dt=rt<W&&(G.overflowX==="auto"||G.overflowX==="scroll"),P=K<ht&&(G.overflowY==="auto"||G.overflowY==="scroll"));var Ee=dt&&(Math.abs(U-o)<=s&&we+rt<W)-(Math.abs(X-o)<=s&&!!we),Et=P&&(Math.abs(D-r)<=s&&Tt+K<ht)-(Math.abs(y-r)<=s&&!!Tt);if(!V[c])for(var Lt=0;Lt<=c;Lt++)V[Lt]||(V[Lt]={});(V[c].vx!=Ee||V[c].vy!=Et||V[c].el!==f)&&(V[c].el=f,V[c].vx=Ee,V[c].vy=Et,clearInterval(V[c].pid),(Ee!=0||Et!=0)&&(u=!0,V[c].pid=setInterval((function(){i&&this.layer===0&&v.active._onTouchMove(Ue);var xe=V[this.layer].vy?V[this.layer].vy*a:0,Pt=V[this.layer].vx?V[this.layer].vx*a:0;typeof d=="function"&&d.call(v.dragged.parentNode[it],Pt,xe,n,Ue,V[this.layer].el)!=="continue"||Vi(V[this.layer].el,Pt,xe)}).bind({layer:c}),24))),c++}while(t.bubbleScroll&&p!==l&&(p=$t(p,!1)));Bn=u}},30),Gi=function(t){var e=t.originalEvent,i=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var u=i||r;a();var d=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(d.clientX,d.clientY);l(),u&&!u.el.contains(c)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function Un(){}Un.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=zt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Gi},bt(Un,{pluginName:"revertOnSpill"});function Fn(){}Fn.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:Gi},bt(Fn,{pluginName:"removeOnSpill"}),v.mount(new hs),v.mount(Fn,Un);const ps=n=>{const t=n.item;let e=Array.prototype.slice.call(t.parentNode.childNodes);return e=e.filter(i=>i.nodeType!=Node.ELEMENT_NODE||!i.classList.contains("sortable-fallback")),e},fs=(n,t,e,i,o,r)=>{const a=n.item.parentNode;for(const y of e)a.appendChild(y);if(n.oldIndex==n.newIndex)return;const l=i.getArray(),u=n.item.querySelector("eox-layercontrol-layer").layer.get(o),d=l.find(y=>y.get(o)===u),c=r.dataset.layer,p=l.find(y=>y.get(o)==c);let f,g;for(f=0;f<l.length;f++)if(l[f]==d){i.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?i.insertAt(g,d):i.insertAt(g+1,d);break}t.requestUpdate()};function gs(n,t,e,i){let o=[],r=null;n._sortable=v.create(n,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>o=ps(s),onMove:s=>{r=s.related},onEnd:s=>fs(s,i,o,t,e,r)})}function ms(n,t,e,i){const o=n.getArray();let r=!1;o.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),r=!0),s.get(e)||(s.set(e,`layer ${a}`),r=!0),r&&i.requestUpdate()})}function jn(n,t,e){let i=[];const o=(r,s,a)=>{i=[...i,...r.filter(u=>u.get(s)===a)];const l=r.filter(u=>u.getLayers);return l.length>0&&l.forEach(u=>o(u.getLayers().getArray(),s,a)),i};return o(n,t,e),i}function ys(n,t,e){if(!n||!t)return!1;if(!Ji(n,e))return!0;const i=n.get("minZoom"),o=n.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<o}function Ji(n,t){const e=n.get("minZoom"),i=n.get("maxZoom");return!!(t&&(e!==-1/0||i!==1/0))}function bs(n,t){var o,r,s;return!n||!t?void 0:n.getLayers?"group":((s=(o=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:o.ol_uid)==null?void 0:s.includes(n.getSource?(r=n.getSource())==null?void 0:r.ol_uid:void 0))?"draw":n.declutter_!==void 0?"vector":"raster"}function Ki(n,t){var i;let e={};for(const o in n){const r=n[o].type;if(r&&r!=="object")e[o]=r==="number"?Number(t[o]):t[o];else if(typeof n[o]=="object"&&((i=n[o])!=null&&i.properties)){const s=Ki(n[o].properties,t);Object.keys(s).length>0&&(e[o]=s)}}return e}function vs(n,t){var r,s,a,l,u;if(!t)return null;let e={},i=n.get("type")==="WebGLTile"?(r=n.style_)==null?void 0:r.variables:(s=n.get("styles"))==null?void 0:s.variables;if(t.type==="style"&&i)e=i;else if((l=(a=n.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const d=new URL(n.getSource().getTileUrlFunction()([0,0,0]));e=Object.fromEntries(d.searchParams.entries())}else return null;const o=Ki(((u=t.schema)==null?void 0:u.properties)||t.schema,e);return Object.keys(o).length?o:null}const ws=(n,t)=>n==null?void 0:n.filter(e=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(e)),Es=(n,t)=>n==null?void 0:n.filter(e=>{let i=!0;return["remove","sort"].includes(e)&&(i=!1),e==="info"&&(i=t.get("description")),e==="config"&&(i=t.get("layerConfig")),i}),xs=(n,t)=>x`
|
|
46
46
|
<button slot="${n}-icon" class="icon">${t?n:T}</button>
|
|
47
|
-
`,
|
|
47
|
+
`,Ss=n=>x`
|
|
48
48
|
<button
|
|
49
49
|
class="remove-icon icon"
|
|
50
50
|
@click=${()=>{const{layer:t}=n;t==null||t.set("layerControlOptional",!0),t==null||t.setVisible(!1),n.dispatchEvent(new CustomEvent("changed",{detail:t,bubbles:!0}))}}
|
|
51
51
|
>
|
|
52
52
|
${n.unstyled?"x":T}
|
|
53
53
|
</button>
|
|
54
|
-
|
|
54
|
+
`,$s=n=>x`
|
|
55
55
|
<span class="button sort-icon icon drag-handle">
|
|
56
56
|
${n?"═":T}
|
|
57
57
|
</span>
|
|
@@ -59,29 +59,29 @@
|
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2020 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
-
*/const to=wn(class extends En{constructor(n){if(super(n),n.type!==St.PROPERTY&&n.type!==St.ATTRIBUTE&&n.type!==St.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!
|
|
62
|
+
*/const to=wn(class extends En{constructor(n){if(super(n),n.type!==St.PROPERTY&&n.type!==St.ATTRIBUTE&&n.type!==St.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Fo(n))throw Error("`live` bindings can only contain a single expression")}render(n){return n}update(n,[t]){if(t===st||t===T)return t;const e=n.element,i=n.name;if(n.type===St.PROPERTY){if(t===e[i])return st}else if(n.type===St.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return st}else if(n.type===St.ATTRIBUTE&&e.getAttribute(i)===t+"")return st;return bi(n),t}});/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/class zn extends En{constructor(t){if(super(t),this.it=T,t.type!==St.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===T||t==null)return this._t=void 0,this.it=t;if(t===st)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}zn.directiveName="unsafeHTML",zn.resultType=1;const
|
|
66
|
+
*/class zn extends En{constructor(t){if(super(t),this.it=T,t.type!==St.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===T||t==null)return this._t=void 0,this.it=t;if(t===st)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}zn.directiveName="unsafeHTML",zn.resultType=1;const _s=wn(zn);/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/function*je(n,t){if(n!==void 0){let e=0;for(const i of n)yield t(i,e++)}}const
|
|
70
|
+
*/function*je(n,t){if(n!==void 0){let e=0;for(const i of n)yield t(i,e++)}}const As=(n,t,e)=>{let i=t;return e.layer.getSource().getTileUrlFunction()&&(i||(i=e.layer.getSource().getTileUrlFunction()),e.layer.getSource().setTileUrlFunction((...o)=>kr(i(...o),n)),e.layer.getSource().setKey(new Date)),i};function Cs(n,t){const e=t.get("type")==="WebGLTile"?t.style_:t.get("styles");let i=e==null?void 0:e.variables;if(i){const o=eo(n);if(e.variables={...i,...o},t.get("type")==="Vector"){const r=Ts(e);t.setStyle(r)}else t.get("type")==="WebGLTile"&&t.updateStyleVariables(o)}}const eo=n=>{const t={};for(const e in n)if(typeof n[e]=="object"&&n[e]!==null){const i=eo(n[e]);for(const o in i)t[o]=i==null?void 0:i[o]}else t[e]=n==null?void 0:n[e];return t};function Ts(n){let t=n;if("variables"in n){let e=JSON.stringify(n);const{variables:i}=n;for(const o in i)typeof i[o]=="number"?e=e.replaceAll(`["var","${o}"]`,i[o]):e=e.replaceAll(`["var","${o}"]`,`"${i[o]}"`);t=JSON.parse(e)}return t}var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ps(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Os="Expected a function",no=NaN,Rs="[object Symbol]",Ds=/^\s+|\s+$/g,Ns=/^[-+]0x[0-9a-f]+$/i,Ms=/^0b[01]+$/i,Is=/^0o[0-7]+$/i,Hs=parseInt,Bs=typeof ze=="object"&&ze&&ze.Object===Object&&ze,Vs=typeof self=="object"&&self&&self.Object===Object&&self,Ls=Bs||Vs||Function("return this")(),ks=Object.prototype,Us=ks.toString,Fs=Math.max,js=Math.min,Zn=function(){return Ls.Date.now()};function zs(n,t,e){var i,o,r,s,a,l,u=0,d=!1,c=!1,p=!0;if(typeof n!="function")throw new TypeError(Os);t=io(t)||0,Xn(e)&&(d=!!e.leading,c="maxWait"in e,r=c?Fs(io(e.maxWait)||0,t):r,p="trailing"in e?!!e.trailing:p);function f(P){var W=i,ht=o;return i=o=void 0,u=P,s=n.apply(ht,W),s}function g(P){return u=P,a=setTimeout(X,t),d?f(P):s}function y(P){var W=P-l,ht=P-u,G=t-W;return c?js(G,r-ht):G}function D(P){var W=P-l,ht=P-u;return l===void 0||W>=t||W<0||c&&ht>=r}function X(){var P=Zn();if(D(P))return U(P);a=setTimeout(X,y(P))}function U(P){return a=void 0,p&&i?f(P):(i=o=void 0,s)}function rt(){a!==void 0&&clearTimeout(a),u=0,i=l=o=a=void 0}function K(){return a===void 0?s:U(Zn())}function dt(){var P=Zn(),W=D(P);if(i=arguments,o=this,l=P,W){if(a===void 0)return g(l);if(c)return a=setTimeout(X,t),f(l)}return a===void 0&&(a=setTimeout(X,t)),s}return dt.cancel=rt,dt.flush=K,dt}function Xn(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Zs(n){return!!n&&typeof n=="object"}function Xs(n){return typeof n=="symbol"||Zs(n)&&Us.call(n)==Rs}function io(n){if(typeof n=="number")return n;if(Xs(n))return no;if(Xn(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Xn(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(Ds,"");var e=Ms.test(n);return e||Is.test(n)?Hs(n.slice(2),e?2:8):Ns.test(n)?no:+n}var Ys=zs;const oo=Ps(Ys);class ro extends et{constructor(){super();O(this,Ze);O(this,Wt,{});O(this,ye,null);O(this,be);O(this,Xe,"");O(this,Ye,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.debouncedDataChange=oo(Y(this,Ze,vo),1e3,{leading:!0})}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){$e(this,ye,vs(this.layer,this.layerConfig)),customElements.get("eox-jsonform")||console.error("Please import @eox/jsonform in order to use layerconfig");const e={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return x`
|
|
71
71
|
<style>
|
|
72
|
-
${
|
|
73
|
-
${!this.unstyled&&
|
|
72
|
+
${N(this,Xe)}
|
|
73
|
+
${!this.unstyled&&N(this,Ye)}
|
|
74
74
|
</style>
|
|
75
75
|
${at(this.layerConfig,()=>x`
|
|
76
76
|
<!-- Render a JSON form for layer configuration -->
|
|
77
77
|
<eox-jsonform
|
|
78
78
|
.schema=${this.layerConfig.schema}
|
|
79
|
-
.value=${
|
|
79
|
+
.value=${N(this,ye)}
|
|
80
80
|
.options=${e}
|
|
81
81
|
@change=${this.debouncedDataChange}
|
|
82
82
|
></eox-jsonform>
|
|
83
83
|
`)}
|
|
84
|
-
`}}
|
|
84
|
+
`}}Wt=new WeakMap,ye=new WeakMap,be=new WeakMap,Ze=new WeakSet,vo=function(e){$e(this,Wt,e.detail),this.layerConfig.type==="style"?["Vector","WebGLTile"].includes(this.layer.get("type"))?Cs(N(this,Wt),this.layer):console.error(`Layer type ${this.layer.get("type")} does not support styles configuration`):($e(this,be,As(N(this,Wt),N(this,be),this)),this.requestUpdate())},Xe=new WeakMap,Ye=new WeakMap,L(ro,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",ro);class so extends et{constructor(){super();O(this,ve,e=>this.selectedTab===e&&"highlighted");O(this,qe,`
|
|
85
85
|
.tabbed figure {
|
|
86
86
|
margin: 0;
|
|
87
87
|
}
|
|
@@ -124,8 +124,8 @@
|
|
|
124
124
|
}
|
|
125
125
|
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.tabs,i=this.actions,o=i.length+e.length>1;return x`
|
|
126
126
|
<style>
|
|
127
|
-
${
|
|
128
|
-
${!this.unstyled&&
|
|
127
|
+
${N(this,qe)}
|
|
128
|
+
${!this.unstyled&&N(this,We)}
|
|
129
129
|
</style>
|
|
130
130
|
<div class="tabbed">
|
|
131
131
|
<!-- Navigation for tabs and actions -->
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
<!-- Labels for tabs -->
|
|
136
136
|
${je(e,(r,s)=>x`
|
|
137
137
|
<label
|
|
138
|
-
class=${
|
|
138
|
+
class=${N(this,ve).call(this,s)}
|
|
139
139
|
@click=${()=>this.selectedTab=s}
|
|
140
140
|
>
|
|
141
141
|
<!-- Customizable icon for each tab -->
|
|
@@ -157,14 +157,14 @@
|
|
|
157
157
|
<figure>
|
|
158
158
|
<!-- Content for each tab -->
|
|
159
159
|
${je(e,(r,s)=>x`
|
|
160
|
-
<div class="tab ${
|
|
160
|
+
<div class="tab ${N(this,ve).call(this,s)}">
|
|
161
161
|
<!-- Content slot for each tab -->
|
|
162
162
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
163
163
|
</div>
|
|
164
164
|
`)}
|
|
165
165
|
</figure>
|
|
166
166
|
</div>
|
|
167
|
-
`}}ve=new WeakMap,qe=new WeakMap,We=new WeakMap,L(
|
|
167
|
+
`}}ve=new WeakMap,qe=new WeakMap,We=new WeakMap,L(so,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",so);const qs=`
|
|
168
168
|
button,
|
|
169
169
|
.button {
|
|
170
170
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -288,7 +288,7 @@ button.smallest.icon::before {
|
|
|
288
288
|
width: 16px;
|
|
289
289
|
padding: 0px;
|
|
290
290
|
}
|
|
291
|
-
`,
|
|
291
|
+
`,Ws=`
|
|
292
292
|
input[type=radio] {
|
|
293
293
|
appearance: none;
|
|
294
294
|
-webkit-appearance: none;
|
|
@@ -316,7 +316,7 @@ input[type=radio]:checked:after {
|
|
|
316
316
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
317
317
|
|
|
318
318
|
}
|
|
319
|
-
`,
|
|
319
|
+
`,ao=`
|
|
320
320
|
input[type=checkbox] {
|
|
321
321
|
appearance: none;
|
|
322
322
|
-webkit-appearance: none;
|
|
@@ -339,7 +339,7 @@ input[type=checkbox]:checked:after {
|
|
|
339
339
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
340
340
|
|
|
341
341
|
}
|
|
342
|
-
`,
|
|
342
|
+
`,Gs=`
|
|
343
343
|
input[type="range"] {
|
|
344
344
|
-webkit-appearance: none;
|
|
345
345
|
width: 90%;
|
|
@@ -416,11 +416,11 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
416
416
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
417
417
|
border: 0;
|
|
418
418
|
}
|
|
419
|
-
`;class
|
|
420
|
-
${
|
|
421
|
-
${
|
|
422
|
-
${
|
|
423
|
-
${
|
|
419
|
+
`;class lo extends et{constructor(){super();L(this,"_removeButton",()=>Ss(this));L(this,"_sortButton",()=>$s(this.unstyled));L(this,"_button",e=>xs(e,this.unstyled));O(this,Ge,"");O(this,Je,`
|
|
420
|
+
${qs}
|
|
421
|
+
${Ws}
|
|
422
|
+
${ao}
|
|
423
|
+
${Gs}
|
|
424
424
|
.drag-handle {
|
|
425
425
|
cursor: n-resize;
|
|
426
426
|
}
|
|
@@ -512,10 +512,10 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
512
512
|
[slot=opacity-content] {
|
|
513
513
|
padding: 12px 6px;
|
|
514
514
|
}
|
|
515
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=
|
|
515
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=ws(this.tools,this.layer),i=Es(this.tools,this.layer),o=this[`_${e==null?void 0:e[0]}Button`]?this[`_${e==null?void 0:e[0]}Button`]():T,r=((l=this.tools)==null?void 0:l.length)===1?`${this.tools[0]}-icon`:"",s=e==null?void 0:e.length,a=i==null?void 0:i.length;return x`
|
|
516
516
|
<style>
|
|
517
|
-
${
|
|
518
|
-
${!this.unstyled&&
|
|
517
|
+
${N(this,Ge)}
|
|
518
|
+
${!this.unstyled&&N(this,Je)}
|
|
519
519
|
</style>
|
|
520
520
|
${at(s+a>0,()=>x`
|
|
521
521
|
${at(s===1&&a===0,()=>x`
|
|
@@ -540,7 +540,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
540
540
|
${je(i,d=>this._button(d))}
|
|
541
541
|
|
|
542
542
|
<div slot="info-content">
|
|
543
|
-
${
|
|
543
|
+
${_s(this.layer.get("description"))}
|
|
544
544
|
</div>
|
|
545
545
|
<div slot="opacity-content">
|
|
546
546
|
<!-- Input for opacity -->
|
|
@@ -572,8 +572,8 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
572
572
|
</details>
|
|
573
573
|
`})}
|
|
574
574
|
`)}
|
|
575
|
-
`}}Ge=new WeakMap,Je=new WeakMap,L(
|
|
576
|
-
${
|
|
575
|
+
`}}Ge=new WeakMap,Je=new WeakMap,L(lo,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",lo);const Js=n=>{const t=()=>{const e=ys(n.layer,n.map,n.showLayerZoomState);let i=!1;!e&&n.currLayerVisibilityBasedOnZoom?(n.currLayerVisibilityBasedOnZoom=!1,i=!0):e&&!n.currLayerVisibilityBasedOnZoom&&(n.currLayerVisibilityBasedOnZoom=!0,i=!0),i&&(n.requestUpdate(),n.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};Ji(n.layer,n.showLayerZoomState)&&(t(),n.map.getView().on("change:resolution",()=>t()))},Ks=(n,t)=>{const e=t.layer;e.setVisible(n.target.checked),n.target.checked&&e.get("layerControlExclusive")&&t.closest(".layers > ul").querySelectorAll("eox-layercontrol-layer").forEach(o=>{var r;o.layer!==e&&((r=o.layer)!=null&&r.get("layerControlExclusive"))&&(o.layer.setVisible(!1),o.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:e})),t.requestUpdate()};class uo extends et{constructor(){super();O(this,Ct);L(this,"currLayerVisibilityBasedOnZoom",!0);O(this,Ke,"");O(this,Qe,`
|
|
576
|
+
${ao}
|
|
577
577
|
eox-layercontrol-layer {
|
|
578
578
|
width: 100%;
|
|
579
579
|
}
|
|
@@ -613,10 +613,10 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
613
613
|
[data-type=draw] .title::before {
|
|
614
614
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
|
|
615
615
|
}
|
|
616
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){
|
|
616
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){Js(this)}render(){var l;const e=this.layer.getVisible(),i=e?"visible":"",o=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",r=Y(this,Ct,dn).call(this,"layerControlDisable")?"disabled":"",s=Y(this,Ct,dn).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return x`
|
|
617
617
|
<style>
|
|
618
|
-
${
|
|
619
|
-
${!this.unstyled&&
|
|
618
|
+
${N(this,Ke)}
|
|
619
|
+
${!this.unstyled&&N(this,Qe)}
|
|
620
620
|
</style>
|
|
621
621
|
${at(this.layer,()=>x`
|
|
622
622
|
<!-- Render the layer -->
|
|
@@ -626,7 +626,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
626
626
|
<input
|
|
627
627
|
type=${s}
|
|
628
628
|
.checked=${to(e)}
|
|
629
|
-
@click=${Y(this,Ct,
|
|
629
|
+
@click=${Y(this,Ct,wo)}
|
|
630
630
|
/>
|
|
631
631
|
|
|
632
632
|
<!-- Layer title -->
|
|
@@ -643,7 +643,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
643
643
|
.unstyled=${this.unstyled}
|
|
644
644
|
></eox-layercontrol-layer-tools>
|
|
645
645
|
`)}
|
|
646
|
-
`}}Ct=new WeakSet,dn=function(e){var i;return(i=this.layer)==null?void 0:i.get(e)},
|
|
646
|
+
`}}Ct=new WeakSet,dn=function(e){var i;return(i=this.layer)==null?void 0:i.get(e)},wo=function(e){Ks(e,this)},Ke=new WeakMap,Qe=new WeakMap,L(uo,"properties",{layer:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer",uo);class co extends et{constructor(){super();O(this,tn,"");O(this,en,`
|
|
647
647
|
details summary {
|
|
648
648
|
cursor: pointer;
|
|
649
649
|
display: flex;
|
|
@@ -669,8 +669,8 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
669
669
|
}
|
|
670
670
|
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var o,r;const e=!!((o=this.group)!=null&&o.get("layerControlExpand")),i=(r=Qi(this.group.getLayers()))==null?void 0:r.length;return x`
|
|
671
671
|
<style>
|
|
672
|
-
${
|
|
673
|
-
${!this.unstyled&&
|
|
672
|
+
${N(this,tn)}
|
|
673
|
+
${!this.unstyled&&N(this,en)}
|
|
674
674
|
</style>
|
|
675
675
|
${at(this.group,()=>x`
|
|
676
676
|
<!-- Render the details element with the layer control -->
|
|
@@ -706,7 +706,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
706
706
|
></eox-layercontrol-layer-list>
|
|
707
707
|
</details>
|
|
708
708
|
`)}
|
|
709
|
-
`}}tn=new WeakMap,en=new WeakMap,L(
|
|
709
|
+
`}}tn=new WeakMap,en=new WeakMap,L(co,"properties",{group:{attribute:!1},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",co);const Qs=n=>{const{layers:t,idProperty:e,titleProperty:i,renderRoot:o}=n,r=oo(()=>{n.requestUpdate(),n.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50),s=()=>r();if(t&&(t.hasListener("change:length")&&(t==null||t.un("change:length",s)),t.on("change:length",s),t)){const a=o.querySelector("ul");ms(t,e,i,n),gs(a,t,e,n)}};class ho extends et{constructor(){super();O(this,nn,"");O(this,on,`
|
|
710
710
|
ul {
|
|
711
711
|
padding: 0;
|
|
712
712
|
margin: 0;
|
|
@@ -734,17 +734,17 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
734
734
|
}
|
|
735
735
|
li.sortable-ghost {
|
|
736
736
|
}
|
|
737
|
-
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1}firstUpdated(){
|
|
737
|
+
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1}firstUpdated(){Qs(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.layers?Qi(this.layers).reverse():[];return x`
|
|
738
738
|
<style>
|
|
739
|
-
${
|
|
740
|
-
${!this.unstyled&&
|
|
739
|
+
${N(this,nn)}
|
|
740
|
+
${!this.unstyled&&N(this,on)}
|
|
741
741
|
</style>
|
|
742
742
|
<ul>
|
|
743
743
|
${at(this.layers,()=>x`
|
|
744
|
-
${
|
|
744
|
+
${Zo(e,i=>i,i=>x`
|
|
745
745
|
<li
|
|
746
746
|
data-layer="${i.get(this.idProperty)}"
|
|
747
|
-
data-type="${
|
|
747
|
+
data-type="${bs(i,this.map)}"
|
|
748
748
|
>
|
|
749
749
|
${i.getLayers?x`
|
|
750
750
|
<eox-layercontrol-layer-group
|
|
@@ -775,7 +775,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
775
775
|
`)}
|
|
776
776
|
`)}
|
|
777
777
|
</ul>
|
|
778
|
-
`}}nn=new WeakMap,on=new WeakMap,L(
|
|
778
|
+
`}}nn=new WeakMap,on=new WeakMap,L(ho,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",ho);const ta=n=>{const t=n.querySelector("select[name=optional]"),e=t?t.value:null,i=jn(n.layers.getArray(),"layerControlOptional",!0).find(o=>(o.get(n.idProperty)||o.ol_uid)===e);i==null||i.set("layerControlOptional",!1),i==null||i.setVisible(!0),n.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),n.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(o=>o.requestUpdate()),n.requestUpdate()};class po extends et{constructor(){super();O(this,rn);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=jn(this.layers.getArray(),"layerControlOptional",!0);return x`
|
|
779
779
|
<!-- Label for the dropdown -->
|
|
780
780
|
<label for="optional">Optional layers</label>
|
|
781
781
|
|
|
@@ -791,8 +791,8 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
791
791
|
</select>
|
|
792
792
|
|
|
793
793
|
<!-- Button to handle adding layers -->
|
|
794
|
-
<button @click="${Y(this,rn,
|
|
795
|
-
`}}rn=new WeakSet,
|
|
794
|
+
<button @click="${Y(this,rn,Eo)}">add</button>
|
|
795
|
+
`}}rn=new WeakSet,Eo=function(){ta(this)},L(po,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",po);const ea=(n,t)=>{t.jsonInput=n.target.value,t.requestUpdate()},fo=n=>{const t=JSON.parse(`{"data":${Ci(n.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(e=>{n.eoxMap.addOrUpdateLayer(e)}):n.eoxMap.addOrUpdateLayer(t.data),n.jsonInput=null,n.requestUpdate()},na=(n,t)=>{t.urlInput=n.target.value,t.requestUpdate()};async function ia(n){const t=n.urlInput;if(n.wmsCapabilities=null,n.searchLoad=!0,n.requestUpdate(),!t)return!1;if(An(t)==="XYZ")return{Name:t};try{const e=await Br(t);n.wmsCapabilities=e}catch{}finally{n.searchLoad=!1,n.requestUpdate()}return!1}const oa=(n,t)=>{const{Name:e}=n,i=An(t.urlInput)||"XYZ",o={type:"Tile",properties:{id:e,title:e},source:{type:i,url:t.urlInput,params:{LAYERS:e}}};t.jsonInput=JSON.stringify(o)},ra=(n,t)=>{t.open=n||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class go extends et{constructor(){super();O(this,Z);L(this,"urlInput",null);L(this,"jsonInput",null);L(this,"open",null);L(this,"searchLoad",!1);L(this,"wmsCapabilities",null);O(this,sn,`
|
|
796
796
|
.eox-add-layer-main .open {
|
|
797
797
|
position: relative;
|
|
798
798
|
}
|
|
@@ -932,10 +932,10 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
932
932
|
font-weight: bold;
|
|
933
933
|
display: inline-block;
|
|
934
934
|
}
|
|
935
|
-
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.open?"open":"close",i=this.open==="url",o=this.open==="json",r=!
|
|
935
|
+
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.open?"open":"close",i=this.open==="url",o=this.open==="json",r=!Vr(this.urlInput)||this.searchLoad?!0:T;return x`
|
|
936
936
|
<style>
|
|
937
|
-
${
|
|
938
|
-
${!this.unstyled&&
|
|
937
|
+
${N(this,sn)}
|
|
938
|
+
${!this.unstyled&&N(this,an)}
|
|
939
939
|
</style>
|
|
940
940
|
<div class="eox-add-layer-main">
|
|
941
941
|
<div class="eox-add-layer-col">
|
|
@@ -972,14 +972,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
972
972
|
class="add-url"
|
|
973
973
|
placeholder="Add URL (WMS/XYZ)"
|
|
974
974
|
.value="${this.urlInput}"
|
|
975
|
-
@input=${Y(this,Z,
|
|
975
|
+
@input=${Y(this,Z,xo)}
|
|
976
976
|
>
|
|
977
977
|
</input>
|
|
978
978
|
<!-- Search button for URL -->
|
|
979
979
|
<button
|
|
980
980
|
class="search-icon"
|
|
981
981
|
disabled=${r}
|
|
982
|
-
@click=${Y(this,Z,
|
|
982
|
+
@click=${Y(this,Z,So)}
|
|
983
983
|
>
|
|
984
984
|
${this.unstyled?"Search":""}
|
|
985
985
|
</button>
|
|
@@ -1005,32 +1005,32 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1005
1005
|
<textarea
|
|
1006
1006
|
class="add-layer-input"
|
|
1007
1007
|
placeholder="Please put a valid eox-map layer JSON."
|
|
1008
|
-
@input=${Y(this,Z
|
|
1008
|
+
@input=${Y(this,Z,_o)}
|
|
1009
1009
|
.value=${this.jsonInput}
|
|
1010
1010
|
></textarea>
|
|
1011
1011
|
|
|
1012
1012
|
<!-- Button to add JSON layer -->
|
|
1013
1013
|
<button
|
|
1014
1014
|
class="add-layer-icon json-add-layer"
|
|
1015
|
-
disabled=${
|
|
1016
|
-
@click=${Y(this,Z
|
|
1015
|
+
disabled=${Lr(this.jsonInput)?T:!0}
|
|
1016
|
+
@click=${Y(this,Z,$o)}
|
|
1017
1017
|
>
|
|
1018
1018
|
${this.unstyled?"Add JSON":""}
|
|
1019
1019
|
</button>
|
|
1020
1020
|
`}
|
|
1021
1021
|
</div>
|
|
1022
1022
|
</div>
|
|
1023
|
-
`}}Z=new WeakSet,
|
|
1023
|
+
`}}Z=new WeakSet,xo=function(e){na(e,this)},So=async function(){const e=await ia(this);e&&Y(this,Z,Wn).call(this,e)},Wn=function(e){oa(e,this),fo(this)},$o=function(){fo(this)},_o=function(e){ea(e,this)},hn=function(e){ra(e,this)},sn=new WeakMap,an=new WeakMap,L(go,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",go);const sa=(n,t)=>{if(t.requestUpdate(),n.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const e=t.renderRoot.querySelector("eox-layercontrol-optional-list");e==null||e.requestUpdate()}},aa=n=>{const t=n.for,e=document.querySelector(t);return e&&e.map!==n.map&&(n.map=e.map),e};class Yn extends et{constructor(){super();O(this,ln);O(this,Gt);O(this,un,"* { font-family: Roboto, sans-serif; }");this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride=""}firstUpdated(){$e(this,Gt,aa(this))}render(){var o,r,s;const e=(o=this.map)==null?void 0:o.getLayers().getArray(),i=e&&((r=jn(e,"layerControlOptional",!0))==null?void 0:r.length)>0;return x`
|
|
1024
1024
|
<style>
|
|
1025
|
-
${!this.unstyled&&
|
|
1025
|
+
${!this.unstyled&&N(this,un)}
|
|
1026
1026
|
${this.styleOverride}
|
|
1027
1027
|
</style>
|
|
1028
1028
|
|
|
1029
1029
|
<!-- Conditional rendering of add layers component -->
|
|
1030
|
-
${at(this.addExternalLayers&&((s=
|
|
1030
|
+
${at(this.addExternalLayers&&((s=N(this,Gt))==null?void 0:s.addOrUpdateLayer),()=>x`
|
|
1031
1031
|
<eox-layercontrol-add-layers
|
|
1032
1032
|
.noShadow=${!0}
|
|
1033
|
-
.eoxMap=${
|
|
1033
|
+
.eoxMap=${N(this,Gt)}
|
|
1034
1034
|
.unstyled=${this.unstyled}
|
|
1035
1035
|
></eox-layercontrol-add-layers>
|
|
1036
1036
|
`)}
|
|
@@ -1047,7 +1047,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1047
1047
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
1048
1048
|
.tools=${this.tools}
|
|
1049
1049
|
.unstyled=${this.unstyled}
|
|
1050
|
-
@changed=${Y(this,ln,
|
|
1050
|
+
@changed=${Y(this,ln,Ao)}
|
|
1051
1051
|
></eox-layercontrol-layer-list>
|
|
1052
1052
|
`)}
|
|
1053
1053
|
|
|
@@ -1061,4 +1061,4 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1061
1061
|
@changed=${()=>this.requestUpdate()}
|
|
1062
1062
|
></eox-layercontrol-optional-list>
|
|
1063
1063
|
`)}
|
|
1064
|
-
`}}
|
|
1064
|
+
`}}Gt=new WeakMap,ln=new WeakSet,Ao=function(e){sa(e,this),this.dispatchEvent(new CustomEvent("layerchange",{detail:e.detail}))},un=new WeakMap,L(Yn,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},addExternalLayers:{attribute:!1},unstyled:{type:Boolean},styleOverride:{type:String}}),customElements.define("eox-layercontrol",Yn),C.EOxLayerControl=Yn,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|