UNPKG

500 kBJavaScriptView Raw
1/*! For license information please see perspective-viewer.js.LICENSE.txt */
2!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(self,(function(){return(()=>{var t={9419:function(t,e,n){(function(){"use strict";var t,e="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},r="undefined"!=typeof window&&window===this?this:void 0!==n.g&&null!=n.g?n.g:this;function i(){i=function(){},r.Symbol||(r.Symbol=a)}var o,s,a=(o=0,function(t){return"jscomp_symbol_"+(t||"")+o++});function c(){i();var t=r.Symbol.iterator;t||(t=r.Symbol.iterator=r.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&e(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return l(this)}}),c=function(){}}function l(t){var e=0;return function(t){return c(),(t={next:t})[r.Symbol.iterator]=function(){return this},t}((function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}))}function u(t){c();var e=t[Symbol.iterator];return e?e.call(t):l(t)}if("function"==typeof Object.setPrototypeOf)s=Object.setPrototypeOf;else{var p;t:{var h={};try{h.__proto__={Pa:!0},p=h.Pa;break t}catch(o){}p=!1}s=p?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var d=s;function f(){this.f=!1,this.b=null,this.fa=void 0,this.a=1,this.G=0,this.c=null}function _(t){if(t.f)throw new TypeError("Generator is already running");t.f=!0}function m(t,e){t.c={Ra:e,Va:!0},t.a=t.G}function g(t,e){return t.a=3,{value:e}}function v(t){this.a=new f,this.b=t}function y(t,e,n,r){try{var i=e.call(t.a.b,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return t.a.f=!1,i;var o=i.value}catch(e){return t.a.b=null,m(t.a,e),E(t)}return t.a.b=null,r.call(t.a,o),E(t)}function E(t){for(;t.a.a;)try{var e=t.b(t.a);if(e)return t.a.f=!1,{value:e.value,done:!1}}catch(e){t.a.fa=void 0,m(t.a,e)}if(t.a.f=!1,t.a.c){if(e=t.a.c,t.a.c=null,e.Va)throw e.Ra;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function b(t){this.next=function(e){return _(t.a),t.a.b?e=y(t,t.a.b.next,e,t.a.m):(t.a.m(e),e=E(t)),e},this.throw=function(e){return _(t.a),t.a.b?e=y(t,t.a.b.throw,e,t.a.m):(m(t.a,e),e=E(t)),e},this.return=function(e){return function(t,e){_(t.a);var n=t.a.b;return n?y(t,"return"in n?n.return:function(t){return{value:t,done:!0}},e,t.a.return):(t.a.return(e),E(t))}(t,e)},c(),this[Symbol.iterator]=function(){return this}}function x(t,e){return e=new b(new v(e)),d&&d(e,t.prototype),e}f.prototype.m=function(t){this.fa=t},f.prototype.return=function(t){this.c={return:t},this.a=this.G},function(){if(!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var t=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(t.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var e=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||e&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||e&&"function"!=typeof window.Event){var n=window.Event;if(window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,!!e.bubbles,!!e.cancelable),n},n)for(var r in n)window.Event[r]=n[r];window.Event.prototype=n.prototype}if(!window.MouseEvent||e&&"function"!=typeof window.MouseEvent){if(e=window.MouseEvent,window.MouseEvent=function(t,e){e=e||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(t,!!e.bubbles,!!e.cancelable,e.view||window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),n},e)for(r in e)window.MouseEvent[r]=e[r];window.MouseEvent.prototype=e.prototype}Array.from||(Array.from=function(t){return[].slice.call(t)}),Object.assign||(Object.assign=function(t,e){for(var n,r=[].slice.call(arguments,1),i=0;i<r.length;i++)if(n=r[i])for(var o=t,s=n,a=Object.getOwnPropertyNames(s),c=0;c<a.length;c++)o[n=a[c]]=s[n];return t})}(window.WebComponents),function(){function t(){}function e(t,e){if(!t.childNodes.length)return[];switch(t.nodeType){case Node.DOCUMENT_NODE:return _.call(t,e);case Node.DOCUMENT_FRAGMENT_NODE:return m.call(t,e);default:return f.call(t,e)}}var n="undefined"==typeof HTMLTemplateElement,r=!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment),i=!1;/Trident/.test(navigator.userAgent)&&function(){function t(t,e){if(t instanceof DocumentFragment)for(var r;r=t.firstChild;)n.call(this,r,e);else n.call(this,t,e);return t}i=!0;var e=Node.prototype.cloneNode;Node.prototype.cloneNode=function(t){return t=e.call(this,t),this instanceof DocumentFragment&&(t.__proto__=DocumentFragment.prototype),t},DocumentFragment.prototype.querySelectorAll=HTMLElement.prototype.querySelectorAll,DocumentFragment.prototype.querySelector=HTMLElement.prototype.querySelector,Object.defineProperties(DocumentFragment.prototype,{nodeType:{get:function(){return Node.DOCUMENT_FRAGMENT_NODE},configurable:!0},localName:{get:function(){},configurable:!0},nodeName:{get:function(){return"#document-fragment"},configurable:!0}});var n=Node.prototype.insertBefore;Node.prototype.insertBefore=t;var r=Node.prototype.appendChild;Node.prototype.appendChild=function(e){return e instanceof DocumentFragment?t.call(this,e,null):r.call(this,e),e};var o=Node.prototype.removeChild,s=Node.prototype.replaceChild;Node.prototype.replaceChild=function(e,n){return e instanceof DocumentFragment?(t.call(this,e,n),o.call(this,n)):s.call(this,e,n),n},Document.prototype.createDocumentFragment=function(){var t=this.createElement("df");return t.__proto__=DocumentFragment.prototype,t};var a=Document.prototype.importNode;Document.prototype.importNode=function(t,e){return e=a.call(this,t,e||!1),t instanceof DocumentFragment&&(e.__proto__=DocumentFragment.prototype),e}}();var o=Node.prototype.cloneNode,s=Document.prototype.createElement,a=Document.prototype.importNode,c=Node.prototype.removeChild,l=Node.prototype.appendChild,u=Node.prototype.replaceChild,p=DOMParser.prototype.parseFromString,h=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),d=Object.getOwnPropertyDescriptor(window.Node.prototype,"childNodes"),f=Element.prototype.querySelectorAll,_=Document.prototype.querySelectorAll,m=DocumentFragment.prototype.querySelectorAll,g=function(){if(!n){var t=document.createElement("template"),e=document.createElement("template");return e.content.appendChild(document.createElement("div")),t.content.appendChild(e),0===(t=t.cloneNode(!0)).content.childNodes.length||0===t.content.firstChild.content.childNodes.length||r}}();if(n){var v=document.implementation.createHTMLDocument("template"),y=!0,E=document.createElement("style");E.textContent="template{display:none;}";var b=document.head;b.insertBefore(E,b.firstElementChild),t.prototype=Object.create(HTMLElement.prototype);var x=!document.createElement("div").hasOwnProperty("innerHTML");t.R=function(e){if(!e.content&&e.namespaceURI===document.documentElement.namespaceURI){e.content=v.createDocumentFragment();for(var n;n=e.firstChild;)l.call(e.content,n);if(x)e.__proto__=t.prototype;else if(e.cloneNode=function(e){return t.b(this,e)},y)try{N(e),S(e)}catch(t){y=!1}t.a(e.content)}};var w={option:["select"],thead:["table"],col:["colgroup","table"],tr:["tbody","table"],th:["tr","tbody","table"],td:["tr","tbody","table"]},N=function(e){Object.defineProperty(e,"innerHTML",{get:function(){return A(this)},set:function(e){var n=w[(/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(e)||["",""])[1].toLowerCase()];if(n)for(var r=0;r<n.length;r++)e="<"+n[r]+">"+e+"</"+n[r]+">";for(v.body.innerHTML=e,t.a(v);this.content.firstChild;)c.call(this.content,this.content.firstChild);if(e=v.body,n)for(r=0;r<n.length;r++)e=e.lastChild;for(;e.firstChild;)l.call(this.content,e.firstChild)},configurable:!0})},S=function(t){Object.defineProperty(t,"outerHTML",{get:function(){return"<template>"+this.innerHTML+"</template>"},set:function(t){if(!this.parentNode)throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");for(v.body.innerHTML=t,t=this.ownerDocument.createDocumentFragment();v.body.firstChild;)l.call(t,v.body.firstChild);u.call(this.parentNode,t,this)},configurable:!0})};N(t.prototype),S(t.prototype),t.a=function(n){for(var r,i=0,o=(n=e(n,"template")).length;i<o&&(r=n[i]);i++)t.R(r)},document.addEventListener("DOMContentLoaded",(function(){t.a(document)})),Document.prototype.createElement=function(){var e=s.apply(this,arguments);return"template"===e.localName&&t.R(e),e},DOMParser.prototype.parseFromString=function(){var e=p.apply(this,arguments);return t.a(e),e},Object.defineProperty(HTMLElement.prototype,"innerHTML",{get:function(){return A(this)},set:function(e){h.set.call(this,e),t.a(this)},configurable:!0,enumerable:!0});var L=/[&\u00A0"]/g,Q=/[&\u00A0<>]/g,T=function(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}},R=(E=function(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e})("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),C=E("style script xmp iframe noembed noframes plaintext noscript".split(" ")),A=function(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):d.get.call(t),o=0,s=i.length;o<s&&(n=i[o]);o++){t:{var a=n,c=t,l=e;switch(a.nodeType){case Node.ELEMENT_NODE:for(var u=a.localName,p="<"+u,h=a.attributes,f=0;c=h[f];f++)p+=" "+c.name+'="'+c.value.replace(L,T)+'"';p+=">",a=R[u]?p:p+A(a,l)+"</"+u+">";break t;case Node.TEXT_NODE:a=a.data,a=c&&C[c.localName]?a:a.replace(Q,T);break t;case Node.COMMENT_NODE:a="\x3c!--"+a.data+"--\x3e";break t;default:throw window.console.error(a),Error("not implemented")}}r+=a}return r}}if(n||g){t.b=function(t,e){var n=o.call(t,!1);return this.R&&this.R(n),e&&(l.call(n.content,o.call(t.content,!0)),U(n.content,t.content)),n};var U=function(n,r){if(r.querySelectorAll&&0!==(r=e(r,"template")).length)for(var i,o,s=0,a=(n=e(n,"template")).length;s<a;s++)o=r[s],i=n[s],t&&t.R&&t.R(o),u.call(i.parentNode,k.call(o,!0),i)},k=Node.prototype.cloneNode=function(e){if(!i&&r&&this instanceof DocumentFragment){if(!e)return this.ownerDocument.createDocumentFragment();var n=O.call(this.ownerDocument,this,!0)}else n=this.nodeType===Node.ELEMENT_NODE&&"template"===this.localName&&this.namespaceURI==document.documentElement.namespaceURI?t.b(this,e):o.call(this,e);return e&&U(n,this),n},O=Document.prototype.importNode=function(n,r){if(r=r||!1,"template"===n.localName)return t.b(n,r);var i=a.call(this,n,r);if(r){U(i,n),n=e(i,'script:not([type]),script[type="application/javascript"],script[type="text/javascript"]');for(var o,c=0;c<n.length;c++){o=n[c],(r=s.call(document,"script")).textContent=o.textContent;for(var l,p=o.attributes,h=0;h<p.length;h++)l=p[h],r.setAttribute(l.name,l.value);u.call(o.parentNode,r,o)}}return i}}n&&(window.HTMLTemplateElement=t)}();var w=setTimeout;function N(){}function S(t){if(!(this instanceof S))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this.J=0,this.wa=!1,this.A=void 0,this.U=[],A(t,this)}function L(t,e){for(;3===t.J;)t=t.A;0===t.J?t.U.push(e):(t.wa=!0,S.a((function(){var n=1===t.J?e.Xa:e.Ya;if(null===n)(1===t.J?Q:T)(e.qa,t.A);else{try{var r=n(t.A)}catch(t){return void T(e.qa,t)}Q(e.qa,r)}})))}function Q(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof S)return t.J=3,t.A=e,void R(t);if("function"==typeof n)return void A(function(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t.J=1,t.A=e,R(t)}catch(e){T(t,e)}}function T(t,e){t.J=2,t.A=e,R(t)}function R(t){2===t.J&&0===t.U.length&&S.a((function(){t.wa||S.b(t.A)}));for(var e=0,n=t.U.length;e<n;e++)L(t,t.U[e]);t.U=null}function C(t,e,n){this.Xa="function"==typeof t?t:null,this.Ya="function"==typeof e?e:null,this.qa=n}function A(t,e){var n=!1;try{t((function(t){n||(n=!0,Q(e,t))}),(function(t){n||(n=!0,T(e,t))}))}catch(t){n||(n=!0,T(e,t))}}if(S.prototype.catch=function(t){return this.then(null,t)},S.prototype.then=function(t,e){var n=new this.constructor(N);return L(this,new C(t,e,n)),n},S.prototype.finally=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))},S.c=function(t){return new S((function(e,n){function r(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(e){r(t,e)}),n)}i[t]=s,0==--o&&e(i)}catch(t){n(t)}}if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);for(var o=i.length,s=0;s<i.length;s++)r(s,i[s])}))},S.resolve=function(t){return t&&"object"==typeof t&&t.constructor===S?t:new S((function(e){e(t)}))},S.reject=function(t){return new S((function(e,n){n(t)}))},S.f=function(t){return new S((function(e,n){for(var r=0,i=t.length;r<i;r++)t[r].then(e,n)}))},S.a="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){w(t,0)},S.b=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},!window.Promise&&(window.Promise=S,S.prototype.then=S.prototype.then,S.all=S.c,S.race=S.f,S.resolve=S.resolve,S.reject=S.reject,!window.setImmediate)){var U=document.createTextNode(""),k=[];new MutationObserver((function(){for(var t=k.length,e=0;e<t;e++)k[e]();k.splice(0,t)})).observe(U,{characterData:!0}),S.a=function(t){k.push(t),U.textContent=0<U.textContent.length?"":"a"}}var O={},B=Object.create,D=Object.defineProperties,I=Object.defineProperty;function F(t,e){return{value:t,configurable:!!(e=void 0===e?{}:e).xa,writable:!!e.eb,enumerable:!!e.e}}var P=void 0;try{P=1===I({},"y",{get:function(){return 1}}).y}catch(o){P=!1}var M={},j=B(null);function V(t){if(this instanceof V)throw new TypeError("Symbol is not a constructor");var e=function(t){t=String(t);for(var e="",n=0;M[t+e];)e=n+=1;M[t+e]=1;var r="Symbol("+t+e+")";return P&&I(Object.prototype,r,{get:void 0,set:function(t){I(this,r,F(t,{xa:!0,eb:!0}))},configurable:!0,enumerable:!1}),r}(t=void 0===t?"":String(t));return P?B(j,{ta:F(t),Ja:F(e)}):e}D(V,{for:F((function(t){if(t=String(t),O[t])return O[t];var e=V(t);return O[t]=e})),keyFor:F((function(t){if(P&&(!t||"Symbol"!==t[V.toStringTag]))throw new TypeError(t+" is not a symbol");for(var e in O)if(O[e]===t)return P?O[e].ta:O[e].substr(7,O[e].length-8)}))}),D(V,{vb:F(V("hasInstance")),wb:F(V("isConcatSpreadable")),iterator:F(V("iterator")),match:F(V("match")),replace:F(V("replace")),search:F(V("search")),yb:F(V("species")),split:F(V("split")),zb:F(V("toPrimitive")),toStringTag:F(V("toStringTag")),unscopables:F(V("unscopables"))}),D(j,{constructor:F(V),toString:F((function(){return this.Ja})),valueOf:F((function(){return"Symbol("+this.ta+")"}))}),P&&I(j,V.toStringTag,F("Symbol",{xa:!0}));var G="function"==typeof Symbol?Symbol:V;if(!window.Symbol){window.Symbol=G;var H=window.Symbol.iterator;Array.prototype[H]=function t(){var e,n=this;return x(t,(function(t){if(1==t.a&&(e=0),3!=t.a)return e<n.length?t=g(t,n[e]):(t.a=0,t=void 0),t;e++,t.a=2}))},Set.prototype[H]=function t(){var e,n,r=this;return x(t,(function(t){if(1==t.a&&(e=[],r.forEach((function(t){e.push(t)})),n=0),3!=t.a)return n<e.length?t=g(t,e[n]):(t.a=0,t=void 0),t;n++,t.a=2}))},Map.prototype[H]=function t(){var e,n,r=this;return x(t,(function(t){if(1==t.a&&(e=[],r.forEach((function(t,n){e.push([n,t])})),n=0),3!=t.a)return n<e.length?t=g(t,e[n]):(t.a=0,t=void 0),t;n++,t.a=2}))},String.prototype[H]=function t(){var e,n=this;return x(t,(function(t){if(1==t.a&&(e=0),3!=t.a)return e<n.length?t=g(t,n[e]):(t.a=0,t=void 0),t;e++,t.a=2}))}}window.WebComponents=window.WebComponents||{flags:{}};var W=document.querySelector('script[src*="webcomponents-bundle"]'),J=/wc-(.+)/,z={};if(!z.noOpts){if(location.search.slice(1).split("&").forEach((function(t){var e;(t=t.split("="))[0]&&(e=t[0].match(J))&&(z[e[1]]=t[1]||!0)})),W)for(var Z,X=0;Z=W.attributes[X];X++)"src"!==Z.name&&(z[Z.name]=Z.value||!0);if(z.log&&z.log.split){var $=z.log.split(",");z.log={},$.forEach((function(t){z.log[t]=!0}))}else z.log={}}window.WebComponents.flags=z;var K=z.shadydom;K&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=K);var Y=z.register||z.ce;function q(){this.Aa=this.root=null,this.da=!1,this.N=this.$=this.ma=this.assignedSlot=this.assignedNodes=this.S=null,this.childNodes=this.nextSibling=this.previousSibling=this.lastChild=this.firstChild=this.parentNode=this.V=void 0,this.Fa=this.ua=!1,this.Z={}}function tt(t){return t.ka||(t.ka=new q),t.ka}function et(t){return t&&t.ka}Y&&window.customElements&&(window.customElements.forcePolyfill=Y),q.prototype.toJSON=function(){return{}};var nt=window.ShadyDOM||{};nt.Ta=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var rt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");nt.K=!!(rt&&rt.configurable&&rt.get),nt.oa=nt.force||!nt.Ta;var it=navigator.userAgent.match("Trident"),ot=navigator.userAgent.match("Edge");function st(t){return(t=et(t))&&void 0!==t.firstChild}function at(t){return"ShadyRoot"===t.La}function ct(t){if(at(t=t.getRootNode()))return t}void 0===nt.Ca&&(nt.Ca=nt.K&&(it||ot));var lt=Element.prototype,ut=lt.matches||lt.matchesSelector||lt.mozMatchesSelector||lt.msMatchesSelector||lt.oMatchesSelector||lt.webkitMatchesSelector;function pt(t,e){if(t&&e)for(var n,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(n=r[i]);i++){var o=n,s=t,a=Object.getOwnPropertyDescriptor(e,o);a&&Object.defineProperty(s,o,a)}}function ht(t,e){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];for(r=0;r<n.length;r++)pt(t,n[r]);return t}var dt=document.createTextNode(""),ft=0,_t=[];function mt(t){_t.push(t),dt.textContent=ft++}new MutationObserver((function(){for(;_t.length;)try{_t.shift()()}catch(t){throw dt.textContent=ft++,t}})).observe(dt,{characterData:!0});var gt=!!document.contains;function vt(t,e){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function yt(t){for(var e=t.length-1;0<=e;e--){var n=t[e],r=n.getAttribute("id")||n.getAttribute("name");r&&"length"!==r&&isNaN(r)&&(t[r]=n)}return t.item=function(e){return t[e]},t.namedItem=function(e){if("length"!==e&&isNaN(e)&&t[e])return t[e];for(var n=u(t),r=n.next();!r.done;r=n.next())if(((r=r.value).getAttribute("id")||r.getAttribute("name"))==e)return r;return null},t}var Et,bt=[];function xt(t){Et||(Et=!0,mt(wt)),bt.push(t)}function wt(){Et=!1;for(var t=!!bt.length;bt.length;)bt.shift()();return t}function Nt(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.ca=new Set}wt.list=bt,Nt.prototype.flush=function(){if(this.a){this.a=!1;var t=this.takeRecords();t.length&&this.ca.forEach((function(e){e(t)}))}},Nt.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var t=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],t}return[]};var St=Element.prototype.insertBefore,Lt=Element.prototype.replaceChild,Qt=Element.prototype.removeChild,Tt=Element.prototype.setAttribute,Rt=Element.prototype.removeAttribute,Ct=Element.prototype.cloneNode,At=Document.prototype.importNode,Ut=Element.prototype.addEventListener,kt=Element.prototype.removeEventListener,Ot=Window.prototype.addEventListener,Bt=Window.prototype.removeEventListener,Dt=Element.prototype.dispatchEvent,It=Node.prototype.contains||HTMLElement.prototype.contains,Ft=Document.prototype.getElementById,Pt=Element.prototype.querySelector,Mt=DocumentFragment.prototype.querySelector,jt=Document.prototype.querySelector,Vt=Element.prototype.querySelectorAll,Gt=DocumentFragment.prototype.querySelectorAll,Ht=Document.prototype.querySelectorAll,Wt={};Wt.appendChild=Element.prototype.appendChild,Wt.insertBefore=St,Wt.replaceChild=Lt,Wt.removeChild=Qt,Wt.setAttribute=Tt,Wt.removeAttribute=Rt,Wt.cloneNode=Ct,Wt.importNode=At,Wt.addEventListener=Ut,Wt.removeEventListener=kt,Wt.fb=Ot,Wt.gb=Bt,Wt.dispatchEvent=Dt,Wt.contains=It,Wt.getElementById=Ft,Wt.pb=Pt,Wt.tb=Mt,Wt.nb=jt,Wt.querySelector=function(t){switch(this.nodeType){case Node.ELEMENT_NODE:return Pt.call(this,t);case Node.DOCUMENT_NODE:return jt.call(this,t);default:return Mt.call(this,t)}},Wt.qb=Vt,Wt.ub=Gt,Wt.ob=Ht,Wt.querySelectorAll=function(t){switch(this.nodeType){case Node.ELEMENT_NODE:return Vt.call(this,t);case Node.DOCUMENT_NODE:return Ht.call(this,t);default:return Gt.call(this,t)}};var Jt=/[&\u00A0"]/g,zt=/[&\u00A0<>]/g;function Zt(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function Xt(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=!0;return e}var $t=Xt("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),Kt=Xt("style script xmp iframe noembed noframes plaintext noscript".split(" "));function Yt(t,e){"template"===t.localName&&(t=t.content);for(var n,r="",i=e?e(t):t.childNodes,o=0,s=i.length;o<s&&(n=i[o]);o++){t:{var a=n,c=t,l=e;switch(a.nodeType){case Node.ELEMENT_NODE:for(var u=a.localName,p="<"+u,h=a.attributes,d=0;c=h[d];d++)p+=" "+c.name+'="'+c.value.replace(Jt,Zt)+'"';p+=">",a=$t[u]?p:p+Yt(a,l)+"</"+u+">";break t;case Node.TEXT_NODE:a=a.data,a=c&&Kt[c.localName]?a:a.replace(zt,Zt);break t;case Node.COMMENT_NODE:a="\x3c!--"+a.data+"--\x3e";break t;default:throw window.console.error(a),Error("not implemented")}}r+=a}return r}var qt=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),te=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function ee(t){var e=[];for(qt.currentNode=t,t=qt.firstChild();t;)e.push(t),t=qt.nextSibling();return e}var ne={parentNode:function(t){return qt.currentNode=t,qt.parentNode()},firstChild:function(t){return qt.currentNode=t,qt.firstChild()},lastChild:function(t){return qt.currentNode=t,qt.lastChild()},previousSibling:function(t){return qt.currentNode=t,qt.previousSibling()},nextSibling:function(t){return qt.currentNode=t,qt.nextSibling()}};ne.childNodes=ee,ne.parentElement=function(t){return te.currentNode=t,te.parentNode()},ne.firstElementChild=function(t){return te.currentNode=t,te.firstChild()},ne.lastElementChild=function(t){return te.currentNode=t,te.lastChild()},ne.previousElementSibling=function(t){return te.currentNode=t,te.previousSibling()},ne.nextElementSibling=function(t){return te.currentNode=t,te.nextSibling()},ne.children=function(t){var e=[];for(te.currentNode=t,t=te.firstChild();t;)e.push(t),t=te.nextSibling();return yt(e)},ne.innerHTML=function(t){return Yt(t,(function(t){return ee(t)}))},ne.textContent=function(t){switch(t.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n;default:return t.nodeValue}};var re=nt.K,ie=[Node.prototype,Element.prototype,HTMLElement.prototype];function oe(t){var e;t:{for(e=0;e<ie.length;e++){var n=ie[e];if(n.hasOwnProperty(t)){e=n;break t}}e=void 0}if(!e)throw Error("Could not find descriptor for "+t);return Object.getOwnPropertyDescriptor(e,t)}var se=re?{parentNode:oe("parentNode"),firstChild:oe("firstChild"),lastChild:oe("lastChild"),previousSibling:oe("previousSibling"),nextSibling:oe("nextSibling"),childNodes:oe("childNodes"),parentElement:oe("parentElement"),previousElementSibling:oe("previousElementSibling"),nextElementSibling:oe("nextElementSibling"),innerHTML:oe("innerHTML"),textContent:oe("textContent"),firstElementChild:oe("firstElementChild"),lastElementChild:oe("lastElementChild"),children:oe("children")}:{},ae=re?{firstElementChild:Object.getOwnPropertyDescriptor(DocumentFragment.prototype,"firstElementChild"),lastElementChild:Object.getOwnPropertyDescriptor(DocumentFragment.prototype,"lastElementChild"),children:Object.getOwnPropertyDescriptor(DocumentFragment.prototype,"children")}:{},ce=re?{firstElementChild:Object.getOwnPropertyDescriptor(Document.prototype,"firstElementChild"),lastElementChild:Object.getOwnPropertyDescriptor(Document.prototype,"lastElementChild"),children:Object.getOwnPropertyDescriptor(Document.prototype,"children")}:{},le={za:se,sb:ae,mb:ce,parentNode:function(t){return se.parentNode.get.call(t)},firstChild:function(t){return se.firstChild.get.call(t)},lastChild:function(t){return se.lastChild.get.call(t)},previousSibling:function(t){return se.previousSibling.get.call(t)},nextSibling:function(t){return se.nextSibling.get.call(t)},childNodes:function(t){return Array.prototype.slice.call(se.childNodes.get.call(t))},parentElement:function(t){return se.parentElement.get.call(t)},previousElementSibling:function(t){return se.previousElementSibling.get.call(t)},nextElementSibling:function(t){return se.nextElementSibling.get.call(t)},innerHTML:function(t){return se.innerHTML.get.call(t)},textContent:function(t){return se.textContent.get.call(t)},children:function(t){switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return ae.children.get.call(t);case Node.DOCUMENT_NODE:return ce.children.get.call(t);default:return se.children.get.call(t)}},firstElementChild:function(t){switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return ae.firstElementChild.get.call(t);case Node.DOCUMENT_NODE:return ce.firstElementChild.get.call(t);default:return se.firstElementChild.get.call(t)}},lastElementChild:function(t){switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return ae.lastElementChild.get.call(t);case Node.DOCUMENT_NODE:return ce.lastElementChild.get.call(t);default:return se.lastElementChild.get.call(t)}}},ue=nt.Ca?le:ne;function pe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}var he=nt.K,de=document.implementation.createHTMLDocument("inert"),fe=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),_e=fe&&fe.get,me=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),ge={parentElement:{get:function(){var t=et(this);return(t=t&&t.parentNode)&&t.nodeType!==Node.ELEMENT_NODE&&(t=null),void 0!==t?t:ue.parentElement(this)},configurable:!0},parentNode:{get:function(){var t=et(this);return void 0!==(t=t&&t.parentNode)?t:ue.parentNode(this)},configurable:!0},nextSibling:{get:function(){var t=et(this);return void 0!==(t=t&&t.nextSibling)?t:ue.nextSibling(this)},configurable:!0},previousSibling:{get:function(){var t=et(this);return void 0!==(t=t&&t.previousSibling)?t:ue.previousSibling(this)},configurable:!0},nextElementSibling:{get:function(){var t=et(this);if(t&&void 0!==t.nextSibling){for(t=this.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return ue.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){var t=et(this);if(t&&void 0!==t.previousSibling){for(t=this.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return ue.previousElementSibling(this)},configurable:!0}},ve={className:{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},configurable:!0}},ye={childNodes:{get:function(){if(st(this)){var t=et(this);if(!t.childNodes){t.childNodes=[];for(var e=this.firstChild;e;e=e.nextSibling)t.childNodes.push(e)}var n=t.childNodes}else n=ue.childNodes(this);return n.item=function(t){return n[t]},n},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var t=et(this);return void 0!==(t=t&&t.firstChild)?t:ue.firstChild(this)},configurable:!0},lastChild:{get:function(){var t=et(this);return void 0!==(t=t&&t.lastChild)?t:ue.lastChild(this)},configurable:!0},textContent:{get:function(){if(st(this)){for(var t,e=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")}return ue.textContent(this)},set:function(t){switch(null==t&&(t=""),this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!st(this)&&he){var e=this.firstChild;(e!=this.lastChild||e&&e.nodeType!=Node.TEXT_NODE)&&pe(this),le.za.textContent.set.call(this,t)}else pe(this),(0<t.length||this.nodeType===Node.ELEMENT_NODE)&&this.appendChild(document.createTextNode(t));break;default:this.nodeValue=t}},configurable:!0},firstElementChild:{get:function(){var t=et(this);if(t&&void 0!==t.firstChild){for(t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.nextSibling;return t}return ue.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){var t=et(this);if(t&&void 0!==t.lastChild){for(t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}return ue.lastElementChild(this)},configurable:!0},children:{get:function(){return st(this)?yt(Array.prototype.filter.call(this.childNodes,(function(t){return t.nodeType===Node.ELEMENT_NODE}))):ue.children(this)},configurable:!0},innerHTML:{get:function(){return st(this)?Yt("template"===this.localName?this.content:this):ue.innerHTML(this)},set:function(t){var e="template"===this.localName?this.content:this;pe(e);var n=this.localName||"div";for(n=this.namespaceURI&&this.namespaceURI!==de.namespaceURI?de.createElementNS(this.namespaceURI,n):de.createElement(n),he?le.za.innerHTML.set.call(n,t):n.innerHTML=t,t="template"===this.localName?n.content:n;t.firstChild;)e.appendChild(t.firstChild)},configurable:!0}},Ee={shadowRoot:{get:function(){var t=et(this);return t&&t.Aa||null},configurable:!0}},be={activeElement:{get:function(){var t=me&&me.get?me.get.call(document):nt.K?void 0:document.activeElement;if(t&&t.nodeType){var e=!!at(this);if(this===document||e&&this.host!==t&&Wt.contains.call(this.host,t)){for(e=ct(t);e&&e!==this;)e=ct(t=e.host);t=this===document?e?null:t:e===this?t:null}else t=null}else t=null;return t},set:function(){},configurable:!0}};function xe(t,e,n){for(var r in e){var i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable||!i&&n?Object.defineProperty(t,r,e[r]):n&&console.warn("Could not define",r,"on",t)}}function we(t){xe(t,ge),xe(t,ve),xe(t,ye),xe(t,be)}var Ne=nt.K?function(){}:function(t){var e=tt(t);e.ua||(e.ua=!0,xe(t,ge,!0),xe(t,ve,!0))},Se=nt.K?function(){}:function(t){tt(t).Fa||(xe(t,ye,!0),xe(t,Ee,!0))},Le=ue.childNodes;function Qe(t,e,n){Ne(t),n=n||null;var r=tt(t),i=tt(e),o=n?tt(n):null;r.previousSibling=n?o.previousSibling:e.lastChild,(o=et(r.previousSibling))&&(o.nextSibling=t),(o=et(r.nextSibling=n))&&(o.previousSibling=t),r.parentNode=e,n?n===i.firstChild&&(i.firstChild=t):(i.lastChild=t,i.firstChild||(i.firstChild=t)),i.childNodes=null}function Te(t){var e=tt(t);if(void 0===e.firstChild){e.childNodes=null;var n=Le(t);for(e.firstChild=n[0]||null,e.lastChild=n[n.length-1]||null,Se(t),e=0;e<n.length;e++){var r=n[e],i=tt(r);i.parentNode=t,i.nextSibling=n[e+1]||null,i.previousSibling=n[e-1]||null,Ne(r)}}}var Re=ue.parentNode;function Ce(t,e,n){if(e===t)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(n){var r=et(n);if(void 0!==(r=r&&r.parentNode)&&r!==t||void 0===r&&Re(n)!==t)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.")}if(n===e)return e;var i,o,s;if((e.parentNode&&Ae(e.parentNode,e),r=!0,!e.__noInsertionPoint)&&((o=i=ct(t))&&("slot"===e.localName?s=[e]:e.querySelectorAll&&(s=e.querySelectorAll("slot")),o=s&&s.length?s:void 0),o)){var a=o;(s=i).a=s.a||[],s.o=s.o||[],s.w=s.w||{},s.a.push.apply(s.a,a instanceof Array?a:function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(u(a)))}if(("slot"===t.localName||o)&&(i=i||ct(t))&&yn(i),st(t)){if(i=n,Se(t),void 0!==(o=tt(t)).firstChild&&(o.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(o=e.childNodes,s=0;s<o.length;s++)Qe(o[s],t,i);o=void 0!==(i=tt(e)).firstChild?null:void 0,i.firstChild=i.lastChild=o,i.childNodes=o}else Qe(e,t,i);i=et(t),Oe(t)?(yn(i.root),r=!1):i.root&&(r=!1)}return r?(r=at(t)?t.host:t,n?(n=ke(n),Wt.insertBefore.call(r,e,n)):Wt.appendChild.call(r,e)):e.ownerDocument!==t.ownerDocument&&t.ownerDocument.adoptNode(e),De(t,e),e}function Ae(t,e){if(e.parentNode!==t)throw Error("The node to be removed is not a child of this node: "+e);var n=ct(e),r=et(t);if(st(t)){var i=tt(e),o=tt(t);e===o.firstChild&&(o.firstChild=i.nextSibling),e===o.lastChild&&(o.lastChild=i.previousSibling);var s=i.previousSibling,a=i.nextSibling;if(s&&(tt(s).nextSibling=a),a&&(tt(a).previousSibling=s),i.parentNode=i.previousSibling=i.nextSibling=void 0,void 0!==o.childNodes&&(o.childNodes=null),Oe(t)){yn(r.root);var c=!0}}if(Ue(e),n){if((i=t&&"slot"===t.localName)&&(c=!0),n.o){for(f in Nn(n),o=n.w)for(s=o[f],a=0;a<s.length;a++){var l=s[a];if(vt(e,l)){s.splice(a,1);var u=n.o.indexOf(l);if(0<=u&&n.o.splice(u,1),a--,l=(u=et(l)).N)for(var p=0;p<l.length;p++){var h=l[p],d=dn(h);d&&Wt.removeChild.call(d,h)}u.N=[],u.assignedNodes=[],u=!0}}var f=u}else f=void 0;(f||i)&&yn(n)}return c||(c=at(t)?t.host:t,(!r.root&&"slot"!==e.localName||c===Re(e))&&Wt.removeChild.call(c,e)),De(t,null,e),e}function Ue(t){var e=et(t);if(e&&void 0!==e.V)for(var n,r=0,i=(e=t.childNodes).length;r<i&&(n=e[r]);r++)Ue(n);(t=et(t))&&(t.V=void 0)}function ke(t){var e=t;return t&&"slot"===t.localName&&(e=(e=(e=et(t))&&e.N)&&e.length?e[0]:ke(t.nextSibling)),e}function Oe(t){return(t=(t=et(t))&&t.root)&&Qn(t)}function Be(t,e){if("slot"===e)Oe(t=t.parentNode)&&yn(et(t).root);else if("slot"===t.localName&&"name"===e&&(e=ct(t))){if(e.o){Nn(e);var n=t.Ia,r=Sn(t);if(r!==n){var i=(n=e.w[n]).indexOf(t);0<=i&&n.splice(i,1),(n=e.w[r]||(e.w[r]=[])).push(t),1<n.length&&(e.w[r]=Ln(n))}}yn(e)}}function De(t,e,n){(t=(t=et(t))&&t.S)&&(e&&t.addedNodes.push(e),n&&t.removedNodes.push(n),function(t){t.a||(t.a=!0,mt((function(){t.flush()})))}(t))}function Ie(t){if(t&&t.nodeType){var e=tt(t),n=e.V;return void 0===n&&(at(t)?(n=t,e.V=n):(n=(n=t.parentNode)?Ie(n):t,Wt.contains.call(document.documentElement,t)&&(e.V=n))),n}}function Fe(t,e,n){var r=[];return Pe(t.childNodes,e,n,r),r}function Pe(t,e,n,r){for(var i,o=0,s=t.length;o<s&&(i=t[o]);o++){var a;if(a=i.nodeType===Node.ELEMENT_NODE){var c=e,l=n,u=r,p=c(a=i);p&&u.push(a),l&&l(p)?a=p:(Pe(a.childNodes,c,l,u),a=void 0)}if(a)break}}var Me=null;function je(t,e,n){Me||(Me=window.ShadyCSS&&window.ShadyCSS.ScopingShim),Me&&"class"===e?Me.setElementClass(t,n):(Wt.setAttribute.call(t,e,n),Be(t,e))}function Ve(t,e){if(t.ownerDocument!==document||"template"===t.localName)return Wt.importNode.call(document,t,e);var n=Wt.importNode.call(document,t,!1);if(e){t=t.childNodes,e=0;for(var r;e<t.length;e++)r=Ve(t[e],!0),n.appendChild(r)}return n}var Ge="__eventWrappers"+Date.now(),He=function(){var t=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return t?function(e){return t.get.call(e)}:null}(),We={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Je={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function ze(t,e){var n=[],r=t;for(t=t===window?window:t.getRootNode();r;)n.push(r),r=r.assignedSlot?r.assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(e||r!==t)?r.host:r.parentNode;return n[n.length-1]===document&&n.push(window),n}function Ze(t,e){if(!at)return t;t=ze(t,!0);for(var n,r,i,o,s=0;s<e.length;s++)if((i=(n=e[s])===window?window:n.getRootNode())!==r&&(o=t.indexOf(i),r=i),!at(i)||-1<o)return n}var Xe={get composed(){return void 0===this.Y&&(He?this.Y=He(this):!1!==this.isTrusted&&(this.Y=We[this.type])),this.Y||!1},composedPath:function(){return this.sa||(this.sa=ze(this.__target,this.composed)),this.sa},get target(){return Ze(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){return this.ja?(this.va||(this.va=ze(this.ja,!0)),Ze(this.currentTarget||this.__previousCurrentTarget,this.va)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.ia=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.ia=this.Ea=!0}};function $e(t){function e(e,n){return(e=new t(e,n)).Y=n&&!!n.composed,e}return function(t,e){for(var n in e)t[n]=e[n]}(e,t),e.prototype=t.prototype,e}var Ke={focus:!0,blur:!0};function Ye(t){return t.__target!==t.target||t.ja!==t.relatedTarget}function qe(t,e,n){if(n=e.__handlers&&e.__handlers[t.type]&&e.__handlers[t.type][n])for(var r,i=0;(r=n[i])&&(!Ye(t)||t.target!==t.relatedTarget)&&(r.call(e,t),!t.Ea);i++);}function tn(t){var e,n=t.composedPath();Object.defineProperty(t,"currentTarget",{get:function(){return i},configurable:!0});for(var r=n.length-1;0<=r;r--){var i=n[r];if(qe(t,i,"capture"),t.ia)return}for(Object.defineProperty(t,"eventPhase",{get:function(){return Event.AT_TARGET}}),r=0;r<n.length;r++){var o=et(i=n[r]);if(o=o&&o.root,(0===r||o&&o===e)&&(qe(t,i,"bubble"),i!==window&&(e=i.getRootNode()),t.ia))break}}function en(t,e,n,r,i,o){for(var s=0;s<t.length;s++){var a=t[s],c=a.type,l=a.capture,u=a.once,p=a.passive;if(e===a.node&&n===c&&r===l&&i===u&&o===p)return s}return-1}function nn(t,e,n){if(e){var r=typeof e;if(("function"===r||"object"===r)&&("object"!==r||e.handleEvent&&"function"==typeof e.handleEvent)){var i=this instanceof Window?Wt.fb:Wt.addEventListener;if(Je[t])return i.call(this,t,e,n);if(n&&"object"==typeof n)var o=!!n.capture,s=!!n.once,a=!!n.passive;else o=!!n,a=s=!1;var c=n&&n.la||this,l=e[Ge];if(l){if(-1<en(l,c,t,o,s,a))return}else e[Ge]=[];l=function(i){if(s&&this.removeEventListener(t,e,n),i.__target||on(i),c!==this){var o=Object.getOwnPropertyDescriptor(i,"currentTarget");Object.defineProperty(i,"currentTarget",{get:function(){return c},configurable:!0})}if(i.__previousCurrentTarget=i.currentTarget,(!at(c)||-1!=i.composedPath().indexOf(c))&&(i.composed||-1<i.composedPath().indexOf(c)))if(Ye(i)&&i.target===i.relatedTarget)i.eventPhase===Event.BUBBLING_PHASE&&i.stopImmediatePropagation();else if(i.eventPhase===Event.CAPTURING_PHASE||i.bubbles||i.target===c||c instanceof Window){var a="function"===r?e.call(c,i):e.handleEvent&&e.handleEvent(i);return c!==this&&(o?(Object.defineProperty(i,"currentTarget",o),o=null):delete i.currentTarget),a}},e[Ge].push({node:c,type:t,capture:o,once:s,passive:a,hb:l}),Ke[t]?(this.__handlers=this.__handlers||{},this.__handlers[t]=this.__handlers[t]||{capture:[],bubble:[]},this.__handlers[t][o?"capture":"bubble"].push(l)):i.call(this,t,l,n)}}}function rn(t,e,n){if(e){var r=this instanceof Window?Wt.gb:Wt.removeEventListener;if(Je[t])return r.call(this,t,e,n);if(n&&"object"==typeof n)var i=!!n.capture,o=!!n.once,s=!!n.passive;else i=!!n,s=o=!1;var a=n&&n.la||this,c=void 0,l=null;try{l=e[Ge]}catch(t){}l&&-1<(o=en(l,a,t,i,o,s))&&(c=l.splice(o,1)[0].hb,l.length||(e[Ge]=void 0)),r.call(this,t,c||e,n),c&&Ke[t]&&this.__handlers&&this.__handlers[t]&&-1<(c=(t=this.__handlers[t][i?"capture":"bubble"]).indexOf(c))&&t.splice(c,1)}}function on(t){if(t.__target=t.target,t.ja=t.relatedTarget,nt.K){var e=Object.getPrototypeOf(t);if(!e.hasOwnProperty("__patchProto")){var n=Object.create(e);n.jb=e,pt(n,Xe),e.__patchProto=n}t.__proto__=e.__patchProto}else pt(t,Xe)}var sn=$e(window.Event),an=$e(window.CustomEvent),cn=$e(window.MouseEvent);function ln(t,e){return{index:t,W:[],ba:e}}function un(t,e,n,r){var i=0,o=0,s=0,a=0,c=Math.min(e-i,r-o);if(0==i&&0==o)t:{for(s=0;s<c;s++)if(t[s]!==n[s])break t;s=c}if(e==t.length&&r==n.length){a=t.length;for(var l=n.length,u=0;u<c-s&&pn(t[--a],n[--l]);)u++;a=u}if(o+=s,r-=a,0==(e-=a)-(i+=s)&&0==r-o)return[];if(i==e){for(e=ln(i,0);o<r;)e.W.push(n[o++]);return[e]}if(o==r)return[ln(i,e-i)];for(r=r-(s=o)+1,a=e-(c=i)+1,e=Array(r),l=0;l<r;l++)e[l]=Array(a),e[l][0]=l;for(l=0;l<a;l++)e[0][l]=l;for(l=1;l<r;l++)for(u=1;u<a;u++)if(t[c+u-1]===n[s+l-1])e[l][u]=e[l-1][u-1];else{var p=e[l-1][u]+1,h=e[l][u-1]+1;e[l][u]=p<h?p:h}for(c=e.length-1,s=e[0].length-1,r=e[c][s],t=[];0<c||0<s;)0==c?(t.push(2),s--):0==s?(t.push(3),c--):(a=e[c-1][s-1],(p=(l=e[c-1][s])<(u=e[c][s-1])?l<a?l:a:u<a?u:a)==a?(a==r?t.push(0):(t.push(1),r=a),c--,s--):p==l?(t.push(3),c--,r=l):(t.push(2),s--,r=u));for(t.reverse(),e=void 0,c=[],s=0;s<t.length;s++)switch(t[s]){case 0:e&&(c.push(e),e=void 0),i++,o++;break;case 1:e||(e=ln(i,0)),e.ba++,i++,e.W.push(n[o]),o++;break;case 2:e||(e=ln(i,0)),e.ba++,i++;break;case 3:e||(e=ln(i,0)),e.W.push(n[o]),o++}return e&&c.push(e),c}function pn(t,e){return t===e}var hn,dn=ue.parentNode,fn=ue.childNodes,_n={},mn=nt.deferConnectionCallbacks&&"loading"===document.readyState;function gn(t){var e=[];do{e.unshift(t)}while(t=t.parentNode);return e}function vn(t,e,n){if(t!==_n)throw new TypeError("Illegal constructor");this.La="ShadyRoot",this.host=e,this.c=n&&n.mode,Te(e),(t=tt(e)).root=this,t.Aa="closed"!==this.c?this:null,(t=tt(this)).firstChild=t.lastChild=t.parentNode=t.nextSibling=t.previousSibling=null,t.childNodes=[],this.b=this.aa=!1,this.a=this.w=this.o=null,yn(this)}function yn(t){t.aa||(t.aa=!0,xt((function(){return En(t)})))}function En(t){for(var e;t;){t.aa&&(e=t);t:{var n=t;if(at(t=n.host.getRootNode()))for(var r=n.host.childNodes,i=0;i<r.length;i++)if("slot"==(n=r[i]).localName)break t;t=void 0}}e&&e._renderRoot()}function bn(t,e,n){var r=tt(e),i=r.$;r.$=null,n||(n=(t=t.w[e.slot||"__catchall"])&&t[0]),n?(tt(n).assignedNodes.push(e),r.assignedSlot=n):r.assignedSlot=void 0,i!==r.assignedSlot&&r.assignedSlot&&(tt(r.assignedSlot).da=!0)}function xn(t,e,n){for(var r,i=0;i<n.length&&(r=n[i]);i++)if("slot"==r.localName){var o=et(r).assignedNodes;o&&o.length&&xn(t,e,o)}else e.push(n[i])}function wn(t,e){Wt.dispatchEvent.call(e,new Event("slotchange")),(e=et(e)).assignedSlot&&wn(t,e.assignedSlot)}function Nn(t){if(t.a&&t.a.length){for(var e,n=t.a,r=0;r<n.length;r++){var i=n[r];Te(i),Te(i.parentNode);var o=Sn(i);t.w[o]?((e=e||{})[o]=!0,t.w[o].push(i)):t.w[o]=[i],t.o.push(i)}if(e)for(var s in e)t.w[s]=Ln(t.w[s]);t.a=[]}}function Sn(t){var e=t.name||t.getAttribute("name")||"__catchall";return t.Ia=e}function Ln(t){return t.sort((function(t,e){t=gn(t);for(var n=gn(e),r=0;r<t.length;r++){e=t[r];var i=n[r];if(e!==i)return(t=Array.from(e.parentNode.childNodes)).indexOf(e)-t.indexOf(i)}}))}function Qn(t){return Nn(t),!(!t.o||!t.o.length)}if(vn.prototype._renderRoot=function(){var t=mn;if(mn=!0,this.aa=!1,this.o){Nn(this);for(var e,n=0;n<this.o.length;n++){var r=et(e=this.o[n]),i=r.assignedNodes;if(r.assignedNodes=[],r.N=[],r.ma=i)for(r=0;r<i.length;r++){var o=et(i[r]);o.$=o.assignedSlot,o.assignedSlot===e&&(o.assignedSlot=null)}}for(e=this.host.firstChild;e;e=e.nextSibling)bn(this,e);for(n=0;n<this.o.length;n++){if(!(i=et(e=this.o[n])).assignedNodes.length)for(r=e.firstChild;r;r=r.nextSibling)bn(this,r,e);if((r=(r=et(e.parentNode))&&r.root)&&Qn(r)&&r._renderRoot(),xn(this,i.N,i.assignedNodes),r=i.ma){for(o=0;o<r.length;o++)et(r[o]).$=null;i.ma=null,r.length>i.assignedNodes.length&&(i.da=!0)}i.da&&(i.da=!1,wn(this,e))}for(n=this.o,e=[],i=0;i<n.length;i++)(o=et(r=n[i].parentNode))&&o.root||!(0>e.indexOf(r))||e.push(r);for(n=0;n<e.length;n++){r=(i=e[n])===this?this.host:i,o=[],i=i.childNodes;for(var s=0;s<i.length;s++){var a=i[s];if("slot"==a.localName){a=et(a).N;for(var c=0;c<a.length;c++)o.push(a[c])}else o.push(a)}i=void 0,s=fn(r),a=un(o,o.length,s,s.length);for(var l=c=0;c<a.length&&(i=a[c]);c++){for(var u,p=0;p<i.W.length&&(u=i.W[p]);p++)dn(u)===r&&Wt.removeChild.call(r,u),s.splice(i.index+l,1);l-=i.ba}for(l=0;l<a.length&&(i=a[l]);l++)for(c=s[i.index],p=i.index;p<i.index+i.ba;p++)u=o[p],Wt.insertBefore.call(r,u,c),s.splice(p,0,u)}}if(!this.b)for(e=0,n=(u=this.host.childNodes).length;e<n;e++)r=et(i=u[e]),dn(i)!==this.host||"slot"!==i.localName&&r.assignedSlot||Wt.removeChild.call(this.host,i);this.b=!0,mn=t,hn&&hn()},window.customElements&&nt.oa){var Tn=new Map;hn=function(){var t=Array.from(Tn);Tn.clear();for(var e=(t=u(t)).next();!e.done;e=t.next()){var n=(e=u(e.value)).next().value;e.next().value?n.Ga():n.Ha()}},mn&&document.addEventListener("readystatechange",(function(){mn=!1,hn()}),{once:!0});var Rn=window.customElements.define;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:function(t,e){var n=e.prototype.connectedCallback,r=e.prototype.disconnectedCallback;Rn.call(window.customElements,t,function(t,e,n){var r=0,i="__isConnected"+r++;return(e||n)&&(t.prototype.connectedCallback=t.prototype.Ga=function(){mn?Tn.set(this,!0):this[i]||(this[i]=!0,e&&e.call(this))},t.prototype.disconnectedCallback=t.prototype.Ha=function(){mn?this.isConnected||Tn.set(this,!1):this[i]&&(this[i]=!1,n&&n.call(this))}),t}(e,n,r)),e.prototype.connectedCallback=n,e.prototype.disconnectedCallback=r}})}function Cn(t){var e=t.getRootNode();return at(e)&&En(e),(t=et(t))&&t.assignedSlot||null}var An={addEventListener:nn.bind(window),removeEventListener:rn.bind(window)},Un={addEventListener:nn,removeEventListener:rn,appendChild:function(t){return Ce(this,t)},insertBefore:function(t,e){return Ce(this,t,e)},removeChild:function(t){return Ae(this,t)},replaceChild:function(t,e){return Ce(this,t,e),Ae(this,e),t},cloneNode:function(t){if("template"==this.localName)var e=Wt.cloneNode.call(this,t);else if(e=Wt.cloneNode.call(this,!1),t&&e.nodeType!==Node.ATTRIBUTE_NODE){t=this.childNodes;for(var n,r=0;r<t.length;r++)n=t[r].cloneNode(!0),e.appendChild(n)}return e},getRootNode:function(){return Ie(this)},contains:function(t){return vt(this,t)},dispatchEvent:function(t){return wt(),Wt.dispatchEvent.call(this,t)}};Object.defineProperties(Un,{isConnected:{get:function(){if(_e&&_e.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1;var t=this.ownerDocument;if(gt){if(Wt.contains.call(t,this))return!0}else if(t.documentElement&&Wt.contains.call(t.documentElement,this))return!0;for(t=this;t&&!(t instanceof Document);)t=t.parentNode||(at(t)?t.host:void 0);return!!(t&&t instanceof Document)},configurable:!0}});var kn={get assignedSlot(){return Cn(this)}},On={querySelector:function(t){return Fe(this,(function(e){return ut.call(e,t)}),(function(t){return!!t}))[0]||null},querySelectorAll:function(t,e){if(e){e=Array.prototype.slice.call(Wt.querySelectorAll.call(this,t));var n=this.getRootNode();return e.filter((function(t){return t.getRootNode()==n}))}return Fe(this,(function(e){return ut.call(e,t)}))}},Bn={assignedNodes:function(t){if("slot"===this.localName){var e=this.getRootNode();return at(e)&&En(e),(e=et(this))&&(t&&t.flatten?e.N:e.assignedNodes)||[]}}},Dn=ht({setAttribute:function(t,e){je(this,t,e)},removeAttribute:function(t){Wt.removeAttribute.call(this,t),Be(this,t)},attachShadow:function(t){if(!this)throw"Must provide a host.";if(!t)throw"Not enough arguments.";return new vn(_n,this,t)},get slot(){return this.getAttribute("slot")},set slot(t){je(this,"slot",t)},get assignedSlot(){return Cn(this)}},On,Bn);Object.defineProperties(Dn,Ee);var In=ht({importNode:function(t,e){return Ve(t,e)},getElementById:function(t){return Fe(this,(function(e){return e.id==t}),(function(t){return!!t}))[0]||null}},On);Object.defineProperties(In,{_activeElement:be.activeElement});for(var Fn=HTMLElement.prototype.blur,Pn={blur:function(){var t=et(this);(t=(t=t&&t.root)&&t.activeElement)?t.blur():Fn.call(this)}},Mn={},jn=u(Object.getOwnPropertyNames(Document.prototype)),Vn=jn.next();!Vn.done;Mn={H:Mn.H},Vn=jn.next())Mn.H=Vn.value,"on"===Mn.H.substring(0,2)&&Object.defineProperty(Pn,Mn.H,{set:function(t){return function(e){var n=tt(this),r=t.H.substring(2);n.Z[t.H]&&this.removeEventListener(r,n.Z[t.H]),this.addEventListener(r,e,{}),n.Z[t.H]=e}}(Mn),get:function(t){return function(){var e=et(this);return e&&e.Z[t.H]}}(Mn),configurable:!0});var Gn={addEventListener:function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.la=this,this.host.addEventListener(t,e,n)},removeEventListener:function(t,e,n){"object"!=typeof n&&(n={capture:!!n}),n.la=this,this.host.removeEventListener(t,e,n)},getElementById:function(t){return Fe(this,(function(e){return e.id==t}),(function(t){return!!t}))[0]||null}};function Hn(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o.value?t[i]=o.value:Object.defineProperty(t,i,o)}}if(nt.oa){var Wn={inUse:nt.oa,patch:function(t){return Se(t),Ne(t),t},isShadyRoot:at,enqueue:xt,flush:wt,settings:nt,filterMutations:function(t,e){var n=e.getRootNode();return t.map((function(t){var e=n===t.target.getRootNode();if(e&&t.addedNodes){if((e=Array.from(t.addedNodes).filter((function(t){return n===t.getRootNode()}))).length)return t=Object.create(t),Object.defineProperty(t,"addedNodes",{value:e,configurable:!0}),t}else if(e)return t})).filter((function(t){return t}))},observeChildren:function(t,e){var n=tt(t);n.S||(n.S=new Nt),n.S.ca.add(e);var r=n.S;return{Ka:e,P:r,Ma:t,takeRecords:function(){return r.takeRecords()}}},unobserveChildren:function(t){var e=t&&t.P;e&&(e.ca.delete(t.Ka),e.ca.size||(tt(t.Ma).S=null))},nativeMethods:Wt,nativeTree:ue,deferConnectionCallbacks:nt.deferConnectionCallbacks};window.ShadyDOM=Wn,function(){if(window.Event=sn,window.CustomEvent=an,window.MouseEvent=cn,function(){for(var t in Ke)window.addEventListener(t,(function(t){t.__target||(on(t),tn(t))}),!0)}(),!He&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var t=function(){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.dispatchEvent(t)};Element.prototype.click?Element.prototype.click=t:HTMLElement.prototype.click&&(HTMLElement.prototype.click=t)}}();var Jn=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;Hn(vn.prototype,Gn),Hn(window.Node.prototype,Un),Hn(window.Window.prototype,An),Hn(window.Text.prototype,kn),Hn(window.DocumentFragment.prototype,On),Hn(window.Element.prototype,Dn),Hn(window.Document.prototype,In),window.HTMLSlotElement&&Hn(window.HTMLSlotElement.prototype,Bn),Hn(Jn.prototype,Pn),nt.K&&(we(window.Node.prototype),we(window.Text.prototype),we(window.DocumentFragment.prototype),we(window.Element.prototype),we(Jn.prototype),we(window.Document.prototype),window.HTMLSlotElement&&we(window.HTMLSlotElement.prototype)),function(){var t=vn.prototype;t.__proto__=DocumentFragment.prototype,xe(t,ge,!0),xe(t,ye,!0),xe(t,be,!0),Object.defineProperties(t,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}}),["localName","namespaceURI","prefix"].forEach((function(e){Object.defineProperty(t,e,{value:void 0,configurable:!0})})),["ownerDocument","baseURI","isConnected"].forEach((function(e){Object.defineProperty(t,e,{get:function(){return this.host[e]},configurable:!0})}))}(),window.ShadowRoot=vn}var zn=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function Zn(t){var e=zn.has(t);return t=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(t),!e&&t}function Xn(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function $n(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function Kn(t,e,n){n=void 0===n?new Set:n;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var i=r;e(i);var o=i.localName;if("link"===o&&"import"===i.getAttribute("rel")){if((r=i.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)Kn(r,e,n);r=$n(t,i);continue}if("template"===o){r=$n(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)Kn(i,e,n)}r=r.firstChild?r.firstChild:$n(t,r)}}function Yn(t,e,n){t[e]=n}function qn(){this.a=new Map,this.m=new Map,this.f=[],this.c=!1}function tr(t,e){t.c=!0,t.f.push(e)}function er(t,e){t.c&&Kn(e,(function(e){return t.b(e)}))}function nr(t,e){var n=[];for(Kn(e,(function(t){return n.push(t)})),e=0;e<n.length;e++){var r=n[e];1===r.__CE_state?t.connectedCallback(r):or(t,r)}}function rr(t,e){var n=[];for(Kn(e,(function(t){return n.push(t)})),e=0;e<n.length;e++){var r=n[e];1===r.__CE_state&&t.disconnectedCallback(r)}}function ir(t,e,n){var r=(n=void 0===n?{}:n).cb||new Set,i=n.ha||function(e){return or(t,e)},o=[];if(Kn(e,(function(e){if("link"===e.localName&&"import"===e.getAttribute("rel")){var n=e.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_hasRegistry=!0),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:e.addEventListener("load",(function(){var n=e.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var o=new Set(r);o.delete(n),ir(t,n,{cb:o,ha:i})}}))}else o.push(e)}),r),t.c)for(e=0;e<o.length;e++)t.b(o[e]);for(e=0;e<o.length;e++)i(o[e])}function or(t,e){if(void 0===e.__CE_state){var n=e.ownerDocument;if((n.defaultView||n.__CE_isImportDocument&&n.__CE_hasRegistry)&&(n=t.a.get(e.localName))){n.constructionStack.push(e);var r=n.constructor;try{try{if(new r!==e)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{n.constructionStack.pop()}}catch(t){throw e.__CE_state=2,t}if(e.__CE_state=1,e.__CE_definition=n,n.attributeChangedCallback)for(n=n.observedAttributes,r=0;r<n.length;r++){var i=n[r],o=e.getAttribute(i);null!==o&&t.attributeChangedCallback(e,i,null,o,null)}Xn(e)&&t.connectedCallback(e)}}}function sr(t){var e=document;this.b=t,this.a=e,this.P=void 0,ir(this.b,this.a),"loading"===this.a.readyState&&(this.P=new MutationObserver(this.c.bind(this)),this.P.observe(this.a,{childList:!0,subtree:!0}))}function ar(t){t.P&&t.P.disconnect()}function cr(){var t=this;this.a=this.A=void 0,this.b=new Promise((function(e){t.a=e,t.A&&e(t.A)}))}function lr(t){this.c=!1,this.a=t,this.G=new Map,this.f=function(t){return t()},this.b=!1,this.m=[],this.fa=new sr(t)}qn.prototype.b=function(t){if(this.c&&!t.__CE_patched){t.__CE_patched=!0;for(var e=0;e<this.f.length;e++)this.f[e](t)}},qn.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},qn.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},qn.prototype.attributeChangedCallback=function(t,e,n,r,i){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,r,i)},sr.prototype.c=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||ar(this),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)ir(this.b,n[r])},cr.prototype.resolve=function(t){if(this.A)throw Error("Already resolved.");this.A=t,this.a&&this.a(t)},(t=lr.prototype).define=function(t,e){var n=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!Zn(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(this.a.a.get(t))throw Error("A custom element with name '"+t+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var r=function(t){var e=i[t];if(void 0!==e&&!(e instanceof Function))throw Error("The '"+t+"' callback must be a function.");return e},i=e.prototype;if(!(i instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var o=r("connectedCallback"),s=r("disconnectedCallback"),a=r("adoptedCallback"),c=r("attributeChangedCallback"),l=e.observedAttributes||[]}catch(t){return}finally{this.c=!1}e={localName:t,constructor:e,connectedCallback:o,disconnectedCallback:s,adoptedCallback:a,attributeChangedCallback:c,observedAttributes:l,constructionStack:[]},function(t,e,n){t.a.set(e,n),t.m.set(n.constructor,n)}(this.a,t,e),this.m.push(e),this.b||(this.b=!0,this.f((function(){return function(t){if(!1!==t.b){t.b=!1;for(var e=t.m,n=[],r=new Map,i=0;i<e.length;i++)r.set(e[i].localName,[]);for(ir(t.a,document,{ha:function(e){if(void 0===e.__CE_state){var i=e.localName,o=r.get(i);o?o.push(e):t.a.a.get(i)&&n.push(e)}}}),i=0;i<n.length;i++)or(t.a,n[i]);for(;0<e.length;){var o=e.shift();i=o.localName,o=r.get(o.localName);for(var s=0;s<o.length;s++)or(t.a,o[s]);(i=t.G.get(i))&&i.resolve(void 0)}}}(n)})))},t.ha=function(t){ir(this.a,t)},t.get=function(t){if(t=this.a.a.get(t))return t.constructor},t.Da=function(t){if(!Zn(t))return Promise.reject(new SyntaxError("'"+t+"' is not a valid custom element name."));var e=this.G.get(t);return e||(e=new cr,this.G.set(t,e),this.a.a.get(t)&&!this.m.some((function(e){return e.localName===t}))&&e.resolve(void 0)),e.b},t.Za=function(t){ar(this.fa);var e=this.f;this.f=function(n){return t((function(){return e(n)}))}},window.CustomElementRegistry=lr,lr.prototype.define=lr.prototype.define,lr.prototype.upgrade=lr.prototype.ha,lr.prototype.get=lr.prototype.get,lr.prototype.whenDefined=lr.prototype.Da,lr.prototype.polyfillWrapFlushCallback=lr.prototype.Za;var ur=window.Document.prototype.createElement,pr=window.Document.prototype.createElementNS,hr=window.Document.prototype.importNode,dr=window.Document.prototype.prepend,fr=window.Document.prototype.append,_r=window.DocumentFragment.prototype.prepend,mr=window.DocumentFragment.prototype.append,gr=window.Node.prototype.cloneNode,vr=window.Node.prototype.appendChild,yr=window.Node.prototype.insertBefore,Er=window.Node.prototype.removeChild,br=window.Node.prototype.replaceChild,xr=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),wr=window.Element.prototype.attachShadow,Nr=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Sr=window.Element.prototype.getAttribute,Lr=window.Element.prototype.setAttribute,Qr=window.Element.prototype.removeAttribute,Tr=window.Element.prototype.getAttributeNS,Rr=window.Element.prototype.setAttributeNS,Cr=window.Element.prototype.removeAttributeNS,Ar=window.Element.prototype.insertAdjacentElement,Ur=window.Element.prototype.insertAdjacentHTML,kr=window.Element.prototype.prepend,Or=window.Element.prototype.append,Br=window.Element.prototype.before,Dr=window.Element.prototype.after,Ir=window.Element.prototype.replaceWith,Fr=window.Element.prototype.remove,Pr=window.HTMLElement,Mr=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),jr=window.HTMLElement.prototype.insertAdjacentElement,Vr=window.HTMLElement.prototype.insertAdjacentHTML,Gr=new function(){};function Hr(t,e,n){function r(e){return function(n){for(var r=[],i=0;i<arguments.length;++i)r[i]=arguments[i];i=[];for(var o=[],s=0;s<r.length;s++){var a=r[s];if(a instanceof Element&&Xn(a)&&o.push(a),a instanceof DocumentFragment)for(a=a.firstChild;a;a=a.nextSibling)i.push(a);else i.push(a)}for(e.apply(this,r),r=0;r<o.length;r++)rr(t,o[r]);if(Xn(this))for(r=0;r<i.length;r++)(o=i[r])instanceof Element&&nr(t,o)}}void 0!==n.ga&&(e.prepend=r(n.ga)),void 0!==n.append&&(e.append=r(n.append))}var Wr=window.customElements;if(!Wr||Wr.forcePolyfill||"function"!=typeof Wr.define||"function"!=typeof Wr.get){var Jr=new qn;!function(){var t=Jr;window.HTMLElement=function(){function e(){var e=this.constructor,n=t.m.get(e);if(!n)throw Error("The custom element being constructed was not registered with `customElements`.");var r=n.constructionStack;if(0===r.length)return r=ur.call(document,n.localName),Object.setPrototypeOf(r,e.prototype),r.__CE_state=1,r.__CE_definition=n,t.b(r),r;var i=r[n=r.length-1];if(i===Gr)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return r[n]=Gr,Object.setPrototypeOf(i,e.prototype),t.b(i),i}return e.prototype=Pr.prototype,Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}()}(),function(){var t=Jr;Yn(Document.prototype,"createElement",(function(e){if(this.__CE_hasRegistry){var n=t.a.get(e);if(n)return new n.constructor}return e=ur.call(this,e),t.b(e),e})),Yn(Document.prototype,"importNode",(function(e,n){return e=hr.call(this,e,n),this.__CE_hasRegistry?ir(t,e):er(t,e),e})),Yn(Document.prototype,"createElementNS",(function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.a.get(n);if(r)return new r.constructor}return e=pr.call(this,e,n),t.b(e),e})),Hr(t,Document.prototype,{ga:dr,append:fr})}(),Hr(Jr,DocumentFragment.prototype,{ga:_r,append:mr}),function(){function t(t,n){Object.defineProperty(t,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,t);else{var r=void 0;if(this.firstChild){var i=this.childNodes,o=i.length;if(0<o&&Xn(this)){r=Array(o);for(var s=0;s<o;s++)r[s]=i[s]}}if(n.set.call(this,t),r)for(t=0;t<r.length;t++)rr(e,r[t])}}})}var e=Jr;Yn(Node.prototype,"insertBefore",(function(t,n){if(t instanceof DocumentFragment){var r=Array.prototype.slice.apply(t.childNodes);if(t=yr.call(this,t,n),Xn(this))for(n=0;n<r.length;n++)nr(e,r[n]);return t}return r=Xn(t),n=yr.call(this,t,n),r&&rr(e,t),Xn(this)&&nr(e,t),n})),Yn(Node.prototype,"appendChild",(function(t){if(t instanceof DocumentFragment){var n=Array.prototype.slice.apply(t.childNodes);if(t=vr.call(this,t),Xn(this))for(var r=0;r<n.length;r++)nr(e,n[r]);return t}return n=Xn(t),r=vr.call(this,t),n&&rr(e,t),Xn(this)&&nr(e,t),r})),Yn(Node.prototype,"cloneNode",(function(t){return t=gr.call(this,t),this.ownerDocument.__CE_hasRegistry?ir(e,t):er(e,t),t})),Yn(Node.prototype,"removeChild",(function(t){var n=Xn(t),r=Er.call(this,t);return n&&rr(e,t),r})),Yn(Node.prototype,"replaceChild",(function(t,n){if(t instanceof DocumentFragment){var r=Array.prototype.slice.apply(t.childNodes);if(t=br.call(this,t,n),Xn(this))for(rr(e,n),n=0;n<r.length;n++)nr(e,r[n]);return t}r=Xn(t);var i=br.call(this,t,n),o=Xn(this);return o&&rr(e,n),r&&rr(e,t),o&&nr(e,t),i})),xr&&xr.get?t(Node.prototype,xr):tr(e,(function(e){t(e,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)Er.call(this,this.firstChild);vr.call(this,document.createTextNode(t))}})}))}(),function(){function t(t,e){Object.defineProperty(t,"innerHTML",{enumerable:e.enumerable,configurable:!0,get:e.get,set:function(t){var n=this,i=void 0;if(Xn(this)&&(i=[],Kn(this,(function(t){t!==n&&i.push(t)}))),e.set.call(this,t),i)for(var o=0;o<i.length;o++){var s=i[o];1===s.__CE_state&&r.disconnectedCallback(s)}return this.ownerDocument.__CE_hasRegistry?ir(r,this):er(r,this),t}})}function e(t,e){Yn(t,"insertAdjacentElement",(function(t,n){var i=Xn(n);return t=e.call(this,t,n),i&&rr(r,n),Xn(t)&&nr(r,n),t}))}function n(t,e){function n(t,e){for(var n=[];t!==e;t=t.nextSibling)n.push(t);for(e=0;e<n.length;e++)ir(r,n[e])}Yn(t,"insertAdjacentHTML",(function(t,r){if("beforebegin"===(t=t.toLowerCase())){var i=this.previousSibling;e.call(this,t,r),n(i||this.parentNode.firstChild,this)}else if("afterbegin"===t)i=this.firstChild,e.call(this,t,r),n(this.firstChild,i);else if("beforeend"===t)i=this.lastChild,e.call(this,t,r),n(i||this.firstChild,null);else{if("afterend"!==t)throw new SyntaxError("The value provided ("+String(t)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");i=this.nextSibling,e.call(this,t,r),n(this.nextSibling,i)}}))}var r=Jr;wr&&Yn(Element.prototype,"attachShadow",(function(t){return this.__CE_shadowRoot=wr.call(this,t)})),Nr&&Nr.get?t(Element.prototype,Nr):Mr&&Mr.get?t(HTMLElement.prototype,Mr):tr(r,(function(e){t(e,{enumerable:!0,configurable:!0,get:function(){return gr.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName,n=e?this.content:this,r=pr.call(document,this.namespaceURI,this.localName);for(r.innerHTML=t;0<n.childNodes.length;)Er.call(n,n.childNodes[0]);for(t=e?r.content:r;0<t.childNodes.length;)vr.call(n,t.childNodes[0])}})})),Yn(Element.prototype,"setAttribute",(function(t,e){if(1!==this.__CE_state)return Lr.call(this,t,e);var n=Sr.call(this,t);Lr.call(this,t,e),e=Sr.call(this,t),r.attributeChangedCallback(this,t,n,e,null)})),Yn(Element.prototype,"setAttributeNS",(function(t,e,n){if(1!==this.__CE_state)return Rr.call(this,t,e,n);var i=Tr.call(this,t,e);Rr.call(this,t,e,n),n=Tr.call(this,t,e),r.attributeChangedCallback(this,e,i,n,t)})),Yn(Element.prototype,"removeAttribute",(function(t){if(1!==this.__CE_state)return Qr.call(this,t);var e=Sr.call(this,t);Qr.call(this,t),null!==e&&r.attributeChangedCallback(this,t,e,null,null)})),Yn(Element.prototype,"removeAttributeNS",(function(t,e){if(1!==this.__CE_state)return Cr.call(this,t,e);var n=Tr.call(this,t,e);Cr.call(this,t,e);var i=Tr.call(this,t,e);n!==i&&r.attributeChangedCallback(this,e,n,i,t)})),jr?e(HTMLElement.prototype,jr):Ar?e(Element.prototype,Ar):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),Vr?n(HTMLElement.prototype,Vr):Ur?n(Element.prototype,Ur):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."),Hr(r,Element.prototype,{ga:kr,append:Or}),function(t){function e(e){return function(n){for(var r=[],i=0;i<arguments.length;++i)r[i]=arguments[i];i=[];for(var o=[],s=0;s<r.length;s++){var a=r[s];if(a instanceof Element&&Xn(a)&&o.push(a),a instanceof DocumentFragment)for(a=a.firstChild;a;a=a.nextSibling)i.push(a);else i.push(a)}for(e.apply(this,r),r=0;r<o.length;r++)rr(t,o[r]);if(Xn(this))for(r=0;r<i.length;r++)(o=i[r])instanceof Element&&nr(t,o)}}var n=Element.prototype;void 0!==Br&&(n.before=e(Br)),void 0!==Br&&(n.after=e(Dr)),void 0!==Ir&&Yn(n,"replaceWith",(function(e){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];r=[];for(var i=[],o=0;o<n.length;o++){var s=n[o];if(s instanceof Element&&Xn(s)&&i.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)r.push(s);else r.push(s)}for(o=Xn(this),Ir.apply(this,n),n=0;n<i.length;n++)rr(t,i[n]);if(o)for(rr(t,this),n=0;n<r.length;n++)(i=r[n])instanceof Element&&nr(t,i)})),void 0!==Fr&&Yn(n,"remove",(function(){var e=Xn(this);Fr.call(this),e&&rr(t,this)}))}(r)}(),document.__CE_hasRegistry=!0;var zr=new lr(Jr);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:zr})}function Zr(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function Xr(t){var e=$r,n=t=t.replace(ri,"").replace(ii,""),r=new Zr;r.start=0,r.end=n.length;for(var i=r,o=0,s=n.length;o<s;o++)if("{"===n[o]){i.rules||(i.rules=[]);var a=i,c=a.rules[a.rules.length-1]||null;(i=new Zr).start=o+1,i.parent=a,i.previous=c,a.rules.push(i)}else"}"===n[o]&&(i.end=o+1,i=i.parent||r);return e(r,t)}function $r(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent&&(n=(n=(n=function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,(function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\"+t}))}(n=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1))).replace(ui," ")).substring(n.lastIndexOf(";")+1),n=t.parsedSelector=t.selector=n.trim(),t.atRule=0===n.indexOf("@"),t.atRule?0===n.indexOf("@media")?t.type=ei:n.match(li)&&(t.type=ti,t.keyframesName=t.selector.split(ui).pop()):t.type=0===n.indexOf("--")?ni:qr),n=t.rules)for(var r,i=0,o=n.length;i<o&&(r=n[i]);i++)$r(r,e);return t}function Kr(t,e,n){n=void 0===n?"":n;var r="";if(t.cssText||t.rules){var i,o=t.rules;if((i=o)&&(i=!((i=o[0])&&i.selector&&0===i.selector.indexOf("--"))),i){i=0;for(var s,a=o.length;i<a&&(s=o[i]);i++)r=Kr(s,e,r)}else(r=(e=e?t.cssText:(e=(e=t.cssText).replace(oi,"").replace(si,"")).replace(ai,"").replace(ci,"")).trim())&&(r=" "+r+"\n")}return r&&(t.selector&&(n+=t.selector+" {\n"),n+=r,t.selector&&(n+="}\n\n")),n}var Yr,qr=1,ti=7,ei=4,ni=1e3,ri=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ii=/@import[^;]*;/gim,oi=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,si=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,ai=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,ci=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,li=/^@[^\s]*keyframes/,ui=/\s+/g,pi=!(window.ShadyDOM&&window.ShadyDOM.inUse);function hi(t){Yr=(!t||!t.shimcssproperties)&&(pi||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Yr=window.ShadyCSS.nativeCss:window.ShadyCSS?(hi(window.ShadyCSS),window.ShadyCSS=void 0):hi(window.WebComponents&&window.WebComponents.flags);var di=Yr,fi=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,_i=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,mi=/(--[\w-]+)\s*([:,;)]|$)/gi,gi=/(animation\s*:)|(animation-name\s*:)/,vi=/@media\s(.*)/,yi=/\{[^}]*\}/g,Ei=new Set;function bi(t,e){return t?("string"==typeof t&&(t=Xr(t)),e&&Ni(t,e),Kr(t,di)):""}function xi(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=Xr(t.textContent)),t.__cssRules||null}function wi(t){return!!t.parent&&t.parent.type===ti}function Ni(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===ei){var s=t.selector.match(vi);s&&(window.matchMedia(s[1]).matches||(i=!0))}if(o===qr?e(t):n&&o===ti?n(t):o===ni&&(i=!0),(t=t.rules)&&!i){i=0,o=t.length;for(var a;i<o&&(a=t[i]);i++)Ni(a,e,n,r)}}}function Si(t,e,n,r){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,Ti(i,n,r),i}var Li=null;function Qi(t){t=document.createComment(" Shady DOM styles for "+t+" ");var e=document.head;return e.insertBefore(t,(Li?Li.nextSibling:null)||e.firstChild),Li=t}function Ti(t,e,n){(e=e||document.head).insertBefore(t,n&&n.nextSibling||e.firstChild),Li?t.compareDocumentPosition(Li)===Node.DOCUMENT_POSITION_PRECEDING&&(Li=t):Li=t}function Ri(t,e){for(var n=0,r=t.length;e<r;e++)if("("===t[e])n++;else if(")"===t[e]&&0==--n)return e;return-1}function Ci(t,e){var n=t.indexOf("var(");if(-1===n)return e(t,"","","");var r=Ri(t,n+3),i=t.substring(n+4,r);return n=t.substring(0,n),t=Ci(t.substring(r+1),e),-1===(r=i.indexOf(","))?e(n,i.trim(),"",t):e(n,i.substring(0,r).trim(),i.substring(r+1).trim(),t)}function Ai(t,e){pi?t.setAttribute("class",e):window.ShadyDOM.nativeMethods.setAttribute.call(t,"class",e)}function Ui(t){var e=t.localName,n="";return e?-1<e.indexOf("-")||(n=e,e=t.getAttribute&&t.getAttribute("is")||""):(e=t.is,n=t.extends),{is:e,X:n}}function ki(t){for(var e=[],n="",r=0;0<=r&&r<t.length;r++)if("("===t[r]){var i=Ri(t,r);n+=t.slice(r,i+1),r=i}else","===t[r]?(e.push(n),n=""):n+=t[r];return n&&e.push(n),e}function Oi(){}function Bi(t,e,n){if(e.nodeType===Node.ELEMENT_NODE&&n(e),e="template"===e.localName?(e.content||e.kb||e).childNodes:e.children||e.childNodes)for(var r=0;r<e.length;r++)Bi(t,e[r],n)}function Di(t,e,n){if(e)if(t.classList)n?(t.classList.remove("style-scope"),t.classList.remove(e)):(t.classList.add("style-scope"),t.classList.add(e));else if(t.getAttribute){var r=t.getAttribute(oo);n?r&&Ai(t,e=r.replace("style-scope","").replace(e,"")):Ai(t,(r?r+" ":"")+"style-scope "+e)}}function Ii(t,e,n){var r=co;t.__styleScoped?t.__styleScoped=null:Bi(r,t,(function(t){Di(t,e,!0),Di(t,n)}))}function Fi(t,e){var n=co;t.__styleScoped?t.__styleScoped=null:Bi(n,t,(function(t){Di(t,e||"",!0)}))}function Pi(t,e,n){var r=co,i=t.__cssBuild;return(e=pi||"shady"===i?bi(e,n):function(t,e,n,r,i){var o=Mi(n,r);return n=n?ro+n:"",bi(e,(function(e){e.c||(e.selector=e.F=ji(t,e,t.b,n,o),e.c=!0),i&&i(e,n,o)}))}(r,e,(t=Ui(t)).is,t.X,n)+"\n\n").trim()}function Mi(t,e){return e?"[is="+t+"]":t}function ji(t,e,n,r,i){var o=ki(e.selector);if(!wi(e)){e=0;for(var s,a=o.length;e<a&&(s=o[e]);e++)o[e]=n.call(t,s,r,i)}return o.filter((function(t){return!!t})).join(zi)}function Vi(t){return t.replace(Wi,(function(t,e,n){return-1<n.indexOf("+")?n=n.replace(/\+/g,"___"):-1<n.indexOf("___")&&(n=n.replace(/___/g,"+")),":"+e+"("+n+")"}))}function Gi(t,e){return(t=t.split(io))[0]+=e,t.join(io)}function Hi(t){t.selector===Ki&&(t.selector="html")}Oi.prototype.b=function(t,e,n){var r=!1;t=t.trim();var i=Wi.test(t);i&&(t=Vi(t=t.replace(Wi,(function(t,e,n){return":"+e+"("+n.replace(/\s/g,"")+")"}))));var o=ao.test(t);if(o){var s=function(t){for(var e,n=[];e=t.match(ao);){var r=e.index,i=Ri(t,r);if(-1===i)throw Error(e.input+" selector missing ')'");e=t.slice(r,i+1),t=t.replace(e,""),n.push(e)}return{ra:t,matches:n}}(t);t=s.ra,s=s.matches}return t=(t=t.replace(qi,$i+" $1")).replace(Zi,(function(t,i,o){return r||(t=function(t,e,n,r){var i=t.indexOf(Yi);if(0<=t.indexOf($i)?t=function(t,e){var n=t.match(to);return(n=n&&n[2].trim()||"")?n[0].match(Xi)?t.replace(to,(function(t,n,r){return e+r})):n.split(Xi)[0]===e?n:so:t.replace($i,e)}(t,r):0!==i&&(t=n?Gi(t,n):t),n=!1,0<=i&&(e="",n=!0),n){var o=!0;n&&(t=t.replace(eo,(function(t,e){return" > "+e})))}return{value:t=t.replace(no,(function(t,e,n){return'[dir="'+n+'"] '+e+", "+e+'[dir="'+n+'"]'})),Qa:e,stop:o}}(o,i,e,n),r=r||t.stop,i=t.Qa,o=t.value),i+o})),o&&(t=function(t,e){var n=t.split("");return e.reduce((function(t,e,r){return t+e+n[r+1]}),n[0])}(t,s)),i&&(t=Vi(t)),t},Oi.prototype.c=function(t){return t.match($i)?"":t.match(Yi)?this.b(t,Ji):Gi(t.trim(),Ji)},r.Object.defineProperties(Oi.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Wi=/:(nth[-\w]+)\(([^)]+)\)/,Ji=":not(.style-scope)",zi=",",Zi=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Xi=/[[.:#*]/,$i=":host",Ki=":root",Yi="::slotted",qi=new RegExp("^("+Yi+")"),to=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,eo=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,no=/(.*):dir\((?:(ltr|rtl))\)/,ro=".",io=":",oo="class",so="should_not_match",ao=/:(?:matches|any|-(?:webkit|moz)-any)/,co=new Oi;function lo(t,e,n,r){this.M=t||null,this.b=e||null,this.pa=n||[],this.T=null,this.X=r||"",this.a=this.I=this.O=null}function uo(t){return t?t.__styleInfo:null}function po(t,e){return t.__styleInfo=e}function ho(t){var e=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return e&&e.call(this,t)}lo.prototype.c=function(){return this.M},lo.prototype._getStyleRules=lo.prototype.c;var fo=navigator.userAgent.match("Trident");function _o(){}function mo(t){if(!t.B){var e={},n={};go(t,n)&&(e.L=n,t.rules=null),e.cssText=t.parsedCssText.replace(yi,"").replace(fi,""),t.B=e}}function go(t,e){var n=t.B;if(!n){n=t.parsedCssText;for(var r;t=fi.exec(n);)"inherit"===(r=(t[2]||t[3]).trim())&&"unset"===r||(e[t[1].trim()]=r),r=!0;return r}if(n.L)return Object.assign(e,n.L),!0}function vo(t,e,n){return e&&(e=0<=e.indexOf(";")?yo(t,e,n):Ci(e,(function(e,r,i,o){return r?((r=vo(t,n[r],n))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=vo(t,n[i]||i,n)||i,e+(r||"")+o):e+o}))),e&&e.trim()||""}function yo(t,e,n){e=e.split(";");for(var r,i,o=0;o<e.length;o++)if(r=e[o]){if(_i.lastIndex=0,i=_i.exec(r))r=vo(t,n[i[1]],n);else if(-1!==(i=r.indexOf(":"))){var s=r.substring(i);s=vo(t,s=s.trim(),n)||s,r=r.substring(0,i)+s}e[o]=r&&r.lastIndexOf(";")===r.length-1?r.slice(0,-1):r||""}return e.join(";")}function Eo(t){return function(e){return e.replace(t.f,t.a)}}function bo(t,e){var n=xo,r=xi(t);t.textContent=bi(r,(function(t){var r=t.cssText=t.parsedCssText;t.B&&t.B.cssText&&(r=r.replace(oi,"").replace(si,""),t.cssText=yo(n,r,e))}))}r.Object.defineProperties(_o.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var xo=new _o,wo={},No=window.customElements;if(No&&!pi){var So=No.define;No.define=function(t,e,n){wo[t]||(wo[t]=Qi(t)),So.call(No,t,e,n)}}function Lo(){this.cache={}}function Qo(){}function To(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var i=n.addedNodes[r];if(i.nodeType===Node.ELEMENT_NODE){var o=i.getRootNode(),s=i,a=[];if(s.classList?a=Array.from(s.classList):s instanceof window.SVGElement&&s.hasAttribute("class")&&(a=s.getAttribute("class").split(/\s+/)),a=(s=a).indexOf(co.a),(s=-1<a?s[a+1]:"")&&o===i.ownerDocument)Fi(i,s);else if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(o=o.host))for((o=Ui(o).is)!==s&&Ii(i,s,o),i=window.ShadyDOM.nativeMethods.querySelectorAll.call(i,":not(."+co.a+")"),o=0;o<i.length;o++)(a=(s=i[o]).getRootNode().host)&&Di(s,a=Ui(a).is)}}}}if(Lo.prototype.store=function(t,e,n,r){var i=this.cache[t]||[];i.push({L:e,styleElement:n,I:r}),100<i.length&&i.shift(),this.cache[t]=i},Lo.prototype.fetch=function(t,e,n){if(t=this.cache[t])for(var r=t.length-1;0<=r;r--){var i,o=t[r];t:{for(i=0;i<n.length;i++){var s=n[i];if(o.L[s]!==e[s]){i=!1;break t}}i=!0}if(i)return o}},!pi){var Ro=new MutationObserver(To),Co=function(t){Ro.observe(t,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)Co(document);else{var Ao=function(){Co(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Ao):requestAnimationFrame((function(){if("loading"===document.readyState){var t=function(){Ao(),document.removeEventListener("readystatechange",t)};document.addEventListener("readystatechange",t)}else Ao()}))}Qo=function(){To(Ro.takeRecords())}}var Uo=Qo,ko={},Oo=Promise.resolve();function Bo(t){(t=ko[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function Do(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}var Io=new Lo;function Fo(){this.G={},this.c=document.documentElement;var t=new Zr;t.rules=[],this.f=po(this.c,new lo(t)),this.m=!1,this.b=this.a=null}function Po(t){!t.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(t.a=window.ShadyCSS.ApplyShim,t.a.invalidCallback=Bo),function(t){!t.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(t.b=window.ShadyCSS.CustomStyleInterface,t.b.transformCallback=function(e){t.Ba(e)},t.b.validateCallback=function(){requestAnimationFrame((function(){(t.b.enqueued||t.m)&&t.flushCustomStyles()}))})}(t)}function Mo(t,e){return(e=e.getRootNode().host)?uo(e)?e:Mo(t,e):t.c}function jo(t,e,n){var r=uo(t=Mo(t,e));t=Object.create(r.O||null);var i=function(t,e){var n={},r={},i=e&&e.__cssBuild;return Ni(e,(function(e){!function(t,e,n,r){if(e.B||mo(e),e.B.L){var i=Ui(t);t=i.is,i=i.X,i=t?Mi(t,i):"html";var o=e.parsedSelector,s=":host > *"===o||"html"===o,a=0===o.indexOf(":host")&&!s;"shady"===n&&(a=!(s=o===i+" > *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),"shadow"===n&&(s=":host > *"===o||"html"===o,a=a&&!s),(s||a)&&(n=i,a&&(e.F||(e.F=ji(co,e,co.b,t?ro+t:"",i)),n=e.F||i),r({ra:n,Wa:a,xb:s}))}}(t,e,i,(function(i){ho.call(t.lb||t,i.ra)&&(i.Wa?go(e,n):go(e,r))}))}),null,!0),{$a:r,Ua:n}}(e,n.M);for(var o in e=function(t,e){var n={},r=[];return Ni(t,(function(t){t.B||mo(t);var i=t.F||t.parsedSelector;e&&t.B.L&&i&&ho.call(e,i)&&(go(t,n),t=t.index,i=parseInt(t/32,10),r[i]=(r[i]||0)|1<<t%32)}),null,!0),{L:n,key:r}}(r.M,e).L,Object.assign(t,i.Ua,e,i.$a),e=n.T)((i=e[o])||0===i)&&(t[o]=i);for(o=xo,e=Object.getOwnPropertyNames(t),i=0;i<e.length;i++)t[r=e[i]]=vo(o,t[r],t);n.O=t}(t=Fo.prototype).flush=function(){Uo()},t.Sa=function(t){return xi(t)},t.bb=function(t){return bi(t)},t.prepareTemplate=function(t,e,n){this.prepareTemplateDom(t,e),this.prepareTemplateStyles(t,e,n)},t.prepareTemplateStyles=function(t,e,n){if(!t.m){pi||wo[e]||(wo[e]=Qi(e)),t.m=!0,t.name=e,t.extends=n,ko[e]=t;for(var r=(r=t.content.querySelector("style"))&&r.getAttribute("css-build")||"",i=[],o=t.content.querySelectorAll("style"),s=0;s<o.length;s++){var a=o[s];if(a.hasAttribute("shady-unscoped")){if(!pi){var c=a.textContent;Ei.has(c)||(Ei.add(c),c=a.cloneNode(!0),document.head.appendChild(c)),a.parentNode.removeChild(a)}}else i.push(a.textContent),a.parentNode.removeChild(a)}i=i.join("").trim(),n={is:e,extends:n,ib:r},Po(this),o=_i.test(i)||fi.test(i),_i.lastIndex=0,fi.lastIndex=0,i=Xr(i),o&&di&&this.a&&this.a.transformRules(i,e),t._styleAst=i,t.G=r,r=[],di||(r=function(t){var e={},n=[],r=0;for(var i in Ni(t,(function(t){mo(t),t.index=r++,t=t.B.cssText;for(var n;n=mi.exec(t);){var i=n[1];":"!==n[2]&&(e[i]=!0)}}),(function(t){n.push(t)})),t.b=n,t=[],e)t.push(i);return t}(t._styleAst)),r.length&&!di||(i=pi?t.content:null,e=wo[e]||null,e=(o=Pi(n,t._styleAst)).length?Si(o,n.is,i,e):void 0,t.a=e),t.f=r}},t.prepareTemplateDom=function(t,e){pi||t.c||(t.c=!0,function(t,e){var n=co;t.__styleScoped?t.__styleScoped=null:Bi(n,t,(function(t){Di(t,e||"")}))}(t.content,e))},t.flushCustomStyles=function(){if(Po(this),this.b){var t=this.b.processStyles();if(this.b.enqueued){if(di)for(var e=0;e<t.length;e++){var n=this.b.getStyleForCustomStyle(t[e]);if(n&&di&&this.a){var r=xi(n);Po(this),this.a.transformRules(r),n.textContent=bi(r)}}else for(jo(this,this.c,this.f),e=0;e<t.length;e++)(n=this.b.getStyleForCustomStyle(t[e]))&&bo(n,this.f.O);this.b.enqueued=!1,this.m&&!di&&this.styleDocument()}}},t.styleElement=function(t,e){var n=Ui(t).is,r=uo(t);if(!r){var i=Ui(t);r=i.is,i=i.X;var o=wo[r]||null;if(r=ko[r])var s=r._styleAst,a=r.f;s=new lo(s,o,a,i),r&&po(t,s),r=s}if(t!==this.c&&(this.m=!0),e&&(r.T=r.T||{},Object.assign(r.T,e)),di){if(r.T)for(var c in e=r.T)null===c?t.style.removeProperty(c):t.style.setProperty(c,e[c]);((c=ko[n])||t===this.c)&&c&&c.a&&!Do(c)&&((Do(c)||c._applyShimValidatingVersion!==c._applyShimNextVersion)&&(Po(this),this.a&&this.a.transformRules(c._styleAst,n),c.a.textContent=Pi(t,r.M),function(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.b||(t.b=!0,Oo.then((function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.b=!1})))}(c)),pi&&(n=t.shadowRoot)&&(n.querySelector("style").textContent=Pi(t,r.M)),r.M=c._styleAst)}else if(this.flush(),jo(this,t,r),r.pa&&r.pa.length){n=r,c=Ui(t).is,r=(e=Io.fetch(c,n.O,n.pa))?e.styleElement:null,s=n.I,(a=e&&e.I)||(a=c+"-"+(a=this.G[c]=(this.G[c]||0)+1)),n.I=a,a=n.I,i=xo,i=r?r.textContent||"":function(t,e,n,r){var i=Ui(e),o=Mi(i.is,i.X),s=new RegExp("(?:^|[^.#[:])"+(e.extends?"\\"+o.slice(0,-1)+"\\]":o)+"($|[.:[\\s>+~])"),a=function(t,e){t=t.b;var n={};if(!pi&&t)for(var r=0,i=t[r];r<t.length;i=t[++r]){var o=i,s=e;o.f=new RegExp("\\b"+o.keyframesName+"(?!\\B|-)","g"),o.a=o.keyframesName+"-"+s,o.F=o.F||o.selector,o.selector=o.F.replace(o.keyframesName,o.a),n[i.keyframesName]=Eo(i)}return n}(i=uo(e).M,r);return Pi(e,i,(function(e){var i="";if(e.B||mo(e),e.B.cssText&&(i=yo(t,e.B.cssText,n)),e.cssText=i,!pi&&!wi(e)&&e.cssText){var c=i=e.cssText;if(null==e.ya&&(e.ya=gi.test(i)),e.ya)if(null==e.ea)for(var l in e.ea=[],a)i!==(c=(c=a[l])(i))&&(i=c,e.ea.push(l));else{for(l=0;l<e.ea.length;++l)i=(c=a[e.ea[l]])(i);c=i}e.cssText=c,e.F=e.F||e.selector,i="."+r,c=0;for(var u,p=(l=ki(e.F)).length;c<p&&(u=l[c]);c++)l[c]=u.match(s)?u.replace(o,i):i+" "+u;e.selector=l.join(",")}}))}(i,t,n.O,a);var l=(o=uo(t)).a;l&&!pi&&l!==r&&(l._useCount--,0>=l._useCount&&l.parentNode&&l.parentNode.removeChild(l)),pi?o.a?(o.a.textContent=i,r=o.a):i&&(r=Si(i,a,t.shadowRoot,o.b)):r?r.parentNode||(fo&&-1<i.indexOf("@media")&&(r.textContent=i),Ti(r,null,o.b)):i&&(r=Si(i,a,null,o.b)),r&&(r._useCount=r._useCount||0,o.a!=r&&r._useCount++,o.a=r),a=r,pi||(r=n.I,o=i=t.getAttribute("class")||"",s&&(o=i.replace(new RegExp("\\s*x-scope\\s*"+s+"\\s*","g")," ")),i!==(o+=(o?" ":"")+"x-scope "+r)&&Ai(t,o)),e||Io.store(c,n.O,a,n.I)}},t.styleDocument=function(t){this.styleSubtree(this.c,t)},t.styleSubtree=function(t,e){var n=t.shadowRoot;if((n||t===this.c)&&this.styleElement(t,e),e=n&&(n.children||n.childNodes))for(t=0;t<e.length;t++)this.styleSubtree(e[t]);else if(t=t.children||t.childNodes)for(e=0;e<t.length;e++)this.styleSubtree(t[e])},t.Ba=function(t){var e=this,n=xi(t);Ni(n,(function(t){if(pi)Hi(t);else{var n=co;t.selector=t.parsedSelector,Hi(t),t.selector=t.F=ji(n,t,n.c,void 0,void 0)}di&&(Po(e),e.a&&e.a.transformRule(t))})),di?t.textContent=bi(n):this.f.M.rules.push(n)},t.getComputedStyleValue=function(t,e){var n;return di||(n=(uo(t)||uo(Mo(this,t))).O[e]),(n=n||window.getComputedStyle(t).getPropertyValue(e))?n.trim():""},t.ab=function(t,e){var n=t.getRootNode();if(e=e?e.split(/\s/):[],!(n=n.host&&n.host.localName)){var r=t.getAttribute("class");if(r){r=r.split(/\s/);for(var i=0;i<r.length;i++)if(r[i]===co.a){n=r[i+1];break}}}n&&e.push(co.a,n),di||(n=uo(t))&&n.I&&e.push(xo.a,n.I),Ai(t,e.join(" "))},t.Na=function(t){return uo(t)},Fo.prototype.flush=Fo.prototype.flush,Fo.prototype.prepareTemplate=Fo.prototype.prepareTemplate,Fo.prototype.styleElement=Fo.prototype.styleElement,Fo.prototype.styleDocument=Fo.prototype.styleDocument,Fo.prototype.styleSubtree=Fo.prototype.styleSubtree,Fo.prototype.getComputedStyleValue=Fo.prototype.getComputedStyleValue,Fo.prototype.setElementClass=Fo.prototype.ab,Fo.prototype._styleInfoForNode=Fo.prototype.Na,Fo.prototype.transformCustomStyleForDocument=Fo.prototype.Ba,Fo.prototype.getStyleAst=Fo.prototype.Sa,Fo.prototype.styleAstToString=Fo.prototype.bb,Fo.prototype.flushCustomStyles=Fo.prototype.flushCustomStyles,Object.defineProperties(Fo.prototype,{nativeShadow:{get:function(){return pi}},nativeCss:{get:function(){return di}}});var Vo,Go,Ho=new Fo;window.ShadyCSS&&(Vo=window.ShadyCSS.ApplyShim,Go=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:Ho,prepareTemplate:function(t,e,n){Ho.flushCustomStyles(),Ho.prepareTemplate(t,e,n)},prepareTemplateDom:function(t,e){Ho.prepareTemplateDom(t,e)},prepareTemplateStyles:function(t,e,n){Ho.flushCustomStyles(),Ho.prepareTemplateStyles(t,e,n)},styleSubtree:function(t,e){Ho.flushCustomStyles(),Ho.styleSubtree(t,e)},styleElement:function(t){Ho.flushCustomStyles(),Ho.styleElement(t)},styleDocument:function(t){Ho.flushCustomStyles(),Ho.styleDocument(t)},flushCustomStyles:function(){Ho.flushCustomStyles()},getComputedStyleValue:function(t,e){return Ho.getComputedStyleValue(t,e)},nativeCss:di,nativeShadow:pi},Vo&&(window.ShadyCSS.ApplyShim=Vo),Go&&(window.ShadyCSS.CustomStyleInterface=Go),function(t){function e(t){return""==t&&(o.call(this),this.i=!0),t.toLowerCase()}function n(t){var e=t.charCodeAt(0);return 32<e&&127>e&&-1==[34,35,60,62,63,96].indexOf(e)?t:encodeURIComponent(t)}function r(t){var e=t.charCodeAt(0);return 32<e&&127>e&&-1==[34,35,60,62,96].indexOf(e)?t:encodeURIComponent(t)}function i(t,i,s){function a(t){g.push(t)}var c=i||"scheme start",d=0,f="",_=!1,m=!1,g=[];t:for(;(null!=t[d-1]||0==d)&&!this.i;){var v=t[d];switch(c){case"scheme start":if(!v||!p.test(v)){if(i){a("Invalid scheme.");break t}f="",c="no scheme";continue}f+=v.toLowerCase(),c="scheme";break;case"scheme":if(v&&h.test(v))f+=v.toLowerCase();else{if(":"!=v){if(i){null!=v&&a("Code point not allowed in scheme: "+v);break t}f="",d=0,c="no scheme";continue}if(this.h=f,f="",i)break t;void 0!==l[this.h]&&(this.D=!0),c="file"==this.h?"relative":this.D&&s&&s.h==this.h?"relative or authority":this.D?"authority first slash":"scheme data"}break;case"scheme data":"?"==v?(this.u="?",c="query"):"#"==v?(this.C="#",c="fragment"):null!=v&&"\t"!=v&&"\n"!=v&&"\r"!=v&&(this.na+=n(v));break;case"no scheme":if(s&&void 0!==l[s.h]){c="relative";continue}a("Missing scheme."),o.call(this),this.i=!0;break;case"relative or authority":if("/"!=v||"/"!=t[d+1]){a("Expected /, got: "+v),c="relative";continue}c="authority ignore slashes";break;case"relative":if(this.D=!0,"file"!=this.h&&(this.h=s.h),null==v){this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u=s.u,this.v=s.v,this.g=s.g;break t}if("/"==v||"\\"==v)"\\"==v&&a("\\ is an invalid code point."),c="relative slash";else if("?"==v)this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u="?",this.v=s.v,this.g=s.g,c="query";else{if("#"!=v){c=t[d+1];var y=t[d+2];("file"!=this.h||!p.test(v)||":"!=c&&"|"!=c||null!=y&&"/"!=y&&"\\"!=y&&"?"!=y&&"#"!=y)&&(this.j=s.j,this.s=s.s,this.v=s.v,this.g=s.g,this.l=s.l.slice(),this.l.pop()),c="relative path";continue}this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u=s.u,this.C="#",this.v=s.v,this.g=s.g,c="fragment"}break;case"relative slash":if("/"!=v&&"\\"!=v){"file"!=this.h&&(this.j=s.j,this.s=s.s,this.v=s.v,this.g=s.g),c="relative path";continue}"\\"==v&&a("\\ is an invalid code point."),c="file"==this.h?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=v){a("Expected '/', got: "+v),c="authority ignore slashes";continue}c="authority second slash";break;case"authority second slash":if(c="authority ignore slashes","/"!=v){a("Expected '/', got: "+v);continue}break;case"authority ignore slashes":if("/"!=v&&"\\"!=v){c="authority";continue}a("Expected authority, got: "+v);break;case"authority":if("@"==v){for(_&&(a("@ already seen."),f+="%40"),_=!0,v=0;v<f.length;v++)"\t"==(y=f[v])||"\n"==y||"\r"==y?a("Invalid whitespace in authority."):":"==y&&null===this.g?this.g="":(y=n(y),null!==this.g?this.g+=y:this.v+=y);f=""}else{if(null==v||"/"==v||"\\"==v||"?"==v||"#"==v){d-=f.length,f="",c="host";continue}f+=v}break;case"file host":if(null==v||"/"==v||"\\"==v||"?"==v||"#"==v){2!=f.length||!p.test(f[0])||":"!=f[1]&&"|"!=f[1]?(0!=f.length&&(this.j=e.call(this,f),f=""),c="relative path start"):c="relative path";continue}"\t"==v||"\n"==v||"\r"==v?a("Invalid whitespace in file host."):f+=v;break;case"host":case"hostname":if(":"!=v||m){if(null==v||"/"==v||"\\"==v||"?"==v||"#"==v){if(this.j=e.call(this,f),f="",c="relative path start",i)break t;continue}"\t"!=v&&"\n"!=v&&"\r"!=v?("["==v?m=!0:"]"==v&&(m=!1),f+=v):a("Invalid code point in host/hostname: "+v)}else if(this.j=e.call(this,f),f="",c="port","hostname"==i)break t;break;case"port":if(/[0-9]/.test(v))f+=v;else{if(null==v||"/"==v||"\\"==v||"?"==v||"#"==v||i){if(""!=f&&((f=parseInt(f,10))!=l[this.h]&&(this.s=f+""),f=""),i)break t;c="relative path start";continue}"\t"==v||"\n"==v||"\r"==v?a("Invalid code point in port: "+v):(o.call(this),this.i=!0)}break;case"relative path start":if("\\"==v&&a("'\\' not allowed in path."),c="relative path","/"!=v&&"\\"!=v)continue;break;case"relative path":null!=v&&"/"!=v&&"\\"!=v&&(i||"?"!=v&&"#"!=v)?"\t"!=v&&"\n"!=v&&"\r"!=v&&(f+=n(v)):("\\"==v&&a("\\ not allowed in relative path."),(y=u[f.toLowerCase()])&&(f=y),".."==f?(this.l.pop(),"/"!=v&&"\\"!=v&&this.l.push("")):"."==f&&"/"!=v&&"\\"!=v?this.l.push(""):"."!=f&&("file"==this.h&&0==this.l.length&&2==f.length&&p.test(f[0])&&"|"==f[1]&&(f=f[0]+":"),this.l.push(f)),f="","?"==v?(this.u="?",c="query"):"#"==v&&(this.C="#",c="fragment"));break;case"query":i||"#"!=v?null!=v&&"\t"!=v&&"\n"!=v&&"\r"!=v&&(this.u+=r(v)):(this.C="#",c="fragment");break;case"fragment":null!=v&&"\t"!=v&&"\n"!=v&&"\r"!=v&&(this.C+=v)}d++}}function o(){this.v=this.na=this.h="",this.g=null,this.s=this.j="",this.l=[],this.C=this.u="",this.D=this.i=!1}function s(t,e){void 0===e||e instanceof s||(e=new s(String(e))),this.Oa=t,o.call(this),t=t.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,""),i.call(this,t,null,e)}var a=!1;if(!t.rb)try{var c=new URL("b","http://a");c.pathname="c%20d",a="http://a/c%20d"===c.href}catch(t){}if(!a){var l=Object.create(null);l.ftp=21,l.file=0,l.gopher=70,l.http=80,l.https=443,l.ws=80,l.wss=443;var u=Object.create(null);u["%2e"]=".",u[".%2e"]="..",u["%2e."]="..",u["%2e%2e"]="..";var p=/[a-zA-Z]/,h=/[a-zA-Z0-9\+\-\.]/;s.prototype={toString:function(){return this.href},get href(){if(this.i)return this.Oa;var t="";return""==this.v&&null==this.g||(t=this.v+(null!=this.g?":"+this.g:"")+"@"),this.protocol+(this.D?"//"+t+this.host:"")+this.pathname+this.u+this.C},set href(t){o.call(this),i.call(this,t)},get protocol(){return this.h+":"},set protocol(t){this.i||i.call(this,t+":","scheme start")},get host(){return this.i?"":this.s?this.j+":"+this.s:this.j},set host(t){!this.i&&this.D&&i.call(this,t,"host")},get hostname(){return this.j},set hostname(t){!this.i&&this.D&&i.call(this,t,"hostname")},get port(){return this.s},set port(t){!this.i&&this.D&&i.call(this,t,"port")},get pathname(){return this.i?"":this.D?"/"+this.l.join("/"):this.na},set pathname(t){!this.i&&this.D&&(this.l=[],i.call(this,t,"relative path start"))},get search(){return this.i||!this.u||"?"==this.u?"":this.u},set search(t){!this.i&&this.D&&(this.u="?","?"==t[0]&&(t=t.slice(1)),i.call(this,t,"query"))},get hash(){return this.i||!this.C||"#"==this.C?"":this.C},set hash(t){this.i||(this.C="#","#"==t[0]&&(t=t.slice(1)),i.call(this,t,"fragment"))},get origin(){var t;if(this.i||!this.h)return"";switch(this.h){case"data":case"file":case"javascript":case"mailto":return"null"}return(t=this.host)?this.h+"://"+t:""}};var d=t.URL;d&&(s.createObjectURL=function(t){return d.createObjectURL.apply(d,arguments)},s.revokeObjectURL=function(t){d.revokeObjectURL(t)}),t.URL=s}}(window),Object.getOwnPropertyDescriptor(Node.prototype,"baseURI")||Object.defineProperty(Node.prototype,"baseURI",{get:function(){var t=(this.ownerDocument||this).querySelector("base[href]");return t&&t.href||window.location.href},configurable:!0,enumerable:!0});var Wo=document.createElement("style");Wo.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var Jo=document.querySelector("head");Jo.insertBefore(Wo,Jo.firstChild);var zo=window.customElements,Zo=!1,Xo=null;function $o(){window.HTMLTemplateElement.bootstrap&&window.HTMLTemplateElement.bootstrap(window.document),Xo&&Xo(),Zo=!0,window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}zo.polyfillWrapFlushCallback&&zo.polyfillWrapFlushCallback((function(t){Xo=t,Zo&&t()})),"complete"!==document.readyState?(window.addEventListener("load",$o),window.addEventListener("DOMContentLoaded",(function(){window.removeEventListener("load",$o),$o()}))):$o()}).call(this)},1053:t=>{!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?"Type "+this.minChars+" or more characters for results.":"Begin typing for results."}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected?(t.preventDefault(),r.select(void 0,void 0,t)):9===e&&r.selected&&r.tabSelect?r.select(void 0,void 0,t):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach((function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}})),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent+", list item "+(t+1)+" of "+e.length,this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map((function(r){return new n(t.data(r,e))})).filter((function(n){return t.filter(n,e)})),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach((function(n,r){t.ul.appendChild(t.item(n,e,r))})),0===this.ul.children.length?(this.status.textContent="No results found",this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.ul.children.length+" results found")):(this.close({reason:"nomatches"}),this.status.textContent="No results found")}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function s(){o("input.awesomplete").forEach((function(t){new e(t)}))}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var s=i(o);s.parentNode.insertBefore(n,s),n.appendChild(s),null!=s.getAttribute("autofocus")&&s.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach((function(e){t.addEventListener(e,r)}))}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach((function(e){t.removeEventListener(e,r)}))}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?s():document.addEventListener("DOMContentLoaded",s)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},3877:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Alternation:()=>mt,CstParser:()=>Ln,EMPTY_ALT:()=>Nn,EOF:()=>rt,EarlyExitException:()=>je,EmbeddedActionsParser:()=>Qn,Flat:()=>ut,GAstVisitor:()=>xt,Lexer:()=>Y,LexerDefinitionErrorType:()=>X,MismatchedTokenException:()=>Fe,NoViableAltException:()=>Pe,NonTerminal:()=>ct,NotAllInputParsedException:()=>Me,Option:()=>pt,Parser:()=>Sn,ParserDefinitionErrorType:()=>bn,Repetition:()=>ft,RepetitionMandatory:()=>ht,RepetitionMandatoryWithSeparator:()=>dt,RepetitionWithSeparator:()=>_t,Rule:()=>lt,Terminal:()=>gt,VERSION:()=>r,assignOccurrenceIndices:()=>Ae,clearCache:()=>Fn,createSyntaxDiagramsCode:()=>Tn,createToken:()=>nt,createTokenInstance:()=>it,defaultGrammarResolverErrorProvider:()=>Se,defaultGrammarValidatorErrorProvider:()=>Le,defaultLexerErrorProvider:()=>$,defaultParserErrorProvider:()=>Ne,generateParserFactory:()=>Dn,generateParserModule:()=>In,isRecognitionException:()=>Ie,resolveGrammar:()=>Re,serializeGrammar:()=>vt,serializeProduction:()=>yt,tokenLabel:()=>q,tokenMatcher:()=>ot,tokenName:()=>tt,validateGrammar:()=>Ce});var r="6.5.0",i=n(1481),o=n(4844),s={},a=new o.RegExpParser;function c(t){var e=t.toString();if(s.hasOwnProperty(e))return s[e];var n=a.pattern(e);return s[e]=n,n}var l,u=(l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p="Complement Sets are not supported for first char optimization",h='Unable to use "first char" lexer optimizations:\n';function d(t,e){void 0===e&&(e=!1);try{var n=c(t);return f(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===p)e&&(0,i.rr)(h+"\tUnable to optimize: < "+t.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var r="";e&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),(0,i.WB)(h+"\n\tFailed parsing: < "+t.toString()+" >\n\tUsing the regexp-to-ast library version: "+o.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+r)}}return[]}function f(t,e,n){switch(t.type){case"Disjunction":for(var r=0;r<t.value.length;r++)f(t.value[r],e,n);break;case"Alternative":var o=t.value;for(r=0;r<o.length;r++){var s=o[r];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var a=s;switch(a.type){case"Character":_(a.value,e,n);break;case"Set":if(!0===a.complement)throw Error(p);(0,i.Ed)(a.value,(function(t){if("number"==typeof t)_(t,e,n);else{var r=t;if(!0===n)for(var i=r.from;i<=r.to;i++)_(i,e,n);else{for(i=r.from;i<=r.to&&i<I;i++)_(i,e,n);if(r.to>=I)for(var o=r.from>=I?r.from:I,s=r.to,a=F(o),c=F(s),l=a;l<=c;l++)e[l]=l}}}));break;case"Group":f(a.value,e,n);break;default:throw Error("Non Exhaustive Match")}var c=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===g(a)||"Group"!==a.type&&!1===c)break}break;default:throw Error("non exhaustive match!")}return(0,i.VO)(e)}function _(t,e,n){var r=F(t);e[r]=r,!0===n&&function(t,e){var n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n)e[i=F(r.charCodeAt(0))]=i;else{var i,o=n.toLowerCase();o!==n&&(e[i=F(o.charCodeAt(0))]=i)}}(t,e)}function m(t,e){return(0,i.sE)(t.value,(function(t){if("number"==typeof t)return(0,i.r3)(e,t);var n=t;return void 0!==(0,i.sE)(e,(function(t){return n.from<=t&&t<=n.to}))}))}function g(t){return!(!t.quantifier||0!==t.quantifier.atLeast)||!!t.value&&((0,i.kJ)(t.value)?(0,i.yW)(t.value,g):g(t.value))}var v=function(t){function e(e){var n=t.call(this)||this;return n.targetCharCodes=e,n.found=!1,n}return u(e,t),e.prototype.visitChildren=function(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}t.prototype.visitChildren.call(this,e)}},e.prototype.visitCharacter=function(t){(0,i.r3)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?void 0===m(t,this.targetCharCodes)&&(this.found=!0):void 0!==m(t,this.targetCharCodes)&&(this.found=!0)},e}(o.BaseRegExpVisitor);function y(t,e){if(e instanceof RegExp){var n=c(e),r=new v(t);return r.visit(n),r.found}return void 0!==(0,i.sE)(e,(function(e){return(0,i.r3)(t,e.charCodeAt(0))}))}var E=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b="defaultMode",x="modes",w="boolean"==typeof new RegExp("(?:)").sticky;function N(t,e){var n,r=(e=(0,i.ce)(e,{useSticky:w,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(t,e){return e()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if((0,i.xb)(P)){P=new Array(65536);for(var t=0;t<65536;t++)P[t]=t>255?255+~~(t/255):t}}()})),r("Reject Lexer.NA",(function(){n=(0,i.d1)(t,(function(t){return t.PATTERN===Y.NA}))}));var o,s,a,c,l,u,p,f,_,m,g,v=!1;r("Transform Patterns",(function(){v=!1,o=(0,i.UI)(n,(function(t){var n=t.PATTERN;if((0,i.Kj)(n)){var r=n.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||(0,i.r3)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?e.useSticky?R(n):T(n):r[1]}if((0,i.mf)(n))return v=!0,{exec:n};if((0,i.e$)(n,"exec"))return v=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),s=new RegExp(o);return e.useSticky?R(s):T(s)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){s=(0,i.UI)(n,(function(t){return t.tokenTypeIdx})),a=(0,i.UI)(n,(function(t){var e=t.GROUP;if(e!==Y.SKIPPED){if((0,i.HD)(e))return e;if((0,i.o8)(e))return!1;throw Error("non exhaustive match")}})),c=(0,i.UI)(n,(function(t){var e=t.LONGER_ALT;if(e)return(0,i.cq)(n,e)})),l=(0,i.UI)(n,(function(t){return t.PUSH_MODE})),u=(0,i.UI)(n,(function(t){return(0,i.e$)(t,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var t=B(e.lineTerminatorCharacters);p=(0,i.UI)(n,(function(t){return!1})),"onlyOffset"!==e.positionTracking&&(p=(0,i.UI)(n,(function(e){return(0,i.e$)(e,"LINE_BREAKS")?e.LINE_BREAKS:!1===O(e,t)?y(t,e.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){f=(0,i.UI)(n,A),_=(0,i.UI)(o,U),m=(0,i.u4)(n,(function(t,e){var n=e.GROUP;return(0,i.HD)(n)&&n!==Y.SKIPPED&&(t[n]=[]),t}),{}),g=(0,i.UI)(o,(function(t,e){return{pattern:o[e],longerAlt:c[e],canLineTerminator:p[e],isCustom:f[e],short:_[e],group:a[e],push:l[e],pop:u[e],tokenTypeIdx:s[e],tokenType:n[e]}}))}));var E=!0,b=[];return e.safeMode||r("First Char Optimization",(function(){b=(0,i.u4)(n,(function(t,n,r){if("string"==typeof n.PATTERN){var o=F(n.PATTERN.charCodeAt(0));D(t,o,g[r])}else if((0,i.kJ)(n.START_CHARS_HINT)){var s;(0,i.Ed)(n.START_CHARS_HINT,(function(e){var n=F("string"==typeof e?e.charCodeAt(0):e);s!==n&&(s=n,D(t,n,g[r]))}))}else if((0,i.Kj)(n.PATTERN))if(n.PATTERN.unicode)E=!1,e.ensureOptimizations&&(0,i.WB)(h+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var a=d(n.PATTERN,e.ensureOptimizations);(0,i.xb)(a)&&(E=!1),(0,i.Ed)(a,(function(e){D(t,e,g[r])}))}else e.ensureOptimizations&&(0,i.WB)(h+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),E=!1;return t}),[])})),r("ArrayPacking",(function(){b=(0,i.X0)(b)})),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:b,hasCustom:v,canBeOptimized:E}}function S(t,e){var n=[],r=function(t){var e=(0,i.hX)(t,(function(t){return!(0,i.e$)(t,"PATTERN")}));return{errors:(0,i.UI)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:X.MISSING_PATTERN,tokenTypes:[t]}})),valid:(0,i.e5)(t,e)}}(t);n=n.concat(r.errors);var s=function(t){var e=(0,i.hX)(t,(function(t){var e=t.PATTERN;return!((0,i.Kj)(e)||(0,i.mf)(e)||(0,i.e$)(e,"exec")||(0,i.HD)(e))}));return{errors:(0,i.UI)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:X.INVALID_PATTERN,tokenTypes:[t]}})),valid:(0,i.e5)(t,e)}}(r.valid),a=s.valid;return(n=(n=(n=(n=n.concat(s.errors)).concat(function(t){var e=[],n=(0,i.hX)(t,(function(t){return(0,i.Kj)(t.PATTERN)}));return(e=(e=(e=(e=e.concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return E(e,t),e.prototype.visitEndAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=(0,i.hX)(t,(function(t){var n=t.PATTERN;try{var r=c(n),i=new e;return i.visit(r),i.found}catch(t){return L.test(n.source)}}));return(0,i.UI)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:X.EOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.found=!1,e}return E(e,t),e.prototype.visitStartAnchor=function(t){this.found=!0},e}(o.BaseRegExpVisitor),n=(0,i.hX)(t,(function(t){var n=t.PATTERN;try{var r=c(n),i=new e;return i.visit(r),i.found}catch(t){return Q.test(n.source)}}));return(0,i.UI)(n,(function(t){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:X.SOI_ANCHOR_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=(0,i.hX)(t,(function(t){var e=t.PATTERN;return e instanceof RegExp&&(e.multiline||e.global)}));return(0,i.UI)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:X.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}}))}(n))).concat(function(t){var e=[],n=(0,i.UI)(t,(function(n){return(0,i.u4)(t,(function(t,r){return n.PATTERN.source!==r.PATTERN.source||(0,i.r3)(e,r)||r.PATTERN===Y.NA||(e.push(r),t.push(r)),t}),[])}));n=(0,i.oA)(n);var r=(0,i.hX)(n,(function(t){return t.length>1}));return(0,i.UI)(r,(function(t){var e=(0,i.UI)(t,(function(t){return t.name}));return{message:"The same RegExp pattern ->"+(0,i.Ps)(t).PATTERN+"<-has been used in all of the following Token Types: "+e.join(", ")+" <-",type:X.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}}))}(n))).concat(function(t){var e=(0,i.hX)(t,(function(t){return t.PATTERN.test("")}));return(0,i.UI)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:X.EMPTY_MATCH_PATTERN,tokenTypes:[t]}}))}(n))}(a))).concat(function(t){var e=(0,i.hX)(t,(function(t){if(!(0,i.e$)(t,"GROUP"))return!1;var e=t.GROUP;return e!==Y.SKIPPED&&e!==Y.NA&&!(0,i.HD)(e)}));return(0,i.UI)(e,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:X.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}}))}(a))).concat(function(t,e){var n=(0,i.hX)(t,(function(t){return void 0!==t.PUSH_MODE&&!(0,i.r3)(e,t.PUSH_MODE)}));return(0,i.UI)(n,(function(t){return{message:"Token Type: ->"+t.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+t.PUSH_MODE+"<-which does not exist",type:X.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}}))}(a,e))).concat(function(t){var e=[],n=(0,i.u4)(t,(function(t,e,n){var r,o,s=e.PATTERN;return s===Y.NA||((0,i.HD)(s)?t.push({str:s,idx:n,tokenType:e}):(0,i.Kj)(s)&&(r=s,o=[".","\\","[","]","|","^","$","(",")","?","*","+","{"],void 0===(0,i.sE)(o,(function(t){return-1!==r.source.indexOf(t)})))&&t.push({str:s.source,idx:n,tokenType:e})),t}),[]);return(0,i.Ed)(t,(function(t,r){(0,i.Ed)(n,(function(n){var o=n.str,s=n.idx,a=n.tokenType;if(r<s&&function(t,e){if((0,i.Kj)(e)){var n=e.exec(t);return null!==n&&0===n.index}if((0,i.mf)(e))return e(t,0,[],{});if((0,i.e$)(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}(o,t.PATTERN)){var c="Token: ->"+a.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+t.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";e.push({message:c,type:X.UNREACHABLE_PATTERN,tokenTypes:[t,a]})}}))})),e}(a))}var L=/[^\\][\$]/,Q=/[^\\[][\^]|^\^/;function T(t){var e=t.ignoreCase?"i":"";return new RegExp("^(?:"+t.source+")",e)}function R(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function C(t,e,n){var r=[],o=!1,s=(0,i.oA)((0,i.xH)((0,i.Q8)(t.modes,(function(t){return t})))),a=(0,i.d1)(s,(function(t){return t.PATTERN===Y.NA})),c=B(n);return e&&(0,i.Ed)(a,(function(t){var e=O(t,c);if(!1!==e){var n={message:function(t,e){if(e.issue===X.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+t.name+"> Token Type\n\t Root cause: "+e.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===X.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+t.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(t,e),type:e.issue,tokenType:t};r.push(n)}else(0,i.e$)(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(o=!0):y(c,t.PATTERN)&&(o=!0)})),e&&!o&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:X.NO_LINE_BREAKS_FLAGS}),r}function A(t){var e=t.PATTERN;if((0,i.Kj)(e))return!1;if((0,i.mf)(e))return!0;if((0,i.e$)(e,"exec"))return!0;if((0,i.HD)(e))return!1;throw Error("non exhaustive match")}function U(t){return!(!(0,i.HD)(t)||1!==t.length)&&t.charCodeAt(0)}var k={test:function(t){for(var e=t.length,n=this.lastIndex;n<e;n++){var r=t.charCodeAt(n);if(10===r)return this.lastIndex=n+1,!0;if(13===r)return 10===t.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function O(t,e){if((0,i.e$)(t,"LINE_BREAKS"))return!1;if((0,i.Kj)(t.PATTERN)){try{y(e,t.PATTERN)}catch(t){return{issue:X.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if((0,i.HD)(t.PATTERN))return!1;if(A(t))return{issue:X.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function B(t){return(0,i.UI)(t,(function(t){return(0,i.HD)(t)&&t.length>0?t.charCodeAt(0):t}))}function D(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var I=256;function F(t){return t<I?t:P[t]}var P=[];function M(t,e){var n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function j(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}var V=1,G={};function H(t){var e=function(t){for(var e=(0,i.Qw)(t),n=t,r=!0;r;){n=(0,i.oA)((0,i.xH)((0,i.UI)(n,(function(t){return t.CATEGORIES}))));var o=(0,i.e5)(n,e);e=e.concat(o),(0,i.xb)(o)?r=!1:n=o}return e}(t);!function(t){(0,i.Ed)(t,(function(t){var e;J(t)||(G[V]=t,t.tokenTypeIdx=V++),z(t)&&!(0,i.kJ)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),z(t)||(t.CATEGORIES=[]),e=t,(0,i.e$)(e,"categoryMatches")||(t.categoryMatches=[]),function(t){return(0,i.e$)(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})}))}(e),function(t){(0,i.Ed)(t,(function(t){W([],t)}))}(e),function(t){(0,i.Ed)(t,(function(t){t.categoryMatches=[],(0,i.Ed)(t.categoryMatchesMap,(function(e,n){t.categoryMatches.push(G[n].tokenTypeIdx)}))}))}(e),(0,i.Ed)(e,(function(t){t.isParent=t.categoryMatches.length>0}))}function W(t,e){(0,i.Ed)(t,(function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0})),(0,i.Ed)(e.CATEGORIES,(function(n){var r=t.concat(e);(0,i.r3)(r,n)||W(r,n)}))}function J(t){return(0,i.e$)(t,"tokenTypeIdx")}function z(t){return(0,i.e$)(t,"CATEGORIES")}function Z(t){return(0,i.e$)(t,"tokenTypeIdx")}var X,$={buildUnableToPopLexerModeMessage:function(t){return"Unable to pop Lexer Mode after encountering Token ->"+t.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(t,e,n,r,i){return"unexpected character: ->"+t.charAt(e)+"<- at offset: "+e+", skipped "+n+" characters."}};!function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(X||(X={}));var K={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:$,traceInitPerf:!1,skipValidations:!1};Object.freeze(K);var Y=function(){function t(t,e){var n=this;if(void 0===e&&(e=K),this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=(0,i.TS)(K,e);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,o=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===K.lineTerminatorsPattern)n.config.lineTerminatorsPattern=k;else if(n.config.lineTerminatorCharacters===K.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),(0,i.kJ)(t)?((r={modes:{}}).modes.defaultMode=(0,i.Qw)(t),r.defaultMode=b):(o=!1,r=(0,i.Cl)(t))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(function(t,e,n){var r=[];return(0,i.e$)(t,b)||r.push({message:"A MultiMode Lexer cannot be initialized without a <defaultMode> property in its definition\n",type:X.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,i.e$)(t,x)||r.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:X.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,i.e$)(t,x)&&(0,i.e$)(t,b)&&!(0,i.e$)(t.modes,t.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a defaultMode: <"+t.defaultMode+">which does not exist\n",type:X.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,i.e$)(t,x)&&(0,i.Ed)(t.modes,(function(t,e){(0,i.Ed)(t,(function(t,n){(0,i.o8)(t)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+e+"> at index: <"+n+">\n",type:X.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(C(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},(0,i.Ed)(r.modes,(function(t,e){r.modes[e]=(0,i.d1)(t,(function(t){return(0,i.o8)(t)}))}));var a=(0,i.XP)(r.modes);if((0,i.Ed)(r.modes,(function(t,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var o;n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(S(t,a))})),(0,i.xb)(n.lexerDefinitionErrors)&&(H(t),n.TRACE_INIT("analyzeTokenTypes",(function(){o=N(t,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=o.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=o.charCodeToPatternIdxToConfig,n.emptyGroups=(0,i.TS)(n.emptyGroups,o.emptyGroups),n.hasCustom=o.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=o.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!(0,i.xb)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var c=(0,i.UI)(n.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+c)}(0,i.Ed)(n.lexerDefinitionWarning,(function(t){(0,i.rr)(t.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(w?(n.chopInput=i.Wd,n.match=n.matchWithTest):(n.updateLastIndex=i.dG,n.match=n.matchWithExec),o&&(n.handleModes=i.dG),!1===n.trackStartLines&&(n.computeNewColumn=i.Wd),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i.dG),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var t=(0,i.u4)(n.canModeBeOptimized,(function(t,e,n){return!1===e&&t.push(n),t}),[]);if(e.ensureOptimizations&&!(0,i.xb)(t))throw Error("Lexer Modes: < "+t.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){s={}})),n.TRACE_INIT("toFastProperties",(function(){(0,i.SV)(n)}))}))}return t.prototype.tokenize=function(t,e){if(void 0===e&&(e=this.defaultMode),!(0,i.xb)(this.lexerDefinitionErrors)){var n=(0,i.UI)(this.lexerDefinitionErrors,(function(t){return t.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(t,e)},t.prototype.tokenizeInternal=function(t,e){var n,r,o,s,a,c,l,u,p,h,d,f,_,m,g,v,y,E=this,b=t,x=b.length,w=0,N=0,S=this.hasCustom?0:Math.floor(t.length/10),L=new Array(S),Q=[],T=this.trackStartLines?1:void 0,R=this.trackStartLines?1:void 0,C=(g=this.emptyGroups,v={},y=(0,i.XP)(g),(0,i.Ed)(y,(function(t){var e=g[t];if(!(0,i.kJ)(e))throw Error("non exhaustive match");v[t]=[]})),v),A=this.trackStartLines,U=this.config.lineTerminatorsPattern,k=0,O=[],B=[],D=[],I=[];Object.freeze(I);var P=void 0;function M(){return O}function j(t){var e=F(t),n=B[e];return void 0===n?I:n}var V,G=function(t){if(1===D.length&&void 0===t.tokenType.PUSH_MODE){var e=E.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);Q.push({offset:t.startOffset,line:void 0!==t.startLine?t.startLine:void 0,column:void 0!==t.startColumn?t.startColumn:void 0,length:t.image.length,message:e})}else{D.pop();var n=(0,i.Z$)(D);O=E.patternIdxToConfig[n],B=E.charCodeToPatternIdxToConfig[n],k=O.length;var r=E.canModeBeOptimized[n]&&!1===E.config.safeMode;P=B&&r?j:M}};function H(t){D.push(t),B=this.charCodeToPatternIdxToConfig[t],O=this.patternIdxToConfig[t],k=O.length,k=O.length;var e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;P=B&&e?j:M}for(H.call(this,e);w<x;){a=null;var W=b.charCodeAt(w),J=P(W),z=J.length;for(n=0;n<z;n++){var Z=(V=J[n]).pattern;if(c=null,!1!==(it=V.short)?W===it&&(a=Z):!0===V.isCustom?null!==(m=Z.exec(b,w,L,C))?(a=m[0],void 0!==m.payload&&(c=m.payload)):a=null:(this.updateLastIndex(Z,w),a=this.match(Z,t,w)),null!==a){if(void 0!==(s=V.longerAlt)){var X=O[s],$=X.pattern;l=null,!0===X.isCustom?null!==(m=$.exec(b,w,L,C))?(o=m[0],void 0!==m.payload&&(l=m.payload)):o=null:(this.updateLastIndex($,w),o=this.match($,t,w)),o&&o.length>a.length&&(a=o,c=l,V=X)}break}}if(null!==a){if(u=a.length,void 0!==(p=V.group)&&(h=V.tokenTypeIdx,d=this.createTokenInstance(a,w,h,V.tokenType,T,R,u),this.handlePayload(d,c),!1===p?N=this.addToken(L,N,d):C[p].push(d)),t=this.chopInput(t,u),w+=u,R=this.computeNewColumn(R,u),!0===A&&!0===V.canLineTerminator){var K=0,Y=void 0,q=void 0;U.lastIndex=0;do{!0===(Y=U.test(a))&&(q=U.lastIndex-1,K++)}while(!0===Y);0!==K&&(T+=K,R=u-q,this.updateTokenEndLineColumnLocation(d,p,q,K,T,R,u))}this.handleModes(V,G,H,d)}else{for(var tt=w,et=T,nt=R,rt=!1;!rt&&w<x;)for(b.charCodeAt(w),t=this.chopInput(t,1),w++,r=0;r<k;r++){var it,ot=O[r];if(Z=ot.pattern,!1!==(it=ot.short)?b.charCodeAt(w)===it&&(rt=!0):!0===ot.isCustom?rt=null!==Z.exec(b,w,L,C):(this.updateLastIndex(Z,w),rt=null!==Z.exec(t)),!0===rt)break}f=w-tt,_=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(b,tt,f,et,nt),Q.push({offset:tt,line:et,column:nt,length:f,message:_})}}return this.hasCustom||(L.length=N),{tokens:L,groups:C,errors:Q}},t.prototype.handleModes=function(t,e,n,r){if(!0===t.pop){var i=t.push;e(r),void 0!==i&&n.call(this,i)}else void 0!==t.push&&n.call(this,t.push)},t.prototype.chopInput=function(t,e){return t.substring(e)},t.prototype.updateLastIndex=function(t,e){t.lastIndex=e},t.prototype.updateTokenEndLineColumnLocation=function(t,e,n,r,i,o,s){var a,c;void 0!==e&&(c=(a=n===s-1)?-1:0,1===r&&!0===a||(t.endLine=i+c,t.endColumn=o-1-c))},t.prototype.computeNewColumn=function(t,e){return t+e},t.prototype.createTokenInstance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return null},t.prototype.createOffsetOnlyToken=function(t,e,n,r){return{image:t,startOffset:e,tokenTypeIdx:n,tokenType:r}},t.prototype.createStartOnlyToken=function(t,e,n,r,i,o){return{image:t,startOffset:e,startLine:i,startColumn:o,tokenTypeIdx:n,tokenType:r}},t.prototype.createFullToken=function(t,e,n,r,i,o,s){return{image:t,startOffset:e,endOffset:e+s-1,startLine:i,endLine:i,startColumn:o,endColumn:o+s-1,tokenTypeIdx:n,tokenType:r}},t.prototype.addToken=function(t,e,n){return 666},t.prototype.addTokenUsingPush=function(t,e,n){return t.push(n),e},t.prototype.addTokenUsingMemberAccess=function(t,e,n){return t[e]=n,++e},t.prototype.handlePayload=function(t,e){},t.prototype.handlePayloadNoCustom=function(t,e){},t.prototype.handlePayloadWithCustom=function(t,e){null!==e&&(t.payload=e)},t.prototype.match=function(t,e,n){return null},t.prototype.matchWithTest=function(t,e,n){return!0===t.test(e)?e.substring(n,t.lastIndex):null},t.prototype.matchWithExec=function(t,e){var n=t.exec(e);return null!==n?n[0]:n},t.prototype.TRACE_INIT=function(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+t+">");var r=(0,i.HT)(e),o=r.time,s=r.value,a=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+t+"> time: "+o+"ms"),this.traceInitIndent--,s}return e()},t.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",t.NA=/NOT_APPLICABLE/,t}();function q(t){return et(t)?t.LABEL:t.name}function tt(t){return t.name}function et(t){return(0,i.HD)(t.LABEL)&&""!==t.LABEL}function nt(t){return function(t){var e=t.pattern,n={};if(n.name=t.name,(0,i.o8)(e)||(n.PATTERN=e),(0,i.e$)(t,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";return(0,i.e$)(t,"categories")&&(n.CATEGORIES=t.categories),H([n]),(0,i.e$)(t,"label")&&(n.LABEL=t.label),(0,i.e$)(t,"group")&&(n.GROUP=t.group),(0,i.e$)(t,"pop_mode")&&(n.POP_MODE=t.pop_mode),(0,i.e$)(t,"push_mode")&&(n.PUSH_MODE=t.push_mode),(0,i.e$)(t,"longer_alt")&&(n.LONGER_ALT=t.longer_alt),(0,i.e$)(t,"line_breaks")&&(n.LINE_BREAKS=t.line_breaks),(0,i.e$)(t,"start_chars_hint")&&(n.START_CHARS_HINT=t.start_chars_hint),n}(t)}var rt=nt({name:"EOF",pattern:Y.NA});function it(t,e,n,r,i,o,s,a){return{image:e,startOffset:n,endOffset:r,startLine:i,endLine:o,startColumn:s,endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function ot(t,e){return M(t,e)}H([rt]);var st=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),at=function(){function t(t){this.definition=t}return t.prototype.accept=function(t){t.visit(this),(0,i.Ed)(this.definition,(function(e){e.accept(t)}))},t}(),ct=function(t){function e(e){var n=t.call(this,[])||this;return n.idx=1,(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(t){},enumerable:!0,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(at),lt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.orgText="",(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),e}(at),ut=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.ignoreAmbiguities=!1,(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),e}(at),pt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),e}(at),ht=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),e}(at),dt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),e}(at),ft=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),e}(at),_t=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),e}(at),mt=function(t){function e(e){var n=t.call(this,e.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,(0,i.f0)(n,(0,i.ei)(e,(function(t){return void 0!==t}))),n}return st(e,t),e}(at),gt=function(){function t(t){this.idx=1,(0,i.f0)(this,(0,i.ei)(t,(function(t){return void 0!==t})))}return t.prototype.accept=function(t){t.visit(this)},t}();function vt(t){return(0,i.UI)(t,yt)}function yt(t){function e(t){return(0,i.UI)(t,yt)}if(t instanceof ct)return{type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(t instanceof ut)return{type:"Flat",definition:e(t.definition)};if(t instanceof pt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof ht)return{type:"RepetitionMandatory",name:t.name,idx:t.idx,definition:e(t.definition)};if(t instanceof dt)return{type:"RepetitionMandatoryWithSeparator",name:t.name,idx:t.idx,separator:yt(new gt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof _t)return{type:"RepetitionWithSeparator",name:t.name,idx:t.idx,separator:yt(new gt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ft)return{type:"Repetition",name:t.name,idx:t.idx,definition:e(t.definition)};if(t instanceof mt)return{type:"Alternation",name:t.name,idx:t.idx,definition:e(t.definition)};if(t instanceof gt){var n={type:"Terminal",name:t.terminalType.name,label:q(t.terminalType),idx:t.idx},r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=(0,i.Kj)(r)?r.source:r),n}if(t instanceof lt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var Et=function(){function t(){}return t.prototype.walk=function(t,e){var n=this;void 0===e&&(e=[]),(0,i.Ed)(t.definition,(function(r,o){var s=(0,i.Cw)(t.definition,o+1);if(r instanceof ct)n.walkProdRef(r,s,e);else if(r instanceof gt)n.walkTerminal(r,s,e);else if(r instanceof ut)n.walkFlat(r,s,e);else if(r instanceof pt)n.walkOption(r,s,e);else if(r instanceof ht)n.walkAtLeastOne(r,s,e);else if(r instanceof dt)n.walkAtLeastOneSep(r,s,e);else if(r instanceof _t)n.walkManySep(r,s,e);else if(r instanceof ft)n.walkMany(r,s,e);else{if(!(r instanceof mt))throw Error("non exhaustive match");n.walkOr(r,s,e)}}))},t.prototype.walkTerminal=function(t,e,n){},t.prototype.walkProdRef=function(t,e,n){},t.prototype.walkFlat=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkOption=function(t,e,n){var r=e.concat(n);this.walk(t,r)},t.prototype.walkAtLeastOne=function(t,e,n){var r=[new pt({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkAtLeastOneSep=function(t,e,n){var r=bt(t,e,n);this.walk(t,r)},t.prototype.walkMany=function(t,e,n){var r=[new pt({definition:t.definition})].concat(e,n);this.walk(t,r)},t.prototype.walkManySep=function(t,e,n){var r=bt(t,e,n);this.walk(t,r)},t.prototype.walkOr=function(t,e,n){var r=this,o=e.concat(n);(0,i.Ed)(t.definition,(function(t){var e=new ut({definition:[t]});r.walk(e,o)}))},t}();function bt(t,e,n){return[new pt({definition:[new gt({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}var xt=function(){function t(){}return t.prototype.visit=function(t){var e=t;switch(e.constructor){case ct:return this.visitNonTerminal(e);case ut:return this.visitFlat(e);case pt:return this.visitOption(e);case ht:return this.visitRepetitionMandatory(e);case dt:return this.visitRepetitionMandatoryWithSeparator(e);case _t:return this.visitRepetitionWithSeparator(e);case ft:return this.visitRepetition(e);case mt:return this.visitAlternation(e);case gt:return this.visitTerminal(e);case lt:return this.visitRule(e);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(t){},t.prototype.visitFlat=function(t){},t.prototype.visitOption=function(t){},t.prototype.visitRepetition=function(t){},t.prototype.visitRepetitionMandatory=function(t){},t.prototype.visitRepetitionMandatoryWithSeparator=function(t){},t.prototype.visitRepetitionWithSeparator=function(t){},t.prototype.visitAlternation=function(t){},t.prototype.visitTerminal=function(t){},t.prototype.visitRule=function(t){},t}(),wt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Nt(t,e){return void 0===e&&(e=[]),!!(t instanceof pt||t instanceof ft||t instanceof _t)||(t instanceof mt?(0,i.G)(t.definition,(function(t){return Nt(t,e)})):!(t instanceof ct&&(0,i.r3)(e,t))&&t instanceof at&&(t instanceof ct&&e.push(t),(0,i.yW)(t.definition,(function(t){return Nt(t,e)}))))}function St(t){if(t instanceof ct)return"SUBRULE";if(t instanceof pt)return"OPTION";if(t instanceof mt)return"OR";if(t instanceof ht)return"AT_LEAST_ONE";if(t instanceof dt)return"AT_LEAST_ONE_SEP";if(t instanceof _t)return"MANY_SEP";if(t instanceof ft)return"MANY";if(t instanceof gt)return"CONSUME";throw Error("non exhaustive match")}var Lt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.separator="-",e.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},e}return wt(e,t),e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var e=t.terminalType.name+this.separator+"Terminal";(0,i.e$)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitNonTerminal=function(t){var e=t.nonTerminalName+this.separator+"Terminal";(0,i.e$)(this.dslMethods,e)||(this.dslMethods[e]=[]),this.dslMethods[e].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(xt),Qt=new Lt;function Tt(t){if(t instanceof ct)return Tt(t.referencedRule);if(t instanceof gt)return[t.terminalType];if(function(t){return t instanceof ut||t instanceof pt||t instanceof ft||t instanceof ht||t instanceof dt||t instanceof _t||t instanceof gt||t instanceof lt}(t))return function(t){for(var e,n=[],r=t.definition,o=0,s=r.length>o,a=!0;s&&a;)a=Nt(e=r[o]),n=n.concat(Tt(e)),o+=1,s=r.length>o;return(0,i.jj)(n)}(t);if(function(t){return t instanceof mt}(t))return function(t){var e=(0,i.UI)(t.definition,(function(t){return Tt(t)}));return(0,i.jj)((0,i.xH)(e))}(t);throw Error("non exhaustive match")}var Rt="_~IN~_",Ct=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),At=function(t){function e(e){var n=t.call(this)||this;return n.topProd=e,n.follows={},n}return Ct(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,e,n){},e.prototype.walkProdRef=function(t,e,n){var r,i,o=(r=t.referencedRule,i=t.idx,r.name+i+Rt+this.topProd.name),s=e.concat(n),a=Tt(new ut({definition:s}));this.follows[o]=a},e}(Et),Ut=256,kt=512,Ot=768,Bt=1024,Dt=1280,It=1536;function Ft(t,e,n){return n|e|t}function Pt(t,e,n,r){var i=r+1<<24;return Ft(t,e,n)|i}var Mt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function jt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset==1&&(t.endOffset=e.endOffset)}function Vt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset==1&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function Gt(t,e,n){void 0===t.children[e]?t.children[e]=[n]:t.children[e].push(n)}var Ht=function(t){function e(e){var n=t.call(this)||this;return n.result=[],n.ruleIdx=e,n}return Mt(e,t),e.prototype.collectNamedDSLMethod=function(t,e,n){if(!(0,i.o8)(t.name)){var r=void 0;if(t instanceof pt||t instanceof ft||t instanceof ht||t instanceof mt)r=new e({definition:t.definition,idx:t.idx});else{if(!(t instanceof dt||t instanceof _t))throw Error("non exhaustive match");r=new e({definition:t.definition,idx:t.idx,separator:t.separator})}var o=[r],s=Ft(this.ruleIdx,n,t.idx);this.result.push({def:o,key:s,name:t.name,orgProd:t})}},e.prototype.visitOption=function(t){this.collectNamedDSLMethod(t,pt,kt)},e.prototype.visitRepetition=function(t){this.collectNamedDSLMethod(t,ft,Ot)},e.prototype.visitRepetitionMandatory=function(t){this.collectNamedDSLMethod(t,ht,Bt)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.collectNamedDSLMethod(t,dt,It)},e.prototype.visitRepetitionWithSeparator=function(t){this.collectNamedDSLMethod(t,_t,Dt)},e.prototype.visitAlternation=function(t){var e=this;this.collectNamedDSLMethod(t,mt,Ut);var n=t.definition.length>1;(0,i.Ed)(t.definition,(function(r,o){if(!(0,i.o8)(r.name)){var s=r.definition;s=n?[new pt({definition:r.definition})]:r.definition;var a=Pt(e.ruleIdx,Ut,t.idx,o);e.result.push({def:s,key:a,name:r.name,orgProd:r})}}))},e}(xt),Wt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Wt(e,t),e.prototype.walkTerminal=function(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var r=e.concat(n),i=new ut({definition:r});this.possibleTokTypes=Tt(i),this.found=!0}},e}(function(t){function e(e,n){var r=t.call(this)||this;return r.topProd=e,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Wt(e,t),e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,i.Qw)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,i.Qw)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(e,n){void 0===n&&(n=[]),this.found||t.prototype.walk.call(this,e,n)},e.prototype.walkProdRef=function(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var r=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,r)}},e.prototype.updateExpectedNext=function(){(0,i.xb)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(Et)),zt=function(t){function e(e,n){var r=t.call(this)||this;return r.topRule=e,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Wt(e,t),e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(Et),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wt(e,t),e.prototype.walkMany=function(e,n,r){if(e.idx===this.occurrence){var o=(0,i.Ps)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof gt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkMany.call(this,e,n,r)},e}(zt),Xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wt(e,t),e.prototype.walkManySep=function(e,n,r){if(e.idx===this.occurrence){var o=(0,i.Ps)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof gt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkManySep.call(this,e,n,r)},e}(zt),$t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wt(e,t),e.prototype.walkAtLeastOne=function(e,n,r){if(e.idx===this.occurrence){var o=(0,i.Ps)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof gt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOne.call(this,e,n,r)},e}(zt),Kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wt(e,t),e.prototype.walkAtLeastOneSep=function(e,n,r){if(e.idx===this.occurrence){var o=(0,i.Ps)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof gt&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else t.prototype.walkAtLeastOneSep.call(this,e,n,r)},e}(zt);function Yt(t,e,n){void 0===n&&(n=[]),n=(0,i.Qw)(n);var r=[],o=0;function s(s){var a=Yt(s.concat((0,i.Cw)(t,o+1)),e,n);return r.concat(a)}for(;n.length<e&&o<t.length;){var a=t[o];if(a instanceof ut)return s(a.definition);if(a instanceof ct)return s(a.definition);if(a instanceof pt)r=s(a.definition);else{if(a instanceof ht)return s(c=a.definition.concat([new ft({definition:a.definition})]));if(a instanceof dt)return s(c=[new ut({definition:a.definition}),new ft({definition:[new gt({terminalType:a.separator})].concat(a.definition)})]);if(a instanceof _t){var c=a.definition.concat([new ft({definition:[new gt({terminalType:a.separator})].concat(a.definition)})]);r=s(c)}else if(a instanceof ft)c=a.definition.concat([new ft({definition:a.definition})]),r=s(c);else{if(a instanceof mt)return(0,i.Ed)(a.definition,(function(t){r=s(t.definition)})),r;if(!(a instanceof gt))throw Error("non exhaustive match");n.push(a.terminalType)}}o++}return r.push({partialPath:n,suffixDef:(0,i.Cw)(t,o)}),r}function qt(t,e,n,r){var o="EXIT_NONE_TERMINAL",s=[o],a="EXIT_ALTERNATIVE",c=!1,l=e.length,u=l-r-1,p=[],h=[];for(h.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!(0,i.xb)(h);){var d=h.pop();if(d!==a){var f=d.def,_=d.idx,m=d.ruleStack,g=d.occurrenceStack;if(!(0,i.xb)(f)){var v=f[0];if(v===o){var y={idx:_,def:(0,i.Cw)(f),ruleStack:(0,i.j7)(m),occurrenceStack:(0,i.j7)(g)};h.push(y)}else if(v instanceof gt)if(_<l-1){var E=_+1;n(e[E],v.terminalType)&&(y={idx:E,def:(0,i.Cw)(f),ruleStack:m,occurrenceStack:g},h.push(y))}else{if(_!==l-1)throw Error("non exhaustive match");p.push({nextTokenType:v.terminalType,nextTokenOccurrence:v.idx,ruleStack:m,occurrenceStack:g}),c=!0}else if(v instanceof ct){var b=(0,i.Qw)(m);b.push(v.nonTerminalName);var x=(0,i.Qw)(g);x.push(v.idx),y={idx:_,def:v.definition.concat(s,(0,i.Cw)(f)),ruleStack:b,occurrenceStack:x},h.push(y)}else if(v instanceof pt){var w={idx:_,def:(0,i.Cw)(f),ruleStack:m,occurrenceStack:g};h.push(w),h.push(a);var N={idx:_,def:v.definition.concat((0,i.Cw)(f)),ruleStack:m,occurrenceStack:g};h.push(N)}else if(v instanceof ht){var S=new ft({definition:v.definition,idx:v.idx});y={idx:_,def:v.definition.concat([S],(0,i.Cw)(f)),ruleStack:m,occurrenceStack:g},h.push(y)}else if(v instanceof dt){var L=new gt({terminalType:v.separator});S=new ft({definition:[L].concat(v.definition),idx:v.idx}),y={idx:_,def:v.definition.concat([S],(0,i.Cw)(f)),ruleStack:m,occurrenceStack:g},h.push(y)}else if(v instanceof _t){w={idx:_,def:(0,i.Cw)(f),ruleStack:m,occurrenceStack:g},h.push(w),h.push(a),L=new gt({terminalType:v.separator});var Q=new ft({definition:[L].concat(v.definition),idx:v.idx});N={idx:_,def:v.definition.concat([Q],(0,i.Cw)(f)),ruleStack:m,occurrenceStack:g},h.push(N)}else if(v instanceof ft)w={idx:_,def:(0,i.Cw)(f),ruleStack:m,occurrenceStack:g},h.push(w),h.push(a),Q=new ft({definition:v.definition,idx:v.idx}),N={idx:_,def:v.definition.concat([Q],(0,i.Cw)(f)),ruleStack:m,occurrenceStack:g},h.push(N);else if(v instanceof mt)for(var T=v.definition.length-1;T>=0;T--){var R={idx:_,def:v.definition[T].definition.concat((0,i.Cw)(f)),ruleStack:m,occurrenceStack:g};h.push(R),h.push(a)}else if(v instanceof ut)h.push({idx:_,def:v.definition.concat((0,i.Cw)(f)),ruleStack:m,occurrenceStack:g});else{if(!(v instanceof lt))throw Error("non exhaustive match");h.push(te(v,_,m,g))}}}else c&&(0,i.Z$)(h).idx<=u&&h.pop()}return p}function te(t,e,n,r){var o=(0,i.Qw)(n);o.push(t.name);var s=(0,i.Qw)(r);return s.push(1),{idx:e,def:t.definition,ruleStack:o,occurrenceStack:s}}var ee,ne=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"}(ee||(ee={}));var re=function(t){function e(e,n,r){var i=t.call(this)||this;return i.topProd=e,i.targetOccurrence=n,i.targetProdType=r,i}return ne(e,t),e.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},e.prototype.checkIsTarget=function(t,e,n,r){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=n.concat(r),!0)},e.prototype.walkOption=function(e,n,r){this.checkIsTarget(e,ee.OPTION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOne=function(e,n,r){this.checkIsTarget(e,ee.REPETITION_MANDATORY,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkAtLeastOneSep=function(e,n,r){this.checkIsTarget(e,ee.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkMany=function(e,n,r){this.checkIsTarget(e,ee.REPETITION,n,r)||t.prototype.walkOption.call(this,e,n,r)},e.prototype.walkManySep=function(e,n,r){this.checkIsTarget(e,ee.REPETITION_WITH_SEPARATOR,n,r)||t.prototype.walkOption.call(this,e,n,r)},e}(Et),ie=function(t){function e(e,n,r){var i=t.call(this)||this;return i.targetOccurrence=e,i.targetProdType=n,i.targetRef=r,i.result=[],i}return ne(e,t),e.prototype.checkIsTarget=function(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)},e.prototype.visitOption=function(t){this.checkIsTarget(t,ee.OPTION)},e.prototype.visitRepetition=function(t){this.checkIsTarget(t,ee.REPETITION)},e.prototype.visitRepetitionMandatory=function(t){this.checkIsTarget(t,ee.REPETITION_MANDATORY)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.checkIsTarget(t,ee.REPETITION_MANDATORY_WITH_SEPARATOR)},e.prototype.visitRepetitionWithSeparator=function(t){this.checkIsTarget(t,ee.REPETITION_WITH_SEPARATOR)},e.prototype.visitAlternation=function(t){this.checkIsTarget(t,ee.ALTERNATION)},e}(xt);function oe(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=[];return e}function se(t){for(var e=[""],n=0;n<t.length;n++){for(var r=t[n],i=[],o=0;o<e.length;o++){var s=e[o];i.push(s+"_"+r.tokenTypeIdx);for(var a=0;a<r.categoryMatches.length;a++){var c="_"+r.categoryMatches[a];i.push(s+c)}}e=i}return e}function ae(t,e,n){for(var r=0;r<t.length;r++)if(r!==n)for(var i=t[r],o=0;o<e.length;o++)if(!0===i[e[o]])return!1;return!0}function ce(t,e){for(var n=(0,i.UI)(t,(function(t){return Yt([t],1)})),r=oe(n.length),o=(0,i.UI)(n,(function(t){var e={};return(0,i.Ed)(t,(function(t){var n=se(t.partialPath);(0,i.Ed)(n,(function(t){e[t]=!0}))})),e})),s=n,a=1;a<=e;a++){var c=s;s=oe(c.length);for(var l=function(t){for(var n=c[t],l=0;l<n.length;l++){var u=n[l].partialPath,p=n[l].suffixDef,h=se(u);if(ae(o,h,t)||(0,i.xb)(p)||u.length===e){var d=r[t];if(!1===pe(d,u)){d.push(u);for(var f=0;f<h.length;f++){var _=h[f];o[t][_]=!0}}}else{var m=Yt(p,a+1,u);s[t]=s[t].concat(m),(0,i.Ed)(m,(function(e){var n=se(e.partialPath);(0,i.Ed)(n,(function(e){o[t][e]=!0}))}))}}},u=0;u<c.length;u++)l(u)}return r}function le(t,e,n,r){var i=new ie(t,ee.ALTERNATION,r);return e.accept(i),ce(i.result,n)}function ue(t,e,n,r){var i=new ie(t,n);e.accept(i);var o=i.result,s=new re(e,t,n).startWalking();return ce([new ut({definition:o}),new ut({definition:s})],r)}function pe(t,e){t:for(var n=0;n<t.length;n++){var r=t[n];if(r.length===e.length){for(var i=0;i<r.length;i++){var o=e[i],s=r[i];if(!1==(o===s||void 0!==s.categoryMatchesMap[o.tokenTypeIdx]))continue t}return!0}}return!1}function he(t){return(0,i.yW)(t,(function(t){return(0,i.yW)(t,(function(t){return(0,i.yW)(t,(function(t){return(0,i.xb)(t.categoryMatches)}))}))}))}var de=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function fe(t,e,n,r,o,s){var a=i.UI(t,(function(t){return function(t,e){var n=new ge;t.accept(n);var r=n.allProductions,o=i.vM(r,_e),s=i.ei(o,(function(t){return t.length>1}));return i.UI(i.VO(s),(function(n){var r=i.Ps(n),o=e.buildDuplicateFoundError(t,n),s=St(r),a={message:o,type:bn.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:s,occurrence:r.idx},c=me(r);return c&&(a.parameter=c),a}))}(t,o)})),c=i.UI(t,(function(t){return Ee(t,t,o)})),l=[],u=[],p=[];(0,i.yW)(c,i.xb)&&(l=(0,i.UI)(t,(function(t){return function(t,e){var n=new xe;t.accept(n);var r=n.alternations;return i.u4(r,(function(n,r){var o=i.j7(r.definition),s=i.UI(o,(function(n,o){var s=qt([n],[],null,1);return i.xb(s)?{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:r,emptyChoiceIdx:o}),type:bn.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:r.idx,alternative:o+1}:null}));return n.concat(i.oA(s))}),[])}(t,o)})),u=(0,i.UI)(t,(function(t){return function(t,e,n,r){var o=new xe;t.accept(o);var s=o.alternations,a=n[t.name];return a&&(s=(0,i.d1)(s,(function(t){return a[St(t)+(0===t.idx?"":t.idx)]}))),s=(0,i.d1)(s,(function(t){return!0===t.ignoreAmbiguities})),i.u4(s,(function(n,o){var s=o.idx,a=o.maxLookahead||e,c=le(s,t,a,o),l=function(t,e,n,r){var o=[],s=(0,i.u4)(t,(function(n,r,s){return!0===e.definition[s].ignoreAmbiguities||(0,i.Ed)(r,(function(r){var a=[s];(0,i.Ed)(t,(function(t,n){s!==n&&pe(t,r)&&!0!==e.definition[n].ignoreAmbiguities&&a.push(n)})),a.length>1&&!pe(o,r)&&(o.push(r),n.push({alts:a,path:r}))})),n}),[]);return i.UI(s,(function(t){var o=(0,i.UI)(t.alts,(function(t){return t+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:o,prefixPath:t.path}),type:bn.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:[t.alts]}}))}(c,o,t,r),u=function(t,e,n,r){var o=[],s=(0,i.u4)(t,(function(t,e,n){var r=(0,i.UI)(e,(function(t){return{idx:n,path:t}}));return t.concat(r)}),[]);return(0,i.Ed)(s,(function(t){if(!0!==e.definition[t.idx].ignoreAmbiguities){var a=t.idx,c=t.path,l=(0,i.Oq)(s,(function(t){return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx<a&&(n=t.path,r=c,n.length<r.length&&(0,i.yW)(n,(function(t,e){var n=r[e];return t===n||n.categoryMatchesMap[t.tokenTypeIdx]})));var n,r})),u=(0,i.UI)(l,(function(t){var i=[t.idx+1,a+1],o=0===e.idx?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:i,prefixPath:t.path}),type:bn.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}}));o=o.concat(u)}})),o}(c,o,t,r);return n.concat(l,u)}),[])}(t,e,r,o)})),p=function(t,e,n){var r=[];return(0,i.Ed)(t,(function(t){var o=new we;t.accept(o);var s=o.allProductions;(0,i.Ed)(s,(function(o){var s=function(t){if(t instanceof pt)return ee.OPTION;if(t instanceof ft)return ee.REPETITION;if(t instanceof ht)return ee.REPETITION_MANDATORY;if(t instanceof dt)return ee.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof _t)return ee.REPETITION_WITH_SEPARATOR;if(t instanceof mt)return ee.ALTERNATION;throw Error("non exhaustive match")}(o),a=o.maxLookahead||e,c=ue(o.idx,t,s,a)[0];if((0,i.xb)((0,i.xH)(c))){var l=n.buildEmptyRepetitionError({topLevelRule:t,repetition:o});r.push({message:l,type:bn.NO_NON_EMPTY_LOOKAHEAD,ruleName:t.name})}}))})),r}(t,e,o));var h=function(t,e,n){var r=[],o=(0,i.UI)(e,(function(t){return t.name}));return(0,i.Ed)(t,(function(t){var e=t.name;if((0,i.r3)(o,e)){var s=n.buildNamespaceConflictError(t);r.push({message:s,type:bn.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e})}})),r}(t,n,o),d=i.UI(n,(function(t){return function(t,e){var n=[];return t.name.match(ve)||n.push({message:e.buildTokenNameError({tokenType:t,expectedPattern:ve}),type:bn.INVALID_TOKEN_NAME}),n}(t,o)})),f=function(t,e){var n=[];return(0,i.Ed)(t,(function(t){var r=new Ht("");t.accept(r);var o=(0,i.UI)(r.result,(function(t){return t.orgProd}));n.push((0,i.UI)(o,(function(n){return function(t,e,n){var r,i=[];return e.name.match(ye)||(r=n.buildInvalidNestedRuleNameError(t,e),i.push({message:r,type:bn.INVALID_NESTED_RULE_NAME,ruleName:t.name})),i}(t,n,e)})))})),(0,i.xH)(n)}(t,o),_=function(t,e){var n=[];return(0,i.Ed)(t,(function(t){var r=new Ht("");t.accept(r);var o=(0,i.vM)(r.result,(function(t){return t.name})),s=(0,i.ei)(o,(function(t){return t.length>1}));(0,i.Ed)((0,i.VO)(s),(function(r){var o=(0,i.UI)(r,(function(t){return t.orgProd})),s=e.buildDuplicateNestedRuleNameError(t,o);n.push({message:s,type:bn.DUPLICATE_NESTED_NAME,ruleName:t.name})}))})),n}(t,o),m=(0,i.UI)(t,(function(t){return function(t,e){var n=new xe;t.accept(n);var r=n.alternations;return i.u4(r,(function(n,r){return r.definition.length>255&&n.push({message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:r}),type:bn.TOO_MANY_ALTS,ruleName:t.name,occurrence:r.idx}),n}),[])}(t,o)})),g=(0,i.UI)(t,(function(t){return function(t,e){var n=[],r=t.name;return r.match(ve)||n.push({message:e.buildInvalidRuleNameError({topLevelRule:t,expectedPattern:ve}),type:bn.INVALID_RULE_NAME,ruleName:r}),n}(t,o)})),v=(0,i.UI)(t,(function(e){return function(t,e,n,r){var o=[];if((0,i.u4)(e,(function(e,n){return n.name===t.name?e+1:e}),0)>1){var s=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});o.push({message:s,type:bn.DUPLICATE_RULE_NAME,ruleName:t.name})}return o}(e,t,s,o)}));return i.xH(a.concat(d,f,_,p,c,l,u,h,m,g,v))}function _e(t){return St(t)+"_#_"+t.idx+"_#_"+me(t)}function me(t){return t instanceof gt?t.terminalType.name:t instanceof ct?t.nonTerminalName:""}var ge=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return de(e,t),e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(xt),ve=/^[a-zA-Z_]\w*$/,ye=new RegExp(ve.source.replace("^","^\\$"));function Ee(t,e,n,r){void 0===r&&(r=[]);var o=[],s=be(e.definition);if(i.xb(s))return[];var a=t.name;i.r3(s,t)&&o.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:bn.LEFT_RECURSION,ruleName:a});var c=i.e5(s,r.concat([t])),l=i.UI(c,(function(e){var o=i.Qw(r);return o.push(e),Ee(t,e,n,o)}));return o.concat(i.xH(l))}function be(t){var e=[];if(i.xb(t))return e;var n=i.Ps(t);if(n instanceof ct)e.push(n.referencedRule);else if(n instanceof ut||n instanceof pt||n instanceof ht||n instanceof dt||n instanceof _t||n instanceof ft)e=e.concat(be(n.definition));else if(n instanceof mt)e=i.xH(i.UI(n.definition,(function(t){return be(t.definition)})));else if(!(n instanceof gt))throw Error("non exhaustive match");var r=Nt(n),o=t.length>1;if(r&&o){var s=i.Cw(t);return e.concat(be(s))}return e}var xe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.alternations=[],e}return de(e,t),e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(xt),we=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allProductions=[],e}return de(e,t),e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(xt),Ne={buildMismatchTokenMessage:function(t){var e=t.expected,n=t.actual;return t.previous,t.ruleName,"Expecting "+(et(e)?"--\x3e "+q(e)+" <--":"token of type --\x3e "+e.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(t){var e=t.firstRedundant;return t.ruleName,"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(t){var e=t.expectedPathsPerAlt,n=t.actual,r=(t.previous,t.customUserDescription),o=(t.ruleName,"Expecting: "),s="\nbut found: '"+(0,i.Ps)(n).image+"'";if(r)return o+r+s;var a=(0,i.u4)(e,(function(t,e){return t.concat(e)}),[]),c=(0,i.UI)(a,(function(t){return"["+(0,i.UI)(t,(function(t){return q(t)})).join(", ")+"]"}));return o+"one of these possible Token sequences:\n"+(0,i.UI)(c,(function(t,e){return" "+(e+1)+". "+t})).join("\n")+s},buildEarlyExitMessage:function(t){var e=t.expectedIterationPaths,n=t.actual,r=t.customUserDescription,o=(t.ruleName,"Expecting: "),s="\nbut found: '"+(0,i.Ps)(n).image+"'";return r?o+r+s:o+"expecting at least one iteration which starts with one of these possible Token sequences::\n <"+(0,i.UI)(e,(function(t){return"["+(0,i.UI)(t,(function(t){return q(t)})).join(",")+"]"})).join(" ,")+">"+s}};Object.freeze(Ne);var Se={buildRuleNotFoundError:function(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"}},Le={buildDuplicateFoundError:function(t,e){var n,r=t.name,o=(0,i.Ps)(e),s=o.idx,a=St(o),c=(n=o)instanceof gt?n.terminalType.name:n instanceof ct?n.nonTerminalName:"",l="->"+a+(s>0?s:"")+"<- "+(c?"with argument: ->"+c+"<-":"")+"\n appears more than once ("+e.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return(l=l.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildInvalidNestedRuleNameError:function(t,e){return"Invalid nested rule name: ->"+e.name+"<- inside rule: ->"+t.name+"<-\nit must match the pattern: ->"+ye.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(t,e){return"Duplicate nested rule name: ->"+(0,i.Ps)(e).name+"<- inside rule: ->"+t.name+"<-\nA nested name must be unique in the scope of a top level grammar rule."},buildNamespaceConflictError:function(t){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+t.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(t){var e=(0,i.UI)(t.prefixPath,(function(t){return q(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return"Ambiguous alternatives: <"+t.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+n+"> inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(t){var e=(0,i.UI)(t.prefixPath,(function(t){return q(t)})).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return"Ambiguous Alternatives Detected: <"+t.ambiguityIndices.join(" ,")+"> in <OR"+n+"> inside <"+t.topLevelRule.name+"> Rule,\n<"+e+"> may appears as a prefix path in all these alternatives.\n"+"See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(t){var e=St(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),"The repetition <"+e+"> within Rule <"+t.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(t){return"Invalid Grammar Token name: ->"+t.tokenType.name+"<- it must match the pattern: ->"+t.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(t){return"Ambiguous empty alternative: <"+(t.emptyChoiceIdx+1)+"> in <OR"+t.alternation.idx+"> inside <"+t.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(t){return"An Alternation cannot have more than 256 alternatives:\n<OR"+t.alternation.idx+"> inside <"+t.topLevelRule.name+"> Rule.\n has "+(t.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(t){var e=t.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+e+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+e+" --\x3e "+i.UI(t.leftRecursionPath,(function(t){return t.name})).concat([e]).join(" --\x3e ")+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(t){return"Invalid grammar rule name: ->"+t.topLevelRule.name+"<- it must match the pattern: ->"+t.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(t){return"Duplicate definition, rule: ->"+(t.topLevelRule instanceof lt?t.topLevelRule.name:t.topLevelRule)+"<- is already defined in the grammar: ->"+t.grammarName+"<-"}},Qe=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Te=function(t){function e(e,n){var r=t.call(this)||this;return r.nameToTopRule=e,r.errMsgProvider=n,r.errors=[],r}return Qe(e,t),e.prototype.resolveRefs=function(){var t=this;(0,i.Ed)((0,i.VO)(this.nameToTopRule),(function(e){t.currTopLevel=e,e.accept(t)}))},e.prototype.visitNonTerminal=function(t){var e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:bn.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(xt);function Re(t){t=(0,i.ce)(t,{errMsgProvider:Se});var e,n,r,o={};return(0,i.Ed)(t.rules,(function(t){o[t.name]=t})),e=o,n=t.errMsgProvider,(r=new Te(e,n)).resolveRefs(),r.errors}function Ce(t){return fe((t=(0,i.ce)(t,{errMsgProvider:Le,ignoredIssues:{}})).rules,t.maxLookahead,t.tokenTypes,t.ignoredIssues,t.errMsgProvider,t.grammarName)}function Ae(t){(0,i.Ed)(t.rules,(function(t){var e=new Lt;t.accept(e),(0,i.Ed)(e.dslMethods,(function(t){(0,i.Ed)(t,(function(t,e){t.idx=e+1}))}))}))}var Ue="MismatchedTokenException",ke="NoViableAltException",Oe="EarlyExitException",Be="NotAllInputParsedException",De=[Ue,ke,Oe,Be];function Ie(t){return(0,i.r3)(De,t.name)}function Fe(t,e,n){this.name=Ue,this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function Pe(t,e,n){this.name=ke,this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}function Me(t,e){this.name=Be,this.message=t,this.token=e,this.resyncedTokens=[]}function je(t,e,n){this.name=Oe,this.message=t,this.token=e,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(De),Fe.prototype=Error.prototype,Pe.prototype=Error.prototype,Me.prototype=Error.prototype,je.prototype=Error.prototype;var Ve={},Ge="InRuleRecoveryException";function He(t){this.name=Ge,this.message=t}He.prototype=Error.prototype;var We=function(){function t(){}return t.prototype.initRecoverable=function(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,i.e$)(t,"recoveryEnabled")?t.recoveryEnabled:xn.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Je)},t.prototype.getTokenToInsert=function(t){var e=it(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e},t.prototype.canTokenTypeBeInsertedInRecovery=function(t){return!0},t.prototype.tryInRepetitionRecovery=function(t,e,n,r){for(var o=this,s=this.findReSyncTokenType(),a=this.exportLexerState(),c=[],l=!1,u=this.LA(1),p=this.LA(1),h=function(){var t=o.LA(0),e=new Fe(o.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:t,ruleName:o.getCurrRuleFullName()}),u,o.LA(0));e.resyncedTokens=(0,i.j7)(c),o.SAVE_ERROR(e)};!l;){if(this.tokenMatcher(p,r))return void h();if(n.call(this))return h(),void t.apply(this,e);this.tokenMatcher(p,s)?l=!0:(p=this.SKIP_TOKEN(),this.addToResyncTokens(p,c))}this.importLexerState(a)},t.prototype.shouldInRepetitionRecoveryBeTried=function(t,e,n){return!1!==n&&void 0!==t&&void 0!==e&&!this.tokenMatcher(this.LA(1),t)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e))},t.prototype.getFollowsForInRuleRecovery=function(t,e){var n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)},t.prototype.tryInRuleRecovery=function(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new He("sad sad panda")},t.prototype.canPerformInRuleRecovery=function(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)},t.prototype.canRecoverWithSingleTokenInsertion=function(t,e){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if((0,i.xb)(e))return!1;var r=this.LA(1);return void 0!==(0,i.sE)(e,(function(t){return n.tokenMatcher(r,t)}))},t.prototype.canRecoverWithSingleTokenDeletion=function(t){return this.tokenMatcher(this.LA(2),t)},t.prototype.isInCurrentRuleReSyncSet=function(t){var e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return(0,i.r3)(n,t)},t.prototype.findReSyncTokenType=function(){for(var t=this.flattenFollowSet(),e=this.LA(1),n=2;;){var r=e.tokenType;if((0,i.r3)(t,r))return r;e=this.LA(n),n++}},t.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return Ve;var t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}},t.prototype.buildFullFollowKeyStack=function(){var t=this,e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return(0,i.xb)(this.LAST_EXPLICIT_RULE_STACK)||(e=(0,i.UI)(this.LAST_EXPLICIT_RULE_STACK,(function(e){return t.RULE_STACK[e]})),n=(0,i.UI)(this.LAST_EXPLICIT_RULE_STACK,(function(e){return t.RULE_OCCURRENCE_STACK[e]}))),(0,i.UI)(e,(function(r,i){return 0===i?Ve:{ruleName:t.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:t.shortRuleNameToFullName(e[i-1])}}))},t.prototype.flattenFollowSet=function(){var t=this,e=(0,i.UI)(this.buildFullFollowKeyStack(),(function(e){return t.getFollowSetFromFollowKey(e)}));return(0,i.xH)(e)},t.prototype.getFollowSetFromFollowKey=function(t){if(t===Ve)return[rt];var e=t.ruleName+t.idxInCallingRule+Rt+t.inRule;return this.resyncFollows[e]},t.prototype.addToResyncTokens=function(t,e){return this.tokenMatcher(t,rt)||e.push(t),e},t.prototype.reSyncTo=function(t){for(var e=[],n=this.LA(1);!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return(0,i.j7)(e)},t.prototype.attemptInRepetitionRecovery=function(t,e,n,r,i,o,s){},t.prototype.getCurrentGrammarPath=function(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,i.Qw)(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}},t.prototype.getHumanReadableRuleStack=function(){var t=this;return(0,i.xb)(this.LAST_EXPLICIT_RULE_STACK)?(0,i.UI)(this.RULE_STACK,(function(e){return t.shortRuleNameToFullName(e)})):(0,i.UI)(this.LAST_EXPLICIT_RULE_STACK,(function(e){return t.shortRuleNameToFullName(t.RULE_STACK[e])}))},t}();function Je(t,e,n,r,i,o,s){var a=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[a];if(void 0===c){var l=this.getCurrRuleFullName();c=new o(this.getGAstProductions()[l],i).startWalking(),this.firstAfterRepMap[a]=c}var u=c.token,p=c.occurrence,h=c.isEndOfRule;1===this.RULE_STACK.length&&h&&void 0===u&&(u=rt,p=1),this.shouldInRepetitionRecoveryBeTried(u,p,s)&&this.tryInRepetitionRecovery(t,e,n,u)}var ze,Ze=function(){function t(){}return t.prototype.initLooksAhead=function(t){this.dynamicTokensEnabled=(0,i.e$)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:xn.dynamicTokensEnabled,this.maxLookahead=(0,i.e$)(t,"maxLookahead")?t.maxLookahead:xn.maxLookahead,this.lookAheadFuncsCache=(0,i.dU)()?new Map:[],(0,i.dU)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},t.prototype.preComputeLookaheadFunctions=function(t){var e=this;(0,i.Ed)(t,(function(t){e.TRACE_INIT(t.name+" Rule Lookahead",(function(){var n=function(t){Qt.reset(),t.accept(Qt);var e=Qt.dslMethods;return Qt.reset(),e}(t),r=n.alternation,o=n.repetition,s=n.option,a=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,l=n.repetitionWithSeparator;(0,i.Ed)(r,(function(n){var r=0===n.idx?"":n.idx;e.TRACE_INIT(""+St(n)+r,(function(){var r,i,o,s,a,c,l=(r=n.idx,i=t,o=n.maxLookahead||e.maxLookahead,s=n.hasPredicates,a=e.dynamicTokensEnabled,(0,e.lookAheadBuilderForAlternatives)(c=le(r,i,o),s,he(c)?j:M,a)),u=Ft(e.fullRuleNameToShort[t.name],Ut,n.idx);e.setLaFuncCache(u,l)}))})),(0,i.Ed)(o,(function(n){e.computeLookaheadFunc(t,n.idx,Ot,ee.REPETITION,n.maxLookahead,St(n))})),(0,i.Ed)(s,(function(n){e.computeLookaheadFunc(t,n.idx,kt,ee.OPTION,n.maxLookahead,St(n))})),(0,i.Ed)(a,(function(n){e.computeLookaheadFunc(t,n.idx,Bt,ee.REPETITION_MANDATORY,n.maxLookahead,St(n))})),(0,i.Ed)(c,(function(n){e.computeLookaheadFunc(t,n.idx,It,ee.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,St(n))})),(0,i.Ed)(l,(function(n){e.computeLookaheadFunc(t,n.idx,Dt,ee.REPETITION_WITH_SEPARATOR,n.maxLookahead,St(n))}))}))}))},t.prototype.computeLookaheadFunc=function(t,e,n,r,i,o){var s=this;this.TRACE_INIT(""+o+(0===e?"":e),(function(){var o=function(t,e,n,r,i,o){var s=ue(t,e,i,n),a=he(s)?j:M;return o(s[0],a,r)}(e,t,i||s.maxLookahead,s.dynamicTokensEnabled,r,s.lookAheadBuilderForOptional),a=Ft(s.fullRuleNameToShort[t.name],n,e);s.setLaFuncCache(a,o)}))},t.prototype.lookAheadBuilderForOptional=function(t,e,n){return function(t,e,n){var r=(0,i.yW)(t,(function(t){return 1===t.length})),o=t.length;if(r&&!n){var s=(0,i.xH)(t);if(1===s.length&&(0,i.xb)(s[0].categoryMatches)){var a=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}var c=(0,i.u4)(s,(function(t,e,n){return t[e.tokenTypeIdx]=!0,(0,i.Ed)(e.categoryMatches,(function(e){t[e]=!0})),t}),[]);return function(){var t=this.LA(1);return!0===c[t.tokenTypeIdx]}}return function(){t:for(var n=0;n<o;n++){for(var r=t[n],i=r.length,s=0;s<i;s++){var a=this.LA(s+1);if(!1===e(a,r[s]))continue t}return!0}return!1}}(t,e,n)},t.prototype.lookAheadBuilderForAlternatives=function(t,e,n,r){return function(t,e,n,r){var o=t.length,s=(0,i.yW)(t,(function(t){return(0,i.yW)(t,(function(t){return 1===t.length}))}));if(e)return function(e){for(var r=(0,i.UI)(e,(function(t){return t.GATE})),s=0;s<o;s++){var a=t[s],c=a.length,l=r[s];if(void 0===l||!1!==l.call(this))t:for(var u=0;u<c;u++){for(var p=a[u],h=p.length,d=0;d<h;d++){var f=this.LA(d+1);if(!1===n(f,p[d]))continue t}return s}}};if(s&&!r){var a=(0,i.UI)(t,(function(t){return(0,i.xH)(t)})),c=(0,i.u4)(a,(function(t,e,n){return(0,i.Ed)(e,(function(e){(0,i.e$)(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=n),(0,i.Ed)(e.categoryMatches,(function(e){(0,i.e$)(t,e)||(t[e]=n)}))})),t}),[]);return function(){var t=this.LA(1);return c[t.tokenTypeIdx]}}return function(){for(var e=0;e<o;e++){var r=t[e],i=r.length;t:for(var s=0;s<i;s++){for(var a=r[s],c=a.length,l=0;l<c;l++){var u=this.LA(l+1);if(!1===n(u,a[l]))continue t}return e}}}}(t,e,n,r)},t.prototype.getKeyForAutomaticLookahead=function(t,e){return Ft(this.getLastExplicitRuleShortName(),t,e)},t.prototype.getLaFuncFromCache=function(t){},t.prototype.getLaFuncFromMap=function(t){return this.lookAheadFuncsCache.get(t)},t.prototype.getLaFuncFromObj=function(t){return this.lookAheadFuncsCache[t]},t.prototype.setLaFuncCache=function(t,e){},t.prototype.setLaFuncCacheUsingMap=function(t,e){this.lookAheadFuncsCache.set(t,e)},t.prototype.setLaFuncUsingObj=function(t,e){this.lookAheadFuncsCache[t]=e},t}(),Xe=/^\s*function\s*(\S*)\s*\(/,$e="name";function Ke(t){return t.name||t.toString().match(Xe)[1]}function Ye(t,e){var n=Object.getOwnPropertyDescriptor(t,$e);return!(!(0,i.o8)(n)&&!n.configurable||(Object.defineProperty(t,$e,{enumerable:!1,configurable:!0,writable:!1,value:e}),0))}function qe(t,e){for(var n=(0,i.XP)(t),r=n.length,o=0;o<r;o++)for(var s=t[n[o]],a=s.length,c=0;c<a;c++){var l=s[c];void 0===l.tokenTypeIdx&&(void 0!==l.fullName?this[l.fullName](l.children,e):this[l.name](l.children,e))}}!function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"}(ze||(ze={}));var tn=["constructor","visit","validateVisitor"],en=function(){function t(){}return t.prototype.initTreeBuilder=function(t){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,i.e$)(t,"outputCst")?t.outputCst:xn.outputCst,this.nodeLocationTracking=(0,i.e$)(t,"nodeLocationTracking")?t.nodeLocationTracking:xn.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Vt,this.setNodeLocationFromNode=Vt,this.cstPostRule=i.dG,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i.dG,this.setNodeLocationFromNode=i.dG,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=jt,this.setNodeLocationFromNode=jt,this.cstPostRule=i.dG,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i.dG,this.setNodeLocationFromNode=i.dG,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid <nodeLocationTracking> config option: "'+t.nodeLocationTracking+'"');this.setNodeLocationFromToken=i.dG,this.setNodeLocationFromNode=i.dG,this.cstPostRule=i.dG,this.setInitialNodeLocation=i.dG}else this.cstInvocationStateUpdate=i.dG,this.cstFinallyStateUpdate=i.dG,this.cstPostTerminal=i.dG,this.cstPostNonTerminal=i.dG,this.cstPostRule=i.dG,this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},t.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(t){t.location={startOffset:NaN,endOffset:NaN}},t.prototype.setInitialNodeLocationOnlyOffsetRegular=function(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},t.prototype.setInitialNodeLocationFullRecovery=function(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.setInitialNodeLocationFullRegular=function(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.cstNestedInvocationStateUpdate=function(t,e){var n={name:t,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+t,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstInvocationStateUpdate=function(t,e){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var n={name:t,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},t.prototype.cstNestedFinallyStateUpdate=function(){var t=this.CST_STACK.pop();this.cstPostRule(t)},t.prototype.cstPostRuleFull=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==1?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},t.prototype.cstPostRuleOnlyOffset=function(t){var e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==1?n.endOffset=e.endOffset:n.startOffset=NaN},t.prototype.cstPostTerminal=function(t,e){var n,r,i,o=this.CST_STACK[this.CST_STACK.length-1];r=e,i=t,void 0===(n=o).children[i]?n.children[i]=[r]:n.children[i].push(r),this.setNodeLocationFromToken(o.location,e)},t.prototype.cstPostNonTerminal=function(t,e){if(!0!==this.isBackTracking()){var n=this.CST_STACK[this.CST_STACK.length-1];Gt(n,e,t),this.setNodeLocationFromNode(n.location,t.location)}},t.prototype.getBaseCstVisitorConstructor=function(){if((0,i.o8)(this.baseCstVisitorConstructor)){var t=(e=this.className,n=this.allRuleNames,Ye(r=function(){},e+"BaseSemantics"),(r.prototype={visit:function(t,e){if((0,i.kJ)(t)&&(t=t[0]),!(0,i.o8)(t))return void 0!==t.fullName?this[t.fullName](t.children,e):this[t.name](t.children,e)},validateVisitor:function(){var t=function(t,e){var n=function(t,e){var n=(0,i.UI)(e,(function(e){if(!(0,i.mf)(t[e]))return{msg:"Missing visitor method: <"+e+"> on "+Ke(t.constructor)+" CST Visitor.",type:ze.MISSING_METHOD,methodName:e}}));return(0,i.oA)(n)}(t,e),r=function(t,e){var n=[];for(var r in t)ve.test(r)&&(0,i.mf)(t[r])&&!(0,i.r3)(tn,r)&&!(0,i.r3)(e,r)&&n.push({msg:"Redundant visitor method: <"+r+"> on "+Ke(t.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+ve.source+"/.",type:ze.REDUNDANT_METHOD,methodName:r});return n}(t,e);return n.concat(r)}(this,n);if(!(0,i.xb)(t)){var e=(0,i.UI)(t,(function(t){return t.msg}));throw Error("Errors Detected in CST Visitor <"+Ke(this.constructor)+">:\n\t"+e.join("\n\n").replace(/\n/g,"\n\t"))}}}).constructor=r,r._RULE_NAMES=n,r);return this.baseCstVisitorConstructor=t,t}var e,n,r;return this.baseCstVisitorConstructor},t.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,i.o8)(this.baseCstVisitorWithDefaultsConstructor)){var t=function(t,e,n){var r=function(){};Ye(r,t+"BaseSemanticsWithDefaults");var o=Object.create(n.prototype);return(0,i.Ed)(e,(function(t){o[t]=qe})),(r.prototype=o).constructor=r,r}(this.className,this.allRuleNames,this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor},t.prototype.nestedRuleBeforeClause=function(t,e){var n;return void 0!==t.NAME?(n=t.NAME,this.nestedRuleInvocationStateUpdate(n,e),n):void 0},t.prototype.nestedAltBeforeClause=function(t,e,n,r){var i,o=Pt(this.getLastExplicitRuleShortName(),n,e,r);return void 0!==t.NAME?(i=t.NAME,this.nestedRuleInvocationStateUpdate(i,o),{shortName:o,nestedName:i}):void 0},t.prototype.nestedRuleFinallyClause=function(t,e){var n=this.CST_STACK,r=n[n.length-1];this.nestedRuleFinallyStateUpdate();var i=n[n.length-1];Gt(i,e,r),this.setNodeLocationFromNode(i.location,r.location)},t.prototype.getLastExplicitRuleShortName=function(){var t=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[t]},t.prototype.getLastExplicitRuleShortNameNoCst=function(){var t=this.RULE_STACK;return t[t.length-1]},t.prototype.getPreviousExplicitRuleShortName=function(){var t=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[t]},t.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var t=this.RULE_STACK;return t[t.length-2]},t.prototype.getLastExplicitRuleOccurrenceIndex=function(){var t=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[t]},t.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]},t.prototype.nestedRuleInvocationStateUpdate=function(t,e){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(e),this.cstNestedInvocationStateUpdate(t,e)},t.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},t}(),nn=function(){function t(){}return t.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(t.prototype,"input",{get:function(){return this.tokVector},set:function(t){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length},enumerable:!0,configurable:!0}),t.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):En},t.prototype.LA=function(t){var e=this.currIdx+t;return e<0||this.tokVectorLength<=e?En:this.tokVector[e]},t.prototype.consumeToken=function(){this.currIdx++},t.prototype.exportLexerState=function(){return this.currIdx},t.prototype.importLexerState=function(t){this.currIdx=t},t.prototype.resetLexerState=function(){this.currIdx=-1},t.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},t.prototype.getLexerPosition=function(){return this.exportLexerState()},t}(),rn=function(){function t(){}return t.prototype.ACTION=function(t){return t.call(this)},t.prototype.consume=function(t,e,n){return this.consumeInternal(e,t,n)},t.prototype.subrule=function(t,e,n){return this.subruleInternal(e,t,n)},t.prototype.option=function(t,e){return this.optionInternal(e,t)},t.prototype.or=function(t,e){return this.orInternal(e,t)},t.prototype.many=function(t,e){return this.manyInternal(t,e)},t.prototype.atLeastOne=function(t,e){return this.atLeastOneInternal(t,e)},t.prototype.CONSUME=function(t,e){return this.consumeInternal(t,0,e)},t.prototype.CONSUME1=function(t,e){return this.consumeInternal(t,1,e)},t.prototype.CONSUME2=function(t,e){return this.consumeInternal(t,2,e)},t.prototype.CONSUME3=function(t,e){return this.consumeInternal(t,3,e)},t.prototype.CONSUME4=function(t,e){return this.consumeInternal(t,4,e)},t.prototype.CONSUME5=function(t,e){return this.consumeInternal(t,5,e)},t.prototype.CONSUME6=function(t,e){return this.consumeInternal(t,6,e)},t.prototype.CONSUME7=function(t,e){return this.consumeInternal(t,7,e)},t.prototype.CONSUME8=function(t,e){return this.consumeInternal(t,8,e)},t.prototype.CONSUME9=function(t,e){return this.consumeInternal(t,9,e)},t.prototype.SUBRULE=function(t,e){return this.subruleInternal(t,0,e)},t.prototype.SUBRULE1=function(t,e){return this.subruleInternal(t,1,e)},t.prototype.SUBRULE2=function(t,e){return this.subruleInternal(t,2,e)},t.prototype.SUBRULE3=function(t,e){return this.subruleInternal(t,3,e)},t.prototype.SUBRULE4=function(t,e){return this.subruleInternal(t,4,e)},t.prototype.SUBRULE5=function(t,e){return this.subruleInternal(t,5,e)},t.prototype.SUBRULE6=function(t,e){return this.subruleInternal(t,6,e)},t.prototype.SUBRULE7=function(t,e){return this.subruleInternal(t,7,e)},t.prototype.SUBRULE8=function(t,e){return this.subruleInternal(t,8,e)},t.prototype.SUBRULE9=function(t,e){return this.subruleInternal(t,9,e)},t.prototype.OPTION=function(t){return this.optionInternal(t,0)},t.prototype.OPTION1=function(t){return this.optionInternal(t,1)},t.prototype.OPTION2=function(t){return this.optionInternal(t,2)},t.prototype.OPTION3=function(t){return this.optionInternal(t,3)},t.prototype.OPTION4=function(t){return this.optionInternal(t,4)},t.prototype.OPTION5=function(t){return this.optionInternal(t,5)},t.prototype.OPTION6=function(t){return this.optionInternal(t,6)},t.prototype.OPTION7=function(t){return this.optionInternal(t,7)},t.prototype.OPTION8=function(t){return this.optionInternal(t,8)},t.prototype.OPTION9=function(t){return this.optionInternal(t,9)},t.prototype.OR=function(t){return this.orInternal(t,0)},t.prototype.OR1=function(t){return this.orInternal(t,1)},t.prototype.OR2=function(t){return this.orInternal(t,2)},t.prototype.OR3=function(t){return this.orInternal(t,3)},t.prototype.OR4=function(t){return this.orInternal(t,4)},t.prototype.OR5=function(t){return this.orInternal(t,5)},t.prototype.OR6=function(t){return this.orInternal(t,6)},t.prototype.OR7=function(t){return this.orInternal(t,7)},t.prototype.OR8=function(t){return this.orInternal(t,8)},t.prototype.OR9=function(t){return this.orInternal(t,9)},t.prototype.MANY=function(t){this.manyInternal(0,t)},t.prototype.MANY1=function(t){this.manyInternal(1,t)},t.prototype.MANY2=function(t){this.manyInternal(2,t)},t.prototype.MANY3=function(t){this.manyInternal(3,t)},t.prototype.MANY4=function(t){this.manyInternal(4,t)},t.prototype.MANY5=function(t){this.manyInternal(5,t)},t.prototype.MANY6=function(t){this.manyInternal(6,t)},t.prototype.MANY7=function(t){this.manyInternal(7,t)},t.prototype.MANY8=function(t){this.manyInternal(8,t)},t.prototype.MANY9=function(t){this.manyInternal(9,t)},t.prototype.MANY_SEP=function(t){this.manySepFirstInternal(0,t)},t.prototype.MANY_SEP1=function(t){this.manySepFirstInternal(1,t)},t.prototype.MANY_SEP2=function(t){this.manySepFirstInternal(2,t)},t.prototype.MANY_SEP3=function(t){this.manySepFirstInternal(3,t)},t.prototype.MANY_SEP4=function(t){this.manySepFirstInternal(4,t)},t.prototype.MANY_SEP5=function(t){this.manySepFirstInternal(5,t)},t.prototype.MANY_SEP6=function(t){this.manySepFirstInternal(6,t)},t.prototype.MANY_SEP7=function(t){this.manySepFirstInternal(7,t)},t.prototype.MANY_SEP8=function(t){this.manySepFirstInternal(8,t)},t.prototype.MANY_SEP9=function(t){this.manySepFirstInternal(9,t)},t.prototype.AT_LEAST_ONE=function(t){this.atLeastOneInternal(0,t)},t.prototype.AT_LEAST_ONE1=function(t){return this.atLeastOneInternal(1,t)},t.prototype.AT_LEAST_ONE2=function(t){this.atLeastOneInternal(2,t)},t.prototype.AT_LEAST_ONE3=function(t){this.atLeastOneInternal(3,t)},t.prototype.AT_LEAST_ONE4=function(t){this.atLeastOneInternal(4,t)},t.prototype.AT_LEAST_ONE5=function(t){this.atLeastOneInternal(5,t)},t.prototype.AT_LEAST_ONE6=function(t){this.atLeastOneInternal(6,t)},t.prototype.AT_LEAST_ONE7=function(t){this.atLeastOneInternal(7,t)},t.prototype.AT_LEAST_ONE8=function(t){this.atLeastOneInternal(8,t)},t.prototype.AT_LEAST_ONE9=function(t){this.atLeastOneInternal(9,t)},t.prototype.AT_LEAST_ONE_SEP=function(t){this.atLeastOneSepFirstInternal(0,t)},t.prototype.AT_LEAST_ONE_SEP1=function(t){this.atLeastOneSepFirstInternal(1,t)},t.prototype.AT_LEAST_ONE_SEP2=function(t){this.atLeastOneSepFirstInternal(2,t)},t.prototype.AT_LEAST_ONE_SEP3=function(t){this.atLeastOneSepFirstInternal(3,t)},t.prototype.AT_LEAST_ONE_SEP4=function(t){this.atLeastOneSepFirstInternal(4,t)},t.prototype.AT_LEAST_ONE_SEP5=function(t){this.atLeastOneSepFirstInternal(5,t)},t.prototype.AT_LEAST_ONE_SEP6=function(t){this.atLeastOneSepFirstInternal(6,t)},t.prototype.AT_LEAST_ONE_SEP7=function(t){this.atLeastOneSepFirstInternal(7,t)},t.prototype.AT_LEAST_ONE_SEP8=function(t){this.atLeastOneSepFirstInternal(8,t)},t.prototype.AT_LEAST_ONE_SEP9=function(t){this.atLeastOneSepFirstInternal(9,t)},t.prototype.RULE=function(t,e,n){if(void 0===n&&(n=wn),(0,i.r3)(this.definedRulesNames,t)){var r={message:Le.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:bn.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(r)}this.definedRulesNames.push(t);var o=this.defineRule(t,e,n);return this[t]=o,o},t.prototype.OVERRIDE_RULE=function(t,e,n){void 0===n&&(n=wn);var r,o,s,a,c,l=[];l=l.concat((r=t,o=this.definedRulesNames,s=this.className,c=[],i.r3(o,r)||(a="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+s+"<-as it is not defined in any of the super grammars ",c.push({message:a,type:bn.INVALID_RULE_OVERRIDE,ruleName:r})),c)),this.definitionErrors.push.apply(this.definitionErrors,l);var u=this.defineRule(t,e,n);return this[t]=u,u},t.prototype.BACKTRACK=function(t,e){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return t.apply(this,e),!0}catch(t){if(Ie(t))return!1;throw t}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},t.prototype.getGAstProductions=function(){return this.gastProductionsCache},t.prototype.getSerializedGastProductions=function(){return vt((0,i.VO)(this.gastProductionsCache))},t}(),on=function(){function t(){}return t.prototype.initRecognizerEngine=function(t,e){if(this.className=Ke(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=j,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,i.e$)(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,i.kJ)(t)){if((0,i.xb)(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,i.kJ)(t))this.tokensMap=(0,i.u4)(t,(function(t,e){return t[e.name]=e,t}),{});else if((0,i.e$)(t,"modes")&&(0,i.yW)((0,i.xH)((0,i.VO)(t.modes)),Z)){var n=(0,i.xH)((0,i.VO)(t.modes)),r=(0,i.jj)(n);this.tokensMap=(0,i.u4)(r,(function(t,e){return t[e.name]=e,t}),{})}else{if(!(0,i.Kn)(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,i.Cl)(t)}this.tokensMap.EOF=rt;var o=(0,i.yW)((0,i.VO)(t),(function(t){return(0,i.xb)(t.categoryMatches)}));this.tokenMatcher=o?j:M,H((0,i.VO)(this.tokensMap))},t.prototype.defineRule=function(t,e,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+t+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,o=(0,i.e$)(n,"resyncEnabled")?n.resyncEnabled:wn.resyncEnabled,s=(0,i.e$)(n,"recoveryValueFunc")?n.recoveryValueFunc:wn.recoveryValueFunc,a=this.ruleShortNameIdx<<12;function c(t){try{if(!0===this.outputCst){e.apply(this,t);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return e.apply(this,t)}catch(t){return this.invokeRuleCatch(t,o,s)}finally{this.ruleFinallyStateUpdate()}}return this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a,(r=function(e,n){return void 0===e&&(e=0),this.ruleInvocationStateUpdate(a,t,e),c.call(this,n)}).ruleName=t,r.originalGrammarAction=e,r},t.prototype.invokeRuleCatch=function(t,e,n){var r=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Ie(t)){var o=t;if(i){var s,a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))return o.resyncedTokens=this.reSyncTo(a),this.outputCst?((s=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,s):n();throw this.outputCst&&((s=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o.partialCstResult=s),o}if(r)return this.moveToTerminatedState(),n();throw o}throw t},t.prototype.optionInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(kt,e),r=this.nestedRuleBeforeClause(t,n);try{return this.optionInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.optionInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(kt,e);return this.optionInternalLogic(t,e,n)},t.prototype.optionInternalLogic=function(t,e,n){var r,i,o=this,s=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,void 0!==(i=t.GATE)){var a=s;s=function(){return i.call(o)&&a.call(o)}}}else r=t;if(!0===s.call(this))return r.call(this)},t.prototype.atLeastOneInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(Bt,t),r=this.nestedRuleBeforeClause(e,n);try{return this.atLeastOneInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.atLeastOneInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(Bt,t);this.atLeastOneInternalLogic(t,e,n)},t.prototype.atLeastOneInternalLogic=function(t,e,n){var r,i,o=this,s=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var a=s;s=function(){return i.call(o)&&a.call(o)}}}else r=e;if(!0!==s.call(this))throw this.raiseEarlyExitException(t,ee.REPETITION_MANDATORY,e.ERR_MSG);for(var c=this.doSingleRepetition(r);!0===s.call(this)&&!0===c;)c=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],s,Bt,t,$t)},t.prototype.atLeastOneSepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(It,t),r=this.nestedRuleBeforeClause(e,n);try{this.atLeastOneSepFirstInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.atLeastOneSepFirstInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(It,t);this.atLeastOneSepFirstInternalLogic(t,e,n)},t.prototype.atLeastOneSepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,ee.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);i.call(this);for(var s=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,Kt],s,It,t,Kt)},t.prototype.manyInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(Ot,t),r=this.nestedRuleBeforeClause(e,n);try{return this.manyInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.manyInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(Ot,t);return this.manyInternalLogic(t,e,n)},t.prototype.manyInternalLogic=function(t,e,n){var r,i,o=this,s=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(i=e.GATE)){var a=s;s=function(){return i.call(o)&&a.call(o)}}}else r=e;for(var c=!0;!0===s.call(this)&&!0===c;)c=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],s,Ot,t,Zt,c)},t.prototype.manySepFirstInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(Dt,t),r=this.nestedRuleBeforeClause(e,n);try{this.manySepFirstInternalLogic(t,e,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.manySepFirstInternalNoCst=function(t,e){var n=this.getKeyForAutomaticLookahead(Dt,t);this.manySepFirstInternalLogic(t,e,n)},t.prototype.manySepFirstInternalLogic=function(t,e,n){var r=this,i=e.DEF,o=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){i.call(this);for(var s=function(){return r.tokenMatcher(r.LA(1),o)};!0===this.tokenMatcher(this.LA(1),o);)this.CONSUME(o),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,s,i,Xt],s,Dt,t,Xt)}},t.prototype.repetitionSepSecondInternal=function(t,e,n,r,i){for(;n();)this.CONSUME(e),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,r,i],n,It,t,i)},t.prototype.doSingleRepetition=function(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e},t.prototype.orInternalNoCst=function(t,e){var n=(0,i.kJ)(t)?t:t.DEF,r=this.getKeyForAutomaticLookahead(Ut,e),o=this.getLaFuncFromCache(r).call(this,n);if(void 0!==o)return n[o].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)},t.prototype.orInternal=function(t,e){var n=this.getKeyForAutomaticLookahead(Ut,e),r=this.nestedRuleBeforeClause(t,n);try{var o=(0,i.kJ)(t)?t:t.DEF,s=this.getLaFuncFromCache(n).call(this,o);if(void 0!==s){var a=o[s],c=this.nestedAltBeforeClause(a,e,Ut,s);try{return a.ALT.call(this)}finally{void 0!==c&&this.nestedRuleFinallyClause(c.shortName,c.nestedName)}}this.raiseNoAltException(e,t.ERR_MSG)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},t.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Me(e,t))}},t.prototype.subruleInternal=function(t,e,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=t.call(this,e,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),r}catch(e){this.subruleInternalError(e,n,t.ruleName)}},t.prototype.subruleInternalError=function(t,e,n){throw Ie(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t},t.prototype.consumeInternal=function(t,e,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),r=i):this.consumeInternalError(t,i,n)}catch(n){r=this.consumeInternalRecovery(t,e,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,r),r},t.prototype.consumeInternalError=function(t,e,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Fe(r,e,i))},t.prototype.consumeInternalRecovery=function(t,e,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,r)}catch(t){throw t.name===Ge?n:t}},t.prototype.saveRecogState=function(){var t=this.errors,e=(0,i.Qw)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},t.prototype.reloadRecogState=function(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK},t.prototype.ruleInvocationStateUpdate=function(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e,t)},t.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},t.prototype.getCurrRuleFullName=function(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]},t.prototype.shortRuleNameToFullName=function(t){return this.shortRuleNameToFull[t]},t.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),rt)},t.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},t}(),sn=function(){function t(){}return t.prototype.initErrorHandler=function(t){this._errors=[],this.errorMessageProvider=(0,i.ce)(t.errorMessageProvider,xn.errorMessageProvider)},t.prototype.SAVE_ERROR=function(t){if(Ie(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,i.Qw)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(t.prototype,"errors",{get:function(){return(0,i.Qw)(this._errors)},set:function(t){this._errors=t},enumerable:!0,configurable:!0}),t.prototype.raiseEarlyExitException=function(t,e,n){for(var r=this.getCurrRuleFullName(),i=ue(t,this.getGAstProductions()[r],e,this.maxLookahead)[0],o=[],s=1;s<=this.maxLookahead;s++)o.push(this.LA(s));var a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new je(a,this.LA(1),this.LA(0)))},t.prototype.raiseNoAltException=function(t,e){for(var n=this.getCurrRuleFullName(),r=le(t,this.getGAstProductions()[n],this.maxLookahead),i=[],o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));var s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Pe(a,this.LA(1),s))},t}(),an=function(){function t(){}return t.prototype.initContentAssist=function(){},t.prototype.computeContentAssist=function(t,e){var n=this.gastProductionsCache[t];if((0,i.o8)(n))throw Error("Rule ->"+t+"<- does not exist in this grammar.");return qt([n],e,this.tokenMatcher,this.maxLookahead)},t.prototype.getNextPossibleTokenTypes=function(t){var e=(0,i.Ps)(t.ruleStack),n=this.getGAstProductions()[e];return new Jt(n,t).startWalking()},t}(),cn={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(cn);var ln=Math.pow(2,8)-1,un=nt({name:"RECORDING_PHASE_TOKEN",pattern:Y.NA});H([un]);var pn=it(un,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(pn);var hn={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},dn=function(){function t(){}return t.prototype.initGastRecorder=function(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1},t.prototype.enableRecording=function(){var t=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var e=function(e){var n=e>0?e:"";t["CONSUME"+n]=function(t,n){return this.consumeInternalRecord(t,e,n)},t["SUBRULE"+n]=function(t,n){return this.subruleInternalRecord(t,e,n)},t["OPTION"+n]=function(t){return this.optionInternalRecord(t,e)},t["OR"+n]=function(t){return this.orInternalRecord(t,e)},t["MANY"+n]=function(t){this.manyInternalRecord(e,t)},t["MANY_SEP"+n]=function(t){this.manySepFirstInternalRecord(e,t)},t["AT_LEAST_ONE"+n]=function(t){this.atLeastOneInternalRecord(e,t)},t["AT_LEAST_ONE_SEP"+n]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}},n=0;n<10;n++)e(n);t.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},t.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},t.option=function(t,e){return this.optionInternalRecord(e,t)},t.or=function(t,e){return this.orInternalRecord(e,t)},t.many=function(t,e){this.manyInternalRecord(t,e)},t.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},t.ACTION=t.ACTION_RECORD,t.BACKTRACK=t.BACKTRACK_RECORD,t.LA=t.LA_RECORD}))},t.prototype.disableRecording=function(){var t=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var e=0;e<10;e++){var n=e>0?e:"";delete t["CONSUME"+n],delete t["SUBRULE"+n],delete t["OPTION"+n],delete t["OR"+n],delete t["MANY"+n],delete t["MANY_SEP"+n],delete t["AT_LEAST_ONE"+n],delete t["AT_LEAST_ONE_SEP"+n]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA}))},t.prototype.ACTION_RECORD=function(t){},t.prototype.BACKTRACK_RECORD=function(t,e){return function(){return!0}},t.prototype.LA_RECORD=function(t){return En},t.prototype.topLevelRuleRecord=function(t,e){try{var n=new lt({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(e){throw t}throw t}},t.prototype.optionInternalRecord=function(t,e){return fn.call(this,pt,t,e)},t.prototype.atLeastOneInternalRecord=function(t,e){fn.call(this,ht,e,t)},t.prototype.atLeastOneSepFirstInternalRecord=function(t,e){fn.call(this,dt,e,t,!0)},t.prototype.manyInternalRecord=function(t,e){fn.call(this,ft,e,t)},t.prototype.manySepFirstInternalRecord=function(t,e){fn.call(this,_t,e,t,!0)},t.prototype.orInternalRecord=function(t,e){return _n.call(this,t,e)},t.prototype.subruleInternalRecord=function(t,e,n){if(gn(e),!t||!1===(0,i.e$)(t,"ruleName")){var r=new Error("<SUBRULE"+mn(e)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=(0,i.fj)(this.recordingProdStack),s=t.ruleName,a=new ct({idx:e,nonTerminalName:s,referencedRule:void 0});return o.definition.push(a),this.outputCst?hn:cn},t.prototype.consumeInternalRecord=function(t,e,n){if(gn(e),!J(t)){var r=new Error("<CONSUME"+mn(e)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(t)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var o=(0,i.fj)(this.recordingProdStack),s=new gt({idx:e,terminalType:t});return o.definition.push(s),pn},t}();function fn(t,e,n,r){void 0===r&&(r=!1),gn(n);var o=(0,i.fj)(this.recordingProdStack),s=(0,i.mf)(e)?e:e.DEF,a=new t({definition:[],idx:n});return(0,i.e$)(e,"NAME")&&(a.name=e.NAME),r&&(a.separator=e.SEP),(0,i.e$)(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),o.definition.push(a),this.recordingProdStack.pop(),cn}function _n(t,e){var n=this;gn(e);var r=(0,i.fj)(this.recordingProdStack),o=!1===(0,i.kJ)(t),s=!1===o?t:t.DEF,a=new mt({definition:[],idx:e,ignoreAmbiguities:o&&!0===t.IGNORE_AMBIGUITIES});(0,i.e$)(t,"NAME")&&(a.name=t.NAME),(0,i.e$)(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);var c=(0,i.G)(s,(function(t){return(0,i.mf)(t.GATE)}));return a.hasPredicates=c,r.definition.push(a),(0,i.Ed)(s,(function(t){var e=new ut({definition:[]});a.definition.push(e),(0,i.e$)(t,"NAME")&&(e.name=t.NAME),(0,i.e$)(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:(0,i.e$)(t,"GATE")&&(e.ignoreAmbiguities=!0),n.recordingProdStack.push(e),t.ALT.call(n),n.recordingProdStack.pop()})),cn}function mn(t){return 0===t?"":""+t}function gn(t){if(t<0||t>ln){var e=new Error("Invalid DSL Method idx value: <"+t+">\n\tIdx value must be a none negative value smaller than "+(ln+1));throw e.KNOWN_RECORDER_ERROR=!0,e}}var vn=function(){function t(){}return t.prototype.initPerformanceTracer=function(t){if((0,i.e$)(t,"traceInitPerf")){var e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=xn.traceInitPerf;this.traceInitIndent=-1},t.prototype.TRACE_INIT=function(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+t+">");var r=(0,i.HT)(e),o=r.time,s=r.value,a=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+t+"> time: "+o+"ms"),this.traceInitIndent--,s}return e()},t}(),yn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),En=it(rt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(En);var bn,xn=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ne,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),wn=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Nn(t){return void 0===t&&(t=void 0),function(){return t}}!function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",t[t.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=14]="TOO_MANY_ALTS"}(bn||(bn={}));var Sn=function(){function t(t,e){void 0===e&&(e=xn),this.ignoredIssues=xn.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;var n=this;n.initErrorHandler(e),n.initLexerAdapter(),n.initLooksAhead(e),n.initRecognizerEngine(t,e),n.initRecoverable(e),n.initTreeBuilder(e),n.initContentAssist(),n.initGastRecorder(e),n.initPerformanceTracer(e),(0,i.e$)(e,"ignoredIssues")&&e.ignoredIssues!==xn.ignoredIssues&&(0,i.rr)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=(0,i.e$)(e,"ignoredIssues")?e.ignoredIssues:xn.ignoredIssues,this.skipValidations=(0,i.e$)(e,"skipValidations")?e.skipValidations:xn.skipValidations}return t.performSelfAnalysis=function(t){t.performSelfAnalysis()},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;e.selfAnalysisDone=!0;var r=e.className;e.TRACE_INIT("toFastProps",(function(){(0,i.SV)(e)})),e.TRACE_INIT("Grammar Recording",(function(){try{e.enableRecording(),(0,i.Ed)(e.definedRulesNames,(function(t){var n=e[t].originalGrammarAction,r=void 0;e.TRACE_INIT(t+" Rule",(function(){r=e.topLevelRuleRecord(t,n)})),e.gastProductionsCache[t]=r}))}finally{e.disableRecording()}}));var o=[];if(e.TRACE_INIT("Grammar Resolving",(function(){o=Re({rules:(0,i.VO)(e.gastProductionsCache)}),e.definitionErrors.push.apply(e.definitionErrors,o)})),e.TRACE_INIT("Grammar Validations",(function(){if((0,i.xb)(o)&&!1===e.skipValidations){var t=Ce({rules:(0,i.VO)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,i.VO)(e.tokensMap),ignoredIssues:e.ignoredIssues,errMsgProvider:Le,grammarName:r});e.definitionErrors.push.apply(e.definitionErrors,t)}})),(0,i.xb)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",(function(){var t,n,r=(t=(0,i.VO)(e.gastProductionsCache),n={},(0,i.Ed)(t,(function(t){var e=new At(t).startWalking();(0,i.f0)(n,e)})),n);e.resyncFollows=r})),e.TRACE_INIT("ComputeLookaheadFunctions",(function(){e.preComputeLookaheadFunctions((0,i.VO)(e.gastProductionsCache))}))),e.TRACE_INIT("expandAllNestedRuleNames",(function(){var t,n,r,o=(t=(0,i.VO)(e.gastProductionsCache),n=e.fullRuleNameToShort,r={allRuleNames:[]},(0,i.Ed)(t,(function(t){var e=n[t.name];r.allRuleNames.push(t.name);var o=new Ht(e);t.accept(o),(0,i.Ed)(o.result,(function(e){e.def,e.key;var n=e.name;r.allRuleNames.push(t.name+n)}))})),r);e.allRuleNames=o.allRuleNames})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,i.xb)(e.definitionErrors))throw n=(0,i.UI)(e.definitionErrors,(function(t){return t.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();(0,i.ef)(Sn,[We,Ze,en,nn,on,rn,sn,an,dn,vn]);var Ln=function(t){function e(e,n){void 0===n&&(n=xn);var r=(0,i.Cl)(n);return r.outputCst=!0,t.call(this,e,r)||this}return yn(e,t),e}(Sn),Qn=function(t){function e(e,n){void 0===n&&(n=xn);var r=(0,i.Cl)(n);return r.outputCst=!1,t.call(this,e,r)||this}return yn(e,t),e}(Sn);function Tn(t,e){var n=void 0===e?{}:e,i=n.resourceBase,o=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,s=n.css;return"\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n\n<link rel='stylesheet' href='"+(void 0===s?"https://unpkg.com/chevrotain@"+r+"/diagrams/diagrams.css":s)+"'>\n\n<script src='"+o+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+o+"src/diagrams_builder.js'><\/script>\n<script src='"+o+"src/diagrams_behavior.js'><\/script>\n<script src='"+o+'src/main.js\'><\/script>\n\n<div id="diagrams" align="center"></div> \n\n<script>\n window.serializedGrammar = '+JSON.stringify(t,null," ")+';\n<\/script>\n\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n'}var Rn="\n";function Cn(t){var e;return"\nfunction "+t.name+"(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n "+(e=t.rules,(0,i.UI)(e,(function(t){return n=Bn(1,'$.RULE("'+(e=t).name+'", function() {')+Rn,(n+=On(e.definition,2))+(Bn(2,"})")+Rn);var e,n})).join("\n")+"\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n")+t.name+".prototype = Object.create(chevrotain.CstParser.prototype)\n"+t.name+".prototype.constructor = "+t.name+" \n "}function An(t,e){if(t instanceof ct)return function(t,e){return Bn(e,"$.SUBRULE"+t.idx+"($."+t.nonTerminalName+")"+Rn)}(t,e);if(t instanceof pt)return Un("OPTION",t,e);if(t instanceof ht)return Un("AT_LEAST_ONE",t,e);if(t instanceof dt)return Un("AT_LEAST_ONE_SEP",t,e);if(t instanceof _t)return Un("MANY_SEP",t,e);if(t instanceof ft)return Un("MANY",t,e);if(t instanceof mt)return function(t,e){var n=Bn(e,"$.OR"+t.idx+"([")+Rn,r=(0,i.UI)(t.definition,(function(t){return function(t,e){var n=Bn(e,"{")+Rn;return t.name&&(n+=Bn(e+1,'NAME: "'+t.name+'",')+Rn),n+=Bn(e+1,"ALT: function() {")+Rn,n+=On(t.definition,e+1),(n+=Bn(e+1,"}")+Rn)+Bn(e,"}")}(t,e+1)}));return(n+=r.join(",\n"))+(Rn+Bn(e,"])\n"))}(t,e);if(t instanceof gt)return function(t,e){var n=t.terminalType.name;return Bn(e,"$.CONSUME"+t.idx+"(this.tokensMap."+n+")"+Rn)}(t,e);if(t instanceof ut)return On(t.definition,e);throw Error("non exhaustive match")}function Un(t,e,n){var r=Bn(n,"$."+(t+e.idx)+"(");return e.name||e.separator?(r+="{\n",e.name&&(r+=Bn(n+1,'NAME: "'+e.name+'"')+","+Rn),e.separator&&(r+=Bn(n+1,"SEP: this.tokensMap."+e.separator.name)+","+Rn),r+="DEF: "+kn(e.definition,n+2)+Rn,r+=Bn(n,"}")+Rn):r+=kn(e.definition,n+1),r+(Bn(n,")")+Rn)}function kn(t,e){var n="function() {\n";return(n+=On(t,e))+(Bn(e,"}")+Rn)}function On(t,e){var n="";return(0,i.Ed)(t,(function(t){n+=An(t,e+1)})),n}function Bn(t,e){return Array(4*t+1).join(" ")+e}function Dn(t){var e=function(t){return" \n"+Cn(t)+"\nreturn new "+t.name+"(tokenVocabulary, config) \n"}({name:t.name,rules:t.rules}),r=new Function("tokenVocabulary","config","chevrotain",e);return function(e){return r(t.tokenVocabulary,e,n(3877))}}function In(t){return function(t){return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+Cn(t)+"\n \nreturn {\n "+t.name+": "+t.name+" \n}\n}));\n"}({name:t.name,rules:t.rules})}function Fn(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}},1481:(t,e,n)=>{"use strict";function r(t){return t&&0===t.length}function i(t){return null==t?[]:Object.keys(t)}function o(t){for(var e=[],n=Object.keys(t),r=0;r<n.length;r++)e.push(t[n[r]]);return e}function s(t,e){for(var n=[],r=i(t),o=0;o<r.length;o++){var s=r[o];n.push(e.call(null,t[s],s))}return n}function a(t,e){for(var n=[],r=0;r<t.length;r++)n.push(e.call(null,t[r],r));return n}function c(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];Array.isArray(r)?e=e.concat(c(r)):e.push(r)}return e}function l(t){return r(t)?void 0:t[0]}function u(t){var e=t&&t.length;return e?t[e-1]:void 0}function p(t,e){if(Array.isArray(t))for(var n=0;n<t.length;n++)e.call(null,t[n],n);else{if(!A(t))throw Error("non exhaustive match");var r=i(t);for(n=0;n<r.length;n++){var o=r[n],s=t[o];e.call(null,s,o)}}}function h(t){return"string"==typeof t}function d(t){return void 0===t}function f(t){return t instanceof Function}function _(t,e){return void 0===e&&(e=1),t.slice(e,t.length)}function m(t,e){return void 0===e&&(e=1),t.slice(0,t.length-e)}function g(t,e){var n=[];if(Array.isArray(t))for(var r=0;r<t.length;r++){var i=t[r];e.call(null,i)&&n.push(i)}return n}function v(t,e){return g(t,(function(t){return!e(t)}))}function y(t,e){for(var n=Object.keys(t),r={},i=0;i<n.length;i++){var o=n[i],s=t[o];e(s)&&(r[o]=s)}return r}function E(t,e){return!!A(t)&&t.hasOwnProperty(e)}function b(t,e){return void 0!==N(t,(function(t){return t===e}))}function x(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e}function w(t){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function N(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(e.call(null,r))return r}}function S(t,e){for(var n=[],r=0;r<t.length;r++){var i=t[r];e.call(null,i)&&n.push(i)}return n}function L(t,e,n){for(var r=Array.isArray(t),s=r?t:o(t),a=r?[]:i(t),c=n,l=0;l<s.length;l++)c=e.call(null,c,s[l],r?l:a[l]);return c}function Q(t){return v(t,(function(t){return null==t}))}function T(t,e){void 0===e&&(e=function(t){return t});var n=[];return L(t,(function(t,r){var i=e(r);return b(n,i)?t:(n.push(i),t.concat(r))}),[])}function R(t){return Array.isArray(t)}function C(t){return t instanceof RegExp}function A(t){return t instanceof Object}function U(t,e){for(var n=0;n<t.length;n++)if(!e(t[n],n))return!1;return!0}function k(t,e){return v(t,(function(t){return b(e,t)}))}function O(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}function B(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}function D(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++)for(var o=e[r],s=i(o),a=0;a<s.length;a++){var c=s[a];t[c]=o[c]}return t}function I(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var o=e[r];if(!d(o))for(var s=i(o),a=0;a<s.length;a++){var c=s[a];E(t,c)||(t[c]=o[c])}}return t}function F(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return I.apply(null,[{}].concat(t))}function P(t,e){var n={};return p(t,(function(t){var r=e(t),i=n[r];i?i.push(t):n[r]=[t]})),n}function M(t,e){for(var n=w(t),r=i(e),o=0;o<r.length;o++){var s=r[o],a=e[s];n[s]=a}return n}function j(){}function V(t){return t}function G(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(void 0!==r?r:void 0)}return e}function H(t){console&&console.error&&console.error("Error: "+t)}function W(t){console&&console.warn&&console.warn("Warning: "+t)}function J(){return"function"==typeof Map}function z(t,e){e.forEach((function(e){var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(r){if("constructor"!==r){var i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(t.prototype,r,i):t.prototype[r]=e.prototype[r]}}))}))}function Z(t){function e(){}e.prototype=t;var n=new e;function r(){return typeof n.bar}return r(),r(),t}function X(t){return t[t.length-1]}function $(t){var e=(new Date).getTime(),n=t();return{time:(new Date).getTime()-e,value:n}}n.d(e,{xb:()=>r,XP:()=>i,VO:()=>o,Q8:()=>s,UI:()=>a,xH:()=>c,Ps:()=>l,Z$:()=>u,Ed:()=>p,HD:()=>h,o8:()=>d,mf:()=>f,Cw:()=>_,j7:()=>m,hX:()=>g,d1:()=>v,ei:()=>y,e$:()=>E,r3:()=>b,Qw:()=>x,Cl:()=>w,sE:()=>N,Oq:()=>S,u4:()=>L,oA:()=>Q,jj:()=>T,kJ:()=>R,Kj:()=>C,Kn:()=>A,yW:()=>U,e5:()=>k,G:()=>O,cq:()=>B,f0:()=>D,ce:()=>F,vM:()=>P,TS:()=>M,dG:()=>j,Wd:()=>V,X0:()=>G,WB:()=>H,rr:()=>W,dU:()=>J,ef:()=>z,SV:()=>Z,fj:()=>X,HT:()=>$})},3819:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},8505:(t,e,n)=>{var r=n(5052);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},9736:(t,e,n)=>{var r=n(95),i=n(2391),o=n(1787),s=r("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},6637:(t,e,n)=>{"use strict";var r=n(966).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},7728:t=>{t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},1176:(t,e,n)=>{var r=n(5052);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},3339:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},9918:(t,e,n)=>{"use strict";var r,i=n(3339),o=n(7400),s=n(9859),a=n(5052),c=n(816),l=n(1589),u=n(5762),p=n(7487),h=n(1787).f,d=n(7567),f=n(6540),_=n(95),m=n(1441),g=s.Int8Array,v=g&&g.prototype,y=s.Uint8ClampedArray,E=y&&y.prototype,b=g&&d(g),x=v&&d(v),w=Object.prototype,N=w.isPrototypeOf,S=_("toStringTag"),L=m("TYPED_ARRAY_TAG"),Q=i&&!!f&&"Opera"!==l(s.opera),T=!1,R={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},C={BigInt64Array:8,BigUint64Array:8},A=function(t){if(!a(t))return!1;var e=l(t);return c(R,e)||c(C,e)};for(r in R)s[r]||(Q=!1);if((!Q||"function"!=typeof b||b===Function.prototype)&&(b=function(){throw TypeError("Incorrect invocation")},Q))for(r in R)s[r]&&f(s[r],b);if((!Q||!x||x===w)&&(x=b.prototype,Q))for(r in R)s[r]&&f(s[r].prototype,x);if(Q&&d(E)!==x&&f(E,x),o&&!c(x,S))for(r in T=!0,h(x,S,{get:function(){return a(this)?this[L]:void 0}}),R)s[r]&&u(s[r],L,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:Q,TYPED_ARRAY_TAG:T&&L,aTypedArray:function(t){if(A(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(f){if(N.call(b,t))return t}else for(var e in R)if(c(R,r)){var n=s[e];if(n&&(t===n||N.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(o){if(n)for(var r in R){var i=s[r];i&&c(i.prototype,t)&&delete i.prototype[t]}x[t]&&!n||p(x,t,n?e:Q&&v[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(o){if(f){if(n)for(r in R)(i=s[r])&&c(i,t)&&delete i[t];if(b[t]&&!n)return;try{return p(b,t,n?e:Q&&g[t]||e)}catch(t){}}for(r in R)!(i=s[r])||i[t]&&!n||p(i,t,e)}},isView:function(t){if(!a(t))return!1;var e=l(t);return"DataView"===e||c(R,e)||c(C,e)},isTypedArray:A,TypedArray:b,TypedArrayPrototype:x}},3816:(t,e,n)=>{"use strict";var r=n(9859),i=n(7400),o=n(3339),s=n(5762),a=n(8787),c=n(4229),l=n(7728),u=n(6051),p=n(4237),h=n(7331),d=n(6201),f=n(7567),_=n(6540),m=n(8151).f,g=n(1787).f,v=n(7065),y=n(4555),E=n(6407),b=E.get,x=E.set,w="ArrayBuffer",N="DataView",S="Wrong index",L=r.ArrayBuffer,Q=L,T=r.DataView,R=T&&T.prototype,C=Object.prototype,A=r.RangeError,U=d.pack,k=d.unpack,O=function(t){return[255&t]},B=function(t){return[255&t,t>>8&255]},D=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},I=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},F=function(t){return U(t,23,4)},P=function(t){return U(t,52,8)},M=function(t,e){g(t.prototype,e,{get:function(){return b(this)[e]}})},j=function(t,e,n,r){var i=h(n),o=b(t);if(i+e>o.byteLength)throw A(S);var s=b(o.buffer).bytes,a=i+o.byteOffset,c=s.slice(a,a+e);return r?c:c.reverse()},V=function(t,e,n,r,i,o){var s=h(n),a=b(t);if(s+e>a.byteLength)throw A(S);for(var c=b(a.buffer).bytes,l=s+a.byteOffset,u=r(+i),p=0;p<e;p++)c[l+p]=u[o?p:e-p-1]};if(o){if(!c((function(){L(1)}))||!c((function(){new L(-1)}))||c((function(){return new L,new L(1.5),new L(NaN),L.name!=w}))){for(var G,H=(Q=function(t){return l(this,Q),new L(h(t))}).prototype=L.prototype,W=m(L),J=0;W.length>J;)(G=W[J++])in Q||s(Q,G,L[G]);H.constructor=Q}_&&f(R)!==C&&_(R,C);var z=new T(new Q(2)),Z=R.setInt8;z.setInt8(0,2147483648),z.setInt8(1,2147483649),!z.getInt8(0)&&z.getInt8(1)||a(R,{setInt8:function(t,e){Z.call(this,t,e<<24>>24)},setUint8:function(t,e){Z.call(this,t,e<<24>>24)}},{unsafe:!0})}else Q=function(t){l(this,Q,w);var e=h(t);x(this,{bytes:v.call(new Array(e),0),byteLength:e}),i||(this.byteLength=e)},T=function(t,e,n){l(this,T,N),l(t,Q,N);var r=b(t).byteLength,o=u(e);if(o<0||o>r)throw A("Wrong offset");if(o+(n=void 0===n?r-o:p(n))>r)throw A("Wrong length");x(this,{buffer:t,byteLength:n,byteOffset:o}),i||(this.buffer=t,this.byteLength=n,this.byteOffset=o)},i&&(M(Q,"byteLength"),M(T,"buffer"),M(T,"byteLength"),M(T,"byteOffset")),a(T.prototype,{getInt8:function(t){return j(this,1,t)[0]<<24>>24},getUint8:function(t){return j(this,1,t)[0]},getInt16:function(t){var e=j(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=j(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return I(j(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return I(j(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return k(j(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return k(j(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){V(this,1,t,O,e)},setUint8:function(t,e){V(this,1,t,O,e)},setInt16:function(t,e){V(this,2,t,B,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){V(this,2,t,B,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){V(this,4,t,D,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){V(this,4,t,D,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){V(this,4,t,F,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){V(this,8,t,P,e,arguments.length>2?arguments[2]:void 0)}});y(Q,w),y(T,N),t.exports={ArrayBuffer:Q,DataView:T}},7065:(t,e,n)=>{"use strict";var r=n(2991),i=n(3231),o=n(4237);t.exports=function(t){for(var e=r(this),n=o(e.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),c=s>2?arguments[2]:void 0,l=void 0===c?n:i(c,n);l>a;)e[a++]=t;return e}},507:(t,e,n)=>{"use strict";var r=n(7636),i=n(2991),o=n(4960),s=n(1943),a=n(4237),c=n(2324),l=n(8830);t.exports=function(t){var e,n,u,p,h,d,f=i(t),_="function"==typeof this?this:Array,m=arguments.length,g=m>1?arguments[1]:void 0,v=void 0!==g,y=l(f),E=0;if(v&&(g=r(g,m>2?arguments[2]:void 0,2)),null==y||_==Array&&s(y))for(n=new _(e=a(f.length));e>E;E++)d=v?g(f[E],E):f[E],c(n,E,d);else for(h=(p=y.call(f)).next,n=new _;!(u=h.call(p)).done;E++)d=v?o(p,g,[u.value,E],!0):u.value,c(n,E,d);return n.length=E,n}},9540:(t,e,n)=>{var r=n(905),i=n(4237),o=n(3231),s=function(t){return function(e,n,s){var a,c=r(e),l=i(c.length),u=o(s,l);if(t&&n!=n){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},9996:(t,e,n)=>{var r=n(7636),i=n(9337),o=n(2991),s=n(4237),a=n(7501),c=[].push,l=function(t){var e=1==t,n=2==t,l=3==t,u=4==t,p=6==t,h=7==t,d=5==t||p;return function(f,_,m,g){for(var v,y,E=o(f),b=i(E),x=r(_,m,3),w=s(b.length),N=0,S=g||a,L=e?S(f,w):n||h?S(f,0):void 0;w>N;N++)if((d||N in b)&&(y=x(v=b[N],N,E),t))if(e)L[N]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return N;case 2:c.call(L,v)}else switch(t){case 4:return!1;case 7:c.call(L,v)}return p?-1:l||u?u:L}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterOut:l(7)}},6038:(t,e,n)=>{"use strict";var r=n(4229);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},3037:(t,e,n)=>{var r=n(7400),i=n(4229),o=n(816),s=Object.defineProperty,a={},c=function(t){throw t};t.exports=function(t,e){if(o(a,t))return a[t];e||(e={});var n=[][t],l=!!o(e,"ACCESSORS")&&e.ACCESSORS,u=o(e,0)?e[0]:c,p=o(e,1)?e[1]:void 0;return a[t]=!!n&&!i((function(){if(l&&!r)return!0;var t={length:-1};l?s(t,1,{enumerable:!0,get:c}):t[1]=1,n.call(t,u,p)}))}},3143:(t,e,n)=>{var r=n(3819),i=n(2991),o=n(9337),s=n(4237),a=function(t){return function(e,n,a,c){r(n);var l=i(e),u=o(l),p=s(l.length),h=t?p-1:0,d=t?-1:1;if(a<2)for(;;){if(h in u){c=u[h],h+=d;break}if(h+=d,t?h<0:p<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:p>h;h+=d)h in u&&(c=n(c,u[h],h,l));return c}};t.exports={left:a(!1),right:a(!0)}},7501:(t,e,n)=>{var r=n(5052),i=n(3718),o=n(95)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},4960:(t,e,n)=>{var r=n(1176),i=n(7281);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){throw i(t),e}}},4575:(t,e,n)=>{var r=n(95)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},7079:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},1589:(t,e,n)=>{var r=n(1601),i=n(7079),o=n(95)("toStringTag"),s="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:s?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},7081:(t,e,n)=>{var r=n(816),i=n(4826),o=n(7933),s=n(1787);t.exports=function(t,e){for(var n=i(e),a=s.f,c=o.f,l=0;l<n.length;l++){var u=n[l];r(t,u)||a(t,u,c(e,u))}}},7528:(t,e,n)=>{var r=n(4229);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3723:(t,e,n)=>{"use strict";var r=n(693).IteratorPrototype,i=n(2391),o=n(5358),s=n(4555),a=n(5495),c=function(){return this};t.exports=function(t,e,n){var l=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),s(t,l,!1,!0),a[l]=c,t}},5762:(t,e,n)=>{var r=n(7400),i=n(1787),o=n(5358);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},5358:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2324:(t,e,n)=>{"use strict";var r=n(2066),i=n(1787),o=n(5358);t.exports=function(t,e,n){var s=r(e);s in t?i.f(t,s,o(0,n)):t[s]=n}},7675:(t,e,n)=>{"use strict";var r=n(3103),i=n(3723),o=n(7567),s=n(6540),a=n(4555),c=n(5762),l=n(7487),u=n(95),p=n(4231),h=n(5495),d=n(693),f=d.IteratorPrototype,_=d.BUGGY_SAFARI_ITERATORS,m=u("iterator"),g="keys",v="values",y="entries",E=function(){return this};t.exports=function(t,e,n,u,d,b,x){i(n,e,u);var w,N,S,L=function(t){if(t===d&&A)return A;if(!_&&t in R)return R[t];switch(t){case g:case v:case y:return function(){return new n(this,t)}}return function(){return new n(this)}},Q=e+" Iterator",T=!1,R=t.prototype,C=R[m]||R["@@iterator"]||d&&R[d],A=!_&&C||L(d),U="Array"==e&&R.entries||C;if(U&&(w=o(U.call(new t)),f!==Object.prototype&&w.next&&(p||o(w)===f||(s?s(w,f):"function"!=typeof w[m]&&c(w,m,E)),a(w,Q,!0,!0),p&&(h[Q]=E))),d==v&&C&&C.name!==v&&(T=!0,A=function(){return C.call(this)}),p&&!x||R[m]===A||c(R,m,A),h[e]=A,d)if(N={values:L(v),keys:b?A:L(g),entries:L(y)},x)for(S in N)(_||T||!(S in R))&&l(R,S,N[S]);else r({target:e,proto:!0,forced:_||T},N);return N}},7400:(t,e,n)=>{var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:(t,e,n)=>{var r=n(9859),i=n(5052),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},5694:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8801:(t,e,n)=>{var r=n(7079),i=n(9859);t.exports="process"==r(i.process)},598:(t,e,n)=>{var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:(t,e,n)=>{var r,i,o=n(9859),s=n(598),a=o.process,c=a&&a.versions,l=c&&c.v8;l?i=(r=l.split("."))[0]+r[1]:s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},3837:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:(t,e,n)=>{var r=n(9859),i=n(7933).f,o=n(5762),s=n(7487),a=n(2079),c=n(7081),l=n(6541);t.exports=function(t,e){var n,u,p,h,d,f=t.target,_=t.global,m=t.stat;if(n=_?r:m?r[f]||a(f,{}):(r[f]||{}).prototype)for(u in e){if(h=e[u],p=t.noTargetGet?(d=i(n,u))&&d.value:n[u],!l(_?u:f+(m?".":"#")+u,t.forced)&&void 0!==p){if(typeof h==typeof p)continue;c(h,p)}(t.sham||p&&p.sham)&&o(h,"sham",!0),s(n,u,h,t)}}},4229:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},4954:(t,e,n)=>{"use strict";n(7950);var r=n(7487),i=n(4229),o=n(95),s=n(3466),a=n(5762),c=o("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),u="$0"==="a".replace(/./,"$0"),p=o("replace"),h=!!/./[p]&&""===/./[p]("a","$0"),d=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,p){var f=o(t),_=!i((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),m=_&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!_||!m||"replace"===t&&(!l||!u||h)||"split"===t&&!d){var g=/./[f],v=n(f,""[t],(function(t,e,n,r,i){return e.exec===s?_&&!i?{done:!0,value:g.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),y=v[0],E=v[1];r(String.prototype,t,y),r(RegExp.prototype,f,2==e?function(t,e){return E.call(t,this,e)}:function(t){return E.call(t,this)})}p&&a(RegExp.prototype[f],"sham",!0)}},7636:(t,e,n)=>{var r=n(3819);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},1333:(t,e,n)=>{var r=n(9276),i=n(9859),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},8830:(t,e,n)=>{var r=n(1589),i=n(5495),o=n(95)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},8403:(t,e,n)=>{var r=n(1176),i=n(8830);t.exports=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},17:(t,e,n)=>{var r=n(2991),i=Math.floor,o="".replace,s=/\$([$&'`]|\d\d?|<[^>]*>)/g,a=/\$([$&'`]|\d\d?)/g;t.exports=function(t,e,n,c,l,u){var p=n+t.length,h=c.length,d=a;return void 0!==l&&(l=r(l),d=s),o.call(u,d,(function(r,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(p);case"<":s=l[o.slice(1,-1)];break;default:var a=+o;if(0===a)return r;if(a>h){var u=i(a/10);return 0===u?r:u<=h?void 0===c[u-1]?o.charAt(1):c[u-1]+o.charAt(1):r}s=c[a-1]}return void 0===s?"":s}))}},9859:(t,e,n)=>{var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},816:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},5977:t=>{t.exports={}},3777:(t,e,n)=>{var r=n(1333);t.exports=r("document","documentElement")},4394:(t,e,n)=>{var r=n(7400),i=n(4229),o=n(2635);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},6201:t=>{var e=1/0,n=Math.abs,r=Math.pow,i=Math.floor,o=Math.log,s=Math.LN2;t.exports={pack:function(t,a,c){var l,u,p,h=new Array(c),d=8*c-a-1,f=(1<<d)-1,_=f>>1,m=23===a?r(2,-24)-r(2,-77):0,g=t<0||0===t&&1/t<0?1:0,v=0;for((t=n(t))!=t||t===e?(u=t!=t?1:0,l=f):(l=i(o(t)/s),t*(p=r(2,-l))<1&&(l--,p*=2),(t+=l+_>=1?m/p:m*r(2,1-_))*p>=2&&(l++,p/=2),l+_>=f?(u=0,l=f):l+_>=1?(u=(t*p-1)*r(2,a),l+=_):(u=t*r(2,_-1)*r(2,a),l=0));a>=8;h[v++]=255&u,u/=256,a-=8);for(l=l<<a|u,d+=a;d>0;h[v++]=255&l,l/=256,d-=8);return h[--v]|=128*g,h},unpack:function(t,n){var i,o=t.length,s=8*o-n-1,a=(1<<s)-1,c=a>>1,l=s-7,u=o-1,p=t[u--],h=127&p;for(p>>=7;l>0;h=256*h+t[u],u--,l-=8);for(i=h&(1<<-l)-1,h>>=-l,l+=n;l>0;i=256*i+t[u],u--,l-=8);if(0===h)h=1-c;else{if(h===a)return i?NaN:p?-1/0:e;i+=r(2,n),h-=c}return(p?-1:1)*i*r(2,h-n)}}},9337:(t,e,n)=>{var r=n(4229),i=n(7079),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},835:(t,e,n)=>{var r=n(5052),i=n(6540);t.exports=function(t,e,n){var o,s;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&i(t,s),t}},8511:(t,e,n)=>{var r=n(5353),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},6407:(t,e,n)=>{var r,i,o,s=n(8694),a=n(9859),c=n(5052),l=n(5762),u=n(816),p=n(5353),h=n(4399),d=n(5977),f=a.WeakMap;if(s){var _=p.state||(p.state=new f),m=_.get,g=_.has,v=_.set;r=function(t,e){return e.facade=t,v.call(_,t,e),e},i=function(t){return m.call(_,t)||{}},o=function(t){return g.call(_,t)}}else{var y=h("state");d[y]=!0,r=function(t,e){return e.facade=t,l(t,y,e),e},i=function(t){return u(t,y)?t[y]:{}},o=function(t){return u(t,y)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},1943:(t,e,n)=>{var r=n(95),i=n(5495),o=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},3718:(t,e,n)=>{var r=n(7079);t.exports=Array.isArray||function(t){return"Array"==r(t)}},6541:(t,e,n)=>{var r=n(4229),i=/#|\.prototype\./,o=function(t,e){var n=a[s(t)];return n==l||n!=c&&("function"==typeof e?r(e):!!e)},s=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=o.data={},c=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},5052:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},4231:t=>{t.exports=!1},7281:(t,e,n)=>{var r=n(1176);t.exports=function(t){var e=t.return;if(void 0!==e)return r(e.call(t)).value}},693:(t,e,n)=>{"use strict";var r,i,o,s=n(7567),a=n(5762),c=n(816),l=n(95),u=n(4231),p=l("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=s(s(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),u||c(r,p)||a(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},5495:t=>{t.exports={}},4226:(t,e,n)=>{var r=n(9859);t.exports=r.Promise},3839:(t,e,n)=>{var r=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},7274:(t,e,n)=>{var r=n(4229),i=n(95),o=n(4231),s=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8694:(t,e,n)=>{var r=n(9859),i=n(8511),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i(o))},6485:(t,e,n)=>{"use strict";var r=n(3819),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},47:(t,e,n)=>{"use strict";var r=n(7400),i=n(4229),o=n(5632),s=n(894),a=n(9195),c=n(2991),l=n(9337),u=Object.assign,p=Object.defineProperty;t.exports=!u||i((function(){if(r&&1!==u({b:1},u(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||o(u({},e)).join("")!=i}))?function(t,e){for(var n=c(t),i=arguments.length,u=1,p=s.f,h=a.f;i>u;)for(var d,f=l(arguments[u++]),_=p?o(f).concat(p(f)):o(f),m=_.length,g=0;m>g;)d=_[g++],r&&!h.call(f,d)||(n[d]=f[d]);return n}:u},2391:(t,e,n)=>{var r,i=n(1176),o=n(219),s=n(3837),a=n(5977),c=n(3777),l=n(2635),u=n(4399)("IE_PROTO"),p=function(){},h=function(t){return"<script>"+t+"<\/script>"},d=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;d=r?function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=l("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F);for(var n=s.length;n--;)delete d.prototype[s[n]];return d()};a[u]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=i(t),n=new p,p.prototype=null,n[u]=t):n=d(),void 0===e?n:o(n,e)}},219:(t,e,n)=>{var r=n(7400),i=n(1787),o=n(1176),s=n(5632);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=s(e),a=r.length,c=0;a>c;)i.f(t,n=r[c++],e[n]);return t}},1787:(t,e,n)=>{var r=n(7400),i=n(4394),o=n(1176),s=n(2066),a=Object.defineProperty;e.f=r?a:function(t,e,n){if(o(t),e=s(e,!0),o(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:(t,e,n)=>{var r=n(7400),i=n(9195),o=n(5358),s=n(905),a=n(2066),c=n(816),l=n(4394),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=s(t),e=a(e,!0),l)try{return u(t,e)}catch(t){}if(c(t,e))return o(!i.f.call(t,e),t[e])}},8151:(t,e,n)=>{var r=n(140),i=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},894:(t,e)=>{e.f=Object.getOwnPropertySymbols},7567:(t,e,n)=>{var r=n(816),i=n(2991),o=n(4399),s=n(7528),a=o("IE_PROTO"),c=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=i(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},140:(t,e,n)=>{var r=n(816),i=n(905),o=n(9540).indexOf,s=n(5977);t.exports=function(t,e){var n,a=i(t),c=0,l=[];for(n in a)!r(s,n)&&r(a,n)&&l.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~o(l,n)||l.push(n));return l}},5632:(t,e,n)=>{var r=n(140),i=n(3837);t.exports=Object.keys||function(t){return r(t,i)}},9195:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},6540:(t,e,n)=>{var r=n(1176),i=n(8505);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},4826:(t,e,n)=>{var r=n(1333),i=n(8151),o=n(894),s=n(1176);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=o.f;return n?e.concat(n(t)):e}},9276:(t,e,n)=>{var r=n(9859);t.exports=r},7757:(t,e,n)=>{var r=n(1176),i=n(5052),o=n(6485);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},8787:(t,e,n)=>{var r=n(7487);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},7487:(t,e,n)=>{var r=n(9859),i=n(5762),o=n(816),s=n(2079),a=n(8511),c=n(6407),l=c.get,u=c.enforce,p=String(String).split("String");(t.exports=function(t,e,n,a){var c,l=!!a&&!!a.unsafe,h=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),(c=u(n)).source||(c.source=p.join("string"==typeof e?e:""))),t!==r?(l?!d&&t[e]&&(h=!0):delete t[e],h?t[e]=n:i(t,e,n)):h?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},8115:(t,e,n)=>{var r=n(7079),i=n(3466);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},3466:(t,e,n)=>{"use strict";var r,i,o=n(895),s=n(5650),a=RegExp.prototype.exec,c=String.prototype.replace,l=a,u=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),p=s.UNSUPPORTED_Y||s.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(u||h||p)&&(l=function(t){var e,n,r,i,s=this,l=p&&s.sticky,d=o.call(s),f=s.source,_=0,m=t;return l&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),m=String(t).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==t[s.lastIndex-1])&&(f="(?: "+f+")",m=" "+m,_++),n=new RegExp("^(?:"+f+")",d)),h&&(n=new RegExp("^"+f+"$(?!\\s)",d)),u&&(e=s.lastIndex),r=a.call(l?n:s,m),l?r?(r.input=r.input.slice(_),r[0]=r[0].slice(_),r.index=s.lastIndex,s.lastIndex+=r[0].length):s.lastIndex=0:u&&r&&(s.lastIndex=s.global?r.index+r[0].length:e),h&&r&&r.length>1&&c.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=l},895:(t,e,n)=>{"use strict";var r=n(1176);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},5650:(t,e,n)=>{"use strict";var r=n(4229);function i(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},8885:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},2079:(t,e,n)=>{var r=n(9859),i=n(5762);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},1832:(t,e,n)=>{"use strict";var r=n(1333),i=n(1787),o=n(95),s=n(7400),a=o("species");t.exports=function(t){var e=r(t),n=i.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},4555:(t,e,n)=>{var r=n(1787).f,i=n(816),o=n(95)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},4399:(t,e,n)=>{var r=n(3036),i=n(1441),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5353:(t,e,n)=>{var r=n(9859),i=n(2079),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},3036:(t,e,n)=>{var r=n(4231),i=n(5353);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.2",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},7942:(t,e,n)=>{var r=n(1176),i=n(3819),o=n(95)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[o])?e:i(n)}},966:(t,e,n)=>{var r=n(6051),i=n(8885),o=function(t){return function(e,n){var o,s,a=String(i(e)),c=r(n),l=a.length;return c<0||c>=l?t?"":void 0:(o=a.charCodeAt(c))<55296||o>56319||c+1===l||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):o:t?a.slice(c,c+2):s-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},7321:t=>{"use strict";var e=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=Math.floor,s=String.fromCharCode,a=function(t){return t+22+75*(t<26)},c=function(t,e,n){var r=0;for(t=n?o(t/700):t>>1,t+=o(t/e);t>455;r+=36)t=o(t/35);return o(r+36*t/(t+38))},l=function(t){var n,r,l=[],u=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),n--)}else e.push(i)}return e}(t)).length,p=128,h=0,d=72;for(n=0;n<t.length;n++)(r=t[n])<128&&l.push(s(r));var f=l.length,_=f;for(f&&l.push("-");_<u;){var m=e;for(n=0;n<t.length;n++)(r=t[n])>=p&&r<m&&(m=r);var g=_+1;if(m-p>o((e-h)/g))throw RangeError(i);for(h+=(m-p)*g,p=m,n=0;n<t.length;n++){if((r=t[n])<p&&++h>e)throw RangeError(i);if(r==p){for(var v=h,y=36;;y+=36){var E=y<=d?1:y>=d+26?26:y-d;if(v<E)break;var b=v-E,x=36-E;l.push(s(a(E+b%x))),v=o(b/x)}l.push(s(a(v))),d=c(h,g,_==f),h=0,++_}}++h,++p}return l.join("")};t.exports=function(t){var e,i,o=[],s=t.toLowerCase().replace(r,".").split(".");for(e=0;e<s.length;e++)i=s[e],o.push(n.test(i)?"xn--"+l(i):i);return o.join(".")}},3231:(t,e,n)=>{var r=n(6051),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},7331:(t,e,n)=>{var r=n(6051),i=n(4237);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length or index");return n}},905:(t,e,n)=>{var r=n(9337),i=n(8885);t.exports=function(t){return r(i(t))}},6051:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},4237:(t,e,n)=>{var r=n(6051),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},2991:(t,e,n)=>{var r=n(8885);t.exports=function(t){return Object(r(t))}},4262:(t,e,n)=>{var r=n(2002);t.exports=function(t,e){var n=r(t);if(n%e)throw RangeError("Wrong offset");return n}},2002:(t,e,n)=>{var r=n(6051);t.exports=function(t){var e=r(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},2066:(t,e,n)=>{var r=n(5052);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},1601:(t,e,n)=>{var r={};r[n(95)("toStringTag")]="z",t.exports="[object z]"===String(r)},2574:(t,e,n)=>{"use strict";var r=n(3103),i=n(9859),o=n(7400),s=n(8200),a=n(9918),c=n(3816),l=n(7728),u=n(5358),p=n(5762),h=n(4237),d=n(7331),f=n(4262),_=n(2066),m=n(816),g=n(1589),v=n(5052),y=n(2391),E=n(6540),b=n(8151).f,x=n(5215),w=n(9996).forEach,N=n(1832),S=n(1787),L=n(7933),Q=n(6407),T=n(835),R=Q.get,C=Q.set,A=S.f,U=L.f,k=Math.round,O=i.RangeError,B=c.ArrayBuffer,D=c.DataView,I=a.NATIVE_ARRAY_BUFFER_VIEWS,F=a.TYPED_ARRAY_TAG,P=a.TypedArray,M=a.TypedArrayPrototype,j=a.aTypedArrayConstructor,V=a.isTypedArray,G="BYTES_PER_ELEMENT",H="Wrong length",W=function(t,e){for(var n=0,r=e.length,i=new(j(t))(r);r>n;)i[n]=e[n++];return i},J=function(t,e){A(t,e,{get:function(){return R(this)[e]}})},z=function(t){var e;return t instanceof B||"ArrayBuffer"==(e=g(t))||"SharedArrayBuffer"==e},Z=function(t,e){return V(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},X=function(t,e){return Z(t,e=_(e,!0))?u(2,t[e]):U(t,e)},$=function(t,e,n){return!(Z(t,e=_(e,!0))&&v(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?A(t,e,n):(t[e]=n.value,t)};o?(I||(L.f=X,S.f=$,J(M,"buffer"),J(M,"byteOffset"),J(M,"byteLength"),J(M,"length")),r({target:"Object",stat:!0,forced:!I},{getOwnPropertyDescriptor:X,defineProperty:$}),t.exports=function(t,e,n){var o=t.match(/\d+$/)[0]/8,a=t+(n?"Clamped":"")+"Array",c="get"+t,u="set"+t,_=i[a],m=_,g=m&&m.prototype,S={},L=function(t,e){A(t,e,{get:function(){return function(t,e){var n=R(t);return n.view[c](e*o+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var i=R(t);n&&(r=(r=k(r))<0?0:r>255?255:255&r),i.view[u](e*o+i.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};I?s&&(m=e((function(t,e,n,r){return l(t,m,a),T(v(e)?z(e)?void 0!==r?new _(e,f(n,o),r):void 0!==n?new _(e,f(n,o)):new _(e):V(e)?W(m,e):x.call(m,e):new _(d(e)),t,m)})),E&&E(m,P),w(b(_),(function(t){t in m||p(m,t,_[t])})),m.prototype=g):(m=e((function(t,e,n,r){l(t,m,a);var i,s,c,u=0,p=0;if(v(e)){if(!z(e))return V(e)?W(m,e):x.call(m,e);i=e,p=f(n,o);var _=e.byteLength;if(void 0===r){if(_%o)throw O(H);if((s=_-p)<0)throw O(H)}else if((s=h(r)*o)+p>_)throw O(H);c=s/o}else c=d(e),i=new B(s=c*o);for(C(t,{buffer:i,byteOffset:p,byteLength:s,length:c,view:new D(i)});u<c;)L(t,u++)})),E&&E(m,P),g=m.prototype=y(M)),g.constructor!==m&&p(g,"constructor",m),F&&p(g,F,a),S[a]=m,r({global:!0,forced:m!=_,sham:!I},S),G in m||p(m,G,o),G in g||p(g,G,o),N(a)}):t.exports=function(){}},8200:(t,e,n)=>{var r=n(9859),i=n(4229),o=n(4575),s=n(9918).NATIVE_ARRAY_BUFFER_VIEWS,a=r.ArrayBuffer,c=r.Int8Array;t.exports=!s||!i((function(){c(1)}))||!i((function(){new c(-1)}))||!o((function(t){new c,new c(null),new c(1.5),new c(t)}),!0)||i((function(){return 1!==new c(new a(2),1,void 0).length}))},5215:(t,e,n)=>{var r=n(2991),i=n(4237),o=n(8830),s=n(1943),a=n(7636),c=n(9918).aTypedArrayConstructor;t.exports=function(t){var e,n,l,u,p,h,d=r(t),f=arguments.length,_=f>1?arguments[1]:void 0,m=void 0!==_,g=o(d);if(null!=g&&!s(g))for(h=(p=g.call(d)).next,d=[];!(u=h.call(p)).done;)d.push(u.value);for(m&&f>2&&(_=a(_,arguments[2],2)),n=i(d.length),l=new(c(this))(n),e=0;n>e;e++)l[e]=m?_(d[e],e):d[e];return l}},1441:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},6969:(t,e,n)=>{var r=n(3839);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},95:(t,e,n)=>{var r=n(9859),i=n(3036),o=n(816),s=n(1441),a=n(3839),c=n(6969),l=i("wks"),u=r.Symbol,p=c?u:u&&u.withoutSetter||s;t.exports=function(t){return o(l,t)||(a&&o(u,t)?l[t]=u[t]:l[t]=p("Symbol."+t)),l[t]}},5735:(t,e,n)=>{"use strict";var r=n(905),i=n(9736),o=n(5495),s=n(6407),a=n(7675),c="Array Iterator",l=s.set,u=s.getterFor(c);t.exports=a(Array,"Array",(function(t,e){l(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},3108:(t,e,n)=>{"use strict";var r=n(3103),i=n(3143).left,o=n(6038),s=n(3037),a=n(6358),c=n(8801),l=o("reduce"),u=s("reduce",{1:0});r({target:"Array",proto:!0,forced:!l||!u||!c&&a>79&&a<83},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},3985:(t,e,n)=>{n(9736)("flatMap")},1515:(t,e,n)=>{"use strict";var r=n(3103),i=n(4231),o=n(4226),s=n(4229),a=n(1333),c=n(7942),l=n(7757),u=n(7487);r({target:"Promise",proto:!0,real:!0,forced:!!o&&s((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,a("Promise")),n="function"==typeof t;return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),i||"function"!=typeof o||o.prototype.finally||u(o.prototype,"finally",a("Promise").prototype.finally)},7950:(t,e,n)=>{"use strict";var r=n(3103),i=n(3466);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},8673:(t,e,n)=>{"use strict";var r=n(966).charAt,i=n(6407),o=n(7675),s="String Iterator",a=i.set,c=i.getterFor(s);o(String,"String",(function(t){a(this,{type:s,string:String(t),index:0})}),(function(){var t,e=c(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},5940:(t,e,n)=>{"use strict";var r=n(4954),i=n(1176),o=n(4237),s=n(6051),a=n(8885),c=n(6637),l=n(17),u=n(8115),p=Math.max,h=Math.min;r("replace",2,(function(t,e,n,r){var d=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,f=r.REPLACE_KEEPS_$0,_=d?"$":"$0";return[function(n,r){var i=a(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!d&&f||"string"==typeof r&&-1===r.indexOf(_)){var a=n(e,t,this,r);if(a.done)return a.value}var m=i(t),g=String(this),v="function"==typeof r;v||(r=String(r));var y=m.global;if(y){var E=m.unicode;m.lastIndex=0}for(var b=[];;){var x=u(m,g);if(null===x)break;if(b.push(x),!y)break;""===String(x[0])&&(m.lastIndex=c(g,o(m.lastIndex),E))}for(var w,N="",S=0,L=0;L<b.length;L++){x=b[L];for(var Q=String(x[0]),T=p(h(s(x.index),g.length),0),R=[],C=1;C<x.length;C++)R.push(void 0===(w=x[C])?w:String(w));var A=x.groups;if(v){var U=[Q].concat(R,T,g);void 0!==A&&U.push(A);var k=String(r.apply(void 0,U))}else k=l(Q,g,T,R,A,r);T>=S&&(N+=g.slice(S,T)+k,S=T+Q.length)}return N+g.slice(S)}]}))},3675:(t,e,n)=>{n(2574)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},6886:(t,e,n)=>{var r=n(9859),i=n(5694),o=n(5735),s=n(5762),a=n(95),c=a("iterator"),l=a("toStringTag"),u=o.values;for(var p in i){var h=r[p],d=h&&h.prototype;if(d){if(d[c]!==u)try{s(d,c,u)}catch(t){d[c]=u}if(d[l]||s(d,l,p),i[p])for(var f in o)if(d[f]!==o[f])try{s(d,f,o[f])}catch(t){d[f]=o[f]}}}},523:(t,e,n)=>{"use strict";n(5735);var r=n(3103),i=n(1333),o=n(7274),s=n(7487),a=n(8787),c=n(4555),l=n(3723),u=n(6407),p=n(7728),h=n(816),d=n(7636),f=n(1589),_=n(1176),m=n(5052),g=n(2391),v=n(5358),y=n(8403),E=n(8830),b=n(95),x=i("fetch"),w=i("Headers"),N=b("iterator"),S="URLSearchParams",L="URLSearchParamsIterator",Q=u.set,T=u.getterFor(S),R=u.getterFor(L),C=/\+/g,A=Array(4),U=function(t){return A[t-1]||(A[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},k=function(t){try{return decodeURIComponent(t)}catch(e){return t}},O=function(t){var e=t.replace(C," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(U(n--),k);return e}},B=/[!'()~]|%20/g,D={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},I=function(t){return D[t]},F=function(t){return encodeURIComponent(t).replace(B,I)},P=function(t,e){if(e)for(var n,r,i=e.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),t.push({key:O(r.shift()),value:O(r.join("="))}))},M=function(t){this.entries.length=0,P(this.entries,t)},j=function(t,e){if(t<e)throw TypeError("Not enough arguments")},V=l((function(t,e){Q(this,{type:L,iterator:y(T(t).entries),kind:e})}),"Iterator",(function(){var t=R(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),G=function(){p(this,G,S);var t,e,n,r,i,o,s,a,c,l=arguments.length>0?arguments[0]:void 0,u=this,d=[];if(Q(u,{type:S,entries:d,updateURL:function(){},updateSearchParams:M}),void 0!==l)if(m(l))if("function"==typeof(t=E(l)))for(n=(e=t.call(l)).next;!(r=n.call(e)).done;){if((s=(o=(i=y(_(r.value))).next).call(i)).done||(a=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:s.value+"",value:a.value+""})}else for(c in l)h(l,c)&&d.push({key:c,value:l[c]+""});else P(d,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},H=G.prototype;a(H,{append:function(t,e){j(arguments.length,2);var n=T(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){j(arguments.length,1);for(var e=T(this),n=e.entries,r=t+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){j(arguments.length,1);for(var e=T(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){j(arguments.length,1);for(var e=T(this).entries,n=t+"",r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){j(arguments.length,1);for(var e=T(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){j(arguments.length,1);for(var n,r=T(this),i=r.entries,o=!1,s=t+"",a=e+"",c=0;c<i.length;c++)(n=i[c]).key===s&&(o?i.splice(c--,1):(o=!0,n.value=a));o||i.push({key:s,value:a}),r.updateURL()},sort:function(){var t,e,n,r=T(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(t=o[n],e=0;e<n;e++)if(i[e].key>t.key){i.splice(e,0,t);break}e===n&&i.push(t)}r.updateURL()},forEach:function(t){for(var e,n=T(this).entries,r=d(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new V(this,"keys")},values:function(){return new V(this,"values")},entries:function(){return new V(this,"entries")}},{enumerable:!0}),s(H,N,H.entries),s(H,"toString",(function(){for(var t,e=T(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(F(t.key)+"="+F(t.value));return n.join("&")}),{enumerable:!0}),c(G,S),r({global:!0,forced:!o},{URLSearchParams:G}),o||"function"!=typeof x||"function"!=typeof w||r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,r,i=[t];return arguments.length>1&&(m(e=arguments[1])&&(n=e.body,f(n)===S&&((r=e.headers?new w(e.headers):new w).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=g(e,{body:v(0,String(n)),headers:v(0,r)}))),i.push(e)),x.apply(this,i)}}),t.exports={URLSearchParams:G,getState:T}},4121:(t,e,n)=>{"use strict";n(8673);var r,i=n(3103),o=n(7400),s=n(7274),a=n(9859),c=n(219),l=n(7487),u=n(7728),p=n(816),h=n(47),d=n(507),f=n(966).codeAt,_=n(7321),m=n(4555),g=n(523),v=n(6407),y=a.URL,E=g.URLSearchParams,b=g.getState,x=v.set,w=v.getterFor("URL"),N=Math.floor,S=Math.pow,L="Invalid scheme",Q="Invalid host",T="Invalid port",R=/[A-Za-z]/,C=/[\d+-.A-Za-z]/,A=/\d/,U=/^(0x|0X)/,k=/^[0-7]+$/,O=/^\d+$/,B=/^[\dA-Fa-f]+$/,D=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,I=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,F=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,P=/[\u0009\u000A\u000D]/g,M=function(t,e){var n,r,i;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return Q;if(!(n=V(e.slice(1,-1))))return Q;t.host=n}else if($(t)){if(e=_(e),D.test(e))return Q;if(null===(n=j(e)))return Q;t.host=n}else{if(I.test(e))return Q;for(n="",r=d(e),i=0;i<r.length;i++)n+=Z(r[i],H);t.host=n}},j=function(t){var e,n,r,i,o,s,a,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=c[r]))return t;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=U.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)s=0;else{if(!(10==o?O:8==o?k:B).test(i))return t;s=parseInt(i,o)}n.push(s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=S(256,5-e))return null}else if(s>255)return null;for(a=n.pop(),r=0;r<n.length;r++)a+=n[r]*S(256,3-r);return a},V=function(t){var e,n,r,i,o,s,a,c=[0,0,0,0,0,0,0,0],l=0,u=null,p=0,h=function(){return t.charAt(p)};if(":"==h()){if(":"!=t.charAt(1))return;p+=2,u=++l}for(;h();){if(8==l)return;if(":"!=h()){for(e=n=0;n<4&&B.test(h());)e=16*e+parseInt(h(),16),p++,n++;if("."==h()){if(0==n)return;if(p-=n,l>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;p++}if(!A.test(h()))return;for(;A.test(h());){if(o=parseInt(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;p++}c[l]=256*c[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(p++,!h())return}else if(h())return;c[l++]=e}else{if(null!==u)return;p++,u=++l}}if(null!==u)for(s=l-u,l=7;0!=l&&s>0;)a=c[l],c[l--]=c[u+s-1],c[u+--s]=a;else if(8!=l)return;return c},G=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=N(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},H={},W=h({},H,{" ":1,'"':1,"<":1,">":1,"`":1}),J=h({},W,{"#":1,"?":1,"{":1,"}":1}),z=h({},J,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Z=function(t,e){var n=f(t,0);return n>32&&n<127&&!p(e,t)?t:encodeURIComponent(t)},X={ftp:21,file:null,http:80,https:443,ws:80,wss:443},$=function(t){return p(X,t.scheme)},K=function(t){return""!=t.username||""!=t.password},Y=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},q=function(t,e){var n;return 2==t.length&&R.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},tt=function(t){var e;return t.length>1&&q(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},et=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&q(e[0],!0)||e.pop()},nt=function(t){return"."===t||"%2e"===t.toLowerCase()},rt={},it={},ot={},st={},at={},ct={},lt={},ut={},pt={},ht={},dt={},ft={},_t={},mt={},gt={},vt={},yt={},Et={},bt={},xt={},wt={},Nt=function(t,e,n,i){var o,s,a,c,l,u=n||rt,h=0,f="",_=!1,m=!1,g=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(F,"")),e=e.replace(P,""),o=d(e);h<=o.length;){switch(s=o[h],u){case rt:if(!s||!R.test(s)){if(n)return L;u=ot;continue}f+=s.toLowerCase(),u=it;break;case it:if(s&&(C.test(s)||"+"==s||"-"==s||"."==s))f+=s.toLowerCase();else{if(":"!=s){if(n)return L;f="",u=ot,h=0;continue}if(n&&($(t)!=p(X,f)||"file"==f&&(K(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=f,n)return void($(t)&&X[t.scheme]==t.port&&(t.port=null));f="","file"==t.scheme?u=mt:$(t)&&i&&i.scheme==t.scheme?u=st:$(t)?u=ut:"/"==o[h+1]?(u=at,h++):(t.cannotBeABaseURL=!0,t.path.push(""),u=bt)}break;case ot:if(!i||i.cannotBeABaseURL&&"#"!=s)return L;if(i.cannotBeABaseURL&&"#"==s){t.scheme=i.scheme,t.path=i.path.slice(),t.query=i.query,t.fragment="",t.cannotBeABaseURL=!0,u=wt;break}u="file"==i.scheme?mt:ct;continue;case st:if("/"!=s||"/"!=o[h+1]){u=ct;continue}u=pt,h++;break;case at:if("/"==s){u=ht;break}u=Et;continue;case ct:if(t.scheme=i.scheme,s==r)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query;else if("/"==s||"\\"==s&&$(t))u=lt;else if("?"==s)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query="",u=xt;else{if("#"!=s){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.path.pop(),u=Et;continue}t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query,t.fragment="",u=wt}break;case lt:if(!$(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,u=Et;continue}u=ht}else u=pt;break;case ut:if(u=pt,"/"!=s||"/"!=f.charAt(h+1))continue;h++;break;case pt:if("/"!=s&&"\\"!=s){u=ht;continue}break;case ht:if("@"==s){_&&(f="%40"+f),_=!0,a=d(f);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||g){var E=Z(y,z);g?t.password+=E:t.username+=E}else g=!0}f=""}else if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&$(t)){if(_&&""==f)return"Invalid authority";h-=d(f).length+1,f="",u=dt}else f+=s;break;case dt:case ft:if(n&&"file"==t.scheme){u=vt;continue}if(":"!=s||m){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&$(t)){if($(t)&&""==f)return Q;if(n&&""==f&&(K(t)||null!==t.port))return;if(c=M(t,f))return c;if(f="",u=yt,n)return;continue}"["==s?m=!0:"]"==s&&(m=!1),f+=s}else{if(""==f)return Q;if(c=M(t,f))return c;if(f="",u=_t,n==ft)return}break;case _t:if(!A.test(s)){if(s==r||"/"==s||"?"==s||"#"==s||"\\"==s&&$(t)||n){if(""!=f){var b=parseInt(f,10);if(b>65535)return T;t.port=$(t)&&b===X[t.scheme]?null:b,f=""}if(n)return;u=yt;continue}return T}f+=s;break;case mt:if(t.scheme="file","/"==s||"\\"==s)u=gt;else{if(!i||"file"!=i.scheme){u=Et;continue}if(s==r)t.host=i.host,t.path=i.path.slice(),t.query=i.query;else if("?"==s)t.host=i.host,t.path=i.path.slice(),t.query="",u=xt;else{if("#"!=s){tt(o.slice(h).join(""))||(t.host=i.host,t.path=i.path.slice(),et(t)),u=Et;continue}t.host=i.host,t.path=i.path.slice(),t.query=i.query,t.fragment="",u=wt}}break;case gt:if("/"==s||"\\"==s){u=vt;break}i&&"file"==i.scheme&&!tt(o.slice(h).join(""))&&(q(i.path[0],!0)?t.path.push(i.path[0]):t.host=i.host),u=Et;continue;case vt:if(s==r||"/"==s||"\\"==s||"?"==s||"#"==s){if(!n&&q(f))u=Et;else if(""==f){if(t.host="",n)return;u=yt}else{if(c=M(t,f))return c;if("localhost"==t.host&&(t.host=""),n)return;f="",u=yt}continue}f+=s;break;case yt:if($(t)){if(u=Et,"/"!=s&&"\\"!=s)continue}else if(n||"?"!=s)if(n||"#"!=s){if(s!=r&&(u=Et,"/"!=s))continue}else t.fragment="",u=wt;else t.query="",u=xt;break;case Et:if(s==r||"/"==s||"\\"==s&&$(t)||!n&&("?"==s||"#"==s)){if(".."===(l=(l=f).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(et(t),"/"==s||"\\"==s&&$(t)||t.path.push("")):nt(f)?"/"==s||"\\"==s&&$(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&q(f)&&(t.host&&(t.host=""),f=f.charAt(0)+":"),t.path.push(f)),f="","file"==t.scheme&&(s==r||"?"==s||"#"==s))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==s?(t.query="",u=xt):"#"==s&&(t.fragment="",u=wt)}else f+=Z(s,J);break;case bt:"?"==s?(t.query="",u=xt):"#"==s?(t.fragment="",u=wt):s!=r&&(t.path[0]+=Z(s,H));break;case xt:n||"#"!=s?s!=r&&("'"==s&&$(t)?t.query+="%27":t.query+="#"==s?"%23":Z(s,H)):(t.fragment="",u=wt);break;case wt:s!=r&&(t.fragment+=Z(s,W))}h++}},St=function(t){var e,n,r=u(this,St,"URL"),i=arguments.length>1?arguments[1]:void 0,s=String(t),a=x(r,{type:"URL"});if(void 0!==i)if(i instanceof St)e=w(i);else if(n=Nt(e={},String(i)))throw TypeError(n);if(n=Nt(a,s,null,e))throw TypeError(n);var c=a.searchParams=new E,l=b(c);l.updateSearchParams(a.query),l.updateURL=function(){a.query=String(c)||null},o||(r.href=Qt.call(r),r.origin=Tt.call(r),r.protocol=Rt.call(r),r.username=Ct.call(r),r.password=At.call(r),r.host=Ut.call(r),r.hostname=kt.call(r),r.port=Ot.call(r),r.pathname=Bt.call(r),r.search=Dt.call(r),r.searchParams=It.call(r),r.hash=Ft.call(r))},Lt=St.prototype,Qt=function(){var t=w(this),e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,s=t.path,a=t.query,c=t.fragment,l=e+":";return null!==i?(l+="//",K(t)&&(l+=n+(r?":"+r:"")+"@"),l+=G(i),null!==o&&(l+=":"+o)):"file"==e&&(l+="//"),l+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(l+="?"+a),null!==c&&(l+="#"+c),l},Tt=function(){var t=w(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&$(t)?e+"://"+G(t.host)+(null!==n?":"+n:""):"null"},Rt=function(){return w(this).scheme+":"},Ct=function(){return w(this).username},At=function(){return w(this).password},Ut=function(){var t=w(this),e=t.host,n=t.port;return null===e?"":null===n?G(e):G(e)+":"+n},kt=function(){var t=w(this).host;return null===t?"":G(t)},Ot=function(){var t=w(this).port;return null===t?"":String(t)},Bt=function(){var t=w(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Dt=function(){var t=w(this).query;return t?"?"+t:""},It=function(){return w(this).searchParams},Ft=function(){var t=w(this).fragment;return t?"#"+t:""},Pt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&c(Lt,{href:Pt(Qt,(function(t){var e=w(this),n=String(t),r=Nt(e,n);if(r)throw TypeError(r);b(e.searchParams).updateSearchParams(e.query)})),origin:Pt(Tt),protocol:Pt(Rt,(function(t){var e=w(this);Nt(e,String(t)+":",rt)})),username:Pt(Ct,(function(t){var e=w(this),n=d(String(t));if(!Y(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=Z(n[r],z)}})),password:Pt(At,(function(t){var e=w(this),n=d(String(t));if(!Y(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=Z(n[r],z)}})),host:Pt(Ut,(function(t){var e=w(this);e.cannotBeABaseURL||Nt(e,String(t),dt)})),hostname:Pt(kt,(function(t){var e=w(this);e.cannotBeABaseURL||Nt(e,String(t),ft)})),port:Pt(Ot,(function(t){var e=w(this);Y(e)||(""==(t=String(t))?e.port=null:Nt(e,t,_t))})),pathname:Pt(Bt,(function(t){var e=w(this);e.cannotBeABaseURL||(e.path=[],Nt(e,t+"",yt))})),search:Pt(Dt,(function(t){var e=w(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",Nt(e,t,xt)),b(e.searchParams).updateSearchParams(e.query)})),searchParams:Pt(It),hash:Pt(Ft,(function(t){var e=w(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",Nt(e,t,wt)):e.fragment=null}))}),l(Lt,"toJSON",(function(){return Qt.call(this)}),{enumerable:!0}),l(Lt,"toString",(function(){return Qt.call(this)}),{enumerable:!0}),y){var Mt=y.createObjectURL,jt=y.revokeObjectURL;Mt&&l(St,"createObjectURL",(function(t){return Mt.apply(y,arguments)})),jt&&l(St,"revokeObjectURL",(function(t){return jt.apply(y,arguments)}))}m(St,"URL"),i({global:!0,forced:!s,sham:!o},{URL:St})},9515:(t,e,n)=>{var r=n(8761)(n(7772),"DataView");t.exports=r},9612:(t,e,n)=>{var r=n(2118),i=n(6909),o=n(8138),s=n(4174),a=n(746);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},235:(t,e,n)=>{var r=n(3945),i=n(1846),o=n(8028),s=n(2344),a=n(4769);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},326:(t,e,n)=>{var r=n(8761)(n(7772),"Map");t.exports=r},6738:(t,e,n)=>{var r=n(2411),i=n(6417),o=n(6928),s=n(9493),a=n(4150);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},2760:(t,e,n)=>{var r=n(8761)(n(7772),"Promise");t.exports=r},2143:(t,e,n)=>{var r=n(8761)(n(7772),"Set");t.exports=r},5386:(t,e,n)=>{var r=n(6738),i=n(2842),o=n(2482);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,t.exports=s},6571:(t,e,n)=>{var r=n(235),i=n(5243),o=n(2858),s=n(4417),a=n(8605),c=n(1418);function l(t){var e=this.__data__=new r(t);this.size=e.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=c,t.exports=l},857:(t,e,n)=>{var r=n(7772).Symbol;t.exports=r},9162:(t,e,n)=>{var r=n(7772).Uint8Array;t.exports=r},3215:(t,e,n)=>{var r=n(8761)(n(7772),"WeakMap");t.exports=r},7552:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}},1634:(t,e,n)=>{var r=n(6473),i=n(9631),o=n(6152),s=n(3226),a=n(9045),c=n(7598),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),u=!n&&i(t),p=!n&&!u&&s(t),h=!n&&!u&&!p&&c(t),d=n||u||p||h,f=d?r(t.length,String):[],_=f.length;for(var m in t)!e&&!l.call(t,m)||d&&("length"==m||p&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,_))||f.push(m);return f}},5067:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},7064:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},2218:(t,e,n)=>{var r=n(1225);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},1897:(t,e,n)=>{var r=n(5067),i=n(6152);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},3366:(t,e,n)=>{var r=n(857),i=n(2107),o=n(7157),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},5183:(t,e,n)=>{var r=n(3366),i=n(5125);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},8746:(t,e,n)=>{var r=n(1952),i=n(5125);t.exports=function t(e,n,o,s,a){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,s,t,a))}},1952:(t,e,n)=>{var r=n(6571),i=n(4871),o=n(1491),s=n(7416),a=n(940),c=n(6152),l=n(3226),u=n(7598),p="[object Arguments]",h="[object Array]",d="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,_,m,g){var v=c(t),y=c(e),E=v?h:a(t),b=y?h:a(e),x=(E=E==p?d:E)==d,w=(b=b==p?d:b)==d,N=E==b;if(N&&l(t)){if(!l(e))return!1;v=!0,x=!1}if(N&&!x)return g||(g=new r),v||u(t)?i(t,e,n,_,m,g):o(t,e,E,n,_,m,g);if(!(1&n)){var S=x&&f.call(t,"__wrapped__"),L=w&&f.call(e,"__wrapped__");if(S||L){var Q=S?t.value():t,T=L?e.value():e;return g||(g=new r),m(Q,T,n,_,g)}}return!!N&&(g||(g=new r),s(t,e,n,_,m,g))}},6840:(t,e,n)=>{var r=n(1049),i=n(7394),o=n(9259),s=n(7035),a=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,p=l.hasOwnProperty,h=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:a).test(s(t))}},5522:(t,e,n)=>{var r=n(3366),i=n(1158),o=n(5125),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[r(t)]}},6411:(t,e,n)=>{var r=n(6001),i=n(4248),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},6473:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},7826:t=>{t.exports=function(t){return function(e){return t(e)}}},9950:t=>{t.exports=function(t,e){return t.has(e)}},4019:(t,e,n)=>{var r=n(7772)["__core-js_shared__"];t.exports=r},4871:(t,e,n)=>{var r=n(5386),i=n(7064),o=n(9950);t.exports=function(t,e,n,s,a,c){var l=1&n,u=t.length,p=e.length;if(u!=p&&!(l&&p>u))return!1;var h=c.get(t),d=c.get(e);if(h&&d)return h==e&&d==t;var f=-1,_=!0,m=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++f<u;){var g=t[f],v=e[f];if(s)var y=l?s(v,g,f,e,t,c):s(g,v,f,t,e,c);if(void 0!==y){if(y)continue;_=!1;break}if(m){if(!i(e,(function(t,e){if(!o(m,e)&&(g===t||a(g,t,n,s,c)))return m.push(e)}))){_=!1;break}}else if(g!==v&&!a(g,v,n,s,c)){_=!1;break}}return c.delete(t),c.delete(e),_}},1491:(t,e,n)=>{var r=n(857),i=n(9162),o=n(1225),s=n(4871),a=n(5179),c=n(4207),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;t.exports=function(t,e,n,r,l,p,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!p(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=a;case"[object Set]":var f=1&r;if(d||(d=c),t.size!=e.size&&!f)return!1;var _=h.get(t);if(_)return _==e;r|=2,h.set(t,e);var m=s(d(t),d(e),r,l,p,h);return h.delete(t),m;case"[object Symbol]":if(u)return u.call(t)==u.call(e)}return!1}},7416:(t,e,n)=>{var r=n(3483),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,s,a){var c=1&n,l=r(t),u=l.length;if(u!=r(e).length&&!c)return!1;for(var p=u;p--;){var h=l[p];if(!(c?h in e:i.call(e,h)))return!1}var d=a.get(t),f=a.get(e);if(d&&f)return d==e&&f==t;var _=!0;a.set(t,e),a.set(e,t);for(var m=c;++p<u;){var g=t[h=l[p]],v=e[h];if(o)var y=c?o(v,g,h,e,t,a):o(g,v,h,t,e,a);if(!(void 0===y?g===v||s(g,v,n,o,a):y)){_=!1;break}m||(m="constructor"==h)}if(_&&!m){var E=t.constructor,b=e.constructor;E==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof E&&E instanceof E&&"function"==typeof b&&b instanceof b||(_=!1)}return a.delete(t),a.delete(e),_}},1242:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},3483:(t,e,n)=>{var r=n(1897),i=n(633),o=n(249);t.exports=function(t){return r(t,o,i)}},7937:(t,e,n)=>{var r=n(8304);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},8761:(t,e,n)=>{var r=n(6840),i=n(8109);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},2107:(t,e,n)=>{var r=n(857),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[a]=n:delete t[a]),i}},633:(t,e,n)=>{var r=n(7552),i=n(981),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),r(s(t),(function(e){return o.call(t,e)})))}:i;t.exports=a},940:(t,e,n)=>{var r=n(9515),i=n(326),o=n(2760),s=n(2143),a=n(3215),c=n(3366),l=n(7035),u="[object Map]",p="[object Promise]",h="[object Set]",d="[object WeakMap]",f="[object DataView]",_=l(r),m=l(i),g=l(o),v=l(s),y=l(a),E=c;(r&&E(new r(new ArrayBuffer(1)))!=f||i&&E(new i)!=u||o&&E(o.resolve())!=p||s&&E(new s)!=h||a&&E(new a)!=d)&&(E=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?l(n):"";if(r)switch(r){case _:return f;case m:return u;case g:return p;case v:return h;case y:return d}return e}),t.exports=E},8109:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},2118:(t,e,n)=>{var r=n(9191);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},6909:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},8138:(t,e,n)=>{var r=n(9191),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},4174:(t,e,n)=>{var r=n(9191),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},746:(t,e,n)=>{var r=n(9191);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},9045:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},8304:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},7394:(t,e,n)=>{var r,i=n(4019),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},6001:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},3945:t=>{t.exports=function(){this.__data__=[],this.size=0}},1846:(t,e,n)=>{var r=n(2218),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},8028:(t,e,n)=>{var r=n(2218);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},2344:(t,e,n)=>{var r=n(2218);t.exports=function(t){return r(this.__data__,t)>-1}},4769:(t,e,n)=>{var r=n(2218);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},2411:(t,e,n)=>{var r=n(9612),i=n(235),o=n(326);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},6417:(t,e,n)=>{var r=n(7937);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6928:(t,e,n)=>{var r=n(7937);t.exports=function(t){return r(this,t).get(t)}},9493:(t,e,n)=>{var r=n(7937);t.exports=function(t){return r(this,t).has(t)}},4150:(t,e,n)=>{var r=n(7937);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},5179:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},9191:(t,e,n)=>{var r=n(8761)(Object,"create");t.exports=r},4248:(t,e,n)=>{var r=n(241)(Object.keys,Object);t.exports=r},4146:(t,e,n)=>{t=n.nmd(t);var r=n(1242),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a},7157:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},241:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},7772:(t,e,n)=>{var r=n(1242),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},2842:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2482:t=>{t.exports=function(t){return this.__data__.has(t)}},4207:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},5243:(t,e,n)=>{var r=n(235);t.exports=function(){this.__data__=new r,this.size=0}},2858:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},4417:t=>{t.exports=function(t){return this.__data__.get(t)}},8605:t=>{t.exports=function(t){return this.__data__.has(t)}},1418:(t,e,n)=>{var r=n(235),i=n(326),o=n(6738);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(t,e),this.size=n.size,this}},7035:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},4073:(t,e,n)=>{var r=n(9259),i=n(1100),o=n(7642),s=Math.max,a=Math.min;t.exports=function(t,e,n){var c,l,u,p,h,d,f=0,_=!1,m=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var n=c,r=l;return c=l=void 0,f=e,p=t.apply(r,n)}function y(t){return f=t,h=setTimeout(b,e),_?v(t):p}function E(t){var n=t-d;return void 0===d||n>=e||n<0||m&&t-f>=u}function b(){var t=i();if(E(t))return x(t);h=setTimeout(b,function(t){var n=e-(t-d);return m?a(n,u-(t-f)):n}(t))}function x(t){return h=void 0,g&&c?v(t):(c=l=void 0,p)}function w(){var t=i(),n=E(t);if(c=arguments,l=this,d=t,n){if(void 0===h)return y(d);if(m)return clearTimeout(h),h=setTimeout(b,e),v(d)}return void 0===h&&(h=setTimeout(b,e)),p}return e=o(e)||0,r(n)&&(_=!!n.leading,u=(m="maxWait"in n)?s(o(n.maxWait)||0,e):u,g="trailing"in n?!!n.trailing:g),w.cancel=function(){void 0!==h&&clearTimeout(h),f=0,c=d=l=h=void 0},w.flush=function(){return void 0===h?p:x(i())},w}},1225:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},9631:(t,e,n)=>{var r=n(5183),i=n(5125),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},6152:t=>{var e=Array.isArray;t.exports=e},7878:(t,e,n)=>{var r=n(1049),i=n(1158);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},3226:(t,e,n)=>{t=n.nmd(t);var r=n(7772),i=n(6330),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;t.exports=c},8149:(t,e,n)=>{var r=n(8746);t.exports=function(t,e){return r(t,e)}},1049:(t,e,n)=>{var r=n(3366),i=n(9259);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1158:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},9259:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5125:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},4795:(t,e,n)=>{var r=n(3366),i=n(5125);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},7598:(t,e,n)=>{var r=n(5522),i=n(7826),o=n(4146),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},249:(t,e,n)=>{var r=n(1634),i=n(6411),o=n(7878);t.exports=function(t){return o(t)?r(t):i(t)}},1100:(t,e,n)=>{var r=n(7772);t.exports=function(){return r.Date.now()}},981:t=>{t.exports=function(){return[]}},6330:t=>{t.exports=function(){return!1}},7642:(t,e,n)=>{var r=n(9259),i=n(4795),o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=a.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):s.test(t)?NaN:+t}},4844:function(t,e){var n,r;"undefined"!=typeof self&&self,void 0===(r="function"==typeof(n=function(){function t(){}t.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},t.prototype.restoreState=function(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx},t.prototype.pattern=function(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");var e=this.disjunction();this.consumeChar("/");for(var n={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":a(n,"global");break;case"i":a(n,"ignoreCase");break;case"m":a(n,"multiLine");break;case"u":a(n,"unicode");break;case"y":a(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:e}},t.prototype.disjunction=function(){var t=[];for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t}},t.prototype.alternative=function(){for(var t=[];this.isTerm();)t.push(this.term());return{type:"Alternative",value:t}},t.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},t.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}c(t);var e=this.disjunction();return this.consumeChar(")"),{type:t,value:e}}!function(){throw Error("Internal Error - Should never get here!")}()},t.prototype.quantifier=function(t){var e;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":e=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;c(e)}if(!0!==t||void 0!==e)return c(e),"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e},t.prototype.atom=function(){var t;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return void 0===t&&this.isPatternCharacter()&&(t=this.patternCharacter()),c(t),this.isQuantifier()&&(t.quantifier=this.quantifier()),t},t.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[o("\n"),o("\r"),o("\u2028"),o("\u2029")]}},t.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.decimalEscapeAtom=function(){return{type:"GroupBackReference",value:this.positiveInteger()}},t.prototype.characterClassEscape=function(){var t,e=!1;switch(this.popChar()){case"d":t=l;break;case"D":t=l,e=!0;break;case"s":t=p;break;case"S":t=p,e=!0;break;case"w":t=u;break;case"W":t=u,e=!0}return c(t),{type:"Set",value:t,complement:e}},t.prototype.controlEscapeAtom=function(){var t;switch(this.popChar()){case"f":t=o("\f");break;case"n":t=o("\n");break;case"r":t=o("\r");break;case"t":t=o("\t");break;case"v":t=o("\v")}return c(t),{type:"Character",value:t}},t.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}},t.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:o("\0")}},t.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},t.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},t.prototype.identityEscapeAtom=function(){return{type:"Character",value:o(this.popChar())}},t.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:o(this.popChar())}}},t.prototype.characterClass=function(){var t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var n=this.classAtom();if("Character"===n.type&&this.isRangeDash()){this.consumeChar("-");var r=this.classAtom();if("Character"===r.type){if(r.value<n.value)throw Error("Range out of order in character class");t.push({from:n.value,to:r.value})}else s(n.value,t),t.push(o("-")),s(r.value,t)}else s(n.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}},t.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},t.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:o("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.group=function(){var t=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),t=!1;break;default:this.groupIdx++}var e=this.disjunction();this.consumeChar(")");var n={type:"Group",capturing:t,value:e};return t&&(n.idx=this.groupIdx),n},t.prototype.positiveInteger=function(){var t=this.popChar();if(!1===i.test(t))throw Error("Expecting a positive integer");for(;r.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)},t.prototype.integerIncludingZero=function(){var t=this.popChar();if(!1===r.test(t))throw Error("Expecting an integer");for(;r.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)},t.prototype.patternCharacter=function(){var t=this.popChar();switch(t){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:o(t)}}},t.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},t.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},t.prototype.isDigit=function(){return r.test(this.peekChar(0))},t.prototype.isClassAtom=function(t){switch(void 0===t&&(t=0),this.peekChar(t)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},t.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},t.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},t.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},t.prototype.isQuantifier=function(){var t=this.saveState();try{return void 0!==this.quantifier(!0)}catch(t){return!1}finally{this.restoreState(t)}},t.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},t.prototype.parseHexDigits=function(t){for(var e="",r=0;r<t;r++){var i=this.popChar();if(!1===n.test(i))throw Error("Expecting a HexDecimal digits");e+=i}return{type:"Character",value:parseInt(e,16)}},t.prototype.peekChar=function(t){return void 0===t&&(t=0),this.input[this.idx+t]},t.prototype.popChar=function(){var t=this.peekChar(0);return this.consumeChar(),t},t.prototype.consumeChar=function(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var e,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function o(t){return t.charCodeAt(0)}function s(t,e){void 0!==t.length?t.forEach((function(t){e.push(t)})):e.push(t)}function a(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function c(t){if(void 0===t)throw Error("Internal Error - Should never get here!")}var l=[];for(e=o("0");e<=o("9");e++)l.push(e);var u=[o("_")].concat(l);for(e=o("a");e<=o("z");e++)u.push(e);for(e=o("A");e<=o("Z");e++)u.push(e);var p=[o(" "),o("\f"),o("\n"),o("\r"),o("\t"),o("\v"),o("\t"),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o("\u2028"),o("\u2029"),o(" "),o(" "),o(" "),o("\ufeff")];function h(){}return h.prototype.visitChildren=function(t){for(var e in t){var n=t[e];t.hasOwnProperty(e)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(t){this.visit(t)}),this))}},h.prototype.visit=function(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)},h.prototype.visitPattern=function(t){},h.prototype.visitFlags=function(t){},h.prototype.visitDisjunction=function(t){},h.prototype.visitAlternative=function(t){},h.prototype.visitStartAnchor=function(t){},h.prototype.visitEndAnchor=function(t){},h.prototype.visitWordBoundary=function(t){},h.prototype.visitNonWordBoundary=function(t){},h.prototype.visitLookahead=function(t){},h.prototype.visitNegativeLookahead=function(t){},h.prototype.visitCharacter=function(t){},h.prototype.visitSet=function(t){},h.prototype.visitGroup=function(t){},h.prototype.visitGroupBackReference=function(t){},h.prototype.visitQuantifier=function(t){},{RegExpParser:t,BaseRegExpVisitor:h,VERSION:"0.4.0"}})?n.apply(e,[]):n)||(t.exports=r)},2489:(t,e,n)=>{"use strict";n.r(e);var r={};n.r(r),n.d(r,{COLUMN_SEPARATOR_STRING:()=>nt,CONFIG_ALIASES:()=>H,CONFIG_VALID_KEYS:()=>W,FILTER_OPERATORS:()=>K,SORT_ORDERS:()=>Z,SORT_ORDER_IDS:()=>X,TYPE_AGGREGATES:()=>$,TYPE_FILTERS:()=>rt}),n(3675),n(6886),n(4121),n(9419);const i=new WeakMap,o=t=>"function"==typeof t&&i.has(t),s="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,a=(t,e,n=null)=>{for(;e!==n;){const n=e.nextSibling;t.removeChild(e),e=n}},c={},l={},u=`{{lit-${String(Math.random()).slice(2)}}}`,p=`\x3c!--${u}--\x3e`,h=new RegExp(`${u}|${p}`),d="$lit$";class f{constructor(t,e){this.parts=[],this.element=e;const n=[],r=[],i=document.createTreeWalker(e.content,133,null,!1);let o=0,s=-1,a=0;const{strings:c,values:{length:l}}=t;for(;a<l;){const t=i.nextNode();if(null!==t){if(s++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:n}=e;let r=0;for(let t=0;t<n;t++)_(e[t].name,d)&&r++;for(;r-- >0;){const e=c[a],n=v.exec(e)[2],r=n.toLowerCase()+d,i=t.getAttribute(r);t.removeAttribute(r);const o=i.split(h);this.parts.push({type:"attribute",index:s,name:n,strings:o}),a+=o.length-1}}"TEMPLATE"===t.tagName&&(r.push(t),i.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(u)>=0){const r=t.parentNode,i=e.split(h),o=i.length-1;for(let e=0;e<o;e++){let n,o=i[e];if(""===o)n=g();else{const t=v.exec(o);null!==t&&_(t[2],d)&&(o=o.slice(0,t.index)+t[1]+t[2].slice(0,-d.length)+t[3]),n=document.createTextNode(o)}r.insertBefore(n,t),this.parts.push({type:"node",index:++s})}""===i[o]?(r.insertBefore(g(),t),n.push(t)):t.data=i[o],a+=o}}else if(8===t.nodeType)if(t.data===u){const e=t.parentNode;null!==t.previousSibling&&s!==o||(s++,e.insertBefore(g(),t)),o=s,this.parts.push({type:"node",index:s}),null===t.nextSibling?t.data="":(n.push(t),s--),a++}else{let e=-1;for(;-1!==(e=t.data.indexOf(u,e+1));)this.parts.push({type:"node",index:-1}),a++}}else i.currentNode=r.pop()}for(const t of n)t.parentNode.removeChild(t)}}const _=(t,e)=>{const n=t.length-e.length;return n>=0&&t.slice(n)===e},m=t=>-1!==t.index,g=()=>document.createComment(""),v=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class y{constructor(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}update(t){let e=0;for(const n of this.__parts)void 0!==n&&n.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],n=this.template.parts,r=document.createTreeWalker(t,133,null,!1);let i,o=0,a=0,c=r.nextNode();for(;o<n.length;)if(i=n[o],m(i)){for(;a<i.index;)a++,"TEMPLATE"===c.nodeName&&(e.push(c),r.currentNode=c.content),null===(c=r.nextNode())&&(r.currentNode=e.pop(),c=r.nextNode());if("node"===i.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(c.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(c,i.name,i.strings,this.options));o++}else this.__parts.push(void 0),o++;return s&&(document.adoptNode(t),customElements.upgrade(t)),t}}const E=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),b=` ${u} `;class x{constructor(t,e,n,r){this.strings=t,this.values=e,this.type=n,this.processor=r}getHTML(){const t=this.strings.length-1;let e="",n=!1;for(let r=0;r<t;r++){const t=this.strings[r],i=t.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===t.indexOf("--\x3e",i+1);const o=v.exec(t);e+=null===o?t+(n?b:p):t.substr(0,o.index)+o[1]+o[2]+d+o[3]+u}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");let e=this.getHTML();return void 0!==E&&(e=E.createHTML(e)),t.innerHTML=e,t}}const w=t=>null===t||!("object"==typeof t||"function"==typeof t),N=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class S{constructor(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(let t=0;t<n.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new L(this)}_getValue(){const t=this.strings,e=t.length-1,n=this.parts;if(1===e&&""===t[0]&&""===t[1]){const t=n[0].value;if("symbol"==typeof t)return String(t);if("string"==typeof t||!N(t))return t}let r="";for(let i=0;i<e;i++){r+=t[i];const e=n[i];if(void 0!==e){const t=e.value;if(w(t)||!N(t))r+="string"==typeof t?t:String(t);else for(const e of t)r+="string"==typeof e?e:String(e)}}return r+=t[e],r}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class L{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===c||w(t)&&t===this.value||(this.value=t,o(t)||(this.committer.dirty=!0))}commit(){for(;o(this.value);){const t=this.value;this.value=c,t(this)}this.value!==c&&this.committer.commit()}}class Q{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(g()),this.endNode=t.appendChild(g())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=g()),t.__insert(this.endNode=g())}insertAfterPart(t){t.__insert(this.startNode=g()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;o(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=c,t(this)}const t=this.__pendingValue;t!==c&&(w(t)?t!==this.value&&this.__commitText(t):t instanceof x?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):N(t)?this.__commitIterable(t):t===l?(this.value=l,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,n="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=n:this.__commitNode(document.createTextNode(n)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof y&&this.value.template===e)this.value.update(t.values);else{const n=new y(e,t.processor,this.options),r=n._clone();n.update(t.values),this.__commitNode(r),this.value=n}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let n,r=0;for(const i of t)n=e[r],void 0===n&&(n=new Q(this.options),e.push(n),0===r?n.appendIntoPart(this):n.insertAfterPart(e[r-1])),n.setValue(i),n.commit(),r++;r<e.length&&(e.length=r,this.clear(n&&n.endNode))}clear(t=this.startNode){a(this.startNode.parentNode,t.nextSibling,this.endNode)}}class T{constructor(t,e,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=n}setValue(t){this.__pendingValue=t}commit(){for(;o(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=c,t(this)}if(this.__pendingValue===c)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=c}}class R extends S{constructor(t,e,n){super(t,e,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new C(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class C extends L{}let A=!1;(()=>{try{const t={get capture(){return A=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class U{constructor(t,e,n){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=n,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;o(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=c,t(this)}if(this.__pendingValue===c)return;const t=this.__pendingValue,e=this.value,n=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),r=null!=t&&(null==e||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=k(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=c}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const k=t=>t&&(A?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),O=new class{handleAttributeExpressions(t,e,n,r){const i=e[0];return"."===i?new R(t,e.slice(1),n).parts:"@"===i?[new U(t,e.slice(1),r.eventContext)]:"?"===i?[new T(t,e.slice(1),n)]:new S(t,e,n).parts}handleTextExpression(t){return new Q(t)}};function B(t){let e=D.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},D.set(t.type,e));let n=e.stringsArray.get(t.strings);if(void 0!==n)return n;const r=t.strings.join(u);return n=e.keyString.get(r),void 0===n&&(n=new f(t,t.getTemplateElement()),e.keyString.set(r,n)),e.stringsArray.set(t.strings,n),n}const D=new Map,I=new WeakMap,F=(t,e,n)=>{let r=I.get(e);void 0===r&&(a(e,e.firstChild),I.set(e,r=new Q(Object.assign({templateFactory:B},n))),r.appendInto(e)),r.setValue(t),r.commit()};"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");const P=(t,...e)=>new x(t,e,"html",O);var M=n(4073),j=n.n(M),V=n(1053),G=n.n(V);const H={row_pivot:"row_pivots","row-pivot":"row_pivots","row-pivots":"row_pivots",col_pivot:"column_pivots",col_pivots:"column_pivots",column_pivot:"column_pivots","column-pivot":"column_pivots","column-pivots":"column_pivots",filters:"filter",sorts:"sort"},W=["viewport","row_pivots","column_pivots","aggregates","columns","filter","sort","computed_columns","row_pivot_depth","filter_op"],J=["any","avg","abs sum","count","distinct count","dominant","first by index","last by index","last","high","low","mean","median","pct sum parent","pct sum grand total","sum","sum abs","sum not null","unique"],z=["any","count","distinct count","distinct leaf","dominant","first by index","last by index","last","unique"],Z=["none","asc","desc","col asc","col desc","asc abs","desc abs","col asc abs","col desc abs"],X=[2,0,1,0,1,3,4,3,4],$={string:z,float:J,integer:J,boolean:["any","count","distinct count","distinct leaf","dominant","first by index","last by index","last","unique","and","or"],datetime:z,date:z},K={lessThan:"<",greaterThan:">",equals:"==",lessThanOrEquals:"<=",greaterThanOrEquals:">=",doesNotEqual:"!=",isNull:"is null",isNotNull:"is not null",isIn:"in",isNotIn:"not in",contains:"contains",bitwiseAnd:"&",bitwiseOr:"|",and:"and",or:"or",beginsWith:"begins with",endsWith:"ends with"},Y=[K.bitwiseAnd,K.bitwiseOr,K.equals,K.doesNotEqual,K.or,K.and,K.isNull,K.isNotNull],q=[K.lessThan,K.greaterThan,K.equals,K.lessThanOrEquals,K.greaterThanOrEquals,K.doesNotEqual,K.isNull,K.isNotNull],tt=[K.equals,K.contains,K.doesNotEqual,K.isIn,K.isNotIn,K.beginsWith,K.endsWith,K.isNull,K.isNotNull],et=[K.lessThan,K.greaterThan,K.equals,K.lessThanOrEquals,K.greaterThanOrEquals,K.doesNotEqual,K.isNull,K.isNotNull],nt="|",rt={string:tt,float:q,integer:q,boolean:Y,datetime:et,date:et};var it=n(2073),ot=n(3877),st=(n(5940),n(3108),n(1515),n(3985),n(8149)),at=n.n(st);function ct(t,e,n,r,i){var o={};return Object.keys(r).forEach((function(t){o[t]=r[t]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(t,e,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null),o}n(3108),n(5940),n(6886);const lt="dnd-poly-",ut=["none","copy","copyLink","copyMove","link","linkMove","move","all"],pt=["none","copy","move","link"],ht=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}();function dt(t){return t&&t.tagName}function ft(t,e,n){void 0===n&&(n=!0),document.addEventListener(t,e,!!ht&&{passive:n})}function _t(t,e){document.removeEventListener(t,e)}function mt(t,e,n,r){void 0===r&&(r=!1);const i=ht?{passive:!0,capture:r}:r;return t.addEventListener(e,n,i),{off:function(){t.removeEventListener(e,n,i)}}}function gt(t,e){if(1===t.nodeType){const n=getComputedStyle(t);for(let t=0;t<n.length;t++){const r=n[t];e.style.setProperty(r,n.getPropertyValue(r),n.getPropertyPriority(r))}if(e.style.pointerEvents="none",e.removeAttribute("id"),e.removeAttribute("class"),e.removeAttribute("draggable"),"CANVAS"===e.nodeName){const n=t,r=e,i=n.getContext("2d").getImageData(0,0,n.width,n.height);r.getContext("2d").putImageData(i,0,0)}}if(t.hasChildNodes())for(let n=0;n<t.childNodes.length;n++)gt(t.childNodes[n],e.childNodes[n])}function vt(t){return 0===t.length?0:t.reduce((function(t,e){return e+t}),0)/t.length}function yt(t,e){for(let n=0;n<t.changedTouches.length;n++)if(t.changedTouches[n].identifier===e)return!0;return!1}function Et(t,e,n){const r=[],i=[];for(let n=0;n<e.touches.length;n++){const o=e.touches[n];r.push(o[t+"X"]),i.push(o[t+"Y"])}n.x=vt(r),n.y=vt(i)}const bt=["","-webkit-"];function xt(t,e,n,r,i){void 0===i&&(i=!0);let o=e.x,s=e.y;r&&(o+=r.x,s+=r.y),i&&(o-=parseInt(t.offsetWidth,10)/2,s-=parseInt(t.offsetHeight,10)/2);const a="translate3d("+o+"px,"+s+"px, 0)";for(let e=0;e<bt.length;e++){const r=bt[e]+"transform";t.style[r]=a+" "+n[e]}}const wt=function(){function t(t,e){this._dataStore=t,this._setDragImageHandler=e,this._dropEffect=pt[0]}return Object.defineProperty(t.prototype,"dropEffect",{get:function(){return this._dropEffect},set:function(t){0!==this._dataStore.mode&&ut.indexOf(t)>-1&&(this._dropEffect=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"types",{get:function(){if(0!==this._dataStore.mode)return Object.freeze(this._dataStore.types)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectAllowed",{get:function(){return this._dataStore.effectAllowed},set:function(t){2===this._dataStore.mode&&ut.indexOf(t)>-1&&(this._dataStore.effectAllowed=t)},enumerable:!0,configurable:!0}),t.prototype.setData=function(t,e){if(2===this._dataStore.mode){if(t.indexOf(" ")>-1)throw new Error("illegal arg: type contains space");this._dataStore.data[t]=e,-1===this._dataStore.types.indexOf(t)&&this._dataStore.types.push(t)}},t.prototype.getData=function(t){if(1===this._dataStore.mode||2===this._dataStore.mode)return this._dataStore.data[t]||""},t.prototype.clearData=function(t){if(2===this._dataStore.mode){if(t&&this._dataStore.data[t]){delete this._dataStore.data[t];const e=this._dataStore.types.indexOf(t);return void(e>-1&&this._dataStore.types.splice(e,1))}this._dataStore.data={},this._dataStore.types=[]}},t.prototype.setDragImage=function(t,e,n){2===this._dataStore.mode&&this._setDragImageHandler(t,e,n)},t}();function Nt(t,e){return t?t===ut[0]?pt[0]:0===t.indexOf(ut[1])||t===ut[7]?pt[1]:0===t.indexOf(ut[4])?pt[3]:t===ut[6]?pt[2]:pt[1]:3===e.nodeType&&"A"===e.tagName?pt[3]:pt[1]}function St(t,e,n,r,i,o,s){void 0===o&&(o=!0),void 0===s&&(s=null),console.log("dnd-poly: dispatching "+t);const a=function(t,e,n,r,i,o,s){void 0===s&&(s=null);const a=e.changedTouches[0],c=new Event(n,{bubbles:!0,cancelable:r});c.dataTransfer=o,c.relatedTarget=s,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.pageX=a.pageX,c.pageY=a.pageY;const l=t.getBoundingClientRect();return c.offsetX=c.clientX-l.left,c.offsetY=c.clientY-l.top,c}(e,n,t,o,document.defaultView,i,s),c=!e.dispatchEvent(a);return r.mode=0,c}function Lt(t,e){if(!t||t===ut[7])return e;if(e===pt[1]){if(0===t.indexOf(pt[1]))return pt[1]}else if(e===pt[3]){if(0===t.indexOf(pt[3])||t.indexOf("Link")>-1)return pt[3]}else if(e===pt[2]&&(0===t.indexOf(pt[2])||t.indexOf("Move")>-1))return pt[2];return pt[0]}const Qt=function(){function t(t,e,n,r){this._initialEvent=t,this._config=e,this._sourceNode=n,this._dragOperationEndedCb=r,this._dragOperationState=0,this._immediateUserSelection=null,this._currentDropTarget=null,console.log("dnd-poly: setting up potential drag operation.."),this._lastTouchEvent=t,this._initialTouch=t.changedTouches[0],this._touchMoveHandler=this._onTouchMove.bind(this),this._touchEndOrCancelHandler=this._onTouchEndOrCancel.bind(this),ft("touchmove",this._touchMoveHandler,!1),ft("touchend",this._touchEndOrCancelHandler,!1),ft("touchcancel",this._touchEndOrCancelHandler,!1)}return t.prototype._setup=function(){const t=this;console.log("dnd-poly: starting drag and drop operation"),this._dragOperationState=1,this._currentDragOperation=pt[0],this._dragDataStore={data:{},effectAllowed:void 0,mode:3,types:[]},this._currentHotspotCoordinates={x:null,y:null},this._dragImagePageCoordinates={x:null,y:null};let e=this._sourceNode;if(this._dataTransfer=new wt(this._dragDataStore,(function(n,r,i){e=n,"number"!=typeof r&&"number"!=typeof i||(t._dragImageOffset={x:r||0,y:i||0})})),this._dragDataStore.mode=2,this._dataTransfer.dropEffect=pt[0],St("dragstart",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer))return console.log("dnd-poly: dragstart cancelled"),this._dragOperationState=3,this._cleanup(),!1;Et("page",this._lastTouchEvent,this._dragImagePageCoordinates);const n=this._config.dragImageSetup(e);var r;if(this._dragImageTransforms=(r=n,bt.map((function(t){const e=r.style[t+"transform"];return e&&"none"!==e?e.replace(/translate\(\D*\d+[^,]*,\D*\d+[^,]*\)\s*/g,""):""}))),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.zIndex="999999",n.classList.add("dnd-poly-drag-image"),n.classList.add("dnd-poly-icon"),this._dragImage=n,!this._dragImageOffset)if(this._config.dragImageOffset)this._dragImageOffset={x:this._config.dragImageOffset.x,y:this._config.dragImageOffset.y};else if(this._config.dragImageCenterOnTouch){const t=getComputedStyle(e);this._dragImageOffset={x:0-parseInt(t.marginLeft,10),y:0-parseInt(t.marginTop,10)}}else{const t=e.getBoundingClientRect(),n=getComputedStyle(e);this._dragImageOffset={x:t.left-this._initialTouch.clientX-parseInt(n.marginLeft,10)+t.width/2,y:t.top-this._initialTouch.clientY-parseInt(n.marginTop,10)+t.height/2}}return xt(this._dragImage,this._dragImagePageCoordinates,this._dragImageTransforms,this._dragImageOffset,this._config.dragImageCenterOnTouch),document.body.appendChild(this._dragImage),this._iterationIntervalId=window.setInterval((function(){t._iterationLock?console.log("dnd-poly: iteration skipped because previous iteration hast not yet finished."):(t._iterationLock=!0,t._dragAndDropProcessModelIteration(),t._iterationLock=!1)}),this._config.iterationInterval),!0},t.prototype._cleanup=function(){console.log("dnd-poly: cleanup"),this._iterationIntervalId&&(clearInterval(this._iterationIntervalId),this._iterationIntervalId=null),_t("touchmove",this._touchMoveHandler),_t("touchend",this._touchEndOrCancelHandler),_t("touchcancel",this._touchEndOrCancelHandler),this._dragImage&&(this._dragImage.parentNode.removeChild(this._dragImage),this._dragImage=null),this._dragOperationEndedCb(this._config,this._lastTouchEvent,this._dragOperationState)},t.prototype._onTouchMove=function(t){const e=this;if(!1!==yt(t,this._initialTouch.identifier)){if(this._lastTouchEvent=t,0===this._dragOperationState){let e;if(this._config.dragStartConditionOverride)try{e=this._config.dragStartConditionOverride(t)}catch(t){console.error("dnd-poly: error in dragStartConditionOverride hook: "+t),e=!1}else e=1===t.touches.length;return e?void(!0===this._setup()&&(this._initialEvent.preventDefault(),t.preventDefault())):void this._cleanup()}if(console.log("dnd-poly: moving draggable.."),t.preventDefault(),Et("client",t,this._currentHotspotCoordinates),Et("page",t,this._dragImagePageCoordinates),this._config.dragImageTranslateOverride)try{let n=!1;if(this._config.dragImageTranslateOverride(t,{x:this._currentHotspotCoordinates.x,y:this._currentHotspotCoordinates.y},this._immediateUserSelection,(function(t,r){e._dragImage&&(n=!0,e._currentHotspotCoordinates.x+=t,e._currentHotspotCoordinates.y+=r,e._dragImagePageCoordinates.x+=t,e._dragImagePageCoordinates.y+=r,xt(e._dragImage,e._dragImagePageCoordinates,e._dragImageTransforms,e._dragImageOffset,e._config.dragImageCenterOnTouch))})),n)return}catch(t){console.log("dnd-poly: error in dragImageTranslateOverride hook: "+t)}xt(this._dragImage,this._dragImagePageCoordinates,this._dragImageTransforms,this._dragImageOffset,this._config.dragImageCenterOnTouch)}},t.prototype._onTouchEndOrCancel=function(t){if(!1!==yt(t,this._initialTouch.identifier)){if(this._config.dragImageTranslateOverride)try{this._config.dragImageTranslateOverride(void 0,void 0,void 0,(function(){}))}catch(t){console.log("dnd-poly: error in dragImageTranslateOverride hook: "+t)}0!==this._dragOperationState?(t.preventDefault(),this._dragOperationState="touchcancel"===t.type?3:2):this._cleanup()}},t.prototype._dragAndDropProcessModelIteration=function(){const t=this,e=this._currentDragOperation;this._dragDataStore.mode=3,this._dataTransfer.dropEffect=pt[0];const n=St("drag",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer);if(n&&(console.log("dnd-poly: drag event cancelled."),this._currentDragOperation=pt[0]),n||2===this._dragOperationState||3===this._dragOperationState)return this._dragOperationEnded(this._dragOperationState)?void function(t,e,n,r){const i=getComputedStyle(t);if("hidden"===i.visibility||"none"===i.display)return console.log("dnd-poly: source node is not visible. skipping snapback transition."),void r();e.classList.add("dnd-poly-snapback");const o=getComputedStyle(e),s=parseFloat(o.transitionDuration);if(isNaN(s)||0===s)return console.log("dnd-poly: no transition used - skipping snapback"),void r();console.log("dnd-poly: starting dragimage snap back");const a=t.getBoundingClientRect(),c={x:a.left,y:a.top};c.x+=document.body.scrollLeft||document.documentElement.scrollLeft,c.y+=document.body.scrollTop||document.documentElement.scrollTop,c.x-=parseInt(i.marginLeft,10),c.y-=parseInt(i.marginTop,10);const l=parseFloat(o.transitionDelay),u=Math.round(1e3*(s+l));xt(e,c,n,void 0,!1),setTimeout(r,u)}(this._sourceNode,this._dragImage,this._dragImageTransforms,(function(){t._finishDragOperation()})):void this._finishDragOperation();const r=this._config.elementFromPoint(this._currentHotspotCoordinates.x,this._currentHotspotCoordinates.y);console.log("dnd-poly: new immediate user selection is: "+r);const i=this._currentDropTarget;r!==this._immediateUserSelection&&r!==this._currentDropTarget&&(this._immediateUserSelection=r,null!==this._currentDropTarget&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=pt[0],St("dragexit",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1)),null===this._immediateUserSelection?(this._currentDropTarget=this._immediateUserSelection,console.log("dnd-poly: current drop target changed to null")):(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=Nt(this._dragDataStore.effectAllowed,this._sourceNode),St("dragenter",this._immediateUserSelection,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?(console.log("dnd-poly: dragenter default prevented"),this._currentDropTarget=this._immediateUserSelection,this._currentDragOperation=Lt(this._dataTransfer.effectAllowed,this._dataTransfer.dropEffect)):this._immediateUserSelection!==document.body&&(this._currentDropTarget=document.body))),i!==this._currentDropTarget&&dt(i)&&(console.log("dnd-poly: current drop target changed."),this._dragDataStore.mode=3,this._dataTransfer.dropEffect=pt[0],St("dragleave",i,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1,this._currentDropTarget)),dt(this._currentDropTarget)&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=Nt(this._dragDataStore.effectAllowed,this._sourceNode),!1===St("dragover",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?(console.log("dnd-poly: dragover not prevented on possible drop-target."),this._currentDragOperation=pt[0]):(console.log("dnd-poly: dragover prevented."),this._currentDragOperation=Lt(this._dataTransfer.effectAllowed,this._dataTransfer.dropEffect))),console.log("dnd-poly: d'n'd iteration ended. current drag operation: "+this._currentDragOperation),e!==this._currentDragOperation&&this._dragImage.classList.remove(lt+e);const o=lt+this._currentDragOperation;this._dragImage.classList.add(o)},t.prototype._dragOperationEnded=function(t){console.log("dnd-poly: drag operation end detected with "+this._currentDragOperation);const e=this._currentDragOperation===pt[0]||null===this._currentDropTarget||3===t;return e?dt(this._currentDropTarget)&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=pt[0],St("dragleave",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1)):dt(this._currentDropTarget)&&(this._dragDataStore.mode=1,this._dataTransfer.dropEffect=this._currentDragOperation,!0===St("drop",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?this._currentDragOperation=this._dataTransfer.dropEffect:this._currentDragOperation=pt[0]),e},t.prototype._finishDragOperation=function(){console.log("dnd-poly: dragimage snap back transition ended"),this._dragDataStore.mode=3,this._dataTransfer.dropEffect=this._currentDragOperation,St("dragend",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1),this._dragOperationState=2,this._cleanup()},t}(),Tt={iterationInterval:150,tryFindDraggableTarget:function(t){let e=t.target;do{if(!1!==e.draggable){if(!0===e.draggable)return e;if(e.getAttribute&&"true"===e.getAttribute("draggable"))return e}}while((e=e.parentNode)&&e!==document.body)},dragImageSetup:function(t){const e=t.cloneNode(!0);return gt(t,e),e},elementFromPoint:function(t,e){return document.elementFromPoint(t,e)}};let Rt;function Ct(t,e){if(console.log("dnd-poly: global touchstart"),Rt)return void console.log("dnd-poly: drag operation already active");const n=Tt.tryFindDraggableTarget(t,e);if(n)try{Rt=new Qt(t,Tt,n,Ut)}catch(e){throw Ut(Tt,t,3),e}else console.log("dnd-poly: no draggable at touchstart coordinates")}function At(t){console.log("dnd-poly: setup delayed dragstart..");const e=t.target,n=t.composedPath(),r=function(t){console.log("dnd-poly: aborting delayed drag because of "+t.type),o.off(),s.off(),a.off(),c.off(),e&&e.dispatchEvent(new CustomEvent("dnd-poly-dragstart-cancel",{bubbles:!0,cancelable:!0})),clearTimeout(i)};e&&e.dispatchEvent(new CustomEvent("dnd-poly-dragstart-pending",{bubbles:!0,cancelable:!0}));const i=window.setTimeout((function(){console.log("dnd-poly: starting delayed drag.."),o.off(),s.off(),a.off(),c.off(),Ct(t,n)}),Tt.holdToDrag),o=mt(e,"touchend",r),s=mt(e,"touchcancel",r),a=mt(e,"touchmove",r),c=mt(window,"scroll",r,!0)}function Ut(t,e,n){if(0===n&&(console.log("dnd-poly: Drag never started. Last event was "+e.type),t.defaultActionOverride))try{t.defaultActionOverride(e),e.defaultPrevented&&console.log("dnd-poly: defaultActionOverride has taken care of triggering the default action. preventing default on original event")}catch(t){console.log("dnd-poly: error in defaultActionOverride: "+t)}Rt=null}function kt(t,...e){const n=e.map((t=>t.toString())).join("\n");return function(e){return function(t,e,n){const r=function(t){const e=document.createElement("div");return e.innerHTML=t,Array.prototype.slice.call(e.children)[0]}(t);!function(t){if(t.content)return;let e;for(t.content=document.createDocumentFragment();e=t.firstChild;)Node.prototype.appendChild.call(t.content,e)}(r),e&&(r.innerHTML=`<style>${e.toString()}</style>`+r.innerHTML),r.innerHTML=`<style id="psp_styles" scope="${r.getAttribute("id")}">test{}</style>`+r.innerHTML;for(let t of Object.getOwnPropertyNames(n.prototype)){let e=Object.getOwnPropertyDescriptor(n.prototype,t);if(e&&e.set){let r=e.set;e.set=function(e){this.hasAttribute(t)&&this.getAttribute(t)===e?(this._initializing||this._initialized)&&r.call(this,e):this.setAttribute(t,e)},Object.defineProperty(n.prototype,t,e)}}let i=r.getAttribute("id");console.log(`Registered ${i}`),window.customElements.define(i,class extends n{attributeChangedCallback(t,e,r){null===r&&(r="null"),"_"!==t[0]&&e!=r&&Object.getOwnPropertyDescriptor(n.prototype,t).set&&(this[t]=r)}connectedCallback(){if(!this._initialized){this._initializing=!0;var t=document.importNode(r.content,!0);this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t),super.connectedCallback&&super.connectedCallback();for(let t of Object.getOwnPropertyNames(n.prototype))"connectedCallback"!==t&&this.hasAttribute(t)&&"_"!==t[0]&&Object.getOwnPropertyDescriptor(n.prototype,t).set&&(this[t]=this.getAttribute(t));this._initializing=!1,this._initialized=!0}}static get observedAttributes(){return Object.getOwnPropertyNames(n.prototype)}})}(t,{toString:()=>n},e)}}function Ot(t){return function(e,n,r){const i=r.value;return r.set=function(e){let r=this.getAttribute(n);try{null!=e&&""!==e||(e=t()),"string"!=typeof e&&(e=JSON.stringify(e)),e!==r&&(r=e),r=JSON.parse(r)}catch(i){console.warn(`Invalid value for attribute "${n}": ${e}`),r=t()}i.call(this,r)},r.get=function(){return this.hasAttribute(n)?JSON.parse(this.getAttribute(n)):t()},delete r.value,delete r.writable,r}}function Bt(){let t,e=new Promise((e=>{t=e}));return e.resolve=t,e}function Dt(t,e,n){const r=Symbol("private lock"),i=n.value;return n.value=async function(...t){if(this[r]&&(await this[r],this[r]))return void await this[r];let e;this[r]=Bt();try{e=await i.call(this,...t)}catch(t){console.error(t)}finally{const t=this[r];return this[r]=void 0,t.resolve(),e}},n}function It(t,...e){if(e[0]===e[1])return;if(e.every((t=>t.classList.contains("null-column"))))return;let[n,r]=e.map((e=>Array.prototype.slice.call(t.children).indexOf(e)));r<n&&([n,r]=[r,n],e=e.reverse()),t.insertBefore(e[1],e[0]),r+1===t.children.length?t.appendChild(e[0]):t.insertBefore(e[0],t.children[r+1])}!function(t){if(t&&Object.keys(t).forEach((function(e){Tt[e]=t[e]})),!Tt.forceApply){const t=function(){const t={dragEvents:"ondragstart"in document.documentElement,draggable:"draggable"in document.documentElement,userAgentSupportingNativeDnD:void 0},e=!!window.chrome||/chrome/i.test(navigator.userAgent);return t.userAgentSupportingNativeDnD=!(/iPad|iPhone|iPod|Android/.test(navigator.userAgent)||e&&"ontouchstart"in document.documentElement),t}();if(t.userAgentSupportingNativeDnD&&t.draggable&&t.dragEvents)return!1}console.log("dnd-poly: Applying mobile drag and drop polyfill."),Tt.holdToDrag?(console.log("dnd-poly: holdToDrag set to "+Tt.holdToDrag),ft("touchstart",At,!1)):ft("touchstart",Ct,!1)}({tryFindDraggableTarget:function(t,e){const n=e||t.composedPath();for(let t of n){let e=t;do{if(!1!==e.draggable&&e.getAttribute&&"true"===e.getAttribute("draggable"))return e}while((e=e.parentNode)&&e!==document.body)}},elementFromPoint:function(t,e){for(let n of this._path)if(n.elementFromPoint){let r=n.elementFromPoint(t,e);if(r){for(;r.shadowRoot;)r=r.shadowRoot.elementFromPoint(t,e);return r}}},dragStartConditionOverride:function(t){return this._path=t.composedPath(),!0},holdToDrag:500});const Ft=Ot((()=>({}))),Pt=Ot((()=>[])),Mt={},jt=new class{registerPlugin(t,e){if(Mt[t])throw new Error(`A perspective-viewer plugin "${t}" has already been registered`);for(const n in Mt){const r=Mt[n];r&&r.name===e.name&&(console.warn(`Conflicting plugin name "${e.name}", qualifying with id`),r.name=`${r.name} [${n}]`,e.name=`${e.name} [${t}]`)}Mt[t]=e}getPlugin(t){return Mt[t]}getInstance(){return Mt}};function Vt(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}n.g.registerPlugin=jt.registerPlugin,n.g.getPlugin=jt.getPlugin,n.g.__perspective_plugins__&&n.g.__perspective_plugins__.forEach((([t,e])=>n.g.registerPlugin(t,e))),Object.setPrototypeOf(Vt.prototype,HTMLElement.prototype),Object.setPrototypeOf(Vt,HTMLElement);const Gt=document.createElement("span");function Ht(t,e=0){Gt.innerHTML=t,document.body.appendChild(Gt);const n=`${Math.max(e,Gt.offsetWidth)+20}px`;return document.body.removeChild(Gt),n}var Wt,Jt;function zt(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}function Zt(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Gt.style.visibility="hidden",Gt.style.fontFamily="monospace",Gt.style.fontSize="12px",Gt.style.position="absolute",kt('\x3c!--\r\n \r\n Copyright (c) 2017, the Perspective Authors.\r\n \r\n This file is part of the Perspective library, distributed under the terms of\r\n the Apache License 2.0. The full license can be found in the LICENSE file.\r\n\r\n--\x3e\r\n\r\n<template id="perspective-row">\r\n <div id="psp_row">\r\n <span class=\'is_visible\'></span>\r\n <div draggable=\'true\' class="row_draggable">\r\n <span id=\'name\' class="column_name"></span>\r\n <div class="row_computed">\r\n <span id="row_edit"></span>\r\n </div>\r\n <span id="sort_order"></span>\r\n <select id="column_aggregate" class="string"></select>\r\n <select id="filter_operator"></select>\r\n <input id="filter_operand" placeholder="Value" />\r\n <span id="row_exclamation" hidden>&#x26A0;</span>\r\n <span id=\'row_close\'>&#x2715;</span>\r\n </div>\r\n </div>\r\n</template>',{toString:()=>':host{display:block}:host .row_computed{display:none;flex-direction:row}.dropping *{pointer-events:none}:host #psp_row{display:var(--psp_row-display,flex);margin:var(--psp_row-margin,0);overflow:visible;align-items:var(--column_selector--align-items,center);width:auto!important;height:auto!important;float:none!important}:host .is_visible{width:var(--column_selector--width,20px);min-width:var(--column_selector--width,20px);height:var(--is_visible--height,auto);cursor:var(--is_visible--cursor,pointer);font-size:var(--column_selector--font-size,14px);margin-top:-2px;display:var(--is_visible-display,none)}:host #sort_order{display:none;font-family:var(--button--font-family,inherit);margin-right:4px}:host #sort_order:before{content:var(--row-sort-order--before,"-")}:host #sort_order:hover{color:var(--active--color,inherit)}:host #filter_operand{display:var(--filter_operand-display,none);margin:0;padding:0px;height:19px;color:inherit;outline:none;border-color:var(--inactive--color,#ccc)}:host #filter_operator{margin:0 0 0 15px;display:var(--filter_operator-display,none);height:17px}:host #filter_operator:hover{color:var(--active--color,inherit)}:host #sort_order{cursor:pointer;width:10px}:host select{margin-left:15px;padding-right:15px;cursor:pointer}@keyframes expand2{from{transform:translateX(10px)}}@keyframes expand3{from{transform:scale(0.9)}}:host(:hover) .is_visible{color:var(--active--color,--column-selector--color)}:host{border:0px solid rgba(0,0,0,0)}:host #row_close{display:var(--row_close-display,inline);cursor:pointer;min-width:5px;max-width:5px;margin-right:3px;flex-grow:0;font-size:10px;margin-left:3px}:host .is_visible:before{content:var(--is_visible--before,none)}:host .is_visible{color:var(--column-selector--color,#999);font-family:var(--column-selector--font-family,Arial)!important}:host #sort_order{display:var(--sort_order-display,none);padding:var(--sort_order-padding,0)}:host #row_exclamation{color:red}:host #row_close{color:#999;font-family:Arial;font-size:10px}:host #row_close:hover{color:var(--active--color,inherit)}:host #column_aggregate{font-family:Arial}:host .row_draggable select{border:none}:host .row_draggable select:focus{outline:none}:host select::-ms-expand{display:none}:host select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:var(--select--background,url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNC45IDEwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0LjkgMTA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojQUFBQUFBO30KPC9zdHlsZT4KPHRpdGxlPmFycm93czwvdGl0bGU+Cjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMS40LDQuNyAyLjUsMy4yIDMuNSw0LjcgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMy41LDUuMyAyLjUsNi44IDEuNCw1LjMgIi8+Cjwvc3ZnPg==) no-repeat 95% 50%);background-color:var(--select--background-color,white);color:inherit;border-radius:5px;height:24px;padding:var(--column_type--padding,0px 0px 0px 5px);font-size:12px}:host .awesomplete > ul{border-radius:0px;margin:0px;border:none;transition:none!important;background:var(--plugin--background,#fff)!important}:host .awesomplete > ul:before{content:none}:host .awesomplete > input,\n:host input{border-color:#ccc;border-width:0 0 1px 0;box-sizing:border-box;background-color:transparent}:host .row_draggable{animation:var(--row_draggable--animation,expand2 0.5s ease-out);cursor:move;border-style:solid;background-color:var(--row_draggable-background-color,none);overflow:var(--row_draggable-overflow,visible);border-color:var(--row_draggable-border-color,none);border-width:var(--row_draggable-border-width,0);padding:var(--row_draggable-padding,0);font-size:12px;flex-grow:1;color:inherit;transition:height 0.2s;box-sizing:border-box;height:var(--row_draggable-height,21px);min-height:var(--row_draggable-height,21px);display:var(--row_draggable-display,flex);align-items:var(--row-draggable--align-items);flex-direction:var(--row-draggable--flex-direction,column);justify-content:var(--row_draggable--justify-content,center);margin:var(--row_draggable--margin,0);transition:var(--row_draggable--transition,none)}:host .row_draggable *{opacity:var(--row_draggable_children-opacity,1)}:host .row_draggable select{margin:0px 0px 0px 27px}:host ul{transition:background-color 0.2s,border-color 0.2s}:host(.null-column) .is_visible{opacity:0!important}:host(.null-column) .row_draggable{background-color:var(--null--background,transparent)!important;border-color:#ccc!important;border-width:0 0 1px 0!important}:host([drop-target]) .row_draggable{background-color:var(--active--background,#f0f0ff)!important;animation:var(--drop-target--animation,var(--row_draggable--animation,expand3 0.5s ease-out));box-shadow:inset 0px 0px 0px 3px #1078d1!important}:host .integer:before,\n:host .float:before{content:var(--float--column-type--content,var(--column-type--content,"123"));color:var(--float--column-type--color,var(--column-type--color,#016bc6))}:host .string:before{content:var(--string--column-type--content,var(--column-type--content,"abc"));color:var(--string--column-type--color,var(--column-type--color,#fe9292))}:host .boolean:before{content:var(--boolean--column-type--content,var(--column-type--content,"t/f"));color:var(--boolean--column-type--color,var(--column-type--color,#999999))}:host .date:before{content:var(--date--column-type--content,var(--column-type--content,"mdy"));color:var(--date--column-type--color,var(--column-type--color,#999999))}:host .datetime:before{content:var(--datetime--column-type--content,var(--column-type--content,"mdy"));color:var(--datetime--column-type--color,var(--column-type--color,#999999))}:host .column_name{overflow:hidden;max-width:var(--column_name-max-width,none);white-space:nowrap;text-overflow:ellipsis}:host span#name:before{font-family:var(--interface-monospace--font-family,monospace);position:relative;display:inline-block;padding:var(--column_type--padding,0px 5px);min-width:18px;display:var(--name-before-display,none);width:var(--column_type--width,auto)}:host #column_aggregate{display:var(--column_aggregate-display,none);font-size:10px;font-family:Arial,sans-serif;width:88%;height:20px}:host span#name{flex:var(--column-name--flex,0 1 auto);width:100%;white-space:nowrap;margin:var(--column_name-margin,0)}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9sZXNzL3Jvdy5sZXNzIiwicm93Lmxlc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0JBLE1BQ0ksYUNISixDREVBLG9CQUlRLFlBQUEsQ0FDQSxrQkNIUixDRE9BLFlBQ0ksbUJDTEosQ0RRQSxlQUNJLG1DQUFBLENBQ0EsOEJBQUEsQ0FDQSxnQkFBQSxDQUNBLHNEQUFBLENBQ0Esb0JBQUEsQ0FDQSxxQkFBQSxDQUNBLG9CQ05KLENEU0Esa0JBQ0ksd0NBQUEsQ0FDQSw0Q0FBQSxDQUNBLHFDQUFBLENBQ0Esd0NBQUEsQ0FDQSxnREFBQSxDQUNBLGVBQUEsQ0FDQSxzQ0NQSixDRFVBLGtCQUNJLFlBQUEsQ0FDQSw4Q0FBQSxDQUNBLGdCQ1JKLENEU0kseUJBQ0kseUNDUFIsQ0RTSSx3QkFDSSxrQ0NQUixDRFdBLHNCQUVRLDBDQUFBLENBQ0EsUUFBQSxDQUNBLFdBQUEsQ0FDQSxXQUFBLENBQ0EsYUFBQSxDQUNBLFlBQUEsQ0FDQSx3Q0NWUixDREVBLHVCQVlRLGlCQUFBLENBQ0EsMkNBQUEsQ0FDQSxXQ1hSLENEWVEsNkJBQ0ksa0NDVlosQ0ROQSxrQkFxQlEsY0FBQSxDQUNBLFVDWlIsQ0RnQkEsYUFNUSxnQkFBQSxDQUNBLGtCQUFBLENBQ0EsY0NuQlIsQ0R1QkEsbUJBQ0ksS0FDSSwwQkNyQk4sQ0FDRixDRHdCQSxtQkFDSSxLQUNJLG9CQ3RCTixDQUNGLENEeUJBLDBCQUNJLG1EQ3ZCSixDRDBCQSxNQUNJLDhCQ3hCSixDRHVCQSxpQkFJUSx1Q0FBQSxDQUNBLGNBQUEsQ0FDQSxhQUFBLENBQ0EsYUFBQSxDQUNBLGdCQUFBLENBQ0EsV0FBQSxDQUNBLGNBQUEsQ0FDQSxlQ3hCUixDRGFBLHlCQWVRLHNDQ3pCUixDRFVBLGtCQW1CUSx3Q0FBQSxDQUNBLCtEQzFCUixDRE1BLGtCQXdCUSxzQ0FBQSxDQUNBLG1DQzNCUixDREVBLHVCQTZCUSxTQzVCUixDRERBLGlCQWlDUSxVQUFBLENBQ0EsaUJBQUEsQ0FDQSxjQzdCUixDRDhCUSx1QkFDSSxrQ0M1QlosQ0RUQSx3QkF5Q1EsaUJDN0JSLENEWkEsNEJBNkNRLFdDOUJSLENEZkEsa0NBaURRLFlDL0JSLENEbEJBLHlCQXFEUSxZQ2hDUixDRHJCQSxhQXlEUSx1QkFBQSxDQUNBLG9CQUFBLENBQ0EsbUJBQUEsQ0FDQSxlQUFBLENBQ0EsOHFCQUFBLENBS0Esc0RBQUEsQ0FDQSxhQUFBLENBQ0EsaUJBQUEsQ0FDQSxXQUFBLENBQ0EsbURBQUEsQ0FDQSxjQ3JDUixDRGxDQSx3QkEyRVEsaUJBQUEsQ0FDQSxVQUFBLENBQ0EsV0FBQSxDQUNBLHlCQUFBLENBQ0EsbURDdENSLENEekNBLCtCQW1GUSxZQ3ZDUixDRDVDQTtZQTNHSSxpQkFBQSxDQUNBLHNCQUFBLENBbU1JLHFCQUFBLENBQ0EsNEJDdkNSLENEbkRBLHFCQThGUSwrREFBQSxDQUNBLFdBQUEsQ0FDQSxrQkFBQSxDQUNBLDJEQUFBLENBQ0EsOENBQUEsQ0FDQSxtREFBQSxDQUNBLGdEQUFBLENBQ0Esc0NBQUEsQ0FDQSxjQUFBLENBQ0EsV0FBQSxDQUNBLGFBQUEsQ0FDQSxzQkFBQSxDQUNBLHFCQUFBLENBQ0EsdUNBQUEsQ0FDQSwyQ0FBQSxDQUNBLHlDQUFBLENBQ0EsNkNBQUEsQ0FDQSwwREFBQSxDQUNBLDREQUFBLENBQ0EscUNBQUEsQ0FDQSxnREN4Q1IsQ0QxRUEsdUJBcUhZLCtDQ3hDWixDRDdFQSw0QkF5SFksdUJDekNaLENEaEZBLFNBOEhRLGtEQzNDUixDRCtDQSxnQ0FFUSxtQkM5Q1IsQ0Q0Q0EsbUNBS1EsOERBQUEsQ0FDQSwyQkFBQSxDQUNBLGdDQzlDUixDRGtEQSxvQ0FFUSw0REFBQSxDQUlBLDZGQUFBLENBSUEsa0RDdkRSLENEMkRBO29CQUdRLDRFQUFBLENBSUEsd0VDN0RSLENEc0RBLHFCQWNRLDZFQUFBLENBSUEseUVDcEVSLENEa0RBLHNCQXlCUSw4RUFBQSxDQUlBLDBFQzNFUixDRDhDQSxtQkFvQ1EsMkVBQUEsQ0FJQSx1RUNsRlIsQ0QwQ0EsdUJBK0NRLCtFQUFBLENBSUEsMkVDekZSLENEd0dBLG1CQUNJLGVBQUEsQ0FDQSwyQ0FBQSxDQUNBLGtCQUFBLENBQ0Esc0JDdEdKLENEeUdBLHVCQWRJLDZEQUFBLENBQ0EsaUJBQUEsQ0FDQSxvQkFBQSxDQUNBLDJDQUFBLENBQ0EsY0FBQSxDQVlBLHVDQUFBLENBQ0Esb0NDbkdKLENEc0dBLHdCQUNJLDRDQUFBLENBQ0EsY0FBQSxDQUNBLDRCQUFBLENBQ0EsU0FBQSxDQUNBLFdDcEdKLENEdUdBLGdCQUNJLHNDQUFBLENBQ0EsVUFBQSxDQUNBLGtCQUFBLENBQ0Esa0NDckdKIiwiZmlsZSI6InJvdy5sZXNzIn0= */\n.awesomplete [hidden]{display:none}.awesomplete .visually-hidden{position:absolute;clip:rect(0,0,0,0)}.awesomplete{display:inline-block;position:relative}.awesomplete > input{display:block}.awesomplete > ul{position:absolute;left:0;z-index:1;min-width:100%;box-sizing:border-box;list-style:none;padding:0;margin:0;background:#fff}.awesomplete > ul:empty{display:none}.awesomplete > ul{border-radius:.3em;margin:.2em 0 0;background:hsla(0,0%,100%,.9);background:linear-gradient(to bottom right,white,hsla(0,0%,100%,.8));border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none}@supports (transform: scale(0)){.awesomplete > ul{transition:.3s cubic-bezier(.4,.2,.5,1.4);transform-origin:1.43em -.43em}.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}.awesomplete > ul:before{content:"";position:absolute;top:-.43em;left:1em;width:0;height:0;padding:.4em;background:white;border:inherit;border-right:0;border-bottom:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.awesomplete > ul > li{position:relative;padding:.2em .5em;cursor:pointer}.awesomplete > ul > li:hover{background:hsl(200,40%,80%);color:black}.awesomplete > ul > li[aria-selected="true"]{background:hsl(205,40%,40%);color:white}.awesomplete mark{background:hsl(65,100%,50%)}.awesomplete li:hover mark{background:hsl(68,100%,41%)}.awesomplete li[aria-selected="true"] mark{background:hsl(86,100%,21%);color:inherit}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF3ZXNvbXBsZXRlLmJhc2UuY3NzIiwiYXdlc29tcGxldGUudGhlbWUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHNCQUNBLFlBQ0EsQ0FFQSw4QkFDQSxpQkFBQSxDQUNBLGtCQUNBLENBRUEsYUFDQSxvQkFBQSxDQUNBLGlCQUNBLENBRUEscUJBQ0EsYUFDQSxDQUVBLGtCQUNBLGlCQUFBLENBQ0EsTUFBQSxDQUNBLFNBQUEsQ0FDQSxjQUFBLENBQ0EscUJBQUEsQ0FDQSxlQUFBLENBQ0EsU0FBQSxDQUNBLFFBQUEsQ0FDQSxlQUNBLENBRUEsd0JBQ0EsWUFDQSxDQ2hDQSxrQkFDQSxrQkFBQSxDQUNBLGVBQUEsQ0FDQSw2QkFBQSxDQUNBLG9FQUFBLENBQ0EsK0JBQUEsQ0FDQSx5Q0FBQSxDQUNBLGdCQUNBLENBRUEsZ0NBQ0Esa0JBQ0EseUNBQUEsQ0FDQSw4QkFDQSxDQUVBO3lCQUVBLFNBQUEsQ0FDQSxrQkFBQSxDQUNBLGFBQUEsQ0FDQSwrQkFDQSxDQUNBLENBR0EseUJBQ0EsVUFBQSxDQUNBLGlCQUFBLENBQ0EsVUFBQSxDQUNBLFFBQUEsQ0FDQSxPQUFBLENBQUEsUUFBQSxDQUNBLFlBQUEsQ0FDQSxnQkFBQSxDQUNBLGNBQUEsQ0FDQSxjQUFBLENBQ0EsZUFBQSxDQUNBLCtCQUFBLENBQ0EsdUJBQ0EsQ0FFQSx1QkFDQSxpQkFBQSxDQUNBLGlCQUFBLENBQ0EsY0FDQSxDQUVBLDZCQUNBLDJCQUFBLENBQ0EsV0FDQSxDQUVBLDZDQUNBLDJCQUFBLENBQ0EsV0FDQSxDQUVBLGtCQUNBLDJCQUNBLENBRUEsMkJBQ0EsMkJBQ0EsQ0FFQSwyQ0FDQSwyQkFBQSxDQUNBLGFBQ0EiLCJmaWxlIjoiYXdlc29tcGxldGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmF3ZXNvbXBsZXRlIFtoaWRkZW5dIHtcbiAgICBkaXNwbGF5OiBub25lO1xufVxuXG4uYXdlc29tcGxldGUgLnZpc3VhbGx5LWhpZGRlbiB7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIGNsaXA6IHJlY3QoMCwgMCwgMCwgMCk7XG59XG5cbi5hd2Vzb21wbGV0ZSB7XG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbn1cblxuLmF3ZXNvbXBsZXRlID4gaW5wdXQge1xuICAgIGRpc3BsYXk6IGJsb2NrO1xufVxuXG4uYXdlc29tcGxldGUgPiB1bCB7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIGxlZnQ6IDA7XG4gICAgei1pbmRleDogMTtcbiAgICBtaW4td2lkdGg6IDEwMCU7XG4gICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgICBsaXN0LXN0eWxlOiBub25lO1xuICAgIHBhZGRpbmc6IDA7XG4gICAgbWFyZ2luOiAwO1xuICAgIGJhY2tncm91bmQ6ICNmZmY7XG59XG5cbi5hd2Vzb21wbGV0ZSA+IHVsOmVtcHR5IHtcbiAgICBkaXNwbGF5OiBub25lO1xufVxuIiwiLmF3ZXNvbXBsZXRlID4gdWwge1xuXHRib3JkZXItcmFkaXVzOiAuM2VtO1xuXHRtYXJnaW46IC4yZW0gMCAwO1xuXHRiYWNrZ3JvdW5kOiBoc2xhKDAsMCUsMTAwJSwuOSk7XG5cdGJhY2tncm91bmQ6IGxpbmVhci1ncmFkaWVudCh0byBib3R0b20gcmlnaHQsIHdoaXRlLCBoc2xhKDAsMCUsMTAwJSwuOCkpO1xuXHRib3JkZXI6IDFweCBzb2xpZCByZ2JhKDAsMCwwLC4zKTtcblx0Ym94LXNoYWRvdzogLjA1ZW0gLjJlbSAuNmVtIHJnYmEoMCwwLDAsLjIpO1xuXHR0ZXh0LXNoYWRvdzogbm9uZTtcbn1cblxuQHN1cHBvcnRzICh0cmFuc2Zvcm06IHNjYWxlKDApKSB7XG5cdC5hd2Vzb21wbGV0ZSA+IHVsIHtcblx0XHR0cmFuc2l0aW9uOiAuM3MgY3ViaWMtYmV6aWVyKC40LC4yLC41LDEuNCk7XG5cdFx0dHJhbnNmb3JtLW9yaWdpbjogMS40M2VtIC0uNDNlbTtcblx0fVxuXHRcblx0LmF3ZXNvbXBsZXRlID4gdWxbaGlkZGVuXSxcblx0LmF3ZXNvbXBsZXRlID4gdWw6ZW1wdHkge1xuXHRcdG9wYWNpdHk6IDA7XG5cdFx0dHJhbnNmb3JtOiBzY2FsZSgwKTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHR0cmFuc2l0aW9uLXRpbWluZy1mdW5jdGlvbjogZWFzZTtcblx0fVxufVxuXG5cdC8qIFBvaW50ZXIgKi9cblx0LmF3ZXNvbXBsZXRlID4gdWw6YmVmb3JlIHtcblx0XHRjb250ZW50OiBcIlwiO1xuXHRcdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0XHR0b3A6IC0uNDNlbTtcblx0XHRsZWZ0OiAxZW07XG5cdFx0d2lkdGg6IDA7IGhlaWdodDogMDtcblx0XHRwYWRkaW5nOiAuNGVtO1xuXHRcdGJhY2tncm91bmQ6IHdoaXRlO1xuXHRcdGJvcmRlcjogaW5oZXJpdDtcblx0XHRib3JkZXItcmlnaHQ6IDA7XG5cdFx0Ym9yZGVyLWJvdHRvbTogMDtcblx0XHQtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDQ1ZGVnKTtcblx0XHR0cmFuc2Zvcm06IHJvdGF0ZSg0NWRlZyk7XG5cdH1cblxuXHQuYXdlc29tcGxldGUgPiB1bCA+IGxpIHtcblx0XHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0cGFkZGluZzogLjJlbSAuNWVtO1xuXHRcdGN1cnNvcjogcG9pbnRlcjtcblx0fVxuXHRcblx0LmF3ZXNvbXBsZXRlID4gdWwgPiBsaTpob3ZlciB7XG5cdFx0YmFja2dyb3VuZDogaHNsKDIwMCwgNDAlLCA4MCUpO1xuXHRcdGNvbG9yOiBibGFjaztcblx0fVxuXHRcblx0LmF3ZXNvbXBsZXRlID4gdWwgPiBsaVthcmlhLXNlbGVjdGVkPVwidHJ1ZVwiXSB7XG5cdFx0YmFja2dyb3VuZDogaHNsKDIwNSwgNDAlLCA0MCUpO1xuXHRcdGNvbG9yOiB3aGl0ZTtcblx0fVxuXHRcblx0XHQuYXdlc29tcGxldGUgbWFyayB7XG5cdFx0XHRiYWNrZ3JvdW5kOiBoc2woNjUsIDEwMCUsIDUwJSk7XG5cdFx0fVxuXHRcdFxuXHRcdC5hd2Vzb21wbGV0ZSBsaTpob3ZlciBtYXJrIHtcblx0XHRcdGJhY2tncm91bmQ6IGhzbCg2OCwgMTAwJSwgNDElKTtcblx0XHR9XG5cdFx0XG5cdFx0LmF3ZXNvbXBsZXRlIGxpW2FyaWEtc2VsZWN0ZWQ9XCJ0cnVlXCJdIG1hcmsge1xuXHRcdFx0YmFja2dyb3VuZDogaHNsKDg2LCAxMDAlLCAyMSUpO1xuXHRcdFx0Y29sb3I6IGluaGVyaXQ7XG5cdFx0fSJdfQ== */'})(class extends Vt{set name(t){this.shadowRoot.querySelector("#name").innerHTML=this.getAttribute("name")}_option_template(t,e){return P`
3 <option value="${t}" data-desc="${e}">${e||t}</option>
4 `}_select_template(t,e){const n=r[t][e]||[],i=P`
5 <optgroup label="weighted mean">
6 ${this._weights.map((t=>this._option_template(JSON.stringify(["weighted mean",t]),t)))}
7 </optgroup>
8 `,o="TYPE_AGGREGATES"===t&&("integer"===e||"float"===e);return P`
9 ${n.map((t=>this._option_template(t)))} ${o?i:l}
10 `}set_weights(t){this._weights=t}set type(t){const e=this.shadowRoot.querySelector("#name"),n=this.getAttribute("type");if(!n)return;const r=(0,it.get_type_config)(n);r.type&&e.classList.add(r.type),e.classList.add(n);const i=this.shadowRoot.querySelector("#column_aggregate"),o=this.shadowRoot.querySelector("#filter_operator");F(this._select_template("TYPE_AGGREGATES",r.type||n),i),F(this._select_template("TYPE_FILTERS",r.type||n),o),this.hasAttribute("aggregate")?this.aggregate=this.getAttribute("aggregate"):this.aggregate=r.aggregate,this.hasAttribute("filter")&&(this.filter=this.getAttribute("filter"));const s=this.shadowRoot.querySelector("#filter_operand");this._callback=t=>this._update_filter(t),s.addEventListener("keyup",this._callback.bind(this))}choices(t){const e=this.shadowRoot.querySelector("#filter_operand"),n=this.shadowRoot.querySelector("#filter_operator"),r=new(G())(e,{label:this.getAttribute("name"),list:t,minChars:0,autoFirst:!0,filter:function(t,e){return G().FILTER_CONTAINS(t,e.match(/[^,]*$/)[0])},item:function(t,e){return G().ITEM(t,e.match(/[^,]*$/)[0])},replace:function(t){const e=this.input.value.match(/^.+,\s*|/)[0];"in"===n.value||"not in"===n.value?this.input.value=e+t+", ":this.input.value=e+t}});""===e.value&&r.evaluate(),e.focus(),this._filter_operand.addEventListener("focus",(()=>{0===e.value.trim().length&&r.evaluate()})),e.addEventListener("awesomplete-selectcomplete",this._callback)}set filter(t){const e=this.shadowRoot.querySelector("#filter_operator"),n=JSON.parse(this.getAttribute("filter"));e.value!==n.operator&&(e.value=n.operator||(0,it.get_type_config)(this.getAttribute("type")).filter_operator),e.style.width=Ht(e.value);const r=this.shadowRoot.querySelector("#filter_operand"),i=n.operand?n.operand.toString():"";this._initialized||(r.value=i),e.value===K.isNull||e.value===K.isNotNull?r.style.display="none":(r.style.display="inline-block",r.style.width=Ht(i,30))}set aggregate(t){const e=this.shadowRoot.querySelector("#column_aggregate"),n=this.getAttribute("aggregate");if(e.value!==n&&this.hasAttribute("type")){const t=this.getAttribute("type");e.value=n||(0,it.get_type_config)(t).aggregate}this._blur_agg_dropdown()}set computed_column(t){}_get_computed_data(){const t=JSON.parse(this.getAttribute("computed_column"));return{column_name:t.column_name,input_columns:t.input_columns,input_type:t.input_type,computation:t.computation,type:t.type}}_update_filter(t){const e=this.shadowRoot.querySelector("#filter_operand"),n=this.shadowRoot.querySelector("#filter_operator");let r=e.value;switch(this.getAttribute("type")){case"float":r=parseFloat(r);break;case"integer":r=parseInt(r);break;case"boolean":r=r.toLowerCase().indexOf("true")>-1}n.value!==K.isIn&&n.value!==K.isNotIn||(r=r.split(",").map((t=>t.trim()))),this.setAttribute("filter",JSON.stringify({operator:n.value,operand:r})),this.dispatchEvent(new CustomEvent("filter-selected",{detail:t}))}_set_data_transfer(t){if(this.hasAttribute("filter")){const{operator:e,operand:n}=JSON.parse(this.getAttribute("filter"));t.dataTransfer.setData("text/plain",JSON.stringify([this.getAttribute("name"),e,n,this.getAttribute("type"),this.getAttribute("aggregate")]))}else t.dataTransfer.setData("text/plain",JSON.stringify([this.getAttribute("name"),(0,it.get_type_config)(this.getAttribute("type")).filter_operator,void 0,this.getAttribute("type"),this.getAttribute("aggregate")]));this.dispatchEvent(new CustomEvent("row-drag"))}_register_ids(){this._li=this.shadowRoot.querySelector(".row_draggable"),this._visible=this.shadowRoot.querySelector(".is_visible"),this._row_close=this.shadowRoot.querySelector("#row_close"),this._agg_dropdown=this.shadowRoot.querySelector("#column_aggregate"),this._sort_order=this.shadowRoot.querySelector("#sort_order"),this._filter_operand=this.shadowRoot.querySelector("#filter_operand"),this._filter_operator=this.shadowRoot.querySelector("#filter_operator"),this._edit_computed_column_button=this.shadowRoot.querySelector("#row_edit"),this._column_aggregate_category=this.shadowRoot.querySelector("#column_aggregate_category")}_blur_agg_dropdown(){if(this._agg_dropdown.blur(),"["===this._agg_dropdown.value[0])for(const t of this._agg_dropdown.querySelectorAll("optgroup option")){const e=t.getAttribute("data-desc");t.innerHTML=`mean by ${e}`}}_focus_agg_dropdown(){for(const t of this._agg_dropdown.querySelectorAll("optgroup option")){const e=t.getAttribute("data-desc");t.innerHTML=`by ${e}`}}_register_callbacks(){this._li.addEventListener("dragstart",this._set_data_transfer.bind(this)),this._li.addEventListener("dragend",(()=>{this.dispatchEvent(new CustomEvent("row-dragend"))})),this._visible.addEventListener("mousedown",(t=>this.dispatchEvent(new CustomEvent("visibility-clicked",{detail:t})))),this._row_close.addEventListener("mousedown",(t=>this.dispatchEvent(new CustomEvent("close-clicked",{detail:t})))),this._agg_dropdown.addEventListener("focus",this._focus_agg_dropdown.bind(this)),this._agg_dropdown.addEventListener("change",(t=>{this._blur_agg_dropdown();const e=this._agg_dropdown.value;this.setAttribute("aggregate",e),this.dispatchEvent(new CustomEvent("aggregate-selected",{detail:t}))})),this._sort_order.addEventListener("click",(t=>{this.dispatchEvent(new CustomEvent("sort-order",{detail:t}))}));const t=j()((t=>this._update_filter(t)),50);this._filter_operator.addEventListener("change",(()=>{this._filter_operand.focus(),this._filter_operator.style.width=Ht(this._filter_operator.value),this.shadowRoot.querySelector("#filter_operand").style.width=Ht(""+this._filter_operand.value,30),t()})),this._edit_computed_column_button.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("perspective-computed-column-edit",{bubbles:!0,detail:this._get_computed_data()}))}))}connectedCallback(){this._register_ids(),this._register_callbacks()}}),Object.setPrototypeOf(zt.prototype,HTMLElement.prototype),Object.setPrototypeOf(zt,HTMLElement),kt('\x3c!--\n\nCopyright (c) 2017, the Perspective Authors.\n\nThis file is part of the Perspective library, distributed under the terms of\nthe Apache License 2.0. The full license can be found in the LICENSE file.\n\n--\x3e\n\n<template id="perspective-autocomplete-widget">\n <div class="psp-autocomplete-widget undocked">\n <div class="psp-autocomplete-widget__list" role="list"></div>\n <div class="psp-autocomplete-widget__details"></div>\n </div>\n</template>',':host{width:100%}:host div.psp-autocomplete-widget{color:var(--color,#666666);font-family:var(--interface-monospace--font-family,monospace);box-sizing:border-box;display:none;z-index:100000;max-height:75px;font-size:12px;margin-top:5px;overflow-x:hidden;overflow-y:hidden;word-break:break-word}:host div.psp-autocomplete-widget.undocked{max-height:100px;min-width:150px;position:absolute;top:24px}:host div.psp-autocomplete-widget.undocked.show-details{min-width:300px}:host div.psp-autocomplete-widget.undocked.show-details div.psp-autocomplete-widget__list{border-right:none}:host div.psp-autocomplete-widget.docked{background:var(--plugin--background,none);position:static;min-width:auto;width:100%}:host div.psp-autocomplete-widget.docked div.psp-autocomplete-widget__list{background:var(--plugin--background,none);border:none}:host div.psp-autocomplete-widget.docked div.psp-autocomplete-widget__details{position:absolute;left:100%;z-index:100000;min-width:150px;max-width:200px}:host div.psp-autocomplete-widget.docked div.psp-autocomplete__item{border-bottom:1px solid #ccc}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__list{border:1px solid #ccc;background:var(--plugin--background,#fff);flex:auto;min-width:40%;overflow-y:scroll}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__list.small{align-self:flex-start}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details{background:var(--plugin--background,#fff);border:1px solid #ccc;display:none;flex:auto;padding:5px 5px 5px 10px;overflow-y:scroll;word-wrap:break-word}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details span{display:block}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details .psp-autocomplete-item-detail__item--label{margin-bottom:5px}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details .psp-autocomplete-item-detail__item--signature{font-size:11px;margin-bottom:5px}:host div.psp-autocomplete-widget div.psp-autocomplete-widget__details .psp-autocomplete-item-detail__item--help{font-size:10px}:host div.psp-autocomplete-widget div.psp-autocomplete__item{display:block;overflow-x:auto;padding:5px;word-break:keep-all}:host div.psp-autocomplete-widget div.psp-autocomplete__item:hover{background:var(--autocomplete-hover-background,hsl(200,40%,80%));cursor:pointer}:host div.psp-autocomplete-widget div.psp-autocomplete__item:focus,\n:host div.psp-autocomplete-widget div.psp-autocomplete__item[aria-selected="true"]{background:var(--autocomplete-select-background,hsl(205,40%,40%));color:var(--color,#fff);cursor:pointer}:host div.psp-autocomplete-widget div.psp-autocomplete__item:focus span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name::before,\n:host div.psp-autocomplete-widget div.psp-autocomplete__item[aria-selected="true"] span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name::before{color:var(--color,#fff)!important}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name{font-family:var(--interface--font-family,Arial,sans-serif)}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name:before{font-family:var(--interface-monospace--font-family,monospace);position:relative;display:inline-block;padding:var(--column_type--padding,0px 5px);min-width:18px;width:var(--column_type--width,auto)}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.integer:before,\n:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.float:before{content:var(--float--column-type--content,var(--column-type--content,"123"));color:var(--float--column-type--color,var(--column-type--color,#016bc6))}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.string:before{content:var(--string--column-type--content,var(--column-type--content,"abc"));color:var(--string--column-type--color,var(--column-type--color,#fe9292))}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.boolean:before{content:var(--boolean--column-type--content,var(--column-type--content,"t/f"));color:var(--boolean--column-type--color,var(--column-type--color,#999999))}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.date:before{content:var(--date--column-type--content,var(--column-type--content,"mdy"));color:var(--date--column-type--color,var(--column-type--color,#999999))}:host div.psp-autocomplete-widget div.psp-autocomplete__item span.psp-autocomplete-item__label.psp-autocomplete-item__label--column-name.datetime:before{content:var(--datetime--column-type--content,var(--column-type--content,"mdy"));color:var(--datetime--column-type--color,var(--column-type--color,#999999))}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9sZXNzL2F1dG9jb21wbGV0ZV93aWRnZXQubGVzcyIsImF1dG9jb21wbGV0ZV93aWRnZXQubGVzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXQSxNQUNJLFVDTUosQ0RQQSxrQ0FJUSwwQkFBQSxDQUNBLDZEQUFBLENBQ0EscUJBQUEsQ0FDQSxZQUFBLENBQ0EsY0FBQSxDQUNBLGVBQUEsQ0FDQSxjQUFBLENBQ0EsY0FBQSxDQUNBLGlCQUFBLENBQ0EsaUJBQUEsQ0FDQSxxQkNNUixDREZRLDJDQUNJLGdCQUFBLENBQ0EsZUFBQSxDQUNBLGlCQUFBLENBQ0EsUUNJWixDREFZLHdEQUNJLGVDRWhCLENESFksMEZBSVEsaUJDRXBCLENESVEseUNBQ0kseUNBQUEsQ0FDQSxlQUFBLENBQ0EsY0FBQSxDQUNBLFVDRlosQ0RGUSwyRUFPUSx5Q0FBQSxDQUNBLFdDRmhCLENETlEsOEVBWVEsaUJBQUEsQ0FDQSxTQUFBLENBQ0EsY0FBQSxDQUNBLGVBQUEsQ0FDQSxlQ0hoQixDRGJRLG9FQW9CUSw0QkNKaEIsQ0RwREEsb0VBNkRZLHFCQUFBLENBQ0EseUNBQUEsQ0FDQSxTQUFBLENBQ0EsYUFBQSxDQUNBLGlCQ05aLENEUVksMEVBQ0kscUJDTmhCLENEOURBLHVFQXlFWSx5Q0FBQSxDQUNBLHFCQUFBLENBQ0EsWUFBQSxDQUNBLFNBQUEsQ0FDQSx3QkFBQSxDQUNBLGlCQUFBLENBQ0Esb0JDUlosQ0R2RUEsNEVBa0ZnQixhQ1JoQixDRDFFQSxrSEFzRmdCLGlCQ1RoQixDRDdFQSxzSEEwRmdCLGNBQUEsQ0FDQSxpQkNWaEIsQ0RqRkEsaUhBK0ZnQixjQ1hoQixDRHBGQSw2REFvR1ksYUFBQSxDQUNBLGVBQUEsQ0FDQSxXQUFBLENBQ0EsbUJDYlosQ0RlWSxtRUFHSSxnRUFBQSxDQUlBLGNDbEJoQixDRHFCWTttRkFFSSxpRUFBQSxDQUlBLHVCQUFBLENBQ0EsY0N0QmhCLENEZVk7dUtBVVEsaUNDckJwQixDRDBCZ0IseUlBQ0ksMERDeEJwQixDRDZCb0IsZ0pBQ0ksNkRBQUEsQ0FJQSxpQkFBQSxDQUNBLG9CQUFBLENBRUEsMkNBQUEsQ0FDQSxjQUFBLENBQ0Esb0NDL0J4QixDRGtDb0I7c0pBRUksNEVBQUEsQ0FJQSx3RUNuQ3hCLENEeUNvQix1SkFDSSw2RUFBQSxDQUlBLHlFQzFDeEIsQ0RnRG9CLHdKQUNJLDhFQUFBLENBSUEsMEVDakR4QixDRHVEb0IscUpBQ0ksMkVBQUEsQ0FJQSx1RUN4RHhCLENEOERvQix5SkFDSSwrRUFBQSxDQUlBLDJFQy9EeEIiLCJmaWxlIjoiYXV0b2NvbXBsZXRlX3dpZGdldC5sZXNzIn0= */')((ct((Wt=class extends zt{constructor(){super(),this.displayed=!1,this._selection_index=-1}connectedCallback(){this._register_ids(),this._register_callbacks()}render(t){this._details.style.display="none",this._container.classList.remove("show-details"),this._list.classList.remove("small"),this._selection_index>-1&&this._list.children[this._selection_index].setAttribute("aria-selected",!1),0!==t.length?(this.reposition(),this._selection_index=-1,this.display(),this._list.scrollTop=0,t.length<4&&this._list.classList.add("small"),F(t,this._list)):this.clear()}reposition(){console.warning("PerspectiveAutocompleteWidget.reposition has not been implemented.")}item_clicked(t){if(t.target&&(t.target.matches(".psp-autocomplete__item")||t.target.matches(".psp-autocomplete-item__label"))){const e=new CustomEvent("perspective-autocomplete-item-clicked",{detail:t,bubbles:!0});this.dispatchEvent(e)}}item_mouseover(t){t.target&&t.target.matches(".psp-autocomplete__item")&&this._render_details_panel(t.target)}item_mouseleave(t){t.target&&t.target.matches(".psp-autocomplete__item")&&this._render_details_panel(t.target)}get_selected_value(){if(-1!==this._selection_index)return this._list.children[this._selection_index].getAttribute("data-value")}clear(){this.hide(),this._selection_index=-1,this._container.removeAttribute("style"),this._container.classList.add("undocked"),F(l,this._list)}display(){this._container.style.display="flex",this.displayed=!0}hide(){this._container.style.display="none",this.displayed=!1}_next(){const t=this._list.children.length,e=this._selection_index<t-1?this._selection_index+1:t?0:-1;this._go_to(e)}_prev(){const t=this._list.children.length,e=this._selection_index-1,n=this._selection_index>-1&&-1!==e?e:t-1;this._go_to(n)}_go_to(t){const e=this._list.children;this._selection_index>-1&&e[this._selection_index].setAttribute("aria-selected",!1),this._selection_index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),e[t].scrollIntoView({block:"nearest"}),this._render_details_panel(e[t]))}_render_details_panel(t){if(this._clear_details_panel(),t.hasAttribute("data-help")&&t.getAttribute("data-help")){this._container.classList.add("show-details");const e=t.getAttribute("data-label"),n=t.getAttribute("data-help"),r=t.getAttribute("data-signature"),i=P`
11 <span class="psp-autocomplete-item-detail__item--label">${e}</span>
12 <span class="psp-autocomplete-item-detail__item--signature">${r}</span>
13 <span class="psp-autocomplete-item-detail__item--help">${n}</span>
14 `;F(i,this._details),this._details.scrollTop=0,this._details.style.display="block"}}_clear_details_panel(){F(l,this._details),this._details.style.display="none",this._container.classList.remove("show-details")}_register_ids(){this._container=this.shadowRoot.querySelector(".psp-autocomplete-widget"),this._list=this.shadowRoot.querySelector(".psp-autocomplete-widget__list"),this._details=this.shadowRoot.querySelector(".psp-autocomplete-widget__details")}_register_callbacks(){this._list.addEventListener("click",this.item_clicked.bind(this)),this._list.addEventListener("mousedown",(t=>t.preventDefault())),this._list.addEventListener("mouseover",this.item_mouseover.bind(this)),this._list.addEventListener("mouseleave",this.item_mouseleave.bind(this))}}).prototype,"render",[Dt],Object.getOwnPropertyDescriptor(Wt.prototype,"render"),Wt.prototype),Wt)),Object.setPrototypeOf(Zt.prototype,HTMLElement.prototype),Object.setPrototypeOf(Zt,HTMLElement),kt('\x3c!--\n\nCopyright (c) 2017, the Perspective Authors.\n\nThis file is part of the Perspective library, distributed under the terms of\nthe Apache License 2.0. The full license can be found in the LICENSE file.\n\n--\x3e\n\n<template id="perspective-expression-editor">\n <div role="textbox" contenteditable="true" spellcheck="false" class="perspective-expression-editor__edit_area"></div>\n</template>',':host{width:100%}:host .perspective-expression-editor__edit_area{background:var(--background-color,none);border:1px solid var(--inactive-color,#ccc);box-sizing:border-box;color:var(--color,#666666);font-size:12px;display:block;font-family:var(--interface-monospace--font-family,monospace);height:75px;margin-top:5px;max-width:250px;min-height:50px;padding:5px;resize:auto;outline:none;overflow:auto;white-space:pre-wrap;width:100%}:host .perspective-expression-editor__edit_area:hover{cursor:text}:host .perspective-expression-editor__edit_area .psp-expression__column_name{font-family:var(--interface--font-family,Arial,sans-serif)}:host .perspective-expression-editor__edit_area .psp-expression__column_name:before{font-family:var(--interface-monospace--font-family,monospace);position:relative;display:inline-block;padding:var(--column_type--padding,0px 5px);min-width:18px;width:var(--column_type--width,auto)}:host .perspective-expression-editor__edit_area .psp-expression__column_name.integer:before,\n:host .perspective-expression-editor__edit_area .psp-expression__column_name.float:before{content:var(--float--column-type--content,var(--column-type--content,"123"));color:var(--float--column-type--color,var(--column-type--color,#016bc6))}:host .perspective-expression-editor__edit_area .psp-expression__column_name.string:before{content:var(--string--column-type--content,var(--column-type--content,"abc"));color:var(--string--column-type--color,var(--column-type--color,#fe9292))}:host .perspective-expression-editor__edit_area .psp-expression__column_name.boolean:before{content:var(--boolean--column-type--content,var(--column-type--content,"t/f"));color:var(--boolean--column-type--color,var(--column-type--color,#999999))}:host .perspective-expression-editor__edit_area .psp-expression__column_name.date:before{content:var(--date--column-type--content,var(--column-type--content,"mdy"));color:var(--date--column-type--color,var(--column-type--color,#999999))}:host .perspective-expression-editor__edit_area .psp-expression__column_name.datetime:before{content:var(--datetime--column-type--content,var(--column-type--content,"mdy"));color:var(--datetime--column-type--color,var(--column-type--color,#999999))}:host .perspective-expression-editor__edit_area .psp-expression__function{color:var(--expression--function-color,#e78340)}:host .perspective-expression-editor__edit_area .psp-expression__operator{color:var(--expression--operator-color,#646464)}:host .perspective-expression-editor__edit_area .psp-expression__suggestion{color:lightgray;text-decoration:underline}:host .perspective-expression-editor__edit_area .psp-expression__errored{font-weight:700;color:var(--expression--error-color,#fa3333);text-decoration:underline dotted var(--expression--error-color,#fa3333)}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9sZXNzL2V4cHJlc3Npb25fZWRpdG9yLmxlc3MiLCJleHByZXNzaW9uX2VkaXRvci5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVdBLE1BQ0ksVUNNSixDRFBBLGdEQU1RLHVDQUFBLENBQ0EsMkNBQUEsQ0FDQSxxQkFBQSxDQUNBLDBCQUFBLENBQ0EsY0FBQSxDQUNBLGFBQUEsQ0FDQSw2REFBQSxDQUNBLFdBQUEsQ0FDQSxjQUFBLENBQ0EsZUFBQSxDQUNBLGVBQUEsQ0FDQSxXQUFBLENBQ0EsV0FBQSxDQUNBLFlBQUEsQ0FDQSxhQUFBLENBQ0Esb0JBQUEsQ0FDQSxVQ0lSLENERlEsc0RBQ0ksV0NJWixDRDdCQSw2RUE2QlksMERDR1osQ0RDWSxvRkFDSSw2REFBQSxDQUNBLGlCQUFBLENBQ0Esb0JBQUEsQ0FFQSwyQ0FBQSxDQUNBLGNBQUEsQ0FDQSxvQ0NBaEIsQ0RHWTswRkFFSSw0RUFBQSxDQUlBLHdFQ0poQixDRFVZLDJGQUNJLDZFQUFBLENBSUEseUVDWGhCLENEaUJZLDRGQUNJLDhFQUFBLENBSUEsMEVDbEJoQixDRHdCWSx5RkFDSSwyRUFBQSxDQUlBLHVFQ3pCaEIsQ0QrQlksNkZBQ0ksK0VBQUEsQ0FJQSwyRUNoQ2hCLENEN0RBLDBFQXFHWSwrQ0NyQ1osQ0RoRUEsMEVBeUdZLCtDQ3RDWixDRG5FQSw0RUE2R1ksZUFBQSxDQUNBLHlCQ3ZDWixDRHZFQSx5RUFrSFksZUFBQSxDQUNBLDRDQUFBLENBQ0EsdUVDeENaIiwiZmlsZSI6ImV4cHJlc3Npb25fZWRpdG9yLmxlc3MifQ== */')((ct((Jt=class extends Zt{constructor(){super(),this._value="",this._ignored_nodes=["BR","DIV"]}connectedCallback(){this._register_ids(),this._register_callbacks(),this.renderer=this._render_content}set_renderer(t){this.renderer=t}update_content(){const t=this.shadowRoot.getSelection(),e=this.get_tokens(this._edit_area),n=new CustomEvent("perspective-expression-editor-input",{detail:{nodes:e.map((t=>t.node)),text:this._edit_area.textContent}});this.dispatchEvent(n);let r=null,i=null,o=0;for(const n of e)n.node===t.anchorNode&&(r=o+t.anchorOffset),n.node===t.focusNode&&(i=o+t.focusOffset),o+=n.text.length;if(this._value=e.map((t=>t.text)).join(""),0===this._value.length)this.clear_content();else{const t=this.renderer(this._value,e);this._edit_area.innerHTML=t}this.restore_selection(r,i);const s=new CustomEvent("perspective-expression-editor-rendered",{detail:{nodes:e.map((t=>t.node)),text:this._value}});this.dispatchEvent(s)}clear_content(){this._edit_area.innerHTML=""}_render_content(t){return`<span class="psp-expression__fragment">${t}</span>`}restore_selection(t,e){const n=this.shadowRoot.getSelection(),r=this.get_tokens(this._edit_area);let i=this._edit_area,o=0,s=this._edit_area,a=0,c=0;for(const n of r){const r=c,l=r+n.text.length;r<=t&&t<=l&&(i=n.node,o=t-r),r<=e&&e<=l&&(s=n.node,a=e-r),c+=n.text.length}n.setBaseAndExtent(i,o,s,a)}get_text(){return this._edit_area.textContent}get_tokens(t){const e=[];for(const n of t.childNodes)if(!this._ignored_nodes.includes(n.nodeName))switch(n.nodeType){case Node.TEXT_NODE:e.push({text:n.nodeValue,node:n});break;case Node.ELEMENT_NODE:e.splice(e.length,0,...this.get_tokens(n));break;default:continue}return e}focus(){this._edit_area.focus()}keyup(t){const e=new CustomEvent("perspective-expression-editor-keyup",{detail:t});this.dispatchEvent(e)}keydown(t){const e=new CustomEvent("perspective-expression-editor-keydown",{detail:t});this.dispatchEvent(e)}_capture_drop_data(t){this._edit_area.focus();const e=t.dataTransfer.getData("text");if(""!==e)try{const n=JSON.parse(e);Array.isArray(n)&&n.length>4&&(t.preventDefault(),this._edit_area.textContent+=`"${n[0]}"`)}catch(t){}finally{this._reset_selection(),this.update_content()}}_reset_selection(){const t=this.shadowRoot.getSelection();t.setBaseAndExtent(t.anchorNode,this._edit_area.textContent.length,t.focusNode,this._edit_area.textContent.length)}_register_ids(){this._edit_area=this.shadowRoot.querySelector(".perspective-expression-editor__edit_area")}_register_callbacks(){this._edit_area.addEventListener("drop",this._capture_drop_data.bind(this)),this._edit_area.addEventListener("input",this.update_content.bind(this)),this._edit_area.addEventListener("keyup",this.keyup.bind(this)),this._edit_area.addEventListener("keydown",this.keydown.bind(this))}}).prototype,"update_content",[Dt],Object.getOwnPropertyDescriptor(Jt.prototype,"update_content"),Jt.prototype),Jt));const Xt={columnName:"column name",leftParen:"(",rightParen:")",add:"+",subtract:"-",multiply:"*",divide:"/",percent_of:"%"},$t=t=>{let e;return e=Array.isArray(t)?t.filter((t=>"EOF"!==t.tokenType.name)).map((t=>t.payload?t.payload:t.image)):t.payload?t.payload:t.image,e&&0!==e.length||(e="EOF"),e},Kt={buildUnexpectedCharactersMessage:(t,e,n,r,i)=>`Ln ${r}, Col ${i}: Unexpected input \`${t}\` at character ${e}`},Yt={buildEarlyExitMessage:t=>`Unexpected token: \`${$t(t.actual)}\`\n\nExpected one of the following tokens: \n ${t.expectedIterationPaths.map((t=>{let e=[];return t.map((t=>{const n=(t.name,Xt[t.name]);e.push(n)})),e.join(", ")})).join("\n")}`,buildMismatchTokenMessage:t=>{let e=$t(t.actual),n=t.expected.name;Xt[n]&&(n=Xt[n]);let r=`Expecting token \`${n}\`, but found \`${e}\`.`;return")"!==n&&"rightParen"!==n||(r+="\n\nMake sure all left parentheses are matched\nwith right parentheses."),r},buildNoViableAltMessage:t=>{let e=`Unexpected token: \`${$t(t.actual)}\`.`;return"Expression"===t.ruleName?e+="\n\nExpected a column name, `(`,\nor functional operator such as:\n- `sqrt`\n- `uppercase`\n- `day_of_week`":"ColumnName"===t.ruleName?e+="\n\nExpected a column name or `(`":"TerminalColumnName"===t.ruleName&&(e+="\n\nExpected a column name after 'AS'"),e}},qt={},te=(0,ot.createToken)({name:"OperatorTokenType",pattern:ot.Lexer.NA}),ee=(0,ot.createToken)({name:"FunctionTokenType",pattern:ot.Lexer.NA}),ne=(0,ot.createToken)({name:"ColumnNameTokenType",pattern:ot.Lexer.NA}),re=(0,ot.createToken)({name:"UpperLowerTokenType",pattern:/(uppercase|lowercase)/}),ie=/(["'])(.*?[^\\])\1/y,oe=(0,ot.createToken)({name:"columnName",pattern:{exec:function(t,e){ie.lastIndex=e;const n=ie.exec(t);return null!==n&&3===n.length&&(n.payload=n[2]),n}},line_breaks:!1,categories:[ne]}),se=(0,ot.createToken)({name:"as",label:"Name new column as",pattern:/(AS|As|as)/,longer_alt:re}),ae=(0,ot.createToken)({name:"add",label:"+",pattern:/\+/,categories:[te]}),ce=(0,ot.createToken)({name:"subtract",label:"-",pattern:/\-/,categories:[te]}),le=(0,ot.createToken)({name:"multiply",label:"*",pattern:/\*/,categories:[te]}),ue=(0,ot.createToken)({name:"divide",label:"/",pattern:/\//,categories:[te]}),pe=(0,ot.createToken)({name:"pow",label:"x ^ y",pattern:/\^/,categories:[te]}),he=(0,ot.createToken)({name:"percent_of",label:"x % y",pattern:/\%/,categories:[te]}),de=(0,ot.createToken)({name:"equals",label:"x == y",pattern:/\==/,categories:[te]}),fe=(0,ot.createToken)({name:"not_equals",label:"x != y",pattern:/\!=/,categories:[te]}),_e=(0,ot.createToken)({name:"greater_than",label:"x > y",pattern:/\>/,categories:[te]}),me=(0,ot.createToken)({name:"less_than",label:"x < y",pattern:/\</,categories:[te]}),ge=(0,ot.createToken)({name:"is",label:"x is y",pattern:/is/,categories:[te]}),ve=(0,ot.createToken)({name:"sqrt",label:"sqrt(x)",pattern:/sqrt/,categories:[ee]}),ye=(0,ot.createToken)({name:"pow2",label:"x ^ 2",pattern:/pow2/,categories:[ee]}),Ee=(0,ot.createToken)({name:"abs",label:"abs(x)",pattern:/abs/,categories:[ee]}),be=(0,ot.createToken)({name:"invert",label:"1 / x",pattern:/invert/,categories:[ee]}),xe=(0,ot.createToken)({name:"log",label:"log(x)",pattern:/log/,categories:[ee]}),we=(0,ot.createToken)({name:"exp",label:"exp(x)",pattern:/exp/,categories:[ee]}),Ne=(0,ot.createToken)({name:"bin10",label:"Bucket x by 10",pattern:/bin10/,categories:[ee]}),Se=(0,ot.createToken)({name:"bin100",label:"Bucket x by 100",pattern:/bin100/,categories:[ee]}),Le=(0,ot.createToken)({name:"bin1000",label:"Bucket x by 1000",pattern:/bin1000/,categories:[ee]}),Qe=(0,ot.createToken)({name:"bin10th",label:"Bucket x by 1/10",pattern:/bin10th/,categories:[ee]}),Te=(0,ot.createToken)({name:"bin100th",label:"Bucket x by 1/100",pattern:/bin100th/,categories:[ee]}),Re=(0,ot.createToken)({name:"bin1000th",label:"Bucket x by 1/1000",pattern:/bin1000th/,categories:[ee]}),Ce=(0,ot.createToken)({name:"length",label:"length(x)",pattern:/length/,categories:[ee]}),Ae=(0,ot.createToken)({name:"lowercase",label:"lowercase(x)",pattern:/lowercase/,categories:[ee]}),Ue=(0,ot.createToken)({name:"uppercase",label:"uppercase(x)",pattern:/uppercase/,categories:[ee]}),ke=(0,ot.createToken)({name:"concat_comma",label:"Concat(x, y) with comma",pattern:/concat_comma/,categories:[ee]}),Oe=(0,ot.createToken)({name:"concat_space",label:"Concat(x, y) with space",pattern:/concat_space/,categories:[ee]}),Be=(0,ot.createToken)({name:"hour_of_day",label:"Hour of day",pattern:/hour_of_day/,categories:[ee]}),De=(0,ot.createToken)({name:"day_of_week",label:"Day of week",pattern:/day_of_week/,categories:[ee]}),Ie=(0,ot.createToken)({name:"month_of_year",label:"Month of year",pattern:/month_of_year/,categories:[ee]}),Fe=(0,ot.createToken)({name:"second_bucket",label:"Bucket(x) by seconds",pattern:/second_bucket/,categories:[ee]}),Pe=(0,ot.createToken)({name:"minute_bucket",label:"Bucket(x) by minutes",pattern:/minute_bucket/,categories:[ee]}),Me=(0,ot.createToken)({name:"hour_bucket",label:"Bucket(x) by hours",pattern:/hour_bucket/,categories:[ee]}),je=(0,ot.createToken)({name:"day_bucket",pattern:/day_bucket/,label:"Bucket(x) by day",categories:[ee]}),Ve=(0,ot.createToken)({name:"week_bucket",pattern:/week_bucket/,label:"Bucket(x) by week",categories:[ee]}),Ge=(0,ot.createToken)({name:"month_bucket",pattern:/month_bucket/,label:"Bucket(x) by month",categories:[ee]}),He=(0,ot.createToken)({name:"year_bucket",pattern:/year_bucket/,label:"Bucket(x) by year",categories:[ee]}),We=(0,ot.createToken)({name:"leftParen",label:"(",pattern:/\(/}),Je=(0,ot.createToken)({name:"rightParen",label:")",pattern:/\)/}),ze=(0,ot.createToken)({name:"comma",label:",",pattern:/,/}),Ze=(0,ot.createToken)({name:"whitespace",pattern:/\s+/}),Xe=[Ze,ze,se,oe,We,Je,ae,ce,le,ue,pe,he,de,fe,_e,me,ve,ye,Ee,be,xe,we,Re,Le,Te,Se,Qe,Ne,Ce,ge,ke,Oe,Ue,Ae,Be,De,Ie,Fe,Pe,Me,je,Ve,Ge,He,re];Xe.forEach((t=>{qt[t.name]=t;let e=t.PATTERN.source;e&&0==e.indexOf("\\")&&(e=e.substring(1)),(0,ot.tokenMatcher)(t,ee)||(0,ot.tokenMatcher)(t,te)})),new ot.Lexer(Xe,{errorMessageProvider:Kt});const $e=function(t){const e=[];for(const n of t)(0,ot.tokenMatcher)(n,Ze)||e.push(n);return e};class Ke extends ot.CstParser{constructor(t){super(t,{errorMessageProvider:Yt}),this.RULE("SuperExpression",(()=>{this.SUBRULE(this.Expression)})),this.RULE("Expression",(()=>{this.SUBRULE(this.OperatorComputedColumn)})),this.RULE("OperatorComputedColumn",(()=>{this.SUBRULE(this.AdditionOperatorComputedColumn,{LABEL:"left"}),this.MANY((()=>{this.SUBRULE(this.Operator),this.SUBRULE2(this.AdditionOperatorComputedColumn,{LABEL:"right"}),this.OPTION((()=>{this.SUBRULE(this.As,{LABEL:"as"})}))}))})),this.RULE("AdditionOperatorComputedColumn",(()=>{this.SUBRULE(this.MultiplicationOperatorComputedColumn,{LABEL:"left"}),this.MANY((()=>{this.SUBRULE(this.AdditionOperator),this.SUBRULE2(this.MultiplicationOperatorComputedColumn,{LABEL:"right"}),this.OPTION((()=>{this.SUBRULE(this.As,{LABEL:"as"})}))}))})),this.RULE("MultiplicationOperatorComputedColumn",(()=>{this.SUBRULE(this.ExponentOperatorComputedColumn,{LABEL:"left"}),this.MANY((()=>{this.SUBRULE(this.MultiplicationOperator),this.SUBRULE2(this.ExponentOperatorComputedColumn,{LABEL:"right"}),this.OPTION((()=>{this.SUBRULE(this.As,{LABEL:"as"})}))}))})),this.RULE("ExponentOperatorComputedColumn",(()=>{this.SUBRULE(this.ColumnName,{LABEL:"left"}),this.MANY((()=>{this.SUBRULE(this.ExponentOperator),this.SUBRULE2(this.ColumnName,{LABEL:"right"}),this.OPTION((()=>{this.SUBRULE(this.As,{LABEL:"as"})}))}))})),this.RULE("FunctionComputedColumn",(()=>{this.SUBRULE(this.Function),this.CONSUME(t.leftParen),this.AT_LEAST_ONE_SEP({SEP:t.comma,DEF:()=>{this.SUBRULE(this.Expression,{LABEL:"param"})}}),this.CONSUME(t.rightParen),this.OPTION((()=>{this.SUBRULE(this.As,{LABEL:"as"})}))})),this.RULE("Function",(()=>{this.OR([{ALT:()=>this.CONSUME(t.sqrt)},{ALT:()=>this.CONSUME(t.pow2)},{ALT:()=>this.CONSUME(t.abs)},{ALT:()=>this.CONSUME(t.invert)},{ALT:()=>this.CONSUME(t.log)},{ALT:()=>this.CONSUME(t.exp)},{ALT:()=>this.CONSUME(t.bin1000th)},{ALT:()=>this.CONSUME(t.bin1000)},{ALT:()=>this.CONSUME(t.bin100th)},{ALT:()=>this.CONSUME(t.bin100)},{ALT:()=>this.CONSUME(t.bin10th)},{ALT:()=>this.CONSUME(t.bin10)},{ALT:()=>this.CONSUME(t.length)},{ALT:()=>this.CONSUME(t.uppercase)},{ALT:()=>this.CONSUME(t.lowercase)},{ALT:()=>this.CONSUME(t.concat_comma)},{ALT:()=>this.CONSUME(t.concat_space)},{ALT:()=>this.CONSUME(t.hour_of_day)},{ALT:()=>this.CONSUME(t.day_of_week)},{ALT:()=>this.CONSUME(t.month_of_year)},{ALT:()=>this.CONSUME(t.second_bucket)},{ALT:()=>this.CONSUME(t.minute_bucket)},{ALT:()=>this.CONSUME(t.hour_bucket)},{ALT:()=>this.CONSUME(t.day_bucket)},{ALT:()=>this.CONSUME(t.week_bucket)},{ALT:()=>this.CONSUME(t.month_bucket)},{ALT:()=>this.CONSUME(t.year_bucket)}])})),this.RULE("AdditionOperator",(()=>{this.OR([{ALT:()=>this.CONSUME(t.add)},{ALT:()=>this.CONSUME(t.subtract)}])})),this.RULE("MultiplicationOperator",(()=>{this.OR([{ALT:()=>this.CONSUME(t.multiply)},{ALT:()=>this.CONSUME(t.divide)}])})),this.RULE("ExponentOperator",(()=>{this.CONSUME(t.pow)})),this.RULE("Operator",(()=>{this.OR([{ALT:()=>this.CONSUME(t.percent_of)},{ALT:()=>this.CONSUME(t.equals)},{ALT:()=>this.CONSUME(t.not_equals)},{ALT:()=>this.CONSUME(t.greater_than)},{ALT:()=>this.CONSUME(t.less_than)},{ALT:()=>this.CONSUME(t.is)}])})),this.RULE("TerminalColumnName",(()=>{this.CONSUME(t.columnName)})),this.RULE("As",(()=>{this.CONSUME(t.as),this.SUBRULE(this.TerminalColumnName)})),this.RULE("ColumnName",(()=>{this.OR([{ALT:()=>this.SUBRULE(this.ParentheticalExpression)},{ALT:()=>this.SUBRULE(this.FunctionComputedColumn)},{ALT:()=>this.CONSUME(t.columnName)}],{ERR_MSG:"Expected a column name (wrapped in double quotes) or a parenthesis-wrapped expression."})})),this.RULE("ParentheticalExpression",(()=>{this.CONSUME(t.leftParen),this.SUBRULE(this.Expression),this.CONSUME(t.rightParen)})),this.performSelfAnalysis()}}const Ye={"+":(t,e)=>`(${t} + ${e})`,"-":(t,e)=>`(${t} - ${e})`,"*":(t,e)=>`(${t} * ${e})`,"/":(t,e)=>`(${t} / ${e})`,"%":(t,e)=>`(${t} %% ${e})`,"==":(t,e)=>`(${t} == ${e})`,"!=":(t,e)=>`(${t} != ${e})`,">":(t,e)=>`(${t} > ${e})`,"<":(t,e)=>`(${t} < ${e})`,"^":(t,e)=>`(${t} ^ ${e})`,invert:t=>`(1 / ${t})`,log:t=>`log(${t})`,exp:t=>`exp(${t})`,pow2:t=>`(${t} ^ 2)`,sqrt:t=>`sqrt(${t})`,abs:t=>`abs(${t})`,bin10:t=>`bin10(${t})`,bin100:t=>`bin100(${t})`,bin1000:t=>`bin1000(${t})`,bin10th:t=>`bin10th(${t})`,bin100th:t=>`bin100th(${t})`,bin1000th:t=>`bin1000th(${t})`,uppercase:t=>`uppercase(${t})`,lowercase:t=>`lowercase(${t})`,length:t=>`length(${t})`,is:(t,e)=>`(${t} is ${e})`,concat_space:(t,e)=>`concat_space(${t}, ${e})`,concat_comma:(t,e)=>`concat_comma(${t}, ${e})`,hour_of_day:t=>`hour_of_day(${t})`,day_of_week:t=>`day_of_week(${t})`,month_of_year:t=>`month_of_year(${t})`,second_bucket:t=>`second_bucket(${t})`,minute_bucket:t=>`minute_bucket(${t})`,hour_bucket:t=>`hour_bucket(${t})`,day_bucket:t=>`day_bucket(${t})`,week_bucket:t=>`week_bucket(${t})`,month_bucket:t=>`month_bucket(${t})`,year_bucket:t=>`year_bucket(${t})`},qe={FunctionTokenType:ee,OperatorTokenType:te};class tn{constructor({label:t,value:e,pattern:n,signature:r,help:i,input_types:o,return_type:s,num_params:a,is_column_name:c}={}){this.label=t,this.value=e,this.pattern=n,this.input_types=o,this.return_type=s,this.num_params=a,this.signature=r,this.help=i,this.is_column_name=c||!1}}const en=new class{constructor(){this.is_initialized=!1,this._vocabulary={},this._tokens=[Ze,ze,se,oe,We,Je],this._metadata,this._lexer,this._parser,this._visitor}init(t){if(!this.is_initialized){for(const t of this._tokens)this._vocabulary[t.name]=t;this._metadata=t,this._lexer=this._construct_lexer(),this._parser=this._construct_parser(),this._visitor=this._construct_visitor(),this.is_initialized=!0}}lex(t){this._check_initialized();const e=this._lexer.tokenize(t);return e.tokens=$e(e.tokens),e}parse(t){this._check_initialized();const e=this.lex(t);if(e.errors.length>0){let t=e.errors[0].message;throw new Error(t)}this._parser.input=e.tokens;const n=this._parser.SuperExpression();if(this._parser.errors.length>0){let t=this._parser.errors[0].message;throw new Error(t)}return this._visitor.visit(n)}get_autocomplete_suggestions(t,e,n,r){this._check_initialized();let i=this._parser.computeContentAssist("SuperExpression",[]);if(!e)return this._apply_suggestion_metadata(i);if(e.errors.length>0){const r=this.extract_partial_function(t),o=this.get_last_token(e),s=o&&(0,ot.tokenMatcher)(o,oe);if(r&&-1===r.search(/["']$/)&&!s){const t=this._apply_suggestion_metadata(i.slice(1),n),e=[],o=[];for(const n of t){const t=n.value.toLowerCase().trim(),i=r.toLowerCase().trim();t.startsWith(i)?e.push(n):t.includes(i)&&o.push(n)}return e.concat(o)}return[]}e.tokens=$e(e.tokens);const o=this._parser.computeContentAssist("SuperExpression",e.tokens);return this._apply_suggestion_metadata(o,n,r)}extract_partial_function(t){this._check_initialized();const e=t.match(/([^(,\s]+$)/);if(e&&e.length>0){const t=e[0];if(!/['"]/.test(t))return e[0]}}get_last_token(t){const e=t.tokens,n=e.length-1;if(n>=0)return e[n]}get_last_token_with_types(t,e,n){const r=e.tokens;(!n||n<=0||n>=r.length)&&(n=r.length);for(let e=r.length-1;e>=r.length-n;e--)for(const n of t)if((0,ot.tokenMatcher)(r[e],n))return r[e]}_construct_lexer(){const t=["bin1000th","bin1000","bin100th","bin100","bin10th","bin10"];for(const e in this._metadata){const n=this._metadata[e];if(t.includes(n.name))continue;const r=this._make_token(n);this._tokens.push(r),this._vocabulary[r.name]=r}for(const e of t){const t=this._metadata[e],n=this._make_token(t);this._tokens.push(n),this._vocabulary[n.name]=n}return this._tokens.push(re),this._vocabulary[re.name]=re,new ot.Lexer(this._tokens,{errorMessageProvider:Kt})}_make_token(t){const e=new RegExp(t.pattern),n=(0,ot.createToken)({name:t.name,label:t.label,pattern:e,categories:[qe[t.category]]});return"float"===t.input_type?n.input_types=["float","integer"]:"datetime"===t.input_type?n.input_types=["datetime","date"]:n.input_types=[t.input_type],n.return_type=t.return_type,n.num_params=t.num_params,n.signature=t.signature,n.help=t.help,n}_construct_parser(){return new Ke(this._vocabulary)}_construct_visitor(){const t=this._parser.getBaseCstVisitorConstructor();return new class extends t{constructor(){super(),this.validateVisitor()}SuperExpression(t){let e=[];if(this.visit(t.Expression,e),0===e.length)throw new Error("Expression did not generate any computed columns");return e}Expression(t,e){return this.visit(t.OperatorComputedColumn,e)}_VisitOperatorComputedColumn(t,e,n){let r,i=this.visit(t.left,e);if(t.right){let o;t.right.forEach(((r,s)=>{let a=n(t,s);if(!a)return;let c=this.visit(r,e);const l=o||i;let u;t.as&&s<t.as.length&&(u=this.visit(t.as[s]));const p=u||Ye[a](l,c);e.push({column:p,computed_function_name:a,inputs:[l,c]}),o=p})),r=o}else r=i;return r}OperatorComputedColumn(t,e){return this._VisitOperatorComputedColumn(t,e,((t,e)=>this.visit(t.Operator[e])))}AdditionOperatorComputedColumn(t,e){return this._VisitOperatorComputedColumn(t,e,((t,e)=>this.visit(t.AdditionOperator[e])))}MultiplicationOperatorComputedColumn(t,e){return this._VisitOperatorComputedColumn(t,e,((t,e)=>this.visit(t.MultiplicationOperator[e])))}ExponentOperatorComputedColumn(t,e){return this._VisitOperatorComputedColumn(t,e,((t,e)=>this.visit(t.ExponentOperator[e])))}FunctionComputedColumn(t,e){const n=this.visit(t.Function);let r=[];for(const n of t.param)r.push(this.visit(n,e));const i=this.visit(t.as)||Ye[n](...r),o={column:i,computed_function_name:n,inputs:r};return e.push(o),i}ColumnName(t,e){return t.ParentheticalExpression?this.visit(t.ParentheticalExpression,e):t.FunctionComputedColumn?this.visit(t.FunctionComputedColumn,e):t.columnName[0].payload}TerminalColumnName(t){return t.columnName[0].payload}AdditionOperator(t){return t.add?t.add[0].image:t.subtract?t.subtract[0].image:void 0}MultiplicationOperator(t){return t.multiply?t.multiply[0].image:t.divide?t.divide[0].image:void 0}ExponentOperator(t){if(t.pow)return t.pow[0].image}Operator(t){return t.percent_of?t.percent_of[0].image:t.equals?t.equals[0].image:t.not_equals?t.not_equals[0].image:t.greater_than?t.greater_than[0].image:t.less_than?t.less_than[0].image:t.is?t.is[0].image:void 0}Function(t){return t.sqrt?t.sqrt[0].image:t.pow2?t.pow2[0].image:t.abs?t.abs[0].image:t.invert?t.invert[0].image:t.log?t.log[0].image:t.exp?t.exp[0].image:t.length?t.length[0].image:t.uppercase?t.uppercase[0].image:t.lowercase?t.lowercase[0].image:t.concat_comma?t.concat_comma[0].image:t.concat_space?t.concat_space[0].image:t.bin10?t.bin10[0].image:t.bin100?t.bin100[0].image:t.bin1000?t.bin1000[0].image:t.bin10th?t.bin10th[0].image:t.bin100th?t.bin100th[0].image:t.bin1000th?t.bin1000th[0].image:t.hour_of_day?t.hour_of_day[0].image:t.day_of_week?t.day_of_week[0].image:t.month_of_year?t.month_of_year[0].image:t.second_bucket?t.second_bucket[0].image:t.minute_bucket?t.minute_bucket[0].image:t.hour_bucket?t.hour_bucket[0].image:t.day_bucket?t.day_bucket[0].image:t.week_bucket?t.week_bucket[0].image:t.month_bucket?t.month_bucket[0].image:t.year_bucket?t.year_bucket[0].image:void 0}As(t){return t.TerminalColumnName[0].children.columnName[0].payload}ParentheticalExpression(t,e){return this.visit(t.Expression,e)}}}_apply_suggestion_metadata(t,e,n){this._check_initialized(),n=n||!1;const r=[];for(const i of t){const t=i.nextTokenType;if(!t||!t.PATTERN.source)continue;let o=t.LABEL,s=t.PATTERN.source.replace(/\\/g,""),a=s;(0,ot.tokenMatcher)(t,ee)?a=`${a}(`:(0,ot.tokenMatcher)(t,te)?a=`${a} `:(0,ot.tokenMatcher)(t,se)&&(a="AS ",o="AS",t.signature="x + y AS new column",t.help="Creates a custom name for the computed column.");const c=new tn({label:o,value:a,pattern:s,signature:t.signature,help:t.help,input_types:t.input_types,return_type:t.return_type,num_params:t.num_params});if(e&&c.input_types){for(const t of e)if(c.input_types.includes(t)&&(!n||c.input_types.includes(c.return_type))){r.push(c);break}}else r.push(c)}return r}_check_initialized(){if(!1===this.is_initialized)throw new Error("PerspectiveComputedExpressionParser is not initialized!")}};var nn;function rn(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}function on(t){if(0==this._active_columns.children.length)return 0;{let n=!1;for(let r in this._active_columns.children){var e;let i=this._active_columns.children[r];if(n=n||(null==i||null===(e=i.classList)||void 0===e?void 0:e.contains("null-column")),i.offsetTop+i.offsetHeight>t.offsetY+this._active_columns.scrollTop)return parseInt(r)}let r=this._active_columns.children.length;return n&&r--,r}}function sn(t){let e=t.target.getRootNode().host,n=e;n="PERSPECTIVE-VIEWER"===n.tagName?t.target.parentElement:e.parentElement;let r=Array.prototype.slice.call(n.children).indexOf("PERSPECTIVE-ROW"===e.tagName?e:t.target),i=n.getAttribute("for");if(this.hasAttribute(i)){let t=JSON.parse(this.getAttribute(i));t.splice(r,1),0===t.length?this.removeAttribute(i):this.setAttribute(i,JSON.stringify(t))}}function an(t){t.preventDefault(),t.currentTarget.classList.remove("dropping"),mn=new WeakMap,this._drop_target_hover&&this._drop_target_hover.removeAttribute("drop-target");let e=t.dataTransfer.getData("text");if(!e)return;e=JSON.parse(e);let n=t.currentTarget.querySelector("ul").getAttribute("for")||t.currentTarget.getAttribute("id").replace("_","-"),r=JSON.parse(this.getAttribute(n)||"[]"),i=r.indexOf(e[0]);-1!==i&&r.splice(i,1);const o=n.indexOf("filter")>-1;if(o?this.setAttribute(n,JSON.stringify(r.concat([e]))):n.indexOf("sort")>-1?this.setAttribute(n,JSON.stringify(r.concat([[e[0]]]))):this.setAttribute(n,JSON.stringify(r.concat([e[0]]))),"pivots"===this._plugin.deselectMode&&this._get_visible_column_count()>1&&"sort"!==n&&!o){for(let t of this.shadowRoot.querySelectorAll("#active_columns perspective-row"))if(t.getAttribute("name")===e[0]){this._active_columns.removeChild(t);break}this._update_column_view()}this._debounce_update()}function cn(t){let e=t.target.parentElement.parentElement;Array.prototype.slice(this._active_columns.children).indexOf(e)>-1&&this._get_visible_column_count()>1&&"move"!==t.dataTransfer.dropEffect&&(this._active_columns.removeChild(e),this._update_column_view()),this._active_columns.classList.remove("dropping")}function ln(t){let e=t.relatedTarget;for(;e&&e!==this._active_columns;)e=e.parentElement;null===e&&(this._active_columns.classList.remove("dropping"),this._drop_target_null&&(this._active_columns.replaceChild(this._drop_target_null,this._drop_target_hover),delete this._drop_target_null),this._drop_target_hover.parentElement===this._active_columns&&this._active_columns.removeChild(this._drop_target_hover),-1!==this._original_index&&this._active_columns.insertBefore(this._drop_target_hover,this._active_columns.children[this._original_index]),this._drop_target_hover.removeAttribute("drop-target"))}function un(){this._drop_target_null&&(this._drop_target_null.parentElement===this._active_columns?It(this._active_columns,this._drop_target_hover,this._drop_target_null):this._active_columns.replaceChild(this._drop_target_null,this._drop_target_hover),delete this._drop_target_null)}function pn(t){un.call(this),this._active_columns.children[t]&&this._drop_target_hover!==this._active_columns.children[t]&&(this._drop_target_null=this._active_columns.children[t],It(this._active_columns,this._active_columns.children[t],this._drop_target_hover))}function hn(t){un.call(this),this._active_columns.children[t]&&(this._drop_target_null=this._active_columns.children[t],this._active_columns.replaceChild(this._drop_target_hover,this._active_columns.children[t]))}function dn(t){var e,n,r,i,o,s,a,c;t.preventDefault(),t.dataTransfer.dropEffect="move",this._drop_target_hover.hasAttribute("drop-target")||this._drop_target_hover.toggleAttribute("drop-target",!0);let l=on.call(this,t);const u=Array.prototype.slice.call(this._active_columns.children).indexOf(this._drop_target_hover),p=this._active_columns.children[l],h=l<(null===(e=this._plugin.initial)||void 0===e||null===(n=e.names)||void 0===n?void 0:n.length)-1,d=this._drop_target_hover!==this._active_columns.children[l],f=-1!==this._original_index,_=f&&this._original_index<(null===(r=this._plugin.initial)||void 0===r||null===(i=r.names)||void 0===i?void 0:i.length)-1,m=f&&this._original_index>=(null===(o=this._plugin.initial)||void 0===o||null===(s=o.names)||void 0===s?void 0:s.length)-1,g=f&&this._original_index<(null===(a=this._plugin.initial)||void 0===a?void 0:a.count),v=!(l<(null===(c=this._plugin.initial)||void 0===c?void 0:c.count))&&(null==p?void 0:p.classList.contains("null-column"));if(g&&v)un.call(this);else if(h&&m&&d){var y,E,b,x,w;un.call(this),this._original_index===(null===(y=this._plugin.initial)||void 0===y||null===(E=y.names)||void 0===E?void 0:E.length)-1&&this._drop_target_hover===this._active_columns.children[this._original_index]&&this._active_columns.children.length===(null===(b=this._plugin.initial)||void 0===b||null===(x=b.names)||void 0===x?void 0:x.length)?(this._drop_target_null=this._active_columns.children[l],It(this._active_columns,this._active_columns.children[l],this._drop_target_hover)):null!==(w=this._active_columns.children[l])&&void 0!==w&&w.classList.contains("null-column")?this._drop_target_hover!==this._active_columns.children[l]&&(this._drop_target_null=this._active_columns.children[l],this._active_columns.replaceChild(this._drop_target_hover,this._active_columns.children[l])):(this._drop_target_null=this._active_columns.children[l],this._active_columns.replaceChild(this._drop_target_hover,this._active_columns.children[l]),this._active_columns.insertBefore(this._drop_target_null,this._active_columns.children[this._original_index]))}else h&&f&&d?pn.call(this,l):h&&!f&&d?hn.call(this,l):!h&&_&&d||v&&f?pn.call(this,l):v&&!f?hn.call(this,l):u<l?l+1<this._active_columns.children.length?this._active_columns.children[l+1].hasAttribute("drop-target")||(un.call(this),this._active_columns.insertBefore(this._drop_target_hover,this._active_columns.children[l+1])):this._active_columns.children[this._active_columns.children.length-1].hasAttribute("drop-target")||(un.call(this),this._active_columns.appendChild(this._drop_target_hover)):l<this._active_columns.children.length?this._active_columns.children[l].hasAttribute("drop-target")||(un.call(this),this._active_columns.insertBefore(this._drop_target_hover,this._active_columns.children[l])):this._active_columns.children[this._active_columns.children.length-1].hasAttribute("drop-target")||(un.call(this),this._active_columns.appendChild(this._drop_target_hover))}function fn(t){t.preventDefault(),delete this._drop_target_null,t.currentTarget.classList.remove("dropping"),mn=new WeakMap,this._drop_target_hover.parentElement===this._active_columns&&this._drop_target_hover.removeAttribute("drop-target"),t.dataTransfer.getData("text")&&this._update_column_view()}function _n(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="move"}Object.setPrototypeOf(rn.prototype,HTMLElement.prototype),Object.setPrototypeOf(rn,HTMLElement),kt('\x3c!--\n\nCopyright (c) 2017, the Perspective Authors.\n\nThis file is part of the Perspective library, distributed under the terms of\nthe Apache License 2.0. The full license can be found in the LICENSE file.\n\n--\x3e\n\n<template id="perspective-computed-expression-widget">\n <div class="psp-computed-expression-widget__body psp-computed-expression-widget__container">\n <div class="psp-computed-expression-widget__container">\n <div class="psp-computed-expression-widget__action">\n <span class="psp-icon psp-icon__close" id="psp-computed-expression-widget-close" aria-label="Close Computed Expression Widget"></span>\n <span id="psp-computed-expression-widget-title">New Column</span>\n </div>\n <div class="psp-computed-expression-widget__content psp-computed-expression-widget__content--nomargin">\n <perspective-expression-editor aria-autocomplete="list" aria-label="Type a computed expression here" aria-placeholder="Type a computed expression" aria-haspopup="true"></perspective-expression-editor>\n <perspective-autocomplete-widget id="psp-computed-expression-widget-autocomplete"></perspective-autocomplete-widget>\n <div class="psp-computed-expression-widget__label psp-computed-expression-widget__error" id="psp-computed-expression-widget-error"></div>\n </div>\n </div>\n <div id="psp-computed-expression-widget-actions">\n <button id="psp-computed-expression-widget-button-save" class="psp-computed-expression-widget__button" disabled>Save</button>\n </div>\n </div>\n</template>',':host{display:none;flex-direction:column;margin-top:12px;width:100%;flex:0 0 auto!important}:host *{box-sizing:border-box}:host .psp-computed-expression-widget__body{margin-bottom:0}:host .psp-computed-expression-widget__container{display:flex;flex-direction:column}:host .psp-computed-expression-widget__container.row{align-items:center;flex-direction:row}:host .psp-computed-expression-widget__container:first-of-type{margin-bottom:0}:host .psp-computed-expression-widget__action{margin-bottom:10px}:host .psp-computed-expression-widget__action span#psp-computed-expression-widget-close{color:#999;display:flex;font-family:var(--column-close--font-family,inherit);font-size:16px;width:20px;min-width:20px;margin-top:-2px;height:0}:host .psp-computed-expression-widget__action span#psp-computed-expression-widget-close:before{font-feature-settings:"liga";content:var(--column-close--before,"x")}:host .psp-computed-expression-widget__action span#psp-computed-expression-widget-close:hover{cursor:pointer}:host .psp-computed-expression-widget__action span#psp-computed-expression-widget-title{display:flex;margin-left:24px;margin-top:3px;font-size:12px;color:var(--color,#666)}:host .psp-computed-expression-widget__content{align-items:center;display:flex;flex-direction:column;margin-top:5px}:host .psp-computed-expression-widget__content.psp-computed-expression-widget__content--absolute{position:absolute}:host .psp-computed-expression-widget__content.psp-computed-expression-widget__content--nomargin{margin-top:0;position:relative}:host #psp-computed-expression-widget-actions{display:flex;justify-content:flex-end;margin-left:20px;margin-top:12px}:host .psp-computed-expression-widget__label{color:var(--color,darkgray);font-size:10px;margin-top:5px;max-width:100%}:host .psp-computed-expression-widget__label.psp-computed-expression-widget__error{background-color:#cb4549;box-sizing:border-box;color:#fff!important;display:none;position:absolute;z-index:10000;max-height:75px;padding:10px;overflow-x:hidden;overflow-y:scroll;top:100%;width:100%;word-break:break-word}:host .psp-computed-expression-widget__button{border-radius:0;border-bottom:1px solid #ccc;border-left:0;border-right:0;border-top:0;font-size:12px;margin-left:6px;padding:2px 5px}:host .psp-computed-expression-widget__button:hover{cursor:pointer}:host .psp-computed-expression-widget__button[disabled]{background:#666!important;color:#a0a0a0!important;cursor:not-allowed;border-bottom-color:#000!important;opacity:0.5}:host .psp-computed-expression-widget__button#psp-computed-expression-widget-button-remove{background:#e76056;border-bottom-color:#bf4d45;color:#fff;display:none}:host .psp-computed-expression-widget__button#psp-computed-expression-widget-button-remove:active{background:#bf4d45;border-bottom-color:#9d3f39}:host .psp-computed-expression-widget__button#psp-computed-expression-widget-button-save{background:#0171d2;border-bottom-color:#0160b1;color:#fff;height:22px}:host .psp-computed-expression-widget__button#psp-computed-expression-widget-button-save:active{background:#0160b1;border-bottom-color:#014986}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9sZXNzL2NvbXB1dGVkX2V4cHJlc3Npb25fd2lkZ2V0Lmxlc3MiLCJjb21wdXRlZF9leHByZXNzaW9uX3dpZGdldC5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVdBLE1BQ0ksWUFBQSxDQUNBLHFCQUFBLENBQ0EsZUFBQSxDQUNBLFVBQUEsQ0FFQSx1QkNLSixDRFhBLFFBU1EscUJDS1IsQ0RkQSw0Q0FhUSxlQ0lSLENEakJBLGlEQWlCUSxZQUFBLENBQ0EscUJDR1IsQ0REUSxxREFDSSxrQkFBQSxDQUNBLGtCQ0daLENEQVEsK0RBQ0ksZUNFWixDRDVCQSw4Q0ErQlEsa0JDQVIsQ0QvQkEsd0ZBa0NZLFVBQUEsQ0FDQSxZQUFBLENBQ0Esb0RBQUEsQ0FDQSxjQUFBLENBQ0EsVUFBQSxDQUNBLGNBQUEsQ0FDQSxlQUFBLENBQ0EsUUNBWixDREVZLCtGQUNJLDRCQUFBLENBQ0EsdUNDQWhCLENER1ksOEZBQ0ksY0NEaEIsQ0RoREEsd0ZBd0RZLFlBQUEsQ0FDQSxnQkFBQSxDQUNBLGNBQUEsQ0FDQSxjQUFBLENBQ0EsdUJDTFosQ0R2REEsK0NBaUVRLGtCQUFBLENBQ0EsWUFBQSxDQUNBLHFCQUFBLENBQ0EsY0NQUixDRFNRLGlHQUNJLGlCQ1BaLENEVVEsaUdBQ0ksWUFBQSxDQUNBLGlCQ1JaLENEcEVBLDhDQWlGUSxZQUFBLENBQ0Esd0JBQUEsQ0FDQSxnQkFBQSxDQUNBLGVDVlIsQ0QxRUEsNkNBd0ZRLDJCQUFBLENBQ0EsY0FBQSxDQUNBLGNBQUEsQ0FDQSxjQ1hSLENEYVEsbUZBQ0ksd0JBQUEsQ0FDQSxxQkFBQSxDQUNBLG9CQUFBLENBQ0EsWUFBQSxDQUNBLGlCQUFBLENBQ0EsYUFBQSxDQUNBLGVBQUEsQ0FDQSxZQUFBLENBQ0EsaUJBQUEsQ0FDQSxpQkFBQSxDQUNBLFFBQUEsQ0FDQSxVQUFBLENBQ0EscUJDWFosQ0QvRkEsOENBK0dRLGVBQUEsQ0FDQSw0QkFBQSxDQUNBLGFBQUEsQ0FDQSxjQUFBLENBQ0EsWUFBQSxDQUNBLGNBQUEsQ0FDQSxlQUFBLENBQ0EsZUNiUixDRGVRLG9EQUNJLGNDYlosQ0RnQlEsd0RBQ0kseUJBQUEsQ0FDQSx1QkFBQSxDQUNBLGtCQUFBLENBQ0Esa0NBQUEsQ0FDQSxXQ2RaLENEaUJRLDJGQUNJLGtCQUFBLENBQ0EsMkJBQUEsQ0FDQSxVQUFBLENBQ0EsWUNmWixDRGlCWSxrR0FDSSxrQkFBQSxDQUNBLDJCQ2ZoQixDRG1CUSx5RkFDSSxrQkFBQSxDQUNBLDJCQUFBLENBQ0EsVUFBQSxDQUNBLFdDakJaLENEbUJZLGdHQUNJLGtCQUFBLENBQ0EsMkJDakJoQiIsImZpbGUiOiJjb21wdXRlZF9leHByZXNzaW9uX3dpZGdldC5sZXNzIn0= */')((ct((nn=class extends rn{constructor(){super(),this._parsed_expression=void 0,this.expressions=[],this._valid=!1}connectedCallback(){this._register_ids(),this._register_callbacks(),this._expression_editor.set_renderer(this.render_expression.bind(this)),this._editor_observer=new MutationObserver(this._resize_editor.bind(this)),this._autocomplete.reposition=this._position_autocomplete.bind(this)}_observe_editor(){this._editor_observer.observe(this._expression_editor,{attributes:!0,attributeFilter:["style"]}),this._expression_editor.focus()}_resize_editor(){const t=new CustomEvent("perspective-computed-expression-resize");this.dispatchEvent(t),this._editor_observer.disconnect()}_get_type(t){throw new Error(`Cannot get column type for "${t}".`)}_make_column_name_suggestions(t){return t.map((t=>new tn({label:t,value:`"${t}"`,is_column_name:!0})))}render_expression(t){const e=this._computed_expression_parser._lexer.tokenize(t);let n=[],r={};for(const t of e.tokens)r[t.startOffset]=t,n.push(t.startOffset);for(const t of e.errors)r[t.offset]=t,n.push(t.offset);n=n.sort(((t,e)=>t-e));const i=[],o=this._get_view_all_column_names();let s;for(const e of n){const n=r[e];let a="",c="fragment";if(n.message)a=t.slice(n.offset,n.offset+n.length),c="errored";else{if(a=n.image,(0,ot.tokenMatcher)(n,ee))c="function";else if((0,ot.tokenMatcher)(n,te))c="operator";else if((0,ot.tokenMatcher)(n,oe)){const t=n.payload,e=o.includes(t);c=`column_name ${e?this._get_type(t):""}`,(!e&&!s||!e&&s&&!(0,ot.tokenMatcher)(s,se))&&(c="errored")}(0,ot.tokenMatcher)(n,Ze)||(s=n)}i.push(`<span class="psp-expression__${c}">${a}</span>`)}return i.join("")}make_autocomplete_markup(t){return t.map((t=>t.label?P`
15 <div
16 role="listitem"
17 title=${t.help?t.help:""}
18 class="psp-autocomplete__item"
19 data-label=${t.label}
20 data-value=${t.value}
21 data-signature=${t.signature?t.signature:""}
22 data-help=${t.help?t.help:""}
23 aria-selected="false"
24 >
25 <span
26 class="psp-autocomplete-item__label ${t.is_column_name?`psp-autocomplete-item__label--column-name ${this._get_type(t.label)}`:""}"
27 data-value=${t.value}
28 >
29 ${t.pattern?t.pattern:t.label}
30 </span>
31 </div>
32 `:""))}async _validate_expression(t){this._autocomplete.clear();const e=t.detail.text;if(0===e.length)return void this._clear_error();try{this._parsed_expression=this._computed_expression_parser.parse(e)}catch(t){this._clear_error(),this._disable_save_button();const n=this._computed_expression_parser.lex(e),r=e.match(/(["'])[\s\w()]*?$/),i=r&&r.length>0&&!/['"]\s/.test(r[0]),o=this._computed_expression_parser.get_last_token(n);let s=i;if(o){const t=(0,ot.tokenMatcher)(o,oe),e=(0,ot.tokenMatcher)(o,Je),n=(0,ot.tokenMatcher)(o,se);s=(0,ot.tokenMatcher)(o,te)||s&&!t&&!e&&!n}let a,c,l=[];const u=this._computed_expression_parser.get_last_token_with_types([ee,te],n);if(u?(a=u.tokenType.input_types,c=!0):o&&(0,ot.tokenMatcher)(o,oe)&&(a=[this._get_type(o.payload)],c=!1),l=this._computed_expression_parser.get_autocomplete_suggestions(e,n,a,c),s){let t;t=u?this._get_view_column_names_by_types(a):this._get_view_all_column_names();let e=this._make_column_name_suggestions(t);if(i){const t=r[0].substring(1),n=[],i=[];for(const r of e){const e=r.label.toLowerCase(),o=t.toLowerCase();e.startsWith(o)?n.push(r):e.includes(o)&&i.push(r)}e=n.concat(i)}l=u?l.concat(e):e;const n=this.make_autocomplete_markup(l);return void this._autocomplete.render(n)}if(l.length>0){const t=this.make_autocomplete_markup(l);return void this._autocomplete.render(t)}if(o&&(0,ot.tokenMatcher)(o,se))return;{const e=t.message?t.message:JSON.stringify(t);return void this._set_error(e,this._error)}}const n=new CustomEvent("perspective-computed-expression-type-check",{detail:{parsed_expression:this._parsed_expression}});this.dispatchEvent(n)}async _type_check_expression(t,e){const n=this._parsed_expression||[],r=[];for(const e of n)t[e.column]||r.push(e.column);if(r.length>0){let t="TypeError:\n";for(const n of r)t+=`- \`${n}\` expected input column types ${e[n].join("/")}\n`;this._set_error(t,this._error)}else this._clear_error(),this._enable_save_button()}_save_expression(){if(!this._valid||this._save_button.getAttribute("disabled"))return;const t=this._expression_editor.get_text(),e=this._parsed_expression||[],n=new CustomEvent("perspective-computed-expression-save",{detail:{expression:t,parsed_expression:e}});this.dispatchEvent(n),this.expressions.push(t)}_position_autocomplete(){const t=this._expression_editor,e=this._expression_editor._edit_area.lastChild;if(250===t.offsetWidth)return this._autocomplete._container.removeAttribute("style"),this._autocomplete._container.classList.remove("undocked"),void this._autocomplete._container.classList.add("docked");this._autocomplete._container.classList.remove("docked"),this._autocomplete._container.classList.add("undocked");const n=e.offsetLeft,r=e.offsetWidth,i=e.offsetTop,o=n+r>0?n+r:0,s=i+20>20?i+20:20;this._autocomplete._container.style.left=`${o}px`,this._autocomplete._container.style.top=`${s}px`}_autocomplete_replace(t){const e=this._expression_editor.get_text(),n=this._computed_expression_parser.extract_partial_function(e);if("("===t)this._expression_editor._edit_area.innerText+=t;else if(n&&'"'!==n){const r=e.substring(0,e.length-n.length)+t;this._expression_editor._edit_area.innerText=r}else{const n=e.substring(e.lastIndexOf(" ")).trim(),r=/["'].*[^'"]/.test(n)||'"'===n||"'"===n,i=ie.test(t);if(r&&i){let r=e.lastIndexOf(n),i=e.substring(0,r);const o=/\(['"]\w+$/.exec(n);o&&o[0]&&(0===r||"("===n[0])&&(i+=n.substring(0,o.index+1)),i+=t,this._expression_editor._edit_area.innerText=i}else{if(!r&&('"'===n[n.length-1]||"'"===n[n.length-1])){const t=this._expression_editor._edit_area.innerText.substring(0,this._expression_editor._edit_area.innerText.length-1);this._expression_editor._edit_area.innerText=t}this._expression_editor._edit_area.innerText+=t}}this._expression_editor._reset_selection(),this._expression_editor.update_content(),this._autocomplete.clear()}_autocomplete_item_clicked(t){this._autocomplete_replace(t.detail.target.getAttribute("data-value"))}_clear_expression_editor(){this._expression_editor.clear_content()}_close_expression_widget(){this.style.display="none",this._side_panel_actions.style.display="flex",this._clear_error(),this._disable_save_button(),this._clear_expression_editor(),this._autocomplete.clear(),this._editor_observer.disconnect()}_set_error(t,e){e&&(e.innerText=t,e.style.display="block",this._disable_save_button())}_clear_error(){this._error.innerText="",this._error.style.display="none"}_disable_save_button(){this._save_button.setAttribute("disabled",!0),this._valid=!1}_enable_save_button(){this._save_button.removeAttribute("disabled"),this._valid=!0}_editor_keydown(t){switch(t.detail.key){case"Enter":if(t.detail.preventDefault(),t.detail.stopPropagation(),!0===this._autocomplete.displayed){const t=this._autocomplete.get_selected_value();t&&this._autocomplete_replace(t)}else this._save_expression();break;case"Tab":case"ArrowDown":t.detail.preventDefault(),t.detail.stopPropagation(),!0===this._autocomplete.displayed&&this._autocomplete._next();break;case"ArrowUp":t.detail.preventDefault(),t.detail.stopPropagation(),!0===this._autocomplete.displayed&&this._autocomplete._prev();break;case"z":!0!==t.detail.metaKey&&!0!==t.detail.ctrlKey||(t.detail.preventDefault(),t.detail.stopPropagation())}}_register_ids(){this._side_panel_actions=this.parentElement.querySelector("#side_panel__actions"),this._close_button=this.shadowRoot.querySelector("#psp-computed-expression-widget-close"),this._expression_editor=this.shadowRoot.querySelector("perspective-expression-editor"),this._error=this.shadowRoot.querySelector("#psp-computed-expression-widget-error"),this._save_button=this.shadowRoot.querySelector("#psp-computed-expression-widget-button-save"),this._autocomplete=this.shadowRoot.querySelector("#psp-computed-expression-widget-autocomplete")}_register_callbacks(){this._close_button.addEventListener("click",this._close_expression_widget.bind(this)),this._expression_editor.addEventListener("perspective-expression-editor-rendered",this._validate_expression.bind(this)),this._expression_editor.addEventListener("perspective-expression-editor-keydown",this._editor_keydown.bind(this)),this._save_button.addEventListener("click",this._save_expression.bind(this)),this._autocomplete.addEventListener("perspective-autocomplete-item-clicked",this._autocomplete_item_clicked.bind(this))}}).prototype,"_validate_expression",[Dt],Object.getOwnPropertyDescriptor(nn.prototype,"_validate_expression"),nn.prototype),ct(nn.prototype,"_type_check_expression",[Dt],Object.getOwnPropertyDescriptor(nn.prototype,"_type_check_expression"),nn.prototype),nn));let mn=new WeakMap;function gn(t){let e=mn.get(t.currentTarget)||0;"dragenter"===t.type?e++:e--,mn.set(t.currentTarget,e),t.currentTarget.classList.toggle("dropping",e>0),t.preventDefault()}const vn=gn,yn=gn;class En{constructor(t,e=!1){this._on_cancel=t,this._cancelled=!1,this.initial=e}cancel(){!this._cancelled&&this._on_cancel&&(this._on_cancel(),this._on_cancel=void 0),this._cancelled=!0}get cancelled(){return this._cancelled}}function bn(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(bn.prototype,HTMLElement.prototype),Object.setPrototypeOf(bn,HTMLElement);class xn extends bn{get _plugin(){let t=jt.getInstance(),e=this.getAttribute("plugin");return e||(e=Object.keys(t)[0],this.setAttribute("plugin",e)),t[e]||t[Object.keys(t)[0]]}_get_view_dom_columns(t,e){t=t||"#active_columns perspective-row";let n=Array.prototype.slice.call(this.shadowRoot.querySelectorAll(t));return e?n.map(e).filter((t=>t)):n}_get_view_all_columns(){return Array.prototype.slice.call(this.shadowRoot.querySelectorAll("#inactive_columns perspective-row"))}_get_view_active_columns(){return Array.prototype.slice.call(this.shadowRoot.querySelectorAll("#active_columns perspective-row"))}_get_view_active_valid_columns(){return Array.prototype.slice.call(this.shadowRoot.querySelectorAll("#active_columns perspective-row")).filter((t=>!t.classList.contains("null-column")))}_get_view_inactive_columns(){return Array.prototype.slice.call(this.shadowRoot.querySelectorAll("#inactive_columns perspective-row"))}_get_view_all_column_names(){return this._get_view_all_columns().map((t=>t.getAttribute("name")))}_get_view_active_column_names(){return this._get_view_active_columns().map((t=>t.getAttribute("name")))}_get_view_all_valid_column_names(){return this._get_view_all_column_names().filter((t=>t))}_get_view_active_valid_column_names(){return this._get_view_active_column_names().filter((t=>t))}_get_view_active_valid_column_count(){return this._get_view_active_valid_column_names().length}_get_view_column_names_by_types(t){const e=[],n=this._get_view_all_columns();for(const r of n)t.includes(r.getAttribute("type"))&&e.push(r.getAttribute("name"));return e}_get_view_columns({active:t=!0}={}){let e;return e=t?"#active_columns perspective-row":"#inactive_columns perspective-row",this._get_view_dom_columns(e,(t=>t.getAttribute("name")))}_get_view_aggregates(t){return t=t||"#active_columns perspective-row",this._get_view_dom_columns(t,(t=>{let e=t.getAttribute("aggregate");if("["===e[0])try{e=JSON.parse(e)}catch(t){console.error(t)}const n=t.getAttribute("name");return n&&{op:e,column:n}}))}_get_view_row_pivots(){return this._get_view_dom_columns("#row_pivots perspective-row",(t=>t.getAttribute("name")))}_get_view_column_pivots(){return this._get_view_dom_columns("#column_pivots perspective-row",(t=>t.getAttribute("name")))}_get_view_filter_nodes(){return this._get_view_dom_columns("#filters perspective-row")}_get_view_filters(){return this._get_view_dom_columns("#filters perspective-row",(t=>{let{operator:e,operand:n}=JSON.parse(t.getAttribute("filter"));return[t.getAttribute("name"),e,n]}))}_get_view_sorts(){return this._get_view_dom_columns("#sort perspective-row",(t=>{let e=t.getAttribute("sort-order")||"asc";return[t.getAttribute("name"),e]}))}_get_view_computed_columns(){return JSON.parse(this.getAttribute("computed-columns"))||[]}_get_view_parsed_computed_columns(){return JSON.parse(this.getAttribute("parsed-computed-columns"))||[]}_get_visible_column_count(){return this._get_view_active_columns().length}get_aggregate_attribute(){const t=JSON.parse(this.getAttribute("aggregates"))||{},e=new Set,n=Object.keys(t).map((n=>(e.add(n),{column:n,op:t[n]})));if(this._aggregate_defaults)for(const t of Object.keys(this._aggregate_defaults))e.has(t)||n.push({column:t,op:this._aggregate_defaults[t]});return n}}function wn(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}let Nn={integer:2,string:0,float:3,boolean:4,datetime:1,date:1};const Sn=t=>{if(t){const e=wn(t[0]),n=wn(t[1]),r=Math.floor(t[0]/t[1]*100);return P`
33 <span title="${e} / ${n}" class="plugin_information--overflow-hint">&nbsp;<span class="plugin_information--overflow-hint-percent">${r}%</span>&nbsp;</span>
34 `}},Ln=t=>{if(""!==t)return P`
35 <span style="white-space:nowrap">${t}</span>
36 `},Qn=(t,...e)=>t.flatMap(((t,n)=>[Ln(t),Sn(e[n])])).filter((t=>t));class Tn extends xn{_validate_parsed_computed_columns(t,e){if(!t||0===t.length)return[];const n=[];for(const r of t)e[r.column]&&n.push(r);return n}async _load_table(t){this.shadowRoot.querySelector("#app").classList.add("hide_message");const e=this._set_updating();if(this._clear_state(),this._table=t,!this._computed_expression_parser.is_initialized){const e=await t.get_computed_functions();this._computed_expression_parser.init(e)}let[n,r]=await Promise.all([t.columns(),t.schema(!0)]);this._initial_col_order=n.slice();let i=this._get_view_parsed_computed_columns();if(0===i.length){const t=this._get_view_computed_columns();for(const e of t)"string"==typeof e?i=i.concat(this._computed_expression_parser.parse(e)):i.push(e)}const o=await t.computed_schema(i);i=await this._validate_parsed_computed_columns(i,o),this.setAttribute("parsed-computed-columns",JSON.stringify(i));const s=i.map((t=>t.column));n=n.concat(s),this.hasAttribute("columns")||this.setAttribute("columns",JSON.stringify(this._initial_col_order)),n.sort((t=>(e,n)=>{const r=Nn[t[e]],i=Nn[t[n]];let o=0;return o=r==i?e.toLowerCase()<n.toLowerCase()?-1:1:r<i?-1:1,o})(r));const a=function(t,e,n,r){const i=new Set,o=[];for(const e of t){let t=n[e.column];t||(t=r[e.column]);const s=(0,it.get_type_config)(t);i.add(e.column),s.type||t?(""!==e.op&&-1!==$[s.type||t].indexOf(e.op)||(e.op=s.aggregate),o.push(e)):console.warn(`No column "${e.column}" found (specified in aggregates attribute).`)}for(const t of e)if(!i.has(t)){let e=n[t];e||(e=r[t.column]),o.push({column:t,op:(0,it.get_type_config)(e).aggregate})}return o}(this.get_aggregate_attribute(),n,r,o);let c=JSON.parse(this.getAttribute("columns"));0===c.filter((t=>n.indexOf(t)>-1)).length&&(c=this._initial_col_order),this._aggregate_defaults=function(t,e,n){const r={};for(const i of t){let t=e[i];t||(t=n[i]),r[i]=(0,it.get_type_config)(t).aggregate}return r}(n,r,o),this._clear_columns();for(const t of n){let e=a.find((e=>e.column===t)).op;const n=s.includes(t)?t:void 0;let i=r[t];i||(i=o[t]);const l=this._new_row(t,i,e,null,null,n);this._inactive_columns.appendChild(l),c.includes(t)&&l.classList.add("active")}for(;c.length<(null===(l=this._plugin.initial)||void 0===l||null===(u=l.names)||void 0===u?void 0:u.length);){var l,u;c.push(null)}for(const t of c){const e=s.includes(t)?t:void 0;let n=r[name];n||(n=o[name]);const i=this._new_row(t,n,void 0,void 0,void 0,e);this._active_columns.appendChild(i)}n.length===c.filter((t=>n.indexOf(t)>-1)).length?this._columns_container.classList.add("collapse"):this._columns_container.classList.remove("collapse"),this._show_column_container(),!0===await this._table.compute()&&this._show_side_panel_actions(),this.hasAttribute("filters")&&(this.filters=this.getAttribute("filters")),this._edit_port=await t.make_port(),this._edit_port_lock.resolve(this._edit_port);try{await this._debounce_update({force_update:!0})}catch(t){throw console.warn("Initial view failed, resetting UI state"),await this.reset(),t}e()}async get_maxes(){if(void 0!==this._plugin.max_columns&&!1===this._plugin.render_warning)return{max_cols:null,max_rows:null};let t,e;const[n,r]=await Promise.all([this._view.schema(),this._view.num_columns()]),i=Object.keys(n||{}).length||1;if(void 0!==this._plugin.max_columns){const e=this._plugin.max_columns%i,n=this._plugin.max_columns+e;t=n<r?n:void 0}return void 0!==this._plugin.max_cells&&(e=Math.ceil(t?this._plugin.max_cells/t:this._plugin.max_cells/(r||1))),{max_cols:t,max_rows:e}}async _warn_render_size_exceeded(t,e){if(this._show_warnings&&(t||e)){const n=await this._view.num_columns(),r=await this._view.num_rows(),i=n*r,o=t&&t<n,s=e&&e<r;if(o&&s){this._plugin_information.classList.remove("hidden");const r=Qn`Rendering ${[t,n]} of columns and ${[n*e,i]} of points.`;return F(r,this._plugin_information_message),!0}if(o){this._plugin_information.classList.remove("hidden");const e=Qn`Rendering ${[t,n]} of columns.`;return F(e,this._plugin_information_message),!0}if(s){this._plugin_information.classList.remove("hidden");const t=Qn`Rendering ${[n*e,i]} of points.`;return F(t,this._plugin_information_message),!0}this._plugin_information.classList.add("hidden")}return!1}_calculate_throttle_timeout(){let t;const e=this.getAttribute("throttle");if(void 0!==e&&"null"!==e&&this.hasAttribute("throttle")){if(t=parseInt(e),isNaN(t)||t<0)return console.warn(`Bad throttle attribute value "${e}". Can be (non-negative integer) milliseconds.`),this.removeAttribute("throttle"),0}else{if(!this.__render_times||this.__render_times.length<5)return 0;t=this.__render_times.reduce(((t,e)=>t+e),0)/this.__render_times.length,t=Math.min(5e3,t)}return Math.max(0,t)}_view_on_update(t){this._debounced||(this._debounced=setTimeout((async()=>{this._debounced=void 0;const e=this._render_time();this._task&&!this._task.initial&&this._task.cancel();const n=this._task=new En,r=this._plugin.update||this._plugin.create;try{if(t){const{max_cols:t,max_rows:e}=await this.get_maxes();n.cancelled||(await this._warn_render_size_exceeded(t,e),await r.call(this,this._datavis,this._view,n,t,e))}else await r.call(this,this._datavis,this._view,n);e(),n.cancel()}catch(t){console.error("Error rendering plugin.",t)}finally{this.dispatchEvent(new Event("perspective-view-update"))}}),this._calculate_throttle_timeout()))}async _validate_filters(){const t=[];for(const e of this._get_view_filter_nodes()){const n=e.shadowRoot.getElementById("filter_operand"),r=e.shadowRoot.getElementById("row_exclamation"),{operator:i,operand:o}=JSON.parse(e.getAttribute("filter")),s=[e.getAttribute("name"),i,o];await this._table.is_valid_filter(s)?(t.push(s),e.title="",n.style.borderColor="",r.hidden=!0):(e.title="Invalid Filter",n.style.borderColor="red",r.hidden=!1)}return t}_is_config_changed(t){const e=this.getAttribute("plugin");return!(at()(t,this._previous_config)&&e===this._previous_plugin_name||(this._previous_config=t,this._previous_plugin_name=e,0))}async _new_view({force_update:t=!1,ignore_size_check:e=!1,limit_points:n=!0}={}){if(!this._table)return;this._check_responsive_layout();const r=this._get_view_row_pivots(),i=this._get_view_column_pivots(),o=await this._validate_filters(),s=this._get_view_aggregates();if(0===s.length)return;const a=this._get_view_sorts();let c=s.map((t=>t.column)),l={};for(const t of s)l[t.column]=t.op;for(const t of a){const e=t[0];if(-1===c.indexOf(e)&&!(i.indexOf(t)>-1||r.indexOf(t)>-1)){const t=this.get_aggregate_attribute(),{column:n,op:r}=t.reduce(((t,n)=>n.column===e?n:t));l[n]=r}}const u={filter:o,row_pivots:r,column_pivots:i,aggregates:l,columns:c,sort:a,computed_columns:this._get_view_parsed_computed_columns()};this._view&&(this._view.remove_update(this._view_updater),this._view.delete(),this._view=void 0);try{this._view=this._table.view(u),this._view_updater=()=>this._view_on_update(n),this._view.on_update(this._view_updater)}catch(t){throw this._view.delete(),t}const p=this._render_time();this._render_count=(this._render_count||0)+1,this._task&&this._task.cancel();const h=this._task=new En((()=>this._render_count--),!0);try{const{max_cols:r,max_rows:i}=await this.get_maxes();e||await this._warn_render_size_exceeded(r,i),n?await this._plugin.create.call(this,this._datavis,this._view,h,r,i,t):await this._plugin.create.call(this,this._datavis,this._view,h,void 0,void 0,t)}catch(t){console.warn(t)}finally{this.__render_times||(this.__render_times=[],this.dispatchEvent(new Event("perspective-view-update"))),p(),h.cancel(),0===this._render_count&&(this.removeAttribute("updating"),this.dispatchEvent(new Event("perspective-update-complete")))}}_check_loaded_table(){if(this._table){const t=this._table;delete this._table,this._load_table(t)}}_render_time(){const t=performance.now();return()=>{this.__render_times.unshift(performance.now()-t),this.__render_times=this.__render_times.slice(0,5)}}_restyle_plugin(){if(this._plugin.styleElement){const t=this._task=new En;this._plugin.styleElement.call(this,this._datavis,this._view,t)}}_clear_state(){this._task&&this._task.cancel();const t=[];if(this._view){const e=this._view;this._view=void 0,t.push(e.delete()),e.remove_update(this._view_updater),e.remove_delete()}return Promise.all(t)}_set_updating(){let t;return this.toggleAttribute("updating",!0),this._updating_promise=new Promise((e=>{t=e})),t}_register_debounce_instance(){const t=j()(((t,e,n,r)=>{this._new_view({ignore_size_check:e,force_update:n,limit_points:r}).then(t)}),0);this._debounce_update=async({force_update:e=!1,ignore_size_check:n=!1,limit_points:r=!0}={})=>{if(this._table){let i=this._set_updating();await new Promise((i=>t(i,n,e,r))),i()}}}}class Rn extends Tn{_clear_columns(){this._inactive_columns.innerHTML="",this._active_columns.innerHTML=""}set_aggregate_attribute(t){let e=!1,n=t.reduce(((t,n)=>(this._aggregate_defaults[n.column]!==n.op&&(t[n.column]=n.op,e=!0),t)),{});e?this.setAttribute("aggregates",JSON.stringify(n)):this.removeAttribute("aggregates")}_get_type(t){let e=this._get_view_inactive_columns();if(e.length>0){const n=e.find((e=>e.getAttribute("name")===t));return n?n.getAttribute("type"):"integer"}return""}_set_row_type(t){const e=this._get_view_inactive_columns().filter((t=>"integer"===t.getAttribute("type")||"float"===t.getAttribute("type"))).map((t=>t.getAttribute("name")));t.set_weights(e),t.setAttribute("type",this._get_type(t.getAttribute("name")))}_new_row(t,e,n,r,i,o){let s=document.createElement("perspective-row");if(e=e||this._get_type(t),!n){let r=this.get_aggregate_attribute();n=r&&(n=r.find((e=>e.column===t)))?n.op:(0,it.get_type_config)(e).aggregate}if(r&&(s.setAttribute("filter",r),"string"===e||"date"===e||"datetime"===e)){const n=this._get_view_parsed_computed_columns(),r=n.map((t=>t.column)),i=this._table.view({row_pivots:[t],columns:[],computed_columns:r.includes(t)?n:[]});i.num_rows().then((async t=>{if(t<1e5){const t=await i.to_json({end_row:10});s.choices(this._autocomplete_choices(t,e))}else console.warn(`perspective-viewer did not generate autocompletion results - ${t} is greater than limit of 100,000 rows.`)})).finally((()=>{i.delete()}))}i?s.setAttribute("sort-order",i):this._get_view_column_pivots().indexOf(t)>-1?s.setAttribute("sort-order","col asc"):s.setAttribute("sort-order","asc");const a=this._get_view_inactive_columns().filter((t=>"integer"===t.getAttribute("type")||"float"===t.getAttribute("type"))).map((t=>t.getAttribute("name")));return s.set_weights(a),null===t?s.classList.add("null-column"):(s.setAttribute("type",e),s.setAttribute("name",t)),s.setAttribute("aggregate",Array.isArray(n)?JSON.stringify(n):n),s.addEventListener("visibility-clicked",this._column_visibility_clicked.bind(this)),s.addEventListener("aggregate-selected",this._column_aggregate_clicked.bind(this)),s.addEventListener("filter-selected",this._column_filter_clicked.bind(this)),s.addEventListener("close-clicked",(t=>sn.call(this,t.detail))),s.addEventListener("sort-order",this._sort_order_clicked.bind(this)),s.addEventListener("row-drag",(()=>{this.classList.add("dragging"),this._original_index=Array.prototype.slice.call(this._active_columns.children).findIndex((e=>e.getAttribute("name")===t)),-1!==this._original_index?(this._drop_target_hover=this._active_columns.children[this._original_index],setTimeout((()=>s.setAttribute("drop-target",!0)))):this._drop_target_hover=this._new_row(t,e,n)})),s.addEventListener("row-dragend",(()=>{this.classList.remove("dragging")})),o&&(s.setAttribute("computed_column",JSON.stringify(o)),s.classList.add("computed")),s}_update_computed_column_view(t){const e=this._get_view_parsed_computed_columns(),n=this._get_view_all_column_names(),r=this._get_view_active_column_names();if(0===Object.keys(t).length||0===e.length)return;let i=0;const o=JSON.parse(this.getAttribute("columns"))||[];let s=!1;for(const a of e){const e=a.column;if(!n.includes(e)&&o.includes(e)&&(s=!0),n.includes(e)||r.includes(e))continue;const c=this._new_row(e,t[e],null,null,null,e);this._inactive_columns.insertBefore(c,this._inactive_columns.childNodes[0]||null),i++}s?this._update_column_view(o,!0):i>0&&this._columns_container.classList.contains("collapse")&&this._columns_container.classList.remove("collapse")}_diff_computed_column_view(t,e){const n=[],r=e.map((t=>t.column));for(const e of t)r.includes(e.column)||n.push(e);return n}_reset_computed_column_view(t){if(!t||0===t.length)return;const e=t.map((t=>t.column)),n=this._get_view_active_column_names().filter((t=>!e.includes(t))),r=this._get_view_aggregates().filter((t=>!e.includes(t.column))),i=this._get_view_row_pivots().filter((t=>!e.includes(t))),o=this._get_view_column_pivots().filter((t=>!e.includes(t))),s=this._get_view_sorts().filter((t=>!e.includes(t[0]))),a=this._get_view_filters().filter((t=>!e.includes(t[0])));this.set_aggregate_attribute(r),this.setAttribute("columns",JSON.stringify(n)),this.setAttribute("row-pivots",JSON.stringify(i)),this.setAttribute("column-pivots",JSON.stringify(o)),this.setAttribute("sort",JSON.stringify(s)),this.setAttribute("filters",JSON.stringify(a));const c=this._get_view_all_columns().filter((t=>t.classList.contains("computed")));for(const t of c)this._inactive_columns.removeChild(t);const l=this._get_view_active_columns().filter((t=>null!=t)),u=this._get_view_inactive_columns();l.length===u.length?this._columns_container.classList.add("collapse"):this._columns_container.classList.remove("collapse")}_update_column_view(t,e=!1){if(t||(t=this._get_view_active_column_names()),this._plugin.initial&&this._plugin.initial.names)for(;t.length<this._plugin.initial.names.length;)t.push(null);this.setAttribute("columns",JSON.stringify(t));const n=t.filter((t=>null!=t)),r=this._get_view_inactive_columns();n.length===r.length?this._columns_container.classList.add("collapse"):this._columns_container.classList.remove("collapse"),r.forEach((t=>{-1===n.indexOf(t.getAttribute("name"))?t.classList.remove("active"):t.classList.add("active")})),e&&this._update_column_list(t,this._active_columns,((t,e)=>{if(null===t)return this._new_row(null);{const n=r.find((e=>e.getAttribute("name")===t));if(n){const t=n.getAttribute("name");let r;return e.includes(t)&&(r=t),this._new_row(t,n.getAttribute("type"),void 0,void 0,void 0,r)}}}))}_update_column_list(t,e,n,r){r=r||((t,e)=>e.getAttribute("name")===t);const i=Array.prototype.slice.call(e.children),o=this._get_view_parsed_computed_columns().map((t=>t.column));for(let s=0,a=0;s<i.length||a<t.length;s++,a++){const c=t[a],l=i[s],u=i[s+1];if(l)if(void 0===c)e.removeChild(l);else if(r(c,l))this._set_row_type(l);else if(l.classList.contains("null-column")){const t=n(c,o);t&&e.replaceChild(t,l)}else if(u&&r(c,u))e.removeChild(l),s++;else{const t=n(c,o);t&&(e.insertBefore(t,l),s--)}else{const t=n(c,o);t&&e.appendChild(t)}}}_set_row_styles(){let t="";if(this._plugin.initial&&this._plugin.initial.names)for(const e in this._plugin.initial.names){const n=this._plugin.initial.names[e];t+=`#active_columns perspective-row:nth-child(${parseInt(e)+1}){margin-top:23px;}`,t+=`#active_columns perspective-row:nth-child(${parseInt(e)+1}):before{content:"${n}";}`}this.shadowRoot.querySelector("#psp_styles").innerHTML=t}_show_column_container(){this.shadowRoot.querySelector("#columns_container").style.visibility="visible"}_show_side_panel_actions(){this.shadowRoot.querySelector("#side_panel__actions").style.visibility="visible"}_remove_null_columns(t=0){const e=this._get_view_active_columns();for(;++t<e.length;){const n=e[t];n.classList.contains("null-column")&&this.shadowRoot.querySelector("#active_columns").removeChild(n)}}_set_column_defaults(){const t=this._get_view_all_columns(),e=this._get_view_active_valid_columns(),n=this._get_view_active_valid_column_names();if(t.length>0)if(this._plugin.initial){let n=[],r=this._plugin.initial.count||2;this._fill_numeric(e,n),this._fill_numeric(t,n),this._fill_numeric(t,n,!0),n=n.slice(0,r);const i=this._plugin.initial.names;for(;i&&n.length<i.length;)n.push(null);this.setAttribute("columns",JSON.stringify(n))}else"select"===this._plugin.selectMode?this.setAttribute("columns",JSON.stringify([t[0].getAttribute("name")])):(this.setAttribute("columns",JSON.stringify(n)),this._remove_null_columns())}_fill_numeric(t,e,n=!1){for(let r of t){let t=r.getAttribute("type"),i=r.getAttribute("name");(n||["float","integer"].indexOf(t)>-1&&-1===e.indexOf(i))&&e.push(i)}}async _check_responsive_layout(){if(this.shadowRoot){const t=this.shadowRoot.querySelector("#app");if(this.clientHeight<500&&this.clientWidth>600&&this._get_view_columns({active:!1}).length>this._get_view_columns().length){if(!t.classList.contains("columns_horizontal")){const e=this._persisted_side_panel_width;this._persisted_side_panel_width=this._side_panel.style.width,this._side_panel.style.width=e||"",t.classList.add("columns_horizontal")}}else{if(t.classList.contains("columns_horizontal")){const e=this.shadowRoot.querySelector("#pivot_chart_container");e.clientWidth,this._side_panel.clientWidth;const n=this._persisted_side_panel_width||e.clientWidth+this._side_panel.clientWidth/2,r=e.clientHeight+50;return await this._pre_resize(n,r,(()=>{const e=this._persisted_side_panel_width;this._persisted_side_panel_width=this._side_panel.style.width,this._side_panel.style.width=e||"",t.classList.remove("columns_horizontal")})),!0}this.clientWidth<600?t.classList.contains("narrow")||t.classList.add("narrow"):t.classList.contains("narrow")&&t.classList.remove("narrow")}return!1}return!1}_register_ids(){this._aggregate_selector=this.shadowRoot.querySelector("#aggregate_selector"),this._vis_selector=this.shadowRoot.querySelector("#vis_selector"),this._filters=this.shadowRoot.querySelector("#filters"),this._row_pivots=this.shadowRoot.querySelector("#row_pivots"),this._column_pivots=this.shadowRoot.querySelector("#column_pivots"),this._datavis=this.shadowRoot.querySelector("#pivot_chart"),this._active_columns=this.shadowRoot.querySelector("#active_columns"),this._inactive_columns=this.shadowRoot.querySelector("#inactive_columns"),this._side_panel_actions=this.shadowRoot.querySelector("#side_panel__actions"),this._add_computed_expression_button=this.shadowRoot.querySelector("#add-computed-expression"),this._computed_expression_widget=this.shadowRoot.querySelector("perspective-computed-expression-widget"),this._inner_drop_target=this.shadowRoot.querySelector("#drop_target_inner"),this._drop_target=this.shadowRoot.querySelector("#drop_target"),this._config_button=this.shadowRoot.querySelector("#config_button"),this._reset_button=this.shadowRoot.querySelector("#reset_button"),this._download_button=this.shadowRoot.querySelector("#download_button"),this._copy_button=this.shadowRoot.querySelector("#copy_button"),this._side_panel=this.shadowRoot.querySelector("#side_panel"),this._top_panel=this.shadowRoot.querySelector("#top_panel"),this._sort=this.shadowRoot.querySelector("#sort"),this._transpose_button=this.shadowRoot.querySelector("#transpose_button"),this._plugin_information=this.shadowRoot.querySelector(".plugin_information"),this._plugin_information_action=this.shadowRoot.querySelector(".plugin_information__action"),this._plugin_information_message=this.shadowRoot.querySelector("#plugin_information_count"),this._resize_bar=this.shadowRoot.querySelector("#resize_bar"),this._columns_container=this.shadowRoot.querySelector("#columns_container")}_register_view_options(){let t=jt.getInstance();F((t=>{const e=[];for(name in t)e.push(P`
37 <option value="${name}">${t[name].name||name}</option>
38 `);return e})(t),this._vis_selector)}_autocomplete_choices(t,e){const n=[],r=(0,it.get_type_config)(e);for(let i=1;i<t.length;i++){const o=t[i].__ROW_PATH__;if(Array.isArray(o)&&o.length>0&&o[0]){let t=o[0];"date"!==e&&"datetime"!==e||(t=new Date(t),t=t.toLocaleString("en-US",r.format)),n.push(t)}}return n}}class Cn extends Rn{_show_context_menu(t){return this.shadowRoot.querySelector("#app").classList.toggle("show_menu"),t.stopPropagation(),t.preventDefault(),!1}_hide_context_menu(){this.shadowRoot.querySelector("#app").classList.remove("show_menu")}async _toggle_config(t){if(!t||2!==t.button){this._show_config=!this._show_config,this._hide_context_menu();const t=this.shadowRoot.querySelector("#pivot_chart_container");this._show_config?await this._post_resize((()=>{this.toggleAttribute("settings",!0)}),(()=>{this._side_panel.style.display="flex",this._top_panel.style.display="flex",this.dispatchEvent(new CustomEvent("perspective-toggle-settings",{detail:this._show_config}))})):await this._pre_resize(t.clientWidth+this._side_panel.clientWidth,t.clientHeight+this._top_panel.clientHeight,(()=>{this._side_panel.style.display="none",this._top_panel.style.display="none",this.removeAttribute("settings")}),(()=>this.dispatchEvent(new CustomEvent("perspective-toggle-settings",{detail:this._show_config}))))}}async _pre_resize(t,e,n,r){this._datavis.style.width=`${t}px`,this._datavis.style.height=`${e}px`;try{!document.hidden&&this.offsetParent&&await this._plugin.resize.call(this)}finally{null==r||r(),this._datavis.style.width="100%",this._datavis.style.height="100%",n()}}async _post_resize(t,e){null==e||e();try{!document.hidden&&this.offsetParent&&await this._plugin.resize.call(this)}finally{t()}}_open_computed_expression_widget(t){t.stopImmediatePropagation(),this._computed_expression_widget._computed_expression_parser=this._computed_expression_parser,this._computed_expression_widget._get_type=this._get_type.bind(this),this._computed_expression_widget._get_view_all_column_names=this._get_view_all_column_names.bind(this),this._computed_expression_widget._get_view_column_names_by_types=this._get_view_column_names_by_types.bind(this),this._computed_expression_widget.style.display="flex",this._side_panel_actions.style.display="none",this._computed_expression_widget._observe_editor()}_save_computed_expression(t){const e=t.detail.expression;let n=this._get_view_computed_columns();n.includes(e)?console.warn(`"${e}" was not applied because it already exists.`):(n.push(e),this.setAttribute("computed-columns",JSON.stringify(n)))}async _type_check_computed_expression(t){const e=t.detail.parsed_expression||[];if(0===e.length)return void this._computed_expression_widget._type_check_expression({});const n={};for(const t of e)n[t.column]=t.computed_function_name;const r=await this._table.computed_schema(e),i={};for(const t in n)r[t]||(i[t]=await this._table.get_computation_input_types(n[t]));this._computed_expression_widget._type_check_expression(r,i)}_clear_all_computed_expressions(){this.setAttribute("computed-columns",JSON.stringify([]))}_set_computed_expression(t){return t}_column_visibility_clicked(t){const e=t.currentTarget;if("active_columns"===e.parentElement.getAttribute("id")){var n;const s=(null===(n=this._plugin.initial)||void 0===n?void 0:n.count)||1;if(this._get_view_active_valid_column_count()===s)return;if(t.detail.shiftKey)for(let t of Array.prototype.slice.call(this._active_columns.children))t!==e&&this._active_columns.removeChild(t);else{var r,i,o;const t=Array.prototype.slice.call(this._active_columns.children).indexOf(e);if(t<(null===(r=this._plugin.initial)||void 0===r?void 0:r.count))return;t<(null===(i=this._plugin.initial)||void 0===i||null===(o=i.names)||void 0===o?void 0:o.length)-1&&this._active_columns.insertBefore(this._new_row(null),e),this._active_columns.removeChild(e)}}else{var s;if(t.detail.shiftKey&&"toggle"===this._plugin.selectMode||!t.detail.shiftKey&&"select"===this._plugin.selectMode)for(let t of Array.prototype.slice.call(this._active_columns.children))this._active_columns.removeChild(t);let n=this._new_row(e.getAttribute("name"),e.getAttribute("type"));const r=this._get_view_active_columns();let i=r.length-1;if(r[i]&&null!==(s=r[i])&&void 0!==s&&s.classList.contains("null-column")){for(;i-- >0;)if(!r[i].classList.contains("null-column")){this._active_columns.replaceChild(n,r[i+1]);break}}else this._active_columns.appendChild(n)}this._check_responsive_layout(),this._update_column_view()}_column_aggregate_clicked(){let t=this.get_aggregate_attribute(),e=this._get_view_aggregates();for(let n of t){let t=e.find((t=>t.column===n.column));t&&(n.op=t.op)}this.set_aggregate_attribute(t),this._update_column_view(),this._debounce_update()}_column_filter_clicked(){let t=this._get_view_filters();this._updating_filter=!0,this.setAttribute("filters",JSON.stringify(t)),this._updating_filter=!1,this._debounce_update()}_increment_sort(t,e,n){let r=["asc","desc"];return e&&r.push("col asc","col desc"),n&&(r=r.map((t=>`${t} abs`))),r.push("none"),r[(r.indexOf(t)+1)%r.length]}_sort_order_clicked(t){const e=t.target,n=t.detail.shiftKey&&"string"!==e.getAttribute("type"),r=this._increment_sort(e.getAttribute("sort-order"),this._get_view_column_pivots().length>0,n);e.setAttribute("sort-order",r);const i=this._get_view_sorts();this.setAttribute("sort",JSON.stringify(i))}_transpose(){const t=this.hasAttribute("row-pivots"),e=this.hasAttribute("column-pivots");if(t&&e){let t=this.getAttribute("row-pivots");this.setAttribute("row-pivots",this.getAttribute("column-pivots")),this.setAttribute("column-pivots",t)}else if(t){let t=this.getAttribute("row-pivots");this.removeAttribute("row-pivots"),this.setAttribute("column-pivots",t)}else if(e){let t=this.getAttribute("column-pivots");this.removeAttribute("column-pivots"),this.setAttribute("row-pivots",t)}else this.removeAttribute("column-pivots"),this.removeAttribute("row-pivots")}_reset_sidepanel(){this._side_panel.style.width=""}_resize_sidepanel(t){const e=document.body.style.cursor;document.body.style.cursor="col-resize";const n=t.clientX,r=this._side_panel.offsetWidth,i=t=>{const e=Math.max(0,Math.min(r+(t.clientX-n),this.offsetWidth-10));this._side_panel.style.width=`${e}px`,this._plugin&&this.notifyResize()},o=()=>{document.body.style.cursor=e,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)}_vis_selector_changed(){var t;this._plugin_information.classList.add("hidden"),this.setAttribute("plugin",this._vis_selector.value),this._active_columns.classList.remove("one_lock","two_lock");const e=["one_lock","two_lock"][(null===(t=this._plugin.initial)||void 0===t?void 0:t.count)-1];e&&this._active_columns.classList.add(e),this._debounce_update()}_register_callbacks(){this._sort.addEventListener("drop",an.bind(this)),this._sort.addEventListener("dragend",sn.bind(this)),this._sort.addEventListener("dragenter",vn.bind(this)),this._sort.addEventListener("dragover",_n.bind(this)),this._sort.addEventListener("dragleave",yn.bind(this)),this._row_pivots.addEventListener("drop",an.bind(this)),this._row_pivots.addEventListener("dragend",sn.bind(this)),this._row_pivots.addEventListener("dragenter",vn.bind(this)),this._row_pivots.addEventListener("dragover",_n.bind(this)),this._row_pivots.addEventListener("dragleave",yn.bind(this)),this._column_pivots.addEventListener("drop",an.bind(this)),this._column_pivots.addEventListener("dragend",sn.bind(this)),this._column_pivots.addEventListener("dragenter",vn.bind(this)),this._column_pivots.addEventListener("dragover",_n.bind(this)),this._column_pivots.addEventListener("dragleave",yn.bind(this)),this._filters.addEventListener("drop",an.bind(this)),this._filters.addEventListener("dragend",sn.bind(this)),this._filters.addEventListener("dragenter",vn.bind(this)),this._filters.addEventListener("dragover",_n.bind(this)),this._filters.addEventListener("dragleave",yn.bind(this)),this._active_columns.addEventListener("drop",fn.bind(this)),this._active_columns.addEventListener("dragenter",vn.bind(this)),this._active_columns.addEventListener("dragend",cn.bind(this)),this._active_columns.addEventListener("dragover",dn.bind(this)),this._active_columns.addEventListener("dragleave",ln.bind(this)),this._add_computed_expression_button.addEventListener("click",this._open_computed_expression_widget.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-save",this._save_computed_expression.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-resize",this._reset_sidepanel.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-type-check",this._type_check_computed_expression.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-remove",this._clear_all_computed_expressions.bind(this)),this._computed_expression_widget.addEventListener("perspective-computed-expression-update",this._set_computed_expression.bind(this)),this._config_button.addEventListener("mousedown",this._toggle_config.bind(this)),this._config_button.addEventListener("contextmenu",this._show_context_menu.bind(this)),this._reset_button.addEventListener("click",this.reset.bind(this)),this._copy_button.addEventListener("click",(t=>this.copy(t.shiftKey))),this._download_button.addEventListener("click",(t=>this.download(t.shiftKey))),this._transpose_button.addEventListener("click",this._transpose.bind(this)),this._drop_target.addEventListener("dragover",_n.bind(this)),this._resize_bar.addEventListener("mousedown",this._resize_sidepanel.bind(this)),this._resize_bar.addEventListener("dblclick",this._reset_sidepanel.bind(this)),this._vis_selector.addEventListener("change",this._vis_selector_changed.bind(this)),this._plugin_information_action.addEventListener("click",(()=>{this._debounce_update({ignore_size_check:!0,limit_points:!1}),this._plugin_information.classList.add("hidden"),this._plugin.render_warning=!1}))}}var An;const Un=["selectable","editable","plugin","computed-columns","row-pivots","column-pivots","aggregates","filters","sort","columns"];kt('\x3c!--\r\n \r\n Copyright (c) 2017, the Perspective Authors.\r\n \r\n This file is part of the Perspective library, distributed under the terms of\r\n the Apache License 2.0. The full license can be found in the LICENSE file.\r\n\r\n--\x3e\r\n\r\n<template id="perspective-viewer">\r\n\r\n <div id="app">\r\n <div id="menubar">\r\n <div id="copy_button" class="noselect button" title="Copy CSV"></div>\r\n <div id="download_button" class="noselect button" title="Download CSV"></div>\r\n <div id="reset_button" class="noselect button" title="Reset Viewer"></div>\r\n </div>\r\n <div id=\'side_panel\' class="column fixed noselect">\r\n <div id="vis_selector_container">\r\n <select id="vis_selector">\r\n </select>\r\n </div>\r\n <div id="columns_container" style="visibility: hidden">\r\n <ul id=\'active_columns\'></ul>\r\n <div id="sub_columns">\r\n <ul id=\'inactive_columns\'></ul>\r\n <div id="side_panel__actions" style="visibility: hidden">\r\n <div id="add-computed-expression" class="side_panel-action"><span class="psp-icon psp-icon__add"></span><span class="psp-title__columnName">New Column</span></div>\r\n </div>\r\n </div>\r\n <perspective-computed-expression-widget></perspective-computed-expression-widget>\r\n </div>\r\n <div id="resize_bar"></div>\r\n </div>\r\n <div class="column noselect">\r\n <div id=\'top_panel\'>\r\n <div class="rrow">\r\n <div id="row_pivots">\r\n <div class="psp-text-field">\r\n <ul class="psp-text-field__input" for="row-pivots"></ul>\r\n <label for="row_pivots"></label>\r\n </div>\r\n </div>\r\n </div>\r\n <span id="transpose_button" class="rrow centered" title="Transpose Pivots">&#x21C4;</span>\r\n <div class="rrow">\r\n <div id="column_pivots">\r\n <div class="psp-text-field">\r\n <ul class="psp-text-field__input" for="column-pivots"></ul>\r\n <label for="column_pivots"></label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="rrow">\r\n <div id="sort">\r\n <div class="psp-text-field">\r\n <ul class="psp-text-field__input" for="sort"></ul>\r\n <label for="sort"></label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="rrow" style=\'flex-grow:3;height:auto;flex:1 1 400px;max-width:none\'>\r\n <div id="filters">\r\n <div class="psp-text-field">\r\n <ul class="psp-text-field__input" for=\'filters\'></ul>\r\n <label for="filters"></label>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div id="pivot_chart_container">\r\n <div class="plugin_information plugin_information--warning hidden" id="plugin_information--size">\r\n <span class="plugin_information__text" id="plugin_information_count">Estimated rendering</span>\r\n <span class="plugin_information__actions">\r\n <span class="plugin_information__action">Render all points</span>\r\n </span>\r\n </div>\r\n <div id="pivot_chart"></div>\r\n </div>\r\n </div>\r\n\r\n <div id="config_button" class="noselect button" title="Right click for additional options"></div>\r\n\r\n <div style="display:none" id=\'drop_target\'>\r\n <div id=\'drop_target_inner\'>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n</template>',':host #app #top_panel #row_pivots label:before{content:var(--row_pivots--before,"Row Pivots")}:host #app #top_panel #column_pivots label:before{content:var(--column_pivots--before,"Column Pivots")}:host #app #top_panel #sort label:before{content:"Sort"}:host #app #top_panel #filters label:before{content:"Filter"}:host #app #side_panel #active_columns perspective-row:before{font-size:10px;margin-left:var(--column_selector--width,20px);left:1px;padding:var(--column_type--padding,0px 0px 0px 5px);color:var(--inactive--color,#666);position:absolute;margin-top:-15px}:host:hover #config_button{opacity:1}#config_button{background:none;opacity:1!important}.button{padding:var(--button--padding,12px 14px 24px 8px)}[settings="true"] #config_button{opacity:1!important}@keyframes expand{from{opacity:0}}:host{position:relative;display:inline-block;overflow:hidden;word-wrap:"normal";--d3fc-series:rgba(31,119,180,0.5);--d3fc-series-1:#0366d6;--d3fc-series-2:#ff7f0e;--d3fc-series-3:#2ca02c;--d3fc-series-4:#d62728;--d3fc-series-5:#9467bd;--d3fc-series-6:#8c564b;--d3fc-series-7:#e377c2;--d3fc-series-8:#7f7f7f;--d3fc-series-9:#bcbd22;--d3fc-series-10:#17becf;--d3fc-full--gradient:linear-gradient(#4d342f 0%,#e4521b 22.5%,#feeb65 42.5%,#f0f0f0 50%,#dcedc8 57.5%,#42b3d5 67.5%,#1a237e 100%);--d3fc-positive--gradient:linear-gradient(#dcedc8 0%,#42b3d5 35%,#1a237e 100%);--d3fc-negative--gradient:linear-gradient(#feeb65 100%,#e4521b 70%,#4d342f 0%)}:host #pivot_chart{position:absolute;width:100%;height:100%;display:grid;justify-content:stretch}:host .hidden{display:none}:host .psp-icon:hover{cursor:pointer}:host .psp-icon__add{display:flex;width:20px;min-width:20px;margin-top:-2px;height:0px;font-family:var(--column-add--font-family,inherit)}:host .psp-icon__add:before{font-feature-settings:"liga";content:var(--column-add--before,"+")}:host .psp-title__columnName{display:flex;margin-left:24px;margin-top:3px;font-size:12px}:host .side_panel-action:hover{cursor:pointer}:host *{box-sizing:border-box;line-height:1.42857143}:host #app{display:flex;position:relative;width:100%;height:100%}:host #app.hide_message #drop_target{display:none}:host .chart{padding:15px}:host #pivot_chart_container{flex-grow:1;position:relative;border:var(--plugin--border,none);overflow:hidden}:host .config{display:flex}:host #row_pivots #psp_row,\n:host #column_pivots #psp_row,\n:host #sort #psp_row,\n:host #filters #psp_row{display:inline}:host .psp-text-field ul{min-height:20px}:host #active_columns perspective-row{animation:expand 0.3s ease-out;--column-selector--color:var(--active--color,#999);--is_visible--before:var(--active-column-selector--content,"\\25CF")}:host #inactive_columns perspective-row{animation:expand 0.3s ease-out;--column-selector--color:var(--inactive-column-selector--color,#999);--is_visible--before:var(--inactive-column-selector--content,"\\25CB");--row_draggable--animation:none}:host #inactive_columns perspective-row:hover{transition:none;opacity:1}:host #top_panel perspective-row{animation:expand 0.3s ease-out;--column-name--flex:1}:host #active_columns,\n:host #inactive_columns{list-style:none;padding:0px;width:100%;margin:var(--column-container--margin,8px 0px 0px 0px);overflow-y:overlay;overflow-x:hidden;position:relative}:host #inactive_columns perspective-row{opacity:var(--inactive-column--opacity,1);transition:opacity 0.3s}:host #inactive_columns perspective-row.active{opacity:0;height:0!important;overflow:hidden}:host .columns_horizontal #sub_columns.collapse #side_panel__actions{margin-top:0px}:host .columns_horizontal .collapse #sub_columns #side_panel__actions{margin-top:0px}:host #sub_columns{display:flex;flex-direction:column;overflow-x:hidden;width:100%;flex:0 1 auto;min-height:35px}:host #sub_columns.collapse{flex:0 1 auto;flex-shrink:0;min-height:0px}:host #app.columns_horizontal #sub_columns{flex:0 1 50%}:host #app.columns_horizontal #sub_columns #inactive_columns{flex:0 1 auto}:host #app:not(.columns_horizontal) #columns_container:not(.collapse) #active_columns{max-height:60%}:host #columns_container.collapse #sub_columns{flex:0 1 auto;flex-shrink:0;min-height:0px}:host .column{display:flex;list-style:none;flex-direction:column;flex:1}:host .rrow{display:flex;flex-grow:1;min-height:24px;align-items:center;max-width:400px;list-style:none;min-width:140px;margin:var(--column-drop-container--margin,5px 10px 0px 0px)}:host .rrow > div{display:flex;min-height:24px;flex-direction:column;justify-content:flex-end}:host #top_panel > .rrow > *{width:100%;padding:12px 0px 12px 0px;margin:-12px 0px -12px 0px}:host .rrow #psp_row{white-space:nowrap}:host #sort perspective-row{--sort_order-display:inline;--sort_order-padding:0 0 0 4px}:host #sort perspective-row[sort-order="asc"]{--row-sort-order--before:var(--sort-order-asc--before,"\\2191")}:host #sort perspective-row[sort-order="desc"]{--row-sort-order--before:var(--sort-order-desc--before,"\\2193")}:host #sort perspective-row[sort-order="none"]{--row-sort-order--before:var(--sort-order-none--before,"-")}:host #sort perspective-row[sort-order="asc abs"]{--row-sort-order--before:var(--sort-order-asc-abs--before,"\\21E7")}:host #sort perspective-row[sort-order="desc abs"]{--row-sort-order--before:var(--sort-order-desc-abs--before,"\\21E9")}:host #sort perspective-row[sort-order="col asc"]{--row-sort-order--before:var(--sort-order-col-asc--before,"\\2192")}:host #sort perspective-row[sort-order="col desc"]{--row-sort-order--before:var(--sort-order-col-desc--before,"\\2190")}:host #sort perspective-row[sort-order="col asc abs"]{--row-sort-order--before:var(--sort-order-col-asc-abs--before,"\\21E8")}:host #sort perspective-row[sort-order="col desc abs"]{--row-sort-order--before:var(--sort-order-col-desc-abs--before,"\\21E6")}:host #top_panel perspective-row{padding:0px 10px 0px 0px}:host #top_panel perspective-row::after{content:","}:host #top_panel perspective-row:last-child::after{display:none;content:""!important}:host label{white-space:nowrap;display:inline-block;vertical-align:middle;margin-bottom:0px}:host #drop_target{position:absolute;left:0px;top:0px;right:0px;bottom:0px;padding:30px}:host #drop_target_inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host #drop_target_inner h3{font-weight:300}:host #config_button{position:absolute;top:0;left:0;opacity:0;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s ease-out}:host #config_button:hover{color:var(--active--color,inherit)}:host .button{cursor:pointer;font-size:16px;font-weight:normal}:host ul{padding:0px;margin:0;font-size:12px}:host select::-ms-expand{display:none}:host select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:var(--select--background,url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNC45IDEwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0LjkgMTA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojQUFBQUFBO30KPC9zdHlsZT4KPHRpdGxlPmFycm93czwvdGl0bGU+Cjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMS40LDQuNyAyLjUsMy4yIDMuNSw0LjcgIi8+Cjxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMy41LDUuMyAyLjUsNi44IDEuNCw1LjMgIi8+Cjwvc3ZnPg==) no-repeat 95% 50%);background-color:#fff;color:inherit;border-radius:5px;height:24px;padding:var(--select--padding,0px 0px 0px 6px);font-size:12px;font-family:inherit}:host select option{background:var(--select--background-color,#ffffff)}:host input{padding:0 10px 0 10px}:host .centered{display:flex;align-items:center;justify-content:center}:host #top_panel{display:flex;flex-wrap:wrap;justify-content:flex-start;padding:var(--top_panel--padding,5px 0px 10px 0px);max-width:1000px;z-index:1}:host #top_panel perspective-row{margin-bottom:-1px;display:var(--top-panel-row--display,inline-block);--psp_row-display:inline-block}:host #side_panel{position:relative;flex:0 0 auto;padding:var(--side_panel--padding,10px 10px 0px 11px)}:host #side_panel > div{display:flex}:host #vis_selector_container{min-height:29px;margin-left:var(--column_selector--width,20px);overflow:hidden}:host #vis_selector{flex-grow:1}:host #transpose_button{cursor:pointer;min-width:5px;max-width:5px;flex-grow:0;color:#999;font-family:Arial;font-size:12px}:host #transpose_button:hover{color:var(--active--color,inherit)}:host #resize_bar{position:absolute;top:0;right:0;bottom:0;width:8px;cursor:col-resize}:host ::-webkit-scrollbar{width:8px;height:8px}:host :hover::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,0.15)}:host :hover::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,0.3)}:host ::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,0)}:host ::-webkit-scrollbar-corner{background-color:rgba(0,0,0,0)}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9sZXNzL2NvbHVtbl9sYWJlbHMubGVzcyIsInZpZXdlci5sZXNzIiwic3JjL2xlc3Mvdmlld2VyLmxlc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBU0EsK0NBR1ksOENDTVosQ0RUQSxrREFPWSxvRENLWixDRFpBLHlDQVdZLGNDSVosQ0RmQSw0Q0FlWSxnQkNHWixDRGxCQSw4REFzQmdCLGNBQUEsQ0FDQSw4Q0FBQSxDQUNBLFFBQUEsQ0FDQSxtREFBQSxDQUNBLGlDQUFBLENBQ0EsaUJBQUEsQ0FDQSxnQkNEaEIsQ0N4QkEsMkJBQ0ksU0RrQ0osQ0MvQkEsZUFDSSxlQUFBLENBQ0EsbUJEaUNKLENDOUJBLFFBQ0ksaUREZ0NKLENDN0JBLGlDQUNJLG1CRCtCSixDQzVCQSxrQkFDSSxLQUNJLFNEOEJOLENBQ0YsQ0MzQkEsTUFDSSxpQkFBQSxDQUNBLG9CQUFBLENBQ0EsZUFBQSxDQUNBLGtCQUFBLENBRUEsa0NBQUEsQ0FDQSx1QkFBQSxDQUNBLHVCQUFBLENBQ0EsdUJBQUEsQ0FDQSx1QkFBQSxDQUNBLHVCQUFBLENBQ0EsdUJBQUEsQ0FDQSx1QkFBQSxDQUNBLHVCQUFBLENBQ0EsdUJBQUEsQ0FDQSx3QkFBQSxDQUNBLGtJQUFBLENBU0EsOEVBQUEsQ0FLQSw4RURnQkosQ0MvQ0EsbUJBc0NRLGlCQUFBLENBQ0EsVUFBQSxDQUNBLFdBQUEsQ0FDQSxZQUFBLENBQ0EsdUJEWVIsQ0N0REEsY0E2Q1EsWURZUixDQ1RRLHNCQUNJLGNEV1osQ0M1REEscUJBcURRLFlBQUEsQ0FDQSxVQUFBLENBQ0EsY0FBQSxDQUNBLGVBQUEsQ0FDQSxVQUFBLENBQ0Esa0REVVIsQ0NUUSw0QkFDSSw0QkFBQSxDQUNBLHFDRFdaLENDeEVBLDZCQWlFUSxZQUFBLENBQ0EsZ0JBQUEsQ0FDQSxjQUFBLENBQ0EsY0RVUixDQzlFQSwrQkF1RVEsY0RVUixDQ2pGQSxRQTBFUSxxQkFBQSxDQUNBLHNCRFVSLENDckZBLFdBOEVRLFlBQUEsQ0FDQSxpQkFBQSxDQUNBLFVBQUEsQ0FDQSxXRFVSLENDM0ZBLHFDQXFGWSxZRFNaLENDOUZBLGFBeUZRLFlEUVIsQ0NqR0EsNkJBNEZRLFdBQUEsQ0FDQSxpQkFBQSxDQUNBLGlDQUFBLENBQ0EsZURRUixDQ3ZHQSxjQWtHUSxZRFFSLENDMUdBOzs7d0JBd0dRLGNEUVIsQ0NoSEEseUJBMkdRLGVEUVIsQ0NuSEEsc0NBOEdRLDhCQUFBLENBQ0Esa0RBQUEsQ0FDQSxtRURRUixDQ3hIQSx3Q0FtSFEsOEJBQUEsQ0FDQSxvRUFBQSxDQUNBLHFFQUFBLENBQ0EsK0JEUVIsQ0NQUSw4Q0FDSSxlQUFBLENBQ0EsU0RTWixDQ2xJQSxpQ0E2SFEsOEJBQUEsQ0FDQSxxQkRRUixDQ3RJQTt3QkFrSVEsZUFBQSxDQUNBLFdBQUEsQ0FDQSxVQUFBLENBQ0Esc0RBQUEsQ0FDQSxrQkFBQSxDQUNBLGlCQUFBLENBQ0EsaUJEUVIsQ0NoSkEsd0NBNElZLHlDQUFBLENBQ0EsdUJET1osQ0NOWSwrQ0FDSSxTQUFBLENBQ0Esa0JBQUEsQ0FDQSxlRFFoQixDQ3pKQSxxRUFzSlEsY0RNUixDQzVKQSxzRUF5SlEsY0RNUixDQy9KQSxtQkE0SlEsWUFBQSxDQUNBLHFCQUFBLENBQ0EsaUJBQUEsQ0FDQSxVQUFBLENBQ0EsYUFBQSxDQUNBLGVETVIsQ0NMUSw0QkFDSSxhQUFBLENBQ0EsYUFBQSxDQUNBLGNET1osQ0M1S0EsMkNBeUtRLFlETVIsQ0MvS0EsNkRBMktZLGFET1osQ0NsTEEsc0ZBK0tRLGNETVIsQ0NyTEEsK0NBa0xRLGFBQUEsQ0FDQSxhQUFBLENBQ0EsY0RNUixDQzFMQSxjQXVMUSxZQUFBLENBQ0EsZUFBQSxDQUNBLHFCQUFBLENBQ0EsTURNUixDQ2hNQSxZQTZMUSxZQUFBLENBQ0EsV0FBQSxDQUNBLGVBQUEsQ0FDQSxrQkFBQSxDQUNBLGVBQUEsQ0FDQSxlQUFBLENBQ0EsZUFBQSxDQUNBLDRERE1SLENDMU1BLGtCQXVNUSxZQUFBLENBQ0EsZUFBQSxDQUNBLHFCQUFBLENBQ0Esd0JETVIsQ0NoTkEsNkJBNk1RLFVBQUEsQ0FDQSx5QkFBQSxDQUNBLDBCRE1SLENDck5BLHFCQWtOUSxrQkRNUixDQ3hOQSw0QkFxTlEsMkJBQUEsQ0FDQSw4QkRNUixDQ0xRLDhDQUNJLDhERE9aLENDTFEsK0NBQ0ksK0RET1osQ0NMUSwrQ0FDSSwyRERPWixDQ0xRLGtEQUNJLGtFRE9aLENDRlEsbURBQ0ksbUVESVosQ0NDUSxrREFDSSxrRURDWixDQ0lRLG1EQUNJLG1FREZaLENDT1Esc0RBQ0ksc0VETFosQ0NVUSx1REFDSSx1RURSWixDQ3ZQQSxpQ0FzUVEsd0JEWlIsQ0MxUEEsd0NBeVFRLFdEWlIsQ0M3UEEsbURBNFFRLFlBQUEsQ0FDQSxvQkRaUixDQ2pRQSxZQWlSUSxrQkFBQSxDQUNBLG9CQUFBLENBQ0EscUJBQUEsQ0FDQSxpQkRiUixDQ3ZRQSxtQkF1UlEsaUJBQUEsQ0FDQSxRQUFBLENBQ0EsT0FBQSxDQUNBLFNBQUEsQ0FDQSxVQUFBLENBQ0EsWURiUixDQy9RQSx5QkErUlEsVUFBQSxDQUNBLFdBQUEsQ0FDQSxZQUFBLENBQ0Esa0JBQUEsQ0FDQSxzQkRiUixDQ3RSQSw0QkFzU1EsZURiUixDQ3pSQSxxQkF5U1EsaUJBQUEsQ0FDQSxLQUFBLENBQ0EsTUFBQSxDQUNBLFNBQUEsQ0FDQSxZQUFBLENBQ0Esa0JBQUEsQ0FDQSxzQkFBQSxDQUNBLGdDRGJSLENDY1EsMkJBQ0ksa0NEWlosQ0N0U0EsY0FzVFEsY0FBQSxDQUNBLGNBQUEsQ0FDQSxrQkRiUixDQzNTQSxTQTJUUSxXQUFBLENBQ0EsUUFBQSxDQUNBLGNEYlIsQ0NoVEEseUJBZ1VRLFlEYlIsQ0NuVEEsYUFtVVEsdUJBQUEsQ0FDQSxvQkFBQSxDQUNBLG1CQUFBLENBQ0EsZUFBQSxDQUNBLDhxQkFBQSxDQVFBLHFCQUFBLENBQ0EsYUFBQSxDQUNBLGlCQUFBLENBQ0EsV0FBQSxDQUNBLDhDQUFBLENBQ0EsY0FBQSxDQUNBLG1CRHBCUixDQ2pVQSxvQkE2VVksa0REVFosQ0NwVUEsWUF3VlEscUJEakJSLENDdlVBLGdCQTJWUSxZQUFBLENBQ0Esa0JBQUEsQ0FDQSxzQkRqQlIsQ0M1VUEsaUJBZ1dRLFlBQUEsQ0FDQSxjQUFBLENBQ0EsMEJBQUEsQ0FDQSxrREFBQSxDQUNBLGdCQUFBLENBQ0EsU0RqQlIsQ0NwVkEsaUNBdVdZLGtCQUFBLENBQ0Esa0RBQUEsQ0FDQSw4QkRoQlosQ0N6VkEsa0JBNldRLGlCQUFBLENBQ0EsYUFBQSxDQUNBLHFERGpCUixDQzlWQSx3QkFrWFEsWURqQlIsQ0NqV0EsOEJBcVhRLGVBQUEsQ0FDQSw4Q0FBQSxDQUNBLGVEakJSLENDdFdBLG9CQTBYUSxXRGpCUixDQ3pXQSx3QkE2WFEsY0FBQSxDQUNBLGFBQUEsQ0FDQSxhQUFBLENBQ0EsV0FBQSxDQUNBLFVBQUEsQ0FDQSxpQkFBQSxDQUNBLGNEakJSLENDa0JRLDhCQUNJLGtDRGhCWixDQ3JYQSxrQkEwWVEsaUJBQUEsQ0FDQSxLQUFBLENBQ0EsT0FBQSxDQUNBLFFBQUEsQ0FDQSxTQUFBLENBQ0EsaUJEbEJSLENDN1hBLDBCQW1aUSxTQUFBLENBQ0EsVURuQlIsQ0NqWUEsc0NBd1pRLGlDRHBCUixDQ3BZQSw0Q0E0WlEsZ0NEckJSLENDdllBLGdDQWdhUSxpQkFBQSxDQUNBLDhCRHRCUixDQzNZQSxpQ0FxYVEsOEJEdkJSIiwiZmlsZSI6InZpZXdlci5sZXNzIn0= */','.psp-text-field{position:relative;background-color:var(--column-drop-container--background,white);border-width:0;border-bottom-width:1px;border-style:solid;border-color:var(--inactive--color,#ccc);display:flex;flex-direction:column;justify-content:flex-end;min-height:24px;transition:border-color 0.3s ease-out}:host(.dragging) .psp-text-field.dropping{border-bottom-width:2px;border-style:solid;border-color:var(--active--color,#1a7da1)}:host(.dragging) .psp-text-field{border-bottom-width:1px;border-style:solid;border-color:var(--active--color,#1a7da1)}.psp-text-field > .psp-text-field__input{border:0px;line-height:20px;vertical-align:bottom;padding-bottom:0px;display:none}.psp-text-field__input + label{width:0px;height:var(--column--height,auto);line-height:17px;box-sizing:border-box;color:var(--inactive--color,#cccccc);font-weight:400;white-space:nowrap;padding:var(--column-drop-container--padding,0px 0px 2px 10px);font-size:12px;display:inline-block;transition:font-size 0.3s,margin 0.3s}.dropping .psp-text-field__input,\n.psp-text-field__input:not(:empty){display:block!important}.dropping .psp-text-field__input::after{content:"|";width:0px;overflow:visible;margin-top:-1px;position:absolute}.dropping *{pointer-events:none}.dropping .psp-text-field label,\n.psp-text-field__input:not(:empty) + label{position:absolute;top:0px;margin:var(--column-drop-label--margin,0);font-size:var(--column-drop-label--font-size,12px);display:var(--column-drop-label--display,none)}.dropping perspective-row.inserting{border-top:25px solid rgba(0,0,0,0)}.dropping perspective-row.postserting{border-bottom:25px solid rgba(0,0,0,0)}:host perspective-row{height:var(--column--height,21px);--row_draggable-height:var(--column--height,21px)}:host([row-pivots]) #active_columns perspective-row{height:var(--active-column--height,41px);min-height:var(--active-column--height,41px);--row_draggable-height:var(--active-column--height,41px);--column_aggregate-display:inline-block;--is_visible--height:var(--active-column-selector--height,auto)}:host{font-family:Arial,sans-serif;background-color:#eee;color:#333}:host #app.columns_horizontal #columns_container{flex-direction:row-reverse}:host #app.columns_horizontal #active_columns,\n:host #app.columns_horizontal #inactive_columns{display:flex;flex-direction:column;width:100%}:host #app.columns_horizontal #active_columns{flex:0 1 50%}:host #app.columns_horizontal #sub_columns{flex-shrink:1}:host #app.columns_horizontal #sub_columns perspective-row{--column_name-margin:0 25px 0 0}:host #app.columns_horizontal #side_panel #divider{display:none}:host #app.columns_horizontal perspective-computed-expression-widget{max-height:none;margin-right:24px;width:auto}:host #side_panel perspective-row{--name-before-display:inline-block;--is_visible-display:inline-block;--row_draggable-padding:0px 10px 0px 0px;--row_close-display:none;--column_name-max-width:180px}:host #top_panel perspective-row{--row_draggable-display:inline-flex;--row-draggable--flex-direction:row;--row-draggable--align-items:center}:host #columns_container{flex-direction:column;height:calc(100% - 29px)}:host #columns_container #active_columns{flex:0 1 auto}:host #columns_container #active_columns perspective-row{margin-bottom:2px;--row_draggable-background-color:var(--column--background,white);--row_draggable-border-color:var(--inactive--color,#ccc);--row_draggable-border-width:0 0 1px 0;--row_draggable-overflow:hidden;--row_draggable--justify-content:space-evenly}:host #columns_container #active_columns perspective-row:last-child{--row_draggable-border-color:var(--row_draggable-last-child-border-color,var(--inactive--color,#ccc))}:host #columns_container #active_columns perspective-row[drop-target]{--row_draggable_children-opacity:0}:host #columns_container #active_columns perspective-row.null-column{--row_draggable_children-opacity:0;pointer-events:none}:host #columns_container #active_columns.one_lock perspective-row:first-child,\n:host #columns_container #active_columns.two_lock perspective-row:first-child{--active--color:#ccc;--is_visible--cursor:normal}:host #columns_container #active_columns.two_lock perspective-row:nth-child(2){--active--color:#ccc;--is_visible--cursor:normal}:host #columns_container #active_columns perspective-row:only-child{--active--color:#ccc;--is_visible--cursor:normal}:host #columns_container #inactive_columns perspective-row:not(.active){--row_draggable-border-width:0 0 1px 0;margin-bottom:2px;--row_draggable-border-color:transparent}:host #columns_container #active_columns,\n:host #columns_container #inactive_columns{border:none!important}:host ul{transition:background-color 0.2s,border-color 0.2s;outline:none}:host #side_panel #side_panel__actions{display:flex;flex-direction:column;flex-shrink:1000;justify-content:flex-start;position:relative;overflow-y:hidden;width:100%;margin:var(--column-container--margin,8px);min-height:36px}:host #side_panel #side_panel__actions button.side_panel-action{align-items:center;align-content:center;background:none;border:none;display:flex;flex-direction:row;font-size:12px;padding-right:10px;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host #side_panel #side_panel__actions button.side_panel-action span{margin-left:5px;font-size:15px}:host #side_panel #side_panel__actions button.side_panel-action:hover{cursor:pointer}:host .noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host #pivot_chart{background-color:var(--plugin--background,white)}:host #drop_target{border:var(--plugin--border,none)}:host #pivot_chart_container{box-shadow:var(--plugin--box-shadow,none)}:host #filters perspective-row{margin:0 0px 0 0;--filter_operator-display:inline-block;--filter_operand-display:inline-block}:host .plugin_information{color:var(--warning--color,inherit);display:flex;position:absolute;flex-direction:row;justify-content:flex-start;padding:0.5rem;width:100%;z-index:10000;transition:opacity 0.3s ease-out;opacity:1}:host .plugin_information.hidden{display:none;opacity:0}:host .plugin_information.plugin_information--warning{background:#ffca28}:host .plugin_information .plugin_information__text{font-size:12px;margin-right:0.25rem;display:flex;flex-wrap:wrap;align-items:center}:host .plugin_information .plugin_information__text:before{content:var(--overflow_hint--before);font-family:var(--overflow_hint--font-family);color:var(--overflow_hint--color);padding:var(--overflow_hint--padding);font-size:16px}:host .plugin_information .plugin_information__action{font-size:12px;text-decoration:underline;cursor:pointer;margin-right:0.25rem}:host .plugin_information .plugin_information__actions{margin-left:auto;display:flex;align-items:center;flex-direction:row;justify-content:flex-start}:host .plugin_information .plugin_information--overflow-hint-percent{font-weight:700}:host .plugin_information .plugin_information--overflow-hint{white-space:nowrap}:host #drop_target{background:var(--plugin--background,#fff)}:host #drop_target_inner h3{color:#aaa;font-weight:300}:host #config_button,\n:host #reset_button,\n:host #download_button,\n:host #copy_button{font-weight:normal;font-family:var(--button--font-family,Arial);color:var(--inactive--color,#999);font-size:var(--button--font-size,16px);transition:opacity 0.3s;overflow:hidden}:host #config_button:hover,\n:host #reset_button:hover,\n:host #download_button:hover,\n:host #copy_button:hover{color:var(--active--color,inherit)}:host #config_button:before{font-feature-settings:"liga";content:var(--settings-button--content,"\\1f527")}:host #reset_button:before{font-feature-settings:"liga";content:var(--reset_button--before,"Reset")}:host #close_button:before{font-family:var(--button--font-family,Arial);font-feature-settings:"liga";content:var(--close_button--before,"Close")}:host #download_button:before{font-feature-settings:"liga";content:var(--download_button--before,"Save")}:host #copy_button:before{font-feature-settings:"liga";content:var(--copy_button--before,"Copy")}:host #menubar{display:none;flex-direction:column;padding-top:55px}:host #app.show_menu #menubar{display:flex}:host ul{border-bottom-width:1px;border-style:solid;border-color:var(--inactive--color,#ccc);border-top-width:0px;border-left-width:0px;border-right-width:0px;font-size:12px;padding:var(--column-drop-container--padding,0px 10px 0px 10px)}:host select{border-radius:0;background-color:var(--select--background-color,white);border-bottom-width:1px;border-style:solid;border-color:var(--inactive--color,#ccc);border-top-width:0px;border-left-width:0px;border-right-width:0px}:host select:focus{outline:none}:host input{border-bottom-width:1px;border-style:solid;border-color:var(--inactive--color,#ccc);border-top-width:0px;border-left-width:0px;border-right-width:0px}:host input::placeholder{color:var(--inactive--color,#ccc)}:host option[value=""]{color:white!important}:host #app{background-color:inherit}:host ::-webkit-scrollbar,\n:host ::shadow ::-webkit-scrollbar{width:12px}:host ::-webkit-scrollbar-thumb,\n:host ::shadow ::-webkit-scrollbar-thumb{background:#ccc}:host ::-webkit-scrollbar-track,\n:host ::shadow ::-webkit-scrollbar-track{background:none}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9sZXNzL2RlZmF1bHQubGVzcyIsImRlZmF1bHQubGVzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXQSxnQkFDSSxpQkFBQSxDQUNBLCtEQUFBLENBQ0EsY0FBQSxDQUNBLHVCQUFBLENBQ0Esa0JBQUEsQ0FDQSx3Q0FBQSxDQUNBLFlBQUEsQ0FDQSxxQkFBQSxDQUNBLHdCQUFBLENBQ0EsZUFBQSxDQUNBLHFDQ01KLENESEEsMENBQ0ksdUJBQUEsQ0FDQSxrQkFBQSxDQUNBLHlDQ0tKLENERkEsaUNBQ0ksdUJBQUEsQ0FDQSxrQkFBQSxDQUNBLHlDQ0lKLENEREEseUNBQ0ksVUFBQSxDQUNBLGdCQUFBLENBQ0EscUJBQUEsQ0FDQSxrQkFBQSxDQUNBLFlDR0osQ0RBQSwrQkFDSSxTQUFBLENBQ0EsaUNBQUEsQ0FDQSxnQkFBQSxDQUNBLHFCQUFBLENBQ0Esb0NBQUEsQ0FDQSxlQUFBLENBQ0Esa0JBQUEsQ0FDQSw4REFBQSxDQUNBLGNBQUEsQ0FDQSxvQkFBQSxDQUNBLHFDQ0VKLENEQ0E7bUNBRUksdUJDQ0osQ0RFQSx3Q0FDSSxXQUFBLENBQ0EsU0FBQSxDQUNBLGdCQUFBLENBQ0EsZUFBQSxDQUNBLGlCQ0FKLENER0EsWUFDSSxtQkNESixDRElBOzJDQUVJLGlCQUFBLENBQ0EsT0FBQSxDQUNBLHlDQUFBLENBQ0Esa0RBQUEsQ0FDQSw4Q0NGSixDRG1CQSxvQ0FDSSxtQ0NqQkosQ0RvQkEsc0NBQ0ksc0NDbEJKLENEc0JBLHNCQUNJLGlDQUFBLENBQ0EsaURDbkJKLENEc0JBLG9EQUVRLHdDQUFBLENBQ0EsNENBQUEsQ0FDQSx3REFBQSxDQUNBLHVDQUFBLENBQ0EsK0RDckJSLENEeUJBLE1BQ0ksNEJBQUEsQ0FDQSxxQkFBQSxDQUNBLFVDdkJKLENEb0JBLGlEQU9ZLDBCQ3hCWixDRGlCQTtnREFZWSxZQUFBLENBQ0EscUJBQUEsQ0FDQSxVQ3pCWixDRFdBLDhDQWtCWSxZQzFCWixDRFFBLDJDQXNCWSxhQzFCWixDRElBLDJEQTBCZ0IsK0JDM0JoQixDRENBLG1EQStCWSxZQzdCWixDREZBLHFFQW1DWSxlQUFBLENBQ0EsaUJBQUEsQ0FDQSxVQzlCWixDRFBBLGtDQTBDUSxrQ0FBQSxDQUNBLGlDQUFBLENBQ0Esd0NBQUEsQ0FDQSx3QkFBQSxDQUNBLDZCQ2hDUixDRGRBLGlDQWtEUSxtQ0FBQSxDQUNBLG1DQUFBLENBQ0EsbUNDakNSLENEbkJBLHlCQXdEUSxxQkFBQSxDQUNBLHdCQ2xDUixDRHZCQSx5Q0E0RFksYUNsQ1osQ0QxQkEseURBK0RnQixpQkFBQSxDQUNBLGdFQUFBLENBSUEsd0RBQUEsQ0FDQSxzQ0FBQSxDQUNBLCtCQUFBLENBQ0EsNkNDckNoQixDRGxDQSxvRUEyRWdCLHFHQ3RDaEIsQ0RyQ0Esc0VBK0VnQixrQ0N2Q2hCLENEeENBLHFFQW1GZ0Isa0NBQUEsQ0FDQSxtQkN4Q2hCLENEMkNZOzhFQUdRLG9CQUFBLENBQ0EsMkJDMUNwQixDRDhDWSwrRUFFUSxvQkFBQSxDQUNBLDJCQzdDcEIsQ0RyREEsb0VBdUdnQixvQkFBQSxDQUNBLDJCQy9DaEIsQ0R6REEsd0VBNkdZLHNDQUFBLENBQ0EsaUJBQUEsQ0FDQSx3Q0NqRFosQ0Q5REE7MkNBb0hZLHFCQ2xEWixDRGxFQSxTQXlIUSxrREFBQSxDQUNBLFlDcERSLENEdEVBLHVDQWtJUSxZQUFBLENBQ0EscUJBQUEsQ0FDQSxnQkFBQSxDQUNBLDBCQUFBLENBQ0EsaUJBQUEsQ0FDQSxpQkFBQSxDQUNBLFVBQUEsQ0FDQSwwQ0FBQSxDQUNBLGVDekRSLENEakZBLGdFQTZJWSxrQkFBQSxDQUNBLG9CQUFBLENBQ0EsZUFBQSxDQUNBLFdBQUEsQ0FDQSxZQUFBLENBQ0Esa0JBQUEsQ0FLQSxjQUFBLENBQ0Esa0JBQUEsQ0FDQSx1QkFBQSxDQUNBLG9CQUFBLENBQ0EsZUM3RFosQ0Q5RkEscUVBOEpnQixlQUFBLENBQ0EsY0M3RGhCLENEZ0VZLHNFQUNJLGNDOURoQixDRHJHQSxnQkF5S1EsMEJBQUEsQ0FFQSx3QkFBQSxDQUVBLHVCQUFBLENBRUEscUJBQUEsQ0FFQSxvQkFBQSxDQUVBLGdCQ2hFUixDRG5IQSxtQkF3TFEsZ0RDbEVSLENEdEhBLG1CQTRMUSxpQ0NuRVIsQ0R6SEEsNkJBZ01RLHlDQ3BFUixDRDVIQSwrQkFvTVEsZ0JBQUEsQ0FDQSxzQ0FBQSxDQUNBLHFDQ3JFUixDRGpJQSwwQkEwTVEsbUNBQUEsQ0FDQSxZQUFBLENBQ0EsaUJBQUEsQ0FDQSxrQkFBQSxDQUNBLDBCQUFBLENBQ0EsY0FBQSxDQUNBLFVBQUEsQ0FDQSxhQUFBLENBQ0EsZ0NBQUEsQ0FDQSxTQ3RFUixDRHdFUSxpQ0FDSSxZQUFBLENBQ0EsU0N0RVosQ0R5RVEsc0RBQ0ksa0JDdkVaLENEcEpBLG9EQStOWSxjQUFBLENBQ0Esb0JBQUEsQ0FDQSxZQUFBLENBQ0EsY0FBQSxDQUNBLGtCQ3hFWixDRDNKQSwyREF1T1ksb0NBQUEsQ0FDQSw2Q0FBQSxDQUNBLGlDQUFBLENBQ0EscUNBQUEsQ0FDQSxjQ3pFWixDRGxLQSxzREErT1ksY0FBQSxDQUNBLHlCQUFBLENBQ0EsY0FBQSxDQUNBLG9CQzFFWixDRHhLQSx1REFzUFksZ0JBQUEsQ0FDQSxZQUFBLENBQ0Esa0JBQUEsQ0FDQSxrQkFBQSxDQUNBLDBCQzNFWixDRC9LQSxxRUE4UFksZUM1RVosQ0RsTEEsNkRBa1FZLGtCQzdFWixDRHJMQSxtQkF1UVEseUNDL0VSLENEeExBLDRCQTJRUSxVQUFBLENBQ0EsZUNoRlIsQ0Q1TEE7OzttQkFtUlEsa0JBQUEsQ0FDQSw0Q0FBQSxDQUNBLGlDQUFBLENBQ0EsdUNBQUEsQ0FDQSx1QkFBQSxDQUNBLGVDakZSLENEbUZROzs7eUJBQ0ksa0NDOUVaLENEN01BLDRCQWdTUSw0QkFBQSxDQUNBLGdEQ2hGUixDRGpOQSwyQkFxU1EsNEJBQUEsQ0FDQSwyQ0NqRlIsQ0RyTkEsMkJBMFNRLDRDQUFBLENBQ0EsNEJBQUEsQ0FDQSwyQ0NsRlIsQ0QxTkEsOEJBZ1RRLDRCQUFBLENBQ0EsNkNDbkZSLENEOU5BLDBCQXFUUSw0QkFBQSxDQUNBLHlDQ3BGUixDRGxPQSxlQTBUUSxZQUFBLENBQ0EscUJBQUEsQ0FDQSxnQkNyRlIsQ0R2T0EsOEJBZ1VRLFlDdEZSLENEMU9BLFNBaENJLHVCQUFBLENBQ0Esa0JBQUEsQ0FDQSx3Q0FBQSxDQUNBLG9CQUFBLENBQ0EscUJBQUEsQ0FDQSxzQkFBQSxDQWdXSSxjQUFBLENBQ0EsK0RDbEZSLENEcFBBLGFBMFVRLGVBQUEsQ0FDQSxzREFBQSxDQTNXSix1QkFBQSxDQUNBLGtCQUFBLENBQ0Esd0NBQUEsQ0FDQSxvQkFBQSxDQUNBLHFCQUFBLENBQ0Esc0JDeVJKLENEOVBBLG1CQWdWUSxZQy9FUixDRGpRQSxZQWhDSSx1QkFBQSxDQUNBLGtCQUFBLENBQ0Esd0NBQUEsQ0FDQSxvQkFBQSxDQUNBLHFCQUFBLENBQ0Esc0JDb1NKLENEelFBLHlCQXdWUSxpQ0M1RVIsQ0Q1UUEsdUJBNFZRLHFCQzdFUixDRC9RQSxXQWdXUSx3QkM5RVIsQ0RsUkE7bUNBcVdRLFVDL0VSLENEdFJBO3lDQTBXUSxlQ2hGUixDRDFSQTt5Q0ErV1EsZUNqRlIiLCJmaWxlIjoiZGVmYXVsdC5sZXNzIn0= */')((ct((An=class extends Cn{constructor(){super(),this._register_debounce_instance(),this._show_config=!0,this._show_warnings=!0,this.__render_times=[],this._resize_handler=this.notifyResize.bind(this),this._computed_expression_parser=en,this._edit_port=null,this._edit_port_lock=Bt(),window.addEventListener("resize",this._resize_handler)}connectedCallback(){0===Object.keys(jt.getInstance()).length&&n.g.registerPlugin("debug",{name:"Debug",create:async function(t){const e=await this._view.to_csv({config:{delimiter:"|"}}),n=this._render_time();F((t=>P`
39 <pre style="margin:0;overflow:scroll;position:absolute;width:100%;height:100%">${t}</pre>
40 `)(e),t),n()},selectMode:"toggle",resize:function(){},delete:function(){}}),this.toggleAttribute("settings",!0),this._register_ids(),this._register_callbacks(),this._register_view_options(),this.toggleConfig(),this._check_loaded_table()}sort(t){null!=t&&0!==t.length||(this.hasAttribute("sort")&&this.removeAttribute("sort"),t=[]);var e=this._sort.querySelector("ul");this._update_column_list(t,e,((t,e)=>{let n,r="asc";return Array.isArray(t)&&(r=t[1],t=t[0]),e.includes(t)&&(n=t),this._new_row(t,!1,!1,!1,r,n)}),((t,e)=>Array.isArray(t)?e.getAttribute("name")===t[0]&&e.getAttribute("sort-order")===t[1]:e.getAttribute("name")===t)),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}columns(t){null!=t&&0!==t.length||(this.hasAttribute("columns")&&(this._initial_col_order?this.setAttribute("columns",JSON.stringify(this._initial_col_order)):this.removeAttribute("columns")),t=(this._initial_col_order||[]).slice()),this._update_column_view(t,!0),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}"computed-columns"(t){const e=this._set_updating();(async()=>{if("none"!==this._computed_expression_widget.style.display&&this._computed_expression_widget._close_expression_widget(),null==t||0===t.length){if(this.hasAttribute("computed-columns")){this.removeAttribute("computed-columns");const t=this._get_view_parsed_computed_columns();return this._reset_computed_column_view(t),this.removeAttribute("parsed-computed-columns"),void e()}t=[]}let n=[];for(const e of t)"string"==typeof e?this._computed_expression_parser.is_initialized&&(n=n.concat(this._computed_expression_parser.parse(e))):n.push(e);let r={};if(this._table){r=await this._table.computed_schema(n);const t=await this._validate_parsed_computed_columns(n,r);if(t.length!==n.length){const e=[];for(let r=0;r<n.length;r++)(r>t.length-1||n[r].column!==t[r].column)&&e.push(n[r]);console.warn("Could not apply these computed columns:",JSON.stringify(e))}n=t}const i=this._get_view_parsed_computed_columns(),o=this._diff_computed_column_view(i,n);this._reset_computed_column_view(o),this.setAttribute("parsed-computed-columns",JSON.stringify(n)),this._update_computed_column_view(r),this.dispatchEvent(new Event("perspective-config-update")),await this._debounce_update(),e()})()}aggregates(t){null!=t&&0!==Object.keys(t).length||(this.hasAttribute("aggregates")&&this.removeAttribute("aggregates"),t={}),this._get_view_dom_columns().map((e=>{let n=t[e.getAttribute("name")];n&&e.setAttribute("aggregate",Array.isArray(n)?JSON.stringify(n):n)})),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}filters(t){if(null!=t&&0!==t.length||(this.hasAttribute("filters")&&this.removeAttribute("filters"),t=[]),!this._updating_filter){var e=this._filters.querySelector("ul");this._update_column_list(t,e,((t,e)=>{const n=JSON.stringify({operator:t[1],operand:t[2]}),r=t[0];let i;return e.includes(r)&&(i=r),this._new_row(r,void 0,void 0,n,void 0,i)}),((t,e)=>e.getAttribute("name")===t[0]&&e.getAttribute("filter")===JSON.stringify({operator:t[1],operand:t[2]})))}this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}set plugin(t){if("null"===t||null==t)return void this.setAttribute("plugin",this._vis_selector.options[0].value);this.innerHTML="";const e=Object.keys(jt.getInstance());if(this.hasAttribute("plugin")){let t=this.getAttribute("plugin");if(-1===e.indexOf(t)){const n=e.find((e=>e.indexOf(t)>-1));n?(console.warn(`Unknown plugin "${t}", using "${n}"`),this.setAttribute("plugin",n)):(console.error(`Unknown plugin "${t}"`),this.setAttribute("plugin",this._vis_selector.options[0].value))}else this._vis_selector.value!==t&&(this._vis_selector.value=t,this._vis_selector_changed()),this._set_row_styles(),this._set_column_defaults(),this.dispatchEvent(new Event("perspective-config-update"))}else this.setAttribute("plugin",this._vis_selector.options[0].value)}"column-pivots"(t){null!=t&&0!==t.length||(this.hasAttribute("column-pivots")&&this.removeAttribute("column-pivots"),t=[]);const e=this._column_pivots.querySelector("ul");this._update_column_list(t,e,((t,e)=>{let n;return e.includes(t)&&(n=t),this._new_row(t,void 0,void 0,void 0,void 0,n)})),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}"row-pivots"(t){null!=t&&0!==t.length||(this.hasAttribute("row-pivots")&&this.removeAttribute("row-pivots"),t=[]);const e=this._row_pivots.querySelector("ul");this._update_column_list(t,e,((t,e)=>{let n;return e.includes(t)&&(n=t),this._new_row(t,void 0,void 0,void 0,void 0,n)})),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}set editable(t){"null"===t?this.hasAttribute("editable")&&this.removeAttribute("editable"):this.toggleAttribute("editable",!0),this._debounce_update({force_update:!0}),this.dispatchEvent(new Event("perspective-config-update"))}set throttle(t){"null"===t&&this.hasAttribute("throttle")&&this.removeAttribute("throttle"),this._calculate_throttle_timeout()}set selectable(t){"null"===t?this.hasAttribute("selectable")&&this.removeAttribute("selectable"):this.toggleAttribute("selectable",!0),this._debounce_update({force_update:!0}),this.dispatchEvent(new Event("perspective-config-update"))}get table(){return this._table}get view(){return this._view}async load(t){let e;if(t instanceof Promise)e=await t;else{try{t=t.trim()}catch(t){}if("table"!==t.type)throw new Error(`Unrecognized input type ${typeof t}. Please use a \`perspective.Table()\``);e=t}this.isConnected?await this._load_table(e):this._table=e}async notifyResize(t){await this._check_responsive_layout()||document.hidden||!this.offsetParent||await this._plugin.resize.call(this,t)}clone(t){this._inner_drop_target&&(this._inner_drop_target.innerHTML=t._inner_drop_target.innerHTML),this._load_table(t.table),this.restore(t.save())}delete(){let t=this._clear_state();return this._plugin.delete&&this._plugin.delete.call(this),window.removeEventListener("resize",this._resize_handler),t}restyleElement(){this._restyle_plugin()}save(){let t={};const e=new Set(Un);for(let n=0;n<this.attributes.length;n++){let r=this.attributes[n];e.has(r.name)&&(""===r.value?t[r.name]=!0:"plugin"!==r.name&&void 0!==r.value&&null!==r.value?t[r.name]=JSON.parse(r.value):t[r.name]=r.value,e.delete(r.name))}for(const n of e)t[n]=null;return this._plugin.save&&(t.plugin_config=this._plugin.save.call(this)),t}async restore(t){"string"==typeof t&&(t=JSON.parse(t));for(const e of Un)if(t.hasOwnProperty(e)){let n=t[e];!0===n?this.toggleAttribute(e,!0):null!=n&&!1!==n?("string"!=typeof n&&(n=JSON.stringify(n)),this.setAttribute(e,n)):this.removeAttribute(e)}this._plugin.restore&&t.plugin_config&&this._plugin.restore.call(this,t.plugin_config),await this._debounce_update()}async flush(){for(await new Promise(setTimeout);this.hasAttribute("updating");)await this._updating_promise}reset(){this.removeAttribute("row-pivots"),this.removeAttribute("column-pivots"),this.removeAttribute("filters"),this.removeAttribute("sort"),this._initial_col_order?this.setAttribute("columns",JSON.stringify(this._initial_col_order)):this.removeAttribute("columns"),this.setAttribute("plugin",Object.keys(jt.getInstance())[0]),this.dispatchEvent(new Event("perspective-config-update")),this._hide_context_menu()}async download(t=!1){const e=t?this._table.view():this._view,n=await e.to_csv({formatted:!0}),r=document.createElement("a"),i=n,o=i.length,s=new Uint8Array(o);for(let t=0;t<o;t++)s[t]=i.charCodeAt(t);const a=new Blob([s]);r.setAttribute("href",window.URL.createObjectURL(a)),r.setAttribute("download","perspective.csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),this._hide_context_menu()}copy(t=!1){let e;(t?this._table.view():this._view).to_csv({formatted:!0}).then((t=>{e=t})).catch((t=>{console.error(t),e=""}));let n=0,r=()=>{void 0!==e?function(t){let e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}(e):n<200?(n++,setTimeout(r,50)):console.warn("Timeout expired - copy to clipboard cancelled.")};r(),this._hide_context_menu()}async toggleConfig(){await this._toggle_config()}async getEditPort(){return this._edit_port_lock}}).prototype,"sort",[Pt],Object.getOwnPropertyDescriptor(An.prototype,"sort"),An.prototype),ct(An.prototype,"columns",[Pt],Object.getOwnPropertyDescriptor(An.prototype,"columns"),An.prototype),ct(An.prototype,"computed-columns",[Pt],Object.getOwnPropertyDescriptor(An.prototype,"computed-columns"),An.prototype),ct(An.prototype,"aggregates",[Ft],Object.getOwnPropertyDescriptor(An.prototype,"aggregates"),An.prototype),ct(An.prototype,"filters",[Pt],Object.getOwnPropertyDescriptor(An.prototype,"filters"),An.prototype),ct(An.prototype,"column-pivots",[Pt],Object.getOwnPropertyDescriptor(An.prototype,"column-pivots"),An.prototype),ct(An.prototype,"row-pivots",[Pt],Object.getOwnPropertyDescriptor(An.prototype,"row-pivots"),An.prototype),ct(An.prototype,"notifyResize",[Dt],Object.getOwnPropertyDescriptor(An.prototype,"notifyResize"),An.prototype),An))},2073:(t,e,n)=>{const r=n(4907).Z;function i(t){return t&&"object"==typeof t&&!Array.isArray(t)}function o(t,...e){if(!e.length)return t;const n=e.shift();if(i(t)&&i(n))for(const e in n)i(n[e])?(t[e]||Object.assign(t,{[e]:{}}),o(t[e],n[e])):Object.assign(t,{[e]:n[e]});return o(t,...e)}t.exports.get_types=function(){return Object.keys(t.exports.get_config().types)},t.exports.get_type_config=function(e){const n={};if(t.exports.get_config().types[e]&&Object.assign(n,t.exports.get_config().types[e]),n.type){const e=t.exports.get_type_config(n.type);return Object.assign(e,n),e}return n},n.g.__PERSPECTIVE_CONFIG__=void 0,t.exports.override_config=function(t){n.g.__PERSPECTIVE_CONFIG__&&console.warn("Config already initialized!"),n.g.__PERSPECTIVE_CONFIG__=o(r,t)},t.exports.get_config=function(){return n.g.__PERSPECTIVE_CONFIG__||(n.g.__PERSPECTIVE_CONFIG__=o(r,n.g.__TEMPLATE_CONFIG__||{})),n.g.__PERSPECTIVE_CONFIG__}},4907:t=>{t.exports.Z={types:{float:{filter_operator:"==",aggregate:"sum",format:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}},string:{filter_operator:"==",aggregate:"count"},integer:{filter_operator:"==",aggregate:"sum",format:{}},boolean:{filter_operator:"==",aggregate:"count"},datetime:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},null_value:-1},date:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric"},null_value:-1}}}}},e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(2489)})()}));
41//# sourceMappingURL=perspective-viewer.js.map
\No newline at end of file