@kong-ui-public/dashboard-renderer 0.35.1 → 0.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as L, watchEffect as Pe, inject as Q, defineComponent as M, onUnmounted as he, computed as z, watch as de, resolveComponent as F, unref as C, openBlock as x, createBlock as T, withCtx as N, createTextVNode as re, toDisplayString as K, renderSlot as ne, createCommentVNode as I, useCssVars as oe, createElementVNode as
|
|
1
|
+
import { ref as L, watchEffect as Pe, inject as Q, defineComponent as M, onUnmounted as he, computed as z, watch as de, resolveComponent as F, unref as C, openBlock as x, createBlock as T, withCtx as N, createTextVNode as re, toDisplayString as K, renderSlot as ne, createCommentVNode as I, useCssVars as oe, createElementVNode as Y, createVNode as U, mergeProps as Re, createSlots as De, createElementBlock as A, normalizeProps as Be, guardReactiveProps as qe, nextTick as Ue, resolveDynamicComponent as ze, onMounted as Se, Fragment as Te, renderList as ke, normalizeClass as Fe, normalizeStyle as me } from "vue";
|
|
2
2
|
import { stripUnknownFilters as $e, Timeframe as Ge, TimePeriods as Ne, TIMEFRAME_LOOKUP as We, formatTime as ye, msToGranularity as Ke } from "@kong-ui-public/analytics-utilities";
|
|
3
3
|
import { SimpleChart as Ve, AnalyticsChart as Ye, TopNTable as Xe, CsvExportModal as je } from "@kong-ui-public/analytics-chart";
|
|
4
4
|
import Qe from "swrv";
|
|
@@ -186,7 +186,7 @@ const $ = {
|
|
|
186
186
|
"refresh-counter": t.refreshCounter
|
|
187
187
|
}, {
|
|
188
188
|
default: N(({ data: s }) => [
|
|
189
|
-
|
|
189
|
+
Y("div", _t, [
|
|
190
190
|
U(C(Ve), {
|
|
191
191
|
"chart-data": s,
|
|
192
192
|
"chart-options": e.chartOptions,
|
|
@@ -197,12 +197,12 @@ const $ = {
|
|
|
197
197
|
_: 1
|
|
198
198
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
199
199
|
}
|
|
200
|
-
}),
|
|
200
|
+
}), V = (c, e) => {
|
|
201
201
|
const t = c.__vccOpts || c;
|
|
202
202
|
for (const [i, s] of e)
|
|
203
203
|
t[i] = s;
|
|
204
204
|
return t;
|
|
205
|
-
}, bt = /* @__PURE__ */
|
|
205
|
+
}, bt = /* @__PURE__ */ V(vt, [["__scopeId", "data-v-694cf637"]]), wt = { class: "analytics-chart" }, Et = /* @__PURE__ */ M({
|
|
206
206
|
__name: "BaseAnalyticsChartRenderer",
|
|
207
207
|
props: {
|
|
208
208
|
query: {},
|
|
@@ -246,7 +246,7 @@ const $ = {
|
|
|
246
246
|
onChartData: u
|
|
247
247
|
}, {
|
|
248
248
|
default: N(({ data: b }) => [
|
|
249
|
-
|
|
249
|
+
Y("div", wt, [
|
|
250
250
|
U(C(Ye), Re({
|
|
251
251
|
"allow-csv-export": f.chartOptions.allowCsvExport,
|
|
252
252
|
"chart-data": b,
|
|
@@ -277,7 +277,7 @@ const $ = {
|
|
|
277
277
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]);
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
|
-
}), Ae = /* @__PURE__ */
|
|
280
|
+
}), Ae = /* @__PURE__ */ V(Et, [["__scopeId", "data-v-1bc587d3"]]), ve = /* @__PURE__ */ M({
|
|
281
281
|
__name: "BarChartRenderer",
|
|
282
282
|
props: {
|
|
283
283
|
query: {},
|
|
@@ -382,7 +382,7 @@ const $ = {
|
|
|
382
382
|
}, 16)
|
|
383
383
|
]));
|
|
384
384
|
}
|
|
385
|
-
}), Rt = /* @__PURE__ */
|
|
385
|
+
}), Rt = /* @__PURE__ */ V(Ct, [["__scopeId", "data-v-0f571079"]]), we = "#6c7489", Ee = "20px", Le = "20px", Dt = /* @__PURE__ */ M({
|
|
386
386
|
__name: "TopNTableRenderer",
|
|
387
387
|
props: {
|
|
388
388
|
query: {},
|
|
@@ -451,7 +451,7 @@ const $ = {
|
|
|
451
451
|
emits: ["edit-tile"],
|
|
452
452
|
setup(c, { emit: e }) {
|
|
453
453
|
oe((p) => ({
|
|
454
|
-
"
|
|
454
|
+
"733568b4": `${p.height}px`
|
|
455
455
|
}));
|
|
456
456
|
const t = parseInt(Le, 10), i = c, s = e, r = Q(J), { evaluateFeatureFlag: o } = $.useEvaluateFeatureFlag(), { i18n: n } = $.useI18n(), l = o("ma-3043-analytics-chart-kebab-menu", !1), h = L(), d = L(!1), u = L(), f = L(!1);
|
|
457
457
|
de(() => i.definition, async () => {
|
|
@@ -525,7 +525,7 @@ const $ = {
|
|
|
525
525
|
text: p.definition.chart.chartTitle
|
|
526
526
|
}, {
|
|
527
527
|
default: N(() => [
|
|
528
|
-
|
|
528
|
+
Y("div", {
|
|
529
529
|
ref_key: "titleRef",
|
|
530
530
|
ref: u,
|
|
531
531
|
class: "title"
|
|
@@ -568,10 +568,10 @@ const $ = {
|
|
|
568
568
|
key: 1,
|
|
569
569
|
class: "chart-export-button",
|
|
570
570
|
"data-testid": `chart-csv-export-${p.tileId}`,
|
|
571
|
-
onClick: q[0] || (q[0] = (
|
|
571
|
+
onClick: q[0] || (q[0] = (Xt) => le())
|
|
572
572
|
}, {
|
|
573
573
|
default: N(() => [
|
|
574
|
-
|
|
574
|
+
Y("span", {
|
|
575
575
|
class: "chart-export-trigger",
|
|
576
576
|
"data-testid": `csv-export-button-${p.tileId}`
|
|
577
577
|
}, K(C(n).t("csvExport.exportAsCsv")), 9, kt)
|
|
@@ -602,7 +602,7 @@ const $ = {
|
|
|
602
602
|
onToggleModal: G
|
|
603
603
|
}, null, 8, ["chart-data", "data-testid", "filename"])) : I("", !0)
|
|
604
604
|
])) : I("", !0),
|
|
605
|
-
|
|
605
|
+
Y("div", {
|
|
606
606
|
class: "tile-content",
|
|
607
607
|
"data-testid": `tile-content-${p.tileId}`
|
|
608
608
|
}, [
|
|
@@ -611,7 +611,7 @@ const $ = {
|
|
|
611
611
|
], 8, zt);
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
|
-
}), Lt = /* @__PURE__ */
|
|
614
|
+
}), Lt = /* @__PURE__ */ V(At, [["__scopeId", "data-v-30fafa9c"]]), Ot = (c, e, t) => {
|
|
615
615
|
const i = /* @__PURE__ */ new Map();
|
|
616
616
|
t.forEach((r) => {
|
|
617
617
|
const o = r.layout.position.row, n = i.get(o), l = r.layout.size.rows === 1 && !!r.layout.size.fitToContent;
|
|
@@ -685,7 +685,7 @@ const $ = {
|
|
|
685
685
|
], 6))), 128))
|
|
686
686
|
], 512));
|
|
687
687
|
}
|
|
688
|
-
}), It = /* @__PURE__ */
|
|
688
|
+
}), It = /* @__PURE__ */ V(Mt, [["__scopeId", "data-v-f43eb7b8"]]);
|
|
689
689
|
function Pt(c, e, t, i, s) {
|
|
690
690
|
const r = (...o) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(c, o));
|
|
691
691
|
return r.prototype = e.prototype, r;
|
|
@@ -3426,7 +3426,9 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
|
|
|
3426
3426
|
s.value && (r = g.init({
|
|
3427
3427
|
column: t.gridSize.cols,
|
|
3428
3428
|
cellHeight: t.tileHeight,
|
|
3429
|
-
resizable: { handles: "
|
|
3429
|
+
resizable: { handles: "se" },
|
|
3430
|
+
lazyLoad: !0,
|
|
3431
|
+
handle: ".tile-header"
|
|
3430
3432
|
}, s.value), r.on("change", (o, n) => {
|
|
3431
3433
|
const l = t.tiles.map((h, d) => {
|
|
3432
3434
|
const u = n.find((f) => {
|
|
@@ -3470,16 +3472,16 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
|
|
|
3470
3472
|
"gs-x": l.layout.position.col,
|
|
3471
3473
|
"gs-y": l.layout.position.row
|
|
3472
3474
|
}, [
|
|
3473
|
-
|
|
3474
|
-
ne(o.$slots, "tile", { tile: l })
|
|
3475
|
+
Y("div", $t, [
|
|
3476
|
+
ne(o.$slots, "tile", { tile: l }, void 0, !0)
|
|
3475
3477
|
])
|
|
3476
3478
|
], 8, Ft))), 128))
|
|
3477
3479
|
], 512));
|
|
3478
3480
|
}
|
|
3479
|
-
}), Wt = { class: "kong-ui-public-dashboard-renderer" },
|
|
3481
|
+
}), Wt = /* @__PURE__ */ V(Gt, [["__scopeId", "data-v-2c11d103"]]), Kt = { class: "kong-ui-public-dashboard-renderer" }, Vt = {
|
|
3480
3482
|
key: 0,
|
|
3481
3483
|
class: "tile-container"
|
|
3482
|
-
},
|
|
3484
|
+
}, Yt = /* @__PURE__ */ M({
|
|
3483
3485
|
__name: "DashboardRenderer",
|
|
3484
3486
|
props: {
|
|
3485
3487
|
context: {},
|
|
@@ -3537,8 +3539,8 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
|
|
|
3537
3539
|
};
|
|
3538
3540
|
return e({ refresh: v }), (y, w) => {
|
|
3539
3541
|
const E = F("KAlert");
|
|
3540
|
-
return x(), A("div",
|
|
3541
|
-
C(n) ? (x(), T(ze(y.draggable ?
|
|
3542
|
+
return x(), A("div", Kt, [
|
|
3543
|
+
C(n) ? (x(), T(ze(y.draggable ? Wt : It), {
|
|
3542
3544
|
key: 1,
|
|
3543
3545
|
"grid-size": y.config.gridSize,
|
|
3544
3546
|
"tile-height": y.config.tileHeight,
|
|
@@ -3546,7 +3548,7 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
|
|
|
3546
3548
|
onUpdateTiles: b
|
|
3547
3549
|
}, {
|
|
3548
3550
|
tile: N(({ tile: D }) => [
|
|
3549
|
-
D.meta.chart.type === "slottable" ? (x(), A("div",
|
|
3551
|
+
D.meta.chart.type === "slottable" ? (x(), A("div", Vt, [
|
|
3550
3552
|
ne(y.$slots, D.meta.chart.id, {}, void 0, !0)
|
|
3551
3553
|
])) : (x(), T(Lt, {
|
|
3552
3554
|
key: 1,
|
|
@@ -3573,12 +3575,12 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
|
|
|
3573
3575
|
]);
|
|
3574
3576
|
};
|
|
3575
3577
|
}
|
|
3576
|
-
}),
|
|
3578
|
+
}), oi = /* @__PURE__ */ V(Yt, [["__scopeId", "data-v-921334ea"]]);
|
|
3577
3579
|
export {
|
|
3578
3580
|
gt as CP_ID_TOKEN,
|
|
3579
3581
|
ue as DEFAULT_TILE_HEIGHT,
|
|
3580
3582
|
mt as DEFAULT_TILE_REFRESH_INTERVAL_MS,
|
|
3581
|
-
|
|
3583
|
+
oi as DashboardRenderer,
|
|
3582
3584
|
_e as ENTITY_ID_TOKEN,
|
|
3583
3585
|
It as GridLayout,
|
|
3584
3586
|
J as INJECT_QUERY_PROVIDER,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(C,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("@kong-ui-public/analytics-utilities"),require("@kong-ui-public/analytics-chart"),require("swrv"),require("axios"),require("@kong-ui-public/i18n"),require("@kong-ui-public/analytics-metric-provider"),require("@kong-ui-public/entities-shared"),require("@kong/icons"),require("@kong-ui-public/analytics-config-store")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/analytics-utilities","@kong-ui-public/analytics-chart","swrv","axios","@kong-ui-public/i18n","@kong-ui-public/analytics-metric-provider","@kong-ui-public/entities-shared","@kong/icons","@kong-ui-public/analytics-config-store"],a):(C=typeof globalThis<"u"?globalThis:C||self,a(C["kong-ui-public-dashboard-renderer"]={},C.Vue,C["kong-ui-public-analytics-utilities"],C["kong-ui-public-analytics-chart"],C.swrv,C.axios,C["kong-ui-public-i18n"],C["kong-ui-public-analytics-metric-provider"],C["kong-ui-public-entities-shared"],C.KongIcons,C["kong-ui-public-analytics-config-store"]))})(this,function(C,a,L,$,be,et,te,ie,Ee,se,we){"use strict";var re=(f=>(f.VALIDATING="VALIDATING",f.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",f.PENDING="PENDING",f.SUCCESS="SUCCESS",f.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",f.ERROR="ERROR",f.STALE_IF_ERROR="STALE_IF_ERROR",f))(re||{});const ve=f=>{var e,t,i,s,r;return f?!!((e=Object.keys(f))!=null&&e.length||(t=f.data)!=null&&t.length||(s=(i=f.data)==null?void 0:i.data)!=null&&s.length||!((r=f.data)!=null&&r.data)&&typeof f.data=="object"&&Object.keys(f==null?void 0:f.data).length):!1};function xe(f=a.ref({}),e,t,i=ve){const s=a.ref("PENDING");return a.watchEffect(()=>{const r=i(f.value);if(f.value&&r&&t.value){s.value="VALIDATING_HAS_DATA";return}if(f.value&&t.value){s.value="VALIDATING";return}if(f.value&&e.value){s.value="STALE_IF_ERROR";return}if(f.value===void 0&&!e.value){s.value="PENDING";return}if(f.value&&!e.value&&r){s.value="SUCCESS_HAS_DATA";return}if(f.value&&!e.value){s.value="SUCCESS";return}f.value===void 0&&e&&(s.value="ERROR")}),{state:s,swrvState:re}}const Ce={renderer:{noQueryBridge:"No query bridge provided. Unable to render dashboard.",trendRange:{"24h":"Last 24-Hour Summary","7d":"Last 7-Day Summary","30d":"Last 30-Day Summary"},edit:"Edit"},queryDataProvider:{timeRangeExceeded:"The time range for this report is outside of your organization's data retention period"},csvExport:{defaultFilename:"Chart Export",exportAsCsv:"Export as CSV"},jumpToExplore:"Explore"};function Re(){const f=te.createI18n("en-us",Ce);return{i18n:f,i18nT:te.i18nTComponent(f)}}const G=170,I="analytics-query-provider",X="{entity-id}",ne="{cp-id}",oe="{timeframe}",ae=30*1e3;function ke(){const f=a.inject(I);return{evaluateFeatureFlag:(t,i)=>f?f.evaluateFeatureFlagFn(t,i):i}}const O={useI18n:Re,useEvaluateFeatureFlag:ke},Q=a.defineComponent({__name:"QueryDataProvider",props:{context:{},query:{},queryReady:{type:Boolean},refreshCounter:{}},emits:["chart-data","queryComplete"],setup(f,{emit:e}){const t=f,i=e,{i18n:s}=O.useI18n(),r=a.inject(I),o=()=>t.queryReady&&r?JSON.stringify([t.query,t.context,t.refreshCounter]):null,n=new AbortController;a.onUnmounted(()=>{n.abort()});const h=(v,x,k)=>{const D=[];return x&&D.push(...x),D.push(...L.stripUnknownFilters(v,k)),D},{data:d,error:c,isValidating:u}=be(o,async()=>{var v,x,k,D;try{let{datasource:R,...M}=t.query;R||(R="basic");const ee=h(R,t.query.filters,t.context.filters);let m=t.query.time_range;m?m.tz||(m={...m,tz:t.context.tz}):m={...t.context.timeSpec,tz:t.context.tz};const A={datasource:R,query:{...M,time_range:m,filters:ee}};return r==null?void 0:r.queryFn(A,n)}catch(R){E.value=((x=(v=R==null?void 0:R.response)==null?void 0:v.data)==null?void 0:x.message)==="Range not allowed for this tier"?s.t("queryDataProvider.timeRangeExceeded"):((D=(k=R==null?void 0:R.response)==null?void 0:k.data)==null?void 0:D.message)||(R==null?void 0:R.message)}finally{i("queryComplete")}},{refreshInterval:t.context.refreshInterval,revalidateOnFocus:!1}),{state:g,swrvState:b}=xe(d,c,u),E=a.ref(null),w=a.computed(()=>g.value===b.ERROR||!!E.value),_=a.computed(()=>!t.queryReady||g.value===b.PENDING);return a.watch(d,v=>{v&&i("chart-data",v)}),(v,x)=>{const k=a.resolveComponent("KSkeleton"),D=a.resolveComponent("KEmptyState");return _.value||!a.unref(d)&&!w.value?(a.openBlock(),a.createBlock(k,{key:0,class:"chart-skeleton",type:"table"})):w.value?(a.openBlock(),a.createBlock(D,{key:1,"action-button-visible":!1,"data-testid":"chart-empty-state","icon-variant":"error"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(E.value),1)]),_:1})):a.unref(d)?a.renderSlot(v.$slots,"default",{key:2,data:a.unref(d)}):a.createCommentVNode("",!0)}}}),De={class:"analytics-chart"},Te=a.defineComponent({__name:"SimpleChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){a.useCssVars(t=>({c40c0e86:`${t.height}px`}));const e=f;return(t,i)=>(a.openBlock(),a.createBlock(Q,{context:t.context,query:t.query,"query-ready":t.queryReady,"refresh-counter":t.refreshCounter},{default:a.withCtx(({data:s})=>[a.createElementVNode("div",De,[a.createVNode(a.unref($.SimpleChart),{"chart-data":s,"chart-options":e.chartOptions,"synthetics-data-key":t.chartOptions.syntheticsDataKey},null,8,["chart-data","chart-options","synthetics-data-key"])])]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),P=(f,e)=>{const t=f.__vccOpts||f;for(const[i,s]of e)t[i]=s;return t},Se=P(Te,[["__scopeId","data-v-694cf637"]]),ze={class:"analytics-chart"},le=P(a.defineComponent({__name:"BaseAnalyticsChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},extraProps:{}},emits:["edit-tile","chart-data"],setup(f,{emit:e}){const t=f,i=e,s=a.inject(I),{i18n:r}=O.useI18n(),{evaluateFeatureFlag:o}=O.useEvaluateFeatureFlag(),n=o("ma-3043-analytics-chart-kebab-menu",!1),h=a.computed(()=>({type:t.chartOptions.type,stacked:t.chartOptions.stacked??!1,chartDatasetColors:t.chartOptions.chartDatasetColors,threshold:t.chartOptions.threshold})),d=a.computed(()=>{if(s&&s.exploreBaseUrl){const g={filters:[...t.context.filters,...t.query.filters??[]],metrics:t.query.metrics??[],dimensions:t.query.dimensions??[],time_range:t.query.time_range||t.context.timeSpec},b=["advanced","ai"].includes(t.query.datasource)?t.query.datasource:"advanced";return`${s.exploreBaseUrl()}?q=${JSON.stringify(g)}&d=${b}&c=${t.chartOptions.type}`}return""}),c=()=>{i("edit-tile")},u=g=>{i("chart-data",g)};return(g,b)=>{const E=a.resolveComponent("KDropdownItem");return a.openBlock(),a.createBlock(Q,{context:g.context,query:g.query,"query-ready":g.queryReady,"refresh-counter":g.refreshCounter,onChartData:u},{default:a.withCtx(({data:w})=>[a.createElementVNode("div",ze,[a.createVNode(a.unref($.AnalyticsChart),a.mergeProps({"allow-csv-export":g.chartOptions.allowCsvExport,"chart-data":w,"chart-options":h.value,"chart-title":!a.unref(n)&&g.chartOptions.chartTitle||"","go-to-explore":d.value,"legend-position":"bottom","show-menu":g.context.editable,"synthetics-data-key":g.chartOptions.syntheticsDataKey,"tooltip-title":""},g.extraProps),a.createSlots({_:2},[g.context.editable?{name:"menu-items",fn:a.withCtx(()=>[a.createVNode(E,{onClick:c},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(r).t("renderer.edit")),1)]),_:1})]),key:"0"}:void 0]),1040,["allow-csv-export","chart-data","chart-options","chart-title","go-to-explore","show-menu","synthetics-data-key"])])]),_:1},8,["context","query","query-ready","refresh-counter"])}}}),[["__scopeId","data-v-1bc587d3"]]),he=a.defineComponent({__name:"BarChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){return(e,t)=>(a.openBlock(),a.createBlock(le,{"chart-options":e.chartOptions,context:e.context,"extra-props":{showAnnotations:!1},height:e.height,query:e.query,"query-ready":e.queryReady,"refresh-counter":e.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),de=a.defineComponent({__name:"TimeseriesChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){return(e,t)=>(a.openBlock(),a.createBlock(le,{"chart-options":e.chartOptions,context:e.context,height:e.height,query:e.query,"query-ready":e.queryReady,"refresh-counter":e.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),Ne={class:"metric-card-tile-wrapper"},He=P(a.defineComponent({__name:"GoldenSignalsRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){a.useCssVars(o=>({"926e3b48":a.unref(i)?"90%":"100%","7be2893e":a.unref(i)?"auto":"100%","0d55c162":a.unref(i)?"100%":"none"}));const e=f,{evaluateFeatureFlag:t}=O.useEvaluateFeatureFlag(),i=t("ma-3043-analytics-chart-kebab-menu",!1),s=a.computed(()=>{const o=e.context.timeSpec;if(o.type==="absolute")return new L.Timeframe({key:"custom",timeframeText:"custom",display:"custom",startCustom:o.start,endCustom:o.end,timeframeLength:()=>o.end.getTime()-o.start.getTime(),defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]});const n=L.TimePeriods.get(o.time_range);if(!n)throw new Error("Unknown time range");return n}),r=a.computed(()=>{var n,h;const o=(n=e.query)==null?void 0:n.datasource;if(o&&o!=="advanced"&&o!=="basic")throw new Error(`Invalid datasource value: ${o}`);return{datasource:(h=e.query)==null?void 0:h.datasource,overrideTimeframe:s.value,tz:e.context.tz,additionalFilter:e.context.filters,longCardTitles:e.chartOptions.longCardTitles,...!i&&{containerTitle:e.chartOptions.chartTitle},...!i&&{description:e.chartOptions.description},percentileLatency:e.chartOptions.percentileLatency,refreshInterval:e.context.refreshInterval,queryReady:e.queryReady,refreshCounter:e.refreshCounter}});return(o,n)=>(a.openBlock(),a.createElementBlock("div",Ne,[a.createVNode(a.unref(ie.MetricsProvider),a.normalizeProps(a.guardReactiveProps(r.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(ie.MetricsConsumer))]),_:1},16)]))}}),[["__scopeId","data-v-0f571079"]]),ce="#6c7489",ue="20px",fe="20px",Ae=a.defineComponent({__name:"TopNTableRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){const e=f,{evaluateFeatureFlag:t}=O.useEvaluateFeatureFlag(),i=t("ma-3043-analytics-chart-kebab-menu",!1),s=r=>{var o;if((o=e.chartOptions)!=null&&o.entityLink)if(r.id.includes(":")){const[n,h]=r.id.split(":");return e.chartOptions.entityLink.replace(ne,n).replace(X,h)}else return e.chartOptions.entityLink.replace(X,r.id);return""};return(r,o)=>(a.openBlock(),a.createBlock(Q,{context:r.context,query:r.query,"query-ready":r.queryReady,"refresh-counter":r.refreshCounter},{default:a.withCtx(({data:n})=>[a.createVNode(a.unref($.TopNTable),{data:n,description:!a.unref(i)&&r.chartOptions.description||"","synthetics-data-key":r.chartOptions.syntheticsDataKey,title:!a.unref(i)&&r.chartOptions.chartTitle||""},a.createSlots({_:2},[e.chartOptions.entityLink?{name:"name",fn:a.withCtx(({record:h})=>[a.createVNode(a.unref(Ee.EntityLink),{"entity-link-data":{id:h.id,label:h.name,deleted:h.deleted},"external-link":s(h)},null,8,["entity-link-data","external-link"])]),key:"0"}:void 0]),1032,["data","description","synthetics-data-key","title"])]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),Le=["data-testid"],Oe={key:0,class:"tile-header"},Me=["data-testid"],Be=["data-testid"],Ie=["data-testid"],Pe=["data-testid"],qe=P(a.defineComponent({__name:"DashboardTile",props:{definition:{},context:{},height:{default:G},queryReady:{type:Boolean},refreshCounter:{},tileId:{}},emits:["edit-tile"],setup(f,{emit:e}){a.useCssVars(m=>({"35d14b98":`${m.height}px`}));const t=parseInt(fe,10),i=f,s=e,r=a.inject(I),{evaluateFeatureFlag:o}=O.useEvaluateFeatureFlag(),{i18n:n}=O.useI18n(),h=o("ma-3043-analytics-chart-kebab-menu",!1),d=a.ref(),c=a.ref(!1),u=a.ref(),g=a.ref(!1);a.watch(()=>i.definition,async()=>{await a.nextTick(),u.value&&(g.value=u.value.scrollWidth>u.value.clientWidth)},{immediate:!0,deep:!0});const b=a.computed(()=>{if(r&&r.exploreBaseUrl){const m={filters:[...i.context.filters,...i.definition.query.filters??[]],metrics:i.definition.query.metrics??[],dimensions:i.definition.query.dimensions??[],time_range:i.definition.query.time_range||i.context.timeSpec,granularity:i.definition.query.granularity||k.value},A=["advanced","ai"].includes(i.definition.query.datasource)?i.definition.query.datasource:"advanced";return`${r.exploreBaseUrl()}?q=${JSON.stringify(m)}&d=${A}&c=${i.definition.chart.type}`}return""}),E=a.computed(()=>n.t("csvExport.defaultFilename")),w=a.computed(()=>h&&!["golden_signals","top_n","gauge"].includes(i.definition.chart.type)),_={timeseries_line:de,timeseries_bar:de,horizontal_bar:he,vertical_bar:he,gauge:Se,golden_signals:He,top_n:Ae,slottable:void 0},v=a.computed(()=>{const m=_[i.definition.chart.type];return m&&{component:m,rendererProps:{query:i.definition.query,context:i.context,queryReady:i.queryReady,chartOptions:i.definition.chart,height:i.height-t*2,refreshCounter:i.refreshCounter}}}),x=a.computed(()=>{var A;const m=(A=i.definition.query)==null?void 0:A.time_range;if((m==null?void 0:m.type)==="relative"){const B=L.TimePeriods.get(L.TIMEFRAME_LOOKUP[m.time_range]);return B?B.display:(console.warn("Did not recognize the given relative time range:",m.time_range),m.time_range)}else if((m==null?void 0:m.type)==="absolute"){const B=m.tz||"Etc/UTC";return`${L.formatTime(m.start,{short:!0,tz:B})} - ${L.formatTime(m.end,{short:!0,tz:B})}`}return null}),k=a.computed(()=>d.value?L.msToGranularity(d.value.meta.granularity_ms):void 0),D=()=>{s("edit-tile",i.definition)},R=m=>{d.value=m},M=m=>{c.value=m},ee=()=>{M(!0)};return(m,A)=>{const B=a.resolveComponent("KTooltip"),Je=a.resolveComponent("KBadge"),_e=a.resolveComponent("KDropdownItem"),Ze=a.resolveComponent("KDropdown");return a.openBlock(),a.createElementBlock("div",{class:"tile-boundary","data-testid":`tile-${m.tileId}`},[a.unref(h)&&m.definition.chart.type!=="slottable"?(a.openBlock(),a.createElementBlock("div",Oe,[a.createVNode(B,{class:"title-tooltip",disabled:!g.value,"max-width":"500",text:m.definition.chart.chartTitle},{default:a.withCtx(()=>[a.createElementVNode("div",{ref_key:"titleRef",ref:u,class:"title"},a.toDisplayString(m.definition.chart.chartTitle),513)]),_:1},8,["disabled","text"]),w.value||x.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"tile-actions","data-testid":`tile-actions-${m.tileId}`},[x.value?(a.openBlock(),a.createBlock(Je,{key:0},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(x.value),1)]),_:1})):a.createCommentVNode("",!0),w.value&&m.context.editable?(a.openBlock(),a.createBlock(a.unref(se.EditIcon),{key:1,class:"edit-icon",color:a.unref(ce),"data-testid":`edit-tile-${m.tileId}`,size:a.unref(ue),onClick:D},null,8,["color","data-testid","size"])):a.createCommentVNode("",!0),w.value?(a.openBlock(),a.createBlock(Ze,{key:2,class:"dropdown","data-testid":`chart-action-menu-${m.tileId}`,"kpop-attributes":{placement:"bottom-end"}},{items:a.withCtx(()=>[b.value?(a.openBlock(),a.createBlock(_e,{key:0,"data-testid":`chart-jump-to-explore-${m.tileId}`,item:{label:a.unref(n).t("jumpToExplore"),to:b.value}},null,8,["data-testid","item"])):a.createCommentVNode("",!0),"allowCsvExport"in m.definition.chart&&m.definition.chart.allowCsvExport?(a.openBlock(),a.createBlock(_e,{key:1,class:"chart-export-button","data-testid":`chart-csv-export-${m.tileId}`,onClick:A[0]||(A[0]=dt=>ee())},{default:a.withCtx(()=>[a.createElementVNode("span",{class:"chart-export-trigger","data-testid":`csv-export-button-${m.tileId}`},a.toDisplayString(a.unref(n).t("csvExport.exportAsCsv")),9,Be)]),_:1},8,["data-testid"])):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[a.createVNode(a.unref(se.MoreIcon),{class:"kebab-action-menu",color:a.unref(ce),"data-testid":`kebab-action-menu-${m.tileId}`,size:a.unref(ue)},null,8,["color","data-testid","size"])]),_:1},8,["data-testid"])):a.createCommentVNode("",!0)],8,Me)):"description"in m.definition.chart?(a.openBlock(),a.createElementBlock("div",{key:1,class:"header-description","data-testid":`tile-description-${m.tileId}`},a.toDisplayString(m.definition.chart.description),9,Ie)):a.createCommentVNode("",!0),c.value?(a.openBlock(),a.createBlock(a.unref($.CsvExportModal),{key:2,"chart-data":d.value,"data-testid":`csv-export-modal-${m.tileId}`,filename:E.value,onToggleModal:M},null,8,["chart-data","data-testid","filename"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"tile-content","data-testid":`tile-content-${m.tileId}`},[v.value?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(v.value.component),a.mergeProps({key:0},v.value.rendererProps,{onChartData:R}),null,16)):a.createCommentVNode("",!0)],8,Pe)],8,Le)}}}),[["__scopeId","data-v-ff00dcd4"]]),Fe=(f,e,t)=>{const i=new Map;t.forEach(r=>{const o=r.layout.position.row,n=i.get(o),h=r.layout.size.rows===1&&!!r.layout.size.fitToContent;n===void 0?i.set(o,h):i.set(o,n&&h)});const s=[];for(let r=0;r<f;r++)i.get(r)?s.push("auto"):s.push(`${e}px`);return s},ge=P(a.defineComponent({__name:"GridLayout",props:{gridSize:{type:Object,required:!0},tileHeight:{type:Number,required:!1,default:()=>G},tiles:{type:Array,required:!0}},setup(f){a.useCssVars(n=>({"3bc5e939":f.gridSize.cols,"77aa3028":r.value}));const e=f,t=a.ref(null),i=a.ref(0),s=new ResizeObserver(n=>{window.requestAnimationFrame(()=>{!Array.isArray(n)||!n.length||(i.value=n[0].contentRect.width)})});a.onMounted(()=>{t.value&&s.observe(t.value)}),a.onUnmounted(()=>{t.value&&s.unobserve(t.value)});const r=a.computed(()=>{var h;return Fe((h=e.gridSize)==null?void 0:h.rows,e.tileHeight,e.tiles).join(" ")}),o=a.computed(()=>e.tiles.map((n,h)=>({key:`tile-${h}`,tile:n,style:{"grid-column-start":n.layout.position.col+1,"grid-column-end":n.layout.position.col+1+n.layout.size.cols,"grid-row-start":n.layout.position.row+1,"grid-row-end":n.layout.position.row+1+n.layout.size.rows}})));return(n,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"gridContainer",ref:t,class:"kong-ui-public-grid-layout"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.value,d=>(a.openBlock(),a.createElementBlock("div",{key:d.key,class:a.normalizeClass(["grid-cell",{"empty-cell":!d.tile}]),style:a.normalizeStyle(d.style)},[a.renderSlot(n.$slots,"tile",{style:a.normalizeStyle(d.style),tile:d.tile},void 0,!0)],6))),128))],512))}}),[["__scopeId","data-v-f43eb7b8"]]);function $e(f,e,t,i,s){const r=(...o)=>(console.warn("gridstack.js: Function `"+t+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"),e.apply(f,o));return r.prototype=e.prototype,r}class l{static getElements(e,t=document){if(typeof e=="string"){const i="getElementById"in t?t:void 0;if(i&&!isNaN(+e[0])){const r=i.getElementById(e);return r?[r]:[]}let s=t.querySelectorAll(e);return!s.length&&e[0]!=="."&&e[0]!=="#"&&(s=t.querySelectorAll("."+e),s.length||(s=t.querySelectorAll("#"+e))),Array.from(s)}return[e]}static getElement(e,t=document){if(typeof e=="string"){const i="getElementById"in t?t:void 0;if(!e.length)return null;if(i&&e[0]==="#")return i.getElementById(e.substring(1));if(e[0]==="#"||e[0]==="."||e[0]==="[")return t.querySelector(e);if(i&&!isNaN(+e[0]))return i.getElementById(e);let s=t.querySelector(e);return i&&!s&&(s=i.getElementById(e)),s||(s=t.querySelector("."+e)),s}return e}static createWidgetDivs(e,t){var o,n;const i=l.createDiv(["grid-stack-item",e]),s=l.createDiv(["grid-stack-item-content"],i);return t.lazyLoad||((n=(o=t.grid)==null?void 0:o.opts)==null?void 0:n.lazyLoad)&&t.lazyLoad!==!1?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([h])=>{var d;h.isIntersecting&&((d=t.visibleObservable)==null||d.disconnect(),delete t.visibleObservable,p.renderCB(s,t))}),window.setTimeout(()=>{var h;return(h=t.visibleObservable)==null?void 0:h.observe(i)})):p.renderCB(s,t),i}static createDiv(e,t){const i=document.createElement("div");return e.forEach(s=>{s&&i.classList.add(s)}),t==null||t.appendChild(i),i}static shouldSizeToContent(e,t=!1){return(e==null?void 0:e.grid)&&(t?e.sizeToContent===!0||e.grid.opts.sizeToContent===!0&&e.sizeToContent===void 0:!!e.sizeToContent||e.grid.opts.sizeToContent&&e.sizeToContent!==!1)}static isIntercepted(e,t){return!(e.y>=t.y+t.h||e.y+e.h<=t.y||e.x+e.w<=t.x||e.x>=t.x+t.w)}static isTouching(e,t){return l.isIntercepted(e,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(e,t){const i=e.x>t.x?e.x:t.x,s=e.x+e.w<t.x+t.w?e.x+e.w:t.x+t.w;if(s<=i)return 0;const r=e.y>t.y?e.y:t.y,o=e.y+e.h<t.y+t.h?e.y+e.h:t.y+t.h;return o<=r?0:(s-i)*(o-r)}static area(e){return e.w*e.h}static sort(e,t=1){return e.sort((s,r)=>{const o=t*((s.y??1e4)-(r.y??1e4));return o===0?t*((s.x??1e4)-(r.x??1e4)):o})}static find(e,t){return t?e.find(i=>i.id===t):void 0}static createStylesheet(e,t,i){const s=document.createElement("style"),r=i==null?void 0:i.nonce;return r&&(s.nonce=r),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",e),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),t?t.insertBefore(s,t.firstChild):(t=document.getElementsByTagName("head")[0],t.appendChild(s)),s}static removeStylesheet(e,t){const s=(t||document).querySelector("STYLE[gs-style-id="+e+"]");s&&s.parentNode&&s.remove()}static addCSSRule(e,t,i){e.textContent+=`${t} { ${i} } `}static toBool(e){return typeof e=="boolean"?e:typeof e=="string"?(e=e.toLowerCase(),!(e===""||e==="no"||e==="false"||e==="0")):!!e}static toNumber(e){return e===null||e.length===0?void 0:Number(e)}static parseHeight(e){let t,i="px";if(typeof e=="string")if(e==="auto"||e==="")t=0;else{const s=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!s)throw new Error(`Invalid height val = ${e}`);i=s[2]||"px",t=parseFloat(s[1])}else t=e;return{h:t,unit:i}}static defaults(e,...t){return t.forEach(i=>{for(const s in i){if(!i.hasOwnProperty(s))return;e[s]===null||e[s]===void 0?e[s]=i[s]:typeof i[s]=="object"&&typeof e[s]=="object"&&this.defaults(e[s],i[s])}}),e}static same(e,t){if(typeof e!="object")return e==t;if(typeof e!=typeof t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}static copyPos(e,t,i=!1){return t.x!==void 0&&(e.x=t.x),t.y!==void 0&&(e.y=t.y),t.w!==void 0&&(e.w=t.w),t.h!==void 0&&(e.h=t.h),i&&(t.minW&&(e.minW=t.minW),t.minH&&(e.minH=t.minH),t.maxW&&(e.maxW=t.maxW),t.maxH&&(e.maxH=t.maxH)),e}static samePos(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&(e.w||1)===(t.w||1)&&(e.h||1)===(t.h||1)}static sanitizeMinMax(e){e.minW||delete e.minW,e.minH||delete e.minH,e.maxW||delete e.maxW,e.maxH||delete e.maxH}static removeInternalAndSame(e,t){if(!(typeof e!="object"||typeof t!="object"))for(let i in e){const s=e[i],r=t[i];i[0]==="_"||s===r?delete e[i]:s&&typeof s=="object"&&r!==void 0&&(l.removeInternalAndSame(s,r),Object.keys(s).length||delete e[i])}}static removeInternalForSave(e,t=!0){for(let i in e)(i[0]==="_"||e[i]===null||e[i]===void 0)&&delete e[i];delete e.grid,t&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,(e.w===1||e.w===e.minW)&&delete e.w,(e.h===1||e.h===e.minH)&&delete e.h}static throttle(e,t){let i=!1;return(...s)=>{i||(i=!0,setTimeout(()=>{e(...s),i=!1},t))}}static removePositioningStyles(e){const t=e.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowY)?e:this.getScrollElement(e.parentElement)}static updateScrollPosition(e,t,i){const s=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>r){const o=s.bottom-r,n=s.top,h=this.getScrollElement(e);if(h!==null){const d=h.scrollTop;s.top<0&&i<0?e.offsetHeight>r?h.scrollTop+=i:h.scrollTop+=Math.abs(n)>Math.abs(i)?i:n:i>0&&(e.offsetHeight>r?h.scrollTop+=i:h.scrollTop+=o>i?i:o),t.top+=h.scrollTop-d}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),r=s.clientHeight,o=s===this.getScrollElement()?0:s.getBoundingClientRect().top,n=e.clientY-o,h=n<i,d=n>r-i;h?s.scrollBy({behavior:"smooth",top:n-i}):d&&s.scrollBy({behavior:"smooth",top:i-(r-n)})}static clone(e){return e==null||typeof e!="object"?e:e instanceof Array?[...e]:{...e}}static cloneDeep(e){const t=["parentGrid","el","grid","subGrid","engine"],i=l.clone(e);for(const s in i)i.hasOwnProperty(s)&&typeof i[s]=="object"&&s.substring(0,2)!=="__"&&!t.find(r=>r===s)&&(i[s]=l.cloneDeep(e[s]));return i}static cloneNode(e){const t=e.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(e,t){let i;typeof t=="string"?i=l.getElement(t):i=t,i&&i.appendChild(e)}static addElStyles(e,t){if(t instanceof Object)for(const i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach(s=>{e.style[i]=s}):e.style[i]=t[i])}static initEvent(e,t){const i={type:t.type},s={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:e.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(r=>i[r]=e[r]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(r=>i[r]=e[r]),{...i,...s}}static simulateMouseEvent(e,t,i){const s=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,e.target),(i||e.target).dispatchEvent(s)}static getValuesFromTransformedElement(e){const t=document.createElement("div");l.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),e.appendChild(t);const i=t.getBoundingClientRect();return e.removeChild(t),t.remove(),{xScale:1/i.width,yScale:1/i.height,xOffset:i.left,yOffset:i.top}}static swap(e,t,i){if(!e)return;const s=e[t];e[t]=e[i],e[i]=s}static canBeRotated(e){var t;return!(!e||e.w===e.h||e.locked||e.noResize||(t=e.grid)!=null&&t.opts.disableResize||e.minW&&e.minW===e.maxW||e.minH&&e.minH===e.maxH)}}class N{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=e.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0,t=!0){return!!this.batchMode===e?this:(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify()),this)}_useEntireRowArea(e,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||t.y<=e.y)}_fixCollisions(e,t=e,i,s={}){if(this.sortNodes(-1),i=i||this.collide(e,t),!i)return!1;if(e._moving&&!s.nested&&!this.float&&this.swap(e,i))return!0;let r=t;!this._loading&&this._useEntireRowArea(e,t)&&(r={x:0,w:this.column,y:t.y,h:t.h},i=this.collide(e,r,s.skip));let o=!1;const n={nested:!0,pack:!1};let h=0;for(;i=i||this.collide(e,r,s.skip);){if(h++>this.nodes.length*2)throw new Error("Infinite collide check");let d;if(i.locked||this._loading||e._moving&&!e._skipDown&&t.y>e.y&&!this.float&&(!this.collide(i,{...i,y:e.y},e)||!this.collide(i,{...i,y:t.y-i.h},e))){e._skipDown=e._skipDown||t.y>e.y;const c={...t,y:i.y+i.h,...n};d=this._loading&&l.samePos(e,c)?!0:this.moveNode(e,c),(i.locked||this._loading)&&d?l.copyPos(t,e):!i.locked&&d&&s.pack&&(this._packNodes(),t.y=i.y+i.h,l.copyPos(e,t)),o=o||d}else d=this.moveNode(i,{...i,y:t.y+t.h,skip:e,...n});if(!d)return o;i=void 0}return o}collide(e,t=e,i){const s=e._id,r=i==null?void 0:i._id;return this.nodes.find(o=>o._id!==s&&o._id!==r&&l.isIntercepted(o,t))}collideAll(e,t=e,i){const s=e._id,r=i==null?void 0:i._id;return this.nodes.filter(o=>o._id!==s&&o._id!==r&&l.isIntercepted(o,t))}directionCollideCoverage(e,t,i){if(!t.rect||!e._rect)return;const s=e._rect,r={...t.rect};r.y>s.y?(r.h+=r.y-s.y,r.y=s.y):r.h+=s.y-r.y,r.x>s.x?(r.w+=r.x-s.x,r.x=s.x):r.w+=s.x-r.x;let o,n=.5;for(let h of i){if(h.locked||!h._rect)break;const d=h._rect;let c=Number.MAX_VALUE,u=Number.MAX_VALUE;s.y<d.y?c=(r.y+r.h-d.y)/d.h:s.y+s.h>d.y+d.h&&(c=(d.y+d.h-r.y)/d.h),s.x<d.x?u=(r.x+r.w-d.x)/d.w:s.x+s.w>d.x+d.w&&(u=(d.x+d.w-r.x)/d.w);const g=Math.min(u,c);g>n&&(n=g,o=h)}return t.collide=o,o}cacheRects(e,t,i,s,r,o){return this.nodes.forEach(n=>n._rect={y:n.y*t+i,x:n.x*e+o,w:n.w*e-o-s,h:n.h*t-i-r}),this}swap(e,t){if(!t||t.locked||!e||e.locked)return!1;function i(){const r=t.x,o=t.y;return t.x=e.x,t.y=e.y,e.h!=t.h?(e.x=r,e.y=t.y+t.h):e.w!=t.w?(e.x=t.x+t.w,e.y=o):(e.x=r,e.y=o),e._dirty=t._dirty=!0,!0}let s;if(e.w===t.w&&e.h===t.h&&(e.x===t.x||e.y===t.y)&&(s=l.isTouching(e,t)))return i();if(s!==!1){if(e.w===t.w&&e.x===t.x&&(s||(s=l.isTouching(e,t)))){if(t.y<e.y){const r=e;e=t,t=r}return i()}if(s!==!1){if(e.h===t.h&&e.y===t.y&&(s||(s=l.isTouching(e,t)))){if(t.x<e.x){const r=e;e=t,t=r}return i()}return!1}}}isAreaEmpty(e,t,i,s){const r={x:e||0,y:t||0,w:i||1,h:s||1};return!this.collide(r)}compact(e="compact",t=!0){if(this.nodes.length===0)return this;t&&this.sortNodes();const i=this.batchMode;i||this.batchUpdate();const s=this._inColumnResize;s||(this._inColumnResize=!0);const r=this.nodes;return this.nodes=[],r.forEach((o,n,h)=>{let d;o.locked||(o.autoPosition=!0,e==="list"&&n&&(d=h[n-1])),this.addNode(o,!1,d)}),s||delete this._inColumnResize,i||this.batchUpdate(!1),this}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e=1){return this.nodes=l.sort(this.nodes,e),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(e=>{if(e._updating||e._orig===void 0||e.y===e._orig.y)return;let t=e.y;for(;t>e._orig.y;)--t,this.collide(e,{x:e.x,y:t,w:e.w,h:e.h})||(e._dirty=!0,e.y=t)}):this.nodes.forEach((e,t)=>{if(!e.locked)for(;e.y>0;){const i=t===0?0:e.y-1;if(!(t===0||!this.collide(e,{x:e.x,y:i,w:e.w,h:e.h})))break;e._dirty=e.y!==i,e.y=i}}),this)}prepareNode(e,t){e._id=e._id??N._idSeq++;const i=e.id;if(i){let r=1;for(;this.nodes.find(o=>o.id===e.id&&o!==e);)e.id=i+"_"+r++}(e.x===void 0||e.y===void 0||e.x===null||e.y===null)&&(e.autoPosition=!0);const s={x:0,y:0,w:1,h:1};return l.defaults(e,s),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,l.sanitizeMinMax(e),typeof e.x=="string"&&(e.x=Number(e.x)),typeof e.y=="string"&&(e.y=Number(e.y)),typeof e.w=="string"&&(e.w=Number(e.w)),typeof e.h=="string"&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=s.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=s.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=s.w),isNaN(e.h)&&(e.h=s.h),this.nodeBoundFix(e,t),e}nodeBoundFix(e,t){const i=e._orig||l.copyPos({},e);if(e.maxW&&e.w&&(e.w=Math.min(e.w,e.maxW)),e.maxH&&e.h&&(e.h=Math.min(e.h,e.maxH)),e.minW&&e.w&&e.minW<=this.column&&(e.w=Math.max(e.w,e.minW)),e.minH&&e.h&&(e.h=Math.max(e.h,e.minH)),(e.x||0)+(e.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&e._id&&this.findCacheLayout(e,this.defaultColumn)===-1){const r={...e};r.autoPosition||r.x===void 0?(delete r.x,delete r.y):r.x=Math.min(this.defaultColumn-1,r.x),r.w=Math.min(this.defaultColumn,r.w||1),this.cacheOneLayout(r,this.defaultColumn)}return e.w>this.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(t?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(t?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),l.samePos(e,i)||(e._dirty=!0),this}getDirtyNodes(e){return e?this.nodes.filter(t=>t._dirty&&!l.samePos(t,t._orig)):this.nodes.filter(t=>t._dirty)}_notify(e){if(this.batchMode||!this.onChange)return this;const t=(e||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(e=>{delete e._dirty,delete e._lastTried}),this)}saveInitial(){return this.nodes.forEach(e=>{e._orig=l.copyPos({},e),delete e._dirty}),this._hasLocked=this.nodes.some(e=>e.locked),this}restoreInitial(){return this.nodes.forEach(e=>{!e._orig||l.samePos(e,e._orig)||(l.copyPos(e,e._orig),e._dirty=!0)}),this._notify(),this}findEmptyPosition(e,t=this.nodes,i=this.column,s){const r=s?s.y*i+(s.x+s.w):0;let o=!1;for(let n=r;!o;++n){const h=n%i,d=Math.floor(n/i);if(h+e.w>i)continue;const c={x:h,y:d,w:e.w,h:e.h};t.find(u=>l.isIntercepted(c,u))||((e.x!==h||e.y!==d)&&(e._dirty=!0),e.x=h,e.y=d,delete e.autoPosition,o=!0)}return o}addNode(e,t=!1,i){const s=this.nodes.find(o=>o._id===e._id);if(s)return s;this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e),delete e._temporaryRemoved,delete e._removeDOM;let r;return e.autoPosition&&this.findEmptyPosition(e,this.nodes,this.column,i)&&(delete e.autoPosition,r=!0),this.nodes.push(e),t&&this.addedNodes.push(e),r||this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e}removeNode(e,t=!0,i=!1){return this.nodes.find(s=>s._id===e._id)?(i&&this.removedNodes.push(e),t&&(e._removeDOM=!0),this.nodes=this.nodes.filter(s=>s._id!==e._id),e._isAboutToRemove||this._packNodes(),this._notify([e]),this):this}removeAll(e=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;e&&this.nodes.forEach(s=>s._removeDOM=!0);const i=this.nodes;return this.removedNodes=t?i:[],this.nodes=[],this._notify(i)}moveNodeCheck(e,t){if(!this.changedPosConstrain(e,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(e,t);let i;const s=new N({column:this.column,float:this.float,nodes:this.nodes.map(o=>o._id===e._id?(i={...o},i):{...o})});if(!i)return!1;const r=s.moveNode(i,t)&&s.getRow()<=Math.max(this.getRow(),this.maxRow);if(!r&&!t.resizing&&t.collide){const o=t.collide.el.gridstackNode;if(this.swap(e,o))return this._notify(),!0}return r?(s.nodes.filter(o=>o._dirty).forEach(o=>{const n=this.nodes.find(h=>h._id===o._id);n&&(l.copyPos(n,o),n._dirty=!0)}),this._notify(),!0):!1}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;const t=new N({column:this.column,float:this.float,nodes:this.nodes.map(s=>({...s}))}),i={...e};return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,t.addNode(i),t.getRow()<=this.maxRow?(e._willFitPos=l.copyPos({},i),!0):!1}changedPosConstrain(e,t){return t.w=t.w||e.w,t.h=t.h||e.h,e.x!==t.x||e.y!==t.y?!0:(e.maxW&&(t.w=Math.min(t.w,e.maxW)),e.maxH&&(t.h=Math.min(t.h,e.maxH)),e.minW&&(t.w=Math.max(t.w,e.minW)),e.minH&&(t.h=Math.max(t.h,e.minH)),e.w!==t.w||e.h!==t.h)}moveNode(e,t){var d,c;if(!e||!t)return!1;let i;t.pack===void 0&&!this.batchMode&&(i=t.pack=!0),typeof t.x!="number"&&(t.x=e.x),typeof t.y!="number"&&(t.y=e.y),typeof t.w!="number"&&(t.w=e.w),typeof t.h!="number"&&(t.h=e.h);const s=e.w!==t.w||e.h!==t.h,r=l.copyPos({},e,!0);if(l.copyPos(r,t),this.nodeBoundFix(r,s),l.copyPos(t,r),!t.forceCollide&&l.samePos(e,t))return!1;const o=l.copyPos({},e),n=this.collideAll(e,r,t.skip);let h=!0;if(n.length){const u=e._moving&&!t.nested;let g=u?this.directionCollideCoverage(e,t,n):n[0];if(u&&g&&((c=(d=e.grid)==null?void 0:d.opts)!=null&&c.subGridDynamic)&&!e.grid._isTemp){const b=l.areaIntercept(t.rect,g._rect),E=l.area(t.rect),w=l.area(g._rect);b/(E<w?E:w)>.8&&(g.grid.makeSubGrid(g.el,void 0,e),g=void 0)}g?h=!this._fixCollisions(e,r,g,t):(h=!1,i&&delete t.pack)}return h&&!l.samePos(e,r)&&(e._dirty=!0,l.copyPos(e,r)),t.pack&&this._packNodes()._notify(),!l.samePos(e,o)}getRow(){return this.nodes.reduce((e,t)=>Math.max(e,t.y+t.h),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const e=this.nodes.find(t=>t._updating);return e&&(delete e._updating,delete e._skipDown),this}save(e=!0,t){var o;const i=(o=this._layouts)==null?void 0:o.length,s=i&&this.column!==i-1?this._layouts[i-1]:null,r=[];return this.sortNodes(),this.nodes.forEach(n=>{const h=s==null?void 0:s.find(c=>c._id===n._id),d={...n,...h||{}};l.removeInternalForSave(d,!e),t&&t(n,d),r.push(d)}),r}layoutsNodesChange(e){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((t,i)=>{if(!t||i===this.column)return this;if(i<this.column)this._layouts[i]=void 0;else{const s=i/this.column;e.forEach(r=>{if(!r._orig)return;const o=t.find(n=>n._id===r._id);o&&(o.y>=0&&r.y!==r._orig.y&&(o.y+=r.y-r._orig.y),r.x!==r._orig.x&&(o.x=Math.round(r.x*s)),r.w!==r._orig.w&&(o.w=Math.round(r.w*s)))})}}),this)}columnChanged(e,t,i="moveScale"){var n;if(!this.nodes.length||!t||e===t)return this;const s=i==="compact"||i==="list";s&&this.sortNodes(1),t<e&&this.cacheLayout(this.nodes,e),this.batchUpdate();let r=[],o=s?this.nodes:l.sort(this.nodes,-1);if(t>e&&this._layouts){const h=this._layouts[t]||[],d=this._layouts.length-1;!h.length&&e!==d&&((n=this._layouts[d])!=null&&n.length)&&(e=d,this._layouts[d].forEach(c=>{const u=o.find(g=>g._id===c._id);u&&(!s&&!c.autoPosition&&(u.x=c.x??u.x,u.y=c.y??u.y),u.w=c.w??u.w,(c.x==null||c.y===void 0)&&(u.autoPosition=!0))})),h.forEach(c=>{const u=o.findIndex(g=>g._id===c._id);if(u!==-1){const g=o[u];if(s){g.w=c.w;return}(c.autoPosition||isNaN(c.x)||isNaN(c.y))&&this.findEmptyPosition(c,r),c.autoPosition||(g.x=c.x??g.x,g.y=c.y??g.y,g.w=c.w??g.w,r.push(g)),o.splice(u,1)}})}if(s)this.compact(i,!1);else{if(o.length)if(typeof i=="function")i(t,e,r,o);else{const h=s||i==="none"?1:t/e,d=i==="move"||i==="moveScale",c=i==="scale"||i==="moveScale";o.forEach(u=>{u.x=t===1?0:d?Math.round(u.x*h):Math.min(u.x,t-1),u.w=t===1||e===1?1:c?Math.round(u.w*h)||1:Math.min(u.w,t),r.push(u)}),o=[]}r=l.sort(r,-1),this._inColumnResize=!0,this.nodes=[],r.forEach(h=>{this.addNode(h,!1),delete h._orig})}return this.nodes.forEach(h=>delete h._orig),this.batchUpdate(!1,!s),delete this._inColumnResize,this}cacheLayout(e,t,i=!1){const s=[];return e.forEach((r,o)=>{if(r._id===void 0){const n=r.id?this.nodes.find(h=>h.id===r.id):void 0;r._id=(n==null?void 0:n._id)??N._idSeq++}s[o]={x:r.x,y:r.y,w:r.w,_id:r._id}}),this._layouts=i?[]:this._layouts||[],this._layouts[t]=s,this}cacheOneLayout(e,t){e._id=e._id??N._idSeq++;const i={x:e.x,y:e.y,w:e.w,_id:e._id};(e.autoPosition||e.x===void 0)&&(delete i.x,delete i.y,e.autoPosition&&(i.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const s=this.findCacheLayout(e,t);return s===-1?this._layouts[t].push(i):this._layouts[t][s]=i,this}findCacheLayout(e,t){var i,s;return((s=(i=this._layouts)==null?void 0:i[t])==null?void 0:s.findIndex(r=>r._id===e._id))??-1}removeNodeFromLayoutCache(e){if(this._layouts)for(let t=0;t<this._layouts.length;t++){const i=this.findCacheLayout(e,t);i!==-1&&this._layouts[t].splice(i,1)}}cleanupNode(e){for(const t in e)t[0]==="_"&&t!=="_id"&&delete e[t];return this}}N._idSeq=0;const S={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};class y{}const z=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class H{}function U(f,e){if(f.touches.length>1)return;f.cancelable&&f.preventDefault();const t=f.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(i)}function pe(f,e){f.cancelable&&f.preventDefault();const t=document.createEvent("MouseEvents");t.initMouseEvent(e,!0,!0,window,1,f.screenX,f.screenY,f.clientX,f.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(t)}function W(f){H.touchHandled||(H.touchHandled=!0,U(f,"mousedown"))}function V(f){H.touchHandled&&U(f,"mousemove")}function K(f){if(!H.touchHandled)return;H.pointerLeaveTimeout&&(window.clearTimeout(H.pointerLeaveTimeout),delete H.pointerLeaveTimeout);const e=!!y.dragElement;U(f,"mouseup"),e||U(f,"click"),H.touchHandled=!1}function Y(f){f.pointerType!=="mouse"&&f.target.releasePointerCapture(f.pointerId)}function me(f){y.dragElement&&f.pointerType!=="mouse"&&pe(f,"mouseenter")}function ye(f){y.dragElement&&f.pointerType!=="mouse"&&(H.pointerLeaveTimeout=window.setTimeout(()=>{delete H.pointerLeaveTimeout,pe(f,"mouseleave")},10))}class j{constructor(e,t,i){this.host=e,this.dir=t,this.option=i,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){const e=this.el=document.createElement("div");return e.classList.add("ui-resizable-handle"),e.classList.add(`${j.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),z&&(this.el.addEventListener("touchstart",W),this.el.addEventListener("pointerdown",Y)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),z&&(this.el.removeEventListener("touchstart",W),this.el.removeEventListener("pointerdown",Y)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),z&&(this.el.addEventListener("touchmove",V),this.el.addEventListener("touchend",K)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e),document.addEventListener("keydown",this._keyEvent)),e.stopPropagation()}_mouseUp(e){this.moving&&(this._triggerEvent("stop",e),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),z&&(this.el.removeEventListener("touchmove",V),this.el.removeEventListener("touchend",K)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_keyEvent(e){var t,i;e.key==="Escape"&&((i=(t=this.host.gridstackNode)==null?void 0:t.grid)==null||i.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(e,t){return this.option[e]&&this.option[e](t),this}}j.prefix="ui-resizable-";class J{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](t)}}class q extends J{constructor(e,t={}){super(),this.el=e,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const s=this.el.parentElement.getBoundingClientRect(),r={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=this.temporalRect||r;return{position:{left:(o.left-s.left)*this.rectScale.x,top:(o.top-s.top)*this.rectScale.y},size:{width:o.width*this.rectScale.x,height:o.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(e){const t=e.handles&&e.handles!==this.option.handles,i=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach(s=>this.option[s]=e[s]),t&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),y.overResizeElement===this&&delete y.overResizeElement),this}_mouseOver(e){y.overResizeElement||y.dragElement||(y.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){y.overResizeElement===this&&(delete y.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(e=>e.trim()).map(e=>new j(this.el,e,{start:t=>{this._resizeStart(t)},stop:t=>{this._resizeStop(t)},move:t=>{this._resizing(t,e)}})),this}_resizeStart(e){this.sizeToContent=l.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=l.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=l.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(e,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,t),this._applyChange();const i=l.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(e){const t=l.initEvent(e,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=q._originStyleProp.map(i=>this.el.style[i]),this.parentOriginStylePosition=this.el.parentElement.style.position;const e=this.el.parentElement,t=l.getValuesFromTransformedElement(e);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return q._originStyleProp.forEach((e,t)=>{this.el.style[e]=this.elOriginStyleVal[t]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,t){const i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},r=e.clientX-i.clientX,o=this.sizeToContent?0:e.clientY-i.clientY;let n,h;t.indexOf("e")>-1?s.width+=r:t.indexOf("w")>-1&&(s.width-=r,s.left+=r,n=!0),t.indexOf("s")>-1?s.height+=o:t.indexOf("n")>-1&&(s.height-=o,s.top+=o,h=!0);const d=this._constrainSize(s.width,s.height,n,h);return Math.round(s.width)!==Math.round(d.width)&&(t.indexOf("w")>-1&&(s.left+=s.width-d.width),s.width=d.width),Math.round(s.height)!==Math.round(d.height)&&(t.indexOf("n")>-1&&(s.top+=s.height-d.height),s.height=d.height),s}_constrainSize(e,t,i,s){const r=this.option,o=(i?r.maxWidthMoveLeft:r.maxWidth)||Number.MAX_SAFE_INTEGER,n=r.minWidth/this.rectScale.x||e,h=(s?r.maxHeightMoveUp:r.maxHeight)||Number.MAX_SAFE_INTEGER,d=r.minHeight/this.rectScale.y||t,c=Math.min(o,Math.max(n,e)),u=Math.min(h,Math.max(d,t));return{width:c,height:u}}_applyChange(){let e={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const t=this.el.parentElement,{left:i,top:s}=t.getBoundingClientRect();e={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(t=>{const i=this.temporalRect[t],s=t==="width"||t==="left"?this.rectScale.x:t==="height"||t==="top"?this.rectScale.y:1;this.el.style[t]=(i-e[t])*s+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(e=>e.destroy()),delete this.handlers,this}}q._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const Ge='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class F extends J{constructor(e,t={}){var r;super(),this.el=e,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const i=(r=t==null?void 0:t.handle)==null?void 0:r.substring(1),s=e.gridstackNode;this.dragEls=!i||e.classList.contains(i)?[e]:s!=null&&s.subGrid?[e.querySelector(t.handle)||e]:Array.from(e.querySelectorAll(t.handle)),this.dragEls.length===0&&(this.dragEls=[e]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(e=>{e.addEventListener("mousedown",this._mouseDown),z&&(e.addEventListener("touchstart",W),e.addEventListener("pointerdown",Y))}),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),z&&(t.removeEventListener("touchstart",W),t.removeEventListener("pointerdown",Y))}),e||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(e){return Object.keys(e).forEach(t=>this.option[t]=e[t]),this}_mouseDown(e){if(!y.mouseHandled)return e.button!==0||!this.dragEls.find(t=>t===e.target)&&e.target.closest(Ge)||this.option.cancel&&e.target.closest(this.option.cancel)||(this.mouseDownEvent=e,delete this.dragging,delete y.dragElement,delete y.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),z&&(e.currentTarget.addEventListener("touchmove",V),e.currentTarget.addEventListener("touchend",K)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),y.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=l.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(e){var i;const t=this.mouseDownEvent;if(this.lastDrag=e,this.dragging)if(this._dragFollow(e),y.pauseDrag){const s=Number.isInteger(y.pauseDrag)?y.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(e),s)}else this._callDrag(e);else if(Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>3){this.dragging=!0,y.dragElement=this;const s=(i=this.el.gridstackNode)==null?void 0:i.grid;s?y.dropElement=s.el.ddElement.ddDroppable:delete y.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=l.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment),this._setupHelperStyle(e);const r=l.initEvent(e,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(r,this.ui()),this.triggerEvent("dragstart",r),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(e){var t,i;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),z&&e.currentTarget&&(e.currentTarget.removeEventListener("touchmove",V,!0),e.currentTarget.removeEventListener("touchend",K,!0)),this.dragging){delete this.dragging,(t=this.el.gridstackNode)==null||delete t._origRotate,document.removeEventListener("keydown",this._keyEvent),((i=y.dropElement)==null?void 0:i.el)===this.el.parentElement&&delete y.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const s=l.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(s),this.triggerEvent("dragstop",s),y.dropElement&&y.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete y.dragElement,delete y.dropElement,delete y.mouseHandled,e.preventDefault()}_keyEvent(e){var s,r;const t=this.el.gridstackNode,i=(t==null?void 0:t.grid)||((r=(s=y.dropElement)==null?void 0:s.el)==null?void 0:r.gridstack);if(e.key==="Escape")t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),i==null||i.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&i&&(e.key==="r"||e.key==="R")){if(!l.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,i.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",l.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let e=this.el;return typeof this.option.helper=="function"?e=this.option.helper(this.el):this.option.helper==="clone"&&(e=l.cloneNode(this.el)),document.body.contains(e)||l.appendTo(e,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=F.originStyleProp.map(t=>this.el.style[t]),e}_setupHelperStyle(e){this.helper.classList.add("ui-draggable-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(e),t.transition="none",setTimeout(()=>{this.helper&&(t.transition=null)},0),this}_removeHelperStyle(){var t;this.helper.classList.remove("ui-draggable-dragging");const e=(t=this.helper)==null?void 0:t.gridstackNode;if(!(e!=null&&e._isAboutToRemove)&&this.dragElementOriginStyle){const i=this.helper,s=this.dragElementOriginStyle.transition||null;i.style.transition=this.dragElementOriginStyle.transition="none",F.originStyleProp.forEach(r=>i.style[r]=this.dragElementOriginStyle[r]||null),setTimeout(()=>i.style.transition=s,50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){const t={left:0,top:0},i=this.helper.style,s=this.dragOffset;i.left=(e.clientX+s.offsetLeft-t.left)*this.dragTransform.xScale+"px",i.top=(e.clientY+s.offsetTop-t.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,t,i){let s=0,r=0;i&&(s=this.dragTransform.xOffset,r=this.dragTransform.yOffset);const o=t.getBoundingClientRect();return{left:o.left,top:o.top,offsetLeft:-e.clientX+o.left-s,offsetTop:-e.clientY+o.top-r,width:o.width*this.dragTransform.xScale,height:o.height*this.dragTransform.yScale}}ui(){const t=this.el.parentElement.getBoundingClientRect(),i=this.helper.getBoundingClientRect();return{position:{top:(i.top-t.top)*this.dragTransform.yScale,left:(i.left-t.left)*this.dragTransform.xScale}}}}F.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class Ue extends J{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),z&&(this.el.addEventListener("pointerenter",me),this.el.addEventListener("pointerleave",ye)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),z&&(this.el.removeEventListener("pointerenter",me),this.el.removeEventListener("pointerleave",ye)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(t=>this.option[t]=e[t]),this._setupAccept(),this}_mouseEnter(e){if(!y.dragElement||!this._canDrop(y.dragElement.el))return;e.preventDefault(),e.stopPropagation(),y.dropElement&&y.dropElement!==this&&y.dropElement._mouseLeave(e,!0),y.dropElement=this;const t=l.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(y.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,t=!1){var s;if(!y.dragElement||y.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=l.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(y.dragElement)),this.triggerEvent("dropout",i),y.dropElement===this&&(delete y.dropElement,!t)){let r,o=this.el.parentElement;for(;!r&&o;)r=(s=o.ddElement)==null?void 0:s.ddDroppable,o=o.parentElement;r&&r._mouseEnter(e)}}drop(e){e.preventDefault();const t=l.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(y.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}}class Z{static init(e){return e.ddElement||(e.ddElement=new Z(e)),e.ddElement}constructor(e){this.el=e}on(e,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,t),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new F(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new q(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new Ue(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class We{resizable(e,t,i,s){return this._getDDElements(e).forEach(r=>{if(t==="disable"||t==="enable")r.ddResizable&&r.ddResizable[t]();else if(t==="destroy")r.ddResizable&&r.cleanResizable();else if(t==="option")r.setupResizable({[i]:s});else{const n=r.el.gridstackNode.grid;let h=r.el.getAttribute("gs-resize-handles")||n.opts.resizable.handles||"e,s,se";h==="all"&&(h="n,e,s,w,se,sw,ne,nw");const d=!n.opts.alwaysShowResizeHandle;r.setupResizable({...n.opts.resizable,handles:h,autoHide:d,start:t.start,stop:t.stop,resize:t.resize})}}),this}draggable(e,t,i,s){return this._getDDElements(e).forEach(r=>{if(t==="disable"||t==="enable")r.ddDraggable&&r.ddDraggable[t]();else if(t==="destroy")r.ddDraggable&&r.cleanDraggable();else if(t==="option")r.setupDraggable({[i]:s});else{const o=r.el.gridstackNode.grid;r.setupDraggable({...o.opts.draggable,start:t.start,stop:t.stop,drag:t.drag})}}),this}dragIn(e,t){return this._getDDElements(e).forEach(i=>i.setupDraggable(t)),this}droppable(e,t,i,s){return typeof t.accept=="function"&&!t._accept&&(t._accept=t.accept,t.accept=r=>t._accept(r)),this._getDDElements(e).forEach(r=>{t==="disable"||t==="enable"?r.ddDroppable&&r.ddDroppable[t]():t==="destroy"?r.ddDroppable&&r.cleanDroppable():t==="option"?r.setupDroppable({[i]:s}):r.setupDroppable(t)}),this}isDroppable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach(s=>s.on(t,r=>{i(r,y.dragElement?y.dragElement.el:r.target,y.dragElement?y.dragElement.helper:null)})),this}off(e,t){return this._getDDElements(e).forEach(i=>i.off(t)),this}_getDDElements(e,t=!0){const i=l.getElements(e);if(!i.length)return[];const s=i.map(r=>r.ddElement||(t?Z.init(r):null));return t||s.filter(r=>r),s}}/*!
|
|
1
|
+
(function(C,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("@kong-ui-public/analytics-utilities"),require("@kong-ui-public/analytics-chart"),require("swrv"),require("axios"),require("@kong-ui-public/i18n"),require("@kong-ui-public/analytics-metric-provider"),require("@kong-ui-public/entities-shared"),require("@kong/icons"),require("@kong-ui-public/analytics-config-store")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/analytics-utilities","@kong-ui-public/analytics-chart","swrv","axios","@kong-ui-public/i18n","@kong-ui-public/analytics-metric-provider","@kong-ui-public/entities-shared","@kong/icons","@kong-ui-public/analytics-config-store"],a):(C=typeof globalThis<"u"?globalThis:C||self,a(C["kong-ui-public-dashboard-renderer"]={},C.Vue,C["kong-ui-public-analytics-utilities"],C["kong-ui-public-analytics-chart"],C.swrv,C.axios,C["kong-ui-public-i18n"],C["kong-ui-public-analytics-metric-provider"],C["kong-ui-public-entities-shared"],C.KongIcons,C["kong-ui-public-analytics-config-store"]))})(this,function(C,a,L,F,be,et,te,ie,Ee,se,we){"use strict";var re=(f=>(f.VALIDATING="VALIDATING",f.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",f.PENDING="PENDING",f.SUCCESS="SUCCESS",f.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",f.ERROR="ERROR",f.STALE_IF_ERROR="STALE_IF_ERROR",f))(re||{});const ve=f=>{var e,t,i,s,r;return f?!!((e=Object.keys(f))!=null&&e.length||(t=f.data)!=null&&t.length||(s=(i=f.data)==null?void 0:i.data)!=null&&s.length||!((r=f.data)!=null&&r.data)&&typeof f.data=="object"&&Object.keys(f==null?void 0:f.data).length):!1};function xe(f=a.ref({}),e,t,i=ve){const s=a.ref("PENDING");return a.watchEffect(()=>{const r=i(f.value);if(f.value&&r&&t.value){s.value="VALIDATING_HAS_DATA";return}if(f.value&&t.value){s.value="VALIDATING";return}if(f.value&&e.value){s.value="STALE_IF_ERROR";return}if(f.value===void 0&&!e.value){s.value="PENDING";return}if(f.value&&!e.value&&r){s.value="SUCCESS_HAS_DATA";return}if(f.value&&!e.value){s.value="SUCCESS";return}f.value===void 0&&e&&(s.value="ERROR")}),{state:s,swrvState:re}}const Ce={renderer:{noQueryBridge:"No query bridge provided. Unable to render dashboard.",trendRange:{"24h":"Last 24-Hour Summary","7d":"Last 7-Day Summary","30d":"Last 30-Day Summary"},edit:"Edit"},queryDataProvider:{timeRangeExceeded:"The time range for this report is outside of your organization's data retention period"},csvExport:{defaultFilename:"Chart Export",exportAsCsv:"Export as CSV"},jumpToExplore:"Explore"};function Re(){const f=te.createI18n("en-us",Ce);return{i18n:f,i18nT:te.i18nTComponent(f)}}const G=170,P="analytics-query-provider",X="{entity-id}",ne="{cp-id}",oe="{timeframe}",ae=30*1e3;function ke(){const f=a.inject(P);return{evaluateFeatureFlag:(t,i)=>f?f.evaluateFeatureFlagFn(t,i):i}}const O={useI18n:Re,useEvaluateFeatureFlag:ke},Q=a.defineComponent({__name:"QueryDataProvider",props:{context:{},query:{},queryReady:{type:Boolean},refreshCounter:{}},emits:["chart-data","queryComplete"],setup(f,{emit:e}){const t=f,i=e,{i18n:s}=O.useI18n(),r=a.inject(P),o=()=>t.queryReady&&r?JSON.stringify([t.query,t.context,t.refreshCounter]):null,n=new AbortController;a.onUnmounted(()=>{n.abort()});const h=(v,x,k)=>{const D=[];return x&&D.push(...x),D.push(...L.stripUnknownFilters(v,k)),D},{data:d,error:c,isValidating:u}=be(o,async()=>{var v,x,k,D;try{let{datasource:R,...B}=t.query;R||(R="basic");const ee=h(R,t.query.filters,t.context.filters);let m=t.query.time_range;m?m.tz||(m={...m,tz:t.context.tz}):m={...t.context.timeSpec,tz:t.context.tz};const A={datasource:R,query:{...B,time_range:m,filters:ee}};return r==null?void 0:r.queryFn(A,n)}catch(R){E.value=((x=(v=R==null?void 0:R.response)==null?void 0:v.data)==null?void 0:x.message)==="Range not allowed for this tier"?s.t("queryDataProvider.timeRangeExceeded"):((D=(k=R==null?void 0:R.response)==null?void 0:k.data)==null?void 0:D.message)||(R==null?void 0:R.message)}finally{i("queryComplete")}},{refreshInterval:t.context.refreshInterval,revalidateOnFocus:!1}),{state:g,swrvState:b}=xe(d,c,u),E=a.ref(null),w=a.computed(()=>g.value===b.ERROR||!!E.value),_=a.computed(()=>!t.queryReady||g.value===b.PENDING);return a.watch(d,v=>{v&&i("chart-data",v)}),(v,x)=>{const k=a.resolveComponent("KSkeleton"),D=a.resolveComponent("KEmptyState");return _.value||!a.unref(d)&&!w.value?(a.openBlock(),a.createBlock(k,{key:0,class:"chart-skeleton",type:"table"})):w.value?(a.openBlock(),a.createBlock(D,{key:1,"action-button-visible":!1,"data-testid":"chart-empty-state","icon-variant":"error"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(E.value),1)]),_:1})):a.unref(d)?a.renderSlot(v.$slots,"default",{key:2,data:a.unref(d)}):a.createCommentVNode("",!0)}}}),De={class:"analytics-chart"},Te=a.defineComponent({__name:"SimpleChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){a.useCssVars(t=>({c40c0e86:`${t.height}px`}));const e=f;return(t,i)=>(a.openBlock(),a.createBlock(Q,{context:t.context,query:t.query,"query-ready":t.queryReady,"refresh-counter":t.refreshCounter},{default:a.withCtx(({data:s})=>[a.createElementVNode("div",De,[a.createVNode(a.unref(F.SimpleChart),{"chart-data":s,"chart-options":e.chartOptions,"synthetics-data-key":t.chartOptions.syntheticsDataKey},null,8,["chart-data","chart-options","synthetics-data-key"])])]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),M=(f,e)=>{const t=f.__vccOpts||f;for(const[i,s]of e)t[i]=s;return t},Se=M(Te,[["__scopeId","data-v-694cf637"]]),ze={class:"analytics-chart"},le=M(a.defineComponent({__name:"BaseAnalyticsChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{},extraProps:{}},emits:["edit-tile","chart-data"],setup(f,{emit:e}){const t=f,i=e,s=a.inject(P),{i18n:r}=O.useI18n(),{evaluateFeatureFlag:o}=O.useEvaluateFeatureFlag(),n=o("ma-3043-analytics-chart-kebab-menu",!1),h=a.computed(()=>({type:t.chartOptions.type,stacked:t.chartOptions.stacked??!1,chartDatasetColors:t.chartOptions.chartDatasetColors,threshold:t.chartOptions.threshold})),d=a.computed(()=>{if(s&&s.exploreBaseUrl){const g={filters:[...t.context.filters,...t.query.filters??[]],metrics:t.query.metrics??[],dimensions:t.query.dimensions??[],time_range:t.query.time_range||t.context.timeSpec},b=["advanced","ai"].includes(t.query.datasource)?t.query.datasource:"advanced";return`${s.exploreBaseUrl()}?q=${JSON.stringify(g)}&d=${b}&c=${t.chartOptions.type}`}return""}),c=()=>{i("edit-tile")},u=g=>{i("chart-data",g)};return(g,b)=>{const E=a.resolveComponent("KDropdownItem");return a.openBlock(),a.createBlock(Q,{context:g.context,query:g.query,"query-ready":g.queryReady,"refresh-counter":g.refreshCounter,onChartData:u},{default:a.withCtx(({data:w})=>[a.createElementVNode("div",ze,[a.createVNode(a.unref(F.AnalyticsChart),a.mergeProps({"allow-csv-export":g.chartOptions.allowCsvExport,"chart-data":w,"chart-options":h.value,"chart-title":!a.unref(n)&&g.chartOptions.chartTitle||"","go-to-explore":d.value,"legend-position":"bottom","show-menu":g.context.editable,"synthetics-data-key":g.chartOptions.syntheticsDataKey,"tooltip-title":""},g.extraProps),a.createSlots({_:2},[g.context.editable?{name:"menu-items",fn:a.withCtx(()=>[a.createVNode(E,{onClick:c},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(r).t("renderer.edit")),1)]),_:1})]),key:"0"}:void 0]),1040,["allow-csv-export","chart-data","chart-options","chart-title","go-to-explore","show-menu","synthetics-data-key"])])]),_:1},8,["context","query","query-ready","refresh-counter"])}}}),[["__scopeId","data-v-1bc587d3"]]),he=a.defineComponent({__name:"BarChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){return(e,t)=>(a.openBlock(),a.createBlock(le,{"chart-options":e.chartOptions,context:e.context,"extra-props":{showAnnotations:!1},height:e.height,query:e.query,"query-ready":e.queryReady,"refresh-counter":e.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),de=a.defineComponent({__name:"TimeseriesChartRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){return(e,t)=>(a.openBlock(),a.createBlock(le,{"chart-options":e.chartOptions,context:e.context,height:e.height,query:e.query,"query-ready":e.queryReady,"refresh-counter":e.refreshCounter},null,8,["chart-options","context","height","query","query-ready","refresh-counter"]))}}),Ne={class:"metric-card-tile-wrapper"},He=M(a.defineComponent({__name:"GoldenSignalsRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){a.useCssVars(o=>({"926e3b48":a.unref(i)?"90%":"100%","7be2893e":a.unref(i)?"auto":"100%","0d55c162":a.unref(i)?"100%":"none"}));const e=f,{evaluateFeatureFlag:t}=O.useEvaluateFeatureFlag(),i=t("ma-3043-analytics-chart-kebab-menu",!1),s=a.computed(()=>{const o=e.context.timeSpec;if(o.type==="absolute")return new L.Timeframe({key:"custom",timeframeText:"custom",display:"custom",startCustom:o.start,endCustom:o.end,timeframeLength:()=>o.end.getTime()-o.start.getTime(),defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["free","plus","enterprise"]});const n=L.TimePeriods.get(o.time_range);if(!n)throw new Error("Unknown time range");return n}),r=a.computed(()=>{var n,h;const o=(n=e.query)==null?void 0:n.datasource;if(o&&o!=="advanced"&&o!=="basic")throw new Error(`Invalid datasource value: ${o}`);return{datasource:(h=e.query)==null?void 0:h.datasource,overrideTimeframe:s.value,tz:e.context.tz,additionalFilter:e.context.filters,longCardTitles:e.chartOptions.longCardTitles,...!i&&{containerTitle:e.chartOptions.chartTitle},...!i&&{description:e.chartOptions.description},percentileLatency:e.chartOptions.percentileLatency,refreshInterval:e.context.refreshInterval,queryReady:e.queryReady,refreshCounter:e.refreshCounter}});return(o,n)=>(a.openBlock(),a.createElementBlock("div",Ne,[a.createVNode(a.unref(ie.MetricsProvider),a.normalizeProps(a.guardReactiveProps(r.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(ie.MetricsConsumer))]),_:1},16)]))}}),[["__scopeId","data-v-0f571079"]]),ce="#6c7489",ue="20px",fe="20px",Ae=a.defineComponent({__name:"TopNTableRenderer",props:{query:{},context:{},queryReady:{type:Boolean},chartOptions:{},height:{},refreshCounter:{}},setup(f){const e=f,{evaluateFeatureFlag:t}=O.useEvaluateFeatureFlag(),i=t("ma-3043-analytics-chart-kebab-menu",!1),s=r=>{var o;if((o=e.chartOptions)!=null&&o.entityLink)if(r.id.includes(":")){const[n,h]=r.id.split(":");return e.chartOptions.entityLink.replace(ne,n).replace(X,h)}else return e.chartOptions.entityLink.replace(X,r.id);return""};return(r,o)=>(a.openBlock(),a.createBlock(Q,{context:r.context,query:r.query,"query-ready":r.queryReady,"refresh-counter":r.refreshCounter},{default:a.withCtx(({data:n})=>[a.createVNode(a.unref(F.TopNTable),{data:n,description:!a.unref(i)&&r.chartOptions.description||"","synthetics-data-key":r.chartOptions.syntheticsDataKey,title:!a.unref(i)&&r.chartOptions.chartTitle||""},a.createSlots({_:2},[e.chartOptions.entityLink?{name:"name",fn:a.withCtx(({record:h})=>[a.createVNode(a.unref(Ee.EntityLink),{"entity-link-data":{id:h.id,label:h.name,deleted:h.deleted},"external-link":s(h)},null,8,["entity-link-data","external-link"])]),key:"0"}:void 0]),1032,["data","description","synthetics-data-key","title"])]),_:1},8,["context","query","query-ready","refresh-counter"]))}}),Le=["data-testid"],Oe={key:0,class:"tile-header"},Me=["data-testid"],Be=["data-testid"],Ie=["data-testid"],Pe=["data-testid"],qe=M(a.defineComponent({__name:"DashboardTile",props:{definition:{},context:{},height:{default:G},queryReady:{type:Boolean},refreshCounter:{},tileId:{}},emits:["edit-tile"],setup(f,{emit:e}){a.useCssVars(m=>({"733568b4":`${m.height}px`}));const t=parseInt(fe,10),i=f,s=e,r=a.inject(P),{evaluateFeatureFlag:o}=O.useEvaluateFeatureFlag(),{i18n:n}=O.useI18n(),h=o("ma-3043-analytics-chart-kebab-menu",!1),d=a.ref(),c=a.ref(!1),u=a.ref(),g=a.ref(!1);a.watch(()=>i.definition,async()=>{await a.nextTick(),u.value&&(g.value=u.value.scrollWidth>u.value.clientWidth)},{immediate:!0,deep:!0});const b=a.computed(()=>{if(r&&r.exploreBaseUrl){const m={filters:[...i.context.filters,...i.definition.query.filters??[]],metrics:i.definition.query.metrics??[],dimensions:i.definition.query.dimensions??[],time_range:i.definition.query.time_range||i.context.timeSpec,granularity:i.definition.query.granularity||k.value},A=["advanced","ai"].includes(i.definition.query.datasource)?i.definition.query.datasource:"advanced";return`${r.exploreBaseUrl()}?q=${JSON.stringify(m)}&d=${A}&c=${i.definition.chart.type}`}return""}),E=a.computed(()=>n.t("csvExport.defaultFilename")),w=a.computed(()=>h&&!["golden_signals","top_n","gauge"].includes(i.definition.chart.type)),_={timeseries_line:de,timeseries_bar:de,horizontal_bar:he,vertical_bar:he,gauge:Se,golden_signals:He,top_n:Ae,slottable:void 0},v=a.computed(()=>{const m=_[i.definition.chart.type];return m&&{component:m,rendererProps:{query:i.definition.query,context:i.context,queryReady:i.queryReady,chartOptions:i.definition.chart,height:i.height-t*2,refreshCounter:i.refreshCounter}}}),x=a.computed(()=>{var A;const m=(A=i.definition.query)==null?void 0:A.time_range;if((m==null?void 0:m.type)==="relative"){const I=L.TimePeriods.get(L.TIMEFRAME_LOOKUP[m.time_range]);return I?I.display:(console.warn("Did not recognize the given relative time range:",m.time_range),m.time_range)}else if((m==null?void 0:m.type)==="absolute"){const I=m.tz||"Etc/UTC";return`${L.formatTime(m.start,{short:!0,tz:I})} - ${L.formatTime(m.end,{short:!0,tz:I})}`}return null}),k=a.computed(()=>d.value?L.msToGranularity(d.value.meta.granularity_ms):void 0),D=()=>{s("edit-tile",i.definition)},R=m=>{d.value=m},B=m=>{c.value=m},ee=()=>{B(!0)};return(m,A)=>{const I=a.resolveComponent("KTooltip"),Je=a.resolveComponent("KBadge"),_e=a.resolveComponent("KDropdownItem"),Ze=a.resolveComponent("KDropdown");return a.openBlock(),a.createElementBlock("div",{class:"tile-boundary","data-testid":`tile-${m.tileId}`},[a.unref(h)&&m.definition.chart.type!=="slottable"?(a.openBlock(),a.createElementBlock("div",Oe,[a.createVNode(I,{class:"title-tooltip",disabled:!g.value,"max-width":"500",text:m.definition.chart.chartTitle},{default:a.withCtx(()=>[a.createElementVNode("div",{ref_key:"titleRef",ref:u,class:"title"},a.toDisplayString(m.definition.chart.chartTitle),513)]),_:1},8,["disabled","text"]),w.value||x.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:"tile-actions","data-testid":`tile-actions-${m.tileId}`},[x.value?(a.openBlock(),a.createBlock(Je,{key:0},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(x.value),1)]),_:1})):a.createCommentVNode("",!0),w.value&&m.context.editable?(a.openBlock(),a.createBlock(a.unref(se.EditIcon),{key:1,class:"edit-icon",color:a.unref(ce),"data-testid":`edit-tile-${m.tileId}`,size:a.unref(ue),onClick:D},null,8,["color","data-testid","size"])):a.createCommentVNode("",!0),w.value?(a.openBlock(),a.createBlock(Ze,{key:2,class:"dropdown","data-testid":`chart-action-menu-${m.tileId}`,"kpop-attributes":{placement:"bottom-end"}},{items:a.withCtx(()=>[b.value?(a.openBlock(),a.createBlock(_e,{key:0,"data-testid":`chart-jump-to-explore-${m.tileId}`,item:{label:a.unref(n).t("jumpToExplore"),to:b.value}},null,8,["data-testid","item"])):a.createCommentVNode("",!0),"allowCsvExport"in m.definition.chart&&m.definition.chart.allowCsvExport?(a.openBlock(),a.createBlock(_e,{key:1,class:"chart-export-button","data-testid":`chart-csv-export-${m.tileId}`,onClick:A[0]||(A[0]=ct=>ee())},{default:a.withCtx(()=>[a.createElementVNode("span",{class:"chart-export-trigger","data-testid":`csv-export-button-${m.tileId}`},a.toDisplayString(a.unref(n).t("csvExport.exportAsCsv")),9,Be)]),_:1},8,["data-testid"])):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[a.createVNode(a.unref(se.MoreIcon),{class:"kebab-action-menu",color:a.unref(ce),"data-testid":`kebab-action-menu-${m.tileId}`,size:a.unref(ue)},null,8,["color","data-testid","size"])]),_:1},8,["data-testid"])):a.createCommentVNode("",!0)],8,Me)):"description"in m.definition.chart?(a.openBlock(),a.createElementBlock("div",{key:1,class:"header-description","data-testid":`tile-description-${m.tileId}`},a.toDisplayString(m.definition.chart.description),9,Ie)):a.createCommentVNode("",!0),c.value?(a.openBlock(),a.createBlock(a.unref(F.CsvExportModal),{key:2,"chart-data":d.value,"data-testid":`csv-export-modal-${m.tileId}`,filename:E.value,onToggleModal:B},null,8,["chart-data","data-testid","filename"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"tile-content","data-testid":`tile-content-${m.tileId}`},[v.value?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(v.value.component),a.mergeProps({key:0},v.value.rendererProps,{onChartData:R}),null,16)):a.createCommentVNode("",!0)],8,Pe)],8,Le)}}}),[["__scopeId","data-v-30fafa9c"]]),$e=(f,e,t)=>{const i=new Map;t.forEach(r=>{const o=r.layout.position.row,n=i.get(o),h=r.layout.size.rows===1&&!!r.layout.size.fitToContent;n===void 0?i.set(o,h):i.set(o,n&&h)});const s=[];for(let r=0;r<f;r++)i.get(r)?s.push("auto"):s.push(`${e}px`);return s},ge=M(a.defineComponent({__name:"GridLayout",props:{gridSize:{type:Object,required:!0},tileHeight:{type:Number,required:!1,default:()=>G},tiles:{type:Array,required:!0}},setup(f){a.useCssVars(n=>({"3bc5e939":f.gridSize.cols,"77aa3028":r.value}));const e=f,t=a.ref(null),i=a.ref(0),s=new ResizeObserver(n=>{window.requestAnimationFrame(()=>{!Array.isArray(n)||!n.length||(i.value=n[0].contentRect.width)})});a.onMounted(()=>{t.value&&s.observe(t.value)}),a.onUnmounted(()=>{t.value&&s.unobserve(t.value)});const r=a.computed(()=>{var h;return $e((h=e.gridSize)==null?void 0:h.rows,e.tileHeight,e.tiles).join(" ")}),o=a.computed(()=>e.tiles.map((n,h)=>({key:`tile-${h}`,tile:n,style:{"grid-column-start":n.layout.position.col+1,"grid-column-end":n.layout.position.col+1+n.layout.size.cols,"grid-row-start":n.layout.position.row+1,"grid-row-end":n.layout.position.row+1+n.layout.size.rows}})));return(n,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"gridContainer",ref:t,class:"kong-ui-public-grid-layout"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.value,d=>(a.openBlock(),a.createElementBlock("div",{key:d.key,class:a.normalizeClass(["grid-cell",{"empty-cell":!d.tile}]),style:a.normalizeStyle(d.style)},[a.renderSlot(n.$slots,"tile",{style:a.normalizeStyle(d.style),tile:d.tile},void 0,!0)],6))),128))],512))}}),[["__scopeId","data-v-f43eb7b8"]]);function Fe(f,e,t,i,s){const r=(...o)=>(console.warn("gridstack.js: Function `"+t+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"),e.apply(f,o));return r.prototype=e.prototype,r}class l{static getElements(e,t=document){if(typeof e=="string"){const i="getElementById"in t?t:void 0;if(i&&!isNaN(+e[0])){const r=i.getElementById(e);return r?[r]:[]}let s=t.querySelectorAll(e);return!s.length&&e[0]!=="."&&e[0]!=="#"&&(s=t.querySelectorAll("."+e),s.length||(s=t.querySelectorAll("#"+e))),Array.from(s)}return[e]}static getElement(e,t=document){if(typeof e=="string"){const i="getElementById"in t?t:void 0;if(!e.length)return null;if(i&&e[0]==="#")return i.getElementById(e.substring(1));if(e[0]==="#"||e[0]==="."||e[0]==="[")return t.querySelector(e);if(i&&!isNaN(+e[0]))return i.getElementById(e);let s=t.querySelector(e);return i&&!s&&(s=i.getElementById(e)),s||(s=t.querySelector("."+e)),s}return e}static createWidgetDivs(e,t){var o,n;const i=l.createDiv(["grid-stack-item",e]),s=l.createDiv(["grid-stack-item-content"],i);return t.lazyLoad||((n=(o=t.grid)==null?void 0:o.opts)==null?void 0:n.lazyLoad)&&t.lazyLoad!==!1?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([h])=>{var d;h.isIntersecting&&((d=t.visibleObservable)==null||d.disconnect(),delete t.visibleObservable,p.renderCB(s,t))}),window.setTimeout(()=>{var h;return(h=t.visibleObservable)==null?void 0:h.observe(i)})):p.renderCB(s,t),i}static createDiv(e,t){const i=document.createElement("div");return e.forEach(s=>{s&&i.classList.add(s)}),t==null||t.appendChild(i),i}static shouldSizeToContent(e,t=!1){return(e==null?void 0:e.grid)&&(t?e.sizeToContent===!0||e.grid.opts.sizeToContent===!0&&e.sizeToContent===void 0:!!e.sizeToContent||e.grid.opts.sizeToContent&&e.sizeToContent!==!1)}static isIntercepted(e,t){return!(e.y>=t.y+t.h||e.y+e.h<=t.y||e.x+e.w<=t.x||e.x>=t.x+t.w)}static isTouching(e,t){return l.isIntercepted(e,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(e,t){const i=e.x>t.x?e.x:t.x,s=e.x+e.w<t.x+t.w?e.x+e.w:t.x+t.w;if(s<=i)return 0;const r=e.y>t.y?e.y:t.y,o=e.y+e.h<t.y+t.h?e.y+e.h:t.y+t.h;return o<=r?0:(s-i)*(o-r)}static area(e){return e.w*e.h}static sort(e,t=1){return e.sort((s,r)=>{const o=t*((s.y??1e4)-(r.y??1e4));return o===0?t*((s.x??1e4)-(r.x??1e4)):o})}static find(e,t){return t?e.find(i=>i.id===t):void 0}static createStylesheet(e,t,i){const s=document.createElement("style"),r=i==null?void 0:i.nonce;return r&&(s.nonce=r),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",e),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),t?t.insertBefore(s,t.firstChild):(t=document.getElementsByTagName("head")[0],t.appendChild(s)),s}static removeStylesheet(e,t){const s=(t||document).querySelector("STYLE[gs-style-id="+e+"]");s&&s.parentNode&&s.remove()}static addCSSRule(e,t,i){e.textContent+=`${t} { ${i} } `}static toBool(e){return typeof e=="boolean"?e:typeof e=="string"?(e=e.toLowerCase(),!(e===""||e==="no"||e==="false"||e==="0")):!!e}static toNumber(e){return e===null||e.length===0?void 0:Number(e)}static parseHeight(e){let t,i="px";if(typeof e=="string")if(e==="auto"||e==="")t=0;else{const s=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!s)throw new Error(`Invalid height val = ${e}`);i=s[2]||"px",t=parseFloat(s[1])}else t=e;return{h:t,unit:i}}static defaults(e,...t){return t.forEach(i=>{for(const s in i){if(!i.hasOwnProperty(s))return;e[s]===null||e[s]===void 0?e[s]=i[s]:typeof i[s]=="object"&&typeof e[s]=="object"&&this.defaults(e[s],i[s])}}),e}static same(e,t){if(typeof e!="object")return e==t;if(typeof e!=typeof t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}static copyPos(e,t,i=!1){return t.x!==void 0&&(e.x=t.x),t.y!==void 0&&(e.y=t.y),t.w!==void 0&&(e.w=t.w),t.h!==void 0&&(e.h=t.h),i&&(t.minW&&(e.minW=t.minW),t.minH&&(e.minH=t.minH),t.maxW&&(e.maxW=t.maxW),t.maxH&&(e.maxH=t.maxH)),e}static samePos(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&(e.w||1)===(t.w||1)&&(e.h||1)===(t.h||1)}static sanitizeMinMax(e){e.minW||delete e.minW,e.minH||delete e.minH,e.maxW||delete e.maxW,e.maxH||delete e.maxH}static removeInternalAndSame(e,t){if(!(typeof e!="object"||typeof t!="object"))for(let i in e){const s=e[i],r=t[i];i[0]==="_"||s===r?delete e[i]:s&&typeof s=="object"&&r!==void 0&&(l.removeInternalAndSame(s,r),Object.keys(s).length||delete e[i])}}static removeInternalForSave(e,t=!0){for(let i in e)(i[0]==="_"||e[i]===null||e[i]===void 0)&&delete e[i];delete e.grid,t&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,(e.w===1||e.w===e.minW)&&delete e.w,(e.h===1||e.h===e.minH)&&delete e.h}static throttle(e,t){let i=!1;return(...s)=>{i||(i=!0,setTimeout(()=>{e(...s),i=!1},t))}}static removePositioningStyles(e){const t=e.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowY)?e:this.getScrollElement(e.parentElement)}static updateScrollPosition(e,t,i){const s=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>r){const o=s.bottom-r,n=s.top,h=this.getScrollElement(e);if(h!==null){const d=h.scrollTop;s.top<0&&i<0?e.offsetHeight>r?h.scrollTop+=i:h.scrollTop+=Math.abs(n)>Math.abs(i)?i:n:i>0&&(e.offsetHeight>r?h.scrollTop+=i:h.scrollTop+=o>i?i:o),t.top+=h.scrollTop-d}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),r=s.clientHeight,o=s===this.getScrollElement()?0:s.getBoundingClientRect().top,n=e.clientY-o,h=n<i,d=n>r-i;h?s.scrollBy({behavior:"smooth",top:n-i}):d&&s.scrollBy({behavior:"smooth",top:i-(r-n)})}static clone(e){return e==null||typeof e!="object"?e:e instanceof Array?[...e]:{...e}}static cloneDeep(e){const t=["parentGrid","el","grid","subGrid","engine"],i=l.clone(e);for(const s in i)i.hasOwnProperty(s)&&typeof i[s]=="object"&&s.substring(0,2)!=="__"&&!t.find(r=>r===s)&&(i[s]=l.cloneDeep(e[s]));return i}static cloneNode(e){const t=e.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(e,t){let i;typeof t=="string"?i=l.getElement(t):i=t,i&&i.appendChild(e)}static addElStyles(e,t){if(t instanceof Object)for(const i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach(s=>{e.style[i]=s}):e.style[i]=t[i])}static initEvent(e,t){const i={type:t.type},s={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:e.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(r=>i[r]=e[r]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(r=>i[r]=e[r]),{...i,...s}}static simulateMouseEvent(e,t,i){const s=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,e.target),(i||e.target).dispatchEvent(s)}static getValuesFromTransformedElement(e){const t=document.createElement("div");l.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),e.appendChild(t);const i=t.getBoundingClientRect();return e.removeChild(t),t.remove(),{xScale:1/i.width,yScale:1/i.height,xOffset:i.left,yOffset:i.top}}static swap(e,t,i){if(!e)return;const s=e[t];e[t]=e[i],e[i]=s}static canBeRotated(e){var t;return!(!e||e.w===e.h||e.locked||e.noResize||(t=e.grid)!=null&&t.opts.disableResize||e.minW&&e.minW===e.maxW||e.minH&&e.minH===e.maxH)}}class N{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=e.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0,t=!0){return!!this.batchMode===e?this:(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify()),this)}_useEntireRowArea(e,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||t.y<=e.y)}_fixCollisions(e,t=e,i,s={}){if(this.sortNodes(-1),i=i||this.collide(e,t),!i)return!1;if(e._moving&&!s.nested&&!this.float&&this.swap(e,i))return!0;let r=t;!this._loading&&this._useEntireRowArea(e,t)&&(r={x:0,w:this.column,y:t.y,h:t.h},i=this.collide(e,r,s.skip));let o=!1;const n={nested:!0,pack:!1};let h=0;for(;i=i||this.collide(e,r,s.skip);){if(h++>this.nodes.length*2)throw new Error("Infinite collide check");let d;if(i.locked||this._loading||e._moving&&!e._skipDown&&t.y>e.y&&!this.float&&(!this.collide(i,{...i,y:e.y},e)||!this.collide(i,{...i,y:t.y-i.h},e))){e._skipDown=e._skipDown||t.y>e.y;const c={...t,y:i.y+i.h,...n};d=this._loading&&l.samePos(e,c)?!0:this.moveNode(e,c),(i.locked||this._loading)&&d?l.copyPos(t,e):!i.locked&&d&&s.pack&&(this._packNodes(),t.y=i.y+i.h,l.copyPos(e,t)),o=o||d}else d=this.moveNode(i,{...i,y:t.y+t.h,skip:e,...n});if(!d)return o;i=void 0}return o}collide(e,t=e,i){const s=e._id,r=i==null?void 0:i._id;return this.nodes.find(o=>o._id!==s&&o._id!==r&&l.isIntercepted(o,t))}collideAll(e,t=e,i){const s=e._id,r=i==null?void 0:i._id;return this.nodes.filter(o=>o._id!==s&&o._id!==r&&l.isIntercepted(o,t))}directionCollideCoverage(e,t,i){if(!t.rect||!e._rect)return;const s=e._rect,r={...t.rect};r.y>s.y?(r.h+=r.y-s.y,r.y=s.y):r.h+=s.y-r.y,r.x>s.x?(r.w+=r.x-s.x,r.x=s.x):r.w+=s.x-r.x;let o,n=.5;for(let h of i){if(h.locked||!h._rect)break;const d=h._rect;let c=Number.MAX_VALUE,u=Number.MAX_VALUE;s.y<d.y?c=(r.y+r.h-d.y)/d.h:s.y+s.h>d.y+d.h&&(c=(d.y+d.h-r.y)/d.h),s.x<d.x?u=(r.x+r.w-d.x)/d.w:s.x+s.w>d.x+d.w&&(u=(d.x+d.w-r.x)/d.w);const g=Math.min(u,c);g>n&&(n=g,o=h)}return t.collide=o,o}cacheRects(e,t,i,s,r,o){return this.nodes.forEach(n=>n._rect={y:n.y*t+i,x:n.x*e+o,w:n.w*e-o-s,h:n.h*t-i-r}),this}swap(e,t){if(!t||t.locked||!e||e.locked)return!1;function i(){const r=t.x,o=t.y;return t.x=e.x,t.y=e.y,e.h!=t.h?(e.x=r,e.y=t.y+t.h):e.w!=t.w?(e.x=t.x+t.w,e.y=o):(e.x=r,e.y=o),e._dirty=t._dirty=!0,!0}let s;if(e.w===t.w&&e.h===t.h&&(e.x===t.x||e.y===t.y)&&(s=l.isTouching(e,t)))return i();if(s!==!1){if(e.w===t.w&&e.x===t.x&&(s||(s=l.isTouching(e,t)))){if(t.y<e.y){const r=e;e=t,t=r}return i()}if(s!==!1){if(e.h===t.h&&e.y===t.y&&(s||(s=l.isTouching(e,t)))){if(t.x<e.x){const r=e;e=t,t=r}return i()}return!1}}}isAreaEmpty(e,t,i,s){const r={x:e||0,y:t||0,w:i||1,h:s||1};return!this.collide(r)}compact(e="compact",t=!0){if(this.nodes.length===0)return this;t&&this.sortNodes();const i=this.batchMode;i||this.batchUpdate();const s=this._inColumnResize;s||(this._inColumnResize=!0);const r=this.nodes;return this.nodes=[],r.forEach((o,n,h)=>{let d;o.locked||(o.autoPosition=!0,e==="list"&&n&&(d=h[n-1])),this.addNode(o,!1,d)}),s||delete this._inColumnResize,i||this.batchUpdate(!1),this}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e=1){return this.nodes=l.sort(this.nodes,e),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(e=>{if(e._updating||e._orig===void 0||e.y===e._orig.y)return;let t=e.y;for(;t>e._orig.y;)--t,this.collide(e,{x:e.x,y:t,w:e.w,h:e.h})||(e._dirty=!0,e.y=t)}):this.nodes.forEach((e,t)=>{if(!e.locked)for(;e.y>0;){const i=t===0?0:e.y-1;if(!(t===0||!this.collide(e,{x:e.x,y:i,w:e.w,h:e.h})))break;e._dirty=e.y!==i,e.y=i}}),this)}prepareNode(e,t){e._id=e._id??N._idSeq++;const i=e.id;if(i){let r=1;for(;this.nodes.find(o=>o.id===e.id&&o!==e);)e.id=i+"_"+r++}(e.x===void 0||e.y===void 0||e.x===null||e.y===null)&&(e.autoPosition=!0);const s={x:0,y:0,w:1,h:1};return l.defaults(e,s),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,l.sanitizeMinMax(e),typeof e.x=="string"&&(e.x=Number(e.x)),typeof e.y=="string"&&(e.y=Number(e.y)),typeof e.w=="string"&&(e.w=Number(e.w)),typeof e.h=="string"&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=s.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=s.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=s.w),isNaN(e.h)&&(e.h=s.h),this.nodeBoundFix(e,t),e}nodeBoundFix(e,t){const i=e._orig||l.copyPos({},e);if(e.maxW&&e.w&&(e.w=Math.min(e.w,e.maxW)),e.maxH&&e.h&&(e.h=Math.min(e.h,e.maxH)),e.minW&&e.w&&e.minW<=this.column&&(e.w=Math.max(e.w,e.minW)),e.minH&&e.h&&(e.h=Math.max(e.h,e.minH)),(e.x||0)+(e.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&e._id&&this.findCacheLayout(e,this.defaultColumn)===-1){const r={...e};r.autoPosition||r.x===void 0?(delete r.x,delete r.y):r.x=Math.min(this.defaultColumn-1,r.x),r.w=Math.min(this.defaultColumn,r.w||1),this.cacheOneLayout(r,this.defaultColumn)}return e.w>this.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(t?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(t?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),l.samePos(e,i)||(e._dirty=!0),this}getDirtyNodes(e){return e?this.nodes.filter(t=>t._dirty&&!l.samePos(t,t._orig)):this.nodes.filter(t=>t._dirty)}_notify(e){if(this.batchMode||!this.onChange)return this;const t=(e||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(e=>{delete e._dirty,delete e._lastTried}),this)}saveInitial(){return this.nodes.forEach(e=>{e._orig=l.copyPos({},e),delete e._dirty}),this._hasLocked=this.nodes.some(e=>e.locked),this}restoreInitial(){return this.nodes.forEach(e=>{!e._orig||l.samePos(e,e._orig)||(l.copyPos(e,e._orig),e._dirty=!0)}),this._notify(),this}findEmptyPosition(e,t=this.nodes,i=this.column,s){const r=s?s.y*i+(s.x+s.w):0;let o=!1;for(let n=r;!o;++n){const h=n%i,d=Math.floor(n/i);if(h+e.w>i)continue;const c={x:h,y:d,w:e.w,h:e.h};t.find(u=>l.isIntercepted(c,u))||((e.x!==h||e.y!==d)&&(e._dirty=!0),e.x=h,e.y=d,delete e.autoPosition,o=!0)}return o}addNode(e,t=!1,i){const s=this.nodes.find(o=>o._id===e._id);if(s)return s;this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e),delete e._temporaryRemoved,delete e._removeDOM;let r;return e.autoPosition&&this.findEmptyPosition(e,this.nodes,this.column,i)&&(delete e.autoPosition,r=!0),this.nodes.push(e),t&&this.addedNodes.push(e),r||this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e}removeNode(e,t=!0,i=!1){return this.nodes.find(s=>s._id===e._id)?(i&&this.removedNodes.push(e),t&&(e._removeDOM=!0),this.nodes=this.nodes.filter(s=>s._id!==e._id),e._isAboutToRemove||this._packNodes(),this._notify([e]),this):this}removeAll(e=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;e&&this.nodes.forEach(s=>s._removeDOM=!0);const i=this.nodes;return this.removedNodes=t?i:[],this.nodes=[],this._notify(i)}moveNodeCheck(e,t){if(!this.changedPosConstrain(e,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(e,t);let i;const s=new N({column:this.column,float:this.float,nodes:this.nodes.map(o=>o._id===e._id?(i={...o},i):{...o})});if(!i)return!1;const r=s.moveNode(i,t)&&s.getRow()<=Math.max(this.getRow(),this.maxRow);if(!r&&!t.resizing&&t.collide){const o=t.collide.el.gridstackNode;if(this.swap(e,o))return this._notify(),!0}return r?(s.nodes.filter(o=>o._dirty).forEach(o=>{const n=this.nodes.find(h=>h._id===o._id);n&&(l.copyPos(n,o),n._dirty=!0)}),this._notify(),!0):!1}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;const t=new N({column:this.column,float:this.float,nodes:this.nodes.map(s=>({...s}))}),i={...e};return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,t.addNode(i),t.getRow()<=this.maxRow?(e._willFitPos=l.copyPos({},i),!0):!1}changedPosConstrain(e,t){return t.w=t.w||e.w,t.h=t.h||e.h,e.x!==t.x||e.y!==t.y?!0:(e.maxW&&(t.w=Math.min(t.w,e.maxW)),e.maxH&&(t.h=Math.min(t.h,e.maxH)),e.minW&&(t.w=Math.max(t.w,e.minW)),e.minH&&(t.h=Math.max(t.h,e.minH)),e.w!==t.w||e.h!==t.h)}moveNode(e,t){var d,c;if(!e||!t)return!1;let i;t.pack===void 0&&!this.batchMode&&(i=t.pack=!0),typeof t.x!="number"&&(t.x=e.x),typeof t.y!="number"&&(t.y=e.y),typeof t.w!="number"&&(t.w=e.w),typeof t.h!="number"&&(t.h=e.h);const s=e.w!==t.w||e.h!==t.h,r=l.copyPos({},e,!0);if(l.copyPos(r,t),this.nodeBoundFix(r,s),l.copyPos(t,r),!t.forceCollide&&l.samePos(e,t))return!1;const o=l.copyPos({},e),n=this.collideAll(e,r,t.skip);let h=!0;if(n.length){const u=e._moving&&!t.nested;let g=u?this.directionCollideCoverage(e,t,n):n[0];if(u&&g&&((c=(d=e.grid)==null?void 0:d.opts)!=null&&c.subGridDynamic)&&!e.grid._isTemp){const b=l.areaIntercept(t.rect,g._rect),E=l.area(t.rect),w=l.area(g._rect);b/(E<w?E:w)>.8&&(g.grid.makeSubGrid(g.el,void 0,e),g=void 0)}g?h=!this._fixCollisions(e,r,g,t):(h=!1,i&&delete t.pack)}return h&&!l.samePos(e,r)&&(e._dirty=!0,l.copyPos(e,r)),t.pack&&this._packNodes()._notify(),!l.samePos(e,o)}getRow(){return this.nodes.reduce((e,t)=>Math.max(e,t.y+t.h),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const e=this.nodes.find(t=>t._updating);return e&&(delete e._updating,delete e._skipDown),this}save(e=!0,t){var o;const i=(o=this._layouts)==null?void 0:o.length,s=i&&this.column!==i-1?this._layouts[i-1]:null,r=[];return this.sortNodes(),this.nodes.forEach(n=>{const h=s==null?void 0:s.find(c=>c._id===n._id),d={...n,...h||{}};l.removeInternalForSave(d,!e),t&&t(n,d),r.push(d)}),r}layoutsNodesChange(e){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((t,i)=>{if(!t||i===this.column)return this;if(i<this.column)this._layouts[i]=void 0;else{const s=i/this.column;e.forEach(r=>{if(!r._orig)return;const o=t.find(n=>n._id===r._id);o&&(o.y>=0&&r.y!==r._orig.y&&(o.y+=r.y-r._orig.y),r.x!==r._orig.x&&(o.x=Math.round(r.x*s)),r.w!==r._orig.w&&(o.w=Math.round(r.w*s)))})}}),this)}columnChanged(e,t,i="moveScale"){var n;if(!this.nodes.length||!t||e===t)return this;const s=i==="compact"||i==="list";s&&this.sortNodes(1),t<e&&this.cacheLayout(this.nodes,e),this.batchUpdate();let r=[],o=s?this.nodes:l.sort(this.nodes,-1);if(t>e&&this._layouts){const h=this._layouts[t]||[],d=this._layouts.length-1;!h.length&&e!==d&&((n=this._layouts[d])!=null&&n.length)&&(e=d,this._layouts[d].forEach(c=>{const u=o.find(g=>g._id===c._id);u&&(!s&&!c.autoPosition&&(u.x=c.x??u.x,u.y=c.y??u.y),u.w=c.w??u.w,(c.x==null||c.y===void 0)&&(u.autoPosition=!0))})),h.forEach(c=>{const u=o.findIndex(g=>g._id===c._id);if(u!==-1){const g=o[u];if(s){g.w=c.w;return}(c.autoPosition||isNaN(c.x)||isNaN(c.y))&&this.findEmptyPosition(c,r),c.autoPosition||(g.x=c.x??g.x,g.y=c.y??g.y,g.w=c.w??g.w,r.push(g)),o.splice(u,1)}})}if(s)this.compact(i,!1);else{if(o.length)if(typeof i=="function")i(t,e,r,o);else{const h=s||i==="none"?1:t/e,d=i==="move"||i==="moveScale",c=i==="scale"||i==="moveScale";o.forEach(u=>{u.x=t===1?0:d?Math.round(u.x*h):Math.min(u.x,t-1),u.w=t===1||e===1?1:c?Math.round(u.w*h)||1:Math.min(u.w,t),r.push(u)}),o=[]}r=l.sort(r,-1),this._inColumnResize=!0,this.nodes=[],r.forEach(h=>{this.addNode(h,!1),delete h._orig})}return this.nodes.forEach(h=>delete h._orig),this.batchUpdate(!1,!s),delete this._inColumnResize,this}cacheLayout(e,t,i=!1){const s=[];return e.forEach((r,o)=>{if(r._id===void 0){const n=r.id?this.nodes.find(h=>h.id===r.id):void 0;r._id=(n==null?void 0:n._id)??N._idSeq++}s[o]={x:r.x,y:r.y,w:r.w,_id:r._id}}),this._layouts=i?[]:this._layouts||[],this._layouts[t]=s,this}cacheOneLayout(e,t){e._id=e._id??N._idSeq++;const i={x:e.x,y:e.y,w:e.w,_id:e._id};(e.autoPosition||e.x===void 0)&&(delete i.x,delete i.y,e.autoPosition&&(i.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const s=this.findCacheLayout(e,t);return s===-1?this._layouts[t].push(i):this._layouts[t][s]=i,this}findCacheLayout(e,t){var i,s;return((s=(i=this._layouts)==null?void 0:i[t])==null?void 0:s.findIndex(r=>r._id===e._id))??-1}removeNodeFromLayoutCache(e){if(this._layouts)for(let t=0;t<this._layouts.length;t++){const i=this.findCacheLayout(e,t);i!==-1&&this._layouts[t].splice(i,1)}}cleanupNode(e){for(const t in e)t[0]==="_"&&t!=="_id"&&delete e[t];return this}}N._idSeq=0;const S={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};class y{}const z=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class H{}function U(f,e){if(f.touches.length>1)return;f.cancelable&&f.preventDefault();const t=f.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(i)}function pe(f,e){f.cancelable&&f.preventDefault();const t=document.createEvent("MouseEvents");t.initMouseEvent(e,!0,!0,window,1,f.screenX,f.screenY,f.clientX,f.clientY,!1,!1,!1,!1,0,null),f.target.dispatchEvent(t)}function W(f){H.touchHandled||(H.touchHandled=!0,U(f,"mousedown"))}function V(f){H.touchHandled&&U(f,"mousemove")}function K(f){if(!H.touchHandled)return;H.pointerLeaveTimeout&&(window.clearTimeout(H.pointerLeaveTimeout),delete H.pointerLeaveTimeout);const e=!!y.dragElement;U(f,"mouseup"),e||U(f,"click"),H.touchHandled=!1}function Y(f){f.pointerType!=="mouse"&&f.target.releasePointerCapture(f.pointerId)}function me(f){y.dragElement&&f.pointerType!=="mouse"&&pe(f,"mouseenter")}function ye(f){y.dragElement&&f.pointerType!=="mouse"&&(H.pointerLeaveTimeout=window.setTimeout(()=>{delete H.pointerLeaveTimeout,pe(f,"mouseleave")},10))}class j{constructor(e,t,i){this.host=e,this.dir=t,this.option=i,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){const e=this.el=document.createElement("div");return e.classList.add("ui-resizable-handle"),e.classList.add(`${j.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),z&&(this.el.addEventListener("touchstart",W),this.el.addEventListener("pointerdown",Y)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),z&&(this.el.removeEventListener("touchstart",W),this.el.removeEventListener("pointerdown",Y)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),z&&(this.el.addEventListener("touchmove",V),this.el.addEventListener("touchend",K)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e),document.addEventListener("keydown",this._keyEvent)),e.stopPropagation()}_mouseUp(e){this.moving&&(this._triggerEvent("stop",e),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),z&&(this.el.removeEventListener("touchmove",V),this.el.removeEventListener("touchend",K)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_keyEvent(e){var t,i;e.key==="Escape"&&((i=(t=this.host.gridstackNode)==null?void 0:t.grid)==null||i.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(e,t){return this.option[e]&&this.option[e](t),this}}j.prefix="ui-resizable-";class J{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](t)}}class q extends J{constructor(e,t={}){super(),this.el=e,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const s=this.el.parentElement.getBoundingClientRect(),r={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=this.temporalRect||r;return{position:{left:(o.left-s.left)*this.rectScale.x,top:(o.top-s.top)*this.rectScale.y},size:{width:o.width*this.rectScale.x,height:o.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(e){const t=e.handles&&e.handles!==this.option.handles,i=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach(s=>this.option[s]=e[s]),t&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),y.overResizeElement===this&&delete y.overResizeElement),this}_mouseOver(e){y.overResizeElement||y.dragElement||(y.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){y.overResizeElement===this&&(delete y.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(e=>e.trim()).map(e=>new j(this.el,e,{start:t=>{this._resizeStart(t)},stop:t=>{this._resizeStop(t)},move:t=>{this._resizing(t,e)}})),this}_resizeStart(e){this.sizeToContent=l.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=l.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=l.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(e,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,t),this._applyChange();const i=l.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(e){const t=l.initEvent(e,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=q._originStyleProp.map(i=>this.el.style[i]),this.parentOriginStylePosition=this.el.parentElement.style.position;const e=this.el.parentElement,t=l.getValuesFromTransformedElement(e);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return q._originStyleProp.forEach((e,t)=>{this.el.style[e]=this.elOriginStyleVal[t]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,t){const i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},r=e.clientX-i.clientX,o=this.sizeToContent?0:e.clientY-i.clientY;let n,h;t.indexOf("e")>-1?s.width+=r:t.indexOf("w")>-1&&(s.width-=r,s.left+=r,n=!0),t.indexOf("s")>-1?s.height+=o:t.indexOf("n")>-1&&(s.height-=o,s.top+=o,h=!0);const d=this._constrainSize(s.width,s.height,n,h);return Math.round(s.width)!==Math.round(d.width)&&(t.indexOf("w")>-1&&(s.left+=s.width-d.width),s.width=d.width),Math.round(s.height)!==Math.round(d.height)&&(t.indexOf("n")>-1&&(s.top+=s.height-d.height),s.height=d.height),s}_constrainSize(e,t,i,s){const r=this.option,o=(i?r.maxWidthMoveLeft:r.maxWidth)||Number.MAX_SAFE_INTEGER,n=r.minWidth/this.rectScale.x||e,h=(s?r.maxHeightMoveUp:r.maxHeight)||Number.MAX_SAFE_INTEGER,d=r.minHeight/this.rectScale.y||t,c=Math.min(o,Math.max(n,e)),u=Math.min(h,Math.max(d,t));return{width:c,height:u}}_applyChange(){let e={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const t=this.el.parentElement,{left:i,top:s}=t.getBoundingClientRect();e={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(t=>{const i=this.temporalRect[t],s=t==="width"||t==="left"?this.rectScale.x:t==="height"||t==="top"?this.rectScale.y:1;this.el.style[t]=(i-e[t])*s+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(e=>e.destroy()),delete this.handlers,this}}q._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const Ge='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class $ extends J{constructor(e,t={}){var r;super(),this.el=e,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const i=(r=t==null?void 0:t.handle)==null?void 0:r.substring(1),s=e.gridstackNode;this.dragEls=!i||e.classList.contains(i)?[e]:s!=null&&s.subGrid?[e.querySelector(t.handle)||e]:Array.from(e.querySelectorAll(t.handle)),this.dragEls.length===0&&(this.dragEls=[e]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(e=>{e.addEventListener("mousedown",this._mouseDown),z&&(e.addEventListener("touchstart",W),e.addEventListener("pointerdown",Y))}),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),z&&(t.removeEventListener("touchstart",W),t.removeEventListener("pointerdown",Y))}),e||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(e){return Object.keys(e).forEach(t=>this.option[t]=e[t]),this}_mouseDown(e){if(!y.mouseHandled)return e.button!==0||!this.dragEls.find(t=>t===e.target)&&e.target.closest(Ge)||this.option.cancel&&e.target.closest(this.option.cancel)||(this.mouseDownEvent=e,delete this.dragging,delete y.dragElement,delete y.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),z&&(e.currentTarget.addEventListener("touchmove",V),e.currentTarget.addEventListener("touchend",K)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),y.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=l.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(e){var i;const t=this.mouseDownEvent;if(this.lastDrag=e,this.dragging)if(this._dragFollow(e),y.pauseDrag){const s=Number.isInteger(y.pauseDrag)?y.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(e),s)}else this._callDrag(e);else if(Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>3){this.dragging=!0,y.dragElement=this;const s=(i=this.el.gridstackNode)==null?void 0:i.grid;s?y.dropElement=s.el.ddElement.ddDroppable:delete y.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=l.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment),this._setupHelperStyle(e);const r=l.initEvent(e,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(r,this.ui()),this.triggerEvent("dragstart",r),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(e){var t,i;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),z&&e.currentTarget&&(e.currentTarget.removeEventListener("touchmove",V,!0),e.currentTarget.removeEventListener("touchend",K,!0)),this.dragging){delete this.dragging,(t=this.el.gridstackNode)==null||delete t._origRotate,document.removeEventListener("keydown",this._keyEvent),((i=y.dropElement)==null?void 0:i.el)===this.el.parentElement&&delete y.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const s=l.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(s),this.triggerEvent("dragstop",s),y.dropElement&&y.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete y.dragElement,delete y.dropElement,delete y.mouseHandled,e.preventDefault()}_keyEvent(e){var s,r;const t=this.el.gridstackNode,i=(t==null?void 0:t.grid)||((r=(s=y.dropElement)==null?void 0:s.el)==null?void 0:r.gridstack);if(e.key==="Escape")t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),i==null||i.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&i&&(e.key==="r"||e.key==="R")){if(!l.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,i.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",l.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let e=this.el;return typeof this.option.helper=="function"?e=this.option.helper(this.el):this.option.helper==="clone"&&(e=l.cloneNode(this.el)),document.body.contains(e)||l.appendTo(e,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=$.originStyleProp.map(t=>this.el.style[t]),e}_setupHelperStyle(e){this.helper.classList.add("ui-draggable-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(e),t.transition="none",setTimeout(()=>{this.helper&&(t.transition=null)},0),this}_removeHelperStyle(){var t;this.helper.classList.remove("ui-draggable-dragging");const e=(t=this.helper)==null?void 0:t.gridstackNode;if(!(e!=null&&e._isAboutToRemove)&&this.dragElementOriginStyle){const i=this.helper,s=this.dragElementOriginStyle.transition||null;i.style.transition=this.dragElementOriginStyle.transition="none",$.originStyleProp.forEach(r=>i.style[r]=this.dragElementOriginStyle[r]||null),setTimeout(()=>i.style.transition=s,50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){const t={left:0,top:0},i=this.helper.style,s=this.dragOffset;i.left=(e.clientX+s.offsetLeft-t.left)*this.dragTransform.xScale+"px",i.top=(e.clientY+s.offsetTop-t.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,t,i){let s=0,r=0;i&&(s=this.dragTransform.xOffset,r=this.dragTransform.yOffset);const o=t.getBoundingClientRect();return{left:o.left,top:o.top,offsetLeft:-e.clientX+o.left-s,offsetTop:-e.clientY+o.top-r,width:o.width*this.dragTransform.xScale,height:o.height*this.dragTransform.yScale}}ui(){const t=this.el.parentElement.getBoundingClientRect(),i=this.helper.getBoundingClientRect();return{position:{top:(i.top-t.top)*this.dragTransform.yScale,left:(i.left-t.left)*this.dragTransform.xScale}}}}$.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class Ue extends J{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),z&&(this.el.addEventListener("pointerenter",me),this.el.addEventListener("pointerleave",ye)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),z&&(this.el.removeEventListener("pointerenter",me),this.el.removeEventListener("pointerleave",ye)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(t=>this.option[t]=e[t]),this._setupAccept(),this}_mouseEnter(e){if(!y.dragElement||!this._canDrop(y.dragElement.el))return;e.preventDefault(),e.stopPropagation(),y.dropElement&&y.dropElement!==this&&y.dropElement._mouseLeave(e,!0),y.dropElement=this;const t=l.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(y.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,t=!1){var s;if(!y.dragElement||y.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=l.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(y.dragElement)),this.triggerEvent("dropout",i),y.dropElement===this&&(delete y.dropElement,!t)){let r,o=this.el.parentElement;for(;!r&&o;)r=(s=o.ddElement)==null?void 0:s.ddDroppable,o=o.parentElement;r&&r._mouseEnter(e)}}drop(e){e.preventDefault();const t=l.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(y.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}}class Z{static init(e){return e.ddElement||(e.ddElement=new Z(e)),e.ddElement}constructor(e){this.el=e}on(e,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,t),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new $(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new q(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new Ue(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class We{resizable(e,t,i,s){return this._getDDElements(e).forEach(r=>{if(t==="disable"||t==="enable")r.ddResizable&&r.ddResizable[t]();else if(t==="destroy")r.ddResizable&&r.cleanResizable();else if(t==="option")r.setupResizable({[i]:s});else{const n=r.el.gridstackNode.grid;let h=r.el.getAttribute("gs-resize-handles")||n.opts.resizable.handles||"e,s,se";h==="all"&&(h="n,e,s,w,se,sw,ne,nw");const d=!n.opts.alwaysShowResizeHandle;r.setupResizable({...n.opts.resizable,handles:h,autoHide:d,start:t.start,stop:t.stop,resize:t.resize})}}),this}draggable(e,t,i,s){return this._getDDElements(e).forEach(r=>{if(t==="disable"||t==="enable")r.ddDraggable&&r.ddDraggable[t]();else if(t==="destroy")r.ddDraggable&&r.cleanDraggable();else if(t==="option")r.setupDraggable({[i]:s});else{const o=r.el.gridstackNode.grid;r.setupDraggable({...o.opts.draggable,start:t.start,stop:t.stop,drag:t.drag})}}),this}dragIn(e,t){return this._getDDElements(e).forEach(i=>i.setupDraggable(t)),this}droppable(e,t,i,s){return typeof t.accept=="function"&&!t._accept&&(t._accept=t.accept,t.accept=r=>t._accept(r)),this._getDDElements(e).forEach(r=>{t==="disable"||t==="enable"?r.ddDroppable&&r.ddDroppable[t]():t==="destroy"?r.ddDroppable&&r.cleanDroppable():t==="option"?r.setupDroppable({[i]:s}):r.setupDroppable(t)}),this}isDroppable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){var t;return!!((t=e==null?void 0:e.ddElement)!=null&&t.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach(s=>s.on(t,r=>{i(r,y.dragElement?y.dragElement.el:r.target,y.dragElement?y.dragElement.helper:null)})),this}off(e,t){return this._getDDElements(e).forEach(i=>i.off(t)),this}_getDDElements(e,t=!0){const i=l.getElements(e);if(!i.length)return[];const s=i.map(r=>r.ddElement||(t?Z.init(r):null));return t||s.filter(r=>r),s}}/*!
|
|
2
2
|
* GridStack 11.3.0
|
|
3
3
|
* https://gridstackjs.com/
|
|
4
4
|
*
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
7
7
|
*/const T=new We;class p{static init(e={},t=".grid-stack"){if(typeof document>"u")return null;const i=p.getGridElement(t);return i?(i.gridstack||(i.gridstack=new p(i,l.cloneDeep(e))),i.gridstack):(console.error(typeof t=="string"?'GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
|
|
8
8
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(e={},t=".grid-stack"){const i=[];return typeof document>"u"||(p.getGridElements(t).forEach(s=>{s.gridstack||(s.gridstack=new p(s,l.cloneDeep(e))),i.push(s.gridstack)}),i.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
|
|
9
|
-
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),i}static addGrid(e,t={}){if(!e)return null;let i=e;if(i.gridstack){const o=i.gridstack;return t&&(o.opts={...o.opts,...t}),t.children!==void 0&&o.load(t.children),o}return(!e.classList.contains("grid-stack")||p.addRemoveCB)&&(p.addRemoveCB?i=p.addRemoveCB(e,t,!0,!0):i=l.createDiv(["grid-stack",t.class],e)),p.init(t,i)}static registerEngine(e){p.engineClass=e}get placeholder(){if(!this._placeholder){this._placeholder=l.createDiv([this.opts.placeholderClass,S.itemClass,this.opts.itemClass]);const e=l.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(e.textContent=this.opts.placeholderText)}return this._placeholder}constructor(e,t={}){var u,g,b;this.el=e,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},e.gridstack=this,this.opts=t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const i=l.toNumber(e.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let s=(u=t.columnOpts)==null?void 0:u.breakpoints;const r=t;if(r.oneColumnModeDomSort&&(delete r.oneColumnModeDomSort,console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")),r.oneColumnSize||r.disableOneColumnMode===!1){const E=r.oneColumnSize||768;delete r.oneColumnSize,delete r.disableOneColumnMode,t.columnOpts=t.columnOpts||{},s=t.columnOpts.breakpoints=t.columnOpts.breakpoints||[];let w=s.find(_=>_.c===1);w?w.w=E:(w={c:1,w:E},s.push(w,{c:12,w:E+1}))}const o=t.columnOpts;o&&(!o.columnWidth&&!((g=o.breakpoints)!=null&&g.length)?(delete t.columnOpts,s=void 0):o.columnMax=o.columnMax||12),(s==null?void 0:s.length)>1&&s.sort((E,w)=>(w.w||0)-(E.w||0));const n={...l.cloneDeep(S),column:l.toNumber(e.getAttribute("gs-column"))||S.column,minRow:i||l.toNumber(e.getAttribute("gs-min-row"))||S.minRow,maxRow:i||l.toNumber(e.getAttribute("gs-max-row"))||S.maxRow,staticGrid:l.toBool(e.getAttribute("gs-static"))||S.staticGrid,sizeToContent:l.toBool(e.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||S.draggable.handle},removableOptions:{accept:t.itemClass||S.removableOptions.accept,decline:S.removableOptions.decline}};e.getAttribute("gs-animate")&&(n.animate=l.toBool(e.getAttribute("gs-animate"))),t=l.defaults(t,n),this._initMargin(),this.checkDynamicColumn(),this.el.classList.add("gs-"+t.column),t.rtl==="auto"&&(t.rtl=e.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const h=this.el.closest("."+S.itemClass),d=h==null?void 0:h.gridstackNode;d&&(d.subGrid=this,this.parentGridNode=d,this.el.classList.add("grid-stack-nested"),d.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==S.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit),this.cellHeight(t.cellHeight,!1)),t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=z),this._styleSheetClass="gs-id-"+N._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();const c=t.engineClass||p.engineClass||N;if(this.engine=new c({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:E=>{let w=0;this.engine.nodes.forEach(_=>{w=Math.max(w,_.y+_.h)}),E.forEach(_=>{const v=_.el;v&&(_._removeDOM?(v&&v.remove(),delete _._removeDOM):this._writePosAttr(v,_))}),this._updateStyles(!1,w)}}),this._updateStyles(!1,0),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(E=>this._prepareElement(E)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const E=t.children;delete t.children,E.length&&this.load(E)}this.setAnimation(),t.subGridDynamic&&!y.pauseDrag&&(y.pauseDrag=!0),((b=t.draggable)==null?void 0:b.pause)!==void 0&&(y.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}addWidget(e){if(typeof e=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(e.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(e);let t,i=e;if(i.grid=this,i!=null&&i.el?t=i.el:p.addRemoveCB?t=p.addRemoveCB(this.el,e,!0,!1):t=l.createWidgetDivs(this.opts.itemClass,i),!t)return;if(i=t.gridstackNode,i&&t.parentElement===this.el&&this.engine.nodes.find(r=>r._id===i._id))return t;const s=this._readAttr(t);return l.defaults(e,s),this.engine.prepareNode(e),this.el.appendChild(t),this.makeWidget(t,e),t}makeSubGrid(e,t,i,s=!0){var b,E,w;let r=e.gridstackNode;if(r||(r=this.makeWidget(e).gridstackNode),(b=r.subGrid)!=null&&b.el)return r.subGrid;let o,n=this;for(;n&&!o;)o=(E=n.opts)==null?void 0:E.subGridOpts,n=(w=n.parentGridNode)==null?void 0:w.grid;t=l.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...o||{},...t||r.subGridOpts||{}}),r.subGridOpts=t;let h;t.column==="auto"&&(h=!0,t.column=Math.max(r.w||1,(i==null?void 0:i.w)||1),delete t.columnOpts);let d=r.el.querySelector(".grid-stack-item-content"),c,u;if(s&&(this._removeDD(r.el),u={...r,x:0,y:0},l.removeInternalForSave(u),delete u.subGridOpts,r.content&&(u.content=r.content,delete r.content),p.addRemoveCB?c=p.addRemoveCB(this.el,u,!0,!1):(c=l.createDiv(["grid-stack-item"]),c.appendChild(d),d=l.createDiv(["grid-stack-item-content"],r.el)),this._prepareDragDropByNode(r)),i){const _=h?t.column:r.w,v=r.h+i.h,x=r.el.style;x.transition="none",this.update(r.el,{w:_,h:v}),setTimeout(()=>x.transition=null)}const g=r.subGrid=p.addGrid(d,t);return i!=null&&i._moving&&(g._isTemp=!0),h&&(g._autoColumn=!0),s&&g.makeWidget(c,u),i&&(i._moving?window.setTimeout(()=>l.simulateMouseEvent(i._event,"mouseenter",g.el),0):g.makeWidget(r.el,r)),this.resizeToContentCheck(!1,r),g}removeAsSubGrid(e){var i;const t=(i=this.parentGridNode)==null?void 0:i.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(s=>{s.x+=this.parentGridNode.x,s.y+=this.parentGridNode.y,t.makeWidget(s.el,s)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,e&&window.setTimeout(()=>l.simulateMouseEvent(e._event,"mouseenter",t.el),0))}save(e=!0,t=!1,i=p.saveCB){const s=this.engine.save(e,i);if(s.forEach(r=>{var o;if(e&&r.el&&!r.subGrid&&!i){const n=r.el.querySelector(".grid-stack-item-content");r.content=n==null?void 0:n.innerHTML,r.content||delete r.content}else if(!e&&!i&&delete r.content,(o=r.subGrid)!=null&&o.el){const n=r.subGrid.save(e,t,i);r.subGridOpts=t?n:{children:n},delete r.subGrid}delete r.el}),t){const r=l.cloneDeep(this.opts);r.marginBottom===r.marginTop&&r.marginRight===r.marginLeft&&r.marginTop===r.marginRight&&(r.margin=r.marginTop,delete r.marginTop,delete r.marginRight,delete r.marginBottom,delete r.marginLeft),r.rtl===(this.el.style.direction==="rtl")&&(r.rtl="auto"),this._isAutoCellHeight&&(r.cellHeight="auto"),this._autoColumn&&(r.column="auto");const o=r._alwaysShowResizeHandle;return delete r._alwaysShowResizeHandle,o!==void 0?r.alwaysShowResizeHandle=o:delete r.alwaysShowResizeHandle,l.removeInternalAndSame(r,S),r.children=s,r}return s}load(e,t=p.addRemoveCB||!0){var d;e=l.cloneDeep(e);const i=this.getColumn();e.forEach(c=>{c.w=c.w||1,c.h=c.h||1}),e=l.sort(e),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let s=0;e.forEach(c=>{s=Math.max(s,(c.x||0)+c.w)}),s>this.engine.defaultColumn&&(this.engine.defaultColumn=s),s>i&&this.engine.cacheLayout(e,s,!0);const r=p.addRemoveCB;typeof t=="function"&&(p.addRemoveCB=t);const o=[];this.batchUpdate();const n=!this.engine.nodes.length;n&&this.setAnimation(!1),!n&&t&&[...this.engine.nodes].forEach(u=>{if(!u.id)return;l.find(e,u.id)||(p.addRemoveCB&&p.addRemoveCB(this.el,u,!1,!1),o.push(u),this.removeWidget(u.el,!0,!1))}),this.engine._loading=!0;const h=[];return this.engine.nodes=this.engine.nodes.filter(c=>l.find(e,c.id)?(h.push(c),!1):!0),e.forEach(c=>{var g;const u=l.find(h,c.id);if(u){if(l.shouldSizeToContent(u)&&(c.h=u.h),this.engine.nodeBoundFix(c),(c.autoPosition||c.x===void 0||c.y===void 0)&&(c.w=c.w||u.w,c.h=c.h||u.h,this.engine.findEmptyPosition(c)),this.engine.nodes.push(u),l.samePos(u,c)&&this.engine.nodes.length>1&&(this.moveNode(u,{...c,forceCollide:!0}),l.copyPos(c,u)),this.update(u.el,c),(g=c.subGridOpts)!=null&&g.children){const b=u.el.querySelector(".grid-stack");b&&b.gridstack&&b.gridstack.load(c.subGridOpts.children)}}else t&&this.addWidget(c)}),delete this.engine._loading,this.engine.removedNodes=o,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,r?p.addRemoveCB=r:delete p.addRemoveCB,n&&((d=this.opts)!=null&&d.animate)&&this.setAnimation(this.opts.animate,!0),this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!e||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const s=l.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/s)}const i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(e,t=!0){if(t&&e!==void 0&&this._isAutoCellHeight!==(e==="auto")&&(this._isAutoCellHeight=e==="auto",this._updateResizeEvent()),(e==="initial"||e==="auto")&&(e=void 0),e===void 0){const s=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+s}const i=l.parseHeight(e);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.resizeToContentCheck(),t&&this._updateStyles(!0),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(e=!1){var t;return e&&((t=this.opts.columnOpts)!=null&&t.breakpointForWindow)?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var r,o;const e=this.opts.columnOpts;if(!e||!e.columnWidth&&!((r=e.breakpoints)!=null&&r.length))return!1;const t=this.getColumn();let i=t;const s=this._widthOrContainer(!0);if(e.columnWidth)i=Math.min(Math.round(s/e.columnWidth)||1,e.columnMax);else{i=e.columnMax;let n=0;for(;n<e.breakpoints.length&&s<=e.breakpoints[n].w;)i=e.breakpoints[n++].c||t}if(i!==t){const n=(o=e.breakpoints)==null?void 0:o.find(h=>h.c===i);return this.column(i,(n==null?void 0:n.layout)||e.layout),!0}return!1}compact(e="compact",t=!0){return this.engine.compact(e,t),this._triggerChangeEvent(),this}column(e,t="moveScale"){if(!e||e<1||this.opts.column===e)return this;const i=this.getColumn();return this.opts.column=e,this.engine?(this.engine.column=e,this.el.classList.remove("gs-"+i),this.el.classList.add("gs-"+e),this.engine.columnChanged(i,e,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(e=!0){var t,i;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),this.el.classList.remove(this._styleSheetClass),this.el.removeAttribute("gs-current-row")),this._removeStylesheet(),(t=this.parentGridNode)==null||delete t.subGrid,delete this.parentGridNode,delete this.opts,(i=this._placeholder)==null||delete i.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,t=!1){const i=this.el.getBoundingClientRect();let s;t?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};const r=e.left-s.left,o=e.top-s.top,n=i.width/this.getColumn(),h=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(r/n),y:Math.floor(o/h)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(e,t,i,s){return this.engine.isAreaEmpty(e,t,i,s)}makeWidget(e,t){const i=p.getElement(e);if(!i)return;i.parentElement||this.el.appendChild(i),this._prepareElement(i,!0,t);const s=i.gridstackNode;this._updateContainerHeight(),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1);let r;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(r=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),r&&delete this._ignoreLayoutsNodeChange,i}on(e,t){return e.indexOf(" ")!==-1?(e.split(" ").forEach(s=>this.on(s,t)),this):(e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable"?(e==="enable"||e==="disable"?this._gsEventHandler[e]=s=>t(s):this._gsEventHandler[e]=s=>{s.detail&&t(s,s.detail)},this.el.addEventListener(e,this._gsEventHandler[e])):e==="drag"||e==="dragstart"||e==="dragstop"||e==="resizestart"||e==="resize"||e==="resizestop"||e==="dropped"||e==="resizecontent"?this._gsEventHandler[e]=t:console.error("GridStack.on("+e+") event not supported"),this)}off(e){return e.indexOf(" ")!==-1?(e.split(" ").forEach(i=>this.off(i)),this):((e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable")&&this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(e=>this.off(e)),this}removeWidget(e,t=!0,i=!0){return e?(p.getElements(e).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let r=s.gridstackNode;r||(r=this.engine.nodes.find(o=>s===o.el)),r&&(t&&p.addRemoveCB&&p.addRemoveCB(this.el,r,!1,!1),delete s.gridstackNode,this._removeDD(s),this.engine.removeNode(r,t,i),t&&s.parentElement&&s.remove())}),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(e=!0,t=!0){return this.engine.nodes.forEach(i=>{e&&p.addRemoveCB&&p.addRemoveCB(this.el,i,!1,!1),delete i.el.gridstackNode,this.opts.staticGrid||this._removeDD(i.el)}),this.engine.removeAll(e,t),t&&this._triggerRemoveEvent(),this}setAnimation(e=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(e)}):e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(e,t=!0,i=!0){return!!this.opts.staticGrid===e?this:(e?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(e,t,i)}),t&&this._setStaticClass(),this)}update(e,t){if(arguments.length>2){console.warn("gridstack.ts: `update(el, x, y, w, h)` is deprecated. Use `update(el, {x, w, content, ...})`. It will be removed soon");const i=arguments;let s=1;return t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return p.getElements(e).forEach(i=>{var c;const s=i==null?void 0:i.gridstackNode;if(!s)return;const r=l.cloneDeep(t);this.engine.nodeBoundFix(r),delete r.autoPosition;const o=["x","y","w","h"];let n;if(o.some(u=>r[u]!==void 0&&r[u]!==s[u])&&(n={},o.forEach(u=>{n[u]=r[u]!==void 0?r[u]:s[u],delete r[u]})),!n&&(r.minW||r.minH||r.maxW||r.maxH)&&(n={}),r.content!==void 0){const u=i.querySelector(".grid-stack-item-content");u&&u.textContent!==r.content&&(s.content=r.content,p.renderCB(u,r),(c=s.subGrid)!=null&&c.el&&(u.appendChild(s.subGrid.el),s.subGrid.opts.styleInHead||s.subGrid._updateStyles(!0))),delete r.content}let h=!1,d=!1;for(const u in r)u[0]!=="_"&&s[u]!==r[u]&&(s[u]=r[u],h=!0,d=d||!this.opts.staticGrid&&(u==="noResize"||u==="noMove"||u==="locked"));if(l.sanitizeMinMax(s),n){const u=n.w!==void 0&&n.w!==s.w;this.moveNode(s,n),u&&s.subGrid?s.subGrid.onResize(this.hasAnimationCSS()?s.w:void 0):this.resizeToContentCheck(u,s),delete s._orig}(n||h)&&this._writeAttr(i,s),d&&this._prepareDragDropByNode(s)}),this}moveNode(e,t){const i=e._updating;i||this.engine.cleanNodes().beginUpdate(e),this.engine.moveNode(e,t),this._updateContainerHeight(),i||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(e){var g,b;if(!e||(e.classList.remove("size-to-content-max"),!e.clientHeight))return;const t=e.gridstackNode;if(!t)return;const i=t.grid;if(!i||e.parentElement!==i.el)return;const s=i.getCellHeight(!0);if(!s)return;let r=t.h?t.h*s:e.clientHeight,o;if(t.resizeToContentParent&&(o=e.querySelector(t.resizeToContentParent)),o||(o=e.querySelector(p.resizeToContentParent)),!o)return;const n=e.clientHeight-o.clientHeight,h=t.h?t.h*s-n:o.clientHeight;let d;if(t.subGrid){d=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const E=t.subGrid.el.getBoundingClientRect(),w=t.subGrid.el.parentElement.getBoundingClientRect();d+=E.top-w.top}else{if((b=(g=t.subGridOpts)==null?void 0:g.children)!=null&&b.length)return;{const E=o.firstElementChild;if(!E){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${p.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}d=E.getBoundingClientRect().height||h}}if(h===d)return;r+=d-h;let c=Math.ceil(r/s);const u=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;u&&c>u&&(c=u,e.classList.add("size-to-content-max")),t.minH&&c<t.minH?c=t.minH:t.maxH&&c>t.maxH&&(c=t.maxH),c!==t.h&&(i._ignoreLayoutsNodeChange=!0,i.moveNode(t,{h:c}),delete i._ignoreLayoutsNodeChange)}resizeToContentCBCheck(e){p.resizeToContentCB?p.resizeToContentCB(e):this.resizeToContent(e)}rotate(e,t){return p.getElements(e).forEach(i=>{const s=i.gridstackNode;if(!l.canBeRotated(s))return;const r={w:s.h,h:s.w,minH:s.minW,minW:s.minH,maxH:s.maxW,maxW:s.maxH};if(t){const n=t.left>0?Math.floor(t.left/this.cellWidth()):0,h=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;r.x=s.x+n-(s.h-(h+1)),r.y=s.y+h-n}Object.keys(r).forEach(n=>{r[n]===void 0&&delete r[n]});const o=s._orig;this.update(i,r),s._orig=o}),this}margin(e){if(!(typeof e=="string"&&e.split(" ").length>1)){const i=l.parseHeight(e);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return}return this.opts.margin=e,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this._updateStyles(!0),this}getMargin(){return this.opts.margin}willItFit(e){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const t=arguments;let i=0,s={x:t[i++],y:t[i++],w:t[i++],h:t[i++],autoPosition:t[i++]};return this.willItFit(s)}return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.addedNodes)!=null&&e.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});const t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.removedNodes)!=null&&e.length){const t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(e,t){const i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){if(this._styles){const e=this.opts.styleInHead?void 0:this.el.parentNode;l.removeStylesheet(this._styleSheetClass,e),delete this._styles}return this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t===void 0&&(t=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit,r=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){const o=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=l.createStylesheet(this._styleSheetClass,o,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,l.addCSSRule(this._styles,r,`height: ${i}${s}`);const n=this.opts.marginTop+this.opts.marginUnit,h=this.opts.marginBottom+this.opts.marginUnit,d=this.opts.marginRight+this.opts.marginUnit,c=this.opts.marginLeft+this.opts.marginUnit,u=`${r} > .grid-stack-item-content`,g=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;l.addCSSRule(this._styles,u,`top: ${n}; right: ${d}; bottom: ${h}; left: ${c};`),l.addCSSRule(this._styles,g,`top: ${n}; right: ${d}; bottom: ${h}; left: ${c};`),l.addCSSRule(this._styles,`${r} > .ui-resizable-n`,`top: ${n};`),l.addCSSRule(this._styles,`${r} > .ui-resizable-s`,`bottom: ${h}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-ne`,`right: ${d}; top: ${n}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-e`,`right: ${d}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-se`,`right: ${d}; bottom: ${h}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-nw`,`left: ${c}; top: ${n}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-w`,`left: ${c}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-sw`,`left: ${c}; bottom: ${h}`)}if(t=t||this._styles._max,t>this._styles._max){const o=n=>i*n+s;for(let n=this._styles._max+1;n<=t;n++)l.addCSSRule(this._styles,`${r}[gs-y="${n}"]`,`top: ${o(n)}`),l.addCSSRule(this._styles,`${r}[gs-h="${n+1}"]`,`height: ${o(n+1)}`);this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const e=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit;if(!i)return this;if(!e){const r=l.parseHeight(getComputedStyle(this.el).minHeight);if(r.h>0&&r.unit===s){const o=Math.floor(r.h/i);t<o&&(t=o)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[e?"minHeight":"height"]=t*i+s),e&&!e.grid.engine.batchMode&&l.shouldSizeToContent(e)&&e.grid.resizeToContentCBCheck(e.el),this}_prepareElement(e,t=!1,i){i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this,i=this.engine.addNode(i,t),this._writeAttr(e,i),e.classList.add(S.itemClass,this.opts.itemClass);const s=l.shouldSizeToContent(i);return s?e.classList.add("size-to-content"):e.classList.remove("size-to-content"),s&&this.resizeToContentCheck(!1,i),this._prepareDragDropByNode(i),this}_writePosAttr(e,t){return t.x!==void 0&&t.x!==null&&e.setAttribute("gs-x",String(t.x)),t.y!==void 0&&t.y!==null&&e.setAttribute("gs-y",String(t.y)),t.w>1?e.setAttribute("gs-w",String(t.w)):e.removeAttribute("gs-w"),t.h>1?e.setAttribute("gs-h",String(t.h)):e.removeAttribute("gs-h"),this}_writeAttr(e,t){if(!t)return this;this._writePosAttr(e,t);const i={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e,t=!0){const i={};i.x=l.toNumber(e.getAttribute("gs-x")),i.y=l.toNumber(e.getAttribute("gs-y")),i.w=l.toNumber(e.getAttribute("gs-w")),i.h=l.toNumber(e.getAttribute("gs-h")),i.autoPosition=l.toBool(e.getAttribute("gs-auto-position")),i.noResize=l.toBool(e.getAttribute("gs-no-resize")),i.noMove=l.toBool(e.getAttribute("gs-no-move")),i.locked=l.toBool(e.getAttribute("gs-locked")),i.sizeToContent=l.toBool(e.getAttribute("gs-size-to-content")),i.id=e.getAttribute("gs-id"),i.maxW=l.toNumber(e.getAttribute("gs-max-w")),i.minW=l.toNumber(e.getAttribute("gs-min-w")),i.maxH=l.toNumber(e.getAttribute("gs-max-h")),i.minH=l.toNumber(e.getAttribute("gs-min-h")),t&&(i.w===1&&e.removeAttribute("gs-w"),i.h===1&&e.removeAttribute("gs-h"),i.maxW&&e.removeAttribute("gs-max-w"),i.minW&&e.removeAttribute("gs-min-w"),i.maxH&&e.removeAttribute("gs-max-h"),i.minH&&e.removeAttribute("gs-min-h"));for(const s in i){if(!i.hasOwnProperty(s))return;!i[s]&&i[s]!==0&&delete i[s]}return i}_setStaticClass(){const e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onResize(e=(t=>(t=this.el)==null?void 0:t.clientWidth)()){if(!e||this.prevWidth===e)return;this.prevWidth=e,this.batchUpdate();let i=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),i=!0):i=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(s=>{s.subGrid&&s.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(i),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(e=!1,t=void 0){if(this.engine){if(e&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)l.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(i=>l.shouldSizeToContent(i))){const i=[...this.engine.nodes];this.batchUpdate(),i.forEach(s=>{l.shouldSizeToContent(s)&&this.resizeToContentCBCheck(s.el)}),this.batchUpdate(!1)}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(e=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(i=>i.sizeToContent));return!e&&t&&!this.resizeObserver?(this._sizeThrottle=l.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(e||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(e=".grid-stack-item"){return l.getElement(e)}static getElements(e=".grid-stack-item"){return l.getElements(e)}static getGridElement(e){return p.getElement(e)}static getGridElements(e){return l.getElements(e)}_initMargin(){let e,t=0,i=[];return typeof this.opts.margin=="string"&&(i=this.opts.margin.split(" ")),i.length===2?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):i.length===4?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(e=l.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,t=this.opts.margin=e.h),this.opts.marginTop===void 0?this.opts.marginTop=t:(e=l.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=t:(e=l.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=t:(e=l.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=t:(e=l.parseHeight(this.opts.marginLeft),this.opts.marginLeft=e.h,delete this.opts.margin),this.opts.marginUnit=e.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop),this}static getDD(){return T}static setupDragIn(e,t,i,s=document){(t==null?void 0:t.pause)!==void 0&&(y.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof e=="string"?l.getElements(e,s):e).forEach((o,n)=>{T.isDraggable(o)||T.dragIn(o,t),i!=null&&i[n]&&(o.gridstackNode=i[n])})}movable(e,t){return this.opts.staticGrid?this:(p.getElements(e).forEach(i=>{const s=i.gridstackNode;s&&(t?delete s.noMove:s.noMove=!0,this._prepareDragDropByNode(s))}),this)}resizable(e,t){return this.opts.staticGrid?this:(p.getElements(e).forEach(i=>{const s=i.gridstackNode;s&&(t?delete s.noResize:s.noResize=!0,this._prepareDragDropByNode(s))}),this)}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,t=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&t&&i.subGrid.enableMove(e,t)}),this)}enableResize(e,t=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&t&&i.subGrid.enableResize(e,t)}),this)}cancelDrag(){var t;const e=(t=this._placeholder)==null?void 0:t.gridstackNode;e&&(e._isExternal?(e._isAboutToRemove=!0,this.engine.removeNode(e)):e._isAboutToRemove&&p._itemRemoving(e.el,!1),this.engine.restoreInitial())}_removeDD(e){return T.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return T.droppable(this.el,"destroy"),this;let e,t;const i=(s,r,o)=>{var g;o=o||r;const n=o.gridstackNode;if(!n)return;if(!((g=n.grid)!=null&&g.el)){o.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const b=o.getBoundingClientRect();o.style.left=b.x+(this.dragTransform.xScale-1)*(s.clientX-b.x)/this.dragTransform.xScale+"px",o.style.top=b.y+(this.dragTransform.yScale-1)*(s.clientY-b.y)/this.dragTransform.yScale+"px",o.style.transformOrigin="0px 0px"}let{top:h,left:d}=o.getBoundingClientRect();const c=this.el.getBoundingClientRect();d-=c.left,h-=c.top;const u={position:{top:h*this.dragTransform.xScale,left:d*this.dragTransform.yScale}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(d/t)),n.y=Math.max(0,Math.round(h/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n)){T.off(r,"drag");return}n._willFitPos&&(l.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(o,s,u,n,t,e)}else this._dragOrResize(o,s,u,n,t,e)};return T.droppable(this.el,{accept:s=>{const r=s.gridstackNode||this._readAttr(s,!1);if((r==null?void 0:r.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let o=!0;if(typeof this.opts.acceptWidgets=="function")o=this.opts.acceptWidgets(s);else{const n=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;o=s.matches(n)}if(o&&r&&this.opts.maxRow){const n={w:r.w,h:r.h,minW:r.minW,minH:r.minH};o=this.engine.willItFit(n)}return o}}).on(this.el,"dropover",(s,r,o)=>{let n=(o==null?void 0:o.gridstackNode)||r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._temporaryRemoved)return!1;if(n!=null&&n.grid&&n.grid!==this&&!n._temporaryRemoved&&n.grid._leave(r,o),o=o||r,t=this.cellWidth(),e=this.getCellHeight(!0),!n){const c=o.getAttribute("data-gs-widget")||o.getAttribute("gridstacknode");if(c){try{n=JSON.parse(c)}catch{console.error("Gridstack dropover: Bad JSON format: ",c)}o.removeAttribute("data-gs-widget"),o.removeAttribute("gridstacknode")}n||(n=this._readAttr(o))}n.grid||(n.el||(n={...n}),n._isExternal=!0,o.gridstackNode=n);const h=n.w||Math.round(o.offsetWidth/t)||1,d=n.h||Math.round(o.offsetHeight/e)||1;return n.grid&&n.grid!==this?(r._gridstackNodeOrig||(r._gridstackNodeOrig=n),r.gridstackNode=n={...n,w:h,h:d,grid:this},delete n.x,delete n.y,this.engine.cleanupNode(n).nodeBoundFix(n),n._initDD=n._isExternal=n._temporaryRemoved=!0):(n.w=h,n.h=d,n._temporaryRemoved=!0),p._itemRemoving(n.el,!1),T.on(r,"drag",i),i(s,r,o),!1}).on(this.el,"dropout",(s,r,o)=>{const n=(o==null?void 0:o.gridstackNode)||r.gridstackNode;return n&&(!n.grid||n.grid===this)&&(this._leave(r,o),this._isTemp&&this.removeAsSubGrid(n)),!1}).on(this.el,"drop",(s,r,o)=>{var b,E,w;const n=(o==null?void 0:o.gridstackNode)||r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;const h=!!this.placeholder.parentElement,d=r!==o;this.placeholder.remove(),delete this.placeholder.gridstackNode;const c=h&&this.opts.animate;c&&this.setAnimation(!1);const u=r._gridstackNodeOrig;if(delete r._gridstackNodeOrig,h&&(u!=null&&u.grid)&&u.grid!==this){const _=u.grid;_.engine.removeNodeFromLayoutCache(u),_.engine.removedNodes.push(u),_._triggerRemoveEvent()._triggerChangeEvent(),_.parentGridNode&&!_.engine.nodes.length&&_.opts.subGridDynamic&&_.removeAsSubGrid()}if(!n||(h&&(this.engine.cleanupNode(n),n.grid=this),(b=n.grid)==null||delete b._isTemp,T.off(r,"drag"),o!==r?(o.remove(),r=o):r.remove(),this._removeDD(r),!h))return!1;const g=(w=(E=n.subGrid)==null?void 0:E.el)==null?void 0:w.gridstack;return l.copyPos(n,this._readAttr(this.placeholder)),l.removePositioningStyles(r),d&&(n.content||n.subGridOpts||p.addRemoveCB)?(delete n.el,r=this.addWidget(n)):(this._prepareElement(r,!0,n),this.el.appendChild(r),this.resizeToContentCheck(!1,n),g&&(g.parentGridNode=n,g.opts.styleInHead||g._updateStyles(!0)),this._updateContainerHeight()),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...s,type:"dropped"},u&&u.grid?u:void 0,n),c&&this.setAnimation(this.opts.animate,!0),!1}),this}static _itemRemoving(e,t){if(!e)return;const i=e?e.gridstackNode:void 0;!(i!=null&&i.grid)||e.classList.contains(i.grid.opts.removableOptions.decline)||(t?i._isAboutToRemove=!0:delete i._isAboutToRemove,t?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const e=document.querySelector(this.opts.removable);return e?(!this.opts.staticGrid&&!T.isDroppable(e)&&T.droppable(e,this.opts.removableOptions).on(e,"dropover",(t,i)=>p._itemRemoving(i,!0)).on(e,"dropout",(t,i)=>p._itemRemoving(i,!1)),this):this}_prepareDragDropByNode(e){const t=e.el,i=e.noMove||this.opts.disableDrag,s=e.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return e._initDD&&(this._removeDD(t),delete e._initDD),t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!e._initDD){let r,o;const n=(c,u)=>{this._gsEventHandler[c.type]&&this._gsEventHandler[c.type](c,c.target),r=this.cellWidth(),o=this.getCellHeight(!0),this._onStartMoving(t,c,u,e,r,o)},h=(c,u)=>{this._dragOrResize(t,c,u,e,r,o)},d=c=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete e._moving,delete e._event,delete e._lastTried;const u=e.w!==e._orig.w,g=c.target;if(!(!g.gridstackNode||g.gridstackNode.grid!==this)){if(e.el=g,e._isAboutToRemove){const b=t.gridstackNode.grid;b._gsEventHandler[c.type]&&b._gsEventHandler[c.type](c,g),b.engine.nodes.push(e),b.removeWidget(t,!0,!0)}else l.removePositioningStyles(g),e._temporaryRemoved?(l.copyPos(e,e._orig),this._writePosAttr(g,e),this.engine.addNode(e)):this._writePosAttr(g,e),this._gsEventHandler[c.type]&&this._gsEventHandler[c.type](c,g);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),c.type==="resizestop"&&(Number.isInteger(e.sizeToContent)&&(e.sizeToContent=e.h),this.resizeToContentCheck(u,e))}};T.draggable(t,{start:n,stop:d,drag:h}).resizable(t,{start:n,stop:d,resize:h}),e._initDD=!0}return T.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,r,o){var n;if(this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=s,(n=s.grid)!=null&&n.el)this.dragTransform=l.getValuesFromTransformedElement(e);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const h=this.placeholder.closest(".grid-stack");this.dragTransform=l.getValuesFromTransformedElement(h)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving=t.type==="dragstart",delete s._lastTried,t.type==="dropover"&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(r,o,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const h=this.getColumn()-s.x,d=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-s.y;T.resizable(e,"option","minWidth",r*Math.min(s.minW||1,h)).resizable(e,"option","minHeight",o*Math.min(s.minH||1,d)).resizable(e,"option","maxWidth",r*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,h)).resizable(e,"option","maxWidthMoveLeft",r*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,s.x+s.w)).resizable(e,"option","maxHeight",o*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,d)).resizable(e,"option","maxHeightMoveUp",o*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,s.y+s.h))}}_dragOrResize(e,t,i,s,r,o){const n={...s._orig};let h,d=this.opts.marginLeft,c=this.opts.marginRight,u=this.opts.marginTop,g=this.opts.marginBottom;const b=Math.round(o*.1),E=Math.round(r*.1);if(d=Math.min(d,E),c=Math.min(c,E),u=Math.min(u,b),g=Math.min(g,b),t.type==="drag"){if(s._temporaryRemoved)return;const _=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&l.updateScrollPosition(e,i.position,_);const v=i.position.left+(i.position.left>s._lastUiPosition.left?-c:d),x=i.position.top+(i.position.top>s._lastUiPosition.top?-g:u);n.x=Math.round(v/r),n.y=Math.round(x/o);const k=this._extraDragRow;if(this.engine.collide(s,n)){const D=this.getRow();let R=Math.max(0,n.y+s.h-D);this.opts.maxRow&&D+R>this.opts.maxRow&&(R=Math.max(0,this.opts.maxRow-D)),this._extraDragRow=R}else this._extraDragRow=0;if(this._extraDragRow!==k&&this._updateContainerHeight(),s.x===n.x&&s.y===n.y)return}else if(t.type==="resize"){if(n.x<0||(l.updateScrollResize(t,e,o),n.w=Math.round((i.size.width-d)/r),n.h=Math.round((i.size.height-u)/o),s.w===n.w&&s.h===n.h)||s._lastTried&&s._lastTried.w===n.w&&s._lastTried.h===n.h)return;const _=i.position.left+d,v=i.position.top+u;n.x=Math.round(_/r),n.y=Math.round(v/o),h=!0}s._event=t,s._lastTried=n;const w={x:i.position.left+d,y:i.position.top+u,w:(i.size?i.size.width:s.w*r)-d-c,h:(i.size?i.size.height:s.h*o)-u-g};if(this.engine.moveNodeCheck(s,{...n,cellWidth:r,cellHeight:o,rect:w,resizing:h})){s._lastUiPosition=i.position,this.engine.cacheRects(r,o,u,c,g,d),delete s._skipDown,h&&s.subGrid&&s.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const _=t.target;this._writePosAttr(_,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,_)}}_leave(e,t){t=t||e;const i=t.gridstackNode;i&&(t.style.transform=t.style.transformOrigin=null,T.off(e,"drag"),!i._temporaryRemoved&&(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,i._isExternal&&this.engine.cleanupNode(i),this.opts.removable===!0&&p._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&this.engine.restoreInitial()))}commit(){return $e(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}p.renderCB=(f,e)=>{f&&(e!=null&&e.content)&&(f.textContent=e.content)},p.resizeToContentParent=".grid-stack-item-content",p.Utils=l,p.Engine=N,p.GDRev="11.3.0";const Ve=["data-index","gs-h","gs-w","gs-x","gs-y"],Ke={class:"grid-stack-item-content"},Ye=a.defineComponent({__name:"DraggableGridLayout",props:{tiles:{},gridSize:{},tileHeight:{default:200}},emits:["update-tiles"],setup(f,{emit:e}){const t=f,i=e,s=a.ref(null);let r=null;return a.onMounted(()=>{s.value&&(r=p.init({column:t.gridSize.cols,cellHeight:t.tileHeight,resizable:{handles:"all"}},s.value),r.on("change",(o,n)=>{const h=t.tiles.map((d,c)=>{const u=n.find(g=>{var b;return Number((b=g.el)==null?void 0:b.getAttribute("data-index"))===c});return u?{...d,layout:{position:{col:u.x,row:u.y},size:{cols:u.w,rows:u.h}}}:d});i("update-tiles",h)}))}),a.onUnmounted(()=>{r&&r.destroy(!1)}),a.watch(()=>t.tiles,o=>{r&&s.value&&o.forEach((n,h)=>{var c;const d=(c=s.value)==null?void 0:c.querySelector(`[data-index="${h}"]`);d&&(r==null||r.update(d,{x:n.layout.position.col,y:n.layout.position.row,w:n.layout.size.cols,h:n.layout.size.rows}))})},{deep:!0}),(o,n)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"gridContainer",ref:s,class:"grid-stack"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.tiles,(h,d)=>(a.openBlock(),a.createElementBlock("div",{key:"tile-"+d,class:"grid-stack-item","data-index":d,"gs-h":h.layout.size.rows,"gs-w":h.layout.size.cols,"gs-x":h.layout.position.col,"gs-y":h.layout.position.row},[a.createElementVNode("div",Ke,[a.renderSlot(o.$slots,"tile",{tile:h})])],8,Ve))),128))],512))}}),je={class:"kong-ui-public-dashboard-renderer"},Xe={key:0,class:"tile-container"},Qe=P(a.defineComponent({__name:"DashboardRenderer",props:{context:{},config:{},draggable:{type:Boolean,default:!1}},emits:["edit-tile","update-tiles"],setup(f,{expose:e,emit:t}){const i=f,s=t,{i18n:r}=O.useI18n(),o=a.ref(0),n=a.inject(I);n||(console.warn("Analytics dashboards require a query bridge supplied via provide / inject."),console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"),console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements"));const h=we.useAnalyticsConfigStore(),d=a.computed(()=>i.context.timeSpec?i.context.timeSpec:{type:"relative",time_range:h.defaultQueryTimeForOrg}),c=a.computed(()=>!!i.context.timeSpec||!h.loading),u=a.computed(()=>i.config.tiles.map((_,v)=>{var k;let x=_.definition;if("description"in x.chart){const D=(k=x.chart.description)==null?void 0:k.replace(oe,()=>{const M=`renderer.trendRange.${d.value.type==="absolute"?"custom":d.value.time_range}`;return r.te(M)?r.t(M):""});x={...x,chart:{...x.chart,description:D}}}return{layout:_.layout,meta:x,id:v}})),g=a.computed(()=>{let{tz:_,refreshInterval:v,editable:x}=i.context;return _||(_=new Intl.DateTimeFormat().resolvedOptions().timeZone),v===void 0&&(v=ae),x===void 0&&(x=!1),{...i.context,tz:_,timeSpec:d.value,refreshInterval:v,editable:x}}),b=_=>{s("edit-tile",_)},E=()=>{o.value++},w=_=>{const v=_.map(x=>({layout:x.layout,definition:x.meta}));s("update-tiles",v)};return e({refresh:E}),(_,v)=>{const x=a.resolveComponent("KAlert");return a.openBlock(),a.createElementBlock("div",je,[a.unref(n)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(_.draggable?Ye:ge),{key:1,"grid-size":_.config.gridSize,"tile-height":_.config.tileHeight,tiles:u.value,onUpdateTiles:w},{tile:a.withCtx(({tile:k})=>[k.meta.chart.type==="slottable"?(a.openBlock(),a.createElementBlock("div",Xe,[a.renderSlot(_.$slots,k.meta.chart.id,{},void 0,!0)])):(a.openBlock(),a.createBlock(qe,{key:1,class:"tile-container",context:g.value,definition:k.meta,height:k.layout.size.rows*(_.config.tileHeight||a.unref(G))+parseInt(a.unref(fe),10),"query-ready":c.value,"refresh-counter":o.value,"tile-id":k.id,onEditTile:D=>b(k)},null,8,["context","definition","height","query-ready","refresh-counter","tile-id","onEditTile"]))]),_:3},40,["grid-size","tile-height","tiles"])):(a.openBlock(),a.createBlock(x,{key:0,appearance:"danger"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(r).t("renderer.noQueryBridge")),1)]),_:1}))])}}}),[["__scopeId","data-v-57e1dfb8"]]);C.CP_ID_TOKEN=ne,C.DEFAULT_TILE_HEIGHT=G,C.DEFAULT_TILE_REFRESH_INTERVAL_MS=ae,C.DashboardRenderer=Qe,C.ENTITY_ID_TOKEN=X,C.GridLayout=ge,C.INJECT_QUERY_PROVIDER=I,C.TIMEFRAME_TOKEN=oe,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
|
9
|
+
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),i}static addGrid(e,t={}){if(!e)return null;let i=e;if(i.gridstack){const o=i.gridstack;return t&&(o.opts={...o.opts,...t}),t.children!==void 0&&o.load(t.children),o}return(!e.classList.contains("grid-stack")||p.addRemoveCB)&&(p.addRemoveCB?i=p.addRemoveCB(e,t,!0,!0):i=l.createDiv(["grid-stack",t.class],e)),p.init(t,i)}static registerEngine(e){p.engineClass=e}get placeholder(){if(!this._placeholder){this._placeholder=l.createDiv([this.opts.placeholderClass,S.itemClass,this.opts.itemClass]);const e=l.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(e.textContent=this.opts.placeholderText)}return this._placeholder}constructor(e,t={}){var u,g,b;this.el=e,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},e.gridstack=this,this.opts=t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const i=l.toNumber(e.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let s=(u=t.columnOpts)==null?void 0:u.breakpoints;const r=t;if(r.oneColumnModeDomSort&&(delete r.oneColumnModeDomSort,console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")),r.oneColumnSize||r.disableOneColumnMode===!1){const E=r.oneColumnSize||768;delete r.oneColumnSize,delete r.disableOneColumnMode,t.columnOpts=t.columnOpts||{},s=t.columnOpts.breakpoints=t.columnOpts.breakpoints||[];let w=s.find(_=>_.c===1);w?w.w=E:(w={c:1,w:E},s.push(w,{c:12,w:E+1}))}const o=t.columnOpts;o&&(!o.columnWidth&&!((g=o.breakpoints)!=null&&g.length)?(delete t.columnOpts,s=void 0):o.columnMax=o.columnMax||12),(s==null?void 0:s.length)>1&&s.sort((E,w)=>(w.w||0)-(E.w||0));const n={...l.cloneDeep(S),column:l.toNumber(e.getAttribute("gs-column"))||S.column,minRow:i||l.toNumber(e.getAttribute("gs-min-row"))||S.minRow,maxRow:i||l.toNumber(e.getAttribute("gs-max-row"))||S.maxRow,staticGrid:l.toBool(e.getAttribute("gs-static"))||S.staticGrid,sizeToContent:l.toBool(e.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||S.draggable.handle},removableOptions:{accept:t.itemClass||S.removableOptions.accept,decline:S.removableOptions.decline}};e.getAttribute("gs-animate")&&(n.animate=l.toBool(e.getAttribute("gs-animate"))),t=l.defaults(t,n),this._initMargin(),this.checkDynamicColumn(),this.el.classList.add("gs-"+t.column),t.rtl==="auto"&&(t.rtl=e.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const h=this.el.closest("."+S.itemClass),d=h==null?void 0:h.gridstackNode;d&&(d.subGrid=this,this.parentGridNode=d,this.el.classList.add("grid-stack-nested"),d.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==S.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit),this.cellHeight(t.cellHeight,!1)),t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=z),this._styleSheetClass="gs-id-"+N._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();const c=t.engineClass||p.engineClass||N;if(this.engine=new c({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:E=>{let w=0;this.engine.nodes.forEach(_=>{w=Math.max(w,_.y+_.h)}),E.forEach(_=>{const v=_.el;v&&(_._removeDOM?(v&&v.remove(),delete _._removeDOM):this._writePosAttr(v,_))}),this._updateStyles(!1,w)}}),this._updateStyles(!1,0),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(E=>this._prepareElement(E)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const E=t.children;delete t.children,E.length&&this.load(E)}this.setAnimation(),t.subGridDynamic&&!y.pauseDrag&&(y.pauseDrag=!0),((b=t.draggable)==null?void 0:b.pause)!==void 0&&(y.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}addWidget(e){if(typeof e=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(e.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(e);let t,i=e;if(i.grid=this,i!=null&&i.el?t=i.el:p.addRemoveCB?t=p.addRemoveCB(this.el,e,!0,!1):t=l.createWidgetDivs(this.opts.itemClass,i),!t)return;if(i=t.gridstackNode,i&&t.parentElement===this.el&&this.engine.nodes.find(r=>r._id===i._id))return t;const s=this._readAttr(t);return l.defaults(e,s),this.engine.prepareNode(e),this.el.appendChild(t),this.makeWidget(t,e),t}makeSubGrid(e,t,i,s=!0){var b,E,w;let r=e.gridstackNode;if(r||(r=this.makeWidget(e).gridstackNode),(b=r.subGrid)!=null&&b.el)return r.subGrid;let o,n=this;for(;n&&!o;)o=(E=n.opts)==null?void 0:E.subGridOpts,n=(w=n.parentGridNode)==null?void 0:w.grid;t=l.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...o||{},...t||r.subGridOpts||{}}),r.subGridOpts=t;let h;t.column==="auto"&&(h=!0,t.column=Math.max(r.w||1,(i==null?void 0:i.w)||1),delete t.columnOpts);let d=r.el.querySelector(".grid-stack-item-content"),c,u;if(s&&(this._removeDD(r.el),u={...r,x:0,y:0},l.removeInternalForSave(u),delete u.subGridOpts,r.content&&(u.content=r.content,delete r.content),p.addRemoveCB?c=p.addRemoveCB(this.el,u,!0,!1):(c=l.createDiv(["grid-stack-item"]),c.appendChild(d),d=l.createDiv(["grid-stack-item-content"],r.el)),this._prepareDragDropByNode(r)),i){const _=h?t.column:r.w,v=r.h+i.h,x=r.el.style;x.transition="none",this.update(r.el,{w:_,h:v}),setTimeout(()=>x.transition=null)}const g=r.subGrid=p.addGrid(d,t);return i!=null&&i._moving&&(g._isTemp=!0),h&&(g._autoColumn=!0),s&&g.makeWidget(c,u),i&&(i._moving?window.setTimeout(()=>l.simulateMouseEvent(i._event,"mouseenter",g.el),0):g.makeWidget(r.el,r)),this.resizeToContentCheck(!1,r),g}removeAsSubGrid(e){var i;const t=(i=this.parentGridNode)==null?void 0:i.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(s=>{s.x+=this.parentGridNode.x,s.y+=this.parentGridNode.y,t.makeWidget(s.el,s)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,e&&window.setTimeout(()=>l.simulateMouseEvent(e._event,"mouseenter",t.el),0))}save(e=!0,t=!1,i=p.saveCB){const s=this.engine.save(e,i);if(s.forEach(r=>{var o;if(e&&r.el&&!r.subGrid&&!i){const n=r.el.querySelector(".grid-stack-item-content");r.content=n==null?void 0:n.innerHTML,r.content||delete r.content}else if(!e&&!i&&delete r.content,(o=r.subGrid)!=null&&o.el){const n=r.subGrid.save(e,t,i);r.subGridOpts=t?n:{children:n},delete r.subGrid}delete r.el}),t){const r=l.cloneDeep(this.opts);r.marginBottom===r.marginTop&&r.marginRight===r.marginLeft&&r.marginTop===r.marginRight&&(r.margin=r.marginTop,delete r.marginTop,delete r.marginRight,delete r.marginBottom,delete r.marginLeft),r.rtl===(this.el.style.direction==="rtl")&&(r.rtl="auto"),this._isAutoCellHeight&&(r.cellHeight="auto"),this._autoColumn&&(r.column="auto");const o=r._alwaysShowResizeHandle;return delete r._alwaysShowResizeHandle,o!==void 0?r.alwaysShowResizeHandle=o:delete r.alwaysShowResizeHandle,l.removeInternalAndSame(r,S),r.children=s,r}return s}load(e,t=p.addRemoveCB||!0){var d;e=l.cloneDeep(e);const i=this.getColumn();e.forEach(c=>{c.w=c.w||1,c.h=c.h||1}),e=l.sort(e),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let s=0;e.forEach(c=>{s=Math.max(s,(c.x||0)+c.w)}),s>this.engine.defaultColumn&&(this.engine.defaultColumn=s),s>i&&this.engine.cacheLayout(e,s,!0);const r=p.addRemoveCB;typeof t=="function"&&(p.addRemoveCB=t);const o=[];this.batchUpdate();const n=!this.engine.nodes.length;n&&this.setAnimation(!1),!n&&t&&[...this.engine.nodes].forEach(u=>{if(!u.id)return;l.find(e,u.id)||(p.addRemoveCB&&p.addRemoveCB(this.el,u,!1,!1),o.push(u),this.removeWidget(u.el,!0,!1))}),this.engine._loading=!0;const h=[];return this.engine.nodes=this.engine.nodes.filter(c=>l.find(e,c.id)?(h.push(c),!1):!0),e.forEach(c=>{var g;const u=l.find(h,c.id);if(u){if(l.shouldSizeToContent(u)&&(c.h=u.h),this.engine.nodeBoundFix(c),(c.autoPosition||c.x===void 0||c.y===void 0)&&(c.w=c.w||u.w,c.h=c.h||u.h,this.engine.findEmptyPosition(c)),this.engine.nodes.push(u),l.samePos(u,c)&&this.engine.nodes.length>1&&(this.moveNode(u,{...c,forceCollide:!0}),l.copyPos(c,u)),this.update(u.el,c),(g=c.subGridOpts)!=null&&g.children){const b=u.el.querySelector(".grid-stack");b&&b.gridstack&&b.gridstack.load(c.subGridOpts.children)}}else t&&this.addWidget(c)}),delete this.engine._loading,this.engine.removedNodes=o,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,r?p.addRemoveCB=r:delete p.addRemoveCB,n&&((d=this.opts)!=null&&d.animate)&&this.setAnimation(this.opts.animate,!0),this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!e||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const s=l.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/s)}const i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(e,t=!0){if(t&&e!==void 0&&this._isAutoCellHeight!==(e==="auto")&&(this._isAutoCellHeight=e==="auto",this._updateResizeEvent()),(e==="initial"||e==="auto")&&(e=void 0),e===void 0){const s=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+s}const i=l.parseHeight(e);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.resizeToContentCheck(),t&&this._updateStyles(!0),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(e=!1){var t;return e&&((t=this.opts.columnOpts)!=null&&t.breakpointForWindow)?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var r,o;const e=this.opts.columnOpts;if(!e||!e.columnWidth&&!((r=e.breakpoints)!=null&&r.length))return!1;const t=this.getColumn();let i=t;const s=this._widthOrContainer(!0);if(e.columnWidth)i=Math.min(Math.round(s/e.columnWidth)||1,e.columnMax);else{i=e.columnMax;let n=0;for(;n<e.breakpoints.length&&s<=e.breakpoints[n].w;)i=e.breakpoints[n++].c||t}if(i!==t){const n=(o=e.breakpoints)==null?void 0:o.find(h=>h.c===i);return this.column(i,(n==null?void 0:n.layout)||e.layout),!0}return!1}compact(e="compact",t=!0){return this.engine.compact(e,t),this._triggerChangeEvent(),this}column(e,t="moveScale"){if(!e||e<1||this.opts.column===e)return this;const i=this.getColumn();return this.opts.column=e,this.engine?(this.engine.column=e,this.el.classList.remove("gs-"+i),this.el.classList.add("gs-"+e),this.engine.columnChanged(i,e,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(e=!0){var t,i;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),this.el.classList.remove(this._styleSheetClass),this.el.removeAttribute("gs-current-row")),this._removeStylesheet(),(t=this.parentGridNode)==null||delete t.subGrid,delete this.parentGridNode,delete this.opts,(i=this._placeholder)==null||delete i.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,t=!1){const i=this.el.getBoundingClientRect();let s;t?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};const r=e.left-s.left,o=e.top-s.top,n=i.width/this.getColumn(),h=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(r/n),y:Math.floor(o/h)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(e,t,i,s){return this.engine.isAreaEmpty(e,t,i,s)}makeWidget(e,t){const i=p.getElement(e);if(!i)return;i.parentElement||this.el.appendChild(i),this._prepareElement(i,!0,t);const s=i.gridstackNode;this._updateContainerHeight(),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1);let r;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(r=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),r&&delete this._ignoreLayoutsNodeChange,i}on(e,t){return e.indexOf(" ")!==-1?(e.split(" ").forEach(s=>this.on(s,t)),this):(e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable"?(e==="enable"||e==="disable"?this._gsEventHandler[e]=s=>t(s):this._gsEventHandler[e]=s=>{s.detail&&t(s,s.detail)},this.el.addEventListener(e,this._gsEventHandler[e])):e==="drag"||e==="dragstart"||e==="dragstop"||e==="resizestart"||e==="resize"||e==="resizestop"||e==="dropped"||e==="resizecontent"?this._gsEventHandler[e]=t:console.error("GridStack.on("+e+") event not supported"),this)}off(e){return e.indexOf(" ")!==-1?(e.split(" ").forEach(i=>this.off(i)),this):((e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable")&&this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(e=>this.off(e)),this}removeWidget(e,t=!0,i=!0){return e?(p.getElements(e).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let r=s.gridstackNode;r||(r=this.engine.nodes.find(o=>s===o.el)),r&&(t&&p.addRemoveCB&&p.addRemoveCB(this.el,r,!1,!1),delete s.gridstackNode,this._removeDD(s),this.engine.removeNode(r,t,i),t&&s.parentElement&&s.remove())}),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(e=!0,t=!0){return this.engine.nodes.forEach(i=>{e&&p.addRemoveCB&&p.addRemoveCB(this.el,i,!1,!1),delete i.el.gridstackNode,this.opts.staticGrid||this._removeDD(i.el)}),this.engine.removeAll(e,t),t&&this._triggerRemoveEvent(),this}setAnimation(e=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(e)}):e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(e,t=!0,i=!0){return!!this.opts.staticGrid===e?this:(e?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(e,t,i)}),t&&this._setStaticClass(),this)}update(e,t){if(arguments.length>2){console.warn("gridstack.ts: `update(el, x, y, w, h)` is deprecated. Use `update(el, {x, w, content, ...})`. It will be removed soon");const i=arguments;let s=1;return t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return p.getElements(e).forEach(i=>{var c;const s=i==null?void 0:i.gridstackNode;if(!s)return;const r=l.cloneDeep(t);this.engine.nodeBoundFix(r),delete r.autoPosition;const o=["x","y","w","h"];let n;if(o.some(u=>r[u]!==void 0&&r[u]!==s[u])&&(n={},o.forEach(u=>{n[u]=r[u]!==void 0?r[u]:s[u],delete r[u]})),!n&&(r.minW||r.minH||r.maxW||r.maxH)&&(n={}),r.content!==void 0){const u=i.querySelector(".grid-stack-item-content");u&&u.textContent!==r.content&&(s.content=r.content,p.renderCB(u,r),(c=s.subGrid)!=null&&c.el&&(u.appendChild(s.subGrid.el),s.subGrid.opts.styleInHead||s.subGrid._updateStyles(!0))),delete r.content}let h=!1,d=!1;for(const u in r)u[0]!=="_"&&s[u]!==r[u]&&(s[u]=r[u],h=!0,d=d||!this.opts.staticGrid&&(u==="noResize"||u==="noMove"||u==="locked"));if(l.sanitizeMinMax(s),n){const u=n.w!==void 0&&n.w!==s.w;this.moveNode(s,n),u&&s.subGrid?s.subGrid.onResize(this.hasAnimationCSS()?s.w:void 0):this.resizeToContentCheck(u,s),delete s._orig}(n||h)&&this._writeAttr(i,s),d&&this._prepareDragDropByNode(s)}),this}moveNode(e,t){const i=e._updating;i||this.engine.cleanNodes().beginUpdate(e),this.engine.moveNode(e,t),this._updateContainerHeight(),i||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(e){var g,b;if(!e||(e.classList.remove("size-to-content-max"),!e.clientHeight))return;const t=e.gridstackNode;if(!t)return;const i=t.grid;if(!i||e.parentElement!==i.el)return;const s=i.getCellHeight(!0);if(!s)return;let r=t.h?t.h*s:e.clientHeight,o;if(t.resizeToContentParent&&(o=e.querySelector(t.resizeToContentParent)),o||(o=e.querySelector(p.resizeToContentParent)),!o)return;const n=e.clientHeight-o.clientHeight,h=t.h?t.h*s-n:o.clientHeight;let d;if(t.subGrid){d=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const E=t.subGrid.el.getBoundingClientRect(),w=t.subGrid.el.parentElement.getBoundingClientRect();d+=E.top-w.top}else{if((b=(g=t.subGridOpts)==null?void 0:g.children)!=null&&b.length)return;{const E=o.firstElementChild;if(!E){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${p.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}d=E.getBoundingClientRect().height||h}}if(h===d)return;r+=d-h;let c=Math.ceil(r/s);const u=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;u&&c>u&&(c=u,e.classList.add("size-to-content-max")),t.minH&&c<t.minH?c=t.minH:t.maxH&&c>t.maxH&&(c=t.maxH),c!==t.h&&(i._ignoreLayoutsNodeChange=!0,i.moveNode(t,{h:c}),delete i._ignoreLayoutsNodeChange)}resizeToContentCBCheck(e){p.resizeToContentCB?p.resizeToContentCB(e):this.resizeToContent(e)}rotate(e,t){return p.getElements(e).forEach(i=>{const s=i.gridstackNode;if(!l.canBeRotated(s))return;const r={w:s.h,h:s.w,minH:s.minW,minW:s.minH,maxH:s.maxW,maxW:s.maxH};if(t){const n=t.left>0?Math.floor(t.left/this.cellWidth()):0,h=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;r.x=s.x+n-(s.h-(h+1)),r.y=s.y+h-n}Object.keys(r).forEach(n=>{r[n]===void 0&&delete r[n]});const o=s._orig;this.update(i,r),s._orig=o}),this}margin(e){if(!(typeof e=="string"&&e.split(" ").length>1)){const i=l.parseHeight(e);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return}return this.opts.margin=e,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this._updateStyles(!0),this}getMargin(){return this.opts.margin}willItFit(e){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");const t=arguments;let i=0,s={x:t[i++],y:t[i++],w:t[i++],h:t[i++],autoPosition:t[i++]};return this.willItFit(s)}return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.addedNodes)!=null&&e.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});const t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.removedNodes)!=null&&e.length){const t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(e,t){const i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){if(this._styles){const e=this.opts.styleInHead?void 0:this.el.parentNode;l.removeStylesheet(this._styleSheetClass,e),delete this._styles}return this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t===void 0&&(t=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit,r=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){const o=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=l.createStylesheet(this._styleSheetClass,o,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,l.addCSSRule(this._styles,r,`height: ${i}${s}`);const n=this.opts.marginTop+this.opts.marginUnit,h=this.opts.marginBottom+this.opts.marginUnit,d=this.opts.marginRight+this.opts.marginUnit,c=this.opts.marginLeft+this.opts.marginUnit,u=`${r} > .grid-stack-item-content`,g=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;l.addCSSRule(this._styles,u,`top: ${n}; right: ${d}; bottom: ${h}; left: ${c};`),l.addCSSRule(this._styles,g,`top: ${n}; right: ${d}; bottom: ${h}; left: ${c};`),l.addCSSRule(this._styles,`${r} > .ui-resizable-n`,`top: ${n};`),l.addCSSRule(this._styles,`${r} > .ui-resizable-s`,`bottom: ${h}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-ne`,`right: ${d}; top: ${n}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-e`,`right: ${d}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-se`,`right: ${d}; bottom: ${h}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-nw`,`left: ${c}; top: ${n}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-w`,`left: ${c}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-sw`,`left: ${c}; bottom: ${h}`)}if(t=t||this._styles._max,t>this._styles._max){const o=n=>i*n+s;for(let n=this._styles._max+1;n<=t;n++)l.addCSSRule(this._styles,`${r}[gs-y="${n}"]`,`top: ${o(n)}`),l.addCSSRule(this._styles,`${r}[gs-h="${n+1}"]`,`height: ${o(n+1)}`);this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const e=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const i=this.opts.cellHeight,s=this.opts.cellHeightUnit;if(!i)return this;if(!e){const r=l.parseHeight(getComputedStyle(this.el).minHeight);if(r.h>0&&r.unit===s){const o=Math.floor(r.h/i);t<o&&(t=o)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[e?"minHeight":"height"]=t*i+s),e&&!e.grid.engine.batchMode&&l.shouldSizeToContent(e)&&e.grid.resizeToContentCBCheck(e.el),this}_prepareElement(e,t=!1,i){i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this,i=this.engine.addNode(i,t),this._writeAttr(e,i),e.classList.add(S.itemClass,this.opts.itemClass);const s=l.shouldSizeToContent(i);return s?e.classList.add("size-to-content"):e.classList.remove("size-to-content"),s&&this.resizeToContentCheck(!1,i),this._prepareDragDropByNode(i),this}_writePosAttr(e,t){return t.x!==void 0&&t.x!==null&&e.setAttribute("gs-x",String(t.x)),t.y!==void 0&&t.y!==null&&e.setAttribute("gs-y",String(t.y)),t.w>1?e.setAttribute("gs-w",String(t.w)):e.removeAttribute("gs-w"),t.h>1?e.setAttribute("gs-h",String(t.h)):e.removeAttribute("gs-h"),this}_writeAttr(e,t){if(!t)return this;this._writePosAttr(e,t);const i={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e,t=!0){const i={};i.x=l.toNumber(e.getAttribute("gs-x")),i.y=l.toNumber(e.getAttribute("gs-y")),i.w=l.toNumber(e.getAttribute("gs-w")),i.h=l.toNumber(e.getAttribute("gs-h")),i.autoPosition=l.toBool(e.getAttribute("gs-auto-position")),i.noResize=l.toBool(e.getAttribute("gs-no-resize")),i.noMove=l.toBool(e.getAttribute("gs-no-move")),i.locked=l.toBool(e.getAttribute("gs-locked")),i.sizeToContent=l.toBool(e.getAttribute("gs-size-to-content")),i.id=e.getAttribute("gs-id"),i.maxW=l.toNumber(e.getAttribute("gs-max-w")),i.minW=l.toNumber(e.getAttribute("gs-min-w")),i.maxH=l.toNumber(e.getAttribute("gs-max-h")),i.minH=l.toNumber(e.getAttribute("gs-min-h")),t&&(i.w===1&&e.removeAttribute("gs-w"),i.h===1&&e.removeAttribute("gs-h"),i.maxW&&e.removeAttribute("gs-max-w"),i.minW&&e.removeAttribute("gs-min-w"),i.maxH&&e.removeAttribute("gs-max-h"),i.minH&&e.removeAttribute("gs-min-h"));for(const s in i){if(!i.hasOwnProperty(s))return;!i[s]&&i[s]!==0&&delete i[s]}return i}_setStaticClass(){const e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onResize(e=(t=>(t=this.el)==null?void 0:t.clientWidth)()){if(!e||this.prevWidth===e)return;this.prevWidth=e,this.batchUpdate();let i=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),i=!0):i=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(s=>{s.subGrid&&s.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(i),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(e=!1,t=void 0){if(this.engine){if(e&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)l.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(i=>l.shouldSizeToContent(i))){const i=[...this.engine.nodes];this.batchUpdate(),i.forEach(s=>{l.shouldSizeToContent(s)&&this.resizeToContentCBCheck(s.el)}),this.batchUpdate(!1)}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(e=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(i=>i.sizeToContent));return!e&&t&&!this.resizeObserver?(this._sizeThrottle=l.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(e||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(e=".grid-stack-item"){return l.getElement(e)}static getElements(e=".grid-stack-item"){return l.getElements(e)}static getGridElement(e){return p.getElement(e)}static getGridElements(e){return l.getElements(e)}_initMargin(){let e,t=0,i=[];return typeof this.opts.margin=="string"&&(i=this.opts.margin.split(" ")),i.length===2?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):i.length===4?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(e=l.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,t=this.opts.margin=e.h),this.opts.marginTop===void 0?this.opts.marginTop=t:(e=l.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=t:(e=l.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=t:(e=l.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=t:(e=l.parseHeight(this.opts.marginLeft),this.opts.marginLeft=e.h,delete this.opts.margin),this.opts.marginUnit=e.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop),this}static getDD(){return T}static setupDragIn(e,t,i,s=document){(t==null?void 0:t.pause)!==void 0&&(y.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof e=="string"?l.getElements(e,s):e).forEach((o,n)=>{T.isDraggable(o)||T.dragIn(o,t),i!=null&&i[n]&&(o.gridstackNode=i[n])})}movable(e,t){return this.opts.staticGrid?this:(p.getElements(e).forEach(i=>{const s=i.gridstackNode;s&&(t?delete s.noMove:s.noMove=!0,this._prepareDragDropByNode(s))}),this)}resizable(e,t){return this.opts.staticGrid?this:(p.getElements(e).forEach(i=>{const s=i.gridstackNode;s&&(t?delete s.noResize:s.noResize=!0,this._prepareDragDropByNode(s))}),this)}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,t=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&t&&i.subGrid.enableMove(e,t)}),this)}enableResize(e,t=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&t&&i.subGrid.enableResize(e,t)}),this)}cancelDrag(){var t;const e=(t=this._placeholder)==null?void 0:t.gridstackNode;e&&(e._isExternal?(e._isAboutToRemove=!0,this.engine.removeNode(e)):e._isAboutToRemove&&p._itemRemoving(e.el,!1),this.engine.restoreInitial())}_removeDD(e){return T.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return T.droppable(this.el,"destroy"),this;let e,t;const i=(s,r,o)=>{var g;o=o||r;const n=o.gridstackNode;if(!n)return;if(!((g=n.grid)!=null&&g.el)){o.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const b=o.getBoundingClientRect();o.style.left=b.x+(this.dragTransform.xScale-1)*(s.clientX-b.x)/this.dragTransform.xScale+"px",o.style.top=b.y+(this.dragTransform.yScale-1)*(s.clientY-b.y)/this.dragTransform.yScale+"px",o.style.transformOrigin="0px 0px"}let{top:h,left:d}=o.getBoundingClientRect();const c=this.el.getBoundingClientRect();d-=c.left,h-=c.top;const u={position:{top:h*this.dragTransform.xScale,left:d*this.dragTransform.yScale}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(d/t)),n.y=Math.max(0,Math.round(h/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n)){T.off(r,"drag");return}n._willFitPos&&(l.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(o,s,u,n,t,e)}else this._dragOrResize(o,s,u,n,t,e)};return T.droppable(this.el,{accept:s=>{const r=s.gridstackNode||this._readAttr(s,!1);if((r==null?void 0:r.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let o=!0;if(typeof this.opts.acceptWidgets=="function")o=this.opts.acceptWidgets(s);else{const n=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;o=s.matches(n)}if(o&&r&&this.opts.maxRow){const n={w:r.w,h:r.h,minW:r.minW,minH:r.minH};o=this.engine.willItFit(n)}return o}}).on(this.el,"dropover",(s,r,o)=>{let n=(o==null?void 0:o.gridstackNode)||r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._temporaryRemoved)return!1;if(n!=null&&n.grid&&n.grid!==this&&!n._temporaryRemoved&&n.grid._leave(r,o),o=o||r,t=this.cellWidth(),e=this.getCellHeight(!0),!n){const c=o.getAttribute("data-gs-widget")||o.getAttribute("gridstacknode");if(c){try{n=JSON.parse(c)}catch{console.error("Gridstack dropover: Bad JSON format: ",c)}o.removeAttribute("data-gs-widget"),o.removeAttribute("gridstacknode")}n||(n=this._readAttr(o))}n.grid||(n.el||(n={...n}),n._isExternal=!0,o.gridstackNode=n);const h=n.w||Math.round(o.offsetWidth/t)||1,d=n.h||Math.round(o.offsetHeight/e)||1;return n.grid&&n.grid!==this?(r._gridstackNodeOrig||(r._gridstackNodeOrig=n),r.gridstackNode=n={...n,w:h,h:d,grid:this},delete n.x,delete n.y,this.engine.cleanupNode(n).nodeBoundFix(n),n._initDD=n._isExternal=n._temporaryRemoved=!0):(n.w=h,n.h=d,n._temporaryRemoved=!0),p._itemRemoving(n.el,!1),T.on(r,"drag",i),i(s,r,o),!1}).on(this.el,"dropout",(s,r,o)=>{const n=(o==null?void 0:o.gridstackNode)||r.gridstackNode;return n&&(!n.grid||n.grid===this)&&(this._leave(r,o),this._isTemp&&this.removeAsSubGrid(n)),!1}).on(this.el,"drop",(s,r,o)=>{var b,E,w;const n=(o==null?void 0:o.gridstackNode)||r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;const h=!!this.placeholder.parentElement,d=r!==o;this.placeholder.remove(),delete this.placeholder.gridstackNode;const c=h&&this.opts.animate;c&&this.setAnimation(!1);const u=r._gridstackNodeOrig;if(delete r._gridstackNodeOrig,h&&(u!=null&&u.grid)&&u.grid!==this){const _=u.grid;_.engine.removeNodeFromLayoutCache(u),_.engine.removedNodes.push(u),_._triggerRemoveEvent()._triggerChangeEvent(),_.parentGridNode&&!_.engine.nodes.length&&_.opts.subGridDynamic&&_.removeAsSubGrid()}if(!n||(h&&(this.engine.cleanupNode(n),n.grid=this),(b=n.grid)==null||delete b._isTemp,T.off(r,"drag"),o!==r?(o.remove(),r=o):r.remove(),this._removeDD(r),!h))return!1;const g=(w=(E=n.subGrid)==null?void 0:E.el)==null?void 0:w.gridstack;return l.copyPos(n,this._readAttr(this.placeholder)),l.removePositioningStyles(r),d&&(n.content||n.subGridOpts||p.addRemoveCB)?(delete n.el,r=this.addWidget(n)):(this._prepareElement(r,!0,n),this.el.appendChild(r),this.resizeToContentCheck(!1,n),g&&(g.parentGridNode=n,g.opts.styleInHead||g._updateStyles(!0)),this._updateContainerHeight()),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...s,type:"dropped"},u&&u.grid?u:void 0,n),c&&this.setAnimation(this.opts.animate,!0),!1}),this}static _itemRemoving(e,t){if(!e)return;const i=e?e.gridstackNode:void 0;!(i!=null&&i.grid)||e.classList.contains(i.grid.opts.removableOptions.decline)||(t?i._isAboutToRemove=!0:delete i._isAboutToRemove,t?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const e=document.querySelector(this.opts.removable);return e?(!this.opts.staticGrid&&!T.isDroppable(e)&&T.droppable(e,this.opts.removableOptions).on(e,"dropover",(t,i)=>p._itemRemoving(i,!0)).on(e,"dropout",(t,i)=>p._itemRemoving(i,!1)),this):this}_prepareDragDropByNode(e){const t=e.el,i=e.noMove||this.opts.disableDrag,s=e.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return e._initDD&&(this._removeDD(t),delete e._initDD),t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!e._initDD){let r,o;const n=(c,u)=>{this._gsEventHandler[c.type]&&this._gsEventHandler[c.type](c,c.target),r=this.cellWidth(),o=this.getCellHeight(!0),this._onStartMoving(t,c,u,e,r,o)},h=(c,u)=>{this._dragOrResize(t,c,u,e,r,o)},d=c=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete e._moving,delete e._event,delete e._lastTried;const u=e.w!==e._orig.w,g=c.target;if(!(!g.gridstackNode||g.gridstackNode.grid!==this)){if(e.el=g,e._isAboutToRemove){const b=t.gridstackNode.grid;b._gsEventHandler[c.type]&&b._gsEventHandler[c.type](c,g),b.engine.nodes.push(e),b.removeWidget(t,!0,!0)}else l.removePositioningStyles(g),e._temporaryRemoved?(l.copyPos(e,e._orig),this._writePosAttr(g,e),this.engine.addNode(e)):this._writePosAttr(g,e),this._gsEventHandler[c.type]&&this._gsEventHandler[c.type](c,g);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),c.type==="resizestop"&&(Number.isInteger(e.sizeToContent)&&(e.sizeToContent=e.h),this.resizeToContentCheck(u,e))}};T.draggable(t,{start:n,stop:d,drag:h}).resizable(t,{start:n,stop:d,resize:h}),e._initDD=!0}return T.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,r,o){var n;if(this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=s,(n=s.grid)!=null&&n.el)this.dragTransform=l.getValuesFromTransformedElement(e);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const h=this.placeholder.closest(".grid-stack");this.dragTransform=l.getValuesFromTransformedElement(h)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving=t.type==="dragstart",delete s._lastTried,t.type==="dropover"&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(r,o,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const h=this.getColumn()-s.x,d=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-s.y;T.resizable(e,"option","minWidth",r*Math.min(s.minW||1,h)).resizable(e,"option","minHeight",o*Math.min(s.minH||1,d)).resizable(e,"option","maxWidth",r*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,h)).resizable(e,"option","maxWidthMoveLeft",r*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,s.x+s.w)).resizable(e,"option","maxHeight",o*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,d)).resizable(e,"option","maxHeightMoveUp",o*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,s.y+s.h))}}_dragOrResize(e,t,i,s,r,o){const n={...s._orig};let h,d=this.opts.marginLeft,c=this.opts.marginRight,u=this.opts.marginTop,g=this.opts.marginBottom;const b=Math.round(o*.1),E=Math.round(r*.1);if(d=Math.min(d,E),c=Math.min(c,E),u=Math.min(u,b),g=Math.min(g,b),t.type==="drag"){if(s._temporaryRemoved)return;const _=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&l.updateScrollPosition(e,i.position,_);const v=i.position.left+(i.position.left>s._lastUiPosition.left?-c:d),x=i.position.top+(i.position.top>s._lastUiPosition.top?-g:u);n.x=Math.round(v/r),n.y=Math.round(x/o);const k=this._extraDragRow;if(this.engine.collide(s,n)){const D=this.getRow();let R=Math.max(0,n.y+s.h-D);this.opts.maxRow&&D+R>this.opts.maxRow&&(R=Math.max(0,this.opts.maxRow-D)),this._extraDragRow=R}else this._extraDragRow=0;if(this._extraDragRow!==k&&this._updateContainerHeight(),s.x===n.x&&s.y===n.y)return}else if(t.type==="resize"){if(n.x<0||(l.updateScrollResize(t,e,o),n.w=Math.round((i.size.width-d)/r),n.h=Math.round((i.size.height-u)/o),s.w===n.w&&s.h===n.h)||s._lastTried&&s._lastTried.w===n.w&&s._lastTried.h===n.h)return;const _=i.position.left+d,v=i.position.top+u;n.x=Math.round(_/r),n.y=Math.round(v/o),h=!0}s._event=t,s._lastTried=n;const w={x:i.position.left+d,y:i.position.top+u,w:(i.size?i.size.width:s.w*r)-d-c,h:(i.size?i.size.height:s.h*o)-u-g};if(this.engine.moveNodeCheck(s,{...n,cellWidth:r,cellHeight:o,rect:w,resizing:h})){s._lastUiPosition=i.position,this.engine.cacheRects(r,o,u,c,g,d),delete s._skipDown,h&&s.subGrid&&s.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const _=t.target;this._writePosAttr(_,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,_)}}_leave(e,t){t=t||e;const i=t.gridstackNode;i&&(t.style.transform=t.style.transformOrigin=null,T.off(e,"drag"),!i._temporaryRemoved&&(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,i._isExternal&&this.engine.cleanupNode(i),this.opts.removable===!0&&p._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&this.engine.restoreInitial()))}commit(){return Fe(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}p.renderCB=(f,e)=>{f&&(e!=null&&e.content)&&(f.textContent=e.content)},p.resizeToContentParent=".grid-stack-item-content",p.Utils=l,p.Engine=N,p.GDRev="11.3.0";const Ve=["data-index","gs-h","gs-w","gs-x","gs-y"],Ke={class:"grid-stack-item-content"},Ye=M(a.defineComponent({__name:"DraggableGridLayout",props:{tiles:{},gridSize:{},tileHeight:{default:200}},emits:["update-tiles"],setup(f,{emit:e}){const t=f,i=e,s=a.ref(null);let r=null;return a.onMounted(()=>{s.value&&(r=p.init({column:t.gridSize.cols,cellHeight:t.tileHeight,resizable:{handles:"se"},lazyLoad:!0,handle:".tile-header"},s.value),r.on("change",(o,n)=>{const h=t.tiles.map((d,c)=>{const u=n.find(g=>{var b;return Number((b=g.el)==null?void 0:b.getAttribute("data-index"))===c});return u?{...d,layout:{position:{col:u.x,row:u.y},size:{cols:u.w,rows:u.h}}}:d});i("update-tiles",h)}))}),a.onUnmounted(()=>{r&&r.destroy(!1)}),a.watch(()=>t.tiles,o=>{r&&s.value&&o.forEach((n,h)=>{var c;const d=(c=s.value)==null?void 0:c.querySelector(`[data-index="${h}"]`);d&&(r==null||r.update(d,{x:n.layout.position.col,y:n.layout.position.row,w:n.layout.size.cols,h:n.layout.size.rows}))})},{deep:!0}),(o,n)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"gridContainer",ref:s,class:"grid-stack"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.tiles,(h,d)=>(a.openBlock(),a.createElementBlock("div",{key:"tile-"+d,class:"grid-stack-item","data-index":d,"gs-h":h.layout.size.rows,"gs-w":h.layout.size.cols,"gs-x":h.layout.position.col,"gs-y":h.layout.position.row},[a.createElementVNode("div",Ke,[a.renderSlot(o.$slots,"tile",{tile:h},void 0,!0)])],8,Ve))),128))],512))}}),[["__scopeId","data-v-2c11d103"]]),je={class:"kong-ui-public-dashboard-renderer"},Xe={key:0,class:"tile-container"},Qe=M(a.defineComponent({__name:"DashboardRenderer",props:{context:{},config:{},draggable:{type:Boolean,default:!1}},emits:["edit-tile","update-tiles"],setup(f,{expose:e,emit:t}){const i=f,s=t,{i18n:r}=O.useI18n(),o=a.ref(0),n=a.inject(P);n||(console.warn("Analytics dashboards require a query bridge supplied via provide / inject."),console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"),console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements"));const h=we.useAnalyticsConfigStore(),d=a.computed(()=>i.context.timeSpec?i.context.timeSpec:{type:"relative",time_range:h.defaultQueryTimeForOrg}),c=a.computed(()=>!!i.context.timeSpec||!h.loading),u=a.computed(()=>i.config.tiles.map((_,v)=>{var k;let x=_.definition;if("description"in x.chart){const D=(k=x.chart.description)==null?void 0:k.replace(oe,()=>{const B=`renderer.trendRange.${d.value.type==="absolute"?"custom":d.value.time_range}`;return r.te(B)?r.t(B):""});x={...x,chart:{...x.chart,description:D}}}return{layout:_.layout,meta:x,id:v}})),g=a.computed(()=>{let{tz:_,refreshInterval:v,editable:x}=i.context;return _||(_=new Intl.DateTimeFormat().resolvedOptions().timeZone),v===void 0&&(v=ae),x===void 0&&(x=!1),{...i.context,tz:_,timeSpec:d.value,refreshInterval:v,editable:x}}),b=_=>{s("edit-tile",_)},E=()=>{o.value++},w=_=>{const v=_.map(x=>({layout:x.layout,definition:x.meta}));s("update-tiles",v)};return e({refresh:E}),(_,v)=>{const x=a.resolveComponent("KAlert");return a.openBlock(),a.createElementBlock("div",je,[a.unref(n)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(_.draggable?Ye:ge),{key:1,"grid-size":_.config.gridSize,"tile-height":_.config.tileHeight,tiles:u.value,onUpdateTiles:w},{tile:a.withCtx(({tile:k})=>[k.meta.chart.type==="slottable"?(a.openBlock(),a.createElementBlock("div",Xe,[a.renderSlot(_.$slots,k.meta.chart.id,{},void 0,!0)])):(a.openBlock(),a.createBlock(qe,{key:1,class:"tile-container",context:g.value,definition:k.meta,height:k.layout.size.rows*(_.config.tileHeight||a.unref(G))+parseInt(a.unref(fe),10),"query-ready":c.value,"refresh-counter":o.value,"tile-id":k.id,onEditTile:D=>b(k)},null,8,["context","definition","height","query-ready","refresh-counter","tile-id","onEditTile"]))]),_:3},40,["grid-size","tile-height","tiles"])):(a.openBlock(),a.createBlock(x,{key:0,appearance:"danger"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(r).t("renderer.noQueryBridge")),1)]),_:1}))])}}}),[["__scopeId","data-v-921334ea"]]);C.CP_ID_TOKEN=ne,C.DEFAULT_TILE_HEIGHT=G,C.DEFAULT_TILE_REFRESH_INTERVAL_MS=ae,C.DashboardRenderer=Qe,C.ENTITY_ID_TOKEN=X,C.GridLayout=ge,C.INJECT_QUERY_PROVIDER=P,C.TIMEFRAME_TOKEN=oe,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.locked[data-v-6d10428e]{cursor:move}.tooltip-container[data-v-6d10428e]{background-color:#fff;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-6d10428e]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);display:flex;flex-direction:column;margin:6px;margin:var(--kui-space-30, 6px);min-height:24px;padding-bottom:6px;padding-bottom:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .title[data-v-6d10428e]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.tooltip-container .tooltip-title .subtitle[data-v-6d10428e]{font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:6px;margin-top:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .drag-icon[data-v-6d10428e]{margin-top:6px;margin-top:var(--kui-space-30, 6px);position:absolute;right:0;top:0}.tooltip-container .tooltip[data-v-6d10428e]{list-style:none;margin:6px;margin:var(--kui-space-30, 6px);max-height:300px;min-width:250px;overflow-y:auto;overflow-y:var(--kui-space-auto, auto);padding-left:0;padding-left:var(--kui-space-0, 0px)}.tooltip-container .tooltip[data-v-6d10428e]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar-track{background:transparent}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.tooltip-container .tooltip li[data-v-6d10428e]{align-items:center;display:flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:20px;line-height:var(--kui-line-height-30, 20px)}.tooltip-container .tooltip .display-label[data-v-6d10428e]{flex:1;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tooltip-container .tooltip .display-label.empty[data-v-6d10428e]{font-style:italic}.tooltip-container .tooltip .display-value[data-v-6d10428e]{margin-left:auto;margin-left:var(--kui-space-auto, auto);padding-left:8px;padding-left:var(--kui-space-40, 8px);white-space:nowrap}.tooltip-container .tooltip .square-marker[data-v-6d10428e]{display:inline-flex;flex-direction:row;height:12px;margin-right:6px;margin-right:var(--kui-space-30, 6px);width:12px}.legend-container[data-v-57146e87]{display:flex;margin:6px 0 0;max-height:inherit;-ms-overflow-style:thin;overflow-x:hidden;overflow-y:auto;padding-left:0}.legend-container[data-v-57146e87]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.legend-container[data-v-57146e87] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.legend-container[data-v-57146e87] ::-webkit-scrollbar-track{background:transparent}.legend-container[data-v-57146e87] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.legend-container.vertical[data-v-57146e87]{flex-direction:column;justify-content:flex-start;max-height:90%;max-width:15%;min-width:10%;padding-left:12px;row-gap:16px}.legend-container.vertical .truncate-label[data-v-57146e87]{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.vertical li .legend[data-v-57146e87]{margin-top:4px}@media (max-width: 767px){.legend-container.vertical[data-v-57146e87]{column-gap:12px;display:grid;grid-template-columns:repeat(auto-fit,12ch);height:40px;justify-content:center;max-width:99%!important}.legend-container.vertical .sub-label[data-v-57146e87]{display:none}}.legend-container.horizontal[data-v-57146e87]{column-gap:12px;display:grid;height:var(--05011806);justify-content:center;width:99%}.legend-container.horizontal .truncate-label[data-v-57146e87]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-57146e87]{align-items:center;margin-top:0}.legend-container.horizontal li .label[data-v-57146e87]{line-height:24px;padding-right:2px;white-space:nowrap}.legend-container li[data-v-57146e87]{align-items:start;cursor:pointer;display:flex;line-height:1}.legend-container li .square-marker[data-v-57146e87]{height:8px;margin:0 6px 0 0;width:8px}.legend-container li .label[data-v-57146e87]{font-size:12px}.legend-container li .sub-label[data-v-57146e87]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-57146e87]{text-decoration:line-through}.legend-container li .empty[data-v-57146e87]{font-style:italic}.legend-container li .tooltip-content[data-v-57146e87]{max-width:40ch}.chart-parent[data-v-e3a7d88f]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-e3a7d88f]{flex-direction:column}.chart-parent.column .chart-container[data-v-e3a7d88f]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-e3a7d88f]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-e3a7d88f]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-e3a7d88f]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-e3a7d88f]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-e3a7d88f]{flex:1 1 auto;position:relative}.chart-container[data-v-e3a7d88f]{overflow:auto}.chart-container[data-v-e3a7d88f]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.chart-container[data-v-e3a7d88f] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.chart-container[data-v-e3a7d88f] ::-webkit-scrollbar-track{background:transparent}.chart-container[data-v-e3a7d88f] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container .chart-body[data-v-e3a7d88f]{height:100%}.chart-container[data-v-e3a7d88f]::-webkit-scrollbar-track{background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container[data-v-e3a7d88f]::-webkit-scrollbar{width:10px}.chart-container[data-v-e3a7d88f]::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.axis[data-v-e3a7d88f]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-e3a7d88f]{background-color:#000933;background-color:var(--kui-color-background-inverse, #000933);border:none;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);color:#fff;color:var(--kui-color-text-inverse, #ffffff);max-width:40ch;padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px);position:absolute;width:max-content;z-index:100}.axis-tooltip .axis-tooltip-content[data-v-e3a7d88f]{color:#fff;color:var(--kui-color-text-inverse, #ffffff);font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px)}.tooltip-boundary[data-v-e3a7d88f]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-5cc0c740]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-5cc0c740]{flex-direction:column}.chart-parent.column .chart-container[data-v-5cc0c740]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-5cc0c740]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-5cc0c740]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-5cc0c740]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-5cc0c740]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-5cc0c740]{flex:1 1 auto;position:relative}.chart-parent[data-v-9b7839b1]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-9b7839b1]{flex-direction:column}.chart-parent.column .chart-container[data-v-9b7839b1]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-9b7839b1]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-9b7839b1]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-9b7839b1]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-9b7839b1]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-9b7839b1]{flex:1 1 auto;position:relative}.kong-ui-public-csv-export-modal .modal-container{min-width:580px}.kong-ui-public-csv-export-modal .modal-container .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .modal-container .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .modal-container .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .modal-container .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .modal-container .modal-footer .vitals-report-export-button{display:inline-flex}.analytics-chart-shell[data-v-19cd92bf],.simple-chart-shell[data-v-19cd92bf]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-19cd92bf],.simple-chart-shell .chart-empty-state[data-v-19cd92bf]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-19cd92bf]{height:100%;position:relative;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-19cd92bf]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-19cd92bf]{padding:20px 0 16px;padding:var(--kui-space-70, 20px) var(--kui-space-0, 0px) var(--kui-space-60, 16px) var(--kui-space-0, 0px)}.analytics-chart-shell .chart-header[data-v-19cd92bf]{align-items:center;display:flex;justify-content:flex-start;right:0;width:100%;z-index:999}.analytics-chart-shell .chart-header .chart-header-icons-wrapper[data-v-19cd92bf]{display:flex;justify-content:end}.analytics-chart-shell .chart-header .chart-export-button[data-v-19cd92bf]{display:flex;margin-left:auto;margin-left:var(--kui-space-auto, auto);margin-right:0;margin-right:var(--kui-space-0, 0px)}.analytics-chart-shell .chart-title[data-v-19cd92bf]{cursor:default;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);max-width:32ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analytics-chart-shell .tooltip[data-v-19cd92bf]{display:flex;margin-left:12px;margin-left:var(--kui-space-50, 12px);margin-top:2px;margin-top:var(--kui-space-10, 2px)}.chart-parent[data-v-6596329c]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-6596329c]{flex-direction:column}.chart-parent.column .chart-container[data-v-6596329c]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-6596329c]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-6596329c]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-6596329c]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-6596329c]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-6596329c]{flex:1 1 auto;position:relative}.chart-parent[data-v-6596329c]{height:auto;margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:auto}.chart-parent .chart-container[data-v-6596329c]{margin:0;margin:var(--kui-space-0, 0px);max-height:100px;max-width:100px;padding:0;padding:var(--kui-space-0, 0px)}.chart-parent .chart-totals-flex[data-v-6596329c]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;padding:var(--kui-space-80, 24px) var(--kui-space-0, 0px) var(--kui-space-0, 0px);position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-6596329c]{font-size:20px;font-size:var(--kui-font-size-60, 20px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:28px;line-height:var(--kui-line-height-50, 28px)}.chart-parent .chart-totals-flex .metric-small[data-v-6596329c]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:10px;font-size:var(--kui-font-size-10, 10px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);line-height:12px;line-height:var(--kui-line-height-10, 12px)}.analytics-chart-shell[data-v-9d13f2fd],.simple-chart-shell[data-v-9d13f2fd]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-9d13f2fd],.simple-chart-shell .chart-empty-state[data-v-9d13f2fd]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-9d13f2fd]{margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px)}.simple-chart-shell .chart-empty-state[data-v-9d13f2fd]{display:flex;flex-direction:column;height:100px;justify-content:center;width:100px}.simple-chart-shell .chart-empty-state[data-v-9d13f2fd] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-top-n-table[data-v-27a707ed]{border:none!important;max-height:100%;padding:0!important}.kong-ui-public-top-n-table .top-n-card-description[data-v-27a707ed]{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table[data-v-27a707ed] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content{overflow-y:auto}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content ::-webkit-scrollbar-track{background:transparent}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.kong-ui-public-top-n-table .top-n-table[data-v-27a707ed]{display:flex;flex-direction:column;max-height:100%;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-27a707ed]{flex-shrink:0;font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-27a707ed]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-27a707ed]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-27a707ed]{padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-27a707ed]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body[data-v-27a707ed]{overflow-y:auto}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-27a707ed]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-27a707ed],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-27a707ed]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-27a707ed]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-27a707ed] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}.metricscard-tooltip,.trafficcard.active .metricscard-tooltip{pointer-events:all}.metricscard[data-v-9765f7cc]{display:flex;flex-direction:column;width:100%}@media (max-width: 767px){.metricscard[data-v-9765f7cc]{max-width:none;width:auto}}@media (min-width: 768px){.metricscard[data-v-9765f7cc]{height:100%;justify-content:space-evenly}}.metricscard[data-v-9765f7cc]:hover{border:none;text-decoration:none}.metricscard-title[data-v-9765f7cc]{align-items:center;color:#000933;color:var(--kui-color-text, #000933);display:flex;flex-direction:row;font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.metricscard-title.sm[data-v-9765f7cc]{font-size:12px;font-size:var(--kui-font-size-20, 12px)}.metricscard-title.md[data-v-9765f7cc]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.metricscard-title.lg[data-v-9765f7cc],.metricscard-title.xl[data-v-9765f7cc]{font-size:14px;font-size:var(--kui-font-size-30, 14px)}.metricscard-description[data-v-9765f7cc]{color:#afb7c5;color:var(--kui-color-text-disabled, #afb7c5);font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.metricscard-icon[data-v-9765f7cc]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.metricscard-value[data-v-9765f7cc]{color:#000933;color:var(--kui-color-text, #000933);display:flex;flex-direction:row;font-size:24px;font-size:var(--kui-font-size-70, 24px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);justify-content:space-between;line-height:32px;line-height:var(--kui-line-height-60, 32px)}.metricscard-value.sm[data-v-9765f7cc]{font-size:14px;font-size:var(--kui-font-size-30, 14px);line-height:24px;line-height:var(--kui-line-height-40, 24px)}.metricscard-value.xl[data-v-9765f7cc]{font-size:48px;font-size:var(--kui-font-size-100, 48px)}.metricscard-valuetrend[data-v-9765f7cc]{display:flex;flex-direction:column;row-gap:12px;row-gap:var(--kui-space-50, 12px)}@media (max-width: 767px){.metricscard-valuetrend[data-v-9765f7cc]{row-gap:6px;row-gap:var(--kui-space-30, 6px)}}.metricscard-valuetrend.is-compact[data-v-9765f7cc]{align-items:center;flex-direction:row!important;justify-content:space-between;margin-top:0;margin-top:var(--kui-space-0, 0px)}.metricscard-trend[data-v-9765f7cc]{align-items:center;column-gap:8px;column-gap:var(--kui-space-40, 8px);display:flex}.metricscard-trend-change[data-v-9765f7cc]{align-items:center;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:row;font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px)}.metricscard-trend-change .kui-icon[data-v-9765f7cc]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.metricscard-trend-change.positive[data-v-9765f7cc]{background-color:#ecfffb;background-color:var(--kui-color-background-success-weakest, #ecfffb);color:#007d60;color:var(--kui-color-text-success, #007d60)}.metricscard-trend-change.negative[data-v-9765f7cc]{background-color:#ffe5e5;background-color:var(--kui-color-background-danger-weakest, #ffe5e5);color:#ad000e;color:var(--kui-color-text-danger-strong, #ad000e)}.metricscard-trend-change.neutral[data-v-9765f7cc]{background-color:#e0e4ea;background-color:var(--kui-color-background-neutral-weaker, #e0e4ea);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e)}.metricscard-trend-range[data-v-9765f7cc]{color:#000933;color:var(--kui-color-text, #000933);font-size:12px;font-size:var(--kui-font-size-20, 12px)}.metricscard-tooltip[data-v-9765f7cc]{display:inline-flex;margin:auto 0 auto 4px;margin:var(--kui-space-auto, auto) var(--kui-space-0, 0px) var(--kui-space-auto, auto) var(--kui-space-20, 4px);vertical-align:middle}.metricscard-error[data-v-9765f7cc]{align-items:center;color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);display:flex;flex-direction:row;font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.metricscard-error .kong-icon-warning[data-v-9765f7cc]{margin-right:12px;margin-right:var(--kui-space-50, 12px)}.metricscard.active .metricscard-tooltip[data-v-9765f7cc]{pointer-events:all}.loading-tabs[data-v-50eab68c]{display:flex;flex-direction:column}.loading-tabs-large[data-v-50eab68c]{padding:4px;row-gap:12px;width:240px}.loading-tabs-small[data-v-50eab68c]{padding:2px;row-gap:8px;width:120px}.loading-tabs-small .box[data-v-50eab68c]{height:12px}@media (max-width: 767px){.loading-tabs[data-v-50eab68c]{width:auto}}.kong-ui-public-metric-card-container[data-v-eac0ca04]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);display:flex;flex-direction:column;justify-content:space-between;width:100%}.kong-ui-public-metric-card-container .container-title[data-v-eac0ca04]{align-items:center;display:flex;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);justify-content:space-between;margin-bottom:12px;margin-bottom:var(--kui-space-50, 12px)}.kong-ui-public-metric-card-container .container-title .container-description[data-v-eac0ca04]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400)}.kong-ui-public-metric-card-container .cards-wrapper[data-v-eac0ca04]{display:flex;flex-direction:row;flex-grow:1;column-gap:24px;row-gap:16px}@media (max-width: 767px){.kong-ui-public-metric-card-container .cards-wrapper[data-v-eac0ca04]{column-gap:16px;row-gap:16px;flex-direction:column}}.kong-ui-public-metric-card-container.sm[data-v-eac0ca04]{column-gap:0;row-gap:0}.kong-ui-public-metric-card-container .error-display[data-v-eac0ca04]{align-items:center;display:flex;justify-content:center;margin:auto;margin:var(--kui-space-auto, auto)}.kong-ui-public-metric-card-container .error-display-icon[data-v-eac0ca04]{display:flex}.kong-ui-public-metric-card-container .error-display-message[data-v-eac0ca04]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:14px;font-size:var(--kui-font-size-30, 14px);margin-left:12px;margin-left:var(--kui-space-50, 12px)}.analytics-chart[data-v-694cf637]{height:var(--c40c0e86)}.analytics-chart[data-v-1bc587d3]{height:100%}@media (min-width: 767px){.metric-card-tile-wrapper[data-v-0f571079]{align-items:center;display:flex;height:var(--926e3b48)}}.metric-card-tile-wrapper[data-v-0f571079] .kong-ui-public-metric-card-container{height:var(--7be2893e);max-height:var(--0d55c162)}@media (min-width: 767px){.metric-card-tile-wrapper[data-v-0f571079] .kong-ui-public-metric-card-container .metricscard:not(:last-of-type){border-right:1px solid #e0e4ea;border-right:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea)}}.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-fd0bbca2]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-fd0bbca2]{margin-left:auto}.kong-ui-entity-base-table[data-v-fd0bbca2] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-2e2c07e5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-2e2c07e5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-2e2c07e5]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-2e2c07e5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-2e2c07e5]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-2e2c07e5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-2e2c07e5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-775534d4]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-775534d4]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-775534d4]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-775534d4]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-775534d4]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-775534d4]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-775534d4],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-775534d4]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-775534d4],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-775534d4]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-775534d4]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-775534d4]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-775534d4]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-775534d4]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-775534d4]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-775534d4]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-775534d4] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-775534d4] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-775534d4] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-775534d4]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-775534d4]{width:640px}}.tile-boundary[data-v-ff00dcd4]{display:flex;flex-direction:column;height:var(--35d14b98);overflow:hidden}.tile-boundary .tile-header[data-v-ff00dcd4]{align-items:center;display:flex;justify-content:space-between;margin-bottom:6px;margin-bottom:var(--kui-space-30, 6px);right:0;width:100%}.tile-boundary .tile-header .title-tooltip[data-v-ff00dcd4]{margin-right:4px;overflow:hidden}.tile-boundary .tile-header .title-tooltip .title[data-v-ff00dcd4]{font-weight:700;font-weight:var(--kui-font-weight-bold, 700);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile-boundary .tile-header .tile-actions[data-v-ff00dcd4]{display:flex;gap:6px;gap:var(--kui-space-30, 6px)}.tile-boundary .tile-header .tile-actions .edit-icon[data-v-ff00dcd4]{cursor:pointer}.tile-boundary .tile-header .header-description[data-v-ff00dcd4]{color:#6c7489;font-size:12px;text-align:right}.tile-boundary .tile-header .dropdown[data-v-ff00dcd4]{display:flex;margin-left:auto;margin-left:var(--kui-space-auto, auto);margin-right:0;margin-right:var(--kui-space-0, 0px)}.tile-boundary .tile-header .dropdown .kebab-action-menu[data-v-ff00dcd4]{cursor:pointer}.tile-boundary .tile-header .dropdown li.k-dropdown-item a[data-v-ff00dcd4]{text-decoration:none}.tile-boundary .tile-header .dropdown a[data-v-ff00dcd4]{color:#000933}.tile-boundary .tile-header .dropdown a[data-v-ff00dcd4]:hover{color:#000933;text-decoration:none}.tile-boundary .tile-header .dropdown[data-v-ff00dcd4]:hover{cursor:pointer}.tile-boundary .tile-content[data-v-ff00dcd4]{flex-grow:1;overflow:hidden}.kong-ui-public-grid-layout[data-v-f43eb7b8]{display:grid;gap:20px;gap:var(--kui-space-70, 20px);grid-template-columns:repeat(var(--3bc5e939),1fr);grid-template-rows:var(--77aa3028);width:100%}@media (max-width: 768px){.kong-ui-public-grid-layout[data-v-f43eb7b8]{display:flex;flex-direction:column}.kong-ui-public-grid-layout .grid-cell[data-v-f43eb7b8]{height:auto!important;left:auto!important;position:relative;top:auto!important;transform:none!important;width:auto!important}.kong-ui-public-grid-layout .grid-cell[data-v-f43eb7b8]:not(:first-child){margin-top:20px;margin-top:var(--kui-space-70, 20px)}.kong-ui-public-grid-layout .empty-cell[data-v-f43eb7b8]{display:none}}.grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:0}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:0}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,top;cursor:move}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack>.grid-stack-item[gs-x="0"]{left:0}.gs-12>.grid-stack-item{width:8.333%}.gs-12>.grid-stack-item[gs-x="1"]{left:8.333%}.gs-12>.grid-stack-item[gs-w="2"]{width:16.667%}.gs-12>.grid-stack-item[gs-x="2"]{left:16.667%}.gs-12>.grid-stack-item[gs-w="3"]{width:25%}.gs-12>.grid-stack-item[gs-x="3"]{left:25%}.gs-12>.grid-stack-item[gs-w="4"]{width:33.333%}.gs-12>.grid-stack-item[gs-x="4"]{left:33.333%}.gs-12>.grid-stack-item[gs-w="5"]{width:41.667%}.gs-12>.grid-stack-item[gs-x="5"]{left:41.667%}.gs-12>.grid-stack-item[gs-w="6"]{width:50%}.gs-12>.grid-stack-item[gs-x="6"]{left:50%}.gs-12>.grid-stack-item[gs-w="7"]{width:58.333%}.gs-12>.grid-stack-item[gs-x="7"]{left:58.333%}.gs-12>.grid-stack-item[gs-w="8"]{width:66.667%}.gs-12>.grid-stack-item[gs-x="8"]{left:66.667%}.gs-12>.grid-stack-item[gs-w="9"]{width:75%}.gs-12>.grid-stack-item[gs-x="9"]{left:75%}.gs-12>.grid-stack-item[gs-w="10"]{width:83.333%}.gs-12>.grid-stack-item[gs-x="10"]{left:83.333%}.gs-12>.grid-stack-item[gs-w="11"]{width:91.667%}.gs-12>.grid-stack-item[gs-x="11"]{left:91.667%}.gs-12>.grid-stack-item[gs-w="12"]{width:100%}.gs-1>.grid-stack-item{width:100%}.gs-2>.grid-stack-item{width:50%}.gs-2>.grid-stack-item[gs-x="1"]{left:50%}.gs-2>.grid-stack-item[gs-w="2"]{width:100%}.gs-3>.grid-stack-item{width:33.333%}.gs-3>.grid-stack-item[gs-x="1"]{left:33.333%}.gs-3>.grid-stack-item[gs-w="2"]{width:66.667%}.gs-3>.grid-stack-item[gs-x="2"]{left:66.667%}.gs-3>.grid-stack-item[gs-w="3"]{width:100%}.gs-4>.grid-stack-item{width:25%}.gs-4>.grid-stack-item[gs-x="1"]{left:25%}.gs-4>.grid-stack-item[gs-w="2"]{width:50%}.gs-4>.grid-stack-item[gs-x="2"]{left:50%}.gs-4>.grid-stack-item[gs-w="3"]{width:75%}.gs-4>.grid-stack-item[gs-x="3"]{left:75%}.gs-4>.grid-stack-item[gs-w="4"]{width:100%}.gs-5>.grid-stack-item{width:20%}.gs-5>.grid-stack-item[gs-x="1"]{left:20%}.gs-5>.grid-stack-item[gs-w="2"]{width:40%}.gs-5>.grid-stack-item[gs-x="2"]{left:40%}.gs-5>.grid-stack-item[gs-w="3"]{width:60%}.gs-5>.grid-stack-item[gs-x="3"]{left:60%}.gs-5>.grid-stack-item[gs-w="4"]{width:80%}.gs-5>.grid-stack-item[gs-x="4"]{left:80%}.gs-5>.grid-stack-item[gs-w="5"]{width:100%}.gs-6>.grid-stack-item{width:16.667%}.gs-6>.grid-stack-item[gs-x="1"]{left:16.667%}.gs-6>.grid-stack-item[gs-w="2"]{width:33.333%}.gs-6>.grid-stack-item[gs-x="2"]{left:33.333%}.gs-6>.grid-stack-item[gs-w="3"]{width:50%}.gs-6>.grid-stack-item[gs-x="3"]{left:50%}.gs-6>.grid-stack-item[gs-w="4"]{width:66.667%}.gs-6>.grid-stack-item[gs-x="4"]{left:66.667%}.gs-6>.grid-stack-item[gs-w="5"]{width:83.333%}.gs-6>.grid-stack-item[gs-x="5"]{left:83.333%}.gs-6>.grid-stack-item[gs-w="6"]{width:100%}.gs-7>.grid-stack-item{width:14.286%}.gs-7>.grid-stack-item[gs-x="1"]{left:14.286%}.gs-7>.grid-stack-item[gs-w="2"]{width:28.571%}.gs-7>.grid-stack-item[gs-x="2"]{left:28.571%}.gs-7>.grid-stack-item[gs-w="3"]{width:42.857%}.gs-7>.grid-stack-item[gs-x="3"]{left:42.857%}.gs-7>.grid-stack-item[gs-w="4"]{width:57.143%}.gs-7>.grid-stack-item[gs-x="4"]{left:57.143%}.gs-7>.grid-stack-item[gs-w="5"]{width:71.429%}.gs-7>.grid-stack-item[gs-x="5"]{left:71.429%}.gs-7>.grid-stack-item[gs-w="6"]{width:85.714%}.gs-7>.grid-stack-item[gs-x="6"]{left:85.714%}.gs-7>.grid-stack-item[gs-w="7"]{width:100%}.gs-8>.grid-stack-item{width:12.5%}.gs-8>.grid-stack-item[gs-x="1"]{left:12.5%}.gs-8>.grid-stack-item[gs-w="2"]{width:25%}.gs-8>.grid-stack-item[gs-x="2"]{left:25%}.gs-8>.grid-stack-item[gs-w="3"]{width:37.5%}.gs-8>.grid-stack-item[gs-x="3"]{left:37.5%}.gs-8>.grid-stack-item[gs-w="4"]{width:50%}.gs-8>.grid-stack-item[gs-x="4"]{left:50%}.gs-8>.grid-stack-item[gs-w="5"]{width:62.5%}.gs-8>.grid-stack-item[gs-x="5"]{left:62.5%}.gs-8>.grid-stack-item[gs-w="6"]{width:75%}.gs-8>.grid-stack-item[gs-x="6"]{left:75%}.gs-8>.grid-stack-item[gs-w="7"]{width:87.5%}.gs-8>.grid-stack-item[gs-x="7"]{left:87.5%}.gs-8>.grid-stack-item[gs-w="8"]{width:100%}.gs-9>.grid-stack-item{width:11.111%}.gs-9>.grid-stack-item[gs-x="1"]{left:11.111%}.gs-9>.grid-stack-item[gs-w="2"]{width:22.222%}.gs-9>.grid-stack-item[gs-x="2"]{left:22.222%}.gs-9>.grid-stack-item[gs-w="3"]{width:33.333%}.gs-9>.grid-stack-item[gs-x="3"]{left:33.333%}.gs-9>.grid-stack-item[gs-w="4"]{width:44.444%}.gs-9>.grid-stack-item[gs-x="4"]{left:44.444%}.gs-9>.grid-stack-item[gs-w="5"]{width:55.556%}.gs-9>.grid-stack-item[gs-x="5"]{left:55.556%}.gs-9>.grid-stack-item[gs-w="6"]{width:66.667%}.gs-9>.grid-stack-item[gs-x="6"]{left:66.667%}.gs-9>.grid-stack-item[gs-w="7"]{width:77.778%}.gs-9>.grid-stack-item[gs-x="7"]{left:77.778%}.gs-9>.grid-stack-item[gs-w="8"]{width:88.889%}.gs-9>.grid-stack-item[gs-x="8"]{left:88.889%}.gs-9>.grid-stack-item[gs-w="9"]{width:100%}.gs-10>.grid-stack-item{width:10%}.gs-10>.grid-stack-item[gs-x="1"]{left:10%}.gs-10>.grid-stack-item[gs-w="2"]{width:20%}.gs-10>.grid-stack-item[gs-x="2"]{left:20%}.gs-10>.grid-stack-item[gs-w="3"]{width:30%}.gs-10>.grid-stack-item[gs-x="3"]{left:30%}.gs-10>.grid-stack-item[gs-w="4"]{width:40%}.gs-10>.grid-stack-item[gs-x="4"]{left:40%}.gs-10>.grid-stack-item[gs-w="5"]{width:50%}.gs-10>.grid-stack-item[gs-x="5"]{left:50%}.gs-10>.grid-stack-item[gs-w="6"]{width:60%}.gs-10>.grid-stack-item[gs-x="6"]{left:60%}.gs-10>.grid-stack-item[gs-w="7"]{width:70%}.gs-10>.grid-stack-item[gs-x="7"]{left:70%}.gs-10>.grid-stack-item[gs-w="8"]{width:80%}.gs-10>.grid-stack-item[gs-x="8"]{left:80%}.gs-10>.grid-stack-item[gs-w="9"]{width:90%}.gs-10>.grid-stack-item[gs-x="9"]{left:90%}.gs-10>.grid-stack-item[gs-w="10"]{width:100%}.gs-11>.grid-stack-item{width:9.091%}.gs-11>.grid-stack-item[gs-x="1"]{left:9.091%}.gs-11>.grid-stack-item[gs-w="2"]{width:18.182%}.gs-11>.grid-stack-item[gs-x="2"]{left:18.182%}.gs-11>.grid-stack-item[gs-w="3"]{width:27.273%}.gs-11>.grid-stack-item[gs-x="3"]{left:27.273%}.gs-11>.grid-stack-item[gs-w="4"]{width:36.364%}.gs-11>.grid-stack-item[gs-x="4"]{left:36.364%}.gs-11>.grid-stack-item[gs-w="5"]{width:45.455%}.gs-11>.grid-stack-item[gs-x="5"]{left:45.455%}.gs-11>.grid-stack-item[gs-w="6"]{width:54.545%}.gs-11>.grid-stack-item[gs-x="6"]{left:54.545%}.gs-11>.grid-stack-item[gs-w="7"]{width:63.636%}.gs-11>.grid-stack-item[gs-x="7"]{left:63.636%}.gs-11>.grid-stack-item[gs-w="8"]{width:72.727%}.gs-11>.grid-stack-item[gs-x="8"]{left:72.727%}.gs-11>.grid-stack-item[gs-w="9"]{width:81.818%}.gs-11>.grid-stack-item[gs-x="9"]{left:81.818%}.gs-11>.grid-stack-item[gs-w="10"]{width:90.909%}.gs-11>.grid-stack-item[gs-x="10"]{left:90.909%}.gs-11>.grid-stack-item[gs-w="11"]{width:100%}.kong-ui-public-dashboard-renderer .tile-container[data-v-57e1dfb8]{background:transparent;background:var(--kui-color-background-transparent, transparent);border:1px solid #e0e4ea;border:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);height:100%;padding:20px;padding:var(--kui-space-70, 20px)}
|
|
1
|
+
.locked[data-v-6d10428e]{cursor:move}.tooltip-container[data-v-6d10428e]{background-color:#fff;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-6d10428e]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);display:flex;flex-direction:column;margin:6px;margin:var(--kui-space-30, 6px);min-height:24px;padding-bottom:6px;padding-bottom:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .title[data-v-6d10428e]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.tooltip-container .tooltip-title .subtitle[data-v-6d10428e]{font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:6px;margin-top:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .drag-icon[data-v-6d10428e]{margin-top:6px;margin-top:var(--kui-space-30, 6px);position:absolute;right:0;top:0}.tooltip-container .tooltip[data-v-6d10428e]{list-style:none;margin:6px;margin:var(--kui-space-30, 6px);max-height:300px;min-width:250px;overflow-y:auto;overflow-y:var(--kui-space-auto, auto);padding-left:0;padding-left:var(--kui-space-0, 0px)}.tooltip-container .tooltip[data-v-6d10428e]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar-track{background:transparent}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.tooltip-container .tooltip li[data-v-6d10428e]{align-items:center;display:flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:20px;line-height:var(--kui-line-height-30, 20px)}.tooltip-container .tooltip .display-label[data-v-6d10428e]{flex:1;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tooltip-container .tooltip .display-label.empty[data-v-6d10428e]{font-style:italic}.tooltip-container .tooltip .display-value[data-v-6d10428e]{margin-left:auto;margin-left:var(--kui-space-auto, auto);padding-left:8px;padding-left:var(--kui-space-40, 8px);white-space:nowrap}.tooltip-container .tooltip .square-marker[data-v-6d10428e]{display:inline-flex;flex-direction:row;height:12px;margin-right:6px;margin-right:var(--kui-space-30, 6px);width:12px}.legend-container[data-v-57146e87]{display:flex;margin:6px 0 0;max-height:inherit;-ms-overflow-style:thin;overflow-x:hidden;overflow-y:auto;padding-left:0}.legend-container[data-v-57146e87]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.legend-container[data-v-57146e87] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.legend-container[data-v-57146e87] ::-webkit-scrollbar-track{background:transparent}.legend-container[data-v-57146e87] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.legend-container.vertical[data-v-57146e87]{flex-direction:column;justify-content:flex-start;max-height:90%;max-width:15%;min-width:10%;padding-left:12px;row-gap:16px}.legend-container.vertical .truncate-label[data-v-57146e87]{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.vertical li .legend[data-v-57146e87]{margin-top:4px}@media (max-width: 767px){.legend-container.vertical[data-v-57146e87]{column-gap:12px;display:grid;grid-template-columns:repeat(auto-fit,12ch);height:40px;justify-content:center;max-width:99%!important}.legend-container.vertical .sub-label[data-v-57146e87]{display:none}}.legend-container.horizontal[data-v-57146e87]{column-gap:12px;display:grid;height:var(--05011806);justify-content:center;width:99%}.legend-container.horizontal .truncate-label[data-v-57146e87]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-57146e87]{align-items:center;margin-top:0}.legend-container.horizontal li .label[data-v-57146e87]{line-height:24px;padding-right:2px;white-space:nowrap}.legend-container li[data-v-57146e87]{align-items:start;cursor:pointer;display:flex;line-height:1}.legend-container li .square-marker[data-v-57146e87]{height:8px;margin:0 6px 0 0;width:8px}.legend-container li .label[data-v-57146e87]{font-size:12px}.legend-container li .sub-label[data-v-57146e87]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-57146e87]{text-decoration:line-through}.legend-container li .empty[data-v-57146e87]{font-style:italic}.legend-container li .tooltip-content[data-v-57146e87]{max-width:40ch}.chart-parent[data-v-e3a7d88f]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-e3a7d88f]{flex-direction:column}.chart-parent.column .chart-container[data-v-e3a7d88f]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-e3a7d88f]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-e3a7d88f]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-e3a7d88f]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-e3a7d88f]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-e3a7d88f]{flex:1 1 auto;position:relative}.chart-container[data-v-e3a7d88f]{overflow:auto}.chart-container[data-v-e3a7d88f]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.chart-container[data-v-e3a7d88f] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.chart-container[data-v-e3a7d88f] ::-webkit-scrollbar-track{background:transparent}.chart-container[data-v-e3a7d88f] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container .chart-body[data-v-e3a7d88f]{height:100%}.chart-container[data-v-e3a7d88f]::-webkit-scrollbar-track{background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container[data-v-e3a7d88f]::-webkit-scrollbar{width:10px}.chart-container[data-v-e3a7d88f]::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.axis[data-v-e3a7d88f]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-e3a7d88f]{background-color:#000933;background-color:var(--kui-color-background-inverse, #000933);border:none;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);color:#fff;color:var(--kui-color-text-inverse, #ffffff);max-width:40ch;padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px);position:absolute;width:max-content;z-index:100}.axis-tooltip .axis-tooltip-content[data-v-e3a7d88f]{color:#fff;color:var(--kui-color-text-inverse, #ffffff);font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px)}.tooltip-boundary[data-v-e3a7d88f]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-5cc0c740]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-5cc0c740]{flex-direction:column}.chart-parent.column .chart-container[data-v-5cc0c740]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-5cc0c740]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-5cc0c740]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-5cc0c740]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-5cc0c740]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-5cc0c740]{flex:1 1 auto;position:relative}.chart-parent[data-v-9b7839b1]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-9b7839b1]{flex-direction:column}.chart-parent.column .chart-container[data-v-9b7839b1]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-9b7839b1]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-9b7839b1]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-9b7839b1]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-9b7839b1]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-9b7839b1]{flex:1 1 auto;position:relative}.kong-ui-public-csv-export-modal .modal-container{min-width:580px}.kong-ui-public-csv-export-modal .modal-container .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .modal-container .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .modal-container .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .modal-container .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .modal-container .modal-footer .vitals-report-export-button{display:inline-flex}.analytics-chart-shell[data-v-19cd92bf],.simple-chart-shell[data-v-19cd92bf]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-19cd92bf],.simple-chart-shell .chart-empty-state[data-v-19cd92bf]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-19cd92bf]{height:100%;position:relative;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-19cd92bf]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-19cd92bf]{padding:20px 0 16px;padding:var(--kui-space-70, 20px) var(--kui-space-0, 0px) var(--kui-space-60, 16px) var(--kui-space-0, 0px)}.analytics-chart-shell .chart-header[data-v-19cd92bf]{align-items:center;display:flex;justify-content:flex-start;right:0;width:100%;z-index:999}.analytics-chart-shell .chart-header .chart-header-icons-wrapper[data-v-19cd92bf]{display:flex;justify-content:end}.analytics-chart-shell .chart-header .chart-export-button[data-v-19cd92bf]{display:flex;margin-left:auto;margin-left:var(--kui-space-auto, auto);margin-right:0;margin-right:var(--kui-space-0, 0px)}.analytics-chart-shell .chart-title[data-v-19cd92bf]{cursor:default;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);max-width:32ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analytics-chart-shell .tooltip[data-v-19cd92bf]{display:flex;margin-left:12px;margin-left:var(--kui-space-50, 12px);margin-top:2px;margin-top:var(--kui-space-10, 2px)}.chart-parent[data-v-6596329c]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-6596329c]{flex-direction:column}.chart-parent.column .chart-container[data-v-6596329c]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-6596329c]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-6596329c]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-6596329c]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-6596329c]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-6596329c]{flex:1 1 auto;position:relative}.chart-parent[data-v-6596329c]{height:auto;margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:auto}.chart-parent .chart-container[data-v-6596329c]{margin:0;margin:var(--kui-space-0, 0px);max-height:100px;max-width:100px;padding:0;padding:var(--kui-space-0, 0px)}.chart-parent .chart-totals-flex[data-v-6596329c]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;padding:var(--kui-space-80, 24px) var(--kui-space-0, 0px) var(--kui-space-0, 0px);position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-6596329c]{font-size:20px;font-size:var(--kui-font-size-60, 20px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:28px;line-height:var(--kui-line-height-50, 28px)}.chart-parent .chart-totals-flex .metric-small[data-v-6596329c]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:10px;font-size:var(--kui-font-size-10, 10px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);line-height:12px;line-height:var(--kui-line-height-10, 12px)}.analytics-chart-shell[data-v-9d13f2fd],.simple-chart-shell[data-v-9d13f2fd]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-9d13f2fd],.simple-chart-shell .chart-empty-state[data-v-9d13f2fd]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-9d13f2fd]{margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px)}.simple-chart-shell .chart-empty-state[data-v-9d13f2fd]{display:flex;flex-direction:column;height:100px;justify-content:center;width:100px}.simple-chart-shell .chart-empty-state[data-v-9d13f2fd] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-top-n-table[data-v-27a707ed]{border:none!important;max-height:100%;padding:0!important}.kong-ui-public-top-n-table .top-n-card-description[data-v-27a707ed]{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table[data-v-27a707ed] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content{overflow-y:auto}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content ::-webkit-scrollbar-track{background:transparent}.kong-ui-public-top-n-table[data-v-27a707ed] .card-content ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.kong-ui-public-top-n-table .top-n-table[data-v-27a707ed]{display:flex;flex-direction:column;max-height:100%;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-27a707ed]{flex-shrink:0;font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-27a707ed]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-27a707ed]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-27a707ed]{padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-27a707ed]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body[data-v-27a707ed]{overflow-y:auto}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-27a707ed]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-27a707ed],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-27a707ed]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-27a707ed]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-27a707ed] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}.metricscard-tooltip,.trafficcard.active .metricscard-tooltip{pointer-events:all}.metricscard[data-v-9765f7cc]{display:flex;flex-direction:column;width:100%}@media (max-width: 767px){.metricscard[data-v-9765f7cc]{max-width:none;width:auto}}@media (min-width: 768px){.metricscard[data-v-9765f7cc]{height:100%;justify-content:space-evenly}}.metricscard[data-v-9765f7cc]:hover{border:none;text-decoration:none}.metricscard-title[data-v-9765f7cc]{align-items:center;color:#000933;color:var(--kui-color-text, #000933);display:flex;flex-direction:row;font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.metricscard-title.sm[data-v-9765f7cc]{font-size:12px;font-size:var(--kui-font-size-20, 12px)}.metricscard-title.md[data-v-9765f7cc]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.metricscard-title.lg[data-v-9765f7cc],.metricscard-title.xl[data-v-9765f7cc]{font-size:14px;font-size:var(--kui-font-size-30, 14px)}.metricscard-description[data-v-9765f7cc]{color:#afb7c5;color:var(--kui-color-text-disabled, #afb7c5);font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.metricscard-icon[data-v-9765f7cc]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.metricscard-value[data-v-9765f7cc]{color:#000933;color:var(--kui-color-text, #000933);display:flex;flex-direction:row;font-size:24px;font-size:var(--kui-font-size-70, 24px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);justify-content:space-between;line-height:32px;line-height:var(--kui-line-height-60, 32px)}.metricscard-value.sm[data-v-9765f7cc]{font-size:14px;font-size:var(--kui-font-size-30, 14px);line-height:24px;line-height:var(--kui-line-height-40, 24px)}.metricscard-value.xl[data-v-9765f7cc]{font-size:48px;font-size:var(--kui-font-size-100, 48px)}.metricscard-valuetrend[data-v-9765f7cc]{display:flex;flex-direction:column;row-gap:12px;row-gap:var(--kui-space-50, 12px)}@media (max-width: 767px){.metricscard-valuetrend[data-v-9765f7cc]{row-gap:6px;row-gap:var(--kui-space-30, 6px)}}.metricscard-valuetrend.is-compact[data-v-9765f7cc]{align-items:center;flex-direction:row!important;justify-content:space-between;margin-top:0;margin-top:var(--kui-space-0, 0px)}.metricscard-trend[data-v-9765f7cc]{align-items:center;column-gap:8px;column-gap:var(--kui-space-40, 8px);display:flex}.metricscard-trend-change[data-v-9765f7cc]{align-items:center;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:row;font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px)}.metricscard-trend-change .kui-icon[data-v-9765f7cc]{margin-right:4px;margin-right:var(--kui-space-20, 4px)}.metricscard-trend-change.positive[data-v-9765f7cc]{background-color:#ecfffb;background-color:var(--kui-color-background-success-weakest, #ecfffb);color:#007d60;color:var(--kui-color-text-success, #007d60)}.metricscard-trend-change.negative[data-v-9765f7cc]{background-color:#ffe5e5;background-color:var(--kui-color-background-danger-weakest, #ffe5e5);color:#ad000e;color:var(--kui-color-text-danger-strong, #ad000e)}.metricscard-trend-change.neutral[data-v-9765f7cc]{background-color:#e0e4ea;background-color:var(--kui-color-background-neutral-weaker, #e0e4ea);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e)}.metricscard-trend-range[data-v-9765f7cc]{color:#000933;color:var(--kui-color-text, #000933);font-size:12px;font-size:var(--kui-font-size-20, 12px)}.metricscard-tooltip[data-v-9765f7cc]{display:inline-flex;margin:auto 0 auto 4px;margin:var(--kui-space-auto, auto) var(--kui-space-0, 0px) var(--kui-space-auto, auto) var(--kui-space-20, 4px);vertical-align:middle}.metricscard-error[data-v-9765f7cc]{align-items:center;color:#3a3f51;color:var(--kui-color-text-neutral-stronger, #3a3f51);display:flex;flex-direction:row;font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:8px;margin-top:var(--kui-space-40, 8px)}.metricscard-error .kong-icon-warning[data-v-9765f7cc]{margin-right:12px;margin-right:var(--kui-space-50, 12px)}.metricscard.active .metricscard-tooltip[data-v-9765f7cc]{pointer-events:all}.loading-tabs[data-v-50eab68c]{display:flex;flex-direction:column}.loading-tabs-large[data-v-50eab68c]{padding:4px;row-gap:12px;width:240px}.loading-tabs-small[data-v-50eab68c]{padding:2px;row-gap:8px;width:120px}.loading-tabs-small .box[data-v-50eab68c]{height:12px}@media (max-width: 767px){.loading-tabs[data-v-50eab68c]{width:auto}}.kong-ui-public-metric-card-container[data-v-eac0ca04]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);display:flex;flex-direction:column;justify-content:space-between;width:100%}.kong-ui-public-metric-card-container .container-title[data-v-eac0ca04]{align-items:center;display:flex;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);justify-content:space-between;margin-bottom:12px;margin-bottom:var(--kui-space-50, 12px)}.kong-ui-public-metric-card-container .container-title .container-description[data-v-eac0ca04]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400)}.kong-ui-public-metric-card-container .cards-wrapper[data-v-eac0ca04]{display:flex;flex-direction:row;flex-grow:1;column-gap:24px;row-gap:16px}@media (max-width: 767px){.kong-ui-public-metric-card-container .cards-wrapper[data-v-eac0ca04]{column-gap:16px;row-gap:16px;flex-direction:column}}.kong-ui-public-metric-card-container.sm[data-v-eac0ca04]{column-gap:0;row-gap:0}.kong-ui-public-metric-card-container .error-display[data-v-eac0ca04]{align-items:center;display:flex;justify-content:center;margin:auto;margin:var(--kui-space-auto, auto)}.kong-ui-public-metric-card-container .error-display-icon[data-v-eac0ca04]{display:flex}.kong-ui-public-metric-card-container .error-display-message[data-v-eac0ca04]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:14px;font-size:var(--kui-font-size-30, 14px);margin-left:12px;margin-left:var(--kui-space-50, 12px)}.analytics-chart[data-v-694cf637]{height:var(--c40c0e86)}.analytics-chart[data-v-1bc587d3]{height:100%}@media (min-width: 767px){.metric-card-tile-wrapper[data-v-0f571079]{align-items:center;display:flex;height:var(--926e3b48)}}.metric-card-tile-wrapper[data-v-0f571079] .kong-ui-public-metric-card-container{height:var(--7be2893e);max-height:var(--0d55c162)}@media (min-width: 767px){.metric-card-tile-wrapper[data-v-0f571079] .kong-ui-public-metric-card-container .metricscard:not(:last-of-type){border-right:1px solid #e0e4ea;border-right:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea)}}.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-fd0bbca2]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-fd0bbca2]{margin-left:auto}.kong-ui-entity-base-table[data-v-fd0bbca2] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-2e2c07e5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-2e2c07e5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-2e2c07e5]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-2e2c07e5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-2e2c07e5]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-2e2c07e5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-2e2c07e5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-775534d4]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-775534d4]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-775534d4]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-775534d4]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-775534d4]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-775534d4]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-775534d4],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-775534d4]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-775534d4],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-775534d4]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-775534d4]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-775534d4]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-775534d4]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-775534d4]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-775534d4]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-775534d4]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-775534d4] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-775534d4] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-775534d4] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-775534d4]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-775534d4]{width:640px}}.tile-boundary[data-v-30fafa9c]{display:flex;flex-direction:column;height:var(--733568b4);overflow:hidden}.tile-boundary .tile-header[data-v-30fafa9c]{align-items:center;display:flex;justify-content:space-between;margin-bottom:6px;margin-bottom:var(--kui-space-30, 6px);padding-top:20px;padding-top:var(--kui-space-70, 20px);right:0;width:100%}.tile-boundary .tile-header .title-tooltip[data-v-30fafa9c]{margin-right:4px;overflow:hidden}.tile-boundary .tile-header .title-tooltip .title[data-v-30fafa9c]{font-weight:700;font-weight:var(--kui-font-weight-bold, 700);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile-boundary .tile-header .tile-actions[data-v-30fafa9c]{display:flex;gap:6px;gap:var(--kui-space-30, 6px)}.tile-boundary .tile-header .tile-actions .edit-icon[data-v-30fafa9c]{cursor:pointer}.tile-boundary .tile-header .header-description[data-v-30fafa9c]{color:#6c7489;font-size:12px;text-align:right}.tile-boundary .tile-header .dropdown[data-v-30fafa9c]{display:flex;margin-left:auto;margin-left:var(--kui-space-auto, auto);margin-right:0;margin-right:var(--kui-space-0, 0px)}.tile-boundary .tile-header .dropdown .kebab-action-menu[data-v-30fafa9c]{cursor:pointer}.tile-boundary .tile-header .dropdown li.k-dropdown-item a[data-v-30fafa9c]{text-decoration:none}.tile-boundary .tile-header .dropdown a[data-v-30fafa9c]{color:#000933}.tile-boundary .tile-header .dropdown a[data-v-30fafa9c]:hover{color:#000933;text-decoration:none}.tile-boundary .tile-header .dropdown[data-v-30fafa9c]:hover{cursor:pointer}.tile-boundary .tile-content[data-v-30fafa9c]{flex-grow:1;overflow:hidden}.kong-ui-public-grid-layout[data-v-f43eb7b8]{display:grid;gap:20px;gap:var(--kui-space-70, 20px);grid-template-columns:repeat(var(--3bc5e939),1fr);grid-template-rows:var(--77aa3028);width:100%}@media (max-width: 768px){.kong-ui-public-grid-layout[data-v-f43eb7b8]{display:flex;flex-direction:column}.kong-ui-public-grid-layout .grid-cell[data-v-f43eb7b8]{height:auto!important;left:auto!important;position:relative;top:auto!important;transform:none!important;width:auto!important}.kong-ui-public-grid-layout .grid-cell[data-v-f43eb7b8]:not(:first-child){margin-top:20px;margin-top:var(--kui-space-70, 20px)}.kong-ui-public-grid-layout .empty-cell[data-v-f43eb7b8]{display:none}}.grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:0}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:0}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,top;cursor:move}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack>.grid-stack-item[gs-x="0"]{left:0}.gs-12>.grid-stack-item{width:8.333%}.gs-12>.grid-stack-item[gs-x="1"]{left:8.333%}.gs-12>.grid-stack-item[gs-w="2"]{width:16.667%}.gs-12>.grid-stack-item[gs-x="2"]{left:16.667%}.gs-12>.grid-stack-item[gs-w="3"]{width:25%}.gs-12>.grid-stack-item[gs-x="3"]{left:25%}.gs-12>.grid-stack-item[gs-w="4"]{width:33.333%}.gs-12>.grid-stack-item[gs-x="4"]{left:33.333%}.gs-12>.grid-stack-item[gs-w="5"]{width:41.667%}.gs-12>.grid-stack-item[gs-x="5"]{left:41.667%}.gs-12>.grid-stack-item[gs-w="6"]{width:50%}.gs-12>.grid-stack-item[gs-x="6"]{left:50%}.gs-12>.grid-stack-item[gs-w="7"]{width:58.333%}.gs-12>.grid-stack-item[gs-x="7"]{left:58.333%}.gs-12>.grid-stack-item[gs-w="8"]{width:66.667%}.gs-12>.grid-stack-item[gs-x="8"]{left:66.667%}.gs-12>.grid-stack-item[gs-w="9"]{width:75%}.gs-12>.grid-stack-item[gs-x="9"]{left:75%}.gs-12>.grid-stack-item[gs-w="10"]{width:83.333%}.gs-12>.grid-stack-item[gs-x="10"]{left:83.333%}.gs-12>.grid-stack-item[gs-w="11"]{width:91.667%}.gs-12>.grid-stack-item[gs-x="11"]{left:91.667%}.gs-12>.grid-stack-item[gs-w="12"]{width:100%}.gs-1>.grid-stack-item{width:100%}.gs-2>.grid-stack-item{width:50%}.gs-2>.grid-stack-item[gs-x="1"]{left:50%}.gs-2>.grid-stack-item[gs-w="2"]{width:100%}.gs-3>.grid-stack-item{width:33.333%}.gs-3>.grid-stack-item[gs-x="1"]{left:33.333%}.gs-3>.grid-stack-item[gs-w="2"]{width:66.667%}.gs-3>.grid-stack-item[gs-x="2"]{left:66.667%}.gs-3>.grid-stack-item[gs-w="3"]{width:100%}.gs-4>.grid-stack-item{width:25%}.gs-4>.grid-stack-item[gs-x="1"]{left:25%}.gs-4>.grid-stack-item[gs-w="2"]{width:50%}.gs-4>.grid-stack-item[gs-x="2"]{left:50%}.gs-4>.grid-stack-item[gs-w="3"]{width:75%}.gs-4>.grid-stack-item[gs-x="3"]{left:75%}.gs-4>.grid-stack-item[gs-w="4"]{width:100%}.gs-5>.grid-stack-item{width:20%}.gs-5>.grid-stack-item[gs-x="1"]{left:20%}.gs-5>.grid-stack-item[gs-w="2"]{width:40%}.gs-5>.grid-stack-item[gs-x="2"]{left:40%}.gs-5>.grid-stack-item[gs-w="3"]{width:60%}.gs-5>.grid-stack-item[gs-x="3"]{left:60%}.gs-5>.grid-stack-item[gs-w="4"]{width:80%}.gs-5>.grid-stack-item[gs-x="4"]{left:80%}.gs-5>.grid-stack-item[gs-w="5"]{width:100%}.gs-6>.grid-stack-item{width:16.667%}.gs-6>.grid-stack-item[gs-x="1"]{left:16.667%}.gs-6>.grid-stack-item[gs-w="2"]{width:33.333%}.gs-6>.grid-stack-item[gs-x="2"]{left:33.333%}.gs-6>.grid-stack-item[gs-w="3"]{width:50%}.gs-6>.grid-stack-item[gs-x="3"]{left:50%}.gs-6>.grid-stack-item[gs-w="4"]{width:66.667%}.gs-6>.grid-stack-item[gs-x="4"]{left:66.667%}.gs-6>.grid-stack-item[gs-w="5"]{width:83.333%}.gs-6>.grid-stack-item[gs-x="5"]{left:83.333%}.gs-6>.grid-stack-item[gs-w="6"]{width:100%}.gs-7>.grid-stack-item{width:14.286%}.gs-7>.grid-stack-item[gs-x="1"]{left:14.286%}.gs-7>.grid-stack-item[gs-w="2"]{width:28.571%}.gs-7>.grid-stack-item[gs-x="2"]{left:28.571%}.gs-7>.grid-stack-item[gs-w="3"]{width:42.857%}.gs-7>.grid-stack-item[gs-x="3"]{left:42.857%}.gs-7>.grid-stack-item[gs-w="4"]{width:57.143%}.gs-7>.grid-stack-item[gs-x="4"]{left:57.143%}.gs-7>.grid-stack-item[gs-w="5"]{width:71.429%}.gs-7>.grid-stack-item[gs-x="5"]{left:71.429%}.gs-7>.grid-stack-item[gs-w="6"]{width:85.714%}.gs-7>.grid-stack-item[gs-x="6"]{left:85.714%}.gs-7>.grid-stack-item[gs-w="7"]{width:100%}.gs-8>.grid-stack-item{width:12.5%}.gs-8>.grid-stack-item[gs-x="1"]{left:12.5%}.gs-8>.grid-stack-item[gs-w="2"]{width:25%}.gs-8>.grid-stack-item[gs-x="2"]{left:25%}.gs-8>.grid-stack-item[gs-w="3"]{width:37.5%}.gs-8>.grid-stack-item[gs-x="3"]{left:37.5%}.gs-8>.grid-stack-item[gs-w="4"]{width:50%}.gs-8>.grid-stack-item[gs-x="4"]{left:50%}.gs-8>.grid-stack-item[gs-w="5"]{width:62.5%}.gs-8>.grid-stack-item[gs-x="5"]{left:62.5%}.gs-8>.grid-stack-item[gs-w="6"]{width:75%}.gs-8>.grid-stack-item[gs-x="6"]{left:75%}.gs-8>.grid-stack-item[gs-w="7"]{width:87.5%}.gs-8>.grid-stack-item[gs-x="7"]{left:87.5%}.gs-8>.grid-stack-item[gs-w="8"]{width:100%}.gs-9>.grid-stack-item{width:11.111%}.gs-9>.grid-stack-item[gs-x="1"]{left:11.111%}.gs-9>.grid-stack-item[gs-w="2"]{width:22.222%}.gs-9>.grid-stack-item[gs-x="2"]{left:22.222%}.gs-9>.grid-stack-item[gs-w="3"]{width:33.333%}.gs-9>.grid-stack-item[gs-x="3"]{left:33.333%}.gs-9>.grid-stack-item[gs-w="4"]{width:44.444%}.gs-9>.grid-stack-item[gs-x="4"]{left:44.444%}.gs-9>.grid-stack-item[gs-w="5"]{width:55.556%}.gs-9>.grid-stack-item[gs-x="5"]{left:55.556%}.gs-9>.grid-stack-item[gs-w="6"]{width:66.667%}.gs-9>.grid-stack-item[gs-x="6"]{left:66.667%}.gs-9>.grid-stack-item[gs-w="7"]{width:77.778%}.gs-9>.grid-stack-item[gs-x="7"]{left:77.778%}.gs-9>.grid-stack-item[gs-w="8"]{width:88.889%}.gs-9>.grid-stack-item[gs-x="8"]{left:88.889%}.gs-9>.grid-stack-item[gs-w="9"]{width:100%}.gs-10>.grid-stack-item{width:10%}.gs-10>.grid-stack-item[gs-x="1"]{left:10%}.gs-10>.grid-stack-item[gs-w="2"]{width:20%}.gs-10>.grid-stack-item[gs-x="2"]{left:20%}.gs-10>.grid-stack-item[gs-w="3"]{width:30%}.gs-10>.grid-stack-item[gs-x="3"]{left:30%}.gs-10>.grid-stack-item[gs-w="4"]{width:40%}.gs-10>.grid-stack-item[gs-x="4"]{left:40%}.gs-10>.grid-stack-item[gs-w="5"]{width:50%}.gs-10>.grid-stack-item[gs-x="5"]{left:50%}.gs-10>.grid-stack-item[gs-w="6"]{width:60%}.gs-10>.grid-stack-item[gs-x="6"]{left:60%}.gs-10>.grid-stack-item[gs-w="7"]{width:70%}.gs-10>.grid-stack-item[gs-x="7"]{left:70%}.gs-10>.grid-stack-item[gs-w="8"]{width:80%}.gs-10>.grid-stack-item[gs-x="8"]{left:80%}.gs-10>.grid-stack-item[gs-w="9"]{width:90%}.gs-10>.grid-stack-item[gs-x="9"]{left:90%}.gs-10>.grid-stack-item[gs-w="10"]{width:100%}.gs-11>.grid-stack-item{width:9.091%}.gs-11>.grid-stack-item[gs-x="1"]{left:9.091%}.gs-11>.grid-stack-item[gs-w="2"]{width:18.182%}.gs-11>.grid-stack-item[gs-x="2"]{left:18.182%}.gs-11>.grid-stack-item[gs-w="3"]{width:27.273%}.gs-11>.grid-stack-item[gs-x="3"]{left:27.273%}.gs-11>.grid-stack-item[gs-w="4"]{width:36.364%}.gs-11>.grid-stack-item[gs-x="4"]{left:36.364%}.gs-11>.grid-stack-item[gs-w="5"]{width:45.455%}.gs-11>.grid-stack-item[gs-x="5"]{left:45.455%}.gs-11>.grid-stack-item[gs-w="6"]{width:54.545%}.gs-11>.grid-stack-item[gs-x="6"]{left:54.545%}.gs-11>.grid-stack-item[gs-w="7"]{width:63.636%}.gs-11>.grid-stack-item[gs-x="7"]{left:63.636%}.gs-11>.grid-stack-item[gs-w="8"]{width:72.727%}.gs-11>.grid-stack-item[gs-x="8"]{left:72.727%}.gs-11>.grid-stack-item[gs-w="9"]{width:81.818%}.gs-11>.grid-stack-item[gs-x="9"]{left:81.818%}.gs-11>.grid-stack-item[gs-w="10"]{width:90.909%}.gs-11>.grid-stack-item[gs-x="10"]{left:90.909%}.gs-11>.grid-stack-item[gs-w="11"]{width:100%}[data-v-2c11d103] .tile-header{cursor:move}.kong-ui-public-dashboard-renderer .tile-container[data-v-921334ea]{background:transparent;background:var(--kui-color-background-transparent, transparent);border:1px solid #e0e4ea;border:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);height:100%;padding:0 20px 20px;padding:0 var(--kui-space-70, 20px) var(--kui-space-70, 20px) var(--kui-space-70, 20px)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardTile.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DashboardTile.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardTile.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DashboardTile.vue"],"names":[],"mappings":"AAwUA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAA;AAChE,OAAO,EAAsC,KAAK,cAAc,EAAe,MAAM,qCAAqC,CAAA;AAE1H,OAAO,gDAAgD,CAAA;AACvD,OAAO,0DAA0D,CAAA;;gBAoBnD,cAAc;aACjB,gCAAgC;aAChC,MAAM;gBACH,OAAO;oBACH,MAAM;YACd,MAAM,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBALX,cAAc;aACjB,gCAAgC;aAChC,MAAM;gBACH,OAAO;oBACH,MAAM;YACd,MAAM,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAHd,MAAM;;AA0YjB,wBAUG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableGridLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/DraggableGridLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DraggableGridLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/DraggableGridLayout.vue"],"names":[],"mappings":"AA0GA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,kCAAkC,CAAA;AACzC,OAAO,wCAAwC,CAAA;yBAG9B,CAAC,eACJ,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA8IxD,mBAAmB,CAAC;;;eA1IrB,QAAQ,CAAC,CAAC,CAAC,EAAE;kBACV,QAAQ;qBACL,MAAM;KAwIkE,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;YA7Ba,GAAG;;cAvGvB,cAAc,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAG,IAAI;;;;YAyIL,OAAO,CAAC,OAAO,WAAW,CAAC;;AAxJvE,wBAwJ4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/dashboard-renderer",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/dashboard-renderer.umd.js",
|
|
6
6
|
"module": "./dist/dashboard-renderer.es.js",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"vue": "^3.5.12",
|
|
29
29
|
"@kong-ui-public/analytics-chart": "^6.1.3",
|
|
30
30
|
"@kong-ui-public/analytics-config-store": "^0.8.35",
|
|
31
|
+
"@kong-ui-public/analytics-metric-provider": "^8.6.19",
|
|
31
32
|
"@kong-ui-public/analytics-utilities": "^6.2.0",
|
|
32
|
-
"@kong-ui-public/i18n": "^2.2.10",
|
|
33
33
|
"@kong-ui-public/sandbox-layout": "^2.1.60",
|
|
34
|
-
"@kong-ui-public/
|
|
34
|
+
"@kong-ui-public/i18n": "^2.2.10"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"swrv": "^1.0.4",
|
|
56
56
|
"vue": ">= 3.3.13 < 4",
|
|
57
57
|
"@kong-ui-public/analytics-config-store": "^0.8.35",
|
|
58
|
-
"@kong-ui-public/analytics-metric-provider": "^8.6.19",
|
|
59
|
-
"@kong-ui-public/i18n": "^2.2.10",
|
|
60
58
|
"@kong-ui-public/analytics-chart": "^6.1.3",
|
|
61
|
-
"@kong-ui-public/analytics-utilities": "^6.2.0"
|
|
59
|
+
"@kong-ui-public/analytics-utilities": "^6.2.0",
|
|
60
|
+
"@kong-ui-public/i18n": "^2.2.10",
|
|
61
|
+
"@kong-ui-public/analytics-metric-provider": "^8.6.19"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"ajv": "^8.17.1",
|