@c8y/html-repo 1022.3.2

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.
@@ -0,0 +1,24 @@
1
+ /*!
2
+ * ZRender, a high performance 2d drawing library.
3
+ *
4
+ * Copyright (c) 2013, Baidu Inc.
5
+ * All rights reserved.
6
+ *
7
+ * LICENSE
8
+ * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
9
+ */
10
+
11
+ /*! *****************************************************************************
12
+ Copyright (c) Microsoft Corporation.
13
+
14
+ Permission to use, copy, modify, and/or distribute this software for any
15
+ purpose with or without fee is hereby granted.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
18
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
20
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
21
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23
+ PERFORMANCE OF THIS SOFTWARE.
24
+ ***************************************************************************** */
package/dist/fetch.js ADDED
@@ -0,0 +1 @@
1
+ var t={d:(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function n(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,o){return(e=function(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}t.d(e,{h:()=>p});var i=sessionStorage.getItem("_tcy8")||localStorage.getItem("_tcy8"),a=function(){try{var t=document.cookie.match("(^|;)\\s*XSRF-TOKEN\\s*=\\s*([^;]+)");return t?t.pop():void 0}catch(t){return}}(),u=n(n({},i?{Authentication:"Basic ".concat(i)}:void 0),{},{"Content-Type":"application/json",Accept:"application/json"},a?{"X-XSRF-TOKEN":a}:void 0),p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.headers=n(n({},u),e.headers),fetch(t,e)};const f=e.h;export{f as fetch};
@@ -0,0 +1 @@
1
+ var e={d:(o,r)=>{for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)},o={};e.d(o,{A:()=>t,L:()=>r});var r=(window.L||window.leaflet).noConflict();if(!r)throw new Error("Leaflet is not loaded. Please include Leaflet library.");const t=r,a=o.L,l=o.A;export{a as L,l as default};
package/dist/lit.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see lit.js.LICENSE.txt */
2
+ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;class n{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n("string"==typeof t?t:t+"",void 0,s),o=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new n(i,t,s)},h=(s,i)=>{if(e)s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of i){const i=document.createElement("style"),n=t.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,s.appendChild(i)}},a=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t,{is:l,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:p,getOwnPropertySymbols:u,getPrototypeOf:$}=Object,_=globalThis,f=_.trustedTypes,A=f?f.emptyScript:"",m=_.reactiveElementPolyfillSupport,g=(t,e)=>t,y={toAttribute(t,e){switch(e){case Boolean:t=t?A:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},v=(t,e)=>!l(t,e),E={attribute:!0,type:String,converter:y,reflect:!1,useDefault:!1,hasChanged:v};Symbol.metadata??=Symbol("metadata"),_.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=E){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&c(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const r=i?.call(this);n?.call(this,e),this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??E}static _$Ei(){if(this.hasOwnProperty(g("elementProperties")))return;const t=$(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(g("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(g("properties"))){const t=this.properties,e=[...p(t),...u(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return h(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const n=(void 0!==s.converter?.toAttribute?s.converter:y).toAttribute(e,s.type);this._$Em=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:y;this._$Em=i,this[i]=n.fromAttribute(e,t.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const i=this.constructor,n=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??v)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==n||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[g("elementProperties")]=new Map,S[g("finalized")]=new Map,m?.({ReactiveElement:S}),(_.reactiveElementVersions??=[]).push("2.1.0");const b=globalThis,C=b.trustedTypes,w=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",U=`lit$${Math.random().toFixed(9).slice(2)}$`,x="?"+U,H=`<${x}>`,O=document,M=()=>O.createComment(""),N=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,T=t=>R(t)||"function"==typeof t?.[Symbol.iterator],L="[ \t\n\f\r]",k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,j=/>/g,z=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,I=/"/g,V=/^(?:script|style|textarea|title)$/i,W=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),q=W(1),K=W(2),F=W(3),J=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),G=new WeakMap,Q=O.createTreeWalker(O,129);function X(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==w?w.createHTML(e):e}const Y=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":3===e?"<math>":"",o=k;for(let e=0;e<s;e++){const s=t[e];let h,a,l=-1,c=0;for(;c<s.length&&(o.lastIndex=c,a=o.exec(s),null!==a);)c=o.lastIndex,o===k?"!--"===a[1]?o=D:void 0!==a[1]?o=j:void 0!==a[2]?(V.test(a[2])&&(n=RegExp("</"+a[2],"g")),o=z):void 0!==a[3]&&(o=z):o===z?">"===a[0]?(o=n??k,l=-1):void 0===a[1]?l=-2:(l=o.lastIndex-a[2].length,h=a[1],o=void 0===a[3]?z:'"'===a[3]?I:B):o===I||o===B?o=z:o===D||o===j?o=k:(o=z,n=void 0);const d=o===z&&t[e+1].startsWith("/>")?" ":"";r+=o===k?s+H:l>=0?(i.push(h),s.slice(0,l)+P+s.slice(l)+U+d):s+U+(-2===l?e:d)}return[X(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class tt{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const o=t.length-1,h=this.parts,[a,l]=Y(t,e);if(this.el=tt.createElement(a,s),Q.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=Q.nextNode())&&h.length<o;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(P)){const e=l[r++],s=i.getAttribute(t).split(U),o=/([.?@])?(.*)/.exec(e);h.push({type:1,index:n,name:o[2],strings:s,ctor:"."===o[1]?rt:"?"===o[1]?ot:"@"===o[1]?ht:nt}),i.removeAttribute(t)}else t.startsWith(U)&&(h.push({type:6,index:n}),i.removeAttribute(t));if(V.test(i.tagName)){const t=i.textContent.split(U),e=t.length-1;if(e>0){i.textContent=C?C.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],M()),Q.nextNode(),h.push({type:2,index:++n});i.append(t[e],M())}}}else if(8===i.nodeType)if(i.data===x)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(U,t+1));)h.push({type:7,index:n}),t+=U.length-1}n++}}static createElement(t,e){const s=O.createElement("template");return s.innerHTML=t,s}}function et(t,e,s=t,i){if(e===J)return e;let n=void 0!==i?s._$Co?.[i]:s._$Cl;const r=N(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=n:s._$Cl=n),void 0!==n&&(e=et(t,n._$AS(t,e.values),n,i)),e}class st{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??O).importNode(e,!0);Q.currentNode=i;let n=Q.nextNode(),r=0,o=0,h=s[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new it(n,n.nextSibling,this,t):1===h.type?e=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(e=new at(n,this,t)),this._$AV.push(e),h=s[++o]}r!==h?.index&&(n=Q.nextNode(),r++)}return Q.currentNode=O,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class it{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=et(this,t,e),N(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==J&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):T(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Z&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=tt.createElement(X(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new st(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new tt(t)),e}k(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new it(this.O(M()),this.O(M()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Z}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(void 0===n)t=et(this,t,e,0),r=!N(t)||t!==this._$AH&&t!==J,r&&(this._$AH=t);else{const i=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=et(this,i[s+o],e,o),h===J&&(h=this._$AH[o]),r||=!N(h)||h!==this._$AH[o],h===Z?t=Z:t!==Z&&(t+=(h??"")+n[o+1]),this._$AH[o]=h}r&&!i&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class rt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}class ot extends nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Z)}}class ht extends nt{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=et(this,t,e,0)??Z)===J)return;const s=this._$AH,i=t===Z&&s!==Z||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==Z&&(s===Z||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){et(this,t)}}const lt={M:P,P:U,A:x,C:1,L:Y,R:st,D:T,V:et,I:it,H:nt,N:ot,U:ht,B:rt,F:at},ct=b.litHtmlPolyfillSupport;ct?.(tt,it),(b.litHtmlVersions??=[]).push("3.3.0");const dt=(t,e,s)=>{const i=s?.renderBefore??e;let n=i._$litPart$;if(void 0===n){const t=s?.renderBefore??null;i._$litPart$=n=new it(e.insertBefore(M(),t),t,void 0,s??{})}return n._$AI(t),n},pt=globalThis;class ut extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=dt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return J}}ut._$litElement$=!0,ut.finalized=!0,pt.litElementHydrateSupport?.({LitElement:ut});const $t=pt.litElementPolyfillSupport;$t?.({LitElement:ut});const _t={_$AK:(t,e,s)=>{t._$AK(e,s)},_$AL:t=>t._$AL};(pt.litElementVersions??=[]).push("4.2.0");const ft=!1;export{n as CSSResult,ut as LitElement,S as ReactiveElement,_t as _$LE,lt as _$LH,h as adoptStyles,o as css,y as defaultConverter,a as getCompatibleStyle,q as html,ft as isServer,F as mathml,J as noChange,v as notEqual,Z as nothing,dt as render,e as supportsAdoptingStyleSheets,K as svg,r as unsafeCSS};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+
7
+ /**
8
+ * @license
9
+ * Copyright 2019 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */
12
+
13
+ /**
14
+ * @license
15
+ * Copyright 2022 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
package/dist/styles.js ADDED
@@ -0,0 +1 @@
1
+ var t={d:(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{m:()=>r});var r="";document.querySelectorAll('link[rel="stylesheet"]').forEach((function(t){var e=t.getAttribute("href");e&&!e.startsWith("http")&&(r+='@import url("'.concat(e,'");\n'))}));const o=e.m;export{o as styleImports};
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@c8y/html-repo",
3
+ "version": "1022.3.2",
4
+ "license": "Apache-2.0",
5
+ "description": "ESM library exporting echarts, leaflet, and lit for usage in the html widget.",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "type": "module",
9
+ "exports": {
10
+ "./lit": "./dist/lit.js",
11
+ "./echarts": "./dist/echarts.js",
12
+ "./leaflet": "./dist/leaflet.js",
13
+ "./angular": "./dist/angular.js",
14
+ "./styles": "./dist/styles.js",
15
+ "./fetch": "./dist/fetch.js"
16
+ },
17
+ "scripts": {
18
+ "build": "webpack --mode production",
19
+ "dev": "webpack --mode development --watch"
20
+ },
21
+ "keywords": [
22
+ "esm",
23
+ "echarts",
24
+ "leaflet",
25
+ "lit"
26
+ ],
27
+ "author": "Cumulocity GmbH",
28
+ "devDependencies": {
29
+ "@babel/core": "^7.26.0",
30
+ "@babel/preset-env": "^7.26.0",
31
+ "babel-loader": "^9.0.0",
32
+ "webpack": "^5.94.0",
33
+ "webpack-cli": "^6.0.1"
34
+ },
35
+ "peerDependencies": {
36
+ "echarts": "^5.6.0",
37
+ "lit": "^3.2.1"
38
+ },
39
+ "sideEffects": false
40
+ }
package/src/angular.js ADDED
@@ -0,0 +1,6 @@
1
+ const angular = window.angular;
2
+ if (!angular) {
3
+ throw new Error('AngularJS is not loaded. Please include AngularJS library.');
4
+ }
5
+ export { angular };
6
+ export default angular;
package/src/echarts.js ADDED
@@ -0,0 +1 @@
1
+ export * from 'echarts';
package/src/fetch.js ADDED
@@ -0,0 +1,28 @@
1
+ // This is a fetch which will always have the right
2
+ // authentication headers for the current user
3
+ const token = sessionStorage.getItem('_tcy8') || localStorage.getItem('_tcy8');
4
+ const xsrfToken = getCookieValue('XSRF-TOKEN');
5
+ const headers = {
6
+ ...(token ? { Authentication: `Basic ${token}` } : undefined),
7
+ 'Content-Type': 'application/json',
8
+ Accept: 'application/json',
9
+ ...(xsrfToken ? { 'X-XSRF-TOKEN': xsrfToken } : undefined)
10
+ };
11
+ const fetchWithAuth = (url, options = {}) => {
12
+ options.headers = {
13
+ ...headers,
14
+ ...options.headers
15
+ };
16
+ return fetch(url, options);
17
+ };
18
+
19
+ function getCookieValue(name) {
20
+ try {
21
+ const value = document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)');
22
+ return value ? value.pop() : undefined;
23
+ } catch (ex) {
24
+ return undefined;
25
+ }
26
+ }
27
+
28
+ export { fetchWithAuth as fetch };
package/src/leaflet.js ADDED
@@ -0,0 +1,7 @@
1
+ const L = (window.L || window.leaflet).noConflict();
2
+ if (!L) {
3
+ throw new Error('Leaflet is not loaded. Please include Leaflet library.');
4
+ }
5
+
6
+ export { L };
7
+ export default L;
package/src/lit.js ADDED
@@ -0,0 +1 @@
1
+ export * from 'lit';
package/src/styles.js ADDED
@@ -0,0 +1,10 @@
1
+ let styleImports = '';
2
+
3
+ document.querySelectorAll('link[rel="stylesheet"]').forEach(link => {
4
+ const href = link.getAttribute('href');
5
+ if (href && !href.startsWith('http')) {
6
+ styleImports += `@import url("${href}");\n`;
7
+ }
8
+ });
9
+
10
+ export { styleImports };
@@ -0,0 +1,45 @@
1
+ import { fileURLToPath } from 'url';
2
+ import { dirname, resolve } from 'path';
3
+
4
+ const __filename = fileURLToPath(import.meta.url);
5
+ const __dirname = dirname(__filename);
6
+
7
+ export default {
8
+ entry: {
9
+ lit: './src/lit.js',
10
+ echarts: './src/echarts.js',
11
+ leaflet: './src/leaflet.js',
12
+ angular: './src/angular.js',
13
+ styles: './src/styles.js',
14
+ fetch: './src/fetch.js'
15
+ },
16
+ output: {
17
+ filename: '[name].js',
18
+ path: resolve(__dirname, 'dist'),
19
+ library: {
20
+ type: 'module'
21
+ },
22
+ clean: true
23
+ },
24
+ experiments: {
25
+ outputModule: true
26
+ },
27
+ module: {
28
+ rules: [
29
+ {
30
+ test: /\.js$/,
31
+ exclude: /node_modules/,
32
+ use: {
33
+ loader: 'babel-loader',
34
+ options: {
35
+ presets: ['@babel/preset-env']
36
+ }
37
+ }
38
+ }
39
+ ]
40
+ },
41
+ optimization: {
42
+ usedExports: true, // Enable tree shaking
43
+ providedExports: true
44
+ }
45
+ };