@petercjl/omni-desktop-app 0.1.7 → 0.1.10

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.
Files changed (123) hide show
  1. package/INSTALL.md +9 -0
  2. package/README.md +4 -4
  3. package/UPDATE.md +7 -0
  4. package/app/assets/{CartesianChart-acGhtLrw.js → CartesianChart-CP7p2vlm.js} +4 -4
  5. package/app/assets/{CollaborationWorkspace-DAWo2Vol.js → CollaborationWorkspace-Cnp5PNn_.js} +6 -6
  6. package/app/assets/CollaborationWorkspace-D7ttfUjn.css +1 -0
  7. package/app/assets/CompetitorAnalysis-Cujy_a2L.js +1 -0
  8. package/app/assets/CompetitorAnalysis-h1zdt0F2.css +1 -0
  9. package/app/assets/EmptyState-CUHuNsaV.js +1 -0
  10. package/app/assets/ErrorBarContext-BJE5-ljg.js +1 -0
  11. package/app/assets/{EvidenceSourceGuide-qBsaH1fx.js → EvidenceSourceGuide-B1AJCZm2.js} +1 -1
  12. package/app/assets/FavoritePicker-XD1a_uOa.js +1 -0
  13. package/app/assets/Favorites-B5_fdEvZ.js +1 -0
  14. package/app/assets/{HelpTip-X4GpEnvk.js → HelpTip-BqRBO41J.js} +1 -1
  15. package/app/assets/LineChart-Ckvg5wfQ.js +4 -0
  16. package/app/assets/Opportunities-BvH64-dz.js +1 -0
  17. package/app/assets/{ProgressiveRows-DPZqhsXV.js → ProgressiveRows-NojOUgmr.js} +1 -1
  18. package/app/assets/ShopLayoutPage-CCrRwaAx.js +1 -0
  19. package/app/assets/TrendChart-BF4JgwxH.js +1 -0
  20. package/app/assets/arrow-down-B1nil3T4.js +1 -0
  21. package/app/assets/arrow-left-BhFSpYzK.js +1 -0
  22. package/app/assets/arrow-up-right-IBQoN72x.js +1 -0
  23. package/app/assets/book-open-Cqdn6s-H.js +1 -0
  24. package/app/assets/chart-column-DCwNhXki.js +1 -0
  25. package/app/assets/{chart-no-axes-combined-dFluBLOV.js → chart-no-axes-combined-DVgKs36j.js} +1 -1
  26. package/app/assets/check-DBnlZFEo.js +1 -0
  27. package/app/assets/chevron-down-DO6RUQm8.js +1 -0
  28. package/app/assets/chevron-right-e65CaeL6.js +1 -0
  29. package/app/assets/{clock-3-DpvJxor3.js → clock-3-CDHtQwAe.js} +1 -1
  30. package/app/assets/competitor-analysis-D6eM9ugQ.js +1 -0
  31. package/app/assets/components-B5Xyjfpi.js +2 -0
  32. package/app/assets/{download-BQwcTDwB.js → download-DfM49VvV.js} +1 -1
  33. package/app/assets/entry-Bq7tA83b.js +1 -0
  34. package/app/assets/entry-BryQeuNT.css +1 -0
  35. package/app/assets/entry-CMur_AE7.css +1 -0
  36. package/app/assets/entry-DC4oDjzU.js +2 -0
  37. package/app/assets/entry-DM64sJfS.js +1 -0
  38. package/app/assets/entry-DbqMDIJi.js +1 -0
  39. package/app/assets/entry-N8bfKXTF.js +2 -0
  40. package/app/assets/entry-kAWoaIsV.js +2 -0
  41. package/app/assets/favorites.module-CHYv-Z8y.js +1 -0
  42. package/app/assets/{file-text-DF8-c_Tb.js → file-text-DKAT5fzJ.js} +1 -1
  43. package/app/assets/getRadiusAndStrokeWidthFromDot-bv_ksZ7y.js +1 -0
  44. package/app/assets/{grid-2x2-BNdV1X54.js → grid-2x2-DB6zRPIV.js} +1 -1
  45. package/app/assets/index-BgJNmU0Z.css +1 -0
  46. package/app/assets/index-DLSVWUSu.js +10 -0
  47. package/app/assets/{layers-BY0DtVnH.js → layers-CjsT_HGi.js} +1 -1
  48. package/app/assets/layout-dashboard-sgUrlApv.js +1 -0
  49. package/app/assets/{link-2-B7GAWapc.js → link-2-VLti-YG9.js} +1 -1
  50. package/app/assets/{list-DrSHrHvT.js → list-Dfzc0sXQ.js} +1 -1
  51. package/app/assets/market-SuD7x_Hf.css +1 -0
  52. package/app/assets/market.module-VpU4XmGg.js +1 -0
  53. package/app/assets/module-host-DNtiV4gZ.js +1 -0
  54. package/app/assets/orbit-CrQs6cpl.js +1 -0
  55. package/app/assets/play-BxTFlaQX.js +1 -0
  56. package/app/assets/plus-D78h7lrw.js +1 -0
  57. package/app/assets/products-B5vjXM_b.js +1 -0
  58. package/app/assets/project-public-CgW1u7BI.js +4 -0
  59. package/app/assets/project-public-DWTt808B.js +1 -0
  60. package/app/assets/public-C-PBMVOQ.js +1 -0
  61. package/app/assets/{refresh-cw-BZ6-gKfF.js → refresh-cw-CxbRf97c.js} +1 -1
  62. package/app/assets/search-DFdSppzm.js +1 -0
  63. package/app/assets/triangle-alert-C7qiylOf.js +1 -0
  64. package/app/assets/{ui-public-BPe2GJZ-.css → ui-public-DHoRDp5_.css} +1 -1
  65. package/app/assets/ui-public-Dt5dHt-8.js +1 -0
  66. package/app/assets/workbench-DIKJZNJQ.js +2 -0
  67. package/app/assets/workbench-Db45mF6t.css +1 -0
  68. package/app/assets/workspace-view-state-D0ujRczW.js +1 -0
  69. package/app/desktop/main.mjs +7719 -0
  70. package/app/desktop/preload.cjs +30 -0
  71. package/app/index.html +2 -2
  72. package/app/package.json +1 -0
  73. package/app/public/omni-icon.png +0 -0
  74. package/app/tools/bootstrap.bin +0 -0
  75. package/app/tools/omni-desktop.mjs +526 -0
  76. package/package.json +7 -2
  77. package/release.json +1 -1
  78. package/release.sig +1 -1
  79. package/app/assets/CollaborationWorkspace-DHP4cb-p.css +0 -1
  80. package/app/assets/EmptyState-BgcduNtk.js +0 -1
  81. package/app/assets/Favorites-C3gPJxbl.js +0 -1
  82. package/app/assets/LineChart-CyiCaQMM.js +0 -4
  83. package/app/assets/Opportunities-DDR6jMz5.js +0 -1
  84. package/app/assets/ShopLayoutPage-7lNMFD1W.js +0 -1
  85. package/app/assets/TrendChart-ClEBAnKO.js +0 -1
  86. package/app/assets/activity-idEO2qnr.js +0 -1
  87. package/app/assets/arrow-left-rfprDrQc.js +0 -1
  88. package/app/assets/arrow-up-right-Bp3gzP7v.js +0 -1
  89. package/app/assets/check-DokC3Ug0.js +0 -1
  90. package/app/assets/chevron-down-CHQKhw_4.js +0 -1
  91. package/app/assets/chevron-right-2HEa4oQb.js +0 -1
  92. package/app/assets/components-zDEQpnyp.js +0 -2
  93. package/app/assets/entry-BNiO6CiP.js +0 -2
  94. package/app/assets/entry-BleRLT_W.js +0 -1
  95. package/app/assets/entry-CO870j9p.css +0 -1
  96. package/app/assets/entry-CYsrxe4a.js +0 -2
  97. package/app/assets/entry-D2FD-KFx.js +0 -1
  98. package/app/assets/entry-DAnTlYgL.js +0 -1
  99. package/app/assets/entry-DSEbJ79v.js +0 -2
  100. package/app/assets/entry-OPB3MGoc.css +0 -1
  101. package/app/assets/git-branch-CMQGDByc.js +0 -1
  102. package/app/assets/index-7NKGenq7.css +0 -1
  103. package/app/assets/index-BBySSIJT.js +0 -10
  104. package/app/assets/market-B2oImfqS.css +0 -1
  105. package/app/assets/market.module-BXeOH_ee.js +0 -1
  106. package/app/assets/module-host-BHOsDk69.js +0 -1
  107. package/app/assets/package-C_xD77DO.js +0 -1
  108. package/app/assets/pin-BEsLCHJL.js +0 -1
  109. package/app/assets/plus-C301wuGJ.js +0 -1
  110. package/app/assets/products-CfPFkCnk.js +0 -1
  111. package/app/assets/project-public-CYza4XVS.js +0 -4
  112. package/app/assets/project-public-DqjxO6ad.js +0 -1
  113. package/app/assets/public-DoBzMSlG.js +0 -1
  114. package/app/assets/ui-public-CX7L8QF_.js +0 -1
  115. package/app/assets/use-favorites-ChTJGQkB.js +0 -1
  116. package/app/assets/workbench-13XxpUuA.css +0 -1
  117. package/app/assets/workbench-BCuh9Nyq.js +0 -2
  118. package/app/assets/workspace-view-state-CYNxOsyc.js +0 -1
  119. /package/app/assets/{api-DP_rt0Zx.js → api-KZa8CR8X.js} +0 -0
  120. /package/app/assets/{use-favorites-_eKBQGeF.css → favorites-_eKBQGeF.css} +0 -0
  121. /package/app/assets/{format-jsGSJ1GL.js → format-DL7i7_eV.js} +0 -0
  122. /package/app/assets/{graphicalItemSelectors-GhHIivGe.js → graphicalItemSelectors-CJfZ6cht.js} +0 -0
  123. /package/app/assets/{group--adLvfC6.js → group-Ed305HyG.js} +0 -0
@@ -0,0 +1,4 @@
1
+ import{g as e,h as t,y as n}from"./index-DLSVWUSu.js";import{$ as r,A as i,B as a,E as o,Et as s,It as c,J as l,Lt as u,N as d,Ot as f,Q as p,Rt as m,St as h,U as g,Ut as _,Vt as v,W as y,X as b,Y as x,_t as S,a as C,bt as w,c as T,d as E,dt as D,et as O,f as k,ft as A,g as ee,gt as te,h as ne,i as re,jt as ie,k as j,l as ae,lt as oe,m as se,ot as M,pt as ce,q as N,rt as P,t as le,tt as ue,u as de,v as fe,vt as F,wt as pe,xt as me,y as he,yt as I,zt as ge}from"./CartesianChart-CP7p2vlm.js";import{n as _e,r as ve,t as ye}from"./ErrorBarContext-BJE5-ljg.js";import{n as be,r as xe,t as Se}from"./getRadiusAndStrokeWidthFromDot-bv_ksZ7y.js";var Ce=t(),L=n(e());function R(){return R=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},R.apply(null,arguments)}function z(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 B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?z(Object(n),!0).forEach(function(t){we(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function we(e,t,n){return(t=Te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Te(e){var t=Ee(e,`string`);return typeof t==`symbol`?t:t+``}function Ee(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)}var V=32,De={align:`center`,iconSize:14,inactiveColor:`#ccc`,layout:`horizontal`,verticalAlign:`middle`,labelStyle:{}};function Oe(e){if(typeof e==`object`&&e&&`strokeDasharray`in e)return String(e.strokeDasharray)}function ke(e){var{data:t,iconType:n,inactiveColor:r}=e,i=V/2,a=V/6,o=V/3,s=t.inactive?r:t.color,c=n??t.type;if(c===`none`)return null;if(c===`plainline`)return L.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:s,strokeDasharray:Oe(t.payload),x1:0,y1:i,x2:V,y2:i,className:`recharts-legend-icon`});if(c===`line`)return L.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:s,d:`M0,${i}h${o}
2
+ A${a},${a},0,1,1,${2*o},${i}
3
+ H${V}M${2*o},${i}
4
+ A${a},${a},0,1,1,${o},${i}`,className:`recharts-legend-icon`});if(c===`rect`)return L.createElement(`path`,{stroke:`none`,fill:s,d:`M0,${V/8}h${V}v${V*3/4}h${-V}z`,className:`recharts-legend-icon`});if(L.isValidElement(t.legendIcon)){var l=B({},t);return delete l.legendIcon,L.cloneElement(t.legendIcon,l)}return L.createElement(ve,{fill:s,cx:i,cy:i,size:V,sizeType:`diameter`,type:c})}function Ae(e){var{payload:t,iconSize:n,layout:r,formatter:i,inactiveColor:a,iconType:o,labelStyle:s}=e,c={x:0,y:0,width:V,height:V},l={display:r===`horizontal`?`inline-block`:`block`,marginRight:10},u={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return t.map((t,r)=>{var d=t.formatter||i,f=_({"recharts-legend-item":!0,[`legend-item-${r}`]:!0,inactive:t.inactive});if(t.type===`none`)return null;var p=typeof s==`object`?B({},s):{};p.color=t.inactive?a:p.color||t.color;var h=d?d(t.value,t,r):t.value;return L.createElement(`li`,R({className:f,style:l,key:`legend-item-${r}`},pe(e,t,r)),L.createElement(m,{width:n,height:n,viewBox:c,style:u,"aria-label":`${h} legend icon`},L.createElement(ke,{data:t,iconType:o,inactiveColor:a})),L.createElement(`span`,{className:`recharts-legend-item-text`,style:p},h))})}var je=e=>{var t=h(e,De),{payload:n,layout:r,align:i}=t;if(!n||!n.length)return null;var a={padding:0,margin:0,textAlign:r===`horizontal`?i:`left`};return L.createElement(`ul`,{className:`recharts-default-legend`,style:a},L.createElement(Ae,R({},t,{payload:n})))};function Me(){return w(S)}var Ne=[`contextPayload`];function H(){return H=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},H.apply(null,arguments)}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?U(Object(n),!0).forEach(function(t){Pe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pe(e,t,n){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(e){var t=Ie(e,`string`);return typeof t==`symbol`?t:t+``}function Ie(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 Le(e,t){if(e==null)return{};var n,r,i=Re(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 Re(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 ze(e){return e.value}function Be(e){var{contextPayload:t}=e,n=Le(e,Ne),r=me(t,e.payloadUniqBy,ze),i=W(W({},n),{},{payload:r});return L.isValidElement(e.content)?L.cloneElement(e.content,i):typeof e.content==`function`?L.createElement(e.content,i):L.createElement(je,i)}function Ve(e,t,n,r,i,a){var{layout:o,align:s,verticalAlign:c}=t,l,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(l=s===`center`&&o===`vertical`?{left:((r||0)-a.width)/2}:s===`right`?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(u=c===`middle`?{top:((i||0)-a.height)/2}:c===`bottom`?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),W(W({},l),u)}function He(e){var t=I();return(0,L.useEffect)(()=>{t(l(e))},[t,e]),null}function Ue(e){var t=I();return(0,L.useEffect)(()=>(t(x(e)),()=>{t(x({width:0,height:0}))}),[t,e]),null}function We(e,t,n,r){return e===`vertical`&&t!=null?{height:t}:e===`horizontal`?{width:n||r}:null}var Ge={align:`center`,iconSize:14,inactiveColor:`#ccc`,itemSorter:`value`,layout:`horizontal`,verticalAlign:`bottom`};function Ke(e){var t=h(e,Ge),n=Me(),r=c(),i=ue(),{width:a,height:o,wrapperStyle:s,portal:l}=t,[u,d]=te([n]),f=O(),m=p();if(f==null||m==null)return null;var g=f-(i?.left||0)-(i?.right||0),_=We(t.layout,o,a,g),v=l?s:W(W({position:`absolute`,width:_?.width||a||`auto`,height:_?.height||o||`auto`},Ve(s,t,i,f,m,u)),s),y=l??r;return y==null||n==null?null:(0,Ce.createPortal)(L.createElement(`div`,{className:`recharts-legend-wrapper`,style:v,ref:d},L.createElement(He,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!l&&L.createElement(Ue,{width:u.width,height:u.height}),L.createElement(Be,H({},t,_,{margin:i,chartWidth:f,chartHeight:m,contextPayload:n}))),y)}var G=L.memo(Ke,N);G.displayName=`Legend`;var K=(e,t,n,r)=>o(e,`xAxis`,t,r),q=(e,t,n,r)=>j(e,`xAxis`,t,r),J=(e,t,n,r)=>o(e,`yAxis`,n,r),Y=(e,t,n,r)=>j(e,`yAxis`,n,r),qe=F([b,K,J,q,Y],(e,t,n,r,i)=>ce(e,`xAxis`)?M(t,r,!1):M(n,i,!1)),Je=(e,t,n,r,i)=>i;function Ye(e){return e.type===`line`}var Xe=F([b,K,J,q,Y,F([i,Je],(e,t)=>e.filter(Ye).find(e=>e.id===t)),qe,a],(e,t,n,r,i,a,o,s)=>{var{chartData:c,dataStartIndex:l,dataEndIndex:u}=s;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var{dataKey:d,data:f}=a,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return yt({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}}),Ze=[`id`],Qe=[`type`,`layout`,`connectNulls`,`needClip`,`shape`],$e=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function X(){return X=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},X.apply(null,arguments)}function Z(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 Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Z(Object(n),!0).forEach(function(t){et(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function et(e,t,n){return(t=tt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(e){var t=nt(e,`string`);return typeof t==`symbol`?t:t+``}function nt(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 $(e,t){if(e==null)return{};var n,r,i=rt(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 rt(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 it=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:D(n,t),payload:e}]},at=L.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:ie,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:D(o,t),hide:s,type:l,color:r,unit:c,graphicalItemId:u}};return L.createElement(k,{tooltipEntrySettings:d})}),ot=(e,t)=>`${t}px ${e}px`;function st(e,t){for(var n=e.length%2==0?e:[...e,0],r=[],i=0;i<t;++i)r.push(...n);return r}var ct=(e,t,n)=>{var r=n.reduce((e,t)=>e+t,0);if(!r)return ot(t,e);for(var i=Math.floor(e/r),a=e%r,o=[],s=0,c=0;s<n.length;c+=(l=n[s])??0,++s){var l,u=n[s];if(u!=null&&c+u>a){o=[...n.slice(0,s),a-c];break}}var d=o.length%2==0?[0,t]:[t];return[...st(n,i),...o,...d].map(e=>`${e}px`).join(`, `)};function lt(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:a,needClip:o}=r,{id:s}=r,c=v($(r,Ze));return L.createElement(xe,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:c,needClip:o,clipPathId:t})}function ut(e){var{showLabels:t,children:n,points:r}=e,i=(0,L.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Q(Q({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return L.createElement(ne,{value:t?i:void 0},n)}function dt(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:c,needClip:l,shape:u}=a,d=Q(Q({},ge($(a,Qe))),{},{fill:`none`,className:`recharts-line-curve`,clipPath:l?`url(#clipPath-${t})`:void 0,points:r,type:o,layout:s,connectNulls:c,strokeDasharray:i??a.strokeDasharray});return L.createElement(L.Fragment,null,r?.length>1&&L.createElement(_e,X({shapeType:`curve`,option:u},d,{pathRef:n})),L.createElement(lt,{points:r,clipPathId:t,props:a}))}function ft(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function pt(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:c,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:f,animateNewValues:p,width:m,height:h,onAnimationEnd:_,onAnimationStart:v}=n,b=i.current,x=g(o,`recharts-line-`),S=(0,L.useRef)(x),[C,w]=(0,L.useState)(!1),T=!C,E=(0,L.useCallback)(()=>{typeof _==`function`&&_(),w(!1)},[_]),D=(0,L.useCallback)(()=>{typeof v==`function`&&v(),w(!0)},[v]),O=ft(r.current),k=(0,L.useRef)(0);S.current!==x&&(k.current=a.current,S.current=x);var A=k.current;return L.createElement(ut,{points:o,showLabels:T},n.children,L.createElement(y,{animationId:x,begin:u,duration:d,isActive:l,easing:f,onAnimationEnd:E,onAnimationStart:D,key:x},e=>{var u=s(A,O+A,e),d=Math.min(u,O),f=l?c?ct(d,O,`${c}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):ot(O,d):c==null?void 0:String(c);if(e>0&&O>0&&(i.current=o,a.current=Math.max(a.current,d)),b){var g=b.length/o.length,_=e===1?o:o.map((t,n)=>{var r=Math.floor(n*g);if(b[r]){var i=b[r];return Q(Q({},t),{},{x:s(i.x,t.x,e),y:s(i.y,t.y,e)})}return p?Q(Q({},t),{},{x:s(m*2,t.x,e),y:s(h/2,t.y,e)}):Q(Q({},t),{},{x:t.x,y:t.y})});return i.current=_,L.createElement(dt,{props:n,points:_,clipPathId:t,pathRef:r,strokeDasharray:f})}return L.createElement(dt,{props:n,points:o,clipPathId:t,pathRef:r,strokeDasharray:f})}),L.createElement(ee,{label:n.label}))}function mt(e){var{clipPathId:t,props:n}=e,r=(0,L.useRef)(null),i=(0,L.useRef)(0),a=(0,L.useRef)(null);return L.createElement(pt,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:a})}var ht=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:A(e.payload,t)}),gt=class extends L.Component{render(){var{hide:e,dot:t,points:n,className:r,xAxisId:i,yAxisId:a,top:o,left:s,width:c,height:l,id:d,needClip:f,zIndex:p}=this.props;if(e)return null;var m=_(`recharts-line`,r),h=d,{r:g,strokeWidth:v}=Se(t),y=se(t),b=g*2+v,x=f?`url(#clipPath-${y?``:`dots-`}${h})`:void 0;return L.createElement(he,{zIndex:p},L.createElement(u,{className:m},f&&L.createElement(`defs`,null,L.createElement(re,{clipPathId:h,xAxisId:i,yAxisId:a}),!y&&L.createElement(`clipPath`,{id:`clipPath-dots-${h}`},L.createElement(`rect`,{x:s-b/2,y:o-b/2,width:c+b,height:l+b}))),L.createElement(ye,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:ht,errorBarOffset:0},L.createElement(mt,{props:this.props,clipPathId:h}))),L.createElement(be,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}},_t={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:d.line,type:`linear`};function vt(e){var t=h(e,_t),{activeDot:n,animateNewValues:i,animationBegin:a,animationDuration:o,animationEasing:s,connectNulls:c,dot:l,hide:u,isAnimationActive:d,label:f,legendType:p,xAxisId:m,yAxisId:g,id:_}=t,v=$(t,$e),{needClip:y}=C(m,g),b=T(),x=r(),S=P(),E=w(e=>Xe(e,m,g,S,_));if(x!==`horizontal`&&x!==`vertical`||E==null||b==null)return null;var{height:D,width:O,x:k,y:A}=b;return L.createElement(gt,X({},v,{id:_,connectNulls:c,dot:l,activeDot:n,animateNewValues:i,animationBegin:a,animationDuration:o,animationEasing:s,isAnimationActive:d,hide:u,label:f,legendType:p,xAxisId:m,yAxisId:g,points:E,layout:x,height:D,width:O,left:k,top:A,needClip:y}))}function yt(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:c}=e;return c.map((e,c)=>{var l=A(e,o);if(t===`horizontal`)return{x:oe({axis:n,ticks:i,bandSize:s,entry:e,index:c}),y:(f(l)?null:r.scale.map(l))??null,value:l,payload:e};var u=f(l)?null:n.scale.map(l),d=oe({axis:r,ticks:a,bandSize:s,entry:e,index:c});return u==null||d==null?null:{x:u,y:d,value:l,payload:e}}).filter(Boolean)}function bt(e){var t=h(e,_t),n=P();return L.createElement(de,{id:t.id,type:`line`},e=>L.createElement(L.Fragment,null,L.createElement(E,{legendPayload:it(t)}),L.createElement(at,{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}),L.createElement(ae,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),L.createElement(vt,X({},t,{id:e}))))}var xt=L.memo(bt,N);xt.displayName=`Line`;var St=[`axis`],Ct=(0,L.forwardRef)((e,t)=>L.createElement(le,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:St,tooltipPayloadSearcher:fe,categoricalChartProps:e,ref:t}));export{xt as n,G as r,Ct as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./arrow-left-BhFSpYzK.js";import{t}from"./arrow-up-right-IBQoN72x.js";import{t as n}from"./refresh-cw-CxbRf97c.js";import{t as r}from"./search-DFdSppzm.js";import{g as i,o as a,p as o,y as s}from"./index-DLSVWUSu.js";import{c,i as l,o as u,t as d}from"./components-B5Xyjfpi.js";import{t as f}from"./api-KZa8CR8X.js";import{i as p,n as m,t as h}from"./format-DL7i7_eV.js";import{t as g}from"./market.module-VpU4XmGg.js";var _=o(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),v=s(i(),1),y={page:`_page_4wowc_1`,header:`_header_4wowc_2`,sectionHeader:`_sectionHeader_4wowc_4`,eyebrow:`_eyebrow_4wowc_5`,period:`_period_4wowc_6`,periodComparison:`_periodComparison_4wowc_9`,muted:`_muted_4wowc_11`,coverage:`_coverage_4wowc_11`,scope:`_scope_4wowc_12`,filters:`_filters_4wowc_14`,filterFields:`_filterFields_4wowc_15`,filterActions:`_filterActions_4wowc_16`,search:`_search_4wowc_22`,rule:`_rule_4wowc_25`,stats:`_stats_4wowc_26`,tableWrap:`_tableWrap_4wowc_35`,textButton:`_textButton_4wowc_43`,positive:`_positive_4wowc_45`,signals:`_signals_4wowc_46`,pager:`_pager_4wowc_49`,empty:`_empty_4wowc_51`,method:`_method_4wowc_53`,context:`_context_4wowc_55`,productSection:`_productSection_4wowc_59`,product:`_product_4wowc_59`},b=a(),x={minGrowth:`20`,minSales:`1000000`,minBase:`100000`,maxShops:`500`,q:``},S={...x,minSales:`10000`,minBase:`10000`},C=e=>e==null?`—`:`${e>0?`+`:``}${m(e,`percent`)}`;function w(e,t){let n=e?new URLSearchParams(e).toString():``,r=n+`:`+t,[i,a]=(0,v.useState)({key:``,data:null,error:``});return(0,v.useEffect)(()=>{if(!n)return;let e=new AbortController;return f.opportunities(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}}function T({value:e,onApply:t,products:n=!1}){let[i,a]=(0,v.useState)(e);function o(e){e.preventDefault(),t(i)}return(0,b.jsxs)(`form`,{className:y.filters,onSubmit:o,children:[(0,b.jsxs)(`div`,{className:y.filterFields,children:[(0,b.jsxs)(`label`,{children:[`环比增长 ≥`,(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`input`,{"aria-label":`最低环比增长`,type:`number`,min:`0`,max:`10000`,step:`0.01`,required:!0,value:i.minGrowth,onChange:e=>a({...i,minGrowth:e.target.value})}),`%`]})]}),(0,b.jsxs)(`label`,{children:[`本月销售额 ≥`,(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`input`,{"aria-label":`最低本月销售额(万元)`,type:`number`,min:`0`,max:`100000000`,step:`0.01`,required:!0,value:i.minSales===``?``:Number(i.minSales)/1e4,onChange:e=>a({...i,minSales:e.target.value===``?``:String(Math.round(Number(e.target.value)*1e6)/100)})}),`万元`]})]}),(0,b.jsxs)(`label`,{children:[`上月销售额 ≥`,(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`input`,{"aria-label":`最低上月销售额(万元)`,type:`number`,min:`0`,max:`100000000`,step:`0.01`,required:!0,value:i.minBase===``?``:Number(i.minBase)/1e4,onChange:e=>a({...i,minBase:e.target.value===``?``:String(Math.round(Number(e.target.value)*1e6)/100)})}),`万元`]})]}),!n&&(0,b.jsxs)(`label`,{children:[`店铺数 ≤`,(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`input`,{"aria-label":`最多竞争店铺数`,type:`number`,min:`1`,max:`1000000000`,step:`1`,required:!0,value:i.maxShops,onChange:e=>a({...i,maxShops:e.target.value})}),`家`]})]})]}),(0,b.jsxs)(`div`,{className:y.filterActions,children:[(0,b.jsxs)(`label`,{className:y.search,children:[`关键词`,(0,b.jsxs)(`span`,{children:[(0,b.jsx)(r,{size:14}),(0,b.jsx)(`input`,{"aria-label":n?`搜索机会商品`:`搜索机会类目`,placeholder:n?`商品名称 / ID`:`类目名称`,maxLength:120,value:i.q,onChange:e=>a({...i,q:e.target.value})})]})]}),(0,b.jsx)(`button`,{className:g.primary,type:`submit`,children:`筛选机会`}),(0,b.jsx)(`button`,{type:`button`,onClick:()=>{let e=n?S:x;a(e),t(e)},children:`重置`})]})]})}function E({page:e,total:t,onChange:n}){let r=Math.max(1,Math.ceil(t/25));return(0,b.jsxs)(`div`,{className:y.pager,children:[(0,b.jsxs)(`span`,{children:[`共 `,m(t),` 个候选`]}),(0,b.jsx)(`button`,{disabled:e<=1,onClick:()=>n(e-1),children:`上一页`}),(0,b.jsxs)(`span`,{children:[e,` / `,r]}),(0,b.jsx)(`button`,{disabled:e>=r,onClick:()=>n(e+1),children:`下一页`})]})}function D({message:e,retry:t}){return(0,b.jsxs)(`div`,{className:y.empty,role:`alert`,children:[(0,b.jsx)(`p`,{children:e}),(0,b.jsxs)(`button`,{onClick:t,children:[(0,b.jsx)(n,{size:14}),`重新读取`]})]})}function O({row:e}){return(0,b.jsxs)(`div`,{className:y.signals,children:[(0,b.jsx)(`span`,{children:e.salesGrowth!=null&&e.salesGrowth>0&&e.previousGrowth!=null&&e.previousGrowth>0?`连续两月增长`:`持续性待验证`}),(0,b.jsx)(`small`,{children:e.salesYoy==null?`去年同月未覆盖`:`同比 ${C(e.salesYoy)}`})]})}function k({record:e,onClose:t}){let[n,r]=(0,v.useState)({data:null,error:``});return(0,v.useEffect)(()=>{let t=new AbortController;return f.record(e.key,t.signal).then(e=>{t.signal.aborted||r({data:e,error:``})}).catch(e=>{t.signal.aborted||r({data:null,error:e instanceof Error?e.message:`走势读取失败`})}),()=>t.abort()},[e.key]),(0,b.jsx)(l,{title:e.name||e.id||`商品走势`,onClose:t,children:n.error?(0,b.jsx)(`p`,{role:`alert`,children:n.error}):n.data?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u,{points:n.data.trend}),(0,b.jsx)(`p`,{className:y.muted,children:`金额单位元;缺失月份不补零。同月冲突记录保持缺口。`}),n.data.warnings?.map(e=>(0,b.jsx)(`p`,{children:e},e))]}):(0,b.jsx)(`p`,{role:`status`,children:`正在读取商品走势…`})})}function A({month:n,categoryId:r,onBack:i,onOpenCategory:a}){let[o,s]=c(`opportunityProductFilters`,S),[l,d]=(0,v.useState)(1),[f,h]=(0,v.useState)(`salesIncrease`),[g,_]=(0,v.useState)(0),[x,A]=(0,v.useState)(null),{data:j,error:M,loading:N}=w({kind:`products`,month:n,categoryId:r,...o,sort:f,page:String(l)},g),P=j?.category;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:y.header,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsxs)(`button`,{onClick:i,children:[(0,b.jsx)(e,{size:14}),`机会市场`]}),(0,b.jsx)(`h1`,{children:P?.name||`赛道详情`}),(0,b.jsxs)(`p`,{children:[n,` 对比 `,j?.previousMonth||`上月`,` · 在赛道中寻找增长商品`]})]}),(0,b.jsxs)(`button`,{onClick:()=>a(r,n),children:[`查看完整商品榜`,(0,b.jsx)(t,{size:14})]})]}),N&&(0,b.jsx)(`p`,{className:y.empty,role:`status`,children:`正在比较相邻月份的商品数据…`}),M&&(0,b.jsx)(D,{message:M,retry:()=>_(e=>e+1)}),j&&P&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:y.stats,children:[(0,b.jsxs)(`article`,{children:[(0,b.jsx)(`span`,{children:`类目销售额`}),(0,b.jsx)(`strong`,{children:m(P.sales,`money`)}),(0,b.jsxs)(`small`,{children:[`环比 `,C(P.salesGrowth)]})]}),(0,b.jsxs)(`article`,{children:[(0,b.jsx)(`span`,{children:`类目店铺数`}),(0,b.jsxs)(`strong`,{children:[m(P.shopCount),` `,(0,b.jsx)(`i`,{children:`家`})]}),(0,b.jsxs)(`small`,{children:[`环比 `,C(P.shopGrowth)]})]}),(0,b.jsxs)(`article`,{children:[(0,b.jsx)(`span`,{children:`平均每店市场规模`}),(0,b.jsx)(`strong`,{children:m(P.salesPerShop,`money`)}),(0,b.jsx)(`small`,{children:`类目销售额 ÷ 店铺数,不代表利润`})]}),(0,b.jsxs)(`article`,{children:[(0,b.jsx)(`span`,{children:`增长延续性`}),(0,b.jsx)(`strong`,{children:P.previousGrowth!=null&&P.previousGrowth>0&&P.salesGrowth!=null&&P.salesGrowth>0?`连续两月增长`:`需要继续观察`}),(0,b.jsxs)(`small`,{children:[`上期环比 `,C(P.previousGrowth)]})]})]}),(0,b.jsxs)(`div`,{className:y.context,children:[(0,b.jsxs)(`section`,{children:[(0,b.jsxs)(`h2`,{children:[`类目销售趋势 `,(0,b.jsx)(`small`,{children:`近 12 个自然月 · 元`})]}),(0,b.jsx)(u,{points:j.trend})]}),(0,b.jsxs)(`aside`,{children:[(0,b.jsx)(`h2`,{children:`入场前,还要验证`}),(0,b.jsx)(`p`,{children:`店铺数量少只是竞争初筛,可能存在头部垄断、资质门槛或需求过小。`}),(0,b.jsxs)(`ul`,{children:[(0,b.jsx)(`li`,{children:`结合完整店铺榜确认头部集中度与品牌壁垒。`}),(0,b.jsx)(`li`,{children:`对照同比和多个周期,区分季节性、活动与持续增长。`}),(0,b.jsx)(`li`,{children:`核算毛利、投放成本、供应链及资质;当前数据不包含这些成本。`})]}),(0,b.jsx)(O,{row:P})]})]}),(0,b.jsxs)(`section`,{className:y.productSection,children:[(0,b.jsxs)(`div`,{className:y.sectionHeader,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsxs)(`h2`,{children:[`机会商品 `,(0,b.jsx)(`small`,{children:`同一商品 ID 的跨月增长`})]}),(0,b.jsx)(`p`,{children:`展示该类目的增长候选,商品本身的同款竞争尚未判定。`})]}),(0,b.jsxs)(`label`,{children:[`排序 `,(0,b.jsxs)(`select`,{"aria-label":`机会商品排序`,value:f,onChange:e=>{h(e.target.value),d(1)},children:[(0,b.jsx)(`option`,{value:`salesIncrease`,children:`销售增量优先`}),(0,b.jsx)(`option`,{value:`salesGrowth`,children:`增长率优先`}),(0,b.jsx)(`option`,{value:`sales`,children:`销售规模优先`})]})]})]}),(0,b.jsx)(T,{products:!0,value:o,onApply:e=>{s(e),d(1)}}),j.availability.current!==`ready`||j.availability.previous!==`ready`?(0,b.jsxs)(`div`,{className:y.empty,children:[(0,b.jsx)(`h3`,{children:`这两个月的商品榜暂不能完整对比`}),(0,b.jsxs)(`p`,{children:[n,`:`,j.availability.current===`ready`?`已就绪`:j.availability.current===`pending`?`导入中`:`未覆盖`,`;`,j.previousMonth,`:`,j.availability.previous===`ready`?`已就绪`:j.availability.previous===`pending`?`导入中`:`未覆盖`,`。`]}),(0,b.jsx)(`p`,{children:`补齐后再计算增长,缺失榜单不会作为零销售额。`})]}):(0,b.jsxs)(b.Fragment,{children:[j.coverage&&(0,b.jsxs)(`p`,{className:y.coverage,children:[`本月 `,m(j.coverage.current),` 个已识别商品 · 可比 `,m(j.coverage.comparable),` 个 · 本月首次观察 `,m(j.coverage.newlyObserved),` 个 · 零基数或缺值 `,m(j.coverage.invalidBase),` 个 · 销售额冲突 `,m(j.coverage.conflicts),` 个`]}),j.rows.length?(0,b.jsx)(`div`,{className:y.tableWrap,children:(0,b.jsxs)(`table`,{children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`th`,{children:`商品 / 店铺`}),(0,b.jsx)(`th`,{children:`本月销售额`}),(0,b.jsx)(`th`,{children:`上月销售额`}),(0,b.jsx)(`th`,{children:`增长金额`}),(0,b.jsx)(`th`,{children:`环比增长`}),(0,b.jsx)(`th`,{children:`件单价`}),(0,b.jsx)(`th`,{children:`查看`})]})}),(0,b.jsx)(`tbody`,{children:j.rows.map(e=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{children:(0,b.jsxs)(`div`,{className:y.product,children:[p(e.imageUrl)&&(0,b.jsx)(`img`,{src:p(e.imageUrl),alt:``,loading:`lazy`}),(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`button`,{className:y.textButton,onClick:()=>A(e),children:e.name||e.id}),(0,b.jsxs)(`small`,{children:[e.shopName||`店铺名称未提供`,` · `,e.id]})]})]})}),(0,b.jsx)(`td`,{children:m(e.sales,`money`)}),(0,b.jsx)(`td`,{children:m(e.previousSales,`money`)}),(0,b.jsxs)(`td`,{className:y.positive,children:[`+`,m(e.salesIncrease,`money`)]}),(0,b.jsx)(`td`,{className:y.positive,children:C(e.salesGrowth)}),(0,b.jsx)(`td`,{children:m(e.unitPrice,`money`)}),(0,b.jsxs)(`td`,{children:[(0,b.jsx)(`button`,{onClick:()=>A(e),children:`走势`}),p(e.url)&&(0,b.jsx)(`a`,{href:p(e.url),target:`_blank`,rel:`noreferrer`,children:`商品链接 ↗`})]})]},e.id))})]})}):(0,b.jsxs)(`div`,{className:y.empty,children:[(0,b.jsx)(`h3`,{children:`没有符合当前条件的商品`}),(0,b.jsx)(`p`,{children:`可以调整增长率或销售额门槛;首次观察到的商品不等于新品,也不直接判为增长机会。`})]}),(0,b.jsx)(E,{page:l,total:j.total,onChange:d})]})]})]}),x&&(0,b.jsx)(k,{record:x,onClose:()=>A(null)})]})}function j({onOpenCategory:e}){let[n,r]=(0,v.useState)(0),[i,a]=(0,v.useState)({revision:-1,data:null,error:``}),[o,s]=c(`opportunityMonth`,``),[l,u]=c(`opportunityScope`,``),[p,S]=c(`opportunityFilters`,x),[k,j]=c(`opportunitySort`,`salesIncrease`),[M,N]=c(`opportunityPage`,1),[P,F]=c(`opportunitySelected`,null);(0,v.useEffect)(()=>{let e=new AbortController;return f.bootstrap(e.signal).then(t=>{e.signal.aborted||a({revision:n,data:t,error:``})}).catch(t=>{e.signal.aborted||a({revision:n,data:null,error:t instanceof Error?t.message:`市场数据读取失败`})}),()=>e.abort()},[n]);let I=i.revision===n?i.data:null,L=I?.status===`ready`&&I.capabilities?.opportunities,{data:R,error:z,loading:B}=w(L&&!P?{kind:`markets`,month:o,categoryId:l,...p,sort:k,page:String(M)}:null,n),V=()=>r(e=>e+1);return(0,b.jsxs)(`main`,{className:`${g.page} ${y.page}`,children:[!I&&i.revision!==n&&(0,b.jsx)(`p`,{className:y.empty,role:`status`,children:`正在读取市场范围…`}),i.revision===n&&i.error&&(0,b.jsx)(D,{message:i.error,retry:V}),I&&!L&&(0,b.jsx)(D,{message:I.status===`no-access`?`企业尚未获得市场类目授权`:I.status===`unpublished`?`市场数据尚未就绪`:`机会发现服务暂未就绪`,retry:V}),L&&P?(0,b.jsx)(A,{...P,onBack:()=>F(null),onOpenCategory:e},P.categoryId+P.month):L&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:y.header,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsxs)(`div`,{className:y.eyebrow,children:[(0,b.jsx)(_,{size:15}),`市场洞察 / 机会发现`]}),(0,b.jsx)(`h1`,{children:`找到增长中的细分赛道`}),(0,b.jsx)(`p`,{children:`先看需求增长与竞争店铺,再进入赛道寻找增长商品。`})]}),(0,b.jsxs)(`div`,{className:y.period,children:[(0,b.jsxs)(`label`,{children:[`统计月份 `,(0,b.jsxs)(`select`,{"aria-label":`机会市场统计月份`,value:o||R?.month||``,onChange:e=>{s(e.target.value),N(1)},children:[(0,b.jsx)(`option`,{value:``,children:`最近可比月份`}),(R?.months||I.months).map(e=>(0,b.jsxs)(`option`,{value:e,children:[e,R?.missingStatisticsMonths?.includes(e)?` · 类目统计待补齐`:``]},e))]})]}),(0,b.jsxs)(`div`,{className:y.periodComparison,children:[(0,b.jsx)(`span`,{children:`对比月份`}),(0,b.jsx)(`strong`,{children:R?.previousMonth||`自动匹配上月`})]})]})]}),(0,b.jsxs)(`div`,{className:y.scope,children:[(0,b.jsx)(d,{categories:I.categories,favoriteIds:(I.favorites||[]).filter(e=>e.kind===`category`).map(e=>e.key),value:l,disabled:!1,onChoose:e=>{u(e),N(1)}}),(0,b.jsx)(`span`,{children:`只比较叶子类目,避免父子类目重复计算`})]}),(0,b.jsx)(T,{value:p,onApply:e=>{S(e),N(1)}}),(0,b.jsx)(`p`,{className:y.rule,children:`同时要求:销售额增速高于店铺数增速。门槛是可调整的筛选条件,不是行业通用标准。`}),B&&(0,b.jsx)(`p`,{className:y.empty,role:`status`,children:`正在筛选机会市场…`}),z&&(0,b.jsx)(D,{message:z,retry:V}),R?.month&&R.missingStatisticsMonths?.includes(R.month)&&(0,b.jsxs)(`div`,{className:y.empty,role:`status`,children:[(0,b.jsxs)(`h3`,{children:[R.month,` 榜单已入库,类目统计待补齐`]}),(0,b.jsx)(`p`,{children:`商品和店铺榜单可以查看;市场销售额与店铺数尚缺类目月度统计,补齐后可进行相邻月机会筛选。`}),(0,b.jsxs)(`button`,{onClick:()=>e(l,R.month),children:[`查看本月商品榜`,(0,b.jsx)(t,{size:14})]})]}),R?.previousMonth&&R.missingStatisticsMonths?.includes(R.previousMonth)&&!R.missingStatisticsMonths.includes(R.month||``)&&(0,b.jsxs)(`p`,{className:y.rule,role:`status`,children:[`对比月份 `,R.previousMonth,` 的类目统计待补齐,本月机会筛选暂无完整环比依据。`]}),R&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:y.stats,children:[(0,b.jsxs)(`article`,{children:[(0,b.jsx)(`span`,{children:`当前范围叶子类目`}),(0,b.jsx)(`strong`,{children:m(R.coverage.scanned)})]}),(0,b.jsxs)(`article`,{children:[(0,b.jsx)(`span`,{children:`相邻月数据可比`}),(0,b.jsx)(`strong`,{children:m(R.coverage.comparable)})]}),(0,b.jsxs)(`article`,{children:[(0,b.jsx)(`span`,{children:`符合条件的机会候选`}),(0,b.jsx)(`strong`,{className:y.positive,children:m(R.total)})]}),(0,b.jsxs)(`article`,{children:[(0,b.jsx)(`span`,{children:`缺失 / 零基数排除`}),(0,b.jsx)(`strong`,{children:m(R.coverage.excluded)})]})]}),(0,b.jsxs)(`div`,{className:y.sectionHeader,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`h2`,{children:`机会市场`}),(0,b.jsx)(`p`,{children:`店铺数用于竞争初筛;点击候选查看趋势和机会商品。`})]}),(0,b.jsxs)(`label`,{children:[`排序 `,(0,b.jsxs)(`select`,{"aria-label":`机会市场排序`,value:k,onChange:e=>{j(e.target.value),N(1)},children:[(0,b.jsx)(`option`,{value:`salesIncrease`,children:`销售增量优先`}),(0,b.jsx)(`option`,{value:`salesGrowth`,children:`增长率优先`}),(0,b.jsx)(`option`,{value:`sales`,children:`销售规模优先`}),(0,b.jsx)(`option`,{value:`shopCount`,children:`店铺数量从少到多`})]})]})]}),R.rows.length?(0,b.jsx)(`div`,{className:y.tableWrap,children:(0,b.jsxs)(`table`,{children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`th`,{children:`机会赛道 / 增长信号`}),(0,b.jsx)(`th`,{children:`本月销售额`}),(0,b.jsx)(`th`,{children:`增长金额`}),(0,b.jsx)(`th`,{children:`环比增长`}),(0,b.jsx)(`th`,{children:`店铺数`}),(0,b.jsx)(`th`,{children:`店铺数环比`}),(0,b.jsx)(`th`,{children:`平均每店市场规模`}),(0,b.jsx)(`th`,{children:`查看`})]})}),(0,b.jsx)(`tbody`,{children:R.rows.map(e=>(0,b.jsxs)(`tr`,{children:[(0,b.jsxs)(`td`,{children:[(0,b.jsx)(`button`,{className:y.textButton,onClick:()=>F({categoryId:e.id,month:R.month}),children:e.name}),(0,b.jsx)(`small`,{children:h(I.categories,e.id).slice(0,-1).map(e=>e.name).join(` / `)}),(0,b.jsx)(O,{row:e})]}),(0,b.jsxs)(`td`,{children:[m(e.sales,`money`),(0,b.jsxs)(`small`,{children:[`上月 `,m(e.previousSales,`money`)]})]}),(0,b.jsxs)(`td`,{className:y.positive,children:[`+`,m(e.salesIncrease,`money`)]}),(0,b.jsx)(`td`,{className:y.positive,children:C(e.salesGrowth)}),(0,b.jsxs)(`td`,{children:[m(e.shopCount),` 家`]}),(0,b.jsx)(`td`,{children:C(e.shopGrowth)}),(0,b.jsx)(`td`,{children:m(e.salesPerShop,`money`)}),(0,b.jsx)(`td`,{children:(0,b.jsxs)(`button`,{onClick:()=>F({categoryId:e.id,month:R.month}),children:[`看机会商品`,(0,b.jsx)(t,{size:13})]})})]},e.id))})]})}):(0,b.jsxs)(`div`,{className:y.empty,children:[(0,b.jsx)(`h3`,{children:`当前条件下没有机会候选`}),(0,b.jsx)(`p`,{children:R.coverage.comparable===0?`相邻月份的销售额或店铺数缺少可比数据,不会把缺失月份当零。`:`可以切换类目或调整门槛;没有命中不代表市场不存在机会。`}),R.comparableMonths.at(-1)&&R.comparableMonths.at(-1)!==R.month&&(0,b.jsxs)(`button`,{onClick:()=>{s(R.comparableMonths.at(-1)),N(1)},children:[`查看最近可比月 `,R.comparableMonths.at(-1)]})]}),(0,b.jsx)(E,{page:M,total:R.total,onChange:N}),(0,b.jsxs)(`details`,{className:y.method,children:[(0,b.jsx)(`summary`,{children:`筛选依据与使用边界`}),(0,b.jsxs)(`p`,{children:[R.provenance.source,`。增长率 =(本月销售额 − 上月销售额)÷ 上月销售额;相邻自然月比较,不跨缺月。销售额、店铺数缺失及零基数不参与机会筛选。各类目独立比较,不做跨层级加总。`]}),(0,b.jsx)(`p`,{children:`销售增长快于店铺增长,表示平均每店市场规模扩大,仍不等于每家店增长。店铺少可能来自集中度、准入门槛或数据覆盖;需要进一步检查头部品牌、季节性、流量成本和利润。商品榜为已入库样本,首次观察不等于新上架。`})]})]})]})]})}export{j as default};
@@ -1 +1 @@
1
- import{_ as e,m as t,o as n}from"./index-BBySSIJT.js";var r=e(t(),1),i=n();function a({items:e,children:t,columns:n,batchSize:a=24,onVisibleCount:o,resetKey:s}){let c=s??e,[l,u]=(0,r.useState)({identity:c,count:a}),d=l.identity===c?l.count:a,f=(0,r.useRef)(null),p=d<e.length;function m(){u(t=>({identity:c,count:Math.min(e.length,(t.identity===c?t.count:a)+a)}))}(0,r.useEffect)(()=>{o?.(Math.min(d,e.length))},[d,e.length,o]),(0,r.useEffect)(()=>{let t=f.current;if(!t||!p||typeof IntersectionObserver>`u`)return;let n=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&u(t=>({identity:c,count:Math.min(e.length,(t.identity===c?t.count:a)+a)}))},{rootMargin:`180px`});return n.observe(t),()=>n.disconnect()},[e,c,a,d,p]);let h=p&&(0,i.jsxs)(`button`,{ref:f,type:`button`,onClick:m,children:[`加载更多(`,Math.min(d,e.length),`/`,e.length,`)`]});return(0,i.jsxs)(i.Fragment,{children:[e.slice(0,d).map((e,n)=>(0,i.jsx)(r.Fragment,{children:t(e,n)},n)),h&&(n?(0,i.jsx)(`tr`,{children:(0,i.jsx)(`td`,{colSpan:n,children:h})}):(0,i.jsx)(`div`,{style:{gridColumn:`1 / -1`,flexShrink:0},children:h}))]})}export{a as t};
1
+ import{g as e,o as t,y as n}from"./index-DLSVWUSu.js";var r=n(e(),1),i=t();function a({items:e,children:t,columns:n,batchSize:a=24,onVisibleCount:o,resetKey:s}){let c=s??e,[l,u]=(0,r.useState)({identity:c,count:a}),d=l.identity===c?l.count:a,f=(0,r.useRef)(null),p=d<e.length;function m(){u(t=>({identity:c,count:Math.min(e.length,(t.identity===c?t.count:a)+a)}))}(0,r.useEffect)(()=>{o?.(Math.min(d,e.length))},[d,e.length,o]),(0,r.useEffect)(()=>{let t=f.current;if(!t||!p||typeof IntersectionObserver>`u`)return;let n=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&u(t=>({identity:c,count:Math.min(e.length,(t.identity===c?t.count:a)+a)}))},{rootMargin:`180px`});return n.observe(t),()=>n.disconnect()},[e,c,a,d,p]);let h=p&&(0,i.jsxs)(`button`,{ref:f,type:`button`,onClick:m,children:[`加载更多(`,Math.min(d,e.length),`/`,e.length,`)`]});return(0,i.jsxs)(i.Fragment,{children:[e.slice(0,d).map((e,n)=>(0,i.jsx)(r.Fragment,{children:t(e,n)},n)),h&&(n?(0,i.jsx)(`tr`,{children:(0,i.jsx)(`td`,{colSpan:n,children:h})}):(0,i.jsx)(`div`,{style:{gridColumn:`1 / -1`,flexShrink:0},children:h}))]})}export{a as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./arrow-down-B1nil3T4.js";import{t}from"./arrow-left-BhFSpYzK.js";import{n,t as r}from"./clock-3-CDHtQwAe.js";import{t as i}from"./chart-no-axes-combined-DVgKs36j.js";import{t as a}from"./check-DBnlZFEo.js";import{n as o}from"./link-2-VLti-YG9.js";import{t as s}from"./chevron-right-e65CaeL6.js";import{t as c}from"./grid-2x2-DB6zRPIV.js";import{t as l}from"./list-Dfzc0sXQ.js";import{t as u}from"./plus-D78h7lrw.js";import{t as d}from"./refresh-cw-CxbRf97c.js";import{t as f}from"./search-DFdSppzm.js";import{g as p,h as m,o as h,p as g,s as _,y as v}from"./index-DLSVWUSu.js";import{n as y}from"./workspace-view-state-D0ujRczW.js";import"./public-C-PBMVOQ.js";import{t as b}from"./ProgressiveRows-NojOUgmr.js";import{t as x}from"./api-KZa8CR8X.js";import{t as S}from"./format-DL7i7_eV.js";import{_ as C,n as w,nt as T,o as E,r as D}from"./CartesianChart-CP7p2vlm.js";import{n as O,r as k,t as ee}from"./LineChart-Ckvg5wfQ.js";import{i as te,n as A,r as ne,t as re}from"./FavoritePicker-XD1a_uOa.js";var ie=g(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),ae=g(`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`}]]),j=v(p(),1);function M(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 N=(e,t)=>JSON.stringify({name:e.trim()||`未命名分析`,config:t});function P(e){let[t,n]=y(`market.analysisDraft.`+e.id,e),r=(0,j.useRef)(t);(0,j.useEffect)(()=>{r.current=t},[t]);let i=(0,j.useRef)(t.revision),a=(0,j.useRef)(N(e.name,e.config)),o=(0,j.useRef)(Promise.resolve()),[s,c]=(0,j.useState)(!1),[l,u]=(0,j.useState)(``),[d,f]=(0,j.useState)(()=>N(e.name,e.config)),p=(0,j.useCallback)(()=>{let e=r.current,t=N(e.name,e.config),s=o.current.catch(()=>{}).then(async()=>{if(a.current!==t){c(!0),u(``);try{let r=await x.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=N(t.name,t.config);return(0,j.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 F(e,t=0){let n=e?new URLSearchParams(e).toString():``,r=n+`:`+t,[i,a]=(0,j.useState)({key:``,data:null,error:``});return(0,j.useEffect)(()=>{if(!n)return;let e=new AbortController;return x.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 oe=m(),I={root:`_root_mxmkq_1`,dialog:`_dialog_mxmkq_2`,primary:`_primary_mxmkq_4`,historyHeader:`_historyHeader_mxmkq_5`,eyebrow:`_eyebrow_mxmkq_5`,history:`_history_mxmkq_5`,panelHeading:`_panelHeading_mxmkq_5`,historyList:`_historyList_mxmkq_6`,historyIcon:`_historyIcon_mxmkq_6`,historyTitle:`_historyTitle_mxmkq_6`,emptyHistory:`_emptyHistory_mxmkq_6`,editorHeader:`_editorHeader_mxmkq_7`,inline:`_inline_mxmkq_7`,editorIdentity:`_editorIdentity_mxmkq_7`,editorTools:`_editorTools_mxmkq_7`,nameInput:`_nameInput_mxmkq_7`,saveStatus:`_saveStatus_mxmkq_7`,panel:`_panel_mxmkq_5`,horizontal:`_horizontal_mxmkq_8`,shopName:`_shopName_mxmkq_8`,summaryTable:`_summaryTable_mxmkq_8`,link:`_link_mxmkq_8`,sort:`_sort_mxmkq_8`,note:`_note_mxmkq_9`,error:`_error_mxmkq_9`,empty:`_empty_mxmkq_6`,metricBar:`_metricBar_mxmkq_10`,chartRange:`_chartRange_mxmkq_10`,chart:`_chart_mxmkq_10`,trendChart:`_trendChart_mxmkq_10`,filters:`_filters_mxmkq_11`,columnOptions:`_columnOptions_mxmkq_11`,product:`_product_mxmkq_12`,noImage:`_noImage_mxmkq_12`,categoryCell:`_categoryCell_mxmkq_12`,pagination:`_pagination_mxmkq_12`,productCards:`_productCards_mxmkq_12`,cardImage:`_cardImage_mxmkq_15`,cardDetails:`_cardDetails_mxmkq_18`,searchForm:`_searchForm_mxmkq_23`,searchResults:`_searchResults_mxmkq_23`,rangeTrack:`_rangeTrack_mxmkq_27`,rangeWindow:`_rangeWindow_mxmkq_27`,rangeHandle:`_rangeHandle_mxmkq_27`,rangeGrip:`_rangeGrip_mxmkq_27`},L=(e,t,n)=>Math.max(t,Math.min(n,e));function R(e,t){if(t<=0)return{start:0,size:0};let n=L(e.size,Math.min(3,t),t);return{start:L(e.start,0,t-n),size:n}}var z=e=>R({start:0,size:24},e);function se(e,t){if(t<=0)return{start:0,end:0,count:0};let n=R(e,t),r=Math.round(n.size),i=L(Math.round(n.start),0,t-r);return{start:i,end:i+r,count:r}}var B=(e,t,n)=>R({...e,start:e.start+t},n);function V(e,t,n,r){let i=R(e,r),a=L(n,0,1),o=R({start:0,size:i.size*t},r).size;return R({start:i.start+a*(i.size-o),size:o},r)}function H(e,t,n,r){let i=R(e,r),a=Math.min(3,r);if(t===`start`){let e=i.start+i.size,t=L(n,0,e-a);return{start:t,size:e-t}}return{...i,size:L(n,i.start+a,r)-i.start}}function U(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 V(e,Math.exp(L(o*.003,-1,1)),a,r)}return B(e,o/i*e.size,r)}var W=h();function G({view:e,total:t,onChange:n}){let r=(0,j.useRef)(null),i=(0,j.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`?B(r.view,a,t):H(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=>H(e,r,(r===`start`?e.start:e.start+e.size)+i,t)))}return(0,W.jsx)(`div`,{ref:r,className:I.rangeTrack,"aria-label":`图表显示范围`,onPointerDown:a,onPointerMove:o,onPointerUp:()=>{i.current=null},onPointerCancel:()=>{i.current=null},onLostPointerCapture:()=>{i.current=null},children:(0,W.jsxs)(`div`,{className:I.rangeWindow,"data-range-part":`pan`,style:{left:`${e.start/t*100}%`,width:`${e.size/t*100}%`},children:[(0,W.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:I.rangeHandle,children:`Ⅱ`}),(0,W.jsx)(`span`,{className:I.rangeGrip,"data-range-part":`pan`,"aria-hidden":`true`,children:`···`}),(0,W.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:I.rangeHandle,children:`Ⅱ`})]})})}function ce(e,t,n){let r=(0,j.useRef)(null),[i,a]=(0,j.useState)(()=>({scope:e,view:z(t)})),o=i.scope===e?R(i.view,t):z(t),s=(0,j.useCallback)(n=>{a(r=>({scope:e,view:R(n(r.scope===e?r.view:z(t)),t)}))},[e,t]);return(0,j.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=>U(e,n,r,t))}return e.addEventListener(`wheel`,i,{passive:!1}),()=>e.removeEventListener(`wheel`,i)},[n,t,s]),{plot:r,view:o,indices:se(o,t),update:s}}var K=[`var(--omni-chart-primary,#469eff)`,`var(--omni-chart-teal,#34b9ac)`,`var(--omni-chart-orange,#d4a25c)`],q=[{key:`sales`,label:`销售额`,unit:`元`},{key:`marketShare`,label:`市场占有率`,unit:`%`},{key:`itemCount`,label:`链接数`,unit:`个`},{key:`efficiency`,label:`链接效率`,unit:`元/链接`},{key:`views`,label:`浏览量`,unit:`次`}],J=(e,t=2)=>e==null?`—`:e.toLocaleString(`zh-CN`,{maximumFractionDigits:t}),Y=e=>e==null?`—`:e>=1e8?J(e/1e8)+`亿`:e>=1e4?J(e/1e4)+`万`:J(e);function le({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,W.jsx)(`g`,{transform:`translate(${e},${t+10}) rotate(-45)`,children:(0,W.jsx)(`text`,{textAnchor:`end`,fill:`var(--omni-muted,var(--omni-chart-primary,#91abc5))`,fontSize:10,children:i.map((e,t)=>(0,W.jsx)(`tspan`,{x:0,dy:t?12:0,children:e},t))})})}function ue({categories:e,shops:t,metric:n,onCategory:r,selectedCategory:i,selectedShop:a}){let[o,s]=(0,j.useState)(!1),{plot:c,view:l,indices:u,update:d}=ce(e.map(e=>e.id).join(`,`),e.length,!o),{start:f,end:p,count:m}=u;function h(t){d(n=>B(n,t*m,e.length))}let g=q.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,W.jsxs)(`section`,{className:I.panel,"aria-label":g.label+`品类对比`,children:[(0,W.jsxs)(`div`,{className:I.panelHeading,children:[(0,W.jsxs)(`h2`,{children:[g.label,(0,W.jsxs)(`small`,{children:[g.unit,` · 点击类目筛选商品`]})]}),(0,W.jsx)(`button`,{"aria-pressed":o,onClick:()=>s(!o),children:o?`查看图表`:`数据对比`})]}),o?(0,W.jsx)(`div`,{className:I.horizontal,children:(0,W.jsxs)(`table`,{children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`叶子类目`}),t.map((e,t)=>(0,W.jsxs)(`th`,{children:[(0,W.jsx)(`i`,{style:{background:K[t]}}),e.name]},e.id))]})}),(0,W.jsx)(`tbody`,{children:(0,W.jsx)(b,{items:e||[],columns:t.length+1,children:e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:(0,W.jsx)(`button`,{className:I.link,onClick:()=>r(e.id),children:e.name})}),t.map(t=>(0,W.jsx)(`td`,{children:J(e.shops.find(e=>e.shopId===t.id)?.[n])},t.id))]},e.id)})})]})}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:I.chartRange,children:[(0,W.jsxs)(`span`,{children:[`第 `,_.length?f+1:0,`–`,p,` 项 / 共 `,_.length,` 项`]}),_.length>12&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{onClick:()=>h(-1),disabled:f===0,children:`上一组`}),(0,W.jsx)(`button`,{onClick:()=>h(1),disabled:p===_.length,children:`下一组`}),(0,W.jsx)(`button`,{"aria-pressed":m===_.length,onClick:()=>d(()=>({start:0,size:_.length})),children:`显示全部`}),(0,W.jsx)(`button`,{"aria-pressed":m===Math.min(24,_.length),onClick:()=>d(()=>z(_.length)),children:`紧凑视图`}),(0,W.jsx)(`span`,{children:`滚轮 / 双指滑动平移 · Ctrl+滚轮 / 双指捏合缩放`})]})]}),(0,W.jsx)(`div`,{ref:c,className:I.chart,"aria-label":`品类图表,可滚轮平移及缩放`,children:(0,W.jsx)(T,{width:`100%`,height:`100%`,children:(0,W.jsxs)(A,{data:v,margin:{top:12,right:18,bottom:12,left:30},barCategoryGap:`12%`,barGap:2,accessibilityLayer:!0,children:[(0,W.jsx)(E,{stroke:`var(--omni-line,var(--omni-chart-track,#29445f))`,vertical:!1}),(0,W.jsx)(D,{dataKey:`name`,interval:0,height:145,tick:(0,W.jsx)(le,{})}),(0,W.jsx)(w,{tick:{fontSize:10,fill:`var(--omni-muted,#91abc5)`},tickFormatter:e=>n===`sales`||n===`efficiency`?Y(e):J(e,0),width:70}),(0,W.jsx)(C,{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=>[J(typeof e==`number`?e:null)+` `+g.unit]}),(0,W.jsx)(k,{verticalAlign:`top`,height:34,wrapperStyle:{fontSize:12}}),t.map((e,t)=>(0,W.jsx)(ne,{isAnimationActive:!1,dataKey:e.id,name:e.name,fill:K[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,W.jsx)(te,{fillOpacity:i&&i===t.id&&(!a||a===e.id)?1:i?.7:1,stroke:i===t.id&&(!a||a===e.id)?`var(--omni-text,var(--omni-chart-primary,#dceaf7))`:void 0,strokeWidth:2},t.id))},e.id))]})})}),_.length>3&&(0,W.jsx)(G,{view:l,total:_.length,onChange:d})]}),(0,W.jsx)(`p`,{className:I.note,children:`链接效率=上榜商品销售额 ÷ 去重上榜链接数。浏览量为来源浏览次数;缺失值显示 —。`})]})}function de({query:e,onClose:t}){let n=(0,j.useRef)(null),r=F({...e,view:`analysis-trend`});return(0,j.useEffect)(()=>{let e=document.activeElement;return n.current?.showModal(),()=>e?.focus()},[]),(0,oe.createPortal)((0,W.jsxs)(`dialog`,{ref:n,className:I.dialog,onCancel:e=>{e.preventDefault(),t()},onClick:e=>{e.target===e.currentTarget&&t()},"aria-label":`销售走势`,children:[(0,W.jsxs)(`div`,{className:I.panelHeading,children:[(0,W.jsx)(`h2`,{children:r.data?.title||`销售走势`}),(0,W.jsx)(`button`,{autoFocus:!0,onClick:t,"aria-label":`关闭走势`,children:(0,W.jsx)(_,{size:18})})]}),r.loading?(0,W.jsx)(`p`,{role:`status`,children:`正在读取走势…`}):r.error?(0,W.jsx)(`p`,{role:`alert`,children:r.error}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:I.trendChart,children:(0,W.jsx)(T,{width:`100%`,height:`100%`,children:(0,W.jsxs)(ee,{data:r.data?.points,margin:{top:20,right:15,bottom:12,left:12},children:[(0,W.jsx)(E,{stroke:`var(--omni-line,var(--omni-chart-track,#29445f))`,vertical:!1}),(0,W.jsx)(D,{dataKey:`month`,tick:{fontSize:10}}),(0,W.jsx)(w,{tickFormatter:Y,tick:{fontSize:10},width:70}),(0,W.jsx)(C,{contentStyle:{background:`var(--omni-bg,#0a1524)`,border:`1px solid var(--omni-line,#29445f)`},formatter:e=>[Y(typeof e==`number`?e:null),`销售额(元)`]}),(0,W.jsx)(O,{dataKey:`sales`,name:`销售额`,stroke:K[0],strokeWidth:2,dot:{r:3},connectNulls:!1})]})})}),(0,W.jsx)(`p`,{className:I.note,children:r.data?.notice})]})]}),document.body)}var X=[[`shop`,`店铺`],[`category`,`叶子类目`],[`sales`,`销售额`],[`salesYoy`,`销售额同比`],[`salesMom`,`销售额环比`],[`views`,`浏览量`],[`units`,`成交件数`],[`unitPrice`,`件单价`],[`marketShare`,`市占率`],[`trends`,`走势`]],Z=new Set([`sales`,`salesYoy`,`salesMom`,`views`,`units`,`unitPrice`,`marketShare`]);function Q(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 $({row:e}){let t=Q(e.imageUrl,!0);return t?(0,W.jsx)(`img`,{src:t,alt:``,loading:`lazy`,referrerPolicy:`no-referrer`}):(0,W.jsx)(`span`,{className:I.noImage,children:`商品`})}function fe({config:t,layout:n,taxonomy:r,onChange:i,onTrend:a}){let[u,d]=(0,j.useState)(1),[p,m]=(0,j.useState)(t.q),[h,g]=(0,j.useState)(!1),_=[t.month,t.recentYear,t.category,t.shopFilter,t.q,t.sort,t.direction,t.shops.join(`,`)].join(`:`),[v,y]=(0,j.useState)(_),x=_===v?u:1,C=F({view:`analysis-items`,month:t.month,recentYear:String(t.recentYear),shops:t.shops.join(`,`),category:t.category,shopFilter:t.shopFilter,q:t.q,sort:t.sort,direction:t.direction,page:String(x),pageSize:`25`}),w=X.filter(([e])=>t.columns.includes(e)),T=new Set(n.categories.flatMap(e=>S(r,e.id).map(e=>e.id))),E=r.filter(e=>T.has(e.id)).map(e=>({id:e.id,name:S(r,e.id).map(e=>e.name).join(` / `)})).sort((e,t)=>e.name.localeCompare(t.name,`zh-CN`));function D(e,n){a({kind:n,product:e.id,category:e.categoryId,shops:t.shops.join(`,`),shopFilter:e.shopId,month:t.month})}function O(e,t){if(t===`shop`)return e.shopName;if(t===`category`)return S(r,e.categoryId).map(e=>e.name).join(` / `)||e.categoryName;if(t===`trends`)return(0,W.jsxs)(`span`,{className:I.inline,children:[(0,W.jsx)(`button`,{className:I.link,onClick:()=>D(e,`product`),children:`商品`}),(0,W.jsx)(`button`,{className:I.link,onClick:()=>D(e,`category`),children:`类目`})]});let n=e[t];return typeof n==`number`?t===`sales`||t===`unitPrice`?Y(n):[`salesYoy`,`salesMom`,`marketShare`].includes(t)?J(n)+`%`:J(n,0):`—`}let k=(e,t=!0)=>(0,W.jsxs)(`div`,{className:I.product,children:[t&&(0,W.jsx)($,{row:e}),(0,W.jsxs)(`div`,{children:[Q(e.url)?(0,W.jsx)(`a`,{href:Q(e.url),target:`_blank`,rel:`noreferrer`,children:e.name}):(0,W.jsx)(`b`,{children:e.name}),(0,W.jsxs)(`small`,{children:[`ID `,e.id,` · 原榜 `,e.sourceRank==null?`—`:`#`+e.sourceRank,e.conflicting?` · 指标冲突,保留为空`:``]})]})]});return(0,W.jsxs)(`section`,{className:I.panel,"aria-label":`上榜商品链接列表`,children:[(0,W.jsxs)(`div`,{className:I.panelHeading,children:[(0,W.jsxs)(`h2`,{children:[`上榜商品链接`,(0,W.jsxs)(`small`,{children:[J(C.data?.total,0),` 条`]})]}),(0,W.jsxs)(`div`,{className:I.inline,children:[(0,W.jsx)(`button`,{"aria-label":`商品大图`,"aria-pressed":t.productView===`grid`,onClick:()=>i({productView:`grid`}),children:(0,W.jsx)(c,{size:14})}),(0,W.jsx)(`button`,{"aria-label":`商品列表`,"aria-pressed":t.productView===`list`,onClick:()=>i({productView:`list`}),children:(0,W.jsx)(l,{size:14})}),(0,W.jsxs)(`button`,{"aria-expanded":h,onClick:()=>g(!h),children:[(0,W.jsx)(ae,{size:14}),`表格配置`]})]})]}),(0,W.jsxs)(`div`,{className:I.filters,children:[(0,W.jsxs)(`label`,{children:[`类目`,(0,W.jsxs)(`select`,{"aria-label":`上榜商品类目筛选`,value:T.has(t.category)?t.category:``,onChange:e=>i({category:e.target.value}),children:[(0,W.jsx)(`option`,{value:``,children:`全部上榜类目`}),E.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,W.jsxs)(`label`,{children:[`店铺`,(0,W.jsxs)(`select`,{"aria-label":`上榜商品店铺筛选`,value:t.shopFilter,onChange:e=>i({shopFilter:e.target.value}),children:[(0,W.jsx)(`option`,{value:``,children:`全部对比店铺`}),n.shops.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,W.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i({q:p.trim()})},children:[(0,W.jsx)(f,{size:14}),(0,W.jsx)(`input`,{"aria-label":`搜索上榜商品`,value:p,onChange:e=>m(e.target.value),placeholder:`商品名称 / ID`,maxLength:100}),(0,W.jsx)(`button`,{type:`submit`,children:`搜索`})]}),t.category&&(0,W.jsx)(`button`,{className:I.link,onClick:()=>i({category:``}),children:`清除类目筛选`})]}),h&&(0,W.jsxs)(`fieldset`,{className:I.columnOptions,children:[(0,W.jsx)(`legend`,{children:`显示字段`}),X.map(([e,n])=>(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:t.columns.includes(e),onChange:n=>i({columns:n.target.checked?[...t.columns,e]:t.columns.filter(t=>t!==e)})}),n]},e))]}),C.loading?(0,W.jsx)(`div`,{className:I.empty,role:`status`,children:`正在读取上榜商品…`}):C.error?(0,W.jsx)(`div`,{className:I.error,role:`alert`,children:C.error}):C.data?.rows.length?t.productView===`grid`?(0,W.jsx)(`div`,{className:I.productCards,children:(0,W.jsx)(b,{items:C.data.rows||[],children:e=>(0,W.jsxs)(`article`,{tabIndex:0,"aria-label":e.name,children:[(0,W.jsx)(`div`,{className:I.cardImage,children:(0,W.jsx)($,{row:e})}),(0,W.jsxs)(`div`,{className:I.cardDetails,children:[k(e,!1),(0,W.jsx)(`dl`,{children:w.map(([t,n])=>(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:n}),(0,W.jsx)(`dd`,{children:O(e,t)})]},t))})]})]},`${e.shopId}:${e.categoryId}:${e.id}`)})}):(0,W.jsx)(`div`,{className:I.horizontal,children:(0,W.jsxs)(`table`,{children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`序号`}),(0,W.jsx)(`th`,{children:`商品`}),w.map(([n,r])=>(0,W.jsx)(`th`,{children:Z.has(n)?(0,W.jsxs)(`button`,{className:I.sort,onClick:()=>i({sort:n,direction:t.sort===n&&t.direction===`desc`?`asc`:`desc`}),children:[r,t.sort===n&&(t.direction===`desc`?(0,W.jsx)(e,{size:12}):(0,W.jsx)(ie,{size:12}))]}):r},n))]})}),(0,W.jsx)(`tbody`,{children:(0,W.jsx)(b,{items:C.data.rows||[],columns:w.length+2,children:(e,t)=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:(C.data.page-1)*25+t+1}),(0,W.jsx)(`td`,{children:k(e)}),w.map(([t])=>(0,W.jsx)(`td`,{className:t===`category`?I.categoryCell:void 0,children:O(e,t)},t))]},`${e.shopId}:${e.categoryId}:${e.id}`)})})]})}):(0,W.jsx)(`div`,{className:I.empty,children:`当前筛选下暂无已完成入库的上榜商品。`}),C.data&&(0,W.jsxs)(`div`,{className:I.pagination,children:[(0,W.jsx)(`span`,{children:C.data.notice}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`button`,{"aria-label":`上榜商品上一页`,disabled:C.data.page<=1,onClick:()=>{y(_),d(C.data.page-1)},children:(0,W.jsx)(o,{size:15})}),(0,W.jsxs)(`span`,{children:[C.data.page,` / `,Math.max(1,Math.ceil(C.data.total/25))]}),(0,W.jsx)(`button`,{"aria-label":`上榜商品下一页`,disabled:C.data.page*25>=C.data.total,onClick:()=>{y(_),d(C.data.page+1)},children:(0,W.jsx)(s,{size:15})})]})]})]})}function pe({month:e,selected:t,onAdd:n,onClose:r}){let[i,a]=(0,j.useState)(``),[o,s]=(0,j.useState)(``),[c,l]=(0,j.useState)(`search`),d=(0,j.useRef)(null),p=(0,j.useRef)(null),m=F(o?{view:`shop-search`,month:e,q:o}:null);return(0,j.useEffect)(()=>{let e=document.activeElement;return d.current?.showModal(),p.current?.focus(),()=>e?.focus()},[]),(0,W.jsxs)(`dialog`,{ref:d,className:I.dialog,onCancel:e=>{e.preventDefault(),r()},onClick:e=>{e.target===e.currentTarget&&r()},"aria-label":`添加对比店铺`,children:[(0,W.jsxs)(`div`,{className:I.panelHeading,children:[(0,W.jsx)(`h2`,{children:`添加对比店铺`}),(0,W.jsx)(`button`,{"aria-label":`关闭店铺搜索`,onClick:r,children:(0,W.jsx)(_,{size:18})})]}),(0,W.jsx)(`p`,{className:I.note,children:`最多对比 3 家店铺,搜索范围为企业获准类目。`}),(0,W.jsxs)(`div`,{className:I.inline,"aria-label":`店铺选择来源`,children:[(0,W.jsx)(`button`,{"aria-pressed":c===`search`,onClick:()=>l(`search`),children:`搜索店铺`}),(0,W.jsx)(`button`,{"aria-pressed":c===`favorites`,onClick:()=>l(`favorites`),children:`我的收藏`})]}),c===`favorites`?(0,W.jsx)(re,{kind:`shop`,selectedIds:t,onSelect:e=>{let t=e.record;t?.id&&n({id:t.id,name:t.name||t.id})}}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`form`,{className:I.searchForm,onSubmit:e=>{e.preventDefault(),s(i.trim())},children:[(0,W.jsx)(f,{size:16}),(0,W.jsx)(`input`,{ref:p,"aria-label":`搜索对比店铺`,value:i,onChange:e=>a(e.target.value),maxLength:100,placeholder:`输入店铺名称或店铺 ID`}),(0,W.jsx)(`button`,{type:`submit`,disabled:!i.trim()||m.loading,children:`搜索`})]}),m.loading?(0,W.jsx)(`p`,{role:`status`,children:`正在搜索店铺…`}):m.error?(0,W.jsx)(`p`,{role:`alert`,className:I.error,children:m.error}):o&&(0,W.jsx)(`div`,{className:I.searchResults,children:m.data?.shops.length?m.data.shops.map(e=>(0,W.jsxs)(`button`,{disabled:t.includes(e.id),onClick:()=>n(e),children:[(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`b`,{children:e.name}),(0,W.jsxs)(`small`,{children:[`ID `,e.id]})]}),t.includes(e.id)?`已添加`:(0,W.jsx)(u,{size:16})]},e.id)):(0,W.jsx)(`p`,{children:`当前月份未找到匹配店铺,可尝试店铺编号或其他月份。`})})]})]})}function me({analysis:e,bootstrap:n,onBack:r}){let i=P(e),c=i.config,[l,p]=(0,j.useState)(!1),[m,h]=(0,j.useState)(0),[g,v]=(0,j.useState)(null),[y,x]=(0,j.useState)(!1),C=F(c.shops.length?{view:`shop-layout`,month:c.month,recentYear:String(c.recentYear),shops:c.shops.join(`,`)}:null,m),w=C.data,T=w?.categories.map(e=>({...e,name:S(n.categories,e.id).map(e=>e.name).join(` / `)||e.name}))||[],E=n.months.indexOf(c.month);async function D(){x(!0);try{await i.flush(),r()}catch{x(!1)}}function O(e){v({kind:`shop`,month:c.month,shops:c.shops.join(`,`),shopFilter:e.id})}return(0,W.jsxs)(`div`,{className:I.root,children:[(0,W.jsxs)(`header`,{className:I.editorHeader,children:[(0,W.jsxs)(`div`,{className:I.editorIdentity,children:[(0,W.jsx)(`button`,{"aria-label":`返回我的分析`,onClick:()=>void D(),disabled:y,children:(0,W.jsx)(t,{size:16})}),(0,W.jsx)(`input`,{"aria-label":`分析名称`,className:I.nameInput,value:i.name,maxLength:80,onChange:e=>i.setName(e.target.value),onBlur:()=>void i.flush().catch(()=>{})}),(0,W.jsx)(`span`,{className:I.saveStatus,role:`status`,children:i.error?`保存失败`:i.saving?`保存中…`:i.dirty?`待保存`:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(a,{size:12}),`已自动保存`]})})]}),(0,W.jsxs)(`div`,{className:I.editorTools,children:[(0,W.jsx)(`button`,{"aria-pressed":c.recentYear,onClick:()=>i.change({recentYear:!c.recentYear}),children:`最近一年`}),(0,W.jsx)(`button`,{"aria-label":`上一数据月份`,disabled:E<=0,onClick:()=>i.change({month:n.months[E-1]}),children:(0,W.jsx)(o,{size:15})}),(0,W.jsx)(`select`,{"aria-label":`分析统计月份`,value:c.month,onChange:e=>i.change({month:e.target.value}),children:n.months.map(e=>(0,W.jsx)(`option`,{children:e},e))}),(0,W.jsx)(`button`,{"aria-label":`下一数据月份`,disabled:E<0||E>=n.months.length-1,onClick:()=>i.change({month:n.months[E+1]}),children:(0,W.jsx)(s,{size:15})}),(0,W.jsx)(`button`,{onClick:()=>void D(),disabled:y,children:`我的分析`}),(0,W.jsx)(`button`,{"aria-label":`刷新分析数据`,onClick:()=>h(e=>e+1),children:(0,W.jsx)(d,{size:15})})]})]}),i.error&&(0,W.jsxs)(`p`,{role:`alert`,className:I.error,children:[i.error,(0,W.jsx)(`button`,{onClick:()=>void i.flush().catch(()=>{}),children:`重试保存`})]}),(0,W.jsxs)(`section`,{className:I.panel,"aria-label":`分析店铺汇总`,children:[(0,W.jsxs)(`div`,{className:I.panelHeading,children:[(0,W.jsxs)(`h2`,{children:[`品类分析`,(0,W.jsxs)(`small`,{children:[c.shops.length,` / 3 家店铺 · `,c.recentYear?`近 12 个月`:`所选月份`]})]}),c.shops.length<3&&(0,W.jsxs)(`button`,{className:I.primary,onClick:()=>p(!0),children:[(0,W.jsx)(u,{size:15}),`添加对比店铺`]})]}),c.shops.length?C.loading?(0,W.jsx)(`p`,{role:`status`,className:I.empty,children:`正在查询店铺品类数据…`}):C.error?(0,W.jsx)(`p`,{role:`alert`,className:I.error,children:C.error}):w&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:I.horizontal,children:(0,W.jsxs)(`table`,{className:I.summaryTable,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`店铺`}),(0,W.jsx)(`th`,{children:`销售走势`}),(0,W.jsx)(`th`,{children:`所在地`}),(0,W.jsx)(`th`,{children:`类型`}),(0,W.jsx)(`th`,{children:`店铺上榜销售额`}),(0,W.jsx)(`th`,{children:`上榜链接销售额`}),(0,W.jsx)(`th`,{children:`上榜叶子类目`}),(0,W.jsx)(`th`,{children:`上榜商品链接`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsx)(`tbody`,{children:(0,W.jsx)(b,{items:w.shops||[],columns:9,children:(e,t)=>(0,W.jsxs)(`tr`,{children:[(0,W.jsxs)(`td`,{children:[(0,W.jsxs)(`div`,{className:I.shopName,children:[(0,W.jsx)(`i`,{style:{background:K[t]}}),(0,W.jsx)(`b`,{children:e.name})]}),(0,W.jsxs)(`small`,{children:[`ID `,e.id,c.recentYear?` · 店铺榜覆盖 ${e.availableMonths} 个月`:``]})]}),(0,W.jsx)(`td`,{children:(0,W.jsx)(`button`,{className:I.link,onClick:()=>O(e),children:`查看`})}),(0,W.jsx)(`td`,{children:e.location||`—`}),(0,W.jsx)(`td`,{children:e.shopType||`—`}),(0,W.jsx)(`td`,{children:Y(e.summary.sales)}),(0,W.jsx)(`td`,{children:Y(e.summary.productSales)}),(0,W.jsx)(`td`,{children:e.categoryCount}),(0,W.jsx)(`td`,{children:J(e.summary.itemCount,0)}),(0,W.jsx)(`td`,{children:(0,W.jsx)(`button`,{"aria-label":`移除${e.name}`,onClick:()=>i.change({shops:c.shops.filter(t=>t!==e.id),category:``,shopFilter:``}),children:(0,W.jsx)(_,{size:14})})})]},e.id)})})]})}),(0,W.jsx)(`p`,{className:I.note,children:w.notice})]}):(0,W.jsxs)(`div`,{className:I.empty,children:[(0,W.jsx)(f,{size:28}),(0,W.jsx)(`h3`,{children:`从一家店铺开始分析`}),(0,W.jsx)(`p`,{children:`添加店铺后查看上榜销售表现、品类布局和商品链接。`}),(0,W.jsx)(`button`,{className:I.primary,onClick:()=>p(!0),children:`添加首家店铺`})]})]}),w&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:I.metricBar,role:`group`,"aria-label":`品类对比指标`,children:[q.map(e=>(0,W.jsx)(`button`,{"aria-pressed":c.metric===e.key,onClick:()=>i.change({metric:e.key}),children:e.label},e.key)),(0,W.jsxs)(`span`,{children:[T.length,` 个上榜叶子类目`]})]}),T.length?(0,W.jsx)(ue,{categories:T,shops:w.shops,metric:c.metric,selectedCategory:c.category,selectedShop:c.shopFilter,onCategory:(e,t)=>i.change({category:e,shopFilter:t||``})},c.shops.join(`,`)+c.month+c.recentYear):(0,W.jsx)(`div`,{className:I.empty,children:`所选月份及权限范围内暂无可展示的上榜叶子类目。`}),(0,W.jsx)(fe,{config:c,layout:w,taxonomy:n.categories,onChange:i.change,onTrend:v})]}),l&&(0,W.jsx)(pe,{month:c.month,selected:c.shops,onClose:()=>p(!1),onAdd:e=>{i.change({shops:[...c.shops,e.id],category:``,shopFilter:``}),i.name===`未命名分析`&&i.setName(e.name+`品类分析`),p(!1)}}),g&&(0,W.jsx)(de,{query:g,onClose:()=>v(null)})]})}function he({launch:e,onConsumeLaunch:t}){let[a,o]=(0,j.useState)(null),[s,c]=(0,j.useState)([]),[l,d]=(0,j.useState)(null),[f,p]=(0,j.useState)(!0),[m,h]=(0,j.useState)(``),[g,_]=(0,j.useState)(!1),[v,y]=(0,j.useState)(0),b=(0,j.useRef)(``);(0,j.useEffect)(()=>{let e=new AbortController;return Promise.all([x.bootstrap(e.signal),x.analyses(e.signal)]).then(([t,n])=>{e.signal.aborted||(o(t),c(n.analyses),h(``),p(!1))}).catch(t=>{e.signal.aborted||(h(t instanceof Error?t.message:`分析记录读取失败`),p(!1))}),()=>e.abort()},[v]),(0,j.useEffect)(()=>{if(!e||!a||b.current===e.id)return;b.current=e.id;let n={...M(e.month),shops:[e.shop.id]};x.saveAnalysis({id:e.id,name:e.shop.name+`品类分析`,config:n,revision:0}).then(e=>{d(e),t?.()}).catch(e=>h(e instanceof Error?e.message:`创建分析失败`))},[e,a,t]);async function S(){if(!(!a?.latestMonth||g)){_(!0),h(``);try{d(await x.saveAnalysis({id:crypto.randomUUID(),name:`未命名分析`,config:M(a.latestMonth),revision:0}))}catch(e){h(e instanceof Error?e.message:`创建分析失败`)}finally{_(!1)}}}return l&&a?(0,W.jsx)(me,{analysis:l,bootstrap:a,onBack:()=>{d(null),y(e=>e+1)}},l.id):(0,W.jsxs)(`main`,{className:I.root,children:[(0,W.jsxs)(`header`,{className:I.historyHeader,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:I.eyebrow,children:`市场大盘 / 我的分析`}),(0,W.jsx)(`h1`,{children:`店铺品类布局`}),(0,W.jsx)(`p`,{children:`从历史分析继续,或新建一份店铺对比。`})]}),(0,W.jsxs)(`button`,{className:I.primary,onClick:()=>void S(),disabled:f||g||!a?.latestMonth,children:[(0,W.jsx)(u,{size:16}),g?`正在创建…`:`新建分析`]})]}),m&&(0,W.jsxs)(`div`,{className:I.error,role:`alert`,children:[m,(0,W.jsx)(`button`,{onClick:()=>y(e=>e+1),children:`重新读取`})]}),(0,W.jsxs)(`section`,{className:I.history,"aria-label":`历史分析记录`,children:[(0,W.jsxs)(`div`,{className:I.panelHeading,children:[(0,W.jsxs)(`h2`,{children:[(0,W.jsx)(r,{size:16}),`历史分析`,(0,W.jsxs)(`small`,{children:[s.length,` 份`]})]}),(0,W.jsx)(`span`,{className:I.note,children:`方案按当前账号自动保存`})]}),f?(0,W.jsx)(`p`,{role:`status`,className:I.empty,children:`正在读取历史分析…`}):s.length?(0,W.jsx)(`div`,{className:I.historyList,children:s.map(e=>(0,W.jsxs)(`button`,{onClick:()=>d(e),children:[(0,W.jsx)(`span`,{className:I.historyIcon,children:(0,W.jsx)(i,{size:21})}),(0,W.jsxs)(`span`,{className:I.historyTitle,children:[(0,W.jsx)(`b`,{children:e.name}),(0,W.jsxs)(`small`,{children:[e.config.month,` · `,e.config.recentYear?`近一年 · `:``,e.config.shops.length?`${e.config.shops.length} 家店铺`:`尚未添加店铺`,` · `,q.find(t=>t.key===e.config.metric)?.label]})]}),(0,W.jsx)(`time`,{children:new Date(e.updatedAt).toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`,hour12:!1})}),(0,W.jsx)(n,{size:16})]},e.id))}):!m&&(0,W.jsxs)(`div`,{className:I.emptyHistory,children:[(0,W.jsx)(i,{size:35}),(0,W.jsx)(`h3`,{children:`还没有历史分析`}),(0,W.jsx)(`p`,{children:`新建分析后添加店铺,逐步查看品类和上榜商品。`})]})]})]})}export{he as default};
@@ -0,0 +1 @@
1
+ import{g as e,o as t,y as n}from"./index-DLSVWUSu.js";import{n as r}from"./format-DL7i7_eV.js";import{t as i}from"./market.module-VpU4XmGg.js";import{$ as a,A as o,Dt as s,E as c,Et as l,I as u,K as d,Lt as f,M as p,N as m,O as h,Ot as g,St as _,U as v,Ut as y,Vt as b,W as x,X as S,Z as ee,_ as C,a as w,b as T,bt as te,c as E,d as D,dt as O,f as k,ft as A,g as ne,h as re,ht as j,i as ie,jt as ae,k as oe,kt as M,l as se,lt as N,m as ce,n as le,o as ue,ot as P,pt as F,q as de,r as fe,rt as I,t as pe,u as me,ut as he,v as ge,vt as L,y as _e,z as ve,zt as ye}from"./CartesianChart-CP7p2vlm.js";import{n as R,r as be,t as xe}from"./getRadiusAndStrokeWidthFromDot-bv_ksZ7y.js";import{n as z,t as B}from"./graphicalItemSelectors-CJfZ6cht.js";var V=(e,t,n)=>c(e,`xAxis`,B(e,t),n),H=(e,t,n)=>oe(e,`xAxis`,B(e,t),n),U=(e,t,n)=>c(e,`yAxis`,z(e,t),n),W=(e,t,n)=>oe(e,`yAxis`,z(e,t),n),Se=L([S,V,U,H,W],(e,t,n,r,i)=>F(e,`xAxis`)?P(t,r,!1):P(n,i,!1)),G=L([o,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),K=e=>F(S(e),`xAxis`)?`yAxis`:`xAxis`,Ce=(e,t)=>K(e)===`yAxis`?z(e,t):B(e,t),we=L([S,V,U,H,W,L([G,(e,t,n)=>h(e,K(e),Ce(e,t),n)],(e,t)=>{if(!(e==null||t==null)){var{stackId:n}=e,r=p(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]])}}}),ve,Se,G,u],(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 Ge({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:d,areaSettings:c,stackedData:a,displayedData:m,chartBaseValue:l,bandSize:s})}}),q=n(e()),Te=[`id`],Ee=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function J(){return J=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},J.apply(null,arguments)}function Y(e,t){if(e==null)return{};var n,r,i=De(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 De(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 X(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 Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?X(Object(n),!0).forEach(function(t){Oe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Oe(e,t,n){return(t=ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e){var t=Ae(e,`string`);return typeof t==`symbol`?t:t+``}function Ae(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 Q(e,t){return e&&e!==`none`?e:t}var je=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:a,hide:o}=e;return[{inactive:o,dataKey:t,type:a,color:Q(r,i),value:O(n,t),payload:e}]},Me=q.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:ae,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:O(o,t),hide:s,type:l,color:Q(r,a),unit:c,graphicalItemId:u}};return q.createElement(k,{tooltipEntrySettings:d})});function Ne(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:a,dataKey:o}=r,s=b(r);return q.createElement(be,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function Pe(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 Z(Z({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return q.createElement(re,{value:t?i:void 0},n)}function Fe(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:p}=a,m=Y(a,Te),h=b(m),g=ye(m);return q.createElement(q.Fragment,null,t?.length>1&&q.createElement(f,{clipPath:r?`url(#clipPath-${i})`:void 0},q.createElement(d,J({},g,{id:p,points:t,connectNulls:l,type:s,baseLine:n,layout:o,stroke:`none`,className:`recharts-area-area`})),c!==`none`&&q.createElement(d,J({},h,{className:`recharts-area-curve`,layout:o,type:s,connectNulls:l,fill:`none`,points:t})),c!==`none`&&u&&Array.isArray(n)&&q.createElement(d,J({},h,{className:`recharts-area-curve`,layout:o,type:s,connectNulls:l,fill:`none`,points:n}))),q.createElement(Ne,{points:t,props:m,clipPathId:i}))}function Ie(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,a=r[0]?.y,o=r[r.length-1]?.y;if(!j(a)||!j(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return M(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),M(c)?q.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function Le(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,a=r[0]?.x,o=r[r.length-1]?.x;if(!j(a)||!j(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return M(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),M(c)?q.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function Re(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:a}=e;return n===`vertical`?q.createElement(Ie,{alpha:t,points:r,baseLine:i,strokeWidth:a}):q.createElement(Le,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function ze(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a}=e,{points:o,baseLine:c,isAnimationActive:u,animationBegin:d,animationDuration:p,animationEasing:m,onAnimationStart:h,onAnimationEnd:_}=r,y=v((0,q.useMemo)(()=>({points:o,baseLine:c}),[o,c]),`recharts-area-`),b=ee(),[S,C]=(0,q.useState)(!1),w=!S,T=(0,q.useCallback)(()=>{typeof _==`function`&&_(),C(!1)},[_]),te=(0,q.useCallback)(()=>{typeof h==`function`&&h(),C(!0)},[h]);if(b==null)return null;var E=i.current,D=a.current;return q.createElement(Pe,{showLabels:w,points:o},r.children,q.createElement(x,{animationId:y,begin:d,duration:p,isActive:u,easing:m,onAnimationEnd:T,onAnimationStart:te,key:y},e=>{if(E){var d=E.length/o.length,p=e===1?o:o.map((t,n)=>{var r=Math.floor(n*d);if(E[r]){var i=E[r];return Z(Z({},t),{},{x:l(i.x,t.x,e),y:l(i.y,t.y,e)})}return t}),m=M(c)?l(D,c,e):g(c)||s(c)?l(D,0,e):c.map((t,n)=>{var r=Math.floor(n*d);if(Array.isArray(D)&&D[r]){var i=D[r];return Z(Z({},t),{},{x:l(i.x,t.x,e),y:l(i.y,t.y,e)})}return t});return e>0&&(i.current=p,a.current=m),q.createElement(Fe,{points:p,baseLine:m,needClip:t,clipPathId:n,props:r})}return e>0&&(i.current=o,a.current=c),q.createElement(f,null,u&&q.createElement(`defs`,null,q.createElement(`clipPath`,{id:`animationClipPath-${n}`},q.createElement(Re,{alpha:e,points:o,baseLine:c,layout:b,strokeWidth:r.strokeWidth}))),q.createElement(f,{clipPath:`url(#animationClipPath-${n})`},q.createElement(Fe,{points:o,baseLine:c,needClip:t,clipPathId:n,props:r})))}),q.createElement(ne,{label:r.label}))}function Be(e){var{needClip:t,clipPathId:n,props:r}=e,i=(0,q.useRef)(null),a=(0,q.useRef)();return q.createElement(ze,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var Ve=class extends q.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:p,zIndex:m}=this.props;if(e)return null;var h=y(`recharts-area`,r),g=d,{r:_,strokeWidth:v}=xe(t),b=ce(t),x=_*2+v,S=o?`url(#clipPath-${b?``:`dots-`}${g})`:void 0;return q.createElement(_e,{zIndex:m},q.createElement(f,{className:h},o&&q.createElement(`defs`,null,q.createElement(ie,{clipPathId:g,xAxisId:s,yAxisId:c}),!b&&q.createElement(`clipPath`,{id:`clipPath-dots-${g}`},q.createElement(`rect`,{x:a-x/2,y:i-x/2,width:l+x,height:u+x}))),q.createElement(Be,{needClip:o,clipPathId:g,props:this.props})),q.createElement(R,{points:n,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}),this.props.isRange&&Array.isArray(p)&&q.createElement(R,{points:p,mainColor:Q(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}))}},He={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:m.area};function Ue(e){var{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,connectNulls:o,dot:s,fill:c,fillOpacity:l,hide:u,isAnimationActive:d,legendType:f,stroke:p,xAxisId:m,yAxisId:h}=e,g=Y(e,Ee),_=a(),v=T(),{needClip:y}=w(m,h),b=I(),{points:x,isRange:S,baseLine:ee}=te(t=>we(t,e.id,b))??{},C=E();if(_!==`horizontal`&&_!==`vertical`||C==null||v!==`AreaChart`&&v!==`ComposedChart`)return null;var{height:D,width:O,x:k,y:A}=C;return!x||!x.length?null:q.createElement(Ve,J({},g,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:ee,connectNulls:o,dot:s,fill:c,fillOpacity:l,height:D,hide:u,layout:_,isAnimationActive:d,isRange:S,legendType:f,needClip:y,points:x,stroke:p,width:O,left:k,top:A,xAxisId:m,yAxisId:h}))}var We=(e,t,n,r,i)=>{var a=n??t;if(M(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 Ge(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=We(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=A(e,r);Array.isArray(o)?(a=o,_=!0):a=[h,o]}var l=a?.[1]??null,v=l==null||m&&!t&&A(e,r)==null;return g?{x:N({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:N({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 Ke(e){var t=_(e,He),n=I();return q.createElement(me,{id:t.id,type:`area`},e=>q.createElement(q.Fragment,null,q.createElement(D,{legendPayload:je(t)}),q.createElement(Me,{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}),q.createElement(se,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:he(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),q.createElement(Ue,J({},t,{id:e}))))}var qe=q.memo(Ke,de);qe.displayName=`Area`;var Je=[`axis`],Ye=(0,q.forwardRef)((e,t)=>q.createElement(pe,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Je,tooltipPayloadSearcher:ge,categoricalChartProps:e,ref:t})),$=t();function Xe({points:e,metric:t=`sales`}){let n=(0,q.useRef)(null),[a,o]=(0,q.useState)(300);return(0,q.useEffect)(()=>{if(!n.current)return;let e=new ResizeObserver(([e])=>o(Math.max(200,Math.round(e.contentRect.width))));return e.observe(n.current),()=>e.disconnect()},[]),(0,$.jsx)(`div`,{ref:n,className:i.chart,role:`img`,"aria-label":`月度数据趋势`,children:e.some(e=>e[t]!=null)?(0,$.jsxs)(Ye,{width:a,height:260,data:e,margin:{top:15,right:20,left:10,bottom:0},children:[(0,$.jsx)(ue,{stroke:`var(--omni-chart-track,#263e57)`,vertical:!1}),(0,$.jsx)(fe,{dataKey:`month`,tick:{fill:`#93adc5`,fontSize:11}}),(0,$.jsx)(le,{width:76,tickFormatter:e=>r(e),tick:{fill:`#93adc5`,fontSize:11}}),(0,$.jsx)(C,{contentStyle:{background:`#10243b`,border:`1px solid #355978`,color:`#e4f0fc`},formatter:e=>r(Number(e),t===`sales`?`money`:`number`)}),(0,$.jsx)(qe,{dataKey:t,type:`monotone`,fill:`var(--omni-chart-primary,#2aaad4)`,fillOpacity:.15,stroke:`var(--omni-chart-primary,#4dc9f0)`,strokeWidth:2,connectNulls:!1})]}):(0,$.jsx)(`p`,{className:i.empty,children:`当前记录暂无可追踪的月度数据`})})}export{Xe as default};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]);export{t};
@@ -1 +1 @@
1
- import{d as e}from"./index-BBySSIJT.js";var t=e(`chart-no-axes-combined`,[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14.639V21`,key:`1s85h0`}],[`path`,{d:`M20 10.656V21`,key:`q45596`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18.463V21`,key:`1otddq`}],[`path`,{d:`M8 14.656V21`,key:`1t2idw`}]]);export{t};
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`chart-no-axes-combined`,[[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14.639V21`,key:`1s85h0`}],[`path`,{d:`M20 10.656V21`,key:`q45596`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18.463V21`,key:`1otddq`}],[`path`,{d:`M8 14.656V21`,key:`1t2idw`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
@@ -1 +1 @@
1
- import{d as e}from"./index-BBySSIJT.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),n=e(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]);export{t as n,n as t};
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),n=e(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]);export{t as n,n as t};
@@ -0,0 +1 @@
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`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`}]]),n=864e5;function r(e){let t=String(e??``).trim();if(/^\d{6,20}$/.test(t))return t;try{let e=new URL(t);if(![`https:`,`http:`].includes(e.protocol)||e.username||e.password||e.port||![`taobao.com`,`tmall.com`].some(t=>e.hostname===t||e.hostname.endsWith(`.`+t)))return null;let n=e.searchParams.get(`id`);return/^\d{6,20}$/.test(n||``)?n:null}catch{return null}}function i(e){let t=r(e?.id);return t?`https://item.taobao.com/item.htm?id=${t}`:null}function a(e,t){let n=r(t?.id);if(!n)throw Error(`请输入有效的淘宝/天猫商品 ID 或完整商品链接`);if(e.some(e=>e.id===n))throw Error(`该商品已在分析列表中`);if(e.length>=2)throw Error(`最多同时分析 2 个商品,请先移除一个商品`);return[...e,{...t,id:n,name:String(t.name||`商品 ${n}`).slice(0,300),url:i({id:n})}]}function o(e=Date.now()){return new Date(Number(e)+8*36e5-n).toISOString().slice(0,10)}function s(e,t,r=Date.now()){if(![7,30].includes(e)||!/^\d{4}-\d{2}-\d{2}$/.test(t||``))throw Error(`请选择近 7 天或近 30 天和有效的结束日期`);let i=Date.parse(t+`T00:00:00Z`);if(!Number.isFinite(i)||new Date(i).toISOString().slice(0,10)!==t||t>o(r))throw Error(`结束日期必须是有效日期,且不能晚于昨天`);let a=e=>new Date(i-e*n).toISOString().slice(0,10);return{days:e,startDate:a(e-1),endDate:t,peerBeginDate:a(e*2-1),peerEndDate:a(e)}}export{o as a,s as i,r as n,t as o,i as r,a as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./TrendChart-BF4JgwxH.js","./index-DLSVWUSu.js","./index-BgJNmU0Z.css","./format-DL7i7_eV.js","./market.module-VpU4XmGg.js","./market-SuD7x_Hf.css","./CartesianChart-CP7p2vlm.js","./getRadiusAndStrokeWidthFromDot-bv_ksZ7y.js","./graphicalItemSelectors-CJfZ6cht.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./chevron-down-DO6RUQm8.js";import{t}from"./chevron-right-e65CaeL6.js";import{t as n}from"./search-DFdSppzm.js";import{d as r,g as i,h as a,o,s,t as c,y as l}from"./index-DLSVWUSu.js";import{n as u}from"./workspace-view-state-D0ujRczW.js";import"./public-C-PBMVOQ.js";import{t as d}from"./format-DL7i7_eV.js";import{t as f}from"./market.module-VpU4XmGg.js";var p=[[`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`]],m={categoryId:``,month:``,view:`categories`,metric:`sales`,recentYear:!1,q:``,sort:`sales`,direction:`desc`,page:1,pageSize:100,minPrice:``,maxPrice:``};function h(e,t){return u(`market.`+e,t)}var g=l(i(),1),_=a(),v=o();function y({text:e,label:t,title:n,children:i}){let[a,o]=(0,g.useState)(!1),[s,c]=(0,g.useState)(``),l=(0,g.useRef)(null),u=(0,g.useRef)(0);(0,g.useEffect)(()=>()=>{u.current++,l.current&&clearTimeout(l.current)},[]);async function d(){let t=++u.current,n=`已复制`;try{if(window.omni){let t=await window.omni.copyText(e);if(!t.ok)throw Error(t.error)}else await navigator.clipboard.writeText(e);if(t!==u.current)return;o(!0)}catch{if(t!==u.current)return;n=`复制失败,请重试`,o(!1)}l.current&&clearTimeout(l.current),c(n),l.current=setTimeout(()=>c(``),1e3)}return(0,v.jsxs)(`span`,{className:f.copyControl,children:[(0,v.jsx)(`button`,{className:f.copyButton,"data-copied":a,"aria-label":t,title:n,onClick:()=>void d(),children:i||(0,v.jsx)(r,{size:12})}),s&&(0,v.jsx)(`span`,{className:f.copyFeedback,role:`status`,children:s})]})}function b({src:e,name:t,onClose:n}){let r=(0,g.useRef)(null),[i,a]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{let e=document.activeElement;return r.current?.showModal(),()=>e?.focus()},[]),(0,_.createPortal)((0,v.jsxs)(`dialog`,{ref:r,className:f.imageViewer,"aria-label":`${t}大图`,onCancel:e=>{e.preventDefault(),n()},onClick:e=>{e.target===e.currentTarget&&n()},children:[(0,v.jsx)(`button`,{autoFocus:!0,className:f.imageViewerClose,"aria-label":`关闭商品大图`,onClick:n,children:(0,v.jsx)(s,{size:24})}),i?(0,v.jsx)(`p`,{role:`status`,children:`图片暂时无法加载`}):(0,v.jsx)(`img`,{src:e,alt:t,referrerPolicy:`no-referrer`,onError:()=>a(!0),onClick:e=>{let t=e.currentTarget,r=t.getBoundingClientRect();if(!t.naturalWidth||!t.naturalHeight)return;let i=Math.min(r.width/t.naturalWidth,r.height/t.naturalHeight),a=t.naturalWidth*i/2,o=t.naturalHeight*i/2;(Math.abs(e.clientX-r.left-r.width/2)>a||Math.abs(e.clientY-r.top-r.height/2)>o)&&n()}})]}),document.body)}function x({src:e,name:t,hoverPreview:n=!0}){let[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(!1);(0,g.useEffect)(()=>{if(!r)return;let e=()=>i(null);return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[r]);function s(e){if(!n)return;let t=e.getBoundingClientRect(),r=Math.min(320,window.innerWidth-24,window.innerHeight-24);i({left:t.right+r+12<=window.innerWidth?t.right+8:Math.max(12,t.left-r-8),top:Math.max(12,Math.min(t.top,window.innerHeight-r-12)),size:r})}return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`button`,{className:f.imageButton,"aria-label":`放大查看${t}`,"aria-haspopup":`dialog`,onMouseEnter:e=>s(e.currentTarget),onMouseLeave:()=>i(null),onFocus:e=>s(e.currentTarget),onBlur:()=>i(null),onClick:()=>{i(null),o(!0)},children:(0,v.jsx)(`img`,{src:e,alt:t,loading:`lazy`,referrerPolicy:`no-referrer`})}),r&&!a&&(0,_.createPortal)((0,v.jsx)(`div`,{className:f.imageHoverPreview,"aria-hidden":`true`,style:{left:r.left,top:r.top,width:r.size,height:r.size},children:(0,v.jsx)(`img`,{src:e,alt:``,referrerPolicy:`no-referrer`})}),document.body),a&&(0,v.jsx)(b,{src:e,name:t,onClose:()=>{i(null),o(!1)}})]})}function S({title:e,children:t,onClose:n}){let r=(0,g.useRef)(null);return(0,g.useEffect)(()=>{let e=document.activeElement;return r.current?.showModal(),()=>e?.focus()},[]),(0,v.jsxs)(`dialog`,{ref:r,className:f.dialog,onCancel:n,onClick:e=>{e.target===e.currentTarget&&n()},children:[(0,v.jsxs)(`header`,{children:[(0,v.jsx)(`h2`,{children:e}),(0,v.jsx)(`button`,{autoFocus:!0,onClick:n,"aria-label":`关闭弹窗`,children:(0,v.jsx)(s,{size:18})})]}),t]})}function C({categories:r,value:i,onChoose:a,disabled:o,favoriteIds:s}){let[c,l]=(0,g.useState)(``),[u,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(!1),[_,y]=(0,g.useState)(!1),b=(0,g.useRef)(null);(0,g.useEffect)(()=>{function e(e){let t=b.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 x=d(r,u||i),S=r.filter(e=>s.includes(e.id)),C=(m?S:r).filter(e=>e.name.includes(c.trim()));function w(e){a(e),l(``),p(e),b.current&&(b.current.open=!1)}let T=[r.filter(e=>!e.parentId),...x.filter(e=>!e.leaf).map(e=>r.filter(t=>t.parentId===e.id))];return(0,v.jsxs)(`details`,{className:f.picker,ref:b,onToggle:e=>y(e.currentTarget.open),onKeyDown:e=>{e.key===`Escape`&&b.current&&(b.current.open=!1,b.current.querySelector(`summary`)?.focus())},children:[(0,v.jsxs)(`summary`,{"aria-label":`选择市场类目`,"aria-disabled":o,onClick:e=>{o&&e.preventDefault()},children:[d(r,i).map(e=>e.name).join(` / `)||`全部类目`,(0,v.jsx)(e,{size:14})]}),_&&(0,v.jsxs)(`div`,{className:f.pickerPanel,children:[(0,v.jsxs)(`label`,{children:[(0,v.jsx)(n,{size:14}),(0,v.jsx)(`input`,{"aria-label":`查找授权类目`,placeholder:`搜索类目名称`,value:c,onChange:e=>l(e.target.value)})]}),(0,v.jsxs)(`nav`,{className:f.pickerModes,"aria-label":`类目选择方式`,children:[(0,v.jsx)(`button`,{"aria-pressed":!m,onClick:()=>h(!1),children:`全部类目`}),(0,v.jsxs)(`button`,{"aria-pressed":m,onClick:()=>h(!0),children:[`我的收藏(`,S.length,`)`]})]}),!m&&(0,v.jsx)(`button`,{onClick:()=>w(``),children:`全部获准类目`}),c.trim()||m?(0,v.jsxs)(`div`,{className:f.pickerResults,children:[!C.length&&(0,v.jsx)(`p`,{role:`status`,className:f.pickerEmpty,children:m&&!S.length?`暂无收藏类目,点击类目旁的星标即可收藏。`:`没有匹配的类目。`}),(m?C:C.slice(0,100)).map(e=>(0,v.jsx)(`button`,{onClick:()=>w(e.id),children:d(r,e.id).map(e=>e.name).join(` / `)},e.id))]}):(0,v.jsx)(`div`,{className:f.cascade,children:T.map((e,n)=>(0,v.jsx)(`div`,{children:e.map(e=>(0,v.jsxs)(`div`,{onPointerEnter:t=>{t.pointerType===`mouse`&&p(e.id)},className:x.some(t=>t.id===e.id)?f.selectedCategory:``,children:[(0,v.jsx)(`button`,{onClick:()=>w(e.id),children:e.name}),!e.leaf&&(0,v.jsx)(`button`,{"aria-label":`展开${e.name}`,"aria-expanded":x.some(t=>t.id===e.id),onClick:()=>p(e.id),children:(0,v.jsx)(t,{size:13})})]},e.id))},n))})]})]})}function w({columns:e,allowed:t,onSave:n,onClose:r}){let[i,a]=(0,g.useState)(e),[o,s]=(0,g.useState)(null),c=e=>p.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,v.jsxs)(S,{title:`自定义数据字段(${i.length}/${t.length})`,onClose:r,children:[(0,v.jsxs)(`div`,{className:f.fieldLayout,children:[(0,v.jsxs)(`section`,{children:[(0,v.jsx)(`h3`,{children:`排行榜指标`}),t.map(e=>(0,v.jsxs)(`label`,{children:[(0,v.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,v.jsxs)(`section`,{children:[(0,v.jsxs)(`div`,{className:f.fieldTools,children:[(0,v.jsxs)(`span`,{children:[`已选 `,i.length,`/`,t.length]}),(0,v.jsx)(`button`,{onClick:()=>a(t),children:`恢复默认`}),(0,v.jsx)(`button`,{onClick:()=>a([]),children:`清空`})]}),(0,v.jsx)(`h3`,{children:`当前字段顺序`}),(0,v.jsx)(`ol`,{children:i.map((e,t)=>(0,v.jsxs)(`li`,{draggable:!0,onDragStart:()=>s(e),onDragOver:e=>e.preventDefault(),onDrop:()=>{o&&l(i.indexOf(o),t),s(null)},children:[(0,v.jsxs)(`span`,{children:[`⠿ `,t+1,`. `,c(e)]}),(0,v.jsx)(`button`,{disabled:t===0,"aria-label":`上移${c(e)}`,onClick:()=>l(t,t-1),children:`↑`}),(0,v.jsx)(`button`,{disabled:t===i.length-1,"aria-label":`下移${c(e)}`,onClick:()=>l(t,t+1),children:`↓`})]},e))})]})]}),(0,v.jsxs)(`footer`,{className:f.dialogActions,children:[(0,v.jsx)(`button`,{onClick:r,children:`取消`}),(0,v.jsx)(`button`,{className:f.primary,onClick:()=>n(i),children:`确定`})]})]})}var T=(0,g.lazy)(()=>c(()=>import(`./TrendChart-BF4JgwxH.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url));function E(e){return(0,v.jsx)(g.Suspense,{fallback:(0,v.jsx)(`p`,{role:`status`,children:`正在加载趋势图…`}),children:(0,v.jsx)(T,{...e})})}export{x as a,h as c,S as i,p as l,w as n,E as o,y as r,m as s,C as t};
@@ -1 +1 @@
1
- import{d as e}from"./index-BBySSIJT.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t};
1
+ import{p as e}from"./index-DLSVWUSu.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./orbit-CrQs6cpl.js";import{t as n}from"./arrow-left-BhFSpYzK.js";import{n as r}from"./clock-3-CDHtQwAe.js";import{t as i}from"./arrow-up-right-IBQoN72x.js";import{t as a}from"./chart-no-axes-combined-DVgKs36j.js";import{t as o}from"./check-DBnlZFEo.js";import{t as s}from"./chevron-right-e65CaeL6.js";import{n as c,r as l,t as u}from"./ui-public-Dt5dHt-8.js";import{r as d}from"./CollaborationWorkspace-Cnp5PNn_.js";import{a as f,n as p,o as m,r as h}from"./products-B5vjXM_b.js";import{t as g}from"./layers-CjsT_HGi.js";import{t as _}from"./refresh-cw-CxbRf97c.js";import{t as v}from"./search-DFdSppzm.js";import{g as y,o as b,p as x,s as S,y as C}from"./index-DLSVWUSu.js";import{n as w}from"./module-host-DNtiV4gZ.js";import{n as T}from"./workspace-view-state-D0ujRczW.js";import"./public-C-PBMVOQ.js";import{t as E}from"./group-Ed305HyG.js";var D=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`}]]),O=x(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),k=x(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),A=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`}]]),j=C(y(),1);function M(e){return e.flatMap(e=>e.route.filter(e=>[`attention`,`review`].includes(e.state)).map(t=>({project:e,step:t})))}function N(e){return e.flatMap(e=>e.activity.map(t=>({project:e,event:t}))).sort((e,t)=>t.event.at.localeCompare(e.event.at))}var P={activity:`_activity_k9yph_1`,panel:`_panel_k9yph_1`},F=b();function I({mode:e,api:t,onOpen:n}){let i=w().archiveScope||`real`,[a,o]=(0,j.useState)([]),[s,c]=(0,j.useState)(!0),[l,u]=(0,j.useState)(``),[d,f]=(0,j.useState)(0),[p,m]=T(`workbench.`+e+`.search`,``);(0,j.useEffect)(()=>{let e=!0;return t(`/command-center`).then(t=>{let n=t?.projects;if(!Array.isArray(n))throw Error(`项目状态返回格式异常`);e&&(o(n.filter(e=>i===`stored-demo`?e.simulated:!e.simulated)),u(``))}).catch(t=>{e&&(o([]),u(t instanceof Error?t.message:`项目状态读取失败`))}).finally(()=>{e&&c(!1)}),()=>{e=!1}},[t,d,i]);let h=M(a),g=N(a),_=e=>e.toLowerCase().includes(p.trim().toLowerCase());return(0,F.jsxs)(`section`,{className:P.activity,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`h1`,{children:e===`tasks`?`待处理事项`:`执行记录`}),(0,F.jsxs)(`label`,{children:[(0,F.jsx)(v,{size:16}),(0,F.jsx)(`input`,{"aria-label":`搜索工作台事项与记录`,value:p,onChange:e=>m(e.target.value),placeholder:`搜索项目或事项`})]})]}),l&&(0,F.jsxs)(`p`,{role:`alert`,children:[l,` `,(0,F.jsx)(`button`,{onClick:()=>{c(!0),f(e=>e+1)},children:`重试`})]}),s?(0,F.jsx)(`p`,{role:`status`,children:`正在读取项目状态…`}):(0,F.jsx)(`div`,{className:P.panel,children:e===`tasks`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`h2`,{children:[`需要你处理 · `,h.length,` 项`]}),h.filter(({project:e,step:t})=>_(e.name+t.name)).slice(0,30).map(({project:e,step:t})=>(0,F.jsxs)(`button`,{onClick:()=>n(e.id,t.target),children:[(0,F.jsxs)(`span`,{children:[(0,F.jsxs)(`b`,{children:[t.name,` · `,t.state===`attention`?`待复核`:`待确认`]}),(0,F.jsxs)(`small`,{children:[e.name,` · `,t.description]})]}),(0,F.jsx)(r,{size:16})]},e.id+t.id)),!h.length&&(0,F.jsx)(`p`,{children:l?`连接恢复后显示待处理事项。`:`当前没有待复核或待确认的阶段。`})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`h2`,{children:`项目执行与确认记录`}),g.filter(({project:e,event:t})=>_(e.name+t.name)).slice(0,50).map(({project:e,event:t},i)=>(0,F.jsxs)(`button`,{onClick:()=>n(e.id,{tab:`wiki`}),children:[(0,F.jsxs)(`span`,{children:[(0,F.jsxs)(`b`,{children:[t.name,` · `,t.state]}),(0,F.jsxs)(`small`,{children:[e.name,` · `,new Date(t.at).toLocaleString(`zh-CN`)]})]}),(0,F.jsx)(r,{size:16})]},e.id+t.at+i)),!g.length&&(0,F.jsx)(`p`,{children:l?`连接恢复后显示执行记录。`:`当前没有执行记录。`})]})})]})}async function ee(e,t,n){let r=e=>{n?.aborted||t?.(e)},i=[e(`/growth-center?view=overview`).then(e=>{let t=e;if(!Array.isArray(t?.products)||!Array.isArray(t?.catalog))throw Error(`经营资料返回格式异常`);return r({growth:t}),t}),e(`/command-center`).then(e=>{let t=e?.projects;if(!Array.isArray(t))throw Error(`项目资料返回格式异常`);return r({projects:t}),t}),l(1e4,n,e).then(e=>(r({activity:e}),e))],a=(await Promise.allSettled(i)).filter(e=>e.status===`rejected`);if(a.length)throw Error(a.map(e=>e.reason instanceof Error?e.reason.message:`资料读取失败`).join(`;`));let[o,s,c]=await Promise.all(i);return{growth:o,projects:s,activity:c}}var te={refunds:`同期支付订单的退款`,product:`货品成本`,fulfillment:`运费与履约`,platform:`平台费用`,ads:`广告花费`,tax:`税费`,other:`其他变动费用`,fixed:`固定费用分摊`};function L(e){try{let t=JSON.parse(e||`{}`);return t.version!==1||!t.orders||typeof t.orders!=`object`||Array.isArray(t.orders)?{}:Object.fromEntries(Object.entries(t.orders).slice(0,20).filter(([e,t])=>e.length<100&&Array.isArray(t)).map(([e,t])=>[e,[...new Set(t.filter(e=>typeof e==`string`&&e.length<200))].slice(0,2500)]))}catch{return{}}}function R(e,t){let n=new Set(t);return[...(e||[]).filter(e=>n.delete(e)),...t.filter(e=>n.delete(e))]}function z(e,t,n,r){let i=[...new Set([...e||[],...t])];if(!t.includes(n)||!t.includes(r)||n===r)return i;let a=i.indexOf(n),o=i.indexOf(r);return i.splice(a,1),i.splice(o,0,n),i}var B=(0,j.createContext)(null);function ne({scope:e,onDirty:t,children:n}){let r=e?`omni.dashboard-layout.v1:`+encodeURIComponent(e):null,[i]=(0,j.useState)(()=>{try{return r?L(localStorage.getItem(r)):{}}catch{return{}}}),[a,o]=T(`dashboard.layout.`+(e||`session`),i),[s,c]=(0,j.useState)(a),[l,u]=(0,j.useState)(!1),[d,f]=(0,j.useState)(``),[p,m]=(0,j.useState)(null),h=l&&JSON.stringify(s)!==JSON.stringify(a);(0,j.useEffect)(()=>(t?.(h),()=>t?.(!1)),[h,t]);let g=()=>{u(!1),m(null)};function _(){try{r&&localStorage.setItem(r,JSON.stringify({version:1,orders:s})),o(s),g(),f(r?`布局已保存到当前账号的此台设备。`:`布局已保存,本次会话内有效。`)}catch{f(`布局保存失败,请检查本机存储后重试;当前调整仍保留。`)}}let v={editing:l,orders:s,drag:p,setDrag:m,scope:e,message:d,begin:()=>{c(a),u(!0),f(`拖动卡片左上角,或用前移、后移按钮调整顺序。`)},save:_,cancel:()=>{c(a),g(),f(`已取消本次布局修改。`)},reset:e=>{c(t=>Object.fromEntries(Object.entries(t).filter(([t])=>!e.includes(t)))),f(`当前页已恢复默认排列,点击保存后生效。`)},move:(e,t,n,r)=>{c(i=>({...i,[e]:z(i[e],t,n,r)})),f(`顺序已调整,保存后记住布局。`)}};return(0,F.jsx)(B.Provider,{value:v,children:(0,F.jsx)(`div`,{className:l?`dashboard-editing`:``,onClickCapture:e=>{l&&!e.target.closest(`[data-layout-control]`)&&(e.preventDefault(),e.stopPropagation())},children:n})})}function re({enabled:e=!0,groups:t=[]}){let n=(0,j.useContext)(B);return!n||!e&&!n.editing?null:(0,F.jsxs)(`div`,{className:`dl-toolbar`,"data-layout-control":!0,children:[(0,F.jsx)(`div`,{className:`dl-toolbar-actions`,children:n.editing?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{children:`调整卡片顺序`}),(0,F.jsxs)(`button`,{onClick:()=>n.reset(t),children:[(0,F.jsx)(k,{size:13}),`恢复默认`]}),(0,F.jsxs)(`button`,{onClick:n.cancel,children:[(0,F.jsx)(S,{size:13}),`取消`]}),(0,F.jsxs)(`button`,{className:`dl-save`,onClick:n.save,children:[(0,F.jsx)(o,{size:14}),`保存布局`]})]}):(0,F.jsxs)(`button`,{onClick:n.begin,children:[(0,F.jsx)(d,{size:14}),`编辑页面`]})}),n.message&&(0,F.jsx)(`small`,{role:`status`,children:n.message})]})}function ie({group:e,className:t=``,children:i}){let a=(0,j.useContext)(B),o=j.Children.toArray(i).filter(j.isValidElement).map((e,t)=>({id:String(e.key??t).replace(/^\.\$/,``),el:e})),s=o.map(e=>e.id),c=R(a?.orders[e],s);return(0,F.jsx)(`div`,{className:t,children:c.map((t,i)=>{let l=o.find(e=>e.id===t).el,u=l.props[`data-layout-label`]||`卡片`;return(0,j.cloneElement)(l,{key:t,"data-layout-card":t,"data-layout-group":e,className:[l.props.className,`dl-card`,a?.editing?`dl-editable`:``,a?.drag?.group===e&&a.drag.id===t?`dl-dragging`:``].filter(Boolean).join(` `),onDragOver:t=>{a?.editing&&a.drag?.group===e&&(t.preventDefault(),t.dataTransfer.dropEffect=`move`)},onDrop:n=>{a?.editing&&a.drag?.group===e&&(n.preventDefault(),n.stopPropagation(),a.move(e,s,a.drag.id,t),a.setDrag(null))}},a?.editing?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`dl-card-controls`,"data-layout-control":!0,children:[(0,F.jsxs)(`button`,{className:`dl-grip`,"aria-label":`拖动`+u,title:`拖动调整顺序`,onPointerDown:n=>{n.button===0&&(n.preventDefault(),n.stopPropagation(),n.currentTarget.setPointerCapture(n.pointerId),a.setDrag({group:e,id:t}))},onPointerUp:n=>{if(!n.currentTarget.hasPointerCapture(n.pointerId))return;n.currentTarget.releasePointerCapture(n.pointerId);let r=document.elementFromPoint(n.clientX,n.clientY)?.closest(`[data-layout-group]`);for(;r&&r.dataset.layoutGroup!==e;)r=r.parentElement?.closest(`[data-layout-group]`);let i=r?.dataset.layoutCard;i&&i!==t&&a.move(e,s,t,i),a.setDrag(null)},onPointerCancel:()=>a.setDrag(null),children:[(0,F.jsx)(O,{size:14}),(0,F.jsx)(`span`,{children:u})]}),(0,F.jsx)(`button`,{disabled:i===0,"aria-label":`前移`+u,title:`前移`,onClick:()=>a.move(e,s,t,c[i-1]),children:(0,F.jsx)(n,{size:13})}),(0,F.jsx)(`button`,{disabled:i===c.length-1,"aria-label":`后移`+u,title:`后移`,onClick:()=>a.move(e,s,t,c[i+1]),children:(0,F.jsx)(r,{size:13})})]}),l.props.children]}):l.props.children)})})}var V=e=>Math.round(Number(e)*100),H=e=>e.shopIds?.length===1?e.shopIds[0]:null,U=e=>e.slice().sort((e,t)=>String(t.created).localeCompare(String(e.created)));function W(e,t){let n=new Set;return U(e).filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function G(e){let[t]=e;return e.length===1?t:{...t,id:`shops:`+JSON.stringify([t.mode,t.start,t.end,e.map(H).sort()]),aggregated:!0,shopIds:e.map(H),memberReports:e,scopeLabel:`${e.length} 家店铺汇总`,identity:e.map(e=>e.scopeLabel).join(`、`),total:e.reduce((e,t)=>e+V(t.total),0)/100,count:e.reduce((e,t)=>e+t.count,0),breakdown:e.flatMap(e=>e.breakdown.map(t=>({...t,name:e.scopeLabel+` · `+t.name,shopId:H(e)}))),basis:`同一统计期间的各店铺支付金额之和,不重复叠加历史账本;不扣退款。`}}function K(e,t){let n=e.filter(e=>t&&e.start===t.start&&e.end===t.end&&e.mode===t.mode&&(t.shopIds?.length?H(e)&&t.shopIds.includes(H(e)):!e.shopIds?.length&&e.project===t.project)),r=W(n.filter(e=>e.scope?.type===`item`),e=>(H(e)||e.project)+`|`+e.scope.id),i=W(n.filter(e=>e.scope?.type===`shop`),e=>H(e)||e.scope.id),a=i[0];if(t?.aggregated){let e=i.length===t.shopIds.length&&i.every(e=>e.complete),n=Object.keys(i[0]?.amounts||{});a={...t,aggregated:!0,memberReports:i,complete:e,gaps:e?[]:[`部分店铺缺少完整同期成本账本`],amounts:e?Object.fromEntries(n.map(e=>[e,i.reduce((t,n)=>t+V(n.amounts[e]),0)/100])):{},profit:e?i.reduce((e,t)=>e+V(t.profit),0)/100:null}}return{shop:a,itemBooks:r}}function q(e={},t=``){let n=W(e.sales||[],e=>H(e)?JSON.stringify([e.mode,H(e),e.start,e.end]):e.id),r=e.finance||[],i=new Map;for(let e of n){let t=H(e)?JSON.stringify([e.mode,e.start,e.end]):e.id;i.has(t)||i.set(t,[]),i.get(t).push(e)}let a=[...i.values()].map(e=>G(W(e,e=>H(e)||e.id))),o=W([...a.filter(e=>e.aggregated),...n],e=>e.id).map(e=>({...e,financeComplete:!!K(r,e).shop?.complete})),s=a[0],c=new Set(n.filter(e=>e.mode===s?.mode).map(H).filter(Boolean)),l=a.find(e=>e.mode===s?.mode&&(!c.size||e.shopIds?.length===c.size)&&K(r,e).shop?.complete)||s,u=o.find(e=>e.id===t),d=u||o.find(e=>e.id===l?.id);return{sales:o,report:d,...K(r,d),newestReport:s,automatic:!u,usingPreviousPeriod:!u&&!!d&&d.id!==s?.id}}var J=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`;function ae({metrics:n,products:r,projects:o,ready:s,onOpen:c,onNav:l,onAssign:u,demo:d,projectActivity:f}){let[p,m]=(0,j.useState)(``),[h,_]=(0,j.useState)(``),{sales:v,report:y,shop:b,itemBooks:x,newestReport:C,automatic:w,usingPreviousPeriod:T}=(0,j.useMemo)(()=>q(n,h),[n,h]),E=x.filter(e=>e.complete),O=E.filter(e=>e.profit>0),k=E.filter(e=>e.profit<0),A=E.filter(e=>e.profit===0),M=n?.incubation||[],N=M.filter(e=>e.success),P=f?.running,I=[{id:`sales`,label:`店铺销售额`,value:y?J(y.total):`暂无记录`,unit:y?`元`:``,note:y?`${y.shopIds?.length||1} 家店铺 · ${y.start} — ${y.end}`:`先归档全店销售数据`,Icon:a},{id:`profit`,label:`店铺利润`,value:b?.complete?J(b.profit):`缺成本资料`,unit:b?.complete?`元`:``,note:`已列成本口径经营结余 · 点击核对`,Icon:D},{id:`links`,label:`盈利 / 亏损链接`,value:E.length?`${O.length} / ${k.length}`:`尚未核算`,unit:E.length?`个`:``,note:`${E.length} 个有核算结果 · ${A.length} 个持平`,Icon:g},{id:`incubation`,label:`孵化晋级记录`,value:M.length?`${N.length} / ${M.length}`:`尚无记录`,unit:M.length?`个`:``,note:`已记录晋级 / 累计纳入 · 不代表成功率`,Icon:t},{id:`tasks`,label:`正在推进的任务`,value:s&&P!==void 0?P:`—`,unit:`个`,note:f?`${f.complete} 个项目已完成 · 任务看板进行中`:`正在读取项目任务`,Icon:e}],ee=I.map(e=>!s&&e.id!==`tasks`?{...e,value:`读取中`,unit:``,note:`正在读取经营资料`}:e);function L(e){if(e===`tasks`){l(`projects`);return}m(p===e?``:e)}let R=e=>d||e.aggregated?`data:application/json;charset=utf-8,`+encodeURIComponent(JSON.stringify(e,null,2)):`/api/workbench/`+e.project+`/file/`+(e.artifactId||e.id);return(0,F.jsxs)(F.Fragment,{children:[v.length>1&&(0,F.jsxs)(`div`,{className:`gb-period`,children:[(0,F.jsxs)(`label`,{children:[`销售与核算周期`,(0,F.jsxs)(`select`,{"aria-label":`销售与核算周期`,value:w?``:y?.id||``,onChange:e=>_(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:`自动选择 · 优先完整核算`}),v.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.scopeLabel||e.projectName,` · `,e.start,` ~ `,e.end,` · `,e.financeComplete?`成本齐全`:`成本待补齐`]},e.id))]})]}),T&&(0,F.jsxs)(`p`,{role:`status`,children:[`最新销售归档(`,C.start,` — `,C.end,`)尚未完成全部店铺的同期核算,当前展示最近完整核算周期(`,y.start,` — `,y.end,`)。`]})]}),(0,F.jsx)(ie,{group:`cockpit.kpis`,className:`gc-kpis`,children:ee.map(e=>(0,F.jsx)(`div`,{"data-layout-label":e.label,children:(0,F.jsxs)(`button`,{className:`gc-kpi gc-kpi-`+e.id+` `+(p===e.id?`is-open`:``),onClick:()=>L(e.id),"aria-expanded":p===e.id,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:`gc-kpi-icon`,children:(0,F.jsx)(e.Icon,{size:21})}),(0,F.jsx)(`span`,{children:e.label}),(0,F.jsx)(i,{size:13})]}),(0,F.jsxs)(`strong`,{className:String(e.value).length>9?`gc-long-value`:``,children:[e.value,(0,F.jsx)(`small`,{children:e.unit})]}),(0,F.jsx)(`p`,{children:e.note})]},e.id)},e.id))}),p&&(0,F.jsxs)(`section`,{className:`gb-detail`,"aria-label":`经营指标明细`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`small`,{children:d?`演示数据 · 不代表真实经营结果`:`归档数据 · 以原件日期和来源为准`}),(0,F.jsxs)(`h2`,{children:[I.find(e=>e.id===p)?.label,` · 明细与下一步`]})]}),(0,F.jsx)(`button`,{"aria-label":`关闭指标明细`,onClick:()=>m(``),children:(0,F.jsx)(S,{size:18})})]}),p===`sales`&&(0,F.jsxs)(F.Fragment,{children:[y?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{children:y.basis}),(0,F.jsxs)(`p`,{children:[`统计范围:`,y.scopeLabel,` · `,y.count,` 个链接 · `,y.identity,`。`,y.mode===`unverified`?`来源未完成独立核验。`:``]}),(0,F.jsx)(`div`,{className:`gb-table`,children:(0,F.jsxs)(`table`,{children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`商品 / 分类`}),(0,F.jsx)(`th`,{children:`支付销售额`}),(0,F.jsx)(`th`,{children:`链接数`}),(0,F.jsx)(`th`,{children:`下一步`})]})}),(0,F.jsx)(`tbody`,{children:y.breakdown.map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{children:e.name}),(0,F.jsxs)(`td`,{children:[`¥ `,J(e.sales)]}),(0,F.jsx)(`td`,{children:e.count}),(0,F.jsx)(`td`,{children:(0,F.jsx)(`button`,{onClick:()=>e.itemId?c(e.project,{tab:`monitor`,itemId:e.itemId}):c(y.project,{tab:`data`}),children:e.itemId?`看商品表现`:`核对来源数据`})})]},e.name))})]})}),(0,F.jsx)(`p`,{className:`gb-next`,children:`下一步:先看销售贡献高的商品,再核对退款和成本,决定继续推广还是调整商品。`}),(0,F.jsx)(`a`,{href:R(y),download:d?`模拟销售账本.json`:void 0,children:`查看原始记录`})]}):(0,F.jsx)(`p`,{children:`当前没有全店销售记录。先到数据中心归档同一店铺、同一统计窗口的数据。`}),(0,F.jsx)(`button`,{onClick:()=>l(`data`),children:`进入数据中心`})]}),p===`profit`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{children:`计算:支付销售额 − 同支付订单退款 − 货品、履约、平台、广告、税费、其他费用 − 固定费用分摊。结果是已列成本口径经营结余。`}),b?.complete?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`gb-costs`,children:[Object.entries(b.amounts).map(([e,t])=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:e===`gross`?`支付销售额`:te[e]}),(0,F.jsxs)(`b`,{children:[`¥ `,J(t)]})]},e)),(0,F.jsxs)(`div`,{className:`gb-profit`,children:[(0,F.jsx)(`span`,{children:`经营结余`}),(0,F.jsxs)(`b`,{children:[`¥ `,J(b.profit)]})]})]}),(0,F.jsx)(`a`,{href:R(b),download:d?`模拟利润账本.json`:void 0,children:`查看核算原件`})]}):(0,F.jsxs)(`div`,{className:`gb-gap`,children:[(0,F.jsx)(`b`,{children:`当前所选周期缺少完整店铺成本账本,不能计算利润。`}),(0,F.jsx)(`p`,{children:`需要补齐:货品、运费、平台、广告、税费、其他费用、固定费用分摊,以及同支付订单退款。明确没有发生的费用填0,未知项留空。`})]}),(0,F.jsx)(`p`,{className:`gb-next`,children:`下一步:核对金额和凭证;若亏损,先查看费用占比与亏损商品,再进入商品优化评估原因。`}),(0,F.jsx)(`button`,{onClick:()=>c(b?.project||y?.project||o[0]?.id,{tab:`finance`}),disabled:!o.length,children:`打开经营核算`})]}),p===`links`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{children:`按同周期、完整成本账本判断:结余大于0为盈利,小于0为亏损,等于0为持平;缺成本的商品不计入盈亏。当前仅统计有账本的范围。`}),(0,F.jsx)(`div`,{className:`gb-table`,children:(0,F.jsxs)(`table`,{children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`商品`}),(0,F.jsx)(`th`,{children:`销售额`}),(0,F.jsx)(`th`,{children:`经营结余`}),(0,F.jsx)(`th`,{children:`状态`}),(0,F.jsx)(`th`,{children:`下一步`})]})}),(0,F.jsx)(`tbody`,{children:x.map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsxs)(`td`,{children:[e.projectName,(0,F.jsx)(`small`,{children:e.scope.id})]}),(0,F.jsxs)(`td`,{children:[`¥ `,J(e.gross)]}),(0,F.jsx)(`td`,{children:e.complete?`¥ `+J(e.profit):`费用不全`}),(0,F.jsx)(`td`,{children:(0,F.jsx)(`span`,{className:e.profit<0?`gb-loss`:`gb-win`,children:e.complete?e.profit>0?`盈利`:e.profit<0?`亏损`:`持平`:`待核算`})}),(0,F.jsx)(`td`,{children:(0,F.jsx)(`button`,{onClick:()=>c(e.project,{tab:e.complete?`optimization`:`finance`,itemId:e.scope.id}),children:e.complete?`查看并优化`:`补齐费用`})})]},e.id))})]})}),!x.length&&(0,F.jsx)(`p`,{children:`当前所选周期没有商品成本账本,不能仅凭销售额判定盈亏。`}),(0,F.jsx)(`button`,{disabled:!o.length,onClick:()=>c(y?.project||o[0]?.id,{tab:`finance`}),children:`补充商品成本账本`})]}),p===`incubation`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{children:`这里只统计已保存的运营晋级记录与累计纳入数量,不计算经营成功率。未晋级可能仍在观察,不代表失败;每条记录需要核对标准、证据和观察时间,不能推断可复制收益。`}),(0,F.jsxs)(`div`,{className:`gb-inc-summary`,children:[(0,F.jsxs)(`b`,{children:[N.length,(0,F.jsx)(`small`,{children:`达标晋级`})]}),(0,F.jsx)(`span`,{children:`/`}),(0,F.jsxs)(`b`,{children:[M.length,(0,F.jsx)(`small`,{children:`纳入孵化`})]})]}),(0,F.jsx)(`div`,{className:`gb-table`,children:(0,F.jsxs)(`table`,{children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`商品`}),(0,F.jsx)(`th`,{children:`加入时间`}),(0,F.jsx)(`th`,{children:`结果`}),(0,F.jsx)(`th`,{children:`老师标准与依据`}),(0,F.jsx)(`th`,{children:`下一步`})]})}),(0,F.jsx)(`tbody`,{children:M.map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{children:e.itemId}),(0,F.jsx)(`td`,{children:e.started.slice(0,10)}),(0,F.jsx)(`td`,{children:e.success?`达标晋级`:`继续观察`}),(0,F.jsxs)(`td`,{className:`gb-wrap`,children:[e.standard||`待记录老师标准`,(0,F.jsx)(`small`,{children:e.evidence||`尚无达标证据`})]}),(0,F.jsx)(`td`,{children:(0,F.jsx)(`button`,{onClick:()=>{let t=r.find(t=>t.itemId===e.itemId&&t.project===e.project);t?u(t):c(e.project,{tab:`data`})},children:e.success?`查看运营分组`:`核对并晋级`})})]},e.key))})]})}),!M.length&&(0,F.jsx)(`p`,{children:`还没有新品进入孵化的记录,暂不能评价。`}),(0,F.jsx)(`p`,{className:`gb-next`,children:`下一步:先把新品加入“新品测试”;达标后选择下一运营分组,填写老师标准与达标依据。单纯换组不计为已记录达标晋级。`}),(0,F.jsx)(`button`,{disabled:!r.length,onClick:()=>u(r.find(e=>e.tier===`unassigned`)||r[0],`test`),children:`登记新品,开始孵化`})]})]})]})}var oe=e=>Math.abs(e)>=1e4?(e/1e4).toFixed(1)+`万`:Y(e),Y=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`,se={scale:`#35dcca`,incubate:`#9880ff`,test:`#438bff`,unassigned:`var(--omni-muted,#91a9bd)`},X={scale:`重点推广`,incubate:`持续孵化`,test:`新品测试`,unassigned:`待分组`},Z=[{id:`business`,label:`经营分析`,note:`查看商品经营趋势、销售构成和运营分组。`},{id:`projects`,label:`项目总览`,note:`全局看进度,卡片看状态,进入节点主流程继续推进。`},{id:`tasks`,label:`待办与任务`,note:`集中查看运营任务、巡店提醒和需要你处理的事项。`},{id:`history`,label:`复盘动态`,note:`回看项目阶段与历史记录,核对过程和依据。`}],ce={done:`已确认`,review:`待确认`,attention:`需处理`,todo:`未开始`,stopped:`已停止`};function Q({title:e,sub:t,children:n}){return(0,F.jsxs)(`div`,{className:`gc-panel-head`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h2`,{children:[(0,F.jsx)(`span`,{}),` `,e]}),(0,F.jsx)(`small`,{children:t})]}),n]})}function le({series:e,days:t,onOpen:n}){let[r,o]=(0,j.useState)(null),s=e?.points||[],c=Date.parse(s.at(-1)?.date)-(t-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,F.jsxs)(`div`,{className:`gc-chart-empty`,children:[(0,F.jsx)(a,{size:38}),(0,F.jsx)(`b`,{children:`这段时间还没有可用数据`}),(0,F.jsx)(`span`,{children:`进入商品监控,查看数据来源与日期`}),(0,F.jsxs)(`button`,{onClick:n,children:[`查看商品监控 `,(0,F.jsx)(i,{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,t-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,F.jsx)(`line`,{x1:p(h),y1:m(h.value),x2:p(e),y2:m(e.value)},e.date)),h=e}),(0,F.jsxs)(`div`,{className:`gc-chart`,children:[(0,F.jsxs)(`div`,{className:`gc-chart-reading`,children:[(0,F.jsxs)(`strong`,{children:[Y(r?.value??l.at(-1)?.value),(0,F.jsx)(`small`,{children:e.unit})]}),(0,F.jsxs)(`span`,{children:[r?.date||l.at(-1)?.date,` · `,e.name]}),(0,F.jsx)(`i`,{children:`柱与线均为同一指标`})]}),(0,F.jsxs)(`svg`,{viewBox:`0 0 780 255`,role:`img`,"aria-label":`${e.name},最近${t}天归档趋势,缺失不补零`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:`gc-bar`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,F.jsx)(`stop`,{stopColor:`var(--omni-chart-primary,#5ec9ff)`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`var(--omni-chart-primary,#2857d6)`,stopOpacity:`.3`})]})}),[0,.25,.5,.75,1].map(e=>(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`line`,{className:`gc-gridline`,x1:`54`,x2:`750`,y1:m(d+f*e),y2:m(d+f*e)}),(0,F.jsx)(`text`,{x:`42`,y:m(d+f*e)+4,textAnchor:`end`,children:oe(d+f*e)})]},e)),l.map(n=>n.value===null?null:(0,F.jsxs)(`g`,{onMouseEnter:()=>o(n),onMouseLeave:()=>o(null),children:[(0,F.jsx)(`rect`,{x:p(n)-Math.min(8,230/t),y:Math.min(m(0),m(n.value)),width:Math.min(16,460/t),height:Math.max(1,Math.abs(m(0)-m(n.value))),rx:`2`,fill:`url(#gc-bar)`}),(0,F.jsx)(`circle`,{cx:p(n),cy:m(n.value),r:`3`,fill:`var(--omni-chart-primary,#6ceeff)`}),(0,F.jsxs)(`title`,{children:[n.date,`:`,Y(n.value),` `,e.unit]})]},n.date)),(0,F.jsx)(`g`,{className:`gc-line`,children:g}),[0,.25,.5,.75,1].map(e=>(0,F.jsx)(`text`,{x:54+690*e,y:`247`,textAnchor:`middle`,children:new Date(c+(t-1)*864e5*e).toISOString().slice(5,10)},e))]})]})}function $(e){return(0,F.jsx)(ne,{scope:e.layoutScope,onDirty:e.onDirty,children:(0,F.jsx)(ue,{...e})})}function ue({products:e,projects:t,catalog:n,ready:r,onAction:a,onAssign:o,onOpen:l,onNav:u,onTier:d,onCreate:p,onExecute:h,metrics:g,demo:_,projectActivity:v,projectPreview:y,onRefreshProjects:b}){let[x,S]=T(`workbench.cockpit.tab`,`business`),C=Z.find(e=>e.id===x)||Z[0],w=(0,j.useRef)(null);function E(e){let t=Z.findIndex(e=>e.id===C.id),n=e.key===`ArrowRight`?(t+1)%Z.length:e.key===`ArrowLeft`?(t+Z.length-1)%Z.length:e.key===`Home`?0:e.key===`End`?Z.length-1:-1;n<0||(e.preventDefault(),S(Z[n].id),(w.current?.querySelectorAll(`[role=tab]`)[n])?.focus())}let[D,O]=T(`workbench.productKey`,``),[k,M]=T(`workbench.metric`,``),[N,P]=T(`workbench.days`,30),[I,ee]=T(`workbench.timelineDays`,14),[te,L]=(0,j.useState)(null),R=e.find(e=>e.key===D)||e.find(e=>e.demoCurrent)||e[0],z=R?.series.find(e=>e.key===k)||R?.series.find(e=>[`paid`,`payAmt`,`sales`,`gmv`].includes(e.metric))||R?.series.find(e=>e.metric===`buyers`)||R?.series[0],B=v?.running??0,ne=v?.pending??0,V=e.filter(e=>f(e)),H=Object.keys(X).map(t=>({id:t,name:X[t],count:e.filter(e=>e.tier===t).length})),U=0,W=H.map(t=>{let n={...t,offset:U,length:e.length?t.count/e.length*314.16:0};return U+=n.length,n}),G=t.filter(e=>e.replay?.some(e=>Number.isFinite(Date.parse(e.at)))).sort((e,t)=>String(t.updated).localeCompare(String(e.updated))),K=Math.max(0,...G.flatMap(e=>e.replay.map(e=>Date.parse(e.at)).filter(Number.isFinite))),q=K-(I-1)*864e5,J=[{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`}],Y=g?.sales?.[0],$=(Y?.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),me=Math.max(1,...$.map(e=>e.sales));return(0,F.jsxs)(`div`,{className:`gc`,children:[(0,F.jsx)(re,{enabled:[`business`,`projects`].includes(C.id),groups:[`cockpit.kpis`,...C.id===`projects`?[`projects.modules`,`projects.stats`,`projects.cards`]:[`cockpit.business`]]}),(0,F.jsx)(ae,{metrics:g,products:e,projects:t,ready:r,onOpen:l,onNav:u,onAssign:o,demo:_,projectActivity:v}),(0,F.jsxs)(`div`,{className:`gc-tabs-heading`,children:[(0,F.jsx)(`div`,{role:`tablist`,"aria-label":`工作台分类`,className:`gc-tabs`,"data-layout-control":!0,ref:w,onKeyDown:E,children:Z.map(e=>(0,F.jsx)(`button`,{role:`tab`,id:`gc-tab-`+e.id,"aria-controls":`gc-panel-`+e.id,"aria-selected":C.id===e.id,tabIndex:C.id===e.id?0:-1,onClick:()=>S(e.id),children:e.label},e.id))}),C.id===`projects`&&(0,F.jsxs)(`div`,{className:`pb-heading-actions`,children:[(0,F.jsxs)(`button`,{className:`pb-all-projects`,onClick:()=>u(`projects`),children:[`查看全部项目 `,(0,F.jsx)(i,{size:14})]}),(0,F.jsx)(`button`,{className:`pb-create`,onClick:p,children:`+ 新建项目`})]})]}),(0,F.jsx)(`p`,{className:`gc-tab-description`,children:C.note}),(0,F.jsxs)(`div`,{role:`tabpanel`,id:`gc-panel-`+C.id,"aria-labelledby":`gc-tab-`+C.id,tabIndex:0,className:`gc-tab-panel gc-tab-`+C.id,children:[C.id===`projects`&&(0,F.jsx)(c,{previewData:y,onRefresh:b,onExecute:h,projects:t,ready:r,onOpen:l,onCreate:p,showHeading:!1,previewLimit:8,onAllProjects:()=>u(`projects`)}),C.id===`tasks`&&(0,F.jsx)(`div`,{className:`gc-quick-tiers`,"aria-label":`运营策略任务速览`,children:[`test`,`incubate`,`scale`].map(t=>{let n=e.filter(e=>e.tier===t),r=n.filter(e=>e.work?.active?.length),c=n.filter(e=>f(e)),l=n.find(e=>e.demoCurrent)||r[0]||n[0];return(0,F.jsxs)(`section`,{style:{"--tier":se[t]},children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`b`,{children:X[t]}),(0,F.jsxs)(`span`,{children:[n.length,`个商品 · `,r.length,`个运行中`]}),(0,F.jsx)(`button`,{onClick:()=>d(t),"aria-label":`查看`+X[t]+`全部商品`,children:(0,F.jsx)(s,{size:14})})]}),(0,F.jsxs)(`button`,{className:`gc-quick-line`,disabled:!l,onClick:()=>a(l,`work`),children:[(0,F.jsx)(`em`,{children:`正在做`}),(0,F.jsxs)(`span`,{children:[l?l.demoCurrent||m(l):`等待商品加入`,l&&(0,F.jsx)(`small`,{children:l.projectName})]})]}),(0,F.jsxs)(`button`,{className:`gc-quick-line`,onClick:()=>l?a(l,`data`):o(null,t),children:[(0,F.jsx)(`em`,{children:`下一步`}),(0,F.jsx)(`span`,{children:l?.demoNext||(t===`test`?`核对点击和加购,选出潜力款`:t===`incubate`?`核对转化与成本,确认是否赚钱`:`检查推广效果,优化计划`)}),(0,F.jsx)(s,{size:12})]}),(0,F.jsxs)(`button`,{className:`gc-quick-alert `+(c.length?`has-issues`:``),onClick:()=>c.length?a(c[0],`work`):d(t),children:[c.length?`需要你处理 `+c.length+` 项 · `+f(c[0]):`暂无待处理提醒`,(0,F.jsx)(i,{size:12})]})]},t)})}),(0,F.jsxs)(ie,{group:`cockpit.`+C.id,className:`gc-main-grid`,children:[C.id===`business`&&(0,F.jsxs)(`section`,{"data-layout-label":`商品经营趋势`,className:`gc-panel gc-sales`,children:[(0,F.jsx)(Q,{title:`商品经营趋势`,sub:`按商品查看归档数据,保留真实波动`,children:(0,F.jsx)(`div`,{className:`gc-toggle`,children:[7,30].map(e=>(0,F.jsxs)(`button`,{"aria-pressed":N===e,onClick:()=>P(e),children:[e,`天`]},e))})}),(0,F.jsxs)(`div`,{className:`gc-selects`,children:[(0,F.jsx)(`select`,{"aria-label":`驾驶舱商品`,value:R?.key||``,onChange:e=>{O(e.target.value),M(``)},children:e.map(e=>(0,F.jsxs)(`option`,{value:e.key,children:[e.title||e.projectName,` · `,e.shopName||e.itemId]},e.key))}),(0,F.jsx)(`select`,{"aria-label":`驾驶舱趋势指标`,value:z?.key||``,onChange:e=>M(e.target.value),children:R?.series.map(e=>(0,F.jsx)(`option`,{value:e.key,children:e.name},e.key))}),(0,F.jsxs)(`button`,{disabled:!R,onClick:()=>a(R,`data`),children:[`明细 `,(0,F.jsx)(s,{size:12})]})]}),(0,F.jsx)(le,{series:z,days:N,onOpen:()=>R?a(R,`monitor`):u(`projects`)},R?.key+`|`+z?.key+`|`+N),(0,F.jsx)(`p`,{className:`gc-footnote`,children:`单商品数据,不等于全店销售额 · 缺失日期不连线 · 来源见归档详情`})]},`sales`),C.id===`business`&&(0,F.jsxs)(`section`,{"data-layout-label":`商品运营分组`,className:`gc-panel gc-structure`,children:[(0,F.jsx)(Q,{title:`商品运营分组`,sub:`点击分类,查看商品和下一步`}),(0,F.jsxs)(`div`,{className:`gc-ring`,children:[(0,F.jsxs)(`svg`,{viewBox:`0 0 160 160`,role:`img`,"aria-label":H.map(e=>e.name+e.count+`个`).join(`,`),children:[(0,F.jsx)(`circle`,{cx:`80`,cy:`80`,r:`62`,fill:`none`,stroke:`var(--omni-chart-track,#1e355b)`,strokeWidth:`1`,strokeDasharray:`2 4`}),(0,F.jsx)(`circle`,{cx:`80`,cy:`80`,r:`50`,fill:`none`,stroke:`var(--omni-chart-track,#152849)`,strokeWidth:`18`}),W.filter(e=>e.count>0).map(e=>(0,F.jsx)(`circle`,{cx:`80`,cy:`80`,r:`50`,fill:`none`,stroke:se[e.id],strokeWidth:`18`,strokeDasharray:`${e.length} ${314.16-e.length}`,strokeDashoffset:-e.offset,transform:`rotate(-90 80 80)`},e.id)),(0,F.jsx)(`text`,{x:`80`,y:`80`,textAnchor:`middle`,className:`gc-ring-number`,children:r?e.length:`—`}),(0,F.jsx)(`text`,{x:`80`,y:`98`,textAnchor:`middle`,children:`商品观察对象`})]}),(0,F.jsx)(`div`,{className:`gc-ring-legend`,children:H.map(t=>(0,F.jsxs)(`button`,{onClick:()=>d(t.id),children:[(0,F.jsx)(`i`,{style:{background:se[t.id]}}),(0,F.jsx)(`span`,{children:t.name}),(0,F.jsx)(`b`,{children:t.count}),(0,F.jsxs)(`small`,{children:[e.length?Math.round(t.count/e.length*100):0,`%`]}),(0,F.jsx)(s,{size:12})]},t.id))})]}),(0,F.jsx)(`p`,{className:`gc-footnote`,children:`同一商品在不同项目中分别记录;人工策略分组以保存记录为准,不代表全店经营梯队。`})]},`structure`),C.id===`business`&&(0,F.jsxs)(`section`,{"data-layout-label":`销售构成`,className:`gc-panel gc-ranking`,children:[(0,F.jsx)(Q,{title:ue?`商品销售排行`:`销售构成`,sub:Y?Y.start+` — `+Y.end+` · 同一份销售账本`:`按同一统计期的销售账本排名`}),(0,F.jsx)(`div`,{className:`gc-rank-list`,children:$.map((e,t)=>(0,F.jsxs)(`button`,{onClick:()=>l(e.project||Y.project,{tab:e.itemId?`monitor`:`data`,itemId:e.itemId}),children:[(0,F.jsx)(`i`,{children:t+1}),(0,F.jsxs)(`span`,{title:e.name||e.itemId,children:[e.name||e.itemId,(0,F.jsx)(`small`,{children:e.itemId||e.count+`个商品`})]}),(0,F.jsx)(`div`,{children:(0,F.jsx)(`b`,{style:{width:Math.max(2,e.sales/me*100)+`%`}})}),(0,F.jsxs)(`strong`,{children:[`¥`,oe(e.sales)]})]},e.project+`|`+(e.itemId||e.name)))}),!$.length&&(0,F.jsxs)(`p`,{className:`gc-no-data`,children:[`还没有同期商品销售明细。`,(0,F.jsx)(`button`,{onClick:()=>u(`data`),children:`查看已有资料`})]}),(0,F.jsx)(`p`,{className:`gc-footnote`,children:ue?`点击商品核对明细 · 销售排名不代表盈利排名`:`原件按品类汇总,点击查看归档;不是单品排名`})]},`ranking`),C.id===`tasks`&&(0,F.jsxs)(`section`,{"data-layout-label":`巡店检查`,className:`gc-panel gc-inspect`,children:[(0,F.jsx)(Q,{title:`巡店检查`,sub:`基于归档与任务状态 · 点击查看待办`,children:(0,F.jsx)(A,{size:17})}),(0,F.jsx)(`div`,{className:`gc-checks`,children:J.map(t=>(0,F.jsxs)(`button`,{disabled:!t.items.length,onClick:()=>t.label===`待选择运营分组`?o(t.items[0]):a(t.items[0],`work`),children:[(0,F.jsx)(`span`,{children:t.label}),(0,F.jsx)(`div`,{children:(0,F.jsx)(`i`,{style:{width:`${e.length?t.items.length/e.length*100:0}%`,background:t.color}})}),(0,F.jsx)(`b`,{children:r?t.items.length:`—`}),(0,F.jsx)(s,{size:12})]},t.label))}),(0,F.jsx)(`p`,{className:`gc-footnote`,children:`同一商品可有多项提醒,数量不可相加;点击先处理一项。`}),(0,F.jsxs)(`div`,{className:`gc-archive`,children:[(0,F.jsx)(de,{count:n.length}),(0,F.jsxs)(`button`,{onClick:()=>u(`data`),children:[`查看来源 `,(0,F.jsx)(i,{size:12})]})]})]},`inspect`),C.id===`history`&&(0,F.jsxs)(`section`,{"data-layout-label":`项目阶段记录`,className:`gc-panel gc-matrix`,children:[(0,F.jsx)(Q,{title:`项目阶段记录`,sub:`节点流程与历史六步记录分别保留,点击核对对应阶段`,children:(0,F.jsxs)(`button`,{onClick:()=>u(`projects`),children:[`全部项目 `,(0,F.jsx)(i,{size:12})]})}),(0,F.jsx)(`div`,{className:`gc-state-legend`,children:Object.entries(ce).map(([e,t])=>(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`i`,{className:e}),t]},e))}),(0,F.jsxs)(`div`,{className:`gc-matrix-scroll`,children:[t.slice(0,8).map(e=>(0,F.jsxs)(`div`,{className:`gc-matrix-row`,children:[(0,F.jsxs)(`button`,{className:`gc-project-name`,title:e.name,onClick:()=>l(e.id,{tab:`overview`}),children:[e.name,(0,F.jsxs)(`small`,{children:[e.done,`/`,e.total,` 阶段已确认`]})]}),(0,F.jsx)(`div`,{children:e.route.map((t,n)=>(0,F.jsx)(`button`,{className:`gc-cell `+t.state,"aria-label":`${e.name}:${t.name},${ce[t.state]}`,title:`${t.name} · ${ce[t.state]}`,onClick:()=>l(e.id,t.target),children:String(n+1).padStart(2,`0`)},t.id))})]},e.id)),!t.length&&(0,F.jsx)(`p`,{className:`gc-no-data`,children:`当前范围还没有项目。`})]})]},`matrix`),C.id===`history`&&(0,F.jsxs)(`section`,{"data-layout-label":`项目历史时间轴`,className:`gc-panel gc-history`,children:[(0,F.jsx)(Q,{title:`项目历史时间轴`,sub:_?`模拟历史记录;每天的记录合并为一个色块`:`按真实归档时间显示;每天的记录合并为一个色块`,children:(0,F.jsx)(`div`,{className:`gc-toggle`,children:[14,30].map(e=>(0,F.jsxs)(`button`,{"aria-pressed":I===e,onClick:()=>ee(e),children:[e,`天`]},e))})}),K>0?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`gc-time-header`,children:[(0,F.jsx)(`span`,{children:`项目 / 点击查看记录`}),(0,F.jsx)(`div`,{children:[0,.25,.5,.75,1].map(e=>(0,F.jsx)(`span`,{children:new Date(q+(K-q)*e).toISOString().slice(5,10)},e))})]}),(0,F.jsx)(`div`,{className:`gc-time-scroll`,children:G.filter(e=>e.replay.some(e=>Date.parse(e.at)>=q)).slice(0,7).map(e=>(0,F.jsxs)(`div`,{className:`gc-time-row`,children:[(0,F.jsx)(`button`,{title:e.name,onClick:()=>L({project:e,events:e.replay}),children:e.name}),(0,F.jsx)(`div`,{children:fe(e.replay.filter(e=>Date.parse(e.at)>=q)).map(t=>(0,F.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)-q)/(K-q)*100}%`},title:`${t.date} · ${t.events.length} 条记录`,"aria-label":`${e.name}:${t.date},${t.events.length}条记录`,onClick:()=>L({project:e,events:t.events,date:t.date}),children:t.events.length},t.date))})]},e.id))}),(0,F.jsxs)(`p`,{className:`gc-footnote`,children:[`最近有记录的日期窗口 · 每个项目最多展示最近120条记录 · 点击色块展开当天记录,不代表运行时长;`,_?`演示操作会追加记录。`:`完整回放在项目执行页。`]})]}):(0,F.jsx)(`p`,{className:`gc-no-data`,children:`暂无可回放的历史记录。`})]},`history`),C.id===`tasks`&&(0,F.jsxs)(`section`,{"data-layout-label":`需要你处理`,className:`gc-panel gc-todo`,children:[(0,F.jsx)(Q,{title:`需要你处理`,sub:`先做这一件,再继续下一步`,children:(0,F.jsxs)(`span`,{className:`gc-badge`,children:[V.length,` 项`]})}),(0,F.jsxs)(`div`,{className:`gc-todo-list`,children:[V.map((e,t)=>(0,F.jsxs)(`button`,{onClick:()=>e.tier===`unassigned`?o(e):a(e,`work`),children:[(0,F.jsx)(`span`,{className:`gc-todo-num`,children:String(t+1).padStart(2,`0`)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`b`,{children:f(e)}),(0,F.jsxs)(`span`,{children:[e.title||e.projectName,` · `,e.shopName||e.itemId]}),(0,F.jsx)(`small`,{children:m(e)})]}),(0,F.jsx)(s,{size:15})]},e.key)),!V.length&&(0,F.jsx)(`p`,{className:`gc-no-data`,children:r?`当前没有商品待办。`:`正在读取…`}),(0,F.jsx)(`h3`,{className:`gc-next-label`,children:`接下来可以做`}),t.slice(0,5).map(e=>(0,F.jsxs)(`button`,{onClick:()=>l(e.id,{tab:`overview`}),children:[(0,F.jsx)(`span`,{className:`gc-next-dot`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`b`,{children:e.name}),(0,F.jsx)(`span`,{children:`查看项目节点与下一步`})]}),(0,F.jsx)(s,{size:13})]},`next-`+e.id))]})]},`todo`)]})]}),te&&(0,F.jsx)(pe,{...te,onClose:()=>L(null),onOpen:l}),(0,F.jsxs)(`div`,{className:`gc-status-strip`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`i`,{}),` `,_?`教学模拟`:`归档数据`,` · `,e.length,` 个商品`]}),(0,F.jsxs)(`span`,{children:[t.length,` 个项目 · `,v?.started??0,` 个已开展 · `,v?.complete??0,` 个项目已完成`]}),(0,F.jsxs)(`span`,{children:[B,` 项推进中 · `,ne,` 项待开始`]}),(0,F.jsxs)(`button`,{onClick:()=>u(`products`),children:[`展开运营工作清单 `,(0,F.jsx)(i,{size:13})]})]})]})}function de({count:e}){return(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`b`,{children:e}),` 份归档资料可追溯`]})}function fe(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 pe({project:e,events:t,date:n,onClose:r,onOpen:i}){let a=(0,j.useRef)(null);return(0,j.useEffect)(()=>{a.current?.showModal()},[]),(0,F.jsxs)(`dialog`,{className:`ta-dialog gc-history-dialog`,ref:a,onClose:r,"aria-labelledby":`gc-history-title`,children:[(0,F.jsxs)(`div`,{className:`ta-dialog-head`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`small`,{children:e.name}),(0,F.jsxs)(`h2`,{id:`gc-history-title`,children:[n||`项目历史`,` · `,t.length,` 条记录`]})]}),(0,F.jsx)(`button`,{"aria-label":`关闭历史记录`,onClick:r,children:`×`})]}),(0,F.jsx)(`p`,{children:`按发生时间排列。展开记录,查看当时做了什么。`}),(0,F.jsx)(`div`,{className:`gc-records`,children:t.map((t,n)=>(0,F.jsxs)(`details`,{children:[(0,F.jsxs)(`summary`,{children:[(0,F.jsx)(`span`,{children:new Date(t.at).toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`})}),(0,F.jsx)(`b`,{children:t.name}),(0,F.jsx)(`em`,{children:t.state})]}),(0,F.jsx)(`p`,{children:t.detail||`此记录没有保存详细说明,可进入对应阶段核对原始资料。`}),(0,F.jsx)(`button`,{onClick:()=>{r(),i(e.id,e.route.find(e=>e.id===t.routeId)?.target||{tab:`data`})},children:`进入对应阶段 / 资料`})]},n))})]})}function me(){let e=w(),[t,n]=T(`workbench.loadedData`,{growth:null,projects:null,activity:null}),[r,i]=(0,j.useState)(!0),[a,o]=(0,j.useState)(``),[s,c]=(0,j.useState)(``),[l,d]=(0,j.useState)(0),f=e.archiveScope||`real`,[m,g]=(0,j.useState)(null),[v,y]=(0,j.useState)(null);(0,j.useEffect)(()=>{let t=new AbortController;return ee(e.api,e=>n(t=>({...t,...e})),t.signal).then(()=>{t.signal.aborted||o(``)}).catch(e=>{t.signal.aborted||o(e instanceof Error?e.message:`经营资料读取失败`)}).finally(()=>{t.signal.aborted||i(!1)}),()=>t.abort()},[e.api,l,n]);let b=e=>f===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`,x=t.growth?.products.filter(b)||[],S=t.growth?.catalog.filter(b)||[],C=t.projects?.filter(e=>f===`stored-demo`?e.simulated:!e.simulated)||[],D=t.projects&&t.activity?t.activity.items.filter(e=>C.some(t=>t.id===e.id)):null,O=D?{running:D.reduce((e,t)=>e+t.activeTasks,0),pending:D.reduce((e,t)=>e+t.pendingTasks,0),started:D.filter(e=>e.started>0).length,complete:D.filter(e=>e.status===`complete`).length}:null,k=(0,j.useMemo)(()=>{let e=e=>f===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`;return{sales:t.growth?.metrics?.sales?.filter(e)||[],finance:t.growth?.metrics?.finance?.filter(e)||[],incubation:t.growth?.metrics?.incubation?.filter(e)||[]}},[t.growth,f]),A=(0,j.useCallback)(()=>{i(!0),d(e=>e+1)},[]);u(C.some(e=>e.execution?.state===`running`),A);function M(t,n){n===`work`?y(t):n===`data`?e.onProductGroup(`all`,t,f):e.onOpen(t.project,{tab:n,itemId:t.itemId})}return(0,F.jsx)(`div`,{className:`workbench-module`,children:(0,F.jsx)(`div`,{className:`gw`,children:(0,F.jsxs)(`div`,{className:`gw-body`,children:[(0,F.jsxs)(`header`,{className:`gw-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`small`,{children:`工作台 / 经营总览`}),(0,F.jsx)(`h1`,{children:`电商运营作战台`})]}),(0,F.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`i`,{className:`gw-dot`}),`归档数据 · 非实时`]}),(0,F.jsxs)(`button`,{disabled:r,onClick:A,children:[(0,F.jsx)(_,{size:14}),r?`读取中`:`刷新数据`]})]})]}),(0,F.jsx)(`div`,{className:`gw-scope`,children:(0,F.jsx)(`span`,{children:t.growth?`${new Date(t.growth.updatedAt).toLocaleString(`zh-CN`)} 读取归档`:`正在读取归档…`})}),a&&(0,F.jsxs)(`p`,{role:`alert`,className:`gw-message`,children:[a,` `,(0,F.jsx)(`button`,{onClick:A,children:`重试`})]}),s&&(0,F.jsx)(`p`,{role:`status`,className:`gw-message`,children:s}),(0,F.jsx)($,{layoutScope:e.layoutScope,onDirty:e.onDirty,onCreate:e.onCreate,products:x,projects:C,catalog:S,metrics:k,projectActivity:O,projectPreview:t.activity,onRefreshProjects:A,ready:!!t.growth,demo:!1,onOpen:e.onOpen,onNav:e.onModule,onTier:t=>e.onProductGroup(t,void 0,f),onAction:M,onAssign:(e,t)=>g({product:e,suggestedTier:t})}),m&&(0,F.jsx)(p,{...m,products:x,onDirty:e.onDirty,onBusy:e.onBusy,onClose:()=>g(null),onSave:async(t,n,r,i)=>{await E(e.api,t,n,r,i),c(`分组已保存,正在更新看板。`),A()}}),v&&(0,F.jsx)(h,{product:v,onOpen:e.onOpen,onClose:()=>y(null)})]})})})}function he({section:e}){let t=w();return e===`tasks`||e===`records`?(0,F.jsx)(I,{mode:e,api:t.api,onOpen:t.onOpen},e):(0,F.jsx)(me,{})}export{he as default};
@@ -0,0 +1 @@
1
+ ._overview_ngsjb_1{color:var(--omni-text,var(--omni-paint-ink-dceaf7,#dceaf7));padding-top:28px;font-size:12px}._overview_ngsjb_1 *{box-sizing:border-box}._overview_ngsjb_1 h1,._overview_ngsjb_1 h2,._overview_ngsjb_1 p{margin:0}._overview_ngsjb_1 p{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));line-height:1.7}._overview_ngsjb_1 button{font:inherit;cursor:pointer}._overview_ngsjb_1 button:focus-visible,._overview_ngsjb_1 summary:focus-visible,._network_ngsjb_1 button:focus-visible{outline:2px solid var(--omni-accent,var(--omni-paint-line-61d3df,#61d3df));outline-offset:4px}._pageHeading_ngsjb_1{justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px;display:flex}._eyebrow_ngsjb_1{letter-spacing:1.5px;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));font-size:10px}._pageHeading_ngsjb_1 h1{letter-spacing:-.5px;margin:7px 0 9px;font-size:28px}._pageHeading_ngsjb_1 p{font-size:12px}._refresh_ngsjb_1{align-items:center;gap:14px;display:flex}._refresh_ngsjb_1>span{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));font-size:10px}._refresh_ngsjb_1 button,._panelHeading_ngsjb_1>button,._shopDetails_ngsjb_1 button,._bottomMeta_ngsjb_1 button{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border-radius:7px;align-items:center;gap:7px;padding:8px 11px;font-size:11px;display:inline-flex}._topGrid_ngsjb_1{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:20px;margin-bottom:22px;display:grid}._kpis_ngsjb_1{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;display:grid}._kpis_ngsjb_1>button{text-align:left;border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));min-width:0;color:inherit;border-radius:12px;flex-direction:column;justify-content:center;align-items:flex-start;padding:20px 23px;display:flex}._kpis_ngsjb_1>button:hover{border-color:var(--omni-accent,var(--omni-paint-line-61d3df,#61d3df))}._kpis_ngsjb_1>button>span{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));align-items:center;gap:9px;font-size:12px;display:flex}._kpis_ngsjb_1 svg{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df))}._kpis_ngsjb_1 strong{font-variant-numeric:tabular-nums;margin:8px 0 4px;font-size:35px;font-weight:550;line-height:1.5}._kpis_ngsjb_1 strong small{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));margin-left:9px;font-size:11px}._kpis_ngsjb_1 ._money_ngsjb_1{overflow-wrap:anywhere;font-size:27px}._kpis_ngsjb_1 p{font-size:10px}._mainGrid_ngsjb_1{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px;display:grid}._panel_ngsjb_1{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border-radius:12px;min-width:0;padding:23px 24px;scroll-margin-top:80px}._panelHeading_ngsjb_1{justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px;display:flex}._overview_ngsjb_1 h2{margin:0 0 5px;font-size:17px;font-weight:600}._panelHeading_ngsjb_1 p{font-size:10px}._panelHeading_ngsjb_1>button{white-space:nowrap;background:0 0;border:0;padding:4px 0}._filters_ngsjb_1{border-bottom:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));gap:12px;padding-bottom:18px;display:flex}._filters_ngsjb_1 label{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));flex:1;min-width:0;margin:0;font-size:10px;display:block}._filters_ngsjb_1 select{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-field,var(--omni-paint-surface-0b1727,#0b1727));width:100%;color:var(--omni-text,var(--omni-paint-ink-dceaf7,#dceaf7));border-radius:6px;margin-top:7px;padding:8px;font-size:11px}._shop_ngsjb_1{border-bottom:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b))}._shop_ngsjb_1 summary{cursor:pointer;align-items:center;gap:12px;padding:18px 0;list-style:none;display:flex}._shop_ngsjb_1 summary::-webkit-details-marker{display:none}._shopIcon_ngsjb_1{background:var(--omni-selected,var(--omni-paint-surface-193954,#193954));width:35px;height:35px;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));border-radius:9px;flex-shrink:0;place-items:center;display:grid}._shopIdentity_ngsjb_1{flex:1;min-width:0}._shopIdentity_ngsjb_1 b{overflow-wrap:anywhere;font-size:12px;font-weight:500}._shopIdentity_ngsjb_1 small{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));margin-top:5px;font-size:9px;display:block}._shop_ngsjb_1 summary>strong{text-align:right;font-variant-numeric:tabular-nums;min-width:85px;font-size:14px;font-weight:500}._salesBar_ngsjb_1{background:var(--omni-chart-track,var(--omni-paint-surface-2c435b,#2c435b));border-radius:4px;width:70px;height:5px;overflow:hidden}._salesBar_ngsjb_1 i{background:var(--omni-accent,var(--omni-paint-surface-61d3df,#61d3df));border-radius:4px;height:100%;display:block}._shopDetails_ngsjb_1{padding:0 0 18px 47px;font-size:10px}._shopDetails_ngsjb_1 p{overflow-wrap:anywhere;margin:4px 0}._shopDetails_ngsjb_1 button{margin-top:8px;font-size:10px}._projectStatus_ngsjb_1{border-bottom:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:8px;padding:0 0 18px;font-size:10px;display:grid}._projectStatus_ngsjb_1 b{color:var(--omni-text,var(--omni-paint-ink-dceaf7,#dceaf7));margin-bottom:3px;font-size:24px;font-weight:500;display:block}._projectStatus_ngsjb_1 ._warning_ngsjb_1 b{color:var(--omni-warning,var(--omni-paint-warning-f0bc67,#f0bc67))}._overview_ngsjb_1 ._projectRow_ngsjb_1{text-align:left;border:0;border-bottom:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));width:100%;color:inherit;background:0 0;border-radius:0;padding:14px 0 16px;display:block}._projectRow_ngsjb_1:hover{filter:none}._projectRow_ngsjb_1:hover b{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df))}._projectRow_ngsjb_1>div:first-child{justify-content:space-between;align-items:center;gap:12px;display:flex}._projectRow_ngsjb_1 b{font-size:12px;font-weight:500}._projectRow_ngsjb_1 span{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));white-space:nowrap;align-items:center;gap:6px;font-size:10px;display:flex}._projectRow_ngsjb_1 p{text-overflow:ellipsis;white-space:nowrap;margin:7px 0 10px;font-size:10px;overflow:hidden}._progress_ngsjb_1{background:var(--omni-chart-track,var(--omni-paint-surface-2c435b,#2c435b));border-radius:4px;height:4px;overflow:hidden}._progress_ngsjb_1 i{background:var(--omni-success,var(--omni-paint-surface-64d6af,#64d6af));border-radius:4px;height:100%;display:block}._bottomMeta_ngsjb_1{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));justify-content:space-between;align-items:center;gap:12px;margin-top:18px;font-size:11px;display:flex}._bottomMeta_ngsjb_1 b{color:var(--omni-text,var(--omni-paint-ink-dceaf7,#dceaf7));margin-left:8px}._bottomMeta_ngsjb_1 button{background:0 0;border:0;padding:4px 0}._note_ngsjb_1{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));font-size:10px;line-height:1.7;margin-top:15px!important}._empty_ngsjb_1{padding:20px 0;font-size:11px}._error_ngsjb_1{background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border:1px solid var(--omni-warning,var(--omni-paint-line-f0bc67,#f0bc67));color:var(--omni-warning,var(--omni-paint-danger-f0bc67,#f0bc67));border-radius:7px;margin-bottom:16px;padding:12px 16px;font-size:11px}._warning_ngsjb_1{font-size:10px;color:var(--omni-warning,var(--omni-paint-warning-f0bc67,#f0bc67))!important}._unassigned_ngsjb_1{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));margin:15px 0;font-size:10px}._unassigned_ngsjb_1 summary{color:var(--omni-warning,var(--omni-paint-ink-f0bc67,#f0bc67));cursor:pointer;align-items:center;gap:7px;display:flex}._unassigned_ngsjb_1>div{border-bottom:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));padding:10px 0}._unassigned_ngsjb_1 p{margin-top:6px}._network_ngsjb_1{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:radial-gradient(ellipse at center,color-mix(in srgb,var(--omni-accent,var(--omni-paint-surface-61d3df,#61d3df)) 10%,transparent),transparent 70%),var(--omni-panel,var(--omni-paint-surface-102235,#102235));min-height:305px;color:var(--omni-text,var(--omni-paint-ink-dceaf7,#dceaf7));border-radius:12px;position:relative;overflow:hidden}._networkHead_ngsjb_1{z-index:2;justify-content:space-between;align-items:center;display:flex;position:absolute;top:18px;left:20px;right:20px}._networkHead_ngsjb_1>span{letter-spacing:2px;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));font-size:8px}._networkHead_ngsjb_1>button{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));border-radius:5px;align-items:center;gap:5px;padding:5px 8px;font:10px inherit;display:flex}._canvas_ngsjb_1{width:100%;height:100%;min-height:305px;display:block;position:absolute;inset:0}._networkCenter_ngsjb_1{pointer-events:none;justify-items:center;display:grid;position:absolute;top:48%;left:51%;transform:translate(-50%,-50%)}._networkCenter_ngsjb_1 strong{letter-spacing:6px;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));text-shadow:0 0 25px color-mix(in srgb,var(--omni-accent,var(--omni-paint-shadow-61d3df,#61d3df)) 35%,transparent);padding-left:6px;font-size:24px}._networkCenter_ngsjb_1>span{letter-spacing:1px;color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));margin-top:5px;font-size:9px}._networkTags_ngsjb_1{justify-content:space-around;gap:8px;display:flex;position:absolute;bottom:24px;left:20px;right:20px}._networkTags_ngsjb_1>span{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));font-size:10px}._networkTags_ngsjb_1 b{color:var(--omni-text,var(--omni-paint-ink-dceaf7,#dceaf7));margin-left:8px;font-size:16px;font-weight:500}._motionNote_ngsjb_1{text-align:center;color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));font-size:8px;position:absolute;bottom:5px;left:0;right:0}._spinning_ngsjb_1{animation:1s linear infinite _spin_ngsjb_1}@keyframes _spin_ngsjb_1{to{transform:rotate(360deg)}}@media (width<=1100px){._topGrid_ngsjb_1{grid-template-columns:1.3fr 1fr}._kpis_ngsjb_1>button{padding:17px}._kpis_ngsjb_1 ._money_ngsjb_1{font-size:23px}._mainGrid_ngsjb_1{grid-template-columns:1fr}._pageHeading_ngsjb_1{align-items:flex-start}._refresh_ngsjb_1{flex-direction:column;align-items:flex-end;gap:8px}._networkHead_ngsjb_1{left:14px;right:14px}._networkHead_ngsjb_1>span{letter-spacing:.6px}._salesBar_ngsjb_1{width:100px}}@media (width<=760px){._topGrid_ngsjb_1{grid-template-columns:1fr}._network_ngsjb_1,._canvas_ngsjb_1{min-height:270px}._refresh_ngsjb_1>span{display:none}._pageHeading_ngsjb_1 h1{font-size:24px}._panel_ngsjb_1{padding:19px}._kpis_ngsjb_1 strong{font-size:30px}._kpis_ngsjb_1 ._money_ngsjb_1{font-size:22px}._salesBar_ngsjb_1{display:none}._filters_ngsjb_1{flex-wrap:wrap}._filters_ngsjb_1 label{flex-basis:100%}._shop_ngsjb_1 summary{gap:9px}._shop_ngsjb_1 summary>strong{min-width:64px;font-size:12px}}@media (prefers-reduced-motion:reduce){._spinning_ngsjb_1{animation:none}}:root[data-omni-theme=light]{--omni-paint-ink-dceaf7:#252831;--omni-paint-ink-91a9bd:#626e80;--omni-paint-line-61d3df:#dde1eb;--omni-paint-ink-61d3df:#626e80;--omni-paint-line-2c435b:#dde1eb;--omni-paint-surface-102235:#fff;--omni-paint-surface-0b1727:#f5f6fa;--omni-paint-surface-193954:#fff;--omni-paint-surface-2c435b:#fff;--omni-paint-surface-61d3df:#eef0ff;--omni-paint-warning-f0bc67:#94600b;--omni-paint-surface-64d6af:#eef0ff;--omni-paint-line-f0bc67:#dde1eb;--omni-paint-danger-f0bc67:#b83a4a;--omni-paint-ink-f0bc67:#626e80;--omni-paint-shadow-61d3df:#0000001f}:root[data-omni-theme=dark]{--omni-paint-ink-dceaf7:#dceaf7;--omni-paint-ink-91a9bd:#91a9bd;--omni-paint-line-61d3df:#2c435b;--omni-paint-ink-61d3df:#91a9bd;--omni-paint-line-2c435b:#2c435b;--omni-paint-surface-102235:#102235;--omni-paint-surface-0b1727:#0b1727;--omni-paint-surface-193954:#102235;--omni-paint-surface-2c435b:#102235;--omni-paint-surface-61d3df:#193954;--omni-paint-warning-f0bc67:#f0bc67;--omni-paint-surface-64d6af:#193954;--omni-paint-line-f0bc67:#2c435b;--omni-paint-danger-f0bc67:#ff8996;--omni-paint-ink-f0bc67:#91a9bd;--omni-paint-shadow-61d3df:#0000001f}._landing_b83tr_1{--omni-home-brand-bg:#081d35;--omni-home-brand-text:#edf8ff;--omni-home-brand-muted:#a7bed6;--omni-home-brand-accent:#72e7e3;max-width:1480px;color:var(--omni-text,var(--omni-paint-ink-dceaf7,#dceaf7));margin:auto;padding:0 40px 30px;font-size:13px;line-height:1.65}._landing_b83tr_1 *{box-sizing:border-box}._landing_b83tr_1 button{font:inherit;cursor:pointer}._landing_b83tr_1 button:focus-visible,._landing_b83tr_1 summary:focus-visible{outline:2px solid var(--omni-accent,var(--omni-paint-line-61d3df,#61d3df));outline-offset:5px}._landing_b83tr_1 h1,._landing_b83tr_1 h2,._landing_b83tr_1 h3,._landing_b83tr_1 p{margin:0}._landing_b83tr_1 h2{letter-spacing:-.5px;font-size:23px;font-weight:600}._landing_b83tr_1 h3{font-size:16px;font-weight:600}._landing_b83tr_1 p{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));line-height:1.85}._landing_b83tr_1 h1:focus,._landing_b83tr_1 h2:focus{outline:none}._landing_b83tr_1 button svg{flex-shrink:0}._hero_b83tr_3{isolation:isolate;border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-home-brand-bg);min-height:365px;color:var(--omni-home-brand-text);border-radius:18px;grid-template-columns:1.15fr 1fr;display:grid;position:relative;overflow:hidden}._hero_b83tr_3:before{content:"";z-index:-1;pointer-events:none;background:radial-gradient(at 85% 40%,#2393a438,#0000 58%),linear-gradient(125deg,#0000 50%,#2b6c8f1f);position:absolute;inset:0}._heroCopy_b83tr_4{z-index:1;padding:30px 0 34px 38px}._brand_b83tr_4{align-items:center;gap:10px;margin-bottom:26px;display:flex}._brand_b83tr_4 img{border-radius:10px}._brand_b83tr_4>span:first-of-type{letter-spacing:1px;font-size:20px;font-weight:600}._brand_b83tr_4 i{color:var(--omni-home-brand-accent);font-style:normal}._brandCaption_b83tr_4{color:var(--omni-home-brand-muted);border-left:1px solid #a7bed64d;margin-left:8px;padding-left:16px;font-size:11px}._heroEyebrow_b83tr_4{color:var(--omni-home-brand-accent);letter-spacing:3px;margin-bottom:10px;font-size:11px;display:block}._hero_b83tr_3 h1{letter-spacing:1px;font-size:clamp(27px,3.1vw,43px);font-weight:600;line-height:1.5}._hero_b83tr_3 em{color:var(--omni-home-brand-accent);font-style:normal}._hero_b83tr_3 ._heroCopy_b83tr_4>p{color:var(--omni-home-brand-muted);margin:14px 0 24px;font-size:12px;line-height:1.9}._heroActions_b83tr_4{align-items:center;gap:12px;display:flex}._heroActions_b83tr_4 button{border-radius:7px;align-items:center;gap:20px;padding:10px 18px;font-size:12px;display:flex}._primary_b83tr_4{background:var(--omni-home-brand-accent);color:var(--omni-home-brand-bg);border:1px solid var(--omni-home-brand-accent);font-weight:600!important}._heroSecondary_b83tr_4{color:var(--omni-home-brand-text);background:0 0;border:1px solid #a7bed65c}._heroActions_b83tr_4 button:hover{filter:brightness(1.1)}._universe_b83tr_5{min-height:365px;position:relative;overflow:hidden}._orbitOuter_b83tr_5,._orbitInner_b83tr_5{border:1px solid #72e7e32b;border-radius:50%;width:350px;height:270px;position:absolute;top:48%;left:50%;transform:translate(-50%,-50%)rotate(-25deg)}._orbitOuter_b83tr_5:after,._orbitInner_b83tr_5:after{content:"";background:var(--omni-home-brand-accent);width:7px;height:7px;box-shadow:0 0 20px var(--omni-home-brand-accent);border-radius:50%;position:absolute;top:18%;left:10%}._orbitInner_b83tr_5{border-style:dashed;width:240px;height:190px;transform:translate(-50%,-50%)rotate(30deg)}._orbitInner_b83tr_5:after{width:5px;height:5px;top:65%;left:auto;right:3%}._planet_b83tr_5{justify-items:center;gap:4px;display:grid;position:absolute;top:48%;left:50%;transform:translate(-50%,-50%)}._planet_b83tr_5 img{border-radius:28px;box-shadow:0 0 80px #72e7e326}._planet_b83tr_5>span{letter-spacing:7px;color:var(--omni-home-brand-muted);margin-left:7px;font-size:17px}._orbitLabel_b83tr_5{z-index:1;white-space:nowrap;background:#11344ceb;border:1px solid #72e7e33b;border-radius:8px;align-items:center;gap:8px;padding:8px 13px;font-size:11px;display:flex;position:absolute;box-shadow:0 8px 20px #0000001f}._orbitLabel_b83tr_5 svg{color:var(--omni-home-brand-accent)}._orbitMarket_b83tr_5{top:22%;left:7%}._orbitProject_b83tr_5{top:28%;right:7%}._orbitAgent_b83tr_5{bottom:25%;right:4%}._orbitData_b83tr_5{bottom:22%;left:10%}._universeCaption_b83tr_5{text-align:center;letter-spacing:3px;color:var(--omni-home-brand-muted);font-size:8px;position:absolute;bottom:28px;left:0;right:0}._section_b83tr_6{margin-top:38px;scroll-margin-top:120px}._sectionHeading_b83tr_6{justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:19px;display:flex}._sectionHeading_b83tr_6>p{text-align:right;font-size:12px}._kicker_b83tr_6{color:var(--omni-accent,var(--omni-paint-accent-61d3df,#61d3df));letter-spacing:2px;margin-bottom:6px;font-size:9px;font-weight:600;display:block}._principles_b83tr_6{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;display:grid}._principles_b83tr_6 article{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border-radius:12px;padding:22px 24px}._principleTop_b83tr_6{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));justify-content:space-between;align-items:center;margin-bottom:19px;display:flex}._principleTop_b83tr_6 span{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));opacity:.45;letter-spacing:2px;font-size:22px;font-weight:300}._principles_b83tr_6 h3{margin-bottom:9px}._principles_b83tr_6 p{font-size:12px}._modules_b83tr_7{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;display:grid}._moduleCard_b83tr_7{text-align:left;background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));color:inherit;border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));border-radius:12px;flex-direction:column;padding:20px 17px;transition:border-color .15s,transform .15s;display:flex}._moduleCard_b83tr_7:hover{border-color:var(--omni-accent,var(--omni-paint-line-61d3df,#61d3df));transform:translateY(-3px)}._moduleTop_b83tr_7{width:100%;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));justify-content:space-between;align-items:center;margin-bottom:22px;display:flex}._moduleTop_b83tr_7 span{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));font-size:10px}._moduleCard_b83tr_7 small{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));margin-bottom:3px;font-size:10px}._moduleCard_b83tr_7 h3{font-size:17px}._moduleCard_b83tr_7 p{flex:1;margin:9px 0 15px;font-size:12px}._features_b83tr_7{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));font-size:10px;line-height:1.8}._moduleLink_b83tr_7{border-top:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));width:100%;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));justify-content:space-between;align-items:center;margin-top:15px;padding-top:12px;font-size:11px;display:flex}._sectionIntro_b83tr_8{font-size:12px;margin-top:-9px!important;margin-bottom:20px!important}._scheduleLabel_b83tr_8{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));white-space:nowrap;align-items:center;gap:8px;font-size:11px;display:flex}._courses_b83tr_8{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;display:grid}._course_b83tr_8{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border-radius:12px;flex-direction:column;min-width:0;display:flex;overflow:hidden}._courseCover_b83tr_8{background:color-mix(in srgb,var(--omni-accent,var(--omni-paint-surface-61d3df,#61d3df)) 12%,var(--omni-panel,var(--omni-paint-surface-102235,#102235)));height:136px;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));padding:19px 22px;position:relative;overflow:hidden}._courseCover_b83tr_8:after{content:"";opacity:.15;border:1px solid;border-radius:50%;width:180px;height:180px;position:absolute;top:10px;right:-30px}._courseCover_b83tr_8>span{letter-spacing:2px;font-size:10px}._courseCover_b83tr_8>svg{opacity:.6;position:absolute;bottom:23px;right:28px;transform:rotate(-12deg)}._courseCover_b83tr_8>strong{letter-spacing:2px;font-size:10px;font-weight:500;display:block;position:absolute;bottom:23px;left:22px}._courseCover_b83tr_8 i{margin-left:4px;font-size:29px;font-style:normal;font-weight:300}._cover1_b83tr_8{color:var(--omni-chart-secondary,var(--omni-paint-ink-b99aff,#b99aff));background:color-mix(in srgb,var(--omni-chart-secondary,var(--omni-paint-surface-b99aff,#b99aff)) 12%,var(--omni-panel,var(--omni-paint-surface-102235,#102235)))}._cover2_b83tr_8{color:var(--omni-success,var(--omni-paint-ink-64d6af,#64d6af));background:color-mix(in srgb,var(--omni-success,var(--omni-paint-surface-64d6af,#64d6af)) 12%,var(--omni-panel,var(--omni-paint-surface-102235,#102235)))}._courseContent_b83tr_8{flex-direction:column;flex:1;padding:19px 20px 15px;display:flex}._courseMeta_b83tr_8{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));justify-content:space-between;margin-bottom:10px;font-size:10px;display:flex}._course_b83tr_8 h3{margin-bottom:8px;font-size:16px;line-height:1.65}._course_b83tr_8 p{flex:1;margin-bottom:18px;font-size:11px}._courseDate_b83tr_8{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));align-items:flex-start;gap:7px;font-size:10px;display:flex}._courseDate_b83tr_8 svg{flex-shrink:0;margin-top:2px}._courseFooter_b83tr_8{border-top:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));justify-content:space-between;align-items:center;gap:10px;margin-top:13px;padding-top:12px;display:flex}._courseFooter_b83tr_8>span{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));align-items:center;gap:6px;font-size:11px;display:flex}._courseFooter_b83tr_8 button,._textButton_b83tr_8{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));background:0 0;border:0;align-items:center;gap:8px;padding:4px 0;font-size:11px;display:inline-flex}._courseFooter_b83tr_8 button:hover,._textButton_b83tr_8:hover{text-decoration:underline}._footnote_b83tr_8{margin-top:14px!important;font-size:10px!important}._releaseList_b83tr_9{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border-radius:12px;padding:0 25px}._release_b83tr_9{grid-template-columns:170px 1fr;gap:24px;padding:25px 0;display:grid}._release_b83tr_9+._release_b83tr_9{border-top:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b))}._releaseStamp_b83tr_9{flex-wrap:wrap;align-content:flex-start;align-items:center;gap:8px;display:flex}._version_b83tr_9{letter-spacing:-.5px;font-size:21px;font-weight:500}._badge_b83tr_9{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));background:var(--omni-selected,var(--omni-paint-surface-193954,#193954));border-radius:4px;padding:2px 6px;font-size:9px}._releaseStamp_b83tr_9 time{width:100%;color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));font-size:11px}._releaseBody_b83tr_9>p{margin-top:5px;font-size:12px}._releaseBody_b83tr_9 summary{cursor:pointer;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));align-items:center;gap:8px;width:fit-content;margin-top:13px;font-size:11px;list-style:none;display:flex}._releaseBody_b83tr_9 summary::-webkit-details-marker{display:none}._releaseBody_b83tr_9 details[open] summary svg{transform:rotate(180deg)}._releaseBody_b83tr_9 ul{gap:14px;margin:16px 0 0;padding:0;list-style:none;display:grid}._releaseBody_b83tr_9 li{align-items:flex-start;gap:12px;display:flex}._changeKind_b83tr_9{background:var(--omni-selected,var(--omni-paint-surface-193954,#193954));color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));border-radius:4px;flex-shrink:0;margin-top:1px;padding:2px 6px;font-size:9px}._releaseBody_b83tr_9 strong{font-size:12px;font-weight:500}._releaseBody_b83tr_9 li p{margin-top:3px;font-size:11px}._footer_b83tr_10{border-top:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));justify-content:space-between;align-items:center;margin-top:38px;padding:22px 0 8px;font-size:11px;display:flex}._footer_b83tr_10>span:first-child{align-items:center;gap:8px;font-weight:500;display:flex}._detail_b83tr_11{scroll-margin-top:120px}._detail_b83tr_11>._textButton_b83tr_8{margin-bottom:22px}._detailHero_b83tr_11{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border-radius:14px;margin:0;padding:30px 34px;display:block}._detailHero_b83tr_11 h1{margin:8px 0 13px;font-size:28px;font-weight:600;line-height:1.6}._detailHero_b83tr_11>p{max-width:850px;font-size:13px}._metadata_b83tr_11{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));flex-wrap:wrap;gap:14px 28px;margin-top:24px;font-size:12px;display:flex}._metadata_b83tr_11 span{align-items:center;gap:8px;display:flex}._metadata_b83tr_11 svg{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df))}._detailGrid_b83tr_11>aside{width:auto;min-width:0;color:inherit;background:0 0;padding:0;display:block}._detailGrid_b83tr_11{grid-template-columns:minmax(0,1.7fr) minmax(250px,1fr);gap:20px;margin-top:20px;display:grid}._detailPanel_b83tr_11{border:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));background:var(--omni-panel,var(--omni-paint-surface-102235,#102235));border-radius:12px;margin-bottom:20px;padding:25px 28px}._detailPanel_b83tr_11 h2{margin-bottom:16px;font-size:17px}._detailPanel_b83tr_11 p,._detailPanel_b83tr_11 li{font-size:12px}._detailPanel_b83tr_11 ul{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));margin:0;padding-left:18px}._detailPanel_b83tr_11 li+li{margin-top:9px}._detailPanel_b83tr_11 ._outcomes_b83tr_11{padding:0;list-style:none}._outcomes_b83tr_11 li{align-items:flex-start;gap:10px;display:flex}._outcomes_b83tr_11 svg{color:var(--omni-success,var(--omni-paint-ink-64d6af,#64d6af));flex-shrink:0;margin-top:2px}._agenda_b83tr_11{margin:0;padding:0;list-style:none}._agenda_b83tr_11>li{gap:18px;padding:17px 0;display:flex}._agenda_b83tr_11>li+li{border-top:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));margin-top:0}._agendaNumber_b83tr_11{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));font-size:18px;font-weight:300}._agenda_b83tr_11 time{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));font-size:10px}._agenda_b83tr_11 h3{margin:5px 0;font-size:15px}._teacher_b83tr_11{align-items:center;gap:12px;margin:14px 0;display:flex}._teacher_b83tr_11>span{background:var(--omni-selected,var(--omni-paint-surface-193954,#193954));width:40px;height:40px;color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));border-radius:50%;place-items:center;font-size:17px;display:grid}._teacher_b83tr_11 h2{margin:0}._detailPanel_b83tr_11 ._subheading_b83tr_11{margin-top:24px}@media (width>=1500px){._heroCopy_b83tr_4{padding:38px 0 42px 48px}._hero_b83tr_3,._universe_b83tr_5{min-height:400px}._hero_b83tr_3 h1{font-size:45px}}@media (width<=1250px){._modules_b83tr_7{grid-template-columns:repeat(3,minmax(0,1fr))}._heroCopy_b83tr_4{padding-left:28px}._hero_b83tr_3{grid-template-columns:1.2fr 1fr}._brandCaption_b83tr_4{display:none}._orbitOuter_b83tr_5{width:290px;height:240px}._orbitInner_b83tr_5{width:210px;height:170px}._orbitLabel_b83tr_5{padding:6px 9px;font-size:10px}._orbitMarket_b83tr_5{left:0}._orbitProject_b83tr_5{right:2%}._orbitData_b83tr_5{left:2%}._orbitAgent_b83tr_5{right:0}._planet_b83tr_5 img{width:90px;height:90px}._sectionHeading_b83tr_6{align-items:flex-start}._sectionHeading_b83tr_6>p{max-width:230px}}@media (width<=950px){._hero_b83tr_3{grid-template-columns:1fr}._heroCopy_b83tr_4{padding:28px 30px}._universe_b83tr_5{display:none}._hero_b83tr_3 h1{font-size:34px}._principles_b83tr_6{gap:10px}._principles_b83tr_6 article{padding:18px}._courses_b83tr_8{grid-template-columns:1fr}._course_b83tr_8{grid-template-columns:180px 1fr;display:grid}._courseCover_b83tr_8{height:100%;min-height:220px}._courseContent_b83tr_8{padding:18px 20px}._course_b83tr_8 h3{font-size:17px}._course_b83tr_8 p{margin-bottom:12px}._detailGrid_b83tr_11{grid-template-columns:1fr}._detailHero_b83tr_11 h1{font-size:24px}}@media (width<=650px){._heroCopy_b83tr_4{padding:24px}._hero_b83tr_3 h1{font-size:28px}._heroActions_b83tr_4{flex-wrap:wrap}._sectionHeading_b83tr_6{flex-direction:column;gap:10px}._sectionHeading_b83tr_6>p{text-align:left;max-width:none}._landing_b83tr_1 h2{font-size:20px}._principles_b83tr_6,._modules_b83tr_7{grid-template-columns:1fr}._course_b83tr_8{display:flex}._courseCover_b83tr_8{height:120px;min-height:120px}._release_b83tr_9{grid-template-columns:1fr;gap:12px}._releaseStamp_b83tr_9 time{width:auto;margin-left:auto}._releaseList_b83tr_9{padding:0 18px}._footer_b83tr_10{flex-direction:column;align-items:flex-start;gap:12px}._detailHero_b83tr_11,._detailPanel_b83tr_11{padding:22px}._metadata_b83tr_11{flex-direction:column;gap:12px}._detailHero_b83tr_11 h1{font-size:22px}._desktopBreak_b83tr_15{display:none}}@media (prefers-reduced-motion:reduce){._moduleCard_b83tr_7{transition:none}._moduleCard_b83tr_7:hover{transform:none}}.ws-content-navigation:has(._landing_b83tr_1)>.wb-main{background:var(--omni-bg,var(--omni-paint-surface-0b1727,#0b1727))}:root[data-omni-theme=light] ._landing_b83tr_1{--omni-home-brand-bg:#eef6fb;--omni-home-brand-text:#17374c;--omni-home-brand-muted:#536f83;--omni-home-brand-accent:#087b86}._siteNav_b83tr_20{justify-content:space-between;align-items:center;gap:24px;min-height:84px;margin-bottom:6px;padding:24px 0;display:flex}._siteBrand_b83tr_20{letter-spacing:1px;white-space:nowrap;font-size:18px;font-weight:600}._siteBrand_b83tr_20 i{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df));font-style:normal}._siteNav_b83tr_20>div{flex-wrap:wrap;gap:25px;display:flex}._siteNav_b83tr_20 button{color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));background:0 0;border:0;padding:8px 0;font-size:12px}._siteNav_b83tr_20 button:hover{color:var(--omni-accent,var(--omni-paint-ink-61d3df,#61d3df))}._landing_b83tr_1 ._orbitLabel_b83tr_5{color:var(--omni-home-brand-text);background:color-mix(in srgb,var(--omni-home-brand-accent) 8%,var(--omni-home-brand-bg));border-color:color-mix(in srgb,var(--omni-home-brand-accent) 28%,transparent)}._landing_b83tr_1 ._orbitOuter_b83tr_5,._landing_b83tr_1 ._orbitInner_b83tr_5{border-color:color-mix(in srgb,var(--omni-home-brand-accent) 22%,transparent)}._landing_b83tr_1 ._heroSecondary_b83tr_4{border-color:color-mix(in srgb,var(--omni-home-brand-muted) 40%,transparent)}._landing_b83tr_1 ._brandCaption_b83tr_4{border-color:color-mix(in srgb,var(--omni-home-brand-muted) 35%,transparent)}._landing_b83tr_1 ._hero_b83tr_3:before{background:radial-gradient(ellipse at 85% 40%,color-mix(in srgb,var(--omni-home-brand-accent) 12%,transparent),transparent 58%)}._landing_b83tr_1 ._primary_b83tr_4{--omni-home-button-text:#fff;color:var(--omni-home-button-text)}:root[data-omni-theme=dark] ._landing_b83tr_1 ._primary_b83tr_4{--omni-home-button-text:#081d35}._detail_b83tr_11{padding-top:30px;scroll-margin-top:70px}@media (width<=1100px){._landing_b83tr_1{padding:0 26px 26px}._siteNav_b83tr_20>div{gap:18px}}@media (width<=700px){._landing_b83tr_1{padding:0 18px 20px}._siteNav_b83tr_20{flex-direction:column;align-items:flex-start;gap:12px;padding:18px 0}._siteNav_b83tr_20>div{gap:18px}._siteNav_b83tr_20 button{font-size:11px}}._hero_b83tr_3:after{content:"";z-index:-1;pointer-events:none;background-image:linear-gradient(color-mix(in srgb,var(--omni-home-brand-accent) 5%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--omni-home-brand-accent) 5%,transparent) 1px,transparent 1px);background-size:42px 42px;animation:26s linear infinite _gridDrift_b83tr_1;position:absolute;inset:0;-webkit-mask-image:linear-gradient(90deg,#0000 35%,#000);mask-image:linear-gradient(90deg,#0000 35%,#000)}._dataFlow_b83tr_31{fill:none;width:100%;height:100%;stroke:var(--omni-home-brand-accent);stroke-width:.7px;pointer-events:none;position:absolute;inset:0}._dataFlow_b83tr_31>g:first-child{opacity:.13}._flowSignals_b83tr_31{stroke-width:1.5px;stroke-dasharray:8 210;opacity:.65;animation:6s linear infinite _dataTravel_b83tr_1}._flowSignals_b83tr_31 path:nth-child(2n){animation:6s ease-in-out infinite _signalPulse_b83tr_1}._orbitOuter_b83tr_5{animation:38s linear infinite _outerOrbit_b83tr_1}._orbitInner_b83tr_5{animation:28s linear infinite _innerOrbit_b83tr_1}._orbitSweep_b83tr_32{background:conic-gradient(from 0deg,transparent 0deg 295deg,color-mix(in srgb,var(--omni-home-brand-accent) 12%,transparent) 355deg,transparent 360deg);pointer-events:none;border-radius:50%;width:300px;height:300px;animation:16s linear infinite _radarSweep_b83tr_1;position:absolute;top:48%;left:50%;-webkit-mask-image:radial-gradient(#0000 45%,#000 70%,#0000 72%);mask-image:radial-gradient(#0000 45%,#000 70%,#0000 72%)}._planet_b83tr_5 img{animation:5s ease-in-out infinite _coreBreathe_b83tr_1}._orbitLabel_b83tr_5{animation:6s ease-in-out infinite _nodeBreathe_b83tr_1}._orbitProject_b83tr_5{animation-delay:-1.5s}._orbitAgent_b83tr_5{animation-delay:-3s}._orbitData_b83tr_5{animation-delay:-4.5s}@keyframes _outerOrbit_b83tr_1{0%{transform:translate(-50%,-50%)rotate(-25deg)}to{transform:translate(-50%,-50%)rotate(335deg)}}@keyframes _innerOrbit_b83tr_1{0%{transform:translate(-50%,-50%)rotate(30deg)}to{transform:translate(-50%,-50%)rotate(-330deg)}}@keyframes _radarSweep_b83tr_1{0%{transform:translate(-50%,-50%)rotate(0)}to{transform:translate(-50%,-50%)rotate(360deg)}}@keyframes _coreBreathe_b83tr_1{0%,to{box-shadow:0 0 36px color-mix(in srgb,var(--omni-home-brand-accent) 9%,transparent)}50%{box-shadow:0 0 75px color-mix(in srgb,var(--omni-home-brand-accent) 24%,transparent)}}@keyframes _nodeBreathe_b83tr_1{0%,to{border-color:color-mix(in srgb,var(--omni-home-brand-accent) 20%,transparent)}50%{border-color:color-mix(in srgb,var(--omni-home-brand-accent) 50%,transparent)}}@keyframes _dataTravel_b83tr_1{to{stroke-dashoffset:-436px}}@keyframes _signalPulse_b83tr_1{0%,to{opacity:.25}50%{opacity:1}}@keyframes _gridDrift_b83tr_1{to{background-position:42px 42px}}@media (prefers-reduced-motion:reduce){._hero_b83tr_3:after,._orbitOuter_b83tr_5,._orbitInner_b83tr_5,._orbitSweep_b83tr_32,._planet_b83tr_5 img,._orbitLabel_b83tr_5,._flowSignals_b83tr_31,._flowSignals_b83tr_31 path:nth-child(2n){animation:none}._flowSignals_b83tr_31{stroke-dasharray:none;opacity:.18}._orbitSweep_b83tr_32{display:none}}._hero_b83tr_3 ._motionControl_b83tr_42{z-index:2;color:var(--omni-home-brand-muted);opacity:.8;background:0 0;border:0;border-radius:4px;align-items:center;gap:6px;padding:4px 7px;font-size:9px;display:flex;position:absolute;bottom:12px;right:16px}._hero_b83tr_3 ._motionControl_b83tr_42:hover{opacity:1;background:color-mix(in srgb,var(--omni-home-brand-accent) 10%,transparent)}._hero_b83tr_3[data-motion=paused]:after,._hero_b83tr_3[data-motion=paused] ._orbitOuter_b83tr_5,._hero_b83tr_3[data-motion=paused] ._orbitInner_b83tr_5,._hero_b83tr_3[data-motion=paused] ._orbitSweep_b83tr_32,._hero_b83tr_3[data-motion=paused] ._planet_b83tr_5 img,._hero_b83tr_3[data-motion=paused] ._orbitLabel_b83tr_5,._hero_b83tr_3[data-motion=paused] ._flowSignals_b83tr_31,._hero_b83tr_3[data-motion=paused] ._flowSignals_b83tr_31 path{animation-play-state:paused}._productIntroduction_b83tr_45{border-top:1px solid var(--omni-line,var(--omni-paint-line-2c435b,#2c435b));margin-top:30px;padding-top:20px}._productIntroduction_b83tr_45>summary{cursor:pointer;color:var(--omni-muted,var(--omni-paint-ink-91a9bd,#91a9bd));width:fit-content;font-size:12px}._productIntroduction_b83tr_45>summary:focus-visible{outline:2px solid var(--omni-accent,var(--omni-paint-line-61d3df,#61d3df));outline-offset:5px}:root[data-omni-theme=light]{--omni-paint-ink-dceaf7:#252831;--omni-paint-line-61d3df:#dde1eb;--omni-paint-ink-91a9bd:#626e80;--omni-paint-line-2c435b:#dde1eb;--omni-paint-accent-61d3df:#4055db;--omni-paint-surface-102235:#fff;--omni-paint-ink-61d3df:#626e80;--omni-paint-surface-61d3df:#eef0ff;--omni-paint-ink-b99aff:#626e80;--omni-paint-surface-b99aff:#eef0ff;--omni-paint-ink-64d6af:#626e80;--omni-paint-surface-64d6af:#eef0ff;--omni-paint-surface-193954:#fff;--omni-paint-surface-0b1727:#f5f6fa}:root[data-omni-theme=dark]{--omni-paint-ink-dceaf7:#dceaf7;--omni-paint-line-61d3df:#2c435b;--omni-paint-ink-91a9bd:#91a9bd;--omni-paint-line-2c435b:#2c435b;--omni-paint-accent-61d3df:#61d3df;--omni-paint-surface-102235:#102235;--omni-paint-ink-61d3df:#91a9bd;--omni-paint-surface-61d3df:#193954;--omni-paint-ink-b99aff:#91a9bd;--omni-paint-surface-b99aff:#193954;--omni-paint-ink-64d6af:#91a9bd;--omni-paint-surface-64d6af:#193954;--omni-paint-surface-193954:#102235;--omni-paint-surface-0b1727:#0b1727}