react-semaphor 0.0.609 → 0.0.611
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.
- package/dist/chunks/{dashboard-plus-B_Tpk8am.js → dashboard-plus-COAXbMNB.js} +1 -1
- package/dist/chunks/{dashboard-plus-CyvgQOF5.js → dashboard-plus-D4ui9-zt.js} +1 -1
- package/dist/chunks/{index-CXQ2-wcp.js → index-CUoUHwg-.js} +3 -11
- package/dist/chunks/{index-DHfkBUcl.js → index-DwwZJ4zq.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),s=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),s=require("./index-DwwZJ4zq.js"),A=require("react");require("react-dom");function sa(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const Te=sa(A);/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as ee } from "react/jsx-runtime";
|
|
2
|
-
import { L as ne, M as Fr, u as ae, N as ua, O as ma, P as _, Q as ha, R as Ke, T as ms, I as wt, V as at, W as yt, X as zr, Y as Be, Z as vt, _ as Nt, $ as bt, a0 as Ot, a1 as j, a2 as De, a3 as Ht, a4 as ve, a5 as Lr, a6 as xa, a7 as Di, a8 as rr, a9 as hs, aa as W, ab as ps, ac as Ti, ad as Pr, ae as _r, af as ya, ag as Me, j as lr, ah as me, ai as he, aj as pe, ak as fe, al as va, am as Na, an as X, ao as dt, ap as Mi, aq as ut, ar as mt, as as ir, at as St, au as lt, av as ze, aw as aa, ax as je, ay as Ue, az as Ye, aA as Qe, aB as Nn, aC as ue, aD as He, aE as Ii, aF as Wa, aG as Ei, aH as Ja, aI as La, aJ as Ai, aK as Oi, aL as Vr, aM as nt, aN as fs, aO as Ri, aP as kn, aQ as Gt, aR as jr, aS as Br, aT as Rt, aU as Ct, aV as Ka, aW as ka, aX as Oe, aY as Te, aZ as Da, a_ as kt, a$ as Ta, b0 as Fi, b1 as na, b2 as et, b3 as Ha, b4 as st, b5 as Ur, b6 as Qn, b7 as Dt, b8 as pa, b9 as Qa, ba as Xa, bb as zi, bc as fa, bd as gs, be as xs, bf as ys, bg as vs, bh as Xe, bi as Li, bj as Ma, bk as Za, bl as Yr, bm as Ns, bn as Dn, bo as bs, bp as Pi, bq as $r, br as Cs, bs as _i, bt as Vi, bu as Pt, bv as _t, bw as Ee, bx as Wt, by as en, bz as qr, K as ie, bA as ji, bB as xt, J as I, bC as Bi, bD as Gr, bE as Tn, bF as Wr, bG as Jr, bH as Kr, bI as Hr, bJ as Qr, bK as Xr, bL as Zr, bM as el, bN as Ui, bO as Yi, bP as Bt, bQ as $i, bR as ws, bS as qi, bT as Gi, bU as Wi, bV as Mn, bW as Ji, bX as Ki, i as Hi, bY as tl, bZ as Pa, b_ as Tt, b$ as tn, c0 as an, c1 as nn, c2 as sn, c3 as ra, c4 as Ia, c5 as Ft, c6 as In, A as Mt, c7 as al, r as nl, q as sl, l as gt, c8 as _e, c9 as Qi, ca as Qt, cb as Jt, cc as rl, cd as Xi, k as ll, ce as _a, cf as Ut, cg as Zi, n as Kt, m as It, o as Et, ch as Xn, ci as Ss, cj as ks, ck as En, cl as Xt, x as or, cm as Ve, cn as An, co as xn, cp as Va, cq as Zn, cr as il, cs as ol, ct as Ds, cu as eo, cv as to, cw as cl, cx as ao, cy as On, cz as no, cA as ba, cB as so, cC as ro, cD as es, cE as Yt, cF as Ge, cG as $t, cH as lo, cI as io, cJ as oo, cK as Ts, cL as co, cM as Ms, cN as Is, cO as uo, cP as dl, cQ as ul, cR as mo, cS as ho, cT as ja, cU as po, cV as Es, cW as fo, cX as go, cY as cr, cZ as xo, E as rn, b as As, c_ as Os, c$ as yo, d0 as vo, d1 as No, d2 as bo, d3 as Co, d4 as ml, d5 as Rs, d6 as hl, d7 as pl, d8 as fl, d9 as gl, da as xl, db as Fs, dc as zs, dd as yl, de as vl, df as Nl, dg as Rn, dh as Fn, di as wo, dj as So, dk as ko, dl as Do, dm as To, dn as Mo, dp as Io, dq as Eo, dr as Ze, ds as tt, dt as Ne, du as be, dv as Ce, dw as Ao, dx as Oo, dy as Ro, dz as Fo, dA as zo, y as Lo, dB as dr, dC as bl, dD as Po, dE as _o, dF as mn, dG as ur, dH as Vo, dI as mr, dJ as hr, dK as jo, dL as Bo, dM as Uo, dN as Yo, dO as Ls, dP as Ps, dQ as _s, dR as Ea, dS as Vs, dT as Zt, dU as $o, dV as zn, dW as Cl, dX as Vn, dY as qo, dZ as Go, d_ as pr, d$ as Wo, e0 as Jo, e1 as Ko, e2 as Ho, e3 as Qo, w as fr, e4 as gr, e5 as Xo, e6 as Zo, e7 as ec, e8 as tc, e9 as ac, ea as nc, eb as sc, ec as rc, ed as lc, ee as ic, ef as oc, eg as cc, eh as dc, ei as uc, ej as mc, ek as hc, el as pc, em as fc, en as gc, eo as js, ep as jn, eq as xc, er as yc, es as ts, et as vc, eu as yn, ev as vn, ew as Aa, ex as Nc, ey as xr, ez as bc, eA as as, eB as wl, eC as Bs, eD as Sl, eE as Bn, eF as Us, eG as Cc, eH as wc, eI as Sc, eJ as Ba, eK as kc, eL as ns, eM as Dc, eN as Tc, eO as Mc, eP as ss, eQ as rs, eR as bn, eS as Ic, eT as Ca, eU as Ua, eV as Ec, eW as Ac, eX as Oc, eY as Rc, eZ as Fc, e_ as zc, e$ as Lc, F as kl, f0 as Pc, f1 as _c, p as Vc, f2 as jc, B as Bc, f3 as Uc, f4 as Yc, S as $c, f5 as qc, U as Gc, f6 as Wc, C as Jc } from "./index-
|
|
2
|
+
import { L as ne, M as Fr, u as ae, N as ua, O as ma, P as _, Q as ha, R as Ke, T as ms, I as wt, V as at, W as yt, X as zr, Y as Be, Z as vt, _ as Nt, $ as bt, a0 as Ot, a1 as j, a2 as De, a3 as Ht, a4 as ve, a5 as Lr, a6 as xa, a7 as Di, a8 as rr, a9 as hs, aa as W, ab as ps, ac as Ti, ad as Pr, ae as _r, af as ya, ag as Me, j as lr, ah as me, ai as he, aj as pe, ak as fe, al as va, am as Na, an as X, ao as dt, ap as Mi, aq as ut, ar as mt, as as ir, at as St, au as lt, av as ze, aw as aa, ax as je, ay as Ue, az as Ye, aA as Qe, aB as Nn, aC as ue, aD as He, aE as Ii, aF as Wa, aG as Ei, aH as Ja, aI as La, aJ as Ai, aK as Oi, aL as Vr, aM as nt, aN as fs, aO as Ri, aP as kn, aQ as Gt, aR as jr, aS as Br, aT as Rt, aU as Ct, aV as Ka, aW as ka, aX as Oe, aY as Te, aZ as Da, a_ as kt, a$ as Ta, b0 as Fi, b1 as na, b2 as et, b3 as Ha, b4 as st, b5 as Ur, b6 as Qn, b7 as Dt, b8 as pa, b9 as Qa, ba as Xa, bb as zi, bc as fa, bd as gs, be as xs, bf as ys, bg as vs, bh as Xe, bi as Li, bj as Ma, bk as Za, bl as Yr, bm as Ns, bn as Dn, bo as bs, bp as Pi, bq as $r, br as Cs, bs as _i, bt as Vi, bu as Pt, bv as _t, bw as Ee, bx as Wt, by as en, bz as qr, K as ie, bA as ji, bB as xt, J as I, bC as Bi, bD as Gr, bE as Tn, bF as Wr, bG as Jr, bH as Kr, bI as Hr, bJ as Qr, bK as Xr, bL as Zr, bM as el, bN as Ui, bO as Yi, bP as Bt, bQ as $i, bR as ws, bS as qi, bT as Gi, bU as Wi, bV as Mn, bW as Ji, bX as Ki, i as Hi, bY as tl, bZ as Pa, b_ as Tt, b$ as tn, c0 as an, c1 as nn, c2 as sn, c3 as ra, c4 as Ia, c5 as Ft, c6 as In, A as Mt, c7 as al, r as nl, q as sl, l as gt, c8 as _e, c9 as Qi, ca as Qt, cb as Jt, cc as rl, cd as Xi, k as ll, ce as _a, cf as Ut, cg as Zi, n as Kt, m as It, o as Et, ch as Xn, ci as Ss, cj as ks, ck as En, cl as Xt, x as or, cm as Ve, cn as An, co as xn, cp as Va, cq as Zn, cr as il, cs as ol, ct as Ds, cu as eo, cv as to, cw as cl, cx as ao, cy as On, cz as no, cA as ba, cB as so, cC as ro, cD as es, cE as Yt, cF as Ge, cG as $t, cH as lo, cI as io, cJ as oo, cK as Ts, cL as co, cM as Ms, cN as Is, cO as uo, cP as dl, cQ as ul, cR as mo, cS as ho, cT as ja, cU as po, cV as Es, cW as fo, cX as go, cY as cr, cZ as xo, E as rn, b as As, c_ as Os, c$ as yo, d0 as vo, d1 as No, d2 as bo, d3 as Co, d4 as ml, d5 as Rs, d6 as hl, d7 as pl, d8 as fl, d9 as gl, da as xl, db as Fs, dc as zs, dd as yl, de as vl, df as Nl, dg as Rn, dh as Fn, di as wo, dj as So, dk as ko, dl as Do, dm as To, dn as Mo, dp as Io, dq as Eo, dr as Ze, ds as tt, dt as Ne, du as be, dv as Ce, dw as Ao, dx as Oo, dy as Ro, dz as Fo, dA as zo, y as Lo, dB as dr, dC as bl, dD as Po, dE as _o, dF as mn, dG as ur, dH as Vo, dI as mr, dJ as hr, dK as jo, dL as Bo, dM as Uo, dN as Yo, dO as Ls, dP as Ps, dQ as _s, dR as Ea, dS as Vs, dT as Zt, dU as $o, dV as zn, dW as Cl, dX as Vn, dY as qo, dZ as Go, d_ as pr, d$ as Wo, e0 as Jo, e1 as Ko, e2 as Ho, e3 as Qo, w as fr, e4 as gr, e5 as Xo, e6 as Zo, e7 as ec, e8 as tc, e9 as ac, ea as nc, eb as sc, ec as rc, ed as lc, ee as ic, ef as oc, eg as cc, eh as dc, ei as uc, ej as mc, ek as hc, el as pc, em as fc, en as gc, eo as js, ep as jn, eq as xc, er as yc, es as ts, et as vc, eu as yn, ev as vn, ew as Aa, ex as Nc, ey as xr, ez as bc, eA as as, eB as wl, eC as Bs, eD as Sl, eE as Bn, eF as Us, eG as Cc, eH as wc, eI as Sc, eJ as Ba, eK as kc, eL as ns, eM as Dc, eN as Tc, eO as Mc, eP as ss, eQ as rs, eR as bn, eS as Ic, eT as Ca, eU as Ua, eV as Ec, eW as Ac, eX as Oc, eY as Rc, eZ as Fc, e_ as zc, e$ as Lc, F as kl, f0 as Pc, f1 as _c, p as Vc, f2 as jc, B as Bc, f3 as Uc, f4 as Yc, S as $c, f5 as qc, U as Gc, f6 as Wc, C as Jc } from "./index-CUoUHwg-.js";
|
|
3
3
|
import * as sa from "react";
|
|
4
4
|
import ot, { useState as V, useEffect as Ie, useRef as zt, useMemo as We, useCallback as Se, Suspense as Dl, useContext as Kc } from "react";
|
|
5
5
|
import "react-dom";
|
|
@@ -57368,17 +57368,9 @@ function mR({
|
|
|
57368
57368
|
async function yke(e, t) {
|
|
57369
57369
|
if (!e || e.trim() === "")
|
|
57370
57370
|
throw new Error("URL is required to load component");
|
|
57371
|
-
const
|
|
57372
|
-
return
|
|
57373
|
-
|
|
57374
|
-
l.rel = "stylesheet", l.href = o, l.onload = () => a(void 0), l.onerror = () => s(new Error("Failed to load CSS")), document.head.appendChild(l);
|
|
57375
|
-
}), {
|
|
57376
|
-
default: (await import(
|
|
57377
|
-
/* @vite-ignore */
|
|
57378
|
-
/* webpackIgnore: true */
|
|
57379
|
-
// **this important for it to work in nextjs apps**
|
|
57380
|
-
r
|
|
57381
|
-
))[t]
|
|
57371
|
+
const r = `${e.endsWith("/") ? e : `${e}/`}index.js`;
|
|
57372
|
+
return {
|
|
57373
|
+
default: (await new Function("url", "return import(url)")(r))[t]
|
|
57382
57374
|
};
|
|
57383
57375
|
}
|
|
57384
57376
|
async function vke(e) {
|
|
@@ -756,7 +756,7 @@ Valid keys: `+JSON.stringify(Object.keys(I),null," "));var K=ee(Y,G,H,W,Z+"."+G
|
|
|
756
756
|
* You can read more about the APCA Readability Criterion at
|
|
757
757
|
* https://readtech.org/ARC/
|
|
758
758
|
*/const IO=.027,Yke=5e-4,Kke=.1,OO=1.14,Ny=.022,$O=1.414,Zke=(e,t)=>{e=new we(e),t=new we(t),e.alpha()<1&&(e=Bf(t,e,e.alpha(),"rgb"));const n=FO(...e.rgb()),r=FO(...t.rgb()),o=n>=Ny?n:n+Math.pow(Ny-n,$O),i=r>=Ny?r:r+Math.pow(Ny-r,$O),s=Math.pow(i,.56)-Math.pow(o,.57),a=Math.pow(i,.65)-Math.pow(o,.62),l=Math.abs(i-o)<Yke?0:o<i?s*OO:a*OO;return(Math.abs(l)<Kke?0:l>0?l-IO:l+IO)*100};function FO(e,t,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:Bs,pow:Kn,min:Xke,max:Qke,atan2:LO,abs:zO,cos:My,sin:BO,exp:Jke,PI:VO}=Math;function eNe(e,t,n=1,r=1,o=1){var i=function(D){return 360*D/(2*VO)},s=function(D){return 2*VO*D/360};e=new we(e),t=new we(t);const[a,l,c]=Array.from(e.lab()),[u,d,h]=Array.from(t.lab()),p=(a+u)/2,m=Bs(Kn(l,2)+Kn(c,2)),g=Bs(Kn(d,2)+Kn(h,2)),b=(m+g)/2,y=.5*(1-Bs(Kn(b,7)/(Kn(b,7)+Kn(25,7)))),v=l*(1+y),x=d*(1+y),w=Bs(Kn(v,2)+Kn(c,2)),C=Bs(Kn(x,2)+Kn(h,2)),E=(w+C)/2,k=i(LO(c,v)),N=i(LO(h,x)),P=k>=0?k:k+360,M=N>=0?N:N+360,$=zO(P-M)>180?(P+M+360)/2:(P+M)/2,A=1-.17*My(s($-30))+.24*My(s(2*$))+.32*My(s(3*$+6))-.2*My(s(4*$-63));let j=M-P;j=zO(j)<=180?j:M<=P?j+360:j-360,j=2*Bs(w*C)*BO(s(j)/2);const T=u-a,R=C-w,O=1+.015*Kn(p-50,2)/Bs(20+Kn(p-50,2)),z=1+.045*E,B=1+.015*E*A,F=30*Jke(-Kn(($-275)/25,2)),U=-(2*Bs(Kn(E,7)/(Kn(E,7)+Kn(25,7))))*BO(2*s(F)),V=Bs(Kn(T/(n*O),2)+Kn(R/(r*z),2)+Kn(j/(o*B),2)+U*(R/(r*z))*(j/(o*B)));return Qke(0,Xke(100,V))}function tNe(e,t,n="lab"){e=new we(e),t=new we(t);const r=e.get(n),o=t.get(n);let i=0;for(let s in r){const a=(r[s]||0)-(o[s]||0);i+=a*a}return Math.sqrt(i)}const nNe=(...e)=>{try{return new we(...e),!0}catch{return!1}},rNe={cool(){return Mv([Mt.hsl(180,1,.9),Mt.hsl(250,.7,.4)])},hot(){return Mv(["#000","#f00","#ff0","#fff"]).mode("rgb")}},S_={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},BH=Object.keys(S_),HO=new Map(BH.map(e=>[e.toLowerCase(),e])),oNe=typeof Proxy=="function"?new Proxy(S_,{get(e,t){const n=t.toLowerCase();if(HO.has(n))return e[HO.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(BH)}}):S_,iNe=(...e)=>{e=gt(e,"cmyk");const[t,n,r,o]=e,i=e.length>4?e[4]:1;return o===1?[0,0,0,i]:[t>=1?0:255*(1-t)*(1-o),n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),i]},{max:WO}=Math,sNe=(...e)=>{let[t,n,r]=gt(e,"rgb");t=t/255,n=n/255,r=r/255;const o=1-WO(t,WO(n,r)),i=o<1?1/(1-o):0,s=(1-t-o)*i,a=(1-n-o)*i,l=(1-r-o)*i;return[s,a,l,o]};we.prototype.cmyk=function(){return sNe(this._rgb)};const aNe=(...e)=>new we(...e,"cmyk");Object.assign(Mt,{cmyk:aNe});dt.format.cmyk=iNe;dt.autodetect.push({p:2,test:(...e)=>{if(e=gt(e,"cmyk"),kt(e)==="array"&&e.length===4)return"cmyk"}});const lNe=(...e)=>{const t=gt(e,"hsla");let n=dh(e)||"lsa";return t[0]=ai(t[0]||0)+"deg",t[1]=ai(t[1]*100)+"%",t[2]=ai(t[2]*100)+"%",n==="hsla"||t.length>3&&t[3]<1?(t[3]="/ "+(t.length>3?t[3]:1),n="hsla"):t.length=3,`${n.substr(0,3)}(${t.join(" ")})`},cNe=(...e)=>{const t=gt(e,"lab");let n=dh(e)||"lab";return t[0]=ai(t[0])+"%",t[1]=ai(t[1]),t[2]=ai(t[2]),n==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},uNe=(...e)=>{const t=gt(e,"lch");let n=dh(e)||"lab";return t[0]=ai(t[0])+"%",t[1]=ai(t[1]),t[2]=isNaN(t[2])?"none":ai(t[2])+"deg",n==="lcha"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(" ")})`},dNe=(...e)=>{const t=gt(e,"lab");return t[0]=ai(t[0]*100)+"%",t[1]=x_(t[1]),t[2]=x_(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},VH=(...e)=>{const[t,n,r,...o]=gt(e,"rgb"),[i,s,a]=AR(t,n,r),[l,c,u]=IH(i,s,a);return[l,c,u,...o.length>0&&o[0]<1?[o[0]]:[]]},fNe=(...e)=>{const t=gt(e,"lch");return t[0]=ai(t[0]*100)+"%",t[1]=x_(t[1]),t[2]=isNaN(t[2])?"none":ai(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:fC}=Math,hNe=(...e)=>{const t=gt(e,"rgba");let n=dh(e)||"rgb";if(n.substr(0,3)==="hsl")return lNe($H(t),n);if(n.substr(0,3)==="lab"){const r=$m();aa("d50");const o=cNe(RR(t),n);return aa(r),o}if(n.substr(0,3)==="lch"){const r=$m();aa("d50");const o=uNe(DR(t),n);return aa(r),o}return n.substr(0,5)==="oklab"?dNe(AR(t)):n.substr(0,5)==="oklch"?fNe(VH(t)):(t[0]=fC(t[0]),t[1]=fC(t[1]),t[2]=fC(t[2]),(n==="rgba"||t.length>3&&t[3]<1)&&(t[3]="/ "+(t.length>3?t[3]:1),n="rgba"),`${n.substr(0,3)}(${t.slice(0,n==="rgb"?3:4).join(" ")})`)},HH=(...e)=>{e=gt(e,"lch");const[t,n,r,...o]=e,[i,s,a]=TH(t,n,r),[l,c,u]=jR(i,s,a);return[l,c,u,...o.length>0&&o[0]<1?[o[0]]:[]]},ga=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,Ai=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Rv=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,fi=/\s*/.source,hh=/\s+/.source,TR=/\s*,\s*/.source,$w=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,ph=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,WH=new RegExp("^rgba?\\("+fi+[ga,ga,ga].join(hh)+ph+"\\)$"),UH=new RegExp("^rgb\\("+fi+[ga,ga,ga].join(TR)+fi+"\\)$"),qH=new RegExp("^rgba\\("+fi+[ga,ga,ga,Ai].join(TR)+fi+"\\)$"),GH=new RegExp("^hsla?\\("+fi+[$w,Rv,Rv].join(hh)+ph+"\\)$"),YH=new RegExp("^hsl?\\("+fi+[$w,Rv,Rv].join(TR)+fi+"\\)$"),KH=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ZH=new RegExp("^lab\\("+fi+[Ai,Ai,Ai].join(hh)+ph+"\\)$"),XH=new RegExp("^lch\\("+fi+[Ai,Ai,$w].join(hh)+ph+"\\)$"),QH=new RegExp("^oklab\\("+fi+[Ai,Ai,Ai].join(hh)+ph+"\\)$"),JH=new RegExp("^oklch\\("+fi+[Ai,Ai,$w].join(hh)+ph+"\\)$"),{round:eW}=Math,cd=e=>e.map((t,n)=>n<=2?Qc(eW(t),0,255):t),Zn=(e,t=0,n=100,r=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,r?e=t+(e+1)*.5*(n-t):e=t+e*(n-t)),+e),Hr=(e,t)=>e==="none"?t:e,IR=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(dt.format.named)try{return dt.format.named(e)}catch{}if((t=e.match(WH))||(t=e.match(UH))){let n=t.slice(1,4);for(let o=0;o<3;o++)n[o]=+Zn(Hr(n[o],0),0,255);n=cd(n);const r=t[4]!==void 0?+Zn(t[4],0,1):1;return n[3]=r,n}if(t=e.match(qH)){const n=t.slice(1,5);for(let r=0;r<4;r++)n[r]=+Zn(n[r],0,255);return n}if((t=e.match(GH))||(t=e.match(YH))){const n=t.slice(1,4);n[0]=+Hr(n[0].replace("deg",""),0),n[1]=+Zn(Hr(n[1],0),0,100)*.01,n[2]=+Zn(Hr(n[2],0),0,100)*.01;const r=cd(w_(n)),o=t[4]!==void 0?+Zn(t[4],0,1):1;return r[3]=o,r}if(t=e.match(KH)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=w_(n);for(let o=0;o<3;o++)r[o]=eW(r[o]);return r[3]=+t[4],r}if(t=e.match(ZH)){const n=t.slice(1,4);n[0]=Zn(Hr(n[0],0),0,100),n[1]=Zn(Hr(n[1],0),-125,125,!0),n[2]=Zn(Hr(n[2],0),-125,125,!0);const r=$m();aa("d50");const o=cd(MR(n));aa(r);const i=t[4]!==void 0?+Zn(t[4],0,1):1;return o[3]=i,o}if(t=e.match(XH)){const n=t.slice(1,4);n[0]=Zn(n[0],0,100),n[1]=Zn(Hr(n[1],0),0,150,!1),n[2]=+Hr(n[2].replace("deg",""),0);const r=$m();aa("d50");const o=cd(PR(n));aa(r);const i=t[4]!==void 0?+Zn(t[4],0,1):1;return o[3]=i,o}if(t=e.match(QH)){const n=t.slice(1,4);n[0]=Zn(Hr(n[0],0),0,1),n[1]=Zn(Hr(n[1],0),-.4,.4,!0),n[2]=Zn(Hr(n[2],0),-.4,.4,!0);const r=cd(jR(n)),o=t[4]!==void 0?+Zn(t[4],0,1):1;return r[3]=o,r}if(t=e.match(JH)){const n=t.slice(1,4);n[0]=Zn(Hr(n[0],0),0,1),n[1]=Zn(Hr(n[1],0),0,.4,!1),n[2]=+Hr(n[2].replace("deg",""),0);const r=cd(HH(n)),o=t[4]!==void 0?+Zn(t[4],0,1):1;return r[3]=o,r}};IR.test=e=>WH.test(e)||GH.test(e)||ZH.test(e)||XH.test(e)||QH.test(e)||JH.test(e)||UH.test(e)||qH.test(e)||YH.test(e)||KH.test(e)||e==="transparent";we.prototype.css=function(e){return hNe(this._rgb,e)};const pNe=(...e)=>new we(...e,"css");Mt.css=pNe;dt.format.css=IR;dt.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&kt(e)==="string"&&IR.test(e))return"css"}});dt.format.gl=(...e)=>{const t=gt(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const mNe=(...e)=>new we(...e,"gl");Mt.gl=mNe;we.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};we.prototype.hex=function(e){return DH(this._rgb,e)};const gNe=(...e)=>new we(...e,"hex");Mt.hex=gNe;dt.format.hex=PH;dt.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&kt(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:Ry}=Math,tW=e=>{const t=e/100;let n,r,o;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*Ry(r),o=t<20?0:-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*Ry(o)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*Ry(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*Ry(r),o=255),[n,r,o,1]},{round:bNe}=Math,yNe=(...e)=>{const t=gt(e,"rgb"),n=t[0],r=t[2];let o=1e3,i=4e4;const s=.4;let a;for(;i-o>s;){a=(i+o)*.5;const l=tW(a);l[2]/l[0]>=r/n?i=a:o=a}return bNe(a)};we.prototype.temp=we.prototype.kelvin=we.prototype.temperature=function(){return yNe(this._rgb)};const hC=(...e)=>new we(...e,"temp");Object.assign(Mt,{temp:hC,kelvin:hC,temperature:hC});dt.format.temp=dt.format.kelvin=dt.format.temperature=tW;we.prototype.oklch=function(){return VH(this._rgb)};const vNe=(...e)=>new we(...e,"oklch");Object.assign(Mt,{oklch:vNe});dt.format.oklch=HH;dt.autodetect.push({p:2,test:(...e)=>{if(e=gt(e,"oklch"),kt(e)==="array"&&e.length===3)return"oklch"}});Object.assign(Mt,{analyze:LH,average:xke,bezier:kke,blend:Bi,brewer:oNe,Color:we,colors:zf,contrast:Gke,contrastAPCA:Zke,cubehelix:Lke,deltaE:eNe,distance:tNe,input:dt,interpolate:Bf,limits:zH,mix:Bf,random:Hke,scale:Mv,scales:rNe,valid:nNe});function UO(e,t,n,r=1e-5){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function pC(e){return{left:e.top,right:e.bottom,top:e.left,bottom:e.right,horizontal:!e.horizontal}}class mh extends fs{constructor(){super(...arguments),this.align="center",this.next=void 0,this.previous=void 0}getBounds(t=!1){const{x:n,y:r,base:o,width:i,height:s,horizontal:a}=this.getProps(["x","y","base","width","height","horizontal"],t);if(a){const l=Math.abs(n-o),c=o-(this.align!=="left"?l:0),u=o+(this.align!=="right"?l:0),d=s/2,h=r-d,p=r+d;return{left:c,top:h,right:u,bottom:p,horizontal:a}}else{const l=Math.abs(r-o),c=i/2,u=n-c,d=n+c,h=o-(this.align!=="right"?l:0),p=o+(this.align!=="left"?l:0);return{left:u,top:h,right:d,bottom:p,horizontal:a}}}inRange(t,n,r){const o=this.getBounds(r),i=t==null||UO(t,o.left,o.right),s=n==null||UO(n,o.top,o.bottom);return i&&s}inXRange(t,n){return this.inRange(t,null,n)}inYRange(t,n){return this.inRange(null,t,n)}getCenterPoint(t){const{x:n,y:r,base:o,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{center:{x:i?o:n,y:i?r:o},left:{x:i?(o+n)/2:n,y:i?r:(o+r)/2},right:{x:i?o-(n-o)/2:n,y:i?r:o-(r+o)/2}}[this.align]}tooltipPosition(t){return this.getCenterPoint(t)}getRange(t){const{width:n,height:r}=this.getProps(["width","height"]);return t==="x"?n:r}computeWayPoints(t=!1){let n=this.options.shrinkAnchor,r=Math.max(Math.min(this.options.shrinkFraction,1),0);r===0&&(n="none",r=1);let o=this.getBounds(t);const i=o.horizontal;let s=this.next&&(n==="top"||n==="middle")?this.next.getBounds(t):o,a=this.previous&&(n==="bottom"||n==="middle")?this.previous.getBounds(t):o;i||(o=pC(o),s=pC(s),a=pC(a));const l=Math.floor((o.bottom-o.top)*(1-r)),c=Math.floor((o.bottom-o.top-l)/2),u=[],d=[];if(n==="none"||n==="top")u.push([o.left,o.top],[o.right,o.top]);else{let h=1;if(n==="middle"){const p=Math.floor((a.bottom-a.top)*r*.5);h=c/(p+c)}u.push([o.left+(a.left-o.left)*h,o.top],[o.right+(a.right-o.right)*h,o.top])}if(n==="middle"?(u.push([o.right,o.top+c]),u.push([o.right,o.bottom-c]),d.push([o.left,o.top+c]),d.push([o.left,o.bottom-c])):n==="top"&&r<1?(u.push([o.right,o.top+l]),d.push([o.left,o.top+l])):n==="bottom"&&r<1&&(u.push([o.right,o.bottom-l]),d.push([o.left,o.bottom-l])),n==="none"||n==="bottom")u.push([o.right,o.bottom],[o.left,o.bottom]);else{let h=1;if(n==="middle"){const p=Math.floor((s.bottom-s.top)*r*.5);h=c/(p+c)}u.push([o.right+(s.right-o.right)*h,o.bottom],[o.left+(s.left-o.left)*h,o.bottom])}return u.push(...d.reverse()),i?u:u.map(([h,p])=>[p,h])}draw(t){const{options:n}=this;t.save(),t.beginPath();const r=this.computeWayPoints();t.moveTo(r[0][0],r[0][1]);for(const o of r.slice(1))t.lineTo(o[0],o[1]);n.backgroundColor&&(t.fillStyle=n.backgroundColor,t.fill()),n.borderColor&&(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.stroke()),t.restore()}}mh.id="trapezoid";mh.defaults={...fs.defaults,shrinkAnchor:"top",shrinkFraction:1};mh.defaultRoutes=fs.defaultRoutes;function xNe(e,t="#000000",n="#ffffff"){return Mt(e).luminance()>.5?t:n}function wNe(e,t){return Mt.scale("Blues")(e/(t-1)).hex()}function SNe(e,t,n,r=[],o=[]){Jn.addControllers(n),Array.isArray(r)?Jn.addElements(...r):Jn.addElements(r),Array.isArray(o)?Jn.addScales(...o):Jn.addScales(o);const i=t;return i.type=e,i}class gh extends Yc{getMinMax(t,n){const{max:r}=super.getMinMax(t,n);return{center:{min:-r,max:r},left:{min:0,max:r},right:{min:-r,max:0}}[this.options.align]}update(t){super.update(t);const r=this._cachedMeta.data||[];for(let o=0;o<r.length;o++)r[o].align=this.options.align,r[o].next=r[o+1],r[o].previous=r[o-1]}}gh.id="funnel";gh.defaults=rr({},[Yc.defaults,{dataElementType:mh.id,barPercentage:1,align:"center",categoryPercentage:.98}]);gh.overrides=rr({},[Yc.overrides,{plugins:{legend:{display:!1},colors:{enabled:!1},datalabels:{anchor:"start",textAlign:"center",font:{size:20},color:e=>{const t=e.chart.getDatasetMeta(e.datasetIndex).data[e.dataIndex].options.backgroundColor;return xNe(t,dn.defaults.color,"#ffffff")},formatter:(e,t)=>{var n,r;return`${(r=(n=t.chart.data.labels)===null||n===void 0?void 0:n[t.dataIndex])!==null&&r!==void 0?r:""}
|
|
759
|
-
${(e*100).toLocaleString()}%`}}},scales:{_index_:{display:!1,padding:10,grid:{display:!1}},_value_:{display:!1,beginAtZero:!1,grace:0,grid:{display:!1}}},elements:{trapezoid:{backgroundColor(e){const t=e.chart.data.datasets[e.datasetIndex].data.length;return wNe(e.dataIndex,t)}}}}]);class CNe extends dn{constructor(t,n){super(t,SNe("funnel",n,gh,mh,[Mm,xu]))}}CNe.id=gh.id;dn.register(g_e);dn.register(Kc);dn.register(ch);dn.register(uh);dn.register(Na);dn.register(Hu);dn.register(Dl);dn.register(jl);dn.register(Mm);dn.register(fV);dn.register(gh);dn.register(mh);function Fw({cfg:e,onDatapointClick:t,onChartClick:n}){var p;const[r,o]=_.useState(""),i=ne(m=>m.selectedLensId),s=_.useRef(null),[a,l]=_.useState(),c=ne(m=>m.themeStyle);_.useEffect(()=>{if(s.current){const m=window.getComputedStyle(s.current);o(m.fontFamily)}},[]),_.useEffect(()=>{var y,v,x,w;if(!r)return;(v=(y=c==null?void 0:c.chart)==null?void 0:y.font)!=null&&v.family&&(dn.defaults.font={...dn.defaults.font,...(x=c==null?void 0:c.chart)==null?void 0:x.font,family:r});const m=am(e);m.options={...e.options,responsive:!0,maintainAspectRatio:!1};const g=(w=s==null?void 0:s.current)==null?void 0:w.getContext("2d");if(!g)return;let b;try{const C=OEe(m,g);b=new dn(g,C),l(b)}catch(C){console.log("error creating chart",C)}return()=>{b&&b.destroy()}},[(p=c==null?void 0:c.chart)==null?void 0:p.font,i,r,e]);function u(m){console.log("handleRightClick",m),a&&(n==null||n(m,a,s))}function d(m){var b,y;if(!a)return;n==null||n(m,a,s);const g=a==null?void 0:a.getElementsAtEventForMode(m.nativeEvent,"nearest",{intersect:!0},!0);if(g&&g.length>0){const v=g[0].datasetIndex,x=g[0].index,w=(y=(b=g[0].element)==null?void 0:b.$context)==null?void 0:y.raw;t==null||t(a,v,x,w)}}const h=e.type==="doughnut"||e.type==="pie";return f.jsx("div",{onClick:d,onContextMenu:u,className:J("relative h-[99%] min-w-0 grow",{"mx-14":h}),children:f.jsx("canvas",{ref:s})})}async function ENe(e,t){if(!e||e.trim()==="")throw new Error("URL is required to load component");const n=e.endsWith("/")?e:`${e}/`,r=`${n}index.js`,o=`${n}style.css`;return document.querySelector(`link[href="${o}"]`)||await new Promise((s,a)=>{const l=document.createElement("link");l.rel="stylesheet",l.href=o,l.onload=()=>s(void 0),l.onerror=()=>a(new Error("Failed to load CSS")),document.head.appendChild(l)}),{default:(await import(r))[t]}}async function _Ne(e){try{const t=await import(e),n=Object.keys(t),r=[];return n.forEach(o=>{typeof t[o]=="function"&&(o==null?void 0:o[0])===(o==null?void 0:o[0].toUpperCase())&&r.push({name:o,component:o})}),r}catch(t){return console.error("Error loading the library:",t),[]}}async function nW(e){try{const t=e.endsWith("/")?e:`${e}/`,n=await fetch(`${t}manifest.json`);if(!n.ok)throw new Error(`Failed to fetch manifest: ${n.statusText}`);return await n.json()}catch(t){throw console.error("Error loading manifest:",t),t}}const rW=e=>{const[t,n]=_.useState([]),[r,o]=_.useState(!1),[i,s]=_.useState(null);_.useEffect(()=>{window.React=_,window.ReactDOM=Pn,window.React.jsx=VD.jsx,window.React.jsxs=VD.jsxs,o(!0)},[]),_.useEffect(()=>{e&&e.trim()!==""&&r?nW(e).then(c=>{n(c.visuals),s(c)}).catch(()=>{_Ne(e).then(c=>{n(c)}).catch(c=>{console.error("Error loading manifest:",c)})}):(n([]),s(null))},[e,r]);const a=_.useMemo(()=>!e||e.trim()===""||t.length===0?[]:(t==null?void 0:t.map(c=>{const{name:u,component:d,dataInputs:h,chartType:p}=c;return{name:u,chartType:p,componentName:d,Component:_.lazy(()=>ENe(e,d)),type:h&&h.length>1?"multiple":"single"}}))||[],[t,e]);return{getCard:_.useCallback(c=>{const u=a==null?void 0:a.find(d=>d.name===c);return u?u.Component:null},[a]),components:a,manifest:i}};function oW({onLoadingStatus:e,onDataChange:t,card:n}){const{isFetching:r,isLoading:o,data:i,queryKey:s}=xs(n),a=JSON.stringify(s);return _.useEffect(()=>{e==null||e(o)},[r,o,e]),_.useEffect(()=>{t(n.id,(i==null?void 0:i.records)||[])},[i==null?void 0:i.records,n.id,a,t]),f.jsx(f.Fragment,{})}function iW({card:e,frame:t}){var v,x,w,C,E,k,N,P,M,$;const[n,r]=_.useState([]),{authToken:o}=Lt(),i=kF(o==null?void 0:o.accessToken),s=ne(A=>A.themeStyle),a={colors:((x=(v=s==null?void 0:s.chart)==null?void 0:v.dataset)==null?void 0:x.backgroundColor)||[]},[l,c]=_.useState(!1),{getCard:u}=rW(((w=e.customCardPreferences)==null?void 0:w.url)||""),d=((C=e.customCardPreferences)==null?void 0:C.visualType)||"single",h=(E=e.customCardPreferences)==null?void 0:E.componentName,{data:p}=xs(e),m=_.useCallback((A,j)=>{r(T=>({...T,[A]:j}))},[]);if(!h)return null;const g=u(h),b=Object.keys(((k=e.customCardPreferences)==null?void 0:k.dataInputCardIds)||{}).map(A=>{var R,O,z;const j=(O=(R=e.customCardPreferences)==null?void 0:R.dataInputCardIds)==null?void 0:O[A].cardId,T=(z=t==null?void 0:t.cards)==null?void 0:z.find(B=>B.id===j);return T||null});function y(A){c(A)}return f.jsx("div",{className:"semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto",children:f.jsxs(_.Suspense,{fallback:f.jsx(f.Fragment,{}),children:[g&&d==="single"&&f.jsx(g,{params:i,theme:a,chartSettings:(N=e.customCardPreferences)==null?void 0:N.settings,settings:(P=e.customCardPreferences)==null?void 0:P.settings,onDataChange:m,data:(p==null?void 0:p.records)||[]}),g&&d==="multiple"&&f.jsxs("div",{children:[Object.keys(((M=e.customCardPreferences)==null?void 0:M.dataInputCardIds)||{}).map(A=>{var R,O,z;const j=(O=(R=e.customCardPreferences)==null?void 0:R.dataInputCardIds)==null?void 0:O[A].cardId,T=(z=t==null?void 0:t.cards)==null?void 0:z.find(B=>B.id===j);if(T)return f.jsx(oW,{onLoadingStatus:y,onDataChange:m,dataInputIndex:A,card:T},T.id+A)}),d==="multiple"&&f.jsx("div",{className:J("flex flex-col gap-2",{"opacity-50":l}),children:f.jsx(g,{params:i,theme:a,onDataChange:m,chartSettings:($=e.customCardPreferences)==null?void 0:$.settings,settings:b.map(A=>{var j;return(j=A==null?void 0:A.customCardPreferences)==null?void 0:j.settings}),data:b.map(A=>A!=null&&A.id?n==null?void 0:n[A.id]:[])})})]})]},e.id)})}function OR({customerFacingMessage:e,error:t,resetErrorBoundary:n}){return f.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center rounded-lg border border-dashed border-muted-foreground/25 bg-muted/30 p-6 text-center",children:[f.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:f.jsx("svg",{className:"h-6 w-6 text-muted-foreground",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),f.jsx("h3",{className:"mb-2 text-sm font-medium text-foreground",children:"Chart Unavailable"}),f.jsx("p",{className:"mb-4 text-xs text-muted-foreground",children:e||"Couldn't display this chart right now. Please try refreshing or check your data configuration."}),f.jsxs("button",{onClick:n,className:"inline-flex items-center justify-center rounded-md bg-primary px-3 py-2 text-xs font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[f.jsx("svg",{className:"mr-1.5 h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Try Again"]}),om]})}function $R({error:e}){return f.jsx("div",{className:"flex flex-col items-center justify-center",role:"alert",style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},children:f.jsxs("div",{style:{backgroundColor:"#fef2f2",border:"1px solid #fecaca",borderRadius:"8px",boxShadow:"0 2px 6px rgba(0, 0, 0, 0.08)",color:"#b91c1c",fontFamily:"sans-serif",padding:"16px",textAlign:"center",flexDirection:"column",whiteSpace:"pre-wrap",position:"relative"},className:"flex flex-col justify-center space-y-1 rounded-md bg-muted p-10",children:[f.jsx("p",{className:"text-sm",children:"Something went wrong:"}),f.jsx("pre",{className:"text-xs",children:e.message})]})})}function kNe({error:e,frame:t}){return f.jsxs("div",{className:"flex h-full flex-col items-center justify-center border",role:"alert",children:[f.jsx(sW,{frame:t}),f.jsx("div",{className:"flex flex-col justify-center space-y-2 rounded-md p-10"}),f.jsxs("div",{className:"flex flex-col justify-center space-y-2 rounded-md p-10",children:[f.jsx("p",{className:"text-lg font-semibold",children:"Oops! Looks like we tripped on a loose wire!"}),f.jsx("p",{className:"text-sm",children:"Something went wrong:"}),f.jsx("pre",{className:"text-xs",children:e.message})]})]})}const NNe=_.createContext(null),mC={didCatch:!1,error:null};class bh extends _.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=mC}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(mC)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&MNe(t.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(mC)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=_.createElement(r,l);else if(o!==void 0)a=o;else throw s}return _.createElement(NNe.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function MNe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function RNe({isOpen:e,onClose:t,frame:n,card:r,data:o}){var k;const[i,s]=_.useState(!1),a=ne(N=>N.isDownloadingPdf),{isError:l,isLoading:c,isFetching:u,cfg:d,data:h,handleDatapointClick:p,pagination:m}=Aw(r),{customCards:g,placeholders:b}=Lt(),y=Tw(r,h),v=()=>{var P,M,$,A,j,T;const N=h||o;if(N!=null&&N.records&&N.records.length>0)if((r==null?void 0:r.type)==="aggregateTable"){const R=N.records.find(B=>B.isGrandTotal),O=N.records.filter(B=>!B.isGrandTotal),z=gH(O,R,N.groupByColumns||[],N.pivotSchema||[],r,(M=(P=r==null?void 0:r.preferences)==null?void 0:P.tablePrefs)==null?void 0:M.columnSettingsMap);kv(z,`${(r==null?void 0:r.title)||"export"}.csv`)}else if((r==null?void 0:r.type)==="table"){const R=((A=($=r==null?void 0:r.preferences)==null?void 0:$.tablePrefs)==null?void 0:A.columnSettingsMap)||{},O=((T=(j=r==null?void 0:r.preferences)==null?void 0:j.tablePrefs)==null?void 0:T.columnVisibility)||{},B=Object.keys(N.records[0]||{}).filter(F=>O[F]!==!1);TM(N.records,R,B,`${(r==null?void 0:r.title)||"export"}.csv`,void 0,Intl.DateTimeFormat().resolvedOptions().timeZone)}else{const R=[],O=Object.keys(N.records[0]);R.push(O.join(","));for(const B of N.records){const F=O.map(I=>`"${(""+B[I]).replace(/"/g,'""')}"`);R.push(F.join(","))}const z=R.join(`
|
|
759
|
+
${(e*100).toLocaleString()}%`}}},scales:{_index_:{display:!1,padding:10,grid:{display:!1}},_value_:{display:!1,beginAtZero:!1,grace:0,grid:{display:!1}}},elements:{trapezoid:{backgroundColor(e){const t=e.chart.data.datasets[e.datasetIndex].data.length;return wNe(e.dataIndex,t)}}}}]);class CNe extends dn{constructor(t,n){super(t,SNe("funnel",n,gh,mh,[Mm,xu]))}}CNe.id=gh.id;dn.register(g_e);dn.register(Kc);dn.register(ch);dn.register(uh);dn.register(Na);dn.register(Hu);dn.register(Dl);dn.register(jl);dn.register(Mm);dn.register(fV);dn.register(gh);dn.register(mh);function Fw({cfg:e,onDatapointClick:t,onChartClick:n}){var p;const[r,o]=_.useState(""),i=ne(m=>m.selectedLensId),s=_.useRef(null),[a,l]=_.useState(),c=ne(m=>m.themeStyle);_.useEffect(()=>{if(s.current){const m=window.getComputedStyle(s.current);o(m.fontFamily)}},[]),_.useEffect(()=>{var y,v,x,w;if(!r)return;(v=(y=c==null?void 0:c.chart)==null?void 0:y.font)!=null&&v.family&&(dn.defaults.font={...dn.defaults.font,...(x=c==null?void 0:c.chart)==null?void 0:x.font,family:r});const m=am(e);m.options={...e.options,responsive:!0,maintainAspectRatio:!1};const g=(w=s==null?void 0:s.current)==null?void 0:w.getContext("2d");if(!g)return;let b;try{const C=OEe(m,g);b=new dn(g,C),l(b)}catch(C){console.log("error creating chart",C)}return()=>{b&&b.destroy()}},[(p=c==null?void 0:c.chart)==null?void 0:p.font,i,r,e]);function u(m){console.log("handleRightClick",m),a&&(n==null||n(m,a,s))}function d(m){var b,y;if(!a)return;n==null||n(m,a,s);const g=a==null?void 0:a.getElementsAtEventForMode(m.nativeEvent,"nearest",{intersect:!0},!0);if(g&&g.length>0){const v=g[0].datasetIndex,x=g[0].index,w=(y=(b=g[0].element)==null?void 0:b.$context)==null?void 0:y.raw;t==null||t(a,v,x,w)}}const h=e.type==="doughnut"||e.type==="pie";return f.jsx("div",{onClick:d,onContextMenu:u,className:J("relative h-[99%] min-w-0 grow",{"mx-14":h}),children:f.jsx("canvas",{ref:s})})}async function ENe(e,t){if(!e||e.trim()==="")throw new Error("URL is required to load component");const r=`${e.endsWith("/")?e:`${e}/`}index.js`;return{default:(await new Function("url","return import(url)")(r))[t]}}async function _Ne(e){try{const t=await import(e),n=Object.keys(t),r=[];return n.forEach(o=>{typeof t[o]=="function"&&(o==null?void 0:o[0])===(o==null?void 0:o[0].toUpperCase())&&r.push({name:o,component:o})}),r}catch(t){return console.error("Error loading the library:",t),[]}}async function nW(e){try{const t=e.endsWith("/")?e:`${e}/`,n=await fetch(`${t}manifest.json`);if(!n.ok)throw new Error(`Failed to fetch manifest: ${n.statusText}`);return await n.json()}catch(t){throw console.error("Error loading manifest:",t),t}}const rW=e=>{const[t,n]=_.useState([]),[r,o]=_.useState(!1),[i,s]=_.useState(null);_.useEffect(()=>{window.React=_,window.ReactDOM=Pn,window.React.jsx=VD.jsx,window.React.jsxs=VD.jsxs,o(!0)},[]),_.useEffect(()=>{e&&e.trim()!==""&&r?nW(e).then(c=>{n(c.visuals),s(c)}).catch(()=>{_Ne(e).then(c=>{n(c)}).catch(c=>{console.error("Error loading manifest:",c)})}):(n([]),s(null))},[e,r]);const a=_.useMemo(()=>!e||e.trim()===""||t.length===0?[]:(t==null?void 0:t.map(c=>{const{name:u,component:d,dataInputs:h,chartType:p}=c;return{name:u,chartType:p,componentName:d,Component:_.lazy(()=>ENe(e,d)),type:h&&h.length>1?"multiple":"single"}}))||[],[t,e]);return{getCard:_.useCallback(c=>{const u=a==null?void 0:a.find(d=>d.name===c);return u?u.Component:null},[a]),components:a,manifest:i}};function oW({onLoadingStatus:e,onDataChange:t,card:n}){const{isFetching:r,isLoading:o,data:i,queryKey:s}=xs(n),a=JSON.stringify(s);return _.useEffect(()=>{e==null||e(o)},[r,o,e]),_.useEffect(()=>{t(n.id,(i==null?void 0:i.records)||[])},[i==null?void 0:i.records,n.id,a,t]),f.jsx(f.Fragment,{})}function iW({card:e,frame:t}){var v,x,w,C,E,k,N,P,M,$;const[n,r]=_.useState([]),{authToken:o}=Lt(),i=kF(o==null?void 0:o.accessToken),s=ne(A=>A.themeStyle),a={colors:((x=(v=s==null?void 0:s.chart)==null?void 0:v.dataset)==null?void 0:x.backgroundColor)||[]},[l,c]=_.useState(!1),{getCard:u}=rW(((w=e.customCardPreferences)==null?void 0:w.url)||""),d=((C=e.customCardPreferences)==null?void 0:C.visualType)||"single",h=(E=e.customCardPreferences)==null?void 0:E.componentName,{data:p}=xs(e),m=_.useCallback((A,j)=>{r(T=>({...T,[A]:j}))},[]);if(!h)return null;const g=u(h),b=Object.keys(((k=e.customCardPreferences)==null?void 0:k.dataInputCardIds)||{}).map(A=>{var R,O,z;const j=(O=(R=e.customCardPreferences)==null?void 0:R.dataInputCardIds)==null?void 0:O[A].cardId,T=(z=t==null?void 0:t.cards)==null?void 0:z.find(B=>B.id===j);return T||null});function y(A){c(A)}return f.jsx("div",{className:"semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto",children:f.jsxs(_.Suspense,{fallback:f.jsx(f.Fragment,{}),children:[g&&d==="single"&&f.jsx(g,{params:i,theme:a,chartSettings:(N=e.customCardPreferences)==null?void 0:N.settings,settings:(P=e.customCardPreferences)==null?void 0:P.settings,onDataChange:m,data:(p==null?void 0:p.records)||[]}),g&&d==="multiple"&&f.jsxs("div",{children:[Object.keys(((M=e.customCardPreferences)==null?void 0:M.dataInputCardIds)||{}).map(A=>{var R,O,z;const j=(O=(R=e.customCardPreferences)==null?void 0:R.dataInputCardIds)==null?void 0:O[A].cardId,T=(z=t==null?void 0:t.cards)==null?void 0:z.find(B=>B.id===j);if(T)return f.jsx(oW,{onLoadingStatus:y,onDataChange:m,dataInputIndex:A,card:T},T.id+A)}),d==="multiple"&&f.jsx("div",{className:J("flex flex-col gap-2",{"opacity-50":l}),children:f.jsx(g,{params:i,theme:a,onDataChange:m,chartSettings:($=e.customCardPreferences)==null?void 0:$.settings,settings:b.map(A=>{var j;return(j=A==null?void 0:A.customCardPreferences)==null?void 0:j.settings}),data:b.map(A=>A!=null&&A.id?n==null?void 0:n[A.id]:[])})})]})]},e.id)})}function OR({customerFacingMessage:e,error:t,resetErrorBoundary:n}){return f.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center rounded-lg border border-dashed border-muted-foreground/25 bg-muted/30 p-6 text-center",children:[f.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:f.jsx("svg",{className:"h-6 w-6 text-muted-foreground",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),f.jsx("h3",{className:"mb-2 text-sm font-medium text-foreground",children:"Chart Unavailable"}),f.jsx("p",{className:"mb-4 text-xs text-muted-foreground",children:e||"Couldn't display this chart right now. Please try refreshing or check your data configuration."}),f.jsxs("button",{onClick:n,className:"inline-flex items-center justify-center rounded-md bg-primary px-3 py-2 text-xs font-medium text-primary-foreground shadow-sm transition-colors hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[f.jsx("svg",{className:"mr-1.5 h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Try Again"]}),om]})}function $R({error:e}){return f.jsx("div",{className:"flex flex-col items-center justify-center",role:"alert",style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%"},children:f.jsxs("div",{style:{backgroundColor:"#fef2f2",border:"1px solid #fecaca",borderRadius:"8px",boxShadow:"0 2px 6px rgba(0, 0, 0, 0.08)",color:"#b91c1c",fontFamily:"sans-serif",padding:"16px",textAlign:"center",flexDirection:"column",whiteSpace:"pre-wrap",position:"relative"},className:"flex flex-col justify-center space-y-1 rounded-md bg-muted p-10",children:[f.jsx("p",{className:"text-sm",children:"Something went wrong:"}),f.jsx("pre",{className:"text-xs",children:e.message})]})})}function kNe({error:e,frame:t}){return f.jsxs("div",{className:"flex h-full flex-col items-center justify-center border",role:"alert",children:[f.jsx(sW,{frame:t}),f.jsx("div",{className:"flex flex-col justify-center space-y-2 rounded-md p-10"}),f.jsxs("div",{className:"flex flex-col justify-center space-y-2 rounded-md p-10",children:[f.jsx("p",{className:"text-lg font-semibold",children:"Oops! Looks like we tripped on a loose wire!"}),f.jsx("p",{className:"text-sm",children:"Something went wrong:"}),f.jsx("pre",{className:"text-xs",children:e.message})]})]})}const NNe=_.createContext(null),mC={didCatch:!1,error:null};class bh extends _.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=mC}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(mC)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&MNe(t.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(mC)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=_.createElement(r,l);else if(o!==void 0)a=o;else throw s}return _.createElement(NNe.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function MNe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function RNe({isOpen:e,onClose:t,frame:n,card:r,data:o}){var k;const[i,s]=_.useState(!1),a=ne(N=>N.isDownloadingPdf),{isError:l,isLoading:c,isFetching:u,cfg:d,data:h,handleDatapointClick:p,pagination:m}=Aw(r),{customCards:g,placeholders:b}=Lt(),y=Tw(r,h),v=()=>{var P,M,$,A,j,T;const N=h||o;if(N!=null&&N.records&&N.records.length>0)if((r==null?void 0:r.type)==="aggregateTable"){const R=N.records.find(B=>B.isGrandTotal),O=N.records.filter(B=>!B.isGrandTotal),z=gH(O,R,N.groupByColumns||[],N.pivotSchema||[],r,(M=(P=r==null?void 0:r.preferences)==null?void 0:P.tablePrefs)==null?void 0:M.columnSettingsMap);kv(z,`${(r==null?void 0:r.title)||"export"}.csv`)}else if((r==null?void 0:r.type)==="table"){const R=((A=($=r==null?void 0:r.preferences)==null?void 0:$.tablePrefs)==null?void 0:A.columnSettingsMap)||{},O=((T=(j=r==null?void 0:r.preferences)==null?void 0:j.tablePrefs)==null?void 0:T.columnVisibility)||{},B=Object.keys(N.records[0]||{}).filter(F=>O[F]!==!1);TM(N.records,R,B,`${(r==null?void 0:r.title)||"export"}.csv`,void 0,Intl.DateTimeFormat().resolvedOptions().timeZone)}else{const R=[],O=Object.keys(N.records[0]);R.push(O.join(","));for(const B of N.records){const F=O.map(I=>`"${(""+B[I]).replace(/"/g,'""')}"`);R.push(F.join(","))}const z=R.join(`
|
|
760
760
|
`);kv(z,`${(r==null?void 0:r.title)||"export"}.csv`)}},x=()=>{s(!0)},w=(r==null?void 0:r.type)==="table"||(r==null?void 0:r.type)==="aggregateTable",C=((k=r==null?void 0:r.preferences)==null?void 0:k.allowDownload)!==!1,E=()=>{if(!r)return null;if(l)return f.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[f.jsx(Yk,{className:"size-8 text-destructive"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Error fetching data. Check your card settings."})]});if(c||u)return f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(_a,{size:"md",color:"muted","aria-label":"Loading data"})});if(h!=null&&h.records&&(h==null?void 0:h.records.length)===0)return b!=null&&b.NoRecords?f.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:b.NoRecords}):f.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[f.jsx(Zk,{className:"size-8 text-muted-foreground"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"No results to display"})]});if(r.type==="table")return f.jsx("div",{className:"relative flex h-full min-h-0 w-full flex-1 grow basis-0",children:f.jsx(Pf,{card:r,data:(h==null?void 0:h.records)||[],paginationMetadata:m,onPaginationChange:()=>{},isLoading:c||u})});if(r.type==="pivotTable"&&y)return f.jsx("div",{className:"relative flex h-full min-h-0 w-full flex-1 grow basis-0",children:f.jsx(Iw,{card:r,data:y.data,options:y.options,onAggregationChange:()=>{},onAggregationLabelChange:()=>{}})});if(r.type==="aggregateTable")return f.jsx("div",{className:"relative flex h-full min-h-0 w-full flex-1 grow basis-0",children:f.jsx(xw,{card:r,data:(h==null?void 0:h.records)||[],groupByColumns:h==null?void 0:h.groupByColumns,pivotSchema:h==null?void 0:h.pivotSchema,paginationMetadata:m,onPaginationChange:()=>{},onAggregationChange:()=>{},isLoading:c||u})});if(r.type==="text")return f.jsx(mu,{className:"overflow-y-auto break-words pr-2",children:f.jsx(Om,{isLoading:c||u,card:r,data:(h==null?void 0:h.records)||[]})});if(r.type==="custom")return f.jsx(bh,{FallbackComponent:OR,children:f.jsx(iW,{frame:n,card:r})});if(d)return f.jsx(Fw,{cfg:d,onChartClick:()=>{},onDatapointClick:p});if(g&&g.length>0){const N=g.find(P=>P.cardId===r.id);if(N&&N.content){const P=N.content;return f.jsx(P,{card:r})}}return null};return f.jsxs(f.Fragment,{children:[f.jsx(zl,{open:e,onOpenChange:t,children:f.jsxs(Pa,{className:"flex h-[80vh] w-[80vw] max-w-[80vw] flex-col gap-0 p-0 [&>button]:hidden",children:[f.jsxs(Da,{className:"shrink-0 border-b px-6 py-4",children:[f.jsx(ja,{className:"text-lg font-semibold",children:(r==null?void 0:r.title)||"Visual"}),f.jsxs(Aa,{className:"sr-only",children:["Expanded view of ",(r==null?void 0:r.title)||"visual"," card showing detailed data and export options"]})]}),f.jsxs("div",{className:"flex items-center gap-2 border-b px-6 py-3",children:[C&&f.jsxs(fe,{variant:"ghost",size:"sm",onClick:v,title:"Download CSV",children:[f.jsx(ci,{className:"mr-2 h-4 w-4"}),"CSV"]}),w&&f.jsxs(fe,{variant:"ghost",size:"sm",onClick:x,disabled:a,title:"Download PDF",children:[f.jsx(yg,{className:"mr-2 h-4 w-4"}),"PDF"]}),f.jsx(fe,{variant:"ghost",size:"icon",onClick:t,className:"ml-auto h-8 w-8",children:f.jsx(gr,{className:"h-4 w-4"})})]}),f.jsx("div",{className:"flex-1 overflow-hidden p-6",children:E()})]})}),i&&f.jsx(mH,{isOpen:i,onClose:()=>s(!1),frame:n,card:r,data:h||o})]})}function PNe({frame:e,isHovered:t,isExpandedViewOpen:n=!1,onExpandClick:r}){var q;const[o,i]=_.useState(!1),[s,a]=_.useState(!1),[l,c]=_.useState(!1),[u,d]=_.useState(!1),[h,p]=_.useState(!1),[m,g]=_.useState(""),[b,y]=_.useState(!1),[v,x]=_.useState(!1),w=r?n:v,C=r||(()=>x(!0)),E=_.useRef(null),k=_.useRef(null),N=_.useRef(null),P=ne(G=>G.isDashboardEditing),M=ne(G=>G.isDownloadingPdf),$=ne(G=>G.selectedSheetId),{removeFrame:A}=ne(G=>G.actions),j=e.cards.find(G=>G.id===e.activeCardId),{handleEditVisual:T,card:R,data:O}=Vle(e);_.useEffect(()=>()=>{k.current&&clearTimeout(k.current),N.current&&clearTimeout(N.current)},[]);const z=()=>{k.current&&clearTimeout(k.current),i(!0)},B=()=>{k.current=setTimeout(()=>{i(!1)},300)},F=()=>{N.current&&clearTimeout(N.current),a(!0)},I=()=>{N.current=setTimeout(()=>{a(!1)},300)},U=()=>{i(!1),a(!1),k.current&&clearTimeout(k.current),N.current&&clearTimeout(N.current)},V=()=>{p(!0)},D=async()=>{if(!m)return;d(!1),g(""),y(!1);const G=st.loading("Generating protected PDF report... may take up to 60 seconds");try{await f9(e.activeCardId||"",e.id,(R==null?void 0:R.title)||"visual",R==null?void 0:R.type,m),st.dismiss(G),st.success("Protected visual PDF downloaded successfully!",{duration:2e3,position:"top-right"})}catch(ee){st.dismiss(G),st.error("Failed to download protected visual PDF. Please try again."),console.error("Protected visual PDF download error:",ee)}},H=()=>{const{authToken:G,theme:ee,filterValues:K,dashboardTitle:se,selectedSheetId:oe,dashboardId:he}=vM(),ge=new URLSearchParams;ge.set("token",(G==null?void 0:G.accessToken)||""),ge.set("theme",ee||"light"),ge.set("filterValues",JSON.stringify(K)),ge.set("dashboardTitle",se||""),ge.set("selectedSheetId",oe||""),ge.set("dashboardId",he||"");const xe=e.activeCardId,ve=`https://semaphor.cloud/view/dashboard/${he}/visual/${xe}?${ge.toString()}`;window.open(ve,"_blank")},W=(R==null?void 0:R.type)==="kpi",Z={editVisual:{visible:P},configuration:{visible:P&&!!(j!=null&&j.config)&&!W},expand:{visible:!W},export:{visible:!W,submenu:{downloadCSV:{visible:((q=R==null?void 0:R.preferences)==null?void 0:q.allowDownload)!==!1},downloadPDF:{visible:(R==null?void 0:R.type)==="table"||(R==null?void 0:R.type)==="aggregateTable",enabled:!M},protectedPDF:{visible:(R==null?void 0:R.type)==="table"||(R==null?void 0:R.type)==="aggregateTable"}}},deleteCard:{visible:P},moreOptions:{visible:!W}},Y=Z.editVisual.visible||Z.configuration.visible||Z.expand.visible||Z.export.visible||Z.deleteCard.visible||P&&Z.moreOptions.visible,L=t&&!w&&Y;return f.jsxs(f.Fragment,{children:[L&&f.jsx("div",{ref:E,className:"absolute right-2 top-2 z-50 duration-200 animate-in fade-in-0 zoom-in-95",onMouseLeave:U,children:f.jsx(Pi,{className:"min-w-[44px] border-border bg-popover p-1 shadow-lg",children:f.jsxs("div",{className:"flex flex-col gap-1",children:[Z.editVisual.visible&&f.jsx(fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 transition-colors hover:bg-primary hover:text-primary-foreground",onClick:G=>{G.stopPropagation(),T()},disabled:!1,title:"Edit Visual",children:f.jsx(Gk,{className:"h-4 w-4"})}),Z.expand.visible&&f.jsx(fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 transition-colors hover:bg-accent hover:text-accent-foreground",onClick:G=>{G.stopPropagation(),C(),i(!1),a(!1)},disabled:!1,title:"Expand View",children:f.jsx(qte,{className:"h-4 w-4"})}),Z.configuration.visible&&f.jsx(fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 transition-colors hover:bg-accent hover:text-accent-foreground",onClick:G=>{G.stopPropagation(),c(!0)},disabled:!1,title:"Configuration",children:f.jsx(fa,{className:"h-4 w-4"})}),Z.export.visible&&f.jsxs("div",{className:"relative",children:[f.jsx(fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 transition-colors hover:bg-accent hover:text-accent-foreground",onMouseEnter:z,onMouseLeave:B,onClick:G=>G.stopPropagation(),title:"Export",children:f.jsx(yg,{className:"h-4 w-4"})}),o&&f.jsx("div",{className:"z-60 absolute right-full top-0 mr-1 duration-150 animate-in fade-in-0 zoom-in-95",onMouseEnter:z,onMouseLeave:B,children:f.jsx(Pi,{className:"min-w-[140px] border-border bg-popover p-1 shadow-lg",children:f.jsxs("div",{className:"flex flex-col gap-1",children:[Z.export.submenu.downloadCSV.visible&&f.jsxs(fe,{variant:"ghost",size:"sm",className:"h-8 justify-start px-2 transition-colors hover:bg-accent hover:text-accent-foreground",disabled:!1,onClick:G=>{var ee,K,se,oe,he,ge;if(G.stopPropagation(),O!=null&&O.records&&O.records.length>0)if((R==null?void 0:R.type)==="aggregateTable"){const xe=O.records.find(Te=>Te.isGrandTotal),ve=O.records.filter(Te=>!Te.isGrandTotal),Ce=gH(ve,xe,O.groupByColumns||[],O.pivotSchema||[],R,(K=(ee=R==null?void 0:R.preferences)==null?void 0:ee.tablePrefs)==null?void 0:K.columnSettingsMap);kv(Ce,`${(R==null?void 0:R.title)||"export"}.csv`)}else if((R==null?void 0:R.type)==="table"){const xe=((oe=(se=R==null?void 0:R.preferences)==null?void 0:se.tablePrefs)==null?void 0:oe.columnSettingsMap)||{},ve=((ge=(he=R==null?void 0:R.preferences)==null?void 0:he.tablePrefs)==null?void 0:ge.columnVisibility)||{},Te=Object.keys(O.records[0]||{}).filter(ze=>ve[ze]!==!1);TM(O.records,xe,Te,`${(R==null?void 0:R.title)||"export"}.csv`,void 0,Intl.DateTimeFormat().resolvedOptions().timeZone)}else{const xe=[],ve=Object.keys(O.records[0]);xe.push(ve.join(","));for(const Te of O.records){const ze=ve.map(ut=>`"${(""+Te[ut]).replace(/"/g,'""')}"`);xe.push(ze.join(","))}const Ce=xe.join(`
|
|
761
761
|
`);kv(Ce,`${(R==null?void 0:R.title)||"export"}.csv`)}},children:[f.jsx(ci,{className:"mr-2 h-4 w-4"}),f.jsx("span",{className:"text-xs",children:"Export CSV"})]}),Z.export.submenu.downloadPDF.visible&&f.jsxs(fe,{variant:"ghost",size:"sm",className:"h-8 justify-start px-2 transition-colors hover:bg-accent hover:text-accent-foreground",onClick:G=>{G.stopPropagation(),V()},disabled:!Z.export.submenu.downloadPDF.enabled,children:[f.jsx(ci,{className:"mr-2 h-4 w-4"}),f.jsx("span",{className:"text-xs",children:"Export PDF"})]})]})})})]}),P&&Z.moreOptions.visible&&f.jsxs("div",{className:"relative",children:[f.jsx(fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 transition-colors hover:bg-accent hover:text-accent-foreground",onMouseEnter:F,onMouseLeave:I,onClick:G=>G.stopPropagation(),title:"More Options",children:f.jsx(Vk,{className:"h-4 w-4"})}),s&&f.jsx("div",{className:"z-60 absolute right-full top-0 mr-1 duration-150 animate-in fade-in-0 zoom-in-95",onMouseEnter:F,onMouseLeave:I,children:f.jsx(Pi,{className:"min-w-[160px] border-border bg-popover p-1 shadow-lg",children:f.jsx("div",{className:"flex flex-col gap-1",children:f.jsxs(fe,{variant:"ghost",size:"sm",className:"h-8 justify-start px-2 transition-colors hover:bg-accent hover:text-accent-foreground",onClick:G=>{G.stopPropagation(),H()},children:[f.jsx(Bte,{className:"mr-2 h-4 w-4"}),f.jsx("span",{className:"text-xs",children:"Open in New Window"})]})})})})]}),Z.deleteCard.visible&&f.jsx(fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 transition-colors hover:bg-destructive hover:text-destructive-foreground",onClick:G=>{G.stopPropagation(),A($,e.id)},disabled:!1,title:"Delete Card",children:f.jsx(ju,{className:"h-4 w-4"})})]})})}),f.jsx(zhe,{isOpen:l,onClose:()=>c(!1)}),f.jsx(zl,{open:u,onOpenChange:d,children:f.jsxs(Pa,{className:"sm:max-w-[425px]",children:[f.jsxs(Da,{children:[f.jsx(ja,{children:"Download Protected Visual PDF"}),f.jsx(Aa,{children:"Enter a password to protect your visual PDF. The PDF will be encrypted and require this password to open."})]}),f.jsx("div",{className:"grid gap-4 py-4",children:f.jsxs("div",{className:"grid gap-2",children:[f.jsx(me,{htmlFor:"password",children:"Password"}),f.jsxs("div",{className:"relative",children:[f.jsx(hr,{id:"password",type:b?"text":"password",value:m,onChange:G=>g(G.target.value),placeholder:"Enter password",className:"pr-10",onKeyDown:G=>{G.key==="Enter"&&m&&D()}}),f.jsx(fe,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>y(!b),children:b?f.jsx(gx,{className:"h-4 w-4 text-muted-foreground"}):f.jsx(Yf,{className:"h-4 w-4 text-muted-foreground"})})]})]})}),f.jsxs(Bl,{children:[f.jsx(fe,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),f.jsx(fe,{onClick:D,disabled:!m||M,children:"Download"})]})]})}),!r&&v&&f.jsx(RNe,{isOpen:v,onClose:()=>x(!1),frame:e,card:R,data:O}),f.jsx(mH,{isOpen:h,onClose:()=>p(!1),frame:e,card:R,data:O})]})}function sW({frame:e,isHovered:t=!1}){return f.jsx(PNe,{frame:e,isHovered:t})}function Lw(e){const{authToken:t}=Lt(),n=Wee(t==null?void 0:t.accessToken);function r(){var i,s,a,l,c,u;if((s=(i=e.preferences)==null?void 0:i.formatNumber)!=null&&s.currency&&((l=(a=e.preferences)==null?void 0:a.formatNumber)==null?void 0:l.currency)!=="none")return n!=null&&n.currency?n==null?void 0:n.currency:(u=(c=e.preferences)==null?void 0:c.formatNumber)==null?void 0:u.currency}function o(){var i,s,a,l,c,u;return(s=(i=e.preferences)==null?void 0:i.formatNumber)!=null&&s.locale&&((l=(a=e.preferences)==null?void 0:a.formatNumber)==null?void 0:l.locale)!=="none"?n!=null&&n.locale?n==null?void 0:n.locale:(u=(c=e.preferences)==null?void 0:c.formatNumber)==null?void 0:u.locale:navigator.language||"en-US"}return{getCurrency:r,getLocale:o}}var DNe="Toggle",aW=S.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...i}=e,[s=!1,a]=Er({prop:n,onChange:o,defaultProp:r});return f.jsx(je.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:t,onClick:ye(e.onClick,()=>{e.disabled||a(!s)})})});aW.displayName=DNe;var lW=aW;const jNe=vx("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Yg=S.forwardRef(({className:e,variant:t,size:n,...r},o)=>f.jsx(lW,{ref:o,className:J(jNe({variant:t,size:n,className:e})),...r}));Yg.displayName=lW.displayName;function FR({children:e,className:t,...n}){return f.jsx(t7,{children:f.jsx(Vi,{children:f.jsx(bu,{...n,className:t,children:e})})})}const ANe={"currentPeriod.start":{icon:f.jsx(vj,{className:"h-3 w-3 text-blue-500"}),label:"Current Start"},"currentPeriod.end":{icon:f.jsx(vj,{className:"h-3 w-3 text-blue-500"}),label:"Current End"},"comparisonPeriod.start":{icon:f.jsx(vs,{className:"h-3 w-3 text-gray-500"}),label:"Previous Start"},"comparisonPeriod.end":{icon:f.jsx(vs,{className:"h-3 w-3 text-gray-500"}),label:"Previous End"},trendlineGranularity:{icon:f.jsx(l3,{className:"h-3 w-3 text-green-500"}),label:"Data Period"},trendlineWindow:{icon:f.jsx(mx,{className:"h-3 w-3 text-purple-500"}),label:"Time Range"}},TNe=(e,t,n)=>e>t?f.jsx(lu,{className:`h-3 w-3 ${n?"text-green-500":"text-red-500"}`}):e<t?f.jsx(gg,{className:`h-3 w-3 ${n?"text-green-500":"text-red-500"}`}):f.jsx(lu,{className:"h-3 w-3 text-gray-500"}),INe=(e,t)=>e>t?f.jsx(gg,{className:"h-3 w-3 text-gray-500"}):e<t?f.jsx(lu,{className:"h-3 w-3 text-gray-500"}):f.jsx(lu,{className:"h-3 w-3 text-gray-500"}),ONe=(e,t,n)=>e>t?f.jsx(R0,{className:`h-3 w-3 ${n?"text-green-500":"text-red-500"}`}):e<t?f.jsx(P3,{className:`h-3 w-3 ${n?"text-green-500":"text-red-500"}`}):f.jsx(R0,{className:"h-3 w-3 text-gray-500"}),$Ne=(e,t)=>e.filter(n=>n.segment==="meta").filter(n=>!(!t&&(n.key==="trendlineGranularity"||n.key==="trendlineWindow")));function gC({label:e,value:t,icon:n,formatCurrency:r}){return f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-1",children:[n,f.jsxs("span",{children:[e,":"]})]}),f.jsx("span",{className:"font-mono",children:r(t)})]})}function FNe({metaKey:e,value:t}){const n=ANe[e];return n?f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex items-center gap-1",children:[n.icon,f.jsxs("span",{children:[n.label,":"]})]}),f.jsx("span",{className:"font-mono",children:t})]}):f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(Kf,{className:"h-3 w-3"}),f.jsxs("span",{children:[e,":"]})]}),f.jsx("span",{className:"font-mono",children:t})]})}function LNe({currentValue:e,comparisonValue:t,isPositive:n,formatCurrency:r}){return f.jsxs("div",{className:"space-y-1",children:[f.jsx(gC,{label:"Current",value:e,icon:TNe(e,t,n),formatCurrency:r}),f.jsx(gC,{label:"Previous",value:t,icon:INe(e,t),formatCurrency:r}),f.jsx(gC,{label:"Change",value:e-t,icon:ONe(e,t,n),formatCurrency:r})]})}function zNe({data:e,showTrendline:t}){const n=$Ne(e,t);return n.length===0?null:f.jsxs("div",{className:"border-t pt-2",children:[f.jsxs("div",{className:"mb-2 flex items-center gap-1 font-semibold",children:[f.jsx(vs,{className:"h-3 w-3"}),"Period Details"]}),f.jsx("div",{className:"space-y-1",children:n.map((r,o)=>f.jsx(FNe,{metaKey:r.key,value:r.value},o))})]})}function BNe({currentValue:e,comparisonValue:t,isPositive:n,data:r,formatCurrency:o,showTrendline:i=!1}){return f.jsx(FR,{side:"right",className:"max-w-fit",children:f.jsxs("div",{className:"space-y-2 text-xs",children:[f.jsxs("div",{className:"flex items-center gap-1 font-semibold",children:[f.jsx(l3,{className:"h-3 w-3"}),"Key Metrics"]}),f.jsx(LNe,{currentValue:e,comparisonValue:t,isPositive:n,formatCurrency:o}),f.jsx(zNe,{data:r,showTrendline:i})]})})}const jd=[{id:"us",name:"United States",flag:"🇺🇸",code:"US",region:"North America"},{id:"ca",name:"Canada",flag:"🇨🇦",code:"CA",region:"North America"},{id:"mx",name:"Mexico",flag:"🇲🇽",code:"MX",region:"North America"},{id:"gb",name:"United Kingdom",flag:"🇬🇧",code:"GB",region:"Europe"},{id:"de",name:"Germany",flag:"🇩🇪",code:"DE",region:"Europe"},{id:"fr",name:"France",flag:"🇫🇷",code:"FR",region:"Europe"},{id:"it",name:"Italy",flag:"🇮🇹",code:"IT",region:"Europe"},{id:"es",name:"Spain",flag:"🇪🇸",code:"ES",region:"Europe"},{id:"nl",name:"Netherlands",flag:"🇳🇱",code:"NL",region:"Europe"},{id:"be",name:"Belgium",flag:"🇧🇪",code:"BE",region:"Europe"},{id:"ch",name:"Switzerland",flag:"🇨🇭",code:"CH",region:"Europe"},{id:"at",name:"Austria",flag:"🇦🇹",code:"AT",region:"Europe"},{id:"se",name:"Sweden",flag:"🇸🇪",code:"SE",region:"Europe"},{id:"no",name:"Norway",flag:"🇳🇴",code:"NO",region:"Europe"},{id:"dk",name:"Denmark",flag:"🇩🇰",code:"DK",region:"Europe"},{id:"fi",name:"Finland",flag:"🇫🇮",code:"FI",region:"Europe"},{id:"pl",name:"Poland",flag:"🇵🇱",code:"PL",region:"Europe"},{id:"cz",name:"Czech Republic",flag:"🇨🇿",code:"CZ",region:"Europe"},{id:"hu",name:"Hungary",flag:"🇭🇺",code:"HU",region:"Europe"},{id:"pt",name:"Portugal",flag:"🇵🇹",code:"PT",region:"Europe"},{id:"ie",name:"Ireland",flag:"🇮🇪",code:"IE",region:"Europe"},{id:"gr",name:"Greece",flag:"🇬🇷",code:"GR",region:"Europe"},{id:"jp",name:"Japan",flag:"🇯🇵",code:"JP",region:"Asia"},{id:"cn",name:"China",flag:"🇨🇳",code:"CN",region:"Asia"},{id:"in",name:"India",flag:"🇮🇳",code:"IN",region:"Asia"},{id:"kr",name:"South Korea",flag:"🇰🇷",code:"KR",region:"Asia"},{id:"sg",name:"Singapore",flag:"🇸🇬",code:"SG",region:"Asia"},{id:"hk",name:"Hong Kong",flag:"🇭🇰",code:"HK",region:"Asia"},{id:"tw",name:"Taiwan",flag:"🇹🇼",code:"TW",region:"Asia"},{id:"th",name:"Thailand",flag:"🇹🇭",code:"TH",region:"Asia"},{id:"my",name:"Malaysia",flag:"🇲🇾",code:"MY",region:"Asia"},{id:"id",name:"Indonesia",flag:"🇮🇩",code:"ID",region:"Asia"},{id:"ph",name:"Philippines",flag:"🇵🇭",code:"PH",region:"Asia"},{id:"vn",name:"Vietnam",flag:"🇻🇳",code:"VN",region:"Asia"},{id:"ae",name:"United Arab Emirates",flag:"🇦🇪",code:"AE",region:"Asia"},{id:"sa",name:"Saudi Arabia",flag:"🇸🇦",code:"SA",region:"Asia"},{id:"il",name:"Israel",flag:"🇮🇱",code:"IL",region:"Asia"},{id:"tr",name:"Turkey",flag:"🇹🇷",code:"TR",region:"Asia"},{id:"au",name:"Australia",flag:"🇦🇺",code:"AU",region:"Oceania"},{id:"nz",name:"New Zealand",flag:"🇳🇿",code:"NZ",region:"Oceania"},{id:"br",name:"Brazil",flag:"🇧🇷",code:"BR",region:"South America"},{id:"ar",name:"Argentina",flag:"🇦🇷",code:"AR",region:"South America"},{id:"cl",name:"Chile",flag:"🇨🇱",code:"CL",region:"South America"},{id:"co",name:"Colombia",flag:"🇨🇴",code:"CO",region:"South America"},{id:"pe",name:"Peru",flag:"🇵🇪",code:"PE",region:"South America"},{id:"uy",name:"Uruguay",flag:"🇺🇾",code:"UY",region:"South America"},{id:"ec",name:"Ecuador",flag:"🇪🇨",code:"EC",region:"South America"},{id:"ve",name:"Venezuela",flag:"🇻🇪",code:"VE",region:"South America"},{id:"za",name:"South Africa",flag:"🇿🇦",code:"ZA",region:"Africa"},{id:"ng",name:"Nigeria",flag:"🇳🇬",code:"NG",region:"Africa"},{id:"eg",name:"Egypt",flag:"🇪🇬",code:"EG",region:"Africa"},{id:"ma",name:"Morocco",flag:"🇲🇦",code:"MA",region:"Africa"},{id:"ke",name:"Kenya",flag:"🇰🇪",code:"KE",region:"Africa"},{id:"gh",name:"Ghana",flag:"🇬🇭",code:"GH",region:"Africa"},{id:"et",name:"Ethiopia",flag:"🇪🇹",code:"ET",region:"Africa"},{id:"tz",name:"Tanzania",flag:"🇹🇿",code:"TZ",region:"Africa"},{id:"ru",name:"Russia",flag:"🇷🇺",code:"RU",region:"Europe/Asia"},{id:"ua",name:"Ukraine",flag:"🇺🇦",code:"UA",region:"Europe"},{id:"by",name:"Belarus",flag:"🇧🇾",code:"BY",region:"Europe"},{id:"lt",name:"Lithuania",flag:"🇱🇹",code:"LT",region:"Europe"},{id:"lv",name:"Latvia",flag:"🇱🇻",code:"LV",region:"Europe"},{id:"ee",name:"Estonia",flag:"🇪🇪",code:"EE",region:"Europe"},{id:"ro",name:"Romania",flag:"🇷🇴",code:"RO",region:"Europe"},{id:"bg",name:"Bulgaria",flag:"🇧🇬",code:"BG",region:"Europe"},{id:"hr",name:"Croatia",flag:"🇭🇷",code:"HR",region:"Europe"},{id:"si",name:"Slovenia",flag:"🇸🇮",code:"SI",region:"Europe"},{id:"sk",name:"Slovakia",flag:"🇸🇰",code:"SK",region:"Europe"},{id:"rs",name:"Serbia",flag:"🇷🇸",code:"RS",region:"Europe"},{id:"ba",name:"Bosnia and Herzegovina",flag:"🇧🇦",code:"BA",region:"Europe"},{id:"me",name:"Montenegro",flag:"🇲🇪",code:"ME",region:"Europe"},{id:"mk",name:"North Macedonia",flag:"🇲🇰",code:"MK",region:"Europe"},{id:"al",name:"Albania",flag:"🇦🇱",code:"AL",region:"Europe"},{id:"xk",name:"Kosovo",flag:"🇽🇰",code:"XK",region:"Europe"},{id:"md",name:"Moldova",flag:"🇲🇩",code:"MD",region:"Europe"},{id:"is",name:"Iceland",flag:"🇮🇸",code:"IS",region:"Europe"},{id:"lu",name:"Luxembourg",flag:"🇱🇺",code:"LU",region:"Europe"},{id:"mt",name:"Malta",flag:"🇲🇹",code:"MT",region:"Europe"},{id:"cy",name:"Cyprus",flag:"🇨🇾",code:"CY",region:"Europe"},{id:"mc",name:"Monaco",flag:"🇲🇨",code:"MC",region:"Europe"},{id:"ad",name:"Andorra",flag:"🇦🇩",code:"AD",region:"Europe"},{id:"sm",name:"San Marino",flag:"🇸🇲",code:"SM",region:"Europe"},{id:"va",name:"Vatican City",flag:"🇻🇦",code:"VA",region:"Europe"},{id:"li",name:"Liechtenstein",flag:"🇱🇮",code:"LI",region:"Europe"},{id:"pk",name:"Pakistan",flag:"🇵🇰",code:"PK",region:"Asia"},{id:"bd",name:"Bangladesh",flag:"🇧🇩",code:"BD",region:"Asia"},{id:"lk",name:"Sri Lanka",flag:"🇱🇰",code:"LK",region:"Asia"},{id:"np",name:"Nepal",flag:"🇳🇵",code:"NP",region:"Asia"},{id:"bt",name:"Bhutan",flag:"🇧🇹",code:"BT",region:"Asia"},{id:"mv",name:"Maldives",flag:"🇲🇻",code:"MV",region:"Asia"},{id:"af",name:"Afghanistan",flag:"🇦🇫",code:"AF",region:"Asia"},{id:"ir",name:"Iran",flag:"🇮🇷",code:"IR",region:"Asia"},{id:"iq",name:"Iraq",flag:"🇮🇶",code:"IQ",region:"Asia"},{id:"sy",name:"Syria",flag:"🇸🇾",code:"SY",region:"Asia"},{id:"lb",name:"Lebanon",flag:"🇱🇧",code:"LB",region:"Asia"},{id:"jo",name:"Jordan",flag:"🇯🇴",code:"JO",region:"Asia"},{id:"kw",name:"Kuwait",flag:"🇰🇼",code:"KW",region:"Asia"},{id:"qa",name:"Qatar",flag:"🇶🇦",code:"QA",region:"Asia"},{id:"bh",name:"Bahrain",flag:"🇧🇭",code:"BH",region:"Asia"},{id:"om",name:"Oman",flag:"🇴🇲",code:"OM",region:"Asia"},{id:"ye",name:"Yemen",flag:"🇾🇪",code:"YE",region:"Asia"},{id:"ge",name:"Georgia",flag:"🇬🇪",code:"GE",region:"Asia"},{id:"am",name:"Armenia",flag:"🇦🇲",code:"AM",region:"Asia"},{id:"az",name:"Azerbaijan",flag:"🇦🇿",code:"AZ",region:"Asia"},{id:"kz",name:"Kazakhstan",flag:"🇰🇿",code:"KZ",region:"Asia"},{id:"kg",name:"Kyrgyzstan",flag:"🇰🇬",code:"KG",region:"Asia"},{id:"tj",name:"Tajikistan",flag:"🇹🇯",code:"TJ",region:"Asia"},{id:"tm",name:"Turkmenistan",flag:"🇹🇲",code:"TM",region:"Asia"},{id:"uz",name:"Uzbekistan",flag:"🇺🇿",code:"UZ",region:"Asia"},{id:"mn",name:"Mongolia",flag:"🇲🇳",code:"MN",region:"Asia"},{id:"kp",name:"North Korea",flag:"🇰🇵",code:"KP",region:"Asia"},{id:"mm",name:"Myanmar",flag:"🇲🇲",code:"MM",region:"Asia"},{id:"la",name:"Laos",flag:"🇱🇦",code:"LA",region:"Asia"},{id:"kh",name:"Cambodia",flag:"🇰🇭",code:"KH",region:"Asia"},{id:"bn",name:"Brunei",flag:"🇧🇳",code:"BN",region:"Asia"},{id:"tl",name:"East Timor",flag:"🇹🇱",code:"TL",region:"Asia"},{id:"dz",name:"Algeria",flag:"🇩🇿",code:"DZ",region:"Africa"},{id:"tn",name:"Tunisia",flag:"🇹🇳",code:"TN",region:"Africa"},{id:"ly",name:"Libya",flag:"🇱🇾",code:"LY",region:"Africa"},{id:"sd",name:"Sudan",flag:"🇸🇩",code:"SD",region:"Africa"},{id:"ss",name:"South Sudan",flag:"🇸🇸",code:"SS",region:"Africa"},{id:"td",name:"Chad",flag:"🇹🇩",code:"TD",region:"Africa"},{id:"ne",name:"Niger",flag:"🇳🇪",code:"NE",region:"Africa"},{id:"ml",name:"Mali",flag:"🇲🇱",code:"ML",region:"Africa"},{id:"bf",name:"Burkina Faso",flag:"🇧🇫",code:"BF",region:"Africa"},{id:"sn",name:"Senegal",flag:"🇸🇳",code:"SN",region:"Africa"},{id:"gm",name:"Gambia",flag:"🇬🇲",code:"GM",region:"Africa"},{id:"gw",name:"Guinea-Bissau",flag:"🇬🇼",code:"GW",region:"Africa"},{id:"gn",name:"Guinea",flag:"🇬🇳",code:"GN",region:"Africa"},{id:"sl",name:"Sierra Leone",flag:"🇸🇱",code:"SL",region:"Africa"},{id:"lr",name:"Liberia",flag:"🇱🇷",code:"LR",region:"Africa"},{id:"ci",name:"Ivory Coast",flag:"🇨🇮",code:"CI",region:"Africa"},{id:"tg",name:"Togo",flag:"🇹🇬",code:"TG",region:"Africa"},{id:"bj",name:"Benin",flag:"🇧🇯",code:"BJ",region:"Africa"}];function cW({selectedCountryId:e,onCountrySelect:t,className:n="",size:r="md",showRegionBadges:o=!0,maxDisplayResults:i=50}){const[s,a]=_.useState(""),[l,c]=_.useState(!1),u=_.useMemo(()=>jd.find(v=>v.id===e),[e]),d=_.useMemo(()=>{if(!s.trim())return jd.slice(0,i);const v=s.toLowerCase();return jd.filter(w=>{var C;return w.name.toLowerCase().includes(v)||w.code.toLowerCase().includes(v)||((C=w.region)==null?void 0:C.toLowerCase().includes(v))}).slice(0,i)},[s,i]),h=_.useMemo(()=>{const v={};d.forEach(w=>{const C=w.region||"Other";v[C]||(v[C]=[]),v[C].push(w)});const x={};return Object.keys(v).sort().forEach(w=>{x[w]=v[w].sort((C,E)=>C.name.localeCompare(E.name))}),x},[d]),p=v=>{t(v),c(!1),a("")},m=()=>{t(null),c(!1)},g={sm:"h-8 w-8 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},b={sm:"text-lg",md:"text-2xl",lg:"text-3xl"},y={sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"};return f.jsxs(Bg,{open:l,onOpenChange:c,children:[f.jsx(Vg,{asChild:!0,children:f.jsx(fe,{variant:"ghost",className:`${g[r]} ${n}`,children:u?f.jsx("span",{className:b[r],title:u.name,children:u.flag}):f.jsx("div",{className:`${y[r]} flex items-center justify-center rounded border-2 border-dashed border-gray-300`,children:f.jsx("span",{className:"text-xs text-gray-400",children:"+"})})})}),f.jsxs(sh,{align:"start",className:"max-h-96 w-80 overflow-hidden",children:[f.jsxs("div",{className:"border-b p-2",children:[f.jsxs("div",{className:"relative",children:[f.jsx(Kk,{className:"absolute left-2 top-1/2 h-4 w-4 -translate-y-1/2 transform text-gray-400"}),f.jsx(hr,{placeholder:"Search countries...",value:s,onChange:v=>a(v.target.value),className:"h-8 pl-8",autoFocus:!0})]}),s&&f.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:[d.length," of ",jd.length," countries",d.length===i&&" (showing first 50)"]})]}),u&&!s&&f.jsx("div",{className:"border-b",children:f.jsxs(na,{onClick:m,className:"flex items-center gap-2 px-3 py-2 text-red-600 hover:bg-red-50 hover:text-red-700",children:[f.jsx(gr,{className:"h-4 w-4"}),f.jsx("span",{className:"text-sm font-medium",children:"Clear selection"})]})}),f.jsx("div",{className:"max-h-80 overflow-y-auto",children:Object.keys(h).length===0?f.jsxs("div",{className:"p-4 text-center text-gray-500",children:[f.jsx("div",{className:"text-sm",children:"No countries found"}),f.jsx("div",{className:"text-xs",children:"Try a different search term"})]}):Object.entries(h).map(([v,x])=>f.jsxs("div",{children:[o&&!s&&f.jsx("div",{className:"border-b bg-gray-50 px-2 py-1.5",children:f.jsxs(Xr,{variant:"secondary",className:"text-xs",children:[v," (",x.length,")"]})}),x.map(w=>f.jsxs(na,{onClick:()=>p(w.id),className:"flex cursor-pointer items-center gap-3 px-3 py-2",children:[f.jsx("span",{className:"flex-shrink-0 text-xl",children:w.flag}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("div",{className:"truncate text-sm font-medium",children:w.name}),f.jsx("div",{className:"text-xs text-gray-500",children:w.code})]}),e===w.id&&f.jsx("span",{className:"text-sm text-blue-600",children:"✓"})]},w.id))]},v))}),u&&f.jsx("div",{className:"border-t bg-gray-50 p-2",children:f.jsxs(na,{onClick:m,className:"flex items-center gap-2 text-red-600 hover:bg-red-50 hover:text-red-700",children:[f.jsx(gr,{className:"h-4 w-4"}),f.jsxs("span",{className:"text-sm",children:["Remove ",u.name]})]})})]})]})}function Cu(){return Cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cu.apply(null,arguments)}function VNe(e,t=[]){let n=[];function r(i,s){const a=_.createContext(s),l=n.length;n=[...n,s];function c(d){const{scope:h,children:p,...m}=d,g=(h==null?void 0:h[e][l])||a,b=_.useMemo(()=>m,Object.values(m));return _.createElement(g.Provider,{value:b},p)}function u(d,h){const p=(h==null?void 0:h[e][l])||a,m=_.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=n.map(s=>_.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,HNe(o,...t)]}function HNe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function WNe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function UNe(...e){return t=>e.forEach(n=>WNe(n,t))}const uW=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),i=o.find(GNe);if(i){const s=i.props.children,a=o.map(l=>l===i?_.Children.count(s)>1?_.Children.only(null):_.isValidElement(s)?s.props.children:null:l);return _.createElement(C_,Cu({},r,{ref:t}),_.isValidElement(s)?_.cloneElement(s,void 0,a):null)}return _.createElement(C_,Cu({},r,{ref:t}),n)});uW.displayName="Slot";const C_=_.forwardRef((e,t)=>{const{children:n,...r}=e;return _.isValidElement(n)?_.cloneElement(n,{...YNe(r,n.props),ref:t?UNe(t,n.ref):n.ref}):_.Children.count(n)>1?_.Children.only(null):null});C_.displayName="SlotClone";const qNe=({children:e})=>_.createElement(_.Fragment,null,e);function GNe(e){return _.isValidElement(e)&&e.type===qNe}function YNe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const KNe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],dW=KNe.reduce((e,t)=>{const n=_.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?uW:t;return _.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),_.createElement(a,Cu({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),fW="Progress",zw=100,[ZNe,RKe]=VNe(fW),[XNe,QNe]=ZNe(fW),hW=_.forwardRef((e,t)=>{const{__scopeProgress:n,value:r,max:o,getValueLabel:i=tMe,...s}=e,a=E_(o)?o:zw,l=mW(r,a)?r:null,c=Pv(l)?i(l,a):void 0;return _.createElement(XNe,{scope:n,value:l,max:a},_.createElement(dW.div,Cu({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Pv(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":pW(l,a),"data-value":l??void 0,"data-max":a},s,{ref:t})))});hW.propTypes={max(e,t,n){const r=e[t],o=String(r);return r&&!E_(r)?new Error(nMe(o,n)):null},value(e,t,n){const r=e[t],o=String(r),i=E_(e.max)?e.max:zw;return r!=null&&!mW(r,i)?new Error(rMe(o,n)):null}};const JNe="ProgressIndicator",eMe=_.forwardRef((e,t)=>{var n;const{__scopeProgress:r,...o}=e,i=QNe(JNe,r);return _.createElement(dW.div,Cu({"data-state":pW(i.value,i.max),"data-value":(n=i.value)!==null&&n!==void 0?n:void 0,"data-max":i.max},o,{ref:t}))});function tMe(e,t){return`${Math.round(e/t*100)}%`}function pW(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Pv(e){return typeof e=="number"}function E_(e){return Pv(e)&&!isNaN(e)&&e>0}function mW(e,t){return Pv(e)&&!isNaN(e)&&e<=t&&e>=0}function nMe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${zw}\`.`}function rMe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
762
762
|
- a positive number
|
package/dist/dashboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DwwZJ4zq.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
|
package/dist/dashboard/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DwwZJ4zq.js"),C=require("./types/index.cjs"),i=require("./chunks/dashboard-plus-COAXbMNB.js"),t=require("react/jsx-runtime"),h=require("react");require("react-dom");function T(a){const{displayPreferences:n,...d}=a,u={...d,id:a.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsx(e.SemaphorContextProvider,{dashboardProps:u,children:t.jsx(e.UXProvider,{children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:n,children:t.jsx(e.Container,{type:"visual",...u,children:t.jsx(S,{cardId:a.cardId})})})})})})}function S({cardId:a}){const n=e.useDashboardStore(o=>{var s;return(s=o.dashboard)==null?void 0:s.sheets}),{card:d,frame:u}=h.useMemo(()=>{const o=n==null?void 0:n.flatMap(r=>r.frames),s=o==null?void 0:o.flatMap(r=>r==null?void 0:r.cards),c=s==null?void 0:s.find(r=>(r==null?void 0:r.id)===a),M=o==null?void 0:o.find(r=>{var l;return(l=r==null?void 0:r.cards)==null?void 0:l.find(Y=>(Y==null?void 0:Y.id)===a)});return{card:c,frame:M}},[n,a]);return!d||!u?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:o,resetErrorBoundary:s})=>t.jsx(e.FallbackVisual,{error:o,resetErrorBoundary:s,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:d,frame:u})})})}const b=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];var D=(a=>(a.SUBTOTAL="__SUBTOTAL__",a.TOTAL="__TOTAL__",a.ALL="__ALL__",a))(D||{});exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=C.EMPTY_SELECTION;exports.ResourceManagementPanel=i.ResourceManagementPanel;exports.ScheduleDashboard=i.ScheduleDashboard;exports.SelectComponent=i.SelectComponent;exports.Surfboard=i.DashboardPlus;exports.cleanCard=i.cleanCard;exports.getDashbaordStateWithoutData=i.getDashbaordStateWithoutData;exports.DATE_FORMAT_VALUES=b;exports.PivotMarkerEnum=D;exports.Visual=T;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as l, F as c, S as f, U as h, a as p, C as m, u as C, b as u, c as T } from "./chunks/index-
|
|
2
|
-
import { D as L, h as k, f as Q, f as w, r as B, j as N, l as O, t as W, s as U, x as V, y as q, q as I, i as G, p as H, v as R, o as j, n as z, m as J, z as K, w as X, g as $, B as Z, H as aa, G as ea, I as sa, k as ra, d as oa, K as ta, A as Ya, J as na, e as ia } from "./chunks/index-
|
|
1
|
+
import { E as l, F as c, S as f, U as h, a as p, C as m, u as C, b as u, c as T } from "./chunks/index-CUoUHwg-.js";
|
|
2
|
+
import { D as L, h as k, f as Q, f as w, r as B, j as N, l as O, t as W, s as U, x as V, y as q, q as I, i as G, p as H, v as R, o as j, n as z, m as J, z as K, w as X, g as $, B as Z, H as aa, G as ea, I as sa, k as ra, d as oa, K as ta, A as Ya, J as na, e as ia } from "./chunks/index-CUoUHwg-.js";
|
|
3
3
|
import { EMPTY_SELECTION as ua } from "./types/index.js";
|
|
4
|
-
import { R as Ma, S as Da, a as ca, D as fa, c as ha, g as pa } from "./chunks/dashboard-plus-
|
|
4
|
+
import { R as Ma, S as Da, a as ca, D as fa, c as ha, g as pa } from "./chunks/dashboard-plus-D4ui9-zt.js";
|
|
5
5
|
import { jsx as s } from "react/jsx-runtime";
|
|
6
6
|
import { useMemo as b } from "react";
|
|
7
7
|
import "react-dom";
|
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-plus-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-plus-COAXbMNB.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
|
package/dist/surfboard/index.js
CHANGED