@petercjl/omni-desktop-app 0.1.5 → 0.1.6
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/app/assets/CartesianChart-BLyO9U-C.js +33 -0
- package/app/assets/EmptyState-Cgx7dIy3.js +1 -0
- package/app/assets/{EvidenceSourceGuide-CEmQ3sdi.js → EvidenceSourceGuide-BqwES_45.js} +1 -1
- package/app/assets/Favorites-JpOkiZFS.js +1 -0
- package/app/assets/{HelpTip-BcLBMmZW.js → HelpTip-DgowTr-K.js} +1 -1
- package/app/assets/LineChart-BOoSfV72.js +4 -0
- package/app/assets/ShopLayoutPage-BPjWnPjn.css +1 -0
- package/app/assets/ShopLayoutPage-xv0PhUXv.js +1 -0
- package/app/assets/TrendChart-ozEGn1ai.js +1 -0
- package/app/assets/api-DTsZ_OeY.js +1 -0
- package/app/assets/arrow-right-DMEu-HBO.js +1 -0
- package/app/assets/arrow-up-right-Bi_SzYu1.js +1 -0
- package/app/assets/{chart-column-Dlmnr1y9.js → chart-column-x5fvXs9m.js} +1 -1
- package/app/assets/{check-QN7RSzdG.js → check-qCcwSYDE.js} +1 -1
- package/app/assets/chevron-down-p3oUrcsv.js +1 -0
- package/app/assets/chevron-right-DqmFJybY.js +1 -0
- package/app/assets/clock-3-BThph9Fd.js +1 -0
- package/app/assets/components-BVWswT0B.js +2 -0
- package/app/assets/create-intent-9uYVhJHt.js +1 -0
- package/app/assets/{demand-planning-client-DzZj_Q__.js → demand-planning-client-cRvN3aET.js} +4 -4
- package/app/assets/{download-D5rXx5AI.js → download-DYUXwy45.js} +1 -1
- package/app/assets/{entry-CKQSyMns.js → entry-BXB2Nzyc.js} +2 -2
- package/app/assets/entry-BxaHKvMx.js +2 -0
- package/app/assets/entry-C3TFTQrn.js +1 -0
- package/app/assets/entry-Crfux-R-.js +1 -0
- package/app/assets/entry-DHP4cb-p.css +1 -0
- package/app/assets/entry-DQpz8kvM.js +58 -0
- package/app/assets/entry-WYptT5dv.js +2 -0
- package/app/assets/file-text-BE0hF4rH.js +1 -0
- package/app/assets/{flag-Dtu8lW8f.js → flag-DspBXBR4.js} +1 -1
- package/app/assets/format-BCxMsVJh.js +1 -0
- package/app/assets/{git-branch-Cv69GSy-.js → git-branch-BAJikW8Q.js} +1 -1
- package/app/assets/graphicalItemSelectors-DGWLDzMl.js +1 -0
- package/app/assets/grid-2x2-lULFcGs7.js +1 -0
- package/app/assets/index-7NKGenq7.css +1 -0
- package/app/assets/{index-CDS2fIqN.js → index-Cez2mr3h.js} +2 -2
- package/app/assets/{layers-BaGSABxV.js → layers-shcwXKIH.js} +1 -1
- package/app/assets/link-2-BlbKNthn.js +1 -0
- package/app/assets/list-CrDQ8uHL.js +1 -0
- package/app/assets/market-B2oImfqS.css +1 -0
- package/app/assets/market.module-vHIsXpQH.js +1 -0
- package/app/assets/module-host-CyMfvPpR.js +1 -0
- package/app/assets/pin-C4E_u351.js +1 -0
- package/app/assets/play-D07b6r1X.js +1 -0
- package/app/assets/plus-iTTlNMxD.js +1 -0
- package/app/assets/products-fIIO39ry.js +1 -0
- package/app/assets/project-airtight-canisters-LLndxxjI.jpg +0 -0
- package/app/assets/project-collaboration-travel-bag-BB2ARGd7.jpg +0 -0
- package/app/assets/project-cutting-board-CeIWMQLS.jpg +0 -0
- package/app/assets/project-desktop-cable-clips-DdPGOqI8.jpg +0 -0
- package/app/assets/project-double-11-thermos-D7tzhW-B.jpg +0 -0
- package/app/assets/project-drinking-glass-D8H-30yp.jpg +0 -0
- package/app/assets/{project-execution-VeMKoL0M.js → project-execution-DMEIpSz3.js} +1 -1
- package/app/assets/project-foldable-storage-crate-DlZP-j-z.jpg +0 -0
- package/app/assets/project-microfiber-cloths-Dda9f7He.jpg +0 -0
- package/app/assets/project-portable-blender-CLylHN-m.jpg +0 -0
- package/app/assets/project-public-4Gjaxeyh.js +1 -0
- package/app/assets/{project-public-D9ifVghn.js → project-public-DCJ5Ry0f.js} +4 -4
- package/app/assets/{project-public-D9qvuaHV.js → project-public-tKjd5rma.js} +1 -1
- package/app/assets/project-scented-candle-CDVqTvgw.jpg +0 -0
- package/app/assets/project-silicone-baking-mat-DUDDE63y.jpg +0 -0
- package/app/assets/project-tissue-box-DkxE74G5.jpg +0 -0
- package/app/assets/project-travel-bag-DWCGqkcM.png +0 -0
- package/app/assets/project-travel-bottles-CgRJiJGs.jpg +0 -0
- package/app/assets/project-tumbler-D2BmTnok.png +0 -0
- package/app/assets/public-BlU5YmdO.js +1 -0
- package/app/assets/{refresh-cw-OG4-Ic4x.js → refresh-cw-C_4G0Mri.js} +1 -1
- package/app/assets/search-CUzSX_06.js +1 -0
- package/app/assets/ui-public-9lmhhAop.js +1 -0
- package/app/assets/use-favorites-BOjIArhk.js +1 -0
- package/app/assets/use-favorites-_eKBQGeF.css +1 -0
- package/app/assets/{use-workspace-query-Csm4EkUU.js → use-workspace-query-C-vrOrvK.js} +1 -1
- package/app/assets/workbench-13XxpUuA.css +1 -0
- package/app/assets/workbench-BMO5cSO0.js +2 -0
- package/app/assets/{workspace-view-state-C1Tia7X4.js → workspace-view-state-CRfq5jgZ.js} +1 -1
- package/app/index.html +2 -2
- package/package.json +1 -1
- package/release.json +1 -1
- package/release.sig +1 -1
- package/app/assets/Directory-D0rZfh_1.js +0 -1
- package/app/assets/EmptyState-COLCkhZs.js +0 -1
- package/app/assets/LineChart-DC_iIB4m.js +0 -36
- package/app/assets/arrow-right-Bsei-31a.js +0 -1
- package/app/assets/arrow-up-right-CqmbLgtN.js +0 -1
- package/app/assets/chevron-down-BoU_rWJ-.js +0 -1
- package/app/assets/chevron-left-D1Tjivki.js +0 -1
- package/app/assets/chevron-right-CGVsdWp6.js +0 -1
- package/app/assets/clock-3-B99KnTzW.js +0 -1
- package/app/assets/entry-B68pyhTH.js +0 -2
- package/app/assets/entry-BzQWDj9a.css +0 -1
- package/app/assets/entry-CxmvXNMW.js +0 -1
- package/app/assets/entry-DMn_VQx0.js +0 -2
- package/app/assets/entry-DzUnM_Wl.js +0 -1
- package/app/assets/entry-h5lCV6qJ.js +0 -1
- package/app/assets/index-DYn6t59z.css +0 -1
- package/app/assets/module-host-BzwOcfIf.js +0 -1
- package/app/assets/play-DaJyx8oA.js +0 -1
- package/app/assets/plus-D0cC0DpO.js +0 -1
- package/app/assets/products-BxcSNL_f.js +0 -1
- package/app/assets/project-public-DxYr-zt5.js +0 -1
- package/app/assets/public-DTqkVQos.js +0 -1
- package/app/assets/search-I3gdKVV9.js +0 -1
- package/app/assets/ui-public-BJV7qMHh.js +0 -2
- package/app/assets/workbench-BeiscSvD.js +0 -2
- package/app/assets/workbench-CrImV0L7.css +0 -1
- /package/app/assets/{activity-Cj90ZCJa.js → activity-BV0UMcx6.js} +0 -0
- /package/app/assets/{Directory-ZWl5yZd5.css → create-intent-ZWl5yZd5.css} +0 -0
- /package/app/assets/{group-B6vAoX5c.js → group-eZxxe_Hb.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./index-CDS2fIqN.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./index-CDS2fIqN.js";var t=e(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./index-CDS2fIqN.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./index-CDS2fIqN.js";var t=e(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./index-CDS2fIqN.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./index-CDS2fIqN.js";var t=e(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]);export{t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./project-public-D9ifVghn.js","./index-CDS2fIqN.js","./index-DYn6t59z.css","./arrow-up-right-CqmbLgtN.js","./chevron-left-D1Tjivki.js","./chevron-right-CGVsdWp6.js","./download-D5rXx5AI.js","./plus-D0cC0DpO.js","./search-I3gdKVV9.js","./workspace-view-state-C1Tia7X4.js","./EmptyState-COLCkhZs.js","./layers-BaGSABxV.js","./HelpTip-BcLBMmZW.js","./HelpTip-BsHPhMNf.css","./project-public-IxjCdnaB.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./refresh-cw-OG4-Ic4x.js";import{t}from"./search-I3gdKVV9.js";import{p as n,r,t as i,u as a}from"./index-CDS2fIqN.js";import{n as o}from"./module-host-BzwOcfIf.js";import{n as s}from"./workspace-view-state-C1Tia7X4.js";import"./public-DTqkVQos.js";import{t as c}from"./use-workspace-query-Csm4EkUU.js";var l=n(a(),1);async function u(e){let t=await e(`/growth-center?view=catalog`);if(!t||typeof t!=`object`||!(`catalog`in t)||!Array.isArray(t.catalog)||!(`updatedAt`in t)||typeof t.updatedAt!=`string`)throw Error(`资料目录格式异常,请刷新重试`);if(!t.catalog.every(e=>e&&typeof e.id==`string`&&typeof e.project==`string`&&typeof e.title==`string`&&typeof e.created==`string`&&typeof e.mode==`string`))throw Error(`资料目录记录不完整`);return t}var d=r();function f(){let{api:n,onOpen:r}=o(),{data:i,error:a,busy:f,refresh:p}=c((0,l.useCallback)(()=>u(n),[n])),[m,h]=s(`resources.scope`,`real`),[g,_]=s(`resources.query`,``),v=(i?.catalog||[]).filter(e=>m===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`),y=[...v].reverse().filter(e=>`${e.title} ${e.projectName} ${e.source}`.toLowerCase().includes(g.toLowerCase())),b={simulated:`模拟数据`,"declared-real":`来源标注真实`,unverified:`来源待核实`};return(0,d.jsx)(`div`,{className:`resources-module gw`,children:(0,d.jsxs)(`div`,{className:`gw-body`,children:[(0,d.jsxs)(`header`,{className:`gw-header`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`small`,{children:`工作台 / 数据中心`}),(0,d.jsx)(`h1`,{children:`经营数据中心`})]}),(0,d.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`i`,{className:`gw-dot`}),m===`stored-demo`?`模拟归档 · 非真实经营`:`归档数据 · 非实时`]}),(0,d.jsxs)(`button`,{onClick:()=>p(),disabled:f,children:[(0,d.jsx)(e,{size:14}),f?`读取中`:`刷新数据`]})]})]}),(0,d.jsxs)(`div`,{className:`gw-scope`,children:[(0,d.jsx)(`div`,{children:[[`real`,`非模拟资料`],[`stored-demo`,`模拟资料`]].map(([e,t])=>(0,d.jsx)(`button`,{"aria-pressed":m===e,onClick:()=>h(e),children:t},e))}),(0,d.jsx)(`span`,{children:i?`${new Date(i.updatedAt).toLocaleString(`zh-CN`)} 读取归档`:`正在读取归档…`})]}),a&&(0,d.jsxs)(`p`,{role:`alert`,className:`gw-message`,children:[a,` `,(0,d.jsx)(`button`,{onClick:()=>p(),children:`重试`})]}),(0,d.jsxs)(`section`,{className:`gw-panel`,children:[(0,d.jsxs)(`div`,{className:`gw-section-title`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`h2`,{children:`数据资产目录`}),(0,d.jsx)(`p`,{children:`按项目保存原件,每份资料都有来源和日期。`})]}),(0,d.jsxs)(`span`,{children:[v.length,` 个数据集`]})]}),(0,d.jsx)(`div`,{className:`gw-filters`,children:(0,d.jsxs)(`label`,{children:[(0,d.jsx)(t,{size:14}),(0,d.jsx)(`input`,{"aria-label":`搜索经营数据集`,value:g,onChange:e=>_(e.target.value),placeholder:`搜索数据集、项目或来源`})]})}),(0,d.jsx)(`div`,{className:`gw-table-scroll`,children:(0,d.jsxs)(`table`,{children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{children:[(0,d.jsx)(`th`,{children:`数据集`}),(0,d.jsx)(`th`,{children:`所属项目`}),(0,d.jsx)(`th`,{children:`统计时间`}),(0,d.jsx)(`th`,{children:`数据状态`}),(0,d.jsx)(`th`,{children:`记录数`}),(0,d.jsx)(`th`,{children:`查看`})]})}),(0,d.jsx)(`tbody`,{children:y.map(e=>(0,d.jsxs)(`tr`,{children:[(0,d.jsxs)(`td`,{children:[(0,d.jsx)(`b`,{children:e.title}),(0,d.jsx)(`small`,{children:e.source||`未提供来源`})]}),(0,d.jsx)(`td`,{children:e.projectName}),(0,d.jsxs)(`td`,{children:[e.period||`未标注统计窗口`,(0,d.jsxs)(`small`,{children:[`归档 `,e.created.slice(0,10)]})]}),(0,d.jsx)(`td`,{children:b[e.mode]}),(0,d.jsx)(`td`,{children:e.rowCount}),(0,d.jsxs)(`td`,{children:[(0,d.jsx)(`a`,{href:`/api/workbench/`+e.project+`/file/`+e.id,children:`原件`}),(0,d.jsx)(`button`,{onClick:()=>r(e.project,{tab:`data`,datasetId:e.id}),children:`项目数据`})]})]},e.id))})]})}),!y.length&&!a&&(0,d.jsx)(`p`,{role:`status`,children:f?`正在读取资料…`:g?`没有匹配的数据集,请调整搜索。`:`当前资料范围没有数据集。`})]})]})})}var p=(0,l.lazy)(()=>i(()=>import(`./project-public-D9ifVghn.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url));function m({section:e,project:t}){return t?(0,d.jsx)(l.Suspense,{fallback:(0,d.jsx)(`p`,{role:`status`,children:`正在打开项目资料…`}),children:(0,d.jsx)(p,{section:e,project:t})}):(0,d.jsx)(f,{})}export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_8zwrx_1{--omni-category-leaf-tint:#6fb9ad;--omni-category-branch-tint:#7494bf;box-sizing:border-box;background:var(--omni-paint-surface-0a1524,#0a1524);min-width:0;min-height:100vh;color:var(--omni-paint-ink-dbe8f5,#dbe8f5);padding:20px 24px 28px;font:13px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,sans-serif;display:block;container-type:inline-size}._page_8zwrx_1 *{box-sizing:border-box}._page_8zwrx_1 button,._page_8zwrx_1 input,._page_8zwrx_1 select{font:inherit;color:inherit;border:1px solid var(--omni-paint-line-30465e,#30465e);background:var(--omni-paint-surface-102239,#102239);border-radius:5px;width:auto;min-width:0;margin:0;padding:6px 10px}._page_8zwrx_1 button{cursor:pointer;justify-content:center;align-items:center;gap:5px;display:inline-flex}._page_8zwrx_1 button:hover{background:var(--omni-paint-surface-193852,#193852);border-color:var(--omni-paint-line-4b92b9,#4b92b9)}._page_8zwrx_1 button:disabled{opacity:.32;cursor:default}._page_8zwrx_1 button:focus-visible,._page_8zwrx_1 a:focus-visible,._page_8zwrx_1 summary:focus-visible,._page_8zwrx_1 input:focus-visible,._page_8zwrx_1 select:focus-visible{outline:2px solid var(--omni-paint-line-60d2f6,#60d2f6);outline-offset:2px}._page_8zwrx_1 a{color:var(--omni-paint-ink-69c9f1,#69c9f1);text-decoration:none}._page_8zwrx_1 a:hover{text-decoration:underline}._page_8zwrx_1 ._primary_8zwrx_69{background:var(--omni-paint-surface-187da7,#187da7);border-color:var(--omni-paint-line-298fac,#298fac);color:var(--omni-paint-ink-f1fbff,#f1fbff)}._stickyHeader_8zwrx_74{top:var(--workspace-sticky-top,0px);z-index:30;background:var(--omni-paint-surface-0a1524,#0a1524);border-bottom:1px solid var(--omni-paint-line-263d55,#263d55);margin:-8px -24px 0;padding:8px 24px;position:sticky}._stickyHeader_8zwrx_74 ._breadcrumb_8zwrx_83{margin-bottom:6px}._stickyHeader_8zwrx_74 ._filterBar_8zwrx_86{gap:8px 16px;margin-bottom:0}._stickyHeader_8zwrx_74 ._tabs_8zwrx_90{border:0;gap:18px;margin:0 0 0 12px;padding:0}._page_8zwrx_1 ._stickyHeader_8zwrx_74 ._tabs_8zwrx_90 button{white-space:nowrap;padding:6px 0}._breadcrumb_8zwrx_83{min-height:24px;color:var(--omni-paint-ink-829ab3,#829ab3);border:0;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:9px;margin-bottom:23px;padding:0;font-size:12px;display:flex}._breadcrumb_8zwrx_83>a{color:var(--omni-paint-ink-91a8be,#91a8be)}._breadcrumb_8zwrx_83>span{align-items:center;gap:8px;display:inline-flex}._page_8zwrx_1 ._breadcrumb_8zwrx_83 button{color:var(--omni-paint-ink-93abc0,#93abc0);background:0 0;border:0;padding:0}._filterBar_8zwrx_86{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:15px;margin-bottom:15px;display:flex}._categoryControl_8zwrx_135,._dateControl_8zwrx_136{align-items:center;gap:8px;display:flex}._categoryControl_8zwrx_135{min-width:0}._count_8zwrx_144{white-space:nowrap;color:var(--omni-paint-ink-74c8ec,#74c8ec);background:var(--omni-paint-surface-112d43,#112d43);border:1px solid var(--omni-paint-line-2a6386,#2a6386);border-radius:3px;padding:2px 6px;font-size:11px}._dateControl_8zwrx_136{flex-wrap:wrap;justify-content:flex-end;margin-left:auto;font-size:12px}._period_8zwrx_159{color:var(--omni-paint-ink-6e87a0,#6e87a0);margin-right:10px;font-size:11px}._page_8zwrx_1 ._yearButton_8zwrx_164{color:var(--omni-paint-ink-9dbcd7,#9dbcd7);background:0 0;border:0;padding:5px}._page_8zwrx_1 ._yearButton_8zwrx_164[aria-pressed=true]{color:var(--omni-paint-ink-61d3f7,#61d3f7);font-weight:600}._dateControl_8zwrx_136 select{color:var(--omni-paint-ink-65ccf0,#65ccf0);background:0 0;border:0;max-width:150px;padding:6px;font-weight:600}._dateControl_8zwrx_136>button:not(._yearButton_8zwrx_164){background:var(--omni-paint-surface-14273c,#14273c);border:0;padding:5px}._segment_8zwrx_187{background:var(--omni-paint-surface-101f32,#101f32);border:1px solid var(--omni-paint-line-283e56,#283e56);border-radius:5px;align-items:center;gap:0;padding:2px;display:flex}._segment_8zwrx_187 button{color:var(--omni-paint-ink-7e97b0,#7e97b0);background:0 0;border:0;padding:5px 11px;font-size:12px}._page_8zwrx_1 ._segment_8zwrx_187 button[aria-pressed=true]{background:var(--omni-paint-surface-1b3b55,#1b3b55);color:var(--omni-paint-ink-a6e7fc,#a6e7fc);box-shadow:0 1px 3px var(--omni-paint-shadow-020b1633,#020b1633)}._dateControl_8zwrx_136 ._segment_8zwrx_187{margin-left:10px}._message_8zwrx_211{color:var(--omni-paint-ink-b8d8ea,#b8d8ea);border:1px solid var(--omni-paint-line-345b72,#345b72);background:var(--omni-paint-surface-133049,#133049);border-radius:5px;justify-content:space-between;align-items:center;margin-bottom:10px;padding:8px 12px;display:flex}._page_8zwrx_1 ._message_8zwrx_211 button{background:0 0;border:0;padding:0 5px}._categoryList_8zwrx_227{min-width:0;overflow-x:auto}._categoryLegend_8zwrx_231,._categoryLegend_8zwrx_231>span{align-items:center;gap:5px;display:flex}._categoryLegend_8zwrx_231{color:var(--omni-paint-ink-829ab3,#829ab3);white-space:nowrap;gap:10px;font-size:10px}._categoryLegend_8zwrx_231 i{opacity:.8;background:var(--omni-category-branch-tint);border-radius:2px;width:7px;height:7px}._categoryLegend_8zwrx_231 i[data-leaf=true]{background:var(--omni-category-leaf-tint)}._categoryHeaders_8zwrx_253,._categoryRows_8zwrx_254{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:16px;min-width:1020px;display:grid}._categoryHeaders_8zwrx_253{background:var(--omni-paint-surface-0a1524,#0a1524);z-index:1;margin-bottom:8px;position:sticky;top:0}._categoryHeaders_8zwrx_253>div,._categoryRow_8zwrx_254{grid-template-columns:minmax(90px,1fr) 72px 58px 48px 22px;align-items:center;gap:5px;display:grid;position:relative}._categoryHeaders_8zwrx_253>div{color:var(--omni-paint-ink-718ca6,#718ca6);padding:7px 8px;font-size:11px}._categoryHeaders_8zwrx_253 span:not(:first-child){text-align:right}._categoryRows_8zwrx_254{row-gap:12px}._categoryRow_8zwrx_254{border:1px solid var(--omni-paint-line-29425b,#29425b);background:var(--omni-paint-surface-102239,#102239);border-radius:4px;min-height:54px;padding:8px;transition:background .15s}._categoryRow_8zwrx_254:hover,._categoryRow_8zwrx_254:focus-within{background:var(--omni-paint-surface-153049,#153049);border-color:var(--omni-paint-line-397391,#397391)}._categoryRow_8zwrx_254[data-leaf=false]{background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border-inline-start:2px solid color-mix(in srgb, var(--omni-line,var(--omni-paint-line-2c435b,#2c435b)) 75%, var(--omni-category-branch-tint))}._categoryRow_8zwrx_254[data-leaf=true]{background:color-mix(in srgb, var(--omni-panel,var(--omni-paint-surface-102235,#102235)) 90%, var(--omni-category-leaf-tint));border-inline-start:2px solid color-mix(in srgb, var(--omni-line,var(--omni-paint-line-2c435b,#2c435b)) 55%, var(--omni-category-leaf-tint))}._categoryRow_8zwrx_254:is(:hover,:focus-within){background:color-mix(in srgb, var(--omni-panel,var(--omni-paint-surface-102235,#102235)) 85%, var(--omni-accent,var(--omni-paint-surface-61d3df,#61d3df)))}._categoryName_8zwrx_328{flex-wrap:wrap;align-items:center;gap:6px;min-width:0;display:flex;position:relative}._page_8zwrx_1 ._categoryOpen_8zwrx_336,._page_8zwrx_1 ._categoryOpen_8zwrx_336:hover{z-index:1;background:0 0;border:0;width:100%;height:100%;padding:0;position:absolute;inset:0}._categoryRow_8zwrx_254>button:not(._categoryOpen_8zwrx_336){z-index:2;position:relative}._page_8zwrx_1 ._categoryName_8zwrx_328>span{text-align:left;min-width:0;color:var(--omni-paint-ink-d5e6f5,#d5e6f5);background:0 0;border:0;flex:90px;justify-content:flex-start;align-items:center;gap:5px;padding:0;font-size:12px;display:flex}._categoryName_8zwrx_328>span>svg{vertical-align:middle;flex-shrink:0;margin-left:4px;display:inline-block}._page_8zwrx_1 ._categoryName_8zwrx_328>span{white-space:normal;overflow-wrap:anywhere;display:block}._categoryRow_8zwrx_254:hover ._categoryName_8zwrx_328>span{color:var(--omni-paint-ink-78d6f6,#78d6f6)}._categoryRow_8zwrx_254>strong{color:var(--omni-paint-ink-70cfff,#70cfff);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;font-size:12px;font-weight:500}._categoryRow_8zwrx_254>span{text-align:right;color:var(--omni-paint-ink-9cb5cc,#9cb5cc);font-variant-numeric:tabular-nums;font-size:11px}._page_8zwrx_1 ._iconButton_8zwrx_393{color:var(--omni-paint-ink-688ba8,#688ba8);background:0 0;border:0;padding:3px}._page_8zwrx_1 ._iconButton_8zwrx_393[aria-pressed=true]{color:var(--omni-paint-ink-68d3f4,#68d3f4)}._rowActions_8zwrx_402{z-index:3;flex-shrink:0;gap:5px;min-height:22px;margin:0;display:none;position:relative}._categoryRow_8zwrx_254:is(:hover,:focus-within) ._rowActions_8zwrx_402{display:flex}._page_8zwrx_1 ._rowActions_8zwrx_402>button{background:var(--omni-paint-surface-1c3c56,#1c3c56);border-color:var(--omni-paint-line-335a73,#335a73);min-height:22px;color:var(--omni-paint-ink-89cae7,#89cae7);border-radius:3px;padding:2px 6px;font-size:10px;line-height:1.4}._tabs_8zwrx_90{border-bottom:1px solid var(--omni-paint-line-263d55,#263d55);align-items:center;gap:28px;margin:8px -24px 0;padding:0 24px;display:flex}._page_8zwrx_1 ._tabs_8zwrx_90 button{color:var(--omni-paint-ink-9fb3c7,#9fb3c7);background:0 0;border:0;border-bottom:2px solid #0000;border-radius:0;padding:13px 0 12px;font-size:13px}._page_8zwrx_1 ._tabs_8zwrx_90 button[aria-selected=true]{border-bottom-color:var(--omni-paint-line-47c5ee,#47c5ee);color:var(--omni-paint-ink-75d6f5,#75d6f5)}._toolbar_8zwrx_445{flex-wrap:wrap;align-items:center;gap:12px;padding:8px 0;display:flex}._toolbar_8zwrx_445>button{font-size:12px}._search_8zwrx_455{border:1px solid var(--omni-paint-line-30465e,#30465e);background:var(--omni-paint-surface-0d1d30,#0d1d30);min-height:33px;color:var(--omni-paint-ink-6e8fa9,#6e8fa9);border-radius:4px;align-items:center;gap:7px;display:flex}._search_8zwrx_455>span{border-right:1px solid var(--omni-paint-line-30465e,#30465e);color:var(--omni-paint-ink-adc4d9,#adc4d9);padding:6px 10px}._search_8zwrx_455>svg{flex-shrink:0;margin-left:10px}._page_8zwrx_1 ._search_8zwrx_455 input{background:0 0;border:0;width:270px;min-width:0;padding:6px 8px;font-size:12px}._page_8zwrx_1 input::placeholder{color:var(--omni-paint-ink-526d87,#526d87)}._price_8zwrx_485{color:var(--omni-paint-ink-91abc4,#91abc4);align-items:center;gap:7px;font-size:12px;display:flex}._price_8zwrx_485 label{border:1px solid var(--omni-paint-line-30465e,#30465e);border-radius:4px;align-items:center;gap:0;padding-right:8px;display:flex}._page_8zwrx_1 ._price_8zwrx_485 input{background:0 0;border:0;width:66px;padding:6px 8px}._toolbar_8zwrx_445>._segment_8zwrx_187{margin-left:auto}._page_8zwrx_1 ._configButton_8zwrx_509{color:var(--omni-paint-ink-cce3f4,#cce3f4);border-color:var(--omni-paint-line-6185a1,#6185a1);margin-left:auto}._toolbar_8zwrx_445>._segment_8zwrx_187+._configButton_8zwrx_509{margin-left:0}._tableScroll_8zwrx_517{border:1px solid var(--omni-paint-line-233d55,#233d55);background:var(--omni-paint-surface-0d1e31,#0d1e31);scrollbar-color:var(--omni-paint-ink-375572,#375572) var(--omni-paint-ink-102138,#102138);min-height:260px;overflow:auto}._page_8zwrx_1 table{border-collapse:separate;border-spacing:0;text-align:left;white-space:nowrap;width:100%;font-size:12px}._page_8zwrx_1 th{background:var(--omni-paint-surface-162b40,#162b40);color:var(--omni-paint-ink-a8bfd4,#a8bfd4);border-bottom:1px solid var(--omni-paint-line-334c65,#334c65);z-index:1;padding:10px 12px;font-size:11px;font-weight:550;position:sticky;top:0}._page_8zwrx_1 th button{color:inherit;background:0 0;border:0;justify-content:space-between;width:100%;min-width:80px;padding:0;font-size:11px}._page_8zwrx_1 td{border-bottom:1px solid var(--omni-paint-line-22384e,#22384e);color:var(--omni-paint-ink-acc1d4,#acc1d4);vertical-align:middle;font-variant-numeric:tabular-nums;padding:10px 12px}._page_8zwrx_1 tr:hover td{background:var(--omni-paint-surface-132b41,#132b41)}._sort_8zwrx_563{color:var(--omni-paint-ink-4b6782,#4b6782);margin-left:15px}._activeSort_8zwrx_567{color:var(--omni-paint-accent-6acdf7,#6acdf7);margin-left:15px}._productTable_8zwrx_571{min-width:2200px}._shopTable_8zwrx_574{min-width:2100px}._productTable_8zwrx_571 th:first-child,._shopTable_8zwrx_574 th:first-child{min-width:55px}._productTable_8zwrx_571 th:nth-child(2){width:300px;min-width:300px}._shopTable_8zwrx_574 th:nth-child(2){min-width:150px}._shopTable_8zwrx_574 th:nth-child(3){width:250px;min-width:250px}._shopName_8zwrx_592{text-overflow:ellipsis;min-width:170px;max-width:270px;overflow:hidden}._sales_8zwrx_598{background:var(--omni-paint-surface-10263c,#10263c);color:var(--omni-paint-ink-a2d7f2,#a2d7f2)!important}._identity_8zwrx_602{align-items:center;gap:9px;min-width:240px;max-width:300px;display:flex}._identity_8zwrx_602>a{flex-shrink:0}._identity_8zwrx_602 img,._noImage_8zwrx_613{object-fit:contain;border-radius:3px;width:42px;height:42px}._noImage_8zwrx_613{background:var(--omni-paint-surface-18344b,#18344b);color:var(--omni-paint-ink-507b99,#507b99);flex-shrink:0;justify-content:center;align-items:center;display:flex}._identity_8zwrx_602>div{flex:1;min-width:0}._page_8zwrx_1 ._productTitle_8zwrx_631{-webkit-line-clamp:2;white-space:normal;color:var(--omni-paint-ink-6ecdf4,#6ecdf4);text-align:left;cursor:pointer;background:0 0;border:0;-webkit-box-orient:vertical;max-width:250px;padding:0;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}._identity_8zwrx_602 small{color:var(--omni-paint-ink-6d8ba7,#6d8ba7);white-space:nowrap;align-items:center;gap:5px;margin-top:4px;font-size:10px;display:flex}._page_8zwrx_1 ._copyButton_8zwrx_656{background:var(--omni-paint-surface-1b344a,#1b344a);color:var(--omni-paint-ink-91b3cc,#91b3cc);border:0;border-radius:2px;padding:2px 3px}._shopId_8zwrx_663{align-items:center;gap:6px;font-size:11px;display:flex}._page_8zwrx_1 ._linkButton_8zwrx_669{color:var(--omni-paint-ink-85bfdd,#85bfdd);background:0 0;border:0;padding:2px 0;font-size:12px}._anomaly_8zwrx_676{color:var(--omni-paint-ink-f3b583,#f3b583)}._pagination_8zwrx_679{color:var(--omni-paint-ink-7f9ab3,#7f9ab3);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:15px;padding:16px 0 8px;font-size:11px;display:flex}._pagination_8zwrx_679>div{flex-wrap:wrap;align-items:center;gap:7px;display:flex}._pagination_8zwrx_679 button{background:0 0;border-color:#0000;min-width:29px;padding:5px 9px}._pagination_8zwrx_679 button[aria-current=page]{color:var(--omni-paint-accent-70d0f5,#70d0f5);border-color:var(--omni-paint-line-3a94bb,#3a94bb);background:var(--omni-paint-surface-16364d,#16364d)}._pagination_8zwrx_679 select{padding:5px 8px;font-size:11px}._pagination_8zwrx_679 label{align-items:center;gap:7px;display:flex}._pagination_8zwrx_679 input{width:50px;padding:5px}._ellipsis_8zwrx_719{color:var(--omni-paint-ink-546f88,#546f88);margin:0 9px}._notice_8zwrx_723{color:var(--omni-paint-ink-bcae88,#bcae88);background:var(--omni-paint-surface-2b281f,#2b281f);border:1px solid var(--omni-paint-line-5b4d31,#5b4d31);border-radius:4px;margin:12px 0;padding:9px 12px;font-size:11px;line-height:1.7}._sources_8zwrx_733{color:var(--omni-paint-ink-647f98,#647f98);margin-top:18px;font-size:11px;line-height:1.9}._sources_8zwrx_733 summary{cursor:pointer;width:fit-content;color:var(--omni-paint-ink-86a6c0,#86a6c0);align-items:center;gap:5px;display:flex}._sources_8zwrx_733 p{overflow-wrap:anywhere}._empty_8zwrx_750{text-align:center;color:var(--omni-paint-ink-7f9bb4,#7f9bb4);white-space:normal;padding:45px 20px;font-size:12px}._emptyState_8zwrx_757{text-align:center;border:1px solid var(--omni-paint-line-28455f,#28455f);background:var(--omni-paint-surface-0d2135,#0d2135);border-radius:8px;margin-top:24px;padding:100px 20px}._emptyState_8zwrx_757>svg{color:var(--omni-paint-ink-5db3d6,#5db3d6)}._emptyState_8zwrx_757 h2{font-size:18px;font-weight:550}._emptyState_8zwrx_757 p{color:var(--omni-paint-ink-7899b5,#7899b5);font-size:12px}._emptyState_8zwrx_757 button{margin-top:15px}._seasonBoard_8zwrx_779{overflow:auto}._seasonBoard_8zwrx_779 td:first-child{min-width:200px}._hot_8zwrx_785,._cold_8zwrx_786,._neutral_8zwrx_787{text-align:center;border-radius:6px;padding:12px 20px;display:block}._hot_8zwrx_785{background:var(--omni-paint-surface-633c31,#633c31);color:var(--omni-paint-ink-f2c0ab,#f2c0ab)}._cold_8zwrx_786{background:var(--omni-paint-surface-1d4778,#1d4778);color:var(--omni-paint-ink-b0d7ff,#b0d7ff)}._neutral_8zwrx_787{background:var(--omni-paint-surface-2c3a49,#2c3a49);color:var(--omni-paint-ink-b7c9dc,#b7c9dc)}._yearBoards_8zwrx_805{align-items:stretch;gap:16px;min-height:400px;padding-bottom:10px;display:flex;overflow:auto}._yearBoards_8zwrx_805>article{border:1px solid var(--omni-paint-line-29445f,#29445f);background:var(--omni-paint-surface-0d2033,#0d2033);width:420px;min-width:420px}._yearBoards_8zwrx_805 h2{text-align:center;background:var(--omni-paint-surface-142d44,#142d44);z-index:2;margin:0;padding:9px;font-size:13px;font-weight:600;position:sticky;top:0}._yearBoards_8zwrx_805 th{top:37px}._yearBoards_8zwrx_805 ._identity_8zwrx_602{min-width:230px;max-width:250px}._yearBoards_8zwrx_805 ._productTitle_8zwrx_631{-webkit-line-clamp:1}._yearBoards_8zwrx_805 ._identity_8zwrx_602 small{display:none}._yearBoards_8zwrx_805 td>small{color:var(--omni-paint-ink-6384a1,#6384a1);margin-top:3px;font-size:10px;display:block}._productGrid_8zwrx_849{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;padding-right:4px;display:grid;overflow:auto}._productGrid_8zwrx_849 article{border:1px solid var(--omni-paint-line-29455e,#29455e);background:var(--omni-paint-surface-10243a,#10243a);border-radius:5px;min-width:0;padding:12px}._largeImage_8zwrx_863{background:var(--omni-paint-surface-112b40,#112b40);height:180px;color:var(--omni-paint-ink-4c7897,#4c7897);justify-content:center;align-items:center;margin-bottom:10px;display:flex;position:relative}._largeImage_8zwrx_863 img{object-fit:contain;width:100%;height:100%}._largeImage_8zwrx_863>span{background:var(--omni-paint-surface-0a192cba,#0a192cba);color:var(--omni-paint-ink-8bb6d0,#8bb6d0);border-radius:3px;padding:2px 5px;font-size:10px;position:absolute;top:6px;left:6px}._largeImage_8zwrx_863>._iconButton_8zwrx_393{position:absolute;top:5px;right:5px}._productGrid_8zwrx_849 ._identity_8zwrx_602{min-width:0}._productGrid_8zwrx_849 ._identity_8zwrx_602>a,._productGrid_8zwrx_849 ._noImage_8zwrx_613{display:none}._productGrid_8zwrx_849 article>p{color:var(--omni-paint-ink-7094af,#7094af);font-size:11px}._productGrid_8zwrx_849 dl{margin:10px 0;font-size:11px}._productGrid_8zwrx_849 dl>div{border-top:1px solid var(--omni-paint-line-233e55,#233e55);justify-content:space-between;padding:5px 0;display:flex}._page_8zwrx_1 dt{color:var(--omni-paint-ink-7395b0,#7395b0)}._page_8zwrx_1 dd{color:var(--omni-paint-ink-b3cde1,#b3cde1);font-variant-numeric:tabular-nums;margin:0}._productGrid_8zwrx_849 article>button{width:100%;font-size:11px}._picker_8zwrx_926{min-width:180px;max-width:400px;position:relative}._picker_8zwrx_926 summary{cursor:pointer;border:1px solid var(--omni-paint-line-36516b,#36516b);background:var(--omni-paint-surface-10243a,#10243a);border-radius:4px;justify-content:space-between;align-items:center;gap:14px;min-height:33px;padding:6px 10px;font-size:12px;list-style:none;display:flex}._picker_8zwrx_926 summary::-webkit-details-marker{display:none}._picker_8zwrx_926 summary[aria-disabled=true]{opacity:.45;cursor:default}._picker_8zwrx_926 summary>svg{flex-shrink:0}._pickerPanel_8zwrx_955{z-index:10;background:var(--omni-paint-surface-10283e,#10283e);border:1px solid var(--omni-paint-line-3c6381,#3c6381);width:max-content;min-width:300px;max-width:min(900px,100vw - 70px);box-shadow:0 12px 35px var(--omni-paint-shadow-0008,#0008);border-radius:6px;padding:12px;position:absolute;top:40px;left:0}._pickerPanel_8zwrx_955>label{align-items:center;gap:8px;margin-bottom:10px;display:flex}._pickerPanel_8zwrx_955 input{background:var(--omni-paint-surface-0a1b2d,#0a1b2d);width:100%;font-size:12px}._page_8zwrx_1 ._pickerPanel_8zwrx_955>button{color:var(--omni-paint-ink-75c6ed,#75c6ed);background:0 0;border:0;padding:5px 8px;font-size:12px}._cascade_8zwrx_987{max-height:350px;margin-top:6px;display:flex;overflow:auto}._cascade_8zwrx_987>div{border-right:1px solid var(--omni-paint-line-2c4861,#2c4861);width:225px;min-width:225px;max-height:340px;overflow:auto}._cascade_8zwrx_987>div:last-child{border-right:0}._cascade_8zwrx_987>div>div{justify-content:space-between;align-items:center;padding:2px 5px;display:flex}._page_8zwrx_1 ._cascade_8zwrx_987 button{white-space:normal;text-align:left;background:0 0;border:0;justify-content:flex-start;padding:6px;font-size:11px}._cascade_8zwrx_987>div>div>button:first-child{flex:1}._selectedCategory_8zwrx_1021{background:var(--omni-paint-surface-1b405c,#1b405c)}._pickerResults_8zwrx_1024{min-width:300px;max-width:700px;max-height:350px;overflow:auto}._page_8zwrx_1 ._pickerResults_8zwrx_1024 button{text-align:left;background:0 0;border:0;width:100%;font-size:12px;display:block}._dialog_8zwrx_1038{background:var(--omni-paint-surface-10263c,#10263c);border:1px solid var(--omni-paint-line-436987,#436987);width:min(790px,100vw - 30px);max-height:85vh;color:var(--omni-paint-ink-dbeaf8,#dbeaf8);box-shadow:0 25px 80px var(--omni-paint-shadow-0008,#0008);border-radius:10px;margin:auto;padding:22px;position:fixed;inset:0;overflow:auto}._dialog_8zwrx_1038::backdrop{background:var(--omni-paint-overlay-020b15b0,#020b15b0);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}._dialog_8zwrx_1038>header{justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px;display:flex}._dialog_8zwrx_1038 h2{margin:0;font-size:17px;font-weight:550;line-height:1.6}._dialog_8zwrx_1038 h3{color:var(--omni-paint-ink-96b4cc,#96b4cc);margin:12px 0;font-size:12px}._dialog_8zwrx_1038>header button{background:0 0;border:0;padding:2px}._fieldLayout_8zwrx_1079{grid-template-columns:1fr 1.2fr;gap:25px;display:grid}._fieldLayout_8zwrx_1079>section:first-child{border-right:1px solid var(--omni-paint-line-32536d,#32536d);padding-right:20px}._fieldLayout_8zwrx_1079 label{align-items:center;gap:9px;margin:14px 0;font-size:12px;display:flex}._page_8zwrx_1 input[type=checkbox]{accent-color:var(--omni-paint-ink-2caddb,#2caddb)}._fieldTools_8zwrx_1098{color:var(--omni-paint-ink-84a5bf,#84a5bf);align-items:center;gap:8px;font-size:11px;display:flex}._fieldTools_8zwrx_1098>span{margin-right:auto}._fieldTools_8zwrx_1098 button{padding:3px 6px;font-size:10px}._fieldLayout_8zwrx_1079 ol{padding:0;list-style:none}._fieldLayout_8zwrx_1079 li{border:1px solid var(--omni-paint-line-2e526c,#2e526c);background:var(--omni-paint-surface-112d45,#112d45);border-radius:4px;align-items:center;gap:5px;margin:6px 0;padding:7px 9px;font-size:12px;display:flex}._fieldLayout_8zwrx_1079 li>span{margin-right:auto}._fieldLayout_8zwrx_1079 li>button{padding:1px 6px;font-size:11px}._dialogActions_8zwrx_1134{border-top:1px solid var(--omni-paint-line-2e4e68,#2e4e68);justify-content:flex-end;gap:10px;margin-top:22px;padding-top:16px;display:flex}._chart_8zwrx_1142{min-width:0;height:260px;overflow:hidden}._detailScope_8zwrx_1147{color:var(--omni-paint-ink-81a2bd,#81a2bd);overflow-wrap:anywhere;font-size:11px}._detailMetrics_8zwrx_1152{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;font-size:11px;display:grid}._detailMetrics_8zwrx_1152>div{background:var(--omni-paint-surface-0c1e31,#0c1e31);border-radius:5px;padding:12px}._detailMetrics_8zwrx_1152 dd{margin-top:7px;font-size:15px}@media (width<=1500px){._productGrid_8zwrx_849{grid-template-columns:repeat(4,minmax(0,1fr))}._period_8zwrx_159{display:none}._toolbar_8zwrx_445{gap:8px}._search_8zwrx_455 input{width:230px!important}}@media (width<=1050px){._categoryRows_8zwrx_254{row-gap:8px}._categoryRow_8zwrx_254{min-height:61px}._dateControl_8zwrx_136{justify-content:flex-start;margin-left:0}._filterBar_8zwrx_86{gap:12px}._productGrid_8zwrx_849{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width<=650px){._page_8zwrx_1{padding:16px 12px 24px}._stickyHeader_8zwrx_74{margin-left:-12px;margin-right:-12px;padding-left:12px;padding-right:12px}._tabs_8zwrx_90{margin-left:-12px;margin-right:-12px;padding:0 12px}._picker_8zwrx_926{max-width:calc(100vw - 110px)}._categoryName_8zwrx_328>span{font-size:11px!important}._categoryHeaders_8zwrx_253>div{font-size:10px}._categoryRow_8zwrx_254>strong,._categoryRow_8zwrx_254>span{font-size:11px}._dateControl_8zwrx_136{gap:6px}._dateControl_8zwrx_136 ._segment_8zwrx_187{margin-left:0}._search_8zwrx_455{width:100%}._page_8zwrx_1 ._search_8zwrx_455 input{width:100%!important}._toolbar_8zwrx_445>._segment_8zwrx_187{margin-left:auto}._price_8zwrx_485{flex-wrap:wrap}._productGrid_8zwrx_849{grid-template-columns:repeat(2,minmax(0,1fr))}._largeImage_8zwrx_863{height:140px}._pickerPanel_8zwrx_955{min-width:280px;max-width:calc(100vw - 26px)}._cascade_8zwrx_987>div{width:160px;min-width:160px}._fieldLayout_8zwrx_1079{grid-template-columns:1fr 1.2fr;gap:12px}._fieldTools_8zwrx_1098{flex-wrap:wrap}._fieldTools_8zwrx_1098>span{width:100%}._fieldLayout_8zwrx_1079>section:first-child{padding-right:8px}._dialog_8zwrx_1038{padding:16px}._detailMetrics_8zwrx_1152{grid-template-columns:repeat(2,minmax(0,1fr))}._pagination_8zwrx_679>span{width:100%}._yearBoards_8zwrx_805>article{width:340px;min-width:340px}._count_8zwrx_144{font-size:10px}._productGrid_8zwrx_849 article{padding:8px}}@media (prefers-reduced-motion:reduce){._categoryRow_8zwrx_254{transition:none}}:root[data-omni-theme=light]{--omni-paint-surface-0a1524:#f5f6fa;--omni-paint-ink-dbe8f5:#252831;--omni-paint-line-30465e:#dde1eb;--omni-paint-surface-102239:#fff;--omni-paint-surface-193852:#fff;--omni-paint-line-4b92b9:#dde1eb;--omni-paint-line-60d2f6:#dde1eb;--omni-paint-ink-69c9f1:#626e80;--omni-paint-surface-187da7:#eef0ff;--omni-paint-line-298fac:#dde1eb;--omni-paint-ink-f1fbff:#252831;--omni-paint-line-263d55:#dde1eb;--omni-paint-ink-829ab3:#626e80;--omni-paint-ink-91a8be:#626e80;--omni-paint-ink-93abc0:#626e80;--omni-paint-ink-74c8ec:#626e80;--omni-paint-surface-112d43:#fff;--omni-paint-line-2a6386:#dde1eb;--omni-paint-ink-6e87a0:#626e80;--omni-paint-ink-9dbcd7:#626e80;--omni-paint-ink-61d3f7:#626e80;--omni-paint-ink-65ccf0:#626e80;--omni-paint-surface-14273c:#fff;--omni-paint-surface-101f32:#fff;--omni-paint-line-283e56:#dde1eb;--omni-paint-ink-7e97b0:#626e80;--omni-paint-surface-1b3b55:#fff;--omni-paint-ink-a6e7fc:#626e80;--omni-paint-shadow-020b1633:#0000000d;--omni-paint-ink-b8d8ea:#626e80;--omni-paint-line-345b72:#dde1eb;--omni-paint-surface-133049:#fff;--omni-paint-ink-718ca6:#626e80;--omni-paint-line-29425b:#dde1eb;--omni-paint-surface-153049:#fff;--omni-paint-line-397391:#dde1eb;--omni-paint-surface-102235:#fff;--omni-paint-line-2c435b:#dde1eb;--omni-paint-surface-61d3df:#eef0ff;--omni-paint-ink-d5e6f5:#252831;--omni-paint-ink-78d6f6:#626e80;--omni-paint-ink-70cfff:#626e80;--omni-paint-ink-9cb5cc:#626e80;--omni-paint-ink-688ba8:#626e80;--omni-paint-ink-68d3f4:#626e80;--omni-paint-surface-1c3c56:#fff;--omni-paint-line-335a73:#dde1eb;--omni-paint-ink-89cae7:#626e80;--omni-paint-ink-9fb3c7:#626e80;--omni-paint-line-47c5ee:#dde1eb;--omni-paint-ink-75d6f5:#626e80;--omni-paint-surface-0d1d30:#f5f6fa;--omni-paint-ink-6e8fa9:#626e80;--omni-paint-ink-adc4d9:#626e80;--omni-paint-ink-526d87:#626e80;--omni-paint-ink-91abc4:#626e80;--omni-paint-ink-cce3f4:#252831;--omni-paint-line-6185a1:#dde1eb;--omni-paint-line-233d55:#dde1eb;--omni-paint-surface-0d1e31:#fff;--omni-paint-ink-375572:#626e80;--omni-paint-ink-102138:#252831;--omni-paint-surface-162b40:#fff;--omni-paint-ink-a8bfd4:#626e80;--omni-paint-line-334c65:#dde1eb;--omni-paint-line-22384e:#dde1eb;--omni-paint-ink-acc1d4:#626e80;--omni-paint-surface-132b41:#fff;--omni-paint-ink-4b6782:#626e80;--omni-paint-accent-6acdf7:#4055db;--omni-paint-ink-a2d7f2:#626e80;--omni-paint-surface-10263c:#fff;--omni-paint-surface-18344b:#fff;--omni-paint-ink-507b99:#626e80;--omni-paint-ink-6ecdf4:#626e80;--omni-paint-ink-6d8ba7:#626e80;--omni-paint-surface-1b344a:#fff;--omni-paint-ink-91b3cc:#626e80;--omni-paint-ink-85bfdd:#626e80;--omni-paint-ink-f3b583:#626e80;--omni-paint-ink-7f9ab3:#626e80;--omni-paint-accent-70d0f5:#4055db;--omni-paint-line-3a94bb:#dde1eb;--omni-paint-surface-16364d:#fff;--omni-paint-ink-546f88:#626e80;--omni-paint-ink-bcae88:#626e80;--omni-paint-surface-2b281f:#fff;--omni-paint-line-5b4d31:#dde1eb;--omni-paint-ink-647f98:#626e80;--omni-paint-ink-86a6c0:#626e80;--omni-paint-ink-7f9bb4:#626e80;--omni-paint-line-28455f:#dde1eb;--omni-paint-surface-0d2135:#fff;--omni-paint-ink-5db3d6:#626e80;--omni-paint-ink-7899b5:#626e80;--omni-paint-surface-633c31:#fff;--omni-paint-ink-f2c0ab:#626e80;--omni-paint-surface-1d4778:#fff;--omni-paint-ink-b0d7ff:#252831;--omni-paint-surface-2c3a49:#fff;--omni-paint-ink-b7c9dc:#626e80;--omni-paint-line-29445f:#dde1eb;--omni-paint-surface-0d2033:#fff;--omni-paint-surface-142d44:#fff;--omni-paint-ink-6384a1:#626e80;--omni-paint-line-29455e:#dde1eb;--omni-paint-surface-10243a:#fff;--omni-paint-surface-112b40:#fff;--omni-paint-ink-4c7897:#626e80;--omni-paint-surface-0a192cba:#f5f6faba;--omni-paint-ink-8bb6d0:#626e80;--omni-paint-ink-7094af:#626e80;--omni-paint-line-233e55:#dde1eb;--omni-paint-ink-7395b0:#626e80;--omni-paint-ink-b3cde1:#626e80;--omni-paint-line-36516b:#dde1eb;--omni-paint-surface-10283e:#fff;--omni-paint-line-3c6381:#dde1eb;--omni-paint-shadow-0008:#0000001f;--omni-paint-surface-0a1b2d:#f5f6fa;--omni-paint-ink-75c6ed:#626e80;--omni-paint-line-2c4861:#dde1eb;--omni-paint-surface-1b405c:#fff;--omni-paint-line-436987:#dde1eb;--omni-paint-ink-dbeaf8:#252831;--omni-paint-overlay-020b15b0:#020a1580;--omni-paint-ink-96b4cc:#626e80;--omni-paint-line-32536d:#dde1eb;--omni-paint-ink-2caddb:#626e80;--omni-paint-ink-84a5bf:#626e80;--omni-paint-line-2e526c:#dde1eb;--omni-paint-surface-112d45:#fff;--omni-paint-line-2e4e68:#dde1eb;--omni-paint-ink-81a2bd:#626e80;--omni-paint-surface-0c1e31:#f5f6fa}:root[data-omni-theme=dark]{--omni-paint-surface-0a1524:#0b1727;--omni-paint-ink-dbe8f5:#dceaf7;--omni-paint-line-30465e:#2c435b;--omni-paint-surface-102239:#102235;--omni-paint-surface-193852:#102235;--omni-paint-line-4b92b9:#2c435b;--omni-paint-line-60d2f6:#2c435b;--omni-paint-ink-69c9f1:#91a9bd;--omni-paint-surface-187da7:#193954;--omni-paint-line-298fac:#2c435b;--omni-paint-ink-f1fbff:#dceaf7;--omni-paint-line-263d55:#2c435b;--omni-paint-ink-829ab3:#91a9bd;--omni-paint-ink-91a8be:#91a9bd;--omni-paint-ink-93abc0:#91a9bd;--omni-paint-ink-74c8ec:#91a9bd;--omni-paint-surface-112d43:#102235;--omni-paint-line-2a6386:#2c435b;--omni-paint-ink-6e87a0:#91a9bd;--omni-paint-ink-9dbcd7:#91a9bd;--omni-paint-ink-61d3f7:#91a9bd;--omni-paint-ink-65ccf0:#91a9bd;--omni-paint-surface-14273c:#102235;--omni-paint-surface-101f32:#102235;--omni-paint-line-283e56:#2c435b;--omni-paint-ink-7e97b0:#91a9bd;--omni-paint-surface-1b3b55:#102235;--omni-paint-ink-a6e7fc:#91a9bd;--omni-paint-shadow-020b1633:#0000000d;--omni-paint-ink-b8d8ea:#91a9bd;--omni-paint-line-345b72:#2c435b;--omni-paint-surface-133049:#102235;--omni-paint-ink-718ca6:#91a9bd;--omni-paint-line-29425b:#2c435b;--omni-paint-surface-153049:#102235;--omni-paint-line-397391:#2c435b;--omni-paint-surface-102235:#102235;--omni-paint-line-2c435b:#2c435b;--omni-paint-surface-61d3df:#193954;--omni-paint-ink-d5e6f5:#dceaf7;--omni-paint-ink-78d6f6:#91a9bd;--omni-paint-ink-70cfff:#91a9bd;--omni-paint-ink-9cb5cc:#91a9bd;--omni-paint-ink-688ba8:#91a9bd;--omni-paint-ink-68d3f4:#91a9bd;--omni-paint-surface-1c3c56:#102235;--omni-paint-line-335a73:#2c435b;--omni-paint-ink-89cae7:#91a9bd;--omni-paint-ink-9fb3c7:#91a9bd;--omni-paint-line-47c5ee:#2c435b;--omni-paint-ink-75d6f5:#91a9bd;--omni-paint-surface-0d1d30:#0b1727;--omni-paint-ink-6e8fa9:#91a9bd;--omni-paint-ink-adc4d9:#91a9bd;--omni-paint-ink-526d87:#91a9bd;--omni-paint-ink-91abc4:#91a9bd;--omni-paint-ink-cce3f4:#dceaf7;--omni-paint-line-6185a1:#2c435b;--omni-paint-line-233d55:#2c435b;--omni-paint-surface-0d1e31:#102235;--omni-paint-ink-375572:#91a9bd;--omni-paint-ink-102138:#dceaf7;--omni-paint-surface-162b40:#102235;--omni-paint-ink-a8bfd4:#91a9bd;--omni-paint-line-334c65:#2c435b;--omni-paint-line-22384e:#2c435b;--omni-paint-ink-acc1d4:#91a9bd;--omni-paint-surface-132b41:#102235;--omni-paint-ink-4b6782:#91a9bd;--omni-paint-accent-6acdf7:#61d3df;--omni-paint-ink-a2d7f2:#91a9bd;--omni-paint-surface-10263c:#102235;--omni-paint-surface-18344b:#102235;--omni-paint-ink-507b99:#91a9bd;--omni-paint-ink-6ecdf4:#91a9bd;--omni-paint-ink-6d8ba7:#91a9bd;--omni-paint-surface-1b344a:#102235;--omni-paint-ink-91b3cc:#91a9bd;--omni-paint-ink-85bfdd:#91a9bd;--omni-paint-ink-f3b583:#91a9bd;--omni-paint-ink-7f9ab3:#91a9bd;--omni-paint-accent-70d0f5:#61d3df;--omni-paint-line-3a94bb:#2c435b;--omni-paint-surface-16364d:#102235;--omni-paint-ink-546f88:#91a9bd;--omni-paint-ink-bcae88:#91a9bd;--omni-paint-surface-2b281f:#102235;--omni-paint-line-5b4d31:#2c435b;--omni-paint-ink-647f98:#91a9bd;--omni-paint-ink-86a6c0:#91a9bd;--omni-paint-ink-7f9bb4:#91a9bd;--omni-paint-line-28455f:#2c435b;--omni-paint-surface-0d2135:#102235;--omni-paint-ink-5db3d6:#91a9bd;--omni-paint-ink-7899b5:#91a9bd;--omni-paint-surface-633c31:#102235;--omni-paint-ink-f2c0ab:#91a9bd;--omni-paint-surface-1d4778:#102235;--omni-paint-ink-b0d7ff:#dceaf7;--omni-paint-surface-2c3a49:#102235;--omni-paint-ink-b7c9dc:#91a9bd;--omni-paint-line-29445f:#2c435b;--omni-paint-surface-0d2033:#102235;--omni-paint-surface-142d44:#102235;--omni-paint-ink-6384a1:#91a9bd;--omni-paint-line-29455e:#2c435b;--omni-paint-surface-10243a:#102235;--omni-paint-surface-112b40:#102235;--omni-paint-ink-4c7897:#91a9bd;--omni-paint-surface-0a192cba:#0b1727ba;--omni-paint-ink-8bb6d0:#91a9bd;--omni-paint-ink-7094af:#91a9bd;--omni-paint-line-233e55:#2c435b;--omni-paint-ink-7395b0:#91a9bd;--omni-paint-ink-b3cde1:#91a9bd;--omni-paint-line-36516b:#2c435b;--omni-paint-surface-10283e:#102235;--omni-paint-line-3c6381:#2c435b;--omni-paint-shadow-0008:#0000001f;--omni-paint-surface-0a1b2d:#0b1727;--omni-paint-ink-75c6ed:#91a9bd;--omni-paint-line-2c4861:#2c435b;--omni-paint-surface-1b405c:#102235;--omni-paint-line-436987:#2c435b;--omni-paint-ink-dbeaf8:#dceaf7;--omni-paint-overlay-020b15b0:#020a1580;--omni-paint-ink-96b4cc:#91a9bd;--omni-paint-line-32536d:#2c435b;--omni-paint-ink-2caddb:#91a9bd;--omni-paint-ink-84a5bf:#91a9bd;--omni-paint-line-2e526c:#2c435b;--omni-paint-surface-112d45:#102235;--omni-paint-line-2e4e68:#2c435b;--omni-paint-ink-81a2bd:#91a9bd;--omni-paint-surface-0c1e31:#0b1727}._root_ku7ga_1._root_ku7ga_1{width:100%;color:var(--omni-text,var(--omni-paint-ink-dbe8f5,#dbe8f5));background:var(--omni-bg,var(--omni-paint-surface-0a1524,#0a1524));box-sizing:border-box;min-width:0;min-height:100%;padding:22px 24px 32px;font:13px/1.6 -apple-system,BlinkMacSystemFont,PingFang SC,sans-serif;display:block}._root_ku7ga_1 *,._dialog_ku7ga_2 *{box-sizing:border-box}._root_ku7ga_1 button,._root_ku7ga_1 input,._root_ku7ga_1 select,._dialog_ku7ga_2 button,._dialog_ku7ga_2 input{font:inherit;color:inherit;min-width:0}._root_ku7ga_1 button,._dialog_ku7ga_2 button{cursor:pointer;border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));background:var(--omni-panel,var(--omni-paint-surface-132d49,#132d49));white-space:nowrap;border-radius:6px;justify-content:center;align-items:center;gap:6px;padding:6px 10px;display:inline-flex}._root_ku7ga_1 button:hover,._dialog_ku7ga_2 button:hover{border-color:var(--omni-accent,var(--omni-paint-line-61d6f1,#61d6f1))}._root_ku7ga_1 button:disabled,._dialog_ku7ga_2 button:disabled{opacity:.4;cursor:default}._root_ku7ga_1 button[aria-pressed=true]{color:var(--omni-accent,var(--omni-paint-ink-61d6f1,#61d6f1));border-color:var(--omni-accent,var(--omni-paint-line-61d6f1,#61d6f1))}._root_ku7ga_1 input,._root_ku7ga_1 select,._dialog_ku7ga_2 input{background:var(--omni-bg,var(--omni-paint-surface-0a1524,#0a1524));border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));border-radius:6px;outline:none;padding:7px 9px}._root_ku7ga_1 :focus-visible,._dialog_ku7ga_2 :focus-visible{outline:2px solid var(--omni-accent,var(--omni-paint-line-61d6f1,#61d6f1));outline-offset:2px}._root_ku7ga_1._root_ku7ga_1 button._primary_ku7ga_4{background:var(--omni-accent,var(--omni-paint-surface-61d6f1,#61d6f1));border-color:var(--omni-accent,var(--omni-paint-line-61d6f1,#61d6f1));color:var(--omni-accent-text,var(--omni-paint-ink-062232,#062232));font-weight:650}._root_ku7ga_1._root_ku7ga_1 button._primary_ku7ga_4>svg{color:inherit;stroke:currentColor}._historyHeader_ku7ga_5{justify-content:space-between;align-items:center;gap:20px;margin:2px 0 28px;display:flex}._historyHeader_ku7ga_5 h1{margin:7px 0;font-size:25px}._historyHeader_ku7ga_5 p,._eyebrow_ku7ga_5{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));margin:0}._eyebrow_ku7ga_5{letter-spacing:.4px;font-size:11px}._history_ku7ga_5{max-width:1200px}._panelHeading_ku7ga_5{justify-content:space-between;align-items:center;gap:14px;margin-bottom:14px;display:flex}._panelHeading_ku7ga_5 h2{align-items:center;gap:9px;margin:0;font-size:15px;display:flex}._panelHeading_ku7ga_5 h2 small{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));font-size:11px;font-weight:400}._historyList_ku7ga_6{border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));border-radius:10px;overflow:hidden}._historyList_ku7ga_6>button{border:0;border-bottom:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));text-align:left;background:0 0;border-radius:0;gap:15px;width:100%;padding:17px 18px;display:flex}._historyList_ku7ga_6>button:last-child{border-bottom:0}._historyList_ku7ga_6>button:hover{background:var(--omni-panel,var(--omni-paint-surface-132d49,#132d49))}._historyIcon_ku7ga_6{background:var(--omni-panel,var(--omni-paint-surface-132d49,#132d49));width:40px;height:40px;color:var(--omni-accent,var(--omni-paint-ink-61d6f1,#61d6f1));border-radius:9px;justify-content:center;align-items:center;display:flex}._historyTitle_ku7ga_6{white-space:normal;overflow-wrap:anywhere;flex:1;min-width:0}._historyTitle_ku7ga_6 b{font-size:14px;font-weight:500}._historyTitle_ku7ga_6 small,._historyList_ku7ga_6 time{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));font-size:11px;display:block}._emptyHistory_ku7ga_6{text-align:center;color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));padding:70px 20px}._emptyHistory_ku7ga_6 h3{color:var(--omni-text,var(--omni-paint-ink-dbe8f5,#dbe8f5));margin:12px 0 4px;font-size:16px}._editorHeader_ku7ga_7{top:var(--workspace-sticky-top,0px);z-index:12;background:var(--omni-bg,var(--omni-paint-surface-0a1524,#0a1524));border-bottom:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:12px;margin:-8px 0 12px;padding:6px 0 10px;display:flex;position:sticky}._inline_ku7ga_7{flex-wrap:wrap;align-items:center;gap:8px;display:inline-flex}._editorIdentity_ku7ga_7,._editorTools_ku7ga_7{flex-wrap:nowrap;align-items:center;gap:7px;min-width:0;display:flex}._editorIdentity_ku7ga_7{flex:1}._editorTools_ku7ga_7{flex:none}._root_ku7ga_1 ._nameInput_ku7ga_7{background:0 0;border-color:#0000;flex:0 250px;width:250px;max-width:300px;margin:0;padding:3px 6px;font-size:17px;font-weight:600}._root_ku7ga_1 ._editorTools_ku7ga_7 select{width:112px;max-width:112px;height:32px;margin:0;padding:4px 8px;display:inline-block}._editorHeader_ku7ga_7 button{flex-shrink:0;height:32px}._saveStatus_ku7ga_7{white-space:nowrap;color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));align-items:center;gap:4px;font-size:11px;display:inline-flex}._panel_ku7ga_5{border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));background:var(--omni-bg,var(--omni-paint-surface-0a1524,#0a1524));border-radius:9px;min-width:0;margin-bottom:16px;padding:16px 18px}._horizontal_ku7ga_8{min-width:0;overflow-x:auto}._root_ku7ga_1 table{border-collapse:collapse;width:100%;font-size:12px}._root_ku7ga_1 th,._root_ku7ga_1 td{text-align:left;border-bottom:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));vertical-align:middle;padding:11px 12px}._root_ku7ga_1 th{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));white-space:nowrap;background:var(--omni-panel,var(--omni-paint-surface-132d49,#132d49));font-size:11px;font-weight:500}._root_ku7ga_1 tbody tr:last-child td{border-bottom:0}._root_ku7ga_1 td{white-space:nowrap}._root_ku7ga_1 th i,._shopName_ku7ga_8 i{border-radius:50%;flex-shrink:0;width:8px;height:8px;margin-right:7px;display:inline-block}._shopName_ku7ga_8{align-items:center;display:flex}._root_ku7ga_1 td small{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));margin-top:4px;font-size:10px;display:block}._summaryTable_ku7ga_8{min-width:920px}._summaryTable_ku7ga_8 td:first-child{min-width:180px}._root_ku7ga_1 ._link_ku7ga_8{color:var(--omni-accent,var(--omni-paint-ink-61d6f1,#61d6f1));white-space:normal;text-align:left;background:0 0;border:0;padding:0;font-size:12px}._root_ku7ga_1 ._sort_ku7ga_8{color:inherit;background:0 0;border:0;justify-content:flex-start;padding:0;font-size:11px}._note_ku7ga_9{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));margin:12px 0 0;font-size:11px;line-height:1.7}._panelHeading_ku7ga_5>._note_ku7ga_9{margin:0}._error_ku7ga_9{color:var(--omni-paint-danger-e8b77b,#e8b77b);border:1px solid var(--omni-paint-line-84623c,#84623c);border-radius:7px;margin:12px 0;padding:12px 14px}._error_ku7ga_9 button{margin-left:12px}._empty_ku7ga_6{text-align:center;color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));padding:35px 12px}._empty_ku7ga_6 h3{color:var(--omni-text,var(--omni-paint-ink-dbe8f5,#dbe8f5));margin:10px 0 0;font-size:15px}._empty_ku7ga_6 p{margin:6px 0 15px;font-size:12px}._metricBar_ku7ga_10{flex-wrap:wrap;align-items:center;gap:7px;margin:20px 0 12px;display:flex}._metricBar_ku7ga_10>span{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));margin-left:auto;font-size:11px}._metricBar_ku7ga_10 button{padding:6px 14px}._chartRange_ku7ga_10{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));flex-wrap:wrap;align-items:center;gap:7px;margin:0 0 8px;font-size:11px;display:flex}._chartRange_ku7ga_10>span:last-child{margin-left:auto}._chartRange_ku7ga_10 button{padding:4px 9px;font-size:11px}._chart_ku7ga_10{min-width:0;height:460px}._trendChart_ku7ga_10{width:100%;height:300px}._filters_ku7ga_11{flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 14px;display:flex}._filters_ku7ga_11 label{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));align-items:center;gap:6px;font-size:11px;display:flex}._filters_ku7ga_11 select{max-width:260px;font-size:12px}._filters_ku7ga_11 form{align-items:center;gap:6px;margin-left:auto;display:flex}._filters_ku7ga_11 input{width:210px;font-size:12px}._root_ku7ga_1 ._columnOptions_ku7ga_11{border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));border-radius:7px;flex-wrap:wrap;gap:15px;margin:0 0 15px;padding:9px 12px;display:flex}._columnOptions_ku7ga_11 legend{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));font-size:11px}._columnOptions_ku7ga_11 label{align-items:center;gap:5px;font-size:12px;display:flex}._columnOptions_ku7ga_11 input{accent-color:var(--omni-accent,var(--omni-paint-ink-61d6f1,#61d6f1))}._product_ku7ga_12{align-items:center;gap:10px;min-width:230px;max-width:330px;display:flex}._product_ku7ga_12>img,._noImage_ku7ga_12{object-fit:cover;border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));border-radius:4px;flex-shrink:0;width:44px;height:44px}._noImage_ku7ga_12{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));background:var(--omni-panel,var(--omni-paint-surface-132d49,#132d49));justify-content:center;align-items:center;font-size:10px;display:flex}._product_ku7ga_12>div{white-space:normal;min-width:0;line-height:1.6}._product_ku7ga_12 b,._product_ku7ga_12 a{color:var(--omni-accent,var(--omni-paint-ink-61d6f1,#61d6f1));overflow-wrap:anywhere;font-size:12px;font-weight:400;text-decoration:none}._root_ku7ga_1 ._categoryCell_ku7ga_12{white-space:normal;overflow-wrap:anywhere;min-width:120px;max-width:240px;font-size:11px}._pagination_ku7ga_12{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));justify-content:space-between;align-items:center;gap:12px;margin-top:16px;font-size:11px;display:flex}._pagination_ku7ga_12>span{max-width:70%}._pagination_ku7ga_12>div{align-items:center;gap:10px;display:flex}._productCards_ku7ga_12{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;display:grid}._productCards_ku7ga_12 article{border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));border-radius:7px;padding:14px}._productCards_ku7ga_12 ._product_ku7ga_12{max-width:none}._productCards_ku7ga_12 ._product_ku7ga_12>img,._productCards_ku7ga_12 ._noImage_ku7ga_12{width:76px;height:76px}._productCards_ku7ga_12 dl{margin:13px 0 0}._productCards_ku7ga_12 dl>div{justify-content:space-between;gap:10px;padding:4px 0;font-size:11px;display:flex}._productCards_ku7ga_12 dt{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5))}._productCards_ku7ga_12 dd{text-align:right;margin:0}._dialog_ku7ga_2{border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));background:var(--omni-bg,var(--omni-paint-surface-0a1524,#0a1524));width:min(820px,100vw - 40px);max-height:85vh;color:var(--omni-text,var(--omni-paint-ink-dbe8f5,#dbe8f5));box-shadow:0 20px 70px var(--omni-paint-shadow-0005,#0005);border-radius:12px;margin:auto;padding:22px;font:13px/1.6 -apple-system,BlinkMacSystemFont,PingFang SC,sans-serif;position:fixed;inset:0;overflow:auto}._dialog_ku7ga_2::backdrop{background:var(--omni-paint-overlay-020b18aa,#020b18aa);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}._searchForm_ku7ga_13{align-items:center;gap:9px;margin:18px 0;display:flex}._searchForm_ku7ga_13 input{flex:1}._searchResults_ku7ga_13{gap:8px;margin-top:15px;display:grid}._searchResults_ku7ga_13 button{text-align:left;white-space:normal;background:0 0;justify-content:space-between;padding:11px 13px}._searchResults_ku7ga_13 small{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));margin-top:3px;font-size:10px;display:block}@media (width<=1100px){._editorHeader_ku7ga_7{flex-wrap:wrap}._editorIdentity_ku7ga_7{flex-basis:100%}._editorTools_ku7ga_7{margin-left:auto}}@media (width<=1000px){._root_ku7ga_1{padding:18px 16px}._filters_ku7ga_11 form{margin-left:0}._historyList_ku7ga_6 time{display:none}._chart_ku7ga_10{height:420px}._root_ku7ga_1 ._nameInput_ku7ga_7{width:200px}._pagination_ku7ga_12{flex-wrap:wrap;align-items:flex-start}._pagination_ku7ga_12>span{max-width:100%}}._rangeTrack_ku7ga_17{border:1px solid var(--omni-line,var(--omni-paint-line-29445f,#29445f));background:var(--omni-field,var(--omni-paint-surface-0a1a2b,#0a1a2b));touch-action:none;-webkit-user-select:none;user-select:none;border-radius:7px;height:34px;margin:4px 18px 10px 100px;position:relative}._rangeWindow_ku7ga_17{background:var(--omni-panel,var(--omni-paint-surface-132d49,#132d49));min-width:44px;box-shadow:inset 0 0 0 1px var(--omni-accent,var(--omni-paint-shadow-61d3df,#61d3df));cursor:grab;border-radius:6px;justify-content:space-between;align-items:center;display:flex;position:absolute;top:0;bottom:0}._rangeWindow_ku7ga_17:active{cursor:grabbing}._rangeHandle_ku7ga_17{background:var(--omni-accent,var(--omni-paint-surface-61d3df,#61d3df));color:var(--omni-accent-text,var(--omni-paint-ink-082a39,#082a39));cursor:ew-resize;border-radius:5px;flex:0 0 22px;align-self:stretch;place-items:center;font-size:15px;font-weight:650;display:grid}._rangeGrip_ku7ga_17{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));font-size:18px;line-height:1}._chart_ku7ga_10 :focus{outline:none}._chart_ku7ga_10:has(:focus-visible){outline:1px solid var(--omni-accent,var(--omni-paint-line-61d3df,#61d3df));outline-offset:3px}:root[data-omni-theme=light]{--omni-paint-ink-dbe8f5:#252831;--omni-paint-surface-0a1524:#f5f6fa;--omni-paint-line-29445f:#dde1eb;--omni-paint-surface-132d49:#fff;--omni-paint-line-61d6f1:#dde1eb;--omni-paint-ink-61d6f1:#626e80;--omni-paint-surface-61d6f1:#eef0ff;--omni-paint-ink-062232:#252831;--omni-paint-ink-91abc5:#626e80;--omni-paint-danger-e8b77b:#b83a4a;--omni-paint-line-84623c:#dde1eb;--omni-paint-shadow-0005:#00000015;--omni-paint-overlay-020b18aa:#020a1580;--omni-paint-surface-0a1a2b:#f5f6fa;--omni-paint-shadow-61d3df:#0000001f;--omni-paint-surface-61d3df:#eef0ff;--omni-paint-ink-082a39:#252831;--omni-paint-line-61d3df:#dde1eb}:root[data-omni-theme=dark]{--omni-paint-ink-dbe8f5:#dceaf7;--omni-paint-surface-0a1524:#0b1727;--omni-paint-line-29445f:#2c435b;--omni-paint-surface-132d49:#102235;--omni-paint-line-61d6f1:#2c435b;--omni-paint-ink-61d6f1:#91a9bd;--omni-paint-surface-61d6f1:#193954;--omni-paint-ink-062232:#dceaf7;--omni-paint-ink-91abc5:#91a9bd;--omni-paint-danger-e8b77b:#ff8996;--omni-paint-line-84623c:#2c435b;--omni-paint-shadow-0005:#00000015;--omni-paint-overlay-020b18aa:#020a1580;--omni-paint-surface-0a1a2b:#0b1727;--omni-paint-shadow-61d3df:#0000001f;--omni-paint-surface-61d3df:#193954;--omni-paint-ink-082a39:#dceaf7;--omni-paint-line-61d3df:#2c435b}._home_12rl6_1{color:var(--omni-text,var(--omni-paint-ink-dbe8f5,#dbe8f5))}._top_12rl6_2{justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px;display:flex}._home_12rl6_1 h1{margin:8px 0;font-size:27px}._home_12rl6_1 p{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));font-size:12px}._home_12rl6_1 button{color:inherit;border:1px solid var(--omni-line,var(--omni-paint-line-294468,#294468));cursor:pointer;background:0 0;border-radius:6px;justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;font-size:12px;display:inline-flex}._home_12rl6_1 button:focus-visible{outline:2px solid var(--omni-accent,var(--omni-paint-line-61d6f1,#61d6f1));outline-offset:2px}._panel_12rl6_6{border:1px solid var(--omni-line,var(--omni-paint-line-294468,#294468));background:var(--omni-panel,var(--omni-paint-surface-102239,#102239));border-radius:10px;padding:20px 22px}._home_12rl6_1 ._row_12rl6_7{border:0;border-bottom:1px solid var(--omni-line,var(--omni-paint-line-294468,#294468));text-align:left;border-radius:0;width:100%;padding:13px 0;display:flex}._row_12rl6_7 b{overflow-wrap:anywhere;font-size:12px;font-weight:500}._row_12rl6_7 small{color:var(--omni-muted,var(--omni-paint-ink-91abc5,#91abc5));margin-top:5px;font-size:11px;line-height:1.6;display:block}._empty_12rl6_9{padding:18px 0}:root[data-omni-theme=light]{--omni-paint-ink-dbe8f5:#252831;--omni-paint-ink-91abc5:#626e80;--omni-paint-line-294468:#dde1eb;--omni-paint-line-61d6f1:#dde1eb;--omni-paint-surface-102239:#fff}:root[data-omni-theme=dark]{--omni-paint-ink-dbe8f5:#dceaf7;--omni-paint-ink-91abc5:#91a9bd;--omni-paint-line-294468:#2c435b;--omni-paint-line-61d6f1:#2c435b;--omni-paint-surface-102239:#102235}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./check-QN7RSzdG.js";import{t}from"./arrow-right-Bsei-31a.js";import{t as n}from"./arrow-up-right-CqmbLgtN.js";import{t as r}from"./chevron-right-CGVsdWp6.js";import{a as i,i as a,n as o,o as s,r as c,s as l}from"./Directory-D0rZfh_1.js";import{a as u,n as d,o as f,r as p}from"./products-BxcSNL_f.js";import{t as m}from"./layers-BaGSABxV.js";import{t as h}from"./project-execution-VeMKoL0M.js";import{t as g}from"./refresh-cw-OG4-Ic4x.js";import{t as _}from"./search-I3gdKVV9.js";import{i as v,p as y,r as b,s as x,u as S}from"./index-CDS2fIqN.js";import{n as C}from"./module-host-BzwOcfIf.js";import{n as w}from"./workspace-view-state-C1Tia7X4.js";import"./public-DTqkVQos.js";import"./ui-public-BJV7qMHh.js";import"./demand-planning-client-DzZj_Q__.js";import{n as T,t as E}from"./activity-Cj90ZCJa.js";import{t as D}from"./group-B6vAoX5c.js";var O=x(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),k=x(`coins`,[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]),A=x(`orbit`,[[`path`,{d:`M20.341 6.484A10 10 0 0 1 10.266 21.85`,key:`1enhxb`}],[`path`,{d:`M3.659 17.516A10 10 0 0 1 13.74 2.152`,key:`1crzgf`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}]]),j=x(`scan-line`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}]]),M=y(S(),1),N={activity:`_activity_k9yph_1`,panel:`_panel_k9yph_1`},P=b();function F({mode:e,api:n,onOpen:r}){let[i,a]=(0,M.useState)([]),[o,s]=(0,M.useState)(!0),[c,l]=(0,M.useState)(``),[u,d]=(0,M.useState)(0),[f,p]=w(`workbench.`+e+`.search`,``);(0,M.useEffect)(()=>{let e=!0;return n(`/command-center`).then(t=>{let n=t?.projects;if(!Array.isArray(n))throw Error(`项目状态返回格式异常`);e&&(a(n.filter(e=>!e.simulated)),l(``))}).catch(t=>{e&&(a([]),l(t instanceof Error?t.message:`项目状态读取失败`))}).finally(()=>{e&&s(!1)}),()=>{e=!1}},[n,u]);let m=E(i),h=T(i),g=e=>e.toLowerCase().includes(f.trim().toLowerCase());return(0,P.jsxs)(`section`,{className:N.activity,children:[(0,P.jsxs)(`header`,{children:[(0,P.jsx)(`h1`,{children:e===`tasks`?`待处理事项`:`执行记录`}),(0,P.jsxs)(`label`,{children:[(0,P.jsx)(_,{size:16}),(0,P.jsx)(`input`,{"aria-label":`搜索工作台事项与记录`,value:f,onChange:e=>p(e.target.value),placeholder:`搜索项目或事项`})]})]}),c&&(0,P.jsxs)(`p`,{role:`alert`,children:[c,` `,(0,P.jsx)(`button`,{onClick:()=>{s(!0),d(e=>e+1)},children:`重试`})]}),o?(0,P.jsx)(`p`,{role:`status`,children:`正在读取项目状态…`}):(0,P.jsx)(`div`,{className:N.panel,children:e===`tasks`?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`h2`,{children:[`需要你处理 · `,m.length,` 项`]}),m.filter(({project:e,step:t})=>g(e.name+t.name)).slice(0,30).map(({project:e,step:n})=>(0,P.jsxs)(`button`,{onClick:()=>r(e.id,n.target),children:[(0,P.jsxs)(`span`,{children:[(0,P.jsxs)(`b`,{children:[n.name,` · `,n.state===`attention`?`待复核`:`待确认`]}),(0,P.jsxs)(`small`,{children:[e.name,` · `,n.description]})]}),(0,P.jsx)(t,{size:16})]},e.id+n.id)),!m.length&&(0,P.jsx)(`p`,{children:c?`连接恢复后显示待处理事项。`:`当前没有待复核或待确认的阶段。`})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`h2`,{children:`项目执行与确认记录`}),h.filter(({project:e,event:t})=>g(e.name+t.name)).slice(0,50).map(({project:e,event:n},i)=>(0,P.jsxs)(`button`,{onClick:()=>r(e.id,{tab:`wiki`}),children:[(0,P.jsxs)(`span`,{children:[(0,P.jsxs)(`b`,{children:[n.name,` · `,n.state]}),(0,P.jsxs)(`small`,{children:[e.name,` · `,new Date(n.at).toLocaleString(`zh-CN`)]})]}),(0,P.jsx)(t,{size:16})]},e.id+n.at+i)),!h.length&&(0,P.jsx)(`p`,{children:c?`连接恢复后显示执行记录。`:`当前没有执行记录。`})]})})]})}async function I(e){let[t,n]=await Promise.all([e(`/growth-center`),e(`/command-center`)]),r=t,i=n.projects;if(!Array.isArray(r?.products)||!Array.isArray(r?.catalog)||!Array.isArray(i))throw Error(`经营资料返回格式异常`);return{growth:r,projects:i}}var L={refunds:`同期支付订单的退款`,product:`货品成本`,fulfillment:`运费与履约`,platform:`平台费用`,ads:`广告花费`,tax:`税费`,other:`其他变动费用`,fixed:`固定费用分摊`},R=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`;function ee({metrics:t,products:r,projects:i,ready:a,onOpen:o,onNav:s,onAssign:c,demo:u}){let[d,f]=(0,M.useState)(``),[p,h]=(0,M.useState)(``),g=t?.sales||[],_=g.find(e=>e.id===p)||g[0],y=(t?.finance||[]).filter(e=>!_||e.start===_.start&&e.end===_.end),b=y.find(e=>e.scope?.type===`shop`&&(u||e.project===_?.project)),x=y.filter(e=>e.scope?.type===`item`&&(u||e.project===_?.project)),S=x.filter(e=>e.complete),C=S.filter(e=>e.profit>0),w=S.filter(e=>e.profit<0),T=S.filter(e=>e.profit===0),E=t?.incubation||[],D=E.filter(e=>e.success),j=i.reduce((e,t)=>e+t.running,0),N=[{id:`sales`,label:`店铺销售额`,value:_?R(_.total):`暂无记录`,unit:_?`元`:``,note:_?`${_.start} — ${_.end}`:`先归档全店销售数据`,Icon:e},{id:`profit`,label:`店铺利润`,value:b?.complete?R(b.profit):`缺成本资料`,unit:b?.complete?`元`:``,note:`已列成本口径经营结余 · 点击核对`,Icon:k},{id:`links`,label:`盈利 / 亏损链接`,value:S.length?`${C.length} / ${w.length}`:`尚未核算`,unit:S.length?`个`:``,note:`${S.length} 个有核算结果 · ${T.length} 个持平`,Icon:m},{id:`incubation`,label:`孵化晋级记录`,value:E.length?`${D.length} / ${E.length}`:`尚无记录`,unit:E.length?`个`:``,note:`已记录晋级 / 累计纳入 · 不代表成功率`,Icon:A},{id:`tasks`,label:`正在执行的任务`,value:a?j:`—`,unit:`个`,note:`${i.filter(e=>e.complete).length} 个项目流程已确认`,Icon:O}];function F(e){if(e===`tasks`){s(`projects`);return}f(d===e?``:e)}let I=e=>u?`data:application/json;charset=utf-8,`+encodeURIComponent(JSON.stringify(e,null,2)):`/api/workbench/`+e.project+`/file/`+(e.artifactId||e.id);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(l,{group:`cockpit.kpis`,className:`gc-kpis`,children:N.map(e=>(0,P.jsx)(`div`,{"data-layout-label":e.label,children:(0,P.jsxs)(`button`,{className:`gc-kpi gc-kpi-`+e.id+` `+(d===e.id?`is-open`:``),onClick:()=>F(e.id),"aria-expanded":d===e.id,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`gc-kpi-icon`,children:(0,P.jsx)(e.Icon,{size:21})}),(0,P.jsx)(`span`,{children:e.label}),(0,P.jsx)(n,{size:13})]}),(0,P.jsxs)(`strong`,{className:String(e.value).length>9?`gc-long-value`:``,children:[e.value,(0,P.jsx)(`small`,{children:e.unit})]}),(0,P.jsx)(`p`,{children:e.note})]},e.id)},e.id))}),d&&(0,P.jsxs)(`section`,{className:`gb-detail`,"aria-label":`经营指标明细`,children:[(0,P.jsxs)(`header`,{children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:u?`演示数据 · 不代表真实经营结果`:`归档数据 · 以原件日期和来源为准`}),(0,P.jsxs)(`h2`,{children:[N.find(e=>e.id===d)?.label,` · 明细与下一步`]})]}),(0,P.jsx)(`button`,{"aria-label":`关闭指标明细`,onClick:()=>f(``),children:(0,P.jsx)(v,{size:18})})]}),d===`sales`&&(0,P.jsxs)(P.Fragment,{children:[g.length>1&&(0,P.jsxs)(`label`,{children:[`选择统计记录`,(0,P.jsx)(`select`,{"aria-label":`销售统计记录`,value:_?.id||``,onChange:e=>h(e.target.value),children:g.map(e=>(0,P.jsxs)(`option`,{value:e.id,children:[e.projectName,` · `,e.start,` ~ `,e.end]},e.id))})]}),_?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:_.basis}),(0,P.jsxs)(`p`,{children:[`统计范围:`,_.scopeLabel,` · `,_.count,` 个链接 · `,_.identity,`。`,_.mode===`unverified`?`来源未完成独立核验。`:``]}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品 / 分类`}),(0,P.jsx)(`th`,{children:`支付销售额`}),(0,P.jsx)(`th`,{children:`链接数`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:_.breakdown.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`td`,{children:e.name}),(0,P.jsxs)(`td`,{children:[`¥ `,R(e.sales)]}),(0,P.jsx)(`td`,{children:e.count}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>e.itemId?o(e.project,{tab:`monitor`,itemId:e.itemId}):o(_.project,{tab:`data`}),children:e.itemId?`看商品表现`:`核对来源数据`})})]},e.name))})]})}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:先看销售贡献高的商品,再核对退款和成本,决定继续推广还是调整商品。`}),(0,P.jsx)(`a`,{href:I(_),download:u?`模拟销售账本.json`:void 0,children:`查看原始记录`})]}):(0,P.jsx)(`p`,{children:`当前没有全店销售记录。先到数据中心归档同一店铺、同一统计窗口的数据。`}),(0,P.jsx)(`button`,{onClick:()=>s(`data`),children:`进入数据中心`})]}),d===`profit`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`计算:支付销售额 − 同支付订单退款 − 货品、履约、平台、广告、税费、其他费用 − 固定费用分摊。结果是已列成本口径经营结余。`}),b?.complete?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`gb-costs`,children:[Object.entries(b.amounts).map(([e,t])=>(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{children:e===`gross`?`支付销售额`:L[e]}),(0,P.jsxs)(`b`,{children:[`¥ `,R(t)]})]},e)),(0,P.jsxs)(`div`,{className:`gb-profit`,children:[(0,P.jsx)(`span`,{children:`经营结余`}),(0,P.jsxs)(`b`,{children:[`¥ `,R(b.profit)]})]})]}),(0,P.jsx)(`a`,{href:I(b),download:u?`模拟利润账本.json`:void 0,children:`查看核算原件`})]}):(0,P.jsxs)(`div`,{className:`gb-gap`,children:[(0,P.jsx)(`b`,{children:`没有完整的真实店铺成本账本,不能计算利润。`}),(0,P.jsx)(`p`,{children:`需要补齐:货品、运费、平台、广告、税费、其他费用、固定费用分摊,以及同支付订单退款。明确没有发生的费用填0,未知项留空。`})]}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:核对金额和凭证;若亏损,先查看费用占比与亏损商品,再进入商品优化评估原因。`}),(0,P.jsx)(`button`,{onClick:()=>o(b?.project||_?.project||i[0]?.id,{tab:`finance`}),disabled:!i.length,children:`打开经营核算`})]}),d===`links`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`按同周期、完整成本账本判断:结余大于0为盈利,小于0为亏损,等于0为持平;缺成本的商品不计入盈亏。当前仅统计有账本的范围。`}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品`}),(0,P.jsx)(`th`,{children:`销售额`}),(0,P.jsx)(`th`,{children:`经营结余`}),(0,P.jsx)(`th`,{children:`状态`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:x.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsxs)(`td`,{children:[e.projectName,(0,P.jsx)(`small`,{children:e.scope.id})]}),(0,P.jsxs)(`td`,{children:[`¥ `,R(e.gross)]}),(0,P.jsx)(`td`,{children:e.complete?`¥ `+R(e.profit):`费用不全`}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`span`,{className:e.profit<0?`gb-loss`:`gb-win`,children:e.complete?e.profit>0?`盈利`:e.profit<0?`亏损`:`持平`:`待核算`})}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>o(e.project,{tab:e.complete?`optimization`:`finance`,itemId:e.scope.id}),children:e.complete?`查看并优化`:`补齐费用`})})]},e.id))})]})}),!x.length&&(0,P.jsx)(`p`,{children:`还没有商品级真实账本。当前看板商品不能仅凭销售额判定盈亏。`}),(0,P.jsx)(`button`,{disabled:!i.length,onClick:()=>o(_?.project||i[0]?.id,{tab:`finance`}),children:`补充商品成本账本`})]}),d===`incubation`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`这里只统计已保存的运营晋级记录与累计纳入数量,不计算经营成功率。未晋级可能仍在观察,不代表失败;每条记录需要核对标准、证据和观察时间,不能推断可复制收益。`}),(0,P.jsxs)(`div`,{className:`gb-inc-summary`,children:[(0,P.jsxs)(`b`,{children:[D.length,(0,P.jsx)(`small`,{children:`达标晋级`})]}),(0,P.jsx)(`span`,{children:`/`}),(0,P.jsxs)(`b`,{children:[E.length,(0,P.jsx)(`small`,{children:`纳入孵化`})]})]}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品`}),(0,P.jsx)(`th`,{children:`加入时间`}),(0,P.jsx)(`th`,{children:`结果`}),(0,P.jsx)(`th`,{children:`老师标准与依据`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:E.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`td`,{children:e.itemId}),(0,P.jsx)(`td`,{children:e.started.slice(0,10)}),(0,P.jsx)(`td`,{children:e.success?`达标晋级`:`继续观察`}),(0,P.jsxs)(`td`,{className:`gb-wrap`,children:[e.standard||`待记录老师标准`,(0,P.jsx)(`small`,{children:e.evidence||`尚无达标证据`})]}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>{let t=r.find(t=>t.itemId===e.itemId&&t.project===e.project);t?c(t):o(e.project,{tab:`data`})},children:e.success?`查看运营分组`:`核对并晋级`})})]},e.key))})]})}),!E.length&&(0,P.jsx)(`p`,{children:`还没有新品进入孵化的记录,暂不能评价。`}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:先把新品加入“新品测试”;达标后选择下一运营分组,填写老师标准与达标依据。单纯换组不计为已记录达标晋级。`}),(0,P.jsx)(`button`,{disabled:!r.length,onClick:()=>c(r.find(e=>e.tier===`unassigned`)||r[0],`test`),children:`登记新品,开始孵化`})]})]})]})}var z=e=>Math.abs(e)>=1e4?(e/1e4).toFixed(1)+`万`:B(e),B=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`,V={scale:`#35dcca`,incubate:`#9880ff`,test:`#438bff`,unassigned:`var(--omni-muted,#91a9bd)`},H={scale:`重点推广`,incubate:`持续孵化`,test:`新品测试`,unassigned:`待分组`},U=[{id:`business`,label:`经营分析`,note:`查看商品经营趋势、销售构成和运营分组。`},{id:`projects`,label:`项目总览`,note:`全局看进度,卡片看状态,进入节点主流程继续推进。`},{id:`tasks`,label:`待办与任务`,note:`集中查看运营任务、巡店提醒和需要你处理的事项。`},{id:`history`,label:`复盘动态`,note:`回看项目阶段与历史记录,核对过程和依据。`}],W={done:`已确认`,review:`待确认`,attention:`需处理`,todo:`未开始`,stopped:`已停止`};function G({title:e,sub:t,children:n}){return(0,P.jsxs)(`div`,{className:`gc-panel-head`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`h2`,{children:[(0,P.jsx)(`span`,{}),` `,e]}),(0,P.jsx)(`small`,{children:t})]}),n]})}function te({series:t,days:r,onOpen:i}){let[a,o]=(0,M.useState)(null),s=t?.points||[],c=Date.parse(s.at(-1)?.date)-(r-1)*864e5,l=s.filter(e=>Date.parse(e.date)>=c),u=l.filter(e=>e.value!==null).map(e=>e.value);if(!u.length)return(0,P.jsxs)(`div`,{className:`gc-chart-empty`,children:[(0,P.jsx)(e,{size:38}),(0,P.jsx)(`b`,{children:`这段时间还没有可用数据`}),(0,P.jsx)(`span`,{children:`进入商品监控,查看数据来源与日期`}),(0,P.jsxs)(`button`,{onClick:i,children:[`查看商品监控 `,(0,P.jsx)(n,{size:13})]})]});let d=Math.min(0,...u),f=Math.max(1,...u)-d,p=e=>54+(Date.parse(e.date)-c)/(Math.max(1,r-1)*864e5)*690,m=e=>220-(e-d)/f*180,h=null,g=[];return l.forEach(e=>{if(e.value===null){h=null;return}h&&Date.parse(e.date)-Date.parse(h.date)===864e5&&g.push((0,P.jsx)(`line`,{x1:p(h),y1:m(h.value),x2:p(e),y2:m(e.value)},e.date)),h=e}),(0,P.jsxs)(`div`,{className:`gc-chart`,children:[(0,P.jsxs)(`div`,{className:`gc-chart-reading`,children:[(0,P.jsxs)(`strong`,{children:[B(a?.value??l.at(-1)?.value),(0,P.jsx)(`small`,{children:t.unit})]}),(0,P.jsxs)(`span`,{children:[a?.date||l.at(-1)?.date,` · `,t.name]}),(0,P.jsx)(`i`,{children:`柱与线均为同一指标`})]}),(0,P.jsxs)(`svg`,{viewBox:`0 0 780 255`,role:`img`,"aria-label":`${t.name},最近${r}天归档趋势,缺失不补零`,children:[(0,P.jsx)(`defs`,{children:(0,P.jsxs)(`linearGradient`,{id:`gc-bar`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,P.jsx)(`stop`,{stopColor:`#5ec9ff`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#2857d6`,stopOpacity:`.3`})]})}),[0,.25,.5,.75,1].map(e=>(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`line`,{className:`gc-gridline`,x1:`54`,x2:`750`,y1:m(d+f*e),y2:m(d+f*e)}),(0,P.jsx)(`text`,{x:`42`,y:m(d+f*e)+4,textAnchor:`end`,children:z(d+f*e)})]},e)),l.map(e=>e.value===null?null:(0,P.jsxs)(`g`,{onMouseEnter:()=>o(e),onMouseLeave:()=>o(null),children:[(0,P.jsx)(`rect`,{x:p(e)-Math.min(8,230/r),y:Math.min(m(0),m(e.value)),width:Math.min(16,460/r),height:Math.max(1,Math.abs(m(0)-m(e.value))),rx:`2`,fill:`url(#gc-bar)`}),(0,P.jsx)(`circle`,{cx:p(e),cy:m(e.value),r:`3`,fill:`#6ceeff`}),(0,P.jsxs)(`title`,{children:[e.date,`:`,B(e.value),` `,t.unit]})]},e.date)),(0,P.jsx)(`g`,{className:`gc-line`,children:g}),[0,.25,.5,.75,1].map(e=>(0,P.jsx)(`text`,{x:54+690*e,y:`247`,textAnchor:`middle`,children:new Date(c+(r-1)*864e5*e).toISOString().slice(5,10)},e))]})]})}function K(e){return(0,P.jsx)(i,{scope:e.layoutScope,onDirty:e.onDirty,children:(0,P.jsx)(q,{...e})})}function q({products:e,projects:t,catalog:i,ready:o,onAction:c,onAssign:d,onOpen:p,onNav:m,onTier:h,onCreate:g,onExecute:_,metrics:v,demo:y}){let[b,x]=w(`workbench.cockpit.tab`,`business`),S=U.find(e=>e.id===b)||U[0],C=(0,M.useRef)(null);function T(e){let t=U.findIndex(e=>e.id===S.id),n=e.key===`ArrowRight`?(t+1)%U.length:e.key===`ArrowLeft`?(t+U.length-1)%U.length:e.key===`Home`?0:e.key===`End`?U.length-1:-1;n<0||(e.preventDefault(),x(U[n].id),(C.current?.querySelectorAll(`[role=tab]`)[n])?.focus())}let[E,D]=w(`workbench.productKey`,``),[O,k]=w(`workbench.metric`,``),[A,N]=w(`workbench.days`,30),[F,I]=w(`workbench.timelineDays`,14),[L,R]=(0,M.useState)(null),B=e.find(e=>e.key===E)||e.find(e=>e.demoCurrent)||e[0],K=B?.series.find(e=>e.key===O)||B?.series.find(e=>[`paid`,`payAmt`,`sales`,`gmv`].includes(e.metric))||B?.series.find(e=>e.metric===`buyers`)||B?.series[0],q=t.reduce((e,t)=>e+t.running,0),ae=t.reduce((e,t)=>e+t.pending,0),J=e.filter(e=>u(e)),Y=Object.keys(H).map(t=>({id:t,name:H[t],count:e.filter(e=>e.tier===t).length})),oe=0,se=Y.map(t=>{let n={...t,offset:oe,length:e.length?t.count/e.length*314.16:0};return oe+=n.length,n}),ce=t.filter(e=>e.replay?.some(e=>Number.isFinite(Date.parse(e.at)))).sort((e,t)=>String(t.updated).localeCompare(String(e.updated))),X=Math.max(0,...ce.flatMap(e=>e.replay.map(e=>Date.parse(e.at)).filter(Number.isFinite))),Z=X-(F-1)*864e5,le=[{label:`待选择运营分组`,items:e.filter(e=>e.tier===`unassigned`),color:`#8097b8`},{label:`数据需更新`,items:e.filter(e=>e.work?.needsUpdate),color:`#f3ba66`},{label:`任务需检查`,items:e.filter(e=>e.work?.problems?.length),color:`#f581a7`},{label:`近期运行中`,items:e.filter(e=>e.work?.active?.length),color:`#3ddad7`}],Q=v?.sales?.[0],$=(Q?.breakdown||[]).filter(e=>typeof e.sales==`number`).slice().sort((e,t)=>t.sales-e.sales).slice(0,8),ue=$.length>0&&$.every(e=>e.itemId),de=Math.max(1,...$.map(e=>e.sales));return(0,P.jsxs)(`div`,{className:`gc`,children:[(0,P.jsx)(s,{enabled:[`business`,`projects`].includes(S.id),groups:[`cockpit.kpis`,...S.id===`projects`?[`projects.modules`,`projects.stats`,`projects.cards`]:[`cockpit.business`]]}),(0,P.jsx)(ee,{metrics:v,products:e,projects:t,ready:o,onOpen:p,onNav:m,onAssign:d,demo:y}),(0,P.jsxs)(`div`,{className:`gc-tabs-heading`,children:[(0,P.jsx)(`div`,{role:`tablist`,"aria-label":`工作台分类`,className:`gc-tabs`,"data-layout-control":!0,ref:C,onKeyDown:T,children:U.map(e=>(0,P.jsx)(`button`,{role:`tab`,id:`gc-tab-`+e.id,"aria-controls":`gc-panel-`+e.id,"aria-selected":S.id===e.id,tabIndex:S.id===e.id?0:-1,onClick:()=>x(e.id),children:e.label},e.id))}),S.id===`projects`&&(0,P.jsxs)(`div`,{className:`pb-heading-actions`,children:[(0,P.jsxs)(`button`,{className:`pb-all-projects`,onClick:()=>m(`projects`),children:[`查看全部项目 `,(0,P.jsx)(n,{size:14})]}),(0,P.jsx)(`button`,{className:`pb-create`,onClick:g,children:`+ 新建项目`})]})]}),(0,P.jsx)(`p`,{className:`gc-tab-description`,children:S.note}),(0,P.jsxs)(`div`,{role:`tabpanel`,id:`gc-panel-`+S.id,"aria-labelledby":`gc-tab-`+S.id,tabIndex:0,className:`gc-tab-panel gc-tab-`+S.id,children:[S.id===`projects`&&(0,P.jsx)(a,{onExecute:_,projects:t,ready:o,onOpen:p,onCreate:g,showHeading:!1,previewLimit:8,onAllProjects:()=>m(`projects`)}),S.id===`tasks`&&(0,P.jsx)(`div`,{className:`gc-quick-tiers`,"aria-label":`运营策略任务速览`,children:[`test`,`incubate`,`scale`].map(t=>{let i=e.filter(e=>e.tier===t),a=i.filter(e=>e.work?.active?.length),o=i.filter(e=>u(e)),s=i.find(e=>e.demoCurrent)||a[0]||i[0];return(0,P.jsxs)(`section`,{style:{"--tier":V[t]},children:[(0,P.jsxs)(`header`,{children:[(0,P.jsx)(`b`,{children:H[t]}),(0,P.jsxs)(`span`,{children:[i.length,`个商品 · `,a.length,`个运行中`]}),(0,P.jsx)(`button`,{onClick:()=>h(t),"aria-label":`查看`+H[t]+`全部商品`,children:(0,P.jsx)(r,{size:14})})]}),(0,P.jsxs)(`button`,{className:`gc-quick-line`,disabled:!s,onClick:()=>c(s,`work`),children:[(0,P.jsx)(`em`,{children:`正在做`}),(0,P.jsxs)(`span`,{children:[s?s.demoCurrent||f(s):`等待商品加入`,s&&(0,P.jsx)(`small`,{children:s.projectName})]})]}),(0,P.jsxs)(`button`,{className:`gc-quick-line`,onClick:()=>s?c(s,`data`):d(null,t),children:[(0,P.jsx)(`em`,{children:`下一步`}),(0,P.jsx)(`span`,{children:s?.demoNext||(t===`test`?`核对点击和加购,选出潜力款`:t===`incubate`?`核对转化与成本,确认是否赚钱`:`检查推广效果,优化计划`)}),(0,P.jsx)(r,{size:12})]}),(0,P.jsxs)(`button`,{className:`gc-quick-alert `+(o.length?`has-issues`:``),onClick:()=>o.length?c(o[0],`work`):h(t),children:[o.length?`需要你处理 `+o.length+` 项 · `+u(o[0]):`暂无待处理提醒`,(0,P.jsx)(n,{size:12})]})]},t)})}),(0,P.jsxs)(l,{group:`cockpit.`+S.id,className:`gc-main-grid`,children:[S.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`商品经营趋势`,className:`gc-panel gc-sales`,children:[(0,P.jsx)(G,{title:`商品经营趋势`,sub:`按商品查看归档数据,保留真实波动`,children:(0,P.jsx)(`div`,{className:`gc-toggle`,children:[7,30].map(e=>(0,P.jsxs)(`button`,{"aria-pressed":A===e,onClick:()=>N(e),children:[e,`天`]},e))})}),(0,P.jsxs)(`div`,{className:`gc-selects`,children:[(0,P.jsx)(`select`,{"aria-label":`驾驶舱商品`,value:B?.key||``,onChange:e=>{D(e.target.value),k(``)},children:e.map(e=>(0,P.jsxs)(`option`,{value:e.key,children:[e.title||e.projectName,` · `,e.shopName||e.itemId]},e.key))}),(0,P.jsx)(`select`,{"aria-label":`驾驶舱趋势指标`,value:K?.key||``,onChange:e=>k(e.target.value),children:B?.series.map(e=>(0,P.jsx)(`option`,{value:e.key,children:e.name},e.key))}),(0,P.jsxs)(`button`,{disabled:!B,onClick:()=>c(B,`data`),children:[`明细 `,(0,P.jsx)(r,{size:12})]})]}),(0,P.jsx)(te,{series:K,days:A,onOpen:()=>B?c(B,`monitor`):m(`projects`)},B?.key+`|`+K?.key+`|`+A),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`单商品数据,不等于全店销售额 · 缺失日期不连线 · 来源见归档详情`})]},`sales`),S.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`商品运营分组`,className:`gc-panel gc-structure`,children:[(0,P.jsx)(G,{title:`商品运营分组`,sub:`点击分类,查看商品和下一步`}),(0,P.jsxs)(`div`,{className:`gc-ring`,children:[(0,P.jsxs)(`svg`,{viewBox:`0 0 160 160`,role:`img`,"aria-label":Y.map(e=>e.name+e.count+`个`).join(`,`),children:[(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`62`,fill:`none`,stroke:`#1e355b`,strokeWidth:`1`,strokeDasharray:`2 4`}),(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`50`,fill:`none`,stroke:`#152849`,strokeWidth:`18`}),se.filter(e=>e.count>0).map(e=>(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`50`,fill:`none`,stroke:V[e.id],strokeWidth:`18`,strokeDasharray:`${e.length} ${314.16-e.length}`,strokeDashoffset:-e.offset,transform:`rotate(-90 80 80)`},e.id)),(0,P.jsx)(`text`,{x:`80`,y:`80`,textAnchor:`middle`,className:`gc-ring-number`,children:o?e.length:`—`}),(0,P.jsx)(`text`,{x:`80`,y:`98`,textAnchor:`middle`,children:`商品观察对象`})]}),(0,P.jsx)(`div`,{className:`gc-ring-legend`,children:Y.map(t=>(0,P.jsxs)(`button`,{onClick:()=>h(t.id),children:[(0,P.jsx)(`i`,{style:{background:V[t.id]}}),(0,P.jsx)(`span`,{children:t.name}),(0,P.jsx)(`b`,{children:t.count}),(0,P.jsxs)(`small`,{children:[e.length?Math.round(t.count/e.length*100):0,`%`]}),(0,P.jsx)(r,{size:12})]},t.id))})]}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`同一商品在不同项目中分别记录;人工策略分组以保存记录为准,不代表全店经营梯队。`})]},`structure`),S.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`销售构成`,className:`gc-panel gc-ranking`,children:[(0,P.jsx)(G,{title:ue?`商品销售排行`:`销售构成`,sub:Q?Q.start+` — `+Q.end+` · 同一份销售账本`:`按同一统计期的销售账本排名`}),(0,P.jsx)(`div`,{className:`gc-rank-list`,children:$.map((e,t)=>(0,P.jsxs)(`button`,{onClick:()=>p(e.project||Q.project,{tab:e.itemId?`monitor`:`data`,itemId:e.itemId}),children:[(0,P.jsx)(`i`,{children:t+1}),(0,P.jsxs)(`span`,{title:e.name||e.itemId,children:[e.name||e.itemId,(0,P.jsx)(`small`,{children:e.itemId||e.count+`个商品`})]}),(0,P.jsx)(`div`,{children:(0,P.jsx)(`b`,{style:{width:Math.max(2,e.sales/de*100)+`%`}})}),(0,P.jsxs)(`strong`,{children:[`¥`,z(e.sales)]})]},e.project+`|`+(e.itemId||e.name)))}),!$.length&&(0,P.jsxs)(`p`,{className:`gc-no-data`,children:[`还没有同期商品销售明细。`,(0,P.jsx)(`button`,{onClick:()=>m(`data`),children:`查看已有资料`})]}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:ue?`点击商品核对明细 · 销售排名不代表盈利排名`:`原件按品类汇总,点击查看归档;不是单品排名`})]},`ranking`),S.id===`tasks`&&(0,P.jsxs)(`section`,{"data-layout-label":`巡店检查`,className:`gc-panel gc-inspect`,children:[(0,P.jsx)(G,{title:`巡店检查`,sub:`基于归档与任务状态 · 点击查看待办`,children:(0,P.jsx)(j,{size:17})}),(0,P.jsx)(`div`,{className:`gc-checks`,children:le.map(t=>(0,P.jsxs)(`button`,{disabled:!t.items.length,onClick:()=>t.label===`待选择运营分组`?d(t.items[0]):c(t.items[0],`work`),children:[(0,P.jsx)(`span`,{children:t.label}),(0,P.jsx)(`div`,{children:(0,P.jsx)(`i`,{style:{width:`${e.length?t.items.length/e.length*100:0}%`,background:t.color}})}),(0,P.jsx)(`b`,{children:o?t.items.length:`—`}),(0,P.jsx)(r,{size:12})]},t.label))}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`同一商品可有多项提醒,数量不可相加;点击先处理一项。`}),(0,P.jsxs)(`div`,{className:`gc-archive`,children:[(0,P.jsx)(ne,{count:i.length}),(0,P.jsxs)(`button`,{onClick:()=>m(`data`),children:[`查看来源 `,(0,P.jsx)(n,{size:12})]})]})]},`inspect`),S.id===`history`&&(0,P.jsxs)(`section`,{"data-layout-label":`项目阶段记录`,className:`gc-panel gc-matrix`,children:[(0,P.jsx)(G,{title:`项目阶段记录`,sub:`节点流程与历史六步记录分别保留,点击核对对应阶段`,children:(0,P.jsxs)(`button`,{onClick:()=>m(`projects`),children:[`全部项目 `,(0,P.jsx)(n,{size:12})]})}),(0,P.jsx)(`div`,{className:`gc-state-legend`,children:Object.entries(W).map(([e,t])=>(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{className:e}),t]},e))}),(0,P.jsxs)(`div`,{className:`gc-matrix-scroll`,children:[t.slice(0,8).map(e=>(0,P.jsxs)(`div`,{className:`gc-matrix-row`,children:[(0,P.jsxs)(`button`,{className:`gc-project-name`,title:e.name,onClick:()=>p(e.id,{tab:`overview`}),children:[e.name,(0,P.jsxs)(`small`,{children:[e.done,`/`,e.total,` 阶段已确认`]})]}),(0,P.jsx)(`div`,{children:e.route.map((t,n)=>(0,P.jsx)(`button`,{className:`gc-cell `+t.state,"aria-label":`${e.name}:${t.name},${W[t.state]}`,title:`${t.name} · ${W[t.state]}`,onClick:()=>p(e.id,t.target),children:String(n+1).padStart(2,`0`)},t.id))})]},e.id)),!t.length&&(0,P.jsx)(`p`,{className:`gc-no-data`,children:`当前范围还没有项目。`})]})]},`matrix`),S.id===`history`&&(0,P.jsxs)(`section`,{"data-layout-label":`项目历史时间轴`,className:`gc-panel gc-history`,children:[(0,P.jsx)(G,{title:`项目历史时间轴`,sub:y?`模拟历史记录;每天的记录合并为一个色块`:`按真实归档时间显示;每天的记录合并为一个色块`,children:(0,P.jsx)(`div`,{className:`gc-toggle`,children:[14,30].map(e=>(0,P.jsxs)(`button`,{"aria-pressed":F===e,onClick:()=>I(e),children:[e,`天`]},e))})}),X>0?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`gc-time-header`,children:[(0,P.jsx)(`span`,{children:`项目 / 点击查看记录`}),(0,P.jsx)(`div`,{children:[0,.25,.5,.75,1].map(e=>(0,P.jsx)(`span`,{children:new Date(Z+(X-Z)*e).toISOString().slice(5,10)},e))})]}),(0,P.jsx)(`div`,{className:`gc-time-scroll`,children:ce.filter(e=>e.replay.some(e=>Date.parse(e.at)>=Z)).slice(0,7).map(e=>(0,P.jsxs)(`div`,{className:`gc-time-row`,children:[(0,P.jsx)(`button`,{title:e.name,onClick:()=>R({project:e,events:e.replay}),children:e.name}),(0,P.jsx)(`div`,{children:re(e.replay.filter(e=>Date.parse(e.at)>=Z)).map(t=>(0,P.jsx)(`button`,{className:`gc-event `+(t.events.some(e=>/失败|停止/.test(e.state))?`bad`:t.events.some(e=>/确认|完成/.test(e.state))?`done`:`saved`),style:{left:`${(Date.parse(t.events[0].at)-Z)/(X-Z)*100}%`},title:`${t.date} · ${t.events.length} 条记录`,"aria-label":`${e.name}:${t.date},${t.events.length}条记录`,onClick:()=>R({project:e,events:t.events,date:t.date}),children:t.events.length},t.date))})]},e.id))}),(0,P.jsxs)(`p`,{className:`gc-footnote`,children:[`最近有记录的日期窗口 · 每个项目最多展示最近120条记录 · 点击色块展开当天记录,不代表运行时长;`,y?`演示操作会追加记录。`:`完整回放在项目执行页。`]})]}):(0,P.jsx)(`p`,{className:`gc-no-data`,children:`暂无可回放的历史记录。`})]},`history`),S.id===`tasks`&&(0,P.jsxs)(`section`,{"data-layout-label":`需要你处理`,className:`gc-panel gc-todo`,children:[(0,P.jsx)(G,{title:`需要你处理`,sub:`先做这一件,再继续下一步`,children:(0,P.jsxs)(`span`,{className:`gc-badge`,children:[J.length,` 项`]})}),(0,P.jsxs)(`div`,{className:`gc-todo-list`,children:[J.map((e,t)=>(0,P.jsxs)(`button`,{onClick:()=>e.tier===`unassigned`?d(e):c(e,`work`),children:[(0,P.jsx)(`span`,{className:`gc-todo-num`,children:String(t+1).padStart(2,`0`)}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`b`,{children:u(e)}),(0,P.jsxs)(`span`,{children:[e.title||e.projectName,` · `,e.shopName||e.itemId]}),(0,P.jsx)(`small`,{children:f(e)})]}),(0,P.jsx)(r,{size:15})]},e.key)),!J.length&&(0,P.jsx)(`p`,{className:`gc-no-data`,children:o?`当前没有商品待办。`:`正在读取…`}),(0,P.jsx)(`h3`,{className:`gc-next-label`,children:`接下来可以做`}),t.slice(0,5).map(e=>(0,P.jsxs)(`button`,{onClick:()=>p(e.id,{tab:`overview`}),children:[(0,P.jsx)(`span`,{className:`gc-next-dot`}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`b`,{children:e.name}),(0,P.jsx)(`span`,{children:`查看项目节点与下一步`})]}),(0,P.jsx)(r,{size:13})]},`next-`+e.id))]})]},`todo`)]})]}),L&&(0,P.jsx)(ie,{...L,onClose:()=>R(null),onOpen:p}),(0,P.jsxs)(`div`,{className:`gc-status-strip`,children:[(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{}),` `,y?`教学模拟`:`归档数据`,` · `,e.length,` 个商品`]}),(0,P.jsxs)(`span`,{children:[t.length,` 个项目 · `,t.filter(e=>e.started).length,` 个已开展 · `,t.filter(e=>e.complete).length,` 个流程已确认`]}),(0,P.jsxs)(`span`,{children:[q,` 项运行中 · `,ae,` 项待执行`]}),(0,P.jsxs)(`button`,{onClick:()=>m(`products`),children:[`展开运营工作清单 `,(0,P.jsx)(n,{size:13})]})]})]})}function ne({count:e}){return(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`b`,{children:e}),` 份归档资料可追溯`]})}function re(e){let t=new Map;for(let n of e){let e=new Date(Date.parse(n.at)+8*36e5).toISOString().slice(0,10);t.set(e,[...t.get(e)||[],n])}return[...t].map(([e,t])=>({date:e,events:t}))}function ie({project:e,events:t,date:n,onClose:r,onOpen:i}){let a=(0,M.useRef)(null);return(0,M.useEffect)(()=>{a.current?.showModal()},[]),(0,P.jsxs)(`dialog`,{className:`ta-dialog gc-history-dialog`,ref:a,onClose:r,"aria-labelledby":`gc-history-title`,children:[(0,P.jsxs)(`div`,{className:`ta-dialog-head`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:e.name}),(0,P.jsxs)(`h2`,{id:`gc-history-title`,children:[n||`项目历史`,` · `,t.length,` 条记录`]})]}),(0,P.jsx)(`button`,{"aria-label":`关闭历史记录`,onClick:r,children:`×`})]}),(0,P.jsx)(`p`,{children:`按发生时间排列。展开记录,查看当时做了什么。`}),(0,P.jsx)(`div`,{className:`gc-records`,children:t.map((t,n)=>(0,P.jsxs)(`details`,{children:[(0,P.jsxs)(`summary`,{children:[(0,P.jsx)(`span`,{children:new Date(t.at).toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`})}),(0,P.jsx)(`b`,{children:t.name}),(0,P.jsx)(`em`,{children:t.state})]}),(0,P.jsx)(`p`,{children:t.detail||`此记录没有保存详细说明,可进入对应阶段核对原始资料。`}),(0,P.jsx)(`button`,{onClick:()=>{r(),i(e.id,e.route.find(e=>e.id===t.routeId)?.target||{tab:`data`})},children:`进入对应阶段 / 资料`})]},n))})]})}function ae(){let e=C(),[,t]=o(),[n,r]=(0,M.useState)(null),[i,a]=(0,M.useState)(!0),[s,l]=(0,M.useState)(``),[u,f]=(0,M.useState)(``),[m,_]=(0,M.useState)(0),[v,y]=w(`workbench.scope`,`real`),[b,x]=(0,M.useState)(null),[S,T]=(0,M.useState)(null);(0,M.useEffect)(()=>{let t=!0;return I(e.api).then(e=>{t&&(r(e),l(``))}).catch(e=>{t&&(r(null),l(e instanceof Error?e.message:`经营资料读取失败`))}).finally(()=>{t&&a(!1)}),()=>{t=!1}},[e.api,m]);let E=e=>v===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`,O=n?.growth.products.filter(E)||[],k=n?.growth.catalog.filter(E)||[],A=n?.projects.filter(e=>v===`stored-demo`?e.simulated:!e.simulated)||[],j={sales:n?.growth.metrics?.sales?.filter(E)||[],finance:n?.growth.metrics?.finance?.filter(E)||[],incubation:n?.growth.metrics?.incubation?.filter(E)||[]},N=(0,M.useCallback)(()=>{a(!0),_(e=>e+1)},[]);c(A.some(e=>e.execution?.state===`running`),N);function F(t,n){n===`work`?T(t):n===`data`?e.onProductGroup(`all`,t,v):e.onOpen(t.project,{tab:n,itemId:t.itemId})}return(0,P.jsx)(`div`,{className:`workbench-module`,children:(0,P.jsx)(`div`,{className:`gw`,children:(0,P.jsxs)(`div`,{className:`gw-body`,children:[(0,P.jsxs)(`header`,{className:`gw-header`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:`工作台 / 经营总览`}),(0,P.jsx)(`h1`,{children:`电商运营作战台`})]}),(0,P.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{className:`gw-dot`}),v===`stored-demo`?`模拟归档 · 非真实经营`:`归档数据 · 非实时`]}),(0,P.jsxs)(`button`,{disabled:i,onClick:N,children:[(0,P.jsx)(g,{size:14}),i?`读取中`:`刷新数据`]})]})]}),(0,P.jsxs)(`div`,{className:`gw-scope`,children:[(0,P.jsx)(`div`,{children:[[`real`,`非模拟资料`],[`stored-demo`,`模拟资料`]].map(([e,t])=>(0,P.jsx)(`button`,{"aria-pressed":v===e,onClick:()=>{y(e),x(null),T(null),f(``)},children:t},e))}),(0,P.jsx)(`span`,{children:n?`${new Date(n.growth.updatedAt).toLocaleString(`zh-CN`)} 读取归档`:`正在读取归档…`})]}),s&&(0,P.jsxs)(`p`,{role:`alert`,className:`gw-message`,children:[s,` `,(0,P.jsx)(`button`,{onClick:N,children:`重试`})]}),u&&(0,P.jsx)(`p`,{role:`status`,className:`gw-message`,children:u}),(0,P.jsx)(K,{layoutScope:e.layoutScope,onDirty:e.onDirty,onCreate:e.onCreate,onExecute:async(t,n)=>{await h(e.api,t.id,n,t.execution?.version||0),N()},products:O,projects:A,catalog:k,metrics:j,ready:!i&&!!n,demo:!1,onOpen:e.onOpen,onNav:n=>{n===`projects`&&t(v),e.onModule(n)},onTier:t=>e.onProductGroup(t,void 0,v),onAction:F,onAssign:(e,t)=>x({product:e,suggestedTier:t})}),b&&(0,P.jsx)(d,{...b,products:O,onDirty:e.onDirty,onBusy:e.onBusy,onClose:()=>x(null),onSave:async(t,n,r,i)=>{await D(e.api,t,n,r,i),f(`分组已保存,正在更新看板。`),N()}}),S&&(0,P.jsx)(p,{product:S,onOpen:e.onOpen,onClose:()=>T(null)})]})})})}function J({section:e}){let t=C();return e===`tasks`||e===`records`?(0,P.jsx)(F,{mode:e,api:t.api,onOpen:t.onOpen},e):(0,P.jsx)(ae,{})}export{J as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./project-public-D9qvuaHV.js","./index-CDS2fIqN.js","./index-DYn6t59z.css","./demand-planning-client-DzZj_Q__.js","./arrow-right-Bsei-31a.js","./chevron-down-BoU_rWJ-.js","./git-branch-Cv69GSy-.js","./project-execution-VeMKoL0M.js","./play-DaJyx8oA.js","./workspace-view-state-C1Tia7X4.js","./EvidenceSourceGuide-CEmQ3sdi.js","./HelpTip-BcLBMmZW.js","./HelpTip-BsHPhMNf.css","./demand-planning-client-DVOcsKAy.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./Directory-D0rZfh_1.js";import{p as t,r as n,t as r,u as i}from"./index-CDS2fIqN.js";var a=t(i(),1),o=n(),s=(0,a.lazy)(()=>r(()=>import(`./project-public-D9qvuaHV.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url));function c({section:t,project:n}){return n?(0,o.jsx)(a.Suspense,{fallback:(0,o.jsx)(`p`,{role:`status`,children:`正在打开项目资料…`}),children:(0,o.jsx)(s,{section:t,project:n})}):(0,o.jsx)(e,{})}export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./check-QN7RSzdG.js";import{t as r}from"./arrow-right-Bsei-31a.js";import{t as i}from"./chevron-down-BoU_rWJ-.js";import{t as a}from"./chevron-left-D1Tjivki.js";import{t as o}from"./chevron-right-CGVsdWp6.js";import{t as s}from"./clock-3-B99KnTzW.js";import{t as c}from"./plus-D0cC0DpO.js";import{t as l}from"./refresh-cw-OG4-Ic4x.js";import{t as u}from"./search-I3gdKVV9.js";import{a as d,i as f,l as p,o as m,p as h,r as g,s as _,u as v}from"./index-CDS2fIqN.js";import{n as y}from"./workspace-view-state-C1Tia7X4.js";import"./public-DTqkVQos.js";import{$ as b,A as x,At as S,B as C,C as w,Ct as T,D as ee,Dt as E,E as te,Et as D,F as O,G as k,H as ne,I as A,J as re,K as ie,L as ae,M as j,N as oe,O as M,Ot as N,P,Q as se,R as ce,S as le,St as ue,T as de,Tt as fe,U as pe,V as me,W as he,X as ge,Y as F,Z as I,_ as _e,_t as ve,a as L,at as R,b as ye,bt as z,c as be,ct as xe,d as Se,dt as Ce,et as we,f as Te,ft as Ee,g as De,gt as B,h as Oe,ht as ke,i as Ae,it as je,j as Me,k as Ne,kt as Pe,l as Fe,lt as Ie,m as Le,mt as V,n as Re,nt as ze,o as Be,ot as Ve,p as He,pt as Ue,q as We,r as Ge,rt as Ke,s as qe,st as Je,t as Ye,tt as Xe,u as Ze,ut as Qe,v as $e,vt as et,w as tt,wt as nt,x as rt,xt as it,y as at,yt as ot,z as st}from"./LineChart-DC_iIB4m.js";var ct=_(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),lt=_(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),ut=_(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),dt=_(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),ft=_(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),pt=_(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),mt=_(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ht=_(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),H=h(v()),U=g();function gt(e){return(0,U.jsx)(`a`,{...e})}var _t={categoryId:``,month:``,view:`categories`,metric:`sales`,recentYear:!1,q:``,sort:`sales`,direction:`desc`,page:1,pageSize:100,minPrice:``,maxPrice:``};function vt(e,t){return y(`market.`+e,t)}var yt=[[`sales`,`销售额`,`money`],[`marketShare`,`市占率`,`percent`],[`views`,`浏览量`,`number`],[`conversionRate`,`支付转化率`,`percent`],[`unitPrice`,`件单价`,`money`],[`units`,`成交件数`,`number`],[`searches`,`搜索量`,`number`],[`searchShare`,`搜索量占比`,`percent`],[`paidClicks`,`付费点击量`,`number`],[`paidClickShare`,`付费点击量占比`,`percent`],[`listingDays`,`上架天数`,`number`],[`listedProducts`,`在榜商品数`,`number`],[`promotionRoi`,`推广 ROI`,`number`],[`uvValue`,`UV 价值`,`money`],[`viewValue`,`浏览价值`,`money`],[`orderPrice`,`客单价`,`money`],[`orders`,`成交订单数`,`number`],[`cartRate`,`加购率`,`percent`],[`salesYoy`,`销售额同比`,`percent`],[`salesMom`,`销售额环比`,`percent`],[`activeProducts`,`动销商品数`,`number`]],bt=class extends Error{constructor(e,t){super(t),this.status=e}};async function xt(e,t){let n=await fetch(e,{signal:t,credentials:`same-origin`,cache:`no-store`});if(!n.ok)throw new bt(n.status,n.status===403?`企业尚未获得此类目授权`:n.status===401?`登录已失效,请重新登录`:n.status===404||n.status===501?`共享市场查询服务待接入`:`市场服务暂时无法连接`);if(!n.headers.get(`content-type`)?.includes(`application/json`))throw new bt(501,`共享市场查询服务待接入`);return n.json()}var W={analyses:e=>xt(`/v1/market/shop-categories?view=analyses`,e),saveAnalysis:async e=>{let t=await fetch(`/v1/market/shop-categories?view=analyses`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw new bt(t.status,n.error||`分析未保存,请稍后重试`);return n},shopLayout:(e,t)=>xt(`/v1/market/shop-categories?`+new URLSearchParams(e),t),bootstrap:e=>xt(`/v1/market/bootstrap`,e),query:(e,t)=>xt(`/v1/market/dashboard?`+new URLSearchParams(Object.entries(e).map(([e,t])=>[e,String(t)])),t),record:(e,t)=>xt(`/v1/market/records/`+encodeURIComponent(e),t),favorite:async(e,t,n)=>{let r=await fetch(`/v1/market/favorites`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e,key:t,saved:n})});if(!r.ok)throw Error(`收藏未保存,请检查权限和连接`);return r.json()},distribution:(e,t)=>xt(`/v1/market/price-distribution?`+new URLSearchParams(Object.entries(e).map(([e,t])=>[e,String(t)])),t),shopCategories:(e,t)=>xt(`/v1/market/shop-categories/`+e,t)},St=[`listingDays`,`sales`,`marketShare`,`views`,`conversionRate`,`unitPrice`,`units`,`searches`,`searchShare`,`paidClicks`,`paidClickShare`],Ct=[`sales`,`marketShare`,`views`,`conversionRate`,`unitPrice`,`units`,`searches`,`searchShare`,`paidClicks`,`paidClickShare`,`listedProducts`];function G(e){if(e)try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.href:void 0}catch{return}}function K(e,t=`number`){if(e==null||!Number.isFinite(e))return`—`;if(t===`percent`)return e.toLocaleString(`zh-CN`,{maximumFractionDigits:2})+`%`;if(t===`number`)return e.toLocaleString(`zh-CN`,{maximumFractionDigits:2});let n=Math.abs(e);return(n>=1e8?(e/1e8).toFixed(2)+` 亿`:n>=1e4?(e/1e4).toFixed(2)+` 万`:e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}))+(t===`money`?`元`:``)}function q(e,t){let n=[],r=new Set,i=e.find(e=>e.id===t);for(;i&&!r.has(i.id);)r.add(i.id),n.unshift(i),i=e.find(e=>e.id===i?.parentId);return n}var wt=e=>null;wt.displayName=`Cell`;var Tt=(e,t,n)=>{var r=ke();return(i,a)=>o=>{e?.(i,a,o),r(Me({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},Et=e=>{var t=ke();return(n,r)=>i=>{e?.(n,r,i),t(Ne())}},Dt=(e,t,n)=>{var r=ke();return(i,a)=>o=>{e?.(i,a,o),r(x({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},Ot=(e,t,n)=>{var r=n??e;if(!ue(r))return ot(r,t,0)},kt=(e,t,n)=>{var r={},i=e.filter(ae),a=e.filter(e=>e.stackId==null),o=i.reduce((e,t)=>{var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},r),s=Object.entries(o).map(e=>{var[r,i]=e;return{stackId:r,dataKeys:i.map(e=>e.dataKey),barSize:Ot(t,n,i[0]?.barSize)}}),c=a.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>e!=null),barSize:Ot(t,n,e.barSize)}));return[...s,...c]};function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?At(Object(n),!0).forEach(function(t){Mt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mt(e,t,n){return(t=Nt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nt(e){var t=Pt(e,`string`);return typeof t==`symbol`?t:t+``}function Pt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ft(e,t,n,r,i){var a=r.length;if(!(a<1)){var o=ot(e,n,0,!0),s,c=[];if(Ue(r[0]?.barSize)){var l=!1,u=n/a,d=r.reduce((e,t)=>e+(t.barSize||0),0);d+=(a-1)*o,d>=n&&(d-=(a-1)*o,o=0),d>=n&&u>0&&(l=!0,u*=.9,d=a*u);var f={offset:((n-d)/2>>0)-o,size:0};s=r.reduce((e,t)=>{var n={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:f.offset+f.size+o,size:l?u:t.barSize??0}},r=[...e,n];return f=n.position,r},c)}else{var p=ot(t,n,0,!0);n-2*p-(a-1)*o<=0&&(o=0);var m=(n-2*p-(a-1)*o)/a;m>1&&(m>>=0);var h=Ue(i)?Math.min(m,i):m;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p+(m+o)*n+(m-h)/2,size:h}}],c)}return s}}var It=(e,t,n,r,i,a,o)=>{var s=ue(o)?t:o,c=Ft(n,r,i===a?a:i,e,s);return i!==a&&c!=null&&(c=c.map(e=>jt(jt({},e),{},{position:jt(jt({},e.position),{},{offset:e.position.offset-i/2})}))),c},Lt=(e,t)=>{var n=ce(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:a}=i;if(a)return a.find(e=>e.key===n)}}}},Rt=(e,t)=>{if(!(e==null||t==null)){var n=e.find(e=>e.stackId===t.stackId&&t.dataKey!=null&&e.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function zt(e,t){return e&&typeof e==`object`&&`zIndex`in e&&typeof e.zIndex==`number`&&Ue(e.zIndex)?e.zIndex:t}function J(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function Y(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var Bt=(e,t,n)=>j(e,`xAxis`,J(e,t),n),Vt=(e,t,n)=>O(e,`xAxis`,J(e,t),n),Ht=(e,t,n)=>j(e,`yAxis`,Y(e,t),n),Ut=(e,t,n)=>O(e,`yAxis`,Y(e,t),n),Wt=V([I,Bt,Ht,Vt,Ut],(e,t,n,r,i)=>Ce(e,`xAxis`)?je(t,r,!1):je(n,i,!1)),Gt=V([A,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),Kt=e=>Ce(I(e),`xAxis`)?`yAxis`:`xAxis`,qt=(e,t)=>Kt(e)===`yAxis`?Y(e,t):J(e,t),Jt=V([I,Bt,Ht,Vt,Ut,V([Gt,(e,t,n)=>P(e,Kt(e),qt(e,t),n)],(e,t)=>{if(!(e==null||t==null)){var{stackId:n}=e,r=ce(e);if(!(n==null||r==null)){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),k,Wt,Gt,ne],(e,t,n,r,i,a,o,s,c,l)=>{var{chartData:u,dataStartIndex:d,dataEndIndex:f}=o;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:p}=c,m=p&&p.length>0?p:u?.slice(d,f+1);if(m!=null)return xn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:d,areaSettings:c,stackedData:a,displayedData:m,chartBaseValue:l,bandSize:s})}}),Yt=[`id`],Xt=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function Zt(){return Zt=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},Zt.apply(null,arguments)}function Qt(e,t){if(e==null)return{};var n,r,i=$t(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $t(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function en(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?en(Object(n),!0).forEach(function(t){nn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nn(e,t,n){return(t=rn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rn(e){var t=an(e,`string`);return typeof t==`symbol`?t:t+``}function an(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function on(e,t){return e&&e!==`none`?e:t}var sn=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:a,hide:o}=e;return[{inactive:o,dataKey:t,type:a,color:on(r,i),value:Ie(n,t),payload:e}]},cn=H.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:a,name:o,hide:s,unit:c,tooltipType:l,id:u}=e,d={dataDefinedOnItem:n,getPosition:fe,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Ie(o,t),hide:s,type:l,color:on(r,a),unit:c,graphicalItemId:u}};return H.createElement(_e,{tooltipEntrySettings:d})});function ln(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:a,dataKey:o}=r,s=N(r);return H.createElement(He,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function un(e){var{showLabels:t,children:n,points:r}=e,i=r.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return tn(tn({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return H.createElement(rt,{value:t?i:void 0},n)}function dn(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:a}=e,{layout:o,type:s,stroke:c,connectNulls:l,isRange:u}=a,{id:d}=a,f=Qt(a,Yt),p=N(f),m=E(f);return H.createElement(H.Fragment,null,t?.length>1&&H.createElement(D,{clipPath:r?`url(#clipPath-${i})`:void 0},H.createElement(re,Zt({},m,{id:d,points:t,connectNulls:l,type:s,baseLine:n,layout:o,stroke:`none`,className:`recharts-area-area`})),c!==`none`&&H.createElement(re,Zt({},p,{className:`recharts-area-curve`,layout:o,type:s,connectNulls:l,fill:`none`,points:t})),c!==`none`&&u&&Array.isArray(n)&&H.createElement(re,Zt({},p,{className:`recharts-area-curve`,layout:o,type:s,connectNulls:l,fill:`none`,points:n}))),H.createElement(ln,{points:t,props:f,clipPathId:i}))}function fn(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,a=r[0]?.y,o=r[r.length-1]?.y;if(!Ue(a)||!Ue(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return T(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),T(c)?H.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function pn(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,a=r[0]?.x,o=r[r.length-1]?.x;if(!Ue(a)||!Ue(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return T(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),T(c)?H.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function mn(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:a}=e;return n===`vertical`?H.createElement(fn,{alpha:t,points:r,baseLine:i,strokeWidth:a}):H.createElement(pn,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function hn(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a}=e,{points:o,baseLine:s,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:p}=r,m=ie((0,H.useMemo)(()=>({points:o,baseLine:s}),[o,s]),`recharts-area-`),h=se(),[g,_]=(0,H.useState)(!1),v=!g,y=(0,H.useCallback)(()=>{typeof p==`function`&&p(),_(!1)},[p]),b=(0,H.useCallback)(()=>{typeof f==`function`&&f(),_(!0)},[f]);if(h==null)return null;var x=i.current,S=a.current;return H.createElement(un,{showLabels:v,points:o},r.children,H.createElement(We,{animationId:m,begin:l,duration:u,isActive:c,easing:d,onAnimationEnd:y,onAnimationStart:b,key:m},e=>{if(x){var l=x.length/o.length,u=e===1?o:o.map((t,n)=>{var r=Math.floor(n*l);if(x[r]){var i=x[r];return tn(tn({},t),{},{x:z(i.x,t.x,e),y:z(i.y,t.y,e)})}return t}),d=T(s)?z(S,s,e):ue(s)||it(s)?z(S,0,e):s.map((t,n)=>{var r=Math.floor(n*l);if(Array.isArray(S)&&S[r]){var i=S[r];return tn(tn({},t),{},{x:z(i.x,t.x,e),y:z(i.y,t.y,e)})}return t});return e>0&&(i.current=u,a.current=d),H.createElement(dn,{points:u,baseLine:d,needClip:t,clipPathId:n,props:r})}return e>0&&(i.current=o,a.current=s),H.createElement(D,null,c&&H.createElement(`defs`,null,H.createElement(`clipPath`,{id:`animationClipPath-${n}`},H.createElement(mn,{alpha:e,points:o,baseLine:s,layout:h,strokeWidth:r.strokeWidth}))),H.createElement(D,{clipPath:`url(#animationClipPath-${n})`},H.createElement(dn,{points:o,baseLine:s,needClip:t,clipPathId:n,props:r})))}),H.createElement(le,{label:r.label}))}function gn(e){var{needClip:t,clipPathId:n,props:r}=e,i=(0,H.useRef)(null),a=(0,H.useRef)();return H.createElement(hn,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var _n=class extends H.PureComponent{render(){var{hide:e,dot:t,points:n,className:r,top:i,left:a,needClip:o,xAxisId:s,yAxisId:c,width:l,height:u,id:d,baseLine:f,zIndex:p}=this.props;if(e)return null;var m=S(`recharts-area`,r),h=d,{r:g,strokeWidth:_}=Be(t),v=ye(t),y=g*2+_,b=o?`url(#clipPath-${v?``:`dots-`}${h})`:void 0;return H.createElement(de,{zIndex:p},H.createElement(D,{className:m},o&&H.createElement(`defs`,null,H.createElement(qe,{clipPathId:h,xAxisId:s,yAxisId:c}),!v&&H.createElement(`clipPath`,{id:`clipPath-dots-${h}`},H.createElement(`rect`,{x:a-y/2,y:i-y/2,width:l+y,height:u+y}))),H.createElement(gn,{needClip:o,clipPathId:h,props:this.props})),H.createElement(Se,{points:n,mainColor:on(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:b}),this.props.isRange&&Array.isArray(f)&&H.createElement(Se,{points:f,mainColor:on(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:b}))}},vn={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,xAxisId:0,yAxisId:0,zIndex:st.area};function yn(e){var{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,connectNulls:a,dot:o,fill:s,fillOpacity:c,hide:l,isAnimationActive:u,legendType:d,stroke:f,xAxisId:p,yAxisId:m}=e,h=Qt(e,Xt),g=b(),_=te(),{needClip:v}=be(p,m),y=Xe(),{points:x,isRange:S,baseLine:C}=B(t=>Jt(t,e.id,y))??{},w=Te();if(g!==`horizontal`&&g!==`vertical`||w==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var{height:T,width:ee,x:E,y:D}=w;return!x||!x.length?null:H.createElement(_n,Zt({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:C,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:T,hide:l,layout:g,isAnimationActive:u,isRange:S,legendType:d,needClip:v,points:x,stroke:f,width:ee,left:E,top:D,xAxisId:p,yAxisId:m}))}var bn=(e,t,n,r,i)=>{var a=n??t;if(T(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a===`dataMin`?l:a===`dataMax`||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]};function xn(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:a,chartBaseValue:o,xAxis:s,yAxis:c,displayedData:l,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=i&&i.length,h=bn(a,o,n,s,c),g=a===`horizontal`,_=!1,v=l.map((e,n)=>{var a;if(m)a=i[u+n];else{var o=Qe(e,r);Array.isArray(o)?(a=o,_=!0):a=[h,o]}var l=a?.[1]??null,v=l==null||m&&!t&&Qe(e,r)==null;return g?{x:Je({axis:s,ticks:d,bandSize:p,entry:e,index:n}),y:v?null:c.scale.map(l)??null,value:a,payload:e}:{x:v?null:s.scale.map(l)??null,y:Je({axis:c,ticks:f,bandSize:p,entry:e,index:n}),value:a,payload:e}});return{points:v,baseLine:(m||_?v.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:t!=null&&e.y!=null?c.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:s.scale.map(t)??null,y:e.y,payload:e.payload}}):g?c.scale.map(h):s.scale.map(h))??0,isRange:_}}function Sn(e){var t=ve(e,vn),n=Xe();return H.createElement(Oe,{id:t.id,type:`area`},e=>H.createElement(H.Fragment,null,H.createElement(De,{legendPayload:sn(t)}),H.createElement(cn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),H.createElement(Le,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:xe(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),H.createElement(yn,Zt({},t,{id:e}))))}var Cn=H.memo(Sn,ge);Cn.displayName=`Area`;var wn=!0,Tn=`Invariant failed`;function En(e,t){if(!e){if(wn)throw Error(Tn);var n=typeof t==`function`?t():t,r=n?`${Tn}: ${n}`:Tn;throw Error(r)}}function Dn(){return Dn=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},Dn.apply(null,arguments)}function On(e){return H.createElement($e,Dn({shapeType:`rectangle`,activeClassName:`recharts-active-bar`,inActiveClassName:`recharts-inactive-bar`},e))}var kn=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,r)=>{if(T(e))return e;var i=T(n)||ue(n);return i?e(n,r):(!i&&En(!1,`minPointSize callback function received a value with type of ${typeof n}. Currently only numbers or null/undefined are supported.`),t)}},An=(e,t,n)=>n,jn=V([A,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`bar`).find(e=>e.id===t)),Mn=V([jn],e=>e?.maxBarSize),Nn=(e,t,n,r)=>r,Pn=V([I,A,J,Y,An],(e,t,n,r,i)=>t.filter(t=>e===`horizontal`?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===i).filter(e=>e.hide===!1).filter(e=>e.type===`bar`)),Fn=(e,t,n)=>{var r=I(e),i=J(e,t),a=Y(e,t);if(!(i==null||a==null))return r===`horizontal`?P(e,`yAxis`,a,n):P(e,`xAxis`,i,n)},In=V([Pn,pe,(e,t)=>{var n=I(e),r=J(e,t),i=Y(e,t);if(!(r==null||i==null))return n===`horizontal`?oe(e,`xAxis`,r):oe(e,`yAxis`,i)}],kt),Ln=(e,t,n)=>{var r=jn(e,t);if(r==null)return 0;var i=J(e,t),a=Y(e,t);if(i==null||a==null)return 0;var o=I(e),s=he(e),{maxBarSize:c}=r,l=ue(c)?s:c,u,d;return o===`horizontal`?(u=j(e,`xAxis`,i,n),d=O(e,`xAxis`,i,n)):(u=j(e,`yAxis`,a,n),d=O(e,`yAxis`,a,n)),je(u,d,!0)??l??0},Rn=(e,t,n)=>{var r=I(e),i=J(e,t),a=Y(e,t);if(!(i==null||a==null)){var o,s;return r===`horizontal`?(o=j(e,`xAxis`,i,n),s=O(e,`xAxis`,i,n)):(o=j(e,`yAxis`,a,n),s=O(e,`yAxis`,a,n)),je(o,s)}},zn=V([Ke,ze,(e,t,n)=>{var r=J(e,t);if(r!=null)return j(e,`xAxis`,r,n)},(e,t,n)=>{var r=Y(e,t);if(r!=null)return j(e,`yAxis`,r,n)},(e,t,n)=>{var r=J(e,t);if(r!=null)return O(e,`xAxis`,r,n)},(e,t,n)=>{var r=Y(e,t);if(r!=null)return O(e,`yAxis`,r,n)},V([V([In,he,me,C,Ln,Rn,Mn],It),jn],Rt),I,k,Rn,V([Fn,jn],Lt),jn,Nn],(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:h}=c;if(!(d==null||o==null||t==null||s!==`horizontal`&&s!==`vertical`||n==null||r==null||i==null||a==null||l==null)){var{data:g}=d,_=g!=null&&g.length>0?g:p?.slice(m,h+1);if(_!=null)return br({layout:s,barSettings:d,pos:o,parentViewBox:t,bandSize:l,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,stackedData:u,displayedData:_,offset:e,cells:f,dataStartIndex:m})}}),Bn=[`index`];function Vn(){return Vn=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},Vn.apply(null,arguments)}function Hn(e,t){if(e==null)return{};var n,r,i=Un(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Un(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Wn=(0,H.createContext)(void 0),Gn=e=>{var t=(0,H.useContext)(Wn);if(t!=null)return t.stackId;if(e!=null)return xe(e)},Kn=(e,t)=>`recharts-bar-stack-clip-path-${e}-${t}`,qn=e=>{var t=(0,H.useContext)(Wn);if(t!=null){var{stackId:n}=t;return`url(#${Kn(n,e)})`}},Jn=e=>{var{index:t}=e,n=Hn(e,Bn),r=qn(t);return H.createElement(D,Vn({className:`recharts-bar-stack-layer`,clipPath:r},n))},Yn=[`onMouseEnter`,`onMouseLeave`,`onClick`],Xn=[`value`,`background`,`tooltipPosition`],Zn=[`id`],Qn=[`onMouseEnter`,`onClick`,`onMouseLeave`];function $n(){return $n=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},$n.apply(null,arguments)}function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?er(Object(n),!0).forEach(function(t){tr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tr(e,t,n){return(t=nr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nr(e){var t=rr(e,`string`);return typeof t==`symbol`?t:t+``}function rr(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ir(e,t){if(e==null)return{};var n,r,i=ar(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ar(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var or=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:Ie(n,t),payload:e}]},sr=H.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:a,hide:o,unit:s,tooltipType:c,id:l}=e,u={dataDefinedOnItem:void 0,getPosition:fe,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:Ie(a,t),hide:o,type:c,color:i,unit:s,graphicalItemId:l}};return H.createElement(_e,{tooltipEntrySettings:u})});function cr(e){var t=B(M),{data:n,dataKey:r,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:c}=a,l=ir(a,Yn),u=Tt(o,r,a.id),d=Et(s),f=Dt(c,r,a.id);if(!i||n==null)return null;var p=Pe(i);return H.createElement(de,{zIndex:zt(i,st.barBackground)},n.map((e,n)=>{var{value:a,background:o,tooltipPosition:s}=e,c=ir(e,Xn);if(!o)return null;var m=u(e,n),h=d(e,n),g=f(e,n),_=X(X(X(X(X({option:i,isActive:String(n)===t},c),{},{fill:`#eee`},o),p),et(l,e,n)),{},{onMouseEnter:m,onMouseLeave:h,onClick:g,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return H.createElement(On,$n({key:`background-bar-${n}`},_))}))}function lr(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return X(X({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return H.createElement(rt,{value:t?i:void 0},n)}function ur(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:a,dataKey:o}=e,s=B(M),c=B(ee),l=n&&String(i.originalDataIndex)===s&&(c==null||o===c),[u,d]=(0,H.useState)(!1),[f,p]=(0,H.useState)(!1);(0,H.useEffect)(()=>{var e;return l?(d(!0),e=requestAnimationFrame(()=>{p(!0)})):p(!1),()=>{cancelAnimationFrame(e)}},[l]);var m=(0,H.useCallback)(()=>{l||d(!1)},[l]),h=l&&f,g=l||u,_=l?n===!0?t:n:t,v=H.createElement(On,$n({},r,{name:String(r.name)},i,{isActive:h,option:_,index:a,dataKey:o,onTransitionEnd:m}));return g?H.createElement(de,{zIndex:st.activeBar},H.createElement(Jn,{index:i.originalDataIndex},v)):v}function dr(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:a}=e;return H.createElement(On,$n({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:a}))}function fr(e){var{data:t,props:n}=e,r=N(n)??{},{id:i}=r,a=ir(r,Zn),{shape:o,dataKey:s,activeBar:c}=n,{onMouseEnter:l,onClick:u,onMouseLeave:d}=n,f=ir(n,Qn),p=Tt(l,s,i),m=Et(d),h=Dt(u,s,i);return t?H.createElement(H.Fragment,null,t.map((e,t)=>H.createElement(Jn,$n({index:e.originalDataIndex,key:`rectangle-${e?.x}-${e?.y}-${e?.value}-${t}`,className:`recharts-bar-rectangle`},et(f,e,t),{onMouseEnter:p(e,t),onMouseLeave:m(e,t),onClick:h(e,t)}),c?H.createElement(ur,{shape:o,activeBar:c,baseProps:a,entry:e,index:t,dataKey:s}):H.createElement(dr,{shape:o,baseProps:a,entry:e,index:t,dataKey:s})))):null}function pr(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:c,onAnimationEnd:l,onAnimationStart:u}=t,d=n.current,f=ie(t,`recharts-bar-`),[p,m]=(0,H.useState)(!1),h=!p,g=(0,H.useCallback)(()=>{typeof l==`function`&&l(),m(!1)},[l]),_=(0,H.useCallback)(()=>{typeof u==`function`&&u(),m(!0)},[u]);return H.createElement(lr,{showLabels:h,rects:r},H.createElement(We,{animationId:f,begin:o,duration:s,isActive:a,easing:c,onAnimationEnd:g,onAnimationStart:_,key:f},e=>{var a=e===1?r:r?.map((t,n)=>{var r=d&&d[n];if(r)return X(X({},t),{},{x:z(r.x,t.x,e),y:z(r.y,t.y,e),width:z(r.width,t.width,e),height:z(r.height,t.height,e)});if(i===`horizontal`){var a=z(0,t.height,e),o=z(t.stackedBarStart,t.y,e);return X(X({},t),{},{y:o,height:a})}var s=z(0,t.width,e),c=z(t.stackedBarStart,t.x,e);return X(X({},t),{},{width:s,x:c})});return e>0&&(n.current=a??null),a==null?null:H.createElement(D,null,H.createElement(fr,{props:t,data:a}))}),H.createElement(le,{label:t.label}),t.children)}function mr(e){var t=(0,H.useRef)(null);return H.createElement(pr,{previousRectanglesRef:t,props:e})}var hr=0,gr=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Qe(e,t)}},_r=class extends H.PureComponent{render(){var{hide:e,data:t,dataKey:n,className:r,xAxisId:i,yAxisId:a,needClip:o,background:s,id:c}=this.props;if(e||t==null)return null;var l=S(`recharts-bar`,r),u=c;return H.createElement(D,{className:l,id:c},o&&H.createElement(`defs`,null,H.createElement(qe,{clipPathId:u,xAxisId:i,yAxisId:a})),H.createElement(D,{className:`recharts-bar-rectangles`,clipPath:o?`url(#clipPath-${u})`:void 0},H.createElement(cr,{data:t,dataKey:n,background:s,allOtherBarProps:this.props}),H.createElement(mr,this.props)))}},vr={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:`ease`,background:!1,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`rect`,minPointSize:hr,xAxisId:0,yAxisId:0,zIndex:st.bar};function yr(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:c,animationEasing:l,isAnimationActive:u}=e,{needClip:d}=be(t,n),f=b(),p=Xe(),m=at(e.children,wt),h=B(t=>zn(t,e.id,p,m));if(f!==`vertical`&&f!==`horizontal`)return null;var g,_=h?.[0];return g=_==null||_.height==null||_.width==null?0:f===`vertical`?_.height/2:_.width/2,H.createElement(Fe,{xAxisId:t,yAxisId:n,data:h,dataPointFormatter:gr,errorBarOffset:g},H.createElement(_r,$n({},e,{layout:f,needClip:d,data:h,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:c,animationEasing:l,isAnimationActive:u})))}function br(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:i},pos:a,bandSize:o,xAxis:s,yAxis:c,xAxisTicks:l,yAxisTicks:u,stackedData:d,displayedData:f,offset:p,cells:m,parentViewBox:h,dataStartIndex:g}=e,_=t===`horizontal`?c:s,v=d?_.scale.domain():null,y=R({numericAxis:_}),b=_.scale.map(y);return f.map((e,f)=>{var _,x,S,C,w,T;if(d){var ee=d[f+g];if(ee==null)return null;_=Ee(ee,v)}else _=Qe(e,n),Array.isArray(_)||(_=[y,_]);var E=kn(r,hr)(_[1],f);if(t===`horizontal`){var te=c.scale.map(_[0]),D=c.scale.map(_[1]);if(te==null||D==null)return null;x=Ve({axis:s,ticks:l,bandSize:o,offset:a.offset,entry:e,index:f}),S=D??te??void 0,C=a.size;var O=te-D;if(w=it(O)?0:O,T={x,y:p.top,width:C,height:p.height},Math.abs(E)>0&&Math.abs(w)<Math.abs(E)){var k=nt(w||E)*(Math.abs(E)-Math.abs(w));S-=k,w+=k}}else{var ne=s.scale.map(_[0]),A=s.scale.map(_[1]);if(ne==null||A==null)return null;if(x=ne,S=Ve({axis:c,ticks:u,bandSize:o,offset:a.offset,entry:e,index:f}),C=A-ne,w=a.size,T={x:p.left,y:S,width:p.width,height:w},Math.abs(E)>0&&Math.abs(C)<Math.abs(E)){var re=nt(C||E)*(Math.abs(E)-Math.abs(C));C+=re}}return x==null||S==null||C==null||w==null||!i&&(C===0||w===0)?null:X(X({},e),{},{stackedBarStart:b,x,y:S,width:C,height:w,value:d?_:_[1],payload:e,background:T,tooltipPosition:{x:x+C/2,y:S+w/2},parentViewBox:h,originalDataIndex:f},m&&m[f]&&m[f].props)}).filter(Boolean)}function xr(e){var t=ve(e,vr),n=Gn(t.stackId),r=Xe();return H.createElement(Oe,{id:t.id,type:`bar`},e=>H.createElement(H.Fragment,null,H.createElement(De,{legendPayload:or(t)}),H.createElement(sr,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),H.createElement(Le,{type:`bar`,id:e,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null}),H.createElement(de,{zIndex:t.zIndex},H.createElement(yr,$n({},t,{id:e})))))}var Sr=H.memo(xr,ge);Sr.displayName=`Bar`;var Cr=[`axis`,`item`],wr=(0,H.forwardRef)((e,t)=>H.createElement(Re,{chartName:`BarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Cr,tooltipPayloadSearcher:tt,categoricalChartProps:e,ref:t})),Tr=[`axis`],Er=(0,H.forwardRef)((e,t)=>H.createElement(Re,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Tr,tooltipPayloadSearcher:tt,categoricalChartProps:e,ref:t})),Z={page:`_page_8zwrx_1`,primary:`_primary_8zwrx_69`,stickyHeader:`_stickyHeader_8zwrx_74`,breadcrumb:`_breadcrumb_8zwrx_83`,filterBar:`_filterBar_8zwrx_86`,tabs:`_tabs_8zwrx_90`,categoryControl:`_categoryControl_8zwrx_135`,dateControl:`_dateControl_8zwrx_136`,count:`_count_8zwrx_144`,period:`_period_8zwrx_159`,yearButton:`_yearButton_8zwrx_164`,segment:`_segment_8zwrx_187`,message:`_message_8zwrx_211`,categoryList:`_categoryList_8zwrx_227`,categoryLegend:`_categoryLegend_8zwrx_231`,categoryHeaders:`_categoryHeaders_8zwrx_253`,categoryRows:`_categoryRows_8zwrx_254`,categoryRow:`_categoryRow_8zwrx_254`,categoryName:`_categoryName_8zwrx_328`,categoryOpen:`_categoryOpen_8zwrx_336`,iconButton:`_iconButton_8zwrx_393`,rowActions:`_rowActions_8zwrx_402`,toolbar:`_toolbar_8zwrx_445`,search:`_search_8zwrx_455`,price:`_price_8zwrx_485`,configButton:`_configButton_8zwrx_509`,tableScroll:`_tableScroll_8zwrx_517`,sort:`_sort_8zwrx_563`,activeSort:`_activeSort_8zwrx_567`,productTable:`_productTable_8zwrx_571`,shopTable:`_shopTable_8zwrx_574`,shopName:`_shopName_8zwrx_592`,sales:`_sales_8zwrx_598`,identity:`_identity_8zwrx_602`,noImage:`_noImage_8zwrx_613`,productTitle:`_productTitle_8zwrx_631`,copyButton:`_copyButton_8zwrx_656`,shopId:`_shopId_8zwrx_663`,linkButton:`_linkButton_8zwrx_669`,anomaly:`_anomaly_8zwrx_676`,pagination:`_pagination_8zwrx_679`,ellipsis:`_ellipsis_8zwrx_719`,notice:`_notice_8zwrx_723`,sources:`_sources_8zwrx_733`,empty:`_empty_8zwrx_750`,emptyState:`_emptyState_8zwrx_757`,seasonBoard:`_seasonBoard_8zwrx_779`,hot:`_hot_8zwrx_785`,cold:`_cold_8zwrx_786`,neutral:`_neutral_8zwrx_787`,yearBoards:`_yearBoards_8zwrx_805`,productGrid:`_productGrid_8zwrx_849`,largeImage:`_largeImage_8zwrx_863`,picker:`_picker_8zwrx_926`,pickerPanel:`_pickerPanel_8zwrx_955`,cascade:`_cascade_8zwrx_987`,selectedCategory:`_selectedCategory_8zwrx_1021`,pickerResults:`_pickerResults_8zwrx_1024`,dialog:`_dialog_8zwrx_1038`,fieldLayout:`_fieldLayout_8zwrx_1079`,fieldTools:`_fieldTools_8zwrx_1098`,dialogActions:`_dialogActions_8zwrx_1134`,chart:`_chart_8zwrx_1142`,detailScope:`_detailScope_8zwrx_1147`,detailMetrics:`_detailMetrics_8zwrx_1152`};function Dr({title:e,children:t,onClose:n}){let r=(0,H.useRef)(null);return(0,H.useEffect)(()=>{let e=document.activeElement;return r.current?.showModal(),()=>e?.focus()},[]),(0,U.jsxs)(`dialog`,{ref:r,className:Z.dialog,onCancel:n,onClick:e=>{e.target===e.currentTarget&&n()},children:[(0,U.jsxs)(`header`,{children:[(0,U.jsx)(`h2`,{children:e}),(0,U.jsx)(`button`,{autoFocus:!0,onClick:n,"aria-label":`关闭弹窗`,children:(0,U.jsx)(f,{size:18})})]}),t]})}function Or({categories:e,value:t,onChoose:n,disabled:r}){let[a,s]=(0,H.useState)(``),[c,l]=(0,H.useState)(``),d=(0,H.useRef)(null);(0,H.useEffect)(()=>{function e(e){let t=d.current;t?.open&&e.target instanceof Node&&!t.contains(e.target)&&(t.open=!1)}return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[]);let f=q(e,c||t);function p(e){n(e),s(``),l(e),d.current&&(d.current.open=!1)}let m=[e.filter(e=>!e.parentId),...f.filter(e=>!e.leaf).map(t=>e.filter(e=>e.parentId===t.id))];return(0,U.jsxs)(`details`,{className:Z.picker,ref:d,onKeyDown:e=>{e.key===`Escape`&&d.current&&(d.current.open=!1,d.current.querySelector(`summary`)?.focus())},children:[(0,U.jsxs)(`summary`,{"aria-label":`选择市场类目`,"aria-disabled":r,onClick:e=>{r&&e.preventDefault()},children:[q(e,t).map(e=>e.name).join(` / `)||`全部类目`,(0,U.jsx)(i,{size:14})]}),(0,U.jsxs)(`div`,{className:Z.pickerPanel,children:[(0,U.jsxs)(`label`,{children:[(0,U.jsx)(u,{size:14}),(0,U.jsx)(`input`,{"aria-label":`查找授权类目`,placeholder:`搜索类目名称`,value:a,onChange:e=>s(e.target.value)})]}),(0,U.jsx)(`button`,{onClick:()=>p(``),children:`全部获准类目`}),a?(0,U.jsx)(`div`,{className:Z.pickerResults,children:e.filter(e=>e.name.includes(a)).slice(0,100).map(t=>(0,U.jsx)(`button`,{onClick:()=>p(t.id),children:q(e,t.id).map(e=>e.name).join(` / `)},t.id))}):(0,U.jsx)(`div`,{className:Z.cascade,children:m.map((e,t)=>(0,U.jsx)(`div`,{children:e.map(e=>(0,U.jsxs)(`div`,{onPointerEnter:t=>{t.pointerType===`mouse`&&l(e.id)},className:f.some(t=>t.id===e.id)?Z.selectedCategory:``,children:[(0,U.jsx)(`button`,{onClick:()=>p(e.id),children:e.name}),!e.leaf&&(0,U.jsx)(`button`,{"aria-label":`展开${e.name}`,"aria-expanded":f.some(t=>t.id===e.id),onClick:()=>l(e.id),children:(0,U.jsx)(o,{size:13})})]},e.id))},t))})]})]})}function kr({columns:e,allowed:t,onSave:n,onClose:r}){let[i,a]=(0,H.useState)(e),[o,s]=(0,H.useState)(null),c=e=>yt.find(t=>t[0]===e)?.[1];function l(e,t){a(n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r})}return(0,U.jsxs)(Dr,{title:`自定义数据字段(${i.length}/${t.length})`,onClose:r,children:[(0,U.jsxs)(`div`,{className:Z.fieldLayout,children:[(0,U.jsxs)(`section`,{children:[(0,U.jsx)(`h3`,{children:`排行榜指标`}),t.map(e=>(0,U.jsxs)(`label`,{children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:i.includes(e),onChange:t=>a(n=>t.target.checked?[...n,e]:n.filter(t=>t!==e))}),c(e)]},e))]}),(0,U.jsxs)(`section`,{children:[(0,U.jsxs)(`div`,{className:Z.fieldTools,children:[(0,U.jsxs)(`span`,{children:[`已选 `,i.length,`/`,t.length]}),(0,U.jsx)(`button`,{onClick:()=>a(t),children:`恢复默认`}),(0,U.jsx)(`button`,{onClick:()=>a([]),children:`清空`})]}),(0,U.jsx)(`h3`,{children:`当前字段顺序`}),(0,U.jsx)(`ol`,{children:i.map((e,t)=>(0,U.jsxs)(`li`,{draggable:!0,onDragStart:()=>s(e),onDragOver:e=>e.preventDefault(),onDrop:()=>{o&&l(i.indexOf(o),t),s(null)},children:[(0,U.jsxs)(`span`,{children:[`⠿ `,t+1,`. `,c(e)]}),(0,U.jsx)(`button`,{disabled:t===0,"aria-label":`上移${c(e)}`,onClick:()=>l(t,t-1),children:`↑`}),(0,U.jsx)(`button`,{disabled:t===i.length-1,"aria-label":`下移${c(e)}`,onClick:()=>l(t,t+1),children:`↓`})]},e))})]})]}),(0,U.jsxs)(`footer`,{className:Z.dialogActions,children:[(0,U.jsx)(`button`,{onClick:r,children:`取消`}),(0,U.jsx)(`button`,{className:Z.primary,onClick:()=>n(i),children:`确定`})]})]})}function Ar({points:e,metric:t=`sales`}){let n=(0,H.useRef)(null),[r,i]=(0,H.useState)(300);return(0,H.useEffect)(()=>{if(!n.current)return;let e=new ResizeObserver(([e])=>i(Math.max(200,Math.round(e.contentRect.width))));return e.observe(n.current),()=>e.disconnect()},[]),(0,U.jsx)(`div`,{ref:n,className:Z.chart,role:`img`,"aria-label":`月度数据趋势`,children:e.some(e=>e[t]!=null)?(0,U.jsxs)(Er,{width:r,height:260,data:e,margin:{top:15,right:20,left:10,bottom:0},children:[(0,U.jsx)(Ze,{stroke:`#263e57`,vertical:!1}),(0,U.jsx)(Ae,{dataKey:`month`,tick:{fill:`#93adc5`,fontSize:11}}),(0,U.jsx)(Ge,{width:76,tickFormatter:e=>K(e),tick:{fill:`#93adc5`,fontSize:11}}),(0,U.jsx)(w,{contentStyle:{background:`#10243b`,border:`1px solid #355978`,color:`#e4f0fc`},formatter:e=>K(Number(e),t===`sales`?`money`:`number`)}),(0,U.jsx)(Cn,{dataKey:t,type:`monotone`,fill:`#2aaad4`,fillOpacity:.15,stroke:`#4dc9f0`,strokeWidth:2,connectNulls:!1})]}):(0,U.jsx)(`p`,{className:Z.empty,children:`当前记录暂无可追踪的月度数据`})})}var jr=e=>yt.find(t=>t[0]===e)?.[1],Mr=(e,t)=>K(e[t],yt.find(e=>e[0]===t)?.[2]);function Nr({view:e,selection:t,onViewChange:n,onShopLayout:r}={}){let[i,s]=(0,H.useState)(null),[c,l]=(0,H.useState)(null),[f,p]=vt(`query`,_t);(0,H.useEffect)(()=>{p(n=>({...n,...t?{categoryId:t.categoryId}:{},view:e||n.view,page:1}))},[e,t,p]);let[h,g]=(0,H.useState)(!0),[_,v]=(0,H.useState)(``),[y,b]=(0,H.useState)(0),[x,S]=(0,H.useState)(``),[C,w]=vt(`productFields`,St),[T,ee]=vt(`shopFields`,Ct),[E,te]=(0,H.useState)(!1),[D,O]=vt(`grid`,!1),[k,ne]=(0,H.useState)(f.minPrice),[A,re]=(0,H.useState)(f.maxPrice),[ie,ae]=(0,H.useState)([]),[j,oe]=(0,H.useState)(null),[M,N]=(0,H.useState)(null),[P,se]=(0,H.useState)(null),[ce,le]=(0,H.useState)(!1),[ue,de]=(0,H.useState)(``),[fe,pe]=(0,H.useState)([]),[me,he]=(0,H.useState)([]),ge=(0,H.useRef)(null);function F(e){e.view&&n?.(e.view),l(null),v(``),g(!0),p(t=>({...t,...e,page:e.page??1}))}function I(e){let t=i?.categories.find(t=>t.id===e);ne(``),re(``),F({categoryId:e,view:t?.leaf?`products`:`categories`,q:``,minPrice:``,maxPrice:``,sort:`sales`,direction:`desc`})}(0,H.useEffect)(()=>{let e=new AbortController;return(async()=>{if(await Promise.resolve(),!e.signal.aborted){g(!0),v(``),l(null),s(null);try{let t=await W.bootstrap(e.signal);if(e.signal.aborted)return;if(t.contractVersion!==1)throw Error(`市场查询契约版本不兼容`);s(t),ae((t.favorites||[]).map(e=>`${e.kind}:${e.key}`)),p(e=>{let n=t.categories.some(t=>t.id===e.categoryId);return{...e,categoryId:n?e.categoryId:``,view:n||!e.categoryId?e.view:`categories`,month:t.months.includes(e.month)?e.month:t.latestCategoryMonth||t.latestMonth||``}})}catch(t){e.signal.aborted||v(t.message)}finally{e.signal.aborted||g(!1)}}})(),()=>e.abort()},[y,p]),(0,H.useEffect)(()=>{if(!i||i.status!==`ready`||!f.month)return;let e=ge.current;ge.current=f;let t=e&&e.q!==f.q&&e.categoryId===f.categoryId&&e.view===f.view&&e.month===f.month?180:0,n=new AbortController,r=setTimeout(()=>{if(f.view!==`categories`&&!f.categoryId){g(!1),l(null);return}g(!0),W.query(f,n.signal).then(e=>{n.signal.aborted||l(e)}).catch(e=>{n.signal.aborted||(l(null),v(e.message),e.status===403?(s(null),b(e=>e+1)):e.status===401&&s(null))}).finally(()=>{n.signal.aborted||g(!1)})},t);return()=>{clearTimeout(r),n.abort()}},[f,i]),(0,H.useEffect)(()=>{if(!M)return;let e=new AbortController;return(async()=>{if(await Promise.resolve(),!e.signal.aborted){le(!0),de(``),pe([]),he([]),se(M.kind===`record`||M.kind===`shopCategories`?M.record:null);try{if(M.kind===`record`){let t=await W.record(M.record.key,e.signal);e.signal.aborted||se(t)}if(M.kind===`shopCategories`){let t=await W.shopCategories(M.record.key,e.signal);e.signal.aborted||pe(t.rows)}if(M.kind===`distribution`){let t=await W.distribution(f,e.signal);e.signal.aborted||pe(t.rows.map(e=>({name:e.label,sales:e.sales,products:e.products})))}if(M.kind===`categoryTrend`){let t=await W.query({...f,view:`categories`,categoryId:M.category.id},e.signal);e.signal.aborted||he(t.trend)}}catch(t){e.signal.aborted||de(t.message)}finally{e.signal.aborted||le(!1)}}})(),()=>e.abort()},[M,f]);let _e=q(i?.categories||[],f.categoryId),ve=_e.at(-1),L=f.view===`categories`,R=f.view===`products`,ye=i?.months.indexOf(f.month)??-1,z=R?C:T,be=c?.rows||[],xe=c?.categories||[],Se=f.metric===`units`?`units`:`sales`,Ce=c?.availability?.[R?`products`:`shops`],we=Math.max(1,Math.ceil((c?.total||0)/f.pageSize)),Te=f.month?new Date(Date.UTC(Number(f.month.slice(0,4)),Number(f.month.slice(5,7)),0)).toISOString().slice(0,10):``;async function Ee(e){try{if(window.omni){let t=await window.omni.copyText(e);if(!t.ok)throw Error(t.error)}else await navigator.clipboard.writeText(e);S(`编号已复制`)}catch{S(`复制未完成,可选中编号复制`)}}async function De(e,t){if(j)return;let n=`${e}:${t}`,r=!ie.includes(n);oe(n);try{await W.favorite(e,t,r),ae(e=>r?[...e,n]:e.filter(e=>e!==n))}catch(e){S(e.message)}finally{oe(null)}}function B(e,t,n){return(0,U.jsx)(`button`,{className:Z.iconButton,disabled:j!==null,"aria-label":`收藏${n}`,"aria-pressed":ie.includes(`${e}:${t}`),onClick:()=>void De(e,t),children:(0,U.jsx)(ht,{size:14,fill:ie.includes(`${e}:${t}`)?`currentColor`:`none`})})}function Oe(e){return(0,U.jsxs)(`div`,{className:Z.identity,children:[G(e.imageUrl)?(0,U.jsx)(`a`,{href:G(e.imageUrl),target:`_blank`,rel:`noreferrer`,children:(0,U.jsx)(`img`,{src:G(e.imageUrl),alt:e.name||`商品图片`,loading:`lazy`,referrerPolicy:`no-referrer`})}):(0,U.jsx)(`span`,{className:Z.noImage,children:(0,U.jsx)(pt,{size:20})}),(0,U.jsxs)(`div`,{children:[G(e.url)?(0,U.jsx)(`a`,{className:Z.productTitle,href:G(e.url),target:`_blank`,rel:`noreferrer`,children:e.name||`资料缺失`}):(0,U.jsx)(`button`,{className:Z.productTitle,onClick:()=>N({kind:`record`,record:e}),children:e.name||`资料缺失`}),(0,U.jsxs)(`small`,{children:[`商品ID:`,e.id||`编号缺失`,e.id&&(0,U.jsx)(`button`,{className:Z.copyButton,"aria-label":`复制商品编号${e.id}`,onClick:()=>void Ee(e.id),children:(0,U.jsx)(m,{size:12})})]})]})]})}function ke(e,t=!1){let n=t?e.shopUrl:e.url,r=t?e.shopName:e.name;return G(n)?(0,U.jsx)(`a`,{href:G(n),target:`_blank`,rel:`noreferrer`,children:r||`资料缺失`}):(0,U.jsx)(`span`,{children:r||`资料缺失`})}function Ae(e){return(0,U.jsx)(`th`,{children:(0,U.jsxs)(`button`,{onClick:()=>F({sort:e,direction:f.sort===e&&f.direction===`desc`?`asc`:`desc`}),children:[jr(e),(0,U.jsx)(`span`,{className:f.sort===e?Z.activeSort:Z.sort,children:f.sort===e?f.direction===`desc`?`↓`:`↑`:`↕`})]})},e)}function je(e,t){return(0,U.jsxs)(`td`,{className:t===`sales`?Z.sales:void 0,children:[Mr(e,t),t===`conversionRate`&&e[t]!=null&&(e[t]<0||e[t]>100)&&(0,U.jsxs)(`span`,{className:Z.anomaly,title:`来源转化率异常,保留原值`,children:[` `,`!`]})]},t)}function Me(){if(k&&!/^\d{1,9}(\.\d{1,2})?$/.test(k)||A&&!/^\d{1,9}(\.\d{1,2})?$/.test(A)||k&&A&&Number(k)>Number(A)){S(`请填写有效的非负件单价区间`);return}S(``),F({minPrice:k,maxPrice:A})}return(0,U.jsxs)(`section`,{className:Z.page,"aria-label":`市场大盘`,children:[(0,U.jsxs)(`div`,{className:Z.stickyHeader,children:[(0,U.jsxs)(`header`,{className:Z.breadcrumb,"aria-label":`页面路径`,children:[(0,U.jsx)(gt,{href:`/?mode=center&view=overview`,children:`工作台`}),(0,U.jsx)(o,{size:13}),(0,U.jsx)(`button`,{onClick:()=>F({view:`categories`,categoryId:``,q:``,recentYear:!1}),children:`市场洞察`}),_e.map(e=>(0,U.jsxs)(`span`,{children:[(0,U.jsx)(o,{size:13}),(0,U.jsx)(`button`,{onClick:()=>I(e.id),children:e.name})]},e.id)),L&&!_e.length&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(o,{size:13}),(0,U.jsx)(`span`,{children:`全部类目`})]}),!L&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(o,{size:13}),(0,U.jsx)(`span`,{"aria-current":`page`,children:R?`商品排行榜`:`店铺排行榜`})]})]}),(0,U.jsxs)(`section`,{className:Z.filterBar,"aria-label":`市场查询条件`,children:[(0,U.jsxs)(`div`,{className:Z.categoryControl,children:[(0,U.jsx)(Or,{categories:i?.categories||[],value:f.categoryId,onChoose:I,disabled:!i?.categories.length}),L&&(0,U.jsxs)(`span`,{className:Z.count,children:[ve?`子类目`:`类目`,` `,c?xe.length:`—`,` `,`个`]}),L&&(0,U.jsxs)(`div`,{className:Z.categoryLegend,"aria-label":`类目类型颜色说明`,children:[(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`i`,{"data-leaf":`false`}),`有下级`]}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`i`,{"data-leaf":`true`}),`叶子类目`]})]}),!L&&(0,U.jsx)(`nav`,{className:Z.tabs,role:`tablist`,"aria-label":`排行榜`,children:[[`products`,`商品排行榜`],[`shops`,`店铺排行榜`]].map(([e,t])=>(0,U.jsx)(`button`,{role:`tab`,"aria-selected":f.view===e,onClick:()=>F({view:e,q:``,sort:`sales`,direction:`desc`,minPrice:``,maxPrice:``}),children:t},e))})]}),(0,U.jsxs)(`div`,{className:Z.dateControl,children:[(0,U.jsxs)(`span`,{className:Z.period,children:[`统计时间:`,c?.period?.start||(f.month?f.month+`-01`:`—`),` `,`至 `,c?.period?.end||Te||`—`]}),(0,U.jsx)(`button`,{className:Z.yearButton,"aria-pressed":f.recentYear,disabled:!i?.months.length,onClick:()=>F({recentYear:!f.recentYear,q:``,sort:`sales`,direction:`desc`}),children:`最近1年`}),(0,U.jsxs)(`select`,{"aria-label":`统计月份`,value:f.month,disabled:!i?.months.length,onChange:e=>F({month:e.target.value,recentYear:!1}),children:[!i?.months.length&&(0,U.jsx)(`option`,{children:`等待可用月份`}),i?.months.map(e=>(0,U.jsxs)(`option`,{value:e,children:[e.replace(`-`,`年`),`月`]},e))]}),(0,U.jsx)(`button`,{"aria-label":`上一个可用月份`,disabled:ye<=0||h,onClick:()=>F({month:i.months[ye-1]}),children:(0,U.jsx)(a,{size:15})}),(0,U.jsx)(`button`,{"aria-label":`下一个可用月份`,disabled:!i||ye>=i.months.length-1||h,onClick:()=>F({month:i.months[ye+1]}),children:(0,U.jsx)(o,{size:15})}),L&&(0,U.jsx)(`div`,{className:Z.segment,children:[[`sales`,`销售额`],[`units`,`销量`],...ve?[[`season`,`行业淡旺季`]]:[]].map(([e,t])=>(0,U.jsx)(`button`,{"aria-pressed":f.metric===e,onClick:()=>F({metric:e}),children:t},e))})]})]})]}),x&&(0,U.jsxs)(`div`,{className:Z.message,role:`status`,children:[x,(0,U.jsx)(`button`,{"aria-label":`关闭提示`,onClick:()=>S(``),children:`×`})]}),_?(0,U.jsxs)(`section`,{className:Z.emptyState,role:`alert`,children:[(0,U.jsx)(d,{size:32}),(0,U.jsx)(`h2`,{children:_}),(0,U.jsx)(`button`,{onClick:()=>b(e=>e+1),children:`重新连接`})]}):i?.status===`no-access`?(0,U.jsxs)(`section`,{className:Z.emptyState,children:[(0,U.jsx)(`h2`,{children:`企业尚未获得市场类目授权`}),(0,U.jsx)(`p`,{children:`企业子账号继承企业的市场类目范围。`})]}):!L&&!f.categoryId?(0,U.jsxs)(`section`,{className:Z.emptyState,children:[(0,U.jsxs)(`h2`,{children:[`选择类目查看`,R?`商品`:`店铺`,`排行榜`]}),(0,U.jsx)(`p`,{children:`使用上方类目选择器,选择你要研究的具体类目。`})]}):(0,U.jsxs)(U.Fragment,{children:[!L&&(0,U.jsxs)(`div`,{className:Z.toolbar,children:[(0,U.jsxs)(`label`,{className:Z.search,children:[R&&!f.recentYear&&(0,U.jsx)(`span`,{children:`商品名称`}),(0,U.jsx)(u,{size:14}),(0,U.jsx)(`input`,{"aria-label":`搜索当前榜单`,placeholder:R?`请输入要搜索的商品名称或ID`:`请输入店铺名称`,value:f.q,onChange:e=>F({q:e.target.value})})]}),f.recentYear?(0,U.jsx)(`div`,{className:Z.segment,children:[`sales`,`views`].map(e=>(0,U.jsx)(`button`,{"aria-pressed":f.sort===e,onClick:()=>F({sort:e}),children:jr(e)},e))}):(0,U.jsxs)(U.Fragment,{children:[R?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{disabled:!i?.capabilities?.priceDistribution||Ce!==`ready`,onClick:()=>N({kind:`distribution`}),children:`客单价分布`}),(0,U.jsxs)(`div`,{className:Z.price,children:[(0,U.jsx)(`span`,{children:`件单价:`}),(0,U.jsxs)(`label`,{children:[(0,U.jsx)(`input`,{type:`number`,min:`0`,"aria-label":`最低件单价`,value:k,onChange:e=>ne(e.target.value)}),(0,U.jsx)(`span`,{children:`元`})]}),(0,U.jsx)(`span`,{children:`–`}),(0,U.jsxs)(`label`,{children:[(0,U.jsx)(`input`,{type:`number`,min:`0`,"aria-label":`最高件单价`,value:A,onChange:e=>re(e.target.value)}),(0,U.jsx)(`span`,{children:`元`})]}),(0,U.jsx)(`button`,{className:Z.primary,onClick:Me,children:`确定`}),(f.minPrice||f.maxPrice)&&(0,U.jsx)(`button`,{onClick:()=>{ne(``),re(``),F({minPrice:``,maxPrice:``})},children:`重置`})]}),(0,U.jsxs)(`div`,{className:Z.segment,children:[(0,U.jsxs)(`button`,{"aria-label":`大图视图`,"aria-pressed":D,onClick:()=>O(!0),children:[(0,U.jsx)(ut,{size:13}),`大图`]}),(0,U.jsxs)(`button`,{"aria-label":`列表视图`,"aria-pressed":!D,onClick:()=>O(!1),children:[(0,U.jsx)(ft,{size:13}),`列表`]})]})]}):(0,U.jsx)(`button`,{disabled:!0,title:`来源数据未提供地域字段`,children:`地域分布`}),(0,U.jsx)(`button`,{className:Z.configButton,onClick:()=>te(!0),children:`表格配置`})]})]}),h?(0,U.jsx)(`div`,{className:Z.empty,role:`status`,children:`正在读取市场数据…`}):L?f.metric===`season`?(0,U.jsxs)(`section`,{className:Z.seasonBoard,children:[(0,U.jsxs)(`table`,{children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`行业类目`}),(c?.period?.availableMonths||[]).map(e=>(0,U.jsx)(`th`,{children:e},e))]})}),(0,U.jsx)(`tbody`,{children:c?.season.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:e.name}),e.months.map(e=>(0,U.jsx)(`td`,{children:(0,U.jsx)(`span`,{className:e.state===`旺季`?Z.hot:e.state===`淡季`?Z.cold:Z.neutral,children:e.state||`资料缺失`})},e.month))]},e.categoryId))})]}),!c?.season.length&&(0,U.jsx)(`p`,{className:Z.empty,children:`淡旺季判定口径尚未配置,当前月份数据保持原值。`})]}):(0,U.jsxs)(`section`,{className:Z.categoryList,"aria-label":`类目列表`,children:[(0,U.jsx)(`div`,{className:Z.categoryHeaders,children:[0,1,2].map(e=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{children:`类目名称`}),(0,U.jsx)(`span`,{children:f.metric===`units`?`销量`:`销售额`}),(0,U.jsx)(`span`,{children:f.metric===`units`?`销量同比`:`销售额同比`}),(0,U.jsx)(`span`,{children:`店铺数`}),(0,U.jsx)(`span`,{})]},e))}),(0,U.jsx)(`div`,{className:Z.categoryRows,children:xe.map(e=>(0,U.jsxs)(`article`,{className:Z.categoryRow,"data-leaf":e.leaf,children:[(0,U.jsx)(`button`,{className:Z.categoryOpen,"aria-label":e.leaf?`查看${e.name}排行榜`:`进入${e.name}子类目`,onClick:()=>I(e.id)}),(0,U.jsxs)(`div`,{className:Z.categoryName,children:[(0,U.jsxs)(`span`,{title:e.name,children:[e.name,!e.leaf&&(0,U.jsx)(o,{size:12})]}),e.leaf&&(0,U.jsx)(`div`,{className:Z.rowActions,children:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{onClick:()=>F({categoryId:e.id,view:`products`,q:``}),children:`排行榜`}),(0,U.jsx)(`button`,{onClick:()=>N({kind:`categoryTrend`,category:e}),children:`趋势`})]})})]}),(0,U.jsx)(`strong`,{children:K(e[Se],Se===`sales`?`compact`:`number`)}),(0,U.jsx)(`span`,{children:K(f.metric===`units`?e.unitsYoy:e.salesYoy,`percent`)}),(0,U.jsx)(`span`,{children:K(e.shopCount)}),B(`category`,e.id,e.name)]},e.id))}),!xe.length&&(0,U.jsx)(`p`,{className:Z.empty,children:`当前类目已到最细层级,请选择商品或店铺排行榜。`})]}):f.recentYear?(0,U.jsx)(`section`,{className:Z.yearBoards,"aria-label":`最近一年月度榜单`,children:c?.monthlyRankings?.map(e=>(0,U.jsxs)(`article`,{children:[(0,U.jsxs)(`h2`,{children:[e.month.replace(`-`,`年`),`月`]}),(0,U.jsxs)(`table`,{children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`排名`}),(0,U.jsx)(`th`,{children:R?`商品`:`店铺`}),(0,U.jsx)(`th`,{children:f.sort===`views`?`浏览量`:`销售额`})]})}),(0,U.jsx)(`tbody`,{children:e.rows.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:e.sourceRank??`—`}),(0,U.jsxs)(`td`,{children:[R?Oe(e):ke(e),R&&(0,U.jsx)(`small`,{children:e.shopName||`店铺资料缺失`})]}),(0,U.jsx)(`td`,{children:K(e[f.sort===`views`?`views`:`sales`],f.sort===`views`?`number`:`compact`)})]},e.key))})]}),!e.rows.length&&(0,U.jsx)(`p`,{className:Z.empty,children:e.status===`pending`?`正在导入`:e.status===`missing`?`暂无该月来源数据`:`暂无匹配数据`})]},e.month))}):R&&D?(0,U.jsxs)(`section`,{className:Z.productGrid,children:[be.map(e=>(0,U.jsxs)(`article`,{children:[(0,U.jsxs)(`div`,{className:Z.largeImage,children:[G(e.imageUrl)?(0,U.jsx)(`img`,{src:G(e.imageUrl),alt:e.name||`商品图片`,loading:`lazy`,referrerPolicy:`no-referrer`}):(0,U.jsx)(pt,{size:44}),(0,U.jsxs)(`span`,{children:[`排名 `,e.sourceRank??`—`]}),B(`product`,e.key,e.name||`商品`)]}),Oe(e),(0,U.jsxs)(`p`,{children:[`店铺:`,ke(e,!0)]}),(0,U.jsx)(`dl`,{children:C.map(t=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{children:jr(t)}),(0,U.jsx)(`dd`,{children:Mr(e,t)})]},t))}),(0,U.jsx)(`button`,{onClick:()=>N({kind:`record`,record:e}),children:`查看销售走势`})]},e.key)),!be.length&&(0,U.jsx)(`p`,{className:Z.empty,children:Ce===`pending`?`当前类目榜单正在导入`:`暂无匹配商品`})]}):(0,U.jsxs)(`section`,{className:Z.tableScroll,"aria-label":R?`商品排行榜`:`店铺排行榜`,children:[(0,U.jsxs)(`table`,{className:R?Z.productTable:Z.shopTable,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`排名`}),R?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`th`,{children:`商品`}),C[0]===`listingDays`&&Ae(`listingDays`),(0,U.jsx)(`th`,{children:`收藏商品`}),(0,U.jsx)(`th`,{children:`店铺`}),(0,U.jsx)(`th`,{children:`销售走势`}),(0,U.jsx)(`th`,{children:`利润测算`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`th`,{children:`店铺ID`}),(0,U.jsx)(`th`,{children:`店铺名称`}),(0,U.jsx)(`th`,{children:`店铺收藏`}),(0,U.jsx)(`th`,{children:`销售走势`}),(0,U.jsx)(`th`,{children:`品类分析`})]}),z.filter(e=>!R||C[0]!==`listingDays`||e!==`listingDays`).map(Ae)]})}),(0,U.jsx)(`tbody`,{children:be.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:e.sourceRank??`—`}),R?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`td`,{children:Oe(e)}),C[0]===`listingDays`&&je(e,`listingDays`),(0,U.jsx)(`td`,{children:B(`product`,e.key,e.name||`商品`)}),(0,U.jsx)(`td`,{className:Z.shopName,children:ke(e,!0)}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`button`,{className:Z.linkButton,onClick:()=>N({kind:`record`,record:e}),children:`查看`})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`button`,{className:Z.linkButton,disabled:!0,title:`需要成本与费用口径,当前未配置`,children:`测算`})})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`td`,{children:(0,U.jsxs)(`span`,{className:Z.shopId,children:[e.id||`编号缺失`,e.id&&(0,U.jsx)(`button`,{className:Z.copyButton,"aria-label":`复制店铺编号${e.id}`,onClick:()=>void Ee(e.id),children:(0,U.jsx)(m,{size:12})})]})}),(0,U.jsx)(`td`,{className:Z.shopName,children:ke(e)}),(0,U.jsx)(`td`,{children:B(`shop`,e.key,e.name||`店铺`)}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`button`,{className:Z.linkButton,onClick:()=>N({kind:`record`,record:e}),children:`查看`})}),(0,U.jsxs)(`td`,{children:[(0,U.jsx)(`button`,{className:Z.linkButton,disabled:!e.id,title:e.id?`仅分析获准类目`:`缺少可追踪店铺编号`,onClick:()=>N({kind:`shopCategories`,record:e}),children:`分析`}),r&&e.id&&(0,U.jsx)(`button`,{className:Z.linkButton,onClick:()=>r({id:e.id,name:e.name||e.id},f.month),children:`归档布局`})]})]}),z.filter(e=>!R||C[0]!==`listingDays`||e!==`listingDays`).map(t=>je(e,t))]},e.key))})]}),!be.length&&(0,U.jsx)(`p`,{className:Z.empty,children:Ce===`pending`?`当前月份此类目榜单正在导入`:Ce===`missing`?`该类目暂无本月榜单,请选择其他月份或继续下钻`:`暂无匹配记录`})]}),!L&&!f.recentYear&&(0,U.jsxs)(`footer`,{className:Z.pagination,children:[(0,U.jsxs)(`span`,{children:[`共 `,K(c?.total),` 条 · 保留来源排名`]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`button`,{"aria-label":`上一页`,disabled:f.page<=1||h,onClick:()=>F({page:f.page-1}),children:(0,U.jsx)(a,{size:14})}),Array.from(new Set([1,...Array.from({length:5},(e,t)=>f.page-2+t).filter(e=>e>1&&e<we),we])).map((e,t,n)=>(0,U.jsxs)(`span`,{children:[t>0&&e-n[t-1]>1&&(0,U.jsx)(`span`,{className:Z.ellipsis,children:`…`}),(0,U.jsx)(`button`,{"aria-current":f.page===e?`page`:void 0,onClick:()=>F({page:e}),children:e})]},e)),(0,U.jsx)(`button`,{"aria-label":`下一页`,disabled:f.page>=we||h,onClick:()=>F({page:f.page+1}),children:(0,U.jsx)(o,{size:14})}),(0,U.jsx)(`select`,{"aria-label":`每页条数`,value:f.pageSize,onChange:e=>F({pageSize:Number(e.target.value)}),children:[25,50,100].map(e=>(0,U.jsxs)(`option`,{value:e,children:[e,` 条/页`]},e))}),(0,U.jsxs)(`label`,{children:[`跳至`,(0,U.jsx)(`input`,{"aria-label":`跳转页码`,type:`number`,min:`1`,max:we,defaultValue:f.page,onKeyDown:e=>{if(e.key===`Enter`){let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=1&&t<=we&&F({page:t})}}},f.page)]})]})]}),c?.notice&&(0,U.jsx)(`p`,{className:Z.notice,children:c.notice})]}),(0,U.jsxs)(`details`,{className:Z.sources,children:[(0,U.jsxs)(`summary`,{children:[(0,U.jsx)(dt,{size:13}),`数据来源与口径`]}),(0,U.jsxs)(`p`,{children:[c?.provenance.source||i?.sourceLabel||`共享市场数据库`,` ·`,` `,c?.provenance.updatedAt||`等待服务连接`]}),(0,U.jsx)(`p`,{children:c?.provenance.definition||`空值与零分别保留,按企业一级类目授权查询。`}),(0,U.jsx)(`p`,{children:`历史店铺缺少编号时仍保留榜单记录;缺少名称显示资料缺失,缺少有效链接时显示普通文本。收藏保存在当前账号下。`})]}),E&&(0,U.jsx)(kr,{columns:z,allowed:R?St:Ct,onClose:()=>te(!1),onSave:e=>{R?w(e):ee(e),te(!1)}}),M&&(0,U.jsx)(Dr,{title:M.kind===`distribution`?`件单价分布`:M.kind===`categoryTrend`?M.category.name:M.kind===`shopCategories`?`${M.record.name||`店铺`} · 品类分析`:M.record.name||`资料缺失`,onClose:()=>N(null),children:ue?(0,U.jsx)(`p`,{className:Z.notice,role:`alert`,children:ue}):ce?(0,U.jsx)(`p`,{className:Z.empty,children:`正在读取数据…`}):M.kind===`record`&&P?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:Z.detailScope,children:[f.month,` · 原榜排名 `,P.sourceRank??`—`,` ·`,` `,P.id||`编号缺失`]}),(0,U.jsx)(Ar,{points:P.trend}),(0,U.jsx)(`dl`,{className:Z.detailMetrics,children:yt.map(([e,t,n])=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{children:t}),(0,U.jsx)(`dd`,{children:K(P[e],n)})]},e))}),P.warnings?.map(e=>(0,U.jsx)(`p`,{className:Z.notice,children:e},e)),(0,U.jsxs)(`p`,{className:Z.detailScope,children:[`来源:`,P.source.file,` · 第 `,P.source.row,` 行`]})]}):M.kind===`categoryTrend`?(0,U.jsx)(Ar,{points:me,metric:f.metric===`units`?`units`:`sales`}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{className:Z.detailScope,children:M.kind===`distribution`?`按当前已入库商品榜单统计,非全市场商品分布`:`仅展示获准类目的店铺指标,各层级分别列示。`}),(0,U.jsxs)(`table`,{children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:M.kind===`distribution`?`件单价区间`:`类目`}),M.kind===`distribution`&&(0,U.jsx)(`th`,{children:`商品数`}),(0,U.jsx)(`th`,{children:`销售额`})]})}),(0,U.jsx)(`tbody`,{children:fe.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:e.name}),M.kind===`distribution`&&(0,U.jsx)(`td`,{children:K(e.products)}),(0,U.jsx)(`td`,{children:K(e.sales,`money`)})]},e.name))})]}),!fe.length&&(0,U.jsx)(`p`,{className:Z.empty,children:`当前范围暂无可用数据`})]})})]})}function Pr(e=``){return{month:e,shops:[],metric:`sales`,category:``,shopFilter:``,recentYear:!1,productView:`list`,columns:[`shop`,`category`,`sales`,`salesYoy`,`salesMom`,`views`,`trends`],q:``,sort:`sales`,direction:`desc`}}var Fr=(e,t)=>JSON.stringify({name:e.trim()||`未命名分析`,config:t});function Ir(e){let[t,n]=y(`market.analysisDraft.`+e.id,e),r=(0,H.useRef)(t);(0,H.useEffect)(()=>{r.current=t},[t]);let i=(0,H.useRef)(t.revision),a=(0,H.useRef)(Fr(e.name,e.config)),o=(0,H.useRef)(Promise.resolve()),[s,c]=(0,H.useState)(!1),[l,u]=(0,H.useState)(``),[d,f]=(0,H.useState)(()=>Fr(e.name,e.config)),p=(0,H.useCallback)(()=>{let e=r.current,t=Fr(e.name,e.config),s=o.current.catch(()=>{}).then(async()=>{if(a.current!==t){c(!0),u(``);try{let r=await W.saveAnalysis({id:e.id,name:e.name.trim()||`未命名分析`,config:e.config,revision:i.current});i.current=r.revision,a.current=t,f(t),n(e=>({...e,revision:r.revision,updatedAt:r.updatedAt}))}catch(e){throw u(e instanceof Error?e.message:`自动保存失败`),e}finally{c(!1)}}});return o.current=s,s},[n]),m=Fr(t.name,t.config);return(0,H.useEffect)(()=>{if(m===a.current)return;let e=setTimeout(()=>void p().catch(()=>{}),700);return()=>clearTimeout(e)},[m,d,p]),{draft:t,config:t.config,name:t.name,saving:s,error:l,dirty:m!==d,flush:p,setName:e=>n(t=>({...t,name:e})),change:e=>n(t=>({...t,config:{...t.config,...e}}))}}function Lr(e,t=0){let n=e?new URLSearchParams(e).toString():``,r=n+`:`+t,[i,a]=(0,H.useState)({key:``,data:null,error:``});return(0,H.useEffect)(()=>{if(!n)return;let e=new AbortController;return W.shopLayout(Object.fromEntries(new URLSearchParams(n)),e.signal).then(t=>{e.signal.aborted||a({key:r,data:t,error:``})}).catch(t=>{e.signal.aborted||a({key:r,data:null,error:t instanceof Error?t.message:`数据读取失败`})}),()=>e.abort()},[n,r]),i.key===r?{...i,loading:!1}:{data:null,error:``,loading:!!n}}var Rr=p(),Q={root:`_root_ku7ga_1`,dialog:`_dialog_ku7ga_2`,primary:`_primary_ku7ga_4`,historyHeader:`_historyHeader_ku7ga_5`,eyebrow:`_eyebrow_ku7ga_5`,history:`_history_ku7ga_5`,panelHeading:`_panelHeading_ku7ga_5`,historyList:`_historyList_ku7ga_6`,historyIcon:`_historyIcon_ku7ga_6`,historyTitle:`_historyTitle_ku7ga_6`,emptyHistory:`_emptyHistory_ku7ga_6`,editorHeader:`_editorHeader_ku7ga_7`,inline:`_inline_ku7ga_7`,editorIdentity:`_editorIdentity_ku7ga_7`,editorTools:`_editorTools_ku7ga_7`,nameInput:`_nameInput_ku7ga_7`,saveStatus:`_saveStatus_ku7ga_7`,panel:`_panel_ku7ga_5`,horizontal:`_horizontal_ku7ga_8`,shopName:`_shopName_ku7ga_8`,summaryTable:`_summaryTable_ku7ga_8`,link:`_link_ku7ga_8`,sort:`_sort_ku7ga_8`,note:`_note_ku7ga_9`,error:`_error_ku7ga_9`,empty:`_empty_ku7ga_6`,metricBar:`_metricBar_ku7ga_10`,chartRange:`_chartRange_ku7ga_10`,chart:`_chart_ku7ga_10`,trendChart:`_trendChart_ku7ga_10`,filters:`_filters_ku7ga_11`,columnOptions:`_columnOptions_ku7ga_11`,product:`_product_ku7ga_12`,noImage:`_noImage_ku7ga_12`,categoryCell:`_categoryCell_ku7ga_12`,pagination:`_pagination_ku7ga_12`,productCards:`_productCards_ku7ga_12`,searchForm:`_searchForm_ku7ga_13`,searchResults:`_searchResults_ku7ga_13`,rangeTrack:`_rangeTrack_ku7ga_17`,rangeWindow:`_rangeWindow_ku7ga_17`,rangeHandle:`_rangeHandle_ku7ga_17`,rangeGrip:`_rangeGrip_ku7ga_17`},zr=(e,t,n)=>Math.max(t,Math.min(n,e));function Br(e,t){if(t<=0)return{start:0,size:0};let n=zr(e.size,Math.min(3,t),t);return{start:zr(e.start,0,t-n),size:n}}var Vr=e=>Br({start:0,size:24},e);function Hr(e,t){if(t<=0)return{start:0,end:0,count:0};let n=Br(e,t),r=Math.round(n.size),i=zr(Math.round(n.start),0,t-r);return{start:i,end:i+r,count:r}}var Ur=(e,t,n)=>Br({...e,start:e.start+t},n);function Wr(e,t,n,r){let i=Br(e,r),a=zr(n,0,1),o=Br({start:0,size:i.size*t},r).size;return Br({start:i.start+a*(i.size-o),size:o},r)}function Gr(e,t,n,r){let i=Br(e,r),a=Math.min(3,r);if(t===`start`){let e=i.start+i.size,t=zr(n,0,e-a);return{start:t,size:e-t}}return{...i,size:zr(n,i.start+a,r)-i.start}}function Kr(e,t,n,r){let i=Math.max(1,n.width),a=t.deltaMode===1?16:t.deltaMode===2?i:1,o=(Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.deltaY)*a;if(t.ctrlKey||t.metaKey){let a=(t.clientX-n.left)/i;return Wr(e,Math.exp(zr(o*.003,-1,1)),a,r)}return Ur(e,o/i*e.size,r)}function qr({view:e,total:t,onChange:n}){let r=(0,H.useRef)(null),i=(0,H.useRef)(null);function a(t){if(t.button!==0||!r.current)return;let n=t.target.closest(`[data-range-part]`)?.dataset.rangePart;n!==`pan`&&n!==`start`&&n!==`end`||(i.current={kind:n,x:t.clientX,width:r.current.getBoundingClientRect().width,view:e,pointer:t.pointerId},t.currentTarget.setPointerCapture(t.pointerId),t.preventDefault())}function o(e){let r=i.current;if(!r||r.pointer!==e.pointerId)return;let a=(e.clientX-r.x)/Math.max(1,r.width)*t;n(()=>r.kind===`pan`?Ur(r.view,a,t):Gr(r.view,r.kind,(r.kind===`start`?r.view.start:r.view.start+r.view.size)+a,t))}function s(e,r){let i=e.key===`ArrowLeft`?-1:+(e.key===`ArrowRight`);i&&(e.preventDefault(),n(e=>Gr(e,r,(r===`start`?e.start:e.start+e.size)+i,t)))}return(0,U.jsx)(`div`,{ref:r,className:Q.rangeTrack,"aria-label":`图表显示范围`,onPointerDown:a,onPointerMove:o,onPointerUp:()=>{i.current=null},onPointerCancel:()=>{i.current=null},onLostPointerCapture:()=>{i.current=null},children:(0,U.jsxs)(`div`,{className:Q.rangeWindow,"data-range-part":`pan`,style:{left:`${e.start/t*100}%`,width:`${e.size/t*100}%`},children:[(0,U.jsx)(`span`,{role:`slider`,tabIndex:0,"aria-label":`起始类目`,"aria-valuemin":1,"aria-valuemax":t,"aria-valuenow":Math.round(e.start)+1,"data-range-part":`start`,onKeyDown:e=>s(e,`start`),className:Q.rangeHandle,children:`Ⅱ`}),(0,U.jsx)(`span`,{className:Q.rangeGrip,"data-range-part":`pan`,"aria-hidden":`true`,children:`···`}),(0,U.jsx)(`span`,{role:`slider`,tabIndex:0,"aria-label":`结束类目`,"aria-valuemin":1,"aria-valuemax":t,"aria-valuenow":Math.round(e.start+e.size),"data-range-part":`end`,onKeyDown:e=>s(e,`end`),className:Q.rangeHandle,children:`Ⅱ`})]})})}function Jr(e,t,n){let r=(0,H.useRef)(null),[i,a]=(0,H.useState)(()=>({scope:e,view:Vr(t)})),o=i.scope===e?Br(i.view,t):Vr(t),s=(0,H.useCallback)(n=>{a(r=>({scope:e,view:Br(n(r.scope===e?r.view:Vr(t)),t)}))},[e,t]);return(0,H.useEffect)(()=>{let e=r.current;if(!e||!n||t<2)return;function i(n){if(!e||!n.deltaX&&!n.deltaY)return;n.preventDefault(),n.stopPropagation();let r=(e.querySelector(`.recharts-cartesian-grid`)||e).getBoundingClientRect();s(e=>Kr(e,n,r,t))}return e.addEventListener(`wheel`,i,{passive:!1}),()=>e.removeEventListener(`wheel`,i)},[n,t,s]),{plot:r,view:o,indices:Hr(o,t),update:s}}var Yr=[`#469eff`,`#34b9ac`,`#d4a25c`],Xr=[{key:`sales`,label:`销售额`,unit:`元`},{key:`marketShare`,label:`市场占有率`,unit:`%`},{key:`itemCount`,label:`链接数`,unit:`个`},{key:`efficiency`,label:`链接效率`,unit:`元/链接`},{key:`views`,label:`浏览量`,unit:`次`}],$=(e,t=2)=>e==null?`—`:e.toLocaleString(`zh-CN`,{maximumFractionDigits:t}),Zr=e=>e==null?`—`:e>=1e8?$(e/1e8)+`亿`:e>=1e4?$(e/1e4)+`万`:$(e);function Qr({x:e=0,y:t=0,payload:n}){let r=Array.from(String(n?.value||``)),i=[];for(let e=0;e<r.length;e+=16)i.push(r.slice(e,e+16).join(``));return(0,U.jsx)(`g`,{transform:`translate(${e},${t+10}) rotate(-45)`,children:(0,U.jsx)(`text`,{textAnchor:`end`,fill:`var(--omni-muted,#91abc5)`,fontSize:10,children:i.map((e,t)=>(0,U.jsx)(`tspan`,{x:0,dy:t?12:0,children:e},t))})})}function $r({categories:e,shops:t,metric:n,onCategory:r,selectedCategory:i,selectedShop:a}){let[o,s]=(0,H.useState)(!1),{plot:c,view:l,indices:u,update:d}=Jr(e.map(e=>e.id).join(`,`),e.length,!o),{start:f,end:p,count:m}=u;function h(t){d(n=>Ur(n,t*m,e.length))}let g=Xr.find(e=>e.key===n),_=e.map(e=>({id:e.id,name:e.name,...Object.fromEntries(t.map(t=>[t.id,e.shops.find(e=>e.shopId===t.id)?.[n]??null]))})),v=_.slice(f,p);return(0,U.jsxs)(`section`,{className:Q.panel,"aria-label":g.label+`品类对比`,children:[(0,U.jsxs)(`div`,{className:Q.panelHeading,children:[(0,U.jsxs)(`h2`,{children:[g.label,(0,U.jsxs)(`small`,{children:[g.unit,` · 点击类目筛选商品`]})]}),(0,U.jsx)(`button`,{"aria-pressed":o,onClick:()=>s(!o),children:o?`查看图表`:`数据对比`})]}),o?(0,U.jsx)(`div`,{className:Q.horizontal,children:(0,U.jsxs)(`table`,{children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`叶子类目`}),t.map((e,t)=>(0,U.jsxs)(`th`,{children:[(0,U.jsx)(`i`,{style:{background:Yr[t]}}),e.name]},e.id))]})}),(0,U.jsx)(`tbody`,{children:e.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:(0,U.jsx)(`button`,{className:Q.link,onClick:()=>r(e.id),children:e.name})}),t.map(t=>(0,U.jsx)(`td`,{children:$(e.shops.find(e=>e.shopId===t.id)?.[n])},t.id))]},e.id))})]})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:Q.chartRange,children:[(0,U.jsxs)(`span`,{children:[`第 `,_.length?f+1:0,`–`,p,` 项 / 共 `,_.length,` 项`]}),_.length>12&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{onClick:()=>h(-1),disabled:f===0,children:`上一组`}),(0,U.jsx)(`button`,{onClick:()=>h(1),disabled:p===_.length,children:`下一组`}),(0,U.jsx)(`button`,{"aria-pressed":m===_.length,onClick:()=>d(()=>({start:0,size:_.length})),children:`显示全部`}),(0,U.jsx)(`button`,{"aria-pressed":m===Math.min(24,_.length),onClick:()=>d(()=>Vr(_.length)),children:`紧凑视图`}),(0,U.jsx)(`span`,{children:`滚轮 / 双指滑动平移 · Ctrl+滚轮 / 双指捏合缩放`})]})]}),(0,U.jsx)(`div`,{ref:c,className:Q.chart,"aria-label":`品类图表,可滚轮平移及缩放`,children:(0,U.jsx)(we,{width:`100%`,height:`100%`,children:(0,U.jsxs)(wr,{data:v,margin:{top:12,right:18,bottom:12,left:30},barCategoryGap:`12%`,barGap:2,accessibilityLayer:!0,children:[(0,U.jsx)(Ze,{stroke:`var(--omni-line,#29445f)`,vertical:!1}),(0,U.jsx)(Ae,{dataKey:`name`,interval:0,height:145,tick:(0,U.jsx)(Qr,{})}),(0,U.jsx)(Ge,{tick:{fontSize:10,fill:`var(--omni-muted,#91abc5)`},tickFormatter:e=>n===`sales`||n===`efficiency`?Zr(e):$(e,0),width:70}),(0,U.jsx)(w,{cursor:{fill:`var(--omni-panel,#132d49)`,opacity:.4},contentStyle:{background:`var(--omni-bg,#0a1524)`,border:`1px solid var(--omni-line,#29445f)`,borderRadius:8},formatter:e=>[$(typeof e==`number`?e:null)+` `+g.unit]}),(0,U.jsx)(F,{verticalAlign:`top`,height:34,wrapperStyle:{fontSize:12}}),t.map((e,t)=>(0,U.jsx)(Sr,{isAnimationActive:!1,dataKey:e.id,name:e.name,fill:Yr[t],maxBarSize:28,radius:[3,3,0,0],onClick:t=>{let n=v[t.originalDataIndex];n&&r(n.id,e.id)},children:v.map(t=>(0,U.jsx)(wt,{fillOpacity:i&&i===t.id&&(!a||a===e.id)?1:i?.7:1,stroke:i===t.id&&(!a||a===e.id)?`var(--omni-text,#dceaf7)`:void 0,strokeWidth:2},t.id))},e.id))]})})}),_.length>3&&(0,U.jsx)(qr,{view:l,total:_.length,onChange:d})]}),(0,U.jsx)(`p`,{className:Q.note,children:`链接效率=上榜商品销售额 ÷ 去重上榜链接数。浏览量为来源浏览次数;缺失值显示 —。`})]})}function ei({query:e,onClose:t}){let n=(0,H.useRef)(null),r=Lr({...e,view:`analysis-trend`});return(0,H.useEffect)(()=>{let e=document.activeElement;return n.current?.showModal(),()=>e?.focus()},[]),(0,Rr.createPortal)((0,U.jsxs)(`dialog`,{ref:n,className:Q.dialog,onCancel:e=>{e.preventDefault(),t()},onClick:e=>{e.target===e.currentTarget&&t()},"aria-label":`销售走势`,children:[(0,U.jsxs)(`div`,{className:Q.panelHeading,children:[(0,U.jsx)(`h2`,{children:r.data?.title||`销售走势`}),(0,U.jsx)(`button`,{autoFocus:!0,onClick:t,"aria-label":`关闭走势`,children:(0,U.jsx)(f,{size:18})})]}),r.loading?(0,U.jsx)(`p`,{role:`status`,children:`正在读取走势…`}):r.error?(0,U.jsx)(`p`,{role:`alert`,children:r.error}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:Q.trendChart,children:(0,U.jsx)(we,{width:`100%`,height:`100%`,children:(0,U.jsxs)(Ye,{data:r.data?.points,margin:{top:20,right:15,bottom:12,left:12},children:[(0,U.jsx)(Ze,{stroke:`var(--omni-line,#29445f)`,vertical:!1}),(0,U.jsx)(Ae,{dataKey:`month`,tick:{fontSize:10}}),(0,U.jsx)(Ge,{tickFormatter:Zr,tick:{fontSize:10},width:70}),(0,U.jsx)(w,{contentStyle:{background:`var(--omni-bg,#0a1524)`,border:`1px solid var(--omni-line,#29445f)`},formatter:e=>[Zr(typeof e==`number`?e:null),`销售额(元)`]}),(0,U.jsx)(L,{dataKey:`sales`,name:`销售额`,stroke:Yr[0],strokeWidth:2,dot:{r:3},connectNulls:!1})]})})}),(0,U.jsx)(`p`,{className:Q.note,children:r.data?.notice})]})]}),document.body)}var ti=[[`shop`,`店铺`],[`category`,`叶子类目`],[`sales`,`销售额`],[`salesYoy`,`销售额同比`],[`salesMom`,`销售额环比`],[`views`,`浏览量`],[`units`,`成交件数`],[`unitPrice`,`件单价`],[`marketShare`,`市占率`],[`trends`,`走势`]],ni=new Set([`sales`,`salesYoy`,`salesMom`,`views`,`units`,`unitPrice`,`marketShare`]);function ri(e,t=!1){try{let n=new URL(e||``);return n.protocol===`https:`&&(t?n.hostname.endsWith(`.alicdn.com`):/\.(taobao|tmall)\.com$/.test(n.hostname))?n.href:void 0}catch{return}}function ii({row:e}){let t=ri(e.imageUrl,!0);return t?(0,U.jsx)(`img`,{src:t,alt:``,loading:`lazy`,referrerPolicy:`no-referrer`}):(0,U.jsx)(`span`,{className:Q.noImage,children:`商品`})}function ai({config:e,layout:t,taxonomy:n,onChange:r,onTrend:i}){let[s,c]=(0,H.useState)(1),[l,d]=(0,H.useState)(e.q),[f,p]=(0,H.useState)(!1),m=[e.month,e.recentYear,e.category,e.shopFilter,e.q,e.sort,e.direction,e.shops.join(`,`)].join(`:`),[h,g]=(0,H.useState)(m),_=m===h?s:1,v=Lr({view:`analysis-items`,month:e.month,recentYear:String(e.recentYear),shops:e.shops.join(`,`),category:e.category,shopFilter:e.shopFilter,q:e.q,sort:e.sort,direction:e.direction,page:String(_),pageSize:`25`}),y=ti.filter(([t])=>e.columns.includes(t)),b=new Set(t.categories.flatMap(e=>q(n,e.id).map(e=>e.id))),x=n.filter(e=>b.has(e.id)).map(e=>({id:e.id,name:q(n,e.id).map(e=>e.name).join(` / `)})).sort((e,t)=>e.name.localeCompare(t.name,`zh-CN`));function S(t,n){i({kind:n,product:t.id,category:t.categoryId,shops:e.shops.join(`,`),shopFilter:t.shopId,month:e.month})}function C(e,t){if(t===`shop`)return e.shopName;if(t===`category`)return q(n,e.categoryId).map(e=>e.name).join(` / `)||e.categoryName;if(t===`trends`)return(0,U.jsxs)(`span`,{className:Q.inline,children:[(0,U.jsx)(`button`,{className:Q.link,onClick:()=>S(e,`product`),children:`商品`}),(0,U.jsx)(`button`,{className:Q.link,onClick:()=>S(e,`category`),children:`类目`})]});let r=e[t];return typeof r==`number`?t===`sales`||t===`unitPrice`?Zr(r):[`salesYoy`,`salesMom`,`marketShare`].includes(t)?$(r)+`%`:$(r,0):`—`}let w=e=>(0,U.jsxs)(`div`,{className:Q.product,children:[(0,U.jsx)(ii,{row:e}),(0,U.jsxs)(`div`,{children:[ri(e.url)?(0,U.jsx)(`a`,{href:ri(e.url),target:`_blank`,rel:`noreferrer`,children:e.name}):(0,U.jsx)(`b`,{children:e.name}),(0,U.jsxs)(`small`,{children:[`ID `,e.id,` · 原榜 `,e.sourceRank==null?`—`:`#`+e.sourceRank,e.conflicting?` · 指标冲突,保留为空`:``]})]})]});return(0,U.jsxs)(`section`,{className:Q.panel,"aria-label":`上榜商品链接列表`,children:[(0,U.jsxs)(`div`,{className:Q.panelHeading,children:[(0,U.jsxs)(`h2`,{children:[`上榜商品链接`,(0,U.jsxs)(`small`,{children:[$(v.data?.total,0),` 条`]})]}),(0,U.jsxs)(`div`,{className:Q.inline,children:[(0,U.jsx)(`button`,{"aria-label":`商品大图`,"aria-pressed":e.productView===`grid`,onClick:()=>r({productView:`grid`}),children:(0,U.jsx)(ut,{size:14})}),(0,U.jsx)(`button`,{"aria-label":`商品列表`,"aria-pressed":e.productView===`list`,onClick:()=>r({productView:`list`}),children:(0,U.jsx)(ft,{size:14})}),(0,U.jsxs)(`button`,{"aria-expanded":f,onClick:()=>p(!f),children:[(0,U.jsx)(mt,{size:14}),`表格配置`]})]})]}),(0,U.jsxs)(`div`,{className:Q.filters,children:[(0,U.jsxs)(`label`,{children:[`类目`,(0,U.jsxs)(`select`,{"aria-label":`上榜商品类目筛选`,value:b.has(e.category)?e.category:``,onChange:e=>r({category:e.target.value}),children:[(0,U.jsx)(`option`,{value:``,children:`全部上榜类目`}),x.map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,U.jsxs)(`label`,{children:[`店铺`,(0,U.jsxs)(`select`,{"aria-label":`上榜商品店铺筛选`,value:e.shopFilter,onChange:e=>r({shopFilter:e.target.value}),children:[(0,U.jsx)(`option`,{value:``,children:`全部对比店铺`}),t.shops.map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),r({q:l.trim()})},children:[(0,U.jsx)(u,{size:14}),(0,U.jsx)(`input`,{"aria-label":`搜索上榜商品`,value:l,onChange:e=>d(e.target.value),placeholder:`商品名称 / ID`,maxLength:100}),(0,U.jsx)(`button`,{type:`submit`,children:`搜索`})]}),e.category&&(0,U.jsx)(`button`,{className:Q.link,onClick:()=>r({category:``}),children:`清除类目筛选`})]}),f&&(0,U.jsxs)(`fieldset`,{className:Q.columnOptions,children:[(0,U.jsx)(`legend`,{children:`显示字段`}),ti.map(([t,n])=>(0,U.jsxs)(`label`,{children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:e.columns.includes(t),onChange:n=>r({columns:n.target.checked?[...e.columns,t]:e.columns.filter(e=>e!==t)})}),n]},t))]}),v.loading?(0,U.jsx)(`div`,{className:Q.empty,role:`status`,children:`正在读取上榜商品…`}):v.error?(0,U.jsx)(`div`,{className:Q.error,role:`alert`,children:v.error}):v.data?.rows.length?e.productView===`grid`?(0,U.jsx)(`div`,{className:Q.productCards,children:v.data.rows.map(e=>(0,U.jsxs)(`article`,{children:[w(e),(0,U.jsx)(`dl`,{children:y.map(([t,n])=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{children:n}),(0,U.jsx)(`dd`,{children:C(e,t)})]},t))})]},`${e.shopId}:${e.categoryId}:${e.id}`))}):(0,U.jsx)(`div`,{className:Q.horizontal,children:(0,U.jsxs)(`table`,{children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`序号`}),(0,U.jsx)(`th`,{children:`商品`}),y.map(([t,n])=>(0,U.jsx)(`th`,{children:ni.has(t)?(0,U.jsxs)(`button`,{className:Q.sort,onClick:()=>r({sort:t,direction:e.sort===t&&e.direction===`desc`?`asc`:`desc`}),children:[n,e.sort===t&&(e.direction===`desc`?(0,U.jsx)(ct,{size:12}):(0,U.jsx)(lt,{size:12}))]}):n},t))]})}),(0,U.jsx)(`tbody`,{children:v.data.rows.map((e,t)=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:(v.data.page-1)*25+t+1}),(0,U.jsx)(`td`,{children:w(e)}),y.map(([t])=>(0,U.jsx)(`td`,{className:t===`category`?Q.categoryCell:void 0,children:C(e,t)},t))]},`${e.shopId}:${e.categoryId}:${e.id}`))})]})}):(0,U.jsx)(`div`,{className:Q.empty,children:`当前筛选下暂无已完成入库的上榜商品。`}),v.data&&(0,U.jsxs)(`div`,{className:Q.pagination,children:[(0,U.jsx)(`span`,{children:v.data.notice}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`button`,{"aria-label":`上榜商品上一页`,disabled:v.data.page<=1,onClick:()=>{g(m),c(v.data.page-1)},children:(0,U.jsx)(a,{size:15})}),(0,U.jsxs)(`span`,{children:[v.data.page,` / `,Math.max(1,Math.ceil(v.data.total/25))]}),(0,U.jsx)(`button`,{"aria-label":`上榜商品下一页`,disabled:v.data.page*25>=v.data.total,onClick:()=>{g(m),c(v.data.page+1)},children:(0,U.jsx)(o,{size:15})})]})]})]})}function oi({month:e,selected:t,onAdd:n,onClose:r}){let[i,a]=(0,H.useState)(``),[o,s]=(0,H.useState)(``),l=(0,H.useRef)(null),d=(0,H.useRef)(null),p=Lr(o?{view:`shop-search`,month:e,q:o}:null);return(0,H.useEffect)(()=>{let e=document.activeElement;return l.current?.showModal(),d.current?.focus(),()=>e?.focus()},[]),(0,U.jsxs)(`dialog`,{ref:l,className:Q.dialog,onCancel:e=>{e.preventDefault(),r()},onClick:e=>{e.target===e.currentTarget&&r()},"aria-label":`添加对比店铺`,children:[(0,U.jsxs)(`div`,{className:Q.panelHeading,children:[(0,U.jsx)(`h2`,{children:`添加对比店铺`}),(0,U.jsx)(`button`,{"aria-label":`关闭店铺搜索`,onClick:r,children:(0,U.jsx)(f,{size:18})})]}),(0,U.jsx)(`p`,{className:Q.note,children:`最多对比 3 家店铺,搜索范围为企业获准类目。`}),(0,U.jsxs)(`form`,{className:Q.searchForm,onSubmit:e=>{e.preventDefault(),s(i.trim())},children:[(0,U.jsx)(u,{size:16}),(0,U.jsx)(`input`,{ref:d,"aria-label":`搜索对比店铺`,value:i,onChange:e=>a(e.target.value),maxLength:100,placeholder:`输入店铺名称或店铺 ID`}),(0,U.jsx)(`button`,{type:`submit`,disabled:!i.trim()||p.loading,children:`搜索`})]}),p.loading?(0,U.jsx)(`p`,{role:`status`,children:`正在搜索店铺…`}):p.error?(0,U.jsx)(`p`,{role:`alert`,className:Q.error,children:p.error}):o&&(0,U.jsx)(`div`,{className:Q.searchResults,children:p.data?.shops.length?p.data.shops.map(e=>(0,U.jsxs)(`button`,{disabled:t.includes(e.id),onClick:()=>n(e),children:[(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`b`,{children:e.name}),(0,U.jsxs)(`small`,{children:[`ID `,e.id]})]}),t.includes(e.id)?`已添加`:(0,U.jsx)(c,{size:16})]},e.id)):(0,U.jsx)(`p`,{children:`当前月份未找到匹配店铺,可尝试店铺编号或其他月份。`})})]})}function si({analysis:e,bootstrap:r,onBack:i}){let s=Ir(e),d=s.config,[p,m]=(0,H.useState)(!1),[h,g]=(0,H.useState)(0),[_,v]=(0,H.useState)(null),[y,b]=(0,H.useState)(!1),x=Lr(d.shops.length?{view:`shop-layout`,month:d.month,recentYear:String(d.recentYear),shops:d.shops.join(`,`)}:null,h),S=x.data,C=S?.categories.map(e=>({...e,name:q(r.categories,e.id).map(e=>e.name).join(` / `)||e.name}))||[],w=r.months.indexOf(d.month);async function T(){b(!0);try{await s.flush(),i()}catch{b(!1)}}function ee(e){v({kind:`shop`,month:d.month,shops:d.shops.join(`,`),shopFilter:e.id})}return(0,U.jsxs)(`div`,{className:Q.root,children:[(0,U.jsxs)(`header`,{className:Q.editorHeader,children:[(0,U.jsxs)(`div`,{className:Q.editorIdentity,children:[(0,U.jsx)(`button`,{"aria-label":`返回我的分析`,onClick:()=>void T(),disabled:y,children:(0,U.jsx)(t,{size:16})}),(0,U.jsx)(`input`,{"aria-label":`分析名称`,className:Q.nameInput,value:s.name,maxLength:80,onChange:e=>s.setName(e.target.value),onBlur:()=>void s.flush().catch(()=>{})}),(0,U.jsx)(`span`,{className:Q.saveStatus,role:`status`,children:s.error?`保存失败`:s.saving?`保存中…`:s.dirty?`待保存`:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(n,{size:12}),`已自动保存`]})})]}),(0,U.jsxs)(`div`,{className:Q.editorTools,children:[(0,U.jsx)(`button`,{"aria-pressed":d.recentYear,onClick:()=>s.change({recentYear:!d.recentYear}),children:`最近一年`}),(0,U.jsx)(`button`,{"aria-label":`上一数据月份`,disabled:w<=0,onClick:()=>s.change({month:r.months[w-1]}),children:(0,U.jsx)(a,{size:15})}),(0,U.jsx)(`select`,{"aria-label":`分析统计月份`,value:d.month,onChange:e=>s.change({month:e.target.value}),children:r.months.map(e=>(0,U.jsx)(`option`,{children:e},e))}),(0,U.jsx)(`button`,{"aria-label":`下一数据月份`,disabled:w<0||w>=r.months.length-1,onClick:()=>s.change({month:r.months[w+1]}),children:(0,U.jsx)(o,{size:15})}),(0,U.jsx)(`button`,{onClick:()=>void T(),disabled:y,children:`我的分析`}),(0,U.jsx)(`button`,{"aria-label":`刷新分析数据`,onClick:()=>g(e=>e+1),children:(0,U.jsx)(l,{size:15})})]})]}),s.error&&(0,U.jsxs)(`p`,{role:`alert`,className:Q.error,children:[s.error,(0,U.jsx)(`button`,{onClick:()=>void s.flush().catch(()=>{}),children:`重试保存`})]}),(0,U.jsxs)(`section`,{className:Q.panel,"aria-label":`分析店铺汇总`,children:[(0,U.jsxs)(`div`,{className:Q.panelHeading,children:[(0,U.jsxs)(`h2`,{children:[`品类分析`,(0,U.jsxs)(`small`,{children:[d.shops.length,` / 3 家店铺 · `,d.recentYear?`近 12 个月`:`所选月份`]})]}),d.shops.length<3&&(0,U.jsxs)(`button`,{className:Q.primary,onClick:()=>m(!0),children:[(0,U.jsx)(c,{size:15}),`添加对比店铺`]})]}),d.shops.length?x.loading?(0,U.jsx)(`p`,{role:`status`,className:Q.empty,children:`正在查询店铺品类数据…`}):x.error?(0,U.jsx)(`p`,{role:`alert`,className:Q.error,children:x.error}):S&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:Q.horizontal,children:(0,U.jsxs)(`table`,{className:Q.summaryTable,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:`店铺`}),(0,U.jsx)(`th`,{children:`销售走势`}),(0,U.jsx)(`th`,{children:`所在地`}),(0,U.jsx)(`th`,{children:`类型`}),(0,U.jsx)(`th`,{children:`店铺上榜销售额`}),(0,U.jsx)(`th`,{children:`上榜链接销售额`}),(0,U.jsx)(`th`,{children:`上榜叶子类目`}),(0,U.jsx)(`th`,{children:`上榜商品链接`}),(0,U.jsx)(`th`,{})]})}),(0,U.jsx)(`tbody`,{children:S.shops.map((e,t)=>(0,U.jsxs)(`tr`,{children:[(0,U.jsxs)(`td`,{children:[(0,U.jsxs)(`div`,{className:Q.shopName,children:[(0,U.jsx)(`i`,{style:{background:Yr[t]}}),(0,U.jsx)(`b`,{children:e.name})]}),(0,U.jsxs)(`small`,{children:[`ID `,e.id,d.recentYear?` · 店铺榜覆盖 ${e.availableMonths} 个月`:``]})]}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`button`,{className:Q.link,onClick:()=>ee(e),children:`查看`})}),(0,U.jsx)(`td`,{children:e.location||`—`}),(0,U.jsx)(`td`,{children:e.shopType||`—`}),(0,U.jsx)(`td`,{children:Zr(e.summary.sales)}),(0,U.jsx)(`td`,{children:Zr(e.summary.productSales)}),(0,U.jsx)(`td`,{children:e.categoryCount}),(0,U.jsx)(`td`,{children:$(e.summary.itemCount,0)}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`button`,{"aria-label":`移除${e.name}`,onClick:()=>s.change({shops:d.shops.filter(t=>t!==e.id),category:``,shopFilter:``}),children:(0,U.jsx)(f,{size:14})})})]},e.id))})]})}),(0,U.jsx)(`p`,{className:Q.note,children:S.notice})]}):(0,U.jsxs)(`div`,{className:Q.empty,children:[(0,U.jsx)(u,{size:28}),(0,U.jsx)(`h3`,{children:`从一家店铺开始分析`}),(0,U.jsx)(`p`,{children:`添加店铺后查看上榜销售表现、品类布局和商品链接。`}),(0,U.jsx)(`button`,{className:Q.primary,onClick:()=>m(!0),children:`添加首家店铺`})]})]}),S&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:Q.metricBar,role:`group`,"aria-label":`品类对比指标`,children:[Xr.map(e=>(0,U.jsx)(`button`,{"aria-pressed":d.metric===e.key,onClick:()=>s.change({metric:e.key}),children:e.label},e.key)),(0,U.jsxs)(`span`,{children:[C.length,` 个上榜叶子类目`]})]}),C.length?(0,U.jsx)($r,{categories:C,shops:S.shops,metric:d.metric,selectedCategory:d.category,selectedShop:d.shopFilter,onCategory:(e,t)=>s.change({category:e,shopFilter:t||``})},d.shops.join(`,`)+d.month+d.recentYear):(0,U.jsx)(`div`,{className:Q.empty,children:`所选月份及权限范围内暂无可展示的上榜叶子类目。`}),(0,U.jsx)(ai,{config:d,layout:S,taxonomy:r.categories,onChange:s.change,onTrend:v})]}),p&&(0,U.jsx)(oi,{month:d.month,selected:d.shops,onClose:()=>m(!1),onAdd:e=>{s.change({shops:[...d.shops,e.id],category:``,shopFilter:``}),s.name===`未命名分析`&&s.setName(e.name+`品类分析`),m(!1)}}),_&&(0,U.jsx)(ei,{query:_,onClose:()=>v(null)})]})}function ci({launch:t,onConsumeLaunch:n}){let[i,a]=(0,H.useState)(null),[o,l]=(0,H.useState)([]),[u,d]=(0,H.useState)(null),[f,p]=(0,H.useState)(!0),[m,h]=(0,H.useState)(``),[g,_]=(0,H.useState)(!1),[v,y]=(0,H.useState)(0),b=(0,H.useRef)(``);(0,H.useEffect)(()=>{let e=new AbortController;return Promise.all([W.bootstrap(e.signal),W.analyses(e.signal)]).then(([t,n])=>{e.signal.aborted||(a(t),l(n.analyses),h(``),p(!1))}).catch(t=>{e.signal.aborted||(h(t instanceof Error?t.message:`分析记录读取失败`),p(!1))}),()=>e.abort()},[v]),(0,H.useEffect)(()=>{if(!t||!i||b.current===t.id)return;b.current=t.id;let e={...Pr(t.month),shops:[t.shop.id]};W.saveAnalysis({id:t.id,name:t.shop.name+`品类分析`,config:e,revision:0}).then(e=>{d(e),n?.()}).catch(e=>h(e instanceof Error?e.message:`创建分析失败`))},[t,i,n]);async function x(){if(!(!i?.latestMonth||g)){_(!0),h(``);try{d(await W.saveAnalysis({id:crypto.randomUUID(),name:`未命名分析`,config:Pr(i.latestMonth),revision:0}))}catch(e){h(e instanceof Error?e.message:`创建分析失败`)}finally{_(!1)}}}return u&&i?(0,U.jsx)(si,{analysis:u,bootstrap:i,onBack:()=>{d(null),y(e=>e+1)}},u.id):(0,U.jsxs)(`main`,{className:Q.root,children:[(0,U.jsxs)(`header`,{className:Q.historyHeader,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:Q.eyebrow,children:`市场大盘 / 我的分析`}),(0,U.jsx)(`h1`,{children:`店铺品类布局`}),(0,U.jsx)(`p`,{children:`从历史分析继续,或新建一份店铺对比。`})]}),(0,U.jsxs)(`button`,{className:Q.primary,onClick:()=>void x(),disabled:f||g||!i?.latestMonth,children:[(0,U.jsx)(c,{size:16}),g?`正在创建…`:`新建分析`]})]}),m&&(0,U.jsxs)(`div`,{className:Q.error,role:`alert`,children:[m,(0,U.jsx)(`button`,{onClick:()=>y(e=>e+1),children:`重新读取`})]}),(0,U.jsxs)(`section`,{className:Q.history,"aria-label":`历史分析记录`,children:[(0,U.jsxs)(`div`,{className:Q.panelHeading,children:[(0,U.jsxs)(`h2`,{children:[(0,U.jsx)(s,{size:16}),`历史分析`,(0,U.jsxs)(`small`,{children:[o.length,` 份`]})]}),(0,U.jsx)(`span`,{className:Q.note,children:`方案按当前账号自动保存`})]}),f?(0,U.jsx)(`p`,{role:`status`,className:Q.empty,children:`正在读取历史分析…`}):o.length?(0,U.jsx)(`div`,{className:Q.historyList,children:o.map(t=>(0,U.jsxs)(`button`,{onClick:()=>d(t),children:[(0,U.jsx)(`span`,{className:Q.historyIcon,children:(0,U.jsx)(e,{size:21})}),(0,U.jsxs)(`span`,{className:Q.historyTitle,children:[(0,U.jsx)(`b`,{children:t.name}),(0,U.jsxs)(`small`,{children:[t.config.month,` · `,t.config.recentYear?`近一年 · `:``,t.config.shops.length?`${t.config.shops.length} 家店铺`:`尚未添加店铺`,` · `,Xr.find(e=>e.key===t.config.metric)?.label]})]}),(0,U.jsx)(`time`,{children:new Date(t.updatedAt).toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`,hour12:!1})}),(0,U.jsx)(r,{size:16})]},t.id))}):!m&&(0,U.jsxs)(`div`,{className:Q.emptyHistory,children:[(0,U.jsx)(e,{size:35}),(0,U.jsx)(`h3`,{children:`还没有历史分析`}),(0,U.jsx)(`p`,{children:`新建分析后添加店铺,逐步查看品类和上榜商品。`})]})]})]})}var li={home:`_home_12rl6_1`,top:`_top_12rl6_2`,panel:`_panel_12rl6_6`,row:`_row_12rl6_7`,empty:`_empty_12rl6_9`};function ui({onOpen:e}){let[t,n]=(0,H.useState)(null),[r,i]=(0,H.useState)({}),[a,o]=(0,H.useState)(``),[s,c]=(0,H.useState)(0);return(0,H.useEffect)(()=>{let e=new AbortController;return W.bootstrap(e.signal).then(async t=>{if(e.signal.aborted)return;n(t),o(``);let r=(t.favorites||[]).filter(e=>e.kind!==`category`),a={};for(let t=0;t<r.length;t+=6)if(await Promise.all(r.slice(t,t+6).map(async t=>{try{a[t.key]=await W.record(t.key,e.signal)}catch{}})),e.signal.aborted)return;i(a)}).catch(()=>{e.signal.aborted||o(`市场关注读取失败,请重试`)}),()=>e.abort()},[s]),(0,U.jsxs)(`div`,{className:li.home,children:[(0,U.jsxs)(`div`,{className:li.top,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h1`,{children:`我的市场关注`}),(0,U.jsx)(`p`,{children:`当前账号收藏的类目、商品和店铺`})]}),(0,U.jsx)(`button`,{onClick:()=>c(e=>e+1),children:`刷新关注`})]}),a&&(0,U.jsx)(`p`,{role:`alert`,children:a}),(0,U.jsxs)(`section`,{className:li.panel,children:[!t&&!a&&(0,U.jsx)(`p`,{role:`status`,children:`正在读取关注…`}),t&&!t.favorites?.length&&(0,U.jsx)(`p`,{className:li.empty,children:`在类目、商品或店铺旁点击收藏,即可在这里快速查看。`}),t?.favorites?.map(n=>{let i=t.categories.find(e=>e.id===n.key),a=r[n.key],o=n.kind===`category`?i?.id:a?.categoryId;return(0,U.jsxs)(`button`,{className:li.row,disabled:!o,onClick:()=>e({categoryId:o,view:n.kind===`category`?i?.leaf?`products`:`categories`:n.kind===`shop`?`shops`:`products`}),children:[(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`b`,{children:n.kind===`category`?i?.name||`类目已不可用`:a?.name||`记录读取中或已不可用`}),(0,U.jsx)(`small`,{children:n.kind===`category`&&i?q(t.categories,i.id).map(e=>e.name).join(` › `):n.kind===`shop`?`店铺收藏`:`商品收藏`})]}),(0,U.jsx)(`span`,{children:`打开 →`})]},n.kind+n.key)})]})]})}function di({section:e,onSection:t}){let[n,r]=y(`market.analysisLaunch`,null),[i,a]=(0,H.useState)();return e===`shop-layout`?(0,U.jsx)(ci,{launch:n,onConsumeLaunch:()=>r(null)}):e===`favorites`?(0,U.jsx)(ui,{onOpen:e=>{a(e),t(e.view)}}):(0,U.jsx)(Nr,{onShopLayout:(e,n)=>{r({id:crypto.randomUUID(),shop:e,month:n}),t(`shop-layout`)},view:[`categories`,`products`,`shops`].find(t=>t===e)||`categories`,selection:i,onViewChange:e=>t(e,{replace:!0})})}export{di as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./arrow-right-Bsei-31a.js";import{t}from"./chart-column-Dlmnr1y9.js";import{t as n}from"./clock-3-B99KnTzW.js";import{t as r}from"./git-branch-Cv69GSy-.js";import{t as i}from"./layers-BaGSABxV.js";import{t as a}from"./search-I3gdKVV9.js";import{p as o,r as s,s as c,u as l}from"./index-CDS2fIqN.js";import{n as u}from"./module-host-BzwOcfIf.js";import{n as d}from"./workspace-view-state-C1Tia7X4.js";import"./public-DTqkVQos.js";import{t as f}from"./activity-Cj90ZCJa.js";var p=c(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),m=c(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),h=o(l(),1);async function g(e){let t=await Promise.allSettled([e(`/command-center`),e(`/growth-center`)]),n=[],r=[],i=[],a=t[0],o=t[1];if(a.status===`fulfilled`){let e=a.value?.projects;Array.isArray(e)?r=e.filter(e=>!e.simulated):n.push(`项目状态返回格式异常`)}else n.push(`项目状态读取失败,请重试`);if(o.status===`fulfilled`){let e=o.value?.catalog;Array.isArray(e)?i=e.filter(e=>e.mode!==`simulated`):n.push(`资料目录返回格式异常`)}else n.push(`资料目录读取失败,请重试`);return{projects:r,datasets:i,errors:n}}var _={home:`_home_fjsdx_1`,top:`_top_fjsdx_2`,eyebrow:`_eyebrow_fjsdx_5`,search:`_search_fjsdx_9`,resume:`_resume_fjsdx_11`,grid:`_grid_fjsdx_15`,panel:`_panel_fjsdx_16`,heading:`_heading_fjsdx_17`,row:`_row_fjsdx_21`,visit:`_visit_fjsdx_22`,empty:`_empty_fjsdx_24`,shortcuts:`_shortcuts_fjsdx_25`,error:`_error_fjsdx_29`},v=s(),y=e=>Number.isFinite(Date.parse(e))?new Date(e).toLocaleString(`zh-CN`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`}):`时间未标注`;function b({mode:o,api:s,visits:c,pins:l,onPin:u,onGo:b,onOpen:x,onModule:S,onCreate:C}){let[w,T]=(0,h.useState)([]),[E,D]=(0,h.useState)([]),[O,k]=(0,h.useState)([]),[A,j]=(0,h.useState)(!0),[M,N]=(0,h.useState)(0),[P,F]=d(`home.search`,``);(0,h.useEffect)(()=>{let e=!0;return g(s).then(t=>{e&&(T(t.projects),D(t.datasets),k(t.errors),j(!1))}),()=>{e=!1}},[s,M]);let I=e=>e.toLowerCase().includes(P.trim().toLowerCase()),L=[...w].sort((e,t)=>t.updated.localeCompare(e.updated)).filter(e=>I(e.name)),R=[...E].sort((e,t)=>t.created.localeCompare(e.created)).filter(e=>I(e.title+e.projectName)),z=f(w),B={recent:`最近访问`,favorites:`我的收藏`}[o]||`从这里开始今天的工作`;function V(t){return t.length?(0,v.jsx)(`div`,{className:_.rows,children:t.filter(e=>I(e.title)).map(t=>{let r=l.some(e=>e.key===t.key);return(0,v.jsxs)(`div`,{className:_.visit,children:[(0,v.jsxs)(`button`,{onClick:()=>b(t.route),children:[(0,v.jsx)(n,{size:17}),(0,v.jsxs)(`span`,{children:[(0,v.jsx)(`b`,{children:t.title}),(0,v.jsx)(`small`,{children:y(t.at)})]}),(0,v.jsx)(e,{size:16})]}),(0,v.jsx)(`button`,{"aria-label":`${r?`取消固定`:`固定`}${t.title}`,"aria-pressed":r,onClick:()=>u(t),children:(0,v.jsx)(m,{size:16})})]},t.key)})}):(0,v.jsx)(`p`,{className:_.empty,children:o===`favorites`?`在最近访问中固定常用页面,即可在这里快速进入。`:`打开市场、商品、项目或资料后,这里会保留本次登录的访问位置。`})}let H=(0,v.jsxs)(`section`,{className:_.panel,children:[(0,v.jsxs)(`div`,{className:_.heading,children:[(0,v.jsx)(`h2`,{children:`需要你处理`}),(0,v.jsx)(`span`,{children:A?`读取中`:`${z.length} 项`})]}),z.slice(0,5).map(({project:t,step:n})=>(0,v.jsxs)(`button`,{className:_.row,onClick:()=>x(t.id,n.target),children:[(0,v.jsxs)(`span`,{children:[(0,v.jsxs)(`b`,{children:[n.name,` · `,n.state===`attention`?`待复核`:`待确认`]}),(0,v.jsxs)(`small`,{children:[t.name,` · `,n.description]})]}),(0,v.jsx)(e,{size:16})]},t.id+n.id)),!A&&!z.length&&(0,v.jsx)(`p`,{className:_.empty,children:O.length?`连接恢复后显示待处理事项。`:`当前没有待复核或待确认的阶段。`})]});return(0,v.jsxs)(`div`,{className:_.home,children:[(0,v.jsxs)(`div`,{className:_.top,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`span`,{className:_.eyebrow,children:`山海 · OMNI`}),(0,v.jsx)(`h1`,{children:B}),(0,v.jsx)(`p`,{children:`连接市场机会、经营行动与项目资料`})]}),(0,v.jsxs)(`label`,{className:_.search,children:[(0,v.jsx)(a,{size:17}),(0,v.jsx)(`input`,{"aria-label":`搜索首页项目、资料和访问记录`,value:P,onChange:e=>F(e.target.value),placeholder:`查找项目、资料或访问记录`})]})]}),O.length>0&&(0,v.jsxs)(`div`,{role:`alert`,className:_.error,children:[O.join(`;`),(0,v.jsx)(`button`,{onClick:()=>{j(!0),N(e=>e+1)},children:`重试`})]}),A&&(0,v.jsx)(`p`,{role:`status`,className:_.empty,children:`正在读取当前账号的项目与资料…`}),o===`recent`||o===`favorites`?(0,v.jsx)(`section`,{className:_.panel,children:V(o===`recent`?c:l)}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`section`,{className:_.resume,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`span`,{className:_.eyebrow,children:`继续上次工作`}),(0,v.jsx)(`h2`,{children:c[0]?.title||`选择一个入口,开始你的工作`}),(0,v.jsx)(`p`,{children:c[0]?`${c[0].moduleLabel} · ${y(c[0].at)}`:`查看市场,或建立一个商品项目,逐步积累证据与判断。`})]}),(0,v.jsxs)(`button`,{onClick:()=>c[0]?b(c[0].route):S(`market`),children:[c[0]?`继续处理`:`查看市场`,(0,v.jsx)(e,{size:17})]})]}),(0,v.jsxs)(`div`,{className:_.grid,children:[H,(0,v.jsxs)(`section`,{className:_.panel,children:[(0,v.jsx)(`h2`,{children:`常用入口`}),(0,v.jsx)(`div`,{className:_.shortcuts,children:[[`market`,`查市场`,t],[`products`,`查看商品`,i],[`projects`,`打开项目`,r],[`data`,`查找资料`,p]].map(([t,n,r])=>(0,v.jsxs)(`button`,{onClick:()=>S(String(t)),children:[(0,v.jsx)(r,{size:20}),(0,v.jsx)(`span`,{children:String(n)}),(0,v.jsx)(e,{size:14})]},String(t)))}),l.length>0&&V(l.slice(0,3))]}),(0,v.jsxs)(`section`,{className:_.panel,children:[(0,v.jsxs)(`div`,{className:_.heading,children:[(0,v.jsx)(`h2`,{children:`最近项目`}),(0,v.jsx)(`button`,{onClick:C,children:`+ 新建项目`})]}),L.slice(0,4).map(t=>(0,v.jsxs)(`button`,{className:_.row,onClick:()=>x(t.id,{tab:`overview`}),children:[(0,v.jsxs)(`span`,{children:[(0,v.jsx)(`b`,{children:t.name}),(0,v.jsxs)(`small`,{children:[t.statusLabel,` · 下一步:`,t.next.name]}),(0,v.jsx)(`small`,{children:y(t.updated)})]}),(0,v.jsx)(e,{size:16})]},t.id)),!A&&!L.length&&(0,v.jsx)(`p`,{className:_.empty,children:P?`没有匹配的项目。`:`建立第一个项目,将市场机会转化为具体方案。`})]}),(0,v.jsxs)(`section`,{className:_.panel,children:[(0,v.jsxs)(`div`,{className:_.heading,children:[(0,v.jsx)(`h2`,{children:`最近资料`}),(0,v.jsx)(`button`,{onClick:()=>S(`data`),children:`全部资料 →`})]}),R.slice(0,5).map(t=>(0,v.jsxs)(`button`,{className:_.row,onClick:()=>x(t.project,{tab:`data`,datasetId:t.id}),children:[(0,v.jsxs)(`span`,{children:[(0,v.jsx)(`b`,{children:t.title}),(0,v.jsxs)(`small`,{children:[t.projectName,` · `,y(t.created)]})]}),(0,v.jsx)(e,{size:16})]},t.id)),!A&&!R.length&&(0,v.jsx)(`p`,{className:_.empty,children:P?`没有匹配的资料。`:`项目中归档的数据集会出现在这里。`})]})]})]})]})}function x(e,t){return e.some(e=>e.key===t.key)?e.filter(e=>e.key!==t.key):[t,...e].slice(0,20)}function S({section:e}){let t=u(),[n,r]=d(`home.pins`,[]);return(0,v.jsx)(b,{mode:e,...t,pins:n,onPin:e=>r(t=>x(t,e))})}export{S as default};
|