UNPKG

@ppci/custom-loader

Version:

A custom loader

2 lines 37.6 kB
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var r=new WeakMap,o=function(e){return"function"==typeof e&&r.has(e)},i=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,a=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t!==n;){var r=t.nextSibling;e.removeChild(t),t=r}},s={},u={};var c="{{lit-".concat(String(Math.random()).slice(2),"}}"),l="\x3c!--".concat(c,"--\x3e"),f=new RegExp("".concat(c,"|").concat(l)),p=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parts=[],this.element=n;for(var r=[],o=[],i=document.createTreeWalker(n.content,133,null,!1),a=0,s=-1,u=0,l=t.strings,p=t.values.length;u<p;){var d=i.nextNode();if(null!==d){if(s++,1===d.nodeType){if(d.hasAttributes()){for(var m=d.attributes,b=m.length,_=0,g=0;g<b;g++)h(m[g].name,"$lit$")&&_++;for(;_-- >0;){var w=l[u],S=v.exec(w)[2],k=S.toLowerCase()+"$lit$",P=d.getAttribute(k);d.removeAttribute(k);var x=P.split(f);this.parts.push({type:"attribute",index:s,name:S,strings:x}),u+=x.length-1}}"TEMPLATE"===d.tagName&&(o.push(d),i.currentNode=d.content)}else if(3===d.nodeType){var O=d.data;if(O.indexOf(c)>=0){for(var j=d.parentNode,C=O.split(f),N=C.length-1,E=0;E<N;E++){var T=void 0,A=C[E];if(""===A)T=y();else{var V=v.exec(A);null!==V&&h(V[2],"$lit$")&&(A=A.slice(0,V.index)+V[1]+V[2].slice(0,-"$lit$".length)+V[3]),T=document.createTextNode(A)}j.insertBefore(T,d),this.parts.push({type:"node",index:++s})}""===C[N]?(j.insertBefore(y(),d),r.push(d)):d.data=C[N],u+=N}}else if(8===d.nodeType)if(d.data===c){var R=d.parentNode;null!==d.previousSibling&&s!==a||(s++,R.insertBefore(y(),d)),a=s,this.parts.push({type:"node",index:s}),null===d.nextSibling?d.data="":(r.push(d),s--),u++}else for(var z=-1;-1!==(z=d.data.indexOf(c,z+1));)this.parts.push({type:"node",index:-1}),u++}else i.currentNode=o.pop()}for(var M=0,U=r;M<U.length;M++){var q=U[M];q.parentNode.removeChild(q)}},h=function(e,t){var n=e.length-t.length;return n>=0&&e.slice(n)===t},d=function(e){return-1!==e.index},y=function(){return document.createComment("")},v=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function m(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var _=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__parts=[],this.template=t,this.processor=n,this.options=r}var t,n,r;return t=e,(n=[{key:"update",value:function(e){var t=0,n=!0,r=!1,o=void 0;try{for(var i,a=this.__parts[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value;void 0!==s&&s.setValue(e[t]),t++}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}var u=!0,c=!1,l=void 0;try{for(var f,p=this.__parts[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var h=f.value;void 0!==h&&h.commit()}}catch(e){c=!0,l=e}finally{try{u||null==p.return||p.return()}finally{if(c)throw l}}}},{key:"_clone",value:function(){for(var e,t=i?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],r=this.template.parts,o=document.createTreeWalker(t,133,null,!1),a=0,s=0,u=o.nextNode();a<r.length;)if(e=r[a],d(e)){for(;s<e.index;)s++,"TEMPLATE"===u.nodeName&&(n.push(u),o.currentNode=u.content),null===(u=o.nextNode())&&(o.currentNode=n.pop(),u=o.nextNode());if("node"===e.type){var c=this.processor.handleTextExpression(this.options);c.insertAfterNode(u.previousSibling),this.__parts.push(c)}else{var l;(l=this.__parts).push.apply(l,m(this.processor.handleAttributeExpressions(u,e.name,e.strings,this.options)))}a++}else this.__parts.push(void 0),a++;return i&&(document.adoptNode(t),customElements.upgrade(t)),t}}])&&b(t.prototype,n),r&&b(t,r),e}();function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}var k=" ".concat(c," "),P=function(){function e(t,n,r,o){g(this,e),this.strings=t,this.values=n,this.type=r,this.processor=o}return S(e,[{key:"getHTML",value:function(){for(var e=this.strings.length-1,t="",n=!1,r=0;r<e;r++){var o=this.strings[r],i=o.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===o.indexOf("--\x3e",i+1);var a=v.exec(o);t+=null===a?o+(n?k:l):o.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+c}return t+=this.strings[e]}},{key:"getTemplateElement",value:function(){var e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}]),e}();function x(e,t){return!t||"object"!==V(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e,t,n){return(O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&N(e,t)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),e}function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var R=function(e){return null===e||!("object"===V(e)||"function"==typeof e)},z=function(e){return Array.isArray(e)||!(!e||!e[Symbol.iterator])},M=function(){function e(t,n,r){E(this,e),this.dirty=!0,this.element=t,this.name=n,this.strings=r,this.parts=[];for(var o=0;o<r.length-1;o++)this.parts[o]=this._createPart()}return A(e,[{key:"_createPart",value:function(){return new U(this)}},{key:"_getValue",value:function(){for(var e=this.strings,t=e.length-1,n="",r=0;r<t;r++){n+=e[r];var o=this.parts[r];if(void 0!==o){var i=o.value;if(R(i)||!z(i))n+="string"==typeof i?i:String(i);else{var a=!0,s=!1,u=void 0;try{for(var c,l=i[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value;n+="string"==typeof f?f:String(f)}}catch(e){s=!0,u=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}}}}return n+=e[t]}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}]),e}(),U=function(){function e(t){E(this,e),this.value=void 0,this.committer=t}return A(e,[{key:"setValue",value:function(e){e===s||R(e)&&e===this.value||(this.value=e,o(e)||(this.committer.dirty=!0))}},{key:"commit",value:function(){for(;o(this.value);){var e=this.value;this.value=s,e(this)}this.value!==s&&this.committer.commit()}}]),e}(),q=function(){function e(t){E(this,e),this.value=void 0,this.__pendingValue=void 0,this.options=t}return A(e,[{key:"appendInto",value:function(e){this.startNode=e.appendChild(y()),this.endNode=e.appendChild(y())}},{key:"insertAfterNode",value:function(e){this.startNode=e,this.endNode=e.nextSibling}},{key:"appendIntoPart",value:function(e){e.__insert(this.startNode=y()),e.__insert(this.endNode=y())}},{key:"insertAfterPart",value:function(e){e.__insert(this.startNode=y()),this.endNode=e.endNode,e.endNode=this.startNode}},{key:"setValue",value:function(e){this.__pendingValue=e}},{key:"commit",value:function(){for(;o(this.__pendingValue);){var e=this.__pendingValue;this.__pendingValue=s,e(this)}var t=this.__pendingValue;t!==s&&(R(t)?t!==this.value&&this.__commitText(t):t instanceof P?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):z(t)?this.__commitIterable(t):t===u?(this.value=u,this.clear()):this.__commitText(t))}},{key:"__insert",value:function(e){this.endNode.parentNode.insertBefore(e,this.endNode)}},{key:"__commitNode",value:function(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}},{key:"__commitText",value:function(e){var t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}},{key:"__commitTemplateResult",value:function(e){var t=this.options.templateFactory(e);if(this.value instanceof _&&this.value.template===t)this.value.update(e.values);else{var n=new _(t,e.processor,this.options),r=n._clone();n.update(e.values),this.__commitNode(r),this.value=n}}},{key:"__commitIterable",value:function(t){Array.isArray(this.value)||(this.value=[],this.clear());var n,r=this.value,o=0,i=!0,a=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l=u.value;void 0===(n=r[o])&&(n=new e(this.options),r.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(r[o-1])),n.setValue(l),n.commit(),o++}}catch(e){a=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw s}}o<r.length&&(r.length=o,this.clear(n&&n.endNode))}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.startNode;a(this.startNode.parentNode,e.nextSibling,this.endNode)}}]),e}(),F=function(){function e(t,n,r){if(E(this,e),this.value=void 0,this.__pendingValue=void 0,2!==r.length||""!==r[0]||""!==r[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=n,this.strings=r}return A(e,[{key:"setValue",value:function(e){this.__pendingValue=e}},{key:"commit",value:function(){for(;o(this.__pendingValue);){var e=this.__pendingValue;this.__pendingValue=s,e(this)}if(this.__pendingValue!==s){var t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=s}}}]),e}(),B=function(e){function t(e,n,r){var o;return E(this,t),(o=x(this,j(t).call(this,e,n,r))).single=2===r.length&&""===r[0]&&""===r[1],o}return C(t,e),A(t,[{key:"_createPart",value:function(){return new I(this)}},{key:"_getValue",value:function(){return this.single?this.parts[0].value:O(j(t.prototype),"_getValue",this).call(this)}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]),t}(M),I=function(e){function t(){return E(this,t),x(this,j(t).apply(this,arguments))}return C(t,e),t}(U),L=!1;try{var H={get capture(){return L=!0,!1}};window.addEventListener("test",H,H),window.removeEventListener("test",H,H)}catch(e){}var $=function(){function e(t,n,r){var o=this;E(this,e),this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=n,this.eventContext=r,this.__boundHandleEvent=function(e){return o.handleEvent(e)}}return A(e,[{key:"setValue",value:function(e){this.__pendingValue=e}},{key:"commit",value:function(){for(;o(this.__pendingValue);){var e=this.__pendingValue;this.__pendingValue=s,e(this)}if(this.__pendingValue!==s){var t=this.__pendingValue,n=this.value,r=null==t||null!=n&&(t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),i=null!=t&&(null==n||r);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=W(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=s}}},{key:"handleEvent",value:function(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}]),e}(),W=function(e){return e&&(L?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)};function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var J=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"handleAttributeExpressions",value:function(e,t,n,r){var o=t[0];return"."===o?new B(e,t.slice(1),n).parts:"@"===o?[new $(e,t.slice(1),r.eventContext)]:"?"===o?[new F(e,t.slice(1),n)]:new M(e,t,n).parts}},{key:"handleTextExpression",value:function(e){return new q(e)}}])&&D(t.prototype,n),r&&D(t,r),e}());function G(e){var t=K.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},K.set(e.type,t));var n=t.stringsArray.get(e.strings);if(void 0!==n)return n;var r=e.strings.join(c);return void 0===(n=t.keyString.get(r))&&(n=new p(e,e.getTemplateElement()),t.keyString.set(r,n)),t.stringsArray.set(e.strings,n),n}var K=new Map,Q=new WeakMap;(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");var X=133;function Y(e,t){for(var n=e.element.content,r=e.parts,o=document.createTreeWalker(n,X,null,!1),i=ee(r),a=r[i],s=-1,u=0,c=[],l=null;o.nextNode();){s++;var f=o.currentNode;for(f.previousSibling===l&&(l=null),t.has(f)&&(c.push(f),null===l&&(l=f)),null!==l&&u++;void 0!==a&&a.index===s;)a.index=null!==l?-1:a.index-u,a=r[i=ee(r,i)]}c.forEach((function(e){return e.parentNode.removeChild(e)}))}var Z=function(e){for(var t=11===e.nodeType?0:1,n=document.createTreeWalker(e,X,null,!1);n.nextNode();)t++;return t},ee=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=t+1;n<e.length;n++){var r=e[n];if(d(r))return n}return-1};function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ne=function(e,t){return"".concat(e,"--").concat(t)},re=!0;void 0===window.ShadyCSS?re=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),re=!1);var oe=function(e){return function(t){var n=ne(t.type,e),r=K.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},K.set(n,r));var o=r.stringsArray.get(t.strings);if(void 0!==o)return o;var i=t.strings.join(c);if(void 0===(o=r.keyString.get(i))){var a=t.getTemplateElement();re&&window.ShadyCSS.prepareTemplateDom(a,e),o=new p(t,a),r.keyString.set(i,o)}return r.stringsArray.set(t.strings,o),o}},ie=["html","svg"],ae=new Set,se=function(e,t,n){ae.add(e);var r=n?n.element:document.createElement("template"),o=t.querySelectorAll("style"),i=o.length;if(0!==i){for(var a=document.createElement("style"),s=0;s<i;s++){var u=o[s];u.parentNode.removeChild(u),a.textContent+=u.textContent}!function(e){ie.forEach((function(t){var n=K.get(ne(t,e));void 0!==n&&n.keyString.forEach((function(e){var t=e.element.content,n=new Set;Array.from(t.querySelectorAll("style")).forEach((function(e){n.add(e)})),Y(e,n)}))}))}(e);var c=r.content;n?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.element.content,o=e.parts;if(null!=n)for(var i=document.createTreeWalker(r,X,null,!1),a=ee(o),s=0,u=-1;i.nextNode();){for(u++,i.currentNode===n&&(s=Z(t),n.parentNode.insertBefore(t,n));-1!==a&&o[a].index===u;){if(s>0){for(;-1!==a;)o[a].index+=s,a=ee(o,a);return}a=ee(o,a)}}else r.appendChild(t)}(n,a,c.firstChild):c.insertBefore(a,c.firstChild),window.ShadyCSS.prepareTemplateStyles(r,e);var l=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)t.insertBefore(l.cloneNode(!0),t.firstChild);else if(n){c.insertBefore(a,c.firstChild);var f=new Set;f.add(a),Y(n,f)}}else window.ShadyCSS.prepareTemplateStyles(r,e)};function ue(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function le(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pe(e,t){return!t||"object"!==ce(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function he(e){var t="function"==typeof Map?new Map:void 0;return(he=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return de(e,arguments,ve(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ye(r,e)})(e)}function de(e,t,n){return(de=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&ye(o,n.prototype),o}).apply(null,arguments)}function ye(e,t){return(ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}window.JSCompiler_renameProperty=function(e,t){return e};var me={toAttribute:function(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute:function(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},be=function(e,t){return t!==e&&(t==t||e==e)},_e={attribute:!0,type:String,converter:me,reflect:!1,hasChanged:be},ge=Promise.resolve(!0),we=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=pe(this,ve(t).call(this)))._updateState=0,e._instanceProperties=void 0,e._updatePromise=ge,e._hasConnectedResolver=void 0,e._changedProperties=new Map,e._reflectingProperties=void 0,e.initialize(),e}var n,r,o,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ye(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this._saveInstanceProperties(),this._requestUpdate()}},{key:"_saveInstanceProperties",value:function(){var e=this;this.constructor._classProperties.forEach((function(t,n){if(e.hasOwnProperty(n)){var r=e[n];delete e[n],e._instanceProperties||(e._instanceProperties=new Map),e._instanceProperties.set(n,r)}}))}},{key:"_applyInstanceProperties",value:function(){var e=this;this._instanceProperties.forEach((function(t,n){return e[n]=t})),this._instanceProperties=void 0}},{key:"connectedCallback",value:function(){this._updateState=32|this._updateState,this._hasConnectedResolver&&(this._hasConnectedResolver(),this._hasConnectedResolver=void 0)}},{key:"disconnectedCallback",value:function(){}},{key:"attributeChangedCallback",value:function(e,t,n){t!==n&&this._attributeToProperty(e,n)}},{key:"_propertyToAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_e,r=this.constructor,o=r._attributeNameForProperty(e,n);if(void 0!==o){var i=r._propertyValueToAttribute(t,n);if(void 0===i)return;this._updateState=8|this._updateState,null==i?this.removeAttribute(o):this.setAttribute(o,i),this._updateState=-9&this._updateState}}},{key:"_attributeToProperty",value:function(e,t){if(!(8&this._updateState)){var n=this.constructor,r=n._attributeToPropertyMap.get(e);if(void 0!==r){var o=n._classProperties.get(r)||_e;this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(t,o),this._updateState=-17&this._updateState}}}},{key:"_requestUpdate",value:function(e,t){var n=!0;if(void 0!==e){var r=this.constructor,o=r._classProperties.get(e)||_e;r._valueHasChanged(this[e],t,o.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==o.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,o))):n=!1}!this._hasRequestedUpdate&&n&&this._enqueueUpdate()}},{key:"requestUpdate",value:function(e,t){return this._requestUpdate(e,t),this.updateComplete}},{key:"_enqueueUpdate",value:(i=regeneratorRuntime.mark((function e(){var t,n,r,o,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._updateState=4|this._updateState,r=this._updatePromise,this._updatePromise=new Promise((function(e,r){t=e,n=r})),e.prev=3,e.next=6,r;case 6:e.next=10;break;case 8:e.prev=8,e.t0=e.catch(3);case 10:if(this._hasConnected){e.next=13;break}return e.next=13,new Promise((function(e){return i._hasConnectedResolver=e}));case 13:if(e.prev=13,null==(o=this.performUpdate())){e.next=18;break}return e.next=18,o;case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(13),n(e.t1);case 23:t(!this._hasRequestedUpdate);case 24:case"end":return e.stop()}}),e,this,[[3,8],[13,20]])})),a=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=i.apply(e,t);function a(e){le(o,n,r,a,s,"next",e)}function s(e){le(o,n,r,a,s,"throw",e)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"performUpdate",value:function(){this._instanceProperties&&this._applyInstanceProperties();var e=!1,t=this._changedProperties;try{(e=this.shouldUpdate(t))&&this.update(t)}catch(t){throw e=!1,t}finally{this._markUpdated()}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}},{key:"_markUpdated",value:function(){this._changedProperties=new Map,this._updateState=-5&this._updateState}},{key:"_getUpdateComplete",value:function(){return this._updatePromise}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){var t=this;void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((function(e,n){return t._propertyToAttribute(n,t[n],e)})),this._reflectingProperties=void 0)}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}},{key:"_hasConnected",get:function(){return 32&this._updateState}},{key:"_hasRequestedUpdate",get:function(){return 4&this._updateState}},{key:"hasUpdated",get:function(){return 1&this._updateState}},{key:"updateComplete",get:function(){return this._getUpdateComplete()}}],o=[{key:"_ensureClassProperties",value:function(){var e=this;if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((function(t,n){return e._classProperties.set(n,t)}))}}},{key:"createProperty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e;if(this._ensureClassProperties(),this._classProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){var n="symbol"===ce(e)?Symbol():"__".concat(e);Object.defineProperty(this.prototype,e,{get:function(){return this[n]},set:function(t){var r=this[e];this[n]=t,this._requestUpdate(e,r)},configurable:!0,enumerable:!0})}}},{key:"finalize",value:function(){var e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){var t=this.properties,n=[].concat(ue(Object.getOwnPropertyNames(t)),ue("function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[])),r=!0,o=!1,i=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;this.createProperty(u,t[u])}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}}},{key:"_attributeNameForProperty",value:function(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}},{key:"_valueHasChanged",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be;return n(e,t)}},{key:"_propertyValueFromAttribute",value:function(e,t){var n=t.type,r=t.converter||me,o="function"==typeof r?r:r.fromAttribute;return o?o(e,n):e}},{key:"_propertyValueToAttribute",value:function(e,t){if(void 0!==t.reflect){var n=t.type,r=t.converter;return(r&&r.toAttribute||me.toAttribute)(e,n)}}},{key:"observedAttributes",get:function(){var e=this;this.finalize();var t=[];return this._classProperties.forEach((function(n,r){var o=e._attributeNameForProperty(r,n);void 0!==o&&(e._attributeToPropertyMap.set(o,r),t.push(o))})),t}}],r&&fe(n.prototype,r),o&&fe(n,o),t}(he(HTMLElement));we.finalized=!0;function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ke="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pe=Symbol(),xe=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n!==Pe)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}var t,n,r;return t=e,(n=[{key:"toString",value:function(){return this.cssText}},{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(ke?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}])&&Se(t.prototype,n),r&&Se(t,r),e}(),Oe=function(e){return new xe(String(e),Pe)},je=function(e){if(e instanceof xe)return e.cssText;if("number"==typeof e)return e;throw new Error("Value passed to 'css' function must be a 'css' function result: ".concat(e,". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security."))},Ce=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n.reduce((function(t,n,r){return t+je(n)+e[r+1]}),e[0]);return new xe(o,Pe)};function Ne(e){return(Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t){return!t||"object"!==Ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ae(e,t,n){return(Ae="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ve(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Ve(e){return(Ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Re(e,t){return(Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(window.litElementVersions||(window.litElementVersions=[])).push("2.2.1");var ze=function(e){return e.flat?e.flat(1/0):function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0,o=t.length;r<o;r++){var i=t[r];Array.isArray(i)?e(i,n):n.push(i)}return n}(e)},Me=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Te(this,Ve(t).apply(this,arguments))}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Re(e,t)}(t,e),n=t,o=[{key:"finalize",value:function(){Ae(Ve(t),"finalize",this).call(this),this._styles=this.hasOwnProperty(JSCompiler_renameProperty("styles",this))?this._getUniqueStyles():this._styles||[]}},{key:"_getUniqueStyles",value:function(){var e=this.styles,t=[];return Array.isArray(e)?ze(e).reduceRight((function(e,t){return e.add(t),e}),new Set).forEach((function(e){return t.unshift(e)})):e&&t.push(e),t}}],(r=[{key:"initialize",value:function(){Ae(Ve(t.prototype),"initialize",this).call(this),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}},{key:"createRenderRoot",value:function(){return this.attachShadow({mode:"open"})}},{key:"adoptStyles",value:function(){var e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?ke?this.renderRoot.adoptedStyleSheets=e.map((function(e){return e.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map((function(e){return e.cssText})),this.localName))}},{key:"connectedCallback",value:function(){Ae(Ve(t.prototype),"connectedCallback",this).call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}},{key:"update",value:function(e){var n=this;Ae(Ve(t.prototype),"update",this).call(this,e);var r=this.render();r instanceof P&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(e){var t=document.createElement("style");t.textContent=e.cssText,n.renderRoot.appendChild(t)})))}},{key:"render",value:function(){}}])&&Ee(n.prototype,r),o&&Ee(n,o),t}(we);function Ue(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["@keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"]);return Ue=function(){return e},e}Me.finalized=!0,Me.render=function(e,t,n){if(!n||"object"!==te(n)||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,o=Q.has(t),i=re&&11===t.nodeType&&!!t.host,s=i&&!ae.has(r),u=s?document.createDocumentFragment():t;if(function(e,t,n){var r=Q.get(t);void 0===r&&(a(t,t.firstChild),Q.set(t,r=new q(Object.assign({templateFactory:G},n))),r.appendInto(t)),r.setValue(e),r.commit()}(e,u,Object.assign({templateFactory:oe(r)},n)),s){var c=Q.get(u);Q.delete(u);var l=c.value instanceof _?c.value.template:void 0;se(r,u,l),a(t,t.firstChild),t.appendChild(u),Q.set(t,c)}!o&&i&&window.ShadyCSS.styleElement(t.host)};Ce(Ue());function qe(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["font-family: 'ppci-icons' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;"]);return qe=function(){return e},e}Ce(qe()),Oe("var(--space, 16px)");var Fe=function(e,t){return Oe("var(".concat(e,", ").concat(t,")"))},Be=function(e,t){return{value:t,var:Fe(e,t)}},Ie=Be("--primary","#32b3e9");Be("--primary-light","#32b4e9"),Be("--primary-dark","#037cc2"),Be("--secondary","#6c757d"),Be("--info","#17a2b8"),Be("--success","#28a745"),Be("--danger","#dc3545"),Be("--warning","#ffc107"),Be("--sun-color","#f5a72f"),Be("--wind-color","#17a087"),Be("--water-color","#1e99e1"),Be("--gray","#282d32"),Be("--gray-75","#5d6165"),Be("--gray-60","#7e8184"),Be("--gray-45","#9fa1a3"),Be("--gray-30","#bfc0c2"),Be("--gray-15","#dfdfe0"),Be("--gray-10","#eaeaeb");function Le(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([":host{--stroke-color:",";--size:10.5rem}:host .loader{animation-name:rotate;animation-duration:.69s;animation-timing-function:linear;animation-fill-mode:forwards;animation-iteration-count:infinite;width:var(--size);height:var(--size)}:host .loader-svg{fill:transparent}:host .loader svg circle{animation-name:init-stroke;animation-duration:10ms;animation-timing-function:cubic-bezier(.2,0,.38,.9)}:host .loader-svg circle{stroke-width:8;stroke-linecap:butt;stroke-dasharray:240}:host .loader-stroke{stroke:var(--stroke-color);stroke-dashoffset:40}"]);return Le=function(){return e},e}var He=Ce(Le(),Ie.var);function $e(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes rotate-end-p1{100%{transform:rotate(360deg)}}@keyframes rotate-end-p2{100%{transform:rotate(-360deg)}}@keyframes init-stroke{0%{stroke-dashoffset:240}100%{stroke-dashoffset:40}}@keyframes stroke-end{0%{stroke-dashoffset:40}100%{stroke-dashoffset:240}}"]);return $e=function(){return e},e}var We=Ce($e());function De(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([":host([small]){--size:2rem}:host([medium]){--size:4rem}"]);return De=function(){return e},e}var Je=Ce(De());function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ke(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<div class="loader"><svg class="loader-svg" viewBox="-75 -75 150 150"><title>Loading</title><circle class="loader-stroke" cx="0" cy="0" r="37.5"/></svg></div>']);return Ke=function(){return e},e}function Qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xe(e,t){return!t||"object"!==Ge(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ze(e,t){return(Ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"CustomLoader",(function(){return et}));var et=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Xe(this,Ye(t).apply(this,arguments))}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ze(e,t)}(t,e),n=t,o=[{key:"properties",get:function(){return{small:{type:Boolean,reflect:!0},medium:{type:Boolean,reflect:!0}}}},{key:"styles",get:function(){return[He,We,Je]}}],(r=[{key:"render",value:function(){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new P(e,n,"html",J)}(Ke())}}])&&Qe(n.prototype,r),o&&Qe(n,o),t}(Me);customElements.define("custom-loader",et)}]); //# sourceMappingURL=legacy.min.js.map