@eox/layercontrol 0.6.9 → 0.7.1
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/README.md +7 -11
- package/dist/eox-layercontrol.js +1894 -1845
- package/dist/eox-layercontrol.umd.cjs +548 -484
- package/package.json +7 -6
- package/test/_mockMap.js +91 -0
- package/test/{general.cy.ts → general.cy.js} +32 -19
- package/test/layersUpdate.cy.js +197 -0
- package/test/_mockMap.ts +0 -93
- package/test/layersUpdate.cy.ts +0 -171
|
@@ -1,81 +1,149 @@
|
|
|
1
|
-
(
|
|
1
|
+
var oo=Object.defineProperty;var ro=(S,$,O)=>$ in S?oo(S,$,{enumerable:!0,configurable:!0,writable:!0,value:O}):S[$]=O;var X=(S,$,O)=>(ro(S,typeof $!="symbol"?$+"":$,O),O),so=(S,$,O)=>{if(!$.has(S))throw TypeError("Cannot "+O)};var I=(S,$,O)=>(so(S,$,"read from private field"),O?O.call(S):$.get(S)),V=(S,$,O)=>{if($.has(S))throw TypeError("Cannot add the same private member more than once");$ instanceof WeakSet?$.add(S):$.set(S,O)};(function(S,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(S=typeof globalThis<"u"?globalThis:S||self,$(S["eox-layercontrol"]={}))})(this,function(S){var ve,ye,be,Ee,we,_e,$e,xe,Ae,Ce,Se,Te,De,Pe;"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const $=window,O=$.ShadowRoot&&($.ShadyCSS===void 0||$.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,di=Symbol(),ui=new WeakMap;let sn=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==di)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(O&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=ui.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ui.set(e,t))}return t}toString(){return this.cssText}};const an=n=>new sn(typeof n=="string"?n:n+"",void 0,di),ln=(n,t)=>{O?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),o=$.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,n.appendChild(i)})},ci=O?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return an(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var Oe;const Jt=window,hi=Jt.trustedTypes,dn=hi?hi.emptyScript:"",pi=Jt.reactiveElementPolyfillSupport,Me={toAttribute(n,t){switch(t){case Boolean:n=n?dn: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}},fi=(n,t)=>t!==n&&(t==t||n==n),Ne={attribute:!0,type:String,converter:Me,reflect:!1,hasChanged:fi},ke="finalized";let $t=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const o=this._$Ep(i,e);o!==void 0&&(this._$Ev.set(o,i),t.push(o))}),t}static createProperty(t,e=Ne){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Ne}static finalize(){if(this.hasOwnProperty(ke))return!1;this[ke]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of i)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}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(ci(o))}else t!==void 0&&e.push(ci(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return ln(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Ne){var o;const r=this.constructor._$Ep(t,i);if(r!==void 0&&i.reflect===!0){const s=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:Me).toAttribute(e,i.type);this._$El=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(r!==void 0&&this._$El!==r){const s=o.getPropertyOptions(r),l=typeof s.converter=="function"?{fromAttribute:s.converter}:((i=s.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?s.converter:Me;this._$El=r,this[r]=l.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||fi)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,r)=>this[r]=o),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var r;return(r=o.hostUpdate)===null||r===void 0?void 0:r.call(o)}),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};$t[ke]=!0,$t.elementProperties=new Map,$t.elementStyles=[],$t.shadowRootOptions={mode:"open"},pi==null||pi({ReactiveElement:$t}),((Oe=Jt.reactiveElementVersions)!==null&&Oe!==void 0?Oe:Jt.reactiveElementVersions=[]).push("1.6.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var Ie;const Qt=window,xt=Qt.trustedTypes,gi=xt?xt.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ve="$lit$",at=`lit$${(Math.random()+"").slice(9)}$`,mi="?"+at,un=`<${mi}>`,pt=document,Ot=()=>pt.createComment(""),Mt=n=>n===null||typeof n!="object"&&typeof n!="function",vi=Array.isArray,cn=n=>vi(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",Le=`[
|
|
14
|
+
\f\r]`,Nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yi=/-->/g,bi=/>/g,ft=RegExp(`>|${Le}(?:([^\\s"'>=/]+)(${Le}*=${Le}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ei=/'/g,wi=/"/g,_i=/^(?:script|style|textarea|title)$/i,hn=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),_=hn(1),q=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),$i=new WeakMap,gt=pt.createTreeWalker(pt,129,null,!1);function xi(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return gi!==void 0?gi.createHTML(t):t}const pn=(n,t)=>{const e=n.length-1,i=[];let o,r=t===2?"<svg>":"",s=Nt;for(let l=0;l<e;l++){const a=n[l];let d,h,u=-1,p=0;for(;p<a.length&&(s.lastIndex=p,h=s.exec(a),h!==null);)p=s.lastIndex,s===Nt?h[1]==="!--"?s=yi:h[1]!==void 0?s=bi:h[2]!==void 0?(_i.test(h[2])&&(o=RegExp("</"+h[2],"g")),s=ft):h[3]!==void 0&&(s=ft):s===ft?h[0]===">"?(s=o??Nt,u=-1):h[1]===void 0?u=-2:(u=s.lastIndex-h[2].length,d=h[1],s=h[3]===void 0?ft:h[3]==='"'?wi:Ei):s===wi||s===Ei?s=ft:s===yi||s===bi?s=Nt:(s=ft,o=void 0);const v=s===ft&&n[l+1].startsWith("/>")?" ":"";r+=s===Nt?a+un:u>=0?(i.push(d),a.slice(0,u)+Ve+a.slice(u)+at+v):a+at+(u===-2?(i.push(void 0),l):v)}return[xi(n,r+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class kt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const l=t.length-1,a=this.parts,[d,h]=pn(t,e);if(this.el=kt.createElement(d,i),gt.currentNode=this.el.content,e===2){const u=this.el.content,p=u.firstChild;p.remove(),u.append(...p.childNodes)}for(;(o=gt.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes()){const u=[];for(const p of o.getAttributeNames())if(p.endsWith(Ve)||p.startsWith(at)){const v=h[s++];if(u.push(p),v!==void 0){const y=o.getAttribute(v.toLowerCase()+Ve).split(at),b=/([.?@])?(.*)/.exec(v);a.push({type:1,index:r,name:b[2],strings:y,ctor:b[1]==="."?gn:b[1]==="?"?vn:b[1]==="@"?yn:te})}else a.push({type:6,index:r})}for(const p of u)o.removeAttribute(p)}if(_i.test(o.tagName)){const u=o.textContent.split(at),p=u.length-1;if(p>0){o.textContent=xt?xt.emptyScript:"";for(let v=0;v<p;v++)o.append(u[v],Ot()),gt.nextNode(),a.push({type:2,index:++r});o.append(u[p],Ot())}}}else if(o.nodeType===8)if(o.data===mi)a.push({type:2,index:r});else{let u=-1;for(;(u=o.data.indexOf(at,u+1))!==-1;)a.push({type:7,index:r}),u+=at.length-1}r++}}static createElement(t,e){const i=pt.createElement("template");return i.innerHTML=t,i}}function At(n,t,e=n,i){var o,r,s,l;if(t===q)return t;let a=i!==void 0?(o=e._$Co)===null||o===void 0?void 0:o[i]:e._$Cl;const d=Mt(t)?void 0:t._$litDirective$;return(a==null?void 0:a.constructor)!==d&&((r=a==null?void 0:a._$AO)===null||r===void 0||r.call(a,!1),d===void 0?a=void 0:(a=new d(n),a._$AT(n,e,i)),i!==void 0?((s=(l=e)._$Co)!==null&&s!==void 0?s:l._$Co=[])[i]=a:e._$Cl=a),a!==void 0&&(t=At(n,a._$AS(n,t.values),a,i)),t}class fn{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){var e;const{el:{content:i},parts:o}=this._$AD,r=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:pt).importNode(i,!0);gt.currentNode=r;let s=gt.nextNode(),l=0,a=0,d=o[0];for(;d!==void 0;){if(l===d.index){let h;d.type===2?h=new It(s,s.nextSibling,this,t):d.type===1?h=new d.ctor(s,d.name,d.strings,this,t):d.type===6&&(h=new bn(s,this,t)),this._$AV.push(h),d=o[++a]}l!==(d==null?void 0:d.index)&&(s=gt.nextNode(),l++)}return gt.currentNode=pt,r}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class It{constructor(t,e,i,o){var r;this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=(r=o==null?void 0:o.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}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=At(this,t,e),Mt(t)?t===x||t==null||t===""?(this._$AH!==x&&this._$AR(),this._$AH=x):t!==this._$AH&&t!==q&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):cn(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==x&&Mt(this._$AH)?this._$AA.nextSibling.data=t:this.$(pt.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=kt.createElement(xi(o.h,o.h[0]),this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.v(i);else{const s=new fn(r,this),l=s.u(this.options);s.v(i),this.$(l),this._$AH=s}}_$AC(t){let e=$i.get(t.strings);return e===void 0&&$i.set(t.strings,e=new kt(t)),e}T(t){vi(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 It(this.k(Ot()),this.k(Ot()),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||i===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._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class te{constructor(t,e,i,o,r){this.type=1,this._$AH=x,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=x}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(r===void 0)t=At(this,t,e,0),s=!Mt(t)||t!==this._$AH&&t!==q,s&&(this._$AH=t);else{const l=t;let a,d;for(t=r[0],a=0;a<r.length-1;a++)d=At(this,l[i+a],e,a),d===q&&(d=this._$AH[a]),s||(s=!Mt(d)||d!==this._$AH[a]),d===x?t=x:t!==x&&(t+=(d??"")+r[a+1]),this._$AH[a]=d}s&&!o&&this.j(t)}j(t){t===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class gn extends te{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===x?void 0:t}}const mn=xt?xt.emptyScript:"";class vn extends te{constructor(){super(...arguments),this.type=4}j(t){t&&t!==x?this.element.setAttribute(this.name,mn):this.element.removeAttribute(this.name)}}class yn extends te{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=(i=At(this,t,e,0))!==null&&i!==void 0?i:x)===q)return;const o=this._$AH,r=t===x&&o!==x||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==x&&(o===x||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class bn{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){At(this,t)}}const Ai=Qt.litHtmlPolyfillSupport;Ai==null||Ai(kt,It),((Ie=Qt.litHtmlVersions)!==null&&Ie!==void 0?Ie:Qt.litHtmlVersions=[]).push("2.8.0");const En=(n,t,e)=>{var i,o;const r=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let s=r._$litPart$;if(s===void 0){const l=(o=e==null?void 0:e.renderBefore)!==null&&o!==void 0?o:null;r._$litPart$=s=new It(t.insertBefore(Ot(),l),l,void 0,e??{})}return s._$AI(n),s};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var
|
|
19
|
+
*/var Be,Re;let Y=class extends $t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=En(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return q}};Y.finalized=!0,Y._$litElement$=!0,(Be=globalThis.litElementHydrateSupport)===null||Be===void 0||Be.call(globalThis,{LitElement:Y});const Ci=globalThis.litElementPolyfillSupport;Ci==null||Ci({LitElement:Y}),((Re=globalThis.litElementVersions)!==null&&Re!==void 0?Re:globalThis.litElementVersions=[]).push("3.3.2");/**
|
|
20
20
|
* @license
|
|
21
|
-
* Copyright
|
|
21
|
+
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/
|
|
23
|
+
*/function et(n,t,e){return n?t():e==null?void 0:e()}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const mt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ue=n=>(...t)=>({_$litDirective$:n,values:t});let Fe=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
|
|
28
28
|
* @license
|
|
29
|
-
* Copyright
|
|
29
|
+
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/
|
|
31
|
+
*/const wn=n=>n.strings===void 0,_n={},Si=(n,t=_n)=>n._$AH=t;/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2021 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
|
|
35
|
+
*/const $n=Ue(class extends Fe{constructor(){super(...arguments),this.key=x}render(n,t){return this.key=n,t}update(n,[t,e]){return t!==this.key&&(Si(n),this.key=t),e}});/**!
|
|
36
|
+
* Sortable 1.15.0
|
|
37
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
38
|
+
* @author owenm <owen23355@gmail.com>
|
|
39
|
+
* @license MIT
|
|
40
|
+
*/function Ti(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,i)}return e}function K(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Ti(Object(e),!0).forEach(function(i){xn(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Ti(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function ee(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ee=function(t){return typeof t}:ee=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(n)}function xn(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function it(){return it=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},it.apply(this,arguments)}function An(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 Cn(n,t){if(n==null)return{};var e=An(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 Sn="1.15.0";function nt(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var ot=nt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Vt=nt(/Edge/i),Di=nt(/firefox/i),Lt=nt(/safari/i)&&!nt(/chrome/i)&&!nt(/android/i),Pi=nt(/iP(ad|od|hone)/i),Hi=nt(/chrome/i)&&nt(/android/i),Oi={capture:!1,passive:!1};function w(n,t,e){n.addEventListener(t,e,!ot&&Oi)}function E(n,t,e){n.removeEventListener(t,e,!ot&&Oi)}function ie(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 Tn(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function J(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&ie(n,t):ie(n,t))||i&&n===e)return n;if(n===e)break}while(n=Tn(n))}return null}var Mi=/\s+/g;function B(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Mi," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Mi," ")}}function f(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 Ct(n,t){var e="";if(typeof n=="string")e=n;else do{var i=f(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 Ni(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 Q(){var n=document.scrollingElement;return n||document.documentElement}function P(n,t,e,i,o){if(!(!n.getBoundingClientRect&&n!==window)){var r,s,l,a,d,h,u;if(n!==window&&n.parentNode&&n!==Q()?(r=n.getBoundingClientRect(),s=r.top,l=r.left,a=r.bottom,d=r.right,h=r.height,u=r.width):(s=0,l=0,a=window.innerHeight,d=window.innerWidth,h=window.innerHeight,u=window.innerWidth),(t||e)&&n!==window&&(o=o||n.parentNode,!ot))do if(o&&o.getBoundingClientRect&&(f(o,"transform")!=="none"||e&&f(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(f(o,"border-top-width")),l-=p.left+parseInt(f(o,"border-left-width")),a=s+r.height,d=l+r.width;break}while(o=o.parentNode);if(i&&n!==window){var v=Ct(o||n),y=v&&v.a,b=v&&v.d;v&&(s/=b,l/=y,u/=y,h/=b,a=s+h,d=l+u)}return{top:s,left:l,bottom:a,right:d,width:u,height:h}}}function ki(n,t,e){for(var i=lt(n,!0),o=P(n)[t];i;){var r=P(i)[e],s=void 0;if(e==="top"||e==="left"?s=o>=r:s=o<=r,!s)return i;if(i===Q())break;i=lt(i,!1)}return!1}function St(n,t,e,i){for(var o=0,r=0,s=n.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==g.ghost&&(i||s[r]!==g.dragged)&&J(s[r],e.draggable,n,!1)){if(o===t)return s[r];o++}r++}return null}function ze(n,t){for(var e=n.lastElementChild;e&&(e===g.ghost||f(e,"display")==="none"||t&&!ie(e,t));)e=e.previousElementSibling;return e||null}function j(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==g.clone&&(!t||ie(n,t))&&e++;return e}function Ii(n){var t=0,e=0,i=Q();if(n)do{var o=Ct(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 Dn(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 lt(n,t){if(!n||!n.getBoundingClientRect)return Q();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var o=f(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 Q();if(i||t)return e;i=!0}}while(e=e.parentNode);return Q()}function Pn(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function Xe(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 Bt;function Vi(n,t){return function(){if(!Bt){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),Bt=setTimeout(function(){Bt=void 0},t)}}}function Hn(){clearTimeout(Bt),Bt=void 0}function Li(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function Bi(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)}var R="Sortable"+new Date().getTime();function On(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(f(o,"display")==="none"||o===g.ghost)){n.push({target:o,rect:P(o)});var r=K({},n[n.length-1].rect);if(o.thisAnimationDuration){var s=Ct(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(Dn(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(l){var a=0,d=l.target,h=d.fromRect,u=P(d),p=d.prevFromRect,v=d.prevToRect,y=l.rect,b=Ct(d,!0);b&&(u.top-=b.f,u.left-=b.e),d.toRect=u,d.thisAnimationDuration&&Xe(p,u)&&!Xe(h,u)&&(y.top-u.top)/(y.left-u.left)===(h.top-u.top)/(h.left-u.left)&&(a=Nn(y,p,v,o.options)),Xe(u,h)||(d.prevFromRect=h,d.prevToRect=u,a||(a=o.options.animation),o.animate(d,y,u,a)),a&&(r=!0,s=Math.max(s,a),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},a),d.thisAnimationDuration=a)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),n=[]},animate:function(i,o,r,s){if(s){f(i,"transition",""),f(i,"transform","");var l=Ct(this.el),a=l&&l.a,d=l&&l.d,h=(o.left-r.left)/(a||1),u=(o.top-r.top)/(d||1);i.animatingX=!!h,i.animatingY=!!u,f(i,"transform","translate3d("+h+"px,"+u+"px,0)"),this.forRepaintDummy=Mn(i),f(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),f(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){f(i,"transition",""),f(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function Mn(n){return n.offsetWidth}function Nn(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 Tt=[],Ye={initializeByDefault:!0},Rt={mount:function(t){for(var e in Ye)Ye.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ye[e]);Tt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Tt.push(t)},pluginEvent:function(t,e,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var r=t+"Global";Tt.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][r]&&e[s.pluginName][r](K({sortable:e},i)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](K({sortable:e},i)))})},initializePlugins:function(t,e,i,o){Tt.forEach(function(l){var a=l.pluginName;if(!(!t.options[a]&&!l.initializeByDefault)){var d=new l(t,e,t.options);d.sortable=t,d.options=t.options,t[a]=d,it(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 Tt.forEach(function(o){typeof o.eventProperties=="function"&&it(i,o.eventProperties.call(e[o.pluginName],t))}),i},modifyOption:function(t,e,i){var o;return Tt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(o=r.optionListeners[e].call(t[r.pluginName],i))}),o}};function kn(n){var t=n.sortable,e=n.rootEl,i=n.name,o=n.targetEl,r=n.cloneEl,s=n.toEl,l=n.fromEl,a=n.oldIndex,d=n.newIndex,h=n.oldDraggableIndex,u=n.newDraggableIndex,p=n.originalEvent,v=n.putSortable,y=n.extraEventProperties;if(t=t||e&&e[R],!!t){var b,Z=t.options,rt="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!ot&&!Vt?b=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(i,!0,!0)),b.to=s||e,b.from=l||e,b.item=o||e,b.clone=r,b.oldIndex=a,b.newIndex=d,b.oldDraggableIndex=h,b.newDraggableIndex=u,b.originalEvent=p,b.pullMode=v?v.lastPutMode:void 0;var k=K(K({},y),Rt.getEventProperties(i,t));for(var G in k)b[G]=k[G];e&&e.dispatchEvent(b),Z[rt]&&Z[rt].call(t,b)}}var In=["evt"],L=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=Cn(i,In);Rt.pluginEvent.bind(g)(t,e,K({dragEl:c,parentEl:T,ghostEl:m,rootEl:A,nextEl:vt,lastDownEl:ne,cloneEl:C,cloneHidden:dt,dragStarted:Ft,putSortable:H,activeSortable:g.active,originalEvent:o,oldIndex:Dt,oldDraggableIndex:Ut,newIndex:U,newDraggableIndex:ut,hideGhostForTarget:ji,unhideGhostForTarget:qi,cloneNowHidden:function(){dt=!0},cloneNowShown:function(){dt=!1},dispatchSortableEvent:function(l){N({sortable:e,name:l,originalEvent:o})}},r))};function N(n){kn(K({putSortable:H,cloneEl:C,targetEl:c,rootEl:A,oldIndex:Dt,oldDraggableIndex:Ut,newIndex:U,newDraggableIndex:ut},n))}var c,T,m,A,vt,ne,C,dt,Dt,U,Ut,ut,oe,H,Pt=!1,re=!1,se=[],yt,W,je,qe,Ri,Ui,Ft,Ht,zt,Xt=!1,ae=!1,le,M,We=[],Ze=!1,de=[],ue=typeof document<"u",ce=Pi,Fi=Vt||ot?"cssFloat":"float",Vn=ue&&!Hi&&!Pi&&"draggable"in document.createElement("div"),zi=function(){if(ue){if(ot)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Xi=function(t,e){var i=f(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=St(t,0,e),s=St(t,1,e),l=r&&f(r),a=s&&f(s),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+P(r).width,h=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+P(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&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return s&&(a.clear==="both"||a.clear===u)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=o&&i[Fi]==="none"||s&&i[Fi]==="none"&&d+h>o)?"vertical":"horizontal"},Ln=function(t,e,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,l=i?e.left:e.top,a=i?e.right:e.bottom,d=i?e.width:e.height;return o===l||r===a||o+s/2===l+d/2},Bn=function(t,e){var i;return se.some(function(o){var r=o[R].options.emptyInsertThreshold;if(!(!r||ze(o))){var s=P(o),l=t>=s.left-r&&t<=s.right+r,a=e>=s.top-r&&e<=s.bottom+r;if(l&&a)return i=o}}),i},Yi=function(t){function e(r,s){return function(l,a,d,h){var u=l.options.group.name&&a.options.group.name&&l.options.group.name===a.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(l,a,d,h),s)(l,a,d,h);var p=(s?l:a).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},o=t.group;(!o||ee(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(){!zi&&m&&f(m,"display","none")},qi=function(){!zi&&m&&f(m,"display","")};ue&&!Hi&&document.addEventListener("click",function(n){if(re)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),re=!1,!1},!0);var bt=function(t){if(c){t=t.touches?t.touches[0]:t;var e=Bn(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[R]._onDragOver(i)}}},Rn=function(t){c&&c.parentNode[R]._isOutsideThisEl(t.target)};function g(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=it({},t),n[R]=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 Xi(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,l){s.setData("Text",l.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:g.supportPointer!==!1&&"PointerEvent"in window&&!Lt,emptyInsertThreshold:5};Rt.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Yi(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:Vn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?w(n,"pointerdown",this._onTapStart):(w(n,"mousedown",this._onTapStart),w(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(n,"dragover",this),w(n,"dragenter",this)),se.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),it(this,On())}g.prototype={constructor:g,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ht=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,c):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,o=this.options,r=o.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,h=o.filter;if(Wn(i),!c&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Lt&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=J(a,o.draggable,i,!1),!(a&&a.animated)&&ne!==a)){if(Dt=j(a),Ut=j(a,o.draggable),typeof h=="function"){if(h.call(this,t,a,this)){N({sortable:e,rootEl:d,name:"filter",targetEl:a,toEl:i,fromEl:i}),L("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(u){if(u=J(d,u.trim(),i,!1),u)return N({sortable:e,rootEl:u,name:"filter",targetEl:a,fromEl:i,toEl:i}),L("filter",e,{evt:t}),!0}),h)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!J(d,o.handle,i,!1)||this._prepareDragStart(t,l,a)}}},_prepareDragStart:function(t,e,i){var o=this,r=o.el,s=o.options,l=r.ownerDocument,a;if(i&&!c&&i.parentNode===r){var d=P(i);if(A=r,c=i,T=c.parentNode,vt=c.nextSibling,ne=i,oe=s.group,g.dragged=c,yt={target:c,clientX:(e||t).clientX,clientY:(e||t).clientY},Ri=yt.clientX-d.left,Ui=yt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,c.style["will-change"]="all",a=function(){if(L("delayEnded",o,{evt:t}),g.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Di&&o.nativeDraggable&&(c.draggable=!0),o._triggerDragStart(t,e),N({sortable:o,name:"choose",originalEvent:t}),B(c,s.chosenClass,!0)},s.ignore.split(",").forEach(function(h){Ni(c,h.trim(),Ge)}),w(l,"dragover",bt),w(l,"mousemove",bt),w(l,"touchmove",bt),w(l,"mouseup",o._onDrop),w(l,"touchend",o._onDrop),w(l,"touchcancel",o._onDrop),Di&&this.nativeDraggable&&(this.options.touchStartThreshold=4,c.draggable=!0),L("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Vt||ot))){if(g.eventCanceled){this._onDrop();return}w(l,"mouseup",o._disableDelayedDrag),w(l,"touchend",o._disableDelayedDrag),w(l,"touchcancel",o._disableDelayedDrag),w(l,"mousemove",o._delayedDragTouchMoveHandler),w(l,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&w(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(a,s.delay)}else a()}},_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(){c&&Ge(c),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._disableDelayedDrag),E(t,"touchend",this._disableDelayedDrag),E(t,"touchcancel",this._disableDelayedDrag),E(t,"mousemove",this._delayedDragTouchMoveHandler),E(t,"touchmove",this._delayedDragTouchMoveHandler),E(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):e?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(c,"dragend",this),w(A,"dragstart",this._onDragStart));try{document.selection?pe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Pt=!1,A&&c){L("dragStarted",this,{evt:e}),this.nativeDraggable&&w(document,"dragover",Rn);var i=this.options;!t&&B(c,i.dragClass,!1),B(c,i.ghostClass,!0),g.active=this,t&&this._appendGhost(),N({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(W){this._lastX=W.clientX,this._lastY=W.clientY,ji();for(var t=document.elementFromPoint(W.clientX,W.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(W.clientX,W.clientY),t!==e);)e=t;if(c.parentNode[R]._isOutsideThisEl(t),e)do{if(e[R]){var i=void 0;if(i=e[R]._onDragOver({clientX:W.clientX,clientY:W.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);qi()}},_onTouchMove:function(t){if(yt){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=m&&Ct(m,!0),l=m&&s&&s.a,a=m&&s&&s.d,d=ce&&M&&Ii(M),h=(r.clientX-yt.clientX+o.x)/(l||1)+(d?d[0]-We[0]:0)/(l||1),u=(r.clientY-yt.clientY+o.y)/(a||1)+(d?d[1]-We[1]:0)/(a||1);if(!g.active&&!Pt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(m){s?(s.e+=h-(je||0),s.f+=u-(qe||0)):s={a:1,b:0,c:0,d:1,e:h,f:u};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");f(m,"webkitTransform",p),f(m,"mozTransform",p),f(m,"msTransform",p),f(m,"transform",p),je=h,qe=u,W=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!m){var t=this.options.fallbackOnBody?document.body:A,e=P(c,!0,ce,!0,t),i=this.options;if(ce){for(M=t;f(M,"position")==="static"&&f(M,"transform")==="none"&&M!==document;)M=M.parentNode;M!==document.body&&M!==document.documentElement?(M===document&&(M=Q()),e.top+=M.scrollTop,e.left+=M.scrollLeft):M=Q(),We=Ii(M)}m=c.cloneNode(!0),B(m,i.ghostClass,!1),B(m,i.fallbackClass,!0),B(m,i.dragClass,!0),f(m,"transition",""),f(m,"transform",""),f(m,"box-sizing","border-box"),f(m,"margin",0),f(m,"top",e.top),f(m,"left",e.left),f(m,"width",e.width),f(m,"height",e.height),f(m,"opacity","0.8"),f(m,"position",ce?"absolute":"fixed"),f(m,"zIndex","100000"),f(m,"pointerEvents","none"),g.ghost=m,t.appendChild(m),f(m,"transform-origin",Ri/parseInt(m.style.width)*100+"% "+Ui/parseInt(m.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,o=t.dataTransfer,r=i.options;if(L("dragStart",this,{evt:t}),g.eventCanceled){this._onDrop();return}L("setupClone",this),g.eventCanceled||(C=Bi(c),C.removeAttribute("id"),C.draggable=!1,C.style["will-change"]="",this._hideClone(),B(C,this.options.chosenClass,!1),g.clone=C),i.cloneId=pe(function(){L("clone",i),!g.eventCanceled&&(i.options.removeCloneOnHide||A.insertBefore(C,c),i._hideClone(),N({sortable:i,name:"clone"}))}),!e&&B(c,r.dragClass,!0),e?(re=!0,i._loopId=setInterval(i._emulateDragOver,50)):(E(document,"mouseup",i._onDrop),E(document,"touchend",i._onDrop),E(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(i,o,c)),w(document,"drop",i),f(c,"transform","translateZ(0)")),Pt=!0,i._dragStartId=pe(i._dragStarted.bind(i,e,t)),w(document,"selectstart",i),Ft=!0,Lt&&f(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,o,r,s,l=this.options,a=l.group,d=g.active,h=oe===a,u=l.sort,p=H||d,v,y=this,b=!1;if(Ze)return;function Z(Kt,io){L(Kt,y,K({evt:t,isOwner:h,axis:v?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:u,fromSortable:p,target:i,completed:k,onMove:function(rn,no){return he(A,e,c,o,rn,P(rn),t,no)},changed:G},io))}function rt(){Z("dragOverAnimationCapture"),y.captureAnimationState(),y!==p&&p.captureAnimationState()}function k(Kt){return Z("dragOverCompleted",{insertion:Kt}),Kt&&(h?d._hideClone():d._showClone(y),y!==p&&(B(c,H?H.options.ghostClass:d.options.ghostClass,!1),B(c,l.ghostClass,!0)),H!==y&&y!==g.active?H=y:y===g.active&&H&&(H=null),p===y&&(y._ignoreWhileAnimating=i),y.animateAll(function(){Z("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===c&&!c.animated||i===e&&!i.animated)&&(Ht=null),!l.dragoverBubble&&!t.rootEl&&i!==document&&(c.parentNode[R]._isOutsideThisEl(t.target),!Kt&&bt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),b=!0}function G(){U=j(c),ut=j(c,l.draggable),N({sortable:y,name:"change",toEl:e,newIndex:U,newDraggableIndex:ut,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=J(i,l.draggable,e,!0),Z("dragOver"),g.eventCanceled)return b;if(c.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||y._ignoreWhileAnimating===i)return k(!1);if(re=!1,d&&!l.disabled&&(h?u||(s=T!==A):H===this||(this.lastPutMode=oe.checkPull(this,d,c,t))&&a.checkPut(this,d,c,t))){if(v=this._getDirection(t,i)==="vertical",o=P(c),Z("dragOverValid"),g.eventCanceled)return b;if(s)return T=A,rt(),this._hideClone(),Z("revert"),g.eventCanceled||(vt?A.insertBefore(c,vt):A.appendChild(c)),k(!0);var F=ze(e,l.draggable);if(!F||Xn(t,v,this)&&!F.animated){if(F===c)return k(!1);if(F&&e===t.target&&(i=F),i&&(r=P(i)),he(A,e,c,o,i,r,t,!!i)!==!1)return rt(),F&&F.nextSibling?e.insertBefore(c,F.nextSibling):e.appendChild(c),T=e,G(),k(!0)}else if(F&&zn(t,v,this)){var Et=St(e,0,l,!0);if(Et===c)return k(!1);if(i=Et,r=P(i),he(A,e,c,o,i,r,t,!1)!==!1)return rt(),e.insertBefore(c,Et),T=e,G(),k(!0)}else if(i.parentNode===e){r=P(i);var tt=0,wt,qt=c.parentNode!==e,z=!Ln(c.animated&&c.toRect||o,i.animated&&i.toRect||r,v),Wt=v?"top":"left",ct=ki(i,"top","top")||ki(c,"top","top"),Zt=ct?ct.scrollTop:void 0;Ht!==i&&(wt=r[Wt],Xt=!1,ae=!z&&l.invertSwap||qt),tt=Yn(t,i,r,v,z?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,ae,Ht===i);var st;if(tt!==0){var _t=j(c);do _t-=tt,st=T.children[_t];while(st&&(f(st,"display")==="none"||st===m))}if(tt===0||st===i)return k(!1);Ht=i,zt=tt;var Gt=i.nextElementSibling,ht=!1;ht=tt===1;var He=he(A,e,c,o,i,r,t,ht);if(He!==!1)return(He===1||He===-1)&&(ht=He===1),Ze=!0,setTimeout(Fn,30),rt(),ht&&!Gt?e.appendChild(c):i.parentNode.insertBefore(c,ht?Gt:i),ct&&Li(ct,0,Zt-ct.scrollTop),T=c.parentNode,wt!==void 0&&!ae&&(le=Math.abs(wt-P(i)[Wt])),G(),k(!0)}if(e.contains(c))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",bt),E(document,"mousemove",bt),E(document,"touchmove",bt)},_offUpEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._onDrop),E(t,"touchend",this._onDrop),E(t,"pointerup",this._onDrop),E(t,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(U=j(c),ut=j(c,i.draggable),L("drop",this,{evt:t}),T=c&&c.parentNode,U=j(c),ut=j(c,i.draggable),g.eventCanceled){this._nulling();return}Pt=!1,ae=!1,Xt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ke(this.cloneId),Ke(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Lt&&f(document.body,"user-select",""),f(c,"transform",""),t&&(Ft&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(A===T||H&&H.lastPutMode!=="clone")&&C&&C.parentNode&&C.parentNode.removeChild(C),c&&(this.nativeDraggable&&E(c,"dragend",this),Ge(c),c.style["will-change"]="",Ft&&!Pt&&B(c,H?H.options.ghostClass:this.options.ghostClass,!1),B(c,this.options.chosenClass,!1),N({sortable:this,name:"unchoose",toEl:T,newIndex:null,newDraggableIndex:null,originalEvent:t}),A!==T?(U>=0&&(N({rootEl:T,name:"add",toEl:T,fromEl:A,originalEvent:t}),N({sortable:this,name:"remove",toEl:T,originalEvent:t}),N({rootEl:T,name:"sort",toEl:T,fromEl:A,originalEvent:t}),N({sortable:this,name:"sort",toEl:T,originalEvent:t})),H&&H.save()):U!==Dt&&U>=0&&(N({sortable:this,name:"update",toEl:T,originalEvent:t}),N({sortable:this,name:"sort",toEl:T,originalEvent:t})),g.active&&((U==null||U===-1)&&(U=Dt,ut=Ut),N({sortable:this,name:"end",toEl:T,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){L("nulling",this),A=c=T=m=vt=C=ne=dt=yt=W=Ft=U=ut=Dt=Ut=Ht=zt=H=oe=g.dragged=g.ghost=g.clone=g.active=null,de.forEach(function(t){t.checked=!0}),de.length=je=qe=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":c&&(this._onDragOver(t),Un(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],J(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||qn(e));return t},sort:function(t,e){var i={},o=this.el;this.toArray().forEach(function(r,s){var l=o.children[s];J(l,this.options.draggable,o,!1)&&(i[r]=l)},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 J(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=Rt.modifyOption(this,t,e);typeof o<"u"?i[t]=o:i[t]=e,t==="group"&&Yi(i)},destroy:function(){L("destroy",this);var t=this.el;t[R]=null,E(t,"mousedown",this._onTapStart),E(t,"touchstart",this._onTapStart),E(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(t,"dragover",this),E(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),se.splice(se.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!dt){if(L("hideClone",this),g.eventCanceled)return;f(C,"display","none"),this.options.removeCloneOnHide&&C.parentNode&&C.parentNode.removeChild(C),dt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(dt){if(L("showClone",this),g.eventCanceled)return;c.parentNode==A&&!this.options.group.revertClone?A.insertBefore(C,c):vt?A.insertBefore(C,vt):A.appendChild(C),this.options.group.revertClone&&this.animate(c,C),f(C,"display",""),dt=!1}}};function Un(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function he(n,t,e,i,o,r,s,l){var a,d=n[R],h=d.options.onMove,u;return window.CustomEvent&&!ot&&!Vt?a=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent("move",!0,!0)),a.to=t,a.from=n,a.dragged=e,a.draggedRect=i,a.related=o||t,a.relatedRect=r||P(t),a.willInsertAfter=l,a.originalEvent=s,n.dispatchEvent(a),h&&(u=h.call(d,a,s)),u}function Ge(n){n.draggable=!1}function Fn(){Ze=!1}function zn(n,t,e){var i=P(St(e.el,0,e.options,!0)),o=10;return t?n.clientX<i.left-o||n.clientY<i.top&&n.clientX<i.right:n.clientY<i.top-o||n.clientY<i.bottom&&n.clientX<i.left}function Xn(n,t,e){var i=P(ze(e.el,e.options.draggable)),o=10;return t?n.clientX>i.right+o||n.clientX<=i.right&&n.clientY>i.bottom&&n.clientX>=i.left:n.clientX>i.right&&n.clientY>i.top||n.clientX<=i.right&&n.clientY>i.bottom+o}function Yn(n,t,e,i,o,r,s,l){var a=i?n.clientY:n.clientX,d=i?e.height:e.width,h=i?e.top:e.left,u=i?e.bottom:e.right,p=!1;if(!s){if(l&&le<d*o){if(!Xt&&(zt===1?a>h+d*r/2:a<u-d*r/2)&&(Xt=!0),Xt)p=!0;else if(zt===1?a<h+le:a>u-le)return-zt}else if(a>h+d*(1-o)/2&&a<u-d*(1-o)/2)return jn(t)}return p=p||s,p&&(a<h+d*r/2||a>u-d*r/2)?a>h+d/2?1:-1:0}function jn(n){return j(c)<j(n)?1:-1}function qn(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 Wn(n){de.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&de.push(i)}}function pe(n){return setTimeout(n,0)}function Ke(n){return clearTimeout(n)}ue&&w(document,"touchmove",function(n){(g.active||Pt)&&n.cancelable&&n.preventDefault()}),g.utils={on:w,off:E,css:f,find:Ni,is:function(t,e){return!!J(t,e,t,!1)},extend:Pn,throttle:Vi,closest:J,toggleClass:B,clone:Bi,index:j,nextTick:pe,cancelNextTick:Ke,detectDirection:Xi,getChild:St},g.get=function(n){return n[R]},g.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&&(g.utils=K(K({},g.utils),i.utils)),Rt.mount(i)})},g.create=function(n,t){return new g(n,t)},g.version=Sn;var D=[],Yt,Je,Qe=!1,ti,ei,fe,jt;function Zn(){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?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):i.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):(E(document,"pointermove",this._handleFallbackAutoScroll),E(document,"touchmove",this._handleFallbackAutoScroll),E(document,"mousemove",this._handleFallbackAutoScroll)),Wi(),ge(),Hn()},nulling:function(){fe=Je=Yt=Qe=jt=ti=ei=null,D.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,l=document.elementFromPoint(r,s);if(fe=e,i||this.options.forceAutoScrollFallback||Vt||ot||Lt){ii(e,this.options,l,i);var a=lt(l,!0);Qe&&(!jt||r!==ti||s!==ei)&&(jt&&Wi(),jt=setInterval(function(){var d=lt(document.elementFromPoint(r,s),!0);d!==a&&(a=d,ge()),ii(e,o.options,d,i)},10),ti=r,ei=s)}else{if(!this.options.bubbleScroll||lt(l,!0)===Q()){ge();return}ii(e,this.options,lt(l,!1),!1)}}},it(n,{pluginName:"scroll",initializeByDefault:!0})}function ge(){D.forEach(function(n){clearInterval(n.pid)}),D=[]}function Wi(){clearInterval(jt)}var ii=Vi(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,l=t.scrollSpeed,a=Q(),d=!1,h;Je!==e&&(Je=e,ge(),Yt=t.scroll,h=t.scrollFn,Yt===!0&&(Yt=lt(e,!0)));var u=0,p=Yt;do{var v=p,y=P(v),b=y.top,Z=y.bottom,rt=y.left,k=y.right,G=y.width,F=y.height,Et=void 0,tt=void 0,wt=v.scrollWidth,qt=v.scrollHeight,z=f(v),Wt=v.scrollLeft,ct=v.scrollTop;v===a?(Et=G<wt&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),tt=F<qt&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(Et=G<wt&&(z.overflowX==="auto"||z.overflowX==="scroll"),tt=F<qt&&(z.overflowY==="auto"||z.overflowY==="scroll"));var Zt=Et&&(Math.abs(k-o)<=s&&Wt+G<wt)-(Math.abs(rt-o)<=s&&!!Wt),st=tt&&(Math.abs(Z-r)<=s&&ct+F<qt)-(Math.abs(b-r)<=s&&!!ct);if(!D[u])for(var _t=0;_t<=u;_t++)D[_t]||(D[_t]={});(D[u].vx!=Zt||D[u].vy!=st||D[u].el!==v)&&(D[u].el=v,D[u].vx=Zt,D[u].vy=st,clearInterval(D[u].pid),(Zt!=0||st!=0)&&(d=!0,D[u].pid=setInterval((function(){i&&this.layer===0&&g.active._onTouchMove(fe);var Gt=D[this.layer].vy?D[this.layer].vy*l:0,ht=D[this.layer].vx?D[this.layer].vx*l:0;typeof h=="function"&&h.call(g.dragged.parentNode[R],ht,Gt,n,fe,D[this.layer].el)!=="continue"||Li(D[this.layer].el,ht,Gt)}).bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==a&&(p=lt(p,!1)));Qe=d}},30),Zi=function(t){var e=t.originalEvent,i=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,l=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var d=i||r;l();var h=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(h.clientX,h.clientY);a(),d&&!d.el.contains(u)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function ni(){}ni.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=St(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:Zi},it(ni,{pluginName:"revertOnSpill"});function oi(){}oi.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:Zi},it(oi,{pluginName:"removeOnSpill"}),g.mount(new Zn),g.mount(oi,ni);const Gn=(n,t,e)=>{let i=[];n._sortable=g.create(n,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:o=>{const r=o.item;i=Array.prototype.slice.call(r.parentNode.childNodes),i=i.filter(s=>s.nodeType!=Node.ELEMENT_NODE||!s.classList.contains("sortable-fallback"))},onEnd:o=>{const s=o.item.parentNode;for(const a of i)s.appendChild(a);if(o.oldIndex==o.newIndex)return;const l=t.getArray().find(a=>a.ol_uid===o.item.querySelector("eox-layercontrol-layer").layer.ol_uid);t.remove(l),t.insertAt(t.getLength()-o.newIndex,l),e.requestUpdate()}})},ri=(n,t,e)=>{let i=[];const o=(r,s,l)=>{i=[...i,...r.filter(d=>d.get(s)===l)];const a=r.filter(d=>d.getLayers);return a.length>0&&a.forEach(d=>o(d.getLayers().getArray(),s,l)),i};return o(n,t,e),i},Kn=(n,t)=>{var e,i,o;if(!(!n||!t))return n.getLayers?"group":(o=(e=t.getInteractions().getArray().filter(r=>r.freehand_!==void 0).map(r=>r.source_))==null?void 0:e.ol_uid)!=null&&o.includes(n.getSource?(i=n.getSource())==null?void 0:i.ol_uid:void 0)?"draw":n.declutter_!==void 0?"vector":"raster"};/**
|
|
40
41
|
* @license
|
|
41
42
|
* Copyright 2020 Google LLC
|
|
42
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/const
|
|
44
|
+
*/const si=Ue(class extends Fe{constructor(n){if(super(n),n.type!==mt.PROPERTY&&n.type!==mt.ATTRIBUTE&&n.type!==mt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!wn(n))throw Error("`live` bindings can only contain a single expression")}render(n){return n}update(n,[t]){if(t===q||t===x)return t;const e=n.element,i=n.name;if(n.type===mt.PROPERTY){if(t===e[i])return q}else if(n.type===mt.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return q}else if(n.type===mt.ATTRIBUTE&&e.getAttribute(i)===t+"")return q;return Si(n),t}});/**
|
|
44
45
|
* @license
|
|
45
46
|
* Copyright 2017 Google LLC
|
|
46
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/
|
|
48
|
-
* @license
|
|
49
|
-
* Copyright 2020 Google LLC
|
|
50
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/const Le=bi(class extends _i{constructor(n){if(super(n),n.type!==pt.PROPERTY&&n.type!==pt.ATTRIBUTE&&n.type!==pt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!dn(n))throw Error("`live` bindings can only contain a single expression")}render(n){return n}update(n,[t]){if(t===Y||t===E)return t;const e=n.element,i=n.name;if(n.type===pt.PROPERTY){if(t===e[i])return Y}else if(n.type===pt.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(i))return Y}else if(n.type===pt.ATTRIBUTE&&e.getAttribute(i)===t+"")return Y;return wi(n),t}});/**
|
|
48
|
+
*/class ai extends Fe{constructor(t){if(super(t),this.et=x,t.type!==mt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===x||t==null)return this.ft=void 0,this.et=t;if(t===q)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}ai.directiveName="unsafeHTML",ai.resultType=1;const Jn=Ue(ai);/**
|
|
52
49
|
* @license
|
|
53
50
|
* Copyright 2021 Google LLC
|
|
54
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/function
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*/function Ai(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),e.push.apply(e,i)}return e}function G(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Ai(Object(e),!0).forEach(function(i){hn(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Ai(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function ie(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ie=function(t){return typeof t}:ie=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(n)}function hn(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function J(){return J=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},J.apply(this,arguments)}function pn(n,t){if(n==null)return{};var e={},i=Object.keys(n),r,o;for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&(e[r]=n[r]);return e}function fn(n,t){if(n==null)return{};var e=pn(n,t),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}var gn="1.15.0";function tt(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var et=tt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Vt=tt(/Edge/i),$i=tt(/firefox/i),Bt=tt(/safari/i)&&!tt(/chrome/i)&&!tt(/android/i),Si=tt(/iP(ad|od|hone)/i),Ti=tt(/chrome/i)&&tt(/android/i),Di={capture:!1,passive:!1};function w(n,t,e){n.addEventListener(t,e,!et&&Di)}function _(n,t,e){n.removeEventListener(t,e,!et&&Di)}function ne(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 mn(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Z(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&ne(n,t):ne(n,t))||i&&n===e)return n;if(n===e)break}while(n=mn(n))}return null}var Oi=/\s+/g;function V(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Oi," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Oi," ")}}function m(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 At(n,t){var e="";if(typeof n=="string")e=n;else do{var i=m(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function Li(n,t,e){if(n){var i=n.getElementsByTagName(t),r=0,o=i.length;if(e)for(;r<o;r++)e(i[r],r);return i}return[]}function q(){var n=document.scrollingElement;return n||document.documentElement}function O(n,t,e,i,r){if(!(!n.getBoundingClientRect&&n!==window)){var o,a,d,s,l,u,c;if(n!==window&&n.parentNode&&n!==q()?(o=n.getBoundingClientRect(),a=o.top,d=o.left,s=o.bottom,l=o.right,u=o.height,c=o.width):(a=0,d=0,s=window.innerHeight,l=window.innerWidth,u=window.innerHeight,c=window.innerWidth),(t||e)&&n!==window&&(r=r||n.parentNode,!et))do if(r&&r.getBoundingClientRect&&(m(r,"transform")!=="none"||e&&m(r,"position")!=="static")){var p=r.getBoundingClientRect();a-=p.top+parseInt(m(r,"border-top-width")),d-=p.left+parseInt(m(r,"border-left-width")),s=a+o.height,l=d+o.width;break}while(r=r.parentNode);if(i&&n!==window){var f=At(r||n),g=f&&f.a,y=f&&f.d;f&&(a/=y,d/=g,c/=g,u/=y,s=a+u,l=d+c)}return{top:a,left:d,bottom:s,right:l,width:c,height:u}}}function Hi(n,t,e){for(var i=rt(n,!0),r=O(n)[t];i;){var o=O(i)[e],a=void 0;if(e==="top"||e==="left"?a=r>=o:a=r<=o,!a)return i;if(i===q())break;i=rt(i,!1)}return!1}function $t(n,t,e,i){for(var r=0,o=0,a=n.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==v.ghost&&(i||a[o]!==v.dragged)&&Z(a[o],e.draggable,n,!1)){if(r===t)return a[o];r++}o++}return null}function He(n,t){for(var e=n.lastElementChild;e&&(e===v.ghost||m(e,"display")==="none"||t&&!ne(e,t));)e=e.previousElementSibling;return e||null}function j(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==v.clone&&(!t||ne(n,t))&&e++;return e}function Ii(n){var t=0,e=0,i=q();if(n)do{var r=At(n),o=r.a,a=r.d;t+=n.scrollLeft*o,e+=n.scrollTop*a}while(n!==i&&(n=n.parentNode));return[t,e]}function vn(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 rt(n,t){if(!n||!n.getBoundingClientRect)return q();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=m(e);if(e.clientWidth<e.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return q();if(i||t)return e;i=!0}}while(e=e.parentNode);return q()}function yn(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function Ie(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 Rt;function Mi(n,t){return function(){if(!Rt){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),Rt=setTimeout(function(){Rt=void 0},t)}}}function bn(){clearTimeout(Rt),Rt=void 0}function Pi(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function ki(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)}var B="Sortable"+new Date().getTime();function _n(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(m(r,"display")==="none"||r===v.ghost)){n.push({target:r,rect:O(r)});var o=G({},n[n.length-1].rect);if(r.thisAnimationDuration){var a=At(r,!0);a&&(o.top-=a.f,o.left-=a.e)}r.fromRect=o}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(vn(n,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var o=!1,a=0;n.forEach(function(d){var s=0,l=d.target,u=l.fromRect,c=O(l),p=l.prevFromRect,f=l.prevToRect,g=d.rect,y=At(l,!0);y&&(c.top-=y.f,c.left-=y.e),l.toRect=c,l.thisAnimationDuration&&Ie(p,c)&&!Ie(u,c)&&(g.top-c.top)/(g.left-c.left)===(u.top-c.top)/(u.left-c.left)&&(s=wn(g,p,f,r.options)),Ie(c,u)||(l.prevFromRect=u,l.prevToRect=c,s||(s=r.options.animation),r.animate(l,g,c,s)),s&&(o=!0,a=Math.max(a,s),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout(function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null},s),l.thisAnimationDuration=s)}),clearTimeout(t),o?t=setTimeout(function(){typeof i=="function"&&i()},a):typeof i=="function"&&i(),n=[]},animate:function(i,r,o,a){if(a){m(i,"transition",""),m(i,"transform","");var d=At(this.el),s=d&&d.a,l=d&&d.d,u=(r.left-o.left)/(s||1),c=(r.top-o.top)/(l||1);i.animatingX=!!u,i.animatingY=!!c,m(i,"transform","translate3d("+u+"px,"+c+"px,0)"),this.forRepaintDummy=En(i),m(i,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),m(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){m(i,"transition",""),m(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},a)}}}}function En(n){return n.offsetWidth}function wn(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 St=[],Me={initializeByDefault:!0},Ft={mount:function(t){for(var e in Me)Me.hasOwnProperty(e)&&!(e in t)&&(t[e]=Me[e]);St.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),St.push(t)},pluginEvent:function(t,e,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var o=t+"Global";St.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][o]&&e[a.pluginName][o](G({sortable:e},i)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](G({sortable:e},i)))})},initializePlugins:function(t,e,i,r){St.forEach(function(d){var s=d.pluginName;if(!(!t.options[s]&&!d.initializeByDefault)){var l=new d(t,e,t.options);l.sortable=t,l.options=t.options,t[s]=l,J(i,l.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var a=this.modifyOption(t,o,t.options[o]);typeof a<"u"&&(t.options[o]=a)}},getEventProperties:function(t,e){var i={};return St.forEach(function(r){typeof r.eventProperties=="function"&&J(i,r.eventProperties.call(e[r.pluginName],t))}),i},modifyOption:function(t,e,i){var r;return St.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[e]=="function"&&(r=o.optionListeners[e].call(t[o.pluginName],i))}),r}};function xn(n){var t=n.sortable,e=n.rootEl,i=n.name,r=n.targetEl,o=n.cloneEl,a=n.toEl,d=n.fromEl,s=n.oldIndex,l=n.newIndex,u=n.oldDraggableIndex,c=n.newDraggableIndex,p=n.originalEvent,f=n.putSortable,g=n.extraEventProperties;if(t=t||e&&e[B],!!t){var y,S=t.options,F="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!et&&!Vt?y=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(i,!0,!0)),y.to=a||e,y.from=d||e,y.item=r||e,y.clone=o,y.oldIndex=s,y.newIndex=l,y.oldDraggableIndex=u,y.newDraggableIndex=c,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var H=G(G({},g),Ft.getEventProperties(i,t));for(var W in H)y[W]=H[W];e&&e.dispatchEvent(y),S[F]&&S[F].call(t,y)}}var Cn=["evt"],N=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,o=fn(i,Cn);Ft.pluginEvent.bind(v)(t,e,G({dragEl:h,parentEl:$,ghostEl:b,rootEl:C,nextEl:gt,lastDownEl:re,cloneEl:A,cloneHidden:ot,dragStarted:zt,putSortable:I,activeSortable:v.active,originalEvent:r,oldIndex:Tt,oldDraggableIndex:Ut,newIndex:R,newDraggableIndex:at,hideGhostForTarget:zi,unhideGhostForTarget:ji,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(d){P({sortable:e,name:d,originalEvent:r})}},o))};function P(n){xn(G({putSortable:I,cloneEl:A,targetEl:h,rootEl:C,oldIndex:Tt,oldDraggableIndex:Ut,newIndex:R,newDraggableIndex:at},n))}var h,$,b,C,gt,re,A,ot,Tt,R,Ut,at,oe,I,Dt=!1,ae=!1,se=[],mt,X,Pe,ke,Ni,Vi,zt,Ot,jt,Yt=!1,le=!1,de,M,Ne=[],Ve=!1,ue=[],ce=typeof document<"u",he=Si,Bi=Vt||et?"cssFloat":"float",An=ce&&!Ti&&!Si&&"draggable"in document.createElement("div"),Ri=function(){if(ce){if(et)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Fi=function(t,e){var i=m(t),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=$t(t,0,e),a=$t(t,1,e),d=o&&m(o),s=a&&m(a),l=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+O(o).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+O(a).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(o&&d.float&&d.float!=="none"){var c=d.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===c)?"vertical":"horizontal"}return o&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||l>=r&&i[Bi]==="none"||a&&i[Bi]==="none"&&l+u>r)?"vertical":"horizontal"},$n=function(t,e,i){var r=i?t.left:t.top,o=i?t.right:t.bottom,a=i?t.width:t.height,d=i?e.left:e.top,s=i?e.right:e.bottom,l=i?e.width:e.height;return r===d||o===s||r+a/2===d+l/2},Sn=function(t,e){var i;return se.some(function(r){var o=r[B].options.emptyInsertThreshold;if(!(!o||He(r))){var a=O(r),d=t>=a.left-o&&t<=a.right+o,s=e>=a.top-o&&e<=a.bottom+o;if(d&&s)return i=r}}),i},Ui=function(t){function e(o,a){return function(d,s,l,u){var c=d.options.group.name&&s.options.group.name&&d.options.group.name===s.options.group.name;if(o==null&&(a||c))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return e(o(d,s,l,u),a)(d,s,l,u);var p=(a?d:s).options.group.name;return o===!0||typeof o=="string"&&o===p||o.join&&o.indexOf(p)>-1}}var i={},r=t.group;(!r||ie(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=e(r.pull,!0),i.checkPut=e(r.put),i.revertClone=r.revertClone,t.group=i},zi=function(){!Ri&&b&&m(b,"display","none")},ji=function(){!Ri&&b&&m(b,"display","")};ce&&!Ti&&document.addEventListener("click",function(n){if(ae)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),ae=!1,!1},!0);var vt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=Sn(t.clientX,t.clientY);if(e){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[B]._onDragOver(i)}}},Tn=function(t){h&&h.parentNode[B]._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=J({},t),n[B]=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 Fi(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(a,d){a.setData("Text",d.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&&!Bt,emptyInsertThreshold:5};Ft.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Ui(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:An,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?w(n,"pointerdown",this._onTapStart):(w(n,"mousedown",this._onTapStart),w(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(n,"dragover",this),w(n,"dragenter",this)),se.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),J(this,_n())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ot=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,r=this.options,o=r.preventOnFilter,a=t.type,d=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(d||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=r.filter;if(kn(i),!h&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||r.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&Bt&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=Z(s,r.draggable,i,!1),!(s&&s.animated)&&re!==s)){if(Tt=j(s),Ut=j(s,r.draggable),typeof u=="function"){if(u.call(this,t,s,this)){P({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:i,fromEl:i}),N("filter",e,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(c){if(c=Z(l,c.trim(),i,!1),c)return P({sortable:e,rootEl:c,name:"filter",targetEl:s,fromEl:i,toEl:i}),N("filter",e,{evt:t}),!0}),u)){o&&t.cancelable&&t.preventDefault();return}r.handle&&!Z(l,r.handle,i,!1)||this._prepareDragStart(t,d,s)}}},_prepareDragStart:function(t,e,i){var r=this,o=r.el,a=r.options,d=o.ownerDocument,s;if(i&&!h&&i.parentNode===o){var l=O(i);if(C=o,h=i,$=h.parentNode,gt=h.nextSibling,re=i,oe=a.group,v.dragged=h,mt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},Ni=mt.clientX-l.left,Vi=mt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",s=function(){if(N("delayEnded",r,{evt:t}),v.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!$i&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(t,e),P({sortable:r,name:"choose",originalEvent:t}),V(h,a.chosenClass,!0)},a.ignore.split(",").forEach(function(u){Li(h,u.trim(),Be)}),w(d,"dragover",vt),w(d,"mousemove",vt),w(d,"touchmove",vt),w(d,"mouseup",r._onDrop),w(d,"touchend",r._onDrop),w(d,"touchcancel",r._onDrop),$i&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),N("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Vt||et))){if(v.eventCanceled){this._onDrop();return}w(d,"mouseup",r._disableDelayedDrag),w(d,"touchend",r._disableDelayedDrag),w(d,"touchcancel",r._disableDelayedDrag),w(d,"mousemove",r._delayedDragTouchMoveHandler),w(d,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&w(d,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_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&&Be(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._disableDelayedDrag),_(t,"touchend",this._disableDelayedDrag),_(t,"touchcancel",this._disableDelayedDrag),_(t,"mousemove",this._delayedDragTouchMoveHandler),_(t,"touchmove",this._delayedDragTouchMoveHandler),_(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):e?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(h,"dragend",this),w(C,"dragstart",this._onDragStart));try{document.selection?fe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Dt=!1,C&&h){N("dragStarted",this,{evt:e}),this.nativeDraggable&&w(document,"dragover",Tn);var i=this.options;!t&&V(h,i.dragClass,!1),V(h,i.ghostClass,!0),v.active=this,t&&this._appendGhost(),P({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(X){this._lastX=X.clientX,this._lastY=X.clientY,zi();for(var t=document.elementFromPoint(X.clientX,X.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(X.clientX,X.clientY),t!==e);)e=t;if(h.parentNode[B]._isOutsideThisEl(t),e)do{if(e[B]){var i=void 0;if(i=e[B]._onDragOver({clientX:X.clientX,clientY:X.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);ji()}},_onTouchMove:function(t){if(mt){var e=this.options,i=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=b&&At(b,!0),d=b&&a&&a.a,s=b&&a&&a.d,l=he&&M&&Ii(M),u=(o.clientX-mt.clientX+r.x)/(d||1)+(l?l[0]-Ne[0]:0)/(d||1),c=(o.clientY-mt.clientY+r.y)/(s||1)+(l?l[1]-Ne[1]:0)/(s||1);if(!v.active&&!Dt){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(b){a?(a.e+=u-(Pe||0),a.f+=c-(ke||0)):a={a:1,b:0,c:0,d:1,e:u,f:c};var p="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");m(b,"webkitTransform",p),m(b,"mozTransform",p),m(b,"msTransform",p),m(b,"transform",p),Pe=u,ke=c,X=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!b){var t=this.options.fallbackOnBody?document.body:C,e=O(h,!0,he,!0,t),i=this.options;if(he){for(M=t;m(M,"position")==="static"&&m(M,"transform")==="none"&&M!==document;)M=M.parentNode;M!==document.body&&M!==document.documentElement?(M===document&&(M=q()),e.top+=M.scrollTop,e.left+=M.scrollLeft):M=q(),Ne=Ii(M)}b=h.cloneNode(!0),V(b,i.ghostClass,!1),V(b,i.fallbackClass,!0),V(b,i.dragClass,!0),m(b,"transition",""),m(b,"transform",""),m(b,"box-sizing","border-box"),m(b,"margin",0),m(b,"top",e.top),m(b,"left",e.left),m(b,"width",e.width),m(b,"height",e.height),m(b,"opacity","0.8"),m(b,"position",he?"absolute":"fixed"),m(b,"zIndex","100000"),m(b,"pointerEvents","none"),v.ghost=b,t.appendChild(b),m(b,"transform-origin",Ni/parseInt(b.style.width)*100+"% "+Vi/parseInt(b.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,r=t.dataTransfer,o=i.options;if(N("dragStart",this,{evt:t}),v.eventCanceled){this._onDrop();return}N("setupClone",this),v.eventCanceled||(A=ki(h),A.removeAttribute("id"),A.draggable=!1,A.style["will-change"]="",this._hideClone(),V(A,this.options.chosenClass,!1),v.clone=A),i.cloneId=fe(function(){N("clone",i),!v.eventCanceled&&(i.options.removeCloneOnHide||C.insertBefore(A,h),i._hideClone(),P({sortable:i,name:"clone"}))}),!e&&V(h,o.dragClass,!0),e?(ae=!0,i._loopId=setInterval(i._emulateDragOver,50)):(_(document,"mouseup",i._onDrop),_(document,"touchend",i._onDrop),_(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(i,r,h)),w(document,"drop",i),m(h,"transform","translateZ(0)")),Dt=!0,i._dragStartId=fe(i._dragStarted.bind(i,e,t)),w(document,"selectstart",i),zt=!0,Bt&&m(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,r,o,a,d=this.options,s=d.group,l=v.active,u=oe===s,c=d.sort,p=I||l,f,g=this,y=!1;if(Ve)return;function S(Qt,Rn){N(Qt,g,G({evt:t,isOwner:u,axis:f?"vertical":"horizontal",revert:a,dragRect:r,targetRect:o,canSort:c,fromSortable:p,target:i,completed:H,onMove:function(Zi,Fn){return pe(C,e,h,r,Zi,O(Zi),t,Fn)},changed:W},Rn))}function F(){S("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function H(Qt){return S("dragOverCompleted",{insertion:Qt}),Qt&&(u?l._hideClone():l._showClone(g),g!==p&&(V(h,I?I.options.ghostClass:l.options.ghostClass,!1),V(h,d.ghostClass,!0)),I!==g&&g!==v.active?I=g:g===v.active&&I&&(I=null),p===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){S("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(Ot=null),!d.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[B]._isOutsideThisEl(t.target),!Qt&&vt(t)),!d.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function W(){R=j(h),at=j(h,d.draggable),P({sortable:g,name:"change",toEl:e,newIndex:R,newDraggableIndex:at,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=Z(i,d.draggable,e,!0),S("dragOver"),v.eventCanceled)return y;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return H(!1);if(ae=!1,l&&!d.disabled&&(u?c||(a=$!==C):I===this||(this.lastPutMode=oe.checkPull(this,l,h,t))&&s.checkPut(this,l,h,t))){if(f=this._getDirection(t,i)==="vertical",r=O(h),S("dragOverValid"),v.eventCanceled)return y;if(a)return $=C,F(),this._hideClone(),S("revert"),v.eventCanceled||(gt?C.insertBefore(h,gt):C.appendChild(h)),H(!0);var U=He(e,d.draggable);if(!U||Hn(t,f,this)&&!U.animated){if(U===h)return H(!1);if(U&&e===t.target&&(i=U),i&&(o=O(i)),pe(C,e,h,r,i,o,t,!!i)!==!1)return F(),U&&U.nextSibling?e.insertBefore(h,U.nextSibling):e.appendChild(h),$=e,W(),H(!0)}else if(U&&Ln(t,f,this)){var yt=$t(e,0,d,!0);if(yt===h)return H(!1);if(i=yt,o=O(i),pe(C,e,h,r,i,o,t,!1)!==!1)return F(),e.insertBefore(h,yt),$=e,W(),H(!0)}else if(i.parentNode===e){o=O(i);var K=0,bt,Gt=h.parentNode!==e,z=!$n(h.animated&&h.toRect||r,i.animated&&i.toRect||o,f),Zt=f?"top":"left",st=Hi(i,"top","top")||Hi(h,"top","top"),qt=st?st.scrollTop:void 0;Ot!==i&&(bt=o[Zt],Yt=!1,le=!z&&d.invertSwap||Gt),K=In(t,i,o,f,z?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,le,Ot===i);var it;if(K!==0){var _t=j(h);do _t-=K,it=$.children[_t];while(it&&(m(it,"display")==="none"||it===b))}if(K===0||it===i)return H(!1);Ot=i,jt=K;var Kt=i.nextElementSibling,lt=!1;lt=K===1;var ve=pe(C,e,h,r,i,o,t,lt);if(ve!==!1)return(ve===1||ve===-1)&&(lt=ve===1),Ve=!0,setTimeout(On,30),F(),lt&&!Kt?e.appendChild(h):i.parentNode.insertBefore(h,lt?Kt:i),st&&Pi(st,0,qt-st.scrollTop),$=h.parentNode,bt!==void 0&&!le&&(de=Math.abs(bt-O(i)[Zt])),W(),H(!0)}if(e.contains(h))return H(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",vt),_(document,"mousemove",vt),_(document,"touchmove",vt)},_offUpEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._onDrop),_(t,"touchend",this._onDrop),_(t,"pointerup",this._onDrop),_(t,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(R=j(h),at=j(h,i.draggable),N("drop",this,{evt:t}),$=h&&h.parentNode,R=j(h),at=j(h,i.draggable),v.eventCanceled){this._nulling();return}Dt=!1,le=!1,Yt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Re(this.cloneId),Re(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Bt&&m(document.body,"user-select",""),m(h,"transform",""),t&&(zt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),b&&b.parentNode&&b.parentNode.removeChild(b),(C===$||I&&I.lastPutMode!=="clone")&&A&&A.parentNode&&A.parentNode.removeChild(A),h&&(this.nativeDraggable&&_(h,"dragend",this),Be(h),h.style["will-change"]="",zt&&!Dt&&V(h,I?I.options.ghostClass:this.options.ghostClass,!1),V(h,this.options.chosenClass,!1),P({sortable:this,name:"unchoose",toEl:$,newIndex:null,newDraggableIndex:null,originalEvent:t}),C!==$?(R>=0&&(P({rootEl:$,name:"add",toEl:$,fromEl:C,originalEvent:t}),P({sortable:this,name:"remove",toEl:$,originalEvent:t}),P({rootEl:$,name:"sort",toEl:$,fromEl:C,originalEvent:t}),P({sortable:this,name:"sort",toEl:$,originalEvent:t})),I&&I.save()):R!==Tt&&R>=0&&(P({sortable:this,name:"update",toEl:$,originalEvent:t}),P({sortable:this,name:"sort",toEl:$,originalEvent:t})),v.active&&((R==null||R===-1)&&(R=Tt,at=Ut),P({sortable:this,name:"end",toEl:$,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),C=h=$=b=gt=A=re=ot=mt=X=zt=R=at=Tt=Ut=Ot=jt=I=oe=v.dragged=v.ghost=v.clone=v.active=null,ue.forEach(function(t){t.checked=!0}),ue.length=Pe=ke=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),Dn(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,r=0,o=i.length,a=this.options;r<o;r++)e=i[r],Z(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Pn(e));return t},sort:function(t,e){var i={},r=this.el;this.toArray().forEach(function(o,a){var d=r.children[a];Z(d,this.options.draggable,r,!1)&&(i[o]=d)},this),e&&this.captureAnimationState(),t.forEach(function(o){i[o]&&(r.removeChild(i[o]),r.appendChild(i[o]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Z(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var r=Ft.modifyOption(this,t,e);typeof r<"u"?i[t]=r:i[t]=e,t==="group"&&Ui(i)},destroy:function(){N("destroy",this);var t=this.el;t[B]=null,_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart),_(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),se.splice(se.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ot){if(N("hideClone",this),v.eventCanceled)return;m(A,"display","none"),this.options.removeCloneOnHide&&A.parentNode&&A.parentNode.removeChild(A),ot=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(ot){if(N("showClone",this),v.eventCanceled)return;h.parentNode==C&&!this.options.group.revertClone?C.insertBefore(A,h):gt?C.insertBefore(A,gt):C.appendChild(A),this.options.group.revertClone&&this.animate(h,A),m(A,"display",""),ot=!1}}};function Dn(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function pe(n,t,e,i,r,o,a,d){var s,l=n[B],u=l.options.onMove,c;return window.CustomEvent&&!et&&!Vt?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=n,s.dragged=e,s.draggedRect=i,s.related=r||t,s.relatedRect=o||O(t),s.willInsertAfter=d,s.originalEvent=a,n.dispatchEvent(s),u&&(c=u.call(l,s,a)),c}function Be(n){n.draggable=!1}function On(){Ve=!1}function Ln(n,t,e){var i=O($t(e.el,0,e.options,!0)),r=10;return t?n.clientX<i.left-r||n.clientY<i.top&&n.clientX<i.right:n.clientY<i.top-r||n.clientY<i.bottom&&n.clientX<i.left}function Hn(n,t,e){var i=O(He(e.el,e.options.draggable)),r=10;return t?n.clientX>i.right+r||n.clientX<=i.right&&n.clientY>i.bottom&&n.clientX>=i.left:n.clientX>i.right&&n.clientY>i.top||n.clientX<=i.right&&n.clientY>i.bottom+r}function In(n,t,e,i,r,o,a,d){var s=i?n.clientY:n.clientX,l=i?e.height:e.width,u=i?e.top:e.left,c=i?e.bottom:e.right,p=!1;if(!a){if(d&&de<l*r){if(!Yt&&(jt===1?s>u+l*o/2:s<c-l*o/2)&&(Yt=!0),Yt)p=!0;else if(jt===1?s<u+de:s>c-de)return-jt}else if(s>u+l*(1-r)/2&&s<c-l*(1-r)/2)return Mn(t)}return p=p||a,p&&(s<u+l*o/2||s>c-l*o/2)?s>u+l/2?1:-1:0}function Mn(n){return j(h)<j(n)?1:-1}function Pn(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 kn(n){ue.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&ue.push(i)}}function fe(n){return setTimeout(n,0)}function Re(n){return clearTimeout(n)}ce&&w(document,"touchmove",function(n){(v.active||Dt)&&n.cancelable&&n.preventDefault()}),v.utils={on:w,off:_,css:m,find:Li,is:function(t,e){return!!Z(t,e,t,!1)},extend:yn,throttle:Mi,closest:Z,toggleClass:V,clone:ki,index:j,nextTick:fe,cancelNextTick:Re,detectDirection:Fi,getChild:$t},v.get=function(n){return n[B]},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=G(G({},v.utils),i.utils)),Ft.mount(i)})},v.create=function(n,t){return new v(n,t)},v.version=gn;var T=[],Xt,Fe,Ue=!1,ze,je,ge,Wt;function Nn(){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?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):i.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),Yi(),me(),bn()},nulling:function(){ge=Fe=Xt=Ue=Wt=ze=je=null,T.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var r=this,o=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,d=document.elementFromPoint(o,a);if(ge=e,i||this.options.forceAutoScrollFallback||Vt||et||Bt){Ye(e,this.options,d,i);var s=rt(d,!0);Ue&&(!Wt||o!==ze||a!==je)&&(Wt&&Yi(),Wt=setInterval(function(){var l=rt(document.elementFromPoint(o,a),!0);l!==s&&(s=l,me()),Ye(e,r.options,l,i)},10),ze=o,je=a)}else{if(!this.options.bubbleScroll||rt(d,!0)===q()){me();return}Ye(e,this.options,rt(d,!1),!1)}}},J(n,{pluginName:"scroll",initializeByDefault:!0})}function me(){T.forEach(function(n){clearInterval(n.pid)}),T=[]}function Yi(){clearInterval(Wt)}var Ye=Mi(function(n,t,e,i){if(t.scroll){var r=(n.touches?n.touches[0]:n).clientX,o=(n.touches?n.touches[0]:n).clientY,a=t.scrollSensitivity,d=t.scrollSpeed,s=q(),l=!1,u;Fe!==e&&(Fe=e,me(),Xt=t.scroll,u=t.scrollFn,Xt===!0&&(Xt=rt(e,!0)));var c=0,p=Xt;do{var f=p,g=O(f),y=g.top,S=g.bottom,F=g.left,H=g.right,W=g.width,U=g.height,yt=void 0,K=void 0,bt=f.scrollWidth,Gt=f.scrollHeight,z=m(f),Zt=f.scrollLeft,st=f.scrollTop;f===s?(yt=W<bt&&(z.overflowX==="auto"||z.overflowX==="scroll"||z.overflowX==="visible"),K=U<Gt&&(z.overflowY==="auto"||z.overflowY==="scroll"||z.overflowY==="visible")):(yt=W<bt&&(z.overflowX==="auto"||z.overflowX==="scroll"),K=U<Gt&&(z.overflowY==="auto"||z.overflowY==="scroll"));var qt=yt&&(Math.abs(H-r)<=a&&Zt+W<bt)-(Math.abs(F-r)<=a&&!!Zt),it=K&&(Math.abs(S-o)<=a&&st+U<Gt)-(Math.abs(y-o)<=a&&!!st);if(!T[c])for(var _t=0;_t<=c;_t++)T[_t]||(T[_t]={});(T[c].vx!=qt||T[c].vy!=it||T[c].el!==f)&&(T[c].el=f,T[c].vx=qt,T[c].vy=it,clearInterval(T[c].pid),(qt!=0||it!=0)&&(l=!0,T[c].pid=setInterval(function(){i&&this.layer===0&&v.active._onTouchMove(ge);var Kt=T[this.layer].vy?T[this.layer].vy*d:0,lt=T[this.layer].vx?T[this.layer].vx*d:0;typeof u=="function"&&u.call(v.dragged.parentNode[B],lt,Kt,n,ge,T[this.layer].el)!=="continue"||Pi(T[this.layer].el,lt,Kt)}.bind({layer:c}),24))),c++}while(t.bubbleScroll&&p!==s&&(p=rt(p,!1)));Ue=l}},30),Xi=function(t){var e=t.originalEvent,i=t.putSortable,r=t.dragEl,o=t.activeSortable,a=t.dispatchSortableEvent,d=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var l=i||o;d();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);s(),l&&!l.el.contains(c)&&(a("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function Xe(){}Xe.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 r=$t(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Xi},J(Xe,{pluginName:"revertOnSpill"});function We(){}We.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,r=i||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:Xi},J(We,{pluginName:"removeOnSpill"}),v.mount(new Nn),v.mount(We,Xe);const Wi=`
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
.layer
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
52
|
+
*/function*me(n,t){if(n!==void 0){let e=0;for(const i of n)yield t(i,e++)}}class Gi extends Y{constructor(){super();V(this,ve,"");V(this,ye,"");this.layer=null,this.unstyled=!1}render(){var e;return _`
|
|
53
|
+
<style>
|
|
54
|
+
${I(this,ve)}
|
|
55
|
+
${!this.unstyled&&I(this,ye)}
|
|
56
|
+
</style>
|
|
57
|
+
<input
|
|
58
|
+
type="range"
|
|
59
|
+
min="0"
|
|
60
|
+
max="1"
|
|
61
|
+
step="0.01"
|
|
62
|
+
value=${si((e=this.layer)==null?void 0:e.getOpacity())}
|
|
63
|
+
@input=${i=>this.layer.setOpacity(parseFloat(i.target.value))}
|
|
64
|
+
/>
|
|
65
|
+
<button
|
|
66
|
+
class="delete"
|
|
67
|
+
@click=${()=>{var i,o;(i=this.layer)==null||i.set("layerControlOptional",!0),(o=this.layer)==null||o.setVisible(!1),this.dispatchEvent(new CustomEvent("changed",{detail:this.layer,bubbles:!0}))}}
|
|
68
|
+
>
|
|
69
|
+
x
|
|
70
|
+
</button>
|
|
71
|
+
`}}ve=new WeakMap,ye=new WeakMap,X(Gi,"properties",{layer:{attribute:!1},unstyled:{type:Boolean}}),customElements.define("eox-layercontrol-layerconfig",Gi);class Ki extends Y{constructor(){super();V(this,be,`
|
|
72
|
+
.tabbed figure {
|
|
73
|
+
margin: 0;
|
|
74
|
+
}
|
|
75
|
+
.tabbed nav {
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: space-between;
|
|
78
|
+
}
|
|
79
|
+
.tabbed nav div {
|
|
80
|
+
display: flex;
|
|
81
|
+
}
|
|
82
|
+
.tabbed .tab {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
.tabbed .tab.highlighted {
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
.tabbed label.highlighted {
|
|
89
|
+
background: lightgrey;
|
|
90
|
+
}
|
|
91
|
+
`);V(this,Ee,`
|
|
92
|
+
.tabbed {
|
|
93
|
+
font-size: small;
|
|
94
|
+
}
|
|
95
|
+
.tabbed label.highlighted {
|
|
96
|
+
background: #00417011;
|
|
97
|
+
}
|
|
98
|
+
nav div label,
|
|
99
|
+
nav div span {
|
|
100
|
+
width: 20px;
|
|
101
|
+
height: 20px;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
}
|
|
107
|
+
figure {
|
|
108
|
+
background: #00417011;
|
|
109
|
+
border-top: 1px solid #0041701a;
|
|
110
|
+
}
|
|
111
|
+
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1}render(){return _`
|
|
112
|
+
<style>
|
|
113
|
+
${I(this,be)}
|
|
114
|
+
${!this.unstyled&&I(this,Ee)}
|
|
115
|
+
</style>
|
|
116
|
+
<div class="tabbed">
|
|
117
|
+
${et(this.actions.length+this.tabs.length>1,()=>_`
|
|
118
|
+
<nav>
|
|
119
|
+
<div>
|
|
120
|
+
${me(this.tabs,(e,i)=>_`
|
|
121
|
+
<label
|
|
122
|
+
class=${this.selectedTab===i&&"highlighted"}
|
|
123
|
+
@click=${()=>this.selectedTab=i}
|
|
124
|
+
>
|
|
125
|
+
<slot name=${e+"-icon"}>${e}</slot>
|
|
126
|
+
</label>
|
|
127
|
+
`)}
|
|
128
|
+
</div>
|
|
129
|
+
<div>
|
|
130
|
+
${me(this.actions,e=>_`
|
|
131
|
+
<span>
|
|
132
|
+
<slot name=${e+"-icon"}>${e}</slot>
|
|
133
|
+
</span>
|
|
134
|
+
`)}
|
|
135
|
+
</div>
|
|
136
|
+
</nav>
|
|
137
|
+
`)}
|
|
138
|
+
<figure>
|
|
139
|
+
${me(this.tabs,(e,i)=>_`
|
|
140
|
+
<div class="tab ${this.selectedTab===i&&"highlighted"}">
|
|
141
|
+
<slot name=${e+"-content"}>${e}</slot>
|
|
142
|
+
</div>
|
|
143
|
+
`)}
|
|
144
|
+
</figure>
|
|
145
|
+
</div>
|
|
146
|
+
`}}be=new WeakMap,Ee=new WeakMap,X(Ki,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",Ki);const Qn=`
|
|
79
147
|
button {
|
|
80
148
|
/* TODO: why does this only work here and not from :root? */
|
|
81
149
|
--primary-color: #004170;
|
|
@@ -103,7 +171,7 @@ button {
|
|
|
103
171
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
104
172
|
}
|
|
105
173
|
|
|
106
|
-
button:hover {
|
|
174
|
+
button:hover:not([disabled]):not(.icon) {
|
|
107
175
|
box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
|
|
108
176
|
background: var(--primary-color-hover);
|
|
109
177
|
}
|
|
@@ -112,6 +180,10 @@ button, button:active {
|
|
|
112
180
|
background: var(--primary-color);
|
|
113
181
|
}
|
|
114
182
|
|
|
183
|
+
button[disabled] {
|
|
184
|
+
opacity: 0.5;
|
|
185
|
+
}
|
|
186
|
+
|
|
115
187
|
button.outline {
|
|
116
188
|
background: transparent;
|
|
117
189
|
box-shadow: none;
|
|
@@ -130,6 +202,8 @@ button.icon {
|
|
|
130
202
|
padding: 0;
|
|
131
203
|
border-radius: 50%;
|
|
132
204
|
width: 24px;
|
|
205
|
+
height: 24px;
|
|
206
|
+
text-indent: -9999px;
|
|
133
207
|
}
|
|
134
208
|
|
|
135
209
|
button.icon-text {
|
|
@@ -158,8 +232,58 @@ button.small {
|
|
|
158
232
|
padding: 12.4px;
|
|
159
233
|
font-size: .75rem;
|
|
160
234
|
}
|
|
235
|
+
`,to=`
|
|
236
|
+
input[type=radio] {
|
|
237
|
+
appearance: none;
|
|
238
|
+
-webkit-appearance: none;
|
|
239
|
+
margin: 0;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
display: flex;
|
|
242
|
+
flex-direction: row;
|
|
243
|
+
align-items: center;
|
|
244
|
+
width: 24px;
|
|
245
|
+
height: 24px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
label span {
|
|
249
|
+
font-size: small;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
input[type=radio]:after {
|
|
253
|
+
display: block;
|
|
254
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-blank%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,2Z' /%3E%3C/svg%3E");
|
|
255
|
+
width: 20px;
|
|
256
|
+
height: 20px;
|
|
257
|
+
margin-right: 4px;
|
|
258
|
+
}
|
|
259
|
+
input[type=radio]:checked:after {
|
|
260
|
+
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");
|
|
161
261
|
|
|
262
|
+
}
|
|
263
|
+
`,Ji=`
|
|
264
|
+
input[type=checkbox] {
|
|
265
|
+
appearance: none;
|
|
266
|
+
-webkit-appearance: none;
|
|
267
|
+
margin: 0;
|
|
268
|
+
cursor: pointer;
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: row;
|
|
271
|
+
align-items: center;
|
|
272
|
+
width: 24px;
|
|
273
|
+
height: 24px;
|
|
274
|
+
}
|
|
275
|
+
input[type=checkbox]:after {
|
|
276
|
+
display: block;
|
|
277
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-blank-outline%3C/title%3E%3Cpath d='M19,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,3M19,5V19H5V5H19Z' /%3E%3C/svg%3E");
|
|
278
|
+
width: 20px;
|
|
279
|
+
height: 20px;
|
|
280
|
+
margin-right: 4px;
|
|
281
|
+
}
|
|
282
|
+
input[type=checkbox]:checked:after {
|
|
283
|
+
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");
|
|
162
284
|
|
|
285
|
+
}
|
|
286
|
+
`,eo=`
|
|
163
287
|
input[type="range"] {
|
|
164
288
|
-webkit-appearance: none;
|
|
165
289
|
width: 90%;
|
|
@@ -236,449 +360,389 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
236
360
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
237
361
|
border: 0;
|
|
238
362
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
button.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
.
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
.
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
details summary
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
.
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
input[type="text"]::before {
|
|
450
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Emagnify%3C/title%3E%3Cpath d='M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z' /%3E%3C/svg%3E");
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
ul {
|
|
454
|
-
padding: 0;
|
|
455
|
-
background: #D7E2EE;
|
|
456
|
-
background: #CFDDEB00;
|
|
457
|
-
}
|
|
458
|
-
li {
|
|
459
|
-
list-style: none;
|
|
460
|
-
cursor: pointer;
|
|
461
|
-
background: #CFDDEB00;
|
|
462
|
-
border-top: 1px solid #00417033;
|
|
463
|
-
}
|
|
464
|
-
li summary {
|
|
465
|
-
display: flex;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.slider-control {
|
|
469
|
-
display: flex;
|
|
470
|
-
flex-direction: row;
|
|
471
|
-
align-items: center;
|
|
472
|
-
margin-top: 9px;
|
|
473
|
-
margin-left: 64px;
|
|
474
|
-
margin-bottom: 12px;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.slider-control input[type=range] {
|
|
478
|
-
max-width: 120px;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.slider-control .slider-property {
|
|
482
|
-
width: 80px;
|
|
483
|
-
color: #3B6289;
|
|
484
|
-
font-size: 14px;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
.slider-control > * {
|
|
488
|
-
text-transform: capitalize;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
/* Expansible Section Chevron */
|
|
492
|
-
li summary:before {
|
|
493
|
-
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
|
|
494
|
-
font-size: 13px;
|
|
495
|
-
width: 24px;
|
|
496
|
-
height: 24px;
|
|
497
|
-
margin-right: 6px;
|
|
498
|
-
margin-left: -1px;
|
|
499
|
-
|
|
500
|
-
margin-top: 5px;
|
|
501
|
-
}
|
|
502
|
-
li details[open] > summary:before {
|
|
503
|
-
transform: rotate(90deg);
|
|
504
|
-
}
|
|
505
|
-
li[data-layerconfig=false]:not([data-type=group]) summary:before {
|
|
506
|
-
display: none;
|
|
507
|
-
}
|
|
508
|
-
li .layer {
|
|
509
|
-
width: 100%;
|
|
510
|
-
}
|
|
511
|
-
li .layer .left,
|
|
512
|
-
li .layer .right {
|
|
513
|
-
display: flex;
|
|
514
|
-
align-items: flex-start;
|
|
515
|
-
}
|
|
516
|
-
li .layer .left .title {
|
|
517
|
-
cursor: pointer;
|
|
518
|
-
display: flex;
|
|
519
|
-
margin-left: 6px;
|
|
520
|
-
}
|
|
521
|
-
li .layer .left {
|
|
522
|
-
margin-top: 7px;
|
|
523
|
-
}
|
|
524
|
-
li .layer .right {
|
|
525
|
-
margin-top: 5px;
|
|
526
|
-
}
|
|
527
|
-
.drag-handle span {
|
|
528
|
-
display: none;
|
|
529
|
-
}
|
|
530
|
-
.drag-handle {
|
|
531
|
-
cursor: ns-resize;
|
|
532
|
-
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Edrag%3C/title%3E%3Cpath fill='%23004170' d='M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z' /%3E%3C/svg%3E");
|
|
533
|
-
width: 24px;
|
|
534
|
-
height: 24px;
|
|
535
|
-
}
|
|
536
|
-
.drag-handle.disabled {
|
|
537
|
-
cursor: not-allowed;
|
|
538
|
-
opacity: 0.3;
|
|
539
|
-
}
|
|
540
|
-
li.sortable-chosen {
|
|
541
|
-
background: #eeea;
|
|
542
|
-
}
|
|
543
|
-
li.sortable-drag {
|
|
544
|
-
opacity: 0;
|
|
545
|
-
}
|
|
546
|
-
li.sortable-ghost {
|
|
547
|
-
}
|
|
548
|
-
`;var Vn=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,D=(n,t,e,i)=>{for(var r=i>1?void 0:i?Bn(t,e):t,o=n.length-1,a;o>=0;o--)(a=n[o])&&(r=(i?a(t,e,r):a(r))||r);return i&&r&&Vn(t,e,r),r};x.EOxLayerControl=class extends Ct{constructor(){super(...arguments),this.for="eox-map",this.layerIdentifier="id",this.layerTitle="title",this.sortBy="layerOrder",this.layerConfig=["opacity"],this.externalLayerConfig=void 0,this.resetLayers=!1,this.filterLayers=(t,e,i)=>{let r=[];const o=(a,d,s)=>{r=[...r,...a.filter(u=>u.get(d)===s)];const l=a.filter(u=>u.getLayers);return l.length>0&&l.forEach(u=>o(u.getLayers().getArray(),d,s)),r};return o(t,e,i),r},this.findLayerById=(t,e)=>this.filterLayers(t,"id",e)[0],this.getLayerType=(t,e)=>{var i;return t.getLayers?"group":e.getInteractions().getArray().filter(r=>r.freehand_!==void 0).map(r=>{var o;return(o=r.source_)==null?void 0:o.ol_uid}).includes(t.getSource?(i=t.getSource())==null?void 0:i.ol_uid:void 0)?"draw":t.declutter_!==void 0?"vector":"raster"}}_updateControl(t){const e=(i,r)=>{i.forEach(o=>{r&&o.set("_group_id",r),o.get(this.layerIdentifier)||o.set(this.layerIdentifier,o.ol_uid),o.get(this.layerTitle)||o.set(this.layerTitle,`layer ${o.ol_uid}`),o.getLayers&&e(o.getLayers().getArray(),o.get("id")||o.ol_uid)})};e(t.getArray()),this.layerCollection=t,this.optionalLayerArray=this.filterLayers(t.getArray(),"layerControlOptional",!0)}_emitLayerconfig(t){const e={detail:{layer:t},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("layerconfig",e))}changeOpacity(t,e){t.setOpacity(e)}changeStyleProperty(t,e,i){t.updateStyleVariables({...t.style_,[e]:i})}preFilterLayers(t){return[...t].filter(e=>e.get("layerControlHide")!==!0&&e.get("layerControlOptional")!==!0)}toggleLayerVisibility(t,e){if(t.setVisible(!t.getVisible()),t.get("layerControlExclusive")){let i=[];e?i=this.findLayerById(this.layerCollection.getArray(),e).getLayers().getArray().filter(o=>o.get(this.layerIdentifier)!==t.get(this.layerIdentifier)&&o.get("layerControlExclusive")):i=this.layerCollection.getArray().filter(r=>r.get(this.layerIdentifier)!==t.get(this.layerIdentifier)&&r.get("layerControlExclusive")),i.forEach(r=>{r.setVisible(!1)}),this.requestUpdate()}}render(){var d;const t=document.querySelector(this.for);if(t&&(t.map?this.olMap=t.map:this.olMap=t),!this.olMap)return E;const e=this.olMap.getLayers();this._updateControl(e);const i=s=>{s.on("change:length",()=>{this._currentlySorting||(this.resetLayers=!0,this._updateControl(s),setTimeout(()=>{this.resetLayers=!1,this._updateControl(s)}))})};i(e);const r=s=>{s.getArray().forEach(l=>{if(l.getLayers){const u=l.getLayers();i(u),r(u)}})};r(e);const o=(s,l,u)=>{var c;return L`
|
|
549
|
-
<details open="${s.get("layerControlExpand")?!0:E}">
|
|
550
|
-
<summary>
|
|
551
|
-
<div class="layer">
|
|
552
|
-
<div class="left">
|
|
363
|
+
`;class Qi extends Y{constructor(){super();X(this,"_parseActions",e=>e==null?void 0:e.filter(i=>["remove","sort"].filter(o=>{var r;return(r=this.layer)!=null&&r.get("layerControlDisable")?o!=="sort":!0}).includes(i)));X(this,"_parseTools",e=>e==null?void 0:e.filter(i=>{var r;let o=!0;return["remove","sort"].includes(i)&&(o=!1),i==="info"&&(o=this.layer.get("description")),i==="config"&&(o=(r=this.layer.style_)==null?void 0:r.color),o}));X(this,"_removeButton",_`
|
|
364
|
+
<button
|
|
365
|
+
class="remove-icon icon"
|
|
366
|
+
@click=${()=>{var e,i;(e=this.layer)==null||e.set("layerControlOptional",!0),(i=this.layer)==null||i.setVisible(!1),this.dispatchEvent(new CustomEvent("changed",{detail:this.layer,bubbles:!0}))}}
|
|
367
|
+
>
|
|
368
|
+
${this.unstyled?"x":x}
|
|
369
|
+
</button>
|
|
370
|
+
`);X(this,"_sortButton",_`
|
|
371
|
+
<button class="sort-icon icon drag-handle">
|
|
372
|
+
${this.unstyled?"sort":x}
|
|
373
|
+
</button>
|
|
374
|
+
`);V(this,we,"");V(this,_e,`
|
|
375
|
+
${Qn}
|
|
376
|
+
${to}
|
|
377
|
+
${Ji}
|
|
378
|
+
${eo}
|
|
379
|
+
button.icon.drag-handle {
|
|
380
|
+
cursor: n-resize;
|
|
381
|
+
}
|
|
382
|
+
.single-action-container,
|
|
383
|
+
details.tools {
|
|
384
|
+
position: relative;
|
|
385
|
+
}
|
|
386
|
+
eox-layercontrol-layer details summary::before {
|
|
387
|
+
content: "";
|
|
388
|
+
}
|
|
389
|
+
details.tools[open] {
|
|
390
|
+
/*border-top: 1px solid #0041703a;*/
|
|
391
|
+
}
|
|
392
|
+
.single-action {
|
|
393
|
+
position: relative;
|
|
394
|
+
}
|
|
395
|
+
details.tools summary .icon {
|
|
396
|
+
pointer-events: none;
|
|
397
|
+
}
|
|
398
|
+
.single-action,
|
|
399
|
+
details.tools summary {
|
|
400
|
+
position: absolute;
|
|
401
|
+
right: 0;
|
|
402
|
+
top: -24px;
|
|
403
|
+
display: flex;
|
|
404
|
+
border-radius: 4px;
|
|
405
|
+
cursor: pointer;
|
|
406
|
+
}
|
|
407
|
+
.single-action .icon::before,
|
|
408
|
+
details.tools summary .icon::before {
|
|
409
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Edots-vertical%3C/title%3E%3Cpath d='M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z' /%3E%3C/svg%3E");
|
|
410
|
+
}
|
|
411
|
+
.single-action,
|
|
412
|
+
details.tools summary,
|
|
413
|
+
eox-layercontrol-tabs button.icon {
|
|
414
|
+
transition: opacity .2s;
|
|
415
|
+
}
|
|
416
|
+
.single-action,
|
|
417
|
+
details.tools summary {
|
|
418
|
+
opacity: .5;
|
|
419
|
+
}
|
|
420
|
+
eox-layercontrol-tabs button.icon {
|
|
421
|
+
opacity: .7;
|
|
422
|
+
}
|
|
423
|
+
.single-action:hover,
|
|
424
|
+
details.tools summary:hover,
|
|
425
|
+
eox-layercontrol-tabs button.icon:hover {
|
|
426
|
+
opacity: 1;
|
|
427
|
+
}
|
|
428
|
+
.tools-placeholder,
|
|
429
|
+
.single-action .icon,
|
|
430
|
+
.single-action .icon::before,
|
|
431
|
+
details.tools summary .icon,
|
|
432
|
+
details.tools summary .icon::before {
|
|
433
|
+
height: 16px;
|
|
434
|
+
width: 16px;
|
|
435
|
+
}
|
|
436
|
+
eox-layercontrol-tabs button.icon {
|
|
437
|
+
display: flex;
|
|
438
|
+
justify-content: center;
|
|
439
|
+
}
|
|
440
|
+
eox-layercontrol-tabs .icon::before {
|
|
441
|
+
width: 16px;
|
|
442
|
+
height: 16px;
|
|
443
|
+
}
|
|
444
|
+
details.tools summary .info-icon,
|
|
445
|
+
button.icon[slot=info-icon]::before {
|
|
446
|
+
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");
|
|
447
|
+
}
|
|
448
|
+
details.tools summary .opacity-icon,
|
|
449
|
+
button.icon[slot=opacity-icon]::before {
|
|
450
|
+
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");
|
|
451
|
+
}
|
|
452
|
+
details.tools summary .config-icon,
|
|
453
|
+
button.icon[slot=config-icon]::before {
|
|
454
|
+
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");
|
|
455
|
+
}
|
|
456
|
+
.single-action .remove-icon::before,
|
|
457
|
+
[slot=remove-icon] button.icon::before {
|
|
458
|
+
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");
|
|
459
|
+
}
|
|
460
|
+
.single-action .sort-icon::before,
|
|
461
|
+
[slot=sort-icon] button.icon::before {
|
|
462
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Edrag-horizontal-variant%3C/title%3E%3Cpath d='M21 11H3V9H21V11M21 13H3V15H21V13Z' /%3E%3C/svg%3E");
|
|
463
|
+
}
|
|
464
|
+
[slot=info-content],
|
|
465
|
+
[slot=opacity-content] {
|
|
466
|
+
padding: 12px 6px;
|
|
467
|
+
}
|
|
468
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1}createRenderRoot(){return this}render(){var e,i;return _`
|
|
469
|
+
<style>
|
|
470
|
+
${I(this,we)}
|
|
471
|
+
${!this.unstyled&&I(this,_e)}
|
|
472
|
+
</style>
|
|
473
|
+
${et(((e=this._parseActions(this.tools))==null?void 0:e.length)+((i=this._parseTools(this.tools))==null?void 0:i.length)>0,()=>{var o,r;return _`
|
|
474
|
+
${et(((o=this._parseActions(this.tools))==null?void 0:o.length)===1&&((r=this._parseTools(this.tools))==null?void 0:r.length)===0,()=>_`
|
|
475
|
+
<div class="single-action-container">
|
|
476
|
+
<div class="single-action">
|
|
477
|
+
${this[`_${this._parseActions(this.tools)[0]}Button`]}
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
`,()=>{var s;return _`
|
|
481
|
+
<details class="tools">
|
|
482
|
+
<summary>
|
|
483
|
+
<button
|
|
484
|
+
class="icon ${this.tools.length===1?`${this.tools[0]}-icon`:""}"
|
|
485
|
+
>
|
|
486
|
+
Tools
|
|
487
|
+
</button>
|
|
488
|
+
</summary>
|
|
489
|
+
<eox-layercontrol-tabs
|
|
490
|
+
.actions=${this._parseActions(this.tools)}
|
|
491
|
+
.tabs=${this._parseTools(this.tools)}
|
|
492
|
+
.unstyled=${this.unstyled}
|
|
493
|
+
>
|
|
494
|
+
${me(this._parseTools(this.tools),l=>_`
|
|
495
|
+
<button slot="${l}-icon" class="icon">
|
|
496
|
+
${this.unstyled?l:x}
|
|
497
|
+
</button>
|
|
498
|
+
`)}
|
|
499
|
+
|
|
500
|
+
<div slot="info-content">
|
|
501
|
+
${Jn(this.layer.get("description"))}
|
|
502
|
+
</div>
|
|
503
|
+
<div slot="opacity-content">
|
|
504
|
+
<input
|
|
505
|
+
type="range"
|
|
506
|
+
min="0"
|
|
507
|
+
max="1"
|
|
508
|
+
step="0.01"
|
|
509
|
+
value=${si((s=this.layer)==null?void 0:s.getOpacity())}
|
|
510
|
+
@input=${l=>this.layer.setOpacity(parseFloat(l.target.value))}
|
|
511
|
+
/>
|
|
512
|
+
</div>
|
|
513
|
+
<div slot="config-content"></div>
|
|
514
|
+
<!--<eox-layercontrol-layerconfig
|
|
515
|
+
slot="config-content"
|
|
516
|
+
.layer=${this.layer}
|
|
517
|
+
.unstyled=${this.unstyled}
|
|
518
|
+
@changed=${()=>this.requestUpdate()}
|
|
519
|
+
></eox-layercontrol-layerconfig>-->
|
|
520
|
+
<div slot="remove-icon">${this._removeButton}</div>
|
|
521
|
+
<div slot="sort-icon">${this._sortButton}</div>
|
|
522
|
+
</eox-layercontrol-tabs>
|
|
523
|
+
</details>
|
|
524
|
+
`})}
|
|
525
|
+
`})}
|
|
526
|
+
`}}we=new WeakMap,_e=new WeakMap,X(Qi,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",Qi);class tn extends Y{constructor(){super();V(this,$e,"");V(this,xe,`
|
|
527
|
+
${Ji}
|
|
528
|
+
eox-layercontrol-layer {
|
|
529
|
+
width: 100%;
|
|
530
|
+
}
|
|
531
|
+
.layer {
|
|
532
|
+
width: 100%;
|
|
533
|
+
align-items: center;
|
|
534
|
+
justify-content: space-between;
|
|
535
|
+
padding: 4px 0;
|
|
536
|
+
}
|
|
537
|
+
label, span {
|
|
538
|
+
display: flex;
|
|
539
|
+
align-items: center;
|
|
540
|
+
cursor: pointer;
|
|
541
|
+
}
|
|
542
|
+
[data-type] .title::before {
|
|
543
|
+
width: 20px;
|
|
544
|
+
min-width: 20px;
|
|
545
|
+
height: 20px;
|
|
546
|
+
margin-right: 6px;
|
|
547
|
+
}
|
|
548
|
+
[data-type=group] .title::before {
|
|
549
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-outline%3C/title%3E%3Cpath d='M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z' /%3E%3C/svg%3E");
|
|
550
|
+
}
|
|
551
|
+
[data-type=group] > eox-layercontrol-layer-group > details[open] > summary > eox-layercontrol-layer > .layer > label > .title::before {
|
|
552
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-open-outline%3C/title%3E%3Cpath d='M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z' /%3E%3C/svg%3E");
|
|
553
|
+
}
|
|
554
|
+
[data-type=raster] .title::before {
|
|
555
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckerboard%3C/title%3E%3Cpath d='M2 2V22H22V2H2M20 12H16V16H20V20H16V16H12V20H8V16H4V12H8V8H4V4H8V8H12V4H16V8H20V12M16 8V12H12V8H16M12 12V16H8V12H12Z' /%3E%3C/svg%3E");
|
|
556
|
+
}
|
|
557
|
+
[data-type=vector] .title::before {
|
|
558
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Eshape-outline%3C/title%3E%3Cpath d='M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z' /%3E%3C/svg%3E");
|
|
559
|
+
}
|
|
560
|
+
[data-type=draw] .title::before {
|
|
561
|
+
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");
|
|
562
|
+
}
|
|
563
|
+
`);this.layer=null,this.titleProperty="title",this.tools=[],this.unstyled=!1}createRenderRoot(){return this}render(){return _`
|
|
564
|
+
<style>
|
|
565
|
+
${I(this,$e)}
|
|
566
|
+
${!this.unstyled&&I(this,xe)}
|
|
567
|
+
</style>
|
|
568
|
+
${et(this.layer,()=>{var e;return _`
|
|
569
|
+
<div class="layer ${this.layer.getVisible()?"visible":""}">
|
|
570
|
+
<label
|
|
571
|
+
class="${this.layer.get("layerControlDisable")?"disabled":""}"
|
|
572
|
+
>
|
|
553
573
|
<input
|
|
554
|
-
type
|
|
555
|
-
.checked
|
|
556
|
-
@click=${()=>{this.
|
|
574
|
+
type=${this.layer.get("layerControlExclusive")?"radio":"checkbox"}
|
|
575
|
+
.checked=${si(this.layer.getVisible())}
|
|
576
|
+
@click=${i=>{this.layer.setVisible(i.target.checked),i.target.checked&&this.layer.get("layerControlExclusive")&&this.parentNode.parentNode.querySelectorAll("li > eox-layercontrol-layer").forEach(r=>{var s;r.layer!==this.layer&&((s=r.layer)!=null&&s.get("layerControlExclusive"))&&(r.layer.setVisible(!1),r.requestUpdate())}),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),this.requestUpdate()}}
|
|
557
577
|
/>
|
|
558
|
-
<span class="title"
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
>
|
|
562
|
-
</span>
|
|
563
|
-
</div>
|
|
564
|
-
<div class="right">
|
|
565
|
-
${this.sortBy==="layerOrder"&&!this.unstyled?L` <div
|
|
566
|
-
class="drag-handle ${s.get("layerControlDisable")?"disabled":""}"
|
|
567
|
-
>
|
|
568
|
-
<span>=</span>
|
|
569
|
-
</div>`:E}
|
|
570
|
-
</div>
|
|
578
|
+
<span class="title">${this.layer.get(this.titleProperty)}</span>
|
|
579
|
+
${et(((e=this.tools)==null?void 0:e.length)>0,()=>_`<span class="tools-placeholder"></span>`)}
|
|
580
|
+
</label>
|
|
571
581
|
</div>
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
>
|
|
601
|
-
${o(c,l,u)}
|
|
602
|
-
</li>
|
|
603
|
-
`})}
|
|
604
|
-
</ul>
|
|
605
|
-
`;return L`
|
|
582
|
+
<eox-layercontrol-layer-tools
|
|
583
|
+
.layer=${this.layer}
|
|
584
|
+
.tools=${this.tools}
|
|
585
|
+
.unstyled=${this.unstyled}
|
|
586
|
+
></eox-layercontrol-layer-tools>
|
|
587
|
+
`})}
|
|
588
|
+
`}}$e=new WeakMap,xe=new WeakMap,X(tn,"properties",{layer:{attribute:!1},titleProperty:{attribute:"title-property",type:String},tools:{attribute:!1},unstyled:{type:Boolean}}),customElements.define("eox-layercontrol-layer",tn);class en extends Y{constructor(){super();V(this,Ae,"");V(this,Ce,`
|
|
589
|
+
details summary {
|
|
590
|
+
cursor: pointer;
|
|
591
|
+
display: flex;
|
|
592
|
+
}
|
|
593
|
+
details summary { list-style-type: none; } /* Firefox */
|
|
594
|
+
details summary::-webkit-details-marker { display: none; } /* Chrome */
|
|
595
|
+
details summary::marker { display: none; }
|
|
596
|
+
details summary::before {
|
|
597
|
+
display: block;
|
|
598
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
|
|
599
|
+
font-size: 13px;
|
|
600
|
+
width: 24px;
|
|
601
|
+
height: 24px;
|
|
602
|
+
margin: 4px 0;
|
|
603
|
+
transform-origin: center;
|
|
604
|
+
transition: transform 0.1s ease-in-out;
|
|
605
|
+
}
|
|
606
|
+
details[open] > summary:before {
|
|
607
|
+
transform: rotate(90deg);
|
|
608
|
+
}
|
|
609
|
+
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.tools=[],this.unstyled=!1}createRenderRoot(){return this}render(){return _`
|
|
606
610
|
<style>
|
|
607
|
-
${
|
|
608
|
-
${!this.unstyled&&
|
|
611
|
+
${I(this,Ae)}
|
|
612
|
+
${!this.unstyled&&I(this,Ce)}
|
|
609
613
|
</style>
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
614
|
+
${et(this.group,()=>_`
|
|
615
|
+
<details open=${this.group.get("layerControlExpand")||x}>
|
|
616
|
+
<summary>
|
|
617
|
+
<eox-layercontrol-layer
|
|
618
|
+
.layer=${this.group}
|
|
619
|
+
.titleProperty=${this.titleProperty}
|
|
620
|
+
.tools=${this.tools}
|
|
621
|
+
.unstyled=${this.unstyled}
|
|
622
|
+
@changed=${()=>this.requestUpdate()}
|
|
623
|
+
></eox-layercontrol-layer>
|
|
624
|
+
</summary>
|
|
625
|
+
<eox-layercontrol-layer-list
|
|
626
|
+
.idProperty=${this.idProperty}
|
|
627
|
+
.layers=${this.group.getLayers()}
|
|
628
|
+
.map=${this.map}
|
|
629
|
+
.titleProperty=${this.titleProperty}
|
|
630
|
+
.tools=${this.tools}
|
|
631
|
+
.unstyled=${this.unstyled}
|
|
632
|
+
@changed=${()=>this.requestUpdate()}
|
|
633
|
+
></eox-layercontrol-layer-list>
|
|
634
|
+
</details>
|
|
635
|
+
`)}
|
|
636
|
+
`}}Ae=new WeakMap,Ce=new WeakMap,X(en,"properties",{group:{attribute:!1},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},tools:{attribute:!1},unstyled:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",en);class nn extends Y{constructor(){super();V(this,Se,"");V(this,Te,`
|
|
637
|
+
ul {
|
|
638
|
+
padding: 0;
|
|
639
|
+
}
|
|
640
|
+
ul ul {
|
|
641
|
+
padding-left: 48px;
|
|
642
|
+
}
|
|
643
|
+
li {
|
|
644
|
+
list-style: none;
|
|
645
|
+
}
|
|
646
|
+
li {
|
|
647
|
+
border-bottom: 1px solid #0041703a;
|
|
648
|
+
}
|
|
649
|
+
li:first-child {
|
|
650
|
+
border-top: 1px solid #0041703a;
|
|
651
|
+
}
|
|
652
|
+
li:last-child {
|
|
653
|
+
border: none;
|
|
654
|
+
}
|
|
655
|
+
li.sortable-chosen {
|
|
656
|
+
background: #eeea;
|
|
657
|
+
}
|
|
658
|
+
li.sortable-drag {
|
|
659
|
+
opacity: 0;
|
|
660
|
+
}
|
|
661
|
+
li.sortable-ghost {
|
|
662
|
+
}
|
|
663
|
+
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.unstyled=!1}updated(){this.layers&&(this.layers.on("change:length",()=>{this.requestUpdate(),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))}),Gn(this.renderRoot.querySelector("ul"),this.layers,this))}createRenderRoot(){return this}render(){return _`
|
|
664
|
+
<style>
|
|
665
|
+
${I(this,Se)}
|
|
666
|
+
${!this.unstyled&&I(this,Te)}
|
|
667
|
+
</style>
|
|
668
|
+
<ul>
|
|
669
|
+
${et(this.layers,()=>_`
|
|
670
|
+
${this.layers.getArray().filter(e=>!e.get("layerControlHide")&&!e.get("layerControlOptional")).reverse().map(e=>$n(e.get(this.idProperty),_`
|
|
671
|
+
<li
|
|
672
|
+
data-layer="${e.get(this.idProperty)}"
|
|
673
|
+
data-type="${Kn(e,this.map)}"
|
|
674
|
+
>
|
|
675
|
+
${e.getLayers?_`
|
|
676
|
+
<eox-layercontrol-layer-group
|
|
677
|
+
.group=${e}
|
|
678
|
+
.idProperty=${this.idProperty}
|
|
679
|
+
.map=${this.map}
|
|
680
|
+
.titleProperty=${this.titleProperty}
|
|
681
|
+
.tools=${this.tools}
|
|
682
|
+
.unstyled=${this.unstyled}
|
|
683
|
+
@changed=${()=>this.requestUpdate()}
|
|
684
|
+
>
|
|
685
|
+
</eox-layercontrol-layer-group>
|
|
686
|
+
`:_`
|
|
687
|
+
<eox-layercontrol-layer
|
|
688
|
+
.layer=${e}
|
|
689
|
+
.titleProperty=${this.titleProperty}
|
|
690
|
+
.tools=${this.tools}
|
|
691
|
+
.unstyled=${this.unstyled}
|
|
692
|
+
@changed=${()=>{this.requestUpdate()}}
|
|
693
|
+
></eox-layercontrol-layer>
|
|
694
|
+
`}
|
|
695
|
+
</li>
|
|
696
|
+
`))}
|
|
697
|
+
`)}
|
|
698
|
+
</ul>
|
|
699
|
+
`}}Se=new WeakMap,Te=new WeakMap,X(nn,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},tools:{attribute:!1},unstyled:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",nn);class on extends Y{constructor(){super(),this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1}createRenderRoot(){return this}render(){return _`
|
|
700
|
+
<label for="optional">Optional layers</label>
|
|
701
|
+
|
|
702
|
+
<select name="optional" data-cy="optionalLayers">
|
|
703
|
+
<option disabled selected value>
|
|
704
|
+
-- select an optional layer to add --
|
|
705
|
+
</option>
|
|
706
|
+
${ri(this.layers.getArray(),"layerControlOptional",!0).map(t=>_`
|
|
707
|
+
<option
|
|
708
|
+
value="${t.get(this.idProperty)||t.ol_uid}"
|
|
631
709
|
>
|
|
632
|
-
|
|
633
|
-
</
|
|
710
|
+
${t.get(this.titleProperty)||`layer ${t.get(this.idProperty)}`}
|
|
711
|
+
</option>
|
|
634
712
|
`)}
|
|
635
|
-
</
|
|
636
|
-
|
|
713
|
+
</select>
|
|
714
|
+
<button
|
|
715
|
+
@click="${()=>{const t=ri(this.layers.getArray(),"layerControlOptional",!0).find(e=>(e.get(this.idProperty)||e.ol_uid)===this.querySelector("select[name=optional]").value);t==null||t.set("layerControlOptional",!1),t==null||t.setVisible(!0),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),this.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(e=>e.requestUpdate()),this.requestUpdate()}}"
|
|
716
|
+
>
|
|
717
|
+
add
|
|
718
|
+
</button>
|
|
719
|
+
`}}X(on,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",on);class li extends Y{constructor(){super();V(this,De,"");V(this,Pe,`
|
|
720
|
+
* {
|
|
721
|
+
font-family: Roboto, sans-serif;
|
|
722
|
+
}
|
|
723
|
+
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.tools=["info","opacity","remove","sort"],this.unstyled=!1}updated(){const e=document.querySelector(this.for);e&&(this.map=e.map)}render(){var e;return _`
|
|
637
724
|
<style>
|
|
638
|
-
${
|
|
639
|
-
${!this.unstyled&&
|
|
725
|
+
${I(this,De)}
|
|
726
|
+
${!this.unstyled&&I(this,Pe)}
|
|
640
727
|
</style>
|
|
641
|
-
${
|
|
642
|
-
<
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
value="${Le(this._currentLayer.getOpacity())}"
|
|
661
|
-
@input=${e=>this._handleInput(e,t)}
|
|
662
|
-
/>
|
|
663
|
-
</div>
|
|
664
|
-
`)}
|
|
665
|
-
${Object.keys(this._configList).length>0&&!this.external?L`
|
|
666
|
-
<details open="${this.for?!0:E}">
|
|
667
|
-
<summary>Layer config</summary>
|
|
668
|
-
<ul>
|
|
669
|
-
${Oe(Object.keys(this._configList),t=>t,t=>L` <li>
|
|
670
|
-
<div>${t}</div>
|
|
671
|
-
<input
|
|
672
|
-
type="range"
|
|
673
|
-
min="${["red","green","blue"].includes(t)?1:2e3}"
|
|
674
|
-
max="${["red","green","blue"].includes(t)?4:5e3}"
|
|
675
|
-
value="${Le(this._configList[t])}"
|
|
676
|
-
@input=${e=>this._handleInput(e,t)}
|
|
677
|
-
/>
|
|
678
|
-
</li>`)}
|
|
679
|
-
</ul>
|
|
680
|
-
</details>
|
|
681
|
-
`:E}
|
|
682
|
-
</div>
|
|
728
|
+
${et(this.map,()=>_`
|
|
729
|
+
<eox-layercontrol-layer-list
|
|
730
|
+
class="layers"
|
|
731
|
+
.idProperty=${this.idProperty}
|
|
732
|
+
.layers=${this.map.getLayers()}
|
|
733
|
+
.map=${this.map}
|
|
734
|
+
.titleProperty=${this.titleProperty}
|
|
735
|
+
.tools=${this.tools}
|
|
736
|
+
.unstyled=${this.unstyled}
|
|
737
|
+
@changed=${()=>this.requestUpdate()}
|
|
738
|
+
></eox-layercontrol-layer-list>
|
|
739
|
+
`)}
|
|
740
|
+
${et(this.map&&((e=ri(this.map.getLayers().getArray(),"layerControlOptional",!0))==null?void 0:e.length)>0,()=>_`
|
|
741
|
+
<eox-layercontrol-optional-list
|
|
742
|
+
.idProperty=${this.idProperty}
|
|
743
|
+
.layers=${this.map.getLayers()}
|
|
744
|
+
.titleProperty=${this.titleProperty}
|
|
745
|
+
@changed=${()=>this.requestUpdate()}
|
|
746
|
+
></eox-layercontrol-optional-list>
|
|
683
747
|
`)}
|
|
684
|
-
`}},
|
|
748
|
+
`}}De=new WeakMap,Pe=new WeakMap,X(li,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},tools:{attribute:!1},unstyled:{type:Boolean}}),customElements.define("eox-layercontrol",li),S.EOxLayerControl=li,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|