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
65 KiB

/*! For license information please see module.js.LICENSE.txt */
define(["@emotion/css","@grafana/data","@grafana/runtime","@grafana/ui","app/core/app_events","app/core/core","lodash","react"],((t,e,r,n,o,i,a,s)=>(()=>{var c=[t=>{"use strict";t.exports=s},t=>{"use strict";t.exports=n},,,,,,,,,t=>{"use strict";t.exports=e},t=>{t.exports="object"==typeof self?self.FormData:window.FormData},,t=>{"use strict";t.exports=a},t=>{"use strict";t.exports=r},t=>{"use strict";t.exports=o},,,,,,,,,,,,,t=>{"use strict";t.exports=i},e=>{"use strict";e.exports=t}],u={};function l(t){var e=u[t];if(void 0!==e)return e.exports;var r=u[t]={exports:{}};return c[t](r,r.exports,l),r.exports}l.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return l.d(e,{a:e}),e},l.d=(t,e)=>{for(var r in e)l.o(e,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var f={};return(()=>{"use strict";var t,e,r;l.r(f),l.d(f,{plugin:()=>_e}),function(t){t.INFLUXDB="influxdb",t.GRAPHITE="graphite",t.PROMETHEUS="prometheus",t.POSTGRES="postgres",t.ELASTICSEARCH="elasticsearch",t.MYSQL="mysql"}(t||(t={})),function(t){t.LOADING="Loading",t.DATASOURCE_ERROR="Datasource Error",t.PERMISSION_ERROR="Permission Error",t.OK="Ok"}(e||(e={})),function(t){t.EXPORTING="exporting",t.FINISHED="finished",t.ERROR="error"}(r||(r={}));var n=l(10);l(15);function o(){var t=window.location.toString(),e=new URL(t).pathname.match(/\/d\/([^/]+)/);if(e)return e[1];throw new Error("Can't get current dashboard uid. If it's a new dashboard, please save it first.")}function i(t){return t?new Date(t).toLocaleString("en-GB",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}):"-"}var a="iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACJSURBVHgB7ZPRCcAgDESv0lWc0zhC53OIjmAVUpCSamL76YEoyfFIiAGWfldK6SwnKHyhep9xJ3iPcqgH5RyxV1VlBWYJypXVHMEiCaqBbRhAy3W3B76j954wq6ZSVZsOY+WXt6i9l2ymGTlUq0VpOcIqaQC96Zth01DN1zBBefVI4SNp9Za+6wLcH6DKFrfpxgAAAABJRU5ErkJggg==",s="iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAS1BMVEUAAADH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0NnH0Nn///+uWGxHAAAAF3RSTlMAABI4MAgNNbzy7JcQG6zvoPxPbavwDHoS9oEAAAABYktHRBibaYUeAAAACXBIWXMAAABgAAAAYADwa0LPAAAAB3RJTUUH5wEUFy4lfOQAfAAAAFdJREFUGNPFjkkKwCAQBEcd912TzP9/GglIQvBuXQoamm6ArbCHv7hAOaS0VkMSBWeAxjofIKacU4TgnTUIhYhqgz5EHVodKutw1o98vvU5dH2Hlpe2cgMuNAUd58WuNgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wMS0yMFQyMDo0NjozNyswMzowMDMOisYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDEtMjBUMjA6NDY6MzcrMDM6MDBCUzJ6AAAAAElFTkSuQmCC",c="PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMC41IiB5PSIwLjUiIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgcng9IjEuNSIgZmlsbD0iIzExMTIxNiIgc3Ryb2tlPSIjMkQyRTM0Ii8+Cjwvc3ZnPgo=",u="PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiByeD0iMiIgZmlsbD0iIzRBNzFEMiIvPgo8cGF0aCBkPSJNNS45ODI2NCAxMi41MjE3QzUuNzczOTUgMTIuNTIxNyA1LjU4MjY0IDEyLjQ1MjIgNS40MjYxMiAxMi4yOTU2TDEuOTY1MjUgOC44MzQ3NkMxLjY1MjIxIDguNTIxNzIgMS42NTIyMSA4LjAzNDc2IDEuOTY1MjUgNy43MjE3MkMyLjI3ODI5IDcuNDA4NjcgMi43NjUyNSA3LjQwODY3IDMuMDc4MjkgNy43MjE3Mkw2LjAwMDAzIDEwLjYyNjFMMTIuOTM5MiAzLjcwNDMzQzEzLjI1MjIgMy4zOTEyOCAxMy43MzkyIDMuMzkxMjggMTQuMDUyMiAzLjcwNDMzQzE0LjM2NTMgNC4wMTczNyAxNC4zNjUzIDQuNTA0MzMgMTQuMDUyMiA0LjgxNzM3TDYuNTU2NTYgMTIuMjk1NkM2LjM4MjY0IDEyLjQ1MjIgNi4xOTEzNCAxMi41MjE3IDUuOTgyNjQgMTIuNTIxN1YxMi41MjE3WiIgZmlsbD0iI0ZFRkZGRiIvPgo8L3N2Zz4K";function p(t,e){return function(){return t.apply(e,arguments)}}const{toString:h}=Object.prototype,{getPrototypeOf:d}=Object,y=(m=Object.create(null),t=>{const e=h.call(t);return m[e]||(m[e]=e.slice(8,-1).toLowerCase())});var m;const v=t=>(t=t.toLowerCase(),e=>y(e)===t),g=t=>e=>typeof e===t,{isArray:w}=Array,b=g("undefined");const E=v("ArrayBuffer");const A=g("string"),O=g("function"),x=g("number"),S=t=>null!==t&&"object"==typeof t,j=t=>{if("object"!==y(t))return!1;const e=d(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},N=v("Date"),R=v("File"),T=v("Blob"),L=v("FileList"),I=v("URLSearchParams");function M(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),w(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),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function P(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 D="undefined"==typeof self?"undefined"==typeof global?void 0:global:self,k=t=>!b(t)&&t!==D;const C=(_="undefined"!=typeof Uint8Array&&d(Uint8Array),t=>_&&t instanceof _);var _;const U=v("HTMLFormElement"),F=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),B=v("RegExp"),H=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};M(r,((r,o)=>{!1!==e(r,o,t)&&(n[o]=r)})),Object.defineProperties(t,n)},z={isArray:w,isArrayBuffer:E,isBuffer:function(t){return null!==t&&!b(t)&&null!==t.constructor&&!b(t.constructor)&&O(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||h.call(t)===e||O(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&E(t.buffer),e},isString:A,isNumber:x,isBoolean:t=>!0===t||!1===t,isObject:S,isPlainObject:j,isUndefined:b,isDate:N,isFile:R,isBlob:T,isRegExp:B,isFunction:O,isStream:t=>S(t)&&O(t.pipe),isURLSearchParams:I,isTypedArray:C,isFileList:L,forEach:M,merge:function t(){const{caseless:e}=k(this)&&this||{},r={},n=(n,o)=>{const i=e&&P(r,o)||o;j(r[i])&&j(n)?r[i]=t(r[i],n):j(n)?r[i]=t({},n):w(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&M(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(M(e,((e,n)=>{r&&O(e)?t[n]=p(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,i,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&d(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:y,kindOfTest:v,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(w(t))return t;let e=t.length;if(!x(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:U,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:H,freezeMethods:t=>{H(t,((e,r)=>{if(O(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];O(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 w(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:P,global:D,isContextDefined:k,toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(S(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=w(t)?[]:{};return M(t,((t,e)=>{const i=r(t,n+1);!b(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)}};function G(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)}z.inherits(G,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:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Y=G.prototype,J={};["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=>{J[t]={value:t}})),Object.defineProperties(G,J),Object.defineProperty(Y,"isAxiosError",{value:!0}),G.from=(t,e,r,n,o,i)=>{const a=Object.create(Y);return z.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),G.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const V=G;const Q=l(11);function Z(t){return z.isPlainObject(t)||z.isArray(t)}function W(t){return z.endsWith(t,"[]")?t.slice(0,-2):t}function q(t,e,r){return t?t.concat(e).map((function(t,e){return t=W(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const K=z.toFlatObject(z,{},null,(function(t){return/^is[A-Z]/.test(t)}));const X=function(t,e,r){if(!z.isObject(t))throw new TypeError("target must be an object");e=e||new(Q||FormData);const n=(r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!z.isUndefined(e[t])}))).metaTokens,o=r.visitor||l,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&((c=e)&&z.isFunction(c.append)&&"FormData"===c[Symbol.toStringTag]&&c[Symbol.iterator]);var c;if(!z.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(z.isDate(t))return t.toISOString();if(!s&&z.isBlob(t))throw new V("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(t)||z.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,r,o){let s=t;if(t&&!o&&"object"==typeof t)if(z.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(z.isArray(t)&&function(t){return z.isArray(t)&&!t.some(Z)}(t)||z.isFileList(t)||z.endsWith(r,"[]")&&(s=z.toArray(t)))return r=W(r),s.forEach((function(t,n){!z.isUndefined(t)&&null!==t&&e.append(!0===a?q([r],n,i):null===a?r:r+"[]",u(t))})),!1;return!!Z(t)||(e.append(q(o,r,i),u(t)),!1)}const f=[],p=Object.assign(K,{defaultVisitor:l,convertValue:u,isVisitable:Z});if(!z.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!z.isUndefined(r)){if(-1!==f.indexOf(r))throw Error("Circular reference detected in "+n.join("."));f.push(r),z.forEach(r,(function(r,i){!0===(!(z.isUndefined(r)||null===r)&&o.call(e,r,z.isString(i)?i.trim():i,n,p))&&t(r,n?n.concat(i):[i])})),f.pop()}}(t),e};function $(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function tt(t,e){this._pairs=[],t&&X(t,this,e)}const et=tt.prototype;et.append=function(t,e){this._pairs.push([t,e])},et.toString=function(t){const e=t?function(e){return t.call(this,e,$)}:$;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const rt=tt;function nt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ot(t,e,r){if(!e)return t;const n=r&&r.encode||nt,o=r&&r.serialize;let i;if(i=o?o(e,r):z.isURLSearchParams(e)?e.toString():new rt(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const it=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){z.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},at={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},st="undefined"!=typeof URLSearchParams?URLSearchParams:rt,ct=FormData,ut=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),lt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ft={isBrowser:!0,classes:{URLSearchParams:st,FormData:ct,Blob},isStandardBrowserEnv:ut,isStandardBrowserWebWorkerEnv:lt,protocols:["http","https","file","blob","url","data"]};const pt=function(t){function e(t,r,n,o){let i=t[o++];const a=Number.isFinite(+i),s=o>=t.length;if(i=!i&&z.isArray(n)?n.length:i,s)return z.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&z.isObject(n[i])||(n[i]=[]);return e(t,r,n[i],o)&&z.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}(n[i])),!a}if(z.isFormData(t)&&z.isFunction(t.entries)){const r={};return z.forEachEntry(t,((t,n)=>{e(function(t){return z.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},ht={"Content-Type":void 0};const dt={transitional:at,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=z.isObject(t);o&&z.isHTMLForm(t)&&(t=new FormData(t));if(z.isFormData(t))return n&&n?JSON.stringify(pt(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return X(t,new ft.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return ft.isNode&&z.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return X(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(z.isString(t))try{return(e||JSON.parse)(t),z.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||dt.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&z.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 V.from(t,V.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:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};z.forEach(["delete","get","head"],(function(t){dt.headers[t]={}})),z.forEach(["post","put","patch"],(function(t){dt.headers[t]=z.merge(ht)}));const yt=dt,mt=z.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"]),vt=Symbol("internals");function gt(t){return t&&String(t).trim().toLowerCase()}function wt(t){return!1===t||null==t?t:z.isArray(t)?t.map(wt):String(t)}function bt(t,e,r,n){return z.isFunction(n)?n.call(this,e,r):z.isString(e)?z.isString(n)?-1!==e.indexOf(n):z.isRegExp(n)?n.test(e):void 0:void 0}class Et{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=gt(e);if(!o)throw new Error("header name must be a non-empty string");const i=z.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=wt(t))}const i=(t,e)=>z.forEach(t,((t,r)=>o(t,r,e)));return z.isPlainObject(t)||t instanceof this.constructor?i(t,e):z.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?i((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]&&mt[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=gt(t)){const r=z.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(z.isFunction(e))return e.call(this,t,r);if(z.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=gt(t)){const r=z.findKey(this,t);return!(!r||e&&!bt(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=gt(t)){const o=z.findKey(r,t);!o||e&&!bt(0,r[o],o,e)||(delete r[o],n=!0)}}return z.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 z.forEach(this,((n,o)=>{const i=z.findKey(r,o);if(i)return e[i]=wt(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=wt(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return z.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&z.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[vt]=this[vt]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=gt(t);e[n]||(!function(t,e){const r=z.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 z.isArray(t)?t.forEach(n):n(t),this}}Et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),z.freezeMethods(Et.prototype),z.freezeMethods(Et);const At=Et;function Ot(t,e){const r=this||yt,n=e||r,o=At.from(n.headers);let i=n.data;return z.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function xt(t){return!(!t||!t.__CANCEL__)}function St(t,e,r){V.call(this,null==t?"canceled":t,V.ERR_CANCELED,e,r),this.name="CanceledError"}z.inherits(St,V,{__CANCEL__:!0});const jt=St;const Nt=ft.isStandardBrowserEnv?{write:function(t,e,r,n,o,i){const a=[];a.push(t+"="+encodeURIComponent(e)),z.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),z.isString(n)&&a.push("path="+n),z.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.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 Rt(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 Tt=ft.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=z.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};const Lt=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),c-o<e)return;const p=u&&c-u;return p?Math.round(1e3*f/p):void 0}};function It(t,e){let r=0;const n=Lt(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,c=n(s);r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const Mt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=At.from(t.headers).normalize(),i=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}z.isFormData(n)&&(ft.isStandardBrowserEnv||ft.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=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=Rt(t.baseURL,t.url);function l(){if(!c)return;const n=At.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new V("Request failed with status code "+r.status,[V.ERR_BAD_REQUEST,V.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),s()}),(function(t){r(t),s()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),ot(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(r(new V("Request aborted",V.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new V("Network Error",V.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||at;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new V(e,n.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,t,c)),c=null},ft.isStandardBrowserEnv){const e=(t.withCredentials||Tt(u))&&t.xsrfCookieName&&Nt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in c&&z.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),z.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",It(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",It(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{c&&(r(!e||e.type?new jt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);f&&-1===ft.protocols.indexOf(f)?r(new V("Unsupported protocol "+f+":",V.ERR_BAD_REQUEST,t)):c.send(n||null)}))}};z.forEach(Mt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Pt=t=>{t=z.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let o=0;o<e&&(r=t[o],!(n=z.isString(r)?Mt[r.toLowerCase()]:r));o++);if(!n){if(!1===n)throw new V(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(z.hasOwnProp(Mt,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`)}if(!z.isFunction(n))throw new TypeError("adapter is not a function");return n};function Dt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new jt(null,t)}function kt(t){Dt(t),t.headers=At.from(t.headers),t.data=Ot.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Pt(t.adapter||yt.adapter)(t).then((function(e){return Dt(t),e.data=Ot.call(t,t.transformResponse,e),e.headers=At.from(e.headers),e}),(function(e){return xt(e)||(Dt(t),e&&e.response&&(e.response.data=Ot.call(t,t.transformResponse,e.response),e.response.headers=At.from(e.response.headers))),Promise.reject(e)}))}const Ct=t=>t instanceof At?t.toJSON():t;function _t(t,e){e=e||{};const r={};function n(t,e,r){return z.isPlainObject(t)&&z.isPlainObject(e)?z.merge.call({caseless:r},t,e):z.isPlainObject(e)?z.merge({},e):z.isArray(e)?e.slice():e}function o(t,e,r){return z.isUndefined(e)?z.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!z.isUndefined(e))return n(void 0,e)}function a(t,e){return z.isUndefined(e)?z.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Ct(t),Ct(e),!0)};return z.forEach(Object.keys(t).concat(Object.keys(e)),(function(n){const i=c[n]||o,a=i(t[n],e[n],n);z.isUndefined(a)&&i!==s||(r[n]=a)})),r}const Ut="1.2.1",Ft={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ft[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Bt={};Ft.transitional=function(t,e,r){return(n,o,i)=>{if(!1===t)throw new V(function(t,e){return"[Axios v1.2.1] Transitional option '"+t+"'"+e+(r?". "+r:"")}(o," has been removed"+(e?" in "+e:"")),V.ERR_DEPRECATED);return e&&!Bt[o]&&(Bt[o]=!0),!t||t(n,o,i)}};const Ht={assertOptions:function(t,e,r){if("object"!=typeof t)throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new V("option "+i+" must be "+r,V.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new V("Unknown option "+i,V.ERR_BAD_OPTION)}},validators:Ft},zt=Ht.validators;class Gt{constructor(t){this.defaults=t,this.interceptors={request:new it,response:new it}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=_t(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;let i;void 0!==r&&Ht.assertOptions(r,{silentJSONParsing:zt.transitional(zt.boolean),forcedJSONParsing:zt.transitional(zt.boolean),clarifyTimeoutError:zt.transitional(zt.boolean)},!1),void 0!==n&&Ht.assertOptions(n,{encode:zt.function,serialize:zt.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&z.merge(o.common,o[e.method]),i&&z.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=At.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[kt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=a.length;let p=e;for(f=0;f<l;){const t=a[f++],e=a[f++];try{p=t(p)}catch(t){e.call(this,t);break}}try{u=kt.call(this,p)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(t){return ot(Rt((t=_t(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}z.forEach(["delete","get","head","options"],(function(t){Gt.prototype[t]=function(e,r){return this.request(_t(r||{},{method:t,url:e,data:(r||{}).data}))}})),z.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(_t(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Gt.prototype[t]=e(),Gt.prototype[t+"Form"]=e(!0)}));const Yt=Gt;class Jt{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 jt(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 Jt((function(e){t=e})),cancel:t}}}const Vt=Jt;const Qt=function t(e){const r=new Yt(e),n=p(Yt.prototype.request,r);return z.extend(n,Yt.prototype,r,{allOwnKeys:!0}),z.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(_t(e,r))},n}(yt);Qt.Axios=Yt,Qt.CanceledError=jt,Qt.CancelToken=Vt,Qt.isCancel=xt,Qt.VERSION=Ut,Qt.toFormData=X,Qt.AxiosError=V,Qt.Cancel=Qt.CanceledError,Qt.all=function(t){return Promise.all(t)},Qt.spread=function(t){return function(e){return t.apply(null,e)}},Qt.isAxiosError=function(t){return z.isObject(t)&&!0===t.isAxiosError},Qt.mergeConfig=_t,Qt.AxiosHeaders=At,Qt.formToJSON=t=>pt(z.isHTMLForm(t)?new FormData(t):t),Qt.default=Qt;const Zt=Qt;var Wt=l(13);function qt(t){return qt="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},qt(t)}function Kt(){Kt=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:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new S(o||[]);return n(a,"_invoke",{value:E(t,r,s)}),a}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 h(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(j([])));v&&v!==e&&r.call(v,i)&&(y=v);var g=d.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,s){var c=l(t[n],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==qt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return N()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===f)continue;return s}}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 c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function A(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,A(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 i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[i];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:N}}function N(){return{value:void 0,done:!0}}return h.prototype=d,n(g,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:h,configurable:!0}),h.displayName=c(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,s,"Generator"),c(g,i,(function(){return this})),c(g,"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=j,S.prototype={constructor:S,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(x),!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 a.type="throw",a.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 i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.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 i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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),x(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;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Xt(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function $t(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Xt(i,n,o,a,s,"next",t)}function s(t){Xt(i,n,o,a,s,"throw",t)}a(void 0)}))}}function te(){return te=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},te.apply(this,arguments)}"".concat(window.location.protocol,"//").concat(window.location.host,"/");var ee=Zt.create();ee.interceptors.request.use((function(t){return t.validateStatus=function(t){return t>=200&&t<300},te({},t)}));var re=function(){var t=$t(Kt().mark((function t(e,r){var n,o,i,a,s,c,u;return Kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.method,o=void 0===n?"GET":n,i=r.params,a=r.data,s=r.validateStatus,c="".concat("api/plugin-proxy/corpglory-dataexporter-app").concat("/api").concat(e),t.next=4,ee({method:o,url:c,params:i,data:a,validateStatus:s});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)}}();function ne(){return(ne=$t(Kt().mark((function t(e){return Kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",re("/task",{params:{dashboardUid:e}}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function oe(t){return ie.apply(this,arguments)}function ie(){return(ie=$t(Kt().mark((function t(e){return Kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Wt.isEmpty(e)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,re("/task",{method:"DELETE",data:{taskId:e}});case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ae(){return(ae=$t(Kt().mark((function t(e){var r,n,o;return Kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Wt.isEmpty(e)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,re("/static/".concat(e,".csv"),{});case 5:r=t.sent,n=URL.createObjectURL(new Blob([r],{type:"text/csv"})),(o=document.createElement("a")).href=n,o.setAttribute("download","".concat(e,".csv")),document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var se=l(14);function ce(t){return ce="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},ce(t)}function ue(){ue=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:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new S(o||[]);return n(a,"_invoke",{value:E(t,r,s)}),a}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 h(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(j([])));v&&v!==e&&r.call(v,i)&&(y=v);var g=d.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,s){var c=l(t[n],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==ce(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return N()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===f)continue;return s}}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 c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function A(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,A(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 i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[i];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:N}}function N(){return{value:void 0,done:!0}}return h.prototype=d,n(g,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:h,configurable:!0}),h.displayName=c(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,s,"Generator"),c(g,i,(function(){return this})),c(g,"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=j,S.prototype={constructor:S,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(x),!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 a.type="throw",a.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 i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.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 i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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),x(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;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function le(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function fe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){le(i,n,o,a,s,"next",t)}function s(t){le(i,n,o,a,s,"throw",t)}a(void 0)}))}}function pe(){return(pe=fe(ue().mark((function t(){var e;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,se.getBackendSrv)(),t.abrupt("return",e.get("/api/datasources"));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function he(t){return de.apply(this,arguments)}function de(){return(de=fe(ue().mark((function t(e){var r;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,se.getBackendSrv)(),t.abrupt("return",r.get("/api/dashboards/uid/".concat(e)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ye,me,ve,ge,we,be,Ee=l(28),Ae=l(29),Oe=l(1),xe=l(0),Se=l.n(xe);function je(t){return je="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},je(t)}function Ne(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Re(){return Re=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},Re.apply(this,arguments)}function Te(){Te=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:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new S(o||[]);return n(a,"_invoke",{value:E(t,r,s)}),a}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 h(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(j([])));v&&v!==e&&r.call(v,i)&&(y=v);var g=d.prototype=p.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,i,a,s){var c=l(t[n],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==je(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return N()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===f)continue;return s}}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 c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function A(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,A(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 i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[i];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:N}}function N(){return{value:void 0,done:!0}}return h.prototype=d,n(g,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:h,configurable:!0}),h.displayName=c(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,s,"Generator"),c(g,i,(function(){return this})),c(g,"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=j,S.prototype={constructor:S,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(x),!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 a.type="throw",a.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 i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.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 i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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),x(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;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Le(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function Ie(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Le(i,n,o,a,s,"next",t)}function s(t){Le(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Me(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,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||Pe(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 Pe(t,e){if(t){if("string"==typeof t)return De(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?De(t,e):void 0}}function De(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 ke="corpglory-dataexporter-panel";var Ce=function(){return{calendarModal:(0,Ae.css)(we||(we=Ne(["\n section {\n position: fixed;\n top: 20%;\n z-index: 1061;\n }\n "]))),customLink:(0,Ae.css)(be||(be=Ne(["\n color: #6e9fff;\n margin: 0 4px;\n &:hover {\n text-decoration: underline;\n }\n "])))}},_e=new n.PanelPlugin((function(l){var f,p=l.width,h=l.height,d=l.timeRange,y=l.eventBus,m=l.timeZone,v=Me((0,xe.useState)(null),2),g=v[0],w=v[1],b=Me((0,xe.useState)(null),2),E=b[0],A=b[1],O=Me((0,xe.useState)(null),2),x=O[0],S=O[1],j=Me((0,xe.useState)(null),2),N=j[0],R=j[1],T=Me((0,xe.useState)(null),2),L=T[0],I=T[1],M=Me((0,xe.useState)(null),2),P=M[0],D=M[1],k=Me((0,xe.useState)(!1),2),C=k[0],_=k[1],U=Me((0,xe.useState)(d),2),F=U[0],B=U[1],H=Me((0,xe.useState)(e.LOADING),2),z=H[0],G=H[1];function Y(t){if(z!==e.PERMISSION_ERROR)return G(t)}var J=Me((0,xe.useState)(null),2),V=J[0],Q=J[1],Z=function(t){switch(t){case"utc":return"Etc/UTC";case"browser":return Intl.DateTimeFormat().resolvedOptions().timeZone;default:return t}}(m);function W(){return W=Ie(Te().mark((function e(){var r,n;return Te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g&&E){e.next=3;break}return e.abrupt("return");case 3:n=[],null===(r=g.panels)||void 0===r||r.forEach((function(e){var r,o;e.type!==ke&&Wt.includes(Wt.values(t),null===(r=e.datasource)||void 0===r?void 0:r.type)&&(null===(o=e.targets)||void 0===o||o.forEach((function(t){var r,o=K(null===(r=t.datasource)||void 0===r?void 0:r.uid);o&&n.push({selected:!1,target:t,panel:e,datasource:o})})))})),R(n);case 6:case"end":return e.stop()}}),e)}))),W.apply(this,arguments)}function q(){(function(t){return ne.apply(this,arguments)})(o()).then((function(t){S(t),Y(e.OK);var n,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Pe(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(t);try{for(o.s();!(n=o.n()).done;){var i;if((null===(i=n.value.progress)||void 0===i?void 0:i.status)===r.EXPORTING)return void setTimeout(q,1e3)}}catch(t){o.e(t)}finally{o.f()}})).catch((function(t){Y(e.DATASOURCE_ERROR),Q("".concat(t.name,": ").concat(t.message))}))}function K(t){if(!Wt.isNil(t)&&null!==E){var e=Wt.find(E,(function(e){return e.uid===t}));return e}}function X(){return X=Ie(Te().mark((function t(e){var r,n,i,a;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Wt.filter(N,(function(t){return t.selected})),n=[F.from.unix(),F.to.unix()],i=o(),a={dashboardUid:i,username:Ee.contextSrv.user.name,timeRange:{from:1e3*n[0],to:1e3*n[1]},queries:r},t.next=6,re("/task",{method:"POST",data:{task:a,url:window.location.toString(),timeZoneName:e}});case 6:q(),tt(),$();case 9:case"end":return t.stop()}}),t)}))),X.apply(this,arguments)}function $(){null!==N&&R(N.map((function(t){return Re({},t,{selected:!1})})))}function tt(){_(!1),$()}function et(t){return rt.apply(this,arguments)}function rt(){return(rt=Ie(Te().mark((function t(e){var r;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,oe(null==e?void 0:e.id);case 2:r=Wt.filter(x,(function(t){return t.id!==e.id})),S(r);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nt(t){if(null!==N){var e=t.origin.rowIndex,r=Wt.clone(N);r[e].selected=!r[e].selected,R(r)}}Ee.contextSrv.user.orgRole!==n.OrgRole.Admin&&Y(e.PERMISSION_ERROR),(0,xe.useEffect)((function(){function t(){return(t=Ie(Te().mark((function t(){var e;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=o(),t.abrupt("return",he(e));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}(function(){return t.apply(this,arguments)})().then((function(t){return w(t.dashboard)})).catch((function(t){}))}),[]),(0,xe.useEffect)((function(){(function(){return pe.apply(this,arguments)})().then((function(t){return A(t)})).catch((function(t){}))}),[]),(0,xe.useEffect)((function(){if(null!==x){var t=function(t){var e=Wt.orderBy(t,(function(t){var e;return null===(e=t.progress)||void 0===e?void 0:e.time}),"desc"),o=(0,n.toDataFrame)({name:"A",fields:[{name:"Status Updated At",type:n.FieldType.number,values:Wt.map(e,(function(t){var e;return i(null===(e=t.progress)||void 0===e?void 0:e.time)}))},{name:"From",type:n.FieldType.number,values:Wt.map(e,(function(t){return i(t.timeRange.from)}))},{name:"To",type:n.FieldType.number,values:Wt.map(e,(function(t){return i(t.timeRange.to)}))},{name:"User",type:n.FieldType.string,values:Wt.map(e,(function(t){return t.username}))},{name:"Datasource",type:n.FieldType.string,values:Wt.map(e,(function(t){return t.queries.map((function(t){var e;return null===(e=t.datasource)||void 0===e?void 0:e.name})).join(",")}))},{name:"Exported Rows",type:n.FieldType.number,values:Wt.map(e,(function(t){var e;return null===(e=t.progress)||void 0===e?void 0:e.exportedRowsCount}))},{name:"Progress",type:n.FieldType.string,values:Wt.map(e,(function(t){var e;return"".concat((100*((null===(e=t.progress)||void 0===e?void 0:e.progress)||0)).toFixed(0),"%")}))},{name:"Status",type:n.FieldType.string,values:Wt.map(e,(function(t){var e;return null===(e=t.progress)||void 0===e?void 0:e.status}))},{name:"Error",type:n.FieldType.string,values:Wt.map(e,(function(t){var e;return(null===(e=t.progress)||void 0===e?void 0:e.errorMessage)||"-"}))},{name:"Actions",type:n.FieldType.string,values:Wt.map(e,(function(t){var e,n;switch(null===(e=t.progress)||void 0===e?void 0:e.status){case r.FINISHED:return"data:image/png;base64,".concat(s);case r.ERROR:return"data:image/png;base64,".concat(a);case r.EXPORTING:return"";default:throw new Error("Unknown exporting status: ".concat(null===(n=t.progress)||void 0===n?void 0:n.status))}})),config:{custom:{filterable:!1,displayMode:"image"}}}]}),c=(0,n.applyFieldOverrides)({data:[o],fieldConfig:{overrides:[],defaults:{}},theme:(0,n.createTheme)(),replaceVariables:function(t){return t}});return c[0].fields[9].getLinks=function(t){var o,i,a=t.valueRowIndex,s=Wt.find(e,(function(t,e){return e===a}));if(s)switch(null===(o=s.progress)||void 0===o?void 0:o.status){case r.FINISHED:return[{targetBlank:!1,title:"Download",url:"#",onClick:function(){return function(t){Ee.appEvents.emit(n.AppEvents.alertSuccess,["CSV has started downloading..."]),function(t){ae.apply(this,arguments)}(null==t?void 0:t.id)}(s)}},{targetBlank:!1,title:"Delete",url:"#",onClick:function(){return et(s)}}];case r.ERROR:return[{targetBlank:!1,title:"Delete",url:"#",onClick:function(){return et(s)}}];case r.EXPORTING:return[];default:throw new Error("Unknown exporting status: ".concat(null===(i=s.progress)||void 0===i?void 0:i.status))}},c[0]}(x);I(t)}}),[x]),(0,xe.useEffect)(q,[]),(0,xe.useEffect)((function(){null!==N&&D(function(t){var e=(0,n.toDataFrame)({name:"A",fields:[{name:"Select",type:n.FieldType.string,values:Wt.map(t,(function(t){return"data:image/svg+xml;base64,".concat(t.selected?u:c)})),config:{custom:{filterable:!1,displayMode:"image"},links:[{targetBlank:!1,title:"Select",url:"#",onClick:function(t){return nt(t)}}]}},{name:"Panel",type:n.FieldType.string,values:Wt.map(t,(function(t){return t.panel.title}))},{name:"RefId",type:n.FieldType.string,values:Wt.map(t,(function(t){return t.target.refId}))},{name:"Datasource",type:n.FieldType.string,values:Wt.map(t,(function(t){return t.datasource.name}))}]});return(0,n.applyFieldOverrides)({data:[e],fieldConfig:{overrides:[],defaults:{}},theme:(0,n.createTheme)(),replaceVariables:function(t){return t}})[0]}(N))}),[N]),y.subscribe(se.RefreshEvent,q);var ot=(0,Oe.useStyles2)(Ce),it=ye||(ye=Se().createElement(Oe.LoadingPlaceholder,{text:"Loading..."})),at=Se().createElement("div",null,me||(me=Se().createElement("p",null,"Datasource is unavailable.")),Se().createElement("div",null,"If you have not setup the plugin click",Se().createElement("a",{className:ot.customLink,href:"/plugins/".concat("corpglory-dataexporter-app")},"here"),"to configure DataExporter."),Se().createElement("p",{style:{marginTop:"16px"}},V)),st=ve||(ve=Se().createElement("div",null,Se().createElement("p",null," Permission Error. "),Se().createElement("div",null," DataExporter panel available only for Admins. "))),ct=Se().createElement("div",null,Se().createElement(Oe.Table,{width:p,height:h-40,data:L}),Se().createElement(Oe.HorizontalGroup,{justify:"flex-end"},Se().createElement(Oe.Button,{variant:"primary",icon:"plus",style:{marginTop:"8px"},onClick:function(){!function(){W.apply(this,arguments)}(),B(d),_(!0)}},"Add Task"),Se().createElement(Oe.Modal,{title:"Select Queries",isOpen:C,onDismiss:tt,className:ot.calendarModal},null===P?ge||(ge=Se().createElement("div",null,Se().createElement("p",null,"There are no queries to export."))):Se().createElement("div",null,Se().createElement(Oe.VerticalGroup,{spacing:"xs"},Se().createElement(Oe.HorizontalGroup,{justify:"flex-start",spacing:"md"},Se().createElement(Oe.TimeRangeInput,{value:F,onChange:function(t){B(t)}})),Se().createElement(Oe.Table,{width:p/2-20,height:h-40,data:P}),Se().createElement(Oe.HorizontalGroup,{justify:"flex-end",spacing:"md"},Se().createElement(Oe.Button,{variant:"primary","aria-label":"Add task button",onClick:function(){return function(t){return X.apply(this,arguments)}(Z)},disabled:!(null!=N&&null!==(f=N.filter((function(t){return t.selected})))&&void 0!==f&&f.length)},"Add Task")))))));return Se().createElement("div",null,function(t){switch(t){case e.LOADING:return it;case e.DATASOURCE_ERROR:return at;case e.PERMISSION_ERROR:return st;case e.OK:return ct;default:return at}}(z))}))})(),f})()));
//# sourceMappingURL=module.js.map