You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

3 lines
104 KiB

/*! For license information please see module.js.LICENSE.txt */
define(["@grafana/data","@grafana/runtime","@grafana/ui","app/core/app_events","lodash","react","react-router-dom"],((t,e,r,n,o,a,i)=>(()=>{var c=[t=>{"use strict";t.exports=a},t=>{"use strict";t.exports=r},t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var a={},i=[],c=0;c<t.length;c++){var s=t[c],u=n.base?s[0]+n.base:s[0],l=a[u]||0,f="".concat(u," ").concat(l);a[u]=l+1;var p=r(f),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)e[p].references++,e[p].updater(d);else{var h=o(d,n);n.byIndex=c,e.splice(c,0,{identifier:f,updater:h,references:1})}i.push(f)}return i}function o(t,e){var r=e.domAPI(e);r.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,o){var a=n(t=t||[],o=o||{});return function(t){t=t||[];for(var i=0;i<a.length;i++){var c=r(a[i]);e[c].references--}for(var s=n(t,o),u=0;u<a.length;u++){var l=r(a[u]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}a=s}}},t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},t=>{"use strict";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},t=>{"use strict";t.exports=function(t){var e=t[1],r=t[3];if(!r)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),a="/*# ".concat(o," */");return[e].concat([a]).join("\n")}return[e].join("\n")}},t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,o,a){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(n)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(i[s]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&i[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),e.push(l))}},e}},e=>{"use strict";e.exports=t},t=>{t.exports="object"==typeof self?self.FormData:window.FormData},(t,e)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var a=typeof r;if("string"===a||"number"===a)t.push(this&&this[r]||r);else if(Array.isArray(r))t.push(o.apply(this,r));else if("object"===a){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){t.push(r.toString());continue}for(var i in r)n.call(r,i)&&r[i]&&t.push(this&&this[i]||i)}}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},t=>{"use strict";t.exports=o},t=>{"use strict";t.exports=e},t=>{"use strict";t.exports=n},(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(8),o=r.n(n),a=r(9),i=r.n(a)()(o());i.push([t.id,":root{--maintenance-background: repeating-linear-gradient(45deg, #f6ba52, #f6ba52 20px, #ffd180 20px, #ffd180 40px);--gren-5: #6ccf8e;--green-6: #73d13d;--red-5: #ff4d4f;--orange-5: #ffa940;--blue-2: #bae7ff;--gray-5: #d9d9d9;--gray-8: #595959;--gray-9: #434343;--cyan-1: #e6fffb;--purple-9: #22075e;--border-radius: 2px;--gradient-brandHorizontal: linear-gradient(90deg, #f83 0%, #f53e4c 100%);--gradient-brandVertical: linear-gradient(0.01deg, #f53e4c -31.2%, #f83 113.07%);--always-gray: #ccccdc;--title-marginBottom: 16px}.theme-light{--cards-background: var(--blue-2);--highlighted-row-bg: var(--cyan-1);--disabled-button-color: #bdbdbd;--primary-background: rgb(255, 255, 255);--secondary-background: rgb(244, 245, 245);--border: 1px solid rgba(36, 41, 46, 0.12);--primary-text-color: rgb(36, 41, 46);--secondary-text-color: rgba(36, 41, 46, 0.75);--disabled-text-color: rgba(36, 41, 46, 0.5);--warning-text-color: #8a6c00;--success-text-color: rgb(10, 118, 78);--error-text-color: rgb(207, 14, 91);--primary-text-link: #1f62e0;--timeline-icon-background: rgba(70, 76, 84, 0);--timeline-icon-background-resolution-note: rgba(50, 116, 217, 0);--oncall-icon-stroke-color: #fff;--hover-selected: #f4f5f5;--background-canvas: #f4f5f5;--background-primary: #fff;--background-secondary: #f4f5f5;--border-medium: 1px solid rgba(36, 41, 46, 0.3);--border-strong: 1px solid rgba(36, 41, 46, 0.4);--border-weak: 1px solid rgba(36, 41, 46, 0.12);--shadows-z1: 0 1px 2px rgba(24, 26, 27, 0.2);--shadows-z2: 0 4px 8px rgba(24, 26, 27, 0.2);--shadows-z3: 0 13px 20px 1px rgba(24, 26, 27, 0.18)}.theme-dark{--cards-background: var(--gray-9);--highlighted-row-bg: var(--gray-9);--disabled-button-color: hsla(0, 0%, 100%, 0.08);--primary-background: rgb(24, 27, 31);--secondary-background: rgb(34, 37, 43);--border: 1px solid rgba(204, 204, 220, 0.15);--primary-text-color: rgb(204, 204, 220);--secondary-text-color: rgba(204, 204, 220, 0.65);--disabled-text-color: rgba(204, 204, 220, 0.4);--warning-text-color: #f8d06b;--success-text-color: rgb(108, 207, 142);--error-text-color: rgb(255, 82, 134);--primary-text-link: #6e9fff;--timeline-icon-background: rgba(70, 76, 84, 1);--timeline-icon-background-resolution-note: rgba(50, 116, 217, 1);--focused-box-shadow: rgb(17 18 23) 0 0 0 2px, rgb(61 113 217) 0 0 0 4px;--hover-selected: rgba(204, 204, 220, 0.12);--hover-selected-hardcoded: #34363d;--oncall-icon-stroke-color: #181b1f;--background-canvas: #111217;--background-primary: #181b1f;--background-secondary: #22252b;--border-medium: 1px solid rgba(204, 204, 220, 0.15);--border-strong: 1px solid rgba(204, 204, 220, 0.25);--border-weak: 1px solid rgba(204, 204, 220, 0.07);--shadows-z1: 0 1px 2px rgba(24, 26, 27, 0.75);--shadows-z2: 0 4px 8px rgba(24, 26, 27, 0.75);--shadows-z3: 0 8px 24px rgb(1, 4, 9)}","",{version:3,sources:["webpack://./style/vars.css"],names:[],mappings:"AAAA,MACE,6GAAA,CACA,iBAAA,CACA,kBAAA,CACA,gBAAA,CACA,mBAAA,CACA,iBAAA,CACA,iBAAA,CACA,iBAAA,CACA,iBAAA,CACA,iBAAA,CACA,mBAAA,CACA,oBAAA,CACA,yEAAA,CACA,gFAAA,CACA,sBAAA,CACA,0BAAA,CAGF,aACE,iCAAA,CACA,mCAAA,CACA,gCAAA,CACA,wCAAA,CACA,0CAAA,CACA,0CAAA,CACA,qCAAA,CACA,8CAAA,CACA,4CAAA,CACA,6BAAA,CACA,sCAAA,CACA,oCAAA,CACA,4BAAA,CACA,+CAAA,CACA,iEAAA,CACA,gCAAA,CACA,yBAAA,CACA,4BAAA,CACA,0BAAA,CACA,+BAAA,CACA,gDAAA,CACA,gDAAA,CACA,+CAAA,CACA,6CAAA,CACA,6CAAA,CACA,oDAAA,CAGF,YACE,iCAAA,CACA,mCAAA,CACA,gDAAA,CACA,qCAAA,CACA,uCAAA,CACA,6CAAA,CACA,wCAAA,CACA,iDAAA,CACA,+CAAA,CACA,6BAAA,CACA,wCAAA,CACA,qCAAA,CACA,4BAAA,CACA,+CAAA,CACA,iEAAA,CACA,wEAAA,CACA,2CAAA,CACA,mCAAA,CACA,mCAAA,CACA,4BAAA,CACA,6BAAA,CACA,+BAAA,CACA,oDAAA,CACA,oDAAA,CACA,kDAAA,CACA,8CAAA,CACA,8CAAA,CACA,qCAAA",sourcesContent:[":root {\n --maintenance-background: repeating-linear-gradient(45deg, #f6ba52, #f6ba52 20px, #ffd180 20px, #ffd180 40px);\n --gren-5: #6ccf8e;\n --green-6: #73d13d;\n --red-5: #ff4d4f;\n --orange-5: #ffa940;\n --blue-2: #bae7ff;\n --gray-5: #d9d9d9;\n --gray-8: #595959;\n --gray-9: #434343;\n --cyan-1: #e6fffb;\n --purple-9: #22075e;\n --border-radius: 2px;\n --gradient-brandHorizontal: linear-gradient(90deg, #f83 0%, #f53e4c 100%);\n --gradient-brandVertical: linear-gradient(0.01deg, #f53e4c -31.2%, #f83 113.07%);\n --always-gray: #ccccdc;\n --title-marginBottom: 16px;\n}\n\n.theme-light {\n --cards-background: var(--blue-2);\n --highlighted-row-bg: var(--cyan-1);\n --disabled-button-color: #bdbdbd;\n --primary-background: rgb(255, 255, 255);\n --secondary-background: rgb(244, 245, 245);\n --border: 1px solid rgba(36, 41, 46, 0.12);\n --primary-text-color: rgb(36, 41, 46);\n --secondary-text-color: rgba(36, 41, 46, 0.75);\n --disabled-text-color: rgba(36, 41, 46, 0.5);\n --warning-text-color: #8a6c00;\n --success-text-color: rgb(10, 118, 78);\n --error-text-color: rgb(207, 14, 91);\n --primary-text-link: #1f62e0;\n --timeline-icon-background: rgba(70, 76, 84, 0);\n --timeline-icon-background-resolution-note: rgba(50, 116, 217, 0);\n --oncall-icon-stroke-color: #fff;\n --hover-selected: #f4f5f5;\n --background-canvas: #f4f5f5;\n --background-primary: #fff;\n --background-secondary: #f4f5f5;\n --border-medium: 1px solid rgba(36, 41, 46, 0.3);\n --border-strong: 1px solid rgba(36, 41, 46, 0.4);\n --border-weak: 1px solid rgba(36, 41, 46, 0.12);\n --shadows-z1: 0 1px 2px rgba(24, 26, 27, 0.2);\n --shadows-z2: 0 4px 8px rgba(24, 26, 27, 0.2);\n --shadows-z3: 0 13px 20px 1px rgba(24, 26, 27, 0.18);\n}\n\n.theme-dark {\n --cards-background: var(--gray-9);\n --highlighted-row-bg: var(--gray-9);\n --disabled-button-color: hsla(0, 0%, 100%, 0.08);\n --primary-background: rgb(24, 27, 31);\n --secondary-background: rgb(34, 37, 43);\n --border: 1px solid rgba(204, 204, 220, 0.15);\n --primary-text-color: rgb(204, 204, 220);\n --secondary-text-color: rgba(204, 204, 220, 0.65);\n --disabled-text-color: rgba(204, 204, 220, 0.4);\n --warning-text-color: #f8d06b;\n --success-text-color: rgb(108, 207, 142);\n --error-text-color: rgb(255, 82, 134);\n --primary-text-link: #6e9fff;\n --timeline-icon-background: rgba(70, 76, 84, 1);\n --timeline-icon-background-resolution-note: rgba(50, 116, 217, 1);\n --focused-box-shadow: rgb(17 18 23) 0 0 0 2px, rgb(61 113 217) 0 0 0 4px;\n --hover-selected: rgba(204, 204, 220, 0.12);\n --hover-selected-hardcoded: #34363d;\n --oncall-icon-stroke-color: #181b1f;\n --background-canvas: #111217;\n --background-primary: #181b1f;\n --background-secondary: #22252b;\n --border-medium: 1px solid rgba(204, 204, 220, 0.15);\n --border-strong: 1px solid rgba(204, 204, 220, 0.25);\n --border-weak: 1px solid rgba(204, 204, 220, 0.07);\n --shadows-z1: 0 1px 2px rgba(24, 26, 27, 0.75);\n --shadows-z2: 0 4px 8px rgba(24, 26, 27, 0.75);\n --shadows-z3: 0 8px 24px rgb(1, 4, 9);\n}\n"],sourceRoot:""}]);const c=i},(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(8),o=r.n(n),a=r(9),i=r.n(a)()(o());i.push([t.id,".configure-plugin{margin-top:10px}@keyframes fadeIn{from{opacity:0}}.spin{width:100%;margin-top:200px;margin-bottom:200px;display:flex;flex-direction:column;justify-content:center;align-items:center}.spin-text{margin-top:20px}.disabled-row{background:#f0f0f0}.highlighted-row{background:var(--highlighted-row-bg)}.navbarRootFallback{margin-top:24px}.page-title{margin-bottom:16px}","",{version:3,sources:["webpack://./style/global.css"],names:[],mappings:"AAAA,kBACE,eAAA,CAGF,kBACE,KACE,SAAA,CAAA,CAMJ,MACE,UAAA,CACA,gBAAA,CACA,mBAAA,CACA,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,WACE,eAAA,CAKF,cACE,kBAAA,CAGF,iBACE,oCAAA,CAKF,oBACE,eAAA,CAGF,YACE,kBAAA",sourcesContent:[".configure-plugin {\n margin-top: 10px;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n}\n\n/* Spinner */\n\n.spin {\n width: 100%;\n margin-top: 200px;\n margin-bottom: 200px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.spin-text {\n margin-top: 20px;\n}\n\n/* Tables */\n\n.disabled-row {\n background: #f0f0f0;\n}\n\n.highlighted-row {\n background: var(--highlighted-row-bg);\n}\n\n/* Navigation */\n\n.navbarRootFallback {\n margin-top: 24px;\n}\n\n.page-title {\n margin-bottom: 16px;\n}\n"],sourceRoot:""}]);const c=i},(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(8),o=r.n(n),a=r(9),i=r.n(a)()(o());i.push([t.id,".hIaTKzSpKwnciwBsbA5g{margin-bottom:24px;margin-top:24px}","",{version:3,sources:["webpack://./components/PluginConfigPage/parts/ConfigurationForm/ConfigurationForm.module.css"],names:[],mappings:"AAAA,sBACE,kBAAA,CACA,eAAA",sourcesContent:[".info-block {\n margin-bottom: 24px;\n margin-top: 24px;\n}\n"],sourceRoot:""}]),i.locals={"info-block":"hIaTKzSpKwnciwBsbA5g"};const c=i},(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(8),o=r.n(n),a=r(9),i=r.n(a)()(o());i.push([t.id,".L2_Sb6mflEi16_oV2YVG{padding:16px;border-radius:2px}.B8sfGqDJhQceAfnXiSy7{background:var(--secondary-background)}.F0HayptUvv7c52TJhdxs{width:100%}.JnsnOIT70ZLiST_XRSdM:hover{background:var(--hover-selected)}.theme-dark .RrgUBvnBEvsmQUEhgr8Q{border:var(--border-weak)}.theme-light .RrgUBvnBEvsmQUEhgr8Q{border:var(--border-weak)}.theme-dark .QyFmu4r6x5RA33haU43n{box-shadow:0 4px 10px rgba(0,0,0,.6)}","",{version:3,sources:["webpack://./components/GBlock/Block.module.scss"],names:[],mappings:"AAAA,sBACE,YAAA,CACA,iBAAA,CAEA,sBACE,sCAAA,CAGF,sBACE,UAAA,CAGF,4BACE,gCAAA,CAIJ,kCACE,yBAAA,CAGF,mCACE,yBAAA,CAGF,kCACE,oCAAA",sourcesContent:[".root {\n padding: 16px;\n border-radius: 2px;\n\n &--withBackground {\n background: var(--secondary-background);\n }\n\n &--fullWidth {\n width: 100%;\n }\n\n &--hover:hover {\n background: var(--hover-selected);\n }\n}\n\n:global(.theme-dark) .root_bordered {\n border: var(--border-weak);\n}\n\n:global(.theme-light) .root_bordered {\n border: var(--border-weak);\n}\n\n:global(.theme-dark) .root_shadowed {\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);\n}\n"],sourceRoot:""}]),i.locals={root:"L2_Sb6mflEi16_oV2YVG","root--withBackground":"B8sfGqDJhQceAfnXiSy7","root--fullWidth":"F0HayptUvv7c52TJhdxs","root--hover":"JnsnOIT70ZLiST_XRSdM",root_bordered:"RrgUBvnBEvsmQUEhgr8Q",root_shadowed:"QyFmu4r6x5RA33haU43n"};const c=i},(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(8),o=r.n(n),a=r(9),i=r.n(a)()(o());i.push([t.id,".YmBCZG0ytFRASYjSWp6Z{display:inline}.eMNt3fHNFiSfB1jurc7n{color:var(--primary-text-color)}.mvgBWy5afSepBDglTzcy{color:var(--secondary-text-color)}.cDicaS8fKAStII_0qysw{color:var(--disabled-text-color)}.FyMghElj75iWw1xoQWi_{color:var(--warning-text-color)}.qllOfYZ6lNLfrsMGpCLu{color:var(--primary-text-link)}.tZWjwO8sDUnYBJZW3rDK{color:var(--green-5)}.jEMET71dZ_TTjp_Kkq1c{font-weight:bold}.V2smNr_XD9ivxvLAdcQE{text-decoration:underline}.OYbrS0suYpl7DyLg3d3l{font-size:12px}.J5PxsDRmNnI3qnLC5a0Q{font-size:20px}.ld4DsrSrNyeimbKojC9F{white-space:nowrap}._gfCYlGJGQgDqrow9Uin{margin:0 .2em;padding:.15em .4em .1em;font-size:90%;background:rgba(150,150,150,.06);border:solid rgba(100,100,100,.2);border-width:1px 1px 2px;border-radius:3px}.wWZC68tCpczBTEqHpKcS{margin:0}.FOLa6t9YU6bEFWOophNA{margin-left:4px;display:none}.YmBCZG0ytFRASYjSWp6Z:hover .FOLa6t9YU6bEFWOophNA{display:inline-block}","",{version:3,sources:["webpack://./components/Text/Text.module.scss"],names:[],mappings:"AAAA,sBACE,cAAA,CAIA,sBACE,+BAAA,CAGF,sBACE,iCAAA,CAGF,sBACE,gCAAA,CAGF,sBACE,+BAAA,CAGF,sBACE,8BAAA,CAGF,sBACE,oBAAA,CAGF,sBACE,gBAAA,CAGF,sBACE,yBAAA,CAGF,sBACE,cAAA,CAGF,sBACE,cAAA,CAIJ,sBACE,kBAAA,CAGF,sBACE,aAAA,CACA,uBAAA,CACA,aAAA,CACA,gCAAA,CACA,iCAAA,CACA,wBAAA,CACA,iBAAA,CAGF,sBACE,QAAA,CAGF,sBACE,eAAA,CACA,YAAA,CAGF,kDACE,oBAAA",sourcesContent:[".root {\n display: inline;\n}\n\n.text {\n &--primary {\n color: var(--primary-text-color);\n }\n\n &--secondary {\n color: var(--secondary-text-color);\n }\n\n &--disabled {\n color: var(--disabled-text-color);\n }\n\n &--warning {\n color: var(--warning-text-color);\n }\n\n &--link {\n color: var(--primary-text-link);\n }\n\n &--success {\n color: var(--green-5);\n }\n\n &--strong {\n font-weight: bold;\n }\n\n &--underline {\n text-decoration: underline;\n }\n\n &--small {\n font-size: 12px;\n }\n\n &--large {\n font-size: 20px;\n }\n}\n\n.no-wrap {\n white-space: nowrap;\n}\n\n.keyboard {\n margin: 0 0.2em;\n padding: 0.15em 0.4em 0.1em;\n font-size: 90%;\n background: hsla(0, 0%, 58.8%, 0.06);\n border: solid hsla(0, 0%, 39.2%, 0.2);\n border-width: 1px 1px 2px;\n border-radius: 3px;\n}\n\n.title {\n margin: 0;\n}\n\n.icon-button {\n margin-left: 4px;\n display: none;\n}\n\n.root:hover .icon-button {\n display: inline-block;\n}\n"],sourceRoot:""}]),i.locals={root:"YmBCZG0ytFRASYjSWp6Z","text--primary":"eMNt3fHNFiSfB1jurc7n","text--secondary":"mvgBWy5afSepBDglTzcy","text--disabled":"cDicaS8fKAStII_0qysw","text--warning":"FyMghElj75iWw1xoQWi_","text--link":"qllOfYZ6lNLfrsMGpCLu","text--success":"tZWjwO8sDUnYBJZW3rDK","text--strong":"jEMET71dZ_TTjp_Kkq1c","text--underline":"V2smNr_XD9ivxvLAdcQE","text--small":"OYbrS0suYpl7DyLg3d3l","text--large":"J5PxsDRmNnI3qnLC5a0Q","no-wrap":"ld4DsrSrNyeimbKojC9F",keyboard:"_gfCYlGJGQgDqrow9Uin",title:"wWZC68tCpczBTEqHpKcS","icon-button":"FOLa6t9YU6bEFWOophNA"};const c=i},(t,e,r)=>{"use strict";var n=r(26).CopyToClipboard;n.CopyToClipboard=n,t.exports=n},(t,e,r)=>{"use strict";var n=r(23),o={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var r,a,i,c,s,u=!1;e||(e={}),e.debug;try{if(a=n(),i=document.createRange(),c=document.getSelection(),(s=document.createElement("span")).textContent=t,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(r){if(r.stopPropagation(),e.format)if(r.preventDefault(),void 0===r.clipboardData){window.clipboardData.clearData();var n=o[e.format]||o.default;window.clipboardData.setData(n,t)}else r.clipboardData.clearData(),r.clipboardData.setData(e.format,t);e.onCopy&&(r.preventDefault(),e.onCopy(r.clipboardData))})),document.body.appendChild(s),i.selectNodeContents(s),c.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(n){try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),u=!0}catch(n){r=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,t)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(i):c.removeAllRanges()),s&&document.body.removeChild(s),a()}return u}},t=>{t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n<t.rangeCount;n++)r.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||r.forEach((function(e){t.addRange(e)})),e&&e.focus()}}},,t=>{"use strict";t.exports=i},(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.CopyToClipboard=void 0;var o=c(r(0)),a=c(r(22)),i=["text","onCopy","options","children"];function c(t){return t&&t.__esModule?t:{default:t}}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return y(this,r)}}function y(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(s,t);var e,r,n,c=h(s);function s(){var t;f(this,s);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return b(g(t=c.call.apply(c,[this].concat(r))),"onClick",(function(e){var r=t.props,n=r.text,i=r.onCopy,c=r.children,s=r.options,u=o.default.Children.only(c),l=(0,a.default)(n,s);i&&i(n,l),u&&u.props&&"function"==typeof u.props.onClick&&u.props.onClick(e)})),t}return e=s,(r=[{key:"render",value:function(){var t=this.props,e=(t.text,t.onCopy,t.options,t.children),r=l(t,i),n=o.default.Children.only(e);return o.default.cloneElement(n,u(u({},r),{},{onClick:this.onClick}))}}])&&p(e.prototype,r),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.default.PureComponent);e.CopyToClipboard=v,b(v,"defaultProps",{onCopy:void 0,options:void 0})}],s={};function u(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={id:t,exports:{}};return c[t](r,r.exports,u),r.exports}u.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return u.d(e,{a:e}),e},u.d=(t,e)=>{for(var r in e)u.o(e,r)&&!u.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},u.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),u.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.nc=void 0;var l={};return(()=>{"use strict";u.r(l),u.d(l,{plugin:()=>ro});var t=u(2),e=u.n(t),r=u(3),n=u.n(r),o=u(4),a=u.n(o),i=u(5),c=u.n(i),s=u(6),f=u.n(s),p=u(7),d=u.n(p),h=u(16),y={};y.styleTagTransform=d(),y.setAttributes=c(),y.insert=a().bind(null,"head"),y.domAPI=n(),y.insertStyleElement=f();e()(h.Z,y);h.Z&&h.Z.locals&&h.Z.locals;var g=u(17),m={};m.styleTagTransform=d(),m.setAttributes=c(),m.insert=a().bind(null,"head"),m.domAPI=n(),m.insertStyleElement=f();e()(g.Z,m);g.Z&&g.Z.locals&&g.Z.locals;var b=u(0),v=u.n(b),A=u(1),w=u(25);function x(t,e){return function(){return t.apply(e,arguments)}}const{toString:C}=Object.prototype,{getPrototypeOf:E}=Object,O=(S=Object.create(null),t=>{const e=C.call(t);return S[e]||(S[e]=e.slice(8,-1).toLowerCase())});var S;const j=t=>(t=t.toLowerCase(),e=>O(e)===t),k=t=>e=>typeof e===t,{isArray:L}=Array,P=k("undefined");const T=j("ArrayBuffer");const B=k("string"),_=k("function"),R=k("number"),N=t=>null!==t&&"object"==typeof t,F=t=>{if("object"!==O(t))return!1;const e=E(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},D=j("Date"),U=j("File"),G=j("Blob"),I=j("FileList"),M=j("URLSearchParams");function z(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),L(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length;let i;for(n=0;n<a;n++)i=o[n],e.call(null,t[i],i,t)}}function Z(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,o=r.length;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}const q="undefined"==typeof self?"undefined"==typeof global?void 0:global:self,W=t=>!P(t)&&t!==q;const J=(Y="undefined"!=typeof Uint8Array&&E(Uint8Array),t=>Y&&t instanceof Y);var Y;const H=j("HTMLFormElement"),K=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),V=j("RegExp"),Q=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};z(r,((r,o)=>{!1!==e(r,o,t)&&(n[o]=r)})),Object.defineProperties(t,n)},$={isArray:L,isArrayBuffer:T,isBuffer:function(t){return null!==t&&!P(t)&&null!==t.constructor&&!P(t.constructor)&&_(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||C.call(t)===e||_(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&T(t.buffer),e},isString:B,isNumber:R,isBoolean:t=>!0===t||!1===t,isObject:N,isPlainObject:F,isUndefined:P,isDate:D,isFile:U,isBlob:G,isRegExp:V,isFunction:_,isStream:t=>N(t)&&_(t.pipe),isURLSearchParams:M,isTypedArray:J,isFileList:I,forEach:z,merge:function t(){const{caseless:e}=W(this)&&this||{},r={},n=(n,o)=>{const a=e&&Z(r,o)||o;F(r[a])&&F(n)?r[a]=t(r[a],n):F(n)?r[a]=t({},n):L(n)?r[a]=n.slice():r[a]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&z(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(z(e,((e,n)=>{r&&_(e)?t[n]=x(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,a,i;const c={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)i=o[a],n&&!n(i,t,e)||c[i]||(e[i]=t[i],c[i]=!0);t=!1!==r&&E(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:O,kindOfTest:j,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(L(t))return t;let e=t.length;if(!R(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:H,hasOwnProperty:K,hasOwnProp:K,reduceDescriptors:Q,freezeMethods:t=>{Q(t,((e,r)=>{if(_(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];_(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return L(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:Z,global:q,isContextDefined:W,toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(N(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=L(t)?[]:{};return z(t,((t,e)=>{const a=r(t,n+1);!P(a)&&(o[e]=a)})),e[n]=void 0,o}}return t};return r(t,0)}};function X(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}$.inherits(X,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const tt=X.prototype,et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{et[t]={value:t}})),Object.defineProperties(X,et),Object.defineProperty(tt,"isAxiosError",{value:!0}),X.from=(t,e,r,n,o,a)=>{const i=Object.create(tt);return $.toFlatObject(t,i,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),X.call(i,t.message,e,r,n,o),i.cause=t,i.name=t.name,a&&Object.assign(i,a),i};const rt=X;const nt=u(11);function ot(t){return $.isPlainObject(t)||$.isArray(t)}function at(t){return $.endsWith(t,"[]")?t.slice(0,-2):t}function it(t,e,r){return t?t.concat(e).map((function(t,e){return t=at(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const ct=$.toFlatObject($,{},null,(function(t){return/^is[A-Z]/.test(t)}));const st=function(t,e,r){if(!$.isObject(t))throw new TypeError("target must be an object");e=e||new(nt||FormData);const n=(r=$.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!$.isUndefined(e[t])}))).metaTokens,o=r.visitor||l,a=r.dots,i=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&((s=e)&&$.isFunction(s.append)&&"FormData"===s[Symbol.toStringTag]&&s[Symbol.iterator]);var s;if(!$.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if($.isDate(t))return t.toISOString();if(!c&&$.isBlob(t))throw new rt("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(t)||$.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,r,o){let c=t;if(t&&!o&&"object"==typeof t)if($.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if($.isArray(t)&&function(t){return $.isArray(t)&&!t.some(ot)}(t)||$.isFileList(t)||$.endsWith(r,"[]")&&(c=$.toArray(t)))return r=at(r),c.forEach((function(t,n){!$.isUndefined(t)&&null!==t&&e.append(!0===i?it([r],n,a):null===i?r:r+"[]",u(t))})),!1;return!!ot(t)||(e.append(it(o,r,a),u(t)),!1)}const f=[],p=Object.assign(ct,{defaultVisitor:l,convertValue:u,isVisitable:ot});if(!$.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!$.isUndefined(r)){if(-1!==f.indexOf(r))throw Error("Circular reference detected in "+n.join("."));f.push(r),$.forEach(r,(function(r,a){!0===(!($.isUndefined(r)||null===r)&&o.call(e,r,$.isString(a)?a.trim():a,n,p))&&t(r,n?n.concat(a):[a])})),f.pop()}}(t),e};function ut(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function lt(t,e){this._pairs=[],t&&st(t,this,e)}const ft=lt.prototype;ft.append=function(t,e){this._pairs.push([t,e])},ft.toString=function(t){const e=t?function(e){return t.call(this,e,ut)}:ut;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const pt=lt;function dt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ht(t,e,r){if(!e)return t;const n=r&&r.encode||dt,o=r&&r.serialize;let a;if(a=o?o(e,r):$.isURLSearchParams(e)?e.toString():new pt(e,r).toString(n),a){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+a}return t}const yt=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},gt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},mt="undefined"!=typeof URLSearchParams?URLSearchParams:pt,bt=FormData,vt=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),At="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,wt={isBrowser:!0,classes:{URLSearchParams:mt,FormData:bt,Blob},isStandardBrowserEnv:vt,isStandardBrowserWebWorkerEnv:At,protocols:["http","https","file","blob","url","data"]};const xt=function(t){function e(t,r,n,o){let a=t[o++];const i=Number.isFinite(+a),c=o>=t.length;if(a=!a&&$.isArray(n)?n.length:a,c)return $.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!i;n[a]&&$.isObject(n[a])||(n[a]=[]);return e(t,r,n[a],o)&&$.isArray(n[a])&&(n[a]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let a;for(n=0;n<o;n++)a=r[n],e[a]=t[a];return e}(n[a])),!i}if($.isFormData(t)&&$.isFunction(t.entries)){const r={};return $.forEachEntry(t,((t,n)=>{e(function(t){return $.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},Ct={"Content-Type":void 0};const Et={transitional:gt,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=$.isObject(t);o&&$.isHTMLForm(t)&&(t=new FormData(t));if($.isFormData(t))return n&&n?JSON.stringify(xt(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return st(t,new wt.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return wt.isNode&&$.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((a=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return st(a?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if($.isString(t))try{return(e||JSON.parse)(t),$.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Et.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&$.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw rt.from(t,rt.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wt.classes.FormData,Blob:wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};$.forEach(["delete","get","head"],(function(t){Et.headers[t]={}})),$.forEach(["post","put","patch"],(function(t){Et.headers[t]=$.merge(Ct)}));const Ot=Et,St=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jt=Symbol("internals");function kt(t){return t&&String(t).trim().toLowerCase()}function Lt(t){return!1===t||null==t?t:$.isArray(t)?t.map(Lt):String(t)}function Pt(t,e,r,n){return $.isFunction(n)?n.call(this,e,r):$.isString(e)?$.isString(n)?-1!==e.indexOf(n):$.isRegExp(n)?n.test(e):void 0:void 0}class Tt{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=kt(e);if(!o)throw new Error("header name must be a non-empty string");const a=$.findKey(n,o);(!a||void 0===n[a]||!0===r||void 0===r&&!1!==n[a])&&(n[a||e]=Lt(t))}const a=(t,e)=>$.forEach(t,((t,r)=>o(t,r,e)));return $.isPlainObject(t)||t instanceof this.constructor?a(t,e):$.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?a((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&St[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=kt(t)){const r=$.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if($.isFunction(e))return e.call(this,t,r);if($.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=kt(t)){const r=$.findKey(this,t);return!(!r||e&&!Pt(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=kt(t)){const o=$.findKey(r,t);!o||e&&!Pt(0,r[o],o,e)||(delete r[o],n=!0)}}return $.isArray(t)?t.forEach(o):o(t),n}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const e=this,r={};return $.forEach(this,((n,o)=>{const a=$.findKey(r,o);if(a)return e[a]=Lt(n),void delete e[o];const i=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();i!==o&&delete e[o],e[i]=Lt(n),r[i]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return $.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&$.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[jt]=this[jt]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=kt(t);e[n]||(!function(t,e){const r=$.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return $.isArray(t)?t.forEach(n):n(t),this}}Tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),$.freezeMethods(Tt.prototype),$.freezeMethods(Tt);const Bt=Tt;function _t(t,e){const r=this||Ot,n=e||r,o=Bt.from(n.headers);let a=n.data;return $.forEach(t,(function(t){a=t.call(r,a,o.normalize(),e?e.status:void 0)})),o.normalize(),a}function Rt(t){return!(!t||!t.__CANCEL__)}function Nt(t,e,r){rt.call(this,null==t?"canceled":t,rt.ERR_CANCELED,e,r),this.name="CanceledError"}$.inherits(Nt,rt,{__CANCEL__:!0});const Ft=Nt;const Dt=wt.isStandardBrowserEnv?{write:function(t,e,r,n,o,a){const i=[];i.push(t+"="+encodeURIComponent(e)),$.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),$.isString(n)&&i.push("path="+n),$.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ut(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Gt=wt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=$.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};const It=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,a=0,i=0;return e=void 0!==e?e:1e3,function(c){const s=Date.now(),u=n[i];o||(o=s),r[a]=c,n[a]=s;let l=i,f=0;for(;l!==a;)f+=r[l++],l%=t;if(a=(a+1)%t,a===i&&(i=(i+1)%t),s-o<e)return;const p=u&&s-u;return p?Math.round(1e3*f/p):void 0}};function Mt(t,e){let r=0;const n=It(50,250);return o=>{const a=o.loaded,i=o.lengthComputable?o.total:void 0,c=a-r,s=n(c);r=a;const u={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:s||void 0,estimated:s&&i&&a<=i?(i-a)/s:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const zt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=Bt.from(t.headers).normalize(),a=t.responseType;let i;function c(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}$.isFormData(n)&&(wt.isStandardBrowserEnv||wt.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let s=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const u=Ut(t.baseURL,t.url);function l(){if(!s)return;const n=Bt.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new rt("Request failed with status code "+r.status,[rt.ERR_BAD_REQUEST,rt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),c()}),(function(t){r(t),c()}),{data:a&&"text"!==a&&"json"!==a?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:n,config:t,request:s}),s=null}if(s.open(t.method.toUpperCase(),ht(u,t.params,t.paramsSerializer),!0),s.timeout=t.timeout,"onloadend"in s?s.onloadend=l:s.onreadystatechange=function(){s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))&&setTimeout(l)},s.onabort=function(){s&&(r(new rt("Request aborted",rt.ECONNABORTED,t,s)),s=null)},s.onerror=function(){r(new rt("Network Error",rt.ERR_NETWORK,t,s)),s=null},s.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||gt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new rt(e,n.clarifyTimeoutError?rt.ETIMEDOUT:rt.ECONNABORTED,t,s)),s=null},wt.isStandardBrowserEnv){const e=(t.withCredentials||Gt(u))&&t.xsrfCookieName&&Dt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in s&&$.forEach(o.toJSON(),(function(t,e){s.setRequestHeader(e,t)})),$.isUndefined(t.withCredentials)||(s.withCredentials=!!t.withCredentials),a&&"json"!==a&&(s.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&s.addEventListener("progress",Mt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",Mt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{s&&(r(!e||e.type?new Ft(null,t,s):e),s.abort(),s=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);f&&-1===wt.protocols.indexOf(f)?r(new rt("Unsupported protocol "+f+":",rt.ERR_BAD_REQUEST,t)):s.send(n||null)}))}};$.forEach(zt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Zt=t=>{t=$.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let o=0;o<e&&(r=t[o],!(n=$.isString(r)?zt[r.toLowerCase()]:r));o++);if(!n){if(!1===n)throw new rt(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error($.hasOwnProp(zt,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`)}if(!$.isFunction(n))throw new TypeError("adapter is not a function");return n};function qt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ft(null,t)}function Wt(t){qt(t),t.headers=Bt.from(t.headers),t.data=_t.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Zt(t.adapter||Ot.adapter)(t).then((function(e){return qt(t),e.data=_t.call(t,t.transformResponse,e),e.headers=Bt.from(e.headers),e}),(function(e){return Rt(e)||(qt(t),e&&e.response&&(e.response.data=_t.call(t,t.transformResponse,e.response),e.response.headers=Bt.from(e.response.headers))),Promise.reject(e)}))}const Jt=t=>t instanceof Bt?t.toJSON():t;function Yt(t,e){e=e||{};const r={};function n(t,e,r){return $.isPlainObject(t)&&$.isPlainObject(e)?$.merge.call({caseless:r},t,e):$.isPlainObject(e)?$.merge({},e):$.isArray(e)?e.slice():e}function o(t,e,r){return $.isUndefined(e)?$.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function a(t,e){if(!$.isUndefined(e))return n(void 0,e)}function i(t,e){return $.isUndefined(e)?$.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function c(r,o,a){return a in e?n(r,o):a in t?n(void 0,r):void 0}const s={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(t,e)=>o(Jt(t),Jt(e),!0)};return $.forEach(Object.keys(t).concat(Object.keys(e)),(function(n){const a=s[n]||o,i=a(t[n],e[n],n);$.isUndefined(i)&&a!==c||(r[n]=i)})),r}const Ht="1.2.1",Kt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Kt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Vt={};Kt.transitional=function(t,e,r){return(n,o,a)=>{if(!1===t)throw new rt(function(t,e){return"[Axios v1.2.1] Transitional option '"+t+"'"+e+(r?". "+r:"")}(o," has been removed"+(e?" in "+e:"")),rt.ERR_DEPRECATED);return e&&!Vt[o]&&(Vt[o]=!0),!t||t(n,o,a)}};const Qt={assertOptions:function(t,e,r){if("object"!=typeof t)throw new rt("options must be an object",rt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const a=n[o],i=e[a];if(i){const e=t[a],r=void 0===e||i(e,a,t);if(!0!==r)throw new rt("option "+a+" must be "+r,rt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new rt("Unknown option "+a,rt.ERR_BAD_OPTION)}},validators:Kt},$t=Qt.validators;class Xt{constructor(t){this.defaults=t,this.interceptors={request:new yt,response:new yt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Yt(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;let a;void 0!==r&&Qt.assertOptions(r,{silentJSONParsing:$t.transitional($t.boolean),forcedJSONParsing:$t.transitional($t.boolean),clarifyTimeoutError:$t.transitional($t.boolean)},!1),void 0!==n&&Qt.assertOptions(n,{encode:$t.function,serialize:$t.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),a=o&&$.merge(o.common,o[e.method]),a&&$.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Bt.concat(a,o);const i=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,i.unshift(t.fulfilled,t.rejected))}));const s=[];let u;this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)}));let l,f=0;if(!c){const t=[Wt.bind(this),void 0];for(t.unshift.apply(t,i),t.push.apply(t,s),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=i.length;let p=e;for(f=0;f<l;){const t=i[f++],e=i[f++];try{p=t(p)}catch(t){e.call(this,t);break}}try{u=Wt.call(this,p)}catch(t){return Promise.reject(t)}for(f=0,l=s.length;f<l;)u=u.then(s[f++],s[f++]);return u}getUri(t){return ht(Ut((t=Yt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],(function(t){Xt.prototype[t]=function(e,r){return this.request(Yt(r||{},{method:t,url:e,data:(r||{}).data}))}})),$.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(Yt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Xt.prototype[t]=e(),Xt.prototype[t+"Form"]=e(!0)}));const te=Xt;class ee{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then((t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new Ft(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new ee((function(e){t=e})),cancel:t}}}const re=ee;const ne=function t(e){const r=new te(e),n=x(te.prototype.request,r);return $.extend(n,te.prototype,r,{allOwnKeys:!0}),$.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Yt(e,r))},n}(Ot);ne.Axios=te,ne.CanceledError=Ft,ne.CancelToken=re,ne.isCancel=Rt,ne.VERSION=Ht,ne.toFormData=st,ne.AxiosError=rt,ne.Cancel=ne.CanceledError,ne.all=function(t){return Promise.all(t)},ne.spread=function(t){return function(e){return t.apply(null,e)}},ne.isAxiosError=function(t){return $.isObject(t)&&!0===t.isAxiosError},ne.mergeConfig=Yt,ne.AxiosHeaders=Bt,ne.formToJSON=t=>xt($.isHTMLForm(t)?new FormData(t):t),ne.default=ne;const oe=ne;u(13);function ae(t){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ae(t)}function ie(){ie=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),c=new O(o||[]);return n(i,"_invoke",{value:w(t,r,c)}),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function d(){}function h(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&r.call(m,a)&&(y=m);var b=h.prototype=p.prototype=Object.create(y);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(n,a,i,c){var s=l(t[n],t,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==ae(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return o("throw",t,i,c)}))}c(s.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return j()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=h,n(b,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:d,configurable:!0}),d.displayName=s(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},v(A.prototype),s(A.prototype,i,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new A(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},v(b),s(b,c,"Generator"),s(b,a,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ce(t,e,r,n,o,a,i){try{var c=t[a](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function se(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){ce(a,n,o,i,c,"next",t)}function c(t){ce(a,n,o,i,c,"throw",t)}i(void 0)}))}}function ue(){return ue=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ue.apply(this,arguments)}"".concat(window.location.protocol,"//").concat(window.location.host,"/");var le=oe.create();le.interceptors.request.use((function(t){return t.validateStatus=function(t){return t>=200&&t<300},ue({},t)}));var fe=function(){var t=se(ie().mark((function t(e,r){var n,o,a,i,c,s,u;return ie().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.method,o=void 0===n?"GET":n,a=r.params,i=r.data,c=r.validateStatus,s="".concat("api/plugin-proxy/corpglory-dataexporter-app").concat("/api").concat(e),t.next=4,le({method:o,url:s,params:a,data:i,validateStatus:c});case 4:return u=t.sent,t.abrupt("return",u.data);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();var pe=u(14);function de(){return de=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},de.apply(this,arguments)}function he(){he=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),c=new O(o||[]);return n(i,"_invoke",{value:w(t,r,c)}),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function d(){}function h(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&r.call(m,a)&&(y=m);var b=h.prototype=p.prototype=Object.create(y);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(n,a,i,c){var s=l(t[n],t,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==me(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return o("throw",t,i,c)}))}c(s.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return j()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=h,n(b,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:d,configurable:!0}),d.displayName=s(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},v(A.prototype),s(A.prototype,i,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new A(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},v(b),s(b,c,"Generator"),s(b,a,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ye(t,e,r,n,o,a,i){try{var c=t[a](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function ge(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){ye(a,n,o,i,c,"next",t)}function c(t){ye(a,n,o,i,c,"throw",t)}i(void 0)}))}}function me(t){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(t)}function be(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,we(n.key),n)}}function ve(t,e,r){return e&&be(t.prototype,e),r&&be(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ae(t,e,r){return(e=we(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function we(t){var e=function(t,e){if("object"!==me(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===me(e)?e:String(e)}var xe=ve((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));Ae(xe,"GRAFANA_PLUGIN_SETTINGS_URL","/api/plugins/corpglory-dataexporter-app/settings"),Ae(xe,"grafanaBackend",(0,pe.getBackendSrv)()),Ae(xe,"generateInvalidDataExporterApiURLErrorMsg",(function(t){return"Could not communicate with your DataExporter API at ".concat(t,".\nValidate that the URL is correct, your DataExporter API is running, and that it is accessible from your Grafana instance.")})),Ae(xe,"generateUnknownErrorMsg",(function(t){return"An unknown error occured when trying to install the plugin. Are you sure that your DataExporter API URL, ".concat(t,", is correct?\nRefresh your page and try again, or try removing your plugin configuration and reconfiguring.")})),Ae(xe,"getHumanReadableErrorFromDataExporterError",(function(t,e){var r,n=xe.generateUnknownErrorMsg(e);if(oe.isAxiosError(t)){var o,a=null===(o=t.response)||void 0===o?void 0:o.status;if(502===a)r=xe.generateInvalidDataExporterApiURLErrorMsg(e);else if(400===a){var i,c;r=(null===(i=t.response)||void 0===i||null===(c=i.data)||void 0===c?void 0:c.error)||n}else r=n}else r=n;return r})),Ae(xe,"getHumanReadableErrorFromGrafanaProvisioningError",(function(t,e){return oe.isAxiosError(t)?xe.generateInvalidDataExporterApiURLErrorMsg(e):xe.generateUnknownErrorMsg(e)})),Ae(xe,"getGrafanaPluginSettings",ge(he().mark((function t(){return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",xe.grafanaBackend.get(xe.GRAFANA_PLUGIN_SETTINGS_URL));case 1:case"end":return t.stop()}}),t)})))),Ae(xe,"updateGrafanaPluginSettings",function(){var t=ge(he().mark((function t(e){var r,n=arguments;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!(n.length>1&&void 0!==n[1])||n[1],t.abrupt("return",xe.grafanaBackend.post(xe.GRAFANA_PLUGIN_SETTINGS_URL,de({},e,{enabled:r,pinned:!0}),{showSuccessAlert:!1}));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),Ae(xe,"createGrafanaToken",ge(he().mark((function t(){var e,r,n;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="/api/auth/keys",t.next=3,xe.grafanaBackend.get(e);case 3:if(r=t.sent,!(n=r.find((function(t){return"DataExporter"===t.name})))){t.next=8;break}return t.next=8,xe.grafanaBackend.delete("".concat(e,"/").concat(n.id),void 0,{showSuccessAlert:!1});case 8:return t.next=10,xe.grafanaBackend.post(e,{name:"DataExporter",role:"Admin",secondsToLive:null},{showSuccessAlert:!1});case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t)})))),Ae(xe,"timeout",(function(t){return new Promise((function(e){return setTimeout(e,10*Math.pow(2,t))}))})),Ae(xe,"connectBackend",ge(he().mark((function t(){var e,r,n;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xe.createGrafanaToken();case 2:return e=t.sent,r=e.key,t.next=6,xe.updateGrafanaPluginSettings({secureJsonData:{grafanaToken:r}});case 6:return t.next=8,fe("/connect",{method:"POST"});case 8:return n=t.sent,t.abrupt("return",{grafanaToken:r,dataExporterAPIResponse:n});case 10:case"end":return t.stop()}}),t)})))),Ae(xe,"installPlugin",function(){var t=ge(he().mark((function t(e){var r,n;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,xe.updateGrafanaPluginSettings({jsonData:{dataExporterApiUrl:e}});case 3:t.next=8;break;case 5:return t.prev=5,t.t0=t.catch(0),t.abrupt("return",xe.getHumanReadableErrorFromGrafanaProvisioningError(t.t0,e));case 8:return t.prev=8,t.next=11,xe.connectBackend();case 11:r=t.sent,t.next=17;break;case 14:return t.prev=14,t.t1=t.catch(8),t.abrupt("return",xe.getHumanReadableErrorFromDataExporterError(t.t1,e));case 17:return t.prev=17,n=r.grafanaToken,t.next=21,xe.updateGrafanaPluginSettings({jsonData:{dataExporterApiUrl:e},secureJsonData:{grafanaToken:n}});case 21:t.next=26;break;case 23:return t.prev=23,t.t2=t.catch(17),t.abrupt("return",xe.getHumanReadableErrorFromGrafanaProvisioningError(t.t2,e));case 26:return t.abrupt("return",null);case 27:case"end":return t.stop()}}),t,null,[[0,5],[8,14],[17,23]])})));return function(e){return t.apply(this,arguments)}}()),Ae(xe,"checkIfPluginIsConnected",function(){var t=ge(he().mark((function t(e){var r;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fe("/status",{method:"GET"});case 3:if(!(r=t.sent).version){t.next=8;break}return t.abrupt("return",r);case 8:throw new Error("Something is working at ".concat(e," but it's not DataExporter backend"));case 9:t.next=14;break;case 11:return t.prev=11,t.t0=t.catch(0),t.abrupt("return",xe.getHumanReadableErrorFromDataExporterError(t.t0,e));case 14:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e){return t.apply(this,arguments)}}()),Ae(xe,"resetPlugin",(function(){return xe.updateGrafanaPluginSettings({jsonData:{dataExporterApiUrl:null},secureJsonData:{grafanaToken:null}},!1)}));const Ce=xe;var Ee=u(18),Oe={};Oe.styleTagTransform=d(),Oe.setAttributes=c(),Oe.insert=a().bind(null,"head"),Oe.domAPI=n(),Oe.insertStyleElement=f();e()(Ee.Z,Oe);const Se=Ee.Z&&Ee.Z.locals?Ee.Z.locals:void 0;var je=u(19),ke={};ke.styleTagTransform=d(),ke.setAttributes=c(),ke.insert=a().bind(null,"head"),ke.domAPI=n(),ke.insertStyleElement=f();e()(je.Z,ke);const Le=je.Z&&je.Z.locals?je.Z.locals:void 0;var Pe=u(12),Te=u.n(Pe),Be=["children","style","className","bordered","fullWidth","hover","shadowed","withBackground"];function _e(){return _e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_e.apply(this,arguments)}function Re(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var Ne=Te().bind(Le);const Fe=function(t){var e=t.children,r=t.style,n=t.className,o=t.bordered,a=void 0!==o&&o,i=t.fullWidth,c=void 0!==i&&i,s=t.hover,u=void 0!==s&&s,l=t.shadowed,f=void 0!==l&&l,p=t.withBackground,d=void 0!==p&&p,h=Re(t,Be);return v().createElement("div",_e({className:Ne("root",n,{root_bordered:a,root_shadowed:f,"root--fullWidth":c,"root--withBackground":d,"root--hover":u}),style:r},h),e)};var De=u(20),Ue={};Ue.styleTagTransform=d(),Ue.setAttributes=c(),Ue.insert=a().bind(null,"head"),Ue.domAPI=n(),Ue.insertStyleElement=f();e()(De.Z,Ue);const Ge=De.Z&&De.Z.locals?De.Z.locals:void 0;var Ie=u(10),Me=u(15),ze=u.n(Me);var Ze=u(21),qe=u.n(Ze);function We(t){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},We(t)}var Je=["level","className","style"];function Ye(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function He(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==We(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==We(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===We(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ke(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ve(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ve(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Qe=Te().bind(Ge),$e=function(t){var e,r=t.type,n=t.size,o=void 0===n?"medium":n,a=t.strong,i=void 0!==a&&a,c=t.underline,s=void 0!==c&&c,u=t.children,l=t.onClick,f=t.keyboard,p=void 0!==f&&f,d=t.className,h=t.wrap,y=void 0===h||h,g=t.copyable,m=void 0!==g&&g,w=t.editable,x=void 0!==w&&w,C=t.onTextChange,E=t.clearBeforeEdit,O=void 0!==E&&E,S=t.hidden,j=void 0!==S&&S,k=t.editModalTitle,L=void 0===k?"New value":k,P=t.style,T=Ke((0,b.useState)(!1),2),B=T[0],_=T[1],R=Ke((0,b.useState)(),2),N=R[0],F=R[1],D=(0,b.useCallback)((function(){F(O||j?"":u),_(!0)}),[O,j,u]),U=(0,b.useCallback)((function(){_(!1)}),[]),G=(0,b.useCallback)((function(){_(!1),C(N)}),[N,C]),I=(0,b.useCallback)((function(t){F(t.target.value)}),[]);return v().createElement("span",{onClick:l,className:Qe("root","text",d,(e={},He(e,"text--".concat(r),!0),He(e,"text--".concat(o),!0),He(e,"text--strong",i),He(e,"text--underline",s),He(e,"no-wrap",!y),He(e,"keyboard",p),e)),style:P},j?"**********":u,x&&v().createElement(A.IconButton,{onClick:D,variant:"primary",className:Qe("icon-button"),tooltip:"Edit",tooltipPlacement:"top",name:"edit"}),m&&v().createElement(qe(),{text:u,onCopy:function(){var t;t="Text copied",ze().emit(Ie.AppEvents.alertSuccess,[t])}},v().createElement(A.IconButton,{variant:"primary",className:Qe("icon-button"),tooltip:"Copy to clipboard",tooltipPlacement:"top",name:"copy"})),B&&v().createElement(A.Modal,{onDismiss:U,closeOnEscape:!0,isOpen:!0,title:L},v().createElement(A.VerticalGroup,null,v().createElement(A.Input,{autoFocus:!0,ref:function(t){t&&t.focus()},value:N,onChange:I}),v().createElement(A.HorizontalGroup,{justify:"flex-end"},v().createElement(A.Button,{variant:"secondary",onClick:U},"Cancel"),v().createElement(A.Button,{variant:"primary",onClick:G},"Ok")))))};$e.Title=function(t){var e=t.level,r=t.className,n=t.style,o=Ye(t,Je),a="h".concat(e);return v().createElement(a,{className:Qe("title",r),style:n},v().createElement($e,o))};const Xe=$e;var tr=Object.prototype;const er=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tr)};const rr=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object);var nr=Object.prototype.hasOwnProperty;const or=function(t){if(!er(t))return rr(t);var e=[];for(var r in Object(t))nr.call(t,r)&&"constructor"!=r&&e.push(r);return e};const ar="object"==typeof global&&global&&global.Object===Object&&global;var ir="object"==typeof self&&self&&self.Object===Object&&self;const cr=ar||ir||Function("return this")();const sr=cr.Symbol;var ur=Object.prototype,lr=ur.hasOwnProperty,fr=ur.toString,pr=sr?sr.toStringTag:void 0;const dr=function(t){var e=lr.call(t,pr),r=t[pr];try{t[pr]=void 0;var n=!0}catch(t){}var o=fr.call(t);return n&&(e?t[pr]=r:delete t[pr]),o};var hr=Object.prototype.toString;const yr=function(t){return hr.call(t)};var gr=sr?sr.toStringTag:void 0;const mr=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":gr&&gr in Object(t)?dr(t):yr(t)};const br=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const vr=function(t){if(!br(t))return!1;var e=mr(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const Ar=cr["__core-js_shared__"];var wr,xr=(wr=/[^.]+$/.exec(Ar&&Ar.keys&&Ar.keys.IE_PROTO||""))?"Symbol(src)_1."+wr:"";const Cr=function(t){return!!xr&&xr in t};var Er=Function.prototype.toString;const Or=function(t){if(null!=t){try{return Er.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var Sr=/^\[object .+?Constructor\]$/,jr=Function.prototype,kr=Object.prototype,Lr=jr.toString,Pr=kr.hasOwnProperty,Tr=RegExp("^"+Lr.call(Pr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Br=function(t){return!(!br(t)||Cr(t))&&(vr(t)?Tr:Sr).test(Or(t))};const _r=function(t,e){return null==t?void 0:t[e]};const Rr=function(t,e){var r=_r(t,e);return Br(r)?r:void 0};const Nr=Rr(cr,"DataView");const Fr=Rr(cr,"Map");const Dr=Rr(cr,"Promise");const Ur=Rr(cr,"Set");const Gr=Rr(cr,"WeakMap");var Ir="[object Map]",Mr="[object Promise]",zr="[object Set]",Zr="[object WeakMap]",qr="[object DataView]",Wr=Or(Nr),Jr=Or(Fr),Yr=Or(Dr),Hr=Or(Ur),Kr=Or(Gr),Vr=mr;(Nr&&Vr(new Nr(new ArrayBuffer(1)))!=qr||Fr&&Vr(new Fr)!=Ir||Dr&&Vr(Dr.resolve())!=Mr||Ur&&Vr(new Ur)!=zr||Gr&&Vr(new Gr)!=Zr)&&(Vr=function(t){var e=mr(t),r="[object Object]"==e?t.constructor:void 0,n=r?Or(r):"";if(n)switch(n){case Wr:return qr;case Jr:return Ir;case Yr:return Mr;case Hr:return zr;case Kr:return Zr}return e});const Qr=Vr;const $r=function(t){return null!=t&&"object"==typeof t};const Xr=function(t){return $r(t)&&"[object Arguments]"==mr(t)};var tn=Object.prototype,en=tn.hasOwnProperty,rn=tn.propertyIsEnumerable;const nn=Xr(function(){return arguments}())?Xr:function(t){return $r(t)&&en.call(t,"callee")&&!rn.call(t,"callee")};const on=Array.isArray;const an=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};const cn=function(t){return null!=t&&an(t.length)&&!vr(t)};const sn=function(){return!1};var un="object"==typeof exports&&exports&&!exports.nodeType&&exports,ln=un&&"object"==typeof module&&module&&!module.nodeType&&module,fn=ln&&ln.exports===un?cr.Buffer:void 0;const pn=(fn?fn.isBuffer:void 0)||sn;var dn={};dn["[object Float32Array]"]=dn["[object Float64Array]"]=dn["[object Int8Array]"]=dn["[object Int16Array]"]=dn["[object Int32Array]"]=dn["[object Uint8Array]"]=dn["[object Uint8ClampedArray]"]=dn["[object Uint16Array]"]=dn["[object Uint32Array]"]=!0,dn["[object Arguments]"]=dn["[object Array]"]=dn["[object ArrayBuffer]"]=dn["[object Boolean]"]=dn["[object DataView]"]=dn["[object Date]"]=dn["[object Error]"]=dn["[object Function]"]=dn["[object Map]"]=dn["[object Number]"]=dn["[object Object]"]=dn["[object RegExp]"]=dn["[object Set]"]=dn["[object String]"]=dn["[object WeakMap]"]=!1;const hn=function(t){return $r(t)&&an(t.length)&&!!dn[mr(t)]};const yn=function(t){return function(e){return t(e)}};var gn="object"==typeof exports&&exports&&!exports.nodeType&&exports,mn=gn&&"object"==typeof module&&module&&!module.nodeType&&module,bn=mn&&mn.exports===gn&&ar.process,vn=function(){try{var t=mn&&mn.require&&mn.require("util").types;return t||bn&&bn.binding&&bn.binding("util")}catch(t){}}();var An=vn&&vn.isTypedArray;const wn=An?yn(An):hn;var xn=Object.prototype.hasOwnProperty;const Cn=function(t){if(null==t)return!0;if(cn(t)&&(on(t)||"string"==typeof t||"function"==typeof t.splice||pn(t)||wn(t)||nn(t)))return!t.length;var e=Qr(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(er(t))return!or(t).length;for(var r in t)if(xn.call(t,r))return!1;return!0};function En(t){return En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},En(t)}var On,Sn,jn,kn,Ln;function Pn(){Pn=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),c=new O(o||[]);return n(i,"_invoke",{value:w(t,r,c)}),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function d(){}function h(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&r.call(m,a)&&(y=m);var b=h.prototype=p.prototype=Object.create(y);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(n,a,i,c){var s=l(t[n],t,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==En(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return o("throw",t,i,c)}))}c(s.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return j()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=h,n(b,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:d,configurable:!0}),d.displayName=s(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},v(A.prototype),s(A.prototype,i,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new A(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},v(b),s(b,c,"Generator"),s(b,a,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Tn(t,e,r,n,o,a,i){try{var c=t[a](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Bn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return _n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Rn=Te().bind(Se),Nn=function(t){try{return new URL(t),!0}catch(t){return!1}},Fn=function(t){var e=t.errorMsg;return v().createElement(v().Fragment,null,v().createElement("pre",null,v().createElement(Xe,{type:"link"},e)),v().createElement(Fe,{withBackground:!0,className:Rn("info-block")},On||(On=v().createElement(Xe,{type:"secondary"},"Need help?",v().createElement("br",null),"- file bugs on our GitHub Issues page"," ",v().createElement("a",{href:"https://code.corpglory.net/corpglory/grafana-data-exporter-app/issues",target:"_blank",rel:"noreferrer"},v().createElement(Xe,{type:"link"},"here"))))))};const Dn=function(t){var e,r=t.onSuccessfulSetup,n=t.defaultDataExporterApiUrl,o=Bn((0,b.useState)(null),2),a=o[0],i=o[1],c=Bn((0,b.useState)(!1),2),s=c[0],u=c[1],l=(0,b.useCallback)(function(){var t,e=(t=Pn().mark((function t(e){var n,o;return Pn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.dataExporterApiUrl,u(!0),t.next=4,Ce.installPlugin(n);case 4:(o=t.sent)?(i(o),u(!1)):r();case 6:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Tn(a,n,o,i,c,"next",t)}function c(t){Tn(a,n,o,i,c,"throw",t)}i(void 0)}))});return function(t){return e.apply(this,arguments)}}(),[r]);return v().createElement(A.Form,{defaultValues:{dataExporterApiUrl:n},onSubmit:l},(function(t){var r=t.register,n=t.errors;return v().createElement(v().Fragment,null,v().createElement("div",{className:Rn("info-block")},Sn||(Sn=v().createElement("p",null,"1. Launch the DataExporter backend")),jn||(jn=v().createElement(Xe,{type:"secondary"},"Run the backend. See"," ",v().createElement("a",{href:"https://code.corpglory.net/corpglory/grafana-data-exporter",target:"_blank",rel:"noreferrer"},v().createElement(Xe,{type:"link"},"here"))," ","on how to get started."))),v().createElement("div",{className:Rn("info-block")},kn||(kn=v().createElement("p",null,"2. Let us know the base URL of your DataExporter API")),Ln||(Ln=v().createElement(Xe,{type:"secondary"},"The DataExporter backend must be reachable from your Grafana installation. Some examples are:",v().createElement("br",null),"- http://host.docker.internal:8000",v().createElement("br",null),"- http://localhost:8000"))),v().createElement(A.Field,{label:"DataExporter backend URL",invalid:!!n.dataExporterApiUrl,error:"Must be a valid URL"},v().createElement(A.Input,r("dataExporterApiUrl",{required:!0,validate:Nn}))),a&&(e||(e=v().createElement(Fn,{errorMsg:a}))),v().createElement(A.Button,{type:"submit",size:"md",disabled:s||!Cn(n)},"Connect"))}))};function Un(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Gn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const In=function(t){var e=t.children,r=t.title,n=void 0===r?"Are you sure to delete?":r,o=t.body,a=t.confirmText,i=void 0===a?"Delete":a,c=t.disabled,s=Un((0,b.useState)(!1),2),u=s[0],l=s[1],f=(0,b.useCallback)((function(t){t.stopPropagation(),l(!0)}),[]),p=(0,b.useCallback)((function(){e.props.onClick&&e.props.onClick(),l(!1)}),[e]);return v().createElement(v().Fragment,null,u&&v().createElement(A.ConfirmModal,{isOpen:!0,title:n,confirmText:i,dismissText:"Cancel",onConfirm:p,body:o,onDismiss:function(){l(!1)}}),v().cloneElement(e,{disabled:e.props.disabled||c,onClick:f}))};const Mn=function(t){var e=t.disabled,r=t.onClick;return v().createElement(In,{title:"Are you sure to delete the plugin configuration?",confirmText:"Remove"},v().createElement(A.Button,{variant:"destructive",onClick:r,size:"md",disabled:e},"Remove current configuration"))};const zn=function(t){var e=t.text;return v().createElement("pre",{"data-testid":"status-message-block"},v().createElement(Xe,null,e))};function Zn(t){return Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(t)}var qn,Wn,Jn,Yn;function Hn(){Hn=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),c=new O(o||[]);return n(i,"_invoke",{value:w(t,r,c)}),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function d(){}function h(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&r.call(m,a)&&(y=m);var b=h.prototype=p.prototype=Object.create(y);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(n,a,i,c){var s=l(t[n],t,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==Zn(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return o("throw",t,i,c)}))}c(s.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return j()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=h,n(b,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:d,configurable:!0}),d.displayName=s(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},v(A.prototype),s(A.prototype,i,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new A(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},v(b),s(b,c,"Generator"),s(b,a,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Kn(t,e,r,n,o,a,i){try{var c=t[a](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Vn(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Kn(a,n,o,i,c,"next",t)}function c(t){Kn(a,n,o,i,c,"throw",t)}i(void 0)}))}}function Qn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return $n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Xn="pluginConfigured",to="true",eo="pluginConfiguredVersion",ro=(new Ie.AppPlugin).addConfigPage({title:"Configuration",icon:"fa fa-cog",body:function(t){var e,r=t.plugin.meta,n=r.jsonData,o=r.enabled,a=(0,w.useLocation)().search,i=new URLSearchParams(a),c=i.get(Xn),s=i.get(eo),u=c===to,l=Qn((0,b.useState)(!u),2),f=l[0],p=l[1],d=Qn((0,b.useState)(null),2),h=d[0],y=d[1],g=Qn((0,b.useState)(u?{version:s}:null),2),m=g[0],x=g[1],C=Qn((0,b.useState)(!1),2),E=C[0],O=C[1],S=Qn((0,b.useState)(null),2),j=S[0],k=S[1],L=null==n?void 0:n.dataExporterApiUrl,P=(0,b.useCallback)((function(){return function(t){if(window.history.pushState&&t){var e="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname);window.history.pushState({path:e},"",e)}}(o)}),[o]),T=(0,b.useCallback)(Vn(Hn().mark((function t(){var e;return Hn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(p(!0),y(null),L){t.next=5;break}return p(!1),t.abrupt("return");case 5:return t.next=7,Ce.checkIfPluginIsConnected(L);case 7:"string"==typeof(e=t.sent)?y(e):(x(e),r=!0,n=void 0,n=e.version,r||(window.location.href="".concat(window.location.href,"?").concat(Xn,"=").concat(to,"&").concat(eo,"=").concat(n))),p(!1);case 10:case"end":return t.stop()}var r,n}),t)}))),[L]);(0,b.useEffect)(P,[P]),(0,b.useEffect)((function(){u||T()}),[L,u,T]);var B,_=(0,b.useCallback)((function(){k(null),y(null),x(null),P()}),[P]),R=(0,b.useCallback)(Vn(Hn().mark((function t(){return Hn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return O(!0),_(),t.prev=2,t.next=5,Ce.resetPlugin();case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(2),k("There was an error resetting your plugin, try again.");case 10:O(!1);case 11:case"end":return t.stop()}}),t,null,[[2,7]])}))),[_]),N=(0,b.useCallback)((function(){return e||(e=v().createElement(Mn,{disabled:E,onClick:R}))}),[E,R]);return B=f?qn||(qn=v().createElement(A.LoadingPlaceholder,{text:"Validating your plugin connection..."})):h||j?v().createElement(v().Fragment,null,v().createElement(zn,{text:h||j}),v().createElement(N,null)):m?v().createElement(N,null):v().createElement(Dn,{onSuccessfulSetup:T,defaultDataExporterApiUrl:"http://localhost:8000"}),v().createElement(v().Fragment,null,Wn||(Wn=v().createElement(A.Legend,null,"Configure DataExporter")),m?v().createElement(v().Fragment,null,v().createElement("p",null,"Plugin is connected! Continue to DataExporter by clicking the"," "),Jn||(Jn=v().createElement(zn,{text:"Connected to DataExporter"}))):Yn||(Yn=v().createElement("p",null,"This page will help you configure the DataExporter plugin 👋")),B)},id:"configuration"})})(),l})()));
//# sourceMappingURL=module.js.map