@mongodb-js/compass-aggregations 8.22.0 → 8.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.depcheckrc +2 -0
- package/.eslintignore +1 -1
- package/README.md +0 -2
- package/dist/browser.js +2 -0
- package/{lib → dist}/browser.js.LICENSE.txt +0 -0
- package/{lib → dist}/index.css +311 -566
- package/dist/index.js +15 -0
- package/{lib → dist}/index.js.LICENSE.txt +0 -0
- package/package.json +44 -48
- package/tsconfig-lint.json +1 -1
- package/lib/browser.js +0 -2
- package/lib/index.js +0 -15
package/lib/browser.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
/*! For license information please see browser.js.LICENSE.txt */
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AggregationsPlugin=t():e.AggregationsPlugin=t()}(self,(function(){return(()=>{var e={9388:e=>{"use strict";var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var s={},o=[],a=0;a<e.length;a++){var u=e[a],l=i.base?u[0]+i.base:u[0],c=s[l]||0,p="".concat(l," ").concat(c);s[l]=c+1;var h=n(p),d={css:u[1],media:u[2],sourceMap:u[3]};-1!==h?(t[h].references++,t[h].updater(d)):t.push({identifier:p,updater:r(d,i),references:1}),o.push(p)}return o}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=i(e=e||[],r=r||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var u=i(e,r),l=0;l<s.length;l++){var c=n(s[l]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}s=u}}},1914:e=>{"use strict";var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},370:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t),t}},6566:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},6053:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i=n.css,r=n.media,s=n.sourceMap;r?e.setAttribute("media",r):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},6682:e=>{"use strict";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))}}},9910:(e,t,n)=>{e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){"use strict";var i=e("./lib/dom"),r=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),a=e("./range").Range,u=e("./range_list").RangeList,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,p=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return p.getText&&p.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};function d(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}h.SELECTED_TEXT=h.SELECTION;var f=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,s),this.getTokenizer=function(){return f.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+t("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return f.$tokenizer=new c({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=i,[i[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),null==i?"":i},this.variables=h,this.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var s="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,a=e.replace(r,(function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);for(var t=o.resolveVariables(s,n),i="E",r=0;r<t.length;r++){var a=t[r];if("object"==typeof a)if(t[r]="",a.changeCase&&a.local){var u=t[r+1];u&&"string"==typeof u&&("u"==a.changeCase?t[r]=u[0].toUpperCase():t[r]=u[0].toLowerCase(),t[r+1]=u.substr(1))}else a.changeCase&&(i=a.changeCase);else"U"==i?t[r]=a.toUpperCase():"L"==i&&(t[r]=a.toLowerCase())}return o.variables.__=e,t.join("")}));return a},this.tmFormatFunction=function(e,t,n){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},this.resolveVariables=function(e,t){for(var n=[],i="",r=!0,s=0;s<e.length;s++){var o=e[s];if("string"!=typeof o){if(o){if(r=!1,o.fmtString){var a=e.indexOf(o,s+1);-1==a&&(a=e.length),o.fmt=e.slice(s+1,a),s=a}if(o.text){var u=this.getVariableValue(t,o.text,i)+"";o.fmtString&&(u=this.tmStrFormat(u,o,t)),o.formatFunction&&(u=this.tmFormatFunction(u,o,t)),u&&!o.ifEnd?(n.push(u),l(o)):!u&&o.ifEnd&&l(o.ifEnd)}else o.elseEnd?l(o.elseEnd):(null!=o.tabstopId||null!=o.changeCase)&&n.push(o)}}else n.push(o),"\n"==o?(r=!0,i=""):r&&(i=/^\t*/.exec(o)[0],r=/\S/.test(o))}function l(t){var n=e.indexOf(t,s+1);-1!=n&&(s=n)}return n},this.insertSnippetForSelection=function(e,t){var n=e.getCursorPosition(),i=e.session.getLine(n.row),r=e.session.getTabString(),s=i.match(/^\s*/)[0];n.column<s.length&&(s=s.slice(0,n.column)),t=t.replace(/\r/g,"");var o=this.tokenizeTmSnippet(t);o=(o=this.resolveVariables(o,e)).map((function(e){return"\n"==e?e+s:"string"==typeof e?e.replace(/\t/g,r):e}));var a=[];o.forEach((function(e,t){if("object"==typeof e){var n=e.tabstopId,i=a[n];if(i||((i=a[n]=[]).index=n,i.value="",i.parents={}),-1===i.indexOf(e)){e.choices&&!i.choices&&(i.choices=e.choices),i.push(e);var r=o.indexOf(e,t+1);if(-1!==r){var s=o.slice(t+1,r);s.some((function(e){return"object"==typeof e}))&&!i.value?i.value=s:!s.length||i.value&&"string"==typeof i.value||(i.value=s.join(""))}}}})),a.forEach((function(e){e.length=0}));var u={};function l(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if("object"==typeof i){if(u[i.tabstopId])continue;i=t[e.lastIndexOf(i,n-1)]||{tabstopId:i.tabstopId}}t[n]=i}return t}for(var c=0;c<o.length;c++){var p=o[c];if("object"==typeof p){var h=p.tabstopId,d=a[h],f=o.indexOf(p,c+1);if(u[h])u[h]===p&&(delete u[h],Object.keys(u).forEach((function(e){d.parents[e]=!0})));else{u[h]=p;var g=d.value;"string"!=typeof g?g=l(g):p.fmt&&(g=this.tmStrFormat(g,p,e)),o.splice.apply(o,[c+1,Math.max(0,f-c)].concat(g,p)),-1===d.indexOf(p)&&d.push(p)}}}var v=0,y=0,b="";o.forEach((function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(y=t[t.length-1].length,v+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:v,column:y}:e.start={row:v,column:y})}));var x=e.getSelectionRange(),E=e.session.replace(x,b),w=new m(e),C=e.inVirtualSelectionMode&&e.selection.index;w.addTabstops(a,x.start,E,C)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection((function(){n.insertSnippetForSelection(e,t)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),i=e.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?t="javascript":"css-"==i.substring(0,4)?t="css":"php-"==i.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],i=this.snippetMap;return i[t]&&i[t].includeScopes&&n.push.apply(n,i[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),r=e.session.getLine(i.row),s=r.substring(0,i.column),o=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,s,o)),!!n}),this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var r=e[i];if((!r.startRe||r.startRe.test(t))&&(!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var n=this.snippetMap,i=this.snippetNameMap,r=this;function s(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,n){return e=s(e),t=s(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function u(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],i[t]={});var s=i[t];if(e.name){var u=s[e.name];u&&r.unregister(u),s[e.name]=e}n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=o.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(u):Object.keys(e).forEach((function(t){u(e[t])})),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var n=this.snippetMap,i=this.snippetNameMap;function r(e){var r=i[e.scope||t];if(r&&r[e.name]){delete r[e.name];var s=n[e.scope||t],o=s&&s.indexOf(e);o>=0&&s.splice(o,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(e){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var s=t[2],o=t[3];if("regex"==s){var a=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=a.exec(o)[1],i.trigger=a.exec(o)[1],i.endTrigger=a.exec(o)[1],i.endGuard=a.exec(o)[1]}else"snippet"==s?(i.tabTrigger=o.match(/^\S*/)[0],i.name||(i.name=o)):s&&(i[s]=o)}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var r=i[t];return r&&(n=r[e]),!!n}),this),n}}).call(f.prototype);var m=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=(this.tabstops||[]).slice(),s=0;s<r.length;s++){var o=r[s],a=o==n||i[o.index];if(o.rangeList.$bias=a?0:1,"remove"==e.action&&o!==n){var u=o.parents&&o.parents[n.index],l=o.rangeList.pointIndex(e.start,u);l=l<0?-l-1:l+1;var c=o.rangeList.pointIndex(e.end,u);c=c<0?-c-1:c-1;for(var p=o.rangeList.ranges.slice(l,c),h=0;h<p.length;h++)this.removeRange(p[h])}o.rangeList.$onChange(e)}var d=this.editor.session;this.$inChange||!t||1!=d.getLength()||d.getValue()||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.editor.session,i=n.getTextRange(e.firstNonLinked),r=0;r<e.length;r++){var s=e[r];if(s.linked){var o=s.original,a=t.snippetManager.tmStrFormat(i,o,this.editor);n.replace(s,a)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=0;i<this.ranges.length;i++)if(!this.ranges[i].linked){var r=this.ranges[i].contains(e.row,e.column),s=n||this.ranges[i].contains(t.row,t.column);if(r&&s)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);(n=Math.min(Math.max(n,1),t))==t&&(n=0),this.selectTabstop(n),0===n&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){this.selectedTabstop=t;var n=t.firstNonLinked||t;if(t.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var i=this.editor.multiSelect;i.toSingleRange(n);for(var r=0;r<t.length;r++)t.hasLinkedRanges&&t[r].linked||i.addRange(t[r].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(e,t,n){var i=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var r=a.fromPoints(n,n);v(r.start,t),v(r.end,t),e[0]=[r],e[0].index=0}var s=[this.index+1,0],o=this.ranges;e.forEach((function(e,n){for(var r=this.$openTabstops[n]||e,l=0;l<e.length;l++){var c=e[l],p=a.fromPoints(c.start,c.end||c.start);g(p.start,t),g(p.end,t),p.original=c,p.tabstop=r,o.push(p),r!=e?r.unshift(p):r[l]=p,c.fmtString||r.firstNonLinked&&i?(p.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=p)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===e&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r),r.rangeList=r.rangeList||new u,r.rangeList.$bias=0,r.rangeList.addList(r)}),this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}})}).call(m.prototype);var g=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}","snippets.css",!1),t.snippetManager=new f;var y=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(y.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,s=e("../range").Range,o=e("../lib/event"),a=e("../lib/lang"),u=e("../lib/dom"),l=function(e){var t=new i(e);t.$maxLines=4;var n=new r(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};u.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #3a674e;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4); position: absolute; z-index: 2;}.ace_dark.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid rgba(109, 150, 13, 0.8); background: rgba(58, 103, 78, 0.62);}.ace_completion-meta { opacity: 0.5; margin: 0.9em;}.ace_completion-message { color: blue;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #2d69c7;}.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #93ca12;}.ace_editor.ace_autocomplete { width: 300px; z-index: 200000; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4; background: #fefefe; color: #111;}.ace_dark.ace_editor.ace_autocomplete { border: 1px #484747 solid; box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); line-height: 1.4; background: #25282c; color: #c1c1c1;}","autocompletion.css",!1),t.AcePopup=function(e){var t=u.createElement("div"),n=new l(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i,r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),p.start.row=p.end.row=t.row,e.stop()}));var c=new s(-1,0,-1,1/0),p=new s(-1,0,-1,1/0);p.id=n.session.addMarker(p,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?c.id&&(n.session.removeMarker(c.id),c.id=null):c.id=n.session.addMarker(c,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(i){if(i.x!=e.x||i.y!=e.y){(i=e).scrollTop=n.renderer.scrollTop;var t=i.getDocumentPosition().row;c.start.row!=t&&(c.id||n.setRow(t),d(t))}}else i=e})),n.renderer.on("beforeRender",(function(){if(i&&-1!=c.start.row){i.$pos=null;var e=i.getDocumentPosition().row;c.id||n.setRow(e),d(e,!0)}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow];i!==t.selectedNode&&t.selectedNode&&u.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=i,i&&u.addCssClass(i,"ace_selected")}));var h=function(){d(-1)},d=function(e,t){e!==c.start.row&&(c.start.row=c.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return c.start.row},o.addListener(n.container,"mouseout",h),n.on("hide",h),n.on("changeSelection",h),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var f=n.session.bgTokenizer;return f.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t});var r=t.caption||t.value||t.name;function s(e,n){e&&i.push({type:(t.className||"")+(n||""),value:e})}for(var o=r.toLowerCase(),a=(n.filterText||"").toLowerCase(),u=0,l=0,c=0;c<=a.length;c++)if(c!=l&&(t.matchMask&1<<c||c==a.length)){var p=a.slice(l,c);l=c;var h=o.indexOf(p,u);if(-1==h)continue;s(r.slice(u,h),""),u=h+p.length,s(r.slice(h,u),"completion-highlight")}return s(r.slice(u,r.length),""),t.meta&&i.push({type:"completion-meta",value:t.meta}),t.message&&i.push({type:"completion-message",value:t.message}),i},f.$updateOnChange=r,f.start=r,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.data=[],n.setData=function(e,t){n.filterText=t||"",n.setValue(a.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return p.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),p.start.row!=e&&(n.selection.clearSelection(),p.start.row=p.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",(function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()})),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,r){var s=this.container,o=window.innerHeight,a=window.innerWidth,u=this.renderer,l=u.$maxLines*t*1.4,c=e.top+this.$borderSize;c>o/2&&!r&&c+t+l>o?(u.$maxPixelHeight=c-2*this.$borderSize,s.style.top="",s.style.bottom=o-c+"px",n.isTopdown=!1):(c+=t,u.$maxPixelHeight=o-c-.2*t,s.style.top=c+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="";var p=e.left;p+s.offsetWidth>a&&(p=a-s.offsetWidth),s.style.left=p+"px",this._signal("show"),i=null,n.isOpen=!0},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=l})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,n){"use strict";t.parForEach=function(e,t,n){var i=0,r=e.length;0===r&&n();for(var s=0;s<r;s++)t(e[s],(function(e,t){++i===r&&n(e,t)}))};var i=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||i;for(var r=[],s=t-1;s>=0&&n.test(e[s]);s--)r.push(e[s]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],s=t;s<e.length&&n.test(e[s]);s++)r.push(e[s]);return r},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),i=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(i,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(i,n.column)}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],(function(e,t,n){"use strict";var i=e("./keyboard/hash_handler").HashHandler,r=e("./autocomplete/popup").AcePopup,s=e("./autocomplete/util"),o=e("./lib/lang"),a=e("./lib/dom"),u=e("./snippets").snippetManager,l=e("./config"),c=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new i,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=o.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=o.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new r(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var i=e.renderer;if(this.popup.setRow(this.autoSelect?0:-1),n)n&&!t&&this.detach();else{this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var r=i.layerConfig.lineHeight,s=i.$cursorLayer.getPixelPosition(this.base,!0);s.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();s.top+=o.top-i.layerConfig.offset,s.left+=o.left-e.renderer.scrollLeft,s.left+=i.gutterWidth,this.popup.show(s,r)}this.changeTimer.cancel()},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),i=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),r=this.popup&&this.popup.container;t==n||t.parentNode==r||i||t==this.tooltipNode||e.relatedTarget==n||this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){this.popup.goTo(e)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;var n=this.completions;if(this.editor.startOperation({command:{name:"insertMatch"}}),e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(n.filterText)for(var i,r=this.editor.selection.getAllRanges(),s=0;i=r[s];s++)i.start.column-=n.filterText.length,this.editor.session.remove(i);e.snippet?u.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.completions==n&&this.detach(),this.editor.endOperation()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),i=e.getCursorPosition(),r=s.getCompletionPrefix(e);this.base=n.doc.createAnchor(i.row,i.column-r.length),this.base.$insertRight=!0;var o=[],a=e.completers.length;return e.completers.forEach((function(u,l){u.getCompletions(e,n,i,r,(function(n,i){!n&&i&&(o=o.concat(i)),t(null,{prefix:s.getCompletionPrefix(e),matches:o,finished:0==--a})}))})),!0},this.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},this.updateCompletions=function(e,t){if(e&&this.base&&this.completions){var n=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:n});if(i==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,i,e):this.detach()}if(t&&t.matches)return n=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(n.row,n.column),this.base.$insertRight=!0,this.completions=new p(t.matches),this.openPopup(this.editor,"",e);var r=this.gatherCompletionsId,s=function(e){if(e.finished)return this.detach()}.bind(this),o=function(t){var n=t.prefix,i=t.matches;this.completions=new p(i),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(n);var r=this.completions.filtered;return r.length&&(1!=r.length||r[0].value!=n||r[0].snippet)?this.autoInsert&&1==r.length&&t.finished?this.insertMatch(r[0]):void this.openPopup(this.editor,n,e):s(t)}.bind(this),a=!0,u=null;if(this.gatherCompletions(this.editor,function(e,t){var n=t.prefix,i=t&&t.matches;if(!i||!i.length)return s(t);0===n.indexOf(t.prefix)&&r==this.gatherCompletionsId&&(a?u=t:o(t))}.bind(this)),a=!1,u){var l=u;u=null,o(l)}},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),i=null;return n&&this.editor&&this.popup.isOpen?(this.editor.completers.some((function(e){return e.getDocTooltip&&(i=e.getDocTooltip(n)),i})),i||"string"==typeof n||(i=n),"string"==typeof i&&(i={docText:i}),i&&(i.docHTML||i.docText)?void this.showDocTooltip(i):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var n=this.popup,i=n.container.getBoundingClientRect();t.style.top=n.container.style.top,t.style.bottom=n.container.style.bottom,t.style.display="block",window.innerWidth-i.right<320?i.left<320?n.isTopdown?(t.style.top=i.bottom+"px",t.style.left=i.left+"px",t.style.right="",t.style.bottom=""):(t.style.top=n.container.offsetTop-t.offsetHeight+"px",t.style.left=i.left+"px",t.style.right="",t.style.bottom=""):(t.style.right=window.innerWidth-i.left+"px",t.style.left=""):(t.style.left=i.right+1+"px",t.style.right="")},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},this.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},this.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&this.editor.completer,this.popup=null}}).call(c.prototype),c.for=function(e){return e.completer||(l.get("sharedPopups")?(c.$shared||(c.$sharedInstance=new c),e.completer=c.$sharedInstance):(e.completer=new c,e.once("destroy",(function(e,t){t.completer.destroy()})))),e.completer},c.startCommand={name:"startAutocomplete",exec:function(e,t){var n=c.for(e);n.autoInsert=!1,n.autoSelect=!0,n.showPopup(e,t),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var p=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},this.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),r=t.toLowerCase();e:for(var s,o=0;s=e[o];o++){var a=s.caption||s.value||s.snippet;if(a){var u,l,c=-1,p=0,h=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var d=a.toLowerCase().indexOf(r);if(d>-1)h=d;else for(var f=0;f<t.length;f++){var m=a.indexOf(r[f],c+1),g=a.indexOf(i[f],c+1);if((u=m>=0&&(g<0||m<g)?m:g)<0)continue e;(l=u-c-1)>0&&(-1===c&&(h+=10),h+=l,p|=1<<f),c=u}}s.matchMask=p,s.exactMatch=h?0:1,s.$score=(s.score||0)-h,n.push(s)}}return n}}).call(p.prototype),t.Autocomplete=c,t.FilteredList=p})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range,r=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,s,o){var a=function(e,t){var n=function(e,t){return e.getTextRange(i.fromPoints({row:0,column:0},t)).split(r).length-1}(e,t),s=e.getValue().split(r),o=Object.create(null),a=s[n];return s.forEach((function(e,t){if(e&&e!==a){var i=Math.abs(n-t),r=s.length-i;o[e]?o[e]=Math.max(r,o[e]):o[e]=r}})),o}(t,n);o(null,Object.keys(a).map((function(e){return{caption:e,value:e,score:a[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,n){"use strict";var i=e("../snippets").snippetManager,r=e("../autocomplete").Autocomplete,s=e("../config"),o=e("../lib/lang"),a=e("../autocomplete/util"),u=e("../autocomplete/text_completer"),l={getCompletions:function(e,t,n,i,r){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,i,r);var s=e.session.getState(n.row);r(null,t.$mode.getCompletions(s,t,n,i))}},c={getCompletions:function(e,t,n,r,s){var o=[],a=t.getTokenAt(n.row,n.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?o.push("html-tag"):o=i.getActiveScopes(e);var u=i.snippetMap,l=[];o.forEach((function(e){for(var t=u[e]||[],n=t.length;n--;){var i=t[n],r=i.name||i.tabTrigger;r&&l.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet",type:"snippet"})}}),this),s(null,l)},getDocTooltip:function(e){"snippet"!=e.type||e.docHTML||(e.docHTML=["<b>",o.escapeHTML(e.caption),"</b>","<hr></hr>",o.escapeHTML(e.snippet)].join(""))}},p=[c,u,l];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=u,t.keyWordCompleter=l,t.snippetCompleter=c;var h={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},d=function(e,t){f(t.session.$mode)},f=function(e){"string"==typeof e&&(e=s.$modes[e]),e&&(i.files||(i.files={}),m(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(f))},m=function(e,t){t&&e&&!i.files[e]&&(i.files[e]={},s.loadModule(t,(function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){f("ace/mode/"+e)}))))})))},g=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&a.getCompletionPrefix(t)&&!n){var i=r.for(t);i.autoInsert=!1,i.showPopup(t)}},v=e("../editor").Editor;e("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.on("afterExec",g)):this.commands.removeListener("afterExec",g)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",d),d(0,this)):(this.commands.removeCommand(h),this.off("changeMode",d))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},5915:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Aggregations:()=>dg,CreateViewPlugin:()=>Xg,DuplicateViewPlugin:()=>nv,PipelineStorage:()=>Ui,StageEditor:()=>qc,activate:()=>lv,configureCreateViewStore:()=>rv,configureStore:()=>Cg,deactivate:()=>cv,default:()=>pv,metadata:()=>sv});var i={};n.r(i),n.d(i,{FILE:()=>xf,TEXT:()=>wf,URL:()=>Ef});var r=n(9497),s=n.n(r),o=n(23),a=n.n(o);function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}var c=a().shape({trySubscribe:a().func.isRequired,tryUnsubscribe:a().func.isRequired,notifyNestedSubs:a().func.isRequired,isSubscribed:a().func.isRequired}),p=a().shape({subscribe:a().func.isRequired,dispatch:a().func.isRequired,getState:a().func.isRequired});s().forwardRef;const h=function(e){var t;void 0===e&&(e="store");var n=e+"Subscription",i=function(t){l(s,t);var i=s.prototype;function s(n,i){var r;return(r=t.call(this,n,i)||this)[e]=n.store,r}return i.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},i.render=function(){return r.Children.only(this.props.children)},s}(r.Component);return i.propTypes={store:p.isRequired,children:a().element.isRequired},i.childContextTypes=((t={})[e]=p.isRequired,t[n]=c,t),i}();function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f.apply(this,arguments)}function m(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}var g=n(3463),v=n.n(g),y=n(7677),b=n.n(y),x=n(3920),E=null,w={notify:function(){}},C=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=w}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=E,e=E},notify:function(){for(var n=e=t,i=0;i<n.length;i++)n[i]()},get:function(){return t},subscribe:function(n){var i=!0;return t===e&&(t=e.slice()),t.push(n),function(){i&&e!==E&&(i=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=w)},e}(),S=void 0!==s().forwardRef,D=0,_={};function A(){}var k=Object.prototype.hasOwnProperty;function T(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function O(e,t){if(T(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!k.call(t,n[r])||!T(e[n[r]],t[n[r]]))return!1;return!0}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var R="function"==typeof Symbol&&Symbol.observable||"@@observable",M=function(){return Math.random().toString(36).substring(7).split("").join(".")},L={INIT:"@@redux/INIT"+M(),REPLACE:"@@redux/REPLACE"+M(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+M()}};function B(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function j(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(N(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(N(1));return n(j)(e,t)}if("function"!=typeof e)throw new Error(N(2));var r=e,s=t,o=[],a=o,u=!1;function l(){a===o&&(a=o.slice())}function c(){if(u)throw new Error(N(3));return s}function p(e){if("function"!=typeof e)throw new Error(N(4));if(u)throw new Error(N(5));var t=!0;return l(),a.push(e),function(){if(t){if(u)throw new Error(N(6));t=!1,l();var n=a.indexOf(e);a.splice(n,1),o=null}}}function h(e){if(!B(e))throw new Error(N(7));if(void 0===e.type)throw new Error(N(8));if(u)throw new Error(N(9));try{u=!0,s=r(s,e)}finally{u=!1}for(var t=o=a,n=0;n<t.length;n++)(0,t[n])();return e}function d(e){if("function"!=typeof e)throw new Error(N(10));r=e,h({type:L.REPLACE})}function f(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(N(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[R]=function(){return this},e}return h({type:L.INIT}),(i={dispatch:h,subscribe:p,getState:c,replaceReducer:d})[R]=f,i}function V(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}var s,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:L.INIT}))throw new Error(N(12));if(void 0===n(void 0,{type:L.PROBE_UNKNOWN_ACTION()}))throw new Error(N(13))}))}(n)}catch(e){s=e}return function(e,t){if(void 0===e&&(e={}),s)throw s;for(var i=!1,r={},a=0;a<o.length;a++){var u=o[a],l=n[u],c=e[u],p=l(c,t);if(void 0===p)throw t&&t.type,new Error(N(14));r[u]=p,i=i||p!==c}return(i=i||o.length!==Object.keys(e).length)?r:e}}function z(e,t){return function(){return t(e.apply(this,arguments))}}function q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),i=function(){throw new Error(N(15))},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},s=t.map((function(e){return e(r)}));return i=q.apply(void 0,s)(n.dispatch),P(P({},n),{},{dispatch:i})}}}function $(e){return function(t,n){var i=e(t,n);function r(){return i}return r.dependsOnOwnProps=!1,r}}function H(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function W(e,t){return function(t,n){n.displayName;var i=function(e,t){return i.dependsOnOwnProps?i.mapToProps(e,t):i.mapToProps(e)};return i.dependsOnOwnProps=!0,i.mapToProps=function(t,n){i.mapToProps=e,i.dependsOnOwnProps=H(e);var r=i(t,n);return"function"==typeof r&&(i.mapToProps=r,i.dependsOnOwnProps=H(r),r=i(t,n)),r},i}}function K(e,t,n){return f({},n,e,t)}const G=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var i,r=n.pure,s=n.areMergedPropsEqual,o=!1;return function(t,n,a){var u=e(t,n,a);return o?r&&s(u,i)||(i=u):(o=!0,i=u),i}}}(e):void 0},function(e){return e?void 0:function(){return K}}];function Z(e,t,n,i){return function(r,s){return n(e(r,s),t(i,s),s)}}function X(e,t,n,i,r){var s,o,a,u,l,c=r.areStatesEqual,p=r.areOwnPropsEqual,h=r.areStatePropsEqual,d=!1;return function(r,f){return d?function(r,d){var f,m,g=!p(d,o),v=!c(r,s);return s=r,o=d,g&&v?(a=e(s,o),t.dependsOnOwnProps&&(u=t(i,o)),l=n(a,u,o)):g?(e.dependsOnOwnProps&&(a=e(s,o)),t.dependsOnOwnProps&&(u=t(i,o)),l=n(a,u,o)):v?(f=e(s,o),m=!h(f,a),a=f,m&&(l=n(a,u,o)),l):l}(r,f):(a=e(s=r,o=f),u=t(i,o),l=n(a,u,o),d=!0,l)}}function J(e,t,n){for(var i=t.length-1;i>=0;i--){var r=t[i](e);if(r)return r}return function(t,i){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function Y(e,t){return e===t}const Q=(te=(ee={}).connectHOC,ne=void 0===te?function(e,t){var n,i;void 0===t&&(t={});var s=t,o=s.getDisplayName,a=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,u=s.methodName,h=void 0===u?"connectAdvanced":u,g=s.renderCountProp,y=void 0===g?void 0:g,E=s.shouldHandleStateChanges,w=void 0===E||E,k=s.storeKey,T=void 0===k?"store":k,O=s.withRef,I=void 0!==O&&O,F=m(s,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=T+"Subscription",N=D++,R=((n={})[T]=p,n[P]=c,n),M=((i={})[P]=c,i);return function(t){b()((0,x.isValidElementType)(t),"You must pass a component to the function returned by "+h+". Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",i=a(n),s=f({},F,{getDisplayName:a,methodName:h,renderCountProp:y,shouldHandleStateChanges:w,storeKey:T,withRef:I,displayName:i,wrappedComponentName:n,WrappedComponent:t}),o=function(n){function o(e,t){var r;return(r=n.call(this,e,t)||this).version=N,r.state={},r.renderCount=0,r.store=e[T]||t[T],r.propsMode=Boolean(e[T]),r.setWrappedInstance=r.setWrappedInstance.bind(d(d(r))),b()(r.store,'Could not find "'+T+'" in either the context or props of "'+i+'". Either wrap the root component in a <Provider>, or explicitly pass "'+T+'" as a prop to "'+i+'".'),r.initSelector(),r.initSubscription(),r}l(o,n);var a=o.prototype;return a.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[P]=t||this.context[P],e},a.componentDidMount=function(){w&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.componentWillReceiveProps=function(e){this.selector.run(e)},a.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=A,this.store=null,this.selector.run=A,this.selector.shouldComponentUpdate=!1},a.getWrappedInstance=function(){return b()(I,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+h+"() call."),this.wrappedInstance},a.setWrappedInstance=function(e){this.wrappedInstance=e},a.initSelector=function(){var t=e(this.store.dispatch,s);this.selector=function(e,t){var n={run:function(i){try{var r=e(t.getState(),i);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},a.initSubscription=function(){if(w){var e=(this.propsMode?this.props:this.context)[P];this.subscription=new C(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},a.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(_)):this.notifyNestedSubs()},a.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},a.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},a.addExtraProps=function(e){if(!(I||y||this.propsMode&&this.subscription))return e;var t=f({},e);return I&&(t.ref=this.setWrappedInstance),y&&(t[y]=this.renderCount++),this.propsMode&&this.subscription&&(t[P]=this.subscription),t},a.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return(0,r.createElement)(t,this.addExtraProps(e.props))},o}(r.Component);return S&&(o.prototype.UNSAFE_componentWillReceiveProps=o.prototype.componentWillReceiveProps,delete o.prototype.componentWillReceiveProps),o.WrappedComponent=t,o.displayName=i,o.childContextTypes=M,o.contextTypes=R,o.propTypes=R,v()(o,t)}}:te,re=void 0===(ie=ee.mapStateToPropsFactories)?[function(e){return"function"==typeof e?W(e):void 0},function(e){return e?void 0:$((function(){return{}}))}]:ie,oe=void 0===(se=ee.mapDispatchToPropsFactories)?[function(e){return"function"==typeof e?W(e):void 0},function(e){return e?void 0:$((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?$((function(t){return function(e,t){if("function"==typeof e)return z(e,t);if("object"!=typeof e||null===e)throw new Error(N(16));var n={};for(var i in e){var r=e[i];"function"==typeof r&&(n[i]=z(r,t))}return n}(e,t)})):void 0}]:se,ue=void 0===(ae=ee.mergePropsFactories)?G:ae,ce=void 0===(le=ee.selectorFactory)?function(e,t){var n=t.initMapStateToProps,i=t.initMapDispatchToProps,r=t.initMergeProps,s=m(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,s),a=i(e,s),u=r(e,s);return(s.pure?X:Z)(o,a,u,e,s)}:le,function(e,t,n,i){void 0===i&&(i={});var r=i,s=r.pure,o=void 0===s||s,a=r.areStatesEqual,u=void 0===a?Y:a,l=r.areOwnPropsEqual,c=void 0===l?O:l,p=r.areStatePropsEqual,h=void 0===p?O:p,d=r.areMergedPropsEqual,g=void 0===d?O:d,v=m(r,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=J(e,re,"mapStateToProps"),b=J(t,oe,"mapDispatchToProps"),x=J(n,ue,"mergeProps");return ne(ce,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:x,pure:o,areStatesEqual:u,areOwnPropsEqual:c,areStatePropsEqual:h,areMergedPropsEqual:g},v))});var ee,te,ne,ie,re,se,oe,ae,ue,le,ce,pe=n(2779),he=n.n(pe);const de=require("@mongodb-js/compass-components"),fe=require("hadron-react-buttons");var me=n(9388),ge=n.n(me),ve=n(6053),ye=n.n(ve),be=n(1914),xe=n.n(be),Ee=n(6566),we=n.n(Ee),Ce=n(370),Se=n.n(Ce),De=n(6682),_e=n.n(De),Ae=n(3981),ke={};ke.styleTagTransform=_e(),ke.setAttributes=we(),ke.insert=xe().bind(null,"head"),ke.domAPI=ye(),ke.insertStyleElement=Se(),ge()(Ae.Z,ke);const Te=Ae.Z&&Ae.Z.locals?Ae.Z.locals:void 0;class Oe extends r.PureComponent{static displayName="RestorePipelineButtonComponent";static propTypes={clickHandler:a().func.isRequired};render(){const e=he()({btn:!0,"btn-xs":!0,"btn-default":!0,[Te["restore-pipeline-button"]]:!0});return s().createElement("div",{className:he()(Te["restore-pipeline"])},s().createElement(fe.TextButton,{text:"Open",className:e,clickHandler:this.props.clickHandler}))}}const Ie=Oe;var Fe=n(1101),Pe={};Pe.styleTagTransform=_e(),Pe.setAttributes=we(),Pe.insert=xe().bind(null,"head"),Pe.domAPI=ye(),Pe.insertStyleElement=Se(),ge()(Fe.Z,Pe);const Ne=Fe.Z&&Fe.Z.locals?Fe.Z.locals:void 0;class Re extends r.PureComponent{static displayName="DeletePipelineButtonComponent";static propTypes={clickHandler:a().func.isRequired};render(){const e=he()({btn:!0,"btn-xs":!0,"btn-default":!0,[Ne["delete-pipeline-button"]]:!0});return s().createElement("div",{className:he()(Ne["delete-pipeline"])},s().createElement(fe.IconButton,{title:"Delete",className:e,iconClassName:"fa fa-trash-o",clickHandler:this.props.clickHandler}))}}const Me=Re;var Le=n(7866);Le.MongoLogManager;const Be=Le.MongoLogWriter,je=Le.mongoLogId;var Ve=n(4283),ze=n.n(Ve),qe=n(8957),Ue=n.n(qe);function $e(e,t,n){e?.callQuiet?.(t,n),"undefined"!=typeof process&&"function"==typeof process.emit&&process.emit(t,n)}function He(e){const t=ze()?n(5727):null,i=new Be("",null,{write(e,n){$e(t,"compass:log",{line:e}),n()},end(e){e()}}),r=Ue()(`mongodb-compass:${e.toLowerCase()}`);return i.on("log",(({s:e,ctx:t,msg:n,attr:i})=>{r(n,i?{s:e,ctx:t,...i}:{s:e,ctx:t})})),{log:i.bindComponent(e),mongoLogId:je,debug:r,track:(...e)=>{Promise.resolve().then((()=>(async(e,i={})=>{const r=n.g?.hadronApp?.isFeatureEnabled("trackUsageStatistics");if(!r)return;const s={event:e,properties:i};"function"==typeof i&&(s.properties=await i()),$e(t,"compass:track",s)})(...e))).catch((e=>r("track failed",e)))}}}const We=He;var Ke=n(2099),Ge={};Ge.styleTagTransform=_e(),Ge.setAttributes=we(),Ge.insert=xe().bind(null,"head"),Ge.domAPI=ye(),Ge.insertStyleElement=Se(),ge()(Ke.Z,Ge);const Ze=Ke.Z&&Ke.Z.locals?Ke.Z.locals:void 0,{track:Xe}=He("COMPASS-AGGREGATIONS-UI");class Je extends r.PureComponent{static displayName="SavePipelineCardComponent";static propTypes={restorePipelineModalToggle:a().func.isRequired,restorePipelineFrom:a().func.isRequired,deletePipeline:a().func.isRequired,objectID:a().string.isRequired,name:a().string.isRequired};handleDelete=()=>{this.props.deletePipeline(this.props.objectID),Xe("Aggregation Deleted",{id:this.props.objectID,screen:"aggregations"})};restoreClickHandler=()=>{this.props.restorePipelineFrom(this.props.objectID),this.props.restorePipelineModalToggle(1)};render(){return s().createElement("div",{className:he()(Ze["save-pipeline-card"]),"data-pipeline-object-id":this.props.objectID},s().createElement("div",{className:he()(Ze["save-pipeline-card-title"])},this.props.name),s().createElement(Ie,{clickHandler:this.restoreClickHandler}),s().createElement(Me,{clickHandler:this.handleDelete}))}}const Ye=Je;var Qe=n(9593),et={};et.styleTagTransform=_e(),et.setAttributes=we(),et.insert=xe().bind(null,"head"),et.domAPI=ye(),et.insertStyleElement=Se(),ge()(Qe.Z,et);const tt=Qe.Z&&Qe.Z.locals?Qe.Z.locals:void 0;class nt extends r.Component{static displayName="SavePipelineComponent";static propTypes={restorePipelineModalToggle:a().func.isRequired,restorePipelineFrom:a().func.isRequired,deletePipeline:a().func.isRequired,savedPipelinesListToggle:a().func.isRequired,savedPipeline:a().object.isRequired};handleSavedPipelinesClose=()=>{this.props.savedPipelinesListToggle(0)};render(){const e=this.props.savedPipeline.pipelines.map(((e,t)=>s().createElement(Ye,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,restorePipelineFrom:this.props.restorePipelineFrom,deletePipeline:this.props.deletePipeline,name:e.name,objectID:e.id,key:t}))),t=he()({[tt["save-pipeline"]]:!0,[tt["save-pipeline-is-visible"]]:this.props.savedPipeline.isListVisible});return s().createElement("div",{className:t},s().createElement("div",{className:he()(tt["save-pipeline-header"])},s().createElement("div",{id:"saved-pipeline-header-title"},"Saved Pipelines"),s().createElement(fe.IconButton,{title:"Close Saved Pipelines",className:"btn btn-xs btn-default",iconClassName:"fa fa-times",clickHandler:this.handleSavedPipelinesClose})),s().createElement("div",{className:he()(tt["save-pipeline-cards"])},e))}}const it=nt,rt=6e4,st=1e5,ot="3.4.0",at={$addFields:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/#pipe._S_addFields",tooltip:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value."},$bucket:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/bucket/#pipe._S_bucket",tooltip:"Categorizes incoming documents into groups, called buckets, based on specified boundaries."},$bucketAuto:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/#pipe._S_bucketAuto",tooltip:"Automatically categorizes documents into a specified number of buckets, attempting even distribution if possible."},$collStats:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/collStats/#pipe._S_collStats",tooltip:"Returns statistics regarding a collection or view."},$count:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/count/#pipe._S_count",tooltip:"Returns a count of the number of documents at this stage of the aggregation pipeline."},$currentOp:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/currentOp/#pipe._S_currentOp",tooltip:""},$densify:{link:"https://docs.mongodb.com/rapid/reference/operator/aggregation/densify",tooltip:"Creates new documents in a sequence of documents where certain values in a field are missing."},$documents:{link:"https://docs.mongodb.com/v5.1/reference/operator/aggregation/documents/#mongodb-pipeline-pipe.-documents",tooltip:"Returns literal documents from input values."},$facet:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/facet/#pipe._S_facet",tooltip:"Allows for multiple parallel aggregations to be specified."},$geoNear:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/#pipe._S_geoNear",tooltip:"Returns documents based on proximity to a geospatial point."},$graphLookup:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/#pipe._S_graphLookup",tooltip:"Performs a recursive search on a collection. To each output document, adds a new array field that contains the traversal results of the recursive search for that document."},$group:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/group/#pipe._S_group",tooltip:"Groups documents by a specified expression."},$indexStats:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/#pipe._S_indexStats",tooltip:"Returns statistics regarding the use of each index for the collection."},$limit:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/limit/#pipe._S_limit",tooltip:"Limits the number of documents that flow into subsequent stages."},$listLocalSessions:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/listLocalSessions/#pipe._S_listLocalSessions",tooltip:""},$listSessions:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/listSessions/#pipe._S_listSessions",tooltip:""},$lookup:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#pipe._S_lookup",tooltip:"Performs a join between two collections."},$match:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/match/#pipe._S_match",tooltip:"Filters the document stream to allow only matching documents to pass through to subsequent stages."},$merge:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/merge/#pipe._S_merge",tooltip:"Merges the resulting documents into a collection, optionally overriding existing documents."},$out:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/out/#pipe._S_out",tooltip:"Writes the result of a pipeline to a new or existing collection."},$project:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/project/#pipe._S_project",tooltip:"Adds new field(s) to a document with a computed value, or reassigns an existing field(s) with a computed value. Unlike $addFields, $project can also remove fields."},$redact:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/redact/#pipe._S_redact",tooltip:"Restricts the content for each document based on information stored in the documents themselves."},$replaceRoot:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/replaceRoot/#pipe._S_replaceRoot",tooltip:"Replaces a document with the specified embedded document."},$replaceWith:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/replaceWith/",tooltip:"Replaces a document with the specified embedded document."},$sample:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#pipe._S_sample",tooltip:"Randomly selects the specified number of documents from its input."},$search:{link:"https://docs.atlas.mongodb.com/reference/full-text-search/query-syntax/#pipe._S_search",tooltip:"Performs a full-text search on the specified field(s)."},$searchMeta:{link:"https://docs.atlas.mongodb.com/reference/atlas-search/query-syntax-dupl/#mongodb-pipeline-pipe.-searchMeta",tooltip:"Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query."},$set:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/set/#pipe._S_set",tooltip:"Adds new fields to documents."},$skip:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/skip/#pipe._S_skip",tooltip:"Skips a specified number of documents before advancing to the next stage."},$sort:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sort/#pipe._S_sort",tooltip:"Reorders the document stream by a specified sort key and direction."},$sortByCount:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/#pipe._S_sortByCount",tooltip:"Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group."},$unset:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/unset/",tooltip:"Removes or excludes fields from documents."},$unwind:{link:"https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/#pipe._S_unwind",tooltip:"Outputs a new document for each element in a specified array. "}};var ut=n(6252),lt={};lt.styleTagTransform=_e(),lt.setAttributes=we(),lt.insert=xe().bind(null,"head"),lt.domAPI=ye(),lt.insertStyleElement=Se(),ge()(ut.Z,lt);const ct=ut.Z&&ut.Z.locals?ut.Z.locals:void 0;class pt extends r.PureComponent{static displayName="Settings";static propTypes={isAtlasDeployed:a().bool.isRequired,isCommenting:a().bool.isRequired,isExpanded:a().bool.isRequired,limit:a().number.isRequired,largeLimit:a().number.isRequired,maxTimeMS:a().number.isRequired,settings:a().object.isRequired,toggleSettingsIsExpanded:a().func.isRequired,toggleSettingsIsCommentMode:a().func.isRequired,setSettingsSampleSize:a().func.isRequired,setSettingsMaxTimeMS:a().func.isRequired,setSettingsLimit:a().func.isRequired,applySettings:a().func.isRequired,runStage:a().func.isRequired};onCancelClicked(e){e.preventDefault(),e.stopPropagation(),this.props.toggleSettingsIsExpanded()}onCommentModeClicked(){this.props.toggleSettingsIsCommentMode()}onSampleSizeChanged(e){this.props.setSettingsSampleSize(parseInt(e.currentTarget.value,10))}onMaxTimeoutChanged(e){this.props.setSettingsMaxTimeMS(parseInt(e.currentTarget.value,10))}onLimitChanged(e){this.props.setSettingsLimit(parseInt(e.currentTarget.value,10))}onApplyClicked(e){e.preventDefault(),e.stopPropagation(),this.props.applySettings(),this.props.runStage(0),this.props.toggleSettingsIsExpanded()}renderLargeLimit(){if(!this.props.isAtlasDeployed){let e=this.props.largeLimit;return this.props.settings.isDirty&&(e=this.props.settings.limit),s().createElement("div",{className:he()(ct["input-group"])},s().createElement("div",{className:he()(ct["input-meta"])},s().createElement(de.Label,{htmlFor:"aggregation-limit"},"Limit"),s().createElement(de.Description,{id:"aggregation-limit-description"},"Limits input documents before $group, $bucket, and $bucketAuto stages. Set a limit to make the collection run faster.")),s().createElement("div",{className:he()(ct["input-control"])},s().createElement("input",{id:"aggregation-limit","aria-describedby":"aggregation-limit-description",type:"number",min:"0",placeholder:st,value:e,onChange:this.onLimitChanged.bind(this)})))}}renderFields(){let e=this.props.isCommenting,t=this.props.limit,n=this.props.maxTimeMS;return this.props.settings.isDirty&&(e=this.props.settings.isCommentMode,t=this.props.settings.sampleSize,n=this.props.settings.maxTimeMS),s().createElement("div",{className:he()(ct.body)},s().createElement("div",{className:he()(ct["input-group"])},s().createElement("div",{className:he()(ct["input-meta"])},s().createElement(de.Label,{htmlFor:"aggregation-comment-mode"},"Comment Mode"),s().createElement(de.Description,{id:"aggregation-comment-mode-description"},"When enabled, adds helper comments to each stage. Only applies to new stages.")),s().createElement("div",{className:he()(ct["input-control"])},s().createElement("input",{id:"aggregation-comment-mode","aria-describedby":"aggregation-comment-mode-description",type:"checkbox",checked:e,onChange:this.onCommentModeClicked.bind(this)}))),s().createElement("div",{className:he()(ct["input-group"])},s().createElement("div",{className:he()(ct["input-meta"])},s().createElement(de.Label,{htmlFor:"aggregation-sample-size"},"Number of Preview Documents"),s().createElement(de.Description,{id:"aggregation-sample-size-description"},"Specify the number of documents to show in the preview.")),s().createElement("div",{className:he()(ct["input-control"])},s().createElement("input",{id:"aggregation-sample-size","aria-describedby":"aggregation-sample-size-description",type:"number",min:"0",placeholder:20,value:t,onChange:this.onSampleSizeChanged.bind(this)}))),s().createElement("div",{className:he()(ct["input-group"])},s().createElement("div",{className:he()(ct["input-meta"])},s().createElement(de.Label,{htmlFor:"aggregation-max-time-ms"},"Max Time"),s().createElement(de.Description,{id:"aggregation-max-time-ms-description"},"Specifies a cumulative time limit in milliseconds for processing operations on a cursor. Max timeout prevents long hang times.")),s().createElement("div",{className:he()(ct["input-control"])},s().createElement("input",{id:"aggregation-max-time-ms","aria-describedby":"aggregation-max-time-ms-description",type:"number",placeholder:rt,min:"0",step:"1000",value:n,onChange:this.onMaxTimeoutChanged.bind(this)}))),this.renderLargeLimit())}render(){return this.props.isExpanded?s().createElement("div",{className:he()(ct.container)},s().createElement("div",{className:he()(ct.header)},s().createElement("div",{className:he()(ct["header-title"])},"Settings"),s().createElement("div",{className:he()(ct["header-btn-group"])},s().createElement(fe.TextButton,{id:"aggregations-settings-cancel",className:"btn btn-default btn-xs",text:"Cancel",clickHandler:this.onCancelClicked.bind(this)}),s().createElement(fe.TextButton,{id:"aggregation-settings-apply",className:"btn btn-primary btn-xs",text:"Apply",clickHandler:this.onApplyClicked.bind(this)}))),this.renderFields()):null}}const ht=pt,dt=require("hadron-react-components"),ft=require("react-bootstrap");var mt=n(7031),gt={};gt.styleTagTransform=_e(),gt.setAttributes=we(),gt.insert=xe().bind(null,"head"),gt.domAPI=ye(),gt.insertStyleElement=Se(),ge()(mt.Z,gt);const vt=mt.Z&&mt.Z.locals?mt.Z.locals:void 0;class yt extends r.PureComponent{static displayName="OverviewToggler";static propTypes={isOverviewOn:a().bool.isRequired,toggleOverview:a().func.isRequired};render(){const e=this.props.isOverviewOn?"fa fa-angle-right":"fa fa-angle-down",t=this.props.isOverviewOn?"Expand all stages":"Collapse all stages";return s().createElement("div",{className:he()(vt["overview-toggler"])},s().createElement("button",{type:"button",title:t,onClick:this.props.toggleOverview,className:"btn btn-default btn-xs"},s().createElement("i",{className:e,"aria-hidden":!0})))}}const bt=yt;var xt=n(8827),Et={};Et.styleTagTransform=_e(),Et.setAttributes=we(),Et.insert=xe().bind(null,"head"),Et.domAPI=ye(),Et.insertStyleElement=Se(),ge()(xt.Z,Et);const wt=xt.Z&&xt.Z.locals?xt.Z.locals:void 0;class Ct extends r.PureComponent{static displayName="CollationCollapserComponent";static propTypes={isCollationExpanded:a().bool.isRequired,collationCollapseToggled:a().func.isRequired};render(){const e=this.props.isCollationExpanded?"fa fa-caret-down":"fa fa-caret-right",t=this.props.isCollationExpanded?"Collapse":"Expand";return s().createElement("div",{className:he()(wt["collation-collapser"])},s().createElement("button",{"data-test-id":"toggle-collation",type:"button",title:t,onClick:this.props.collationCollapseToggled,className:"btn btn-default btn-xs"},s().createElement("i",{className:e,"aria-hidden":!0})," ","Collation"))}}const St=Ct;var Dt=n(6625),_t=n.n(Dt),At=n(4617),kt={};kt.styleTagTransform=_e(),kt.setAttributes=we(),kt.insert=xe().bind(null,"head"),kt.domAPI=ye(),kt.insertStyleElement=Se(),ge()(At.Z,kt);const Tt=At.Z&&At.Z.locals?At.Z.locals:void 0;class Ot extends r.PureComponent{static displayName="PipelineBuilderToolbarComponent";static propTypes={isAtlasDeployed:a().bool.isRequired,clonePipeline:a().func.isRequired,exportToLanguage:a().func.isRequired,setIsNewPipelineConfirm:a().func.isRequired,newPipelineFromText:a().func.isRequired,nameChanged:a().func.isRequired,name:a().string.isRequired,editViewName:a().string,setIsModified:a().func.isRequired,isModified:a().bool.isRequired,collationCollapseToggled:a().func.isRequired,isCollationExpanded:a().bool.isRequired,isOverviewOn:a().bool.isRequired,toggleOverview:a().func.isRequired,updateView:a().func.isRequired,serverVersion:a().string.isRequired,openCreateView:a().func.isRequired,savedPipeline:a().object.isRequired,savedPipelinesListToggle:a().func.isRequired,getSavedPipelines:a().func.isRequired,saveCurrentPipeline:a().func.isRequired,savingPipelineOpen:a().func.isRequired};onNameChange=e=>{this.props.nameChanged(e.target.value),this.props.setIsModified(!0)};onSaveClicked=()=>{this.isSavedPipeline()?(this.props.saveCurrentPipeline(),this.props.setIsModified(!1)):this.props.savingPipelineOpen()};onSaveAsClicked=()=>{this.isSavedPipeline()?this.props.savingPipelineOpen({name:this.props.name,isSaveAs:!0}):this.onSaveClicked()};handleSavedPipelinesOpen=()=>{this.props.getSavedPipelines(),this.props.savedPipelinesListToggle(1)};handleSavedPipelinesClose=()=>{this.props.savedPipelinesListToggle(0)};isSavedPipeline(){return""!==this.props.name}showNewPipelineConfirmModal(){this.props.setIsNewPipelineConfirm(!0)}renderIsModifiedIndicator(){const e=he()({[Tt["is-modified"]]:!0,[Tt["is-modified-on"]]:this.props.isModified});return this.props.isModified?s().createElement("div",{className:e},"- ",s().createElement("span",null,"Modified")):null}renderSaveDropdownMenu(){const e=[s().createElement(ft.MenuItem,{key:"save-pipeline-as","data-testid":"save-pipeline-as",onClick:this.onSaveAsClicked.bind(this)},"Save pipeline as…")];return _t().gte(this.props.serverVersion,ot)&&e.push(s().createElement(ft.MenuItem,{key:"create-a-view","data-testid":"create-a-view",onClick:this.props.openCreateView},"Create a view")),e}renderSavedPipelineListToggler(){if(!this.props.isAtlasDeployed&&!this.props.editViewName){const e=this.props.savedPipeline.isListVisible?this.handleSavedPipelinesClose:this.handleSavedPipelinesOpen;return s().createElement("span",{"data-tip":"Open saved Pipelines","data-for":"open-saved-pipelines","data-place":"top","data-html":"true"},s().createElement(fe.IconButton,{title:"Toggle Saved Pipelines",className:he()("btn","btn-xs","btn-default",Tt["pipeline-builder-toolbar-open-saved-pipelines-button"]),iconClassName:"fa fa-folder-open-o",clickHandler:e}),s().createElement(dt.Tooltip,{id:"open-saved-pipelines"}))}}renderNewPipelineActionsItem(){if(!this.props.editViewName)return s().createElement("div",null,s().createElement(ft.Dropdown,{id:"new-pipeline-actions",className:"btn-group"},s().createElement(ft.Button,{id:"create-new-pipeline",variant:"default",className:he()("btn-xs",Tt["pipeline-builder-toolbar-new-button"]),onClick:this.showNewPipelineConfirmModal.bind(this)},s().createElement("i",{className:"fa fa-plus-circle"})),s().createElement(ft.Dropdown.Toggle,{className:"btn-default btn-xs btn"}),s().createElement(ft.Dropdown.Menu,null,s().createElement(ft.MenuItem,{onClick:this.props.newPipelineFromText},"New Pipeline From Text"))))}renderSavedPipelineNameItem(){if(!this.props.isAtlasDeployed&&!this.props.editViewName)return s().createElement("div",{className:Tt["pipeline-builder-toolbar-add-wrapper"]},s().createElement("div",{className:Tt["pipeline-builder-toolbar-name"]},this.props.name||"Untitled"),this.renderIsModifiedIndicator())}renderSavePipelineActionsItem(){if(!this.props.isAtlasDeployed&&!this.props.editViewName){const e=he()({btn:!0,"btn-xs":!0,"btn-primary":!0,[Tt["pipeline-builder-toolbar-save-pipeline-button"]]:!0});return s().createElement("div",null,s().createElement(ft.Dropdown,{id:"save-pipeline-actions"},s().createElement(ft.Button,{className:e,variant:"primary",onClick:this.onSaveClicked.bind(this)},"Save"),s().createElement(ft.Dropdown.Toggle,{className:"btn-xs btn btn-primary"}),s().createElement(ft.Dropdown.Menu,null,this.renderSaveDropdownMenu())))}}renderExportToLanguageItem(){return s().createElement("div",{className:Tt["pipeline-builder-toolbar-export-to-language"],"data-tip":"Export pipeline code to language","data-for":"export-to-language","data-place":"top","data-html":"true"},s().createElement(fe.IconButton,{dataTestId:"export-to-language",className:"btn btn-xs btn-default",iconClassName:he()(Tt["export-icon"]),clickHandler:this.props.exportToLanguage,title:"Export To Language"}),s().createElement(dt.Tooltip,{id:"export-to-language"}))}renderUpdateViewButton(){if(this.props.editViewName)return s().createElement("div",{className:he()(Tt["pipeline-builder-toolbar-update-view"])},s().createElement(fe.TextButton,{className:"btn btn-xs btn-primary",text:"Update View",title:"Update View",disabled:!this.props.isModified,clickHandler:this.props.updateView}))}render(){return s().createElement("div",{className:Tt["pipeline-builder-toolbar"]},s().createElement(bt,{isOverviewOn:this.props.isOverviewOn,toggleOverview:this.props.toggleOverview}),this.renderSavedPipelineListToggler(),this.renderNewPipelineActionsItem(),s().createElement(St,{isCollationExpanded:this.props.isCollationExpanded,collationCollapseToggled:this.props.collationCollapseToggled}),this.renderUpdateViewButton(),this.renderSavedPipelineNameItem(),this.renderSavePipelineActionsItem(),this.renderExportToLanguageItem())}}const It=Ot;var Ft=n(7449),Pt={};Pt.styleTagTransform=_e(),Pt.setAttributes=we(),Pt.insert=xe().bind(null,"head"),Pt.domAPI=ye(),Pt.insertStyleElement=Se(),ge()(Ft.Z,Pt);const Nt=Ft.Z&&Ft.Z.locals?Ft.Z.locals:void 0;class Rt extends r.PureComponent{static displayName="PipelinePreviewToolbarComponent";static propTypes={isAtlasDeployed:a().bool.isRequired,toggleSample:a().func.isRequired,toggleAutoPreview:a().func.isRequired,isSampling:a().bool.isRequired,isAutoPreviewing:a().bool.isRequired,toggleSettingsIsExpanded:a().func.isRequired,isFullscreenOn:a().bool.isRequired,toggleFullscreen:a().func.isRequired};renderAutoPreviewToggle(){return s().createElement("div",{className:Nt["toggle-auto-preview"],"data-for":"preview-mode","data-tip":"Show a preview of resulting documents after <br />each stage in the pipeline.","data-place":"top","data-html":"true"},s().createElement(de.Toggle,{checked:this.props.isAutoPreviewing,onChange:this.props.toggleAutoPreview,className:Nt.toggle,id:"autoPreviewToggle",size:"xsmall","aria-labelledby":"autoPreviewToggleLabel"}),s().createElement("label",{className:Nt["toggle-auto-preview-label"],htmlFor:"autoPreviewToggle",id:"autoPreviewToggleLabel"},"Auto Preview"),s().createElement(dt.Tooltip,{id:"preview-mode"}))}renderSampleToggle(){if(!this.props.isAtlasDeployed)return s().createElement("div",{className:Nt["toggle-sample"],"data-tip":"Use a random sample of documents instead of<br />the entire collection so you can develop your<br />pipeline quickly. Sample size can be specified<br />in the settings panel.","data-for":"sampling-mode","data-place":"top","data-html":"true"},s().createElement(de.Toggle,{id:"sampleModeToggle",checked:this.props.isSampling,onChange:this.props.toggleSample,className:Nt.toggle,size:"xsmall","aria-labelledby":"sampleModeToggleLabel"}),s().createElement("label",{className:Nt["toggle-sample-label"],htmlFor:"sampleModeToggle",id:"sampleModeToggleLabel"},"Sample Mode"),s().createElement(dt.Tooltip,{id:"sampling-mode"}))}renderFullscreenButton(){const{isFullscreenOn:e}=this.props,t=e?"fa fa-compress":"fa fa-expand",n=e?"Exit Fullscreen":"Enter Fullscreen";return s().createElement("div",{className:Nt.fullscreen},s().createElement("button",{type:"button",title:n,className:"btn btn-xs btn-default",onClick:this.props.toggleFullscreen},s().createElement("i",{className:t,"aria-hidden":!0})))}renderSettingsToggle(){return s().createElement("div",{className:Nt.settings},s().createElement(fe.IconButton,{title:"Settings",dataTestId:"aggregation-settings",className:"btn btn-xs btn-default",iconClassName:"fa fa-gear",clickHandler:this.props.toggleSettingsIsExpanded}))}render(){return s().createElement("div",{className:Nt["container-right"]},this.renderSampleToggle(),this.renderAutoPreviewToggle(),this.renderSettingsToggle())}}const Mt=Rt;var Lt=n(8826),Bt={};Bt.styleTagTransform=_e(),Bt.setAttributes=we(),Bt.insert=xe().bind(null,"head"),Bt.domAPI=ye(),Bt.insertStyleElement=Se(),ge()(Lt.Z,Bt);const jt=Lt.Z&&Lt.Z.locals?Lt.Z.locals:void 0;class Vt extends r.PureComponent{static displayName="LegacyPipelineToolbarComponent";static propTypes={isAtlasDeployed:a().bool.isRequired,savedPipelinesListToggle:a().func.isRequired,getSavedPipelines:a().func.isRequired,setIsNewPipelineConfirm:a().func.isRequired,newPipelineFromText:a().func.isRequired,clonePipeline:a().func.isRequired,exportToLanguage:a().func.isRequired,saveCurrentPipeline:a().func.isRequired,savedPipeline:a().object.isRequired,nameChanged:a().func.isRequired,toggleComments:a().func.isRequired,toggleSample:a().func.isRequired,toggleAutoPreview:a().func.isRequired,isModified:a().bool.isRequired,isCommenting:a().bool.isRequired,isSampling:a().bool.isRequired,isAutoPreviewing:a().bool.isRequired,setIsModified:a().func.isRequired,name:a().string,editViewName:a().string,updateView:a().func.isRequired,collationCollapseToggled:a().func.isRequired,isCollationExpanded:a().bool.isRequired,isOverviewOn:a().bool.isRequired,toggleOverview:a().func.isRequired,toggleSettingsIsExpanded:a().func.isRequired,isFullscreenOn:a().bool.isRequired,toggleFullscreen:a().func.isRequired,savingPipelineOpen:a().func.isRequired,serverVersion:a().string.isRequired,openCreateView:a().func.isRequired};static defaultProps={savedPipeline:{isNameValid:!0}};render(){return s().createElement("div",{"data-testid":"legacy-pipeline-toolbar",className:he()(jt["pipeline-toolbar"],{[jt["pipeline-toolbar-border"]]:!this.props.isCollationExpanded})},s().createElement(It,{isAtlasDeployed:this.props.isAtlasDeployed,savedPipelinesListToggle:this.props.savedPipelinesListToggle,updateView:this.props.updateView,getSavedPipelines:this.props.getSavedPipelines,savedPipeline:this.props.savedPipeline,clonePipeline:this.props.clonePipeline,newPipelineFromText:this.props.newPipelineFromText,exportToLanguage:this.props.exportToLanguage,saveCurrentPipeline:this.props.saveCurrentPipeline,isValid:this.props.savedPipeline.isNameValid,nameChanged:this.props.nameChanged,isModified:this.props.isModified,setIsModified:this.props.setIsModified,name:this.props.name,editViewName:this.props.editViewName,collationCollapseToggled:this.props.collationCollapseToggled,isCollationExpanded:this.props.isCollationExpanded,isOverviewOn:this.props.isOverviewOn,toggleOverview:this.props.toggleOverview,savingPipelineOpen:this.props.savingPipelineOpen,serverVersion:this.props.serverVersion,openCreateView:this.props.openCreateView,setIsNewPipelineConfirm:this.props.setIsNewPipelineConfirm}),s().createElement(Mt,{isAtlasDeployed:this.props.isAtlasDeployed,toggleComments:this.props.toggleComments,toggleSample:this.props.toggleSample,toggleAutoPreview:this.props.toggleAutoPreview,isCommenting:this.props.isCommenting,isSampling:this.props.isSampling,isAutoPreviewing:this.props.isAutoPreviewing,isModified:this.props.isModified,toggleSettingsIsExpanded:this.props.toggleSettingsIsExpanded,isFullscreenOn:this.props.isFullscreenOn,toggleFullscreen:this.props.toggleFullscreen}))}}const zt=Vt;var qt=n(9430),Ut={};Ut.styleTagTransform=_e(),Ut.setAttributes=we(),Ut.insert=xe().bind(null,"head"),Ut.domAPI=ye(),Ut.insertStyleElement=Se(),ge()(qt.Z,Ut);const $t=qt.Z&&qt.Z.locals?qt.Z.locals:void 0;class Ht extends r.PureComponent{static displayName="CollationToolbarComponent";static propTypes={collation:a().oneOfType([a().bool,a().object]),collationChanged:a().func.isRequired,collationString:a().string,collationStringChanged:a().func.isRequired,openLink:a().func.isRequired};static defaultProps={collation:{},collationString:""};state={hasFocus:!1};onCollationChange=e=>{this.props.collationStringChanged(e.target.value),this.props.collationChanged(e.target.value)};_onFocus=()=>{this.setState({hasFocus:!0})};_onBlur=()=>{this.setState({hasFocus:!1})};render(){return s().createElement("div",{"data-testid":"legacy-collation-toolbar",className:he()($t["collation-toolbar"],{[$t["collation-toolbar-in-new-toolbar"]]:"true"===n.g?.process?.env?.COMPASS_SHOW_NEW_AGGREGATION_TOOLBAR})},s().createElement("div",{onBlur:this._onBlur,onFocus:this._onFocus,className:he()($t["collation-toolbar-input-wrapper"],{[$t["has-focus"]]:this.state.hasFocus})},s().createElement("div",{className:he()($t["collation-toolbar-input-label"],{[$t["has-error"]]:!1===this.props.collation}),"data-testid":"collation-toolbar-input-label"},s().createElement(dt.InfoSprinkle,{helpLink:"https://docs.mongodb.com/master/reference/collation/",onClickHandler:this.props.openLink}),"Collation"),s().createElement("input",{"data-test-id":"collation-string",placeholder:"{ locale: 'simple' }",type:"text",onChange:this.onCollationChange,value:this.props.collationString})))}}const Wt=Ht,{track:Kt}=He("COMPASS-AGGREGATIONS-UI");class Gt extends r.Component{static displayName="RestorePipelineModalComponent";static propTypes={restorePipelineModalToggle:a().func.isRequired,getPipelineFromIndexedDB:a().func.isRequired,restorePipeline:a().object.isRequired};onRestorePipelineModalToggle=()=>{this.props.restorePipelineModalToggle(0)};openPipeline=()=>{const e=this.props.restorePipeline.pipelineObjectID;Kt("Aggregation Opened",{id:e,screen:"aggregations"}),this.props.getPipelineFromIndexedDB(e)};render(){return s().createElement(de.ConfirmationModal,{title:"Are you sure you want to open this pipeline?",open:this.props.restorePipeline.isModalVisible,onConfirm:this.openPipeline,onCancel:this.onRestorePipelineModalToggle,buttonText:"Open Pipeline",trackingId:"restore_pipeline_modal"},"Opening this project will abandon ",s().createElement("b",null,"unsaved")," changes to the current pipeline you are building.")}}const Zt=Gt,Xt=(require("ace-builds"),require("react-ace"));var Jt=n.n(Xt),Yt=n(9910),Qt=n.n(Yt);require("mongodb-ace-mode"),require("mongodb-ace-theme");var en=n(5287),tn={};tn.styleTagTransform=_e(),tn.setAttributes=we(),tn.insert=xe().bind(null,"head"),tn.domAPI=ye(),tn.insertStyleElement=Se(),ge()(en.Z,tn);const nn=en.Z&&en.Z.locals?en.Z.locals:void 0,rn={enableLiveAutocompletion:!1,tabSize:2,fontSize:11,minLines:10,maxLines:1/0,showGutter:!0,useWorker:!1,mode:"ace/mode/mongodb"};class sn extends r.PureComponent{static displayName="ImportPipelineComponent";static propTypes={isOpen:a().bool.isRequired,closeImport:a().func.isRequired,changeText:a().func.isRequired,createNew:a().func.isRequired,text:a().string.isRequired,error:a().string};renderError(){if(this.props.error)return s().createElement("div",{className:nn["import-pipeline-error"]},this.props.error)}render(){return s().createElement(de.ConfirmationModal,{title:"New Pipeline From Plain Text",open:this.props.isOpen,onConfirm:this.props.createNew,onCancel:this.props.closeImport,buttonText:"Create New",submitDisabled:""===this.props.text,trackingId:"import_pipeline_modal"},s().createElement("div",{className:nn["import-pipeline-note"]},"Supports MongoDB Shell syntax. Pasting a pipeline will create a new pipeline."),s().createElement("div",{className:nn["import-pipeline-editor"]},s().createElement(Jt(),{mode:"javascript",theme:"mongodb",width:"100%",value:this.props.text,onChange:this.props.changeText,editorProps:{$blockScrolling:1/0},name:"import-pipeline-editor",setOptions:rn})),this.renderError())}}const on=sn;var an=n(1570),un={};un.styleTagTransform=_e(),un.setAttributes=we(),un.insert=xe().bind(null,"head"),un.domAPI=ye(),un.insertStyleElement=Se(),ge()(an.Z,un);const ln=an.Z&&an.Z.locals?an.Z.locals:void 0;class cn extends r.PureComponent{static displayName="ConfirmImportPipelineComponent";static propTypes={isConfirmationNeeded:a().bool.isRequired,isAutoPreviewing:a().bool.isRequired,closeImport:a().func.isRequired,confirmNew:a().func.isRequired,runStage:a().func.isRequired};onConfirm=()=>{this.props.confirmNew(),this.props.isAutoPreviewing&&this.props.runStage(0)};render(){return s().createElement(de.ConfirmationModal,{title:"Are you sure you want to create a new pipeline?",open:this.props.isConfirmationNeeded,onConfirm:this.onConfirm,onCancel:this.props.closeImport,buttonText:"Confirm",trackingId:"confirm_import_pipeline_modal"},s().createElement("div",{className:ln["confirm-import-pipeline-note"]},"Creating this pipeline will abandon unsaved changes to the current pipeline."))}}const pn=cn;class hn extends r.PureComponent{static displayName="SavingPipelineModalComponent";static propTypes={isOpen:a().bool.isRequired,isSaveAs:a().bool.isRequired,name:a().string.isRequired,savingPipelineCancel:a().func.isRequired,savingPipelineApply:a().func.isRequired,savingPipelineNameChanged:a().func.isRequired,saveCurrentPipeline:a().func.isRequired,clonePipeline:a().func.isRequired};onNameChanged(e){this.props.savingPipelineNameChanged(e.currentTarget.value)}onSubmit(e){e.preventDefault(),e.stopPropagation(),this.save()}save(){this.props.isSaveAs&&this.props.clonePipeline(),this.props.savingPipelineApply(),this.props.saveCurrentPipeline()}render(){const e=this.props.isSaveAs?"Save Pipeline As...":"Save Pipeline";return s().createElement(de.ConfirmationModal,{title:e,open:this.props.isOpen,onConfirm:this.save.bind(this),onCancel:this.props.savingPipelineCancel,buttonText:"Save",submitDisabled:""===this.props.name,trackingId:"save_pipeline_modal"},s().createElement("form",{onSubmit:this.onSubmit.bind(this)},s().createElement("input",{id:"save-pipeline-name",type:"text",value:this.props.name,onChange:this.onNameChanged.bind(this),className:"form-control",placeholder:"Untitled"})))}}const dn=hn;var fn=n(3777),mn={};mn.styleTagTransform=_e(),mn.setAttributes=we(),mn.insert=xe().bind(null,"head"),mn.domAPI=ye(),mn.insertStyleElement=Se(),ge()(fn.Z,mn);const gn=fn.Z&&fn.Z.locals?fn.Z.locals:void 0;class vn extends r.PureComponent{static displayName="ConfirmNewPipelineComponent";static propTypes={isNewPipelineConfirm:a().bool.isRequired,setIsNewPipelineConfirm:a().func.isRequired,newPipeline:a().func.isRequired};onConfirm=()=>{this.props.newPipeline(),this.onClose()};onClose=()=>{this.props.setIsNewPipelineConfirm(!1)};render(){return s().createElement(de.ConfirmationModal,{title:"Are you sure you want to create a new pipeline?",open:this.props.isNewPipelineConfirm,onConfirm:this.onConfirm,onCancel:this.onClose,buttonText:"Confirm",trackingId:"confirm_new_pipeline_modal"},s().createElement("div",{className:gn["confirm-new-pipeline-note"]},"Creating this pipeline will abandon unsaved changes to the current pipeline."))}}const yn=vn;var bn=n(4686),xn={};xn.styleTagTransform=_e(),xn.setAttributes=we(),xn.insert=xe().bind(null,"head"),xn.domAPI=ye(),xn.insertStyleElement=Se(),ge()(bn.Z,xn);const En=bn.Z&&bn.Z.locals?bn.Z.locals:void 0,wn=require("mongodb-ace-autocompleter"),Cn=require("mongodb-query-parser");var Sn=n.n(Cn),Dn=n(7386),_n=n.n(Dn);const An="Stage must be a properly formatted document.";function kn(...e){const t=Sn()(...e);if(!t)throw new Error(An);return t}function Tn(e,t){const n=[];if("$project"!==e.stageOperator)return n;if(!e.isEnabled||!e.stageOperator||""===e.stage)return n;if(!t){t={};try{const n=_n()(e.stage);t[e.stageOperator]=kn(n)}catch(e){return n}}const i=t[e.stageOperator];return Object.keys(i).map((e=>{const t=i[e];t&&n.push({name:e,value:e,score:1,meta:JSON.stringify(t),version:"0.0.0"})})),n}function On(e){if(!e.isEnabled||!e.stageOperator||""===e.stage)return{};const t={};try{const n=_n()(e.stage);t[e.stageOperator]=kn(n)}catch(t){return e.syntaxError=An,e.isValid=!1,e.previewDocuments=[],{}}return e.projections=Tn(e,t),e.isValid=!0,e.syntaxError=null,t}var In=n(9752),Fn=n.n(In),Pn=n(345),Nn=n(4935),Rn=n.n(Nn),Mn=n(6496),Ln=n.n(Mn);const Bn="$out",jn="$merge",Vn="$search",zn="$searchMeta",qn="$documents",Un=e=>!!e&&e.every((e=>e===wn.ATLAS)),$n="aggregations/id/CREATE_ID",Hn=()=>({type:$n}),Wn="aggregations/pipeline",Kn=`${Wn}/STAGE_ADDED`,Gn=`${Wn}/STAGE_ADDED_AFTER`,Zn=`${Wn}/STAGE_CHANGED`,Xn=`${Wn}/STAGE_COLLAPSE_TOGGLED`,Jn=`${Wn}/STAGE_DELETED`,Yn=`${Wn}/STAGE_MOVED`,Qn=`${Wn}/STAGE_OPERATOR_SELECTED`,ei=`${Wn}/STAGE_TOGGLED`,ti=`${Wn}/STAGE_PREVIEW_UPDATED`,ni=`${Wn}/LOADING_STAGE_RESULTS`,ii=(Object.freeze({$limit:20}),Object.freeze({$limit:st}),["$collStats","$currentOp","$indexStats","$listLocalSessions","$listSessions"]),ri=["$group","$bucket","$bucketAuto"],si="$out",oi="$merge",ai="$search",ui="$searchMeta",li="$documents",ci=()=>({id:(new Pn.ObjectId).toHexString(),stageOperator:"",stage:"",isValid:!0,isEnabled:!0,isExpanded:!0,isLoading:!1,isComplete:!1,previewDocuments:[],syntaxError:null,error:null,projections:[]}),pi=[ci()],hi=e=>e.map((e=>Object.assign({},e))),di={};di[Zn]=(e,t)=>{const n=hi(e);return n[t.index].stage=t.stage,n[t.index].isComplete=!1,n[t.index].fromStageOperators=!1,n},di[Kn]=e=>{const t=hi(e),n={...ci()};return t.push(n),t},di[Gn]=(e,t)=>{const n=hi(e),i={...ci()};return n.splice(Number(t.index)+1,0,i),n},di[Jn]=(e,t)=>{const n=hi(e);return n.splice(t.index,1),n},di[Yn]=(e,t)=>{if(t.fromIndex===t.toIndex)return e;const n=hi(e);return n.splice(t.toIndex,0,n.splice(t.fromIndex,1)[0]),n},di[Qn]=(e,t)=>{const n=t.stageOperator;if(n!==e[t.index].stageOperator){const r=hi(e),s=(i=n,wn.STAGE_OPERATORS.find((e=>e.name===i))),o=(s||{}).snippet||"{\n \n}",a=(s||{}).comment||"",u=t.isCommenting?`${a}${o}`:o;return r[t.index].stageOperator=n,r[t.index].stage=u,r[t.index].snippet=u,r[t.index].isExpanded=!0,r[t.index].isComplete=!1,r[t.index].fromStageOperators=!0,r[t.index].previewDocuments=[],[ai,ui,li].includes(r[t.index].stageOperator)&&t.env!==wn.ADL&&t.env!==wn.ATLAS?r[t.index].isMissingAtlasOnlyStageSupport=!0:r[t.index].isMissingAtlasOnlyStageSupport=!1,r}var i;return e},di[ei]=(e,t)=>{const n=hi(e);return n[t.index].isEnabled=!n[t.index].isEnabled,n},di[Xn]=(e,t)=>{const n=hi(e);return n[t.index].isExpanded=!n[t.index].isExpanded,n},di[ti]=(e,t)=>{const n=hi(e);return[ai,ui,li].includes(n[t.index].stageOperator)&&t.env!==wn.ADL&&t.env!==wn.ATLAS&&t.error&&(40324===t.error.code||31082===t.error.code)?(n[t.index].previewDocuments=[],n[t.index].error=null,n[t.index].isMissingAtlasOnlyStageSupport=!0):(n[t.index].previewDocuments=null===t.error||void 0===t.error?t.documents:[],n[t.index].error=t.error?t.error.message:null,n[t.index].isMissingAtlasOnlyStageSupport=!1),n[t.index].isLoading=!1,n[t.index].isComplete=t.isComplete,n},di[ni]=(e,t)=>{const n=hi(e);return n[t.index].isLoading=!0,n};const fi=()=>({type:Kn}),mi=(e,t,n,i,r)=>({type:ti,documents:e,index:t,error:n,isComplete:i,env:r}),gi=e=>({type:ni,index:e}),vi=(e,t)=>{const n=e.inputDocuments.count,i=e.largeLimit||st;return e.pipeline.reduce(((r,s,o)=>(o<=t&&s.isEnabled&&(("N/A"===n&&e.sample||n>i&&ri.includes(s.stageOperator)&&e.sample)&&r.push({$limit:i}),r.push(s.executor||On(s))),r)),[])},yi=(e,t,n,i,r)=>{const s=i.pipeline[r];s.executor=On(s),s.isValid&&s.isEnabled&&s.stageOperator&&s.stageOperator!==si&&s.stageOperator!==oi?xi(e,t,n,i,r):n(mi([],r,null,!1,i.env))},bi=(e,t,n,i,r,s)=>{const o={maxTimeMS:r.maxTimeMS||rt,allowDiskUse:!0,collation:r.collation||void 0};t.aggregate(n,e,o,((e,t)=>{if(e)return i(mi([],s,e,!1,r.env));t.toArray(((e,n)=>{i(mi(n||[],s,e,!0,r.env)),t.close(),i((0,In.globalAppRegistryEmit)("agg-pipeline-executed",{id:r.id,numStages:r.pipeline.length,stageOperators:r.pipeline.map((e=>e.stageOperator))}))}))}))},xi=(e,t,n,i,r)=>{n(gi(r));const s=((e,t)=>{const n=vi(e,t),i=e.pipeline[e.pipeline.length-1];return n.length>0&&!ii.includes(i.stageOperator)&&n.push({$limit:e.limit||20}),n})(i,r);bi(s,e,t,n,i,r)},Ei=e=>(t,n)=>{const i=n();if(e<i.pipeline.length){""===i.id&&t(Hn());const{dataService:n}=i.dataService;if(n){const r=i.namespace;for(let s=e;s<i.pipeline.length;s++)yi(n,r,t,i,s)}}};let wi;!function(e){e.RunAggregation="compass-aggregations/runAggregation"}(wi||(wi={}));const Ci={documents:[]};var Si;!function(e){e.ChangeWorkspace="compass-aggregations/changeWorkspace"}(Si||(Si={}));const Di=(0,de.css)({display:"flex",gap:de.spacing[2]}),_i=(0,de.css)({padding:0}),Ai=(0,de.css)({margin:"inherit !important"}),ki=(0,de.css)({border:"none",padding:0,backgroundColor:"transparent",span:{backgroundImage:"none !important"}}),Ti=Q((({pipeline:e,workspace:t})=>({stages:e.map((e=>e.stageOperator)),isEditing:"results"===t})),{onStageAdded:fi,onChangeWorkspace:e=>({type:Si.ChangeWorkspace,view:e})})((({isEditing:e,stages:t,onStageAdded:n,onChangeWorkspace:i})=>0===t.filter(Boolean).length?s().createElement("div",{className:Di,"data-testid":"toolbar-pipeline-stages"},s().createElement(de.Description,{className:(0,de.cx)(_i,Ai)},"Your pipeline is currently empty. To get started select the ",s().createElement(de.Link,{className:ki,as:"button",onClick:()=>n(),hideExternalIcon:!0,"data-testid":"pipeline-toolbar-add-stage-button"},"first stage."))):s().createElement("div",{className:Di,"data-testid":"toolbar-pipeline-stages"},s().createElement(de.Pipeline,{size:"small"},t.filter(Boolean).map(((e,t)=>s().createElement(de.Stage,{key:`${t}-${e}`},e)))),e&&s().createElement(de.Button,{"data-testid":"pipeline-toolbar-edit-button",variant:"primaryOutline",size:"small",onClick:()=>i("builder"),leftGlyph:s().createElement(de.Icon,{glyph:"Edit"})},"Edit")))),Oi=(0,de.css)({display:"flex",gap:de.spacing[2],alignItems:"center"}),Ii=(0,de.css)({backgroundColor:"transparent",border:"none",display:"inline"}),Fi=(0,de.css)({display:"flex",alignItems:"center",minWidth:"100px"}),Pi=Q(null,{onRunAggregation:()=>async(e,t)=>{const{pipeline:n,namespace:i,maxTimeMS:r,collation:s,dataService:{dataService:o}}=t(),a=n.map(On),u={maxTimeMS:r||rt,allowDiskUse:!0,collation:s||void 0};if(o){const t=o.aggregate(i,a,u),n=await t.toArray();return e({type:wi.RunAggregation,documents:n})}}})((({isOptionsVisible:e,onRunAggregation:t,onToggleOptions:n})=>{const i=e?"CaretDown":"CaretRight";return s().createElement("div",{className:Oi},s().createElement(de.Button,{"data-testid":"pipeline-toolbar-run-button",variant:"primary",size:"small",onClick:()=>{t()}},"Run"),s().createElement(de.Link,{as:"button",className:Ii,"data-testid":"pipeline-toolbar-options-button",hideExternalIcon:!0,onClick:()=>n()},s().createElement("div",{className:Fi},e?"Less":"More"," Options"," ",s().createElement(de.Icon,{glyph:i}))))})),Ni="aggregations/is-modified/SET_IS_MODIFIED",Ri=e=>({type:Ni,isModified:e}),Mi=()=>{const{remote:e}=n(5840),t=n(5315),i=process.env.MONGODB_COMPASS_AGGREGATIONS_TEST_BASE_PATH||e.app.getPath("userData");return t.join(i,"SavedPipelines")};var Li=n(2048),Bi=n.n(Li),ji=n(5315),Vi=n.n(ji);const{debug:zi}=He("COMPASS-AGGREGATIONS-UI"),qi="utf8";class Ui{async loadAll(){const e=Mi(),t=(await Li.promises.readdir(e)).filter((e=>e.endsWith(".json"))).map((t=>Vi().join(e,t)));return(await Promise.all(t.map((e=>this._loadOne(e))))).filter(Boolean)}async _loadOne(e){try{const[t,n]=await Promise.all([this._getFileData(e),Li.promises.stat(e)]);return{...t,lastModified:n.mtimeMs}}catch(t){return zi(`Failed to load pipeline ${Vi().basename(e)}`,t),null}}async _getFileData(e){const t=await Li.promises.readFile(e,qi);return JSON.parse(t)}async updateAttributes(e,t){if(!e)throw new Error("pipelineId is required");const n=Vi().join(Mi(),`${e}.json`),i=await this._getFileData(n);return await Li.promises.writeFile(n,JSON.stringify({...i,...t}),qi),this._loadOne(n)}async delete(e){const t=Vi().join(Mi(),`${e}.json`);return Li.promises.unlink(t)}}const{track:$i,debug:Hi}=He("COMPASS-AGGREGATIONS-UI"),Wi="aggregations/saved-pipeline",Ki=`${Wi}/LIST_TOGGLED`,Gi=`${Wi}/ADD`,Zi={pipelines:[],isLoaded:!1,isListVisible:!1},Xi={};Xi[Ki]=(e,t)=>{const n=(e=>Object.assign({},e))(e);return n.isListVisible=!!t.index,n},Xi[Gi]=(e,t)=>({...e,pipelines:t.pipelines,isLoaded:!0});const Ji=e=>({type:Ki,index:e}),Yi=e=>({type:Gi,pipelines:e}),Qi=()=>(e,t)=>{t().savedPipeline.isLoaded||e(er())},er=()=>(e,t)=>{const n=new Ui,i=t();n.loadAll().then((t=>{const n=t.filter((({namespace:e})=>e===i.namespace));e(Ri(!1)),e(Yi(n)),e((0,In.globalAppRegistryEmit)("agg-pipeline-saved",{name:i.name}))})).catch((e=>{Hi("Failed to load pipelines",e)}))},tr=()=>(e,t)=>{const i=n(8804),r=n(2048),s=n(5315),o=t();""===o.id&&e(Hn());const a=t().id,u=o.pipeline.map((e=>({...e,previewDocuments:[]})));$i("Aggregation Saved",{id:a,num_stages:u.length});const l=Object.assign({},{namespace:o.namespace},{env:o.env},{isTimeSeries:o.isTimeSeries},{isReadonly:o.isReadonly},{sourceName:o.sourceName},{pipeline:u},{name:o.name},{id:a},{comments:o.comments},{sample:o.sample},{autoPreview:o.autoPreview},{collation:o.collation},{collationString:o.collationString}),c=Mi();i.series([e=>{r.mkdir(c,{recursive:!0},(()=>{e()}))},e=>{const t=s.join(c,`${l.id}.json`);r.writeFile(t,JSON.stringify(l),{encoding:"utf8",flag:"w"},(()=>{e(null)}))}],(()=>{e(er())}))},nr=(0,de.css)({display:"grid",gap:de.spacing[4],gridTemplateAreas:'"pipelineTextAndOpen pipelineStages pipelineAction"',gridTemplateColumns:"min-content",alignItems:"center"}),ir=(0,de.css)({display:"flex",gridArea:"pipelineTextAndOpen",gap:de.spacing[2]}),rr=(0,de.css)({border:"none",backgroundColor:"transparent",lineHeight:1,display:"flex",alignItems:"center"}),sr=(0,de.css)({gridArea:"pipelineStages",display:"flex"}),or=(0,de.css)({gridArea:"pipelineAction",justifySelf:"end",display:"flex"}),ar=Q(null,{onShowSavedPipelines:()=>e=>{e(Qi()),e(Ji(1))}})((({onShowSavedPipelines:e,onToggleOptions:t,isOptionsVisible:n})=>s().createElement("div",{className:nr,"data-testid":"pipeline-header"},s().createElement("div",{className:ir},s().createElement(de.Body,{weight:"medium"},"Pipeline"),s().createElement("button",{"data-testid":"pipeline-toolbar-open-pipelines-button",onClick:()=>e(),className:rr,"aria-label":"Open saved pipelines"},s().createElement(de.Icon,{glyph:"Folder"}),s().createElement(de.Icon,{glyph:"CaretDown"}))),s().createElement("div",{className:sr},s().createElement(Ti,null)),s().createElement("div",{className:or},s().createElement(Pi,{onToggleOptions:t,isOptionsVisible:n}))))),ur="aggregations/collation/COLLATION_CHANGED",lr=e=>({type:ur,collation:Sn().isCollationValid(e)}),cr="aggregations/collation/COLLATION_STRING_CHANGED",pr=e=>({type:cr,collationString:e}),hr=n(4283),dr=e=>()=>{hr?n(5840).shell.openExternal(e):window.open(e,"_new")},fr=Q((({collation:e,collationString:t})=>({collation:e,collationString:t})),{collationChanged:lr,collationStringChanged:pr,openLink:dr})((({collation:e,collationString:t,collationChanged:n,collationStringChanged:i,openLink:r})=>{const o={collation:e,collationString:t,collationChanged:n,collationStringChanged:i,openLink:r};return s().createElement(Wt,o)})),mr=(0,de.css)({display:"grid"}),gr=()=>s().createElement("div",{className:mr,"data-testid":"pipeline-options"},s().createElement(fr,null)),vr=()=>(e,t)=>{const n=t();e((0,In.localAppRegistryEmit)("open-aggregation-export-to-language",((e,t)=>`[${e.pipeline.filter(((e,n)=>e.isEnabled&&n<=t)).map((e=>function(e){if(!e.isEnabled||!e.stageOperator||""===e.stage)return"{}";const t=_n()(e.stage);let n;try{n=kn(t)}catch(t){return e.syntaxError=An,e.isValid=!1,e.previewDocuments=[],"{}"}e.isValid=!0,e.syntaxError=null;const i=Sn().toJSString(n);return`{${e.stageOperator}: ${i}}`}(e))).join(", ")}]`)(n,n.pipeline.length))),e((0,In.globalAppRegistryEmit)("compass:export-to-language:opened",{source:"Aggregations"}))};var yr={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},br="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",xr={5:br,"5module":br+" export import",6:br+" const class extends export import super"},Er=/^in(stanceof)?$/,wr="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Cr="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",Sr=new RegExp("["+wr+"]"),Dr=new RegExp("["+wr+Cr+"]");wr=Cr=null;var _r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],Ar=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function kr(e,t){for(var n=65536,i=0;i<t.length;i+=2){if((n+=t[i])>e)return!1;if((n+=t[i+1])>=e)return!0}}function Tr(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Sr.test(String.fromCharCode(e)):!1!==t&&kr(e,_r)))}function Or(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Dr.test(String.fromCharCode(e)):!1!==t&&(kr(e,_r)||kr(e,Ar)))))}var Ir=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function Fr(e,t){return new Ir(e,{beforeExpr:!0,binop:t})}var Pr={beforeExpr:!0},Nr={startsExpr:!0},Rr={};function Mr(e,t){return void 0===t&&(t={}),t.keyword=e,Rr[e]=new Ir(e,t)}var Lr={num:new Ir("num",Nr),regexp:new Ir("regexp",Nr),string:new Ir("string",Nr),name:new Ir("name",Nr),privateId:new Ir("privateId",Nr),eof:new Ir("eof"),bracketL:new Ir("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Ir("]"),braceL:new Ir("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Ir("}"),parenL:new Ir("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Ir(")"),comma:new Ir(",",Pr),semi:new Ir(";",Pr),colon:new Ir(":",Pr),dot:new Ir("."),question:new Ir("?",Pr),questionDot:new Ir("?."),arrow:new Ir("=>",Pr),template:new Ir("template"),invalidTemplate:new Ir("invalidTemplate"),ellipsis:new Ir("...",Pr),backQuote:new Ir("`",Nr),dollarBraceL:new Ir("${",{beforeExpr:!0,startsExpr:!0}),eq:new Ir("=",{beforeExpr:!0,isAssign:!0}),assign:new Ir("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Ir("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Ir("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Fr("||",1),logicalAND:Fr("&&",2),bitwiseOR:Fr("|",3),bitwiseXOR:Fr("^",4),bitwiseAND:Fr("&",5),equality:Fr("==/!=/===/!==",6),relational:Fr("</>/<=/>=",7),bitShift:Fr("<</>>/>>>",8),plusMin:new Ir("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Fr("%",10),star:Fr("*",10),slash:Fr("/",10),starstar:new Ir("**",{beforeExpr:!0}),coalesce:Fr("??",1),_break:Mr("break"),_case:Mr("case",Pr),_catch:Mr("catch"),_continue:Mr("continue"),_debugger:Mr("debugger"),_default:Mr("default",Pr),_do:Mr("do",{isLoop:!0,beforeExpr:!0}),_else:Mr("else",Pr),_finally:Mr("finally"),_for:Mr("for",{isLoop:!0}),_function:Mr("function",Nr),_if:Mr("if"),_return:Mr("return",Pr),_switch:Mr("switch"),_throw:Mr("throw",Pr),_try:Mr("try"),_var:Mr("var"),_const:Mr("const"),_while:Mr("while",{isLoop:!0}),_with:Mr("with"),_new:Mr("new",{beforeExpr:!0,startsExpr:!0}),_this:Mr("this",Nr),_super:Mr("super",Nr),_class:Mr("class",Nr),_extends:Mr("extends",Pr),_export:Mr("export"),_import:Mr("import",Nr),_null:Mr("null",Nr),_true:Mr("true",Nr),_false:Mr("false",Nr),_in:Mr("in",{beforeExpr:!0,binop:7}),_instanceof:Mr("instanceof",{beforeExpr:!0,binop:7}),_typeof:Mr("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Mr("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Mr("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Br=/\r\n?|\n|\u2028|\u2029/,jr=new RegExp(Br.source,"g");function Vr(e){return 10===e||13===e||8232===e||8233===e}var zr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,qr=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ur=Object.prototype,$r=Ur.hasOwnProperty,Hr=Ur.toString;function Wr(e,t){return $r.call(e,t)}var Kr=Array.isArray||function(e){return"[object Array]"===Hr.call(e)};function Gr(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var Zr=function(e,t){this.line=e,this.column=t};Zr.prototype.offset=function(e){return new Zr(this.line,this.column+e)};var Xr=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function Jr(e,t){for(var n=1,i=0;;){jr.lastIndex=i;var r=jr.exec(e);if(!(r&&r.index<t))return new Zr(n,t-i);++n,i=r.index+r[0].length}}var Yr={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Qr=!1;function es(e,t){return 2|(e?4:0)|(t?8:0)}var ts=function(e,t,n){this.options=e=function(e){var t={};for(var n in Yr)t[n]=e&&Wr(e,n)?e[n]:Yr[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!Qr&&"object"==typeof console&&console.warn&&(Qr=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),Kr(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return Kr(t.onComment)&&(t.onComment=function(e,t){return function(n,i,r,s,o,a){var u={type:n?"Block":"Line",value:i,start:r,end:s};e.locations&&(u.loc=new Xr(this,o,a)),e.ranges&&(u.range=[r,s]),t.push(u)}}(t,t.onComment)),t}(e),this.sourceFile=e.sourceFile,this.keywords=Gr(xr[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";!0!==e.allowReserved&&(i=yr[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(i+=" await")),this.reservedWords=Gr(i);var r=(i?i+" ":"")+yr.strict;this.reservedWordsStrict=Gr(r),this.reservedWordsStrictBind=Gr(r+" "+yr.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Br).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=Lr.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},ns={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};ts.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},ns.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},ns.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},ns.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},ns.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||256&t.flags)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ns.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(64&t)>0||n||this.options.allowSuperOutsideMethod},ns.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},ns.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ns.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(258&t)>0||n},ns.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},ts.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,i=0;i<e.length;i++)n=e[i](n);return n},ts.parse=function(e,t){return new this(t,e).parse()},ts.parseExpressionAt=function(e,t,n){var i=new this(n,e,t);return i.nextToken(),i.parseExpression()},ts.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(ts.prototype,ns);var is=ts.prototype,rs=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function ss(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}is.strictDirective=function(e){for(;;){qr.lastIndex=e,e+=qr.exec(this.input)[0].length;var t=rs.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){qr.lastIndex=e+t[0].length;var n=qr.exec(this.input),i=n.index+n[0].length,r=this.input.charAt(i);return";"===r||"}"===r||Br.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||"!"===r&&"="===this.input.charAt(i+1))}e+=t[0].length,qr.lastIndex=e,e+=qr.exec(this.input)[0].length,";"===this.input[e]&&e++}},is.eat=function(e){return this.type===e&&(this.next(),!0)},is.isContextual=function(e){return this.type===Lr.name&&this.value===e&&!this.containsEsc},is.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},is.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},is.canInsertSemicolon=function(){return this.type===Lr.eof||this.type===Lr.braceR||Br.test(this.input.slice(this.lastTokEnd,this.start))},is.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},is.semicolon=function(){this.eat(Lr.semi)||this.insertSemicolon()||this.unexpected()},is.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},is.expect=function(e){this.eat(e)||this.unexpected()},is.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},is.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},is.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,i=e.doubleProto;if(!t)return n>=0||i>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},is.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},is.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var os=ts.prototype;os.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==Lr.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var i=0,r=Object.keys(this.undefinedExports);i<r.length;i+=1){var s=r[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var as={kind:"loop"},us={kind:"switch"};os.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;qr.lastIndex=this.pos;var t=qr.exec(this.input),n=this.pos+t[0].length,i=this.input.charCodeAt(n);if(91===i||92===i||i>55295&&i<56320)return!0;if(e)return!1;if(123===i)return!0;if(Tr(i,!0)){for(var r=n+1;Or(i=this.input.charCodeAt(r),!0);)++r;if(92===i||i>55295&&i<56320)return!0;var s=this.input.slice(n,r);if(!Er.test(s))return!0}return!1},os.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;qr.lastIndex=this.pos;var e,t=qr.exec(this.input),n=this.pos+t[0].length;return!(Br.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(Or(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},os.parseStatement=function(e,t,n){var i,r=this.type,s=this.startNode();switch(this.isLet(e)&&(r=Lr._var,i="let"),r){case Lr._break:case Lr._continue:return this.parseBreakContinueStatement(s,r.keyword);case Lr._debugger:return this.parseDebuggerStatement(s);case Lr._do:return this.parseDoStatement(s);case Lr._for:return this.parseForStatement(s);case Lr._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case Lr._class:return e&&this.unexpected(),this.parseClass(s,!0);case Lr._if:return this.parseIfStatement(s);case Lr._return:return this.parseReturnStatement(s);case Lr._switch:return this.parseSwitchStatement(s);case Lr._throw:return this.parseThrowStatement(s);case Lr._try:return this.parseTryStatement(s);case Lr._const:case Lr._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(s,i);case Lr._while:return this.parseWhileStatement(s);case Lr._with:return this.parseWithStatement(s);case Lr.braceL:return this.parseBlock(!0,s);case Lr.semi:return this.parseEmptyStatement(s);case Lr._export:case Lr._import:if(this.options.ecmaVersion>10&&r===Lr._import){qr.lastIndex=this.pos;var o=qr.exec(this.input),a=this.pos+o[0].length,u=this.input.charCodeAt(a);if(40===u||46===u)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===Lr._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var l=this.value,c=this.parseExpression();return r===Lr.name&&"Identifier"===c.type&&this.eat(Lr.colon)?this.parseLabeledStatement(s,l,c,e):this.parseExpressionStatement(s,c)}},os.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(Lr.semi)||this.insertSemicolon()?e.label=null:this.type!==Lr.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var r=this.labels[i];if(null==e.label||r.name===e.label.name){if(null!=r.kind&&(n||"loop"===r.kind))break;if(e.label&&n)break}}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},os.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},os.parseDoStatement=function(e){return this.next(),this.labels.push(as),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(Lr._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(Lr.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},os.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(as),this.enterScope(0),this.expect(Lr.parenL),this.type===Lr.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===Lr._var||this.type===Lr._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),(this.type===Lr._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===i.declarations.length?(this.options.ecmaVersion>=9&&(this.type===Lr._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var s=this.isContextual("let"),o=!1,a=new ss,u=this.parseExpression(!(t>-1)||"await",a);return this.type===Lr._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===Lr._in?t>-1&&this.unexpected(t):e.await=t>-1),s&&o&&this.raise(u.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(u,!1,a),this.checkLValPattern(u),this.parseForIn(e,u)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,u))},os.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,cs|(n?0:ps),!1,t)},os.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(Lr._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},os.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(Lr.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},os.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(Lr.braceL),this.labels.push(us),this.enterScope(0);for(var n=!1;this.type!==Lr.braceR;)if(this.type===Lr._case||this.type===Lr._default){var i=this.type===Lr._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(Lr.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},os.parseThrowStatement=function(e){return this.next(),Br.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ls=[];os.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===Lr._catch){var t=this.startNode();if(this.next(),this.eat(Lr.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLValPattern(t.param,n?4:2),this.expect(Lr.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(Lr._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},os.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},os.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(as),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},os.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},os.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},os.parseLabeledStatement=function(e,t,n,i){for(var r=0,s=this.labels;r<s.length;r+=1)s[r].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var o=this.type.isLoop?"loop":this.type===Lr._switch?"switch":null,a=this.labels.length-1;a>=0;a--){var u=this.labels[a];if(u.statementStart!==e.start)break;u.statementStart=this.start,u.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},os.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},os.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(Lr.braceL),e&&this.enterScope(0);this.type!==Lr.braceR;){var i=this.parseStatement(null);t.body.push(i)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},os.parseFor=function(e,t){return e.init=t,this.expect(Lr.semi),e.test=this.type===Lr.semi?null:this.parseExpression(),this.expect(Lr.semi),e.update=this.type===Lr.parenR?null:this.parseExpression(),this.expect(Lr.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},os.parseForIn=function(e,t){var n=this.type===Lr._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(Lr.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},os.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(Lr.eq)?i.init=this.parseMaybeAssign(t):"const"!==n||this.type===Lr._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===i.id.type||t&&(this.type===Lr._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(Lr.comma))break}return e},os.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var cs=1,ps=2;function hs(e,t){var n=t.key.name,i=e[n],r="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(r=(t.static?"s":"i")+t.kind),"iget"===i&&"iset"===r||"iset"===i&&"iget"===r||"sget"===i&&"sset"===r||"sset"===i&&"sget"===r?(e[n]="true",!1):!!i||(e[n]=r,!1)}function ds(e,t){var n=e.computed,i=e.key;return!n&&("Identifier"===i.type&&i.name===t||"Literal"===i.type&&i.value===t)}os.parseFunction=function(e,t,n,i,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===Lr.star&&t&ps&&this.unexpected(),e.generator=this.eat(Lr.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&cs&&(e.id=4&t&&this.type!==Lr.name?null:this.parseIdent(),!e.id||t&ps||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(es(e.async,e.generator)),t&cs||(e.id=this.type===Lr.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,r),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&cs?"FunctionDeclaration":"FunctionExpression")},os.parseFunctionParams=function(e){this.expect(Lr.parenL),e.params=this.parseBindingList(Lr.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},os.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),r=this.startNode(),s=!1;for(r.body=[],this.expect(Lr.braceL);this.type!==Lr.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(r.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(s&&this.raise(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&"PrivateIdentifier"===o.key.type&&hs(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},os.parseClassElement=function(e){if(this.eat(Lr.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),i="",r=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(Lr.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===Lr.star?a=!0:i="static"}if(n.static=a,!i&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==Lr.star||this.canInsertSemicolon()?i="async":s=!0),!i&&(t>=9||!s)&&this.eat(Lr.star)&&(r=!0),!i&&!s&&!r){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:i=u)}if(i?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=i,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===Lr.parenL||"method"!==o||r||s){var l=!n.static&&ds(n,"constructor"),c=l&&e;l&&"method"!==o&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=l?"constructor":o,this.parseClassMethod(n,r,s,c)}else this.parseClassField(n);return n},os.isClassElementNameStart=function(){return this.type===Lr.name||this.type===Lr.privateId||this.type===Lr.num||this.type===Lr.string||this.type===Lr.bracketL||this.type.keyword},os.parseClassElementName=function(e){this.type===Lr.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},os.parseClassMethod=function(e,t,n,i){var r=e.key;"constructor"===e.kind?(t&&this.raise(r.start,"Constructor can't be a generator"),n&&this.raise(r.start,"Constructor can't be an async method")):e.static&&ds(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,i);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},os.parseClassField=function(e){if(ds(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&ds(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(Lr.eq)){var t=this.currentThisScope(),n=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=n}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},os.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==Lr.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},os.parseClassId=function(e,t){this.type===Lr.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},os.parseClassSuper=function(e){e.superClass=this.eat(Lr._extends)?this.parseExprSubscripts(!1):null},os.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},os.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,n=e.used,i=this.privateNameStack.length,r=0===i?null:this.privateNameStack[i-1],s=0;s<n.length;++s){var o=n[s];Wr(t,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}},os.parseExport=function(e,t){if(this.next(),this.eat(Lr.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==Lr.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(Lr._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===Lr._function||(n=this.isAsyncFunction())){var i=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(i,4|cs,!1,n)}else if(this.type===Lr._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==Lr.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,o=e.specifiers;s<o.length;s+=1){var a=o[s];this.checkUnreserved(a.local),this.checkLocalExport(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},os.checkExport=function(e,t,n){e&&(Wr(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},os.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===n)for(var i=0,r=t.properties;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var o=0,a=t.elements;o<a.length;o+=1){var u=a[o];u&&this.checkPatternExport(e,u)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},os.checkVariableExport=function(e,t){if(e)for(var n=0,i=t;n<i.length;n+=1){var r=i[n];this.checkPatternExport(e,r.id)}},os.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},os.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(Lr.braceL);!this.eat(Lr.braceR);){if(n)n=!1;else if(this.expect(Lr.comma),this.afterTrailingComma(Lr.braceR))break;var i=this.startNode();i.local=this.parseIdent(!0),i.exported=this.eatContextual("as")?this.parseIdent(!0):i.local,this.checkExport(e,i.exported.name,i.exported.start),t.push(this.finishNode(i,"ExportSpecifier"))}return t},os.parseImport=function(e){return this.next(),this.type===Lr.string?(e.specifiers=ls,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===Lr.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},os.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===Lr.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLValSimple(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(Lr.comma))return e}if(this.type===Lr.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,2),e.push(this.finishNode(i,"ImportNamespaceSpecifier")),e}for(this.expect(Lr.braceL);!this.eat(Lr.braceR);){if(t)t=!1;else if(this.expect(Lr.comma),this.afterTrailingComma(Lr.braceR))break;var r=this.startNode();r.imported=this.parseIdent(!0),this.eatContextual("as")?r.local=this.parseIdent():(this.checkUnreserved(r.imported),r.local=r.imported),this.checkLValSimple(r.local,2),e.push(this.finishNode(r,"ImportSpecifier"))}return e},os.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},os.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var fs=ts.prototype;fs.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.toAssignable(s,t),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},fs.toAssignableList=function(e,t){for(var n=e.length,i=0;i<n;i++){var r=e[i];r&&this.toAssignable(r,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},fs.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},fs.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==Lr.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},fs.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case Lr.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(Lr.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case Lr.braceL:return this.parseObj(!0)}return this.parseIdent()},fs.parseBindingList=function(e,t,n){for(var i=[],r=!0;!this.eat(e);)if(r?r=!1:this.expect(Lr.comma),t&&this.type===Lr.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===Lr.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===Lr.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),i.push(o)}return i},fs.parseBindingListItem=function(e){return e},fs.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(Lr.eq))return n;var i=this.startNodeAt(e,t);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},fs.checkLValSimple=function(e,t,n){void 0===t&&(t=0);var i=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode"),i&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(Wr(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}},fs.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var u=a[o];u&&this.checkLValInnerPattern(u,t,n)}break;default:this.checkLValSimple(e,t,n)}},fs.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var ms=function(e,t,n,i,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!r},gs={b_stat:new ms("{",!1),b_expr:new ms("{",!0),b_tmpl:new ms("${",!1),p_stat:new ms("(",!1),p_expr:new ms("(",!0),q_tmpl:new ms("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new ms("function",!1),f_expr:new ms("function",!0),f_expr_gen:new ms("function",!0,!1,null,!0),f_gen:new ms("function",!1,!1,null,!0)},vs=ts.prototype;vs.initialContext=function(){return[gs.b_stat]},vs.curContext=function(){return this.context[this.context.length-1]},vs.braceIsBlock=function(e){var t=this.curContext();return t===gs.f_expr||t===gs.f_stat||(e!==Lr.colon||t!==gs.b_stat&&t!==gs.b_expr?e===Lr._return||e===Lr.name&&this.exprAllowed?Br.test(this.input.slice(this.lastTokEnd,this.start)):e===Lr._else||e===Lr.semi||e===Lr.eof||e===Lr.parenR||e===Lr.arrow||(e===Lr.braceL?t===gs.b_stat:e!==Lr._var&&e!==Lr._const&&e!==Lr.name&&!this.exprAllowed):!t.isExpr)},vs.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},vs.updateContext=function(e){var t,n=this.type;n.keyword&&e===Lr.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},vs.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},Lr.parenR.updateContext=Lr.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===gs.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},Lr.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?gs.b_stat:gs.b_expr),this.exprAllowed=!0},Lr.dollarBraceL.updateContext=function(){this.context.push(gs.b_tmpl),this.exprAllowed=!0},Lr.parenL.updateContext=function(e){var t=e===Lr._if||e===Lr._for||e===Lr._with||e===Lr._while;this.context.push(t?gs.p_stat:gs.p_expr),this.exprAllowed=!0},Lr.incDec.updateContext=function(){},Lr._function.updateContext=Lr._class.updateContext=function(e){!e.beforeExpr||e===Lr._else||e===Lr.semi&&this.curContext()!==gs.p_stat||e===Lr._return&&Br.test(this.input.slice(this.lastTokEnd,this.start))||(e===Lr.colon||e===Lr.braceL)&&this.curContext()===gs.b_stat?this.context.push(gs.f_stat):this.context.push(gs.f_expr),this.exprAllowed=!1},Lr.backQuote.updateContext=function(){this.curContext()===gs.q_tmpl?this.context.pop():this.context.push(gs.q_tmpl),this.exprAllowed=!1},Lr.star.updateContext=function(e){if(e===Lr._function){var t=this.context.length-1;this.context[t]===gs.f_expr?this.context[t]=gs.f_expr_gen:this.context[t]=gs.f_gen}this.exprAllowed=!0},Lr.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==Lr.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ys=ts.prototype;function bs(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&bs(e.expression)}ys.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var i,r=e.key;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===i&&"init"===s&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[i="$"+i];o?("init"===s?this.strict&&o.init||o.get||o.set:o.init||o[s])&&this.raiseRecoverable(r.start,"Redefinition of property"):o=t[i]={init:!1,get:!1,set:!1},o[s]=!0}}},ys.parseExpression=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeAssign(e,t);if(this.type===Lr.comma){var s=this.startNodeAt(n,i);for(s.expressions=[r];this.eat(Lr.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return r},ys.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var i=!1,r=-1,s=-1;t?(r=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new ss,i=!0);var o=this.start,a=this.startLoc;this.type!==Lr.parenL&&this.type!==Lr.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){var l=this.startNodeAt(o,a);return l.operator=this.value,this.type===Lr.eq&&(u=this.toAssignable(u,!1,t)),i||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=u.start&&(t.shorthandAssign=-1),this.type===Lr.eq?this.checkLValPattern(u):this.checkLValSimple(u),l.left=u,this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return i&&this.checkExpressionErrors(t,!0),r>-1&&(t.parenthesizedAssign=r),s>-1&&(t.trailingComma=s),u},ys.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(this.eat(Lr.question)){var s=this.startNodeAt(n,i);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(Lr.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return r},ys.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||r.start===n&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,n,i,-1,e)},ys.parseExprOp=function(e,t,n,i,r){var s=this.type.binop;if(null!=s&&(!r||this.type!==Lr._in)&&s>i){var o=this.type===Lr.logicalOR||this.type===Lr.logicalAND,a=this.type===Lr.coalesce;a&&(s=Lr.logicalAND.binop);var u=this.value;this.next();var l=this.start,c=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),l,c,s,r),h=this.buildBinary(t,n,e,p,u,o||a);return(o&&this.type===Lr.coalesce||a&&(this.type===Lr.logicalOR||this.type===Lr.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,n,i,r)}return e},ys.buildBinary=function(e,t,n,i,r,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=r,o.right=i,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ys.parseMaybeUnary=function(e,t,n,i){var r,s=this.start,o=this.startLoc;if(this.isContextual("await")&&this.canAwait)r=this.parseAwait(i),t=!0;else if(this.type.prefix){var a=this.startNode(),u=this.type===Lr.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,i),this.checkExpressionErrors(e,!0),u?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&"Identifier"===a.argument.type?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&bs(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):t=!0,r=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else{if(r=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(s,o);l.operator=this.value,l.prefix=!1,l.argument=r,this.checkLValSimple(r),this.next(),r=this.finishNode(l,"UpdateExpression")}}return n||!this.eat(Lr.starstar)?r:t?void this.unexpected(this.lastTokStart):this.buildBinary(s,o,r,this.parseMaybeUnary(null,!1,!1,i),"**",!1)},ys.parseExprSubscripts=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return r;var s=this.parseSubscripts(r,n,i,!1,t);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s},ys.parseSubscripts=function(e,t,n,i,r){for(var s=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,o=!1;;){var a=this.parseSubscript(e,t,n,i,s,o,r);if(a.optional&&(o=!0),a===e||"ArrowFunctionExpression"===a.type){if(o){var u=this.startNodeAt(t,n);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}e=a}},ys.parseSubscript=function(e,t,n,i,r,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(Lr.questionDot);i&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(Lr.bracketL);if(l||u&&this.type!==Lr.parenL&&this.type!==Lr.backQuote||this.eat(Lr.dot)){var c=this.startNodeAt(t,n);c.object=e,l?(c.property=this.parseExpression(),this.expect(Lr.bracketR)):this.type===Lr.privateId&&"Super"!==e.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!l,a&&(c.optional=u),e=this.finishNode(c,"MemberExpression")}else if(!i&&this.eat(Lr.parenL)){var p=new ss,h=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(Lr.parenR,this.options.ecmaVersion>=8,!1,p);if(r&&!u&&!this.canInsertSemicolon()&&this.eat(Lr.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=d,this.awaitIdentPos=f,this.parseArrowExpression(this.startNodeAt(t,n),m,!0,o);this.checkExpressionErrors(p,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=m,a&&(g.optional=u),e=this.finishNode(g,"CallExpression")}else if(this.type===Lr.backQuote){(u||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var v=this.startNodeAt(t,n);v.tag=e,v.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(v,"TaggedTemplateExpression")}return e},ys.parseExprAtom=function(e,t){this.type===Lr.slash&&this.readRegexp();var n,i=this.potentialArrowAt===this.start;switch(this.type){case Lr._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),n=this.startNode(),this.next(),this.type!==Lr.parenL||this.allowDirectSuper||this.raise(n.start,"super() call outside constructor of a subclass"),this.type!==Lr.dot&&this.type!==Lr.bracketL&&this.type!==Lr.parenL&&this.unexpected(),this.finishNode(n,"Super");case Lr._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case Lr.name:var r=this.start,s=this.startLoc,o=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(Lr._function))return this.overrideContext(gs.f_expr),this.parseFunction(this.startNodeAt(r,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(Lr.arrow))return this.parseArrowExpression(this.startNodeAt(r,s),[a],!1,t);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===Lr.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return a=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(Lr.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,s),[a],!0,t)}return a;case Lr.regexp:var u=this.value;return(n=this.parseLiteral(u.value)).regex={pattern:u.pattern,flags:u.flags},n;case Lr.num:case Lr.string:return this.parseLiteral(this.value);case Lr._null:case Lr._true:case Lr._false:return(n=this.startNode()).value=this.type===Lr._null?null:this.type===Lr._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case Lr.parenL:var l=this.start,c=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),c;case Lr.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(Lr.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case Lr.braceL:return this.overrideContext(gs.b_expr),this.parseObj(!1,e);case Lr._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case Lr._class:return this.parseClass(this.startNode(),!1);case Lr._new:return this.parseNew();case Lr.backQuote:return this.parseTemplate();case Lr._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},ys.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case Lr.parenL:return this.parseDynamicImport(e);case Lr.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},ys.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(Lr.parenR)){var t=this.start;this.eat(Lr.comma)&&this.eat(Lr.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},ys.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},ys.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},ys.parseParenExpression=function(){this.expect(Lr.parenL);var e=this.parseExpression();return this.expect(Lr.parenR),e},ys.parseParenAndDistinguishExpression=function(e,t){var n,i=this.start,r=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,u=this.startLoc,l=[],c=!0,p=!1,h=new ss,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==Lr.parenR;){if(c?c=!1:this.expect(Lr.comma),s&&this.afterTrailingComma(Lr.parenR,!0)){p=!0;break}if(this.type===Lr.ellipsis){o=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===Lr.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}l.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(Lr.parenR),e&&!this.canInsertSemicolon()&&this.eat(Lr.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(i,r,l,t);l.length&&!p||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,l.length>1?((n=this.startNodeAt(a,u)).expressions=l,this.finishNodeAt(n,"SequenceExpression",m,g)):n=l[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(i,r);return v.expression=n,this.finishNode(v,"ParenthesizedExpression")}return n},ys.parseParenItem=function(e){return e},ys.parseParenArrowList=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,i)};var xs=[];ys.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(Lr.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,r=this.startLoc,s=this.type===Lr._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),i,r,!0,!1),s&&"ImportExpression"===e.callee.type&&this.raise(i,"Cannot use new with import()"),this.eat(Lr.parenL)?e.arguments=this.parseExprList(Lr.parenR,this.options.ecmaVersion>=8,!1):e.arguments=xs,this.finishNode(e,"NewExpression")},ys.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===Lr.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===Lr.backQuote,this.finishNode(n,"TemplateElement")},ys.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(n.quasis=[i];!i.tail;)this.type===Lr.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(Lr.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(Lr.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},ys.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===Lr.name||this.type===Lr.num||this.type===Lr.string||this.type===Lr.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Lr.star)&&!Br.test(this.input.slice(this.lastTokEnd,this.start))},ys.parseObj=function(e,t){var n=this.startNode(),i=!0,r={};for(n.properties=[],this.next();!this.eat(Lr.braceR);){if(i)i=!1;else if(this.expect(Lr.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(Lr.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,r,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},ys.parseProperty=function(e,t){var n,i,r,s,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(Lr.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===Lr.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===Lr.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===Lr.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(r=this.start,s=this.startLoc),e||(n=this.eat(Lr.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(Lr.star),this.parsePropertyName(o,t)):i=!1,this.parsePropertyValue(o,e,n,i,r,s,t,a),this.finishNode(o,"Property")},ys.parsePropertyValue=function(e,t,n,i,r,s,o,a){if((n||i)&&this.type===Lr.colon&&this.unexpected(),this.eat(Lr.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===Lr.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,i);else if(t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===Lr.comma||this.type===Lr.braceR||this.type===Lr.eq)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||i)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key)):this.type===Lr.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(n||i)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var u="get"===e.kind?0:1;if(e.value.params.length!==u){var l=e.value.start;"get"===e.kind?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},ys.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Lr.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(Lr.bracketR),e.key;e.computed=!1}return e.key=this.type===Lr.num||this.type===Lr.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},ys.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ys.parseMethod=function(e,t,n){var i=this.startNode(),r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|es(t,i.generator)|(n?128:0)),this.expect(Lr.parenL),i.params=this.parseBindingList(Lr.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")},ys.parseArrowExpression=function(e,t,n,i){var r=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|es(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},ys.parseFunctionBody=function(e,t,n,i){var r=t&&this.type!==Lr.braceL,s=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);s&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var u=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=u}this.exitScope()},ys.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},ys.checkParams=function(e,t){for(var n=Object.create(null),i=0,r=e.params;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,1,t?null:n)}},ys.parseExprList=function(e,t,n,i){for(var r=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(Lr.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===Lr.comma?o=null:this.type===Lr.ellipsis?(o=this.parseSpread(i),i&&this.type===Lr.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):o=this.parseMaybeAssign(!1,i),r.push(o)}return r},ys.checkUnreserved=function(e){var t=e.start,n=e.end,i=e.name;this.inGenerator&&"yield"===i&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===i&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&"arguments"===i&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==i&&"await"!==i||this.raise(t,"Cannot use "+i+" in class static initialization block"),this.keywords.test(i)&&this.raise(t,"Unexpected keyword '"+i+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(this.inAsync||"await"!==i||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+i+"' is reserved"))},ys.parseIdent=function(e,t){var n=this.startNode();return this.type===Lr.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},ys.parsePrivateIdent=function(){var e=this.startNode();return this.type===Lr.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e),e},ys.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===Lr.semi||this.canInsertSemicolon()||this.type!==Lr.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(Lr.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},ys.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Es=ts.prototype;Es.raise=function(e,t){var n=Jr(this.input,e);t+=" ("+n.line+":"+n.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i},Es.raiseRecoverable=Es.raise,Es.curPosition=function(){if(this.options.locations)return new Zr(this.curLine,this.pos-this.lineStart)};var ws=ts.prototype,Cs=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};ws.enterScope=function(e){this.scopeStack.push(new Cs(e))},ws.exitScope=function(){this.scopeStack.pop()},ws.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},ws.declareName=function(e,t,n){var i=!1;if(2===t){var r=this.currentScope();i=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&1&r.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var s=this.currentScope();i=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){i=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],259&a.flags)break}i&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},ws.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},ws.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ws.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},ws.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var Ss=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Xr(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},Ds=ts.prototype;function _s(e,t,n,i){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=n),e}Ds.startNode=function(){return new Ss(this,this.start,this.startLoc)},Ds.startNodeAt=function(e,t){return new Ss(this,e,t)},Ds.finishNode=function(e,t){return _s.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Ds.finishNodeAt=function(e,t,n,i){return _s.call(this,e,t,n,i)},Ds.copyNode=function(e){var t=new Ss(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var As="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ks=As+" Extended_Pictographic",Ts={9:As,10:ks,11:ks,12:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic EBase EComp EMod EPres ExtPict"},Os="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Is="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Fs=Is+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ps={9:Is,10:Fs,11:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",12:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"},Ns={};function Rs(e){var t=Ns[e]={binary:Gr(Ts[e]+" "+Os),nonBinary:{General_Category:Gr(Os),Script:Gr(Ps[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}Rs(9),Rs(10),Rs(11),Rs(12);var Ms=ts.prototype,Ls=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":""),this.unicodeProperties=Ns[e.options.ecmaVersion>=12?12:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Bs(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function js(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Vs(e){return e>=65&&e<=90||e>=97&&e<=122}function zs(e){return Vs(e)||95===e}function qs(e){return zs(e)||Us(e)}function Us(e){return e>=48&&e<=57}function $s(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Hs(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Ws(e){return e>=48&&e<=55}Ls.prototype.reset=function(e,t,n){var i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchN=i&&this.parser.options.ecmaVersion>=9},Ls.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Ls.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,i=n.length;if(e>=i)return-1;var r=n.charCodeAt(e);if(!t&&!this.switchU||r<=55295||r>=57344||e+1>=i)return r;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(r<<10)+s-56613888:r},Ls.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,i=n.length;if(e>=i)return i;var r,s=n.charCodeAt(e);return!t&&!this.switchU||s<=55295||s>=57344||e+1>=i||(r=n.charCodeAt(e+1))<56320||r>57343?e+1:e+2},Ls.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Ls.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Ls.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Ls.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Ms.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,i=0;i<n.length;i++){var r=n.charAt(i);-1===t.indexOf(r)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(r,i+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},Ms.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Ms.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var i=n[t];-1===e.groupNames.indexOf(i)&&e.raise("Invalid named capture referenced")}},Ms.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Ms.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Ms.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},Ms.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Ms.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Ms.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Ms.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var i=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return-1!==r&&r<i&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},Ms.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Ms.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Ms.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},Ms.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Ms.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Ms.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Ms.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!js(t)&&(e.lastIntValue=t,e.advance(),!0)},Ms.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!js(n);)e.advance();return e.pos!==t},Ms.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},Ms.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Ms.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Ms.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Bs(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Bs(e.lastIntValue);return!0}return!1},Ms.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,i=e.current(n);return e.advance(n),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(i=e.lastIntValue),function(e){return Tr(e,!0)||36===e||95===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},Ms.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,i=e.current(n);return e.advance(n),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(i=e.lastIntValue),function(e){return Or(e,!0)||36===e||95===e||8204===e||8205===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},Ms.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Ms.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Ms.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Ms.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Ms.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Ms.regexp_eatZero=function(e){return 48===e.current()&&!Us(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Ms.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Ms.regexp_eatControlLetter=function(e){var t=e.current();return!!Vs(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Ms.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n,i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(s-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=s}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(n=e.lastIntValue)>=0&&n<=1114111)return!0;r&&e.raise("Invalid unicode escape"),e.pos=i}return!1},Ms.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},Ms.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},Ms.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},Ms.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,i),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r),!0}return!1},Ms.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Wr(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Ms.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},Ms.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";zs(t=e.current());)e.lastStringValue+=Bs(t),e.advance();return""!==e.lastStringValue},Ms.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";qs(t=e.current());)e.lastStringValue+=Bs(t),e.advance();return""!==e.lastStringValue},Ms.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Ms.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},Ms.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Ms.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Ws(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return 93!==i&&(e.lastIntValue=i,e.advance(),!0)},Ms.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Ms.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Us(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Ms.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Ms.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Us(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Ms.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;$s(n=e.current());)e.lastIntValue=16*e.lastIntValue+Hs(n),e.advance();return e.pos!==t},Ms.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Ms.regexp_eatOctalDigit=function(e){var t=e.current();return Ws(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Ms.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var i=0;i<t;++i){var r=e.current();if(!$s(r))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Hs(r),e.advance()}return!0};var Ks=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new Xr(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Gs=ts.prototype;function Zs(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}function Xs(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}Gs.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ks(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Gs.getToken=function(){return this.next(),new Ks(this)},"undefined"!=typeof Symbol&&(Gs[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===Lr.eof,value:t}}}}),Gs.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(Lr.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Gs.readToken=function(e){return Tr(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Gs.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},Gs.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(jr.lastIndex=n;(e=jr.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,i),n,this.pos,t,this.curPosition())},Gs.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Vr(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Gs.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&zr.test(String.fromCharCode(e))))break e;++this.pos}}},Gs.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Gs.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(Lr.ellipsis)):(++this.pos,this.finishToken(Lr.dot))},Gs.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(Lr.assign,2):this.finishOp(Lr.slash,1)},Gs.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=42===e?Lr.star:Lr.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,i=Lr.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(Lr.assign,n+1):this.finishOp(i,n)},Gs.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(Lr.assign,3):this.finishOp(124===e?Lr.logicalOR:Lr.logicalAND,2):61===t?this.finishOp(Lr.assign,2):this.finishOp(124===e?Lr.bitwiseOR:Lr.bitwiseAND,1)},Gs.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(Lr.assign,2):this.finishOp(Lr.bitwiseXOR,1)},Gs.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!Br.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(Lr.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(Lr.assign,2):this.finishOp(Lr.plusMin,1)},Gs.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(Lr.assign,n+1):this.finishOp(Lr.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(Lr.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Gs.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(Lr.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(Lr.arrow)):this.finishOp(61===e?Lr.eq:Lr.prefix,1)},Gs.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(Lr.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(Lr.assign,3):this.finishOp(Lr.coalesce,2)}return this.finishOp(Lr.question,1)},Gs.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,Tr(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(Lr.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Xs(e)+"'")},Gs.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(Lr.parenL);case 41:return++this.pos,this.finishToken(Lr.parenR);case 59:return++this.pos,this.finishToken(Lr.semi);case 44:return++this.pos,this.finishToken(Lr.comma);case 91:return++this.pos,this.finishToken(Lr.bracketL);case 93:return++this.pos,this.finishToken(Lr.bracketR);case 123:return++this.pos,this.finishToken(Lr.braceL);case 125:return++this.pos,this.finishToken(Lr.braceR);case 58:return++this.pos,this.finishToken(Lr.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(Lr.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(Lr.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Xs(e)+"'")},Gs.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Gs.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(Br.test(i)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Ls(this));a.reset(n,r,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new RegExp(r,o)}catch(e){}return this.finishToken(Lr.regexp,{pattern:r,flags:o,value:u})},Gs.readInt=function(e,t,n){for(var i=this.options.ecmaVersion>=12&&void 0===t,r=n&&48===this.input.charCodeAt(this.pos),s=this.pos,o=0,a=0,u=0,l=null==t?1/0:t;u<l;++u,++this.pos){var c=this.input.charCodeAt(this.pos),p=void 0;if(i&&95===c)r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===a&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===u&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=c;else{if((p=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=e)break;a=c,o=o*e+p}}return i&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t?null:o},Gs.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=Zs(this.input.slice(t,this.pos)),++this.pos):Tr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Lr.num,n)},Gs.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===i){var r=Zs(this.input.slice(t,this.pos));return++this.pos,Tr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(Lr.num,r)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==i||n||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||n||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),Tr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s,o=(s=this.input.slice(t,this.pos),n?parseInt(s,8):parseFloat(s.replace(/_/g,"")));return this.finishToken(Lr.num,o)},Gs.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Gs.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Vr(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(Lr.string,t)};var Js={};Gs.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Js)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Gs.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Js;this.raise(e,t)},Gs.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==Lr.template&&this.type!==Lr.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(Lr.template,e)):36===n?(this.pos+=2,this.finishToken(Lr.dollarBraceL)):(++this.pos,this.finishToken(Lr.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Vr(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Gs.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(Lr.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Gs.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Xs(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;return this.invalidStringToken(n,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);return r>255&&(i=i.slice(0,-1),r=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),"0"===i&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Vr(t)?"":String.fromCharCode(t)}},Gs.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Gs.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(Or(r,i))this.pos+=r<=65535?1:2;else{if(92!==r)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?Tr:Or)(o,i)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=Xs(o),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Gs.readWord=function(){var e=this.readWord1(),t=Lr.name;return this.keywords.test(e)&&(t=Rr[e]),this.finishToken(t,e)},ts.acorn={Parser:ts,version:"8.5.0",defaultOptions:Yr,Position:Zr,SourceLocation:Xr,getLineInfo:Jr,Node:Ss,TokenType:Ir,tokTypes:Lr,keywordTypes:Rr,TokContext:ms,tokContexts:gs,isIdentifierChar:Or,isIdentifierStart:Tr,Token:Ks,isNewLine:Vr,lineBreak:Br,lineBreakG:jr,nonASCIIwhitespace:zr};var Ys="✖";function Qs(e){return e.name===Ys}function eo(){}var to=function(e,t){if(void 0===t&&(t={}),this.toks=this.constructor.BaseParser.tokenizer(e,t),this.options=this.toks.options,this.input=this.toks.input,this.tok=this.last={type:Lr.eof,start:0,end:0},this.tok.validateRegExpFlags=eo,this.tok.validateRegExpPattern=eo,this.options.locations){var n=this.toks.curPosition();this.tok.loc=new Xr(this.toks,n,n)}this.ahead=[],this.context=[],this.curIndent=0,this.curLineStart=0,this.nextLineStart=this.lineEnd(this.curLineStart)+1,this.inAsync=!1,this.inGenerator=!1,this.inFunction=!1};to.prototype.startNode=function(){return new Ss(this.toks,this.tok.start,this.options.locations?this.tok.loc.start:null)},to.prototype.storeCurrentPos=function(){return this.options.locations?[this.tok.start,this.tok.loc.start]:this.tok.start},to.prototype.startNodeAt=function(e){return this.options.locations?new Ss(this.toks,e[0],e[1]):new Ss(this.toks,e)},to.prototype.finishNode=function(e,t){return e.type=t,e.end=this.last.end,this.options.locations&&(e.loc.end=this.last.loc.end),this.options.ranges&&(e.range[1]=this.last.end),e},to.prototype.dummyNode=function(e){var t=this.startNode();return t.type=e,t.end=t.start,this.options.locations&&(t.loc.end=t.loc.start),this.options.ranges&&(t.range[1]=t.start),this.last={type:Lr.name,start:t.start,end:t.start,loc:t.loc},t},to.prototype.dummyIdent=function(){var e=this.dummyNode("Identifier");return e.name=Ys,e},to.prototype.dummyString=function(){var e=this.dummyNode("Literal");return e.value=e.raw=Ys,e},to.prototype.eat=function(e){return this.tok.type===e&&(this.next(),!0)},to.prototype.isContextual=function(e){return this.tok.type===Lr.name&&this.tok.value===e},to.prototype.eatContextual=function(e){return this.tok.value===e&&this.eat(Lr.name)},to.prototype.canInsertSemicolon=function(){return this.tok.type===Lr.eof||this.tok.type===Lr.braceR||Br.test(this.input.slice(this.last.end,this.tok.start))},to.prototype.semicolon=function(){return this.eat(Lr.semi)},to.prototype.expect=function(e){if(this.eat(e))return!0;for(var t=1;t<=2;t++)if(this.lookAhead(t).type===e){for(var n=0;n<t;n++)this.next();return!0}},to.prototype.pushCx=function(){this.context.push(this.curIndent)},to.prototype.popCx=function(){this.curIndent=this.context.pop()},to.prototype.lineEnd=function(e){for(;e<this.input.length&&!Vr(this.input.charCodeAt(e));)++e;return e},to.prototype.indentationAfter=function(e){for(var t=0;;++e){var n=this.input.charCodeAt(e);if(32===n)++t;else{if(9!==n)return t;t+=this.options.tabSize}}},to.prototype.closes=function(e,t,n,i){return this.tok.type===e||this.tok.type===Lr.eof||n!==this.curLineStart&&this.curIndent<t&&this.tokenStartsLine()&&(!i||this.nextLineStart>=this.input.length||this.indentationAfter(this.nextLineStart)<t)},to.prototype.tokenStartsLine=function(){for(var e=this.tok.start-1;e>=this.curLineStart;--e){var t=this.input.charCodeAt(e);if(9!==t&&32!==t)return!1}return!0},to.prototype.extend=function(e,t){this[e]=t(this[e])},to.prototype.parse=function(){return this.next(),this.parseTopLevel()},to.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,i=0;i<e.length;i++)n=e[i](n);return n},to.parse=function(e,t){return new this(e,t).parse()},to.BaseParser=ts;var no=to.prototype;function io(e){return e<14&&e>8||32===e||160===e||Vr(e)}no.next=function(){if(this.last=this.tok,this.ahead.length?this.tok=this.ahead.shift():this.tok=this.readToken(),this.tok.start>=this.nextLineStart){for(;this.tok.start>=this.nextLineStart;)this.curLineStart=this.nextLineStart,this.nextLineStart=this.lineEnd(this.curLineStart)+1;this.curIndent=this.indentationAfter(this.curLineStart)}},no.readToken=function(){for(;;)try{return this.toks.next(),this.toks.type===Lr.dot&&"."===this.input.substr(this.toks.end,1)&&this.options.ecmaVersion>=6&&(this.toks.end++,this.toks.type=Lr.ellipsis),new Ks(this.toks)}catch(s){if(!(s instanceof SyntaxError))throw s;var e=s.message,t=s.raisedAt,n=!0;if(/unterminated/i.test(e))if(t=this.lineEnd(s.pos+1),/string/.test(e))n={start:s.pos,end:t,type:Lr.string,value:this.input.slice(s.pos+1,t)};else if(/regular expr/i.test(e)){var i=this.input.slice(s.pos,t);try{i=new RegExp(i)}catch(e){}n={start:s.pos,end:t,type:Lr.regexp,value:i}}else n=!!/template/.test(e)&&{start:s.pos,end:t,type:Lr.template,value:this.input.slice(s.pos,t)};else if(/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(e))for(;t<this.input.length&&!io(this.input.charCodeAt(t));)++t;else if(/character escape|expected hexadecimal/i.test(e))for(;t<this.input.length;){var r=this.input.charCodeAt(t++);if(34===r||39===r||Vr(r))break}else if(/unexpected character/i.test(e))t++,n=!1;else{if(!/regular expression/i.test(e))throw s;n=!0}if(this.resetTo(t),!0===n&&(n={start:t,end:t,type:Lr.name,value:Ys}),n)return this.options.locations&&(n.loc=new Xr(this.toks,Jr(this.input,n.start),Jr(this.input,n.end))),n}},no.resetTo=function(e){this.toks.pos=e;var t,n=this.input.charAt(e-1);if(this.toks.exprAllowed=!n||/[[{(,;:?/*=+\-~!|&%^<>]/.test(n)||/[enwfd]/.test(n)&&/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(e-10,e)),this.options.locations)for(this.toks.curLine=1,this.toks.lineStart=jr.lastIndex=0;(t=jr.exec(this.input))&&t.index<e;)++this.toks.curLine,this.toks.lineStart=t.index+t[0].length},no.lookAhead=function(e){for(;e>this.ahead.length;)this.ahead.push(this.readToken());return this.ahead[e-1]};var ro=to.prototype;ro.parseTopLevel=function(){var e=this.startNodeAt(this.options.locations?[0,Jr(this.input,0)]:0);for(e.body=[];this.tok.type!==Lr.eof;)e.body.push(this.parseStatement());return this.toks.adaptDirectivePrologue(e.body),this.last=this.tok,e.sourceType=this.options.sourceType,this.finishNode(e,"Program")},ro.parseStatement=function(){var e,t=this.tok.type,n=this.startNode();switch(this.toks.isLet()&&(t=Lr._var,e="let"),t){case Lr._break:case Lr._continue:this.next();var i=t===Lr._break;return this.semicolon()||this.canInsertSemicolon()?n.label=null:(n.label=this.tok.type===Lr.name?this.parseIdent():null,this.semicolon()),this.finishNode(n,i?"BreakStatement":"ContinueStatement");case Lr._debugger:return this.next(),this.semicolon(),this.finishNode(n,"DebuggerStatement");case Lr._do:return this.next(),n.body=this.parseStatement(),n.test=this.eat(Lr._while)?this.parseParenExpression():this.dummyIdent(),this.semicolon(),this.finishNode(n,"DoWhileStatement");case Lr._for:this.next();var r=this.options.ecmaVersion>=9&&this.eatContextual("await");if(this.pushCx(),this.expect(Lr.parenL),this.tok.type===Lr.semi)return this.parseFor(n,null);var s=this.toks.isLet();if(s||this.tok.type===Lr._var||this.tok.type===Lr._const){var o=this.parseVar(this.startNode(),!0,s?"let":this.tok.value);return 1!==o.declarations.length||this.tok.type!==Lr._in&&!this.isContextual("of")?this.parseFor(n,o):(this.options.ecmaVersion>=9&&this.tok.type!==Lr._in&&(n.await=r),this.parseForIn(n,o))}var a=this.parseExpression(!0);return this.tok.type===Lr._in||this.isContextual("of")?(this.options.ecmaVersion>=9&&this.tok.type!==Lr._in&&(n.await=r),this.parseForIn(n,this.toAssignable(a))):this.parseFor(n,a);case Lr._function:return this.next(),this.parseFunction(n,!0);case Lr._if:return this.next(),n.test=this.parseParenExpression(),n.consequent=this.parseStatement(),n.alternate=this.eat(Lr._else)?this.parseStatement():null,this.finishNode(n,"IfStatement");case Lr._return:return this.next(),this.eat(Lr.semi)||this.canInsertSemicolon()?n.argument=null:(n.argument=this.parseExpression(),this.semicolon()),this.finishNode(n,"ReturnStatement");case Lr._switch:var u,l=this.curIndent,c=this.curLineStart;for(this.next(),n.discriminant=this.parseParenExpression(),n.cases=[],this.pushCx(),this.expect(Lr.braceL);!this.closes(Lr.braceR,l,c,!0);)if(this.tok.type===Lr._case||this.tok.type===Lr._default){var p=this.tok.type===Lr._case;u&&this.finishNode(u,"SwitchCase"),n.cases.push(u=this.startNode()),u.consequent=[],this.next(),u.test=p?this.parseExpression():null,this.expect(Lr.colon)}else u||(n.cases.push(u=this.startNode()),u.consequent=[],u.test=null),u.consequent.push(this.parseStatement());return u&&this.finishNode(u,"SwitchCase"),this.popCx(),this.eat(Lr.braceR),this.finishNode(n,"SwitchStatement");case Lr._throw:return this.next(),n.argument=this.parseExpression(),this.semicolon(),this.finishNode(n,"ThrowStatement");case Lr._try:if(this.next(),n.block=this.parseBlock(),n.handler=null,this.tok.type===Lr._catch){var h=this.startNode();this.next(),this.eat(Lr.parenL)?(h.param=this.toAssignable(this.parseExprAtom(),!0),this.expect(Lr.parenR)):h.param=null,h.body=this.parseBlock(),n.handler=this.finishNode(h,"CatchClause")}return n.finalizer=this.eat(Lr._finally)?this.parseBlock():null,n.handler||n.finalizer?this.finishNode(n,"TryStatement"):n.block;case Lr._var:case Lr._const:return this.parseVar(n,!1,e||this.tok.value);case Lr._while:return this.next(),n.test=this.parseParenExpression(),n.body=this.parseStatement(),this.finishNode(n,"WhileStatement");case Lr._with:return this.next(),n.object=this.parseParenExpression(),n.body=this.parseStatement(),this.finishNode(n,"WithStatement");case Lr.braceL:return this.parseBlock();case Lr.semi:return this.next(),this.finishNode(n,"EmptyStatement");case Lr._class:return this.parseClass(!0);case Lr._import:if(this.options.ecmaVersion>10){var d=this.lookAhead(1).type;if(d===Lr.parenL||d===Lr.dot)return n.expression=this.parseExpression(),this.semicolon(),this.finishNode(n,"ExpressionStatement")}return this.parseImport();case Lr._export:return this.parseExport();default:if(this.toks.isAsyncFunction())return this.next(),this.next(),this.parseFunction(n,!0,!0);var f=this.parseExpression();return Qs(f)?(this.next(),this.tok.type===Lr.eof?this.finishNode(n,"EmptyStatement"):this.parseStatement()):t===Lr.name&&"Identifier"===f.type&&this.eat(Lr.colon)?(n.body=this.parseStatement(),n.label=f,this.finishNode(n,"LabeledStatement")):(n.expression=f,this.semicolon(),this.finishNode(n,"ExpressionStatement"))}},ro.parseBlock=function(){var e=this.startNode();this.pushCx(),this.expect(Lr.braceL);var t=this.curIndent,n=this.curLineStart;for(e.body=[];!this.closes(Lr.braceR,t,n,!0);)e.body.push(this.parseStatement());return this.popCx(),this.eat(Lr.braceR),this.finishNode(e,"BlockStatement")},ro.parseFor=function(e,t){return e.init=t,e.test=e.update=null,this.eat(Lr.semi)&&this.tok.type!==Lr.semi&&(e.test=this.parseExpression()),this.eat(Lr.semi)&&this.tok.type!==Lr.parenR&&(e.update=this.parseExpression()),this.popCx(),this.expect(Lr.parenR),e.body=this.parseStatement(),this.finishNode(e,"ForStatement")},ro.parseForIn=function(e,t){var n=this.tok.type===Lr._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.popCx(),this.expect(Lr.parenR),e.body=this.parseStatement(),this.finishNode(e,n)},ro.parseVar=function(e,t,n){e.kind=n,this.next(),e.declarations=[];do{var i=this.startNode();i.id=this.options.ecmaVersion>=6?this.toAssignable(this.parseExprAtom(),!0):this.parseIdent(),i.init=this.eat(Lr.eq)?this.parseMaybeAssign(t):null,e.declarations.push(this.finishNode(i,"VariableDeclarator"))}while(this.eat(Lr.comma));if(!e.declarations.length){var r=this.startNode();r.id=this.dummyIdent(),e.declarations.push(this.finishNode(r,"VariableDeclarator"))}return t||this.semicolon(),this.finishNode(e,"VariableDeclaration")},ro.parseClass=function(e){var t=this.startNode();this.next(),this.tok.type===Lr.name?t.id=this.parseIdent():t.id=!0===e?this.dummyIdent():null,t.superClass=this.eat(Lr._extends)?this.parseExpression():null,t.body=this.startNode(),t.body.body=[],this.pushCx();var n=this.curIndent+1,i=this.curLineStart;for(this.eat(Lr.braceL),this.curIndent+1<n&&(n=this.curIndent,i=this.curLineStart);!this.closes(Lr.braceR,n,i);){var r=this.parseClassElement();r&&t.body.body.push(r)}return this.popCx(),this.eat(Lr.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.semicolon(),this.finishNode(t.body,"ClassBody"),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},ro.parseClassElement=function(){if(this.eat(Lr.semi))return null;var e=this.options,t=e.ecmaVersion,n=e.locations,i=this.curIndent,r=this.curLineStart,s=this.startNode(),o="",a=!1,u=!1,l="method";if(s.static=!1,this.eatContextual("static")&&(this.isClassElementNameStart()||this.toks.type===Lr.star?s.static=!0:o="static"),!o&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.toks.type!==Lr.star||this.canInsertSemicolon()?o="async":u=!0),!o){a=this.eat(Lr.star);var c=this.toks.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?l=c:o=c)}if(o)s.computed=!1,s.key=this.startNodeAt(n?[this.toks.lastTokStart,this.toks.lastTokStartLoc]:this.toks.lastTokStart),s.key.name=o,this.finishNode(s.key,"Identifier");else if(this.parseClassElementName(s),Qs(s.key))return Qs(this.parseMaybeAssign())&&this.next(),this.eat(Lr.comma),null;if(t<13||this.toks.type===Lr.parenL||"method"!==l||a||u){var p=!s.computed&&!s.static&&!a&&!u&&"method"===l&&("Identifier"===s.key.type&&"constructor"===s.key.name||"Literal"===s.key.type&&"constructor"===s.key.value);s.kind=p?"constructor":l,s.value=this.parseMethod(a,u),this.finishNode(s,"MethodDefinition")}else{if(this.eat(Lr.eq))if(this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine())s.value=null;else{var h=this.inAsync,d=this.inGenerator;this.inAsync=!1,this.inGenerator=!1,s.value=this.parseMaybeAssign(),this.inAsync=h,this.inGenerator=d}else s.value=null;this.semicolon(),this.finishNode(s,"PropertyDefinition")}return s},ro.isClassElementNameStart=function(){return this.toks.isClassElementNameStart()},ro.parseClassElementName=function(e){this.toks.type===Lr.privateId?(e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},ro.parseFunction=function(e,t,n){var i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(e),this.options.ecmaVersion>=6&&(e.generator=this.eat(Lr.star)),this.options.ecmaVersion>=8&&(e.async=!!n),this.tok.type===Lr.name?e.id=this.parseIdent():!0===t&&(e.id=this.dummyIdent()),this.inAsync=e.async,this.inGenerator=e.generator,this.inFunction=!0,e.params=this.parseFunctionParams(),e.body=this.parseBlock(),this.toks.adaptDirectivePrologue(e.body.body),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},ro.parseExport=function(){var e=this.startNode();if(this.next(),this.eat(Lr.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?e.exported=this.parseExprAtom():e.exported=null),e.source=this.eatContextual("from")?this.parseExprAtom():this.dummyString(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(Lr._default)){var t;if(this.tok.type===Lr._function||(t=this.toks.isAsyncFunction())){var n=this.startNode();this.next(),t&&this.next(),e.declaration=this.parseFunction(n,"nullableID",t)}else this.tok.type===Lr._class?e.declaration=this.parseClass("nullableID"):(e.declaration=this.parseMaybeAssign(),this.semicolon());return this.finishNode(e,"ExportDefaultDeclaration")}return this.tok.type.keyword||this.toks.isLet()||this.toks.isAsyncFunction()?(e.declaration=this.parseStatement(),e.specifiers=[],e.source=null):(e.declaration=null,e.specifiers=this.parseExportSpecifierList(),e.source=this.eatContextual("from")?this.parseExprAtom():null,this.semicolon()),this.finishNode(e,"ExportNamedDeclaration")},ro.parseImport=function(){var e,t=this.startNode();return this.next(),this.tok.type===Lr.string?(t.specifiers=[],t.source=this.parseExprAtom()):(this.tok.type===Lr.name&&"from"!==this.tok.value&&((e=this.startNode()).local=this.parseIdent(),this.finishNode(e,"ImportDefaultSpecifier"),this.eat(Lr.comma)),t.specifiers=this.parseImportSpecifiers(),t.source=this.eatContextual("from")&&this.tok.type===Lr.string?this.parseExprAtom():this.dummyString(),e&&t.specifiers.unshift(e)),this.semicolon(),this.finishNode(t,"ImportDeclaration")},ro.parseImportSpecifiers=function(){var e=[];if(this.tok.type===Lr.star){var t=this.startNode();this.next(),t.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),e.push(this.finishNode(t,"ImportNamespaceSpecifier"))}else{var n=this.curIndent,i=this.curLineStart,r=this.nextLineStart;for(this.pushCx(),this.eat(Lr.braceL),this.curLineStart>r&&(r=this.curLineStart);!this.closes(Lr.braceR,n+(this.curLineStart<=r?1:0),i);){var s=this.startNode();if(this.eat(Lr.star))s.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),this.finishNode(s,"ImportNamespaceSpecifier");else{if(this.isContextual("from"))break;if(s.imported=this.parseIdent(),Qs(s.imported))break;s.local=this.eatContextual("as")?this.parseIdent():s.imported,this.finishNode(s,"ImportSpecifier")}e.push(s),this.eat(Lr.comma)}this.eat(Lr.braceR),this.popCx()}return e},ro.parseExportSpecifierList=function(){var e=[],t=this.curIndent,n=this.curLineStart,i=this.nextLineStart;for(this.pushCx(),this.eat(Lr.braceL),this.curLineStart>i&&(i=this.curLineStart);!this.closes(Lr.braceR,t+(this.curLineStart<=i?1:0),n)&&!this.isContextual("from");){var r=this.startNode();if(r.local=this.parseIdent(),Qs(r.local))break;r.exported=this.eatContextual("as")?this.parseIdent():r.local,this.finishNode(r,"ExportSpecifier"),e.push(r),this.eat(Lr.comma)}return this.eat(Lr.braceR),this.popCx(),e};var so=to.prototype;so.checkLVal=function(e){if(!e)return e;switch(e.type){case"Identifier":case"MemberExpression":return e;case"ParenthesizedExpression":return e.expression=this.checkLVal(e.expression),e;default:return this.dummyIdent()}},so.parseExpression=function(e){var t=this.storeCurrentPos(),n=this.parseMaybeAssign(e);if(this.tok.type===Lr.comma){var i=this.startNodeAt(t);for(i.expressions=[n];this.eat(Lr.comma);)i.expressions.push(this.parseMaybeAssign(e));return this.finishNode(i,"SequenceExpression")}return n},so.parseParenExpression=function(){this.pushCx(),this.expect(Lr.parenL);var e=this.parseExpression();return this.popCx(),this.expect(Lr.parenR),e},so.parseMaybeAssign=function(e){if(this.inGenerator&&this.toks.isContextual("yield")){var t=this.startNode();return this.next(),this.semicolon()||this.canInsertSemicolon()||this.tok.type!==Lr.star&&!this.tok.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(Lr.star),t.argument=this.parseMaybeAssign()),this.finishNode(t,"YieldExpression")}var n=this.storeCurrentPos(),i=this.parseMaybeConditional(e);if(this.tok.type.isAssign){var r=this.startNodeAt(n);return r.operator=this.tok.value,r.left=this.tok.type===Lr.eq?this.toAssignable(i):this.checkLVal(i),this.next(),r.right=this.parseMaybeAssign(e),this.finishNode(r,"AssignmentExpression")}return i},so.parseMaybeConditional=function(e){var t=this.storeCurrentPos(),n=this.parseExprOps(e);if(this.eat(Lr.question)){var i=this.startNodeAt(t);return i.test=n,i.consequent=this.parseMaybeAssign(),i.alternate=this.expect(Lr.colon)?this.parseMaybeAssign(e):this.dummyIdent(),this.finishNode(i,"ConditionalExpression")}return n},so.parseExprOps=function(e){var t=this.storeCurrentPos(),n=this.curIndent,i=this.curLineStart;return this.parseExprOp(this.parseMaybeUnary(!1),t,-1,e,n,i)},so.parseExprOp=function(e,t,n,i,r,s){if(this.curLineStart!==s&&this.curIndent<r&&this.tokenStartsLine())return e;var o=this.tok.type.binop;if(null!=o&&(!i||this.tok.type!==Lr._in)&&o>n){var a=this.startNodeAt(t);if(a.left=e,a.operator=this.tok.value,this.next(),this.curLineStart!==s&&this.curIndent<r&&this.tokenStartsLine())a.right=this.dummyIdent();else{var u=this.storeCurrentPos();a.right=this.parseExprOp(this.parseMaybeUnary(!1),u,o,i,r,s)}return this.finishNode(a,/&&|\|\||\?\?/.test(a.operator)?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,n,i,r,s)}return e},so.parseMaybeUnary=function(e){var t,n=this.storeCurrentPos();if(this.options.ecmaVersion>=8&&this.toks.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))t=this.parseAwait(),e=!0;else if(this.tok.type.prefix){var i=this.startNode(),r=this.tok.type===Lr.incDec;r||(e=!0),i.operator=this.tok.value,i.prefix=!0,this.next(),i.argument=this.parseMaybeUnary(!0),r&&(i.argument=this.checkLVal(i.argument)),t=this.finishNode(i,r?"UpdateExpression":"UnaryExpression")}else if(this.tok.type===Lr.ellipsis){var s=this.startNode();this.next(),s.argument=this.parseMaybeUnary(e),t=this.finishNode(s,"SpreadElement")}else for(t=this.parseExprSubscripts();this.tok.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(n);o.operator=this.tok.value,o.prefix=!1,o.argument=this.checkLVal(t),this.next(),t=this.finishNode(o,"UpdateExpression")}if(!e&&this.eat(Lr.starstar)){var a=this.startNodeAt(n);return a.operator="**",a.left=t,a.right=this.parseMaybeUnary(!1),this.finishNode(a,"BinaryExpression")}return t},so.parseExprSubscripts=function(){var e=this.storeCurrentPos();return this.parseSubscripts(this.parseExprAtom(),e,!1,this.curIndent,this.curLineStart)},so.parseSubscripts=function(e,t,n,i,r){for(var s=this.options.ecmaVersion>=11,o=!1;;){if(this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine()){if(this.tok.type!==Lr.dot||this.curIndent!==i)break;--i}var a="Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon(),u=s&&this.eat(Lr.questionDot);if(u&&(o=!0),u&&this.tok.type!==Lr.parenL&&this.tok.type!==Lr.bracketL&&this.tok.type!==Lr.backQuote||this.eat(Lr.dot)){var l=this.startNodeAt(t);l.object=e,this.curLineStart!==r&&this.curIndent<=i&&this.tokenStartsLine()?l.property=this.dummyIdent():l.property=this.parsePropertyAccessor()||this.dummyIdent(),l.computed=!1,s&&(l.optional=u),e=this.finishNode(l,"MemberExpression")}else if(this.tok.type===Lr.bracketL){this.pushCx(),this.next();var c=this.startNodeAt(t);c.object=e,c.property=this.parseExpression(),c.computed=!0,s&&(c.optional=u),this.popCx(),this.expect(Lr.bracketR),e=this.finishNode(c,"MemberExpression")}else if(n||this.tok.type!==Lr.parenL){if(this.tok.type!==Lr.backQuote)break;var p=this.startNodeAt(t);p.tag=e,p.quasi=this.parseTemplate(),e=this.finishNode(p,"TaggedTemplateExpression")}else{var h=this.parseExprList(Lr.parenR);if(a&&this.eat(Lr.arrow))return this.parseArrowExpression(this.startNodeAt(t),h,!0);var d=this.startNodeAt(t);d.callee=e,d.arguments=h,s&&(d.optional=u),e=this.finishNode(d,"CallExpression")}}if(o){var f=this.startNodeAt(t);f.expression=e,e=this.finishNode(f,"ChainExpression")}return e},so.parseExprAtom=function(){var e;switch(this.tok.type){case Lr._this:case Lr._super:var t=this.tok.type===Lr._this?"ThisExpression":"Super";return e=this.startNode(),this.next(),this.finishNode(e,t);case Lr.name:var n=this.storeCurrentPos(),i=this.parseIdent(),r=!1;if("async"===i.name&&!this.canInsertSemicolon()){if(this.eat(Lr._function))return this.parseFunction(this.startNodeAt(n),!1,!0);this.tok.type===Lr.name&&(i=this.parseIdent(),r=!0)}return this.eat(Lr.arrow)?this.parseArrowExpression(this.startNodeAt(n),[i],r):i;case Lr.regexp:e=this.startNode();var s=this.tok.value;return e.regex={pattern:s.pattern,flags:s.flags},e.value=s.value,e.raw=this.input.slice(this.tok.start,this.tok.end),this.next(),this.finishNode(e,"Literal");case Lr.num:case Lr.string:return(e=this.startNode()).value=this.tok.value,e.raw=this.input.slice(this.tok.start,this.tok.end),this.tok.type===Lr.num&&110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal");case Lr._null:case Lr._true:case Lr._false:return(e=this.startNode()).value=this.tok.type===Lr._null?null:this.tok.type===Lr._true,e.raw=this.tok.type.keyword,this.next(),this.finishNode(e,"Literal");case Lr.parenL:var o=this.storeCurrentPos();this.next();var a=this.parseExpression();if(this.expect(Lr.parenR),this.eat(Lr.arrow)){var u=a.expressions||[a];return u.length&&Qs(u[u.length-1])&&u.pop(),this.parseArrowExpression(this.startNodeAt(o),u)}if(this.options.preserveParens){var l=this.startNodeAt(o);l.expression=a,a=this.finishNode(l,"ParenthesizedExpression")}return a;case Lr.bracketL:return(e=this.startNode()).elements=this.parseExprList(Lr.bracketR,!0),this.finishNode(e,"ArrayExpression");case Lr.braceL:return this.parseObj();case Lr._class:return this.parseClass(!1);case Lr._function:return e=this.startNode(),this.next(),this.parseFunction(e,!1);case Lr._new:return this.parseNew();case Lr.backQuote:return this.parseTemplate();case Lr._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.dummyIdent();default:return this.dummyIdent()}},so.parseExprImport=function(){var e=this.startNode(),t=this.parseIdent(!0);switch(this.tok.type){case Lr.parenL:return this.parseDynamicImport(e);case Lr.dot:return e.meta=t,this.parseImportMeta(e);default:return e.name="import",this.finishNode(e,"Identifier")}},so.parseDynamicImport=function(e){return e.source=this.parseExprList(Lr.parenR)[0]||this.dummyString(),this.finishNode(e,"ImportExpression")},so.parseImportMeta=function(e){return this.next(),e.property=this.parseIdent(!0),this.finishNode(e,"MetaProperty")},so.parseNew=function(){var e=this.startNode(),t=this.curIndent,n=this.curLineStart,i=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(Lr.dot))return e.meta=i,e.property=this.parseIdent(!0),this.finishNode(e,"MetaProperty");var r=this.storeCurrentPos();return e.callee=this.parseSubscripts(this.parseExprAtom(),r,!0,t,n),this.tok.type===Lr.parenL?e.arguments=this.parseExprList(Lr.parenR):e.arguments=[],this.finishNode(e,"NewExpression")},so.parseTemplateElement=function(){var e=this.startNode();return this.tok.type===Lr.invalidTemplate?e.value={raw:this.tok.value,cooked:null}:e.value={raw:this.input.slice(this.tok.start,this.tok.end).replace(/\r\n?/g,"\n"),cooked:this.tok.value},this.next(),e.tail=this.tok.type===Lr.backQuote,this.finishNode(e,"TemplateElement")},so.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.next(),e.expressions.push(this.parseExpression()),this.expect(Lr.braceR)?t=this.parseTemplateElement():((t=this.startNode()).value={cooked:"",raw:""},t.tail=!0,this.finishNode(t,"TemplateElement")),e.quasis.push(t);return this.expect(Lr.backQuote),this.finishNode(e,"TemplateLiteral")},so.parseObj=function(){var e=this.startNode();e.properties=[],this.pushCx();var t=this.curIndent+1,n=this.curLineStart;for(this.eat(Lr.braceL),this.curIndent+1<t&&(t=this.curIndent,n=this.curLineStart);!this.closes(Lr.braceR,t,n);){var i=this.startNode(),r=void 0,s=void 0,o=void 0;if(this.options.ecmaVersion>=9&&this.eat(Lr.ellipsis))i.argument=this.parseMaybeAssign(),e.properties.push(this.finishNode(i,"SpreadElement")),this.eat(Lr.comma);else if(this.options.ecmaVersion>=6&&(o=this.storeCurrentPos(),i.method=!1,i.shorthand=!1,r=this.eat(Lr.star)),this.parsePropertyName(i),this.toks.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(Lr.star),this.parsePropertyName(i)):s=!1,Qs(i.key))Qs(this.parseMaybeAssign())&&this.next(),this.eat(Lr.comma);else{if(this.eat(Lr.colon))i.kind="init",i.value=this.parseMaybeAssign();else if(this.options.ecmaVersion>=6&&(this.tok.type===Lr.parenL||this.tok.type===Lr.braceL))i.kind="init",i.method=!0,i.value=this.parseMethod(r,s);else if(this.options.ecmaVersion>=5&&"Identifier"===i.key.type&&!i.computed&&("get"===i.key.name||"set"===i.key.name)&&this.tok.type!==Lr.comma&&this.tok.type!==Lr.braceR&&this.tok.type!==Lr.eq)i.kind=i.key.name,this.parsePropertyName(i),i.value=this.parseMethod(!1);else{if(i.kind="init",this.options.ecmaVersion>=6)if(this.eat(Lr.eq)){var a=this.startNodeAt(o);a.operator="=",a.left=i.key,a.right=this.parseMaybeAssign(),i.value=this.finishNode(a,"AssignmentExpression")}else i.value=i.key;else i.value=this.dummyIdent();i.shorthand=!0}e.properties.push(this.finishNode(i,"Property")),this.eat(Lr.comma)}}return this.popCx(),this.eat(Lr.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.finishNode(e,"ObjectExpression")},so.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Lr.bracketL))return e.computed=!0,e.key=this.parseExpression(),void this.expect(Lr.bracketR);e.computed=!1}var t=this.tok.type===Lr.num||this.tok.type===Lr.string?this.parseExprAtom():this.parseIdent();e.key=t||this.dummyIdent()},so.parsePropertyAccessor=function(){return this.tok.type===Lr.name||this.tok.type.keyword?this.parseIdent():this.tok.type===Lr.privateId?this.parsePrivateIdent():void 0},so.parseIdent=function(){var e=this.tok.type===Lr.name?this.tok.value:this.tok.type.keyword;if(!e)return this.dummyIdent();var t=this.startNode();return this.next(),t.name=e,this.finishNode(t,"Identifier")},so.parsePrivateIdent=function(){var e=this.startNode();return e.name=this.tok.value,this.next(),this.finishNode(e,"PrivateIdentifier")},so.initFunction=function(e){e.id=null,e.params=[],this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},so.toAssignable=function(e,t){if(!e||"Identifier"===e.type||"MemberExpression"===e.type&&!t);else if("ParenthesizedExpression"===e.type)this.toAssignable(e.expression,t);else{if(this.options.ecmaVersion<6)return this.dummyIdent();if("ObjectExpression"===e.type){e.type="ObjectPattern";for(var n=0,i=e.properties;n<i.length;n+=1){var r=i[n];this.toAssignable(r,t)}}else if("ArrayExpression"===e.type)e.type="ArrayPattern",this.toAssignableList(e.elements,t);else if("Property"===e.type)this.toAssignable(e.value,t);else if("SpreadElement"===e.type)e.type="RestElement",this.toAssignable(e.argument,t);else{if("AssignmentExpression"!==e.type)return this.dummyIdent();e.type="AssignmentPattern",delete e.operator}}return e},so.toAssignableList=function(e,t){for(var n=0,i=e;n<i.length;n+=1){var r=i[n];this.toAssignable(r,t)}return e},so.parseFunctionParams=function(e){return e=this.parseExprList(Lr.parenR),this.toAssignableList(e,!0)},so.parseMethod=function(e,t){var n=this.startNode(),i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=!!e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inAsync=n.async,this.inGenerator=n.generator,this.inFunction=!0,n.params=this.parseFunctionParams(),n.body=this.parseBlock(),this.toks.adaptDirectivePrologue(n.body.body),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(n,"FunctionExpression")},so.parseArrowExpression=function(e,t,n){var i=this.inAsync,r=this.inGenerator,s=this.inFunction;return this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inAsync=e.async,this.inGenerator=!1,this.inFunction=!0,e.params=this.toAssignableList(t,!0),e.expression=this.tok.type!==Lr.braceL,e.expression?e.body=this.parseMaybeAssign():(e.body=this.parseBlock(),this.toks.adaptDirectivePrologue(e.body.body)),this.inAsync=i,this.inGenerator=r,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},so.parseExprList=function(e,t){this.pushCx();var n=this.curIndent,i=this.curLineStart,r=[];for(this.next();!this.closes(e,n+1,i);)if(this.eat(Lr.comma))r.push(t?null:this.dummyIdent());else{var s=this.parseMaybeAssign();if(Qs(s)){if(this.closes(e,n,i))break;this.next()}else r.push(s);this.eat(Lr.comma)}return this.popCx(),this.eat(e)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),r},so.parseAwait=function(){var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},Yr.tabSize=4;const{stringify:oo}=JSON;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");const ao={"||":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},uo=17,lo={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:uo,ClassExpression:uo,FunctionExpression:uo,ObjectExpression:uo,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function co(e,t){const{generator:n}=e;if(e.write("("),null!=t&&t.length>0){n[t[0].type](t[0],e);const{length:i}=t;for(let r=1;r<i;r++){const i=t[r];e.write(", "),n[i.type](i,e)}}e.write(")")}function po(e,t,n,i){const r=e.expressionsPrecedence[t.type];if(r===uo)return!0;const s=e.expressionsPrecedence[n.type];return r!==s?!i&&15===r&&14===s&&"**"===n.operator||r<s:(13===r||14===r)&&("**"===t.operator&&"**"===n.operator?!i:i?ao[t.operator]<=ao[n.operator]:ao[t.operator]<ao[n.operator])}function ho(e,t,n,i){const{generator:r}=e;po(e,t,n,i)?(e.write("("),r[t.type](t,e),e.write(")")):r[t.type](t,e)}function fo(e,t,n,i){const r=t.split("\n"),s=r.length-1;if(e.write(r[0].trim()),s>0){e.write(i);for(let t=1;t<s;t++)e.write(n+r[t].trim()+i);e.write(n+r[s].trim())}}function mo(e,t,n,i){const{length:r}=t;for(let s=0;s<r;s++){const r=t[s];e.write(n),"L"===r.type[0]?e.write("// "+r.value.trim()+"\n",r):(e.write("/*"),fo(e,r.value,n,i),e.write("*/"+i))}}function go(e,t){const{generator:n}=e,{declarations:i}=t;e.write(t.kind+" ");const{length:r}=i;if(r>0){n.VariableDeclarator(i[0],e);for(let t=1;t<r;t++)e.write(", "),n.VariableDeclarator(i[t],e)}}let vo,yo,bo,xo,Eo,wo;const Co={Program(e,t){const n=t.indent.repeat(t.indentLevel),{lineEnd:i,writeComments:r}=t;r&&null!=e.comments&&mo(t,e.comments,n,i);const s=e.body,{length:o}=s;for(let e=0;e<o;e++){const o=s[e];r&&null!=o.comments&&mo(t,o.comments,n,i),t.write(n),this[o.type](o,t),t.write(i)}r&&null!=e.trailingComments&&mo(t,e.trailingComments,n,i)},BlockStatement:wo=function(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t,s=n+t.indent;t.write("{");const o=e.body;if(null!=o&&o.length>0){t.write(i),r&&null!=e.comments&&mo(t,e.comments,s,i);const{length:a}=o;for(let e=0;e<a;e++){const n=o[e];r&&null!=n.comments&&mo(t,n.comments,s,i),t.write(s),this[n.type](n,t),t.write(i)}t.write(n)}else r&&null!=e.comments&&(t.write(i),mo(t,e.comments,s,i),t.write(n));r&&null!=e.trailingComments&&mo(t,e.trailingComments,s,i),t.write("}"),t.indentLevel--},ClassBody:wo,EmptyStatement(e,t){t.write(";")},ExpressionStatement(e,t){const n=t.expressionsPrecedence[e.expression.type];n===uo||3===n&&"O"===e.expression.left.type[0]?(t.write("("),this[e.expression.type](e.expression,t),t.write(")")):this[e.expression.type](e.expression,t),t.write(";")},IfStatement(e,t){t.write("if ("),this[e.test.type](e.test,t),t.write(") "),this[e.consequent.type](e.consequent,t),null!=e.alternate&&(t.write(" else "),this[e.alternate.type](e.alternate,t))},LabeledStatement(e,t){this[e.label.type](e.label,t),t.write(": "),this[e.body.type](e.body,t)},BreakStatement(e,t){t.write("break"),null!=e.label&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},ContinueStatement(e,t){t.write("continue"),null!=e.label&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},WithStatement(e,t){t.write("with ("),this[e.object.type](e.object,t),t.write(") "),this[e.body.type](e.body,t)},SwitchStatement(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t;t.indentLevel++;const s=n+t.indent,o=s+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+i);const{cases:a}=e,{length:u}=a;for(let e=0;e<u;e++){const n=a[e];r&&null!=n.comments&&mo(t,n.comments,s,i),n.test?(t.write(s+"case "),this[n.test.type](n.test,t),t.write(":"+i)):t.write(s+"default:"+i);const{consequent:u}=n,{length:l}=u;for(let e=0;e<l;e++){const n=u[e];r&&null!=n.comments&&mo(t,n.comments,o,i),t.write(o),this[n.type](n,t),t.write(i)}}t.indentLevel-=2,t.write(n+"}")},ReturnStatement(e,t){t.write("return"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t)),t.write(";")},ThrowStatement(e,t){t.write("throw "),this[e.argument.type](e.argument,t),t.write(";")},TryStatement(e,t){if(t.write("try "),this[e.block.type](e.block,t),e.handler){const{handler:n}=e;null==n.param?t.write(" catch "):(t.write(" catch ("),this[n.param.type](n.param,t),t.write(") ")),this[n.body.type](n.body,t)}e.finalizer&&(t.write(" finally "),this[e.finalizer.type](e.finalizer,t))},WhileStatement(e,t){t.write("while ("),this[e.test.type](e.test,t),t.write(") "),this[e.body.type](e.body,t)},DoWhileStatement(e,t){t.write("do "),this[e.body.type](e.body,t),t.write(" while ("),this[e.test.type](e.test,t),t.write(");")},ForStatement(e,t){if(t.write("for ("),null!=e.init){const{init:n}=e;"V"===n.type[0]?go(t,n):this[n.type](n,t)}t.write("; "),e.test&&this[e.test.type](e.test,t),t.write("; "),e.update&&this[e.update.type](e.update,t),t.write(") "),this[e.body.type](e.body,t)},ForInStatement:vo=function(e,t){t.write(`for ${e.await?"await ":""}(`);const{left:n}=e;"V"===n.type[0]?go(t,n):this[n.type](n,t),t.write("I"===e.type[3]?" in ":" of "),this[e.right.type](e.right,t),t.write(") "),this[e.body.type](e.body,t)},ForOfStatement:vo,DebuggerStatement(e,t){t.write("debugger;",e)},FunctionDeclaration:yo=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),co(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:yo,VariableDeclaration(e,t){go(t,e),t.write(";")},VariableDeclarator(e,t){this[e.id.type](e.id,t),null!=e.init&&(t.write(" = "),this[e.init.type](e.init,t))},ClassDeclaration(e,t){if(t.write("class "+(e.id?`${e.id.name} `:""),e),e.superClass){t.write("extends ");const{superClass:n}=e,{type:i}=n,r=t.expressionsPrecedence[i];"C"===i[0]&&"l"===i[1]&&"E"===i[5]||!(r===uo||r<t.expressionsPrecedence.ClassExpression)?this[n.type](n,t):(t.write("("),this[e.superClass.type](n,t),t.write(")")),t.write(" ")}this.ClassBody(e.body,t)},ImportDeclaration(e,t){t.write("import ");const{specifiers:n}=e,{length:i}=n;let r=0;if(i>0){for(;r<i;){r>0&&t.write(", ");const e=n[r],i=e.type[6];if("D"===i)t.write(e.local.name,e),r++;else{if("N"!==i)break;t.write("* as "+e.local.name,e),r++}}if(r<i){for(t.write("{");;){const e=n[r],{name:s}=e.imported;if(t.write(s,e),s!==e.local.name&&t.write(" as "+e.local.name),!(++r<i))break;t.write(", ")}t.write("}")}t.write(" from ")}this.Literal(e.source,t),t.write(";")},ImportExpression(e,t){t.write("import("),this[e.source.type](e.source,t),t.write(")")},ExportDefaultDeclaration(e,t){t.write("export default "),this[e.declaration.type](e.declaration,t),null!=t.expressionsPrecedence[e.declaration.type]&&"F"!==e.declaration.type[0]&&t.write(";")},ExportNamedDeclaration(e,t){if(t.write("export "),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write("{");const{specifiers:n}=e,{length:i}=n;if(i>0)for(let e=0;;){const r=n[e],{name:s}=r.local;if(t.write(s,r),s!==r.exported.name&&t.write(" as "+r.exported.name),!(++e<i))break;t.write(", ")}t.write("}"),e.source&&(t.write(" from "),this.Literal(e.source,t)),t.write(";")}},ExportAllDeclaration(e,t){null!=e.exported?t.write("export * as "+e.exported.name+" from "):t.write("export * from "),this.Literal(e.source,t),t.write(";")},MethodDefinition(e,t){e.static&&t.write("static ");const n=e.kind[0];"g"!==n&&"s"!==n||t.write(e.kind+" "),e.value.async&&t.write("async "),e.value.generator&&t.write("*"),e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),co(t,e.value.params),t.write(" "),this[e.value.body.type](e.value.body,t)},ClassExpression(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression(e,t){t.write(e.async?"async ":"",e);const{params:n}=e;null!=n&&(1===n.length&&"I"===n[0].type[0]?t.write(n[0].name,n[0]):co(t,e.params)),t.write(" => "),"O"===e.body.type[0]?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression(e,t){t.write("this",e)},Super(e,t){t.write("super",e)},RestElement:bo=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:bo,YieldExpression(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression(e,t){t.write("await ",e),ho(t,e.argument,e)},TemplateLiteral(e,t){const{quasis:n,expressions:i}=e;t.write("`");const{length:r}=i;for(let e=0;e<r;e++){const r=i[e],s=n[e];t.write(s.value.raw,s),t.write("${"),this[r.type](r,t),t.write("}")}const s=n[n.length-1];t.write(s.value.raw,s),t.write("`")},TemplateElement(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression(e,t){this[e.tag.type](e.tag,t),this[e.quasi.type](e.quasi,t)},ArrayExpression:Eo=function(e,t){if(t.write("["),e.elements.length>0){const{elements:n}=e,{length:i}=n;for(let e=0;;){const r=n[e];if(null!=r&&this[r.type](r,t),!(++e<i)){null==r&&t.write(", ");break}t.write(", ")}}t.write("]")},ArrayPattern:Eo,ObjectExpression(e,t){const n=t.indent.repeat(t.indentLevel++),{lineEnd:i,writeComments:r}=t,s=n+t.indent;if(t.write("{"),e.properties.length>0){t.write(i),r&&null!=e.comments&&mo(t,e.comments,s,i);const o=","+i,{properties:a}=e,{length:u}=a;for(let e=0;;){const n=a[e];if(r&&null!=n.comments&&mo(t,n.comments,s,i),t.write(s),this[n.type](n,t),!(++e<u))break;t.write(o)}t.write(i),r&&null!=e.trailingComments&&mo(t,e.trailingComments,s,i),t.write(n+"}")}else r?null!=e.comments?(t.write(i),mo(t,e.comments,s,i),null!=e.trailingComments&&mo(t,e.trailingComments,s,i),t.write(n+"}")):null!=e.trailingComments?(t.write(i),mo(t,e.trailingComments,s,i),t.write(n+"}")):t.write("}"):t.write("}");t.indentLevel--},Property(e,t){e.method||"i"!==e.kind[0]?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),t.write(": ")),this[e.value.type](e.value,t))},ObjectPattern(e,t){if(t.write("{"),e.properties.length>0){const{properties:n}=e,{length:i}=n;for(let e=0;this[n[e].type](n[e],t),++e<i;)t.write(", ")}t.write("}")},SequenceExpression(e,t){co(t,e.expressions)},UnaryExpression(e,t){if(e.prefix){const{operator:n,argument:i,argument:{type:r}}=e;t.write(n);const s=po(t,i,e);s||!(n.length>1)&&("U"!==r[0]||"n"!==r[1]&&"p"!==r[1]||!i.prefix||i.operator[0]!==n||"+"!==n&&"-"!==n)||t.write(" "),s?(t.write(n.length>1?" (":"("),this[r](i,t),t.write(")")):this[r](i,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:xo=function(e,t){const n="in"===e.operator;n&&t.write("("),ho(t,e.left,e,!1),t.write(" "+e.operator+" "),ho(t,e.right,e,!0),n&&t.write(")")},LogicalExpression:xo,ConditionalExpression(e,t){const{test:n}=e,i=t.expressionsPrecedence[n.type];i===uo||i<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[n.type](n,t),t.write(")")):this[n.type](n,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression(e,t){t.write("new ");const n=t.expressionsPrecedence[e.callee.type];n===uo||n<t.expressionsPrecedence.CallExpression||function(e){let t=e;for(;null!=t;){const{type:e}=t;if("C"===e[0]&&"a"===e[1])return!0;if("M"!==e[0]||"e"!==e[1]||"m"!==e[2])return!1;t=t.object}}(e.callee)?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),co(t,e.arguments)},CallExpression(e,t){const n=t.expressionsPrecedence[e.callee.type];n===uo||n<t.expressionsPrecedence.CallExpression?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),e.optional&&t.write("?."),co(t,e.arguments)},ChainExpression(e,t){this[e.expression.type](e.expression,t)},MemberExpression(e,t){const n=t.expressionsPrecedence[e.object.type];n===uo||n<t.expressionsPrecedence.MemberExpression?(t.write("("),this[e.object.type](e.object,t),t.write(")")):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write("?."),t.write("["),this[e.property.type](e.property,t),t.write("]")):(e.optional?t.write("?."):t.write("."),this[e.property.type](e.property,t))},MetaProperty(e,t){t.write(e.meta.name+"."+e.property.name,e)},Identifier(e,t){t.write(e.name,e)},Literal(e,t){null!=e.raw?t.write(e.raw,e):null!=e.regex?this.RegExpLiteral(e,t):null!=e.bigint?t.write(e.bigint+"n",e):t.write(oo(e.value),e)},RegExpLiteral(e,t){const{regex:n}=e;t.write(`/${n.pattern}/${n.flags}`,e)}},So={};class Do{constructor(e){const t=null==e?So:e;this.output="",null!=t.output?(this.output=t.output,this.write=this.writeToStream):this.output="",this.generator=null!=t.generator?t.generator:Co,this.expressionsPrecedence=null!=t.expressionsPrecedence?t.expressionsPrecedence:lo,this.indent=null!=t.indent?t.indent:" ",this.lineEnd=null!=t.lineEnd?t.lineEnd:"\n",this.indentLevel=null!=t.startingIndentLevel?t.startingIndentLevel:0,this.writeComments=!!t.comments&&t.comments,null!=t.sourceMap&&(this.write=null==t.output?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=t.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split("\n").length-1,this.mapping={original:null,generated:this,name:void 0,source:t.sourceMap.file||t.sourceMap._file})}write(e){this.output+=e}writeToStream(e){this.output.write(e)}writeAndMap(e,t){this.output+=e,this.map(e,t)}writeToStreamAndMap(e,t){this.output.write(e),this.map(e,t)}map(e,t){if(null!=t){const{type:n}=t;if("L"===n[0]&&"n"===n[2])return this.column=0,void this.line++;if(null!=t.loc){const{mapping:e}=this;e.original=t.loc.start,e.name=t.name,this.sourceMap.addMapping(e)}if("T"===n[0]&&"E"===n[8]||"L"===n[0]&&"i"===n[1]&&"string"==typeof t.value){const{length:t}=e;let{column:n,line:i}=this;for(let r=0;r<t;r++)"\n"===e[r]?(n=0,i++):n++;return this.column=n,void(this.line=i)}}const{length:n}=e,{lineEnd:i}=this;n>0&&(this.lineEndSize>0&&(1===i.length?e[n-1]===i:e.endsWith(i))?(this.line+=this.lineEndSize,this.column=0):this.column+=n)}toString(){return this.output}}function _o(e,t){const n=new Do(t);return n.generator[e.type](e,n),n.output}const Ao=n(1227)("mongodb-aggregations:modules:import-pipeline"),ko="aggregations/import-pipeline",To=`${ko}/NEW_PIPELINE_FROM_TEXT`,Oo=`${ko}/CLOSE_IMPORT`,Io=`${ko}/CHANGE_TEXT`,Fo=`${ko}/CREATE_NEW`,Po=`${ko}/CONFIRM_NEW`,No={isOpen:!1,text:"",isConfirmationNeeded:!1,syntaxError:null},Ro={[To]:e=>({...e,isOpen:!0,text:""}),[Oo]:e=>({...e,isOpen:!1,isConfirmationNeeded:!1,syntaxError:null}),[Io]:(e,t)=>({...e,text:t.text}),[Fo]:e=>({...e,isOpen:!1,isConfirmationNeeded:!0})},Mo=()=>({type:To}),Lo=e=>{try{return function(e){const t=function(e){if(!e.body||1!==e.body.length)return;const t=e.body[0];if("ExpressionStatement"!==t.type)return;const{type:n,elements:i}=t.expression||{};return"ArrayExpression"!==n||i.find((e=>!function(e){return"ObjectExpression"===e.type&&e.properties&&1===e.properties.length}(e)))?void 0:i.map((e=>function(e){const{key:t,value:n}=e.properties[0];return{operator:t.name||t.value,source:_o(n,{comments:!0,indent:" "})}}(e)))}(function(e){try{const t=function(e,t){return to.parse(e,{ecmaVersion:6})}(e);return t}catch(e){const t=new Error(`Unable to parse the pipeline source: ${e.message}`);throw t.stack=e.stack,t}}(e));if(!t)throw new Error("Unable to extract pipeline stages: the provided input is not an array of objects.");return t}(e).map((e=>Bo(e.operator,e.source,null)))}catch(e){return Ao(e),[Bo(null,"",e.message)]}},Bo=(e,t,n)=>({...ci(),stageOperator:e,stage:t,isValid:!n,syntaxError:n});var jo=n(6160),Vo=n.n(jo);const zo="aggregations/data-service/DATA_SERVICE_CONNECTED",qo={error:null,dataService:null};function Uo(e=qo,t){return t.type===zo?{error:t.error,dataService:t.dataService}:e}const $o=(e,t)=>({type:zo,error:e,dataService:t}),Ho="aggregations/fields/FIELDS_CHANGED",Wo=[],Ko="aggregations/source-name/SOURCE_NAME_CHANGED",Go=n(1227)("mongodb-aggregations:modules:input-document"),Zo="aggregations/input-documents",Xo=`${Zo}/TOGGLE_INPUT_COLLAPSED`,Jo=`${Zo}/UPDATE_INPUT_DOCUMENTS`,Yo=`${Zo}/LOADING_INPUT_DOCUMENTS`,Qo={count:0,documents:[],error:null,isExpanded:!0,isLoading:!1},ea=(e,t,n)=>({type:Jo,count:e,documents:t,error:n}),ta=()=>(e,t)=>{const n=t(),i=n.dataService.dataService,r=n.namespace,s={maxTimeMS:n.settings.maxTimeMS},o=[{$limit:n.settings.sampleSize}];i&&i.isConnected()?(e({type:Yo}),i.estimatedCount(r,s,((t,n)=>{i.aggregate(r,o,s,((i,r)=>{if(i)return e(ea(t?"N/A":n,[],i));r.toArray(((i,s)=>{e(ea(t?"N/A":n,s,i)),r.close()}))}))}))):i&&!i.isConnected()&&Go("warning: trying to refresh aggregation but dataService is disconnected",i)},na="aggregations/namespace/NAMESPACE_CHANGED",ia=e=>({type:na,namespace:e}),ra="aggregations/env/ENV_CHANGED",sa=wn.ON_PREM,oa="aggregations/env/IS_TIME_SERIES_CHANGED",aa="aggregations/server-version/SERVER_VERSION_CHANGED",ua="aggregations/name/NAME_CHANGED",la="aggregations/limit/LIMIT_CHANGED",ca="aggregations/large-limit/LARGE_LIMIT_CHANGED",pa=st,ha="aggregations/is-atlas-deployed/SET_IS_ATLAS_DEPLOYED",da="aggregations/is-readonly/IS_READONLY_CHANGED",fa="aggregations/allow-writes/ALLOW_WRITES",ma="aggregations/max-time-ms/MAX_TIME_MS_CHANGED",ga="aggregations/collation/COLLATION_COLLAPSE_TOGGLED",va="aggregations/comments/TOGGLE_COMMENTS",ya="aggregations/sample/TOGGLE_SAMPLE",ba="aggregations/autoPreview/TOGGLE_AUTO_PREVIEW",xa=()=>({type:ba}),Ea="agreggations/restore-pipeline",wa=`${Ea}/MODAL_TOGGLE`,Ca=`${Ea}/OBJECT_ID`,Sa={isModalVisible:!1,pipelineObjectID:""},Da="aggregations/is-overview-on/TOGGLE_OVERVIEW",_a="aggregations/settings",Aa=`${_a}/TOGGLE_IS_EXPANDED`,ka=`${_a}/TOGGLE_COMMENT_MODE`,Ta=`${_a}/SET_SAMPLE_SIZE`,Oa=`${_a}/SET_MAX_TIME_MS`,Ia=`${_a}/SET_LIMIT`,Fa=`${_a}/APPLY_SETTINGS`,Pa={isExpanded:!1,isCommentMode:!0,isDirty:!1,sampleSize:20,maxTimeMS:rt,limit:st},Na=()=>({type:Aa}),Ra="aggregations/is-fullscreen-on/TOGGLE_FULLSCREEN",Ma="aggregations/saving-pipeline/NAME_CHANGED",La="aggregations/saving-pipeline/APPLY",Ba="aggregations/saving-pipeline/CANCEL",ja="aggregations/saving-pipeline/OPEN",Va={isOpen:!1,name:"",isSaveAs:!1},za=({name:e="",isSaveAs:t=!1}={})=>({type:ja,isSaveAs:t,name:e}),qa="aggregations/out-results-fn/OUT_RESULTS_FN_CHANGED",Ua="aggregations/projections/PROJECTIONS_CHANGED",$a=[],Ha="aggregations/is-new-pipeline-confirm/SET_IS_NEW_PIPELINE_CONFIRM",Wa=e=>({type:Ha,isNewPipelineConfirm:e}),{track:Ka,debug:Ga}=He("COMPASS-AGGREGATIONS-UI"),Za="aggregations/update-view/ERROR_UPDATING_VIEW",Xa="aggregations/update-view/DISMISS_VIEW_UPDATE_ERROR",Ja=e=>({type:Za,error:`${e}`}),Ya=()=>({type:Xa}),{track:Qa,debug:eu}=He("COMPASS-AGGREGATIONS-UI"),tu={appRegistry:In.INITIAL_STATE,allowWrites:!0,dataService:qo,fields:Wo,inputDocuments:Qo,namespace:"",env:sa,isTimeSeries:!1,serverVersion:"4.0.0",pipeline:pi,savedPipeline:Zi,restorePipeline:Sa,name:"",collation:null,collationString:"",isCollationExpanded:!1,isAtlasDeployed:!1,isReadonly:!1,isOverviewOn:!1,comments:!0,sample:!0,autoPreview:!0,id:"",isModified:!1,importPipeline:No,settings:Pa,limit:20,largeLimit:pa,maxTimeMS:6e4,isFullscreenOn:!1,savingPipeline:Va,projections:$a,outResultsFn:null,editViewName:null,sourceName:null,isNewPipelineConfirm:!1,updateViewError:null,aggregation:Ci,workspace:"builder"},nu="aggregations/CLEAR_PIPELINE",iu="aggregations/RESTORE_PIPELINE",ru="aggregations/NEW_PIPELINE",su="aggregations/CLONE_PIPELINE",ou="aggregations/NEW_FROM_PASTE",au="aggregations/MODIFY_VIEW",uu=V({appRegistry:Fn(),allowWrites:function(e=!0,t){return t.type===fa?t.allowWrites:e},comments:function(e=!0,t){return t.type===va?!e:e},sample:function(e=!0,t){return t.type===ya?!e:e},autoPreview:function(e=!0,t){return t.type===ba?!e:e},dataService:Uo,fields:function(e=Wo,t){return t.type===Ho?t.fields:e},inputDocuments:(e=Qo,t)=>t.type===Xo?{...e,isExpanded:!e.isExpanded}:t.type===Yo?{...e,isLoading:!0}:t.type===Jo?{...e,count:t.count,documents:t.documents,error:t.error,isLoading:!1}:e,namespace:function(e="",t){return t.type===na?t.namespace:e},env:function(e=sa,t){return t.type===ra?t.env:e},isTimeSeries:function(e=!1,t){return t.type===oa?t.isTimeSeries:e},serverVersion:function(e="4.0.0",t){return t.type===aa&&t.version||e},savedPipeline:function(e=Zi,t){const n=Xi[t.type];return n?n(e,t):e},restorePipeline:function(e=Sa,t){return t.type===wa?{...e,isModalVisible:!!t.index}:t.type===Ca?{...e,pipelineObjectID:t.objectID}:e},pipeline:function(e=[ci()],t){const n=di[t.type];return n?n(e,t):e},name:function(e="",t){return t.type===ua?t.name:e},collation:function(e=null,t){return t.type===ur?t.collation:e},collationString:function(e="",t){return t.type===cr?t.collationString:e},isCollationExpanded:function(e=!1,t){return t.type===ga?!e:e},id:function(e="",t){return t.type===$n?(new Pn.ObjectId).toHexString():e},isModified:function(e=!1,t){return t.type===Ni?t.isModified:e},isAtlasDeployed:function(e=!1,t){return t.type===ha?t.isAtlasDeployed:e},isReadonly:function(e=!1,t){return t.type===da?t.isReadonly:e},importPipeline:function(e=No,t){const n=Ro[t.type];return n?n(e,t):e},isOverviewOn:function(e=!1){return e},settings:function(e=Pa,t){return t.type===Aa?0==!e.isExpanded&&!0===e.isDirty?{...e,...Pa}:{...e,isExpanded:!e.isExpanded}:t.type===ka?{...e,isCommentMode:!e.isCommentMode,isDirty:!0}:t.type===Ta?{...e,sampleSize:t.value,isDirty:!0}:t.type===Oa?{...e,maxTimeMS:t.value,isDirty:!0}:t.type===Ia?{...e,limit:t.value,isDirty:!0}:(t.type,e)},limit:function(e=20,t){return t.type===la?t.limit:e},largeLimit:function(e=1e5,t){return t.type===ca?t.largeLimit:e},maxTimeMS:function(e=6e4,t){return t.type===ma?t.maxTimeMS:e},isFullscreenOn:function(e=!1,t){return t.type===Ra?!e:e},savingPipeline:function(e=Va,t){return t.type===Ma?{...e,name:t.name}:t.type===ja?{...e,isOpen:!0,isSaveAs:t.isSaveAs,name:t.name}:t.type===Ba?{...e,name:"",isOpen:!1}:e},projections:function(e=$a){return e},editViewName:function(e=null){return e},sourceName:function(e=null,t){return t.type===Ko?t.sourceName:e},outResultsFn:function(e=null,t){return t.type===qa?t.outResultsFn:e},isNewPipelineConfirm:function(e=!1,t){return t.type===Ha?t.isNewPipelineConfirm:e},updateViewError:function(e=null,t){return t.type===Za?t.error:t.type===Xa?null:e},aggregation:(e=Ci,t)=>t.type===wi.RunAggregation?{documents:t.documents}:e,workspace:(e="builder",t)=>{switch(t.type){case Si.ChangeWorkspace:return t.view;case wi.RunAggregation:return"results";default:return e}}}),lu={[na]:(e,t)=>{const n={...tu,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,isAtlasDeployed:e.isAtlasDeployed,outResultsFn:e.outResultsFn,allowWrites:e.allowWrites,serverVersion:e.serverVersion,dataService:e.dataService,appRegistry:e.appRegistry};return uu(n,t)},"aggregations/reset":()=>({...tu}),[iu]:(e,t)=>{const n=t.restoreState,i=null===n.comments||void 0===n.comments||n.comments,r=null===n.sample||void 0===n.sample||n.sample,s=null===n.autoPreview||void 0===n.autoPreview||n.autoPreview;return{...tu,appRegistry:e.appRegistry,namespace:n.namespace,env:n.env,isTimeSeries:n.isTimeSeries,isReadonly:n.isReadonly,sourceName:n.sourceName,pipeline:n.pipeline,name:n.name,collation:n.collation,collationString:n.collationString,isCollationExpanded:!!n.collationString,id:n.id,comments:i,limit:n.limit,largeLimit:n.largeLimit,maxTimeMS:n.maxTimeMS,projections:n.projections,sample:r,autoPreview:s,fields:e.fields,serverVersion:e.serverVersion,dataService:e.dataService,inputDocuments:e.inputDocuments,isAtlasDeployed:e.isAtlasDeployed,allowWrites:e.allowWrites,outResultsFn:e.outResultsFn,savedPipeline:{...e.savedPipeline,isListVisible:!1},restorePipeline:{isModalVisible:!1,pipelineObjectID:""}}},[nu]:e=>({...e,pipeline:[],limit:20,largeLimit:pa,maxTimeMS:6e4,isAtlasDeployed:e.isAtlasDeployed,allowWrites:e.allowWrites,outResultsFn:e.outResultsFn,savedPipeline:{...e.savedPipeline,isListVisible:!0}}),[ru]:e=>({...tu,appRegistry:e.appRegistry,namespace:e.namespace,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,fields:e.fields,serverVersion:e.serverVersion,dataService:e.dataService,isAtlasDeployed:e.isAtlasDeployed,allowWrites:e.allowWrites,outResultsFn:e.outResultsFn,inputDocuments:e.inputDocuments}),[su]:e=>({...e,id:(new Pn.ObjectId).toHexString(),name:`${e.name} (copy)`,isModified:!0}),[Po]:e=>{const t=Lo(e.importPipeline.text),n=t.length>0?t[0].syntaxError:null;return n||Qa("Aggregation Imported From Text",{num_stages:t.length}),{...e,name:"",collation:null,collationString:"",isCollationExpanded:!1,id:(new Pn.ObjectId).toHexString(),pipeline:n?[]:t,importPipeline:{isOpen:!!n,isConfirmationNeeded:!1,text:n?e.importPipeline.text:"",syntaxError:n}}},[Da]:e=>{const t={...e,isOverviewOn:!e.isOverviewOn};return t.pipeline&&t.pipeline.forEach((e=>{e.isExpanded=!t.isOverviewOn})),t.inputDocuments&&(t.inputDocuments.isExpanded=!t.isOverviewOn),t},[Fa]:e=>{const t={...e,limit:e.settings.sampleSize,largeLimit:e.settings.limit,comments:e.settings.isCommentMode,maxTimeMS:e.settings.maxTimeMS};return t.settings.isDirty=!1,t},[La]:e=>{const t={...e,name:e.savingPipeline.name};return t.savingPipeline.isOpen=!1,t},[Ua]:e=>{const t={...e,projections:[]};return t.pipeline.map(((e,n)=>{e.projections=Tn(e,null),e.projections.map((e=>{e.index=n,t.projections.push(e)}))})),t},[ou]:(e,t)=>{const n=Lo(t.text),i=n.length>0?n[0].syntaxError:null;return i||e.pipeline.length>1?e:{...e,name:"",collation:null,collationString:"",isCollationExpanded:!1,id:(new Pn.ObjectId).toHexString(),pipeline:n,importPipeline:{isOpen:!1,isConfirmationNeeded:!1,text:t.text,syntaxError:i}}},[au]:(e,t)=>{const n=t.pipeline.map((e=>Bo(Object.keys(e)[0],(0,Cn.toJSString)(Object.values(e)[0]," "),null)));return{...e,editViewName:t.name,isReadonly:t.isReadonly,sourceName:t.sourceName,collation:null,collationString:"",isCollationExpanded:!1,id:(new Pn.ObjectId).toHexString(),pipeline:n,importPipeline:{isOpen:!1,isConfirmationNeeded:!1,text:"",syntaxError:null}}}},cu=(e,t)=>{const n=lu[t.type];return n?n(e,t):uu(e,t)},pu=()=>({type:nu}),hu=e=>({type:iu,restoreState:e}),du=e=>async t=>{const n=Vi().join(Mi(),`${e}.json`);try{const e=await Bi().promises.readFile(n,"utf8"),i=JSON.parse(e);t(pu()),t(hu(i)),t((0,In.globalAppRegistryEmit)("compass:aggregations:pipeline-opened")),t(Ei(0))}catch(e){console.log(e)}},fu=()=>(e,t)=>{const n=t(),i={source:n.namespace,pipeline:n.pipeline.map((e=>e.executor||On(e))).filter((e=>!Vo()(e)))};eu("emitting","open-create-view",i),e((0,In.localAppRegistryEmit)("open-create-view",i))};function mu({onAction:e,title:t,glyph:n,menuItems:i,dataTestId:o}){const[a,u]=(0,r.useState)(!1),l=(0,r.useCallback)((t=>{t.stopPropagation(),u(!1),e(t.currentTarget.dataset.action)}),[e]);return s().createElement(de.Menu,{"data-testid":`${o}-content`,open:a,setOpen:u,justify:"start",trigger:({onClick:e,children:i})=>s().createElement(de.Button,{"data-testid":o,title:t,"aria-label":t,variant:"primary",size:"xsmall",leftGlyph:s().createElement(de.Icon,{glyph:n}),onClick:t=>{t.stopPropagation(),e()}},t,i)},i.map((e=>s().createElement(de.MenuItem,{key:e.title,"data-action":e.action,onClick:l,"aria-label":e.title},e.title))))}const gu=Q((({name:e,serverVersion:t})=>({pipelineName:e,isCreateViewAvailable:_t().gte(t,ot)})),{onSave:e=>""===e?za():tr(),onSaveAs:e=>""===e?za():za({name:e,isSaveAs:!0}),onCreateView:()=>fu()})((({pipelineName:e,isCreateViewAvailable:t,onSave:n,onSaveAs:i,onCreateView:r})=>s().createElement(mu,{dataTestId:"save-menu",title:"Save",glyph:"Save",onAction:t=>{switch(t){case"save":return n(e);case"saveAs":return i(e);case"createView":return r()}},menuItems:[{action:"save",title:"Save"},{action:"saveAs",title:"Save as"},t&&{action:"createView",title:"Create view"}].filter(Boolean)}))),vu=Q(null,(e=>({onCreatePipeline:()=>e(Wa(!0)),onCreatePipelineFromText:()=>e(Mo())})))((({onCreatePipeline:e,onCreatePipelineFromText:t})=>s().createElement(mu,{dataTestId:"create-new-menu",title:"Create new",glyph:"Plus",onAction:n=>{switch(n){case"createPipleine":return e();case"createPipleineFromText":return t()}},menuItems:[{action:"createPipleine",title:"Pipeline"},{action:"createPipleineFromText",title:"Pipeline from text"}]})));function yu(){return yu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},yu.apply(this,arguments)}const bu=(0,de.css)({display:"flex",alignItems:"center"}),xu=(0,de.css)({maxWidth:"100px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),Eu=(0,de.css)({fontStyle:"italic"}),wu=Q((({name:e,isModified:t})=>({name:e,isModified:t})))((({name:e,isModified:t})=>s().createElement(de.Body,{className:bu,"data-testid":"pipeline-name"},""===e?"Untitled":s().createElement(de.Tooltip,{trigger:({children:t,...n})=>s().createElement("span",yu({},n,{className:xu}),t,e)},s().createElement(de.Body,null,e)),t&&s().createElement("span",{className:Eu}," - modified")))),Cu=(0,de.css)({display:"flex",gap:de.spacing[2],justifyItems:"center"}),Su=(0,de.css)({display:"flex",alignItems:"center",gap:de.spacing[1]}),Du=(0,de.css)({marginBottom:0,padding:0,textTransform:"uppercase",margin:"inherit !important"}),_u=Q((({autoPreview:e})=>({isAutoPreview:e})),{onToggleAutoPreview:xa,onToggleSettings:Na})((({isAutoPreview:e,onToggleAutoPreview:t,onToggleSettings:n})=>s().createElement("div",{className:Cu,"data-testid":"pipeline-toolbar-extra-settings"},s().createElement("div",{className:Su},s().createElement(de.Toggle,{id:"auto-preview",size:"small","aria-label":"Toggle Auto Preview",onChange:()=>t(),"data-testid":"pipeline-toolbar-preview-toggle",checked:e}),s().createElement(de.Label,{className:Du,htmlFor:"auto-preview"},"Auto Preview")),s().createElement(de.IconButton,{"aria-label":"More Settings",onClick:()=>n(),"data-testid":"pipeline-toolbar-settings-button"},s().createElement(de.Icon,{glyph:"Settings"}))))),Au=(0,de.css)({display:"grid",gap:de.spacing[2],gridTemplateAreas:'"settings extraSettings"',alignItems:"center"}),ku=(0,de.css)({display:"flex",gap:de.spacing[2],alignItems:"center"}),Tu=(0,de.css)({gridArea:"extraSettings",justifySelf:"end",display:"flex"}),Ou=Q(null,{onExportToLanguage:vr})((({onExportToLanguage:e})=>s().createElement("div",{className:Au,"data-testid":"pipeline-settings"},s().createElement("div",{className:ku},s().createElement(wu,null),s().createElement(gu,null),s().createElement(vu,null),s().createElement(de.Button,{variant:"primaryOutline",size:"xsmall",leftGlyph:s().createElement(de.Icon,{glyph:"Export"}),onClick:()=>e(),"data-testid":"pipeline-toolbar-export-button"},"Export to language")),s().createElement("div",{className:Tu},s().createElement(_u,null))))),Iu=(0,de.css)({paddingTop:de.spacing[3],paddingRight:de.spacing[5],paddingBottom:de.spacing[3],paddingLeft:de.spacing[3]}),Fu=(0,de.css)({display:"grid",gap:de.spacing[4],gridTemplateAreas:'\n "headerAndOptionsRow"\n "settingsRow"\n ',marginLeft:de.spacing[1],marginRight:de.spacing[1]}),Pu=(0,de.css)({gridArea:"headerAndOptionsRow",border:"1px solid",borderRadius:"6px",borderColor:de.uiColors.gray.light2,padding:de.spacing[2]}),Nu=(0,de.css)({gridArea:"settingsRow"}),Ru=Q((({workspace:e})=>({isSettingsVisible:"builder"===e})))((({isSettingsVisible:e})=>{const[t,n]=(0,r.useState)(!1);return s().createElement("div",{className:(0,de.cx)(Iu,Fu),"data-testid":"pipeline-toolbar"},s().createElement("div",{className:Pu},s().createElement(ar,{isOptionsVisible:t,onToggleOptions:()=>n(!t)}),t&&s().createElement(gr,null)),e&&s().createElement("div",{className:Nu},s().createElement(Ou,null)))}));var Mu,Lu=(Mu=function(e,t){return Mu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Mu(e,t)},function(e,t){function n(){this.constructor=e}Mu(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Bu=function(){return Bu=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Bu.apply(this,arguments)},ju={top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},Vu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return Lu(t,e),t.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:Bu(Bu({position:"absolute",userSelect:"none"},ju[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(r.PureComponent),zu=n(6238),qu=n.n(zu),Uu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$u=function(){return $u=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},$u.apply(this,arguments)},Hu={width:"auto",height:"auto"},Wu=qu()((function(e,t,n){return Math.max(Math.min(e,n),t)})),Ku=qu()((function(e,t){return Math.round(e/t)*t})),Gu=qu()((function(e,t){return new RegExp(e,"i").test(t)})),Zu=function(e){return Boolean(e.touches&&e.touches.length)},Xu=qu()((function(e,t,n){void 0===n&&(n=0);var i=t.reduce((function(n,i,r){return Math.abs(i-e)<Math.abs(t[n]-e)?r:n}),0),r=Math.abs(t[i]-e);return 0===n||r<n?t[i]:e})),Ju=qu()((function(e,t){return e.substr(e.length-t.length,t.length)===t})),Yu=qu()((function(e){return"auto"===(e=e.toString())||Ju(e,"px")||Ju(e,"%")||Ju(e,"vh")||Ju(e,"vw")||Ju(e,"vmax")||Ju(e,"vmin")?e:e+"px"})),Qu=function(e,t,n,i){if(e&&"string"==typeof e){if(Ju(e,"px"))return Number(e.replace("px",""));if(Ju(e,"%"))return t*(Number(e.replace("%",""))/100);if(Ju(e,"vw"))return n*(Number(e.replace("vw",""))/100);if(Ju(e,"vh"))return i*(Number(e.replace("vh",""))/100)}return e},el=qu()((function(e,t,n,i,r,s,o){return i=Qu(i,e.width,t,n),r=Qu(r,e.height,t,n),s=Qu(s,e.width,t,n),o=Qu(o,e.height,t,n),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===r?void 0:Number(r),minWidth:void 0===s?void 0:Number(s),minHeight:void 0===o?void 0:Number(o)}})),tl=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],nl="__resizable_base__",il=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0",t.classList?t.classList.add(nl):t.className+=nl,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Uu(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Hu},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,i=this.resizable.offsetHeight,r=this.resizable.style.position;"relative"!==r&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=r}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&Ju(e.propsSize[t].toString(),"%")){if(Ju(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return Yu(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?Yu(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?Yu(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,i,r=this.props.boundsByDirection,s=this.state.direction,o=r&&Gu("left",s),a=r&&Gu("top",s);if("parent"===this.props.bounds){var u=this.parentNode;u&&(n=o?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,i=this.props.resizeRatio||1,r=this.state,s=r.direction,o=r.original,a=this.props,u=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,p=o.width,h=o.height,d=l||0,f=c||0;return Gu("right",s)&&(p=o.width+(e-o.x)*i/n,u&&(h=(p-f)/this.ratio+d)),Gu("left",s)&&(p=o.width-(e-o.x)*i/n,u&&(h=(p-f)/this.ratio+d)),Gu("bottom",s)&&(h=o.height+(t-o.y)*i/n,u&&(p=(h-d)*this.ratio+f)),Gu("top",s)&&(h=o.height-(t-o.y)*i/n,u&&(p=(h-d)*this.ratio+f)),{newWidth:p,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,i){var r=this.props,s=r.lockAspectRatio,o=r.lockAspectRatioExtraHeight,a=r.lockAspectRatioExtraWidth,u=void 0===i.width?10:i.width,l=void 0===n.width||n.width<0?e:n.width,c=void 0===i.height?10:i.height,p=void 0===n.height||n.height<0?t:n.height,h=o||0,d=a||0;if(s){var f=(c-h)*this.ratio+d,m=(p-h)*this.ratio+d,g=(u-d)/this.ratio+h,v=(l-d)/this.ratio+h,y=Math.max(u,f),b=Math.min(l,m),x=Math.max(c,g),E=Math.min(p,v);e=Wu(e,y,b),t=Wu(t,x,E)}else e=Wu(e,u,l),t=Wu(t,c,p);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),r=i.left,s=i.top,o=i.right,a=i.bottom;this.resizableLeft=r,this.resizableRight=o,this.resizableTop=s,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,i=0,r=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)){if(i=e.nativeEvent.clientX,r=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent&&Zu(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY);if(this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var s=this.window.getComputedStyle(this.resizable);if("auto"!==s.flexBasis){var o=this.parentNode;if(o){var a=this.window.getComputedStyle(o).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=s.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:i,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:$u($u({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(u)}},t.prototype.onMouseMove=function(e){if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&Zu(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var t=this.props,n=t.maxWidth,i=t.maxHeight,r=t.minWidth,s=t.minHeight,o=Zu(e)?e.touches[0].clientX:e.clientX,a=Zu(e)?e.touches[0].clientY:e.clientY,u=this.state,l=u.direction,c=u.original,p=u.width,h=u.height,d=this.getParentSize(),f=el(d,this.window.innerWidth,this.window.innerHeight,n,i,r,s);n=f.maxWidth,i=f.maxHeight,r=f.minWidth,s=f.minHeight;var m=this.calculateNewSizeFromDirection(o,a),g=m.newHeight,v=m.newWidth,y=this.calculateNewMaxFromBoundary(n,i),b=this.calculateNewSizeFromAspectRatio(v,g,{width:y.maxWidth,height:y.maxHeight},{width:r,height:s});if(v=b.newWidth,g=b.newHeight,this.props.grid){var x=Ku(v,this.props.grid[0]),E=Ku(g,this.props.grid[1]),w=this.props.snapGap||0;v=0===w||Math.abs(x-v)<=w?x:v,g=0===w||Math.abs(E-g)<=w?E:g}this.props.snap&&this.props.snap.x&&(v=Xu(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=Xu(g,this.props.snap.y,this.props.snapGap));var C={width:v-c.width,height:g-c.height};p&&"string"==typeof p&&(Ju(p,"%")?v=v/d.width*100+"%":Ju(p,"vw")?v=v/this.window.innerWidth*100+"vw":Ju(p,"vh")&&(v=v/this.window.innerHeight*100+"vh")),h&&"string"==typeof h&&(Ju(h,"%")?g=g/d.height*100+"%":Ju(h,"vw")?g=g/this.window.innerWidth*100+"vw":Ju(h,"vh")&&(g=g/this.window.innerHeight*100+"vh"));var S={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?S.flexBasis=S.width:"column"===this.flexDir&&(S.flexBasis=S.height),this.setState(S),this.props.onResize&&this.props.onResize(e,l,this.resizable,C)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,i=t.direction,r=t.original;if(n&&this.resizable){var s={width:this.size.width-r.width,height:this.size.height-r.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:$u($u({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,i=t.handleStyles,s=t.handleClasses,o=t.handleWrapperStyle,a=t.handleWrapperClass,u=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?r.createElement(Vu,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:s&&s[t]},u&&u[t]?u[t]:null):null}));return r.createElement("div",{className:a,style:o},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==tl.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=$u($u($u({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r.createElement(i,$u({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(r.PureComponent),rl=n(6667),sl={};sl.styleTagTransform=_e(),sl.setAttributes=we(),sl.insert=xe().bind(null,"head"),sl.domAPI=ye(),sl.insertStyleElement=Se(),ge()(rl.Z,sl);const ol=rl.Z&&rl.Z.locals?rl.Z.locals:void 0;class al extends r.PureComponent{render(){return s().createElement("div",{className:ol["resize-handle"]})}}var ul=n(9262),ll={};ll.styleTagTransform=_e(),ll.setAttributes=we(),ll.insert=xe().bind(null,"head"),ll.domAPI=ye(),ll.insertStyleElement=Se(),ge()(ul.Z,ll);const cl=ul.Z&&ul.Z.locals?ul.Z.locals:void 0;class pl extends r.PureComponent{static displayName="DeleteStageComponent";static propTypes={index:a().number.isRequired,runStage:a().func.isRequired,stageDeleted:a().func.isRequired,setIsModified:a().func.isRequired};onStageDeleted=()=>{this.props.stageDeleted(this.props.index),this.props.setIsModified(!0),this.props.runStage(this.props.index)};render(){return s().createElement("div",{className:he()(cl["delete-stage"])},s().createElement("button",{"data-test-id":"delete-stage",type:"button",title:"Delete Stage",className:"btn btn-default btn-xs",onClick:this.onStageDeleted},s().createElement("i",{className:"fa fa-trash-o","aria-hidden":!0})))}}const hl=pl;var dl=n(2884),fl={};fl.styleTagTransform=_e(),fl.setAttributes=we(),fl.insert=xe().bind(null,"head"),fl.domAPI=ye(),fl.insertStyleElement=Se(),ge()(dl.Z,fl);const ml=dl.Z&&dl.Z.locals?dl.Z.locals:void 0;class gl extends r.PureComponent{static displayName="AddAfterStageComponent";static propTypes={index:a().number.isRequired,stageAddedAfter:a().func.isRequired};onStageAddedAfter=()=>{this.props.stageAddedAfter(this.props.index)};render(){return s().createElement("div",{className:he()(ml["add-after-stage"]),"data-tip":"Add stage below","data-place":"top","data-for":"add-after-stage"},s().createElement("button",{"data-test-id":"add-after-stage",type:"button",title:"Add After Stage",className:"btn btn-default btn-xs",onClick:this.onStageAddedAfter},"+"),s().createElement(dt.Tooltip,{id:"add-after-stage"}))}}const vl=gl;var yl=n(2347),bl={};bl.styleTagTransform=_e(),bl.setAttributes=we(),bl.insert=xe().bind(null,"head"),bl.domAPI=ye(),bl.insertStyleElement=Se(),ge()(yl.Z,bl);const xl=yl.Z&&yl.Z.locals?yl.Z.locals:void 0;class El extends r.PureComponent{static displayName="ToggleStageComponent";static propTypes={isEnabled:a().bool.isRequired,index:a().number.isRequired,runStage:a().func.isRequired,stageToggled:a().func.isRequired,setIsModified:a().func.isRequired};onStageToggled=()=>{this.props.stageToggled(this.props.index),this.props.setIsModified(!0),this.props.runStage(this.props.index)};render(){const e=this.props.isEnabled?"Exclude stage from pipeline":"Include stage in pipeline";return s().createElement("div",{className:xl["toggle-stage"],"data-for":"toggle-stage","data-tip":e,"data-place":"top"},s().createElement(de.Toggle,{id:"toggle-stage-button",checked:this.props.isEnabled,onChange:this.onStageToggled,className:xl["toggle-stage-button"],"aria-label":e,size:"small"}),s().createElement(dt.Tooltip,{id:"toggle-stage"}))}}const wl=El;var Cl=n(5884),Sl={};Sl.styleTagTransform=_e(),Sl.setAttributes=we(),Sl.insert=xe().bind(null,"head"),Sl.domAPI=ye(),Sl.insertStyleElement=Se(),ge()(Cl.Z,Sl);const Dl=Cl.Z&&Cl.Z.locals?Cl.Z.locals:void 0;class _l extends r.PureComponent{static displayName="StageGrabberComponent";render(){return s().createElement("div",{className:Dl["stage-grabber"]},s().createElement("i",{className:"fa fa-bars fa-rotate-90","aria-hidden":!0}))}}const Al=_l;var kl=n(1103),Tl={};Tl.styleTagTransform=_e(),Tl.setAttributes=we(),Tl.insert=xe().bind(null,"head"),Tl.domAPI=ye(),Tl.insertStyleElement=Se(),ge()(kl.Z,Tl);const Ol=kl.Z&&kl.Z.locals?kl.Z.locals:void 0;class Il extends r.PureComponent{static displayName="StageCollapserComponent";static propTypes={isExpanded:a().bool.isRequired,index:a().number.isRequired,stageCollapseToggled:a().func.isRequired,setIsModified:a().func.isRequired};onStageCollapseToggled=()=>{this.props.stageCollapseToggled(this.props.index),this.props.setIsModified(!0)};render(){const e=this.props.isExpanded?"fa fa-angle-down":"fa fa-angle-right",t=this.props.isExpanded?"Collapse":"Expand";return s().createElement("div",{className:he()(Ol["stage-collapser"])},s().createElement("button",{type:"button",title:t,onClick:this.onStageCollapseToggled,className:"btn btn-default btn-xs"},s().createElement("i",{className:e,"aria-hidden":!0})))}}const Fl=Il;var Pl=n(8726);const Nl=require("react-dom");var Rl=function(e){var t=e.onMouseDown;return s().createElement("span",{className:"Select-arrow",onMouseDown:t})};Rl.propTypes={onMouseDown:a().func};var Ml=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],Ll=function(e){for(var t=0;t<Ml.length;t++)e=e.replace(Ml[t].letters,Ml[t].base);return e},Bl=function(e){return null!=e&&""!==e},jl=function(e,t,n,i){return i.ignoreAccents&&(t=Ll(t)),i.ignoreCase&&(t=t.toLowerCase()),i.trimFilter&&(t=t.replace(/^\s+|\s+$/g,"")),n&&(n=n.map((function(e){return e[i.valueKey]}))),e.filter((function(e){if(n&&n.indexOf(e[i.valueKey])>-1)return!1;if(i.filterOption)return i.filterOption.call(void 0,e,t);if(!t)return!0;var r=e[i.valueKey],s=e[i.labelKey],o=Bl(r),a=Bl(s);if(!o&&!a)return!1;var u=o?String(r):null,l=a?String(s):null;return i.ignoreAccents&&(u&&"label"!==i.matchProp&&(u=Ll(u)),l&&"value"!==i.matchProp&&(l=Ll(l))),i.ignoreCase&&(u&&"label"!==i.matchProp&&(u=u.toLowerCase()),l&&"value"!==i.matchProp&&(l=l.toLowerCase())),"start"===i.matchPos?u&&"label"!==i.matchProp&&u.substr(0,t.length)===t||l&&"value"!==i.matchProp&&l.substr(0,t.length)===t:u&&"label"!==i.matchProp&&u.indexOf(t)>=0||l&&"value"!==i.matchProp&&l.indexOf(t)>=0}))},Vl=function(e){var t=e.focusedOption,n=e.focusOption,i=e.inputValue,r=e.instancePrefix,o=e.onFocus,a=e.onOptionRef,u=e.onSelect,l=e.optionClassName,c=e.optionComponent,p=e.optionGroupComponent,h=e.optionRenderer,d=e.options,f=e.removeValue,m=e.selectValue,g=e.valueArray,v=e.valueKey,y=p,b=c,x=h;return function e(c){return c.map((function(c,p){if(function(e){return e&&Array.isArray(e.options)}(c)){var h=he()({"Select-option-group":!0});return s().createElement(y,{className:h,key:"option-group-"+p,label:x(c),option:c,optionIndex:p},e(c.options))}var d=g&&g.indexOf(c)>-1,E=c===t,w=he()(l,{"Select-option":!0,"is-selected":d,"is-focused":E,"is-disabled":c.disabled});return s().createElement(b,{className:w,focusOption:n,inputValue:i,instancePrefix:r,isDisabled:c.disabled,isFocused:E,isSelected:d,key:"option-"+p+"-"+c[v],onFocus:o,onSelect:u,option:c,optionIndex:p,ref:function(e){a(e,E)},removeValue:f,selectValue:m},x(c,p))}))}(d)};Vl.propTypes={focusOption:a().func,focusedOption:a().object,inputValue:a().string,instancePrefix:a().string,onFocus:a().func,onOptionRef:a().func,onSelect:a().func,optionClassName:a().string,optionComponent:a().func,optionRenderer:a().func,options:a().array,removeValue:a().func,selectValue:a().func,valueArray:a().array,valueKey:a().string};var zl="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},ql=(function(){function e(e){this.value=e}function t(t){var n,i;function r(n,i){try{var o=t[n](i),a=o.value;a instanceof e?Promise.resolve(a.value).then((function(e){r("next",e)}),(function(e){r("throw",e)})):s(o.done?"return":"normal",o.value)}catch(e){s("throw",e)}}function s(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?r(n.key,n.arg):i=null}this._invoke=function(e,t){return new Promise((function(s,o){var a={key:e,arg:t,resolve:s,reject:o,next:null};i?i=i.next=a:(n=i=a,r(e,t))}))},"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),Ul=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),$l=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Hl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Wl=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Kl=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},Gl=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Zl=function(e){function t(){return ql(this,t),Gl(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Wl(t,e),Ul(t,[{key:"render",value:function(){return this.props.children}}]),t}(s().Component);Zl.propTypes={children:a().node};var Xl=function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)},Jl=function(e){function t(e){ql(this,t);var n=Gl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleMouseEnter=n.handleMouseEnter.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.onFocus=n.onFocus.bind(n),n}return Wl(t,e),Ul(t,[{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)}},{key:"handleMouseEnter",value:function(e){this.onFocus(e)}},{key:"handleMouseMove",value:function(e){this.onFocus(e)}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"onFocus",value:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)}},{key:"render",value:function(){var e=this.props,t=e.option,n=e.instancePrefix,i=e.optionIndex,r=he()(this.props.className,t.className);return t.disabled?s().createElement("div",{className:r,onMouseDown:Xl,onClick:Xl},this.props.children):s().createElement("div",{className:r,style:t.style,role:"option","aria-label":t.label,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,id:n+"-option-"+i,title:t.title},this.props.children)}}]),t}(s().Component);Jl.propTypes={children:a().node,className:a().string,instancePrefix:a().string.isRequired,isDisabled:a().bool,isFocused:a().bool,isSelected:a().bool,onFocus:a().func,onSelect:a().func,onUnfocus:a().func,option:a().object.isRequired,optionIndex:a().number};var Yl=function(e){function t(e){ql(this,t);var n=Gl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return Wl(t,e),Ul(t,[{key:"blockEvent",value:function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)}},{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation()}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(e){this.dragging=!0}},{key:"handleTouchStart",value:function(e){this.dragging=!1}},{key:"render",value:function(){var e=this.props.option,t=he()(this.props.className,e.className);return e.disabled?s().createElement("div",{className:t,onMouseDown:this.blockEvent,onClick:this.blockEvent},this.props.children):s().createElement("div",{className:t,style:e.style,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,title:e.title},s().createElement("div",{className:"Select-option-group-label"},this.props.label),this.props.children)}}]),t}(s().Component);Yl.propTypes={children:a().any,className:a().string,label:a().node,option:a().object.isRequired};var Ql=function(e){function t(e){ql(this,t);var n=Gl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.onRemove=n.onRemove.bind(n),n.handleTouchEndRemove=n.handleTouchEndRemove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return Wl(t,e),Ul(t,[{key:"handleMouseDown",value:function(e){if("mousedown"!==e.type||0===e.button)return this.props.onClick?(e.stopPropagation(),void this.props.onClick(this.props.value,e)):void(this.props.value.href&&e.stopPropagation())}},{key:"onRemove",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.value)}},{key:"handleTouchEndRemove",value:function(e){this.dragging||this.onRemove(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"renderRemoveIcon",value:function(){if(!this.props.disabled&&this.props.onRemove)return s().createElement("span",{className:"Select-value-icon","aria-hidden":"true",onMouseDown:this.onRemove,onTouchEnd:this.handleTouchEndRemove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},"×")}},{key:"renderLabel",value:function(){var e="Select-value-label";return this.props.onClick||this.props.value.href?s().createElement("a",{className:e,href:this.props.value.href,target:this.props.value.target,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},this.props.children):s().createElement("span",{className:e,role:"option","aria-selected":"true",id:this.props.id},this.props.children)}},{key:"render",value:function(){return s().createElement("div",{className:he()("Select-value",this.props.value.className),style:this.props.value.style,title:this.props.value.title},this.renderRemoveIcon(),this.renderLabel())}}]),t}(s().Component);function ec(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}Ql.propTypes={children:a().node,disabled:a().bool,id:a().string,onClick:a().func,onRemove:a().func,value:a().object.isRequired};var tc=function(e){return"string"==typeof e?e:null!==e&&JSON.stringify(e)||""},nc=a().oneOfType([a().string,a().node]),ic=(a().oneOfType([a().string,a().number]),1),rc=function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},sc=function(e){function t(e){ql(this,t);var n=Gl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["clearValue","focusOption","getOptionLabel","handleInputBlur","handleInputChange","handleInputFocus","handleInputValueChange","handleKeyDown","handleMenuScroll","handleMouseDown","handleMouseDownOnArrow","handleMouseDownOnMenu","handleTouchEnd","handleTouchEndClearValue","handleTouchMove","handleTouchOutside","handleTouchStart","handleValueClick","onOptionRef","removeValue","selectValue"].forEach((function(e){return n[e]=n[e].bind(n)})),n.state={inputValue:"",isFocused:!1,isOpen:!1,isPseudoFocused:!1,required:!1},n}return Wl(t,e),Ul(t,[{key:"componentWillMount",value:function(){this._flatOptions=this.flattenOptions(this.props.options),this._instancePrefix="react-select-"+(this.props.instanceId||++ic)+"-";var e=this.getValueArray(this.props.value);this.props.required&&this.setState({required:rc(e[0],this.props.multi)})}},{key:"componentDidMount",value:function(){void 0!==this.props.autofocus&&"undefined"!=typeof console&&console.warn("Warning: The autofocus prop has changed to autoFocus, support will be removed after react-select@1.0"),(this.props.autoFocus||this.props.autofocus)&&this.focus()}},{key:"componentWillReceiveProps",value:function(e){e.options!==this.props.options&&(this._flatOptions=this.flattenOptions(e.options));var t=this.getValueArray(e.value,e);!e.isOpen&&this.props.isOpen?this.closeMenu():e.isOpen&&!this.props.isOpen&&this.setState({isOpen:!0}),e.required?this.setState({required:rc(t[0],e.multi)}):this.props.required&&this.setState({required:!1}),this.state.inputValue&&this.props.value!==e.value&&e.onSelectResetsInput&&this.setState({inputValue:this.handleInputValueChange("")})}},{key:"componentDidUpdate",value:function(e,t){if(this.menu&&this.focused&&this.state.isOpen&&!this.hasScrolledToOption){var n=(0,Nl.findDOMNode)(this.focused),i=(0,Nl.findDOMNode)(this.menu),r=i.scrollTop,s=r+i.offsetHeight,o=n.offsetTop,a=o+n.offsetHeight;(r>o||s<a)&&(i.scrollTop=n.offsetTop),this.hasScrolledToOption=!0}else this.state.isOpen||(this.hasScrolledToOption=!1);if(this._scrollToFocusedOptionOnUpdate&&this.focused&&this.menu){this._scrollToFocusedOptionOnUpdate=!1;var u=(0,Nl.findDOMNode)(this.focused),l=(0,Nl.findDOMNode)(this.menu),c=u.getBoundingClientRect(),p=l.getBoundingClientRect();c.bottom>p.bottom?l.scrollTop=u.offsetTop+u.clientHeight-l.offsetHeight:c.top<p.top&&(l.scrollTop=u.offsetTop)}if(this.props.scrollMenuIntoView&&this.menuContainer){var h=this.menuContainer.getBoundingClientRect();window.innerHeight<h.bottom+this.props.menuBuffer&&window.scrollBy(0,h.bottom+this.props.menuBuffer-window.innerHeight)}if(e.disabled!==this.props.disabled&&(this.setState({isFocused:!1}),this.closeMenu()),t.isOpen!==this.state.isOpen){this.toggleTouchOutsideEvent(this.state.isOpen);var d=this.state.isOpen?this.props.onOpen:this.props.onClose;d&&d()}}},{key:"componentWillUnmount",value:function(){this.toggleTouchOutsideEvent(!1)}},{key:"toggleTouchOutsideEvent",value:function(e){e?!document.addEventListener&&document.attachEvent?document.attachEvent("ontouchstart",this.handleTouchOutside):document.addEventListener("touchstart",this.handleTouchOutside):!document.removeEventListener&&document.detachEvent?document.detachEvent("ontouchstart",this.handleTouchOutside):document.removeEventListener("touchstart",this.handleTouchOutside)}},{key:"handleTouchOutside",value:function(e){this.wrapper&&!this.wrapper.contains(e.target)&&this.closeMenu()}},{key:"focus",value:function(){this.input&&this.input.focus()}},{key:"blurInput",value:function(){this.input&&this.input.blur()}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchEndClearValue",value:function(e){this.dragging||this.clearValue(e)}},{key:"handleMouseDown",value:function(e){if(!(this.props.disabled||"mousedown"===e.type&&0!==e.button))if("INPUT"!==e.target.tagName){if(e.preventDefault(),!this.props.searchable)return this.focus(),this.setState({isOpen:!this.state.isOpen});if(this.state.isFocused){this.focus();var t=this.input,n=!0;"function"==typeof t.getInput&&(t=t.getInput()),t.value="",this._focusAfterClear&&(n=!1,this._focusAfterClear=!1),this.setState({isOpen:n,isPseudoFocused:!1,focusedOption:null})}else this._openAfterFocus=this.props.openOnClick,this.focus(),this.setState({focusedOption:null})}else this.state.isFocused?this.state.isOpen||this.setState({isOpen:!0,isPseudoFocused:!1}):(this._openAfterFocus=this.props.openOnClick,this.focus())}},{key:"handleMouseDownOnArrow",value:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(this.state.isOpen?(e.stopPropagation(),e.preventDefault(),this.closeMenu()):this.setState({isOpen:!0}))}},{key:"handleMouseDownOnMenu",value:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this._openAfterFocus=!0,this.focus())}},{key:"closeMenu",value:function(){this.props.onCloseResetsInput?this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}):this.setState({isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}),this.hasScrolledToOption=!1}},{key:"handleInputFocus",value:function(e){if(!this.props.disabled){var t=this.state.isOpen||this._openAfterFocus||this.props.openOnFocus;t=!this._focusAfterClear&&t,this.props.onFocus&&this.props.onFocus(e),this.setState({isFocused:!0,isOpen:!!t}),this._focusAfterClear=!1,this._openAfterFocus=!1}}},{key:"handleInputBlur",value:function(e){if(!this.menu||this.menu!==document.activeElement&&!this.menu.contains(document.activeElement)){this.props.onBlur&&this.props.onBlur(e);var t={isFocused:!1,isOpen:!1,isPseudoFocused:!1};this.props.onBlurResetsInput&&(t.inputValue=this.handleInputValueChange("")),this.setState(t)}else this.focus()}},{key:"handleInputChange",value:function(e){var t=e.target.value;this.state.inputValue!==e.target.value&&(t=this.handleInputValueChange(t)),this.setState({inputValue:t,isOpen:!0,isPseudoFocused:!1})}},{key:"setInputValue",value:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&"object"!==(void 0===t?"undefined":zl(t))&&(e=""+t)}this.setState({inputValue:e})}},{key:"handleInputValueChange",value:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&"object"!==(void 0===t?"undefined":zl(t))&&(e=""+t)}return e}},{key:"handleKeyDown",value:function(e){if(!(this.props.disabled||"function"==typeof this.props.onInputKeyDown&&(this.props.onInputKeyDown(e),e.defaultPrevented)))switch(e.keyCode){case 8:!this.state.inputValue&&this.props.backspaceRemoves&&(e.preventDefault(),this.popValue());break;case 9:if(e.shiftKey||!this.state.isOpen||!this.props.tabSelectsValue)break;e.preventDefault(),this.selectFocusedOption();break;case 13:e.preventDefault(),e.stopPropagation(),this.state.isOpen?this.selectFocusedOption():this.focusNextOption();break;case 27:e.preventDefault(),this.state.isOpen?(this.closeMenu(),e.stopPropagation()):this.props.clearable&&this.props.escapeClearsValue&&(this.clearValue(e),e.stopPropagation());break;case 32:if(this.props.searchable)break;if(e.preventDefault(),!this.state.isOpen){this.focusNextOption();break}e.stopPropagation(),this.selectFocusedOption();break;case 38:e.preventDefault(),this.focusPreviousOption();break;case 40:e.preventDefault(),this.focusNextOption();break;case 33:e.preventDefault(),this.focusPageUpOption();break;case 34:e.preventDefault(),this.focusPageDownOption();break;case 35:if(e.shiftKey)break;e.preventDefault(),this.focusEndOption();break;case 36:if(e.shiftKey)break;e.preventDefault(),this.focusStartOption();break;case 46:e.preventDefault(),!this.state.inputValue&&this.props.deleteRemoves&&this.popValue()}}},{key:"handleValueClick",value:function(e,t){this.props.onValueClick&&this.props.onValueClick(e,t)}},{key:"handleMenuScroll",value:function(e){if(this.props.onMenuScrollToBottom){var t=e.target;t.scrollHeight>t.offsetHeight&&t.scrollHeight-t.offsetHeight-t.scrollTop<=0&&this.props.onMenuScrollToBottom()}}},{key:"getOptionLabel",value:function(e){return e[this.props.labelKey]}},{key:"getValueArray",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i="object"===(void 0===n?"undefined":zl(n))?n:this.props;if(i.multi){if("string"==typeof e&&(e=e.split(i.delimiter)),!Array.isArray(e)){if(null==e)return[];e=[e]}return e.map((function(e){return t.expandValue(e,i)})).filter((function(e){return e}))}var r=this.expandValue(e,i);return r?[r]:[]}},{key:"expandValue",value:function(e,t){var n=void 0===e?"undefined":zl(e);if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var i=t.labelKey,r=t.renderInvalidValues,s=t.valueKey,o=this._flatOptions;if(o){for(var a=0;a<o.length;a++)if(String(o[a][s])===String(e))return o[a];var u;if(r)return this._invalidOptions=this._invalidOptions||{},this._invalidOptions[e]=this._invalidOptions[e]||($l(u={invalid:!0},i,e),$l(u,s,e),u),this._invalidOptions[e]}}},{key:"setValue",value:function(e){var t=this;if(this.props.autoBlur&&this.blurInput(),this.props.required){var n=rc(e,this.props.multi);this.setState({required:n})}this.props.simpleValue&&e&&(e=this.props.multi?e.map((function(e){return e[t.props.valueKey]})).join(this.props.delimiter):e[this.props.valueKey]),this.props.onChange&&this.props.onChange(e)}},{key:"selectValue",value:function(e){var t=this;this.props.closeOnSelect&&(this.hasScrolledToOption=!1);var n=this.props.onSelectResetsInput?"":this.state.inputValue;this.props.multi?this.setState({focusedIndex:null,inputValue:this.handleInputValueChange(n),isOpen:!this.props.closeOnSelect},(function(){t.getValueArray(t.props.value).some((function(n){return n[t.props.valueKey]===e[t.props.valueKey]}))?t.removeValue(e):t.addValue(e)})):this.setState({inputValue:this.handleInputValueChange(n),isOpen:!this.props.closeOnSelect,isPseudoFocused:this.state.isFocused},(function(){t.setValue(e)}))}},{key:"addValue",value:function(e){var t=this.getValueArray(this.props.value),n=this._visibleOptions.filter((function(e){return!e.disabled})),i=n.indexOf(e);this.setValue(t.concat(e)),n.length-1===i?this.focusOption(n[i-1]):n.length>i&&this.focusOption(n[i+1])}},{key:"popValue",value:function(){var e=this.getValueArray(this.props.value);e.length&&!1!==e[e.length-1].clearableValue&&this.setValue(this.props.multi?e.slice(0,e.length-1):null)}},{key:"removeValue",value:function(e){var t=this,n=this.getValueArray(this.props.value);this.setValue(n.filter((function(n){return n[t.props.valueKey]!==e[t.props.valueKey]}))),this.focus()}},{key:"clearValue",value:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.preventDefault(),this.setValue(this.getResetValue()),this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1},this.focus),this._focusAfterClear=!0)}},{key:"getResetValue",value:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null}},{key:"focusOption",value:function(e){this.setState({focusedOption:e})}},{key:"focusNextOption",value:function(){this.focusAdjacentOption("next")}},{key:"focusPreviousOption",value:function(){this.focusAdjacentOption("previous")}},{key:"focusPageUpOption",value:function(){this.focusAdjacentOption("page_up")}},{key:"focusPageDownOption",value:function(){this.focusAdjacentOption("page_down")}},{key:"focusStartOption",value:function(){this.focusAdjacentOption("start")}},{key:"focusEndOption",value:function(){this.focusAdjacentOption("end")}},{key:"focusAdjacentOption",value:function(e){var t=this._visibleOptions.map((function(e,t){return{option:e,index:t}})).filter((function(e){return!e.option.disabled}));if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen){var n={focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null),isOpen:!0};return this.props.onSelectResetsInput&&(n.inputValue=""),void this.setState(n)}if(t.length){for(var i=-1,r=0;r<t.length;r++)if(this._focusedOption===t[r].option){i=r;break}if("next"===e&&-1!==i)i=(i+1)%t.length;else if("previous"===e)i>0?i-=1:i=t.length-1;else if("start"===e)i=0;else if("end"===e)i=t.length-1;else if("page_up"===e){var s=i-this.props.pageSize;i=s<0?0:s}else if("page_down"===e){var o=i+this.props.pageSize;i=o>t.length-1?t.length-1:o}-1===i&&(i=0),this.setState({focusedIndex:t[i].index,focusedOption:t[i].option})}}},{key:"getFocusedOption",value:function(){return this._focusedOption}},{key:"selectFocusedOption",value:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)}},{key:"renderLoading",value:function(){if(this.props.isLoading)return s().createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},s().createElement("span",{className:"Select-loading"}))}},{key:"renderValue",value:function(e,t){var n=this,i=this.props.valueRenderer||this.getOptionLabel,r=this.props.valueComponent;if(!e.length){var o=function(e,t,n){var i=e.inputValue,r=e.isPseudoFocused,s=e.isFocused,o=t.onSelectResetsInput;return!i||!o&&!n&&!r&&!s}(this.state,this.props,t);return o?s().createElement("div",{className:"Select-placeholder"},this.props.placeholder):null}var a,u,l,c,p,h,d=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map((function(e,t){return s().createElement(r,{disabled:n.props.disabled||!1===e.clearableValue,id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,key:"value-"+t+"-"+e[n.props.valueKey],onClick:d,onRemove:n.removeValue,placeholder:n.props.placeholder,value:e},i(e,t),s().createElement("span",{className:"Select-aria-only"}," "))})):(a=this.state,u=this.props,l=a.inputValue,c=a.isPseudoFocused,p=a.isFocused,h=u.onSelectResetsInput,l&&(h||!p&&c||p&&!c)?void 0:(t&&(d=null),s().createElement(r,{disabled:this.props.disabled,id:this._instancePrefix+"-value-item",instancePrefix:this._instancePrefix,onClick:d,placeholder:this.props.placeholder,value:e[0]},i(e[0]))))}},{key:"renderInput",value:function(e,t){var n,i=this,r=he()("Select-input",this.props.inputProps.className),o=this.state.isOpen,a=he()(($l(n={},this._instancePrefix+"-list",o),$l(n,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),n)),u=this.state.inputValue;!u||this.props.onSelectResetsInput||this.state.isFocused||(u="");var l=Hl({},this.props.inputProps,{"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-expanded":""+o,"aria-haspopup":""+o,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-owns":a,className:r,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return i.input=e},role:"combobox",required:this.state.required,tabIndex:this.props.tabIndex,value:u});if(this.props.inputRenderer)return this.props.inputRenderer(l);if(this.props.disabled||!this.props.searchable){var c=Kl(this.props.inputProps,[]),p=he()($l({},this._instancePrefix+"-list",o));return s().createElement("div",Hl({},c,{"aria-expanded":o,"aria-owns":p,"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-disabled":""+this.props.disabled,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],className:r,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return i.input=e},role:"combobox",style:{border:0,width:1,display:"inline-block"},tabIndex:this.props.tabIndex||0}))}return this.props.autosize?s().createElement(Pl.Z,Hl({id:this.props.id},l,{minWidth:"5"})):s().createElement("div",{className:r,key:"input-wrap"},s().createElement("input",Hl({id:this.props.id},l)))}},{key:"renderClear",value:function(){var e=this.getValueArray(this.props.value);if(this.props.clearable&&e.length&&!this.props.disabled&&!this.props.isLoading){var t=this.props.multi?this.props.clearAllText:this.props.clearValueText,n=this.props.clearRenderer();return s().createElement("span",{"aria-label":t,className:"Select-clear-zone",onMouseDown:this.clearValue,onTouchEnd:this.handleTouchEndClearValue,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,title:t},n)}}},{key:"renderArrow",value:function(){if(this.props.arrowRenderer){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,n=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return n?s().createElement("span",{className:"Select-arrow-zone",onMouseDown:e},n):null}}},{key:"filterFlatOptions",value:function(e){var t=this.state.inputValue,n=this._flatOptions;return this.props.filterOptions?("function"==typeof this.props.filterOptions?this.props.filterOptions:jl)(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,trimFilter:this.props.trimFilter,valueKey:this.props.valueKey}):n}},{key:"flattenOptions",value:function(e,t){if(!e)return[];for(var n,i=[],r=0;r<e.length;r++){var s=ec(e[r]);t&&(s.group=t),(n=s)&&Array.isArray(n.options)?(i=i.concat(this.flattenOptions(s.options,s)),s.options=[]):i.push(s)}return i}},{key:"unflattenOptions",value:function(e){var t=[],n=void 0,i=void 0;return e.forEach((function(e){for(e.isInTree=!1,n=e.group;n;)n.isInTree&&(n.options=[],n.isInTree=!1),n=n.group})),e.forEach((function(e){for(n=(i=e).group;n;)i.isInTree||(n.options.push(i),i.isInTree=!0),n=(i=n).group;i.isInTree||(t.push(i),i.isInTree=!0)})),e.forEach((function(e){delete e.isInTree})),t}},{key:"onOptionRef",value:function(e,t){t&&(this.focused=e)}},{key:"renderMenu",value:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,inputValue:this.state.inputValue,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onOptionRef:this.onOptionRef,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionGroupComponent:this.props.optionGroupComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,removeValue:this.removeValue,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey}):this.props.noResultsText?s().createElement("div",{className:"Select-noresults"},this.props.noResultsText):null}},{key:"renderHiddenField",value:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map((function(e){return tc(e[t.props.valueKey])})).join(this.props.delimiter);return s().createElement("input",{disabled:this.props.disabled,name:this.props.name,ref:function(e){return t.value=e},type:"hidden",value:n})}return e.map((function(e,n){return s().createElement("input",{disabled:t.props.disabled,key:"hidden."+n,name:t.props.name,ref:"value"+n,type:"hidden",value:tc(e[t.props.valueKey])})}))}}},{key:"getFocusableOptionIndex",value:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.props.valueKey,i=this.state.focusedOption||e;if(i&&!i.disabled){var r=-1;if(t.some((function(e,t){var s=e[n]===i[n];return s&&(r=t),s})),-1!==r)return r}for(var s=0;s<t.length;s++)if(!t[s].disabled)return s;return null}},{key:"renderOuter",value:function(e,t,n){var i=this,r=this.props.dropdownComponent,o=this.renderMenu(e,t,n);return o?s().createElement(r,null,s().createElement("div",{ref:function(e){return i.menuContainer=e},className:"Select-menu-outer",style:this.props.menuContainerStyle},s().createElement("div",{className:"Select-menu",id:this._instancePrefix+"-list",onMouseDown:this.handleMouseDownOnMenu,onScroll:this.handleMenuScroll,ref:function(e){return i.menu=e},role:"listbox",style:this.props.menuStyle,tabIndex:-1},o))):null}},{key:"render",value:function(){var e=this,t=this.getValueArray(this.props.value);this._visibleOptions=this.filterFlatOptions(this.props.multi&&this.props.removeSelected?t:null);var n=this.unflattenOptions(this._visibleOptions),i="boolean"==typeof this.props.isOpen?this.props.isOpen:this.state.isOpen;this.props.multi&&!n.length&&t.length&&!this.state.inputValue&&(i=!1);var r,o=this.getFocusableOptionIndex(t[0]);r=this._focusedOption=null!==o?this._visibleOptions[o]:null;var a=he()("Select",this.props.className,{"has-value":t.length,"is-clearable":this.props.clearable,"is-disabled":this.props.disabled,"is-focused":this.state.isFocused,"is-loading":this.props.isLoading,"is-open":i,"is-pseudo-focused":this.state.isPseudoFocused,"is-searchable":this.props.searchable,"Select--multi":this.props.multi,"Select--rtl":this.props.rtl,"Select--single":!this.props.multi}),u=null;return this.props.multi&&!this.props.disabled&&t.length&&!this.state.inputValue&&this.state.isFocused&&this.props.backspaceRemoves&&(u=s().createElement("span",{id:this._instancePrefix+"-backspace-remove-message",className:"Select-aria-only","aria-live":"assertive"},this.props.backspaceToRemoveMessage.replace("{label}",t[t.length-1][this.props.labelKey]))),s().createElement("div",{ref:function(t){return e.wrapper=t},className:a,style:this.props.wrapperStyle},this.renderHiddenField(t),s().createElement("div",{ref:function(t){return e.control=t},className:"Select-control",onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleTouchEnd,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,style:this.props.style},s().createElement("span",{className:"Select-multi-value-wrapper",id:this._instancePrefix+"-value"},this.renderValue(t,i),this.renderInput(t,o)),u,this.renderLoading(),this.renderClear(),this.renderArrow()),i?this.renderOuter(n,t,r):null)}}]),t}(s().Component);sc.propTypes={"aria-describedby":a().string,"aria-label":a().string,"aria-labelledby":a().string,arrowRenderer:a().func,autoBlur:a().bool,autoFocus:a().bool,autofocus:a().bool,autosize:a().bool,backspaceRemoves:a().bool,backspaceToRemoveMessage:a().string,className:a().string,clearAllText:nc,clearRenderer:a().func,clearValueText:nc,clearable:a().bool,closeOnSelect:a().bool,deleteRemoves:a().bool,delimiter:a().string,disabled:a().bool,dropdownComponent:a().func,escapeClearsValue:a().bool,filterOption:a().func,filterOptions:a().any,id:a().string,ignoreAccents:a().bool,ignoreCase:a().bool,inputProps:a().object,inputRenderer:a().func,instanceId:a().string,isLoading:a().bool,isOpen:a().bool,joinValues:a().bool,labelKey:a().string,matchPos:a().string,matchProp:a().string,menuBuffer:a().number,menuContainerStyle:a().object,menuRenderer:a().func,menuStyle:a().object,multi:a().bool,name:a().string,noResultsText:nc,onBlur:a().func,onBlurResetsInput:a().bool,onChange:a().func,onClose:a().func,onCloseResetsInput:a().bool,onFocus:a().func,onInputChange:a().func,onInputKeyDown:a().func,onMenuScrollToBottom:a().func,onOpen:a().func,onSelectResetsInput:a().bool,onValueClick:a().func,openOnClick:a().bool,openOnFocus:a().bool,optionClassName:a().string,optionComponent:a().func,optionGroupComponent:a().func,optionRenderer:a().func,options:a().array,pageSize:a().number,placeholder:nc,removeSelected:a().bool,renderInvalidValues:a().bool,required:a().bool,resetValue:a().any,rtl:a().bool,scrollMenuIntoView:a().bool,searchable:a().bool,simpleValue:a().bool,style:a().object,tabIndex:a().string,tabSelectsValue:a().bool,trimFilter:a().bool,value:a().any,valueComponent:a().func,valueKey:a().string,valueRenderer:a().func,wrapperStyle:a().object},sc.defaultProps={arrowRenderer:Rl,autosize:!0,backspaceRemoves:!0,backspaceToRemoveMessage:"Press backspace to remove {label}",clearable:!0,clearAllText:"Clear all",clearRenderer:function(){return s().createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})},clearValueText:"Clear value",closeOnSelect:!0,deleteRemoves:!0,delimiter:",",disabled:!1,dropdownComponent:Zl,escapeClearsValue:!0,filterOptions:jl,ignoreAccents:!0,ignoreCase:!0,inputProps:{},isLoading:!1,joinValues:!1,labelKey:"label",matchPos:"any",matchProp:"any",menuBuffer:0,menuRenderer:Vl,multi:!1,noResultsText:"No results found",onBlurResetsInput:!0,onCloseResetsInput:!0,onSelectResetsInput:!0,openOnClick:!0,optionComponent:Jl,optionGroupComponent:Yl,pageSize:5,placeholder:"Select...",removeSelected:!0,required:!1,rtl:!1,scrollMenuIntoView:!0,searchable:!0,simpleValue:!1,tabSelectsValue:!0,trimFilter:!0,valueComponent:Ql,valueKey:"value"};var oc={autoload:a().bool.isRequired,cache:a().any,children:a().func.isRequired,ignoreAccents:a().bool,ignoreCase:a().bool,loadOptions:a().func.isRequired,loadingPlaceholder:a().oneOfType([a().string,a().node]),multi:a().bool,noResultsText:a().oneOfType([a().string,a().node]),onChange:a().func,onInputChange:a().func,options:a().array.isRequired,placeholder:a().oneOfType([a().string,a().node]),searchPromptText:a().oneOfType([a().string,a().node]),value:a().any},ac={},uc={autoload:!0,cache:ac,children:function(e){return s().createElement(sc,e)},ignoreAccents:!0,ignoreCase:!0,loadingPlaceholder:"Loading...",options:[],searchPromptText:"Type to search"},lc=function(e){function t(e,n){ql(this,t);var i=Gl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i._cache=e.cache===ac?{}:e.cache,i.state={inputValue:"",isLoading:!1,options:e.options},i.onInputChange=i.onInputChange.bind(i),i}return Wl(t,e),Ul(t,[{key:"componentDidMount",value:function(){this.props.autoload&&this.loadOptions("")}},{key:"componentWillReceiveProps",value:function(e){e.options!==this.props.options&&this.setState({options:e.options})}},{key:"componentWillUnmount",value:function(){this._callback=null}},{key:"loadOptions",value:function(e){var t=this,n=this.props.loadOptions,i=this._cache;if(i&&Object.prototype.hasOwnProperty.call(i,e))return this._callback=null,void this.setState({isLoading:!1,options:i[e]});var r=function n(r,s){var o=s&&s.options||[];i&&(i[e]=o),n===t._callback&&(t._callback=null,t.setState({isLoading:!1,options:o}))};this._callback=r;var s=n(e,r);s&&s.then((function(e){return r(0,e)}),(function(e){return r()})),this._callback&&!this.state.isLoading&&this.setState({isLoading:!0})}},{key:"onInputChange",value:function(e){var t=this.props,n=t.ignoreAccents,i=t.ignoreCase,r=t.onInputChange,s=e;if(r){var o=r(s);null!=o&&"object"!==(void 0===o?"undefined":zl(o))&&(s=""+o)}var a=s;return n&&(a=Ll(a)),i&&(a=a.toLowerCase()),this.setState({inputValue:s}),this.loadOptions(a),s}},{key:"noResultsText",value:function(){var e=this.props,t=e.loadingPlaceholder,n=e.noResultsText,i=e.searchPromptText,r=this.state,s=r.inputValue;return r.isLoading?t:s&&n?n:i}},{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,i=t.loadingPlaceholder,r=t.placeholder,s=this.state,o=s.isLoading,a=s.options,u={noResultsText:this.noResultsText(),placeholder:o?i:r,options:o&&i?[]:a,ref:function(t){return e.select=t}};return n(Hl({},this.props,u,{isLoading:o,onInputChange:this.onInputChange}))}}]),t}(r.Component);lc.propTypes=oc,lc.defaultProps=uc;var cc=function(e){function t(e,n){ql(this,t);var i=Gl(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return i.filterOptions=i.filterOptions.bind(i),i.menuRenderer=i.menuRenderer.bind(i),i.onInputKeyDown=i.onInputKeyDown.bind(i),i.onInputChange=i.onInputChange.bind(i),i.onOptionSelect=i.onOptionSelect.bind(i),i}return Wl(t,e),Ul(t,[{key:"createNewOption",value:function(){var e=this.props,t=e.isValidNewOption,n=e.newOptionCreator,i=e.onNewOptionClick,r=e.options,s=void 0===r?[]:r;if(t({label:this.inputValue})){var o=n({label:this.inputValue,labelKey:this.labelKey,valueKey:this.valueKey});this.isOptionUnique({option:o,options:s})&&(i?i(o):(s.unshift(o),this.select.selectValue(o)))}}},{key:"filterOptions",value:function(){var e=this.props,t=e.filterOptions,n=e.isValidNewOption,i=e.promptTextCreator,r=(arguments.length<=2?void 0:arguments[2])||[],s=t.apply(void 0,arguments)||[];if(n({label:this.inputValue})){var o=this.props.newOptionCreator,a=o({label:this.inputValue,labelKey:this.labelKey,valueKey:this.valueKey}),u=this.isOptionUnique({option:a,options:r.concat(s)});if(u){var l=i(this.inputValue);this._createPlaceholderOption=o({label:l,labelKey:this.labelKey,valueKey:this.valueKey}),s.unshift(this._createPlaceholderOption)}}return s}},{key:"isOptionUnique",value:function(e){var t=e.option,n=e.options,i=this.props.isOptionUnique;return n=n||this.select.filterFlatOptions(),i({labelKey:this.labelKey,option:t,options:n,valueKey:this.valueKey})}},{key:"menuRenderer",value:function(e){return(0,this.props.menuRenderer)(Hl({},e,{onSelect:this.onOptionSelect,selectValue:this.onOptionSelect}))}},{key:"onInputChange",value:function(e){var t=this.props.onInputChange;return this.inputValue=e,t&&(this.inputValue=t(e)),this.inputValue}},{key:"onInputKeyDown",value:function(e){var t=this.props,n=t.shouldKeyDownEventCreateNewOption,i=t.onInputKeyDown,r=this.select.getFocusedOption();r&&r===this._createPlaceholderOption&&n({keyCode:e.keyCode})?(this.createNewOption(),e.preventDefault()):i&&i(e)}},{key:"onOptionSelect",value:function(e){e===this._createPlaceholderOption?this.createNewOption():this.select.selectValue(e)}},{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.ref,i=Kl(t,["ref"]),r=this.props.children;return r||(r=pc),r(Hl({},i,{allowCreate:!0,filterOptions:this.filterOptions,menuRenderer:this.menuRenderer,onInputChange:this.onInputChange,onInputKeyDown:this.onInputKeyDown,ref:function(t){e.select=t,t&&(e.labelKey=t.props.labelKey,e.valueKey=t.props.valueKey),n&&n(t)}}))}}]),t}(s().Component),pc=function(e){return s().createElement(sc,e)},hc=function(e){var t=e.option,n=e.options,i=e.labelKey,r=e.valueKey;return!n||!n.length||0===n.filter((function(e){return e[i]===t[i]||e[r]===t[r]})).length},dc=function(e){return!!e.label},fc=function(e){var t=e.label,n=e.labelKey,i={};return i[e.valueKey]=t,i[n]=t,i.className="Select-create-option-placeholder",i},mc=function(e){return'Create option "'+e+'"'},gc=function(e){switch(e.keyCode){case 9:case 13:case 188:return!0;default:return!1}};cc.isOptionUnique=hc,cc.isValidNewOption=dc,cc.newOptionCreator=fc,cc.promptTextCreator=mc,cc.shouldKeyDownEventCreateNewOption=gc,cc.defaultProps={filterOptions:jl,isOptionUnique:hc,isValidNewOption:dc,menuRenderer:Vl,newOptionCreator:fc,promptTextCreator:mc,shouldKeyDownEventCreateNewOption:gc},cc.propTypes={children:a().func,filterOptions:a().any,isOptionUnique:a().func,isValidNewOption:a().func,menuRenderer:a().any,newOptionCreator:a().func,onInputChange:a().func,onInputKeyDown:a().func,onNewOptionClick:a().func,options:a().array,promptTextCreator:a().func,ref:a().func,shouldKeyDownEventCreateNewOption:a().func};var vc=function(e){function t(){return ql(this,t),Gl(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Wl(t,e),Ul(t,[{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this;return s().createElement(lc,this.props,(function(t){var n=t.ref,i=Kl(t,["ref"]),r=n;return s().createElement(cc,i,(function(t){var n=t.ref,i=Kl(t,["ref"]),s=n;return e.props.children(Hl({},i,{ref:function(t){s(t),r(t),e.select=t}}))}))}))}}]),t}(s().Component);vc.propTypes={children:a().func.isRequired},vc.defaultProps={children:function(e){return s().createElement(sc,e)}},sc.Async=lc,sc.AsyncCreatable=vc,sc.Creatable=cc,sc.Value=Ql,sc.Option=Jl;const yc=sc;var bc=n(173),xc={};xc.styleTagTransform=_e(),xc.setAttributes=we(),xc.insert=xe().bind(null,"head"),xc.domAPI=ye(),xc.insertStyleElement=Se(),ge()(bc.Z,xc);const Ec=bc.Z&&bc.Z.locals?bc.Z.locals:void 0;function wc(){return wc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},wc.apply(this,arguments)}class Cc extends r.Component{static propTypes={option:a().object.isRequired,className:a().string,children:a().node};render(){const{option:e}=this.props;return s().createElement("div",{"data-tip":e.description,"data-place":"right","data-for":`select-option-${e.name}`},s().createElement(Jl,wc({},this.props,{className:Ec.option+" "+this.props.className}),this.props.children,Un(e.env)&&s().createElement(de.AtlasLogoMark,{size:12,className:Ec.optionIcon})),s().createElement(dt.Tooltip,{className:Ec.tooltip,id:`select-option-${e.name}`}))}}const Sc=Cc;var Dc=n(6125),_c={};_c.styleTagTransform=_e(),_c.setAttributes=we(),_c.insert=xe().bind(null,"head"),_c.domAPI=ye(),_c.insertStyleElement=Se(),ge()(Dc.Z,_c);const Ac=Dc.Z&&Dc.Z.locals?Dc.Z.locals:void 0;class kc extends r.PureComponent{static displayName="StageOperatorSelectComponent";static propTypes={allowWrites:a().bool.isRequired,env:a().string.isRequired,isTimeSeries:a().bool.isRequired,isReadonly:a().bool.isRequired,sourceName:a().string,stageOperator:a().string,index:a().number.isRequired,isEnabled:a().bool.isRequired,isCommenting:a().bool.isRequired,stageOperatorSelected:a().func.isRequired,serverVersion:a().string.isRequired,setIsModified:a().func.isRequired};onStageOperatorSelected=e=>{this.props.stageOperatorSelected(this.props.index,e,this.props.isCommenting,this.props.env),this.props.setIsModified(!0)};render(){const e=(({serverVersion:e,allowWrites:t,env:n,isTimeSeries:i,isReadonly:r,sourceName:s})=>{const o=_t().parse(e),a=o?[o.major,o.minor,o.patch].join("."):e;return wn.STAGE_OPERATORS.filter((e=>!(({oName:e,allowWrites:t})=>[Bn,jn].includes(e)&&!t)({oName:e.name,allowWrites:t})&&!(({oName:e,isTimeSeries:t,isReadonly:n,sourceName:i})=>[Vn,zn,qn].includes(e)&&(t||n&&!!i))({oName:e.name,isTimeSeries:i,isReadonly:r,sourceName:s})&&((({oVersion:e,version:t})=>_t().gte(t,e))({oVersion:e.version,version:a})&&(({oEnv:e,env:t})=>!e||!t||e.includes(t))({oEnv:e.env,env:n})||Un(e.env))))})({serverVersion:this.props.serverVersion,allowWrites:this.props.allowWrites,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName});return s().createElement("div",{className:Ac["stage-operator-select"]},s().createElement(yc,{optionComponent:Sc,simpleValue:!0,searchable:!0,openOnClick:!0,openOnFocus:!0,clearable:!1,disabled:!this.props.isEnabled,className:Ac["stage-operator-select-control"],options:e,value:this.props.stageOperator,onChange:this.onStageOperatorSelected}))}}const Tc=kc;var Oc=n(2891),Ic={};Ic.styleTagTransform=_e(),Ic.setAttributes=we(),Ic.insert=xe().bind(null,"head"),Ic.domAPI=ye(),Ic.insertStyleElement=Se(),ge()(Oc.Z,Ic);const Fc=Oc.Z&&Oc.Z.locals?Oc.Z.locals:void 0;class Pc extends r.PureComponent{static displayName="StageEditorToolbar";static propTypes={allowWrites:a().bool.isRequired,connectDragSource:a().func.isRequired,env:a().string.isRequired,isTimeSeries:a().bool.isRequired,isReadonly:a().bool.isRequired,sourceName:a().string,error:a().string,isExpanded:a().bool.isRequired,isEnabled:a().bool.isRequired,stageOperator:a().string,index:a().number.isRequired,serverVersion:a().string.isRequired,stageOperatorSelected:a().func.isRequired,stageCollapseToggled:a().func.isRequired,stageToggled:a().func.isRequired,stageAddedAfter:a().func.isRequired,stageDeleted:a().func.isRequired,setIsModified:a().func.isRequired,isCommenting:a().bool.isRequired,runStage:a().func.isRequired};render(){const{connectDragSource:e}=this.props;return e(s().createElement("div",{className:he()(Fc["stage-editor-toolbar"],{[Fc["stage-editor-toolbar-errored"]]:this.props.error})},s().createElement(Al,null),s().createElement(Fl,{isExpanded:this.props.isExpanded,index:this.props.index,setIsModified:this.props.setIsModified,stageCollapseToggled:this.props.stageCollapseToggled}),s().createElement(Tc,{allowWrites:this.props.allowWrites,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,stageOperator:this.props.stageOperator,index:this.props.index,isEnabled:this.props.isEnabled,isCommenting:this.props.isCommenting,stageOperatorSelected:this.props.stageOperatorSelected,setIsModified:this.props.setIsModified,serverVersion:this.props.serverVersion}),s().createElement(wl,{index:this.props.index,isEnabled:this.props.isEnabled,runStage:this.props.runStage,setIsModified:this.props.setIsModified,stageToggled:this.props.stageToggled}),s().createElement("div",{className:Fc["stage-editor-toolbar-right"]},s().createElement(hl,{index:this.props.index,runStage:this.props.runStage,setIsModified:this.props.setIsModified,stageDeleted:this.props.stageDeleted}),s().createElement(vl,{index:this.props.index,stageAddedAfter:this.props.stageAddedAfter}))))}}const Nc=Pc;var Rc=n(594),Mc=n.n(Rc),Lc=n(8915),Bc={};Bc.styleTagTransform=_e(),Bc.setAttributes=we(),Bc.insert=xe().bind(null,"head"),Bc.domAPI=ye(),Bc.insertStyleElement=Se(),ge()(Lc.Z,Bc);const jc=Lc.Z&&Lc.Z.locals?Lc.Z.locals:void 0,Vc={enableLiveAutocompletion:!0,tabSize:2,fontSize:11,minLines:5,maxLines:1/0,showGutter:!0,useWorker:!1,mode:"ace/mode/mongodb"};class zc extends r.Component{static displayName="StageEditorComponent";static propTypes={stage:a().string,stageOperator:a().string,snippet:a().string,error:a().string,syntaxError:a().string,runStage:a().func.isRequired,index:a().number.isRequired,serverVersion:a().string.isRequired,fields:a().array.isRequired,stageChanged:a().func.isRequired,isAutoPreviewing:a().bool.isRequired,isValid:a().bool.isRequired,fromStageOperators:a().bool.isRequired,setIsModified:a().func.isRequired,projections:a().array.isRequired,projectionsChanged:a().func.isRequired,newPipelineFromPaste:a().func.isRequired};static defaultProps={fields:[],projections:[]};constructor(e){super(e);const t=Qt().textCompleter;this.completer=new wn.StageAutoCompleter(this.props.serverVersion,t,this.getFieldsAndProjections(),this.props.stageOperator),this.debounceRun=Mc()(this.onRunStage,750)}shouldComponentUpdate(e){return e.stageOperator!==this.props.stageOperator||e.error!==this.props.error||e.syntaxError!==this.props.syntaxError||e.index!==this.props.index||e.serverVersion!==this.props.serverVersion||e.fields.length!==this.props.fields.length||e.projections.length!==this.props.projections.length||e.isValid!==this.props.isValid}componentDidUpdate(e){this.completer.update(this.getFieldsAndProjections(),this.props.stageOperator),this.completer.version=this.props.serverVersion,this.props.stageOperator!==e.stageOperator&&this.editor&&(this.editor.setValue(""),this.editor.insertSnippet(this.props.snippet||""),this.editor.focus())}onStageChange=e=>{if(null===this.props.stageOperator&&e&&"["===e.charAt(0))return this.props.newPipelineFromPaste(e),void this.props.runStage(0);this.props.stageChanged(e,this.props.index),this.props.projectionsChanged(),this.props.setIsModified(!0),!1!==this.props.fromStageOperators&&"$indexStats"!==this.props.stageOperator||!this.props.isAutoPreviewing||this.debounceRun()};onRunStage=()=>{this.props.runStage(this.props.index)};getFieldsAndProjections(){const{fields:e,projections:t,index:n}=this.props,i=t.filter((e=>e.index<n));return[].concat.call([],e,i)}renderError(){if(this.props.error)return s().createElement("div",{"data-test-id":"stage-editor-error-message",className:jc["stage-editor-errormsg"],title:this.props.error},this.props.error)}renderSyntaxError(){if(!this.props.isValid)return s().createElement("div",{className:jc["stage-editor-syntax-error"],title:this.props.syntaxError},this.props.syntaxError)}render(){return s().createElement("div",{className:jc["stage-editor-container"]},s().createElement("div",{className:jc["stage-editor"]},s().createElement(Jt(),{className:jc["stage-editor-ace-editor"],mode:"javascript",theme:"mongodb",width:"100%",value:this.props.stage,onChange:this.onStageChange,editorProps:{$blockScrolling:1/0},name:`aggregations-stage-editor-${this.props.index}`,setOptions:Vc,onFocus:()=>{Qt().setCompleters([this.completer])},onLoad:e=>{this.editor=e,this.editor.commands.addCommand({name:"executePipeline",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:()=>{this.onRunStage()}})}})),this.renderSyntaxError(),this.renderError())}}const qc=zc,Uc=require("@mongodb-js/compass-crud");var $c=n(4727),Hc=n.n($c),Wc=n(7130),Kc={};Kc.styleTagTransform=_e(),Kc.setAttributes=we(),Kc.insert=xe().bind(null,"head"),Kc.domAPI=ye(),Kc.insertStyleElement=Se(),ge()(Wc.Z,Kc);const Gc=Wc.Z&&Wc.Z.locals?Wc.Z.locals:void 0;class Zc extends r.PureComponent{static displayName="LoadingOverlay";static propTypes={text:a().string.isRequired};render(){return s().createElement("div",{className:Gc["loading-overlay"]},s().createElement("div",{className:Gc["loading-overlay-box"]},s().createElement("i",{className:"fa fa-circle-o-notch fa-spin","aria-hidden":!0}),s().createElement("div",{className:Gc["loading-overlay-box-text"]},this.props.text)))}}const Xc=Zc;var Jc=n(9877),Yc={};Yc.styleTagTransform=_e(),Yc.setAttributes=we(),Yc.insert=xe().bind(null,"head"),Yc.domAPI=ye(),Yc.insertStyleElement=Se(),ge()(Jc.Z,Yc);const Qc=Jc.Z&&Jc.Z.locals?Jc.Z.locals:void 0,{track:ep}=We("COMPASS-AGGREGATIONS-UI");class tp extends r.Component{static displayName="StagePreview";static propTypes={runOutStage:a().func.isRequired,gotoOutResults:a().func.isRequired,gotoMergeResults:a().func.isRequired,documents:a().array.isRequired,error:a().string,isValid:a().bool.isRequired,isEnabled:a().bool.isRequired,isLoading:a().bool.isRequired,isComplete:a().bool.isRequired,isMissingAtlasOnlyStageSupport:a().bool,openLink:a().func.isRequired,index:a().number.isRequired,stageOperator:a().string,stage:a().string};onGotoMergeResults=()=>{this.props.gotoMergeResults(this.props.index)};onGotoOutResults=()=>{const e=_n()(this.props.stage).replace(/['"]+/g,"");this.props.gotoOutResults(e)};onSaveDocuments=()=>{this.props.runOutStage(this.props.index)};onAtlasSignupCtaClicked=()=>{ep("Atlas Link Clicked",{screen:"agg_builder"}),this.props.openLink("https://www.mongodb.com/cloud/atlas/lp/search-1?utm_campaign=atlas_search&utm_source=compass&utm_medium=product&utm_content=v1")};renderMergeSection(){return this.props.isComplete?this.props.error?s().createElement("div",{className:Qc["stage-preview-out"]}):s().createElement("div",{className:Qc["stage-preview-out"]},s().createElement("div",{className:Qc["stage-preview-out-text"]},"Documents persisted to collection specified by $merge."),s().createElement(de.Link,{"data-test-id":"go-to-merge-collection",as:"button",className:Qc["stage-preview-out-link"],onClick:this.onGotoMergeResults},"Go to collection.")):s().createElement("div",{className:Qc["stage-preview-out"]},s().createElement("div",{className:Qc["stage-preview-out-text"]},"The $merge operator will cause the pipeline to persist the results to the specified location. Please confirm to execute."),s().createElement("div",{className:Qc["stage-preview-out-button"]},s().createElement(fe.TextButton,{dataTestId:"save-merge-documents",text:"Merge Documents",className:"btn btn-xs btn-primary",clickHandler:this.onSaveDocuments})))}renderOutSection(){return this.props.isComplete?this.props.error?s().createElement("div",{className:Qc["stage-preview-out"]}):s().createElement("div",{className:Qc["stage-preview-out"]},s().createElement("div",{className:Qc["stage-preview-out-text"]},"Documents persisted to collection: ",_n()(this.props.stage),"."),s().createElement(de.Link,{"data-test-id":"go-to-out-collection",as:"button",className:Qc["stage-preview-out-link"],onClick:this.onGotoOutResults},"Go to collection.")):s().createElement("div",{className:Qc["stage-preview-out"]},s().createElement("div",{className:Qc["stage-preview-out-text"]},"The $out operator will cause the pipeline to persist the results to the specified location (collection, S3, or Atlas). If the collection exists it will be replaced. Please confirm to execute."),s().createElement("div",{className:Qc["stage-preview-out-button"]},s().createElement(fe.TextButton,{dataTestId:"save-out-documents",text:"Save Documents",className:"btn btn-xs btn-primary",clickHandler:this.onSaveDocuments})))}renderAtlasOnlyStagePreviewSection(){return s().createElement("div",{className:Qc["stage-preview-missing-search-support"]},s().createElement(de.AtlasLogoMark,{size:30,className:Qc["stage-preview-missing-search-support-icon"]}),s().createElement("div",{"data-test-id":"stage-preview-missing-search-support",className:Qc["stage-preview-missing-search-support-text"]},"This stage is only available with MongoDB Atlas. Create a free cluster or connect to an Atlas cluster to build search indexes and use ",this.props.stageOperator," aggregation stage to run fast, relevant search queries."),s().createElement(fe.TextButton,{text:"Create Free Cluster",className:"btn btn-xs btn-primary",clickHandler:this.onAtlasSignupCtaClicked}))}renderPreview(){if(this.props.isMissingAtlasOnlyStageSupport)return this.renderAtlasOnlyStagePreviewSection();if(this.props.isValid&&this.props.isEnabled){if(this.props.stageOperator===si)return this.renderOutSection();if(this.props.stageOperator===oi)return this.renderMergeSection();if(this.props.documents.length>0){const e=this.props.documents.map(((e,t)=>s().createElement("div",{key:t,className:Qc["stage-preview-document-card"]},s().createElement(Uc.Document,{doc:new(Hc())(e),editable:!1}))));return s().createElement("div",{className:Qc["stage-preview-documents"]},e)}}return this.props.isLoading?void 0:s().createElement("div",{className:Qc["stage-preview-empty"]},s().createElement("div",null,s().createElement("svg",{width:"44",height:"60",viewBox:"0 0 44 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s().createElement("path",{d:"M21.9297 38.2988C23.4783 35.1247 27.7679 30.0989 32.5375 35.3879"}),s().createElement("path",{d:"M1 10.7831V51.3133L9.61538 59M1 10.7831L35.4615 1L43 5.19277M1 10.7831L10.1538 15.6747M9.61538 59L43 45.7229C39.9487 34.0763 38 22.5957 43 5.19277M9.61538 59C5.5 34.9362 7.46154 20.3333 10.1538 15.6747M43 5.19277L10.1538 15.6747"}),s().createElement("path",{d:"M19.7174 26.7113C19.7734 27.324 19.6719 27.8684 19.4884 28.2491C19.2999 28.6402 19.0726 28.7786 18.9038 28.7941C18.7349 28.8095 18.4862 28.7146 18.2299 28.3642C17.9804 28.0232 17.7818 27.5063 17.7257 26.8935C17.6696 26.2808 17.7711 25.7364 17.9546 25.3557C18.1432 24.9646 18.3704 24.8262 18.5393 24.8107C18.7082 24.7953 18.9568 24.8902 19.2132 25.2406C19.4627 25.5816 19.6613 26.0985 19.7174 26.7113Z",fill:"#89979B"}),s().createElement("path",{d:"M32.481 23.5351C32.5371 24.1479 32.4356 24.6923 32.2521 25.0729C32.0636 25.464 31.8363 25.6025 31.6674 25.6179C31.4985 25.6334 31.2499 25.5385 30.9935 25.1881C30.744 24.847 30.5454 24.3301 30.4894 23.7174C30.4333 23.1046 30.5348 22.5602 30.7183 22.1796C30.9068 21.7885 31.1341 21.65 31.303 21.6346C31.4719 21.6191 31.7205 21.714 31.9769 22.0644C32.2264 22.4055 32.425 22.9224 32.481 23.5351Z",fill:"#89979B"}))),s().createElement("div",null,s().createElement("i",{"data-test-id":"stage-preview-empty"},"No Preview Documents")))}renderLoading(){if(this.props.isLoading)return this.props.stageOperator===si?s().createElement(Xc,{text:"Persisting Documents..."}):s().createElement(Xc,{text:"Loading Preview Documents..."})}render(){return s().createElement("div",{className:Qc["stage-preview"]},this.renderLoading(),this.renderPreview())}}const np=tp;var ip=n(462),rp={};rp.styleTagTransform=_e(),rp.setAttributes=we(),rp.insert=xe().bind(null,"head"),rp.domAPI=ye(),rp.insertStyleElement=Se(),ge()(ip.Z,rp);const sp=ip.Z&&ip.Z.locals?ip.Z.locals:void 0,op=/s3:/,ap=/atlas:/;class up extends r.PureComponent{static displayName="StagePreviewToolbar";static propTypes={error:a().string,isEnabled:a().bool.isRequired,isValid:a().bool.isRequired,stageOperator:a().string,stageValue:a().any,count:a().number.isRequired,openLink:a().func.isRequired};getWord(){return 1===this.props.count?"document":"documents"}getOutText(){try{const e=_n()(this.props.stageValue);return e.match(op)?"Documents will be saved to S3.":e.match(ap)?"Documents will be saved to Atlas cluster.":`Documents will be saved to the collection: ${e}`}catch(e){return"Unable to parse the destination for the out stage."}}getText(){if(this.props.isEnabled){if(this.props.stageOperator){if(this.props.stageOperator===si&&this.props.isValid)return this.getOutText();const e=at[this.props.stageOperator];let t=null;return t=e?s().createElement(de.Link,{as:"button",className:sp["stage-preview-toolbar-link"],onClick:this.props.openLink.bind(this,e.link)},this.props.stageOperator):s().createElement("span",{className:sp["stage-preview-toolbar-link-invalid"]},this.props.stageOperator),s().createElement("div",null,s().createElement("span",null,"Output after ",t," stage"),this.renderInfoSprinkle(e),s().createElement("span",{"data-test-id":"stage-preview-toolbar-tooltip"},"(Sample of ",this.props.count," ",this.getWord(),")"))}return"A sample of the aggregated results from this stage will be shown below"}return"Stage is disabled. Results not passed in the pipeline."}renderInfoSprinkle(e){if(this.props.stageOperator)return e?s().createElement("span",{"data-tip":e.tooltip,"data-for":"stage-tooltip","data-place":"top","data-html":"true"},s().createElement(dt.InfoSprinkle,{onClickHandler:this.props.openLink,helpLink:e.link}),s().createElement(dt.Tooltip,{id:"stage-tooltip"})):s().createElement("span",null," ")}render(){return s().createElement("div",{className:he()(sp["stage-preview-toolbar"],{[sp["stage-preview-toolbar-errored"]]:this.props.error})},this.getText())}}const lp=up;var cp=n(7295),pp={};pp.styleTagTransform=_e(),pp.setAttributes=we(),pp.insert=xe().bind(null,"head"),pp.domAPI=ye(),pp.insertStyleElement=Se(),ge()(cp.Z,pp);const hp=cp.Z&&cp.Z.locals?cp.Z.locals:void 0,dp={top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class fp extends r.Component{static displayName="StageComponent";static propTypes={allowWrites:a().bool.isRequired,env:a().string.isRequired,isTimeSeries:a().bool.isRequired,isReadonly:a().bool.isRequired,sourceName:a().string,connectDragSource:a().func.isRequired,stage:a().string.isRequired,stageOperator:a().string,snippet:a().string,error:a().string,syntaxError:a().string,isValid:a().bool.isRequired,isEnabled:a().bool.isRequired,isExpanded:a().bool.isRequired,isLoading:a().bool.isRequired,isComplete:a().bool.isRequired,isMissingAtlasOnlyStageSupport:a().bool,fromStageOperators:a().bool.isRequired,previewDocuments:a().array.isRequired,index:a().number.isRequired,isCommenting:a().bool.isRequired,isAutoPreviewing:a().bool.isRequired,runStage:a().func.isRequired,runOutStage:a().func.isRequired,gotoOutResults:a().func.isRequired,gotoMergeResults:a().func.isRequired,serverVersion:a().string.isRequired,stageChanged:a().func.isRequired,stageCollapseToggled:a().func.isRequired,stageAddedAfter:a().func.isRequired,stageDeleted:a().func.isRequired,stageMoved:a().func.isRequired,stageOperatorSelected:a().func.isRequired,stageToggled:a().func.isRequired,openLink:a().func.isRequired,fields:a().array.isRequired,setIsModified:a().func.isRequired,projections:a().array.isRequired,projectionsChanged:a().func.isRequired,newPipelineFromPaste:a().func.isRequired};shouldComponentUpdate(e){return e.stageOperator!==this.props.stageOperator||e.snippet!==this.props.snippet||e.error!==this.props.error||e.syntaxError!==this.props.syntaxError||e.isValid!==this.props.isValid||e.isEnabled!==this.props.isEnabled||e.isExpanded!==this.props.isExpanded||e.isLoading!==this.props.isLoading||e.isComplete!==this.props.isComplete||e.isMissingAtlasOnlyStageSupport!==this.props.isMissingAtlasOnlyStageSupport||e.fromStageOperators!==this.props.fromStageOperators||e.index!==this.props.index||e.isCommenting!==this.props.isCommenting||e.isAutoPreviewing!==this.props.isAutoPreviewing||e.serverVersion!==this.props.serverVersion||e.fields.length!==this.props.fields.length||e.projections.length!==this.props.projections.length||"$out"===this.props.stageOperator&&e.stage!==this.props.stage}getOpacity(){return this.props.isEnabled?1:.6}renderEditor(){return s().createElement(il,{className:hp["stage-editor"],defaultSize:{width:"388px",height:"auto"},minWidth:"260px",maxWidth:"92%",enable:dp,ref:e=>{this.resizableRef=e},handleWrapperClass:hp["stage-resize-handle-wrapper"],handleComponent:{right:s().createElement(al,null)}},s().createElement(Nc,{allowWrites:this.props.allowWrites,connectDragSource:this.props.connectDragSource,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,isExpanded:this.props.isExpanded,isEnabled:this.props.isEnabled,stageOperator:this.props.stageOperator,index:this.props.index,stageOperatorSelected:this.props.stageOperatorSelected,stageCollapseToggled:this.props.stageCollapseToggled,stageToggled:this.props.stageToggled,runStage:this.props.runStage,isCommenting:this.props.isCommenting,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,setIsModified:this.props.setIsModified,serverVersion:this.props.serverVersion}),this.props.isExpanded&&s().createElement(qc,{stage:this.props.stage,stageOperator:this.props.stageOperator,snippet:this.props.snippet,error:this.props.error,syntaxError:this.props.syntaxError,isValid:this.props.isValid,fromStageOperators:this.props.fromStageOperators,runStage:this.props.runStage,index:this.props.index,serverVersion:this.props.serverVersion,setIsModified:this.props.setIsModified,isAutoPreviewing:this.props.isAutoPreviewing,fields:this.props.fields,stageChanged:this.props.stageChanged,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste}))}renderPreview(){return s().createElement("div",{className:hp["stage-preview-container"]},s().createElement(lp,{isEnabled:this.props.isEnabled,isValid:this.props.isValid,stageOperator:this.props.stageOperator,stageValue:this.props.stage,count:this.props.previewDocuments.length,openLink:this.props.openLink}),this.props.isExpanded&&s().createElement(np,{documents:this.props.previewDocuments,isValid:this.props.isValid,isEnabled:this.props.isEnabled,isLoading:this.props.isLoading,isComplete:this.props.isComplete,isMissingAtlasOnlyStageSupport:this.props.isMissingAtlasOnlyStageSupport,error:this.props.error,stageOperator:this.props.stageOperator,stage:this.props.stage,index:this.props.index,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,openLink:this.props.openLink}))}render(){const e=this.getOpacity();return s().createElement("div",{"data-test-id":"stage-container","data-stage-index":this.props.index,className:he()(hp["stage-container"],{[hp["stage-container-is-first"]]:0===this.props.index})},s().createElement("div",{className:he()(hp.stage,{[hp["stage-errored"]]:this.props.error}),style:{opacity:e}},this.renderEditor(),this.renderPreview()))}}const mp=fp;var gp=n(1849),vp={};vp.styleTagTransform=_e(),vp.setAttributes=we(),vp.insert=xe().bind(null,"head"),vp.domAPI=ye(),vp.insertStyleElement=Se(),ge()(gp.Z,vp);const yp=gp.Z&&gp.Z.locals?gp.Z.locals:void 0;class bp extends r.PureComponent{static displayName="InputCollapserComponent";static propTypes={isExpanded:a().bool.isRequired,toggleInputDocumentsCollapsed:a().func.isRequired};render(){const e=this.props.isExpanded?"fa fa-angle-down":"fa fa-angle-right",t=this.props.isExpanded?"Collapse":"Expand";return s().createElement("div",{className:he()(yp["input-collapser"])},s().createElement("button",{type:"button",title:t,onClick:this.props.toggleInputDocumentsCollapsed,className:"btn btn-default btn-xs"},s().createElement("i",{className:e,"aria-hidden":!0})))}}const xp=bp;var Ep=n(9865),wp={};wp.styleTagTransform=_e(),wp.setAttributes=we(),wp.insert=xe().bind(null,"head"),wp.domAPI=ye(),wp.insertStyleElement=Se(),ge()(Ep.Z,wp);const Cp=Ep.Z&&Ep.Z.locals?Ep.Z.locals:void 0;class Sp extends r.PureComponent{static displayName="InputDocumentsCountComponent";static propTypes={count:a().oneOfType([a().number,a().string]).isRequired};render(){const e=he()({fa:!0,"fa-database":!0,[Cp["input-documents-count-db"]]:!0});return s().createElement("div",{className:he()(Cp["input-documents-count"])},s().createElement("i",{className:e,"aria-hidden":!0}),s().createElement("div",{className:he()(Cp["input-documents-count-label"])},this.props.count," Documents in the Collection"))}}const Dp=Sp;var _p=n(8910),Ap={};Ap.styleTagTransform=_e(),Ap.setAttributes=we(),Ap.insert=xe().bind(null,"head"),Ap.domAPI=ye(),Ap.insertStyleElement=Se(),ge()(_p.Z,Ap);const kp=_p.Z&&_p.Z.locals?_p.Z.locals:void 0;class Tp extends r.PureComponent{static displayName="InputRefreshComponent";static propTypes={refreshInputDocuments:a().func.isRequired};render(){return s().createElement("div",{className:kp["input-refresh"]},s().createElement("button",{type:"button",title:"Refresh Documents",onClick:this.props.refreshInputDocuments,className:"btn btn-default btn-xs"},s().createElement("i",{className:"fa fa-repeat","aria-hidden":!0})))}}const Op=Tp;var Ip=n(8608),Fp={};Fp.styleTagTransform=_e(),Fp.setAttributes=we(),Fp.insert=xe().bind(null,"head"),Fp.domAPI=ye(),Fp.insertStyleElement=Se(),ge()(Ip.Z,Fp);const Pp=Ip.Z&&Ip.Z.locals?Ip.Z.locals:void 0;class Np extends r.PureComponent{static displayName="InputBuilderToolbar";static propTypes={toggleInputDocumentsCollapsed:a().func.isRequired,refreshInputDocuments:a().func.isRequired,isExpanded:a().bool.isRequired,count:a().oneOfType([a().number,a().string]).isRequired};render(){return s().createElement("div",{className:he()(Pp["input-builder-toolbar"])},s().createElement(xp,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,isExpanded:this.props.isExpanded}),s().createElement(Dp,{count:this.props.count}),s().createElement(Op,{refreshInputDocuments:this.props.refreshInputDocuments}))}}const Rp=Np;var Mp=n(4145),Lp={};Lp.styleTagTransform=_e(),Lp.setAttributes=we(),Lp.insert=xe().bind(null,"head"),Lp.domAPI=ye(),Lp.insertStyleElement=Se(),ge()(Mp.Z,Lp);const Bp=Mp.Z&&Mp.Z.locals?Mp.Z.locals:void 0,jp=()=>s().createElement("div",{className:he()(Bp["input-preview-toolbar"])},s().createElement("div",{className:he()(Bp["input-preview-toolbar-text"])},"Preview of Documents in the Collection"));jp.displayName="InputPreviewToolbar";const Vp=jp;var zp=n(6102),qp={};qp.styleTagTransform=_e(),qp.setAttributes=we(),qp.insert=xe().bind(null,"head"),qp.domAPI=ye(),qp.insertStyleElement=Se(),ge()(zp.Z,qp);const Up=zp.Z&&zp.Z.locals?zp.Z.locals:void 0;class $p extends r.PureComponent{static displayName="InputToolbarComponent";static propTypes={toggleInputDocumentsCollapsed:a().func.isRequired,refreshInputDocuments:a().func.isRequired,isExpanded:a().bool.isRequired,count:a().oneOfType([a().number,a().string]).isRequired};render(){return s().createElement("div",{className:Up["input-toolbar"]},s().createElement(Rp,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,isExpanded:this.props.isExpanded,count:this.props.count}),s().createElement(Vp,null))}}const Hp=$p;var Wp=n(8056),Kp={};Kp.styleTagTransform=_e(),Kp.setAttributes=we(),Kp.insert=xe().bind(null,"head"),Kp.domAPI=ye(),Kp.insertStyleElement=Se(),ge()(Wp.Z,Kp);const Gp=Wp.Z&&Wp.Z.locals?Wp.Z.locals:void 0;class Zp extends r.PureComponent{static displayName="InputBuilderComponent";render(){return s().createElement("div",{className:Gp["input-builder"]},"Select an operator to construct expressions used in the aggregation pipeline stages. ",s().createElement(de.Link,{href:"https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/"},"Learn more"))}}const Xp=Zp;var Jp=n(969),Yp={};Yp.styleTagTransform=_e(),Yp.setAttributes=we(),Yp.insert=xe().bind(null,"head"),Yp.domAPI=ye(),Yp.insertStyleElement=Se(),ge()(Jp.Z,Yp);const Qp=Jp.Z&&Jp.Z.locals?Jp.Z.locals:void 0;class eh extends r.Component{static displayName="InputPreview";static propTypes={documents:a().array.isRequired,isLoading:a().bool.isRequired};render(){const e=this.props.documents.map(((e,t)=>s().createElement("div",{key:t,className:Qp["input-preview-document-card"]},s().createElement(Uc.Document,{doc:new(Hc())(e),editable:!1}))));return s().createElement("div",{className:Qp["input-preview"]},this.props.isLoading?s().createElement(Xc,{text:"Sampling Documents..."}):null,s().createElement("div",{className:Qp["input-preview-documents"]},e))}}const th=eh;var nh=n(3279),ih={};ih.styleTagTransform=_e(),ih.setAttributes=we(),ih.insert=xe().bind(null,"head"),ih.domAPI=ye(),ih.insertStyleElement=Se(),ge()(nh.Z,ih);const rh=nh.Z&&nh.Z.locals?nh.Z.locals:void 0,sh={top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class oh extends r.PureComponent{static displayName="InputWorkspace";static propTypes={documents:a().array.isRequired,isLoading:a().bool.isRequired};render(){return s().createElement("div",{className:rh["input-workspace"]},s().createElement(il,{defaultSize:{width:"388px",height:"auto"},minWidth:"220px",maxWidth:"92%",enable:sh,ref:e=>{this.resizableRef=e},handleWrapperClass:rh["stage-resize-handle-wrapper"],handleComponent:{right:s().createElement(al,null)}},s().createElement(Xp,null)),s().createElement(th,{documents:this.props.documents,isLoading:this.props.isLoading}))}}const ah=oh;var uh=n(6546),lh={};lh.styleTagTransform=_e(),lh.setAttributes=we(),lh.insert=xe().bind(null,"head"),lh.domAPI=ye(),lh.insertStyleElement=Se(),ge()(uh.Z,lh);const ch=uh.Z&&uh.Z.locals?uh.Z.locals:void 0;class ph extends r.PureComponent{static displayName="InputComponent";static propTypes={toggleInputDocumentsCollapsed:a().func.isRequired,refreshInputDocuments:a().func.isRequired,documents:a().array.isRequired,isLoading:a().bool.isRequired,isExpanded:a().bool.isRequired,count:a().oneOfType([a().number,a().string]).isRequired};render(){const e=this.props.isExpanded?s().createElement(ah,{documents:this.props.documents,isLoading:this.props.isLoading}):null;return s().createElement("div",{className:ch.input},s().createElement(Hp,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,isExpanded:this.props.isExpanded,count:this.props.count}),e)}}const hh=ph;var dh=n(9867),fh={};fh.styleTagTransform=_e(),fh.setAttributes=we(),fh.insert=xe().bind(null,"head"),fh.domAPI=ye(),fh.insertStyleElement=Se(),ge()(dh.Z,fh);const mh=dh.Z&&dh.Z.locals?dh.Z.locals:void 0;class gh extends r.PureComponent{static displayName="AddStageComponent";static propTypes={stageAdded:a().func.isRequired};render(){return s().createElement("div",{className:mh["add-stage-container"]},s().createElement("div",{className:mh["add-stage"]},s().createElement(fe.TextButton,{dataTestId:"add-stage",text:"Add Stage",className:"btn btn-xs btn-default",clickHandler:this.props.stageAdded})))}}const vh=gh;var yh="dnd-core/INIT_COORDS",bh="dnd-core/BEGIN_DRAG",xh="dnd-core/PUBLISH_DRAG_SOURCE",Eh="dnd-core/HOVER",wh="dnd-core/DROP",Ch="dnd-core/END_DRAG",Sh=function(e,t){return e===t};function Dh(e,t){return!e&&!t||!(!e||!t)&&e.x===t.x&&e.y===t.y}function _h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Sh;if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!n(e[i],t[i]))return!1;return!0}function Ah(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function kh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ah(Object(n),!0).forEach((function(t){Th(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ah(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oh={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ih(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oh,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case yh:case bh:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Eh:return Dh(e.clientOffset,n.clientOffset)?e:kh({},e,{clientOffset:n.clientOffset});case Ch:case wh:return Oh;default:return e}}var Fh="dnd-core/ADD_SOURCE",Ph="dnd-core/ADD_TARGET",Nh="dnd-core/REMOVE_SOURCE",Rh="dnd-core/REMOVE_TARGET";function Mh(e){return Mh="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},Mh(e)}function Lh(e,t,n){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:n||null}),e)}function Bh(e,t){return e.filter((function(e){return e!==t}))}function jh(e){return"object"===Mh(e)}function Vh(e,t){var n=new Map,i=function(e){return n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(i),t.forEach(i);var r=[];return n.forEach((function(e,t){1===e&&r.push(t)})),r}function zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function qh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zh(Object(n),!0).forEach((function(t){Uh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Uh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $h={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Hh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$h,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case bh:return qh({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case xh:return qh({},e,{isSourcePublic:!0});case Eh:return qh({},e,{targetIds:n.targetIds});case Rh:return-1===e.targetIds.indexOf(n.targetId)?e:qh({},e,{targetIds:Bh(e.targetIds,n.targetId)});case wh:return qh({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ch:return qh({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Wh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Fh:case Ph:return e+1;case Nh:case Rh:return e-1;default:return e}}var Kh=[],Gh=[];function Zh(e,t){return e!==Kh&&(e===Gh||void 0===t||(n=e,t.filter((function(e){return n.indexOf(e)>-1}))).length>0);var n}function Xh(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Eh:break;case Fh:case Ph:case Rh:case Nh:return Kh;default:return Gh}var t=e.payload,n=t.targetIds,i=void 0===n?[]:n,r=t.prevTargetIds,s=void 0===r?[]:r,o=Vh(i,s),a=o.length>0||!_h(i,s);if(!a)return Kh;var u=s[s.length-1],l=i[i.length-1];return u!==l&&(u&&o.push(u),l&&o.push(l)),o}function Jh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function Yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Qh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yh(Object(n),!0).forEach((function(t){ed(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ed(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function td(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Xh(e.dirtyHandlerIds,{type:t.type,payload:Qh({},t.payload,{prevTargetIds:Lh(e,"dragOperation.targetIds",[])})}),dragOffset:Ih(e.dragOffset,t),refCount:Wh(e.refCount,t),dragOperation:Hh(e.dragOperation,t),stateId:Jh(e.stateId)}}function nd(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;(s=new Error(t.replace(/%s/g,(function(){return i[o++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}function id(e,t){return{type:yh,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}Kh.__IS_NONE__=!0,Gh.__IS_ALL__=!0;var rd={type:yh,payload:{clientOffset:null,sourceClientOffset:null}};function sd(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},i=n.publishSource,r=void 0===i||i,s=n.clientOffset,o=n.getSourceClientOffset,a=e.getMonitor(),u=e.getRegistry();e.dispatch(id(s)),od(t,a,u);var l=ld(t,a);if(null!==l){var c=null;s&&(ad(o),c=o(l)),e.dispatch(id(s,c));var p=u.getSource(l),h=p.beginDrag(a,l);ud(h),u.pinSource(l);var d=u.getSourceType(l);return{type:bh,payload:{itemType:d,item:h,sourceId:l,clientOffset:s||null,sourceClientOffset:c||null,isSourcePublic:!!r}}}e.dispatch(rd)}}function od(e,t,n){nd(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){nd(n.getSource(e),"Expected sourceIds to be registered.")}))}function ad(e){nd("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function ud(e){nd(jh(e),"Item must be an object.")}function ld(e,t){for(var n=null,i=e.length-1;i>=0;i--)if(t.canDragSource(e[i])){n=e[i];break}return n}function cd(e){return function(){if(e.getMonitor().isDragging())return{type:xh}}}function pd(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function hd(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.clientOffset;dd(t);var r=t.slice(0),s=e.getMonitor(),o=e.getRegistry();fd(r,s,o);var a=s.getItemType();return md(r,o,a),gd(r,s,o),{type:Eh,payload:{targetIds:r,clientOffset:i||null}}}}function dd(e){nd(Array.isArray(e),"Expected targetIds to be an array.")}function fd(e,t,n){nd(t.isDragging(),"Cannot call hover while not dragging."),nd(!t.didDrop(),"Cannot call hover after drop.");for(var i=0;i<e.length;i++){var r=e[i];nd(e.lastIndexOf(r)===i,"Expected targetIds to be unique in the passed array."),nd(n.getTarget(r),"Expected targetIds to be registered.")}}function md(e,t,n){for(var i=e.length-1;i>=0;i--){var r=e[i];pd(t.getTargetType(r),n)||e.splice(i,1)}}function gd(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}function vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function yd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vd(Object(n),!0).forEach((function(t){bd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xd(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.getMonitor(),i=e.getRegistry();Ed(n);var r=Cd(n);r.forEach((function(r,s){var o=wd(r,s,i,n),a={type:wh,payload:{dropResult:yd({},t,{},o)}};e.dispatch(a)}))}}function Ed(e){nd(e.isDragging(),"Cannot call drop while not dragging."),nd(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function wd(e,t,n,i){var r=n.getTarget(e),s=r?r.drop(i,e):void 0;return function(e){nd(void 0===e||jh(e),"Drop result must either be an object or undefined.")}(s),void 0===s&&(s=0===t?{}:i.getDropResult()),s}function Cd(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Sd(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){nd(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var i=t.getSourceId();return n.getSource(i,!0).endDrag(t,i),n.unpinSource(),{type:Ch}}}function Dd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ad,kd=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t,this.registry=n}var t,n;return t=e,n=[{key:"subscribeToStateChange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},i=n.handlerIds;nd("function"==typeof e,"listener must be a function."),nd(void 0===i||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");var r=this.store.getState().stateId,s=function(){var n=t.store.getState(),s=n.stateId;try{s===r||s===r+1&&!Zh(n.dirtyHandlerIds,i)||e()}finally{r=s}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;nd("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var i=t.store.getState().dragOffset;i!==n&&(n=i,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return nd(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return nd(t,"Expected to find a valid target."),!(!this.isDragging()||this.didDrop())&&pd(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return nd(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var i=this.registry.getTargetType(e),r=this.getItemType();if(r&&!pd(i,r))return!1;var s=this.getTargetIds();if(!s.length)return!1;var o=s.indexOf(e);return n?o===s.length-1:o>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return i=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,s=e.initialSourceClientOffset,i&&r&&s?Dd((n=s,{x:(t=i).x+n.x,y:t.y+n.y}),r):null;var e,t,n,i,r,s}},{key:"getDifferenceFromInitialOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,n=e.initialClientOffset,t&&n?Dd(t,n):null;var e,t,n}}],n&&_d(t.prototype,n),e}(),Td=0;function Od(e){return Od="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},Od(e)}function Id(e,t){t&&Array.isArray(e)?e.forEach((function(e){return Id(e,!1)})):nd("string"==typeof e||"symbol"===Od(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function Fd(e){Nd.length||Pd(),Nd[Nd.length]=e}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(Ad||(Ad={}));var Pd,Nd=[],Rd=0;function Md(){for(;Rd<Nd.length;){var e=Rd;if(Rd+=1,Nd[e].call(),Rd>1024){for(var t=0,n=Nd.length-Rd;t<n;t++)Nd[t]=Nd[t+Rd];Nd.length-=Rd,Rd=0}}Nd.length=0,Rd=0}var Ld,Bd,jd,Vd=void 0!==n.g?n.g:self,zd=Vd.MutationObserver||Vd.WebKitMutationObserver;function qd(e){return function(){var t=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(t),clearInterval(n),e()}}}"function"==typeof zd?(Ld=1,Bd=new zd(Md),jd=document.createTextNode(""),Bd.observe(jd,{characterData:!0}),Pd=function(){Ld=-Ld,jd.data=Ld}):Pd=qd(Md),Fd.requestFlush=Pd,Fd.makeRequestCallFromTimer=qd;var Ud=[],$d=[],Hd=Fd.makeRequestCallFromTimer((function(){if($d.length)throw $d.shift()}));function Wd(e){var t;(t=Ud.length?Ud.pop():new Kd).task=e,Fd(t)}var Kd=function(){function e(){}return e.prototype.call=function(){try{this.task.call()}catch(e){Wd.onerror?Wd.onerror(e):($d.push(e),Hd())}finally{this.task=null,Ud[Ud.length]=this}},e}();function Gd(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Zd(e){switch(e[0]){case"S":return Ad.SOURCE;case"T":return Ad.TARGET;default:nd(!1,"Cannot parse handler ID: ".concat(e))}}function Xd(e,t){var n,i,r=e.entries(),s=!1;do{var o=r.next(),a=o.done;if((n=o.value,i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw s}}return n}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}())[1]===t)return!0;s=!!a}while(!s);return!1}var Jd=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}var t,n;return t=e,n=[{key:"addSource",value:function(e,t){Id(e),function(e){nd("function"==typeof e.canDrag,"Expected canDrag to be a function."),nd("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),nd("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);var n=this.addHandler(Ad.SOURCE,e,t);return this.store.dispatch(function(e){return{type:Fh,payload:{sourceId:e}}}(n)),n}},{key:"addTarget",value:function(e,t){Id(e,!0),function(e){nd("function"==typeof e.canDrop,"Expected canDrop to be a function."),nd("function"==typeof e.hover,"Expected hover to be a function."),nd("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);var n=this.addHandler(Ad.TARGET,e,t);return this.store.dispatch(function(e){return{type:Ph,payload:{targetId:e}}}(n)),n}},{key:"containsHandler",value:function(e){return Xd(this.dragSources,e)||Xd(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];nd(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,i=n?this.pinnedSource:this.dragSources.get(e);return i}},{key:"getTarget",value:function(e){return nd(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return nd(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return nd(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Zd(e)===Ad.SOURCE}},{key:"isTargetId",value:function(e){return Zd(e)===Ad.TARGET}},{key:"removeSource",value:function(e){var t=this;nd(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Nh,payload:{sourceId:e}}}(e)),Wd((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){nd(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Rh,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);nd(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){nd(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,n){var i=function(e){var t=(Td++).toString();switch(e){case Ad.SOURCE:return"S".concat(t);case Ad.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(i,t),e===Ad.SOURCE?this.dragSources.set(i,n):e===Ad.TARGET&&this.dropTargets.set(i,n),i}}],n&&Gd(t.prototype,n),e}();function Yd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qd(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ef(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return j(td,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var tf=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Yd(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var e=t.store.getState().refCount>0;t.backend&&(e&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!e&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var i=ef(n);this.store=i,this.monitor=new kd(i,new Jd(i)),i.subscribe(this.handleRefCountChange)}var t,n;return t=e,n=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,n=function(e){return{beginDrag:sd(e),publishDragSource:cd(e),hover:hd(e),drop:xd(e),endDrag:Sd(e)}}(this);return Object.keys(n).reduce((function(i,r){var s,o=n[r];return i[r]=(s=o,function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=s.apply(e,i);void 0!==o&&t(o)}),i}),{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}],n&&Qd(t.prototype,n),e}();function nf(e,t,n,i){var r=new tf(i),s=e(r,t,n);return r.receiveBackend(s),r}var rf=r.createContext({dragDropManager:void 0});function sf(e,t,n,i){return{dragDropManager:nf(e,t,n,i)}}var of=0,af=(0,r.memo)((function(e){var t,n,i=e.children,s=function(e){if("manager"in e)return[{dragDropManager:e.manager},!1];var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lf(),n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=t;return r[uf]||(r[uf]=sf(e,t,n,i)),r[uf]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}(function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children"])),o=(n=2,function(e){if(Array.isArray(e))return e}(t=s)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw s}}return n}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),a=o[0],u=o[1];return r.useEffect((function(){return u&&of++,function(){u&&0==--of&&(lf()[uf]=null)}}),[]),r.createElement(rf.Provider,{value:a},i)}));af.displayName="DndProvider";var uf=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function lf(){return void 0!==n.g?n.g:window}function cf(e){var t=null;return function(){return null==t&&(t=e()),t}}function pf(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var hf=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.entered=[],this.isNodeInDocument=t}var t,n;return t=e,n=[{key:"enter",value:function(e){var t=this,n=this.entered.length;return this.entered=function(e,t){var n=new Set,i=function(e){return n.add(e)};e.forEach(i),t.forEach(i);var r=[];return n.forEach((function(e){return r.push(e)})),r}(this.entered.filter((function(n){return t.isNodeInDocument(n)&&(!n.contains||n.contains(e))})),[e]),0===n&&this.entered.length>0}},{key:"leave",value:function(e){var t,n,i=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),n=e,t.filter((function(e){return e!==n}))),i>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}],n&&pf(t.prototype,n),e}(),df=cf((function(){return/firefox/i.test(navigator.userAgent)})),ff=cf((function(){return Boolean(window.safari)}));function mf(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var gf=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=t.length,r=[],s=0;s<i;s++)r.push(s);r.sort((function(e,n){return t[e]<t[n]?-1:1}));for(var o,a,u=[],l=[],c=[],p=0;p<i-1;p++)o=t[p+1]-t[p],a=n[p+1]-n[p],l.push(o),u.push(a),c.push(a/o);for(var h=[c[0]],d=0;d<l.length-1;d++){var f=c[d],m=c[d+1];if(f*m<=0)h.push(0);else{o=l[d];var g=l[d+1],v=o+g;h.push(3*v/((v+g)/f+(v+o)/m))}}h.push(c[c.length-1]);for(var y,b=[],x=[],E=0;E<h.length-1;E++){y=c[E];var w=h[E],C=1/l[E],S=w+h[E+1]-y-y;b.push((y-w-S)*C),x.push(S*C*C)}this.xs=t,this.ys=n,this.c1s=h,this.c2s=b,this.c3s=x}var t,n;return t=e,(n=[{key:"interpolate",value:function(e){var t=this.xs,n=this.ys,i=this.c1s,r=this.c2s,s=this.c3s,o=t.length-1;if(e===t[o])return n[o];for(var a,u=0,l=s.length-1;u<=l;){var c=t[a=Math.floor(.5*(u+l))];if(c<e)u=a+1;else{if(!(c>e))return n[a];l=a-1}}var p=e-t[o=Math.max(0,l)],h=p*p;return n[o]+i[o]*p+r[o]*h+s[o]*p*h}}])&&mf(t.prototype,n),e}();function vf(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),i=n.top;return{x:n.left,y:i}}function yf(e){return{x:e.clientX,y:e.clientY}}var bf,xf="__NATIVE_FILE__",Ef="__NATIVE_URL__",wf="__NATIVE_TEXT__";function Cf(e,t,n){var i=t.reduce((function(t,n){return t||e.getData(n)}),"");return null!=i?i:n}function Sf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Df=(Sf(bf={},xf,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),Sf(bf,Ef,{exposeProperties:{urls:function(e,t){return Cf(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),Sf(bf,wf,{exposeProperties:{text:function(e,t){return Cf(e,t,"")}},matchesTypes:["Text","text/plain"]}),bf);function _f(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Af=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.item={},this.initializeExposedProperties()}var t,n;return t=e,(n=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var n={};Object.keys(this.config.exposeProperties).forEach((function(i){n[i]={value:t.config.exposeProperties[i](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,n)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&_f(t.prototype,n),e}();function kf(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(Df).filter((function(e){return Df[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function Tf(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Of=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.globalContext=t}var t,n;return t=e,(n=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&Tf(t.prototype,n),e}();function If(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ff(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?If(Object(n),!0).forEach((function(t){Pf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nf(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Rf=function(){function e(t,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(e){return vf(i.sourceNodes.get(e))},this.endDragNativeItem=function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)},this.isNodeInDocument=function(e){return i.document&&i.document.body&&document.body.contains(e)},this.endDragIfSourceWasRemovedFromDOM=function(){var e=i.currentDragSourceNode;i.isNodeInDocument(e)||i.clearCurrentDragSourceNode()&&i.actions.endDrag()},this.handleTopDragStartCapture=function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]},this.handleTopDragStart=function(e){if(!e.defaultPrevented){var t=i.dragStartSourceIds;i.dragStartSourceIds=null;var n=yf(e);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:n});var r=e.dataTransfer,s=kf(r);if(i.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){var o=i.monitor.getSourceId(),a=i.sourceNodes.get(o),u=i.sourcePreviewNodes.get(o)||a;if(u){var l=i.getCurrentSourcePreviewNodeOptions(),c=function(e,t,n,i,r){var s,o=function(e){return"IMG"===e.nodeName&&(df()||!document.documentElement.contains(e))}(t),a=vf(o?e:t),u={x:n.x-a.x,y:n.y-a.y},l=e.offsetWidth,c=e.offsetHeight,p=i.anchorX,h=i.anchorY,d=function(e,t,n,i){var r=e?t.width:n,s=e?t.height:i;return ff()&&e&&(s/=window.devicePixelRatio,r/=window.devicePixelRatio),{dragPreviewWidth:r,dragPreviewHeight:s}}(o,t,l,c),f=d.dragPreviewWidth,m=d.dragPreviewHeight,g=r.offsetX,v=r.offsetY,y=0===v||v;return{x:0===g||g?g:new gf([0,.5,1],[u.x,u.x/l*f,u.x+f-l]).interpolate(p),y:y?v:(s=new gf([0,.5,1],[u.y,u.y/c*m,u.y+m-c]).interpolate(h),ff()&&o&&(s+=(window.devicePixelRatio-1)*m),s)}}(a,u,n,{anchorX:l.anchorX,anchorY:l.anchorY},{offsetX:l.offsetX,offsetY:l.offsetY});r.setDragImage(u,c.x,c.y)}}try{r.setData("application/json",{})}catch(e){}i.setCurrentDragSourceNode(e.target),i.getCurrentSourcePreviewNodeOptions().captureDraggingState?i.actions.publishDragSource():setTimeout((function(){return i.actions.publishDragSource()}),0)}else if(s)i.beginDragNativeItem(s);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}},this.handleTopDragEndCapture=function(){i.clearCurrentDragSourceNode()&&i.actions.endDrag()},this.handleTopDragEnterCapture=function(e){if(i.dragEnterTargetIds=[],i.enterLeaveCounter.enter(e.target)&&!i.monitor.isDragging()){var t=e.dataTransfer,n=kf(t);n&&i.beginDragNativeItem(n,t)}},this.handleTopDragEnter=function(e){var t=i.dragEnterTargetIds;i.dragEnterTargetIds=[],i.monitor.isDragging()&&(i.altKeyPressed=e.altKey,df()||i.actions.hover(t,{clientOffset:yf(e)}),t.some((function(e){return i.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){i.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));i.altKeyPressed=e.altKey,i.actions.hover(t||[],{clientOffset:yf(e)}),(t||[]).some((function(e){return i.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){i.isDraggingNativeItem()&&e.preventDefault(),i.enterLeaveCounter.leave(e.target)&&i.isDraggingNativeItem()&&i.endDragNativeItem()},this.handleTopDropCapture=function(e){i.dropTargetIds=[],e.preventDefault(),i.isDraggingNativeItem()&&i.currentNativeSource.loadDataTransfer(e.dataTransfer),i.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(t,{clientOffset:yf(e)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Of(n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new hf(this.isNodeInDocument)}var t,n;return t=e,n=[{key:"setup",value:function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"connectDragPreview",value:function(e,t,n){var i=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){i.sourcePreviewNodes.delete(e),i.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,n){var i=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var r=function(t){return i.handleDragStart(t,e)},s=function(e){return i.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",s),function(){i.sourceNodes.delete(e),i.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",s),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var n=this,i=function(t){return n.handleDragEnter(t,e)},r=function(t){return n.handleDragOver(t,e)},s=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",i),t.addEventListener("dragover",r),t.addEventListener("drop",s),function(){t.removeEventListener("dragenter",i),t.removeEventListener("dragover",r),t.removeEventListener("drop",s)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Ff({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return Ff({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(i).some((function(t){return i[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var n=new Af(Df[e]);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){return t.window&&t.window.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}}],n&&Nf(t.prototype,n),e}();function Mf(e,t,n,i){var r=n?n.call(i,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),u=0;u<s.length;u++){var l=s[u];if(!a(l))return!1;var c=e[l],p=t[l];if(!1===(r=n?n.call(i,c,p,l):void 0)||void 0===r&&c!==p)return!1}return!0}function Lf(e){return Lf="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},Lf(e)}function Bf(e){return"function"==typeof e}function jf(){}function Vf(e){if(!function(e){return"object"===Lf(e)&&null!==e}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function zf(e){var t=e.current;return null==t?null:t.decoratedRef?t.decoratedRef.current:t}function qf(e){return(t=e)&&t.prototype&&"function"==typeof t.prototype.render||function(e){return e&&e.$$typeof&&"Symbol(react.forward_ref)"===e.$$typeof.toString()}(e);var t}function Uf(e){return Uf="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},Uf(e)}function $f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hf(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wf(e,t,n){return t&&Hf(e.prototype,t),n&&Hf(e,n),e}function Kf(e,t){return!t||"object"!==Uf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gf(e){return Gf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gf(e)}function Zf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xf(e,t)}function Xf(e,t){return Xf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Xf(e,t)}var Jf=n(3421),Yf={};Yf.styleTagTransform=_e(),Yf.setAttributes=we(),Yf.insert=xe().bind(null,"head"),Yf.domAPI=ye(),Yf.insertStyleElement=Se(),ge()(Jf.Z,Yf);const Qf=Jf.Z&&Jf.Z.locals?Jf.Z.locals:void 0,em=e=>{const{initialOffset:t,currentOffset:n}=e;if(!t||!n)return{display:"none"};const{x:i,y:r}=n,s=`translate(${i}px, ${r}px)`;return{transform:s,WebkitTransform:s}},tm=e=>{const{isDragging:t,item:n}=e;return t?s().createElement("div",{className:Qf["custom-drag-layer"]},s().createElement("div",{style:em(e)},s().createElement("div",{className:Qf["custom-drag-layer-container"]},s().createElement("div",null,n.stageOperator?n.stageOperator:`Stage ${n.index+1}`)))):null};tm.propTypes={isDragging:a().bool,item:a().object};const nm=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return nd("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer",e),nd(Vf(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer',t),function(n){var i=n,s=t.arePropsEqual,o=void 0===s?Mf:s,a=i.displayName||i.name||"Component",u=function(t){function n(){var e;return $f(this,n),(e=Kf(this,Gf(n).apply(this,arguments))).isCurrentlyMounted=!1,e.ref=r.createRef(),e.handleChange=function(){if(e.isCurrentlyMounted){var t=e.getCurrentState();Mf(t,e.state)||e.setState(t)}},e}return Zf(n,t),Wf(n,[{key:"getDecoratedComponentInstance",value:function(){return nd(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current}},{key:"shouldComponentUpdate",value:function(e,t){return!o(e,this.props)||!Mf(t,this.state)}},{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)}},{key:"render",value:function(){var e=this;return r.createElement(rf.Consumer,null,(function(t){var n=t.dragDropManager;return void 0===n?null:(e.receiveDragDropManager(n),e.isCurrentlyMounted?r.createElement(i,Object.assign({},e.props,e.state,{ref:qf(i)?e.ref:null})):null)}))}},{key:"receiveDragDropManager",value:function(e){if(void 0===this.manager){this.manager=e,nd("object"===Uf(e),"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",a,a);var t=this.manager.getMonitor();this.unsubscribeFromOffsetChange=t.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=t.subscribeToStateChange(this.handleChange)}}},{key:"getCurrentState",value:function(){if(!this.manager)return{};var t=this.manager.getMonitor();return e(t,this.props)}}]),n}(r.Component);return u.displayName="DragLayer(".concat(a,")"),u.DecoratedComponent=n,v()(u,n)}}((e=>({item:e.getItem(),initialOffset:e.getInitialSourceClientOffset(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging()})))(tm);function im(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function sm(e,t,n){return t&&rm(e.prototype,t),n&&rm(e,n),e}var om=function(){function e(t){im(this,e),this.isDisposed=!1,this.action=Bf(t)?t:jf}return sm(e,[{key:"dispose",value:function(){this.isDisposed||(this.action(),this.isDisposed=!0)}}],[{key:"isDisposable",value:function(e){return e&&Bf(e.dispose)}},{key:"_fixup",value:function(t){return e.isDisposable(t)?t:e.empty}},{key:"create",value:function(t){return new e(t)}}]),e}();om.empty={dispose:jf};var am=function(){function e(){im(this,e),this.isDisposed=!1;for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];this.disposables=n}return sm(e,[{key:"add",value:function(e){this.isDisposed?e.dispose():this.disposables.push(e)}},{key:"remove",value:function(e){var t=!1;if(!this.isDisposed){var n=this.disposables.indexOf(e);-1!==n&&(t=!0,this.disposables.splice(n,1),e.dispose())}return t}},{key:"clear",value:function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var i=0;i<e;i++)t[i].dispose()}}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var i=0;i<e;i++)t[i].dispose()}}}]),e}(),um=function(){function e(){im(this,e),this.isDisposed=!1}return sm(e,[{key:"getDisposable",value:function(){return this.current}},{key:"setDisposable",value:function(e){var t=this.isDisposed;if(!t){var n=this.current;this.current=e,n&&n.dispose()}t&&e&&e.dispose()}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=void 0,e&&e.dispose()}}}]),e}();function lm(e){return lm="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},lm(e)}function cm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function pm(e){return pm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pm(e)}function hm(e,t){return hm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},hm(e,t)}function dm(e){var t=e.DecoratedComponent,n=e.createHandler,i=e.createMonitor,s=e.createConnector,o=e.registerHandler,a=e.containerDisplayName,u=e.getType,l=e.collect,c=e.options.arePropsEqual,p=void 0===c?Mf:c,h=t,d=t.displayName||t.name||"Component",f=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==lm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,pm(t).call(this,e))).decoratedRef=r.createRef(),n.handleChange=function(){var e=n.getCurrentState();Mf(e,n.state)||n.setState(e)},n.disposable=new um,n.receiveProps(e),n.dispose(),n}var a,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hm(e,t)}(t,e),a=t,(c=[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return nd(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current}},{key:"shouldComponentUpdate",value:function(e,t){return!p(e,this.props)||!Mf(t,this.state)}},{key:"componentDidMount",value:function(){this.disposable=new um,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()}},{key:"componentDidUpdate",value:function(e){p(this.props,e)||(this.receiveProps(this.props),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"receiveProps",value:function(e){this.handler&&(this.handler.receiveProps(e),this.receiveType(u(e)))}},{key:"receiveType",value:function(e){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&e!==this.currentType){this.currentType=e;var t=(s=o(e,this.handler,this.manager),a=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw s}}return n}}(s,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),n=t[0],i=t[1];this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var r=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new am(new om(r),new om(i)))}var s,a}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function(){return this.handlerConnector?l(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function(){var e=this;return r.createElement(rf.Consumer,null,(function(t){var n=t.dragDropManager;return e.receiveDragDropManager(n),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){return e.handlerConnector.reconnect()})),r.createElement(h,Object.assign({},e.props,e.getCurrentState(),{ref:qf(h)?e.decoratedRef:null}))}))}},{key:"receiveDragDropManager",value:function(e){void 0===this.manager&&(nd(void 0!==e,"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",d,d),void 0!==e&&(this.manager=e,this.handlerMonitor=i(e),this.handlerConnector=s(e.getBackend()),this.handler=n(this.handlerMonitor,this.decoratedRef)))}}])&&cm(a.prototype,c),t}(r.Component);return f.DecoratedComponent=t,f.displayName="".concat(a,"(").concat(d,")"),v()(f,t)}function fm(e,t,n){var i=n.getRegistry(),r=i.addTarget(e,t);return[r,function(){return i.removeTarget(r)}]}function mm(e,t,n){var i=n.getRegistry(),r=i.addSource(e,t);return[r,function(){return i.removeSource(r)}]}function gm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var vm=!1,ym=!1,bm=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t,n;return t=e,n=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){nd(!vm,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return vm=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{vm=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;nd(!ym,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ym=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ym=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}],n&&gm(t.prototype,n),e}();function xm(e,t){"function"==typeof e?e(t):e.current=t}function Em(e,t){var n=e.ref;return nd("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?(0,r.cloneElement)(e,{ref:function(e){xm(n,e),xm(t,e)}}):(0,r.cloneElement)(e,{ref:t})}function wm(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function Cm(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var s=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,r.isValidElement)(t)){var i=t;return e(i,n),i}var s=t;wm(s);var o=n?function(t){return e(t,n)}:e;return Em(s,o)}}(i);t[n]=function(){return s}}})),t}function Sm(e){return Sm="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},Sm(e)}function Dm(e){return null!==e&&"object"===Sm(e)&&e.hasOwnProperty("current")}function _m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Am=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Cm({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,Dm(e)?n.dragSourceRef=e:n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,Dm(e)?n.dragPreviewRef=e:n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n;return t=e,n=[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();this.handlerId?this.dragPreview&&t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.disconnectDragPreview(),this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.disconnectDragPreview()}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!Mf(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!Mf(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}}],n&&_m(t.prototype,n),e}();function km(e){return km="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},km(e)}function Tm(e,t){return"string"==typeof e||"symbol"===km(e)||!!t&&Array.isArray(e)&&e.every((function(e){return Tm(e,!1)}))}function Om(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Im=["canDrag","beginDrag","isDragging","endDrag"],Fm=["beginDrag"],Pm=function(){function e(t,n,i){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=null,this.beginDrag=function(){if(r.props)return r.spec.beginDrag(r.props,r.monitor,r.ref.current)},this.spec=t,this.monitor=n,this.ref=i}var t,n;return t=e,(n=[{key:"receiveProps",value:function(e){this.props=e}},{key:"canDrag",value:function(){return!!this.props&&(!this.spec.canDrag||this.spec.canDrag(this.props,this.monitor))}},{key:"isDragging",value:function(e,t){return!!this.props&&(this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):t===e.getSourceId())}},{key:"endDrag",value:function(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,zf(this.ref))}}])&&Om(t.prototype,n),e}();function Nm(e){return Object.keys(e).forEach((function(t){nd(Im.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',Im.join(", "),t),nd("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),Fm.forEach((function(t){nd("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function(t,n){return new Pm(e,t,n)}}function Rm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Mm=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Cm({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,Dm(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n;return t=e,n=[{key:"reconnect",value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!Mf(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}},{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}}],n&&Rm(t.prototype,n),e}();function Lm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Bm=!1,jm=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t,n;return t=e,n=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;nd(!Bm,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Bm=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Bm=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}],n&&Lm(t.prototype,n),e}();function Vm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var zm,qm=["canDrop","hover","drop"],Um=function(){function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=null,this.spec=t,this.monitor=n,this.ref=i}var t,n;return t=e,(n=[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"canDrop",value:function(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){this.spec.hover&&this.spec.hover(this.props,this.monitor,zf(this.ref))}},{key:"drop",value:function(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)}}])&&Vm(t.prototype,n),e}();function $m(e){return Object.keys(e).forEach((function(t){nd(qm.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',qm.join(", "),t),nd("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function(t,n){return new Um(e,t,n)}}class Hm extends r.Component{static propTypes={connectDragSource:a().func.isRequired,connectDropTarget:a().func.isRequired,connectDragPreview:a().func.isRequired,isOver:a().bool.isRequired,isDragging:a().bool.isRequired,index:a().number.isRequired,item:a().object.isRequired,onMove:a().func.isRequired,renderItem:a().func.isRequired};componentDidMount(){const{connectDragPreview:e}=this.props;e&&e((zm||((zm=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),zm),{captureDraggingState:!0})}render(){return(0,this.props.connectDropTarget)(s().createElement("div",null,this.props.renderItem(this.props.item,this.props.index,this.props.connectDragSource)))}}const Wm=function(e){return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e;"function"!=typeof e&&(nd(Tm(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),r=function(){return e}),nd(Vf(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var s=Nm(t);return nd("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),nd(Vf(i),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),function(e){return dm({containerDisplayName:"DragSource",createHandler:s,registerHandler:mm,createConnector:function(e){return new Am(e)},createMonitor:function(e){return new bm(e)},DecoratedComponent:e,getType:r,collect:n,options:i})}}("stage",{beginDrag:e=>({index:e.index,stageOperator:e.stageOperator})},((e,t)=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()})))(e)}((Km=Hm,function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e;"function"!=typeof e&&(nd(Tm(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),r=function(){return e}),nd(Vf(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var s=$m(t);return nd("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),nd(Vf(i),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function(e){return dm({containerDisplayName:"DropTarget",createHandler:s,registerHandler:fm,createMonitor:function(e){return new jm(e)},createConnector:function(e){return new Mm(e)},DecoratedComponent:e,getType:r,collect:n,options:i})}}("stage",{hover(e,t,n){const i=t.getItem().index,r=e.index;if(i!==r){const s=(0,Nl.findDOMNode)(n).getBoundingClientRect(),o=(s.bottom-s.top)/2,a=t.getClientOffset().y-s.top;if(i<r&&a<o)return;if(i>r&&a>o)return;t.getItem().index=r,e.onMove(i,r)}}},((e,t)=>({connectDropTarget:e.dropTarget(),isOver:t.isOver()})))(Km)));var Km;function Gm(e){return function(e,t){return new Rf(e,t)}(e,"undefined"!=typeof window?window:void 0!==n.g?n.g:null)}class Zm extends r.Component{static propTypes={items:a().array.isRequired,onMove:a().func.isRequired,renderItem:a().func.isRequired};render(){const{items:e,onMove:t,renderItem:n}=this.props;return s().createElement(af,{backend:Gm},s().createElement(nm,null),e.map(((e,i)=>s().createElement(Wm,{key:i,index:i,stageOperator:e.stageOperator,onMove:t,renderItem:n,item:e}))))}}const Xm=Zm;var Jm=n(1266),Ym={};Ym.styleTagTransform=_e(),Ym.setAttributes=we(),Ym.insert=xe().bind(null,"head"),Ym.domAPI=ye(),Ym.insertStyleElement=Se(),ge()(Jm.Z,Ym);const Qm=Jm.Z&&Jm.Z.locals?Jm.Z.locals:void 0,eg=e=>s().createElement(de.Badge,{className:Qm["modify-source-banner"],variant:de.BadgeVariant.Blue},'Modifying pipeline backing "',e.editViewName,'"');eg.propTypes={editViewName:a().string.isRequired};const tg=eg;var ng=n(310),ig={};ig.styleTagTransform=_e(),ig.setAttributes=we(),ig.insert=xe().bind(null,"head"),ig.domAPI=ye(),ig.insertStyleElement=Se(),ge()(ng.Z,ig);const rg=ng.Z&&ng.Z.locals?ng.Z.locals:void 0;class sg extends r.PureComponent{static displayName="PipelineWorkspace";static propTypes={allowWrites:a().bool.isRequired,editViewName:a().string,env:a().string.isRequired,isTimeSeries:a().bool.isRequired,isReadonly:a().bool.isRequired,sourceName:a().string,pipeline:a().array.isRequired,toggleInputDocumentsCollapsed:a().func.isRequired,refreshInputDocuments:a().func.isRequired,stageAdded:a().func.isRequired,setIsModified:a().func.isRequired,openLink:a().func.isRequired,isCommenting:a().bool.isRequired,isAutoPreviewing:a().bool.isRequired,inputDocuments:a().object.isRequired,runStage:a().func.isRequired,runOutStage:a().func.isRequired,gotoOutResults:a().func.isRequired,gotoMergeResults:a().func.isRequired,serverVersion:a().string.isRequired,stageChanged:a().func.isRequired,stageCollapseToggled:a().func.isRequired,stageAddedAfter:a().func.isRequired,stageDeleted:a().func.isRequired,stageMoved:a().func.isRequired,stageOperatorSelected:a().func.isRequired,stageToggled:a().func.isRequired,fields:a().array.isRequired,isOverviewOn:a().bool.isRequired,projections:a().array.isRequired,projectionsChanged:a().func.isRequired,newPipelineFromPaste:a().func.isRequired};onStageMoved=(e,t)=>{this.props.stageMoved(e,t),this.props.runStage(0)};renderModifyingViewSourceBanner(){if(this.props.editViewName)return s().createElement(tg,{editViewName:this.props.editViewName})}renderStage=(e,t,n)=>s().createElement(mp,{allowWrites:this.props.allowWrites,connectDragSource:n,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,stage:e.stage,stageOperator:e.stageOperator,snippet:e.snippet,error:e.error,syntaxError:e.syntaxError,isValid:e.isValid,isEnabled:e.isEnabled,isLoading:e.isLoading,isComplete:e.isComplete,isMissingAtlasOnlyStageSupport:e.isMissingAtlasOnlyStageSupport,isExpanded:e.isExpanded,isCommenting:this.props.isCommenting,isAutoPreviewing:this.props.isAutoPreviewing,fromStageOperators:e.fromStageOperators||!1,previewDocuments:e.previewDocuments,runStage:this.props.runStage,index:t,openLink:this.props.openLink,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,serverVersion:this.props.serverVersion,stageChanged:this.props.stageChanged,stageCollapseToggled:this.props.stageCollapseToggled,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,stageMoved:this.props.stageMoved,stageOperatorSelected:this.props.stageOperatorSelected,stageToggled:this.props.stageToggled,fields:this.props.fields,setIsModified:this.props.setIsModified,key:e.id,isOverviewOn:this.props.isOverviewOn,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste});renderStageList=()=>s().createElement(Xm,{items:this.props.pipeline,onMove:this.onStageMoved,renderItem:this.renderStage});render(){const e=this.props.inputDocuments;return s().createElement("div",{"data-testid":"pipeline-builder-workspace",className:rg["pipeline-workspace-container-container"]},s().createElement("div",{className:rg["pipeline-workspace-container"]},s().createElement("div",{className:rg["pipeline-workspace"]},this.renderModifyingViewSourceBanner(),s().createElement(hh,{toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,documents:e.documents,isLoading:e.isLoading,isExpanded:e.isExpanded,openLink:this.props.openLink,count:e.count,isOverviewOn:this.props.isOverviewOn}),this.renderStageList(),s().createElement(vh,{stageAdded:this.props.stageAdded,setIsModified:this.props.setIsModified}))))}}const og=sg,ag=Q((({aggregation:{documents:e}})=>({documents:e})))((({documents:e})=>s().createElement("div",{"data-testid":"pipeline-results-workspace"},s().createElement("pre",null,s().createElement("code",null,JSON.stringify(e,null,2))))));class ug extends r.PureComponent{static displayName="PipelineComponent";static propTypes={allowWrites:a().bool.isRequired,env:a().string.isRequired,isAtlasDeployed:a().bool.isRequired,getPipelineFromIndexedDB:a().func.isRequired,savedPipelinesListToggle:a().func.isRequired,getSavedPipelines:a().func.isRequired,toggleComments:a().func.isRequired,toggleSample:a().func.isRequired,toggleAutoPreview:a().func.isRequired,restorePipelineModalToggle:a().func.isRequired,restorePipelineFrom:a().func.isRequired,restorePipeline:a().object.isRequired,deletePipeline:a().func.isRequired,pipeline:a().array.isRequired,serverVersion:a().string.isRequired,stageAdded:a().func.isRequired,stageAddedAfter:a().func.isRequired,stageChanged:a().func.isRequired,stageCollapseToggled:a().func.isRequired,stageDeleted:a().func.isRequired,stageMoved:a().func.isRequired,stageOperatorSelected:a().func.isRequired,stageToggled:a().func.isRequired,savedPipeline:a().object.isRequired,saveCurrentPipeline:a().func.isRequired,newPipeline:a().func.isRequired,newPipelineFromText:a().func.isRequired,closeImport:a().func.isRequired,clonePipeline:a().func.isRequired,changeText:a().func.isRequired,createNew:a().func.isRequired,confirmNew:a().func.isRequired,runStage:a().func.isRequired,importPipelineText:a().string.isRequired,exportToLanguage:a().func.isRequired,fields:a().array.isRequired,nameChanged:a().func.isRequired,isModified:a().bool.isRequired,isCommenting:a().bool.isRequired,isSampling:a().bool.isRequired,isAutoPreviewing:a().bool.isRequired,isImportPipelineOpen:a().bool.isRequired,isImportConfirmationNeeded:a().bool.isRequired,setIsModified:a().func.isRequired,gotoOutResults:a().func.isRequired,gotoMergeResults:a().func.isRequired,name:a().string,dismissViewError:a().func.isRequired,editViewName:a().string,updateView:a().func.isRequired,updateViewError:a().string,importPipelineError:a().string,collation:a().oneOfType([a().bool,a().object]),collationChanged:a().func.isRequired,collationString:a().string,collationStringChanged:a().func.isRequired,openLink:a().func.isRequired,collationCollapseToggled:a().func.isRequired,isCollationExpanded:a().bool.isRequired,isOverviewOn:a().bool.isRequired,toggleOverview:a().func.isRequired,settings:a().object.isRequired,toggleSettingsIsExpanded:a().func.isRequired,toggleSettingsIsCommentMode:a().func.isRequired,setSettingsSampleSize:a().func.isRequired,setSettingsMaxTimeMS:a().func.isRequired,setSettingsLimit:a().func.isRequired,limit:a().number.isRequired,largeLimit:a().number.isRequired,maxTimeMS:a().number.isRequired,applySettings:a().func.isRequired,isFullscreenOn:a().bool.isRequired,toggleFullscreen:a().func.isRequired,savingPipelineNameChanged:a().func.isRequired,savingPipelineApply:a().func.isRequired,savingPipelineCancel:a().func.isRequired,savingPipelineOpen:a().func.isRequired,savingPipeline:a().object.isRequired,projections:a().array.isRequired,projectionsChanged:a().func.isRequired,newPipelineFromPaste:a().func.isRequired,openCreateView:a().func.isRequired,isNewPipelineConfirm:a().bool.isRequired,setIsNewPipelineConfirm:a().func.isRequired,inputDocuments:a().object.isRequired,workspace:a().string.isRequired,runOutStage:a().func.isRequired,isTimeSeries:a().bool.isRequired,isReadonly:a().bool.isRequired,sourceName:a().string.isRequired,toggleInputDocumentsCollapsed:a().func.isRequired,refreshInputDocuments:a().func.isRequired};static defaultProps={projections:[],maxTimeMS:rt,limit:20,largeLimit:st};renderCollationToolbar(){return this.props.isCollationExpanded&&"true"!==n.g?.process?.env?.COMPASS_SHOW_NEW_AGGREGATION_TOOLBAR?s().createElement(Wt,{collation:this.props.collation,collationChanged:this.props.collationChanged,collationString:this.props.collationString,collationStringChanged:this.props.collationStringChanged,openLink:this.props.openLink}):null}renderModifyingViewSourceError(){if(this.props.updateViewError)return s().createElement(de.Banner,{variant:"danger",dismissible:!0,onClose:this.props.dismissViewError},this.props.updateViewError)}renderRestoreModal(){return this.props.restorePipeline.isModalVisible?s().createElement(Zt,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,getPipelineFromIndexedDB:this.props.getPipelineFromIndexedDB,restorePipeline:this.props.restorePipeline}):null}renderSavePipeline(){if(!this.props.isAtlasDeployed)return s().createElement(it,{restorePipelineModalToggle:this.props.restorePipelineModalToggle,restorePipelineFrom:this.props.restorePipelineFrom,deletePipeline:this.props.deletePipeline,savedPipelinesListToggle:this.props.savedPipelinesListToggle,savedPipeline:this.props.savedPipeline})}renderPipelineToolbar(){return"true"!==n.g?.process?.env?.COMPASS_SHOW_NEW_AGGREGATION_TOOLBAR?s().createElement(zt,{isAtlasDeployed:this.props.isAtlasDeployed,savedPipelinesListToggle:this.props.savedPipelinesListToggle,updateView:this.props.updateView,getSavedPipelines:this.props.getSavedPipelines,exportToLanguage:this.props.exportToLanguage,saveCurrentPipeline:this.props.saveCurrentPipeline,savedPipeline:this.props.savedPipeline,newPipelineFromText:this.props.newPipelineFromText,clonePipeline:this.props.clonePipeline,toggleComments:this.props.toggleComments,toggleSample:this.props.toggleSample,toggleAutoPreview:this.props.toggleAutoPreview,nameChanged:this.props.nameChanged,setIsModified:this.props.setIsModified,editViewName:this.props.editViewName,isModified:this.props.isModified,isCommenting:this.props.isCommenting,isSampling:this.props.isSampling,isAutoPreviewing:this.props.isAutoPreviewing,collationCollapseToggled:this.props.collationCollapseToggled,isCollationExpanded:this.props.isCollationExpanded,name:this.props.name,isOverviewOn:this.props.isOverviewOn,toggleOverview:this.props.toggleOverview,toggleSettingsIsExpanded:this.props.toggleSettingsIsExpanded,isFullscreenOn:this.props.isFullscreenOn,toggleFullscreen:this.props.toggleFullscreen,savingPipelineOpen:this.props.savingPipelineOpen,serverVersion:this.props.serverVersion,openCreateView:this.props.openCreateView,setIsNewPipelineConfirm:this.props.setIsNewPipelineConfirm}):s().createElement(Ru,null)}renderPipelineWorkspace(){return"results"===this.props.workspace?s().createElement(ag,null):s().createElement(og,{allowWrites:this.props.allowWrites,editViewName:this.props.editViewName,env:this.props.env,isTimeSeries:this.props.isTimeSeries,isReadonly:this.props.isReadonly,sourceName:this.props.sourceName,pipeline:this.props.pipeline,toggleInputDocumentsCollapsed:this.props.toggleInputDocumentsCollapsed,refreshInputDocuments:this.props.refreshInputDocuments,stageAdded:this.props.stageAdded,setIsModified:this.props.setIsModified,openLink:this.props.openLink,isCommenting:this.props.isCommenting,isAutoPreviewing:this.props.isAutoPreviewing,inputDocuments:this.props.inputDocuments,runStage:this.props.runStage,runOutStage:this.props.runOutStage,gotoOutResults:this.props.gotoOutResults,gotoMergeResults:this.props.gotoMergeResults,serverVersion:this.props.serverVersion,stageChanged:this.props.stageChanged,stageCollapseToggled:this.props.stageCollapseToggled,stageAddedAfter:this.props.stageAddedAfter,stageDeleted:this.props.stageDeleted,stageMoved:this.props.stageMoved,stageOperatorSelected:this.props.stageOperatorSelected,stageToggled:this.props.stageToggled,fields:this.props.fields,isOverviewOn:this.props.isOverviewOn,projections:this.props.projections,projectionsChanged:this.props.projectionsChanged,newPipelineFromPaste:this.props.newPipelineFromPaste})}render(){const e=s().createElement(on,{isOpen:this.props.isImportPipelineOpen,closeImport:this.props.closeImport,changeText:this.props.changeText,createNew:this.props.createNew,error:this.props.importPipelineError,text:this.props.importPipelineText}),t=s().createElement(pn,{isConfirmationNeeded:this.props.isImportConfirmationNeeded,closeImport:this.props.closeImport,isAutoPreviewing:this.props.isAutoPreviewing,runStage:this.props.runStage,confirmNew:this.props.confirmNew}),n=s().createElement(yn,{isNewPipelineConfirm:this.props.isNewPipelineConfirm,setIsNewPipelineConfirm:this.props.setIsNewPipelineConfirm,newPipeline:this.props.newPipeline}),i=s().createElement(dn,{name:this.props.savingPipeline.name,isOpen:this.props.savingPipeline.isOpen,isSaveAs:this.props.savingPipeline.isSaveAs,saveCurrentPipeline:this.props.saveCurrentPipeline,savingPipelineNameChanged:this.props.savingPipelineNameChanged,savingPipelineApply:this.props.savingPipelineApply,savingPipelineCancel:this.props.savingPipelineCancel,savingPipelineOpen:this.props.savingPipelineOpen,clonePipeline:this.props.clonePipeline});return s().createElement("div",{className:he()(En.pipeline,!!this.props.isFullscreenOn&&En["pipeline-fullscreen"])},this.renderPipelineToolbar(),this.renderCollationToolbar(),this.renderModifyingViewSourceError(),this.renderPipelineWorkspace(),this.renderSavePipeline(),s().createElement(ht,{isAtlasDeployed:this.props.isAtlasDeployed,isExpanded:this.props.settings.isExpanded,toggleSettingsIsExpanded:this.props.toggleSettingsIsExpanded,toggleSettingsIsCommentMode:this.props.toggleSettingsIsCommentMode,setSettingsSampleSize:this.props.setSettingsSampleSize,setSettingsMaxTimeMS:this.props.setSettingsMaxTimeMS,setSettingsLimit:this.props.setSettingsLimit,isCommenting:this.props.isCommenting,toggleComments:this.props.toggleComments,limit:this.props.limit,largeLimit:this.props.largeLimit,maxTimeMS:this.props.maxTimeMS,applySettings:this.props.applySettings,runStage:this.props.runStage,settings:this.props.settings}),this.renderRestoreModal(),e,t,i,n)}}const lg=ug;var cg=n(8817),pg={};pg.styleTagTransform=_e(),pg.setAttributes=we(),pg.insert=xe().bind(null,"head"),pg.domAPI=ye(),pg.insertStyleElement=Se(),ge()(cg.Z,pg);const hg=cg.Z&&cg.Z.locals?cg.Z.locals:void 0;class dg extends r.Component{static displayName="AggregationsComponent";render(){return s().createElement("div",{className:hg.aggregations},s().createElement(lg,this.props))}}const fg=Q((e=>({allowWrites:e.allowWrites,fields:e.fields,inputDocuments:e.inputDocuments,namespace:e.namespace,env:e.env,isTimeSeries:e.isTimeSeries,isReadonly:e.isReadonly,sourceName:e.sourceName,serverVersion:e.serverVersion,pipeline:e.pipeline,savedPipeline:e.savedPipeline,restorePipeline:e.restorePipeline,name:e.name,isCollationExpanded:e.isCollationExpanded,collation:e.collation,collationString:e.collationString,isModified:e.isModified,isCommenting:e.comments,isSampling:e.sample,isAtlasDeployed:e.isAtlasDeployed,isAutoPreviewing:e.autoPreview,isImportPipelineOpen:e.importPipeline.isOpen,isImportConfirmationNeeded:e.importPipeline.isConfirmationNeeded,importPipelineText:e.importPipeline.text,importPipelineError:e.importPipeline.syntaxError,settings:e.settings,isOverviewOn:e.isOverviewOn,limit:e.limit,largeLimit:e.largeLimit,maxTimeMS:e.maxTimeMS,isFullscreenOn:e.isFullscreenOn,savingPipeline:e.savingPipeline,projections:e.projections,editViewName:e.editViewName,isNewPipelineConfirm:e.isNewPipelineConfirm,setIsNewPipelineConfirm:e.setIsNewPipelineConfirm,updateViewError:e.updateViewError,workspace:e.workspace})),{namespaceChanged:ia,nameChanged:e=>({type:ua,name:e}),collationChanged:lr,collationStringChanged:pr,toggleInputDocumentsCollapsed:()=>({type:Xo}),refreshInputDocuments:ta,toggleOverview:()=>({type:Da}),toggleComments:()=>({type:va}),toggleSample:()=>({type:ya}),toggleAutoPreview:xa,deletePipeline:e=>async(t,n)=>{const i=new Ui;await i.delete(e),t(er()),t(pu()),t((0,In.globalAppRegistryEmit)("agg-pipeline-deleted",{name:n().name}))},runStage:Ei,runOutStage:e=>(t,n)=>{const i=n(),{dataService:r}=i.dataService;r&&(((e,t,n,i,r)=>{n(gi(r));const s=vi(i,r);bi(s,e,t,n,i,r)})(r,i.namespace,t,i,e),t((0,In.globalAppRegistryEmit)("agg-pipeline-out-executed",{id:i.id})))},gotoOutResults:e=>(t,n)=>{const i=n(),r=`${Rn()(i.namespace).database}.${e.replace(/"/g,"")}`;i.outResultsFn?i.outResultsFn(r):t((0,In.globalAppRegistryEmit)("aggregations-open-result-namespace",r))},gotoMergeResults:e=>(t,n)=>{const i=n(),r=((e,t)=>{const n=On(t).$merge;if(Ln()(n))return`${e}.${n}`;const i=n.into;return Ln()(i)?`${e}.${i}`:`${i.db||e}.${i.coll}`})(Rn()(i.namespace).database,i.pipeline[e]);i.outResultsFn?i.outResultsFn(r):t((0,In.globalAppRegistryEmit)("aggregations-open-result-namespace",r))},stageAdded:fi,stageAddedAfter:e=>({index:e,type:Gn}),stageChanged:(e,t)=>({type:Zn,index:t,stage:e}),stageCollapseToggled:e=>({type:Xn,index:e}),stageDeleted:e=>({type:Jn,index:e}),stageMoved:(e,t)=>({type:Yn,fromIndex:e,toIndex:t}),stageOperatorSelected:(e,t,n,i)=>({type:Qn,index:e,stageOperator:t,isCommenting:n,env:i}),stageToggled:e=>({type:ei,index:e}),collationCollapseToggled:()=>({type:ga}),toggleSettingsIsExpanded:Na,toggleSettingsIsCommentMode:()=>({type:ka}),setSettingsSampleSize:e=>({type:Ta,value:e}),setSettingsMaxTimeMS:e=>({type:Oa,value:e}),setSettingsLimit:e=>({type:Ia,value:e}),exportToLanguage:vr,savedPipelinesListToggle:Ji,saveCurrentPipeline:tr,savedPipelineAdd:Yi,getSavedPipelines:Qi,restorePipelineModalToggle:e=>({type:wa,index:e}),restorePipelineFrom:e=>({type:Ca,objectID:e}),restoreSavedPipeline:hu,newPipeline:()=>({type:ru}),newPipelineFromText:Mo,closeImport:()=>({type:Oo}),clonePipeline:()=>({type:su}),changeText:e=>({type:Io,text:e}),createNew:()=>({type:Fo}),confirmNew:()=>({type:Po}),openLink:dr,getPipelineFromIndexedDB:du,applySettings:e=>(t,n)=>{t((e=>({type:Fa,settings:e}))(e)),t((0,In.globalAppRegistryEmit)("compass:aggregations:settings-applied",{settings:n().settings}))},setIsModified:Ri,limitChanged:e=>({type:la,limit:e}),largeLimitChanged:e=>({type:ca,largeLimit:e}),maxTimeMSChanged:e=>({type:ma,maxTimeMS:e}),toggleFullscreen:()=>({type:Ra}),savingPipelineNameChanged:e=>({type:Ma,name:e}),savingPipelineApply:()=>({type:La}),savingPipelineCancel:()=>({type:Ba}),savingPipelineOpen:za,projectionsChanged:()=>({type:Ua}),newPipelineFromPaste:e=>t=>{t((e=>({type:ou,text:e}))(e)),t((0,In.globalAppRegistryEmit)("compass:aggregations:pipeline-imported"))},updateView:()=>(e,t)=>{e(Ya());const n=t(),i=n.dataService.dataService,r=n.editViewName,s=n.pipeline.map((e=>e.executor||On(e))),o={viewOn:Rn()(n.namespace).collection,pipeline:s};try{Ga("calling data-service.updateCollection",r),i.updateCollection(r,o,(t=>{if(t)return Ga("error updating view",t),void e(Ja(t));e((0,In.globalAppRegistryEmit)("refresh-data")),Ka("View Updated",{num_stages:s.length}),e((0,In.globalAppRegistryEmit)("compass:aggregations:update-view",{numStages:s.length}));const i={namespace:r,isReadonly:!0,sourceName:n.namespace,editViewName:null,sourceReadonly:n.isReadonly,sourceViewOn:n.sourceName,sourcePipeline:s};Ga("selecting namespace",i),e((0,In.globalAppRegistryEmit)("select-namespace",i))}))}catch(t){Ga("Unexpected error updating view",t),e(Ja(t))}},openCreateView:fu,setIsNewPipelineConfirm:Wa,dismissViewError:Ya})(dg),mg=fg;function gg(e){return function(t){var n=t.dispatch,i=t.getState;return function(t){return function(r){return"function"==typeof r?r(n,i,e):t(r)}}}}var vg=gg();vg.withExtraArgument=gg;const yg=vg,bg=e=>{e.dispatch(ta())},xg=(e,t)=>{e.dispatch((e=>({type:Ho,fields:e}))(t))},Eg=(e,t,n,i,r)=>{var s,o,a,u;e.dispatch((s=t,o=n,a=i,u=r,e=>{e(((e,t,n,i)=>({type:au,name:e,pipeline:t,isReadonly:n,sourceName:i}))(s,o,a,u)),e(Ei(0))}))},wg=(e,t)=>{e.dispatch((e=>({type:ra,env:e}))(t))},Cg=(e={})=>{const t=j(cu,U(yg));if(e.localAppRegistry){const n=e.localAppRegistry;((e,t)=>{e.dispatch((0,In.localAppRegistryActivated)(t))})(t,n),n.on("refresh-data",(()=>{bg(t)})),n.on("fields-changed",(e=>{xg(t,e.aceFields)}))}if(e.globalAppRegistry){const n=e.globalAppRegistry;((e,t)=>{e.dispatch((0,In.globalAppRegistryActivated)(t))})(t,n),n.on("refresh-data",(()=>{bg(t)})),n.on("import-finished",(({ns:e})=>{const{namespace:n}=t.getState();e===n&&bg(t)})),n.on("compass:deployment-awareness:topology-changed",(e=>{wg(t,e.env)}))}if(e.dataProvider&&((e,t,n)=>{e.dispatch($o(t,n))})(t,e.dataProvider.error,e.dataProvider.dataProvider),null!==e.isAtlasDeployed&&void 0!==e.isAtlasDeployed&&((e,t)=>{e.dispatch({type:ha,isAtlasDeployed:t})})(t,e.isAtlasDeployed),null!==e.allowWrites&&void 0!==e.allowWrites&&((e,t)=>{e.dispatch((e=>({type:fa,allowWrites:e}))(t))})(t,e.allowWrites),e.namespace&&((e,t)=>{Rn()(t).collection&&(e.dispatch(ia(t)),bg(e))})(t,e.namespace),e.serverVersion&&((e,t)=>{e.dispatch((e=>({type:aa,version:e}))(t))})(t,e.serverVersion),e.fields&&xg(t,e.fields),e.outResultsFn&&((e,t)=>{e.dispatch((e=>({type:qa,outResultsFn:e}))(t))})(t,e.outResultsFn),e.editViewName&&Eg(t,e.editViewName,e.sourcePipeline,e.isReadonly,e.sourceName),e.env)wg(t,e.env);else if(n.g&&n.g.hadronApp&&n.g.hadronApp.appRegistry){const e=n.g.hadronApp.appRegistry.getStore("DeploymentAwareness.Store");e&&wg(t,e.state.env)}return e.isTimeSeries&&((e,t)=>{e.dispatch((e=>({type:oa,isTimeSeries:e}))(t))})(t,e.isTimeSeries),e.isReadonly&&((e,t)=>{e.dispatch((e=>({type:da,isReadonly:e}))(t))})(t,e.isReadonly),e.sourceName&&((e,t)=>{e.dispatch((e=>({type:Ko,sourceName:e}))(t))})(t,e.sourceName),e.aggregation&&du(e.aggregation.id)(t.dispatch),t};class Sg extends r.Component{static displayName="AggregationsPlugin";static propTypes={store:a().object.isRequired};render(){return s().createElement(h,{store:this.props.store},s().createElement(mg,null))}}const Dg=Sg,_g=[],Ag="aggregations/create-view/is-running/TOGGLE_IS_RUNNING",kg=e=>({type:Ag,isRunning:e}),Tg="aggregations/create-view/is-visible/TOGGLE_IS_VISIBLE",Og=e=>({type:Tg,isVisible:e}),Ig="aggregations/create-view/name/CHANGE_NAME",Fg=e=>({type:Ig,name:e}),Pg="aggregations/create-view/error",Ng=`${Pg}/HANDLE_ERROR`,Rg=`${Pg}/CLEAR_ERROR`,Mg="aggregations/create-view/reset",{track:Lg,debug:Bg}=He("COMPASS-AGGREGATIONS-UI"),jg=n(4935),Vg="aggregations/create-view/OPEN",zg={isRunning:!1,isVisible:!1,isDuplicating:!1,name:"",error:null,source:"",pipeline:_g},qg=V({appRegistry:Fn(),isRunning:function(e=!1,t){return t.type===Ag?t.isRunning:e},isDuplicating:function(e=!1,t){return"aggregations/create-view/is-duplicating/TOGGLE_IS_DUPLICATING"===t.type?t.isDuplicating:e},isVisible:function(e=!1,t){return t.type===Tg?t.isVisible:e},name:function(e="",t){return t.type===Ig?t.name:e},error:function(e=null,t){return t.type===Ng?t.error:t.type===Rg?null:e},source:function(e="",t){return"aggregations/create-view/source/SET"===t.type?t.source:e},pipeline:function(e=_g,t){return"aggregations/create-view/pipeline/SET"===t.type?t.pipeline:e},dataService:Uo}),Ug=(e,t)=>{if(t.type===Mg)return{...e,...zg};if(t.type===Vg){const n={...e,...zg,isVisible:!0,isDuplicating:t.duplicate,source:t.source,pipeline:t.pipeline};return Bg("handling open",{newState:n}),n}return qg(e,t)},$g=(e,t)=>(e(kg(!1)),e({type:Ng,error:t})),Hg=(e,t,n)=>({type:Vg,source:e,pipeline:t,duplicate:n}),Wg=()=>(e,t)=>{Bg("creating view!");const n=t(),i=n.dataService.dataService,r=n.name,s=n.source,{database:o}=jg(n.source),a=n.pipeline,u={};e({type:Rg});try{e(kg(!0)),Bg("calling data-service.createView",r,s,a,u),i.createView(r,s,a,u,(t=>{if(t)return Bg("error creating view",t),$g(e,t);Bg("View created!"),Lg("Aggregation Saved As View",{num_stages:a.length}),e((0,In.globalAppRegistryEmit)("compass:aggregations:create-view",{numStages:a.length})),e((0,In.globalAppRegistryEmit)("aggregations-open-result-namespace",`${o}.${r}`)),e({type:Mg})}))}catch(t){return Bg("Unexpected error creating view",t),$g(e,t)}};class Kg extends r.PureComponent{static displayName="CreateViewModalComponent";static propTypes={createView:a().func.isRequired,isVisible:a().bool.isRequired,toggleIsVisible:a().func.isRequired,name:a().string,changeViewName:a().func.isRequired,isDuplicating:a().bool.isRequired,source:a().string.isRequired,pipeline:a().array.isRequired,isRunning:a().bool.isRequired,error:a().object};static defaultProps={name:"",source:"",pipeline:[],isRunning:!1,isVisible:!1,isDuplicating:!1};onNameChange=e=>{this.props.changeViewName(e.target.value)};onFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.props.createView()};onCancel=()=>{this.props.toggleIsVisible(!1)};render(){return s().createElement(de.ConfirmationModal,{title:this.props.isDuplicating?"Duplicate View":"Create a View",open:this.props.isVisible,onConfirm:this.props.createView,onCancel:this.onCancel,buttonText:"Create",trackingId:"create_view_modal"},s().createElement("form",{name:"create-view-modal-form",onSubmit:this.onFormSubmit.bind(this),"data-test-id":"create-view-modal"},s().createElement(dt.ModalInput,{id:"create-view-name",name:"Enter a View Name",value:this.props.name||"",onChangeHandler:this.onNameChange}),this.props.error?s().createElement(dt.ModalStatusMessage,{icon:"times",message:this.props.error.message,type:"error"}):null,this.props.isRunning?s().createElement(dt.ModalStatusMessage,{icon:"spinner",message:"Create in Progress",type:"in-progress"}):null))}}const Gg=Q((e=>({isRunning:e.isRunning,isVisible:e.isVisible,isDuplicating:e.isDuplicating,name:e.name,error:e.error,source:e.source,pipeline:e.pipeline})),{createView:Wg,changeViewName:Fg,toggleIsVisible:Og})(Kg);class Zg extends r.Component{static displayName="CreateViewPlugin";static propTypes={store:a().object.isRequired};render(){return s().createElement(h,{store:this.props.store},s().createElement(Gg,null))}}const Xg=Zg;class Jg extends r.PureComponent{static displayName="DuplicateViewModalComponent";static propTypes={createView:a().func.isRequired,isVisible:a().bool.isRequired,toggleIsVisible:a().func.isRequired,name:a().string,changeViewName:a().func.isRequired,source:a().string.isRequired,pipeline:a().array.isRequired,isRunning:a().bool.isRequired,error:a().object};static defaultProps={name:"",source:"",pipeline:[],isRunning:!1,isVisible:!1};onNameChange=e=>{this.props.changeViewName(e.target.value)};onFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.props.createView()};onCancel=()=>{this.props.toggleIsVisible(!1)};render(){return s().createElement(de.ConfirmationModal,{title:"Duplicate a View",open:this.props.isVisible,onConfirm:this.props.createView,onCancel:this.onCancel,buttonText:"Duplicate",trackingId:"duplicate_view_modal"},s().createElement("form",{name:"create-view-modal-form",onSubmit:this.onFormSubmit.bind(this),"data-test-id":"create-view-modal"},s().createElement(dt.ModalInput,{id:"create-view-name",name:"Enter a View Name",value:this.props.name||"",onChangeHandler:this.onNameChange}),this.props.error?s().createElement(dt.ModalStatusMessage,{icon:"times",message:this.props.error.message,type:"error"}):null,this.props.isRunning?s().createElement(dt.ModalStatusMessage,{icon:"spinner",message:"Duplicate in Progress",type:"in-progress"}):null))}}const Yg=Q((e=>({isRunning:e.isRunning,isVisible:e.isVisible,name:e.name,error:e.error,source:e.source,pipeline:e.pipeline})),{createView:Wg,changeViewName:Fg,toggleIsVisible:Og})(Jg),Qg=j(Ug,U(yg));Qg.onActivated=e=>{Qg.dispatch((0,In.globalAppRegistryActivated)(e)),e.on("data-service-connected",((e,t)=>{Qg.dispatch($o(e,t))})),e.on("open-create-view",(e=>{Qg.dispatch(Hg(e.source,e.pipeline,e.duplicate))}))};const ev=Qg;class tv extends r.Component{static displayName="DuplicateViewPlugin";render(){return s().createElement(h,{store:ev},s().createElement(Yg,null))}}const nv=tv,iv=n(1227)("mongodb-aggregations:stores:create-view"),rv=(e={})=>{const t=j(Ug,U(yg));if(e.localAppRegistry){const n=e.localAppRegistry;t.dispatch((0,In.localAppRegistryActivated)(n)),n.on("open-create-view",(e=>{iv("open-create-view",e.source,e.pipeline),t.dispatch(Hg(e.source,e.pipeline,!1))}))}if(e.globalAppRegistry){const n=e.globalAppRegistry;t.dispatch((0,In.globalAppRegistryActivated)(n))}return e.dataProvider&&((e,t,n)=>{e.dispatch($o(t,n))})(t,e.dataProvider.error,e.dataProvider.dataProvider),t},sv=JSON.parse('{"name":"@mongodb-js/compass-aggregations","productName":"Aggregations plugin","version":"8.22.0","apiVersion":"3.0.0","description":"Compass Aggregation Pipeline Builder","main":"lib/index.js","exports":{"webpack":"./src/index.js","browser":"./lib/browser.js","require":"./lib/index.js"},"scripts":{"prepublishOnly":"npm run compile","compile":"npm run webpack -- --mode production","prewebpack":"rimraf ./lib","webpack":"webpack-compass","start":"npm run webpack serve -- --mode development","analyze":"npm run webpack -- --mode production --analyze","typecheck":"tsc --noEmit","depcheck":"depcheck","eslint":"eslint","lint":"npm run eslint .","check":"npm run typecheck && npm run lint && npm run depcheck","check-ci":"npm run check","test":"mocha","test-electron":"xvfb-maybe electron-mocha --no-sandbox","test-cov":"nyc -x \\"**/*.spec.*\\" --reporter=lcov --reporter=text --reporter=html npm run test","test-watch":"npm run test -- --watch","test-ci":"npm run test-cov","test-ci-electron":"npm run test-electron"},"license":"SSPL","peerDependencies":{"@mongodb-js/compass-components":"^0.13.0","@mongodb-js/compass-crud":"^12.22.0","@mongodb-js/compass-export-to-language":"^7.21.0","@mongodb-js/compass-field-store":"^7.21.0","ace-builds":"^1.4.3","async":"^3.2.0","bson":"*","electron":"^13.5.1","hadron-react-buttons":"^5.7.0","hadron-react-components":"^5.13.0","mongodb-ace-autocompleter":"*","mongodb-ace-mode":"^1.6.0","mongodb-ace-theme":"^1.6.0","mongodb-data-service":"^21.19.0","mongodb-js-metrics":"^7.9.0","mongodb-query-parser":"^2.4.4","prop-types":"^15.7.2","react":"^16.14.0","react-ace":"^9.5.0","react-bootstrap":"^0.32.4","react-dom":"^16.14.0"},"devDependencies":{"@mongodb-js/compass-components":"^0.13.0","@mongodb-js/compass-crud":"^12.22.0","@mongodb-js/compass-export-to-language":"^7.21.0","@mongodb-js/compass-field-store":"^7.21.0","@mongodb-js/eslint-config-compass":"^0.7.0","@mongodb-js/mocha-config-compass":"^0.10.0","@mongodb-js/prettier-config-compass":"^0.5.0","@mongodb-js/tsconfig-compass":"^0.6.0","@mongodb-js/webpack-config-compass":"^0.7.0","@testing-library/react":"^12.1.4","@testing-library/user-event":"^13.5.0","@types/lodash.isempty":"^4.4.6","@types/semver":"^7.3.9","ace-builds":"^1.4.3","async":"^3.2.0","chai":"^4.3.6","classnames":"^2.2.6","debug":"4.3.0","depcheck":"^1.4.1","electron":"^13.5.1","enzyme":"^3.11.0","eslint":"^7.25.0","hadron-app":"^4.21.0","hadron-app-registry":"^8.10.0","hadron-document":"^7.9.0","hadron-react-buttons":"^5.7.0","hadron-react-components":"^5.13.0","mocha":"^8.4.0","mongodb-ace-autocompleter":"^0.11.0","mongodb-ace-mode":"^1.6.0","mongodb-ace-theme":"^1.6.0","mongodb-connection-model":"^21.15.0","mongodb-data-service":"^21.19.0","mongodb-js-metrics":"^7.9.0","mongodb-query-parser":"^2.4.4","mongodb-reflux-store":"^0.0.1","nyc":"^15.1.0","prop-types":"^15.7.2","react":"^16.14.0","react-ace":"^9.5.0","react-dom":"^16.14.0","reflux":"^0.4.1","reflux-state-mixin":"github:mongodb-js/reflux-state-mixin","rimraf":"^3.0.0","sinon":"^9.2.3","xvfb-maybe":"^0.2.1"},"dependencies":{"@mongodb-js/compass-logging":"^0.10.0","@mongodb-js/mongodb-redux-common":"^1.10.0","acorn-loose":"^8.0.2","astring":"^1.7.0","bson":"*","decomment":"^0.9.2","is-electron-renderer":"^2.0.1","lodash.debounce":"^4.0.8","lodash.isempty":"^4.4.0","lodash.isstring":"^4.0.1","mongodb":"^4.4.1","mongodb-ns":"^2.3.0","re-resizable":"^6.9.0","react-bootstrap":"^0.32.4","react-dnd":"^10.0.2","react-dnd-html5-backend":"^10.0.2","react-redux":"^5.0.6","react-select-plus":"^1.2.0","redux":"^4.1.2","redux-thunk":"^2.3.0","semver":"^5.7.1"},"homepage":"https://github.com/mongodb-js/compass","bugs":{"url":"https://jira.mongodb.org/projects/COMPASS/issues","email":"compass@mongodb.com"},"repository":{"type":"git","url":"https://github.com/mongodb-js/compass.git"},"gitHead":"a1283df32eb52881cc00eb73f8d435f772cdbfde"}'),ov={name:"Aggregations",component:Dg,order:2,configureStore:Cg,configureActions:()=>{},storeName:"Aggregations.Store",actionName:"Aggregations.Actions"},av={name:"Create View",component:Xg,configureStore:rv,storeName:"Aggregations.CreateViewStore",configureActions:()=>{},actionName:"Aggregations.Actions"},uv={name:"Duplicate View",component:nv},lv=e=>{e.registerRole("Collection.Tab",ov),e.registerRole("Collection.ScopedModal",av),e.registerRole("Global.Modal",uv),e.registerStore("Aggregations.DuplicateViewStore",ev)},cv=e=>{e.deregisterRole("Collection.Tab",ov),e.deregisterRole("Collection.ScopedModal",av),e.deregisterRole("Global.Modal",uv),e.deregisterStore("Aggregations.DuplicateViewStore")},pv=Dg},9898:(e,t,n)=>{"use strict";n(8423);const i=n(161),r=n(2701),s=n(6718),o=s.LinkedList,a=n(9628),u={Cancel:"Document::Cancel"};e.exports=class extends i{cancel(){for(let e of Array.from(this.elements))e.cancel();this.emit(u.Cancel)}constructor(e,t){super(),this.uuid=r.v4(),this.doc=e,this.cloned=t||!1,this.isUpdatable=!0,this.elements=this._generateElements(),this.type="Document",this.currentType="Document"}apply(e){let t=[],n=null;for(const[i,r]of Object.entries(e))this.get(i)?this.get(i).edit(r):n?this.insertAfter(this.get(n),i,r):this.insertBeginning(i,r),n=i,t.push(i);for(const e of[...this.elements])t.includes(e.currentKey)||e.remove()}generateObject(){return a.generate(this.elements)}generateOriginalObject(){return a.generateOriginal(this.elements)}generateUpdateUnlessChangedInBackgroundQuery(e=null){const t=this.getOriginalKeysAndValuesForFieldsThatWereUpdated(e),n={_id:this.getId(),...t},i=this.getSetUpdateForDocumentChanges(),r=this.getUnsetUpdateForDocumentChanges(),s={};return i&&Object.keys(i).length>0&&(s.$set=i),r&&Object.keys(r).length>0&&(s.$unset=r),{query:n,updateDoc:s}}get(e){return this.elements.get(e)}getChild(e){if(!e)return;let t="Array"===this.currentType?this.elements.at(e[0]):this.elements.get(e[0]),n=1;for(;n<e.length;){if(void 0===t)return;t="Array"===t.currentType?t.at(e[n]):t.get(e[n]),n++}return t}getId(){const e=this.get("_id");return e?e.generateObject():null}getOriginalKeysAndValuesForFieldsThatWereUpdated(e=null){const t={};if(this.elements)for(const n of this.elements)(n.isModified()&&!n.isAdded()||e&&n.key in e)&&(t[n.key]=n.generateOriginalObject()),n.isAdded()&&""!==n.currentKey&&(t[n.currentKey]={$exists:!1});return t}getOriginalKeysAndValuesForSpecifiedKeys(e){const t={};if(this.elements)for(const n of this.elements)n.key in e&&(t[n.key]=n.generateOriginalObject());return t}getSetUpdateForDocumentChanges(){const e={};if(this.elements)for(const t of this.elements)!t.isRemoved()&&""!==t.currentKey&&t.isModified()&&(e[t.currentKey]=t.generateObject());return e}getStringId(){const e=this.get("_id");return e?"Array"===e.currentType||"Object"===e.currentType?JSON.stringify(e.generateObject()):""+e.value:null}getUnsetUpdateForDocumentChanges(){const e={};if(this.elements)for(const t of this.elements)!t.isAdded()&&t.isRemoved()&&""!==t.key&&(e[t.key]=!0),!t.isAdded()&&t.isRenamed()&&""!==t.key&&(e[t.key]=!0);return e}insertPlaceholder(){return this.insertEnd("","")}insertBeginning(e,t){var n=this.elements.insertBeginning(e,t,!0,this);return n._bubbleUp(s.Events.Added,n,this),n}insertEnd(e,t){var n=this.elements.insertEnd(e,t,!0,this);return n._bubbleUp(s.Events.Added,n,this),n}insertAfter(e,t,n){var i=this.elements.insertAfter(e,t,n,!0,this);return i._bubbleUp(s.Events.Added,i,this),i}isAdded(){return!1}isModified(){for(let e of this.elements)if(e.isModified())return!0;return!1}isRemoved(){return!1}isRoot(){return!0}next(){this.elements.flush();const e=this.elements.lastElement;e&&e.isAdded()&&e.isBlank()?e.remove():this.insertPlaceholder()}_generateElements(){return new o(this,this.doc)}},e.exports.Events=u},8113:(e,t,n)=>{const i=n(8875),r=n(6937),{fieldStringLen:s}=n(7003),o=n(7613);e.exports=class extends o{constructor(e){super(e)}complete(){this.element.isCurrentTypeValid()&&this.element.edit(i.cast(this._formattedValue(),"Date"))}edit(e){try{"Invalid Date"===i.cast(e,"Date").toString()?this.element.setInvalid(e,"Date",`${e} is not in a valid date format`):(this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(r.Edited,this.element))}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}size(e){const t=this.element.currentValue;return e?s(t):this.element.isCurrentTypeValid()?s(this._formattedValue()):s(t)}start(){this.element.isCurrentTypeValid()&&this.edit(this._formattedValue())}value(e){const t=this.element.currentValue;return!e&&this.element.isCurrentTypeValid()?this._formattedValue():t}_formattedValue(){return new Date(this.element.currentValue).toISOString().replace("Z","+00:00")}}},8537:(e,t,n)=>{const i=n(8875),r=n(6937),s=n(7613);e.exports=class extends s{constructor(e){super(e)}complete(){this.element.isCurrentTypeValid()&&this.element.edit(i.cast(this.element.currentValue,"Decimal128"))}edit(e){try{i.cast(e,"Decimal128"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(r.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}}},8486:(e,t,n)=>{const i=n(8875),r=n(6937),{fieldStringLen:s}=n(7003),o=n(7613);e.exports=class extends o{constructor(e){super(e)}complete(){this.element.isCurrentTypeValid()&&this.element.edit(i.cast(this.element.currentValue,"Double"))}edit(e){try{const t=i.cast(e,"Double");isNaN(t.value)?this.element.setInvalid(e,"Double",`${e} is not a valid double format`):(this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(r.Edited,this.element))}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}size(){const e=this.element.currentValue;return s("function"==typeof e.valueOf?e.valueOf():e)}}},236:(e,t,n)=>{const i=n(7613),r=n(5932),s=n(8537),o=n(3528),a=n(9927),u=n(8486),l=n(8113),c=n(2746),p=n(642),h=n(8577),d=e=>({Standard:new i(e),String:new r(e),Decimal128:new s(e),Date:new l(e),Double:new u(e),Int32:new o(e),Int64:new a(e),Null:new c(e),Undefined:new p(e),ObjectId:new h(e)});Object.assign(d,{DateEditor:l,StandardEditor:i,StringEditor:r,Decimal128Editor:s,DoubleEditor:u,Int32Editor:o,Int64Editor:a,NullEditor:c,UndefinedEditor:p,ObjectIdEditor:h}),e.exports=d},3528:(e,t,n)=>{const{fieldStringLen:i}=n(7003),r=n(7613);e.exports=class extends r{constructor(e){super(e)}size(){return i(this.element.currentValue.valueOf())}}},9927:(e,t,n)=>{const i=n(8875),r=n(6937),s=n(7613);e.exports=class extends s{constructor(e){super(e)}complete(){this.element.isCurrentTypeValid()&&this.element.edit(i.cast(this.element.currentValue,"Int64"))}edit(e){try{i.cast(e,"Int64"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(r.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}}},2746:(e,t,n)=>{const i=n(7613);e.exports=class extends i{constructor(e){super(e)}size(){return 4}value(){return"null"}}},8577:(e,t,n)=>{const i=n(8875),r=n(6937),s=n(7613);e.exports=class extends s{constructor(e){super(e)}complete(){this.element.isCurrentTypeValid()&&this.element.edit(i.cast(this.element.currentValue,"ObjectId"))}edit(e){try{i.cast(e,"ObjectId"),this.element.currentValue=e,this.element.setValid(),this.element._bubbleUp(r.Edited,this.element)}catch(t){this.element.setInvalid(e,this.element.currentType,t.message)}}start(){this.element.isCurrentTypeValid()&&this.edit(String(this.element.currentValue))}}},7613:(e,t,n)=>{const i=n(8875),r=n(6937),{fieldStringLen:s}=n(7003),o=/^(\[|\{)(.+)(\]|\})$/;e.exports=class{constructor(e){this.element=e}edit(e){const t=this.element.currentType;try{const n=i.cast(e,t);this.element.edit(n)}catch(n){this.element.setInvalid(e,t,n.message)}}paste(e){e.match(o)?(this.edit(JSON.parse(e)),this.element._bubbleUp(r.Converted,this.element)):this.edit(e)}size(){return s(this.element.currentValue)}value(){return this.element.currentValue}start(){}complete(){}}},5932:(e,t,n)=>{const i=n(7613);e.exports=class extends i{constructor(e){super(e)}},e.exports.STRING_TYPE="String"},642:(e,t,n)=>{const i=n(7613),r="undefined";e.exports=class extends i{constructor(e){super(e)}size(){return r.length}value(){return r}}},6937:e=>{e.exports={Added:"Element::Added",Edited:"Element::Edited",Removed:"Element::Removed",Reverted:"Element::Reverted",Converted:"Element::Converted",Invalid:"Element::Invalid",Valid:"Element::Valid"}},6718:(e,t,n)=>{"use strict";n(8423);const i=n(161),r=n(4622),s=n(4772),o=n(4537),a=n(3958),u=n(6496),l=n(9628),c=n(8875),p=n(2701),h=n(8113),d=n(6937),f=["Binary","Code","MinKey","MaxKey","Timestamp","BSONRegExp","Undefined","Null","DBRef"],m=/^(\[|\{)(.+)(\]|\})$/;class g extends i{bulkEdit(e){e.match(m)?(this.edit(JSON.parse(e)),this._bubbleUp(d.Converted,this)):this.edit(e)}cancel(){if(this.elements)for(let e of Array.from(this.elements))e.cancel();this.isModified()&&this.revert()}constructor(e,t,n,i,r,s){super(),this.uuid=p.v4(),this.key=e,this.currentKey=e,this.parent=i,this.previousElement=r,this.nextElement=s,this.added=n,this.removed=!1,this.type=c.type(t),this.currentType=this.type,this.level=this._getLevel(),this.setValid(),this._isExpandable(t)?(this.elements=this._generateElements(t),this.originalExpandableValue=t):(this.value=t,this.currentValue=t)}_getLevel(){let e=-1,t=this.parent;for(;t;)e++,t=t.parent;return e}edit(e){this.currentType=c.type(e),this._isExpandable(e)&&!this._isExpandable(this.currentValue)?(this.currentValue=null,this.elements=this._generateElements(e)):!this._isExpandable(e)&&this.elements?(this.currentValue=e,this.elements=void 0):this.currentValue=e,this.setValid(),this._bubbleUp(d.Edited,this)}changeType(e){if("Object"===e)this.edit("{"),this.next();else if("Array"===e)this.edit("["),this.next();else try{if("Date"===e){const e=new h(this);e.edit(this.generateObject()),e.complete()}else this.edit(c.cast(this.generateObject(),e))}catch(t){this.setInvalid(this.currentValue,e,t.message)}}getRoot(){let e=this.parent;for(;e.parent;)e=e.parent;return e}get(e){return this.elements?this.elements.get(e):void 0}at(e){return this.elements?this.elements.at(e):void 0}next(){return"{"===this.currentValue?this._convertToEmptyObject():"["===this.currentValue?this._convertToEmptyArray():this._next()}rename(e){if(void 0!==this.parent){const t=this.parent.elements._map[this.currentKey];delete this.parent.elements._map[this.currentKey],this.parent.elements._map[e]=t}this.currentKey=e,this._bubbleUp(d.Edited,this)}generateObject(){return"Array"===this.currentType?l.generateArray(this.elements):"Object"===this.currentType?l.generate(this.elements):this.currentValue}generateOriginalObject(){if("Array"===this.type){const e=this._generateElements(this.originalExpandableValue);return l.generateOriginalArray(e)}if("Object"===this.type){const e=this._generateElements(this.originalExpandableValue);return l.generateOriginal(e)}return this.value}insertAfter(e,t,n){"Array"===this.currentType&&(""===e.currentKey&&this.elements.handleEmptyKeys(e),t=e.currentKey+1);var i=this.elements.insertAfter(e,t,n,!0,this);return"Array"===this.currentType&&this.elements.updateKeys(i,1),i._bubbleUp(d.Added,i,this),i}insertEnd(e,t){"Array"===this.currentType&&(this.elements.flush(),e=0,this.elements.lastElement&&(""===this.elements.lastElement.currentKey&&this.elements.handleEmptyKeys(this.elements.lastElement),e=this.elements.lastElement.currentKey+1));var n=this.elements.insertEnd(e,t,!0,this);return this._bubbleUp(d.Adde,n),n}insertPlaceholder(){return this.insertEnd("","")}insertSiblingPlaceholder(){return this.parent.insertAfter(this,"","")}isAdded(){return this.added||this.parent&&this.parent.isAdded()}isBlank(){return""===this.currentKey&&""===this.currentValue}isCurrentTypeValid(){return this.currentTypeValid}setValid(){this.currentTypeValid=!0,this.invalidTypeMessage=void 0,this._bubbleUp(d.Valid,this)}setInvalid(e,t,n){this.currentValue=e,this.currentType=t,this.currentTypeValid=!1,this.invalidTypeMessage=n,this._bubbleUp(d.Invalid,this)}isDuplicateKey(e){if(""===e)return!1;for(let t of this.parent.elements)if(t.uuid!==this.uuid&&t.currentKey===e)return!0;return!1}isEdited(){return(this.isRenamed()||!this._valuesEqual()||this.type!==this.currentType)&&!this.isAdded()}_valuesEqual(){return"Date"===this.currentType&&u(this.currentValue)?a(this.value,new Date(this.currentValue)):"ObjectId"===this.currentType&&u(this.currentValue)?this._isObjectIdEqual():a(this.value,this.currentValue)}_isObjectIdEqual(){try{return this.value.toHexString()===this.currentValue}catch(e){return!1}}isLast(){return this.parent.elements.lastElement===this}isRenamed(){let e=!1;return this.parent&&!this.parent.isRoot()&&"Object"!==this.parent.currentType||(e=this.key!==this.currentKey),e}isRevertable(){return this.isEdited()||this.isRemoved()}isRemovable(){return!this.parent.isRemoved()}isNotActionable(){return"_id"===this.key&&!this.isAdded()||!this.isRemovable()}isValueEditable(){return this.isKeyEditable()&&!f.includes(this.currentType)}isParentEditable(){return!(this.parent&&!this.parent.isRoot())||this.parent.isKeyEditable()}isKeyEditable(){return this.isParentEditable()&&(this.isAdded()||"_id"!==this.currentKey)}isModified(){if(this.elements)for(let e of this.elements)if(e.isModified())return!0;return this.isAdded()||this.isEdited()||this.isRemoved()}isRemoved(){return this.removed}isRoot(){return!1}remove(){this.revert(),this.removed=!0,this.parent&&this._bubbleUp(d.Removed,this,this.parent)}revert(){this.isAdded()?(this.parent&&"Array"===this.parent.currentType&&this.parent.elements.updateKeys(this,-1),this.parent.elements.remove(this),this._bubbleUp(d.Removed,this,this.parent),this.parent=null):(this.originalExpandableValue?(this.elements=this._generateElements(this.originalExpandableValue),this.currentValue=void 0):(null===this.currentValue&&null!==this.value?this.elements=null:this._removeAddedElements(),this.currentValue=this.value),this.currentKey=this.key,this.currentType=this.type,this.removed=!1),this.setValid(),this._bubbleUp(d.Reverted,this)}_bubbleUp(e,...t){this.emit(e,...t);var n=this.parent;n&&(n.isRoot()?n.emit(e,...t):n._bubbleUp(e,...t))}_convertToEmptyObject(){this.edit({}),this.insertPlaceholder()}_convertToEmptyArray(){this.edit([]),this.insertPlaceholder()}_isElementEmpty(e){return e&&e.isAdded()&&e.isBlank()}_isExpandable(e){return s(e)||o(e)}_generateElements(e){return new v(this,e)}_key(e,t){return"Array"===this.currentType?t:e}_next(){this._isElementEmpty(this.nextElement)||this._isElementEmpty(this)||this.parent.insertAfter(this,"","")}_removeAddedElements(){if(this.elements)for(let e of this.elements)e.isAdded()&&this.elements.remove(e)}}class v{at(e){if(this.flush(),Number.isInteger(e)){for(var t=this.firstElement,n=0;n<e;n++){if(!t)return;t=t.nextElement}return null===t?void 0:t}}get(e){return this.flush(),this._map[e]}constructor(e,t){this.firstElement=null,this.lastElement=null,this.doc=e,this.originalDoc=t,this.keys=r(this.originalDoc),"Array"===this.doc.currentType&&(this.keys=this.keys.map((e=>parseInt(e,10)))),this.size=this.keys.length,this.loaded=0,this._map={}}insertAfter(e,t,n,i,r){return this.flush(),this._insertAfter(e,t,n,i,r)}updateKeys(e,t){for(this.flush();e.nextElement;)e.nextElement.currentKey+=t,e=e.nextElement}handleEmptyKeys(e){if(""===e.currentKey){let t=e;for(;""===t.currentKey;){if(!t.previousElement){t.currentKey=0;break}t=t.previousElement}for(;t.nextElement;)t.nextElement.currentKey=t.currentKey+1,t=t.nextElement}}insertBefore(e,t,n,i,r){return this.flush(),this._insertBefore(e,t,n,i,r)}insertBeginning(e,t,n,i){return this.flush(),this._insertBeginning(e,t,n,i)}insertEnd(e,t,n,i){return this.flush(),this.lastElement?this.insertAfter(this.lastElement,e,t,n,i):this.insertBeginning(e,t,n,i)}flush(){if(this.loaded<this.size)for(let e of this)e&&e.elements&&e.elements.flush()}[Symbol.iterator](){let e,t=0;return{next:()=>{if(this._needsLazyLoad(t)){const n=this.keys[t];return t+=1,e=this._lazyInsertEnd(n),{value:e}}return this._needsStandardIteration(t)?(e=e?e.nextElement:this.firstElement,e?(t+=1,{value:e}):{done:!0}):{done:!0}}}}_needsLazyLoad(e){return 0===e&&0===this.loaded&&this.size>0||this.loaded<=e&&e<this.size}_needsStandardIteration(e){return this.loaded>0&&e<this.loaded&&e<this.size}_lazyInsertEnd(e){return this.size-=1,this._insertEnd(e,this.originalDoc[e],this.doc.cloned,this.doc)}_insertEnd(e,t,n,i){return this.lastElement?this._insertAfter(this.lastElement,e,t,n,i):this._insertBeginning(e,t,n,i)}_insertBefore(e,t,n,i,r){var s=new g(t,n,i,r,e.previousElement,e);return e.previousElement?e.previousElement.nextElement=s:this.firstElement=s,e.previousElement=s,this._map[s.key]=s,this.size+=1,this.loaded+=1,s}_insertBeginning(e,t,n,i){if(!this.firstElement){var r=new g(e,t,n,i,null,null);return this.firstElement=this.lastElement=r,this.size+=1,this.loaded+=1,this._map[r.key]=r,r}const s=this.insertBefore(this.firstElement,e,t,n,i);return this._map[s.key]=s,s}_insertAfter(e,t,n,i,r){var s=new g(t,n,i,r,e,e.nextElement);return e.nextElement?e.nextElement.previousElement=s:this.lastElement=s,e.nextElement=s,this._map[s.key]=s,this.size+=1,this.loaded+=1,s}remove(e){return this.flush(),e.previousElement?e.previousElement.nextElement=e.nextElement:this.firstElement=e.nextElement,e.nextElement?e.nextElement.previousElement=e.previousElement:this.lastElement=e.previousElement,e.nextElement=e.previousElement=null,delete this._map[e.currentKey],this.size-=1,this.loaded-=1,this}findIndex(e){let t=0;for(const n of this){if(n===e)return t;t++}return-1}}g.LinkedList=v,g.Events=d,g.DATE_FORMAT="YYYY-MM-DD HH:mm:ss.SSS",e.exports=g},4727:(e,t,n)=>{e.exports=n(9898),e.exports.DocumentEvents=e.exports.Events,e.exports.Element=n(6718),e.exports.ElementEvents=e.exports.Element.Events,e.exports.ElementEditor=n(236)},9628:e=>{"use strict";e.exports=new class{generate(e){if(e){var t={};for(let n of e)n.isRemoved()||""===n.currentKey||(t[n.currentKey]=n.generateObject());return t}return e}generateOriginal(e){if(e){var t={};for(let n of e)n.isAdded()||(t[n.key]=n.generateOriginalObject());return t}return e}generateArray(e){if(e){var t=[];for(let n of e)n.isRemoved()||(n.elements?t.push(n.generateObject()):t.push(n.currentValue));return t}return e}generateOriginalArray(e){if(e){var t=[];for(let n of e)n.originalExpandableValue?t.push(n.generateOriginalObject()):n.isAdded()||t.push(n.value);return t}return e}}},7003:e=>{e.exports={fieldStringLen:e=>{const t=String(e).length;return 0===t?1:t}}},5727:(e,t,n)=>{"use strict";const i=n(4283);let r=!1;try{r="string"!=typeof n(5840)}catch(e){}!function(){if(!r)return console.warn("Unsupported environment for hadron-ipc"),{};const t=n(i?677:5663);e.exports=t,i?e.exports.ipcRenderer=t:e.exports.ipcMain=t}()},1563:(e,t)=>{"use strict";t._=e=>`hadron-ipc-${e}-response`},5663:(e,t,n)=>{"use strict";const i=n(1563)._,r=n(4749),s=n(4772),o=n(9320),a=n(5840),u=a.BrowserWindow,l=a.ipcMain,c=n(2069)("hadron-ipc:main");(t=l).respondTo=(e,n)=>{if(s(e))return r(e,((e,n)=>{t.respondTo(n,e)})),t;const a=i(e),p=`${a}-error`;return l.on(e,((t,...i)=>{const r=u.fromWebContents(t.sender);if(!r)return;const s=n=>{if(c(`responding with result for ${e}`,n),r.isDestroyed())return c("browserWindow went away. nothing to send response to.");t.sender.send(a,n)},l=n=>{if(c(`responding with error for ${e}`,n),r.isDestroyed())return c("browserWindow went away. nothing to send response to.");t.sender.send(p,n)};c(`calling ${e} handler with args`,i);const h=n(r,...i);o(h)?h.then(s).catch(l):h instanceof Error?l(h):s(h)})),t},t.broadcast=(e,...t)=>{u.getAllWindows().forEach((n=>{n.webContents&&n.webContents.send(e,...t)}))},t.broadcastFocused=(e,...t)=>{u.getAllWindows().forEach((n=>{n.webContents&&n.isFocused()&&n.webContents.send(e,...t)}))},t.remove=(e,t)=>{l.removeListener(e,t)},e.exports=t},677:(e,t,n)=>{"use strict";const i=n(1563)._,r=n(5840).ipcRenderer,s=n(2069)("hadron-ipc:renderer");function o(e,t,...n){e(`calling ${t} with args`,n);const s=i(t),o=`${s}-error`;return new Promise((function(i,a){r.on(s,(function(n,a){e(`got response for ${t} from main`,a),r.removeAllListeners(s),r.removeAllListeners(o),i(a)})),r.on(o,(function(n,i){e(`error for ${t} from main`,i),r.removeAllListeners(s),r.removeAllListeners(o),a(i)})),r.send(t,...n)}))}(t=r).callQuiet=function(e,...t){return o((()=>{}),e,...t)},t.call=function(e,...t){return o(s,e,...t)},e.exports=t},8875:(e,t,n)=>{e.exports=n(2473)},2473:(e,t,n)=>{const{isPlainObject:i,isArray:r,isString:s,isNumber:o,hasIn:a,keys:u,without:l,toNumber:c,toString:p}=n(6635),{ObjectId:h,MinKey:d,MaxKey:f,Long:m,Double:g,Int32:v,Decimal128:y,Binary:b,BSONRegExp:x,Code:E,BSONSymbol:w,Timestamp:C,Map:S}=n(345),D="Long",_="Int64",A="_bsontype",k=/\[object (\w+)\]/,T=2147483647,O=-2147483648,I=Math.pow(2,63)-1,F=-I,P=/^-?\d+$/,N=["Long","Int32","Double","Decimal128"],R={Array:e=>r(e)?e:i(e)?[]:[e],Binary:e=>new b(""+e,b.SUBTYPE_DEFAULT),Boolean:e=>{if(s(e)){if("true"===e.toLowerCase())return!0;if("false"===e.toLowerCase())return!1;throw new Error(`'${e}' is not a valid boolean string`)}return!!e},Code:e=>new E(""+e,{}),Date:e=>new Date(e),Decimal128:e=>(a(e,A)&&N.includes(e._bsontype)&&(e=e._bsontype===D?e.toString():e.valueOf()),y.fromString(""+e)),Double:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Double value`);if(s(e)&&e.endsWith("."))throw new Error("Please enter at least one digit after the decimal");const t=c(e);return new g(t)},Int32:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Int32 value`);const t=c(e);if(t>=O&&t<=T)return new v(t);throw new Error(`Value ${t} is outside the valid Int32 range`)},Int64:e=>{if("-"===e||""===e)throw new Error(`Value '${e}' is not a valid Int64 value`);const t=c(e);if(t>=F&&t<=I)return e.value||"number"==typeof e?m.fromNumber(t):"object"==typeof e?m.fromString(e.toString()):m.fromString(e);throw new Error(`Value ${e.toString()} is outside the valid Int64 range`)},MaxKey:()=>new f,MinKey:()=>new d,Null:()=>null,Object:e=>i(e)?e:{},ObjectId:e=>s(e)&&""!==e?h.createFromHexString(e):new h,BSONRegExp:e=>new x(""+e),String:p,BSONSymbol:e=>new w(""+e),Timestamp:e=>{const t=c(e);return C.fromNumber(t)},Undefined:()=>{}},M=u(R),L=new class{test(e){if(P.test(e)){var t=c(e);return t>=O&&t<=T}return!1}},B=new class{test(e){return!!P.test(e)&&Number.isSafeInteger(c(e))}};e.exports=new class{cast(e,t){var n=R[t],i=e;return n&&(i=n(e)),"[object Object]"===i?"":i}type(e){return a(e,A)?e._bsontype===D?_:"ObjectID"===e._bsontype?"ObjectId":"Symbol"===e._bsontype?"BSONSymbol":e._bsontype:o(e)?(t=p(e),L.test(t)?"Int32":B.test(t)?_:"Double"):i(e)?"Object":r(e)?"Array":Object.prototype.toString.call(e).replace(k,"$1");var t}castableTypes(e=!1){return!0===e?M:l(M,"Decimal128")}}},9752:e=>{const t="@mongodb-js/mongodb-redux-common/app-registry",n=`${t}/LOCAL_APP_REGISTRY_ACTIVATED`,i=`${t}/GLOBAL_APP_REGISTRY_ACTIVATED`,r={localAppRegistry:null,globalAppRegistry:null},s=(e,t,...n)=>{e&&e.emit(t,...n)};e.exports=(e=r,t)=>t.type===n?{...e,localAppRegistry:t.appRegistry}:t.type===i?{...e,globalAppRegistry:t.appRegistry}:e,e.exports.LOCAL_APP_REGISTRY_ACTIVATED=n,e.exports.GLOBAL_APP_REGISTRY_ACTIVATED=i,e.exports.INITIAL_STATE=r,e.exports.localAppRegistryActivated=e=>({type:n,appRegistry:e}),e.exports.globalAppRegistryActivated=e=>({type:i,appRegistry:e}),e.exports.localAppRegistryEmit=(e,...t)=>(n,i)=>{s(i().appRegistry.localAppRegistry,e,...t)},e.exports.globalAppRegistryEmit=(e,...t)=>(n,i)=>{s(i().appRegistry.globalAppRegistry,e,...t)}},2779:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var o=r.apply(null,n);o&&e.push(o)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var a in n)i.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},1176:(e,t,n)=>{var i=n(5052);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},9540:(e,t,n)=>{var i=n(905),r=n(4237),s=n(3231),o=function(e){return function(t,n,o){var a,u=i(t),l=r(u.length),c=s(o,l);if(e&&n!=n){for(;l>c;)if((a=u[c++])!=a)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},7079:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},7081:(e,t,n)=>{var i=n(816),r=n(4826),s=n(7933),o=n(1787);e.exports=function(e,t){for(var n=r(t),a=o.f,u=s.f,l=0;l<n.length;l++){var c=n[l];i(e,c)||a(e,c,u(t,c))}}},5762:(e,t,n)=>{var i=n(7400),r=n(1787),s=n(5358);e.exports=i?function(e,t,n){return r.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},5358:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7400:(e,t,n)=>{var i=n(4229);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:(e,t,n)=>{var i=n(9859),r=n(5052),s=i.document,o=r(s)&&r(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},598:(e,t,n)=>{var i=n(1333);e.exports=i("navigator","userAgent")||""},6358:(e,t,n)=>{var i,r,s=n(9859),o=n(598),a=s.process,u=s.Deno,l=a&&a.versions||u&&u.version,c=l&&l.v8;c?r=(i=c.split("."))[0]<4?1:i[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},3837:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:(e,t,n)=>{var i=n(9859),r=n(7933).f,s=n(5762),o=n(7487),a=n(2079),u=n(7081),l=n(6541);e.exports=function(e,t){var n,c,p,h,d,f=e.target,m=e.global,g=e.stat;if(n=m?i:g?i[f]||a(f,{}):(i[f]||{}).prototype)for(c in t){if(h=t[c],p=e.noTargetGet?(d=r(n,c))&&d.value:n[c],!l(m?c:f+(g?".":"#")+c,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;u(h,p)}(e.sham||p&&p.sham)&&s(h,"sham",!0),o(n,c,h,e)}}},4229:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},1333:(e,t,n)=>{var i=n(9859),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(i[e]):i[e]&&i[e][t]}},9859:(e,t,n)=>{var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},816:(e,t,n)=>{var i=n(2991),r={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return r.call(i(e),t)}},5977:e=>{e.exports={}},4394:(e,t,n)=>{var i=n(7400),r=n(4229),s=n(2635);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},9337:(e,t,n)=>{var i=n(4229),r=n(7079),s="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?s.call(e,""):Object(e)}:Object},8511:(e,t,n)=>{var i=n(5353),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},6407:(e,t,n)=>{var i,r,s,o=n(8694),a=n(9859),u=n(5052),l=n(5762),c=n(816),p=n(5353),h=n(4399),d=n(5977),f="Object already initialized",m=a.WeakMap;if(o||p.state){var g=p.state||(p.state=new m),v=g.get,y=g.has,b=g.set;i=function(e,t){if(y.call(g,e))throw new TypeError(f);return t.facade=e,b.call(g,e,t),t},r=function(e){return v.call(g,e)||{}},s=function(e){return y.call(g,e)}}else{var x=h("state");d[x]=!0,i=function(e,t){if(c(e,x))throw new TypeError(f);return t.facade=e,l(e,x,t),t},r=function(e){return c(e,x)?e[x]:{}},s=function(e){return c(e,x)}}e.exports={set:i,get:r,has:s,enforce:function(e){return s(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},6541:(e,t,n)=>{var i=n(4229),r=/#|\.prototype\./,s=function(e,t){var n=a[o(e)];return n==l||n!=u&&("function"==typeof t?i(t):!!t)},o=s.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},5052:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},4231:e=>{e.exports=!1},9395:(e,t,n)=>{var i=n(1333),r=n(6969);e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return"function"==typeof t&&Object(e)instanceof t}},3839:(e,t,n)=>{var i=n(6358),r=n(4229);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},8694:(e,t,n)=>{var i=n(9859),r=n(8511),s=i.WeakMap;e.exports="function"==typeof s&&/native code/.test(r(s))},1787:(e,t,n)=>{var i=n(7400),r=n(4394),s=n(1176),o=n(9310),a=Object.defineProperty;t.f=i?a:function(e,t,n){if(s(e),t=o(t),s(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7933:(e,t,n)=>{var i=n(7400),r=n(9195),s=n(5358),o=n(905),a=n(9310),u=n(816),l=n(4394),c=Object.getOwnPropertyDescriptor;t.f=i?c:function(e,t){if(e=o(e),t=a(t),l)try{return c(e,t)}catch(e){}if(u(e,t))return s(!r.f.call(e,t),e[t])}},8151:(e,t,n)=>{var i=n(140),r=n(3837).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},894:(e,t)=>{t.f=Object.getOwnPropertySymbols},140:(e,t,n)=>{var i=n(816),r=n(905),s=n(9540).indexOf,o=n(5977);e.exports=function(e,t){var n,a=r(e),u=0,l=[];for(n in a)!i(o,n)&&i(a,n)&&l.push(n);for(;t.length>u;)i(a,n=t[u++])&&(~s(l,n)||l.push(n));return l}},9195:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},2914:(e,t,n)=>{var i=n(5052);e.exports=function(e,t){var n,r;if("string"===t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if("string"!==t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},4826:(e,t,n)=>{var i=n(1333),r=n(8151),s=n(894),o=n(1176);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(o(e)),n=s.f;return n?t.concat(n(e)):t}},7487:(e,t,n)=>{var i=n(9859),r=n(5762),s=n(816),o=n(2079),a=n(8511),u=n(6407),l=u.get,c=u.enforce,p=String(String).split("String");(e.exports=function(e,t,n,a){var u,l=!!a&&!!a.unsafe,h=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof t||s(n,"name")||r(n,"name",t),(u=c(n)).source||(u.source=p.join("string"==typeof t?t:""))),e!==i?(l?!d&&e[t]&&(h=!0):delete e[t],h?e[t]=n:r(e,t,n)):h?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},8885:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},2079:(e,t,n)=>{var i=n(9859);e.exports=function(e,t){try{Object.defineProperty(i,e,{value:t,configurable:!0,writable:!0})}catch(n){i[e]=t}return t}},4399:(e,t,n)=>{var i=n(3036),r=n(1441),s=i("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},5353:(e,t,n)=>{var i=n(9859),r=n(2079),s="__core-js_shared__",o=i[s]||r(s,{});e.exports=o},3036:(e,t,n)=>{var i=n(4231),r=n(5353);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:i?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},966:(e,t,n)=>{var i=n(6051),r=n(3326),s=n(8885),o=function(e){return function(t,n){var o,a,u=r(s(t)),l=i(n),c=u.length;return l<0||l>=c?e?"":void 0:(o=u.charCodeAt(l))<55296||o>56319||l+1===c||(a=u.charCodeAt(l+1))<56320||a>57343?e?u.charAt(l):o:e?u.slice(l,l+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},3231:(e,t,n)=>{var i=n(6051),r=Math.max,s=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):s(n,t)}},905:(e,t,n)=>{var i=n(9337),r=n(8885);e.exports=function(e){return i(r(e))}},6051:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},4237:(e,t,n)=>{var i=n(6051),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},2991:(e,t,n)=>{var i=n(8885);e.exports=function(e){return Object(i(e))}},2066:(e,t,n)=>{var i=n(5052),r=n(9395),s=n(2914),o=n(95)("toPrimitive");e.exports=function(e,t){if(!i(e)||r(e))return e;var n,a=e[o];if(void 0!==a){if(void 0===t&&(t="default"),n=a.call(e,t),!i(n)||r(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},9310:(e,t,n)=>{var i=n(2066),r=n(9395);e.exports=function(e){var t=i(e,"string");return r(t)?t:String(t)}},3326:(e,t,n)=>{var i=n(9395);e.exports=function(e){if(i(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},1441:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},6969:(e,t,n)=>{var i=n(3839);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},95:(e,t,n)=>{var i=n(9859),r=n(3036),s=n(816),o=n(1441),a=n(3839),u=n(6969),l=r("wks"),c=i.Symbol,p=u?c:c&&c.withoutSetter||o;e.exports=function(e){return s(l,e)&&(a||"string"==typeof l[e])||(a&&s(c,e)?l[e]=c[e]:l[e]=p("Symbol."+e)),l[e]}},8423:(e,t,n)=>{"use strict";var i=n(3103),r=n(966).charAt;i({target:"String",proto:!0,forced:n(4229)((function(){return"𠮷"!=="𠮷".at(0)}))},{at:function(e){return r(this,e)}})},9867:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".add-stage-module-add-stage-container__L3KcT {\n margin: 0px;\n padding-bottom: 15px;\n position: relative;\n}\n.add-stage-module-add-stage-container__L3KcT:after {\n position: absolute;\n left: 6px;\n top: 2px;\n content: '';\n width: 10px;\n height: 10px;\n border-radius: 50%;\n border: 5px solid #dee0e3;\n}\n.add-stage-module-add-stage-container__L3KcT .add-stage-module-add-stage__3hDT6 {\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n position: relative;\n margin: 0px 20px 0px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n width: 370px;\n}\n.add-stage-module-add-stage-container__L3KcT .add-stage-module-add-stage__3hDT6 button {\n margin: 10px 0px 10px 0px;\n}\n",""]),r.locals={"add-stage-container":"add-stage-module-add-stage-container__L3KcT","add-stage":"add-stage-module-add-stage__3hDT6"};const s=r},8817:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".aggregations-module-aggregations__12xcN {\n display: flex;\n align-items: flex-start;\n background-color: #f5f6f7;\n position: relative;\n width: 100%;\n z-index: 0;\n height: 100%;\n}\n",""]),r.locals={aggregations:"aggregations-module-aggregations__12xcN"};const s=r},8608:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-builder-toolbar-module-input-builder-toolbar__1H2sc {\n width: 350px;\n margin: 0px 15px 0px 18px;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n position: relative;\n height: 30px;\n align-items: center;\n}\n",""]),r.locals={"input-builder-toolbar":"input-builder-toolbar-module-input-builder-toolbar__1H2sc"};const s=r},8056:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-builder-module-input-builder__KDDTC {\n flex-grow: 1;\n position: relative;\n margin: 15px 18px 15px 18px;\n padding: 10px 0px 10px 0px;\n min-height: 54px;\n text-align: center;\n}\n",""]),r.locals={"input-builder":"input-builder-module-input-builder__KDDTC"};const s=r},1849:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-collapser-module-input-collapser__2CIHy {\n position: relative;\n}\n.input-collapser-module-input-collapser__2CIHy button {\n width: 30px;\n}\n",""]),r.locals={"input-collapser":"input-collapser-module-input-collapser__2CIHy"};const s=r},9865:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-documents-count-module-input-documents-count__2sCxl {\n height: 30px;\n display: flex;\n align-items: center;\n flex-grow: 4;\n}\n.input-documents-count-module-input-documents-count-db__2xqQF {\n font-size: 12px;\n padding-left: 10px;\n color: #494747;\n}\n.input-documents-count-module-input-documents-count-label__Q3Y3L {\n font-size: 12px;\n padding-left: 5px;\n color: #494747;\n}\n",""]),r.locals={"input-documents-count":"input-documents-count-module-input-documents-count__2sCxl","input-documents-count-db":"input-documents-count-module-input-documents-count-db__2xqQF","input-documents-count-label":"input-documents-count-module-input-documents-count-label__Q3Y3L"};const s=r},4145:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-preview-toolbar-module-input-preview-toolbar__34ttN {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n border-left: 1px solid #dee0e3;\n}\n.input-preview-toolbar-module-input-preview-toolbar-text__3gBhM {\n font-size: 12px;\n padding-left: 10px;\n color: #494747;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n",""]),r.locals={"input-preview-toolbar":"input-preview-toolbar-module-input-preview-toolbar__34ttN","input-preview-toolbar-text":"input-preview-toolbar-module-input-preview-toolbar-text__3gBhM"};const s=r},969:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-preview-module-input-preview__2di5A {\n display: flex;\n align-items: center;\n overflow: auto;\n flex-grow: 1;\n width: 100%;\n position: relative;\n}\n.input-preview-module-input-preview-documents__1878X {\n display: flex;\n align-items: flex-start;\n overflow-x: scroll;\n margin: 10px;\n padding: 10px;\n}\n.input-preview-module-input-preview-document-card__ZvCA5 {\n flex: none;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);\n width: 350px;\n height: 150px;\n overflow: scroll;\n}\n.input-preview-module-input-preview-document-card__ZvCA5:not(:first-child) {\n margin-left: 20px;\n}\n.input-preview-module-input-preview-document-card__ZvCA5::-webkit-scrollbar {\n display: none;\n}\n.input-preview-module-input-preview__2di5A::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"input-preview":"input-preview-module-input-preview__2di5A","input-preview-documents":"input-preview-module-input-preview-documents__1878X","input-preview-document-card":"input-preview-module-input-preview-document-card__ZvCA5"};const s=r},8910:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-refresh-module-input-refresh__1jTIT {\n flex-grow: 0;\n}\n",""]),r.locals={"input-refresh":"input-refresh-module-input-refresh__1jTIT"};const s=r},6102:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-toolbar-module-input-toolbar__32jT7 {\n border-bottom: 1px solid #dee0e3;\n display: flex;\n align-items: center;\n position: relative;\n height: 40px;\n width: 100%;\n}\n",""]),r.locals={"input-toolbar":"input-toolbar-module-input-toolbar__32jT7"};const s=r},3279:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-workspace-module-input-workspace__1ivct {\n display: flex;\n align-items: center;\n}\n",""]),r.locals={"input-workspace":"input-workspace-module-input-workspace__1ivct"};const s=r},6546:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".input-module-input__2mTmO {\n position: relative;\n margin: 18px;\n margin-left: 20px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n}\n",""]),r.locals={input:"input-module-input__2mTmO"};const s=r},8827:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".collation-collapser-module-collation-collapser__2fVom {\n position: relative;\n margin-right: 3px;\n}\n.collation-collapser-module-collation-collapser__2fVom button {\n white-space: nowrap;\n}\n",""]),r.locals={"collation-collapser":"collation-collapser-module-collation-collapser__2fVom"};const s=r},7031:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".overview-toggler-module-overview-toggler__253em {\n position: relative;\n margin-right: 3px;\n}\n.overview-toggler-module-overview-toggler__253em button {\n width: 30px;\n}\n",""]),r.locals={"overview-toggler":"overview-toggler-module-overview-toggler__253em"};const s=r},4617:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".pipeline-builder-toolbar-module-pipeline-builder-toolbar__oXcex {\n align-items: center;\n display: flex;\n flex-shrink: 0;\n height: 34px;\n padding: 0px 10px 0px 15px;\n flex-grow: 1;\n z-index: 100;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar__oXcex .dropdown {\n margin-left: 3px;\n padding-right: 6px;\n height: 22px;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar__oXcex .dropdown i {\n top: 1px;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar__oXcex .dropdown-toggle {\n height: 22px;\n padding: 0 7px 0px 5px;\n font-size: 11px;\n border-radius: 0px 3px 3px 0px;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar__oXcex .dropdown-menu {\n font-size: 12px;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-update-view__32VEf {\n margin-right: 5px;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-add-wrapper__3OJjU {\n margin: 0px 3px 0px 3px;\n margin-right: 3px;\n background-color: rgba(70, 76, 79, 0.1);\n display: flex;\n border-radius: 3px;\n font-size: 12px;\n padding: 2px 6px 2px 6px;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-name__2yDjz {\n font-size: 12px;\n font-weight: bold;\n white-space: nowrap;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-open-saved-pipelines-button__L6l0H {\n margin-right: 3px;\n white-space: nowrap;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-new-button__3Mf5F {\n white-space: nowrap;\n border-radius: 3px 0px 0px 3px;\n border-right: 0;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-new-button__3Mf5F:hover {\n border-right: 0;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-save-pipeline-button__3YzN8 {\n white-space: nowrap;\n border-radius: 3px 0px 0px 3px;\n border-right: 0;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-save-pipeline-button__3YzN8:hover + button {\n border-left: 0;\n}\n.pipeline-builder-toolbar-module-pipeline-builder-toolbar-export-to-language__1TZRT {\n display: flex;\n}\n.pipeline-builder-toolbar-module-is-modified__2nfaK {\n padding-top: 1px;\n font-style: italic;\n}\n.pipeline-builder-toolbar-module-export-icon__vOPzJ {\n height: 12px;\n width: 12px;\n display: block;\n background-image: url(\"data:image/svg+xml,%3Csvg width='12px' height='12px' viewBox='0 0 12 12' version='1.1' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='Symbols' stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'%3E%3Cg id='Icons-/-Export' transform='translate(-4.000000, -3.000000)' fill='%23494747'%3E%3Cg id='Icon' transform='translate(4.000000, 3.500000)'%3E%3Cpath d='M6.2777,0 L8.8,2.5223 C8.8,3.2415132 8.8,3.78074648 8.8,4.13999987 C8.8,4.3593827 8.8,5.03623299 8.8,5.7224982 C8.8,6.35273364 8.8,6.99090941 8.8,7.28999996 C8.8,7.80644 8.8,8.67644001 8.8,9.9 C8.8,10.5072 8.3072,11 7.7,11 L1.1,11 C0.49335,11 0,10.5072 0,9.9 L0,1.1 C0,0.4939 0.49335,0 1.1,0 L6.2777,0 Z M7.70005545,4 C7.70003697,3.77478974 7.70001848,3.54145641 7.7,3.3 L5.5,3.3 L5.5,1.1 L1.1,1.1 L1.1,9.9 L7.70055,9.9 L7.70035031,7.5 L8.79999983,7.5 L8.79999983,4 L7.70005491,4 Z M7.70005545,4 C7.70005931,4.04702072 7.70006317,4.09368734 7.70006703,4.13999987 C7.70009571,4.48417772 7.70014216,5.03201886 7.70019082,5.60623096 C7.70024165,6.20608089 7.7002949,6.83470922 7.70033284,7.28999996 L7.70035031,7.5 L7.69999981,4 Z' id='File' /%3E%3Cg id='Arrow' transform='translate(4.000000, 3.000000)'%3E%3Crect id='Rectangle' x='0.5' y='2.25' width='6' height='1' /%3E%3Cpolygon id='Triangle' transform='translate(7.000000, 2.750000) rotate(-270.000000) translate(-7.000000, -2.750000)' points='7 1.875 9 3.625 5 3.625' /%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");\n}\n",""]),r.locals={"pipeline-builder-toolbar":"pipeline-builder-toolbar-module-pipeline-builder-toolbar__oXcex","pipeline-builder-toolbar-update-view":"pipeline-builder-toolbar-module-pipeline-builder-toolbar-update-view__32VEf","pipeline-builder-toolbar-add-wrapper":"pipeline-builder-toolbar-module-pipeline-builder-toolbar-add-wrapper__3OJjU","pipeline-builder-toolbar-name":"pipeline-builder-toolbar-module-pipeline-builder-toolbar-name__2yDjz","pipeline-builder-toolbar-open-saved-pipelines-button":"pipeline-builder-toolbar-module-pipeline-builder-toolbar-open-saved-pipelines-button__L6l0H","pipeline-builder-toolbar-new-button":"pipeline-builder-toolbar-module-pipeline-builder-toolbar-new-button__3Mf5F","pipeline-builder-toolbar-save-pipeline-button":"pipeline-builder-toolbar-module-pipeline-builder-toolbar-save-pipeline-button__3YzN8","pipeline-builder-toolbar-export-to-language":"pipeline-builder-toolbar-module-pipeline-builder-toolbar-export-to-language__1TZRT","is-modified":"pipeline-builder-toolbar-module-is-modified__2nfaK","export-icon":"pipeline-builder-toolbar-module-export-icon__vOPzJ"};const s=r},7449:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,"/**\n * Mixins\n */\n.pipeline-preview-toolbar-module-container-right__1z6gl {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n box-shadow: 2px 0px #ebebed;\n height: 33px;\n padding-right: 15px;\n}\n.pipeline-preview-toolbar-module-toggle-sample__3rJ-k,\n.pipeline-preview-toolbar-module-toggle-auto-preview__3AXmf {\n margin-left: 15px;\n display: flex;\n}\n.pipeline-preview-toolbar-module-toggle-sample__3rJ-k label,\n.pipeline-preview-toolbar-module-toggle-auto-preview__3AXmf label {\n margin: auto 0;\n margin-left: 5px;\n}\n.pipeline-preview-toolbar-module-toggle__24mzf {\n height: 14px;\n width: 26px;\n margin: auto 0;\n}\n.pipeline-preview-toolbar-module-toggle-sample-label__1Q11v,\n.pipeline-preview-toolbar-module-toggle-auto-preview-label__1_7oc {\n display: flex;\n white-space: nowrap;\n font-size: 12px;\n text-transform: uppercase;\n color: #807f7f;\n font-weight: bold;\n}\n.pipeline-preview-toolbar-module-settings__1kWxH {\n margin-left: 15px;\n display: flex;\n}\n.pipeline-preview-toolbar-module-fullscreen__3ms6P {\n margin-left: 15px;\n display: flex;\n margin-left: 5px;\n}\n.pipeline-preview-toolbar-module-is-modified__18dkX {\n margin-left: 15px;\n display: flex;\n}\n.pipeline-preview-toolbar-module-is-modified__18dkX i {\n color: #13AA52;\n}\n.pipeline-preview-toolbar-module-is-modified-on__2aYV4 i {\n color: #fbb129;\n}\n.pipeline-preview-toolbar-module-is-modified-on__2aYV4 span {\n padding-right: 5px;\n color: #fbb129;\n font-size: 13px;\n}\n",""]),r.locals={"container-right":"pipeline-preview-toolbar-module-container-right__1z6gl","toggle-sample":"pipeline-preview-toolbar-module-toggle-sample__3rJ-k","toggle-auto-preview":"pipeline-preview-toolbar-module-toggle-auto-preview__3AXmf",toggle:"pipeline-preview-toolbar-module-toggle__24mzf","toggle-sample-label":"pipeline-preview-toolbar-module-toggle-sample-label__1Q11v","toggle-auto-preview-label":"pipeline-preview-toolbar-module-toggle-auto-preview-label__1_7oc",settings:"pipeline-preview-toolbar-module-settings__1kWxH",fullscreen:"pipeline-preview-toolbar-module-fullscreen__3ms6P","is-modified":"pipeline-preview-toolbar-module-is-modified__18dkX","is-modified-on":"pipeline-preview-toolbar-module-is-modified-on__2aYV4"};const s=r},8826:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".pipeline-toolbar-module-pipeline-toolbar__2eSZz {\n display: flex;\n width: 100%;\n flex-shrink: 0;\n height: 33px;\n}\n.pipeline-toolbar-module-pipeline-toolbar-border__2u5Qi {\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);\n}\n",""]),r.locals={"pipeline-toolbar":"pipeline-toolbar-module-pipeline-toolbar__2eSZz","pipeline-toolbar-border":"pipeline-toolbar-module-pipeline-toolbar-border__2u5Qi"};const s=r},7130:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".loading-overlay-module-loading-overlay__3jA58 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background-color: rgba(0, 0, 0, 0.08);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.loading-overlay-module-loading-overlay-box__1EYpR {\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 300px;\n height: 50px;\n background-color: #FFFFFF;\n}\n.loading-overlay-module-loading-overlay-box-text__1RHOh {\n font-size: 16px;\n margin-left: 5px;\n}\n.loading-overlay-module-loading-overlay-box__1EYpR i {\n font-size: 20px;\n color: #168B46;\n}\n",""]),r.locals={"loading-overlay":"loading-overlay-module-loading-overlay__3jA58","loading-overlay-box":"loading-overlay-module-loading-overlay-box__1EYpR","loading-overlay-box-text":"loading-overlay-module-loading-overlay-box-text__1RHOh"};const s=r},1266:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".modify-source-banner-module-modify-source-banner__zkRAk {\n text-align: center;\n margin: 5px auto;\n margin-top: 20px;\n z-index: 500;\n}\n",""]),r.locals={"modify-source-banner":"modify-source-banner-module-modify-source-banner__zkRAk"};const s=r},3421:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".custom-drag-layer-module-custom-drag-layer__1KLrK {\n position: fixed;\n pointer-events: none;\n z-index: 500;\n left: 5px;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.custom-drag-layer-module-custom-drag-layer-container__285JI {\n border-radius: 5px;\n background-color: rgba(13, 50, 79, 0.6);\n color: #C5E4F2;\n width: calc(80% - 260px);\n height: 180px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-style: italic;\n font-size: 24px;\n font-weight: bold;\n}\n",""]),r.locals={"custom-drag-layer":"custom-drag-layer-module-custom-drag-layer__1KLrK","custom-drag-layer-container":"custom-drag-layer-module-custom-drag-layer-container__285JI"};const s=r},310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".pipeline-builder-workspace-module-pipeline-workspace-container__2j1ec {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.pipeline-builder-workspace-module-pipeline-workspace__2aYaj {\n display: flex;\n flex-direction: column;\n overflow-y: scroll;\n width: 100%;\n flex-grow: 1;\n}\n.pipeline-builder-workspace-module-pipeline-workspace-container-container__1y8gu {\n flex-grow: 1;\n width: 100%;\n position: relative;\n overflow-y: scroll;\n}\n",""]),r.locals={"pipeline-workspace-container":"pipeline-builder-workspace-module-pipeline-workspace-container__2j1ec","pipeline-workspace":"pipeline-builder-workspace-module-pipeline-workspace__2aYaj","pipeline-workspace-container-container":"pipeline-builder-workspace-module-pipeline-workspace-container-container__1y8gu"};const s=r},9430:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.collation-toolbar-module-collation-toolbar__31baA {\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);\n display: flex;\n width: 100%;\n flex-shrink: 0;\n height: 43px;\n align-items: center;\n padding: 0px 10px 0px 15px;\n}\n.collation-toolbar-module-collation-toolbar-in-new-toolbar__1MHu_ {\n padding: 0;\n box-shadow: none;\n border: none;\n}\n.collation-toolbar-module-collation-toolbar-input-wrapper__3Y4Kq {\n width: 100%;\n height: 30px;\n position: relative;\n display: flex;\n border-radius: 14px;\n border: 1px #bfbfbe solid;\n background: #fff;\n overflow: hidden;\n padding: 4px;\n margin-right: 5px;\n}\n.collation-toolbar-module-collation-toolbar-input-wrapper__3Y4Kq .collation-toolbar-module-collation-toolbar-input-label__qPzXB {\n background: #bfbfbe;\n color: #fff;\n white-space: nowrap;\n border-radius: 14px;\n padding: 2px 1px;\n margin-right: 5px;\n text-transform: uppercase;\n font-weight: bold;\n font-family: "Akzidenz", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 11px;\n flex-grow: 0;\n width: 117px;\n}\n.collation-toolbar-module-collation-toolbar-input-wrapper__3Y4Kq .collation-toolbar-module-collation-toolbar-input-label__qPzXB i {\n margin-right: 3px;\n}\n.collation-toolbar-module-collation-toolbar-input-wrapper__3Y4Kq .collation-toolbar-module-has-error__1DJu7 {\n background: #ef4c4c;\n}\n.collation-toolbar-module-collation-toolbar-input-wrapper__3Y4Kq input {\n border: 0;\n width: 100%;\n}\n.collation-toolbar-module-collation-toolbar-input-wrapper__3Y4Kq input:focus {\n outline-width: 0;\n}\n.collation-toolbar-module-has-focus__3yMBL {\n border-color: #43b1e5;\n}\n',""]),r.locals={"collation-toolbar":"collation-toolbar-module-collation-toolbar__31baA","collation-toolbar-in-new-toolbar":"collation-toolbar-module-collation-toolbar-in-new-toolbar__1MHu_","collation-toolbar-input-wrapper":"collation-toolbar-module-collation-toolbar-input-wrapper__3Y4Kq","collation-toolbar-input-label":"collation-toolbar-module-collation-toolbar-input-label__qPzXB","has-error":"collation-toolbar-module-has-error__1DJu7","has-focus":"collation-toolbar-module-has-focus__3yMBL"};const s=r},1570:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".confirm-import-pipeline-module-confirm-import-pipeline-note__3qDU3 {\n padding: 0px;\n}\n",""]),r.locals={"confirm-import-pipeline-note":"confirm-import-pipeline-module-confirm-import-pipeline-note__3qDU3"};const s=r},3777:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".confirm-new-pipeline-module-confirm-new-pipeline-note__2n2EL {\n padding: 0px;\n}\n",""]),r.locals={"confirm-new-pipeline-note":"confirm-new-pipeline-module-confirm-new-pipeline-note__2n2EL"};const s=r},5287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".import-pipeline-module-import-pipeline-note__vDPrD {\n color: steelblue;\n background-color: #B0E0E6;\n border-radius: 5px;\n padding: 10px;\n margin-bottom: 10px;\n}\n.import-pipeline-module-import-pipeline-editor__2L-TC {\n flex-shrink: 0;\n position: relative;\n padding: 10px 0px 10px 0px;\n overflow: scroll;\n background: #f5f6f7;\n border-left: 2px solid #E4E4E4;\n min-height: 180px;\n max-height: 300px;\n}\n.import-pipeline-module-import-pipeline-error__92RZw {\n flex-shrink: 0;\n position: relative;\n margin: 10px 0px;\n padding: 10px;\n border-radius: 3px;\n overflow: auto;\n background: #ff473a;\n max-height: 100px;\n color: #f5f6f7;\n font-size: x-small;\n font-weight: bold;\n}\n",""]),r.locals={"import-pipeline-note":"import-pipeline-module-import-pipeline-note__vDPrD","import-pipeline-editor":"import-pipeline-module-import-pipeline-editor__2L-TC","import-pipeline-error":"import-pipeline-module-import-pipeline-error__92RZw"};const s=r},4686:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".pipeline-module-pipeline__1nWUF {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 0;\n position: relative;\n}\n.pipeline-module-pipeline-fullscreen__2QlA5 {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n}\n",""]),r.locals={pipeline:"pipeline-module-pipeline__1nWUF","pipeline-fullscreen":"pipeline-module-pipeline-fullscreen__2QlA5"};const s=r},6667:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".resize-handle-module-resize-handle__1rugm {\n position: absolute;\n background: #dee0e3;\n width: 1.1px;\n height: 100%;\n}\n",""]),r.locals={"resize-handle":"resize-handle-module-resize-handle__1rugm"};const s=r},1101:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".delete-pipeline-button-module-delete-pipeline__Ch_2o {\n margin: 0px 10px 0px 0px;\n flex-grow: 0;\n visibility: hidden;\n}\n",""]),r.locals={"delete-pipeline":"delete-pipeline-button-module-delete-pipeline__Ch_2o"};const s=r},3981:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".restore-pipeline-button-module-restore-pipeline__NGnMs {\n margin-right: 2px;\n flex-grow: 0;\n visibility: hidden;\n}\n",""]),r.locals={"restore-pipeline":"restore-pipeline-button-module-restore-pipeline__NGnMs"};const s=r},2099:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".save-pipeline-card-module-save-pipeline-card__2EPNA {\n border: 1px solid #dee0e3;\n box-shadow: 0 0 3px #dee0e3;\n margin: 10px;\n display: flex;\n align-items: center;\n background: #fff;\n}\n.save-pipeline-card-module-save-pipeline-card__2EPNA:hover button {\n visibility: visible;\n}\n.save-pipeline-card-module-save-pipeline-card-title__272aN {\n font-size: 12px;\n padding: 8px;\n line-height: 20px;\n font-weight: bold;\n flex-grow: 5;\n color: #494747;\n overflow-wrap: break-word;\n overflow: auto;\n}\n",""]),r.locals={"save-pipeline-card":"save-pipeline-card-module-save-pipeline-card__2EPNA","save-pipeline-card-title":"save-pipeline-card-module-save-pipeline-card-title__272aN"};const s=r},9593:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".save-pipeline-module-save-pipeline__1r5sb {\n border-right: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #f8f8f8;\n position: absolute;\n width: 400px;\n height: 100%;\n top: 0;\n left: -401px;\n transition: left 0.2s ease-in-out;\n font-size: 1em;\n z-index: 500;\n}\n.save-pipeline-module-save-pipeline-is-visible__3bNUE {\n left: 0px;\n transition: left 0.2s ease-in-out;\n}\n.save-pipeline-module-save-pipeline-header__1G3Ck {\n height: 34px;\n display: flex;\n padding: 10px;\n font-size: 12px;\n line-height: 20px;\n font-weight: bold;\n color: #494747;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n}\n.save-pipeline-module-save-pipeline-cards__2__gs {\n overflow-y: scroll;\n}\n.save-pipeline-module-save-pipeline-close__2mTMD {\n cursor: pointer;\n}\n.save-pipeline-module-save-pipeline-cards__2__gs::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"save-pipeline":"save-pipeline-module-save-pipeline__1r5sb","save-pipeline-is-visible":"save-pipeline-module-save-pipeline-is-visible__3bNUE","save-pipeline-header":"save-pipeline-module-save-pipeline-header__1G3Ck","save-pipeline-cards":"save-pipeline-module-save-pipeline-cards__2__gs","save-pipeline-close":"save-pipeline-module-save-pipeline-close__2mTMD"};const s=r},6252:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.settings-module-container__3sWua {\n border-left: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #f8f8f8;\n position: absolute;\n width: 580px;\n height: 100%;\n top: 0;\n right: 0px;\n transition: right 0.2s ease-in-out;\n font-size: 1em;\n z-index: 500;\n}\n.settings-module-header__1rot3 {\n height: 32px;\n display: flex;\n padding: 5px;\n font-size: 12px;\n line-height: 20px;\n font-weight: bold;\n color: #494747;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #dee0e3;\n box-shadow: 1px 1px 1px #dee0e3;\n}\n.settings-module-header-title__xCvBM {\n color: #424242;\n font-size: 12px;\n font-weight: bold;\n flex-grow: 2;\n}\n.settings-module-header-btn-group__1NySd {\n display: inline-block;\n}\n.settings-module-header-btn-group__1NySd button {\n margin-right: 5px;\n}\n.settings-module-header-btn-group__1NySd:last-child {\n margin-right: 0px;\n}\n.settings-module-input-group__3OjXF {\n margin: 8px;\n padding: 8px 16px;\n background-color: #FFFFFF;\n display: flex;\n align-items: center;\n}\n.settings-module-input-control__3kNAF {\n min-width: 90px;\n}\n.settings-module-input-control__3kNAF input {\n border-radius: 3px;\n border-color: #BFBFBE;\n border-style: solid;\n border-width: 1px;\n padding: 1px;\n text-align: right;\n float: right;\n}\n.settings-module-input-control__3kNAF input[type="text"],\n.settings-module-input-control__3kNAF input[type="number"] {\n width: 70px;\n color: #464C4F;\n}\n.settings-module-input-control__3kNAF input[type="text"]::placeholder,\n.settings-module-input-control__3kNAF input[type="number"]::placeholder {\n font-size: 13px;\n color: #AAAAAA;\n}\n.settings-module-input-meta__2H8QK {\n flex-grow: 1;\n}\n.settings-module-input-meta__2H8QK p {\n margin-top: 8px;\n}\n',""]),r.locals={container:"settings-module-container__3sWua",header:"settings-module-header__1rot3","header-title":"settings-module-header-title__xCvBM","header-btn-group":"settings-module-header-btn-group__1NySd","input-group":"settings-module-input-group__3OjXF","input-control":"settings-module-input-control__3kNAF","input-meta":"settings-module-input-meta__2H8QK"};const s=r},2884:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".add-after-stage-module-add-after-stage__1xZf9 {\n display: flex;\n justify-content: flex-end;\n}\n.add-after-stage-module-add-after-stage__1xZf9 button {\n width: 30px;\n margin-right: 6px;\n}\n",""]),r.locals={"add-after-stage":"add-after-stage-module-add-after-stage__1xZf9"};const s=r},9262:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".delete-stage-module-delete-stage__3PyCJ {\n margin-right: 6px;\n}\n.delete-stage-module-delete-stage__3PyCJ button {\n width: 30px;\n}\n",""]),r.locals={"delete-stage":"delete-stage-module-delete-stage__3PyCJ"};const s=r},173:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".select-option-with-tooltip-module-tooltip__3SVxp {\n max-width: 340px !important;\n}\n.select-option-with-tooltip-module-option__K2UZL {\n display: flex;\n align-items: center;\n}\n.select-option-with-tooltip-module-optionIcon__os9Dz {\n margin-left: auto;\n}\n",""]),r.locals={tooltip:"select-option-with-tooltip-module-tooltip__3SVxp",option:"select-option-with-tooltip-module-option__K2UZL",optionIcon:"select-option-with-tooltip-module-optionIcon__os9Dz"};const s=r},1103:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-collapser-module-stage-collapser__3xs2F {\n position: relative;\n}\n.stage-collapser-module-stage-collapser__3xs2F button {\n width: 30px;\n}\n",""]),r.locals={"stage-collapser":"stage-collapser-module-stage-collapser__3xs2F"};const s=r},2891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK {\n width: 100%;\n border-bottom: 1px solid #dee0e3;\n border-radius: 4px 4px 0 0;\n padding: 10px 0;\n padding-right: 10px;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n height: 30px;\n cursor: move;\n cursor: grab;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK:active {\n cursor: grabbing;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar-right__3NPrk {\n display: flex;\n justify-content: flex-end;\n flex-grow: 4;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar-errored__siGjE {\n background: #FCEBE2;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK i.info-sprinkle {\n display: inline-block;\n font: normal normal normal 14px/1 FontAwesome;\n font-size: inherit;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n margin: 0 5px;\n cursor: pointer;\n color: #bfbfbe;\n}\n.stage-editor-toolbar-module-stage-editor-toolbar__2cwCK i.info-sprinkle:before {\n content: "\\f05a";\n}\n',""]),r.locals={"stage-editor-toolbar":"stage-editor-toolbar-module-stage-editor-toolbar__2cwCK","stage-editor-toolbar-right":"stage-editor-toolbar-module-stage-editor-toolbar-right__3NPrk","stage-editor-toolbar-errored":"stage-editor-toolbar-module-stage-editor-toolbar-errored__siGjE"};const s=r},5884:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-grabber-module-stage-grabber__1-8cr {\n color: #dee0e3;\n margin: 3px 2px 0px 4px;\n position: relative;\n}\n",""]),r.locals={"stage-grabber":"stage-grabber-module-stage-grabber__1-8cr"};const s=r},6125:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-operator-select-module-stage-operator-select__1eiQN {\n position: relative;\n width: 120px;\n height: 22px;\n margin: 0px 0px 0px 5px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK {\n position: relative;\n font-size: 12px !important;\n cursor: pointer;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-control {\n height: 22px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-placeholder {\n line-height: 25px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-input {\n height: 18px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-arrow-zone {\n height: 22px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-arrow {\n margin-top: 8px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-value {\n line-height: 22px !important;\n font-weight: bold;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-menu {\n height: 200px;\n}\n.stage-operator-select-module-stage-operator-select-control__LjhSK .Select-menu-outer {\n z-index: 2000 !important;\n}\n",""]),r.locals={"stage-operator-select":"stage-operator-select-module-stage-operator-select__1eiQN","stage-operator-select-control":"stage-operator-select-module-stage-operator-select-control__LjhSK"};const s=r},2347:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".toggle-stage-module-toggle-stage__2JZ-6 {\n margin: 0px 0px 0px 5px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.toggle-stage-module-toggle-stage-button__1ILJ7 {\n height: 22px;\n width: 40px;\n}\n",""]),r.locals={"toggle-stage":"toggle-stage-module-toggle-stage__2JZ-6","toggle-stage-button":"toggle-stage-module-toggle-stage-button__1ILJ7"};const s=r},8915:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-editor-module-stage-editor-container__1XwN_ {\n position: relative;\n padding: 6px 8px;\n text-align: center;\n}\n.stage-editor-module-stage-editor__3F-oQ {\n flex-shrink: 0;\n margin: 0;\n padding: 10px 0px 10px 0px;\n overflow: hidden;\n background: #f5f6f7;\n border-left: 2px solid #E4E4E4;\n width: 100%;\n min-height: 180px;\n}\n.stage-editor-module-stage-editor-errormsg__3Le7I {\n flex-shrink: 0;\n position: relative;\n margin: 10px;\n padding: 5px 10px;\n border-radius: 3px;\n overflow: hidden;\n background: #FCEBE2;\n border: 1px solid #F9D3C5;\n min-height: 20px;\n word-break: break-all;\n color: #8F221B;\n font-size: x-small;\n font-weight: bold;\n}\n.stage-editor-module-stage-editor-syntax-error__3qEJX {\n flex-shrink: 0;\n position: relative;\n margin: 10px;\n padding: 5px 10px;\n border-radius: 3px;\n overflow: hidden;\n background: #FEF7E3;\n border: 1px solid #FEF2C8;\n min-height: 20px;\n word-break: break-all;\n color: #86681D;\n font-size: x-small;\n font-weight: bold;\n}\n.stage-editor-module-stage-editor-ace-editor__eRQyZ {\n min-height: 160px;\n}\n",""]),r.locals={"stage-editor-container":"stage-editor-module-stage-editor-container__1XwN_","stage-editor":"stage-editor-module-stage-editor__3F-oQ","stage-editor-errormsg":"stage-editor-module-stage-editor-errormsg__3Le7I","stage-editor-syntax-error":"stage-editor-module-stage-editor-syntax-error__3qEJX","stage-editor-ace-editor":"stage-editor-module-stage-editor-ace-editor__eRQyZ"};const s=r},462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,'.stage-preview-toolbar-module-stage-preview-toolbar__2o0am {\n width: 100%;\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n height: 30px;\n padding: 10px 0;\n padding-left: 25px;\n display: flex;\n align-items: center;\n border-bottom: 1px solid #dee0e3;\n border-radius: 4px 4px 0 0;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar-link__q2ehc {\n border: none;\n padding: 0;\n margin: 0;\n background: none;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar-errored__1JajO {\n background: #FCEBE2;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am i.info-sprinkle {\n display: inline-block;\n font: normal normal normal 14px/1 FontAwesome;\n font-size: inherit;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n margin: 0 5px;\n cursor: pointer;\n color: #bfbfbe;\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am i.info-sprinkle:before {\n content: "\\f05a";\n}\n.stage-preview-toolbar-module-stage-preview-toolbar__2o0am #stage-tooltip {\n width: 300px;\n white-space: pre-wrap;\n}\n',""]),r.locals={"stage-preview-toolbar":"stage-preview-toolbar-module-stage-preview-toolbar__2o0am","stage-preview-toolbar-link":"stage-preview-toolbar-module-stage-preview-toolbar-link__q2ehc","stage-preview-toolbar-errored":"stage-preview-toolbar-module-stage-preview-toolbar-errored__1JajO"};const s=r},9877:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-preview-module-stage-preview__37FlK {\n width: 100%;\n display: flex;\n align-items: stretch;\n overflow: auto;\n position: relative;\n flex-grow: 1;\n}\n.stage-preview-module-stage-preview-empty__9L3fd {\n padding-left: 15px;\n margin: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n fill: none;\n stroke: #89979B;\n text-align: center;\n}\n.stage-preview-module-stage-preview-missing-search-support__18Jmm {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 10px;\n margin: auto;\n}\n.stage-preview-module-stage-preview-missing-search-support-text__1XKhH {\n text-align: center;\n margin-top: 10px;\n margin-bottom: 20px;\n max-width: 400px;\n}\n.stage-preview-module-stage-preview-out__2kjVI {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n}\n.stage-preview-module-stage-preview-out-text__FwDzO {\n padding: 0px 15px 2px 15px;\n text-align: center;\n}\n.stage-preview-module-stage-preview-out-button__bnXRJ {\n margin-top: 3px;\n}\n.stage-preview-module-stage-preview-out-link__1uCqW {\n border: none;\n padding: 0;\n margin: 0;\n background: none;\n}\n.stage-preview-module-stage-preview-documents__uF1qq {\n display: flex;\n align-items: stretch;\n overflow-x: scroll;\n margin: 10px;\n padding: 10px;\n}\n.stage-preview-module-stage-preview-document-card__21xbY {\n flex: none;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);\n width: 350px;\n height: 150px;\n overflow: scroll;\n}\n.stage-preview-module-stage-preview-document-card__21xbY:not(:first-child) {\n margin-left: 20px;\n}\n.stage-preview-module-stage-preview-document-card__21xbY::-webkit-scrollbar {\n display: none;\n}\n.stage-preview-module-stage-preview__37FlK::-webkit-scrollbar {\n display: none;\n}\n",""]),r.locals={"stage-preview":"stage-preview-module-stage-preview__37FlK","stage-preview-empty":"stage-preview-module-stage-preview-empty__9L3fd","stage-preview-missing-search-support":"stage-preview-module-stage-preview-missing-search-support__18Jmm","stage-preview-missing-search-support-text":"stage-preview-module-stage-preview-missing-search-support-text__1XKhH","stage-preview-out":"stage-preview-module-stage-preview-out__2kjVI","stage-preview-out-text":"stage-preview-module-stage-preview-out-text__FwDzO","stage-preview-out-button":"stage-preview-module-stage-preview-out-button__bnXRJ","stage-preview-out-link":"stage-preview-module-stage-preview-out-link__1uCqW","stage-preview-documents":"stage-preview-module-stage-preview-documents__uF1qq","stage-preview-document-card":"stage-preview-module-stage-preview-document-card__21xbY"};const s=r},7295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(2609),r=n.n(i)()(!1);r.push([e.id,".stage-module-stage-container__ZDTxh {\n margin: 0px 10px 0px;\n padding-bottom: 15px;\n border-left: 2px solid #dee0e3;\n position: relative;\n}\n.stage-module-stage-container__ZDTxh:before {\n position: absolute;\n left: -3px;\n top: 10px;\n content: '';\n width: 4px;\n height: 16px;\n background-color: #f5f6f7;\n}\n.stage-module-stage-container__ZDTxh:after {\n position: absolute;\n left: -7px;\n top: 12px;\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n border: 2px solid #dee0e3;\n}\n.stage-module-stage-container-is-first__C7RFF:before {\n position: absolute;\n left: -3px;\n top: 0px;\n content: '';\n width: 4px;\n height: 26px;\n background-color: #f5f6f7;\n}\n.stage-module-stage-container__ZDTxh .stage-module-stage__1YPPq {\n position: relative;\n margin: 0px 8px 0px;\n border: 1px solid #dee0e3;\n border-radius: 4px;\n box-shadow: 1px 1px 1px #dee0e3;\n background: #fff;\n display: flex;\n flex-direction: row;\n}\n.stage-module-stage-container__ZDTxh .stage-module-stage-errored__mbJmP {\n border-color: #CF4A22;\n}\n.stage-module-stage-editor-container__1LvRF {\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: auto;\n}\n.stage-module-stage-preview-container__2xO44 {\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n overflow: auto;\n}\n.stage-module-stage-resize-handle-wrapper__1UhOK:hover div div,\n.stage-module-stage-resize-handle-wrapper__1UhOK:active div div {\n background-color: #bfbfbe;\n}\n.stage-module-stage-workspace__9LrbT {\n display: flex;\n align-items: stretch;\n border-radius: 0 0 4px 4px;\n}\n",""]),r.locals={"stage-container":"stage-module-stage-container__ZDTxh","stage-container-is-first":"stage-module-stage-container-is-first__C7RFF",stage:"stage-module-stage__1YPPq","stage-errored":"stage-module-stage-errored__mbJmP","stage-editor-container":"stage-module-stage-editor-container__1LvRF","stage-preview-container":"stage-module-stage-preview-container__2xO44","stage-resize-handle-wrapper":"stage-module-stage-resize-handle-wrapper__1UhOK","stage-workspace":"stage-module-stage-workspace__9LrbT"};const s=r},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,i,r,s=e[1]||"",o=e[3];if(!o)return s;if(t&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),u=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[s].concat(u).concat([a]).join("\n")}return[s].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(i)for(var s=0;s<this.length;s++){var o=this[s][0];null!=o&&(r[o]=!0)}for(var a=0;a<e.length;a++){var u=[].concat(e[a]);i&&r[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},7386:(e,t,n)=>{"use strict";const i=n(8653),r=n(1515);function s(e,t){return i(e,t,{parse:!0})}s.text=function(e,t){return i(e,t,{parse:!1,html:!1})},s.html=function(e,t){return i(e,t,{parse:!1,html:!0})},s.getEOL=function(e){if("string"!=typeof e)throw new TypeError("Invalid parameter 'text' specified.");return r.getEOL(e)},e.exports=s},8653:(e,t,n)=>{"use strict";const i=n(1515);e.exports=function(e,t,n){if("string"!=typeof e)throw new TypeError("Input code/text/html must be a string.");if(void 0!==t&&"object"!=typeof t)throw new TypeError("Parameter 'options' must be an object.");const r=e.length,s=t&&t.safe,o=t&&t.space,a=t&&t.trim,u=t&&t.tolerant,l=i.getEOL(e);let c,p=0,h="",d=!0,f="",m=[];if(!r)return e;if(n.parse?(c=i.isHtml(e),c||(m=i.parseRegEx(e,u))):c=n.html,t&&t.ignore){let n=t.ignore;if(n instanceof RegExp?n=[n]:n instanceof Array?(n=n.filter((e=>e instanceof RegExp)),n.length||(n=null)):n=null,n){for(let t=0;t<n.length;t++){const i=n[t];let r;do{r=i.exec(e),r&&m.push({start:r.index,end:r.index+r[0].length-1})}while(r&&i.global)}m=m.sort(((e,t)=>e.start-t.start))}}do{if(!c&&"/"===e[p]&&p<r-1&&(!p||"\\"!==e[p-1])){if("/"===e[p+1]){if(g()){f&&(h+=f,f=""),h+="/";continue}const t=e.indexOf(l,p+2);if(t<0)break;d?(f="",o?p=t-1:(p=t+l.length-1,v())):p=t-1;continue}if("*"===e[p+1]){if(g()){f&&(h+=f,f=""),h+="/";continue}const t=e.indexOf("*/",p+2),n=s&&p<r-2&&"!"===e[p+2];if(n&&(h+=t>=0?e.substr(p,t-p+2):e.substr(p,r-p)),t<0)break;const a=e.substr(p,t-p+2);if(p=t+1,d&&(f=""),!n){const t=a.split(l);if(o)for(let e=0;e<t.length-1;e++)h+=l;const n=e.indexOf(l,p+1);if(n>p){let r=n-1;for(;(" "===e[r]||"\t"===e[r])&&--r>p;);r===p?d&&!o&&(p=n+l.length-1,v()):o&&(h+=i.getSpaces(t[t.length-1].length))}else if(o){let n=p+1;for(;(" "===e[n]||"\t"===e[n])&&++n<r;);n<r&&(h+=i.getSpaces(t[t.length-1].length))}}continue}}if(c&&"<"===e[p]&&p<r-3&&"!--"===e.substr(p+1,3)){if(g()){f&&(h+=f,f=""),h+="<";continue}const t=e.indexOf("--\x3e",p+4),n=s&&"[if"===e.substr(p+4,3);if(n&&(h+=t>=0?e.substr(p,t-p+3):e.substr(p,r-p)),t<0)break;const a=e.substr(p,t-p+3);if(p=t+2,d&&(f=""),!n){const t=a.split(l);if(o)for(let e=0;e<t.length-1;e++)h+=l;const n=e.indexOf(l,p+1);if(n>p){let r=n-1;for(;(" "===e[r]||"\t"===e[r])&&--r>p;);r===p?d&&!o&&(p=n+l.length-1,v()):o&&(h+=i.getSpaces(t[t.length-1].length))}else if(o){let n=p+1;for(;(" "===e[n]||"\t"===e[n])&&++n<r;);n<r&&(h+=i.getSpaces(t[t.length-1].length))}}continue}const t=e[p],n=" "===t||"\t"===t;if("\r"===t||"\n"===t?e.indexOf(l,p)===p&&(d=!0):n||(d=!1,h+=f,f=""),d&&n?f+=t:h+=t,!(c||"'"!==t&&'"'!==t&&"`"!==t||p&&"\\"===e[p-1])){if(g())continue;let n=p;do{if(n=e.indexOf(t,n+1),n>0){let t=n;for(;"\\"===e[--t];);if((n-t)%2)break}}while(n>0);if(n<0)break;h+=e.substr(p+1,n-p),p=n}}while(++p<r);function g(){if(m.length)return i.indexInRegEx(p,m)}function v(){if(a){let t,n,i;do{for(t=p+1,n=e.indexOf(l,t),i=t;(" "===e[i]||"\t"===e[i])&&++i<n;);i===n&&(p=n+l.length-1)}while(i===n)}}return h}},1515:(e,t,n)=>{"use strict";const i=n(671),r=n(9801);e.exports={getEOL:function(e){let t=0,n=0,i=0;for(;t<e.length&&(t=e.indexOf("\n",t),-1!=t);)t>0&&"\r"===e[t-1]?i++:n++,t++;return n===i?r.EOL:n>i?"\n":"\r\n"},getSpaces:function(e){return" ".repeat(e)},parseRegEx:function(e,t){const n=[];return i.tokenize(e,{loc:!0,range:!0,tolerant:!!t},(e=>{"RegularExpression"===e.type&&n.push({start:e.range[0]+1,end:e.range[1]-1})})),n},indexInRegEx:function(e,t){let n,i=0,r=t.length-1;for(;i<=r;){n=Math.round((i+r)/2);const s=t[n];if(e>=s.start){if(e<=s.end)return!0;i=n+1}else r=n-1}return!1},isHtml:function(e){let t,n=0;do{if(t=e[n]," "!==t&&"\t"!==t&&"\r"!==t&&"\n"!==t)return"<"===t}while(++n<e.length)}}},671:function(e){var t;t=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n(3),s=n(8),o=n(15);function a(e,t,n){var o=null,a=function(e,t){n&&n(e,t),o&&o.visit(e,t)},u="function"==typeof n?a:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(l||c)&&((o=new i.CommentHandler).attach=c,t.comment=!0,u=a)}var p,h=!1;t&&"string"==typeof t.sourceType&&(h="module"===t.sourceType),p=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,u):new s.Parser(e,t,u);var d=h?p.parseModule():p.parseScript();return l&&o&&(d.comments=o.comments),p.config.tokens&&(d.tokens=p.tokens),p.config.tolerant&&(d.errors=p.errorHandler.errors),d}t.parse=a,t.parseModule=function(e,t,n){var i=t||{};return i.sourceType="module",a(e,i,n)},t.parseScript=function(e,t,n){var i=t||{};return i.sourceType="script",a(e,i,n)},t.tokenize=function(e,t,n){var i,r=new o.Tokenizer(e,t);i=[];try{for(;;){var s=r.getNextToken();if(!s)break;n&&(s=n(s)),i.push(s)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var u=n(2);t.Syntax=u.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var s=this.leading[r];t.end.offset>=s.start&&(n.unshift(s.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var s=r.node.trailingComments[0];s&&s.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(s=this.stack[this.stack.length-1])&&s.start>=e.start.offset;)t=s.node,this.stack.pop();if(t){for(var i=(t.leadingComments?t.leadingComments.length:0)-1;i>=0;--i){var r=t.leadingComments[i];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(i,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var s;(s=this.leading[i]).start<=e.start.offset&&(n.unshift(s.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",i={type:n,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=n(5),a=n(6),u=n(7),l=n(8),c=n(13),p=n(14);function h(e){var t;switch(e.type){case a.JSXSyntax.JSXIdentifier:t=e.name;break;case a.JSXSyntax.JSXNamespacedName:var n=e;t=h(n.namespace)+":"+h(n.name);break;case a.JSXSyntax.JSXMemberExpression:var i=e;t=h(i.object)+"."+h(i.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var d=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,i=!1,r=!1,o=!1;!this.scanner.eof()&&n&&!i;){var a=this.scanner.source[this.scanner.index];if(a===e)break;if(i=";"===a,t+=a,++this.scanner.index,!i)switch(t.length){case 2:r="#"===a;break;case 3:r&&(n=(o="x"===a)||s.Character.isDecimalDigit(a.charCodeAt(0)),r=r&&!o);break;default:n=(n=n&&!(r&&!s.Character.isDecimalDigit(a.charCodeAt(0))))&&!(o&&!s.Character.isHexDigit(a.charCodeAt(0)))}}if(n&&i&&t.length>2){var u=t.substr(1,t.length-2);r&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):r||o||!p.XHTMLEntities[u]||(t=p.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:a=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(u=this.scanner.source[this.scanner.index++])!==n;)i+="&"===u?this.scanXHTMLEntity(n):u;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),o=this.scanner.source.charCodeAt(this.scanner.index+2),a=46===r&&46===o?"...":".";return t=this.scanner.index,this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(s.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(s.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,s.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new o.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXMemberExpression(r,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(i,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new o.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new o.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(t,i,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new o.JSXClosingElement(t))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new o.JSXOpeningElement(n,r,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new o.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new o.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var i=this.getTokenRaw(n),r=this.finalize(t,new o.JSXText(n.value,i));e.push(r)}if("{"!==this.scanner.source[this.scanner.index])break;var s=this.parseJSXExpressionContainer();e.push(s)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===a.JSXSyntax.JSXOpeningElement){var r=i;if(r.selfClosing){var s=this.finalize(n,new o.JSXElement(r,[],null));e.children.push(s)}else t.push(e),e={node:n,opening:r,closing:null,children:[]}}if(i.type===a.JSXSyntax.JSXClosingElement){e.closing=i;var u=h(e.opening.name);if(u!==h(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",u),!(t.length>0))break;s=this.finalize(e.node,new o.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(s),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],i=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(e,new o.JSXElement(t,n,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(l.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6);t.JSXClosingElement=function(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e};t.JSXElement=function(e,t,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXEmptyExpression=function(){this.type=i.JSXSyntax.JSXEmptyExpression};t.JSXExpressionContainer=function(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXIdentifier=function(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e};t.JSXMemberExpression=function(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXAttribute=function(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXNamespacedName=function(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXOpeningElement=function(e,t,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXSpreadAttribute=function(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXText=function(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);t.ArrayExpression=function(e){this.type=i.Syntax.ArrayExpression,this.elements=e};t.ArrayPattern=function(e){this.type=i.Syntax.ArrayPattern,this.elements=e};t.ArrowFunctionExpression=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.AssignmentExpression=function(e,t,n){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentPattern=function(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AsyncArrowFunctionExpression=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncFunctionDeclaration=function(e,t,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=function(e,t,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AwaitExpression=function(e){this.type=i.Syntax.AwaitExpression,this.argument=e};t.BinaryExpression=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BlockStatement=function(e){this.type=i.Syntax.BlockStatement,this.body=e};t.BreakStatement=function(e){this.type=i.Syntax.BreakStatement,this.label=e};t.CallExpression=function(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CatchClause=function(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t};t.ClassBody=function(e){this.type=i.Syntax.ClassBody,this.body=e};t.ClassDeclaration=function(e,t,n){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=function(e,t,n){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ComputedMemberExpression=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ConditionalExpression=function(e,t,n){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ContinueStatement=function(e){this.type=i.Syntax.ContinueStatement,this.label=e};t.DebuggerStatement=function(){this.type=i.Syntax.DebuggerStatement};t.Directive=function(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.DoWhileStatement=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.EmptyStatement=function(){this.type=i.Syntax.EmptyStatement};t.ExportAllDeclaration=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportDefaultDeclaration=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportNamedDeclaration=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportSpecifier=function(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExpressionStatement=function(e){this.type=i.Syntax.ExpressionStatement,this.expression=e};t.ForInStatement=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForOfStatement=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForStatement=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.FunctionDeclaration=function(e,t,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=function(e,t,n,r){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.Identifier=function(e){this.type=i.Syntax.Identifier,this.name=e};t.IfStatement=function(e,t,n){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.ImportDeclaration=function(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDefaultSpecifier=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportNamespaceSpecifier=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportSpecifier=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.LabeledStatement=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.Literal=function(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t};t.MetaProperty=function(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t};t.MethodDefinition=function(e,t,n,r,s){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=s};t.Module=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="module"};t.NewExpression=function(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t};t.ObjectExpression=function(e){this.type=i.Syntax.ObjectExpression,this.properties=e};t.ObjectPattern=function(e){this.type=i.Syntax.ObjectPattern,this.properties=e};t.Property=function(e,t,n,r,s,o){this.type=i.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=s,this.shorthand=o};t.RegexLiteral=function(e,t,n,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RestElement=function(e){this.type=i.Syntax.RestElement,this.argument=e};t.ReturnStatement=function(e){this.type=i.Syntax.ReturnStatement,this.argument=e};t.Script=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="script"};t.SequenceExpression=function(e){this.type=i.Syntax.SequenceExpression,this.expressions=e};t.SpreadElement=function(e){this.type=i.Syntax.SpreadElement,this.argument=e};t.StaticMemberExpression=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.Super=function(){this.type=i.Syntax.Super};t.SwitchCase=function(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchStatement=function(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.TaggedTemplateExpression=function(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TemplateElement=function(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateLiteral=function(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.ThisExpression=function(){this.type=i.Syntax.ThisExpression};t.ThrowStatement=function(e){this.type=i.Syntax.ThrowStatement,this.argument=e};t.TryStatement=function(e,t,n){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.UnaryExpression=function(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UpdateExpression=function(e,t,n){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.VariableDeclaration=function(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclarator=function(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t};t.WhileStatement=function(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t};t.WithStatement=function(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t};t.YieldExpression=function(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(10),s=n(11),o=n(7),a=n(12),u=n(2),l=n(13),c="ArrowParameterPlaceHolder",p=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,(function(e,t){return i.assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.lastMarker.line,u=this.lastMarker.column+1;throw this.errorHandler.createError(o,a,u,s)},e.prototype.tolerateError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.prototype.slice.call(arguments,1),s=e.replace(/%(\d)/g,(function(e,t){return i.assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.scanner.lineNumber,u=this.lastMarker.column+1;this.errorHandler.tolerateError(o,a,u,s)},e.prototype.unexpectedTokenError=function(e,t){var n,i=t||s.Messages.UnexpectedToken;if(e?(t||(i=2===e.type?s.Messages.UnexpectedEOS:3===e.type?s.Messages.UnexpectedIdentifier:6===e.type?s.Messages.UnexpectedNumber:8===e.type?s.Messages.UnexpectedString:10===e.type?s.Messages.UnexpectedTemplate:s.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i=s.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=s.Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",i=i.replace("%0",n),e&&"number"==typeof e.lineNumber){var r=e.start,o=e.lineNumber,a=this.lastMarker.index-this.lastMarker.column,u=e.start-a+1;return this.errorHandler.createError(r,o,u,i)}return r=this.lastMarker.index,o=this.lastMarker.line,u=this.lastMarker.column+1,this.errorHandler.createError(r,o,u,i)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],i=void 0;i={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(i.range=n.range),this.config.loc&&(i.loc=n.loc);var r={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(i,r)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:l.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,i=e.flags;t.regex={pattern:n,flags:i}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,i=e.lineNumber;return n<0&&(n+=t,i--),{index:e.start,line:i,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,s.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(i,new o.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(i,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(i,new o.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new o.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new o.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new o.AsyncFunctionExpression(null,i.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,s.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);e=this.finalize(t,new o.Literal(n.value,i));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new o.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),i=this.lookahead,r=null,a=null,u=!1,l=!1,c=!1,p=!1;if(3===i.type){var h=i.value;this.nextToken(),u=this.match("["),r=(p=!(this.hasLineTerminator||"async"!==h||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new o.Identifier(h))}else this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var d=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!p&&"get"===i.value&&d)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(3===i.type&&!p&&"set"===i.value&&d)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&d)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),l=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!p)!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0;else if(3===i.type)if(h=this.finalize(n,new o.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var f=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(n,new o.AssignmentPattern(h,f))}else c=!0,a=h;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new o.Property(t,r,u,a,l,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new o.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new o.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(e,new o.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case u.Syntax.ObjectExpression:for(e.type=u.Syntax.ObjectPattern,t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case u.Syntax.AssignmentExpression:e.type=u.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);i=!0,e={type:c,params:r,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);i=!0,e={type:c,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new o.SequenceExpression(r)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:c,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(s=0;s<e.expressions.length;s++)this.reinterpretExpressionAsPattern(e.expressions[s]);else this.reinterpretExpressionAsPattern(e);var a=e.type===u.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:a,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new o.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(i.assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new o.MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else{var s=this.isolateCoverGrammar(this.parseLeftHandSideExpression),a=this.match("(")?this.parseArguments():[];e=new o.NewExpression(s,a),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),i=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new o.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();e=this.finalize(this.startNode(t),new o.StaticMemberExpression(e,r))}else if(this.match("(")){var s=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var a=s?this.parseAsyncArguments():this.parseArguments();if(e=this.finalize(this.startNode(t),new o.CallExpression(e,a)),s&&this.match("=>")){for(var u=0;u<a.length;++u)this.reinterpretExpressionAsPattern(a[u]);e={type:c,params:a,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),r=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),e=this.finalize(this.startNode(t),new o.ComputedMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var l=this.parseTemplateLiteral();e=this.finalize(this.startNode(t),new o.TaggedTemplateExpression(e,l))}return this.context.allowIn=i,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new o.Super)},e.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new o.ComputedMemberExpression(t,n))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),n=this.parseIdentifierName(),t=this.finalize(e,new o.StaticMemberExpression(t,n));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral();t=this.finalize(e,new o.TaggedTemplateExpression(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(s.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment);var r=!0;e=this.finalize(n,new o.UpdateExpression(i.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(s.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var a=this.nextToken().value;r=!1,e=this.finalize(this.startNode(t),new o.UpdateExpression(a,e,r))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new o.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new o.UnaryExpression(n.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===u.Syntax.Identifier&&this.tolerateError(s.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==u.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,i=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new o.BinaryExpression("**",n,i))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,i=this.binaryPrecedence(n);if(i>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),u=[s,n.value,a],l=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;u.length>2&&i<=l[l.length-1];){a=u.pop();var c=u.pop();l.pop(),s=u.pop(),r.pop();var p=this.startNode(r[r.length-1]);u.push(this.finalize(p,new o.BinaryExpression(c,s,a)))}u.push(this.nextToken().value),l.push(i),r.push(this.lookahead),u.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=u.length-1;t=u[h];for(var d=r.pop();h>1;){var f=r.pop(),m=d&&d.lineStart;p=this.startNode(f,m),c=u[h-1],t=this.finalize(p,new o.BinaryExpression(c,u[h-2],t)),h-=2,d=f}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new o.ConditionalExpression(t,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case u.Syntax.ObjectPattern:for(n=0;n<t.properties.length;n++)this.checkPatternParam(e,t.properties[n].value)}e.simple=e.simple&&t instanceof o.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,n=[e],i=!1;switch(e.type){case u.Syntax.Identifier:break;case c:n=e.params,i=e.async;break;default:return null}t={simple:!0,paramSet:{}};for(var r=0;r<n.length;++r)(o=n[r]).type===u.Syntax.AssignmentPattern?o.right.type===u.Syntax.YieldExpression&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=u.Syntax.Identifier,o.right.name="yield",delete o.right.argument,delete o.right.delegate):i&&o.type===u.Syntax.Identifier&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(t,o),n[r]=o;if(this.context.strict||!this.context.allowYield)for(r=0;r<n.length;++r){var o;(o=n[r]).type===u.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===s.Messages.StrictParamDupe){var a=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(a,t.message)}return{simple:t.simple,params:n,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var i=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(i),e={type:c,params:[i],async:!0}}if(e.type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,a=this.reinterpretAsCoverFormalsList(e);if(a){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var l=this.context.strict,p=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var h=this.context.allowYield,d=this.context.await;this.context.allowYield=!0,this.context.await=r;var f=this.startNode(t);this.expect("=>");var m=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,m=this.parseFunctionSourceElements(),this.context.allowIn=g}else m=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=m.type!==u.Syntax.BlockStatement;this.context.strict&&a.firstRestricted&&this.throwUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),e=r?this.finalize(f,new o.AsyncArrowFunctionExpression(a.params,m,v)):this.finalize(f,new o.ArrowFunctionExpression(a.params,m,v)),this.context.strict=l,this.context.allowStrictDirective=p,this.context.allowYield=h,this.context.await=d}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var b=(n=this.nextToken()).value,x=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new o.AssignmentExpression(b,e,x)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new o.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new o.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&i.type!==u.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(i,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(n,new o.RestElement(i))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(i))},e.prototype.parsePropertyPattern=function(e,t){var n,i,r=this.createNode(),s=!1,a=!1;if(3===this.lookahead.type){var u=this.lookahead;n=this.parseVariableIdentifier();var l=this.finalize(r,new o.Identifier(u.value));if(this.match("=")){e.push(u),a=!0,this.nextToken();var c=this.parseAssignmentExpression();i=this.finalize(this.startNode(u),new o.AssignmentPattern(l,c))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(e,t)):(e.push(u),a=!0,i=l)}else s=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(e,t);return this.finalize(r,new o.Property("init",n,s,i,!1,a))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(i))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new o.AssignmentPattern(i,s))}return i},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new o.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===u.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new o.VariableDeclarator(n,i))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new o.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new o.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(i,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new o.DoWhileStatement(n,i))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=i}return this.finalize(t,new o.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,i=null,r=null,a=null,l=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var p=this.context.allowIn;this.context.allowIn=!1;var h=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=p,1===h.length&&this.matchKeyword("in")){var d=h[0];d.init&&(d.id.type===u.Syntax.ArrayPattern||d.id.type===u.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.nextToken(),e=i,t=this.parseExpression(),i=null}else 1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(i=this.finalize(i,new o.VariableDeclaration(h,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var f=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(p=this.context.allowIn,this.context.allowIn=!1,h=this.parseBindingList(f,{inFor:!0}),this.context.allowIn=p,1===h.length&&null===h[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new o.VariableDeclaration(h,f)),this.nextToken(),e=i,t=this.parseExpression(),i=null):1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(h,f)),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,l=!1):(this.consumeSemicolon(),i=this.finalize(i,new o.VariableDeclaration(h,f)))):(i=this.finalize(i,new o.Identifier(f)),this.nextToken(),e=i,t=this.parseExpression(),i=null)}else{var m=this.lookahead;if(p=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=p,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==u.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseAssignmentExpression(),i=null,l=!1;else{if(this.match(",")){for(var g=[i];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(m),new o.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(a=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new o.ForStatement(i,r,a,n)):l?this.finalize(c,new o.ForInStatement(e,t,n)):this.finalize(c,new o.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(e,new o.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(s.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(e,new o.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new o.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var a=this.parseSwitchCase();null===a.test&&(r&&this.throwError(s.Messages.MultipleDefaultsInSwitch),r=!0),i.push(a)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new o.SwitchStatement(t,i))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===u.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(s.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var a=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){var l=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(l,s.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(l,s.Messages.GeneratorInLegacyContext),a=c}else a=this.parseStatement();delete this.context.labelSet[r],e=new o.LabeledStatement(i,a)}else this.consumeSemicolon(),e=new o.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new o.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),i={},r=0;r<t.length;r++){var a="$"+t[r].value;Object.prototype.hasOwnProperty.call(i,a)&&this.tolerateError(s.Messages.DuplicateBinding,t[r].value),i[a]=!0}this.context.strict&&n.type===u.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictCatchVariable),this.expect(")");var l=this.parseBlock();return this.finalize(e,new o.CatchClause(n,l))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||i||this.throwError(s.Messages.NoCatchOrFinally),this.finalize(e,new o.TryStatement(t,n,i))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new o.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,i=this.context.inIteration,r=this.context.inSwitch,s=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=i,this.context.inSwitch=r,this.context.inFunctionBody=s,this.finalize(e,new o.BlockStatement(t))},e.prototype.validateParam=function(e,t,n){var i="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=s.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=s.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=s.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=s.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=s.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(s.Messages.DefaultRestParameter),this.match(")")||this.throwError(s.Messages.ParameterAfterRestParameter),this.finalize(t,new o.RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&n instanceof o.Identifier,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var i,r=!n&&this.match("*");r&&this.nextToken();var a=null,u=null;if(!e||!this.match("(")){var l=this.lookahead;a=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(l.value)&&this.tolerateUnexpectedToken(l,s.Messages.StrictFunctionName):this.scanner.isRestrictedWord(l.value)?(u=l,i=s.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(l.value)&&(u=l,i=s.Messages.StrictReservedWord)}var c=this.context.await,p=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var h=this.parseFormalParameters(u),d=h.params,f=h.stricted;u=h.firstRestricted,h.message&&(i=h.message);var m=this.context.strict,g=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var v=this.parseFunctionSourceElements();return this.context.strict&&u&&this.throwUnexpectedToken(u,i),this.context.strict&&f&&this.tolerateUnexpectedToken(f,i),this.context.strict=m,this.context.allowStrictDirective=g,this.context.await=c,this.context.allowYield=p,n?this.finalize(t,new o.AsyncFunctionDeclaration(a,d,v)):this.finalize(t,new o.FunctionDeclaration(a,d,v,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,i=!t&&this.match("*");i&&this.nextToken();var r,a=null,u=this.context.await,l=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!i,!this.match("(")){var c=this.lookahead;a=this.context.strict||i||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,s.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(r=c,n=s.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(r=c,n=s.Messages.StrictReservedWord)}var p=this.parseFormalParameters(r),h=p.params,d=p.stricted;r=p.firstRestricted,p.message&&(n=p.message);var f=this.context.strict,m=this.context.allowStrictDirective;this.context.allowStrictDirective=p.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,n),this.context.strict&&d&&this.tolerateUnexpectedToken(d,n),this.context.strict=f,this.context.allowStrictDirective=m,this.context.await=u,this.context.allowYield=l,t?this.finalize(e,new o.AsyncFunctionExpression(a,h,g)):this.finalize(e,new o.FunctionExpression(a,h,g,i))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),i=n.type===u.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new o.Directive(n,i):new o.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var i=this.parseDirective();t.push(i);var r=i.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,s.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,s.Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(s.Messages.BadGetterArity);var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(s.Messages.BadSetterArity):n.params[0]instanceof o.RestElement&&this.tolerateError(s.Messages.BadSetterRestParameter);var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new o.FunctionExpression(null,n.params,i,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(e,new o.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),i="",r=null,a=null,u=!1,l=!1,c=!1,p=!1;if(this.match("*"))this.nextToken();else if(u=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,u=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var h=this.lookahead.value;":"!==h&&"("!==h&&"*"!==h&&(p=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,s.Messages.ConstructorIsAsync))}var d=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&d?(i="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===t.value&&d&&(i="set",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod()):7===t.type&&"*"===t.value&&d&&(i="init",u=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),l=!0),!i&&r&&this.match("(")&&(i="init",a=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),u||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,s.Messages.StaticPrototype),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!l||a&&a.generator)&&this.throwUnexpectedToken(t,s.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,s.Messages.DuplicateConstructor):e.value=!0,i="constructor")),this.finalize(n,new o.MethodDefinition(r,u,a,i,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new o.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=n,this.finalize(t,new o.ClassDeclaration(i,r,s))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new o.ClassExpression(n,i,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new o.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(s.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new o.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new o.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new o.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(s.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new o.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new o.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new o.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new o.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(s.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new o.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new o.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new o.ExportNamedDeclaration(n,[],null));else{var a=[],u=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),a.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),u=this.parseModuleSpecifier(),this.consumeSemicolon()):l?(i=this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.throwError(i,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new o.ExportNamedDeclaration(null,a,u))}return e},e}();t.Parser=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,i){var r="Line "+t+": "+i,s=this.constructError(r,n);return s.index=e,s.lineNumber=t,s.description=i,s},e.prototype.throwError=function(e,t,n,i){throw this.createError(e,t,n,i)},e.prototype.tolerateError=function(e,t,n,i){var r=this.createError(e,t,n,i);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(4),s=n(11);function o(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function a(e){return"01234567".indexOf(e)}var u=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=s.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,i=[];for(this.trackComment&&(i=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var s=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(s)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};i.push(o)}return 13===s&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},i.push(o)),i},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(s)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},s={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(s)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(i))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i<t;++i){if(this.eof()||!r.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+o(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],r.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+o(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=a(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+a(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+a(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var i=this.index;this.index=t,this.tolerateUnexpectedToken(s.Messages.InvalidEscapedReservedWord),this.index=i}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",i=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!r.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];i.assert(r.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&r.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];i.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,o="";!this.eof();){var a=this.source[this.index++];if(a===t){t="";break}if("\\"===a)if((a=this.source[this.index++])&&r.Character.isLineTerminator(a.charCodeAt(0)))++this.lineNumber,"\r"===a&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(a){case"u":if("{"===this.source[this.index])++this.index,o+=this.scanUnicodeCodePointEscape();else{var u=this.scanHexEscape(a);null===u&&this.throwUnexpectedToken(),o+=u}break;case"x":var l=this.scanHexEscape(a);null===l&&this.throwUnexpectedToken(s.Messages.InvalidHexEscapeSequence),o+=l;break;case"n":o+="\n";break;case"r":o+="\r";break;case"t":o+="\t";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;case"8":case"9":o+=a,this.tolerateUnexpectedToken();break;default:if(a&&r.Character.isOctalDigit(a.charCodeAt(0))){var c=this.octalToDecimal(a);n=c.octal||n,o+=String.fromCharCode(c.code)}else o+=a}else{if(r.Character.isLineTerminator(a.charCodeAt(0)))break;o+=a}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:o,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,i="`"===this.source[n],o=!1,a=2;for(++this.index;!this.eof();){var u=this.source[this.index++];if("`"===u){a=1,o=!0,t=!0;break}if("$"===u){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=u}else if("\\"===u)if(u=this.source[this.index++],r.Character.isLineTerminator(u.charCodeAt(0)))++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(u){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var l=this.index,c=this.scanHexEscape(u);null!==c?e+=c:(this.index=l,e+=u)}break;case"x":var p=this.scanHexEscape(u);null===p&&this.throwUnexpectedToken(s.Messages.InvalidHexEscapeSequence),e+=p;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===u?(r.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(s.Messages.TemplateOctalLiteral),e+="\0"):r.Character.isOctalDigit(u.charCodeAt(0))?this.throwUnexpectedToken(s.Messages.TemplateOctalLiteral):e+=u}else r.Character.isLineTerminator(u.charCodeAt(0))?(++this.lineNumber,"\r"===u&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=u}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-a),cooked:e,head:i,tail:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=e,i=this;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&i.throwUnexpectedToken(s.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):""})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,""));try{RegExp(n)}catch(e){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,o=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(s.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){o=!0;break}"["===e&&(n=!0)}return o||this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i;n<this.index;++n)this.source[n];else this.index=n,e+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return r.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?r.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():r.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(12),s=n(13),o=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;t=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),a=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new o}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],i=this.scanner.source.slice(n.slice[0],n.slice[1]),r={type:n.multiLine?"BlockComment":"LineComment",value:i};this.trackRange&&(r.range=n.range),this.trackLoc&&(r.loc=n.loc),this.buffer.push(r)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var a="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(a);var u={type:s.TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(u.range=[a.start,a.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===a.type){var l=a.pattern,c=a.flags;u.regex={pattern:l,flags:c}}this.buffer.push(u)}}return this.buffer.shift()},e}();t.Tokenizer=a}])},e.exports=t()},161:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,i,s,o){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new r(i,s||e,o),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,s=i.length,o=new Array(s);r<s;r++)o[r]=i[r].fn;return o},a.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},a.prototype.emit=function(e,t,i,r,s,o){var a=n?n+e:e;if(!this._events[a])return!1;var u,l,c=this._events[a],p=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),p){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,s),!0;case 6:return c.fn.call(c.context,t,i,r,s,o),!0}for(l=1,u=new Array(p-1);l<p;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),p){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,i);break;case 4:c[l].fn.call(c[l].context,t,i,r);break;default:if(!u)for(h=1,u=new Array(p-1);h<p;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,i,r){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||r&&!a.once||i&&a.context!==i||o(this,s);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||r&&!a[u].once||i&&a[u].context!==i)&&l.push(a[u]);l.length?this._events[s]=1===l.length?l[0]:l:o(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},6238:e=>{function t(e,t,n,i){var r,s=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:n(i),o=t.get(s);return void 0===o&&(o=e.call(this,i),t.set(s,o)),o}function n(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=t.get(r);return void 0===s&&(s=e.apply(this,i),t.set(r,s)),s}function i(e,t,n,i,r){return n.bind(t,e,i,r)}function r(e,r){return i(e,this,1===e.length?t:n,r.cache.create(),r.serializer)}function s(){return JSON.stringify(arguments)}function o(){this.cache=Object.create(null)}o.prototype.has=function(e){return e in this.cache},o.prototype.get=function(e){return this.cache[e]},o.prototype.set=function(e,t){this.cache[e]=t};var a={create:function(){return new o}};e.exports=function(e,t){var n=t&&t.cache?t.cache:a,i=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:r)(e,{cache:n,serializer:i})},e.exports.strategies={variadic:function(e,t){return i(e,this,n,t.cache.create(),t.serializer)},monadic:function(e,n){return i(e,this,t,n.cache.create(),n.serializer)}}},3463:(e,t,n)=>{"use strict";var i=n(3887),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(e){return i.isMemo(e)?o:a[e.$$typeof]||r}a[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[i.Memo]=o;var l=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(f){var r=d(n);r&&r!==f&&e(t,r,i)}var o=c(n);p&&(o=o.concat(p(n)));for(var a=u(t),m=u(n),g=0;g<o.length;++g){var v=o[g];if(!(s[v]||i&&i[v]||m&&m[v]||a&&a[v])){var y=h(n,v);try{l(t,v,y)}catch(e){}}}}return t}},3459:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case c:case p:case s:case a:case o:case d:return e;default:switch(e=e&&e.$$typeof){case l:case h:case g:case m:case u:return e;default:return t}}case r:return t}}}function w(e){return E(e)===p}t.AsyncMode=c,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=u,t.Element=i,t.ForwardRef=h,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=r,t.Profiler=a,t.StrictMode=o,t.Suspense=d,t.isAsyncMode=function(e){return w(e)||E(e)===c},t.isConcurrentMode=w,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return E(e)===h},t.isFragment=function(e){return E(e)===s},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===r},t.isProfiler=function(e){return E(e)===a},t.isStrictMode=function(e){return E(e)===o},t.isSuspense=function(e){return E(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===p||e===a||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=E},3887:(e,t,n)=>{"use strict";e.exports=n(3459)},7677:e=>{"use strict";e.exports=function(e,t,n,i,r,s,o,a){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,s,o,a],c=0;(u=new Error(t.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},4283:e=>{e.exports="undefined"==typeof process||!process||!!process.type&&"renderer"===process.type},9320:e=>{function t(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=t,e.exports.default=t},594:(e,t,n)=>{var i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),p=Object.prototype.toString,h=Math.max,d=Math.min,f=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==p.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||o.test(e)?a(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var i,r,s,o,a,u,l=0,c=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=i,s=r;return i=r=void 0,l=t,o=e.apply(s,n)}function b(e){return l=e,a=setTimeout(E,t),c?y(e):o}function x(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=s}function E(){var e=f();if(x(e))return w(e);a=setTimeout(E,function(e){var n=t-(e-u);return p?d(n,s-(e-l)):n}(e))}function w(e){return a=void 0,v&&i?y(e):(i=r=void 0,o)}function C(){var e=f(),n=x(e);if(i=arguments,r=this,u=e,n){if(void 0===a)return b(u);if(p)return a=setTimeout(E,t),y(u)}return void 0===a&&(a=setTimeout(E,t)),o}return t=g(t)||0,m(n)&&(c=!!n.leading,s=(p="maxWait"in n)?h(g(n.maxWait)||0,t):s,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=u=r=a=void 0},C.flush=function(){return void 0===a?o:w(f())},C}},4749:e=>{var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/,i=Object.prototype,r=i.hasOwnProperty,s=i.toString,o=i.propertyIsEnumerable;function a(e,i){return!!(i=null==i?t:i)&&("number"==typeof e||n.test(e))&&e>-1&&e%1==0&&e<i}var u=Array.isArray;function l(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}(e.length)&&!function(e){var t=c(e)?s.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(e){return l(e)?function(e,t){var n=u(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&l(e)}(e)&&r.call(e,"callee")&&(!o.call(e,"callee")||"[object Arguments]"==s.call(e))}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,c=!!i;for(var p in e)!t&&!r.call(e,p)||c&&("length"==p||a(p,i))||n.push(p);return n}(e,!0):function(e){if(!c(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,s=(n=(t=e)&&t.constructor,t===("function"==typeof n&&n.prototype||i)),o=[];for(var a in e)("constructor"!=a||!s&&r.call(e,a))&&o.push(a);return o}(e)}function h(e){return e}e.exports=function(e,t){return null==e?e:function(e,t,n){for(var i=-1,r=Object(e),s=n(e),o=s.length;o--;){var a=s[++i];if(!1===t(r[a],a,r))break}return e}(e,"function"==typeof t?t:h,p)}},4537:e=>{var t=Array.isArray;e.exports=t},6160:(e,t,n)=>{e=n.nmd(e);var i,r,s,o="[object Map]",a="[object Promise]",u="[object Set]",l="[object WeakMap]",c="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,f=h||d||Function("return this")(),m=t&&!t.nodeType&&t,g=m&&e&&!e.nodeType&&e,v=g&&g.exports===m,y=Function.prototype,b=Object.prototype,x=f["__core-js_shared__"],E=(i=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",w=y.toString,C=b.hasOwnProperty,S=b.toString,D=RegExp("^"+w.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_=v?f.Buffer:void 0,A=b.propertyIsEnumerable,k=_?_.isBuffer:void 0,T=(r=Object.keys,s=Object,function(e){return r(s(e))}),O=z(f,"DataView"),I=z(f,"Map"),F=z(f,"Promise"),P=z(f,"Set"),N=z(f,"WeakMap"),R=!A.call({valueOf:1},"valueOf"),M=U(O),L=U(I),B=U(F),j=U(P),V=U(N);function z(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!G(e)||function(e){return!!E&&E in e}(e))return!1;var t=K(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?D:p;return t.test(U(e))}(n)?n:void 0}var q=function(e){return S.call(e)};function U(e){if(null!=e){try{return w.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(O&&q(new O(new ArrayBuffer(1)))!=c||I&&q(new I)!=o||F&&q(F.resolve())!=a||P&&q(new P)!=u||N&&q(new N)!=l)&&(q=function(e){var t=S.call(e),n="[object Object]"==t?e.constructor:void 0,i=n?U(n):void 0;if(i)switch(i){case M:return c;case L:return o;case B:return a;case j:return u;case V:return l}return t});var $=Array.isArray;function H(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!K(e)}var W=k||function(){return!1};function K(e){var t=G(e)?S.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(H(e)&&($(e)||"string"==typeof e||"function"==typeof e.splice||W(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&H(e)}(e)&&C.call(e,"callee")&&(!A.call(e,"callee")||"[object Arguments]"==S.call(e))}(e)))return!e.length;var t=q(e);if(t==o||t==u)return!e.size;if(R||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||b)}(e))return!T(e).length;for(var n in e)if(C.call(e,n))return!1;return!0}},3958:(e,t,n)=>{e=n.nmd(e);var i="__lodash_hash_undefined__",r=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",u="[object Date]",l="[object Error]",c="[object Function]",p="[object Map]",h="[object Number]",d="[object Object]",f="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",E=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[s]=C[o]=C[b]=C[a]=C[x]=C[u]=C[l]=C[c]=C[p]=C[h]=C[d]=C[m]=C[g]=C[v]=C[y]=!1;var S="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,D="object"==typeof self&&self&&self.Object===Object&&self,_=S||D||Function("return this")(),A=t&&!t.nodeType&&t,k=A&&e&&!e.nodeType&&e,T=k&&k.exports===A,O=T&&S.process,I=function(){try{return O&&O.binding&&O.binding("util")}catch(e){}}(),F=I&&I.isTypedArray;function P(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function N(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var M,L,B,j=Array.prototype,V=Function.prototype,z=Object.prototype,q=_["__core-js_shared__"],U=V.toString,$=z.hasOwnProperty,H=(M=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",W=z.toString,K=RegExp("^"+U.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=T?_.Buffer:void 0,Z=_.Symbol,X=_.Uint8Array,J=z.propertyIsEnumerable,Y=j.splice,Q=Z?Z.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=G?G.isBuffer:void 0,ne=(L=Object.keys,B=Object,function(e){return L(B(e))}),ie=ke(_,"DataView"),re=ke(_,"Map"),se=ke(_,"Promise"),oe=ke(_,"Set"),ae=ke(_,"WeakMap"),ue=ke(Object,"create"),le=Fe(ie),ce=Fe(re),pe=Fe(se),he=Fe(oe),de=Fe(ae),fe=Z?Z.prototype:void 0,me=fe?fe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function be(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function xe(e){var t=this.__data__=new ve(e);this.size=t.size}function Ee(e,t){for(var n=e.length;n--;)if(Pe(e[n][0],t))return n;return-1}function we(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?function(e){var t=$.call(e,Q),n=e[Q];try{e[Q]=void 0;var i=!0}catch(e){}var r=W.call(e);return i&&(t?e[Q]=n:delete e[Q]),r}(e):function(e){return W.call(e)}(e)}function Ce(e){return Ve(e)&&we(e)==s}function Se(e,t,n,i,r){return e===t||(null==e||null==t||!Ve(e)&&!Ve(t)?e!=e&&t!=t:function(e,t,n,i,r,c){var f=Re(e),y=Re(t),E=f?o:Oe(e),w=y?o:Oe(t),C=(E=E==s?d:E)==d,S=(w=w==s?d:w)==d,D=E==w;if(D&&Me(e)){if(!Me(t))return!1;f=!0,C=!1}if(D&&!C)return c||(c=new xe),f||ze(e)?De(e,t,n,i,r,c):function(e,t,n,i,r,s,o){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!s(new X(e),new X(t)));case a:case u:case h:return Pe(+e,+t);case l:return e.name==t.name&&e.message==t.message;case m:case v:return e==t+"";case p:var c=N;case g:var d=1&i;if(c||(c=R),e.size!=t.size&&!d)return!1;var f=o.get(e);if(f)return f==t;i|=2,o.set(e,t);var y=De(c(e),c(t),i,r,s,o);return o.delete(e),y;case"[object Symbol]":if(me)return me.call(e)==me.call(t)}return!1}(e,t,E,n,i,r,c);if(!(1&n)){var _=C&&$.call(e,"__wrapped__"),A=S&&$.call(t,"__wrapped__");if(_||A){var k=_?e.value():e,T=A?t.value():t;return c||(c=new xe),r(k,T,n,i,c)}}return!!D&&(c||(c=new xe),function(e,t,n,i,r,s){var o=1&n,a=_e(e),u=a.length;if(u!=_e(t).length&&!o)return!1;for(var l=u;l--;){var c=a[l];if(!(o?c in t:$.call(t,c)))return!1}var p=s.get(e);if(p&&s.get(t))return p==t;var h=!0;s.set(e,t),s.set(t,e);for(var d=o;++l<u;){var f=e[c=a[l]],m=t[c];if(i)var g=o?i(m,f,c,t,e,s):i(f,m,c,e,t,s);if(!(void 0===g?f===m||r(f,m,n,i,s):g)){h=!1;break}d||(d="constructor"==c)}if(h&&!d){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,i,r,c))}(e,t,n,i,Se,r))}function De(e,t,n,i,r,s){var o=1&n,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var l=s.get(e);if(l&&s.get(t))return l==t;var c=-1,p=!0,h=2&n?new be:void 0;for(s.set(e,t),s.set(t,e);++c<a;){var d=e[c],f=t[c];if(i)var m=o?i(f,d,c,t,e,s):i(d,f,c,e,t,s);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!P(t,(function(e,t){if(o=t,!h.has(o)&&(d===e||r(d,e,n,i,s)))return h.push(t);var o}))){p=!1;break}}else if(d!==f&&!r(d,f,n,i,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function _e(e){return function(e,t,n){var i=t(e);return Re(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,qe,Te)}function Ae(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function ke(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!je(e)||function(e){return!!H&&H in e}(e))&&(Le(e)?K:E).test(Fe(e))}(n)?n:void 0}ge.prototype.clear=function(){this.__data__=ue?ue(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(ue){var n=t[e];return n===i?void 0:n}return $.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return ue?void 0!==t[e]:$.call(t,e)},ge.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ue&&void 0===t?i:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=Ee(t,e);return!(n<0||(n==t.length-1?t.pop():Y.call(t,n,1),--this.size,0))},ve.prototype.get=function(e){var t=this.__data__,n=Ee(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return Ee(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,i=Ee(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(re||ve),string:new ge}},ye.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Ae(this,e).get(e)},ye.prototype.has=function(e){return Ae(this,e).has(e)},ye.prototype.set=function(e,t){var n=Ae(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,i),this},be.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new ve,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var i=n.__data__;if(!re||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(i)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var i=-1,r=null==t?0:t.length,s=0,o=[];++i<r;){var a=t[i];u=a,J.call(e,u)&&(o[s++]=a)}var u;return o}(ee(e)))}:function(){return[]},Oe=we;function Ie(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Fe(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Pe(e,t){return e===t||e!=e&&t!=t}(ie&&Oe(new ie(new ArrayBuffer(1)))!=x||re&&Oe(new re)!=p||se&&Oe(se.resolve())!=f||oe&&Oe(new oe)!=g||ae&&Oe(new ae)!=y)&&(Oe=function(e){var t=we(e),n=t==d?e.constructor:void 0,i=n?Fe(n):"";if(i)switch(i){case le:return x;case ce:return p;case pe:return f;case he:return g;case de:return y}return t});var Ne=Ce(function(){return arguments}())?Ce:function(e){return Ve(e)&&$.call(e,"callee")&&!J.call(e,"callee")},Re=Array.isArray,Me=te||function(){return!1};function Le(e){if(!je(e))return!1;var t=we(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function je(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ve(e){return null!=e&&"object"==typeof e}var ze=F?function(e){return function(t){return e(t)}}(F):function(e){return Ve(e)&&Be(e.length)&&!!C[we(e)]};function qe(e){return null!=(t=e)&&Be(t.length)&&!Le(t)?function(e,t){var n=Re(e),i=!n&&Ne(e),r=!n&&!i&&Me(e),s=!n&&!i&&!r&&ze(e),o=n||i||r||s,a=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],u=a.length;for(var l in e)!t&&!$.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ie(l,u))||a.push(l);return a}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||z))return ne(e);var t,n,i=[];for(var r in Object(e))$.call(e,r)&&"constructor"!=r&&i.push(r);return i}(e);var t}e.exports=function(e,t){return Se(e,t)}},4772:e=>{var t,n,i=Function.prototype,r=Object.prototype,s=i.toString,o=r.hasOwnProperty,a=s.call(Object),u=r.toString,l=(t=Object.getPrototypeOf,n=Object,function(e){return t(n(e))});e.exports=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=u.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=l(e);if(null===t)return!0;var n=o.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==a}},6496:e=>{var t=Object.prototype.toString,n=Array.isArray;e.exports=function(e){return"string"==typeof e||!n(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==t.call(e)}},4622:e=>{var t,n,i=9007199254740991,r=/^(?:0|[1-9]\d*)$/,s=Object.prototype,o=s.hasOwnProperty,a=s.toString,u=s.propertyIsEnumerable,l=(t=Object.keys,n=Object,function(e){return t(n(e))});function c(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||r.test(e))&&e>-1&&e%1==0&&e<t}var p=Array.isArray;function h(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?a.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}e.exports=function(e){return h(e)?function(e,t){var n=p(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&h(e)}(e)&&o.call(e,"callee")&&(!u.call(e,"callee")||"[object Arguments]"==a.call(e))}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var s in e)!t&&!o.call(e,s)||r&&("length"==s||c(s,i))||n.push(s);return n}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||s))return l(e);var t,n,i=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&i.push(r);return i}(e)}},6635:function(e,t,n){var i;e=n.nmd(e),function(){var r,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,p=9007199254740991,h=NaN,d=4294967295,f=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",y="[object Date]",b="[object Error]",x="[object Function]",E="[object GeneratorFunction]",w="[object Map]",C="[object Number]",S="[object Object]",D="[object Promise]",_="[object RegExp]",A="[object Set]",k="[object String]",T="[object Symbol]",O="[object WeakMap]",I="[object ArrayBuffer]",F="[object DataView]",P="[object Float32Array]",N="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",L="[object Int32Array]",B="[object Uint8Array]",j="[object Uint8ClampedArray]",V="[object Uint16Array]",z="[object Uint32Array]",q=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,K=RegExp(H.source),G=RegExp(W.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+/,re=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",De="["+Se+"]",_e="["+Ee+"]",Ae="\\d+",ke="["+we+"]",Te="[^\\ud800-\\udfff"+Se+Ae+"\\u2700-\\u27bf"+we+Ce+"]",Oe="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+Ce+"]",Re="(?:"+ke+"|"+Te+")",Me="(?:"+Ne+"|"+Te+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",je="(?:"+_e+"|"+Oe+")?",Ve="[\\ufe0e\\ufe0f]?",ze=Ve+je+"(?:\\u200d(?:"+[Ie,Fe,Pe].join("|")+")"+Ve+je+")*",qe="(?:"+["[\\u2700-\\u27bf]",Fe,Pe].join("|")+")"+ze,Ue="(?:"+[Ie+_e+"?",_e,Fe,Pe,"[\\ud800-\\udfff]"].join("|")+")",$e=RegExp("['’]","g"),He=RegExp(_e,"g"),We=RegExp(Oe+"(?="+Oe+")|"+Ue+ze,"g"),Ke=RegExp([Ne+"?"+ke+"+"+Le+"(?="+[De,Ne,"$"].join("|")+")",Me+"+"+Be+"(?="+[De,Ne+Re,"$"].join("|")+")",Ne+"?"+Re+"+"+Le,Ne+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae,qe].join("|"),"g"),Ge=RegExp("[\\u200d\\ud800-\\udfff"+Ee+"\\ufe0e\\ufe0f]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xe=["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"],Je=-1,Ye={};Ye[P]=Ye[N]=Ye[R]=Ye[M]=Ye[L]=Ye[B]=Ye[j]=Ye[V]=Ye[z]=!0,Ye[m]=Ye[g]=Ye[I]=Ye[v]=Ye[F]=Ye[y]=Ye[b]=Ye[x]=Ye[w]=Ye[C]=Ye[S]=Ye[_]=Ye[A]=Ye[k]=Ye[O]=!1;var Qe={};Qe[m]=Qe[g]=Qe[I]=Qe[F]=Qe[v]=Qe[y]=Qe[P]=Qe[N]=Qe[R]=Qe[M]=Qe[L]=Qe[w]=Qe[C]=Qe[S]=Qe[_]=Qe[A]=Qe[k]=Qe[T]=Qe[B]=Qe[j]=Qe[V]=Qe[z]=!0,Qe[b]=Qe[x]=Qe[O]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,rt="object"==typeof self&&self&&self.Object===Object&&self,st=it||rt||Function("return this")(),ot=t&&!t.nodeType&&t,at=ot&&e&&!e.nodeType&&e,ut=at&&at.exports===ot,lt=ut&&it.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),pt=ct&&ct.isArrayBuffer,ht=ct&&ct.isDate,dt=ct&&ct.isMap,ft=ct&&ct.isRegExp,mt=ct&&ct.isSet,gt=ct&&ct.isTypedArray;function vt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yt(e,t,n,i){for(var r=-1,s=null==e?0:e.length;++r<s;){var o=e[r];t(i,o,n(o),e)}return i}function bt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function xt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function wt(e,t){for(var n=-1,i=null==e?0:e.length,r=0,s=[];++n<i;){var o=e[n];t(o,n,e)&&(s[r++]=o)}return s}function Ct(e,t){return!(null==e||!e.length)&&Pt(e,t,0)>-1}function St(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function Dt(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function _t(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function At(e,t,n,i){var r=-1,s=null==e?0:e.length;for(i&&s&&(n=e[++r]);++r<s;)n=t(n,e[r],r,e);return n}function kt(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function Tt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Ot=Lt("length");function It(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Ft(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function Pt(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Ft(e,Rt,n)}function Nt(e,t,n,i){for(var r=n-1,s=e.length;++r<s;)if(i(e[r],t))return r;return-1}function Rt(e){return e!=e}function Mt(e,t){var n=null==e?0:e.length;return n?Vt(e,t)/n:h}function Lt(e){return function(t){return null==t?r:t[e]}}function Bt(e){return function(t){return null==e?r:e[t]}}function jt(e,t,n,i,r){return r(e,(function(e,r,s){n=i?(i=!1,e):t(n,e,r,s)})),n}function Vt(e,t){for(var n,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==r&&(n=n===r?o:n+o)}return n}function zt(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function qt(e){return e?e.slice(0,an(e)+1).replace(ie,""):e}function Ut(e){return function(t){return e(t)}}function $t(e,t){return Dt(t,(function(t){return e[t]}))}function Ht(e,t){return e.has(t)}function Wt(e,t){for(var n=-1,i=e.length;++n<i&&Pt(t,e[n],0)>-1;);return n}function Kt(e,t){for(var n=e.length;n--&&Pt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Zt=Bt({À:"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"}),Xt=Bt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Jt(e){return"\\"+et[e]}function Yt(e){return Ge.test(e)}function Qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n];o!==t&&o!==a||(e[n]=a,s[r++]=n)}return s}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function sn(e){return Yt(e)?function(e){for(var t=We.lastIndex=0;We.test(e);)++t;return t}(e):Ot(e)}function on(e){return Yt(e)?function(e){return e.match(We)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var un=Bt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,i=(t=null==t?st:ln.defaults(st.Object(),t,ln.pick(st,Xe))).Array,re=t.Date,Ee=t.Error,we=t.Function,Ce=t.Math,Se=t.Object,De=t.RegExp,_e=t.String,Ae=t.TypeError,ke=i.prototype,Te=we.prototype,Oe=Se.prototype,Ie=t["__core-js_shared__"],Fe=Te.toString,Pe=Oe.hasOwnProperty,Ne=0,Re=(n=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Me=Oe.toString,Le=Fe.call(Se),Be=st._,je=De("^"+Fe.call(Pe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=ut?t.Buffer:r,ze=t.Symbol,qe=t.Uint8Array,Ue=Ve?Ve.allocUnsafe:r,We=en(Se.getPrototypeOf,Se),Ge=Se.create,et=Oe.propertyIsEnumerable,it=ke.splice,rt=ze?ze.isConcatSpreadable:r,ot=ze?ze.iterator:r,at=ze?ze.toStringTag:r,lt=function(){try{var e=ls(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==st.clearTimeout&&t.clearTimeout,Ot=re&&re.now!==st.Date.now&&re.now,Bt=t.setTimeout!==st.setTimeout&&t.setTimeout,cn=Ce.ceil,pn=Ce.floor,hn=Se.getOwnPropertySymbols,dn=Ve?Ve.isBuffer:r,fn=t.isFinite,mn=ke.join,gn=en(Se.keys,Se),vn=Ce.max,yn=Ce.min,bn=re.now,xn=t.parseInt,En=Ce.random,wn=ke.reverse,Cn=ls(t,"DataView"),Sn=ls(t,"Map"),Dn=ls(t,"Promise"),_n=ls(t,"Set"),An=ls(t,"WeakMap"),kn=ls(Se,"create"),Tn=An&&new An,On={},In=Bs(Cn),Fn=Bs(Sn),Pn=Bs(Dn),Nn=Bs(_n),Rn=Bs(An),Mn=ze?ze.prototype:r,Ln=Mn?Mn.valueOf:r,Bn=Mn?Mn.toString:r;function jn(e){if(na(e)&&!Ho(e)&&!(e instanceof Un)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return js(e)}return new qn(e)}var Vn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function zn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Wn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Zn(e,t){var n=Ho(e),i=!n&&$o(e),r=!n&&!i&&Zo(e),s=!n&&!i&&!r&&ca(e),o=n||i||r||s,a=o?zt(e.length,_e):[],u=a.length;for(var l in e)!t&&!Pe.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||gs(l,u))||a.push(l);return a}function Xn(e){var t=e.length;return t?e[Wi(0,t-1)]:r}function Jn(e,t){return Ps(Ar(e),oi(t,0,e.length))}function Yn(e){return Ps(Ar(e))}function Qn(e,t,n){(n!==r&&!zo(e[t],n)||n===r&&!(t in e))&&ri(e,t,n)}function ei(e,t,n){var i=e[t];Pe.call(e,t)&&zo(i,n)&&(n!==r||t in e)||ri(e,t,n)}function ti(e,t){for(var n=e.length;n--;)if(zo(e[n][0],t))return n;return-1}function ni(e,t,n,i){return pi(e,(function(e,r,s){t(i,e,n(e),s)})),i}function ii(e,t){return e&&kr(t,Fa(t),e)}function ri(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function si(e,t){for(var n=-1,s=t.length,o=i(s),a=null==e;++n<s;)o[n]=a?r:Aa(e,t[n]);return o}function oi(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ai(e,t,n,i,s,o){var a,u=1&t,l=2&t,c=4&t;if(n&&(a=s?n(e,i,s,o):n(e)),a!==r)return a;if(!ta(e))return e;var p=Ho(e);if(p){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ar(e,a)}else{var h=hs(e),d=h==x||h==E;if(Zo(e))return Er(e,u);if(h==S||h==m||d&&!s){if(a=l||d?{}:fs(e),!u)return l?function(e,t){return kr(e,ps(e),t)}(e,function(e,t){return e&&kr(t,Pa(t),e)}(a,e)):function(e,t){return kr(e,cs(e),t)}(e,ii(a,e))}else{if(!Qe[h])return s?e:{};a=function(e,t,n){var i,r=e.constructor;switch(t){case I:return wr(e);case v:case y:return new r(+e);case F:return function(e,t){var n=t?wr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case N:case R:case M:case L:case B:case j:case V:case z:return Cr(e,n);case w:return new r;case C:case k:return new r(e);case _:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new r;case T:return i=e,Ln?Se(Ln.call(i)):{}}}(e,h,u)}}o||(o=new Gn);var f=o.get(e);if(f)return f;o.set(e,a),aa(e)?e.forEach((function(i){a.add(ai(i,t,n,i,e,o))})):ia(e)&&e.forEach((function(i,r){a.set(r,ai(i,t,n,r,e,o))}));var g=p?r:(c?l?ns:ts:l?Pa:Fa)(e);return bt(g||e,(function(i,r){g&&(i=e[r=i]),ei(a,r,ai(i,t,n,r,e,o))})),a}function ui(e,t,n){var i=n.length;if(null==e)return!i;for(e=Se(e);i--;){var s=n[i],o=t[s],a=e[s];if(a===r&&!(s in e)||!o(a))return!1}return!0}function li(e,t,n){if("function"!=typeof e)throw new Ae(s);return Ts((function(){e.apply(r,n)}),t)}function ci(e,t,n,i){var r=-1,s=Ct,o=!0,a=e.length,u=[],l=t.length;if(!a)return u;n&&(t=Dt(t,Ut(n))),i?(s=St,o=!1):t.length>=200&&(s=Ht,o=!1,t=new Kn(t));e:for(;++r<a;){var c=e[r],p=null==n?c:n(c);if(c=i||0!==c?c:0,o&&p==p){for(var h=l;h--;)if(t[h]===p)continue e;u.push(c)}else s(t,p,i)||u.push(c)}return u}jn.templateSettings={escape:Z,evaluate:X,interpolate:J,variable:"",imports:{_:jn}},jn.prototype=zn.prototype,jn.prototype.constructor=jn,qn.prototype=Vn(zn.prototype),qn.prototype.constructor=qn,Un.prototype=Vn(zn.prototype),Un.prototype.constructor=Un,$n.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},$n.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$n.prototype.get=function(e){var t=this.__data__;if(kn){var n=t[e];return n===o?r:n}return Pe.call(t,e)?t[e]:r},$n.prototype.has=function(e){var t=this.__data__;return kn?t[e]!==r:Pe.call(t,e)},$n.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kn&&t===r?o:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=ti(t,e);return!(n<0||(n==t.length-1?t.pop():it.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var t=this.__data__,n=ti(t,e);return n<0?r:t[n][1]},Hn.prototype.has=function(e){return ti(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,i=ti(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(Sn||Hn),string:new $n}},Wn.prototype.delete=function(e){var t=as(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return as(this,e).get(e)},Wn.prototype.has=function(e){return as(this,e).has(e)},Wn.prototype.set=function(e,t){var n=as(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,o),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Hn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var i=n.__data__;if(!Sn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(i)}return n.set(e,t),this.size=n.size,this};var pi=Ir(bi),hi=Ir(xi,!0);function di(e,t){var n=!0;return pi(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function fi(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(u===r?a==a&&!la(a):n(a,u)))var u=a,l=o}return l}function mi(e,t){var n=[];return pi(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function gi(e,t,n,i,r){var s=-1,o=e.length;for(n||(n=ms),r||(r=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?gi(a,t-1,n,i,r):_t(r,a):i||(r[r.length]=a)}return r}var vi=Fr(),yi=Fr(!0);function bi(e,t){return e&&vi(e,t,Fa)}function xi(e,t){return e&&yi(e,t,Fa)}function Ei(e,t){return wt(t,(function(t){return Yo(e[t])}))}function wi(e,t){for(var n=0,i=(t=vr(t,e)).length;null!=e&&n<i;)e=e[Ls(t[n++])];return n&&n==i?e:r}function Ci(e,t,n){var i=t(e);return Ho(e)?i:_t(i,n(e))}function Si(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in Se(e)?function(e){var t=Pe.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var s=Me.call(e);return i&&(t?e[at]=n:delete e[at]),s}(e):function(e){return Me.call(e)}(e)}function Di(e,t){return e>t}function _i(e,t){return null!=e&&Pe.call(e,t)}function Ai(e,t){return null!=e&&t in Se(e)}function ki(e,t,n){for(var s=n?St:Ct,o=e[0].length,a=e.length,u=a,l=i(a),c=1/0,p=[];u--;){var h=e[u];u&&t&&(h=Dt(h,Ut(t))),c=yn(h.length,c),l[u]=!n&&(t||o>=120&&h.length>=120)?new Kn(u&&h):r}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&p.length<c;){var m=h[d],g=t?t(m):m;if(m=n||0!==m?m:0,!(f?Ht(f,g):s(p,g,n))){for(u=a;--u;){var v=l[u];if(!(v?Ht(v,g):s(e[u],g,n)))continue e}f&&f.push(g),p.push(m)}}return p}function Ti(e,t,n){var i=null==(e=Ds(e,t=vr(t,e)))?e:e[Ls(Xs(t))];return null==i?r:vt(i,e,n)}function Oi(e){return na(e)&&Si(e)==m}function Ii(e,t,n,i,s){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,i,s,o){var a=Ho(e),u=Ho(t),l=a?g:hs(e),c=u?g:hs(t),p=(l=l==m?S:l)==S,h=(c=c==m?S:c)==S,d=l==c;if(d&&Zo(e)){if(!Zo(t))return!1;a=!0,p=!1}if(d&&!p)return o||(o=new Gn),a||ca(e)?Qr(e,t,n,i,s,o):function(e,t,n,i,r,s,o){switch(n){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!s(new qe(e),new qe(t)));case v:case y:case C:return zo(+e,+t);case b:return e.name==t.name&&e.message==t.message;case _:case k:return e==t+"";case w:var a=Qt;case A:var u=1&i;if(a||(a=nn),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;i|=2,o.set(e,t);var c=Qr(a(e),a(t),i,r,s,o);return o.delete(e),c;case T:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,l,n,i,s,o);if(!(1&n)){var f=p&&Pe.call(e,"__wrapped__"),x=h&&Pe.call(t,"__wrapped__");if(f||x){var E=f?e.value():e,D=x?t.value():t;return o||(o=new Gn),s(E,D,n,i,o)}}return!!d&&(o||(o=new Gn),function(e,t,n,i,s,o){var a=1&n,u=ts(e),l=u.length;if(l!=ts(t).length&&!a)return!1;for(var c=l;c--;){var p=u[c];if(!(a?p in t:Pe.call(t,p)))return!1}var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var m=a;++c<l;){var g=e[p=u[c]],v=t[p];if(i)var y=a?i(v,g,p,t,e,o):i(g,v,p,e,t,o);if(!(y===r?g===v||s(g,v,n,i,o):y)){f=!1;break}m||(m="constructor"==p)}if(f&&!m){var b=e.constructor,x=t.constructor;b==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,i,s,o))}(e,t,n,i,Ii,s))}function Fi(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=Se(e);s--;){var u=n[s];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++s<o;){var l=(u=n[s])[0],c=e[l],p=u[1];if(a&&u[2]){if(c===r&&!(l in e))return!1}else{var h=new Gn;if(i)var d=i(c,p,l,e,t,h);if(!(d===r?Ii(p,c,3,i,h):d))return!1}}return!0}function Pi(e){return!(!ta(e)||(t=e,Re&&Re in t))&&(Yo(e)?je:me).test(Bs(e));var t}function Ni(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Ho(e)?ji(e[0],e[1]):Bi(e):du(e)}function Ri(e){if(!Es(e))return gn(e);var t=[];for(var n in Se(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Mi(e,t){return e<t}function Li(e,t){var n=-1,r=Ko(e)?i(e.length):[];return pi(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function Bi(e){var t=us(e);return 1==t.length&&t[0][2]?Cs(t[0][0],t[0][1]):function(n){return n===e||Fi(n,e,t)}}function ji(e,t){return ys(e)&&ws(t)?Cs(Ls(e),t):function(n){var i=Aa(n,e);return i===r&&i===t?ka(n,e):Ii(t,i,3)}}function Vi(e,t,n,i,s){e!==t&&vi(t,(function(o,a){if(s||(s=new Gn),ta(o))!function(e,t,n,i,s,o,a){var u=As(e,n),l=As(t,n),c=a.get(l);if(c)Qn(e,n,c);else{var p=o?o(u,l,n+"",e,t,a):r,h=p===r;if(h){var d=Ho(l),f=!d&&Zo(l),m=!d&&!f&&ca(l);p=l,d||f||m?Ho(u)?p=u:Go(u)?p=Ar(u):f?(h=!1,p=Er(l,!0)):m?(h=!1,p=Cr(l,!0)):p=[]:sa(l)||$o(l)?(p=u,$o(u)?p=ya(u):ta(u)&&!Yo(u)||(p=fs(l))):h=!1}h&&(a.set(l,p),s(p,l,i,o,a),a.delete(l)),Qn(e,n,p)}}(e,t,a,n,Vi,i,s);else{var u=i?i(As(e,a),o,a+"",e,t,s):r;u===r&&(u=o),Qn(e,a,u)}}),Pa)}function zi(e,t){var n=e.length;if(n)return gs(t+=t<0?n:0,n)?e[t]:r}function qi(e,t,n){t=t.length?Dt(t,(function(e){return Ho(e)?function(t){return wi(t,1===e.length?e[0]:e)}:e})):[ru];var i=-1;t=Dt(t,Ut(os()));var r=Li(e,(function(e,n,r){var s=Dt(t,(function(t){return t(e)}));return{criteria:s,index:++i,value:e}}));return function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,s=t.criteria,o=r.length,a=n.length;++i<o;){var u=Sr(r[i],s[i]);if(u)return i>=a?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(r)}function Ui(e,t,n){for(var i=-1,r=t.length,s={};++i<r;){var o=t[i],a=wi(e,o);n(a,o)&&Ji(s,vr(o,e),a)}return s}function $i(e,t,n,i){var r=i?Nt:Pt,s=-1,o=t.length,a=e;for(e===t&&(t=Ar(t)),n&&(a=Dt(e,Ut(n)));++s<o;)for(var u=0,l=t[s],c=n?n(l):l;(u=r(a,c,u,i))>-1;)a!==e&&it.call(a,u,1),it.call(e,u,1);return e}function Hi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==s){var s=r;gs(r)?it.call(e,r,1):lr(e,r)}}return e}function Wi(e,t){return e+pn(En()*(t-e+1))}function Ki(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pn(t/2))&&(e+=e)}while(t);return n}function Gi(e,t){return Os(Ss(e,t,ru),e+"")}function Zi(e){return Xn(za(e))}function Xi(e,t){var n=za(e);return Ps(n,oi(t,0,n.length))}function Ji(e,t,n,i){if(!ta(e))return e;for(var s=-1,o=(t=vr(t,e)).length,a=o-1,u=e;null!=u&&++s<o;){var l=Ls(t[s]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var p=u[l];(c=i?i(p,l,u):r)===r&&(c=ta(p)?p:gs(t[s+1])?[]:{})}ei(u,l,c),u=u[l]}return e}var Yi=Tn?function(e,t){return Tn.set(e,t),e}:ru,Qi=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ru;function er(e){return Ps(za(e))}function tr(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=i(s);++r<s;)o[r]=e[r+t];return o}function nr(e,t){var n;return pi(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function ir(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var s=i+r>>>1,o=e[s];null!==o&&!la(o)&&(n?o<=t:o<t)?i=s+1:r=s}return r}return rr(e,t,ru,n)}function rr(e,t,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,u=null===t,l=la(t),c=t===r;s<o;){var p=pn((s+o)/2),h=n(e[p]),d=h!==r,f=null===h,m=h==h,g=la(h);if(a)var v=i||m;else v=c?m&&(i||d):u?m&&d&&(i||!f):l?m&&d&&!f&&(i||!g):!f&&!g&&(i?h<=t:h<t);v?s=p+1:o=p}return yn(o,4294967294)}function sr(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n],a=t?t(o):o;if(!n||!zo(a,u)){var u=a;s[r++]=0===o?0:o}}return s}function or(e){return"number"==typeof e?e:la(e)?h:+e}function ar(e){if("string"==typeof e)return e;if(Ho(e))return Dt(e,ar)+"";if(la(e))return Bn?Bn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ur(e,t,n){var i=-1,r=Ct,s=e.length,o=!0,a=[],u=a;if(n)o=!1,r=St;else if(s>=200){var l=t?null:Kr(e);if(l)return nn(l);o=!1,r=Ht,u=new Kn}else u=t?[]:a;e:for(;++i<s;){var c=e[i],p=t?t(c):c;if(c=n||0!==c?c:0,o&&p==p){for(var h=u.length;h--;)if(u[h]===p)continue e;t&&u.push(p),a.push(c)}else r(u,p,n)||(u!==a&&u.push(p),a.push(c))}return a}function lr(e,t){return null==(e=Ds(e,t=vr(t,e)))||delete e[Ls(Xs(t))]}function cr(e,t,n,i){return Ji(e,t,n(wi(e,t)),i)}function pr(e,t,n,i){for(var r=e.length,s=i?r:-1;(i?s--:++s<r)&&t(e[s],s,e););return n?tr(e,i?0:s,i?s+1:r):tr(e,i?s+1:0,i?r:s)}function hr(e,t){var n=e;return n instanceof Un&&(n=n.value()),At(t,(function(e,t){return t.func.apply(t.thisArg,_t([e],t.args))}),n)}function dr(e,t,n){var r=e.length;if(r<2)return r?ur(e[0]):[];for(var s=-1,o=i(r);++s<r;)for(var a=e[s],u=-1;++u<r;)u!=s&&(o[s]=ci(o[s]||a,e[u],t,n));return ur(gi(o,1),t,n)}function fr(e,t,n){for(var i=-1,s=e.length,o=t.length,a={};++i<s;){var u=i<o?t[i]:r;n(a,e[i],u)}return a}function mr(e){return Go(e)?e:[]}function gr(e){return"function"==typeof e?e:ru}function vr(e,t){return Ho(e)?e:ys(e,t)?[e]:Ms(ba(e))}var yr=Gi;function br(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:tr(e,t,n)}var xr=ct||function(e){return st.clearTimeout(e)};function Er(e,t){if(t)return e.slice();var n=e.length,i=Ue?Ue(n):new e.constructor(n);return e.copy(i),i}function wr(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Cr(e,t){var n=t?wr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Sr(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,o=la(e),a=t!==r,u=null===t,l=t==t,c=la(t);if(!u&&!c&&!o&&e>t||o&&a&&l&&!u&&!c||i&&a&&l||!n&&l||!s)return 1;if(!i&&!o&&!c&&e<t||c&&n&&s&&!i&&!o||u&&n&&s||!a&&s||!l)return-1}return 0}function Dr(e,t,n,r){for(var s=-1,o=e.length,a=n.length,u=-1,l=t.length,c=vn(o-a,0),p=i(l+c),h=!r;++u<l;)p[u]=t[u];for(;++s<a;)(h||s<o)&&(p[n[s]]=e[s]);for(;c--;)p[u++]=e[s++];return p}function _r(e,t,n,r){for(var s=-1,o=e.length,a=-1,u=n.length,l=-1,c=t.length,p=vn(o-u,0),h=i(p+c),d=!r;++s<p;)h[s]=e[s];for(var f=s;++l<c;)h[f+l]=t[l];for(;++a<u;)(d||s<o)&&(h[f+n[a]]=e[s++]);return h}function Ar(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function kr(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var u=t[o],l=i?i(n[u],e[u],u,n,e):r;l===r&&(l=e[u]),s?ri(n,u,l):ei(n,u,l)}return n}function Tr(e,t){return function(n,i){var r=Ho(n)?yt:ni,s=t?t():{};return r(n,e,os(i,2),s)}}function Or(e){return Gi((function(t,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&vs(n[0],n[1],a)&&(o=s<3?r:o,s=1),t=Se(t);++i<s;){var u=n[i];u&&e(t,u,i,o)}return t}))}function Ir(e,t){return function(n,i){if(null==n)return n;if(!Ko(n))return e(n,i);for(var r=n.length,s=t?r:-1,o=Se(n);(t?s--:++s<r)&&!1!==i(o[s],s,o););return n}}function Fr(e){return function(t,n,i){for(var r=-1,s=Se(t),o=i(t),a=o.length;a--;){var u=o[e?a:++r];if(!1===n(s[u],u,s))break}return t}}function Pr(e){return function(t){var n=Yt(t=ba(t))?on(t):r,i=n?n[0]:t.charAt(0),s=n?br(n,1).join(""):t.slice(1);return i[e]()+s}}function Nr(e){return function(t){return At(Ya($a(t).replace($e,"")),e,"")}}function Rr(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 n=Vn(e.prototype),i=e.apply(n,t);return ta(i)?i:n}}function Mr(e){return function(t,n,i){var s=Se(t);if(!Ko(t)){var o=os(n,3);t=Fa(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,i);return a>-1?s[o?t[a]:a]:r}}function Lr(e){return es((function(t){var n=t.length,i=n,o=qn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Ae(s);if(o&&!u&&"wrapper"==rs(a))var u=new qn([],!0)}for(i=u?i:n;++i<n;){var l=rs(a=t[i]),c="wrapper"==l?is(a):r;u=c&&bs(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[rs(c[0])].apply(u,c[3]):1==a.length&&bs(a)?u[l]():u.thru(a)}return function(){var e=arguments,i=e[0];if(u&&1==e.length&&Ho(i))return u.plant(i).value();for(var r=0,s=n?t[r].apply(this,e):i;++r<n;)s=t[r].call(this,s);return s}}))}function Br(e,t,n,s,o,a,u,c,p,h){var d=t&l,f=1&t,m=2&t,g=24&t,v=512&t,y=m?r:Rr(e);return function r(){for(var l=arguments.length,b=i(l),x=l;x--;)b[x]=arguments[x];if(g)var E=ss(r),w=Gt(b,E);if(s&&(b=Dr(b,s,o,g)),a&&(b=_r(b,a,u,g)),l-=w,g&&l<h){var C=tn(b,E);return Hr(e,t,Br,r.placeholder,n,b,C,c,p,h-l)}var S=f?n:this,D=m?S[e]:e;return l=b.length,c?b=_s(b,c):v&&l>1&&b.reverse(),d&&p<l&&(b.length=p),this&&this!==st&&this instanceof r&&(D=y||Rr(D)),D.apply(S,b)}}function jr(e,t){return function(n,i){return function(e,t,n,i){return bi(e,(function(e,r,s){t(i,n(e),r,s)})),i}(n,e,t(i),{})}}function Vr(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=ar(n),i=ar(i)):(n=or(n),i=or(i)),s=e(n,i)}return s}}function zr(e){return es((function(t){return t=Dt(t,Ut(os())),Gi((function(n){var i=this;return e(t,(function(e){return vt(e,i,n)}))}))}))}function qr(e,t){var n=(t=t===r?" ":ar(t)).length;if(n<2)return n?Ki(t,e):t;var i=Ki(t,cn(e/sn(t)));return Yt(t)?br(on(i),0,e).join(""):i.slice(0,e)}function Ur(e){return function(t,n,s){return s&&"number"!=typeof s&&vs(t,n,s)&&(n=s=r),t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n,r){for(var s=-1,o=vn(cn((t-e)/(n||1)),0),a=i(o);o--;)a[r?o:++s]=e,e+=n;return a}(t,n,s=s===r?t<n?1:-1:fa(s),e)}}function $r(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=va(t),n=va(n)),e(t,n)}}function Hr(e,t,n,i,s,o,a,l,c,p){var h=8&t;t|=h?u:64,4&(t&=~(h?64:u))||(t&=-4);var d=[e,t,s,h?o:r,h?a:r,h?r:o,h?r:a,l,c,p],f=n.apply(r,d);return bs(e)&&ks(f,d),f.placeholder=i,Is(f,e,t)}function Wr(e){var t=Ce[e];return function(e,n){if(e=va(e),(n=null==n?0:yn(ma(n),292))&&fn(e)){var i=(ba(e)+"e").split("e");return+((i=(ba(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Kr=_n&&1/nn(new _n([,-0]))[1]==c?function(e){return new _n(e)}:lu;function Gr(e){return function(t){var n=hs(t);return n==w?Qt(t):n==A?rn(t):function(e,t){return Dt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zr(e,t,n,o,c,p,h,d){var f=2&t;if(!f&&"function"!=typeof e)throw new Ae(s);var m=o?o.length:0;if(m||(t&=-97,o=c=r),h=h===r?h:vn(ma(h),0),d=d===r?d:ma(d),m-=c?c.length:0,64&t){var g=o,v=c;o=c=r}var y=f?r:is(e),b=[e,t,n,o,c,g,v,p,h,d];if(y&&function(e,t){var n=e[1],i=t[1],r=n|i,s=r<131,o=i==l&&8==n||i==l&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!s&&!o)return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Dr(c,u,t[4]):u,e[4]=c?tn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?_r(c,u,t[6]):u,e[6]=c?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),i&l&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(b,y),e=b[0],t=b[1],n=b[2],o=b[3],c=b[4],!(d=b[9]=b[9]===r?f?0:e.length:vn(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?function(e,t,n){var s=Rr(e);return function o(){for(var a=arguments.length,u=i(a),l=a,c=ss(o);l--;)u[l]=arguments[l];var p=a<3&&u[0]!==c&&u[a-1]!==c?[]:tn(u,c);return(a-=p.length)<n?Hr(e,t,Br,o.placeholder,r,u,p,r,r,n-a):vt(this&&this!==st&&this instanceof o?s:e,this,u)}}(e,t,d):t!=u&&33!=t||c.length?Br.apply(r,b):function(e,t,n,r){var s=1&t,o=Rr(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=r.length,p=i(c+u),h=this&&this!==st&&this instanceof t?o:e;++l<c;)p[l]=r[l];for(;u--;)p[l++]=arguments[++a];return vt(h,s?n:this,p)}}(e,t,n,o);else var x=function(e,t,n){var i=1&t,r=Rr(e);return function t(){return(this&&this!==st&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return Is((y?Yi:ks)(x,b),e,t)}function Xr(e,t,n,i){return e===r||zo(e,Oe[n])&&!Pe.call(i,n)?t:e}function Jr(e,t,n,i,s,o){return ta(e)&&ta(t)&&(o.set(t,e),Vi(e,t,r,Jr,o),o.delete(t)),e}function Yr(e){return sa(e)?r:e}function Qr(e,t,n,i,s,o){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=o.get(e),p=o.get(t);if(c&&p)return c==t&&p==e;var h=-1,d=!0,f=2&n?new Kn:r;for(o.set(e,t),o.set(t,e);++h<u;){var m=e[h],g=t[h];if(i)var v=a?i(g,m,h,t,e,o):i(m,g,h,e,t,o);if(v!==r){if(v)continue;d=!1;break}if(f){if(!Tt(t,(function(e,t){if(!Ht(f,t)&&(m===e||s(m,e,n,i,o)))return f.push(t)}))){d=!1;break}}else if(m!==g&&!s(m,g,n,i,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function es(e){return Os(Ss(e,r,Hs),e+"")}function ts(e){return Ci(e,Fa,cs)}function ns(e){return Ci(e,Pa,ps)}var is=Tn?function(e){return Tn.get(e)}:lu;function rs(e){for(var t=e.name+"",n=On[t],i=Pe.call(On,t)?n.length:0;i--;){var r=n[i],s=r.func;if(null==s||s==e)return r.name}return t}function ss(e){return(Pe.call(jn,"placeholder")?jn:e).placeholder}function os(){var e=jn.iteratee||su;return e=e===su?Ni:e,arguments.length?e(arguments[0],arguments[1]):e}function as(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function us(e){for(var t=Fa(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,ws(r)]}return t}function ls(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Pi(n)?n:r}var cs=hn?function(e){return null==e?[]:(e=Se(e),wt(hn(e),(function(t){return et.call(e,t)})))}:gu,ps=hn?function(e){for(var t=[];e;)_t(t,cs(e)),e=We(e);return t}:gu,hs=Si;function ds(e,t,n){for(var i=-1,r=(t=vr(t,e)).length,s=!1;++i<r;){var o=Ls(t[i]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++i!=r?s:!!(r=null==e?0:e.length)&&ea(r)&&gs(o,r)&&(Ho(e)||$o(e))}function fs(e){return"function"!=typeof e.constructor||Es(e)?{}:Vn(We(e))}function ms(e){return Ho(e)||$o(e)||!!(rt&&e&&e[rt])}function gs(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function vs(e,t,n){if(!ta(n))return!1;var i=typeof t;return!!("number"==i?Ko(n)&&gs(t,n.length):"string"==i&&t in n)&&zo(n[t],e)}function ys(e,t){if(Ho(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||Q.test(e)||!Y.test(e)||null!=t&&e in Se(t)}function bs(e){var t=rs(e),n=jn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var i=is(n);return!!i&&e===i[0]}(Cn&&hs(new Cn(new ArrayBuffer(1)))!=F||Sn&&hs(new Sn)!=w||Dn&&hs(Dn.resolve())!=D||_n&&hs(new _n)!=A||An&&hs(new An)!=O)&&(hs=function(e){var t=Si(e),n=t==S?e.constructor:r,i=n?Bs(n):"";if(i)switch(i){case In:return F;case Fn:return w;case Pn:return D;case Nn:return A;case Rn:return O}return t});var xs=Ie?Yo:vu;function Es(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function ws(e){return e==e&&!ta(e)}function Cs(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in Se(n))}}function Ss(e,t,n){return t=vn(t===r?e.length-1:t,0),function(){for(var r=arguments,s=-1,o=vn(r.length-t,0),a=i(o);++s<o;)a[s]=r[t+s];s=-1;for(var u=i(t+1);++s<t;)u[s]=r[s];return u[t]=n(a),vt(e,this,u)}}function Ds(e,t){return t.length<2?e:wi(e,tr(t,0,-1))}function _s(e,t){for(var n=e.length,i=yn(t.length,n),s=Ar(e);i--;){var o=t[i];e[i]=gs(o,n)?s[o]:r}return e}function As(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ks=Fs(Yi),Ts=Bt||function(e,t){return st.setTimeout(e,t)},Os=Fs(Qi);function Is(e,t,n){var i=t+"";return Os(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return bt(f,(function(n){var i="_."+n[0];t&n[1]&&!Ct(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(i),n)))}function Fs(e){var t=0,n=0;return function(){var i=bn(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Ps(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var o=Wi(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var Ns,Rs,Ms=(Ns=Ro((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Rs.size&&Rs.clear(),e})),Rs=Ns.cache,Ns);function Ls(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bs(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function js(e){if(e instanceof Un)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Ar(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vs=Gi((function(e,t){return Go(e)?ci(e,gi(t,1,Go,!0)):[]})),zs=Gi((function(e,t){var n=Xs(t);return Go(n)&&(n=r),Go(e)?ci(e,gi(t,1,Go,!0),os(n,2)):[]})),qs=Gi((function(e,t){var n=Xs(t);return Go(n)&&(n=r),Go(e)?ci(e,gi(t,1,Go,!0),r,n):[]}));function Us(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=vn(i+r,0)),Ft(e,os(t,3),r)}function $s(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=ma(n),s=n<0?vn(i+s,0):yn(s,i-1)),Ft(e,os(t,3),s,!0)}function Hs(e){return null!=e&&e.length?gi(e,1):[]}function Ws(e){return e&&e.length?e[0]:r}var Ks=Gi((function(e){var t=Dt(e,mr);return t.length&&t[0]===e[0]?ki(t):[]})),Gs=Gi((function(e){var t=Xs(e),n=Dt(e,mr);return t===Xs(n)?t=r:n.pop(),n.length&&n[0]===e[0]?ki(n,os(t,2)):[]})),Zs=Gi((function(e){var t=Xs(e),n=Dt(e,mr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?ki(n,r,t):[]}));function Xs(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Js=Gi(Ys);function Ys(e,t){return e&&e.length&&t&&t.length?$i(e,t):e}var Qs=es((function(e,t){var n=null==e?0:e.length,i=si(e,t);return Hi(e,Dt(t,(function(e){return gs(e,n)?+e:e})).sort(Sr)),i}));function eo(e){return null==e?e:wn.call(e)}var to=Gi((function(e){return ur(gi(e,1,Go,!0))})),no=Gi((function(e){var t=Xs(e);return Go(t)&&(t=r),ur(gi(e,1,Go,!0),os(t,2))})),io=Gi((function(e){var t=Xs(e);return t="function"==typeof t?t:r,ur(gi(e,1,Go,!0),r,t)}));function ro(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Go(e))return t=vn(e.length,t),!0})),zt(t,(function(t){return Dt(e,Lt(t))}))}function so(e,t){if(!e||!e.length)return[];var n=ro(e);return null==t?n:Dt(n,(function(e){return vt(t,r,e)}))}var oo=Gi((function(e,t){return Go(e)?ci(e,t):[]})),ao=Gi((function(e){return dr(wt(e,Go))})),uo=Gi((function(e){var t=Xs(e);return Go(t)&&(t=r),dr(wt(e,Go),os(t,2))})),lo=Gi((function(e){var t=Xs(e);return t="function"==typeof t?t:r,dr(wt(e,Go),r,t)})),co=Gi(ro),po=Gi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,so(e,n)}));function ho(e){var t=jn(e);return t.__chain__=!0,t}function fo(e,t){return t(e)}var mo=es((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return si(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Un&&gs(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:fo,args:[s],thisArg:r}),new qn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)})),go=Tr((function(e,t,n){Pe.call(e,n)?++e[n]:ri(e,n,1)})),vo=Mr(Us),yo=Mr($s);function bo(e,t){return(Ho(e)?bt:pi)(e,os(t,3))}function xo(e,t){return(Ho(e)?xt:hi)(e,os(t,3))}var Eo=Tr((function(e,t,n){Pe.call(e,n)?e[n].push(t):ri(e,n,[t])})),wo=Gi((function(e,t,n){var r=-1,s="function"==typeof t,o=Ko(e)?i(e.length):[];return pi(e,(function(e){o[++r]=s?vt(t,e,n):Ti(e,t,n)})),o})),Co=Tr((function(e,t,n){ri(e,n,t)}));function So(e,t){return(Ho(e)?Dt:Li)(e,os(t,3))}var Do=Tr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),_o=Gi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vs(e,t[0],t[1])?t=[]:n>2&&vs(t[0],t[1],t[2])&&(t=[t[0]]),qi(e,gi(t,1),[])})),Ao=Ot||function(){return st.Date.now()};function ko(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Zr(e,l,r,r,r,r,t)}function To(e,t){var n;if("function"!=typeof t)throw new Ae(s);return e=ma(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Oo=Gi((function(e,t,n){var i=1;if(n.length){var r=tn(n,ss(Oo));i|=u}return Zr(e,i,t,n,r)})),Io=Gi((function(e,t,n){var i=3;if(n.length){var r=tn(n,ss(Io));i|=u}return Zr(t,i,e,n,r)}));function Fo(e,t,n){var i,o,a,u,l,c,p=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw new Ae(s);function m(t){var n=i,s=o;return i=o=r,p=t,u=e.apply(s,n)}function g(e){return p=e,l=Ts(y,t),h?m(e):u}function v(e){var n=e-c;return c===r||n>=t||n<0||d&&e-p>=a}function y(){var e=Ao();if(v(e))return b(e);l=Ts(y,function(e){var n=t-(e-c);return d?yn(n,a-(e-p)):n}(e))}function b(e){return l=r,f&&i?m(e):(i=o=r,u)}function x(){var e=Ao(),n=v(e);if(i=arguments,o=this,c=e,n){if(l===r)return g(c);if(d)return xr(l),l=Ts(y,t),m(c)}return l===r&&(l=Ts(y,t)),u}return t=va(t)||0,ta(n)&&(h=!!n.leading,a=(d="maxWait"in n)?vn(va(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),x.cancel=function(){l!==r&&xr(l),p=0,i=c=o=l=r},x.flush=function(){return l===r?u:b(Ao())},x}var Po=Gi((function(e,t){return li(e,1,t)})),No=Gi((function(e,t,n){return li(e,va(t)||0,n)}));function Ro(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(s);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Ro.Cache||Wn),n}function Mo(e){if("function"!=typeof e)throw new Ae(s);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)}}Ro.Cache=Wn;var Lo=yr((function(e,t){var n=(t=1==t.length&&Ho(t[0])?Dt(t[0],Ut(os())):Dt(gi(t,1),Ut(os()))).length;return Gi((function(i){for(var r=-1,s=yn(i.length,n);++r<s;)i[r]=t[r].call(this,i[r]);return vt(e,this,i)}))})),Bo=Gi((function(e,t){var n=tn(t,ss(Bo));return Zr(e,u,r,t,n)})),jo=Gi((function(e,t){var n=tn(t,ss(jo));return Zr(e,64,r,t,n)})),Vo=es((function(e,t){return Zr(e,256,r,r,r,t)}));function zo(e,t){return e===t||e!=e&&t!=t}var qo=$r(Di),Uo=$r((function(e,t){return e>=t})),$o=Oi(function(){return arguments}())?Oi:function(e){return na(e)&&Pe.call(e,"callee")&&!et.call(e,"callee")},Ho=i.isArray,Wo=pt?Ut(pt):function(e){return na(e)&&Si(e)==I};function Ko(e){return null!=e&&ea(e.length)&&!Yo(e)}function Go(e){return na(e)&&Ko(e)}var Zo=dn||vu,Xo=ht?Ut(ht):function(e){return na(e)&&Si(e)==y};function Jo(e){if(!na(e))return!1;var t=Si(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!sa(e)}function Yo(e){if(!ta(e))return!1;var t=Si(e);return t==x||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qo(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ia=dt?Ut(dt):function(e){return na(e)&&hs(e)==w};function ra(e){return"number"==typeof e||na(e)&&Si(e)==C}function sa(e){if(!na(e)||Si(e)!=S)return!1;var t=We(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==Le}var oa=ft?Ut(ft):function(e){return na(e)&&Si(e)==_},aa=mt?Ut(mt):function(e){return na(e)&&hs(e)==A};function ua(e){return"string"==typeof e||!Ho(e)&&na(e)&&Si(e)==k}function la(e){return"symbol"==typeof e||na(e)&&Si(e)==T}var ca=gt?Ut(gt):function(e){return na(e)&&ea(e.length)&&!!Ye[Si(e)]},pa=$r(Mi),ha=$r((function(e,t){return e<=t}));function da(e){if(!e)return[];if(Ko(e))return ua(e)?on(e):Ar(e);if(ot&&e[ot])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ot]());var t=hs(e);return(t==w?Qt:t==A?nn:za)(e)}function fa(e){return e?(e=va(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?oi(ma(e),0,d):0}function va(e){if("number"==typeof e)return e;if(la(e))return h;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=qt(e);var n=fe.test(e);return n||ge.test(e)?nt(e.slice(2),n?2:8):de.test(e)?h:+e}function ya(e){return kr(e,Pa(e))}function ba(e){return null==e?"":ar(e)}var xa=Or((function(e,t){if(Es(t)||Ko(t))kr(t,Fa(t),e);else for(var n in t)Pe.call(t,n)&&ei(e,n,t[n])})),Ea=Or((function(e,t){kr(t,Pa(t),e)})),wa=Or((function(e,t,n,i){kr(t,Pa(t),e,i)})),Ca=Or((function(e,t,n,i){kr(t,Fa(t),e,i)})),Sa=es(si),Da=Gi((function(e,t){e=Se(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&vs(t[0],t[1],s)&&(i=1);++n<i;)for(var o=t[n],a=Pa(o),u=-1,l=a.length;++u<l;){var c=a[u],p=e[c];(p===r||zo(p,Oe[c])&&!Pe.call(e,c))&&(e[c]=o[c])}return e})),_a=Gi((function(e){return e.push(r,Jr),vt(Ra,r,e)}));function Aa(e,t,n){var i=null==e?r:wi(e,t);return i===r?n:i}function ka(e,t){return null!=e&&ds(e,t,Ai)}var Ta=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),e[t]=n}),tu(ru)),Oa=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),os),Ia=Gi(Ti);function Fa(e){return Ko(e)?Zn(e):Ri(e)}function Pa(e){return Ko(e)?Zn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Se(e))t.push(n);return t}(e);var t=Es(e),n=[];for(var i in e)("constructor"!=i||!t&&Pe.call(e,i))&&n.push(i);return n}(e)}var Na=Or((function(e,t,n){Vi(e,t,n)})),Ra=Or((function(e,t,n,i){Vi(e,t,n,i)})),Ma=es((function(e,t){var n={};if(null==e)return n;var i=!1;t=Dt(t,(function(t){return t=vr(t,e),i||(i=t.length>1),t})),kr(e,ns(e),n),i&&(n=ai(n,7,Yr));for(var r=t.length;r--;)lr(n,t[r]);return n})),La=es((function(e,t){return null==e?{}:function(e,t){return Ui(e,t,(function(t,n){return ka(e,n)}))}(e,t)}));function Ba(e,t){if(null==e)return{};var n=Dt(ns(e),(function(e){return[e]}));return t=os(t),Ui(e,n,(function(e,n){return t(e,n[0])}))}var ja=Gr(Fa),Va=Gr(Pa);function za(e){return null==e?[]:$t(e,Fa(e))}var qa=Nr((function(e,t,n){return t=t.toLowerCase(),e+(n?Ua(t):t)}));function Ua(e){return Ja(ba(e).toLowerCase())}function $a(e){return(e=ba(e))&&e.replace(ye,Zt).replace(He,"")}var Ha=Nr((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Wa=Nr((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ka=Pr("toLowerCase"),Ga=Nr((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Za=Nr((function(e,t,n){return e+(n?" ":"")+Ja(t)})),Xa=Nr((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=Pr("toUpperCase");function Ya(e,t,n){return e=ba(e),(t=n?r:t)===r?function(e){return Ze.test(e)}(e)?function(e){return e.match(Ke)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Qa=Gi((function(e,t){try{return vt(e,r,t)}catch(e){return Jo(e)?e:new Ee(e)}})),eu=es((function(e,t){return bt(t,(function(t){t=Ls(t),ri(e,t,Oo(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Lr(),iu=Lr(!0);function ru(e){return e}function su(e){return Ni("function"==typeof e?e:ai(e,1))}var ou=Gi((function(e,t){return function(n){return Ti(n,e,t)}})),au=Gi((function(e,t){return function(n){return Ti(e,n,t)}}));function uu(e,t,n){var i=Fa(t),r=Ei(t,i);null!=n||ta(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=Ei(t,Fa(t)));var s=!(ta(n)&&"chain"in n&&!n.chain),o=Yo(e);return bt(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),r=n.__actions__=Ar(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,_t([this.value()],arguments))})})),e}function lu(){}var cu=zr(Dt),pu=zr(Et),hu=zr(Tt);function du(e){return ys(e)?Lt(Ls(e)):function(e){return function(t){return wi(t,e)}}(e)}var fu=Ur(),mu=Ur(!0);function gu(){return[]}function vu(){return!1}var yu,bu=Vr((function(e,t){return e+t}),0),xu=Wr("ceil"),Eu=Vr((function(e,t){return e/t}),1),wu=Wr("floor"),Cu=Vr((function(e,t){return e*t}),1),Su=Wr("round"),Du=Vr((function(e,t){return e-t}),0);return jn.after=function(e,t){if("function"!=typeof t)throw new Ae(s);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},jn.ary=ko,jn.assign=xa,jn.assignIn=Ea,jn.assignInWith=wa,jn.assignWith=Ca,jn.at=Sa,jn.before=To,jn.bind=Oo,jn.bindAll=eu,jn.bindKey=Io,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ho(e)?e:[e]},jn.chain=ho,jn.chunk=function(e,t,n){t=(n?vs(e,t,n):t===r)?1:vn(ma(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var o=0,a=0,u=i(cn(s/t));o<s;)u[a++]=tr(e,o,o+=t);return u},jn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var s=e[t];s&&(r[i++]=s)}return r},jn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return _t(Ho(n)?Ar(n):[n],gi(t,1))},jn.cond=function(e){var t=null==e?0:e.length,n=os();return e=t?Dt(e,(function(e){if("function"!=typeof e[1])throw new Ae(s);return[n(e[0]),e[1]]})):[],Gi((function(n){for(var i=-1;++i<t;){var r=e[i];if(vt(r[0],this,n))return vt(r[1],this,n)}}))},jn.conforms=function(e){return function(e){var t=Fa(e);return function(n){return ui(n,e,t)}}(ai(e,1))},jn.constant=tu,jn.countBy=go,jn.create=function(e,t){var n=Vn(e);return null==t?n:ii(n,t)},jn.curry=function e(t,n,i){var s=Zr(t,8,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},jn.curryRight=function e(t,n,i){var s=Zr(t,16,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},jn.debounce=Fo,jn.defaults=Da,jn.defaultsDeep=_a,jn.defer=Po,jn.delay=No,jn.difference=Vs,jn.differenceBy=zs,jn.differenceWith=qs,jn.drop=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=n||t===r?1:ma(t))<0?0:t,i):[]},jn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,0,(t=i-(t=n||t===r?1:ma(t)))<0?0:t):[]},jn.dropRightWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!0,!0):[]},jn.dropWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!0):[]},jn.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&vs(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=ma(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:ma(i))<0&&(i+=s),i=n>i?0:ga(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},jn.filter=function(e,t){return(Ho(e)?wt:mi)(e,os(t,3))},jn.flatMap=function(e,t){return gi(So(e,t),1)},jn.flatMapDeep=function(e,t){return gi(So(e,t),c)},jn.flatMapDepth=function(e,t,n){return n=n===r?1:ma(n),gi(So(e,t),n)},jn.flatten=Hs,jn.flattenDeep=function(e){return null!=e&&e.length?gi(e,c):[]},jn.flattenDepth=function(e,t){return null!=e&&e.length?gi(e,t=t===r?1:ma(t)):[]},jn.flip=function(e){return Zr(e,512)},jn.flow=nu,jn.flowRight=iu,jn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},jn.functions=function(e){return null==e?[]:Ei(e,Fa(e))},jn.functionsIn=function(e){return null==e?[]:Ei(e,Pa(e))},jn.groupBy=Eo,jn.initial=function(e){return null!=e&&e.length?tr(e,0,-1):[]},jn.intersection=Ks,jn.intersectionBy=Gs,jn.intersectionWith=Zs,jn.invert=Ta,jn.invertBy=Oa,jn.invokeMap=wo,jn.iteratee=su,jn.keyBy=Co,jn.keys=Fa,jn.keysIn=Pa,jn.map=So,jn.mapKeys=function(e,t){var n={};return t=os(t,3),bi(e,(function(e,i,r){ri(n,t(e,i,r),e)})),n},jn.mapValues=function(e,t){var n={};return t=os(t,3),bi(e,(function(e,i,r){ri(n,i,t(e,i,r))})),n},jn.matches=function(e){return Bi(ai(e,1))},jn.matchesProperty=function(e,t){return ji(e,ai(t,1))},jn.memoize=Ro,jn.merge=Na,jn.mergeWith=Ra,jn.method=ou,jn.methodOf=au,jn.mixin=uu,jn.negate=Mo,jn.nthArg=function(e){return e=ma(e),Gi((function(t){return zi(t,e)}))},jn.omit=Ma,jn.omitBy=function(e,t){return Ba(e,Mo(os(t)))},jn.once=function(e){return To(2,e)},jn.orderBy=function(e,t,n,i){return null==e?[]:(Ho(t)||(t=null==t?[]:[t]),Ho(n=i?r:n)||(n=null==n?[]:[n]),qi(e,t,n))},jn.over=cu,jn.overArgs=Lo,jn.overEvery=pu,jn.overSome=hu,jn.partial=Bo,jn.partialRight=jo,jn.partition=Do,jn.pick=La,jn.pickBy=Ba,jn.property=du,jn.propertyOf=function(e){return function(t){return null==e?r:wi(e,t)}},jn.pull=Js,jn.pullAll=Ys,jn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,os(n,2)):e},jn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,r,n):e},jn.pullAt=Qs,jn.range=fu,jn.rangeRight=mu,jn.rearg=Vo,jn.reject=function(e,t){return(Ho(e)?wt:mi)(e,Mo(os(t,3)))},jn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],s=e.length;for(t=os(t,3);++i<s;){var o=e[i];t(o,i,e)&&(n.push(o),r.push(i))}return Hi(e,r),n},jn.rest=function(e,t){if("function"!=typeof e)throw new Ae(s);return Gi(e,t=t===r?t:ma(t))},jn.reverse=eo,jn.sampleSize=function(e,t,n){return t=(n?vs(e,t,n):t===r)?1:ma(t),(Ho(e)?Jn:Xi)(e,t)},jn.set=function(e,t,n){return null==e?e:Ji(e,t,n)},jn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Ji(e,t,n,i)},jn.shuffle=function(e){return(Ho(e)?Yn:er)(e)},jn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&vs(e,t,n)?(t=0,n=i):(t=null==t?0:ma(t),n=n===r?i:ma(n)),tr(e,t,n)):[]},jn.sortBy=_o,jn.sortedUniq=function(e){return e&&e.length?sr(e):[]},jn.sortedUniqBy=function(e,t){return e&&e.length?sr(e,os(t,2)):[]},jn.split=function(e,t,n){return n&&"number"!=typeof n&&vs(e,t,n)&&(t=n=r),(n=n===r?d:n>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!oa(t))&&!(t=ar(t))&&Yt(e)?br(on(e),0,n):e.split(t,n):[]},jn.spread=function(e,t){if("function"!=typeof e)throw new Ae(s);return t=null==t?0:vn(ma(t),0),Gi((function(n){var i=n[t],r=br(n,0,t);return i&&_t(r,i),vt(e,this,r)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?tr(e,1,t):[]},jn.take=function(e,t,n){return e&&e.length?tr(e,0,(t=n||t===r?1:ma(t))<0?0:t):[]},jn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?tr(e,(t=i-(t=n||t===r?1:ma(t)))<0?0:t,i):[]},jn.takeRightWhile=function(e,t){return e&&e.length?pr(e,os(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?pr(e,os(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Ae(s);return ta(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Fo(e,t,{leading:i,maxWait:t,trailing:r})},jn.thru=fo,jn.toArray=da,jn.toPairs=ja,jn.toPairsIn=Va,jn.toPath=function(e){return Ho(e)?Dt(e,Ls):la(e)?[e]:Ar(Ms(ba(e)))},jn.toPlainObject=ya,jn.transform=function(e,t,n){var i=Ho(e),r=i||Zo(e)||ca(e);if(t=os(t,4),null==n){var s=e&&e.constructor;n=r?i?new s:[]:ta(e)&&Yo(s)?Vn(We(e)):{}}return(r?bt:bi)(e,(function(e,i,r){return t(n,e,i,r)})),n},jn.unary=function(e){return ko(e,1)},jn.union=to,jn.unionBy=no,jn.unionWith=io,jn.uniq=function(e){return e&&e.length?ur(e):[]},jn.uniqBy=function(e,t){return e&&e.length?ur(e,os(t,2)):[]},jn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ur(e,r,t):[]},jn.unset=function(e,t){return null==e||lr(e,t)},jn.unzip=ro,jn.unzipWith=so,jn.update=function(e,t,n){return null==e?e:cr(e,t,gr(n))},jn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:cr(e,t,gr(n),i)},jn.values=za,jn.valuesIn=function(e){return null==e?[]:$t(e,Pa(e))},jn.without=oo,jn.words=Ya,jn.wrap=function(e,t){return Bo(gr(t),e)},jn.xor=ao,jn.xorBy=uo,jn.xorWith=lo,jn.zip=co,jn.zipObject=function(e,t){return fr(e||[],t||[],ei)},jn.zipObjectDeep=function(e,t){return fr(e||[],t||[],Ji)},jn.zipWith=po,jn.entries=ja,jn.entriesIn=Va,jn.extend=Ea,jn.extendWith=wa,uu(jn,jn),jn.add=bu,jn.attempt=Qa,jn.camelCase=qa,jn.capitalize=Ua,jn.ceil=xu,jn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=va(n))==n?n:0),t!==r&&(t=(t=va(t))==t?t:0),oi(va(e),t,n)},jn.clone=function(e){return ai(e,4)},jn.cloneDeep=function(e){return ai(e,5)},jn.cloneDeepWith=function(e,t){return ai(e,5,t="function"==typeof t?t:r)},jn.cloneWith=function(e,t){return ai(e,4,t="function"==typeof t?t:r)},jn.conformsTo=function(e,t){return null==t||ui(e,t,Fa(t))},jn.deburr=$a,jn.defaultTo=function(e,t){return null==e||e!=e?t:e},jn.divide=Eu,jn.endsWith=function(e,t,n){e=ba(e),t=ar(t);var i=e.length,s=n=n===r?i:oi(ma(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},jn.eq=zo,jn.escape=function(e){return(e=ba(e))&&G.test(e)?e.replace(W,Xt):e},jn.escapeRegExp=function(e){return(e=ba(e))&&ne.test(e)?e.replace(te,"\\$&"):e},jn.every=function(e,t,n){var i=Ho(e)?Et:di;return n&&vs(e,t,n)&&(t=r),i(e,os(t,3))},jn.find=vo,jn.findIndex=Us,jn.findKey=function(e,t){return It(e,os(t,3),bi)},jn.findLast=yo,jn.findLastIndex=$s,jn.findLastKey=function(e,t){return It(e,os(t,3),xi)},jn.floor=wu,jn.forEach=bo,jn.forEachRight=xo,jn.forIn=function(e,t){return null==e?e:vi(e,os(t,3),Pa)},jn.forInRight=function(e,t){return null==e?e:yi(e,os(t,3),Pa)},jn.forOwn=function(e,t){return e&&bi(e,os(t,3))},jn.forOwnRight=function(e,t){return e&&xi(e,os(t,3))},jn.get=Aa,jn.gt=qo,jn.gte=Uo,jn.has=function(e,t){return null!=e&&ds(e,t,_i)},jn.hasIn=ka,jn.head=Ws,jn.identity=ru,jn.includes=function(e,t,n,i){e=Ko(e)?e:za(e),n=n&&!i?ma(n):0;var r=e.length;return n<0&&(n=vn(r+n,0)),ua(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&Pt(e,t,n)>-1},jn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=vn(i+r,0)),Pt(e,t,r)},jn.inRange=function(e,t,n){return t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n){return e>=yn(t,n)&&e<vn(t,n)}(e=va(e),t,n)},jn.invoke=Ia,jn.isArguments=$o,jn.isArray=Ho,jn.isArrayBuffer=Wo,jn.isArrayLike=Ko,jn.isArrayLikeObject=Go,jn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Si(e)==v},jn.isBuffer=Zo,jn.isDate=Xo,jn.isElement=function(e){return na(e)&&1===e.nodeType&&!sa(e)},jn.isEmpty=function(e){if(null==e)return!0;if(Ko(e)&&(Ho(e)||"string"==typeof e||"function"==typeof e.splice||Zo(e)||ca(e)||$o(e)))return!e.length;var t=hs(e);if(t==w||t==A)return!e.size;if(Es(e))return!Ri(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},jn.isEqual=function(e,t){return Ii(e,t)},jn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Ii(e,t,r,n):!!i},jn.isError=Jo,jn.isFinite=function(e){return"number"==typeof e&&fn(e)},jn.isFunction=Yo,jn.isInteger=Qo,jn.isLength=ea,jn.isMap=ia,jn.isMatch=function(e,t){return e===t||Fi(e,t,us(t))},jn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Fi(e,t,us(t),n)},jn.isNaN=function(e){return ra(e)&&e!=+e},jn.isNative=function(e){if(xs(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pi(e)},jn.isNil=function(e){return null==e},jn.isNull=function(e){return null===e},jn.isNumber=ra,jn.isObject=ta,jn.isObjectLike=na,jn.isPlainObject=sa,jn.isRegExp=oa,jn.isSafeInteger=function(e){return Qo(e)&&e>=-9007199254740991&&e<=p},jn.isSet=aa,jn.isString=ua,jn.isSymbol=la,jn.isTypedArray=ca,jn.isUndefined=function(e){return e===r},jn.isWeakMap=function(e){return na(e)&&hs(e)==O},jn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Si(e)},jn.join=function(e,t){return null==e?"":mn.call(e,t)},jn.kebabCase=Ha,jn.last=Xs,jn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=ma(n))<0?vn(i+s,0):yn(s,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,s):Ft(e,Rt,s,!0)},jn.lowerCase=Wa,jn.lowerFirst=Ka,jn.lt=pa,jn.lte=ha,jn.max=function(e){return e&&e.length?fi(e,ru,Di):r},jn.maxBy=function(e,t){return e&&e.length?fi(e,os(t,2),Di):r},jn.mean=function(e){return Mt(e,ru)},jn.meanBy=function(e,t){return Mt(e,os(t,2))},jn.min=function(e){return e&&e.length?fi(e,ru,Mi):r},jn.minBy=function(e,t){return e&&e.length?fi(e,os(t,2),Mi):r},jn.stubArray=gu,jn.stubFalse=vu,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=Cu,jn.nth=function(e,t){return e&&e.length?zi(e,ma(t)):r},jn.noConflict=function(){return st._===this&&(st._=Be),this},jn.noop=lu,jn.now=Ao,jn.pad=function(e,t,n){e=ba(e);var i=(t=ma(t))?sn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return qr(pn(r),n)+e+qr(cn(r),n)},jn.padEnd=function(e,t,n){e=ba(e);var i=(t=ma(t))?sn(e):0;return t&&i<t?e+qr(t-i,n):e},jn.padStart=function(e,t,n){e=ba(e);var i=(t=ma(t))?sn(e):0;return t&&i<t?qr(t-i,n)+e:e},jn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),xn(ba(e).replace(ie,""),t||0)},jn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vs(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=fa(e),t===r?(t=e,e=0):t=fa(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=En();return yn(e+s*(t-e+tt("1e-"+((s+"").length-1))),t)}return Wi(e,t)},jn.reduce=function(e,t,n){var i=Ho(e)?At:jt,r=arguments.length<3;return i(e,os(t,4),n,r,pi)},jn.reduceRight=function(e,t,n){var i=Ho(e)?kt:jt,r=arguments.length<3;return i(e,os(t,4),n,r,hi)},jn.repeat=function(e,t,n){return t=(n?vs(e,t,n):t===r)?1:ma(t),Ki(ba(e),t)},jn.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(e,t,n){var i=-1,s=(t=vr(t,e)).length;for(s||(s=1,e=r);++i<s;){var o=null==e?r:e[Ls(t[i])];o===r&&(i=s,o=n),e=Yo(o)?o.call(e):o}return e},jn.round=Su,jn.runInContext=e,jn.sample=function(e){return(Ho(e)?Xn:Zi)(e)},jn.size=function(e){if(null==e)return 0;if(Ko(e))return ua(e)?sn(e):e.length;var t=hs(e);return t==w||t==A?e.size:Ri(e).length},jn.snakeCase=Ga,jn.some=function(e,t,n){var i=Ho(e)?Tt:nr;return n&&vs(e,t,n)&&(t=r),i(e,os(t,3))},jn.sortedIndex=function(e,t){return ir(e,t)},jn.sortedIndexBy=function(e,t,n){return rr(e,t,os(n,2))},jn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=ir(e,t);if(i<n&&zo(e[i],t))return i}return-1},jn.sortedLastIndex=function(e,t){return ir(e,t,!0)},jn.sortedLastIndexBy=function(e,t,n){return rr(e,t,os(n,2),!0)},jn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ir(e,t,!0)-1;if(zo(e[n],t))return n}return-1},jn.startCase=Za,jn.startsWith=function(e,t,n){return e=ba(e),n=null==n?0:oi(ma(n),0,e.length),t=ar(t),e.slice(n,n+t.length)==t},jn.subtract=Du,jn.sum=function(e){return e&&e.length?Vt(e,ru):0},jn.sumBy=function(e,t){return e&&e.length?Vt(e,os(t,2)):0},jn.template=function(e,t,n){var i=jn.templateSettings;n&&vs(e,t,n)&&(t=r),e=ba(e),t=wa({},t,i,Xr);var s,o,a=wa({},t.imports,i.imports,Xr),u=Fa(a),l=$t(a,u),c=0,p=t.interpolate||be,h="__p += '",d=De((t.escape||be).source+"|"+p.source+"|"+(p===J?pe:be).source+"|"+(t.evaluate||be).source+"|$","g"),f="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Je+"]")+"\n";e.replace(d,(function(t,n,i,r,a,u){return i||(i=r),h+=e.slice(c,u).replace(xe,Jt),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),i&&(h+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),h+="';\n";var m=Pe.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new Ee("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(q,""):h).replace(U,"$1").replace($,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Qa((function(){return we(u,f+"return "+h).apply(r,l)}));if(g.source=h,Jo(g))throw g;return g},jn.times=function(e,t){if((e=ma(e))<1||e>p)return[];var n=d,i=yn(e,d);t=os(t),e-=d;for(var r=zt(i,t);++n<e;)t(n);return r},jn.toFinite=fa,jn.toInteger=ma,jn.toLength=ga,jn.toLower=function(e){return ba(e).toLowerCase()},jn.toNumber=va,jn.toSafeInteger=function(e){return e?oi(ma(e),-9007199254740991,p):0===e?e:0},jn.toString=ba,jn.toUpper=function(e){return ba(e).toUpperCase()},jn.trim=function(e,t,n){if((e=ba(e))&&(n||t===r))return qt(e);if(!e||!(t=ar(t)))return e;var i=on(e),s=on(t);return br(i,Wt(i,s),Kt(i,s)+1).join("")},jn.trimEnd=function(e,t,n){if((e=ba(e))&&(n||t===r))return e.slice(0,an(e)+1);if(!e||!(t=ar(t)))return e;var i=on(e);return br(i,0,Kt(i,on(t))+1).join("")},jn.trimStart=function(e,t,n){if((e=ba(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=ar(t)))return e;var i=on(e);return br(i,Wt(i,on(t))).join("")},jn.truncate=function(e,t){var n=30,i="...";if(ta(t)){var s="separator"in t?t.separator:s;n="length"in t?ma(t.length):n,i="omission"in t?ar(t.omission):i}var o=(e=ba(e)).length;if(Yt(e)){var a=on(e);o=a.length}if(n>=o)return e;var u=n-sn(i);if(u<1)return i;var l=a?br(a,0,u).join(""):e.slice(0,u);if(s===r)return l+i;if(a&&(u+=l.length-u),oa(s)){if(e.slice(u).search(s)){var c,p=l;for(s.global||(s=De(s.source,ba(he.exec(s))+"g")),s.lastIndex=0;c=s.exec(p);)var h=c.index;l=l.slice(0,h===r?u:h)}}else if(e.indexOf(ar(s),u)!=u){var d=l.lastIndexOf(s);d>-1&&(l=l.slice(0,d))}return l+i},jn.unescape=function(e){return(e=ba(e))&&K.test(e)?e.replace(H,un):e},jn.uniqueId=function(e){var t=++Ne;return ba(e)+t},jn.upperCase=Xa,jn.upperFirst=Ja,jn.each=bo,jn.eachRight=xo,jn.first=Ws,uu(jn,(yu={},bi(jn,(function(e,t){Pe.call(jn.prototype,t)||(yu[t]=e)})),yu),{chain:!1}),jn.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),bt(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===r?1:vn(ma(n),0);var i=this.__filtered__&&!t?new Un(this):this.clone();return i.__filtered__?i.__takeCount__=yn(n,i.__takeCount__):i.__views__.push({size:yn(n,d),type:e+(i.__dir__<0?"Right":"")}),i},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:os(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(ru)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Gi((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Ti(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Mo(os(e)))},Un.prototype.slice=function(e,t){e=ma(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ma(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(d)},bi(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=jn[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&(jn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,u=t instanceof Un,l=a[0],c=u||Ho(t),p=function(e){var t=s.apply(jn,_t([e],a));return i&&h?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,f=o&&!h,m=u&&!d;if(!o&&c){t=m?t:new Un(this);var g=e.apply(t,a);return g.__actions__.push({func:fo,args:[p],thisArg:r}),new qn(g,h)}return f&&m?e.apply(this,a):(g=this.thru(p),f?i?g.value()[0]:g.value():g)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ke[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Ho(r)?r:[],e)}return this[n]((function(n){return t.apply(Ho(n)?n:[],e)}))}})),bi(Un.prototype,(function(e,t){var n=jn[t];if(n){var i=n.name+"";Pe.call(On,i)||(On[i]=[]),On[i].push({name:t,func:n})}})),On[Br(r,2).name]=[{name:"wrapper",func:r}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Ar(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ar(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ar(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ho(e),i=t<0,r=n?e.length:0,s=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var s=n[i],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=yn(t,e+o);break;case"takeRight":e=vn(e,t-o)}}return{start:e,end:t}}(0,r,this.__views__),o=s.start,a=s.end,u=a-o,l=i?a:o-1,c=this.__iteratees__,p=c.length,h=0,d=yn(u,this.__takeCount__);if(!n||!i&&r==u&&d==u)return hr(e,this.__actions__);var f=[];e:for(;u--&&h<d;){for(var m=-1,g=e[l+=t];++m<p;){var v=c[m],y=v.iteratee,b=v.type,x=y(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}f[h++]=g}return f},jn.prototype.at=mo,jn.prototype.chain=function(){return ho(this)},jn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===r&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},jn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var i=js(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},jn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:fo,args:[eo],thisArg:r}),new qn(t,this.__chain__)}return this.thru(eo)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return hr(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,ot&&(jn.prototype[ot]=function(){return this}),jn}();st._=ln,(i=function(){return ln}.call(t,n,t,e))===r||(e.exports=i)}.call(this)},7866:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MongoLogManager=t.MongoLogWriter=t.mongoLogId=void 0;const r=n(345),s=n(7702),o=n(2048),a=i(n(5315)),u=n(6162),l=n(1764),c=n(1568);function p(e){return{__value:e}}t.mongoLogId=p;class h extends u.Writable{constructor(e,t,n,i){super({objectMode:!0}),this.mongoLogId=p,this._logId=e,this._logFilePath=t,this._target=n,this._now=null!=i?i:()=>new Date}get logId(){return this._logId}get logFilePath(){return this._logFilePath}get target(){return this._target}_write(e,t,i){var s;const o=function(e){var t;return"string"!=typeof e.s?new TypeError("Cannot log messages without a severity field"):"string"!=typeof e.c?new TypeError("Cannot log messages without a component field"):"number"!=typeof(null===(t=e.id)||void 0===t?void 0:t.__value)?new TypeError("Cannot log messages without an id field"):"string"!=typeof e.ctx?new TypeError("Cannot log messages without a context field"):"string"!=typeof e.msg?new TypeError("Cannot log messages without a message field"):null}(e);if(o)return void i(o);const a={t:null!==(s=e.t)&&void 0!==s?s:this._now(),s:e.s,c:e.c,id:e.id.__value,ctx:e.ctx,msg:e.msg};e.attr&&("[object Error]"===Object.prototype.toString.call(e.attr)?a.attr={stack:e.attr.stack,name:e.attr.name,message:e.attr.message,code:e.attr.code,...e.attr}:a.attr=e.attr),this.emit("log",a);try{r.EJSON.stringify(a.attr)}catch(e){try{const e=n(9672),t=e.deserialize(e.serialize(a.attr));r.EJSON.stringify(t),a.attr=t}catch(e){try{const e=JSON.parse(JSON.stringify(a.attr));r.EJSON.stringify(e),a.attr=e}catch(e){a.attr={_inspected:(0,l.inspect)(a.attr)}}}}this._target.write(r.EJSON.stringify(a,{relaxed:!0})+"\n",i)}_final(e){this._target.end(e)}async flush(){await new Promise((e=>this._target.write("",e)))}info(e,t,n,i,r){const s={s:"I",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}warn(e,t,n,i,r){const s={s:"W",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}error(e,t,n,i,r){const s={s:"E",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}fatal(e,t,n,i,r){const s={s:"F",c:e,id:t,ctx:n,msg:i,attr:r};this.write(s)}bindComponent(e){return{unbound:this,component:e,write:(t,n)=>this.write({c:e,...t},n),info:this.info.bind(this,e),warn:this.warn.bind(this,e),error:this.error.bind(this,e),fatal:this.fatal.bind(this,e)}}}t.MongoLogWriter=h,t.MongoLogManager=class{constructor(e){this._options=e}async cleanupOldLogfiles(){var e,t;const n=this._options.directory;let i;try{i=await o.promises.opendir(n)}catch(e){return}for await(const s of i){if(!s.isFile())continue;const{id:i}=null!==(t=null===(e=s.name.match(/^(?<id>[a-f0-9]{24})_log(\.gz)?$/i))||void 0===e?void 0:e.groups)&&void 0!==t?t:{};if(i&&new r.ObjectId(i).generationTime<Date.now()/1e3-86400*this._options.retentionDays){const e=a.default.join(n,s.name);try{await o.promises.unlink(e)}catch(t){this._options.onerror(t,e)}}}}async createLogWriter(){const e=(new r.ObjectId).toString(),t=!!this._options.gzip,n=a.default.join(this._options.directory,`${e}_log${t?".gz":""}`);let i,l,p;try{l=(0,o.createWriteStream)(n,{mode:384}),i=l,await(0,s.once)(l,"ready"),t?(l=(0,c.createGzip)({flush:c.constants.Z_SYNC_FLUSH,level:c.constants.Z_MAX_LEVEL}),l.pipe(i)):l.on("finish",(()=>l.emit("log-finish")))}catch(t){this._options.onwarn(t,n),l=new u.Writable({write(e,t,n){n()}}),i=l,p=new h(e,null,l)}return p||(p=new h(e,n,l)),i.on("finish",(()=>null==p?void 0:p.emit("log-finish"))),p}}},4935:e=>{function t(e){if(!(this instanceof t))return new t(e);this.ns=e,this.dotIndex=e.indexOf("."),-1===this.dotIndex?(this.database=e,this.collection=""):(this.database=e.slice(0,this.dotIndex),this.collection=e.slice(this.dotIndex+1)),this.system=/^system\./.test(this.collection),this.oplog=/local\.oplog\.(\$main|rs)/.test(e),this.command="$cmd"===this.collection||0===this.collection.indexOf("$cmd.sys"),this.special=this.oplog||this.command||this.system||"config"===this.database,this.specialish=this.special||["local","admin"].indexOf(this.database)>-1,this.normal=this.oplog||-1===this.ns.indexOf("$"),this.validDatabaseName=new RegExp('^[^\\\\/". ]*$').test(this.database)&&this.database.length<=t.MAX_DATABASE_NAME_LENGTH,this.validCollectionName=this.collection.length>0&&(this.oplog||/^[^\0\$]*$/.test(this.collection)),this.databaseHash=7,this.ns.split("").every(function(e,t){return"."!==e&&(this.databaseHash+=11*this.ns.charCodeAt(t),this.databaseHash*=3,!0)}.bind(this))}t.prototype.database="",t.prototype.databaseHash=0,t.prototype.collection="",t.prototype.command=!1,t.prototype.special=!1,t.prototype.system=!1,t.prototype.oplog=!1,t.prototype.normal=!1,t.prototype.specialish=!1,["Command","Special","System","Oplog","Normal","Conf"].forEach((function(e){t.prototype["is"+e]=function(){return this[e.toLowerCase()]}})),t.prototype.toString=function(){return this.ns},t.MAX_DATABASE_NAME_LENGTH=128,e.exports=t;var n=t;e.exports.sort=function(e){return e.sort((function(e,t){return n(e).specialish&&n(t).specialish?0:n(e).specialish&&!n(t).specialish?1:!n(e).specialish&&n(t).specialish?-1:e>t?1:-1})),e}},1378:e=>{var t=1e3,n=60*t,i=60*n,r=24*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,o){o=o||{};var a,u,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===l&&isFinite(e))return o.long?(a=e,(u=Math.abs(a))>=r?s(a,u,r,"day"):u>=i?s(a,u,i,"hour"):u>=n?s(a,u,n,"minute"):u>=t?s(a,u,t,"second"):a+" ms"):function(e){var s=Math.abs(e);return s>=r?Math.round(e/r)+"d":s>=i?Math.round(e/i)+"h":s>=n?Math.round(e/n)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},8726:(e,t,n)=>{"use strict";var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=n(9497),o=u(s),a=u(n(23));function u(e){return e&&e.__esModule?e:{default:e}}var l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},h=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return h?"_"+Math.random().toString(36).substr(2,12):void 0},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||d()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||d()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return h&&e?o.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=i({},this.props.style);t.display||(t.display="inline-block");var n=i({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,o.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),o.default.createElement("input",i({},r,{ref:this.inputRef})),o.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?o.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}(s.Component);f.propTypes={className:a.default.string,defaultValue:a.default.any,extraWidth:a.default.oneOfType([a.default.number,a.default.string]),id:a.default.string,injectStyles:a.default.bool,inputClassName:a.default.string,inputRef:a.default.func,inputStyle:a.default.object,minWidth:a.default.oneOfType([a.default.number,a.default.string]),onAutosize:a.default.func,onChange:a.default.func,placeholder:a.default.string,placeholderIsMinWidth:a.default.bool,style:a.default.object,value:a.default.any},f.defaultProps={minWidth:1,injectStyles:!0},t.Z=f},8559:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=(n&&Symbol.for("react.element"),n&&Symbol.for("react.portal"),n?Symbol.for("react.fragment"):60107),r=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,o=n?Symbol.for("react.provider"):60109,a=n?Symbol.for("react.context"):60110,u=(n&&Symbol.for("react.async_mode"),n?Symbol.for("react.concurrent_mode"):60111),l=n?Symbol.for("react.forward_ref"):60112,c=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,d=n?Symbol.for("react.lazy"):60116,f=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===s||e===r||e===c||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===h||e.$$typeof===o||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===f)}},3920:(e,t,n)=>{"use strict";e.exports=n(8559)},1227:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2447)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},6625:(e,t)=>{var n;t=e.exports=W,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var i=Number.MAX_SAFE_INTEGER||9007199254740991,r=t.re=[],s=t.src=[],o=0,a=o++;s[a]="0|[1-9]\\d*";var u=o++;s[u]="[0-9]+";var l=o++;s[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var c=o++;s[c]="("+s[a]+")\\.("+s[a]+")\\.("+s[a]+")";var p=o++;s[p]="("+s[u]+")\\.("+s[u]+")\\.("+s[u]+")";var h=o++;s[h]="(?:"+s[a]+"|"+s[l]+")";var d=o++;s[d]="(?:"+s[u]+"|"+s[l]+")";var f=o++;s[f]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var m=o++;s[m]="(?:-?("+s[d]+"(?:\\."+s[d]+")*))";var g=o++;s[g]="[0-9A-Za-z-]+";var v=o++;s[v]="(?:\\+("+s[g]+"(?:\\."+s[g]+")*))";var y=o++,b="v?"+s[c]+s[f]+"?"+s[v]+"?";s[y]="^"+b+"$";var x="[v=\\s]*"+s[p]+s[m]+"?"+s[v]+"?",E=o++;s[E]="^"+x+"$";var w=o++;s[w]="((?:<|>)?=?)";var C=o++;s[C]=s[u]+"|x|X|\\*";var S=o++;s[S]=s[a]+"|x|X|\\*";var D=o++;s[D]="[v=\\s]*("+s[S]+")(?:\\.("+s[S]+")(?:\\.("+s[S]+")(?:"+s[f]+")?"+s[v]+"?)?)?";var _=o++;s[_]="[v=\\s]*("+s[C]+")(?:\\.("+s[C]+")(?:\\.("+s[C]+")(?:"+s[m]+")?"+s[v]+"?)?)?";var A=o++;s[A]="^"+s[w]+"\\s*"+s[D]+"$";var k=o++;s[k]="^"+s[w]+"\\s*"+s[_]+"$";var T=o++;s[T]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var O=o++;s[O]="(?:~>?)";var I=o++;s[I]="(\\s*)"+s[O]+"\\s+",r[I]=new RegExp(s[I],"g");var F=o++;s[F]="^"+s[O]+s[D]+"$";var P=o++;s[P]="^"+s[O]+s[_]+"$";var N=o++;s[N]="(?:\\^)";var R=o++;s[R]="(\\s*)"+s[N]+"\\s+",r[R]=new RegExp(s[R],"g");var M=o++;s[M]="^"+s[N]+s[D]+"$";var L=o++;s[L]="^"+s[N]+s[_]+"$";var B=o++;s[B]="^"+s[w]+"\\s*("+x+")$|^$";var j=o++;s[j]="^"+s[w]+"\\s*("+b+")$|^$";var V=o++;s[V]="(\\s*)"+s[w]+"\\s*("+x+"|"+s[D]+")",r[V]=new RegExp(s[V],"g");var z=o++;s[z]="^\\s*("+s[D]+")\\s+-\\s+("+s[D]+")\\s*$";var q=o++;s[q]="^\\s*("+s[_]+")\\s+-\\s+("+s[_]+")\\s*$";var U=o++;s[U]="(<|>)?=?\\s*\\*";for(var $=0;$<35;$++)n($,s[$]),r[$]||(r[$]=new RegExp(s[$]));function H(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof W)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?r[E]:r[y]).test(e))return null;try{return new W(e,t)}catch(e){return null}}function W(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof W){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof W))return new W(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?r[E]:r[y]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}t.parse=H,t.valid=function(e,t){var n=H(e,t);return n?n.version:null},t.clean=function(e,t){var n=H(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=W,W.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},W.prototype.toString=function(){return this.version},W.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof W||(e=new W(e,this.options)),this.compareMain(e)||this.comparePre(e)},W.prototype.compareMain=function(e){return e instanceof W||(e=new W(e,this.options)),G(this.major,e.major)||G(this.minor,e.minor)||G(this.patch,e.patch)},W.prototype.comparePre=function(e){if(e instanceof W||(e=new W(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var i=this.prerelease[t],r=e.prerelease[t];if(n("prerelease compare",t,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return G(i,r)}while(++t)},W.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,i){"string"==typeof n&&(i=n,n=void 0);try{return new W(e,n).inc(t,i).version}catch(e){return null}},t.diff=function(e,t){if(Y(e,t))return null;var n=H(e),i=H(t),r="";if(n.prerelease.length||i.prerelease.length){r="pre";var s="prerelease"}for(var o in n)if(("major"===o||"minor"===o||"patch"===o)&&n[o]!==i[o])return r+o;return s},t.compareIdentifiers=G;var K=/^[0-9]+$/;function G(e,t){var n=K.test(e),i=K.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1}function Z(e,t,n){return new W(e,n).compare(new W(t,n))}function X(e,t,n){return Z(e,t,n)>0}function J(e,t,n){return Z(e,t,n)<0}function Y(e,t,n){return 0===Z(e,t,n)}function Q(e,t,n){return 0!==Z(e,t,n)}function ee(e,t,n){return Z(e,t,n)>=0}function te(e,t,n){return Z(e,t,n)<=0}function ne(e,t,n,i){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Y(e,n,i);case"!=":return Q(e,n,i);case">":return X(e,n,i);case">=":return ee(e,n,i);case"<":return J(e,n,i);case"<=":return te(e,n,i);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===re?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new W(e,t).major},t.minor=function(e,t){return new W(e,t).minor},t.patch=function(e,t){return new W(e,t).patch},t.compare=Z,t.compareLoose=function(e,t){return Z(e,t,!0)},t.rcompare=function(e,t,n){return Z(t,e,n)},t.sort=function(e,n){return e.sort((function(e,i){return t.compare(e,i,n)}))},t.rsort=function(e,n){return e.sort((function(e,i){return t.rcompare(e,i,n)}))},t.gt=X,t.lt=J,t.eq=Y,t.neq=Q,t.gte=ee,t.lte=te,t.cmp=ne,t.Comparator=ie;var re={};function se(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function oe(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,n,i,r,s,o,a,u,l,c,p,h){return((t=oe(n)?"":oe(i)?">="+n+".0.0":oe(r)?">="+n+"."+i+".0":">="+t)+" "+(a=oe(u)?"":oe(l)?"<"+(+u+1)+".0.0":oe(c)?"<"+u+"."+(+l+1)+".0":p?"<="+u+"."+l+"."+c+"-"+p:"<="+a)).trim()}function ue(e,t,i){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!i.includePrerelease){for(r=0;r<e.length;r++)if(n(e[r].semver),e[r].semver!==re&&e[r].semver.prerelease.length>0){var s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}function le(e,t,n){try{t=new se(t,n)}catch(e){return!1}return t.test(e)}function ce(e,t,n,i){var r,s,o,a,u;switch(e=new W(e,i),t=new se(t,i),n){case">":r=X,s=te,o=J,a=">",u=">=";break;case"<":r=J,s=ee,o=X,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,i))return!1;for(var l=0;l<t.set.length;++l){var c=t.set[l],p=null,h=null;if(c.forEach((function(e){e.semver===re&&(e=new ie(">=0.0.0")),p=p||e,h=h||e,r(e.semver,p.semver,i)?p=e:o(e.semver,h.semver,i)&&(h=e)})),p.operator===a||p.operator===u)return!1;if((!h.operator||h.operator===a)&&s(e,h.semver))return!1;if(h.operator===u&&o(e,h.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?r[B]:r[j],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new W(n[2],this.options.loose):this.semver=re},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===re||("string"==typeof e&&(e=new W(e,this.options)),ne(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),le(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),le(e.semver,n,t);var i=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),s=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return i||r||s&&o||a||u},t.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var i=t?r[q]:r[z];e=e.replace(i,ae),n("hyphen replace",e),e=e.replace(r[V],"$1$2$3"),n("comparator trim",e,r[V]),e=(e=(e=e.replace(r[I],"$1~")).replace(r[R],"$1^")).split(/\s+/).join(" ");var s=t?r[B]:r[j],o=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var i=t.loose?r[L]:r[M];return e.replace(i,(function(t,i,r,s,o){var a;return n("caret",e,t,i,r,s,o),oe(i)?a="":oe(r)?a=">="+i+".0.0 <"+(+i+1)+".0.0":oe(s)?a="0"===i?">="+i+"."+r+".0 <"+i+"."+(+r+1)+".0":">="+i+"."+r+".0 <"+(+i+1)+".0.0":o?(n("replaceCaret pr",o),a="0"===i?"0"===r?">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+r+"."+(+s+1):">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+(+r+1)+".0":">="+i+"."+r+"."+s+"-"+o+" <"+(+i+1)+".0.0"):(n("no pr"),a="0"===i?"0"===r?">="+i+"."+r+"."+s+" <"+i+"."+r+"."+(+s+1):">="+i+"."+r+"."+s+" <"+i+"."+(+r+1)+".0":">="+i+"."+r+"."+s+" <"+(+i+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var i=t.loose?r[P]:r[F];return e.replace(i,(function(t,i,r,s,o){var a;return n("tilde",e,t,i,r,s,o),oe(i)?a="":oe(r)?a=">="+i+".0.0 <"+(+i+1)+".0.0":oe(s)?a=">="+i+"."+r+".0 <"+i+"."+(+r+1)+".0":o?(n("replaceTilde pr",o),a=">="+i+"."+r+"."+s+"-"+o+" <"+i+"."+(+r+1)+".0"):a=">="+i+"."+r+"."+s+" <"+i+"."+(+r+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var i=t.loose?r[k]:r[A];return e.replace(i,(function(t,i,r,s,o,a){n("xRange",e,t,i,r,s,o,a);var u=oe(r),l=u||oe(s),c=l||oe(o);return"="===i&&c&&(i=""),u?t=">"===i||"<"===i?"<0.0.0":"*":i&&c?(l&&(s=0),o=0,">"===i?(i=">=",l?(r=+r+1,s=0,o=0):(s=+s+1,o=0)):"<="===i&&(i="<",l?r=+r+1:s=+s+1),t=i+r+"."+s+"."+o):l?t=">="+r+".0.0 <"+(+r+1)+".0.0":c&&(t=">="+r+"."+s+".0 <"+r+"."+(+s+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(r[U],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(s)}))),o.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new W(e,this.options));for(var t=0;t<this.set.length;t++)if(ue(this.set[t],e,this.options))return!0;return!1},t.satisfies=le,t.maxSatisfying=function(e,t,n){var i=null,r=null;try{var s=new se(t,n)}catch(e){return null}return e.forEach((function(e){s.test(e)&&(i&&-1!==r.compare(e)||(r=new W(i=e,n)))})),i},t.minSatisfying=function(e,t,n){var i=null,r=null;try{var s=new se(t,n)}catch(e){return null}return e.forEach((function(e){s.test(e)&&(i&&1!==r.compare(e)||(r=new W(i=e,n)))})),i},t.minVersion=function(e,t){e=new se(e,t);var n=new W("0.0.0");if(e.test(n))return n;if(n=new W("0.0.0-0"),e.test(n))return n;n=null;for(var i=0;i<e.set.length;++i)e.set[i].forEach((function(e){var t=new W(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!X(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},t.validRange=function(e,t){try{return new se(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return ce(e,t,"<",n)},t.gtr=function(e,t,n){return ce(e,t,">",n)},t.outside=ce,t.prerelease=function(e,t){var n=H(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof W)return e;if("string"!=typeof e)return null;var t=e.match(r[T]);return null==t?null:H(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},4880:e=>{var t=1e3,n=60*t,i=60*n,r=24*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,o){o=o||{};var a,u,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===l&&isFinite(e))return o.long?(a=e,(u=Math.abs(a))>=r?s(a,u,r,"day"):u>=i?s(a,u,i,"hour"):u>=n?s(a,u,n,"minute"):u>=t?s(a,u,t,"second"):a+" ms"):function(e){var s=Math.abs(e);return s>=r?Math.round(e/r)+"d":s>=i?Math.round(e/i)+"h":s>=n?Math.round(e/n)+"m":s>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},8957:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2156)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2156:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(4880),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},2701:(e,t,n)=>{"use strict";n.r(t),n.d(t,{v1:()=>d,v3:()=>E,v4:()=>w,v5:()=>D});var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16);function s(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}for(var o=[],a=0;a<256;++a)o[a]=(a+256).toString(16).substr(1);const u=function(e,t){var n=t||0,i=o;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")};var l,c,p=0,h=0;const d=function(e,t,n){var i=t&&n||0,r=t||[],o=(e=e||{}).node||l,a=void 0!==e.clockseq?e.clockseq:c;if(null==o||null==a){var d=e.random||(e.rng||s)();null==o&&(o=l=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==a&&(a=c=16383&(d[6]<<8|d[7]))}var f=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:h+1,g=f-p+(m-h)/1e4;if(g<0&&void 0===e.clockseq&&(a=a+1&16383),(g<0||f>p)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=f,h=m,c=a;var v=(1e4*(268435455&(f+=122192928e5))+m)%4294967296;r[i++]=v>>>24&255,r[i++]=v>>>16&255,r[i++]=v>>>8&255,r[i++]=255&v;var y=f/4294967296*1e4&268435455;r[i++]=y>>>8&255,r[i++]=255&y,r[i++]=y>>>24&15|16,r[i++]=y>>>16&255,r[i++]=a>>>8|128,r[i++]=255&a;for(var b=0;b<6;++b)r[i+b]=o[b];return t||u(r)};function f(e,t,n){var i=function(e,i,r,s){var o=r&&s||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)),"string"==typeof i&&(i=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(i)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(i)||16!==i.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=n(i.concat(e));if(a[6]=15&a[6]|t,a[8]=63&a[8]|128,r)for(var l=0;l<16;++l)r[o+l]=a[l];return r||u(a)};try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}function m(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function g(e,t,n,i,r,s){return m((o=m(m(t,e),m(i,s)))<<(a=r)|o>>>32-a,n);var o,a}function v(e,t,n,i,r,s,o){return g(t&n|~t&i,e,t,r,s,o)}function y(e,t,n,i,r,s,o){return g(t&i|n&~i,e,t,r,s,o)}function b(e,t,n,i,r,s,o){return g(t^n^i,e,t,r,s,o)}function x(e,t,n,i,r,s,o){return g(n^(t|~i),e,t,r,s,o)}const E=f("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n<t.length;n++)e[n]=t.charCodeAt(n)}return function(e){var t,n,i,r=[],s=32*e.length,o="0123456789abcdef";for(t=0;t<s;t+=8)n=e[t>>5]>>>t%32&255,i=parseInt(o.charAt(n>>>4&15)+o.charAt(15&n),16),r.push(i);return r}(function(e,t){var n,i,r,s,o;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var a=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n<e.length;n+=16)i=a,r=u,s=l,o=c,a=v(a,u,l,c,e[n],7,-680876936),c=v(c,a,u,l,e[n+1],12,-389564586),l=v(l,c,a,u,e[n+2],17,606105819),u=v(u,l,c,a,e[n+3],22,-1044525330),a=v(a,u,l,c,e[n+4],7,-176418897),c=v(c,a,u,l,e[n+5],12,1200080426),l=v(l,c,a,u,e[n+6],17,-1473231341),u=v(u,l,c,a,e[n+7],22,-45705983),a=v(a,u,l,c,e[n+8],7,1770035416),c=v(c,a,u,l,e[n+9],12,-1958414417),l=v(l,c,a,u,e[n+10],17,-42063),u=v(u,l,c,a,e[n+11],22,-1990404162),a=v(a,u,l,c,e[n+12],7,1804603682),c=v(c,a,u,l,e[n+13],12,-40341101),l=v(l,c,a,u,e[n+14],17,-1502002290),a=y(a,u=v(u,l,c,a,e[n+15],22,1236535329),l,c,e[n+1],5,-165796510),c=y(c,a,u,l,e[n+6],9,-1069501632),l=y(l,c,a,u,e[n+11],14,643717713),u=y(u,l,c,a,e[n],20,-373897302),a=y(a,u,l,c,e[n+5],5,-701558691),c=y(c,a,u,l,e[n+10],9,38016083),l=y(l,c,a,u,e[n+15],14,-660478335),u=y(u,l,c,a,e[n+4],20,-405537848),a=y(a,u,l,c,e[n+9],5,568446438),c=y(c,a,u,l,e[n+14],9,-1019803690),l=y(l,c,a,u,e[n+3],14,-187363961),u=y(u,l,c,a,e[n+8],20,1163531501),a=y(a,u,l,c,e[n+13],5,-1444681467),c=y(c,a,u,l,e[n+2],9,-51403784),l=y(l,c,a,u,e[n+7],14,1735328473),a=b(a,u=y(u,l,c,a,e[n+12],20,-1926607734),l,c,e[n+5],4,-378558),c=b(c,a,u,l,e[n+8],11,-2022574463),l=b(l,c,a,u,e[n+11],16,1839030562),u=b(u,l,c,a,e[n+14],23,-35309556),a=b(a,u,l,c,e[n+1],4,-1530992060),c=b(c,a,u,l,e[n+4],11,1272893353),l=b(l,c,a,u,e[n+7],16,-155497632),u=b(u,l,c,a,e[n+10],23,-1094730640),a=b(a,u,l,c,e[n+13],4,681279174),c=b(c,a,u,l,e[n],11,-358537222),l=b(l,c,a,u,e[n+3],16,-722521979),u=b(u,l,c,a,e[n+6],23,76029189),a=b(a,u,l,c,e[n+9],4,-640364487),c=b(c,a,u,l,e[n+12],11,-421815835),l=b(l,c,a,u,e[n+15],16,530742520),a=x(a,u=b(u,l,c,a,e[n+2],23,-995338651),l,c,e[n],6,-198630844),c=x(c,a,u,l,e[n+7],10,1126891415),l=x(l,c,a,u,e[n+14],15,-1416354905),u=x(u,l,c,a,e[n+5],21,-57434055),a=x(a,u,l,c,e[n+12],6,1700485571),c=x(c,a,u,l,e[n+3],10,-1894986606),l=x(l,c,a,u,e[n+10],15,-1051523),u=x(u,l,c,a,e[n+1],21,-2054922799),a=x(a,u,l,c,e[n+8],6,1873313359),c=x(c,a,u,l,e[n+15],10,-30611744),l=x(l,c,a,u,e[n+6],15,-1560198380),u=x(u,l,c,a,e[n+13],21,1309151649),a=x(a,u,l,c,e[n+4],6,-145523070),c=x(c,a,u,l,e[n+11],10,-1120210379),l=x(l,c,a,u,e[n+2],15,718787259),u=x(u,l,c,a,e[n+9],21,-343485551),a=m(a,i),u=m(u,r),l=m(l,s),c=m(c,o);return[a,u,l,c]}(function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e[t/8])<<t%32;return n}(e),8*e.length))})),w=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var o=0;o<16;++o)t[i+o]=r[o];return t||u(r)};function C(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:return t^n^i;case 2:return t&n^t&i^n&i;case 3:return t^n^i}}function S(e,t){return e<<t|e>>>32-t}const D=f("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=new Array(i.length);for(var r=0;r<i.length;r++)e[r]=i.charCodeAt(r)}e.push(128);var s=e.length/4+2,o=Math.ceil(s/16),a=new Array(o);for(r=0;r<o;r++){a[r]=new Array(16);for(var u=0;u<16;u++)a[r][u]=e[64*r+4*u]<<24|e[64*r+4*u+1]<<16|e[64*r+4*u+2]<<8|e[64*r+4*u+3]}for(a[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295,r=0;r<o;r++){for(var l=new Array(80),c=0;c<16;c++)l[c]=a[r][c];for(c=16;c<80;c++)l[c]=S(l[c-3]^l[c-8]^l[c-14]^l[c-16],1);var p=n[0],h=n[1],d=n[2],f=n[3],m=n[4];for(c=0;c<80;c++){var g=Math.floor(c/20),v=S(p,5)+C(g,h,d,f)+m+t[g]+l[c]>>>0;m=f,f=d,d=S(h,30)>>>0,h=p,p=v}n[0]=n[0]+p>>>0,n[1]=n[1]+h>>>0,n[2]=n[2]+d>>>0,n[3]=n[3]+f>>>0,n[4]=n[4]+m>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}))},2069:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))})),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(7471)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7471:(e,t,n)=>{e.exports=function(e){function t(e){let n,r=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,r)=>{if("%%"===n)return"%";a++;const s=t.formatters[r];if("function"==typeof s){const t=e[a];n=s.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(e):r,set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(n=0;n<r;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},8804:e=>{"use strict";e.exports=require("async")},345:e=>{"use strict";e.exports=require("bson")},5840:e=>{"use strict";e.exports=require("electron")},7702:e=>{"use strict";e.exports=require("events")},2048:e=>{"use strict";e.exports=require("fs")},9801:e=>{"use strict";e.exports=require("os")},5315:e=>{"use strict";e.exports=require("path")},23:e=>{"use strict";e.exports=require("prop-types")},9497:e=>{"use strict";e.exports=require("react")},6162:e=>{"use strict";e.exports=require("stream")},1764:e=>{"use strict";e.exports=require("util")},9672:e=>{"use strict";e.exports=require("v8")},1568:e=>{"use strict";e.exports=require("zlib")}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(5915)})()}));
|