@eox/layercontrol 0.20.1-dev.1726146964.0 → 0.20.1-dev.1726221051.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 +1570 -1661
- package/dist/eox-layercontrol.umd.cjs +169 -231
- package/package.json +1 -1
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
(function(
|
|
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 ba=Object.defineProperty;var $o=C=>{throw TypeError(C)};var va=(C,_,H)=>_ in C?ba(C,_,{enumerable:!0,configurable:!0,writable:!0,value:H}):C[_]=H;var B=(C,_,H)=>va(C,typeof _!="symbol"?_+"":_,H),Kn=(C,_,H)=>_.has(C)||$o("Cannot "+H);var O=(C,_,H)=>(Kn(C,_,"read from private field"),H?H.call(C):_.get(C)),D=(C,_,H)=>_.has(C)?$o("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(C):_.set(C,H),$e=(C,_,H,Jt)=>(Kn(C,_,"write to private field"),Jt?Jt.call(C,H):_.set(C,H),H),U=(C,_,H)=>(Kn(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 xo,Wt,ye,be,Xe,Ao,qe,Ye,We,Co,Ge,Je,ve,Ke,Qe,tn,en,Ct,fn,To,nn,on,rn,sn,an,ln,dn,Po,X,Do,Oo,Qn,Ro,Mo,gn,un,cn,Tt,Gt,No,Io,hn;const _=globalThis,H=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Jt=Symbol(),ti=new WeakMap;let Ho=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=ti.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ti.set(e,t))}return t}toString(){return this.cssText}};const Bo=n=>new Ho(typeof n=="string"?n:n+"",void 0,Jt),Vo=(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)}},ei=H?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Bo(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:Lo,defineProperty:Uo,getOwnPropertyDescriptor:ko,getOwnPropertyNames:Fo,getOwnPropertySymbols:jo,getPrototypeOf:Zo}=Object,xt=globalThis,ni=xt.trustedTypes,zo=ni?ni.emptyScript:"",mn=xt.reactiveElementPolyfillSupport,Kt=(n,t)=>n,yn={toAttribute(n,t){switch(t){case Boolean:n=n?zo: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}},ii=(n,t)=>!Lo(n,t),oi={attribute:!0,type:String,converter:yn,reflect:!1,hasChanged:ii};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=oi){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&&Uo(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=ko(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)??oi}static _$Ei(){if(this.hasOwnProperty(Kt("elementProperties")))return;const t=Zo(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=[...Fo(e),...jo(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(ei(o))}else t!==void 0&&e.push(ei(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 Vo(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:yn).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:yn;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??ii)(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,mn==null||mn({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 Qt=globalThis,
|
|
14
|
-
\f\r]`,ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const Qt=globalThis,_e=Qt.trustedTypes,ri=_e?_e.createPolicy("lit-html",{createHTML:n=>n}):void 0,bn="$lit$",gt=`lit$${Math.random().toFixed(9).slice(2)}$`,vn="?"+gt,Xo=`<${vn}>`,Ot=document,te=()=>Ot.createComment(""),ee=n=>n===null||typeof n!="object"&&typeof n!="function",wn=Array.isArray,si=n=>wn(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",En=`[
|
|
14
|
+
\f\r]`,ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ai=/-->/g,li=/>/g,Rt=RegExp(`>|${En}(?:([^\\s"'>=/]+)(${En}*=${En}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),di=/'/g,ui=/"/g,ci=/^(?:script|style|textarea|title)$/i,qo=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),E=qo(1),at=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),hi=new WeakMap,Mt=Ot.createTreeWalker(Ot,129);function pi(n,t){if(!wn(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return ri!==void 0?ri.createHTML(t):t}const fi=(n,t)=>{const e=n.length-1,i=[];let o,r=t===2?"<svg>":t===3?"<math>":"",s=ne;for(let a=0;a<e;a++){const l=n[a];let d,c,u=-1,p=0;for(;p<l.length&&(s.lastIndex=p,c=s.exec(l),c!==null);)p=s.lastIndex,s===ne?c[1]==="!--"?s=ai:c[1]!==void 0?s=li:c[2]!==void 0?(ci.test(c[2])&&(o=RegExp("</"+c[2],"g")),s=Rt):c[3]!==void 0&&(s=Rt):s===Rt?c[0]===">"?(s=o??ne,u=-1):c[1]===void 0?u=-2:(u=s.lastIndex-c[2].length,d=c[1],s=c[3]===void 0?Rt:c[3]==='"'?ui:di):s===ui||s===di?s=Rt:s===ai||s===li?s=ne:(s=Rt,o=void 0);const f=s===Rt&&n[a+1].startsWith("/>")?" ":"";r+=s===ne?l+Xo:u>=0?(i.push(d),l.slice(0,u)+bn+l.slice(u)+gt+f):l+gt+(u===-2?a:f)}return[pi(n,r+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),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,[d,c]=fi(t,e);if(this.el=ie.createElement(d,i),Mt.currentNode=this.el.content,e===2||e===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=Mt.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const u of o.getAttributeNames())if(u.endsWith(bn)){const p=c[s++],f=o.getAttribute(u).split(gt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:g[2],strings:f,ctor:g[1]==="."?mi:g[1]==="?"?yi:g[1]==="@"?bi:oe}),o.removeAttribute(u)}else u.startsWith(gt)&&(l.push({type:6,index:r}),o.removeAttribute(u));if(ci.test(o.tagName)){const u=o.textContent.split(gt),p=u.length-1;if(p>0){o.textContent=_e?_e.emptyScript:"";for(let f=0;f<p;f++)o.append(u[f],te()),Mt.nextNode(),l.push({type:2,index:++r});o.append(u[p],te())}}}else if(o.nodeType===8)if(o.data===vn)l.push({type:2,index:r});else{let u=-1;for(;(u=o.data.indexOf(gt,u+1))!==-1;)l.push({type:7,index:r}),u+=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===at)return t;let o=i!==void 0?(s=e.o)==null?void 0:s[i]:e.l;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.o??(e.o=[]))[i]=o:e.l=o),o!==void 0&&(t=Nt(n,o._$AS(n,t.values),o,i)),t}class gi{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);Mt.currentNode=o;let r=Mt.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let d;l.type===2?d=new Ae(r,r.nextSibling,this,t):l.type===1?d=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(d=new vi(r,this,t)),this._$AV.push(d),l=i[++a]}s!==(l==null?void 0:l.index)&&(r=Mt.nextNode(),s++)}return Mt.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++}}let Ae=class _o{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}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.v=(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!==at&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):si(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(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(pi(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 gi(o,this),a=s.u(this.options);s.p(e),this.T(a),this._$AH=s}}_$AC(t){let e=hi.get(t.strings);return e===void 0&&hi.set(t.strings,e=new ie(t)),e}k(t){wn(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 _o(this.O(te()),this.O(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.v=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!==at,s&&(this._$AH=t);else{const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Nt(this,a[i+l],e,l),d===at&&(d=this._$AH[l]),s||(s=!ee(d)||d!==this._$AH[l]),d===T?t=T:t!==T&&(t+=(d??"")+r[l+1]),this._$AH[l]=d}s&&!o&&this.j(t)}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class mi extends oe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===T?void 0:t}}class yi extends oe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class bi 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)===at)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 vi{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 Yo={M:bn,P:gt,A:vn,C:1,L:fi,R:gi,D:si,V:Nt,I:Ae,H:oe,N:yi,U:bi,B:mi,F:vi},xn=Qt.litHtmlPolyfillSupport;xn==null||xn(ie,Ae),(Qt.litHtmlVersions??(Qt.litHtmlVersions=[])).push("3.2.0");const Wo=(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 Ae(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
|
-
*/class
|
|
19
|
+
*/class tt extends kt{constructor(){super(...arguments),this.renderOptions={host:this},this.o=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.o=Wo(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return at}}tt._$litElement$=!0,tt.finalized=!0,(xo=globalThis.litElementHydrateSupport)==null||xo.call(globalThis,{LitElement:tt});const Sn=globalThis.litElementPolyfillSupport;Sn==null||Sn({LitElement:tt}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/function
|
|
23
|
+
*/function Y(n,t,e){return n?t(n):e==null?void 0:e(n)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const St={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6}
|
|
27
|
+
*/const St={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$n=n=>(...t)=>({_$litDirective$:n,values:t});class _n{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this.t=t,this._$AM=e,this.i=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{I:
|
|
31
|
+
*/const{I:Go}=Yo,Jo=n=>n.strings===void 0,wi=()=>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(wi(),o),a=i.insertBefore(wi(),o);e=new Go(s,a,n,n.options)}else{const s=e._$AB.nextSibling,a=e._$AM,l=a!==n;if(l){let d;(r=e._$AQ)==null||r.call(e,n),e._$AM=n,e._$AP!==void 0&&(d=n._$AU)!==a._$AU&&e._$AP(d)}if(s!==o||l){let d=e._$AA;for(;d!==s;){const c=d.nextSibling;i.insertBefore(d,o),d=c}}}return e},It=(n,t,e=n)=>(n._$AI(t,e),n),Ko={},Ei=(n,t=Ko)=>n._$AH=t,Qo=n=>n._$AH,An=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
|
|
35
|
+
*/const xi=(n,t,e)=>{const i=new Map;for(let o=t;o<=e;o++)i.set(n[o],o);return i},tr=$n(class extends _n{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=Qo(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 d,c,u=0,p=o.length-1,f=0,g=r.length-1;for(;u<=p&&f<=g;)if(o[u]===null)u++;else if(o[p]===null)p--;else if(a[u]===s[f])l[f]=It(o[u],r[f]),u++,f++;else if(a[p]===s[g])l[g]=It(o[p],r[g]),p--,g--;else if(a[u]===s[g])l[g]=It(o[u],r[g]),re(n,l[g+1],o[u]),u++,g--;else if(a[p]===s[f])l[f]=It(o[p],r[f]),re(n,o[u],o[p]),p--,f++;else if(d===void 0&&(d=xi(s,f,g),c=xi(a,u,p)),d.has(a[u]))if(d.has(a[p])){const y=c.get(s[f]),M=y!==void 0?o[y]:null;if(M===null){const q=re(n,o[u]);It(q,r[f]),l[f]=q}else l[f]=It(M,r[f]),re(n,o[u],M),o[y]=null;f++}else An(o[p]),p--;else An(o[u]),u++;for(;f<=g;){const y=re(n,l[g+1]);It(y,r[f]),l[f++]=y}for(;u<=p;){const y=o[u++];y!==null&&An(y)}return this.ut=s,Ei(n,l),at}});/**
|
|
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
|
|
40
|
+
*/var x=n=>n!==void 0,Si=(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 er{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,e){return Ce(t,e).join("")}}function Ce(n,t){return $i(n,t,[]).join("")}function $i(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)$i(i,t,e)}return e}function nr(n,t,e,i){for(var o=ir(t);o;o=or(o)){var r=o.namespaceURI||null,s=n[r];if(x(s)){var a=s[o.localName];x(a)&&a.call(i,o,e)}}}function ir(n){let t=n.firstElementChild||n.firstChild;for(;t&&t.nodeType!==se.ELEMENT;)t=t.nextSibling;return t}function or(n){let t=n.nextElementSibling||n.nextSibling;for(;t&&t.nodeType!==se.ELEMENT;)t=t.nextSibling;return t}function j(n,t,e){return rr(n,t,e)}function rr(n,t,e){var i=x(e)?e:{},o,r;for(o=0,r=n.length;o<r;++o)i[n[o]]=t;return i}function _i(n,t){return function(e,i){var o=n.call(x(t)?t:this,e,i);if(x(o)){var r=i[i.length-1];r.push(o)}}}function k(n,t,e,i,o){return i.push(n),nr(t,e,i,o),i.pop()}function m(n,t,e){return function(i,o){let r=n.call(x(e)?e:this,i,o);if(x(r)){var s=o[o.length-1],a=x(t)?t:i.localName;s[a]=r}}}function et(n,t,e){return function(i,o){var r=n.call(x(e)?e:this,i,o);if(x(r)){var s=o[o.length-1],a=x(t)?t:i.localName,l=Si(s,a,[]);l.push(r)}}}const sr=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function ar(n){return n.replace(sr,"")}function Ht(n){const t=/^\s*(true|1)|(false|0)\s*$/.exec(n);if(t)return x(t[1])||!1}function Ft(n){return mt(Ce(n,!1))}function mt(n){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n);if(t)return parseFloat(t[1])}function Cn(n){return Te(Ce(n,!1))}function Te(n){const t=/^\s*(\d+)\s*$/.exec(n);if(t)return parseInt(t[1],10)}function $(n){return ar(Ce(n,!1))}const lr="http://www.w3.org/1999/xlink";function Tn(n){return n.getAttributeNS(lr,"href")}function dr(n,t){return k({},Hr,n,t)}function Ai(n){return[mt(n.getAttribute("minx")),mt(n.getAttribute("miny")),mt(n.getAttribute("maxx")),mt(n.getAttribute("maxy"))]}function ur(n,t){const e=Ai(n),i=[mt(n.getAttribute("resx")),mt(n.getAttribute("resy"))];return{crs:n.getAttribute("CRS")||n.getAttribute("SRS"),extent:e,res:i}}function cr(n,t){const e=Ai(n);if(!(!x(e[0])||!x(e[1])||!x(e[2])||!x(e[3])))return e}function hr(n,t){const e=parseFloat(n.getAttribute("min")),i=parseFloat(n.getAttribute("max"));return{min:e,max:i}}function pr(n,t){const e=k({},Br,n,t);if(!x(e))return;const i=e.westBoundLongitude,o=e.southBoundLatitude,r=e.eastBoundLongitude,s=e.northBoundLatitude;if(!(!x(i)||!x(o)||!x(r)||!x(s)))return[i,o,r,s]}function fr(n,t){return k({},Dr,n,t)}function gr(n,t){return k({},Or,n,t)}function mr(n,t){return k({},Rr,n,t)}function yr(n,t){return k({},Mr,n,t)}function br(n,t){return k({},Nr,n,t)}function vr(n,t){return k([],Ir,n,t)}function wr(n,t){const e=Ht(n.getAttribute("queryable"));return k({queryable:x(e)?e:!1},Pi,n,t)}function Er(n,t){var e=t[t.length-1];const i=k({},Pi,n,t);if(!x(i))return;let o=Ht(n.getAttribute("queryable"));x(o)||(o=e.queryable),i.queryable=x(o)?o:!1;let r=Te(n.getAttribute("cascaded"));x(r)||(r=e.cascaded),i.cascaded=r;let s=Ht(n.getAttribute("opaque"));x(s)||(s=e.opaque),i.opaque=x(s)?s:!1;let a=Ht(n.getAttribute("noSubsets"));x(a)||(a=e.noSubsets),i.noSubsets=x(a)?a:!1;let l=mt(n.getAttribute("fixedWidth"));x(l)||(l=e.fixedWidth),i.fixedWidth=l;let d=mt(n.getAttribute("fixedHeight"));x(d)||(d=e.fixedHeight),i.fixedHeight=d;const c=["Style","CRS","AuthorityURL"];for(let p=0,f=c.length;p<f;p++){const g=c[p],y=e[g];if(x(y)){let M=Si(i,g,[]);M=M.concat(y),i[g]=M}}const u=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let p=0,f=u.length;p<f;p++){const g=u[p],y=i[g];if(!x(y)){const M=e[g];i[g]=M}}return i}function xr(n,t){return{name:n.getAttribute("name"),units:n.getAttribute("units"),unitSymbol:n.getAttribute("unitSymbol"),default:n.getAttribute("default"),multipleValues:Ht(n.getAttribute("multipleValues")),nearestValue:Ht(n.getAttribute("nearestValue")),current:Ht(n.getAttribute("current")),values:$(n)}}function yt(n,t){return k({},jr,n,t)}function Sr(n,t){return k({},Vr,n,t)}function $r(n,t){return k({},Ur,n,t)}function _r(n,t){return k({},kr,n,t)}function Pn(n,t){return k({},Lr,n,t)}function Ci(n,t){var e=yt(n,t);if(x(e)){const i=[Te(n.getAttribute("width")),Te(n.getAttribute("height"))];return e.size=i,e}}function Ar(n,t){var e=yt(n,t);if(x(e))return e.name=n.getAttribute("name"),e}function Cr(n,t){var e=yt(n,t);if(x(e))return e.type=n.getAttribute("type"),e}function Tr(n,t){return k({},Fr,n,t)}function Ti(n,t){return k([],Zr,n,t)}const Z=[null,"http://www.opengis.net/wms"],Pr=j(Z,{Service:m(gr),Capability:m(fr)}),Dr=j(Z,{Request:m(Sr),Exception:m(vr),Layer:m(wr)}),Or=j(Z,{Name:m($),Title:m($),Abstract:m($),KeywordList:m(Ti),OnlineResource:m(Tn),ContactInformation:m(mr),Fees:m($),AccessConstraints:m($),LayerLimit:m(Cn),MaxWidth:m(Cn),MaxHeight:m(Cn)}),Rr=j(Z,{ContactPersonPrimary:m(yr),ContactPosition:m($),ContactAddress:m(br),ContactVoiceTelephone:m($),ContactFacsimileTelephone:m($),ContactElectronicMailAddress:m($)}),Mr=j(Z,{ContactPerson:m($),ContactOrganization:m($)}),Nr=j(Z,{AddressType:m($),Address:m($),City:m($),StateOrProvince:m($),PostCode:m($),Country:m($)}),Ir=j(Z,{Format:_i($)}),Pi=j(Z,{Name:m($),Title:m($),Abstract:m($),KeywordList:m(Ti),CRS:et($),SRS:et($),EX_GeographicBoundingBox:m(pr),LatLonBoundingBox:m(cr),BoundingBox:et(ur),Dimension:et(xr),Attribution:m(dr),AuthorityURL:et(Ar),Identifier:et($),MetadataURL:et(Cr),DataURL:et(yt),FeatureListURL:et(yt),Style:et(Tr),MinScaleDenominator:m(Ft),MaxScaleDenominator:m(Ft),ScaleHint:m(hr),Layer:et(Er)}),Hr=j(Z,{Title:m($),OnlineResource:m(Tn),LogoURL:m(Ci)}),Br=j(Z,{westBoundLongitude:m(Ft),eastBoundLongitude:m(Ft),southBoundLatitude:m(Ft),northBoundLatitude:m(Ft)}),Vr=j(Z,{GetCapabilities:m(Pn),GetMap:m(Pn),GetFeatureInfo:m(Pn)}),Lr=j(Z,{Format:et($),DCPType:et($r)}),Ur=j(Z,{HTTP:m(_r)}),kr=j(Z,{Get:m(yt),Post:m(yt)}),Fr=j(Z,{Name:m($),Title:m($),Abstract:m($),LegendURL:et(Ci),StyleSheetURL:m(yt),StyleURL:m(yt)}),jr=j(Z,{Format:m($),OnlineResource:m(Tn)}),Zr=j(Z,{Keyword:_i($)});class zr{constructor(t,e){!e&&typeof window<"u"&&(e=window.DOMParser),this.version=void 0,this._parser=new er(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},Pr,t,[])||null}}async function Xr(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 zr(r).toJSON()}else throw new Error(`Error: ${o.status}`)}function Dn(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 qr(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=Dn(n);return!!(n&&e&&i)}function Di(n){return n.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function Yr(n){try{return JSON.parse(Di(n)),!!n}catch{return!1}}function Wr(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.3
|
|
42
42
|
* @author RubaXa <trash@rubaxa.org>
|
|
43
43
|
* @author owenm <owen23355@gmail.com>
|
|
44
44
|
* @license MIT
|
|
45
|
-
*/function Hi(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?Hi(Object(e),!0).forEach(function(i){Qr(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Hi(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function De(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?De=function(t){return typeof t}:De=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De(n)}function Qr(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 ts(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 es(n,t){if(n==null)return{};var e=ts(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 ns="1.15.3";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),Mi=vt(/firefox/i),le=vt(/safari/i)&&!vt(/chrome/i)&&!vt(/android/i),Ni=vt(/iP(ad|od|hone)/i),Ii=vt(/chrome/i)&&vt(/android/i),Vi={capture:!1,passive:!1};function A(n,t,e){n.addEventListener(t,e,!wt&&Vi)}function S(n,t,e){n.removeEventListener(t,e,!wt&&Vi)}function Oe(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 Bi(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function dt(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Oe(n,t):Oe(n,t))||i&&n===e)return n;if(n===e)break}while(n=Bi(n))}return null}var Li=/\s+/g;function ot(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Li," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Li," ")}}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 Ui(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,d,c,u;if(n!==window&&n.parentNode&&n!==ft()?(r=n.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,d=r.right,c=r.height,u=r.width):(s=0,a=0,l=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=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,d=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,u/=g,c/=y,l=s+c,d=a+u)}return{top:s,left:a,bottom:l,right:d,width:u,height:c}}}function ki(n,t,e){for(var i=$t(n,!0),o=B(n)[t];i;){var r=B(i)[e],s=void 0;if(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)&&dt(s[r],e.draggable,n,!1)){if(o===t)return s[r];o++}r++}return null}function Hn(n,t){for(var e=n.lastElementChild;e&&(e===v.ghost||b(e,"display")==="none"||t&&!Oe(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||Oe(n,t))&&e++;return e}function Fi(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 is(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 os(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function Mn(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 de;function ji(n,t){return function(){if(!de){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),de=setTimeout(function(){de=void 0},t)}}}function rs(){clearTimeout(de),de=void 0}function Zi(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function zi(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 Xi(n,t,e){var i={};return Array.from(n.children).forEach(function(o){var r,s,a,l;if(!(!dt(o,t.draggable,n,!1)||o.animated||o===e)){var d=B(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,d.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,d.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,d.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var nt="Sortable"+new Date().getTime();function ss(){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(is(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,d=a.target,c=d.fromRect,u=B(d),p=d.prevFromRect,f=d.prevToRect,g=a.rect,y=jt(d,!0);y&&(u.top-=y.f,u.left-=y.e),d.toRect=u,d.thisAnimationDuration&&Mn(p,u)&&!Mn(c,u)&&(g.top-u.top)/(g.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=ls(g,p,f,o.options)),Mn(u,c)||(d.prevFromRect=c,d.prevToRect=u,l||(l=o.options.animation),o.animate(d,g,u,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.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,d=a&&a.d,c=(o.left-r.left)/(l||1),u=(o.top-r.top)/(d||1);i.animatingX=!!c,i.animatingY=!!u,b(i,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=as(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 as(n){return n.offsetWidth}function ls(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=[],Nn={initializeByDefault:!0},ue={mount:function(t){for(var e in Nn)Nn.hasOwnProperty(e)&&!(e in t)&&(t[e]=Nn[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 d=new a(t,e,t.options);d.sortable=t,d.options=t.options,t[l]=d,bt(i,d.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 ds(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,d=n.newIndex,c=n.oldDraggableIndex,u=n.newDraggableIndex,p=n.originalEvent,f=n.putSortable,g=n.extraEventProperties;if(t=t||e&&e[nt],!!t){var y,H=t.options,q="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=d,y.oldDraggableIndex=c,y.newDraggableIndex=u,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var F=pt(pt({},g),ue.getEventProperties(i,t));for(var st in F)y[st]=F[st];e&&e.dispatchEvent(y),H[q]&&H[q].call(t,y)}}var us=["evt"],it=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=es(i,us);ue.pluginEvent.bind(v)(t,e,pt({dragEl:h,parentEl:N,ghostEl:x,rootEl:R,nextEl:Vt,lastDownEl:Re,cloneEl:M,cloneHidden:_t,dragStarted:he,putSortable:z,activeSortable:v.active,originalEvent:o,oldIndex:Xt,oldDraggableIndex:ce,newIndex:rt,newDraggableIndex:At,hideGhostForTarget:Qi,unhideGhostForTarget:to,cloneNowHidden:function(){_t=!0},cloneNowShown:function(){_t=!1},dispatchSortableEvent:function(a){Q({sortable:e,name:a,originalEvent:o})}},r))};function Q(n){ds(pt({putSortable:z,cloneEl:M,targetEl:h,rootEl:R,oldIndex:Xt,oldDraggableIndex:ce,newIndex:rt,newDraggableIndex:At},n))}var h,N,x,R,Vt,Re,M,_t,Xt,rt,ce,At,He,z,qt=!1,Me=!1,Ne=[],Bt,ut,In,Vn,qi,Yi,he,Yt,pe,fe=!1,Ie=!1,Ve,Y,Bn=[],Ln=!1,Be=[],Le=typeof document<"u",Ue=Ni,Wi=ae||wt?"cssFloat":"float",cs=Le&&!Ii&&!Ni&&"draggable"in document.createElement("div"),Gi=function(){if(Le){if(wt)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Ji=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),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+B(r).width,c=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 u=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=o&&i[Wi]==="none"||s&&i[Wi]==="none"&&d+c>o)?"vertical":"horizontal"},hs=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,d=i?e.width:e.height;return o===a||r===l||o+s/2===a+d/2},ps=function(t,e){var i;return Ne.some(function(o){var r=o[nt].options.emptyInsertThreshold;if(!(!r||Hn(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},Ki=function(t){function e(r,s){return function(a,l,d,c){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||u))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(a,l,d,c),s)(a,l,d,c);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||De(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},Qi=function(){!Gi&&x&&b(x,"display","none")},to=function(){!Gi&&x&&b(x,"display","")};Le&&!Ii&&document.addEventListener("click",function(n){if(Me)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Me=!1,!1},!0);var Lt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=ps(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[nt]._onDragOver(i)}}},fs=function(t){h&&h.parentNode[nt]._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[nt]=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 Ji(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};ue.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Ki(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:cs,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,ss())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Yt=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,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(Es(i),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&le&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=dt(l,o.draggable,i,!1),!(l&&l.animated)&&Re!==l)){if(Xt=lt(l),ce=lt(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){Q({sortable:e,rootEl:d,name:"filter",targetEl:l,toEl:i,fromEl:i}),it("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=dt(d,u.trim(),i,!1),u)return Q({sortable:e,rootEl:u,name:"filter",targetEl:l,fromEl:i,toEl:i}),it("filter",e,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!dt(d,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 d=B(i);if(R=r,h=i,N=h.parentNode,Vt=h.nextSibling,Re=i,He=s.group,v.dragged=h,Bt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},qi=Bt.clientX-d.left,Yi=Bt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",l=function(){if(it("delayEnded",o,{evt:t}),v.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Mi&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,e),Q({sortable:o,name:"choose",originalEvent:t}),ot(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){Ui(h,c.trim(),Un)}),A(a,"dragover",Lt),A(a,"mousemove",Lt),A(a,"touchmove",Lt),A(a,"mouseup",o._onDrop),A(a,"touchend",o._onDrop),A(a,"touchcancel",o._onDrop),Mi&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),it("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&&Un(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?Fe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(qt=!1,R&&h){it("dragStarted",this,{evt:e}),this.nativeDraggable&&A(document,"dragover",fs);var i=this.options;!t&&ot(h,i.dragClass,!1),ot(h,i.ghostClass,!0),v.active=this,t&&this._appendGhost(),Q({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ut){this._lastX=ut.clientX,this._lastY=ut.clientY,Qi();for(var t=document.elementFromPoint(ut.clientX,ut.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ut.clientX,ut.clientY),t!==e);)e=t;if(h.parentNode[nt]._isOutsideThisEl(t),e)do{if(e[nt]){var i=void 0;if(i=e[nt]._onDragOver({clientX:ut.clientX,clientY:ut.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=Bi(e));to()}},_onTouchMove:function(t){if(Bt){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=x&&jt(x,!0),a=x&&s&&s.a,l=x&&s&&s.d,d=Ue&&Y&&Fi(Y),c=(r.clientX-Bt.clientX+o.x)/(a||1)+(d?d[0]-Bn[0]:0)/(a||1),u=(r.clientY-Bt.clientY+o.y)/(l||1)+(d?d[1]-Bn[1]:0)/(l||1);if(!v.active&&!qt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(x){s?(s.e+=c-(In||0),s.f+=u-(Vn||0)):s={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");b(x,"webkitTransform",p),b(x,"mozTransform",p),b(x,"msTransform",p),b(x,"transform",p),In=c,Vn=u,ut=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!x){var t=this.options.fallbackOnBody?document.body:R,e=B(h,!0,Ue,!0,t),i=this.options;if(Ue){for(Y=t;b(Y,"position")==="static"&&b(Y,"transform")==="none"&&Y!==document;)Y=Y.parentNode;Y!==document.body&&Y!==document.documentElement?(Y===document&&(Y=ft()),e.top+=Y.scrollTop,e.left+=Y.scrollLeft):Y=ft(),Bn=Fi(Y)}x=h.cloneNode(!0),ot(x,i.ghostClass,!1),ot(x,i.fallbackClass,!0),ot(x,i.dragClass,!0),b(x,"transition",""),b(x,"transform",""),b(x,"box-sizing","border-box"),b(x,"margin",0),b(x,"top",e.top),b(x,"left",e.left),b(x,"width",e.width),b(x,"height",e.height),b(x,"opacity","0.8"),b(x,"position",Ue?"absolute":"fixed"),b(x,"zIndex","100000"),b(x,"pointerEvents","none"),v.ghost=x,t.appendChild(x),b(x,"transform-origin",qi/parseInt(x.style.width)*100+"% "+Yi/parseInt(x.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,o=t.dataTransfer,r=i.options;if(it("dragStart",this,{evt:t}),v.eventCanceled){this._onDrop();return}it("setupClone",this),v.eventCanceled||(M=zi(h),M.removeAttribute("id"),M.draggable=!1,M.style["will-change"]="",this._hideClone(),ot(M,this.options.chosenClass,!1),v.clone=M),i.cloneId=Fe(function(){it("clone",i),!v.eventCanceled&&(i.options.removeCloneOnHide||R.insertBefore(M,h),i._hideClone(),Q({sortable:i,name:"clone"}))}),!e&&ot(h,r.dragClass,!0),e?(Me=!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)")),qt=!0,i._dragStartId=Fe(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,d=v.active,c=He===l,u=a.sort,p=z||d,f,g=this,y=!1;if(Ln)return;function H($e,va){it($e,g,pt({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:u,fromSortable:p,target:i,completed:F,onMove:function(Ao,wa){return ke(R,e,h,o,Ao,B(Ao),t,wa)},changed:st},va))}function q(){H("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function F($e){return H("dragOverCompleted",{insertion:$e}),$e&&(c?d._hideClone():d._showClone(g),g!==p&&(ot(h,z?z.options.ghostClass:d.options.ghostClass,!1),ot(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(){H("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(Yt=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[nt]._isOutsideThisEl(t.target),!$e&&Lt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function st(){rt=lt(h),At=lt(h,a.draggable),Q({sortable:g,name:"change",toEl:e,newIndex:rt,newDraggableIndex:At,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=dt(i,a.draggable,e,!0),H("dragOver"),v.eventCanceled)return y;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return F(!1);if(Me=!1,d&&!a.disabled&&(c?u||(s=N!==R):z===this||(this.lastPutMode=He.checkPull(this,d,h,t))&&l.checkPut(this,d,h,t))){if(f=this._getDirection(t,i)==="vertical",o=B(h),H("dragOverValid"),v.eventCanceled)return y;if(s)return N=R,q(),this._hideClone(),H("revert"),v.eventCanceled||(Vt?R.insertBefore(h,Vt):R.appendChild(h)),F(!0);var tt=Hn(e,a.draggable);if(!tt||bs(t,f,this)&&!tt.animated){if(tt===h)return F(!1);if(tt&&e===t.target&&(i=tt),i&&(r=B(i)),ke(R,e,h,o,i,r,t,!!i)!==!1)return q(),tt&&tt.nextSibling?e.insertBefore(h,tt.nextSibling):e.appendChild(h),N=e,st(),F(!0)}else if(tt&&ys(t,f,this)){var ct=Zt(e,0,a,!0);if(ct===h)return F(!1);if(i=ct,r=B(i),ke(R,e,h,o,i,r,t,!1)!==!1)return q(),e.insertBefore(h,ct),N=e,st(),F(!0)}else if(i.parentNode===e){r=B(i);var D=0,W,ht=h.parentNode!==e,G=!hs(h.animated&&h.toRect||o,i.animated&&i.toRect||r,f),xe=f?"top":"left",Pt=ki(i,"top","top")||ki(h,"top","top"),Ee=Pt?Pt.scrollTop:void 0;Yt!==i&&(W=r[xe],fe=!1,Ie=!G&&a.invertSwap||ht),D=vs(t,i,r,f,G?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Ie,Yt===i);var xt;if(D!==0){var Ut=lt(h);do Ut-=D,xt=N.children[Ut];while(xt&&(b(xt,"display")==="none"||xt===x))}if(D===0||xt===i)return F(!1);Yt=i,pe=D;var Se=i.nextElementSibling,Dt=!1;Dt=D===1;var gn=ke(R,e,h,o,i,r,t,Dt);if(gn!==!1)return(gn===1||gn===-1)&&(Dt=gn===1),Ln=!0,setTimeout(ms,30),q(),Dt&&!Se?e.appendChild(h):i.parentNode.insertBefore(h,Dt?Se:i),Pt&&Zi(Pt,0,Ee-Pt.scrollTop),N=h.parentNode,W!==void 0&&!Ie&&(Ve=Math.abs(W-B(i)[xe])),st(),F(!0)}if(e.contains(h))return F(!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",Lt),S(document,"mousemove",Lt),S(document,"touchmove",Lt)},_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(rt=lt(h),At=lt(h,i.draggable),it("drop",this,{evt:t}),N=h&&h.parentNode,rt=lt(h),At=lt(h,i.draggable),v.eventCanceled){this._nulling();return}qt=!1,Ie=!1,fe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),kn(this.cloneId),kn(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()),x&&x.parentNode&&x.parentNode.removeChild(x),(R===N||z&&z.lastPutMode!=="clone")&&M&&M.parentNode&&M.parentNode.removeChild(M),h&&(this.nativeDraggable&&S(h,"dragend",this),Un(h),h.style["will-change"]="",he&&!qt&&ot(h,z?z.options.ghostClass:this.options.ghostClass,!1),ot(h,this.options.chosenClass,!1),Q({sortable:this,name:"unchoose",toEl:N,newIndex:null,newDraggableIndex:null,originalEvent:t}),R!==N?(rt>=0&&(Q({rootEl:N,name:"add",toEl:N,fromEl:R,originalEvent:t}),Q({sortable:this,name:"remove",toEl:N,originalEvent:t}),Q({rootEl:N,name:"sort",toEl:N,fromEl:R,originalEvent:t}),Q({sortable:this,name:"sort",toEl:N,originalEvent:t})),z&&z.save()):rt!==Xt&&rt>=0&&(Q({sortable:this,name:"update",toEl:N,originalEvent:t}),Q({sortable:this,name:"sort",toEl:N,originalEvent:t})),v.active&&((rt==null||rt===-1)&&(rt=Xt,At=ce),Q({sortable:this,name:"end",toEl:N,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){it("nulling",this),R=h=N=x=Vt=M=Re=_t=Bt=ut=he=rt=At=Xt=ce=Yt=pe=z=He=v.dragged=v.ghost=v.clone=v.active=null,Be.forEach(function(t){t.checked=!0}),Be.length=In=Vn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),gs(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],dt(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||xs(e));return t},sort:function(t,e){var i={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];dt(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 dt(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"&&Ki(i)},destroy:function(){it("destroy",this);var t=this.el;t[nt]=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(it("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(it("showClone",this),v.eventCanceled)return;h.parentNode==R&&!this.options.group.revertClone?R.insertBefore(M,h):Vt?R.insertBefore(M,Vt):R.appendChild(M),this.options.group.revertClone&&this.animate(h,M),b(M,"display",""),_t=!1}}};function gs(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function ke(n,t,e,i,o,r,s,a){var l,d=n[nt],c=d.options.onMove,u;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),c&&(u=c.call(d,l,s)),u}function Un(n){n.draggable=!1}function ms(){Ln=!1}function ys(n,t,e){var i=B(Zt(e.el,0,e.options,!0)),o=Xi(e.el,e.options,x),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 bs(n,t,e){var i=B(Hn(e.el,e.options.draggable)),o=Xi(e.el,e.options,x),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 vs(n,t,e,i,o,r,s,a){var l=i?n.clientY:n.clientX,d=i?e.height:e.width,c=i?e.top:e.left,u=i?e.bottom:e.right,p=!1;if(!s){if(a&&Ve<d*o){if(!fe&&(pe===1?l>c+d*r/2:l<u-d*r/2)&&(fe=!0),fe)p=!0;else if(pe===1?l<c+Ve:l>u-Ve)return-pe}else if(l>c+d*(1-o)/2&&l<u-d*(1-o)/2)return ws(t)}return p=p||s,p&&(l<c+d*r/2||l>u-d*r/2)?l>c+d/2?1:-1:0}function ws(n){return lt(h)<lt(n)?1:-1}function xs(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 Es(n){Be.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&Be.push(i)}}function Fe(n){return setTimeout(n,0)}function kn(n){return clearTimeout(n)}Le&&A(document,"touchmove",function(n){(v.active||qt)&&n.cancelable&&n.preventDefault()}),v.utils={on:A,off:S,css:b,find:Ui,is:function(t,e){return!!dt(t,e,t,!1)},extend:os,throttle:ji,closest:dt,toggleClass:ot,clone:zi,index:lt,nextTick:Fe,cancelNextTick:kn,detectDirection:Ji,getChild:Zt,expando:nt},v.get=function(n){return n[nt]},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=ns;var L=[],ge,Fn,jn=!1,Zn,zn,je,me;function Ss(){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)),eo(),Ze(),rs()},nulling:function(){je=Fn=ge=jn=me=Zn=zn=null,L.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(je=e,i||this.options.forceAutoScrollFallback||ae||wt||le){Xn(e,this.options,a,i);var l=$t(a,!0);jn&&(!me||r!==Zn||s!==zn)&&(me&&eo(),me=setInterval(function(){var d=$t(document.elementFromPoint(r,s),!0);d!==l&&(l=d,Ze()),Xn(e,o.options,d,i)},10),Zn=r,zn=s)}else{if(!this.options.bubbleScroll||$t(a,!0)===ft()){Ze();return}Xn(e,this.options,$t(a,!1),!1)}}},bt(n,{pluginName:"scroll",initializeByDefault:!0})}function Ze(){L.forEach(function(n){clearInterval(n.pid)}),L=[]}function eo(){clearInterval(me)}var Xn=ji(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(),d=!1,c;Fn!==e&&(Fn=e,Ze(),ge=t.scroll,c=t.scrollFn,ge===!0&&(ge=$t(e,!0)));var u=0,p=ge;do{var f=p,g=B(f),y=g.top,H=g.bottom,q=g.left,F=g.right,st=g.width,tt=g.height,ct=void 0,D=void 0,W=f.scrollWidth,ht=f.scrollHeight,G=b(f),xe=f.scrollLeft,Pt=f.scrollTop;f===l?(ct=st<W&&(G.overflowX==="auto"||G.overflowX==="scroll"||G.overflowX==="visible"),D=tt<ht&&(G.overflowY==="auto"||G.overflowY==="scroll"||G.overflowY==="visible")):(ct=st<W&&(G.overflowX==="auto"||G.overflowX==="scroll"),D=tt<ht&&(G.overflowY==="auto"||G.overflowY==="scroll"));var Ee=ct&&(Math.abs(F-o)<=s&&xe+st<W)-(Math.abs(q-o)<=s&&!!xe),xt=D&&(Math.abs(H-r)<=s&&Pt+tt<ht)-(Math.abs(y-r)<=s&&!!Pt);if(!L[u])for(var Ut=0;Ut<=u;Ut++)L[Ut]||(L[Ut]={});(L[u].vx!=Ee||L[u].vy!=xt||L[u].el!==f)&&(L[u].el=f,L[u].vx=Ee,L[u].vy=xt,clearInterval(L[u].pid),(Ee!=0||xt!=0)&&(d=!0,L[u].pid=setInterval((function(){i&&this.layer===0&&v.active._onTouchMove(je);var Se=L[this.layer].vy?L[this.layer].vy*a:0,Dt=L[this.layer].vx?L[this.layer].vx*a:0;typeof c=="function"&&c.call(v.dragged.parentNode[nt],Dt,Se,n,je,L[this.layer].el)!=="continue"||Zi(L[this.layer].el,Dt,Se)}).bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==l&&(p=$t(p,!1)));jn=d}},30),no=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 d=i||r;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),d&&!d.el.contains(u)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function qn(){}qn.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:no},bt(qn,{pluginName:"revertOnSpill"});function Yn(){}Yn.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:no},bt(Yn,{pluginName:"removeOnSpill"}),v.mount(new Ss),v.mount(Yn,qn);const $s=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},_s=(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(),d=n.item.querySelector("eox-layercontrol-layer").layer.get(o),c=l.find(y=>y.get(o)===d),u=r.dataset.layer,p=l.find(y=>y.get(o)==u);let f,g;for(f=0;f<l.length;f++)if(l[f]==c){i.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?i.insertAt(g,c):i.insertAt(g+1,c);break}t.requestUpdate()};function As(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=$s(s),onMove:s=>{r=s.related},onEnd:s=>_s(s,i,o,t,e,r)})}function Cs(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 Wn(n,t,e){let i=[];const o=(r,s,a)=>{i=[...i,...r.filter(d=>d.get(s)===a)];const l=r.filter(d=>d.getLayers);return l.length>0&&l.forEach(d=>o(d.getLayers().getArray(),s,a)),i};return o(n,t,e),i}function Ts(n,t,e){if(!n||!t)return!1;if(!io(n,e))return!0;const i=n.get("minZoom"),o=n.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<o}function io(n,t){const e=n.get("minZoom"),i=n.get("maxZoom");return!!(t&&(e!==-1/0||i!==1/0))}function Ps(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 oo(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=oo(n[o].properties,t);Object.keys(s).length>0&&(e[o]=s)}}return e}function Ds(n,t){var r,s,a,l,d;if(!t)return null;let e={},i="updateStyleVariables"in n?(r=n.style_)==null?void 0:r.variables:(s=t.style)==null?void 0:s.variables;if((t.type==="style"||t.style)&&i)e=i;else if((l=(a=n.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const c=new URL(n.getSource().getTileUrlFunction()([0,0,0]));e=Object.fromEntries(c.searchParams.entries())}else return null;const o=oo(((d=t.schema)==null?void 0:d.properties)||t.schema,e);return Object.keys(o).length?o:null}const Os=(n,t)=>n==null?void 0:n.filter(e=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(e)),Rs=(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")),e==="datetime"&&(i=t.get("layerDatetime")),i}),Hs=(n,t)=>w`
|
|
46
|
-
<button slot="${n}-icon" class="icon">${t?n:
|
|
47
|
-
`,
|
|
45
|
+
*/function Oi(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?Oi(Object(e),!0).forEach(function(i){Gr(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Oi(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function Pe(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(t){return typeof t}:Pe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(n)}function Gr(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 Jr(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 Kr(n,t){if(n==null)return{};var e=Jr(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 Qr="1.15.3";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),Ri=vt(/firefox/i),le=vt(/safari/i)&&!vt(/chrome/i)&&!vt(/android/i),Mi=vt(/iP(ad|od|hone)/i),Ni=vt(/chrome/i)&&vt(/android/i),Ii={capture:!1,passive:!1};function A(n,t,e){n.addEventListener(t,e,!wt&&Ii)}function S(n,t,e){n.removeEventListener(t,e,!wt&&Ii)}function De(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 Hi(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function dt(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&De(n,t):De(n,t))||i&&n===e)return n;if(n===e)break}while(n=Hi(n))}return null}var Bi=/\s+/g;function ot(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Bi," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Bi," ")}}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 Vi(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 V(n,t,e,i,o){if(!(!n.getBoundingClientRect&&n!==window)){var r,s,a,l,d,c,u;if(n!==window&&n.parentNode&&n!==ft()?(r=n.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,d=r.right,c=r.height,u=r.width):(s=0,a=0,l=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=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,d=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,u/=g,c/=y,l=s+c,d=a+u)}return{top:s,left:a,bottom:l,right:d,width:u,height:c}}}function Li(n,t,e){for(var i=$t(n,!0),o=V(n)[t];i;){var r=V(i)[e],s=void 0;if(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)&&dt(s[r],e.draggable,n,!1)){if(o===t)return s[r];o++}r++}return null}function On(n,t){for(var e=n.lastElementChild;e&&(e===v.ghost||b(e,"display")==="none"||t&&!De(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||De(n,t))&&e++;return e}function Ui(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 ts(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 es(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function Rn(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 de;function ki(n,t){return function(){if(!de){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),de=setTimeout(function(){de=void 0},t)}}}function ns(){clearTimeout(de),de=void 0}function Fi(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function ji(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 Zi(n,t,e){var i={};return Array.from(n.children).forEach(function(o){var r,s,a,l;if(!(!dt(o,t.draggable,n,!1)||o.animated||o===e)){var d=V(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,d.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,d.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,d.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var nt="Sortable"+new Date().getTime();function is(){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:V(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(ts(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,d=a.target,c=d.fromRect,u=V(d),p=d.prevFromRect,f=d.prevToRect,g=a.rect,y=jt(d,!0);y&&(u.top-=y.f,u.left-=y.e),d.toRect=u,d.thisAnimationDuration&&Rn(p,u)&&!Rn(c,u)&&(g.top-u.top)/(g.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=rs(g,p,f,o.options)),Rn(u,c)||(d.prevFromRect=c,d.prevToRect=u,l||(l=o.options.animation),o.animate(d,g,u,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.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,d=a&&a.d,c=(o.left-r.left)/(l||1),u=(o.top-r.top)/(d||1);i.animatingX=!!c,i.animatingY=!!u,b(i,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=os(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 os(n){return n.offsetWidth}function rs(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=[],Mn={initializeByDefault:!0},ue={mount:function(t){for(var e in Mn)Mn.hasOwnProperty(e)&&!(e in t)&&(t[e]=Mn[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 d=new a(t,e,t.options);d.sortable=t,d.options=t.options,t[l]=d,bt(i,d.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 ss(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,d=n.newIndex,c=n.oldDraggableIndex,u=n.newDraggableIndex,p=n.originalEvent,f=n.putSortable,g=n.extraEventProperties;if(t=t||e&&e[nt],!!t){var y,M=t.options,q="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=d,y.oldDraggableIndex=c,y.newDraggableIndex=u,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var F=pt(pt({},g),ue.getEventProperties(i,t));for(var st in F)y[st]=F[st];e&&e.dispatchEvent(y),M[q]&&M[q].call(t,y)}}var as=["evt"],it=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=Kr(i,as);ue.pluginEvent.bind(v)(t,e,pt({dragEl:h,parentEl:I,ghostEl:w,rootEl:R,nextEl:Bt,lastDownEl:Oe,cloneEl:N,cloneHidden:_t,dragStarted:he,putSortable:z,activeSortable:v.active,originalEvent:o,oldIndex:Xt,oldDraggableIndex:ce,newIndex:rt,newDraggableIndex:At,hideGhostForTarget:Ji,unhideGhostForTarget:Ki,cloneNowHidden:function(){_t=!0},cloneNowShown:function(){_t=!1},dispatchSortableEvent:function(a){K({sortable:e,name:a,originalEvent:o})}},r))};function K(n){ss(pt({putSortable:z,cloneEl:N,targetEl:h,rootEl:R,oldIndex:Xt,oldDraggableIndex:ce,newIndex:rt,newDraggableIndex:At},n))}var h,I,w,R,Bt,Oe,N,_t,Xt,rt,ce,At,Re,z,qt=!1,Me=!1,Ne=[],Vt,ut,Nn,In,zi,Xi,he,Yt,pe,fe=!1,Ie=!1,He,W,Hn=[],Bn=!1,Be=[],Ve=typeof document<"u",Le=Mi,qi=ae||wt?"cssFloat":"float",ls=Ve&&!Ni&&!Mi&&"draggable"in document.createElement("div"),Yi=function(){if(Ve){if(wt)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Wi=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),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+V(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+V(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 u=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=o&&i[qi]==="none"||s&&i[qi]==="none"&&d+c>o)?"vertical":"horizontal"},ds=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,d=i?e.width:e.height;return o===a||r===l||o+s/2===a+d/2},us=function(t,e){var i;return Ne.some(function(o){var r=o[nt].options.emptyInsertThreshold;if(!(!r||On(o))){var s=V(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},Gi=function(t){function e(r,s){return function(a,l,d,c){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||u))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(a,l,d,c),s)(a,l,d,c);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||Pe(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},Ji=function(){!Yi&&w&&b(w,"display","none")},Ki=function(){!Yi&&w&&b(w,"display","")};Ve&&!Ni&&document.addEventListener("click",function(n){if(Me)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Me=!1,!1},!0);var Lt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=us(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[nt]._onDragOver(i)}}},cs=function(t){h&&h.parentNode[nt]._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[nt]=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 Wi(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};ue.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Gi(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:ls,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,is())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Yt=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,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(vs(i),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&le&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=dt(l,o.draggable,i,!1),!(l&&l.animated)&&Oe!==l)){if(Xt=lt(l),ce=lt(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){K({sortable:e,rootEl:d,name:"filter",targetEl:l,toEl:i,fromEl:i}),it("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=dt(d,u.trim(),i,!1),u)return K({sortable:e,rootEl:u,name:"filter",targetEl:l,fromEl:i,toEl:i}),it("filter",e,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!dt(d,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 d=V(i);if(R=r,h=i,I=h.parentNode,Bt=h.nextSibling,Oe=i,Re=s.group,v.dragged=h,Vt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},zi=Vt.clientX-d.left,Xi=Vt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",l=function(){if(it("delayEnded",o,{evt:t}),v.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Ri&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,e),K({sortable:o,name:"choose",originalEvent:t}),ot(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){Vi(h,c.trim(),Vn)}),A(a,"dragover",Lt),A(a,"mousemove",Lt),A(a,"touchmove",Lt),A(a,"mouseup",o._onDrop),A(a,"touchend",o._onDrop),A(a,"touchcancel",o._onDrop),Ri&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),it("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&&Vn(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(qt=!1,R&&h){it("dragStarted",this,{evt:e}),this.nativeDraggable&&A(document,"dragover",cs);var i=this.options;!t&&ot(h,i.dragClass,!1),ot(h,i.ghostClass,!0),v.active=this,t&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ut){this._lastX=ut.clientX,this._lastY=ut.clientY,Ji();for(var t=document.elementFromPoint(ut.clientX,ut.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ut.clientX,ut.clientY),t!==e);)e=t;if(h.parentNode[nt]._isOutsideThisEl(t),e)do{if(e[nt]){var i=void 0;if(i=e[nt]._onDragOver({clientX:ut.clientX,clientY:ut.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=Hi(e));Ki()}},_onTouchMove:function(t){if(Vt){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,d=Le&&W&&Ui(W),c=(r.clientX-Vt.clientX+o.x)/(a||1)+(d?d[0]-Hn[0]:0)/(a||1),u=(r.clientY-Vt.clientY+o.y)/(l||1)+(d?d[1]-Hn[1]:0)/(l||1);if(!v.active&&!qt){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+=c-(Nn||0),s.f+=u-(In||0)):s={a:1,b:0,c:0,d:1,e:c,f:u};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),Nn=c,In=u,ut=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!w){var t=this.options.fallbackOnBody?document.body:R,e=V(h,!0,Le,!0,t),i=this.options;if(Le){for(W=t;b(W,"position")==="static"&&b(W,"transform")==="none"&&W!==document;)W=W.parentNode;W!==document.body&&W!==document.documentElement?(W===document&&(W=ft()),e.top+=W.scrollTop,e.left+=W.scrollLeft):W=ft(),Hn=Ui(W)}w=h.cloneNode(!0),ot(w,i.ghostClass,!1),ot(w,i.fallbackClass,!0),ot(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",Le?"absolute":"fixed"),b(w,"zIndex","100000"),b(w,"pointerEvents","none"),v.ghost=w,t.appendChild(w),b(w,"transform-origin",zi/parseInt(w.style.width)*100+"% "+Xi/parseInt(w.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,o=t.dataTransfer,r=i.options;if(it("dragStart",this,{evt:t}),v.eventCanceled){this._onDrop();return}it("setupClone",this),v.eventCanceled||(N=ji(h),N.removeAttribute("id"),N.draggable=!1,N.style["will-change"]="",this._hideClone(),ot(N,this.options.chosenClass,!1),v.clone=N),i.cloneId=ke(function(){it("clone",i),!v.eventCanceled&&(i.options.removeCloneOnHide||R.insertBefore(N,h),i._hideClone(),K({sortable:i,name:"clone"}))}),!e&&ot(h,r.dragClass,!0),e?(Me=!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)")),qt=!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,d=v.active,c=Re===l,u=a.sort,p=z||d,f,g=this,y=!1;if(Bn)return;function M(Se,ma){it(Se,g,pt({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:u,fromSortable:p,target:i,completed:F,onMove:function(So,ya){return Ue(R,e,h,o,So,V(So),t,ya)},changed:st},ma))}function q(){M("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function F(Se){return M("dragOverCompleted",{insertion:Se}),Se&&(c?d._hideClone():d._showClone(g),g!==p&&(ot(h,z?z.options.ghostClass:d.options.ghostClass,!1),ot(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(){M("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(Yt=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[nt]._isOutsideThisEl(t.target),!Se&&Lt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function st(){rt=lt(h),At=lt(h,a.draggable),K({sortable:g,name:"change",toEl:e,newIndex:rt,newDraggableIndex:At,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=dt(i,a.draggable,e,!0),M("dragOver"),v.eventCanceled)return y;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return F(!1);if(Me=!1,d&&!a.disabled&&(c?u||(s=I!==R):z===this||(this.lastPutMode=Re.checkPull(this,d,h,t))&&l.checkPut(this,d,h,t))){if(f=this._getDirection(t,i)==="vertical",o=V(h),M("dragOverValid"),v.eventCanceled)return y;if(s)return I=R,q(),this._hideClone(),M("revert"),v.eventCanceled||(Bt?R.insertBefore(h,Bt):R.appendChild(h)),F(!0);var Q=On(e,a.draggable);if(!Q||gs(t,f,this)&&!Q.animated){if(Q===h)return F(!1);if(Q&&e===t.target&&(i=Q),i&&(r=V(i)),Ue(R,e,h,o,i,r,t,!!i)!==!1)return q(),Q&&Q.nextSibling?e.insertBefore(h,Q.nextSibling):e.appendChild(h),I=e,st(),F(!0)}else if(Q&&fs(t,f,this)){var ct=Zt(e,0,a,!0);if(ct===h)return F(!1);if(i=ct,r=V(i),Ue(R,e,h,o,i,r,t,!1)!==!1)return q(),e.insertBefore(h,ct),I=e,st(),F(!0)}else if(i.parentNode===e){r=V(i);var P=0,G,ht=h.parentNode!==e,J=!ds(h.animated&&h.toRect||o,i.animated&&i.toRect||r,f),we=f?"top":"left",Pt=Li(i,"top","top")||Li(h,"top","top"),Ee=Pt?Pt.scrollTop:void 0;Yt!==i&&(G=r[we],fe=!1,Ie=!J&&a.invertSwap||ht),P=ms(t,i,r,f,J?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Ie,Yt===i);var Et;if(P!==0){var Ut=lt(h);do Ut-=P,Et=I.children[Ut];while(Et&&(b(Et,"display")==="none"||Et===w))}if(P===0||Et===i)return F(!1);Yt=i,pe=P;var xe=i.nextElementSibling,Dt=!1;Dt=P===1;var pn=Ue(R,e,h,o,i,r,t,Dt);if(pn!==!1)return(pn===1||pn===-1)&&(Dt=pn===1),Bn=!0,setTimeout(ps,30),q(),Dt&&!xe?e.appendChild(h):i.parentNode.insertBefore(h,Dt?xe:i),Pt&&Fi(Pt,0,Ee-Pt.scrollTop),I=h.parentNode,G!==void 0&&!Ie&&(He=Math.abs(G-V(i)[we])),st(),F(!0)}if(e.contains(h))return F(!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",Lt),S(document,"mousemove",Lt),S(document,"touchmove",Lt)},_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(rt=lt(h),At=lt(h,i.draggable),it("drop",this,{evt:t}),I=h&&h.parentNode,rt=lt(h),At=lt(h,i.draggable),v.eventCanceled){this._nulling();return}qt=!1,Ie=!1,fe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ln(this.cloneId),Ln(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")&&N&&N.parentNode&&N.parentNode.removeChild(N),h&&(this.nativeDraggable&&S(h,"dragend",this),Vn(h),h.style["will-change"]="",he&&!qt&&ot(h,z?z.options.ghostClass:this.options.ghostClass,!1),ot(h,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:I,newIndex:null,newDraggableIndex:null,originalEvent:t}),R!==I?(rt>=0&&(K({rootEl:I,name:"add",toEl:I,fromEl:R,originalEvent:t}),K({sortable:this,name:"remove",toEl:I,originalEvent:t}),K({rootEl:I,name:"sort",toEl:I,fromEl:R,originalEvent:t}),K({sortable:this,name:"sort",toEl:I,originalEvent:t})),z&&z.save()):rt!==Xt&&rt>=0&&(K({sortable:this,name:"update",toEl:I,originalEvent:t}),K({sortable:this,name:"sort",toEl:I,originalEvent:t})),v.active&&((rt==null||rt===-1)&&(rt=Xt,At=ce),K({sortable:this,name:"end",toEl:I,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){it("nulling",this),R=h=I=w=Bt=N=Oe=_t=Vt=ut=he=rt=At=Xt=ce=Yt=pe=z=Re=v.dragged=v.ghost=v.clone=v.active=null,Be.forEach(function(t){t.checked=!0}),Be.length=Nn=In=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),hs(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],dt(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||bs(e));return t},sort:function(t,e){var i={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];dt(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 dt(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"&&Gi(i)},destroy:function(){it("destroy",this);var t=this.el;t[nt]=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(it("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(it("showClone",this),v.eventCanceled)return;h.parentNode==R&&!this.options.group.revertClone?R.insertBefore(N,h):Bt?R.insertBefore(N,Bt):R.appendChild(N),this.options.group.revertClone&&this.animate(h,N),b(N,"display",""),_t=!1}}};function hs(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Ue(n,t,e,i,o,r,s,a){var l,d=n[nt],c=d.options.onMove,u;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||V(t),l.willInsertAfter=a,l.originalEvent=s,n.dispatchEvent(l),c&&(u=c.call(d,l,s)),u}function Vn(n){n.draggable=!1}function ps(){Bn=!1}function fs(n,t,e){var i=V(Zt(e.el,0,e.options,!0)),o=Zi(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 gs(n,t,e){var i=V(On(e.el,e.options.draggable)),o=Zi(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 ms(n,t,e,i,o,r,s,a){var l=i?n.clientY:n.clientX,d=i?e.height:e.width,c=i?e.top:e.left,u=i?e.bottom:e.right,p=!1;if(!s){if(a&&He<d*o){if(!fe&&(pe===1?l>c+d*r/2:l<u-d*r/2)&&(fe=!0),fe)p=!0;else if(pe===1?l<c+He:l>u-He)return-pe}else if(l>c+d*(1-o)/2&&l<u-d*(1-o)/2)return ys(t)}return p=p||s,p&&(l<c+d*r/2||l>u-d*r/2)?l>c+d/2?1:-1:0}function ys(n){return lt(h)<lt(n)?1:-1}function bs(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 vs(n){Be.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&Be.push(i)}}function ke(n){return setTimeout(n,0)}function Ln(n){return clearTimeout(n)}Ve&&A(document,"touchmove",function(n){(v.active||qt)&&n.cancelable&&n.preventDefault()}),v.utils={on:A,off:S,css:b,find:Vi,is:function(t,e){return!!dt(t,e,t,!1)},extend:es,throttle:ki,closest:dt,toggleClass:ot,clone:ji,index:lt,nextTick:ke,cancelNextTick:Ln,detectDirection:Wi,getChild:Zt,expando:nt},v.get=function(n){return n[nt]},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=Qr;var L=[],ge,Un,kn=!1,Fn,jn,Fe,me;function ws(){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)),Qi(),je(),ns()},nulling:function(){Fe=Un=ge=kn=me=Fn=jn=null,L.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(Fe=e,i||this.options.forceAutoScrollFallback||ae||wt||le){Zn(e,this.options,a,i);var l=$t(a,!0);kn&&(!me||r!==Fn||s!==jn)&&(me&&Qi(),me=setInterval(function(){var d=$t(document.elementFromPoint(r,s),!0);d!==l&&(l=d,je()),Zn(e,o.options,d,i)},10),Fn=r,jn=s)}else{if(!this.options.bubbleScroll||$t(a,!0)===ft()){je();return}Zn(e,this.options,$t(a,!1),!1)}}},bt(n,{pluginName:"scroll",initializeByDefault:!0})}function je(){L.forEach(function(n){clearInterval(n.pid)}),L=[]}function Qi(){clearInterval(me)}var Zn=ki(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(),d=!1,c;Un!==e&&(Un=e,je(),ge=t.scroll,c=t.scrollFn,ge===!0&&(ge=$t(e,!0)));var u=0,p=ge;do{var f=p,g=V(f),y=g.top,M=g.bottom,q=g.left,F=g.right,st=g.width,Q=g.height,ct=void 0,P=void 0,G=f.scrollWidth,ht=f.scrollHeight,J=b(f),we=f.scrollLeft,Pt=f.scrollTop;f===l?(ct=st<G&&(J.overflowX==="auto"||J.overflowX==="scroll"||J.overflowX==="visible"),P=Q<ht&&(J.overflowY==="auto"||J.overflowY==="scroll"||J.overflowY==="visible")):(ct=st<G&&(J.overflowX==="auto"||J.overflowX==="scroll"),P=Q<ht&&(J.overflowY==="auto"||J.overflowY==="scroll"));var Ee=ct&&(Math.abs(F-o)<=s&&we+st<G)-(Math.abs(q-o)<=s&&!!we),Et=P&&(Math.abs(M-r)<=s&&Pt+Q<ht)-(Math.abs(y-r)<=s&&!!Pt);if(!L[u])for(var Ut=0;Ut<=u;Ut++)L[Ut]||(L[Ut]={});(L[u].vx!=Ee||L[u].vy!=Et||L[u].el!==f)&&(L[u].el=f,L[u].vx=Ee,L[u].vy=Et,clearInterval(L[u].pid),(Ee!=0||Et!=0)&&(d=!0,L[u].pid=setInterval((function(){i&&this.layer===0&&v.active._onTouchMove(Fe);var xe=L[this.layer].vy?L[this.layer].vy*a:0,Dt=L[this.layer].vx?L[this.layer].vx*a:0;typeof c=="function"&&c.call(v.dragged.parentNode[nt],Dt,xe,n,Fe,L[this.layer].el)!=="continue"||Fi(L[this.layer].el,Dt,xe)}).bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==l&&(p=$t(p,!1)));kn=d}},30),to=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 d=i||r;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),d&&!d.el.contains(u)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function zn(){}zn.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:to},bt(zn,{pluginName:"revertOnSpill"});function Xn(){}Xn.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:to},bt(Xn,{pluginName:"removeOnSpill"}),v.mount(new ws),v.mount(Xn,zn);const Es=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},xs=(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(),d=n.item.querySelector("eox-layercontrol-layer").layer.get(o),c=l.find(y=>y.get(o)===d),u=r.dataset.layer,p=l.find(y=>y.get(o)==u);let f,g;for(f=0;f<l.length;f++)if(l[f]==c){i.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?i.insertAt(g,c):i.insertAt(g+1,c);break}t.requestUpdate()};function Ss(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=Es(s),onMove:s=>{r=s.related},onEnd:s=>xs(s,i,o,t,e,r)})}function $s(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 qn(n,t,e){let i=[];const o=(r,s,a)=>{i=[...i,...r.filter(d=>d.get(s)===a)];const l=r.filter(d=>d.getLayers);return l.length>0&&l.forEach(d=>o(d.getLayers().getArray(),s,a)),i};return o(n,t,e),i}function _s(n,t,e){if(!n||!t)return!1;if(!eo(n,e))return!0;const i=n.get("minZoom"),o=n.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<o}function eo(n,t){const e=n.get("minZoom"),i=n.get("maxZoom");return!!(t&&(e!==-1/0||i!==1/0))}function As(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 no(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=no(n[o].properties,t);Object.keys(s).length>0&&(e[o]=s)}}return e}function Cs(n,t){var r,s,a,l,d;if(!t)return null;let e={},i="updateStyleVariables"in n?(r=n.style_)==null?void 0:r.variables:(s=t.style)==null?void 0:s.variables;if((t.type==="style"||t.style)&&i)e=i;else if((l=(a=n.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const c=new URL(n.getSource().getTileUrlFunction()([0,0,0]));e=Object.fromEntries(c.searchParams.entries())}else return null;const o=no(((d=t.schema)==null?void 0:d.properties)||t.schema,e);return Object.keys(o).length?o:null}const Ts=(n,t)=>n==null?void 0:n.filter(e=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(e)),Ps=(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")),e==="datetime"&&(i=t.get("layerDatetime")),i}),Ds=(n,t)=>E`
|
|
46
|
+
<button slot="${n}-icon" class="icon">${t?n:T}</button>
|
|
47
|
+
`,Os=n=>E`
|
|
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
|
-
${n.unstyled?"x":
|
|
52
|
+
${n.unstyled?"x":T}
|
|
53
53
|
</button>
|
|
54
|
-
`,
|
|
54
|
+
`,Rs=n=>E`
|
|
55
55
|
<span class="button sort-icon icon drag-handle">
|
|
56
|
-
${n?"═":
|
|
56
|
+
${n?"═":T}
|
|
57
57
|
</span>
|
|
58
|
-
`,
|
|
58
|
+
`,io=n=>{var e;const t=["layerControlHide","layerControlOptional"];return(e=n==null?void 0:n.getArray())==null?void 0:e.filter(i=>t.every(o=>!i.get(o)))};/**
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2020 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
-
*/const
|
|
62
|
+
*/const oo=$n(class extends _n{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(!Jo(n))throw Error("`live` bindings can only contain a single expression")}render(n){return n}update(n,[t]){if(t===at||t===T)return t;const e=n.element,i=n.name;if(n.type===St.PROPERTY){if(t===e[i])return at}else if(n.type===St.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return at}else if(n.type===St.ATTRIBUTE&&e.getAttribute(i)===t+"")return at;return Ei(n),t}});/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/class
|
|
66
|
+
*/class Yn extends _n{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===at)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:[]}}}Yn.directiveName="unsafeHTML",Yn.resultType=1;const Ms=$n(Yn);/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/function*
|
|
70
|
+
*/function*Ze(n,t){if(n!==void 0){let e=0;for(const i of n)yield t(i,e++)}}const Ns=(n,t,e)=>{let i=t;return e.layer.getSource().getTileUrlFunction()&&(i||(i=e.layer.getSource().getTileUrlFunction()),e.layer.getSource().setTileUrlFunction((...o)=>Wr(i(...o),n)),e.layer.getSource().setKey(new Date)),i};function Is(n,t,e){const i="updateStyleVariables"in t,o="setStyle"in t,r=i?t.style_:e.style;let s=r==null?void 0:r.variables;if(s){const a=ro(n);if(r.variables={...s,...a},i)t.updateStyleVariables(a);else if(o){const l=Hs(r);t.setStyle(l)}}}const ro=n=>{const t={};for(const e in n)if(typeof n[e]=="object"&&n[e]!==null){const i=ro(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 Hs(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 Bs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vs="Expected a function",so=NaN,Ls="[object Symbol]",Us=/^\s+|\s+$/g,ks=/^[-+]0x[0-9a-f]+$/i,Fs=/^0b[01]+$/i,js=/^0o[0-7]+$/i,Zs=parseInt,zs=typeof ze=="object"&&ze&&ze.Object===Object&&ze,Xs=typeof self=="object"&&self&&self.Object===Object&&self,qs=zs||Xs||Function("return this")(),Ys=Object.prototype,Ws=Ys.toString,Gs=Math.max,Js=Math.min,Wn=function(){return qs.Date.now()};function Ks(n,t,e){var i,o,r,s,a,l,d=0,c=!1,u=!1,p=!0;if(typeof n!="function")throw new TypeError(Vs);t=ao(t)||0,Gn(e)&&(c=!!e.leading,u="maxWait"in e,r=u?Gs(ao(e.maxWait)||0,t):r,p="trailing"in e?!!e.trailing:p);function f(P){var G=i,ht=o;return i=o=void 0,d=P,s=n.apply(ht,G),s}function g(P){return d=P,a=setTimeout(q,t),c?f(P):s}function y(P){var G=P-l,ht=P-d,J=t-G;return u?Js(J,r-ht):J}function M(P){var G=P-l,ht=P-d;return l===void 0||G>=t||G<0||u&&ht>=r}function q(){var P=Wn();if(M(P))return F(P);a=setTimeout(q,y(P))}function F(P){return a=void 0,p&&i?f(P):(i=o=void 0,s)}function st(){a!==void 0&&clearTimeout(a),d=0,i=l=o=a=void 0}function Q(){return a===void 0?s:F(Wn())}function ct(){var P=Wn(),G=M(P);if(i=arguments,o=this,l=P,G){if(a===void 0)return g(l);if(u)return a=setTimeout(q,t),f(l)}return a===void 0&&(a=setTimeout(q,t)),s}return ct.cancel=st,ct.flush=Q,ct}function Gn(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function Qs(n){return!!n&&typeof n=="object"}function ta(n){return typeof n=="symbol"||Qs(n)&&Ws.call(n)==Ls}function ao(n){if(typeof n=="number")return n;if(ta(n))return so;if(Gn(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Gn(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(Us,"");var e=Fs.test(n);return e||js.test(n)?Zs(n.slice(2),e?2:8):ks.test(n)?so:+n}var ea=Ks;const lo=Bs(ea);class uo extends tt{constructor(){super();D(this,Xe);D(this,Wt,{});D(this,ye,null);D(this,be);D(this,qe,"");D(this,Ye,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.debouncedDataChange=lo(U(this,Xe,Ao),1e3,{leading:!0})}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){$e(this,ye,Cs(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 E`
|
|
71
71
|
<style>
|
|
72
72
|
${O(this,qe)}
|
|
73
73
|
${!this.unstyled&&O(this,Ye)}
|
|
74
74
|
</style>
|
|
75
|
-
${
|
|
75
|
+
${Y(this.layerConfig,()=>E`
|
|
76
76
|
<!-- Render a JSON form for layer configuration -->
|
|
77
77
|
<eox-jsonform
|
|
78
78
|
.schema=${this.layerConfig.schema}
|
|
79
|
-
.value=${O(this,
|
|
79
|
+
.value=${O(this,ye)}
|
|
80
80
|
.options=${e}
|
|
81
81
|
@change=${this.debouncedDataChange}
|
|
82
82
|
></eox-jsonform>
|
|
83
83
|
`)}
|
|
84
|
-
`}}Wt=new WeakMap,
|
|
84
|
+
`}}Wt=new WeakMap,ye=new WeakMap,be=new WeakMap,Xe=new WeakSet,Ao=function(e){$e(this,Wt,e.detail),this.layerConfig.type==="style"||this.layerConfig.style?"setStyle"in this.layer||"updateStyleVariables"in this.layer?Is(O(this,Wt),this.layer,this.layerConfig):console.error(`Layer type ${this.layer.get("type")??""} does not support styles configuration`):($e(this,be,Ns(O(this,Wt),O(this,be),this)),this.requestUpdate())},qe=new WeakMap,Ye=new WeakMap,B(uo,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",uo);class co extends tt{constructor(){super();D(this,We);D(this,Ge,"");D(this,Je,"");this.unstyled=!1,this.noShadow=!1,this.layerDatetime=null,this.layer=null}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return customElements.get("eox-timecontrol")||console.error("Please import @eox/timecontrol in order to use layerDatetime"),E`
|
|
85
85
|
<style>
|
|
86
86
|
${O(this,Ge)}
|
|
87
87
|
${!this.unstyled&&O(this,Je)}
|
|
88
88
|
</style>
|
|
89
|
-
${
|
|
89
|
+
${Y(this.layerDatetime,()=>E`
|
|
90
90
|
<!-- Render a Timecontrol for layer date time -->
|
|
91
91
|
<eox-timecontrol
|
|
92
92
|
?unstyled=${this.unstyled}
|
|
@@ -97,10 +97,10 @@
|
|
|
97
97
|
.controlValues=${this.layerDatetime.controlValues}
|
|
98
98
|
.controlProperty=${void 0}
|
|
99
99
|
current-step=${this.layerDatetime.currentStep}
|
|
100
|
-
@stepchange=${U(this,We,
|
|
100
|
+
@stepchange=${U(this,We,Co)}
|
|
101
101
|
></eox-timecontrol>
|
|
102
102
|
`)}
|
|
103
|
-
`}}We=new WeakSet,
|
|
103
|
+
`}}We=new WeakSet,Co=function(e){this.dispatchEvent(new CustomEvent("datetime:updated",{bubbles:!0,detail:{datetime:e.detail.currentStep,layer:this.layer}})),this.layerDatetime.currentStep=e.detail.currentStep,this.requestUpdate()},Ge=new WeakMap,Je=new WeakMap,B(co,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerDatetime:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-datetime",co);class ho extends tt{constructor(){super();D(this,ve,e=>(this.selectedTab===e||this.disableTabs)&&"highlighted");D(this,Ke,`
|
|
104
104
|
.tabbed figure {
|
|
105
105
|
margin: 0;
|
|
106
106
|
}
|
|
@@ -120,7 +120,12 @@
|
|
|
120
120
|
.tabbed label.highlighted {
|
|
121
121
|
background: lightgrey;
|
|
122
122
|
}
|
|
123
|
-
`);
|
|
123
|
+
`);D(this,Qe,`
|
|
124
|
+
.listed {
|
|
125
|
+
background: #ffffff !important;
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: end;
|
|
128
|
+
}
|
|
124
129
|
.tabbed {
|
|
125
130
|
font-size: small;
|
|
126
131
|
}
|
|
@@ -141,125 +146,57 @@
|
|
|
141
146
|
background: #00417011;
|
|
142
147
|
border-top: 1px solid #0041701a;
|
|
143
148
|
}
|
|
144
|
-
`);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
|
|
149
|
+
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1,this.disableTabs=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.tabs,i=this.actions,o=i.length+e.length>1;return E`
|
|
145
150
|
<style>
|
|
146
151
|
${O(this,Ke)}
|
|
147
152
|
${!this.unstyled&&O(this,Qe)}
|
|
148
153
|
</style>
|
|
149
154
|
<div class="tabbed">
|
|
150
155
|
<!-- Navigation for tabs and actions -->
|
|
151
|
-
${
|
|
156
|
+
${Y(o,()=>E`
|
|
152
157
|
<nav>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
158
|
+
${Y(!this.disableTabs,()=>E`
|
|
159
|
+
<div>
|
|
160
|
+
<!-- Labels for tabs -->
|
|
161
|
+
${Ze(e,(r,s)=>E`
|
|
162
|
+
<label
|
|
163
|
+
class=${O(this,ve).call(this,s)}
|
|
164
|
+
@click=${()=>this.selectedTab=s}
|
|
165
|
+
>
|
|
166
|
+
<!-- Customizable icon for each tab -->
|
|
167
|
+
<slot name=${`${r}-icon`}>${r}</slot>
|
|
168
|
+
</label>
|
|
169
|
+
`)}
|
|
170
|
+
</div>
|
|
171
|
+
<div>
|
|
172
|
+
<!-- Icons for actions -->
|
|
173
|
+
${Ze(i,r=>E`
|
|
174
|
+
<span>
|
|
175
|
+
<!-- Customizable icon for each action -->
|
|
176
|
+
<slot name=${`${r}-icon`}>${r}</slot>
|
|
177
|
+
</span>
|
|
178
|
+
`)}
|
|
179
|
+
</div>
|
|
180
|
+
`)}
|
|
174
181
|
</nav>
|
|
175
182
|
`)}
|
|
176
183
|
<figure>
|
|
177
184
|
<!-- Content for each tab -->
|
|
178
|
-
${
|
|
179
|
-
|
|
185
|
+
${Ze(e,(r,s)=>E`
|
|
186
|
+
${Y(this.disableTabs,()=>E`
|
|
187
|
+
<label class="listed">
|
|
188
|
+
<!-- Customizable icon for each tab -->
|
|
189
|
+
<slot name=${`${r}-icon`}>${r}</slot>
|
|
190
|
+
</label>
|
|
191
|
+
`)}
|
|
192
|
+
<div class="tab ${O(this,ve).call(this,s)}">
|
|
180
193
|
<!-- Content slot for each tab -->
|
|
181
194
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
182
195
|
</div>
|
|
183
196
|
`)}
|
|
184
197
|
</figure>
|
|
185
198
|
</div>
|
|
186
|
-
`}}
|
|
187
|
-
.toollist figure {
|
|
188
|
-
margin: 0;
|
|
189
|
-
}
|
|
190
|
-
.toolrow {
|
|
191
|
-
margin-top: 2px;
|
|
192
|
-
margin-bottom: 2px;
|
|
193
|
-
}
|
|
194
|
-
`);C(this,en,`
|
|
195
|
-
.containerpanel {
|
|
196
|
-
border-radius: 3px 3px 3px 3px;
|
|
197
|
-
-webkit-border-radius: 3px 3px 3px 3px;
|
|
198
|
-
-moz-border-radius: 3px 3px 3px 3px;
|
|
199
|
-
border: 1px solid #eee;
|
|
200
|
-
}
|
|
201
|
-
.toollist {
|
|
202
|
-
font-size: small;
|
|
203
|
-
}
|
|
204
|
-
.toollist label.highlighted {
|
|
205
|
-
pointer-events: none;
|
|
206
|
-
}
|
|
207
|
-
nav div label,
|
|
208
|
-
nav div span {
|
|
209
|
-
width: 20px;
|
|
210
|
-
height: 20px;
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
justify-content: center;
|
|
214
|
-
cursor: pointer;
|
|
215
|
-
}
|
|
216
|
-
figure {
|
|
217
|
-
border-top: 1px solid #0041701a;
|
|
218
|
-
}
|
|
219
|
-
.icon {
|
|
220
|
-
height: 18px;
|
|
221
|
-
float: right;
|
|
222
|
-
filter: grayscale(1.0);
|
|
223
|
-
opacity: 0.8;
|
|
224
|
-
}
|
|
225
|
-
.info-icon,
|
|
226
|
-
button.icon[slot=info-icon]::before {
|
|
227
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Einformation-outline%3C/title%3E%3Cpath d='M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 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,2M11,17H13V11H11V17Z' /%3E%3C/svg%3E");
|
|
228
|
-
}
|
|
229
|
-
.opacity-icon,
|
|
230
|
-
button.icon[slot=opacity-icon]::before {
|
|
231
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eopacity%3C/title%3E%3Cpath d='M17.66,8L12,2.35L6.34,8C4.78,9.56 4,11.64 4,13.64C4,15.64 4.78,17.75 6.34,19.31C7.9,20.87 9.95,21.66 12,21.66C14.05,21.66 16.1,20.87 17.66,19.31C19.22,17.75 20,15.64 20,13.64C20,11.64 19.22,9.56 17.66,8M6,14C6,12 6.62,10.73 7.76,9.6L12,5.27L16.24,9.65C17.38,10.77 18,12 18,14H6Z' /%3E%3C/svg%3E");
|
|
232
|
-
}
|
|
233
|
-
.config-icon,
|
|
234
|
-
button.icon[slot=config-icon]::before {
|
|
235
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Etune%3C/title%3E%3Cpath d='M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z' /%3E%3C/svg%3E");
|
|
236
|
-
}
|
|
237
|
-
.single-action .remove-icon::before,
|
|
238
|
-
[slot=remove-icon] button.icon::before {
|
|
239
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ff0000' viewBox='0 0 24 24'%3E%3Ctitle%3Edelete-outline%3C/title%3E%3Cpath d='M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z' /%3E%3C/svg%3E");
|
|
240
|
-
}
|
|
241
|
-
`);this.listitems=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.listitems;return w`
|
|
242
|
-
<style>
|
|
243
|
-
${O(this,tn)}
|
|
244
|
-
${!this.unstyled&&O(this,en)}
|
|
245
|
-
</style>
|
|
246
|
-
<div class="toollist">
|
|
247
|
-
<figure>
|
|
248
|
-
<!-- Content of tool -->
|
|
249
|
-
${ye(e,i=>w`
|
|
250
|
-
<div class="toolrow">
|
|
251
|
-
<div style="height: 22px;">
|
|
252
|
-
<div class="icon ${i}-icon"></div>
|
|
253
|
-
</div>
|
|
254
|
-
<!-- Content slot for each tab -->
|
|
255
|
-
<div class="containerpanel">
|
|
256
|
-
<slot name=${`${i}-content`}>${i}</slot>
|
|
257
|
-
</div>
|
|
258
|
-
</div>
|
|
259
|
-
`)}
|
|
260
|
-
</figure>
|
|
261
|
-
</div>
|
|
262
|
-
`}}tn=new WeakMap,en=new WeakMap,I(go,"properties",{listitems:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-list",go);const ra=`
|
|
199
|
+
`}}ve=new WeakMap,Ke=new WeakMap,Qe=new WeakMap,B(ho,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},disableTabs:{type:Boolean}}),customElements.define("eox-layercontrol-tools-items",ho);const na=`
|
|
263
200
|
button,
|
|
264
201
|
.button {
|
|
265
202
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -383,7 +320,7 @@ button.smallest.icon::before {
|
|
|
383
320
|
width: 16px;
|
|
384
321
|
padding: 0px;
|
|
385
322
|
}
|
|
386
|
-
`,
|
|
323
|
+
`,ia=`
|
|
387
324
|
input[type=radio] {
|
|
388
325
|
appearance: none;
|
|
389
326
|
-webkit-appearance: none;
|
|
@@ -411,7 +348,7 @@ input[type=radio]:checked:after {
|
|
|
411
348
|
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");
|
|
412
349
|
|
|
413
350
|
}
|
|
414
|
-
`,
|
|
351
|
+
`,po=`
|
|
415
352
|
input[type=checkbox] {
|
|
416
353
|
appearance: none;
|
|
417
354
|
-webkit-appearance: none;
|
|
@@ -434,7 +371,7 @@ input[type=checkbox]:checked:after {
|
|
|
434
371
|
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");
|
|
435
372
|
|
|
436
373
|
}
|
|
437
|
-
`,
|
|
374
|
+
`,oa=`
|
|
438
375
|
input[type="range"] {
|
|
439
376
|
-webkit-appearance: none;
|
|
440
377
|
width: 90%;
|
|
@@ -511,13 +448,13 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
511
448
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
512
449
|
border: 0;
|
|
513
450
|
}
|
|
514
|
-
`;class
|
|
451
|
+
`;class fo extends tt{constructor(){super();B(this,"_removeButton",()=>Os(this));B(this,"_sortButton",()=>Rs(this.unstyled));B(this,"_button",e=>Ds(e,this.unstyled));B(this,"_getDefaultTools",()=>{var e;return E`
|
|
515
452
|
<div slot="info-content">
|
|
516
|
-
${
|
|
453
|
+
${Ms(this.layer.get("description"))}
|
|
517
454
|
</div>
|
|
518
455
|
<div slot="datetime-content">
|
|
519
456
|
<!-- Layer datetime -->
|
|
520
|
-
${
|
|
457
|
+
${Y(this.layer.get("layerDatetime"),()=>E`
|
|
521
458
|
<eox-layercontrol-layer-datetime
|
|
522
459
|
slot="datetime-content"
|
|
523
460
|
.noShadow=${!0}
|
|
@@ -535,13 +472,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
535
472
|
min="0"
|
|
536
473
|
max="1"
|
|
537
474
|
step="0.01"
|
|
538
|
-
value=${
|
|
475
|
+
value=${oo((e=this.layer)==null?void 0:e.getOpacity())}
|
|
539
476
|
@input=${i=>this.layer.setOpacity(parseFloat(i.target.value))}
|
|
540
477
|
/>
|
|
541
478
|
</div>
|
|
542
479
|
<div slot="config-content">
|
|
543
480
|
<!-- Layer configuration -->
|
|
544
|
-
${
|
|
481
|
+
${Y(this.layer.get("layerConfig"),()=>E`
|
|
545
482
|
<eox-layercontrol-layerconfig
|
|
546
483
|
slot="config-content"
|
|
547
484
|
.layer=${this.layer}
|
|
@@ -554,11 +491,11 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
554
491
|
</div>
|
|
555
492
|
<div slot="remove-icon">${this._removeButton()}</div>
|
|
556
493
|
<div slot="sort-icon">${this._sortButton()}</div>
|
|
557
|
-
`});
|
|
558
|
-
${
|
|
559
|
-
${
|
|
560
|
-
${
|
|
561
|
-
${
|
|
494
|
+
`});D(this,tn,"");D(this,en,`
|
|
495
|
+
${na}
|
|
496
|
+
${ia}
|
|
497
|
+
${po}
|
|
498
|
+
${oa}
|
|
562
499
|
.drag-handle {
|
|
563
500
|
cursor: n-resize;
|
|
564
501
|
}
|
|
@@ -593,21 +530,27 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
593
530
|
}
|
|
594
531
|
.single-action,
|
|
595
532
|
details.tools summary,
|
|
596
|
-
eox-layercontrol-
|
|
533
|
+
eox-layercontrol-tools-items button.icon {
|
|
597
534
|
transition: opacity .2s;
|
|
598
535
|
}
|
|
599
536
|
.single-action,
|
|
600
537
|
details.tools summary {
|
|
601
538
|
opacity: .5;
|
|
602
539
|
}
|
|
603
|
-
eox-layercontrol-
|
|
540
|
+
eox-layercontrol-tools-items button.icon {
|
|
604
541
|
opacity: .7;
|
|
605
542
|
}
|
|
543
|
+
eox-layercontrol-tools-items.tools-list button.icon {
|
|
544
|
+
cursor: auto;
|
|
545
|
+
}
|
|
606
546
|
.single-action:hover,
|
|
607
547
|
details.tools summary:hover,
|
|
608
|
-
eox-layercontrol-
|
|
548
|
+
eox-layercontrol-tools-items button.icon:hover {
|
|
609
549
|
opacity: 1;
|
|
610
550
|
}
|
|
551
|
+
eox-layercontrol-tools-items.tools-list button.icon:hover {
|
|
552
|
+
opacity: .7;
|
|
553
|
+
}
|
|
611
554
|
.tools-placeholder,
|
|
612
555
|
.single-action .icon,
|
|
613
556
|
.single-action .icon::before,
|
|
@@ -616,13 +559,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
616
559
|
height: 16px;
|
|
617
560
|
width: 16px;
|
|
618
561
|
}
|
|
619
|
-
eox-layercontrol-
|
|
620
|
-
eox-layercontrol-
|
|
562
|
+
eox-layercontrol-tools-items button.icon,
|
|
563
|
+
eox-layercontrol-tools-items .button.icon {
|
|
621
564
|
display: flex;
|
|
622
565
|
justify-content: center;
|
|
623
566
|
}
|
|
624
|
-
eox-layercontrol-
|
|
625
|
-
eox-layercontrol-
|
|
567
|
+
eox-layercontrol-tools-items button.icon::before,
|
|
568
|
+
eox-layercontrol-tools-items .button.icon::before {
|
|
626
569
|
width: 16px;
|
|
627
570
|
height: 16px;
|
|
628
571
|
}
|
|
@@ -654,47 +597,42 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
654
597
|
[slot=opacity-content] {
|
|
655
598
|
padding: 12px 6px;
|
|
656
599
|
}
|
|
657
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.disableTabs=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=
|
|
600
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.disableTabs=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=Ts(this.tools,this.layer),i=Ps(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 E`
|
|
658
601
|
<style>
|
|
659
|
-
${O(this,
|
|
660
|
-
${!this.unstyled&&O(this,
|
|
602
|
+
${O(this,tn)}
|
|
603
|
+
${!this.unstyled&&O(this,en)}
|
|
661
604
|
</style>
|
|
662
|
-
${
|
|
663
|
-
${
|
|
605
|
+
${Y(s+a>0,()=>E`
|
|
606
|
+
${Y(s===1&&a===0,()=>E`
|
|
664
607
|
<div class="single-action-container">
|
|
665
608
|
<div class="single-action">${o}</div>
|
|
666
609
|
</div>
|
|
667
|
-
`,()=>
|
|
610
|
+
`,()=>E`
|
|
668
611
|
<details
|
|
669
612
|
class="tools"
|
|
670
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
613
|
+
open=${this.layer.get("layerControlToolsExpand")||T}
|
|
671
614
|
>
|
|
672
615
|
<summary>
|
|
673
616
|
<button class="icon ${r}">Tools</button>
|
|
674
617
|
</summary>
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
<!-- Rendering tabs and content -->
|
|
689
|
-
${ye(i,d=>this._button(d))}
|
|
690
|
-
<!-- Including default tools -->
|
|
691
|
-
${this._getDefaultTools()}
|
|
692
|
-
</eox-layercontrol-tabs>`)}
|
|
618
|
+
<eox-layercontrol-tools-items
|
|
619
|
+
class="${this.disableTabs?"tools-list":"tools-tab"}"
|
|
620
|
+
.noShadow=${!1}
|
|
621
|
+
.actions=${e}
|
|
622
|
+
.tabs=${i}
|
|
623
|
+
.unstyled=${this.unstyled}
|
|
624
|
+
.disableTabs=${this.disableTabs}
|
|
625
|
+
>
|
|
626
|
+
<!-- Rendering tabs and content -->
|
|
627
|
+
${Ze(i,d=>this._button(d))}
|
|
628
|
+
<!-- Including default tools -->
|
|
629
|
+
${this._getDefaultTools()}
|
|
630
|
+
</eox-layercontrol-tools-items>
|
|
693
631
|
</details>
|
|
694
632
|
`)}
|
|
695
633
|
`)}
|
|
696
|
-
`}}
|
|
697
|
-
${
|
|
634
|
+
`}}tn=new WeakMap,en=new WeakMap,B(fo,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},disableTabs:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",fo);const ra=n=>{const t=()=>{const e=_s(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})))};eo(n.layer,n.showLayerZoomState)&&(t(),n.map.getView().on("change:resolution",()=>t()))},sa=(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 go extends tt{constructor(){super();D(this,Ct);B(this,"currLayerVisibilityBasedOnZoom",!0);D(this,nn,"");D(this,on,`
|
|
635
|
+
${po}
|
|
698
636
|
eox-layercontrol-layer {
|
|
699
637
|
width: 100%;
|
|
700
638
|
}
|
|
@@ -734,25 +672,25 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
734
672
|
[data-type=draw] .title::before {
|
|
735
673
|
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");
|
|
736
674
|
}
|
|
737
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.disableTabs=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){
|
|
675
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.disableTabs=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){ra(this)}render(){var l;const e=this.layer.getVisible(),i=e?"visible":"",o=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",r=U(this,Ct,fn).call(this,"layerControlDisable")?"disabled":"",s=U(this,Ct,fn).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return E`
|
|
738
676
|
<style>
|
|
739
|
-
${O(this,
|
|
740
|
-
${!this.unstyled&&O(this,
|
|
677
|
+
${O(this,nn)}
|
|
678
|
+
${!this.unstyled&&O(this,on)}
|
|
741
679
|
</style>
|
|
742
|
-
${
|
|
680
|
+
${Y(this.layer,()=>E`
|
|
743
681
|
<!-- Render the layer -->
|
|
744
682
|
<div class="layer ${i} ${o}">
|
|
745
683
|
<label class="drag-handle ${r}">
|
|
746
684
|
<!-- Input element for layer visibility -->
|
|
747
685
|
<input
|
|
748
686
|
type=${s}
|
|
749
|
-
.checked=${
|
|
750
|
-
@click=${U(this,Ct,
|
|
687
|
+
.checked=${oo(e)}
|
|
688
|
+
@click=${U(this,Ct,To)}
|
|
751
689
|
/>
|
|
752
690
|
|
|
753
691
|
<!-- Layer title -->
|
|
754
|
-
<span class="title">${U(this,Ct,
|
|
755
|
-
${
|
|
692
|
+
<span class="title">${U(this,Ct,fn).call(this,this.titleProperty)}</span>
|
|
693
|
+
${Y(a,()=>E`<span class="tools-placeholder"></span>`)}
|
|
756
694
|
</label>
|
|
757
695
|
</div>
|
|
758
696
|
|
|
@@ -765,7 +703,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
765
703
|
.disableTabs=${this.disableTabs}
|
|
766
704
|
></eox-layercontrol-layer-tools>
|
|
767
705
|
`)}
|
|
768
|
-
`}}Ct=new WeakSet,
|
|
706
|
+
`}}Ct=new WeakSet,fn=function(e){var i;return(i=this.layer)==null?void 0:i.get(e)},To=function(e){sa(e,this)},nn=new WeakMap,on=new WeakMap,B(go,"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},disableTabs:{type:Boolean}}),customElements.define("eox-layercontrol-layer",go);class mo extends tt{constructor(){super();D(this,rn,"");D(this,sn,`
|
|
769
707
|
details summary {
|
|
770
708
|
cursor: pointer;
|
|
771
709
|
display: flex;
|
|
@@ -789,15 +727,15 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
789
727
|
details[data-children-length="0"] summary::before {
|
|
790
728
|
display: none;
|
|
791
729
|
}
|
|
792
|
-
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.disableTabs=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var o,r;const e=!!((o=this.group)!=null&&o.get("layerControlExpand")),i=(r=
|
|
730
|
+
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.disableTabs=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var o,r;const e=!!((o=this.group)!=null&&o.get("layerControlExpand")),i=(r=io(this.group.getLayers()))==null?void 0:r.length;return E`
|
|
793
731
|
<style>
|
|
794
|
-
${O(this,
|
|
795
|
-
${!this.unstyled&&O(this,
|
|
732
|
+
${O(this,rn)}
|
|
733
|
+
${!this.unstyled&&O(this,sn)}
|
|
796
734
|
</style>
|
|
797
|
-
${
|
|
735
|
+
${Y(this.group,()=>E`
|
|
798
736
|
<!-- Render the details element with the layer control -->
|
|
799
737
|
<details
|
|
800
|
-
open=${e||
|
|
738
|
+
open=${e||T}
|
|
801
739
|
data-children-length=${i}
|
|
802
740
|
>
|
|
803
741
|
<summary>
|
|
@@ -830,7 +768,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
830
768
|
></eox-layercontrol-layer-list>
|
|
831
769
|
</details>
|
|
832
770
|
`)}
|
|
833
|
-
`}}
|
|
771
|
+
`}}rn=new WeakMap,sn=new WeakMap,B(mo,"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},disableTabs:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",mo);const aa=n=>{const{layers:t,idProperty:e,titleProperty:i,renderRoot:o}=n,r=lo(()=>{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");$s(t,e,i,n),Ss(a,t,e,n)}};class yo extends tt{constructor(){super();D(this,an,"");D(this,ln,`
|
|
834
772
|
ul {
|
|
835
773
|
padding: 0;
|
|
836
774
|
margin: 0;
|
|
@@ -858,19 +796,19 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
858
796
|
}
|
|
859
797
|
li.sortable-ghost {
|
|
860
798
|
}
|
|
861
|
-
`);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,this.disableTabs=!1}firstUpdated(){
|
|
799
|
+
`);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,this.disableTabs=!1}firstUpdated(){aa(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.layers?io(this.layers).reverse():[];return E`
|
|
862
800
|
<style>
|
|
863
|
-
${O(this,
|
|
864
|
-
${!this.unstyled&&O(this,
|
|
801
|
+
${O(this,an)}
|
|
802
|
+
${!this.unstyled&&O(this,ln)}
|
|
865
803
|
</style>
|
|
866
804
|
<ul>
|
|
867
|
-
${
|
|
868
|
-
${
|
|
805
|
+
${Y(this.layers,()=>E`
|
|
806
|
+
${tr(e,i=>i,i=>E`
|
|
869
807
|
<li
|
|
870
808
|
data-layer="${i.get(this.idProperty)}"
|
|
871
|
-
data-type="${
|
|
809
|
+
data-type="${As(i,this.map)}"
|
|
872
810
|
>
|
|
873
|
-
${i.getLayers?
|
|
811
|
+
${i.getLayers?E`
|
|
874
812
|
<eox-layercontrol-layer-group
|
|
875
813
|
.noShadow=${!0}
|
|
876
814
|
.group=${i}
|
|
@@ -884,7 +822,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
884
822
|
@changed=${()=>this.requestUpdate()}
|
|
885
823
|
>
|
|
886
824
|
</eox-layercontrol-layer-group>
|
|
887
|
-
`:
|
|
825
|
+
`:E`
|
|
888
826
|
<eox-layercontrol-layer
|
|
889
827
|
.noShadow=${!0}
|
|
890
828
|
.layer=${i}
|
|
@@ -901,7 +839,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
901
839
|
`)}
|
|
902
840
|
`)}
|
|
903
841
|
</ul>
|
|
904
|
-
`}}
|
|
842
|
+
`}}an=new WeakMap,ln=new WeakMap,B(yo,"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},disableTabs:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",yo);const la=n=>{const t=n.querySelector("select[name=optional]"),e=t?t.value:null,i=qn(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 bo extends tt{constructor(){super();D(this,dn);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=qn(this.layers.getArray(),"layerControlOptional",!0);return E`
|
|
905
843
|
<!-- Label for the dropdown -->
|
|
906
844
|
<label for="optional">Optional layers</label>
|
|
907
845
|
|
|
@@ -913,19 +851,19 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
913
851
|
</option>
|
|
914
852
|
|
|
915
853
|
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
916
|
-
${e.map(i=>{const o=i.get(this.idProperty)||i.ol_uid,r=i.get(this.titleProperty),s=`layer ${i.get(this.idProperty)}`;return
|
|
854
|
+
${e.map(i=>{const o=i.get(this.idProperty)||i.ol_uid,r=i.get(this.titleProperty),s=`layer ${i.get(this.idProperty)}`;return E` <option value="${o}">${r||s}</option> `})}
|
|
917
855
|
</select>
|
|
918
856
|
|
|
919
857
|
<!-- Button to handle adding layers -->
|
|
920
|
-
<button @click="${U(this,
|
|
921
|
-
`}}
|
|
858
|
+
<button @click="${U(this,dn,Po)}">add</button>
|
|
859
|
+
`}}dn=new WeakSet,Po=function(){la(this)},B(bo,"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",bo);const da=(n,t)=>{t.jsonInput=n.target.value,t.requestUpdate()},vo=n=>{const t=JSON.parse(`{"data":${Di(n.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(e=>{n.eoxMap.addOrUpdateLayer(e)}):n.eoxMap.addOrUpdateLayer(t.data),n.jsonInput=null,n.requestUpdate()},ua=(n,t)=>{t.urlInput=n.target.value,t.requestUpdate()};async function ca(n){const t=n.urlInput;if(n.wmsCapabilities=null,n.searchLoad=!0,n.requestUpdate(),!t)return!1;if(Dn(t)==="XYZ")return{Name:t};try{const e=await Xr(t);n.wmsCapabilities=e}catch{}finally{n.searchLoad=!1,n.requestUpdate()}return!1}const ha=(n,t)=>{const{Name:e}=n,i=Dn(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)},pa=(n,t)=>{t.open=n||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class wo extends tt{constructor(){super();D(this,X);B(this,"urlInput",null);B(this,"jsonInput",null);B(this,"open",null);B(this,"searchLoad",!1);B(this,"wmsCapabilities",null);D(this,un,`
|
|
922
860
|
.eox-add-layer-main .open {
|
|
923
861
|
position: relative;
|
|
924
862
|
}
|
|
925
863
|
.eox-add-layer-main .close {
|
|
926
864
|
display: none;
|
|
927
865
|
}
|
|
928
|
-
`);
|
|
866
|
+
`);D(this,cn,`
|
|
929
867
|
.eox-add {
|
|
930
868
|
background: #f0f2f5;
|
|
931
869
|
border-top: 1px solid #0041701a;
|
|
@@ -1058,23 +996,23 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1058
996
|
font-weight: bold;
|
|
1059
997
|
display: inline-block;
|
|
1060
998
|
}
|
|
1061
|
-
`);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=!
|
|
999
|
+
`);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=!qr(this.urlInput)||this.searchLoad?!0:T;return E`
|
|
1062
1000
|
<style>
|
|
1063
|
-
${O(this,
|
|
1064
|
-
${!this.unstyled&&O(this,
|
|
1001
|
+
${O(this,un)}
|
|
1002
|
+
${!this.unstyled&&O(this,cn)}
|
|
1065
1003
|
</style>
|
|
1066
1004
|
<div class="eox-add-layer-main">
|
|
1067
1005
|
<div class="eox-add-layer-col">
|
|
1068
1006
|
<!-- Tabbed interface for URL and JSON -->
|
|
1069
1007
|
<ul class="eox-add-layer-tab ${e}">
|
|
1070
1008
|
<li
|
|
1071
|
-
@click=${()=>U(this,X,
|
|
1009
|
+
@click=${()=>U(this,X,gn).call(this,"url")}
|
|
1072
1010
|
class="${i?"active":""}"
|
|
1073
1011
|
>
|
|
1074
1012
|
URL
|
|
1075
1013
|
</li>
|
|
1076
1014
|
<li
|
|
1077
|
-
@click=${()=>U(this,X,
|
|
1015
|
+
@click=${()=>U(this,X,gn).call(this,"json")}
|
|
1078
1016
|
class="${o?"active":""}"
|
|
1079
1017
|
>
|
|
1080
1018
|
JSON
|
|
@@ -1084,13 +1022,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1084
1022
|
<!-- Button to toggle tabs -->
|
|
1085
1023
|
<button
|
|
1086
1024
|
class="add-icon icon"
|
|
1087
|
-
@click=${()=>U(this,X,
|
|
1025
|
+
@click=${()=>U(this,X,gn).call(this,this.open?null:"url")}
|
|
1088
1026
|
>
|
|
1089
1027
|
${this.unstyled?"Add Layer":""}
|
|
1090
1028
|
</button>
|
|
1091
1029
|
</div>
|
|
1092
1030
|
<div class="eox-add ${e}">
|
|
1093
|
-
${i?
|
|
1031
|
+
${i?E`
|
|
1094
1032
|
<!-- Input field for URL -->
|
|
1095
1033
|
<div class="eox-add-layer-col">
|
|
1096
1034
|
<input
|
|
@@ -1098,62 +1036,62 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1098
1036
|
class="add-url"
|
|
1099
1037
|
placeholder="Add URL (WMS/XYZ)"
|
|
1100
1038
|
.value="${this.urlInput}"
|
|
1101
|
-
@input=${U(this,X,
|
|
1039
|
+
@input=${U(this,X,Do)}
|
|
1102
1040
|
>
|
|
1103
1041
|
</input>
|
|
1104
1042
|
<!-- Search button for URL -->
|
|
1105
1043
|
<button
|
|
1106
1044
|
class="search-icon"
|
|
1107
1045
|
disabled=${r}
|
|
1108
|
-
@click=${U(this,X,
|
|
1046
|
+
@click=${U(this,X,Oo)}
|
|
1109
1047
|
>
|
|
1110
1048
|
${this.unstyled?"Search":""}
|
|
1111
1049
|
</button>
|
|
1112
1050
|
</div>
|
|
1113
1051
|
|
|
1114
1052
|
<!-- Display layers for WMS capabilities -->
|
|
1115
|
-
${this.wmsCapabilities?
|
|
1116
|
-
${this.wmsCapabilities.Capability.Layer.Layer.map(s=>{const a=s.Name;return
|
|
1053
|
+
${this.wmsCapabilities?E`<ul class="search-lists">
|
|
1054
|
+
${this.wmsCapabilities.Capability.Layer.Layer.map(s=>{const a=s.Name;return E`
|
|
1117
1055
|
<li class="search-list">
|
|
1118
1056
|
${a}
|
|
1119
1057
|
<!-- Button to add layer -->
|
|
1120
1058
|
<button
|
|
1121
1059
|
class="add-layer-icon icon"
|
|
1122
|
-
@click=${()=>U(this,X,
|
|
1060
|
+
@click=${()=>U(this,X,Qn).call(this,s)}
|
|
1123
1061
|
>
|
|
1124
1062
|
${this.unstyled?"+":""}
|
|
1125
1063
|
</button>
|
|
1126
1064
|
</li>
|
|
1127
1065
|
`})}
|
|
1128
|
-
</ul>`:
|
|
1129
|
-
`:
|
|
1066
|
+
</ul>`:T}
|
|
1067
|
+
`:E`
|
|
1130
1068
|
<!-- Textarea for JSON input -->
|
|
1131
1069
|
<textarea
|
|
1132
1070
|
class="add-layer-input"
|
|
1133
1071
|
placeholder="Please put a valid eox-map layer JSON."
|
|
1134
|
-
@input=${U(this,X,
|
|
1072
|
+
@input=${U(this,X,Mo)}
|
|
1135
1073
|
.value=${this.jsonInput}
|
|
1136
1074
|
></textarea>
|
|
1137
1075
|
|
|
1138
1076
|
<!-- Button to add JSON layer -->
|
|
1139
1077
|
<button
|
|
1140
1078
|
class="add-layer-icon json-add-layer"
|
|
1141
|
-
disabled=${
|
|
1142
|
-
@click=${U(this,X,
|
|
1079
|
+
disabled=${Yr(this.jsonInput)?T:!0}
|
|
1080
|
+
@click=${U(this,X,Ro)}
|
|
1143
1081
|
>
|
|
1144
1082
|
${this.unstyled?"Add JSON":""}
|
|
1145
1083
|
</button>
|
|
1146
1084
|
`}
|
|
1147
1085
|
</div>
|
|
1148
1086
|
</div>
|
|
1149
|
-
`}}X=new WeakSet,
|
|
1087
|
+
`}}X=new WeakSet,Do=function(e){ua(e,this)},Oo=async function(){const e=await ca(this);e&&U(this,X,Qn).call(this,e)},Qn=function(e){ha(e,this),vo(this)},Ro=function(){vo(this)},Mo=function(e){da(e,this)},gn=function(e){pa(e,this)},un=new WeakMap,cn=new WeakMap,B(wo,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",wo);const fa=(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()}},ga=n=>{let t;return typeof n=="string"?t=document.querySelector(n):t=n,t},Eo=n=>{const t=ga(n.for);return t&&t.map!==n.map&&(n.map=t.map),t};class Jn extends tt{constructor(){super();D(this,Gt);D(this,Tt);D(this,hn,"* { 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","datetime","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride="",this.disableTabs=!1}firstUpdated(){this.eoxMap=Eo(this)}updated(e){e.has("for")&&(this.eoxMap=Eo(this))}get eoxMap(){return O(this,Tt)}set eoxMap(e){const i=O(this,Tt);$e(this,Tt,e),this.requestUpdate("eoxMap",i)}render(){var o,r,s;const e=(o=this.map)==null?void 0:o.getLayers().getArray(),i=e&&((r=qn(e,"layerControlOptional",!0))==null?void 0:r.length)>0;return E`
|
|
1150
1088
|
<style>
|
|
1151
|
-
${!this.unstyled&&O(this,
|
|
1089
|
+
${!this.unstyled&&O(this,hn)}
|
|
1152
1090
|
${this.styleOverride}
|
|
1153
1091
|
</style>
|
|
1154
1092
|
|
|
1155
1093
|
<!-- Conditional rendering of add layers component -->
|
|
1156
|
-
${
|
|
1094
|
+
${Y(this.addExternalLayers&&((s=O(this,Tt))==null?void 0:s.addOrUpdateLayer),()=>E`
|
|
1157
1095
|
<eox-layercontrol-add-layers
|
|
1158
1096
|
.noShadow=${!0}
|
|
1159
1097
|
.eoxMap=${O(this,Tt)}
|
|
@@ -1162,7 +1100,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1162
1100
|
`)}
|
|
1163
1101
|
|
|
1164
1102
|
<!-- Conditional rendering of layer list component -->
|
|
1165
|
-
${
|
|
1103
|
+
${Y(this.map,()=>E`
|
|
1166
1104
|
<eox-layercontrol-layer-list
|
|
1167
1105
|
.noShadow=${!0}
|
|
1168
1106
|
class="layers"
|
|
@@ -1174,13 +1112,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1174
1112
|
.tools=${this.tools}
|
|
1175
1113
|
.unstyled=${this.unstyled}
|
|
1176
1114
|
.disableTabs=${this.disableTabs}
|
|
1177
|
-
@changed=${U(this,Gt,
|
|
1178
|
-
@datetime:updated=${U(this,Gt,
|
|
1115
|
+
@changed=${U(this,Gt,No)}
|
|
1116
|
+
@datetime:updated=${U(this,Gt,Io)}
|
|
1179
1117
|
></eox-layercontrol-layer-list>
|
|
1180
1118
|
`)}
|
|
1181
1119
|
|
|
1182
1120
|
<!-- Conditional rendering of optional list component -->
|
|
1183
|
-
${
|
|
1121
|
+
${Y(i,()=>E`
|
|
1184
1122
|
<eox-layercontrol-optional-list
|
|
1185
1123
|
.noShadow=${!0}
|
|
1186
1124
|
.idProperty=${this.idProperty}
|
|
@@ -1189,4 +1127,4 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1189
1127
|
@changed=${()=>this.requestUpdate()}
|
|
1190
1128
|
></eox-layercontrol-optional-list>
|
|
1191
1129
|
`)}
|
|
1192
|
-
`}}Tt=new WeakMap,Gt=new WeakSet,
|
|
1130
|
+
`}}Tt=new WeakMap,Gt=new WeakSet,No=function(e){fa(e,this),this.dispatchEvent(new CustomEvent("layerchange",{detail:e.detail}))},Io=function(e){this.dispatchEvent(new CustomEvent("datetime:updated",{detail:e.detail}))},hn=new WeakMap,B(Jn,"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},disableTabs:{type:Boolean}}),customElements.define("eox-layercontrol",Jn),C.EOxLayerControl=Jn,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|