/*! For license information please see DashboardPage.8128b05ac04b15cbf98d.js.LICENSE.txt */
(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[5296],{"./public/app/features/alerting/unified/components/DynamicTableWithGuidelines.tsx":(e,t,n)=>{"use strict";n.d(t,{F:()=>l});var r=n("./node_modules/@emotion/css/dist/emotion-css.esm.js"),i=n("./packages/grafana-ui/src/index.ts"),o=(n("./node_modules/react/index.js"),n("./public/app/features/alerting/unified/components/DynamicTable.tsx")),a=n("./node_modules/react/jsx-runtime.js");const s=["renderExpandedContent"];const l=e=>{let{renderExpandedContent:t}=e,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,s);const l=(0,i.useStyles2)(d);return(0,a.jsx)(o.t,Object.assign({renderExpandedContent:t?(e,n,i)=>(0,a.jsxs)(a.Fragment,{children:[!(n===i.length-1)&&(0,a.jsx)("div",{className:(0,r.cx)(l.contentGuideline,l.guideline)}),t(e,n,i)]}):void 0,renderPrefixHeader:()=>(0,a.jsx)("div",{className:l.relative,children:(0,a.jsx)("div",{className:(0,r.cx)(l.headerGuideline,l.guideline)})}),renderPrefixCell:(e,t,n)=>(0,a.jsxs)("div",{className:l.relative,children:[(0,a.jsx)("div",{className:(0,r.cx)(l.topGuideline,l.guideline)}),!(t===n.length-1)&&(0,a.jsx)("div",{className:(0,r.cx)(l.bottomGuideline,l.guideline)})]})},n))},d=e=>({relative:r.css`
    position: relative;
    height: 100%;
  `,guideline:r.css`
    left: -19px;
    border-left: 1px solid ${e.colors.border.medium};
    position: absolute;

    ${e.breakpoints.down("md")} {
      display: none;
    }
  `,topGuideline:r.css`
    width: 18px;
    border-bottom: 1px solid ${e.colors.border.medium};
    top: 0;
    bottom: 50%;
  `,bottomGuideline:r.css`
    top: 50%;
    bottom: 0;
  `,contentGuideline:r.css`
    top: 0;
    bottom: 0;
    left: -49px !important;
  `,headerGuideline:r.css`
    top: -25px;
    bottom: 0;
  `})},"./public/app/features/alerting/unified/components/rules/RulesTable.tsx":(e,t,n)=>{"use strict";n.d(t,{i:()=>O});var r=n("./packages/grafana-ui/src/index.ts"),i=n("./node_modules/react/index.js"),o=n("./node_modules/@emotion/css/dist/emotion-css.esm.js"),a=n("./public/app/features/alerting/unified/components/AlertLabels.tsx"),s=n("./public/app/features/alerting/unified/components/DetailsField.tsx"),l=n("./public/app/features/alerting/unified/components/rules/RuleDetailsActionButtons.tsx"),d=n("./public/app/features/alerting/unified/components/rules/RuleDetailsDataSources.tsx"),c=n("./public/app/features/alerting/unified/components/rules/RuleDetailsMatchingInstances.tsx"),u=n("./public/app/features/alerting/unified/components/rules/RuleDetailsExpression.tsx"),p=n("./public/app/features/alerting/unified/components/rules/RuleDetailsAnnotations.tsx"),h=n("./node_modules/react/jsx-runtime.js");const f=({rule:e})=>{const t=(0,r.useStyles2)(g),{promRule:n,namespace:{rulesSource:i}}=e,o=Object.entries(e.annotations).filter((([e,t])=>!!t.trim()));return(0,h.jsxs)("div",{children:[(0,h.jsx)(l.f,{rule:e,rulesSource:i}),(0,h.jsxs)("div",{className:t.wrapper,children:[(0,h.jsxs)("div",{className:t.leftSide,children:[!!e.labels&&!!Object.keys(e.labels).length&&(0,h.jsx)(s.C,{label:"Labels",horizontal:!0,children:(0,h.jsx)(a.s,{labels:e.labels})}),(0,h.jsx)(u.C,{rulesSource:i,rule:e,annotations:o}),(0,h.jsx)(p.J,{annotations:o})]}),(0,h.jsx)("div",{className:t.rightSide,children:(0,h.jsx)(d.C,{rulesSource:i,rule:e})})]}),(0,h.jsx)(c.M,{promRule:n})]})},g=e=>({wrapper:o.css`
    display: flex;
    flex-direction: row;
    ${e.breakpoints.down("md")} {
      flex-direction: column;
    }
  `,leftSide:o.css`
    flex: 1;
  `,rightSide:o.css`
    ${e.breakpoints.up("md")} {
      padding-left: 90px;
      width: 300px;
    }
  `});var m=n("./public/app/features/alerting/unified/utils/datasource.ts"),b=n("./public/app/features/alerting/unified/hooks/useHasRuler.ts"),y=n("./public/app/features/alerting/unified/utils/constants.ts"),v=n("./public/app/features/alerting/unified/components/rules/RuleState.tsx"),x=n("./public/app/features/alerting/unified/components/rules/RuleHealth.tsx"),S=n("./public/app/features/alerting/unified/components/DynamicTable.tsx"),M=n("./public/app/features/alerting/unified/components/DynamicTableWithGuidelines.tsx");const O=({rules:e,className:t,showGuidelines:n=!1,emptyMessage:a="No rules found.",showGroupColumn:s=!1,showSummaryColumn:l=!1})=>{const d=(0,r.useStyles2)(k),c=(0,o.cx)(d.wrapper,t,{[d.wrapperMargin]:n}),u=(0,i.useMemo)((()=>{const t=[];return e.map(((e,n)=>{var r;let i=JSON.stringify([null===(r=e.promRule)||void 0===r?void 0:r.type,e.labels,e.query,e.name,e.annotations]);return t.includes(i)&&(i+=`-${n}`),t.push(i),{id:i,data:e}}))}),[e]),p=function(e,t){const n=(0,b.h)();return(0,i.useMemo)((()=>{const r=[{id:"state",label:"State",renderCell:({data:e})=>{const{namespace:t}=e,{rulesSource:r}=t,{promRule:i,rulerRule:o}=e,a=!(!n(r)||!i||o),s=!(!n(r)||!o||i);return(0,h.jsx)(v.p,{rule:e,isDeleting:a,isCreating:s})},size:"165px"},{id:"name",label:"Name",renderCell:({data:e})=>e.name,size:5},{id:"health",label:"Health",renderCell:({data:{promRule:e}})=>e?(0,h.jsx)(x.V,{rule:e}):null,size:"75px"}];return e&&r.push({id:"summary",label:"Summary",renderCell:({data:e})=>{var t;return null!==(t=e.annotations[y.q6.summary])&&void 0!==t?t:""},size:5}),t&&r.push({id:"group",label:"Group",renderCell:({data:e})=>{const{namespace:t,group:n}=e,{rulesSource:r}=t;return(0,m.jq)(r)?`${t.name} > ${n.name}`:t.name},size:5}),r}),[n,e,t])}(l,s);if(!e.length)return(0,h.jsx)("div",{className:(0,o.cx)(c,d.emptyMessage),children:a});const g=n?M.F:S.t;return(0,h.jsx)("div",{className:c,"data-testid":"rules-table",children:(0,h.jsx)(g,{cols:p,isExpandable:!0,items:u,renderExpandedContent:({data:e})=>(0,h.jsx)(f,{rule:e})})})},k=e=>({wrapperMargin:o.css`
    ${e.breakpoints.up("md")} {
      margin-left: 36px;
    }
  `,emptyMessage:o.css`
    padding: ${e.spacing(1)};
  `,wrapper:o.css`
    width: auto;
    background-color: ${e.colors.background.secondary};
    border-radius: ${e.shape.borderRadius()};
  `,table:o.css`
    width: 100%;
    border-radius: ${e.shape.borderRadius()};
    border: solid 1px ${e.colors.border.weak};
    background-color: ${e.colors.background.secondary};

    th {
      padding: ${e.spacing(1)};
    }

    td + td {
      padding: ${e.spacing(0,1)};
    }

    tr {
      height: 38px;
    }
  `,evenRow:o.css`
    background-color: ${e.colors.background.primary};
  `,state:o.css`
    width: 110px;
  `})},"./public/app/features/alerting/unified/hooks/useHasRuler.ts":(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n("./node_modules/react/index.js"),i=n("./public/app/features/alerting/unified/utils/datasource.ts"),o=n("./public/app/features/alerting/unified/hooks/useUnifiedAlertingSelector.ts");function a(){const e=(0,o._)((e=>e.rulerRules));return(0,r.useCallback)((t=>{var n;const r="string"==typeof t?t:t.name;return r===i.GC||!(null===(n=e[r])||void 0===n||!n.result)}),[e])}},"./public/app/features/dashboard/components/PanelEditor/OptionsPaneCategory.tsx":(e,t,n)=>{"use strict";n.d(t,{u:()=>c});var r=n("./node_modules/react/index.js"),i=n("./node_modules/@emotion/css/dist/emotion-css.esm.js"),o=n("./packages/grafana-ui/src/index.ts"),a=n("./public/app/features/dashboard/components/PanelEditor/state/reducers.ts"),s=n("./node_modules/react-use/esm/useLocalStorage.js"),l=n("./packages/grafana-e2e-selectors/src/index.ts"),d=n("./node_modules/react/jsx-runtime.js");const c=r.memo((({id:e,title:t,children:n,forceOpen:a,isOpenDefault:c,renderTitle:h,className:f,itemsCount:g,isNested:m=!1})=>{var b,y;const v=!1!==c,[x,S]=(0,s.Z)(p(e),{isExpanded:v}),[M,O]=(0,r.useState)(null!==(b=null==x?void 0:x.isExpanded)&&void 0!==b?b:v),k=(0,o.useStyles2)(u);(0,r.useEffect)((()=>{!M&&a&&a>0&&O(!0)}),[a,M]);const j=(0,r.useCallback)((()=>{S({isExpanded:!M}),O(!M)}),[S,O,M]);h||(h=function(e){return e||void 0===g||0===g?t:y||(y=(0,d.jsxs)("span",{children:[t," ",(0,d.jsx)(o.Counter,{value:g})]}))});const w=(0,i.cx)({[k.box]:!0,[k.boxNestedExpanded]:m&&M},f,"options-group"),C=(0,i.cx)(k.header,{[k.headerExpanded]:M,[k.headerNested]:m}),P=(0,i.cx)(k.body,{[k.bodyNested]:m});return(0,d.jsxs)("div",{className:w,"data-testid":"options-category","aria-label":l.wl.components.OptionsGroup.group(e),children:[(0,d.jsxs)("div",{className:C,onClick:j,"aria-label":l.wl.components.OptionsGroup.toggle(e),children:[(0,d.jsx)("div",{className:(0,i.cx)(k.toggle,"editor-options-group-toggle"),children:(0,d.jsx)(o.Icon,{name:M?"angle-down":"angle-right"})}),(0,d.jsx)("div",{className:k.title,role:"heading",children:h(M)})]}),M&&(0,d.jsx)("div",{className:P,children:n})]})})),u=e=>({box:i.css`
      border-top: 1px solid ${e.colors.border.weak};
    `,boxNestedExpanded:i.css`
      margin-bottom: ${e.spacing(2)};
    `,toggle:i.css`
      color: ${e.colors.text.secondary};
      margin-right: ${e.spacing(1)};
    `,title:i.css`
      flex-grow: 1;
      overflow: hidden;
    `,header:i.css`
      display: flex;
      cursor: pointer;
      align-items: baseline;
      padding: ${e.spacing(1)};
      color: ${e.colors.text.primary};
      font-weight: ${e.typography.fontWeightMedium};

      &:hover {
        background: ${e.colors.emphasize(e.colors.background.primary,.03)};
      }
    `,headerExpanded:i.css`
      color: ${e.colors.text.primary};
    `,headerNested:i.css`
      padding: ${e.spacing(.5,0,.5,0)};
    `,body:i.css`
      padding: ${e.spacing(1,2,1,4)};
    `,bodyNested:i.css`
      position: relative;
      padding-right: 0;
      &:before {
        content: '';
        position: absolute;
        top: 0;
        left: 8px;
        width: 1px;
        height: 100%;
        background: ${e.colors.border.weak};
      }
    `}),p=e=>`${a.jy}.optionGroup[${e}]`},"./public/app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor.tsx":(e,t,n)=>{"use strict";n.d(t,{j:()=>a});n("./node_modules/react/index.js");var r=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneCategory.tsx"),i=n("./node_modules/react/jsx-runtime.js");function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class a{constructor(e){o(this,"items",[]),o(this,"categories",[]),o(this,"parent",void 0),this.props=e}addItem(e){return e.parent=this,this.items.push(e),this}addCategory(e){return e.props.isNested=!0,e.parent=this,this.categories.push(e),this}render(e){return this.props.customRender?this.props.customRender():(0,i.jsxs)(r.u,Object.assign({},this.props,{children:[this.items.map((e=>e.render())),this.categories.map((e=>e.render()))]}),this.props.title)}}},"./public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx":(e,t,n)=>{"use strict";n.d(t,{a:()=>l});var r=n("./packages/grafana-e2e-selectors/src/index.ts"),i=n("./packages/grafana-ui/src/index.ts"),o=(n("./node_modules/react/index.js"),n("./node_modules/react-highlight-words/dist/main.js")),a=n.n(o),s=n("./node_modules/react/jsx-runtime.js");class l{constructor(e){var t,n,r;r=void 0,(n="parent")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.props=e}getLabel(e){const{title:t,description:n}=this.props;if(!e)return this.parent.props.title===t?null:t;const r=[];return this.parent.parent&&r.push(this.highlightWord(this.parent.parent.props.title,e)),this.parent.props.title!==t&&r.push(this.highlightWord(this.parent.props.title,e)),(0,s.jsx)(i.Label,{description:n&&this.highlightWord(n,e),category:r,children:this.highlightWord(t,e)})}highlightWord(e,t){return(0,s.jsx)(a(),{textToHighlight:e,searchWords:[t],highlightClassName:"search-fragment-highlight"})}render(e){const{title:t,description:n,render:o,showIf:a,skipField:l}=this.props,d=`${this.parent.props.id} ${t}`;return a&&!a()?null:l?o():(0,s.jsx)(i.Field,{label:this.getLabel(e),description:n,"aria-label":r.wl.components.PanelEditor.OptionsPane.fieldLabel(d),children:o()},d)}}},"./public/app/features/dashboard/components/PanelEditor/getVizualizationOptions.tsx":(e,t,n)=>{"use strict";n.d(t,{m:()=>d,H:()=>c});n("./node_modules/react/index.js");var r=n("./node_modules/lodash/lodash.js"),i=n("./public/app/features/panel/panellinks/link_srv.ts"),o=n("./public/app/features/dashboard/components/PanelEditor/utils.ts"),a=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx"),s=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor.tsx"),l=n("./node_modules/react/jsx-runtime.js");function d(e){const{plugin:t,panel:n,onPanelOptionsChanged:d,onFieldConfigsChange:u,data:p,dashboard:h}=e,f=n.getOptions(),g=n.fieldConfig,m={},b={data:(null==p?void 0:p.series)||[],replaceVariables:n.replaceVariables,options:f,eventBus:h.events,getSuggestions:e=>p?(0,i.PW)(p.series,e):[]},y=e=>{var n;const r=null!==(n=e&&e[0])&&void 0!==n?n:`${t.meta.name}`,i=m[r];return i||(m[r]=new s.j({title:r,id:r}))};c(t.optionEditors.list(),y,((e,t)=>{const n=(0,o.hs)(b.options,e,t);d(n)}),b);for(const e of t.fieldConfigRegistry.list()){if(e.isCustom&&e.showIf&&!e.showIf(g.defaults.custom,null==p?void 0:p.series))continue;if(e.hideFromDefaults)continue;const t=y(e.category),n=e.editor,i=g.defaults,s=e.isCustom?i.custom?(0,r.get)(i.custom,e.path):void 0:(0,r.get)(i,e.path);e.getItemsCount&&(t.props.itemsCount=e.getItemsCount(s)),t.addItem(new a.a({title:e.name,description:e.description,render:function(){return(0,l.jsx)(n,{value:s,onChange:t=>{u((0,o.uJ)(g,e.path,t,e.isCustom))},item:e,context:b})}}))}return Object.values(m)}function c(e,t,n,i){for(const o of e){if(o.showIf&&!o.showIf(i.options,i.data))continue;const e=t(o.category),s=o.editor;e.addItem(new a.a({title:o.name,description:o.description,render:function(){return(0,l.jsx)(s,{value:(0,r.get)(i.options,o.path),onChange:e=>{n(o.path,e)},item:o,context:i})}}))}}},"./public/app/features/dashboard/containers/DashboardPage.tsx":(e,t,n)=>{"use strict";n.r(t),n.d(t,{DashboardPage:()=>vo,UnthemedDashboardPage:()=>bo,default:()=>xo,getStyles:()=>yo,mapStateToProps:()=>fo});var r,i,o,a,s,l,d=n("./node_modules/react/index.js"),c=n("./node_modules/emotion/dist/emotion.esm.js"),u=n("./node_modules/react-redux/es/index.js"),p=n("./packages/grafana-runtime/src/index.ts"),h=n("./packages/grafana-e2e-selectors/src/index.ts"),f=n("./packages/grafana-ui/src/index.ts"),g=n("./public/app/core/copy/appNotification.ts"),m=n("./public/app/core/components/Branding/Branding.tsx"),b=n("./node_modules/react-grid-layout/index.js"),y=n.n(b),v=n("./node_modules/classnames/index.js"),x=n.n(v),S=n("./node_modules/react-virtualized-auto-sizer/dist/index.esm.js"),M=n("./node_modules/@emotion/css/dist/emotion-css.esm.js"),O=n("./node_modules/lodash/lodash.js"),k=n("./node_modules/tinycolor2/tinycolor.js"),j=n.n(k),w=n("./public/app/core/config.ts"),C=n("./public/app/core/store.ts"),P=n("./public/app/features/dashboard/state/reducers.ts"),z=n("./public/app/core/constants.ts"),R=n("./public/app/features/library-panels/utils.ts"),T=n("./public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.tsx"),B=n("./node_modules/react/jsx-runtime.js");const W={addPanel:P.tq},D=(0,u.connect)(void 0,W)((({panel:e,dashboard:t})=>{const[n,s]=(0,d.useState)(!1),l=(0,f.useStyles2)(E),c=(0,d.useMemo)((()=>(()=>{const e=(0,O.chain)(w.ZP.panels).filter({hideFromList:!1}).map((e=>e)).value(),t=[],n=C.Z.get(z.zF);if(n){const r=JSON.parse(n),i=(0,O.find)(e,{id:r.type});if(i){const e=(0,O.cloneDeep)(i);e.name=r.title,e.sort=-1,e.defaults=r,t.push(e)}}return(0,O.sortBy)(t,"sort")})()),[]);return(0,B.jsx)("div",{className:l.wrapper,children:(0,B.jsxs)("div",{className:(0,M.cx)("panel-container",l.callToAction),children:[(0,B.jsx)(I,{onCancel:n=>{n.preventDefault(),t.removePanel(e)},onBack:n?()=>{s(!1)}:void 0,styles:l,children:n?"Add panel from panel library":"Add panel"}),n?(0,B.jsx)(T.N,{onClick:n=>{const{gridPos:r}=e,i=Object.assign({},n.model,{gridPos:r,libraryPanel:(0,R.Pi)(n)});t.addPanel(i),t.removePanel(e)},variant:T.e.Tight,showPanelFilter:!0}):(0,B.jsxs)("div",{className:l.actionsWrapper,children:[(0,B.jsxs)("div",{className:(0,M.cx)(l.actionsRow,l.columnGap),children:[(0,B.jsxs)("div",{onClick:()=>{(0,p.reportInteraction)("Create new panel"),(()=>{const{gridPos:n}=e,r={type:"timeseries",title:"Panel Title",gridPos:{x:n.x,y:n.y,w:n.w,h:n.h}};t.addPanel(r),t.removePanel(e),p.locationService.partial({editPanel:r.id})})()},"aria-label":h.wl.pages.AddDashboard.addNewPanel,children:[r||(r=(0,B.jsx)(f.Icon,{name:"file-blank",size:"xl"})),"Add an empty panel"]}),(0,B.jsxs)("div",{className:l.rowGap,onClick:()=>{(0,p.reportInteraction)("Create new row"),t.addPanel({type:"row",title:"Row title",gridPos:{x:0,y:0}}),t.removePanel(e)},"aria-label":h.wl.pages.AddDashboard.addNewRow,children:[i||(i=(0,B.jsx)(f.Icon,{name:"wrap-text",size:"xl"})),"Add a new row"]})]}),(0,B.jsxs)("div",{className:l.actionsRow,children:[(0,B.jsxs)("div",{onClick:()=>{(0,p.reportInteraction)("Add a panel from the panel library"),s(!0)},"aria-label":h.wl.pages.AddDashboard.addNewPanelLibrary,children:[o||(o=(0,B.jsx)(f.Icon,{name:"book-open",size:"xl"})),"Add a panel from the panel library"]}),1===c.length&&(0,B.jsxs)("div",{className:l.rowGap,onClick:()=>{(0,p.reportInteraction)("Paste panel from clipboard"),(n=>{const{gridPos:r}=e,i={type:n.id,title:"Panel Title",gridPos:{x:r.x,y:r.y,w:n.defaults.gridPos.w,h:n.defaults.gridPos.h}};n.defaults&&((0,O.defaults)(i,n.defaults),i.title=n.defaults.title,C.Z.delete(z.zF)),t.addPanel(i),t.removePanel(e)})(c[0])},children:[a||(a=(0,B.jsx)(f.Icon,{name:"clipboard-alt",size:"xl"})),"Paste panel from clipboard"]})]})]})]})})})),I=({children:e,onBack:t,onCancel:n,styles:r})=>(0,B.jsxs)("div",{className:(0,M.cx)(r.headerRow,"grid-drag-handle"),children:[t&&(0,B.jsx)("div",{className:r.backButton,children:(0,B.jsx)(f.IconButton,{name:"arrow-left",onClick:t,surface:"header",size:"xl"})}),!t&&(0,B.jsx)("div",{className:r.backButton,children:s||(s=(0,B.jsx)(f.Icon,{name:"panel-add",size:"md"}))}),e&&(0,B.jsx)("span",{children:e}),l||(l=(0,B.jsx)("div",{className:"flex-grow-1"})),(0,B.jsx)(f.IconButton,{name:"times",onClick:n,surface:"header"})]}),E=e=>{const t=M.keyframes`
    0% {box-shadow: 0 0 0 2px ${e.colors.background.canvas}, 0 0 0px 4px ${e.colors.primary.main};}
    50% {box-shadow: 0 0 0 2px ${e.components.dashboard.background}, 0 0 0px 4px ${j()(e.colors.primary.main).darken(20).toHexString()};}
    100% {box-shadow: 0 0 0 2px ${e.components.dashboard.background}, 0 0 0px 4px  ${e.colors.primary.main};}
  `;return{wrapper:M.css`
      height: 100%;
      padding-top: ${e.spacing(.5)};
    `,callToAction:M.css`
      overflow: hidden;
      outline: 2px dotted transparent;
      outline-offset: 2px;
      box-shadow: 0 0 0 2px black, 0 0 0px 4px #1f60c4;
      animation: ${t} 2s ease infinite;
    `,rowGap:M.css`
      margin-left: ${e.spacing(1)};
    `,columnGap:M.css`
      margin-bottom: ${e.spacing(1)};
    `,actionsRow:M.css`
      display: flex;
      flex-direction: row;
      height: 100%;

      > div {
        justify-self: center;
        cursor: pointer;
        background: ${e.colors.background.secondary};
        border-radius: ${e.shape.borderRadius(1)};
        color: ${e.colors.text.primary};
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;

        &:hover {
          background: ${f.styleMixins.hoverColor(e.colors.background.secondary,e)};
        }

        &:hover > #book-icon {
          background: linear-gradient(#f05a28 30%, #fbca0a 99%);
        }
      }
    `,actionsWrapper:M.css`
      display: flex;
      flex-direction: column;
      padding: ${e.spacing(0,1,1,1)};
      height: 100%;
    `,headerRow:M.css`
      display: flex;
      align-items: center;
      height: 38px;
      flex-shrink: 0;
      width: 100%;
      font-size: ${e.typography.fontSize};
      font-weight: ${e.typography.fontWeightMedium};
      padding-left: ${e.spacing(1)};
      transition: background-color 0.1s ease-in-out;
      cursor: move;

      &:hover {
        background: ${e.colors.background.secondary};
      }
    `,backButton:M.css`
      display: flex;
      align-items: center;
      cursor: pointer;
      padding-left: ${e.spacing(.5)};
      width: ${e.spacing(4)};
    `,noMargin:M.css`
      margin: 0;
    `}};var _=n("./public/app/core/app_events.ts"),A=n("./public/app/features/variables/state/selectors.ts");const F=({repeat:e,onChange:t})=>{const n=(0,u.useSelector)((e=>(0,A.ng)(e))),r=(0,d.useMemo)((()=>{const e=n.map((e=>({label:e.name,value:e.name})));return 0===e.length&&e.unshift({label:"No template variables found",value:null}),e.unshift({label:"Disable repeating",value:null}),e}),[n]),i=(0,d.useCallback)((e=>t(e.value)),[t]);return(0,B.jsx)(f.Select,{menuShouldPortal:!0,value:e,onChange:i,options:r})};var L;const N=({repeat:e,title:t,onUpdate:n,onCancel:r})=>{var i,o;const[a,s]=(0,d.useState)(e),l=(0,d.useCallback)((e=>s(e)),[s]);return(0,B.jsx)(f.Form,{defaultValues:{title:t},onSubmit:e=>{n(e.title,a)},children:({register:e})=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(f.Field,{label:"Title",children:(0,B.jsx)(f.Input,Object.assign({},e("title"),{type:"text"}))}),i||(i=(0,B.jsx)(f.Field,{label:"Repeat for",children:(0,B.jsx)(F,{repeat:a,onChange:l})})),o||(o=(0,B.jsxs)(f.Modal.ButtonRow,{children:[(0,B.jsx)(f.Button,{type:"button",variant:"secondary",onClick:r,fill:"outline",children:"Cancel"}),L||(L=(0,B.jsx)(f.Button,{type:"submit",children:"Update"}))]}))]})})},H=({repeat:e,title:t,onDismiss:n,onUpdate:r})=>{const i=$();return(0,B.jsx)(f.Modal,{isOpen:!0,title:"Row options",icon:"copy",onDismiss:n,className:i.modal,children:(0,B.jsx)(N,{repeat:e,title:t,onCancel:n,onUpdate:r})})},$=(0,f.stylesFactory)((()=>({modal:M.css`
      label: RowOptionsModal;
      width: 500px;
    `})));var G;const V=({repeat:e,title:t,onUpdate:n})=>{const r=e=>(t,r)=>{n(t,r),e()};return(0,B.jsx)(f.ModalsController,{children:({showModal:n,hideModal:i})=>(0,B.jsx)("a",{className:"pointer",onClick:()=>{n(H,{title:t,repeat:e,onDismiss:i,onUpdate:r(i)})},children:G||(G=(0,B.jsx)(f.Icon,{name:"cog"}))})})};V.displayName="RowOptionsButton";var U,q,Q=n("./public/app/types/events.ts");function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class J extends d.Component{constructor(e){super(e),Z(this,"sub",void 0),Z(this,"onVariableUpdated",(()=>{this.forceUpdate()})),Z(this,"onToggle",(()=>{this.props.dashboard.toggleRow(this.props.panel),this.setState((e=>({collapsed:!e.collapsed})))})),Z(this,"onUpdate",((e,t)=>{this.props.panel.title=e,this.props.panel.repeat=null!=t?t:void 0,this.props.panel.render(),this.props.dashboard.processRepeats(),this.forceUpdate()})),Z(this,"onDelete",(()=>{_.Z.publish(new Q.VJ({title:"Delete row",text:"Are you sure you want to remove this row and all its panels?",altActionText:"Delete row only",icon:"trash-alt",onConfirm:()=>{this.props.dashboard.removeRow(this.props.panel,!0)},onAltAction:()=>{this.props.dashboard.removeRow(this.props.panel,!1)}}))})),this.state={collapsed:this.props.panel.collapsed}}componentDidMount(){this.sub=this.props.dashboard.events.subscribe(Q.U5,this.onVariableUpdated)}componentWillUnmount(){this.sub&&this.sub.unsubscribe()}render(){const e=x()({"dashboard-row":!0,"dashboard-row--collapsed":this.state.collapsed}),t=(0,p.getTemplateSrv)().replace(this.props.panel.title,this.props.panel.scopedVars,"text"),n=this.props.panel.panels?this.props.panel.panels.length:0,r=1===n?"panel":"panels",i=!0===this.props.dashboard.meta.canEdit;return(0,B.jsxs)("div",{className:e,children:[(0,B.jsxs)("a",{className:"dashboard-row__title pointer",onClick:this.onToggle,children:[(0,B.jsx)(f.Icon,{name:this.state.collapsed?"angle-right":"angle-down"}),t,(0,B.jsxs)("span",{className:"dashboard-row__panel_count",children:["(",n," ",r,")"]})]}),i&&(0,B.jsxs)("div",{className:"dashboard-row__actions",children:[(0,B.jsx)(V,{title:this.props.panel.title,repeat:this.props.panel.repeat,onUpdate:this.onUpdate}),(0,B.jsx)("a",{className:"pointer",onClick:this.onDelete,children:U||(U=(0,B.jsx)(f.Icon,{name:"trash-alt"}))})]}),!0===this.state.collapsed&&(0,B.jsx)("div",{className:"dashboard-row__toggle-target",onClick:this.onToggle,children:" "}),i&&(q||(q=(0,B.jsx)("div",{className:"dashboard-row__drag grid-drag-handle"})))]})}}var Y=n("./public/app/features/dashboard/dashgrid/DashboardPanel.tsx"),X=n("./node_modules/rxjs/dist/esm5/internal/Subscription.js");const K=["gridWidth","gridPos","isViewing","windowHeight","windowWidth"];function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class te extends d.PureComponent{constructor(e){super(e),ee(this,"panelMap",{}),ee(this,"eventSubs",new X.w0),ee(this,"windowHeight",1200),ee(this,"windowWidth",1920),ee(this,"gridWidth",0),ee(this,"onLayoutChange",(e=>{for(const t of e)this.panelMap[t.i].updateGridPos(t);this.props.dashboard.sortPanelsByGridPos(),this.state.isLayoutInitialized||this.setState({isLayoutInitialized:!0})})),ee(this,"triggerForceUpdate",(()=>{this.forceUpdate()})),ee(this,"updateGridPos",((e,t)=>{this.panelMap[e.i].updateGridPos(e)})),ee(this,"onResize",((e,t,n)=>{const r=this.panelMap[n.i];r.updateGridPos(n),r.configRev++})),ee(this,"onResizeStop",((e,t,n)=>{this.updateGridPos(n,e)})),ee(this,"onDragStop",((e,t,n)=>{this.updateGridPos(n,e)})),this.state={isLayoutInitialized:!1}}componentDidMount(){const{dashboard:e}=this.props;this.eventSubs.add(e.events.subscribe(Q._B,this.triggerForceUpdate))}componentWillUnmount(){this.eventSubs.unsubscribe()}buildLayout(){const e=[];this.panelMap={};for(const t of this.props.dashboard.panels){if(t.key||(t.key=`panel-${t.id}-${Date.now()}`),this.panelMap[t.key]=t,!t.gridPos){console.log("panel without gridpos");continue}const n={i:t.key,x:t.gridPos.x,y:t.gridPos.y,w:t.gridPos.w,h:t.gridPos.h};"row"===t.type&&(n.w=z.cz,n.h=1,n.isResizable=!1,n.isDraggable=t.collapsed),e.push(n)}return e}isInView(e){if(e.isViewing||e.isEditing)return!0;const t=this.props.scrollTop,n=e.gridPos.y*(z.K3+z.hD);if(t>n+e.gridPos.h*(z.K3+z.hD)-z.hD+100)return!1;return!(n>t+this.windowHeight+100)&&!this.props.dashboard.otherPanelInFullscreen(e)}renderPanels(e){const t=[];var n;this.gridWidth!==e&&(this.windowHeight=null!==(n=window.innerHeight)&&void 0!==n?n:1e3,this.windowWidth=window.innerWidth,this.gridWidth=e);for(const n of this.props.dashboard.panels){const r=x()({"react-grid-item--fullscreen":n.isViewing});n.isInView=this.isInView(n),t.push((0,B.jsx)(ne,{className:r,"data-panelid":n.id,gridPos:n.gridPos,gridWidth:e,windowHeight:this.windowHeight,windowWidth:this.windowWidth,isViewing:n.isViewing,children:(e,t)=>this.renderPanel(n,e,t,n.key)},n.key))}return t}renderPanel(e,t,n,r){return"row"===e.type?(0,B.jsx)(J,{panel:e,dashboard:this.props.dashboard},r):"add-panel"===e.type?(0,B.jsx)(D,{panel:e,dashboard:this.props.dashboard},r):(0,B.jsx)(Y.l,{panel:e,dashboard:this.props.dashboard,isEditing:e.isEditing,isViewing:e.isViewing,isInView:e.isInView,width:t,height:n},r)}render(){const{dashboard:e}=this.props;return(0,B.jsx)(S.Z,{style:{width:"100%",height:"100%"},disableHeight:!0,children:({width:t})=>{if(0===t)return null;const n=!(t<=769)&&e.meta.canEdit;return(0,B.jsx)(y(),{width:t,isDraggable:n,isResizable:e.meta.canEdit,containerPadding:[0,0],useCSSTransforms:!1,margin:[z.hD,z.hD],cols:z.cz,rowHeight:z.K3,draggableHandle:".grid-drag-handle",layout:this.buildLayout(),onDragStop:this.onDragStop,onResize:this.onResize,onResizeStop:this.onResizeStop,onLayoutChange:this.onLayoutChange,children:this.renderPanels(t)})}})}}const ne=d.forwardRef(((e,t)=>{var n;const r=p.config.theme2;let i=100,o=100;const{gridWidth:a,isViewing:s,windowHeight:l,windowWidth:d}=e,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,K),u=null!==(n=e.style)&&void 0!==n?n:{};return s?(i=a,o=.85*l,u.height=o,u.width="100%"):d<r.breakpoints.values.md?(i=e.gridWidth,o=e.gridPos.h*(z.K3+z.hD)-z.hD,u.height=o,u.width="100%"):(i=parseFloat(e.style.width),o=parseFloat(e.style.height)),(0,B.jsx)("div",Object.assign({},c,{ref:t,children:[e.children[0](i,o),e.children.slice(1)]}))}));ne.displayName="GridItemWithDimensions";var re=n("./public/app/features/dashboard/components/DashNav/index.ts"),ie=n("./public/app/features/dashboard/components/DashboardSettings/index.ts"),oe=n("./public/app/core/core.ts"),ae=n("./public/app/features/dashboard/components/PanelEditor/utils.ts"),se=n("./packages/grafana-data/src/index.ts");const le={[se.DocsId.Transformations]:"https://grafana.com/docs/grafana/latest/panels/transformations",[se.DocsId.FieldConfig]:"https://grafana.com/docs/grafana/latest/panels/field-configuration-options/",[se.DocsId.FieldConfigOverrides]:"https://grafana.com/docs/grafana/latest/panels/field-configuration-options/#override-a-field"};var de,ce=n("./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js"),ue=n("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js");const pe=({debugMode:e,index:t,data:n,uiConfig:r,configs:i,onChange:o})=>{const a=(0,f.useStyles)(he),[s,l]=(0,d.useState)([]),[c,u]=(0,d.useState)([]),p=(0,d.useMemo)((()=>i[t]),[i,t]);(0,d.useEffect)((()=>{const e=i.slice(0,t).map((e=>e.transformation)),r=i.slice(t,t+1).map((e=>e.transformation)),o=(0,se.transformDataFrame)(e,n).subscribe(l),a=(0,se.transformDataFrame)(e,n).pipe((0,ue.z)((e=>(0,se.transformDataFrame)(r,e)))).subscribe(u);return function(){o.unsubscribe(),a.unsubscribe()}}),[t,n,i]);const g=(0,d.useMemo)((()=>d.createElement(r.editor,{options:Object.assign({},r.transformation.defaultOptions,p.transformation.options),input:s,onChange:e=>{o(t,{id:p.transformation.id,options:e})}})),[r.editor,r.transformation.defaultOptions,p.transformation.options,p.transformation.id,s,o,t]);return(0,B.jsxs)("div",{className:a.editor,"aria-label":h.wl.components.TransformTab.transformationEditor(r.name),children:[g,e&&(0,B.jsxs)("div",{className:a.debugWrapper,"aria-label":h.wl.components.TransformTab.transformationEditorDebugger(r.name),children:[(0,B.jsxs)("div",{className:a.debug,children:[(0,B.jsx)("div",{className:a.debugTitle,children:"Transformation input data"}),(0,B.jsx)("div",{className:a.debugJson,children:(0,B.jsx)(f.JSONFormatter,{json:s})})]}),(0,B.jsx)("div",{className:a.debugSeparator,children:de||(de=(0,B.jsx)(f.Icon,{name:"arrow-right"}))}),(0,B.jsxs)("div",{className:a.debug,children:[(0,B.jsx)("div",{className:a.debugTitle,children:"Transformation output data"}),(0,B.jsx)("div",{className:a.debugJson,children:c&&(0,B.jsx)(f.JSONFormatter,{json:c})})]})]})]})},he=e=>{const t=e.isLight?e.palette.gray85:e.palette.gray15;return{title:M.css`
      display: flex;
      padding: 4px 8px 4px 8px;
      position: relative;
      height: 35px;
      border-radius: 4px 4px 0 0;
      flex-wrap: nowrap;
      justify-content: space-between;
      align-items: center;
    `,name:M.css`
      font-weight: ${e.typography.weight.semibold};
      color: ${e.colors.textBlue};
    `,iconRow:M.css`
      display: flex;
    `,icon:M.css`
      background: transparent;
      border: none;
      box-shadow: none;
      cursor: pointer;
      color: ${e.colors.textWeak};
      margin-left: ${e.spacing.sm};
      &:hover {
        color: ${e.colors.text};
      }
    `,editor:M.css``,debugWrapper:M.css`
      display: flex;
      flex-direction: row;
    `,debugSeparator:M.css`
      width: 48px;
      min-height: 300px;
      display: flex;
      align-items: center;
      align-self: stretch;
      justify-content: center;
      margin: 0 ${e.spacing.xs};
      color: ${e.colors.textBlue};
    `,debugTitle:M.css`
      padding: ${e.spacing.sm} ${e.spacing.xxs};
      font-family: ${e.typography.fontFamily.monospace};
      font-size: ${e.typography.size.sm};
      color: ${e.colors.text};
      border-bottom: 1px solid ${t};
      flex-grow: 0;
      flex-shrink: 1;
    `,debug:M.css`
      margin-top: ${e.spacing.sm};
      padding: 0 ${e.spacing.sm} ${e.spacing.sm} ${e.spacing.sm};
      border: 1px solid ${t};
      background: ${e.isLight?e.palette.white:e.palette.gray05};
      border-radius: ${e.border.radius.sm};
      width: 100%;
      min-height: 300px;
      display: flex;
      flex-direction: column;
      align-self: stretch;
    `,debugJson:M.css`
      flex-grow: 1;
      height: 100%;
      overflow: hidden;
      padding: ${e.spacing.xs};
    `}};var fe=n("./public/app/core/components/QueryOperationRow/QueryOperationRow.tsx"),ge=n("./public/app/core/components/QueryOperationRow/QueryOperationAction.tsx"),me=n("./public/app/features/plugins/PluginStateInfo.tsx"),be=n("./node_modules/react-use/esm/useToggle.js"),ye=n("./public/app/core/components/QueryOperationRow/OperationRowHelp.tsx");const ve=({onRemove:e,index:t,id:n,data:r,configs:i,uiConfig:o,onChange:a})=>{var s;const[l,c]=(0,be.Z)(!1),[u,p]=(0,be.Z)(!1),h=i[t].transformation.disabled,g=(0,d.useCallback)((e=>{const t=i[e].transformation;a(e,Object.assign({},t,{disabled:!t.disabled||void 0}))}),[a,i]);return(0,B.jsxs)(fe.t,{id:n,index:t,title:o.name,draggable:!0,actions:({isOpen:n})=>(0,B.jsxs)(f.HorizontalGroup,{align:"center",width:"auto",children:[o.state&&(0,B.jsx)(me.u,{state:o.state}),s||(s=(0,B.jsx)(ge.y,{title:"Show/hide transform help",icon:"info-circle",onClick:p,active:u})),(0,B.jsx)(ge.y,{title:"Debug",disabled:!n,icon:"bug",onClick:c,active:l}),(0,B.jsx)(ge.y,{title:"Disable/Enable transformation",icon:h?"eye-slash":"eye",onClick:()=>g(t),active:h}),(0,B.jsx)(ge.y,{title:"Remove",icon:"trash-alt",onClick:()=>e(t)})]}),disabled:h,children:[u&&(0,B.jsx)(ye.h,{markdown:xe(o)}),(0,B.jsx)(pe,{debugMode:l,index:t,data:r,configs:i,uiConfig:o,onChange:a})]})};function xe(e){var t;return`\n${null!==(t=e.help)&&void 0!==t?t:e.description}\n\nGo the <a href="https://grafana.com/docs/grafana/latest/panels/transformations/?utm_source=grafana" target="_blank" rel="noreferrer">\ntransformation documentation\n</a> for more.\n`}const Se=({data:e,onChange:t,onRemove:n,configs:r})=>(0,B.jsx)(B.Fragment,{children:r.map(((i,o)=>{const a=se.standardTransformersRegistry.getIfExists(i.transformation.id);return a?(0,B.jsx)(ve,{index:o,id:`${i.id}`,data:e,configs:r,uiConfig:a,onRemove:n,onChange:t},`${i.id}`):null}))});var Me=n("./packages/grafana-ui/src/components/Layout/Layout.tsx"),Oe=n("./public/app/features/dashboard/components/PanelEditor/types.ts");function ke({message:e}){const t=(0,d.useCallback)((()=>{p.locationService.partial({tab:Oe.Ip.Query})}),[]);return(0,B.jsx)(Me.Ar,{justify:"center",style:{marginTop:"100px"},children:(0,B.jsxs)(f.VerticalGroup,{spacing:"md",children:[(0,B.jsx)("h2",{children:e}),(0,B.jsx)("div",{children:(0,B.jsx)(f.Button,{size:"md",variant:"secondary",icon:"arrow-left",onClick:t,children:"Go back to Queries"})})]})})}var je,we,Ce=n("./public/app/types/index.ts"),Pe=n("./public/app/core/components/LocalStorageValueProvider/index.tsx");function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Re extends d.PureComponent{constructor(e){super(e),ze(this,"subscription",void 0),ze(this,"onSearchChange",(e=>{this.setState({search:e.target.value})})),ze(this,"onSearchKeyDown",(e=>{if("Enter"===e.key){const{search:e}=this.state;if(e){const t=e.toLowerCase(),n=se.standardTransformersRegistry.list().filter((e=>(e.name+e.description).toLowerCase().indexOf(t)>=0));n.length>0&&this.onTransformationAdd({value:n[0].id})}}else 27===e.keyCode&&(this.setState({search:"",showPicker:!1}),e.stopPropagation())})),ze(this,"getTransformationNextId",(e=>{const{transformations:t}=this.state;let n=0;const r=t.filter((t=>t.id.startsWith(e))).map((e=>e.id));return 0!==r.length&&(n=Math.max(...r.map((e=>parseInt(e.match(/\d+/)[0],10))))+1),`${e}-${n}`})),ze(this,"onTransformationAdd",(e=>{const{transformations:t}=this.state,n=this.getTransformationNextId(e.value);this.setState({search:"",showPicker:!1}),this.onChange([...t,{id:n,transformation:{id:e.value,options:{}}}])})),ze(this,"onTransformationChange",((e,t)=>{const{transformations:n}=this.state,r=Array.from(n);r[e].transformation=t,this.onChange(r)})),ze(this,"onTransformationRemove",(e=>{const{transformations:t}=this.state,n=Array.from(t);n.splice(e,1),this.onChange(n)})),ze(this,"onDragEnd",(e=>{const{transformations:t}=this.state;if(!e||!e.destination)return;const n=e.source.index,r=e.destination.index;if(n===r)return;const i=Array.from(t),[o]=i.splice(n,1);i.splice(r,0,o),this.onChange(i)})),ze(this,"renderTransformationEditors",(()=>{const{data:e,transformations:t}=this.state;return(0,B.jsx)(ce.Z5,{onDragEnd:this.onDragEnd,children:(0,B.jsx)(ce.bK,{droppableId:"transformations-list",direction:"vertical",children:n=>(0,B.jsxs)("div",Object.assign({ref:n.innerRef},n.droppableProps,{children:[(0,B.jsx)(Se,{configs:t,data:e,onRemove:this.onTransformationRemove,onChange:this.onTransformationChange}),n.placeholder]}))})})}));const t=e.panel.transformations||[],n=this.buildTransformationIds(t);this.state={transformations:t.map(((e,t)=>({transformation:e,id:n[t]}))),data:[],search:""}}buildTransformationIds(e){const t={},n=[];for(let r=0;r<e.length;r++){const i=e[r];void 0===t[i.id]?t[i.id]=0:t[i.id]+=1,n.push(`${e[r].id}-${t[e[r].id]}`)}return n}componentDidMount(){this.subscription=this.props.panel.getQueryRunner().getData({withTransforms:!1,withFieldConfig:!1}).subscribe({next:e=>this.setState({data:e.series})})}componentWillUnmount(){this.subscription&&this.subscription.unsubscribe()}onChange(e){this.setState({transformations:e}),this.props.panel.setTransformations(e.map((e=>e.transformation)))}renderTransformsPicker(){const{transformations:e,search:t}=this.state;let n=null,r=se.standardTransformersRegistry.list().sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0));if(t){const e=t.toLowerCase(),i=r.filter((t=>(t.name+t.description).toLowerCase().indexOf(e)>=0));n=(0,B.jsxs)(B.Fragment,{children:[i.length," / ",r.length,"   ",(0,B.jsx)(f.IconButton,{name:"times",surface:"header",onClick:()=>{this.setState({search:""})}})]}),r=i}const i=!(null!=e&&e.length),o=i||this.state.showPicker;return n||!o||i||(n=(0,B.jsx)(f.IconButton,{name:"times",surface:"header",onClick:()=>{this.setState({showPicker:!1})}})),(0,B.jsxs)(B.Fragment,{children:[i&&(0,B.jsx)(f.Container,{grow:1,children:(0,B.jsx)(Pe.G,{storageKey:"dashboard.components.TransformationEditor.featureInfoBox.isDismissed",defaultValue:!1,children:(e,t)=>{return e?null:(0,B.jsxs)(f.Alert,{title:"Transformations",severity:"info",onRemove:()=>{t(!0)},children:[je||(je=(0,B.jsxs)("p",{children:["Transformations allow you to join, calculate, re-order, hide, and rename your query results before they are visualized. ",(0,B.jsx)("br",{}),"Many transforms are not suitable if you're using the Graph visualization, as it currently only supports time series data. ",(0,B.jsx)("br",{}),"It can help to switch to the Table visualization to understand what a transformation is doing."," "]})),(0,B.jsx)("a",{href:(n=se.DocsId.Transformations,le[n]),className:"external-link",target:"_blank",rel:"noreferrer",children:"Read more"})]});var n}})}),o?(0,B.jsxs)(f.VerticalGroup,{children:[(0,B.jsx)(f.Input,{"aria-label":h.wl.components.Transforms.searchInput,value:null!=t?t:"",autoFocus:!i,placeholder:"Add transformation",onChange:this.onSearchChange,onKeyDown:this.onSearchKeyDown,suffix:n}),r.map((e=>(0,B.jsx)(Te,{transform:e,onClick:()=>{this.onTransformationAdd({value:e.id})}},e.name)))]}):(0,B.jsx)(f.Button,{icon:"plus",variant:"secondary",onClick:()=>{this.setState({showPicker:!0})},children:"Add transformation"})]})}render(){const{panel:{alert:e}}=this.props,{transformations:t}=this.state,n=t.length>0;return!n&&e?we||(we=(0,B.jsx)(ke,{message:"Transformations can't be used on a panel with existing alerts"})):(0,B.jsx)(f.CustomScrollbar,{autoHeightMin:"100%",children:(0,B.jsx)(f.Container,{padding:"md",children:(0,B.jsxs)("div",{"aria-label":h.wl.components.TransformTab.content,children:[n&&e?(0,B.jsx)(f.Alert,{severity:Ce.F1.Error,title:"Transformations can't be used on a panel with alerts"}):null,n&&this.renderTransformationEditors(),this.renderTransformsPicker()]})})})}}function Te({transform:e,onClick:t}){const n=(0,f.useStyles2)(Be);return(0,B.jsxs)(f.Card,{className:n.card,heading:e.name,"aria-label":h.wl.components.TransformTab.newTransform(e.name),onClick:t,children:[(0,B.jsx)(f.Card.Meta,{children:e.description}),e.state&&(0,B.jsx)(f.Card.Tags,{children:(0,B.jsx)(me.u,{state:e.state})})]})}const Be=e=>({card:M.css`
      margin: 0;

      > div {
        padding: ${e.spacing(1)};
      }
    `}),We=(0,f.withTheme)(Re);var De,Ie,Ee,_e,Ae,Fe,Le,Ne,He,$e=n("./public/app/features/query/components/QueryEditorRows.tsx"),Ge=n("./public/app/core/services/backend_srv.ts"),Ve=n("./public/app/core/components/PluginHelp/PluginHelp.tsx"),Ue=n("./public/app/core/utils/query.ts"),qe=n("./public/app/features/expressions/ExpressionDatasource.ts");function Qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ze extends d.PureComponent{constructor(e){var t,n,r,i;super(e),Qe(this,"onRelativeTimeChange",(e=>{this.setState({timeRangeFrom:e.target.value})})),Qe(this,"onTimeShiftChange",(e=>{this.setState({timeRangeShift:e.target.value})})),Qe(this,"onOverrideTime",(e=>{var t;const{options:n,onChange:r}=this.props,i=Ye(e.target.value),o=Je(i);var a;o&&(null===(t=n.timeRange)||void 0===t?void 0:t.from)!==i&&r(Object.assign({},n,{timeRange:Object.assign({},null!==(a=n.timeRange)&&void 0!==a?a:{},{from:i})}));this.setState({relativeTimeIsValid:o})})),Qe(this,"onTimeShift",(e=>{var t;const{options:n,onChange:r}=this.props,i=Ye(e.target.value),o=Je(i);var a;o&&(null===(t=n.timeRange)||void 0===t?void 0:t.shift)!==i&&r(Object.assign({},n,{timeRange:Object.assign({},null!==(a=n.timeRange)&&void 0!==a?a:{},{shift:i})}));this.setState({timeShiftIsValid:o})})),Qe(this,"onToggleTimeOverride",(()=>{const{onChange:e,options:t}=this.props;this.setState({timeRangeHide:!this.state.timeRangeHide},(()=>{var n;e(Object.assign({},t,{timeRange:Object.assign({},null!==(n=t.timeRange)&&void 0!==n?n:{},{hide:this.state.timeRangeHide})}))}))})),Qe(this,"onCacheTimeoutBlur",(e=>{const{options:t,onChange:n}=this.props;n(Object.assign({},t,{cacheTimeout:Ye(e.target.value)}))})),Qe(this,"onMaxDataPointsBlur",(e=>{const{options:t,onChange:n}=this.props;let r=parseInt(e.target.value,10);(isNaN(r)||0===r)&&(r=null),r!==t.maxDataPoints&&n(Object.assign({},t,{maxDataPoints:r}))})),Qe(this,"onMinIntervalBlur",(e=>{const{options:t,onChange:n}=this.props,r=Ye(e.target.value);r!==t.minInterval&&n(Object.assign({},t,{minInterval:r}))})),Qe(this,"onOpenOptions",(()=>{this.setState({isOpen:!0})})),Qe(this,"onCloseOptions",(()=>{this.setState({isOpen:!1})}));const{options:o}=e;this.state={timeRangeFrom:(null===(t=o.timeRange)||void 0===t?void 0:t.from)||"",timeRangeShift:(null===(n=o.timeRange)||void 0===n?void 0:n.shift)||"",timeRangeHide:null!==(r=null===(i=o.timeRange)||void 0===i?void 0:i.hide)&&void 0!==r&&r,isOpen:!1,relativeTimeIsValid:!0,timeShiftIsValid:!0}}renderCacheTimeoutOption(){var e,t;const{dataSource:n,options:r}=this.props;return null!==(e=n.meta.queryOptions)&&void 0!==e&&e.cacheTimeout?(0,B.jsx)("div",{className:"gf-form-inline",children:(0,B.jsxs)("div",{className:"gf-form",children:[(0,B.jsx)(f.InlineFormLabel,{width:9,tooltip:"If your time series store has a query cache this option can override the default cache timeout. Specify a\n    numeric value in seconds.",children:"Cache timeout"}),(0,B.jsx)(f.Input,{type:"text",className:"width-6",placeholder:"60",spellCheck:!1,onBlur:this.onCacheTimeoutBlur,defaultValue:null!==(t=r.cacheTimeout)&&void 0!==t?t:""})]})}):null}renderMaxDataPointsOption(){var e,t;const{data:n,options:r}=this.props,i=null===(e=n.request)||void 0===e?void 0:e.maxDataPoints,o=null!==(t=r.maxDataPoints)&&void 0!==t?t:"",a=""===o;return(0,B.jsx)("div",{className:"gf-form-inline",children:(0,B.jsxs)("div",{className:"gf-form",children:[De||(De=(0,B.jsx)(f.InlineFormLabel,{width:9,tooltip:(0,B.jsx)(B.Fragment,{children:"The maximum data points per series. Used directly by some data sources and used in calculation of auto interval. With streaming data this value is used for the rolling buffer."}),children:"Max data points"})),(0,B.jsx)(f.Input,{type:"number",className:"width-6",placeholder:`${i}`,spellCheck:!1,onBlur:this.onMaxDataPointsBlur,defaultValue:o}),a&&(0,B.jsxs)(B.Fragment,{children:[Ie||(Ie=(0,B.jsx)("div",{className:"gf-form-label query-segment-operator",children:"="})),Ee||(Ee=(0,B.jsx)("div",{className:"gf-form-label",children:"Width of panel"}))]})]})})}renderIntervalOption(){var e,t,n;const{data:r,dataSource:i,options:o}=this.props,a=null===(e=r.request)||void 0===e?void 0:e.interval,s=null!==(t=i.interval)&&void 0!==t?t:"No limit";return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{className:"gf-form-inline",children:(0,B.jsxs)("div",{className:"gf-form",children:[_e||(_e=(0,B.jsx)(f.InlineFormLabel,{width:9,tooltip:(0,B.jsxs)(B.Fragment,{children:["A lower limit for the interval. Recommended to be set to write frequency, for example ",(0,B.jsx)("code",{children:"1m"})," ","if your data is written every minute. Default value can be set in data source settings for most data sources."]}),children:"Min interval"})),(0,B.jsx)(f.Input,{type:"text",className:"width-6",placeholder:`${s}`,spellCheck:!1,onBlur:this.onMinIntervalBlur,defaultValue:null!==(n=o.minInterval)&&void 0!==n?n:""})]})}),(0,B.jsx)("div",{className:"gf-form-inline",children:(0,B.jsxs)("div",{className:"gf-form",children:[Ae||(Ae=(0,B.jsx)(f.InlineFormLabel,{width:9,tooltip:(0,B.jsxs)(B.Fragment,{children:["The evaluated interval that is sent to data source and is used in ",(0,B.jsx)("code",{children:"$__interval"})," and"," ",(0,B.jsx)("code",{children:"$__interval_ms"})]}),children:"Interval"})),(0,B.jsx)(f.InlineFormLabel,{width:6,children:a}),Fe||(Fe=(0,B.jsx)("div",{className:"gf-form-label query-segment-operator",children:"="})),Le||(Le=(0,B.jsx)("div",{className:"gf-form-label",children:"Time range / max data points"}))]})})]})}renderCollapsedText(e){var t;const{data:n,options:r}=this.props,{isOpen:i}=this.state;if(i)return;let o=null!==(t=r.maxDataPoints)&&void 0!==t?t:"";""===o&&n.request&&(o=`auto = ${n.request.maxDataPoints}`);let a=r.minInterval;return n.request&&(a=`${n.request.interval}`),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:e.collapsedText,children:["MD = ",o]}),(0,B.jsxs)("div",{className:e.collapsedText,children:["Interval = ",a]})]})}render(){const{timeRangeHide:e,relativeTimeIsValid:t,timeShiftIsValid:n}=this.state,{timeRangeFrom:r,timeRangeShift:i,isOpen:o}=this.state,a=Xe();return(0,B.jsxs)(fe.t,{id:"Query options",index:0,title:"Query options",headerElement:this.renderCollapsedText(a),isOpen:o,onOpen:this.onOpenOptions,onClose:this.onCloseOptions,children:[this.renderMaxDataPointsOption(),this.renderIntervalOption(),this.renderCacheTimeoutOption(),(0,B.jsxs)("div",{className:"gf-form",children:[Ne||(Ne=(0,B.jsx)(f.InlineFormLabel,{width:9,children:"Relative time"})),(0,B.jsx)(f.Input,{type:"text",className:"width-6",placeholder:"1h",onChange:this.onRelativeTimeChange,onBlur:this.onOverrideTime,invalid:!t,value:r})]}),(0,B.jsxs)("div",{className:"gf-form",children:[He||(He=(0,B.jsx)("span",{className:"gf-form-label width-9",children:"Time shift"})),(0,B.jsx)(f.Input,{type:"text",className:"width-6",placeholder:"1h",onChange:this.onTimeShiftChange,onBlur:this.onTimeShift,invalid:!n,value:i})]}),(i||r)&&(0,B.jsx)("div",{className:"gf-form-inline",children:(0,B.jsx)(f.InlineField,{label:"Hide time info",labelWidth:18,children:(0,B.jsx)(f.Switch,{value:e,onChange:this.onToggleTimeOverride})})})]})}}const Je=e=>!e||se.rangeUtil.isValidTimeSpan(e),Ye=e=>""===e?null:e,Xe=(0,f.stylesFactory)((()=>{const{theme:e}=w.vc;return{collapsedText:M.css`
      margin-left: ${e.spacing.md};
      font-size: ${e.typography.size.sm};
      color: ${e.colors.textWeak};
    `}}));var Ke,et,tt,nt=n("./public/app/plugins/datasource/dashboard/index.ts");function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class it extends d.PureComponent{constructor(...e){super(...e),rt(this,"backendSrv",Ge.ae),rt(this,"dataSourceSrv",(0,p.getDataSourceSrv)()),rt(this,"querySubscription",null),rt(this,"state",{isLoadingHelp:!1,helpContent:null,isPickerOpen:!1,isAddingMixed:!1,isHelpOpen:!1,scrollTop:0,data:{state:se.LoadingState.NotStarted,series:[],timeRange:(0,se.getDefaultTimeRange)()}}),rt(this,"onChangeDataSource",(async e=>{let{queries:t}=this.props.options;const{dsSettings:n}=this.state;if(e.meta.mixed)for(const e of t)e.datasource!==qe.DB&&(e.datasource=null==n?void 0:n.name,e.datasource||(e.datasource=w.ZP.defaultDatasource));else if(n)if(n.meta.mixed)for(const e of t)e.datasource!==qe.DB&&delete e.datasource;else n.meta.id!==e.meta.id&&(t=[{refId:"A"}]);const r=await this.dataSourceSrv.get(e.name);this.onChange({queries:t,dataSource:{name:e.name,uid:e.uid,default:e.isDefault}}),this.setState({dataSource:r,dsSettings:e})})),rt(this,"onAddQueryClick",(()=>{const{options:e}=this.props;this.onChange({queries:(0,Ue.DI)(e.queries,this.newQuery())}),this.onScrollBottom()})),rt(this,"onAddExpressionClick",(()=>{this.onChange({queries:(0,Ue.DI)(this.props.options.queries,qe.mV.newQuery())}),this.onScrollBottom()})),rt(this,"onScrollBottom",(()=>{this.setState({scrollTop:1e3})})),rt(this,"onUpdateAndRun",(e=>{this.props.onOptionsChange(e),this.props.onRunQueries()})),rt(this,"onOpenHelp",(()=>{this.setState({isHelpOpen:!0})})),rt(this,"onCloseHelp",(()=>{this.setState({isHelpOpen:!1})})),rt(this,"renderMixedPicker",(()=>(0,B.jsx)(p.DataSourcePicker,{mixed:!1,onChange:this.onAddMixedQuery,current:null,autoFocus:!0,variables:!0,onBlur:this.onMixedPickerBlur,openMenuOnFocus:!0}))),rt(this,"onAddMixedQuery",(e=>{this.onAddQuery({datasource:e.name}),this.setState({isAddingMixed:!1,scrollTop:this.state.scrollTop+1e4})})),rt(this,"onMixedPickerBlur",(()=>{this.setState({isAddingMixed:!1})})),rt(this,"onAddQuery",(e=>{const{queries:t}=this.props.options;this.onChange({queries:(0,Ue.DI)(t,e)}),this.onScrollBottom()})),rt(this,"setScrollTop",(({scrollTop:e})=>{this.setState({scrollTop:e})})),rt(this,"onQueriesChange",(e=>{this.onChange({queries:e})}))}async componentDidMount(){const{queryRunner:e,options:t}=this.props;this.querySubscription=e.getData({withTransforms:!1,withFieldConfig:!1}).subscribe({next:e=>this.onPanelDataUpdate(e)});try{const e=await this.dataSourceSrv.get(t.dataSource.name),n=this.dataSourceSrv.getInstanceSettings(t.dataSource.name),r=await this.dataSourceSrv.get();this.setState({dataSource:e,dsSettings:n,defaultDataSource:r})}catch(e){console.log("failed to load data source",e)}}componentWillUnmount(){this.querySubscription&&(this.querySubscription.unsubscribe(),this.querySubscription=null)}onPanelDataUpdate(e){this.setState({data:e})}newQuery(){const{dsSettings:e,defaultDataSource:t}=this.state;return null!=e&&e.meta.mixed?{datasource:null==t?void 0:t.name}:{}}onChange(e){this.props.onOptionsChange(Object.assign({},this.props.options,e))}renderTopSection(e){const{onOpenQueryInspector:t,options:n}=this.props,{dataSource:r,data:i}=this.state;return(0,B.jsx)("div",{children:(0,B.jsxs)("div",{className:e.dataSourceRow,children:[Ke||(Ke=(0,B.jsx)(f.InlineFormLabel,{width:"auto",children:"Data source"})),(0,B.jsx)("div",{className:e.dataSourceRowItem,children:(0,B.jsx)(p.DataSourcePicker,{onChange:this.onChangeDataSource,current:n.dataSource.name,metrics:!0,mixed:!0,dashboard:!0,variables:!0})}),r&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{className:e.dataSourceRowItem,children:(0,B.jsx)(f.Button,{variant:"secondary",icon:"question-circle",title:"Open data source help",onClick:this.onOpenHelp})}),(0,B.jsx)("div",{className:e.dataSourceRowItemOptions,children:(0,B.jsx)(Ze,{options:n,dataSource:r,data:i,onChange:this.onUpdateAndRun})}),t&&(0,B.jsx)("div",{className:e.dataSourceRowItem,children:(0,B.jsx)(f.Button,{variant:"secondary",onClick:t,"aria-label":h.wl.components.QueryTab.queryInspectorButton,children:"Query inspector"})})]})]})})}renderQueries(e){const{options:t,onRunQueries:n}=this.props,{data:r}=this.state;return(0,nt.yl)(e.name)?(0,B.jsx)(nt.hD,{queries:t.queries,panelData:r,onChange:this.onQueriesChange,onRunQueries:n}):(0,B.jsx)("div",{"aria-label":h.wl.components.QueryTab.content,children:(0,B.jsx)($e.l,{queries:t.queries,dsSettings:e,onQueriesChange:this.onQueriesChange,onAddQuery:this.onAddQuery,onRunQueries:n,data:r})})}isExpressionsSupported(e){return!0===(e.meta.alerting||e.meta.mixed)}renderAddQueryRow(e,t){const{isAddingMixed:n}=this.state,r=!(n||(0,nt.yl)(e.name));return(0,B.jsxs)(f.HorizontalGroup,{spacing:"md",align:"flex-start",children:[r&&(0,B.jsx)(f.Button,{icon:"plus",onClick:this.onAddQueryClick,variant:"secondary","aria-label":h.wl.components.QueryTab.addQuery,children:"Query"}),w.ZP.expressionsEnabled&&this.isExpressionsSupported(e)&&(0,B.jsx)(f.Tooltip,{content:"Beta feature: queries could stop working in next version",placement:"right",children:(0,B.jsxs)(f.Button,{icon:"plus",onClick:this.onAddExpressionClick,variant:"secondary",className:t.expressionButton,children:[et||(et=(0,B.jsx)("span",{children:"Expression "})),tt||(tt=(0,B.jsx)(f.Icon,{name:"exclamation-triangle",className:"muted",size:"sm"}))]})})]})}render(){const{scrollTop:e,isHelpOpen:t,dsSettings:n}=this.state,r=ot();return(0,B.jsx)(f.CustomScrollbar,{autoHeightMin:"100%",scrollTop:e,setScrollTop:this.setScrollTop,children:(0,B.jsxs)("div",{className:r.innerWrapper,children:[this.renderTopSection(r),n&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{className:r.queriesWrapper,children:this.renderQueries(n)}),this.renderAddQueryRow(n,r),t&&(0,B.jsx)(f.Modal,{title:"Data source help",isOpen:!0,onDismiss:this.onCloseHelp,children:(0,B.jsx)(Ve.R,{plugin:n.meta,type:"query_help"})})]})]})})}}const ot=(0,f.stylesFactory)((()=>{const{theme:e}=w.ZP;return{innerWrapper:M.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      padding: ${e.spacing.md};
    `,dataSourceRow:M.css`
      display: flex;
      margin-bottom: ${e.spacing.md};
    `,dataSourceRowItem:M.css`
      margin-right: ${e.spacing.inlineFormMargin};
    `,dataSourceRowItemOptions:M.css`
      flex-grow: 1;
      margin-right: ${e.spacing.inlineFormMargin};
    `,queriesWrapper:M.css`
      padding-bottom: 16px;
    `,expressionWrapper:M.css``,expressionButton:M.css`
      margin-right: ${e.spacing.sm};
    `}}));function at(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class st extends d.PureComponent{constructor(e){super(e),at(this,"onRunQueries",(()=>{this.props.panel.refresh()})),at(this,"onOpenQueryInspector",(()=>{(0,p.getLocationSrv)().update({query:{inspect:this.props.panel.id,inspectTab:"query"},partial:!0})})),at(this,"onOptionsChange",(e=>{const{panel:t}=this.props,n=(e.dataSource.default?null:e.dataSource.name)!==t.datasource;t.updateQueries(e),n&&setTimeout(this.onRunQueries,10),this.forceUpdate()}))}buildQueryOptions(e){return{dataSource:{name:e.datasource},queries:e.targets,maxDataPoints:e.maxDataPoints,minInterval:e.interval,timeRange:{from:e.timeFrom,shift:e.timeShift,hide:e.hideTimeOverride}}}render(){const{panel:e}=this.props,t=this.buildQueryOptions(e);return(0,B.jsx)(it,{options:t,queryRunner:e.getQueryRunner(),onRunQueries:this.onRunQueries,onOpenQueryInspector:this.onOpenQueryInspector,onOptionsChange:this.onOptionsChange})}}var lt,dt,ct=n("./public/app/features/alerting/getAlertingValidationMessage.ts"),ut=n("./public/app/core/components/EmptyListCTA/EmptyListCTA.tsx"),pt=n("./public/app/features/alerting/state/alertDef.ts");function ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ft extends d.PureComponent{constructor(...e){super(...e),ht(this,"state",{stateHistoryItems:[]}),ht(this,"clearHistory",(async()=>{const{dashboard:e,panelId:t,onRefresh:n}=this.props;await(0,p.getBackendSrv)().post("/api/annotations/mass-delete",{dashboardId:e.id,panelId:t}),this.setState({stateHistoryItems:[]}),n()}))}componentDidMount(){const{dashboard:e,panelId:t}=this.props;(0,p.getBackendSrv)().get(`/api/annotations?dashboardId=${e.id}&panelId=${t}&limit=50&type=alert`,{},`state-history-${e.id}-${t}`).then((t=>{const n=t.map((t=>({stateModel:pt.Z.getStateDisplayModel(t.newState),time:e.formatDate(t.time,"MMM D, YYYY HH:mm:ss"),info:pt.Z.getAlertAnnotationInfo(t)})));this.setState({stateHistoryItems:n})}))}render(){const{stateHistoryItems:e}=this.state;return(0,B.jsxs)("div",{children:[e.length>0&&(0,B.jsxs)("div",{className:"p-b-1",children:[lt||(lt=(0,B.jsx)("span",{className:"muted",children:"Last 50 state changes"})),(0,B.jsx)(f.ConfirmButton,{onConfirm:this.clearHistory,confirmVariant:"destructive",confirmText:"Clear",children:(0,B.jsx)(f.Button,{className:M.css`
                  direction: ltr;
                `,variant:"destructive",icon:"trash-alt",children:"Clear history"})})]}),(0,B.jsx)("ol",{className:"alert-rule-list",children:e.length>0?e.map(((e,t)=>(0,B.jsxs)("li",{className:"alert-rule-item",children:[(0,B.jsx)("div",{className:`alert-rule-item__icon ${e.stateModel.stateClass}`,children:(0,B.jsx)(f.Icon,{name:e.stateModel.iconClass,size:"xl"})}),(0,B.jsxs)("div",{className:"alert-rule-item__body",children:[(0,B.jsxs)("div",{className:"alert-rule-item__header",children:[(0,B.jsx)("p",{className:"alert-rule-item__name",children:e.alertName}),(0,B.jsx)("div",{className:"alert-rule-item__text",children:(0,B.jsx)("span",{className:`${e.stateModel.stateClass}`,children:e.stateModel.text})})]}),e.info]}),(0,B.jsx)("div",{className:"alert-rule-item__time",children:e.time})]},`${e.time}-${t}`))):dt||(dt=(0,B.jsx)("i",{children:"No state changes recorded"}))})]})}}const gt=ft;n("./public/app/features/alerting/AlertTabCtrl.ts");var mt,bt,yt,vt,xt,St=n("./public/app/core/components/CopyToClipboard/CopyToClipboard.tsx");function Mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ot extends d.PureComponent{constructor(...e){super(...e),Mt(this,"state",{isLoading:!1,allNodesExpanded:null,testRuleResponse:{}}),Mt(this,"formattedJson",void 0),Mt(this,"clipboard",void 0),Mt(this,"setFormattedJson",(e=>{this.formattedJson=e})),Mt(this,"getTextForClipboard",(()=>JSON.stringify(this.formattedJson,null,2))),Mt(this,"onClipboardSuccess",(()=>{_.Z.emit(se.AppEvents.alertSuccess,["Content copied to clipboard"])})),Mt(this,"onToggleExpand",(()=>{this.setState((e=>Object.assign({},e,{allNodesExpanded:!this.state.allNodesExpanded})))})),Mt(this,"getNrOfOpenNodes",(()=>null===this.state.allNodesExpanded?3:this.state.allNodesExpanded?20:1)),Mt(this,"renderExpandCollapse",(()=>{const{allNodesExpanded:e}=this.state,t=(0,B.jsxs)(B.Fragment,{children:[mt||(mt=(0,B.jsx)(f.Icon,{name:"minus-circle"}))," Collapse All"]}),n=(0,B.jsxs)(B.Fragment,{children:[bt||(bt=(0,B.jsx)(f.Icon,{name:"plus-circle"}))," Expand All"]});return e?t:n}))}componentDidMount(){this.testRule()}async testRule(){const{dashboard:e,panel:t}=this.props,n=e.getSaveModelClone();n.panels=n.panels.map((e=>e.id===t.editSourceId?t.getSaveModel():e));const r={dashboard:n,panelId:t.id};this.setState({isLoading:!0});const i=await(0,p.getBackendSrv)().post("/api/alerts/test",r);this.setState({isLoading:!1,testRuleResponse:i})}render(){const{testRuleResponse:e,isLoading:t}=this.state;if(!0===t)return yt||(yt=(0,B.jsx)(f.LoadingPlaceholder,{text:"Evaluating rule"}));const n=this.getNrOfOpenNodes();return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{className:"pull-right",children:(0,B.jsxs)(f.HorizontalGroup,{spacing:"md",children:[(0,B.jsx)("div",{onClick:this.onToggleExpand,children:this.renderExpandCollapse()}),(0,B.jsxs)(St.h,{elType:"div",text:this.getTextForClipboard,onSuccess:this.onClipboardSuccess,children:[vt||(vt=(0,B.jsx)(f.Icon,{name:"copy"}))," Copy to Clipboard"]})]})}),(0,B.jsx)(f.JSONFormatter,{json:e,open:n,onDidRender:this.setFormattedJson})]})}}function kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class jt extends d.PureComponent{constructor(...e){super(...e),kt(this,"element",void 0),kt(this,"component",void 0),kt(this,"panelCtrl",void 0),kt(this,"state",{validationMessage:"",showStateHistory:!1,showDeleteConfirmation:!1,showTestRule:!1}),kt(this,"onAngularPanelUpdated",(()=>{this.forceUpdate()})),kt(this,"onAddAlert",(()=>{var e,t;null===(e=this.panelCtrl)||void 0===e||e._enableAlert(),null===(t=this.component)||void 0===t||t.digest(),this.forceUpdate()})),kt(this,"onToggleModal",(e=>{const t=this.state[e];this.setState(Object.assign({},this.state,{[e]:!t}))})),kt(this,"renderTestRule",(()=>{if(!this.state.showTestRule)return null;const{panel:e,dashboard:t}=this.props,n=()=>this.onToggleModal("showTestRule");return(0,B.jsx)(f.Modal,{isOpen:!0,icon:"bug",title:"Testing rule",onDismiss:n,onClickBackdrop:n,children:(0,B.jsx)(Ot,{panel:e,dashboard:t})})})),kt(this,"renderDeleteConfirmation",(()=>{if(!this.state.showDeleteConfirmation)return null;const{panel:e}=this.props,t=()=>this.onToggleModal("showDeleteConfirmation");return(0,B.jsx)(f.ConfirmModal,{isOpen:!0,icon:"trash-alt",title:"Delete",body:xt||(xt=(0,B.jsxs)("div",{children:["Are you sure you want to delete this alert rule?",(0,B.jsx)("br",{}),(0,B.jsx)("small",{children:"You need to save dashboard for the delete to take effect."})]})),confirmText:"Delete alert",onDismiss:t,onConfirm:()=>{var n;delete e.alert,e.thresholds=[],this.panelCtrl&&(this.panelCtrl.alertState=null,this.panelCtrl.render()),null===(n=this.component)||void 0===n||n.digest(),t()}})})),kt(this,"renderStateHistory",(()=>{var e;if(!this.state.showStateHistory)return null;const{panel:t,dashboard:n}=this.props,r=()=>this.onToggleModal("showStateHistory");return(0,B.jsx)(f.Modal,{isOpen:!0,icon:"history",title:"State history",onDismiss:r,onClickBackdrop:r,children:(0,B.jsx)(gt,{dashboard:n,panelId:null!==(e=t.editSourceId)&&void 0!==e?e:t.id,onRefresh:()=>{var e;return null===(e=this.panelCtrl)||void 0===e?void 0:e.refresh()}})})}))}componentDidMount(){this.loadAlertTab()}componentDidUpdate(e){this.loadAlertTab()}componentWillUnmount(){this.component&&this.component.destroy()}async loadAlertTab(){const{panel:e,angularPanelComponent:t}=this.props;if(!this.element||this.component)return;if(t){const e=t.getScope();if(!e.$$childHead)return void setTimeout((()=>{this.forceUpdate()}));this.panelCtrl=e.$$childHead.ctrl}else this.panelCtrl=this.getReactAlertPanelCtrl();const n=(0,p.getAngularLoader)(),r={ctrl:this.panelCtrl};this.component=n.load(this.element,r,"<alert-tab />");const i=await(0,ct.E)(e.transformations,e.targets,(0,p.getDataSourceSrv)(),e.datasource);i&&this.setState({validationMessage:i})}getReactAlertPanelCtrl(){return{panel:this.props.panel,events:new se.EventBusSrv,render:()=>{this.props.panel.render()}}}render(){const{alert:e,transformations:t}=this.props.panel,{validationMessage:n}=this.state,r=t&&t.length>0;if(!e&&n)return(0,B.jsx)(ke,{message:n});const i={title:"Panel has no alert rule defined",buttonIcon:"bell",onClick:this.onAddAlert,buttonTitle:"Create Alert"};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(f.CustomScrollbar,{autoHeightMin:"100%",children:(0,B.jsx)(f.Container,{padding:"md",children:(0,B.jsxs)("div",{"aria-label":h.wl.components.AlertTab.content,children:[e&&r&&(0,B.jsx)(f.Alert,{severity:Ce.F1.Error,title:"Transformations are not supported in alert queries"}),(0,B.jsx)("div",{ref:e=>this.element=e}),e&&(0,B.jsxs)(f.HorizontalGroup,{children:[(0,B.jsx)(f.Button,{onClick:()=>this.onToggleModal("showStateHistory"),variant:"secondary",children:"State history"}),(0,B.jsx)(f.Button,{onClick:()=>this.onToggleModal("showTestRule"),variant:"secondary",children:"Test rule"}),(0,B.jsx)(f.Button,{onClick:()=>this.onToggleModal("showDeleteConfirmation"),variant:"destructive",children:"Delete"})]}),!e&&!n&&(0,B.jsx)(ut.Z,Object.assign({},i))]})})}),this.renderTestRule(),this.renderDeleteConfirmation(),this.renderStateHistory()]})}}const wt=(0,u.connect)(((e,t)=>({angularPanelComponent:e.dashboard.panels[t.panel.id].angularComponent})),{})(jt);var Ct,Pt,zt=n("./public/app/features/alerting/unified/utils/rule-form.ts"),Rt=n("./node_modules/react-router/esm/react-router.js"),Tt=n("./node_modules/react-use/esm/useAsync.js");const Bt=({dashboard:e,panel:t,className:n})=>{const{loading:r,value:i}=(0,Tt.Z)((()=>(0,zt.aR)(t,e)),[t,e]),o=(0,Rt.TH)();if(r)return Ct||(Ct=(0,B.jsx)(f.Button,{disabled:!0,children:"Create alert rule from this panel"}));if(!i)return Pt||(Pt=(0,B.jsx)(f.Alert,{severity:"info",title:"No alerting capable query found",children:"Cannot create alerts from this panel because no query to an alerting capable datasource is found."}));const a=se.urlUtil.renderUrl("alerting/new",{defaults:JSON.stringify(i),returnTo:o.pathname+o.search});return(0,B.jsx)(f.LinkButton,{icon:"bell",href:a,className:n,"data-testid":"create-alert-rule-button",children:"Create alert rule from this panel"})};var Wt,Dt,It,Et=n("./public/app/features/alerting/unified/components/rules/RulesTable.tsx"),_t=n("./public/app/features/alerting/unified/state/actions.ts"),At=n("./public/app/features/alerting/unified/utils/constants.ts"),Ft=n("./public/app/features/alerting/unified/utils/datasource.ts"),Lt=n("./public/app/features/alerting/unified/utils/redux.ts"),Nt=n("./public/app/features/alerting/unified/hooks/useCombinedRuleNamespaces.ts"),Ht=n("./public/app/features/alerting/unified/hooks/useUnifiedAlertingSelector.ts");function $t({dashboard:e,panel:t,poll:n=!1}){var r,i;const o=(0,u.useDispatch)(),a=null!==(r=(0,Ht._)((e=>e.promRules[Ft.GC])))&&void 0!==r?r:Lt.oq,s=null!==(i=(0,Ht._)((e=>e.rulerRules[Ft.GC])))&&void 0!==i?i:Lt.oq;(0,d.useEffect)((()=>{const e=()=>{o((0,_t.y6)(Ft.GC)),o((0,_t.UR)(Ft.GC))};if(e(),n){const t=setInterval(e,At.p4);return()=>{clearInterval(t)}}return()=>{}}),[o,n]);const l=a.loading||s.loading,c=[a.error,s.error].filter((e=>!!e)),p=(0,Nt.Z)(Ft.GC);return{rules:(0,d.useMemo)((()=>p.flatMap((e=>e.groups)).flatMap((e=>e.rules)).filter((n=>n.annotations[At.q6.dashboardUID]===e.uid&&n.annotations[At.q6.panelID]===String(t.editSourceId)))),[p,e,t]),errors:c,loading:l}}const Gt=e=>({newButton:M.css`
    margin-top: ${e.spacing(3)};
  `,innerWrapper:M.css`
    padding: ${e.spacing(2)};
  `,noRulesWrapper:M.css`
    margin: ${e.spacing(2)};
    background-color: ${e.colors.background.secondary};
    padding: ${e.spacing(3)};
  `}),Vt=p.config.unifiedAlertingEnabled?({dashboard:e,panel:t})=>{var n;const r=(0,f.useStyles2)(Gt),{errors:i,loading:o,rules:a}=$t({dashboard:e,panel:t,poll:!0}),s=i.length?(0,B.jsx)(f.Alert,{title:"Errors loading rules",severity:"error",children:i.map(((e,t)=>(0,B.jsxs)("div",{children:["Failed to load Grafana rules state: ",e.message||"Unknown error."]},t)))}):null;return o&&!a.length?(0,B.jsxs)("div",{className:r.innerWrapper,children:[s,Wt||(Wt=(0,B.jsx)(f.LoadingPlaceholder,{text:"Loading rules..."}))]}):a.length?(0,B.jsx)(f.CustomScrollbar,{autoHeightMin:"100%",children:(0,B.jsxs)("div",{className:r.innerWrapper,children:[s,n||(n=(0,B.jsx)(Et.i,{rules:a})),!!e.meta.canSave&&(0,B.jsx)(Bt,{className:r.newButton,panel:t,dashboard:e})]})}):(0,B.jsxs)("div",{"aria-label":h.wl.components.PanelAlertTabContent.content,className:r.noRulesWrapper,children:[s,!!e.uid&&(0,B.jsxs)(B.Fragment,{children:[Dt||(Dt=(0,B.jsx)("p",{children:"There are no alert rules linked to this panel."})),!!e.meta.canSave&&(0,B.jsx)(Bt,{panel:t,dashboard:e})]}),!e.uid&&!!e.meta.canSave&&(It||(It=(0,B.jsx)(f.Alert,{severity:"info",title:"Dashboard not saved",children:"Dashboard must be saved before alerts can be added."})))]})}:wt;var Ut=n("./packages/grafana-ui/src/components/Tabs/Tab.tsx");const qt=["panel","dashboard"];const Qt=e=>{let{panel:t,dashboard:n}=e,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,qt);const{rules:i,loading:o}=$t({panel:t,dashboard:n});return(0,B.jsx)(Ut.O,Object.assign({},r,{counter:o?null:i.length}))},Zt=d.memo((({panel:e,dashboard:t,tabs:n,onChangeTab:r})=>{const i=(0,f.useForceUpdate)(),o=(0,f.useStyles2)(Yt);(0,d.useEffect)((()=>{const t=new X.w0;return t.add(e.events.subscribe(Q.pO,i)),t.add(e.events.subscribe(Q.Xw,i)),()=>t.unsubscribe()}),[e,i]);const a=n.find((e=>e.active));return 0===n.length?null:(0,B.jsxs)("div",{className:o.wrapper,children:[(0,B.jsx)(f.TabsBar,{className:o.tabBar,children:n.map((n=>p.config.unifiedAlertingEnabled&&n.id===Oe.Ip.Alert?(0,B.jsx)(Qt,{label:n.text,active:n.active,onChangeTab:()=>r(n),icon:n.icon,panel:e,dashboard:t},n.id):(0,B.jsx)(f.Tab,{label:n.text,active:n.active,onChangeTab:()=>r(n),icon:n.icon,counter:Jt(e,n)},n.id)))}),(0,B.jsxs)(f.TabContent,{className:o.tabContent,children:[a.id===Oe.Ip.Query&&(0,B.jsx)(st,{panel:e,queries:e.targets}),a.id===Oe.Ip.Alert&&(0,B.jsx)(Vt,{panel:e,dashboard:t}),a.id===Oe.Ip.Transform&&(0,B.jsx)(We,{panel:e})]})]})}));function Jt(e,t){var n;switch(t.id){case Oe.Ip.Query:return e.targets.length;case Oe.Ip.Alert:return e.alert?1:0;case Oe.Ip.Transform:return(null!==(n=e.getTransformations())&&void 0!==n?n:[]).length}return null}Zt.displayName="PanelEditorTabs";const Yt=e=>({wrapper:M.css`
      display: flex;
      flex-direction: column;
      height: 100%;
    `,tabBar:M.css`
      padding-left: ${e.spacing(2)};
    `,tabContent:M.css`
      padding: 0;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      min-height: 0;
      background: ${e.colors.background.primary};
      border-right: 1px solid ${e.components.panel.borderColor};
    `});var Xt=n("./public/app/features/dashboard/components/DashNav/DashNavTimeControls.tsx"),Kt=n("./public/app/features/dashboard/components/PanelEditor/state/reducers.ts"),en=n("./public/app/features/dashboard/dashgrid/PanelPluginError.tsx");const tn=e=>t=>t.plugins.panels[e]||(0,en.X)(`Panel plugin not found (${e})`,!0),nn=({panel:e})=>{const t=(0,f.useStyles)(rn),n=(0,u.useDispatch)(),r=(0,u.useSelector)(tn(e.type)),i=(0,u.useSelector)((e=>e.panelEditor.ui.isPanelOptionsVisible)),o=(0,u.useSelector)((e=>e.panelEditor.isVizPickerOpen));return r?(0,B.jsx)("div",{className:t.wrapper,children:(0,B.jsxs)(f.ButtonGroup,{children:[(0,B.jsx)(f.ToolbarButton,{className:t.vizButton,tooltip:"Click to change visualization",imgSrc:r.meta.info.logos.small,isOpen:o,onClick:()=>{n((0,Kt.g_)(!o))},"aria-label":h.wl.components.PanelEditor.toggleVizPicker,fullWidth:!0,children:r.meta.name}),(0,B.jsx)(f.ToolbarButton,{tooltip:i?"Close options pane":"Show options pane",icon:i?"angle-right":"angle-left",onClick:()=>{n((0,Kt.K9)({isPanelOptionsVisible:!i}))},"aria-label":h.wl.components.PanelEditor.toggleVizOptions})]})}):null};nn.displayName="VisualizationTab";const rn=e=>({wrapper:M.css`
      display: flex;
      flex-direction: column;
    `,vizButton:M.css`
      text-align: left;
    `});var on=n("./public/app/features/panel/panellinks/link_srv.ts"),an=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx"),sn=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor.tsx");function ln(e){var t;const{panel:n,onPanelConfigChange:r}=e;return new sn.j({title:"Panel options",id:"Panel options",isOpenDefault:!0}).addItem(new an.a({title:"Title",value:n.title,popularRank:1,render:function(){return(0,B.jsx)(f.Input,{id:"PanelFrameTitle",defaultValue:n.title,onBlur:e=>r("title",e.currentTarget.value)})}})).addItem(new an.a({title:"Description",description:n.description,value:n.description,render:function(){return(0,B.jsx)(f.TextArea,{defaultValue:n.description,onBlur:e=>r("description",e.currentTarget.value)})}})).addItem(new an.a({title:"Transparent background",render:function(){return(0,B.jsx)(f.Switch,{value:n.transparent,id:"Transparent background",onChange:e=>r("transparent",e.currentTarget.checked)})}})).addCategory(new sn.j({title:"Panel links",id:"Panel links",isOpenDefault:!1,itemsCount:null===(t=n.links)||void 0===t?void 0:t.length}).addItem(new an.a({title:"Panel links",render:function(){return(0,B.jsx)(f.DataLinksInlineEditor,{links:n.links,onChange:e=>r("links",e),getSuggestions:on.PR,data:[]})}}))).addCategory(new sn.j({title:"Repeat options",id:"Repeat options",isOpenDefault:!1}).addItem(new an.a({title:"Repeat by variable",description:"Repeat this panel for each value in the selected variable. This is not visible while in edit mode. You need to go back to dashboard and then update the variable or reload the dashboard.",render:function(){return(0,B.jsx)(F,{repeat:n.repeat,onChange:e=>{r("repeat",e)}})}})).addItem(new an.a({title:"Repeat direction",showIf:()=>!!n.repeat,render:function(){return(0,B.jsx)(f.RadioButtonGroup,{options:[{label:"Horizontal",value:"h"},{label:"Vertical",value:"v"}],value:n.repeatDirection||"h",onChange:e=>r("repeatDirection",e)})}})).addItem(new an.a({title:"Max per row",showIf:()=>Boolean(n.repeat&&"h"===n.repeatDirection),render:function(){const e=[2,3,4,6,8,12].map((e=>({label:e.toString(),value:e})));return(0,B.jsx)(f.Select,{menuShouldPortal:!0,options:e,value:n.maxPerRow,onChange:e=>r("maxPerRow",e.value)})}})))}var dn=n("./public/app/features/dashboard/components/PanelEditor/getVizualizationOptions.tsx"),cn=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneCategory.tsx");const un=({property:e,context:t,registry:n,onChange:r,onRemove:i,isSystemOverride:o})=>{var a,s;const l=(0,f.useTheme)(),d=pn(l),c=null==n?void 0:n.getIfExists(e.id);if(!c)return null;const u=Array.isArray(e.value)||e.id===se.FieldConfigProperty.Thresholds||e.id===se.FieldConfigProperty.Links||e.id===se.FieldConfigProperty.Mappings,p=null===(a=c.category)||void 0===a?void 0:a.filter((e=>e!==c.name));let h;const g=(t=!0,n=!1)=>(r=!1)=>(0,B.jsxs)(f.HorizontalGroup,{justify:"space-between",children:[(0,B.jsxs)(f.Label,{category:p,description:t?c.description:void 0,children:[c.name,!r&&n&&c.getItemsCount&&(0,B.jsx)(f.Counter,{value:c.getItemsCount(e.value)})]}),!o&&(s||(s=(0,B.jsx)("div",{children:(0,B.jsx)(f.IconButton,{name:"times",onClick:i})})))]});return h=u?(0,B.jsx)(cn.u,{id:c.name,renderTitle:g(!1,!0),className:M.css`
          padding-left: 0;
          padding-right: 0;
        `,isNested:!0,isOpenDefault:void 0!==e.value,children:(0,B.jsx)(c.override,{value:e.value,onChange:e=>{r(e)},item:c,context:t})}):(0,B.jsx)("div",{children:(0,B.jsx)(f.Field,{label:g()(),description:c.description,children:(0,B.jsx)(c.override,{value:e.value,onChange:e=>{r(e)},item:c,context:t})})}),(0,B.jsx)("div",{className:(0,M.cx)(u&&d.collapsibleOverrideEditor,!u&&"dynamicConfigValueEditor--nonCollapsible"),children:h})},pn=(0,f.stylesFactory)((e=>({collapsibleOverrideEditor:M.css`
      label: collapsibleOverrideEditor;
      & + .dynamicConfigValueEditor--nonCollapsible {
        margin-top: ${e.spacing.formSpacingBase}px;
      }
    `})));var hn;const fn=({isExpanded:e,registry:t,matcherUi:n,overrideName:r,override:i,onOverrideRemove:o})=>{const a=(0,f.useStyles)(gn),s=i.properties.map((e=>t.getIfExists(e.id))).filter((e=>!!e)).map((e=>null==e?void 0:e.name)).join(", "),l=n.optionsToLabel(i.matcher.options);return(0,B.jsxs)("div",{children:[(0,B.jsxs)(f.HorizontalGroup,{justify:"space-between",children:[(0,B.jsx)("div",{children:r}),e&&(0,B.jsx)(f.IconButton,{name:"trash-alt",onClick:o,title:"Remove override"})]}),!e&&(0,B.jsx)("div",{className:a.overrideDetails,children:(0,B.jsxs)("div",{className:a.options,title:l,children:[l," ",hn||(hn=(0,B.jsx)(f.Icon,{name:"angle-right"}))," ",s]})})]})};fn.displayName="OverrideTitle";const gn=e=>({matcherUi:M.css`
      padding: ${e.spacing.sm};
    `,propertyPickerWrapper:M.css`
      margin-top: ${2*e.spacing.formSpacingBase}px;
    `,overrideDetails:M.css`
      font-size: ${e.typography.size.sm};
      color: ${e.colors.textWeak};
      font-weight: ${e.typography.weight.regular};
    `,options:M.css`
      overflow: hidden;
      padding-right: ${e.spacing.xl};
    `,unknownLabel:M.css`
      margin-bottom: 0;
    `});function mn(e){var t,n;const r=[],i=e.panel.fieldConfig,o=e.plugin.fieldConfigRegistry,a=null!==(t=null===(n=e.data)||void 0===n?void 0:n.series)&&void 0!==t?t:[];if(o.isEmpty())return[];const s=(t,n)=>{let r=(0,O.cloneDeep)(i.overrides);r[t]=n,e.onFieldConfigsChange(Object.assign({},i,{overrides:r}))},l=t=>{let n=(0,O.cloneDeep)(i.overrides);n.splice(t,1),e.onFieldConfigsChange(Object.assign({},i,{overrides:n}))},d={data:a,getSuggestions:e=>(0,on.PW)(a,e),isOverride:!0};for(let t=0;t<i.overrides.length;t++){const n=i.overrides[t],a=`Override ${t+1}`,c=f.fieldMatchersUI.get(n.matcher.id),u=bn(o),p=(0,se.isSystemOverride)(n),h=0===n.properties.length?1:0,g=new sn.j({title:a,id:a,forceOpen:h,renderTitle:function(e){return(0,B.jsx)(fn,{override:n,isExpanded:e,registry:o,overrideName:a,matcherUi:c,onOverrideRemove:()=>l(t)})}}),m=e=>{n.matcher.options=e,s(t,n)},b=(e,r)=>{const i=o.get(r.value),a={id:i.id,value:i.defaultValue};n.properties?e.properties.push(a):e.properties=[a],s(t,e)};g.addItem(new an.a({title:c.name,render:function(){var t,r;return(0,B.jsx)(c.component,{matcher:c.matcher,data:null!==(t=null===(r=e.data)||void 0===r?void 0:r.series)&&void 0!==t?t:[],options:n.matcher.options,onChange:m})}}));for(let e=0;e<n.properties.length;e++){const r=n.properties[e],i=o.getIfExists(r.id);if(!i)continue;const a=r=>{n.properties[e].value=r,s(t,n)},l=()=>{n.properties.splice(e,1),s(t,n)};g.addItem(new an.a({title:i.name,skipField:!0,render:function(){return(0,B.jsx)(un,{isSystemOverride:p,onChange:a,onRemove:l,property:r,registry:o,context:d},`${r.id}/${e}`)}}))}!p&&n.matcher.options&&g.addItem(new an.a({title:"----------",skipField:!0,render:function(){return(0,B.jsx)(f.ValuePicker,{label:"Add override property",variant:"secondary",isFullWidth:!0,icon:"plus",menuPlacement:"auto",options:u,onChange:e=>b(n,e)},"Add override property")}})),r.push(g)}return r.push(new sn.j({title:"add button",id:"add button",customRender:function(){return(0,B.jsx)(yn,{children:(0,B.jsx)(f.ValuePicker,{icon:"plus",label:"Add field override",variant:"secondary",menuPlacement:"auto",isFullWidth:!0,size:"md",options:f.fieldMatchersUI.list().filter((e=>!e.excludeFromPicker)).map((e=>({label:e.name,value:e.id,description:e.description}))),onChange:t=>(t=>{e.onFieldConfigsChange(Object.assign({},i,{overrides:[...i.overrides,{matcher:{id:t.value},properties:[]}]}))})(t)})},"Add override")}})),r}function bn(e){return e.list().filter((e=>!e.hideFromOverrides)).map((e=>{let t=e.name;return e.category&&(t=[...e.category,e.name].join(" > ")),{label:t,value:e.id,description:e.description}}))}function yn({children:e}){const t=(0,f.useStyles2)(vn);return(0,B.jsx)("div",{className:t,children:e})}function vn(e){return(0,M.css)({borderTop:`1px solid ${e.colors.border.weak}`,padding:`${e.spacing(2)}`})}class xn{constructor(e,t){this.categories=e,this.overrides=t}search(e){const t=new RegExp(e,"i"),n=this.collectHits(this.categories,t,[]).sort(Sn).map((e=>e.item)),r=this.collectHits(this.overrides,t,[]).sort(Sn).map((e=>e.item));return{optionHits:n,overrideHits:this.buildOverrideHitCategories(r),totalCount:this.getAllOptionsCount(this.categories)}}collectHits(e,t,n){for(const r of e){const e=t.test(r.props.title);for(const i of r.items)t.test(i.props.title)?n.push({item:i,rank:1}):i.props.description&&t.test(i.props.description)?n.push({item:i,rank:2}):e&&n.push({item:i,rank:3});r.categories.length>0&&this.collectHits(r.categories,t,n)}return n}getAllOptionsCount(e){var t=0;for(const n of e)t+=n.items.length,n.categories.length>0&&(t+=this.getAllOptionsCount(n.categories));return t}buildOverrideHitCategories(e){const t={};for(const n of e){let e=t[n.parent.props.title];e||(e=t[n.parent.props.title]=new sn.j(n.parent.props),e.addItem(n.parent.items[0])),e.items[0].props.title!==n.props.title&&e.addItem(n)}return Object.values(t)}}function Sn(e,t){return e.rank-t.rank}var Mn=n("./public/app/features/dashboard/state/actions.ts");function On(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kn=(e,t)=>({angularPanelComponent:e.dashboard.panels[t.panel.id].angularComponent}),jn={changePanelPlugin:Mn.Kc};(0,u.connect)(kn,jn);class wn extends d.PureComponent{constructor(e){super(e),On(this,"element",void 0),On(this,"angularOptions",void 0)}componentDidMount(){this.loadAngularOptions()}componentDidUpdate(e){this.props.plugin!==e.plugin&&this.cleanUpAngularOptions(),this.loadAngularOptions()}componentWillUnmount(){this.cleanUpAngularOptions()}cleanUpAngularOptions(){this.angularOptions&&(this.angularOptions.destroy(),this.angularOptions=null)}loadAngularOptions(){const{panel:e,angularPanelComponent:t,changePanelPlugin:n}=this.props;if(!this.element||!t||this.angularOptions)return;const r=t.getScope();if(!r.$$childHead)return void setTimeout((()=>{this.forceUpdate()}));const i=r.$$childHead.ctrl;i.initEditMode(),i.onPluginTypeChange=t=>{n(e,t.id)};let o="";for(let e=0;e<i.editorTabs.length;e++){const t=i.editorTabs[e];t.isOpen=(a=t.title,s=0===e,C.Z.getBool(`panel-edit-section-${a}`,s)),o+=`\n      <div class="panel-options-group" ng-cloak>\n        <div class="panel-options-group__header" ng-click="toggleOptionGroup(${e})" aria-label="${t.title} section">\n          <div class="panel-options-group__icon">\n            <icon name="ctrl.editorTabs[${e}].isOpen ? 'angle-down' : 'angle-right'"></icon>\n          </div>\n          <div class="panel-options-group__title">${t.title}</div>\n        </div>\n        <div class="panel-options-group__body" ng-if="ctrl.editorTabs[${e}].isOpen">\n          <panel-editor-tab editor-tab="ctrl.editorTabs[${e}]" ctrl="ctrl"></panel-editor-tab>\n        </div>\n      </div>\n      `}var a,s;const l=(0,p.getAngularLoader)(),d={ctrl:i,toggleOptionGroup:e=>{const t=i.editorTabs[e];t.isOpen=!t.isOpen,function(e,t){C.Z.set(`panel-edit-section-${e}`,t?"true":"false")}(t.title,t.isOpen)}};this.angularOptions=l.load(this.element,d,o),this.angularOptions.digest()}render(){return(0,B.jsx)("div",{ref:e=>this.element=e})}}const Cn=(0,u.connect)(kn,jn)(wn);function Pn(e){const t=[];for(const n of e)for(const e of n.items)"Unit"===e.props.title&&(e.props.popularRank=2),"Min"===e.props.title&&(e.props.popularRank=3),"Max"===e.props.title&&(e.props.popularRank=4),"Display name"===e.props.title&&(e.props.popularRank=5),e.props.popularRank&&t.push(e);return t.sort(((e,t)=>e.props.popularRank-t.props.popularRank))}var zn=n("./public/app/features/library-panels/guard.ts");const Rn=({panel:e,formatDate:t})=>{var n;const r=(0,f.useStyles)(Tn);return(0,zn.V)(e)?(0,B.jsxs)("div",{className:r.info,children:[(0,B.jsxs)("div",{className:r.libraryPanelInfo,children:[`Used on ${e.libraryPanel.meta.connectedDashboards} `,1===e.libraryPanel.meta.connectedDashboards?"dashboard":"dashboards"]}),(0,B.jsxs)("div",{className:r.libraryPanelInfo,children:["Last edited on ",null!==(n=null==t?void 0:t(e.libraryPanel.meta.updated,"L"))&&void 0!==n?n:e.libraryPanel.meta.updated," by",e.libraryPanel.meta.updatedBy.avatarUrl&&(0,B.jsx)("img",{width:"22",height:"22",className:r.userAvatar,src:e.libraryPanel.meta.updatedBy.avatarUrl,alt:`Avatar for ${e.libraryPanel.meta.updatedBy.name}`}),e.libraryPanel.meta.updatedBy.name]})]}):null},Tn=e=>({info:M.css`
      line-height: 1;
    `,libraryPanelInfo:M.css`
      color: ${e.colors.textSemiWeak};
      font-size: ${e.typography.size.sm};
    `,userAvatar:M.css`
      border-radius: 50%;
      box-sizing: content-box;
      width: 22px;
      height: 22px;
      padding-left: ${e.spacing.sm};
      padding-right: ${e.spacing.sm};
    `});function Bn(e){const{panel:t,onPanelConfigChange:n,dashboard:r}=e,i=new sn.j({title:"Library panel options",id:"Library panel options",isOpenDefault:!0});return(0,zn.V)(t)&&i.addItem(new an.a({title:"Name",value:t.libraryPanel.name,popularRank:1,render:function(){return(0,B.jsx)(f.Input,{id:"LibraryPanelFrameName",defaultValue:t.libraryPanel.name,onBlur:e=>n("libraryPanel",Object.assign({},t.libraryPanel,{name:e.currentTarget.value}))})}})).addItem(new an.a({title:"Information",render:function(){return(0,B.jsx)(Rn,{panel:t,formatDate:r.formatDate})}})),i}const Wn=e=>{const{plugin:t,dashboard:n,panel:r}=e,[i,o]=(0,d.useState)(""),[a,s]=(0,d.useState)(In.All),l=(0,f.useStyles2)(En),[c,u,p,h]=(0,d.useMemo)((()=>[ln(e),(0,dn.m)(e),mn(e),Bn(e)]),[r.configRev,e.data]),g=[],m=i.length>0,b=(0,d.useMemo)(Dn,[]),y=(0,zn.V)(r)?[h,c,...u]:[c,...u];if(m)g.push(function(e,t,n){const r=new xn(e,t),{optionHits:i,totalCount:o,overrideHits:a}=r.search(n);return(0,B.jsxs)("div",{children:[(0,B.jsx)(cn.u,{id:"Found options",title:`Matched ${i.length}/${o} options`,forceOpen:1,children:i.map((e=>e.render(n)))},"Normal options"),a.map((e=>e.render(n)))]},"search results")}(y,p,i)),e.plugin.angularPanelCtrl&&g.push((0,B.jsx)("div",{className:l.searchNotice,children:"This is an old visualization type that does not support searching all options."},"Search notice"));else switch(a){case In.All:(0,zn.V)(r)&&g.push(h.render()),g.push(c.render()),e.plugin.angularPanelCtrl&&g.push((0,B.jsx)(Cn,{plugin:t,dashboard:n,panel:r},"AngularOptions"));for(const e of u)g.push(e.render());for(const e of p)g.push(e.render());break;case In.Overrides:for(const e of p)g.push(e.render());break;case In.Recent:g.push((0,B.jsx)(cn.u,{id:"Recent options",title:"Recent options",forceOpen:1,children:Pn(y).map((e=>e.render()))},"Recent options"))}const v=!m&&!t.fieldConfigRegistry.isEmpty();return(0,B.jsxs)("div",{className:l.wrapper,children:[(0,B.jsxs)("div",{className:l.formBox,children:[(0,B.jsx)("div",{className:l.formRow,children:(0,B.jsx)(f.FilterInput,{width:0,value:i,onChange:o,placeholder:"Search options"})}),v&&(0,B.jsx)("div",{className:l.formRow,children:(0,B.jsx)(f.RadioButtonGroup,{options:b,value:a,fullWidth:!0,onChange:s})})]}),(0,B.jsx)("div",{className:l.scrollWrapper,children:(0,B.jsx)(f.CustomScrollbar,{autoHeightMin:"100%",children:(0,B.jsx)("div",{className:l.mainBox,children:g})})})]})};function Dn(){return[{label:In.All,value:In.All},{label:In.Overrides,value:In.Overrides}]}let In;!function(e){e.All="All",e.Overrides="Overrides",e.Recent="Recent"}(In||(In={}));const En=e=>({wrapper:M.css`
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;

    .search-fragment-highlight {
      color: ${e.colors.warning.text};
      background: transparent;
    }
  `,searchBox:M.css`
    display: flex;
    flex-direction: column;
    min-height: 0;
  `,formRow:M.css`
    margin-bottom: ${e.spacing(1)};
  `,formBox:M.css`
    padding: ${e.spacing(1)};
    background: ${e.colors.background.primary};
    border: 1px solid ${e.components.panel.borderColor};
    border-bottom: none;
  `,closeButton:M.css`
    margin-left: ${e.spacing(1)};
  `,searchHits:M.css`
    padding: ${e.spacing(1,1,0,1)};
  `,scrollWrapper:M.css`
    flex-grow: 1;
    min-height: 0;
  `,searchNotice:M.css`
    font-size: ${e.typography.size.sm};
    color: ${e.colors.text.secondary};
    padding: ${e.spacing(1)};
    text-align: center;
  `,mainBox:M.css`
    background: ${e.colors.background.primary};
    border: 1px solid ${e.components.panel.borderColor};
    border-top: none;
    flex-grow: 1;
  `});var _n=n("./public/app/features/dashboard/components/VizTypePicker/VizTypePicker.tsx"),An=n("./packages/grafana-ui/src/components/Forms/Field.tsx"),Fn=n("./public/app/features/library-panels/components/AddLibraryPanelModal/AddLibraryPanelModal.tsx"),Ln=n("./public/app/features/library-panels/components/LibraryPanelsView/LibraryPanelsView.tsx"),Nn=n("./public/app/features/dashboard/services/DashboardSrv.ts");const Hn=({onConfirm:e,onDismiss:t,panel:n})=>{const r=(0,zn.V)(n),i=(r?"Changing":"Replace with")+" library panel",o=(r?"Changing":"Replacing with a")+" library panel will remove any changes since last save.";return(0,B.jsx)(f.ConfirmModal,{onConfirm:e,onDismiss:t,confirmText:r?"Change":"Replace",title:i,body:o,dismissText:"Cancel",isOpen:!0})};var $n=n("./public/app/core/components/PanelTypeFilter/PanelTypeFilter.tsx");const Gn=({panel:e,searchQuery:t})=>{var n;const r=(0,f.useStyles2)(Vn),[i,o]=(0,d.useState)(!1),[a,s]=(0,d.useState)(void 0),[l,c]=(0,d.useState)([]),p=(0,d.useCallback)((e=>{c(e.map((e=>e.id)))}),[c]),h=(0,Nn.h4)().getCurrent(),g=(0,u.useDispatch)();return(0,B.jsxs)(f.VerticalGroup,{spacing:"md",children:[!e.libraryPanel&&(0,B.jsx)(f.VerticalGroup,{align:"center",children:(0,B.jsx)(f.Button,{icon:"plus",onClick:()=>{o(!0)},variant:"secondary",fullWidth:!0,children:"Create new library panel"})}),(0,B.jsx)($n.j,{onChange:p}),(0,B.jsx)("div",{className:r.libraryPanelsView,children:(0,B.jsx)(Ln.u,{currentPanelId:null===(n=e.libraryPanel)||void 0===n?void 0:n.uid,searchString:t,panelFilter:l,onClickCard:e=>{s(e)},showSecondaryActions:!0})}),i&&(0,B.jsx)(Fn.c,{panel:e,onDismiss:()=>o(!1),initialFolderId:null==h?void 0:h.meta.folderId,isOpen:i}),a&&(0,B.jsx)(Hn,{panel:e,onDismiss:()=>{s(void 0)},onConfirm:async()=>{if(!a)return;s(void 0);e.type!==a.model.type&&await g((0,Mn.Kc)(e,a.model.type)),e.restoreModel(Object.assign({},a.model,{gridPos:e.gridPos,id:e.id,libraryPanel:(0,R.Pi)(a)})),e.configRev=0,e.refresh();const t=e.events.subscribe(Q.GT,(()=>{e.refresh(),t.unsubscribe()}));e.events.publish(Q.pO),e.events.publish(Q.Wj)}})]})},Vn=e=>({libraryPanelsView:M.css`
      width: 100%;
    `});var Un;const qn=({panel:e})=>{const t=(0,u.useSelector)(tn(e.type)),[n,r]=(0,d.useState)(""),[i,o]=(0,d.useState)(Qn.Visualizations),a=(0,u.useDispatch)(),s=(0,f.useStyles)(Zn),l=(0,d.useRef)(null),c=(0,d.useCallback)(((n,r)=>{n.id!==t.meta.id&&a((0,Mn.Kc)(e,n.id)),r||a((0,Kt.g_)(!1))}),[a,e,t.meta.id]);(0,d.useEffect)((()=>{l.current&&l.current.focus()}),[i]);const p=(0,d.useCallback)((e=>{if("Enter"===e.key){const n=e.currentTarget.value,r=(0,_n.xW)(),i=(0,_n.rw)(r,n,t.meta);i&&i.length&&c(i[0],!1)}}),[c,t.meta]),g=""!==n?(0,B.jsx)(f.Button,{icon:"times",fill:"text",size:"sm",onClick:()=>r(""),children:"Clear"}):null;if(!t)return null;const m=[{label:"Visualizations",value:Qn.Visualizations},{label:"Library panels",value:Qn.LibraryPanels,description:"Reusable panels you can share between multiple dashboards."}];return(0,B.jsxs)("div",{className:s.openWrapper,children:[(0,B.jsxs)("div",{className:s.formBox,children:[(0,B.jsxs)("div",{className:s.searchRow,children:[(0,B.jsx)(f.Input,{value:n,onChange:e=>r(e.currentTarget.value),onKeyPress:p,prefix:Un||(Un=(0,B.jsx)(f.Icon,{name:"search"})),suffix:g,ref:l,placeholder:"Search for..."}),(0,B.jsx)(f.Button,{title:"Close",variant:"secondary",icon:"angle-up",className:s.closeButton,"aria-label":h.wl.components.PanelEditor.toggleVizPicker,onClick:()=>{a((0,Kt.g_)(!1))}})]}),(0,B.jsx)(An.g,{className:s.customFieldMargin,children:(0,B.jsx)(f.RadioButtonGroup,{options:m,value:i,onChange:o,fullWidth:!0})})]}),(0,B.jsx)("div",{className:s.scrollWrapper,children:(0,B.jsx)(f.CustomScrollbar,{autoHeightMin:"100%",children:(0,B.jsxs)("div",{className:s.scrollContent,children:[i===Qn.Visualizations&&(0,B.jsx)(_n.G5,{current:t.meta,onTypeChange:c,searchQuery:n,onClose:()=>{}}),i===Qn.LibraryPanels&&(0,B.jsx)(Gn,{searchQuery:n,panel:e},"Panel Library")]})})})]})};var Qn;!function(e){e[e.Visualizations=0]="Visualizations",e[e.LibraryPanels=1]="LibraryPanels"}(Qn||(Qn={})),qn.displayName="VisualizationSelectPane";const Zn=e=>({icon:M.css`
      color: ${e.palette.gray33};
    `,wrapper:M.css`
      display: flex;
      flex-direction: column;
      flex: 1 1 0;
      height: 100%;
    `,vizButton:M.css`
      text-align: left;
    `,scrollWrapper:M.css`
      flex-grow: 1;
      min-height: 0;
    `,scrollContent:M.css`
      padding: ${e.spacing.sm};
    `,openWrapper:M.css`
      display: flex;
      flex-direction: column;
      flex: 1 1 100%;
      height: 100%;
      background: ${e.colors.bg1};
      border: 1px solid ${e.colors.border1};
    `,searchRow:M.css`
      display: flex;
      margin-bottom: ${e.spacing.sm};
    `,closeButton:M.css`
      margin-left: ${e.spacing.sm};
    `,customFieldMargin:M.css`
      margin-bottom: ${e.spacing.sm};
    `,formBox:M.css`
      padding: ${e.spacing.sm};
      padding-bottom: 0;
    `}),Jn=(e,t,n)=>{const r=(0,d.useRef)(),[i,o]=(0,d.useState)();return(0,d.useEffect)((()=>{let i=-1,a=0;return r.current=e.getQueryRunner().getData(t).subscribe({next:e=>{if(n){var t;if(i===e.structureRev){const e=Date.now();if(e-a<1e4)return;a=e}i=null!==(t=e.structureRev)&&void 0!==t?t:-1}o(e)}}),()=>{r.current&&r.current.unsubscribe()}}),[e,t.withFieldConfig,t.withTransforms]),{data:i,error:i&&i.error,isLoading:!i||i.state===se.LoadingState.Loading,hasSeries:!!i&&!!i.series}},Yn=({plugin:e,panel:t,width:n,onFieldConfigsChange:r,onPanelOptionsChanged:i,onPanelConfigChange:o,dashboard:a})=>{const s=(0,f.useStyles)(Xn),l=(0,u.useSelector)((e=>e.panelEditor.isVizPickerOpen)),{data:d}=Jn(t,{withTransforms:!0,withFieldConfig:!1},!0);return(0,B.jsxs)("div",{className:s.wrapper,"aria-label":h.wl.components.PanelEditor.OptionsPane.content,children:[!l&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{className:s.vizButtonWrapper,children:(0,B.jsx)(nn,{panel:t})}),(0,B.jsx)("div",{className:s.optionsWrapper,children:(0,B.jsx)(Wn,{panel:t,dashboard:a,plugin:e,data:d,onFieldConfigsChange:r,onPanelOptionsChanged:i,onPanelConfigChange:o})})]}),l&&(0,B.jsx)(qn,{panel:t})]})},Xn=e=>({wrapper:M.css`
      height: 100%;
      width: 100%;
      display: flex;
      flex: 1 1 0;
      flex-direction: column;
      padding: 0;
    `,optionsWrapper:M.css`
      flex-grow: 1;
      min-height: 0;
    `,vizButtonWrapper:M.css`
      padding: 0 ${e.spacing.md} ${e.spacing.md} 0;
    `,legacyOptions:M.css`
      label: legacy-options;
      .panel-options-grid {
        display: flex;
        flex-direction: column;
      }
      .panel-options-group {
        margin-bottom: 0;
      }
      .panel-options-group__body {
        padding: ${e.spacing.md} 0;
      }

      .section {
        display: block;
        margin: ${e.spacing.md} 0;

        &:first-child {
          margin-top: 0;
        }
      }
    `});var Kn,er=n("./public/app/features/variables/types.ts"),tr=n("./public/app/features/variables/adapters.ts");const nr=e=>{const t=(0,d.useMemo)((()=>tr.z.get(e.variable.type).picker),[e.variable]);return e.variable?(0,B.jsxs)("div",{className:"gf-form",children:[(0,B.jsx)(rr,{variable:e.variable}),e.variable.hide!==er.bU.hideVariable&&t&&(0,B.jsx)(t,{variable:e.variable})]}):Kn||(Kn=(0,B.jsx)("div",{children:"Couldn't load variable"}))};function rr({variable:e}){const t=(0,d.useMemo)((()=>e.label||e.name),[e]);return e.hide!==er.bU.dontHide?null:e.description?(0,B.jsx)(f.Tooltip,{content:e.description,placement:"bottom",children:(0,B.jsx)("label",{className:"gf-form-label gf-form-label--variable","data-testid":h.wl.pages.Dashboard.SubMenu.submenuItemLabels(t),htmlFor:e.id,children:t})}):(0,B.jsx)("label",{className:"gf-form-label gf-form-label--variable","data-testid":h.wl.pages.Dashboard.SubMenu.submenuItemLabels(t),htmlFor:e.id,children:t})}const ir=({variables:e})=>{const[t,n]=(0,d.useState)([]);return(0,d.useEffect)((()=>{n(e.filter((e=>e.hide!==er.bU.hideVariable)))}),[e]),0===t.length?null:(0,B.jsx)(B.Fragment,{children:t.map((e=>(0,B.jsx)("div",{className:"submenu-item gf-form-inline","data-testid":h.wl.pages.Dashboard.SubMenu.submenuItem,children:(0,B.jsx)(nr,{variable:e})},e.id)))})};var or=n("./node_modules/prop-types/index.js"),ar=n.n(or),sr=n("./node_modules/react-style-proptype/src/index.js"),lr=n.n(sr),dr=n("./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js");function cr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ur(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pr(e,t,n){return t&&ur(e.prototype,t),n&&ur(e,n),e}function hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){hr(e,t,n[t])}))}return e}function gr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&br(e,t)}function mr(e){return(mr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function br(e,t){return(br=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vr(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?yr(e):t}var xr=function(e){function t(){return cr(this,t),vr(this,mr(t).apply(this,arguments))}return gr(t,e),pr(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.split,i=e.style,o=e.size,a=e.eleRef,s=["Pane",r,n],l={flex:1,position:"relative",outline:"none"};return void 0!==o&&("vertical"===r?l.width=o:(l.height=o,l.display="flex"),l.flex="none"),l=Object.assign({},l,i||{}),d.createElement("div",{ref:a,className:s.join(" "),style:l},t)}}]),t}(d.PureComponent);xr.propTypes={className:ar().string.isRequired,children:ar().node.isRequired,size:ar().oneOfType([ar().string,ar().number]),split:ar().oneOf(["vertical","horizontal"]),style:lr(),eleRef:ar().func},xr.defaultProps={};var Sr="Resizer",Mr=function(e){function t(){return cr(this,t),vr(this,mr(t).apply(this,arguments))}return gr(t,e),pr(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.onClick,r=e.onDoubleClick,i=e.onMouseDown,o=e.onTouchEnd,a=e.onTouchStart,s=e.resizerClassName,l=e.split,c=e.style,u=[s,l,t];return d.createElement("span",{role:"presentation",className:u.join(" "),style:c,onMouseDown:function(e){return i(e)},onTouchStart:function(e){e.preventDefault(),a(e)},onTouchEnd:function(e){e.preventDefault(),o(e)},onClick:function(e){n&&(e.preventDefault(),n(e))},onDoubleClick:function(e){r&&(e.preventDefault(),r(e))}})}}]),t}(d.Component);function Or(e,t){if(e.selection)e.selection.empty();else try{t.getSelection().removeAllRanges()}catch(e){}}function kr(e,t,n,r){if("number"==typeof r){var i="number"==typeof t?t:0,o="number"==typeof n&&n>=0?n:1/0;return Math.max(i,Math.min(o,r))}return void 0!==e?e:t}Mr.propTypes={className:ar().string.isRequired,onClick:ar().func,onDoubleClick:ar().func,onMouseDown:ar().func.isRequired,onTouchStart:ar().func.isRequired,onTouchEnd:ar().func.isRequired,split:ar().oneOf(["vertical","horizontal"]),style:lr(),resizerClassName:ar().string.isRequired},Mr.defaultProps={resizerClassName:Sr};var jr=function(e){function t(e){var n;cr(this,t),(n=vr(this,mr(t).call(this,e))).onMouseDown=n.onMouseDown.bind(yr(yr(n))),n.onTouchStart=n.onTouchStart.bind(yr(yr(n))),n.onMouseMove=n.onMouseMove.bind(yr(yr(n))),n.onTouchMove=n.onTouchMove.bind(yr(yr(n))),n.onMouseUp=n.onMouseUp.bind(yr(yr(n)));var r=e.size,i=e.defaultSize,o=e.minSize,a=e.maxSize,s=e.primary,l=void 0!==r?r:kr(i,o,a,null);return n.state={active:!1,resized:!1,pane1Size:"first"===s?l:void 0,pane2Size:"second"===s?l:void 0,instanceProps:{size:r}},n}return gr(t,e),pr(t,[{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),this.setState(t.getSizeUpdate(this.props,this.state))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove)}},{key:"onMouseDown",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchStart(t)}},{key:"onTouchStart",value:function(e){var t=this.props,n=t.allowResize,r=t.onDragStarted,i=t.split;if(n){Or(document,window);var o="vertical"===i?e.touches[0].clientX:e.touches[0].clientY;"function"==typeof r&&r(),this.setState({active:!0,position:o})}}},{key:"onMouseMove",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchMove(t)}},{key:"onTouchMove",value:function(e){var t=this.props,n=t.allowResize,r=t.maxSize,i=t.minSize,o=t.onChange,a=t.split,s=t.step,l=this.state,d=l.active,c=l.position;if(n&&d){Or(document,window);var u="first"===this.props.primary,p=u?this.pane1:this.pane2,h=u?this.pane2:this.pane1;if(p){var f=p,g=h;if(f.getBoundingClientRect){var m=f.getBoundingClientRect().width,b=f.getBoundingClientRect().height,y="vertical"===a?m:b,v=c-("vertical"===a?e.touches[0].clientX:e.touches[0].clientY);if(s){if(Math.abs(v)<s)return;v=~~(v/s)*s}var x=u?v:-v;parseInt(window.getComputedStyle(f).order)>parseInt(window.getComputedStyle(g).order)&&(x=-x);var S=r;if(void 0!==r&&r<=0){var M=this.splitPane;S="vertical"===a?M.getBoundingClientRect().width+r:M.getBoundingClientRect().height+r}var O=y-x,k=c-v;O<i?O=i:void 0!==r&&O>S?O=S:this.setState({position:k,resized:!0}),o&&o(O),this.setState(hr({draggedSize:O},u?"pane1Size":"pane2Size",O))}}}}},{key:"onMouseUp",value:function(){var e=this.props,t=e.allowResize,n=e.onDragFinished,r=this.state,i=r.active,o=r.draggedSize;t&&i&&("function"==typeof n&&n(o),this.setState({active:!1}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.allowResize,r=t.children,i=t.className,o=t.onResizerClick,a=t.onResizerDoubleClick,s=t.paneClassName,l=t.pane1ClassName,c=t.pane2ClassName,u=t.paneStyle,p=t.pane1Style,h=t.pane2Style,f=t.resizerClassName,g=t.resizerStyle,m=t.split,b=t.style,y=this.state,v=y.pane1Size,x=y.pane2Size,S=n?"":"disabled",M=f?"".concat(f," ").concat(Sr):f,O=function(e){return d.Children.toArray(e).filter((function(e){return e}))}(r),k=fr({display:"flex",flex:1,height:"100%",position:"absolute",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"},b);"vertical"===m?Object.assign(k,{flexDirection:"row",left:0,right:0}):Object.assign(k,{bottom:0,flexDirection:"column",minHeight:"100%",top:0,width:"100%"});var j=["SplitPane",i,m,S],w=fr({},u,p),C=fr({},u,h),P=["Pane1",s,l].join(" "),z=["Pane2",s,c].join(" ");return d.createElement("div",{className:j.join(" "),ref:function(t){e.splitPane=t},style:k},d.createElement(xr,{className:P,key:"pane1",eleRef:function(t){e.pane1=t},size:v,split:m,style:w},O[0]),d.createElement(Mr,{className:S,onClick:o,onDoubleClick:a,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,key:"resizer",resizerClassName:M,split:m,style:g||{}}),d.createElement(xr,{className:z,key:"pane2",eleRef:function(t){e.pane2=t},size:x,split:m,style:C},O[1]))}}],[{key:"getDerivedStateFromProps",value:function(e,n){return t.getSizeUpdate(e,n)}},{key:"getSizeUpdate",value:function(e,t){var n={};if(t.instanceProps.size===e.size&&void 0!==e.size)return{};var r=void 0!==e.size?e.size:kr(e.defaultSize,e.minSize,e.maxSize,t.draggedSize);void 0!==e.size&&(n.draggedSize=r);var i="first"===e.primary;return n[i?"pane1Size":"pane2Size"]=r,n[i?"pane2Size":"pane1Size"]=void 0,n.instanceProps={size:e.size},n}}]),t}(d.Component);jr.propTypes={allowResize:ar().bool,children:ar().arrayOf(ar().node).isRequired,className:ar().string,primary:ar().oneOf(["first","second"]),minSize:ar().oneOfType([ar().string,ar().number]),maxSize:ar().oneOfType([ar().string,ar().number]),defaultSize:ar().oneOfType([ar().string,ar().number]),size:ar().oneOfType([ar().string,ar().number]),split:ar().oneOf(["vertical","horizontal"]),onDragStarted:ar().func,onDragFinished:ar().func,onChange:ar().func,onResizerClick:ar().func,onResizerDoubleClick:ar().func,style:lr(),resizerStyle:lr(),paneClassName:ar().string,pane1ClassName:ar().string,pane2ClassName:ar().string,paneStyle:lr(),pane1Style:lr(),pane2Style:lr(),resizerClassName:ar().string,step:ar().number},jr.defaultProps={allowResize:!0,minSize:50,primary:"first",split:"vertical",paneClassName:"",pane1ClassName:"",pane2ClassName:""},(0,dr.polyfill)(jr);const wr=jr;function Cr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pr;!function(e){e[e.Right=0]="Right",e[e.Top=1]="Top"}(Pr||(Pr={}));class zr extends d.PureComponent{constructor(...e){super(...e),Cr(this,"rafToken",(0,d.createRef)()),Cr(this,"updateSplitPaneSize",(()=>{void 0!==this.rafToken.current&&window.cancelAnimationFrame(this.rafToken.current),this.rafToken.current=window.requestAnimationFrame((()=>{this.forceUpdate()}))})),Cr(this,"onDragFinished",((e,t)=>{if(document.body.style.cursor="auto",!t)return;const{updateUiState:n}=this.props;e===Pr.Top?n({topPaneSize:t/window.innerHeight}):n({rightPaneSize:t/window.innerWidth})})),Cr(this,"onDragStarted",(()=>{document.body.style.cursor="row-resize"}))}componentDidMount(){window.addEventListener("resize",this.updateSplitPaneSize)}componentWillUnmount(){window.removeEventListener("resize",this.updateSplitPaneSize)}renderHorizontalSplit(){const{leftPaneComponents:e,uiState:t}=this.props,n=Rr(w.vc.theme),r=t.topPaneSize>=1?t.topPaneSize:t.topPaneSize*window.innerHeight;return Array.isArray(e)?(0,B.jsx)(wr,{split:"horizontal",maxSize:-200,primary:"first",size:r,pane2Style:{minHeight:0},resizerClassName:n.resizerH,onDragStarted:this.onDragStarted,onDragFinished:e=>this.onDragFinished(Pr.Top,e),children:e}):e}render(){const{rightPaneVisible:e,rightPaneComponents:t,uiState:n}=this.props,r=Rr(w.vc.theme),i=n.rightPaneSize<=1?n.rightPaneSize*window.innerWidth:n.rightPaneSize;return e?(0,B.jsxs)(wr,{split:"vertical",maxSize:-300,size:i,primary:"second",resizerClassName:r.resizerV,onDragStarted:()=>document.body.style.cursor="col-resize",onDragFinished:e=>this.onDragFinished(Pr.Right,e),children:[this.renderHorizontalSplit(),t]}):this.renderHorizontalSplit()}}Cr(zr,"defaultProps",{rightPaneVisible:!0});const Rr=(0,f.stylesFactory)((e=>{const t=e.palette.blue95,n=e.spacing.md,r=M.css`
    font-style: italic;
    background: transparent;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-color: transparent;
    border-style: solid;
    transition: 0.2s border-color ease-in-out;

    &:hover {
      border-color: ${t};
    }
  `;return{resizerV:(0,M.cx)(r,M.css`
        cursor: col-resize;
        width: ${n};
        border-right-width: 1px;
        margin-top: 18px;
      `),resizerH:(0,M.cx)(r,M.css`
        height: ${n};
        cursor: row-resize;
        position: relative;
        top: 0px;
        z-index: 1;
        border-top-width: 1px;
        margin-left: ${n};
      `)}}));var Tr=n("./public/app/features/dashboard/components/SaveDashboard/SaveDashboardModalProxy.tsx");function Br(){return async(e,t)=>{const{getPanel:n}=t().panelEditor;n().configRev=0,e((0,Kt.yi)(!0))}}function Wr(e,t){var n;return(null===(n=t.libraryPanel)||void 0===n?void 0:n.uid)!==e.libraryPanel.uid||(!(!t.id||t.id!==e.editSourceId)||!!t.repeatPanelId)}function Dr(){return async(e,t)=>{const n=t().dashboard.getModel(),{getPanel:r,getSourcePanel:i,shouldDiscardChanges:o}=t().panelEditor;if(!o){const t=r(),o=t.getSaveModel(),a=i(),s=a.type!==t.type;e(function(e,t){return n=>{var r;if(void 0===(null===(r=e.libraryPanel)||void 0===r?void 0:r.uid)||!t)return;const i=e.getSaveModel();for(const r of t.panels){var o,a;if(Wr(e,r))continue;r.restoreModel(Object.assign({},i,(0,O.pick)(r,"gridPos","id")));const t=(null===(o=r.plugin)||void 0===o?void 0:o.meta.id)!==(null===(a=e.plugin)||void 0===a?void 0:a.meta.id);r.plugin=e.plugin,r.configRev++,t&&n((0,P.bc)({panelId:r.id,plugin:r.plugin})),setTimeout((()=>{r.getQueryRunner().useLastResultFrom(e.getQueryRunner())}),20)}e.repeat&&setTimeout((()=>t.processRepeats()),20)}}(t,n)),o.id=a.id,a.restoreModel(o),a.configRev++,a.plugin=t.plugin,s&&await e((0,P.bc)({panelId:a.id,plugin:t.plugin})),setTimeout((()=>{a.getQueryRunner().useLastResultFrom(t.getQueryRunner()),a.render()}),20)}n&&n.exitPanelEditor(),e((0,Kt.my)()),e((0,P.Lv)())}}var Ir=n("./public/app/features/profile/state/reducers.ts");const Er=(0,n("./node_modules/memoize-one/dist/memoize-one.esm.js").default)(((e,t)=>{var n;const r=[];if(!t)return r;let i=Oe.Ip.Visualize;if(t.meta.skipDataQuery)return[];t.meta.skipDataQuery||(i=Oe.Ip.Query,r.push({id:Oe.Ip.Query,text:"Query",icon:"database",active:!1}),r.push({id:Oe.Ip.Transform,text:"Transform",icon:"process",active:!1})),((0,w.iE)().alertingEnabled&&"graph"===t.meta.id||"timeseries"===t.meta.id)&&r.push({id:Oe.Ip.Alert,text:"Alert",icon:"bell",active:!1});return(null!==(n=r.find((t=>t.id===(e||i))))&&void 0!==n?n:r[0]).active=!0,r}));var _r,Ar,Fr,Lr=n("./public/app/features/library-panels/components/UnlinkModal/UnlinkModal.tsx"),Nr=n("./node_modules/react-use/esm/useDebounce.js"),Hr=n("./public/app/features/library-panels/utils/usePanelSave.ts"),$r=n("./public/app/features/library-panels/state/api.ts"),Gr=n("./public/app/features/library-panels/styles.ts");const Vr=({panel:e,folderId:t,isUnsavedPrompt:n,onDismiss:r,onConfirm:i,onDiscard:o})=>{const[a,s]=(0,d.useState)(""),l=(0,Tt.Z)((async()=>{const t=await(0,$r.E8)(e.libraryPanel.uid);return t.length>0?t.map((e=>e.title)):[]}),[e.libraryPanel.uid]),[c,u]=(0,d.useState)([]);(0,Nr.Z)((()=>l.value?u(l.value.filter((e=>e.toLowerCase().includes(a.toLowerCase())))):u([])),300,[l.value,a]);const{saveLibraryPanel:p}=(0,Hr.E)(),h=(0,f.useStyles)(Gr.J),g=(0,d.useCallback)((()=>{o()}),[o]),m=n?"Unsaved library panel changes":"Save library panel";return(0,B.jsx)(f.Modal,{title:m,icon:"save",onDismiss:r,isOpen:!0,children:(0,B.jsxs)("div",{children:[(0,B.jsxs)("p",{className:h.textInfo,children:["This update will affect ",(0,B.jsxs)("strong",{children:[e.libraryPanel.meta.connectedDashboards," ",1===e.libraryPanel.meta.connectedDashboards?"dashboard":"dashboards","."]}),"The following dashboards using the panel will be affected:"]}),(0,B.jsx)(f.Input,{className:h.dashboardSearch,prefix:_r||(_r=(0,B.jsx)(f.Icon,{name:"search"})),placeholder:"Search affected dashboards",value:a,onChange:e=>s(e.currentTarget.value)}),l.loading?Ar||(Ar=(0,B.jsx)("p",{children:"Loading connected dashboards..."})):(0,B.jsxs)("table",{className:h.myTable,children:[Fr||(Fr=(0,B.jsx)("thead",{children:(0,B.jsx)("tr",{children:(0,B.jsx)("th",{children:"Dashboard name"})})})),(0,B.jsx)("tbody",{children:c.map(((e,t)=>(0,B.jsx)("tr",{children:(0,B.jsx)("td",{children:e})},`dashrow-${t}`)))})]}),(0,B.jsxs)(f.Modal.ButtonRow,{children:[(0,B.jsx)(f.Button,{variant:"secondary",onClick:r,fill:"outline",children:"Cancel"}),n&&(0,B.jsx)(f.Button,{variant:"destructive",onClick:g,children:"Discard"}),(0,B.jsx)(f.Button,{onClick:()=>{p(e,t).then((()=>{i()}))},children:"Update all"})]})]})})};var Ur,qr=n("./public/app/core/actions/index.ts"),Qr=n("./public/app/features/panel/PanelRenderer.tsx"),Zr=n("./public/app/features/dashboard/utils/panel.ts"),Jr=n("./public/app/features/dashboard/services/TimeSrv.ts");function Yr({width:e,height:t,panel:n,dashboard:r}){const{data:i}=Jn(n,{withTransforms:!0,withFieldConfig:!1},!1),[o,a]=(0,d.useState)({frameIndex:0,showHeader:!0,showTypeIcons:!0});return(0,d.useEffect)((()=>{const t=(0,Jr.$t)(),i=(0,Zr.W1)(n,t.timeRange()),o=n.events.subscribe(Q.U5,(()=>{n.runAllPanelQueries(r.id,r.getTimezone(),i,e)}));return()=>{o.unsubscribe()}}),[n,r,e]),i?(0,B.jsx)(f.PanelChrome,{width:e,height:t,padding:"none",children:(e,t)=>(0,B.jsx)(Qr.$,{title:"Raw data",pluginId:"table",width:e,height:t,data:i,options:o,onOptionsChange:a})}):null}function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Kr={initPanelEditor:function(e,t){return n=>{const r=t.initEditPanel(e);n((0,Kt.Hl)({panel:r,sourcePanel:e}))}},discardPanelChanges:Br,updatePanelEditorUIState:function(e){return(t,n)=>{const r=Object.assign({},n().panelEditor.ui,e);t((0,Kt.K9)(r));try{C.Z.setObject(Kt.jy,r)}catch(e){console.error(e)}}},updateTimeZoneForSession:Ir.YT,toggleTableView:Kt.OT,notifyApp:qr.$l},ei=(0,u.connect)((e=>{const t=e.panelEditor.getPanel(),{plugin:n}=function(e,t){var n;return t&&null!==(n=e.panels[t])&&void 0!==n?n:{}}(e.dashboard,t.id);return{plugin:n,panel:t,initDone:e.panelEditor.initDone,uiState:e.panelEditor.ui,tableViewEnabled:e.panelEditor.tableViewEnabled,variables:(0,A.ng)(e)}}),Kr);class ti extends d.PureComponent{constructor(...e){super(...e),Xr(this,"eventSubs",void 0),Xr(this,"state",{showSaveLibraryPanelModal:!1}),Xr(this,"triggerForceUpdate",(()=>{this.forceUpdate()})),Xr(this,"onBack",(()=>{p.locationService.partial({editPanel:null,tab:null})})),Xr(this,"onDiscard",(()=>{this.props.discardPanelChanges(),this.onBack()})),Xr(this,"onOpenDashboardSettings",(()=>{p.locationService.partial({editview:"settings"})})),Xr(this,"onSaveDashboard",(()=>{oe.h$.publish(new Q.Dn({component:Tr.D,props:{dashboard:this.props.dashboard}}))})),Xr(this,"onSaveLibraryPanel",(async()=>{if(!(0,zn.V)(this.props.panel))return;const e=await(0,$r.Ef)(this.props.panel.libraryPanel.uid);if(0===e.length||1===e.length&&e.includes(this.props.dashboard.id))try{await(0,R.i6)(this.props.panel,this.props.dashboard.meta.folderId),this.props.notifyApp((0,R.bF)("Library panel saved"))}catch(e){this.props.notifyApp((0,R.rm)(`Error saving library panel: "${e.statusText}"`))}else this.setState({showSaveLibraryPanelModal:!0})})),Xr(this,"onChangeTab",(e=>{p.locationService.partial({tab:e.id})})),Xr(this,"onFieldConfigChange",(e=>{this.props.panel.updateFieldConfig(Object.assign({},e))})),Xr(this,"onPanelOptionsChanged",(e=>{this.props.panel.updateOptions(e)})),Xr(this,"onPanelConfigChanged",((e,t)=>{this.props.panel.setProperty(e,t),this.props.panel.render(),this.forceUpdate()})),Xr(this,"onDisplayModeChange",(e=>{const{updatePanelEditorUIState:t}=this.props;this.props.tableViewEnabled&&this.props.toggleTableView(),t({mode:e})})),Xr(this,"onToggleTableView",(()=>{this.props.toggleTableView()})),Xr(this,"onTogglePanelOptions",(()=>{const{uiState:e,updatePanelEditorUIState:t}=this.props;t({isPanelOptionsVisible:!e.isPanelOptionsVisible})})),Xr(this,"onGoBackToDashboard",(()=>{p.locationService.partial({editPanel:null,tab:null})})),Xr(this,"onConfirmAndDismissLibarayPanelModel",(()=>{this.setState({showSaveLibraryPanelModal:!1})}))}componentDidMount(){this.props.initPanelEditor(this.props.sourcePanel,this.props.dashboard)}componentDidUpdate(){const{panel:e,initDone:t}=this.props;t&&!this.eventSubs&&(this.eventSubs=new X.w0,this.eventSubs.add(e.events.subscribe(Q.Wj,this.triggerForceUpdate)))}componentWillUnmount(){var e;null===(e=this.eventSubs)||void 0===e||e.unsubscribe()}renderPanel(e,t){const{dashboard:n,panel:r,uiState:i,tableViewEnabled:o}=this.props;return(0,B.jsxs)("div",{className:e.mainPaneWrapper,children:[this.renderPanelToolbar(e),(0,B.jsx)("div",{className:e.panelWrapper,children:(0,B.jsx)(S.Z,{children:({width:a,height:s})=>{if(a<3||s<3)return null;if(t&&(s-=2*w.ZP.theme2.spacing.gridSize),o)return(0,B.jsx)(Yr,{width:a,height:s,panel:r,dashboard:n});const l=(0,ae.jF)(i.mode,a,s,r);return(0,B.jsx)("div",{className:e.centeringContainer,style:{width:a,height:s},children:(0,B.jsx)("div",{style:l,"data-panelid":r.editSourceId,children:(0,B.jsx)(Y.l,{dashboard:n,panel:r,isEditing:!0,isViewing:!1,isInView:!0,width:l.width,height:l.height})})})}})})]},"panel")}renderPanelAndEditor(e){const{panel:t,dashboard:n,plugin:r,tab:i}=this.props,o=Er(i,r);return o.length>0?[this.renderPanel(e,!1),(0,B.jsx)("div",{className:e.tabsWrapper,"aria-label":h.wl.components.PanelEditor.DataPane.content,children:(0,B.jsx)(Zt,{panel:t,dashboard:n,tabs:o,onChangeTab:this.onChangeTab})},"panel-editor-tabs")]:this.renderPanel(e,!0)}renderTemplateVariables(e){const{variables:t}=this.props;return t.length?(0,B.jsx)("div",{className:e.variablesWrapper,children:(0,B.jsx)(ir,{variables:t})}):null}renderPanelToolbar(e){const{dashboard:t,uiState:n,variables:r,updateTimeZoneForSession:i,panel:o,tableViewEnabled:a}=this.props;return(0,B.jsx)("div",{className:e.panelToolbar,children:(0,B.jsxs)(f.HorizontalGroup,{justify:r.length>0?"space-between":"flex-end",align:"flex-start",children:[this.renderTemplateVariables(e),(0,B.jsxs)(f.HorizontalGroup,{children:[(0,B.jsx)(f.InlineSwitch,{label:"Table view",showLabel:!0,id:"table-view",value:a,onClick:this.onToggleTableView,"aria-label":h.wl.components.PanelEditor.toggleTableView}),(0,B.jsx)(f.RadioButtonGroup,{value:n.mode,options:Oe.d7,onChange:this.onDisplayModeChange}),(0,B.jsx)(Xt.C,{dashboard:t,onChangeTimeZone:i}),!n.isPanelOptionsVisible&&(0,B.jsx)(nn,{panel:o})]})]})})}renderEditorActions(){let e=[(0,B.jsx)(f.ToolbarButton,{icon:"cog",onClick:this.onOpenDashboardSettings,title:"Open dashboard settings"},"settings"),(0,B.jsx)(f.ToolbarButton,{onClick:this.onDiscard,title:"Undo all changes",children:"Discard"},"discard"),this.props.panel.libraryPanel?(0,B.jsx)(f.ToolbarButton,{onClick:this.onSaveLibraryPanel,variant:"primary",title:"Apply changes and save library panel",children:"Save library panel"},"save-panel"):(0,B.jsx)(f.ToolbarButton,{onClick:this.onSaveDashboard,title:"Apply changes and save dashboard",children:"Save"},"save"),(0,B.jsx)(f.ToolbarButton,{onClick:this.onBack,variant:"primary",title:"Apply changes and go back to dashboard","aria-label":h.wl.components.PanelEditor.applyButton,children:"Apply"},"apply")];return this.props.panel.libraryPanel&&(e.splice(1,0,(0,B.jsx)(f.ModalsController,{children:({showModal:e,hideModal:t})=>(0,B.jsx)(f.ToolbarButton,{onClick:()=>{e(Lr.i,{onConfirm:()=>{delete this.props.panel.libraryPanel,this.props.panel.render(),this.forceUpdate()},onDismiss:t,isOpen:!0})},title:"Disconnects this panel from the library panel so that you can edit it regularly.",children:"Unlink"},"unlink")},"unlink-controller")),e.pop()),e}renderOptionsPane(){const{plugin:e,dashboard:t,panel:n,uiState:r}=this.props,i=r.rightPaneSize<=1?r.rightPaneSize*window.innerWidth:r.rightPaneSize;return e?(0,B.jsx)(Yn,{plugin:e,dashboard:t,panel:n,width:i,onFieldConfigsChange:this.onFieldConfigChange,onPanelOptionsChanged:this.onPanelOptionsChanged,onPanelConfigChange:this.onPanelConfigChanged}):Ur||(Ur=(0,B.jsx)("div",{}))}render(){const{dashboard:e,initDone:t,updatePanelEditorUIState:n,uiState:r}=this.props,i=ri(w.ZP.theme,this.props);return t?(0,B.jsxs)("div",{className:i.wrapper,"aria-label":h.wl.components.PanelEditor.General.content,children:[(0,B.jsx)(f.PageToolbar,{title:`${e.title} / Edit Panel`,onGoBack:this.onGoBackToDashboard,children:this.renderEditorActions()}),(0,B.jsx)("div",{className:i.verticalSplitPanesWrapper,children:(0,B.jsx)(zr,{leftPaneComponents:this.renderPanelAndEditor(i),rightPaneComponents:this.renderOptionsPane(),uiState:r,updateUiState:n,rightPaneVisible:r.isPanelOptionsVisible})}),this.state.showSaveLibraryPanelModal&&(0,B.jsx)(Vr,{panel:this.props.panel,folderId:this.props.dashboard.meta.folderId,onConfirm:this.onConfirmAndDismissLibarayPanelModel,onDiscard:this.onDiscard,onDismiss:this.onConfirmAndDismissLibarayPanelModel})]}):null}}const ni=ei(ti),ri=(0,f.stylesFactory)(((e,t)=>{const{uiState:n}=t,r=e.spacing.md;return{wrapper:M.css`
      width: 100%;
      height: 100%;
      position: fixed;
      z-index: ${e.zIndex.sidemenu};
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: ${e.colors.dashboardBg};
      display: flex;
      flex-direction: column;
    `,verticalSplitPanesWrapper:M.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      position: relative;
    `,mainPaneWrapper:M.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      padding-right: ${n.isPanelOptionsVisible?0:r};
    `,variablesWrapper:M.css`
      label: variablesWrapper;
      display: flex;
      flex-grow: 1;
      flex-wrap: wrap;
    `,panelWrapper:M.css`
      flex: 1 1 0;
      min-height: 0;
      width: 100%;
      padding-left: ${r};
      padding-right: 2px;
    `,tabsWrapper:M.css`
      height: 100%;
      width: 100%;
    `,panelToolbar:M.css`
      display: flex;
      padding: 0 0 ${r} ${r};
      justify-content: space-between;
      flex-wrap: wrap;
    `,toolbarLeft:M.css`
      padding-left: ${e.spacing.sm};
    `,centeringContainer:M.css`
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
    `}}));var ii,oi=n("./public/app/features/dashboard/state/initDashboard.ts"),ai=n("./public/app/features/inspector/styles.ts");const si=({data:e,metadataDatasource:t})=>{var n;return t&&null!==(n=t.components)&&void 0!==n&&n.MetadataInspector?(0,B.jsx)(t.components.MetadataInspector,{datasource:t,data:e.series}):ii||(ii=(0,B.jsx)("div",{children:"No Metadata Inspector"}))},li=({tab:e,tabs:t,onSelectTab:n,data:r})=>{const i=(0,f.useTheme)(),o=di(i);return(0,B.jsxs)(B.Fragment,{children:[r&&(0,B.jsx)("div",{className:"muted",children:ci(r)}),(0,B.jsx)(f.TabsBar,{className:o.tabsBar,children:t.map(((t,r)=>(0,B.jsx)(f.Tab,{label:t.label,active:t.value===e,onChangeTab:()=>n(t)},`${t.value}-${r}`)))})]})},di=(0,f.stylesFactory)((e=>({tabsBar:M.css`
      padding-left: ${e.spacing.md};
      margin: ${e.spacing.lg} -${e.spacing.sm} -${e.spacing.lg} -${e.spacing.lg};
    `})));function ci(e){const{request:t}=e;if(!t)return"";const n=t.targets.length,r=t.endTime?t.endTime-t.startTime:0;return`${n} queries with total query time of ${(0,se.formattedValueToString)((0,se.getValueFormat)("ms")(r))}`}var ui,pi,hi=n("./public/app/features/inspector/InspectJSONTab.tsx"),fi=n("./public/app/features/inspector/QueryInspector.tsx"),gi=n("./public/app/features/inspector/InspectStatsTab.tsx"),mi=n("./public/app/features/inspector/InspectErrorTab.tsx"),bi=n("./public/app/features/inspector/InspectDataTab.tsx"),yi=n("./public/app/features/inspector/types.ts");const vi=({panel:e,data:t})=>{const n=window.grafanaPanelInspectActionSupplier;if(!n)return ui||(ui=(0,B.jsx)("div",{children:"Missing actions"}));const r=n.getActions(e);return null!=r&&r.length?(0,B.jsx)("div",{children:r.map(((n,r)=>(0,B.jsxs)("div",{children:[(0,B.jsx)("h2",{children:n.title}),(0,B.jsx)("span",{children:n.description}),(0,B.jsx)(n.component,{panel:e,data:t})]},r)))}):pi||(pi=(0,B.jsx)("div",{children:"No actions avaliable"}))},xi=({panel:e,plugin:t,dashboard:n,tabs:r,data:i,isDataLoading:o,dataOptions:a,metadataDatasource:s,defaultTab:l,onDataOptionsChange:c,onClose:u})=>{const[h,g]=(0,d.useState)(null!=l?l:yi.q.Data);if(!t)return null;const m=(0,ai.S)(),b=null==i?void 0:i.error;let y=h;r.find((e=>e.value===h))||(y=yi.q.JSON);const v=(0,p.getTemplateSrv)().replace(e.title,e.scopedVars,"text");return(0,B.jsxs)(f.Drawer,{title:`Inspect: ${v||"Panel"}`,subtitle:(0,B.jsx)(li,{tabs:r,tab:y,data:i,onSelectTab:e=>g(e.value||yi.q.Data)}),width:"50%",onClose:u,expandable:!0,children:[y===yi.q.Data&&(0,B.jsx)(bi.E,{panel:e,data:i&&i.series,isLoading:o,options:a,onOptionsChange:c}),(0,B.jsx)(f.CustomScrollbar,{autoHeightMin:"100%",children:(0,B.jsxs)(f.TabContent,{className:m.tabContent,children:[i&&y===yi.q.Meta&&(0,B.jsx)(si,{data:i,metadataDatasource:s}),y===yi.q.JSON&&(0,B.jsx)(hi.W,{panel:e,dashboard:n,data:i,onClose:u}),y===yi.q.Error&&(0,B.jsx)(mi.l,{error:b}),i&&y===yi.q.Stats&&(0,B.jsx)(gi.f,{data:i,timeZone:n.getTimezone()}),i&&y===yi.q.Query&&(0,B.jsx)(fi.D,{panel:e,data:i.series,onRefreshQuery:()=>e.refresh()}),y===yi.q.Actions&&(0,B.jsx)(vi,{panel:e,data:i})]})})]})};var Si=n("./node_modules/react-use/lib/useAsync.js");const Mi=(0,u.connect)(((e,t)=>{const n=e.dashboard.panels[t.panel.id];return n?{plugin:n.plugin}:{plugin:null}}))((({panel:e,dashboard:t,plugin:n})=>{const[r,i]=(0,d.useState)({withTransforms:!1,withFieldConfig:!0}),o=(0,Rt.TH)(),{data:a,isLoading:s,error:l}=Jn(e,r,!0),c=(e=>(0,Si.Z)((async()=>{var t;const n=(null==e||null===(t=e.request)||void 0===t?void 0:t.targets)||[];if(e&&e.series&&n.length)for(const t of e.series)if(t.meta&&t.meta.custom){var r;const e=await(0,p.getDataSourceSrv)().get(n[0].datasource);if(e&&null!==(r=e.components)&&void 0!==r&&r.MetadataInspector)return e}}),[e]).value)(a),u=((e,t,n,r,i)=>(0,d.useMemo)((()=>{const o=[];(0,ae.sY)(n)&&(o.push({label:"Data",value:yi.q.Data}),o.push({label:"Stats",value:yi.q.Stats})),i&&o.push({label:"Meta Data",value:yi.q.Meta}),o.push({label:"JSON",value:yi.q.JSON}),r&&r.message&&o.push({label:"Error",value:yi.q.Error});const a=window.grafanaPanelInspectActionSupplier;return a&&a.getActions(e)&&o.push({label:"Actions",value:yi.q.Actions}),t.meta.canEdit&&(0,ae.sY)(n)&&o.push({label:"Query",value:yi.q.Query}),o}),[e,n,i,t,r]))(e,t,n,l,c),h=new URLSearchParams(o.search).get("inspectTab");return n?(0,B.jsx)(xi,{dashboard:t,panel:e,plugin:n,defaultTab:h,tabs:u,data:a,isDataLoading:s,dataOptions:r,onDataOptionsChange:i,metadataDatasource:c,onClose:()=>{p.locationService.partial({inspect:null,inspectTab:null})}}):null}));var Oi=n("./packages/grafana-data/src/text/sanitize.ts");const ki=["link","children"];const ji=e=>{const{link:t,linkInfo:n}=e,r=(0,d.useRef)(null),[i,o]=(0,d.useState)("invisible"),[a,s]=(0,d.useState)(0),l=Ci(e,a),c=(0,f.useStyles2)((e=>M.css`
        color: ${e.colors.text.primary};
      `));return(0,d.useLayoutEffect)((()=>{o(function(e){if(!e)return"invisible";const t=e.parentElement.getBoundingClientRect(),n=e.getBoundingClientRect();if(0===n.width)return"invisible";return t.left+n.width+10>window.innerWidth?"pull-left":"pull-right"}(r.current))}),[l]),t.asDropdown?(0,B.jsx)(wi,{link:t,"data-testid":h.wl.components.DashboardLinks.dropDown,children:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(f.ToolbarButton,{onClick:()=>s(Date.now()),className:(0,M.cx)("gf-form-label gf-form-label--dashlink",c),"data-placement":"bottom","data-toggle":"dropdown","aria-expanded":!!a,"aria-controls":"dropdown-list","aria-haspopup":"menu",children:[(0,B.jsx)(f.Icon,{"aria-hidden":!0,name:"bars",style:{marginRight:"4px"}}),(0,B.jsx)("span",{children:n.title})]}),(0,B.jsx)("ul",{id:"dropdown-list",className:`dropdown-menu ${i}`,role:"menu",ref:r,children:l.length>0&&l.map(((e,n)=>(0,B.jsx)("li",{role:"none",children:(0,B.jsx)("a",{role:"menuitem",href:e.url,target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":h.wl.components.DashboardLinks.link,"aria-label":`${e.title} dashboard`,children:e.title})},`dashlinks-dropdown-item-${e.id}-${n}`)))})]})},"dashlinks-dropdown"):(0,B.jsx)(B.Fragment,{children:l.length>0&&l.map(((e,n)=>(0,B.jsx)(wi,{link:t,"data-testid":h.wl.components.DashboardLinks.container,children:(0,B.jsxs)("a",{className:"gf-form-label gf-form-label--dashlink",href:e.url,target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":h.wl.components.DashboardLinks.link,"aria-label":`${e.title} dashboard`,children:[(0,B.jsx)(f.Icon,{"aria-hidden":!0,name:"apps",style:{marginRight:"4px"}}),(0,B.jsx)("span",{children:e.title})]})},`dashlinks-list-item-${e.id}-${n}`)))})},wi=e=>{const{link:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,ki);return(0,B.jsxs)("div",Object.assign({},r,{className:"gf-form",children:[t.tooltip&&(0,B.jsx)(f.Tooltip,{content:t.tooltip,children:n}),!t.tooltip&&(0,B.jsx)(B.Fragment,{children:n})]}))},Ci=({link:e,dashboardId:t},n)=>{const{tags:r}=e,i=(0,Tt.Z)((()=>async function(e,t={getBackendSrv:Ge.i}){const n=100;return await t.getBackendSrv().search({tag:e,limit:n})}(r)),[r,n]);return i.value?function(e,t,n,r={getLinkSrv:on.Bq,sanitize:Oi.Nw,sanitizeUrl:Oi.Nm}){return n.filter((t=>t.id!==e)).map((e=>{const n=e.id,i=r.sanitize(e.title),o=r.getLinkSrv().getLinkUrl(Object.assign({},t,{url:e.url}));return{id:n,title:i,url:r.sanitizeUrl(o)}}))}(t,e,i.value):[]};var Pi=n("./public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx"),zi=n("./node_modules/react-use/esm/useEffectOnce.js");const Ri=({dashboard:e,links:t})=>{const n=(0,f.useForceUpdate)();return(0,zi.Z)((()=>{const t=e.events.subscribe(Q.md,n);return()=>t.unsubscribe()})),t.length?(0,B.jsx)(B.Fragment,{children:t.map(((t,n)=>{const r=(0,on.Bq)().getAnchorInfo(t),i=`${t.title}-$${n}`;if("dashboards"===t.type)return(0,B.jsx)(ji,{link:t,linkInfo:r,dashboardId:e.id},i);const o=(0,B.jsxs)("a",{className:"gf-form-label gf-form-label--dashlink",href:(0,Oi.Nm)(r.href),target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":h.wl.components.DashboardLinks.link,children:[(0,B.jsx)(f.Icon,{"aria-hidden":!0,name:Pi.xy[t.icon],style:{marginRight:"4px"}}),(0,B.jsx)("span",{children:r.title})]});return(0,B.jsx)("div",{className:"gf-form","data-testid":h.wl.components.DashboardLinks.container,children:t.tooltip?(0,B.jsx)(f.Tooltip,{content:r.tooltip,children:o}):o},i)}))}):null};var Ti=n("./public/app/features/query/state/DashboardQueryRunner/DashboardQueryRunner.ts"),Bi=n("./packages/grafana-ui/src/components/PanelChrome/LoadingIndicator.tsx");const Wi=({annotation:e,events:t,onEnabledChanged:n})=>{const[r,i]=(0,d.useState)(!1),o=(0,f.useStyles2)(Di);return(0,d.useEffect)((()=>{const n=t.getStream(Q.z).subscribe({next:t=>{t.payload===e&&i(!0)}}),r=t.getStream(Q.RB).subscribe({next:t=>{t.payload===e&&i(!1)}});return()=>{n.unsubscribe(),r.unsubscribe()}})),(0,B.jsx)("div",{className:o.annotation,children:(0,B.jsx)(f.InlineField,{label:e.name,disabled:r,children:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(f.InlineSwitch,{value:e.enable,onChange:()=>n(e),disabled:r}),(0,B.jsx)("div",{className:o.indicator,children:(0,B.jsx)(Bi.T,{loading:r,onCancel:()=>(0,Ti.kt)().cancel(e)})})]})})},e.name)};function Di(e){return{annotation:M.css`
      display: inline-block;
      margin-right: ${e.spacing(1)};

      .fa-caret-down {
        font-size: 75%;
        padding-left: ${e.spacing(1)};
      }

      .gf-form-inline .gf-form {
        margin-bottom: 0;
      }
    `,indicator:M.css`
      align-self: center;
      padding: 0 ${e.spacing(.5)};
    `}}const Ii=({annotations:e,onAnnotationChanged:t,events:n})=>{const[r,i]=(0,d.useState)([]);return(0,d.useEffect)((()=>{i(e.filter((e=>!0!==e.hide)))}),[e]),0===r.length?null:(0,B.jsx)(B.Fragment,{children:r.map((e=>(0,B.jsx)(Wi,{events:n,annotation:e,onEnabledChanged:t},e.name)))})};var Ei,_i;class Ai extends d.PureComponent{constructor(...e){var t,n,r;super(...e),r=e=>{for(let t=0;t<this.props.dashboard.annotations.list.length;t++){const n=this.props.dashboard.annotations.list[t];if(n.name===e.name){n.enable=!n.enable;break}}this.props.dashboard.startRefresh(),this.forceUpdate()},(n="onAnnotationStateChanged")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}render(){const{dashboard:e,variables:t,links:n,annotations:r}=this.props;return e.isSubMenuVisible()?(0,B.jsxs)("div",{className:"submenu-controls",children:[(0,B.jsx)("form",{"aria-label":"Template variables",className:Fi,children:(0,B.jsx)(ir,{variables:t})}),(0,B.jsx)(Ii,{annotations:r,onAnnotationChanged:this.onAnnotationStateChanged,events:e.events}),Ei||(Ei=(0,B.jsx)("div",{className:"gf-form gf-form--grow"})),e&&(0,B.jsx)(Ri,{dashboard:e,links:n}),_i||(_i=(0,B.jsx)("div",{className:"clearfix"}))]}):null}}const Fi=M.css`
  display: flex;
  flex-wrap: wrap;
  display: contents;
`,Li=(0,u.connect)((e=>({variables:(0,A.IV)(e.templating.variables)})))(Ai);Li.displayName="SubMenu";var Ni,Hi=n("./public/app/features/variables/state/actions.ts"),$i=n("./public/app/features/variables/utils.ts"),Gi=n("./public/app/features/live/dashboard/dashboardWatcher.ts"),Vi=n("./public/app/core/navigation/kiosk.ts");const Ui=({initPhase:e})=>{const t=(0,f.useStyles)(qi);return(0,B.jsx)("div",{className:t.dashboardLoading,children:(0,B.jsx)("div",{className:t.dashboardLoadingText,children:(0,B.jsxs)(f.VerticalGroup,{spacing:"md",children:[(0,B.jsxs)(f.HorizontalGroup,{align:"center",justify:"center",spacing:"xs",children:[Ni||(Ni=(0,B.jsx)(f.Spinner,{inline:!0}))," ",e]})," ",(0,B.jsx)(f.HorizontalGroup,{align:"center",justify:"center",children:(0,B.jsx)(f.Button,{variant:"secondary",size:"md",icon:"repeat",onClick:()=>{p.locationService.push("/")},children:"Cancel loading dashboard"})})]})})})},qi=e=>({dashboardLoading:c.css`
      height: 60vh;
      display: flex;
      align-items: center;
      justify-content: center;
    `,dashboardLoadingText:c.css`
      font-size: ${e.typography.size.lg};
    `});var Qi=n("./public/app/core/utils/errors.ts");const Zi=({initError:e})=>{const t=(0,f.useStyles)(Ji);return e?(0,B.jsx)("div",{className:t.dashboardLoading,children:(0,B.jsx)(f.Alert,{severity:Ce.F1.Error,title:e.message,children:(0,Qi.i)(e.error)})}):null},Ji=e=>({dashboardLoading:c.css`
      height: 60vh;
      display: flex;
      align-items: center;
      justify-content: center;
    `});var Yi,Xi=n("./public/app/core/services/context_srv.ts"),Ki=n("./public/app/features/dashboard/state/DashboardModel.ts"),eo=n("./node_modules/angular/index.js"),to=n.n(eo),no=n("./public/app/features/dashboard/components/SaveDashboard/SaveDashboardButton.tsx");const ro=({dashboard:e,onSaveSuccess:t,onDiscard:n,onDismiss:r})=>(0,B.jsxs)(f.Modal,{isOpen:!0,title:"Unsaved changes",onDismiss:r,icon:"exclamation-triangle",className:M.css`
        width: 500px;
      `,children:[Yi||(Yi=(0,B.jsx)("h5",{children:"Do you want to save your changes?"})),(0,B.jsxs)(f.Modal.ButtonRow,{children:[(0,B.jsx)(f.Button,{variant:"secondary",onClick:r,fill:"outline",children:"Cancel"}),(0,B.jsx)(f.Button,{variant:"destructive",onClick:n,children:"Discard"}),(0,B.jsx)(no.i,{dashboard:e,onSaveSuccess:t})]})]});var io;!function(e){e[e.UnsavedChangesModal=0]="UnsavedChangesModal",e[e.SaveLibraryPanelModal=1]="SaveLibraryPanelModal"}(io||(io={}));const oo=d.memo((({dashboard:e})=>{const[t,n]=(0,d.useState)({original:null,modal:null}),r=(0,u.useDispatch)(),{original:i,originalPath:o,blockedLocation:a,modal:s}=t;(0,d.useEffect)((()=>{const t=setTimeout((()=>{const t=p.locationService.getLocation().pathname,r=e.getSaveModelClone();n({originalPath:t,original:r,modal:null})}),1e3);return()=>{clearTimeout(t)}}),[e]),(0,d.useEffect)((()=>{const t=t=>{so(e,i)||co(e,i)&&(t.preventDefault(),t.returnValue="")};return window.addEventListener("beforeunload",t),()=>window.removeEventListener("beforeunload",t)}),[e,i]),(0,d.useEffect)((()=>{const t=oe.h$.subscribe(Q.Jd,(()=>{const t=e.getSaveModelClone(),r=p.locationService.getLocation().pathname;n({originalPath:r,original:t,modal:null}),a&&ao(a)}));return()=>t.unsubscribe()}),[e,a]);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Rt.NL,{when:!0,message:a=>{const s=e.panelInEdit,l=new URLSearchParams(a.search);return s&&s.libraryPanel&&s.hasChanged&&!l.has("editPanel")?(n(Object.assign({},t,{modal:io.SaveLibraryPanelModal,blockedLocation:a})),!1):o!==a.pathname&&i?!!so(e,i)||(!co(e,i)||(n(Object.assign({},t,{modal:io.UnsavedChangesModal,blockedLocation:a})),!1)):(s&&!l.has("editPanel")&&r(Dr()),!0)}}),s===io.UnsavedChangesModal&&(0,B.jsx)(ro,{dashboard:e,onSaveSuccess:()=>{},onDiscard:()=>{n(Object.assign({},t,{original:null,modal:null})),ao(a)},onDismiss:()=>{n(Object.assign({},t,{modal:null,blockedLocation:null}))}}),s===io.SaveLibraryPanelModal&&(0,B.jsx)(Vr,{isUnsavedPrompt:!0,panel:e.panelInEdit,folderId:e.meta.folderId,onConfirm:()=>{n(Object.assign({},t,{modal:null})),ao(a)},onDiscard:()=>{r(Br()),n(Object.assign({},t,{modal:null})),ao(a)},onDismiss:()=>{n(Object.assign({},t,{modal:null,blockedLocation:null}))}})]})}));function ao(e){e&&setTimeout((()=>p.locationService.push(e)),10)}function so(e,t){if(!t)return!0;if(!Xi.Vt.isSignedIn)return!0;if(!e||!e.meta)return!0;const{canSave:n,fromScript:r,fromFile:i}=e.meta;return!Xi.Vt.isEditor&&!n||(!n||r||i)}function lo(e){const t=new Ki.f(e);t.expandRows();const n=t.getSaveModelClone();return n.time=0,n.refresh=0,n.schemaVersion=0,n.timezone=0,delete n.iteration,n.panels=(0,O.filter)(n.panels,(e=>!e.repeatPanelId&&(e.scopedVars=void 0,e.legend&&(delete e.legend.sort,delete e.legend.sortDesc),!0))),(0,O.each)(n.getVariables(),(e=>{e.current=null,e.options=null,e.filters=null})),n}function co(e,t){const n=lo(e.getSaveModelClone()),r=lo(t),i=(0,O.find)(n.nav,{type:"timepicker"}),o=(0,O.find)(r.nav,{type:"timepicker"});i&&o&&(i.now=o.now);return to().toJson(n)!==to().toJson(r)}var uo,po=n("./public/app/features/dashboard/dashgrid/liveTimer.ts");function ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const fo=e=>({initPhase:e.dashboard.initPhase,isInitSlow:e.dashboard.isInitSlow,initError:e.dashboard.initError,dashboard:e.dashboard.getModel()}),go={initDashboard:oi.m,cleanUpDashboardAndVariables:Mn.lw,notifyApp:qr.$l,cancelVariables:Hi.wX,templateVarsChangedInUrl:Hi.xs},mo=(0,u.connect)(fo,go);class bo extends d.PureComponent{constructor(...e){super(...e),ho(this,"forceRouteReloadCounter",0),ho(this,"state",this.getCleanState()),ho(this,"updateLiveTimer",(()=>{var e;let t;null!==(e=this.props.dashboard)&&void 0!==e&&e.liveNow&&(t=(0,Jr.$t)().timeRange()),po.A.setLiveTimeRange(t)})),ho(this,"setScrollTop",(({scrollTop:e})=>{this.setState({scrollTop:e,updateScrollTop:void 0})})),ho(this,"onAddPanel",(()=>{const{dashboard:e}=this.props;e&&(e.panels.length>0&&"add-panel"===e.panels[0].type||(e.addPanel({type:"add-panel",gridPos:{x:0,y:0,w:12,h:8},title:"Panel Title"}),this.setState({updateScrollTop:0})))}))}getCleanState(){return{editPanel:null,viewPanel:null,showLoadingState:!1,scrollTop:0,rememberScrollTop:0,panelNotFound:!1,editPanelAccessDenied:!1}}componentDidMount(){var e;this.initDashboard(),this.forceRouteReloadCounter=(null===(e=this.props.history.location.state)||void 0===e?void 0:e.routeReloadCounter)||0}componentWillUnmount(){this.closeDashboard()}closeDashboard(){this.props.cleanUpDashboardAndVariables(),this.setState(this.getCleanState())}initDashboard(){const{dashboard:e,match:t,queryParams:n}=this.props;e&&this.closeDashboard(),this.props.initDashboard({urlSlug:t.params.slug,urlUid:t.params.uid,urlType:t.params.type,urlFolderId:n.folderId,routeName:this.props.route.routeName,fixUrl:!0}),setTimeout(this.updateLiveTimer,250)}componentDidUpdate(e,t){var n;const{dashboard:r,match:i,templateVarsChangedInUrl:o}=this.props,a=null===(n=this.props.history.location.state)||void 0===n?void 0:n.routeReloadCounter;if(r){if(e.dashboard!==r&&(document.title=r.title+" - "+m.c.AppTitle),e.match.params.uid!==i.params.uid||void 0!==a&&this.forceRouteReloadCounter!==a)return this.initDashboard(),void(this.forceRouteReloadCounter=a);if(e.location.search!==this.props.location.search){const t=e.queryParams,n=this.props.queryParams;(null==n?void 0:n.from)===(null==t?void 0:t.from)&&(null==n?void 0:n.to)===(null==t?void 0:t.to)||((0,Jr.$t)().updateTimeRangeFromUrl(),this.updateLiveTimer()),null!=t&&t.refresh||null==n||!n.refresh||(0,Jr.$t)().setAutoRefresh(n.refresh);const r=(0,$i.xT)(this.props.queryParams,e.queryParams);r&&o(r)}var s;if(this.state.editPanel&&!t.editPanel&&Gi.H.setEditingState(!0),!this.state.editPanel&&t.editPanel)Gi.H.setEditingState(!1),null===(s=this.props.dashboard)||void 0===s||s.events.publish(new Q.Yr(t.editPanel.id));this.state.editPanelAccessDenied&&(this.props.notifyApp((0,g.t_)("Permission to edit panel denied")),p.locationService.partial({editPanel:null})),this.state.panelNotFound&&(this.props.notifyApp((0,g.t_)("Panel not found")),p.locationService.partial({editPanel:null,viewPanel:null}))}}static getDerivedStateFromProps(e,t){const{dashboard:n,queryParams:r}=e,i=r.editPanel,o=r.viewPanel;if(!n)return t;if(!t.editPanel&&i){const e=n.getPanelByUrlId(i);return e?n.canEditPanel(e)?Object.assign({},t,{editPanel:e}):Object.assign({},t,{editPanelAccessDenied:!0}):Object.assign({},t,{panelNotFound:!0})}if(t.editPanel&&!i)return Object.assign({},t,{editPanel:null});if(!t.viewPanel&&o){const e=n.getPanelByUrlId(o);return e?(n.initViewPanel(e),Object.assign({},t,{viewPanel:e,rememberScrollTop:t.scrollTop,updateScrollTop:0})):Object.assign({},t,{panelNotFound:i})}return t.viewPanel&&!o?(n.exitViewPanel(t.viewPanel),Object.assign({},t,{viewPanel:null,updateScrollTop:t.rememberScrollTop})):t.panelNotFound||t.editPanelAccessDenied&&!i?Object.assign({},t,{panelNotFound:!1,editPanelAccessDenied:!1}):t}getInspectPanel(){const{dashboard:e,queryParams:t}=this.props,n=t.inspect;if(!e||!n)return null;const r=e.getPanelById(parseInt(n,10));return r||null}render(){const{dashboard:e,isInitSlow:t,initError:n,queryParams:r,theme:i}=this.props,{editPanel:o,viewPanel:a,scrollTop:s,updateScrollTop:l}=this.state,d=(0,Vi.U6)(r.kiosk),c=yo(i,d);if(!e)return t?(0,B.jsx)(Ui,{initPhase:this.props.initPhase}):null;const u=25*Math.round(s/25),p=this.getInspectPanel(),g=x()(c.dashboardContainer,{"panel-in-fullscreen":a});return(0,B.jsxs)("div",{className:g,children:[d!==Ce.UX.Full&&(0,B.jsx)("header",{"aria-label":h.wl.pages.Dashboard.DashNav.nav,children:(0,B.jsx)(re.t,{dashboard:e,title:e.title,folderTitle:e.meta.folderTitle,isFullscreen:!!a,onAddPanel:this.onAddPanel,kioskMode:d,hideTimePicker:e.timepicker.hidden})}),(0,B.jsx)(oo,{dashboard:e}),(0,B.jsx)("div",{className:c.dashboardScroll,children:(0,B.jsx)(f.CustomScrollbar,{autoHeightMin:"100%",setScrollTop:this.setScrollTop,scrollTop:l,hideHorizontalTrack:!0,updateAfterMountMs:500,children:(0,B.jsxs)("div",{className:c.dashboardContent,children:[n&&(uo||(uo=(0,B.jsx)(Zi,{}))),!o&&d===Ce.UX.Off&&(0,B.jsx)("section",{"aria-label":h.wl.pages.Dashboard.SubMenu.submenu,children:(0,B.jsx)(Li,{dashboard:e,annotations:e.annotations.list,links:e.links})}),(0,B.jsx)(te,{dashboard:e,viewPanel:a,editPanel:o,scrollTop:u})]})})}),p&&(0,B.jsx)(Mi,{dashboard:e,panel:p}),o&&(0,B.jsx)(ni,{dashboard:e,sourcePanel:o,tab:this.props.queryParams.tab}),r.editview&&(0,B.jsx)(ie.D,{dashboard:e,editview:r.editview})]})}}const yo=(0,f.stylesFactory)(((e,t)=>{const n=t!==Ce.UX.Full?e.spacing(0,2,2):e.spacing(2);return{dashboardContainer:c.css`
      width: 100%;
      height: 100%;
      display: flex;
      flex: 1 1 0;
      flex-direction: column;
      min-height: 0;
    `,dashboardScroll:c.css`
      width: 100%;
      flex-grow: 1;
      min-height: 0;
      display: flex;
    `,dashboardContent:c.css`
      padding: ${n};
      flex-basis: 100%;
      flex-grow: 1;
    `}})),vo=(0,f.withTheme2)(bo);vo.displayName="DashboardPage";const xo=mo(vo)},"./node_modules/lodash.isequal/index.js":(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",d="[object Error]",c="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",f="[object Promise]",g="[object RegExp]",m="[object Set]",b="[object String]",y="[object Symbol]",v="[object WeakMap]",x="[object ArrayBuffer]",S="[object DataView]",M=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[o]=k[a]=k[x]=k[s]=k[S]=k[l]=k[d]=k[c]=k[u]=k[p]=k[h]=k[g]=k[m]=k[b]=k[v]=!1;var j="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,w="object"==typeof self&&self&&self.Object===Object&&self,C=j||w||Function("return this")(),P=t&&!t.nodeType&&t,z=P&&e&&!e.nodeType&&e,R=z&&z.exports===P,T=R&&j.process,B=function(){try{return T&&T.binding&&T.binding("util")}catch(e){}}(),W=B&&B.isTypedArray;function D(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function E(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var _,A,F,L=Array.prototype,N=Function.prototype,H=Object.prototype,$=C["__core-js_shared__"],G=N.toString,V=H.hasOwnProperty,U=(_=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",q=H.toString,Q=RegExp("^"+G.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=R?C.Buffer:void 0,J=C.Symbol,Y=C.Uint8Array,X=H.propertyIsEnumerable,K=L.splice,ee=J?J.toStringTag:void 0,te=Object.getOwnPropertySymbols,ne=Z?Z.isBuffer:void 0,re=(A=Object.keys,F=Object,function(e){return A(F(e))}),ie=Be(C,"DataView"),oe=Be(C,"Map"),ae=Be(C,"Promise"),se=Be(C,"Set"),le=Be(C,"WeakMap"),de=Be(Object,"create"),ce=Ee(ie),ue=Ee(oe),pe=Ee(ae),he=Ee(se),fe=Ee(le),ge=J?J.prototype:void 0,me=ge?ge.valueOf:void 0;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}function Se(e){var t=this.__data__=new ye(e);this.size=t.size}function Me(e,t){var n=Fe(e),r=!n&&Ae(e),i=!n&&!r&&Le(e),o=!n&&!r&&!i&&Ve(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var d in e)!t&&!V.call(e,d)||a&&("length"==d||i&&("offset"==d||"parent"==d)||o&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Ie(d,l))||s.push(d);return s}function Oe(e,t){for(var n=e.length;n--;)if(_e(e[n][0],t))return n;return-1}function ke(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ee&&ee in Object(e)?function(e){var t=V.call(e,ee),n=e[ee];try{e[ee]=void 0;var r=!0}catch(e){}var i=q.call(e);r&&(t?e[ee]=n:delete e[ee]);return i}(e):function(e){return q.call(e)}(e)}function je(e){return Ge(e)&&ke(e)==o}function we(e,t,n,r,i){return e===t||(null==e||null==t||!Ge(e)&&!Ge(t)?e!=e&&t!=t:function(e,t,n,r,i,c){var f=Fe(e),v=Fe(t),M=f?a:De(e),O=v?a:De(t),k=(M=M==o?h:M)==h,j=(O=O==o?h:O)==h,w=M==O;if(w&&Le(e)){if(!Le(t))return!1;f=!0,k=!1}if(w&&!k)return c||(c=new Se),f||Ve(e)?ze(e,t,n,r,i,c):function(e,t,n,r,i,o,a){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!o(new Y(e),new Y(t)));case s:case l:case p:return _e(+e,+t);case d:return e.name==t.name&&e.message==t.message;case g:case b:return e==t+"";case u:var c=I;case m:var h=1&r;if(c||(c=E),e.size!=t.size&&!h)return!1;var f=a.get(e);if(f)return f==t;r|=2,a.set(e,t);var v=ze(c(e),c(t),r,i,o,a);return a.delete(e),v;case y:if(me)return me.call(e)==me.call(t)}return!1}(e,t,M,n,r,i,c);if(!(1&n)){var C=k&&V.call(e,"__wrapped__"),P=j&&V.call(t,"__wrapped__");if(C||P){var z=C?e.value():e,R=P?t.value():t;return c||(c=new Se),i(z,R,n,r,c)}}if(!w)return!1;return c||(c=new Se),function(e,t,n,r,i,o){var a=1&n,s=Re(e),l=s.length,d=Re(t).length;if(l!=d&&!a)return!1;var c=l;for(;c--;){var u=s[c];if(!(a?u in t:V.call(t,u)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var h=!0;o.set(e,t),o.set(t,e);var f=a;for(;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var b=a?r(m,g,u,t,e,o):r(g,m,u,e,t,o);if(!(void 0===b?g===m||i(g,m,n,r,o):b)){h=!1;break}f||(f="constructor"==u)}if(h&&!f){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,c)}(e,t,n,r,we,i))}function Ce(e){return!(!$e(e)||function(e){return!!U&&U in e}(e))&&(Ne(e)?Q:M).test(Ee(e))}function Pe(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||H,t!==r)return re(e);var t,n,r,i=[];for(var o in Object(e))V.call(e,o)&&"constructor"!=o&&i.push(o);return i}function ze(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var d=o.get(e);if(d&&o.get(t))return d==t;var c=-1,u=!0,p=2&n?new xe:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var h=e[c],f=t[c];if(r)var g=a?r(f,h,c,t,e,o):r(h,f,c,e,t,o);if(void 0!==g){if(g)continue;u=!1;break}if(p){if(!D(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||i(h,e,n,r,o)))return p.push(t);var a}))){u=!1;break}}else if(h!==f&&!i(h,f,n,r,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function Re(e){return function(e,t,n){var r=t(e);return Fe(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ue,We)}function Te(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ce(n)?n:void 0}be.prototype.clear=function(){this.__data__=de?de(null):{},this.size=0},be.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be.prototype.get=function(e){var t=this.__data__;if(de){var n=t[e];return n===r?void 0:n}return V.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return de?void 0!==t[e]:V.call(t,e)},be.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=de&&void 0===t?r:t,this},ye.prototype.clear=function(){this.__data__=[],this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():K.call(t,n,1),--this.size,!0)},ye.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},ye.prototype.has=function(e){return Oe(this.__data__,e)>-1},ye.prototype.set=function(e,t){var n=this.__data__,r=Oe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ve.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(oe||ye),string:new be}},ve.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},ve.prototype.get=function(e){return Te(this,e).get(e)},ve.prototype.has=function(e){return Te(this,e).has(e)},ve.prototype.set=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,r),this},xe.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.clear=function(){this.__data__=new ye,this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ve(r)}return n.set(e,t),this.size=n.size,this};var We=te?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(te(e),(function(t){return X.call(e,t)})))}:function(){return[]},De=ke;function Ie(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Ee(e){if(null!=e){try{return G.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function _e(e,t){return e===t||e!=e&&t!=t}(ie&&De(new ie(new ArrayBuffer(1)))!=S||oe&&De(new oe)!=u||ae&&De(ae.resolve())!=f||se&&De(new se)!=m||le&&De(new le)!=v)&&(De=function(e){var t=ke(e),n=t==h?e.constructor:void 0,r=n?Ee(n):"";if(r)switch(r){case ce:return S;case ue:return u;case pe:return f;case he:return m;case fe:return v}return t});var Ae=je(function(){return arguments}())?je:function(e){return Ge(e)&&V.call(e,"callee")&&!X.call(e,"callee")},Fe=Array.isArray;var Le=ne||function(){return!1};function Ne(e){if(!$e(e))return!1;var t=ke(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function He(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function $e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var Ve=W?function(e){return function(t){return e(t)}}(W):function(e){return Ge(e)&&He(e.length)&&!!k[ke(e)]};function Ue(e){return null!=(t=e)&&He(t.length)&&!Ne(t)?Me(e):Pe(e);var t}e.exports=function(e,t){return we(e,t)}},"./node_modules/react-grid-layout/build/GridItem.js":(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=p(n("./node_modules/react/index.js")),o=p(n("./node_modules/prop-types/index.js")),a=n("./node_modules/react-draggable/build/cjs/cjs.js"),s=n("./node_modules/react-resizable/index.js"),l=n("./node_modules/react-grid-layout/build/utils.js"),d=n("./node_modules/react-grid-layout/build/calculateUtils.js"),c=n("./node_modules/react-grid-layout/build/ReactGridLayoutPropTypes.js"),u=p(n("./node_modules/react-grid-layout/node_modules/classnames/index.js"));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=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(e){return!1}}();return function(){var n,r=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?x(e):t}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(c,e);var t,n,r,o=y(c);function c(){var e;g(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return M(x(e=o.call.apply(o,[this].concat(n))),"state",{resizing:null,dragging:null,className:""}),M(x(e),"elementRef",i.default.createRef()),M(x(e),"onDragStart",(function(t,n){var r=n.node,i=e.props,o=i.onDragStart,a=i.transformScale;if(o){var s={top:0,left:0},l=r.offsetParent;if(l){var c=l.getBoundingClientRect(),u=r.getBoundingClientRect(),p=u.left/a,h=c.left/a,f=u.top/a,g=c.top/a;s.left=p-h+l.scrollLeft,s.top=f-g+l.scrollTop,e.setState({dragging:s});var m=(0,d.calcXY)(e.getPositionParams(),s.top,s.left,e.props.w,e.props.h),b=m.x,y=m.y;return o.call(x(e),e.props.i,b,y,{e:t,node:r,newPosition:s})}}})),M(x(e),"onDrag",(function(t,n){var r=n.node,i=n.deltaX,o=n.deltaY,a=e.props.onDrag;if(a){if(!e.state.dragging)throw new Error("onDrag called before onDragStart.");var s=e.state.dragging.top+o,l=e.state.dragging.left+i,c=e.props,u=c.isBounded,p=c.i,h=c.w,f=c.h,g=c.containerWidth,m=e.getPositionParams();if(u){var b=r.offsetParent;if(b){var y=e.props,v=y.margin,S=y.rowHeight,M=b.clientHeight-(0,d.calcGridItemWHPx)(f,S,v[1]);s=(0,d.clamp)(s,0,M);var O=(0,d.calcGridColWidth)(m),k=g-(0,d.calcGridItemWHPx)(h,O,v[0]);l=(0,d.clamp)(l,0,k)}}var j={top:s,left:l};e.setState({dragging:j});var w=(0,d.calcXY)(m,s,l,h,f),C=w.x,P=w.y;return a.call(x(e),p,C,P,{e:t,node:r,newPosition:j})}})),M(x(e),"onDragStop",(function(t,n){var r=n.node,i=e.props.onDragStop;if(i){if(!e.state.dragging)throw new Error("onDragEnd called before onDragStart.");var o=e.props,a=o.w,s=o.h,l=o.i,c=e.state.dragging,u=c.left,p=c.top,h={top:p,left:u};e.setState({dragging:null});var f=(0,d.calcXY)(e.getPositionParams(),p,u,a,s),g=f.x,m=f.y;return i.call(x(e),l,g,m,{e:t,node:r,newPosition:h})}})),M(x(e),"onResizeStop",(function(t,n){e.onResizeHandler(t,n,"onResizeStop")})),M(x(e),"onResizeStart",(function(t,n){e.onResizeHandler(t,n,"onResizeStart")})),M(x(e),"onResize",(function(t,n){e.onResizeHandler(t,n,"onResize")})),e}return t=c,(n=[{key:"shouldComponentUpdate",value:function(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;var n=(0,d.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,d.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,l.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(e){this.moveDroppingItem(e)}},{key:"moveDroppingItem",value:function(e){var t=this.props.droppingPosition;if(t){var n=this.elementRef.current;if(n){var r=e.droppingPosition||{left:0,top:0},i=this.state.dragging,o=i&&t.left!==r.left||t.top!==r.top;if(i){if(o){var a=t.left-i.left,s=t.top-i.top;this.onDrag(t.e,{node:n,deltaX:a,deltaY:s})}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}}}},{key:"getPositionParams",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}},{key:"createStyle",value:function(e){var t,n=this.props,r=n.usePercentages,i=n.containerWidth;return n.useCSSTransforms?t=(0,l.setTransform)(e):(t=(0,l.setTopLeft)(e),r&&(t.left=(0,l.perc)(e.left/i),t.width=(0,l.perc)(e.width/i))),t}},{key:"mixinDraggable",value:function(e,t){return i.default.createElement(a.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}},{key:"mixinResizable",value:function(e,t,n){var r=this.props,o=r.cols,a=r.x,l=r.minW,c=r.minH,u=r.maxW,p=r.maxH,h=r.transformScale,f=r.resizeHandles,g=r.resizeHandle,m=this.getPositionParams(),b=(0,d.calcGridItemPosition)(m,0,0,o-a,0).width,y=(0,d.calcGridItemPosition)(m,0,0,l,c),v=(0,d.calcGridItemPosition)(m,0,0,u,p),x=[y.width,y.height],S=[Math.min(v.width,b),Math.min(v.height,1/0)];return i.default.createElement(s.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:x,maxConstraints:S,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:h,resizeHandles:f,handle:g},e)}},{key:"onResizeHandler",value:function(e,t,n){var r=t.node,i=t.size,o=this.props[n];if(o){var a=this.props,s=a.cols,l=a.x,c=a.y,u=a.i,p=a.maxH,h=a.minH,f=this.props,g=f.minW,m=f.maxW,b=(0,d.calcWH)(this.getPositionParams(),i.width,i.height,l,c),y=b.w,v=b.h;g=Math.max(g,1),m=Math.min(m,s-l),y=(0,d.clamp)(y,g,m),v=(0,d.clamp)(v,h,p),this.setState({resizing:"onResizeStop"===n?null:i}),o.call(this,u,y,v,{e,node:r,size:i})}}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.w,o=e.h,a=e.isDraggable,s=e.isResizable,l=e.droppingPosition,c=e.useCSSTransforms,p=(0,d.calcGridItemPosition)(this.getPositionParams(),t,n,r,o,this.state),h=i.default.Children.only(this.props.children),g=i.default.cloneElement(h,{ref:this.elementRef,className:(0,u.default)("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":a,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(l),cssTransforms:c}),style:f(f(f({},this.props.style),h.props.style),this.createStyle(p))});return g=this.mixinResizable(g,p,s),g=this.mixinDraggable(g,a)}}])&&m(t.prototype,n),r&&m(t,r),c}(i.default.Component);t.default=O,M(O,"propTypes",{children:o.default.element,cols:o.default.number.isRequired,containerWidth:o.default.number.isRequired,rowHeight:o.default.number.isRequired,margin:o.default.array.isRequired,maxRows:o.default.number.isRequired,containerPadding:o.default.array.isRequired,x:o.default.number.isRequired,y:o.default.number.isRequired,w:o.default.number.isRequired,h:o.default.number.isRequired,minW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:o.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:o.default.func,onDragStart:o.default.func,onDrag:o.default.func,onResizeStop:o.default.func,onResizeStart:o.default.func,onResize:o.default.func,isDraggable:o.default.bool.isRequired,isResizable:o.default.bool.isRequired,isBounded:o.default.bool.isRequired,static:o.default.bool,useCSSTransforms:o.default.bool.isRequired,transformScale:o.default.number,className:o.default.string,handle:o.default.string,cancel:o.default.string,droppingPosition:o.default.shape({e:o.default.object.isRequired,left:o.default.number.isRequired,top:o.default.number.isRequired})}),M(O,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})},"./node_modules/react-grid-layout/build/ReactGridLayout.js":(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,n&&n.set(e,i);return i}(n("./node_modules/react/index.js")),o=u(n("./node_modules/lodash.isequal/index.js")),a=u(n("./node_modules/react-grid-layout/node_modules/classnames/index.js")),s=n("./node_modules/react-grid-layout/build/utils.js"),l=n("./node_modules/react-grid-layout/build/calculateUtils.js"),d=u(n("./node_modules/react-grid-layout/build/GridItem.js")),c=u(n("./node_modules/react-grid-layout/build/ReactGridLayoutPropTypes.js"));function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||b(e,t)||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 f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=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(e){return!1}}();return function(){var n,r=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return M(this,n)}}function M(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?O(e):t}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w="react-grid-layout",C=!1;try{C=/firefox/i.test(navigator.userAgent)}catch(e){}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(u,e);var t,n,r,c=S(u);function u(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),j(O(n=c.call(this,e,t)),"state",{activeDrag:null,layout:(0,s.synchronizeLayoutWithChildren)(n.props.layout,n.props.children,n.props.cols,(0,s.compactType)(n.props)),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),j(O(n),"dragEnterCounter",0),j(O(n),"onDragOver",(function(e){var t;if(C&&(null===(t=e.nativeEvent.target)||void 0===t||!t.classList.contains(w)))return e.preventDefault(),!1;var r=n.props,o=r.droppingItem,a=r.margin,s=r.cols,d=r.rowHeight,c=r.maxRows,u=r.width,p=r.containerPadding,h=n.state.layout,f=e.nativeEvent,b=f.layerX,y=f.layerY,v={left:b,top:y,e};if(n.state.droppingDOMNode){if(n.state.droppingPosition){var x=n.state.droppingPosition,S=x.left,M=x.top;(S!=b||M!=y)&&n.setState({droppingPosition:v})}}else{var O={cols:s,margin:a,maxRows:c,rowHeight:d,containerWidth:u,containerPadding:p||a},k=(0,l.calcXY)(O,y,b,o.w,o.h);n.setState({droppingDOMNode:i.createElement("div",{key:o.i}),droppingPosition:v,layout:[].concat(m(h),[g(g({},o),{},{x:k.x,y:k.y,static:!1,isDraggable:!0})])})}e.stopPropagation(),e.preventDefault()})),j(O(n),"removeDroppingPlaceholder",(function(){var e=n.props,t=e.droppingItem,r=e.cols,i=n.state.layout,o=(0,s.compact)(i.filter((function(e){return e.i!==t.i})),(0,s.compactType)(n.props),r);n.setState({layout:o,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),j(O(n),"onDragLeave",(function(){n.dragEnterCounter--,0===n.dragEnterCounter&&n.removeDroppingPlaceholder()})),j(O(n),"onDragEnter",(function(){n.dragEnterCounter++})),j(O(n),"onDrop",(function(e){var t=n.props.droppingItem,r=n.state.layout,i=r.find((function(e){return e.i===t.i}));n.dragEnterCounter=0,n.removeDroppingPlaceholder(),n.props.onDrop(r,i,e)})),(0,s.autoBindHandlers)(O(n),["onDragStart","onDrag","onDragStop","onResizeStart","onResize","onResizeStop"]),n}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n;return t.activeDrag?null:((0,o.default)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,s.childrenEqual)(e.children,t.children)||(n=t.layout):n=e.layout,n?{layout:(0,s.synchronizeLayoutWithChildren)(n,e.children,e.cols,(0,s.compactType)(e)),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}}],(n=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(e,t){return this.props.children!==e.children||!(0,s.fastRGLPropsEqual)(this.props,e,o.default)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}},{key:"componentDidUpdate",value:function(e,t){if(!this.state.activeDrag){var n=this.state.layout,r=t.layout;this.onLayoutMaybeChanged(n,r)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var e=(0,s.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}}},{key:"onDragStart",value:function(e,t,n,r){var i=r.e,o=r.node,a=this.state.layout,l=(0,s.getLayoutItem)(a,e);if(l)return this.setState({oldDragItem:(0,s.cloneLayoutItem)(l),oldLayout:this.state.layout}),this.props.onDragStart(a,l,l,null,i,o)}},{key:"onDrag",value:function(e,t,n,r){var i=r.e,o=r.node,a=this.state.oldDragItem,l=this.state.layout,d=this.props.cols,c=(0,s.getLayoutItem)(l,e);if(c){var u={w:c.w,h:c.h,x:c.x,y:c.y,placeholder:!0,i:e};l=(0,s.moveElement)(l,c,t,n,!0,this.props.preventCollision,(0,s.compactType)(this.props),d),this.props.onDrag(l,a,c,u,i,o),this.setState({layout:(0,s.compact)(l,(0,s.compactType)(this.props),d),activeDrag:u})}}},{key:"onDragStop",value:function(e,t,n,r){var i=r.e,o=r.node;if(this.state.activeDrag){var a=this.state.oldDragItem,l=this.state.layout,d=this.props,c=d.cols,u=d.preventCollision,p=(0,s.getLayoutItem)(l,e);if(p){l=(0,s.moveElement)(l,p,t,n,!0,u,(0,s.compactType)(this.props),c),this.props.onDragStop(l,a,p,null,i,o);var h=(0,s.compact)(l,(0,s.compactType)(this.props),c),f=this.state.oldLayout;this.setState({activeDrag:null,layout:h,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(h,f)}}}},{key:"onLayoutMaybeChanged",value:function(e,t){t||(t=this.state.layout),(0,o.default)(t,e)||this.props.onLayoutChange(e)}},{key:"onResizeStart",value:function(e,t,n,r){var i=r.e,o=r.node,a=this.state.layout,l=(0,s.getLayoutItem)(a,e);l&&(this.setState({oldResizeItem:(0,s.cloneLayoutItem)(l),oldLayout:this.state.layout}),this.props.onResizeStart(a,l,l,null,i,o))}},{key:"onResize",value:function(e,t,n,r){var i=r.e,o=r.node,a=this.state,l=a.layout,d=a.oldResizeItem,c=this.props,u=c.cols,p=c.preventCollision,f=h((0,s.withLayoutItem)(l,e,(function(e){var r;if(p){var i=(0,s.getAllCollisions)(l,g(g({},e),{},{w:t,h:n})).filter((function(t){return t.i!==e.i}));if(r=i.length>0){var o=1/0,a=1/0;i.forEach((function(t){t.x>e.x&&(o=Math.min(o,t.x)),t.y>e.y&&(a=Math.min(a,t.y))})),Number.isFinite(o)&&(e.w=o-e.x),Number.isFinite(a)&&(e.h=a-e.y)}}return r||(e.w=t,e.h=n),e})),2),m=f[0],b=f[1];if(b){var y={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(m,d,b,y,i,o),this.setState({layout:(0,s.compact)(m,(0,s.compactType)(this.props),u),activeDrag:y})}}},{key:"onResizeStop",value:function(e,t,n,r){var i=r.e,o=r.node,a=this.state,l=a.layout,d=a.oldResizeItem,c=this.props.cols,u=(0,s.getLayoutItem)(l,e);this.props.onResizeStop(l,d,u,null,i,o);var p=(0,s.compact)(l,(0,s.compactType)(this.props),c),h=this.state.oldLayout;this.setState({activeDrag:null,layout:p,oldResizeItem:null,oldLayout:null}),this.onLayoutMaybeChanged(p,h)}},{key:"placeholder",value:function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,n=t.width,r=t.cols,o=t.margin,a=t.containerPadding,s=t.rowHeight,l=t.maxRows,c=t.useCSSTransforms,u=t.transformScale;return i.createElement(d.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder",containerWidth:n,cols:r,margin:o,containerPadding:a||o,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:u},i.createElement("div",null))}},{key:"processGridItem",value:function(e,t){if(e&&e.key){var n=(0,s.getLayoutItem)(this.state.layout,String(e.key));if(!n)return null;var r=this.props,o=r.width,a=r.cols,l=r.margin,c=r.containerPadding,u=r.rowHeight,p=r.maxRows,h=r.isDraggable,f=r.isResizable,g=r.isBounded,m=r.useCSSTransforms,b=r.transformScale,y=r.draggableCancel,v=r.draggableHandle,x=r.resizeHandles,S=r.resizeHandle,M=this.state,O=M.mounted,k=M.droppingPosition,j="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&h,w="boolean"==typeof n.isResizable?n.isResizable:!n.static&&f,C=n.resizeHandles||x,P=j&&g&&!1!==n.isBounded;return i.createElement(d.default,{containerWidth:o,cols:a,margin:l,containerPadding:c||l,maxRows:p,rowHeight:u,cancel:y,handle:v,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:j,isResizable:w,isBounded:P,useCSSTransforms:m&&O,usePercentages:!O,transformScale:b,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:t?k:void 0,resizeHandles:C,resizeHandle:S},e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.style,o=t.isDroppable,l=t.innerRef,d=(0,a.default)(w,n),c=g({height:this.containerHeight()},r);return i.createElement("div",{ref:l,className:d,style:c,onDrop:o?this.onDrop:s.noop,onDragLeave:o?this.onDragLeave:s.noop,onDragEnter:o?this.onDragEnter:s.noop,onDragOver:o?this.onDragOver:s.noop},i.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),o&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&v(t.prototype,n),r&&v(t,r),u}(i.Component);t.default=P,j(P,"displayName","ReactGridLayout"),j(P,"propTypes",c.default),j(P,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:s.noop,onDragStart:s.noop,onDrag:s.noop,onDragStop:s.noop,onResizeStart:s.noop,onResize:s.noop,onResizeStop:s.noop,onDrop:s.noop})},"./node_modules/react-grid-layout/build/ReactGridLayoutPropTypes.js":(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.resizeHandleType=t.resizeHandleAxesType=void 0;var r=o(n("./node_modules/prop-types/index.js")),i=o(n("./node_modules/react/index.js"));function o(e){return e&&e.__esModule?e:{default:e}}var a=r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));t.resizeHandleAxesType=a;var s=r.default.oneOfType([r.default.node,r.default.func]);t.resizeHandleType=s;var l={className:r.default.string,style:r.default.object,width:r.default.number,autoSize:r.default.bool,cols:r.default.number,draggableCancel:r.default.string,draggableHandle:r.default.string,verticalCompact:function(e){e.verticalCompact,0},compactType:r.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&n("./node_modules/react-grid-layout/build/utils.js").validateLayout(t,"layout")},margin:r.default.arrayOf(r.default.number),containerPadding:r.default.arrayOf(r.default.number),rowHeight:r.default.number,maxRows:r.default.number,isBounded:r.default.bool,isDraggable:r.default.bool,isResizable:r.default.bool,preventCollision:r.default.bool,useCSSTransforms:r.default.bool,transformScale:r.default.number,isDroppable:r.default.bool,resizeHandles:a,resizeHandle:s,onLayoutChange:r.default.func,onDragStart:r.default.func,onDrag:r.default.func,onDragStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,onResizeStop:r.default.func,onDrop:r.default.func,droppingItem:r.default.shape({i:r.default.string.isRequired,w:r.default.number.isRequired,h:r.default.number.isRequired}),children:function(e,t){var n=e[t],r={};i.default.Children.forEach(n,(function(e){if(r[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');r[e.key]=!0}))},innerRef:r.default.any};t.default=l},"./node_modules/react-grid-layout/build/ResponsiveReactGridLayout.js":(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,n&&n.set(e,i);return i}(n("./node_modules/react/index.js")),o=c(n("./node_modules/prop-types/index.js")),a=c(n("./node_modules/lodash.isequal/index.js")),s=n("./node_modules/react-grid-layout/build/utils.js"),l=n("./node_modules/react-grid-layout/build/responsiveUtils.js"),d=c(n("./node_modules/react-grid-layout/build/ReactGridLayout.js"));function c(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=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(e){return!1}}();return function(){var n,r=M(e);if(t){var i=M(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?S(e):t}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k=function(e){return Object.prototype.toString.call(e)};function j(e,t){return null==e?null:Array.isArray(e)?e:e[t]}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(c,e);var t,n,r,o=v(c);function c(){var e;m(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return O(S(e=o.call.apply(o,[this].concat(n))),"state",e.generateInitialState()),O(S(e),"onLayoutChange",(function(t){e.props.onLayoutChange(t,g(g({},e.props.layouts),{},O({},e.state.breakpoint,t)))})),e}return t=c,r=[{key:"getDerivedStateFromProps",value:function(e,t){if(!(0,a.default)(e.layouts,t.layouts)){var n=t.breakpoint,r=t.cols;return{layout:(0,l.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}}],(n=[{key:"generateInitialState",value:function(){var e=this.props,t=e.width,n=e.breakpoints,r=e.layouts,i=e.cols,o=(0,l.getBreakpointFromWidth)(n,t),a=(0,l.getColsFromBreakpoint)(o,i),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,l.findOrGenerateResponsiveLayout)(r,n,o,o,a,s),breakpoint:o,cols:a}}},{key:"componentDidUpdate",value:function(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,a.default)(this.props.breakpoints,e.breakpoints)&&(0,a.default)(this.props.cols,e.cols)||this.onWidthChange(e)}},{key:"onWidthChange",value:function(e){var t=this.props,n=t.breakpoints,r=t.cols,i=t.layouts,o=t.compactType,a=this.props.breakpoint||(0,l.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),d=this.state.breakpoint,c=(0,l.getColsFromBreakpoint)(a,r),u=g({},i);if(d!==a||e.breakpoints!==n||e.cols!==r){d in u||(u[d]=(0,s.cloneLayout)(this.state.layout));var p=(0,l.findOrGenerateResponsiveLayout)(u,n,a,d,c,o);p=(0,s.synchronizeLayoutWithChildren)(p,this.props.children,c,o),u[a]=p,this.props.onLayoutChange(p,u),this.props.onBreakpointChange(a,c),this.setState({breakpoint:a,layout:p,cols:c})}var h=j(this.props.margin,a),f=j(this.props.containerPadding,a);this.props.onWidthChange(this.props.width,h,c,f)}},{key:"render",value:function(){var e=this.props,t=(e.breakpoint,e.breakpoints,e.cols,e.layouts,e.margin),n=e.containerPadding,r=(e.onBreakpointChange,e.onLayoutChange,e.onWidthChange,h(e,["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"]));return i.createElement(d.default,p({},r,{margin:j(t,this.state.breakpoint),containerPadding:j(n,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&b(t.prototype,n),r&&b(t,r),c}(i.Component);t.default=w,O(w,"propTypes",{breakpoint:o.default.string,breakpoints:o.default.object,cols:o.default.object,margin:o.default.oneOfType([o.default.array,o.default.object]),containerPadding:o.default.oneOfType([o.default.array,o.default.object]),layouts:function(e,t){if("[object Object]"!==k(e[t]))throw new Error("Layout property must be an object. Received: "+k(e[t]));Object.keys(e[t]).forEach((function(t){if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,s.validateLayout)(e.layouts[t],"layouts."+t)}))},width:o.default.number.isRequired,onBreakpointChange:o.default.func,onLayoutChange:o.default.func,onWidthChange:o.default.func}),O(w,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],onBreakpointChange:s.noop,onLayoutChange:s.noop,onWidthChange:s.noop})},"./node_modules/react-grid-layout/build/calculateUtils.js":(e,t)=>{"use strict";function n(e){var t=e.margin,n=e.containerPadding,r=e.containerWidth,i=e.cols;return(r-t[0]*(i-1)-2*n[0])/i}function r(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function i(e,t,n){return Math.max(Math.min(e,n),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.calcGridColWidth=n,t.calcGridItemWHPx=r,t.calcGridItemPosition=function(e,t,i,o,a,s){var l=e.margin,d=e.containerPadding,c=e.rowHeight,u=n(e),p={};s&&s.resizing?(p.width=Math.round(s.resizing.width),p.height=Math.round(s.resizing.height)):(p.width=r(o,u,l[0]),p.height=r(a,c,l[1]));s&&s.dragging?(p.top=Math.round(s.dragging.top),p.left=Math.round(s.dragging.left)):(p.top=Math.round((c+l[1])*i+d[1]),p.left=Math.round((u+l[0])*t+d[0]));return p},t.calcXY=function(e,t,r,o,a){var s=e.margin,l=e.cols,d=e.rowHeight,c=e.maxRows,u=n(e),p=Math.round((r-s[0])/(u+s[0])),h=Math.round((t-s[1])/(d+s[1]));return p=i(p,0,l-o),h=i(h,0,c-a),{x:p,y:h}},t.calcWH=function(e,t,r,o,a){var s=e.margin,l=e.maxRows,d=e.cols,c=e.rowHeight,u=n(e),p=Math.round((t+s[0])/(u+s[0])),h=Math.round((r+s[1])/(c+s[1]));return p=i(p,0,d-o),h=i(h,0,l-a),{w:p,h}},t.clamp=i},"./node_modules/react-grid-layout/build/components/WidthProvider.js":(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.default=function(e){var t,n;return n=t=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(s,t);var n,r,o=(n=s,r=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(e){return!1}}(),function(){var e,t=g(n);if(r){var i=g(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return h(this,e)});function s(){var e;c(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(f(e=o.call.apply(o,[this].concat(n))),"state",{width:1280}),m(f(e),"elementRef",i.createRef()),m(f(e),"mounted",!1),m(f(e),"onWindowResize",(function(){if(e.mounted){var t=e.elementRef.current;t instanceof HTMLElement&&t.offsetWidth&&e.setState({width:t.offsetWidth})}})),e}return function(e,t,n){t&&u(e.prototype,t);n&&u(e,n)}(s,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var t=this.props,n=t.measureBeforeMount,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,["measureBeforeMount"]);return n&&!this.mounted?i.createElement("div",{className:(0,a.default)(this.props.className,"react-grid-layout"),style:this.props.style,ref:this.elementRef}):i.createElement(e,d({innerRef:this.elementRef},r,this.state))}}]),s}(i.Component),m(t,"defaultProps",{measureBeforeMount:!1}),m(t,"propTypes",{measureBeforeMount:o.default.bool}),n};var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,n&&n.set(e,i);return i}(n("./node_modules/react/index.js")),o=s(n("./node_modules/prop-types/index.js")),a=s(n("./node_modules/react-grid-layout/node_modules/classnames/index.js"));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},"./node_modules/react-grid-layout/build/fastRGLPropsEqual.js":e=>{e.exports=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}},"./node_modules/react-grid-layout/build/responsiveUtils.js":(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBreakpointFromWidth=function(e,t){for(var n=i(e),r=n[0],o=1,a=n.length;o<a;o++){var s=n[o];t>e[s]&&(r=s)}return r},t.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},t.findOrGenerateResponsiveLayout=function(e,t,n,o,a,s){if(e[n])return(0,r.cloneLayout)(e[n]);for(var l=e[o],d=i(t),c=d.slice(d.indexOf(n)),u=0,p=c.length;u<p;u++){var h=c[u];if(e[h]){l=e[h];break}}return l=(0,r.cloneLayout)(l||[]),(0,r.compact)((0,r.correctBounds)(l,{cols:a}),s,a)},t.sortBreakpoints=i;var r=n("./node_modules/react-grid-layout/build/utils.js");function i(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}},"./node_modules/react-grid-layout/build/utils.js":(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottom=d,t.cloneLayout=function(e){for(var t=Array(e.length),n=0,r=e.length;n<r;n++)t[n]=u(e[n]);return t},t.modifyLayout=c,t.withLayoutItem=function(e,t,n){var r=v(e,t);return r?(r=n(u(r)),[e=c(e,r),r]):[e,null]},t.cloneLayoutItem=u,t.childrenEqual=function(e,t){return(0,r.default)(i.default.Children.map(e,(function(e){return e.key})),i.default.Children.map(t,(function(e){return e.key})))},t.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},t.collides=h,t.compact=f,t.compactItem=b,t.correctBounds=y,t.getLayoutItem=v,t.getFirstCollision=x,t.getAllCollisions=S,t.getStatics=M,t.moveElement=O,t.moveElementAwayFromCollision=k,t.perc=function(e){return 100*e+"%"},t.setTransform=function(e){var t=e.top,n=e.left,r=e.width,i=e.height,o="translate(".concat(n,"px,").concat(t,"px)");return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:"".concat(r,"px"),height:"".concat(i,"px"),position:"absolute"}},t.setTopLeft=function(e){var t=e.top,n=e.left,r=e.width,i=e.height;return{top:"".concat(t,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(i,"px"),position:"absolute"}},t.sortLayoutItems=j,t.sortLayoutItemsByRowCol=w,t.sortLayoutItemsByColRow=C,t.synchronizeLayoutWithChildren=function(e,t,n,r){e=e||[];var o=[];return i.default.Children.forEach(t,(function(t,n){var r=v(e,String(t.key));if(r)o[n]=u(r);else{0;var i=t.props["data-grid"]||t.props._grid;o[n]=u(i?s(s({},i),{},{i:t.key}):{w:1,h:1,x:0,y:d(o),i:String(t.key)})}})),f(y(o,{cols:n}),r,n)},t.validateLayout=P,t.compactType=function(e){var t=e||{},n=t.verticalCompact,r=t.compactType;return!1===n?null:r},t.autoBindHandlers=function(e,t){t.forEach((function(t){return e[t]=e[t].bind(e)}))},t.noop=t.fastRGLPropsEqual=void 0;var r=o(n("./node_modules/lodash.isequal/index.js")),i=o(n("./node_modules/react/index.js"));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){for(var t,n=0,r=0,i=e.length;r<i;r++)(t=e[r].y+e[r].h)>n&&(n=t);return n}function c(e,t){for(var n=Array(e.length),r=0,i=e.length;r<i;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function u(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}var p=n("./node_modules/react-grid-layout/build/fastRGLPropsEqual.js");function h(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function f(e,t,n){for(var r=M(e),i=j(e,t),o=Array(e.length),a=0,s=i.length;a<s;a++){var l=u(i[a]);l.static||(l=b(r,l,t,n,i),r.push(l)),o[e.indexOf(i[a])]=l,l.moved=!1}return o}t.fastRGLPropsEqual=p;var g={x:"w",y:"h"};function m(e,t,n,r){var i=g[r];t[r]+=1;for(var o=e.map((function(e){return e.i})).indexOf(t.i)+1;o<e.length;o++){var a=e[o];if(!a.static){if(a.y>t.y+t.h)break;h(t,a)&&m(e,a,n+t[i],r)}}t[r]=n}function b(e,t,n,r,i){var o,a="horizontal"===n;if("vertical"===n)for(t.y=Math.min(d(e),t.y);t.y>0&&!x(e,t);)t.y--;else if(a)for(;t.x>0&&!x(e,t);)t.x--;for(;o=x(e,t);)a?m(i,t,o.x+o.w,"x"):m(i,t,o.y+o.h,"y"),a&&t.x+t.w>r&&(t.x=r-t.w,t.y++);return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function y(e,t){for(var n=M(e),r=0,i=e.length;r<i;r++){var o=e[r];if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),o.static)for(;x(n,o);)o.y++;else n.push(o)}return e}function v(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function x(e,t){for(var n=0,r=e.length;n<r;n++)if(h(e[n],t))return e[n]}function S(e,t){return e.filter((function(e){return h(e,t)}))}function M(e){return e.filter((function(e){return e.static}))}function O(e,t,n,r,i,o,a,s){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;z("Moving element ".concat(t.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(t.x,",").concat(t.y,"]"));var l=t.x,d=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;var c=j(e,a);("vertical"===a&&"number"==typeof r?d>=r:"horizontal"===a&&"number"==typeof n&&l>=n)&&(c=c.reverse());var u=S(c,t);if(o&&u.length)return z("Collision prevented on ".concat(t.i,", reverting.")),t.x=l,t.y=d,t.moved=!1,e;for(var p=0,h=u.length;p<h;p++){var f=u[p];z("Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(f.i," at [").concat(f.x,",").concat(f.y,"]")),f.moved||(e=f.static?k(e,f,t,i,a,s):k(e,t,f,i,a,s))}return e}function k(e,t,n,r,i,o){var a="horizontal"===i,s="horizontal"!==i,l=t.static;if(r){r=!1;var d={x:a?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"};if(!x(e,d))return z("Doing reverse collision on ".concat(n.i," up to [").concat(d.x,",").concat(d.y,"].")),O(e,n,a?d.x:void 0,s?d.y:void 0,r,l,i,o)}return O(e,n,a?n.x+1:void 0,s?n.y+1:void 0,r,l,i,o)}function j(e,t){return"horizontal"===t?C(e):w(e)}function w(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function C(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var r=0,i=e.length;r<i;r++){for(var o=e[r],a=0;a<n.length;a++)if("number"!=typeof o[n[a]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[a]+" must be a number!");if(o.i&&"string"!=typeof o.i)throw new Error("ReactGridLayout: "+t+"["+r+"].i must be a string!");if(void 0!==o.static&&"boolean"!=typeof o.static)throw new Error("ReactGridLayout: "+t+"["+r+"].static must be a boolean!")}}function z(){}t.noop=function(){}},"./node_modules/react-grid-layout/index.js":(e,t,n)=>{e.exports=n("./node_modules/react-grid-layout/build/ReactGridLayout.js").default,e.exports.utils=n("./node_modules/react-grid-layout/build/utils.js"),e.exports.Responsive=n("./node_modules/react-grid-layout/build/ResponsiveReactGridLayout.js").default,e.exports.Responsive.utils=n("./node_modules/react-grid-layout/build/responsiveUtils.js"),e.exports.WidthProvider=n("./node_modules/react-grid-layout/build/components/WidthProvider.js").default},"./node_modules/react-grid-layout/node_modules/classnames/index.js":(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},"./node_modules/react-resizable/build/Resizable.js":(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n("./node_modules/react/index.js")),i=n("./node_modules/react-draggable/build/cjs/cjs.js"),o=n("./node_modules/react-resizable/build/utils.js"),a=n("./node_modules/react-resizable/build/propTypes.js"),s=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){var t,n;function a(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).handleRefs={},t.lastHandleRect=null,t.slack=null,t}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var l=a.prototype;return l.componentWillUnmount=function(){this.resetData()},l.resetData=function(){this.lastHandleRect=this.slack=null},l.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,i=n.maxConstraints,o=n.lockAspectRatio;if(!r&&!i&&!o)return[e,t];if(o){var a=this.props.width/this.props.height,s=e-this.props.width,l=t-this.props.height;Math.abs(s)>Math.abs(l*a)?t=e/a:e=t*a}var d=e,c=t,u=this.slack||[0,0],p=u[0],h=u[1];return e+=p,t+=h,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[p+(d-e),h+(c-t)],[e,t]},l.resizeHandler=function(e,t){var n=this;return function(r,i){var o=i.node,a=i.deltaX,s=i.deltaY;"onResizeStart"===e&&n.resetData();var l=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,d=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(l||d){var c=t[0],u=t[t.length-1],p=o.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===u)a+=p.left-n.lastHandleRect.left;if("n"===c)s+=p.top-n.lastHandleRect.top}n.lastHandleRect=p,"w"===u&&(a=-a),"n"===c&&(s=-s);var h=n.props.width+(l?a/n.props.transformScale:0),f=n.props.height+(d?s/n.props.transformScale:0),g=n.runConstraints(h,f);h=g[0],f=g[1];var m=h!==n.props.width||f!==n.props.height,b="function"==typeof n.props[e]?n.props[e]:null;b&&!("onResize"===e&&!m)&&(null==r.persist||r.persist(),b(r,{node:o,size:{width:h,height:f},handle:t})),"onResizeStop"===e&&n.resetData()}}},l.renderResizeHandle=function(e,t){var n=this.props.handle;if(!n)return r.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e,ref:t});if("function"==typeof n)return n(e,t);var i=u({ref:t},"string"==typeof n.type?{}:{handleAxis:e});return r.cloneElement(n,i)},l.render=function(){var e=this,t=this.props,n=t.children,a=t.className,l=t.draggableOpts,c=(t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart,t.resizeHandles),p=(t.transformScale,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,s));return(0,o.cloneElement)(n,u(u({},p),{},{className:(a?a+" ":"")+"react-resizable",children:[].concat(n.props.children,c.map((function(t){var n,o=null!=(n=e.handleRefs[t])?n:e.handleRefs[t]=r.createRef();return r.createElement(i.DraggableCore,d({},l,{nodeRef:o,key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t,o))})))}))},a}(r.Component);t.default=f,f.propTypes=a.resizableProps,f.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}},"./node_modules/react-resizable/build/ResizableBox.js":(e,t,n)=>{"use strict";t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n("./node_modules/react/index.js")),i=l(n("./node_modules/prop-types/index.js")),o=l(n("./node_modules/react-resizable/build/Resizable.js")),a=n("./node_modules/react-resizable/build/propTypes.js"),s=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={width:t.props.width,height:t.props.height,propsWidth:t.props.width,propsHeight:t.props.height},t.onResize=function(e,n){var r=n.size;t.props.onResize?(null==e.persist||e.persist(),t.setState(r,(function(){return t.props.onResize&&t.props.onResize(e,n)}))):t.setState(r)},t}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),i.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},i.prototype.render=function(){var e=this.props,t=e.handle,n=e.handleSize,i=(e.onResize,e.onResizeStart),a=e.onResizeStop,l=e.draggableOpts,d=e.minConstraints,u=e.maxConstraints,h=e.lockAspectRatio,f=e.axis,g=(e.width,e.height,e.resizeHandles),m=e.style,b=e.transformScale,y=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,s);return r.createElement(o.default,{axis:f,draggableOpts:l,handle:t,handleSize:n,height:this.state.height,lockAspectRatio:h,maxConstraints:u,minConstraints:d,onResizeStart:i,onResize:this.onResize,onResizeStop:a,resizeHandles:g,transformScale:b,width:this.state.width},r.createElement("div",c({},y,{style:p(p({},m),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},i}(r.Component);t.default=g,g.propTypes=p(p({},a.resizableProps),{},{children:i.default.element})},"./node_modules/react-resizable/build/propTypes.js":(e,t,n)=>{"use strict";t.__esModule=!0,t.resizableProps=void 0;var r,i=(r=n("./node_modules/prop-types/index.js"))&&r.__esModule?r:{default:r};n("./node_modules/react-draggable/build/cjs/cjs.js");var o={axis:i.default.oneOf(["both","x","y","none"]),className:i.default.string,children:i.default.element.isRequired,draggableOpts:i.default.shape({allowAnyClick:i.default.bool,cancel:i.default.string,children:i.default.node,disabled:i.default.bool,enableUserSelectHack:i.default.bool,offsetParent:i.default.node,grid:i.default.arrayOf(i.default.number),handle:i.default.string,nodeRef:i.default.object,onStart:i.default.func,onDrag:i.default.func,onStop:i.default.func,onMouseDown:i.default.func,scale:i.default.number}),height:i.default.number.isRequired,handle:i.default.oneOfType([i.default.node,i.default.func]),handleSize:i.default.arrayOf(i.default.number),lockAspectRatio:i.default.bool,maxConstraints:i.default.arrayOf(i.default.number),minConstraints:i.default.arrayOf(i.default.number),onResizeStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,resizeHandles:i.default.arrayOf(i.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:i.default.number,width:i.default.number.isRequired};t.resizableProps=o},"./node_modules/react-resizable/build/utils.js":(e,t,n)=>{"use strict";t.__esModule=!0,t.cloneElement=function(e,t){t.style&&e.props.style&&(t.style=a(a({},e.props.style),t.style));t.className&&e.props.className&&(t.className=e.props.className+" "+t.className);return i.default.cloneElement(e,t)};var r,i=(r=n("./node_modules/react/index.js"))&&r.__esModule?r:{default:r};function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},"./node_modules/react-resizable/index.js":(e,t,n)=>{"use strict";e.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},e.exports.Resizable=n("./node_modules/react-resizable/build/Resizable.js").default,e.exports.ResizableBox=n("./node_modules/react-resizable/build/ResizableBox.js").default},"./node_modules/react-style-proptype/src/css-properties.js":e=>{e.exports=["alignContent","MozAlignContent","WebkitAlignContent","MSAlignContent","OAlignContent","alignItems","MozAlignItems","WebkitAlignItems","MSAlignItems","OAlignItems","alignSelf","MozAlignSelf","WebkitAlignSelf","MSAlignSelf","OAlignSelf","all","MozAll","WebkitAll","MSAll","OAll","animation","MozAnimation","WebkitAnimation","MSAnimation","OAnimation","animationDelay","MozAnimationDelay","WebkitAnimationDelay","MSAnimationDelay","OAnimationDelay","animationDirection","MozAnimationDirection","WebkitAnimationDirection","MSAnimationDirection","OAnimationDirection","animationDuration","MozAnimationDuration","WebkitAnimationDuration","MSAnimationDuration","OAnimationDuration","animationFillMode","MozAnimationFillMode","WebkitAnimationFillMode","MSAnimationFillMode","OAnimationFillMode","animationIterationCount","MozAnimationIterationCount","WebkitAnimationIterationCount","MSAnimationIterationCount","OAnimationIterationCount","animationName","MozAnimationName","WebkitAnimationName","MSAnimationName","OAnimationName","animationPlayState","MozAnimationPlayState","WebkitAnimationPlayState","MSAnimationPlayState","OAnimationPlayState","animationTimingFunction","MozAnimationTimingFunction","WebkitAnimationTimingFunction","MSAnimationTimingFunction","OAnimationTimingFunction","backfaceVisibility","MozBackfaceVisibility","WebkitBackfaceVisibility","MSBackfaceVisibility","OBackfaceVisibility","background","MozBackground","WebkitBackground","MSBackground","OBackground","backgroundAttachment","MozBackgroundAttachment","WebkitBackgroundAttachment","MSBackgroundAttachment","OBackgroundAttachment","backgroundBlendMode","MozBackgroundBlendMode","WebkitBackgroundBlendMode","MSBackgroundBlendMode","OBackgroundBlendMode","backgroundClip","MozBackgroundClip","WebkitBackgroundClip","MSBackgroundClip","OBackgroundClip","backgroundColor","MozBackgroundColor","WebkitBackgroundColor","MSBackgroundColor","OBackgroundColor","backgroundImage","MozBackgroundImage","WebkitBackgroundImage","MSBackgroundImage","OBackgroundImage","backgroundOrigin","MozBackgroundOrigin","WebkitBackgroundOrigin","MSBackgroundOrigin","OBackgroundOrigin","backgroundPosition","MozBackgroundPosition","WebkitBackgroundPosition","MSBackgroundPosition","OBackgroundPosition","backgroundRepeat","MozBackgroundRepeat","WebkitBackgroundRepeat","MSBackgroundRepeat","OBackgroundRepeat","backgroundSize","MozBackgroundSize","WebkitBackgroundSize","MSBackgroundSize","OBackgroundSize","blockSize","MozBlockSize","WebkitBlockSize","MSBlockSize","OBlockSize","border","MozBorder","WebkitBorder","MSBorder","OBorder","borderBlockEnd","MozBorderBlockEnd","WebkitBorderBlockEnd","MSBorderBlockEnd","OBorderBlockEnd","borderBlockEndColor","MozBorderBlockEndColor","WebkitBorderBlockEndColor","MSBorderBlockEndColor","OBorderBlockEndColor","borderBlockEndStyle","MozBorderBlockEndStyle","WebkitBorderBlockEndStyle","MSBorderBlockEndStyle","OBorderBlockEndStyle","borderBlockEndWidth","MozBorderBlockEndWidth","WebkitBorderBlockEndWidth","MSBorderBlockEndWidth","OBorderBlockEndWidth","borderBlockStart","MozBorderBlockStart","WebkitBorderBlockStart","MSBorderBlockStart","OBorderBlockStart","borderBlockStartColor","MozBorderBlockStartColor","WebkitBorderBlockStartColor","MSBorderBlockStartColor","OBorderBlockStartColor","borderBlockStartStyle","MozBorderBlockStartStyle","WebkitBorderBlockStartStyle","MSBorderBlockStartStyle","OBorderBlockStartStyle","borderBlockStartWidth","MozBorderBlockStartWidth","WebkitBorderBlockStartWidth","MSBorderBlockStartWidth","OBorderBlockStartWidth","borderBottom","MozBorderBottom","WebkitBorderBottom","MSBorderBottom","OBorderBottom","borderBottomColor","MozBorderBottomColor","WebkitBorderBottomColor","MSBorderBottomColor","OBorderBottomColor","borderBottomLeftRadius","MozBorderBottomLeftRadius","WebkitBorderBottomLeftRadius","MSBorderBottomLeftRadius","OBorderBottomLeftRadius","borderBottomRightRadius","MozBorderBottomRightRadius","WebkitBorderBottomRightRadius","MSBorderBottomRightRadius","OBorderBottomRightRadius","borderBottomStyle","MozBorderBottomStyle","WebkitBorderBottomStyle","MSBorderBottomStyle","OBorderBottomStyle","borderBottomWidth","MozBorderBottomWidth","WebkitBorderBottomWidth","MSBorderBottomWidth","OBorderBottomWidth","borderCollapse","MozBorderCollapse","WebkitBorderCollapse","MSBorderCollapse","OBorderCollapse","borderColor","MozBorderColor","WebkitBorderColor","MSBorderColor","OBorderColor","borderImage","MozBorderImage","WebkitBorderImage","MSBorderImage","OBorderImage","borderImageOutset","MozBorderImageOutset","WebkitBorderImageOutset","MSBorderImageOutset","OBorderImageOutset","borderImageRepeat","MozBorderImageRepeat","WebkitBorderImageRepeat","MSBorderImageRepeat","OBorderImageRepeat","borderImageSlice","MozBorderImageSlice","WebkitBorderImageSlice","MSBorderImageSlice","OBorderImageSlice","borderImageSource","MozBorderImageSource","WebkitBorderImageSource","MSBorderImageSource","OBorderImageSource","borderImageWidth","MozBorderImageWidth","WebkitBorderImageWidth","MSBorderImageWidth","OBorderImageWidth","borderInlineEnd","MozBorderInlineEnd","WebkitBorderInlineEnd","MSBorderInlineEnd","OBorderInlineEnd","borderInlineEndColor","MozBorderInlineEndColor","WebkitBorderInlineEndColor","MSBorderInlineEndColor","OBorderInlineEndColor","borderInlineEndStyle","MozBorderInlineEndStyle","WebkitBorderInlineEndStyle","MSBorderInlineEndStyle","OBorderInlineEndStyle","borderInlineEndWidth","MozBorderInlineEndWidth","WebkitBorderInlineEndWidth","MSBorderInlineEndWidth","OBorderInlineEndWidth","borderInlineStart","MozBorderInlineStart","WebkitBorderInlineStart","MSBorderInlineStart","OBorderInlineStart","borderInlineStartColor","MozBorderInlineStartColor","WebkitBorderInlineStartColor","MSBorderInlineStartColor","OBorderInlineStartColor","borderInlineStartStyle","MozBorderInlineStartStyle","WebkitBorderInlineStartStyle","MSBorderInlineStartStyle","OBorderInlineStartStyle","borderInlineStartWidth","MozBorderInlineStartWidth","WebkitBorderInlineStartWidth","MSBorderInlineStartWidth","OBorderInlineStartWidth","borderLeft","MozBorderLeft","WebkitBorderLeft","MSBorderLeft","OBorderLeft","borderLeftColor","MozBorderLeftColor","WebkitBorderLeftColor","MSBorderLeftColor","OBorderLeftColor","borderLeftStyle","MozBorderLeftStyle","WebkitBorderLeftStyle","MSBorderLeftStyle","OBorderLeftStyle","borderLeftWidth","MozBorderLeftWidth","WebkitBorderLeftWidth","MSBorderLeftWidth","OBorderLeftWidth","borderRadius","MozBorderRadius","WebkitBorderRadius","MSBorderRadius","OBorderRadius","borderRight","MozBorderRight","WebkitBorderRight","MSBorderRight","OBorderRight","borderRightColor","MozBorderRightColor","WebkitBorderRightColor","MSBorderRightColor","OBorderRightColor","borderRightStyle","MozBorderRightStyle","WebkitBorderRightStyle","MSBorderRightStyle","OBorderRightStyle","borderRightWidth","MozBorderRightWidth","WebkitBorderRightWidth","MSBorderRightWidth","OBorderRightWidth","borderSpacing","MozBorderSpacing","WebkitBorderSpacing","MSBorderSpacing","OBorderSpacing","borderStyle","MozBorderStyle","WebkitBorderStyle","MSBorderStyle","OBorderStyle","borderTop","MozBorderTop","WebkitBorderTop","MSBorderTop","OBorderTop","borderTopColor","MozBorderTopColor","WebkitBorderTopColor","MSBorderTopColor","OBorderTopColor","borderTopLeftRadius","MozBorderTopLeftRadius","WebkitBorderTopLeftRadius","MSBorderTopLeftRadius","OBorderTopLeftRadius","borderTopRightRadius","MozBorderTopRightRadius","WebkitBorderTopRightRadius","MSBorderTopRightRadius","OBorderTopRightRadius","borderTopStyle","MozBorderTopStyle","WebkitBorderTopStyle","MSBorderTopStyle","OBorderTopStyle","borderTopWidth","MozBorderTopWidth","WebkitBorderTopWidth","MSBorderTopWidth","OBorderTopWidth","borderWidth","MozBorderWidth","WebkitBorderWidth","MSBorderWidth","OBorderWidth","bottom","MozBottom","WebkitBottom","MSBottom","OBottom","boxDecorationBreak","MozBoxDecorationBreak","WebkitBoxDecorationBreak","MSBoxDecorationBreak","OBoxDecorationBreak","boxShadow","MozBoxShadow","WebkitBoxShadow","MSBoxShadow","OBoxShadow","boxSizing","MozBoxSizing","WebkitBoxSizing","MSBoxSizing","OBoxSizing","breakAfter","MozBreakAfter","WebkitBreakAfter","MSBreakAfter","OBreakAfter","breakBefore","MozBreakBefore","WebkitBreakBefore","MSBreakBefore","OBreakBefore","breakInside","MozBreakInside","WebkitBreakInside","MSBreakInside","OBreakInside","captionSide","MozCaptionSide","WebkitCaptionSide","MSCaptionSide","OCaptionSide","caretColor","MozCaretColor","WebkitCaretColor","MSCaretColor","OCaretColor","ch","MozCh","WebkitCh","MSCh","OCh","clear","MozClear","WebkitClear","MSClear","OClear","clip","MozClip","WebkitClip","MSClip","OClip","clipPath","MozClipPath","WebkitClipPath","MSClipPath","OClipPath","cm","MozCm","WebkitCm","MSCm","OCm","color","MozColor","WebkitColor","MSColor","OColor","columnCount","MozColumnCount","WebkitColumnCount","MSColumnCount","OColumnCount","columnFill","MozColumnFill","WebkitColumnFill","MSColumnFill","OColumnFill","columnGap","MozColumnGap","WebkitColumnGap","MSColumnGap","OColumnGap","columnRule","MozColumnRule","WebkitColumnRule","MSColumnRule","OColumnRule","columnRuleColor","MozColumnRuleColor","WebkitColumnRuleColor","MSColumnRuleColor","OColumnRuleColor","columnRuleStyle","MozColumnRuleStyle","WebkitColumnRuleStyle","MSColumnRuleStyle","OColumnRuleStyle","columnRuleWidth","MozColumnRuleWidth","WebkitColumnRuleWidth","MSColumnRuleWidth","OColumnRuleWidth","columnSpan","MozColumnSpan","WebkitColumnSpan","MSColumnSpan","OColumnSpan","columnWidth","MozColumnWidth","WebkitColumnWidth","MSColumnWidth","OColumnWidth","columns","MozColumns","WebkitColumns","MSColumns","OColumns","content","MozContent","WebkitContent","MSContent","OContent","counterIncrement","MozCounterIncrement","WebkitCounterIncrement","MSCounterIncrement","OCounterIncrement","counterReset","MozCounterReset","WebkitCounterReset","MSCounterReset","OCounterReset","cursor","MozCursor","WebkitCursor","MSCursor","OCursor","deg","MozDeg","WebkitDeg","MSDeg","ODeg","direction","MozDirection","WebkitDirection","MSDirection","ODirection","display","MozDisplay","WebkitDisplay","MSDisplay","ODisplay","dpcm","MozDpcm","WebkitDpcm","MSDpcm","ODpcm","dpi","MozDpi","WebkitDpi","MSDpi","ODpi","dppx","MozDppx","WebkitDppx","MSDppx","ODppx","em","MozEm","WebkitEm","MSEm","OEm","emptyCells","MozEmptyCells","WebkitEmptyCells","MSEmptyCells","OEmptyCells","ex","MozEx","WebkitEx","MSEx","OEx","filter","MozFilter","WebkitFilter","MSFilter","OFilter","flexBasis","MozFlexBasis","WebkitFlexBasis","MSFlexBasis","OFlexBasis","flexDirection","MozFlexDirection","WebkitFlexDirection","MSFlexDirection","OFlexDirection","flexFlow","MozFlexFlow","WebkitFlexFlow","MSFlexFlow","OFlexFlow","flexGrow","MozFlexGrow","WebkitFlexGrow","MSFlexGrow","OFlexGrow","flexShrink","MozFlexShrink","WebkitFlexShrink","MSFlexShrink","OFlexShrink","flexWrap","MozFlexWrap","WebkitFlexWrap","MSFlexWrap","OFlexWrap","float","MozFloat","WebkitFloat","MSFloat","OFloat","font","MozFont","WebkitFont","MSFont","OFont","fontFamily","MozFontFamily","WebkitFontFamily","MSFontFamily","OFontFamily","fontFeatureSettings","MozFontFeatureSettings","WebkitFontFeatureSettings","MSFontFeatureSettings","OFontFeatureSettings","fontKerning","MozFontKerning","WebkitFontKerning","MSFontKerning","OFontKerning","fontLanguageOverride","MozFontLanguageOverride","WebkitFontLanguageOverride","MSFontLanguageOverride","OFontLanguageOverride","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","fontSizeAdjust","MozFontSizeAdjust","WebkitFontSizeAdjust","MSFontSizeAdjust","OFontSizeAdjust","fontStretch","MozFontStretch","WebkitFontStretch","MSFontStretch","OFontStretch","fontStyle","MozFontStyle","WebkitFontStyle","MSFontStyle","OFontStyle","fontSynthesis","MozFontSynthesis","WebkitFontSynthesis","MSFontSynthesis","OFontSynthesis","fontVariant","MozFontVariant","WebkitFontVariant","MSFontVariant","OFontVariant","fontVariantAlternates","MozFontVariantAlternates","WebkitFontVariantAlternates","MSFontVariantAlternates","OFontVariantAlternates","fontVariantCaps","MozFontVariantCaps","WebkitFontVariantCaps","MSFontVariantCaps","OFontVariantCaps","fontVariantEastAsian","MozFontVariantEastAsian","WebkitFontVariantEastAsian","MSFontVariantEastAsian","OFontVariantEastAsian","fontVariantLigatures","MozFontVariantLigatures","WebkitFontVariantLigatures","MSFontVariantLigatures","OFontVariantLigatures","fontVariantNumeric","MozFontVariantNumeric","WebkitFontVariantNumeric","MSFontVariantNumeric","OFontVariantNumeric","fontVariantPosition","MozFontVariantPosition","WebkitFontVariantPosition","MSFontVariantPosition","OFontVariantPosition","fontWeight","MozFontWeight","WebkitFontWeight","MSFontWeight","OFontWeight","fr","MozFr","WebkitFr","MSFr","OFr","grad","MozGrad","WebkitGrad","MSGrad","OGrad","grid","MozGrid","WebkitGrid","MSGrid","OGrid","gridArea","MozGridArea","WebkitGridArea","MSGridArea","OGridArea","gridAutoColumns","MozGridAutoColumns","WebkitGridAutoColumns","MSGridAutoColumns","OGridAutoColumns","gridAutoFlow","MozGridAutoFlow","WebkitGridAutoFlow","MSGridAutoFlow","OGridAutoFlow","gridAutoRows","MozGridAutoRows","WebkitGridAutoRows","MSGridAutoRows","OGridAutoRows","gridColumn","MozGridColumn","WebkitGridColumn","MSGridColumn","OGridColumn","gridColumnEnd","MozGridColumnEnd","WebkitGridColumnEnd","MSGridColumnEnd","OGridColumnEnd","gridColumnGap","MozGridColumnGap","WebkitGridColumnGap","MSGridColumnGap","OGridColumnGap","gridColumnStart","MozGridColumnStart","WebkitGridColumnStart","MSGridColumnStart","OGridColumnStart","gridGap","MozGridGap","WebkitGridGap","MSGridGap","OGridGap","gridRow","MozGridRow","WebkitGridRow","MSGridRow","OGridRow","gridRowEnd","MozGridRowEnd","WebkitGridRowEnd","MSGridRowEnd","OGridRowEnd","gridRowGap","MozGridRowGap","WebkitGridRowGap","MSGridRowGap","OGridRowGap","gridRowStart","MozGridRowStart","WebkitGridRowStart","MSGridRowStart","OGridRowStart","gridTemplate","MozGridTemplate","WebkitGridTemplate","MSGridTemplate","OGridTemplate","gridTemplateAreas","MozGridTemplateAreas","WebkitGridTemplateAreas","MSGridTemplateAreas","OGridTemplateAreas","gridTemplateColumns","MozGridTemplateColumns","WebkitGridTemplateColumns","MSGridTemplateColumns","OGridTemplateColumns","gridTemplateRows","MozGridTemplateRows","WebkitGridTemplateRows","MSGridTemplateRows","OGridTemplateRows","height","MozHeight","WebkitHeight","MSHeight","OHeight","hyphens","MozHyphens","WebkitHyphens","MSHyphens","OHyphens","hz","MozHz","WebkitHz","MSHz","OHz","imageOrientation","MozImageOrientation","WebkitImageOrientation","MSImageOrientation","OImageOrientation","imageRendering","MozImageRendering","WebkitImageRendering","MSImageRendering","OImageRendering","imageResolution","MozImageResolution","WebkitImageResolution","MSImageResolution","OImageResolution","imeMode","MozImeMode","WebkitImeMode","MSImeMode","OImeMode","in","MozIn","WebkitIn","MSIn","OIn","inherit","MozInherit","WebkitInherit","MSInherit","OInherit","initial","MozInitial","WebkitInitial","MSInitial","OInitial","inlineSize","MozInlineSize","WebkitInlineSize","MSInlineSize","OInlineSize","isolation","MozIsolation","WebkitIsolation","MSIsolation","OIsolation","justifyContent","MozJustifyContent","WebkitJustifyContent","MSJustifyContent","OJustifyContent","khz","MozKhz","WebkitKhz","MSKhz","OKhz","left","MozLeft","WebkitLeft","MSLeft","OLeft","letterSpacing","MozLetterSpacing","WebkitLetterSpacing","MSLetterSpacing","OLetterSpacing","lineBreak","MozLineBreak","WebkitLineBreak","MSLineBreak","OLineBreak","lineHeight","MozLineHeight","WebkitLineHeight","MSLineHeight","OLineHeight","listStyle","MozListStyle","WebkitListStyle","MSListStyle","OListStyle","listStyleImage","MozListStyleImage","WebkitListStyleImage","MSListStyleImage","OListStyleImage","listStylePosition","MozListStylePosition","WebkitListStylePosition","MSListStylePosition","OListStylePosition","listStyleType","MozListStyleType","WebkitListStyleType","MSListStyleType","OListStyleType","margin","MozMargin","WebkitMargin","MSMargin","OMargin","marginBlockEnd","MozMarginBlockEnd","WebkitMarginBlockEnd","MSMarginBlockEnd","OMarginBlockEnd","marginBlockStart","MozMarginBlockStart","WebkitMarginBlockStart","MSMarginBlockStart","OMarginBlockStart","marginBottom","MozMarginBottom","WebkitMarginBottom","MSMarginBottom","OMarginBottom","marginInlineEnd","MozMarginInlineEnd","WebkitMarginInlineEnd","MSMarginInlineEnd","OMarginInlineEnd","marginInlineStart","MozMarginInlineStart","WebkitMarginInlineStart","MSMarginInlineStart","OMarginInlineStart","marginLeft","MozMarginLeft","WebkitMarginLeft","MSMarginLeft","OMarginLeft","marginRight","MozMarginRight","WebkitMarginRight","MSMarginRight","OMarginRight","marginTop","MozMarginTop","WebkitMarginTop","MSMarginTop","OMarginTop","mask","MozMask","WebkitMask","MSMask","OMask","maskClip","MozMaskClip","WebkitMaskClip","MSMaskClip","OMaskClip","maskComposite","MozMaskComposite","WebkitMaskComposite","MSMaskComposite","OMaskComposite","maskImage","MozMaskImage","WebkitMaskImage","MSMaskImage","OMaskImage","maskMode","MozMaskMode","WebkitMaskMode","MSMaskMode","OMaskMode","maskOrigin","MozMaskOrigin","WebkitMaskOrigin","MSMaskOrigin","OMaskOrigin","maskPosition","MozMaskPosition","WebkitMaskPosition","MSMaskPosition","OMaskPosition","maskRepeat","MozMaskRepeat","WebkitMaskRepeat","MSMaskRepeat","OMaskRepeat","maskSize","MozMaskSize","WebkitMaskSize","MSMaskSize","OMaskSize","maskType","MozMaskType","WebkitMaskType","MSMaskType","OMaskType","maxHeight","MozMaxHeight","WebkitMaxHeight","MSMaxHeight","OMaxHeight","maxWidth","MozMaxWidth","WebkitMaxWidth","MSMaxWidth","OMaxWidth","minBlockSize","MozMinBlockSize","WebkitMinBlockSize","MSMinBlockSize","OMinBlockSize","minHeight","MozMinHeight","WebkitMinHeight","MSMinHeight","OMinHeight","minInlineSize","MozMinInlineSize","WebkitMinInlineSize","MSMinInlineSize","OMinInlineSize","minWidth","MozMinWidth","WebkitMinWidth","MSMinWidth","OMinWidth","mixBlendMode","MozMixBlendMode","WebkitMixBlendMode","MSMixBlendMode","OMixBlendMode","mm","MozMm","WebkitMm","MSMm","OMm","ms","MozMs","WebkitMs","MSMs","OMs","objectFit","MozObjectFit","WebkitObjectFit","MSObjectFit","OObjectFit","objectPosition","MozObjectPosition","WebkitObjectPosition","MSObjectPosition","OObjectPosition","offsetBlockEnd","MozOffsetBlockEnd","WebkitOffsetBlockEnd","MSOffsetBlockEnd","OOffsetBlockEnd","offsetBlockStart","MozOffsetBlockStart","WebkitOffsetBlockStart","MSOffsetBlockStart","OOffsetBlockStart","offsetInlineEnd","MozOffsetInlineEnd","WebkitOffsetInlineEnd","MSOffsetInlineEnd","OOffsetInlineEnd","offsetInlineStart","MozOffsetInlineStart","WebkitOffsetInlineStart","MSOffsetInlineStart","OOffsetInlineStart","opacity","MozOpacity","WebkitOpacity","MSOpacity","OOpacity","order","MozOrder","WebkitOrder","MSOrder","OOrder","orphans","MozOrphans","WebkitOrphans","MSOrphans","OOrphans","outline","MozOutline","WebkitOutline","MSOutline","OOutline","outlineColor","MozOutlineColor","WebkitOutlineColor","MSOutlineColor","OOutlineColor","outlineOffset","MozOutlineOffset","WebkitOutlineOffset","MSOutlineOffset","OOutlineOffset","outlineStyle","MozOutlineStyle","WebkitOutlineStyle","MSOutlineStyle","OOutlineStyle","outlineWidth","MozOutlineWidth","WebkitOutlineWidth","MSOutlineWidth","OOutlineWidth","overflow","MozOverflow","WebkitOverflow","MSOverflow","OOverflow","overflowWrap","MozOverflowWrap","WebkitOverflowWrap","MSOverflowWrap","OOverflowWrap","overflowX","MozOverflowX","WebkitOverflowX","MSOverflowX","OOverflowX","overflowY","MozOverflowY","WebkitOverflowY","MSOverflowY","OOverflowY","padding","MozPadding","WebkitPadding","MSPadding","OPadding","paddingBlockEnd","MozPaddingBlockEnd","WebkitPaddingBlockEnd","MSPaddingBlockEnd","OPaddingBlockEnd","paddingBlockStart","MozPaddingBlockStart","WebkitPaddingBlockStart","MSPaddingBlockStart","OPaddingBlockStart","paddingBottom","MozPaddingBottom","WebkitPaddingBottom","MSPaddingBottom","OPaddingBottom","paddingInlineEnd","MozPaddingInlineEnd","WebkitPaddingInlineEnd","MSPaddingInlineEnd","OPaddingInlineEnd","paddingInlineStart","MozPaddingInlineStart","WebkitPaddingInlineStart","MSPaddingInlineStart","OPaddingInlineStart","paddingLeft","MozPaddingLeft","WebkitPaddingLeft","MSPaddingLeft","OPaddingLeft","paddingRight","MozPaddingRight","WebkitPaddingRight","MSPaddingRight","OPaddingRight","paddingTop","MozPaddingTop","WebkitPaddingTop","MSPaddingTop","OPaddingTop","pageBreakAfter","MozPageBreakAfter","WebkitPageBreakAfter","MSPageBreakAfter","OPageBreakAfter","pageBreakBefore","MozPageBreakBefore","WebkitPageBreakBefore","MSPageBreakBefore","OPageBreakBefore","pageBreakInside","MozPageBreakInside","WebkitPageBreakInside","MSPageBreakInside","OPageBreakInside","pc","MozPc","WebkitPc","MSPc","OPc","perspective","MozPerspective","WebkitPerspective","MSPerspective","OPerspective","perspectiveOrigin","MozPerspectiveOrigin","WebkitPerspectiveOrigin","MSPerspectiveOrigin","OPerspectiveOrigin","pointerEvents","MozPointerEvents","WebkitPointerEvents","MSPointerEvents","OPointerEvents","position","MozPosition","WebkitPosition","MSPosition","OPosition","pt","MozPt","WebkitPt","MSPt","OPt","px","MozPx","WebkitPx","MSPx","OPx","q","MozQ","WebkitQ","MSQ","OQ","quotes","MozQuotes","WebkitQuotes","MSQuotes","OQuotes","rad","MozRad","WebkitRad","MSRad","ORad","rem","MozRem","WebkitRem","MSRem","ORem","resize","MozResize","WebkitResize","MSResize","OResize","revert","MozRevert","WebkitRevert","MSRevert","ORevert","right","MozRight","WebkitRight","MSRight","ORight","rubyAlign","MozRubyAlign","WebkitRubyAlign","MSRubyAlign","ORubyAlign","rubyMerge","MozRubyMerge","WebkitRubyMerge","MSRubyMerge","ORubyMerge","rubyPosition","MozRubyPosition","WebkitRubyPosition","MSRubyPosition","ORubyPosition","s","MozS","WebkitS","MSS","OS","scrollBehavior","MozScrollBehavior","WebkitScrollBehavior","MSScrollBehavior","OScrollBehavior","scrollSnapCoordinate","MozScrollSnapCoordinate","WebkitScrollSnapCoordinate","MSScrollSnapCoordinate","OScrollSnapCoordinate","scrollSnapDestination","MozScrollSnapDestination","WebkitScrollSnapDestination","MSScrollSnapDestination","OScrollSnapDestination","scrollSnapType","MozScrollSnapType","WebkitScrollSnapType","MSScrollSnapType","OScrollSnapType","shapeImageThreshold","MozShapeImageThreshold","WebkitShapeImageThreshold","MSShapeImageThreshold","OShapeImageThreshold","shapeMargin","MozShapeMargin","WebkitShapeMargin","MSShapeMargin","OShapeMargin","shapeOutside","MozShapeOutside","WebkitShapeOutside","MSShapeOutside","OShapeOutside","tabSize","MozTabSize","WebkitTabSize","MSTabSize","OTabSize","tableLayout","MozTableLayout","WebkitTableLayout","MSTableLayout","OTableLayout","textAlign","MozTextAlign","WebkitTextAlign","MSTextAlign","OTextAlign","textAlignLast","MozTextAlignLast","WebkitTextAlignLast","MSTextAlignLast","OTextAlignLast","textCombineUpright","MozTextCombineUpright","WebkitTextCombineUpright","MSTextCombineUpright","OTextCombineUpright","textDecoration","MozTextDecoration","WebkitTextDecoration","MSTextDecoration","OTextDecoration","textDecorationColor","MozTextDecorationColor","WebkitTextDecorationColor","MSTextDecorationColor","OTextDecorationColor","textDecorationLine","MozTextDecorationLine","WebkitTextDecorationLine","MSTextDecorationLine","OTextDecorationLine","textDecorationStyle","MozTextDecorationStyle","WebkitTextDecorationStyle","MSTextDecorationStyle","OTextDecorationStyle","textEmphasis","MozTextEmphasis","WebkitTextEmphasis","MSTextEmphasis","OTextEmphasis","textEmphasisColor","MozTextEmphasisColor","WebkitTextEmphasisColor","MSTextEmphasisColor","OTextEmphasisColor","textEmphasisPosition","MozTextEmphasisPosition","WebkitTextEmphasisPosition","MSTextEmphasisPosition","OTextEmphasisPosition","textEmphasisStyle","MozTextEmphasisStyle","WebkitTextEmphasisStyle","MSTextEmphasisStyle","OTextEmphasisStyle","textIndent","MozTextIndent","WebkitTextIndent","MSTextIndent","OTextIndent","textOrientation","MozTextOrientation","WebkitTextOrientation","MSTextOrientation","OTextOrientation","textOverflow","MozTextOverflow","WebkitTextOverflow","MSTextOverflow","OTextOverflow","textRendering","MozTextRendering","WebkitTextRendering","MSTextRendering","OTextRendering","textShadow","MozTextShadow","WebkitTextShadow","MSTextShadow","OTextShadow","textTransform","MozTextTransform","WebkitTextTransform","MSTextTransform","OTextTransform","textUnderlinePosition","MozTextUnderlinePosition","WebkitTextUnderlinePosition","MSTextUnderlinePosition","OTextUnderlinePosition","top","MozTop","WebkitTop","MSTop","OTop","touchAction","MozTouchAction","WebkitTouchAction","MSTouchAction","OTouchAction","transform","MozTransform","WebkitTransform","msTransform","OTransform","transformBox","MozTransformBox","WebkitTransformBox","MSTransformBox","OTransformBox","transformOrigin","MozTransformOrigin","WebkitTransformOrigin","MSTransformOrigin","OTransformOrigin","transformStyle","MozTransformStyle","WebkitTransformStyle","MSTransformStyle","OTransformStyle","transition","MozTransition","WebkitTransition","MSTransition","OTransition","transitionDelay","MozTransitionDelay","WebkitTransitionDelay","MSTransitionDelay","OTransitionDelay","transitionDuration","MozTransitionDuration","WebkitTransitionDuration","MSTransitionDuration","OTransitionDuration","transitionProperty","MozTransitionProperty","WebkitTransitionProperty","MSTransitionProperty","OTransitionProperty","transitionTimingFunction","MozTransitionTimingFunction","WebkitTransitionTimingFunction","MSTransitionTimingFunction","OTransitionTimingFunction","turn","MozTurn","WebkitTurn","MSTurn","OTurn","unicodeBidi","MozUnicodeBidi","WebkitUnicodeBidi","MSUnicodeBidi","OUnicodeBidi","unset","MozUnset","WebkitUnset","MSUnset","OUnset","verticalAlign","MozVerticalAlign","WebkitVerticalAlign","MSVerticalAlign","OVerticalAlign","vh","MozVh","WebkitVh","MSVh","OVh","visibility","MozVisibility","WebkitVisibility","MSVisibility","OVisibility","vmax","MozVmax","WebkitVmax","MSVmax","OVmax","vmin","MozVmin","WebkitVmin","MSVmin","OVmin","vw","MozVw","WebkitVw","MSVw","OVw","whiteSpace","MozWhiteSpace","WebkitWhiteSpace","MSWhiteSpace","OWhiteSpace","widows","MozWidows","WebkitWidows","MSWidows","OWidows","width","MozWidth","WebkitWidth","MSWidth","OWidth","willChange","MozWillChange","WebkitWillChange","MSWillChange","OWillChange","wordBreak","MozWordBreak","WebkitWordBreak","MSWordBreak","OWordBreak","wordSpacing","MozWordSpacing","WebkitWordSpacing","MSWordSpacing","OWordSpacing","wordWrap","MozWordWrap","WebkitWordWrap","MSWordWrap","OWordWrap","writingMode","MozWritingMode","WebkitWritingMode","MSWritingMode","OWritingMode","zIndex","MozZIndex","WebkitZIndex","MSZIndex","OZIndex","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","flex","MozFlex","WebkitFlex","MSFlex","OFlex","fr","MozFr","WebkitFr","MSFr","OFr","overflowScrolling","MozOverflowScrolling","WebkitOverflowScrolling","MSOverflowScrolling","OOverflowScrolling","userSelect","MozUserSelect","WebkitUserSelect","MSUserSelect","OUserSelect"]},"./node_modules/react-style-proptype/src/index.js":(e,t,n)=>{var r=n("./node_modules/react-style-proptype/src/css-properties.js"),i=n("./node_modules/prop-types/index.js");e.exports=function(e,t,n){var i=e[t];if(i){var o=[];if(Object.keys(i).forEach((function(e){-1===r.indexOf(e)&&o.push(e)})),o.length)throw new Error("Prop "+t+" passed to "+n+". Has invalid keys "+o.join(", "))}},e.exports.isRequired=function(t,n,r){if(!t[n])throw new Error("Prop "+n+" passed to "+r+" is required");return e.exports(t,n,r)},e.exports.supportingArrays=i.oneOfType([i.arrayOf(e.exports),e.exports])}}]);
//# sourceMappingURL=DashboardPage.8128b05ac04b15cbf98d.js.map