reneco-hierarchized-picker 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-ef964604.js";function applyPickerTheme(e,t){var r;var n=document.documentElement.style;n.setProperty("--hpicker-theme-palette-primary-main",(e===null||e===void 0?void 0:e.palette.primary.main)||t.palette.primary.main);n.setProperty("--hpicker-theme-palette-primary-light",(e===null||e===void 0?void 0:e.palette.primary.light)||t.palette.primary.light);n.setProperty("--hpicker-theme-palette-primary-contrastText",(e===null||e===void 0?void 0:e.palette.primary.contrastText)||t.palette.primary.contrastText);n.setProperty("--hpicker-theme-palette-background-default",(e===null||e===void 0?void 0:e.palette.background.default)||t.palette.background.default);n.setProperty("--hpicker-theme-palette-background-light",(e===null||e===void 0?void 0:e.palette.background.light)||t.palette.background.light);n.setProperty("--hpicker-theme-palette-background-dark",(e===null||e===void 0?void 0:e.palette.background.dark)||t.palette.background.dark);n.setProperty("--hpicker-theme-palette-font-color",(e===null||e===void 0?void 0:e.palette.text.primary)||t.palette.text.primary);n.setProperty("--hpicker-theme-palette-input-background-color",(e===null||e===void 0?void 0:e.palette.input.background)||t.palette.input.background);n.setProperty("--hpicker-theme-palette-input-border-style",(e===null||e===void 0?void 0:e.palette.input.borderStyle)||t.palette.input.borderStyle);n.setProperty("--hpicker-theme-typography-body-font-size",(e===null||e===void 0?void 0:e.typography.body.fontSize)||t.typography.body.fontSize);n.setProperty("--hpicker-theme-typography-body-font-weight",(e===null||e===void 0?void 0:e.typography.body.fontWeight)||t.typography.body.fontWeight);n.setProperty("--hpicker-theme-modal-height",((r=e===null||e===void 0?void 0:e.modale)===null||r===void 0?void 0:r.height)||t.modale.height)}var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function createCommonjsModule(e,t,r){return r={path:t,exports:{},require:function(e,t){return commonjsRequire()}},e(r,r.exports),r.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var vanillaContextMenu=createCommonjsModule((function(e,t){
2
2
  /*! For license information please see vanilla-context-menu.js.LICENSE.txt */
3
- !function(t,r){e.exports=r()}(commonjsGlobal,(function(){return function(){var e={550:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(81),i=r.n(n),o=r(645),a=r.n(o)()(i());a.push([e.id,'.PJsSKU2kCXjeIsVSdFoI{font-family:"Open Sans",sans-serif;position:fixed;z-index:10000;width:150px;transform:scale(0);transition-property:transform;transition-timing-function:ease-in-out}.novl09c_yWe4MBqKpWyN{background:#1b1a1a}.novl09c_yWe4MBqKpWyN hr{background-color:#555}.novl09c_yWe4MBqKpWyN>*:not(hr){color:#eee}.novl09c_yWe4MBqKpWyN>*:not(hr):hover{background:#555}.F5LtzLqHVYZuI1H_SR9q{background:#fff}.F5LtzLqHVYZuI1H_SR9q hr{background-color:#e4e4e4}.F5LtzLqHVYZuI1H_SR9q>*:not(hr){color:#262626}.F5LtzLqHVYZuI1H_SR9q>*:not(hr):hover{background:#e4e4e4}.PJsSKU2kCXjeIsVSdFoI.ibAEWR3dINCWDsWq1G2P{transform:scale(1)}.PJsSKU2kCXjeIsVSdFoI hr{margin:2px 0;height:1px;border:0}.PJsSKU2kCXjeIsVSdFoI>*:not(hr){padding:8px 10px;font-size:15px;cursor:pointer;display:flex;align-items:center;gap:5px}.PJsSKU2kCXjeIsVSdFoI .gfl6YXq1tuGnYKHXwDHP{display:flex;align-items:center;justify-content:center}.PJsSKU2kCXjeIsVSdFoI .gfl6YXq1tuGnYKHXwDHP>*{margin:0;padding:0;font-size:16px}.PJsSKU2kCXjeIsVSdFoI .QkRci5U3hKz5RODdOkco{line-height:21px;font-size:26px;position:relative;margin-left:auto}',""]),a.locals={"context-menu":"PJsSKU2kCXjeIsVSdFoI","context-menu--black-theme":"novl09c_yWe4MBqKpWyN","context-menu--white-theme":"F5LtzLqHVYZuI1H_SR9q",visible:"ibAEWR3dINCWDsWq1G2P","menu-item-icon":"gfl6YXq1tuGnYKHXwDHP","nested-menu-arrow":"QkRci5U3hKz5RODdOkco"};var s=a},645:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);n&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},81:function(e){e.exports=function(e){return e[1]}},856:function(e){e.exports=function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,r){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,r)}function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function n(e,i,o){return n=r()?Reflect.construct:function(e,r,n){var i=[null];i.push.apply(i,r);var o=new(Function.bind.apply(e,i));return n&&t(o,n.prototype),o},n.apply(null,arguments)}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=Object.hasOwnProperty,s=Object.setPrototypeOf,u=Object.isFrozen,l=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor,f=Object.freeze,p=Object.seal,h=Object.create,d="undefined"!=typeof Reflect&&Reflect,v=d.apply,g=d.construct;v||(v=function(e,t,r){return e.apply(t,r)}),f||(f=function(e){return e}),p||(p=function(e){return e}),g||(g=function(e,t){return n(e,i(t))});var m,y=j(Array.prototype.forEach),b=j(Array.prototype.pop),_=j(Array.prototype.push),w=j(String.prototype.toLowerCase),k=j(String.prototype.match),x=j(String.prototype.replace),O=j(String.prototype.indexOf),T=j(String.prototype.trim),I=j(RegExp.prototype.test),D=(m=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return g(m,t)});function j(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return v(e,t,n)}}function M(e,t,r){r=r||w,s&&s(e,null);for(var n=t.length;n--;){var i=t[n];if("string"==typeof i){var o=r(i);o!==i&&(u(t)||(t[n]=o),i=o)}e[i]=!0}return e}function N(e){var t,r=h(null);for(t in e)v(a,e,[t])&&(r[t]=e[t]);return r}function E(e,t){for(;null!==e;){var r=c(e,t);if(r){if(r.get)return j(r.get);if("function"==typeof r.value)return j(r.value)}e=l(e)}return function(e){return console.warn("fallback value for",e),null}}var A=f(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),S=f(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C=f(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),z=f(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=f(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),F=f(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=f(["#text"]),P=f(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),B=f(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=f(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=f(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=p(/\{\{[\w\W]*|[\w\W]*\}\}/gm),U=p(/<%[\w\W]*|[\w\W]*%>/gm),H=p(/^data-[\-\w.\u00B7-\uFFFF]/),J=p(/^aria-[\-\w]+$/),G=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=p(/^(?:\w+script|data):/i),$=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=p(/^html$/i),X=function(){return"undefined"==typeof window?null:window},Z=function(t,r){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var n=null,i="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(i)&&(n=r.currentScript.getAttribute(i));var o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X(),n=function(e){return t(e)};if(n.version="2.4.0",n.removed=[],!r||!r.document||9!==r.document.nodeType)return n.isSupported=!1,n;var o=r.document,a=r.document,s=r.DocumentFragment,u=r.HTMLTemplateElement,l=r.Node,c=r.Element,p=r.NodeFilter,h=r.NamedNodeMap,d=void 0===h?r.NamedNodeMap||r.MozNamedAttrMap:h,v=r.HTMLFormElement,g=r.DOMParser,m=r.trustedTypes,j=c.prototype,Q=E(j,"cloneNode"),ee=E(j,"nextSibling"),te=E(j,"childNodes"),re=E(j,"parentNode");if("function"==typeof u){var ne=a.createElement("template");ne.content&&ne.content.ownerDocument&&(a=ne.content.ownerDocument)}var ie=Z(m,o),oe=ie?ie.createHTML(""):"",ae=a,se=ae.implementation,ue=ae.createNodeIterator,le=ae.createDocumentFragment,ce=ae.getElementsByTagName,fe=o.importNode,pe={};try{pe=N(a).documentMode?a.documentMode:{}}catch(e){}var he={};n.isSupported="function"==typeof re&&se&&void 0!==se.createHTMLDocument&&9!==pe;var de,ve,ge=W,me=U,ye=H,be=J,_e=K,we=$,ke=G,xe=null,Oe=M({},[].concat(i(A),i(S),i(C),i(L),i(R))),Te=null,Ie=M({},[].concat(i(P),i(B),i(V),i(q))),De=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,Me=null,Ne=!0,Ee=!0,Ae=!1,Se=!1,Ce=!1,ze=!1,Le=!1,Fe=!1,Re=!1,Pe=!1,Be=!0,Ve=!1,qe="user-content-",We=!0,Ue=!1,He={},Je=null,Ge=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ke=null,$e=M({},["audio","video","img","source","image","track"]),Ye=null,Xe=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,rt=!1,nt=["application/xhtml+xml","text/html"],it="text/html",ot=null,at=a.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},ut=function(t){ot&&ot===t||(t&&"object"===e(t)||(t={}),t=N(t),de=de=-1===nt.indexOf(t.PARSER_MEDIA_TYPE)?it:t.PARSER_MEDIA_TYPE,ve="application/xhtml+xml"===de?function(e){return e}:w,xe="ALLOWED_TAGS"in t?M({},t.ALLOWED_TAGS,ve):Oe,Te="ALLOWED_ATTR"in t?M({},t.ALLOWED_ATTR,ve):Ie,Ye="ADD_URI_SAFE_ATTR"in t?M(N(Xe),t.ADD_URI_SAFE_ATTR,ve):Xe,Ke="ADD_DATA_URI_TAGS"in t?M(N($e),t.ADD_DATA_URI_TAGS,ve):$e,Je="FORBID_CONTENTS"in t?M({},t.FORBID_CONTENTS,ve):Ge,je="FORBID_TAGS"in t?M({},t.FORBID_TAGS,ve):{},Me="FORBID_ATTR"in t?M({},t.FORBID_ATTR,ve):{},He="USE_PROFILES"in t&&t.USE_PROFILES,Ne=!1!==t.ALLOW_ARIA_ATTR,Ee=!1!==t.ALLOW_DATA_ATTR,Ae=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=t.SAFE_FOR_TEMPLATES||!1,Ce=t.WHOLE_DOCUMENT||!1,Fe=t.RETURN_DOM||!1,Re=t.RETURN_DOM_FRAGMENT||!1,Pe=t.RETURN_TRUSTED_TYPE||!1,Le=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,Ve=t.SANITIZE_NAMED_PROPS||!1,We=!1!==t.KEEP_CONTENT,Ue=t.IN_PLACE||!1,ke=t.ALLOWED_URI_REGEXP||ke,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(Ee=!1),Re&&(Fe=!0),He&&(xe=M({},i(R)),Te=[],!0===He.html&&(M(xe,A),M(Te,P)),!0===He.svg&&(M(xe,S),M(Te,B),M(Te,q)),!0===He.svgFilters&&(M(xe,C),M(Te,B),M(Te,q)),!0===He.mathMl&&(M(xe,L),M(Te,V),M(Te,q))),t.ADD_TAGS&&(xe===Oe&&(xe=N(xe)),M(xe,t.ADD_TAGS,ve)),t.ADD_ATTR&&(Te===Ie&&(Te=N(Te)),M(Te,t.ADD_ATTR,ve)),t.ADD_URI_SAFE_ATTR&&M(Ye,t.ADD_URI_SAFE_ATTR,ve),t.FORBID_CONTENTS&&(Je===Ge&&(Je=N(Je)),M(Je,t.FORBID_CONTENTS,ve)),We&&(xe["#text"]=!0),Ce&&M(xe,["html","head","body"]),xe.table&&(M(xe,["tbody"]),delete je.tbody),f&&f(t),ot=t)},lt=M({},["mi","mo","mn","ms","mtext"]),ct=M({},["foreignobject","desc","title","annotation-xml"]),ft=M({},["title","style","font","a","script"]),pt=M({},S);M(pt,C),M(pt,z);var ht=M({},L);M(ht,F);var dt=function(e){var t=re(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var r=w(e.tagName),n=w(t.tagName);return e.namespaceURI===Qe?t.namespaceURI===et?"svg"===r:t.namespaceURI===Ze?"svg"===r&&("annotation-xml"===n||lt[n]):Boolean(pt[r]):e.namespaceURI===Ze?t.namespaceURI===et?"math"===r:t.namespaceURI===Qe?"math"===r&&ct[n]:Boolean(ht[r]):e.namespaceURI===et&&!(t.namespaceURI===Qe&&!ct[n])&&!(t.namespaceURI===Ze&&!lt[n])&&!ht[r]&&(ft[r]||!pt[r])},vt=function(e){_(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},gt=function(e,t){try{_(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Te[e])if(Fe||Re)try{vt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){var t,r;if(Le)e="<remove></remove>"+e;else{var n=k(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===de&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ie?ie.createHTML(e):e;if(tt===et)try{t=(new g).parseFromString(i,de)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(tt,"template",null);try{t.documentElement.innerHTML=rt?"":i}catch(e){}}var o=t.body||t.documentElement;return e&&r&&o.insertBefore(a.createTextNode(r),o.childNodes[0]||null),tt===et?ce.call(t,Ce?"html":"body")[0]:Ce?t.documentElement:o},yt=function(e){return ue.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof v&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},_t=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},wt=function(e,t,r){he[e]&&y(he[e],(function(e){e.call(n,t,r,ot)}))},kt=function(e){var t;if(wt("beforeSanitizeElements",e,null),bt(e))return vt(e),!0;if(I(/[\u0080-\uFFFF]/,e.nodeName))return vt(e),!0;var r=ve(e.nodeName);if(wt("uponSanitizeElement",e,{tagName:r,allowedTags:xe}),e.hasChildNodes()&&!_t(e.firstElementChild)&&(!_t(e.content)||!_t(e.content.firstElementChild))&&I(/<[/\w]/g,e.innerHTML)&&I(/<[/\w]/g,e.textContent))return vt(e),!0;if("select"===r&&I(/<template/i,e.innerHTML))return vt(e),!0;if(!xe[r]||je[r]){if(!je[r]&&Ot(r)){if(De.tagNameCheck instanceof RegExp&&I(De.tagNameCheck,r))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(r))return!1}if(We&&!Je[r]){var i=re(e)||e.parentNode,o=te(e)||e.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(Q(o[a],!0),ee(e))}return vt(e),!0}return e instanceof c&&!dt(e)?(vt(e),!0):"noscript"!==r&&"noembed"!==r||!I(/<\/no(script|embed)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,t=x(t,ge," "),t=x(t,me," "),e.textContent!==t&&(_(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt("afterSanitizeElements",e,null),!1):(vt(e),!0)},xt=function(e,t,r){if(Be&&("id"===t||"name"===t)&&(r in a||r in at))return!1;if(Ee&&!Me[t]&&I(ye,t));else if(Ne&&I(be,t));else if(!Te[t]||Me[t]){if(!(Ot(e)&&(De.tagNameCheck instanceof RegExp&&I(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&I(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&I(De.tagNameCheck,r)||De.tagNameCheck instanceof Function&&De.tagNameCheck(r))))return!1}else if(Ye[t]);else if(I(ke,x(r,we,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(r,"data:")||!Ke[e])if(Ae&&!I(_e,x(r,we,"")));else if(r)return!1;return!0},Ot=function(e){return e.indexOf("-")>0},Tt=function(t){var r,i,o,a;wt("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te};for(a=s.length;a--;){var l=r=s[a],c=l.name,f=l.namespaceURI;if(i="value"===c?r.value:T(r.value),o=ve(c),u.attrName=o,u.attrValue=i,u.keepAttr=!0,u.forceKeepAttr=void 0,wt("uponSanitizeAttribute",t,u),i=u.attrValue,!u.forceKeepAttr&&(gt(c,t),u.keepAttr))if(I(/\/>/i,i))gt(c,t);else{Se&&(i=x(i,ge," "),i=x(i,me," "));var p=ve(t.nodeName);if(xt(p,o,i)){if(!Ve||"id"!==o&&"name"!==o||(gt(c,t),i=qe+i),ie&&"object"===e(m)&&"function"==typeof m.getAttributeType)if(f);else switch(m.getAttributeType(p,o)){case"TrustedHTML":i=ie.createHTML(i);break;case"TrustedScriptURL":i=ie.createScriptURL(i)}try{f?t.setAttributeNS(f,c,i):t.setAttribute(c,i),b(n.removed)}catch(e){}}}}wt("afterSanitizeAttributes",t,null)}},It=function e(t){var r,n=yt(t);for(wt("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)wt("uponSanitizeShadowNode",r,null),kt(r)||(r.content instanceof s&&e(r.content),Tt(r));wt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(t){var i,a,u,c,f,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((rt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_t(t)){if("function"!=typeof t.toString)throw D("toString is not a function");if("string"!=typeof(t=t.toString()))throw D("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(r.toStaticHTML)||"function"==typeof r.toStaticHTML){if("string"==typeof t)return r.toStaticHTML(t);if(_t(t))return r.toStaticHTML(t.outerHTML)}return t}if(ze||ut(p),n.removed=[],"string"==typeof t&&(Ue=!1),Ue){if(t.nodeName){var h=ve(t.nodeName);if(!xe[h]||je[h])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)1===(a=(i=mt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!Fe&&!Se&&!Ce&&-1===t.indexOf("<"))return ie&&Pe?ie.createHTML(t):t;if(!(i=mt(t)))return Fe?null:Pe?oe:""}i&&Le&&vt(i.firstChild);for(var d=yt(Ue?t:i);u=d.nextNode();)3===u.nodeType&&u===c||kt(u)||(u.content instanceof s&&It(u.content),Tt(u),c=u);if(c=null,Ue)return t;if(Fe){if(Re)for(f=le.call(i.ownerDocument);i.firstChild;)f.appendChild(i.firstChild);else f=i;return Te.shadowroot&&(f=fe.call(o,f,!0)),f}var v=Ce?i.outerHTML:i.innerHTML;return Ce&&xe["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&I(Y,i.ownerDocument.doctype.name)&&(v="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+v),Se&&(v=x(v,ge," "),v=x(v,me," ")),ie&&Pe?ie.createHTML(v):v},n.setConfig=function(e){ut(e),ze=!0},n.clearConfig=function(){ot=null,ze=!1},n.isValidAttribute=function(e,t,r){ot||ut({});var n=ve(e),i=ve(t);return xt(n,i,r)},n.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],_(he[e],t))},n.removeHook=function(e){if(he[e])return b(he[e])},n.removeHooks=function(e){he[e]&&(he[e]=[])},n.removeAllHooks=function(){he={}},n}()}()},138:function(e,t,r){var n=r(55);e.exports=function(e){var t,r="",i=e||{};return function(e,i){r=r+"<div"+n.attr("class",n.classes(["".concat(i["context-menu"])],[!0]),!1,!0)+"> ",function(){var o=e;if("number"==typeof o.length)for(var a=0,s=o.length;a<s;a++)"hr"===(u=o[a])?r+="<hr>":(r=r+"<div"+n.attr("id","context-menu-item-".concat(u._id),!0,!0)+"> ",(u.iconClass||u.iconHTML)&&(r=r+"<span"+n.attr("class",n.classes(["".concat(i["menu-item-icon"])],[!0]),!1,!0)+">",u.iconClass&&(r=r+"<i"+n.attr("class",n.classes(["".concat(u.iconClass)],[!0]),!1,!0)+"></i>"),u.iconHTML&&(r+=null==(t=u.iconHTML)?"":t),r+="</span>"),r=r+"<span>"+n.escape(null==(t=u.label)?"":t)+"</span>",u.nestedMenu&&(r=r+"<span"+n.attr("class",n.classes(["".concat(i["nested-menu-arrow"])],[!0]),!1,!0)+">&#x203A;</span>"),r+="</div>");else for(var a in s=0,o){var u;s++,"hr"===(u=o[a])?r+="<hr>":(r=r+"<div"+n.attr("id","context-menu-item-".concat(u._id),!0,!0)+"> ",(u.iconClass||u.iconHTML)&&(r=r+"<span"+n.attr("class",n.classes(["".concat(i["menu-item-icon"])],[!0]),!1,!0)+">",u.iconClass&&(r=r+"<i"+n.attr("class",n.classes(["".concat(u.iconClass)],[!0]),!1,!0)+"></i>"),u.iconHTML&&(r+=null==(t=u.iconHTML)?"":t),r+="</span>"),r=r+"<span>"+n.escape(null==(t=u.label)?"":t)+"</span>",u.nestedMenu&&(r=r+"<span"+n.attr("class",n.classes(["".concat(i["nested-menu-arrow"])],[!0]),!1,!0)+">&#x203A;</span>"),r+="</div>")}}.call(this),r+="</div>"}.call(this,"menuItems"in i?i.menuItems:"undefined"!=typeof menuItems?menuItems:void 0,"style"in i?i.style:"undefined"!=typeof style?style:void 0),r}},55:function(e,t,r){var n=Object.prototype.hasOwnProperty;function i(e,t){return Array.isArray(e)?function(e,t){for(var r,n="",o="",a=Array.isArray(t),s=0;s<e.length;s++)(r=i(e[s]))&&(a&&t[s]&&(r=u(r)),n=n+o+r,o=" ");return n}(e,t):e&&"object"==typeof e?function(e){var t="",r="";for(var i in e)i&&e[i]&&n.call(e,i)&&(t=t+r+i,r=" ");return t}(e):e||""}function o(e){if(!e)return"";if("object"==typeof e){var t="";for(var r in e)n.call(e,r)&&(t=t+r+":"+e[r]+";");return t}return e+""}function a(e,t,r,n){if(!1===t||null==t||!t&&("class"===e||"style"===e))return"";if(!0===t)return" "+(n?e:e+'="'+e+'"');var i=typeof t;return"object"!==i&&"function"!==i||"function"!=typeof t.toJSON||(t=t.toJSON()),"string"==typeof t||(t=JSON.stringify(t),r||-1===t.indexOf('"'))?(r&&(t=u(t))," "+e+'="'+t+'"'):" "+e+"='"+t.replace(/'/g,"&#39;")+"'"}t.merge=function e(t,r){if(1===arguments.length){for(var n=t[0],i=1;i<t.length;i++)n=e(n,t[i]);return n}for(var a in r)if("class"===a){var s=t[a]||[];t[a]=(Array.isArray(s)?s:[s]).concat(r[a]||[])}else if("style"===a){s=(s=o(t[a]))&&";"!==s[s.length-1]?s+";":s;var u=o(r[a]);u=u&&";"!==u[u.length-1]?u+";":u,t[a]=s+u}else t[a]=r[a];return t},t.classes=i,t.style=o,t.attr=a,t.attrs=function(e,t){var r="";for(var s in e)if(n.call(e,s)){var u=e[s];if("class"===s){r=a(s,u=i(u),!1,t)+r;continue}"style"===s&&(u=o(u)),r+=a(s,u,!1,t)}return r};var s=/["&<>]/;function u(e){var t=""+e,r=s.exec(t);if(!r)return e;var n,i,o,a="";for(n=r.index,i=0;n<t.length;n++){switch(t.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}i!==n&&(a+=t.substring(i,n)),i=n+1,a+=o}return i!==n?a+t.substring(i,n):a}t.escape=u,t.rethrow=function e(t,n,i,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||o))throw t.message+=" on line "+i,t;var a,s,u,l;try{o=o||r(835).readFileSync(n,{encoding:"utf8"}),a=3,s=o.split("\n"),u=Math.max(i-a,0),l=Math.min(s.length,i+a)}catch(r){return t.message+=" - could not read from "+n+" ("+r.message+")",void e(t,null,i)}a=s.slice(u,l).map((function(e,t){var r=t+u+1;return(r==i?" > ":" ")+r+"| "+e})).join("\n"),t.path=n;try{t.message=(n||"Pug")+":"+i+"\n"+a+"\n\n"+t.message}catch(e){}throw t}},379:function(e){var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},a=[],s=0;s<e.length;s++){var u=e[s],l=n.base?u[0]+n.base:u[0],c=o[l]||0,f="".concat(l," ").concat(c);o[l]=c+1;var p=r(f),h={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==p)t[p].references++,t[p].updater(h);else{var d=i(h,n);n.byIndex=s,t.splice(s,0,{identifier:f,updater:d,references:1})}a.push(f)}return a}function i(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,i){var o=n(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=r(o[a]);t[s].references--}for(var u=n(e,i),l=0;l<o.length;l++){var c=r(o[l]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=u}}},569:function(e){var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:function(e){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,r){e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},795:function(e){e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},835:function(){}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nc=void 0;var n={};return function(){r.d(n,{default:function(){return B}});var e=r(856),t=r(379),i=r.n(t),o=r(795),a=r.n(o),s=r(569),u=r.n(s),l=r(565),c=r.n(l),f=r(216),p=r.n(f),h=r(589),d=r.n(h),v=r(550),g={};g.styleTagTransform=d(),g.setAttributes=c(),g.insert=u().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=p(),i()(v.Z,g);var m=v.Z&&v.Z.locals?v.Z.locals:void 0;var y=r(138),b=r.n(y);function _(e,t,r){var n=e.x,i=e.y,o=r.getBoundingClientRect(),a=o.left,s=o.top,u=i-s,l=n-a+t.clientWidth>r.clientWidth,c=u+t.clientHeight>r.clientHeight;var f=n,p=i;return l&&(f=a+r.clientWidth-t.clientWidth),c&&(p=s+r.clientHeight-t.clientHeight),{normalizedX:f,normalizedY:p}}var w,k,x,O,T,I,D,j,M,N,E,A,S,C,z,L,F=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};var R=function(){function t(){var t=this;w.add(this),k.set(this,{style:m,menuItems:[]}),x.set(this,{transformOrigin:["top","left"]}),O.set(this,{theme:"black",transitionDuration:200}),this.options={},T.set(this,(function(t){return t.map((function(t){return"object"==typeof t&&t.hasOwnProperty("iconHTML")&&(t.iconHTML=(0,e.sanitize)(t.iconHTML)),t}))})),this.applyStyleOnContextMenu=function(e,r,n){e.style.transitionDuration="".concat(t.options.transitionDuration,"ms");var i=Array.from(t.options.transformOrigin);r&&(i[1]="right"),n&&(i[0]="bottom"),e.style.transformOrigin=i.join(" "),t.options.customThemeClass?e.classList.add(t.options.customThemeClass):e.classList.add(m["context-menu--".concat(t.options.theme,"-theme")]),t.options.customClass&&e.classList.add(t.options.customClass)},this.buildContextMenu=function(){var e=document.createElement("div");return e.innerHTML=b()(F(t,k,"f")),e.children[0]}}t.prototype.updateOptions=function(e){var t=F(this,T,"f").call(this,e.menuItems),r=F(this,w,"m",I).call(this,t);F(this,w,"m",D).call(this,r),Object.assign(this.options,F(this,O,"f")),Object.assign(this.options,Object.assign(Object.assign({},e),{menuItems:r})),Object.assign(this.options,F(this,x,"f")),F(this,k,"f").menuItems=this.options.menuItems};return t}();k=new WeakMap,x=new WeakMap,O=new WeakMap,T=new WeakMap,w=new WeakSet,I=function(e){var t=this;return e.filter((function(e){return"object"==typeof e&&e.hasOwnProperty("nestedMenu")})).map((function(e){var r=e.callback;e.callback=function(n){r&&r(n),new P(Object.assign(Object.assign({},t.options),{menuItems:e.nestedMenu}),n,document.getElementById("context-menu-item-".concat(e._id)))}})),e},D=function e(t){var r=this;t.filter((function(e){return"object"==typeof e})).forEach((function(t,n){t._id=Date.now()+n,t.nestedMenu&&F(r,w,"m",e).call(r,t.nestedMenu)}))};var P=function(e){__extends(t,e);function t(t,r,n){var i=this;i=e.call(this)||this,j.add(i),M.set(i,(function(){var e;null===(e=document.querySelector(".".concat(m["context-menu"],".nested-context-menu")))||void 0===e||e.remove()})),N.set(i,(function(e){i.options.menuItems.forEach((function(t,r){"hr"!==t&&t.callback&&(e.children[r].onclick=function(){var e,r,n;t.callback(i.initialContextMenuEvent),null!==(r=null!==(e=t.preventCloseOnClick)&&void 0!==e?e:i.options.preventCloseOnClick)&&void 0!==r&&r||(F(i,M,"f").call(i),null===(n=document.querySelector(".".concat(m["context-menu"])))||void 0===n||n.remove())})}))})),i.updateOptions(t),F(i,j,"m",E).call(i,r,n);return i}return t}(R);M=new WeakMap,N=new WeakMap,j=new WeakSet,E=function(e,t){this.initialContextMenuEvent=e,F(this,M,"f").call(this);var r=this.buildContextMenu();r.classList.add("nested-context-menu"),document.querySelector("body").append(r),this.applyStyleOnContextMenu(r,!1,!1);var n=t.getBoundingClientRect(),i=n.x,o=n.y;var a=_({x:i,y:o},r,this.options.scope),s=a.normalizedX,u=a.normalizedY;s+=r.clientWidth,r.style.top="".concat(u,"px"),r.style.left="".concat(s,"px"),r.oncontextmenu=function(e){return e.preventDefault()},F(this,N,"f").call(this,r),setTimeout((function(){r.classList.add(m.visible)}))};var B=function(e){__extends(t,e);function t(t){var r=this;r=e.call(this)||this,A.set(r,(function(){var e;F(r,S,"f").call(r),null===(e=document.querySelector(".".concat(m["context-menu"])))||void 0===e||e.remove()})),S.set(r,(function(){document.querySelectorAll(".".concat(m["context-menu"],".nested-context-menu")).forEach((function(e){return e.remove()}))})),C.set(r,(function(e){r.options.menuItems.forEach((function(t,n){"hr"!==t&&t.callback&&(e.children[n].onclick=function(){var e,n;t.callback(r.initialContextMenuEvent),null!==(n=null!==(e=t.preventCloseOnClick)&&void 0!==e?e:r.options.preventCloseOnClick)&&void 0!==n&&n||F(r,A,"f").call(r)})}))})),z.set(r,(function(e){e.preventDefault(),e.stopPropagation(),r.initialContextMenuEvent=e,F(r,A,"f").call(r);var t=r.buildContextMenu();document.querySelector("body").append(t);var n=e.clientX,i=e.clientY,o=_({x:n,y:i},t,r.options.scope),a=o.normalizedX,s=o.normalizedY;t.style.top="".concat(s,"px"),t.style.left="".concat(a,"px"),r.applyStyleOnContextMenu(t,n!==a,i!==s),t.oncontextmenu=function(e){return e.preventDefault()},F(r,C,"f").call(r,t),setTimeout((function(){t.classList.add(m.visible)}))})),L.set(r,(function(e){e.target.closest(".".concat(m["context-menu"]))||F(r,A,"f").call(r)})),r.updateOptions(t),r.options.scope.oncontextmenu=F(r,z,"f"),document.addEventListener("click",F(r,L,"f"));return r}t.prototype.off=function(){document.removeEventListener("click",F(this,L,"f")),this.options.scope.oncontextmenu=null};return t}(R);A=new WeakMap,S=new WeakMap,C=new WeakMap,z=new WeakMap,L=new WeakMap}(),n.default}()}))}));var VanillaContextMenu=getDefaultExportFromCjs(vanillaContextMenu);var curDraggingItem=null;var lastDraggedOverNodeId=null;var lastDraggedOverTimeForAscendent=(new Date).getTime();var lastDraggedOverTimeForLevel=(new Date).getTime();var acceptableDelayBetweenSimilarActions=300;function onItemDragStart(e,t,r){if(r===void 0){r=true}if(!r)return;curDraggingItem=e;e.classList.add("dragging");t.stopPropagation()}function onItemDragEnd(e,t,r){if(r===void 0){r=true}if(!r)return;e.classList.remove("dragging");t.stopPropagation();clearDragOverStyles(e.parentElement)}function onItemDragOver(e,t,r){if(r===void 0){r=true}if(!r)return;var n=(new Date).getTime();if(n-lastDraggedOverTimeForAscendent<50&&e.dataset.nodeId!==lastDraggedOverNodeId){return}lastDraggedOverTimeForAscendent=n;if(e.dataset.nodeId===lastDraggedOverNodeId){if(n-lastDraggedOverTimeForLevel<acceptableDelayBetweenSimilarActions){return}lastDraggedOverTimeForLevel=n}else{lastDraggedOverNodeId=e.dataset.nodeId}clearDragOverStyles(e);if(e===curDraggingItem){e.classList.remove("dragover");return}var i=getDragOverPosition(e,t);e.classList.add("dragover-".concat(i));e.classList.add("dragover");t.stopPropagation();t.preventDefault()}function onItemDragLeave(e,t,r){if(r===void 0){r=true}if(!r)return;clearDragOverStyles(e);e.classList.remove("dragover");t.stopPropagation()}function onItemDrop(e,t,r,n){if(r===void 0){r=true}if(!r)return;clearDragOverStyles(e);e.classList.remove("dragover");t.stopPropagation();if(curDraggingItem){var i=getDragOverPosition(e,t);n(curDraggingItem,e,i)}}function getDragOverPosition(e,t){var r=e.offsetHeight;var n=r/4;var i=r-n;var o=t.offsetY;return o<=n?"before":o>=i?"after":"over"}function clearDragOverStyles(e){if(!e)return;var t=Array.from(e.classList).filter((function(e){return e.startsWith("dragover-")}));t.forEach((function(t){return e.classList.remove(t)}))}function deepClone(e){return JSON.parse(JSON.stringify(e))}function uniq(e){var t={};return e.reduce((function(e,r){if(!t[r]){t[r]=true;e.push(r)}return e}),[])}function empty(e){if(e&&e.firstChild){while(e.firstChild){e.removeChild(e.firstChild)}}}function animation(e,t){requestAnimationFrame((function(){t.enter();requestAnimationFrame((function(){t.active();setTimeout((function(){t.leave()}),e)}))}))}function Tree(e,t){var r={selectMode:"checkbox",values:[],disables:[],beforeLoad:null,loaded:null,url:null,method:"GET",closeDepth:null};this.treeNodes=[];this.nodesById={};this.leafNodesById={};this.liElementsById={};this.willUpdateNodesById={};this.container=e;this.options=Object.assign(r,t);Object.defineProperties(this,{values:{get:function(){return this.getValues()},set:function(e){return this.setValues(uniq(e))}},disables:{get:function(){return this.getDisables()},set:function(e){return this.setDisables(uniq(e))}},selectedNodes:{get:function(){var e=[];var t=this.nodesById;for(var r in t){if(t.hasOwnProperty(r)&&(t[r].status===1||t[r].status===2)){var n=Object.assign({},t[r]);delete n.parent;delete n.children;e.push(n)}}return e}},disabledNodes:{get:function(){var e=[];var t=this.nodesById;for(var r in t){if(t.hasOwnProperty(r)&&t[r].disabled){var n=Object.assign({},t[r]);delete n.parent;e.push(n)}}return e}}});this.init(this.options.data)}Tree.prototype.init=function(e){var t=Tree.parseTreeData(e),r=t.treeNodes,n=t.nodesById,i=t.leafNodesById,o=t.defaultValues,a=t.defaultDisables;this.treeNodes=r;this.nodesById=n;this.leafNodesById=i;this.render(this.treeNodes);var s=this.options,u=s.values,l=s.disables,c=s.loaded;if(u&&u.length)o=u;o.length&&this.setValues(o);if(l&&l.length)a=l;a.length&&this.setDisables(a);c&&c.call(this)};Tree.prototype.render=function(e){var t=Tree.createRootEle();t.appendChild(this.buildTree(e,0));this.bindEvent(t);var r=null;try{r=document.querySelector(this.container)}catch(e){r=this.container}if(r){empty(r);r.appendChild(t)}};Tree.prototype.buildTree=function(e,t){var r=this;var n=this.createUlEle();if(e&&e.length){e.forEach((function(e){var i=r.createLiEle(e,t===r.options.closeDepth-1);r.liElementsById[e.id]=i;var o=null;if(e.children&&e.children.length){o=r.buildTree(e.children,t+1)}o&&i.appendChild(o);n.appendChild(i)}))}return n};Tree.prototype.bindEvent=function(e){var t=this;var r;if(!this.options.parentApi.isDisabled){var n=this.options.parentApi.theOptions.contextMenu;if((r=n===null||n===void 0?void 0:n.items)===null||r===void 0?void 0:r.length){new VanillaContextMenu(Object.assign(Object.assign({},n),{scope:e,menuItems:n.items.map((function(e){return typeof e==="string"?e:Object.assign(Object.assign({},e),{callback:function(r){return __awaiter(t,void 0,void 0,(function(){var t,n,i;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.options.parentApi.getValue()];case 1:t=o.sent();n=Object.assign({},this.options.parentApi.loadedTreeJs.nodesById[t.nodeid]);i=Object.assign(Object.assign({},n),{hasChildren:n.children.length>0});delete i.children;this.options.parentApi.onItemContextMenuItemClick(Object.assign(Object.assign({},r),{target:i,contextMenuItem:e}));return[2]}}))}))}})}))}))}}e.addEventListener("mousedown",(function(e){if(e.button!=0&&e.button!=2)return;var r=e.target;if(r.nodeName==="SPAN"&&(r.classList.contains("treejs-checkbox")||r.classList.contains("treejs-label"))){t.onItemClick(r.parentNode.nodeId,e.button==2)}else if(r.nodeName==="LI"&&r.classList.contains("treejs-node")){t.onItemClick(r.nodeId,e.button==2)}else if(r.nodeName==="SPAN"&&r.classList.contains("treejs-switcher")){t.onSwitcherClick(r)}}),false)};Tree.prototype.onItemClick=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:if(this.options.parentApi.isDisabled&&this.options.parentApi.optionsManager.getOptions().mode!="tree")return[2];return[4,this.options.parentApi.getValue()];case 1:r=n.sent();if(!t||!r||r.nodeid!=e){this.options.parentApi.setNodeAsSelected(e,this,true)}return[2]}}))}))};Tree.prototype.unCheckElement=function(e){this.setValue(e);this.updateLiElements()};Tree.prototype.setValue=function(e){var t=this.nodesById[e];if(!t)return;var r=getChildrenStatus(t);var n=t.status;var i=null;if(r){i=n===1?2:1}else{i=n===1||n===2?0:2}t.status=i;this.markWillUpdateNode(t);this.walkUp(t,"status");this.walkDown(t,"status")};function getChildrenStatus(e){if(e.children&&e.children.length){var t=e.children.reduce((function(e,t){if(!isNaN(t.status))return e+t.status;return e}),0);return t}}Tree.prototype.getValues=function(){var e=[];for(var t in this.leafNodesById){if(this.leafNodesById.hasOwnProperty(t)){if(this.leafNodesById[t].status===1||this.leafNodesById[t].status===2){e.push(t)}}}return e};Tree.prototype.setValues=function(e){var t=this;this.emptyNodesCheckStatus();e.forEach((function(e){t.setValue(e)}));this.updateLiElements();var r=this.options.onChange;r&&r.call(this)};Tree.prototype.setDisable=function(e){var t=this.nodesById[e];if(!t)return;var r=t.disabled;if(!r){t.disabled=true;this.markWillUpdateNode(t);this.walkUp(t,"disabled");this.walkDown(t,"disabled")}};Tree.prototype.getDisables=function(){var e=[];for(var t in this.leafNodesById){if(this.leafNodesById.hasOwnProperty(t)){if(this.leafNodesById[t].disabled){e.push(t)}}}return e};Tree.prototype.setDisables=function(e){var t=this;this.emptyNodesDisable();e.forEach((function(e){t.setDisable(e)}));this.updateLiElements()};Tree.prototype.emptyNodesCheckStatus=function(){this.willUpdateNodesById=this.getSelectedNodesById();Object.values(this.willUpdateNodesById).forEach((function(e){if(!e.disabled)e.status=0}))};Tree.prototype.emptyNodesDisable=function(){this.willUpdateNodesById=this.getDisabledNodesById();Object.values(this.willUpdateNodesById).forEach((function(e){e.disabled=false}))};Tree.prototype.getSelectedNodesById=function(){return Object.entries(this.nodesById).reduce((function(e,t){var r=t[0],n=t[1];if(n.status===1||n.status===2){e[r]=n}return e}),{})};Tree.prototype.getDisabledNodesById=function(){return Object.entries(this.nodesById).reduce((function(e,t){var r=t[0],n=t[1];if(n.disabled){e[r]=n}return e}),{})};Tree.prototype.updateLiElements=function(){var e=this;Object.values(this.willUpdateNodesById).forEach((function(t){e.updateLiElement(t)}));this.willUpdateNodesById={}};Tree.prototype.markWillUpdateNode=function(e){this.willUpdateNodesById[e.id]=e};Tree.prototype.onSwitcherClick=function(e){var t=this;var r=e.parentNode.querySelectorAll(".treejs-switcher").length>0&&e.parentNode.querySelectorAll("ul").length==0;var n=Array.prototype.slice.call(e.parentNode.querySelectorAll("ul > li > span.treejs-label")).filter((function(t){return t.parentNode.parentNode.parentNode===e.parentNode}));var i=[];i=n.filter((function(e){return e.textContent==="undefined"}));if(e.nodeName==="SPAN"&&e.classList.contains("treejs-switcher")&&(i.length>0||r)){if(i.length>0){e.parentNode.querySelector("ul").innerHTML=""}if(this.options.parentApi.theOptions.source=="webservice"){if(this.options.parentApi.theOptions.origin=="classification"){var o=this.options.parentApi.getContextualApiParams(Object.assign(Object.assign({},this.options.parentApi.theOptions.options),{startNode:e.parentNode.nodeId}));var a=this.options.parentApi.getContextualApiURL();this.options.rawDataManager.getFromClassification(a,o,document.querySelector("#hierarchized-picker-"+this.options.parentApi.componentID+" .loader")).then((function(e){t.options.completeCurrentTreeWithTree(t,e,t.options.parentApi.theOptions)}))}else{this.options.rawDataManager.getFromSource(this.options.parentApi.theOptions.url,{StartNodeID:e.parentNode.nodeId,lng:this.options.parentApi.theOptions.options.lng,IsDeprecated:this.options.parentApi.theOptions.options.IsDeprecated},document.querySelector("#hierarchized-picker-"+this.options.parentApi.componentID+" .loader")).then((function(e){t.options.completeCurrentTreeWithTree(t,e,t.options.parentApi.theOptions)}))}}}var s=e.parentNode;var u=s.lastChild;var l=u.scrollHeight;if(s.classList.contains("treejs-node__close")){animation(150,{enter:function(){u.style.height=0;u.style.opacity=0},active:function(){u.style.height="".concat(l,"px");u.style.opacity=1},leave:function(){u.style.height="";u.style.opacity="";s.classList.remove("treejs-node__close")}})}else{animation(150,{enter:function(){u.style.height="".concat(l,"px");u.style.opacity=1},active:function(){u.style.height=0;u.style.opacity=0},leave:function(){u.style.height="";u.style.opacity="";s.classList.add("treejs-node__close")}})}return new Promise((function(e){e(t)}))};Tree.prototype.walkUp=function(e,t){var r=e.parent;if(r){if(t==="status"){var n=null;var i=r.children.reduce((function(e,t){if(!isNaN(t.status))return e+t.status;return e}),0);if(i){n=i>=2&&r.status===2?2:1}else{n=0}if(r.status===n||r.status===2)return;r.status=n;if(r.parent){var o=r.parent.children.find((function(e){return e.id===r.id}));if(o){o.status=n}}}else{var a=r.children.reduce((function(e,t){return e&&t.disabled}),true);if(r.disabled===a)return;r.disabled=a}this.markWillUpdateNode(r);this.walkUp(r,t)}};Tree.prototype.walkDown=function(e,t){};Tree.prototype.updateLiElement=function(e){var t=this.liElementsById[e.id].classList;switch(e.status){case 0:t.remove("treejs-node__halfchecked","treejs-node__checked");break;case 1:t.remove("treejs-node__checked");t.add("treejs-node__halfchecked");break;case 2:t.remove("treejs-node__halfchecked");t.add("treejs-node__checked");break}switch(e.disabled){case true:if(!t.contains("treejs-node__disabled"))t.add("treejs-node__disabled");break;case false:if(t.contains("treejs-node__disabled"))t.remove("treejs-node__disabled");break}};Tree.parseTreeData=function(e){var t=deepClone(e);var r={};var n={};var i=[];var o=[];var a=function(e,t){e.forEach((function(e){r[e.id]=e;if(e.checked)i.push(e.id);if(e.disabled)o.push(e.id);if(t)e.parent=t;if(e.children&&e.children.length){a(e.children,e)}else{n[e.id]=e}}))};a(Array.isArray(t)?t:[t],null);return{treeNodes:t,nodesById:r,leafNodesById:n,defaultValues:i,defaultDisables:o}};Tree.createRootEle=function(){var e=document.createElement("div");e.classList.add("treejs");return e};Tree.prototype.createUlEle=function(){var e=document.createElement("ul");e.classList.add("treejs-nodes");return e};Tree.prototype.createLiEle=function(e,t){var r=this;var n=document.createElement("li");n.classList.add("treejs-node");if(e.deprecated||e.Is_Deprecated){n.classList.add("treejs-node__deprecated")}if(e.isDesaturated){n.classList.add("treejs-node__desaturated")}if(e.searchMatch){n.classList.add("treejs-node__searchmatch")}if(t)n.classList.add("treejs-node__close");if(e.children&&e.children.length){var i=document.createElement("span");i.classList.add("treejs-switcher");n.appendChild(i)}else{n.classList.add("treejs-placeholder")}var o=document.createElement("span");o.classList.add("treejs-checkbox");o.style.display=!this.options.parentApi||this.options.parentApi&&this.options.parentApi.theOptions.multiple?"inline-block":"none";n.appendChild(o);var a=document.createElement("span");a.classList.add("treejs-label");var s=document.createTextNode(e.text);a.appendChild(s);n.appendChild(a);n.nodeId=e.id;if(this.options.parentApi.theOptions.dragAndDropEnabled){n.setAttribute("draggable","true");n.addEventListener("dragstart",(function(e){onItemDragStart(n,e,r.options.parentApi.activatedDragAndDrop)}));n.addEventListener("dragend",(function(e){onItemDragEnd(n,e,r.options.parentApi.activatedDragAndDrop)}));n.addEventListener("dragover",(function(e){onItemDragOver(n,e,r.options.parentApi.activatedDragAndDrop)}));n.addEventListener("dragleave",(function(e){onItemDragLeave(n,e,r.options.parentApi.activatedDragAndDrop)}));n.addEventListener("drop",(function(e){onItemDrop(n,e,r.options.parentApi.activatedDragAndDrop,(function(e,t,n){r.options.parentApi.itemDropped.emit({dragEl:e,dropEl:t,position:n})}))}))}return n};var lodash=createCommonjsModule((function(e,t){(function(){var r;var n="4.17.21";var i=200;var o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`";var u="__lodash_hash_undefined__";var l=500;var c="__lodash_placeholder__";var f=1,p=2,h=4;var d=1,v=2;var g=1,m=2,y=4,b=8,_=16,w=32,k=64,x=128,O=256,T=512;var I=30,D="...";var j=800,M=16;var N=1,E=2,A=3;var S=1/0,C=9007199254740991,z=17976931348623157e292,L=0/0;var F=4294967295,R=F-1,P=F>>>1;var B=[["ary",x],["bind",g],["bindKey",m],["curry",b],["curryRight",_],["flip",T],["partial",w],["partialRight",k],["rearg",O]];var V="[object Arguments]",q="[object Array]",W="[object AsyncFunction]",U="[object Boolean]",H="[object Date]",J="[object DOMException]",G="[object Error]",K="[object Function]",$="[object GeneratorFunction]",Y="[object Map]",X="[object Number]",Z="[object Null]",Q="[object Object]",ee="[object Promise]",te="[object Proxy]",re="[object RegExp]",ne="[object Set]",ie="[object String]",oe="[object Symbol]",ae="[object Undefined]",se="[object WeakMap]",ue="[object WeakSet]";var le="[object ArrayBuffer]",ce="[object DataView]",fe="[object Float32Array]",pe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",ve="[object Int32Array]",ge="[object Uint8Array]",me="[object Uint8ClampedArray]",ye="[object Uint16Array]",be="[object Uint32Array]";var _e=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,ke=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var xe=/&(?:amp|lt|gt|quot|#39);/g,Oe=/[&<>"']/g,Te=RegExp(xe.source),Ie=RegExp(Oe.source);var De=/<%-([\s\S]+?)%>/g,je=/<%([\s\S]+?)%>/g,Me=/<%=([\s\S]+?)%>/g;var Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ee=/^\w*$/,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var Se=/[\\^$.*+?()[\]{}|]/g,Ce=RegExp(Se.source);var ze=/^\s+/;var Le=/\s/;var Fe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Re=/\{\n\/\* \[wrapped with (.+)\] \*/,Pe=/,? & /;var Be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Ve=/[()=,{}\[\]\/\s]/;var qe=/\\(\\)?/g;var We=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var Ue=/\w*$/;var He=/^[-+]0x[0-9a-f]+$/i;var Je=/^0b[01]+$/i;var Ge=/^\[object .+?Constructor\]$/;var Ke=/^0o[0-7]+$/i;var $e=/^(?:0|[1-9]\d*)$/;var Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var Xe=/($^)/;var Ze=/['\n\r\u2028\u2029\\]/g;var Qe="\\ud800-\\udfff",et="\\u0300-\\u036f",tt="\\ufe20-\\ufe2f",rt="\\u20d0-\\u20ff",nt=et+tt+rt,it="\\u2700-\\u27bf",ot="a-z\\xdf-\\xf6\\xf8-\\xff",at="\\xac\\xb1\\xd7\\xf7",st="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ut="\\u2000-\\u206f",lt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ct="A-Z\\xc0-\\xd6\\xd8-\\xde",ft="\\ufe0e\\ufe0f",pt=at+st+ut+lt;var ht="['’]",dt="["+Qe+"]",vt="["+pt+"]",gt="["+nt+"]",mt="\\d+",yt="["+it+"]",bt="["+ot+"]",_t="[^"+Qe+pt+mt+it+ot+ct+"]",wt="\\ud83c[\\udffb-\\udfff]",kt="(?:"+gt+"|"+wt+")",xt="[^"+Qe+"]",Ot="(?:\\ud83c[\\udde6-\\uddff]){2}",Tt="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+ct+"]",Dt="\\u200d";var jt="(?:"+bt+"|"+_t+")",Mt="(?:"+It+"|"+_t+")",Nt="(?:"+ht+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ht+"(?:D|LL|M|RE|S|T|VE))?",At=kt+"?",St="["+ft+"]?",Ct="(?:"+Dt+"(?:"+[xt,Ot,Tt].join("|")+")"+St+At+")*",zt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ft=St+At+Ct,Rt="(?:"+[yt,Ot,Tt].join("|")+")"+Ft,Pt="(?:"+[xt+gt+"?",gt,Ot,Tt,dt].join("|")+")";var Bt=RegExp(ht,"g");var Vt=RegExp(gt,"g");var qt=RegExp(wt+"(?="+wt+")|"+Pt+Ft,"g");var Wt=RegExp([It+"?"+bt+"+"+Nt+"(?="+[vt,It,"$"].join("|")+")",Mt+"+"+Et+"(?="+[vt,It+jt,"$"].join("|")+")",It+"?"+jt+"+"+Nt,It+"+"+Et,Lt,zt,mt,Rt].join("|"),"g");var Ut=RegExp("["+Dt+Qe+nt+ft+"]");var Ht=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"];var Gt=-1;var Kt={};Kt[fe]=Kt[pe]=Kt[he]=Kt[de]=Kt[ve]=Kt[ge]=Kt[me]=Kt[ye]=Kt[be]=true;Kt[V]=Kt[q]=Kt[le]=Kt[U]=Kt[ce]=Kt[H]=Kt[G]=Kt[K]=Kt[Y]=Kt[X]=Kt[Q]=Kt[re]=Kt[ne]=Kt[ie]=Kt[se]=false;var $t={};$t[V]=$t[q]=$t[le]=$t[ce]=$t[U]=$t[H]=$t[fe]=$t[pe]=$t[he]=$t[de]=$t[ve]=$t[Y]=$t[X]=$t[Q]=$t[re]=$t[ne]=$t[ie]=$t[oe]=$t[ge]=$t[me]=$t[ye]=$t[be]=true;$t[G]=$t[K]=$t[se]=false;var Yt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};var Xt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var Zt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};var Qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var er=parseFloat,tr=parseInt;var rr=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var nr=typeof self=="object"&&self&&self.Object===Object&&self;var ir=rr||nr||Function("return this")();var or=t&&!t.nodeType&&t;var ar=or&&"object"=="object"&&e&&!e.nodeType&&e;var sr=ar&&ar.exports===or;var ur=sr&&rr.process;var lr=function(){try{var e=ar&&ar.require&&ar.require("util").types;if(e){return e}return ur&&ur.binding&&ur.binding("util")}catch(e){}}();var cr=lr&&lr.isArrayBuffer,fr=lr&&lr.isDate,pr=lr&&lr.isMap,hr=lr&&lr.isRegExp,dr=lr&&lr.isSet,vr=lr&&lr.isTypedArray;function gr(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function mr(e,t,r,n){var i=-1,o=e==null?0:e.length;while(++i<o){var a=e[i];t(n,a,r(a),e)}return n}function yr(e,t){var r=-1,n=e==null?0:e.length;while(++r<n){if(t(e[r],r,e)===false){break}}return e}function br(e,t){var r=e==null?0:e.length;while(r--){if(t(e[r],r,e)===false){break}}return e}function _r(e,t){var r=-1,n=e==null?0:e.length;while(++r<n){if(!t(e[r],r,e)){return false}}return true}function wr(e,t){var r=-1,n=e==null?0:e.length,i=0,o=[];while(++r<n){var a=e[r];if(t(a,r,e)){o[i++]=a}}return o}function kr(e,t){var r=e==null?0:e.length;return!!r&&Cr(e,t,0)>-1}function xr(e,t,r){var n=-1,i=e==null?0:e.length;while(++n<i){if(r(t,e[n])){return true}}return false}function Or(e,t){var r=-1,n=e==null?0:e.length,i=Array(n);while(++r<n){i[r]=t(e[r],r,e)}return i}function Tr(e,t){var r=-1,n=t.length,i=e.length;while(++r<n){e[i+r]=t[r]}return e}function Ir(e,t,r,n){var i=-1,o=e==null?0:e.length;if(n&&o){r=e[++i]}while(++i<o){r=t(r,e[i],i,e)}return r}function Dr(e,t,r,n){var i=e==null?0:e.length;if(n&&i){r=e[--i]}while(i--){r=t(r,e[i],i,e)}return r}function jr(e,t){var r=-1,n=e==null?0:e.length;while(++r<n){if(t(e[r],r,e)){return true}}return false}var Mr=Rr("length");function Nr(e){return e.split("")}function Er(e){return e.match(Be)||[]}function Ar(e,t,r){var n;r(e,(function(e,r,i){if(t(e,r,i)){n=r;return false}}));return n}function Sr(e,t,r,n){var i=e.length,o=r+(n?1:-1);while(n?o--:++o<i){if(t(e[o],o,e)){return o}}return-1}function Cr(e,t,r){return t===t?fn(e,t,r):Sr(e,Lr,r)}function zr(e,t,r,n){var i=r-1,o=e.length;while(++i<o){if(n(e[i],t)){return i}}return-1}function Lr(e){return e!==e}function Fr(e,t){var r=e==null?0:e.length;return r?qr(e,t)/r:L}function Rr(e){return function(t){return t==null?r:t[e]}}function Pr(e){return function(t){return e==null?r:e[t]}}function Br(e,t,r,n,i){i(e,(function(e,i,o){r=n?(n=false,e):t(r,e,i,o)}));return r}function Vr(e,t){var r=e.length;e.sort(t);while(r--){e[r]=e[r].value}return e}function qr(e,t){var n,i=-1,o=e.length;while(++i<o){var a=t(e[i]);if(a!==r){n=n===r?a:n+a}}return n}function Wr(e,t){var r=-1,n=Array(e);while(++r<e){n[r]=t(r)}return n}function Ur(e,t){return Or(t,(function(t){return[t,e[t]]}))}function Hr(e){return e?e.slice(0,vn(e)+1).replace(ze,""):e}function Jr(e){return function(t){return e(t)}}function Gr(e,t){return Or(t,(function(t){return e[t]}))}function Kr(e,t){return e.has(t)}function $r(e,t){var r=-1,n=e.length;while(++r<n&&Cr(t,e[r],0)>-1){}return r}function Yr(e,t){var r=e.length;while(r--&&Cr(t,e[r],0)>-1){}return r}function Xr(e,t){var r=e.length,n=0;while(r--){if(e[r]===t){++n}}return n}var Zr=Pr(Yt);var Qr=Pr(Xt);function en(e){return"\\"+Qt[e]}function tn(e,t){return e==null?r:e[t]}function rn(e){return Ut.test(e)}function nn(e){return Ht.test(e)}function on(e){var t,r=[];while(!(t=e.next()).done){r.push(t.value)}return r}function an(e){var t=-1,r=Array(e.size);e.forEach((function(e,n){r[++t]=[n,e]}));return r}function sn(e,t){return function(r){return e(t(r))}}function un(e,t){var r=-1,n=e.length,i=0,o=[];while(++r<n){var a=e[r];if(a===t||a===c){e[r]=c;o[i++]=r}}return o}function ln(e){var t=-1,r=Array(e.size);e.forEach((function(e){r[++t]=e}));return r}function cn(e){var t=-1,r=Array(e.size);e.forEach((function(e){r[++t]=[e,e]}));return r}function fn(e,t,r){var n=r-1,i=e.length;while(++n<i){if(e[n]===t){return n}}return-1}function pn(e,t,r){var n=r+1;while(n--){if(e[n]===t){return n}}return n}function hn(e){return rn(e)?mn(e):Mr(e)}function dn(e){return rn(e)?yn(e):Nr(e)}function vn(e){var t=e.length;while(t--&&Le.test(e.charAt(t))){}return t}var gn=Pr(Zt);function mn(e){var t=qt.lastIndex=0;while(qt.test(e)){++t}return t}function yn(e){return e.match(qt)||[]}function bn(e){return e.match(Wt)||[]}var _n=function e(t){t=t==null?ir:wn.defaults(ir.Object(),t,wn.pick(ir,Jt));var Le=t.Array,Be=t.Date,Qe=t.Error,et=t.Function,tt=t.Math,rt=t.Object,nt=t.RegExp,it=t.String,ot=t.TypeError;var at=Le.prototype,st=et.prototype,ut=rt.prototype;var lt=t["__core-js_shared__"];var ct=st.toString;var ft=ut.hasOwnProperty;var pt=0;var ht=function(){var e=/[^.]+$/.exec(lt&&lt.keys&&lt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var dt=ut.toString;var vt=ct.call(rt);var gt=ir._;var mt=nt("^"+ct.call(ft).replace(Se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var yt=sr?t.Buffer:r,bt=t.Symbol,_t=t.Uint8Array,wt=yt?yt.allocUnsafe:r,kt=sn(rt.getPrototypeOf,rt),xt=rt.create,Ot=ut.propertyIsEnumerable,Tt=at.splice,It=bt?bt.isConcatSpreadable:r,Dt=bt?bt.iterator:r,jt=bt?bt.toStringTag:r;var Mt=function(){try{var e=Ga(rt,"defineProperty");e({},"",{});return e}catch(e){}}();var Nt=t.clearTimeout!==ir.clearTimeout&&t.clearTimeout,Et=Be&&Be.now!==ir.Date.now&&Be.now,At=t.setTimeout!==ir.setTimeout&&t.setTimeout;var St=tt.ceil,Ct=tt.floor,zt=rt.getOwnPropertySymbols,Lt=yt?yt.isBuffer:r,Ft=t.isFinite,Rt=at.join,Pt=sn(rt.keys,rt),qt=tt.max,Wt=tt.min,Ut=Be.now,Ht=t.parseInt,Yt=tt.random,Xt=at.reverse;var Zt=Ga(t,"DataView"),Qt=Ga(t,"Map"),rr=Ga(t,"Promise"),nr=Ga(t,"Set"),or=Ga(t,"WeakMap"),ar=Ga(rt,"create");var ur=or&&new or;var lr={};var Mr=As(Zt),Nr=As(Qt),Pr=As(rr),fn=As(nr),mn=As(or);var yn=bt?bt.prototype:r,_n=yn?yn.valueOf:r,kn=yn?yn.toString:r;function xn(e){if(Tc(e)&&!uc(e)&&!(e instanceof Dn)){if(e instanceof In){return e}if(ft.call(e,"__wrapped__")){return Cs(e)}}return new In(e)}var On=function(){function e(){}return function(t){if(!Oc(t)){return{}}if(xt){return xt(t)}e.prototype=t;var n=new e;e.prototype=r;return n}}();function Tn(){}function In(e,t){this.__wrapped__=e;this.__actions__=[];this.__chain__=!!t;this.__index__=0;this.__values__=r}xn.templateSettings={escape:De,evaluate:je,interpolate:Me,variable:"",imports:{_:xn}};xn.prototype=Tn.prototype;xn.prototype.constructor=xn;In.prototype=On(Tn.prototype);In.prototype.constructor=In;function Dn(e){this.__wrapped__=e;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=F;this.__views__=[]}function jn(){var e=new Dn(this.__wrapped__);e.__actions__=ia(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=ia(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=ia(this.__views__);return e}function Mn(){if(this.__filtered__){var e=new Dn(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}function Nn(){var e=this.__wrapped__.value(),t=this.__dir__,r=uc(e),n=t<0,i=r?e.length:0,o=Za(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=n?s:a-1,c=this.__iteratees__,f=c.length,p=0,h=Wt(u,this.__takeCount__);if(!r||!n&&i==u&&h==u){return Po(e,this.__actions__)}var d=[];e:while(u--&&p<h){l+=t;var v=-1,g=e[l];while(++v<f){var m=c[v],y=m.iteratee,b=m.type,_=y(g);if(b==E){g=_}else if(!_){if(b==N){continue e}else{break e}}}d[p++]=g}return d}Dn.prototype=On(Tn.prototype);Dn.prototype.constructor=Dn;function En(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function An(){this.__data__=ar?ar(null):{};this.size=0}function Sn(e){var t=this.has(e)&&delete this.__data__[e];this.size-=t?1:0;return t}function Cn(e){var t=this.__data__;if(ar){var n=t[e];return n===u?r:n}return ft.call(t,e)?t[e]:r}function zn(e){var t=this.__data__;return ar?t[e]!==r:ft.call(t,e)}function Ln(e,t){var n=this.__data__;this.size+=this.has(e)?0:1;n[e]=ar&&t===r?u:t;return this}En.prototype.clear=An;En.prototype["delete"]=Sn;En.prototype.get=Cn;En.prototype.has=zn;En.prototype.set=Ln;function Fn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function Rn(){this.__data__=[];this.size=0}function Pn(e){var t=this.__data__,r=ci(t,e);if(r<0){return false}var n=t.length-1;if(r==n){t.pop()}else{Tt.call(t,r,1)}--this.size;return true}function Bn(e){var t=this.__data__,n=ci(t,e);return n<0?r:t[n][1]}function Vn(e){return ci(this.__data__,e)>-1}function qn(e,t){var r=this.__data__,n=ci(r,e);if(n<0){++this.size;r.push([e,t])}else{r[n][1]=t}return this}Fn.prototype.clear=Rn;Fn.prototype["delete"]=Pn;Fn.prototype.get=Bn;Fn.prototype.has=Vn;Fn.prototype.set=qn;function Wn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function Un(){this.size=0;this.__data__={hash:new En,map:new(Qt||Fn),string:new En}}function Hn(e){var t=Ha(this,e)["delete"](e);this.size-=t?1:0;return t}function Jn(e){return Ha(this,e).get(e)}function Gn(e){return Ha(this,e).has(e)}function Kn(e,t){var r=Ha(this,e),n=r.size;r.set(e,t);this.size+=r.size==n?0:1;return this}Wn.prototype.clear=Un;Wn.prototype["delete"]=Hn;Wn.prototype.get=Jn;Wn.prototype.has=Gn;Wn.prototype.set=Kn;function $n(e){var t=-1,r=e==null?0:e.length;this.__data__=new Wn;while(++t<r){this.add(e[t])}}function Yn(e){this.__data__.set(e,u);return this}function Xn(e){return this.__data__.has(e)}$n.prototype.add=$n.prototype.push=Yn;$n.prototype.has=Xn;function Zn(e){var t=this.__data__=new Fn(e);this.size=t.size}function Qn(){this.__data__=new Fn;this.size=0}function ei(e){var t=this.__data__,r=t["delete"](e);this.size=t.size;return r}function ti(e){return this.__data__.get(e)}function ri(e){return this.__data__.has(e)}function ni(e,t){var r=this.__data__;if(r instanceof Fn){var n=r.__data__;if(!Qt||n.length<i-1){n.push([e,t]);this.size=++r.size;return this}r=this.__data__=new Wn(n)}r.set(e,t);this.size=r.size;return this}Zn.prototype.clear=Qn;Zn.prototype["delete"]=ei;Zn.prototype.get=ti;Zn.prototype.has=ri;Zn.prototype.set=ni;function ii(e,t){var r=uc(e),n=!r&&sc(e),i=!r&&!n&&hc(e),o=!r&&!n&&!i&&Bc(e),a=r||n||i||o,s=a?Wr(e.length,it):[],u=s.length;for(var l in e){if((t||ft.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||as(l,u)))){s.push(l)}}return s}function oi(e){var t=e.length;return t?e[yo(0,t-1)]:r}function ai(e,t){return Ms(ia(e),gi(t,0,e.length))}function si(e){return Ms(ia(e))}function ui(e,t,n){if(n!==r&&!ic(e[t],n)||n===r&&!(t in e)){di(e,t,n)}}function li(e,t,n){var i=e[t];if(!(ft.call(e,t)&&ic(i,n))||n===r&&!(t in e)){di(e,t,n)}}function ci(e,t){var r=e.length;while(r--){if(ic(e[r][0],t)){return r}}return-1}function fi(e,t,r,n){ki(e,(function(e,i,o){t(n,e,r(e),o)}));return n}function pi(e,t){return e&&oa(t,xf(t),e)}function hi(e,t){return e&&oa(t,Of(t),e)}function di(e,t,r){if(t=="__proto__"&&Mt){Mt(e,t,{configurable:true,enumerable:true,value:r,writable:true})}else{e[t]=r}}function vi(e,t){var n=-1,i=t.length,o=Le(i),a=e==null;while(++n<i){o[n]=a?r:mf(e,t[n])}return o}function gi(e,t,n){if(e===e){if(n!==r){e=e<=n?e:n}if(t!==r){e=e>=t?e:t}}return e}function mi(e,t,n,i,o,a){var s,u=t&f,l=t&p,c=t&h;if(n){s=o?n(e,i,o,a):n(e)}if(s!==r){return s}if(!Oc(e)){return e}var d=uc(e);if(d){s=ts(e);if(!u){return ia(e,s)}}else{var v=Xa(e),g=v==K||v==$;if(hc(e)){return Ko(e,u)}if(v==Q||v==V||g&&!o){s=l||g?{}:rs(e);if(!u){return l?sa(e,hi(s,e)):aa(e,pi(s,e))}}else{if(!$t[v]){return o?e:{}}s=ns(e,v,u)}}a||(a=new Zn);var m=a.get(e);if(m){return m}a.set(e,s);if(Fc(e)){e.forEach((function(r){s.add(mi(r,t,n,r,e,a))}))}else if(Ic(e)){e.forEach((function(r,i){s.set(i,mi(r,t,n,i,e,a))}))}var y=c?l?Ba:Pa:l?Of:xf;var b=d?r:y(e);yr(b||e,(function(r,i){if(b){i=r;r=e[i]}li(s,i,mi(r,t,n,i,e,a))}));return s}function yi(e){var t=xf(e);return function(r){return bi(r,e,t)}}function bi(e,t,n){var i=n.length;if(e==null){return!i}e=rt(e);while(i--){var o=n[i],a=t[o],s=e[o];if(s===r&&!(o in e)||!a(s)){return false}}return true}function _i(e,t,n){if(typeof e!="function"){throw new ot(a)}return Ts((function(){e.apply(r,n)}),t)}function wi(e,t,r,n){var o=-1,a=kr,s=true,u=e.length,l=[],c=t.length;if(!u){return l}if(r){t=Or(t,Jr(r))}if(n){a=xr;s=false}else if(t.length>=i){a=Kr;s=false;t=new $n(t)}e:while(++o<u){var f=e[o],p=r==null?f:r(f);f=n||f!==0?f:0;if(s&&p===p){var h=c;while(h--){if(t[h]===p){continue e}}l.push(f)}else if(!a(t,p,n)){l.push(f)}}return l}var ki=ca(Ei);var xi=ca(Ai,true);function Oi(e,t){var r=true;ki(e,(function(e,n,i){r=!!t(e,n,i);return r}));return r}function Ti(e,t,n){var i=-1,o=e.length;while(++i<o){var a=e[i],s=t(a);if(s!=null&&(u===r?s===s&&!Pc(s):n(s,u))){var u=s,l=a}}return l}function Ii(e,t,n,i){var o=e.length;n=Kc(n);if(n<0){n=-n>o?0:o+n}i=i===r||i>o?o:Kc(i);if(i<0){i+=o}i=n>i?0:$c(i);while(n<i){e[n++]=t}return e}function Di(e,t){var r=[];ki(e,(function(e,n,i){if(t(e,n,i)){r.push(e)}}));return r}function ji(e,t,r,n,i){var o=-1,a=e.length;r||(r=os);i||(i=[]);while(++o<a){var s=e[o];if(t>0&&r(s)){if(t>1){ji(s,t-1,r,n,i)}else{Tr(i,s)}}else if(!n){i[i.length]=s}}return i}var Mi=fa();var Ni=fa(true);function Ei(e,t){return e&&Mi(e,t,xf)}function Ai(e,t){return e&&Ni(e,t,xf)}function Si(e,t){return wr(t,(function(t){return wc(e[t])}))}function Ci(e,t){t=Uo(t,e);var n=0,i=t.length;while(e!=null&&n<i){e=e[Es(t[n++])]}return n&&n==i?e:r}function zi(e,t,r){var n=t(e);return uc(e)?n:Tr(n,r(e))}function Li(e){if(e==null){return e===r?ae:Z}return jt&&jt in rt(e)?Ka(e):bs(e)}function Fi(e,t){return e>t}function Ri(e,t){return e!=null&&ft.call(e,t)}function Pi(e,t){return e!=null&&t in rt(e)}function Bi(e,t,r){return e>=Wt(t,r)&&e<qt(t,r)}function Vi(e,t,n){var i=n?xr:kr,o=e[0].length,a=e.length,s=a,u=Le(a),l=Infinity,c=[];while(s--){var f=e[s];if(s&&t){f=Or(f,Jr(t))}l=Wt(f.length,l);u[s]=!n&&(t||o>=120&&f.length>=120)?new $n(s&&f):r}f=e[0];var p=-1,h=u[0];e:while(++p<o&&c.length<l){var d=f[p],v=t?t(d):d;d=n||d!==0?d:0;if(!(h?Kr(h,v):i(c,v,n))){s=a;while(--s){var g=u[s];if(!(g?Kr(g,v):i(e[s],v,n))){continue e}}if(h){h.push(v)}c.push(d)}}return c}function qi(e,t,r,n){Ei(e,(function(e,i,o){t(n,r(e),i,o)}));return n}function Wi(e,t,n){t=Uo(t,e);e=ws(e,t);var i=e==null?e:e[Es(ou(t))];return i==null?r:gr(i,e,n)}function Ui(e){return Tc(e)&&Li(e)==V}function Hi(e){return Tc(e)&&Li(e)==le}function Ji(e){return Tc(e)&&Li(e)==H}function Gi(e,t,r,n,i){if(e===t){return true}if(e==null||t==null||!Tc(e)&&!Tc(t)){return e!==e&&t!==t}return Ki(e,t,r,n,Gi,i)}function Ki(e,t,r,n,i,o){var a=uc(e),s=uc(t),u=a?q:Xa(e),l=s?q:Xa(t);u=u==V?Q:u;l=l==V?Q:l;var c=u==Q,f=l==Q,p=u==l;if(p&&hc(e)){if(!hc(t)){return false}a=true;c=false}if(p&&!c){o||(o=new Zn);return a||Bc(e)?za(e,t,r,n,i,o):La(e,t,u,r,n,i,o)}if(!(r&d)){var h=c&&ft.call(e,"__wrapped__"),v=f&&ft.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,m=v?t.value():t;o||(o=new Zn);return i(g,m,r,n,o)}}if(!p){return false}o||(o=new Zn);return Fa(e,t,r,n,i,o)}function $i(e){return Tc(e)&&Xa(e)==Y}function Yi(e,t,n,i){var o=n.length,a=o,s=!i;if(e==null){return!a}e=rt(e);while(o--){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e)){return false}}while(++o<a){u=n[o];var l=u[0],c=e[l],f=u[1];if(s&&u[2]){if(c===r&&!(l in e)){return false}}else{var p=new Zn;if(i){var h=i(c,f,l,e,t,p)}if(!(h===r?Gi(f,c,d|v,i,p):h)){return false}}}return true}function Xi(e){if(!Oc(e)||fs(e)){return false}var t=wc(e)?mt:Ge;return t.test(As(e))}function Zi(e){return Tc(e)&&Li(e)==re}function Qi(e){return Tc(e)&&Xa(e)==ne}function eo(e){return Tc(e)&&xc(e.length)&&!!Kt[Li(e)]}function to(e){if(typeof e=="function"){return e}if(e==null){return Ep}if(typeof e=="object"){return uc(e)?so(e[0],e[1]):ao(e)}return Up(e)}function ro(e){if(!hs(e)){return Pt(e)}var t=[];for(var r in rt(e)){if(ft.call(e,r)&&r!="constructor"){t.push(r)}}return t}function no(e){if(!Oc(e)){return ys(e)}var t=hs(e),r=[];for(var n in e){if(!(n=="constructor"&&(t||!ft.call(e,n)))){r.push(n)}}return r}function io(e,t){return e<t}function oo(e,t){var r=-1,n=cc(e)?Le(e.length):[];ki(e,(function(e,i,o){n[++r]=t(e,i,o)}));return n}function ao(e){var t=Ja(e);if(t.length==1&&t[0][2]){return vs(t[0][0],t[0][1])}return function(r){return r===e||Yi(r,e,t)}}function so(e,t){if(us(e)&&ds(t)){return vs(Es(e),t)}return function(n){var i=mf(n,e);return i===r&&i===t?bf(n,e):Gi(t,i,d|v)}}function uo(e,t,n,i,o){if(e===t){return}Mi(t,(function(a,s){o||(o=new Zn);if(Oc(a)){lo(e,t,s,n,uo,i,o)}else{var u=i?i(xs(e,s),a,s+"",e,t,o):r;if(u===r){u=a}ui(e,s,u)}}),Of)}function lo(e,t,n,i,o,a,s){var u=xs(e,n),l=xs(t,n),c=s.get(l);if(c){ui(e,n,c);return}var f=a?a(u,l,n+"",e,t,s):r;var p=f===r;if(p){var h=uc(l),d=!h&&hc(l),v=!h&&!d&&Bc(l);f=l;if(h||d||v){if(uc(u)){f=u}else if(fc(u)){f=ia(u)}else if(d){p=false;f=Ko(l,true)}else if(v){p=false;f=Qo(l,true)}else{f=[]}}else if(Cc(l)||sc(l)){f=u;if(sc(u)){f=Xc(u)}else if(!Oc(u)||wc(u)){f=rs(l)}}else{p=false}}if(p){s.set(l,f);o(f,l,i,a,s);s["delete"](l)}ui(e,n,f)}function co(e,t){var n=e.length;if(!n){return}t+=t<0?n:0;return as(t,n)?e[t]:r}function fo(e,t,r){if(t.length){t=Or(t,(function(e){if(uc(e)){return function(t){return Ci(t,e.length===1?e[0]:e)}}return e}))}else{t=[Ep]}var n=-1;t=Or(t,Jr(Ua()));var i=oo(e,(function(e,r,i){var o=Or(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return Vr(i,(function(e,t){return ta(e,t,r)}))}function po(e,t){return ho(e,t,(function(t,r){return bf(e,r)}))}function ho(e,t,r){var n=-1,i=t.length,o={};while(++n<i){var a=t[n],s=Ci(e,a);if(r(s,a)){Oo(o,Uo(a,e),s)}}return o}function vo(e){return function(t){return Ci(t,e)}}function go(e,t,r,n){var i=n?zr:Cr,o=-1,a=t.length,s=e;if(e===t){t=ia(t)}if(r){s=Or(e,Jr(r))}while(++o<a){var u=0,l=t[o],c=r?r(l):l;while((u=i(s,c,u,n))>-1){if(s!==e){Tt.call(s,u,1)}Tt.call(e,u,1)}}return e}function mo(e,t){var r=e?t.length:0,n=r-1;while(r--){var i=t[r];if(r==n||i!==o){var o=i;if(as(i)){Tt.call(e,i,1)}else{Lo(e,i)}}}return e}function yo(e,t){return e+Ct(Yt()*(t-e+1))}function bo(e,t,r,n){var i=-1,o=qt(St((t-e)/(r||1)),0),a=Le(o);while(o--){a[n?o:++i]=e;e+=r}return a}function _o(e,t){var r="";if(!e||t<1||t>C){return r}do{if(t%2){r+=e}t=Ct(t/2);if(t){e+=e}}while(t);return r}function wo(e,t){return Is(_s(e,t,Ep),e+"")}function ko(e){return oi(qf(e))}function xo(e,t){var r=qf(e);return Ms(r,gi(t,0,r.length))}function Oo(e,t,n,i){if(!Oc(e)){return e}t=Uo(t,e);var o=-1,a=t.length,s=a-1,u=e;while(u!=null&&++o<a){var l=Es(t[o]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype"){return e}if(o!=s){var f=u[l];c=i?i(f,l,u):r;if(c===r){c=Oc(f)?f:as(t[o+1])?[]:{}}}li(u,l,c);u=u[l]}return e}var To=!ur?Ep:function(e,t){ur.set(e,t);return e};var Io=!Mt?Ep:function(e,t){return Mt(e,"toString",{configurable:true,enumerable:false,value:Dp(t),writable:true})};function Do(e){return Ms(qf(e))}function jo(e,t,r){var n=-1,i=e.length;if(t<0){t=-t>i?0:i+t}r=r>i?i:r;if(r<0){r+=i}i=t>r?0:r-t>>>0;t>>>=0;var o=Le(i);while(++n<i){o[n]=e[n+t]}return o}function Mo(e,t){var r;ki(e,(function(e,n,i){r=t(e,n,i);return!r}));return!!r}function No(e,t,r){var n=0,i=e==null?n:e.length;if(typeof t=="number"&&t===t&&i<=P){while(n<i){var o=n+i>>>1,a=e[o];if(a!==null&&!Pc(a)&&(r?a<=t:a<t)){n=o+1}else{i=o}}return i}return Eo(e,t,Ep,r)}function Eo(e,t,n,i){var o=0,a=e==null?0:e.length;if(a===0){return 0}t=n(t);var s=t!==t,u=t===null,l=Pc(t),c=t===r;while(o<a){var f=Ct((o+a)/2),p=n(e[f]),h=p!==r,d=p===null,v=p===p,g=Pc(p);if(s){var m=i||v}else if(c){m=v&&(i||h)}else if(u){m=v&&h&&(i||!d)}else if(l){m=v&&h&&!d&&(i||!g)}else if(d||g){m=false}else{m=i?p<=t:p<t}if(m){o=f+1}else{a=f}}return Wt(a,R)}function Ao(e,t){var r=-1,n=e.length,i=0,o=[];while(++r<n){var a=e[r],s=t?t(a):a;if(!r||!ic(s,u)){var u=s;o[i++]=a===0?0:a}}return o}function So(e){if(typeof e=="number"){return e}if(Pc(e)){return L}return+e}function Co(e){if(typeof e=="string"){return e}if(uc(e)){return Or(e,Co)+""}if(Pc(e)){return kn?kn.call(e):""}var t=e+"";return t=="0"&&1/e==-S?"-0":t}function zo(e,t,r){var n=-1,o=kr,a=e.length,s=true,u=[],l=u;if(r){s=false;o=xr}else if(a>=i){var c=t?null:Ma(e);if(c){return ln(c)}s=false;o=Kr;l=new $n}else{l=t?[]:u}e:while(++n<a){var f=e[n],p=t?t(f):f;f=r||f!==0?f:0;if(s&&p===p){var h=l.length;while(h--){if(l[h]===p){continue e}}if(t){l.push(p)}u.push(f)}else if(!o(l,p,r)){if(l!==u){l.push(p)}u.push(f)}}return u}function Lo(e,t){t=Uo(t,e);e=ws(e,t);return e==null||delete e[Es(ou(t))]}function Fo(e,t,r,n){return Oo(e,t,r(Ci(e,t)),n)}function Ro(e,t,r,n){var i=e.length,o=n?i:-1;while((n?o--:++o<i)&&t(e[o],o,e)){}return r?jo(e,n?0:o,n?o+1:i):jo(e,n?o+1:0,n?i:o)}function Po(e,t){var r=e;if(r instanceof Dn){r=r.value()}return Ir(t,(function(e,t){return t.func.apply(t.thisArg,Tr([e],t.args))}),r)}function Bo(e,t,r){var n=e.length;if(n<2){return n?zo(e[0]):[]}var i=-1,o=Le(n);while(++i<n){var a=e[i],s=-1;while(++s<n){if(s!=i){o[i]=wi(o[i]||a,e[s],t,r)}}}return zo(ji(o,1),t,r)}function Vo(e,t,n){var i=-1,o=e.length,a=t.length,s={};while(++i<o){var u=i<a?t[i]:r;n(s,e[i],u)}return s}function qo(e){return fc(e)?e:[]}function Wo(e){return typeof e=="function"?e:Ep}function Uo(e,t){if(uc(e)){return e}return us(e,t)?[e]:Ns(Qc(e))}var Ho=wo;function Jo(e,t,n){var i=e.length;n=n===r?i:n;return!t&&n>=i?e:jo(e,t,n)}var Go=Nt||function(e){return ir.clearTimeout(e)};function Ko(e,t){if(t){return e.slice()}var r=e.length,n=wt?wt(r):new e.constructor(r);e.copy(n);return n}function $o(e){var t=new e.constructor(e.byteLength);new _t(t).set(new _t(e));return t}function Yo(e,t){var r=t?$o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Xo(e){var t=new e.constructor(e.source,Ue.exec(e));t.lastIndex=e.lastIndex;return t}function Zo(e){return _n?rt(_n.call(e)):{}}function Qo(e,t){var r=t?$o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function ea(e,t){if(e!==t){var n=e!==r,i=e===null,o=e===e,a=Pc(e);var s=t!==r,u=t===null,l=t===t,c=Pc(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||i&&s&&l||!n&&l||!o){return 1}if(!i&&!a&&!c&&e<t||c&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!l){return-1}}return 0}function ta(e,t,r){var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;while(++n<a){var u=ea(i[n],o[n]);if(u){if(n>=s){return u}var l=r[n];return u*(l=="desc"?-1:1)}}return e.index-t.index}function ra(e,t,r,n){var i=-1,o=e.length,a=r.length,s=-1,u=t.length,l=qt(o-a,0),c=Le(u+l),f=!n;while(++s<u){c[s]=t[s]}while(++i<a){if(f||i<o){c[r[i]]=e[i]}}while(l--){c[s++]=e[i++]}return c}function na(e,t,r,n){var i=-1,o=e.length,a=-1,s=r.length,u=-1,l=t.length,c=qt(o-s,0),f=Le(c+l),p=!n;while(++i<c){f[i]=e[i]}var h=i;while(++u<l){f[h+u]=t[u]}while(++a<s){if(p||i<o){f[h+r[a]]=e[i++]}}return f}function ia(e,t){var r=-1,n=e.length;t||(t=Le(n));while(++r<n){t[r]=e[r]}return t}function oa(e,t,n,i){var o=!n;n||(n={});var a=-1,s=t.length;while(++a<s){var u=t[a];var l=i?i(n[u],e[u],u,n,e):r;if(l===r){l=e[u]}if(o){di(n,u,l)}else{li(n,u,l)}}return n}function aa(e,t){return oa(e,$a(e),t)}function sa(e,t){return oa(e,Ya(e),t)}function ua(e,t){return function(r,n){var i=uc(r)?mr:fi,o=t?t():{};return i(r,e,Ua(n,2),o)}}function la(e){return wo((function(t,n){var i=-1,o=n.length,a=o>1?n[o-1]:r,s=o>2?n[2]:r;a=e.length>3&&typeof a=="function"?(o--,a):r;if(s&&ss(n[0],n[1],s)){a=o<3?r:a;o=1}t=rt(t);while(++i<o){var u=n[i];if(u){e(t,u,i,a)}}return t}))}function ca(e,t){return function(r,n){if(r==null){return r}if(!cc(r)){return e(r,n)}var i=r.length,o=t?i:-1,a=rt(r);while(t?o--:++o<i){if(n(a[o],o,a)===false){break}}return r}}function fa(e){return function(t,r,n){var i=-1,o=rt(t),a=n(t),s=a.length;while(s--){var u=a[e?s:++i];if(r(o[u],u,o)===false){break}}return t}}function pa(e,t,r){var n=t&g,i=va(e);function o(){var t=this&&this!==ir&&this instanceof o?i:e;return t.apply(n?r:this,arguments)}return o}function ha(e){return function(t){t=Qc(t);var n=rn(t)?dn(t):r;var i=n?n[0]:t.charAt(0);var o=n?Jo(n,1).join(""):t.slice(1);return i[e]()+o}}function da(e){return function(t){return Ir(kp($f(t).replace(Bt,"")),e,"")}}function va(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=On(e.prototype),n=e.apply(r,t);return Oc(n)?n:r}}function ga(e,t,n){var i=va(e);function o(){var a=arguments.length,s=Le(a),u=a,l=Wa(o);while(u--){s[u]=arguments[u]}var c=a<3&&s[0]!==l&&s[a-1]!==l?[]:un(s,l);a-=c.length;if(a<n){return Da(e,t,ba,o.placeholder,r,s,c,r,r,n-a)}var f=this&&this!==ir&&this instanceof o?i:e;return gr(f,this,s)}return o}function ma(e){return function(t,n,i){var o=rt(t);if(!cc(t)){var a=Ua(n,3);t=xf(t);n=function(e){return a(o[e],e,o)}}var s=e(t,n,i);return s>-1?o[a?t[s]:s]:r}}function ya(e){return Ra((function(t){var n=t.length,i=n,o=In.prototype.thru;if(e){t.reverse()}while(i--){var s=t[i];if(typeof s!="function"){throw new ot(a)}if(o&&!u&&qa(s)=="wrapper"){var u=new In([],true)}}i=u?i:n;while(++i<n){s=t[i];var l=qa(s),c=l=="wrapper"?Va(s):r;if(c&&cs(c[0])&&c[1]==(x|b|w|O)&&!c[4].length&&c[9]==1){u=u[qa(c[0])].apply(u,c[3])}else{u=s.length==1&&cs(s)?u[l]():u.thru(s)}}return function(){var e=arguments,r=e[0];if(u&&e.length==1&&uc(r)){return u.plant(r).value()}var i=0,o=n?t[i].apply(this,e):r;while(++i<n){o=t[i].call(this,o)}return o}}))}function ba(e,t,n,i,o,a,s,u,l,c){var f=t&x,p=t&g,h=t&m,d=t&(b|_),v=t&T,y=h?r:va(e);function w(){var r=arguments.length,g=Le(r),m=r;while(m--){g[m]=arguments[m]}if(d){var b=Wa(w),_=Xr(g,b)}if(i){g=ra(g,i,o,d)}if(a){g=na(g,a,s,d)}r-=_;if(d&&r<c){var k=un(g,b);return Da(e,t,ba,w.placeholder,n,g,k,u,l,c-r)}var x=p?n:this,O=h?x[e]:e;r=g.length;if(u){g=ks(g,u)}else if(v&&r>1){g.reverse()}if(f&&l<r){g.length=l}if(this&&this!==ir&&this instanceof w){O=y||va(O)}return O.apply(x,g)}return w}function _a(e,t){return function(r,n){return qi(r,e,t(n),{})}}function wa(e,t){return function(n,i){var o;if(n===r&&i===r){return t}if(n!==r){o=n}if(i!==r){if(o===r){return i}if(typeof n=="string"||typeof i=="string"){n=Co(n);i=Co(i)}else{n=So(n);i=So(i)}o=e(n,i)}return o}}function ka(e){return Ra((function(t){t=Or(t,Jr(Ua()));return wo((function(r){var n=this;return e(t,(function(e){return gr(e,n,r)}))}))}))}function xa(e,t){t=t===r?" ":Co(t);var n=t.length;if(n<2){return n?_o(t,e):t}var i=_o(t,St(e/hn(t)));return rn(t)?Jo(dn(i),0,e).join(""):i.slice(0,e)}function Oa(e,t,r,n){var i=t&g,o=va(e);function a(){var t=-1,s=arguments.length,u=-1,l=n.length,c=Le(l+s),f=this&&this!==ir&&this instanceof a?o:e;while(++u<l){c[u]=n[u]}while(s--){c[u++]=arguments[++t]}return gr(f,i?r:this,c)}return a}function Ta(e){return function(t,n,i){if(i&&typeof i!="number"&&ss(t,n,i)){n=i=r}t=Gc(t);if(n===r){n=t;t=0}else{n=Gc(n)}i=i===r?t<n?1:-1:Gc(i);return bo(t,n,i,e)}}function Ia(e){return function(t,r){if(!(typeof t=="string"&&typeof r=="string")){t=Yc(t);r=Yc(r)}return e(t,r)}}function Da(e,t,n,i,o,a,s,u,l,c){var f=t&b,p=f?s:r,h=f?r:s,d=f?a:r,v=f?r:a;t|=f?w:k;t&=~(f?k:w);if(!(t&y)){t&=~(g|m)}var _=[e,t,o,d,p,v,h,u,l,c];var x=n.apply(r,_);if(cs(e)){Os(x,_)}x.placeholder=i;return Ds(x,e,t)}function ja(e){var t=tt[e];return function(e,r){e=Yc(e);r=r==null?0:Wt(Kc(r),292);if(r&&Ft(e)){var n=(Qc(e)+"e").split("e"),i=t(n[0]+"e"+(+n[1]+r));n=(Qc(i)+"e").split("e");return+(n[0]+"e"+(+n[1]-r))}return t(e)}}var Ma=!(nr&&1/ln(new nr([,-0]))[1]==S)?Pp:function(e){return new nr(e)};function Na(e){return function(t){var r=Xa(t);if(r==Y){return an(t)}if(r==ne){return cn(t)}return Ur(t,e(t))}}function Ea(e,t,n,i,o,s,u,l){var c=t&m;if(!c&&typeof e!="function"){throw new ot(a)}var f=i?i.length:0;if(!f){t&=~(w|k);i=o=r}u=u===r?u:qt(Kc(u),0);l=l===r?l:Kc(l);f-=o?o.length:0;if(t&k){var p=i,h=o;i=o=r}var d=c?r:Va(e);var v=[e,t,n,i,o,p,h,s,u,l];if(d){ms(v,d)}e=v[0];t=v[1];n=v[2];i=v[3];o=v[4];l=v[9]=v[9]===r?c?0:e.length:qt(v[9]-f,0);if(!l&&t&(b|_)){t&=~(b|_)}if(!t||t==g){var y=pa(e,t,n)}else if(t==b||t==_){y=ga(e,t,l)}else if((t==w||t==(g|w))&&!o.length){y=Oa(e,t,n,i)}else{y=ba.apply(r,v)}var x=d?To:Os;return Ds(x(y,v),e,t)}function Aa(e,t,n,i){if(e===r||ic(e,ut[n])&&!ft.call(i,n)){return t}return e}function Sa(e,t,n,i,o,a){if(Oc(e)&&Oc(t)){a.set(t,e);uo(e,t,r,Sa,a);a["delete"](t)}return e}function Ca(e){return Cc(e)?r:e}function za(e,t,n,i,o,a){var s=n&d,u=e.length,l=t.length;if(u!=l&&!(s&&l>u)){return false}var c=a.get(e);var f=a.get(t);if(c&&f){return c==t&&f==e}var p=-1,h=true,g=n&v?new $n:r;a.set(e,t);a.set(t,e);while(++p<u){var m=e[p],y=t[p];if(i){var b=s?i(y,m,p,t,e,a):i(m,y,p,e,t,a)}if(b!==r){if(b){continue}h=false;break}if(g){if(!jr(t,(function(e,t){if(!Kr(g,t)&&(m===e||o(m,e,n,i,a))){return g.push(t)}}))){h=false;break}}else if(!(m===y||o(m,y,n,i,a))){h=false;break}}a["delete"](e);a["delete"](t);return h}function La(e,t,r,n,i,o,a){switch(r){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset){return false}e=e.buffer;t=t.buffer;case le:if(e.byteLength!=t.byteLength||!o(new _t(e),new _t(t))){return false}return true;case U:case H:case X:return ic(+e,+t);case G:return e.name==t.name&&e.message==t.message;case re:case ie:return e==t+"";case Y:var s=an;case ne:var u=n&d;s||(s=ln);if(e.size!=t.size&&!u){return false}var l=a.get(e);if(l){return l==t}n|=v;a.set(e,t);var c=za(s(e),s(t),n,i,o,a);a["delete"](e);return c;case oe:if(_n){return _n.call(e)==_n.call(t)}}return false}function Fa(e,t,n,i,o,a){var s=n&d,u=Pa(e),l=u.length,c=Pa(t),f=c.length;if(l!=f&&!s){return false}var p=l;while(p--){var h=u[p];if(!(s?h in t:ft.call(t,h))){return false}}var v=a.get(e);var g=a.get(t);if(v&&g){return v==t&&g==e}var m=true;a.set(e,t);a.set(t,e);var y=s;while(++p<l){h=u[p];var b=e[h],_=t[h];if(i){var w=s?i(_,b,h,t,e,a):i(b,_,h,e,t,a)}if(!(w===r?b===_||o(b,_,n,i,a):w)){m=false;break}y||(y=h=="constructor")}if(m&&!y){var k=e.constructor,x=t.constructor;if(k!=x&&("constructor"in e&&"constructor"in t)&&!(typeof k=="function"&&k instanceof k&&typeof x=="function"&&x instanceof x)){m=false}}a["delete"](e);a["delete"](t);return m}function Ra(e){return Is(_s(e,r,Ks),e+"")}function Pa(e){return zi(e,xf,$a)}function Ba(e){return zi(e,Of,Ya)}var Va=!ur?Pp:function(e){return ur.get(e)};function qa(e){var t=e.name+"",r=lr[t],n=ft.call(lr,t)?r.length:0;while(n--){var i=r[n],o=i.func;if(o==null||o==e){return i.name}}return t}function Wa(e){var t=ft.call(xn,"placeholder")?xn:e;return t.placeholder}function Ua(){var e=xn.iteratee||Ap;e=e===Ap?to:e;return arguments.length?e(arguments[0],arguments[1]):e}function Ha(e,t){var r=e.__data__;return ls(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ja(e){var t=xf(e),r=t.length;while(r--){var n=t[r],i=e[n];t[r]=[n,i,ds(i)]}return t}function Ga(e,t){var n=tn(e,t);return Xi(n)?n:r}function Ka(e){var t=ft.call(e,jt),n=e[jt];try{e[jt]=r;var i=true}catch(e){}var o=dt.call(e);if(i){if(t){e[jt]=n}else{delete e[jt]}}return o}var $a=!zt?Kp:function(e){if(e==null){return[]}e=rt(e);return wr(zt(e),(function(t){return Ot.call(e,t)}))};var Ya=!zt?Kp:function(e){var t=[];while(e){Tr(t,$a(e));e=kt(e)}return t};var Xa=Li;if(Zt&&Xa(new Zt(new ArrayBuffer(1)))!=ce||Qt&&Xa(new Qt)!=Y||rr&&Xa(rr.resolve())!=ee||nr&&Xa(new nr)!=ne||or&&Xa(new or)!=se){Xa=function(e){var t=Li(e),n=t==Q?e.constructor:r,i=n?As(n):"";if(i){switch(i){case Mr:return ce;case Nr:return Y;case Pr:return ee;case fn:return ne;case mn:return se}}return t}}function Za(e,t,r){var n=-1,i=r.length;while(++n<i){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Wt(t,e+a);break;case"takeRight":e=qt(e,t-a);break}}return{start:e,end:t}}function Qa(e){var t=e.match(Re);return t?t[1].split(Pe):[]}function es(e,t,r){t=Uo(t,e);var n=-1,i=t.length,o=false;while(++n<i){var a=Es(t[n]);if(!(o=e!=null&&r(e,a))){break}e=e[a]}if(o||++n!=i){return o}i=e==null?0:e.length;return!!i&&xc(i)&&as(a,i)&&(uc(e)||sc(e))}function ts(e){var t=e.length,r=new e.constructor(t);if(t&&typeof e[0]=="string"&&ft.call(e,"index")){r.index=e.index;r.input=e.input}return r}function rs(e){return typeof e.constructor=="function"&&!hs(e)?On(kt(e)):{}}function ns(e,t,r){var n=e.constructor;switch(t){case le:return $o(e);case U:case H:return new n(+e);case ce:return Yo(e,r);case fe:case pe:case he:case de:case ve:case ge:case me:case ye:case be:return Qo(e,r);case Y:return new n;case X:case ie:return new n(e);case re:return Xo(e);case ne:return new n;case oe:return Zo(e)}}function is(e,t){var r=t.length;if(!r){return e}var n=r-1;t[n]=(r>1?"& ":"")+t[n];t=t.join(r>2?", ":" ");return e.replace(Fe,"{\n/* [wrapped with "+t+"] */\n")}function os(e){return uc(e)||sc(e)||!!(It&&e&&e[It])}function as(e,t){var r=typeof e;t=t==null?C:t;return!!t&&(r=="number"||r!="symbol"&&$e.test(e))&&(e>-1&&e%1==0&&e<t)}function ss(e,t,r){if(!Oc(r)){return false}var n=typeof t;if(n=="number"?cc(r)&&as(t,r.length):n=="string"&&t in r){return ic(r[t],e)}return false}function us(e,t){if(uc(e)){return false}var r=typeof e;if(r=="number"||r=="symbol"||r=="boolean"||e==null||Pc(e)){return true}return Ee.test(e)||!Ne.test(e)||t!=null&&e in rt(t)}function ls(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function cs(e){var t=qa(e),r=xn[t];if(typeof r!="function"||!(t in Dn.prototype)){return false}if(e===r){return true}var n=Va(r);return!!n&&e===n[0]}function fs(e){return!!ht&&ht in e}var ps=lt?wc:$p;function hs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ut;return e===r}function ds(e){return e===e&&!Oc(e)}function vs(e,t){return function(n){if(n==null){return false}return n[e]===t&&(t!==r||e in rt(n))}}function gs(e){var t=Bl(e,(function(e){if(r.size===l){r.clear()}return e}));var r=t.cache;return t}function ms(e,t){var r=e[1],n=t[1],i=r|n,o=i<(g|m|x);var a=n==x&&r==b||n==x&&r==O&&e[7].length<=t[8]||n==(x|O)&&t[7].length<=t[8]&&r==b;if(!(o||a)){return e}if(n&g){e[2]=t[2];i|=r&g?0:y}var s=t[3];if(s){var u=e[3];e[3]=u?ra(u,s,t[4]):s;e[4]=u?un(e[3],c):t[4]}s=t[5];if(s){u=e[5];e[5]=u?na(u,s,t[6]):s;e[6]=u?un(e[5],c):t[6]}s=t[7];if(s){e[7]=s}if(n&x){e[8]=e[8]==null?t[8]:Wt(e[8],t[8])}if(e[9]==null){e[9]=t[9]}e[0]=t[0];e[1]=i;return e}function ys(e){var t=[];if(e!=null){for(var r in rt(e)){t.push(r)}}return t}function bs(e){return dt.call(e)}function _s(e,t,n){t=qt(t===r?e.length-1:t,0);return function(){var r=arguments,i=-1,o=qt(r.length-t,0),a=Le(o);while(++i<o){a[i]=r[t+i]}i=-1;var s=Le(t+1);while(++i<t){s[i]=r[i]}s[t]=n(a);return gr(e,this,s)}}function ws(e,t){return t.length<2?e:Ci(e,jo(t,0,-1))}function ks(e,t){var n=e.length,i=Wt(t.length,n),o=ia(e);while(i--){var a=t[i];e[i]=as(a,n)?o[a]:r}return e}function xs(e,t){if(t==="constructor"&&typeof e[t]==="function"){return}if(t=="__proto__"){return}return e[t]}var Os=js(To);var Ts=At||function(e,t){return ir.setTimeout(e,t)};var Is=js(Io);function Ds(e,t,r){var n=t+"";return Is(e,is(n,Ss(Qa(n),r)))}function js(e){var t=0,n=0;return function(){var i=Ut(),o=M-(i-n);n=i;if(o>0){if(++t>=j){return arguments[0]}}else{t=0}return e.apply(r,arguments)}}function Ms(e,t){var n=-1,i=e.length,o=i-1;t=t===r?i:t;while(++n<t){var a=yo(n,o),s=e[a];e[a]=e[n];e[n]=s}e.length=t;return e}var Ns=gs((function(e){var t=[];if(e.charCodeAt(0)===46){t.push("")}e.replace(Ae,(function(e,r,n,i){t.push(n?i.replace(qe,"$1"):r||e)}));return t}));function Es(e){if(typeof e=="string"||Pc(e)){return e}var t=e+"";return t=="0"&&1/e==-S?"-0":t}function As(e){if(e!=null){try{return ct.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ss(e,t){yr(B,(function(r){var n="_."+r[0];if(t&r[1]&&!kr(e,n)){e.push(n)}}));return e.sort()}function Cs(e){if(e instanceof Dn){return e.clone()}var t=new In(e.__wrapped__,e.__chain__);t.__actions__=ia(e.__actions__);t.__index__=e.__index__;t.__values__=e.__values__;return t}function zs(e,t,n){if(n?ss(e,t,n):t===r){t=1}else{t=qt(Kc(t),0)}var i=e==null?0:e.length;if(!i||t<1){return[]}var o=0,a=0,s=Le(St(i/t));while(o<i){s[a++]=jo(e,o,o+=t)}return s}function Ls(e){var t=-1,r=e==null?0:e.length,n=0,i=[];while(++t<r){var o=e[t];if(o){i[n++]=o}}return i}function Fs(){var e=arguments.length;if(!e){return[]}var t=Le(e-1),r=arguments[0],n=e;while(n--){t[n-1]=arguments[n]}return Tr(uc(r)?ia(r):[r],ji(t,1))}var Rs=wo((function(e,t){return fc(e)?wi(e,ji(t,1,fc,true)):[]}));var Ps=wo((function(e,t){var n=ou(t);if(fc(n)){n=r}return fc(e)?wi(e,ji(t,1,fc,true),Ua(n,2)):[]}));var Bs=wo((function(e,t){var n=ou(t);if(fc(n)){n=r}return fc(e)?wi(e,ji(t,1,fc,true),r,n):[]}));function Vs(e,t,n){var i=e==null?0:e.length;if(!i){return[]}t=n||t===r?1:Kc(t);return jo(e,t<0?0:t,i)}function qs(e,t,n){var i=e==null?0:e.length;if(!i){return[]}t=n||t===r?1:Kc(t);t=i-t;return jo(e,0,t<0?0:t)}function Ws(e,t){return e&&e.length?Ro(e,Ua(t,3),true,true):[]}function Us(e,t){return e&&e.length?Ro(e,Ua(t,3),true):[]}function Hs(e,t,r,n){var i=e==null?0:e.length;if(!i){return[]}if(r&&typeof r!="number"&&ss(e,t,r)){r=0;n=i}return Ii(e,t,r,n)}function Js(e,t,r){var n=e==null?0:e.length;if(!n){return-1}var i=r==null?0:Kc(r);if(i<0){i=qt(n+i,0)}return Sr(e,Ua(t,3),i)}function Gs(e,t,n){var i=e==null?0:e.length;if(!i){return-1}var o=i-1;if(n!==r){o=Kc(n);o=n<0?qt(i+o,0):Wt(o,i-1)}return Sr(e,Ua(t,3),o,true)}function Ks(e){var t=e==null?0:e.length;return t?ji(e,1):[]}function $s(e){var t=e==null?0:e.length;return t?ji(e,S):[]}function Ys(e,t){var n=e==null?0:e.length;if(!n){return[]}t=t===r?1:Kc(t);return ji(e,t)}function Xs(e){var t=-1,r=e==null?0:e.length,n={};while(++t<r){var i=e[t];n[i[0]]=i[1]}return n}function Zs(e){return e&&e.length?e[0]:r}function Qs(e,t,r){var n=e==null?0:e.length;if(!n){return-1}var i=r==null?0:Kc(r);if(i<0){i=qt(n+i,0)}return Cr(e,t,i)}function eu(e){var t=e==null?0:e.length;return t?jo(e,0,-1):[]}var tu=wo((function(e){var t=Or(e,qo);return t.length&&t[0]===e[0]?Vi(t):[]}));var ru=wo((function(e){var t=ou(e),n=Or(e,qo);if(t===ou(n)){t=r}else{n.pop()}return n.length&&n[0]===e[0]?Vi(n,Ua(t,2)):[]}));var nu=wo((function(e){var t=ou(e),n=Or(e,qo);t=typeof t=="function"?t:r;if(t){n.pop()}return n.length&&n[0]===e[0]?Vi(n,r,t):[]}));function iu(e,t){return e==null?"":Rt.call(e,t)}function ou(e){var t=e==null?0:e.length;return t?e[t-1]:r}function au(e,t,n){var i=e==null?0:e.length;if(!i){return-1}var o=i;if(n!==r){o=Kc(n);o=o<0?qt(i+o,0):Wt(o,i-1)}return t===t?pn(e,t,o):Sr(e,Lr,o,true)}function su(e,t){return e&&e.length?co(e,Kc(t)):r}var uu=wo(lu);function lu(e,t){return e&&e.length&&t&&t.length?go(e,t):e}function cu(e,t,r){return e&&e.length&&t&&t.length?go(e,t,Ua(r,2)):e}function fu(e,t,n){return e&&e.length&&t&&t.length?go(e,t,r,n):e}var pu=Ra((function(e,t){var r=e==null?0:e.length,n=vi(e,t);mo(e,Or(t,(function(e){return as(e,r)?+e:e})).sort(ea));return n}));function hu(e,t){var r=[];if(!(e&&e.length)){return r}var n=-1,i=[],o=e.length;t=Ua(t,3);while(++n<o){var a=e[n];if(t(a,n,e)){r.push(a);i.push(n)}}mo(e,i);return r}function du(e){return e==null?e:Xt.call(e)}function vu(e,t,n){var i=e==null?0:e.length;if(!i){return[]}if(n&&typeof n!="number"&&ss(e,t,n)){t=0;n=i}else{t=t==null?0:Kc(t);n=n===r?i:Kc(n)}return jo(e,t,n)}function gu(e,t){return No(e,t)}function mu(e,t,r){return Eo(e,t,Ua(r,2))}function yu(e,t){var r=e==null?0:e.length;if(r){var n=No(e,t);if(n<r&&ic(e[n],t)){return n}}return-1}function bu(e,t){return No(e,t,true)}function _u(e,t,r){return Eo(e,t,Ua(r,2),true)}function wu(e,t){var r=e==null?0:e.length;if(r){var n=No(e,t,true)-1;if(ic(e[n],t)){return n}}return-1}function ku(e){return e&&e.length?Ao(e):[]}function xu(e,t){return e&&e.length?Ao(e,Ua(t,2)):[]}function Ou(e){var t=e==null?0:e.length;return t?jo(e,1,t):[]}function Tu(e,t,n){if(!(e&&e.length)){return[]}t=n||t===r?1:Kc(t);return jo(e,0,t<0?0:t)}function Iu(e,t,n){var i=e==null?0:e.length;if(!i){return[]}t=n||t===r?1:Kc(t);t=i-t;return jo(e,t<0?0:t,i)}function Du(e,t){return e&&e.length?Ro(e,Ua(t,3),false,true):[]}function ju(e,t){return e&&e.length?Ro(e,Ua(t,3)):[]}var Mu=wo((function(e){return zo(ji(e,1,fc,true))}));var Nu=wo((function(e){var t=ou(e);if(fc(t)){t=r}return zo(ji(e,1,fc,true),Ua(t,2))}));var Eu=wo((function(e){var t=ou(e);t=typeof t=="function"?t:r;return zo(ji(e,1,fc,true),r,t)}));function Au(e){return e&&e.length?zo(e):[]}function Su(e,t){return e&&e.length?zo(e,Ua(t,2)):[]}function Cu(e,t){t=typeof t=="function"?t:r;return e&&e.length?zo(e,r,t):[]}function zu(e){if(!(e&&e.length)){return[]}var t=0;e=wr(e,(function(e){if(fc(e)){t=qt(e.length,t);return true}}));return Wr(t,(function(t){return Or(e,Rr(t))}))}function Lu(e,t){if(!(e&&e.length)){return[]}var n=zu(e);if(t==null){return n}return Or(n,(function(e){return gr(t,r,e)}))}var Fu=wo((function(e,t){return fc(e)?wi(e,t):[]}));var Ru=wo((function(e){return Bo(wr(e,fc))}));var Pu=wo((function(e){var t=ou(e);if(fc(t)){t=r}return Bo(wr(e,fc),Ua(t,2))}));var Bu=wo((function(e){var t=ou(e);t=typeof t=="function"?t:r;return Bo(wr(e,fc),r,t)}));var Vu=wo(zu);function qu(e,t){return Vo(e||[],t||[],li)}function Wu(e,t){return Vo(e||[],t||[],Oo)}var Uu=wo((function(e){var t=e.length,n=t>1?e[t-1]:r;n=typeof n=="function"?(e.pop(),n):r;return Lu(e,n)}));function Hu(e){var t=xn(e);t.__chain__=true;return t}function Ju(e,t){t(e);return e}function Gu(e,t){return t(e)}var Ku=Ra((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return vi(t,e)};if(t>1||this.__actions__.length||!(i instanceof Dn)||!as(n)){return this.thru(o)}i=i.slice(n,+n+(t?1:0));i.__actions__.push({func:Gu,args:[o],thisArg:r});return new In(i,this.__chain__).thru((function(e){if(t&&!e.length){e.push(r)}return e}))}));function $u(){return Hu(this)}function Yu(){return new In(this.value(),this.__chain__)}function Xu(){if(this.__values__===r){this.__values__=Jc(this.value())}var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Zu(){return this}function Qu(e){var t,n=this;while(n instanceof Tn){var i=Cs(n);i.__index__=0;i.__values__=r;if(t){o.__wrapped__=i}else{t=i}var o=i;n=n.__wrapped__}o.__wrapped__=e;return t}function el(){var e=this.__wrapped__;if(e instanceof Dn){var t=e;if(this.__actions__.length){t=new Dn(this)}t=t.reverse();t.__actions__.push({func:Gu,args:[du],thisArg:r});return new In(t,this.__chain__)}return this.thru(du)}function tl(){return Po(this.__wrapped__,this.__actions__)}var rl=ua((function(e,t,r){if(ft.call(e,r)){++e[r]}else{di(e,r,1)}}));function nl(e,t,n){var i=uc(e)?_r:Oi;if(n&&ss(e,t,n)){t=r}return i(e,Ua(t,3))}function il(e,t){var r=uc(e)?wr:Di;return r(e,Ua(t,3))}var ol=ma(Js);var al=ma(Gs);function sl(e,t){return ji(gl(e,t),1)}function ul(e,t){return ji(gl(e,t),S)}function ll(e,t,n){n=n===r?1:Kc(n);return ji(gl(e,t),n)}function cl(e,t){var r=uc(e)?yr:ki;return r(e,Ua(t,3))}function fl(e,t){var r=uc(e)?br:xi;return r(e,Ua(t,3))}var pl=ua((function(e,t,r){if(ft.call(e,r)){e[r].push(t)}else{di(e,r,[t])}}));function hl(e,t,r,n){e=cc(e)?e:qf(e);r=r&&!n?Kc(r):0;var i=e.length;if(r<0){r=qt(i+r,0)}return Rc(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Cr(e,t,r)>-1}var dl=wo((function(e,t,r){var n=-1,i=typeof t=="function",o=cc(e)?Le(e.length):[];ki(e,(function(e){o[++n]=i?gr(t,e,r):Wi(e,t,r)}));return o}));var vl=ua((function(e,t,r){di(e,r,t)}));function gl(e,t){var r=uc(e)?Or:oo;return r(e,Ua(t,3))}function ml(e,t,n,i){if(e==null){return[]}if(!uc(t)){t=t==null?[]:[t]}n=i?r:n;if(!uc(n)){n=n==null?[]:[n]}return fo(e,t,n)}var yl=ua((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));function bl(e,t,r){var n=uc(e)?Ir:Br,i=arguments.length<3;return n(e,Ua(t,4),r,i,ki)}function _l(e,t,r){var n=uc(e)?Dr:Br,i=arguments.length<3;return n(e,Ua(t,4),r,i,xi)}function wl(e,t){var r=uc(e)?wr:Di;return r(e,Vl(Ua(t,3)))}function kl(e){var t=uc(e)?oi:ko;return t(e)}function xl(e,t,n){if(n?ss(e,t,n):t===r){t=1}else{t=Kc(t)}var i=uc(e)?ai:xo;return i(e,t)}function Ol(e){var t=uc(e)?si:Do;return t(e)}function Tl(e){if(e==null){return 0}if(cc(e)){return Rc(e)?hn(e):e.length}var t=Xa(e);if(t==Y||t==ne){return e.size}return ro(e).length}function Il(e,t,n){var i=uc(e)?jr:Mo;if(n&&ss(e,t,n)){t=r}return i(e,Ua(t,3))}var Dl=wo((function(e,t){if(e==null){return[]}var r=t.length;if(r>1&&ss(e,t[0],t[1])){t=[]}else if(r>2&&ss(t[0],t[1],t[2])){t=[t[0]]}return fo(e,ji(t,1),[])}));var jl=Et||function(){return ir.Date.now()};function Ml(e,t){if(typeof t!="function"){throw new ot(a)}e=Kc(e);return function(){if(--e<1){return t.apply(this,arguments)}}}function Nl(e,t,n){t=n?r:t;t=e&&t==null?e.length:t;return Ea(e,x,r,r,r,r,t)}function El(e,t){var n;if(typeof t!="function"){throw new ot(a)}e=Kc(e);return function(){if(--e>0){n=t.apply(this,arguments)}if(e<=1){t=r}return n}}var Al=wo((function(e,t,r){var n=g;if(r.length){var i=un(r,Wa(Al));n|=w}return Ea(e,n,t,r,i)}));var Sl=wo((function(e,t,r){var n=g|m;if(r.length){var i=un(r,Wa(Sl));n|=w}return Ea(t,n,e,r,i)}));function Cl(e,t,n){t=n?r:t;var i=Ea(e,b,r,r,r,r,r,t);i.placeholder=Cl.placeholder;return i}function zl(e,t,n){t=n?r:t;var i=Ea(e,_,r,r,r,r,r,t);i.placeholder=zl.placeholder;return i}function Ll(e,t,n){var i,o,s,u,l,c,f=0,p=false,h=false,d=true;if(typeof e!="function"){throw new ot(a)}t=Yc(t)||0;if(Oc(n)){p=!!n.leading;h="maxWait"in n;s=h?qt(Yc(n.maxWait)||0,t):s;d="trailing"in n?!!n.trailing:d}function v(t){var n=i,a=o;i=o=r;f=t;u=e.apply(a,n);return u}function g(e){f=e;l=Ts(b,t);return p?v(e):u}function m(e){var r=e-c,n=e-f,i=t-r;return h?Wt(i,s-n):i}function y(e){var n=e-c,i=e-f;return c===r||n>=t||n<0||h&&i>=s}function b(){var e=jl();if(y(e)){return _(e)}l=Ts(b,m(e))}function _(e){l=r;if(d&&i){return v(e)}i=o=r;return u}function w(){if(l!==r){Go(l)}f=0;i=c=o=l=r}function k(){return l===r?u:_(jl())}function x(){var e=jl(),n=y(e);i=arguments;o=this;c=e;if(n){if(l===r){return g(c)}if(h){Go(l);l=Ts(b,t);return v(c)}}if(l===r){l=Ts(b,t)}return u}x.cancel=w;x.flush=k;return x}var Fl=wo((function(e,t){return _i(e,1,t)}));var Rl=wo((function(e,t,r){return _i(e,Yc(t)||0,r)}));function Pl(e){return Ea(e,T)}function Bl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function"){throw new ot(a)}var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i)){return o.get(i)}var a=e.apply(this,n);r.cache=o.set(i,a)||o;return a};r.cache=new(Bl.Cache||Wn);return r}Bl.Cache=Wn;function Vl(e){if(typeof e!="function"){throw new ot(a)}return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function ql(e){return El(2,e)}var Wl=Ho((function(e,t){t=t.length==1&&uc(t[0])?Or(t[0],Jr(Ua())):Or(ji(t,1),Jr(Ua()));var r=t.length;return wo((function(n){var i=-1,o=Wt(n.length,r);while(++i<o){n[i]=t[i].call(this,n[i])}return gr(e,this,n)}))}));var Ul=wo((function(e,t){var n=un(t,Wa(Ul));return Ea(e,w,r,t,n)}));var Hl=wo((function(e,t){var n=un(t,Wa(Hl));return Ea(e,k,r,t,n)}));var Jl=Ra((function(e,t){return Ea(e,O,r,r,r,t)}));function Gl(e,t){if(typeof e!="function"){throw new ot(a)}t=t===r?t:Kc(t);return wo(e,t)}function Kl(e,t){if(typeof e!="function"){throw new ot(a)}t=t==null?0:qt(Kc(t),0);return wo((function(r){var n=r[t],i=Jo(r,0,t);if(n){Tr(i,n)}return gr(e,this,i)}))}function $l(e,t,r){var n=true,i=true;if(typeof e!="function"){throw new ot(a)}if(Oc(r)){n="leading"in r?!!r.leading:n;i="trailing"in r?!!r.trailing:i}return Ll(e,t,{leading:n,maxWait:t,trailing:i})}function Yl(e){return Nl(e,1)}function Xl(e,t){return Ul(Wo(t),e)}function Zl(){if(!arguments.length){return[]}var e=arguments[0];return uc(e)?e:[e]}function Ql(e){return mi(e,h)}function ec(e,t){t=typeof t=="function"?t:r;return mi(e,h,t)}function tc(e){return mi(e,f|h)}function rc(e,t){t=typeof t=="function"?t:r;return mi(e,f|h,t)}function nc(e,t){return t==null||bi(e,t,xf(t))}function ic(e,t){return e===t||e!==e&&t!==t}var oc=Ia(Fi);var ac=Ia((function(e,t){return e>=t}));var sc=Ui(function(){return arguments}())?Ui:function(e){return Tc(e)&&ft.call(e,"callee")&&!Ot.call(e,"callee")};var uc=Le.isArray;var lc=cr?Jr(cr):Hi;function cc(e){return e!=null&&xc(e.length)&&!wc(e)}function fc(e){return Tc(e)&&cc(e)}function pc(e){return e===true||e===false||Tc(e)&&Li(e)==U}var hc=Lt||$p;var dc=fr?Jr(fr):Ji;function vc(e){return Tc(e)&&e.nodeType===1&&!Cc(e)}function gc(e){if(e==null){return true}if(cc(e)&&(uc(e)||typeof e=="string"||typeof e.splice=="function"||hc(e)||Bc(e)||sc(e))){return!e.length}var t=Xa(e);if(t==Y||t==ne){return!e.size}if(hs(e)){return!ro(e).length}for(var r in e){if(ft.call(e,r)){return false}}return true}function mc(e,t){return Gi(e,t)}function yc(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?Gi(e,t,r,n):!!i}function bc(e){if(!Tc(e)){return false}var t=Li(e);return t==G||t==J||typeof e.message=="string"&&typeof e.name=="string"&&!Cc(e)}function _c(e){return typeof e=="number"&&Ft(e)}function wc(e){if(!Oc(e)){return false}var t=Li(e);return t==K||t==$||t==W||t==te}function kc(e){return typeof e=="number"&&e==Kc(e)}function xc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=C}function Oc(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Tc(e){return e!=null&&typeof e=="object"}var Ic=pr?Jr(pr):$i;function Dc(e,t){return e===t||Yi(e,t,Ja(t))}function jc(e,t,n){n=typeof n=="function"?n:r;return Yi(e,t,Ja(t),n)}function Mc(e){return Sc(e)&&e!=+e}function Nc(e){if(ps(e)){throw new Qe(o)}return Xi(e)}function Ec(e){return e===null}function Ac(e){return e==null}function Sc(e){return typeof e=="number"||Tc(e)&&Li(e)==X}function Cc(e){if(!Tc(e)||Li(e)!=Q){return false}var t=kt(e);if(t===null){return true}var r=ft.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ct.call(r)==vt}var zc=hr?Jr(hr):Zi;function Lc(e){return kc(e)&&e>=-C&&e<=C}var Fc=dr?Jr(dr):Qi;function Rc(e){return typeof e=="string"||!uc(e)&&Tc(e)&&Li(e)==ie}function Pc(e){return typeof e=="symbol"||Tc(e)&&Li(e)==oe}var Bc=vr?Jr(vr):eo;function Vc(e){return e===r}function qc(e){return Tc(e)&&Xa(e)==se}function Wc(e){return Tc(e)&&Li(e)==ue}var Uc=Ia(io);var Hc=Ia((function(e,t){return e<=t}));function Jc(e){if(!e){return[]}if(cc(e)){return Rc(e)?dn(e):ia(e)}if(Dt&&e[Dt]){return on(e[Dt]())}var t=Xa(e),r=t==Y?an:t==ne?ln:qf;return r(e)}function Gc(e){if(!e){return e===0?e:0}e=Yc(e);if(e===S||e===-S){var t=e<0?-1:1;return t*z}return e===e?e:0}function Kc(e){var t=Gc(e),r=t%1;return t===t?r?t-r:t:0}function $c(e){return e?gi(Kc(e),0,F):0}function Yc(e){if(typeof e=="number"){return e}if(Pc(e)){return L}if(Oc(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Oc(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=Hr(e);var r=Je.test(e);return r||Ke.test(e)?tr(e.slice(2),r?2:8):He.test(e)?L:+e}function Xc(e){return oa(e,Of(e))}function Zc(e){return e?gi(Kc(e),-C,C):e===0?e:0}function Qc(e){return e==null?"":Co(e)}var ef=la((function(e,t){if(hs(t)||cc(t)){oa(t,xf(t),e);return}for(var r in t){if(ft.call(t,r)){li(e,r,t[r])}}}));var tf=la((function(e,t){oa(t,Of(t),e)}));var rf=la((function(e,t,r,n){oa(t,Of(t),e,n)}));var nf=la((function(e,t,r,n){oa(t,xf(t),e,n)}));var of=Ra(vi);function af(e,t){var r=On(e);return t==null?r:pi(r,t)}var sf=wo((function(e,t){e=rt(e);var n=-1;var i=t.length;var o=i>2?t[2]:r;if(o&&ss(t[0],t[1],o)){i=1}while(++n<i){var a=t[n];var s=Of(a);var u=-1;var l=s.length;while(++u<l){var c=s[u];var f=e[c];if(f===r||ic(f,ut[c])&&!ft.call(e,c)){e[c]=a[c]}}}return e}));var uf=wo((function(e){e.push(r,Sa);return gr(jf,r,e)}));function lf(e,t){return Ar(e,Ua(t,3),Ei)}function cf(e,t){return Ar(e,Ua(t,3),Ai)}function ff(e,t){return e==null?e:Mi(e,Ua(t,3),Of)}function pf(e,t){return e==null?e:Ni(e,Ua(t,3),Of)}function hf(e,t){return e&&Ei(e,Ua(t,3))}function df(e,t){return e&&Ai(e,Ua(t,3))}function vf(e){return e==null?[]:Si(e,xf(e))}function gf(e){return e==null?[]:Si(e,Of(e))}function mf(e,t,n){var i=e==null?r:Ci(e,t);return i===r?n:i}function yf(e,t){return e!=null&&es(e,t,Ri)}function bf(e,t){return e!=null&&es(e,t,Pi)}var _f=_a((function(e,t,r){if(t!=null&&typeof t.toString!="function"){t=dt.call(t)}e[t]=r}),Dp(Ep));var wf=_a((function(e,t,r){if(t!=null&&typeof t.toString!="function"){t=dt.call(t)}if(ft.call(e,t)){e[t].push(r)}else{e[t]=[r]}}),Ua);var kf=wo(Wi);function xf(e){return cc(e)?ii(e):ro(e)}function Of(e){return cc(e)?ii(e,true):no(e)}function Tf(e,t){var r={};t=Ua(t,3);Ei(e,(function(e,n,i){di(r,t(e,n,i),e)}));return r}function If(e,t){var r={};t=Ua(t,3);Ei(e,(function(e,n,i){di(r,n,t(e,n,i))}));return r}var Df=la((function(e,t,r){uo(e,t,r)}));var jf=la((function(e,t,r,n){uo(e,t,r,n)}));var Mf=Ra((function(e,t){var r={};if(e==null){return r}var n=false;t=Or(t,(function(t){t=Uo(t,e);n||(n=t.length>1);return t}));oa(e,Ba(e),r);if(n){r=mi(r,f|p|h,Ca)}var i=t.length;while(i--){Lo(r,t[i])}return r}));function Nf(e,t){return Af(e,Vl(Ua(t)))}var Ef=Ra((function(e,t){return e==null?{}:po(e,t)}));function Af(e,t){if(e==null){return{}}var r=Or(Ba(e),(function(e){return[e]}));t=Ua(t);return ho(e,r,(function(e,r){return t(e,r[0])}))}function Sf(e,t,n){t=Uo(t,e);var i=-1,o=t.length;if(!o){o=1;e=r}while(++i<o){var a=e==null?r:e[Es(t[i])];if(a===r){i=o;a=n}e=wc(a)?a.call(e):a}return e}function Cf(e,t,r){return e==null?e:Oo(e,t,r)}function zf(e,t,n,i){i=typeof i=="function"?i:r;return e==null?e:Oo(e,t,n,i)}var Lf=Na(xf);var Ff=Na(Of);function Rf(e,t,r){var n=uc(e),i=n||hc(e)||Bc(e);t=Ua(t,4);if(r==null){var o=e&&e.constructor;if(i){r=n?new o:[]}else if(Oc(e)){r=wc(o)?On(kt(e)):{}}else{r={}}}(i?yr:Ei)(e,(function(e,n,i){return t(r,e,n,i)}));return r}function Pf(e,t){return e==null?true:Lo(e,t)}function Bf(e,t,r){return e==null?e:Fo(e,t,Wo(r))}function Vf(e,t,n,i){i=typeof i=="function"?i:r;return e==null?e:Fo(e,t,Wo(n),i)}function qf(e){return e==null?[]:Gr(e,xf(e))}function Wf(e){return e==null?[]:Gr(e,Of(e))}function Uf(e,t,n){if(n===r){n=t;t=r}if(n!==r){n=Yc(n);n=n===n?n:0}if(t!==r){t=Yc(t);t=t===t?t:0}return gi(Yc(e),t,n)}function Hf(e,t,n){t=Gc(t);if(n===r){n=t;t=0}else{n=Gc(n)}e=Yc(e);return Bi(e,t,n)}function Jf(e,t,n){if(n&&typeof n!="boolean"&&ss(e,t,n)){t=n=r}if(n===r){if(typeof t=="boolean"){n=t;t=r}else if(typeof e=="boolean"){n=e;e=r}}if(e===r&&t===r){e=0;t=1}else{e=Gc(e);if(t===r){t=e;e=0}else{t=Gc(t)}}if(e>t){var i=e;e=t;t=i}if(n||e%1||t%1){var o=Yt();return Wt(e+o*(t-e+er("1e-"+((o+"").length-1))),t)}return yo(e,t)}var Gf=da((function(e,t,r){t=t.toLowerCase();return e+(r?Kf(t):t)}));function Kf(e){return wp(Qc(e).toLowerCase())}function $f(e){e=Qc(e);return e&&e.replace(Ye,Zr).replace(Vt,"")}function Yf(e,t,n){e=Qc(e);t=Co(t);var i=e.length;n=n===r?i:gi(Kc(n),0,i);var o=n;n-=t.length;return n>=0&&e.slice(n,o)==t}function Xf(e){e=Qc(e);return e&&Ie.test(e)?e.replace(Oe,Qr):e}function Zf(e){e=Qc(e);return e&&Ce.test(e)?e.replace(Se,"\\$&"):e}var Qf=da((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}));var ep=da((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}));var tp=ha("toLowerCase");function rp(e,t,r){e=Qc(e);t=Kc(t);var n=t?hn(e):0;if(!t||n>=t){return e}var i=(t-n)/2;return xa(Ct(i),r)+e+xa(St(i),r)}function np(e,t,r){e=Qc(e);t=Kc(t);var n=t?hn(e):0;return t&&n<t?e+xa(t-n,r):e}function ip(e,t,r){e=Qc(e);t=Kc(t);var n=t?hn(e):0;return t&&n<t?xa(t-n,r)+e:e}function op(e,t,r){if(r||t==null){t=0}else if(t){t=+t}return Ht(Qc(e).replace(ze,""),t||0)}function ap(e,t,n){if(n?ss(e,t,n):t===r){t=1}else{t=Kc(t)}return _o(Qc(e),t)}function sp(){var e=arguments,t=Qc(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var up=da((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));function lp(e,t,n){if(n&&typeof n!="number"&&ss(e,t,n)){t=n=r}n=n===r?F:n>>>0;if(!n){return[]}e=Qc(e);if(e&&(typeof t=="string"||t!=null&&!zc(t))){t=Co(t);if(!t&&rn(e)){return Jo(dn(e),0,n)}}return e.split(t,n)}var cp=da((function(e,t,r){return e+(r?" ":"")+wp(t)}));function fp(e,t,r){e=Qc(e);r=r==null?0:gi(Kc(r),0,e.length);t=Co(t);return e.slice(r,r+t.length)==t}function pp(e,t,n){var i=xn.templateSettings;if(n&&ss(e,t,n)){t=r}e=Qc(e);t=rf({},t,i,Aa);var o=rf({},t.imports,i.imports,Aa),a=xf(o),u=Gr(o,a);var l,c,f=0,p=t.interpolate||Xe,h="__p += '";var d=nt((t.escape||Xe).source+"|"+p.source+"|"+(p===Me?We:Xe).source+"|"+(t.evaluate||Xe).source+"|$","g");var v="//# sourceURL="+(ft.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gt+"]")+"\n";e.replace(d,(function(t,r,n,i,o,a){n||(n=i);h+=e.slice(f,a).replace(Ze,en);if(r){l=true;h+="' +\n__e("+r+") +\n'"}if(o){c=true;h+="';\n"+o+";\n__p += '"}if(n){h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}f=a+t.length;return t}));h+="';\n";var g=ft.call(t,"variable")&&t.variable;if(!g){h="with (obj) {\n"+h+"\n}\n"}else if(Ve.test(g)){throw new Qe(s)}h=(c?h.replace(_e,""):h).replace(we,"$1").replace(ke,"$1;");h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(l?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=xp((function(){return et(a,v+"return "+h).apply(r,u)}));m.source=h;if(bc(m)){throw m}return m}function hp(e){return Qc(e).toLowerCase()}function dp(e){return Qc(e).toUpperCase()}function vp(e,t,n){e=Qc(e);if(e&&(n||t===r)){return Hr(e)}if(!e||!(t=Co(t))){return e}var i=dn(e),o=dn(t),a=$r(i,o),s=Yr(i,o)+1;return Jo(i,a,s).join("")}function gp(e,t,n){e=Qc(e);if(e&&(n||t===r)){return e.slice(0,vn(e)+1)}if(!e||!(t=Co(t))){return e}var i=dn(e),o=Yr(i,dn(t))+1;return Jo(i,0,o).join("")}function mp(e,t,n){e=Qc(e);if(e&&(n||t===r)){return e.replace(ze,"")}if(!e||!(t=Co(t))){return e}var i=dn(e),o=$r(i,dn(t));return Jo(i,o).join("")}function yp(e,t){var n=I,i=D;if(Oc(t)){var o="separator"in t?t.separator:o;n="length"in t?Kc(t.length):n;i="omission"in t?Co(t.omission):i}e=Qc(e);var a=e.length;if(rn(e)){var s=dn(e);a=s.length}if(n>=a){return e}var u=n-hn(i);if(u<1){return i}var l=s?Jo(s,0,u).join(""):e.slice(0,u);if(o===r){return l+i}if(s){u+=l.length-u}if(zc(o)){if(e.slice(u).search(o)){var c,f=l;if(!o.global){o=nt(o.source,Qc(Ue.exec(o))+"g")}o.lastIndex=0;while(c=o.exec(f)){var p=c.index}l=l.slice(0,p===r?u:p)}}else if(e.indexOf(Co(o),u)!=u){var h=l.lastIndexOf(o);if(h>-1){l=l.slice(0,h)}}return l+i}function bp(e){e=Qc(e);return e&&Te.test(e)?e.replace(xe,gn):e}var _p=da((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}));var wp=ha("toUpperCase");function kp(e,t,n){e=Qc(e);t=n?r:t;if(t===r){return nn(e)?bn(e):Er(e)}return e.match(t)||[]}var xp=wo((function(e,t){try{return gr(e,r,t)}catch(e){return bc(e)?e:new Qe(e)}}));var Op=Ra((function(e,t){yr(t,(function(t){t=Es(t);di(e,t,Al(e[t],e))}));return e}));function Tp(e){var t=e==null?0:e.length,r=Ua();e=!t?[]:Or(e,(function(e){if(typeof e[1]!="function"){throw new ot(a)}return[r(e[0]),e[1]]}));return wo((function(r){var n=-1;while(++n<t){var i=e[n];if(gr(i[0],this,r)){return gr(i[1],this,r)}}}))}function Ip(e){return yi(mi(e,f))}function Dp(e){return function(){return e}}function jp(e,t){return e==null||e!==e?t:e}var Mp=ya();var Np=ya(true);function Ep(e){return e}function Ap(e){return to(typeof e=="function"?e:mi(e,f))}function Sp(e){return ao(mi(e,f))}function Cp(e,t){return so(e,mi(t,f))}var zp=wo((function(e,t){return function(r){return Wi(r,e,t)}}));var Lp=wo((function(e,t){return function(r){return Wi(e,r,t)}}));function Fp(e,t,r){var n=xf(t),i=Si(t,n);if(r==null&&!(Oc(t)&&(i.length||!n.length))){r=t;t=e;e=this;i=Si(t,xf(t))}var o=!(Oc(r)&&"chain"in r)||!!r.chain,a=wc(e);yr(i,(function(r){var n=t[r];e[r]=n;if(a){e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=ia(this.__actions__);i.push({func:n,args:arguments,thisArg:e});r.__chain__=t;return r}return n.apply(e,Tr([this.value()],arguments))}}}));return e}function Rp(){if(ir._===this){ir._=gt}return this}function Pp(){}function Bp(e){e=Kc(e);return wo((function(t){return co(t,e)}))}var Vp=ka(Or);var qp=ka(_r);var Wp=ka(jr);function Up(e){return us(e)?Rr(Es(e)):vo(e)}function Hp(e){return function(t){return e==null?r:Ci(e,t)}}var Jp=Ta();var Gp=Ta(true);function Kp(){return[]}function $p(){return false}function Yp(){return{}}function Xp(){return""}function Zp(){return true}function Qp(e,t){e=Kc(e);if(e<1||e>C){return[]}var r=F,n=Wt(e,F);t=Ua(t);e-=F;var i=Wr(n,t);while(++r<e){t(r)}return i}function eh(e){if(uc(e)){return Or(e,Es)}return Pc(e)?[e]:ia(Ns(Qc(e)))}function th(e){var t=++pt;return Qc(e)+t}var rh=wa((function(e,t){return e+t}),0);var nh=ja("ceil");var ih=wa((function(e,t){return e/t}),1);var oh=ja("floor");function ah(e){return e&&e.length?Ti(e,Ep,Fi):r}function sh(e,t){return e&&e.length?Ti(e,Ua(t,2),Fi):r}function uh(e){return Fr(e,Ep)}function lh(e,t){return Fr(e,Ua(t,2))}function ch(e){return e&&e.length?Ti(e,Ep,io):r}function fh(e,t){return e&&e.length?Ti(e,Ua(t,2),io):r}var ph=wa((function(e,t){return e*t}),1);var hh=ja("round");var dh=wa((function(e,t){return e-t}),0);function vh(e){return e&&e.length?qr(e,Ep):0}function gh(e,t){return e&&e.length?qr(e,Ua(t,2)):0}xn.after=Ml;xn.ary=Nl;xn.assign=ef;xn.assignIn=tf;xn.assignInWith=rf;xn.assignWith=nf;xn.at=of;xn.before=El;xn.bind=Al;xn.bindAll=Op;xn.bindKey=Sl;xn.castArray=Zl;xn.chain=Hu;xn.chunk=zs;xn.compact=Ls;xn.concat=Fs;xn.cond=Tp;xn.conforms=Ip;xn.constant=Dp;xn.countBy=rl;xn.create=af;xn.curry=Cl;xn.curryRight=zl;xn.debounce=Ll;xn.defaults=sf;xn.defaultsDeep=uf;xn.defer=Fl;xn.delay=Rl;xn.difference=Rs;xn.differenceBy=Ps;xn.differenceWith=Bs;xn.drop=Vs;xn.dropRight=qs;xn.dropRightWhile=Ws;xn.dropWhile=Us;xn.fill=Hs;xn.filter=il;xn.flatMap=sl;xn.flatMapDeep=ul;xn.flatMapDepth=ll;xn.flatten=Ks;xn.flattenDeep=$s;xn.flattenDepth=Ys;xn.flip=Pl;xn.flow=Mp;xn.flowRight=Np;xn.fromPairs=Xs;xn.functions=vf;xn.functionsIn=gf;xn.groupBy=pl;xn.initial=eu;xn.intersection=tu;xn.intersectionBy=ru;xn.intersectionWith=nu;xn.invert=_f;xn.invertBy=wf;xn.invokeMap=dl;xn.iteratee=Ap;xn.keyBy=vl;xn.keys=xf;xn.keysIn=Of;xn.map=gl;xn.mapKeys=Tf;xn.mapValues=If;xn.matches=Sp;xn.matchesProperty=Cp;xn.memoize=Bl;xn.merge=Df;xn.mergeWith=jf;xn.method=zp;xn.methodOf=Lp;xn.mixin=Fp;xn.negate=Vl;xn.nthArg=Bp;xn.omit=Mf;xn.omitBy=Nf;xn.once=ql;xn.orderBy=ml;xn.over=Vp;xn.overArgs=Wl;xn.overEvery=qp;xn.overSome=Wp;xn.partial=Ul;xn.partialRight=Hl;xn.partition=yl;xn.pick=Ef;xn.pickBy=Af;xn.property=Up;xn.propertyOf=Hp;xn.pull=uu;xn.pullAll=lu;xn.pullAllBy=cu;xn.pullAllWith=fu;xn.pullAt=pu;xn.range=Jp;xn.rangeRight=Gp;xn.rearg=Jl;xn.reject=wl;xn.remove=hu;xn.rest=Gl;xn.reverse=du;xn.sampleSize=xl;xn.set=Cf;xn.setWith=zf;xn.shuffle=Ol;xn.slice=vu;xn.sortBy=Dl;xn.sortedUniq=ku;xn.sortedUniqBy=xu;xn.split=lp;xn.spread=Kl;xn.tail=Ou;xn.take=Tu;xn.takeRight=Iu;xn.takeRightWhile=Du;xn.takeWhile=ju;xn.tap=Ju;xn.throttle=$l;xn.thru=Gu;xn.toArray=Jc;xn.toPairs=Lf;xn.toPairsIn=Ff;xn.toPath=eh;xn.toPlainObject=Xc;xn.transform=Rf;xn.unary=Yl;xn.union=Mu;xn.unionBy=Nu;xn.unionWith=Eu;xn.uniq=Au;xn.uniqBy=Su;xn.uniqWith=Cu;xn.unset=Pf;xn.unzip=zu;xn.unzipWith=Lu;xn.update=Bf;xn.updateWith=Vf;xn.values=qf;xn.valuesIn=Wf;xn.without=Fu;xn.words=kp;xn.wrap=Xl;xn.xor=Ru;xn.xorBy=Pu;xn.xorWith=Bu;xn.zip=Vu;xn.zipObject=qu;xn.zipObjectDeep=Wu;xn.zipWith=Uu;xn.entries=Lf;xn.entriesIn=Ff;xn.extend=tf;xn.extendWith=rf;Fp(xn,xn);xn.add=rh;xn.attempt=xp;xn.camelCase=Gf;xn.capitalize=Kf;xn.ceil=nh;xn.clamp=Uf;xn.clone=Ql;xn.cloneDeep=tc;xn.cloneDeepWith=rc;xn.cloneWith=ec;xn.conformsTo=nc;xn.deburr=$f;xn.defaultTo=jp;xn.divide=ih;xn.endsWith=Yf;xn.eq=ic;xn.escape=Xf;xn.escapeRegExp=Zf;xn.every=nl;xn.find=ol;xn.findIndex=Js;xn.findKey=lf;xn.findLast=al;xn.findLastIndex=Gs;xn.findLastKey=cf;xn.floor=oh;xn.forEach=cl;xn.forEachRight=fl;xn.forIn=ff;xn.forInRight=pf;xn.forOwn=hf;xn.forOwnRight=df;xn.get=mf;xn.gt=oc;xn.gte=ac;xn.has=yf;xn.hasIn=bf;xn.head=Zs;xn.identity=Ep;xn.includes=hl;xn.indexOf=Qs;xn.inRange=Hf;xn.invoke=kf;xn.isArguments=sc;xn.isArray=uc;xn.isArrayBuffer=lc;xn.isArrayLike=cc;xn.isArrayLikeObject=fc;xn.isBoolean=pc;xn.isBuffer=hc;xn.isDate=dc;xn.isElement=vc;xn.isEmpty=gc;xn.isEqual=mc;xn.isEqualWith=yc;xn.isError=bc;xn.isFinite=_c;xn.isFunction=wc;xn.isInteger=kc;xn.isLength=xc;xn.isMap=Ic;xn.isMatch=Dc;xn.isMatchWith=jc;xn.isNaN=Mc;xn.isNative=Nc;xn.isNil=Ac;xn.isNull=Ec;xn.isNumber=Sc;xn.isObject=Oc;xn.isObjectLike=Tc;xn.isPlainObject=Cc;xn.isRegExp=zc;xn.isSafeInteger=Lc;xn.isSet=Fc;xn.isString=Rc;xn.isSymbol=Pc;xn.isTypedArray=Bc;xn.isUndefined=Vc;xn.isWeakMap=qc;xn.isWeakSet=Wc;xn.join=iu;xn.kebabCase=Qf;xn.last=ou;xn.lastIndexOf=au;xn.lowerCase=ep;xn.lowerFirst=tp;xn.lt=Uc;xn.lte=Hc;xn.max=ah;xn.maxBy=sh;xn.mean=uh;xn.meanBy=lh;xn.min=ch;xn.minBy=fh;xn.stubArray=Kp;xn.stubFalse=$p;xn.stubObject=Yp;xn.stubString=Xp;xn.stubTrue=Zp;xn.multiply=ph;xn.nth=su;xn.noConflict=Rp;xn.noop=Pp;xn.now=jl;xn.pad=rp;xn.padEnd=np;xn.padStart=ip;xn.parseInt=op;xn.random=Jf;xn.reduce=bl;xn.reduceRight=_l;xn.repeat=ap;xn.replace=sp;xn.result=Sf;xn.round=hh;xn.runInContext=e;xn.sample=kl;xn.size=Tl;xn.snakeCase=up;xn.some=Il;xn.sortedIndex=gu;xn.sortedIndexBy=mu;xn.sortedIndexOf=yu;xn.sortedLastIndex=bu;xn.sortedLastIndexBy=_u;xn.sortedLastIndexOf=wu;xn.startCase=cp;xn.startsWith=fp;xn.subtract=dh;xn.sum=vh;xn.sumBy=gh;xn.template=pp;xn.times=Qp;xn.toFinite=Gc;xn.toInteger=Kc;xn.toLength=$c;xn.toLower=hp;xn.toNumber=Yc;xn.toSafeInteger=Zc;xn.toString=Qc;xn.toUpper=dp;xn.trim=vp;xn.trimEnd=gp;xn.trimStart=mp;xn.truncate=yp;xn.unescape=bp;xn.uniqueId=th;xn.upperCase=_p;xn.upperFirst=wp;xn.each=cl;xn.eachRight=fl;xn.first=Zs;Fp(xn,function(){var e={};Ei(xn,(function(t,r){if(!ft.call(xn.prototype,r)){e[r]=t}}));return e}(),{chain:false});xn.VERSION=n;yr(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xn[e].placeholder=xn}));yr(["drop","take"],(function(e,t){Dn.prototype[e]=function(n){n=n===r?1:qt(Kc(n),0);var i=this.__filtered__&&!t?new Dn(this):this.clone();if(i.__filtered__){i.__takeCount__=Wt(n,i.__takeCount__)}else{i.__views__.push({size:Wt(n,F),type:e+(i.__dir__<0?"Right":"")})}return i};Dn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}));yr(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=r==N||r==A;Dn.prototype[e]=function(e){var t=this.clone();t.__iteratees__.push({iteratee:Ua(e,3),type:r});t.__filtered__=t.__filtered__||n;return t}}));yr(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Dn.prototype[e]=function(){return this[r](1).value()[0]}}));yr(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Dn.prototype[e]=function(){return this.__filtered__?new Dn(this):this[r](1)}}));Dn.prototype.compact=function(){return this.filter(Ep)};Dn.prototype.find=function(e){return this.filter(e).head()};Dn.prototype.findLast=function(e){return this.reverse().find(e)};Dn.prototype.invokeMap=wo((function(e,t){if(typeof e=="function"){return new Dn(this)}return this.map((function(r){return Wi(r,e,t)}))}));Dn.prototype.reject=function(e){return this.filter(Vl(Ua(e)))};Dn.prototype.slice=function(e,t){e=Kc(e);var n=this;if(n.__filtered__&&(e>0||t<0)){return new Dn(n)}if(e<0){n=n.takeRight(-e)}else if(e){n=n.drop(e)}if(t!==r){t=Kc(t);n=t<0?n.dropRight(-t):n.take(t-e)}return n};Dn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};Dn.prototype.toArray=function(){return this.take(F)};Ei(Dn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=xn[i?"take"+(t=="last"?"Right":""):t],a=i||/^find/.test(t);if(!o){return}xn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof Dn,l=s[0],c=u||uc(t);var f=function(e){var t=o.apply(xn,Tr([e],s));return i&&p?t[0]:t};if(c&&n&&typeof l=="function"&&l.length!=1){u=c=false}var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,v=u&&!h;if(!a&&c){t=v?t:new Dn(this);var g=e.apply(t,s);g.__actions__.push({func:Gu,args:[f],thisArg:r});return new In(g,p)}if(d&&v){return e.apply(this,s)}g=this.thru(f);return d?i?g.value()[0]:g.value():g}}));yr(["pop","push","shift","sort","splice","unshift"],(function(e){var t=at[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);xn.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(uc(i)?i:[],e)}return this[r]((function(r){return t.apply(uc(r)?r:[],e)}))}}));Ei(Dn.prototype,(function(e,t){var r=xn[t];if(r){var n=r.name+"";if(!ft.call(lr,n)){lr[n]=[]}lr[n].push({name:t,func:r})}}));lr[ba(r,m).name]=[{name:"wrapper",func:r}];Dn.prototype.clone=jn;Dn.prototype.reverse=Mn;Dn.prototype.value=Nn;xn.prototype.at=Ku;xn.prototype.chain=$u;xn.prototype.commit=Yu;xn.prototype.next=Xu;xn.prototype.plant=Qu;xn.prototype.reverse=el;xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=tl;xn.prototype.first=xn.prototype.head;if(Dt){xn.prototype[Dt]=Zu}return xn};var wn=_n();if(ar){(ar.exports=wn)._=wn;or._=wn}else{ir._=wn}}).call(commonjsGlobal)}));function isInstanceOfIConf(e){var t="";var r=true;if(!(typeof e.source=="string"&&["data","webservice","file"].indexOf(e.source)>-1)){r=false;t="options.source value '"+e.source+"' doesn't meet interface IConf requirements"}else{if(!(e.source!="webservice"||e.source=="webservice"&&e.url&&typeof e.url=="string")){r=false;t="options.url value '"+e.url+"' doesn't meet interface IConf requirements, is wrongly formated or doesn't match option.source value"}if(!(e.source!="webservice"&&!e.token||e.source=="webservice"&&e.token&&(typeof e.token=="string"||typeof e.token=="function"))){r=false;t="options.token value doesn't meet interface IConf requirements or doesn't match option.source value :: typeof object.token == "+typeof e.token}if(!(e.source!="webservice"&&!e.options||e.source=="webservice"&&e.options&&typeof e.options=="object")){r=false;t="options.options value doesn't meet interface IConf requirements or doesn't match option.source value"}if(!(e.source!="data"&&!e.data||e.source=="data"&&e.data&&(typeof e.data=="object"||typeof e.data=="string"))){r=false;t="options.data value doesn't meet interface IConf requirements or doesn't match option.source value"}if(!(e.source!="file"||e.source=="file"&&e.url&&typeof e.url=="string")){r=false;t="options.url value '"+e.url+"' doesn't meet interface IConf requirements or doesn't match option.source value"}}if(!(typeof e.origin=="string"&&["thesaurus","position","classification"].indexOf(e.origin)>-1)){r=false;t="options.origin value '"+e.origin+"' doesn't meet interface IConf requirements"}if(!(!e.output&&typeof e.output!="boolean"||typeof e.output=="string"&&["fullpath","nodeid"].indexOf(e.output)>-1)){r=false;t="options.output value '"+e.output+"' doesn't meet interface IConf requirements"}if(!(!e.multiple&&typeof e.multiple!="boolean"||typeof e.multiple=="boolean")){r=false;t="options.multiple value '"+e.multiple+"' doesn't meet interface IConf requirements"}if(!(!e.mode&&typeof e.mode!="boolean"||typeof e.mode=="string"&&["tree","input"].indexOf(e.mode)>-1)){t="options.mode value '"+e.mode+"' doesn't meet interface IConf requirements"}if(!(!e.label&&typeof e.label!="boolean"||typeof e.label=="string"||typeof e.label=="object")){r=false;t="options.label value '"+e.label+"' doesn't meet interface IConf requirements"}if(!(!e.searchPlaceholder&&typeof e.searchPlaceholder!="boolean"||typeof e.searchPlaceholder=="string"||typeof e.searchPlaceholder=="object")){r=false;t="options.searchPlaceholder value '"+e.searchPlaceholder+"' doesn't meet interface IConf requirements"}if(!(!e.defaultValue&&typeof e.defaultValue!="boolean"||typeof e.defaultValue=="object"&&(e.multiple==true||e.defaultValue.length<=1)||typeof e.defaultValue=="string"||typeof e.defaultValue=="number")){r=false;t="options.defaultValue value '"+e.defaultValue+"' doesn't meet interface IConf requirements or doesn't match option.multiple value"}if(!(!e.readonly&&typeof e.readonly!="boolean"||typeof e.readonly=="boolean")){r=false;t="readonly value '"+e.readonly+"' doesn't meet interface IConf requirements"}if(!(!e.loading&&typeof e.loading!="boolean"||typeof e.loading=="string"&&["display","click"].indexOf(e.loading)>-1)){r=false;t="options.loading value '"+e.loading+"' doesn't meet interface IConf requirements"}if(!(!e.displayTree&&typeof e.displayTree!="boolean"||typeof e.displayTree=="boolean")){r=false;t="options.displayTree value '"+e.displayTree+"' doesn't meet interface IConf requirements"}if(!(!e.minDepth&&typeof e.minDepth!="number"||typeof e.minDepth=="number")||e.maxDepth&&e.maxDepth<e.minDepth){r=false;t="options.minDepth value '"+e.minDepth+"' doesn't meet interface IConf requirements or mismatches with maxDepth value"}if(!(!e.maxDepth&&typeof e.maxDepth!="number"||typeof e.maxDepth=="number")||e.minDepth&&e.minDepth>e.maxDepth){r=false;t="options.maxDepth value '"+e.maxDepth+"' doesn't meet interface IConf requirements or mismatches with minDepth value"}if(!(!e.isFullpath&&typeof e.isFullpath!="boolean"||typeof e.isFullpath=="boolean")){r=false;t="options.isFullpath value '"+e.isFullpath+"' doesn't meet interface IConf requirements"}if(!(!e.defaultValueIsFullpath&&typeof e.defaultValueIsFullpath!="boolean"||typeof e.defaultValueIsFullpath=="boolean")){r=false;t="options.defaultValueIsFullpath value '"+e.defaultValueIsFullpath+"' doesn't meet interface IConf requirements"}if(!(!e.showAutocomplete&&typeof e.showAutocomplete!="boolean"||typeof e.showAutocomplete=="boolean")){r=false;t="options.showAutocomplete value '"+e.showAutocomplete+"' doesn't meet interface IConf requirements"}if(!(!e.openTreeWhenLoaded&&typeof e.openTreeWhenLoaded!="boolean"||typeof e.openTreeWhenLoaded=="boolean")){r=false;t="options.openTreeWhenLoaded value '"+e.openTreeWhenLoaded+"' doesn't meet interface IConf requirements"}if(!(!e.displayRootNode&&typeof e.displayRootNode!="boolean"||typeof e.displayRootNode=="boolean")){r=false;t="options.displayRootNode value '"+e.displayRootNode+"' doesn't meet interface IConf requirements"}if(!(!e.keyboardNavigation&&typeof e.keyboardNavigation!="boolean"||typeof e.keyboardNavigation=="boolean")){r=false;t="options.keyboardNavigation value '"+e.keyboardNavigation+"' doesn't meet interface IConf requirements"}if(!(!e.dragAndDropEnabled&&typeof e.dragAndDropEnabled!="boolean"||typeof e.dragAndDropEnabled=="boolean")){r=false;t="options.dragAndDropEnabled value '"+e.dragAndDropEnabled+"' doesn't meet interface IConf requirements"}if(!(!e.contextMenu&&typeof e.contextMenu!="object"||typeof e.contextMenu=="object")){r=false;t="options.contextMenu value doesn't meet interface IConf requirements"}if(!(!e.searchResultPresentsUnMatched&&typeof e.searchResultPresentsUnMatched!="boolean"||typeof e.searchResultPresentsUnMatched=="boolean")){r=false;t="options.searchResultPresentsUnMatched value '"+e.searchResultPresentsUnMatched+"' doesn't meet interface IConf requirements"}if(!(!e.theme&&typeof e.theme!="object"||typeof e.theme=="object")){r=false;t="options.theme value doesn't meet interface IConf requirements"}var n=function(e){return e==="fr"||e==="en"};if(!(!e.language&&typeof e.language!="string"||typeof e.language=="string"&&n(e.language))){r=false;t="options.language value '"+e.language+"' doesn't meet interface IConf requirements ('fr' or 'en')"}return{toret:r,errorToLog:t}}function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}function strIsNumeric(e){if(typeof e!="string")return false;return isNumeric(e)}function replacer(e,t){if(typeof t==="object"&&t!==null){if(t instanceof XMLHttpRequest){return"[XMLHttpRequest object]"}}return t}function searchValue(e,t,r){var n=false;if(e.text.toLowerCase().indexOf(r.toLowerCase())>-1){n=true}else if(!t&&e.children.length>0&&Object.keys(e.children[0]).length!=0){e.children.forEach((function(e){if(searchValue(e,t,r)){n=true}}))}return n}function getLanguageValue(e,t,r){if(e){switch(typeof e){case"string":return e;case"object":if(t){return e.filter((function(e){return e.language==t}))[0].value}else{var n=e.filter((function(e){return e.language==r}));if(n[0]){return n[0].value}else{console.error("Missing language value in component configuration! It happened when requesting item text.")}}break}}return""}function amIFocusedByEvent(e,t){var r=false;e.composedPath().forEach((function(e,n){if(e.id=="hierarchized-picker-"+t){r=true}}));return r}var waitBeforeTriggerSearch=1e3;var defaultLanguage="en";var defaultPickerTheme={palette:{primary:{main:"#888",light:"#888",contrastText:"#000"},background:{default:"#ccc",light:"#eee",main:"#000",dark:"#fff"},text:{primary:"#000"},input:{background:"#fff",borderStyle:"none"}},typography:{body:{fontSize:"14px",fontWeight:"400"}},modale:{height:"200px"}};var RawDataManager=function(){function e(e,t){this.rawData=null;this.token=e;this.optionsManager=t;this.baseUrl=t.getOptions().url}e.prototype.getToken=function(){var e;if(typeof this.token==="string"){return this.token.length>200?this.token:(e=window.localStorage.getItem(this.token))!==null&&e!==void 0?e:null}if(typeof this.token==="function"){var t=this.token();return typeof t==="string"?t:null}return null};e.prototype.makeRequest=function(e,t,r,n){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(o){if(n)n.classList.add("loading");i=this.getToken();if(!i){throw new Error("No token available.")}return[2,new Promise((function(o,a){var s=new XMLHttpRequest;s.open(e,"".concat(t),true);s.setRequestHeader("Authorization","Bearer ".concat(i));if(e==="POST"){s.setRequestHeader("Content-Type","application/json;charset=UTF-8")}s.onload=function(){if(n)n.classList.remove("loading");if(s.status>=200&&s.status<300){o(JSON.parse(s.responseText))}else{a(new Error("HTTP ".concat(s.status,": ").concat(s.statusText)))}};s.onerror=function(){if(n)n.classList.remove("loading");a(new Error("Network error"))};s.send(r?JSON.stringify(r):null)}))]}))}))};e.prototype.getFromClassification=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var n,i,o,a,s,u,l;return __generator(this,(function(c){switch(c.label){case 0:n="";i=[];if(t["Reach"]){i.push("id=".concat(t["Reach"].join("&id=")));delete t["Reach"]}for(o in t){if(!t.hasOwnProperty(o))continue;a=t[o];s=o.toLowerCase();if(s==="startnode"&&!n){n=encodeURIComponent(a);continue}i.push("".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(a)))}u=i.length>0?"?".concat(i.join("&")):"";l=n?"".concat(e,"/").concat(n,"/").concat(u):"".concat(e,"/").concat(u);return[4,this.makeRequest("GET",l,null,r)];case 1:return[2,c.sent()]}}))}))};e.prototype.getFromSource=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.makeRequest("POST",e,t,r)]}))}))};e.prototype.loadDataFromFile=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.makeRequest("GET",e,null)]}))}))};e.prototype.fetchNodeIdFromFullpath=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i;return __generator(this,(function(o){switch(o.label){case 0:switch(t.origin){case"thesaurus":r={iStartNode:this.optionsManager.getOptions().options.StartNodeID,sValue:e,sTypeField:"fullpath"};break;case"position":r={value:e,startNodeId:this.optionsManager.getOptions().options.StartNodeID};break;default:throw new Error("Invalid origin: ".concat(t.origin,", only 'thesaurus' and 'position' implemented for now..."))}n=this.getApiNodeFromFullpathURL(t);i=0;return[4,this.makeRequest("POST",n,r).then((function(e){if(e.exist){if(t.origin==="thesaurus")i=e.topic.TTop_PK_ID;if(t.origin==="position")i=e.position.ID;if(t.origin==="classification")i=e.node.ID}}))];case 1:o.sent();return[2,i]}}))}))};e.prototype.getApiNodeFromFullpathURL=function(e){var t=this.baseUrl.substring(0,this.baseUrl.lastIndexOf("/"));switch(e.origin){case"thesaurus":return"".concat(t,"/existBy");case"position":return"".concat(t,"/PositionExistByFp");case"classification":return"".concat(t,"/exists");default:throw new Error("Invalid origin: ".concat(e.origin))}};e.prototype.loadData=function(e){this.rawData=e};e.prototype.getData=function(){return this.rawData};e.prototype.mergeData=function(e,t){if(!this.rawData)this.rawData=e;else{this.rawData=this.genericMerge(this.rawData,e,t,"children")}};e.prototype.reorderItems=function(e,t,r){var n=new Map(t.map((function(e){return[e[r],e]})));return e.map((function(e){return n.get(e[r])})).filter(Boolean)};e.prototype.genericMerge=function(e,t,r,n){var i=this;var o,a;if(!e){return t}if(!t||!((o=t[n])===null||o===void 0?void 0:o.length))return e;if(e[n]&&e[n].length>0&&t[n]&&t[n].length>0)t[n]=this.reorderItems(e[n],t[n],r);e[n]=((a=e[n])===null||a===void 0?void 0:a.length)?e[n].map((function(e,o){return i.genericMerge(e,t[n].filter((function(t){return t.key==e.key}))[o],r,n)})):t[n];return e};e.prototype.searchAndMergeData=function(e,t){return this.genericMerge(e,t,"key","children")};e.prototype.searchAndMergeDataClassification=function(e,t){return this.genericMerge(e,t,"ID","children")};return e}();var OptionsManager=function(){function e(e){this.options=this.initializeOptions(e)}e.prototype.initializeOptions=function(e){var t={multiple:false,mode:"input",loading:"display",showAutocomplete:false,openTreeWhenLoaded:false,displayRootNode:false,keyboardNavigation:false,dragAndDropEnabled:false,errorsInInput:true,isFullpath:true,defaultValue:[],defaultValueIsFullpath:false};var r=Object.assign(Object.assign({},t),e);if(typeof r.defaultValue!=="object"){r.defaultValue=[r.defaultValue]}return r};Object.defineProperty(e.prototype,"data",{get:function(){if(typeof this.getOptions().data==="object")return this.options.data;return JSON.parse(this.options.data)},enumerable:false,configurable:true});e.prototype.getOptions=function(){return this.options};e.prototype.updateOptions=function(e){this.options=Object.assign(Object.assign({},this.options),e)};e.prototype.validateNewOptions=function(e){return this.initializeOptions(Object.assign(Object.assign({},this.options),e))};e.prototype.updateDefaultValue=function(){if(this.options.defaultValue!=undefined&&this.options.defaultValue.length===0){delete this.options.defaultValue}};e.prototype.dropReach=function(){if(this.options.options&&this.options.options.Reach){delete this.options.options.Reach}};return e}();function getPropertyFromNode(e,t,r){if(r===void 0){r=true}t=t.trim();if(!e||!t){return""}if(e[t]||e[t]===0){return e[t]}if(e.data&&(e.data[t]||e.data[t]===0)){return e.data[t]}if(r)console.error("Property '".concat(t,"' not found in node:"),e);return null}function findNodeById(e,t){return e.nodesById[t]||null}function fillTreeWithObject(e,t,r,n){var i=n.searchResultPresentsUnMatched;if(t&&t.length){t.forEach((function(t){var o,a,s,u;var l=null;var c=null;var f=null;var p=null;if(n.origin=="classification"){l=getPropertyFromNode(t,"ID");c=(o=getPropertyFromNode(t,"Translations")[n.language])===null||o===void 0?void 0:o.translated_name;f=(a=getPropertyFromNode(t,"Properties"))===null||a===void 0?void 0:a.System_Fullpath;p=(s=getPropertyFromNode(t,"Translations")[n.language])===null||s===void 0?void 0:s.translated_fullpath;if(!f)f=(u=getPropertyFromNode(t,"Properties"))===null||u===void 0?void 0:u.System_FullPath;if(!p)p=getPropertyFromNode(t,"fullpathTranslated")}else{l=getPropertyFromNode(t,"key");c=getPropertyFromNode(t,"valueTranslated");f=getPropertyFromNode(t,"fullpath");p=getPropertyFromNode(t,"fullpathTranslated")}var h=getPropertyFromNode(t,"children",false);var d=getPropertyFromNode(t,"deprecated",null);if(d===null)d=getPropertyFromNode(t,"Is_Deprecated",false);var v={id:l,nodeId:l,text:c,fullpath:f,fullpathTranslated:p,children:getPropertyFromNode(t,"hasChildren",false)&&h&&h.length===0?[{}]:[],deprecated:d,isDesaturated:false,searchMatch:false};var g=fillTreeWithObject(v.children,h,r,n);var m=false;if(r){var y=searchValue(v,false,r);v.isDesaturated=!y;v.searchMatch=searchValue(v,true,r);m=y||i}else{m=true}if(m){v.children=g;e.push(v)}}))}return e}function completeCurrentTreeWithTree(e,t,r){var n;var i=t.key||t.id||t.ID;var o=findNodeById(e,i);if(i==0&&t.children&&t.children.length>0){t.children.forEach((function(t){completeCurrentTreeWithTree(e,t,r)}))}if(o){o.children=[];var a=(n=e.liElementsById[i])===null||n===void 0?void 0:n.querySelector("ul");if(!a){a=e.createUlEle();e.liElementsById[i].appendChild(a)}var s=fillTreeWithObject([],t.children,null,r);a.innerHTML="";s.forEach((function(n){var i=e.createLiEle(n,true);a.appendChild(i);o.children.push(n);e.nodesById[n.id]=n;e.liElementsById[n.id]=i;if(n.children&&n.children.some((function(e){return Object.keys(e).length>0}))){t.children.forEach((function(t){completeCurrentTreeWithTree(e,t,r)}))}}))}}function displayAutocompleteWithResults(e,t,r,n,i){var o;if(e&&r.getOptions().showAutocomplete){var a=((o=e.children)===null||o===void 0?void 0:o.filter((function(e){var r;return(r=e.text)===null||r===void 0?void 0:r.toLowerCase().includes(t.toLowerCase())})))||[];a=a.sort((function(e,t){return e.text.localeCompare(t.text)}));var s=document.getElementById("autocomplete-results-area");s.innerHTML="";if(t.length>0){a.forEach((function(e){var t=document.createElement("li");t.title=e.text;t.textContent=e.text;t.setAttribute("nodeid",e.id);t.addEventListener("click",(function(){n(e.id);i("hide")}));s.appendChild(t)}));showAutocomplete()}}}function showAutocomplete(){var e=document.getElementById("autocomplete-results-area");if(e)e.style.display="block"}function clearAutocomplete(e){if(e===void 0){e=false}var t=document.getElementById("autocomplete-results-area");if(t){t.style.display="none";if(e)t.innerHTML=""}}var focusedNodeIndex=0;function setupKeyboardNavigation(e,t,r){if(!t.getOptions().keyboardNavigation)return;var n=e.el.querySelector(".hierarchized-picker-tree-area")||e.el.querySelector(".hierarchized-picker-raw-tree-area");if(!n)return;function i(e,t){Object.values(e).forEach((function(e){e.classList.remove("treejs-node__focused")}));t.classList.add("treejs-node__focused")}function o(e,t){var r=[];var n=function(e){e.forEach((function(e){r.push(e);if(e.children&&e.children.length>0&&!t[e.id].classList.contains("treejs-node__close")){n(e.children)}}))};n(e);return r}focusedNodeIndex=0;if(e&&e.loadedTreeJs&&e.loadedTreeJs.liElementsById&&e.loadedTreeJs.treeNodes){i(e.loadedTreeJs.liElementsById,e.loadedTreeJs.liElementsById[e.loadedTreeJs.treeNodes[focusedNodeIndex].id])}if(!e._keydownListenerAdded){e._keydownListenerAdded=true;e.el.addEventListener("keydown",(function(n){var a,s;n.stopPropagation();var u=e.loadedTreeJs;var l=o(u.treeNodes,u.liElementsById);if(!u||!l.length)return;var c=l[focusedNodeIndex];var f=l[focusedNodeIndex];var p=u.liElementsById[f.id];var h=["tab","0","arrowup","arrowdown","arrowleft","arrowright"];switch(n.key.toLowerCase()){case"tab":case"0":n.preventDefault();{e.setNodeAsSelected(c.nodeId,e.loadedTreeJs,true);if(t.getOptions().mode!="tree"&&!t.getOptions().multiple){setTimeout((function(){e.showTree("hide")}),100)}}break;case"arrowup":n.preventDefault();focusedNodeIndex=Math.max(focusedNodeIndex-1,0);var d=l[focusedNodeIndex];var v=u.liElementsById[d.id];v.scrollIntoView({behavior:"smooth",block:"nearest"});i(u.liElementsById,v);break;case"arrowdown":n.preventDefault();focusedNodeIndex=Math.min(focusedNodeIndex+1,l.length-1);var g=l[focusedNodeIndex];var m=u.liElementsById[g.id];i(u.liElementsById,m);m.scrollIntoView({behavior:"smooth",block:"nearest"});break;case"arrowleft":n.preventDefault();var y=p.querySelector(".treejs-switcher");if(y){(a=e.loadedTreeJs)===null||a===void 0?void 0:a.onSwitcherClick(y)}break;case"arrowright":n.preventDefault();var b=p.querySelector(".treejs-switcher");if(b){(s=e.loadedTreeJs)===null||s===void 0?void 0:s.onSwitcherClick(b)}break}if(h.includes(n.key.toLowerCase()))r.emit(n)}))}}function focusSearchInput(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=e.el.querySelector("search-input input");if(!(t&&document.activeElement!==t))return[3,2];return[4,t.focus()];case 1:r.sent();r.label=2;case 2:return[2]}}))}))}function focusMainInput(e){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n;return __generator(this,(function(i){t=Array.from(document.querySelectorAll("input, button, textarea, select, [tabindex]")).filter((function(e){return e.tabIndex>=0}));r=t.indexOf(document.activeElement);n=(e=t[r+1])!==null&&e!==void 0?e:t[0];if(n){n.focus()}return[2]}))}))}function handleFocusEvent(e,t){if(t==="search"){focusSearchInput(e);e.showTree("search")}else if(t==="modale"){e.showTree("modale")}else if(t==="hide"){e.showTree("hide")}}function clickPickerModalArea(e,t){if(e.pickerClass==="fieldError"){e.showTree("hide")}else if(e.shownTree){e.showTree("modale")}else{e.mylog("Ignored modal click")}if(e.theOptions.mode=="tree"){setupKeyboardNavigation(e,e.optionsManager,e.navigateInTree)}}function focusInSearchEvent(e){handleFocusEvent(e,"search")}function focusOutSearchEvent(e,t){}var hierarchizedPickerCss='reneco-hierarchized-picker .hierarchized-picker-raw-tree-area{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker div:focus{outline:none}reneco-hierarchized-picker .loader{color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, black)) !important;position:absolute;z-index:1;min-width:100%;min-height:100%;background:#FFFFFF99;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .loader .loader-inner{background:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, var(--ion-color-light, #FAFAFA))) !important;padding:20px;-webkit-box-shadow:0 0 5px #000;box-shadow:0 0 5px #000;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .loader:not(.loading){display:none}reneco-hierarchized-picker .scrollable{overflow-y:auto;position:relative}reneco-hierarchized-picker .treejs{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:var(--hpicker-theme-typography-tree-font-size, 14px) !important;font-weight:var(--hpicker-theme-typography-tree-font-weight, 400) !important}reneco-hierarchized-picker .treejs *:after,reneco-hierarchized-picker .treejs *:before{-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .treejs>.treejs-node{padding-left:0}reneco-hierarchized-picker .treejs .treejs-nodes{list-style:none;padding-left:20px;overflow:hidden;-webkit-transition:height 150ms ease-out, opacity 150ms ease-out;-o-transition:height 150ms ease-out, opacity 150ms ease-out;transition:height 150ms ease-out, opacity 150ms ease-out}reneco-hierarchized-picker .treejs .treejs-node{cursor:pointer;overflow:hidden;position:relative}reneco-hierarchized-picker .treejs .treejs-node.treejs-placeholder{padding-left:20px}reneco-hierarchized-picker .treejs .treejs-switcher{display:inline-block;vertical-align:middle;width:20px;height:20px;cursor:pointer;position:relative;-webkit-transition:-webkit-transform 150ms ease-out;transition:-webkit-transform 150ms ease-out;-o-transition:transform 150ms ease-out;transition:transform 150ms ease-out;transition:transform 150ms ease-out, -webkit-transform 150ms ease-out}reneco-hierarchized-picker .treejs .treejs-switcher:before{position:absolute;top:8px;left:6px;display:block;content:\' \';border:4px solid transparent;border-top:4px solid rgba(0, 0, 0, 0.4);-webkit-transition:border-color 150ms;-o-transition:border-color 150ms;transition:border-color 150ms}reneco-hierarchized-picker .treejs .treejs-switcher:hover:before{border-top:4px solid var(--hpicker-theme-palette-font-color)}reneco-hierarchized-picker .treejs-node__checked>.treejs-switcher:before{border-top:4px solid var(--hpicker-theme-palette-primary-contrastText) !important}reneco-hierarchized-picker .treejs-node__focused{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:2px}reneco-hierarchized-picker .treejs .treejs-node__close>.treejs-switcher{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg)}reneco-hierarchized-picker .treejs .treejs-node__close>.treejs-nodes{height:0}reneco-hierarchized-picker .treejs .treejs-checkbox{display:inline-block;vertical-align:middle;width:20px;height:20px;cursor:pointer;position:relative}reneco-hierarchized-picker .treejs .treejs-checkbox:before{-webkit-transition:all 0.3s;-o-transition:all 0.3s;transition:all 0.3s;cursor:pointer;position:absolute;top:2px;content:\' \';display:block;width:16px;height:16px;border:1px solid #d9d9d9;border-radius:2px}reneco-hierarchized-picker .treejs .treejs-checkbox:hover:before{-webkit-box-shadow:0 0 2px 1px #1890ff;box-shadow:0 0 2px 1px #1890ff}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:before{background-color:#1890ff;border-color:#1890ff}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:after{position:absolute;content:\' \';display:block;top:4px;left:5px;width:5px;height:9px;border:2px solid #fff;border-top:none;border-left:none;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}reneco-hierarchized-picker .treejs .treejs-node__halfchecked{background-color:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, #e8a86c))}reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:before{background-color:#1890ff;border-color:#1890ff}reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:after{position:absolute;content:\' \';display:block;top:9px;left:3px;width:10px;height:2px;background-color:#fff}reneco-hierarchized-picker .treejs .treejs-node__disabled{cursor:not-allowed;color:rgba(0, 0, 0, 0.25)}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox{cursor:not-allowed}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox:before{cursor:not-allowed;border-color:#d9d9d9 !important;background-color:#f5f5f5 !important}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox:hover:before{-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-node__checked>.treejs-checkbox:after{border-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-node__halfchecked>.treejs-checkbox:after{background-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled.treejs-node__checked>.treejs-checkbox:after{border-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled.treejs-node__halfchecked>.treejs-checkbox:after{background-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-label{vertical-align:middle}reneco-hierarchized-picker .treejs .treejs-node__deprecated>.treejs-label{text-decoration:line-through}reneco-hierarchized-picker .treejs .treejs-node__desaturated>.treejs-label{opacity:.5}reneco-hierarchized-picker .treejs .treejs-node__searchmatch>.treejs-label{font-weight:bolder}reneco-hierarchized-picker .treejs .dragging{background:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, #e8a86c));display:inline;opacity:.9;padding:11px 0px;display:block}reneco-hierarchized-picker .treejs .dragover{background:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, #e8a86c))}reneco-hierarchized-picker .treejs .dragover-over::after{content:"";display:block;width:2px;height:100%;position:absolute;top:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .treejs .dragover-before::after{content:"";display:block;height:2px;width:100%;position:absolute;top:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .treejs .dragover-after::after{content:"";display:block;height:2px;width:100%;position:absolute;bottom:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .fieldError{color:red !important}reneco-hierarchized-picker .hidden{display:none;opacity:0}reneco-hierarchized-picker ul.treejs-nodes:first-child{padding-left:0px !important;margin-top:0px !important;margin-left:0px !important;background-color:var(--hpicker-theme-palette-background-dark)}reneco-hierarchized-picker ul.treejs-nodes:not(:first-child){margin:0 !important;padding-left:15px !important;background-color:var(--hpicker-theme-palette-background-dark, var(--mui-palette-background-dark, var(--ion-color-light-tint, #FFF)))}reneco-hierarchized-picker ul.treejs-nodes{margin-left:15px !important;padding-left:0px !important}reneco-hierarchized-picker .hierarchized-picker-raw-tree li.treejs-node ul.treejs-nodes{margin:11px 0 0 0 !important}reneco-hierarchized-picker .hierarchized-picker-raw-tree li.treejs-node__close ul.treejs-nodes{margin:0 !important}reneco-hierarchized-picker li.treejs-node__close{background-color:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, var(--ion-color-light, #FAFAFA)))}reneco-hierarchized-picker li:not(.treejs-node__close){background-color:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, #e8a86c));padding-bottom:0px !important}reneco-hierarchized-picker li:not(.treejs-node__close) ul.treejs-nodes li{margin-top:2px !important}reneco-hierarchized-picker ul li:last-child{margin-bottom:0px !important}reneco-hierarchized-picker li.treejs-node__checked{background-color:var(--hpicker-theme-palette-primary-light) !important;color:var(--hpicker-theme-palette-primary-contrastText, var(--mui-palette-primary-ContrastText, var(--ion-color-primary-contrast, #000)))!important}reneco-hierarchized-picker li.treejs-node{padding:2px 0px;margin-bottom:2px}reneco-hierarchized-picker .treejs-node.readonly_node{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:darkgrey}reneco-hierarchized-picker .treejs-node:not(.readonly_node){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, black))}reneco-hierarchized-picker .hierarchized-picker-container{position:relative;width:100%}reneco-hierarchized-picker .hierarchized-picker-input-area{background-color:transparent !important;display:-ms-flexbox;display:flex;width:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}reneco-hierarchized-picker .hierarchized-picker-input-area .input-wrapper{padding-left:10px !important}reneco-hierarchized-picker .hierarchized-picker-input{-ms-flex:2;flex:2}reneco-hierarchized-picker .hierarchized-picker-input input{width:100%}reneco-hierarchized-picker .hierarchized-picker-input.readonly{pointer-events:none;cursor:initial}reneco-hierarchized-picker .hierarchized-picker-label{position:stacked;margin-left:5px}reneco-hierarchized-picker .hierarchized-picker-tree-area{padding-top:10px}reneco-hierarchized-picker .hierarchized-picker-modal-area{position:absolute;width:100%;background-color:var(--hpicker-theme-palette-background-dark, var(--mui-palette-background-dark, var(--ion-color-light-tint, #FFF))) !important;z-index:10;overflow:scroll;top:20px;min-height:100px;max-height:var(--hpicker-theme-modal-height, "200px") !important;-webkit-box-shadow:0 0px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0px 15px 0 rgba(0, 0, 0, 0.2);border-radius:4px;margin-right:0px !important}reneco-hierarchized-picker .hierarchized-picker-modal-area.display-modale-top{bottom:30px !important;top:unset !important}reneco-hierarchized-picker .hierarchized-picker-modal{padding:0px 15px}reneco-hierarchized-picker .hierarchized-picker{display:-ms-flexbox;display:flex;width:100%;font-family:\'Roboto\', sans-serif}reneco-hierarchized-picker .hierarchized-picker-spinner{margin:35px 0px 0px 145px}reneco-hierarchized-picker .reneco:before{position:relative;top:1px}reneco-hierarchized-picker .hierarchized-picker-input-area span.reneco:hover{cursor:pointer}reneco-hierarchized-picker .hierarchized-picker-input-area span.reneco-close{color:var(--ion-color-danger, red) !important;padding-left:10px}reneco-hierarchized-picker .treejs .treejs-switcher:before{border-top:4px solid var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, var(--ion-color-dark-shade, #121212)))}reneco-hierarchized-picker .treejs .treejs-checkbox:before{-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:before,reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:before{background-color:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433))) !important;border-color:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433))) !important;-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker #autocomplete-results-area{position:absolute;margin-top:48px;background-color:white;left:15px;z-index:10;padding:0px 5px;max-width:340px;max-height:110px;overflow:auto}reneco-hierarchized-picker #autocomplete-results-area li{list-style-type:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;margin:1px}reneco-hierarchized-picker .hierarchized-picker-raw-tree-area li.treejs-node{padding:11px 0px;display:block}reneco-hierarchized-picker input[title]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}reneco-hierarchized-picker input{background-color:var(--hpicker-theme-palette-input-background-color, #eeeeee);border-style:var(--hpicker-theme-palette-input-border-style, solid);color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, black))}reneco-hierarchized-picker input:focus-visible{outline:unset !important;outline-color:unset !important;outline-style:unset !important}.hierarchized-picker-raw-tree-area.readonly li.treejs-node .treejs-switcher{pointer-events:all}::-webkit-scrollbar-thumb{background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433)));width:8px;margin:5px;border-radius:5px}::-webkit-scrollbar{background:var(--ion-color-medium-tint, #E0E0E0);width:8px;height:8px;margin:5px;cursor:pointer;border-radius:5px}::-webkit-scrollbar-corner{background-color:var(--ion-color-light-tint, #FFF)}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__close{background-color:var(--ion-color-dark-tint, #424242);color:var(--ion-color-dark-contrast, #fff)}[class$="-dark"] reneco-hierarchized-picker li:not(.treejs-node__close){background-color:var(--ion-color-dark, #212121);color:var(--ion-color-dark-contrast, #fff)}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__checked{background-color:var(--ion-color-background, var(--hpicker-theme-palette-background-default, rgba(221, 169, 37, 0.18)));color:var(--ion-color-primary-contrast, #fff) !important}[class$="-dark"] reneco-hierarchized-picker .treejs-switcher:before{border-top-color:var(--ion-color-dark-contrast, #fff) !important}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__checked .treejs-switcher:before{color:var(--ion-color-light-contrast, #111111) !important}[class$="-dark"] reneco-hierarchized-picker ul.treejs-nodes:not(:first-child){background-color:var(--ion-color-light-contrast, #111111) !important}';var HierarchizedPickerComponent=function(){function e(e){var t=this;registerInstance(this,e);this.valueChange=createEvent(this,"valueChange",7);this.itemDropped=createEvent(this,"itemDropped",7);this.itemContextMenuItemClick=createEvent(this,"itemContextMenuItemClick",7);this.searchResult=createEvent(this,"searchResult",7);this.navigateInTree=createEvent(this,"navigateInTree",7);this.errorRaised=createEvent(this,"errorRaised",7);this.modaleHeight=200;this.modalePosition="bottom";this.canload=true;this.ready=false;this.searchToDisplay=0;this.ignoreOptionsChanges=true;this.lastSearchMatchCounter=0;this.setValueOnClick=true;this.mylog=console.log;this.lastErrorMessage="";this.scrollToNode=function(e,r){if(e===void 0){e=null}if(r===void 0){r=false}var n;var i=0;var o=function(e,r){if(r===void 0){r=false}var n,a,s,u;var l=e===null||e===void 0?void 0:e.nodeId;if(!e||!l){return}var c=t.loadedTreeJs.nodesById[l];if((a=(n=c===null||c===void 0?void 0:c.children)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.id){(s=e.classList)===null||s===void 0?void 0:s.remove("treejs-node__close")}if(r){i+=e.offsetTop}var f=(u=e.parentNode)===null||u===void 0?void 0:u.closest(".treejs-node");if(f){o(f,r)}};try{if(e){var a=t.loadedTreeJs.liElementsById[e];if(a){o(a,true);if(r&&a.classList.contains("treejs-node__close")){var s=a.querySelector(".treejs-switcher");if(s){(n=t.loadedTreeJs)===null||n===void 0?void 0:n.onSwitcherClick(s)}}}}else{var u=document.querySelectorAll("#tree-area-"+t.componentID+" .treejs-node__checked");u.forEach((function(e){return o(e,i==0)}))}}catch(e){t.errorToLog="Error in showSelectedNodes"}if(i&&t.scrollable){t.scrollable.scrollTop=i}};this.getShortenedFullpath=function(e){var r,n,i,o;if(!e)return e;if(t.optionsManager.getOptions().source!=="webservice")return e;var a=e;var s=t.rawDataManager.getData();if(s){try{var u=t.optionsManager.getOptions().origin=="classification"?"startNode":"StartNodeID";var l=0;switch(t.optionsManager.getOptions().source){case"file":return e;case"data":if(t.optionsManager.getOptions().origin=="classification")return e;l=t.theOptions.data.key;break;case"webservice":l=t.optionsManager.getOptions().options[u];break}if(["0",0].includes(l))return a;if(isNumeric(l)){if(t.optionsManager.getOptions().origin=="classification"){var c=s.Translations,f=s.Properties;var p=t.optionsManager.getOptions().language;a=((n=(r=c[p])===null||r===void 0?void 0:r.translated_name)!==null&&n!==void 0?n:f===null||f===void 0?void 0:f.System_Name)+e.replace((o=(i=c[p])===null||i===void 0?void 0:i.translated_fullpath)!==null&&o!==void 0?o:f===null||f===void 0?void 0:f.System_Fullpath,"")}else{var h=s.fullpath,d=s.fullpathTranslated,v=s.title,g=s.valueTranslated;a=(g!==null&&g!==void 0?g:v)+e.replace(d!==null&&d!==void 0?d:h,"")}}else t.errorToLog="Error in getShortenedFullpath : startnode is not number"}catch(e){t.errorToLog="Error in getShortenedFullpath "+e.toString()}}return a};this.options=undefined;this.valueChangeCallback=undefined;this.disabled=undefined;this.isDisabled=undefined;this.newoptions=undefined;this.newfilter=undefined;this.componentID=undefined;this.rawData=undefined;this.pickerClass="";this.displayedValue=undefined;this.value=[];this.shownTree=false;this.searchResultData=[];this.activatedDragAndDrop=true;this.hasFocus=undefined;this.errorToLog="";this.checkFields=this.checkFields.bind(this);this.setNodeAsSelected=this.setNodeAsSelected.bind(this);this.displayTree=this.displayTree.bind(this)}e.prototype.getValue=function(){var e=this;var t,r,n,i;if(!this.optionsManager.getOptions().output){if(this.optionsManager.getOptions().multiple){return Promise.resolve(this.value)}else{return Promise.resolve((t=this.value)===null||t===void 0?void 0:t[0])}}else{if(this.optionsManager.getOptions().multiple){return Promise.resolve((r=this.value)===null||r===void 0?void 0:r.map((function(t){return t[e.optionsManager.getOptions().output]})))}else{return Promise.resolve((i=(n=this.value)===null||n===void 0?void 0:n[0])===null||i===void 0?void 0:i[this.optionsManager.getOptions().output])}}};e.prototype.refreshPicker=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(e){this.optionsManager.updateOptions({defaultValue:[]})}this.setNewOption(this.optionsManager.getOptions());return[2]}))}))};e.prototype.setOptions=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.setNewOption(e);return[2]}))}))};e.prototype.getOptionsAsIConf=function(e){if(typeof e=="string")return JSON.parse(e);return e};e.prototype.setSearchResults=function(e){var t=0;var r=__spreadArray([],e,true);while(r.length>0){var n=r.shift();t+=n.searchMatch?1:0;if(n.children){r.push.apply(r,n.children)}}this.lastSearchMatchCounter=t;this.searchResultData=e};e.prototype.getSearchResultWithCounter=function(e){return{data:e,matches:this.lastSearchMatchCounter}};e.prototype.searchResultDataChange=function(e,t){if(e&&e!=t&&e.length>0){this.searchResult.emit(this.getSearchResultWithCounter(e))}};e.prototype.getSearchResult=function(){return Promise.resolve(this.getSearchResultWithCounter(this.searchResultData))};e.prototype.logError=function(e){try{console.error("--- Hierarchized picker "+this.componentID+" ERROR ---",e);this.lastErrorMessage=e}catch(e){var t="--- Hierarchized picker generic ERROR ---";this.lastErrorMessage=t;console.error(t)}this.errorRaised.emit(this.lastErrorMessage)};Object.defineProperty(e.prototype,"theOptions",{get:function(){return this.optionsManager.getOptions()},enumerable:false,configurable:true});e.prototype.diffKeys=function(e,t,r){if(r===void 0){r=""}var n=[];var i=Object.keys(e||{}).filter((function(e){return t&&Object.prototype.hasOwnProperty.call(t,e)}));for(var o=0,a=i;o<a.length;o++){var s=a[o];var u=r?"".concat(r,".").concat(s):s;var l=e[s];var c=t[s];if(Array.isArray(l)&&Array.isArray(c)){if(l.length!==c.length){n.push(u);continue}for(var f=0;f<l.length;f++){var p=l[f];var h=c[f];if(typeof p==="object"&&p!==null&&typeof h==="object"&&h!==null){var d=this.diffKeys(p,h,"".concat(u,"[").concat(f,"]"));if(d.length>0){n.push(u);break}}else if(p!==h){n.push(u);break}}}else if(l&&c&&typeof l==="object"&&typeof c==="object"){var d=this.diffKeys(l,c,u);if(d.length>0)n.push.apply(n,d)}else if(l!==c){n.push(u)}}return n};e.prototype.setNewOption=function(e,t){if(t===void 0){t=null}return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,l;var c=this;return __generator(this,(function(f){switch(f.label){case 0:this.ready=false;r=Object.assign({},this.theOptions);if(t&&JSON.stringify(e.options)==JSON.stringify(t.options)){this.ready=true;return[2]}if(typeof e=="string")e=JSON.parse(e);if(typeof t=="string")t=JSON.parse(t);this.value=[];this.optionsManager.updateOptions(e);this.setDisplayedValue(this.value);n=!t||(e.origin!=t.origin||e.options.StartNodeID!=t.options.StartNodeID);if(this.optionsManager.getOptions().source!="file"&&(!t||t&&n)){this.rawData=null}this.ready=false;i=isInstanceOfIConf(this.optionsManager.getOptions());this.canload=i.toret;this.errorToLog=i.errorToLog;if(!this.canload){this.displayPickerError("Error(s) in the picker configuration!");return[2]}if(t&&JSON.stringify(e.options)!=JSON.stringify(t.options)){this.value=[]}if(!((e===null||e===void 0?void 0:e.loading)=="display"||e&&!e.loading))return[3,5];if(!(t&&this.isChangeInOptions(e,t)||!t))return[3,4];if(!t){t=r}o=this.diffKeys(t,this.optionsManager.initializeOptions(e));a=["multiple"];s=["token"];u=o.filter((function(e){return!s.includes(e)}));if(!(u.length==1&&u.some((function(e){return a.includes(e)}))))return[3,1];l=u[0];switch(l){case"multiple":document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-checkbox").forEach((function(e){return e.style.display=c.theOptions.multiple?"inline-block":"none"}));break}return[3,3];case 1:this.rawDataManager=new RawDataManager(this.getOptionsAsIConf(this.optionsManager.getOptions()).token,this.optionsManager);return[4,this.loadHierarchizedPicker(true)];case 2:f.sent();this.displayWhenLoaded();f.label=3;case 3:return[3,5];case 4:this.ready=true;f.label=5;case 5:return[2]}}))}))};e.prototype.setNewOptions=function(e){if(typeof e=="string")e=JSON.parse(e);this.setOptions(e)};e.prototype.setNewFilter=function(e){this.filterTree(e)};e.prototype.optionsChange=function(e,t){if(!this.optionsManager||!this.optionsManager.getOptions()||!this.ready||this.ignoreOptionsChanges){return}if(typeof e=="string")e=JSON.parse(e);this.setNewOption(e,t)};e.prototype.isChangeInOptions=function(e,t){var r=lodash.isEqual(e,t);if(!e.defaultValue&&!t.defaultValue)return;var n=Array.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue];var i=Array.isArray(t.defaultValue)?t.defaultValue:[t.defaultValue];var o=n.length!==i.length||!n.every((function(e){return i.includes(e)}));if(!r&&o){return o}else{return!r}};e.prototype.rawDataWatcher=function(e){var t=this;if(!this.ready){this.rawDataManager.loadData(e);this.translateDataForTree(e);if(this.optionsManager.getOptions().openTreeWhenLoaded){this.showTree("modale");setTimeout((function(){return focusSearchInput(t)}),100)}}};e.prototype.filterTree=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.search(e);return[2]}))}))};e.prototype.getError=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.resolve(this.lastErrorMessage)]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.isDisabled=this.disabled;this.options=this.getOptionsAsIConf(this.options);this.optionsManager=new OptionsManager(this.getOptionsAsIConf(this.options));this.rawDataManager=new RawDataManager(this.getOptionsAsIConf(this.options).token,this.optionsManager);return[4,this.loadHierarchizedPicker()];case 1:t.sent();this.setDisplayedValueFromDefault();setTimeout((function(){e.displayWhenLoaded()}),0);return[2]}}))}))};e.prototype.setDisplayedValueFromDefault=function(){var e;var t=(e=this.optionsManager.getOptions().defaultValue)!==null&&e!==void 0?e:[];this.value=t.map((function(e){return{nodeid:e,shortpathTranslated:"Node ".concat(e)}}));this.setDisplayedValue(this.value)};e.prototype.componentWillRender=function(){this.mylog("----- componentWillRender beginning -----")};e.prototype.componentDidRender=function(){this.mylog("----- componentDidRender beginning -----")};e.prototype.componentDidLoad=function(){this.mylog("----- componentDidLoad beginning -----");focusMainInput()};e.prototype.displayWhenLoaded=function(){var e;if(!this.canload){this.displayPickerError("Error(s) in the picker configuration!");return}if(((e=this.optionsManager.getOptions())===null||e===void 0?void 0:e.loading)=="display"){this.loadDataForTree(true,document.querySelector("#hierarchized-picker-"+this.componentID+" .loader"))}};e.prototype.initComponent=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;var r=this;return __generator(this,(function(n){switch(n.label){case 0:if(!this.optionsManager.getOptions().multiple)this.optionsManager.updateOptions({multiple:false});if(!this.optionsManager.getOptions().mode)this.optionsManager.getOptions().mode="input";if(!this.optionsManager.getOptions().defaultValue){this.optionsManager.updateOptions({defaultValue:[]})}else if(typeof this.optionsManager.getOptions().defaultValue!="object"){this.optionsManager.updateOptions({defaultValue:[this.optionsManager.getOptions().defaultValue]})}e=true;t=undefined;if(!this.isDisabled)this.isDisabled=false;if(this.optionsManager.getOptions().readonly!==undefined)this.isDisabled=this.optionsManager.getOptions().readonly;if(!this.optionsManager.getOptions().loading)this.optionsManager.updateOptions({loading:"display"});if(!this.optionsManager.getOptions().displayTree&&this.optionsManager.getOptions().displayTree!=false)this.optionsManager.updateOptions({displayTree:true});if(!this.optionsManager.getOptions().isFullpath&&this.optionsManager.getOptions().isFullpath!=false)this.optionsManager.updateOptions({isFullpath:true});if(!this.optionsManager.getOptions().showAutocomplete)this.optionsManager.getOptions().showAutocomplete=false;if(!this.optionsManager.getOptions().openTreeWhenLoaded)this.optionsManager.getOptions().openTreeWhenLoaded=false;if(!this.optionsManager.getOptions().displayRootNode)this.optionsManager.getOptions().displayRootNode=false;if(!this.optionsManager.getOptions().keyboardNavigation)this.optionsManager.getOptions().keyboardNavigation=false;if(!this.optionsManager.getOptions().dragAndDropEnabled)this.optionsManager.getOptions().dragAndDropEnabled=false;if(!this.optionsManager.getOptions().defaultValueIsFullpath)this.optionsManager.getOptions().defaultValueIsFullpath=false;if(!this.optionsManager.getOptions()&&this.optionsManager.getOptions().errorsInInput!==false)this.optionsManager.updateOptions({errorsInInput:true});if(!this.hasFocus)this.hasFocus=[];try{this.optionsManager.getOptions().defaultValue.map((function(){}))}catch(e){this.errorToLog="There's an issue with your defaultValue format: "+this.optionsManager.getOptions().defaultValue.toString();return[2]}return[4,Promise.all(this.optionsManager.getOptions().defaultValue.map((function(n){return __awaiter(r,void 0,void 0,(function(){var r,i,o,a,s;var u=this;return __generator(this,(function(l){switch(l.label){case 0:if(!(this.optionsManager.getOptions().defaultValueIsFullpath||!(typeof n=="number")&&!strIsNumeric(n)))return[3,6];if(!t){t=[]}r="";i=this.optionsManager.getOptions().source;switch(i){case"file":return[3,1];case"data":return[3,2];case"webservice":return[3,3]}return[3,5];case 1:r="The loading of nodes based on fullpath is not available on file mode for now!";return[3,5];case 2:if(this.theOptions.origin=="classification"){r="The loading of nodes based on fullpath is not available on file mode for the classification context for now!";return[3,5]}o=function(e){if(e.data.fullpath===n||e.data.fullpathTranslated===n){return e.key}if(e.children&&e.children.length>0){for(var t=0,r=e.children;t<r.length;t++){var i=r[t];var a=o(i);if(a){return a}}}return null};if(n){a=o(this.theOptions.data);if(a)t.push(a)}return[3,5];case 3:return[4,this.rawDataManager.fetchNodeIdFromFullpath(n,this.optionsManager.getOptions()).catch((function(e){u.displayPickerError(e)}))];case 4:s=l.sent();if(s){t.push(s)}return[3,5];case 5:if(r.length>0){this.displayPickerError(r);this.errorToLog=r;e=false}l.label=6;case 6:return[2]}}))}))})))];case 1:n.sent();if(t){this.optionsManager.getOptions().defaultValue=t}if(this.optionsManager.getOptions().options){if(this.optionsManager.getOptions().defaultValue.length>0){if(e){this.optionsManager.getOptions().options.Reach=this.optionsManager.getOptions().defaultValue.map((function(e){return Number(e)}))}else{this.errorToLog="theOptions.options.Reach is undefined and can't be auto-assigned: either specify a 'Reach' option "+" in your webservice call options or make sure the defaultValue property contains node IDs and not fullpath values."}}}return[2]}}))}))};e.prototype.loadHierarchizedPicker=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){var t,r,n;var i=this;return __generator(this,(function(o){switch(o.label){case 0:if(!e){if(this.el.getAttribute("options")&&typeof this.el.getAttribute("options")=="string"){this.optionsManager.updateOptions(JSON.parse(this.el.getAttribute("options")))}}{this.mylog=function(){};console.time=function(){};console.timeEnd=function(){}}if(this.optionsManager.getOptions().id){this.componentID=this.optionsManager.getOptions().id}else if(!this.componentID){t=Array.from(document.querySelectorAll("reneco-hierarchized-picker")).indexOf(this.el)+1;while(document.querySelectorAll("#hierarchized-picker-".concat(t)).length>0){t++}this.componentID=t.toString()}if(!this.optionsManager.getOptions())return[2];this.optionsManager.updateDefaultValue();r=isInstanceOfIConf(this.optionsManager.getOptions());this.canload=r.toret;this.errorToLog=r.errorToLog;return[4,this.initComponent()];case 1:o.sent();n=defaultPickerTheme;defaultPickerTheme.modale.height=this.modaleHeight+"px";applyPickerTheme(this.optionsManager.getOptions().theme,n);this.mylog(this.optionsManager.getOptions());window.addEventListener("click",(function(e){var t=amIFocusedByEvent(e,i.componentID);if(!t&&i.optionsManager.getOptions().mode!="tree"){i.showTree("hide")}}));this.el.addEventListener("dragover",(function(e){e.preventDefault()}));this.el.addEventListener("dragenter",(function(e){e.preventDefault()}));this.translateDataForTree(this.rawDataManager.getData());return[2]}}))}))};e.prototype.clearPicker=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n,i;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.getValue()];case 1:e=o.sent();for(t=0,r=this.value;t<r.length;t++){n=r[t];this.loadedTreeJs.setValue(n.nodeid);this.loadedTreeJs.updateLiElements()}this.value=[];this.setDisplayedValue([]);this.loadedTreeJs.options.onChange();return[4,this.getValue()];case 2:i=o.sent();this.valueChange.emit({oldValue:e,newValue:i,value:i});return[2]}}))}))};e.prototype.errorLoadingXHR=function(){var e;this.displayPickerError("Error loading webservice data!");try{document.querySelector("#tree-area-"+this.componentID).innerHTML="Error loading webservice data!";(e=document.querySelector("#hierarchized-picker-"+this.componentID+" .hierarchized-picker-search input"))===null||e===void 0?void 0:e.remove();this.canload=false;this.showTree("hide");this.ready=true;this.ignoreOptionsChanges=false}catch(e){this.errorToLog="Error loading webservice data!"}};e.prototype.displayPickerError=function(e){if(e===void 0){e=""}try{document.querySelector("#hierarchized-picker-"+this.componentID).classList.add("fieldError");if(this.optionsManager.getOptions().errorsInInput){if(e==""){e="There has been an error ... > [Generic error]"}this.displayedValue=e;this.isDisabled=true;this.errorToLog=e}}catch(t){this.errorToLog=e}};e.prototype.getApiSearchURL=function(){if(this.optionsManager.getOptions().origin=="classification"){var e=this.optionsManager.getOptions().url;if(e.indexOf("getTree")>-1){return e.replace("/getTree/","/search/")}else{var t=this.optionsManager.getOptions().url.substring(0,this.optionsManager.getOptions().url.lastIndexOf("/"));var r=t.substring(t.lastIndexOf("/"),t.length);return t.substring(0,t.lastIndexOf("/"))+"/search"+r}}else{return this.optionsManager.getOptions().url.substring(0,this.optionsManager.getOptions().url.lastIndexOf("/"))+"/GetTreeFromSearch"}};e.prototype.getContextualApiURL=function(e,t){if(e===void 0){e=false}if(t===void 0){t=null}var r=t||this.optionsManager.getOptions(),n=r.options,i=r.url;if(e&&n.Reach){var o=window.location.origin;var a=new URL(i,o);var s=a.pathname.split("/").filter(Boolean);var u=s.indexOf("getTree");if(u!==-1){s[u]="reach"}var l="/"+s.join("/");return"".concat(a.origin).concat(l)}return i};e.prototype.getContextualApiParams=function(e,t,r){if(e===void 0){e=null}if(t===void 0){t=null}if(r===void 0){r=false}if(!e)e=this.optionsManager.getOptions().options;var n=Object.assign({},e);if(!r)delete n.Reach;if(n.Reach){if("startNode"in n){n.startingnode=n.startNode;delete n.startNode}else if("StartNodeID"in n){n.startingnode=n.StartNodeID;delete n.StartNodeID}}else if(t){n.searchedValue=t;if("startNode"in n){n.StartNodeID=n.startNode;delete n.startNode}}return n};e.prototype.translateDataForTree=function(e,t,r){if(t===void 0){t=null}if(r===void 0){r=null}if(r&&r!=""){this.loadSearchDataInCurrentTree(t,r)}else{this.triggerTreeDisplay(e,r)}};e.prototype.loadSearchDataInCurrentTree=function(e,t){var r=this;var n=function(){if(r.searchToDisplay>-1){if(!t)r.setSearchResults([]);r.triggerTreeDisplay(r.rawDataManager.getData(),t);displayAutocompleteWithResults(r.rawDataManager.getData(),t,r.optionsManager,r.editValue.bind(r),r.showTree.bind(r));document.querySelectorAll("#tree-area-"+r.componentID+" .treejs-node").forEach((function(e){var t;var n=Array.prototype.slice.call(e.querySelectorAll("ul > li > span"));var i=n.filter((function(e){return e.textContent==="undefined"}));if(i.length==0&&!((t=r.loadedTreeJs.nodesById[e.nodeId])===null||t===void 0?void 0:t.isDesaturated)&&r.loadedTreeJs.nodesById[e.nodeId].children.length>0){e.classList.remove("treejs-node__close")}}))}};var i=function(e){if(r.searchToDisplay>-1){r.rawDataManager.mergeData(e,r.theOptions.origin=="classification"?"ID":"key");e.children.forEach((function(e,t){completeCurrentTreeWithTree(r.loadedTreeJs,e,r.optionsManager.getOptions())}));n()}};if(this.theOptions.source=="webservice"){if(this.theOptions.origin=="classification"){this.rawDataManager.getFromClassification(this.getApiSearchURL(),Object.assign({},this.getContextualApiParams(null,t)),document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")).then((function(e){i(e)})).catch((function(e){r.errorToLog=e}))}else{this.rawDataManager.getFromSource(this.getApiSearchURL(),{StartNodeID:this.theOptions.options.StartNodeID,lng:this.theOptions.options.lng,searchedValue:t,searchNameOnly:true,deprecated:false},document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")).then((function(e){i(e)})).catch((function(e){r.errorToLog=e;try{r.errorToLog="getDataFromSource 1 rejected:"+JSON.stringify(e,replacer,2)}catch(t){r.errorToLog=JSON.stringify(e,replacer,2)}}))}}else{if(this.optionsManager.getOptions().source=="data"){n()}else{console.error("Unhandled picker settings for search scenario !!")}}};e.prototype.triggerTreeDisplay=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n;return __generator(this,(function(i){if(!e)return[2];this.mylog("Translate from ".concat(this.optionsManager.getOptions().origin," ! (").concat(this.optionsManager.getOptions().source,")"),e);r=!this.optionsManager.getOptions().displayRootNode?e.children:[e];n=fillTreeWithObject([],r,t,this.optionsManager.getOptions());if(t){this.setSearchResults(n)}this.displayTree(n,t!=null);return[2]}))}))};e.prototype.deactivateNodesOutOfDepthSettings=function(){if(this.optionsManager.getOptions().maxDepth!=undefined||this.optionsManager.getOptions().minDepth!=undefined){for(var e in this.loadedTreeJs.nodesById){var t=this.loadedTreeJs.nodesById[e];if(t.depth<this.optionsManager.getOptions().minDepth||t.depth>this.optionsManager.getOptions().maxDepth){this.loadedTreeJs.liElementsById[t.id].classList.add("readonly_node")}}}};e.prototype.displayTree=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var r;var n=this;return __generator(this,(function(i){if(!this.optionsManager.getOptions().displayTree&&this.ready)return[2];if(e.length==0){this.el.querySelector(".hierarchized-picker-tree").innerHTML="No search results ...";return[2]}r=new Tree("#tree-area-"+this.componentID,{parentApi:this,rawDataManager:this.rawDataManager,completeCurrentTreeWithTree:completeCurrentTreeWithTree,data:!this.loadedTreeJs||t?e:fillTreeWithObject([],this.rawDataManager.getData().children,null,this.optionsManager.getOptions()),onChange:function(){return __awaiter(n,void 0,void 0,(function(){var e,t,r;var n=this;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);return[4,this.getValue()];case 1:e=i.sent();return[3,3];case 2:t=i.sent();e=null;return[3,3];case 3:r=function(){return __awaiter(n,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.getValue()];case 1:t=r.sent();if(this.valueChangeCallback&&this.ready&&!this.shownTree){this.valueChangeCallback(t)}this.valueChange.emit({oldValue:e,newValue:t,value:t});return[2]}}))}))};r();return[2]}}))}))},loaded:function(){n.mylog("loaded");n.ready=true;n.ignoreOptionsChanges=false}});if(this.searchResultData.length==0){Object.values(r.liElementsById).forEach((function(e){e.classList.remove("treejs-node__searchmatch")}))}this.loadedTreeJs=r;this.collapseAllNodes();if(this.hasFocus.indexOf("hide")==-1)this.checkFields(this.value,false);this.setDisplayedValue(this.value);this.showSelectedNodes();this.deactivateNodesOutOfDepthSettings();document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-checkbox").forEach((function(e){return e.style.display=n.theOptions.multiple?"inline-block":"none"}));return[2]}))}))};e.prototype.onItemContextMenuItemClick=function(e){if(e.target&&e.target.id){function t(e,t){var r=Object.values(e).find((function(e){var r;return(r=e.children)===null||r===void 0?void 0:r.some((function(e){return e.id===t}))}))||null;if(!e[t])return null;var n=0;var i=t;while(true){var o=Object.values(e).find((function(e){var t;return(t=e.children)===null||t===void 0?void 0:t.some((function(e){return e.id===i}))}));if(!o)break;n++;i=o.id}return{parent:r,depth:n}}var r=t(this.loadedTreeJs.nodesById,e.target.id);e.target.depth=r.depth;e.target.parentId=r.parent.id}this.itemContextMenuItemClick.emit(e)};e.prototype.setNodeAsSelected=function(e,t,r){if(this.isDisabled&&this.optionsManager.getOptions().mode!="tree"&&this.shownTree&&this.setValueOnClick||this.loadedTreeJs.liElementsById[e]&&this.loadedTreeJs.liElementsById[e].classList.value&&this.loadedTreeJs.liElementsById[e].classList.value.indexOf("readonly_node")!=-1){return}if(!r&&t.getValues().indexOf(e.toString())!=-1)return;if(this.loadedTreeJs&&!this.theOptions.multiple)this.loadedTreeJs.emptyNodesCheckStatus();this.ignoreOptionsChanges=true;var n=t.nodesById[e];var i=t.options.onChange;if(!n){this.logError("The current selected value is not part of the loaded tree!")}else{if(!n.disabled){t.setValue(e);t.updateLiElements()}r&&i&&i.call(t);if(this.setValueOnClick){this.editValue(n,r);if(this.shownTree&&r){if(!this.optionsManager.getOptions().multiple){this.showTree("hide")}}}}this.ignoreOptionsChanges=false};e.prototype.collapseAllNodes=function(){document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-node").forEach((function(e){return e.classList.add("treejs-node__close")}))};e.prototype.showSelectedNodes=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){if(e){setTimeout((function(){t.scrollToNode()}),200)}else{this.scrollToNode()}return[2]}))}))};e.prototype.scrollToNodeWithId=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var r,n,i;var o=this;return __generator(this,(function(a){r=this.loadedTreeJs.liElementsById[e];if(!r){n=this.getContextualApiParams(Object.assign(Object.assign({},this.theOptions.options),{Reach:[e]}),null,true);i=this.getContextualApiURL(true,Object.assign(Object.assign({},this.theOptions),{options:n}));this.rawDataManager.getFromClassification(i,n,document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")).then((function(r){completeCurrentTreeWithTree(o.loadedTreeJs,r,o.theOptions);o.scrollToNode(e,t)}))}return[2]}))}))};e.prototype.showTree=function(e){var t=this;if(!this.hasFocus)this.hasFocus=[];clearAutocomplete();if(!this.canload||!this.optionsManager.getOptions().displayTree)return;var r=false;if((e==="hide"||this.isDisabled)&&!r){this.hasFocus=["hide"];var n=document.querySelector("#hierarchized-picker-"+this.componentID+" input.hierarchized-picker-search");if(n){n.value=""}this.search("")}else{if(this.hasFocus.indexOf(e)===-1&&this.hasFocus.indexOf("hide")===-1){this.hasFocus.push(e)}}if(this.hasFocus.indexOf("hide")>-1&&!r){this.hasFocus=[]}else{if(!this.shownTree&&this.theOptions.loading=="click"&&!this.ready){this.loadDataForTree(true,document.querySelector("#hierarchized-picker-"+this.componentID+" .loader"))}}var i=this.shownTree;this.shownTree=this.hasFocus.length>0;if(this.shownTree&&!i&&this.optionsManager.getOptions().mode=="input"){if(this.shouldOpenModalAbove(document.querySelector("#hierarchized-picker-input-"+this.componentID),this.modaleHeight)){this.modalePosition="top"}else{this.modalePosition="bottom"}setTimeout((function(){return focusSearchInput(t)}),100);setupKeyboardNavigation(this,this.optionsManager,this.navigateInTree)}};e.prototype.editValue=function(e,t){if(t===void 0){t=false}if(!this.value){this.value=[]}var r=this.value.findIndex((function(t){return t.nodeid==e.id}));if(r>-1){if(t)this.value.splice(r,1);else return}else{if(this.optionsManager.getOptions().multiple){this.value=__spreadArray(__spreadArray([],this.value,true),[{nodeid:e.id,fullpath:e.fullpath,fullpathTranslated:e.fullpathTranslated,shortpathTranslated:e.text,hasChildren:e.children&&e.children.length>0}],false)}else{this.value[0]={nodeid:e.id,fullpath:e.fullpath,fullpathTranslated:e.fullpathTranslated,shortpathTranslated:e.text,hasChildren:e.children&&e.children.length>0}}}this.setDisplayedValue(this.value)};e.prototype.getShortpathFromFullpath=function(e){if(!e||e.indexOf(">")==-1)return e;return e.substring(e.lastIndexOf(">")+1)};e.prototype.setDisplayedValue=function(e){var t=this;if(e===void 0){e=null}if(!e)e=this.value;var r=e.map((function(e){var r,n,i;return t.optionsManager.getOptions().source=="data"?(r=t.optionsManager.getOptions().language=="fr"?t.getShortpathFromFullpath(e.fullpathTranslated):t.getShortpathFromFullpath(e.fullpath))!==null&&r!==void 0?r:"Node ".concat(e.nodeid):(i=t.optionsManager.getOptions().isFullpath?t.getShortenedFullpath((n=e.fullpathTranslated)!==null&&n!==void 0?n:e.fullpath):e.shortpathTranslated)!==null&&i!==void 0?i:"Node ".concat(e.nodeid)})).join(";");this.displayedValue=r};e.prototype.search=function(e){var t=this;this.loader.classList.add("loading");var r=document.querySelector("#hierarchized-picker-"+this.componentID+" .hierarchized-picker-search input");if(this.optionsManager.getOptions().mode=="input"&&r){r.classList.remove("fieldError")}if(e.length>2){this.searchToDisplay+=1;var n=this.searchToDisplay;setTimeout((function(){if(t.searchToDisplay==n){t.triggerSearch(e);t.checkFields(t.value,false)}}),waitBeforeTriggerSearch)}else{this.searchToDisplay=-1;if(this.optionsManager.getOptions().source=="webservice"){if(this.optionsManager.getOptions().origin=="classification"){this.optionsManager.getOptions().options.startNode}else{this.optionsManager.getOptions().options.StartNodeID}this.translateDataForTree(this.rawDataManager.getData(),null)}else{this.translateDataForTree(this.rawData,null)}displayAutocompleteWithResults(null,"",this.optionsManager,this.editValue.bind(this),this.showTree.bind(this));this.setSearchResults([])}this.loader.classList.remove("loading")};e.prototype.triggerSearch=function(e){this.translateDataForTree(this.rawDataManager.getData(),null,e)};e.prototype.setRawDataFromFile=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,this.rawDataManager.loadDataFromFile(e)];case 1:r.sent();this.formatDefaultValue();this.showSelectedNodes();return[3,3];case 2:t=r.sent();this.displayPickerError('Error loading data from path "'.concat(e,'": ').concat(t.message));return[3,3];case 3:return[2]}}))}))};e.prototype.loadDataForTree=function(e,t){var r=this;if(this.optionsManager.getOptions().source=="webservice"){if(this.optionsManager.getOptions().origin=="classification"){var n=this.getContextualApiParams(null,null,true);var i=this.getContextualApiURL(true);this.rawDataManager.getFromClassification(i,n,t).then((function(t){r.rawData=t;if(e){r.formatDefaultValue();r.showSelectedNodes();r.checkFields(r.value)}})).catch((function(e){r.errorToLog=e}))}else{this.rawDataManager.getFromSource(this.optionsManager.getOptions().url,this.optionsManager.getOptions().options,t).then((function(t){r.rawData=t;if(e){r.formatDefaultValue();r.showSelectedNodes()}})).catch((function(e){r.errorToLog=e}))}}if(this.optionsManager.getOptions().source=="data"){var o=this.optionsManager.data;this.rawData=o;this.formatDefaultValue()}if(this.optionsManager.getOptions().source=="file"){this.setRawDataFromFile(this.optionsManager.getOptions().url)}this.translateDataForTree(this.rawDataManager.getData())};e.prototype.checkFields=function(e,t){var r=this;if(t===void 0){t=true}if(!this.loadedTreeJs)return;this.setValueOnClick=t;var n=[];if(e){e.forEach((function(e){var t,i,o;var a=e.nodeid||e.ID||e.key||undefined;if(typeof a==="string"&&isNumeric(a)){a=parseInt(a)}var s=r.loadedTreeJs.nodesById[a];if(s){n.push({nodeid:a,shortpathTranslated:(t=s.text)!==null&&t!==void 0?t:"Node ".concat(a),fullpathTranslated:(i=s.fullpathTranslated)!==null&&i!==void 0?i:null,fullpath:(o=s.fullpath)!==null&&o!==void 0?o:null,hasChildren:s.children&&s.children.length>0})}else{console.warn("Node not found in Tree for:",a)}r.setNodeAsSelected(a,r.loadedTreeJs,false)}))}this.setDisplayedValue(n);this.value=n;this.setValueOnClick=true};e.prototype.formatDefaultValue=function(){var e=0;var t=this;var r=[];function n(e){if(Array.isArray(e)){e.forEach((function(e){return n(e)}))}else{var t=r.some((function(t){return(t.nodeid||t.ID)==(e.nodeid||e.ID)}));if(!t){r.push(e)}}}var i=function(r){r.forEach((function(r){t.theOptions.defaultValue.forEach((function(i){if(typeof i=="string"&&isNumeric(i)){i=parseInt(i)}if(t.theOptions.origin=="classification"){if(typeof i=="string"&&getPropertyFromNode(r,"Properties").FullPath==i||typeof i=="number"&&getPropertyFromNode(r,"ID")==i){r.nodeid=r.id;n([r]);e++}}else{if(typeof i=="string"&&getPropertyFromNode(r,"fullpathTranslated")==i||typeof i=="number"&&getPropertyFromNode(r,"key")==i){r.nodeid=r.key;n([r]);e++}}}));if(r.children)i(r.children)}))};if(this.rawDataManager.getData()){i([this.rawDataManager.getData()])}t.checkFields(r);if(this.theOptions.defaultValue.length!=e){if(e==0){try{this.errorToLog="The loaded tree doesn't contain the nodes passed to options.defaultValue : "+this.theOptions.defaultValue.map((function(e){return e})).join(",")}catch(e){this.errorToLog="The loaded tree doesn't contain the nodes passed to options.defaultValue : there's an issue with your defaultValue > "+this.theOptions.defaultValue.toString()}}else{this.errorToLog="The loaded tree contains multiple nodes of what has been passed to options.defaultValue : "+this.theOptions.defaultValue.map((function(e){return e})).join(",")}this.displayPickerError("Error(s) when loading tree default value(s)!")}};e.prototype.getFullpathTooltip=function(){var e=this;if(!this.value||this.value.length===0){return"No selection"}return this.value.map((function(t){var r,n;return(n=(r=e.getShortenedFullpath(t.fullpathTranslated))!==null&&r!==void 0?r:t.fullpath)!==null&&n!==void 0?n:"Node ".concat(t.nodeid)})).join("; ")};e.prototype.shouldOpenModalAbove=function(e,t){if(this.optionsManager.getOptions().mode!="input")return false;var r=e.getBoundingClientRect();var n=window.innerHeight-r.y;return n<t};e.prototype.render=function(){var e=this;return this.optionsManager.getOptions()?h("div",{id:"hierarchized-picker-"+this.componentID,class:"hierarchized-picker "+(this.isDisabled?"readonly-mode":"")},this.optionsManager.getOptions().mode=="input"?h("div",{class:"hierarchized-picker-container"},h("div",{style:{display:"none"},ref:function(t){e.loader=t}}),h("div",{class:"hierarchized-picker-input-area"},this.optionsManager.getOptions().label?h("label",{class:"hierarchized-picker-label"},getLanguageValue(this.optionsManager.getOptions().label,this.optionsManager.getOptions().language,defaultLanguage)):"",h("span",{class:"hierarchized-picker-input "+(this.optionsManager.getOptions().icon&&this.optionsManager.getOptions().icon.length>0?"hierarchized-picker-icon":"")+" reneco "+(this.optionsManager.getOptions().icon?this.optionsManager.getOptions().icon:"")+(this.isDisabled?" readonly ":"")+" sc-ion-input-md-h sc-ion-input-md-s md ",id:"hierarchized-picker-input-"+this.componentID,onClick:function(t){e.showTree("picker")},onFocusin:function(t){e.showTree("modale")}},h("input",{class:"native-input sc-ion-input-md","aria-labelledby":"ion-input-13-lbl",autocapitalize:"off",autocomplete:"off",autocorrect:"off",name:"ion-input-13",placeholder:"",readonly:"",spellcheck:"false",type:"text",value:this.displayedValue,title:this.getFullpathTooltip()})),this.displayedValue&&!this.isDisabled&&this.canload?h("span",{class:"reneco reneco-close",onClick:function(){return e.clearPicker()}}):""),h("div",{ref:function(t){e.scrollable=t},class:"hierarchized-picker-modal-area ".concat(!this.shownTree?" hidden ":""," ").concat(this.modalePosition=="top"?"display-modale-top":""),onClick:function(t){clickPickerModalArea(e)}},h("div",{class:"loader",ref:function(t){e.loader=t}},h("div",{class:"loader-inner"},"Loading...")),h("div",{class:"hierarchized-picker-modal ".concat(!this.ready?"hidden":""),tabindex:"0"},h("search-input",{placeholder:getLanguageValue(this.optionsManager.getOptions().searchPlaceholder,this.optionsManager.getOptions().language,defaultLanguage),onInputFocus:function(){return focusInSearchEvent(e)},onInputBlur:function(){return focusOutSearchEvent(e,event)},onSearch:function(t){return e.search(t.detail)}}),h("ul",{id:"autocomplete-results-area"}),h("div",{id:"tree-area-"+this.componentID,class:"hierarchized-picker-tree hierarchized-picker-tree-area "+this.pickerClass})))):h("div",{class:"hierarchized-picker-raw-tree-area"+(this.isDisabled?" readonly":""),tabindex:"0",onClick:function(t){clickPickerModalArea(e)}},h("div",{class:"loader",ref:function(t){e.loader=t}},h("div",{class:"loader-inner"},"Loading...")),h("div",{ref:function(t){e.scrollable=t},id:"tree-area-"+this.componentID,class:"hierarchized-picker-tree scrollable hierarchized-picker-raw-tree "+this.pickerClass}))):h("div",{class:"fieldError"},"Generic loading issue...")};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{searchResultData:["searchResultDataChange"],errorToLog:["logError"],newoptions:["setNewOptions"],newfilter:["setNewFilter"],options:["optionsChange"],rawData:["rawDataWatcher"]}},enumerable:false,configurable:true});return e}();HierarchizedPickerComponent.style=hierarchizedPickerCss;var searchInputCss=".search-input-container{display:-ms-flexbox;display:flex;gap:8px;margin-top:10px}.search-input-container .reneco-search{margin-top:3px}.search-input-container input{border-radius:4px;padding:5px}.search-input{width:100%;border:none}.search-input:focus{border:none !important;outline:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .hierarchized-picker-input-area .input-wrapper{padding-left:10px !important}reneco-hierarchized-picker .hierarchized-picker-input input,reneco-hierarchized-picker .hierarchized-picker-search input{font-size:var(--hpicker-theme-typography-body-font-size, var(--mui-typography-body-font-size, 14px)) !important;font-weight:var(--hpicker-theme-typography-body-font-weight, var(--mui-typography-body-font-weight, 400)) !important}reneco-hierarchized-picker .hierarchized-picker-search input{color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, var(--ion-color-light-tint, #fff))) !important}reneco-hierarchized-picker #searchInTree{padding:8.5px 8px;background:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, var(--ion-color-background, rgba(221, 169, 37, 0.18))));border:none !important;border-radius:4px}reneco-hierarchized-picker #searchInTree:focus{border:none !important;outline:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}";var SearchInput=function(){function e(e){registerInstance(this,e);this.inputFocus=createEvent(this,"inputFocus",7);this.inputBlur=createEvent(this,"inputBlur",7);this.search=createEvent(this,"search",7);this.placeholder=undefined}e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){(e=this.inputElement)===null||e===void 0?void 0:e.focus();return[2]}))}))};e.prototype.handleFocus=function(){this.inputFocus.emit()};e.prototype.handleBlur=function(e){var t=this;var r=e.relatedTarget;setTimeout((function(){var e=document.activeElement===t.inputElement||r&&t.rootElement.contains(r);if(!e){t.inputBlur.emit()}}),100)};e.prototype.handleInput=function(e){var t=e.target;var r=t.value;if(r!==this.previousValue){this.previousValue=r;this.search.emit(r)}};e.prototype.render=function(){var e=this;return h("div",{id:"hierarchized-picker-input-search",class:"search-input-container",ref:function(t){return e.rootElement=t}},h("div",{class:"reneco reneco-search"}),h("input",{ref:function(t){return e.inputElement=t},type:"text",class:"native-input sc-ion-input-md-h sc-ion-input-md-s md search-input hierarchized-picker-search",placeholder:this.placeholder,onFocus:function(){return e.handleFocus()},onBlur:function(t){return e.handleBlur(t)},onInput:function(t){return e.handleInput(t)}}))};return e}();SearchInput.style=searchInputCss;export{HierarchizedPickerComponent as reneco_hierarchized_picker,SearchInput as search_input};
3
+ !function(t,r){e.exports=r()}(commonjsGlobal,(function(){return function(){var e={550:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(81),i=r.n(n),o=r(645),a=r.n(o)()(i());a.push([e.id,'.PJsSKU2kCXjeIsVSdFoI{font-family:"Open Sans",sans-serif;position:fixed;z-index:10000;width:150px;transform:scale(0);transition-property:transform;transition-timing-function:ease-in-out}.novl09c_yWe4MBqKpWyN{background:#1b1a1a}.novl09c_yWe4MBqKpWyN hr{background-color:#555}.novl09c_yWe4MBqKpWyN>*:not(hr){color:#eee}.novl09c_yWe4MBqKpWyN>*:not(hr):hover{background:#555}.F5LtzLqHVYZuI1H_SR9q{background:#fff}.F5LtzLqHVYZuI1H_SR9q hr{background-color:#e4e4e4}.F5LtzLqHVYZuI1H_SR9q>*:not(hr){color:#262626}.F5LtzLqHVYZuI1H_SR9q>*:not(hr):hover{background:#e4e4e4}.PJsSKU2kCXjeIsVSdFoI.ibAEWR3dINCWDsWq1G2P{transform:scale(1)}.PJsSKU2kCXjeIsVSdFoI hr{margin:2px 0;height:1px;border:0}.PJsSKU2kCXjeIsVSdFoI>*:not(hr){padding:8px 10px;font-size:15px;cursor:pointer;display:flex;align-items:center;gap:5px}.PJsSKU2kCXjeIsVSdFoI .gfl6YXq1tuGnYKHXwDHP{display:flex;align-items:center;justify-content:center}.PJsSKU2kCXjeIsVSdFoI .gfl6YXq1tuGnYKHXwDHP>*{margin:0;padding:0;font-size:16px}.PJsSKU2kCXjeIsVSdFoI .QkRci5U3hKz5RODdOkco{line-height:21px;font-size:26px;position:relative;margin-left:auto}',""]),a.locals={"context-menu":"PJsSKU2kCXjeIsVSdFoI","context-menu--black-theme":"novl09c_yWe4MBqKpWyN","context-menu--white-theme":"F5LtzLqHVYZuI1H_SR9q",visible:"ibAEWR3dINCWDsWq1G2P","menu-item-icon":"gfl6YXq1tuGnYKHXwDHP","nested-menu-arrow":"QkRci5U3hKz5RODdOkco"};var s=a},645:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);n&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},81:function(e){e.exports=function(e){return e[1]}},856:function(e){e.exports=function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,r){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,r)}function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function n(e,i,o){return n=r()?Reflect.construct:function(e,r,n){var i=[null];i.push.apply(i,r);var o=new(Function.bind.apply(e,i));return n&&t(o,n.prototype),o},n.apply(null,arguments)}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=Object.hasOwnProperty,s=Object.setPrototypeOf,u=Object.isFrozen,l=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor,f=Object.freeze,p=Object.seal,h=Object.create,d="undefined"!=typeof Reflect&&Reflect,v=d.apply,g=d.construct;v||(v=function(e,t,r){return e.apply(t,r)}),f||(f=function(e){return e}),p||(p=function(e){return e}),g||(g=function(e,t){return n(e,i(t))});var m,y=j(Array.prototype.forEach),b=j(Array.prototype.pop),_=j(Array.prototype.push),w=j(String.prototype.toLowerCase),k=j(String.prototype.match),x=j(String.prototype.replace),O=j(String.prototype.indexOf),T=j(String.prototype.trim),I=j(RegExp.prototype.test),D=(m=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return g(m,t)});function j(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return v(e,t,n)}}function M(e,t,r){r=r||w,s&&s(e,null);for(var n=t.length;n--;){var i=t[n];if("string"==typeof i){var o=r(i);o!==i&&(u(t)||(t[n]=o),i=o)}e[i]=!0}return e}function N(e){var t,r=h(null);for(t in e)v(a,e,[t])&&(r[t]=e[t]);return r}function E(e,t){for(;null!==e;){var r=c(e,t);if(r){if(r.get)return j(r.get);if("function"==typeof r.value)return j(r.value)}e=l(e)}return function(e){return console.warn("fallback value for",e),null}}var A=f(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),S=f(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C=f(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),z=f(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=f(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),F=f(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=f(["#text"]),P=f(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),B=f(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=f(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=f(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=p(/\{\{[\w\W]*|[\w\W]*\}\}/gm),U=p(/<%[\w\W]*|[\w\W]*%>/gm),H=p(/^data-[\-\w.\u00B7-\uFFFF]/),J=p(/^aria-[\-\w]+$/),G=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=p(/^(?:\w+script|data):/i),$=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=p(/^html$/i),X=function(){return"undefined"==typeof window?null:window},Z=function(t,r){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var n=null,i="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(i)&&(n=r.currentScript.getAttribute(i));var o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X(),n=function(e){return t(e)};if(n.version="2.4.0",n.removed=[],!r||!r.document||9!==r.document.nodeType)return n.isSupported=!1,n;var o=r.document,a=r.document,s=r.DocumentFragment,u=r.HTMLTemplateElement,l=r.Node,c=r.Element,p=r.NodeFilter,h=r.NamedNodeMap,d=void 0===h?r.NamedNodeMap||r.MozNamedAttrMap:h,v=r.HTMLFormElement,g=r.DOMParser,m=r.trustedTypes,j=c.prototype,Q=E(j,"cloneNode"),ee=E(j,"nextSibling"),te=E(j,"childNodes"),re=E(j,"parentNode");if("function"==typeof u){var ne=a.createElement("template");ne.content&&ne.content.ownerDocument&&(a=ne.content.ownerDocument)}var ie=Z(m,o),oe=ie?ie.createHTML(""):"",ae=a,se=ae.implementation,ue=ae.createNodeIterator,le=ae.createDocumentFragment,ce=ae.getElementsByTagName,fe=o.importNode,pe={};try{pe=N(a).documentMode?a.documentMode:{}}catch(e){}var he={};n.isSupported="function"==typeof re&&se&&void 0!==se.createHTMLDocument&&9!==pe;var de,ve,ge=W,me=U,ye=H,be=J,_e=K,we=$,ke=G,xe=null,Oe=M({},[].concat(i(A),i(S),i(C),i(L),i(R))),Te=null,Ie=M({},[].concat(i(P),i(B),i(V),i(q))),De=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,Me=null,Ne=!0,Ee=!0,Ae=!1,Se=!1,Ce=!1,ze=!1,Le=!1,Fe=!1,Re=!1,Pe=!1,Be=!0,Ve=!1,qe="user-content-",We=!0,Ue=!1,He={},Je=null,Ge=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ke=null,$e=M({},["audio","video","img","source","image","track"]),Ye=null,Xe=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,rt=!1,nt=["application/xhtml+xml","text/html"],it="text/html",ot=null,at=a.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},ut=function(t){ot&&ot===t||(t&&"object"===e(t)||(t={}),t=N(t),de=de=-1===nt.indexOf(t.PARSER_MEDIA_TYPE)?it:t.PARSER_MEDIA_TYPE,ve="application/xhtml+xml"===de?function(e){return e}:w,xe="ALLOWED_TAGS"in t?M({},t.ALLOWED_TAGS,ve):Oe,Te="ALLOWED_ATTR"in t?M({},t.ALLOWED_ATTR,ve):Ie,Ye="ADD_URI_SAFE_ATTR"in t?M(N(Xe),t.ADD_URI_SAFE_ATTR,ve):Xe,Ke="ADD_DATA_URI_TAGS"in t?M(N($e),t.ADD_DATA_URI_TAGS,ve):$e,Je="FORBID_CONTENTS"in t?M({},t.FORBID_CONTENTS,ve):Ge,je="FORBID_TAGS"in t?M({},t.FORBID_TAGS,ve):{},Me="FORBID_ATTR"in t?M({},t.FORBID_ATTR,ve):{},He="USE_PROFILES"in t&&t.USE_PROFILES,Ne=!1!==t.ALLOW_ARIA_ATTR,Ee=!1!==t.ALLOW_DATA_ATTR,Ae=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=t.SAFE_FOR_TEMPLATES||!1,Ce=t.WHOLE_DOCUMENT||!1,Fe=t.RETURN_DOM||!1,Re=t.RETURN_DOM_FRAGMENT||!1,Pe=t.RETURN_TRUSTED_TYPE||!1,Le=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,Ve=t.SANITIZE_NAMED_PROPS||!1,We=!1!==t.KEEP_CONTENT,Ue=t.IN_PLACE||!1,ke=t.ALLOWED_URI_REGEXP||ke,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(Ee=!1),Re&&(Fe=!0),He&&(xe=M({},i(R)),Te=[],!0===He.html&&(M(xe,A),M(Te,P)),!0===He.svg&&(M(xe,S),M(Te,B),M(Te,q)),!0===He.svgFilters&&(M(xe,C),M(Te,B),M(Te,q)),!0===He.mathMl&&(M(xe,L),M(Te,V),M(Te,q))),t.ADD_TAGS&&(xe===Oe&&(xe=N(xe)),M(xe,t.ADD_TAGS,ve)),t.ADD_ATTR&&(Te===Ie&&(Te=N(Te)),M(Te,t.ADD_ATTR,ve)),t.ADD_URI_SAFE_ATTR&&M(Ye,t.ADD_URI_SAFE_ATTR,ve),t.FORBID_CONTENTS&&(Je===Ge&&(Je=N(Je)),M(Je,t.FORBID_CONTENTS,ve)),We&&(xe["#text"]=!0),Ce&&M(xe,["html","head","body"]),xe.table&&(M(xe,["tbody"]),delete je.tbody),f&&f(t),ot=t)},lt=M({},["mi","mo","mn","ms","mtext"]),ct=M({},["foreignobject","desc","title","annotation-xml"]),ft=M({},["title","style","font","a","script"]),pt=M({},S);M(pt,C),M(pt,z);var ht=M({},L);M(ht,F);var dt=function(e){var t=re(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var r=w(e.tagName),n=w(t.tagName);return e.namespaceURI===Qe?t.namespaceURI===et?"svg"===r:t.namespaceURI===Ze?"svg"===r&&("annotation-xml"===n||lt[n]):Boolean(pt[r]):e.namespaceURI===Ze?t.namespaceURI===et?"math"===r:t.namespaceURI===Qe?"math"===r&&ct[n]:Boolean(ht[r]):e.namespaceURI===et&&!(t.namespaceURI===Qe&&!ct[n])&&!(t.namespaceURI===Ze&&!lt[n])&&!ht[r]&&(ft[r]||!pt[r])},vt=function(e){_(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},gt=function(e,t){try{_(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Te[e])if(Fe||Re)try{vt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){var t,r;if(Le)e="<remove></remove>"+e;else{var n=k(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===de&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ie?ie.createHTML(e):e;if(tt===et)try{t=(new g).parseFromString(i,de)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(tt,"template",null);try{t.documentElement.innerHTML=rt?"":i}catch(e){}}var o=t.body||t.documentElement;return e&&r&&o.insertBefore(a.createTextNode(r),o.childNodes[0]||null),tt===et?ce.call(t,Ce?"html":"body")[0]:Ce?t.documentElement:o},yt=function(e){return ue.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof v&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},_t=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},wt=function(e,t,r){he[e]&&y(he[e],(function(e){e.call(n,t,r,ot)}))},kt=function(e){var t;if(wt("beforeSanitizeElements",e,null),bt(e))return vt(e),!0;if(I(/[\u0080-\uFFFF]/,e.nodeName))return vt(e),!0;var r=ve(e.nodeName);if(wt("uponSanitizeElement",e,{tagName:r,allowedTags:xe}),e.hasChildNodes()&&!_t(e.firstElementChild)&&(!_t(e.content)||!_t(e.content.firstElementChild))&&I(/<[/\w]/g,e.innerHTML)&&I(/<[/\w]/g,e.textContent))return vt(e),!0;if("select"===r&&I(/<template/i,e.innerHTML))return vt(e),!0;if(!xe[r]||je[r]){if(!je[r]&&Ot(r)){if(De.tagNameCheck instanceof RegExp&&I(De.tagNameCheck,r))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(r))return!1}if(We&&!Je[r]){var i=re(e)||e.parentNode,o=te(e)||e.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(Q(o[a],!0),ee(e))}return vt(e),!0}return e instanceof c&&!dt(e)?(vt(e),!0):"noscript"!==r&&"noembed"!==r||!I(/<\/no(script|embed)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,t=x(t,ge," "),t=x(t,me," "),e.textContent!==t&&(_(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt("afterSanitizeElements",e,null),!1):(vt(e),!0)},xt=function(e,t,r){if(Be&&("id"===t||"name"===t)&&(r in a||r in at))return!1;if(Ee&&!Me[t]&&I(ye,t));else if(Ne&&I(be,t));else if(!Te[t]||Me[t]){if(!(Ot(e)&&(De.tagNameCheck instanceof RegExp&&I(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&I(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&I(De.tagNameCheck,r)||De.tagNameCheck instanceof Function&&De.tagNameCheck(r))))return!1}else if(Ye[t]);else if(I(ke,x(r,we,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(r,"data:")||!Ke[e])if(Ae&&!I(_e,x(r,we,"")));else if(r)return!1;return!0},Ot=function(e){return e.indexOf("-")>0},Tt=function(t){var r,i,o,a;wt("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te};for(a=s.length;a--;){var l=r=s[a],c=l.name,f=l.namespaceURI;if(i="value"===c?r.value:T(r.value),o=ve(c),u.attrName=o,u.attrValue=i,u.keepAttr=!0,u.forceKeepAttr=void 0,wt("uponSanitizeAttribute",t,u),i=u.attrValue,!u.forceKeepAttr&&(gt(c,t),u.keepAttr))if(I(/\/>/i,i))gt(c,t);else{Se&&(i=x(i,ge," "),i=x(i,me," "));var p=ve(t.nodeName);if(xt(p,o,i)){if(!Ve||"id"!==o&&"name"!==o||(gt(c,t),i=qe+i),ie&&"object"===e(m)&&"function"==typeof m.getAttributeType)if(f);else switch(m.getAttributeType(p,o)){case"TrustedHTML":i=ie.createHTML(i);break;case"TrustedScriptURL":i=ie.createScriptURL(i)}try{f?t.setAttributeNS(f,c,i):t.setAttribute(c,i),b(n.removed)}catch(e){}}}}wt("afterSanitizeAttributes",t,null)}},It=function e(t){var r,n=yt(t);for(wt("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)wt("uponSanitizeShadowNode",r,null),kt(r)||(r.content instanceof s&&e(r.content),Tt(r));wt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(t){var i,a,u,c,f,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((rt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_t(t)){if("function"!=typeof t.toString)throw D("toString is not a function");if("string"!=typeof(t=t.toString()))throw D("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(r.toStaticHTML)||"function"==typeof r.toStaticHTML){if("string"==typeof t)return r.toStaticHTML(t);if(_t(t))return r.toStaticHTML(t.outerHTML)}return t}if(ze||ut(p),n.removed=[],"string"==typeof t&&(Ue=!1),Ue){if(t.nodeName){var h=ve(t.nodeName);if(!xe[h]||je[h])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)1===(a=(i=mt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!Fe&&!Se&&!Ce&&-1===t.indexOf("<"))return ie&&Pe?ie.createHTML(t):t;if(!(i=mt(t)))return Fe?null:Pe?oe:""}i&&Le&&vt(i.firstChild);for(var d=yt(Ue?t:i);u=d.nextNode();)3===u.nodeType&&u===c||kt(u)||(u.content instanceof s&&It(u.content),Tt(u),c=u);if(c=null,Ue)return t;if(Fe){if(Re)for(f=le.call(i.ownerDocument);i.firstChild;)f.appendChild(i.firstChild);else f=i;return Te.shadowroot&&(f=fe.call(o,f,!0)),f}var v=Ce?i.outerHTML:i.innerHTML;return Ce&&xe["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&I(Y,i.ownerDocument.doctype.name)&&(v="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+v),Se&&(v=x(v,ge," "),v=x(v,me," ")),ie&&Pe?ie.createHTML(v):v},n.setConfig=function(e){ut(e),ze=!0},n.clearConfig=function(){ot=null,ze=!1},n.isValidAttribute=function(e,t,r){ot||ut({});var n=ve(e),i=ve(t);return xt(n,i,r)},n.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],_(he[e],t))},n.removeHook=function(e){if(he[e])return b(he[e])},n.removeHooks=function(e){he[e]&&(he[e]=[])},n.removeAllHooks=function(){he={}},n}()}()},138:function(e,t,r){var n=r(55);e.exports=function(e){var t,r="",i=e||{};return function(e,i){r=r+"<div"+n.attr("class",n.classes(["".concat(i["context-menu"])],[!0]),!1,!0)+"> ",function(){var o=e;if("number"==typeof o.length)for(var a=0,s=o.length;a<s;a++)"hr"===(u=o[a])?r+="<hr>":(r=r+"<div"+n.attr("id","context-menu-item-".concat(u._id),!0,!0)+"> ",(u.iconClass||u.iconHTML)&&(r=r+"<span"+n.attr("class",n.classes(["".concat(i["menu-item-icon"])],[!0]),!1,!0)+">",u.iconClass&&(r=r+"<i"+n.attr("class",n.classes(["".concat(u.iconClass)],[!0]),!1,!0)+"></i>"),u.iconHTML&&(r+=null==(t=u.iconHTML)?"":t),r+="</span>"),r=r+"<span>"+n.escape(null==(t=u.label)?"":t)+"</span>",u.nestedMenu&&(r=r+"<span"+n.attr("class",n.classes(["".concat(i["nested-menu-arrow"])],[!0]),!1,!0)+">&#x203A;</span>"),r+="</div>");else for(var a in s=0,o){var u;s++,"hr"===(u=o[a])?r+="<hr>":(r=r+"<div"+n.attr("id","context-menu-item-".concat(u._id),!0,!0)+"> ",(u.iconClass||u.iconHTML)&&(r=r+"<span"+n.attr("class",n.classes(["".concat(i["menu-item-icon"])],[!0]),!1,!0)+">",u.iconClass&&(r=r+"<i"+n.attr("class",n.classes(["".concat(u.iconClass)],[!0]),!1,!0)+"></i>"),u.iconHTML&&(r+=null==(t=u.iconHTML)?"":t),r+="</span>"),r=r+"<span>"+n.escape(null==(t=u.label)?"":t)+"</span>",u.nestedMenu&&(r=r+"<span"+n.attr("class",n.classes(["".concat(i["nested-menu-arrow"])],[!0]),!1,!0)+">&#x203A;</span>"),r+="</div>")}}.call(this),r+="</div>"}.call(this,"menuItems"in i?i.menuItems:"undefined"!=typeof menuItems?menuItems:void 0,"style"in i?i.style:"undefined"!=typeof style?style:void 0),r}},55:function(e,t,r){var n=Object.prototype.hasOwnProperty;function i(e,t){return Array.isArray(e)?function(e,t){for(var r,n="",o="",a=Array.isArray(t),s=0;s<e.length;s++)(r=i(e[s]))&&(a&&t[s]&&(r=u(r)),n=n+o+r,o=" ");return n}(e,t):e&&"object"==typeof e?function(e){var t="",r="";for(var i in e)i&&e[i]&&n.call(e,i)&&(t=t+r+i,r=" ");return t}(e):e||""}function o(e){if(!e)return"";if("object"==typeof e){var t="";for(var r in e)n.call(e,r)&&(t=t+r+":"+e[r]+";");return t}return e+""}function a(e,t,r,n){if(!1===t||null==t||!t&&("class"===e||"style"===e))return"";if(!0===t)return" "+(n?e:e+'="'+e+'"');var i=typeof t;return"object"!==i&&"function"!==i||"function"!=typeof t.toJSON||(t=t.toJSON()),"string"==typeof t||(t=JSON.stringify(t),r||-1===t.indexOf('"'))?(r&&(t=u(t))," "+e+'="'+t+'"'):" "+e+"='"+t.replace(/'/g,"&#39;")+"'"}t.merge=function e(t,r){if(1===arguments.length){for(var n=t[0],i=1;i<t.length;i++)n=e(n,t[i]);return n}for(var a in r)if("class"===a){var s=t[a]||[];t[a]=(Array.isArray(s)?s:[s]).concat(r[a]||[])}else if("style"===a){s=(s=o(t[a]))&&";"!==s[s.length-1]?s+";":s;var u=o(r[a]);u=u&&";"!==u[u.length-1]?u+";":u,t[a]=s+u}else t[a]=r[a];return t},t.classes=i,t.style=o,t.attr=a,t.attrs=function(e,t){var r="";for(var s in e)if(n.call(e,s)){var u=e[s];if("class"===s){r=a(s,u=i(u),!1,t)+r;continue}"style"===s&&(u=o(u)),r+=a(s,u,!1,t)}return r};var s=/["&<>]/;function u(e){var t=""+e,r=s.exec(t);if(!r)return e;var n,i,o,a="";for(n=r.index,i=0;n<t.length;n++){switch(t.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}i!==n&&(a+=t.substring(i,n)),i=n+1,a+=o}return i!==n?a+t.substring(i,n):a}t.escape=u,t.rethrow=function e(t,n,i,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&n||o))throw t.message+=" on line "+i,t;var a,s,u,l;try{o=o||r(835).readFileSync(n,{encoding:"utf8"}),a=3,s=o.split("\n"),u=Math.max(i-a,0),l=Math.min(s.length,i+a)}catch(r){return t.message+=" - could not read from "+n+" ("+r.message+")",void e(t,null,i)}a=s.slice(u,l).map((function(e,t){var r=t+u+1;return(r==i?" > ":" ")+r+"| "+e})).join("\n"),t.path=n;try{t.message=(n||"Pug")+":"+i+"\n"+a+"\n\n"+t.message}catch(e){}throw t}},379:function(e){var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},a=[],s=0;s<e.length;s++){var u=e[s],l=n.base?u[0]+n.base:u[0],c=o[l]||0,f="".concat(l," ").concat(c);o[l]=c+1;var p=r(f),h={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==p)t[p].references++,t[p].updater(h);else{var d=i(h,n);n.byIndex=s,t.splice(s,0,{identifier:f,updater:d,references:1})}a.push(f)}return a}function i(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,i){var o=n(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=r(o[a]);t[s].references--}for(var u=n(e,i),l=0;l<o.length;l++){var c=r(o[l]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=u}}},569:function(e){var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:function(e){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,r){e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},795:function(e){e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},835:function(){}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nc=void 0;var n={};return function(){r.d(n,{default:function(){return B}});var e=r(856),t=r(379),i=r.n(t),o=r(795),a=r.n(o),s=r(569),u=r.n(s),l=r(565),c=r.n(l),f=r(216),p=r.n(f),h=r(589),d=r.n(h),v=r(550),g={};g.styleTagTransform=d(),g.setAttributes=c(),g.insert=u().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=p(),i()(v.Z,g);var m=v.Z&&v.Z.locals?v.Z.locals:void 0;var y=r(138),b=r.n(y);function _(e,t,r){var n=e.x,i=e.y,o=r.getBoundingClientRect(),a=o.left,s=o.top,u=i-s,l=n-a+t.clientWidth>r.clientWidth,c=u+t.clientHeight>r.clientHeight;var f=n,p=i;return l&&(f=a+r.clientWidth-t.clientWidth),c&&(p=s+r.clientHeight-t.clientHeight),{normalizedX:f,normalizedY:p}}var w,k,x,O,T,I,D,j,M,N,E,A,S,C,z,L,F=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};var R=function(){function t(){var t=this;w.add(this),k.set(this,{style:m,menuItems:[]}),x.set(this,{transformOrigin:["top","left"]}),O.set(this,{theme:"black",transitionDuration:200}),this.options={},T.set(this,(function(t){return t.map((function(t){return"object"==typeof t&&t.hasOwnProperty("iconHTML")&&(t.iconHTML=(0,e.sanitize)(t.iconHTML)),t}))})),this.applyStyleOnContextMenu=function(e,r,n){e.style.transitionDuration="".concat(t.options.transitionDuration,"ms");var i=Array.from(t.options.transformOrigin);r&&(i[1]="right"),n&&(i[0]="bottom"),e.style.transformOrigin=i.join(" "),t.options.customThemeClass?e.classList.add(t.options.customThemeClass):e.classList.add(m["context-menu--".concat(t.options.theme,"-theme")]),t.options.customClass&&e.classList.add(t.options.customClass)},this.buildContextMenu=function(){var e=document.createElement("div");return e.innerHTML=b()(F(t,k,"f")),e.children[0]}}t.prototype.updateOptions=function(e){var t=F(this,T,"f").call(this,e.menuItems),r=F(this,w,"m",I).call(this,t);F(this,w,"m",D).call(this,r),Object.assign(this.options,F(this,O,"f")),Object.assign(this.options,Object.assign(Object.assign({},e),{menuItems:r})),Object.assign(this.options,F(this,x,"f")),F(this,k,"f").menuItems=this.options.menuItems};return t}();k=new WeakMap,x=new WeakMap,O=new WeakMap,T=new WeakMap,w=new WeakSet,I=function(e){var t=this;return e.filter((function(e){return"object"==typeof e&&e.hasOwnProperty("nestedMenu")})).map((function(e){var r=e.callback;e.callback=function(n){r&&r(n),new P(Object.assign(Object.assign({},t.options),{menuItems:e.nestedMenu}),n,document.getElementById("context-menu-item-".concat(e._id)))}})),e},D=function e(t){var r=this;t.filter((function(e){return"object"==typeof e})).forEach((function(t,n){t._id=Date.now()+n,t.nestedMenu&&F(r,w,"m",e).call(r,t.nestedMenu)}))};var P=function(e){__extends(t,e);function t(t,r,n){var i=this;i=e.call(this)||this,j.add(i),M.set(i,(function(){var e;null===(e=document.querySelector(".".concat(m["context-menu"],".nested-context-menu")))||void 0===e||e.remove()})),N.set(i,(function(e){i.options.menuItems.forEach((function(t,r){"hr"!==t&&t.callback&&(e.children[r].onclick=function(){var e,r,n;t.callback(i.initialContextMenuEvent),null!==(r=null!==(e=t.preventCloseOnClick)&&void 0!==e?e:i.options.preventCloseOnClick)&&void 0!==r&&r||(F(i,M,"f").call(i),null===(n=document.querySelector(".".concat(m["context-menu"])))||void 0===n||n.remove())})}))})),i.updateOptions(t),F(i,j,"m",E).call(i,r,n);return i}return t}(R);M=new WeakMap,N=new WeakMap,j=new WeakSet,E=function(e,t){this.initialContextMenuEvent=e,F(this,M,"f").call(this);var r=this.buildContextMenu();r.classList.add("nested-context-menu"),document.querySelector("body").append(r),this.applyStyleOnContextMenu(r,!1,!1);var n=t.getBoundingClientRect(),i=n.x,o=n.y;var a=_({x:i,y:o},r,this.options.scope),s=a.normalizedX,u=a.normalizedY;s+=r.clientWidth,r.style.top="".concat(u,"px"),r.style.left="".concat(s,"px"),r.oncontextmenu=function(e){return e.preventDefault()},F(this,N,"f").call(this,r),setTimeout((function(){r.classList.add(m.visible)}))};var B=function(e){__extends(t,e);function t(t){var r=this;r=e.call(this)||this,A.set(r,(function(){var e;F(r,S,"f").call(r),null===(e=document.querySelector(".".concat(m["context-menu"])))||void 0===e||e.remove()})),S.set(r,(function(){document.querySelectorAll(".".concat(m["context-menu"],".nested-context-menu")).forEach((function(e){return e.remove()}))})),C.set(r,(function(e){r.options.menuItems.forEach((function(t,n){"hr"!==t&&t.callback&&(e.children[n].onclick=function(){var e,n;t.callback(r.initialContextMenuEvent),null!==(n=null!==(e=t.preventCloseOnClick)&&void 0!==e?e:r.options.preventCloseOnClick)&&void 0!==n&&n||F(r,A,"f").call(r)})}))})),z.set(r,(function(e){e.preventDefault(),e.stopPropagation(),r.initialContextMenuEvent=e,F(r,A,"f").call(r);var t=r.buildContextMenu();document.querySelector("body").append(t);var n=e.clientX,i=e.clientY,o=_({x:n,y:i},t,r.options.scope),a=o.normalizedX,s=o.normalizedY;t.style.top="".concat(s,"px"),t.style.left="".concat(a,"px"),r.applyStyleOnContextMenu(t,n!==a,i!==s),t.oncontextmenu=function(e){return e.preventDefault()},F(r,C,"f").call(r,t),setTimeout((function(){t.classList.add(m.visible)}))})),L.set(r,(function(e){e.target.closest(".".concat(m["context-menu"]))||F(r,A,"f").call(r)})),r.updateOptions(t),r.options.scope.oncontextmenu=F(r,z,"f"),document.addEventListener("click",F(r,L,"f"));return r}t.prototype.off=function(){document.removeEventListener("click",F(this,L,"f")),this.options.scope.oncontextmenu=null};return t}(R);A=new WeakMap,S=new WeakMap,C=new WeakMap,z=new WeakMap,L=new WeakMap}(),n.default}()}))}));var VanillaContextMenu=getDefaultExportFromCjs(vanillaContextMenu);var curDraggingItem=null;var lastDraggedOverNodeId=null;var lastDraggedOverTimeForAscendent=(new Date).getTime();var lastDraggedOverTimeForLevel=(new Date).getTime();var acceptableDelayBetweenSimilarActions=300;function onItemDragStart(e,t,r){if(r===void 0){r=true}if(!r)return;curDraggingItem=e;e.classList.add("dragging");t.stopPropagation()}function onItemDragEnd(e,t,r){if(r===void 0){r=true}if(!r)return;e.classList.remove("dragging");t.stopPropagation();clearDragOverStyles(e.parentElement)}function onItemDragOver(e,t,r){if(r===void 0){r=true}if(!r)return;var n=(new Date).getTime();if(n-lastDraggedOverTimeForAscendent<50&&e.dataset.nodeId!==lastDraggedOverNodeId){return}lastDraggedOverTimeForAscendent=n;if(e.dataset.nodeId===lastDraggedOverNodeId){if(n-lastDraggedOverTimeForLevel<acceptableDelayBetweenSimilarActions){return}lastDraggedOverTimeForLevel=n}else{lastDraggedOverNodeId=e.dataset.nodeId}clearDragOverStyles(e);if(e===curDraggingItem){e.classList.remove("dragover");return}var i=getDragOverPosition(e,t);e.classList.add("dragover-".concat(i));e.classList.add("dragover");t.stopPropagation();t.preventDefault()}function onItemDragLeave(e,t,r){if(r===void 0){r=true}if(!r)return;clearDragOverStyles(e);e.classList.remove("dragover");t.stopPropagation()}function onItemDrop(e,t,r,n){if(r===void 0){r=true}if(!r)return;clearDragOverStyles(e);e.classList.remove("dragover");t.stopPropagation();if(curDraggingItem){var i=getDragOverPosition(e,t);n(curDraggingItem,e,i)}}function getDragOverPosition(e,t){var r=e.offsetHeight;var n=r/4;var i=r-n;var o=t.offsetY;return o<=n?"before":o>=i?"after":"over"}function clearDragOverStyles(e){if(!e)return;var t=Array.from(e.classList).filter((function(e){return e.startsWith("dragover-")}));t.forEach((function(t){return e.classList.remove(t)}))}function deepClone(e){return JSON.parse(JSON.stringify(e))}function uniq(e){var t={};return e.reduce((function(e,r){if(!t[r]){t[r]=true;e.push(r)}return e}),[])}function empty(e){if(e&&e.firstChild){while(e.firstChild){e.removeChild(e.firstChild)}}}function animation(e,t){requestAnimationFrame((function(){t.enter();requestAnimationFrame((function(){t.active();setTimeout((function(){t.leave()}),e)}))}))}function Tree(e,t){var r={selectMode:"checkbox",values:[],disables:[],beforeLoad:null,loaded:null,url:null,method:"GET",closeDepth:null};this.treeNodes=[];this.nodesById={};this.leafNodesById={};this.liElementsById={};this.willUpdateNodesById={};this.container=e;this.options=Object.assign(r,t);Object.defineProperties(this,{values:{get:function(){return this.getValues()},set:function(e){return this.setValues(uniq(e))}},disables:{get:function(){return this.getDisables()},set:function(e){return this.setDisables(uniq(e))}},selectedNodes:{get:function(){var e=[];var t=this.nodesById;for(var r in t){if(t.hasOwnProperty(r)&&(t[r].status===1||t[r].status===2)){var n=Object.assign({},t[r]);delete n.parent;delete n.children;e.push(n)}}return e}},disabledNodes:{get:function(){var e=[];var t=this.nodesById;for(var r in t){if(t.hasOwnProperty(r)&&t[r].disabled){var n=Object.assign({},t[r]);delete n.parent;e.push(n)}}return e}}});this.init(this.options.data)}Tree.prototype.init=function(e){var t=Tree.parseTreeData(e),r=t.treeNodes,n=t.nodesById,i=t.leafNodesById,o=t.defaultValues,a=t.defaultDisables;this.treeNodes=r;this.nodesById=n;this.leafNodesById=i;this.render(this.treeNodes);var s=this.options,u=s.values,l=s.disables,c=s.loaded;if(u&&u.length)o=u;o.length&&this.setValues(o);if(l&&l.length)a=l;a.length&&this.setDisables(a);c&&c.call(this)};Tree.prototype.render=function(e){var t=Tree.createRootEle();t.appendChild(this.buildTree(e,0));this.bindEvent(t);var r=null;try{r=document.querySelector(this.container)}catch(e){r=this.container}if(r){empty(r);r.appendChild(t)}};Tree.prototype.buildTree=function(e,t){var r=this;var n=this.createUlEle();if(e&&e.length){e.forEach((function(e){var i=r.createLiEle(e,t===r.options.closeDepth-1);r.liElementsById[e.id]=i;var o=null;if(e.children&&e.children.length){o=r.buildTree(e.children,t+1)}o&&i.appendChild(o);n.appendChild(i)}))}return n};Tree.prototype.bindEvent=function(e){var t=this;var r;if(!this.options.parentApi.isDisabled){var n=this.options.parentApi.theOptions.contextMenu;if((r=n===null||n===void 0?void 0:n.items)===null||r===void 0?void 0:r.length){new VanillaContextMenu(Object.assign(Object.assign({},n),{scope:e,menuItems:n.items.map((function(e){return typeof e==="string"?e:Object.assign(Object.assign({},e),{callback:function(r){return __awaiter(t,void 0,void 0,(function(){var t,n,i;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.options.parentApi.getValue()];case 1:t=o.sent();n=Object.assign({},this.options.parentApi.loadedTreeJs.nodesById[t.nodeid]);i=Object.assign(Object.assign({},n),{hasChildren:n.children.length>0});delete i.children;this.options.parentApi.onItemContextMenuItemClick(Object.assign(Object.assign({},r),{target:i,contextMenuItem:e}));return[2]}}))}))}})}))}))}}e.addEventListener("mousedown",(function(e){if(e.button!=0&&e.button!=2)return;var r=e.target;if(r.nodeName==="SPAN"&&(r.classList.contains("treejs-checkbox")||r.classList.contains("treejs-label"))){t.onItemClick(r.parentNode.nodeId,e.button==2)}else if(r.nodeName==="LI"&&r.classList.contains("treejs-node")){t.onItemClick(r.nodeId,e.button==2)}else if(r.nodeName==="SPAN"&&r.classList.contains("treejs-switcher")){t.onSwitcherClick(r)}}),false)};Tree.prototype.onItemClick=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:if(this.options.parentApi.isDisabled&&this.options.parentApi.optionsManager.getOptions().mode!="tree")return[2];return[4,this.options.parentApi.getValue()];case 1:r=n.sent();if(!t||!r||r.nodeid!=e){this.options.parentApi.setNodeAsSelected(e,this,true)}return[2]}}))}))};Tree.prototype.unCheckElement=function(e){this.setValue(e);this.updateLiElements()};Tree.prototype.setValue=function(e){var t=this.nodesById[e];if(!t)return;var r=getChildrenStatus(t);var n=t.status;var i=null;if(r){i=n===1?2:1}else{i=n===1||n===2?0:2}t.status=i;this.markWillUpdateNode(t);this.walkUp(t,"status");this.walkDown(t,"status")};function getChildrenStatus(e){if(e.children&&e.children.length){var t=e.children.reduce((function(e,t){if(!isNaN(t.status))return e+t.status;return e}),0);return t}}Tree.prototype.getValues=function(){var e=[];for(var t in this.leafNodesById){if(this.leafNodesById.hasOwnProperty(t)){if(this.leafNodesById[t].status===1||this.leafNodesById[t].status===2){e.push(t)}}}return e};Tree.prototype.setValues=function(e){var t=this;this.emptyNodesCheckStatus();e.forEach((function(e){t.setValue(e)}));this.updateLiElements();var r=this.options.onChange;r&&r.call(this)};Tree.prototype.setDisable=function(e){var t=this.nodesById[e];if(!t)return;var r=t.disabled;if(!r){t.disabled=true;this.markWillUpdateNode(t);this.walkUp(t,"disabled");this.walkDown(t,"disabled")}};Tree.prototype.getDisables=function(){var e=[];for(var t in this.leafNodesById){if(this.leafNodesById.hasOwnProperty(t)){if(this.leafNodesById[t].disabled){e.push(t)}}}return e};Tree.prototype.setDisables=function(e){var t=this;this.emptyNodesDisable();e.forEach((function(e){t.setDisable(e)}));this.updateLiElements()};Tree.prototype.emptyNodesCheckStatus=function(){this.willUpdateNodesById=this.getSelectedNodesById();Object.values(this.willUpdateNodesById).forEach((function(e){if(!e.disabled)e.status=0}))};Tree.prototype.emptyNodesDisable=function(){this.willUpdateNodesById=this.getDisabledNodesById();Object.values(this.willUpdateNodesById).forEach((function(e){e.disabled=false}))};Tree.prototype.getSelectedNodesById=function(){return Object.entries(this.nodesById).reduce((function(e,t){var r=t[0],n=t[1];if(n.status===1||n.status===2){e[r]=n}return e}),{})};Tree.prototype.getDisabledNodesById=function(){return Object.entries(this.nodesById).reduce((function(e,t){var r=t[0],n=t[1];if(n.disabled){e[r]=n}return e}),{})};Tree.prototype.updateLiElements=function(){var e=this;Object.values(this.willUpdateNodesById).forEach((function(t){e.updateLiElement(t)}));this.willUpdateNodesById={}};Tree.prototype.markWillUpdateNode=function(e){this.willUpdateNodesById[e.id]=e};Tree.prototype.onSwitcherClick=function(e){var t=this;var r=e.parentNode.querySelectorAll(".treejs-switcher").length>0&&e.parentNode.querySelectorAll("ul").length==0;var n=Array.prototype.slice.call(e.parentNode.querySelectorAll("ul > li > span.treejs-label")).filter((function(t){return t.parentNode.parentNode.parentNode===e.parentNode}));var i=[];i=n.filter((function(e){return e.textContent==="undefined"}));if(e.nodeName==="SPAN"&&e.classList.contains("treejs-switcher")&&(i.length>0||r)){if(i.length>0){e.parentNode.querySelector("ul").innerHTML=""}if(this.options.parentApi.theOptions.source=="webservice"){if(this.options.parentApi.theOptions.origin=="classification"){var o=this.options.parentApi.getContextualApiParams(Object.assign(Object.assign({},this.options.parentApi.theOptions.options),{startNode:e.parentNode.nodeId}));var a=this.options.parentApi.getContextualApiURL();this.options.rawDataManager.getFromClassification(a,o,document.querySelector("#hierarchized-picker-"+this.options.parentApi.componentID+" .loader")).then((function(e){t.options.completeCurrentTreeWithTree(t,e,t.options.parentApi.theOptions)}))}else{this.options.rawDataManager.getFromSource(this.options.parentApi.theOptions.url,{StartNodeID:e.parentNode.nodeId,lng:this.options.parentApi.theOptions.options.lng,IsDeprecated:this.options.parentApi.theOptions.options.IsDeprecated},document.querySelector("#hierarchized-picker-"+this.options.parentApi.componentID+" .loader")).then((function(e){t.options.completeCurrentTreeWithTree(t,e,t.options.parentApi.theOptions)}))}}}var s=e.parentNode;var u=s.lastChild;var l=u.scrollHeight;if(s.classList.contains("treejs-node__close")){animation(150,{enter:function(){u.style.height=0;u.style.opacity=0},active:function(){u.style.height="".concat(l,"px");u.style.opacity=1},leave:function(){u.style.height="";u.style.opacity="";s.classList.remove("treejs-node__close")}})}else{animation(150,{enter:function(){u.style.height="".concat(l,"px");u.style.opacity=1},active:function(){u.style.height=0;u.style.opacity=0},leave:function(){u.style.height="";u.style.opacity="";s.classList.add("treejs-node__close")}})}return new Promise((function(e){e(t)}))};Tree.prototype.walkUp=function(e,t){var r=e.parent;if(r){if(t==="status"){var n=null;var i=r.children.reduce((function(e,t){if(!isNaN(t.status))return e+t.status;return e}),0);if(i){n=i>=2&&r.status===2?2:1}else{n=0}if(r.status===n||r.status===2)return;r.status=n;if(r.parent){var o=r.parent.children.find((function(e){return e.id===r.id}));if(o){o.status=n}}}else{var a=r.children.reduce((function(e,t){return e&&t.disabled}),true);if(r.disabled===a)return;r.disabled=a}this.markWillUpdateNode(r);this.walkUp(r,t)}};Tree.prototype.walkDown=function(e,t){};Tree.prototype.updateLiElement=function(e){var t=this.liElementsById[e.id].classList;switch(e.status){case 0:t.remove("treejs-node__halfchecked","treejs-node__checked");break;case 1:t.remove("treejs-node__checked");t.add("treejs-node__halfchecked");break;case 2:t.remove("treejs-node__halfchecked");t.add("treejs-node__checked");break}switch(e.disabled){case true:if(!t.contains("treejs-node__disabled"))t.add("treejs-node__disabled");break;case false:if(t.contains("treejs-node__disabled"))t.remove("treejs-node__disabled");break}};Tree.parseTreeData=function(e){var t=deepClone(e);var r={};var n={};var i=[];var o=[];var a=function(e,t){e.forEach((function(e){r[e.id]=e;if(e.checked)i.push(e.id);if(e.disabled)o.push(e.id);if(t)e.parent=t;if(e.children&&e.children.length){a(e.children,e)}else{n[e.id]=e}}))};a(Array.isArray(t)?t:[t],null);return{treeNodes:t,nodesById:r,leafNodesById:n,defaultValues:i,defaultDisables:o}};Tree.createRootEle=function(){var e=document.createElement("div");e.classList.add("treejs");return e};Tree.prototype.createUlEle=function(){var e=document.createElement("ul");e.classList.add("treejs-nodes");return e};Tree.prototype.createLiEle=function(e,t){var r=this;var n=document.createElement("li");n.classList.add("treejs-node");if(e.deprecated||e.Is_Deprecated){n.classList.add("treejs-node__deprecated")}if(e.isDesaturated){n.classList.add("treejs-node__desaturated")}if(e.searchMatch){n.classList.add("treejs-node__searchmatch")}if(t)n.classList.add("treejs-node__close");if(e.children&&e.children.length){var i=document.createElement("span");i.classList.add("treejs-switcher");n.appendChild(i)}else{n.classList.add("treejs-placeholder")}var o=document.createElement("span");o.classList.add("treejs-checkbox");o.style.display=!this.options.parentApi||this.options.parentApi&&this.options.parentApi.theOptions.multiple?"inline-block":"none";n.appendChild(o);var a=document.createElement("span");a.classList.add("treejs-label");var s=document.createTextNode(e.text);a.appendChild(s);n.appendChild(a);n.nodeId=e.id;if(this.options.parentApi.theOptions.dragAndDropEnabled){n.setAttribute("draggable","true");n.addEventListener("dragstart",(function(e){onItemDragStart(n,e,r.options.parentApi.activatedDragAndDrop)}));n.addEventListener("dragend",(function(e){onItemDragEnd(n,e,r.options.parentApi.activatedDragAndDrop)}));n.addEventListener("dragover",(function(e){onItemDragOver(n,e,r.options.parentApi.activatedDragAndDrop)}));n.addEventListener("dragleave",(function(e){onItemDragLeave(n,e,r.options.parentApi.activatedDragAndDrop)}));n.addEventListener("drop",(function(e){onItemDrop(n,e,r.options.parentApi.activatedDragAndDrop,(function(e,t,n){r.options.parentApi.itemDropped.emit({dragEl:e,dropEl:t,position:n})}))}))}return n};var lodash=createCommonjsModule((function(e,t){(function(){var r;var n="4.17.21";var i=200;var o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`";var u="__lodash_hash_undefined__";var l=500;var c="__lodash_placeholder__";var f=1,p=2,h=4;var d=1,v=2;var g=1,m=2,y=4,b=8,_=16,w=32,k=64,x=128,O=256,T=512;var I=30,D="...";var j=800,M=16;var N=1,E=2,A=3;var S=1/0,C=9007199254740991,z=17976931348623157e292,L=0/0;var F=4294967295,R=F-1,P=F>>>1;var B=[["ary",x],["bind",g],["bindKey",m],["curry",b],["curryRight",_],["flip",T],["partial",w],["partialRight",k],["rearg",O]];var V="[object Arguments]",q="[object Array]",W="[object AsyncFunction]",U="[object Boolean]",H="[object Date]",J="[object DOMException]",G="[object Error]",K="[object Function]",$="[object GeneratorFunction]",Y="[object Map]",X="[object Number]",Z="[object Null]",Q="[object Object]",ee="[object Promise]",te="[object Proxy]",re="[object RegExp]",ne="[object Set]",ie="[object String]",oe="[object Symbol]",ae="[object Undefined]",se="[object WeakMap]",ue="[object WeakSet]";var le="[object ArrayBuffer]",ce="[object DataView]",fe="[object Float32Array]",pe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",ve="[object Int32Array]",ge="[object Uint8Array]",me="[object Uint8ClampedArray]",ye="[object Uint16Array]",be="[object Uint32Array]";var _e=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,ke=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var xe=/&(?:amp|lt|gt|quot|#39);/g,Oe=/[&<>"']/g,Te=RegExp(xe.source),Ie=RegExp(Oe.source);var De=/<%-([\s\S]+?)%>/g,je=/<%([\s\S]+?)%>/g,Me=/<%=([\s\S]+?)%>/g;var Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ee=/^\w*$/,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var Se=/[\\^$.*+?()[\]{}|]/g,Ce=RegExp(Se.source);var ze=/^\s+/;var Le=/\s/;var Fe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Re=/\{\n\/\* \[wrapped with (.+)\] \*/,Pe=/,? & /;var Be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Ve=/[()=,{}\[\]\/\s]/;var qe=/\\(\\)?/g;var We=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var Ue=/\w*$/;var He=/^[-+]0x[0-9a-f]+$/i;var Je=/^0b[01]+$/i;var Ge=/^\[object .+?Constructor\]$/;var Ke=/^0o[0-7]+$/i;var $e=/^(?:0|[1-9]\d*)$/;var Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var Xe=/($^)/;var Ze=/['\n\r\u2028\u2029\\]/g;var Qe="\\ud800-\\udfff",et="\\u0300-\\u036f",tt="\\ufe20-\\ufe2f",rt="\\u20d0-\\u20ff",nt=et+tt+rt,it="\\u2700-\\u27bf",ot="a-z\\xdf-\\xf6\\xf8-\\xff",at="\\xac\\xb1\\xd7\\xf7",st="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ut="\\u2000-\\u206f",lt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ct="A-Z\\xc0-\\xd6\\xd8-\\xde",ft="\\ufe0e\\ufe0f",pt=at+st+ut+lt;var ht="['’]",dt="["+Qe+"]",vt="["+pt+"]",gt="["+nt+"]",mt="\\d+",yt="["+it+"]",bt="["+ot+"]",_t="[^"+Qe+pt+mt+it+ot+ct+"]",wt="\\ud83c[\\udffb-\\udfff]",kt="(?:"+gt+"|"+wt+")",xt="[^"+Qe+"]",Ot="(?:\\ud83c[\\udde6-\\uddff]){2}",Tt="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+ct+"]",Dt="\\u200d";var jt="(?:"+bt+"|"+_t+")",Mt="(?:"+It+"|"+_t+")",Nt="(?:"+ht+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ht+"(?:D|LL|M|RE|S|T|VE))?",At=kt+"?",St="["+ft+"]?",Ct="(?:"+Dt+"(?:"+[xt,Ot,Tt].join("|")+")"+St+At+")*",zt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ft=St+At+Ct,Rt="(?:"+[yt,Ot,Tt].join("|")+")"+Ft,Pt="(?:"+[xt+gt+"?",gt,Ot,Tt,dt].join("|")+")";var Bt=RegExp(ht,"g");var Vt=RegExp(gt,"g");var qt=RegExp(wt+"(?="+wt+")|"+Pt+Ft,"g");var Wt=RegExp([It+"?"+bt+"+"+Nt+"(?="+[vt,It,"$"].join("|")+")",Mt+"+"+Et+"(?="+[vt,It+jt,"$"].join("|")+")",It+"?"+jt+"+"+Nt,It+"+"+Et,Lt,zt,mt,Rt].join("|"),"g");var Ut=RegExp("["+Dt+Qe+nt+ft+"]");var Ht=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"];var Gt=-1;var Kt={};Kt[fe]=Kt[pe]=Kt[he]=Kt[de]=Kt[ve]=Kt[ge]=Kt[me]=Kt[ye]=Kt[be]=true;Kt[V]=Kt[q]=Kt[le]=Kt[U]=Kt[ce]=Kt[H]=Kt[G]=Kt[K]=Kt[Y]=Kt[X]=Kt[Q]=Kt[re]=Kt[ne]=Kt[ie]=Kt[se]=false;var $t={};$t[V]=$t[q]=$t[le]=$t[ce]=$t[U]=$t[H]=$t[fe]=$t[pe]=$t[he]=$t[de]=$t[ve]=$t[Y]=$t[X]=$t[Q]=$t[re]=$t[ne]=$t[ie]=$t[oe]=$t[ge]=$t[me]=$t[ye]=$t[be]=true;$t[G]=$t[K]=$t[se]=false;var Yt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};var Xt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var Zt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};var Qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var er=parseFloat,tr=parseInt;var rr=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var nr=typeof self=="object"&&self&&self.Object===Object&&self;var ir=rr||nr||Function("return this")();var or=t&&!t.nodeType&&t;var ar=or&&"object"=="object"&&e&&!e.nodeType&&e;var sr=ar&&ar.exports===or;var ur=sr&&rr.process;var lr=function(){try{var e=ar&&ar.require&&ar.require("util").types;if(e){return e}return ur&&ur.binding&&ur.binding("util")}catch(e){}}();var cr=lr&&lr.isArrayBuffer,fr=lr&&lr.isDate,pr=lr&&lr.isMap,hr=lr&&lr.isRegExp,dr=lr&&lr.isSet,vr=lr&&lr.isTypedArray;function gr(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function mr(e,t,r,n){var i=-1,o=e==null?0:e.length;while(++i<o){var a=e[i];t(n,a,r(a),e)}return n}function yr(e,t){var r=-1,n=e==null?0:e.length;while(++r<n){if(t(e[r],r,e)===false){break}}return e}function br(e,t){var r=e==null?0:e.length;while(r--){if(t(e[r],r,e)===false){break}}return e}function _r(e,t){var r=-1,n=e==null?0:e.length;while(++r<n){if(!t(e[r],r,e)){return false}}return true}function wr(e,t){var r=-1,n=e==null?0:e.length,i=0,o=[];while(++r<n){var a=e[r];if(t(a,r,e)){o[i++]=a}}return o}function kr(e,t){var r=e==null?0:e.length;return!!r&&Cr(e,t,0)>-1}function xr(e,t,r){var n=-1,i=e==null?0:e.length;while(++n<i){if(r(t,e[n])){return true}}return false}function Or(e,t){var r=-1,n=e==null?0:e.length,i=Array(n);while(++r<n){i[r]=t(e[r],r,e)}return i}function Tr(e,t){var r=-1,n=t.length,i=e.length;while(++r<n){e[i+r]=t[r]}return e}function Ir(e,t,r,n){var i=-1,o=e==null?0:e.length;if(n&&o){r=e[++i]}while(++i<o){r=t(r,e[i],i,e)}return r}function Dr(e,t,r,n){var i=e==null?0:e.length;if(n&&i){r=e[--i]}while(i--){r=t(r,e[i],i,e)}return r}function jr(e,t){var r=-1,n=e==null?0:e.length;while(++r<n){if(t(e[r],r,e)){return true}}return false}var Mr=Rr("length");function Nr(e){return e.split("")}function Er(e){return e.match(Be)||[]}function Ar(e,t,r){var n;r(e,(function(e,r,i){if(t(e,r,i)){n=r;return false}}));return n}function Sr(e,t,r,n){var i=e.length,o=r+(n?1:-1);while(n?o--:++o<i){if(t(e[o],o,e)){return o}}return-1}function Cr(e,t,r){return t===t?fn(e,t,r):Sr(e,Lr,r)}function zr(e,t,r,n){var i=r-1,o=e.length;while(++i<o){if(n(e[i],t)){return i}}return-1}function Lr(e){return e!==e}function Fr(e,t){var r=e==null?0:e.length;return r?qr(e,t)/r:L}function Rr(e){return function(t){return t==null?r:t[e]}}function Pr(e){return function(t){return e==null?r:e[t]}}function Br(e,t,r,n,i){i(e,(function(e,i,o){r=n?(n=false,e):t(r,e,i,o)}));return r}function Vr(e,t){var r=e.length;e.sort(t);while(r--){e[r]=e[r].value}return e}function qr(e,t){var n,i=-1,o=e.length;while(++i<o){var a=t(e[i]);if(a!==r){n=n===r?a:n+a}}return n}function Wr(e,t){var r=-1,n=Array(e);while(++r<e){n[r]=t(r)}return n}function Ur(e,t){return Or(t,(function(t){return[t,e[t]]}))}function Hr(e){return e?e.slice(0,vn(e)+1).replace(ze,""):e}function Jr(e){return function(t){return e(t)}}function Gr(e,t){return Or(t,(function(t){return e[t]}))}function Kr(e,t){return e.has(t)}function $r(e,t){var r=-1,n=e.length;while(++r<n&&Cr(t,e[r],0)>-1){}return r}function Yr(e,t){var r=e.length;while(r--&&Cr(t,e[r],0)>-1){}return r}function Xr(e,t){var r=e.length,n=0;while(r--){if(e[r]===t){++n}}return n}var Zr=Pr(Yt);var Qr=Pr(Xt);function en(e){return"\\"+Qt[e]}function tn(e,t){return e==null?r:e[t]}function rn(e){return Ut.test(e)}function nn(e){return Ht.test(e)}function on(e){var t,r=[];while(!(t=e.next()).done){r.push(t.value)}return r}function an(e){var t=-1,r=Array(e.size);e.forEach((function(e,n){r[++t]=[n,e]}));return r}function sn(e,t){return function(r){return e(t(r))}}function un(e,t){var r=-1,n=e.length,i=0,o=[];while(++r<n){var a=e[r];if(a===t||a===c){e[r]=c;o[i++]=r}}return o}function ln(e){var t=-1,r=Array(e.size);e.forEach((function(e){r[++t]=e}));return r}function cn(e){var t=-1,r=Array(e.size);e.forEach((function(e){r[++t]=[e,e]}));return r}function fn(e,t,r){var n=r-1,i=e.length;while(++n<i){if(e[n]===t){return n}}return-1}function pn(e,t,r){var n=r+1;while(n--){if(e[n]===t){return n}}return n}function hn(e){return rn(e)?mn(e):Mr(e)}function dn(e){return rn(e)?yn(e):Nr(e)}function vn(e){var t=e.length;while(t--&&Le.test(e.charAt(t))){}return t}var gn=Pr(Zt);function mn(e){var t=qt.lastIndex=0;while(qt.test(e)){++t}return t}function yn(e){return e.match(qt)||[]}function bn(e){return e.match(Wt)||[]}var _n=function e(t){t=t==null?ir:wn.defaults(ir.Object(),t,wn.pick(ir,Jt));var Le=t.Array,Be=t.Date,Qe=t.Error,et=t.Function,tt=t.Math,rt=t.Object,nt=t.RegExp,it=t.String,ot=t.TypeError;var at=Le.prototype,st=et.prototype,ut=rt.prototype;var lt=t["__core-js_shared__"];var ct=st.toString;var ft=ut.hasOwnProperty;var pt=0;var ht=function(){var e=/[^.]+$/.exec(lt&&lt.keys&&lt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var dt=ut.toString;var vt=ct.call(rt);var gt=ir._;var mt=nt("^"+ct.call(ft).replace(Se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var yt=sr?t.Buffer:r,bt=t.Symbol,_t=t.Uint8Array,wt=yt?yt.allocUnsafe:r,kt=sn(rt.getPrototypeOf,rt),xt=rt.create,Ot=ut.propertyIsEnumerable,Tt=at.splice,It=bt?bt.isConcatSpreadable:r,Dt=bt?bt.iterator:r,jt=bt?bt.toStringTag:r;var Mt=function(){try{var e=Ga(rt,"defineProperty");e({},"",{});return e}catch(e){}}();var Nt=t.clearTimeout!==ir.clearTimeout&&t.clearTimeout,Et=Be&&Be.now!==ir.Date.now&&Be.now,At=t.setTimeout!==ir.setTimeout&&t.setTimeout;var St=tt.ceil,Ct=tt.floor,zt=rt.getOwnPropertySymbols,Lt=yt?yt.isBuffer:r,Ft=t.isFinite,Rt=at.join,Pt=sn(rt.keys,rt),qt=tt.max,Wt=tt.min,Ut=Be.now,Ht=t.parseInt,Yt=tt.random,Xt=at.reverse;var Zt=Ga(t,"DataView"),Qt=Ga(t,"Map"),rr=Ga(t,"Promise"),nr=Ga(t,"Set"),or=Ga(t,"WeakMap"),ar=Ga(rt,"create");var ur=or&&new or;var lr={};var Mr=As(Zt),Nr=As(Qt),Pr=As(rr),fn=As(nr),mn=As(or);var yn=bt?bt.prototype:r,_n=yn?yn.valueOf:r,kn=yn?yn.toString:r;function xn(e){if(Tc(e)&&!uc(e)&&!(e instanceof Dn)){if(e instanceof In){return e}if(ft.call(e,"__wrapped__")){return Cs(e)}}return new In(e)}var On=function(){function e(){}return function(t){if(!Oc(t)){return{}}if(xt){return xt(t)}e.prototype=t;var n=new e;e.prototype=r;return n}}();function Tn(){}function In(e,t){this.__wrapped__=e;this.__actions__=[];this.__chain__=!!t;this.__index__=0;this.__values__=r}xn.templateSettings={escape:De,evaluate:je,interpolate:Me,variable:"",imports:{_:xn}};xn.prototype=Tn.prototype;xn.prototype.constructor=xn;In.prototype=On(Tn.prototype);In.prototype.constructor=In;function Dn(e){this.__wrapped__=e;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=F;this.__views__=[]}function jn(){var e=new Dn(this.__wrapped__);e.__actions__=ia(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=ia(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=ia(this.__views__);return e}function Mn(){if(this.__filtered__){var e=new Dn(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}function Nn(){var e=this.__wrapped__.value(),t=this.__dir__,r=uc(e),n=t<0,i=r?e.length:0,o=Za(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=n?s:a-1,c=this.__iteratees__,f=c.length,p=0,h=Wt(u,this.__takeCount__);if(!r||!n&&i==u&&h==u){return Po(e,this.__actions__)}var d=[];e:while(u--&&p<h){l+=t;var v=-1,g=e[l];while(++v<f){var m=c[v],y=m.iteratee,b=m.type,_=y(g);if(b==E){g=_}else if(!_){if(b==N){continue e}else{break e}}}d[p++]=g}return d}Dn.prototype=On(Tn.prototype);Dn.prototype.constructor=Dn;function En(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function An(){this.__data__=ar?ar(null):{};this.size=0}function Sn(e){var t=this.has(e)&&delete this.__data__[e];this.size-=t?1:0;return t}function Cn(e){var t=this.__data__;if(ar){var n=t[e];return n===u?r:n}return ft.call(t,e)?t[e]:r}function zn(e){var t=this.__data__;return ar?t[e]!==r:ft.call(t,e)}function Ln(e,t){var n=this.__data__;this.size+=this.has(e)?0:1;n[e]=ar&&t===r?u:t;return this}En.prototype.clear=An;En.prototype["delete"]=Sn;En.prototype.get=Cn;En.prototype.has=zn;En.prototype.set=Ln;function Fn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function Rn(){this.__data__=[];this.size=0}function Pn(e){var t=this.__data__,r=ci(t,e);if(r<0){return false}var n=t.length-1;if(r==n){t.pop()}else{Tt.call(t,r,1)}--this.size;return true}function Bn(e){var t=this.__data__,n=ci(t,e);return n<0?r:t[n][1]}function Vn(e){return ci(this.__data__,e)>-1}function qn(e,t){var r=this.__data__,n=ci(r,e);if(n<0){++this.size;r.push([e,t])}else{r[n][1]=t}return this}Fn.prototype.clear=Rn;Fn.prototype["delete"]=Pn;Fn.prototype.get=Bn;Fn.prototype.has=Vn;Fn.prototype.set=qn;function Wn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}function Un(){this.size=0;this.__data__={hash:new En,map:new(Qt||Fn),string:new En}}function Hn(e){var t=Ha(this,e)["delete"](e);this.size-=t?1:0;return t}function Jn(e){return Ha(this,e).get(e)}function Gn(e){return Ha(this,e).has(e)}function Kn(e,t){var r=Ha(this,e),n=r.size;r.set(e,t);this.size+=r.size==n?0:1;return this}Wn.prototype.clear=Un;Wn.prototype["delete"]=Hn;Wn.prototype.get=Jn;Wn.prototype.has=Gn;Wn.prototype.set=Kn;function $n(e){var t=-1,r=e==null?0:e.length;this.__data__=new Wn;while(++t<r){this.add(e[t])}}function Yn(e){this.__data__.set(e,u);return this}function Xn(e){return this.__data__.has(e)}$n.prototype.add=$n.prototype.push=Yn;$n.prototype.has=Xn;function Zn(e){var t=this.__data__=new Fn(e);this.size=t.size}function Qn(){this.__data__=new Fn;this.size=0}function ei(e){var t=this.__data__,r=t["delete"](e);this.size=t.size;return r}function ti(e){return this.__data__.get(e)}function ri(e){return this.__data__.has(e)}function ni(e,t){var r=this.__data__;if(r instanceof Fn){var n=r.__data__;if(!Qt||n.length<i-1){n.push([e,t]);this.size=++r.size;return this}r=this.__data__=new Wn(n)}r.set(e,t);this.size=r.size;return this}Zn.prototype.clear=Qn;Zn.prototype["delete"]=ei;Zn.prototype.get=ti;Zn.prototype.has=ri;Zn.prototype.set=ni;function ii(e,t){var r=uc(e),n=!r&&sc(e),i=!r&&!n&&hc(e),o=!r&&!n&&!i&&Bc(e),a=r||n||i||o,s=a?Wr(e.length,it):[],u=s.length;for(var l in e){if((t||ft.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||as(l,u)))){s.push(l)}}return s}function oi(e){var t=e.length;return t?e[yo(0,t-1)]:r}function ai(e,t){return Ms(ia(e),gi(t,0,e.length))}function si(e){return Ms(ia(e))}function ui(e,t,n){if(n!==r&&!ic(e[t],n)||n===r&&!(t in e)){di(e,t,n)}}function li(e,t,n){var i=e[t];if(!(ft.call(e,t)&&ic(i,n))||n===r&&!(t in e)){di(e,t,n)}}function ci(e,t){var r=e.length;while(r--){if(ic(e[r][0],t)){return r}}return-1}function fi(e,t,r,n){ki(e,(function(e,i,o){t(n,e,r(e),o)}));return n}function pi(e,t){return e&&oa(t,xf(t),e)}function hi(e,t){return e&&oa(t,Of(t),e)}function di(e,t,r){if(t=="__proto__"&&Mt){Mt(e,t,{configurable:true,enumerable:true,value:r,writable:true})}else{e[t]=r}}function vi(e,t){var n=-1,i=t.length,o=Le(i),a=e==null;while(++n<i){o[n]=a?r:mf(e,t[n])}return o}function gi(e,t,n){if(e===e){if(n!==r){e=e<=n?e:n}if(t!==r){e=e>=t?e:t}}return e}function mi(e,t,n,i,o,a){var s,u=t&f,l=t&p,c=t&h;if(n){s=o?n(e,i,o,a):n(e)}if(s!==r){return s}if(!Oc(e)){return e}var d=uc(e);if(d){s=ts(e);if(!u){return ia(e,s)}}else{var v=Xa(e),g=v==K||v==$;if(hc(e)){return Ko(e,u)}if(v==Q||v==V||g&&!o){s=l||g?{}:rs(e);if(!u){return l?sa(e,hi(s,e)):aa(e,pi(s,e))}}else{if(!$t[v]){return o?e:{}}s=ns(e,v,u)}}a||(a=new Zn);var m=a.get(e);if(m){return m}a.set(e,s);if(Fc(e)){e.forEach((function(r){s.add(mi(r,t,n,r,e,a))}))}else if(Ic(e)){e.forEach((function(r,i){s.set(i,mi(r,t,n,i,e,a))}))}var y=c?l?Ba:Pa:l?Of:xf;var b=d?r:y(e);yr(b||e,(function(r,i){if(b){i=r;r=e[i]}li(s,i,mi(r,t,n,i,e,a))}));return s}function yi(e){var t=xf(e);return function(r){return bi(r,e,t)}}function bi(e,t,n){var i=n.length;if(e==null){return!i}e=rt(e);while(i--){var o=n[i],a=t[o],s=e[o];if(s===r&&!(o in e)||!a(s)){return false}}return true}function _i(e,t,n){if(typeof e!="function"){throw new ot(a)}return Ts((function(){e.apply(r,n)}),t)}function wi(e,t,r,n){var o=-1,a=kr,s=true,u=e.length,l=[],c=t.length;if(!u){return l}if(r){t=Or(t,Jr(r))}if(n){a=xr;s=false}else if(t.length>=i){a=Kr;s=false;t=new $n(t)}e:while(++o<u){var f=e[o],p=r==null?f:r(f);f=n||f!==0?f:0;if(s&&p===p){var h=c;while(h--){if(t[h]===p){continue e}}l.push(f)}else if(!a(t,p,n)){l.push(f)}}return l}var ki=ca(Ei);var xi=ca(Ai,true);function Oi(e,t){var r=true;ki(e,(function(e,n,i){r=!!t(e,n,i);return r}));return r}function Ti(e,t,n){var i=-1,o=e.length;while(++i<o){var a=e[i],s=t(a);if(s!=null&&(u===r?s===s&&!Pc(s):n(s,u))){var u=s,l=a}}return l}function Ii(e,t,n,i){var o=e.length;n=Kc(n);if(n<0){n=-n>o?0:o+n}i=i===r||i>o?o:Kc(i);if(i<0){i+=o}i=n>i?0:$c(i);while(n<i){e[n++]=t}return e}function Di(e,t){var r=[];ki(e,(function(e,n,i){if(t(e,n,i)){r.push(e)}}));return r}function ji(e,t,r,n,i){var o=-1,a=e.length;r||(r=os);i||(i=[]);while(++o<a){var s=e[o];if(t>0&&r(s)){if(t>1){ji(s,t-1,r,n,i)}else{Tr(i,s)}}else if(!n){i[i.length]=s}}return i}var Mi=fa();var Ni=fa(true);function Ei(e,t){return e&&Mi(e,t,xf)}function Ai(e,t){return e&&Ni(e,t,xf)}function Si(e,t){return wr(t,(function(t){return wc(e[t])}))}function Ci(e,t){t=Uo(t,e);var n=0,i=t.length;while(e!=null&&n<i){e=e[Es(t[n++])]}return n&&n==i?e:r}function zi(e,t,r){var n=t(e);return uc(e)?n:Tr(n,r(e))}function Li(e){if(e==null){return e===r?ae:Z}return jt&&jt in rt(e)?Ka(e):bs(e)}function Fi(e,t){return e>t}function Ri(e,t){return e!=null&&ft.call(e,t)}function Pi(e,t){return e!=null&&t in rt(e)}function Bi(e,t,r){return e>=Wt(t,r)&&e<qt(t,r)}function Vi(e,t,n){var i=n?xr:kr,o=e[0].length,a=e.length,s=a,u=Le(a),l=Infinity,c=[];while(s--){var f=e[s];if(s&&t){f=Or(f,Jr(t))}l=Wt(f.length,l);u[s]=!n&&(t||o>=120&&f.length>=120)?new $n(s&&f):r}f=e[0];var p=-1,h=u[0];e:while(++p<o&&c.length<l){var d=f[p],v=t?t(d):d;d=n||d!==0?d:0;if(!(h?Kr(h,v):i(c,v,n))){s=a;while(--s){var g=u[s];if(!(g?Kr(g,v):i(e[s],v,n))){continue e}}if(h){h.push(v)}c.push(d)}}return c}function qi(e,t,r,n){Ei(e,(function(e,i,o){t(n,r(e),i,o)}));return n}function Wi(e,t,n){t=Uo(t,e);e=ws(e,t);var i=e==null?e:e[Es(ou(t))];return i==null?r:gr(i,e,n)}function Ui(e){return Tc(e)&&Li(e)==V}function Hi(e){return Tc(e)&&Li(e)==le}function Ji(e){return Tc(e)&&Li(e)==H}function Gi(e,t,r,n,i){if(e===t){return true}if(e==null||t==null||!Tc(e)&&!Tc(t)){return e!==e&&t!==t}return Ki(e,t,r,n,Gi,i)}function Ki(e,t,r,n,i,o){var a=uc(e),s=uc(t),u=a?q:Xa(e),l=s?q:Xa(t);u=u==V?Q:u;l=l==V?Q:l;var c=u==Q,f=l==Q,p=u==l;if(p&&hc(e)){if(!hc(t)){return false}a=true;c=false}if(p&&!c){o||(o=new Zn);return a||Bc(e)?za(e,t,r,n,i,o):La(e,t,u,r,n,i,o)}if(!(r&d)){var h=c&&ft.call(e,"__wrapped__"),v=f&&ft.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,m=v?t.value():t;o||(o=new Zn);return i(g,m,r,n,o)}}if(!p){return false}o||(o=new Zn);return Fa(e,t,r,n,i,o)}function $i(e){return Tc(e)&&Xa(e)==Y}function Yi(e,t,n,i){var o=n.length,a=o,s=!i;if(e==null){return!a}e=rt(e);while(o--){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e)){return false}}while(++o<a){u=n[o];var l=u[0],c=e[l],f=u[1];if(s&&u[2]){if(c===r&&!(l in e)){return false}}else{var p=new Zn;if(i){var h=i(c,f,l,e,t,p)}if(!(h===r?Gi(f,c,d|v,i,p):h)){return false}}}return true}function Xi(e){if(!Oc(e)||fs(e)){return false}var t=wc(e)?mt:Ge;return t.test(As(e))}function Zi(e){return Tc(e)&&Li(e)==re}function Qi(e){return Tc(e)&&Xa(e)==ne}function eo(e){return Tc(e)&&xc(e.length)&&!!Kt[Li(e)]}function to(e){if(typeof e=="function"){return e}if(e==null){return Ep}if(typeof e=="object"){return uc(e)?so(e[0],e[1]):ao(e)}return Up(e)}function ro(e){if(!hs(e)){return Pt(e)}var t=[];for(var r in rt(e)){if(ft.call(e,r)&&r!="constructor"){t.push(r)}}return t}function no(e){if(!Oc(e)){return ys(e)}var t=hs(e),r=[];for(var n in e){if(!(n=="constructor"&&(t||!ft.call(e,n)))){r.push(n)}}return r}function io(e,t){return e<t}function oo(e,t){var r=-1,n=cc(e)?Le(e.length):[];ki(e,(function(e,i,o){n[++r]=t(e,i,o)}));return n}function ao(e){var t=Ja(e);if(t.length==1&&t[0][2]){return vs(t[0][0],t[0][1])}return function(r){return r===e||Yi(r,e,t)}}function so(e,t){if(us(e)&&ds(t)){return vs(Es(e),t)}return function(n){var i=mf(n,e);return i===r&&i===t?bf(n,e):Gi(t,i,d|v)}}function uo(e,t,n,i,o){if(e===t){return}Mi(t,(function(a,s){o||(o=new Zn);if(Oc(a)){lo(e,t,s,n,uo,i,o)}else{var u=i?i(xs(e,s),a,s+"",e,t,o):r;if(u===r){u=a}ui(e,s,u)}}),Of)}function lo(e,t,n,i,o,a,s){var u=xs(e,n),l=xs(t,n),c=s.get(l);if(c){ui(e,n,c);return}var f=a?a(u,l,n+"",e,t,s):r;var p=f===r;if(p){var h=uc(l),d=!h&&hc(l),v=!h&&!d&&Bc(l);f=l;if(h||d||v){if(uc(u)){f=u}else if(fc(u)){f=ia(u)}else if(d){p=false;f=Ko(l,true)}else if(v){p=false;f=Qo(l,true)}else{f=[]}}else if(Cc(l)||sc(l)){f=u;if(sc(u)){f=Xc(u)}else if(!Oc(u)||wc(u)){f=rs(l)}}else{p=false}}if(p){s.set(l,f);o(f,l,i,a,s);s["delete"](l)}ui(e,n,f)}function co(e,t){var n=e.length;if(!n){return}t+=t<0?n:0;return as(t,n)?e[t]:r}function fo(e,t,r){if(t.length){t=Or(t,(function(e){if(uc(e)){return function(t){return Ci(t,e.length===1?e[0]:e)}}return e}))}else{t=[Ep]}var n=-1;t=Or(t,Jr(Ua()));var i=oo(e,(function(e,r,i){var o=Or(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return Vr(i,(function(e,t){return ta(e,t,r)}))}function po(e,t){return ho(e,t,(function(t,r){return bf(e,r)}))}function ho(e,t,r){var n=-1,i=t.length,o={};while(++n<i){var a=t[n],s=Ci(e,a);if(r(s,a)){Oo(o,Uo(a,e),s)}}return o}function vo(e){return function(t){return Ci(t,e)}}function go(e,t,r,n){var i=n?zr:Cr,o=-1,a=t.length,s=e;if(e===t){t=ia(t)}if(r){s=Or(e,Jr(r))}while(++o<a){var u=0,l=t[o],c=r?r(l):l;while((u=i(s,c,u,n))>-1){if(s!==e){Tt.call(s,u,1)}Tt.call(e,u,1)}}return e}function mo(e,t){var r=e?t.length:0,n=r-1;while(r--){var i=t[r];if(r==n||i!==o){var o=i;if(as(i)){Tt.call(e,i,1)}else{Lo(e,i)}}}return e}function yo(e,t){return e+Ct(Yt()*(t-e+1))}function bo(e,t,r,n){var i=-1,o=qt(St((t-e)/(r||1)),0),a=Le(o);while(o--){a[n?o:++i]=e;e+=r}return a}function _o(e,t){var r="";if(!e||t<1||t>C){return r}do{if(t%2){r+=e}t=Ct(t/2);if(t){e+=e}}while(t);return r}function wo(e,t){return Is(_s(e,t,Ep),e+"")}function ko(e){return oi(qf(e))}function xo(e,t){var r=qf(e);return Ms(r,gi(t,0,r.length))}function Oo(e,t,n,i){if(!Oc(e)){return e}t=Uo(t,e);var o=-1,a=t.length,s=a-1,u=e;while(u!=null&&++o<a){var l=Es(t[o]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype"){return e}if(o!=s){var f=u[l];c=i?i(f,l,u):r;if(c===r){c=Oc(f)?f:as(t[o+1])?[]:{}}}li(u,l,c);u=u[l]}return e}var To=!ur?Ep:function(e,t){ur.set(e,t);return e};var Io=!Mt?Ep:function(e,t){return Mt(e,"toString",{configurable:true,enumerable:false,value:Dp(t),writable:true})};function Do(e){return Ms(qf(e))}function jo(e,t,r){var n=-1,i=e.length;if(t<0){t=-t>i?0:i+t}r=r>i?i:r;if(r<0){r+=i}i=t>r?0:r-t>>>0;t>>>=0;var o=Le(i);while(++n<i){o[n]=e[n+t]}return o}function Mo(e,t){var r;ki(e,(function(e,n,i){r=t(e,n,i);return!r}));return!!r}function No(e,t,r){var n=0,i=e==null?n:e.length;if(typeof t=="number"&&t===t&&i<=P){while(n<i){var o=n+i>>>1,a=e[o];if(a!==null&&!Pc(a)&&(r?a<=t:a<t)){n=o+1}else{i=o}}return i}return Eo(e,t,Ep,r)}function Eo(e,t,n,i){var o=0,a=e==null?0:e.length;if(a===0){return 0}t=n(t);var s=t!==t,u=t===null,l=Pc(t),c=t===r;while(o<a){var f=Ct((o+a)/2),p=n(e[f]),h=p!==r,d=p===null,v=p===p,g=Pc(p);if(s){var m=i||v}else if(c){m=v&&(i||h)}else if(u){m=v&&h&&(i||!d)}else if(l){m=v&&h&&!d&&(i||!g)}else if(d||g){m=false}else{m=i?p<=t:p<t}if(m){o=f+1}else{a=f}}return Wt(a,R)}function Ao(e,t){var r=-1,n=e.length,i=0,o=[];while(++r<n){var a=e[r],s=t?t(a):a;if(!r||!ic(s,u)){var u=s;o[i++]=a===0?0:a}}return o}function So(e){if(typeof e=="number"){return e}if(Pc(e)){return L}return+e}function Co(e){if(typeof e=="string"){return e}if(uc(e)){return Or(e,Co)+""}if(Pc(e)){return kn?kn.call(e):""}var t=e+"";return t=="0"&&1/e==-S?"-0":t}function zo(e,t,r){var n=-1,o=kr,a=e.length,s=true,u=[],l=u;if(r){s=false;o=xr}else if(a>=i){var c=t?null:Ma(e);if(c){return ln(c)}s=false;o=Kr;l=new $n}else{l=t?[]:u}e:while(++n<a){var f=e[n],p=t?t(f):f;f=r||f!==0?f:0;if(s&&p===p){var h=l.length;while(h--){if(l[h]===p){continue e}}if(t){l.push(p)}u.push(f)}else if(!o(l,p,r)){if(l!==u){l.push(p)}u.push(f)}}return u}function Lo(e,t){t=Uo(t,e);e=ws(e,t);return e==null||delete e[Es(ou(t))]}function Fo(e,t,r,n){return Oo(e,t,r(Ci(e,t)),n)}function Ro(e,t,r,n){var i=e.length,o=n?i:-1;while((n?o--:++o<i)&&t(e[o],o,e)){}return r?jo(e,n?0:o,n?o+1:i):jo(e,n?o+1:0,n?i:o)}function Po(e,t){var r=e;if(r instanceof Dn){r=r.value()}return Ir(t,(function(e,t){return t.func.apply(t.thisArg,Tr([e],t.args))}),r)}function Bo(e,t,r){var n=e.length;if(n<2){return n?zo(e[0]):[]}var i=-1,o=Le(n);while(++i<n){var a=e[i],s=-1;while(++s<n){if(s!=i){o[i]=wi(o[i]||a,e[s],t,r)}}}return zo(ji(o,1),t,r)}function Vo(e,t,n){var i=-1,o=e.length,a=t.length,s={};while(++i<o){var u=i<a?t[i]:r;n(s,e[i],u)}return s}function qo(e){return fc(e)?e:[]}function Wo(e){return typeof e=="function"?e:Ep}function Uo(e,t){if(uc(e)){return e}return us(e,t)?[e]:Ns(Qc(e))}var Ho=wo;function Jo(e,t,n){var i=e.length;n=n===r?i:n;return!t&&n>=i?e:jo(e,t,n)}var Go=Nt||function(e){return ir.clearTimeout(e)};function Ko(e,t){if(t){return e.slice()}var r=e.length,n=wt?wt(r):new e.constructor(r);e.copy(n);return n}function $o(e){var t=new e.constructor(e.byteLength);new _t(t).set(new _t(e));return t}function Yo(e,t){var r=t?$o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Xo(e){var t=new e.constructor(e.source,Ue.exec(e));t.lastIndex=e.lastIndex;return t}function Zo(e){return _n?rt(_n.call(e)):{}}function Qo(e,t){var r=t?$o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function ea(e,t){if(e!==t){var n=e!==r,i=e===null,o=e===e,a=Pc(e);var s=t!==r,u=t===null,l=t===t,c=Pc(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||i&&s&&l||!n&&l||!o){return 1}if(!i&&!a&&!c&&e<t||c&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!l){return-1}}return 0}function ta(e,t,r){var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;while(++n<a){var u=ea(i[n],o[n]);if(u){if(n>=s){return u}var l=r[n];return u*(l=="desc"?-1:1)}}return e.index-t.index}function ra(e,t,r,n){var i=-1,o=e.length,a=r.length,s=-1,u=t.length,l=qt(o-a,0),c=Le(u+l),f=!n;while(++s<u){c[s]=t[s]}while(++i<a){if(f||i<o){c[r[i]]=e[i]}}while(l--){c[s++]=e[i++]}return c}function na(e,t,r,n){var i=-1,o=e.length,a=-1,s=r.length,u=-1,l=t.length,c=qt(o-s,0),f=Le(c+l),p=!n;while(++i<c){f[i]=e[i]}var h=i;while(++u<l){f[h+u]=t[u]}while(++a<s){if(p||i<o){f[h+r[a]]=e[i++]}}return f}function ia(e,t){var r=-1,n=e.length;t||(t=Le(n));while(++r<n){t[r]=e[r]}return t}function oa(e,t,n,i){var o=!n;n||(n={});var a=-1,s=t.length;while(++a<s){var u=t[a];var l=i?i(n[u],e[u],u,n,e):r;if(l===r){l=e[u]}if(o){di(n,u,l)}else{li(n,u,l)}}return n}function aa(e,t){return oa(e,$a(e),t)}function sa(e,t){return oa(e,Ya(e),t)}function ua(e,t){return function(r,n){var i=uc(r)?mr:fi,o=t?t():{};return i(r,e,Ua(n,2),o)}}function la(e){return wo((function(t,n){var i=-1,o=n.length,a=o>1?n[o-1]:r,s=o>2?n[2]:r;a=e.length>3&&typeof a=="function"?(o--,a):r;if(s&&ss(n[0],n[1],s)){a=o<3?r:a;o=1}t=rt(t);while(++i<o){var u=n[i];if(u){e(t,u,i,a)}}return t}))}function ca(e,t){return function(r,n){if(r==null){return r}if(!cc(r)){return e(r,n)}var i=r.length,o=t?i:-1,a=rt(r);while(t?o--:++o<i){if(n(a[o],o,a)===false){break}}return r}}function fa(e){return function(t,r,n){var i=-1,o=rt(t),a=n(t),s=a.length;while(s--){var u=a[e?s:++i];if(r(o[u],u,o)===false){break}}return t}}function pa(e,t,r){var n=t&g,i=va(e);function o(){var t=this&&this!==ir&&this instanceof o?i:e;return t.apply(n?r:this,arguments)}return o}function ha(e){return function(t){t=Qc(t);var n=rn(t)?dn(t):r;var i=n?n[0]:t.charAt(0);var o=n?Jo(n,1).join(""):t.slice(1);return i[e]()+o}}function da(e){return function(t){return Ir(kp($f(t).replace(Bt,"")),e,"")}}function va(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=On(e.prototype),n=e.apply(r,t);return Oc(n)?n:r}}function ga(e,t,n){var i=va(e);function o(){var a=arguments.length,s=Le(a),u=a,l=Wa(o);while(u--){s[u]=arguments[u]}var c=a<3&&s[0]!==l&&s[a-1]!==l?[]:un(s,l);a-=c.length;if(a<n){return Da(e,t,ba,o.placeholder,r,s,c,r,r,n-a)}var f=this&&this!==ir&&this instanceof o?i:e;return gr(f,this,s)}return o}function ma(e){return function(t,n,i){var o=rt(t);if(!cc(t)){var a=Ua(n,3);t=xf(t);n=function(e){return a(o[e],e,o)}}var s=e(t,n,i);return s>-1?o[a?t[s]:s]:r}}function ya(e){return Ra((function(t){var n=t.length,i=n,o=In.prototype.thru;if(e){t.reverse()}while(i--){var s=t[i];if(typeof s!="function"){throw new ot(a)}if(o&&!u&&qa(s)=="wrapper"){var u=new In([],true)}}i=u?i:n;while(++i<n){s=t[i];var l=qa(s),c=l=="wrapper"?Va(s):r;if(c&&cs(c[0])&&c[1]==(x|b|w|O)&&!c[4].length&&c[9]==1){u=u[qa(c[0])].apply(u,c[3])}else{u=s.length==1&&cs(s)?u[l]():u.thru(s)}}return function(){var e=arguments,r=e[0];if(u&&e.length==1&&uc(r)){return u.plant(r).value()}var i=0,o=n?t[i].apply(this,e):r;while(++i<n){o=t[i].call(this,o)}return o}}))}function ba(e,t,n,i,o,a,s,u,l,c){var f=t&x,p=t&g,h=t&m,d=t&(b|_),v=t&T,y=h?r:va(e);function w(){var r=arguments.length,g=Le(r),m=r;while(m--){g[m]=arguments[m]}if(d){var b=Wa(w),_=Xr(g,b)}if(i){g=ra(g,i,o,d)}if(a){g=na(g,a,s,d)}r-=_;if(d&&r<c){var k=un(g,b);return Da(e,t,ba,w.placeholder,n,g,k,u,l,c-r)}var x=p?n:this,O=h?x[e]:e;r=g.length;if(u){g=ks(g,u)}else if(v&&r>1){g.reverse()}if(f&&l<r){g.length=l}if(this&&this!==ir&&this instanceof w){O=y||va(O)}return O.apply(x,g)}return w}function _a(e,t){return function(r,n){return qi(r,e,t(n),{})}}function wa(e,t){return function(n,i){var o;if(n===r&&i===r){return t}if(n!==r){o=n}if(i!==r){if(o===r){return i}if(typeof n=="string"||typeof i=="string"){n=Co(n);i=Co(i)}else{n=So(n);i=So(i)}o=e(n,i)}return o}}function ka(e){return Ra((function(t){t=Or(t,Jr(Ua()));return wo((function(r){var n=this;return e(t,(function(e){return gr(e,n,r)}))}))}))}function xa(e,t){t=t===r?" ":Co(t);var n=t.length;if(n<2){return n?_o(t,e):t}var i=_o(t,St(e/hn(t)));return rn(t)?Jo(dn(i),0,e).join(""):i.slice(0,e)}function Oa(e,t,r,n){var i=t&g,o=va(e);function a(){var t=-1,s=arguments.length,u=-1,l=n.length,c=Le(l+s),f=this&&this!==ir&&this instanceof a?o:e;while(++u<l){c[u]=n[u]}while(s--){c[u++]=arguments[++t]}return gr(f,i?r:this,c)}return a}function Ta(e){return function(t,n,i){if(i&&typeof i!="number"&&ss(t,n,i)){n=i=r}t=Gc(t);if(n===r){n=t;t=0}else{n=Gc(n)}i=i===r?t<n?1:-1:Gc(i);return bo(t,n,i,e)}}function Ia(e){return function(t,r){if(!(typeof t=="string"&&typeof r=="string")){t=Yc(t);r=Yc(r)}return e(t,r)}}function Da(e,t,n,i,o,a,s,u,l,c){var f=t&b,p=f?s:r,h=f?r:s,d=f?a:r,v=f?r:a;t|=f?w:k;t&=~(f?k:w);if(!(t&y)){t&=~(g|m)}var _=[e,t,o,d,p,v,h,u,l,c];var x=n.apply(r,_);if(cs(e)){Os(x,_)}x.placeholder=i;return Ds(x,e,t)}function ja(e){var t=tt[e];return function(e,r){e=Yc(e);r=r==null?0:Wt(Kc(r),292);if(r&&Ft(e)){var n=(Qc(e)+"e").split("e"),i=t(n[0]+"e"+(+n[1]+r));n=(Qc(i)+"e").split("e");return+(n[0]+"e"+(+n[1]-r))}return t(e)}}var Ma=!(nr&&1/ln(new nr([,-0]))[1]==S)?Pp:function(e){return new nr(e)};function Na(e){return function(t){var r=Xa(t);if(r==Y){return an(t)}if(r==ne){return cn(t)}return Ur(t,e(t))}}function Ea(e,t,n,i,o,s,u,l){var c=t&m;if(!c&&typeof e!="function"){throw new ot(a)}var f=i?i.length:0;if(!f){t&=~(w|k);i=o=r}u=u===r?u:qt(Kc(u),0);l=l===r?l:Kc(l);f-=o?o.length:0;if(t&k){var p=i,h=o;i=o=r}var d=c?r:Va(e);var v=[e,t,n,i,o,p,h,s,u,l];if(d){ms(v,d)}e=v[0];t=v[1];n=v[2];i=v[3];o=v[4];l=v[9]=v[9]===r?c?0:e.length:qt(v[9]-f,0);if(!l&&t&(b|_)){t&=~(b|_)}if(!t||t==g){var y=pa(e,t,n)}else if(t==b||t==_){y=ga(e,t,l)}else if((t==w||t==(g|w))&&!o.length){y=Oa(e,t,n,i)}else{y=ba.apply(r,v)}var x=d?To:Os;return Ds(x(y,v),e,t)}function Aa(e,t,n,i){if(e===r||ic(e,ut[n])&&!ft.call(i,n)){return t}return e}function Sa(e,t,n,i,o,a){if(Oc(e)&&Oc(t)){a.set(t,e);uo(e,t,r,Sa,a);a["delete"](t)}return e}function Ca(e){return Cc(e)?r:e}function za(e,t,n,i,o,a){var s=n&d,u=e.length,l=t.length;if(u!=l&&!(s&&l>u)){return false}var c=a.get(e);var f=a.get(t);if(c&&f){return c==t&&f==e}var p=-1,h=true,g=n&v?new $n:r;a.set(e,t);a.set(t,e);while(++p<u){var m=e[p],y=t[p];if(i){var b=s?i(y,m,p,t,e,a):i(m,y,p,e,t,a)}if(b!==r){if(b){continue}h=false;break}if(g){if(!jr(t,(function(e,t){if(!Kr(g,t)&&(m===e||o(m,e,n,i,a))){return g.push(t)}}))){h=false;break}}else if(!(m===y||o(m,y,n,i,a))){h=false;break}}a["delete"](e);a["delete"](t);return h}function La(e,t,r,n,i,o,a){switch(r){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset){return false}e=e.buffer;t=t.buffer;case le:if(e.byteLength!=t.byteLength||!o(new _t(e),new _t(t))){return false}return true;case U:case H:case X:return ic(+e,+t);case G:return e.name==t.name&&e.message==t.message;case re:case ie:return e==t+"";case Y:var s=an;case ne:var u=n&d;s||(s=ln);if(e.size!=t.size&&!u){return false}var l=a.get(e);if(l){return l==t}n|=v;a.set(e,t);var c=za(s(e),s(t),n,i,o,a);a["delete"](e);return c;case oe:if(_n){return _n.call(e)==_n.call(t)}}return false}function Fa(e,t,n,i,o,a){var s=n&d,u=Pa(e),l=u.length,c=Pa(t),f=c.length;if(l!=f&&!s){return false}var p=l;while(p--){var h=u[p];if(!(s?h in t:ft.call(t,h))){return false}}var v=a.get(e);var g=a.get(t);if(v&&g){return v==t&&g==e}var m=true;a.set(e,t);a.set(t,e);var y=s;while(++p<l){h=u[p];var b=e[h],_=t[h];if(i){var w=s?i(_,b,h,t,e,a):i(b,_,h,e,t,a)}if(!(w===r?b===_||o(b,_,n,i,a):w)){m=false;break}y||(y=h=="constructor")}if(m&&!y){var k=e.constructor,x=t.constructor;if(k!=x&&("constructor"in e&&"constructor"in t)&&!(typeof k=="function"&&k instanceof k&&typeof x=="function"&&x instanceof x)){m=false}}a["delete"](e);a["delete"](t);return m}function Ra(e){return Is(_s(e,r,Ks),e+"")}function Pa(e){return zi(e,xf,$a)}function Ba(e){return zi(e,Of,Ya)}var Va=!ur?Pp:function(e){return ur.get(e)};function qa(e){var t=e.name+"",r=lr[t],n=ft.call(lr,t)?r.length:0;while(n--){var i=r[n],o=i.func;if(o==null||o==e){return i.name}}return t}function Wa(e){var t=ft.call(xn,"placeholder")?xn:e;return t.placeholder}function Ua(){var e=xn.iteratee||Ap;e=e===Ap?to:e;return arguments.length?e(arguments[0],arguments[1]):e}function Ha(e,t){var r=e.__data__;return ls(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ja(e){var t=xf(e),r=t.length;while(r--){var n=t[r],i=e[n];t[r]=[n,i,ds(i)]}return t}function Ga(e,t){var n=tn(e,t);return Xi(n)?n:r}function Ka(e){var t=ft.call(e,jt),n=e[jt];try{e[jt]=r;var i=true}catch(e){}var o=dt.call(e);if(i){if(t){e[jt]=n}else{delete e[jt]}}return o}var $a=!zt?Kp:function(e){if(e==null){return[]}e=rt(e);return wr(zt(e),(function(t){return Ot.call(e,t)}))};var Ya=!zt?Kp:function(e){var t=[];while(e){Tr(t,$a(e));e=kt(e)}return t};var Xa=Li;if(Zt&&Xa(new Zt(new ArrayBuffer(1)))!=ce||Qt&&Xa(new Qt)!=Y||rr&&Xa(rr.resolve())!=ee||nr&&Xa(new nr)!=ne||or&&Xa(new or)!=se){Xa=function(e){var t=Li(e),n=t==Q?e.constructor:r,i=n?As(n):"";if(i){switch(i){case Mr:return ce;case Nr:return Y;case Pr:return ee;case fn:return ne;case mn:return se}}return t}}function Za(e,t,r){var n=-1,i=r.length;while(++n<i){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Wt(t,e+a);break;case"takeRight":e=qt(e,t-a);break}}return{start:e,end:t}}function Qa(e){var t=e.match(Re);return t?t[1].split(Pe):[]}function es(e,t,r){t=Uo(t,e);var n=-1,i=t.length,o=false;while(++n<i){var a=Es(t[n]);if(!(o=e!=null&&r(e,a))){break}e=e[a]}if(o||++n!=i){return o}i=e==null?0:e.length;return!!i&&xc(i)&&as(a,i)&&(uc(e)||sc(e))}function ts(e){var t=e.length,r=new e.constructor(t);if(t&&typeof e[0]=="string"&&ft.call(e,"index")){r.index=e.index;r.input=e.input}return r}function rs(e){return typeof e.constructor=="function"&&!hs(e)?On(kt(e)):{}}function ns(e,t,r){var n=e.constructor;switch(t){case le:return $o(e);case U:case H:return new n(+e);case ce:return Yo(e,r);case fe:case pe:case he:case de:case ve:case ge:case me:case ye:case be:return Qo(e,r);case Y:return new n;case X:case ie:return new n(e);case re:return Xo(e);case ne:return new n;case oe:return Zo(e)}}function is(e,t){var r=t.length;if(!r){return e}var n=r-1;t[n]=(r>1?"& ":"")+t[n];t=t.join(r>2?", ":" ");return e.replace(Fe,"{\n/* [wrapped with "+t+"] */\n")}function os(e){return uc(e)||sc(e)||!!(It&&e&&e[It])}function as(e,t){var r=typeof e;t=t==null?C:t;return!!t&&(r=="number"||r!="symbol"&&$e.test(e))&&(e>-1&&e%1==0&&e<t)}function ss(e,t,r){if(!Oc(r)){return false}var n=typeof t;if(n=="number"?cc(r)&&as(t,r.length):n=="string"&&t in r){return ic(r[t],e)}return false}function us(e,t){if(uc(e)){return false}var r=typeof e;if(r=="number"||r=="symbol"||r=="boolean"||e==null||Pc(e)){return true}return Ee.test(e)||!Ne.test(e)||t!=null&&e in rt(t)}function ls(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function cs(e){var t=qa(e),r=xn[t];if(typeof r!="function"||!(t in Dn.prototype)){return false}if(e===r){return true}var n=Va(r);return!!n&&e===n[0]}function fs(e){return!!ht&&ht in e}var ps=lt?wc:$p;function hs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ut;return e===r}function ds(e){return e===e&&!Oc(e)}function vs(e,t){return function(n){if(n==null){return false}return n[e]===t&&(t!==r||e in rt(n))}}function gs(e){var t=Bl(e,(function(e){if(r.size===l){r.clear()}return e}));var r=t.cache;return t}function ms(e,t){var r=e[1],n=t[1],i=r|n,o=i<(g|m|x);var a=n==x&&r==b||n==x&&r==O&&e[7].length<=t[8]||n==(x|O)&&t[7].length<=t[8]&&r==b;if(!(o||a)){return e}if(n&g){e[2]=t[2];i|=r&g?0:y}var s=t[3];if(s){var u=e[3];e[3]=u?ra(u,s,t[4]):s;e[4]=u?un(e[3],c):t[4]}s=t[5];if(s){u=e[5];e[5]=u?na(u,s,t[6]):s;e[6]=u?un(e[5],c):t[6]}s=t[7];if(s){e[7]=s}if(n&x){e[8]=e[8]==null?t[8]:Wt(e[8],t[8])}if(e[9]==null){e[9]=t[9]}e[0]=t[0];e[1]=i;return e}function ys(e){var t=[];if(e!=null){for(var r in rt(e)){t.push(r)}}return t}function bs(e){return dt.call(e)}function _s(e,t,n){t=qt(t===r?e.length-1:t,0);return function(){var r=arguments,i=-1,o=qt(r.length-t,0),a=Le(o);while(++i<o){a[i]=r[t+i]}i=-1;var s=Le(t+1);while(++i<t){s[i]=r[i]}s[t]=n(a);return gr(e,this,s)}}function ws(e,t){return t.length<2?e:Ci(e,jo(t,0,-1))}function ks(e,t){var n=e.length,i=Wt(t.length,n),o=ia(e);while(i--){var a=t[i];e[i]=as(a,n)?o[a]:r}return e}function xs(e,t){if(t==="constructor"&&typeof e[t]==="function"){return}if(t=="__proto__"){return}return e[t]}var Os=js(To);var Ts=At||function(e,t){return ir.setTimeout(e,t)};var Is=js(Io);function Ds(e,t,r){var n=t+"";return Is(e,is(n,Ss(Qa(n),r)))}function js(e){var t=0,n=0;return function(){var i=Ut(),o=M-(i-n);n=i;if(o>0){if(++t>=j){return arguments[0]}}else{t=0}return e.apply(r,arguments)}}function Ms(e,t){var n=-1,i=e.length,o=i-1;t=t===r?i:t;while(++n<t){var a=yo(n,o),s=e[a];e[a]=e[n];e[n]=s}e.length=t;return e}var Ns=gs((function(e){var t=[];if(e.charCodeAt(0)===46){t.push("")}e.replace(Ae,(function(e,r,n,i){t.push(n?i.replace(qe,"$1"):r||e)}));return t}));function Es(e){if(typeof e=="string"||Pc(e)){return e}var t=e+"";return t=="0"&&1/e==-S?"-0":t}function As(e){if(e!=null){try{return ct.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ss(e,t){yr(B,(function(r){var n="_."+r[0];if(t&r[1]&&!kr(e,n)){e.push(n)}}));return e.sort()}function Cs(e){if(e instanceof Dn){return e.clone()}var t=new In(e.__wrapped__,e.__chain__);t.__actions__=ia(e.__actions__);t.__index__=e.__index__;t.__values__=e.__values__;return t}function zs(e,t,n){if(n?ss(e,t,n):t===r){t=1}else{t=qt(Kc(t),0)}var i=e==null?0:e.length;if(!i||t<1){return[]}var o=0,a=0,s=Le(St(i/t));while(o<i){s[a++]=jo(e,o,o+=t)}return s}function Ls(e){var t=-1,r=e==null?0:e.length,n=0,i=[];while(++t<r){var o=e[t];if(o){i[n++]=o}}return i}function Fs(){var e=arguments.length;if(!e){return[]}var t=Le(e-1),r=arguments[0],n=e;while(n--){t[n-1]=arguments[n]}return Tr(uc(r)?ia(r):[r],ji(t,1))}var Rs=wo((function(e,t){return fc(e)?wi(e,ji(t,1,fc,true)):[]}));var Ps=wo((function(e,t){var n=ou(t);if(fc(n)){n=r}return fc(e)?wi(e,ji(t,1,fc,true),Ua(n,2)):[]}));var Bs=wo((function(e,t){var n=ou(t);if(fc(n)){n=r}return fc(e)?wi(e,ji(t,1,fc,true),r,n):[]}));function Vs(e,t,n){var i=e==null?0:e.length;if(!i){return[]}t=n||t===r?1:Kc(t);return jo(e,t<0?0:t,i)}function qs(e,t,n){var i=e==null?0:e.length;if(!i){return[]}t=n||t===r?1:Kc(t);t=i-t;return jo(e,0,t<0?0:t)}function Ws(e,t){return e&&e.length?Ro(e,Ua(t,3),true,true):[]}function Us(e,t){return e&&e.length?Ro(e,Ua(t,3),true):[]}function Hs(e,t,r,n){var i=e==null?0:e.length;if(!i){return[]}if(r&&typeof r!="number"&&ss(e,t,r)){r=0;n=i}return Ii(e,t,r,n)}function Js(e,t,r){var n=e==null?0:e.length;if(!n){return-1}var i=r==null?0:Kc(r);if(i<0){i=qt(n+i,0)}return Sr(e,Ua(t,3),i)}function Gs(e,t,n){var i=e==null?0:e.length;if(!i){return-1}var o=i-1;if(n!==r){o=Kc(n);o=n<0?qt(i+o,0):Wt(o,i-1)}return Sr(e,Ua(t,3),o,true)}function Ks(e){var t=e==null?0:e.length;return t?ji(e,1):[]}function $s(e){var t=e==null?0:e.length;return t?ji(e,S):[]}function Ys(e,t){var n=e==null?0:e.length;if(!n){return[]}t=t===r?1:Kc(t);return ji(e,t)}function Xs(e){var t=-1,r=e==null?0:e.length,n={};while(++t<r){var i=e[t];n[i[0]]=i[1]}return n}function Zs(e){return e&&e.length?e[0]:r}function Qs(e,t,r){var n=e==null?0:e.length;if(!n){return-1}var i=r==null?0:Kc(r);if(i<0){i=qt(n+i,0)}return Cr(e,t,i)}function eu(e){var t=e==null?0:e.length;return t?jo(e,0,-1):[]}var tu=wo((function(e){var t=Or(e,qo);return t.length&&t[0]===e[0]?Vi(t):[]}));var ru=wo((function(e){var t=ou(e),n=Or(e,qo);if(t===ou(n)){t=r}else{n.pop()}return n.length&&n[0]===e[0]?Vi(n,Ua(t,2)):[]}));var nu=wo((function(e){var t=ou(e),n=Or(e,qo);t=typeof t=="function"?t:r;if(t){n.pop()}return n.length&&n[0]===e[0]?Vi(n,r,t):[]}));function iu(e,t){return e==null?"":Rt.call(e,t)}function ou(e){var t=e==null?0:e.length;return t?e[t-1]:r}function au(e,t,n){var i=e==null?0:e.length;if(!i){return-1}var o=i;if(n!==r){o=Kc(n);o=o<0?qt(i+o,0):Wt(o,i-1)}return t===t?pn(e,t,o):Sr(e,Lr,o,true)}function su(e,t){return e&&e.length?co(e,Kc(t)):r}var uu=wo(lu);function lu(e,t){return e&&e.length&&t&&t.length?go(e,t):e}function cu(e,t,r){return e&&e.length&&t&&t.length?go(e,t,Ua(r,2)):e}function fu(e,t,n){return e&&e.length&&t&&t.length?go(e,t,r,n):e}var pu=Ra((function(e,t){var r=e==null?0:e.length,n=vi(e,t);mo(e,Or(t,(function(e){return as(e,r)?+e:e})).sort(ea));return n}));function hu(e,t){var r=[];if(!(e&&e.length)){return r}var n=-1,i=[],o=e.length;t=Ua(t,3);while(++n<o){var a=e[n];if(t(a,n,e)){r.push(a);i.push(n)}}mo(e,i);return r}function du(e){return e==null?e:Xt.call(e)}function vu(e,t,n){var i=e==null?0:e.length;if(!i){return[]}if(n&&typeof n!="number"&&ss(e,t,n)){t=0;n=i}else{t=t==null?0:Kc(t);n=n===r?i:Kc(n)}return jo(e,t,n)}function gu(e,t){return No(e,t)}function mu(e,t,r){return Eo(e,t,Ua(r,2))}function yu(e,t){var r=e==null?0:e.length;if(r){var n=No(e,t);if(n<r&&ic(e[n],t)){return n}}return-1}function bu(e,t){return No(e,t,true)}function _u(e,t,r){return Eo(e,t,Ua(r,2),true)}function wu(e,t){var r=e==null?0:e.length;if(r){var n=No(e,t,true)-1;if(ic(e[n],t)){return n}}return-1}function ku(e){return e&&e.length?Ao(e):[]}function xu(e,t){return e&&e.length?Ao(e,Ua(t,2)):[]}function Ou(e){var t=e==null?0:e.length;return t?jo(e,1,t):[]}function Tu(e,t,n){if(!(e&&e.length)){return[]}t=n||t===r?1:Kc(t);return jo(e,0,t<0?0:t)}function Iu(e,t,n){var i=e==null?0:e.length;if(!i){return[]}t=n||t===r?1:Kc(t);t=i-t;return jo(e,t<0?0:t,i)}function Du(e,t){return e&&e.length?Ro(e,Ua(t,3),false,true):[]}function ju(e,t){return e&&e.length?Ro(e,Ua(t,3)):[]}var Mu=wo((function(e){return zo(ji(e,1,fc,true))}));var Nu=wo((function(e){var t=ou(e);if(fc(t)){t=r}return zo(ji(e,1,fc,true),Ua(t,2))}));var Eu=wo((function(e){var t=ou(e);t=typeof t=="function"?t:r;return zo(ji(e,1,fc,true),r,t)}));function Au(e){return e&&e.length?zo(e):[]}function Su(e,t){return e&&e.length?zo(e,Ua(t,2)):[]}function Cu(e,t){t=typeof t=="function"?t:r;return e&&e.length?zo(e,r,t):[]}function zu(e){if(!(e&&e.length)){return[]}var t=0;e=wr(e,(function(e){if(fc(e)){t=qt(e.length,t);return true}}));return Wr(t,(function(t){return Or(e,Rr(t))}))}function Lu(e,t){if(!(e&&e.length)){return[]}var n=zu(e);if(t==null){return n}return Or(n,(function(e){return gr(t,r,e)}))}var Fu=wo((function(e,t){return fc(e)?wi(e,t):[]}));var Ru=wo((function(e){return Bo(wr(e,fc))}));var Pu=wo((function(e){var t=ou(e);if(fc(t)){t=r}return Bo(wr(e,fc),Ua(t,2))}));var Bu=wo((function(e){var t=ou(e);t=typeof t=="function"?t:r;return Bo(wr(e,fc),r,t)}));var Vu=wo(zu);function qu(e,t){return Vo(e||[],t||[],li)}function Wu(e,t){return Vo(e||[],t||[],Oo)}var Uu=wo((function(e){var t=e.length,n=t>1?e[t-1]:r;n=typeof n=="function"?(e.pop(),n):r;return Lu(e,n)}));function Hu(e){var t=xn(e);t.__chain__=true;return t}function Ju(e,t){t(e);return e}function Gu(e,t){return t(e)}var Ku=Ra((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return vi(t,e)};if(t>1||this.__actions__.length||!(i instanceof Dn)||!as(n)){return this.thru(o)}i=i.slice(n,+n+(t?1:0));i.__actions__.push({func:Gu,args:[o],thisArg:r});return new In(i,this.__chain__).thru((function(e){if(t&&!e.length){e.push(r)}return e}))}));function $u(){return Hu(this)}function Yu(){return new In(this.value(),this.__chain__)}function Xu(){if(this.__values__===r){this.__values__=Jc(this.value())}var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Zu(){return this}function Qu(e){var t,n=this;while(n instanceof Tn){var i=Cs(n);i.__index__=0;i.__values__=r;if(t){o.__wrapped__=i}else{t=i}var o=i;n=n.__wrapped__}o.__wrapped__=e;return t}function el(){var e=this.__wrapped__;if(e instanceof Dn){var t=e;if(this.__actions__.length){t=new Dn(this)}t=t.reverse();t.__actions__.push({func:Gu,args:[du],thisArg:r});return new In(t,this.__chain__)}return this.thru(du)}function tl(){return Po(this.__wrapped__,this.__actions__)}var rl=ua((function(e,t,r){if(ft.call(e,r)){++e[r]}else{di(e,r,1)}}));function nl(e,t,n){var i=uc(e)?_r:Oi;if(n&&ss(e,t,n)){t=r}return i(e,Ua(t,3))}function il(e,t){var r=uc(e)?wr:Di;return r(e,Ua(t,3))}var ol=ma(Js);var al=ma(Gs);function sl(e,t){return ji(gl(e,t),1)}function ul(e,t){return ji(gl(e,t),S)}function ll(e,t,n){n=n===r?1:Kc(n);return ji(gl(e,t),n)}function cl(e,t){var r=uc(e)?yr:ki;return r(e,Ua(t,3))}function fl(e,t){var r=uc(e)?br:xi;return r(e,Ua(t,3))}var pl=ua((function(e,t,r){if(ft.call(e,r)){e[r].push(t)}else{di(e,r,[t])}}));function hl(e,t,r,n){e=cc(e)?e:qf(e);r=r&&!n?Kc(r):0;var i=e.length;if(r<0){r=qt(i+r,0)}return Rc(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Cr(e,t,r)>-1}var dl=wo((function(e,t,r){var n=-1,i=typeof t=="function",o=cc(e)?Le(e.length):[];ki(e,(function(e){o[++n]=i?gr(t,e,r):Wi(e,t,r)}));return o}));var vl=ua((function(e,t,r){di(e,r,t)}));function gl(e,t){var r=uc(e)?Or:oo;return r(e,Ua(t,3))}function ml(e,t,n,i){if(e==null){return[]}if(!uc(t)){t=t==null?[]:[t]}n=i?r:n;if(!uc(n)){n=n==null?[]:[n]}return fo(e,t,n)}var yl=ua((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));function bl(e,t,r){var n=uc(e)?Ir:Br,i=arguments.length<3;return n(e,Ua(t,4),r,i,ki)}function _l(e,t,r){var n=uc(e)?Dr:Br,i=arguments.length<3;return n(e,Ua(t,4),r,i,xi)}function wl(e,t){var r=uc(e)?wr:Di;return r(e,Vl(Ua(t,3)))}function kl(e){var t=uc(e)?oi:ko;return t(e)}function xl(e,t,n){if(n?ss(e,t,n):t===r){t=1}else{t=Kc(t)}var i=uc(e)?ai:xo;return i(e,t)}function Ol(e){var t=uc(e)?si:Do;return t(e)}function Tl(e){if(e==null){return 0}if(cc(e)){return Rc(e)?hn(e):e.length}var t=Xa(e);if(t==Y||t==ne){return e.size}return ro(e).length}function Il(e,t,n){var i=uc(e)?jr:Mo;if(n&&ss(e,t,n)){t=r}return i(e,Ua(t,3))}var Dl=wo((function(e,t){if(e==null){return[]}var r=t.length;if(r>1&&ss(e,t[0],t[1])){t=[]}else if(r>2&&ss(t[0],t[1],t[2])){t=[t[0]]}return fo(e,ji(t,1),[])}));var jl=Et||function(){return ir.Date.now()};function Ml(e,t){if(typeof t!="function"){throw new ot(a)}e=Kc(e);return function(){if(--e<1){return t.apply(this,arguments)}}}function Nl(e,t,n){t=n?r:t;t=e&&t==null?e.length:t;return Ea(e,x,r,r,r,r,t)}function El(e,t){var n;if(typeof t!="function"){throw new ot(a)}e=Kc(e);return function(){if(--e>0){n=t.apply(this,arguments)}if(e<=1){t=r}return n}}var Al=wo((function(e,t,r){var n=g;if(r.length){var i=un(r,Wa(Al));n|=w}return Ea(e,n,t,r,i)}));var Sl=wo((function(e,t,r){var n=g|m;if(r.length){var i=un(r,Wa(Sl));n|=w}return Ea(t,n,e,r,i)}));function Cl(e,t,n){t=n?r:t;var i=Ea(e,b,r,r,r,r,r,t);i.placeholder=Cl.placeholder;return i}function zl(e,t,n){t=n?r:t;var i=Ea(e,_,r,r,r,r,r,t);i.placeholder=zl.placeholder;return i}function Ll(e,t,n){var i,o,s,u,l,c,f=0,p=false,h=false,d=true;if(typeof e!="function"){throw new ot(a)}t=Yc(t)||0;if(Oc(n)){p=!!n.leading;h="maxWait"in n;s=h?qt(Yc(n.maxWait)||0,t):s;d="trailing"in n?!!n.trailing:d}function v(t){var n=i,a=o;i=o=r;f=t;u=e.apply(a,n);return u}function g(e){f=e;l=Ts(b,t);return p?v(e):u}function m(e){var r=e-c,n=e-f,i=t-r;return h?Wt(i,s-n):i}function y(e){var n=e-c,i=e-f;return c===r||n>=t||n<0||h&&i>=s}function b(){var e=jl();if(y(e)){return _(e)}l=Ts(b,m(e))}function _(e){l=r;if(d&&i){return v(e)}i=o=r;return u}function w(){if(l!==r){Go(l)}f=0;i=c=o=l=r}function k(){return l===r?u:_(jl())}function x(){var e=jl(),n=y(e);i=arguments;o=this;c=e;if(n){if(l===r){return g(c)}if(h){Go(l);l=Ts(b,t);return v(c)}}if(l===r){l=Ts(b,t)}return u}x.cancel=w;x.flush=k;return x}var Fl=wo((function(e,t){return _i(e,1,t)}));var Rl=wo((function(e,t,r){return _i(e,Yc(t)||0,r)}));function Pl(e){return Ea(e,T)}function Bl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function"){throw new ot(a)}var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i)){return o.get(i)}var a=e.apply(this,n);r.cache=o.set(i,a)||o;return a};r.cache=new(Bl.Cache||Wn);return r}Bl.Cache=Wn;function Vl(e){if(typeof e!="function"){throw new ot(a)}return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function ql(e){return El(2,e)}var Wl=Ho((function(e,t){t=t.length==1&&uc(t[0])?Or(t[0],Jr(Ua())):Or(ji(t,1),Jr(Ua()));var r=t.length;return wo((function(n){var i=-1,o=Wt(n.length,r);while(++i<o){n[i]=t[i].call(this,n[i])}return gr(e,this,n)}))}));var Ul=wo((function(e,t){var n=un(t,Wa(Ul));return Ea(e,w,r,t,n)}));var Hl=wo((function(e,t){var n=un(t,Wa(Hl));return Ea(e,k,r,t,n)}));var Jl=Ra((function(e,t){return Ea(e,O,r,r,r,t)}));function Gl(e,t){if(typeof e!="function"){throw new ot(a)}t=t===r?t:Kc(t);return wo(e,t)}function Kl(e,t){if(typeof e!="function"){throw new ot(a)}t=t==null?0:qt(Kc(t),0);return wo((function(r){var n=r[t],i=Jo(r,0,t);if(n){Tr(i,n)}return gr(e,this,i)}))}function $l(e,t,r){var n=true,i=true;if(typeof e!="function"){throw new ot(a)}if(Oc(r)){n="leading"in r?!!r.leading:n;i="trailing"in r?!!r.trailing:i}return Ll(e,t,{leading:n,maxWait:t,trailing:i})}function Yl(e){return Nl(e,1)}function Xl(e,t){return Ul(Wo(t),e)}function Zl(){if(!arguments.length){return[]}var e=arguments[0];return uc(e)?e:[e]}function Ql(e){return mi(e,h)}function ec(e,t){t=typeof t=="function"?t:r;return mi(e,h,t)}function tc(e){return mi(e,f|h)}function rc(e,t){t=typeof t=="function"?t:r;return mi(e,f|h,t)}function nc(e,t){return t==null||bi(e,t,xf(t))}function ic(e,t){return e===t||e!==e&&t!==t}var oc=Ia(Fi);var ac=Ia((function(e,t){return e>=t}));var sc=Ui(function(){return arguments}())?Ui:function(e){return Tc(e)&&ft.call(e,"callee")&&!Ot.call(e,"callee")};var uc=Le.isArray;var lc=cr?Jr(cr):Hi;function cc(e){return e!=null&&xc(e.length)&&!wc(e)}function fc(e){return Tc(e)&&cc(e)}function pc(e){return e===true||e===false||Tc(e)&&Li(e)==U}var hc=Lt||$p;var dc=fr?Jr(fr):Ji;function vc(e){return Tc(e)&&e.nodeType===1&&!Cc(e)}function gc(e){if(e==null){return true}if(cc(e)&&(uc(e)||typeof e=="string"||typeof e.splice=="function"||hc(e)||Bc(e)||sc(e))){return!e.length}var t=Xa(e);if(t==Y||t==ne){return!e.size}if(hs(e)){return!ro(e).length}for(var r in e){if(ft.call(e,r)){return false}}return true}function mc(e,t){return Gi(e,t)}function yc(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?Gi(e,t,r,n):!!i}function bc(e){if(!Tc(e)){return false}var t=Li(e);return t==G||t==J||typeof e.message=="string"&&typeof e.name=="string"&&!Cc(e)}function _c(e){return typeof e=="number"&&Ft(e)}function wc(e){if(!Oc(e)){return false}var t=Li(e);return t==K||t==$||t==W||t==te}function kc(e){return typeof e=="number"&&e==Kc(e)}function xc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=C}function Oc(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Tc(e){return e!=null&&typeof e=="object"}var Ic=pr?Jr(pr):$i;function Dc(e,t){return e===t||Yi(e,t,Ja(t))}function jc(e,t,n){n=typeof n=="function"?n:r;return Yi(e,t,Ja(t),n)}function Mc(e){return Sc(e)&&e!=+e}function Nc(e){if(ps(e)){throw new Qe(o)}return Xi(e)}function Ec(e){return e===null}function Ac(e){return e==null}function Sc(e){return typeof e=="number"||Tc(e)&&Li(e)==X}function Cc(e){if(!Tc(e)||Li(e)!=Q){return false}var t=kt(e);if(t===null){return true}var r=ft.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ct.call(r)==vt}var zc=hr?Jr(hr):Zi;function Lc(e){return kc(e)&&e>=-C&&e<=C}var Fc=dr?Jr(dr):Qi;function Rc(e){return typeof e=="string"||!uc(e)&&Tc(e)&&Li(e)==ie}function Pc(e){return typeof e=="symbol"||Tc(e)&&Li(e)==oe}var Bc=vr?Jr(vr):eo;function Vc(e){return e===r}function qc(e){return Tc(e)&&Xa(e)==se}function Wc(e){return Tc(e)&&Li(e)==ue}var Uc=Ia(io);var Hc=Ia((function(e,t){return e<=t}));function Jc(e){if(!e){return[]}if(cc(e)){return Rc(e)?dn(e):ia(e)}if(Dt&&e[Dt]){return on(e[Dt]())}var t=Xa(e),r=t==Y?an:t==ne?ln:qf;return r(e)}function Gc(e){if(!e){return e===0?e:0}e=Yc(e);if(e===S||e===-S){var t=e<0?-1:1;return t*z}return e===e?e:0}function Kc(e){var t=Gc(e),r=t%1;return t===t?r?t-r:t:0}function $c(e){return e?gi(Kc(e),0,F):0}function Yc(e){if(typeof e=="number"){return e}if(Pc(e)){return L}if(Oc(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Oc(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=Hr(e);var r=Je.test(e);return r||Ke.test(e)?tr(e.slice(2),r?2:8):He.test(e)?L:+e}function Xc(e){return oa(e,Of(e))}function Zc(e){return e?gi(Kc(e),-C,C):e===0?e:0}function Qc(e){return e==null?"":Co(e)}var ef=la((function(e,t){if(hs(t)||cc(t)){oa(t,xf(t),e);return}for(var r in t){if(ft.call(t,r)){li(e,r,t[r])}}}));var tf=la((function(e,t){oa(t,Of(t),e)}));var rf=la((function(e,t,r,n){oa(t,Of(t),e,n)}));var nf=la((function(e,t,r,n){oa(t,xf(t),e,n)}));var of=Ra(vi);function af(e,t){var r=On(e);return t==null?r:pi(r,t)}var sf=wo((function(e,t){e=rt(e);var n=-1;var i=t.length;var o=i>2?t[2]:r;if(o&&ss(t[0],t[1],o)){i=1}while(++n<i){var a=t[n];var s=Of(a);var u=-1;var l=s.length;while(++u<l){var c=s[u];var f=e[c];if(f===r||ic(f,ut[c])&&!ft.call(e,c)){e[c]=a[c]}}}return e}));var uf=wo((function(e){e.push(r,Sa);return gr(jf,r,e)}));function lf(e,t){return Ar(e,Ua(t,3),Ei)}function cf(e,t){return Ar(e,Ua(t,3),Ai)}function ff(e,t){return e==null?e:Mi(e,Ua(t,3),Of)}function pf(e,t){return e==null?e:Ni(e,Ua(t,3),Of)}function hf(e,t){return e&&Ei(e,Ua(t,3))}function df(e,t){return e&&Ai(e,Ua(t,3))}function vf(e){return e==null?[]:Si(e,xf(e))}function gf(e){return e==null?[]:Si(e,Of(e))}function mf(e,t,n){var i=e==null?r:Ci(e,t);return i===r?n:i}function yf(e,t){return e!=null&&es(e,t,Ri)}function bf(e,t){return e!=null&&es(e,t,Pi)}var _f=_a((function(e,t,r){if(t!=null&&typeof t.toString!="function"){t=dt.call(t)}e[t]=r}),Dp(Ep));var wf=_a((function(e,t,r){if(t!=null&&typeof t.toString!="function"){t=dt.call(t)}if(ft.call(e,t)){e[t].push(r)}else{e[t]=[r]}}),Ua);var kf=wo(Wi);function xf(e){return cc(e)?ii(e):ro(e)}function Of(e){return cc(e)?ii(e,true):no(e)}function Tf(e,t){var r={};t=Ua(t,3);Ei(e,(function(e,n,i){di(r,t(e,n,i),e)}));return r}function If(e,t){var r={};t=Ua(t,3);Ei(e,(function(e,n,i){di(r,n,t(e,n,i))}));return r}var Df=la((function(e,t,r){uo(e,t,r)}));var jf=la((function(e,t,r,n){uo(e,t,r,n)}));var Mf=Ra((function(e,t){var r={};if(e==null){return r}var n=false;t=Or(t,(function(t){t=Uo(t,e);n||(n=t.length>1);return t}));oa(e,Ba(e),r);if(n){r=mi(r,f|p|h,Ca)}var i=t.length;while(i--){Lo(r,t[i])}return r}));function Nf(e,t){return Af(e,Vl(Ua(t)))}var Ef=Ra((function(e,t){return e==null?{}:po(e,t)}));function Af(e,t){if(e==null){return{}}var r=Or(Ba(e),(function(e){return[e]}));t=Ua(t);return ho(e,r,(function(e,r){return t(e,r[0])}))}function Sf(e,t,n){t=Uo(t,e);var i=-1,o=t.length;if(!o){o=1;e=r}while(++i<o){var a=e==null?r:e[Es(t[i])];if(a===r){i=o;a=n}e=wc(a)?a.call(e):a}return e}function Cf(e,t,r){return e==null?e:Oo(e,t,r)}function zf(e,t,n,i){i=typeof i=="function"?i:r;return e==null?e:Oo(e,t,n,i)}var Lf=Na(xf);var Ff=Na(Of);function Rf(e,t,r){var n=uc(e),i=n||hc(e)||Bc(e);t=Ua(t,4);if(r==null){var o=e&&e.constructor;if(i){r=n?new o:[]}else if(Oc(e)){r=wc(o)?On(kt(e)):{}}else{r={}}}(i?yr:Ei)(e,(function(e,n,i){return t(r,e,n,i)}));return r}function Pf(e,t){return e==null?true:Lo(e,t)}function Bf(e,t,r){return e==null?e:Fo(e,t,Wo(r))}function Vf(e,t,n,i){i=typeof i=="function"?i:r;return e==null?e:Fo(e,t,Wo(n),i)}function qf(e){return e==null?[]:Gr(e,xf(e))}function Wf(e){return e==null?[]:Gr(e,Of(e))}function Uf(e,t,n){if(n===r){n=t;t=r}if(n!==r){n=Yc(n);n=n===n?n:0}if(t!==r){t=Yc(t);t=t===t?t:0}return gi(Yc(e),t,n)}function Hf(e,t,n){t=Gc(t);if(n===r){n=t;t=0}else{n=Gc(n)}e=Yc(e);return Bi(e,t,n)}function Jf(e,t,n){if(n&&typeof n!="boolean"&&ss(e,t,n)){t=n=r}if(n===r){if(typeof t=="boolean"){n=t;t=r}else if(typeof e=="boolean"){n=e;e=r}}if(e===r&&t===r){e=0;t=1}else{e=Gc(e);if(t===r){t=e;e=0}else{t=Gc(t)}}if(e>t){var i=e;e=t;t=i}if(n||e%1||t%1){var o=Yt();return Wt(e+o*(t-e+er("1e-"+((o+"").length-1))),t)}return yo(e,t)}var Gf=da((function(e,t,r){t=t.toLowerCase();return e+(r?Kf(t):t)}));function Kf(e){return wp(Qc(e).toLowerCase())}function $f(e){e=Qc(e);return e&&e.replace(Ye,Zr).replace(Vt,"")}function Yf(e,t,n){e=Qc(e);t=Co(t);var i=e.length;n=n===r?i:gi(Kc(n),0,i);var o=n;n-=t.length;return n>=0&&e.slice(n,o)==t}function Xf(e){e=Qc(e);return e&&Ie.test(e)?e.replace(Oe,Qr):e}function Zf(e){e=Qc(e);return e&&Ce.test(e)?e.replace(Se,"\\$&"):e}var Qf=da((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}));var ep=da((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}));var tp=ha("toLowerCase");function rp(e,t,r){e=Qc(e);t=Kc(t);var n=t?hn(e):0;if(!t||n>=t){return e}var i=(t-n)/2;return xa(Ct(i),r)+e+xa(St(i),r)}function np(e,t,r){e=Qc(e);t=Kc(t);var n=t?hn(e):0;return t&&n<t?e+xa(t-n,r):e}function ip(e,t,r){e=Qc(e);t=Kc(t);var n=t?hn(e):0;return t&&n<t?xa(t-n,r)+e:e}function op(e,t,r){if(r||t==null){t=0}else if(t){t=+t}return Ht(Qc(e).replace(ze,""),t||0)}function ap(e,t,n){if(n?ss(e,t,n):t===r){t=1}else{t=Kc(t)}return _o(Qc(e),t)}function sp(){var e=arguments,t=Qc(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var up=da((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));function lp(e,t,n){if(n&&typeof n!="number"&&ss(e,t,n)){t=n=r}n=n===r?F:n>>>0;if(!n){return[]}e=Qc(e);if(e&&(typeof t=="string"||t!=null&&!zc(t))){t=Co(t);if(!t&&rn(e)){return Jo(dn(e),0,n)}}return e.split(t,n)}var cp=da((function(e,t,r){return e+(r?" ":"")+wp(t)}));function fp(e,t,r){e=Qc(e);r=r==null?0:gi(Kc(r),0,e.length);t=Co(t);return e.slice(r,r+t.length)==t}function pp(e,t,n){var i=xn.templateSettings;if(n&&ss(e,t,n)){t=r}e=Qc(e);t=rf({},t,i,Aa);var o=rf({},t.imports,i.imports,Aa),a=xf(o),u=Gr(o,a);var l,c,f=0,p=t.interpolate||Xe,h="__p += '";var d=nt((t.escape||Xe).source+"|"+p.source+"|"+(p===Me?We:Xe).source+"|"+(t.evaluate||Xe).source+"|$","g");var v="//# sourceURL="+(ft.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gt+"]")+"\n";e.replace(d,(function(t,r,n,i,o,a){n||(n=i);h+=e.slice(f,a).replace(Ze,en);if(r){l=true;h+="' +\n__e("+r+") +\n'"}if(o){c=true;h+="';\n"+o+";\n__p += '"}if(n){h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}f=a+t.length;return t}));h+="';\n";var g=ft.call(t,"variable")&&t.variable;if(!g){h="with (obj) {\n"+h+"\n}\n"}else if(Ve.test(g)){throw new Qe(s)}h=(c?h.replace(_e,""):h).replace(we,"$1").replace(ke,"$1;");h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(l?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=xp((function(){return et(a,v+"return "+h).apply(r,u)}));m.source=h;if(bc(m)){throw m}return m}function hp(e){return Qc(e).toLowerCase()}function dp(e){return Qc(e).toUpperCase()}function vp(e,t,n){e=Qc(e);if(e&&(n||t===r)){return Hr(e)}if(!e||!(t=Co(t))){return e}var i=dn(e),o=dn(t),a=$r(i,o),s=Yr(i,o)+1;return Jo(i,a,s).join("")}function gp(e,t,n){e=Qc(e);if(e&&(n||t===r)){return e.slice(0,vn(e)+1)}if(!e||!(t=Co(t))){return e}var i=dn(e),o=Yr(i,dn(t))+1;return Jo(i,0,o).join("")}function mp(e,t,n){e=Qc(e);if(e&&(n||t===r)){return e.replace(ze,"")}if(!e||!(t=Co(t))){return e}var i=dn(e),o=$r(i,dn(t));return Jo(i,o).join("")}function yp(e,t){var n=I,i=D;if(Oc(t)){var o="separator"in t?t.separator:o;n="length"in t?Kc(t.length):n;i="omission"in t?Co(t.omission):i}e=Qc(e);var a=e.length;if(rn(e)){var s=dn(e);a=s.length}if(n>=a){return e}var u=n-hn(i);if(u<1){return i}var l=s?Jo(s,0,u).join(""):e.slice(0,u);if(o===r){return l+i}if(s){u+=l.length-u}if(zc(o)){if(e.slice(u).search(o)){var c,f=l;if(!o.global){o=nt(o.source,Qc(Ue.exec(o))+"g")}o.lastIndex=0;while(c=o.exec(f)){var p=c.index}l=l.slice(0,p===r?u:p)}}else if(e.indexOf(Co(o),u)!=u){var h=l.lastIndexOf(o);if(h>-1){l=l.slice(0,h)}}return l+i}function bp(e){e=Qc(e);return e&&Te.test(e)?e.replace(xe,gn):e}var _p=da((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}));var wp=ha("toUpperCase");function kp(e,t,n){e=Qc(e);t=n?r:t;if(t===r){return nn(e)?bn(e):Er(e)}return e.match(t)||[]}var xp=wo((function(e,t){try{return gr(e,r,t)}catch(e){return bc(e)?e:new Qe(e)}}));var Op=Ra((function(e,t){yr(t,(function(t){t=Es(t);di(e,t,Al(e[t],e))}));return e}));function Tp(e){var t=e==null?0:e.length,r=Ua();e=!t?[]:Or(e,(function(e){if(typeof e[1]!="function"){throw new ot(a)}return[r(e[0]),e[1]]}));return wo((function(r){var n=-1;while(++n<t){var i=e[n];if(gr(i[0],this,r)){return gr(i[1],this,r)}}}))}function Ip(e){return yi(mi(e,f))}function Dp(e){return function(){return e}}function jp(e,t){return e==null||e!==e?t:e}var Mp=ya();var Np=ya(true);function Ep(e){return e}function Ap(e){return to(typeof e=="function"?e:mi(e,f))}function Sp(e){return ao(mi(e,f))}function Cp(e,t){return so(e,mi(t,f))}var zp=wo((function(e,t){return function(r){return Wi(r,e,t)}}));var Lp=wo((function(e,t){return function(r){return Wi(e,r,t)}}));function Fp(e,t,r){var n=xf(t),i=Si(t,n);if(r==null&&!(Oc(t)&&(i.length||!n.length))){r=t;t=e;e=this;i=Si(t,xf(t))}var o=!(Oc(r)&&"chain"in r)||!!r.chain,a=wc(e);yr(i,(function(r){var n=t[r];e[r]=n;if(a){e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=ia(this.__actions__);i.push({func:n,args:arguments,thisArg:e});r.__chain__=t;return r}return n.apply(e,Tr([this.value()],arguments))}}}));return e}function Rp(){if(ir._===this){ir._=gt}return this}function Pp(){}function Bp(e){e=Kc(e);return wo((function(t){return co(t,e)}))}var Vp=ka(Or);var qp=ka(_r);var Wp=ka(jr);function Up(e){return us(e)?Rr(Es(e)):vo(e)}function Hp(e){return function(t){return e==null?r:Ci(e,t)}}var Jp=Ta();var Gp=Ta(true);function Kp(){return[]}function $p(){return false}function Yp(){return{}}function Xp(){return""}function Zp(){return true}function Qp(e,t){e=Kc(e);if(e<1||e>C){return[]}var r=F,n=Wt(e,F);t=Ua(t);e-=F;var i=Wr(n,t);while(++r<e){t(r)}return i}function eh(e){if(uc(e)){return Or(e,Es)}return Pc(e)?[e]:ia(Ns(Qc(e)))}function th(e){var t=++pt;return Qc(e)+t}var rh=wa((function(e,t){return e+t}),0);var nh=ja("ceil");var ih=wa((function(e,t){return e/t}),1);var oh=ja("floor");function ah(e){return e&&e.length?Ti(e,Ep,Fi):r}function sh(e,t){return e&&e.length?Ti(e,Ua(t,2),Fi):r}function uh(e){return Fr(e,Ep)}function lh(e,t){return Fr(e,Ua(t,2))}function ch(e){return e&&e.length?Ti(e,Ep,io):r}function fh(e,t){return e&&e.length?Ti(e,Ua(t,2),io):r}var ph=wa((function(e,t){return e*t}),1);var hh=ja("round");var dh=wa((function(e,t){return e-t}),0);function vh(e){return e&&e.length?qr(e,Ep):0}function gh(e,t){return e&&e.length?qr(e,Ua(t,2)):0}xn.after=Ml;xn.ary=Nl;xn.assign=ef;xn.assignIn=tf;xn.assignInWith=rf;xn.assignWith=nf;xn.at=of;xn.before=El;xn.bind=Al;xn.bindAll=Op;xn.bindKey=Sl;xn.castArray=Zl;xn.chain=Hu;xn.chunk=zs;xn.compact=Ls;xn.concat=Fs;xn.cond=Tp;xn.conforms=Ip;xn.constant=Dp;xn.countBy=rl;xn.create=af;xn.curry=Cl;xn.curryRight=zl;xn.debounce=Ll;xn.defaults=sf;xn.defaultsDeep=uf;xn.defer=Fl;xn.delay=Rl;xn.difference=Rs;xn.differenceBy=Ps;xn.differenceWith=Bs;xn.drop=Vs;xn.dropRight=qs;xn.dropRightWhile=Ws;xn.dropWhile=Us;xn.fill=Hs;xn.filter=il;xn.flatMap=sl;xn.flatMapDeep=ul;xn.flatMapDepth=ll;xn.flatten=Ks;xn.flattenDeep=$s;xn.flattenDepth=Ys;xn.flip=Pl;xn.flow=Mp;xn.flowRight=Np;xn.fromPairs=Xs;xn.functions=vf;xn.functionsIn=gf;xn.groupBy=pl;xn.initial=eu;xn.intersection=tu;xn.intersectionBy=ru;xn.intersectionWith=nu;xn.invert=_f;xn.invertBy=wf;xn.invokeMap=dl;xn.iteratee=Ap;xn.keyBy=vl;xn.keys=xf;xn.keysIn=Of;xn.map=gl;xn.mapKeys=Tf;xn.mapValues=If;xn.matches=Sp;xn.matchesProperty=Cp;xn.memoize=Bl;xn.merge=Df;xn.mergeWith=jf;xn.method=zp;xn.methodOf=Lp;xn.mixin=Fp;xn.negate=Vl;xn.nthArg=Bp;xn.omit=Mf;xn.omitBy=Nf;xn.once=ql;xn.orderBy=ml;xn.over=Vp;xn.overArgs=Wl;xn.overEvery=qp;xn.overSome=Wp;xn.partial=Ul;xn.partialRight=Hl;xn.partition=yl;xn.pick=Ef;xn.pickBy=Af;xn.property=Up;xn.propertyOf=Hp;xn.pull=uu;xn.pullAll=lu;xn.pullAllBy=cu;xn.pullAllWith=fu;xn.pullAt=pu;xn.range=Jp;xn.rangeRight=Gp;xn.rearg=Jl;xn.reject=wl;xn.remove=hu;xn.rest=Gl;xn.reverse=du;xn.sampleSize=xl;xn.set=Cf;xn.setWith=zf;xn.shuffle=Ol;xn.slice=vu;xn.sortBy=Dl;xn.sortedUniq=ku;xn.sortedUniqBy=xu;xn.split=lp;xn.spread=Kl;xn.tail=Ou;xn.take=Tu;xn.takeRight=Iu;xn.takeRightWhile=Du;xn.takeWhile=ju;xn.tap=Ju;xn.throttle=$l;xn.thru=Gu;xn.toArray=Jc;xn.toPairs=Lf;xn.toPairsIn=Ff;xn.toPath=eh;xn.toPlainObject=Xc;xn.transform=Rf;xn.unary=Yl;xn.union=Mu;xn.unionBy=Nu;xn.unionWith=Eu;xn.uniq=Au;xn.uniqBy=Su;xn.uniqWith=Cu;xn.unset=Pf;xn.unzip=zu;xn.unzipWith=Lu;xn.update=Bf;xn.updateWith=Vf;xn.values=qf;xn.valuesIn=Wf;xn.without=Fu;xn.words=kp;xn.wrap=Xl;xn.xor=Ru;xn.xorBy=Pu;xn.xorWith=Bu;xn.zip=Vu;xn.zipObject=qu;xn.zipObjectDeep=Wu;xn.zipWith=Uu;xn.entries=Lf;xn.entriesIn=Ff;xn.extend=tf;xn.extendWith=rf;Fp(xn,xn);xn.add=rh;xn.attempt=xp;xn.camelCase=Gf;xn.capitalize=Kf;xn.ceil=nh;xn.clamp=Uf;xn.clone=Ql;xn.cloneDeep=tc;xn.cloneDeepWith=rc;xn.cloneWith=ec;xn.conformsTo=nc;xn.deburr=$f;xn.defaultTo=jp;xn.divide=ih;xn.endsWith=Yf;xn.eq=ic;xn.escape=Xf;xn.escapeRegExp=Zf;xn.every=nl;xn.find=ol;xn.findIndex=Js;xn.findKey=lf;xn.findLast=al;xn.findLastIndex=Gs;xn.findLastKey=cf;xn.floor=oh;xn.forEach=cl;xn.forEachRight=fl;xn.forIn=ff;xn.forInRight=pf;xn.forOwn=hf;xn.forOwnRight=df;xn.get=mf;xn.gt=oc;xn.gte=ac;xn.has=yf;xn.hasIn=bf;xn.head=Zs;xn.identity=Ep;xn.includes=hl;xn.indexOf=Qs;xn.inRange=Hf;xn.invoke=kf;xn.isArguments=sc;xn.isArray=uc;xn.isArrayBuffer=lc;xn.isArrayLike=cc;xn.isArrayLikeObject=fc;xn.isBoolean=pc;xn.isBuffer=hc;xn.isDate=dc;xn.isElement=vc;xn.isEmpty=gc;xn.isEqual=mc;xn.isEqualWith=yc;xn.isError=bc;xn.isFinite=_c;xn.isFunction=wc;xn.isInteger=kc;xn.isLength=xc;xn.isMap=Ic;xn.isMatch=Dc;xn.isMatchWith=jc;xn.isNaN=Mc;xn.isNative=Nc;xn.isNil=Ac;xn.isNull=Ec;xn.isNumber=Sc;xn.isObject=Oc;xn.isObjectLike=Tc;xn.isPlainObject=Cc;xn.isRegExp=zc;xn.isSafeInteger=Lc;xn.isSet=Fc;xn.isString=Rc;xn.isSymbol=Pc;xn.isTypedArray=Bc;xn.isUndefined=Vc;xn.isWeakMap=qc;xn.isWeakSet=Wc;xn.join=iu;xn.kebabCase=Qf;xn.last=ou;xn.lastIndexOf=au;xn.lowerCase=ep;xn.lowerFirst=tp;xn.lt=Uc;xn.lte=Hc;xn.max=ah;xn.maxBy=sh;xn.mean=uh;xn.meanBy=lh;xn.min=ch;xn.minBy=fh;xn.stubArray=Kp;xn.stubFalse=$p;xn.stubObject=Yp;xn.stubString=Xp;xn.stubTrue=Zp;xn.multiply=ph;xn.nth=su;xn.noConflict=Rp;xn.noop=Pp;xn.now=jl;xn.pad=rp;xn.padEnd=np;xn.padStart=ip;xn.parseInt=op;xn.random=Jf;xn.reduce=bl;xn.reduceRight=_l;xn.repeat=ap;xn.replace=sp;xn.result=Sf;xn.round=hh;xn.runInContext=e;xn.sample=kl;xn.size=Tl;xn.snakeCase=up;xn.some=Il;xn.sortedIndex=gu;xn.sortedIndexBy=mu;xn.sortedIndexOf=yu;xn.sortedLastIndex=bu;xn.sortedLastIndexBy=_u;xn.sortedLastIndexOf=wu;xn.startCase=cp;xn.startsWith=fp;xn.subtract=dh;xn.sum=vh;xn.sumBy=gh;xn.template=pp;xn.times=Qp;xn.toFinite=Gc;xn.toInteger=Kc;xn.toLength=$c;xn.toLower=hp;xn.toNumber=Yc;xn.toSafeInteger=Zc;xn.toString=Qc;xn.toUpper=dp;xn.trim=vp;xn.trimEnd=gp;xn.trimStart=mp;xn.truncate=yp;xn.unescape=bp;xn.uniqueId=th;xn.upperCase=_p;xn.upperFirst=wp;xn.each=cl;xn.eachRight=fl;xn.first=Zs;Fp(xn,function(){var e={};Ei(xn,(function(t,r){if(!ft.call(xn.prototype,r)){e[r]=t}}));return e}(),{chain:false});xn.VERSION=n;yr(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){xn[e].placeholder=xn}));yr(["drop","take"],(function(e,t){Dn.prototype[e]=function(n){n=n===r?1:qt(Kc(n),0);var i=this.__filtered__&&!t?new Dn(this):this.clone();if(i.__filtered__){i.__takeCount__=Wt(n,i.__takeCount__)}else{i.__views__.push({size:Wt(n,F),type:e+(i.__dir__<0?"Right":"")})}return i};Dn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}));yr(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=r==N||r==A;Dn.prototype[e]=function(e){var t=this.clone();t.__iteratees__.push({iteratee:Ua(e,3),type:r});t.__filtered__=t.__filtered__||n;return t}}));yr(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Dn.prototype[e]=function(){return this[r](1).value()[0]}}));yr(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Dn.prototype[e]=function(){return this.__filtered__?new Dn(this):this[r](1)}}));Dn.prototype.compact=function(){return this.filter(Ep)};Dn.prototype.find=function(e){return this.filter(e).head()};Dn.prototype.findLast=function(e){return this.reverse().find(e)};Dn.prototype.invokeMap=wo((function(e,t){if(typeof e=="function"){return new Dn(this)}return this.map((function(r){return Wi(r,e,t)}))}));Dn.prototype.reject=function(e){return this.filter(Vl(Ua(e)))};Dn.prototype.slice=function(e,t){e=Kc(e);var n=this;if(n.__filtered__&&(e>0||t<0)){return new Dn(n)}if(e<0){n=n.takeRight(-e)}else if(e){n=n.drop(e)}if(t!==r){t=Kc(t);n=t<0?n.dropRight(-t):n.take(t-e)}return n};Dn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};Dn.prototype.toArray=function(){return this.take(F)};Ei(Dn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=xn[i?"take"+(t=="last"?"Right":""):t],a=i||/^find/.test(t);if(!o){return}xn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof Dn,l=s[0],c=u||uc(t);var f=function(e){var t=o.apply(xn,Tr([e],s));return i&&p?t[0]:t};if(c&&n&&typeof l=="function"&&l.length!=1){u=c=false}var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,v=u&&!h;if(!a&&c){t=v?t:new Dn(this);var g=e.apply(t,s);g.__actions__.push({func:Gu,args:[f],thisArg:r});return new In(g,p)}if(d&&v){return e.apply(this,s)}g=this.thru(f);return d?i?g.value()[0]:g.value():g}}));yr(["pop","push","shift","sort","splice","unshift"],(function(e){var t=at[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);xn.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(uc(i)?i:[],e)}return this[r]((function(r){return t.apply(uc(r)?r:[],e)}))}}));Ei(Dn.prototype,(function(e,t){var r=xn[t];if(r){var n=r.name+"";if(!ft.call(lr,n)){lr[n]=[]}lr[n].push({name:t,func:r})}}));lr[ba(r,m).name]=[{name:"wrapper",func:r}];Dn.prototype.clone=jn;Dn.prototype.reverse=Mn;Dn.prototype.value=Nn;xn.prototype.at=Ku;xn.prototype.chain=$u;xn.prototype.commit=Yu;xn.prototype.next=Xu;xn.prototype.plant=Qu;xn.prototype.reverse=el;xn.prototype.toJSON=xn.prototype.valueOf=xn.prototype.value=tl;xn.prototype.first=xn.prototype.head;if(Dt){xn.prototype[Dt]=Zu}return xn};var wn=_n();if(ar){(ar.exports=wn)._=wn;or._=wn}else{ir._=wn}}).call(commonjsGlobal)}));function isInstanceOfIConf(e){var t="";var r=true;if(!(typeof e.source=="string"&&["data","webservice","file"].indexOf(e.source)>-1)){r=false;t="options.source value '"+e.source+"' doesn't meet interface IConf requirements"}else{if(!(e.source!="webservice"||e.source=="webservice"&&e.url&&typeof e.url=="string")){r=false;t="options.url value '"+e.url+"' doesn't meet interface IConf requirements, is wrongly formated or doesn't match option.source value"}if(!(e.source!="webservice"&&!e.token||e.source=="webservice"&&e.token&&(typeof e.token=="string"||typeof e.token=="function"))){r=false;t="options.token value doesn't meet interface IConf requirements or doesn't match option.source value :: typeof object.token == "+typeof e.token}if(!(e.source!="webservice"&&!e.options||e.source=="webservice"&&e.options&&typeof e.options=="object")){r=false;t="options.options value doesn't meet interface IConf requirements or doesn't match option.source value"}if(!(e.source!="data"&&!e.data||e.source=="data"&&e.data&&(typeof e.data=="object"||typeof e.data=="string"))){r=false;t="options.data value doesn't meet interface IConf requirements or doesn't match option.source value"}if(!(e.source!="file"||e.source=="file"&&e.url&&typeof e.url=="string")){r=false;t="options.url value '"+e.url+"' doesn't meet interface IConf requirements or doesn't match option.source value"}}if(!(typeof e.origin=="string"&&["thesaurus","position","classification"].indexOf(e.origin)>-1)){r=false;t="options.origin value '"+e.origin+"' doesn't meet interface IConf requirements"}if(!(!e.output&&typeof e.output!="boolean"||typeof e.output=="string"&&["fullpath","nodeid"].indexOf(e.output)>-1)){r=false;t="options.output value '"+e.output+"' doesn't meet interface IConf requirements"}if(!(!e.multiple&&typeof e.multiple!="boolean"||typeof e.multiple=="boolean")){r=false;t="options.multiple value '"+e.multiple+"' doesn't meet interface IConf requirements"}if(!(!e.mode&&typeof e.mode!="boolean"||typeof e.mode=="string"&&["tree","input"].indexOf(e.mode)>-1)){t="options.mode value '"+e.mode+"' doesn't meet interface IConf requirements"}if(!(!e.label&&typeof e.label!="boolean"||typeof e.label=="string"||typeof e.label=="object")){r=false;t="options.label value '"+e.label+"' doesn't meet interface IConf requirements"}if(!(!e.searchPlaceholder&&typeof e.searchPlaceholder!="boolean"||typeof e.searchPlaceholder=="string"||typeof e.searchPlaceholder=="object")){r=false;t="options.searchPlaceholder value '"+e.searchPlaceholder+"' doesn't meet interface IConf requirements"}if(!(!e.defaultValue&&typeof e.defaultValue!="boolean"||typeof e.defaultValue=="object"&&(e.multiple==true||e.defaultValue.length<=1)||typeof e.defaultValue=="string"||typeof e.defaultValue=="number")){r=false;t="options.defaultValue value '"+e.defaultValue+"' doesn't meet interface IConf requirements or doesn't match option.multiple value"}if(!(!e.readonly&&typeof e.readonly!="boolean"||typeof e.readonly=="boolean")){r=false;t="readonly value '"+e.readonly+"' doesn't meet interface IConf requirements"}if(!(!e.loading&&typeof e.loading!="boolean"||typeof e.loading=="string"&&["display","click"].indexOf(e.loading)>-1)){r=false;t="options.loading value '"+e.loading+"' doesn't meet interface IConf requirements"}if(!(!e.displayTree&&typeof e.displayTree!="boolean"||typeof e.displayTree=="boolean")){r=false;t="options.displayTree value '"+e.displayTree+"' doesn't meet interface IConf requirements"}if(!(!e.minDepth&&typeof e.minDepth!="number"||typeof e.minDepth=="number")||e.maxDepth&&e.maxDepth<e.minDepth){r=false;t="options.minDepth value '"+e.minDepth+"' doesn't meet interface IConf requirements or mismatches with maxDepth value"}if(!(!e.maxDepth&&typeof e.maxDepth!="number"||typeof e.maxDepth=="number")||e.minDepth&&e.minDepth>e.maxDepth){r=false;t="options.maxDepth value '"+e.maxDepth+"' doesn't meet interface IConf requirements or mismatches with minDepth value"}if(!(!e.isFullpath&&typeof e.isFullpath!="boolean"||typeof e.isFullpath=="boolean")){r=false;t="options.isFullpath value '"+e.isFullpath+"' doesn't meet interface IConf requirements"}if(!(!e.defaultValueIsFullpath&&typeof e.defaultValueIsFullpath!="boolean"||typeof e.defaultValueIsFullpath=="boolean")){r=false;t="options.defaultValueIsFullpath value '"+e.defaultValueIsFullpath+"' doesn't meet interface IConf requirements"}if(!(!e.showAutocomplete&&typeof e.showAutocomplete!="boolean"||typeof e.showAutocomplete=="boolean")){r=false;t="options.showAutocomplete value '"+e.showAutocomplete+"' doesn't meet interface IConf requirements"}if(!(!e.openTreeWhenLoaded&&typeof e.openTreeWhenLoaded!="boolean"||typeof e.openTreeWhenLoaded=="boolean")){r=false;t="options.openTreeWhenLoaded value '"+e.openTreeWhenLoaded+"' doesn't meet interface IConf requirements"}if(!(!e.displayRootNode&&typeof e.displayRootNode!="boolean"||typeof e.displayRootNode=="boolean")){r=false;t="options.displayRootNode value '"+e.displayRootNode+"' doesn't meet interface IConf requirements"}if(!(!e.keyboardNavigation&&typeof e.keyboardNavigation!="boolean"||typeof e.keyboardNavigation=="boolean")){r=false;t="options.keyboardNavigation value '"+e.keyboardNavigation+"' doesn't meet interface IConf requirements"}if(!(!e.dragAndDropEnabled&&typeof e.dragAndDropEnabled!="boolean"||typeof e.dragAndDropEnabled=="boolean")){r=false;t="options.dragAndDropEnabled value '"+e.dragAndDropEnabled+"' doesn't meet interface IConf requirements"}if(!(!e.contextMenu&&typeof e.contextMenu!="object"||typeof e.contextMenu=="object")){r=false;t="options.contextMenu value doesn't meet interface IConf requirements"}if(!(!e.searchResultPresentsUnMatched&&typeof e.searchResultPresentsUnMatched!="boolean"||typeof e.searchResultPresentsUnMatched=="boolean")){r=false;t="options.searchResultPresentsUnMatched value '"+e.searchResultPresentsUnMatched+"' doesn't meet interface IConf requirements"}if(!(!e.theme&&typeof e.theme!="object"||typeof e.theme=="object")){r=false;t="options.theme value doesn't meet interface IConf requirements"}var n=function(e){return e==="fr"||e==="en"};if(!(!e.language&&typeof e.language!="string"||typeof e.language=="string"&&n(e.language))){r=false;t="options.language value '"+e.language+"' doesn't meet interface IConf requirements ('fr' or 'en')"}return{toret:r,errorToLog:t}}function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}function strIsNumeric(e){if(typeof e!="string")return false;return isNumeric(e)}function replacer(e,t){if(typeof t==="object"&&t!==null){if(t instanceof XMLHttpRequest){return"[XMLHttpRequest object]"}}return t}function searchValue(e,t,r){var n=false;function i(e){return e.replace(/\u00A0/g," ")}if(i(e.text).toLowerCase().indexOf(i(r).toLowerCase())>-1){n=true}else if(!t&&e.children.length>0&&Object.keys(e.children[0]).length!=0){e.children.forEach((function(e){if(searchValue(e,t,r)){n=true}}))}return n}function getLanguageValue(e,t,r){if(e){switch(typeof e){case"string":return e;case"object":if(t){return e.filter((function(e){return e.language==t}))[0].value}else{var n=e.filter((function(e){return e.language==r}));if(n[0]){return n[0].value}else{console.error("Missing language value in component configuration! It happened when requesting item text.")}}break}}return""}function amIFocusedByEvent(e,t){var r=false;e.composedPath().forEach((function(e,n){if(e.id=="hierarchized-picker-"+t){r=true}}));return r}var waitBeforeTriggerSearch=1e3;var defaultLanguage="en";var defaultPickerTheme={palette:{primary:{main:"#888",light:"#888",contrastText:"#000"},background:{default:"#ccc",light:"#eee",main:"#000",dark:"#fff"},text:{primary:"#000"},input:{background:"#fff",borderStyle:"none"}},typography:{body:{fontSize:"14px",fontWeight:"400"}},modale:{height:"200px"}};var RawDataManager=function(){function e(e,t){this.rawData=null;this.token=e;this.optionsManager=t;this.baseUrl=t.getOptions().url}e.prototype.getToken=function(){var e;if(typeof this.token==="string"){return this.token.length>200?this.token:(e=window.localStorage.getItem(this.token))!==null&&e!==void 0?e:null}if(typeof this.token==="function"){var t=this.token();return typeof t==="string"?t:null}return null};e.prototype.makeRequest=function(e,t,r,n){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(o){if(n)n.classList.add("loading");i=this.getToken();if(!i){throw new Error("No token available.")}return[2,new Promise((function(o,a){var s=new XMLHttpRequest;s.open(e,"".concat(t),true);s.setRequestHeader("Authorization","Bearer ".concat(i));if(e==="POST"){s.setRequestHeader("Content-Type","application/json;charset=UTF-8")}s.onload=function(){if(n)n.classList.remove("loading");if(s.status>=200&&s.status<300){o(JSON.parse(s.responseText))}else{a(new Error("HTTP ".concat(s.status,": ").concat(s.statusText)))}};s.onerror=function(){if(n)n.classList.remove("loading");a(new Error("Network error"))};s.send(r?JSON.stringify(r):null)}))]}))}))};e.prototype.getFromClassification=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var n,i,o,a,s,u,l;return __generator(this,(function(c){switch(c.label){case 0:n="";i=[];if(t["Reach"]){i.push("id=".concat(t["Reach"].join("&id=")));delete t["Reach"]}for(o in t){if(!t.hasOwnProperty(o))continue;a=t[o];s=o.toLowerCase();if(s==="startnode"&&!n){n=encodeURIComponent(a);continue}i.push("".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(a)))}u=i.length>0?"?".concat(i.join("&")):"";l=n?"".concat(e,"/").concat(n,"/").concat(u):"".concat(e,"/").concat(u);return[4,this.makeRequest("GET",l,null,r)];case 1:return[2,c.sent()]}}))}))};e.prototype.getFromSource=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.makeRequest("POST",e,t,r)]}))}))};e.prototype.loadDataFromFile=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.makeRequest("GET",e,null)]}))}))};e.prototype.fetchNodeIdFromFullpath=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i;return __generator(this,(function(o){switch(o.label){case 0:switch(t.origin){case"thesaurus":r={iStartNode:this.optionsManager.getOptions().options.StartNodeID,sValue:e,sTypeField:"fullpath"};break;case"position":r={value:e,startNodeId:this.optionsManager.getOptions().options.StartNodeID};break;default:throw new Error("Invalid origin: ".concat(t.origin,", only 'thesaurus' and 'position' implemented for now..."))}n=this.getApiNodeFromFullpathURL(t);i=0;return[4,this.makeRequest("POST",n,r).then((function(e){if(e.exist){if(t.origin==="thesaurus")i=e.topic.TTop_PK_ID;if(t.origin==="position")i=e.position.ID;if(t.origin==="classification")i=e.node.ID}}))];case 1:o.sent();return[2,i]}}))}))};e.prototype.getApiNodeFromFullpathURL=function(e){var t=this.baseUrl.substring(0,this.baseUrl.lastIndexOf("/"));switch(e.origin){case"thesaurus":return"".concat(t,"/existBy");case"position":return"".concat(t,"/PositionExistByFp");case"classification":return"".concat(t,"/exists");default:throw new Error("Invalid origin: ".concat(e.origin))}};e.prototype.loadData=function(e){this.rawData=e};e.prototype.getData=function(){return this.rawData};e.prototype.mergeData=function(e,t){if(!this.rawData)this.rawData=e;else{this.rawData=this.genericMerge(this.rawData,e,t,"children")}};e.prototype.reorderItems=function(e,t,r){var n=new Map(t.map((function(e){return[e[r],e]})));return e.map((function(e){return n.get(e[r])})).filter(Boolean)};e.prototype.genericMerge=function(e,t,r,n){var i=this;var o,a;if(!e){return t}if(!t||!((o=t[n])===null||o===void 0?void 0:o.length))return e;if(e[n]&&e[n].length>0&&t[n]&&t[n].length>0)t[n]=this.reorderItems(e[n],t[n],r);e[n]=((a=e[n])===null||a===void 0?void 0:a.length)?e[n].map((function(e,o){return i.genericMerge(e,t[n].filter((function(t){return t.key==e.key}))[0],r,n)})):t[n];return e};e.prototype.searchAndMergeData=function(e,t){return this.genericMerge(e,t,"key","children")};e.prototype.searchAndMergeDataClassification=function(e,t){return this.genericMerge(e,t,"ID","children")};return e}();var OptionsManager=function(){function e(e){this.options=this.initializeOptions(e)}e.prototype.initializeOptions=function(e){var t={multiple:false,mode:"input",loading:"display",showAutocomplete:false,openTreeWhenLoaded:false,displayRootNode:false,keyboardNavigation:false,dragAndDropEnabled:false,errorsInInput:true,isFullpath:true,defaultValue:[],defaultValueIsFullpath:false};var r=Object.assign(Object.assign({},t),e);if(typeof r.defaultValue!=="object"){r.defaultValue=[r.defaultValue]}return r};Object.defineProperty(e.prototype,"data",{get:function(){if(typeof this.getOptions().data==="object")return this.options.data;return JSON.parse(this.options.data)},enumerable:false,configurable:true});e.prototype.getOptions=function(){return this.options};e.prototype.updateOptions=function(e){this.options=Object.assign(Object.assign({},this.options),e)};e.prototype.validateNewOptions=function(e){return this.initializeOptions(Object.assign(Object.assign({},this.options),e))};e.prototype.updateDefaultValue=function(){if(this.options.defaultValue!=undefined&&this.options.defaultValue.length===0){delete this.options.defaultValue}};e.prototype.dropReach=function(){if(this.options.options&&this.options.options.Reach){delete this.options.options.Reach}};return e}();function getPropertyFromNode(e,t,r){if(r===void 0){r=true}t=t.trim();if(!e||!t){return""}if(e[t]||e[t]===0){return e[t]}if(e.data&&(e.data[t]||e.data[t]===0)){return e.data[t]}if(r)console.error("Property '".concat(t,"' not found in node:"),e);return null}function findNodeById(e,t){return e.nodesById[t]||null}function normalizeStr(e){return e.replace(/\u00A0/g," ")}function fillTreeWithObject(e,t,r,n){var i=n.searchResultPresentsUnMatched;if(t&&t.length){t.forEach((function(t){var o,a,s,u;var l=null;var c=null;var f=null;var p=null;if(n.origin=="classification"){l=getPropertyFromNode(t,"ID");c=(o=getPropertyFromNode(t,"Translations")[n.language])===null||o===void 0?void 0:o.translated_name;f=(a=getPropertyFromNode(t,"Properties"))===null||a===void 0?void 0:a.System_Fullpath;p=(s=getPropertyFromNode(t,"Translations")[n.language])===null||s===void 0?void 0:s.translated_fullpath;if(!f)f=(u=getPropertyFromNode(t,"Properties"))===null||u===void 0?void 0:u.System_FullPath;if(!p)p=getPropertyFromNode(t,"fullpathTranslated")}else{l=getPropertyFromNode(t,"key");c=getPropertyFromNode(t,"valueTranslated");f=getPropertyFromNode(t,"fullpath");p=getPropertyFromNode(t,"fullpathTranslated")}var h=getPropertyFromNode(t,"children",false);var d=getPropertyFromNode(t,"deprecated",null);if(d===null)d=getPropertyFromNode(t,"Is_Deprecated",false);var v={id:l,nodeId:l,text:normalizeStr(c),fullpath:normalizeStr(f),fullpathTranslated:normalizeStr(p),children:getPropertyFromNode(t,"hasChildren",false)&&h&&h.length===0?[{}]:[],deprecated:d,isDesaturated:false,searchMatch:false};var g=fillTreeWithObject(v.children,h,r,n);var m=false;if(r){var y=searchValue(v,false,r);v.isDesaturated=!y;v.searchMatch=searchValue(v,true,r);m=y||i}else{m=true}if(m){v.children=g;e.push(v)}}))}return e}function completeCurrentTreeWithTree(e,t,r){var n;var i=t.key||t.id||t.ID;var o=findNodeById(e,i);if(i==0&&t.children&&t.children.length>0){t.children.forEach((function(t){completeCurrentTreeWithTree(e,t,r)}))}if(o){o.children=[];var a=(n=e.liElementsById[i])===null||n===void 0?void 0:n.querySelector("ul");if(!a){a=e.createUlEle();e.liElementsById[i].appendChild(a)}var s=fillTreeWithObject([],t.children,null,r);a.innerHTML="";s.forEach((function(n){var i=e.createLiEle(n,true);a.appendChild(i);o.children.push(n);e.nodesById[n.id]=n;e.liElementsById[n.id]=i;if(n.children&&n.children.some((function(e){return Object.keys(e).length>0}))){t.children.forEach((function(t){completeCurrentTreeWithTree(e,t,r)}))}}))}}function displayAutocompleteWithResults(e,t,r,n,i){var o;if(e&&r.getOptions().showAutocomplete){var a=((o=e.children)===null||o===void 0?void 0:o.filter((function(e){var r;return(r=e.text)===null||r===void 0?void 0:r.toLowerCase().includes(t.toLowerCase())})))||[];a=a.sort((function(e,t){return e.text.localeCompare(t.text)}));var s=document.getElementById("autocomplete-results-area");s.innerHTML="";if(t.length>0){a.forEach((function(e){var t=document.createElement("li");t.title=e.text;t.textContent=e.text;t.setAttribute("nodeid",e.id);t.addEventListener("click",(function(){n(e.id);i("hide")}));s.appendChild(t)}));showAutocomplete()}}}function showAutocomplete(){var e=document.getElementById("autocomplete-results-area");if(e)e.style.display="block"}function clearAutocomplete(e){if(e===void 0){e=false}var t=document.getElementById("autocomplete-results-area");if(t){t.style.display="none";if(e)t.innerHTML=""}}var focusedNodeIndex=0;function setupKeyboardNavigation(e,t,r){if(!t.getOptions().keyboardNavigation)return;var n=e.el.querySelector(".hierarchized-picker-tree-area")||e.el.querySelector(".hierarchized-picker-raw-tree-area");if(!n)return;function i(e,t){Object.values(e).forEach((function(e){e.classList.remove("treejs-node__focused")}));t.classList.add("treejs-node__focused")}function o(e,t){var r=[];var n=function(e){e.forEach((function(e){r.push(e);if(e.children&&e.children.length>0&&!t[e.id].classList.contains("treejs-node__close")){n(e.children)}}))};n(e);return r}focusedNodeIndex=0;if(e&&e.loadedTreeJs&&e.loadedTreeJs.liElementsById&&e.loadedTreeJs.treeNodes){i(e.loadedTreeJs.liElementsById,e.loadedTreeJs.liElementsById[e.loadedTreeJs.treeNodes[focusedNodeIndex].id])}if(!e._keydownListenerAdded){e._keydownListenerAdded=true;e.el.addEventListener("keydown",(function(n){var a,s;n.stopPropagation();var u=e.loadedTreeJs;var l=o(u.treeNodes,u.liElementsById);if(!u||!l.length)return;var c=l[focusedNodeIndex];var f=l[focusedNodeIndex];var p=u.liElementsById[f.id];var h=["tab","0","arrowup","arrowdown","arrowleft","arrowright"];switch(n.key.toLowerCase()){case"tab":case"0":n.preventDefault();{e.setNodeAsSelected(c.nodeId,e.loadedTreeJs,true);if(t.getOptions().mode!="tree"&&!t.getOptions().multiple){setTimeout((function(){e.showTree("hide")}),100)}}break;case"arrowup":n.preventDefault();focusedNodeIndex=Math.max(focusedNodeIndex-1,0);var d=l[focusedNodeIndex];var v=u.liElementsById[d.id];v.scrollIntoView({behavior:"smooth",block:"nearest"});i(u.liElementsById,v);break;case"arrowdown":n.preventDefault();focusedNodeIndex=Math.min(focusedNodeIndex+1,l.length-1);var g=l[focusedNodeIndex];var m=u.liElementsById[g.id];i(u.liElementsById,m);m.scrollIntoView({behavior:"smooth",block:"nearest"});break;case"arrowleft":n.preventDefault();var y=p.querySelector(".treejs-switcher");if(y){(a=e.loadedTreeJs)===null||a===void 0?void 0:a.onSwitcherClick(y)}break;case"arrowright":n.preventDefault();var b=p.querySelector(".treejs-switcher");if(b){(s=e.loadedTreeJs)===null||s===void 0?void 0:s.onSwitcherClick(b)}break}if(h.includes(n.key.toLowerCase()))r.emit(n)}))}}function focusSearchInput(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=e.el.querySelector("search-input input");if(!(t&&document.activeElement!==t))return[3,2];return[4,t.focus()];case 1:r.sent();r.label=2;case 2:return[2]}}))}))}function focusMainInput(e){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n;return __generator(this,(function(i){t=Array.from(document.querySelectorAll("input, button, textarea, select, [tabindex]")).filter((function(e){return e.tabIndex>=0}));r=t.indexOf(document.activeElement);n=(e=t[r+1])!==null&&e!==void 0?e:t[0];if(n){n.focus()}return[2]}))}))}function handleFocusEvent(e,t){if(t==="search"){focusSearchInput(e);e.showTree("search")}else if(t==="modale"){e.showTree("modale")}else if(t==="hide"){e.showTree("hide")}}function clickPickerModalArea(e,t){if(e.pickerClass==="fieldError"){e.showTree("hide")}else if(e.shownTree){e.showTree("modale")}else{e.mylog("Ignored modal click")}if(e.theOptions.mode=="tree"){setupKeyboardNavigation(e,e.optionsManager,e.navigateInTree)}}function focusInSearchEvent(e){handleFocusEvent(e,"search")}function focusOutSearchEvent(e,t){}var hierarchizedPickerCss='reneco-hierarchized-picker .hierarchized-picker-raw-tree-area{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker div:focus{outline:none}reneco-hierarchized-picker .loader{color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, black)) !important;position:absolute;z-index:1;min-width:100%;min-height:100%;background:#FFFFFF99;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .loader .loader-inner{background:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, var(--ion-color-light, #FAFAFA))) !important;padding:20px;-webkit-box-shadow:0 0 5px #000;box-shadow:0 0 5px #000;-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .loader:not(.loading){display:none}reneco-hierarchized-picker .scrollable{overflow-y:auto;position:relative}reneco-hierarchized-picker .treejs{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:var(--hpicker-theme-typography-tree-font-size, 14px) !important;font-weight:var(--hpicker-theme-typography-tree-font-weight, 400) !important}reneco-hierarchized-picker .treejs *:after,reneco-hierarchized-picker .treejs *:before{-webkit-box-sizing:border-box;box-sizing:border-box}reneco-hierarchized-picker .treejs>.treejs-node{padding-left:0}reneco-hierarchized-picker .treejs .treejs-nodes{list-style:none;padding-left:20px;overflow:hidden;-webkit-transition:height 150ms ease-out, opacity 150ms ease-out;-o-transition:height 150ms ease-out, opacity 150ms ease-out;transition:height 150ms ease-out, opacity 150ms ease-out}reneco-hierarchized-picker .treejs .treejs-node{cursor:pointer;overflow:hidden;position:relative}reneco-hierarchized-picker .treejs .treejs-node.treejs-placeholder{padding-left:20px}reneco-hierarchized-picker .treejs .treejs-switcher{display:inline-block;vertical-align:middle;width:20px;height:20px;cursor:pointer;position:relative;-webkit-transition:-webkit-transform 150ms ease-out;transition:-webkit-transform 150ms ease-out;-o-transition:transform 150ms ease-out;transition:transform 150ms ease-out;transition:transform 150ms ease-out, -webkit-transform 150ms ease-out}reneco-hierarchized-picker .treejs .treejs-switcher:before{position:absolute;top:8px;left:6px;display:block;content:\' \';border:4px solid transparent;border-top:4px solid rgba(0, 0, 0, 0.4);-webkit-transition:border-color 150ms;-o-transition:border-color 150ms;transition:border-color 150ms}reneco-hierarchized-picker .treejs .treejs-switcher:hover:before{border-top:4px solid var(--hpicker-theme-palette-font-color)}reneco-hierarchized-picker .treejs-node__checked>.treejs-switcher:before{border-top:4px solid var(--hpicker-theme-palette-primary-contrastText) !important}reneco-hierarchized-picker .treejs-node__focused{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:2px}reneco-hierarchized-picker .treejs .treejs-node__close>.treejs-switcher{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg)}reneco-hierarchized-picker .treejs .treejs-node__close>.treejs-nodes{height:0}reneco-hierarchized-picker .treejs .treejs-checkbox{display:inline-block;vertical-align:middle;width:20px;height:20px;cursor:pointer;position:relative}reneco-hierarchized-picker .treejs .treejs-checkbox:before{-webkit-transition:all 0.3s;-o-transition:all 0.3s;transition:all 0.3s;cursor:pointer;position:absolute;top:2px;content:\' \';display:block;width:16px;height:16px;border:1px solid #d9d9d9;border-radius:2px}reneco-hierarchized-picker .treejs .treejs-checkbox:hover:before{-webkit-box-shadow:0 0 2px 1px #1890ff;box-shadow:0 0 2px 1px #1890ff}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:before{background-color:#1890ff;border-color:#1890ff}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:after{position:absolute;content:\' \';display:block;top:4px;left:5px;width:5px;height:9px;border:2px solid #fff;border-top:none;border-left:none;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}reneco-hierarchized-picker .treejs .treejs-node__halfchecked{background-color:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, #e8a86c))}reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:before{background-color:#1890ff;border-color:#1890ff}reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:after{position:absolute;content:\' \';display:block;top:9px;left:3px;width:10px;height:2px;background-color:#fff}reneco-hierarchized-picker .treejs .treejs-node__disabled{cursor:not-allowed;color:rgba(0, 0, 0, 0.25)}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox{cursor:not-allowed}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox:before{cursor:not-allowed;border-color:#d9d9d9 !important;background-color:#f5f5f5 !important}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-checkbox:hover:before{-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-node__checked>.treejs-checkbox:after{border-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled .treejs-node__halfchecked>.treejs-checkbox:after{background-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled.treejs-node__checked>.treejs-checkbox:after{border-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-node__disabled.treejs-node__halfchecked>.treejs-checkbox:after{background-color:#d9d9d9}reneco-hierarchized-picker .treejs .treejs-label{vertical-align:middle}reneco-hierarchized-picker .treejs .treejs-node__deprecated>.treejs-label{text-decoration:line-through}reneco-hierarchized-picker .treejs .treejs-node__desaturated>.treejs-label{opacity:.5}reneco-hierarchized-picker .treejs .treejs-node__searchmatch>.treejs-label{font-weight:bolder}reneco-hierarchized-picker .treejs .dragging{background:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, #e8a86c));display:inline;opacity:.9;padding:11px 0px;display:block}reneco-hierarchized-picker .treejs .dragover{background:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, #e8a86c))}reneco-hierarchized-picker .treejs .dragover-over::after{content:"";display:block;width:2px;height:100%;position:absolute;top:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .treejs .dragover-before::after{content:"";display:block;height:2px;width:100%;position:absolute;top:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .treejs .dragover-after::after{content:"";display:block;height:2px;width:100%;position:absolute;bottom:0;left:0;background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, #d58433))}reneco-hierarchized-picker .fieldError{color:red !important}reneco-hierarchized-picker .hidden{display:none;opacity:0}reneco-hierarchized-picker ul.treejs-nodes:first-child{padding-left:0px !important;margin-top:0px !important;margin-left:0px !important;background-color:var(--hpicker-theme-palette-background-dark)}reneco-hierarchized-picker ul.treejs-nodes:not(:first-child){margin:0 !important;padding-left:15px !important;background-color:var(--hpicker-theme-palette-background-dark, var(--mui-palette-background-dark, var(--ion-color-light-tint, #FFF)))}reneco-hierarchized-picker ul.treejs-nodes{margin-left:15px !important;padding-left:0px !important}reneco-hierarchized-picker .hierarchized-picker-raw-tree li.treejs-node ul.treejs-nodes{margin:11px 0 0 0 !important}reneco-hierarchized-picker .hierarchized-picker-raw-tree li.treejs-node__close ul.treejs-nodes{margin:0 !important}reneco-hierarchized-picker li.treejs-node__close{background-color:var(--hpicker-theme-palette-background-light, var(--mui-palette-background-light, var(--ion-color-light, #FAFAFA)))}reneco-hierarchized-picker li:not(.treejs-node__close){background-color:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, #e8a86c));padding-bottom:0px !important}reneco-hierarchized-picker li:not(.treejs-node__close) ul.treejs-nodes li{margin-top:2px !important}reneco-hierarchized-picker ul li:last-child{margin-bottom:0px !important}reneco-hierarchized-picker li.treejs-node__checked{background-color:var(--hpicker-theme-palette-primary-light) !important;color:var(--hpicker-theme-palette-primary-contrastText, var(--mui-palette-primary-ContrastText, var(--ion-color-primary-contrast, #000)))!important}reneco-hierarchized-picker li.treejs-node{padding:2px 0px;margin-bottom:2px}reneco-hierarchized-picker .treejs-node.readonly_node{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:darkgrey}reneco-hierarchized-picker .treejs-node:not(.readonly_node){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, black))}reneco-hierarchized-picker .hierarchized-picker-container{position:relative;width:100%}reneco-hierarchized-picker .hierarchized-picker-input-area{background-color:transparent !important;display:-ms-flexbox;display:flex;width:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}reneco-hierarchized-picker .hierarchized-picker-input-area .input-wrapper{padding-left:10px !important}reneco-hierarchized-picker .hierarchized-picker-input{-ms-flex:2;flex:2}reneco-hierarchized-picker .hierarchized-picker-input input{width:100%}reneco-hierarchized-picker .hierarchized-picker-input.readonly{pointer-events:none;cursor:initial}reneco-hierarchized-picker .hierarchized-picker-label{position:stacked;margin-left:5px}reneco-hierarchized-picker .hierarchized-picker-tree-area{padding-top:10px}reneco-hierarchized-picker .hierarchized-picker-modal-area{position:absolute;width:100%;background-color:var(--hpicker-theme-palette-background-dark, var(--mui-palette-background-dark, var(--ion-color-light-tint, #FFF))) !important;z-index:10;overflow:scroll;top:20px;min-height:100px;max-height:var(--hpicker-theme-modal-height, "200px") !important;-webkit-box-shadow:0 0px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0px 15px 0 rgba(0, 0, 0, 0.2);border-radius:4px;margin-right:0px !important}reneco-hierarchized-picker .hierarchized-picker-modal-area.display-modale-top{bottom:30px !important;top:unset !important}reneco-hierarchized-picker .hierarchized-picker-modal{padding:0px 15px}reneco-hierarchized-picker .hierarchized-picker{display:-ms-flexbox;display:flex;width:100%;font-family:\'Roboto\', sans-serif}reneco-hierarchized-picker .hierarchized-picker-spinner{margin:35px 0px 0px 145px}reneco-hierarchized-picker .reneco:before{position:relative;top:1px}reneco-hierarchized-picker .hierarchized-picker-input-area span.reneco:hover{cursor:pointer}reneco-hierarchized-picker .hierarchized-picker-input-area span.reneco-close{color:var(--ion-color-danger, red) !important;padding-left:10px}reneco-hierarchized-picker .treejs .treejs-switcher:before{border-top:4px solid var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, var(--ion-color-dark-shade, #121212)))}reneco-hierarchized-picker .treejs .treejs-checkbox:before{-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .treejs .treejs-node__checked>.treejs-checkbox:before,reneco-hierarchized-picker .treejs .treejs-node__halfchecked>.treejs-checkbox:before{background-color:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433))) !important;border-color:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433))) !important;-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker #autocomplete-results-area{position:absolute;margin-top:48px;background-color:white;left:15px;z-index:10;padding:0px 5px;max-width:340px;max-height:110px;overflow:auto}reneco-hierarchized-picker #autocomplete-results-area li{list-style-type:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;margin:1px}reneco-hierarchized-picker .hierarchized-picker-raw-tree-area li.treejs-node{padding:11px 0px;display:block}reneco-hierarchized-picker input[title]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}reneco-hierarchized-picker input{background-color:var(--hpicker-theme-palette-input-background-color, #eeeeee);border-style:var(--hpicker-theme-palette-input-border-style, solid);color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, black))}reneco-hierarchized-picker input:focus-visible{outline:unset !important;outline-color:unset !important;outline-style:unset !important}.hierarchized-picker-raw-tree-area.readonly li.treejs-node .treejs-switcher{pointer-events:all}::-webkit-scrollbar-thumb{background:var(--hpicker-theme-palette-primary-main, var(--mui-palette-primary-main, var(--ion-color-primary, #d58433)));width:8px;margin:5px;border-radius:5px}::-webkit-scrollbar{background:var(--ion-color-medium-tint, #E0E0E0);width:8px;height:8px;margin:5px;cursor:pointer;border-radius:5px}::-webkit-scrollbar-corner{background-color:var(--ion-color-light-tint, #FFF)}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__close{background-color:var(--ion-color-dark-tint, #424242);color:var(--ion-color-dark-contrast, #fff)}[class$="-dark"] reneco-hierarchized-picker li:not(.treejs-node__close){background-color:var(--ion-color-dark, #212121);color:var(--ion-color-dark-contrast, #fff)}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__checked{background-color:var(--ion-color-background, var(--hpicker-theme-palette-background-default, rgba(221, 169, 37, 0.18)));color:var(--ion-color-primary-contrast, #fff) !important}[class$="-dark"] reneco-hierarchized-picker .treejs-switcher:before{border-top-color:var(--ion-color-dark-contrast, #fff) !important}[class$="-dark"] reneco-hierarchized-picker li.treejs-node__checked .treejs-switcher:before{color:var(--ion-color-light-contrast, #111111) !important}[class$="-dark"] reneco-hierarchized-picker ul.treejs-nodes:not(:first-child){background-color:var(--ion-color-light-contrast, #111111) !important}';var HierarchizedPickerComponent=function(){function e(e){var t=this;registerInstance(this,e);this.valueChange=createEvent(this,"valueChange",7);this.itemDropped=createEvent(this,"itemDropped",7);this.itemContextMenuItemClick=createEvent(this,"itemContextMenuItemClick",7);this.searchResult=createEvent(this,"searchResult",7);this.navigateInTree=createEvent(this,"navigateInTree",7);this.errorRaised=createEvent(this,"errorRaised",7);this.modaleHeight=200;this.modalePosition="bottom";this.canload=true;this.ready=false;this.searchToDisplay=0;this.ignoreOptionsChanges=true;this.lastSearchMatchCounter=0;this.setValueOnClick=true;this.mylog=console.log;this.lastErrorMessage="";this.scrollToNode=function(e,r){if(e===void 0){e=null}if(r===void 0){r=false}var n;var i=0;var o=function(e,r){if(r===void 0){r=false}var n,a,s,u;var l=e===null||e===void 0?void 0:e.nodeId;if(!e||!l){return}var c=t.loadedTreeJs.nodesById[l];if((a=(n=c===null||c===void 0?void 0:c.children)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.id){(s=e.classList)===null||s===void 0?void 0:s.remove("treejs-node__close")}if(r){i+=e.offsetTop}var f=(u=e.parentNode)===null||u===void 0?void 0:u.closest(".treejs-node");if(f){o(f,r)}};try{if(e){var a=t.loadedTreeJs.liElementsById[e];if(a){o(a,true);if(r&&a.classList.contains("treejs-node__close")){var s=a.querySelector(".treejs-switcher");if(s){(n=t.loadedTreeJs)===null||n===void 0?void 0:n.onSwitcherClick(s)}}}}else{var u=document.querySelectorAll("#tree-area-"+t.componentID+" .treejs-node__checked");u.forEach((function(e){return o(e,i==0)}))}}catch(e){t.errorToLog="Error in showSelectedNodes"}if(i&&t.scrollable){t.scrollable.scrollTop=i}};this.getShortenedFullpath=function(e){var r,n,i,o;if(!e)return e;if(t.optionsManager.getOptions().source!=="webservice")return e;var a=e;var s=t.rawDataManager.getData();if(s){try{var u=t.optionsManager.getOptions().origin=="classification"?"startNode":"StartNodeID";var l=0;switch(t.optionsManager.getOptions().source){case"file":return e;case"data":if(t.optionsManager.getOptions().origin=="classification")return e;l=t.theOptions.data.key;break;case"webservice":l=t.optionsManager.getOptions().options[u];break}if(["0",0].includes(l))return a;if(isNumeric(l)){if(t.optionsManager.getOptions().origin=="classification"){var c=s.Translations,f=s.Properties;var p=t.optionsManager.getOptions().language;a=((n=(r=c[p])===null||r===void 0?void 0:r.translated_name)!==null&&n!==void 0?n:f===null||f===void 0?void 0:f.System_Name)+e.replace((o=(i=c[p])===null||i===void 0?void 0:i.translated_fullpath)!==null&&o!==void 0?o:f===null||f===void 0?void 0:f.System_Fullpath,"")}else{var h=s.fullpath,d=s.fullpathTranslated,v=s.title,g=s.valueTranslated;a=(g!==null&&g!==void 0?g:v)+e.replace(d!==null&&d!==void 0?d:h,"")}}else t.errorToLog="Error in getShortenedFullpath : startnode is not number"}catch(e){t.errorToLog="Error in getShortenedFullpath "+e.toString()}}return a};this.options=undefined;this.valueChangeCallback=undefined;this.disabled=undefined;this.isDisabled=undefined;this.newoptions=undefined;this.newfilter=undefined;this.componentID=undefined;this.rawData=undefined;this.pickerClass="";this.displayedValue=undefined;this.value=[];this.shownTree=false;this.searchResultData=[];this.activatedDragAndDrop=true;this.hasFocus=undefined;this.errorToLog="";this.checkFields=this.checkFields.bind(this);this.setNodeAsSelected=this.setNodeAsSelected.bind(this);this.displayTree=this.displayTree.bind(this)}e.prototype.getValue=function(){var e=this;var t,r,n,i;if(!this.optionsManager.getOptions().output){if(this.optionsManager.getOptions().multiple){return Promise.resolve(this.value)}else{return Promise.resolve((t=this.value)===null||t===void 0?void 0:t[0])}}else{if(this.optionsManager.getOptions().multiple){return Promise.resolve((r=this.value)===null||r===void 0?void 0:r.map((function(t){return t[e.optionsManager.getOptions().output]})))}else{return Promise.resolve((i=(n=this.value)===null||n===void 0?void 0:n[0])===null||i===void 0?void 0:i[this.optionsManager.getOptions().output])}}};e.prototype.refreshPicker=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(e){this.optionsManager.updateOptions({defaultValue:[]})}this.setNewOption(this.optionsManager.getOptions());return[2]}))}))};e.prototype.setOptions=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.setNewOption(e);return[2]}))}))};e.prototype.getOptionsAsIConf=function(e){if(typeof e=="string")return JSON.parse(e);return e};e.prototype.setSearchResults=function(e){var t=0;var r=__spreadArray([],e,true);while(r.length>0){var n=r.shift();t+=n.searchMatch?1:0;if(n.children){r.push.apply(r,n.children)}}this.lastSearchMatchCounter=t;this.searchResultData=e};e.prototype.getSearchResultWithCounter=function(e){return{data:e,matches:this.lastSearchMatchCounter}};e.prototype.searchResultDataChange=function(e,t){if(e&&e!=t&&e.length>0){this.searchResult.emit(this.getSearchResultWithCounter(e))}};e.prototype.getSearchResult=function(){return Promise.resolve(this.getSearchResultWithCounter(this.searchResultData))};e.prototype.logError=function(e){try{console.error("--- Hierarchized picker "+this.componentID+" ERROR ---",e);this.lastErrorMessage=e}catch(e){var t="--- Hierarchized picker generic ERROR ---";this.lastErrorMessage=t;console.error(t)}this.errorRaised.emit(this.lastErrorMessage)};Object.defineProperty(e.prototype,"theOptions",{get:function(){return this.optionsManager.getOptions()},enumerable:false,configurable:true});e.prototype.diffKeys=function(e,t,r){if(r===void 0){r=""}var n=[];var i=Object.keys(e||{}).filter((function(e){return t&&Object.prototype.hasOwnProperty.call(t,e)}));for(var o=0,a=i;o<a.length;o++){var s=a[o];var u=r?"".concat(r,".").concat(s):s;var l=e[s];var c=t[s];if(Array.isArray(l)&&Array.isArray(c)){if(l.length!==c.length){n.push(u);continue}for(var f=0;f<l.length;f++){var p=l[f];var h=c[f];if(typeof p==="object"&&p!==null&&typeof h==="object"&&h!==null){var d=this.diffKeys(p,h,"".concat(u,"[").concat(f,"]"));if(d.length>0){n.push(u);break}}else if(p!==h){n.push(u);break}}}else if(l&&c&&typeof l==="object"&&typeof c==="object"){var d=this.diffKeys(l,c,u);if(d.length>0)n.push.apply(n,d)}else if(l!==c){n.push(u)}}return n};e.prototype.setNewOption=function(e,t){if(t===void 0){t=null}return __awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,l;var c=this;return __generator(this,(function(f){switch(f.label){case 0:this.ready=false;r=Object.assign({},this.theOptions);if(t&&JSON.stringify(e.options)==JSON.stringify(t.options)){this.ready=true;return[2]}if(typeof e=="string")e=JSON.parse(e);if(typeof t=="string")t=JSON.parse(t);this.value=[];this.optionsManager.updateOptions(e);this.setDisplayedValue(this.value);n=!t||(e.origin!=t.origin||e.options.StartNodeID!=t.options.StartNodeID);if(this.optionsManager.getOptions().source!="file"&&(!t||t&&n)){this.rawData=null}this.ready=false;i=isInstanceOfIConf(this.optionsManager.getOptions());this.canload=i.toret;this.errorToLog=i.errorToLog;if(!this.canload){this.displayPickerError("Error(s) in the picker configuration!");return[2]}if(t&&JSON.stringify(e.options)!=JSON.stringify(t.options)){this.value=[]}if(!((e===null||e===void 0?void 0:e.loading)=="display"||e&&!e.loading))return[3,5];if(!(t&&this.isChangeInOptions(e,t)||!t))return[3,4];if(!t){t=r}o=this.diffKeys(t,this.optionsManager.initializeOptions(e));a=["multiple"];s=["token"];u=o.filter((function(e){return!s.includes(e)}));if(!(u.length==1&&u.some((function(e){return a.includes(e)}))))return[3,1];l=u[0];switch(l){case"multiple":document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-checkbox").forEach((function(e){return e.style.display=c.theOptions.multiple?"inline-block":"none"}));break}return[3,3];case 1:this.rawDataManager=new RawDataManager(this.getOptionsAsIConf(this.optionsManager.getOptions()).token,this.optionsManager);return[4,this.loadHierarchizedPicker(true)];case 2:f.sent();this.displayWhenLoaded();f.label=3;case 3:return[3,5];case 4:this.ready=true;f.label=5;case 5:return[2]}}))}))};e.prototype.setNewOptions=function(e){if(typeof e=="string")e=JSON.parse(e);this.setOptions(e)};e.prototype.setNewFilter=function(e){this.filterTree(e)};e.prototype.optionsChange=function(e,t){if(!this.optionsManager||!this.optionsManager.getOptions()||!this.ready||this.ignoreOptionsChanges){return}if(typeof e=="string")e=JSON.parse(e);this.setNewOption(e,t)};e.prototype.isChangeInOptions=function(e,t){var r=lodash.isEqual(e,t);if(!e.defaultValue&&!t.defaultValue)return;var n=Array.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue];var i=Array.isArray(t.defaultValue)?t.defaultValue:[t.defaultValue];var o=n.length!==i.length||!n.every((function(e){return i.includes(e)}));if(!r&&o){return o}else{return!r}};e.prototype.rawDataWatcher=function(e){var t=this;if(!this.ready){this.rawDataManager.loadData(e);this.translateDataForTree(e);if(this.optionsManager.getOptions().openTreeWhenLoaded){this.showTree("modale");setTimeout((function(){return focusSearchInput(t)}),100)}}};e.prototype.filterTree=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.search(e);return[2]}))}))};e.prototype.getError=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.resolve(this.lastErrorMessage)]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.isDisabled=this.disabled;this.options=this.getOptionsAsIConf(this.options);this.optionsManager=new OptionsManager(this.getOptionsAsIConf(this.options));this.rawDataManager=new RawDataManager(this.getOptionsAsIConf(this.options).token,this.optionsManager);return[4,this.loadHierarchizedPicker()];case 1:t.sent();this.setDisplayedValueFromDefault();setTimeout((function(){e.displayWhenLoaded()}),0);return[2]}}))}))};e.prototype.setDisplayedValueFromDefault=function(){var e;var t=(e=this.optionsManager.getOptions().defaultValue)!==null&&e!==void 0?e:[];this.value=t.map((function(e){return{nodeid:e,shortpathTranslated:"Node ".concat(e)}}));this.setDisplayedValue(this.value)};e.prototype.componentWillRender=function(){this.mylog("----- componentWillRender beginning -----")};e.prototype.componentDidRender=function(){this.mylog("----- componentDidRender beginning -----")};e.prototype.componentDidLoad=function(){this.mylog("----- componentDidLoad beginning -----");focusMainInput()};e.prototype.displayWhenLoaded=function(){var e;if(!this.canload){this.displayPickerError("Error(s) in the picker configuration!");return}if(((e=this.optionsManager.getOptions())===null||e===void 0?void 0:e.loading)=="display"){this.loadDataForTree(true,document.querySelector("#hierarchized-picker-"+this.componentID+" .loader"))}};e.prototype.initComponent=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;var r=this;return __generator(this,(function(n){switch(n.label){case 0:if(!this.optionsManager.getOptions().multiple)this.optionsManager.updateOptions({multiple:false});if(!this.optionsManager.getOptions().mode)this.optionsManager.getOptions().mode="input";if(!this.optionsManager.getOptions().defaultValue){this.optionsManager.updateOptions({defaultValue:[]})}else if(typeof this.optionsManager.getOptions().defaultValue!="object"){this.optionsManager.updateOptions({defaultValue:[this.optionsManager.getOptions().defaultValue]})}e=true;t=undefined;if(!this.isDisabled)this.isDisabled=false;if(this.optionsManager.getOptions().readonly!==undefined)this.isDisabled=this.optionsManager.getOptions().readonly;if(!this.optionsManager.getOptions().loading)this.optionsManager.updateOptions({loading:"display"});if(!this.optionsManager.getOptions().displayTree&&this.optionsManager.getOptions().displayTree!=false)this.optionsManager.updateOptions({displayTree:true});if(!this.optionsManager.getOptions().isFullpath&&this.optionsManager.getOptions().isFullpath!=false)this.optionsManager.updateOptions({isFullpath:true});if(!this.optionsManager.getOptions().showAutocomplete)this.optionsManager.getOptions().showAutocomplete=false;if(!this.optionsManager.getOptions().openTreeWhenLoaded)this.optionsManager.getOptions().openTreeWhenLoaded=false;if(!this.optionsManager.getOptions().displayRootNode)this.optionsManager.getOptions().displayRootNode=false;if(!this.optionsManager.getOptions().keyboardNavigation)this.optionsManager.getOptions().keyboardNavigation=false;if(!this.optionsManager.getOptions().dragAndDropEnabled)this.optionsManager.getOptions().dragAndDropEnabled=false;if(!this.optionsManager.getOptions().defaultValueIsFullpath)this.optionsManager.getOptions().defaultValueIsFullpath=false;if(!this.optionsManager.getOptions()&&this.optionsManager.getOptions().errorsInInput!==false)this.optionsManager.updateOptions({errorsInInput:true});if(!this.hasFocus)this.hasFocus=[];try{this.optionsManager.getOptions().defaultValue.map((function(){}))}catch(e){this.errorToLog="There's an issue with your defaultValue format: "+this.optionsManager.getOptions().defaultValue.toString();return[2]}return[4,Promise.all(this.optionsManager.getOptions().defaultValue.map((function(n){return __awaiter(r,void 0,void 0,(function(){var r,i,o,a,s;var u=this;return __generator(this,(function(l){switch(l.label){case 0:if(!(this.optionsManager.getOptions().defaultValueIsFullpath||!(typeof n=="number")&&!strIsNumeric(n)))return[3,6];if(!t){t=[]}r="";i=this.optionsManager.getOptions().source;switch(i){case"file":return[3,1];case"data":return[3,2];case"webservice":return[3,3]}return[3,5];case 1:r="The loading of nodes based on fullpath is not available on file mode for now!";return[3,5];case 2:if(this.theOptions.origin=="classification"){r="The loading of nodes based on fullpath is not available on file mode for the classification context for now!";return[3,5]}o=function(e){if(e.data.fullpath===n||e.data.fullpathTranslated===n){return e.key}if(e.children&&e.children.length>0){for(var t=0,r=e.children;t<r.length;t++){var i=r[t];var a=o(i);if(a){return a}}}return null};if(n){a=o(this.theOptions.data);if(a)t.push(a)}return[3,5];case 3:return[4,this.rawDataManager.fetchNodeIdFromFullpath(n,this.optionsManager.getOptions()).catch((function(e){u.displayPickerError(e)}))];case 4:s=l.sent();if(s){t.push(s)}return[3,5];case 5:if(r.length>0){this.displayPickerError(r);this.errorToLog=r;e=false}l.label=6;case 6:return[2]}}))}))})))];case 1:n.sent();if(t){this.optionsManager.getOptions().defaultValue=t}if(this.optionsManager.getOptions().options){if(this.optionsManager.getOptions().defaultValue.length>0){if(e){this.optionsManager.getOptions().options.Reach=this.optionsManager.getOptions().defaultValue.map((function(e){return Number(e)}))}else{this.errorToLog="theOptions.options.Reach is undefined and can't be auto-assigned: either specify a 'Reach' option "+" in your webservice call options or make sure the defaultValue property contains node IDs and not fullpath values."}}}return[2]}}))}))};e.prototype.loadHierarchizedPicker=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){var t,r,n;var i=this;return __generator(this,(function(o){switch(o.label){case 0:if(!e){if(this.el.getAttribute("options")&&typeof this.el.getAttribute("options")=="string"){this.optionsManager.updateOptions(JSON.parse(this.el.getAttribute("options")))}}{this.mylog=function(){};console.time=function(){};console.timeEnd=function(){}}if(this.optionsManager.getOptions().id){this.componentID=this.optionsManager.getOptions().id}else if(!this.componentID){t=Array.from(document.querySelectorAll("reneco-hierarchized-picker")).indexOf(this.el)+1;while(document.querySelectorAll("#hierarchized-picker-".concat(t)).length>0){t++}this.componentID=t.toString()}if(!this.optionsManager.getOptions())return[2];this.optionsManager.updateDefaultValue();r=isInstanceOfIConf(this.optionsManager.getOptions());this.canload=r.toret;this.errorToLog=r.errorToLog;return[4,this.initComponent()];case 1:o.sent();n=defaultPickerTheme;defaultPickerTheme.modale.height=this.modaleHeight+"px";applyPickerTheme(this.optionsManager.getOptions().theme,n);this.mylog(this.optionsManager.getOptions());window.addEventListener("click",(function(e){var t=amIFocusedByEvent(e,i.componentID);if(!t&&i.optionsManager.getOptions().mode!="tree"){i.showTree("hide")}}));this.el.addEventListener("dragover",(function(e){e.preventDefault()}));this.el.addEventListener("dragenter",(function(e){e.preventDefault()}));this.translateDataForTree(this.rawDataManager.getData());return[2]}}))}))};e.prototype.clearPicker=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n,i;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.getValue()];case 1:e=o.sent();for(t=0,r=this.value;t<r.length;t++){n=r[t];this.loadedTreeJs.setValue(n.nodeid);this.loadedTreeJs.updateLiElements()}this.value=[];this.setDisplayedValue([]);this.loadedTreeJs.options.onChange();return[4,this.getValue()];case 2:i=o.sent();this.valueChange.emit({oldValue:e,newValue:i,value:i});return[2]}}))}))};e.prototype.errorLoadingXHR=function(){var e;this.displayPickerError("Error loading webservice data!");try{document.querySelector("#tree-area-"+this.componentID).innerHTML="Error loading webservice data!";(e=document.querySelector("#hierarchized-picker-"+this.componentID+" .hierarchized-picker-search input"))===null||e===void 0?void 0:e.remove();this.canload=false;this.showTree("hide");this.ready=true;this.ignoreOptionsChanges=false}catch(e){this.errorToLog="Error loading webservice data!"}};e.prototype.displayPickerError=function(e){if(e===void 0){e=""}try{document.querySelector("#hierarchized-picker-"+this.componentID).classList.add("fieldError");if(this.optionsManager.getOptions().errorsInInput){if(e==""){e="There has been an error ... > [Generic error]"}this.displayedValue=e;this.isDisabled=true;this.errorToLog=e}}catch(t){this.errorToLog=e}};e.prototype.getApiSearchURL=function(){if(this.optionsManager.getOptions().origin=="classification"){var e=this.optionsManager.getOptions().url;if(e.indexOf("getTree")>-1){return e.replace("/getTree/","/search/")}else{var t=this.optionsManager.getOptions().url.substring(0,this.optionsManager.getOptions().url.lastIndexOf("/"));var r=t.substring(t.lastIndexOf("/"),t.length);return t.substring(0,t.lastIndexOf("/"))+"/search"+r}}else{return this.optionsManager.getOptions().url.substring(0,this.optionsManager.getOptions().url.lastIndexOf("/"))+"/GetTreeFromSearch"}};e.prototype.getContextualApiURL=function(e,t){if(e===void 0){e=false}if(t===void 0){t=null}var r=t||this.optionsManager.getOptions(),n=r.options,i=r.url;if(e&&n.Reach){var o=window.location.origin;var a=new URL(i,o);var s=a.pathname.split("/").filter(Boolean);var u=s.indexOf("getTree");if(u!==-1){s[u]="reach"}var l="/"+s.join("/");return"".concat(a.origin).concat(l)}return i};e.prototype.getContextualApiParams=function(e,t,r){if(e===void 0){e=null}if(t===void 0){t=null}if(r===void 0){r=false}if(!e)e=this.optionsManager.getOptions().options;var n=Object.assign({},e);if(!r)delete n.Reach;if(n.Reach){if("startNode"in n){n.startingnode=n.startNode;delete n.startNode}else if("StartNodeID"in n){n.startingnode=n.StartNodeID;delete n.StartNodeID}}else if(t){n.searchedValue=t;if("startNode"in n){n.StartNodeID=n.startNode;delete n.startNode}}return n};e.prototype.translateDataForTree=function(e,t,r){if(t===void 0){t=null}if(r===void 0){r=null}if(r&&r!=""){this.loadSearchDataInCurrentTree(t,r)}else{this.triggerTreeDisplay(e,r)}};e.prototype.loadSearchDataInCurrentTree=function(e,t){var r=this;var n=function(){if(r.searchToDisplay>-1){if(!t)r.setSearchResults([]);r.triggerTreeDisplay(r.rawDataManager.getData(),t);displayAutocompleteWithResults(r.rawDataManager.getData(),t,r.optionsManager,r.editValue.bind(r),r.showTree.bind(r));document.querySelectorAll("#tree-area-"+r.componentID+" .treejs-node").forEach((function(e){var t;var n=Array.prototype.slice.call(e.querySelectorAll("ul > li > span"));var i=n.filter((function(e){return e.textContent==="undefined"}));if(i.length==0&&!((t=r.loadedTreeJs.nodesById[e.nodeId])===null||t===void 0?void 0:t.isDesaturated)&&r.loadedTreeJs.nodesById[e.nodeId].children.length>0){e.classList.remove("treejs-node__close")}}))}};var i=function(e){if(r.searchToDisplay>-1){r.rawDataManager.mergeData(e,r.theOptions.origin=="classification"?"ID":"key");e.children.forEach((function(e,t){completeCurrentTreeWithTree(r.loadedTreeJs,e,r.optionsManager.getOptions())}));n()}};if(this.theOptions.source=="webservice"){if(this.theOptions.origin=="classification"){this.rawDataManager.getFromClassification(this.getApiSearchURL(),Object.assign({},this.getContextualApiParams(null,t)),document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")).then((function(e){i(e)})).catch((function(e){r.errorToLog=e}))}else{this.rawDataManager.getFromSource(this.getApiSearchURL(),{StartNodeID:this.theOptions.options.StartNodeID,lng:this.theOptions.options.lng,searchedValue:t,searchNameOnly:true,deprecated:false},document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")).then((function(e){i(e)})).catch((function(e){r.errorToLog=e;try{r.errorToLog="getDataFromSource 1 rejected:"+JSON.stringify(e,replacer,2)}catch(t){r.errorToLog=JSON.stringify(e,replacer,2)}}))}}else{if(this.optionsManager.getOptions().source=="data"){n()}else{console.error("Unhandled picker settings for search scenario !!")}}};e.prototype.triggerTreeDisplay=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n;return __generator(this,(function(i){if(!e)return[2];this.mylog("Translate from ".concat(this.optionsManager.getOptions().origin," ! (").concat(this.optionsManager.getOptions().source,")"),e);r=!this.optionsManager.getOptions().displayRootNode?e.children:[e];n=fillTreeWithObject([],r,t,this.optionsManager.getOptions());if(t){this.setSearchResults(n)}this.displayTree(n,t!=null);return[2]}))}))};e.prototype.deactivateNodesOutOfDepthSettings=function(){if(this.optionsManager.getOptions().maxDepth!=undefined||this.optionsManager.getOptions().minDepth!=undefined){for(var e in this.loadedTreeJs.nodesById){var t=this.loadedTreeJs.nodesById[e];if(t.depth<this.optionsManager.getOptions().minDepth||t.depth>this.optionsManager.getOptions().maxDepth){this.loadedTreeJs.liElementsById[t.id].classList.add("readonly_node")}}}};e.prototype.displayTree=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var r;var n=this;return __generator(this,(function(i){if(!this.optionsManager.getOptions().displayTree&&this.ready)return[2];if(e.length==0){this.el.querySelector(".hierarchized-picker-tree").innerHTML="No search results ...";return[2]}r=new Tree("#tree-area-"+this.componentID,{parentApi:this,rawDataManager:this.rawDataManager,completeCurrentTreeWithTree:completeCurrentTreeWithTree,data:!this.loadedTreeJs||t?e:fillTreeWithObject([],this.rawDataManager.getData().children,null,this.optionsManager.getOptions()),onChange:function(){return __awaiter(n,void 0,void 0,(function(){var e,t,r;var n=this;return __generator(this,(function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);return[4,this.getValue()];case 1:e=i.sent();return[3,3];case 2:t=i.sent();e=null;return[3,3];case 3:r=function(){return __awaiter(n,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.getValue()];case 1:t=r.sent();if(this.valueChangeCallback&&this.ready&&!this.shownTree){this.valueChangeCallback(t)}this.valueChange.emit({oldValue:e,newValue:t,value:t});return[2]}}))}))};r();return[2]}}))}))},loaded:function(){n.mylog("loaded");n.ready=true;n.ignoreOptionsChanges=false}});if(this.searchResultData.length==0){Object.values(r.liElementsById).forEach((function(e){e.classList.remove("treejs-node__searchmatch")}))}this.loadedTreeJs=r;this.collapseAllNodes();if(this.hasFocus.indexOf("hide")==-1)this.checkFields(this.value,false);this.setDisplayedValue(this.value);this.showSelectedNodes();this.deactivateNodesOutOfDepthSettings();document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-checkbox").forEach((function(e){return e.style.display=n.theOptions.multiple?"inline-block":"none"}));return[2]}))}))};e.prototype.onItemContextMenuItemClick=function(e){if(e.target&&e.target.id){function t(e,t){var r=Object.values(e).find((function(e){var r;return(r=e.children)===null||r===void 0?void 0:r.some((function(e){return e.id===t}))}))||null;if(!e[t])return null;var n=0;var i=t;while(true){var o=Object.values(e).find((function(e){var t;return(t=e.children)===null||t===void 0?void 0:t.some((function(e){return e.id===i}))}));if(!o)break;n++;i=o.id}return{parent:r,depth:n}}var r=t(this.loadedTreeJs.nodesById,e.target.id);e.target.depth=r.depth;e.target.parentId=r.parent.id}this.itemContextMenuItemClick.emit(e)};e.prototype.setNodeAsSelected=function(e,t,r){if(this.isDisabled&&this.optionsManager.getOptions().mode!="tree"&&this.shownTree&&this.setValueOnClick||this.loadedTreeJs.liElementsById[e]&&this.loadedTreeJs.liElementsById[e].classList.value&&this.loadedTreeJs.liElementsById[e].classList.value.indexOf("readonly_node")!=-1){return}if(!r&&t.getValues().indexOf(e.toString())!=-1)return;if(this.loadedTreeJs&&!this.theOptions.multiple)this.loadedTreeJs.emptyNodesCheckStatus();this.ignoreOptionsChanges=true;var n=t.nodesById[e];var i=t.options.onChange;if(!n){this.logError("The current selected value is not part of the loaded tree!")}else{if(!n.disabled){t.setValue(e);t.updateLiElements()}r&&i&&i.call(t);if(this.setValueOnClick){this.editValue(n,r);if(this.shownTree&&r){if(!this.optionsManager.getOptions().multiple){this.showTree("hide")}}}}this.ignoreOptionsChanges=false};e.prototype.collapseAllNodes=function(){document.querySelectorAll("#tree-area-"+this.componentID+" .treejs-node").forEach((function(e){return e.classList.add("treejs-node__close")}))};e.prototype.showSelectedNodes=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){if(e){setTimeout((function(){t.scrollToNode()}),200)}else{this.scrollToNode()}return[2]}))}))};e.prototype.scrollToNodeWithId=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var r,n,i;var o=this;return __generator(this,(function(a){r=this.loadedTreeJs.liElementsById[e];if(!r){n=this.getContextualApiParams(Object.assign(Object.assign({},this.theOptions.options),{Reach:[e]}),null,true);i=this.getContextualApiURL(true,Object.assign(Object.assign({},this.theOptions),{options:n}));this.rawDataManager.getFromClassification(i,n,document.querySelector("#hierarchized-picker-"+this.componentID+" .loader")).then((function(r){completeCurrentTreeWithTree(o.loadedTreeJs,r,o.theOptions);o.scrollToNode(e,t)}))}return[2]}))}))};e.prototype.showTree=function(e){var t=this;if(!this.hasFocus)this.hasFocus=[];clearAutocomplete();if(!this.canload||!this.optionsManager.getOptions().displayTree)return;var r=false;if((e==="hide"||this.isDisabled)&&!r){this.hasFocus=["hide"];var n=document.querySelector("#hierarchized-picker-"+this.componentID+" input.hierarchized-picker-search");if(n){n.value=""}this.search("")}else{if(this.hasFocus.indexOf(e)===-1&&this.hasFocus.indexOf("hide")===-1){this.hasFocus.push(e)}}if(this.hasFocus.indexOf("hide")>-1&&!r){this.hasFocus=[]}else{if(!this.shownTree&&this.theOptions.loading=="click"&&!this.ready){this.loadDataForTree(true,document.querySelector("#hierarchized-picker-"+this.componentID+" .loader"))}}var i=this.shownTree;this.shownTree=this.hasFocus.length>0;if(this.shownTree&&!i&&this.optionsManager.getOptions().mode=="input"){if(this.shouldOpenModalAbove(document.querySelector("#hierarchized-picker-input-"+this.componentID),this.modaleHeight)){this.modalePosition="top"}else{this.modalePosition="bottom"}setTimeout((function(){return focusSearchInput(t)}),100);setupKeyboardNavigation(this,this.optionsManager,this.navigateInTree)}};e.prototype.editValue=function(e,t){if(t===void 0){t=false}if(!this.value){this.value=[]}var r=this.value.findIndex((function(t){return t.nodeid==e.id}));if(r>-1){if(t)this.value.splice(r,1);else return}else{if(this.optionsManager.getOptions().multiple){this.value=__spreadArray(__spreadArray([],this.value,true),[{nodeid:e.id,fullpath:e.fullpath,fullpathTranslated:e.fullpathTranslated,shortpathTranslated:e.text,hasChildren:e.children&&e.children.length>0}],false)}else{this.value[0]={nodeid:e.id,fullpath:e.fullpath,fullpathTranslated:e.fullpathTranslated,shortpathTranslated:e.text,hasChildren:e.children&&e.children.length>0}}}this.setDisplayedValue(this.value)};e.prototype.getShortpathFromFullpath=function(e){if(!e||e.indexOf(">")==-1)return e;return e.substring(e.lastIndexOf(">")+1)};e.prototype.setDisplayedValue=function(e){var t=this;if(e===void 0){e=null}if(!e)e=this.value;var r=e.map((function(e){var r,n,i;return t.optionsManager.getOptions().source=="data"?(r=t.optionsManager.getOptions().language=="fr"?t.getShortpathFromFullpath(e.fullpathTranslated):t.getShortpathFromFullpath(e.fullpath))!==null&&r!==void 0?r:"Node ".concat(e.nodeid):(i=t.optionsManager.getOptions().isFullpath?t.getShortenedFullpath((n=e.fullpathTranslated)!==null&&n!==void 0?n:e.fullpath):e.shortpathTranslated)!==null&&i!==void 0?i:"Node ".concat(e.nodeid)})).join(";");this.displayedValue=r};e.prototype.search=function(e){var t=this;this.loader.classList.add("loading");var r=document.querySelector("#hierarchized-picker-"+this.componentID+" .hierarchized-picker-search input");if(this.optionsManager.getOptions().mode=="input"&&r){r.classList.remove("fieldError")}if(e.length>2){this.searchToDisplay+=1;var n=this.searchToDisplay;setTimeout((function(){if(t.searchToDisplay==n){t.triggerSearch(e);t.checkFields(t.value,false)}}),waitBeforeTriggerSearch)}else{this.searchToDisplay=-1;if(this.optionsManager.getOptions().source=="webservice"){if(this.optionsManager.getOptions().origin=="classification"){this.optionsManager.getOptions().options.startNode}else{this.optionsManager.getOptions().options.StartNodeID}this.translateDataForTree(this.rawDataManager.getData(),null)}else{this.translateDataForTree(this.rawData,null)}displayAutocompleteWithResults(null,"",this.optionsManager,this.editValue.bind(this),this.showTree.bind(this));this.setSearchResults([])}this.loader.classList.remove("loading")};e.prototype.triggerSearch=function(e){this.translateDataForTree(this.rawDataManager.getData(),null,e)};e.prototype.setRawDataFromFile=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,this.rawDataManager.loadDataFromFile(e)];case 1:r.sent();this.formatDefaultValue();this.showSelectedNodes();return[3,3];case 2:t=r.sent();this.displayPickerError('Error loading data from path "'.concat(e,'": ').concat(t.message));return[3,3];case 3:return[2]}}))}))};e.prototype.loadDataForTree=function(e,t){var r=this;if(this.optionsManager.getOptions().source=="webservice"){if(this.optionsManager.getOptions().origin=="classification"){var n=this.getContextualApiParams(null,null,true);var i=this.getContextualApiURL(true);this.rawDataManager.getFromClassification(i,n,t).then((function(t){r.rawData=t;if(e){r.formatDefaultValue();r.showSelectedNodes();r.checkFields(r.value)}})).catch((function(e){r.errorToLog=e}))}else{this.rawDataManager.getFromSource(this.optionsManager.getOptions().url,this.optionsManager.getOptions().options,t).then((function(t){r.rawData=t;if(e){r.formatDefaultValue();r.showSelectedNodes()}})).catch((function(e){r.errorToLog=e}))}}if(this.optionsManager.getOptions().source=="data"){var o=this.optionsManager.data;this.rawData=o;this.formatDefaultValue()}if(this.optionsManager.getOptions().source=="file"){this.setRawDataFromFile(this.optionsManager.getOptions().url)}this.translateDataForTree(this.rawDataManager.getData())};e.prototype.checkFields=function(e,t){var r=this;if(t===void 0){t=true}if(!this.loadedTreeJs)return;this.setValueOnClick=t;var n=[];if(e){e.forEach((function(e){var t,i,o;var a=e.nodeid||e.ID||e.key||undefined;if(typeof a==="string"&&isNumeric(a)){a=parseInt(a)}var s=r.loadedTreeJs.nodesById[a];if(s){n.push({nodeid:a,shortpathTranslated:(t=s.text)!==null&&t!==void 0?t:"Node ".concat(a),fullpathTranslated:(i=s.fullpathTranslated)!==null&&i!==void 0?i:null,fullpath:(o=s.fullpath)!==null&&o!==void 0?o:null,hasChildren:s.children&&s.children.length>0})}else{console.warn("Node not found in Tree for:",a)}r.setNodeAsSelected(a,r.loadedTreeJs,false)}))}this.setDisplayedValue(n);this.value=n;this.setValueOnClick=true};e.prototype.formatDefaultValue=function(){var e=0;var t=this;var r=[];function n(e){if(Array.isArray(e)){e.forEach((function(e){return n(e)}))}else{var t=r.some((function(t){return(t.nodeid||t.ID)==(e.nodeid||e.ID)}));if(!t){r.push(e)}}}var i=function(r){r.forEach((function(r){t.theOptions.defaultValue.forEach((function(i){if(typeof i=="string"&&isNumeric(i)){i=parseInt(i)}if(t.theOptions.origin=="classification"){if(typeof i=="string"&&getPropertyFromNode(r,"Properties").FullPath==i||typeof i=="number"&&getPropertyFromNode(r,"ID")==i){r.nodeid=r.id;n([r]);e++}}else{if(typeof i=="string"&&getPropertyFromNode(r,"fullpathTranslated")==i||typeof i=="number"&&getPropertyFromNode(r,"key")==i){r.nodeid=r.key;n([r]);e++}}}));if(r.children)i(r.children)}))};if(this.rawDataManager.getData()){i([this.rawDataManager.getData()])}t.checkFields(r);if(this.theOptions.defaultValue.length!=e){if(e==0){try{this.errorToLog="The loaded tree doesn't contain the nodes passed to options.defaultValue : "+this.theOptions.defaultValue.map((function(e){return e})).join(",")}catch(e){this.errorToLog="The loaded tree doesn't contain the nodes passed to options.defaultValue : there's an issue with your defaultValue > "+this.theOptions.defaultValue.toString()}}else{this.errorToLog="The loaded tree contains multiple nodes of what has been passed to options.defaultValue : "+this.theOptions.defaultValue.map((function(e){return e})).join(",")}this.displayPickerError("Error(s) when loading tree default value(s)!")}};e.prototype.getFullpathTooltip=function(){var e=this;if(!this.value||this.value.length===0){return"No selection"}return this.value.map((function(t){var r,n;return(n=(r=e.getShortenedFullpath(t.fullpathTranslated))!==null&&r!==void 0?r:t.fullpath)!==null&&n!==void 0?n:"Node ".concat(t.nodeid)})).join("; ")};e.prototype.shouldOpenModalAbove=function(e,t){if(this.optionsManager.getOptions().mode!="input")return false;var r=e.getBoundingClientRect();var n=window.innerHeight-r.y;return n<t};e.prototype.render=function(){var e=this;return this.optionsManager.getOptions()?h("div",{id:"hierarchized-picker-"+this.componentID,class:"hierarchized-picker "+(this.isDisabled?"readonly-mode":"")},this.optionsManager.getOptions().mode=="input"?h("div",{class:"hierarchized-picker-container"},h("div",{style:{display:"none"},ref:function(t){e.loader=t}}),h("div",{class:"hierarchized-picker-input-area"},this.optionsManager.getOptions().label?h("label",{class:"hierarchized-picker-label"},getLanguageValue(this.optionsManager.getOptions().label,this.optionsManager.getOptions().language,defaultLanguage)):"",h("span",{class:"hierarchized-picker-input "+(this.optionsManager.getOptions().icon&&this.optionsManager.getOptions().icon.length>0?"hierarchized-picker-icon":"")+" reneco "+(this.optionsManager.getOptions().icon?this.optionsManager.getOptions().icon:"")+(this.isDisabled?" readonly ":"")+" sc-ion-input-md-h sc-ion-input-md-s md ",id:"hierarchized-picker-input-"+this.componentID,onClick:function(t){e.showTree("picker")},onFocusin:function(t){e.showTree("modale")}},h("input",{class:"native-input sc-ion-input-md","aria-labelledby":"ion-input-13-lbl",autocapitalize:"off",autocomplete:"off",autocorrect:"off",name:"ion-input-13",placeholder:"",readonly:"",spellcheck:"false",type:"text",value:this.displayedValue,title:this.getFullpathTooltip()})),this.displayedValue&&!this.isDisabled&&this.canload?h("span",{class:"reneco reneco-close",onClick:function(){return e.clearPicker()}}):""),h("div",{ref:function(t){e.scrollable=t},class:"hierarchized-picker-modal-area ".concat(!this.shownTree?" hidden ":""," ").concat(this.modalePosition=="top"?"display-modale-top":""),onClick:function(t){clickPickerModalArea(e)}},h("div",{class:"loader",ref:function(t){e.loader=t}},h("div",{class:"loader-inner"},"Loading...")),h("div",{class:"hierarchized-picker-modal ".concat(!this.ready?"hidden":""),tabindex:"0"},h("search-input",{placeholder:getLanguageValue(this.optionsManager.getOptions().searchPlaceholder,this.optionsManager.getOptions().language,defaultLanguage),onInputFocus:function(){return focusInSearchEvent(e)},onInputBlur:function(){return focusOutSearchEvent(e,event)},onSearch:function(t){return e.search(t.detail)}}),h("ul",{id:"autocomplete-results-area"}),h("div",{id:"tree-area-"+this.componentID,class:"hierarchized-picker-tree hierarchized-picker-tree-area "+this.pickerClass})))):h("div",{class:"hierarchized-picker-raw-tree-area"+(this.isDisabled?" readonly":""),tabindex:"0",onClick:function(t){clickPickerModalArea(e)}},h("div",{class:"loader",ref:function(t){e.loader=t}},h("div",{class:"loader-inner"},"Loading...")),h("div",{ref:function(t){e.scrollable=t},id:"tree-area-"+this.componentID,class:"hierarchized-picker-tree scrollable hierarchized-picker-raw-tree "+this.pickerClass}))):h("div",{class:"fieldError"},"Generic loading issue...")};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{searchResultData:["searchResultDataChange"],errorToLog:["logError"],newoptions:["setNewOptions"],newfilter:["setNewFilter"],options:["optionsChange"],rawData:["rawDataWatcher"]}},enumerable:false,configurable:true});return e}();HierarchizedPickerComponent.style=hierarchizedPickerCss;var searchInputCss=".search-input-container{display:-ms-flexbox;display:flex;gap:8px;margin-top:10px}.search-input-container .reneco-search{margin-top:3px}.search-input-container input{border-radius:4px;padding:5px}.search-input{width:100%;border:none}.search-input:focus{border:none !important;outline:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}reneco-hierarchized-picker .hierarchized-picker-input-area .input-wrapper{padding-left:10px !important}reneco-hierarchized-picker .hierarchized-picker-input input,reneco-hierarchized-picker .hierarchized-picker-search input{font-size:var(--hpicker-theme-typography-body-font-size, var(--mui-typography-body-font-size, 14px)) !important;font-weight:var(--hpicker-theme-typography-body-font-weight, var(--mui-typography-body-font-weight, 400)) !important}reneco-hierarchized-picker .hierarchized-picker-search input{color:var(--hpicker-theme-palette-font-color, var(--mui-palette-font-color, var(--ion-color-light-tint, #fff))) !important}reneco-hierarchized-picker #searchInTree{padding:8.5px 8px;background:var(--hpicker-theme-palette-background-default, var(--mui-palette-background-default, var(--ion-color-background, rgba(221, 169, 37, 0.18))));border:none !important;border-radius:4px}reneco-hierarchized-picker #searchInTree:focus{border:none !important;outline:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}";var SearchInput=function(){function e(e){registerInstance(this,e);this.inputFocus=createEvent(this,"inputFocus",7);this.inputBlur=createEvent(this,"inputBlur",7);this.search=createEvent(this,"search",7);this.placeholder=undefined}e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){(e=this.inputElement)===null||e===void 0?void 0:e.focus();return[2]}))}))};e.prototype.handleFocus=function(){this.inputFocus.emit()};e.prototype.handleBlur=function(e){var t=this;var r=e.relatedTarget;setTimeout((function(){var e=document.activeElement===t.inputElement||r&&t.rootElement.contains(r);if(!e){t.inputBlur.emit()}}),100)};e.prototype.handleInput=function(e){var t=e.target;var r=t.value;if(r!==this.previousValue){this.previousValue=r;this.search.emit(r)}};e.prototype.render=function(){var e=this;return h("div",{id:"hierarchized-picker-input-search",class:"search-input-container",ref:function(t){return e.rootElement=t}},h("div",{class:"reneco reneco-search"}),h("input",{ref:function(t){return e.inputElement=t},type:"text",class:"native-input sc-ion-input-md-h sc-ion-input-md-s md search-input hierarchized-picker-search",placeholder:this.placeholder,onFocus:function(){return e.handleFocus()},onBlur:function(t){return e.handleBlur(t)},onInput:function(t){return e.handleInput(t)}}))};return e}();SearchInput.style=searchInputCss;export{HierarchizedPickerComponent as reneco_hierarchized_picker,SearchInput as search_input};