(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("./.yarn/__virtual__/@emotion-css-virtual-72c314ddb1/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/dist/emotion-css.esm.js"),a=n("./packages/grafana-ui/src/index.ts"),i=(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"),n("./public/app/features/alerting/unified/components/DynamicTable.tsx")),o=n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/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,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,s);const l=(0,a.useStyles2)(d);return(0,o.jsx)(i.t,Object.assign({renderExpandedContent:t?(e,n,a)=>(0,o.jsxs)(o.Fragment,{children:[!(n===a.length-1)&&(0,o.jsx)("div",{className:(0,r.cx)(l.contentGuideline,l.guideline)}),t(e,n,a)]}):void 0,renderPrefixHeader:()=>(0,o.jsx)("div",{className:l.relative,children:(0,o.jsx)("div",{className:(0,r.cx)(l.headerGuideline,l.guideline)})}),renderPrefixCell:(e,t,n)=>(0,o.jsxs)("div",{className:l.relative,children:[(0,o.jsx)("div",{className:(0,r.cx)(l.topGuideline,l.guideline)}),!(t===n.length-1)&&(0,o.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:()=>w});var r=n("./packages/grafana-ui/src/index.ts"),a=n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"),i=n("./.yarn/__virtual__/@emotion-css-virtual-72c314ddb1/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/dist/emotion-css.esm.js"),o=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("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/jsx-runtime.js");const f=e=>{let{rule:t}=e;const n=(0,r.useStyles2)(g),{promRule:a,namespace:{rulesSource:i}}=t,f=Object.entries(t.annotations).filter((e=>{let[t,n]=e;return!!n.trim()}));return(0,h.jsxs)("div",{children:[(0,h.jsx)(l.f,{rule:t,rulesSource:i}),(0,h.jsxs)("div",{className:n.wrapper,children:[(0,h.jsxs)("div",{className:n.leftSide,children:[!!t.labels&&!!Object.keys(t.labels).length&&(0,h.jsx)(s.C,{label:"Labels",horizontal:!0,children:(0,h.jsx)(o.s,{labels:t.labels})}),(0,h.jsx)(u.C,{rulesSource:i,rule:t,annotations:f}),(0,h.jsx)(p.J,{annotations:f})]}),(0,h.jsx)("div",{className:n.rightSide,children:(0,h.jsx)(d.C,{rulesSource:i,rule:t})})]}),(0,h.jsx)(c.M,{promRule:a})]})},g=e=>({wrapper:i.css`
    display: flex;
    flex-direction: row;
    ${e.breakpoints.down("md")} {
      flex-direction: column;
    }
  `,leftSide:i.css`
    flex: 1;
  `,rightSide:i.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"),S=n("./public/app/features/alerting/unified/components/rules/RuleHealth.tsx"),x=n("./public/app/features/alerting/unified/components/DynamicTable.tsx"),M=n("./public/app/features/alerting/unified/components/DynamicTableWithGuidelines.tsx");const w=e=>{let{rules:t,className:n,showGuidelines:o=!1,emptyMessage:s="No rules found.",showGroupColumn:l=!1,showSummaryColumn:d=!1}=e;const c=(0,r.useStyles2)(k),u=(0,i.cx)(c.wrapper,n,{[c.wrapperMargin]:o}),p=(0,a.useMemo)((()=>{const e=[];return t.map(((t,n)=>{var r;let a=JSON.stringify([null===(r=t.promRule)||void 0===r?void 0:r.type,t.labels,t.query,t.name,t.annotations]);return e.includes(a)&&(a+=`-${n}`),e.push(a),{id:a,data:t}}))}),[t]),g=function(e,t){const n=(0,b.h)();return(0,a.useMemo)((()=>{const r=[{id:"state",label:"State",renderCell:e=>{let{data:t}=e;const{namespace:r}=t,{rulesSource:a}=r,{promRule:i,rulerRule:o}=t,s=!(!n(a)||!i||o),l=!(!n(a)||!o||i);return(0,h.jsx)(v.p,{rule:t,isDeleting:s,isCreating:l})},size:"165px"},{id:"name",label:"Name",renderCell:e=>{let{data:t}=e;return t.name},size:5},{id:"health",label:"Health",renderCell:e=>{let{data:{promRule:t}}=e;return t?(0,h.jsx)(S.V,{rule:t}):null},size:"75px"}];return e&&r.push({id:"summary",label:"Summary",renderCell:e=>{var t;let{data:n}=e;return null!==(t=n.annotations[y.q6.summary])&&void 0!==t?t:""},size:5}),t&&r.push({id:"group",label:"Group",renderCell:e=>{let{data:t}=e;const{namespace:n,group:r}=t,{rulesSource:a}=n;return(0,m.jq)(a)?`${n.name} > ${r.name}`:n.name},size:5}),r}),[n,e,t])}(d,l);if(!t.length)return(0,h.jsx)("div",{className:(0,i.cx)(u,c.emptyMessage),children:s});const w=o?M.F:x.t;return(0,h.jsx)("div",{className:u,"data-testid":"rules-table",children:(0,h.jsx)(w,{cols:g,isExpandable:!0,items:p,renderExpandedContent:e=>{let{data:t}=e;return(0,h.jsx)(f,{rule:t})}})})},k=e=>({wrapperMargin:i.css`
    ${e.breakpoints.up("md")} {
      margin-left: 36px;
    }
  `,emptyMessage:i.css`
    padding: ${e.spacing(1)};
  `,wrapper:i.css`
    width: auto;
    background-color: ${e.colors.background.secondary};
    border-radius: ${e.shape.borderRadius()};
  `})},"./public/app/features/alerting/unified/hooks/useHasRuler.ts":(e,t,n)=>{"use strict";n.d(t,{h:()=>o});var r=n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"),a=n("./public/app/features/alerting/unified/utils/datasource.ts"),i=n("./public/app/features/alerting/unified/hooks/useUnifiedAlertingSelector.ts");function o(){const e=(0,i._)((e=>e.rulerRules));return(0,r.useCallback)((t=>{var n;const r="string"==typeof t?t:t.name;return r===a.GC||!(null===(n=e[r])||void 0===n||!n.result)}),[e])}},"./public/app/features/dashboard/containers/DashboardPage.tsx":(e,t,n)=>{"use strict";n.r(t),n.d(t,{DashboardPage:()=>fi,UnthemedDashboardPage:()=>pi,default:()=>gi,getStyles:()=>hi,mapStateToProps:()=>di});var r,a,i=n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"),o=n("./.yarn/__virtual__/@emotion-css-virtual-72c314ddb1/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/dist/emotion-css.esm.js"),s=n("./.yarn/__virtual__/react-redux-virtual-7ad20a440e/3/opt/drone/yarncache/react-redux-npm-7.2.6-134f5ed64d-0bf142ce0d.zip/node_modules/react-redux/es/index.js"),l=n("./packages/grafana-runtime/src/index.ts"),d=n("./packages/grafana-e2e-selectors/src/index.ts"),c=n("./packages/grafana-ui/src/index.ts"),u=n("./public/app/core/copy/appNotification.ts"),p=n("./public/app/core/components/Branding/Branding.tsx"),h=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/index.js"),f=n.n(h),g=n("../../opt/drone/yarncache/classnames-npm-2.3.1-f2ae0a8d3c-14db8889d5.zip/node_modules/classnames/index.js"),m=n.n(g),b=n("./.yarn/__virtual__/react-virtualized-auto-sizer-virtual-b5ab366cb0/3/opt/drone/yarncache/react-virtualized-auto-sizer-npm-1.0.6-50869b8392-81270e9d32.zip/node_modules/react-virtualized-auto-sizer/dist/index.esm.js"),y=n("../../opt/drone/yarncache/lodash-npm-4.17.21-6382451519-eb835a2e51.zip/node_modules/lodash/lodash.js"),v=n("../../opt/drone/yarncache/tinycolor2-npm-1.4.2-462ba30c26-57ed262e08.zip/node_modules/tinycolor2/tinycolor.js"),S=n.n(v),x=n("./public/app/core/config.ts"),M=n("./public/app/core/store.ts"),w=n("./public/app/features/dashboard/state/reducers.ts"),k=n("./public/app/core/constants.ts"),O=n("./public/app/features/library-panels/utils.ts"),j=n("./public/app/features/library-panels/components/LibraryPanelsSearch/LibraryPanelsSearch.tsx"),z=n("./public/app/core/components/CardButton.tsx"),C=n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/jsx-runtime.js");const P={addPanel:w.tq},R=(0,s.connect)(void 0,P)((e=>{let{panel:t,dashboard:n}=e;const[r,a]=(0,i.useState)(!1),s=(0,c.useStyles2)(B),u=(0,i.useMemo)((()=>(()=>{const e=(0,y.chain)(x.ZP.panels).filter({hideFromList:!1}).map((e=>e)).value(),t=[],n=M.Z.get(k.zF);if(n){const r=JSON.parse(n),a=(0,y.find)(e,{id:r.type});if(a){const e=(0,y.cloneDeep)(a);e.name=r.title,e.sort=-1,e.defaults=r,t.push(e)}}return(0,y.sortBy)(t,"sort")})()),[]);return(0,C.jsx)("div",{className:s.wrapper,children:(0,C.jsxs)("div",{className:(0,o.cx)("panel-container",s.callToAction),children:[(0,C.jsx)(T,{onCancel:e=>{e.preventDefault(),n.removePanel(t)},onBack:r?()=>{a(!1)}:void 0,styles:s,children:r?"Add panel from panel library":"Add panel"}),r?(0,C.jsx)(j.N,{onClick:e=>{const{gridPos:r}=t,a=Object.assign({},e.model,{gridPos:r,libraryPanel:(0,O.Pi)(e)});n.addPanel(a),n.removePanel(t)},variant:j.e.Tight,showPanelFilter:!0}):(0,C.jsxs)("div",{className:s.actionsWrapper,children:[(0,C.jsx)(z.x,{icon:"file-blank","aria-label":d.wl.pages.AddDashboard.addNewPanel,onClick:()=>{(0,l.reportInteraction)("Create new panel"),(()=>{const{gridPos:e}=t,r={type:"timeseries",title:"Panel Title",gridPos:{x:e.x,y:e.y,w:e.w,h:e.h}};n.addPanel(r),n.removePanel(t),l.locationService.partial({editPanel:r.id})})()},children:"Add a new panel"}),(0,C.jsx)(z.x,{icon:"wrap-text","aria-label":d.wl.pages.AddDashboard.addNewRow,onClick:()=>{(0,l.reportInteraction)("Create new row"),n.addPanel({type:"row",title:"Row title",gridPos:{x:0,y:0}}),n.removePanel(t)},children:"Add a new row"}),(0,C.jsx)(z.x,{icon:"book-open","aria-label":d.wl.pages.AddDashboard.addNewPanelLibrary,onClick:()=>{(0,l.reportInteraction)("Add a panel from the panel library"),a(!0)},children:"Add a panel from the panel library"}),1===u.length&&(0,C.jsx)(z.x,{icon:"clipboard-alt","aria-label":d.wl.pages.AddDashboard.addNewPanelLibrary,onClick:()=>{(0,l.reportInteraction)("Paste panel from clipboard"),(e=>{const{gridPos:r}=t,a={type:e.id,title:"Panel Title",gridPos:{x:r.x,y:r.y,w:e.defaults.gridPos.w,h:e.defaults.gridPos.h}};e.defaults&&((0,y.defaults)(a,e.defaults),a.title=e.defaults.title,M.Z.delete(k.zF)),n.addPanel(a),n.removePanel(t)})(u[0])},children:"Paste panel from clipboard"})]})]})})})),T=e=>{let{children:t,onBack:n,onCancel:i,styles:s}=e;return(0,C.jsxs)("div",{className:(0,o.cx)(s.headerRow,"grid-drag-handle"),children:[n&&(0,C.jsx)("div",{className:s.backButton,children:(0,C.jsx)(c.IconButton,{"aria-label":"Go back",name:"arrow-left",onClick:n,surface:"header",size:"xl"})}),!n&&(0,C.jsx)("div",{className:s.backButton,children:r||(r=(0,C.jsx)(c.Icon,{name:"panel-add",size:"md"}))}),t&&(0,C.jsx)("span",{children:t}),a||(a=(0,C.jsx)("div",{className:"flex-grow-1"})),(0,C.jsx)(c.IconButton,{"aria-label":"Close 'Add Panel' widget",name:"times",onClick:i,surface:"header"})]})},B=e=>{const t=o.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 ${S()(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:o.css`
      height: 100%;
      padding-top: ${e.spacing(.5)};
    `,callToAction:o.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;
    `,actionsWrapper:o.css`
      height: 100%;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      column-gap: ${e.spacing(1)};
      row-gap: ${e.spacing(1)};
      padding: ${e.spacing(0,1,1,1)};

      // This is to make the last action full width (if by itself)
      & > div:nth-child(2n-1):nth-last-of-type(1) {
        grid-column: span 2;
      }
    `,headerRow:o.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:o.css`
      display: flex;
      align-items: center;
      cursor: pointer;
      padding-left: ${e.spacing(.5)};
      width: ${e.spacing(4)};
    `,noMargin:o.css`
      margin: 0;
    `}};var W=n("./public/app/core/app_events.ts"),_=n("./public/app/features/variables/state/selectors.ts");const D=e=>{let{repeat:t,onChange:n,id:r}=e;const a=(0,s.useSelector)((e=>(0,_.ng)(e))),o=(0,i.useMemo)((()=>{const e=a.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}),[a]),l=(0,i.useCallback)((e=>n(e.value)),[n]);return(0,C.jsx)(c.Select,{inputId:r,menuShouldPortal:!0,value:t,onChange:l,options:o})};var I;const E=e=>{var t,n;let{repeat:r,title:a,onUpdate:o,onCancel:s}=e;const[l,d]=(0,i.useState)(r),u=(0,i.useCallback)((e=>d(e)),[d]);return(0,C.jsx)(c.Form,{defaultValues:{title:a},onSubmit:e=>{o(e.title,l)},children:e=>{let{register:r}=e;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(c.Field,{label:"Title",children:(0,C.jsx)(c.Input,Object.assign({},r("title"),{type:"text"}))}),t||(t=(0,C.jsx)(c.Field,{label:"Repeat for",children:(0,C.jsx)(D,{repeat:l,onChange:u})})),n||(n=(0,C.jsxs)(c.Modal.ButtonRow,{children:[(0,C.jsx)(c.Button,{type:"button",variant:"secondary",onClick:s,fill:"outline",children:"Cancel"}),I||(I=(0,C.jsx)(c.Button,{type:"submit",children:"Update"}))]}))]})}})},A=e=>{let{repeat:t,title:n,onDismiss:r,onUpdate:a}=e;const i=F();return(0,C.jsx)(c.Modal,{isOpen:!0,title:"Row options",icon:"copy",onDismiss:r,className:i.modal,children:(0,C.jsx)(E,{repeat:t,title:n,onCancel:r,onUpdate:a})})},F=(0,c.stylesFactory)((()=>({modal:o.css`
      label: RowOptionsModal;
      width: 500px;
    `})));var L;const N=e=>{let{repeat:t,title:n,onUpdate:r}=e;const a=e=>(t,n)=>{r(t,n),e()};return(0,C.jsx)(c.ModalsController,{children:e=>{let{showModal:r,hideModal:i}=e;return(0,C.jsx)("a",{className:"pointer",onClick:()=>{r(A,{title:n,repeat:t,onDismiss:i,onUpdate:a(i)})},children:L||(L=(0,C.jsx)(c.Icon,{name:"cog"}))})}})};N.displayName="RowOptionsButton";var $,H,G=n("./public/app/types/events.ts");function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class U extends i.Component{constructor(e){super(e),V(this,"sub",void 0),V(this,"onVariableUpdated",(()=>{this.forceUpdate()})),V(this,"onToggle",(()=>{this.props.dashboard.toggleRow(this.props.panel),this.setState((e=>({collapsed:!e.collapsed})))})),V(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()})),V(this,"onDelete",(()=>{W.Z.publish(new G.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(l.RefreshEvent,this.onVariableUpdated)}componentWillUnmount(){this.sub&&this.sub.unsubscribe()}render(){const e=m()({"dashboard-row":!0,"dashboard-row--collapsed":this.state.collapsed}),t=(0,l.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",a=!0===this.props.dashboard.meta.canEdit;return(0,C.jsxs)("div",{className:e,children:[(0,C.jsxs)("a",{className:"dashboard-row__title pointer","data-testid":d.wl.components.DashboardRow.title(t),onClick:this.onToggle,children:[(0,C.jsx)(c.Icon,{name:this.state.collapsed?"angle-right":"angle-down"}),t,(0,C.jsxs)("span",{className:"dashboard-row__panel_count",children:["(",n," ",r,")"]})]}),a&&(0,C.jsxs)("div",{className:"dashboard-row__actions",children:[(0,C.jsx)(N,{title:this.props.panel.title,repeat:this.props.panel.repeat,onUpdate:this.onUpdate}),(0,C.jsx)("a",{className:"pointer",onClick:this.onDelete,children:$||($=(0,C.jsx)(c.Icon,{name:"trash-alt"}))})]}),!0===this.state.collapsed&&(0,C.jsx)("div",{className:"dashboard-row__toggle-target",onClick:this.onToggle,children:" "}),a&&(H||(H=(0,C.jsx)("div",{className:"dashboard-row__drag grid-drag-handle"})))]})}}var q=n("./public/app/features/dashboard/dashgrid/DashboardPanel.tsx"),Z=n("../../opt/drone/yarncache/rxjs-npm-7.5.1-ce59cbb6a3-78e3eecb16.zip/node_modules/rxjs/dist/esm5/internal/Subscription.js");const Q=["gridWidth","gridPos","isViewing","windowHeight","windowWidth"];function Y(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 i.PureComponent{constructor(e){super(e),Y(this,"panelMap",{}),Y(this,"eventSubs",new Z.w0),Y(this,"windowHeight",1200),Y(this,"windowWidth",1920),Y(this,"gridWidth",0),Y(this,"lastPanelBottom",0),Y(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})})),Y(this,"triggerForceUpdate",(()=>{this.forceUpdate()})),Y(this,"updateGridPos",((e,t)=>{this.panelMap[e.i].updateGridPos(e)})),Y(this,"onResize",((e,t,n)=>{const r=this.panelMap[n.i];r.updateGridPos(n),r.configRev++})),Y(this,"onResizeStop",((e,t,n)=>{this.updateGridPos(n,e)})),Y(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(G._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=k.cz,n.h=1,n.isResizable=!1,n.isDraggable=t.collapsed),e.push(n)}return e}getPanelScreenPos(e,t){let n=0;return n=t<l.config.theme2.breakpoints.values.md?this.lastPanelBottom+k.hD:K(e.gridPos.y)+k.hD,this.lastPanelBottom=n+K(e.gridPos.h),{top:n,bottom:this.lastPanelBottom}}renderPanels(e){const t=[];var n;(this.lastPanelBottom=0,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=m()({"react-grid-item--fullscreen":n.isViewing});t.push((0,C.jsx)(X,{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))}return t}renderPanel(e,t,n){return"row"===e.type?(0,C.jsx)(U,{panel:e,dashboard:this.props.dashboard},e.key):"add-panel"===e.type?(0,C.jsx)(R,{panel:e,dashboard:this.props.dashboard},e.key):(0,C.jsx)(q.l,{stateKey:e.key,panel:e,dashboard:this.props.dashboard,isEditing:e.isEditing,isViewing:e.isViewing,width:t,height:n},e.key)}render(){const{dashboard:e}=this.props;return(0,C.jsx)("div",{style:{flex:"1 1 auto",display:this.props.editPanel?"none":void 0},children:(0,C.jsx)(b.Z,{disableHeight:!0,children:t=>{let{width:n}=t;if(0===n)return null;const r=!(n<=769)&&e.meta.canEdit;return(0,C.jsx)("div",{style:{width:`${n}px`,height:"100%"},children:(0,C.jsx)(f(),{width:n,isDraggable:r,isResizable:e.meta.canEdit,containerPadding:[0,0],useCSSTransforms:!1,margin:[k.hD,k.hD],cols:k.cz,rowHeight:k.K3,draggableHandle:".grid-drag-handle",layout:this.buildLayout(),onDragStop:this.onDragStop,onResize:this.onResize,onResizeStop:this.onResizeStop,onLayoutChange:this.onLayoutChange,children:this.renderPanels(n)})})}})})}}const X=i.forwardRef(((e,t)=>{var n;const r=l.config.theme2;let a=100,i=100;const{gridWidth:o,gridPos:s,isViewing:d,windowHeight:c,windowWidth:u}=e,p=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,Q),h=null!==(n=e.style)&&void 0!==n?n:{};return d?(a=o,i=.85*c,h.height=i,h.width="100%"):u<r.breakpoints.values.md?(a=e.gridWidth,i=K(s.h),h.height=i,h.width="100%"):(a=parseFloat(e.style.width),i=parseFloat(e.style.height)),(0,C.jsx)("div",Object.assign({},p,{ref:t,children:[e.children[0](a,i),e.children.slice(1)]}))}));function K(e){return e*(k.K3+k.hD)-k.hD}X.displayName="GridItemWithDimensions";var ee=n("./public/app/features/dashboard/components/DashNav/index.ts"),te=n("./public/app/features/dashboard/components/DashboardSettings/index.ts"),ne=n("./public/app/core/core.ts"),re=n("./public/app/features/dashboard/components/PanelEditor/utils.ts"),ae=n("./packages/grafana-data/src/index.ts");const ie={[ae.DocsId.Transformations]:"https://grafana.com/docs/grafana/latest/panels/transformations",[ae.DocsId.FieldConfig]:"https://grafana.com/docs/grafana/latest/panels/field-configuration-options/",[ae.DocsId.FieldConfigOverrides]:"https://grafana.com/docs/grafana/latest/panels/field-configuration-options/#override-a-field"};var oe,se=n("./.yarn/__virtual__/react-beautiful-dnd-virtual-27e4b658e7/3/opt/drone/yarncache/react-beautiful-dnd-npm-13.1.0-fcf5568b1c-12b7e9fbe8.zip/node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js"),le=n("../../opt/drone/yarncache/rxjs-npm-7.5.1-ce59cbb6a3-78e3eecb16.zip/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js");const de=e=>{let{debugMode:t,index:n,data:r,uiConfig:a,configs:o,onChange:s}=e;const l=(0,c.useStyles)(ce),[u,p]=(0,i.useState)([]),[h,f]=(0,i.useState)([]),g=(0,i.useMemo)((()=>o[n]),[o,n]);(0,i.useEffect)((()=>{const e=o.slice(0,n).map((e=>e.transformation)),t=o.slice(n,n+1).map((e=>e.transformation)),a=(0,ae.transformDataFrame)(e,r).subscribe(p),i=(0,ae.transformDataFrame)(e,r).pipe((0,le.z)((e=>(0,ae.transformDataFrame)(t,e)))).subscribe(f);return function(){a.unsubscribe(),i.unsubscribe()}}),[n,r,o]);const m=(0,i.useMemo)((()=>i.createElement(a.editor,{options:Object.assign({},a.transformation.defaultOptions,g.transformation.options),input:u,onChange:e=>{s(n,{id:g.transformation.id,options:e})}})),[a.editor,a.transformation.defaultOptions,g.transformation.options,g.transformation.id,u,s,n]);return(0,C.jsxs)("div",{className:l.editor,"aria-label":d.wl.components.TransformTab.transformationEditor(a.name),children:[m,t&&(0,C.jsxs)("div",{className:l.debugWrapper,"aria-label":d.wl.components.TransformTab.transformationEditorDebugger(a.name),children:[(0,C.jsxs)("div",{className:l.debug,children:[(0,C.jsx)("div",{className:l.debugTitle,children:"Transformation input data"}),(0,C.jsx)("div",{className:l.debugJson,children:(0,C.jsx)(c.JSONFormatter,{json:u})})]}),(0,C.jsx)("div",{className:l.debugSeparator,children:oe||(oe=(0,C.jsx)(c.Icon,{name:"arrow-right"}))}),(0,C.jsxs)("div",{className:l.debug,children:[(0,C.jsx)("div",{className:l.debugTitle,children:"Transformation output data"}),(0,C.jsx)("div",{className:l.debugJson,children:h&&(0,C.jsx)(c.JSONFormatter,{json:h})})]})]})]})},ce=e=>{const t=e.isLight?e.palette.gray85:e.palette.gray15;return{title:o.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:o.css`
      font-weight: ${e.typography.weight.semibold};
      color: ${e.colors.textBlue};
    `,iconRow:o.css`
      display: flex;
    `,icon:o.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:o.css``,debugWrapper:o.css`
      display: flex;
      flex-direction: row;
    `,debugSeparator:o.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:o.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:o.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:o.css`
      flex-grow: 1;
      height: 100%;
      overflow: hidden;
      padding: ${e.spacing.xs};
    `}};var ue=n("./public/app/core/components/QueryOperationRow/QueryOperationRow.tsx"),pe=n("./public/app/core/components/QueryOperationRow/QueryOperationAction.tsx"),he=n("./public/app/features/plugins/components/PluginStateInfo.tsx"),fe=n("./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useToggle.js"),ge=n("./public/app/core/components/QueryOperationRow/OperationRowHelp.tsx");const me=e=>{var t;let{onRemove:n,index:r,id:a,data:o,configs:s,uiConfig:l,onChange:d}=e;const[u,p]=(0,fe.Z)(!1),[h,f]=(0,fe.Z)(!1),g=s[r].transformation.disabled,m=(0,i.useCallback)((e=>{const t=s[e].transformation;d(e,Object.assign({},t,{disabled:!t.disabled||void 0}))}),[d,s]);return(0,C.jsxs)(ue.t,{id:a,index:r,title:l.name,draggable:!0,actions:e=>{let{isOpen:a}=e;return(0,C.jsxs)(c.HorizontalGroup,{align:"center",width:"auto",children:[l.state&&(0,C.jsx)(he.u,{state:l.state}),t||(t=(0,C.jsx)(pe.y,{title:"Show/hide transform help",icon:"info-circle",onClick:f,active:h})),(0,C.jsx)(pe.y,{title:"Debug",disabled:!a,icon:"bug",onClick:p,active:u}),(0,C.jsx)(pe.y,{title:"Disable/Enable transformation",icon:g?"eye-slash":"eye",onClick:()=>m(r),active:g}),(0,C.jsx)(pe.y,{title:"Remove",icon:"trash-alt",onClick:()=>n(r)})]})},disabled:g,children:[h&&(0,C.jsx)(ge.h,{markdown:be(l)}),(0,C.jsx)(de,{debugMode:u,index:r,data:o,configs:s,uiConfig:l,onChange:d})]})};function be(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 ye=e=>{let{data:t,onChange:n,onRemove:r,configs:a}=e;return(0,C.jsx)(C.Fragment,{children:a.map(((e,i)=>{const o=ae.standardTransformersRegistry.getIfExists(e.transformation.id);return o?(0,C.jsx)(me,{index:i,id:`${e.id}`,data:t,configs:a,uiConfig:o,onRemove:r,onChange:n},`${e.id}`):null}))})};var ve=n("./packages/grafana-ui/src/components/Layout/Layout.tsx"),Se=n("./public/app/features/dashboard/components/PanelEditor/types.ts");function xe(e){let{message:t}=e;const n=(0,i.useCallback)((()=>{l.locationService.partial({tab:Se.Ip.Query})}),[]);return(0,C.jsx)(ve.Ar,{justify:"center",style:{marginTop:"100px"},children:(0,C.jsxs)(c.VerticalGroup,{spacing:"md",children:[(0,C.jsx)("h2",{children:t}),(0,C.jsx)("div",{children:(0,C.jsx)(c.Button,{size:"md",variant:"secondary",icon:"arrow-left",onClick:n,children:"Go back to Queries"})})]})})}var Me,we,ke=n("./public/app/types/index.ts"),Oe=n("./public/app/core/components/LocalStorageValueProvider/index.tsx");function je(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 i.PureComponent{constructor(e){super(e),je(this,"subscription",void 0),je(this,"onSearchChange",(e=>{this.setState({search:e.target.value})})),je(this,"onSearchKeyDown",(e=>{if("Enter"===e.key){const{search:e}=this.state;if(e){const t=e.toLowerCase(),n=ae.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())})),je(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}`})),je(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:{}}}])})),je(this,"onTransformationChange",((e,t)=>{const{transformations:n}=this.state,r=Array.from(n);r[e].transformation=t,this.onChange(r)})),je(this,"onTransformationRemove",(e=>{const{transformations:t}=this.state,n=Array.from(t);n.splice(e,1),this.onChange(n)})),je(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 a=Array.from(t),[i]=a.splice(n,1);a.splice(r,0,i),this.onChange(a)})),je(this,"renderTransformationEditors",(()=>{const{data:e,transformations:t}=this.state;return(0,C.jsx)(se.Z5,{onDragEnd:this.onDragEnd,children:(0,C.jsx)(se.bK,{droppableId:"transformations-list",direction:"vertical",children:n=>(0,C.jsxs)("div",Object.assign({ref:n.innerRef},n.droppableProps,{children:[(0,C.jsx)(ye,{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 a=e[r];void 0===t[a.id]?t[a.id]=0:t[a.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=ae.standardTransformersRegistry.list().sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0));if(t){const e=t.toLowerCase(),a=r.filter((t=>(t.name+t.description).toLowerCase().indexOf(e)>=0));n=(0,C.jsxs)(C.Fragment,{children:[a.length," / ",r.length,"   ",(0,C.jsx)(c.IconButton,{name:"times",surface:"header",onClick:()=>{this.setState({search:""})}})]}),r=a}const a=!(null!=e&&e.length),i=a||this.state.showPicker;return n||!i||a||(n=(0,C.jsx)(c.IconButton,{name:"times",surface:"header",onClick:()=>{this.setState({showPicker:!1})}})),(0,C.jsxs)(C.Fragment,{children:[a&&(0,C.jsx)(c.Container,{grow:1,children:(0,C.jsx)(Oe.G,{storageKey:"dashboard.components.TransformationEditor.featureInfoBox.isDismissed",defaultValue:!1,children:(e,t)=>{return e?null:(0,C.jsxs)(c.Alert,{title:"Transformations",severity:"info",onRemove:()=>{t(!0)},children:[Me||(Me=(0,C.jsxs)("p",{children:["Transformations allow you to join, calculate, re-order, hide, and rename your query results before they are visualized. ",(0,C.jsx)("br",{}),"Many transforms are not suitable if you're using the Graph visualization, as it currently only supports time series data. ",(0,C.jsx)("br",{}),"It can help to switch to the Table visualization to understand what a transformation is doing."," "]})),(0,C.jsx)("a",{href:(n=ae.DocsId.Transformations,ie[n]),className:"external-link",target:"_blank",rel:"noreferrer",children:"Read more"})]});var n}})}),i?(0,C.jsxs)(c.VerticalGroup,{children:[(0,C.jsx)(c.Input,{"aria-label":d.wl.components.Transforms.searchInput,value:null!=t?t:"",autoFocus:!a,placeholder:"Add transformation",onChange:this.onSearchChange,onKeyDown:this.onSearchKeyDown,suffix:n}),r.map((e=>(0,C.jsx)(Ce,{transform:e,onClick:()=>{this.onTransformationAdd({value:e.id})}},e.name)))]}):(0,C.jsx)(c.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,C.jsx)(xe,{message:"Transformations can't be used on a panel with existing alerts"})):(0,C.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,C.jsx)(c.Container,{padding:"md",children:(0,C.jsxs)("div",{"aria-label":d.wl.components.TransformTab.content,children:[n&&e?(0,C.jsx)(c.Alert,{severity:ke.F1.Error,title:"Transformations can't be used on a panel with alerts"}):null,n&&this.renderTransformationEditors(),this.renderTransformsPicker()]})})})}}function Ce(e){let{transform:t,onClick:n}=e;const r=(0,c.useStyles2)(Pe);return(0,C.jsxs)(c.Card,{className:r.card,"aria-label":d.wl.components.TransformTab.newTransform(t.name),onClick:n,children:[(0,C.jsx)(c.Card.Heading,{children:t.name}),(0,C.jsx)(c.Card.Meta,{children:t.description}),t.state&&(0,C.jsx)(c.Card.Tags,{children:(0,C.jsx)(he.u,{state:t.state})})]})}const Pe=e=>({card:o.css`
      margin: 0;
      padding: ${e.spacing(1)};
    `}),Re=(0,c.withTheme)(ze);var Te=n("./public/app/features/query/components/QueryGroup.tsx"),Be=n("./public/app/features/plugins/datasource_srv.ts");function We(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class _e extends i.PureComponent{constructor(e){super(e),We(this,"onRunQueries",(()=>{this.props.panel.refresh()})),We(this,"onOpenQueryInspector",(()=>{l.locationService.partial({inspect:this.props.panel.id,inspectTab:"query"})})),We(this,"onOptionsChange",(e=>{var t;const{panel:n}=this.props,r=(e.dataSource.default?null:e.dataSource.uid)!==(null===(t=n.datasource)||void 0===t?void 0:t.uid);n.updateQueries(e),r&&setTimeout(this.onRunQueries,10),this.forceUpdate()}))}buildQueryOptions(e){var t,n;const r=null!==(t=e.datasource)&&void 0!==t?t:{default:!0},a=(0,Be.ak)().getInstanceSettings(r);return{cacheTimeout:null!=a&&null!==(n=a.meta.queryOptions)&&void 0!==n&&n.cacheTimeout?e.cacheTimeout:void 0,dataSource:{default:null==a?void 0:a.isDefault,type:null==a?void 0:a.type,uid:null==a?void 0:a.uid},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,C.jsx)(Te.D,{options:t,queryRunner:e.getQueryRunner(),onRunQueries:this.onRunQueries,onOpenQueryInspector:this.onOpenQueryInspector,onOptionsChange:this.onOptionsChange})}}var De,Ie,Ee=n("./public/app/core/components/EmptyListCTA/EmptyListCTA.tsx"),Ae=n("./public/app/features/alerting/state/alertDef.ts");function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Le extends i.PureComponent{constructor(){super(...arguments),Fe(this,"state",{stateHistoryItems:[]}),Fe(this,"clearHistory",(async()=>{const{dashboard:e,panelId:t,onRefresh:n}=this.props;await(0,l.getBackendSrv)().post("/api/annotations/mass-delete",{dashboardId:e.id,panelId:t}),this.setState({stateHistoryItems:[]}),n()}))}componentDidMount(){const{dashboard:e,panelId:t}=this.props;(0,l.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:Ae.Z.getStateDisplayModel(t.newState),time:e.formatDate(t.time,"MMM D, YYYY HH:mm:ss"),info:Ae.Z.getAlertAnnotationInfo(t)})));this.setState({stateHistoryItems:n})}))}render(){const{stateHistoryItems:e}=this.state;return(0,C.jsxs)("div",{children:[e.length>0&&(0,C.jsxs)("div",{className:"p-b-1",children:[De||(De=(0,C.jsx)("span",{className:"muted",children:"Last 50 state changes"})),(0,C.jsx)(c.ConfirmButton,{onConfirm:this.clearHistory,confirmVariant:"destructive",confirmText:"Clear",children:(0,C.jsx)(c.Button,{className:o.css`
                  direction: ltr;
                `,variant:"destructive",icon:"trash-alt",children:"Clear history"})})]}),(0,C.jsx)("ol",{className:"alert-rule-list",children:e.length>0?e.map(((e,t)=>(0,C.jsxs)("li",{className:"alert-rule-item",children:[(0,C.jsx)("div",{className:`alert-rule-item__icon ${e.stateModel.stateClass}`,children:(0,C.jsx)(c.Icon,{name:e.stateModel.iconClass,size:"xl"})}),(0,C.jsxs)("div",{className:"alert-rule-item__body",children:[(0,C.jsxs)("div",{className:"alert-rule-item__header",children:[(0,C.jsx)("p",{className:"alert-rule-item__name",children:e.alertName}),(0,C.jsx)("div",{className:"alert-rule-item__text",children:(0,C.jsx)("span",{className:`${e.stateModel.stateClass}`,children:e.stateModel.text})})]}),e.info]}),(0,C.jsx)("div",{className:"alert-rule-item__time",children:e.time})]},`${e.time}-${t}`))):Ie||(Ie=(0,C.jsx)("i",{children:"No state changes recorded"}))})]})}}const Ne=Le;var $e,He,Ge,Ve=n("./public/app/angular/core_module.ts"),Ue=n("./public/app/features/alerting/state/ThresholdMapper.ts"),qe=n("./public/app/angular/components/query_part.ts"),Ze=n("./public/app/angular/promiseToDigest.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 Ye{constructor(e,t,n,r){Qe(this,"panel",void 0),Qe(this,"panelCtrl",void 0),Qe(this,"subTabIndex",void 0),Qe(this,"conditionTypes",void 0),Qe(this,"alert",void 0),Qe(this,"conditionModels",void 0),Qe(this,"evalFunctions",void 0),Qe(this,"evalOperators",void 0),Qe(this,"noDataModes",void 0),Qe(this,"executionErrorModes",void 0),Qe(this,"addNotificationSegment",void 0),Qe(this,"notifications",void 0),Qe(this,"alertNotifications",void 0),Qe(this,"error",void 0),Qe(this,"appSubUrl",void 0),Qe(this,"alertHistory",void 0),Qe(this,"newAlertRuleTag",void 0),Qe(this,"alertingMinIntervalSecs",void 0),Qe(this,"alertingMinInterval",void 0),Qe(this,"frequencyWarning",void 0),Qe(this,"enable",(()=>{this.panel.alert={},this.initModel(),this.panel.alert.for="5m"})),this.$scope=e,this.dashboardSrv=t,this.uiSegmentSrv=n,this.datasourceSrv=r,this.panelCtrl=e.ctrl,this.panel=this.panelCtrl.panel,this.$scope.ctrl=this,this.subTabIndex=0,this.evalFunctions=Ae.Z.evalFunctions,this.evalOperators=Ae.Z.evalOperators,this.conditionTypes=Ae.Z.conditionTypes,this.noDataModes=Ae.Z.noDataModes,this.executionErrorModes=Ae.Z.executionErrorModes,this.appSubUrl=x.ZP.appSubUrl,this.panelCtrl._enableAlert=this.enable,this.alertingMinIntervalSecs=x.ZP.alertingMinInterval,this.alertingMinInterval=ae.rangeUtil.secondsToHms(x.ZP.alertingMinInterval)}$onInit(){this.addNotificationSegment=this.uiSegmentSrv.newPlusButton();const e=this.graphThresholdChanged.bind(this);return this.panelCtrl.events.on(ke.RW.GL,e),this.$scope.$on("$destroy",(()=>{this.panelCtrl.events.off(ke.RW.GL,e),this.panelCtrl.editingThresholds=!1,this.panelCtrl.render()})),this.notifications=[],this.alertNotifications=[],this.alertHistory=[],(0,Ze.E)(this.$scope)((0,l.getBackendSrv)().get("/api/alert-notifications/lookup").then((e=>{this.notifications=e,this.initModel(),this.validateModel()})))}getAlertHistory(){(0,Ze.E)(this.$scope)((0,l.getBackendSrv)().get(`/api/annotations?dashboardId=${this.panelCtrl.dashboard.id}&panelId=${this.panel.id}&limit=50&type=alert`).then((e=>{this.alertHistory=(0,y.map)(e,(e=>{var t;return e.time=null===(t=this.dashboardSrv.getCurrent())||void 0===t?void 0:t.formatDate(e.time,"MMM D, YYYY HH:mm:ss"),e.stateModel=Ae.Z.getStateDisplayModel(e.newState),e.info=Ae.Z.getAlertAnnotationInfo(e),e}))})))}getNotificationIcon(e){switch(e){case"email":return"envelope";case"slack":return"slack";case"victorops":return"fa fa-pagelines";case"webhook":return"cube";case"pagerduty":return"fa fa-bullhorn";case"opsgenie":return"bell";case"hipchat":return"fa fa-mail-forward";case"pushover":return"mobile-android";case"kafka":return"arrow-random";case"teams":return"fa fa-windows"}return"bell"}getNotifications(){return Promise.resolve(this.notifications.map((e=>this.uiSegmentSrv.newSegment(e.name))))}notificationAdded(){const e=(0,y.find)(this.notifications,{name:this.addNotificationSegment.value});e&&(this.alertNotifications.push({name:e.name,iconClass:this.getNotificationIcon(e.type),isDefault:!1,uid:e.uid}),(0,y.find)(this.alert.notifications,(t=>t.id===e.id||t.uid===e.uid))||this.alert.notifications.push({uid:e.uid}),this.addNotificationSegment.value=this.uiSegmentSrv.newPlusButton().value,this.addNotificationSegment.html=this.uiSegmentSrv.newPlusButton().html,this.addNotificationSegment.fake=!0)}removeNotification(e){(0,y.remove)(this.alert.notifications,(t=>t.uid===e.uid||t.id===e.id)),(0,y.remove)(this.alertNotifications,(t=>t.uid===e.uid||t.id===e.id))}addAlertRuleTag(){this.newAlertRuleTag.name&&(this.alert.alertRuleTags[this.newAlertRuleTag.name]=this.newAlertRuleTag.value),this.newAlertRuleTag.name="",this.newAlertRuleTag.value=""}removeAlertRuleTag(e){delete this.alert.alertRuleTags[e]}initModel(){const e=this.alert=this.panel.alert;if(!e)return;this.checkFrequency(),e.conditions=e.conditions||[],0===e.conditions.length&&e.conditions.push({type:"query",query:{params:["A","5m","now"]},reducer:{type:"avg",params:[]},evaluator:{type:"gt",params:[null]},operator:{type:"and"}}),e.noDataState=e.noDataState||x.ZP.alertingNoDataOrNullValues,e.executionErrorState=e.executionErrorState||x.ZP.alertingErrorOrTimeout,e.frequency=e.frequency||"1m",e.handler=e.handler||1,e.notifications=e.notifications||[],e.for=e.for||"0m",e.alertRuleTags=e.alertRuleTags||{};const t=this.panel.title+" alert";e.name=e.name||t,this.conditionModels=(0,y.reduce)(e.conditions,((e,t)=>(e.push(this.buildConditionModel(t)),e)),[]),Ue.X.alertToGraphThresholds(this.panel);for(const t of e.notifications){let e=t.uid,n=(0,y.find)(this.notifications,{uid:e});!n&&t.id&&(e=t.id,n=(0,y.find)(this.notifications,{id:e})),n||W.Z.publish(new G.VJ({title:"Notifier with invalid identifier is detected",text:`Do you want to delete notifier with invalid identifier: ${e} from the dashboard JSON?`,text2:"After successful deletion, make sure to save the dashboard for storing the update JSON.",icon:"trash-alt",confirmText:"Delete",yesText:"Delete",onConfirm:async()=>{this.removeNotification(t)}})),n&&!1===n.isDefault&&(n.iconClass=this.getNotificationIcon(n.type),this.alertNotifications.push(n))}for(const e of this.notifications)e.isDefault&&(e.iconClass=this.getNotificationIcon(e.type),this.alertNotifications.push(e));this.panelCtrl.editingThresholds=!0,this.panelCtrl.render()}checkFrequency(){if(this.frequencyWarning="",this.alert.frequency)if(this.alert.frequency.match(/^\d+([dhms])$/))try{ae.rangeUtil.intervalToSeconds(this.alert.frequency)<this.alertingMinIntervalSecs&&(this.frequencyWarning="A minimum evaluation interval of "+this.alertingMinInterval+" have been configured in Grafana and will be used for this alert rule. Please contact the administrator to configure a lower interval.")}catch(e){this.frequencyWarning=e}else this.frequencyWarning='Invalid frequency, has to be numeric followed by one of the following units: "d, h, m, s"'}graphThresholdChanged(e){for(const t of this.alert.conditions)if("query"===t.type){t.evaluator.params[e.handleIndex]=e.threshold.value,this.evaluatorParamsChanged();break}}validateModel(){if(!this.alert)return;let e,t=null;const n=[];for(const r of this.alert.conditions){if("query"!==r.type)continue;for(const n of this.panel.targets)if(e||(e=n),r.query.params[0]===n.refId){t=n;break}if(!t){if(!e)return void(this.error="Could not find any metric queries");r.query.params[0]=e.refId,t=e}const a=t.datasource||this.panel.datasource;n.push(this.datasourceSrv.get(a).then((e=>t=>t.meta.alerting?t.targetContainsTemplate&&t.targetContainsTemplate(e)?Promise.reject("Template variables are not supported in alert queries"):Promise.resolve():Promise.reject("The datasource does not support alerting queries"))(t)))}Promise.all(n).then((()=>{this.error="",this.$scope.$apply()}),(e=>{this.error=e,this.$scope.$apply()}))}buildConditionModel(e){const t={source:e,type:e.type};return t.queryPart=new qe.XN(e.query,Ae.Z.alertQueryDef),t.reducerPart=Ae.Z.createReducerPart(e.reducer),t.evaluator=e.evaluator,t.operator=e.operator,t}handleQueryPartEvent(e,t){switch(t.name){case"action-remove-part":break;case"get-part-actions":return Promise.resolve([]);case"part-param-changed":this.validateModel();case"get-param-options":{const e=this.panel.targets.map((e=>this.uiSegmentSrv.newSegment({value:e.refId})));return Promise.resolve(e)}default:return Promise.resolve()}return Promise.resolve()}handleReducerPartEvent(e,t){switch(t.name){case"action":e.source.reducer.type=t.action.value,e.reducerPart=Ae.Z.createReducerPart(e.source.reducer),this.evaluatorParamsChanged();break;case"get-part-actions":{const t=[];for(const n of Ae.Z.reducerTypes)n.value!==e.source.reducer.type&&t.push(n);return Promise.resolve(t)}}return Promise.resolve()}addCondition(e){const t={type:"query",query:{params:["A","5m","now"]},reducer:{type:"avg",params:[]},evaluator:{type:"gt",params:[null]},operator:{type:"and"}};this.alert.conditions.push(t),this.conditionModels.push(this.buildConditionModel(t))}removeCondition(e){this.alert.conditions.splice(e,1),this.conditionModels.splice(e,1)}delete(){W.Z.publish(new G.VJ({title:"Delete Alert",text:"Are you sure you want to delete this alert rule?",text2:"You need to save dashboard for the delete to take effect",icon:"trash-alt",yesText:"Delete",onConfirm:()=>{delete this.panel.alert,this.alert=null,this.panel.thresholds=[],this.conditionModels=[],this.panelCtrl.alertState=null,this.panelCtrl.render()}}))}evaluatorParamsChanged(){Ue.X.alertToGraphThresholds(this.panel),this.panelCtrl.render()}evaluatorTypeChanged(e){switch(e.type){case"lt":case"gt":e.params=[e.params[0]];break;case"within_range":case"outside_range":e.params=[e.params[0],e.params[1]];break;case"no_value":e.params=[]}this.evaluatorParamsChanged()}clearHistory(){W.Z.publish(new G.VJ({title:"Delete Alert History",text:"Are you sure you want to remove all history & annotations for this alert?",icon:"trash-alt",yesText:"Yes",onConfirm:()=>{(0,Ze.E)(this.$scope)((0,l.getBackendSrv)().post("/api/annotations/mass-delete",{dashboardId:this.panelCtrl.dashboard.id,panelId:this.panel.id}).then((()=>{this.alertHistory=[],this.panelCtrl.refresh()})))}}))}}function Je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ye.$inject=["$scope","dashboardSrv","uiSegmentSrv","datasourceSrv"],Ve.ZP.directive("alertTab",(function(){return{restrict:"E",scope:!0,templateUrl:"public/app/features/alerting/partials/alert_tab.html",controller:Ye}}));class Xe extends i.PureComponent{constructor(){super(...arguments),Je(this,"state",{isLoading:!1,allNodesExpanded:null,testRuleResponse:{}}),Je(this,"formattedJson",void 0),Je(this,"clipboard",void 0),Je(this,"setFormattedJson",(e=>{this.formattedJson=e})),Je(this,"getTextForClipboard",(()=>JSON.stringify(this.formattedJson,null,2))),Je(this,"onClipboardSuccess",(()=>{W.Z.emit(ae.AppEvents.alertSuccess,["Content copied to clipboard"])})),Je(this,"onToggleExpand",(()=>{this.setState((e=>Object.assign({},e,{allNodesExpanded:!this.state.allNodesExpanded})))})),Je(this,"getNrOfOpenNodes",(()=>null===this.state.allNodesExpanded?3:this.state.allNodesExpanded?20:1)),Je(this,"renderExpandCollapse",(()=>{const{allNodesExpanded:e}=this.state,t=(0,C.jsxs)(C.Fragment,{children:[$e||($e=(0,C.jsx)(c.Icon,{name:"minus-circle"}))," Collapse All"]}),n=(0,C.jsxs)(C.Fragment,{children:[He||(He=(0,C.jsx)(c.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.id?t.getSaveModel():e));const r={dashboard:n,panelId:t.id};this.setState({isLoading:!0});const a=await(0,l.getBackendSrv)().post("/api/alerts/test",r);this.setState({isLoading:!1,testRuleResponse:a})}render(){const{testRuleResponse:e,isLoading:t}=this.state;if(!0===t)return Ge||(Ge=(0,C.jsx)(c.LoadingPlaceholder,{text:"Evaluating rule"}));const n=this.getNrOfOpenNodes();return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"pull-right",children:(0,C.jsxs)(c.HorizontalGroup,{spacing:"md",children:[(0,C.jsx)("div",{onClick:this.onToggleExpand,children:this.renderExpandCollapse()}),(0,C.jsx)(c.ClipboardButton,{getText:this.getTextForClipboard,onClipboardCopy:this.onClipboardSuccess,icon:"copy",children:"Copy to Clipboard"})]})}),(0,C.jsx)(c.JSONFormatter,{json:e,open:n,onDidRender:this.setFormattedJson})]})}}var Ke,et=n("./public/app/features/panel/state/selectors.ts");function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class nt extends i.PureComponent{constructor(){super(...arguments),tt(this,"element",void 0),tt(this,"component",void 0),tt(this,"panelCtrl",void 0),tt(this,"state",{validationMessage:"",showStateHistory:!1,showDeleteConfirmation:!1,showTestRule:!1}),tt(this,"onAngularPanelUpdated",(()=>{this.forceUpdate()})),tt(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()})),tt(this,"onToggleModal",(e=>{const t=this.state[e];this.setState(Object.assign({},this.state,{[e]:!t}))})),tt(this,"renderTestRule",(()=>{if(!this.state.showTestRule)return null;const{panel:e,dashboard:t}=this.props,n=()=>this.onToggleModal("showTestRule");return(0,C.jsx)(c.Modal,{isOpen:!0,icon:"bug",title:"Testing rule",onDismiss:n,onClickBackdrop:n,children:(0,C.jsx)(Xe,{panel:e,dashboard:t})})})),tt(this,"renderDeleteConfirmation",(()=>{if(!this.state.showDeleteConfirmation)return null;const{panel:e}=this.props,t=()=>this.onToggleModal("showDeleteConfirmation");return(0,C.jsx)(c.ConfirmModal,{isOpen:!0,icon:"trash-alt",title:"Delete",body:Ke||(Ke=(0,C.jsxs)("div",{children:["Are you sure you want to delete this alert rule?",(0,C.jsx)("br",{}),(0,C.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()}})})),tt(this,"renderStateHistory",(()=>{if(!this.state.showStateHistory)return null;const{panel:e,dashboard:t}=this.props,n=()=>this.onToggleModal("showStateHistory");return(0,C.jsx)(c.Modal,{isOpen:!0,icon:"history",title:"State history",onDismiss:n,onClickBackdrop:n,children:(0,C.jsx)(Ne,{dashboard:t,panelId:e.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,l.getAngularLoader)(),r={ctrl:this.panelCtrl};this.component=n.load(this.element,r,"<alert-tab />");const a=await(async(e,t,n,r)=>{if(0===t.length)return"Could not find any metric queries";if(e&&e.length)return"Transformations are not supported in alert queries";let a=0,i=0;for(const e of t){const t=e.datasource||r,o=await n.get(t);o.meta.alerting?o.targetContainsTemplate&&o.targetContainsTemplate(e)&&i++:a++}return a===t.length?"The datasource does not support alerting queries":i===t.length?"Template variables are not supported in alert queries":""})(e.transformations,e.targets,(0,l.getDataSourceSrv)(),e.datasource);a&&this.setState({validationMessage:a})}getReactAlertPanelCtrl(){return{panel:this.props.panel,events:new ae.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,C.jsx)(xe,{message:n});const a={title:"Panel has no alert rule defined",buttonIcon:"bell",onClick:this.onAddAlert,buttonTitle:"Create Alert"};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,C.jsx)(c.Container,{padding:"md",children:(0,C.jsxs)("div",{"aria-label":d.wl.components.AlertTab.content,children:[e&&r&&(0,C.jsx)(c.Alert,{severity:ke.F1.Error,title:"Transformations are not supported in alert queries"}),(0,C.jsx)("div",{ref:e=>this.element=e}),e&&(0,C.jsxs)(c.HorizontalGroup,{children:[(0,C.jsx)(c.Button,{onClick:()=>this.onToggleModal("showStateHistory"),variant:"secondary",children:"State history"}),(0,C.jsx)(c.Button,{onClick:()=>this.onToggleModal("showTestRule"),variant:"secondary",children:"Test rule"}),(0,C.jsx)(c.Button,{onClick:()=>this.onToggleModal("showDeleteConfirmation"),variant:"destructive",children:"Delete"})]}),!e&&!n&&(0,C.jsx)(Ee.Z,Object.assign({},a))]})})}),this.renderTestRule(),this.renderDeleteConfirmation(),this.renderStateHistory()]})}}const rt=(0,s.connect)(((e,t)=>{var n;return{angularPanelComponent:null===(n=(0,et.i)(e,t.panel))||void 0===n?void 0:n.angularComponent}}),{})(nt);var at,it,ot=n("./public/app/features/alerting/unified/utils/rule-form.ts"),st=n("./.yarn/__virtual__/react-router-virtual-31642fe47a/3/opt/drone/yarncache/react-router-npm-5.2.1-ea754d7473-7daae084bf.zip/node_modules/react-router/esm/react-router.js"),lt=n("./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useAsync.js");const dt=e=>{let{dashboard:t,panel:n,className:r}=e;const{loading:a,value:i}=(0,lt.Z)((()=>(0,ot.aR)(n,t)),[n,t]),o=(0,st.TH)();if(a)return at||(at=(0,C.jsx)(c.Button,{disabled:!0,children:"Create alert rule from this panel"}));if(!i)return it||(it=(0,C.jsx)(c.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 s=ae.urlUtil.renderUrl("alerting/new",{defaults:JSON.stringify(i),returnTo:o.pathname+o.search});return(0,C.jsx)(c.LinkButton,{icon:"bell",href:s,className:r,"data-testid":"create-alert-rule-button",children:"Create alert rule from this panel"})};var ct,ut,pt,ht=n("./public/app/features/alerting/unified/components/rules/RulesTable.tsx"),ft=n("./public/app/features/alerting/unified/state/actions.ts"),gt=n("./public/app/features/alerting/unified/utils/constants.ts"),mt=n("./public/app/features/alerting/unified/utils/datasource.ts"),bt=n("./public/app/features/alerting/unified/utils/redux.ts"),yt=n("./public/app/features/alerting/unified/hooks/useCombinedRuleNamespaces.ts"),vt=n("./public/app/features/alerting/unified/hooks/useUnifiedAlertingSelector.ts");function St(e){var t,n;let{dashboard:r,panel:a,poll:o=!1}=e;const l=(0,s.useDispatch)(),d=null!==(t=(0,vt._)((e=>e.promRules[mt.GC])))&&void 0!==t?t:bt.oq,c=null!==(n=(0,vt._)((e=>e.rulerRules[mt.GC])))&&void 0!==n?n:bt.oq;(0,i.useEffect)((()=>{const e=()=>{l((0,ft.y6)({rulesSourceName:mt.GC,filter:{dashboardUID:r.uid,panelId:a.id}})),l((0,ft.UR)({rulesSourceName:mt.GC,filter:{dashboardUID:r.uid,panelId:a.id}}))};if(e(),o){const t=setInterval(e,gt.p4);return()=>{clearInterval(t)}}return()=>{}}),[l,o,a.id,r.uid]);const u=d.loading||c.loading,p=[d.error,c.error].filter((e=>!!e)),h=(0,yt.Z)(mt.GC);return{rules:(0,i.useMemo)((()=>h.flatMap((e=>e.groups)).flatMap((e=>e.rules)).filter((e=>e.annotations[gt.q6.dashboardUID]===r.uid&&e.annotations[gt.q6.panelID]===String(a.id)))),[h,r,a]),errors:p,loading:u}}const xt=e=>({newButton:o.css`
    margin-top: ${e.spacing(3)};
  `,innerWrapper:o.css`
    padding: ${e.spacing(2)};
  `,noRulesWrapper:o.css`
    margin: ${e.spacing(2)};
    background-color: ${e.colors.background.secondary};
    padding: ${e.spacing(3)};
  `}),Mt=l.config.unifiedAlertingEnabled?e=>{var t;let{dashboard:n,panel:r}=e;const a=(0,c.useStyles2)(xt),{errors:i,loading:o,rules:s}=St({dashboard:n,panel:r,poll:!0}),l=i.length?(0,C.jsx)(c.Alert,{title:"Errors loading rules",severity:"error",children:i.map(((e,t)=>(0,C.jsxs)("div",{children:["Failed to load Grafana rules state: ",e.message||"Unknown error."]},t)))}):null;return o&&!s.length?(0,C.jsxs)("div",{className:a.innerWrapper,children:[l,ct||(ct=(0,C.jsx)(c.LoadingPlaceholder,{text:"Loading rules..."}))]}):s.length?(0,C.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,C.jsxs)("div",{className:a.innerWrapper,children:[l,t||(t=(0,C.jsx)(ht.i,{rules:s})),!!n.meta.canSave&&(0,C.jsx)(dt,{className:a.newButton,panel:r,dashboard:n})]})}):(0,C.jsxs)("div",{"aria-label":d.wl.components.PanelAlertTabContent.content,className:a.noRulesWrapper,children:[l,!!n.uid&&(0,C.jsxs)(C.Fragment,{children:[ut||(ut=(0,C.jsx)("p",{children:"There are no alert rules linked to this panel."})),!!n.meta.canSave&&(0,C.jsx)(dt,{panel:r,dashboard:n})]}),!n.uid&&!!n.meta.canSave&&(pt||(pt=(0,C.jsx)(c.Alert,{severity:"info",title:"Dashboard not saved",children:"Dashboard must be saved before alerts can be added."})))]})}:rt;var wt=n("./packages/grafana-ui/src/components/Tabs/Tab.tsx");const kt=["panel","dashboard"];const Ot=e=>{let{panel:t,dashboard:n}=e,r=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,kt);const{rules:a,loading:i}=St({panel:t,dashboard:n});return(0,C.jsx)(wt.O,Object.assign({},r,{counter:i?null:a.length}))},jt=i.memo((e=>{let{panel:t,dashboard:n,tabs:r,onChangeTab:a}=e;const o=(0,c.useForceUpdate)(),s=(0,c.useStyles2)(Ct);(0,i.useEffect)((()=>{const e=new Z.w0;return e.add(t.events.subscribe(G.pO,o)),e.add(t.events.subscribe(G.Xw,o)),()=>e.unsubscribe()}),[t,o]);const d=r.find((e=>e.active));return 0===r.length?null:(0,C.jsxs)("div",{className:s.wrapper,children:[(0,C.jsx)(c.TabsBar,{className:s.tabBar,hideBorder:!0,children:r.map((e=>e.id===Se.Ip.Alert?function(e,t,n,r){if(!l.config.alertingEnabled&&!l.config.unifiedAlertingEnabled)return null;if(l.config.unifiedAlertingEnabled)return(0,C.jsx)(Ot,{label:e.text,active:e.active,onChangeTab:()=>r(e),icon:e.icon,panel:t,dashboard:n},e.id);if(l.config.alertingEnabled)return(0,C.jsx)(c.Tab,{label:e.text,active:e.active,onChangeTab:()=>r(e),icon:e.icon,counter:zt(t,e)},e.id);return null}(e,t,n,a):(0,C.jsx)(c.Tab,{label:e.text,active:e.active,onChangeTab:()=>a(e),icon:e.icon,counter:zt(t,e)},e.id)))}),(0,C.jsxs)(c.TabContent,{className:s.tabContent,children:[d.id===Se.Ip.Query&&(0,C.jsx)(_e,{panel:t,queries:t.targets}),d.id===Se.Ip.Alert&&(0,C.jsx)(Mt,{panel:t,dashboard:n}),d.id===Se.Ip.Transform&&(0,C.jsx)(Re,{panel:t})]})]})}));function zt(e,t){var n;switch(t.id){case Se.Ip.Query:return e.targets.length;case Se.Ip.Alert:return e.alert?1:0;case Se.Ip.Transform:return(null!==(n=e.getTransformations())&&void 0!==n?n:[]).length}return null}jt.displayName="PanelEditorTabs";const Ct=e=>({wrapper:o.css`
      display: flex;
      flex-direction: column;
      height: 100%;
    `,tabBar:o.css`
      padding-left: ${e.spacing(2)};
    `,tabContent:o.css`
      padding: 0;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      min-height: 0;
      background: ${e.colors.background.primary};
      border: 1px solid ${e.components.panel.borderColor};
      border-left: none;
      border-bottom: none;
      border-top-right-radius: ${e.shape.borderRadius(1.5)};
    `});var Pt=n("./public/app/features/dashboard/components/DashNav/DashNavTimeControls.tsx"),Rt=n("./public/app/features/dashboard/components/PanelEditor/state/reducers.ts"),Tt=n("./public/app/features/panel/components/PanelPluginError.tsx");const Bt=e=>t=>t.plugins.panels[e]||(0,Tt.X)(`Panel plugin not found (${e})`,!0),Wt=e=>{let{panel:t}=e;const n=(0,c.useStyles)(_t),r=(0,s.useDispatch)(),a=(0,s.useSelector)(Bt(t.type)),i=(0,s.useSelector)((e=>e.panelEditor.ui.isPanelOptionsVisible)),o=(0,s.useSelector)((e=>e.panelEditor.isVizPickerOpen));return a?(0,C.jsx)("div",{className:n.wrapper,children:(0,C.jsxs)(c.ButtonGroup,{children:[(0,C.jsx)(c.ToolbarButton,{className:n.vizButton,tooltip:"Click to change visualization",imgSrc:a.meta.info.logos.small,isOpen:o,onClick:()=>{r((0,Rt.g_)(!o))},"aria-label":d.wl.components.PanelEditor.toggleVizPicker,fullWidth:!0,children:a.meta.name}),(0,C.jsx)(c.ToolbarButton,{tooltip:i?"Close options pane":"Show options pane",icon:i?"angle-right":"angle-left",onClick:()=>{r((0,Rt.K9)({isPanelOptionsVisible:!i}))},"aria-label":d.wl.components.PanelEditor.toggleVizOptions})]})}):null};Wt.displayName="VisualizationTab";const _t=e=>({wrapper:o.css`
      display: flex;
      flex-direction: column;
    `,vizButton:o.css`
      text-align: left;
    `});var Dt=n("./public/app/features/panel/panellinks/link_srv.ts"),It=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx"),Et=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor.tsx");function At(e){var t;const{panel:n,onPanelConfigChange:r}=e;return new Et.j({title:"Panel options",id:"Panel options",isOpenDefault:!0}).addItem(new It.a({title:"Title",value:n.title,popularRank:1,render:function(){return(0,C.jsx)(c.Input,{id:"PanelFrameTitle",defaultValue:n.title,onBlur:e=>r("title",e.currentTarget.value)})}})).addItem(new It.a({title:"Description",description:n.description,value:n.description,render:function(){return(0,C.jsx)(c.TextArea,{id:"description-text-area",defaultValue:n.description,onBlur:e=>r("description",e.currentTarget.value)})}})).addItem(new It.a({title:"Transparent background",render:function(){return(0,C.jsx)(c.Switch,{value:n.transparent,id:"Transparent background",onChange:e=>r("transparent",e.currentTarget.checked)})}})).addCategory(new Et.j({title:"Panel links",id:"Panel links",isOpenDefault:!1,itemsCount:null===(t=n.links)||void 0===t?void 0:t.length}).addItem(new It.a({title:"Panel links",render:function(){return(0,C.jsx)(c.DataLinksInlineEditor,{links:n.links,onChange:e=>r("links",e),getSuggestions:Dt.PR,data:[]})}}))).addCategory(new Et.j({title:"Repeat options",id:"Repeat options",isOpenDefault:!1}).addItem(new It.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,C.jsx)(D,{id:"repeat-by-variable-select",repeat:n.repeat,onChange:e=>{r("repeat",e)}})}})).addItem(new It.a({title:"Repeat direction",showIf:()=>!!n.repeat,render:function(){return(0,C.jsx)(c.RadioButtonGroup,{options:[{label:"Horizontal",value:"h"},{label:"Vertical",value:"v"}],value:n.repeatDirection||"h",onChange:e=>r("repeatDirection",e)})}})).addItem(new It.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,C.jsx)(c.Select,{menuShouldPortal:!0,options:e,value:n.maxPerRow,onChange:e=>r("maxPerRow",e.value)})}})))}var Ft=n("./public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx"),Lt=n("./public/app/features/dashboard/components/PanelEditor/OptionsPaneCategory.tsx"),Nt=n("./.yarn/__virtual__/react-highlight-words-virtual-d2265e757c/3/opt/drone/yarncache/react-highlight-words-npm-0.17.0-880b4a18ed-41b3d0e451.zip/node_modules/react-highlight-words/dist/main.js"),$t=n.n(Nt);const Ht=e=>{var t,n;let{property:r,context:a,registry:i,onChange:s,onRemove:l,isSystemOverride:d,searchQuery:u}=e;const p=(0,c.useTheme)(),h=Gt(p),f=null==i?void 0:i.getIfExists(r.id);if(!f)return null;const g=Array.isArray(r.value)||r.id===ae.FieldConfigProperty.Thresholds||r.id===ae.FieldConfigProperty.Links||r.id===ae.FieldConfigProperty.Mappings,m=null===(t=f.category)||void 0===t?void 0:t.filter((e=>e!==f.name));let b;const y=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(){let a=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,C.jsxs)(c.HorizontalGroup,{justify:"space-between",children:[(0,C.jsxs)(c.Label,{category:m,description:e?f.description:void 0,children:[(0,C.jsx)($t(),{textToHighlight:f.name,searchWords:[u],highlightClassName:"search-fragment-highlight"}),!a&&t&&f.getItemsCount&&(0,C.jsx)(c.Counter,{value:f.getItemsCount(r.value)})]}),!d&&(n||(n=(0,C.jsx)("div",{children:(0,C.jsx)(c.IconButton,{name:"times",onClick:l})})))]})}};return b=g?(0,C.jsx)(Lt.u,{id:f.name,renderTitle:y(!1,!0),className:o.css`
          padding-left: 0;
          padding-right: 0;
        `,isNested:!0,isOpenDefault:void 0!==r.value,children:(0,C.jsx)(f.override,{value:r.value,onChange:e=>{s(e)},item:f,context:a})}):(0,C.jsx)("div",{children:(0,C.jsx)(c.Field,{label:y()(),description:f.description,children:(0,C.jsx)(f.override,{value:r.value,onChange:e=>{s(e)},item:f,context:a})})}),(0,C.jsx)("div",{className:(0,o.cx)(g&&h.collapsibleOverrideEditor,!g&&"dynamicConfigValueEditor--nonCollapsible"),children:b})},Gt=(0,c.stylesFactory)((e=>({collapsibleOverrideEditor:o.css`
      label: collapsibleOverrideEditor;
      & + .dynamicConfigValueEditor--nonCollapsible {
        margin-top: ${e.spacing.formSpacingBase}px;
      }
    `})));var Vt;const Ut=e=>{let{isExpanded:t,registry:n,matcherUi:r,overrideName:a,override:i,onOverrideRemove:o}=e;const s=(0,c.useStyles)(qt),l=i.properties.map((e=>n.getIfExists(e.id))).filter((e=>!!e)).map((e=>null==e?void 0:e.name)).join(", "),d=r.optionsToLabel(i.matcher.options);return(0,C.jsxs)("div",{children:[(0,C.jsxs)(c.HorizontalGroup,{justify:"space-between",children:[(0,C.jsx)("div",{children:a}),(0,C.jsx)(c.IconButton,{name:"trash-alt",onClick:o,title:"Remove override"})]}),!t&&(0,C.jsx)("div",{className:s.overrideDetails,children:(0,C.jsxs)("div",{className:s.options,title:d,children:[d," ",Vt||(Vt=(0,C.jsx)(c.Icon,{name:"angle-right"}))," ",l]})})]})};Ut.displayName="OverrideTitle";const qt=e=>({matcherUi:o.css`
      padding: ${e.spacing.sm};
    `,propertyPickerWrapper:o.css`
      margin-top: ${2*e.spacing.formSpacingBase}px;
    `,overrideDetails:o.css`
      font-size: ${e.typography.size.sm};
      color: ${e.colors.textWeak};
      font-weight: ${e.typography.weight.regular};
    `,options:o.css`
      overflow: hidden;
      padding-right: ${e.spacing.xl};
    `,unknownLabel:o.css`
      margin-bottom: 0;
    `});function Zt(e,t){var n,r;const a=[],i=e.panel.fieldConfig,o=e.plugin.fieldConfigRegistry,s=null!==(n=null===(r=e.data)||void 0===r?void 0:r.series)&&void 0!==n?n:[];if(o.isEmpty())return[];const l=(t,n)=>{let r=(0,y.cloneDeep)(i.overrides);r[t]=n,e.onFieldConfigsChange(Object.assign({},i,{overrides:r}))},d=t=>{let n=(0,y.cloneDeep)(i.overrides);n.splice(t,1),e.onFieldConfigsChange(Object.assign({},i,{overrides:n}))},u={data:s,getSuggestions:e=>(0,Dt.PW)(s,e),isOverride:!0};for(let n=0;n<i.overrides.length;n++){const r=i.overrides[n],s=`Override ${n+1}`,p=c.fieldMatchersUI.get(r.matcher.id),h=Qt(o),f=(0,ae.isSystemOverride)(r),g=0===r.properties.length?1:0,m=new Et.j({title:s,id:s,forceOpen:g,renderTitle:function(e){return(0,C.jsx)(Ut,{override:r,isExpanded:e,registry:o,overrideName:s,matcherUi:p,onOverrideRemove:()=>d(n)})}}),b=e=>{r.matcher.options=e,l(n,r)},y=(e,t)=>{const a=o.get(t.value),i={id:a.id,value:a.defaultValue};r.properties?e.properties.push(i):e.properties=[i],l(n,e)};m.addItem(new It.a({title:p.name,render:function(){var t,a;return(0,C.jsx)(p.component,{id:`${p.matcher.id}-${n}`,matcher:p.matcher,data:null!==(t=null===(a=e.data)||void 0===a?void 0:a.series)&&void 0!==t?t:[],options:r.matcher.options,onChange:b})}}));for(let e=0;e<r.properties.length;e++){const a=r.properties[e],i=o.getIfExists(a.id);if(!i)continue;const s=t=>{r.properties[e].value=t,l(n,r)},d=()=>{r.properties.splice(e,1),l(n,r)};m.addItem(new It.a({title:i.name,skipField:!0,render:function(){return(0,C.jsx)(Ht,{isSystemOverride:f,onChange:s,onRemove:d,property:a,registry:o,context:u,searchQuery:t},`${a.id}/${e}`)}}))}!f&&r.matcher.options&&m.addItem(new It.a({title:"----------",skipField:!0,render:function(){return(0,C.jsx)(c.ValuePicker,{label:"Add override property",variant:"secondary",isFullWidth:!0,icon:"plus",menuPlacement:"auto",options:h,onChange:e=>y(r,e)},"Add override property")}})),a.push(m)}return a.push(new Et.j({title:"add button",id:"add button",customRender:function(){return(0,C.jsx)(Yt,{children:(0,C.jsx)(c.ValuePicker,{icon:"plus",label:"Add field override",variant:"secondary",menuPlacement:"auto",isFullWidth:!0,size:"md",options:c.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")}})),a}function Qt(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 Yt(e){let{children:t}=e;const n=(0,c.useStyles2)(Jt);return(0,C.jsx)("div",{className:n,children:t})}function Jt(e){return(0,o.css)({borderTop:`1px solid ${e.colors.border.weak}`,padding:`${e.spacing(2)}`,display:"flex"})}class Xt{constructor(e,t){this.categories=e,this.overrides=t}search(e){const t=new RegExp(e,"i"),n=this.collectHits(this.categories,t,[]).sort(Kt).map((e=>e.item)),r=this.collectHits(this.overrides,t,[]).sort(Kt).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 a of r.items)t.test(a.props.title)?n.push({item:a,rank:1}):a.props.description&&t.test(a.props.description)?n.push({item:a,rank:2}):e&&n.push({item:a,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 Et.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 Kt(e,t){return e.rank-t.rank}var en=n("./public/app/features/panel/state/actions.ts");function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nn=(e,t)=>{var n;return{angularPanelComponent:null===(n=(0,et.i)(e,t.panel))||void 0===n?void 0:n.angularComponent}},rn={changePanelPlugin:en.Kc};(0,s.connect)(nn,rn);class an extends i.PureComponent{constructor(e){super(e),tn(this,"element",void 0),tn(this,"angularOptions",void 0)}componentDidMount(){this.loadAngularOptions()}componentDidUpdate(e){this.props.plugin===e.plugin&&this.props.angularPanelComponent===e.angularPanelComponent||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 a=r.$$childHead.ctrl;a.initEditMode(),a.onPluginTypeChange=t=>{n({panel:e,pluginId:t.id})};let i="";for(let e=0;e<a.editorTabs.length;e++){const t=a.editorTabs[e];t.isOpen=(o=t.title,s=0===e,M.Z.getBool(`panel-edit-section-${o}`,s)),i+=`\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 o,s;const d=(0,l.getAngularLoader)(),c={ctrl:a,toggleOptionGroup:e=>{const t=a.editorTabs[e];t.isOpen=!t.isOpen,function(e,t){M.Z.set(`panel-edit-section-${e}`,t?"true":"false")}(t.title,t.isOpen)}};this.angularOptions=d.load(this.element,c,i),this.angularOptions.digest()}render(){return(0,C.jsx)("div",{ref:e=>this.element=e})}}const on=(0,s.connect)(nn,rn)(an);function sn(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 ln=n("./public/app/features/library-panels/guard.ts");const dn=e=>{var t;let{panel:n,formatDate:r}=e;const a=(0,c.useStyles)(cn);return(0,ln.V)(n)?(0,C.jsxs)("div",{className:a.info,children:[(0,C.jsxs)("div",{className:a.libraryPanelInfo,children:[`Used on ${n.libraryPanel.meta.connectedDashboards} `,1===n.libraryPanel.meta.connectedDashboards?"dashboard":"dashboards"]}),(0,C.jsxs)("div",{className:a.libraryPanelInfo,children:["Last edited on ",null!==(t=null==r?void 0:r(n.libraryPanel.meta.updated,"L"))&&void 0!==t?t:n.libraryPanel.meta.updated," by",n.libraryPanel.meta.updatedBy.avatarUrl&&(0,C.jsx)("img",{width:"22",height:"22",className:a.userAvatar,src:n.libraryPanel.meta.updatedBy.avatarUrl,alt:`Avatar for ${n.libraryPanel.meta.updatedBy.name}`}),n.libraryPanel.meta.updatedBy.name]})]}):null},cn=e=>({info:o.css`
      line-height: 1;
    `,libraryPanelInfo:o.css`
      color: ${e.colors.textSemiWeak};
      font-size: ${e.typography.size.sm};
    `,userAvatar:o.css`
      border-radius: 50%;
      box-sizing: content-box;
      width: 22px;
      height: 22px;
      padding-left: ${e.spacing.sm};
      padding-right: ${e.spacing.sm};
    `});function un(e){const{panel:t,onPanelConfigChange:n,dashboard:r}=e,a=new Et.j({title:"Library panel options",id:"Library panel options",isOpenDefault:!0});return(0,ln.V)(t)&&a.addItem(new It.a({title:"Name",value:t.libraryPanel.name,popularRank:1,render:function(){return(0,C.jsx)(c.Input,{id:"LibraryPanelFrameName",defaultValue:t.libraryPanel.name,onBlur:e=>n("libraryPanel",Object.assign({},t.libraryPanel,{name:e.currentTarget.value}))})}})).addItem(new It.a({title:"Information",render:function(){return(0,C.jsx)(dn,{panel:t,formatDate:r.formatDate})}})),a}const pn=e=>{const{plugin:t,dashboard:n,panel:r}=e,[a,o]=(0,i.useState)(""),[s,l]=(0,i.useState)(fn.All),d=(0,c.useStyles2)(gn),[u,p,h]=(0,i.useMemo)((()=>[At(e),(0,Ft.AL)(e),un(e)]),[r.configRev,e.data,e.instanceState,a]),f=(0,i.useMemo)((()=>Zt(e,a)),[r.configRev,e.data,e.instanceState,a]),g=[],m=a.length>0,b=(0,i.useMemo)(hn,[]),y=(0,ln.V)(r)?[h,u,...p]:[u,...p];if(m)g.push(function(e,t,n){const r=new Xt(e,t),{optionHits:a,totalCount:i,overrideHits:o}=r.search(n);return(0,C.jsxs)("div",{children:[(0,C.jsx)(Lt.u,{id:"Found options",title:`Matched ${a.length}/${i} options`,forceOpen:1,children:a.map((e=>e.render(n)))},"Normal options"),o.map((e=>e.render(n)))]},"search results")}(y,f,a)),e.plugin.angularPanelCtrl&&g.push((0,C.jsx)("div",{className:d.searchNotice,children:"This is an old visualization type that does not support searching all options."},"Search notice"));else switch(s){case fn.All:(0,ln.V)(r)&&g.push(h.render()),g.push(u.render()),e.plugin.angularPanelCtrl&&g.push((0,C.jsx)(on,{plugin:t,dashboard:n,panel:r},"AngularOptions"));for(const e of p)g.push(e.render());for(const e of f)g.push(e.render());break;case fn.Overrides:for(const e of f)g.push(e.render());break;case fn.Recent:g.push((0,C.jsx)(Lt.u,{id:"Recent options",title:"Recent options",forceOpen:1,children:sn(y).map((e=>e.render()))},"Recent options"))}const v=!m&&!t.fieldConfigRegistry.isEmpty();return(0,C.jsxs)("div",{className:d.wrapper,children:[(0,C.jsxs)("div",{className:d.formBox,children:[(0,C.jsx)("div",{className:d.formRow,children:(0,C.jsx)(c.FilterInput,{width:0,value:a,onChange:o,placeholder:"Search options"})}),v&&(0,C.jsx)("div",{className:d.formRow,children:(0,C.jsx)(c.RadioButtonGroup,{options:b,value:s,fullWidth:!0,onChange:l})})]}),(0,C.jsx)("div",{className:d.scrollWrapper,children:(0,C.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,C.jsx)("div",{className:d.mainBox,children:g})})})]})};function hn(){return[{label:fn.All,value:fn.All},{label:fn.Overrides,value:fn.Overrides}]}let fn;!function(e){e.All="All",e.Overrides="Overrides",e.Recent="Recent"}(fn||(fn={}));const gn=e=>({wrapper:o.css`
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;

    .search-fragment-highlight {
      color: ${e.colors.warning.text};
      background: transparent;
    }
  `,searchBox:o.css`
    display: flex;
    flex-direction: column;
    min-height: 0;
  `,formRow:o.css`
    margin-bottom: ${e.spacing(1)};
  `,formBox:o.css`
    padding: ${e.spacing(1)};
    background: ${e.colors.background.primary};
    border: 1px solid ${e.components.panel.borderColor};
    border-top-left-radius: ${e.shape.borderRadius(1.5)};
    border-bottom: none;
  `,closeButton:o.css`
    margin-left: ${e.spacing(1)};
  `,searchHits:o.css`
    padding: ${e.spacing(1,1,0,1)};
  `,scrollWrapper:o.css`
    flex-grow: 1;
    min-height: 0;
  `,searchNotice:o.css`
    font-size: ${e.typography.size.sm};
    color: ${e.colors.text.secondary};
    padding: ${e.spacing(1)};
    text-align: center;
  `,mainBox:o.css`
    background: ${e.colors.background.primary};
    border: 1px solid ${e.components.panel.borderColor};
    border-top: none;
    flex-grow: 1;
  `});var mn=n("./public/app/features/panel/components/VizTypePicker/PanelTypeCard.tsx");const bn=e=>{let{isCurrent:t,plugin:n,onClick:r,disabled:a}=e;return(0,C.jsx)(mn.X,{title:n.name,plugin:n,description:n.info.description,onClick:r,isCurrent:t,disabled:a,showBadge:!0})};bn.displayName="VizTypePickerPlugin";var yn,vn=n("./public/app/features/panel/state/util.ts");function Sn(e){let{searchQuery:t,onChange:n,current:r,data:a}=e;const o=(0,c.useStyles2)(xn),s=(0,i.useMemo)((()=>(0,vn.x)()),[]),l=(0,i.useMemo)((()=>(0,vn.r)(s,t,r)),[r,s,t]);return 0===l.length?yn||(yn=(0,C.jsx)(c.EmptySearchResult,{children:"Could not find anything matching your query"})):(0,C.jsx)("div",{className:o.grid,children:l.map(((e,t)=>(0,C.jsx)(bn,{disabled:!1,isCurrent:e.id===r.id,plugin:e,onClick:t=>n({pluginId:e.id,withModKey:Boolean(t.metaKey||t.ctrlKey||t.altKey)})},e.id)))})}const xn=e=>({grid:o.css`
      max-width: 100%;
      display: grid;
      grid-gap: ${e.spacing(.5)};
    `,heading:(0,o.css)(Object.assign({},e.typography.h5,{margin:e.spacing(0,.5,1)}))});var Mn=n("./packages/grafana-ui/src/components/Forms/Field.tsx"),wn=n("./public/app/features/library-panels/components/AddLibraryPanelModal/AddLibraryPanelModal.tsx"),kn=n("./public/app/features/library-panels/components/LibraryPanelsView/LibraryPanelsView.tsx"),On=n("./public/app/features/dashboard/services/DashboardSrv.ts");const jn=e=>{let{onConfirm:t,onDismiss:n,panel:r}=e;const a=(0,ln.V)(r),i=(a?"Changing":"Replace with")+" library panel",o=(a?"Changing":"Replacing with a")+" library panel will remove any changes since last save.";return(0,C.jsx)(c.ConfirmModal,{onConfirm:t,onDismiss:n,confirmText:a?"Change":"Replace",title:i,body:o,dismissText:"Cancel",isOpen:!0})};var zn=n("./public/app/core/components/PanelTypeFilter/PanelTypeFilter.tsx");const Cn=e=>{var t;let{panel:n,searchQuery:r}=e;const a=(0,c.useStyles2)(Pn),[o,l]=(0,i.useState)(!1),[d,u]=(0,i.useState)(void 0),[p,h]=(0,i.useState)([]),f=(0,i.useCallback)((e=>{h(e.map((e=>e.id)))}),[h]),g=(0,On.h4)().getCurrent(),m=(0,s.useDispatch)();return(0,C.jsxs)(c.VerticalGroup,{spacing:"md",children:[!n.libraryPanel&&(0,C.jsx)(c.VerticalGroup,{align:"center",children:(0,C.jsx)(c.Button,{icon:"plus",onClick:()=>{l(!0)},variant:"secondary",fullWidth:!0,children:"Create new library panel"})}),(0,C.jsx)(zn.j,{onChange:f}),(0,C.jsx)("div",{className:a.libraryPanelsView,children:(0,C.jsx)(kn.u,{currentPanelId:null===(t=n.libraryPanel)||void 0===t?void 0:t.uid,searchString:r,panelFilter:p,onClickCard:e=>{u(e)},showSecondaryActions:!0})}),o&&(0,C.jsx)(wn.c,{panel:n,onDismiss:()=>l(!1),initialFolderId:null==g?void 0:g.meta.folderId,isOpen:o}),d&&(0,C.jsx)(jn,{panel:n,onDismiss:()=>{u(void 0)},onConfirm:async()=>{d&&(u(void 0),m((0,en.ih)(n,d)))}})]})},Pn=e=>({libraryPanelsView:o.css`
      width: 100%;
    `});var Rn=n("./public/app/features/panel/components/PanelRenderer.tsx");function Tn(e){var t,n;let{data:r,suggestion:a,onChange:i,width:s,showTitle:l}=e;const u=(0,c.useStyles2)(Bn),{innerStyles:p,outerStyles:h,renderWidth:f,renderHeight:g}=function(e){const t=1.6,n=e*(1/t),r=350,a=r*(1/t),i=6;return{renderHeight:a,renderWidth:r,outerStyles:{width:e,height:n},innerStyles:{width:r,height:a,transform:`scale(${(e-2*i)/r}, ${(n-2*i)/a})`}}}(s),m=null!==(t=a.cardOptions)&&void 0!==t?t:{},b={"aria-label":a.name,className:u.vizBox,"data-testid":d.wl.components.VisualizationPreview.card(a.name),style:h,onClick:()=>{i({pluginId:a.pluginId,options:a.options,fieldConfig:a.fieldConfig})}};var v;if(m.imgSrc)return(0,C.jsx)(c.Tooltip,{content:null!==(v=a.description)&&void 0!==v?v:a.name,children:(0,C.jsxs)("button",Object.assign({},b,{className:(0,o.cx)(u.vizBox,u.imgBox),children:[(0,C.jsx)("div",{className:u.name,children:a.name}),(0,C.jsx)("img",{className:u.img,src:m.imgSrc,alt:a.name})]}))});let S=a;return null!==(n=a.cardOptions)&&void 0!==n&&n.previewModifier&&(S=(0,y.cloneDeep)(a),a.cardOptions.previewModifier(S)),(0,C.jsx)("button",Object.assign({},b,{children:(0,C.jsx)(c.Tooltip,{content:a.name,children:(0,C.jsxs)("div",{style:p,className:u.renderContainer,children:[(0,C.jsx)(Rn.$,{title:"",data:r,pluginId:a.pluginId,width:f,height:g,options:S.options,fieldConfig:S.fieldConfig}),(0,C.jsx)("div",{className:u.hoverPane})]})})}))}const Bn=e=>({hoverPane:(0,o.css)({position:"absolute",top:0,right:0,left:0,borderRadius:e.spacing(2),bottom:0}),vizBox:o.css`
      position: relative;
      background: none;
      border-radius: ${e.shape.borderRadius(1)};
      cursor: pointer;
      border: 1px solid ${e.colors.border.medium};

      transition: ${e.transitions.create(["background"],{duration:e.transitions.duration.short})};

      &:hover {
        background: ${e.colors.background.secondary};
      }
    `,imgBox:o.css`
      display: flex;
      flex-direction: column;
      height: 100%;

      justify-self: center;
      color: ${e.colors.text.primary};
      width: 100%;
      display: flex;

      justify-content: center;
      align-items: center;
      text-align: center;
    `,name:o.css`
      padding-bottom: ${e.spacing(.5)};
      margin-top: ${e.spacing(-1)};
      font-size: ${e.typography.bodySmall.fontSize};
      white-space: nowrap;
      overflow: hidden;
      color: ${e.colors.text.secondary};
      font-weight: ${e.typography.fontWeightMedium};
      text-overflow: ellipsis;
    `,img:o.css`
      max-width: ${e.spacing(8)};
      max-height: ${e.spacing(8)};
    `,renderContainer:o.css`
      position: absolute;
      transform-origin: left top;
      top: 6px;
      left: 6px;
    `});var Wn=n("./public/app/features/plugins/importPanelPlugin.ts");const _n=["timeseries","barchart","gauge","stat","piechart","bargauge","table","state-timeline","status-history","logs","candlestick"];var Dn=n("./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useLocalStorage.js");function In(e){let{onChange:t,data:n,panel:r,searchQuery:a}=e;const i=(0,c.useStyles2)(En),{value:o}=(0,lt.Z)((()=>async function(e,t){const n=new ae.VisualizationSuggestionsBuilder(e,t);for(const e of _n){const t=(await(0,Wn.U)(e)).getSuggestionsSupplier();t&&t.getSuggestionsForData(n)}const r=n.getList();if(0===n.dataSummary.fieldCount)for(const e of Object.values(l.config.panels))e.skipDataQuery&&!e.hideFromList&&r.push({name:e.name,pluginId:e.id,description:e.info.description,cardOptions:{imgSrc:e.info.logos.small}});return r.sort(((e,t)=>{var n,r;return(null!==(n=t.score)&&void 0!==n?n:ae.VisualizationSuggestionScore.OK)-(null!==(r=e.score)&&void 0!==r?r:ae.VisualizationSuggestionScore.OK)}))}(n,r)),[n,r]),[s,d]=(0,Dn.Z)("VisualizationSuggestions.showTitle",!1),u=function(e,t){if(!e||!t)return t||[];const n=new RegExp(e,"i");return t.filter((e=>n.test(e.name)||n.test(e.pluginId)))}(a,o);return(0,C.jsx)(b.Z,{disableHeight:!0,style:{width:"100%",height:"100%"},children:e=>{let{width:r}=e;if(!r)return null;const o=Math.floor(r/170),l=(r-8*(o-1))/o;return(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:i.filterRow,children:(0,C.jsx)("div",{className:i.infoText,onClick:()=>d(!s),children:"Based on current data"})}),(0,C.jsxs)("div",{className:i.grid,style:{gridTemplateColumns:`repeat(auto-fill, ${l-1}px)`},children:[u.map(((e,r)=>(0,C.jsx)(Tn,{data:n,suggestion:e,onChange:t,width:l,showTitle:s},r))),a&&0===u.length&&(0,C.jsx)("div",{className:i.infoText,children:"No results matched your query"})]})]})}})}const En=e=>({heading:(0,o.css)(Object.assign({},e.typography.h5,{margin:e.spacing(0,.5,1)})),filterRow:(0,o.css)({display:"flex",flexDirection:"row",justifyContent:"space-around",alignItems:"center",paddingBottom:"8px"}),infoText:(0,o.css)({fontSize:e.typography.bodySmall.fontSize,color:e.colors.text.secondary,fontStyle:"italic"}),grid:(0,o.css)({display:"grid",gridGap:e.spacing(1),gridTemplateColumns:"repeat(auto-fill, 144px)",marginBottom:e.spacing(1),justifyContent:"space-evenly"})}),An=e=>{let{panel:t,data:n}=e;const r=(0,s.useSelector)(Bt(t.type)),[a,o]=(0,i.useState)(""),[l,u]=(0,Dn.Z)(k.FL,Se.Ok.Visualizations),p=(0,s.useDispatch)(),h=(0,c.useStyles)(Fn),f=(0,i.useRef)(null),g=(0,i.useCallback)((e=>{p((0,en.Kc)(Object.assign({panel:t},e))),e.withModKey||p((0,Rt.g_)(!1))}),[p,t]);(0,i.useEffect)((()=>{f.current&&f.current.focus()}),[l]);if(!r)return null;const m=[{label:"Visualizations",value:Se.Ok.Visualizations},{label:"Suggestions",value:Se.Ok.Suggestions},{label:"Library panels",value:Se.Ok.LibraryPanels,description:"Reusable panels you can share between multiple dashboards."}];return(0,C.jsxs)("div",{className:h.openWrapper,children:[(0,C.jsxs)("div",{className:h.formBox,children:[(0,C.jsxs)("div",{className:h.searchRow,children:[(0,C.jsx)(c.FilterInput,{value:a,onChange:o,ref:f,autoFocus:!0,placeholder:"Search for..."}),(0,C.jsx)(c.Button,{title:"Close",variant:"secondary",icon:"angle-up",className:h.closeButton,"aria-label":d.wl.components.PanelEditor.toggleVizPicker,onClick:()=>{p((0,Rt.g_)(!1))}})]}),(0,C.jsx)(Mn.g,{className:h.customFieldMargin,children:(0,C.jsx)(c.RadioButtonGroup,{options:m,value:l,onChange:u,fullWidth:!0})})]}),(0,C.jsx)("div",{className:h.scrollWrapper,children:(0,C.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,C.jsxs)("div",{className:h.scrollContent,children:[l===Se.Ok.Visualizations&&(0,C.jsx)(Sn,{current:r.meta,onChange:g,searchQuery:a,data:n,onClose:()=>{}}),l===Se.Ok.Suggestions&&(0,C.jsx)(In,{current:r.meta,onChange:g,searchQuery:a,panel:t,data:n,onClose:()=>{}}),l===Se.Ok.LibraryPanels&&(0,C.jsx)(Cn,{searchQuery:a,panel:t},"Panel Library")]})})})]})};An.displayName="VisualizationSelectPane";const Fn=e=>({icon:o.css`
      color: ${e.palette.gray33};
    `,wrapper:o.css`
      display: flex;
      flex-direction: column;
      flex: 1 1 0;
      height: 100%;
    `,vizButton:o.css`
      text-align: left;
    `,scrollWrapper:o.css`
      flex-grow: 1;
      min-height: 0;
    `,scrollContent:o.css`
      padding: ${e.spacing.sm};
    `,openWrapper:o.css`
      display: flex;
      flex-direction: column;
      flex: 1 1 100%;
      height: 100%;
      background: ${e.colors.bg1};
      border: 1px solid ${e.colors.border1};
    `,searchRow:o.css`
      display: flex;
      margin-bottom: ${e.spacing.sm};
    `,closeButton:o.css`
      margin-left: ${e.spacing.sm};
    `,customFieldMargin:o.css`
      margin-bottom: ${e.spacing.sm};
    `,formBox:o.css`
      padding: ${e.spacing.sm};
      padding-bottom: 0;
    `}),Ln=(e,t,n)=>{const r=(0,i.useRef)(),[a,o]=(0,i.useState)();return(0,i.useEffect)((()=>{let a=-1,i=0;return r.current=e.getQueryRunner().getData(t).subscribe({next:e=>{if(n){var t;if(a===e.structureRev){const e=Date.now();if(e-i<1e4)return;i=e}a=null!==(t=e.structureRev)&&void 0!==t?t:-1}o(e)}}),()=>{r.current&&r.current.unsubscribe()}}),[e,t.withFieldConfig,t.withTransforms]),{data:a,error:a&&a.error,isLoading:!a||a.state===ae.LoadingState.Loading,hasSeries:!!a&&!!a.series}},Nn=e=>{let{plugin:t,panel:n,onFieldConfigsChange:r,onPanelOptionsChanged:a,onPanelConfigChange:i,dashboard:o,instanceState:l}=e;const u=(0,c.useStyles)($n),p=(0,s.useSelector)((e=>e.panelEditor.isVizPickerOpen)),{data:h}=Ln(n,{withTransforms:!0,withFieldConfig:!1},!0);return(0,C.jsxs)("div",{className:u.wrapper,"aria-label":d.wl.components.PanelEditor.OptionsPane.content,children:[!p&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:u.vizButtonWrapper,children:(0,C.jsx)(Wt,{panel:n})}),(0,C.jsx)("div",{className:u.optionsWrapper,children:(0,C.jsx)(pn,{panel:n,dashboard:o,plugin:t,instanceState:l,data:h,onFieldConfigsChange:r,onPanelOptionsChanged:a,onPanelConfigChange:i})})]}),p&&(0,C.jsx)(An,{panel:n,data:h})]})},$n=e=>({wrapper:o.css`
      height: 100%;
      width: 100%;
      display: flex;
      flex: 1 1 0;
      flex-direction: column;
      padding: 0;
    `,optionsWrapper:o.css`
      flex-grow: 1;
      min-height: 0;
    `,vizButtonWrapper:o.css`
      padding: 0 ${e.spacing.md} ${e.spacing.md} 0;
    `,legacyOptions:o.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 Hn,Gn=n("./public/app/features/variables/types.ts"),Vn=n("./public/app/features/variables/adapters.ts");const Un=e=>{const t=(0,i.useMemo)((()=>Vn.z.get(e.variable.type).picker),[e.variable]);return e.variable?(0,C.jsxs)("div",{className:"gf-form",children:[(0,C.jsx)(qn,{variable:e.variable}),e.variable.hide!==Gn.bU.hideVariable&&t&&(0,C.jsx)(t,{variable:e.variable})]}):Hn||(Hn=(0,C.jsx)("div",{children:"Couldn't load variable"}))};function qn(e){let{variable:t}=e;const n=(0,i.useMemo)((()=>t.label||t.name),[t]);return t.hide!==Gn.bU.dontHide?null:t.description?(0,C.jsx)(c.Tooltip,{content:t.description,placement:"bottom",children:(0,C.jsx)("label",{className:"gf-form-label gf-form-label--variable","data-testid":d.wl.pages.Dashboard.SubMenu.submenuItemLabels(n),htmlFor:t.id,children:n})}):(0,C.jsx)("label",{className:"gf-form-label gf-form-label--variable","data-testid":d.wl.pages.Dashboard.SubMenu.submenuItemLabels(n),htmlFor:t.id,children:n})}const Zn=e=>{let{variables:t}=e;const[n,r]=(0,i.useState)([]);return(0,i.useEffect)((()=>{r(t.filter((e=>e.hide!==Gn.bU.hideVariable)))}),[t]),0===n.length?null:(0,C.jsx)(C.Fragment,{children:n.map((e=>(0,C.jsx)("div",{className:"submenu-item gf-form-inline","data-testid":d.wl.pages.Dashboard.SubMenu.submenuItem,children:(0,C.jsx)(Un,{variable:e})},e.id)))})};var Qn=n("../../opt/drone/yarncache/prop-types-npm-15.7.2-d7a04f2274-5eef82fdda.zip/node_modules/prop-types/index.js"),Yn=n.n(Qn),Jn=n("../../opt/drone/yarncache/react-style-proptype-npm-3.2.2-d7241ef02d-f0e646e148.zip/node_modules/react-style-proptype/src/index.js"),Xn=n.n(Jn),Kn=n("../../opt/drone/yarncache/react-lifecycles-compat-npm-3.0.4-d5e285a39e-a904b0fc0a.zip/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js");function er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tr(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 nr(e,t,n){return t&&tr(e.prototype,t),n&&tr(e,n),e}function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ar(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 ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(n),!0).forEach((function(t){rr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function or(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&&lr(e,t)}function sr(e){return sr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sr(e)}function lr(e,t){return lr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lr(e,t)}function dr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function cr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ur(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?cr(e):t}function pr(e){return function(){var t,n=sr(e);if(dr()){var r=sr(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return ur(this,t)}}var hr=function(e){or(n,e);var t=pr(n);function n(){return er(this,n),t.apply(this,arguments)}return nr(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.split,a=e.style,o=e.size,s=e.eleRef,l=["Pane",r,n],d={flex:1,position:"relative",outline:"none"};return void 0!==o&&("vertical"===r?d.width=o:(d.height=o,d.display="flex"),d.flex="none"),d=Object.assign({},d,a||{}),i.createElement("div",{ref:s,className:l.join(" "),style:d},t)}}]),n}(i.PureComponent);hr.propTypes={className:Yn().string.isRequired,children:Yn().node.isRequired,size:Yn().oneOfType([Yn().string,Yn().number]),split:Yn().oneOf(["vertical","horizontal"]),style:Xn(),eleRef:Yn().func},hr.defaultProps={};var fr="Resizer",gr=function(e){or(n,e);var t=pr(n);function n(){return er(this,n),t.apply(this,arguments)}return nr(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.onClick,r=e.onDoubleClick,a=e.onMouseDown,o=e.onTouchEnd,s=e.onTouchStart,l=e.resizerClassName,d=e.split,c=e.style,u=[l,d,t];return i.createElement("span",{role:"presentation",className:u.join(" "),style:c,onMouseDown:function(e){return a(e)},onTouchStart:function(e){e.preventDefault(),s(e)},onTouchEnd:function(e){e.preventDefault(),o(e)},onClick:function(e){n&&(e.preventDefault(),n(e))},onDoubleClick:function(e){r&&(e.preventDefault(),r(e))}})}}]),n}(i.Component);function mr(e,t){if(e.selection)e.selection.empty();else try{t.getSelection().removeAllRanges()}catch(e){}}function br(e,t,n,r){if("number"==typeof r){var a="number"==typeof t?t:0,i="number"==typeof n&&n>=0?n:1/0;return Math.max(a,Math.min(i,r))}return void 0!==e?e:t}gr.propTypes={className:Yn().string.isRequired,onClick:Yn().func,onDoubleClick:Yn().func,onMouseDown:Yn().func.isRequired,onTouchStart:Yn().func.isRequired,onTouchEnd:Yn().func.isRequired,split:Yn().oneOf(["vertical","horizontal"]),style:Xn(),resizerClassName:Yn().string.isRequired},gr.defaultProps={resizerClassName:fr};var yr=function(e){or(n,e);var t=pr(n);function n(e){var r;er(this,n),(r=t.call(this,e)).onMouseDown=r.onMouseDown.bind(cr(r)),r.onTouchStart=r.onTouchStart.bind(cr(r)),r.onMouseMove=r.onMouseMove.bind(cr(r)),r.onTouchMove=r.onTouchMove.bind(cr(r)),r.onMouseUp=r.onMouseUp.bind(cr(r));var a=e.size,i=e.defaultSize,o=e.minSize,s=e.maxSize,l=e.primary,d=void 0!==a?a:br(i,o,s,null);return r.state={active:!1,resized:!1,pane1Size:"first"===l?d:void 0,pane2Size:"second"===l?d:void 0,instanceProps:{size:a}},r}return nr(n,[{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),this.setState(n.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,a=t.split;if(n){mr(document,window);var i="vertical"===a?e.touches[0].clientX:e.touches[0].clientY;"function"==typeof r&&r(),this.setState({active:!0,position:i})}}},{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,a=t.minSize,i=t.onChange,o=t.split,s=t.step,l=this.state,d=l.active,c=l.position;if(n&&d){mr(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"===o?m:b,v=c-("vertical"===o?e.touches[0].clientX:e.touches[0].clientY);if(s){if(Math.abs(v)<s)return;v=~~(v/s)*s}var S=u?v:-v;parseInt(window.getComputedStyle(f).order)>parseInt(window.getComputedStyle(g).order)&&(S=-S);var x=r;if(void 0!==r&&r<=0){var M=this.splitPane;x="vertical"===o?M.getBoundingClientRect().width+r:M.getBoundingClientRect().height+r}var w=y-S,k=c-v;w<a?w=a:void 0!==r&&w>x?w=x:this.setState({position:k,resized:!0}),i&&i(w),this.setState(rr({draggedSize:w},u?"pane1Size":"pane2Size",w))}}}}},{key:"onMouseUp",value:function(){var e=this.props,t=e.allowResize,n=e.onDragFinished,r=this.state,a=r.active,i=r.draggedSize;t&&a&&("function"==typeof n&&n(i),this.setState({active:!1}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.allowResize,r=t.children,a=t.className,o=t.onResizerClick,s=t.onResizerDoubleClick,l=t.paneClassName,d=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,S=y.pane2Size,x=n?"":"disabled",M=f?"".concat(f," ").concat(fr):f,w=function(e){return i.Children.toArray(e).filter((function(e){return e}))}(r),k=ir({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 O=["SplitPane",a,m,x],j=ir({},u,{},p),z=ir({},u,{},h),C=["Pane1",l,d].join(" "),P=["Pane2",l,c].join(" ");return i.createElement("div",{className:O.join(" "),ref:function(t){e.splitPane=t},style:k},i.createElement(hr,{className:C,key:"pane1",eleRef:function(t){e.pane1=t},size:v,split:m,style:j},w[0]),i.createElement(gr,{className:x,onClick:o,onDoubleClick:s,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,key:"resizer",resizerClassName:M,split:m,style:g||{}}),i.createElement(hr,{className:P,key:"pane2",eleRef:function(t){e.pane2=t},size:S,split:m,style:z},w[1]))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return n.getSizeUpdate(e,t)}},{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:br(e.defaultSize,e.minSize,e.maxSize,t.draggedSize);void 0!==e.size&&(n.draggedSize=r);var a="first"===e.primary;return n[a?"pane1Size":"pane2Size"]=r,n[a?"pane2Size":"pane1Size"]=void 0,n.instanceProps={size:e.size},n}}]),n}(i.Component);yr.propTypes={allowResize:Yn().bool,children:Yn().arrayOf(Yn().node).isRequired,className:Yn().string,primary:Yn().oneOf(["first","second"]),minSize:Yn().oneOfType([Yn().string,Yn().number]),maxSize:Yn().oneOfType([Yn().string,Yn().number]),defaultSize:Yn().oneOfType([Yn().string,Yn().number]),size:Yn().oneOfType([Yn().string,Yn().number]),split:Yn().oneOf(["vertical","horizontal"]),onDragStarted:Yn().func,onDragFinished:Yn().func,onChange:Yn().func,onResizerClick:Yn().func,onResizerDoubleClick:Yn().func,style:Xn(),resizerStyle:Xn(),paneClassName:Yn().string,pane1ClassName:Yn().string,pane2ClassName:Yn().string,paneStyle:Xn(),pane1Style:Xn(),pane2Style:Xn(),resizerClassName:Yn().string,step:Yn().number},yr.defaultProps={allowResize:!0,minSize:50,primary:"first",split:"vertical",paneClassName:"",pane1ClassName:"",pane2ClassName:""},(0,Kn.O)(yr);const vr=yr;function Sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xr;!function(e){e[e.Right=0]="Right",e[e.Top=1]="Top"}(xr||(xr={}));class Mr extends i.PureComponent{constructor(){super(...arguments),Sr(this,"rafToken",(0,i.createRef)()),Sr(this,"updateSplitPaneSize",(()=>{void 0!==this.rafToken.current&&window.cancelAnimationFrame(this.rafToken.current),this.rafToken.current=window.requestAnimationFrame((()=>{this.forceUpdate()}))})),Sr(this,"onDragFinished",((e,t)=>{if(document.body.style.cursor="auto",!t)return;const{updateUiState:n}=this.props;e===xr.Top?n({topPaneSize:t/window.innerHeight}):n({rightPaneSize:t/window.innerWidth})})),Sr(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=wr(x.vc.theme),r=t.topPaneSize>=1?t.topPaneSize:t.topPaneSize*window.innerHeight;return Array.isArray(e)?(0,C.jsx)(vr,{split:"horizontal",maxSize:-200,primary:"first",size:r,pane2Style:{minHeight:0},resizerClassName:n.resizerH,onDragStarted:this.onDragStarted,onDragFinished:e=>this.onDragFinished(xr.Top,e),children:e}):e}render(){const{rightPaneVisible:e,rightPaneComponents:t,uiState:n}=this.props,r=wr(x.vc.theme),a=n.rightPaneSize<=1?n.rightPaneSize*window.innerWidth:n.rightPaneSize;return e?(0,C.jsxs)(vr,{split:"vertical",maxSize:-300,size:a,primary:"second",resizerClassName:r.resizerV,onDragStarted:()=>document.body.style.cursor="col-resize",onDragFinished:e=>this.onDragFinished(xr.Right,e),children:[this.renderHorizontalSplit(),t]}):this.renderHorizontalSplit()}}Sr(Mr,"defaultProps",{rightPaneVisible:!0});const wr=(0,c.stylesFactory)((e=>{const t=e.palette.blue95,n=e.spacing.md,r=o.css`
    position: relative;

    &::before {
      content: '';
      position: absolute;
      transition: 0.2s border-color ease-in-out;
    }

    &::after {
      background: ${e.colors.panelBorder};
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      transition: 0.2s background ease-in-out;
      transform: translate(-50%, -50%);
      border-radius: 4px;
    }

    &:hover {
      &::before {
        border-color: ${t};
      }

      &::after {
        background: ${t};
      }
    }
  `;return{resizerV:(0,o.cx)(r,o.css`
        cursor: col-resize;
        width: ${n};

        &::before {
          border-right: 1px solid transparent;
          height: 100%;
          left: 50%;
          transform: translateX(-50%);
        }

        &::after {
          height: 200px;
          width: 4px;
        }
      `),resizerH:(0,o.cx)(r,o.css`
        height: ${n};
        cursor: row-resize;
        margin-left: ${n};

        &::before {
          border-top: 1px solid transparent;
          top: 50%;
          transform: translateY(-50%);
          width: 100%;
        }

        &::after {
          height: 4px;
          width: 200px;
        }
      `)}}));var kr=n("./public/app/features/dashboard/components/SaveDashboard/SaveDashboardModalProxy.tsx"),Or=n("./public/app/features/panel/state/reducers.ts");function jr(){return async(e,t)=>{const{getPanel:n}=t().panelEditor;n().configRev=0,e((0,Rt.yi)(!0))}}function zr(e,t){var n;return(null===(n=t.libraryPanel)||void 0===n?void 0:n.uid)!==e.libraryPanel.uid||(!(!t.id||t.id!==e.id)||!!t.repeatPanelId)}function Cr(){return async(e,t)=>{const n=t().dashboard.getModel(),{getPanel:r,getSourcePanel:a,shouldDiscardChanges:i}=t().panelEditor,o=r();if(n&&n.exitPanelEditor(),!i){const t=o.getSaveModel(),r=a(),i=r.type!==o.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 a=e.getSaveModel();for(const r of t.panels){var i,o;if(zr(e,r))continue;r.restoreModel(Object.assign({},a,(0,y.pick)(r,"gridPos","id")));const t=(null===(i=r.plugin)||void 0===i?void 0:i.meta.id)!==(null===(o=e.plugin)||void 0===o?void 0:o.meta.id);r.plugin=e.plugin,r.configRev++,t&&(r.generateNewKey(),n((0,Or.bc)({key:r.key,plugin:r.plugin}))),setTimeout((()=>{r.getQueryRunner().useLastResultFrom(e.getQueryRunner())}),20)}e.repeat&&setTimeout((()=>t.processRepeats()),20)}}(o,n)),r.restoreModel(t),r.configRev++,i&&(r.plugin=o.plugin,r.generateNewKey(),await e((0,Or.bc)({key:r.key,plugin:o.plugin}))),setTimeout((()=>{r.getQueryRunner().useLastResultFrom(o.getQueryRunner()),r.render()}),20)}e((0,Or.qj)({key:o.key})),e((0,Rt.my)())}}var Pr=n("./public/app/features/profile/state/reducers.ts");const Rr=(0,n("../../opt/drone/yarncache/memoize-one-npm-6.0.0-8b2a2cd020-f185ea69f7.zip/node_modules/memoize-one/dist/memoize-one.esm.js").Z)(((e,t)=>{var n;const r=[];if(!t)return r;let a=Se.Ip.Visualize;if(t.meta.skipDataQuery)return[];t.meta.skipDataQuery||(a=Se.Ip.Query,r.push({id:Se.Ip.Query,text:"Query",icon:"database",active:!1}),r.push({id:Se.Ip.Transform,text:"Transform",icon:"process",active:!1})),(((0,x.iE)().alertingEnabled||(0,x.iE)().unifiedAlertingEnabled)&&"graph"===t.meta.id||"timeseries"===t.meta.id)&&r.push({id:Se.Ip.Alert,text:"Alert",icon:"bell",active:!1});return(null!==(n=r.find((t=>t.id===(e||a))))&&void 0!==n?n:r[0]).active=!0,r}));var Tr,Br,Wr,_r=n("./public/app/features/library-panels/components/UnlinkModal/UnlinkModal.tsx"),Dr=n("./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useDebounce.js"),Ir=n("./public/app/features/library-panels/utils/usePanelSave.ts"),Er=n("./public/app/features/library-panels/state/api.ts"),Ar=n("./public/app/features/library-panels/styles.ts");const Fr=e=>{let{panel:t,folderId:n,isUnsavedPrompt:r,onDismiss:a,onConfirm:o,onDiscard:s}=e;const[l,d]=(0,i.useState)(""),u=(0,lt.Z)((async()=>{const e=await(0,Er.E8)(t.libraryPanel.uid);return e.length>0?e.map((e=>e.title)):[]}),[t.libraryPanel.uid]),[p,h]=(0,i.useState)([]);(0,Dr.Z)((()=>u.value?h(u.value.filter((e=>e.toLowerCase().includes(l.toLowerCase())))):h([])),300,[u.value,l]);const{saveLibraryPanel:f}=(0,Ir.E)(),g=(0,c.useStyles)(Ar.J),m=(0,i.useCallback)((()=>{s()}),[s]),b=r?"Unsaved library panel changes":"Save library panel";return(0,C.jsx)(c.Modal,{title:b,icon:"save",onDismiss:a,isOpen:!0,children:(0,C.jsxs)("div",{children:[(0,C.jsxs)("p",{className:g.textInfo,children:["This update will affect ",(0,C.jsxs)("strong",{children:[t.libraryPanel.meta.connectedDashboards," ",1===t.libraryPanel.meta.connectedDashboards?"dashboard":"dashboards","."]}),"The following dashboards using the panel will be affected:"]}),(0,C.jsx)(c.Input,{className:g.dashboardSearch,prefix:Tr||(Tr=(0,C.jsx)(c.Icon,{name:"search"})),placeholder:"Search affected dashboards",value:l,onChange:e=>d(e.currentTarget.value)}),u.loading?Br||(Br=(0,C.jsx)("p",{children:"Loading connected dashboards..."})):(0,C.jsxs)("table",{className:g.myTable,children:[Wr||(Wr=(0,C.jsx)("thead",{children:(0,C.jsx)("tr",{children:(0,C.jsx)("th",{children:"Dashboard name"})})})),(0,C.jsx)("tbody",{children:p.map(((e,t)=>(0,C.jsx)("tr",{children:(0,C.jsx)("td",{children:e})},`dashrow-${t}`)))})]}),(0,C.jsxs)(c.Modal.ButtonRow,{children:[(0,C.jsx)(c.Button,{variant:"secondary",onClick:a,fill:"outline",children:"Cancel"}),r&&(0,C.jsx)(c.Button,{variant:"destructive",onClick:m,children:"Discard"}),(0,C.jsx)(c.Button,{onClick:()=>{f(t,n).then((()=>{o()}))},children:"Update all"})]})]})})};var Lr,Nr=n("./public/app/core/actions/index.ts"),$r=n("./public/app/features/dashboard/utils/panel.ts"),Hr=n("./public/app/features/dashboard/services/TimeSrv.ts"),Gr=n("./public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx");function Vr(e){let{width:t,height:n,panel:r,dashboard:a}=e;const{data:o}=Ln(r,{withTransforms:!0,withFieldConfig:!1},!1),[s,d]=(0,i.useState)({frameIndex:0,showHeader:!0,showTypeIcons:!0});return(0,i.useEffect)((()=>{const e=(0,Hr.$t)(),n=(0,$r.W1)(r,e.timeRange()),i=r.events.subscribe(l.RefreshEvent,(()=>{r.runAllPanelQueries(a.id,a.getTimezone(),n,t)}));return()=>{i.unsubscribe()}}),[r,a,t]),o?(0,C.jsx)(c.PanelChrome,{width:t,height:n,padding:"none",children:(e,t)=>{var n;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Gr.Z,{panel:r,error:null==o||null===(n=o.error)||void 0===n?void 0:n.message}),(0,C.jsx)(Rn.$,{title:"Raw data",pluginId:"table",width:e,height:t,data:o,options:s,onOptionsChange:d})]})}}):null}function Ur(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qr={initPanelEditor:function(e,t){return async n=>{const r=t.initEditPanel(e);await n((0,en.JI)(r)),n((0,Rt.Hl)({panel:r,sourcePanel:e}))}},discardPanelChanges:jr,updatePanelEditorUIState:function(e){return(t,n)=>{const r=Object.assign({},n().panelEditor.ui,e);t((0,Rt.K9)(r));try{M.Z.setObject(Rt.jy,r)}catch(e){console.error(e)}}},updateTimeZoneForSession:Pr.YT,toggleTableView:Rt.OT,notifyApp:Nr.$l},Zr=(0,s.connect)((e=>{const t=e.panelEditor.getPanel(),n=(0,et.i)(e,t);return{panel:t,plugin:null==n?void 0:n.plugin,instanceState:null==n?void 0:n.instanceState,initDone:e.panelEditor.initDone,uiState:e.panelEditor.ui,tableViewEnabled:e.panelEditor.tableViewEnabled,variables:(0,_.ng)(e)}}),qr);class Qr extends i.PureComponent{constructor(){super(...arguments),Ur(this,"eventSubs",void 0),Ur(this,"state",{showSaveLibraryPanelModal:!1}),Ur(this,"triggerForceUpdate",(()=>{this.forceUpdate()})),Ur(this,"onBack",(()=>{l.locationService.partial({editPanel:null,tab:null,showCategory:null})})),Ur(this,"onDiscard",(()=>{this.props.discardPanelChanges(),this.onBack()})),Ur(this,"onOpenDashboardSettings",(()=>{l.locationService.partial({editview:"settings"})})),Ur(this,"onSaveDashboard",(()=>{ne.h$.publish(new G.Dn({component:kr.D,props:{dashboard:this.props.dashboard}}))})),Ur(this,"onSaveLibraryPanel",(async()=>{if(!(0,ln.V)(this.props.panel))return;const e=await(0,Er.Ef)(this.props.panel.libraryPanel.uid);if(0===e.length||1===e.length&&e.includes(this.props.dashboard.id))try{await(0,O.i6)(this.props.panel,this.props.dashboard.meta.folderId),this.props.notifyApp((0,O.bF)("Library panel saved"))}catch(e){this.props.notifyApp((0,O.rm)(`Error saving library panel: "${e.statusText}"`))}else this.setState({showSaveLibraryPanelModal:!0})})),Ur(this,"onChangeTab",(e=>{l.locationService.partial({tab:e.id})})),Ur(this,"onFieldConfigChange",(e=>{this.props.panel.updateFieldConfig(Object.assign({},e))})),Ur(this,"onPanelOptionsChanged",(e=>{this.props.panel.updateOptions(e)})),Ur(this,"onPanelConfigChanged",((e,t)=>{this.props.panel.setProperty(e,t),this.props.panel.render(),this.forceUpdate()})),Ur(this,"onDisplayModeChange",(e=>{const{updatePanelEditorUIState:t}=this.props;this.props.tableViewEnabled&&this.props.toggleTableView(),t({mode:e})})),Ur(this,"onToggleTableView",(()=>{this.props.toggleTableView()})),Ur(this,"onTogglePanelOptions",(()=>{const{uiState:e,updatePanelEditorUIState:t}=this.props;t({isPanelOptionsVisible:!e.isPanelOptionsVisible})})),Ur(this,"onGoBackToDashboard",(()=>{l.locationService.partial({editPanel:null,tab:null,showCategory:null})})),Ur(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 Z.w0,this.eventSubs.add(e.events.subscribe(G.Wj,this.triggerForceUpdate)))}componentWillUnmount(){var e;null===(e=this.eventSubs)||void 0===e||e.unsubscribe()}renderPanel(e,t){const{dashboard:n,panel:r,uiState:a,tableViewEnabled:i}=this.props;return(0,C.jsxs)("div",{className:e.mainPaneWrapper,children:[this.renderPanelToolbar(e),(0,C.jsx)("div",{className:e.panelWrapper,children:(0,C.jsx)(b.Z,{children:o=>{let{width:s,height:l}=o;if(s<3||l<3)return null;if(t&&(l-=2*x.ZP.theme2.spacing.gridSize),i)return(0,C.jsx)(Vr,{width:s,height:l,panel:r,dashboard:n});const d=(0,re.jF)(a.mode,s,l,r);return(0,C.jsx)("div",{className:e.centeringContainer,style:{width:s,height:l},children:(0,C.jsx)("div",{style:d,"data-panelid":r.id,children:(0,C.jsx)(q.l,{stateKey:r.key,dashboard:n,panel:r,isEditing:!0,isViewing:!1,lazy:!1,width:d.width,height:d.height,skipStateCleanUp:!0},r.key)})})}})})]},"panel")}renderPanelAndEditor(e){const{panel:t,dashboard:n,plugin:r,tab:a}=this.props,i=Rr(a,r),o=0===i.length,s=this.renderPanel(e,o);return 0===i.length?s:[s,(0,C.jsx)("div",{className:e.tabsWrapper,"aria-label":d.wl.components.PanelEditor.DataPane.content,children:(0,C.jsx)(jt,{panel:t,dashboard:n,tabs:i,onChangeTab:this.onChangeTab})},"panel-editor-tabs")]}renderTemplateVariables(e){const{variables:t}=this.props;return t.length?(0,C.jsx)("div",{className:e.variablesWrapper,children:(0,C.jsx)(Zn,{variables:t})}):null}renderPanelToolbar(e){const{dashboard:t,uiState:n,variables:r,updateTimeZoneForSession:a,panel:i,tableViewEnabled:o}=this.props;return(0,C.jsx)("div",{className:e.panelToolbar,children:(0,C.jsxs)(c.HorizontalGroup,{justify:r.length>0?"space-between":"flex-end",align:"flex-start",children:[this.renderTemplateVariables(e),(0,C.jsxs)(c.HorizontalGroup,{children:[(0,C.jsx)(c.InlineSwitch,{label:"Table view",showLabel:!0,id:"table-view",value:o,onClick:this.onToggleTableView,"aria-label":d.wl.components.PanelEditor.toggleTableView}),(0,C.jsx)(c.RadioButtonGroup,{value:n.mode,options:Se.d7,onChange:this.onDisplayModeChange}),(0,C.jsx)(Pt.C,{dashboard:t,onChangeTimeZone:a}),!n.isPanelOptionsVisible&&(0,C.jsx)(Wt,{panel:i})]})]})})}renderEditorActions(){let e=[(0,C.jsx)(c.ToolbarButton,{icon:"cog",onClick:this.onOpenDashboardSettings,title:"Open dashboard settings"},"settings"),(0,C.jsx)(c.ToolbarButton,{onClick:this.onDiscard,title:"Undo all changes",children:"Discard"},"discard"),this.props.panel.libraryPanel?(0,C.jsx)(c.ToolbarButton,{onClick:this.onSaveLibraryPanel,variant:"primary",title:"Apply changes and save library panel",children:"Save library panel"},"save-panel"):(0,C.jsx)(c.ToolbarButton,{onClick:this.onSaveDashboard,title:"Apply changes and save dashboard",children:"Save"},"save"),(0,C.jsx)(c.ToolbarButton,{onClick:this.onBack,variant:"primary",title:"Apply changes and go back to dashboard","aria-label":d.wl.components.PanelEditor.applyButton,children:"Apply"},"apply")];return this.props.panel.libraryPanel&&(e.splice(1,0,(0,C.jsx)(c.ModalsController,{children:e=>{let{showModal:t,hideModal:n}=e;return(0,C.jsx)(c.ToolbarButton,{onClick:()=>{t(_r.i,{onConfirm:()=>{delete this.props.panel.libraryPanel,this.props.panel.render(),this.forceUpdate()},onDismiss:n,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,instanceState:r}=this.props;return e?(0,C.jsx)(Nn,{plugin:e,dashboard:t,panel:n,instanceState:r,onFieldConfigsChange:this.onFieldConfigChange,onPanelOptionsChanged:this.onPanelOptionsChanged,onPanelConfigChange:this.onPanelConfigChanged}):Lr||(Lr=(0,C.jsx)("div",{}))}render(){const{dashboard:e,initDone:t,updatePanelEditorUIState:n,uiState:r}=this.props,a=Jr(x.ZP.theme,this.props);return t?(0,C.jsxs)("div",{className:a.wrapper,"aria-label":d.wl.components.PanelEditor.General.content,children:[(0,C.jsx)(c.PageToolbar,{title:`${e.title} / Edit Panel`,onGoBack:this.onGoBackToDashboard,children:this.renderEditorActions()}),(0,C.jsx)("div",{className:a.verticalSplitPanesWrapper,children:(0,C.jsx)(Mr,{leftPaneComponents:this.renderPanelAndEditor(a),rightPaneComponents:this.renderOptionsPane(),uiState:r,updateUiState:n,rightPaneVisible:r.isPanelOptionsVisible})}),this.state.showSaveLibraryPanelModal&&(0,C.jsx)(Fr,{panel:this.props.panel,folderId:this.props.dashboard.meta.folderId,onConfirm:this.onConfirmAndDismissLibarayPanelModel,onDiscard:this.onDiscard,onDismiss:this.onConfirmAndDismissLibarayPanelModel})]}):null}}const Yr=Zr(Qr),Jr=(0,c.stylesFactory)(((e,t)=>{const{uiState:n}=t,r=e.spacing.md;return{wrapper:o.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:o.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      position: relative;
    `,mainPaneWrapper:o.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      padding-right: ${n.isPanelOptionsVisible?0:r};
    `,variablesWrapper:o.css`
      label: variablesWrapper;
      display: flex;
      flex-grow: 1;
      flex-wrap: wrap;
    `,panelWrapper:o.css`
      flex: 1 1 0;
      min-height: 0;
      width: 100%;
      padding-left: ${r};
    `,tabsWrapper:o.css`
      height: 100%;
      width: 100%;
    `,panelToolbar:o.css`
      display: flex;
      padding: 0 0 ${r} ${r};
      justify-content: space-between;
      flex-wrap: wrap;
    `,toolbarLeft:o.css`
      padding-left: ${e.spacing.sm};
    `,centeringContainer:o.css`
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      flex-direction: column;
    `}}));var Xr,Kr=n("./public/app/features/dashboard/state/initDashboard.ts"),ea=n("./public/app/features/inspector/styles.ts");const ta=e=>{var t;let{data:n,metadataDatasource:r}=e;return r&&null!==(t=r.components)&&void 0!==t&&t.MetadataInspector?(0,C.jsx)(r.components.MetadataInspector,{datasource:r,data:n.series}):Xr||(Xr=(0,C.jsx)("div",{children:"No Metadata Inspector"}))},na=e=>{let{tab:t,tabs:n,onSelectTab:r,data:a}=e;const i=(0,c.useTheme)(),o=ra(i);return(0,C.jsxs)(C.Fragment,{children:[a&&(0,C.jsx)("div",{className:"muted",children:aa(a)}),(0,C.jsx)(c.TabsBar,{className:o.tabsBar,children:n.map(((e,n)=>(0,C.jsx)(c.Tab,{label:e.label,active:e.value===t,onChangeTab:()=>r(e)},`${e.value}-${n}`)))})]})},ra=(0,c.stylesFactory)((e=>({tabsBar:o.css`
      padding-left: ${e.spacing.md};
      margin: ${e.spacing.lg} -${e.spacing.sm} -${e.spacing.lg} -${e.spacing.lg};
    `})));function aa(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,ae.formattedValueToString)((0,ae.getValueFormat)("ms")(r))}`}var ia,oa,sa=n("./public/app/features/inspector/InspectJSONTab.tsx"),la=n("./public/app/features/inspector/QueryInspector.tsx"),da=n("./public/app/features/inspector/InspectStatsTab.tsx"),ca=n("./public/app/features/inspector/InspectErrorTab.tsx"),ua=n("./public/app/features/inspector/InspectDataTab.tsx"),pa=n("./public/app/features/inspector/types.ts");const ha=e=>{let{panel:t,data:n}=e;const r=window.grafanaPanelInspectActionSupplier;if(!r)return ia||(ia=(0,C.jsx)("div",{children:"Missing actions"}));const a=r.getActions(t);return null!=a&&a.length?(0,C.jsx)("div",{children:a.map(((e,r)=>(0,C.jsxs)("div",{children:[(0,C.jsx)("h2",{children:e.title}),(0,C.jsx)("span",{children:e.description}),(0,C.jsx)(e.component,{panel:t,data:n})]},r)))}):oa||(oa=(0,C.jsx)("div",{children:"No actions avaliable"}))},fa=e=>{let{panel:t,plugin:n,dashboard:r,tabs:a,data:o,isDataLoading:s,dataOptions:d,metadataDatasource:u,defaultTab:p,onDataOptionsChange:h,onClose:f}=e;const[g,m]=(0,i.useState)(null!=p?p:pa.q.Data);if(!n)return null;const b=(0,ea.S)(),y=null==o?void 0:o.error;let v=g;a.find((e=>e.value===g))||(v=pa.q.JSON);const S=(0,l.getTemplateSrv)().replace(t.title,t.scopedVars,"text");return(0,C.jsxs)(c.Drawer,{title:`Inspect: ${S||"Panel"}`,subtitle:(0,C.jsx)(na,{tabs:a,tab:v,data:o,onSelectTab:e=>m(e.value||pa.q.Data)}),width:"50%",onClose:f,expandable:!0,children:[v===pa.q.Data&&(0,C.jsx)(ua.E,{panel:t,data:o&&o.series,isLoading:s,options:d,onOptionsChange:h,timeZone:r.timezone}),(0,C.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,C.jsxs)(c.TabContent,{className:b.tabContent,children:[o&&v===pa.q.Meta&&(0,C.jsx)(ta,{data:o,metadataDatasource:u}),v===pa.q.JSON&&(0,C.jsx)(sa.W,{panel:t,dashboard:r,data:o,onClose:f}),v===pa.q.Error&&(0,C.jsx)(ca.l,{error:y}),o&&v===pa.q.Stats&&(0,C.jsx)(da.f,{data:o,timeZone:r.getTimezone()}),o&&v===pa.q.Query&&(0,C.jsx)(la.D,{panel:t,data:o.series,onRefreshQuery:()=>t.refresh()}),v===pa.q.Actions&&(0,C.jsx)(ha,{panel:t,data:o})]})})]})};var ga=n("./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/lib/useAsync.js");const ma=(0,s.connect)(((e,t)=>{const n=(0,et.i)(e,t.panel);return n?{plugin:n.plugin}:{plugin:null}}))((e=>{let{panel:t,dashboard:n,plugin:r}=e;const[a,o]=(0,i.useState)({withTransforms:!1,withFieldConfig:!0}),s=(0,st.TH)(),{data:d,isLoading:c,error:u}=Ln(t,a,!0),p=(e=>(0,ga.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,l.getDataSourceSrv)().get(n[0].datasource);if(e&&null!==(r=e.components)&&void 0!==r&&r.MetadataInspector)return e}}),[e]).value)(d),h=((e,t,n,r,a)=>(0,i.useMemo)((()=>{const i=[];(0,re.sY)(n)&&(i.push({label:"Data",value:pa.q.Data}),i.push({label:"Stats",value:pa.q.Stats})),a&&i.push({label:"Meta Data",value:pa.q.Meta}),i.push({label:"JSON",value:pa.q.JSON}),r&&r.message&&i.push({label:"Error",value:pa.q.Error});const o=window.grafanaPanelInspectActionSupplier;return o&&o.getActions(e)&&i.push({label:"Actions",value:pa.q.Actions}),t.meta.canEdit&&(0,re.sY)(n)&&i.push({label:"Query",value:pa.q.Query}),i}),[e,n,a,t,r]))(t,n,r,u,p),f=new URLSearchParams(s.search).get("inspectTab");return r?(0,C.jsx)(fa,{dashboard:n,panel:t,plugin:r,defaultTab:f,tabs:h,data:d,isDataLoading:c,dataOptions:a,onDataOptionsChange:o,metadataDatasource:p,onClose:()=>{l.locationService.partial({inspect:null,inspectTab:null})}}):null}));var ba=n("./packages/grafana-data/src/text/sanitize.ts"),ya=n("./public/app/core/services/backend_srv.ts");const va=["link","children"];const Sa=e=>{const{link:t,linkInfo:n}=e,r=(0,i.useRef)(null),[a,s]=(0,i.useState)("invisible"),[l,u]=(0,i.useState)(0),p=Ma(e,l),h=(0,c.useStyles2)((e=>o.css`
        color: ${e.colors.text.primary};
      `));return(0,i.useLayoutEffect)((()=>{s(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))}),[p]),t.asDropdown?(0,C.jsx)(xa,{link:t,"data-testid":d.wl.components.DashboardLinks.dropDown,children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(c.ToolbarButton,{onClick:()=>u(Date.now()),className:(0,o.cx)("gf-form-label gf-form-label--dashlink",h),"data-placement":"bottom","data-toggle":"dropdown","aria-expanded":!!l,"aria-controls":"dropdown-list","aria-haspopup":"menu",children:[(0,C.jsx)(c.Icon,{"aria-hidden":!0,name:"bars",style:{marginRight:"4px"}}),(0,C.jsx)("span",{children:n.title})]}),(0,C.jsx)("ul",{id:"dropdown-list",className:`dropdown-menu ${a}`,role:"menu",ref:r,children:p.length>0&&p.map(((e,n)=>(0,C.jsx)("li",{role:"none",children:(0,C.jsx)("a",{role:"menuitem",href:e.url,target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":d.wl.components.DashboardLinks.link,"aria-label":`${e.title} dashboard`,children:e.title})},`dashlinks-dropdown-item-${e.id}-${n}`)))})]})},"dashlinks-dropdown"):(0,C.jsx)(C.Fragment,{children:p.length>0&&p.map(((e,n)=>(0,C.jsx)(xa,{link:t,"data-testid":d.wl.components.DashboardLinks.container,children:(0,C.jsxs)("a",{className:"gf-form-label gf-form-label--dashlink",href:e.url,target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":d.wl.components.DashboardLinks.link,"aria-label":`${e.title} dashboard`,children:[(0,C.jsx)(c.Icon,{"aria-hidden":!0,name:"apps",style:{marginRight:"4px"}}),(0,C.jsx)("span",{children:e.title})]})},`dashlinks-list-item-${e.id}-${n}`)))})},xa=e=>{const{link:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,va);return(0,C.jsxs)("div",Object.assign({},r,{className:"gf-form",children:[t.tooltip&&(0,C.jsx)(c.Tooltip,{content:t.tooltip,children:n}),!t.tooltip&&(0,C.jsx)(C.Fragment,{children:n})]}))},Ma=(e,t)=>{let{link:n,dashboardId:r}=e;const{tags:a}=n,i=(0,lt.Z)((()=>async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{getBackendSrv:ya.i};const n=100;return await t.getBackendSrv().search({tag:e,limit:n})}(a)),[a,t]);return i.value?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{getLinkSrv:Dt.Bq,sanitize:ba.Nw,sanitizeUrl:ba.Nm};return n.filter((t=>t.id!==e)).map((e=>{const n=e.id,a=r.sanitize(e.title),i=r.getLinkSrv().getLinkUrl(Object.assign({},t,{url:e.url}));return{id:n,title:a,url:r.sanitizeUrl(i)}}))}(r,n,i.value):[]};var wa=n("./public/app/features/dashboard/components/LinksSettings/LinkSettingsEdit.tsx"),ka=n("./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useEffectOnce.js");const Oa=e=>{let{dashboard:t,links:n}=e;const r=(0,c.useForceUpdate)();return(0,ka.Z)((()=>{const e=t.events.subscribe(l.TimeRangeUpdatedEvent,r);return()=>e.unsubscribe()})),n.length?(0,C.jsx)(C.Fragment,{children:n.map(((e,n)=>{const r=(0,Dt.Bq)().getAnchorInfo(e),a=`${e.title}-$${n}`;if("dashboards"===e.type)return(0,C.jsx)(Sa,{link:e,linkInfo:r,dashboardId:t.id},a);const i=(0,C.jsxs)("a",{className:"gf-form-label gf-form-label--dashlink",href:(0,ba.Nm)(r.href),target:e.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":d.wl.components.DashboardLinks.link,children:[(0,C.jsx)(c.Icon,{"aria-hidden":!0,name:wa.xy[e.icon],style:{marginRight:"4px"}}),(0,C.jsx)("span",{children:r.title})]});return(0,C.jsx)("div",{className:"gf-form","data-testid":d.wl.components.DashboardLinks.container,children:e.tooltip?(0,C.jsx)(c.Tooltip,{content:r.tooltip,children:i}):i},a)}))}):null};var ja=n("./public/app/features/query/state/DashboardQueryRunner/DashboardQueryRunner.ts"),za=n("./packages/grafana-ui/src/components/PanelChrome/LoadingIndicator.tsx");const Ca=e=>{let{annotation:t,events:n,onEnabledChanged:r}=e;const[a,o]=(0,i.useState)(!1),s=(0,c.useStyles2)(Pa);return(0,i.useEffect)((()=>{const e=n.getStream(G.z).subscribe({next:e=>{e.payload===t&&o(!0)}}),r=n.getStream(G.RB).subscribe({next:e=>{e.payload===t&&o(!1)}});return()=>{e.unsubscribe(),r.unsubscribe()}})),(0,C.jsx)("div",{className:s.annotation,children:(0,C.jsxs)(c.InlineFieldRow,{children:[(0,C.jsx)(c.InlineField,{label:t.name,disabled:a,children:(0,C.jsx)(c.InlineSwitch,{value:t.enable,onChange:()=>r(t),disabled:a})}),(0,C.jsx)("div",{className:s.indicator,children:(0,C.jsx)(za.T,{loading:a,onCancel:()=>(0,ja.kt)().cancel(t)})})]})},t.name)};function Pa(e){return{annotation:o.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:o.css`
      align-self: center;
      padding: 0 ${e.spacing(.5)};
    `}}const Ra=e=>{let{annotations:t,onAnnotationChanged:n,events:r}=e;const[a,o]=(0,i.useState)([]);return(0,i.useEffect)((()=>{o(t.filter((e=>!0!==e.hide)))}),[t]),0===a.length?null:(0,C.jsx)(C.Fragment,{children:a.map((e=>(0,C.jsx)(Ca,{events:r,annotation:e,onEnabledChanged:n},e.name)))})};var Ta,Ba;class Wa extends i.PureComponent{constructor(){var e,t,n;super(...arguments),n=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()},(t="onAnnotationStateChanged")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}render(){const{dashboard:e,variables:t,links:n,annotations:r}=this.props;return e.isSubMenuVisible()?(0,C.jsxs)("div",{className:"submenu-controls",children:[(0,C.jsx)("form",{"aria-label":"Template variables",className:_a,children:(0,C.jsx)(Zn,{variables:t})}),(0,C.jsx)(Ra,{annotations:r,onAnnotationChanged:this.onAnnotationStateChanged,events:e.events}),Ta||(Ta=(0,C.jsx)("div",{className:"gf-form gf-form--grow"})),e&&(0,C.jsx)(Oa,{dashboard:e,links:n}),Ba||(Ba=(0,C.jsx)("div",{className:"clearfix"}))]}):null}}const _a=o.css`
  display: flex;
  flex-wrap: wrap;
  display: contents;
`,Da=(0,s.connect)((e=>({variables:(0,_.IV)(e.templating.variables)})))(Wa);Da.displayName="SubMenu";var Ia,Ea=n("./public/app/features/dashboard/state/actions.ts"),Aa=n("./public/app/features/variables/state/actions.ts"),Fa=n("./public/app/features/variables/utils.ts"),La=n("./public/app/features/live/dashboard/dashboardWatcher.ts"),Na=n("./public/app/core/navigation/kiosk.ts");const $a=e=>{let{initPhase:t}=e;const n=(0,c.useStyles)(Ha);return(0,C.jsx)("div",{className:n.dashboardLoading,children:(0,C.jsx)("div",{className:n.dashboardLoadingText,children:(0,C.jsxs)(c.VerticalGroup,{spacing:"md",children:[(0,C.jsxs)(c.HorizontalGroup,{align:"center",justify:"center",spacing:"xs",children:[Ia||(Ia=(0,C.jsx)(c.Spinner,{inline:!0}))," ",t]})," ",(0,C.jsx)(c.HorizontalGroup,{align:"center",justify:"center",children:(0,C.jsx)(c.Button,{variant:"secondary",size:"md",icon:"repeat",onClick:()=>{l.locationService.push("/")},children:"Cancel loading dashboard"})})]})})})},Ha=e=>({dashboardLoading:o.css`
      height: 60vh;
      display: flex;
      align-items: center;
      justify-content: center;
    `,dashboardLoadingText:o.css`
      font-size: ${e.typography.size.lg};
    `});var Ga=n("./public/app/core/utils/errors.ts");const Va=e=>{let{initError:t}=e;const n=(0,c.useStyles)(Ua);return t?(0,C.jsx)("div",{className:n.dashboardLoading,children:(0,C.jsx)(c.Alert,{severity:ke.F1.Error,title:t.message,children:(0,Ga.i)(t.error)})}):null},Ua=e=>({dashboardLoading:o.css`
      height: 60vh;
      display: flex;
      align-items: center;
      justify-content: center;
    `});var qa,Za=n("./public/app/core/services/context_srv.ts"),Qa=n("./public/app/features/dashboard/state/DashboardModel.ts"),Ya=n("../../opt/drone/yarncache/angular-npm-1.8.2-307000482b-35ea81a23b.zip/node_modules/angular/index.js"),Ja=n.n(Ya),Xa=n("./public/app/features/dashboard/components/SaveDashboard/SaveDashboardButton.tsx");const Ka=e=>{let{dashboard:t,onSaveSuccess:n,onDiscard:r,onDismiss:a}=e;return(0,C.jsxs)(c.Modal,{isOpen:!0,title:"Unsaved changes",onDismiss:a,icon:"exclamation-triangle",className:o.css`
        width: 500px;
      `,children:[qa||(qa=(0,C.jsx)("h5",{children:"Do you want to save your changes?"})),(0,C.jsxs)(c.Modal.ButtonRow,{children:[(0,C.jsx)(c.Button,{variant:"secondary",onClick:a,fill:"outline",children:"Cancel"}),(0,C.jsx)(c.Button,{variant:"destructive",onClick:r,children:"Discard"}),(0,C.jsx)(Xa.i,{dashboard:t,onSaveSuccess:n})]})]})};var ei;!function(e){e[e.UnsavedChangesModal=0]="UnsavedChangesModal",e[e.SaveLibraryPanelModal=1]="SaveLibraryPanelModal"}(ei||(ei={}));const ti=i.memo((e=>{let{dashboard:t}=e;const[n,r]=(0,i.useState)({original:null,modal:null}),a=(0,s.useDispatch)(),{original:o,originalPath:d,blockedLocation:c,modal:u}=n;(0,i.useEffect)((()=>{const e=setTimeout((()=>{const e=l.locationService.getLocation().pathname,n=t.getSaveModelClone();r({originalPath:e,original:n,modal:null})}),1e3);return()=>{clearTimeout(e)}}),[t]),(0,i.useEffect)((()=>{const e=e=>{ri(t,o)||ii(t,o)&&(e.preventDefault(),e.returnValue="")};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)}),[t,o]),(0,i.useEffect)((()=>{const e=ne.h$.subscribe(G.Jd,(()=>{const e=t.getSaveModelClone(),n=l.locationService.getLocation().pathname;r({originalPath:n,original:e,modal:null}),c&&ni(c)}));return()=>e.unsubscribe()}),[t,c]);return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(st.NL,{when:!0,message:e=>{const i=t.panelInEdit,s=new URLSearchParams(e.search);return i&&i.libraryPanel&&i.hasChanged&&!s.has("editPanel")?(r(Object.assign({},n,{modal:ei.SaveLibraryPanelModal,blockedLocation:e})),!1):d!==e.pathname&&o?!!ri(t,o)||(!ii(t,o)||(r(Object.assign({},n,{modal:ei.UnsavedChangesModal,blockedLocation:e})),!1)):(i&&!s.has("editPanel")&&a(Cr()),!0)}}),u===ei.UnsavedChangesModal&&(0,C.jsx)(Ka,{dashboard:t,onSaveSuccess:()=>{},onDiscard:()=>{r(Object.assign({},n,{original:null,modal:null})),ni(c)},onDismiss:()=>{r(Object.assign({},n,{modal:null,blockedLocation:null}))}}),u===ei.SaveLibraryPanelModal&&(0,C.jsx)(Fr,{isUnsavedPrompt:!0,panel:t.panelInEdit,folderId:t.meta.folderId,onConfirm:()=>{r(Object.assign({},n,{modal:null})),ni(c)},onDiscard:()=>{a(jr()),r(Object.assign({},n,{modal:null})),ni(c)},onDismiss:()=>{r(Object.assign({},n,{modal:null,blockedLocation:null}))}})]})}));function ni(e){e&&setTimeout((()=>l.locationService.push(e)),10)}function ri(e,t){if(!t)return!0;if(!Za.Vt.isSignedIn)return!0;if(!e||!e.meta)return!0;const{canSave:n,fromScript:r,fromFile:a}=e.meta;return!Za.Vt.isEditor&&!n||(!n||r||a)}function ai(e){const t=new Qa.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,y.filter)(n.panels,(e=>!e.repeatPanelId&&(e.scopedVars=void 0,e.legend&&(delete e.legend.sort,delete e.legend.sortDesc),!0))),(0,y.each)(n.getVariables(),(e=>{e.current=null,e.options=null,e.filters=null})),n}function ii(e,t){const n=ai(e.getSaveModelClone()),r=ai(t),a=(0,y.find)(n.nav,{type:"timepicker"}),i=(0,y.find)(r.nav,{type:"timepicker"});a&&i&&(a.now=i.now);return Ja().toJson(n)!==Ja().toJson(r)}ti.displayName="DashboardPrompt";var oi,si=n("./public/app/features/dashboard/dashgrid/liveTimer.ts");function li(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const di=e=>({initPhase:e.dashboard.initPhase,isInitSlow:e.dashboard.isInitSlow,initError:e.dashboard.initError,dashboard:e.dashboard.getModel()}),ci={initDashboard:Kr.m,cleanUpDashboardAndVariables:Ea.lw,notifyApp:Nr.$l,cancelVariables:Aa.wX,templateVarsChangedInUrl:Aa.xs},ui=(0,s.connect)(di,ci);class pi extends i.PureComponent{constructor(){super(...arguments),li(this,"forceRouteReloadCounter",0),li(this,"state",this.getCleanState()),li(this,"updateLiveTimer",(()=>{var e;let t;null!==(e=this.props.dashboard)&&void 0!==e&&e.liveNow&&(t=(0,Hr.$t)().timeRange()),si.A.setLiveTimeRange(t)})),li(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,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:a,templateVarsChangedInUrl:i}=this.props,o=null===(n=this.props.history.location.state)||void 0===n?void 0:n.routeReloadCounter;if(r){if(e.dashboard!==r&&(document.title=r.title+" - "+p.c.AppTitle),e.match.params.uid!==a.params.uid||void 0!==o&&this.forceRouteReloadCounter!==o)return this.initDashboard(),void(this.forceRouteReloadCounter=o);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,Hr.$t)().updateTimeRangeFromUrl(),this.updateLiveTimer()),null!=t&&t.refresh||null==n||!n.refresh||(0,Hr.$t)().setAutoRefresh(n.refresh);const r=(0,Fa.xT)(this.props.queryParams,e.queryParams);r&&i(r)}var s,d;if(this.state.editPanel&&!t.editPanel)La.H.setEditingState(!0),null===(s=this.props.dashboard)||void 0===s||s.events.publish(new G.xF(this.state.editPanel.id));if(!this.state.editPanel&&t.editPanel)La.H.setEditingState(!1),null===(d=this.props.dashboard)||void 0===d||d.events.publish(new G.Yr(t.editPanel.id));this.state.editPanelAccessDenied&&(this.props.notifyApp((0,u.t_)("Permission to edit panel denied")),l.locationService.partial({editPanel:null})),this.state.panelNotFound&&(this.props.notifyApp((0,u.t_)("Panel not found")),l.locationService.partial({editPanel:null,viewPanel:null}))}}static getDerivedStateFromProps(e,t){const{dashboard:n,queryParams:r}=e,a=r.editPanel,i=r.viewPanel;if(!n)return t;if(!t.editPanel&&a){const e=n.getPanelByUrlId(a);return e?n.canEditPanel(e)?Object.assign({},t,{editPanel:e}):Object.assign({},t,{editPanelAccessDenied:!0}):Object.assign({},t,{panelNotFound:!0})}if(t.editPanel&&!a)return Object.assign({},t,{editPanel:null});if(!t.viewPanel&&i){const e=n.getPanelByUrlId(i);return e?(n.initViewPanel(e),Object.assign({},t,{viewPanel:e,updateScrollTop:0})):Object.assign({},t,{panelNotFound:a})}return t.viewPanel&&!i?(n.exitViewPanel(t.viewPanel),Object.assign({},t,{viewPanel:null,updateScrollTop:t.rememberScrollTop})):t.panelNotFound||t.editPanelAccessDenied&&!a?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:a}=this.props,{editPanel:i,viewPanel:o,updateScrollTop:s}=this.state,l=(0,Na.U6)(r.kiosk),u=hi(a,l);if(!e)return t?(0,C.jsx)($a,{initPhase:this.props.initPhase}):null;const p=this.getInspectPanel(),h=m()(u.dashboardContainer,{"panel-in-fullscreen":o}),f=!i&&l===ke.UX.Off&&!this.props.queryParams.editview;return(0,C.jsxs)("div",{className:h,children:[l!==ke.UX.Full&&(0,C.jsx)("header",{"data-testid":d.wl.pages.Dashboard.DashNav.navV2,children:(0,C.jsx)(ee.t,{dashboard:e,title:e.title,folderTitle:e.meta.folderTitle,isFullscreen:!!o,onAddPanel:this.onAddPanel,kioskMode:l,hideTimePicker:e.timepicker.hidden})}),(0,C.jsx)(ti,{dashboard:e}),(0,C.jsx)("div",{className:u.dashboardScroll,children:(0,C.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",scrollTop:s,hideHorizontalTrack:!0,updateAfterMountMs:500,children:(0,C.jsxs)("div",{className:u.dashboardContent,children:[n&&(oi||(oi=(0,C.jsx)(Va,{}))),f&&(0,C.jsx)("section",{"aria-label":d.wl.pages.Dashboard.SubMenu.submenu,children:(0,C.jsx)(Da,{dashboard:e,annotations:e.annotations.list,links:e.links})}),(0,C.jsx)(J,{dashboard:e,viewPanel:o,editPanel:i})]})})}),p&&(0,C.jsx)(ma,{dashboard:e,panel:p}),i&&(0,C.jsx)(Yr,{dashboard:e,sourcePanel:i,tab:this.props.queryParams.tab}),r.editview&&(0,C.jsx)(te.D,{dashboard:e,editview:r.editview})]})}}const hi=(0,c.stylesFactory)(((e,t)=>{const n=t!==ke.UX.Full?e.spacing(0,2,2):e.spacing(2);return{dashboardContainer:o.css`
      width: 100%;
      height: 100%;
      display: flex;
      flex: 1 1 0;
      flex-direction: column;
      min-height: 0;
    `,dashboardScroll:o.css`
      width: 100%;
      flex-grow: 1;
      min-height: 0;
      display: flex;
    `,dashboardContent:o.css`
      padding: ${n};
      flex-basis: 100%;
      flex-grow: 1;
    `}})),fi=(0,c.withTheme2)(pi);fi.displayName="DashboardPage";const gi=ui(fi)},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=p(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js")),i=p(n("../../opt/drone/yarncache/prop-types-npm-15.7.2-d7a04f2274-5eef82fdda.zip/node_modules/prop-types/index.js")),o=n("./.yarn/__virtual__/react-draggable-virtual-ccf21627f7/3/opt/drone/yarncache/react-draggable-npm-4.4.4-f0b7a5c546-b8258a5893.zip/node_modules/react-draggable/build/cjs/cjs.js"),s=n("./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/node_modules/react-resizable/index.js"),l=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/utils.js"),d=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/calculateUtils.js"),c=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/ReactGridLayoutPropTypes.js"),u=p(n("../../opt/drone/yarncache/classnames-npm-2.3.1-f2ae0a8d3c-14db8889d5.zip/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},b(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=x(e);if(t){var a=x(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(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 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&&b(e,t)}(c,e);var t,n,r,i=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(S(e=i.call.apply(i,[this].concat(n))),"state",{resizing:null,dragging:null,className:""}),M(S(e),"elementRef",a.default.createRef()),M(S(e),"onDragStart",(function(t,n){var r=n.node,a=e.props,i=a.onDragStart,o=a.transformScale;if(i){var s={top:0,left:0},l=r.offsetParent;if(l){var c=l.getBoundingClientRect(),u=r.getBoundingClientRect(),p=u.left/o,h=c.left/o,f=u.top/o,g=c.top/o;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 i.call(S(e),e.props.i,b,y,{e:t,node:r,newPosition:s})}}})),M(S(e),"onDrag",(function(t,n){var r=n.node,a=n.deltaX,i=n.deltaY,o=e.props.onDrag;if(o){if(!e.state.dragging)throw new Error("onDrag called before onDragStart.");var s=e.state.dragging.top+i,l=e.state.dragging.left+a,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,x=y.rowHeight,M=b.clientHeight-(0,d.calcGridItemWHPx)(f,x,v[1]);s=(0,d.clamp)(s,0,M);var w=(0,d.calcGridColWidth)(m),k=g-(0,d.calcGridItemWHPx)(h,w,v[0]);l=(0,d.clamp)(l,0,k)}}var O={top:s,left:l};e.setState({dragging:O});var j=(0,d.calcXY)(m,s,l,h,f),z=j.x,C=j.y;return o.call(S(e),p,z,C,{e:t,node:r,newPosition:O})}})),M(S(e),"onDragStop",(function(t,n){var r=n.node,a=e.props.onDragStop;if(a){if(!e.state.dragging)throw new Error("onDragEnd called before onDragStart.");var i=e.props,o=i.w,s=i.h,l=i.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,o,s),g=f.x,m=f.y;return a.call(S(e),l,g,m,{e:t,node:r,newPosition:h})}})),M(S(e),"onResizeStop",(function(t,n){e.onResizeHandler(t,n,"onResizeStop")})),M(S(e),"onResizeStart",(function(t,n){e.onResizeHandler(t,n,"onResizeStart")})),M(S(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},a=this.state.dragging,i=a&&t.left!==r.left||t.top!==r.top;if(a){if(i){var o=t.left-a.left,s=t.top-a.top;this.onDrag(t.e,{node:n,deltaX:o,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,a=n.containerWidth;return n.useCSSTransforms?t=(0,l.setTransform)(e):(t=(0,l.setTopLeft)(e),r&&(t.left=(0,l.perc)(e.left/a),t.width=(0,l.perc)(e.width/a))),t}},{key:"mixinDraggable",value:function(e,t){return a.default.createElement(o.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,i=r.cols,o=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,i-o,0).width,y=(0,d.calcGridItemPosition)(m,0,0,l,c),v=(0,d.calcGridItemPosition)(m,0,0,u,p),S=[y.width,y.height],x=[Math.min(v.width,b),Math.min(v.height,1/0)];return a.default.createElement(s.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:S,maxConstraints:x,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,a=t.size,i=this.props[n];if(i){var o=this.props,s=o.cols,l=o.x,c=o.y,u=o.i,p=o.maxH,h=o.minH,f=this.props,g=f.minW,m=f.maxW,b=(0,d.calcWH)(this.getPositionParams(),a.width,a.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:a}),i.call(this,u,y,v,{e,node:r,size:a})}}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.w,i=e.h,o=e.isDraggable,s=e.isResizable,l=e.droppingPosition,c=e.useCSSTransforms,p=(0,d.calcGridItemPosition)(this.getPositionParams(),t,n,r,i,this.state),h=a.default.Children.only(this.props.children),g=a.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":o,"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,o)}}],n&&m(t.prototype,n),r&&m(t,r),c}(a.default.Component);t.default=w,M(w,"propTypes",{children:i.default.element,cols:i.default.number.isRequired,containerWidth:i.default.number.isRequired,rowHeight:i.default.number.isRequired,margin:i.default.array.isRequired,maxRows:i.default.number.isRequired,containerPadding:i.default.array.isRequired,x:i.default.number.isRequired,y:i.default.number.isRequired,w:i.default.number.isRequired,h:i.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:i.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:i.default.func,onDragStart:i.default.func,onDrag:i.default.func,onResizeStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,isDraggable:i.default.bool.isRequired,isResizable:i.default.bool.isRequired,isBounded:i.default.bool.isRequired,static:i.default.bool,useCSSTransforms:i.default.bool.isRequired,transformScale:i.default.number,className:i.default.string,handle:i.default.string,cancel:i.default.string,droppingPosition:i.default.shape({e:i.default.object.isRequired,left:i.default.number.isRequired,top:i.default.number.isRequired})}),M(w,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=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 a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(a,o,s):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js")),i=u(n("../../opt/drone/yarncache/lodash.isequal-npm-4.5.0-f8b0f64d63-da27515dc5.zip/node_modules/lodash.isequal/index.js")),o=u(n("../../opt/drone/yarncache/classnames-npm-2.3.1-f2ae0a8d3c-14db8889d5.zip/node_modules/classnames/index.js")),s=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/utils.js"),l=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/calculateUtils.js"),d=u(n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/GridItem.js")),c=u(n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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){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 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,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}(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 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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(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},x(e,t)}function M(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=O(e);if(t){var a=O(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(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 z="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=M(u);function u(){var e;v(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return j(k(e=c.call.apply(c,[this].concat(n))),"state",{activeDrag:null,layout:(0,s.synchronizeLayoutWithChildren)(e.props.layout,e.props.children,e.props.cols,(0,s.compactType)(e.props),e.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),j(k(e),"dragEnterCounter",0),j(k(e),"onDragStart",(function(t,n,r,a){var i=a.e,o=a.node,l=e.state.layout,d=(0,s.getLayoutItem)(l,t);if(d)return e.setState({oldDragItem:(0,s.cloneLayoutItem)(d),oldLayout:e.state.layout}),e.props.onDragStart(l,d,d,null,i,o)})),j(k(e),"onDrag",(function(t,n,r,a){var i=a.e,o=a.node,l=e.state.oldDragItem,d=e.state.layout,c=e.props,u=c.cols,p=c.allowOverlap,h=(0,s.getLayoutItem)(d,t);if(h){var f={w:h.w,h:h.h,x:h.x,y:h.y,placeholder:!0,i:t};d=(0,s.moveElement)(d,h,n,r,!0,e.props.preventCollision,(0,s.compactType)(e.props),u,p),e.props.onDrag(d,l,h,f,i,o),e.setState({layout:p?d:(0,s.compact)(d,(0,s.compactType)(e.props),u),activeDrag:f})}})),j(k(e),"onDragStop",(function(t,n,r,a){var i=a.e,o=a.node;if(e.state.activeDrag){var l=e.state.oldDragItem,d=e.state.layout,c=e.props,u=c.cols,p=c.preventCollision,h=c.allowOverlap,f=(0,s.getLayoutItem)(d,t);if(f){d=(0,s.moveElement)(d,f,n,r,!0,p,(0,s.compactType)(e.props),u,h),e.props.onDragStop(d,l,f,null,i,o);var g=h?d:(0,s.compact)(d,(0,s.compactType)(e.props),u),m=e.state.oldLayout;e.setState({activeDrag:null,layout:g,oldDragItem:null,oldLayout:null}),e.onLayoutMaybeChanged(g,m)}}})),j(k(e),"onResizeStart",(function(t,n,r,a){var i=a.e,o=a.node,l=e.state.layout,d=(0,s.getLayoutItem)(l,t);d&&(e.setState({oldResizeItem:(0,s.cloneLayoutItem)(d),oldLayout:e.state.layout}),e.props.onResizeStart(l,d,d,null,i,o))})),j(k(e),"onResize",(function(t,n,r,a){var i=a.e,o=a.node,l=e.state,d=l.layout,c=l.oldResizeItem,u=e.props,p=u.cols,h=u.preventCollision,f=u.allowOverlap,b=(0,s.withLayoutItem)(d,t,(function(e){var t;if(h&&!f){var a=(0,s.getAllCollisions)(d,g(g({},e),{},{w:n,h:r})).filter((function(t){return t.i!==e.i}));if(t=a.length>0){var i=1/0,o=1/0;a.forEach((function(t){t.x>e.x&&(i=Math.min(i,t.x)),t.y>e.y&&(o=Math.min(o,t.y))})),Number.isFinite(i)&&(e.w=i-e.x),Number.isFinite(o)&&(e.h=o-e.y)}}return t||(e.w=n,e.h=r),e})),y=m(b,2),v=y[0],S=y[1];if(S){var x={w:S.w,h:S.h,x:S.x,y:S.y,static:!0,i:t};e.props.onResize(v,c,S,x,i,o),e.setState({layout:f?v:(0,s.compact)(v,(0,s.compactType)(e.props),p),activeDrag:x})}})),j(k(e),"onResizeStop",(function(t,n,r,a){var i=a.e,o=a.node,l=e.state,d=l.layout,c=l.oldResizeItem,u=e.props,p=u.cols,h=u.allowOverlap,f=(0,s.getLayoutItem)(d,t);e.props.onResizeStop(d,c,f,null,i,o);var g=h?d:(0,s.compact)(d,(0,s.compactType)(e.props),p),m=e.state.oldLayout;e.setState({activeDrag:null,layout:g,oldResizeItem:null,oldLayout:null}),e.onLayoutMaybeChanged(g,m)})),j(k(e),"onDragOver",(function(t){var n;if(t.preventDefault(),t.stopPropagation(),C&&(null===(n=t.nativeEvent.target)||void 0===n||!n.classList.contains(z)))return!1;var r=e.props,i=r.droppingItem,o=r.onDropDragOver,s=r.margin,d=r.cols,c=r.rowHeight,u=r.maxRows,p=r.width,f=r.containerPadding,m=r.transformScale,b=null==o?void 0:o(t);if(!1===b)return e.state.droppingDOMNode&&e.removeDroppingPlaceholder(),!1;var y=g(g({},i),b),v=e.state.layout,S=t.nativeEvent,x=S.layerX,M=S.layerY,w={left:x/m,top:M/m,e:t};if(e.state.droppingDOMNode){if(e.state.droppingPosition){var k=e.state.droppingPosition,O=k.left,j=k.top;(O!=x||j!=M)&&e.setState({droppingPosition:w})}}else{var P={cols:d,margin:s,maxRows:u,rowHeight:c,containerWidth:p,containerPadding:f||s},R=(0,l.calcXY)(P,M,x,y.w,y.h);e.setState({droppingDOMNode:a.createElement("div",{key:y.i}),droppingPosition:w,layout:[].concat(h(v),[g(g({},y),{},{x:R.x,y:R.y,static:!1,isDraggable:!0})])})}})),j(k(e),"removeDroppingPlaceholder",(function(){var t=e.props,n=t.droppingItem,r=t.cols,a=e.state.layout,i=(0,s.compact)(a.filter((function(e){return e.i!==n.i})),(0,s.compactType)(e.props),r);e.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),j(k(e),"onDragLeave",(function(t){t.preventDefault(),e.dragEnterCounter--,0===e.dragEnterCounter&&e.removeDroppingPlaceholder()})),j(k(e),"onDragEnter",(function(t){t.preventDefault(),e.dragEnterCounter++})),j(k(e),"onDrop",(function(t){t.preventDefault();var n=e.props.droppingItem,r=e.state.layout,a=r.find((function(e){return e.i===n.i}));e.dragEnterCounter=0,e.removeDroppingPlaceholder(),e.props.onDrop(r,a,t)})),e}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n;return t.activeDrag?null:((0,i.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),e.allowOverlap),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,i.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:"onLayoutMaybeChanged",value:function(e,t){t||(t=this.state.layout),(0,i.default)(t,e)||this.props.onLayoutChange(e)}},{key:"placeholder",value:function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,n=t.width,r=t.cols,i=t.margin,o=t.containerPadding,s=t.rowHeight,l=t.maxRows,c=t.useCSSTransforms,u=t.transformScale;return a.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:i,containerPadding:o||i,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:u},a.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,i=r.width,o=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,S=r.resizeHandles,x=r.resizeHandle,M=this.state,w=M.mounted,k=M.droppingPosition,O="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&h,j="boolean"==typeof n.isResizable?n.isResizable:!n.static&&f,z=n.resizeHandles||S,C=O&&g&&!1!==n.isBounded;return a.createElement(d.default,{containerWidth:i,cols:o,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:O,isResizable:j,isBounded:C,useCSSTransforms:m&&w,usePercentages:!w,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:z,resizeHandle:x},e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.style,i=t.isDroppable,l=t.innerRef,d=(0,o.default)(z,n),c=g({height:this.containerHeight()},r);return a.createElement("div",{ref:l,className:d,style:c,onDrop:i?this.onDrop:s.noop,onDragLeave:i?this.onDragLeave:s.noop,onDragEnter:i?this.onDragEnter:s.noop,onDragOver:i?this.onDragOver:s.noop},a.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&S(t.prototype,n),r&&S(t,r),u}(a.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,allowOverlap:!1,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,onDropDragOver:s.noop})},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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=i(n("../../opt/drone/yarncache/prop-types-npm-15.7.2-d7a04f2274-5eef82fdda.zip/node_modules/prop-types/index.js")),a=i(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"));function i(e){return e&&e.__esModule?e:{default:e}}var o=r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));t.resizeHandleAxesType=o;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("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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,allowOverlap:r.default.bool,preventCollision:r.default.bool,useCSSTransforms:r.default.bool,transformScale:r.default.number,isDroppable:r.default.bool,resizeHandles:o,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={};a.default.Children.forEach(n,(function(e){if(null!=(null==e?void 0:e.key)){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},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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},r(e)}t.default=void 0;var a=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 a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(a,o,s):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js")),i=u(n("../../opt/drone/yarncache/prop-types-npm-15.7.2-d7a04f2274-5eef82fdda.zip/node_modules/prop-types/index.js")),o=u(n("../../opt/drone/yarncache/lodash.isequal-npm-4.5.0-f8b0f64d63-da27515dc5.zip/node_modules/lodash.isequal/index.js")),s=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/utils.js"),l=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/responsiveUtils.js"),d=u(n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/ReactGridLayout.js")),c=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];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(){return h=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},h.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function g(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 m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(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 v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(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=w(e);if(t){var a=w(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return M(e)}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function k(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){return Object.prototype.toString.call(e)};function j(e,t){return null==e?null:Array.isArray(e)?e:e[t]}var z=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&&v(e,t)}(u,e);var t,n,r,i=S(u);function u(){var e;b(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return k(M(e=i.call.apply(i,[this].concat(n))),"state",e.generateInitialState()),k(M(e),"onLayoutChange",(function(t){e.props.onLayoutChange(t,m(m({},e.props.layouts),{},k({},e.state.breakpoint,t)))})),e}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){if(!(0,o.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,a=e.cols,i=(0,l.getBreakpointFromWidth)(n,t),o=(0,l.getColsFromBreakpoint)(i,a),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,l.findOrGenerateResponsiveLayout)(r,n,i,i,o,s),breakpoint:i,cols:o}}},{key:"componentDidUpdate",value:function(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,o.default)(this.props.breakpoints,e.breakpoints)&&(0,o.default)(this.props.cols,e.cols)||this.onWidthChange(e)}},{key:"onWidthChange",value:function(e){var t=this.props,n=t.breakpoints,r=t.cols,a=t.layouts,i=t.compactType,o=this.props.breakpoint||(0,l.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),d=this.state.breakpoint,c=(0,l.getColsFromBreakpoint)(o,r),u=m({},a);if(d!==o||e.breakpoints!==n||e.cols!==r){d in u||(u[d]=(0,s.cloneLayout)(this.state.layout));var p=(0,l.findOrGenerateResponsiveLayout)(u,n,o,d,c,i);p=(0,s.synchronizeLayoutWithChildren)(p,this.props.children,c,i,this.props.allowOverlap),u[o]=p,this.props.onLayoutChange(p,u),this.props.onBreakpointChange(o,c),this.setState({breakpoint:o,layout:p,cols:c})}var h=j(this.props.margin,o),f=j(this.props.containerPadding,o);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,f(e,c));return a.createElement(d.default,h({},r,{margin:j(t,this.state.breakpoint),containerPadding:j(n,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&y(t.prototype,n),r&&y(t,r),u}(a.Component);t.default=z,k(z,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,allowOverlap:i.default.bool,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts:function(e,t){if("[object Object]"!==O(e[t]))throw new Error("Layout property must be an object. Received: "+O(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:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),k(z,"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],allowOverlap:!1,onBreakpointChange:s.noop,onLayoutChange:s.noop,onWidthChange:s.noop})},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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,a=e.cols;return(r-t[0]*(a-1)-2*n[0])/a}function r(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function a(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,a,i,o,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(i,u,l[0]),p.height=r(o,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])*a+d[1]),p.left=Math.round((u+l[0])*t+d[0]));return p},t.calcXY=function(e,t,r,i,o){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=a(p,0,l-i),h=a(h,0,c-o),{x:p,y:h}},t.calcWH=function(e,t,r,i,o){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=a(p,0,d-i),h=a(h,0,l-o),{w:p,h}},t.clamp=a},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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},r(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&&h(e,t)}(l,t);var n,r,i=(n=l,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=m(n);if(r){var a=m(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return f(this,e)});function l(){var e;u(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(g(e=i.call.apply(i,[this].concat(n))),"state",{width:1280}),b(g(e),"elementRef",a.createRef()),b(g(e),"mounted",!1),b(g(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&&p(e.prototype,t);n&&p(e,n)}(l,[{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,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,s);return n&&!this.mounted?a.createElement("div",{className:(0,o.default)(this.props.className,"react-grid-layout"),style:this.props.style,ref:this.elementRef}):a.createElement(e,c({innerRef:this.elementRef},r,this.state))}}]),l}(a.Component),b(t,"defaultProps",{measureBeforeMount:!1}),b(t,"propTypes",{measureBeforeMount:i.default.bool}),n};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(a,o,s):a[o]=e[o]}a.default=e,n&&n.set(e,a);return a}(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js")),i=l(n("../../opt/drone/yarncache/prop-types-npm-15.7.2-d7a04f2274-5eef82fdda.zip/node_modules/prop-types/index.js")),o=l(n("../../opt/drone/yarncache/classnames-npm-2.3.1-f2ae0a8d3c-14db8889d5.zip/node_modules/classnames/index.js")),s=["measureBeforeMount"];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},c.apply(this,arguments)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(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)},m(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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.allowOverlap===t.allowOverlap&&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)}},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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=a(e),r=n[0],i=1,o=n.length;i<o;i++){var s=n[i];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,i,o,s){if(e[n])return(0,r.cloneLayout)(e[n]);for(var l=e[i],d=a(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:o}),s,o)},t.sortBreakpoints=a;var r=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/utils.js");function a(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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)(a.default.Children.map(e,(function(e){return null==e?void 0:e.key})),a.default.Children.map(t,(function(e){return null==e?void 0: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=S,t.getAllCollisions=x,t.getStatics=M,t.moveElement=w,t.moveElementAwayFromCollision=k,t.perc=function(e){return 100*e+"%"},t.setTransform=function(e){var t=e.top,n=e.left,r=e.width,a=e.height,i="translate(".concat(n,"px,").concat(t,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(r,"px"),height:"".concat(a,"px"),position:"absolute"}},t.setTopLeft=function(e){var t=e.top,n=e.left,r=e.width,a=e.height;return{top:"".concat(t,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(a,"px"),position:"absolute"}},t.sortLayoutItems=O,t.sortLayoutItemsByRowCol=j,t.sortLayoutItemsByColRow=z,t.synchronizeLayoutWithChildren=function(e,t,n,r,i){e=e||[];var o=[];a.default.Children.forEach(t,(function(t){if(null!=(null==t?void 0:t.key)){var n=v(e,String(t.key));if(n)o.push(u(n));else{0;var r=t.props["data-grid"]||t.props._grid;r?o.push(u(s(s({},r),{},{i:t.key}))):o.push(u({w:1,h:1,x:0,y:d(o),i:String(t.key)}))}}}));var l=y(o,{cols:n});return i?l:f(l,r,n)},t.validateLayout=C,t.compactType=function(e){var t=e||{},n=t.verticalCompact,r=t.compactType;return!1===n?null:r},t.noop=t.fastRGLPropsEqual=void 0;var r=i(n("../../opt/drone/yarncache/lodash.isequal-npm-4.5.0-f8b0f64d63-da27515dc5.zip/node_modules/lodash.isequal/index.js")),a=i(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"));function i(e){return e&&e.__esModule?e:{default:e}}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 s(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){l(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 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,a=e.length;r<a;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,a=e.length;r<a;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("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/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),a=O(e,t),i=Array(e.length),o=0,s=a.length;o<s;o++){var l=u(a[o]);l.static||(l=b(r,l,t,n,a),r.push(l)),i[e.indexOf(a[o])]=l,l.moved=!1}return i}t.fastRGLPropsEqual=p;var g={x:"w",y:"h"};function m(e,t,n,r){var a=g[r];t[r]+=1;for(var i=e.map((function(e){return e.i})).indexOf(t.i)+1;i<e.length;i++){var o=e[i];if(!o.static){if(o.y>t.y+t.h)break;h(t,o)&&m(e,o,n+t[a],r)}}t[r]=n}function b(e,t,n,r,a){var i,o="horizontal"===n;if("vertical"===n)for(t.y=Math.min(d(e),t.y);t.y>0&&!S(e,t);)t.y--;else if(o)for(;t.x>0&&!S(e,t);)t.x--;for(;i=S(e,t);)o?m(a,t,i.x+i.w,"x"):m(a,t,i.y+i.h,"y"),o&&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,a=e.length;r<a;r++){var i=e[r];if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),i.static)for(;S(n,i);)i.y++;else n.push(i)}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 S(e,t){for(var n=0,r=e.length;n<r;n++)if(h(e[n],t))return e[n]}function x(e,t){return e.filter((function(e){return h(e,t)}))}function M(e){return e.filter((function(e){return e.static}))}function w(e,t,n,r,a,i,o,s,l){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;P("Moving element ".concat(t.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(t.x,",").concat(t.y,"]"));var d=t.x,c=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;var u=O(e,o);("vertical"===o&&"number"==typeof r?c>=r:"horizontal"===o&&"number"==typeof n&&d>=n)&&(u=u.reverse());var p=x(u,t);if(i&&p.length)return l||(P("Collision prevented on ".concat(t.i,", reverting.")),t.x=d,t.y=c,t.moved=!1),e;for(var h=0,f=p.length;h<f;h++){var g=p[h];P("Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(g.i," at [").concat(g.x,",").concat(g.y,"]")),g.moved||(e=g.static?k(e,g,t,a,o,s):k(e,t,g,a,o,s))}return e}function k(e,t,n,r,a,i){var o="horizontal"===a,s="horizontal"!==a,l=t.static;if(r){r=!1;var d={x:o?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(!S(e,d))return P("Doing reverse collision on ".concat(n.i," up to [").concat(d.x,",").concat(d.y,"].")),w(e,n,o?d.x:void 0,s?d.y:void 0,r,l,a,i)}return w(e,n,o?n.x+1:void 0,s?n.y+1:void 0,r,l,a,i)}function O(e,t){return"horizontal"===t?z(e):"vertical"===t?j(e):e}function j(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 z(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 C(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,a=e.length;r<a;r++){for(var i=e[r],o=0;o<n.length;o++)if("number"!=typeof i[n[o]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[o]+" must be a number!");if(i.i&&"string"!=typeof i.i)throw new Error("ReactGridLayout: "+t+"["+r+"].i must be a string!");if(void 0!==i.static&&"boolean"!=typeof i.static)throw new Error("ReactGridLayout: "+t+"["+r+"].static must be a boolean!")}}function P(){}t.noop=function(){}},"./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/index.js":(e,t,n)=>{e.exports=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/ReactGridLayout.js").default,e.exports.utils=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/utils.js"),e.exports.Responsive=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/ResponsiveReactGridLayout.js").default,e.exports.Responsive.utils=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/responsiveUtils.js"),e.exports.WidthProvider=n("./.yarn/__virtual__/react-grid-layout-virtual-c8fa916776/3/opt/drone/yarncache/react-grid-layout-npm-1.3.0-5233dc8db3-955c135dcc.zip/node_modules/react-grid-layout/build/components/WidthProvider.js").default},"./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/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={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js")),a=n("./.yarn/__virtual__/react-draggable-virtual-ccf21627f7/3/opt/drone/yarncache/react-draggable-npm-4.4.4-f0b7a5c546-b8258a5893.zip/node_modules/react-draggable/build/cjs/cjs.js"),i=n("./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/node_modules/react-resizable/build/utils.js"),o=n("./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/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},d.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},h(e,t)}var f=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleRefs={},t.lastHandleRect=null,t.slack=null,t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var l=o.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,a=n.maxConstraints,i=n.lockAspectRatio;if(!r&&!a&&!i)return[e,t];if(i){var o=this.props.width/this.props.height,s=e-this.props.width,l=t-this.props.height;Math.abs(s)>Math.abs(l*o)?t=e/o:e=t*o}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)),a&&(e=Math.min(a[0],e),t=Math.min(a[1],t)),this.slack=[p+(d-e),h+(c-t)],[e,t]},l.resizeHandler=function(e,t){var n=this;return function(r,a){var i=a.node,o=a.deltaX,s=a.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=i.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===u)o+=p.left-n.lastHandleRect.left;if("n"===c)s+=p.top-n.lastHandleRect.top}n.lastHandleRect=p,"w"===u&&(o=-o),"n"===c&&(s=-s);var h=n.props.width+(l?o/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:i,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 a=u({ref:t},"string"==typeof n.type?{}:{handleAxis:e});return r.cloneElement(n,a)},l.render=function(){var e=this,t=this.props,n=t.children,o=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,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,s));return(0,i.cloneElement)(n,u(u({},p),{},{className:(o?o+" ":"")+"react-resizable",children:[].concat(n.props.children,c.map((function(t){var n,i=null!=(n=e.handleRefs[t])?n:e.handleRefs[t]=r.createRef();return r.createElement(a.DraggableCore,d({},l,{nodeRef:i,key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t,i))})))}))},o}(r.Component);t.default=f,f.propTypes=o.resizableProps,f.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}},"./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/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={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js")),a=l(n("../../opt/drone/yarncache/prop-types-npm-15.7.2-d7a04f2274-5eef82fdda.zip/node_modules/prop-types/index.js")),i=l(n("./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/node_modules/react-resizable/build/Resizable.js")),o=n("./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/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},c.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},f(e,t)}var g=function(e){var t,n;function a(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];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=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),a.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},a.prototype.render=function(){var e=this.props,t=e.handle,n=e.handleSize,a=(e.onResize,e.onResizeStart),o=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,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,s);return r.createElement(i.default,{axis:f,draggableOpts:l,handle:t,handleSize:n,height:this.state.height,lockAspectRatio:h,maxConstraints:u,minConstraints:d,onResizeStart:a,onResize:this.onResize,onResizeStop:o,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"})})))},a}(r.Component);t.default=g,g.propTypes=p(p({},o.resizableProps),{},{children:a.default.element})},"./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/node_modules/react-resizable/build/propTypes.js":(e,t,n)=>{"use strict";t.__esModule=!0,t.resizableProps=void 0;var r,a=(r=n("../../opt/drone/yarncache/prop-types-npm-15.7.2-d7a04f2274-5eef82fdda.zip/node_modules/prop-types/index.js"))&&r.__esModule?r:{default:r};n("./.yarn/__virtual__/react-draggable-virtual-ccf21627f7/3/opt/drone/yarncache/react-draggable-npm-4.4.4-f0b7a5c546-b8258a5893.zip/node_modules/react-draggable/build/cjs/cjs.js");var i={axis:a.default.oneOf(["both","x","y","none"]),className:a.default.string,children:a.default.element.isRequired,draggableOpts:a.default.shape({allowAnyClick:a.default.bool,cancel:a.default.string,children:a.default.node,disabled:a.default.bool,enableUserSelectHack:a.default.bool,offsetParent:a.default.node,grid:a.default.arrayOf(a.default.number),handle:a.default.string,nodeRef:a.default.object,onStart:a.default.func,onDrag:a.default.func,onStop:a.default.func,onMouseDown:a.default.func,scale:a.default.number}),height:a.default.number.isRequired,handle:a.default.oneOfType([a.default.node,a.default.func]),handleSize:a.default.arrayOf(a.default.number),lockAspectRatio:a.default.bool,maxConstraints:a.default.arrayOf(a.default.number),minConstraints:a.default.arrayOf(a.default.number),onResizeStop:a.default.func,onResizeStart:a.default.func,onResize:a.default.func,resizeHandles:a.default.arrayOf(a.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:a.default.number,width:a.default.number.isRequired};t.resizableProps=i},"./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/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=o(o({},e.props.style),t.style));t.className&&e.props.className&&(t.className=e.props.className+" "+t.className);return a.default.cloneElement(e,t)};var r,a=(r=n("../../opt/drone/yarncache/react-npm-17.0.2-99ba37d931-b254cc17ce.zip/node_modules/react/index.js"))&&r.__esModule?r:{default:r};function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(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}},"./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/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("./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/node_modules/react-resizable/build/Resizable.js").default,e.exports.ResizableBox=n("./.yarn/__virtual__/react-resizable-virtual-13412137cd/3/opt/drone/yarncache/react-resizable-npm-3.0.4-aa39f9db2b-cbf86ad04b.zip/node_modules/react-resizable/build/ResizableBox.js").default},"../../opt/drone/yarncache/lodash.isequal-npm-4.5.0-f8b0f64d63-da27515dc5.zip/node_modules/lodash.isequal/index.js":(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",a=9007199254740991,i="[object Arguments]",o="[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]",S="[object ArrayBuffer]",x="[object DataView]",M=/^\[object .+?Constructor\]$/,w=/^(?: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[i]=k[o]=k[S]=k[s]=k[x]=k[l]=k[d]=k[c]=k[u]=k[p]=k[h]=k[g]=k[m]=k[b]=k[v]=!1;var O="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,j="object"==typeof self&&self&&self.Object===Object&&self,z=O||j||Function("return this")(),C=t&&!t.nodeType&&t,P=C&&e&&!e.nodeType&&e,R=P&&P.exports===C,T=R&&O.process,B=function(){try{return T&&T.binding&&T.binding("util")}catch(e){}}(),W=B&&B.isTypedArray;function _(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 D(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var E,A,F,L=Array.prototype,N=Function.prototype,$=Object.prototype,H=z["__core-js_shared__"],G=N.toString,V=$.hasOwnProperty,U=(E=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",q=$.toString,Z=RegExp("^"+G.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Q=R?z.Buffer:void 0,Y=z.Symbol,J=z.Uint8Array,X=$.propertyIsEnumerable,K=L.splice,ee=Y?Y.toStringTag:void 0,te=Object.getOwnPropertySymbols,ne=Q?Q.isBuffer:void 0,re=(A=Object.keys,F=Object,function(e){return A(F(e))}),ae=Be(z,"DataView"),ie=Be(z,"Map"),oe=Be(z,"Promise"),se=Be(z,"Set"),le=Be(z,"WeakMap"),de=Be(Object,"create"),ce=Ie(ae),ue=Ie(ie),pe=Ie(oe),he=Ie(se),fe=Ie(le),ge=Y?Y.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 Se(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}function xe(e){var t=this.__data__=new ye(e);this.size=t.size}function Me(e,t){var n=Fe(e),r=!n&&Ae(e),a=!n&&!r&&Le(e),i=!n&&!r&&!a&&Ve(e),o=n||r||a||i,s=o?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)||o&&("length"==d||a&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||De(d,l))||s.push(d);return s}function we(e,t){for(var n=e.length;n--;)if(Ee(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 a=q.call(e);r&&(t?e[ee]=n:delete e[ee]);return a}(e):function(e){return q.call(e)}(e)}function Oe(e){return Ge(e)&&ke(e)==i}function je(e,t,n,r,a){return e===t||(null==e||null==t||!Ge(e)&&!Ge(t)?e!=e&&t!=t:function(e,t,n,r,a,c){var f=Fe(e),v=Fe(t),M=f?o:_e(e),w=v?o:_e(t),k=(M=M==i?h:M)==h,O=(w=w==i?h:w)==h,j=M==w;if(j&&Le(e)){if(!Le(t))return!1;f=!0,k=!1}if(j&&!k)return c||(c=new xe),f||Ve(e)?Pe(e,t,n,r,a,c):function(e,t,n,r,a,i,o){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!i(new J(e),new J(t)));case s:case l:case p:return Ee(+e,+t);case d:return e.name==t.name&&e.message==t.message;case g:case b:return e==t+"";case u:var c=D;case m:var h=1&r;if(c||(c=I),e.size!=t.size&&!h)return!1;var f=o.get(e);if(f)return f==t;r|=2,o.set(e,t);var v=Pe(c(e),c(t),r,a,i,o);return o.delete(e),v;case y:if(me)return me.call(e)==me.call(t)}return!1}(e,t,M,n,r,a,c);if(!(1&n)){var z=k&&V.call(e,"__wrapped__"),C=O&&V.call(t,"__wrapped__");if(z||C){var P=z?e.value():e,R=C?t.value():t;return c||(c=new xe),a(P,R,n,r,c)}}if(!j)return!1;return c||(c=new xe),function(e,t,n,r,a,i){var o=1&n,s=Re(e),l=s.length,d=Re(t).length;if(l!=d&&!o)return!1;var c=l;for(;c--;){var u=s[c];if(!(o?u in t:V.call(t,u)))return!1}var p=i.get(e);if(p&&i.get(t))return p==t;var h=!0;i.set(e,t),i.set(t,e);var f=o;for(;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var b=o?r(m,g,u,t,e,i):r(g,m,u,e,t,i);if(!(void 0===b?g===m||a(g,m,n,r,i):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 i.delete(e),i.delete(t),h}(e,t,n,r,a,c)}(e,t,n,r,je,a))}function ze(e){return!(!He(e)||function(e){return!!U&&U in e}(e))&&(Ne(e)?Z:M).test(Ie(e))}function Ce(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||$,t!==r)return re(e);var t,n,r,a=[];for(var i in Object(e))V.call(e,i)&&"constructor"!=i&&a.push(i);return a}function Pe(e,t,n,r,a,i){var o=1&n,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var c=-1,u=!0,p=2&n?new Se:void 0;for(i.set(e,t),i.set(t,e);++c<s;){var h=e[c],f=t[c];if(r)var g=o?r(f,h,c,t,e,i):r(h,f,c,e,t,i);if(void 0!==g){if(g)continue;u=!1;break}if(p){if(!_(t,(function(e,t){if(o=t,!p.has(o)&&(h===e||a(h,e,n,r,i)))return p.push(t);var o}))){u=!1;break}}else if(h!==f&&!a(h,f,n,r,i)){u=!1;break}}return i.delete(e),i.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,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,Ue,We)}function Te(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function Be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ze(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=we(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=we(t,e);return n<0?void 0:t[n][1]},ye.prototype.has=function(e){return we(this.__data__,e)>-1},ye.prototype.set=function(e,t){var n=this.__data__,r=we(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(ie||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},Se.prototype.add=Se.prototype.push=function(e){return this.__data__.set(e,r),this},Se.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new ye,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!ie||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,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}(te(e),(function(t){return X.call(e,t)})))}:function(){return[]},_e=ke;function De(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Ie(e){if(null!=e){try{return G.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ee(e,t){return e===t||e!=e&&t!=t}(ae&&_e(new ae(new ArrayBuffer(1)))!=x||ie&&_e(new ie)!=u||oe&&_e(oe.resolve())!=f||se&&_e(new se)!=m||le&&_e(new le)!=v)&&(_e=function(e){var t=ke(e),n=t==h?e.constructor:void 0,r=n?Ie(n):"";if(r)switch(r){case ce:return x;case ue:return u;case pe:return f;case he:return m;case fe:return v}return t});var Ae=Oe(function(){return arguments}())?Oe: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(!He(e))return!1;var t=ke(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function He(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)&&$e(e.length)&&!!k[ke(e)]};function Ue(e){return null!=(t=e)&&$e(t.length)&&!Ne(t)?Me(e):Ce(e);var t}e.exports=function(e,t){return je(e,t)}},"../../opt/drone/yarncache/react-style-proptype-npm-3.2.2-d7241ef02d-f0e646e148.zip/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"]},"../../opt/drone/yarncache/react-style-proptype-npm-3.2.2-d7241ef02d-f0e646e148.zip/node_modules/react-style-proptype/src/index.js":(e,t,n)=>{var r=n("../../opt/drone/yarncache/react-style-proptype-npm-3.2.2-d7241ef02d-f0e646e148.zip/node_modules/react-style-proptype/src/css-properties.js"),a=n("../../opt/drone/yarncache/prop-types-npm-15.7.2-d7a04f2274-5eef82fdda.zip/node_modules/prop-types/index.js");e.exports=function(e,t,n){var a=e[t];if(a){var i=[];if(Object.keys(a).forEach((function(e){-1===r.indexOf(e)&&i.push(e)})),i.length)throw new Error("Prop "+t+" passed to "+n+". Has invalid keys "+i.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=a.oneOfType([a.arrayOf(e.exports),e.exports])}}]);
//# sourceMappingURL=DashboardPage.cd4ada1146b53ad3284f.js.map