dingcard-mcp 0.59.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/assets/{MarkdownEditor-DDmv6m-x.js → MarkdownEditor-D1UaIr2y.js} +1 -1
- package/dist/app/assets/{jszip.min-Bke3tEl4.js → jszip.min-Dh_Y8aD6.js} +1 -1
- package/dist/app/assets/{main-9ISg6ah0.js → main-BDVCVLc1.js} +92 -86
- package/dist/app/assets/{paginate-CrvyT_J7.js → paginate-CywTJr2d.js} +1 -1
- package/dist/app/assets/{render-BCI8TA6e.js → render-CCSRSldx.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/app/render.html +2 -2
- package/dist/index.mjs +186 -10
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -42,7 +42,7 @@ Error generating stack: `+i.message+`
|
|
|
42
42
|
`)){const i=o.trim();if(!i)continue;if(r.length>=Br)break;const s=i.split(/[\t,,;;]+|\s+/).filter(c=>c.length>0),l=s[0]??"",a=s.slice(1,1+n).map(Number);if(!to(l)||a.length===0||a.some(c=>!Ef(c)))return null;r.push({label:l,values:Array.from({length:n},(c,u)=>a[u]??0)})}return r.length===0?null:{labels:r.map(o=>o.label),series:Array.from({length:n},(o,i)=>r.map(s=>s.values[i]))}}function zx(e,t){return!Array.isArray(e)||!Array.isArray(t)||e.length===0||e.length>Br||e.length!==t.length?!1:e.every(to)&&t.every(Ef)}function vf(e,t){return!Array.isArray(e)||e.length===0||e.length>Py?!1:e.every(n=>{if(typeof n!="object"||n===null)return!1;const r=n,o=Object.keys(r),i=!("name"in r)||My(r.name),s=Array.isArray(r.values)&&r.values.length===t&&r.values.every(Ef),l=typeof r.color=="string"&&/^#[0-9a-fA-F]{6}$/.test(r.color),a=o.every(c=>c==="name"||c==="values"||c==="color");return i&&s&&l&&a})}function Ny(e,t){const n=Number.parseInt(e.slice(1,3),16),r=Number.parseInt(e.slice(3,5),16),o=Number.parseInt(e.slice(5,7),16),i=s=>Math.round(s+(255-s)*t);return`#${[i(n),i(r),i(o)].map(s=>s.toString(16).padStart(2,"0")).join("")}`}function Ly(e,t,n){return t<=1?Array.from({length:t},()=>n):Array.from({length:t},(r,o)=>Ny(n,o*(.78/Math.max(1,t-1))))}function Fy(e){if(!(e>0))return 1;const t=10**Math.floor(Math.log(e)/Math.LN10);for(const n of[1,2,4,5,8,10])if(n*t>=e-1e-9)return n*t;return 10*t}function $s(e,t,n,r,o){const i=Fy(r);if(!Dx(o))return{max:i,ticks:[],leftPad:0};const s=Math.max(1,e-t-n),l=Ry(e),a=d=>e-n-d/i*s,c=[i,i/2].map(d=>({y:a(d),text:pi(d)})),u=Math.max(...c.map(d=>Hr(d.text,l)));return{max:i,ticks:c,leftPad:Math.ceil(Math.max(l*2.6,u+l*.6))}}function $y(e,t){return e===!1?!1:e===!0?t>=1:t>=2}function Dx(e){return e!==!1}function Af(e,t,n,r){const o=n.filter(w=>(w.name??"").trim().length>0);if(!$y(r,o.length))return{items:[],height:0};const i=o.map(w=>w.name.trim()),s=Math.max(8,Math.min(t*.06,e/(i.reduce((w,k)=>w+k.length,0)*.62+o.length*2.2),Pi)),l=Math.max(6,s*.62),a=s*.9,c=i.map(w=>l+s*.34+w.length*s*.62+a),u=c.reduce((w,k)=>w+k,0)-a;let d=Math.max(0,(e-u)/2);const f=s;return{items:o.map((w,k)=>{const C={x:d,y:f,color:w.color,text:i[k]};return d+=c[k],C}),height:s*2.4}}function jx(e,t,n,r,o){const i=o.mode??"grouped",s=Af(e,t,r,o.showLegend),l=t*.1+s.height,a=t*.16,c=Math.max(1,t-l-a),u=Math.min(t*.07,e/(n.length*4),Pi),d=n.map((v,h)=>r.reduce((E,T)=>E+(T.values[h]??0),0)),f=i==="percent"?1:Math.max(...i==="stacked"?d:r.flatMap(v=>v.values),0),p=i==="percent"?{...$s(t,l,a,0,o.showTicks),ticks:$s(t,l,a,0,o.showTicks).ticks.map((v,h)=>({...v,text:h===0?"100%":"50%"}))}:$s(t,l,a,f,o.showTicks),w=i==="percent"?1:p.max,k=w>0?c/w:0,C=t-a,g=(e-p.leftPad)/n.length,y=[],S=[],x=[];if(i==="grouped"){const v=g*.82/r.length;r.forEach((h,E)=>{h.values.forEach((T,b)=>{const A=T*k,I=p.leftPad+g*b+(g-v*r.length)/2+v*E;y.push({x:I,y:C-A,width:v,height:Math.max(0,A),color:h.color}),o.showValues&&S.push({x:I+v/2,y:C-A-u*.45,text:pi(T)})})})}else{const v=g*.62;n.forEach((h,E)=>{const T=d[E],b=i==="percent"?c:k;let A=C;r.forEach(I=>{const P=I.values[E]??0,L=T>0?P/T:0,G=i==="percent"?L*b:P*b,xe=A-Math.max(0,G),ae=p.leftPad+g*E+(g-v)/2;y.push({x:ae,y:xe,width:v,height:Math.max(0,G),color:I.color}),A=xe,o.showValues&&i==="percent"&&L>=.1&&x.push({x:ae+v/2,y:xe+G/2+u*.35,text:`${Math.round(L*100)}%`})}),o.showValues&&i==="stacked"&&S.push({x:p.leftPad+g*E+g/2,y:A-u*.45,text:pi(T)})})}return{bars:y,baseline:{y:C},labels:n.map((v,h)=>({x:p.leftPad+g*h+g/2,y:C+u*1.4,lines:Xl(v,g*.94,Gl(t,e,n,"bar"))})),values:S,percents:x,axis:p,legend:s.items}}function Wx(e,t,n,r,o){const i=Af(e,t,r,o.showLegend),s=t*.12+i.height,l=t*.16,a=Math.max(1,t-s-l),c=Math.max(...r.flatMap(E=>E.values),0),u=$s(t,s,l,c,o.showTicks),d=u.max>0?a/u.max:0,f=n.length,p=e-u.leftPad,w=Gl(t,e,n,"line"),k=f>1?p/(f-1)/2:0,C=E=>Math.min(k,Hr(E,w)/2+4),m=f>1?Math.max(0,C(n[0])-u.leftPad):0,g=f>1?C(n[f-1]):0,y=f>1?(p-m-g)/(f-1):0,S=E=>f>1?u.leftPad+m+y*E:u.leftPad+p/2,x=E=>t-l-E*d,v=Math.min(t*.07,e/(f*4),Pi);return{lines:r.map(E=>{const T=E.values.map((A,I)=>({x:S(I),y:x(A)})),b=T.length>1?`M${T[0].x} ${t-l} ${T.map(A=>`L${A.x} ${A.y}`).join(" ")} L${T[T.length-1].x} ${t-l} Z`:"";return{points:T,area:b,dots:T,color:E.color,values:o.showValues?E.values.map((A,I)=>({x:S(I),y:x(A)-v*.55,text:pi(A)})):[]}}),labels:n.map((E,T)=>({x:S(T),y:t-l+v*1.4,lines:Xl(E,(f>1?y:p)*.94,w)})),baseline:{y:t-l},axis:u,legend:i.items}}function Bx(e,t,n,r,o){const i=Af(e,t,r,o.showLegend),s=Math.max(3,n.length),l=Gl(t,e,n,"radar"),a={x:e/2,y:t*.46+i.height/2},c=Math.max(1,Math.min(e/2,t*.42)-l*1.6),u=m=>-Math.PI/2+m*2*Math.PI/s,d=(m,g)=>({x:a.x+Math.cos(u(m))*g,y:a.y+Math.sin(u(m))*g}),f=m=>n.map((g,y)=>{const S=d(y,m);return`${S.x.toFixed(1)} ${S.y.toFixed(1)}`}).join(" L"),p=[1,.75,.5,.25].map(m=>`M${f(c*m)} Z`),w=n.map((m,g)=>{const y=d(g,c);return{x1:a.x,y1:a.y,x2:y.x,y2:y.y}}),k=Fy(Math.max(...r.flatMap(m=>m.values),0)),C=k>0?c/k:0;return{series:r.map(m=>{const g=n.map((y,S)=>d(S,(m.values[S]??0)*C));return{d:`M${g.map(y=>`${y.x.toFixed(1)} ${y.y.toFixed(1)}`).join(" L")} Z`,color:m.color,values:o.showValues?g.map((y,S)=>({x:y.x,y:y.y-l*.55,text:pi(m.values[S]??0)})):[]}}),rings:p,axes:w,labels:n.map((m,g)=>{const y=d(g,c+l*1.1),S=2*Math.PI*(c+l)/s;return{x:y.x,y:y.y+l*.35,lines:Xl(m,Math.max(S*.94,l*2),l)}}),legend:i.items}}const ss=1.7,Hx=.6;function Ux(e,t,n,r,o){const i=r.map(k=>k.color),s=Ny(i[0],.82),l=Kx(n,r,o),a=o.showValues&&!(r.length===1&&l.length>0),c=50,u=42.5,d=1.5,p=Math.min(17,(u-8-(r.length-1)*d)/r.length),w=[];return r.forEach((k,C)=>{const m=u-C*(p+d),g=m-p,y=(m+g)/2,S=k.values,x=S.reduce((E,T)=>E+T,0);if(x<=0)return;const v=Ly("ring",S.length,k.color);let h=-Math.PI/2;S.forEach((E,T)=>{const b=E/x,A=b*Math.PI*2,I=h,P=h+A;h=P;const L=c+m*Math.cos(I),G=c+m*Math.sin(I),xe=c+m*Math.cos(P),ae=c+m*Math.sin(P),R=c+g*Math.cos(P),$=c+g*Math.sin(P),O=c+g*Math.cos(I),B=c+g*Math.sin(I),U=A>Math.PI?1:0,pt=`M${L.toFixed(2)} ${G.toFixed(2)} A${m.toFixed(2)} ${m.toFixed(2)} 0 ${U} 1 ${xe.toFixed(2)} ${ae.toFixed(2)} L${R.toFixed(2)} ${$.toFixed(2)} A${g.toFixed(2)} ${g.toFixed(2)} 0 ${U} 0 ${O.toFixed(2)} ${B.toFixed(2)} Z`,Oe=a&&b>=.1?{x:c+y*Math.cos((I+P)/2),y:c+y*Math.sin((I+P)/2)+2.6,text:`${Math.round(b*100)}%`}:null;w.push({d:pt,color:v[T],label:Oe})})}),{segments:w,track:s,...Yx(e,t,l)}}function Kx(e,t,n){if(t.length===1){if(n.showLegend===!1||e.length<(n.showLegend===!0?1:2))return[];const[o]=t,i=Ly("ring",e.length,o.color),s=o.values.reduce((l,a)=>l+a,0);return e.map((l,a)=>({color:i[a],text:n.showValues&&s>0?`${l} ${Math.round((o.values[a]??0)/s*100)}%`:l}))}const r=t.filter(o=>(o.name??"").trim().length>0);return $y(n.showLegend,r.length)?r.map(o=>({color:o.color,text:o.name.trim()})):[]}function Yx(e,t,n){const r=Math.max(1,Math.min(e,t));if(n.length===0)return{ring:{x:(e-r)/2,y:(t-r)/2,side:r},legend:[],legendFont:0};const o=(c,u)=>u*.96+Hr(c,u),i=c=>{const u=Math.max(...n.map(C=>o(C.text,c))),d=n.length*c*ss,f=c*1.6,p=Math.min(t,e-u-f);if(d>t||p<=0)return null;const w=(e-(p+f+u))/2,k=(t-d)/2;return{side:p,ring:{x:w,y:(t-p)/2,side:p},legend:n.map((C,m)=>({x:w+p+f,y:k+m*c*ss+c*1.15,color:C.color,text:C.text}))}},s=c=>{const u=c*1.2,d=[[]];let f=0;for(const g of n){const y=o(g.text,c);d[d.length-1].length>0&&f+u+y>e&&(d.push([]),f=0);const S=d[d.length-1];f+=(S.length>0?u:0)+y,S.push({entry:g,width:y})}const p=d.length*c*ss,w=c*.8,k=Math.max(1,Math.min(e,t-p-w)),C=Math.max(0,(t-(k+w+p))/2),m=d.flatMap((g,y)=>{const S=g.reduce((h,E)=>h+E.width,0)+u*(g.length-1);let x=Math.max(0,(e-S)/2);const v=C+k+w+y*c*ss+c*1.15;return g.map(h=>{const E={x,y:v,color:h.entry.color,text:h.entry.text};return x+=h.width+u,E})});return{side:k,ring:{x:(e-k)/2,y:C,side:k},legend:m}},l=Math.floor(Math.max(10,Math.min(Pi,r*.05)));for(const c of e>t*1.15?[i,s]:[s,i])for(let u=l;u>=10;u-=1){const d=c(u);if(d&&d.side>=r*Hx)return{ring:d.ring,legend:d.legend,legendFont:u}}const a=s(10);return{ring:a.ring,legend:a.legend,legendFont:10}}function pi(e){return Number.isInteger(e)?String(e):e.toFixed(1)}const Vx=0,Gx=100,Xx=12;function Cf(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Vx&&e<=Gx&&Math.round(e*10)/10===e}function Ql(e){return typeof e=="string"&&e.length>0&&e.length<=Xx}function Tf(e){return e==="bar"||e==="ring"}const ap=.18;function Qx(e){return`${Number.isInteger(e)?e:e.toFixed(1)}%`}function qx(e,t,n,r,o={}){const i=Qx(r);if(n==="ring"){const w=Math.min(e,t)/2,k=Math.max(6,Math.floor(Math.min(w-4,(w-1)/(1+ap/2))*100)/100),C=Math.max(6,k*ap),m=e/2,g=t/2,y=Math.max(14,Math.min(k*.42,96)),S=Math.max(10,Math.min(y*.62,40)),x=Math.max(6,y*.14),v=(y*.7+x+S*.9)/2,h=r/100*Math.PI*2,E=m+k*Math.sin(h),T=g-k*Math.cos(h),b=Number((g-k).toFixed(2)),A=Number((g+k).toFixed(2)),I=r<=0?null:r>=100?`M ${m} ${b} A ${k} ${k} 0 1 1 ${m} ${A} A ${k} ${k} 0 1 1 ${m} ${b}`:`M ${m} ${b} A ${k} ${k} 0 ${r>50?1:0} 1 ${E.toFixed(2)} ${T.toFixed(2)}`;return{label:o.label?{x:m,y:g+v,fontSize:S}:null,bar:null,ring:{cx:m,cy:g,radius:k,strokeWidth:C,fillPath:I,percent:{x:m,y:o.label?g-v+y*.7:g+y*.36,text:i},fontSize:y}}}const s=Math.max(11,Math.min(t*.3,30)),l=o.label?s*1.5:0,a=Math.max(8,t-l),c=Math.max(11,Math.min(a*.52,40)),u=a/2,d=Math.round(r/100*e),f=Math.max(d,a),p=d>=c*2.2;return{label:o.label?{x:0,y:s*1.1,fontSize:s}:null,bar:{track:{x:0,y:l,width:e,height:a,radius:u},fill:r<=0?null:{x:0,y:l,width:f,height:a,radius:u},percent:{x:p?Math.min(u*.7,14):Math.min(f+12,e-4),y:l+a/2+c*.36,text:i,onFill:p},fontSize:c},ring:null}}const Oy=12,zy=6,Dy=24;function _f(e){return typeof e=="string"&&e.length<=Dy}function If(e){return typeof e=="number"&&Number.isInteger(e)&&e>=2&&e<=Oy}function Pf(e){return typeof e=="number"&&Number.isInteger(e)&&e>=1&&e<=zy}function jy(e,t,n){return e.length===t*n&&e.every(_f)}function Zx(e){return e!==!1}function Jx(e){return e===!0}const Wy=["all","rows","three-line","none"];function Mf(e){return typeof e=="string"&&Wy.includes(e)}const By=.5,Hy=24;function Rf(e){return typeof e=="number"&&Number.isFinite(e)&&e>=By&&e<=Hy}const Uy=8,Ky=96;function Nf(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Uy&&e<=Ky}function Lf(e,t){return Array.isArray(e)&&e.length===t&&e.every(n=>typeof n=="number"&&Number.isFinite(n)&&n>0)}function Yy(e,t,n){const r=n&&n.length===t?n:Array.from({length:t},()=>1),o=r.reduce((l,a)=>l+a,0),i=[0];let s=0;for(let l=0;l<t;l+=1)s+=r[l],i.push(o>0?e*s/o:0);return i}const eb=32;function tb(e,t,n,r,o,i){const s=t/n,l=Math.max(7,Math.min(s*.42,eb)),a=Math.max(7,Math.min(s*.42,14)),c=Yy(e,r,i),u=d=>{const f=d*.32,p=Math.max(1,Math.floor((s-f)/(d*1.22)));for(let w=0;w<n;w+=1)for(let k=0;k<r;k+=1){const C=o[w*r+k]??"";if(C&&un(C,d,c[k+1]-c[k]-f*2).length>p)return!1}return!0};for(let d=Math.floor(l);d>a;d-=1)if(u(d))return d;return a}const nb=/[\u3400-\u9fff\u3000-\u303f\uff00-\uffef]/;function un(e,t,n){if(e==="")return[];const r=Math.max(1,Math.floor(n/(t*1.02))),o=[];let i="",s=0;for(const l of e){const a=nb.test(l)?1:.55;i!==""&&s+a>r&&(o.push(i),i="",s=0),i+=l,s+=a}return i!==""&&o.push(i),o}function rb(e,t,n,r,o,i={}){const s=Zx(i.headerRow),l=Jx(i.striped),a=Yy(e,r,i.colWidths),c=t/n,u=i.fontSize??tb(e,t,n,r,o,i.colWidths),d=u*1.22,f=u*.32,p=[],w=i.grid??"all",k=i.lineWidth??1,C=(v,h)=>p.push({x1:0,y1:v,x2:e,y2:v,width:h}),m=(v,h)=>p.push({x1:v,y1:0,x2:v,y2:t,width:h});if(w==="all"){C(k/2,k),C(t-k/2,k),m(k/2,k),m(e-k/2,k);for(let v=1;v<r;v+=1)m(a[v],k);for(let v=1;v<n;v+=1)C(v*c,k)}else if(w==="rows"){for(let v=1;v<n;v+=1)C(v*c,k);C(t-k/2,k)}else w==="three-line"&&(C(k,k*2),s&&C(c,k),C(t-k,k*2));const g=[];if(l)for(let v=s?1:0;v<n;v+=1)(v-(s?1:0))%2===1&&g.push({x:0,y:v*c,width:e,height:c});const y=[],S=[],x=Math.max(1,Math.floor((c-f)/d));for(let v=0;v<n;v+=1)for(let h=0;h<r;h+=1){const E=a[h+1]-a[h],T=un(o[v*r+h]??"",u,E-f*2);T.length>x&&S.push(v*r+h);const b=T.length>x?[...T.slice(0,x-1),`${T[x-1].slice(0,-1)}…`]:T,A=b.length*d,I=v*c+c/2;y.push({x:a[h]+E/2,y:I-A/2+(d-u)/2+u*.88,lines:b,bold:s&&v===0})}return{header:s?{x:0,y:0,width:e,height:c}:null,stripes:g,lines:p,cells:y,fontSize:u,clipped:S}}function dM(e){const t=[];for(const n of e.split(/\r?\n/)){const r=n.trim();if(r==="")continue;const i=(r.includes(" ")?r.split(" "):r.includes(",")||r.includes(",")?r.split(/[,,]/):r.split(/\s+/)).map(s=>s.trim()).filter((s,l,a)=>s!==""||l<a.length-1);for(;i.length>0&&i[i.length-1]==="";)i.pop();if(i.length!==0&&(t.push(i.slice(0,zy).map(s=>s.slice(0,Dy))),t.length>=Oy))break}return t.length>0?{rows:t}:null}const hM=2,ob=8,ib=12,sb=48;function Vy(e){return typeof e=="string"&&e.length>0&&e.length<=ib}function Gy(e){return typeof e=="string"&&e.length>0&&e.length<=sb}function Ff(e){return Array.isArray(e)&&e.length>=2&&e.length<=ob&&e.every(t=>{if(typeof t!="object"||t===null||Array.isArray(t))return!1;const n=t;return!Object.keys(n).every(o=>o==="label"||o==="text")||!Gy(n.text)?!1:!("label"in n)||Vy(n.label)})}function lb(e,t){return e.length===t.length&&e.every((n,r)=>{const o=t[r];return n.text===o.text&&(n.label??"")===(o.label??"")})}const ab=44;function cb(e,t,n,r={}){const o=x=>Math.max(8,Math.round(x*.78)),i=(x,v)=>x.length>v?[...x.slice(0,v-1),`${x[v-1].slice(0,-1)}…`]:x,s=x=>{const v=Math.max(5,x*.28),h=Math.max(14,v+9);return{dotRadius:v,inset:h,gap:Math.max(20,x*.9),spineWidth:Math.max(2,x*.08)}},l=(x,v,h)=>{const E=Math.max(9,Math.min(x,ab)),T=Math.max(9,Math.min(x,15));for(let b=Math.floor(E);b>T;b-=1)if(v(b)){if(!h(b))return b;for(let A=b-1;A>=Math.max(T+1,Math.ceil(b*.85));A-=1)if(v(A)&&!h(A))return A;return b}return T},a=x=>x.length>1&&[...x[x.length-1]].length===1;if(r.horizontal){const x=e/n.length,v=ae=>{const{dotRadius:R,inset:$,gap:O,spineWidth:B}=s(ae),U=$,pt=U+O,Oe=ae*1.25,ro=o(ae)*1.3,Vt=Math.max(1,Math.floor((t-pt-4)/Oe));return{dotRadius:R,spineWidth:B,spineY:U,contentY:pt,lineHeight:Oe,labelHeight:ro,maxTextLines:Vt}},h=l(x*.14,ae=>{const{contentY:R,lineHeight:$,labelHeight:O}=v(ae);return n.every(B=>{const U=un(B.text,ae,x-10).length;return R+(B.label!==void 0?O:0)+U*$<=t-4})},ae=>n.some(R=>a(un(R.text,ae,x-10)))),{dotRadius:E,spineWidth:T,spineY:b,contentY:A,lineHeight:I,labelHeight:P,maxTextLines:L}=v(h),G=o(h),xe=n.map((ae,R)=>{const $=R*x+x/2,O=i(un(ae.text,h,x-10),L),B=ae.label!==void 0,U=A;return{dot:{x:$,y:b},label:B?{x:$,y:U+G*.88,text:ae.label,anchor:"middle"}:null,textLines:O.map((pt,Oe)=>({x:$,y:U+(B?P:0)+Oe*I+h*.88,text:pt,anchor:"middle"}))}});return{spine:{x1:4,y1:b,x2:e-4,y2:b},entries:xe,fontSize:h,dotRadius:E,spineWidth:T}}const c=t/n.length,u=x=>{const{dotRadius:v,inset:h,gap:E,spineWidth:T}=s(x),b=h,A=b+E,I=x*1.25,P=o(x)*1.3,L=Math.max(1,Math.floor((c-6)/I));return{dotRadius:v,spineWidth:T,spineX:b,contentX:A,lineHeight:I,labelHeight:P,maxTextLines:L}},d=l(c*.34,x=>{const{contentX:v,lineHeight:h,labelHeight:E}=u(x);return n.every(T=>{const b=un(T.text,x,e-v-4).length;return(T.label!==void 0?E:0)+b*h<=c-6})},x=>n.some(v=>a(un(v.text,x,e-u(x).contentX-4)))),{dotRadius:f,spineWidth:p,spineX:w,contentX:k,lineHeight:C,labelHeight:m,maxTextLines:g}=u(d),y=o(d),S=n.map((x,v)=>{const h=v*c+c/2,E=i(un(x.text,d,e-k-4),g),T=x.label!==void 0,b=(T?m:0)+E.length*C,A=h-b/2;return{dot:{x:w,y:h},label:T?{x:k,y:A+y*.88,text:x.label,anchor:"start"}:null,textLines:E.map((I,P)=>({x:k,y:A+(T?m:0)+P*C+d*.88,text:I,anchor:"start"}))}});return{spine:{x1:w,y1:4,x2:w,y2:t-4},entries:S,fontSize:d,dotRadius:f,spineWidth:p}}function Xy(e,t){const n=[];if(t==="")return n;for(let r=e.indexOf(t);r!==-1;r=e.indexOf(t,r+t.length))n.push(r);return n}function cp(e){const{start:t,end:n,...r}=e;return r}function ub(e,t){return e===null||t===null?e===t:[...new Set([...Object.keys(e),...Object.keys(t)])].every(r=>e[r]===t[r])}function fb(e,t,n,r){const o=Xy(e,n);if(o.length===0)return{text:e,spans:t?[...t]:void 0,count:0};const i=u=>{const d=t==null?void 0:t.find(f=>f.start<=u&&u<f.end);return d?cp(d):null},s=[];let l=0;for(const u of o){for(let f=l;f<u;f+=1)s.push({char:e[f],style:i(f)});const d=i(u);for(const f of r)s.push({char:f,style:d});l=u+n.length}for(let u=l;u<e.length;u+=1)s.push({char:e[u],style:i(u)});const a=[];let c=0;for(const{char:u,style:d}of s){const f=u.length;if(d){const p=a[a.length-1];p&&p.end===c&&ub(cp(p),d)?p.end+=f:a.push({start:c,end:c+f,...d})}c+=f}return{text:s.map(u=>u.char).join(""),spans:a.length>0?a:void 0,count:o.length}}function db(e,t,n,r){const o=Xy(e,t).length;if(o===0)return{value:e,replaced:0,skipped:0};const i=e.split(t).join(n);return r(i)?{value:i,replaced:o,skipped:0}:{value:e,replaced:0,skipped:o}}function Qy(e,t,n){let r=0,o=0;const i=(s,l)=>{const a=db(s,t,n,l);return r+=a.replaced,o+=a.skipped,a.value};switch(e.type){case"group":{const s=e.children.map(l=>{const a=Qy(l,t,n);return r+=a.replaced,o+=a.skipped,a.node});return{node:r>0?{...e,children:s}:e,replaced:r,skipped:o}}case"text":{const s=fb(e.text,e.spans,t,n);if(s.count===0)return{node:e,replaced:0,skipped:0};const{spans:l,...a}=e;return{node:s.spans?{...a,text:s.text,spans:s.spans}:{...a,text:s.text},replaced:s.count,skipped:0}}case"table":{const s=e.cells.map(l=>i(l,_f));return{node:r>0?{...e,cells:s}:e,replaced:r,skipped:o}}case"timeline":{const s=e.items.map(l=>({...l.label!==void 0?{label:i(l.label,Vy)}:{},text:i(l.text,Gy)}));return{node:r>0?{...e,items:s}:e,replaced:r,skipped:o}}case"chart":{const s=e.labels.map(a=>i(a,to)),l=e.series.map(a=>a.name!==void 0?{...a,name:i(a.name,My)}:a);return{node:r>0?{...e,labels:s,series:l}:e,replaced:r,skipped:o}}case"progress":{if(e.label===void 0)return{node:e,replaced:0,skipped:0};const s=i(e.label,Ql);return{node:r>0?{...e,label:s}:e,replaced:r,skipped:o}}default:return{node:e,replaced:0,skipped:0}}}function qy(e,t,n,r){if(t==="")return{document:e,replaced:0,skipped:0};let o=0,i=0;const s=e.slides.map(l=>{if(r&&l.id!==r)return l;let a=0;const c=l.nodes.map(u=>{const d=Qy(u,t,n);return a+=d.replaced,i+=d.skipped,d.node});return o+=a,a>0?{...l,nodes:c}:l});return{document:o>0?{...e,slides:s}:e,replaced:o,skipped:i}}function pM(e,t,n){const{replaced:r,skipped:o}=qy(e,t,t,n);return r+o}const Zy={type:"solid",color:"#18181b"},Jy={type:"solid",color:"#ffffff"},e0={type:"solid",color:"#fed7aa"},t0="#f97316",qc=135,hb=/^#[0-9a-fA-F]{6}$/;function F(e){return typeof e=="string"&&hb.test(e)}function $f(e){return typeof e!="number"||!Number.isFinite(e)?qc:(Math.round(e)%360+360)%360}function Of(e,t){if(!e||typeof e!="object")return t;const n=e;return n.type==="solid"&&F(n.color)?{type:"solid",color:n.color}:n.type==="linear-gradient"&&F(n.from)&&F(n.to)&&typeof n.angle=="number"&&Number.isFinite(n.angle)?{type:"linear-gradient",from:n.from,to:n.to,angle:$f(n.angle)}:t}function zf(e){return e.type==="linear-gradient"&&"stops"in e}function Df(e){if(e.type==="solid")return e.color;const t=r=>r.map(o=>`${o.color} ${Math.round(o.offset*1e3)/10}%`).join(", ");if(e.type==="radial-gradient")return`radial-gradient(circle farthest-corner at 50% 50%, ${t(e.stops)})`;const n=$f(e.angle);return zf(e)?`linear-gradient(${n}deg, ${t(e.stops)})`:`linear-gradient(${n}deg, ${e.from}, ${e.to})`}function pb(e,t,n){if(e.type==="solid")return null;if(e.type==="radial-gradient")return{kind:"radial",cx:t/2,cy:n/2,r:Math.hypot(t,n)/2,stops:e.stops};const r=$f(e.angle)*Math.PI/180,o=Math.sin(r),i=-Math.cos(r),s=(Math.abs(t*o)+Math.abs(n*i))/2,l=zf(e)?e.stops:[{offset:0,color:e.from},{offset:1,color:e.to}];return{kind:"linear",x1:t/2-o*s,y1:n/2-i*s,x2:t/2+o*s,y2:n/2+i*s,stops:l}}function gM(e){return e.type==="transparent"||e.type==="image"?"transparent":e.type==="pattern"?kb(e):Df(e)}const gb=["dots","grid","lines","checks"],mM={dots:"圆点",grid:"网格",lines:"横线",checks:"方格"},mb=8,yb=64,wb=20;function n0(e){return typeof e=="string"&&gb.includes(e)}function r0(e){return typeof e=="number"&&Number.isFinite(e)&&e>=mb&&e<=yb}const yM=[12,20,32],wM={12:"小",20:"中",32:"大"};function kb(e){const t=Math.round(e.size),n=e.patternColor,r=`${t}px ${t}px`,o=[];if(e.pattern==="dots")o.push(`radial-gradient(circle, ${n} 26%, transparent 27%) 0 0 / ${r}`);else if(e.pattern==="grid")o.push(`linear-gradient(${n} 1px, transparent 1px) 0 0 / ${r}`),o.push(`linear-gradient(90deg, ${n} 1px, transparent 1px) 0 0 / ${r}`);else if(e.pattern==="lines")o.push(`linear-gradient(${n} 1px, transparent 1px) 0 0 / 100% ${t}px`);else{const i=Math.max(4,Math.round(t/4));o.push(`repeating-linear-gradient(45deg, ${n}, ${n} 1px, transparent 1px, transparent ${i}px)`),o.push(`repeating-linear-gradient(-45deg, ${n}, ${n} 1px, transparent 1px, transparent ${i}px)`)}return`${o.join(", ")}, ${e.color}`}function Sb(e){const t=[1,3,5].map(n=>Number.parseInt(e.slice(n,n+2),16)/255);return .2126*t[0]+.7152*t[1]+.0722*t[2]>.4}function kM(e,t){const n=e.type==="transparent"||e.type==="image"?"#fdf6ec":e.type==="pattern"?e.color:gi(e),r=e.type==="pattern"?e.patternColor:Sb(n)?"#18181b":"#ffffff",o=e.type==="pattern"?e.size:wb;return{type:"pattern",color:n,patternColor:r,pattern:t,size:o}}function xb(e){return e.type==="image"?{}:e.type==="transparent"?{background:"none"}:{background:Df(e)}}function gi(e){return e.type==="solid"?e.color:zf(e)||e.type==="radial-gradient"?e.stops[0].color:e.from}function bb(e){return e.type==="solid"?{color:e.color}:{backgroundImage:Df(e),backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",WebkitTextFillColor:"transparent",caretColor:gi(e)}}function SM(e){return e.type==="linear-gradient"?e:e.type==="radial-gradient"?{type:"linear-gradient",stops:e.stops.map(t=>({...t})),angle:qc}:{type:"linear-gradient",from:e.color,to:t0,angle:qc}}function xM(e){if(e.type==="radial-gradient")return e;if(e.type==="linear-gradient"&&"stops"in e)return{type:"radial-gradient",stops:e.stops.map(r=>({...r}))};const t=e.type==="solid"?e.color:e.from,n=e.type==="solid"?t0:e.to;return{type:"radial-gradient",stops:[{offset:0,color:t},{offset:1,color:n}]}}function bM(e){return e.type==="solid"?e:{type:"solid",color:gi(e)}}const Cn=1e-6;function Je(e,t){if(!Number.isFinite(e))throw new RangeError(`${t} must be finite`)}function hl(e,t){if(Je(e,t),e<=0)throw new RangeError(`${t} must be greater than zero`)}function Tn(e,t){if(!Array.isArray(e)||e.length!==6)throw new RangeError(`${t} must contain exactly six components`);for(let n=0;n<6;n+=1)Je(e[n],`${t}[${n}]`)}function mi(e,t){if(e===null||typeof e!="object")throw new RangeError(`${t} must be a point`);Je(e.x,`${t}.x`),Je(e.y,`${t}.y`)}function yi(){return[1,0,0,1,0,0]}function He(e,t){Tn(e,"left matrix"),Tn(t,"right matrix");const[n,r,o,i,s,l]=e,[a,c,u,d,f,p]=t,w=[n*a+o*c,r*a+i*c,n*u+o*d,r*u+i*d,n*f+o*p+s,r*f+i*p+l];return Tn(w,"matrix product"),w}function wi(e,t){return Je(e,"x"),Je(t,"y"),[1,0,0,1,e,t]}function o0(e){Je(e,"degrees");const t=e%360*Math.PI/180,n=Math.cos(t),r=Math.sin(t);return[n,r,-r,n,0,0]}function i0(e){return hl(e,"scale"),[e,0,0,e,0,0]}function s0(e){Tn(e,"matrix");const[t,n,r,o,i,s]=e,l=(S,x,v,h)=>{const E=[S,x,v,h,-(S*i+v*s),-(x*i+h*s)];return Tn(E,"inverse matrix"),E},a=t*o-n*r;if(Number.isFinite(a)&&a!==0)return l(o/a,-n/a,-r/a,t/a);const c=Math.max(Math.abs(t),Math.abs(n),Math.abs(r),Math.abs(o));if(c===0)return null;const u=t/c,d=n/c,f=r/c,p=o/c,w=u*p-d*f;if(w===0)return null;const k=1/c/w,C=p*k,m=-d*k,g=-f*k,y=u*k;return l(C,m,g,y)}function Po(e,t){Tn(e,"matrix"),mi(t,"point");const[n,r,o,i,s,l]=e,a={x:n*t.x+o*t.y+s,y:r*t.x+i*t.y+l};return mi(a,"transformed point"),a}function l0(e,t){Tn(e,"matrix"),mi(t,"vector");const[n,r,o,i]=e,s={x:n*t.x+o*t.y,y:r*t.x+i*t.y};return mi(s,"transformed vector"),s}function ql(e,t,n,r){return He(wi(e,t),He(o0(n),i0(r)))}function Eb(e,t,n,r,o,i){return Je(e,"x"),Je(t,"y"),hl(n,"width"),hl(r,"height"),He(wi(e+n/2,t+r/2),He(o0(o),He(i0(i),wi(-n/2,-r/2))))}function vb(e){Tn(e,"matrix");const[t,n,r,o,i,s]=e,l=Math.hypot(t,n),a=Math.hypot(r,o);if(Je(l,"first axis scale"),Je(a,"second axis scale"),l===0||a===0)return null;const c=Math.max(l,a),u=Math.abs(l-a)/c,d=t/l,f=n/l,p=r/a,w=o/a,k=d*p+f*w,C=d*w-f*p,m=Math.max(Math.abs(t-o),Math.abs(n+r));if(u>Cn||Math.abs(k)>Cn||C<=0||m>Cn)return null;const g=l+(a-l)/2;return hl(g,"similarity scale"),{x:i,y:s,rotation:Math.atan2(n,t)*180/Math.PI,scale:g}}function jf(e){if(e.length===0)return null;e.forEach((s,l)=>mi(s,`points[${l}]`));let t=e[0].x,n=e[0].x,r=e[0].y,o=e[0].y;for(const s of e.slice(1))t=Math.min(t,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),o=Math.max(o,s.y);const i={x:t,y:r,width:n-t,height:o-r};return Je(i.width,"bounds.width"),Je(i.height,"bounds.height"),i}function sr(e){return e.type==="group"?ql(e.x,e.y,e.rotation,e.scale):Eb(e.x,e.y,e.width,e.height,e.rotation,e.scale)}function a0(e,t){let n=e,r=yi();for(const o of t){const i=n.find(s=>s.id===o);if(!i||i.type!=="group")return null;r=He(r,sr(i)),n=i.children}return r}function EM(e,t){if(t.length===0)return yi();let n=e,r=yi();for(let o=0;o<t.length;o+=1){const i=n.find(s=>s.id===t[o]);if(!i)return null;if(r=He(r,sr(i)),o<t.length-1){if(i.type!=="group")return null;n=i.children}}return r}function Wf(e,t,n){const r=vb(t);if(!r)return null;let o=r.scale;if(n!==void 0){if(!Number.isFinite(n)||n<=0)return null;const a=Math.max(Math.abs(r.scale),Math.abs(n))*Number.EPSILON*64;if(Math.abs(r.scale-n)>a)return null;o=n}if(e.type==="group")return{...e,x:r.x,y:r.y,rotation:r.rotation,scale:o};const i=Po(t,{x:e.width/2,y:e.height/2}),s=i.x-e.width/2,l=i.y-e.height/2;return!Number.isFinite(s)||!Number.isFinite(l)?null:{...e,x:s,y:l,rotation:r.rotation,scale:o}}function Bf(e,t,n,r){if(!Number.isInteger(r)||r<1||r>dt)throw new RangeError(`scene depth must be an integer from 1 to ${dt}`);const o=He(t,sr(e));if(e.type==="group"){for(const i of e.children)Bf(i,o,n,r+1);return}n.push(Po(o,{x:0,y:0}),Po(o,{x:e.width,y:0}),Po(o,{x:e.width,y:e.height}),Po(o,{x:0,y:e.height}))}function Ab(e){const t=[];return Bf(e,yi(),t,1),jf(t)}function c0(e){const t=[];for(const n of e){const r=Ab(n);if(!r)return null;t.push({x:r.x,y:r.y},{x:r.x+r.width,y:r.y},{x:r.x+r.width,y:r.y+r.height},{x:r.x,y:r.y+r.height})}return jf(t)}function vM(e,t){if(t.length===0)return null;const n=a0(e,t.slice(0,-1));if(!n)return null;let r=e;for(let s=0;s<t.length-1;s+=1){const l=r.find(a=>a.id===t[s]);if(!l||l.type!=="group")return null;r=l.children}const o=r.find(s=>s.id===t[t.length-1]);if(!o)return null;const i=[];return Bf(o,n,i,1),jf(i)}const u0=1,Cb=4,up=["focusX","focusY","zoom"];function Re(e){return typeof e=="number"&&Number.isFinite(e)}function fp(e){return Re(e==null?void 0:e.width)&&e.width>0&&Re(e==null?void 0:e.height)&&e.height>0}function Zc(e){return Re(e==null?void 0:e.x)&&Re(e==null?void 0:e.y)}function vr(e,t,n){return Math.min(n,Math.max(t,e))}function Tb(e){return Array.isArray(e)&&e.length===6&&e.every(Re)}function Mn(){return{focusX:.5,focusY:.5,zoom:u0}}function vt(e){if(e===null||typeof e!="object"||Array.isArray(e)||Object.keys(e).length!==up.length||up.some(r=>!Object.prototype.hasOwnProperty.call(e,r)))return!1;const n=e;return Re(n.focusX)&&n.focusX>=0&&n.focusX<=1&&Re(n.focusY)&&n.focusY>=0&&n.focusY<=1&&Re(n.zoom)&&n.zoom>=u0&&n.zoom<=Cb}function ht(e){return{focusX:e.focusX,focusY:e.focusY,zoom:e.zoom}}function Mi(e,t){return!vt(e)||!vt(t)?!1:Math.abs(e.focusX-t.focusX)<=Cn&&Math.abs(e.focusY-t.focusY)<=Cn&&Math.abs(e.zoom-t.zoom)<=Cn}function f0({naturalSize:e,frameSize:t,fit:n,framing:r}){if(!fp(e)||!fp(t)||!vt(r)||n!=="cover"&&n!=="contain")return null;const o=n==="cover"?Math.max(t.width/e.width,t.height/e.height)*r.zoom:Math.min(t.width/e.width,t.height/e.height);let i=e.width*o,s=e.height*o;if(!Re(o)||o<=0||!Re(i)||!Re(s))return null;if(n==="cover"?(i=Math.max(i,t.width),s=Math.max(s,t.height)):(i=Math.min(i,t.width),s=Math.min(s,t.height)),n==="contain")return{left:(t.width-i)/2,top:(t.height-s)/2,width:i,height:s};const l=vr(t.width/2-r.focusX*i,t.width-i,0),a=vr(t.height/2-r.focusY*s,t.height-s,0);return[l,a].every(Re)?{left:l,top:a,width:i,height:s}:null}function _b({naturalSize:e,frameSize:t,framing:n,localDelta:r}){if(!Zc(r))return n;const o=f0({naturalSize:e,frameSize:t,fit:"cover",framing:n});if(!o)return n;const i=vr(o.left+r.x,t.width-o.width,0),s=vr(o.top+r.y,t.height-o.height,0);if(!Re(i)||!Re(s))return n;const l=i!==o.left,a=s!==o.top;if(!l&&!a)return n;const c={focusX:l?vr((t.width/2-i)/o.width,0,1):n.focusX,focusY:a?vr((t.height/2-s)/o.height,0,1):n.focusY,zoom:n.zoom};return Mi(c,n)?n:c}function AM({naturalSize:e,frameSize:t,framing:n,screenDelta:r,renderScale:o,worldMatrix:i}){if(!Zc(r)||!Re(o)||o<=0||!Tb(i))return n;try{const s=s0(i);if(!s)return n;const l=l0(s,r),a={x:l.x/o,y:l.y/o};return Zc(a)?_b({naturalSize:e,frameSize:t,framing:n,localDelta:a}):n}catch{return n}}const Ib=new Set(["start","end","bold","color","highlight","underline","strike","fontSize"]),d0=1,h0=4096,Hf=["bold","color","highlight","underline","strike","fontSize"];function p0(e){return Hf.some(t=>e[t]!==void 0)}function pl(e){const t={};return e.bold&&(t.bold=!0),e.color!==void 0&&(t.color=e.color),e.highlight!==void 0&&(t.highlight=e.highlight),e.underline&&(t.underline=!0),e.strike&&(t.strike=!0),e.fontSize!==void 0&&(t.fontSize=e.fontSize),t}function g0(e,t){return Hf.every(n=>e[n]===t[n])}function Pb(e){return e.some(t=>t.highlight!==void 0||t.underline!==void 0)}function Mb(e){return e.some(t=>t.strike!==void 0||t.fontSize!==void 0)}function Rb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Nb(e){if(!Rb(e))return!1;for(const t of Object.keys(e))if(!Ib.has(t))return!1;return typeof e.start!="number"||!Number.isInteger(e.start)||typeof e.end!="number"||!Number.isInteger(e.end)||e.start<0||e.start>=e.end||"bold"in e&&e.bold!==!0||"color"in e&&!F(e.color)||"highlight"in e&&!F(e.highlight)||"underline"in e&&e.underline!==!0||"strike"in e&&e.strike!==!0||"fontSize"in e&&!Lb(e.fontSize)?!1:Hf.some(t=>t in e)}function Lb(e){return typeof e=="number"&&Number.isFinite(e)&&e>=d0&&e<=h0}function Uf(e,t){if(!Array.isArray(e))return null;const n=[];for(const r of e){if(!Nb(r)||r.end>t)return null;n.push({start:r.start,end:r.end,...pl(r)})}n.sort((r,o)=>r.start-o.start);for(let r=1;r<n.length;r+=1)if(n[r].start<n[r-1].end)return null;return n}function Fb(e,t,n){if(!e||e.length===0||t===n)return e;let r=0;const o=Math.min(t.length,n.length);for(;r<o&&t[r]===n[r];)r+=1;let i=0;const s=Math.min(t.length-r,n.length-r);for(;i<s&&t[t.length-1-i]===n[n.length-1-i];)i+=1;const l=t.length-i,c=n.length-i-l,u=[];for(const d of e){const f=[];d.start<r&&f.push({start:d.start,end:Math.min(d.end,r)}),d.end>l&&f.push({start:Math.max(d.start,l)+c,end:d.end+c});for(const p of f){if(p.end<=p.start)continue;const w=u[u.length-1];w&&w.end===p.start&&g0(w,d)?w.end=p.end:u.push({...d,start:p.start,end:p.end})}}return u.length>0?u:void 0}function CM(e,t,n,r){const{start:o,end:i}=t;if(!Number.isInteger(o)||!Number.isInteger(i)||o<0||i>r||o>=i)return null;const s=e??[],l=new Set([o,i]);for(const u of s)l.add(u.start),l.add(u.end);const a=[...l].sort((u,d)=>u-d),c=[];for(let u=0;u<a.length-1;u+=1){const d=a[u],f=a[u+1],p=s.find(m=>m.start<=d&&m.end>=f),w=p?pl(p):{},k=d>=o&&f<=i?pl(n(w)):w;if(!p0(k))continue;const C=c[c.length-1];C&&C.end===d&&g0(C,k)?C.end=f:c.push({start:d,end:f,...k})}return c}function TM(e,t,n){let r=t.start;for(const o of[...e??[]].sort((i,s)=>i.start-s.start))if(!(o.end<=r)){if(o.start>r||!n(o))return!1;if(r=o.end,r>=t.end)return!0}return r>=t.end}function $b(e,t){if(!t||t.length===0)return e.length>0?[{text:e}]:[];const n=[];let r=0;for(const o of t)o.start>r&&n.push({text:e.slice(r,o.start)}),n.push({text:e.slice(o.start,o.end),...pl(o)}),r=o.end;return r<e.length&&n.push({text:e.slice(r)}),n.filter(o=>o.text.length>0)}function m0(e,t){const n=[[]];for(const r of $b(e,t))r.text.split(`
|
|
43
43
|
`).forEach((o,i)=>{i>0&&n.push([]),o&&n[n.length-1].push({...r,text:o})});return n}function Ob(e,t){return!e||!Number.isFinite(t)||t<=0||t===1||!e.some(n=>n.fontSize!==void 0)?e:e.map(n=>n.fontSize===void 0?n:{...n,fontSize:Math.min(h0,Math.max(d0,Math.round(n.fontSize*t*100)/100))})}function y0(e){return p0(e)}function Jc(e,t,n){const r={};return e.bold&&(r.fontWeight="700"),e.color&&(r.color=e.color),e.highlight&&(r.backgroundColor=e.highlight),e.fontSize!==void 0&&(r.fontSize=n&&n>0?`${e.fontSize/n}em`:`${e.fontSize}px`),t&&(e.color||e.highlight)&&(r.WebkitTextFillColor=e.color??t),(e.underline||e.strike)&&(r.textDecorationLine=[e.underline?"underline":"",e.strike?"line-through":""].filter(Boolean).join(" "),t&&(r.textDecorationColor=e.color??t)),r}const zb=["neon","outline","hollow","splice","offset","echo","glitch","extrude","background","marker"],w0={neon:["type","color","amount"],outline:["type","color","amount"],hollow:["type","amount"],splice:["type","color","amount","angle"],offset:["type","color","amount","angle"],echo:["type","color","amount","angle"],glitch:["type","color","color2","amount"],extrude:["type","color","amount","angle"],background:["type","color","amount","radius"],marker:["type","color","amount"]},_M=new Set(["splice","offset","echo","extrude"]);function Db(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function dp(e,t,n){return typeof e=="number"&&Number.isFinite(e)&&e>=t&&e<=n}function jb(e){return typeof e=="string"&&zb.includes(e)}function Kf(e){if(!Db(e)||!jb(e.type))return!1;const t=w0[e.type];return Object.keys(e).length!==t.length||!t.every(n=>n in e)?!1:t.every(n=>n==="type"?!0:n==="color"||n==="color2"?F(e[n]):n==="angle"?dp(e[n],0,360):dp(e[n],0,100))}function Wb(e,t){if(!e||!t)return e===t;const n=w0[e.type];return e.type===t.type&&n.every(r=>e[r]===t[r])}function Bb(e){const t=Number.parseInt(e.slice(1),16);return(.2126*(t>>16&255)+.7152*(t>>8&255)+.0722*(t&255))/255}function Hb(e,t){const n=Number.parseInt(e.slice(1),16),r=o=>Math.round((n>>o&255)*(1-t)).toString(16).padStart(2,"0");return`#${r(16)}${r(8)}${r(0)}`}function IM(e,t){const n=Bb(t)>.6;switch(e){case"neon":return{type:e,color:t,amount:50};case"outline":return{type:e,color:n?"#18181b":"#ffffff",amount:50};case"hollow":return{type:e,amount:50};case"splice":return{type:e,color:"#f59e0b",amount:50,angle:45};case"offset":return{type:e,color:n?"#18181b":"#f59e0b",amount:45,angle:45};case"echo":return{type:e,color:t,amount:45,angle:0};case"glitch":return{type:e,color:"#00e5ff",color2:"#ff2bd6",amount:45};case"extrude":return{type:e,color:Hb(t,.45),amount:50,angle:45};case"background":return{type:e,color:n?"#18181b":"#fde047",amount:40,radius:30};case"marker":return{type:e,color:"#fde68a",amount:50}}}function ho(e,t){const n=Number.parseInt(e.slice(1),16);return`rgba(${n>>16&255}, ${n>>8&255}, ${n&255}, ${t})`}const se=e=>`${Math.round(e*100)/100}px`;function ja(e,t){const n=t*Math.PI/180;return[Math.cos(n)*e,Math.sin(n)*e]}function Ub(e,t){const n=e.amount/50;switch(e.type){case"hollow":return null;case"neon":{const[r,o,i]=[.04,.12,.3].map(s=>se(t*s*n));return{style:{textShadow:`0 0 ${r} ${ho(e.color,.95)}, 0 0 ${o} ${ho(e.color,.8)}, 0 0 ${i} ${ho(e.color,.55)}`}}}case"outline":{const r=t*.05*n;return{style:{color:e.color,WebkitTextFillColor:e.color,WebkitTextStroke:`${se(r*2)} ${e.color}`}}}case"splice":case"offset":{const[r,o]=ja(t*(e.type==="splice"?.07:.06)*n,e.angle);return{style:{textShadow:`${se(r)} ${se(o)} 0 ${e.color}`}}}case"echo":{const[r,o]=ja(t*.07*n,e.angle);return{style:{textShadow:`${se(r)} ${se(o)} 0 ${ho(e.color,.45)}, ${se(r*2)} ${se(o*2)} 0 ${ho(e.color,.2)}`}}}case"glitch":{const r=t*.035*n;return{style:{textShadow:`${se(-r)} 0 0 ${e.color}, ${se(r)} 0 0 ${e.color2}`}}}case"extrude":{const r=t*.1*n,o=Math.max(1,Math.min(40,Math.round(r))),[i,s]=ja(1,e.angle),l=Array.from({length:o},(a,c)=>{const u=r/o*(c+1);return`${se(i*u)} ${se(s*u)} 0 ${e.color}`});return l.push(`${se(i*(r+2))} ${se(s*(r+2)+2)} ${se(t*.12)} rgba(0, 0, 0, 0.25)`),{style:{textShadow:l.join(", ")}}}case"background":{const r=t*(.1+.14*n),o=t*(.02+.05*n);return{style:{},band:{backgroundColor:e.color,paddingInline:se(r),paddingBlock:se(o),marginInline:se(-r),borderRadius:se(t*.6*(e.radius/100))}}}case"marker":{const r=92-(12+.44*e.amount),o=t*.08;return{style:{},band:{backgroundImage:`linear-gradient(to bottom, transparent ${r}%, ${e.color} ${r}%, ${e.color} 92%, transparent 92%)`,paddingInline:se(o),marginInline:se(-o)}}}}}function Kb(e,t,n){if(e.type!=="hollow"&&e.type!=="splice")return{};const r=Math.max(1,t*(e.type==="hollow"?.012+.022*(e.amount/50):.02));return{background:"none",color:"transparent",WebkitTextFillColor:"transparent",WebkitTextStroke:`${se(r)} ${n}`,paintOrder:"normal"}}function Yb(e){return(e==null?void 0:e.type)==="hollow"||(e==null?void 0:e.type)==="splice"}const hp=new Set(["color","blur","offsetX","offsetY"]),Vb=new Set(["brightness","contrast","saturation","blur"]),Gb=new Set(["hue","grayscale","sepia"]),Xb=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Qb=new Set(Xb);function Ri(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function qe(e,t,n){return typeof e=="number"&&Number.isFinite(e)&&e>=t&&e<=n}function Yf(e){return qe(e,0,1)}function Vf(e){return qe(e,.5,4)}function Gf(e){return qe(e,-50,200)}function Ee(e){return qe(e,0,2e3)}function Xf(e){return qe(e,0,1e3)&&e>0}function Qf(e){return e==="middle"||e==="bottom"}function qf(e){return e==="bullet"||e==="number"}function Zl(e){if(!Ri(e))return null;const t=Object.keys(e);return t.length!==hp.size||!t.every(n=>hp.has(n))||!F(e.color)||!qe(e.blur,0,400)||!qe(e.offsetX,-1e3,1e3)||!qe(e.offsetY,-1e3,1e3)?null:{color:e.color,blur:e.blur,offsetX:e.offsetX,offsetY:e.offsetY}}function qb(e,t){return e===t?!0:!e||!t?!1:e.color===t.color&&e.blur===t.blur&&e.offsetX===t.offsetX&&e.offsetY===t.offsetY}function Zf(e){return typeof e=="string"&&Qb.has(e)}function Jl(e,t){if(!Ri(e))return null;const n=Object.keys(e);if(n.length===0||!n.every(o=>Vb.has(o)||t&&Gb.has(o)))return null;const r={};for(const o of n){const i=o==="blur"?100:o==="hue"?360:o==="grayscale"||o==="sepia"?1:3;if(!qe(e[o],0,i))return null;r[o]=e[o]}return r}function Zb(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!1;return!0}function k0(e){const t=[];return e.brightness!==void 0&&t.push(`brightness(${e.brightness})`),e.contrast!==void 0&&t.push(`contrast(${e.contrast})`),e.saturation!==void 0&&t.push(`saturate(${e.saturation})`),e.grayscale!==void 0&&t.push(`grayscale(${e.grayscale})`),e.sepia!==void 0&&t.push(`sepia(${e.sepia})`),e.hue!==void 0&&t.push(`hue-rotate(${e.hue}deg)`),e.blur!==void 0&&t.push(`blur(${e.blur}px)`),t.join(" ")}function Ur(e){return qe(e,1,500)}function ki(e){return e==="round"||e==="butt"||e==="square"}function Si(e){return e==="none"||e==="arrow"||e==="dot"}const Jb=2,e2=64,pp=new Set(["x","y"]);function ea(e,t,n){if(!Array.isArray(e)||e.length<Jb||e.length>e2)return null;const r=[];for(const o of e){if(!Ri(o))return null;const i=Object.keys(o);if(i.length!==pp.size||!i.every(a=>pp.has(a)))return null;const{x:s,y:l}=o;if(typeof s!="number"||!Number.isFinite(s)||typeof l!="number"||!Number.isFinite(l)||s<0||s>t||l<0||l>n)return null;r.push({x:s,y:l})}return r}function Jf(e){return e==="round"||e==="miter"||e==="bevel"}function ed(e){return e==="nonzero"||e==="evenodd"}function td(e){return qe(e,0,1e4)}function nd(e){return qe(e,0,1e4)&&e>0}const gp=new Set(["x","y","width","height"]);function rd(e){if(!Ri(e))return null;const t=Object.keys(e);if(t.length!==gp.size||!t.every(s=>gp.has(s)))return null;const{x:n,y:r,width:o,height:i}=e;return typeof n!="number"||!Number.isFinite(n)||typeof r!="number"||!Number.isFinite(r)||typeof o!="number"||!Number.isFinite(o)||o<=0||typeof i!="number"||!Number.isFinite(i)||i<=0?null:{x:n,y:r,width:o,height:i}}function t2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function od(e){return e==="rect"||e==="ellipse"||e==="triangle"||e==="star"||e==="hexagon"||S0(e)}function n2(e){return e==="star"||e==="hexagon"}function S0(e){return e==="diamond"||e==="pentagon"||e==="heart"||e==="bubble"}const id=.15,sd=.85,ld=.05,ad=.95;function cd(e){return typeof e=="number"&&Number.isFinite(e)&&e>=id&&e<=sd}function ud(e){return typeof e=="number"&&Number.isFinite(e)&&e>=ld&&e<=ad}const mp=new Set(["offset","color"]),r2=2,o2=8;function gl(e){if(!Array.isArray(e)||e.length<r2||e.length>o2)return null;const t=[];let n=-1;for(const r of e){if(!Ri(r))return null;const o=Object.keys(r);if(o.length!==mp.size||!o.every(s=>mp.has(s))||!F(r.color))return null;const i=r.offset;if(typeof i!="number"||!Number.isFinite(i)||i<0||i>1||i<=n)return null;n=i,t.push({offset:i,color:r.color})}return t}function i2(e,t){return e===t?!0:!e||!t||e.length!==t.length?!1:e.every((n,r)=>n.offset===t[r].offset&&n.color===t[r].color)}function xi(e){return qe(e,.5,100)}const s2=512,x0="#18181b",b0="#ffffff",l2="M";function fd(e){return typeof e=="string"&&e.trim().length>0&&e.length<=s2}function dd(e){return e==="L"||e==="M"||e==="Q"||e==="H"}function hd(e){return e==="square"||e==="rounded"||e==="dot"}const a2=1e5,c2=2,u2=4;function pd(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0&&e<=u2}function gd(e){return typeof e=="string"&&e.trim().length>0&&e.length<=a2}const f2=2e4,E0={m:2,l:2,t:2,h:1,v:1,c:6,s:4,q:4,a:7,z:0},yp=/[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/y;function d2(e){return e===" "||e===" "||e===`
|
|
44
44
|
`||e==="\r"||e==="\f"}function h2(e){return e!==void 0&&(e==="."||e==="-"||e==="+"||e>="0"&&e<="9")}function md(e){if(typeof e!="string"||e.length===0||e.length>f2)return null;const t=e.length;let n=0;const r=()=>{for(;n<t&&d2(e[n]);)n+=1},o=()=>(r(),e[n]!==","?!1:(n+=1,r(),!0)),i=()=>{yp.lastIndex=n;const a=yp.exec(e);if(!a)return null;const c=Number(a[0]);return Number.isFinite(c)?(n+=a[0].length,c):null},s=()=>{const a=e[n];return a!=="0"&&a!=="1"?null:(n+=1,a==="1"?1:0)},l=[];if(r(),n>=t)return null;for(;n<t;){const a=e[n],c=a.toLowerCase(),u=E0[c];if(u===void 0||l.length===0&&c!=="m")return null;if(n+=1,r(),u===0){l.push({command:a,values:[]});continue}const d=[];for(;;){for(let p=0;p<u;p+=1){p>0&&o();const k=c==="a"&&(p===3||p===4)?s():i();if(k===null||c==="a"&&p<2&&k<0)return null;d.push(k)}const f=o();if(!h2(e[n])){if(f)return null;break}}l.push({command:a,values:d})}return l}const p2=400,po=new Map;function yd(e){if(typeof e!="string")return!1;const t=po.get(e);if(t!==void 0)return t;const n=md(e)!==null;if(po.size>=p2){const r=po.keys().next().value;r!==void 0&&po.delete(r)}return po.set(e,n),n}function go(e){const t=Math.round(e*1e3)/1e3;return Object.is(t,-0)?"0":String(t)}function g2(e,t,n,r,o){const i=n*Math.PI/180,s=Math.cos(i),l=Math.sin(i),a=r*e*s,c=-r*t*l,u=o*e*l,d=o*t*s,f=(a+d)/2,p=(a-d)/2,w=(u+c)/2,k=(u-c)/2,C=Math.hypot(f,k),m=Math.hypot(p,w),g=(Math.atan2(w,p)+Math.atan2(k,f))/2;return{rx:C+m,ry:Math.abs(C-m),rotation:g*180/Math.PI}}function m2(e,t,n){return Math.sqrt(t/e.width*(n/e.height))}const y2=400,mo=new Map;function w2(e,t,n,r){const o=`${n},${r},${t.x},${t.y},${t.width},${t.height}|${e}`,i=mo.get(o);if(i!==void 0)return i;const s=k2(e,t,n,r);if(mo.size>=y2){const l=mo.keys().next().value;l!==void 0&&mo.delete(l)}return mo.set(o,s),s}function k2(e,t,n,r){const o=md(e);if(!o)return null;const i=n/t.width,s=r/t.height,l=-t.x*i,a=-t.y*s,c=(f,p)=>go(p?f*i:f*i+l),u=(f,p)=>go(p?f*s:f*s+a),d=[];return o.forEach((f,p)=>{const w=f.command.toLowerCase(),k=f.command===w,C=f.values;if(w==="z"){d.push(f.command);return}if(w==="h"){d.push(f.command+C.map(y=>c(y,k)).join(" "));return}if(w==="v"){d.push(f.command+C.map(y=>u(y,k)).join(" "));return}if(w==="a"){const y=[];for(let S=0;S<C.length;S+=7){const x=g2(C[S],C[S+1],C[S+2],i,s);y.push([go(x.rx),go(x.ry),go(x.rotation),String(C[S+3]),String(C[S+4]),c(C[S+5],k),u(C[S+6],k)].join(" "))}d.push(f.command+y.join(" "));return}const m=p===0&&f.command==="m",g=[];for(let y=0;y<C.length;y+=2){const S=m&&y===0;g.push(`${c(C[y],k&&!S)} ${u(C[y+1],k&&!S)}`)}if(m){d.push(`M${g[0]}`),g.length>1&&d.push(`l${g.slice(1).join(" ")}`);return}d.push(f.command+g.join(" "))}),d.join("")}function S2(e,t,n,r,o,i,s,l){let a=Math.abs(t),c=Math.abs(n);if(a===0||c===0||e.x===s.x&&e.y===s.y)return[s];const u=r*Math.PI/180,d=Math.cos(u),f=Math.sin(u),p=(e.x-s.x)/2,w=(e.y-s.y)/2,k=d*p+f*w,C=-f*p+d*w,m=k*k/(a*a)+C*C/(c*c);m>1&&(a*=Math.sqrt(m),c*=Math.sqrt(m));const g=a*a*c*c-a*a*C*C-c*c*k*k,y=a*a*C*C+c*c*k*k,S=(o===i?-1:1)*Math.sqrt(Math.max(0,g/y)),x=S*a*C/c,v=-S*c*k/a,h=d*x-f*v+(e.x+s.x)/2,E=f*x+d*v+(e.y+s.y)/2,T=(I,P,L,G)=>Math.atan2(I*G-P*L,I*L+P*G),b=T(1,0,(k-x)/a,(C-v)/c);let A=T((k-x)/a,(C-v)/c,(-k-x)/a,(-C-v)/c);return!i&&A>0&&(A-=2*Math.PI),i&&A<0&&(A+=2*Math.PI),Array.from({length:l},(I,P)=>{const L=b+A*(P+1)/l;return{x:h+a*Math.cos(L)*d-c*Math.sin(L)*f,y:E+a*Math.cos(L)*f+c*Math.sin(L)*d}})}function PM(e){const t=md(e);if(!t)return null;let n=1/0,r=1/0,o=-1/0,i=-1/0;const s=(p,w)=>{n=Math.min(n,p),r=Math.min(r,w),o=Math.max(o,p),i=Math.max(i,w)},l=16;let a={x:0,y:0},c={x:0,y:0},u=null;const d=(p,w,k)=>{for(let C=1;C<=l;C+=1){const m=C/l,g=1-m;s(g*g*g*a.x+3*g*g*m*p.x+3*g*m*m*w.x+m*m*m*k.x,g*g*g*a.y+3*g*g*m*p.y+3*g*m*m*w.y+m*m*m*k.y)}},f=(p,w)=>{for(let k=1;k<=l;k+=1){const C=k/l,m=1-C;s(m*m*a.x+2*m*C*p.x+C*C*w.x,m*m*a.y+2*m*C*p.y+C*C*w.y)}};for(const{command:p,values:w}of t){const k=p.toLowerCase(),C=p===k,m=(y,S)=>C?{x:a.x+y,y:a.y+S}:{x:y,y:S};if(k==="z"){a=c,u=null;continue}const g=E0[k];for(let y=0;y<w.length;y+=g){const S=w.slice(y,y+g);let x=a,v=null;if(k==="m")x=m(S[0],S[1]),y===0&&(c=x);else if(k==="l")x=m(S[0],S[1]);else if(k==="h")x={x:C?a.x+S[0]:S[0],y:a.y};else if(k==="v")x={x:a.x,y:C?a.y+S[0]:S[0]};else if(k==="c"||k==="s"){const h=k==="c"?m(S[0],S[1]):u!=null&&u.cubic?{x:2*a.x-u.x,y:2*a.y-u.y}:a,E=k==="c"?m(S[2],S[3]):m(S[0],S[1]);x=k==="c"?m(S[4],S[5]):m(S[2],S[3]),d(h,E,x),v={...E,cubic:!0}}else if(k==="q"||k==="t"){const h=k==="q"?m(S[0],S[1]):u&&!u.cubic?{x:2*a.x-u.x,y:2*a.y-u.y}:a;x=k==="q"?m(S[2],S[3]):m(S[0],S[1]),f(h,x),v={...h,cubic:!1}}else if(k==="a"){x=m(S[5],S[6]);for(const h of S2(a,S[0],S[1],S[2],S[3],S[4],x,l))s(h.x,h.y)}s(x.x,x.y),a=x,u=v}}return Number.isFinite(n)?{x:n,y:r,width:o-n,height:i-r}:null}function nt(e){if(!Number.isInteger(e)||e<1||e>dt)throw new RangeError(`scene depth must be an integer from 1 to ${dt}`)}function v0(e,t,n,r){nt(n);for(const o of e){const i=[...r,o.id];t(o,i,n),o.type==="group"&&o.children.length>0&&v0(o.children,t,n+1,i)}}function Ni(e,t,n=1){v0(e,t,n,[])}function x2(e){let t=0;return Ni(e,()=>{t+=1}),t}function Kr(e,t){if(t.length===0||t.length>dt)return;let n=e,r;for(let o=0;o<t.length;o+=1){if(r=n.find(i=>i.id===t[o]),!r)return;if(o===t.length-1)return r;if(r.type!=="group")return;n=r.children}}function ta(e,t){if(t.length===0)return e;const n=Kr(e,t);return(n==null?void 0:n.type)==="group"?n.children:void 0}const A0=new WeakMap;function ue(e){return JSON.stringify(e)}function C0(e,t,n,r,o){nt(r);const i=[...t,e.id],s=n||e.locked;let l=e.locked;if(e.type==="group")for(const a of e.children)l=C0(a,i,s,r+1,o)||l;return o.set(ue(i),{node:e,path:i,effectiveLocked:s,subtreeLocked:l}),l}function Li(e){const t=new Map;for(const n of e)C0(n,[],!1,1,t);return A0.set(t,e),t}function wp(e,t){return t&&A0.get(t)===e?t:Li(e)}function T0(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function on(e,t,n){if(t.length===0){const c=n(e);return c===e?e:[...c]}if(t.length>dt)return e;const[r,...o]=t,i=e.findIndex(c=>c.id===r);if(i<0)return e;const s=e[i];if(s.type!=="group")return e;const l=on(s.children,o,n);if(l===s.children)return e;const a=[...e];return a[i]={...s,children:l},a}function ml(e,t,n){if(t.length===0||t.length>dt)return e;const r=t.slice(0,-1),o=t[t.length-1];return on(e,r,i=>{const s=i.findIndex(c=>c.id===o);if(s<0)return i;const l=n(i[s]);if(l===i[s])return i;const a=[...i];return a[s]=l,a})}function _0(e,t,n,r,o){nt(n);let i=null;for(let s=0;s<e.length;s+=1){const l=e[s],a=[...t,l.id],c=r.get(ue(a));let u=c?c(l):l;if(u.id!==l.id||u.type!==l.type)return null;if(u.type==="group"){const d=_0(u.children,a,n+1,r,o);if(!d)return null;if(d!==u.children&&(u={...u,children:d},o.recenterChangedGroups)){const f=xd(u);if(!f)return null;u=f}}u!==l&&(i??(i=[...e]),i[s]=u)}return i??e}function I0(e,t,n={}){if(t.size===0)return e;try{return _0(e,[],1,t,n)}catch{return null}}function MM(e,t,n,r){const o=Jn(e,t,n);if(!o.ok)return o;if(!Xe(e,{kind:"geometry",paths:o.selectedNodes.map(i=>[...t,i.id])}))return{ok:!1,reason:"locked"};try{const i=a0(e,t),s=i?s0(i):null;if(!i||!s)return{ok:!1,reason:"invalid-transform"};const l=He(s,He(r,i)),a=new Map;for(const d of o.selectedNodes){const f=Wf(d,He(l,sr(d)));if(!f)return{ok:!1,reason:"invalid-transform"};a.set(d.id,f)}const c=on(e,t,d=>d.map(f=>a.get(f.id)??f));if(c===e)return{ok:!1,reason:"invalid-transform"};const u=Ie(c);return u?{ok:!1,reason:u}:{ok:!0,nodes:c,selectionIds:[...n]}}catch{return{ok:!1,reason:"invalid-transform"}}}function b2(e,t,n){const r=new Set(t);if(r.size===0||!e.some(i=>r.has(i.id)))return e;let o;if(n==="front")o=[...e.filter(i=>!r.has(i.id)),...e.filter(i=>r.has(i.id))];else if(n==="back")o=[...e.filter(i=>r.has(i.id)),...e.filter(i=>!r.has(i.id))];else if(o=[...e],n==="forward")for(let i=o.length-2;i>=0;i-=1)r.has(o[i].id)&&!r.has(o[i+1].id)&&([o[i],o[i+1]]=[o[i+1],o[i]]);else for(let i=1;i<o.length;i+=1)r.has(o[i].id)&&!r.has(o[i-1].id)&&([o[i-1],o[i]]=[o[i],o[i-1]]);return T0(e,o)?e:o}function E2(e,t,n,r){return n.length===0?e:on(e,t,o=>b2(o,n,r))}function v2(e,t,n,r){if(n.length===0||typeof r!="string"||r.length===0)return e;const o=new Set(n);return o.size!==n.length||o.has(r)?e:on(e,t,i=>{const s=i.filter(u=>o.has(u.id));if(s.length!==o.size)return i;const l=i.filter(u=>!o.has(u.id)),a=l.findIndex(u=>u.id===r);if(a<0)return i;const c=[...l.slice(0,a+1),...s,...l.slice(a+1)];return T0(i,c)?i:c})}function na(e){return e.type==="radial-gradient"?{type:"radial-gradient",stops:e.stops.map(t=>({...t}))}:"stops"in e?{type:"linear-gradient",stops:e.stops.map(t=>({...t})),angle:e.angle}:{...e}}function Ft(e){return{...e,...e.shadow?{shadow:{...e.shadow}}:{},...e.filter?{filter:{...e.filter}}:{}}}function P0(e){return{...Ft(e),...e.spans?{spans:e.spans.map(t=>({...t}))}:{},...e.effect?{effect:{...e.effect}}:{}}}function A2(e){return na(e)}function M0(e){return Ft({...e,viewBox:{...e.viewBox},fill:e.fill.type==="transparent"?{type:"transparent"}:e.fill.type==="image"?wd(e.fill):na(e.fill)})}function wd(e){return e.type==="transparent"?{type:"transparent"}:e.type==="image"?{type:"image",src:e.src,fit:e.fit,framing:ht(e.framing)}:A2(e)}function R0(e,t,n){nt(n);const r=t();return e.type==="group"?{...e,id:r,children:e.children.map(o=>R0(o,t,n+1))}:e.type==="text"?P0({...e,id:r,textFill:na(e.textFill)}):e.type==="shape"?Ft({...e,id:r,fill:wd(e.fill)}):e.type==="image"?Ft({...e,id:r,framing:ht(e.framing)}):e.type==="line"&&e.points?Ft({...e,id:r,points:e.points.map(o=>({...o}))}):e.type==="path"?M0({...e,id:r}):Ft({...e,id:r})}function Fi(e,t){return nt(t),e.type==="group"?{id:e.id,name:e.name,locked:e.locked,hidden:e.hidden,type:"group",x:e.x,y:e.y,rotation:e.rotation,scale:e.scale,children:e.children.map(n=>Fi(n,t+1))}:e.type==="text"?P0({...e,textFill:na(e.textFill)}):e.type==="image"?Ft({...e,framing:ht(e.framing)}):e.type==="shape"?Ft({...e,fill:wd(e.fill)}):e.type==="line"&&e.points?Ft({...e,points:e.points.map(n=>({...n}))}):e.type==="path"?M0(e):Ft({...e})}function N0(e){return e.map(t=>Fi(t,1))}function L0(e,t,n){if(!t||typeof t!="object"||t.id!==e.id||t.type!==e.type)throw new TypeError("scene leaf mapper must preserve leaf id and type");const r=Fi(t,n);if(r.type==="group")throw new TypeError("scene leaf mapper must preserve leaf id and type");return r}function F0(e,t,n,r){nt(n);const o=[...r,e.id];if(e.type==="group")return{id:e.id,name:e.name,locked:e.locked,hidden:e.hidden,type:"group",x:e.x,y:e.y,rotation:e.rotation,scale:e.scale,children:e.children.map(s=>F0(s,t,n+1,o))};const i=Fi(e,n);if(i.type==="group")throw new TypeError("expected a scene leaf");return L0(e,t(i,o,n),n)}async function $0(e,t,n,r){nt(n);const o=[...r,e.id];if(e.type==="group")return{id:e.id,name:e.name,locked:e.locked,hidden:e.hidden,type:"group",x:e.x,y:e.y,rotation:e.rotation,scale:e.scale,children:await Promise.all(e.children.map(s=>$0(s,t,n+1,o)))};const i=Fi(e,n);if(i.type==="group")throw new TypeError("expected a scene leaf");return L0(e,await t(i,o,n),n)}function C2(e,t){return nt(1),e.map(n=>F0(n,t,1,[]))}async function T2(e,t){return nt(1),Promise.all(e.map(n=>$0(n,t,1,[])))}function O0(e,t=()=>me()){return e.map(n=>R0(n,t,1))}function Jn(e,t,n){if(n.length===0)return{ok:!1,reason:"empty-selection"};const r=ta(e,t);if(!r)return{ok:!1,reason:"unknown-path"};const o=new Set(n);if(o.size!==n.length)return{ok:!1,reason:"invalid-selection"};const i=[],s=[];return r.forEach((l,a)=>{o.has(l.id)&&(i.push(l),s.push(a))}),i.length!==o.size?{ok:!1,reason:"invalid-selection"}:{ok:!0,children:r,selectedNodes:i,selectedIndices:s}}function z0(e,t){if(t.length===0||t.length>dt)return null;const n=[];let r=e;for(let o=0;o<t.length;o+=1){const i=r.find(s=>s.id===t[o]);if(!i)return null;if(n.push(i),o<t.length-1){if(i.type!=="group")return null;r=i.children}}return n}function kd(e,t){if(t.length===0)return!1;const n=z0(e,t);return!n||n[n.length-1].type!=="group"?null:n.some(r=>r.locked)}function _2(e,t){if(t.length===0)return!1;const n=z0(e,t);return!n||n[n.length-1].type!=="group"?null:n.some(r=>r.hidden)}function Xe(e,t,n){if(t.kind==="insert"){if(t.parentPath.length===0)return!0;let o;try{o=wp(e,n)}catch{return!1}const i=o.get(ue(t.parentPath));return!!(i&&i.node.type==="group"&&!i.effectiveLocked)}if(t.paths.length===0)return!1;let r;try{r=wp(e,n)}catch{return!1}for(const o of t.paths){const i=r.get(ue(o));if(!i)return!1;if(t.kind!=="metadata"&&(i.effectiveLocked||(t.kind==="geometry"||t.kind==="structure")&&i.subtreeLocked))return!1}return!0}const I2=new Set(["type","color"]),P2=new Set(["type","from","to","angle"]),M2=new Set(["type","stops","angle"]),R2=new Set(["type","stops"]),D0=new Set(["type"]),N2=new Set(["type","src","fit","framing"]),L2=new Set(["id","name","locked","hidden","type","x","y","rotation","scale","children"]),F2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","text","fontSize","fontFamily","textFill","align","fontWeight"]),$2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","src","alt","fit","framing"]),O2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","shape","fill","stroke","strokeWidth"]),z2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","lineKind","stroke","strokeWidth"]),D2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","d","viewBox","fill","stroke","strokeWidth"]),j2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","payload","dark","light"]),W2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","chartKind","labels","series"]),B2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","rows","cols","cells"]),H2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","items"]),U2=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","progressKind","value"]);function gn(e,t){const n=Object.keys(e);return n.length===t.size&&n.every(r=>t.has(r))}function Ct(e,t,n){const r=Object.keys(e),o=r.filter(i=>i in n);return r.length!==t.size+o.length||!r.every(i=>t.has(i)||i in n)?!1:o.every(i=>n[i](e))}const Wt=e=>Yf(e.opacity),Bt=e=>Zl(e.shadow)!==null,Ht=e=>Jl(e.filter,!0)!==null,Ut=e=>Zf(e.blendMode),K2={spans:e=>{const t=Uf(e.spans,String(e.text).length);return t!==null&&t.length>0},lineHeight:e=>Vf(e.lineHeight),letterSpacing:e=>Gf(e.letterSpacing),italic:e=>e.italic===!0,vertical:e=>e.vertical===!0,opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut,stroke:e=>F(e.stroke),strokeWidth:e=>xi(e.strokeWidth),effect:e=>Kf(e.effect),verticalAlign:e=>Qf(e.verticalAlign),paragraphSpacing:e=>Xf(e.paragraphSpacing),list:e=>qf(e.list)},Y2={cornerRadius:e=>Ee(e.cornerRadius),strokeDash:e=>Ur(e.strokeDash),cornerRadii:e=>nE(e.cornerRadii),flipX:e=>typeof e.flipX=="boolean",flipY:e=>typeof e.flipY=="boolean",starInnerRatio:e=>cd(e.starInnerRatio),bubbleTailX:e=>ud(e.bubbleTailX),opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut},V2={opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut},G2={...V2,cornerRadius:e=>Ee(e.cornerRadius),flipX:e=>typeof e.flipX=="boolean",flipY:e=>typeof e.flipY=="boolean",stroke:e=>F(e.stroke),strokeWidth:e=>xi(e.strokeWidth)},X2={opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut,dash:e=>Ur(e.dash),cap:e=>ki(e.cap),startCap:e=>Si(e.startCap),endCap:e=>Si(e.endCap),points:e=>ea(e.points,e.width,e.height)!==null},Q2={showValues:e=>e.showValues===!0,showLegend:e=>typeof e.showLegend=="boolean",showTicks:e=>typeof e.showTicks=="boolean",barMode:e=>bf(e.barMode),ink:e=>F(e.ink),opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut},q2={headerRow:e=>typeof e.headerRow=="boolean",striped:e=>typeof e.striped=="boolean",ink:e=>F(e.ink),headerFill:e=>F(e.headerFill),stripeFill:e=>F(e.stripeFill),colWidths:e=>Array.isArray(e.colWidths)&&e.colWidths.every(t=>typeof t=="number"&&Number.isFinite(t)&&t>0),grid:e=>Mf(e.grid),lineColor:e=>F(e.lineColor),lineWidth:e=>Rf(e.lineWidth),fontSize:e=>Nf(e.fontSize),opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut},Z2={accent:e=>F(e.accent),horizontal:e=>e.horizontal===!0,ink:e=>F(e.ink),opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut},J2={label:e=>Ql(e.label),trackFill:e=>F(e.trackFill),accent:e=>F(e.accent),ink:e=>F(e.ink),opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut},eE={ecl:e=>dd(e.ecl),quietZone:e=>pd(e.quietZone),moduleStyle:e=>hd(e.moduleStyle),logoSrc:e=>gd(e.logoSrc),opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut},tE={opacity:Wt,shadow:Bt,filter:Ht,blendMode:Ut,flipX:e=>typeof e.flipX=="boolean",flipY:e=>typeof e.flipY=="boolean",dash:e=>nd(e.dash),cap:e=>ki(e.cap),join:e=>Jf(e.join),fillRule:e=>ed(e.fillRule)};function nE(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e,n=Object.keys(t);return n.length!==4||!["topLeft","topRight","bottomRight","bottomLeft"].every(r=>n.includes(r))?!1:Ee(t.topLeft)&&Ee(t.topRight)&&Ee(t.bottomRight)&&Ee(t.bottomLeft)}function no(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return t.type==="solid"?gn(t,I2)&&F(t.color):t.type==="radial-gradient"?gn(t,R2)&&gl(t.stops)!==null:t.type==="linear-gradient"&&gn(t,M2)?gl(t.stops)!==null&&typeof t.angle=="number"&&Number.isFinite(t.angle):t.type==="linear-gradient"&&gn(t,P2)&&F(t.from)&&F(t.to)&&typeof t.angle=="number"&&Number.isFinite(t.angle)}function j0(e){if(no(e))return!0;if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return t.type==="transparent"?gn(t,D0):t.type==="image"?ra(e):!1}function ra(e){if(no(e))return!0;if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e;return t.type==="transparent"?gn(t,D0):t.type==="image"&&gn(t,N2)&&typeof t.src=="string"&&(t.fit==="cover"||t.fit==="contain")&&vt(t.framing)}function rE(e){const t=e;return e.type==="group"?gn(t,L2)&&Array.isArray(e.children):e.type==="text"?Ct(t,F2,K2)&&typeof e.text=="string"&&Number.isFinite(e.fontSize)&&typeof e.fontFamily=="string"&&no(e.textFill)&&(e.align==="left"||e.align==="center"||e.align==="right"||e.align==="justify")&&(e.fontWeight==="normal"||e.fontWeight==="bold"):e.type==="image"?Ct(t,$2,G2)&&typeof e.src=="string"&&typeof e.alt=="string"&&(e.fit==="cover"||e.fit==="contain")&&vt(e.framing):e.type==="shape"?Ct(t,O2,Y2)&&od(e.shape)&&ra(e.fill)&&typeof e.stroke=="string"&&Number.isFinite(e.strokeWidth):e.type==="line"?Ct(t,z2,X2)&&(e.lineKind==="line"||e.lineKind==="arrow")&&typeof e.stroke=="string"&&Number.isFinite(e.strokeWidth):e.type==="path"?Ct(t,D2,tE)&&yd(e.d)&&rd(e.viewBox)!==null&&j0(e.fill)&&F(e.stroke)&&td(e.strokeWidth):e.type==="qrcode"?Ct(t,j2,eE)&&fd(e.payload)&&F(e.dark)&&F(e.light):e.type==="chart"?Ct(t,W2,Q2)&&hi(e.chartKind)&&e.labels.length>0&&e.labels.length<=Br&&e.labels.every(to)&&vf(e.series,e.labels.length):e.type==="table"?Ct(t,B2,q2)&&If(e.rows)&&Pf(e.cols)&&jy(e.cells,e.rows,e.cols)&&(e.colWidths===void 0||Lf(e.colWidths,e.cols)):e.type==="timeline"?Ct(t,H2,Z2)&&Ff(e.items):e.type==="progress"?Ct(t,U2,J2)&&Tf(e.progressKind)&&Cf(e.value):!1}function W0(e,t,n,r,o){if(t>dt)return"depth-limit";for(const i of e){if(typeof i.id!="string"||i.id.trim().length===0||o.ids.has(i.id))return"duplicate-id";if(typeof i.name!="string"||typeof i.locked!="boolean"||typeof i.hidden!="boolean"||!rE(i))return"invalid-node";if(o.ids.add(i.id),o.count+=1,o.count>Ii)return"node-limit";if(!Number.isFinite(i.x)||!Number.isFinite(i.y)||!Number.isFinite(i.rotation)||!Number.isFinite(i.scale)||i.scale<=0)return"invalid-transform";const s=r*i.scale;if(!Number.isFinite(s)||s<Ty||s>_y)return"invalid-transform";let l;try{l=He(n,sr(i))}catch{return"invalid-transform"}if(i.type==="group"){if(i.children.length===0)return"invalid-transform";const a=W0(i.children,t+1,l,s,o);if(a)return a}else if(!Number.isFinite(i.width)||!Number.isFinite(i.height)||i.width<=0||i.height<=0)return"invalid-transform"}return null}function Ie(e){try{return W0(e,1,yi(),1,{ids:new Set,count:0})}catch{return"invalid-transform"}}function eu(e){const t=new Set;return Ni(e,n=>t.add(n.id)),t}function Os(e){return x2(e)}function B0(e){let t=0;const n=[{node:e,depth:1}];for(;n.length>0;){const r=n.pop();if(nt(r.depth),t=Math.max(t,r.depth),r.node.type==="group")for(const o of r.node.children)n.push({node:o,depth:r.depth+1})}return t}function Sd(e,t,n){return Wf(e,He(t,sr(e)),n)}function H0(e){const t=ql(e.x,e.y,e.rotation,e.scale),n=[];for(const r of e.children){const o=Sd(r,t,e.scale*r.scale);if(!o)return null;n.push(e.hidden&&!o.hidden?{...o,hidden:!0}:o)}return n}function oE(e){const t=[],n=(o,i,s,l,a)=>{nt(a);const c=He(i,sr(o)),u=s*o.scale,d=l||o.hidden;if(o.type==="group")return o.children.every(p=>n(p,c,u,d,a+1));const f=Wf(o,c,u);return f?(t.push(d&&!f.hidden?{...f,hidden:!0}:f),!0):!1},r=ql(e.x,e.y,e.rotation,e.scale);for(const o of e.children)if(!n(o,r,e.scale,e.hidden,2))return null;return t}function iE(e,t,n,r={}){if(n.length===0)return{ok:!1,reason:"empty-selection"};const o=Jn(e,t,n);if(!o.ok)return o;if(o.selectedNodes.length<2)return{ok:!1,reason:"requires-two"};const i=kd(e,t);if(i===null)return{ok:!1,reason:"unknown-path"};if(i)return{ok:!1,reason:"locked-parent"};const s=_2(e,t);if(s===null)return{ok:!1,reason:"unknown-path"};if(s)return{ok:!1,reason:"hidden"};if(!Xe(e,{kind:"structure",paths:o.selectedNodes.map(u=>[...t,u.id])}))return{ok:!1,reason:"locked"};if(o.selectedNodes.some(u=>u.hidden))return{ok:!1,reason:"hidden"};const l=Ie(e);if(l)return{ok:!1,reason:l};if(Os(e)>=Ii)return{ok:!1,reason:"node-limit"};const a=Math.max(...o.selectedNodes.map(B0));if(t.length+1+a>dt)return{ok:!1,reason:"depth-limit"};const c=r.id??me();if(typeof c!="string"||c.trim().length===0||eu(e).has(c))return{ok:!1,reason:"duplicate-id"};try{const u=c0(o.selectedNodes);if(!u)return{ok:!1,reason:"invalid-transform"};const d={x:u.x+u.width/2,y:u.y+u.height/2};if(!Number.isFinite(d.x)||!Number.isFinite(d.y))return{ok:!1,reason:"invalid-transform"};const f=wi(-d.x,-d.y),p=[];for(const v of o.selectedNodes){const h=Sd(v,f,v.scale);if(!h)return{ok:!1,reason:"invalid-transform"};p.push(h)}const w={id:c,name:r.name??"组",locked:!1,hidden:!1,type:"group",x:d.x,y:d.y,rotation:0,scale:1,children:p},k=new Set(n),C=Math.max(...o.selectedIndices),m=o.children.slice(0,C).filter(v=>!k.has(v.id)).length,g=o.children.filter(v=>!k.has(v.id)),y=[...g.slice(0,m),w,...g.slice(m)],S=on(e,t,()=>y),x=Ie(S);return x?{ok:!1,reason:x}:{ok:!0,nodes:S,selectionIds:[c]}}catch{return{ok:!1,reason:"invalid-transform"}}}function sE(e,t,n,r){const o=Jn(e,t,n);if(!o.ok)return o;if(o.selectedNodes.some(s=>s.type!=="group"))return{ok:!1,reason:"not-group"};if(!Xe(e,{kind:"structure",paths:o.selectedNodes.map(s=>[...t,s.id])}))return{ok:!1,reason:"locked"};if(kd(e,t))return{ok:!1,reason:"locked-parent"};const i=Ie(e);if(i)return{ok:!1,reason:i};try{const s=new Set(n),l=[],a=[];for(const d of o.children){if(!s.has(d.id)){l.push(d);continue}if(d.type!=="group")return{ok:!1,reason:"not-group"};const f=r==="all-level"?oE(d):H0(d);if(!f)return{ok:!1,reason:"invalid-transform"};l.push(...f),a.push(...f.map(p=>p.id))}const c=on(e,t,()=>l),u=Ie(c);return u?{ok:!1,reason:u}:{ok:!0,nodes:c,selectionIds:a}}catch{return{ok:!1,reason:"invalid-transform"}}}function U0(e,t=1){if(nt(t),e.children.length===0)return[];if(e.children.length>1)return[e];const n=H0(e);if(!n)return null;const r=n[0];return r.type!=="group"||r.children.length>1?n:U0(r,t+1)}function K0(e,t,n,r=1){if(nt(r),t.length===0){const u=e.filter(d=>!n.has(d.id));return{nodes:u,changed:u.length!==e.length,error:null}}const[o,...i]=t,s=e.findIndex(u=>u.id===o);if(s<0||e[s].type!=="group")return{nodes:e,changed:!1,error:"unknown-path"};const l=e[s],a=K0(l.children,i,n,r+1);if(a.error||!a.changed)return{nodes:e,changed:!1,error:a.error};let c;if(a.nodes.length<=1){const u=U0({...l,children:a.nodes});if(!u)return{nodes:e,changed:!1,error:"invalid-transform"};c=u}else c=[{...l,children:a.nodes}];return{nodes:[...e.slice(0,s),...c,...e.slice(s+1)],changed:!0,error:null}}function kp(e,t,n){const r=Jn(e,t,n);if(!r.ok)return r;if(!Xe(e,{kind:"structure",paths:r.selectedNodes.map(o=>[...t,o.id])}))return{ok:!1,reason:"locked"};if(kd(e,t))return{ok:!1,reason:"locked-parent"};try{const o=K0(e,t,new Set(n));if(o.error)return{ok:!1,reason:o.error};if(!o.changed)return{ok:!1,reason:"invalid-selection"};let i=o.nodes,s=[];for(let a=t.length;a>=1;a-=1){const c=t.slice(0,a),u=Kr(i,c);if((u==null?void 0:u.type)==="group"){s=c;break}}if(s.length>0){const a=Y0(i,s);if(!a.ok)return a;i=a.nodes}const l=Ie(i);return l?{ok:!1,reason:l}:{ok:!0,nodes:i,selectionIds:[]}}catch{return{ok:!1,reason:"invalid-transform"}}}function xd(e){const t=c0(e.children);if(!t)return null;const n={x:t.x+t.width/2,y:t.y+t.height/2};if(!Number.isFinite(n.x)||!Number.isFinite(n.y))return null;if(Math.abs(n.x)<=Cn&&Math.abs(n.y)<=Cn)return e;const r=wi(-n.x,-n.y),o=[];for(const a of e.children){const c=Sd(a,r,a.scale);if(!c)return null;o.push(c)}const i=l0(ql(0,0,e.rotation,e.scale),n),s=e.x+i.x,l=e.y+i.y;return!Number.isFinite(s)||!Number.isFinite(l)?null:{...e,x:s,y:l,children:o}}function Y0(e,t){if(t.length===0)return{ok:!0,nodes:e,selectionIds:[]};let n=!1;const r=ml(e,t,o=>{if(o.type!=="group")return n=!0,o;const i=xd(o);return i||(n=!0,o)});return n?{ok:!1,reason:"invalid-transform"}:lE(r,t)}function lE(e,t){if(!Kr(e,t))return{ok:!1,reason:"unknown-path"};let n=e;try{for(let o=t.length-1;o>=1;o-=1){const i=t.slice(0,o);let s=!1;if(n=ml(n,i,l=>{if(l.type!=="group")return s=!0,l;const a=xd(l);return a||(s=!0,l)}),s)return{ok:!1,reason:"invalid-transform"}}const r=Ie(n);return r?{ok:!1,reason:r}:{ok:!0,nodes:n,selectionIds:[t[t.length-1]]}}catch{return{ok:!1,reason:"invalid-transform"}}}function tu(e,t,n,r){if(n.length===0)return{ok:!1,reason:"empty-selection"};const o=ta(e,t);if(!o)return{ok:!1,reason:"unknown-path"};if(!Xe(e,{kind:"insert",parentPath:t}))return{ok:!1,reason:"locked-parent"};const i=r??o.length;if(!Number.isInteger(i)||i<0||i>o.length)return{ok:!1,reason:"boundary"};if(Os(e)+Os(n)>Ii)return{ok:!1,reason:"node-limit"};if(n.some(w=>t.length+B0(w)>dt))return{ok:!1,reason:"depth-limit"};const s=eu(e),l=eu(n);if(l.size!==Os(n)||[...l].some(w=>s.has(w)||w.trim().length===0))return{ok:!1,reason:"duplicate-id"};const a=on(e,t,w=>[...w.slice(0,i),...n,...w.slice(i)]),c=Ie(a);if(c)return{ok:!1,reason:c};const u=N0(n),d=on(e,t,w=>[...w.slice(0,i),...u,...w.slice(i)]),f=Y0(d,t);if(!f.ok)return f;const p=Ie(f.nodes);return p?{ok:!1,reason:p}:{ok:!0,nodes:f.nodes,selectionIds:u.map(w=>w.id)}}function aE(e,t,n,r){const o=Jn(e,t,n);if(!o.ok)return o;if(!Xe(e,{kind:"structure",paths:o.selectedNodes.map(i=>[...t,i.id])}))return{ok:!1,reason:"locked"};try{const i=O0(o.selectedNodes,r),s=Math.max(...o.selectedIndices);return tu(e,t,i,s+1)}catch{return{ok:!1,reason:"invalid-transform"}}}function V0(e,t){return e.length<=t.length&&e.every((n,r)=>n===t[r])}function cE(e,t){if(t.length===0)return{locked:!1,hidden:!1};let n=e,r=!1,o=!1;for(let i=0;i<t.length;i+=1){const s=n.find(l=>l.id===t[i]);if(!s)return null;if(r||(r=s.locked),o||(o=s.hidden),i<t.length-1){if(s.type!=="group")return null;n=s.children}}return{locked:r,hidden:o}}function RM(e,t){var r;if(t.length===0)return null;let n;try{n=Li(e)}catch{return null}for(const o of t){if(o.length===0)continue;const i=n.get(ue(o));if(i!=null&&i.effectiveLocked)for(let s=o.length;s>0;s-=1){const l=o.slice(0,s);if((r=n.get(ue(l)))!=null&&r.node.locked)return l}}return null}function NM(e,t){if(t.length===0)return null;let n;try{n=Li(e)}catch{return null}for(const r of t){if(r.length===0)continue;const o=n.get(ue(r));if(!o||o.effectiveLocked||!o.subtreeLocked)continue;const i=ta(e,r);if(!i)continue;const s=i.map(l=>({node:l,path:[...r,l.id]})).reverse();for(;s.length>0;){const l=s.pop();if(l.node.locked)return l.path;if(l.node.type==="group")for(let a=l.node.children.length-1;a>=0;a-=1){const c=l.node.children[a];s.push({node:c,path:[...l.path,c.id]})}}}return null}function uE(e,t,n){if(n.length<=t.length||!V0(t,n)||ta(e,t)===void 0||!Kr(e,n))return null;const r=n.slice(0,t.length+1);return Kr(e,r)?r:null}function fE(e){const t=[];return e.forEach((n,r)=>{if(n.length===0)return;e.some((i,s)=>i.length===0||!V0(i,n)?!1:i.length<n.length||s<r)||t.push([...n])}),t}function dE(e,t,n){const r=[];for(const o of n){const i=uE(e,t,o);i&&r.push(i)}return fE(r)}function hE(e,t){var n;for(let r=t.length;r>0;r-=1){const o=t.slice(0,r);if(((n=Kr(e,o))==null?void 0:n.type)==="group")return o}return[]}function LM(e,t,n){const r=t.identity.draftId===null&&n.draftId!==null;if(t.identity.activeSlideId!==n.activeSlideId||t.identity.draftId!==n.draftId&&!r||t.identity.userId!==n.userId)return{activeGroupPath:[],selectionPaths:[],identity:{...n}};const i=hE(e,t.activeGroupPath),s=dE(e,i,t.selectionPaths),l=ue(i)===ue(t.activeGroupPath),a=s.length===t.selectionPaths.length&&s.every((c,u)=>ue(c)===ue(t.selectionPaths[u]));return l&&a&&!r?t:{activeGroupPath:[...i],selectionPaths:s.map(c=>[...c]),identity:{...n}}}const pE=64,gE=new Set(["id","axis","position"]);function mE(e){return e==="x"||e==="y"}function yE(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function bd(e,t,n){if(e===void 0)return[];if(!Array.isArray(e)||e.length>pE)return null;const r=[],o=new Set;for(const i of e){if(!yE(i)||!("id"in i&&"axis"in i&&"position"in i)||Object.keys(i).length!==gE.size||typeof i.id!="string"||i.id.trim().length===0||!mE(i.axis)||typeof i.position!="number"||!Number.isFinite(i.position)||o.has(i.id))return null;o.add(i.id);const s=i.axis==="x"?t:n;if(i.position<0||i.position>s)return null;r.push({id:i.id,axis:i.axis,position:i.position})}return r}function G0(e){return e.map(t=>({...t}))}function wE(e,t){return e.length===t.length&&e.every((n,r)=>{const o=t[r];return n.id===o.id&&n.axis===o.axis&&n.position===o.position})}const X0=[{id:"paper",name:"纸墨",background:"#f6f3ea",text:"#1c1b19",accents:["#d94836","#2f5d50"]},{id:"sea-salt",name:"海盐",background:"#edf4f7",text:"#102a43",accents:["#1f7a8c","#e09f1f"]},{id:"pine",name:"松林",background:"#eef2e6",text:"#1f2a1d",accents:["#3a6b35","#c98b2b"]},{id:"berry",name:"莓果",background:"#fdf1f3",text:"#3a1d2b",accents:["#d6336c","#7048e8"]},{id:"latte",name:"奶咖",background:"#f8f1e7",text:"#3b2a20",accents:["#b8642e","#6b8f71"]},{id:"mono",name:"黑白",background:"#ffffff",text:"#111111",accents:["#111111","#8a8a8a"]},{id:"night-flight",name:"夜航",background:"#0f172a",text:"#e5e9f0",accents:["#f5b942","#4cc9f0"]},{id:"neon",name:"霓虹",background:"#0a0e1a",text:"#eef6ff",accents:["#22d3ee","#e879f9"]},{id:"charcoal",name:"墨黑",background:"#161616",text:"#f4f1ea",accents:["#ff6b35","#ffd23f"]},{id:"blueprint",name:"蓝图",background:"#10325a",text:"#f2f6fb",accents:["#7cc6fe","#ffd166"]}],Q0=[{id:"modern-sans",name:"现代黑体",heading:"'Noto Sans SC', sans-serif",body:"'Noto Sans SC', sans-serif"},{id:"editorial",name:"杂志宋体",heading:"'Noto Serif SC', serif",body:"'Noto Sans SC', sans-serif"},{id:"book",name:"书卷宋体",heading:"'Noto Serif SC', serif",body:"'Noto Serif SC', serif"},{id:"handwritten",name:"手写文楷",heading:"'LXGW WenKai TC', cursive",body:"'LXGW WenKai TC', cursive"},{id:"poster",name:"海报小薇",heading:"'ZCOOL XiaoWei', serif",body:"'Noto Sans SC', sans-serif"},{id:"system",name:"系统苹方",heading:"PingFang SC",body:"PingFang SC"}],FM=[{id:"magazine",name:"杂志",palette:"paper",fontSet:"editorial"},{id:"fresh",name:"清新",palette:"sea-salt",fontSet:"modern-sans"},{id:"forest",name:"森系",palette:"pine",fontSet:"book"},{id:"sweet",name:"甜美",palette:"berry",fontSet:"handwritten"},{id:"literary",name:"文艺",palette:"latte",fontSet:"book"},{id:"minimal",name:"极简",palette:"mono",fontSet:"system"},{id:"midnight",name:"夜读",palette:"night-flight",fontSet:"editorial"},{id:"neon-night",name:"霓虹夜",palette:"neon",fontSet:"poster"}],kE=1.4,SE=200,xE=.08,bE=.3;function zs(e){const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function EE(e){const t=e<=.0031308?e*12.92:1.055*e**.4166666666666667-.055;return Math.round(Math.min(1,Math.max(0,t))*255)}function mn(e){const t=zs(Number.parseInt(e.slice(1,3),16)),n=zs(Number.parseInt(e.slice(3,5),16)),r=zs(Number.parseInt(e.slice(5,7),16)),o=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),i=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),s=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r);return{l:.2104542553*o+.793617785*i-.0040720468*s,a:1.9779984951*o-2.428592205*i+.4505937099*s,b:.0259040371*o+.7827717662*i-.808675766*s}}function nu({l:e,a:t,b:n}){const r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,i=(e-.0894841775*t-1.291485548*n)**3;return`#${[4.0767416621*r-3.3077115913*o+.2309699292*i,-1.2684380046*r+2.6097574011*o-.3413193965*i,-.0041960863*r-.7034186147*o+1.707614701*i].map(l=>EE(l).toString(16).padStart(2,"0")).join("")}`}function vE(e,t,n){const r=mn(e),o=mn(t);return nu({l:r.l+(o.l-r.l)*n,a:r.a+(o.a-r.a)*n,b:r.b+(o.b-r.b)*n})}function AE(e){const{a:t,b:n}=mn(e);return Math.hypot(t,n)}function ru(e,t){if(e.type==="solid"){const o=t(e.color);return o===e.color?e:{...e,color:o}}if("stops"in e){const o=e.stops.map(i=>{const s=t(i.color);return s===i.color?i:{...i,color:s}});return o.every((i,s)=>i===e.stops[s])?e:{...e,stops:o}}const n=t(e.from),r=t(e.to);return n===e.from&&r===e.to?e:{...e,from:n,to:r}}function q0(e,t){if(e.type==="transparent"||e.type==="image")return e;if(e.type==="pattern"){const r=t(e.color);return r===e.color?e:{...e,color:r}}const n=ru(e,t);return n===e?e:n}function Tt(e,t){if(!e)return e;const n=t(e.color);return n===e.color?e:{...e,color:n}}function CE(e,t){if(!e||!("color"in e))return e;const n=t(e.color),r=e.type==="glitch"?t(e.color2):void 0;return n===e.color&&(e.type!=="glitch"||r===e.color2)?e:e.type==="glitch"?{...e,color:n,color2:r}:{...e,color:n}}function it(e,t){const n=Object.keys(t).filter(o=>t[o]!==void 0);if(n.every(o=>t[o]===e[o]))return e;const r={...e};for(const o of n)r[o]=t[o];return r}function Z0(e,t){var n;switch(e.type){case"group":{const r=e.children.map(o=>Z0(o,t));return r.every((o,i)=>o===e.children[i])?e:{...e,children:r}}case"text":{const r=(n=e.spans)==null?void 0:n.map(o=>{const i=o.color===void 0?void 0:t(o.color),s=o.highlight===void 0?void 0:t(o.highlight);return i===o.color&&s===o.highlight?o:{...o,...i?{color:i}:{},...s?{highlight:s}:{}}});return it(e,{textFill:ru(e.textFill,t),shadow:Tt(e.shadow,t),effect:CE(e.effect,t),...e.stroke!==void 0?{stroke:t(e.stroke)}:{},...r&&r.some((o,i)=>o!==e.spans[i])?{spans:r}:{}})}case"shape":return it(e,{fill:q0(e.fill,t),stroke:t(e.stroke),shadow:Tt(e.shadow,t)});case"line":return it(e,{stroke:t(e.stroke),shadow:Tt(e.shadow,t)});case"path":return it(e,{fill:e.fill.type==="transparent"||e.fill.type==="image"?e.fill:ru(e.fill,t),stroke:t(e.stroke),shadow:Tt(e.shadow,t)});case"image":return it(e,{shadow:Tt(e.shadow,t)});case"qrcode":return it(e,{dark:t(e.dark),shadow:Tt(e.shadow,t)});case"chart":return it(e,{series:e.series.map(r=>({...r,color:t(r.color)})),...e.ink!==void 0?{ink:t(e.ink)}:{},shadow:Tt(e.shadow,t)});case"table":return it(e,{...e.ink!==void 0?{ink:t(e.ink)}:{},...e.headerFill!==void 0?{headerFill:t(e.headerFill)}:{},...e.stripeFill!==void 0?{stripeFill:t(e.stripeFill)}:{},...e.lineColor!==void 0?{lineColor:t(e.lineColor)}:{},shadow:Tt(e.shadow,t)});case"timeline":return it(e,{...e.accent!==void 0?{accent:t(e.accent)}:{},...e.ink!==void 0?{ink:t(e.ink)}:{},shadow:Tt(e.shadow,t)});case"progress":return it(e,{...e.accent!==void 0?{accent:t(e.accent)}:{},...e.trackFill!==void 0?{trackFill:t(e.trackFill)}:{},...e.ink!==void 0?{ink:t(e.ink)}:{},shadow:Tt(e.shadow,t)})}}function TE(e,t){const n=e.slides.map(r=>{const o=r.nodes.map(i=>Z0(i,t));return it(r,{background:q0(r.background,t),...o.some((i,s)=>i!==r.nodes[s])?{nodes:o}:{}})});return n.some((r,o)=>r!==e.slides[o])?{...e,slides:n}:e}function J0(e,t,n){if(e.type==="group"){const r=e.children.map(o=>J0(o,t,n*e.scale));return r.every((o,i)=>o===e.children[i])?e:{...e,children:r}}return e.type!=="text"?e:it(e,{fontFamily:t(e.fontFamily,e.fontSize*n*e.scale)})}function _E(e,t){const n=e.slides.map(r=>{const o=r.nodes.map(i=>J0(i,t,1));return o.every((i,s)=>i===r.nodes[s])?r:{...r,nodes:o}});return n.some((r,o)=>r!==e.slides[o])?{...e,slides:n}:e}function ls(e){return e.type==="transparent"||e.type==="image"?[]:e.type==="solid"?[e.color]:e.type==="pattern"?[e.color,e.patternColor]:"stops"in e?e.stops.map(t=>t.color):[e.from,e.to]}function IE(e,t){for(const n of e.slides){const r=n.width*n.height,o=(s,l,a)=>{for(const c of s)t(c.toLowerCase(),l,a/s.length,n)};o(ls(n.background),"background",r);const i=(s,l)=>{for(const a of s){if(a.hidden)continue;if(a.type==="group"){i(a.children,l*a.scale);continue}const c=l*a.scale,u=a.width*a.height*c*c*(a.opacity??1);if(a.shadow&&o([a.shadow.color],"shadow",u*.1),a.type==="text"){const d=[...a.text].length*(a.fontSize*c)**2;o(ls(a.textFill),"text",d),a.stroke!==void 0&&(a.strokeWidth??1)>0&&o([a.stroke],"line",d*.2);for(const p of a.spans??[]){const w=(p.end-p.start)*((p.fontSize??a.fontSize)*c)**2;p.color&&o([p.color],"text",w),p.highlight&&o([p.highlight],"fill",w*1.3)}const f=a.effect;f&&"color"in f&&(f.type==="background"?o([f.color],"fill",d*1.3):f.type==="marker"?o([f.color],"fill",d*.6):f.type==="outline"?o([f.color],"line",d*.3):o(f.type==="glitch"?[f.color,f.color2]:[f.color],"shadow",d*.3))}else a.type==="shape"?(o(ls(a.fill),u>=r*.6?"background":"fill",u),a.strokeWidth>0&&o([a.stroke],"line",(a.width+a.height)*2*a.strokeWidth*c*c)):a.type==="line"?a.strokeWidth>0&&o([a.stroke],"line",a.width*a.strokeWidth*c*c):a.type==="path"&&(o(ls(a.fill),"fill",u*.5),a.strokeWidth>0&&o([a.stroke],"line",u*.15))}};i(n.nodes,1)}}function PE(e){const t=new Map;return IE(e,(n,r,o)=>{let i=t.get(n);i||(i={color:n,weight:0,background:0,fill:0,text:0,line:0,shadow:0},t.set(n,i)),i[r]+=o,i.weight+=o}),[...t.values()].sort((n,r)=>r.weight-n.weight)}function ew(e,t){const n=(r,o)=>{for(const i of r)i.hidden||(i.type==="group"?n(i.children,o*i.scale):i.type==="text"&&t(i,i.fontSize*o*i.scale))};for(const r of e.slides)n(r.nodes,1)}function $M(e){const t=new Map;return ew(e,(n,r)=>{const o=t.get(n.fontFamily)??{fontFamily:n.fontFamily,texts:0,largest:0};o.texts+=1,o.largest=Math.max(o.largest,r),t.set(n.fontFamily,o)}),[...t.values()].sort((n,r)=>r.largest-n.largest||r.texts-n.texts)}function ME(e){const t=[];ew(e,(o,i)=>{const s=[...o.text.replace(/\s/g,"")].length;s>0&&t.push({size:i,chars:s})});const n=t.reduce((o,i)=>o+i.chars,0);if(n===0)return null;t.sort((o,i)=>o.size-i.size);let r=0;for(const o of t)if(r+=o.chars,r*2>=n)return o.size;return t[t.length-1].size}function Sp(e){const t=[1,3,5].map(n=>zs(Number.parseInt(e.slice(n,n+2),16)));return .2126*t[0]+.7152*t[1]+.0722*t[2]}function Mo(e,t){const n=Sp(e),r=Sp(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function RE(e){return e.fontSize>=48||e.fontWeight==="bold"&&e.fontSize>=40?3:4.5}const NE=.25;function xp(e,t,n){if(Mo(e,t)>=n)return e;const r=mn(e),o=Mo("#000000",t)>=Mo("#ffffff",t)?0:1;let i=0,s=1;for(let l=0;l<24;l+=1){const a=(i+s)/2,c=nu({l:r.l+(o-r.l)*a,a:r.a*(1-a),b:r.b*(1-a)});Mo(c,t)>=n?s=a:i=a}return nu({l:r.l+(o-r.l)*s,a:r.a*(1-s),b:r.b*(1-s)})}function as(e){return e.type==="solid"?e.color.toLowerCase():null}function LE(e){const t=[],n=(r,o,i,s)=>{for(const l of r){if(l.hidden)continue;if(l.type==="group"){n(l.children,o+l.x*s,i+l.y*s,s*l.scale);continue}const a=s*l.scale;t.push({node:l,box:{x:o+l.x*s,y:i+l.y*s,width:l.width*a,height:l.height*a}})}};return n(e.nodes,0,0,1),t}function FE(e){const t=new Map;for(const r of e.slides){const o=LE(r);o.forEach(({node:i,box:s},l)=>{var k,C;if(i.type!=="text"||(i.opacity??1)<.7)return;const a=s.x+s.width/2,c=s.y+s.height/2;let u=as(r.background);for(const m of o.slice(0,l).reverse()){const g=m.node;if(!(g.type==="text"||g.type==="line")&&!(g.type==="path"&&g.fill.type==="transparent")&&!(a<m.box.x||a>m.box.x+m.box.width)&&!(c<m.box.y||c>m.box.y+m.box.height)&&!((g.opacity??1)<.7)){u=g.type==="image"?null:g.type==="qrcode"?g.light:g.type==="chart"||g.type==="table"||g.type==="timeline"||g.type==="progress"?null:as(g.fill);break}}const d=RE(i)+NE,f=as(i.textFill);((k=i.effect)==null?void 0:k.type)==="background"&&(u=i.effect.color.toLowerCase());const p=((C=i.effect)==null?void 0:C.type)==="outline"&&f!==null&&Mo(f,i.effect.color)>=d;let w=i;if(u&&f&&!p){const m=xp(f,u,d);m!==f&&(w={...w,textFill:{type:"solid",color:m}})}if(i.spans){const m=i.spans.map(g=>{const y=g.highlight??u,S=g.color??(g.highlight?as(w.textFill):null);if(!y||!S)return g;const x=xp(S.toLowerCase(),y.toLowerCase(),d);return x===S.toLowerCase()?g:{...g,color:x}});m.some((g,y)=>g!==i.spans[y])&&(w={...w,spans:m})}w!==i&&t.set(i,w)})}if(t.size===0)return e;const n=r=>{if(r.type==="group"){const o=r.children.map(n);return o.every((i,s)=>i===r.children[s])?r:{...r,children:o}}return r.type==="text"?t.get(r)??r:r};return{...e,slides:e.slides.map(r=>{const o=r.nodes.map(n);return o.every((i,s)=>i===r.nodes[s])?r:{...r,nodes:o}})}}function $E(e,t){const n=PE(e),r=new Map;if(n.length===0)return r;const o=[...n].sort((f,p)=>p.background-f.background)[0],i=o.background>0?o:n[0],s=mn(i.color).l,l=f=>Math.abs(mn(f.color).l-s),a=n.filter(f=>f.text>0&&l(f)>=bE).sort((f,p)=>p.text-f.text)[0]??n.filter(f=>f!==i).sort((f,p)=>l(p)-l(f))[0];r.set(i.color,t.background),a&&r.set(a.color,t.text);const c=s,u=a?mn(a.color).l:c>.5?0:1;let d=0;for(const f of n)if(!r.has(f.color))if(AE(f.color)<xE||t.accents.length===0){const p=u===c?0:(mn(f.color).l-c)/(u-c);r.set(f.color,vE(t.background,t.text,Math.min(1,Math.abs(p))))}else r.set(f.color,t.accents[d%t.accents.length]),d+=1;return r}function bp(e){return typeof e=="string"&&e.trim().length>0&&e.length<=SE}function OE(e){if(e.palette!==void 0&&!X0.some(t=>t.id===e.palette))return`未知的配色 palette:${String(e.palette)}`;if(e.fontSet!==void 0&&!Q0.some(t=>t.id===e.fontSet))return`未知的字体组合 fontSet:${String(e.fontSet)}`;if(e.colors!==void 0){if(typeof e.colors!="object"||e.colors===null||Array.isArray(e.colors))return'colors 必须是 { "#原色": "#新色" } 对象';for(const[t,n]of Object.entries(e.colors))if(!F(t)||!F(n))return`colors 里的颜色必须是 #RRGGBB:${t} → ${String(n)}`}if(e.fonts!==void 0){if(typeof e.fonts!="object"||e.fonts===null||Array.isArray(e.fonts))return'fonts 必须是 { "原字体": "新字体" } 对象';for(const[t,n]of Object.entries(e.fonts))if(!bp(t)||!bp(n))return`fonts 里的字体名不能为空:${t} → ${String(n)}`}return e.palette===void 0&&e.fontSet===void 0&&e.colors===void 0&&e.fonts===void 0?"document/restyle 至少要给 palette、fontSet、colors、fonts 之一":null}function zE(e,t){if(OE(t))return e;let n=e;const r=new Map,o=X0.find(a=>a.id===t.palette);o&&$E(e,o).forEach((a,c)=>r.set(c,a));for(const[a,c]of Object.entries(t.colors??{}))r.set(a.toLowerCase(),c.toLowerCase());r.size>0&&(n=TE(n,a=>{const c=r.get(a.toLowerCase());return c===void 0||c===a.toLowerCase()?a:c})),o&&(n=FE(n));const i=Q0.find(a=>a.id===t.fontSet),s=i?ME(e):null,l=t.fonts??{};return(i||Object.keys(l).length>0)&&(n=_E(n,(a,c)=>Object.prototype.hasOwnProperty.call(l,a)?l[a]:i?s!==null&&c>=s*kE?i.heading:i.body:a)),n}function oa(e,t){return Number.isInteger(e)&&Number.isInteger(t)&&e>=sp&&t>=sp&&e<=lp&&t<=lp?{ok:!0}:{ok:!1,message:"页面尺寸必须在 128 到 4096 px 之间"}}function DE(e={}){var o,i;const t=Fx[1],n=((o=e.inheritFrom)==null?void 0:o.width)??e.width??t.width,r=((i=e.inheritFrom)==null?void 0:i.height)??e.height??t.height;return{id:me(),name:"Page 1",width:n,height:r,background:{...Jy},nodes:[]}}function OM(){const e=DE();return{documentVersion:44,activeSlideId:e.id,slides:[e]}}function Kt(e,t,n){return{x:Math.round((e.width-t)/2),y:Math.round((e.height-n)/2),width:t,height:n}}function zM(e){return{id:me(),name:"文本",locked:!1,hidden:!1,type:"text",...Kt(e,Math.min(520,Math.round(e.width*.55)),150),rotation:0,scale:1,text:"双击编辑文本",fontSize:48,fontFamily:"PingFang SC, Microsoft YaHei, system-ui, sans-serif",textFill:{...Zy},align:"left",fontWeight:"bold"}}function DM(e,t,n="图片"){return{id:me(),name:"图片",locked:!1,hidden:!1,type:"image",...Kt(e,Math.min(560,Math.round(e.width*.58)),360),rotation:0,scale:1,src:t,alt:n,fit:"cover",framing:Mn()}}function jM(e,t){return{id:me(),name:"形状",locked:!1,hidden:!1,type:"shape",...Kt(e,360,240),rotation:0,scale:1,shape:t,fill:{...e0},stroke:"#c2410c",strokeWidth:0}}function WM(e,t){return{id:me(),name:t==="arrow"?"箭头":"直线",locked:!1,hidden:!1,type:"line",lineKind:t,...Kt(e,Math.min(520,Math.round(e.width*.55)),80),rotation:0,scale:1,stroke:"#18181b",strokeWidth:6}}function BM(e,t){const n=t.viewBox.width/t.viewBox.height,r=n>=1?t.size:Math.round(t.size*n),o=n>=1?Math.round(t.size/n):t.size;return{id:me(),name:t.name,locked:!1,hidden:!1,type:"path",...Kt(e,Math.max(1,r),Math.max(1,o)),rotation:0,scale:1,d:t.d,viewBox:{...t.viewBox},fill:t.fill??{type:"transparent"},stroke:t.stroke??"#18181b",strokeWidth:t.strokeWidth??2}}function HM(e){return{id:me(),name:"图表",locked:!1,hidden:!1,type:"chart",...Kt(e,480,320),rotation:0,scale:1,chartKind:"bar",labels:["一月","二月","三月","四月"],series:[{values:[4,7,5,9],color:Iy}]}}function UM(e){return{id:me(),name:"表格",locked:!1,hidden:!1,type:"table",...Kt(e,480,320),rotation:0,scale:1,rows:3,cols:3,cells:["项目","本月","上月","阅读","1.2万","9800","涨粉","320","210"]}}function KM(e){return{id:me(),name:"时间线",locked:!1,hidden:!1,type:"timeline",...Kt(e,480,420),rotation:0,scale:1,items:[{label:"3 月",text:"注册账号,发出第一篇笔记"},{label:"6 月",text:"接到第一单商单合作"},{label:"9 月",text:"粉丝破万,开始做系列内容"},{label:"12 月",text:"工作室成立,全职做内容"}]}}function YM(e){return{id:me(),name:"进度",locked:!1,hidden:!1,type:"progress",...Kt(e,480,96),rotation:0,scale:1,progressKind:"bar",value:65}}function VM(e,t="https://dingcard.app"){return{id:me(),name:"二维码",locked:!1,hidden:!1,type:"qrcode",...Kt(e,240,240),rotation:0,scale:1,payload:t,dark:x0,light:b0}}function ge(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function lr(e,t){return Object.keys(e).every(n=>t.has(n))}function Uo(e,t){const n=Object.keys(e);return n.length===t.size&&n.every(r=>t.has(r))}function Ed(e){return Array.isArray(e)&&e.length>0&&e.every(t=>typeof t=="string"&&t.length>0)}function $n(e){return Array.isArray(e)&&e.every(t=>typeof t=="string"&&t.length>0)}function vd(e,t){if(e===t)return!0;if(!ge(e)||!ge(t))return!1;if(Array.isArray(e.stops)||Array.isArray(t.stops))return e.type===t.type&&e.angle===t.angle&&i2(e.stops,t.stops);const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(o=>e[o]===t[o])}function $i(e){return e.type==="solid"?{type:"solid",color:e.color}:e.type==="radial-gradient"?{type:"radial-gradient",stops:e.stops.map(t=>({...t}))}:"stops"in e?{type:"linear-gradient",stops:e.stops.map(t=>({...t})),angle:e.angle}:{type:"linear-gradient",from:e.from,to:e.to,angle:e.angle}}function jE(e,t){return e===t?!0:!e||!t||e.length!==t.length?!1:e.every((n,r)=>n.x===t[r].x&&n.y===t[r].y)}function ou(e){return e.type==="transparent"?{type:"transparent"}:e.type==="image"?{type:"image",src:e.src,fit:e.fit,framing:ht(e.framing)}:$i(e)}function WE(e){return e.type==="transparent"?{type:"transparent"}:e.type==="image"?{type:"image",src:e.src,fit:e.fit,framing:ht(e.framing)}:$i(e)}function Ep(e,t){return e===t?!0:e.type!==t.type?!1:e.type==="image"&&t.type==="image"?e.src===t.src&&e.fit===t.fit&&Mi(e.framing,t.framing):vd(e,t)}function Ds(e){return e.type==="transparent"?{type:"transparent"}:e.type==="image"?{type:"image",src:e.src,fit:e.fit,framing:ht(e.framing)}:e.type==="pattern"?{type:"pattern",color:e.color,patternColor:e.patternColor,pattern:e.pattern,size:e.size}:$i(e)}const BE=new Set(["type","src","fit","framing"]);function tw(e){return ge(e)&&e.type==="transparent"?Uo(e,new Set(["type"])):ge(e)&&e.type==="pattern"?Uo(e,new Set(["type","color","patternColor","pattern","size"]))&&F(e.color)&&F(e.patternColor)&&n0(e.pattern)&&r0(e.size):ge(e)&&e.type==="image"?Uo(e,BE)&&typeof e.src=="string"&&(e.fit==="cover"||e.fit==="contain")&&vt(e.framing):no(e)}function HE(e,t){return e.type==="image"||t.type==="image"?e.type==="image"&&t.type==="image"&&e.src===t.src&&e.fit===t.fit&&Mi(e.framing,t.framing):e.type==="pattern"||t.type==="pattern"?e.type==="pattern"&&t.type==="pattern"&&e.color===t.color&&e.patternColor===t.patternColor&&e.pattern===t.pattern&&e.size===t.size:vd(e,t)}function js(e,t,n){const r=e.slides.findIndex(l=>l.id===t);if(r<0)return e;const o=e.slides[r],i=n(o);if(i===o)return e;const s=[...e.slides];return s[r]=i,{...e,slides:s}}function Un(e,t,n){return js(e,t,r=>{const o=n(r.nodes);return o===r.nodes?r:{...r,nodes:o}})}function vp(e){const t=new Set;return Ni(e,n=>t.add(n.id)),t}const iu=new Set(["text","src","alt","d","viewBox","payload","labels","series","rows","cols","cells","colWidths","items","value","label"]),su=new Set(["effect","fontSize","fontFamily","textFill","align","fontWeight","verticalAlign","paragraphSpacing","list","spans","lineHeight","letterSpacing","italic","vertical","cornerRadius","starInnerRatio","bubbleTailX","strokeDash","cornerRadii","dark","light","ecl","moduleStyle","logoSrc","quietZone","chartKind","progressKind","accent","showValues","showLegend","showTicks","headerRow","striped","ink","headerFill","stripeFill","grid","lineColor","lineWidth","horizontal","barMode","trackFill","opacity","shadow","filter","blendMode","dash","cap","join","fillRule","startCap","endCap","fit","framing","shape","fill","stroke","strokeWidth","lineKind","points"]),lu=new Set(["x","y","width","height","rotation","scale","flipX","flipY"]),UE=new Set(["type","slideId","path","patch"]),KE=new Set(["x","y","width","height","framing"]),cs=new Set(["lineHeight","letterSpacing","italic","vertical","opacity","shadow","filter","blendMode","stroke","strokeWidth","effect"]),us=new Set(["cornerRadius","starInnerRatio","bubbleTailX","strokeDash","cornerRadii","opacity","shadow","filter","blendMode"]),fs=new Set(["cornerRadius","stroke","strokeWidth","opacity","shadow","filter","blendMode"]),yo=new Set(["ecl","moduleStyle","logoSrc","quietZone","opacity","shadow","filter","blendMode"]),wo=new Set(["showValues","showLegend","showTicks","barMode","ink","opacity","shadow","filter","blendMode"]),ko=new Set(["headerRow","striped","ink","headerFill","stripeFill","grid","lineColor","lineWidth","fontSize","opacity","shadow","filter","blendMode"]),So=new Set(["accent","horizontal","ink","opacity","shadow","filter","blendMode"]),xo=new Set(["progressKind","accent","trackFill","ink","opacity","shadow","filter","blendMode"]),ds=new Set(["opacity","shadow","filter","blendMode","dash","cap","startCap","endCap"]),bo=new Set(["opacity","shadow","filter","blendMode","cap","join","fillRule"]);function YE(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=e,n=Object.keys(t);return n.length!==4||!["topLeft","topRight","bottomRight","bottomLeft"].every(r=>n.includes(r))?!1:Ee(t.topLeft)&&Ee(t.topRight)&&Ee(t.bottomRight)&&Ee(t.bottomLeft)}function _t(e,t){const n=(r,o)=>`样式键 ${r} 的值不合法:${o}`;for(const r of t){if(!(r in e))continue;const o=e[r];if(r==="opacity"){if(!Yf(o))return n("opacity","必须是 0–1 的数")}else if(r==="shadow"){if(o!==null&&!Zl(o))return n("shadow","必须是 { color, blur, offsetX, offsetY }(或传 null 清除)")}else if(r==="lineHeight"){if(o!==null&&!Vf(o))return n("lineHeight","必须是 0.5–4 的行高倍数(或传 null 恢复默认)")}else if(r==="letterSpacing"){if(o!==null&&!Gf(o))return n("letterSpacing","必须是 -50–200 的像素字距(或传 null 恢复默认)")}else if(r==="italic"){if(typeof o!="boolean")return n("italic","必须是 true 或 false")}else if(r==="vertical"){if(typeof o!="boolean")return n("vertical","必须是 true 或 false")}else if(r==="cornerRadius"){if(o!==null&&!Ee(o))return n("cornerRadius","必须是 0–2000 的像素圆角(或传 null 恢复直角)")}else if(r==="strokeDash"){if(o!==null&&!Ur(o))return n("strokeDash","必须是 1–500 的虚线长度(或传 null 恢复实线)")}else if(r==="cornerRadii"){if(o!==null&&!YE(o))return n("cornerRadii","必须是 { topLeft, topRight, bottomRight, bottomLeft }(各 0–2000,或传 null 恢复统一圆角)")}else if(r==="starInnerRatio"){if(o!==null&&!cd(o))return n("starInnerRatio","必须是 0.15–0.85 的五角星内径比(或传 null 恢复 0.38)")}else if(r==="bubbleTailX"){if(o!==null&&!ud(o))return n("bubbleTailX","必须是 0.05–0.95 的尾巴位置(或传 null 恢复 0.5)")}else if(r==="dark"||r==="light"){if(o!==null&&!F(o))return n(r,"必须是 #RRGGBB(或传 null 恢复默认)")}else if(r==="ecl"){if(o!==null&&!dd(o))return n("ecl",`必须是 ${["L","M","Q","H"].join(" / ")} 之一(或传 null 恢复 M)`)}else if(r==="moduleStyle"){if(o!==null&&!hd(o))return n("moduleStyle",`必须是 ${["square","rounded","dot"].join(" / ")} 之一(或传 null 恢复方块)`)}else if(r==="logoSrc"){if(o!==null&&!gd(o))return n("logoSrc","必须是图片地址或 img: 引用(或传 null 移除)")}else if(r==="quietZone"){if(o!==null&&!pd(o))return n("quietZone","必须是 0–4 的码边距模块数(或传 null 恢复 2)")}else if(r==="chartKind"){if(!hi(o))return n("chartKind",`必须是 ${["bar","ring","line","radar"].join(" / ")} 之一`)}else if(r==="progressKind"){if(!Tf(o))return n("progressKind",`必须是 ${["bar","ring"].join(" / ")} 之一`)}else if(r==="accent"){if(o!==null&&!F(o))return n("accent","必须是 #RRGGBB(或传 null 恢复默认色)")}else if(r==="showValues"){if(o!==null&&o!==!0)return n("showValues","必须是 true(或传 null 关闭)")}else if(r==="showLegend"){if(o!==null&&typeof o!="boolean")return n("showLegend","必须是 true / false(或传 null 恢复自动)")}else if(r==="showTicks"){if(o!==null&&typeof o!="boolean")return n("showTicks","必须是 true / false(或传 null 恢复显示)")}else if(r==="headerRow"||r==="striped"){if(o!==null&&typeof o!="boolean")return n(r,"必须是 true / false(或传 null 恢复默认)")}else if(r==="horizontal"){if(o!==null&&typeof o!="boolean")return n("horizontal","必须是 true / false(或传 null / false 恢复竖排)")}else if(r==="ink"||r==="headerFill"||r==="stripeFill"||r==="trackFill"||r==="lineColor"){if(o!==null&&!F(o))return n(r,"必须是 #RRGGBB(或传 null 恢复默认)")}else if(r==="grid"){if(o!==null&&!Mf(o))return n("grid",`必须是 ${Wy.join(" / ")} 之一(或传 null 恢复全框)`)}else if(r==="lineWidth"){if(o!==null&&!Rf(o))return n("lineWidth",`必须是 ${By}–${Hy} 的像素线宽(或传 null 恢复 1)`)}else if(r==="fontSize"){if(o!==null&&!Nf(o))return n("fontSize",`必须是 ${Uy}–${Ky} 的像素字号(或传 null 按行高自动)`)}else if(r==="barMode"){if(o!==null&&!bf(o))return n("barMode",`必须是 ${["grouped","stacked","percent"].join(" / ")} 之一(或传 null 恢复并排)`)}else if(r==="filter"){if(o!==null&&!Jl(o,!0))return n("filter","必须是 { brightness?, contrast?, saturation?, blur?, hue?, grayscale?, sepia? } 至少一键(或传 null 清除)")}else if(r==="blendMode"){if(o!==null&&!Zf(o))return n("blendMode","必须是已知的混合模式之一(或传 null 恢复正常)")}else if(r==="dash"){if(o!==null&&!Ur(o))return n("dash","必须是大于 0 的虚线长度(或传 null 恢复实线)")}else if(r==="cap"){if(!ki(o))return n("cap",`必须是 ${["round","butt","square"].join(" / ")} 之一`)}else if(r==="join"){if(!Jf(o))return n("join",`必须是 ${["round","miter","bevel"].join(" / ")} 之一`)}else if(r==="fillRule"){if(!ed(o))return n("fillRule",`必须是 ${["nonzero","evenodd"].join(" / ")} 之一`)}else if(r==="startCap"||r==="endCap"){if(o!==null&&!Si(o))return n(r,`必须是 ${["none","arrow","dot"].join(" / ")} 之一(或传 null 恢复跟随 lineKind)`)}else if(r==="stroke"){if(o!==null&&!F(o))return n("stroke","必须是 #RRGGBB(或传 null 清除)")}else if(r==="strokeWidth"){if(o!==null&&!xi(o))return n("strokeWidth","必须是 0.5–100 的像素宽度(或传 null 清除)")}else if(r==="effect"&&o!==null&&!Kf(o))return n("effect","必须是合法的文字效果对象(或传 null 去掉)")}return null}function It(e,t,n){let r={...e};for(const o of n){if(!(o in t))continue;const i=t[o];if(i===null||(o==="italic"||o==="vertical"||o==="horizontal")&&i===!1){const{[o]:s,...l}=r;r=l;continue}r={...r,[o]:o==="shadow"?Zl(i):o==="filter"?Jl(i,!0):o==="effect"?{...i}:o==="cornerRadii"?{...i}:i}}return r}function Pt(e,t,n,r){const o=e,i=t;for(const s of r)if(s in n){if(s==="shadow"){if(!qb(o.shadow,i.shadow))return!1}else if(s==="filter"){if(!Zb(o.filter,i.filter))return!1}else if(s==="effect"){if(!Wb(o.effect,i.effect))return!1}else if(o[s]!==i[s])return!1}return!0}function au(e,t){if(!ge(t)||!lr(t,iu))return{ok:!1,node:e,reason:`内容键必须是这些之一:${[...iu].join(" / ")}`};if(Object.keys(t).length===0)return{ok:!1,node:e,reason:"内容键至少要写一个"};const n=t;if(e.type==="text"){if(Object.keys(n).some(l=>l!=="text"))return{ok:!1,node:e,reason:`text 的内容只接受 text,收到不允许的键:${Object.keys(n).filter(l=>l!=="text").join("、")}`};if(typeof n.text!="string")return{ok:!1,node:e,reason:"text 的内容必须是字符串"};const r=n.text;if(r===e.text)return{ok:!0,node:e};const o=Fb(e.spans,e.text,r),{spans:i,...s}=e;return{ok:!0,node:o?{...s,text:r,spans:o}:{...s,text:r}}}if(e.type==="image"){const r=Object.keys(n).filter(l=>l!=="src"&&l!=="alt");if(r.length>0)return{ok:!1,node:e,reason:`image 的内容只接受 src / alt,收到不允许的键:${r.join("、")}`};if("src"in n&&typeof n.src!="string"||"alt"in n&&typeof n.alt!="string")return{ok:!1,node:e,reason:"image 的 src 和 alt 都必须是字符串"};const o="src"in n?n.src:e.src,i="alt"in n?n.alt:e.alt,s=o!==e.src;return{ok:!0,node:!s&&i===e.alt?e:{...e,src:o,alt:i,framing:s?Mn():e.framing}}}if(e.type==="chart"){const o=Object.keys(n).filter(a=>a!=="labels"&&a!=="series");if(o.length>0)return{ok:!1,node:e,reason:`chart 的内容只接受 labels / series,收到不允许的键:${o.join("、")}`};const i="labels"in n?n.labels:e.labels;if(!Array.isArray(i)||i.length===0||i.length>Br||!i.every(to))return{ok:!1,node:e,reason:`labels 必须是 1–${Br} 个 1–24 字符的字符串`};const s="series"in n?n.series:e.series;return vf(s,i.length)?{ok:!0,node:("labels"in n||"series"in n)&&e.labels.length===i.length&&e.labels.every((a,c)=>a===i[c])&&e.series.length===s.length&&e.series.every((a,c)=>{const u=s[c];return a.color===u.color&&a.name===u.name&&a.values.every((d,f)=>d===u.values[f])})?e:{...e,labels:i.map(a=>a),series:s.map(a=>({values:[...a.values],color:a.color,..."name"in a?{name:a.name}:{}}))}}:{ok:!1,node:e,reason:`series 必须是 1–3 个 { name?, values: [≥0 数值 × ${i.length}], color: #RRGGBB },values 长度要和 labels 一致`}}if(e.type==="table"){const r=Object.keys(n),o=r.filter(f=>f!=="rows"&&f!=="cols"&&f!=="cells"&&f!=="colWidths");if(o.length>0)return{ok:!1,node:e,reason:`table 的内容只接受 rows / cols / cells / colWidths,收到不允许的键:${o.join("、")}`};const i="rows"in n?n.rows:e.rows,s="cols"in n?n.cols:e.cols;if(!If(i)||!Pf(s))return{ok:!1,node:e,reason:"rows 必须是 2–12、cols 必须是 1–6 的整数"};let l="cells"in n?n.cells:void 0;if(l===void 0){const f=[];for(let p=0;p<i;p+=1)for(let w=0;w<s;w+=1)f.push(p<e.rows&&w<e.cols?e.cells[p*e.cols+w]:"");l=f}if(!jy(l,i,s))return{ok:!1,node:e,reason:`cells 必须正好是 rows × cols(${i} × ${s})个 1–24 字符的字符串(按行展开)`};const a=l;let c;if("colWidths"in n){if(!Lf(n.colWidths,s))return{ok:!1,node:e,reason:`colWidths 必须正好是 ${s} 个大于 0 的数(与新列数一致)`};c=[...n.colWidths]}else if(e.colWidths!==void 0&&e.cols!==s){const f=[];for(let p=0;p<s;p+=1)f.push(p<e.cols?e.colWidths[p]:1);c=f}else e.colWidths!==void 0&&(c=[...e.colWidths]);const u=e.colWidths===void 0&&c===void 0||e.colWidths!==void 0&&c!==void 0&&e.colWidths.length===c.length&&e.colWidths.every((f,p)=>f===c[p]);return{ok:!0,node:r.length>0&&e.rows===i&&e.cols===s&&e.cells.length===a.length&&e.cells.every((f,p)=>f===a[p])&&u?e:{...e,rows:i,cols:s,cells:[...a],...c!==void 0?{colWidths:c}:{}}}}if(e.type==="timeline"){const r=Object.keys(n).filter(o=>o!=="items");if(r.length>0)return{ok:!1,node:e,reason:`timeline 的内容只接受 items(整体替换),收到不允许的键:${r.join("、")}`};if("items"in n){if(!Ff(n.items))return{ok:!1,node:e,reason:"items 必须是 2–8 个 { label?(1–12 字), text(1–48 字) },整体替换"};const o=n.items.map(s=>({text:s.text,..."label"in s?{label:s.label}:{}}));return{ok:!0,node:lb(e.items,o)?e:{...e,items:o}}}return{ok:!0,node:e}}if(e.type==="progress"){const r=Object.keys(n).filter(s=>s!=="value"&&s!=="label");if(r.length>0)return{ok:!1,node:e,reason:`progress 的内容只接受 value / label,收到不允许的键:${r.join("、")}`};if("value"in n&&!Cf(n.value))return{ok:!1,node:e,reason:"value 必须是 0–100 的数,最多一位小数(如 65、42.5)"};if("label"in n&&(typeof n.label!="string"||n.label!==""&&!Ql(n.label)))return{ok:!1,node:e,reason:'label 必须是 1–12 个字的字符串,传 "" 清除'};if((!("value"in n)||n.value===e.value)&&(!("label"in n)||(n.label===""?void 0:n.label)===e.label))return{ok:!0,node:e};const i={...e,..."value"in n?{value:n.value}:{},..."label"in n&&n.label!==""?{label:n.label}:{}};return"label"in n&&n.label===""&&delete i.label,{ok:!0,node:i}}if(e.type==="qrcode"){const r=Object.keys(n).filter(i=>i!=="payload");if(r.length>0)return{ok:!1,node:e,reason:`qrcode 的内容只接受 payload,收到不允许的键:${r.join("、")}`};if(!fd(n.payload))return{ok:!1,node:e,reason:"payload 必须是 1–512 个字符的文字或 URL"};const o=n.payload;return{ok:!0,node:o===e.payload?e:{...e,payload:o}}}if(e.type==="path"){const r=Object.keys(n).filter(s=>s!=="d"&&s!=="viewBox");if(r.length>0)return{ok:!1,node:e,reason:`path 的内容只接受 d / viewBox,收到不允许的键:${r.join("、")}`};if("d"in n&&!yd(n.d))return{ok:!1,node:e,reason:"d 必须是合法的 SVG 路径(以 M 开头,最长 20000 字符)"};let o=e.viewBox;if("viewBox"in n){const s=rd(n.viewBox);if(!s)return{ok:!1,node:e,reason:"viewBox 必须是 { x, y, width(>0), height(>0) }"};o=s}const i="d"in n?n.d:e.d;return{ok:!0,node:i===e.d&&t2(o,e.viewBox)?e:{...e,d:i,viewBox:o}}}return{ok:!1,node:e,reason:`${e.type} 节点没有可改的内容字段(内容只属于 text / image / chart / table / timeline / progress / qrcode / path)`}}function VE(e,t){return e===t?!0:!e||!t||e.length!==t.length?!1:e.every((n,r)=>{const o=t[r];return n.start===o.start&&n.end===o.end&&n.bold===o.bold&&n.color===o.color&&n.highlight===o.highlight&&n.underline===o.underline&&n.strike===o.strike&&n.fontSize===o.fontSize})}const Ap=new Set(["left","center","right","justify"]);function GE(e,t){let n=e;if("verticalAlign"in t){const r=t.verticalAlign;if(r!==null&&r!=="top"&&!Qf(r))return null;const{verticalAlign:o,...i}=n;n=r===null||r==="top"?i:{...i,verticalAlign:r}}if("paragraphSpacing"in t){const r=t.paragraphSpacing;if(r!==null&&r!==0&&!Xf(r))return null;const{paragraphSpacing:o,...i}=n;n=r===null||r===0?i:{...i,paragraphSpacing:r}}if("list"in t){const r=t.list;if(r!==null&&!qf(r))return null;const{list:o,...i}=n;n=r===null?i:{...i,list:r}}return n}function Mt(e,t,n){const r=t instanceof Set?t:new Set(t),o=n.filter(i=>!r.has(i));return`${e} 的样式只接受 ${[...r].join(" / ")},收到不允许的键:${o.join("、")}`}function yl(e,t){if(!ge(t)||!lr(t,su))return{ok:!1,node:e,reason:`样式键必须是这些之一:${[...su].join(" / ")}`};if(Object.keys(t).length===0)return{ok:!1,node:e,reason:"样式键至少要写一个"};const n=Object.keys(t);if(e.type==="text"){const r=new Set(["fontSize","fontFamily","textFill","align","fontWeight","spans","lineHeight","letterSpacing","italic","vertical","opacity","shadow","filter","blendMode","stroke","strokeWidth","effect","verticalAlign","paragraphSpacing","list"]);if(!n.every(w=>r.has(w)))return{ok:!1,node:e,reason:Mt("text",r,n)};if("textFill"in t&&!no(t.textFill))return{ok:!1,node:e,reason:"textFill 必须是 ColorPaint(纯色 #RRGGBB 或渐变)"};if("align"in t&&!Ap.has(t.align))return{ok:!1,node:e,reason:`align 必须是 ${[...Ap].join(" / ")} 之一`};let o;if("spans"in t){const w=Uf(t.spans,e.text.length);if(!w)return{ok:!1,node:e,reason:`spans 必须是 text 内的字符区间 [{ start, end, … }]:0 ≤ start < end ≤ ${e.text.length},按 start 排序不重叠,至少含一种样式(传 [] 清空)`};o=w}const i=_t(t,cs);if(i)return{ok:!1,node:e,reason:i};const s=GE(e,t);if(!s)return{ok:!1,node:e,reason:"文字样式放不下这个文本框:检查 fontSize / lineHeight / letterSpacing / paragraphSpacing 的范围"};const l="fontSize"in t&&!("spans"in t)&&typeof t.fontSize=="number"&&e.fontSize>0?Ob(e.spans,t.fontSize/e.fontSize):e.spans,a={...s,...l!==e.spans&&l?{spans:l}:{},..."fontSize"in t?{fontSize:t.fontSize}:{},..."fontFamily"in t?{fontFamily:t.fontFamily}:{},..."textFill"in t?{textFill:$i(t.textFill)}:{},..."align"in t?{align:t.align}:{},..."fontWeight"in t?{fontWeight:t.fontWeight}:{}},{spans:c,...u}=a,d=o===void 0?a:o.length===0?u:{...a,spans:o},f=It(d,t,cs);return{ok:!0,node:n.every(w=>cs.has(w)?!0:w==="textFill"?vd(e.textFill,f.textFill):w==="spans"?VE(e.spans,f.spans):e[w]===f[w])&&Pt(e,f,t,cs)?e:f}}if(e.type==="image"){const r=new Set(["fit","framing",...fs]);if(!n.every(a=>r.has(a)))return{ok:!1,node:e,reason:Mt("image",r,n)};if("fit"in t&&t.fit!=="cover"&&t.fit!=="contain")return{ok:!1,node:e,reason:"fit 必须是 cover / contain"};if("framing"in t&&!vt(t.framing))return{ok:!1,node:e,reason:"framing 必须是 { focusX(0–1), focusY(0–1), zoom(1–4) }"};const o=_t(t,fs);if(o)return{ok:!1,node:e,reason:o};const i="fit"in t?t.fit:e.fit,s="framing"in t?t.framing:e.framing,l=It({...e,fit:i,framing:"framing"in t?ht(s):e.framing},t,fs);return i===e.fit&&Mi(s,e.framing)&&Pt(e,l,t,fs)?{ok:!0,node:e}:{ok:!0,node:l}}if(e.type==="shape"){const r=new Set(["shape","fill","stroke","strokeWidth","cornerRadius","starInnerRatio","bubbleTailX","strokeDash","cornerRadii","opacity","shadow","filter","blendMode"]);if(!n.every(c=>r.has(c)))return{ok:!1,node:e,reason:Mt("shape",r,n)};if("shape"in t&&!od(t.shape))return{ok:!1,node:e,reason:"shape 必须是 rect / ellipse / triangle / diamond / pentagon / star / hexagon / heart / bubble 之一"};if("fill"in t&&!ra(t.fill))return{ok:!1,node:e,reason:"fill 必须是 ColorPaint、{ type: 'transparent' } 或 { type: 'image', src, fit, framing }"};if("stroke"in t&&typeof t.stroke!="string")return{ok:!1,node:e,reason:"shape 的 stroke 必须是 #RRGGBB 颜色字符串"};if("strokeWidth"in t&&(typeof t.strokeWidth!="number"||!Number.isFinite(t.strokeWidth)))return{ok:!1,node:e,reason:"strokeWidth 必须是数字"};const o=_t(t,us);if(o)return{ok:!1,node:e,reason:o};let i=e.fill;if("fill"in t){const c=t.fill;c.type!=="image"?i=ou(c):e.fill.type!=="image"?i={type:"image",src:c.src,fit:"cover",framing:Mn()}:c.src!==e.fill.src?i={type:"image",src:c.src,fit:e.fill.fit,framing:Mn()}:i=ou(c)}const s={...e,..."shape"in t?{shape:t.shape}:{},..."fill"in t?{fill:i}:{},..."stroke"in t?{stroke:t.stroke}:{},..."strokeWidth"in t?{strokeWidth:t.strokeWidth}:{}},l=It(s,t,us);return{ok:!0,node:n.every(c=>us.has(c)?!0:c==="fill"?Ep(e.fill,l.fill):e[c]===l[c])&&Pt(e,l,t,us)?e:l}}if(e.type==="line"){const r=new Set(["lineKind","stroke","strokeWidth","opacity","shadow","filter","blendMode","dash","cap","startCap","endCap","points"]);if(!n.every(a=>r.has(a)))return{ok:!1,node:e,reason:Mt("line",r,n)};if("lineKind"in t&&t.lineKind!=="line"&&t.lineKind!=="arrow")return{ok:!1,node:e,reason:"lineKind 必须是 line / arrow"};if("stroke"in t&&typeof t.stroke!="string")return{ok:!1,node:e,reason:"line 的 stroke 必须是 #RRGGBB 颜色字符串"};if("strokeWidth"in t&&(typeof t.strokeWidth!="number"||!Number.isFinite(t.strokeWidth)))return{ok:!1,node:e,reason:"strokeWidth 必须是数字"};let o;if("points"in t){const a=ea(t.points,e.width,e.height);if(!a)return{ok:!1,node:e,reason:`points 必须是 2–64 个 { x, y },坐标都要落在节点盒内(0 ≤ x ≤ ${e.width}、0 ≤ y ≤ ${e.height})`};o=a}const i=_t(t,ds);if(i)return{ok:!1,node:e,reason:i};const s=It({...e,..."lineKind"in t?{lineKind:t.lineKind}:{},..."stroke"in t?{stroke:t.stroke}:{},..."strokeWidth"in t?{strokeWidth:t.strokeWidth}:{},...o?{points:o}:{}},t,ds);return{ok:!0,node:n.every(a=>ds.has(a)||(a==="points"?jE(e.points,o):e[a]===s[a]))&&Pt(e,s,t,ds)?e:s}}if(e.type==="chart"){const r=new Set(["chartKind","accent","showValues","barMode","showLegend","showTicks",...wo]);if(!n.every(c=>r.has(c)))return{ok:!1,node:e,reason:Mt("chart",r,n)};if("chartKind"in t&&!hi(t.chartKind))return{ok:!1,node:e,reason:"chartKind 必须是 bar / ring / line / radar 之一"};if("accent"in t&&t.accent!==null&&!F(t.accent))return{ok:!1,node:e,reason:"accent 必须是 #RRGGBB(或传 null 恢复 #1d4ed8)"};const o=_t(t,wo);if(o)return{ok:!1,node:e,reason:o};const i="accent"in t?t.accent===null?Iy:t.accent:null,s={...e,...i!==null?{series:e.series.map(c=>({...c,color:i}))}:{},..."chartKind"in t?{chartKind:t.chartKind}:{}},l=It(s,t,wo);return{ok:!0,node:n.every(c=>wo.has(c)?!0:e[c]===l[c])&&Pt(e,l,t,wo)?e:l}}if(e.type==="table"){const r=new Set(["headerRow","striped","ink","headerFill","stripeFill",...ko]);if(!n.every(l=>r.has(l)))return{ok:!1,node:e,reason:Mt("table",r,n)};const o=_t(t,ko);if(o)return{ok:!1,node:e,reason:o};const i=It(e,t,ko);return{ok:!0,node:n.every(l=>ko.has(l)?!0:e[l]===i[l])&&Pt(e,i,t,ko)?e:i}}if(e.type==="timeline"){const r=new Set(["accent","horizontal","ink",...So]);if(!n.every(l=>r.has(l)))return{ok:!1,node:e,reason:Mt("timeline",r,n)};if("accent"in t&&t.accent!==null&&!F(t.accent))return{ok:!1,node:e,reason:"accent 必须是 #RRGGBB(或传 null 恢复蓝)"};const o=_t(t,So);if(o)return{ok:!1,node:e,reason:o};const i=It(e,t,So);return{ok:!0,node:n.every(l=>So.has(l)?!0:e[l]===i[l])&&Pt(e,i,t,So)?e:i}}if(e.type==="progress"){const r=new Set(["progressKind","accent","trackFill",...xo]);if(!n.every(l=>r.has(l)))return{ok:!1,node:e,reason:Mt("progress",r,n)};if("accent"in t&&t.accent!==null&&!F(t.accent))return{ok:!1,node:e,reason:"accent 必须是 #RRGGBB(或传 null 恢复蓝)"};if("trackFill"in t&&t.trackFill!==null&&!F(t.trackFill))return{ok:!1,node:e,reason:"trackFill 必须是 #RRGGBB(或传 null 恢复按进度色铺 14% 浅底)"};const o=_t(t,xo);if(o)return{ok:!1,node:e,reason:o};const i=It(e,t,xo);return{ok:!0,node:n.every(l=>xo.has(l)?!0:e[l]===i[l])&&Pt(e,i,t,xo)?e:i}}if(e.type==="qrcode"){const r=new Set(["dark","light","ecl","moduleStyle","logoSrc","quietZone",...yo]);if(!n.every(c=>r.has(c)))return{ok:!1,node:e,reason:Mt("qrcode",r,n)};if("dark"in t&&t.dark!==null&&!F(t.dark))return{ok:!1,node:e,reason:"dark 必须是 #RRGGBB(或传 null 恢复默认)"};if("light"in t&&t.light!==null&&!F(t.light))return{ok:!1,node:e,reason:"light 必须是 #RRGGBB(或传 null 恢复默认)"};const o=_t(t,yo);if(o)return{ok:!1,node:e,reason:o};const i="dark"in t?t.dark===null?x0:t.dark:e.dark,s="light"in t?t.light===null?b0:t.light:e.light,l=It({...e,dark:i,light:s},t,yo);return{ok:!0,node:n.every(c=>yo.has(c)?!0:e[c]===l[c])&&Pt(e,l,t,yo)?e:l}}if(e.type==="path"){const r=new Set(["fill","stroke","strokeWidth","dash",...bo]);if(!n.every(u=>r.has(u)))return{ok:!1,node:e,reason:Mt("path",r,n)};if("fill"in t&&!j0(t.fill))return{ok:!1,node:e,reason:"fill 必须是 ColorPaint、{ type: 'transparent' } 或 { type: 'image', src, fit, framing }"};if("stroke"in t&&!F(t.stroke))return{ok:!1,node:e,reason:"stroke 必须是 #RRGGBB"};if("strokeWidth"in t&&!td(t.strokeWidth))return{ok:!1,node:e,reason:"strokeWidth 必须是 0–10000 的 viewBox 单位(0 即不描边)"};if("dash"in t&&t.dash!==null&&!nd(t.dash))return{ok:!1,node:e,reason:"dash 必须是大于 0 的 viewBox 单位虚线长度(或传 null 恢复实线)"};const o=_t(t,bo);if(o)return{ok:!1,node:e,reason:o};const{dash:i,...s}=e,l={..."dash"in t?s:e,..."fill"in t?{fill:WE(t.fill)}:{},..."stroke"in t?{stroke:t.stroke}:{},..."strokeWidth"in t?{strokeWidth:t.strokeWidth}:{},..."dash"in t&&t.dash!==null?{dash:t.dash}:{}},a=It(l,t,bo);return{ok:!0,node:n.every(u=>bo.has(u)?!0:u==="fill"?Ep(e.fill,a.fill):e[u]===a[u])&&Pt(e,a,t,bo)?e:a}}return{ok:!1,node:e,reason:`${e.type} 节点没有可改的样式字段(组没有自己的样式;样式属于 text / image / shape / line / path / qrcode / chart / table / timeline / progress)`}}function wl(e,t){if(!ge(t)||!lr(t,lu))return{ok:!1,node:e,reason:`几何键只接受 ${[...lu].join(" / ")}`};if(Object.keys(t).length===0)return{ok:!1,node:e,reason:"几何键至少要写一个"};const n=t,r=Object.keys(n);if(e.type==="group"&&r.some(u=>u==="width"||u==="height"))return{ok:!1,node:e,reason:"组没有自己的 width / height(由子节点撑开)"};const o=e.type==="image"||e.type==="shape"||e.type==="path";for(const u of["flipX","flipY"])if(u in n){if(!o)return{ok:!1,node:e,reason:`flipX / flipY 只用于 image / shape / path(${e.type} 不能翻转)`};if(typeof n[u]!="boolean")return{ok:!1,node:e,reason:`${u} 必须是 true / false(true 翻转,false 恢复)`}}if(r.filter(u=>u!=="flipX"&&u!=="flipY").map(u=>n[u]).some(u=>typeof u!="number"||!Number.isFinite(u)))return{ok:!1,node:e,reason:"几何值必须都是有限数字"};if(("scale"in n?n.scale:e.scale)<=0)return{ok:!1,node:e,reason:"scale 必须大于 0"};if(e.type!=="group"){const u="width"in n?n.width:e.width,d="height"in n?n.height:e.height;if(u<=0||d<=0)return{ok:!1,node:e,reason:"width 和 height 必须都大于 0"}}const l=u=>u in n?n[u]?{[u]:!0}:{[u]:void 0}:{},a={...e,..."x"in t?{x:t.x}:{},..."y"in t?{y:t.y}:{},..."rotation"in t?{rotation:t.rotation}:{},..."scale"in t?{scale:t.scale}:{},...e.type!=="group"&&"width"in t?{width:t.width}:{},...e.type!=="group"&&"height"in t?{height:t.height}:{},...l("flipX"),...l("flipY")};if(o&&("flipX"in n&&!n.flipX&&delete a.flipX,"flipY"in n&&!n.flipY&&delete a.flipY),e.type==="line"&&e.points&&("width"in t||"height"in t)){const u=a,d=ea(e.points.map(f=>({x:"width"in t?f.x*(u.width/e.width):f.x,y:"height"in t?f.y*(u.height/e.height):f.y})),u.width,u.height);return d?{ok:!0,node:{...u,points:d}}:{ok:!1,node:e,reason:"改 width / height 后顶点装不进新的节点盒:把 points 一起调整,或先去掉 points"}}return{ok:!0,node:r.every(u=>e[u]===a[u])?e:a}}function Wa(e,t,n,r){var d;const o=e.slides.find(f=>f.id===t);if(!o||!Array.isArray(r)||r.length===0)return e;const i=[],s=new Set;for(const f of r){if(!ge(f)||!Ed(f.path)||!ge(f.patch))return e;const p=ue(f.path);if(s.has(p))return e;s.add(p),i.push(f.path)}let l;try{l=Li(o.nodes)}catch{return e}if(!Xe(o.nodes,{kind:n,paths:i},l))return e;const a=new Map;let c=!1;for(const f of r){const p=ue(f.path),w=(d=l.get(p))==null?void 0:d.node;if(!w)return e;const k=n==="content"?au(w,f.patch):n==="style"?yl(w,f.patch):wl(w,f.patch);if(!k.ok)return e;k.node!==w&&a.set(p,C=>{const m=n==="content"?au(C,f.patch):n==="style"?yl(C,f.patch):wl(C,f.patch);return m.ok?m.node:(c=!0,C)})}if(a.size===0)return e;const u=I0(o.nodes,a,{recenterChangedGroups:n==="geometry"});return!u||c||u===o.nodes||Ie(u)?e:Un(e,t,()=>u)}function XE(e,t){var d;if(!ge(t)||!Uo(t,UE)||typeof t.slideId!="string"||!Ed(t.path)||!ge(t.patch)||!Uo(t.patch,KE))return e;const n=e.slides.find(f=>f.id===t.slideId);if(!n)return e;let r;try{r=Li(n.nodes)}catch{return e}const o=[t.path];if(!Xe(n.nodes,{kind:"geometry",paths:o},r)||!Xe(n.nodes,{kind:"style",paths:o},r))return e;const i=cE(n.nodes,t.path);if(!i||i.hidden)return e;const s=(d=r.get(ue(t.path)))==null?void 0:d.node;if(!s||s.type!=="image")return e;const l=t.patch,a=wl(s,{x:l.x,y:l.y,width:l.width,height:l.height});if(!a.ok)return e;const c=yl(a.node,{framing:l.framing});if(!c.ok||c.node===s)return e;const u=I0(n.nodes,new Map([[ue(t.path),()=>c.node]]),{recenterChangedGroups:!0});return!u||u===n.nodes||Ie(u)?e:Un(e,t.slideId,()=>u)}function QE(e){return e.type==="text"?"文本":e.type==="image"?"图片":e.type==="shape"?"形状":e.type==="path"?"图形":e.type==="qrcode"?"二维码":e.type==="chart"?"图表":e.type==="table"?"表格":e.type==="timeline"?"时间线":e.type==="progress"?"进度":e.lineKind==="arrow"?"箭头":"直线"}function qE(e){if(!ge(e))return null;const t=["name","locked","hidden","scale"],n=t.filter(l=>l in e).length;if(n!==0&&n!==t.length)return null;const r=n===t.length,o=["id","type","x","y","width","height","rotation",...t],i={text:["text","fontSize","fontFamily","textFill","align","fontWeight"],image:["src","alt","fit","framing"],shape:["shape","fill","stroke","strokeWidth"],line:["lineKind","stroke","strokeWidth"]};if(typeof e.type!="string"||!(e.type in i)||!lr(e,new Set([...o,...i[e.type]])))return null;const s={id:e.id,name:r?e.name:QE(e),locked:r?e.locked:!1,hidden:r?e.hidden:!1,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,scale:r?e.scale:1};return e.type==="text"?no(e.textFill)?{...s,type:"text",text:e.text,fontSize:e.fontSize,fontFamily:e.fontFamily,textFill:$i(e.textFill),align:e.align,fontWeight:e.fontWeight}:null:e.type==="image"?vt(e.framing)?{...s,type:"image",src:e.src,alt:e.alt,fit:e.fit,framing:ht(e.framing)}:null:e.type==="shape"?ra(e.fill)?{...s,type:"shape",shape:e.shape,fill:ou(e.fill),stroke:e.stroke,strokeWidth:e.strokeWidth}:null:{...s,type:"line",lineKind:e.lineKind,stroke:e.stroke,strokeWidth:e.strokeWidth}}function Ba(e,t){const n={};for(const r of Object.keys(e))t.has(r)&&(n[r]=e[r]);return n}function ZE(e,t){if(e.type==="group"||!ge(t))return{ok:!1,node:e};if(!lr(t,{text:new Set(["x","y","width","height","rotation","text","fontSize","fontFamily","textFill","align","fontWeight"]),image:new Set(["x","y","width","height","rotation","src","alt","fit","framing"]),shape:new Set(["x","y","width","height","rotation","shape","fill","stroke","strokeWidth"]),line:new Set(["x","y","width","height","rotation","lineKind","stroke","strokeWidth"]),path:new Set(["x","y","width","height","rotation"]),qrcode:new Set(["x","y","width","height","rotation"]),chart:new Set(["x","y","width","height","rotation"]),table:new Set(["x","y","width","height","rotation"]),timeline:new Set(["x","y","width","height","rotation"]),progress:new Set(["x","y","width","height","rotation"])}[e.type]))return{ok:!1,node:e};if(Object.keys(t).length===0)return{ok:!0,node:e};let r=e;const o=Ba(t,lu),i=Ba(t,iu),s=Ba(t,su);for(const[l,a]of[["geometry",o],["content",i],["style",s]]){if(Object.keys(a).length===0)continue;const c=l==="geometry"?wl(r,a):l==="content"?au(r,a):yl(r,a);if(!c.ok)return{ok:!1,node:e};r=c.node}return{ok:!0,node:r}}function On(e){return Array.isArray(e)&&e.length>0&&e.every(t=>typeof t=="string"&&t.length>0)}const JE=new Set(["id","name","width","height","background","nodes","guides"]);function ev(e){if(!ge(e)||!lr(e,JE))return null;const{id:t,name:n,width:r,height:o,background:i,nodes:s}=e;if(typeof t!="string"||t.trim().length===0||typeof n!="string"||typeof r!="number"||typeof o!="number"||!oa(r,o).ok||!tw(i)||!Array.isArray(s)||Ie(s))return null;const l="guides"in e?bd(e.guides,r,o):[];return l?{id:t,name:n,width:r,height:o,background:Ds(i),nodes:N0(s),...l.length>0?{guides:l}:{}}:null}function zn(e,t,n){return n.ok?Un(e,t,()=>n.nodes):e}function nw(e,t){try{switch(t.type){case"slide/add-after-active":{if(e.slides.length>=Ho)return e;const n=e.slides.findIndex(s=>s.id===e.activeSlideId);if(n<0)return e;const r=t.slideId??me();if(typeof r!="string"||r.trim().length===0||e.slides.some(s=>s.id===r))return e;const o=e.slides[n],i={id:r,name:`Page ${e.slides.length+1}`,width:o.width,height:o.height,background:Ds(o.background),nodes:[]};return{...e,activeSlideId:r,slides:[...e.slides.slice(0,n+1),i,...e.slides.slice(n+1)]}}case"slide/duplicate":{if(e.slides.length>=Ho)return e;const n=e.slides.findIndex(c=>c.id===t.slideId);if(n<0)return e;const r=t.duplicateSlideId??me();if(typeof r!="string"||r.trim().length===0||e.slides.some(c=>c.id===r))return e;const o=e.slides[n],i=O0(o.nodes,t.nodeIdFactory),s=vp(o.nodes),l=vp(i);if(Ie(i)||[...l].some(c=>s.has(c)))return e;const a={...o,id:r,name:`${o.name} copy`,background:Ds(o.background),nodes:i};return{...e,activeSlideId:r,slides:[...e.slides.slice(0,n+1),a,...e.slides.slice(n+1)]}}case"slide/insert":{if(!Array.isArray(t.slides)||t.slides.length===0||t.afterSlideId!==void 0&&t.replaceSlideId!==void 0)return e;const n=t.replaceSlideId!==void 0,r=t.replaceSlideId??t.afterSlideId??e.activeSlideId,o=e.slides.findIndex(c=>c.id===r);if(o<0)return e;const i=n?e.slides.filter((c,u)=>u!==o):e.slides;if(i.length+t.slides.length>Ho)return e;const s=new Set(i.map(c=>c.id)),l=[];for(const c of t.slides){const u=ev(c);if(!u||s.has(u.id))return e;s.add(u.id),l.push(u)}const a=n?o:o+1;return{...e,activeSlideId:l[0].id,slides:[...i.slice(0,a),...l,...i.slice(a)]}}case"slide/delete":{if(e.slides.length<=1)return e;const n=e.slides.findIndex(i=>i.id===t.slideId);if(n<0)return e;const r=e.slides.filter(i=>i.id!==t.slideId),o=r[Math.min(n,r.length-1)];return{...e,slides:r,activeSlideId:e.activeSlideId===t.slideId?o.id:e.activeSlideId}}case"slide/select":return t.slideId===e.activeSlideId||!e.slides.some(n=>n.id===t.slideId)?e:{...e,activeSlideId:t.slideId};case"slide/reorder":{if(!Number.isInteger(t.targetIndex)||t.targetIndex<0)return e;const n=e.slides.findIndex(s=>s.id===t.slideId);if(n<0)return e;const r=Math.min(t.targetIndex,e.slides.length-1);if(r===n)return e;const o=[...e.slides],[i]=o.splice(n,1);return o.splice(r,0,i),{...e,slides:o}}case"document/restyle":return zE(e,t);case"document/find-replace":{const n=ge(t)&&typeof t.find=="string"?t.find:"";if(n==="")return e;const r=ge(t)&&typeof t.replace=="string"?t.replace:"",o=ge(t)&&typeof t.slideId=="string"?t.slideId:null;return qy(e,n,r,o).document}case"slide/update":return!ge(t.patch)||!lr(t.patch,new Set(["name","background"]))||"name"in t.patch&&typeof t.patch.name!="string"||"background"in t.patch&&!tw(t.patch.background)?e:js(e,t.slideId,n=>{const r=t.patch.name??n.name,o=t.patch.background??n.background;return r===n.name&&HE(o,n.background)?n:{...n,name:r,background:Ds(o)}});case"slide/resize":return oa(t.width,t.height).ok?js(e,t.slideId,n=>n.width===t.width&&n.height===t.height?n:{...n,width:t.width,height:t.height}):e;case"guides/set":return Array.isArray(t.guides)?js(e,t.slideId,n=>{const r=bd(t.guides,n.width,n.height);if(!r)return n;if(r.length===0){if(!n.guides)return n;const{guides:o,...i}=n;return i}return n.guides&&wE(n.guides,r)?n:{...n,guides:r}}):e;case"node/set-locked":case"node/set-hidden":case"node/rename":{if(!Ed(t.path)||t.type==="node/set-locked"&&typeof t.locked!="boolean"||t.type==="node/set-hidden"&&typeof t.hidden!="boolean"||t.type==="node/rename"&&typeof t.name!="string")return e;const n=e.slides.find(r=>r.id===t.slideId);return!n||!Xe(n.nodes,{kind:"metadata",paths:[t.path]})?e:Un(e,t.slideId,r=>ml(r,t.path,o=>t.type==="node/set-locked"?o.locked===t.locked?o:{...o,locked:t.locked}:t.type==="node/set-hidden"?o.hidden===t.hidden?o:{...o,hidden:t.hidden}:o.name===t.name?o:{...o,name:t.name}))}case"node/update-content":return Wa(e,t.slideId,"content",t.updates);case"node/update-style":return Wa(e,t.slideId,"style",t.updates);case"node/update-geometry":return Wa(e,t.slideId,"geometry",t.updates);case"node/update-image-crop":return XE(e,t);case"node/delete":{if(!$n(t.parentPath)||!On(t.nodeIds))return e;const n=e.slides.find(r=>r.id===t.slideId);return n?zn(e,t.slideId,kp(n.nodes,t.parentPath,t.nodeIds)):e}case"node/reorder":{if(!$n(t.parentPath)||!On(t.nodeIds)||!["forward","backward","front","back"].includes(t.direction))return e;const n=e.slides.find(i=>i.id===t.slideId);if(!n)return e;const r=Jn(n.nodes,t.parentPath,t.nodeIds);if(!r.ok||!Xe(n.nodes,{kind:"structure",paths:r.selectedNodes.map(i=>[...t.parentPath,i.id])}))return e;const o=E2(n.nodes,t.parentPath,t.nodeIds,t.direction);return o===n.nodes||Ie(o)?e:Un(e,t.slideId,()=>o)}case"node/reorder-above":{if(!$n(t.parentPath)||!On(t.nodeIds)||typeof t.targetNodeId!="string"||t.targetNodeId.length===0||t.nodeIds.includes(t.targetNodeId))return e;const n=e.slides.find(i=>i.id===t.slideId);if(!n)return e;const r=Jn(n.nodes,t.parentPath,t.nodeIds);if(!r.ok||!r.children.some(i=>i.id===t.targetNodeId)||!Xe(n.nodes,{kind:"structure",paths:r.selectedNodes.map(i=>[...t.parentPath,i.id])}))return e;const o=v2(n.nodes,t.parentPath,t.nodeIds,t.targetNodeId);return o===n.nodes||Ie(o)?e:Un(e,t.slideId,()=>o)}case"node/clone":{if(!$n(t.parentPath)||!On(t.nodeIds))return e;const n=e.slides.find(r=>r.id===t.slideId);return n?zn(e,t.slideId,aE(n.nodes,t.parentPath,t.nodeIds,t.idFactory)):e}case"node/insert-children":{if(!$n(t.parentPath)||!Array.isArray(t.nodes))return e;const n=e.slides.find(r=>r.id===t.slideId);return n?zn(e,t.slideId,tu(n.nodes,t.parentPath,t.nodes,t.index)):e}case"group/create":{if(!$n(t.parentPath)||!On(t.nodeIds))return e;const n=e.slides.find(r=>r.id===t.slideId);return n?zn(e,t.slideId,iE(n.nodes,t.parentPath,t.nodeIds,{id:t.groupId,name:t.name})):e}case"group/ungroup":{if(!$n(t.parentPath)||!On(t.groupIds)||t.mode!=="one-level"&&t.mode!=="all-level")return e;const n=e.slides.find(r=>r.id===t.slideId);return n?zn(e,t.slideId,sE(n.nodes,t.parentPath,t.groupIds,t.mode)):e}case"element/add":{const n=e.slides.find(o=>o.id===t.slideId);if(!n)return e;const r=qE(t.element);return r?zn(e,t.slideId,tu(n.nodes,[],[r])):e}case"element/update":{const n=e.slides.find(s=>s.id===t.slideId);if(!n||typeof t.elementId!="string")return e;const r=n.nodes.find(s=>s.id===t.elementId);if(!r||r.type==="group"||!Xe(n.nodes,{kind:"geometry",paths:[[r.id]]}))return e;const o=ZE(r,t.patch);if(!o.ok||o.node===r)return e;const i=ml(n.nodes,[r.id],()=>o.node);return Ie(i)?e:Un(e,t.slideId,()=>i)}case"element/delete":{if(!On(t.elementIds))return e;const n=e.slides.find(r=>r.id===t.slideId);return n?zn(e,t.slideId,kp(n.nodes,[],t.elementIds)):e}case"element/reorder":return nw(e,{type:"node/reorder",slideId:t.slideId,parentPath:[],nodeIds:t.elementIds,direction:t.direction});default:return e}}catch{return e}}function GM(e,t){return nw(e,t)}const tv=new Set(["documentVersion","slides","activeSlideId"]),Cp=new Set(["id","name","width","height","background","nodes"]),nv=new Set(["guides"]),rv=new Set(["type","color"]),ov=new Set(["type","from","to","angle"]),iv=new Set(["type","stops","angle"]),sv=new Set(["type","stops"]),Ad=new Set(["type"]),lv=new Set(["type","color","patternColor","pattern","size"]),av=new Set(["type","src","fit"]),rw=new Set(["type","src","fit","framing"]),cv=new Set(["id","name","locked","hidden","type","x","y","rotation","scale","children"]),uv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","text","fontSize","fontFamily","textFill","align","fontWeight"]),ow=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","src","alt","fit"]),fv=new Set([...ow,"framing"]),dv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","shape","fill","stroke","strokeWidth"]),hv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","lineKind","stroke","strokeWidth"]),pv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","d","viewBox","fill","stroke","strokeWidth"]),gv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","payload","dark","light"]),mv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","chartKind","labels","values","accent"]),yv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","chartKind","labels","series"]),wv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","rows","cols","cells"]),kv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","items"]),Sv=new Set(["accent","opacity","shadow","filter","blendMode"]),xv=new Set(["accent","horizontal","ink","opacity","shadow","filter","blendMode"]),bv=new Set(["id","name","locked","hidden","type","x","y","width","height","rotation","scale","progressKind","value"]),Ev=new Set(["accent","opacity","shadow","filter","blendMode"]),iw=new Set(["label","trackFill","accent","opacity","shadow","filter","blendMode"]),vv=new Set([...iw,"ink"]),Av=new Set(["topLeft","topRight","bottomRight","bottomLeft"]);function Cv(e){return!de(e)||!Ne(e,Av)?!1:Ee(e.topLeft)&&Ee(e.topRight)&&Ee(e.bottomRight)&&Ee(e.bottomLeft)}function Tv(e){const t=e;return{topLeft:t.topLeft,topRight:t.topRight,bottomRight:t.bottomRight,bottomLeft:t.bottomLeft}}function de(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ne(e){return typeof e=="number"&&Number.isFinite(e)}function Ne(e,t){const n=Object.keys(e);return n.length===t.size&&n.every(r=>t.has(r))}function sw(e){return typeof e=="string"&&e.trim().length>0}function Oi(e){return e==="cover"||e==="contain"}function ia(e,t){if(!de(e))return null;if(e.type==="solid"&&Ne(e,rv)&&F(e.color))return{type:"solid",color:e.color};if(e.type==="linear-gradient"&&Ne(e,ov)&&F(e.from)&&F(e.to)&&ne(e.angle))return{type:"linear-gradient",from:e.from,to:e.to,angle:e.angle};if(t>=8&&e.type==="linear-gradient"&&Ne(e,iv)){const n=gl(e.stops);if(n&&ne(e.angle))return{type:"linear-gradient",stops:n,angle:e.angle}}if(t>=12&&e.type==="radial-gradient"&&Ne(e,sv)){const n=gl(e.stops);if(n)return{type:"radial-gradient",stops:n}}return null}function _v(e,t){return de(e)&&e.type==="transparent"&&Ne(e,Ad)?{type:"transparent"}:de(e)&&e.type==="pattern"?t<32||!Ne(e,lv)||!F(e.color)||!F(e.patternColor)||!n0(e.pattern)||!r0(e.size)?null:{type:"pattern",color:e.color,patternColor:e.patternColor,pattern:e.pattern,size:e.size}:de(e)&&e.type==="image"?t<16||!Ne(e,rw)||typeof e.src!="string"||!Oi(e.fit)||!vt(e.framing)?null:{type:"image",src:e.src,fit:e.fit,framing:ht(e.framing)}:ia(e,t)}function lw(e,t){if(de(e)&&e.type==="transparent")return t<11||!Ne(e,Ad)?null:{type:"transparent"};if(de(e)&&e.type==="image"){const n=t>=4?rw:av;return!Ne(e,n)||typeof e.src!="string"||!Oi(e.fit)||t>=4&&!vt(e.framing)?null:{type:"image",src:e.src,fit:e.fit,framing:t>=4?ht(e.framing):Mn()}}return ia(e,t)}function Iv(e,t){if(de(e)&&e.type==="transparent")return Ne(e,Ad)?{type:"transparent"}:null;if(de(e)&&e.type==="image"){if(t<19)return null;const n=lw(e,t);return n!==null&&n.type==="image"?n:null}return ia(e,t)}function Pv(e){return!sw(e.id)||typeof e.name!="string"||typeof e.locked!="boolean"||typeof e.hidden!="boolean"?null:{id:e.id,name:e.name,locked:e.locked,hidden:e.hidden}}const Mv=new Set(["spans"]),Rv=new Set(["opacity","shadow"]),Nv=new Set(["spans","lineHeight","letterSpacing","italic","opacity","shadow"]),Lv=new Set(["cornerRadius","opacity","shadow"]),aw=new Set(["opacity","shadow","filter","blendMode"]),Fv=new Set(["spans","lineHeight","letterSpacing","italic","opacity","shadow","filter","blendMode"]),cw=new Set(["cornerRadius","opacity","shadow","filter","blendMode"]),uw=new Set(["opacity","shadow","filter","blendMode","dash","cap"]),fw=aw,$v=new Set(["spans","lineHeight","letterSpacing","italic","opacity","shadow","filter","blendMode","stroke","strokeWidth"]),dw=cw,hw=uw,pw=fw,gw=new Set(["spans","lineHeight","letterSpacing","italic","vertical","opacity","shadow","filter","blendMode","stroke","strokeWidth"]),mw=new Set([...pw,"cornerRadius"]),yw=new Set([...mw,"stroke","strokeWidth"]),Ov=new Set([...yw,"flipX","flipY"]),ww=new Set([...gw,"effect"]),zv=new Set([...ww,"verticalAlign","paragraphSpacing","list"]),kw=dw,Sw=new Set([...kw,"starInnerRatio","bubbleTailX"]),xw=new Set([...Sw,"flipX","flipY"]),bw=new Set([...xw,"strokeDash"]),Dv=new Set([...bw,"cornerRadii"]),Ew=hw,vw=new Set([...Ew,"startCap","endCap"]),jv=new Set([...vw,"points"]),Aw=new Set(["ecl","moduleStyle","opacity","shadow","filter","blendMode"]),Cw=new Set([...Aw,"logoSrc"]),Wv=new Set([...Cw,"quietZone"]),Tw=new Set(["showValues","opacity","shadow","filter","blendMode"]),_w=new Set([...Tw,"barMode"]),Iw=new Set([..._w,"showLegend"]),Pw=new Set([...Iw,"showTicks"]),Bv=new Set([...Pw,"ink"]),Mw=new Set(["headerRow","striped","opacity","shadow","filter","blendMode"]),Rw=new Set([...Mw,"ink","headerFill","stripeFill","colWidths"]),Hv=new Set([...Rw,"grid","lineColor","lineWidth","fontSize"]),Nw=new Set(["opacity","shadow","filter","blendMode","dash","cap","join","fillRule"]),Uv=new Set([...Nw,"flipX","flipY"]);function yt(e,t,n){const r=Object.keys(e);if(!n)return Ne(e,t);const o=r.filter(i=>!n.has(i));return o.length!==t.size||!o.every(i=>t.has(i))?!1:r.every(i=>t.has(i)||n.has(i))}function Rt(e,t){return t<=4?null:t===5?e==="text"?Mv:null:t===6?e==="text"?Nv:e==="shape"?Lv:e==="image"||e==="line"?Rv:null:t===7?e==="text"?Fv:e==="shape"?cw:e==="line"?uw:e==="image"?aw:null:t===8?e==="text"?$v:e==="shape"?dw:e==="line"?hw:e==="image"?fw:null:e==="text"?t>=20?zv:t>=17?ww:gw:e==="shape"?t>=42?Dv:t>=41?bw:t>=40?xw:t>=21?Sw:kw:e==="qrcode"?t>=30?Wv:t>=25?Cw:Aw:e==="chart"?t>=43?Bv:t>=33?Pw:t>=31?Iw:t>=27?_w:Tw:e==="table"?t>=44?Hv:t>=35?Rw:Mw:e==="timeline"?t>=37?xv:Sv:e==="progress"?t>=43?vv:t>=39?iw:Ev:e==="line"?t>=14?jv:t>=13?vw:Ew:e==="image"?t>=40?Ov:t>=29?yw:t>=28?mw:pw:e==="path"?t>=40?Uv:Nw:null}function Kv(e,t){if(e.type==="group")return Ne(e,cv);if(e.type==="text")return yt(e,uv,Rt("text",t));if(e.type==="image")return yt(e,t>=4?fv:ow,Rt("image",t))&&(t>=28||!("cornerRadius"in e))&&(t>=29||!("stroke"in e||"strokeWidth"in e));if(e.type==="shape")return yt(e,dv,Rt("shape",t));if(e.type==="line")return yt(e,hv,Rt("line",t));if(e.type==="path")return t>=15&&yt(e,pv,Rt("path",t));if(e.type==="qrcode")return t>=22&&yt(e,gv,Rt("qrcode",t))&&(t>=23||!("moduleStyle"in e))&&(t>=25||!("logoSrc"in e))&&(t>=30||!("quietZone"in e));if(e.type==="chart"){if(t<24)return!1;const n=t>=26?yv:mv;return yt(e,n,Rt("chart",t))&&(t>=27||!("barMode"in e))&&(t>=30||e.chartKind!=="radar")&&(t>=31||!("showLegend"in e))&&(t>=33||!("showTicks"in e))}return e.type==="table"?t<34?!1:yt(e,wv,Rt("table",t)):e.type==="timeline"?t<36?!1:yt(e,kv,Rt("timeline",t)):e.type==="progress"?t<38?!1:yt(e,bv,Rt("progress",t)):!1}function mt(e,t){const n={};if("opacity"in e){if(!Yf(e.opacity))return null;n.opacity=e.opacity}if("shadow"in e){const r=Zl(e.shadow);if(!r)return null;n.shadow=r}if("filter"in e){const r=Jl(e.filter,t>=18);if(!r)return null;n.filter=r}if("blendMode"in e){if(!Zf(e.blendMode))return null;n.blendMode=e.blendMode}return t>=6||Object.keys(n).length===0?n:null}function Lw(e,t,n,r,o){if(!de(e)||t>dt||!Kv(e,o))return null;const i=Pv(e);if(!i||r.ids.has(i.id)||!ne(e.x)||!ne(e.y)||!ne(e.rotation)||!ne(e.scale)||e.scale<=0)return null;const s=n*e.scale;if(!Number.isFinite(s)||s<Ty||s>_y||(r.ids.add(i.id),r.count+=1,r.count>Ii))return null;if(e.type==="group"){if(!Array.isArray(e.children)||e.children.length===0)return null;const a=[];for(const u of e.children){const d=Lw(u,t+1,s,r,o);if(!d)return null;a.push(d)}return{...i,type:"group",x:e.x,y:e.y,rotation:e.rotation,scale:e.scale,children:a}}if(!ne(e.width)||!ne(e.height)||e.width<=0||e.height<=0)return null;const l={...i,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,scale:e.scale};if(e.type==="text"){const a=ia(e.textFill,o);if(typeof e.text!="string"||!ne(e.fontSize)||typeof e.fontFamily!="string"||!a||e.align!=="left"&&e.align!=="center"&&e.align!=="right"&&!(e.align==="justify"&&o>=20)||e.fontWeight!=="normal"&&e.fontWeight!=="bold")return null;let c;if("spans"in e){const d=Uf(e.spans,e.text.length);if(!d||d.length===0||o<16&&Pb(d)||o<20&&Mb(d))return null;c=d}if(o>=6&&("lineHeight"in e&&!Vf(e.lineHeight)||"letterSpacing"in e&&!Gf(e.letterSpacing)||"italic"in e&&e.italic!==!0)||o>=8&&("stroke"in e&&!F(e.stroke)||"strokeWidth"in e&&!xi(e.strokeWidth))||o>=9&&"vertical"in e&&e.vertical!==!0||"effect"in e&&!Kf(e.effect)||"verticalAlign"in e&&!Qf(e.verticalAlign)||"paragraphSpacing"in e&&!Xf(e.paragraphSpacing)||"list"in e&&!qf(e.list))return null;const u=mt(e,o);return u?{...l,type:"text",text:e.text,...c?{spans:c}:{},fontSize:e.fontSize,fontFamily:e.fontFamily,textFill:a,align:e.align,fontWeight:e.fontWeight,..."lineHeight"in e?{lineHeight:e.lineHeight}:{},..."letterSpacing"in e?{letterSpacing:e.letterSpacing}:{},..."italic"in e?{italic:!0}:{},..."vertical"in e?{vertical:!0}:{},..."stroke"in e?{stroke:e.stroke}:{},..."strokeWidth"in e?{strokeWidth:e.strokeWidth}:{},..."effect"in e?{effect:{...e.effect}}:{},..."verticalAlign"in e?{verticalAlign:e.verticalAlign}:{},..."paragraphSpacing"in e?{paragraphSpacing:e.paragraphSpacing}:{},..."list"in e?{list:e.list}:{},...u}:null}if(e.type==="image"){if(typeof e.src!="string"||typeof e.alt!="string"||!Oi(e.fit)||o>=4&&!vt(e.framing)||o>=28&&"cornerRadius"in e&&!Ee(e.cornerRadius)||o>=29&&("stroke"in e&&!F(e.stroke)||"strokeWidth"in e&&!xi(e.strokeWidth))||o>=40&&("flipX"in e&&typeof e.flipX!="boolean"||"flipY"in e&&typeof e.flipY!="boolean"))return null;const a=mt(e,o);return a?{...l,type:"image",src:e.src,alt:e.alt,fit:e.fit,framing:o>=4?ht(e.framing):Mn(),..."cornerRadius"in e?{cornerRadius:e.cornerRadius}:{},..."stroke"in e?{stroke:e.stroke}:{},..."strokeWidth"in e?{strokeWidth:e.strokeWidth}:{},...o>=40&&"flipX"in e?{flipX:e.flipX}:{},...o>=40&&"flipY"in e?{flipY:e.flipY}:{},...a}:null}if(e.type==="shape"){const a=lw(e.fill,o);if(!od(e.shape)||o<7&&n2(e.shape)||o<21&&S0(e.shape)||!a||typeof e.stroke!="string"||!ne(e.strokeWidth)||o>=6&&"cornerRadius"in e&&!Ee(e.cornerRadius))return null;if(o>=21){if("starInnerRatio"in e&&!cd(e.starInnerRatio)||"bubbleTailX"in e&&!ud(e.bubbleTailX))return null}else if("starInnerRatio"in e||"bubbleTailX"in e)return null;if(o>=40&&("flipX"in e&&typeof e.flipX!="boolean"||"flipY"in e&&typeof e.flipY!="boolean")||o>=41&&"strokeDash"in e&&!Ur(e.strokeDash)||o>=42&&"cornerRadii"in e&&!Cv(e.cornerRadii))return null;const c=mt(e,o);return c?{...l,type:"shape",shape:e.shape,fill:a,stroke:e.stroke,strokeWidth:e.strokeWidth,..."cornerRadius"in e?{cornerRadius:e.cornerRadius}:{},..."starInnerRatio"in e?{starInnerRatio:e.starInnerRatio}:{},..."bubbleTailX"in e?{bubbleTailX:e.bubbleTailX}:{},...o>=40&&"flipX"in e?{flipX:e.flipX}:{},...o>=40&&"flipY"in e?{flipY:e.flipY}:{},...o>=41&&"strokeDash"in e?{strokeDash:e.strokeDash}:{},...o>=42&&"cornerRadii"in e?{cornerRadii:Tv(e.cornerRadii)}:{},...c}:null}if(e.type==="line"){if(e.lineKind!=="line"&&e.lineKind!=="arrow"||typeof e.stroke!="string"||!ne(e.strokeWidth)||o>=7&&("dash"in e&&!Ur(e.dash)||"cap"in e&&!ki(e.cap))||o>=13&&("startCap"in e&&!Si(e.startCap)||"endCap"in e&&!Si(e.endCap)))return null;let a;if(o>=14&&"points"in e){const u=ea(e.points,l.width,l.height);if(!u)return null;a=u}const c=mt(e,o);return c?{...l,type:"line",lineKind:e.lineKind,stroke:e.stroke,strokeWidth:e.strokeWidth,..."dash"in e?{dash:e.dash}:{},..."cap"in e?{cap:e.cap}:{},..."startCap"in e?{startCap:e.startCap}:{},..."endCap"in e?{endCap:e.endCap}:{},...a?{points:a}:{},...c}:null}if(e.type==="path"){const a=rd(e.viewBox),c=Iv(e.fill,o);if(!yd(e.d)||!a||!c||!F(e.stroke)||!td(e.strokeWidth)||"dash"in e&&!nd(e.dash)||"cap"in e&&!ki(e.cap)||"join"in e&&!Jf(e.join)||"fillRule"in e&&!ed(e.fillRule)||o>=40&&("flipX"in e&&typeof e.flipX!="boolean"||"flipY"in e&&typeof e.flipY!="boolean"))return null;const u=mt(e,o);return u?{...l,type:"path",d:e.d,viewBox:a,fill:c,stroke:e.stroke,strokeWidth:e.strokeWidth,..."dash"in e?{dash:e.dash}:{},..."cap"in e?{cap:e.cap}:{},..."join"in e?{join:e.join}:{},..."fillRule"in e?{fillRule:e.fillRule}:{},...o>=40&&"flipX"in e?{flipX:e.flipX}:{},...o>=40&&"flipY"in e?{flipY:e.flipY}:{},...u}:null}if(e.type==="chart"){if(o>=26){if(!hi(e.chartKind)||!Array.isArray(e.labels)||o<30&&e.chartKind==="radar")return null;const c=e.labels;if(!c.every(to)||c.length===0||c.length>Br||!vf(e.series,c.length)||"barMode"in e&&(o<27||!bf(e.barMode))||"showLegend"in e&&(o<31||typeof e.showLegend!="boolean")||"showTicks"in e&&(o<33||typeof e.showTicks!="boolean")||"ink"in e&&(o<43||!F(e.ink)))return null;const u=mt(e,o);return u?{...l,type:"chart",chartKind:e.chartKind,labels:c.map(d=>d),series:e.series.map(d=>({values:[...d.values],color:d.color,..."name"in d?{name:d.name}:{}})),..."showValues"in e?{showValues:!0}:{},..."barMode"in e?{barMode:e.barMode}:{},..."showLegend"in e?{showLegend:e.showLegend}:{},..."showTicks"in e?{showTicks:e.showTicks}:{},..."ink"in e?{ink:e.ink}:{},...u}:null}if(!hi(e.chartKind)||!zx(e.labels,e.values)||!F(e.accent))return null;const a=mt(e,o);return a?{...l,type:"chart",chartKind:e.chartKind,labels:e.labels.map(c=>c),series:[{values:e.values.map(c=>c),color:e.accent}],..."showValues"in e?{showValues:!0}:{},...a}:null}if(e.type==="qrcode"){if(!fd(e.payload)||!F(e.dark)||!F(e.light)||"ecl"in e&&!dd(e.ecl)||"moduleStyle"in e&&(o<23||!hd(e.moduleStyle))||"logoSrc"in e&&(o<25||!gd(e.logoSrc))||"quietZone"in e&&(o<30||!pd(e.quietZone)))return null;const a=mt(e,o);return a?{...l,type:"qrcode",payload:e.payload,dark:e.dark,light:e.light,..."ecl"in e?{ecl:e.ecl}:{},..."moduleStyle"in e?{moduleStyle:e.moduleStyle}:{},..."logoSrc"in e?{logoSrc:e.logoSrc}:{},..."quietZone"in e?{quietZone:e.quietZone}:{},...a}:null}if(e.type==="table"){if(o<34||!If(e.rows)||!Pf(e.cols)||!Array.isArray(e.cells)||!e.cells.every(_f)||e.cells.length!==e.rows*e.cols||"headerRow"in e&&typeof e.headerRow!="boolean"||"striped"in e&&typeof e.striped!="boolean"||"ink"in e&&(o<35||!F(e.ink))||"headerFill"in e&&(o<35||!F(e.headerFill))||"stripeFill"in e&&(o<35||!F(e.stripeFill))||"colWidths"in e&&(o<35||!Lf(e.colWidths,e.cols))||"grid"in e&&(o<44||!Mf(e.grid))||"lineColor"in e&&(o<44||!F(e.lineColor))||"lineWidth"in e&&(o<44||!Rf(e.lineWidth))||"fontSize"in e&&(o<44||!Nf(e.fontSize)))return null;const a=mt(e,o);return a?{...l,type:"table",rows:e.rows,cols:e.cols,cells:e.cells.map(c=>c),..."headerRow"in e?{headerRow:e.headerRow}:{},..."striped"in e?{striped:e.striped}:{},..."ink"in e?{ink:e.ink}:{},..."headerFill"in e?{headerFill:e.headerFill}:{},..."stripeFill"in e?{stripeFill:e.stripeFill}:{},..."colWidths"in e?{colWidths:e.colWidths.map(c=>c)}:{},..."grid"in e?{grid:e.grid}:{},..."lineColor"in e?{lineColor:e.lineColor}:{},..."lineWidth"in e?{lineWidth:e.lineWidth}:{},..."fontSize"in e?{fontSize:e.fontSize}:{},...a}:null}if(e.type==="timeline"){if(o<36||!Ff(e.items)||"accent"in e&&!F(e.accent)||o>=37&&("horizontal"in e&&typeof e.horizontal!="boolean"||"ink"in e&&!F(e.ink)))return null;const a=mt(e,o);return a?{...l,type:"timeline",items:e.items.map(c=>({text:c.text,..."label"in c?{label:c.label}:{}})),..."accent"in e?{accent:e.accent}:{},...o>=37&&"horizontal"in e?{horizontal:e.horizontal}:{},...o>=37&&"ink"in e?{ink:e.ink}:{},...a}:null}if(e.type==="progress"){if(o<38||!Tf(e.progressKind)||!Cf(e.value)||"accent"in e&&!F(e.accent)||o>=39&&("label"in e&&!Ql(e.label)||"trackFill"in e&&!F(e.trackFill))||"ink"in e&&(o<43||!F(e.ink)))return null;const a=mt(e,o);return a?{...l,type:"progress",progressKind:e.progressKind,value:e.value,..."accent"in e?{accent:e.accent}:{},...o>=39&&"label"in e?{label:e.label}:{},...o>=39&&"trackFill"in e?{trackFill:e.trackFill}:{},..."ink"in e?{ink:e.ink}:{},...a}:null}return null}function Yv(e,t){if(!de(e)||!(t>=10?yt(e,Cp,nv):Ne(e,Cp))||!sw(e.id)||typeof e.name!="string"||!ne(e.width)||!ne(e.height)||!oa(e.width,e.height).ok||!Array.isArray(e.nodes))return null;let n=[];if("guides"in e&&(t<10||(n=bd(e.guides,e.width,e.height),!n)))return null;const r=_v(e.background,t);if(!r)return null;const o={ids:new Set,count:0},i=[];for(const s of e.nodes){const l=Lw(s,1,1,o,t);if(!l)return null;i.push(l)}return{id:e.id,name:e.name,width:e.width,height:e.height,background:r,nodes:i,...n&&n.length>0?{guides:n}:{}}}function z(e,t){if(!de(e)||!Ne(e,tv)||e.documentVersion!==t||!Array.isArray(e.slides)||e.slides.length===0||e.slides.length>Ho||typeof e.activeSlideId!="string")return null;const n=[],r=new Set;for(const o of e.slides){const i=Yv(o,t);if(!i||r.has(i.id))return null;r.add(i.id),n.push(i)}return r.has(e.activeSlideId)?{documentVersion:44,slides:n,activeSlideId:e.activeSlideId}:null}function Vv(e){return z(e,3)}function Gv(e){return z(e,4)}function Xv(e){return z(e,5)}function Qv(e){return z(e,6)}function qv(e){return z(e,7)}function Zv(e){return z(e,8)}function Fw(e){return z(e,9)}function Jv(e){return z(e,10)}function eA(e){return z(e,11)}function tA(e){return z(e,12)}function nA(e){return z(e,13)}function rA(e){return z(e,14)}function oA(e){return z(e,15)}function iA(e){return z(e,16)}function sA(e){return z(e,17)}function lA(e){return z(e,18)}function aA(e){return z(e,19)}function cA(e){return z(e,20)}function uA(e){return z(e,21)}function fA(e){return z(e,22)}function dA(e){return z(e,23)}function hA(e){return z(e,24)}function pA(e){return z(e,25)}function gA(e){return z(e,26)}function mA(e){return z(e,27)}function yA(e){return z(e,28)}function wA(e){return z(e,29)}function kA(e){return z(e,30)}function SA(e){return z(e,31)}function xA(e){return z(e,32)}function bA(e){return z(e,33)}function EA(e){return z(e,34)}function vA(e){return z(e,35)}function AA(e){return z(e,36)}function CA(e){return z(e,37)}function TA(e){return z(e,38)}function _A(e){return z(e,39)}function IA(e){return z(e,40)}function PA(e){return z(e,41)}function MA(e){return z(e,42)}function RA(e){return z(e,43)}function NA(e){return z(e,44)}function LA(e){return de(e)&&e.type==="transparent"?{type:"transparent"}:{...Of(e,Jy)}}function FA(e){return de(e)&&e.type==="image"&&typeof e.src=="string"&&Oi(e.fit)?{type:"image",src:e.src,fit:e.fit,framing:Mn()}:{...Of(e,e0)}}function $A(e){const t=de(e.textFill)?e.textFill:typeof e.color=="string"?{type:"solid",color:e.color}:void 0;return{...Of(t,Zy)}}function OA(e){return e.type==="text"?"文本":e.type==="image"?"图片":e.type==="shape"?"形状":e.lineKind==="arrow"?"箭头":"直线"}function zA(e){if(!de(e)||typeof e.id!="string"||!ne(e.x)||!ne(e.y)||!ne(e.width)||!ne(e.height)||e.width<=0||e.height<=0||!ne(e.rotation))return null;const t={id:e.id,name:OA(e),locked:!1,hidden:!1,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,scale:1};return e.type==="text"?typeof e.text!="string"||!ne(e.fontSize)||typeof e.fontFamily!="string"?null:{...t,type:"text",text:e.text,fontSize:e.fontSize,fontFamily:e.fontFamily,textFill:$A(e),align:e.align==="center"||e.align==="right"?e.align:"left",fontWeight:e.fontWeight==="bold"?"bold":"normal"}:e.type==="image"?typeof e.src!="string"?null:{...t,type:"image",src:e.src,alt:typeof e.alt=="string"?e.alt:"Image",fit:Oi(e.fit)?e.fit:"cover",framing:Mn()}:e.type==="shape"?e.shape!=="rect"&&e.shape!=="ellipse"&&e.shape!=="triangle"||typeof e.stroke!="string"||!ne(e.strokeWidth)?null:{...t,type:"shape",shape:e.shape,fill:FA(e.fill),stroke:e.stroke,strokeWidth:e.strokeWidth}:e.type==="line"?e.lineKind!=="line"&&e.lineKind!=="arrow"||typeof e.stroke!="string"||!ne(e.strokeWidth)?null:{...t,type:"line",lineKind:e.lineKind,stroke:e.stroke,strokeWidth:e.strokeWidth}:null}function $w(e,t,n,r){if(e.trim().length>0&&!n.has(e))return n.add(e),e;let o=t,i=1;for(;n.has(o)||r.has(o);)o=`${t}-${i}`,i+=1;return n.add(o),o}function DA(e,t){if(!de(e)||typeof e.id!="string"||typeof e.name!="string"||!ne(e.width)||!ne(e.height)||!oa(e.width,e.height).ok||!Array.isArray(e.elements))return null;const n=e.elements.map((s,l)=>({nodeIndex:l,node:zA(s)})).filter(s=>s.node!==null),r=new Set(n.map(({node:s})=>s.id).filter(s=>s.trim().length>0)),o=new Set,i=n.map(({nodeIndex:s,node:l})=>({...l,id:$w(l.id,`legacy-node-${t}-${s}`,o,r)}));return{sourceId:e.id,sourceIndex:t,slide:{name:e.name,width:e.width,height:e.height,background:LA(e.background),nodes:i}}}function jA(e){if(!de(e)||e.documentVersion!==1&&e.documentVersion!==2||!Array.isArray(e.slides)||e.slides.length===0||e.slides.length>Ho||typeof e.activeSlideId!="string")return null;for(const l of e.slides)if(de(l)&&Array.isArray(l.elements)&&l.elements.length>Ii)return null;const t=e.slides.map((l,a)=>DA(l,a)).filter(l=>l!==null);if(t.length===0)return null;const n=new Set(t.map(({sourceId:l})=>l).filter(l=>l.trim().length>0)),r=new Set,o=t.map(({sourceId:l,sourceIndex:a,slide:c})=>({...c,id:$w(l,`legacy-slide-${a}`,r,n)})),i=t.findIndex(({sourceId:l})=>l===e.activeSlideId),s={documentVersion:9,slides:o,activeSlideId:o[i>=0?i:0].id};return Fw(s)}function Ow(e){return de(e)?e.documentVersion===44?NA(e):e.documentVersion===43?RA(e):e.documentVersion===42?MA(e):e.documentVersion===41?PA(e):e.documentVersion===40?IA(e):e.documentVersion===39?_A(e):e.documentVersion===38?TA(e):e.documentVersion===37?CA(e):e.documentVersion===36?AA(e):e.documentVersion===35?vA(e):e.documentVersion===34?EA(e):e.documentVersion===33?bA(e):e.documentVersion===32?xA(e):e.documentVersion===31?SA(e):e.documentVersion===30?kA(e):e.documentVersion===29?wA(e):e.documentVersion===28?yA(e):e.documentVersion===27?mA(e):e.documentVersion===26?gA(e):e.documentVersion===25?pA(e):e.documentVersion===24?hA(e):e.documentVersion===23?dA(e):e.documentVersion===22?fA(e):e.documentVersion===21?uA(e):e.documentVersion===20?cA(e):e.documentVersion===19?aA(e):e.documentVersion===18?lA(e):e.documentVersion===17?sA(e):e.documentVersion===16?iA(e):e.documentVersion===15?oA(e):e.documentVersion===14?rA(e):e.documentVersion===13?nA(e):e.documentVersion===12?tA(e):e.documentVersion===11?eA(e):e.documentVersion===10?Jv(e):e.documentVersion===9?Fw(e):e.documentVersion===8?Zv(e):e.documentVersion===7?qv(e):e.documentVersion===6?Qv(e):e.documentVersion===5?Xv(e):e.documentVersion===4?Gv(e):e.documentVersion===3?Vv(e):e.documentVersion===1||e.documentVersion===2?jA(e):null:null}function zw(e){return e.type==="transparent"?{type:"transparent"}:e.type==="image"?{type:"image",src:e.src,fit:e.fit,framing:ht(e.framing)}:e.type==="solid"?{type:"solid",color:e.color}:e.type==="pattern"?{type:"pattern",color:e.color,patternColor:e.patternColor,pattern:e.pattern,size:e.size}:e.type==="radial-gradient"?{type:"radial-gradient",stops:e.stops.map(t=>({...t}))}:"stops"in e?{type:"linear-gradient",stops:e.stops.map(t=>({...t})),angle:e.angle}:{type:"linear-gradient",from:e.from,to:e.to,angle:e.angle}}function WA(e,t){return{documentVersion:44,activeSlideId:e.activeSlideId,slides:e.slides.map(n=>({id:n.id,name:n.name,width:n.width,height:n.height,background:zw(n.background),nodes:C2(n.nodes,t),...n.guides?{guides:G0(n.guides)}:{}}))}}async function BA(e,t){const n=await Promise.all(e.slides.map(async r=>({id:r.id,name:r.name,width:r.width,height:r.height,background:zw(r.background),nodes:await T2(r.nodes,t),...r.guides?{guides:G0(r.guides)}:{}})));return{documentVersion:44,activeSlideId:e.activeSlideId,slides:n}}const Dw="slicer.images.v1",sa="img:";function HA(){try{const e=sessionStorage.getItem(Dw);return e?JSON.parse(e):{}}catch{return{}}}let la=HA();function jw(){try{sessionStorage.setItem(Dw,JSON.stringify(la))}catch{}}function UA(e){const t=Date.now().toString(36)+Math.random().toString(36).slice(2,7);return la[t]=e,jw(),sa+t}function Cd(e){return e.startsWith(sa)}function Ww(e){return Cd(e)?la[e.slice(sa.length)]??"":e}function KA(e,t){Cd(e)&&(la[e.slice(sa.length)]=t,jw())}function Bw(e){const t={},n=/!\[[^\]]*\]\((img:[a-z0-9]+)\)/gi;let r;for(;r=n.exec(e);){const o=r[1],i=Ww(o);i&&(t[o]=i)}return t}function XM(e,t=1200){return new Promise(n=>{const r=new Image;r.onload=()=>{const{width:o,height:i}=r,s=Math.min(1,t/Math.max(o,i));if(s===1&&!e.startsWith("data:image/png")){n(e);return}const l=Math.round(o*s),a=Math.round(i*s),c=document.createElement("canvas");c.width=l,c.height=a;const u=c.getContext("2d");if(!u){n(e);return}u.drawImage(r,0,0,l,a);const f=YA(u,l,a)?c.toDataURL("image/png"):c.toDataURL("image/jpeg",.9);n(f.length>e.length?e:f)},r.onerror=()=>n(e),r.src=e})}function YA(e,t,n){let r;try{r=e.getImageData(0,0,t,n).data}catch{return!0}for(let o=3;o<r.length;o+=4)if(r[o]<250)return!0;return!1}const Hw="slicer.drafts.",VA=18;function cu(e){return Hw+e}function er(e){return typeof e=="object"&&e!==null}function ke(e){return typeof e=="string"}function kl(e){return typeof e=="number"&&Number.isFinite(e)}function Tp(e){return typeof e=="boolean"}function GA(e){return er(e)?ke(e.nickname)&&ke(e.handle)&&ke(e.location)&&ke(e.avatarColor)&&(ke(e.avatarImage)||e.avatarImage===null)&&Tp(e.verified)&&Tp(e.headerFirstPageOnly):!1}function XA(e){return e===void 0?!0:er(e)?Object.values(e).every(ke):!1}function Uw(e){return er(e)?ke(e.source)&&ke(e.platformId)&&ke(e.themeId)&&ke(e.fontFamily)&&GA(e.profile)&&kl(e.radius)&&XA(e.images):!1}function Kw(e){const t={source:e.source,platformId:e.platformId,themeId:e.themeId,fontFamily:e.fontFamily,profile:e.profile,radius:kl(e.radius)?e.radius:VA,images:e.images};return Uw(t)?t:null}function Rr(e){if(!er(e))return null;if(e.schemaVersion===2&&ke(e.id)&&ke(e.title)&&kl(e.updatedAt)&&ke(e.mode)&&er(e.document)){if(e.mode==="markdown-card"&&Uw(e.document))return{id:e.id,title:e.title,schemaVersion:2,mode:"markdown-card",document:e.document,updatedAt:e.updatedAt};if(e.mode==="freeform-slide"){const t=Ow(e.document);return t?{id:e.id,title:e.title,schemaVersion:2,mode:"freeform-slide",document:t,updatedAt:e.updatedAt}:null}return null}if(ke(e.id)&&ke(e.title)&&kl(e.updatedAt)){const t=Kw(e);return t?{id:e.id,title:e.title,schemaVersion:2,mode:"markdown-card",document:t,updatedAt:e.updatedAt}:null}return null}function Td(e){if(!er(e)||e.id!==void 0&&!ke(e.id)||e.title!==void 0&&!ke(e.title))return null;const t=Rr({id:e.id??"__draft-validation__",title:e.title??"",schemaVersion:2,updatedAt:0,mode:e.mode,document:e.document});if(!t)return null;const n={...e.id!==void 0?{id:e.id}:{},...e.title!==void 0?{title:e.title}:{}};return t.mode==="freeform-slide"?{...n,mode:t.mode,document:t.document}:{...n,mode:t.mode,document:t.document}}function _d(e){try{const t=localStorage.getItem(cu(e)),n=t?JSON.parse(t):[];return Array.isArray(n)?n.map(Rr).filter(r=>r!==null).sort((r,o)=>o.updatedAt-r.updatedAt):[]}catch{return[]}}function Yw(e,t,n){t.length===0?localStorage.removeItem(cu(e)):localStorage.setItem(cu(e),JSON.stringify(n?t.map(n):t))}function QA(){const e=[];for(let t=0;t<localStorage.length;t+=1){const n=localStorage.key(t);n!=null&&n.startsWith(Hw)&&e.push(localStorage.getItem(n)??"")}return e}function qA(e){const t=e.split(`
|
|
45
|
-
`).map(n=>n.replace(/^#+\s*/,"").trim()).find(n=>n.length>0);return t?t.length>24?t.slice(0,24)+"…":t:"未命名草稿"}function ZA(e){var t,n;return((n=(t=e.slides[0])==null?void 0:t.name)==null?void 0:n.trim())||"自由编辑作品"}function JA(e){var t;return(t=e.title)!=null&&t.trim()?e.title.trim():e.mode==="markdown-card"?qA(e.document.source):ZA(e.document)}function _p(e,t,n){const r=Td(t);if(!r)throw new Error("草稿内容无效");t=r;const o=_d(e),i={id:t.id??me(),title:JA(t),schemaVersion:2,updatedAt:Date.now()},s=t.mode==="markdown-card"?{...i,mode:"markdown-card",document:{...t.document,images:t.document.images??Bw(t.document.source)}}:{...i,mode:"freeform-slide",document:t.document},l=o.findIndex(a=>a.id===s.id);return l>=0?o[l]=s:o.push(s),Yw(e,o,n),s}function eC(e,t,n){Yw(e,_d(e).filter(r=>r.id!==t),n)}function QM(e){let t;try{t=JSON.parse(e)}catch{return{ok:!1,error:"文件不是有效的 JSON"}}if(!er(t))return{ok:!1,error:"JSON 顶层必须是文档对象"};if(typeof t.documentVersion=="number"){const n=Ow(t);return n?{ok:!0,data:{mode:"freeform-slide",document:n}}:{ok:!1,error:"自由画布文档未通过校验:需要 v1–v20 之一的完整文档结构"}}if(ke(t.source)){const n=Kw(t);return n?{ok:!0,data:{mode:"markdown-card",document:n}}:{ok:!1,error:"Markdown 文档缺少必填字段:source、platformId、themeId、fontFamily、profile"}}return{ok:!1,error:"无法识别的文档:需要自由画布文档或 Markdown 文档"}}function Id(e){if(e.type==="image")return e.src;if(e.type==="shape"&&e.fill.type==="image"||e.type==="path"&&e.fill.type==="image")return e.fill.src;if(e.type==="qrcode"&&e.logoSrc!==void 0)return e.logoSrc}function Vw(e,t){return e.type==="qrcode"?{...e,logoSrc:t??e.logoSrc}:e.type==="image"?{...e,src:t??e.src}:e.type==="shape"&&e.fill.type==="image"?{...e,fill:{...e.fill,src:t??e.fill.src}}:e.type==="path"&&e.fill.type==="image"?{...e,fill:{...e.fill,src:t??e.fill.src}}:e}function Gw(e){return e.background.type==="image"?e.background.src:void 0}function Xw(e,t){return{...e,slides:e.slides.map(n=>n.background.type==="image"?{...n,background:{...n.background,src:t(n.background.src)}}:n)}}function Sl(e){const t=new Set;for(const n of e.slides){const r=Gw(n);r!==void 0&&t.add(r),Ni(n.nodes,o=>{if(o.type==="group")return;const i=Id(o);i!==void 0&&t.add(i)})}return[...t]}function Qw(e,t){const n=WA(e,r=>{const o=Id(r);return o===void 0?r:Vw(r,t(o))});return Xw(n,t)}function tC(e,t){return Qw(e,n=>{if(!t.isRef(n))return n;let r="";try{r=t.resolve(n)}catch{}if(!r)throw new Error(`本地图片引用无法解析:${n}`);return r})}async function nC(e,t){const n=Sl(e).find(a=>a.startsWith("img:"));if(n)throw new Error(`远程保存不支持本地图片引用:${n}`);const r=new Map,o=a=>a.toLowerCase().startsWith("data:image/"),i=a=>{let c=r.get(a);return c||(c=t(a).then(u=>{if(typeof u!="string"||u.trim()==="")throw new Error("图片上传未返回有效地址");return u}),r.set(a,c)),c},s=await BA(e,async a=>{const c=Id(a);return c===void 0||!o(c)?a:Vw(a,await i(c))}),l=new Map;for(const a of s.slides){const c=Gw(a);c!==void 0&&o(c)&&l.set(c,await i(c))}return Xw(s,a=>l.get(a)??a)}const rC=["image/png","image/jpeg","image/webp"],oC=60,iC=2e4;function bi(e,t="未命名图片"){const n=e.replace(/\s+/g," ").trim();return Array.from(n||t).slice(0,oC).join("")}function qM(e){return bi(e.replace(/\.[a-z0-9]{1,5}$/i,""))}function sC(e){const t=/^data:([^;,]+)[;,]/i.exec(e);return t?t[1].toLowerCase():null}function lC(e){const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(t+1);if(!/;base64$/i.test(e.slice(0,t)))return n.length;const r=n.endsWith("==")?2:n.endsWith("=")?1:0;return Math.max(0,Math.floor(n.length*3/4)-r)}function xl(e){return Number.isInteger(e)&&e>0&&e<=iC}function qw(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&t.id!==""&&typeof t.name=="string"&&typeof t.src=="string"&&t.src!==""&&xl(t.width)&&xl(t.height)&&typeof t.bytes=="number"&&Number.isFinite(t.bytes)&&t.bytes>=0&&typeof t.createdAt=="number"&&Number.isFinite(t.createdAt)}const Ip=new Intl.Collator("zh-Hans-CN",{numeric:!0,sensitivity:"base"});function aC(e,t="recent"){return[...e].sort((n,r)=>t==="name"?Ip.compare(n.name,r.name)||r.createdAt-n.createdAt:r.createdAt-n.createdAt||Ip.compare(n.name,r.name))}function ZM(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const cC=1,hs="assets";function uC(e){return e instanceof DOMException&&e.name==="QuotaExceededError"}function Ha(e){return uC(e)?new Error("浏览器存储空间不足,删掉一些素材后再试"):e instanceof Error?e:new Error("素材库读写失败,请稍后重试")}function fC(e="dingcard.assets"){let t=null;function n(){return typeof indexedDB>"u"?Promise.reject(new Error("当前浏览器无法使用素材库")):(t??(t=new Promise((o,i)=>{const s=indexedDB.open(e,cC);s.onupgradeneeded=()=>{const l=s.result;l.objectStoreNames.contains(hs)||l.createObjectStore(hs,{keyPath:"id"}).createIndex("userId","userId")},s.onsuccess=()=>{const l=s.result;l.onversionchange=()=>{l.close(),t=null},o(l)},s.onerror=()=>i(s.error),s.onblocked=()=>i(new Error("素材库正在其他标签页中升级,请刷新后重试"))}).catch(o=>{throw t=null,Ha(o)})),t)}async function r(o,i){const s=await n();return new Promise((l,a)=>{let c;const u=s.transaction(hs,o),d=i(u.objectStore(hs));d.onsuccess=()=>{c=d.result},u.oncomplete=()=>l(c),u.onerror=()=>a(Ha(u.error??d.error)),u.onabort=()=>a(Ha(u.error??d.error))})}return{all:o=>r("readonly",i=>i.index("userId").getAll(o)),get:o=>r("readonly",i=>i.get(o)),put:async o=>{await r("readwrite",i=>i.put(o))},delete:async o=>{await r("readwrite",i=>i.delete(o))}}}function Ua({userId:e,...t}){return t}function dC(e=fC(),t=Date.now){async function n(r,o){const i=await e.get(o);if(!i||i.userId!==r)throw new Error("素材不存在");return i}return{async list(r){const o=await e.all(r);return aC(o.filter(i=>i.userId===r&&qw(i)).map(Ua))},async add(r,o){const i=sC(o.dataUrl);if(!i||!rC.includes(i))throw new Error("仅支持 PNG、JPG、WebP 图片");if(!xl(o.width)||!xl(o.height))throw new Error("图片尺寸无效");const s={id:me(),userId:r,name:bi(o.name),src:o.dataUrl,width:o.width,height:o.height,bytes:lC(o.dataUrl),createdAt:t()};return await e.put(s),Ua(s)},async rename(r,o,i){const s=await n(r,o),l={...s,name:bi(i,s.name)};return await e.put(l),Ua(l)},async remove(r,o){const i=await e.get(o);i&&i.userId===r&&await e.delete(o)}}}const Pd="picture:",hC=4096,pC=60*60*1e3,gC=30*1e3,ps="pictures",gs="stamps",mC=/picture:([0-9a-z]+)/g;function Md(e){return e.startsWith(Pd)}function Pp(e){return Md(e)?e.slice(Pd.length):null}function yC(e){return[...e.matchAll(mC)].map(t=>t[1])}function Ka(e){return e.length>hC&&/^data:image\//i.test(e)}function wC(e){let t=3735928559,n=1103547991;for(let o=0;o<e.length;o+=1){const i=e.charCodeAt(o);t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677)}t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909);const r=o=>(o>>>0).toString(36).padStart(7,"0");return r(n)+r(t)+e.length.toString(36)}function Ya(e){return e.mode==="freeform-slide"?Sl(e.document):Object.values(e.document.images??{})}function Mp(e,t){if(e.mode==="freeform-slide")return{...e,document:Qw(e.document,t)};const n=e.document.images;if(!n)return e;const r=Object.fromEntries(Object.entries(n).map(([o,i])=>[o,t(i)]));return{...e,document:{...e.document,images:r}}}function kC(e=SC(),t=Date.now){const n=new Map,r=new Set,o=new Map;let i=new Map,s=0;function l(c){let u=n.get(c);return u===void 0&&(u=wC(c),n.set(c,u)),u}function a(c){if(!e||!Ka(c))return Promise.resolve(!1);const u=l(c);if(r.has(u))return Promise.resolve(!0);if(t()<s)return Promise.resolve(!1);let d=o.get(u);return d||(d=e.write(new Map([[u,c]]),t()).then(()=>(r.add(u),!0),()=>(s=t()+gC,!1)).finally(()=>o.delete(u)),o.set(u,d)),d}return{keep:a,pack(c,u){return!e||!Ya(c).some(Ka)?c:Mp(c,d=>{if(!Ka(d))return d;const f=l(d);return r.has(f)?(u==null||u.set(f,d),Pd+f):(a(d),d)})},async settle(){await Promise.all([...o.values()])},async confirm(c){if(!(!e||c.size===0))try{await e.touch(c,t())}catch{for(const u of c.keys())r.delete(u)}},async unpack(c){const u=new Set;for(const p of c)for(const w of Ya(p)){const k=Pp(w);k&&u.add(k)}if(!e||u.size===0)return c;const d=new Map,f=[];for(const p of u){const w=i.get(p);w===void 0?f.push(p):d.set(p,w)}if(f.length>0){const p=await e.read(f).catch(()=>new Map);for(const[w,k]of p)d.set(w,k),n.set(k,w),r.add(w)}return i=d,c.map(p=>Ya(p).some(Md)?Mp(p,w=>{const k=Pp(w);return k===null?w:d.get(k)??w}):p)},async sweep(c){if(!e)return;const u=()=>{const d=new Set;for(const f of c())for(const p of yC(f))d.add(p);return d};try{for(const d of await e.sweep(t()-pC,u))r.delete(d)}catch{}}}}function SC(){return typeof indexedDB>"u"?null:xC()}function xC(e="dingcard.pictures"){let t=null;function n(){return t??(t=new Promise((o,i)=>{const s=indexedDB.open(e,1);s.onupgradeneeded=()=>{const l=s.result;l.objectStoreNames.contains(ps)||l.createObjectStore(ps),l.objectStoreNames.contains(gs)||l.createObjectStore(gs)},s.onsuccess=()=>{const l=s.result;l.onversionchange=()=>{l.close(),t=null},l.onclose=()=>{t=null},o(l)},s.onerror=()=>i(s.error),s.onblocked=()=>i(new Error("图片库正在其他标签页中升级"))}).catch(o=>{throw t=null,o})),t}async function r(o,i){const s=await n();return new Promise((l,a)=>{const c=s.transaction([ps,gs],o);let u;try{u=i(c.objectStore(ps),c.objectStore(gs))}catch(d){c.abort(),a(d);return}c.oncomplete=()=>l(u()),c.onerror=()=>a(c.error),c.onabort=()=>a(c.error??new Error("图片库写入已取消"))})}return{read:o=>r("readonly",i=>{const s=new Map;for(const l of o){const a=i.get(l);a.onsuccess=()=>{typeof a.result=="string"&&s.set(l,a.result)}}return()=>s}),write:(o,i)=>r("readwrite",(s,l)=>{for(const[a,c]of o)s.put(c,a),l.put(i,a);return()=>{}}),touch:(o,i)=>r("readwrite",(s,l)=>{for(const[a,c]of o){const u=s.getKey(a);u.onsuccess=()=>{u.result===void 0&&s.put(c,a)},l.put(i,a)}return()=>{}}),sweep:(o,i)=>r("readwrite",(s,l)=>{const a=i(),c=[],u=l.getAllKeys(),d=l.getAll(),f=s.getAllKeys();return f.onsuccess=()=>{const p=new Map;u.result.forEach((C,m)=>p.set(C,d.result[m]));const w=C=>{const m=p.get(C);return typeof C=="string"&&a.has(C)||typeof m=="number"&&m>=o},k=new Set(f.result);for(const C of f.result)w(C)||(s.delete(C),l.delete(C),c.push(String(C)));for(const C of u.result)!k.has(C)&&!w(C)&&l.delete(C)},()=>c})}}const bC={register:(e,t)=>Mx(e,t),login:(e,t)=>Rx(e,t),logout:async()=>Nx(),current:async()=>Lx(),onInvalidated:()=>()=>{}};function EC(e){const t=Td(e);if(!t)throw new Error("本地草稿内容无效");return t}function Rp(e){return e instanceof DOMException&&(e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")}function vC(e){const t=kC(e),n={put:async c=>{const u=UA(c);return t.keep(c),u},resolve:c=>Md(c)?"":Ww(c),isRef:c=>Cd(c),register:(c,u)=>KA(c,u),collect:c=>Bw(c),retain:async()=>{}};async function r(c,u){const d=new Map,f=w=>t.pack(w,d);let p;try{p=_p(c,u,f)}catch(w){if(!Rp(w))throw w;await t.settle(),d.clear();try{p=_p(c,u,f)}catch(k){throw Rp(k)?new Error("浏览器存储空间不足,删掉一些图片或项目后再试"):k}}return t.confirm(d),p}let o=!1;function i(){o=!0,t.sweep(QA)}const s={list:async c=>{const u=await t.unpack(_d(c));return o||i(),u},save:async(c,u)=>{const d=EC(u),f=d.mode==="freeform-slide"?{...d,document:tC(d.document,n)}:d,p=await r(c,f),w=Rr(p);if(!w)throw new Error("本地草稿保存结果无效");return w},remove:async(c,u)=>{eC(c,u,d=>t.pack(d)),i()},listVersions:async()=>{throw new Error("版本历史需要部署服务端")},getVersion:async()=>{throw new Error("版本历史需要部署服务端")},restoreVersion:async()=>{throw new Error("版本历史需要部署服务端")},listTrash:async()=>{throw new Error("回收站需要部署服务端")},restore:async()=>{throw new Error("回收站需要部署服务端")},purge:async()=>{throw new Error("回收站需要部署服务端")}},l={list:async()=>{throw new Error("分享需要部署服务端")},create:async()=>{throw new Error("分享需要部署服务端")},revoke:async()=>{throw new Error("分享需要部署服务端")}},a={list:async()=>{throw new Error("API 令牌需要部署服务端")},create:async()=>{throw new Error("API 令牌需要部署服务端")},revoke:async()=>{throw new Error("API 令牌需要部署服务端")}};return{auth:bC,drafts:s,images:n,assets:dC(),shares:l,tokens:a,stock:null,remote:!1}}const uu="slicer.token.v1",fu=new Set;let du=null,hu=!1,Eo=0;class K extends Error{constructor(n,r){super(n);X(this,"status");this.name="ApiError",this.status=r}}function Ro(){if(!hu){hu=!0;try{const e=localStorage.getItem(uu);du=typeof e=="string"&&e!==""?e:null}catch{}}return du}function Ws(e){du=e,hu=!0;try{e?localStorage.setItem(uu,e):localStorage.removeItem(uu)}catch{}}function AC(e){if(!(!e||Ro()!==e)){Ws(null);for(const t of[...fu])try{t()}catch{}}}function ye(e){return typeof e=="object"&&e!==null}function Va(e){return ye(e)&&typeof e.id=="string"&&typeof e.username=="string"&&typeof e.createdAt=="number"&&Number.isFinite(e.createdAt)}function CC(e){const t=Td(e);if(!t)throw new K("远程草稿内容无效",null);return t}function TC(e){const t=e.replace(/\/+$/,"");async function n(h,E={}){const{authenticated:T=!0,...b}=E,A=T?Ro():null,I=new Headers(b.headers);A&&I.set("authorization",`Bearer ${A}`),b.body&&!(b.body instanceof FormData)&&!I.has("content-type")&&I.set("content-type","application/json");let P;try{P=await fetch(`${t}${h}`,{...b,headers:I})}catch{throw new K("网络请求失败,请检查网络后重试",null)}P.status===401&&AC(A);let L;try{L=await P.text()}catch{throw new K("服务器返回了无效响应",P.status)}let G;try{G=JSON.parse(L)}catch{throw new K("服务器返回了无效响应",P.status)}if(!P.ok){const xe=ye(G)&&typeof G.error=="string"?G.error:`请求失败(${P.status})`;throw new K(xe,P.status)}return{data:G,status:P.status}}const r={async register(h,E){const T=++Eo,{data:b,status:A}=await n("/api/auth/register",{method:"POST",body:JSON.stringify({username:h,password:E}),authenticated:!1});if(T!==Eo)throw new K("认证请求已失效",null);if(!ye(b)||!Va(b.user)||typeof b.token!="string"||b.token==="")throw new K("服务器返回了无效响应",A);return Ws(b.token),b.user},async login(h,E){const T=++Eo,{data:b,status:A}=await n("/api/auth/login",{method:"POST",body:JSON.stringify({username:h,password:E}),authenticated:!1});if(T!==Eo)throw new K("认证请求已失效",null);if(!ye(b)||!Va(b.user)||typeof b.token!="string"||b.token==="")throw new K("服务器返回了无效响应",A);return Ws(b.token),b.user},async logout(){Eo+=1,Ws(null)},async current(){let h=Ro();for(;h;)try{const{data:E,status:T}=await n("/api/auth/me"),b=Ro();if(b!==h){h=b;continue}if(!ye(E)||!Va(E.user))throw new K("服务器返回了无效响应",T);return E.user}catch(E){const T=Ro();if(T!==h){h=T;continue}if(E instanceof K&&E.status===401)return null;throw E}return null},onInvalidated(h){return fu.add(h),()=>fu.delete(h)}},o=(()=>{try{if(/^https?:\/\//i.test(t))return new URL(t).origin;if(typeof location<"u"&&location.origin)return location.origin}catch{}return null})();function i(h){const E=new Map,T=o??"http://local.invalid";for(const b of h){if(typeof b!="string")continue;const A=b.trim();if(A===""||/^data:/i.test(A)||A.startsWith("img:"))continue;let I;try{if(A.startsWith("/")&&!A.startsWith("//"))I=new URL(A,T);else if(A.startsWith("//")){if(!o||(I=new URL(A,o),I.origin!==o))continue}else if(/^https?:\/\//i.test(A)){if(!o||(I=new URL(A),I.origin!==o))continue}else continue}catch{continue}I.pathname!=="/"&&(E.has(I.pathname)||E.set(I.pathname,A))}return[...E.values()]}function s(h){return/^https?:\/\//i.test(h)?h:h.startsWith("//")?o?new URL(h,o).href:h:h.startsWith("/")&&/^https?:\/\//i.test(t)?new URL(h,t).href:h.startsWith("/")?h:`${t}/${h.replace(/^\/+/,"")}`}const l={async put(h){const E=await(await fetch(h)).blob(),T=new FormData;T.append("file",E);const{data:b,status:A}=await n("/api/images",{method:"POST",body:T});if(!ye(b)||typeof b.url!="string"||b.url.trim()==="")throw new K("服务器返回了无效图片地址",A);return s(b.url)},resolve:h=>h,isRef:()=>!1,register:()=>{},collect:()=>({}),async retain(h){const E=i(h);E.length!==0&&await n("/api/images/retain",{method:"POST",body:JSON.stringify({urls:E})})}};function a(h){if(!ye(h)||typeof h.url!="string"||h.url.trim()==="")return null;const E={id:h.id,name:h.name,src:s(h.url),width:h.width,height:h.height,bytes:typeof h.bytes=="number"?h.bytes:0,createdAt:h.createdAt};return qw(E)?E:null}function c(h,E){const T=a(h);if(!T)throw new K("服务器返回了无效素材",E);return T}function u(h){return!ye(h)||typeof h.id!="string"||h.id===""||typeof h.thumb!="string"||h.thumb===""?null:{id:h.id,thumb:h.thumb,width:Number.isFinite(h.width)&&h.width>0?h.width:0,height:Number.isFinite(h.height)&&h.height>0?h.height:0,author:typeof h.author=="string"?h.author:""}}function d(h,E){if(!ye(h)||!Array.isArray(h.sources)||typeof h.preferred!="string")throw new K("服务器返回了无效的图库响应",E);return{sources:h.sources.flatMap(b=>!ye(b)||typeof b.id!="string"||typeof b.label!="string"?[]:typeof b.available!="boolean"?[]:[{id:b.id,label:b.label,available:b.available}]),preferred:h.preferred}}function f(h,E){if(!ye(h)||typeof h.source!="string"||typeof h.page!="number")throw new K("服务器返回了无效的图库响应",E);const T=Array.isArray(h.results)?h.results.flatMap(b=>{const A=u(b);return A?[A]:[]}):[];return{source:h.source,page:h.page,total:typeof h.total=="number"&&h.total>0?Math.floor(h.total):0,results:T}}function p(h){if(/^https?:\/\//i.test(h))return h;try{return new URL(h,o??window.location.origin).href}catch{return h}}function w(h){return!ye(h)||typeof h.id!="string"||typeof h.url!="string"||h.url.trim()===""?null:{id:h.id,title:typeof h.title=="string"?h.title:"",url:p(h.url),createdAt:typeof h.createdAt=="number"?h.createdAt:0,expiresAt:typeof h.expiresAt=="number"?h.expiresAt:0,imageCount:typeof h.imageCount=="number"?h.imageCount:0,views:typeof h.views=="number"?h.views:0}}const k={async list(){const{data:h,status:E}=await n("/api/shares");if(!Array.isArray(h))throw new K("服务器返回了无效分享列表",E);return h.map(w).filter(T=>T!==null)},async create(h,E,T,b){const{data:A,status:I}=await n("/api/shares",{method:"POST",body:JSON.stringify({title:E,urls:T,...b?{expiresInHours:b}:{}})}),P=w(A);if(!P)throw new K("服务器返回了无效分享",I);return P},async revoke(h,E){await n(`/api/shares/${encodeURIComponent(E)}`,{method:"DELETE"})}},C={async list(){const{data:h,status:E}=await n("/api/assets");if(!Array.isArray(h))throw new K("服务器返回了无效素材列表",E);return h.map(a).filter(T=>T!==null)},async add(h,E){const T=await l.put(E.dataUrl),{data:b,status:A}=await n("/api/assets",{method:"POST",body:JSON.stringify({url:T,name:bi(E.name),width:E.width,height:E.height})});return c(b,A)},async rename(h,E,T){const{data:b,status:A}=await n(`/api/assets/${encodeURIComponent(E)}`,{method:"PATCH",body:JSON.stringify({name:bi(T)})});return c(b,A)},async remove(h,E){await n(`/api/assets/${encodeURIComponent(E)}`,{method:"DELETE"})}},m={async list(){const{data:h,status:E}=await n("/api/drafts");if(!Array.isArray(h))throw new K("服务器返回了无效草稿列表",E);return h.map(Rr).filter(T=>T!==null)},async save(h,E){const T=CC(E);let b=T;if(T.mode==="freeform-slide"){await l.retain(Sl(T.document));const L=await nC(T.document,G=>l.put(G));await l.retain(Sl(L)),b={...T,document:L}}const{data:A,status:I}=await n("/api/drafts",{method:"POST",body:JSON.stringify(b)}),P=Rr(A);if(!P)throw new K("服务器返回了无效草稿",I);return P},async remove(h,E){await n(`/api/drafts/${encodeURIComponent(E)}`,{method:"DELETE"})},async listVersions(h,E){const{data:T,status:b}=await n(`/api/drafts/${encodeURIComponent(E)}/versions`);if(!Array.isArray(T))throw new K("服务器返回了无效版本列表",b);return T.map(y).filter(A=>A!==null)},async getVersion(h,E,T){const{data:b,status:A}=await n(`/api/drafts/${encodeURIComponent(E)}/versions/${encodeURIComponent(T)}`),I=y(b);if(!I||!ye(b))throw new K("服务器返回了无效版本",A);return{...I,document:b.document}},async restoreVersion(h,E,T){const{data:b,status:A}=await n(`/api/drafts/${encodeURIComponent(E)}/versions/${encodeURIComponent(T)}/restore`,{method:"POST"}),I=Rr(b);if(!I)throw new K("服务器返回了无效草稿",A);return I},async listTrash(){const{data:h,status:E}=await n("/api/drafts/trash");if(!Array.isArray(h))throw new K("服务器返回了无效回收站列表",E);return h.map(g).filter(T=>T!==null)},async restore(h,E){await n(`/api/drafts/trash/${encodeURIComponent(E)}/restore`,{method:"POST"})},async purge(h,E){await n(`/api/drafts/trash/${encodeURIComponent(E)}`,{method:"DELETE"})}};function g(h){return!ye(h)||typeof h.id!="string"||typeof h.title!="string"?null:{id:h.id,title:h.title,mode:typeof h.mode=="string"?h.mode:"",schemaVersion:typeof h.schemaVersion=="number"?h.schemaVersion:2,updatedAt:typeof h.updatedAt=="number"?h.updatedAt:0,deletedAt:typeof h.deletedAt=="number"?h.deletedAt:0}}function y(h){return!ye(h)||typeof h.id!="string"||typeof h.title!="string"?null:{id:h.id,title:h.title,mode:typeof h.mode=="string"?h.mode:"",schemaVersion:typeof h.schemaVersion=="number"?h.schemaVersion:2,createdAt:typeof h.createdAt=="number"?h.createdAt:0}}function S(h){return!ye(h)||typeof h.id!="string"||typeof h.name!="string"?null:{id:h.id,name:h.name,scopes:Array.isArray(h.scopes)?h.scopes.filter(E=>typeof E=="string"):[],createdAt:typeof h.createdAt=="number"?h.createdAt:0,lastUsedAt:typeof h.lastUsedAt=="number"?h.lastUsedAt:null}}return{auth:r,drafts:m,images:l,assets:C,shares:k,tokens:{async list(){const{data:h,status:E}=await n("/api/tokens");if(!Array.isArray(h))throw new K("服务器返回了无效令牌列表",E);return h.map(S).filter(T=>T!==null)},async create(h,E,T){const{data:b,status:A}=await n("/api/tokens",{method:"POST",body:JSON.stringify({name:E,scopes:T})});if(!ye(b)||typeof b.token!="string"||b.token==="")throw new K("服务器返回了无效令牌",A);const I=S(b);if(!I)throw new K("服务器返回了无效令牌",A);return{...I,token:b.token}},async revoke(h,E){await n(`/api/tokens/${encodeURIComponent(E)}`,{method:"DELETE"})}},stock:{async sources(){const{data:h,status:E}=await n("/api/stock/sources");return d(h,E)},async search(h,E,T){const b=new URLSearchParams({q:h});E&&b.set("source",E),typeof T=="number"&&T>1&&b.set("page",String(T));const{data:A,status:I}=await n(`/api/stock/search?${b}`);return f(A,I)},async importImage(h,E){const{data:T,status:b}=await n("/api/stock/import",{method:"POST",body:JSON.stringify({source:h,id:E})});if(!ye(T)||typeof T.ref!="string"||T.ref==="")throw new K("服务器返回了无效的图库响应",b);if(typeof T.url!="string"||T.url==="")throw new K("服务器返回了无效的图库响应",b);return{ref:T.ref,url:s(T.url),alt:typeof T.alt=="string"?T.alt:""}}},remote:!0}}const Np="".trim(),_C="local-guest",Ar=vC(),Ga=Np?TC(Np):Ar,Kn=Ga===Ar?Ar:{...Ga,images:{...Ga.images,resolve:Ar.images.resolve,register:Ar.images.register}};function IC(e){return e===_C}function JM(e){return IC(e)?Ar:Kn}function PC(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>r in t?String(t[r]):n)}function H(e,t,n="n"){return r=>PC(Number(r[n])===1?e:t,r)}const MC={叮卡:"DingCard",返回工作台:"Back to dashboard","Markdown 卡片":"Markdown Cards",自由编辑:"Freeform","Markdown 卡片模板":"Markdown Card templates",自由编辑模板:"Freeform templates",海报与封面:"Posters and covers",叮卡能做什么:"What DingCard does","长文自动排成卡片,":"Long posts become card sets,",海报随手自由排版:"posters lay out freely","Markdown 卡片把一篇长文切成一组小红书、微博、推特卡片;自由编辑像做海报一样摆放文字、图片和形状。":"Markdown Cards turns one long post into a set of RedNote, Weibo or Twitter cards. Freeform places text, images and shapes the way you design a poster.","套编辑器,一个工作台":"editors, one dashboard",套成品模板:"ready-made templates","开源,可自部署":"open source, self-hostable",创建叮卡账号:"Create a DingCard account",欢迎回来:"Welcome back","只需要用户名和密码。":"All it takes is a username and a password.","登录后继续编辑你的项目。":"Log in to keep working on your projects.",登录或注册:"Log in or sign up",登录:"Log in",注册:"Sign up",用户名:"Username",密码:"Password","至少 2 个字符":"At least 2 characters","至少 4 个字符":"At least 4 characters","请稍候…":"One moment…",创建账号并进入:"Create account",创建账号:"Create account",或:"or","不注册,直接开始":"Start without an account","账号保存在你部署的服务器上,登录后可在多台设备间同步项目。不注册也能用,项目会自动保存在这台设备上。":"Your account lives on the server you deployed, so projects sync across devices. Without an account, projects still save automatically on this device.","账号和项目只保存在这台设备的浏览器里,不会上传。不注册也会自动保存;部署服务端后可在多台设备间同步。":"Your account and projects stay in this browser and are never uploaded. Projects save automatically even without an account; deploy the server to sync across devices.","出错了,请重试":"Something went wrong. Please try again.",编辑器出错了:"Something went wrong in the editor",页面出错了:"Something went wrong on this page",重新加载:"Reload",回到首页:"Back to home",账户登录与注册:"Log in or sign up","账号会安全保存到你的服务器,可在登录后跨设备同步草稿。":"Your account is stored on your server, and drafts sync across devices once you log in.","账号仅保存在此浏览器本地,不会上传,也不能跨设备同步。":"Your account stays in this browser only. It is never uploaded and does not sync across devices.",主导航:"Main navigation",展开侧栏:"Expand sidebar",收起侧栏:"Collapse sidebar",新建项目:"New project","写长文,自动分页成一组卡片":"Write long-form, paginated into cards automatically",像做海报一样自由排版:"Lay out freely, like a poster",页面:"Page",工作台导航:"Dashboard sections",首页:"Home",我的项目:"My projects",模板中心:"Templates",素材库:"Assets",最近打开:"Recently opened","服务器账号 · 多设备同步":"Server account · syncs across devices","本地账号 · 数据只存在这台设备":"Local account · data stays on this device",服务器账号:"Server account",本地账号:"Local account",切换到浅色模式:"Switch to light mode",切换到深色模式:"Switch to dark mode",切换到中文:"切换到中文",退出登录:"Log out","账号菜单({name})":"Account menu ({name})",打开导航:"Open navigation",切换深浅色:"Toggle dark mode","搜索项目、模板和操作":"Search projects, templates and actions",未命名:"Untitled","丢掉改动,继续":"Discard and continue","删除「{title}」?":"Delete “{title}”?","删除后无法恢复。":"This cannot be undone.",删除:"Delete",取消:"Cancel",关闭:"Close",关闭提示:"Dismiss",重试:"Retry",正在加载:"Loading","{title} 副本":"{title} copy","已复制「{title}」":"Duplicated “{title}”",复制失败:"Could not duplicate","暂时无法复制,请稍后重试":"Could not duplicate right now. Please try again later.","已删除「{title}」":"Deleted “{title}”","已删除「{title}」,30 天内可在回收站恢复":"Deleted “{title}” — it stays in the trash for 30 days",删除失败:"Could not delete","暂时无法删除,请稍后重试":"Could not delete right now. Please try again later.",重命名失败:"Could not rename","暂时无法重命名,请稍后重试":"Could not rename right now. Please try again later.",回收站:"Trash","删除后进入回收站:30 天内可以恢复,之后自动清除。":"Deleting moves it to the trash: restore it within 30 days, after that it is cleared automatically.","删除的项目在这里保留 30 天,可以恢复或彻底删除":"Deleted projects stay here for 30 days — restore or delete forever","删除的项目在这里保留 30 天:恢复就回到「我的项目」,内容和历史版本都在;到期没管的会被自动清除。":"Deleted projects stay here for 30 days: restoring moves one back to My projects with its content and version history; anything left past the window is cleared for good.","回收站是空的——删除的项目会在这里保留 30 天。":"The trash is empty — deleted projects stay here for 30 days.",彻底删除:"Delete forever","彻底删除「{title}」?":"Delete “{title}” forever?","彻底删除后无法恢复,它的内容和历史版本都会一起清掉。":"A permanent delete cannot be undone — the content and its version history go with it.","彻底删除失败,请稍后重试":"Could not delete forever right now. Please try again later.","暂时无法读取回收站,请稍后重试":"Could not load the trash; please try again shortly","{n} 天后自动清除":e=>`Cleared automatically in ${Number(e.n)===1?"1 day":`${e.n} days`}`,项目:"Projects",模板:"Templates",操作:"Actions",搜索与命令:"Search and commands","搜索项目、模板,或输入操作":"Search projects and templates, or type an action","没有找到“{query}”":"Nothing matches “{query}”","新建 Markdown 卡片":"New Markdown Cards",新建自由编辑:"New Freeform design",打开我的项目:"Open My projects",打开模板中心:"Open Templates",打开素材库:"Open Assets",夜深了:"Up late",早上好:"Good morning",下午好:"Good afternoon",晚上好:"Good evening","{greeting},{name}":"{greeting}, {name}","今天想发点什么?写长文用 Markdown 卡片,自己排版用自由编辑。":"What are you posting today? Write long-form in Markdown Cards, or lay it out yourself in Freeform.","{projects} 个项目 · {templates} 套模板":e=>`${e.projects} ${Number(e.projects)===1?"project":"projects"} · ${e.templates} ${Number(e.templates)===1?"template":"templates"}`,"写一篇长文,自动排成一组卡片":"Write a long post, get a set of cards","只管写字。标题、正文、金句按内容自动分页,整组图片一键导出。":"Just write. Headings, body text and quotes are paginated for you, and the whole set exports in one click.","# 在城市里慢慢走":"# Walking the city slowly","## 地铁看不见的东西":"## What the subway never shows","> 你不需要去很远的地方":"> You don't have to go far",新建:"New",从模板开始:"Start from a template","像做海报一样,自由摆放每个元素":"Place every element freely, like a poster","文字、图片、形状、图层和参考线都在手边,多页设计一次导出。":"Text, images, shapes, layers and guides are all at hand, and multi-page designs export at once.",最近编辑:"Recent",按系统筛选:"Filter by editor",全部:"All","查看全部 {n} 个":"View all {n}",还没有保存的项目:"No saved projects yet","常用的照片、头像和 Logo 放在这里,两套系统都能直接取用。":"Keep your usual photos, avatars and logos here. Both editors can use them.","管理全部 {n} 张":"Manage all {n}","在素材库中查看 {name}":"View {name} in Assets",模板推荐:"Suggested templates",去模板中心:"Browse templates",文本:"Text",图片:"Image",形状:"Shape","打开 {title}":"Open {title}","{n} 页":H("{n} page","{n} pages"),复制一份:"Duplicate",项目读取失败:"Could not load projects",这一类还没有项目:"No projects of this kind yet","暂时无法读取项目,请稍后重试":"Could not load projects right now. Please try again later.",刚刚:"just now","{n} 分钟前":H("{n} minute ago","{n} minutes ago"),"{n} 小时前":H("{n} hour ago","{n} hours ago"),"{n} 天前":H("{n} day ago","{n} days ago"),"{name} 的更多操作":"More actions for {name}","用「{title}」新建项目":"New project from “{title}”",使用模板:"Use template","写好正文就能套用,封面、正文、金句、收尾按内容自动分配。":"Apply one to finished text: the cover, body, quote and closing pages are assigned from your content.","每个元素都能拖动、改色、换图,多页一起调整。":"Drag, recolor and swap images on every element, across all pages.","预览{title}":"Preview {title}",从一套成品开始:"Start from a finished design","样式和内容都可以继续改,先选一套接近你想法的。":"Style and content stay editable, so pick the one closest to your idea.",关闭模板中心:"Close templates",模板列表:"Template list",模板详情:"Template details",搜索模板:"Search templates","搜索:名称、说明或标签":"Search: name, description or tag","没有找到相关模板,换个关键词或尺寸试试。":"No templates matched. Try another keyword or size.",相框:"Photo frame",图片描边颜色:"Picture frame colour",粘贴数据:"Paste data",从剪贴板粘贴:"Paste from clipboard","每行「标签 数值…」,数值用空格、逗号或制表符分隔":'One "label number…" per line; separate numbers with spaces, commas, or tabs',"读取剪贴板失败,请重试":"Could not read the clipboard, try again","粘贴内容读不出数据:每行需要「标签 数值…」,数值为非负数字":'The pasted text has no readable data: each line needs "label number…" with non-negative numbers',直角:"Square",小圆:"Slightly rounded",大圆:"Rounded",胶囊:"Capsule",无:"None","Markdown 长文排版":"Markdown long-form layout",自由画布轻设计:"Freeform canvas design","{n} 页示例已经排好,正文、主题和字体都可以改。":H("A {n}-page example, ready to go. Text, theme and font all stay editable.","A {n}-page example, ready to go. Text, theme and font all stay editable."),"{n} 页作品已经排好,文字、颜色、尺寸和图层都可以改。":"A {n}-page design, ready to go. Text, colors, sizes and layers all stay editable.",使用这套模板:"Use this template",继续编辑:"Keep editing","查看 {name}":"View {name}",素材名称:"Asset name",重命名:"Rename",下载:"Download",尺寸:"Size",大小:"File size",上传于:"Uploaded",用在:"Used in","{n} 个项目里":H("{n} project","{n} projects"),还没有项目用到:"Not used yet","正在读取素材库…":"Loading Assets…",搜索素材:"Search assets",上传到素材库:"Upload to Assets",上传:"Upload",素材库读取失败:"Could not load Assets","正在上传 {name}":"Uploading {name}","插入 {name}":"Insert {name}","没有名称包含「{query}」的素材":"No asset name contains “{query}”",素材库还是空的:"No assets yet","把图片拖到这里,或者点「上传」。存进来的图片,所有项目都能用。":"Drop pictures here or click Upload. Every project can use them.",管理素材库:"Manage Assets","{n} 张":H("{n} picture","{n} pictures"),"松开,存进素材库":"Drop to save to Assets","点一下,插入到光标所在的位置":"Click to insert at the cursor","点一下,放到当前页的中央":"Click to place in the middle of the page",关闭素材库:"Close Assets",按名称搜索:"Search by name","{n} 张 · {size}":H("{n} picture · {size}","{n} pictures · {size}"),排序:"Sort",最近上传:"Recently uploaded",按名称:"By name","上传中…":"Uploading…","换个关键词试试。":"Try another search.","把图片拖到这里,或者直接粘贴截图":"Drop pictures here, or paste a screenshot","PNG、JPG、WebP 都可以,长边超过 1800 px 会自动缩小。":"PNG, JPG and WebP all work. Anything longer than 1800 px is scaled down.",选择图片:"Choose pictures","松开,上传到素材库":"Drop to upload to Assets","有 {n} 个项目用到了这张图片,它们不受影响,只是以后不能再从素材库里选它。":H("{n} project uses this picture and is not affected. You just can no longer pick it from Assets.","{n} projects use this picture and are not affected. You just can no longer pick it from Assets."),"删除后不能再从素材库里选它。":"You will no longer be able to pick it from Assets.","暂时无法读取素材库,请稍后重试":"Could not load Assets right now. Please try again later.","上传失败,请稍后重试":"Upload failed. Please try again later.","已上传 {n} 张图片":H("Uploaded {n} picture","Uploaded {n} pictures"),",另有 {n} 张也没上传":H(", and {n} more was not uploaded",", and {n} more were not uploaded"),"上传了 {added} 张,{failed} 张没有上传":"Uploaded {added}, {failed} failed","{n} 张图片没有上传":H("{n} picture was not uploaded","{n} pictures were not uploaded"),"「{name}」{error}":"“{name}”: {error}","{title}:{detail}":"{title}: {detail}","只支持 PNG、JPG、WebP 图片":"Only PNG, JPG and WebP pictures are supported","图片超过 25 MB":"The picture is larger than 25 MB",无法读取图片:"Could not read the picture",图片已损坏或无法解码:"The picture is damaged or cannot be decoded","仅支持 PNG、JPG、WebP 图片":"Only PNG, JPG and WebP pictures are supported",图片尺寸无效:"Invalid picture size",素材不存在:"That asset no longer exists",当前浏览器无法使用素材库:"This browser cannot store Assets","浏览器存储空间不足,删掉一些素材后再试":"The browser is out of storage. Delete some assets and try again.","素材库读写失败,请稍后重试":"Could not read or write Assets. Please try again later.","素材库正在其他标签页中升级,请刷新后重试":"Assets is upgrading in another tab. Reload and try again.",未命名图片:"Untitled picture","导入 JSON 文档":"Import a JSON document",个人资料:"Profile","头像颜色(或上传图片)":"Avatar color (or upload a picture)","颜色 {color}":"Color {color}",上传图片:"Upload picture",素材类型:"Asset type",把字体文件拖到这里:"Drop font files here","TTF、OTF、WOFF、WOFF2 都可以,最大 40 MB。":"TTF, OTF, WOFF and WOFF2 all work, up to 40 MB.",选择字体:"Choose fonts","删除字体「{title}」?":"Remove the font “{title}”?","用了它的文字会换回默认字体。":"Text set in it goes back to the default font.","松开,导入字体":"Release to import the fonts","永 Aa":"永 Aa","字体样张 123":"The quick fox 123",昵称:"Display name","@ 用户名(推特)":"@ handle (Twitter)","发布地点(微博/推特)":"Location (Weibo / Twitter)",显示认证标志:"Show verified badge",只在首页显示个人信息:"Show the profile on the first card only",保存:"Save",暂无选项:"No options","在 Markdown 卡片工具栏的「素材库」或自由编辑插入栏的「图片」里,点一下就能放进项目。":"Open Assets in the Markdown Cards toolbar, or Image in the Freeform insert rail, and click a picture to put it in.",界面语言:"Language","界面语言:{name}":"Language: {name}",项目名称:"Project name","导入 .json 文档,比如 MCP 工具生成的结果":"Import a .json document, such as one made by the MCP tools","导入 JSON":"Import JSON","松开,导入为项目":"Drop to import as a project","新建一个,开始编辑就会自动保存到这里;也可以把 .json 文档拖进来导入。":"Start one and it saves here as you edit. You can also drop a .json document here to import it.",导入失败:"Could not import","暂时无法导入,请稍后重试":"Could not import right now. Please try again later.",还没有项目:"No projects yet","从上面选一种方式新建,开始编辑就会自动保存到这里。":"Start one above. It saves here as you edit.","{system}里还有没保存的修改":"Unsaved changes in {system}","「{title}」最近的修改没能保存。继续的话,这些改动会被丢掉。":"The latest changes to “{title}” could not be saved. Continuing throws them away.",回去看看:"Go back",贡献模板:"Contribute a template",模板由社区共建:"Templates are built by the community","每套模板都在仓库里维护。做了一套好看的版式?按贡献指南提交 Pull Request,合并后所有人都能用。想复用自己的作品,在「我的项目」里复制一份就行。":"Every template lives in the repository. Made a layout worth sharing? Follow the contribution guide and open a pull request; once it is merged, everyone can use it. To reuse your own work, duplicate the project in My projects.",查看贡献指南:"Read the contribution guide","搜索模板,比如:菜单、中秋、读书笔记":"Search templates: menu, Mid-Autumn, reading notes",清空搜索:"Clear search",按用途筛选:"Filter by use",全部尺寸:"All sizes",全部风格:"All styles",全部颜色:"All colours","{n} 套模板":H("{n} template","{n} templates"),清除筛选:"Clear filters",没有找到相关模板:"No templates match",只看这一类:"Only these",使用:"Use",上一个模板:"Previous template",下一个模板:"Next template",模板页面:"Template pages",页数:"Pages",编辑方式:"Editor",使用这个模板:"Use this template",只换样式:"Use the look only",长文版式:"Long-read looks",基础主题:"Plain themes",相似模板:"Similar templates",长文卡片:"Long reads",图文套图:"Carousels",社交配图:"Social posts",活动海报:"Event posters",营销电商:"Marketing",菜单价目:"Menus & prices",节日节气:"Festivals",邀请贺卡:"Invitations & cards",办公学习:"Work & school",简约:"Minimal",手绘:"Hand-drawn",优雅:"Elegant",潮酷:"Bold",商务:"Business",白色:"White",米色:"Cream",灰色:"Grey",黑色:"Black",红色:"Red",橙色:"Orange",黄色:"Yellow",绿色:"Green",蓝色:"Blue",紫色:"Purple",粉色:"Pink","你存过的 {n} 个模板已经放进「我的项目」":H("The template you saved is now in My projects","The {n} templates you saved are now in My projects"),"模板改由社区共建;想复用自己的作品,在项目卡片上选「复制一份」。":"Templates are now built by the community. To reuse your own work, choose Duplicate on a project card.",未命名设计:"Untitled design",重命名项目:"Rename project","项目名称:{title},点击重命名":"Project name: {title}. Click to rename",登录后继续保存:"Log in to keep saving","登录已过期。重新登录后,这些修改会存回原来的项目。":"Your session expired. Log in again and these changes go back into the same project.",已保存到本机:"Saved on this device","只保存在这台设备上。登录后可以放进账号,换一台设备也能继续编辑。":"Saved on this device only. Log in to move it into your account and keep editing on any device.","保存在这台设备的浏览器里。":"Saved in this browser.","把这台设备上的项目放进账号?":"Move the projects on this device into your account?","把这台设备上的素材放进账号?":"Move the assets on this device into your account?","你没登录时做了 {projects} 个项目、存了 {assets} 张素材,都保存在这台设备上。":e=>`Before logging in you made ${e.projects} ${Number(e.projects)===1?"project":"projects"} and saved ${e.assets} ${Number(e.assets)===1?"asset":"assets"}, all kept on this device. `,"你没登录时做了 {n} 个项目,都保存在这台设备上。":H("Before logging in you made {n} project, kept on this device. ","Before logging in you made {n} projects, all kept on this device. "),"你没登录时存了 {n} 张素材,都保存在这台设备上。":H("Before logging in you saved {n} asset, kept on this device. ","Before logging in you saved {n} assets, all kept on this device. "),"放进「{name}」后,换一台设备登录也能继续编辑。":"Moving it all to “{name}” lets you keep editing on any device you log in on.","放进「{name}」后,它们会出现在这个账号的「我的项目」里。":"Moving it all to “{name}” puts it in that account’s My projects.","还有 {n} 项没能放进账号:{error}":H("{n} item could not be moved: {error}","{n} items could not be moved: {error}"),先留在本机:"Keep on this device",放进账号:"Move into account","正在放进账号… {done}/{total}":"Moving… {done}/{total}","这台设备上还有 {n} 个没登录时做的项目。":H("There is {n} project on this device from before you logged in.","There are {n} projects on this device from before you logged in."),"这台设备上还有 {n} 张没登录时存的素材。":H("There is {n} asset on this device from before you logged in.","There are {n} assets on this device from before you logged in."),"已自动保存 · {time}":"Saved automatically · {time}",保存失败:"Could not save","暂时无法保存,请稍后重试":"Could not save right now. Please try again later.",已保存:"Saved","素材库:插入常用图片":"Assets: insert your usual pictures",正在检查登录状态:"Checking your session",检查中:"Checking",重新检查登录状态:"Check the session again",待确认:"Unconfirmed",登录账户:"Log in",登录状态尚未确认:"Your session is not confirmed yet","暂时无法连接服务器,请稍后重试":"Cannot reach the server right now. Please try again later.","登录已过期,请重新登录":"Your session expired. Please log in again.",退出登录失败:"Could not log out",请稍后重试:"Please try again later","API 令牌":"API tokens","给程序用的钥匙:带上这个值的请求就代表你的账号,只能做勾选范围内的事。值只显示一次,随时可以撤销。":"A key for programs: requests carrying this value act as your account, limited to the permissions you tick. The value is shown once and can be revoked at any time.","「{name}」的令牌值(只显示这一次)":"The token value for “{name}” (shown only once)",我存好了:"I saved it",名称:"Name","比如:我的智能体":"e.g. My agent",权限:"Permissions",创建令牌:"Create token","创建中…":"Creating…","还没有令牌。":"No tokens yet.","最近使用:{time}":"Last used: {time}",还没用过:"Never used",撤销:"Revoke","撤销「{name}」?":"Revoke “{name}”?","撤销后用这个令牌的程序立刻无法访问。":"Programs using this token lose access immediately.","暂时无法读取令牌,请稍后重试":"Could not load tokens right now. Please try again later.","暂时无法创建令牌,请稍后重试":"Could not create a token right now. Please try again later.","暂时无法撤销令牌,请稍后重试":"Could not revoke the token right now. Please try again later.",decks:"deck rendering",shares:"sharing",drafts:"drafts",assets:"assets",images:"images",在线图库:"Stock photos",轴刻度:"Axis ticks",表格:"Table",时间线:"Timeline",进度:"Progress",数值:"Value",样式:"Style",横条:"Bar",圆环:"Ring",进度颜色:"Progress colour",进度数值:"Progress value",进度样式:"Progress style",标签:"Label",进度标签:"Progress label",轨道底色:"Track colour",主线颜色:"Spine colour",条目:"Entries",时间:"Time","第 {n} 项时间":"Entry {n} time","第 {n} 项内容":"Entry {n} text",加一条:"Add an entry",今天:"Today",新的一步:"A new step",表头:"Header row",斑马纹:"Zebra stripes",墨色:"Ink",表头底色:"Header fill",斑马纹底色:"Stripe fill",格线:"Grid lines",全框:"All",横线:"Rows",三线表:"Three-line",格线颜色:"Grid colour",格线粗细:"Grid line width",格子字号:"Cell text size",恢复默认:"Reset",方向:"Direction",竖排:"Vertical",横排:"Horizontal",颜色:"Colours",行列:"Rows & columns",加一行:"Add row",减一行:"Remove row",加一列:"Add column",减一列:"Remove column",单元格:"Cells",调整列宽:"Resize table columns","调整第 {n} 列宽":"Resize column {n}",拖动调整这一列和右边一列的宽度:"Drag to resize this column and the one to its right","第 {n} 行第 {m} 列":"Row {n}, column {m}","粘贴内容读不出表格:每行需要用制表符、逗号或空格分隔的单元格":"The pasted text has no readable table: each line needs cells separated by tabs, commas, or spaces",在线图库需要服务端:"Stock photos need the server","部署服务端并登录账户后,可以在这里搜索、插入可商用的在线图片;未配置密钥时自动使用 Openverse。":"Deploy the server and sign in to search and insert commercially usable photos here; without API keys it falls back to Openverse.",搜索在线图片:"Search stock photos",搜索:"Search","搜索中…":"Searching…",图库来源:"Stock source","{label}:未配置密钥":"{label}: no API key","图库搜索失败,请稍后重试":"Stock search failed. Please try again later.","图片导入失败,请稍后重试":"Could not import this photo. Please try again later.",图库暂不可用:"Stock photos unavailable","正在读取图库…":"Loading stock sources…","输入关键词,搜索可商用的在线图片。":"Type a keyword to search commercially usable stock photos.","没有找到「{query}」相关图片":"No photos matched “{query}”",插入图库图片:"Insert stock photo",正在导入:"Importing","加载中…":"Loading…",加载更多:"Load more",水平翻转:"Flip horizontal",垂直翻转:"Flip vertical",实线:"Solid line",虚线:"Dash",左上圆角:"Top-left radius",右上圆角:"Top-right radius",右下圆角:"Bottom-right radius",左下圆角:"Bottom-left radius",统一圆角:"Uniform radius","间距 {n}":"Gap {n}",查找替换:"Find and replace",查找:"Find",替换为:"Replace with",范围:"Scope",整套作品:"Whole deck",仅当前页:"Current page only","已替换 {n} 处":H("Replaced {n} match","Replaced {n} matches"),"找到 {n} 处":H("{n} match","{n} matches"),"{n} 处换完超出字数上限,没有替换":H("{n} match would overflow its field and was left as is","{n} matches would overflow their fields and were left as is"),没有找到要替换的文字:"No matching text found",全部替换:"Replace all"},RC={小红书:"RedNote",微博:"Weibo",推特:"Twitter",简约白:"Clean white",暖米色:"Warm beige",深空黑:"Deep black",薄荷绿:"Mint","旧模板 · 编辑档案":"Legacy · Editorial Archive","旧模板 · 公共剧场":"Legacy · Public Theatre","旧模板 · 议题封面":"Legacy · Issue Cover","旧模板 · 编辑部":"Legacy · Editorial","旧模板 · 清单":"Legacy · Checklist","旧模板 · 信号":"Legacy · Signal","旧模板 · 夜航":"Legacy · Night Flight","苹方 PingFang":"PingFang",思源黑体:"Noto Sans SC",思源宋体:"Noto Serif SC",霞鹜文楷:"LXGW WenKai",站酷小薇:"ZCOOL XiaoWei",系统宋体:"System serif",系统默认:"System default",站酷黄油体:"ZCOOL QingKe HuangYou",马善政毛笔:"Ma Shan Zheng",杂志:"Magazine",清新:"Fresh",森系:"Forest",甜美:"Sweet",文艺:"Literary",极简:"Minimal",夜读:"Midnight",霓虹夜:"Neon Night",纸墨:"Paper & Ink",海盐:"Sea Salt",松林:"Pine",莓果:"Berry",奶咖:"Latte",黑白:"Mono",墨黑:"Charcoal",现代黑体:"Modern Sans",杂志宋体:"Editorial Serif",书卷宋体:"Book Serif",手写文楷:"Handwritten Kai",海报小薇:"Poster XiaoWei",系统苹方:"System PingFang",霓虹青:"Neon cyan",霓虹粉:"Neon pink",贴纸白边:"Sticker",糖果描边:"Candy outline",复古投影:"Retro shadow",黑底标签:"Black label",黄色底块:"Yellow tag",日落渐变:"Sunset",极光渐变:"Aurora",金色:"Gold",专栏:"Column","宋体正文配一点朱红,标题、导语、图注和引文都按杂志的版式排,适合随笔、观察和长文。":"Serif text with a touch of vermilion, with titles, standfirsts, captions and quotes set like a magazine, for essays, observations and long reads.",备忘录:"Notes","像手机里的一页备忘录:顶栏、日期、能勾选的待办和荧光笔重点,适合清单、攻略和生活记录。":"A page from a phone's notes: the top bar, the date, to-dos to tick and highlighted lines, for checklists, guides and everyday notes.",信笺:"Letter","霞鹜文楷写在红格信纸上,段落首行缩进,适合书信、日记和写给自己的话。":"LXGW WenKai on red-ruled letter paper with indented paragraphs, for letters, diaries and notes to yourself.","深色底、暖灰色宋体和一弯金色月亮,适合读书笔记、夜晚随笔和情绪文字。":"A dark page, warm grey serif type and a gold crescent, for reading notes, night essays and moods.",极光:"Aurora","柔和的彩色光晕上铺一张磨砂卡片,适合生活方式、习惯清单和成长分享。":"A frosted card over soft glows of colour, for lifestyle posts, habit lists and personal growth.",文档:"Doc","知识库式的页面:顶部路径、提示框、代码块和表格,适合教程、速查表和干货整理。":"A knowledge-base page with a path bar, callouts, code blocks and tables, for tutorials, cheat sheets and how-tos.",宣纸:"Rice paper","宣纸底色、宋体首行缩进,页码刻成一方朱红印章,适合节气、诗词和传统文化。":"Rice-paper tones, indented serif text and folios cut as a vermilion seal, for solar terms, poetry and traditional culture.",瑞士:"Swiss","黑色粗线、一抹红和大号页码,像一页国际主义版式,适合设计、方法和观点。":"Heavy black rules, one red and big folios, like a page of International Style, for design, methods and opinions.",手账:"Journal","点阵纸上的霞鹜文楷,配荧光笔标题、胶带和便利贴,适合周末记录、vlog 和手账。":"LXGW WenKai on dot-grid paper with highlighted headings, tape and sticky notes, for weekend logs, vlogs and journals.",书信:"Letters",日记:"Diary",读书:"Reading",干货:"How-to",编辑部:"Editorial","用刊头和正文网格组织长文,适合观点与方法文章。":"A masthead and a text grid for long opinion and how-to pieces.",清单:"Checklist","把步骤排成可以逐项勾选的工作页,适合教程和计划。":"Steps laid out as tickable work sheets, for tutorials and plans.",信号:"Signal","用海报式大标题亮出判断,适合短观点。":"Poster-size headlines that state a view, for short takes.",夜航:"Night Flight","沿时间和路线展开一段记录,适合随笔与灵感。":"A record told along a time line and a route, for essays and ideas.",霓虹:"Neon",粗野:"Brutalist","黄黑撞色、硬阴影和粗线,适合宣言与规则清单。":"Yellow on black, hard shadows and heavy rules, for manifestos and rule lists.",柔光:"Soft Light",蓝图:"Blueprint","工程网格、尺寸标注和图签,适合计划与结构拆解。":"Drafting grids, dimension marks and a title block, for plans and structure breakdowns.",聚光:"Spotlight","16:9 演示套图:暖白底上一轮橙色大圆,黑色粗体大标题、细线和大页码,观点页整页铺橙色,适合汇报、路演、课程和分享。":"A 16:9 presentation deck: a big orange sun on warm white, bold black headlines, hairlines and big page numbers, and a statement page all in orange, for reports, pitches, courses and talks.",讲座:"Talk","大图配大标题,时间、地点、嘉宾一目了然,适合讲座、分享会和活动报名。":"A big photo and a big title with the time, place and speaker at a glance, for talks, meetups and sign-ups.",促销:"Sale","大字优惠配产品插画,适合新品、折扣和门店活动。":"A big offer over a product illustration, for launches, discounts and in-store events.",招聘:"Hiring","团队头像排成一格,空着的那格留给新人,下面列职位和投递方式,适合招聘和团队介绍。":"The team as a grid of portraits with one seat left open, the roles and how to apply under it, for hiring and team pages.",节日:"Festival","月亮、祥云和竖排标题,适合中秋等节日问候。":"A full moon, clouds and a vertical title, for Mid-Autumn and other festival greetings.",邀请函:"Invitation","金色边框、居中排版,适合晚宴、发布会和典礼邀请。":"Gold frames and centered type, for dinners, launches and ceremonies.",金句:"Quote","一句话配出处,适合金句、日签和读书摘抄。":"One line and its source, for quotes, daily cards and reading notes.",商品主图:"Product image","产品图配卖点和价格角标,适合电商主图和新品介绍。":"The product with its selling points and a price badge, for shop listings and launches.",视频封面:"Video cover","相机取景框里的超大标题,带录制、时间码和对焦框,适合视频和直播封面。":"A huge title in a camera viewfinder, with REC, a timecode and a focus mark, for video and live-stream covers.",公众号首图:"WeChat header","标题在左、图片在右,适合公众号文章首图。":"Title on the left, picture on the right, for WeChat article headers.",宣传单:"Flyer","A4 单页:大标题、插画、时间地点和预约按钮,适合课程和活动传单。":"One A4 page with a big title, an illustration, the time and place and a booking button, for classes and events.",活动:"Event",门店:"Store",小票:"Receipt",团队:"Team",问候:"Greeting",邀请:"Invitation",日签:"Daily card",电商:"E-commerce",产品:"Product",封面:"Cover",视频:"Video",公众号:"WeChat",印刷:"Print",课程:"Class",干货笔记:"Study notes","格子纸、荧光笔大标题和三条要点,适合小红书知识类笔记封面。":"Grid paper, a highlighted headline and three points, for Rednote how-to and study note covers.",图片拼贴:"Photo collage","照片配胶带和角标贴纸,下面是大标题,适合小红书探店、旅行和生活封面。":"A taped-on photo with a badge sticker over a big title, for Rednote travel, food and lifestyle covers.",菜单:"Menu","A4 单页:店名大标题、八道菜品和价格,适合咖啡店、餐厅和饮品菜单。":"One A4 page with a big title and eight dishes with prices, for cafés, restaurants and drink menus.",价目表:"Price list","撕下来的小票:虚线隔开的项目和价格、预约框和条码,适合美甲、美发、咖啡和工作室。":"A torn-off receipt: items and prices between dashed rules, a booking box and a barcode, for nail and hair salons, cafés and studios.",证书:"Certificate","金色双框、居中大字和奖章,适合荣誉证书、获奖证书和结业证书。":"Gold double frames, centred type and a medal, for honours, awards and course completion.","一整张插画配横跨中间一排的大标题,导出时切成九张,发朋友圈拼成一张大图。":"One illustration with a title across the middle row, exported as nine squares that make one picture on WeChat Moments.",课程表:"Timetable","表格按科目自动配色,适合学校课程表、培训排课和每周计划。":"A table that colours each subject on its own, for school timetables, class schedules and weekly plans.",餐饮:"Food & drink",朋友圈:"Moments",学校:"School",展览海报:"Exhibition","黑白水墨条纹配超大 exhibition. 字标,适合展览、发布会和艺术活动。":"Black ink stripes over a huge exhibition. wordmark, for shows, launches and art events.",新品预告:"Coming soon","深色底上的彩色光斑、毛玻璃信息板和 COMING SOON 大字,适合新品预告、发布倒计时和预约。":"Colour glows on a dark page, a frosted panel and a huge COMING SOON, for teasers, countdowns and pre-orders.",节气:"Solar term","水墨远山、落日和竖排毛笔大字,配一方红印,适合节气、节日和传统文化日签。":"Ink-wash hills, a setting sun and a vertical brush title with a red seal, for solar terms, festivals and daily cards.",播客封面:"Podcast cover","包豪斯色块和几何圆,配期数大字,适合播客、电台和系列节目封面。":"Bauhaus blocks and circles with a big episode number, for podcast, radio and series covers.",演示封面:"Pitch cover","雾面渐变底上一行巨大的标题,适合商业计划书、汇报和演讲的首页。":"One huge title on a misty gradient, for the first slide of a pitch, a report or a talk.",作品集封面:"Portfolio cover","Playfair 大字 PORTFOLIO 压在黑白照片上,配一枚红签,适合作品集、摄影集和个人主页封面。":"A big Playfair PORTFOLIO over a black-and-white photo with a red tab, for portfolios, photo books and profile covers.",甜品菜单:"Dessert menu","A4 单页:竖排大标题、八道甜品和价格,两角配橙黄蓝的花,适合甜品店、面包店和下午茶菜单。":"One A4 page with a vertical title and eight desserts with prices, flowers in two corners, for dessert shops, bakeries and afternoon tea.",婚礼请柬:"Wedding invitation","尤加利叶环里写着花体 Save the Date 和两个人的名字,适合婚礼、订婚和纪念日邀请。":"A eucalyptus wreath around a script Save the Date and two names, for weddings, engagements and anniversaries.",秋日市集:"Autumn market","枫叶和银杏叶上下围着宋体大标题,适合市集、秋季活动和周末聚会。":"Maple and ginkgo leaves above and below a big serif title, for markets, autumn events and weekend gatherings.",数据盘点:"Data roundup","朱红大年份配三个大数字和一张柱状图,像杂志的数据页,适合年度盘点、月度总结和数据海报。":"A big vermilion year with three big numbers and a bar chart, like a magazine data page, for yearly and monthly roundups.",对比表:"Comparison","蓝色刊头配一张大字号的对比表格和一句结论,适合产品对比、方案选择和清单式总结。":"A blue header with a large comparison table and a verdict, for product comparisons and choosing between options.",成长记录:"Growth log","墨绿底上金色大年份和一条时间线,一个节点一件事,适合年度总结、成长复盘和里程碑打卡。":"A gold year and a timeline on deep green, one event per step, for year-end reviews and milestones.",生日贺卡:"Birthday card","花体 Happy Birthday 配宋体祝福和几片彩纸,适合生日祝福、纪念日和好友卡片。":"A script Happy Birthday with a serif wish and confetti, for birthdays, anniversaries and cards for friends.",杂志封面:"Magazine cover","Playfair 大字刊名、细线刊头和一张大图,像一本独立杂志的封面,适合小红书封面、专题和期刊。":"A big Playfair masthead, a hairline rule and one large picture, like an independent magazine's cover, for Rednote covers, features and issues.",书单:"Book list","一排彩色书脊立在书架上,书名竖排在书脊里,下面一本一句推荐,适合书单、好物清单和年度推荐。":"A row of coloured spines on a shelf, each title set upright in its spine and a line of praise for each below, for reading lists, picks and year-end favourites.",年度汉字:"Word of the year","一个毛笔大字配拼音和一方朱红印章,适合年度汉字、年终总结和新年愿望。":"One big brush character with its pinyin and a vermilion seal, for a word of the year, year-end reviews and new year wishes.",音乐节:"Music festival","夜空里一轮被地平线切开的渐变太阳和霓虹网格,配大字标题和演出阵容,适合音乐节、演出和派对。":"A gradient sun cut by the horizon over a neon grid in a night sky, with a big title and the lineup, for festivals, gigs and parties.",旅行明信片:"Travel postcard","红蓝航空信封边、带齿孔的邮票和邮戳,霞鹜文楷写在横线上,适合旅行分享、问候和祝福。":"Red and blue airmail edges, a perforated stamp and a postmark, with LXGW WenKai written on ruled lines, for travel notes, greetings and wishes.",设计周:"Design week","黑字大号数字压在一个红圆上,下面三栏信息,国际主义版式,适合设计周、展会和论坛。":"Big black numerals over a red circle with three columns of details below, in the International Style, for design weeks, fairs and forums.",年终:"Year-end",双十一:"Double 11","一张大优惠券上印着立体的 11.11,下面是活动名、满减、时间和抢购按钮,适合双十一、年货节和店铺大促。":"A big coupon printed with a 3D 11.11, then the sale's name, the discount, the dates and a shop-now button, for Double 11, New Year shopping and store-wide sales.",圣诞:"Christmas","毛衣花样织在领口:雪花、圣诞树和锯齿纹,下摆是罗纹,中间写 MERRY CHRISTMAS 和祝福,适合圣诞贺卡、平安夜问候和圣诞活动。":"A sweater's pattern knitted round the yoke, snowflakes, trees and zigzags, a ribbed hem, and MERRY CHRISTMAS with a wish in between, for Christmas cards, Christmas Eve greetings and Christmas events.",元旦:"New Year's Day","一本手撕日历:去年最后一页刚撕掉,新的一页印着大大的 1、今天的标题和宜忌,适合元旦、跨年和新年计划。":"A tear-off calendar with last year's final page just torn away: the new page prints a big 1, the day's headline and what to do and not to do, for New Year's Day, New Year's Eve and resolutions.",新年:"New Year",春节:"Spring Festival","整张是一个红包:封口压着金色的福字圆章,下面是毛笔大字、祝福和日期,适合春节拜年、新春祝福和放假通知。":"The whole page is a red envelope: a gold seal with 福 on its flap, a big brush title, a wish and the dates below, for Chinese New Year greetings and holiday notices.",数字清单:"Numbered list","公众号首图:左边一块朱红色压着一个巨大的编号,右边是宋体大标题,适合清单、干货和系列文章。":"A WeChat header: a huge number on a block of vermilion and a big serif title beside it, for lists, how-tos and article series.",远山:"Distant hills","公众号首图:晨雾里五层山脊叠向远处,太阳半落在山后,宋体标题写在天上,适合旅行、随笔和生活方式。":"A WeChat header: five ridges fading into the morning mist, the sun half behind the hills and a serif title in the sky, for travel, essays and lifestyle.",大会主视觉:"Conference key visual","横版主视觉:深夜蓝底上几圈轨道绕着一颗发光的球,左边是大标题、时间和地点,适合大会、峰会和发布会的背景板。":"A landscape key visual: orbits round a glowing sphere on midnight blue, with a big title, the dates and the venue on the left, for conference, summit and launch backdrops.",年会:"Annual gala","横版主视觉:黑底金线的装饰艺术风,扇形光芒、双线框和渐变金色大字,适合年会、颁奖礼和晚宴。":"A landscape key visual in Art Deco gold on black: a sunburst fan, a double frame and big gold-leaf lettering, for company galas, award nights and dinners.",会议议程:"Agenda","A4 横版:左边钴蓝色块写会议名、日期和地点,右边细线隔开的六行日程,适合会议、论坛和活动流程。":"A4 landscape: the event's name, date and venue on a cobalt panel and six sessions between hairlines on the right, for conferences, forums and event schedules.",年度报告:"Annual report","A4 封面:超大的年份压在金色等高线上,下面是宋体标题,适合年度报告、企业画册和白皮书。":"An A4 cover: a huge year over gold contour lines with a serif title below, for annual reports, company brochures and white papers.",数据卡:"Data card","方图:克莱因蓝底上一个巨大的数字,下面一句话说清它是什么,适合数据发布、调查结论和社交分享。":"A square: one huge number on Klein blue and a line saying what it means, for data releases, survey findings and social posts.",倒计时:"Countdown","方图:六十格刻度的表盘中间一个大数字,下面写活动和时间,适合发布会、开售和考试倒计时。":"A square: a big number in the middle of a sixty-tick dial, with the event and its time below, for countdowns to launches, sales and exams.",大会:"Conference",主视觉:"Key visual",议程:"Agenda",会议:"Meeting",报告:"Report",社交:"Social",对比测评:"Versus","小红书封面:黄黑两栏斜着对开,中间一枚 VS 徽章,两边各写一个名字和一句结论,适合对比测评、二选一和选购攻略。":"A Xiaohongshu cover: yellow and black panels meeting on a slant with a VS badge between them, a name and a verdict on each side, for comparisons, either-or picks and buying guides.",打卡计划:"Habit tracker","小红书封面:三十个圆圈排成打卡格,已完成的涂绿打勾,配宋体大标题,适合打卡挑战、学习计划和习惯养成。":"A Xiaohongshu cover: thirty circles in a check-in grid, the days done filled green and ticked, under a big serif title, for challenges, study plans and habits.",冷知识:"Fun fact","小红书封面:明黄底上一个巨大的白色问号,问题写成大标题,下面一段解答,适合冷知识、科普和问答。":"A Xiaohongshu cover: a huge white question mark on bright yellow, the question as the title and the answer below, for fun facts, explainers and Q&A.",旅行攻略:"Trip route","小红书封面:海岸线边的手绘地图,虚线路线串起四个编号地点,每站一行名字,适合旅行攻略、路线规划和城市漫游。":"A Xiaohongshu cover: a hand-drawn map by the coast, a dashed route joining four numbered stops, a line for each, for travel guides, routes and city walks.",年度排行:"Top five","小红书封面:黑底上五条由长到短的橙色名次条,每条写一个名字,适合排行榜、年度推荐和好物清单。":"A Xiaohongshu cover: five orange bars, longest first, on black, a name on each, for rankings, picks of the year and product lists.",测评:"Review",打卡:"Check-in",科普:"Explainer",排行:"Ranking",开业大吉:"Grand opening","红白条纹的遮阳篷下挂着 OPEN 招牌,复古双线框里是宋体红字大标题、三行开业优惠、营业时间地址和领券按钮,适合开业、新店开张和周年庆。":"An OPEN sign hanging under a red and white striped awning and, in a shop sign's double frame, a big red serif title, three opening offers, the day and address and a coupon button, for openings, new shops and anniversaries.",马拉松:"Race bib","橙色速度线上别着一张号码布:大号码、赛事名和公里数,下面三行时间、起点和报名,适合马拉松、夜跑和运动赛事。":"A race bib pinned over orange speed stripes, its big number, the race and the distance, then three lines for the start, the place and sign-up, for marathons, night runs and races.",直播预告:"Live show","黑底上亮着红色的 ON AIR 灯牌,大标题、开播时间和平台,底部一排声波,适合直播预告、带货专场和线上发布。":"A red ON AIR sign lit on black, a big title, the start time and platform and a row of sound levels at the foot, for live-stream announcements, shopping shows and online launches.",七夕:"Qixi","靛紫夜空里一条银河,织女星和牛郎星隔河相望,鹊桥连起两颗星,金色宋体大字,适合七夕、情人节和纪念日。":"The Milky Way across an indigo sky, Vega and Altair either side of it and a magpie bridge between them, with big gold serif lettering, for Qixi, Valentine's Day and anniversaries.",端午:"Dragon Boat Festival","一条龙舟划过朱红的太阳,下面是海水纹,竖排毛笔大字配一方朱印,左边写日子和放假安排,适合端午问候、放假通知和门店活动。":"A dragon boat crossing a vermilion sun over a pattern of waves, a vertical brush title with a vermilion seal and the date and holidays beside them, for Dragon Boat greetings, holiday notices and shop events.",开业:"Opening",运动:"Sports",赛事:"Race",直播:"Live",黑胶歌单:"Vinyl playlist","方图:一张黑胶唱片从深蓝封套里滑出半张,封套上印着歌单名,下面三行曲目,适合歌单、播客和音乐推荐。":"A square: a vinyl record sliding half out of its deep blue sleeve, the playlist's name printed on the sleeve and three tracks below, for playlists, podcasts and music picks.",自我介绍:"Hello card","方图:一张红色的 HELLO 姓名贴,白底上手写你的名字,下面三栏写坐标、职业和爱好,适合自我介绍、新人报到和社群破冰。":"A square: a red HELLO name sticker with your name written on its white, then three fields for where you are, what you do and what you love, for introductions, first days and breaking the ice.","方图:深蓝夜空里一排月相,中间的满月是今晚,大号日期配一句话,适合日签、晚安和每日打卡。":"A square: a row of moon phases across a deep blue night, the full moon in the middle for tonight, a big date and a line for the day, for daily cards, good-night posts and daily check-ins.",报头首图:"Front page","公众号首图:像一份报纸的头版,宋体报头、双线和日期栏,大标题旁边是一张网点印出来的海上日落,适合周刊、专栏和资讯。":"A WeChat cover laid out like a newspaper's front page: a serif masthead, double rules and a dateline, and beside the headline a sunset over the sea printed in halftone dots, for weeklies, columns and news.",人物访谈:"Interview","公众号首图:左边一块赤陶色上压着两个巨大的引号,右边是受访者的一句话、名字和身份,适合人物访谈、对话和用户故事。":"A WeChat cover: two giant quote marks on a terracotta block, and beside it a line from the interviewee with their name and role, for interviews, conversations and customer stories.",歌单:"Playlist",晚安:"Good night",周刊:"Weekly",访谈:"Interview",答辩:"Thesis defense","16:9 答辩套图:深蓝封面上一枚金色细线校徽,桂枝围着一本打开的书,配衬线大标题;内页米白底,左边一道深蓝书脊,章节号和罗马数字编号用金色斜体,结尾页写着「恳请各位老师批评指正」,适合毕业答辩、开题报告和学术汇报。":"A 16:9 deck for a thesis defense: a gold hairline college seal, a laurel round an open book, on a navy cover with a serif title; inner pages on warm white with a navy spine down the left, chapter numbers and roman numerals in gold italics, and an ending that asks the committee for their comments, for defenses, proposals and academic talks.",学术:"Academic",简历:"Résumé","A4:粗黑的名字和蓝色的职位,右上角是联系方式,一道粗线下面写关于我,再按时间排五行工作与教育,适合求职简历和个人履历。":"A4: a bold black name and a blue job title, contact details top right, then under a heavy rule a few words about you and five lines of work and education in time order, for job applications and CVs.",求职:"Job hunting",红头通知:"Official notice","A4:红色的单位名称和文号,红线中间一颗星,下面是通知标题、称呼、正文和五条事项,落款上盖着红章,适合放假通知、公司公告和社团通知。":"A4: the organisation's name and file number in red, a red rule with a star at its middle, then the notice's title, who it is for, its body and five points, with a red seal over the sign-off, for holiday notices, company announcements and club notices.",通知:"Notice",公告:"Announcement",探店点评:"Food review","小红书封面:俯视的一碗牛肉面,筷子架在碗边,右上角一枚红色评分章,下面三行人均、推荐和地址,适合探店、美食点评和餐厅推荐。":"A RedNote cover: a bowl of beef noodles seen from above with chopsticks across its rim, a red score stamp top right and three lines below for the price, what to order and the address, for food spots, reviews and restaurant picks.",探店:"Food spot",课程封面:"Course cover","16:9 横版封面:方格纸上一个明黄大圆写着课号,一支铅笔斜靠在圆边,左边是课程标题、一句介绍和讲师、时长、难度,适合网课封面、培训和分享会。":"A 16:9 cover: a big yellow circle with the lesson number on squared paper, a pencil leaning on its edge, and on the left the course title, a line about it and the teacher, length and level, for online courses, training and talks.",音乐:"Music",旅行:"Travel",展会:"Fair",设计:"Design",展览:"Exhibition",新品:"New product",预告:"Teaser",国风:"Chinese style",播客:"Podcast",演示:"Presentation",汇报:"Report",作品集:"Portfolio",婚礼:"Wedding",市集:"Market",盘点:"Roundup",对比:"Comparison",成长:"Growth",生日:"Birthday",祝福:"Wishes",竖版海报:"Portrait posters",方图:"Squares",横版封面:"Landscape covers","A4 印刷":"A4 print","A4 横版":"A4 landscape","A4 横":"A4 landscape",朋友圈九宫格:"Moments grid",九宫格:"3×3 grid",复盘:"Review",长文:"Long-form",观点:"Opinion",倡议:"Advocacy",生活:"Life",人物:"People",方法:"How-to",教程:"Tutorial",短文:"Short",随笔:"Essay",灵感:"Ideas",夜景:"Night",观察:"Observation",宣言:"Manifesto",海报:"Poster",计划:"Planning",结构:"Structure",矩形:"Rectangle",圆形:"Circle",三角形:"Triangle",菱形:"Diamond",五边形:"Pentagon",五角星:"Star",六边形:"Hexagon",心形:"Heart",对话气泡:"Speech bubble",直线:"Line",箭头:"Arrow",二维码:"QR code",实用:"Utilities",内容:"Content",二维码内容:"QR code content",纠错级别:"Error correction",码边距:"Quiet zone",窄:"Narrow",标准:"Standard",宽:"Wide","品牌 logo":"Brand logo","上传 logo":"Upload logo","更换 logo":"Replace logo","移除 logo":"Remove logo","logo 盖在码中央,会自动按最高纠错级别 H 生成,扫码不受影响":"The logo sits over the code's centre; the code is generated at the top error correction (H), so it still scans","logo 上传失败,请稍后重试":"The logo upload failed. Please try again",码点颜色:"Module colour",背景颜色:"Background colour",模块样式:"Module shape",圆角:"Rounded",预设:"Presets",图表:"Chart",类型:"Type",图表类型:"Chart type",柱状图:"Bar chart",系列:"Series",堆叠方式:"Stacking",分组:"Grouped",堆叠:"Stacked",百分比:"Percent","第 {n} 系列":"Series {n}",系列名称:"Series name",系列颜色:"Series colour",删除系列:"Delete series",添加系列:"Add series",环形图:"Ring chart",折线图:"Line chart",雷达图:"Radar chart",数据:"Data",数值标签:"Value labels",显示:"Show",图例:"Legend",自动:"Auto",隐藏:"Hide",图表颜色:"Chart colour",添加一项:"Add a point",新增:"New","第 {n} 项标签":"Point {n} label","第 {n} 项数值":"Point {n} value","删除第 {n} 项":"Remove point {n}",经典:"Classic",商务蓝:"Business blue",配色:"Colour sets",森林:"Forest",糖果:"Candy",暖橙:"Warm amber",促销红:"Sale red",双向箭头:"Double arrow",星角内径:"Star inner radius",尾巴位置:"Tail position",调整圆角:"Adjust corner rounding",调整星角内径:"Adjust star inner radius",调整气泡尾巴:"Adjust bubble tail",填满:"Fill",适应:"Fit",原图:"Original",圆头:"Round",平头:"Butt",方头:"Square",圆滑:"Round",尖角:"Miter",斜切:"Bevel",无:"None",圆点:"Dot",收藏:"Favorites","收藏{title}":"Favorite {title}","取消收藏{title}":"Unfavorite {title}",背景图案:"Page pattern",网格:"Grid",横线:"Lines",方格:"Crosshatch",底色:"Base colour",图案色:"Motif colour",密度:"Density",小:"Small",中:"Medium",大:"Large",起点:"Start",终点:"End",正常:"Normal",正片叠底:"Multiply",滤色:"Screen",叠加:"Overlay",变暗:"Darken",变亮:"Lighten",颜色减淡:"Color dodge",颜色加深:"Color burn",强光:"Hard light",差值:"Difference",排除:"Exclusion",色相:"Hue",饱和度:"Saturation",颜色:"Color",明度:"Luminosity",属性:"Properties",图层:"Layers",历史:"History",移动对象:"Move object",拖拽移动:"Drag to move",调整大小:"Resize",旋转对象:"Rotate object",裁剪上边:"Crop top edge",裁剪右上角:"Crop top-right corner",裁剪右边:"Crop right edge",裁剪右下角:"Crop bottom-right corner",裁剪下边:"Crop bottom edge",裁剪左下角:"Crop bottom-left corner",裁剪左边:"Crop left edge",裁剪左上角:"Crop top-left corner","图层已锁定,先解锁后再编辑":"This layer is locked. Unlock it to edit.",请先结束当前变换:"Finish the current transform first",新增页面:"Add page",复制页面:"Duplicate page",插入页面:"Insert pages",替换页面:"Replace page",套用模板:"Apply template",插入模板页:"Insert template pages",删除页面:"Delete page",切换页面:"Switch page",调整页面顺序:"Reorder pages",更改页面背景:"Change page background",重命名页面:"Rename page",更新页面:"Update page",调整页面尺寸:"Resize page",调整参考线:"Adjust guides",更换配色:"Change palette",更换字体组合:"Change font set",替换颜色:"Replace color",替换字体:"Replace font",锁定对象:"Lock object",解锁对象:"Unlock object",隐藏对象:"Hide object",显示对象:"Show object",重命名对象:"Rename object",编辑内容:"Edit content",调整顶点:"Adjust vertices",更改样式:"Change style",调整裁切:"Adjust crop",删除对象:"Delete object",调整层级:"Change stacking",复制对象:"Duplicate object",插入对象:"Insert object",编组:"Group",解组:"Ungroup",编辑:"Edit",初始文档:"Initial document","文件不是有效的 JSON":"The file isn't valid JSON","JSON 顶层必须是文档对象":"The JSON must be a document object at the top level","自由画布文档未通过校验:需要 v1–v20 之一的完整文档结构":"The freeform document didn't pass validation: it needs a complete v1–v20 document","Markdown 文档缺少必填字段:source、platformId、themeId、fontFamily、profile":"The Markdown document is missing required fields: source, platformId, themeId, fontFamily, profile","无法识别的文档:需要自由画布文档或 Markdown 文档":"Unrecognized document: it needs to be a freeform or Markdown document","用户名至少 2 个字符":"Usernames need at least 2 characters","密码至少 4 个字符":"Passwords need at least 4 characters",该用户名已被占用:"That username is taken",用户名或密码不正确:"Wrong username or password",草稿内容无效:"The draft content is invalid","页面尺寸必须在 128 到 4096 px 之间":"Page sizes must be between 128 and 4096 px",图片上传未返回有效地址:"The upload did not return a usable address",本地草稿内容无效:"The local draft content is invalid",本地草稿保存结果无效:"Saving the local draft returned an invalid result","浏览器存储空间不足,删掉一些图片或项目后再试":"The browser is out of storage. Delete some pictures or projects and try again.","网络请求失败,请检查网络后重试":"The network request failed. Check your connection and try again.",服务器返回了无效响应:"The server sent an invalid response",认证请求已失效:"The sign-in request is no longer valid",服务器返回了无效图片地址:"The server sent an invalid image address",服务器返回了无效素材:"The server sent an invalid asset",服务器返回了无效素材列表:"The server sent an invalid asset list",服务器返回了无效草稿列表:"The server sent an invalid draft list",服务器返回了无效草稿:"The server sent an invalid draft",远程草稿内容无效:"The remote draft content is invalid","本地存储空间不足,模板保存失败":"Local storage is full, so the template was not saved",模板内容无效:"The template content is invalid",草稿不存在:"That draft no longer exists","仅支持 PNG / JPEG / WebP":"Only PNG, JPEG and WebP are supported",缺少草稿内容:"The draft has no content",缺少上传文件:"No file was uploaded",素材尺寸无效:"Invalid asset size",素材名称不能为空:"Asset names cannot be empty",素材图片地址无效:"Invalid asset image address","图片存储空间已满;系统只回收租约过期且未引用图片,释放空间可能延迟":"Image storage is full. Only expired, unused pictures are reclaimed, so space may free up later.",图片过大:"The picture is too large",未登录或登录已过期:"Not logged in, or the session expired",未知的草稿类型:"Unknown draft type","无效的草稿 ID":"Invalid draft ID",一张或多张图片无法保留:"One or more pictures could not be kept",用户不存在:"That user does not exist","这张图片已失效,请重新上传":"This picture has expired. Please upload it again."},NC={历史版本:"Version history","服务端每隔一段时间自动存一份旧内容(最多保留 30 个)。恢复哪个,哪个就成为当前内容;被替换的内容也会先存成一个版本。":"The server keeps an old copy every once in a while (up to 30). Restoring one makes it the current content; the content it replaces is saved as a version first.","暂时无法读取历史版本,请稍后重试":"Could not load the version history; please try again shortly","恢复失败,请稍后重试":"Restore failed; please try again shortly","还没有历史版本——编辑并保存一段时间后,这里会出现可以回去的版本。":"No versions yet — keep editing and saving, and versions you can go back to will appear here.","读取中…":"Loading…",恢复:"Restore","恢复这个版本?":"Restore this version?","当前内容会被替换(替换前也会存成一个版本,随时能再换回来)。":"The current content will be replaced (it is saved as a version first, so you can always switch back).","正在恢复…":"Restoring…","保存中…":"Saving…","导出中…":"Exporting…",平台:"Platform",主题:"Theme",字体:"Font","卡片署名:头像、昵称、账号":"Card byline: avatar, name and handle",导出:"Export",下载当前页:"Download this page",当前项目已自动保存:"This project is saved",当前内容还没有保存:"This work is not saved yet","用这套模板新建项目?":"Start a new project from this template?","模板会作为一个新项目打开,当前项目留在「我的项目」里。":"The template opens as a new project. This one stays in My projects.","最近的修改还没保存,打开模板后就找不回来了。":"The latest changes are not saved yet, so they will be gone once the template opens.",用模板新建:"Use template","Markdown 卡片工具栏":"Markdown Cards toolbar","打包下载 {n} 页":H("Download {n} page","Download {n} pages"),"Markdown 格式":"Markdown formatting",一级标题:"Heading 1",大标题:"Title",二级标题:"Heading 2",小标题:"Subtitle",重点文字:"bold text",斜体文字:"italic text",引用:"Quote",引用金句或核心观点:"A quote or key point",列表:"List",列表要点:"List item","插入分页(---)":"Insert page break (---)",分页:"Page break","{chars} 字 · {pages} 页":e=>`${e.chars} ${Number(e.chars)===1?"character":"characters"} · ${e.pages} ${Number(e.pages)===1?"page":"pages"}`,预览:"Preview",缩小预览:"Zoom out","恢复 100%":"Reset to 100%",放大预览:"Zoom in",上一页:"Previous page",页码:"Pages","第 {n} 页":"Page {n}",下一页:"Next page","导出当前页为 PNG":"Export this page as PNG",导出本页:"Export page","右键卡片导出单页 · 拖动卡片四角调整圆角 · 拖动图片右下角调整宽度":"Right-click a card to export it · drag its corners to round them · drag a picture’s corner to resize it","导出第 {n} 页 PNG":"Export page {n} as PNG","打包下载全部 {n} 页":H("Download {n} page as ZIP","Download all {n} pages as ZIP"),"导出 PDF":"Export PDF","导出全部 {n} 页 PDF":H("Export {n} page as PDF","Export all {n} pages as PDF"),"导出 PDF 失败":"Could not export the PDF","下载全部 {n} 页":H("Download {n} page","Download all {n} pages"),拼成一张长图:"Combine into one long image","长图太长,已缩小到 {scale}x 导出":"The long image was too tall, so it was exported at {scale}x","页面太多,拼不成一张长图,请改用打包下载":"Too many pages for one long image. Download them as a ZIP instead.","长图导出失败,请稍后重试":"Couldn't export the long image. Try again later.",切成九宫格:"Cut into a 3×3 grid","九宫格导出失败,请稍后重试":"Couldn't export the grid. Try again later.",分享链接:"Share link","生成一个不用登录就能打开的链接,手机扫码或在浏览器点开,就能看这 {n} 张卡片。":"Create a link anyone can open without signing in — scan the code on a phone or tap the link to view these {n} cards.",有效期:"Link lifetime","1 小时":"1 hour","6 小时":"6 hours","1 天":"1 day","7 天":"7 days","30 天":"30 days",自定义:"Custom",自定义小时数:"Custom number of hours",小时:"hours","最长 {h} 小时({d} 天)":"At most {h} hours ({d} days)",生成链接:"Create link","正在生成…":"Creating…","正在生成 {current}/{total} 页…":"Rendering {current}/{total}…",分享链接已创建:"Share link created","手机扫码或在浏览器打开链接就能看这 {n} 张卡片,长按图片可以保存到相册。":"Scan the code or open the link to view these {n} cards; long-press a picture to save it.","有效期到 {date}。":"Valid until {date}.","链接已被打开 {n} 次。":"The link has been opened {n} time(s).",分享二维码:"QR code for the share link",链接:"Link",复制链接:"Copy link",已复制:"Copied",撤销分享:"Revoke share","正在撤销…":"Revoking…","分享创建失败,请稍后重试":"Couldn't create the share link. Try again later.","撤销分享失败,请稍后重试":"Couldn't revoke the share link. Try again later.","分享已撤销,链接不再能打开":"The share was revoked; the link no longer opens",无法读取粘贴的图片:"Could not read the pasted picture",图片资源续租失败:"Could not keep uploaded pictures","暂时无法保护已上传图片,请稍后重试":"Uploaded pictures could not be protected right now. Please try again later.","Markdown 图片上传失败":"Could not upload the picture","图片处理失败,请稍后重试":"Could not process the picture. Please try again later.",图片插入失败:"Could not insert the picture","暂时无法插入这张图片,请稍后重试":"Could not insert this picture right now. Please try again later.",没有找到这个项目:"Project not found",它可能已经被删除了:"It may have been deleted",项目打开失败:"Could not open the project",自由编辑工作区:"Freeform workspace",自由编辑工具栏:"Freeform toolbar",撤销:"Undo","撤销(⌘Z)":"Undo (⌘Z)",重做:"Redo","重做(⇧⌘Z)":"Redo (⇧⌘Z)",格式:"Format",倍率:"Scale",质量:"Quality",导出质量:"Export quality",完成:"Done","导出 {current}/{total}":"Exporting {current}/{total}",插入:"Insert",从模板开始:"Start from a template",添加文本框:"Add a text box",添加标题:"Add a heading",添加副标题:"Add a subheading",添加一段正文:"Add a little body text","在这里写一段正文,说说你想分享的内容。":"Write a few lines here about what you want to share.",双击编辑文本:"Double-click to edit",文字左对齐:"Align text left",文字居中:"Center text",文字右对齐:"Align text right",文字两端对齐:"Justify text",文字靠上:"Lines at the top",文字垂直居中:"Lines in the middle",文字靠下:"Lines at the bottom",段落:"Paragraphs",段间距:"Paragraph spacing",无列表:"No list",项目符号列表:"Bulleted list",编号列表:"Numbered list",对齐与字型:"Alignment and style",显示标尺:"Show rulers",清除描边:"Remove outline",对象工具条:"Selection toolbar",缩小字号:"Smaller text",文字大小:"Text size",放大字号:"Larger text",文字填充颜色:"Text color",加粗文字:"Bold text",倾斜文字:"Italic text",形状填充颜色:"Shape fill color",形状轮廓颜色:"Shape outline color",轮廓粗细:"Outline width",转角弧度:"Corner rounding",线条描边颜色:"Line color",线条粗细:"Line width",末端箭头:"Arrow at the end",图形:"Graphic",图形填充颜色:"Graphic fill color",描边粗细:"Stroke width",取消编组:"Ungroup","{n} 个对象":H("{n} object","{n} objects"),编成一组:"Group them",透明度:"Opacity",位置:"Position","复制一份({keys})":"Duplicate ({keys})","删除对象({keys})":"Delete object ({keys})","{name} 副本":"{name} copy",元素:"Elements",浏览全部模板:"Browse all templates","加入{title}":"Add {title}","打开{title}":"Open {title}",返回模板列表:"Back to templates","加入全部 {n} 页":H("Add {n} page","Add all {n} pages"),"加入第 {n} 页":"Add page {n}",加到当前作品:"Add to this design",按尺寸筛选:"Filter by size","居中 · {position}":"Centered · {position}","{name} · {width}×{height}":"{name} · {width}×{height}","文字、图片、颜色和图层都可以改。":"Words, pictures, colors and layers can all be changed.",默认文字样式:"Default text styles",更多:"More",更多设置:"More settings",收起面板:"Close panel",这里只能放图片:"Only pictures can be dropped here","松开,把图片放进这一页":"Drop to add it to this page","拖动旋转,按住 Shift 以 15° 为步长":"Drag to rotate; hold Shift for 15° steps",文字:"Text",线条:"Line",图标:"Icons",搜索元素:"Search elements",没有找到元素:"Nothing found",关闭面板:"Close panel",自由画布:"Freeform canvas",页面列表:"Page list",收起页面列表:"Collapse the page list",新增页面:"Add page",复制页面:"Duplicate page",删除页面:"Delete page",重命名页面:"Rename page",图片裁剪:"Crop picture",比例:"Ratio",裁剪:"Crop",图片取景:"Picture framing",显示参考线:"Show guides",对象吸附:"Snap to objects",预览缩放:"Zoom",缩小画布:"Zoom out",视图:"View",适应画布:"Zoom to fit",放大画布:"Zoom in",按住拖动可拉出竖向参考线:"Drag to pull out a vertical guide",按住拖动可拉出横向参考线:"Drag to pull out a horizontal guide","拖动参考线,拖出页面删除;双击移除":"Drag to move a guide, drag it off the page or double-click to remove it",调整图片取景:"Adjust framing",图片缩放:"Picture zoom",缩小图片:"Zoom picture out",图片缩放比例:"Picture zoom level",放大图片:"Zoom picture in",对齐与分布:"Align and distribute",左对齐:"Align left",水平居中:"Align center",右对齐:"Align right",顶对齐:"Align top",垂直居中:"Align middle",底对齐:"Align bottom",水平均分:"Distribute horizontally",垂直均分:"Distribute vertically",取消:"Cancel",调整取景:"Adjust framing",编辑历史:"Edit history",当前:"Current",撤销到这一步:"Undo to this step",重做到这一步:"Redo to this step",对象路径:"Object path",编辑范围:"Editing scope",页面名称:"Page name",背景:"Background",锁定状态:"Lock state",已锁定:"Locked","锁定来源:{name}":"Locked by {name}",解锁:"Unlock",包含锁定图层:"Contains locked layers","锁定来源:{name},请先在图层面板解锁":"Locked by {name}. Unlock it in the Layers panel first.",位置与尺寸:"Position and size","中心 X":"Center X","中心 Y":"Center Y",宽:"W",高:"H",旋转:"Rotation","缩放 %":"Scale %",字号:"Size",行高:"Line height",字距:"Letter spacing",粗体:"Bold",斜体:"Italic",竖排:"Vertical",描边:"Stroke",描边颜色:"Stroke color","描边 hex":"Stroke hex",描边宽度:"Stroke width",文字片段:"Text span","已选 {n} 字":H("{n} character selected","{n} characters selected"),加粗:"Bold","标色 {color}":"Color {color}",标色:"Color",下划线:"Underline",删除线:"Strikethrough",缩小所选文字:"Smaller selected text",放大所选文字:"Larger selected text",所选文字字号:"Size of the selected text","字号 {n}":"Size {n}",清除样式:"Clear styles",高亮:"Highlight","高亮 {color}":"Highlight {color}",删除文字片段:"Remove span",填充:"Fill",文字颜色:"Text color",图片填充方式:"Picture fit",裁剪图片:"Crop picture",重置图片取景:"Reset framing",当前已经是默认取景:"Framing is already at the default",重置取景:"Reset framing",形状描边颜色:"Shape stroke color",图形描边颜色:"Graphic stroke color",线条颜色:"Line color",描边宽:"Width",粗细:"Weight",虚线:"Dashed",实线:"Solid",线帽:"Caps",拐角:"Joins",端点:"Ends",外观:"Appearance","不透明度 %":"Opacity %",圆角:"Corner radius",阴影:"Shadow",混合模式:"Blend mode",滤镜:"Filters",排列:"Arrange",层级:"Stacking",后移:"Backward",前移:"Forward",置底:"To back",置顶:"To front",添加滤镜:"Add filter",亮度:"Brightness",对比度:"Contrast",模糊:"Blur","滤镜{name}":"Filter {name}",清除滤镜:"Clear filters","图片填充失败,请稍后重试":"Could not fill with that picture, please try again",粘贴填充图片:"Paste picture fill",粘贴替换图片:"Paste-replace picture",拼图:"Collage",两张并排:"Side by side",一大两小:"One big, two small",两小一大:"Two small, one big",三等分:"Three strips",四宫格:"Quad grid",六宫格:"Six grid",滤镜预设:"Filter presets","滤镜预设{name}":"Filter preset {name}",原图:"Original",色调:"Hue",灰度:"Grayscale",复古黄:"Sepia",黑白:"Mono",复古:"Vintage",暖阳:"Sunny",冷调:"Cool",胶片:"Film",褪色:"Faded",高对比:"Punch",柔焦:"Soft focus",添加阴影:"Add shadow",阴影颜色:"Shadow color",阴影模糊:"Shadow blur",阴影水平偏移:"Shadow X offset",阴影垂直偏移:"Shadow Y offset",清除阴影:"Clear shadow",包含不同尺寸页面:"Pages of different sizes","当前作品包含不同尺寸页面。ZIP 中的图片会保留各自页面尺寸,不会统一拉伸或裁剪。":"This design has pages of different sizes. Each image in the ZIP keeps its own page size and is never stretched or cropped.",继续导出:"Export anyway",画布操作:"Canvas actions",复制:"Copy",剪切:"Cut",粘贴:"Paste",原位复制:"Duplicate in place",原位粘贴:"Paste in place",剪切对象:"Cut object",上移一层:"Bring forward",下移一层:"Send backward",置于顶层:"Bring to front",移到底层:"Send to back",取消隐藏:"Unhide",复制样式:"Copy style",粘贴样式:"Paste style",缩放到选区:"Zoom to selection",页面操作:"Page actions","{name} 的页面操作":"Actions for {name}",重命名此页:"Rename page",复制此页:"Duplicate page",删除此页:"Delete page",上移一位:"Move up",下移一位:"Move down",移到最前:"Move to start",移到最后:"Move to end",组:"Group","图层或父级已锁定,无法组合":"The layer or its parent is locked, so it cannot be grouped","图层或父级已锁定,无法解组":"The layer or its parent is locked, so it cannot be ungrouped",至少选择两个同级图层后才能组合:"Select at least two sibling layers to group",只能组合同一组内的图层:"Only layers in the same group can be grouped",隐藏图层无法组合:"Hidden layers cannot be grouped",当前图层无法组合:"These layers cannot be grouped",请选择一个或多个组合后再解组:"Select one or more groups to ungroup",当前图层无法解组:"These layers cannot be ungrouped",无法在当前编辑范围内插入对象:"Objects cannot be inserted in the current scope",无法在当前编辑范围内粘贴对象:"Objects cannot be pasted in the current scope","组合未能应用到当前文档,请重试":"Grouping did not apply. Please try again.","解组未能应用到当前文档,请重试":"Ungrouping did not apply. Please try again.",对齐到页面:"Align to page",对齐:"Align",分布:"Distribute",删除顶点:"Delete vertex",添加顶点:"Add vertex",拖拽复制:"Drag to duplicate",删除参考线:"Delete guide",新增参考线:"Add guide",拖动顶点:"Drag vertex",请先解锁图片:"Unlock the picture first",图片正在处理中:"The picture is still processing",请先切换到填满模式后裁剪:"Switch to Fill before cropping",适应模式不支持调整取景:"Framing is not available in Fit mode",图片加载完成后可裁剪:"Cropping becomes available once the picture loads",图片加载完成后可调整取景:"Framing becomes available once the picture loads","图片续租失败,请检查网络后重试":"Could not keep the picture. Check your connection and try again.","图片加载失败,请重试":"The picture failed to load. Please try again.",当前裁剪范围无法应用该比例:"That ratio does not fit the current crop","图片裁剪未能应用,请重试":"The crop did not apply. Please try again.","图片插入失败,请稍后重试":"Could not insert the picture. Please try again later.","背景图片设置失败,请稍后重试":"Could not set the background picture. Please try again later.",设为背景:"Set as background","图片加载超时,导出已取消":"Pictures took too long to load, so the export was canceled","图片加载失败,导出已取消":"A picture failed to load, so the export was canceled","导出失败,请稍后重试":"Export failed. Please try again later.","打包导出失败,请稍后重试":"Export all failed. Please try again later.","文件读取失败,请重试":"Could not read the file. Please try again.","没有找到这个项目,它可能已经被删除了":"Project not found. It may have been deleted.",文本内容:"Text content",组合:"Group",所选图层已组合:"Grouped the selected layers",所选组合已解组:"Ungrouped the selected groups",无法组合所选图层:"Could not group the selected layers",无法解组所选图层:"Could not ungroup the selected layers","{name} 已重命名":"Renamed {name}",只能同时选择同一组内的图层:"Only layers in the same group can be selected together","{name} 已设为自身隐藏,仍受父级隐藏影响":"{name} is now hidden itself and still hidden by its parent","{name} 已取消自身隐藏,仍受父级隐藏影响":"{name} is no longer hidden itself but is still hidden by its parent","{name} 已隐藏":"{name} hidden","{name} 已显示":"{name} shown","{name} 已设为自身锁定,仍受父级锁定影响":"{name} is now locked itself and still locked by its parent","{name} 已取消自身锁定,仍受父级锁定影响":"{name} is no longer locked itself but is still locked by its parent","{name} 已锁定":"{name} locked","{name} 已解锁":"{name} unlocked","{name} 已移至第 {n} 层":"Moved {name} to position {n}","图层已锁定,无法调整层级":"The layer is locked, so its stacking cannot change",图层只能在同一组内排序:"Layers can only be reordered within their group","已移动 {count} 个图层至 {name} 上方":H("Moved {count} layer above {name}","Moved {count} layers above {name}","count"),自身隐藏:"Hidden itself",自身可见:"Visible itself","受父级隐藏影响,当前隐藏":"Hidden by its parent",当前隐藏:"Currently hidden",当前可见:"Currently visible",自身锁定:"Locked itself",自身未锁定:"Not locked itself","受父级锁定影响,当前锁定":"Locked by its parent",当前锁定:"Currently locked",当前未锁定:"Currently unlocked","包含锁定后代,结构只读":"Contains locked layers, so its structure is read-only","当前选择包含锁定图层,结构只读":"The selection contains locked layers, so its structure is read-only","隐藏图层 {name}":"Hide layer {name}","显示 {name}":"Show {name}","隐藏 {name}":"Hide {name}","锁定图层 {name}":"Lock layer {name}","解锁 {name}":"Unlock {name}","锁定 {name}":"Lock {name}",隐藏:"hidden",锁定:"locked",和:" and ",";":"; ","第 {n} 层":"Level {n}",折叠图层组:"Collapse group",展开图层组:"Expand group","受父级{state}影响":"Affected by its parent: {state}",重命名图层:"Rename layer",图层组合操作:"Layer grouping","组合所选图层 (Ctrl+G)":"Group selected layers (Ctrl+G)","解组所选图层 (Ctrl+Shift+G)":"Ungroup selected layers (Ctrl+Shift+G)",图层树:"Layer tree","自定义 · {width}×{height}px":"Custom · {width}×{height}px",页面尺寸:"Page size",常用页面比例:"Common page ratios",自定义尺寸:"Custom size",宽度:"Width","宽度 px":"Width px",高度:"Height","高度 px":"Height px",应用尺寸:"Apply size",属性和图层面板:"Properties and layers",自由编辑面板:"Freeform panel","拖动顶点 {n}":"Drag vertex {n}",只能导入本机上的文档:"Only documents on this computer can be imported","读取导入的文档失败,请重试":"Couldn't read the imported document. Try again.",这里只能导入自由画布文档:"Only freeform documents can be imported here",导入的设计:"Imported design",花字:"Text styles",套用花字:"Apply text style",效果:"Effect",效果颜色:"Effect color",效果第二种颜色:"Effect second color",方向:"Direction",镂空:"Hollow",错位:"Splice",投影:"Offset",回声:"Echo",故障:"Glitch",立体:"3D",底色:"Label",荧光笔:"Highlighter",强度:"Strength",偏移:"Offset",厚度:"Depth",扩展:"Spread",风格:"Styles",配色:"Palettes",字体组合:"Font sets",搭配:"Looks",标题:"Title",正文内容:"Body text",全部替换:"Change all","把整套里的 {from} 都换成 {to}":"Change {from} to {to} on every page","把整套里用「{from}」的文字都换成「{to}」":"Set every text in {from} in {to}","{label} 本设计用色":"{label} colors in this design","{label} 本设计 {color}":"{label} design color {color}",我的字体:"My fonts",导入字体:"Import a font","导入字体…":"Import a font…","删除字体 {font}":"Remove font {font}","字体导入失败,请稍后重试":"Could not import the font. Please try again later.","字体文件太大,最大 40 MB":"The font file is too large. The limit is 40 MB.","不是可用的字体文件,请选 TTF、OTF、WOFF 或 WOFF2":"This is not a usable font file. Choose a TTF, OTF, WOFF or WOFF2 file.","浏览器读不了这个字体文件,换一个试试":"The browser cannot read this font file. Try another one.","浏览器存储空间不足,删掉一些字体后再试":"The browser is out of storage. Remove some fonts and try again.","字体读写失败,请稍后重试":"Could not read or save fonts. Please try again later.",当前浏览器无法保存字体:"This browser cannot save fonts.","字体库正在其他标签页中升级,请刷新后重试":"The font library is being upgraded in another tab. Refresh and try again.","{label} 色板":"{label} swatches","{label} 自定义 HEX":"{label} custom hex","{label} 屏幕取色":"{label} eyedropper",屏幕取色:"Eyedropper","{label} 常用颜色":"{label} common colors","{label} 最近使用":"{label} recent colors","{label} 最近 {color}":"{label} recent {color}","{label} 类型":"{label} type",插入图片填充:"Fill with a picture",纯色:"Solid",渐变:"Linear",径向:"Radial",透明:"None","{label} 颜色":"{label} color","{label} 色标 {n} 颜色":"{label} stop {n} color","{label} 色标 {n} hex":"{label} stop {n} hex","{label} 色标 {n} 位置百分比":"{label} stop {n} position %","{label} 删除色标 {n}":"{label} remove stop {n}",删除色标:"Remove stop","{label} 渐变起始色":"{label} gradient start color","{label} 渐变起始 hex":"{label} gradient start hex","{label} 渐变结束色":"{label} gradient end color","{label} 渐变结束 hex":"{label} gradient end hex","{label} 渐变角度":"{label} gradient angle","{label} 渐变角度数值":"{label} gradient angle value","{label} 添加色标":"{label} add stop",添加色标:"Add stop",替换图片:"Replace picture",清除图片:"Remove picture"},LC={...RC,...NC,...MC},eR=[{id:"zh",label:"中文"},{id:"en",label:"English"}],Zw="dingcard.lang.v1",FC={en:LC},pu=new Set;function $C(){if(typeof window>"u")return"zh";try{return localStorage.getItem(Zw)==="en"?"en":"zh"}catch{return"zh"}}let tr=$C();function Jw(e){typeof document<"u"&&(document.documentElement.lang=e==="zh"?"zh-CN":"en")}Jw(tr);function Lp(){return tr}function tR(e){if(e!==tr){tr=e;try{localStorage.setItem(Zw,e)}catch{}Jw(e);for(const t of[...pu])t()}}function nR(){return tr==="zh"?"zh-CN":"en-US"}function Fp(e,t){return t?e.replace(/\{(\w+)\}/g,(n,r)=>r in t?String(t[r]):n):e}function e1(e,t){const n=tr==="zh"?void 0:FC[tr][e];return n===void 0?Fp(e,t):typeof n=="function"?n(t??{}):Fp(n,t)}function OC(e){return pu.add(e),()=>{pu.delete(e)}}function zC(){return te.useSyncExternalStore(OC,Lp,Lp)}function rR(){return zC(),e1}const oR=[{id:"rednote",label:"小红书",width:360,height:480,header:"none"},{id:"weibo",label:"微博",width:360,height:480,header:"weibo"},{id:"twitter",label:"推特",width:360,height:480,header:"twitter"}],Nr=[{id:"light",label:"简约白",background:"#ffffff",color:"#1a1a1a",accent:"#2563eb"},{id:"warm",label:"暖米色",background:"#faf6f0",color:"#3a3226",accent:"#c2703d"},{id:"dark",label:"深空黑",background:"#1c1c1e",color:"#f2f2f7",accent:"#0a84ff"},{id:"mint",label:"薄荷绿",background:"#eef7f2",color:"#1f3a2e",accent:"#2fa36b"},{id:"template-column",label:"专栏",background:"#f3eee4",color:"#1d1a16",accent:"#c0402a",look:"column",type:{fontSize:15,lineHeight:1.85,blockGap:13,padding:30}},{id:"template-memo",label:"备忘录",background:"#fffdf8",color:"#1c1c1e",accent:"#e0a000",look:"memo",type:{fontSize:15,lineHeight:1.8,blockGap:12,padding:26}},{id:"template-letter",label:"信笺",background:"#f6efe1",color:"#2e2a36",accent:"#a5493a",look:"letter",type:{fontSize:15,lineHeight:1.9,blockGap:0,padding:30}},{id:"template-night",label:"夜读",background:"#16171b",color:"#d9d3c6",accent:"#c9a45c",look:"night",type:{fontSize:15,lineHeight:1.9,blockGap:13,padding:30}},{id:"template-aurora",label:"极光",background:"#f1edf7",color:"#2a2735",accent:"#6f55e8",look:"aurora",type:{fontSize:14.5,lineHeight:1.8,blockGap:11,padding:36}},{id:"template-doc",label:"文档",background:"#ffffff",color:"#1f2329",accent:"#3370ff",look:"doc",type:{fontSize:14.5,lineHeight:1.8,blockGap:11,padding:28}},{id:"template-xuan",label:"宣纸",background:"#f2ecdf",color:"#2a2622",accent:"#b23a2e",look:"xuan",type:{fontSize:15,lineHeight:2,blockGap:10,padding:32}},{id:"template-swiss",label:"瑞士",background:"#f4f4f1",color:"#111111",accent:"#e5382a",look:"swiss",type:{fontSize:14.5,lineHeight:1.75,blockGap:12,padding:28}},{id:"template-journal",label:"手账",background:"#fbf7ef",color:"#3a342f",accent:"#e8875a",look:"journal",type:{fontSize:15,lineHeight:1.85,blockGap:12,padding:28}},{id:"template-editorial-archive",label:"旧模板 · 编辑档案",background:"#eee8db",color:"#171411",accent:"#dc3f2f",hidden:!0},{id:"template-public-theatre",label:"旧模板 · 公共剧场",background:"#11110f",color:"#f3ecdc",accent:"#ed3828",hidden:!0},{id:"template-issue-cover",label:"旧模板 · 议题封面",background:"#eee3cf",color:"#18191d",accent:"#ec5a2a",hidden:!0},{id:"template-editorial",label:"旧模板 · 编辑部",background:"#f6f3ea",color:"#171717",accent:"#d94836",hidden:!0},{id:"template-checklist",label:"旧模板 · 清单",background:"#f3f5ed",color:"#14271f",accent:"#174a38",hidden:!0},{id:"template-signal",label:"旧模板 · 信号",background:"#f2f0e8",color:"#111111",accent:"#e4472f",hidden:!0},{id:"template-night-flight",label:"旧模板 · 夜航",background:"#111820",color:"#f2efe6",accent:"#f2bd4b",hidden:!0}];function iR(e){return typeof e!="string"||!e?Nr[0]:Nr.find(t=>t.id===e)??Nr[0]}function sR(e){const t=Nr.filter(r=>r.hidden!==!0);if(typeof e!="string"||!e)return t;const n=Nr.find(r=>r.id===e);return n!=null&&n.hidden?[...t,n]:t}const DC=[{id:"PingFang SC",label:"苹方 PingFang"},{id:"'Noto Sans SC', sans-serif",label:"思源黑体"},{id:"'Noto Serif SC', serif",label:"思源宋体"},{id:"'LXGW WenKai TC', cursive",label:"霞鹜文楷"},{id:"'ZCOOL XiaoWei', serif",label:"站酷小薇"},{id:"Songti SC, serif",label:"系统宋体"},{id:"system-ui, sans-serif",label:"系统默认"}],jC=[{id:"'Playfair Display', serif",label:"Playfair Display"},{id:"'Archivo Black', sans-serif",label:"Archivo Black"},{id:"'Great Vibes', cursive",label:"Great Vibes"},{id:"'ZCOOL QingKe HuangYou', sans-serif",label:"站酷黄油体"},{id:"'Ma Shan Zheng', cursive",label:"马善政毛笔"}],WC=[...DC,...jC],BC=22,HC=16,UC=1.75,KC=14,YC={none:0,weibo:60,twitter:64},lR={nickname:"Shinve",handle:"Shinve",location:"",avatarColor:"#1c1c2e",avatarImage:null,verified:!0,headerFirstPageOnly:!1},aR=["#3b82f6","#e08a2b","#3a9e5f","#9b59d0","#d94a6a"];function cR(e,t,n){var r,o,i,s;return{themeId:t.id,look:t.look??null,width:e.width,height:e.height,padding:((r=t.type)==null?void 0:r.padding)??BC,header:e.header,headerHeight:YC[e.header],background:t.background,color:t.color,accent:t.accent,fontFamily:n,fontSize:((o=t.type)==null?void 0:o.fontSize)??HC,lineHeight:((i=t.type)==null?void 0:i.lineHeight)??UC,blockGap:((s=t.type)==null?void 0:s.blockGap)??KC}}function uR(e,t){return{"--card-w":`${e.width}px`,"--card-h":`${e.height}px`,"--card-pad":`${e.padding}px`,"--card-bg":e.background,"--card-fg":e.color,"--card-accent":e.accent,"--card-font":e.fontFamily,"--card-fs":`${e.fontSize}px`,"--card-lh":String(e.lineHeight),"--card-gap":`${e.blockGap}px`,"--card-radius":`${t}px`}}const $p="'Playfair Display', serif",VC="'Archivo Black', sans-serif",GC="'Noto Serif SC', serif",Op="'LXGW WenKai TC', cursive",Xt=(e,t=2)=>String(e).padStart(t,"0"),zp=e=>Math.max(2,String(e).length),Dp=(e,t)=>`${Xt(e,zp(t))} / ${Xt(t,zp(t))}`,XC=["日","一","二","三","四","五","六"];function QC(e){const t=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],n=Math.max(1,Math.min(99,Math.floor(e)));if(n<10)return t[n];const r=Math.floor(n/10),o=n%10;return`${r===1?"":t[r]}拾${o===0?"":t[o]}`}const t1={column:{folio:Dp,fonts:[$p],words:"“”■"},memo:{folio:(e,t)=>`${e} / ${t}`,date:e=>`${e.getFullYear()}年${e.getMonth()+1}月${e.getDate()}日 ${Xt(e.getHours())}:${Xt(e.getMinutes())}`,words:"‹备忘录⋯✓"},letter:{folio:(e,t)=>`第 ${e} 页 · 共 ${t} 页`,fonts:[Op]},night:{folio:e=>Xt(e),fonts:[$p],words:"“"},aurora:{folio:Dp},doc:{folio:(e,t)=>`${e} / ${t}`,words:"i✓"},xuan:{folio:e=>QC(e),fonts:[GC],words:"「」完零壹贰叁肆伍陆柒捌玖拾"},swiss:{folio:e=>Xt(e),fonts:[VC],words:"/"},journal:{folio:e=>`P.${Xt(e)}`,date:e=>`${Xt(e.getMonth()+1)}.${Xt(e.getDate())} 周${XC[e.getDay()]}`,fonts:[Op],words:"周日一二三四五六✓"}};function qC(e,t,n,r=new Date){var l;const o=t1[e],i=Number.isFinite(n)&&n>0?Math.floor(n):1,s=Math.min(i,Math.max(1,Number.isFinite(t)?Math.floor(t)+1:1));return{folio:o.folio(s,i),date:((l=o.date)==null?void 0:l.call(o,r))??null}}function ZC(e){const t=e.split(`
|
|
45
|
+
`).map(n=>n.replace(/^#+\s*/,"").trim()).find(n=>n.length>0);return t?t.length>24?t.slice(0,24)+"…":t:"未命名草稿"}function ZA(e){var t,n;return((n=(t=e.slides[0])==null?void 0:t.name)==null?void 0:n.trim())||"自由编辑作品"}function JA(e){var t;return(t=e.title)!=null&&t.trim()?e.title.trim():e.mode==="markdown-card"?qA(e.document.source):ZA(e.document)}function _p(e,t,n){const r=Td(t);if(!r)throw new Error("草稿内容无效");t=r;const o=_d(e),i={id:t.id??me(),title:JA(t),schemaVersion:2,updatedAt:Date.now()},s=t.mode==="markdown-card"?{...i,mode:"markdown-card",document:{...t.document,images:t.document.images??Bw(t.document.source)}}:{...i,mode:"freeform-slide",document:t.document},l=o.findIndex(a=>a.id===s.id);return l>=0?o[l]=s:o.push(s),Yw(e,o,n),s}function eC(e,t,n){Yw(e,_d(e).filter(r=>r.id!==t),n)}function QM(e){let t;try{t=JSON.parse(e)}catch{return{ok:!1,error:"文件不是有效的 JSON"}}if(!er(t))return{ok:!1,error:"JSON 顶层必须是文档对象"};if(typeof t.documentVersion=="number"){const n=Ow(t);return n?{ok:!0,data:{mode:"freeform-slide",document:n}}:{ok:!1,error:"自由画布文档未通过校验:需要 v1–v20 之一的完整文档结构"}}if(ke(t.source)){const n=Kw(t);return n?{ok:!0,data:{mode:"markdown-card",document:n}}:{ok:!1,error:"Markdown 文档缺少必填字段:source、platformId、themeId、fontFamily、profile"}}return{ok:!1,error:"无法识别的文档:需要自由画布文档或 Markdown 文档"}}function Id(e){if(e.type==="image")return e.src;if(e.type==="shape"&&e.fill.type==="image"||e.type==="path"&&e.fill.type==="image")return e.fill.src;if(e.type==="qrcode"&&e.logoSrc!==void 0)return e.logoSrc}function Vw(e,t){return e.type==="qrcode"?{...e,logoSrc:t??e.logoSrc}:e.type==="image"?{...e,src:t??e.src}:e.type==="shape"&&e.fill.type==="image"?{...e,fill:{...e.fill,src:t??e.fill.src}}:e.type==="path"&&e.fill.type==="image"?{...e,fill:{...e.fill,src:t??e.fill.src}}:e}function Gw(e){return e.background.type==="image"?e.background.src:void 0}function Xw(e,t){return{...e,slides:e.slides.map(n=>n.background.type==="image"?{...n,background:{...n.background,src:t(n.background.src)}}:n)}}function Sl(e){const t=new Set;for(const n of e.slides){const r=Gw(n);r!==void 0&&t.add(r),Ni(n.nodes,o=>{if(o.type==="group")return;const i=Id(o);i!==void 0&&t.add(i)})}return[...t]}function Qw(e,t){const n=WA(e,r=>{const o=Id(r);return o===void 0?r:Vw(r,t(o))});return Xw(n,t)}function tC(e,t){return Qw(e,n=>{if(!t.isRef(n))return n;let r="";try{r=t.resolve(n)}catch{}if(!r)throw new Error(`本地图片引用无法解析:${n}`);return r})}async function nC(e,t){const n=Sl(e).find(a=>a.startsWith("img:"));if(n)throw new Error(`远程保存不支持本地图片引用:${n}`);const r=new Map,o=a=>a.toLowerCase().startsWith("data:image/"),i=a=>{let c=r.get(a);return c||(c=t(a).then(u=>{if(typeof u!="string"||u.trim()==="")throw new Error("图片上传未返回有效地址");return u}),r.set(a,c)),c},s=await BA(e,async a=>{const c=Id(a);return c===void 0||!o(c)?a:Vw(a,await i(c))}),l=new Map;for(const a of s.slides){const c=Gw(a);c!==void 0&&o(c)&&l.set(c,await i(c))}return Xw(s,a=>l.get(a)??a)}const rC=["image/png","image/jpeg","image/webp"],oC=60,iC=2e4;function bi(e,t="未命名图片"){const n=e.replace(/\s+/g," ").trim();return Array.from(n||t).slice(0,oC).join("")}function qM(e){return bi(e.replace(/\.[a-z0-9]{1,5}$/i,""))}function sC(e){const t=/^data:([^;,]+)[;,]/i.exec(e);return t?t[1].toLowerCase():null}function lC(e){const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(t+1);if(!/;base64$/i.test(e.slice(0,t)))return n.length;const r=n.endsWith("==")?2:n.endsWith("=")?1:0;return Math.max(0,Math.floor(n.length*3/4)-r)}function xl(e){return Number.isInteger(e)&&e>0&&e<=iC}function qw(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&t.id!==""&&typeof t.name=="string"&&typeof t.src=="string"&&t.src!==""&&xl(t.width)&&xl(t.height)&&typeof t.bytes=="number"&&Number.isFinite(t.bytes)&&t.bytes>=0&&typeof t.createdAt=="number"&&Number.isFinite(t.createdAt)}const Ip=new Intl.Collator("zh-Hans-CN",{numeric:!0,sensitivity:"base"});function aC(e,t="recent"){return[...e].sort((n,r)=>t==="name"?Ip.compare(n.name,r.name)||r.createdAt-n.createdAt:r.createdAt-n.createdAt||Ip.compare(n.name,r.name))}function ZM(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const cC=1,hs="assets";function uC(e){return e instanceof DOMException&&e.name==="QuotaExceededError"}function Ha(e){return uC(e)?new Error("浏览器存储空间不足,删掉一些素材后再试"):e instanceof Error?e:new Error("素材库读写失败,请稍后重试")}function fC(e="dingcard.assets"){let t=null;function n(){return typeof indexedDB>"u"?Promise.reject(new Error("当前浏览器无法使用素材库")):(t??(t=new Promise((o,i)=>{const s=indexedDB.open(e,cC);s.onupgradeneeded=()=>{const l=s.result;l.objectStoreNames.contains(hs)||l.createObjectStore(hs,{keyPath:"id"}).createIndex("userId","userId")},s.onsuccess=()=>{const l=s.result;l.onversionchange=()=>{l.close(),t=null},o(l)},s.onerror=()=>i(s.error),s.onblocked=()=>i(new Error("素材库正在其他标签页中升级,请刷新后重试"))}).catch(o=>{throw t=null,Ha(o)})),t)}async function r(o,i){const s=await n();return new Promise((l,a)=>{let c;const u=s.transaction(hs,o),d=i(u.objectStore(hs));d.onsuccess=()=>{c=d.result},u.oncomplete=()=>l(c),u.onerror=()=>a(Ha(u.error??d.error)),u.onabort=()=>a(Ha(u.error??d.error))})}return{all:o=>r("readonly",i=>i.index("userId").getAll(o)),get:o=>r("readonly",i=>i.get(o)),put:async o=>{await r("readwrite",i=>i.put(o))},delete:async o=>{await r("readwrite",i=>i.delete(o))}}}function Ua({userId:e,...t}){return t}function dC(e=fC(),t=Date.now){async function n(r,o){const i=await e.get(o);if(!i||i.userId!==r)throw new Error("素材不存在");return i}return{async list(r){const o=await e.all(r);return aC(o.filter(i=>i.userId===r&&qw(i)).map(Ua))},async add(r,o){const i=sC(o.dataUrl);if(!i||!rC.includes(i))throw new Error("仅支持 PNG、JPG、WebP 图片");if(!xl(o.width)||!xl(o.height))throw new Error("图片尺寸无效");const s={id:me(),userId:r,name:bi(o.name),src:o.dataUrl,width:o.width,height:o.height,bytes:lC(o.dataUrl),createdAt:t()};return await e.put(s),Ua(s)},async rename(r,o,i){const s=await n(r,o),l={...s,name:bi(i,s.name)};return await e.put(l),Ua(l)},async remove(r,o){const i=await e.get(o);i&&i.userId===r&&await e.delete(o)}}}const Pd="picture:",hC=4096,pC=60*60*1e3,gC=30*1e3,ps="pictures",gs="stamps",mC=/picture:([0-9a-z]+)/g;function Md(e){return e.startsWith(Pd)}function Pp(e){return Md(e)?e.slice(Pd.length):null}function yC(e){return[...e.matchAll(mC)].map(t=>t[1])}function Ka(e){return e.length>hC&&/^data:image\//i.test(e)}function wC(e){let t=3735928559,n=1103547991;for(let o=0;o<e.length;o+=1){const i=e.charCodeAt(o);t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677)}t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909);const r=o=>(o>>>0).toString(36).padStart(7,"0");return r(n)+r(t)+e.length.toString(36)}function Ya(e){return e.mode==="freeform-slide"?Sl(e.document):Object.values(e.document.images??{})}function Mp(e,t){if(e.mode==="freeform-slide")return{...e,document:Qw(e.document,t)};const n=e.document.images;if(!n)return e;const r=Object.fromEntries(Object.entries(n).map(([o,i])=>[o,t(i)]));return{...e,document:{...e.document,images:r}}}function kC(e=SC(),t=Date.now){const n=new Map,r=new Set,o=new Map;let i=new Map,s=0;function l(c){let u=n.get(c);return u===void 0&&(u=wC(c),n.set(c,u)),u}function a(c){if(!e||!Ka(c))return Promise.resolve(!1);const u=l(c);if(r.has(u))return Promise.resolve(!0);if(t()<s)return Promise.resolve(!1);let d=o.get(u);return d||(d=e.write(new Map([[u,c]]),t()).then(()=>(r.add(u),!0),()=>(s=t()+gC,!1)).finally(()=>o.delete(u)),o.set(u,d)),d}return{keep:a,pack(c,u){return!e||!Ya(c).some(Ka)?c:Mp(c,d=>{if(!Ka(d))return d;const f=l(d);return r.has(f)?(u==null||u.set(f,d),Pd+f):(a(d),d)})},async settle(){await Promise.all([...o.values()])},async confirm(c){if(!(!e||c.size===0))try{await e.touch(c,t())}catch{for(const u of c.keys())r.delete(u)}},async unpack(c){const u=new Set;for(const p of c)for(const w of Ya(p)){const k=Pp(w);k&&u.add(k)}if(!e||u.size===0)return c;const d=new Map,f=[];for(const p of u){const w=i.get(p);w===void 0?f.push(p):d.set(p,w)}if(f.length>0){const p=await e.read(f).catch(()=>new Map);for(const[w,k]of p)d.set(w,k),n.set(k,w),r.add(w)}return i=d,c.map(p=>Ya(p).some(Md)?Mp(p,w=>{const k=Pp(w);return k===null?w:d.get(k)??w}):p)},async sweep(c){if(!e)return;const u=()=>{const d=new Set;for(const f of c())for(const p of yC(f))d.add(p);return d};try{for(const d of await e.sweep(t()-pC,u))r.delete(d)}catch{}}}}function SC(){return typeof indexedDB>"u"?null:xC()}function xC(e="dingcard.pictures"){let t=null;function n(){return t??(t=new Promise((o,i)=>{const s=indexedDB.open(e,1);s.onupgradeneeded=()=>{const l=s.result;l.objectStoreNames.contains(ps)||l.createObjectStore(ps),l.objectStoreNames.contains(gs)||l.createObjectStore(gs)},s.onsuccess=()=>{const l=s.result;l.onversionchange=()=>{l.close(),t=null},l.onclose=()=>{t=null},o(l)},s.onerror=()=>i(s.error),s.onblocked=()=>i(new Error("图片库正在其他标签页中升级"))}).catch(o=>{throw t=null,o})),t}async function r(o,i){const s=await n();return new Promise((l,a)=>{const c=s.transaction([ps,gs],o);let u;try{u=i(c.objectStore(ps),c.objectStore(gs))}catch(d){c.abort(),a(d);return}c.oncomplete=()=>l(u()),c.onerror=()=>a(c.error),c.onabort=()=>a(c.error??new Error("图片库写入已取消"))})}return{read:o=>r("readonly",i=>{const s=new Map;for(const l of o){const a=i.get(l);a.onsuccess=()=>{typeof a.result=="string"&&s.set(l,a.result)}}return()=>s}),write:(o,i)=>r("readwrite",(s,l)=>{for(const[a,c]of o)s.put(c,a),l.put(i,a);return()=>{}}),touch:(o,i)=>r("readwrite",(s,l)=>{for(const[a,c]of o){const u=s.getKey(a);u.onsuccess=()=>{u.result===void 0&&s.put(c,a)},l.put(i,a)}return()=>{}}),sweep:(o,i)=>r("readwrite",(s,l)=>{const a=i(),c=[],u=l.getAllKeys(),d=l.getAll(),f=s.getAllKeys();return f.onsuccess=()=>{const p=new Map;u.result.forEach((C,m)=>p.set(C,d.result[m]));const w=C=>{const m=p.get(C);return typeof C=="string"&&a.has(C)||typeof m=="number"&&m>=o},k=new Set(f.result);for(const C of f.result)w(C)||(s.delete(C),l.delete(C),c.push(String(C)));for(const C of u.result)!k.has(C)&&!w(C)&&l.delete(C)},()=>c})}}const bC={register:(e,t)=>Mx(e,t),login:(e,t)=>Rx(e,t),logout:async()=>Nx(),current:async()=>Lx(),onInvalidated:()=>()=>{}};function EC(e){const t=Td(e);if(!t)throw new Error("本地草稿内容无效");return t}function Rp(e){return e instanceof DOMException&&(e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")}function vC(e){const t=kC(e),n={put:async c=>{const u=UA(c);return t.keep(c),u},resolve:c=>Md(c)?"":Ww(c),isRef:c=>Cd(c),register:(c,u)=>KA(c,u),collect:c=>Bw(c),retain:async()=>{}};async function r(c,u){const d=new Map,f=w=>t.pack(w,d);let p;try{p=_p(c,u,f)}catch(w){if(!Rp(w))throw w;await t.settle(),d.clear();try{p=_p(c,u,f)}catch(k){throw Rp(k)?new Error("浏览器存储空间不足,删掉一些图片或项目后再试"):k}}return t.confirm(d),p}let o=!1;function i(){o=!0,t.sweep(QA)}const s={list:async c=>{const u=await t.unpack(_d(c));return o||i(),u},save:async(c,u)=>{const d=EC(u),f=d.mode==="freeform-slide"?{...d,document:tC(d.document,n)}:d,p=await r(c,f),w=Rr(p);if(!w)throw new Error("本地草稿保存结果无效");return w},remove:async(c,u)=>{eC(c,u,d=>t.pack(d)),i()},listVersions:async()=>{throw new Error("版本历史需要部署服务端")},getVersion:async()=>{throw new Error("版本历史需要部署服务端")},restoreVersion:async()=>{throw new Error("版本历史需要部署服务端")},listTrash:async()=>{throw new Error("回收站需要部署服务端")},restore:async()=>{throw new Error("回收站需要部署服务端")},purge:async()=>{throw new Error("回收站需要部署服务端")}},l={list:async()=>{throw new Error("分享需要部署服务端")},create:async()=>{throw new Error("分享需要部署服务端")},revoke:async()=>{throw new Error("分享需要部署服务端")}},a={list:async()=>{throw new Error("API 令牌需要部署服务端")},create:async()=>{throw new Error("API 令牌需要部署服务端")},revoke:async()=>{throw new Error("API 令牌需要部署服务端")}};return{auth:bC,drafts:s,images:n,assets:dC(),shares:l,tokens:a,stock:null,remote:!1}}const uu="slicer.token.v1",fu=new Set;let du=null,hu=!1,Eo=0;class K extends Error{constructor(n,r){super(n);X(this,"status");this.name="ApiError",this.status=r}}function Ro(){if(!hu){hu=!0;try{const e=localStorage.getItem(uu);du=typeof e=="string"&&e!==""?e:null}catch{}}return du}function Ws(e){du=e,hu=!0;try{e?localStorage.setItem(uu,e):localStorage.removeItem(uu)}catch{}}function AC(e){if(!(!e||Ro()!==e)){Ws(null);for(const t of[...fu])try{t()}catch{}}}function ye(e){return typeof e=="object"&&e!==null}function Va(e){return ye(e)&&typeof e.id=="string"&&typeof e.username=="string"&&typeof e.createdAt=="number"&&Number.isFinite(e.createdAt)}function CC(e){const t=Td(e);if(!t)throw new K("远程草稿内容无效",null);return t}function TC(e){const t=e.replace(/\/+$/,"");async function n(h,E={}){const{authenticated:T=!0,...b}=E,A=T?Ro():null,I=new Headers(b.headers);A&&I.set("authorization",`Bearer ${A}`),b.body&&!(b.body instanceof FormData)&&!I.has("content-type")&&I.set("content-type","application/json");let P;try{P=await fetch(`${t}${h}`,{...b,headers:I})}catch{throw new K("网络请求失败,请检查网络后重试",null)}P.status===401&&AC(A);let L;try{L=await P.text()}catch{throw new K("服务器返回了无效响应",P.status)}let G;try{G=JSON.parse(L)}catch{throw new K("服务器返回了无效响应",P.status)}if(!P.ok){const xe=ye(G)&&typeof G.error=="string"?G.error:`请求失败(${P.status})`;throw new K(xe,P.status)}return{data:G,status:P.status}}const r={async register(h,E){const T=++Eo,{data:b,status:A}=await n("/api/auth/register",{method:"POST",body:JSON.stringify({username:h,password:E}),authenticated:!1});if(T!==Eo)throw new K("认证请求已失效",null);if(!ye(b)||!Va(b.user)||typeof b.token!="string"||b.token==="")throw new K("服务器返回了无效响应",A);return Ws(b.token),b.user},async login(h,E){const T=++Eo,{data:b,status:A}=await n("/api/auth/login",{method:"POST",body:JSON.stringify({username:h,password:E}),authenticated:!1});if(T!==Eo)throw new K("认证请求已失效",null);if(!ye(b)||!Va(b.user)||typeof b.token!="string"||b.token==="")throw new K("服务器返回了无效响应",A);return Ws(b.token),b.user},async logout(){Eo+=1,Ws(null)},async current(){let h=Ro();for(;h;)try{const{data:E,status:T}=await n("/api/auth/me"),b=Ro();if(b!==h){h=b;continue}if(!ye(E)||!Va(E.user))throw new K("服务器返回了无效响应",T);return E.user}catch(E){const T=Ro();if(T!==h){h=T;continue}if(E instanceof K&&E.status===401)return null;throw E}return null},onInvalidated(h){return fu.add(h),()=>fu.delete(h)}},o=(()=>{try{if(/^https?:\/\//i.test(t))return new URL(t).origin;if(typeof location<"u"&&location.origin)return location.origin}catch{}return null})();function i(h){const E=new Map,T=o??"http://local.invalid";for(const b of h){if(typeof b!="string")continue;const A=b.trim();if(A===""||/^data:/i.test(A)||A.startsWith("img:"))continue;let I;try{if(A.startsWith("/")&&!A.startsWith("//"))I=new URL(A,T);else if(A.startsWith("//")){if(!o||(I=new URL(A,o),I.origin!==o))continue}else if(/^https?:\/\//i.test(A)){if(!o||(I=new URL(A),I.origin!==o))continue}else continue}catch{continue}I.pathname!=="/"&&(E.has(I.pathname)||E.set(I.pathname,A))}return[...E.values()]}function s(h){return/^https?:\/\//i.test(h)?h:h.startsWith("//")?o?new URL(h,o).href:h:h.startsWith("/")&&/^https?:\/\//i.test(t)?new URL(h,t).href:h.startsWith("/")?h:`${t}/${h.replace(/^\/+/,"")}`}const l={async put(h){const E=await(await fetch(h)).blob(),T=new FormData;T.append("file",E);const{data:b,status:A}=await n("/api/images",{method:"POST",body:T});if(!ye(b)||typeof b.url!="string"||b.url.trim()==="")throw new K("服务器返回了无效图片地址",A);return s(b.url)},resolve:h=>h,isRef:()=>!1,register:()=>{},collect:()=>({}),async retain(h){const E=i(h);E.length!==0&&await n("/api/images/retain",{method:"POST",body:JSON.stringify({urls:E})})}};function a(h){if(!ye(h)||typeof h.url!="string"||h.url.trim()==="")return null;const E={id:h.id,name:h.name,src:s(h.url),width:h.width,height:h.height,bytes:typeof h.bytes=="number"?h.bytes:0,createdAt:h.createdAt};return qw(E)?E:null}function c(h,E){const T=a(h);if(!T)throw new K("服务器返回了无效素材",E);return T}function u(h){return!ye(h)||typeof h.id!="string"||h.id===""||typeof h.thumb!="string"||h.thumb===""?null:{id:h.id,thumb:h.thumb,width:Number.isFinite(h.width)&&h.width>0?h.width:0,height:Number.isFinite(h.height)&&h.height>0?h.height:0,author:typeof h.author=="string"?h.author:""}}function d(h,E){if(!ye(h)||!Array.isArray(h.sources)||typeof h.preferred!="string")throw new K("服务器返回了无效的图库响应",E);return{sources:h.sources.flatMap(b=>!ye(b)||typeof b.id!="string"||typeof b.label!="string"?[]:typeof b.available!="boolean"?[]:[{id:b.id,label:b.label,available:b.available}]),preferred:h.preferred}}function f(h,E){if(!ye(h)||typeof h.source!="string"||typeof h.page!="number")throw new K("服务器返回了无效的图库响应",E);const T=Array.isArray(h.results)?h.results.flatMap(b=>{const A=u(b);return A?[A]:[]}):[];return{source:h.source,page:h.page,total:typeof h.total=="number"&&h.total>0?Math.floor(h.total):0,results:T}}function p(h){if(/^https?:\/\//i.test(h))return h;try{return new URL(h,o??window.location.origin).href}catch{return h}}function w(h){return!ye(h)||typeof h.id!="string"||typeof h.url!="string"||h.url.trim()===""?null:{id:h.id,title:typeof h.title=="string"?h.title:"",url:p(h.url),createdAt:typeof h.createdAt=="number"?h.createdAt:0,expiresAt:typeof h.expiresAt=="number"?h.expiresAt:0,imageCount:typeof h.imageCount=="number"?h.imageCount:0,views:typeof h.views=="number"?h.views:0}}const k={async list(){const{data:h,status:E}=await n("/api/shares");if(!Array.isArray(h))throw new K("服务器返回了无效分享列表",E);return h.map(w).filter(T=>T!==null)},async create(h,E,T,b){const{data:A,status:I}=await n("/api/shares",{method:"POST",body:JSON.stringify({title:E,urls:T,...b?{expiresInHours:b}:{}})}),P=w(A);if(!P)throw new K("服务器返回了无效分享",I);return P},async revoke(h,E){await n(`/api/shares/${encodeURIComponent(E)}`,{method:"DELETE"})}},C={async list(){const{data:h,status:E}=await n("/api/assets");if(!Array.isArray(h))throw new K("服务器返回了无效素材列表",E);return h.map(a).filter(T=>T!==null)},async add(h,E){const T=await l.put(E.dataUrl),{data:b,status:A}=await n("/api/assets",{method:"POST",body:JSON.stringify({url:T,name:bi(E.name),width:E.width,height:E.height})});return c(b,A)},async rename(h,E,T){const{data:b,status:A}=await n(`/api/assets/${encodeURIComponent(E)}`,{method:"PATCH",body:JSON.stringify({name:bi(T)})});return c(b,A)},async remove(h,E){await n(`/api/assets/${encodeURIComponent(E)}`,{method:"DELETE"})}},m={async list(){const{data:h,status:E}=await n("/api/drafts");if(!Array.isArray(h))throw new K("服务器返回了无效草稿列表",E);return h.map(Rr).filter(T=>T!==null)},async save(h,E){const T=CC(E);let b=T;if(T.mode==="freeform-slide"){await l.retain(Sl(T.document));const L=await nC(T.document,G=>l.put(G));await l.retain(Sl(L)),b={...T,document:L}}const{data:A,status:I}=await n("/api/drafts",{method:"POST",body:JSON.stringify(b)}),P=Rr(A);if(!P)throw new K("服务器返回了无效草稿",I);return P},async remove(h,E){await n(`/api/drafts/${encodeURIComponent(E)}`,{method:"DELETE"})},async listVersions(h,E){const{data:T,status:b}=await n(`/api/drafts/${encodeURIComponent(E)}/versions`);if(!Array.isArray(T))throw new K("服务器返回了无效版本列表",b);return T.map(y).filter(A=>A!==null)},async getVersion(h,E,T){const{data:b,status:A}=await n(`/api/drafts/${encodeURIComponent(E)}/versions/${encodeURIComponent(T)}`),I=y(b);if(!I||!ye(b))throw new K("服务器返回了无效版本",A);return{...I,document:b.document}},async restoreVersion(h,E,T){const{data:b,status:A}=await n(`/api/drafts/${encodeURIComponent(E)}/versions/${encodeURIComponent(T)}/restore`,{method:"POST"}),I=Rr(b);if(!I)throw new K("服务器返回了无效草稿",A);return I},async listTrash(){const{data:h,status:E}=await n("/api/drafts/trash");if(!Array.isArray(h))throw new K("服务器返回了无效回收站列表",E);return h.map(g).filter(T=>T!==null)},async restore(h,E){await n(`/api/drafts/trash/${encodeURIComponent(E)}/restore`,{method:"POST"})},async purge(h,E){await n(`/api/drafts/trash/${encodeURIComponent(E)}`,{method:"DELETE"})}};function g(h){return!ye(h)||typeof h.id!="string"||typeof h.title!="string"?null:{id:h.id,title:h.title,mode:typeof h.mode=="string"?h.mode:"",schemaVersion:typeof h.schemaVersion=="number"?h.schemaVersion:2,updatedAt:typeof h.updatedAt=="number"?h.updatedAt:0,deletedAt:typeof h.deletedAt=="number"?h.deletedAt:0}}function y(h){return!ye(h)||typeof h.id!="string"||typeof h.title!="string"?null:{id:h.id,title:h.title,mode:typeof h.mode=="string"?h.mode:"",schemaVersion:typeof h.schemaVersion=="number"?h.schemaVersion:2,createdAt:typeof h.createdAt=="number"?h.createdAt:0}}function S(h){return!ye(h)||typeof h.id!="string"||typeof h.name!="string"?null:{id:h.id,name:h.name,scopes:Array.isArray(h.scopes)?h.scopes.filter(E=>typeof E=="string"):[],createdAt:typeof h.createdAt=="number"?h.createdAt:0,lastUsedAt:typeof h.lastUsedAt=="number"?h.lastUsedAt:null}}return{auth:r,drafts:m,images:l,assets:C,shares:k,tokens:{async list(){const{data:h,status:E}=await n("/api/tokens");if(!Array.isArray(h))throw new K("服务器返回了无效令牌列表",E);return h.map(S).filter(T=>T!==null)},async create(h,E,T){const{data:b,status:A}=await n("/api/tokens",{method:"POST",body:JSON.stringify({name:E,scopes:T})});if(!ye(b)||typeof b.token!="string"||b.token==="")throw new K("服务器返回了无效令牌",A);const I=S(b);if(!I)throw new K("服务器返回了无效令牌",A);return{...I,token:b.token}},async revoke(h,E){await n(`/api/tokens/${encodeURIComponent(E)}`,{method:"DELETE"})}},stock:{async sources(){const{data:h,status:E}=await n("/api/stock/sources");return d(h,E)},async search(h,E,T){const b=new URLSearchParams({q:h});E&&b.set("source",E),typeof T=="number"&&T>1&&b.set("page",String(T));const{data:A,status:I}=await n(`/api/stock/search?${b}`);return f(A,I)},async importImage(h,E){const{data:T,status:b}=await n("/api/stock/import",{method:"POST",body:JSON.stringify({source:h,id:E})});if(!ye(T)||typeof T.ref!="string"||T.ref==="")throw new K("服务器返回了无效的图库响应",b);if(typeof T.url!="string"||T.url==="")throw new K("服务器返回了无效的图库响应",b);return{ref:T.ref,url:s(T.url),alt:typeof T.alt=="string"?T.alt:""}}},remote:!0}}const Np="".trim(),_C="local-guest",Ar=vC(),Ga=Np?TC(Np):Ar,Kn=Ga===Ar?Ar:{...Ga,images:{...Ga.images,resolve:Ar.images.resolve,register:Ar.images.register}};function IC(e){return e===_C}function JM(e){return IC(e)?Ar:Kn}function PC(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>r in t?String(t[r]):n)}function H(e,t,n="n"){return r=>PC(Number(r[n])===1?e:t,r)}const MC={叮卡:"DingCard",返回工作台:"Back to dashboard","Markdown 卡片":"Markdown Cards",自由编辑:"Freeform","Markdown 卡片模板":"Markdown Card templates",自由编辑模板:"Freeform templates",海报与封面:"Posters and covers",叮卡能做什么:"What DingCard does","长文自动排成卡片,":"Long posts become card sets,",海报随手自由排版:"posters lay out freely","Markdown 卡片把一篇长文切成一组小红书、微博、推特卡片;自由编辑像做海报一样摆放文字、图片和形状。":"Markdown Cards turns one long post into a set of RedNote, Weibo or Twitter cards. Freeform places text, images and shapes the way you design a poster.","套编辑器,一个工作台":"editors, one dashboard",套成品模板:"ready-made templates","开源,可自部署":"open source, self-hostable",创建叮卡账号:"Create a DingCard account",欢迎回来:"Welcome back","只需要用户名和密码。":"All it takes is a username and a password.","登录后继续编辑你的项目。":"Log in to keep working on your projects.",登录或注册:"Log in or sign up",登录:"Log in",注册:"Sign up",用户名:"Username",密码:"Password","至少 2 个字符":"At least 2 characters","至少 4 个字符":"At least 4 characters","请稍候…":"One moment…",创建账号并进入:"Create account",创建账号:"Create account",或:"or","不注册,直接开始":"Start without an account","账号保存在你部署的服务器上,登录后可在多台设备间同步项目。不注册也能用,项目会自动保存在这台设备上。":"Your account lives on the server you deployed, so projects sync across devices. Without an account, projects still save automatically on this device.","账号和项目只保存在这台设备的浏览器里,不会上传。不注册也会自动保存;部署服务端后可在多台设备间同步。":"Your account and projects stay in this browser and are never uploaded. Projects save automatically even without an account; deploy the server to sync across devices.","出错了,请重试":"Something went wrong. Please try again.",编辑器出错了:"Something went wrong in the editor",页面出错了:"Something went wrong on this page",重新加载:"Reload",回到首页:"Back to home",账户登录与注册:"Log in or sign up","账号会安全保存到你的服务器,可在登录后跨设备同步草稿。":"Your account is stored on your server, and drafts sync across devices once you log in.","账号仅保存在此浏览器本地,不会上传,也不能跨设备同步。":"Your account stays in this browser only. It is never uploaded and does not sync across devices.",主导航:"Main navigation",展开侧栏:"Expand sidebar",收起侧栏:"Collapse sidebar",新建项目:"New project","写长文,自动分页成一组卡片":"Write long-form, paginated into cards automatically",像做海报一样自由排版:"Lay out freely, like a poster",页面:"Page",工作台导航:"Dashboard sections",首页:"Home",我的项目:"My projects",模板中心:"Templates",素材库:"Assets",最近打开:"Recently opened","服务器账号 · 多设备同步":"Server account · syncs across devices","本地账号 · 数据只存在这台设备":"Local account · data stays on this device",服务器账号:"Server account",本地账号:"Local account",切换到浅色模式:"Switch to light mode",切换到深色模式:"Switch to dark mode",切换到中文:"切换到中文",退出登录:"Log out","账号菜单({name})":"Account menu ({name})",打开导航:"Open navigation",切换深浅色:"Toggle dark mode","搜索项目、模板和操作":"Search projects, templates and actions",未命名:"Untitled","丢掉改动,继续":"Discard and continue","删除「{title}」?":"Delete “{title}”?","删除后无法恢复。":"This cannot be undone.",删除:"Delete",取消:"Cancel",关闭:"Close",关闭提示:"Dismiss",重试:"Retry",正在加载:"Loading","{title} 副本":"{title} copy","已复制「{title}」":"Duplicated “{title}”",复制失败:"Could not duplicate","暂时无法复制,请稍后重试":"Could not duplicate right now. Please try again later.","已删除「{title}」":"Deleted “{title}”","已删除「{title}」,30 天内可在回收站恢复":"Deleted “{title}” — it stays in the trash for 30 days",删除失败:"Could not delete","暂时无法删除,请稍后重试":"Could not delete right now. Please try again later.",重命名失败:"Could not rename","暂时无法重命名,请稍后重试":"Could not rename right now. Please try again later.",回收站:"Trash","删除后进入回收站:30 天内可以恢复,之后自动清除。":"Deleting moves it to the trash: restore it within 30 days, after that it is cleared automatically.","删除的项目在这里保留 30 天,可以恢复或彻底删除":"Deleted projects stay here for 30 days — restore or delete forever","删除的项目在这里保留 30 天:恢复就回到「我的项目」,内容和历史版本都在;到期没管的会被自动清除。":"Deleted projects stay here for 30 days: restoring moves one back to My projects with its content and version history; anything left past the window is cleared for good.","回收站是空的——删除的项目会在这里保留 30 天。":"The trash is empty — deleted projects stay here for 30 days.",彻底删除:"Delete forever","彻底删除「{title}」?":"Delete “{title}” forever?","彻底删除后无法恢复,它的内容和历史版本都会一起清掉。":"A permanent delete cannot be undone — the content and its version history go with it.","彻底删除失败,请稍后重试":"Could not delete forever right now. Please try again later.","暂时无法读取回收站,请稍后重试":"Could not load the trash; please try again shortly","{n} 天后自动清除":e=>`Cleared automatically in ${Number(e.n)===1?"1 day":`${e.n} days`}`,项目:"Projects",模板:"Templates",操作:"Actions",搜索与命令:"Search and commands","搜索项目、模板,或输入操作":"Search projects and templates, or type an action","没有找到“{query}”":"Nothing matches “{query}”","新建 Markdown 卡片":"New Markdown Cards",新建自由编辑:"New Freeform design",打开我的项目:"Open My projects",打开模板中心:"Open Templates",打开素材库:"Open Assets",夜深了:"Up late",早上好:"Good morning",下午好:"Good afternoon",晚上好:"Good evening","{greeting},{name}":"{greeting}, {name}","今天想发点什么?写长文用 Markdown 卡片,自己排版用自由编辑。":"What are you posting today? Write long-form in Markdown Cards, or lay it out yourself in Freeform.","{projects} 个项目 · {templates} 套模板":e=>`${e.projects} ${Number(e.projects)===1?"project":"projects"} · ${e.templates} ${Number(e.templates)===1?"template":"templates"}`,"写一篇长文,自动排成一组卡片":"Write a long post, get a set of cards","只管写字。标题、正文、金句按内容自动分页,整组图片一键导出。":"Just write. Headings, body text and quotes are paginated for you, and the whole set exports in one click.","# 在城市里慢慢走":"# Walking the city slowly","## 地铁看不见的东西":"## What the subway never shows","> 你不需要去很远的地方":"> You don't have to go far",新建:"New",从模板开始:"Start from a template","像做海报一样,自由摆放每个元素":"Place every element freely, like a poster","文字、图片、形状、图层和参考线都在手边,多页设计一次导出。":"Text, images, shapes, layers and guides are all at hand, and multi-page designs export at once.",最近编辑:"Recent",按系统筛选:"Filter by editor",全部:"All","查看全部 {n} 个":"View all {n}",还没有保存的项目:"No saved projects yet","常用的照片、头像和 Logo 放在这里,两套系统都能直接取用。":"Keep your usual photos, avatars and logos here. Both editors can use them.","管理全部 {n} 张":"Manage all {n}","在素材库中查看 {name}":"View {name} in Assets",模板推荐:"Suggested templates",去模板中心:"Browse templates",文本:"Text",图片:"Image",形状:"Shape","打开 {title}":"Open {title}","{n} 页":H("{n} page","{n} pages"),复制一份:"Duplicate",项目读取失败:"Could not load projects",这一类还没有项目:"No projects of this kind yet","暂时无法读取项目,请稍后重试":"Could not load projects right now. Please try again later.",刚刚:"just now","{n} 分钟前":H("{n} minute ago","{n} minutes ago"),"{n} 小时前":H("{n} hour ago","{n} hours ago"),"{n} 天前":H("{n} day ago","{n} days ago"),"{name} 的更多操作":"More actions for {name}","用「{title}」新建项目":"New project from “{title}”",使用模板:"Use template","写好正文就能套用,封面、正文、金句、收尾按内容自动分配。":"Apply one to finished text: the cover, body, quote and closing pages are assigned from your content.","每个元素都能拖动、改色、换图,多页一起调整。":"Drag, recolor and swap images on every element, across all pages.","预览{title}":"Preview {title}",从一套成品开始:"Start from a finished design","样式和内容都可以继续改,先选一套接近你想法的。":"Style and content stay editable, so pick the one closest to your idea.",关闭模板中心:"Close templates",模板列表:"Template list",模板详情:"Template details",搜索模板:"Search templates","搜索:名称、说明或标签":"Search: name, description or tag","没有找到相关模板,换个关键词或尺寸试试。":"No templates matched. Try another keyword or size.",相框:"Photo frame",图片描边颜色:"Picture frame colour",粘贴数据:"Paste data",从剪贴板粘贴:"Paste from clipboard","每行「标签 数值…」,数值用空格、逗号或制表符分隔":'One "label number…" per line; separate numbers with spaces, commas, or tabs',"读取剪贴板失败,请重试":"Could not read the clipboard, try again","粘贴内容读不出数据:每行需要「标签 数值…」,数值为非负数字":'The pasted text has no readable data: each line needs "label number…" with non-negative numbers',直角:"Square",小圆:"Slightly rounded",大圆:"Rounded",胶囊:"Capsule",无:"None","Markdown 长文排版":"Markdown long-form layout",自由画布轻设计:"Freeform canvas design","{n} 页示例已经排好,正文、主题和字体都可以改。":H("A {n}-page example, ready to go. Text, theme and font all stay editable.","A {n}-page example, ready to go. Text, theme and font all stay editable."),"{n} 页作品已经排好,文字、颜色、尺寸和图层都可以改。":"A {n}-page design, ready to go. Text, colors, sizes and layers all stay editable.",使用这套模板:"Use this template",继续编辑:"Keep editing","查看 {name}":"View {name}",素材名称:"Asset name",重命名:"Rename",下载:"Download",尺寸:"Size",大小:"File size",上传于:"Uploaded",用在:"Used in","{n} 个项目里":H("{n} project","{n} projects"),还没有项目用到:"Not used yet","正在读取素材库…":"Loading Assets…",搜索素材:"Search assets",上传到素材库:"Upload to Assets",上传:"Upload",素材库读取失败:"Could not load Assets","正在上传 {name}":"Uploading {name}","插入 {name}":"Insert {name}","没有名称包含「{query}」的素材":"No asset name contains “{query}”",素材库还是空的:"No assets yet","把图片拖到这里,或者点「上传」。存进来的图片,所有项目都能用。":"Drop pictures here or click Upload. Every project can use them.",管理素材库:"Manage Assets","{n} 张":H("{n} picture","{n} pictures"),"松开,存进素材库":"Drop to save to Assets","点一下,插入到光标所在的位置":"Click to insert at the cursor","点一下,放到当前页的中央":"Click to place in the middle of the page",关闭素材库:"Close Assets",按名称搜索:"Search by name","{n} 张 · {size}":H("{n} picture · {size}","{n} pictures · {size}"),排序:"Sort",最近上传:"Recently uploaded",按名称:"By name","上传中…":"Uploading…","换个关键词试试。":"Try another search.","把图片拖到这里,或者直接粘贴截图":"Drop pictures here, or paste a screenshot","PNG、JPG、WebP 都可以,长边超过 1800 px 会自动缩小。":"PNG, JPG and WebP all work. Anything longer than 1800 px is scaled down.",选择图片:"Choose pictures","松开,上传到素材库":"Drop to upload to Assets","有 {n} 个项目用到了这张图片,它们不受影响,只是以后不能再从素材库里选它。":H("{n} project uses this picture and is not affected. You just can no longer pick it from Assets.","{n} projects use this picture and are not affected. You just can no longer pick it from Assets."),"删除后不能再从素材库里选它。":"You will no longer be able to pick it from Assets.","暂时无法读取素材库,请稍后重试":"Could not load Assets right now. Please try again later.","上传失败,请稍后重试":"Upload failed. Please try again later.","已上传 {n} 张图片":H("Uploaded {n} picture","Uploaded {n} pictures"),",另有 {n} 张也没上传":H(", and {n} more was not uploaded",", and {n} more were not uploaded"),"上传了 {added} 张,{failed} 张没有上传":"Uploaded {added}, {failed} failed","{n} 张图片没有上传":H("{n} picture was not uploaded","{n} pictures were not uploaded"),"「{name}」{error}":"“{name}”: {error}","{title}:{detail}":"{title}: {detail}","只支持 PNG、JPG、WebP 图片":"Only PNG, JPG and WebP pictures are supported","图片超过 25 MB":"The picture is larger than 25 MB",无法读取图片:"Could not read the picture",图片已损坏或无法解码:"The picture is damaged or cannot be decoded","仅支持 PNG、JPG、WebP 图片":"Only PNG, JPG and WebP pictures are supported",图片尺寸无效:"Invalid picture size",素材不存在:"That asset no longer exists",当前浏览器无法使用素材库:"This browser cannot store Assets","浏览器存储空间不足,删掉一些素材后再试":"The browser is out of storage. Delete some assets and try again.","素材库读写失败,请稍后重试":"Could not read or write Assets. Please try again later.","素材库正在其他标签页中升级,请刷新后重试":"Assets is upgrading in another tab. Reload and try again.",未命名图片:"Untitled picture","导入 JSON 文档":"Import a JSON document",个人资料:"Profile","头像颜色(或上传图片)":"Avatar color (or upload a picture)","颜色 {color}":"Color {color}",上传图片:"Upload picture",素材类型:"Asset type",把字体文件拖到这里:"Drop font files here","TTF、OTF、WOFF、WOFF2 都可以,最大 40 MB。":"TTF, OTF, WOFF and WOFF2 all work, up to 40 MB.",选择字体:"Choose fonts","删除字体「{title}」?":"Remove the font “{title}”?","用了它的文字会换回默认字体。":"Text set in it goes back to the default font.","松开,导入字体":"Release to import the fonts","永 Aa":"永 Aa","字体样张 123":"The quick fox 123",昵称:"Display name","@ 用户名(推特)":"@ handle (Twitter)","发布地点(微博/推特)":"Location (Weibo / Twitter)",显示认证标志:"Show verified badge",只在首页显示个人信息:"Show the profile on the first card only",保存:"Save",暂无选项:"No options","在 Markdown 卡片工具栏的「素材库」或自由编辑插入栏的「图片」里,点一下就能放进项目。":"Open Assets in the Markdown Cards toolbar, or Image in the Freeform insert rail, and click a picture to put it in.",界面语言:"Language","界面语言:{name}":"Language: {name}",项目名称:"Project name","导入 .json 文档,比如 MCP 工具生成的结果":"Import a .json document, such as one made by the MCP tools","导入 JSON":"Import JSON","松开,导入为项目":"Drop to import as a project","新建一个,开始编辑就会自动保存到这里;也可以把 .json 文档拖进来导入。":"Start one and it saves here as you edit. You can also drop a .json document here to import it.",导入失败:"Could not import","暂时无法导入,请稍后重试":"Could not import right now. Please try again later.",还没有项目:"No projects yet","从上面选一种方式新建,开始编辑就会自动保存到这里。":"Start one above. It saves here as you edit.","{system}里还有没保存的修改":"Unsaved changes in {system}","「{title}」最近的修改没能保存。继续的话,这些改动会被丢掉。":"The latest changes to “{title}” could not be saved. Continuing throws them away.",回去看看:"Go back",贡献模板:"Contribute a template",模板由社区共建:"Templates are built by the community","每套模板都在仓库里维护。做了一套好看的版式?按贡献指南提交 Pull Request,合并后所有人都能用。想复用自己的作品,在「我的项目」里复制一份就行。":"Every template lives in the repository. Made a layout worth sharing? Follow the contribution guide and open a pull request; once it is merged, everyone can use it. To reuse your own work, duplicate the project in My projects.",查看贡献指南:"Read the contribution guide","搜索模板,比如:菜单、中秋、读书笔记":"Search templates: menu, Mid-Autumn, reading notes",清空搜索:"Clear search",按用途筛选:"Filter by use",全部尺寸:"All sizes",全部风格:"All styles",全部颜色:"All colours","{n} 套模板":H("{n} template","{n} templates"),清除筛选:"Clear filters",没有找到相关模板:"No templates match",只看这一类:"Only these",使用:"Use",上一个模板:"Previous template",下一个模板:"Next template",模板页面:"Template pages",页数:"Pages",编辑方式:"Editor",使用这个模板:"Use this template",只换样式:"Use the look only",长文版式:"Long-read looks",基础主题:"Plain themes",相似模板:"Similar templates",长文卡片:"Long reads",图文套图:"Carousels",社交配图:"Social posts",活动海报:"Event posters",营销电商:"Marketing",菜单价目:"Menus & prices",节日节气:"Festivals",邀请贺卡:"Invitations & cards",办公学习:"Work & school",简约:"Minimal",手绘:"Hand-drawn",优雅:"Elegant",潮酷:"Bold",商务:"Business",白色:"White",米色:"Cream",灰色:"Grey",黑色:"Black",红色:"Red",橙色:"Orange",黄色:"Yellow",绿色:"Green",蓝色:"Blue",紫色:"Purple",粉色:"Pink","你存过的 {n} 个模板已经放进「我的项目」":H("The template you saved is now in My projects","The {n} templates you saved are now in My projects"),"模板改由社区共建;想复用自己的作品,在项目卡片上选「复制一份」。":"Templates are now built by the community. To reuse your own work, choose Duplicate on a project card.",未命名设计:"Untitled design",重命名项目:"Rename project","项目名称:{title},点击重命名":"Project name: {title}. Click to rename",登录后继续保存:"Log in to keep saving","登录已过期。重新登录后,这些修改会存回原来的项目。":"Your session expired. Log in again and these changes go back into the same project.",已保存到本机:"Saved on this device","只保存在这台设备上。登录后可以放进账号,换一台设备也能继续编辑。":"Saved on this device only. Log in to move it into your account and keep editing on any device.","保存在这台设备的浏览器里。":"Saved in this browser.","把这台设备上的项目放进账号?":"Move the projects on this device into your account?","把这台设备上的素材放进账号?":"Move the assets on this device into your account?","你没登录时做了 {projects} 个项目、存了 {assets} 张素材,都保存在这台设备上。":e=>`Before logging in you made ${e.projects} ${Number(e.projects)===1?"project":"projects"} and saved ${e.assets} ${Number(e.assets)===1?"asset":"assets"}, all kept on this device. `,"你没登录时做了 {n} 个项目,都保存在这台设备上。":H("Before logging in you made {n} project, kept on this device. ","Before logging in you made {n} projects, all kept on this device. "),"你没登录时存了 {n} 张素材,都保存在这台设备上。":H("Before logging in you saved {n} asset, kept on this device. ","Before logging in you saved {n} assets, all kept on this device. "),"放进「{name}」后,换一台设备登录也能继续编辑。":"Moving it all to “{name}” lets you keep editing on any device you log in on.","放进「{name}」后,它们会出现在这个账号的「我的项目」里。":"Moving it all to “{name}” puts it in that account’s My projects.","还有 {n} 项没能放进账号:{error}":H("{n} item could not be moved: {error}","{n} items could not be moved: {error}"),先留在本机:"Keep on this device",放进账号:"Move into account","正在放进账号… {done}/{total}":"Moving… {done}/{total}","这台设备上还有 {n} 个没登录时做的项目。":H("There is {n} project on this device from before you logged in.","There are {n} projects on this device from before you logged in."),"这台设备上还有 {n} 张没登录时存的素材。":H("There is {n} asset on this device from before you logged in.","There are {n} assets on this device from before you logged in."),"已自动保存 · {time}":"Saved automatically · {time}",保存失败:"Could not save","暂时无法保存,请稍后重试":"Could not save right now. Please try again later.",已保存:"Saved","素材库:插入常用图片":"Assets: insert your usual pictures",正在检查登录状态:"Checking your session",检查中:"Checking",重新检查登录状态:"Check the session again",待确认:"Unconfirmed",登录账户:"Log in",登录状态尚未确认:"Your session is not confirmed yet","暂时无法连接服务器,请稍后重试":"Cannot reach the server right now. Please try again later.","登录已过期,请重新登录":"Your session expired. Please log in again.",退出登录失败:"Could not log out",请稍后重试:"Please try again later","API 令牌":"API tokens","给程序用的钥匙:带上这个值的请求就代表你的账号,只能做勾选范围内的事。值只显示一次,随时可以撤销。":"A key for programs: requests carrying this value act as your account, limited to the permissions you tick. The value is shown once and can be revoked at any time.","「{name}」的令牌值(只显示这一次)":"The token value for “{name}” (shown only once)",我存好了:"I saved it",名称:"Name","比如:我的智能体":"e.g. My agent",权限:"Permissions",创建令牌:"Create token","创建中…":"Creating…","还没有令牌。":"No tokens yet.","最近使用:{time}":"Last used: {time}",还没用过:"Never used",撤销:"Revoke","撤销「{name}」?":"Revoke “{name}”?","撤销后用这个令牌的程序立刻无法访问。":"Programs using this token lose access immediately.","暂时无法读取令牌,请稍后重试":"Could not load tokens right now. Please try again later.","暂时无法创建令牌,请稍后重试":"Could not create a token right now. Please try again later.","暂时无法撤销令牌,请稍后重试":"Could not revoke the token right now. Please try again later.",decks:"deck rendering",shares:"sharing",drafts:"drafts",assets:"assets",images:"images",在线图库:"Stock photos",轴刻度:"Axis ticks",表格:"Table",时间线:"Timeline",进度:"Progress",数值:"Value",样式:"Style",横条:"Bar",圆环:"Ring",进度颜色:"Progress colour",进度数值:"Progress value",进度样式:"Progress style",标签:"Label",进度标签:"Progress label",轨道底色:"Track colour",主线颜色:"Spine colour",条目:"Entries",时间:"Time","第 {n} 项时间":"Entry {n} time","第 {n} 项内容":"Entry {n} text",加一条:"Add an entry",今天:"Today",新的一步:"A new step",表头:"Header row",斑马纹:"Zebra stripes",墨色:"Ink",表头底色:"Header fill",斑马纹底色:"Stripe fill",格线:"Grid lines",全框:"All",横线:"Rows",三线表:"Three-line",格线颜色:"Grid colour",格线粗细:"Grid line width",格子字号:"Cell text size",恢复默认:"Reset",方向:"Direction",竖排:"Vertical",横排:"Horizontal",颜色:"Colours",行列:"Rows & columns",加一行:"Add row",减一行:"Remove row",加一列:"Add column",减一列:"Remove column",单元格:"Cells",调整列宽:"Resize table columns","调整第 {n} 列宽":"Resize column {n}",拖动调整这一列和右边一列的宽度:"Drag to resize this column and the one to its right","第 {n} 行第 {m} 列":"Row {n}, column {m}","粘贴内容读不出表格:每行需要用制表符、逗号或空格分隔的单元格":"The pasted text has no readable table: each line needs cells separated by tabs, commas, or spaces",在线图库需要服务端:"Stock photos need the server","部署服务端并登录账户后,可以在这里搜索、插入可商用的在线图片;未配置密钥时自动使用 Openverse。":"Deploy the server and sign in to search and insert commercially usable photos here; without API keys it falls back to Openverse.",搜索在线图片:"Search stock photos",搜索:"Search","搜索中…":"Searching…",图库来源:"Stock source","{label}:未配置密钥":"{label}: no API key","图库搜索失败,请稍后重试":"Stock search failed. Please try again later.","图片导入失败,请稍后重试":"Could not import this photo. Please try again later.",图库暂不可用:"Stock photos unavailable","正在读取图库…":"Loading stock sources…","输入关键词,搜索可商用的在线图片。":"Type a keyword to search commercially usable stock photos.","没有找到「{query}」相关图片":"No photos matched “{query}”",插入图库图片:"Insert stock photo",正在导入:"Importing","加载中…":"Loading…",加载更多:"Load more",水平翻转:"Flip horizontal",垂直翻转:"Flip vertical",实线:"Solid line",虚线:"Dash",左上圆角:"Top-left radius",右上圆角:"Top-right radius",右下圆角:"Bottom-right radius",左下圆角:"Bottom-left radius",统一圆角:"Uniform radius","间距 {n}":"Gap {n}",查找替换:"Find and replace",查找:"Find",替换为:"Replace with",范围:"Scope",整套作品:"Whole deck",仅当前页:"Current page only","已替换 {n} 处":H("Replaced {n} match","Replaced {n} matches"),"找到 {n} 处":H("{n} match","{n} matches"),"{n} 处换完超出字数上限,没有替换":H("{n} match would overflow its field and was left as is","{n} matches would overflow their fields and were left as is"),没有找到要替换的文字:"No matching text found",全部替换:"Replace all"},RC={小红书:"RedNote",微博:"Weibo",推特:"Twitter",简约白:"Clean white",暖米色:"Warm beige",深空黑:"Deep black",薄荷绿:"Mint","旧模板 · 编辑档案":"Legacy · Editorial Archive","旧模板 · 公共剧场":"Legacy · Public Theatre","旧模板 · 议题封面":"Legacy · Issue Cover","旧模板 · 编辑部":"Legacy · Editorial","旧模板 · 清单":"Legacy · Checklist","旧模板 · 信号":"Legacy · Signal","旧模板 · 夜航":"Legacy · Night Flight","苹方 PingFang":"PingFang",思源黑体:"Noto Sans SC",思源宋体:"Noto Serif SC",霞鹜文楷:"LXGW WenKai",站酷小薇:"ZCOOL XiaoWei",系统宋体:"System serif",系统默认:"System default",站酷黄油体:"ZCOOL QingKe HuangYou",马善政毛笔:"Ma Shan Zheng",杂志:"Magazine",清新:"Fresh",森系:"Forest",甜美:"Sweet",文艺:"Literary",极简:"Minimal",夜读:"Midnight",霓虹夜:"Neon Night",纸墨:"Paper & Ink",海盐:"Sea Salt",松林:"Pine",莓果:"Berry",奶咖:"Latte",黑白:"Mono",墨黑:"Charcoal",现代黑体:"Modern Sans",杂志宋体:"Editorial Serif",书卷宋体:"Book Serif",手写文楷:"Handwritten Kai",海报小薇:"Poster XiaoWei",系统苹方:"System PingFang",霓虹青:"Neon cyan",霓虹粉:"Neon pink",贴纸白边:"Sticker",糖果描边:"Candy outline",复古投影:"Retro shadow",黑底标签:"Black label",黄色底块:"Yellow tag",日落渐变:"Sunset",极光渐变:"Aurora",金色:"Gold",专栏:"Column","宋体正文配一点朱红,标题、导语、图注和引文都按杂志的版式排,适合随笔、观察和长文。":"Serif text with a touch of vermilion, with titles, standfirsts, captions and quotes set like a magazine, for essays, observations and long reads.",备忘录:"Notes","像手机里的一页备忘录:顶栏、日期、能勾选的待办和荧光笔重点,适合清单、攻略和生活记录。":"A page from a phone's notes: the top bar, the date, to-dos to tick and highlighted lines, for checklists, guides and everyday notes.",信笺:"Letter","霞鹜文楷写在红格信纸上,段落首行缩进,适合书信、日记和写给自己的话。":"LXGW WenKai on red-ruled letter paper with indented paragraphs, for letters, diaries and notes to yourself.","深色底、暖灰色宋体和一弯金色月亮,适合读书笔记、夜晚随笔和情绪文字。":"A dark page, warm grey serif type and a gold crescent, for reading notes, night essays and moods.",极光:"Aurora","柔和的彩色光晕上铺一张磨砂卡片,适合生活方式、习惯清单和成长分享。":"A frosted card over soft glows of colour, for lifestyle posts, habit lists and personal growth.",文档:"Doc","知识库式的页面:顶部路径、提示框、代码块和表格,适合教程、速查表和干货整理。":"A knowledge-base page with a path bar, callouts, code blocks and tables, for tutorials, cheat sheets and how-tos.",宣纸:"Rice paper","宣纸底色、宋体首行缩进,页码刻成一方朱红印章,适合节气、诗词和传统文化。":"Rice-paper tones, indented serif text and folios cut as a vermilion seal, for solar terms, poetry and traditional culture.",瑞士:"Swiss","黑色粗线、一抹红和大号页码,像一页国际主义版式,适合设计、方法和观点。":"Heavy black rules, one red and big folios, like a page of International Style, for design, methods and opinions.",手账:"Journal","点阵纸上的霞鹜文楷,配荧光笔标题、胶带和便利贴,适合周末记录、vlog 和手账。":"LXGW WenKai on dot-grid paper with highlighted headings, tape and sticky notes, for weekend logs, vlogs and journals.",书信:"Letters",日记:"Diary",读书:"Reading",干货:"How-to",编辑部:"Editorial","用刊头和正文网格组织长文,适合观点与方法文章。":"A masthead and a text grid for long opinion and how-to pieces.",清单:"Checklist","把步骤排成可以逐项勾选的工作页,适合教程和计划。":"Steps laid out as tickable work sheets, for tutorials and plans.",信号:"Signal","用海报式大标题亮出判断,适合短观点。":"Poster-size headlines that state a view, for short takes.",夜航:"Night Flight","沿时间和路线展开一段记录,适合随笔与灵感。":"A record told along a time line and a route, for essays and ideas.",霓虹:"Neon",粗野:"Brutalist","黄黑撞色、硬阴影和粗线,适合宣言与规则清单。":"Yellow on black, hard shadows and heavy rules, for manifestos and rule lists.",柔光:"Soft Light",蓝图:"Blueprint","工程网格、尺寸标注和图签,适合计划与结构拆解。":"Drafting grids, dimension marks and a title block, for plans and structure breakdowns.",聚光:"Spotlight","16:9 演示套图:暖白底上一轮橙色大圆,黑色粗体大标题、细线和大页码,观点页整页铺橙色,适合汇报、路演、课程和分享。":"A 16:9 presentation deck: a big orange sun on warm white, bold black headlines, hairlines and big page numbers, and a statement page all in orange, for reports, pitches, courses and talks.",讲座:"Talk","大图配大标题,时间、地点、嘉宾一目了然,适合讲座、分享会和活动报名。":"A big photo and a big title with the time, place and speaker at a glance, for talks, meetups and sign-ups.",促销:"Sale","大字优惠配产品插画,适合新品、折扣和门店活动。":"A big offer over a product illustration, for launches, discounts and in-store events.",招聘:"Hiring","团队头像排成一格,空着的那格留给新人,下面列职位和投递方式,适合招聘和团队介绍。":"The team as a grid of portraits with one seat left open, the roles and how to apply under it, for hiring and team pages.",节日:"Festival","月亮、祥云和竖排标题,适合中秋等节日问候。":"A full moon, clouds and a vertical title, for Mid-Autumn and other festival greetings.",邀请函:"Invitation","金色边框、居中排版,适合晚宴、发布会和典礼邀请。":"Gold frames and centered type, for dinners, launches and ceremonies.",金句:"Quote","一句话配出处,适合金句、日签和读书摘抄。":"One line and its source, for quotes, daily cards and reading notes.",商品主图:"Product image","产品图配卖点和价格角标,适合电商主图和新品介绍。":"The product with its selling points and a price badge, for shop listings and launches.",视频封面:"Video cover","相机取景框里的超大标题,带录制、时间码和对焦框,适合视频和直播封面。":"A huge title in a camera viewfinder, with REC, a timecode and a focus mark, for video and live-stream covers.",公众号首图:"WeChat header","标题在左、图片在右,适合公众号文章首图。":"Title on the left, picture on the right, for WeChat article headers.",宣传单:"Flyer","A4 单页:大标题、插画、时间地点和预约按钮,适合课程和活动传单。":"One A4 page with a big title, an illustration, the time and place and a booking button, for classes and events.",活动:"Event",门店:"Store",小票:"Receipt",团队:"Team",问候:"Greeting",邀请:"Invitation",日签:"Daily card",电商:"E-commerce",产品:"Product",封面:"Cover",视频:"Video",公众号:"WeChat",印刷:"Print",课程:"Class",干货笔记:"Study notes","格子纸、荧光笔大标题和三条要点,适合小红书知识类笔记封面。":"Grid paper, a highlighted headline and three points, for Rednote how-to and study note covers.",图片拼贴:"Photo collage","照片配胶带和角标贴纸,下面是大标题,适合小红书探店、旅行和生活封面。":"A taped-on photo with a badge sticker over a big title, for Rednote travel, food and lifestyle covers.",菜单:"Menu","A4 单页:店名大标题、八道菜品和价格,适合咖啡店、餐厅和饮品菜单。":"One A4 page with a big title and eight dishes with prices, for cafés, restaurants and drink menus.",价目表:"Price list","撕下来的小票:虚线隔开的项目和价格、预约框和条码,适合美甲、美发、咖啡和工作室。":"A torn-off receipt: items and prices between dashed rules, a booking box and a barcode, for nail and hair salons, cafés and studios.",证书:"Certificate","金色双框、居中大字和奖章,适合荣誉证书、获奖证书和结业证书。":"Gold double frames, centred type and a medal, for honours, awards and course completion.","一整张插画配横跨中间一排的大标题,导出时切成九张,发朋友圈拼成一张大图。":"One illustration with a title across the middle row, exported as nine squares that make one picture on WeChat Moments.",课程表:"Timetable","表格按科目自动配色,适合学校课程表、培训排课和每周计划。":"A table that colours each subject on its own, for school timetables, class schedules and weekly plans.",餐饮:"Food & drink",朋友圈:"Moments",学校:"School",展览海报:"Exhibition","黑白水墨条纹配超大 exhibition. 字标,适合展览、发布会和艺术活动。":"Black ink stripes over a huge exhibition. wordmark, for shows, launches and art events.",新品预告:"Coming soon","深色底上的彩色光斑、毛玻璃信息板和 COMING SOON 大字,适合新品预告、发布倒计时和预约。":"Colour glows on a dark page, a frosted panel and a huge COMING SOON, for teasers, countdowns and pre-orders.",节气:"Solar term","水墨远山、落日和竖排毛笔大字,配一方红印,适合节气、节日和传统文化日签。":"Ink-wash hills, a setting sun and a vertical brush title with a red seal, for solar terms, festivals and daily cards.",播客封面:"Podcast cover","包豪斯色块和几何圆,配期数大字,适合播客、电台和系列节目封面。":"Bauhaus blocks and circles with a big episode number, for podcast, radio and series covers.",演示封面:"Pitch cover","雾面渐变底上一行巨大的标题,适合商业计划书、汇报和演讲的首页。":"One huge title on a misty gradient, for the first slide of a pitch, a report or a talk.",作品集封面:"Portfolio cover","Playfair 大字 PORTFOLIO 压在黑白照片上,配一枚红签,适合作品集、摄影集和个人主页封面。":"A big Playfair PORTFOLIO over a black-and-white photo with a red tab, for portfolios, photo books and profile covers.",甜品菜单:"Dessert menu","A4 单页:竖排大标题、八道甜品和价格,两角配橙黄蓝的花,适合甜品店、面包店和下午茶菜单。":"One A4 page with a vertical title and eight desserts with prices, flowers in two corners, for dessert shops, bakeries and afternoon tea.",婚礼请柬:"Wedding invitation","尤加利叶环里写着花体 Save the Date 和两个人的名字,适合婚礼、订婚和纪念日邀请。":"A eucalyptus wreath around a script Save the Date and two names, for weddings, engagements and anniversaries.",秋日市集:"Autumn market","枫叶和银杏叶上下围着宋体大标题,适合市集、秋季活动和周末聚会。":"Maple and ginkgo leaves above and below a big serif title, for markets, autumn events and weekend gatherings.",数据盘点:"Data roundup","朱红大年份配三个大数字和一张柱状图,像杂志的数据页,适合年度盘点、月度总结和数据海报。":"A big vermilion year with three big numbers and a bar chart, like a magazine data page, for yearly and monthly roundups.",对比表:"Comparison","蓝色刊头配一张大字号的对比表格和一句结论,适合产品对比、方案选择和清单式总结。":"A blue header with a large comparison table and a verdict, for product comparisons and choosing between options.",成长记录:"Growth log","墨绿底上金色大年份和一条时间线,一个节点一件事,适合年度总结、成长复盘和里程碑打卡。":"A gold year and a timeline on deep green, one event per step, for year-end reviews and milestones.",生日贺卡:"Birthday card","花体 Happy Birthday 配宋体祝福和几片彩纸,适合生日祝福、纪念日和好友卡片。":"A script Happy Birthday with a serif wish and confetti, for birthdays, anniversaries and cards for friends.",杂志封面:"Magazine cover","Playfair 大字刊名、细线刊头和一张大图,像一本独立杂志的封面,适合小红书封面、专题和期刊。":"A big Playfair masthead, a hairline rule and one large picture, like an independent magazine's cover, for Rednote covers, features and issues.",书单:"Book list","一排彩色书脊立在书架上,书名竖排在书脊里,下面一本一句推荐,适合书单、好物清单和年度推荐。":"A row of coloured spines on a shelf, each title set upright in its spine and a line of praise for each below, for reading lists, picks and year-end favourites.",年度汉字:"Word of the year","一个毛笔大字配拼音和一方朱红印章,适合年度汉字、年终总结和新年愿望。":"One big brush character with its pinyin and a vermilion seal, for a word of the year, year-end reviews and new year wishes.",音乐节:"Music festival","夜空里一轮被地平线切开的渐变太阳和霓虹网格,配大字标题和演出阵容,适合音乐节、演出和派对。":"A gradient sun cut by the horizon over a neon grid in a night sky, with a big title and the lineup, for festivals, gigs and parties.",旅行明信片:"Travel postcard","红蓝航空信封边、带齿孔的邮票和邮戳,霞鹜文楷写在横线上,适合旅行分享、问候和祝福。":"Red and blue airmail edges, a perforated stamp and a postmark, with LXGW WenKai written on ruled lines, for travel notes, greetings and wishes.",设计周:"Design week","黑字大号数字压在一个红圆上,下面三栏信息,国际主义版式,适合设计周、展会和论坛。":"Big black numerals over a red circle with three columns of details below, in the International Style, for design weeks, fairs and forums.",年终:"Year-end",双十一:"Double 11","一张大优惠券上印着立体的 11.11,下面是活动名、满减、时间和抢购按钮,适合双十一、年货节和店铺大促。":"A big coupon printed with a 3D 11.11, then the sale's name, the discount, the dates and a shop-now button, for Double 11, New Year shopping and store-wide sales.",圣诞:"Christmas","毛衣花样织在领口:雪花、圣诞树和锯齿纹,下摆是罗纹,中间写 MERRY CHRISTMAS 和祝福,适合圣诞贺卡、平安夜问候和圣诞活动。":"A sweater's pattern knitted round the yoke, snowflakes, trees and zigzags, a ribbed hem, and MERRY CHRISTMAS with a wish in between, for Christmas cards, Christmas Eve greetings and Christmas events.",元旦:"New Year's Day","一本手撕日历:去年最后一页刚撕掉,新的一页印着大大的 1、今天的标题和宜忌,适合元旦、跨年和新年计划。":"A tear-off calendar with last year's final page just torn away: the new page prints a big 1, the day's headline and what to do and not to do, for New Year's Day, New Year's Eve and resolutions.",新年:"New Year",春节:"Spring Festival","整张是一个红包:封口压着金色的福字圆章,下面是毛笔大字、祝福和日期,适合春节拜年、新春祝福和放假通知。":"The whole page is a red envelope: a gold seal with 福 on its flap, a big brush title, a wish and the dates below, for Chinese New Year greetings and holiday notices.",数字清单:"Numbered list","公众号首图:左边一块朱红色压着一个巨大的编号,右边是宋体大标题,适合清单、干货和系列文章。":"A WeChat header: a huge number on a block of vermilion and a big serif title beside it, for lists, how-tos and article series.",远山:"Distant hills","公众号首图:晨雾里五层山脊叠向远处,太阳半落在山后,宋体标题写在天上,适合旅行、随笔和生活方式。":"A WeChat header: five ridges fading into the morning mist, the sun half behind the hills and a serif title in the sky, for travel, essays and lifestyle.",大会主视觉:"Conference key visual","横版主视觉:深夜蓝底上几圈轨道绕着一颗发光的球,左边是大标题、时间和地点,适合大会、峰会和发布会的背景板。":"A landscape key visual: orbits round a glowing sphere on midnight blue, with a big title, the dates and the venue on the left, for conference, summit and launch backdrops.",年会:"Annual gala","横版主视觉:黑底金线的装饰艺术风,扇形光芒、双线框和渐变金色大字,适合年会、颁奖礼和晚宴。":"A landscape key visual in Art Deco gold on black: a sunburst fan, a double frame and big gold-leaf lettering, for company galas, award nights and dinners.",会议议程:"Agenda","A4 横版:左边钴蓝色块写会议名、日期和地点,右边细线隔开的六行日程,适合会议、论坛和活动流程。":"A4 landscape: the event's name, date and venue on a cobalt panel and six sessions between hairlines on the right, for conferences, forums and event schedules.",年度报告:"Annual report","A4 封面:超大的年份压在金色等高线上,下面是宋体标题,适合年度报告、企业画册和白皮书。":"An A4 cover: a huge year over gold contour lines with a serif title below, for annual reports, company brochures and white papers.",数据卡:"Data card","方图:克莱因蓝底上一个巨大的数字,下面一句话说清它是什么,适合数据发布、调查结论和社交分享。":"A square: one huge number on Klein blue and a line saying what it means, for data releases, survey findings and social posts.",倒计时:"Countdown","方图:六十格刻度的表盘中间一个大数字,下面写活动和时间,适合发布会、开售和考试倒计时。":"A square: a big number in the middle of a sixty-tick dial, with the event and its time below, for countdowns to launches, sales and exams.",大会:"Conference",主视觉:"Key visual",议程:"Agenda",会议:"Meeting",报告:"Report",社交:"Social",对比测评:"Versus","小红书封面:黄黑两栏斜着对开,中间一枚 VS 徽章,两边各写一个名字和一句结论,适合对比测评、二选一和选购攻略。":"A Xiaohongshu cover: yellow and black panels meeting on a slant with a VS badge between them, a name and a verdict on each side, for comparisons, either-or picks and buying guides.",打卡计划:"Habit tracker","小红书封面:三十个圆圈排成打卡格,已完成的涂绿打勾,配宋体大标题,适合打卡挑战、学习计划和习惯养成。":"A Xiaohongshu cover: thirty circles in a check-in grid, the days done filled green and ticked, under a big serif title, for challenges, study plans and habits.",冷知识:"Fun fact","小红书封面:明黄底上一个巨大的白色问号,问题写成大标题,下面一段解答,适合冷知识、科普和问答。":"A Xiaohongshu cover: a huge white question mark on bright yellow, the question as the title and the answer below, for fun facts, explainers and Q&A.",旅行攻略:"Trip route","小红书封面:海岸线边的手绘地图,虚线路线串起四个编号地点,每站一行名字,适合旅行攻略、路线规划和城市漫游。":"A Xiaohongshu cover: a hand-drawn map by the coast, a dashed route joining four numbered stops, a line for each, for travel guides, routes and city walks.",年度排行:"Top five","小红书封面:黑底上五条由长到短的橙色名次条,每条写一个名字,适合排行榜、年度推荐和好物清单。":"A Xiaohongshu cover: five orange bars, longest first, on black, a name on each, for rankings, picks of the year and product lists.",测评:"Review",打卡:"Check-in",科普:"Explainer",排行:"Ranking",开业大吉:"Grand opening","红白条纹的遮阳篷下挂着 OPEN 招牌,复古双线框里是宋体红字大标题、三行开业优惠、营业时间地址和领券按钮,适合开业、新店开张和周年庆。":"An OPEN sign hanging under a red and white striped awning and, in a shop sign's double frame, a big red serif title, three opening offers, the day and address and a coupon button, for openings, new shops and anniversaries.",马拉松:"Race bib","橙色速度线上别着一张号码布:大号码、赛事名和公里数,下面三行时间、起点和报名,适合马拉松、夜跑和运动赛事。":"A race bib pinned over orange speed stripes, its big number, the race and the distance, then three lines for the start, the place and sign-up, for marathons, night runs and races.",直播预告:"Live show","黑底上亮着红色的 ON AIR 灯牌,大标题、开播时间和平台,底部一排声波,适合直播预告、带货专场和线上发布。":"A red ON AIR sign lit on black, a big title, the start time and platform and a row of sound levels at the foot, for live-stream announcements, shopping shows and online launches.",七夕:"Qixi","靛紫夜空里一条银河,织女星和牛郎星隔河相望,鹊桥连起两颗星,金色宋体大字,适合七夕、情人节和纪念日。":"The Milky Way across an indigo sky, Vega and Altair either side of it and a magpie bridge between them, with big gold serif lettering, for Qixi, Valentine's Day and anniversaries.",端午:"Dragon Boat Festival","一条龙舟划过朱红的太阳,下面是海水纹,竖排毛笔大字配一方朱印,左边写日子和放假安排,适合端午问候、放假通知和门店活动。":"A dragon boat crossing a vermilion sun over a pattern of waves, a vertical brush title with a vermilion seal and the date and holidays beside them, for Dragon Boat greetings, holiday notices and shop events.",开业:"Opening",运动:"Sports",赛事:"Race",直播:"Live",黑胶歌单:"Vinyl playlist","方图:一张黑胶唱片从深蓝封套里滑出半张,封套上印着歌单名,下面三行曲目,适合歌单、播客和音乐推荐。":"A square: a vinyl record sliding half out of its deep blue sleeve, the playlist's name printed on the sleeve and three tracks below, for playlists, podcasts and music picks.",自我介绍:"Hello card","方图:一张红色的 HELLO 姓名贴,白底上手写你的名字,下面三栏写坐标、职业和爱好,适合自我介绍、新人报到和社群破冰。":"A square: a red HELLO name sticker with your name written on its white, then three fields for where you are, what you do and what you love, for introductions, first days and breaking the ice.","方图:深蓝夜空里一排月相,中间的满月是今晚,大号日期配一句话,适合日签、晚安和每日打卡。":"A square: a row of moon phases across a deep blue night, the full moon in the middle for tonight, a big date and a line for the day, for daily cards, good-night posts and daily check-ins.",报头首图:"Front page","公众号首图:像一份报纸的头版,宋体报头、双线和日期栏,大标题旁边是一张网点印出来的海上日落,适合周刊、专栏和资讯。":"A WeChat cover laid out like a newspaper's front page: a serif masthead, double rules and a dateline, and beside the headline a sunset over the sea printed in halftone dots, for weeklies, columns and news.",人物访谈:"Interview","公众号首图:左边一块赤陶色上压着两个巨大的引号,右边是受访者的一句话、名字和身份,适合人物访谈、对话和用户故事。":"A WeChat cover: two giant quote marks on a terracotta block, and beside it a line from the interviewee with their name and role, for interviews, conversations and customer stories.",歌单:"Playlist",晚安:"Good night",周刊:"Weekly",访谈:"Interview",答辩:"Thesis defense","16:9 答辩套图:深蓝封面上一枚金色细线校徽,桂枝围着一本打开的书,配衬线大标题;内页米白底,左边一道深蓝书脊,章节号和罗马数字编号用金色斜体,结尾页写着「恳请各位老师批评指正」,适合毕业答辩、开题报告和学术汇报。":"A 16:9 deck for a thesis defense: a gold hairline college seal, a laurel round an open book, on a navy cover with a serif title; inner pages on warm white with a navy spine down the left, chapter numbers and roman numerals in gold italics, and an ending that asks the committee for their comments, for defenses, proposals and academic talks.",学术:"Academic",简历:"Résumé","A4:粗黑的名字和蓝色的职位,右上角是联系方式,一道粗线下面写关于我,再按时间排五行工作与教育,适合求职简历和个人履历。":"A4: a bold black name and a blue job title, contact details top right, then under a heavy rule a few words about you and five lines of work and education in time order, for job applications and CVs.",求职:"Job hunting",红头通知:"Official notice","A4:红色的单位名称和文号,红线中间一颗星,下面是通知标题、称呼、正文和五条事项,落款上盖着红章,适合放假通知、公司公告和社团通知。":"A4: the organisation's name and file number in red, a red rule with a star at its middle, then the notice's title, who it is for, its body and five points, with a red seal over the sign-off, for holiday notices, company announcements and club notices.",通知:"Notice",公告:"Announcement",探店点评:"Food review","小红书封面:俯视的一碗牛肉面,筷子架在碗边,右上角一枚红色评分章,下面三行人均、推荐和地址,适合探店、美食点评和餐厅推荐。":"A RedNote cover: a bowl of beef noodles seen from above with chopsticks across its rim, a red score stamp top right and three lines below for the price, what to order and the address, for food spots, reviews and restaurant picks.",探店:"Food spot",课程封面:"Course cover",读书笔记:"Book note","小红书封面:一页摊开的书页上夹着红色丝带书签,荧光笔划过书名,宋体抄下一句书摘,适合读书笔记、书摘和读后感。":"A RedNote cover: an open page with a red ribbon bookmark, the book's name highlighted, and a line copied out in a Song face. For reading notes, excerpts and book reviews.",活动门票:"Event ticket","横版横幅:深蓝底上一张米色门票,左边是活动名、时间和地点,虚线撕口右边是票号和条码,适合读书节、展览、演出和市集。":"A landscape banner: a cream ticket on deep blue, the event, time and place on the left, a ticket number and barcode past the dashed tear line. For book fairs, exhibitions, shows and markets.",门票:"Ticket",情绪电量:"Mood battery","方图:一节只剩一格红色电量的电池,配宋体大字的心情和一句话,适合心情分享、打工日常和朋友圈。":"A square post: a battery down to one red bar, the mood in large serif words and one line under it. For moods, work days and Moments.",心情:"Mood",专栏封面:"Column cover","横版封面:墨绿桌面上一张红格稿纸,标题一字一格写在格子里,右边是期数和导语,适合专栏、随笔和公众号长文的横版封面。":"A landscape cover: a sheet of red-ruled manuscript paper on a dark green desk, the title written one character to a cell, the issue and a standfirst beside it. For columns, essays and long reads.","16:9 横版封面:方格纸上一个明黄大圆写着课号,一支铅笔斜靠在圆边,左边是课程标题、一句介绍和讲师、时长、难度,适合网课封面、培训和分享会。":"A 16:9 cover: a big yellow circle with the lesson number on squared paper, a pencil leaning on its edge, and on the left the course title, a line about it and the teacher, length and level, for online courses, training and talks.",音乐:"Music",旅行:"Travel",展会:"Fair",设计:"Design",展览:"Exhibition",新品:"New product",预告:"Teaser",国风:"Chinese style",播客:"Podcast",演示:"Presentation",汇报:"Report",作品集:"Portfolio",婚礼:"Wedding",市集:"Market",盘点:"Roundup",对比:"Comparison",成长:"Growth",生日:"Birthday",祝福:"Wishes",竖版海报:"Portrait posters",方图:"Squares",横版封面:"Landscape covers","A4 印刷":"A4 print","A4 横版":"A4 landscape","A4 横":"A4 landscape",朋友圈九宫格:"Moments grid",九宫格:"3×3 grid",复盘:"Review",长文:"Long-form",观点:"Opinion",倡议:"Advocacy",生活:"Life",人物:"People",方法:"How-to",教程:"Tutorial",短文:"Short",随笔:"Essay",灵感:"Ideas",夜景:"Night",观察:"Observation",宣言:"Manifesto",海报:"Poster",计划:"Planning",结构:"Structure",矩形:"Rectangle",圆形:"Circle",三角形:"Triangle",菱形:"Diamond",五边形:"Pentagon",五角星:"Star",六边形:"Hexagon",心形:"Heart",对话气泡:"Speech bubble",直线:"Line",箭头:"Arrow",二维码:"QR code",实用:"Utilities",内容:"Content",二维码内容:"QR code content",纠错级别:"Error correction",码边距:"Quiet zone",窄:"Narrow",标准:"Standard",宽:"Wide","品牌 logo":"Brand logo","上传 logo":"Upload logo","更换 logo":"Replace logo","移除 logo":"Remove logo","logo 盖在码中央,会自动按最高纠错级别 H 生成,扫码不受影响":"The logo sits over the code's centre; the code is generated at the top error correction (H), so it still scans","logo 上传失败,请稍后重试":"The logo upload failed. Please try again",码点颜色:"Module colour",背景颜色:"Background colour",模块样式:"Module shape",圆角:"Rounded",预设:"Presets",图表:"Chart",类型:"Type",图表类型:"Chart type",柱状图:"Bar chart",系列:"Series",堆叠方式:"Stacking",分组:"Grouped",堆叠:"Stacked",百分比:"Percent","第 {n} 系列":"Series {n}",系列名称:"Series name",系列颜色:"Series colour",删除系列:"Delete series",添加系列:"Add series",环形图:"Ring chart",折线图:"Line chart",雷达图:"Radar chart",数据:"Data",数值标签:"Value labels",显示:"Show",图例:"Legend",自动:"Auto",隐藏:"Hide",图表颜色:"Chart colour",添加一项:"Add a point",新增:"New","第 {n} 项标签":"Point {n} label","第 {n} 项数值":"Point {n} value","删除第 {n} 项":"Remove point {n}",经典:"Classic",商务蓝:"Business blue",配色:"Colour sets",森林:"Forest",糖果:"Candy",暖橙:"Warm amber",促销红:"Sale red",双向箭头:"Double arrow",星角内径:"Star inner radius",尾巴位置:"Tail position",调整圆角:"Adjust corner rounding",调整星角内径:"Adjust star inner radius",调整气泡尾巴:"Adjust bubble tail",填满:"Fill",适应:"Fit",原图:"Original",圆头:"Round",平头:"Butt",方头:"Square",圆滑:"Round",尖角:"Miter",斜切:"Bevel",无:"None",圆点:"Dot",收藏:"Favorites","收藏{title}":"Favorite {title}","取消收藏{title}":"Unfavorite {title}",背景图案:"Page pattern",网格:"Grid",横线:"Lines",方格:"Crosshatch",底色:"Base colour",图案色:"Motif colour",密度:"Density",小:"Small",中:"Medium",大:"Large",起点:"Start",终点:"End",正常:"Normal",正片叠底:"Multiply",滤色:"Screen",叠加:"Overlay",变暗:"Darken",变亮:"Lighten",颜色减淡:"Color dodge",颜色加深:"Color burn",强光:"Hard light",差值:"Difference",排除:"Exclusion",色相:"Hue",饱和度:"Saturation",颜色:"Color",明度:"Luminosity",属性:"Properties",图层:"Layers",历史:"History",移动对象:"Move object",拖拽移动:"Drag to move",调整大小:"Resize",旋转对象:"Rotate object",裁剪上边:"Crop top edge",裁剪右上角:"Crop top-right corner",裁剪右边:"Crop right edge",裁剪右下角:"Crop bottom-right corner",裁剪下边:"Crop bottom edge",裁剪左下角:"Crop bottom-left corner",裁剪左边:"Crop left edge",裁剪左上角:"Crop top-left corner","图层已锁定,先解锁后再编辑":"This layer is locked. Unlock it to edit.",请先结束当前变换:"Finish the current transform first",新增页面:"Add page",复制页面:"Duplicate page",插入页面:"Insert pages",替换页面:"Replace page",套用模板:"Apply template",插入模板页:"Insert template pages",删除页面:"Delete page",切换页面:"Switch page",调整页面顺序:"Reorder pages",更改页面背景:"Change page background",重命名页面:"Rename page",更新页面:"Update page",调整页面尺寸:"Resize page",调整参考线:"Adjust guides",更换配色:"Change palette",更换字体组合:"Change font set",替换颜色:"Replace color",替换字体:"Replace font",锁定对象:"Lock object",解锁对象:"Unlock object",隐藏对象:"Hide object",显示对象:"Show object",重命名对象:"Rename object",编辑内容:"Edit content",调整顶点:"Adjust vertices",更改样式:"Change style",调整裁切:"Adjust crop",删除对象:"Delete object",调整层级:"Change stacking",复制对象:"Duplicate object",插入对象:"Insert object",编组:"Group",解组:"Ungroup",编辑:"Edit",初始文档:"Initial document","文件不是有效的 JSON":"The file isn't valid JSON","JSON 顶层必须是文档对象":"The JSON must be a document object at the top level","自由画布文档未通过校验:需要 v1–v20 之一的完整文档结构":"The freeform document didn't pass validation: it needs a complete v1–v20 document","Markdown 文档缺少必填字段:source、platformId、themeId、fontFamily、profile":"The Markdown document is missing required fields: source, platformId, themeId, fontFamily, profile","无法识别的文档:需要自由画布文档或 Markdown 文档":"Unrecognized document: it needs to be a freeform or Markdown document","用户名至少 2 个字符":"Usernames need at least 2 characters","密码至少 4 个字符":"Passwords need at least 4 characters",该用户名已被占用:"That username is taken",用户名或密码不正确:"Wrong username or password",草稿内容无效:"The draft content is invalid","页面尺寸必须在 128 到 4096 px 之间":"Page sizes must be between 128 and 4096 px",图片上传未返回有效地址:"The upload did not return a usable address",本地草稿内容无效:"The local draft content is invalid",本地草稿保存结果无效:"Saving the local draft returned an invalid result","浏览器存储空间不足,删掉一些图片或项目后再试":"The browser is out of storage. Delete some pictures or projects and try again.","网络请求失败,请检查网络后重试":"The network request failed. Check your connection and try again.",服务器返回了无效响应:"The server sent an invalid response",认证请求已失效:"The sign-in request is no longer valid",服务器返回了无效图片地址:"The server sent an invalid image address",服务器返回了无效素材:"The server sent an invalid asset",服务器返回了无效素材列表:"The server sent an invalid asset list",服务器返回了无效草稿列表:"The server sent an invalid draft list",服务器返回了无效草稿:"The server sent an invalid draft",远程草稿内容无效:"The remote draft content is invalid","本地存储空间不足,模板保存失败":"Local storage is full, so the template was not saved",模板内容无效:"The template content is invalid",草稿不存在:"That draft no longer exists","仅支持 PNG / JPEG / WebP":"Only PNG, JPEG and WebP are supported",缺少草稿内容:"The draft has no content",缺少上传文件:"No file was uploaded",素材尺寸无效:"Invalid asset size",素材名称不能为空:"Asset names cannot be empty",素材图片地址无效:"Invalid asset image address","图片存储空间已满;系统只回收租约过期且未引用图片,释放空间可能延迟":"Image storage is full. Only expired, unused pictures are reclaimed, so space may free up later.",图片过大:"The picture is too large",未登录或登录已过期:"Not logged in, or the session expired",未知的草稿类型:"Unknown draft type","无效的草稿 ID":"Invalid draft ID",一张或多张图片无法保留:"One or more pictures could not be kept",用户不存在:"That user does not exist","这张图片已失效,请重新上传":"This picture has expired. Please upload it again."},NC={历史版本:"Version history","服务端每隔一段时间自动存一份旧内容(最多保留 30 个)。恢复哪个,哪个就成为当前内容;被替换的内容也会先存成一个版本。":"The server keeps an old copy every once in a while (up to 30). Restoring one makes it the current content; the content it replaces is saved as a version first.","暂时无法读取历史版本,请稍后重试":"Could not load the version history; please try again shortly","恢复失败,请稍后重试":"Restore failed; please try again shortly","还没有历史版本——编辑并保存一段时间后,这里会出现可以回去的版本。":"No versions yet — keep editing and saving, and versions you can go back to will appear here.","读取中…":"Loading…",恢复:"Restore","恢复这个版本?":"Restore this version?","当前内容会被替换(替换前也会存成一个版本,随时能再换回来)。":"The current content will be replaced (it is saved as a version first, so you can always switch back).","正在恢复…":"Restoring…","保存中…":"Saving…","导出中…":"Exporting…",平台:"Platform",主题:"Theme",字体:"Font","卡片署名:头像、昵称、账号":"Card byline: avatar, name and handle",导出:"Export",下载当前页:"Download this page",当前项目已自动保存:"This project is saved",当前内容还没有保存:"This work is not saved yet","用这套模板新建项目?":"Start a new project from this template?","模板会作为一个新项目打开,当前项目留在「我的项目」里。":"The template opens as a new project. This one stays in My projects.","最近的修改还没保存,打开模板后就找不回来了。":"The latest changes are not saved yet, so they will be gone once the template opens.",用模板新建:"Use template","Markdown 卡片工具栏":"Markdown Cards toolbar","打包下载 {n} 页":H("Download {n} page","Download {n} pages"),"Markdown 格式":"Markdown formatting",一级标题:"Heading 1",大标题:"Title",二级标题:"Heading 2",小标题:"Subtitle",重点文字:"bold text",斜体文字:"italic text",引用:"Quote",引用金句或核心观点:"A quote or key point",列表:"List",列表要点:"List item","插入分页(---)":"Insert page break (---)",分页:"Page break","{chars} 字 · {pages} 页":e=>`${e.chars} ${Number(e.chars)===1?"character":"characters"} · ${e.pages} ${Number(e.pages)===1?"page":"pages"}`,预览:"Preview",缩小预览:"Zoom out","恢复 100%":"Reset to 100%",放大预览:"Zoom in",上一页:"Previous page",页码:"Pages","第 {n} 页":"Page {n}",下一页:"Next page","导出当前页为 PNG":"Export this page as PNG",导出本页:"Export page","右键卡片导出单页 · 拖动卡片四角调整圆角 · 拖动图片右下角调整宽度":"Right-click a card to export it · drag its corners to round them · drag a picture’s corner to resize it","导出第 {n} 页 PNG":"Export page {n} as PNG","打包下载全部 {n} 页":H("Download {n} page as ZIP","Download all {n} pages as ZIP"),"导出 PDF":"Export PDF","导出全部 {n} 页 PDF":H("Export {n} page as PDF","Export all {n} pages as PDF"),"导出 PDF 失败":"Could not export the PDF","下载全部 {n} 页":H("Download {n} page","Download all {n} pages"),拼成一张长图:"Combine into one long image","长图太长,已缩小到 {scale}x 导出":"The long image was too tall, so it was exported at {scale}x","页面太多,拼不成一张长图,请改用打包下载":"Too many pages for one long image. Download them as a ZIP instead.","长图导出失败,请稍后重试":"Couldn't export the long image. Try again later.",切成九宫格:"Cut into a 3×3 grid","九宫格导出失败,请稍后重试":"Couldn't export the grid. Try again later.",分享链接:"Share link","生成一个不用登录就能打开的链接,手机扫码或在浏览器点开,就能看这 {n} 张卡片。":"Create a link anyone can open without signing in — scan the code on a phone or tap the link to view these {n} cards.",有效期:"Link lifetime","1 小时":"1 hour","6 小时":"6 hours","1 天":"1 day","7 天":"7 days","30 天":"30 days",自定义:"Custom",自定义小时数:"Custom number of hours",小时:"hours","最长 {h} 小时({d} 天)":"At most {h} hours ({d} days)",生成链接:"Create link","正在生成…":"Creating…","正在生成 {current}/{total} 页…":"Rendering {current}/{total}…",分享链接已创建:"Share link created","手机扫码或在浏览器打开链接就能看这 {n} 张卡片,长按图片可以保存到相册。":"Scan the code or open the link to view these {n} cards; long-press a picture to save it.","有效期到 {date}。":"Valid until {date}.","链接已被打开 {n} 次。":"The link has been opened {n} time(s).",分享二维码:"QR code for the share link",链接:"Link",复制链接:"Copy link",已复制:"Copied",撤销分享:"Revoke share","正在撤销…":"Revoking…","分享创建失败,请稍后重试":"Couldn't create the share link. Try again later.","撤销分享失败,请稍后重试":"Couldn't revoke the share link. Try again later.","分享已撤销,链接不再能打开":"The share was revoked; the link no longer opens",无法读取粘贴的图片:"Could not read the pasted picture",图片资源续租失败:"Could not keep uploaded pictures","暂时无法保护已上传图片,请稍后重试":"Uploaded pictures could not be protected right now. Please try again later.","Markdown 图片上传失败":"Could not upload the picture","图片处理失败,请稍后重试":"Could not process the picture. Please try again later.",图片插入失败:"Could not insert the picture","暂时无法插入这张图片,请稍后重试":"Could not insert this picture right now. Please try again later.",没有找到这个项目:"Project not found",它可能已经被删除了:"It may have been deleted",项目打开失败:"Could not open the project",自由编辑工作区:"Freeform workspace",自由编辑工具栏:"Freeform toolbar",撤销:"Undo","撤销(⌘Z)":"Undo (⌘Z)",重做:"Redo","重做(⇧⌘Z)":"Redo (⇧⌘Z)",格式:"Format",倍率:"Scale",质量:"Quality",导出质量:"Export quality",完成:"Done","导出 {current}/{total}":"Exporting {current}/{total}",插入:"Insert",从模板开始:"Start from a template",添加文本框:"Add a text box",添加标题:"Add a heading",添加副标题:"Add a subheading",添加一段正文:"Add a little body text","在这里写一段正文,说说你想分享的内容。":"Write a few lines here about what you want to share.",双击编辑文本:"Double-click to edit",文字左对齐:"Align text left",文字居中:"Center text",文字右对齐:"Align text right",文字两端对齐:"Justify text",文字靠上:"Lines at the top",文字垂直居中:"Lines in the middle",文字靠下:"Lines at the bottom",段落:"Paragraphs",段间距:"Paragraph spacing",无列表:"No list",项目符号列表:"Bulleted list",编号列表:"Numbered list",对齐与字型:"Alignment and style",显示标尺:"Show rulers",清除描边:"Remove outline",对象工具条:"Selection toolbar",缩小字号:"Smaller text",文字大小:"Text size",放大字号:"Larger text",文字填充颜色:"Text color",加粗文字:"Bold text",倾斜文字:"Italic text",形状填充颜色:"Shape fill color",形状轮廓颜色:"Shape outline color",轮廓粗细:"Outline width",转角弧度:"Corner rounding",线条描边颜色:"Line color",线条粗细:"Line width",末端箭头:"Arrow at the end",图形:"Graphic",图形填充颜色:"Graphic fill color",描边粗细:"Stroke width",取消编组:"Ungroup","{n} 个对象":H("{n} object","{n} objects"),编成一组:"Group them",透明度:"Opacity",位置:"Position","复制一份({keys})":"Duplicate ({keys})","删除对象({keys})":"Delete object ({keys})","{name} 副本":"{name} copy",元素:"Elements",浏览全部模板:"Browse all templates","加入{title}":"Add {title}","打开{title}":"Open {title}",返回模板列表:"Back to templates","加入全部 {n} 页":H("Add {n} page","Add all {n} pages"),"加入第 {n} 页":"Add page {n}",加到当前作品:"Add to this design",按尺寸筛选:"Filter by size","居中 · {position}":"Centered · {position}","{name} · {width}×{height}":"{name} · {width}×{height}","文字、图片、颜色和图层都可以改。":"Words, pictures, colors and layers can all be changed.",默认文字样式:"Default text styles",更多:"More",更多设置:"More settings",收起面板:"Close panel",这里只能放图片:"Only pictures can be dropped here","松开,把图片放进这一页":"Drop to add it to this page","拖动旋转,按住 Shift 以 15° 为步长":"Drag to rotate; hold Shift for 15° steps",文字:"Text",线条:"Line",图标:"Icons",搜索元素:"Search elements",没有找到元素:"Nothing found",关闭面板:"Close panel",自由画布:"Freeform canvas",页面列表:"Page list",收起页面列表:"Collapse the page list",新增页面:"Add page",复制页面:"Duplicate page",删除页面:"Delete page",重命名页面:"Rename page",图片裁剪:"Crop picture",比例:"Ratio",裁剪:"Crop",图片取景:"Picture framing",显示参考线:"Show guides",对象吸附:"Snap to objects",预览缩放:"Zoom",缩小画布:"Zoom out",视图:"View",适应画布:"Zoom to fit",放大画布:"Zoom in",按住拖动可拉出竖向参考线:"Drag to pull out a vertical guide",按住拖动可拉出横向参考线:"Drag to pull out a horizontal guide","拖动参考线,拖出页面删除;双击移除":"Drag to move a guide, drag it off the page or double-click to remove it",调整图片取景:"Adjust framing",图片缩放:"Picture zoom",缩小图片:"Zoom picture out",图片缩放比例:"Picture zoom level",放大图片:"Zoom picture in",对齐与分布:"Align and distribute",左对齐:"Align left",水平居中:"Align center",右对齐:"Align right",顶对齐:"Align top",垂直居中:"Align middle",底对齐:"Align bottom",水平均分:"Distribute horizontally",垂直均分:"Distribute vertically",取消:"Cancel",调整取景:"Adjust framing",编辑历史:"Edit history",当前:"Current",撤销到这一步:"Undo to this step",重做到这一步:"Redo to this step",对象路径:"Object path",编辑范围:"Editing scope",页面名称:"Page name",背景:"Background",锁定状态:"Lock state",已锁定:"Locked","锁定来源:{name}":"Locked by {name}",解锁:"Unlock",包含锁定图层:"Contains locked layers","锁定来源:{name},请先在图层面板解锁":"Locked by {name}. Unlock it in the Layers panel first.",位置与尺寸:"Position and size","中心 X":"Center X","中心 Y":"Center Y",宽:"W",高:"H",旋转:"Rotation","缩放 %":"Scale %",字号:"Size",行高:"Line height",字距:"Letter spacing",粗体:"Bold",斜体:"Italic",竖排:"Vertical",描边:"Stroke",描边颜色:"Stroke color","描边 hex":"Stroke hex",描边宽度:"Stroke width",文字片段:"Text span","已选 {n} 字":H("{n} character selected","{n} characters selected"),加粗:"Bold","标色 {color}":"Color {color}",标色:"Color",下划线:"Underline",删除线:"Strikethrough",缩小所选文字:"Smaller selected text",放大所选文字:"Larger selected text",所选文字字号:"Size of the selected text","字号 {n}":"Size {n}",清除样式:"Clear styles",高亮:"Highlight","高亮 {color}":"Highlight {color}",删除文字片段:"Remove span",填充:"Fill",文字颜色:"Text color",图片填充方式:"Picture fit",裁剪图片:"Crop picture",重置图片取景:"Reset framing",当前已经是默认取景:"Framing is already at the default",重置取景:"Reset framing",形状描边颜色:"Shape stroke color",图形描边颜色:"Graphic stroke color",线条颜色:"Line color",描边宽:"Width",粗细:"Weight",虚线:"Dashed",实线:"Solid",线帽:"Caps",拐角:"Joins",端点:"Ends",外观:"Appearance","不透明度 %":"Opacity %",圆角:"Corner radius",阴影:"Shadow",混合模式:"Blend mode",滤镜:"Filters",排列:"Arrange",层级:"Stacking",后移:"Backward",前移:"Forward",置底:"To back",置顶:"To front",添加滤镜:"Add filter",亮度:"Brightness",对比度:"Contrast",模糊:"Blur","滤镜{name}":"Filter {name}",清除滤镜:"Clear filters","图片填充失败,请稍后重试":"Could not fill with that picture, please try again",粘贴填充图片:"Paste picture fill",粘贴替换图片:"Paste-replace picture",拼图:"Collage",两张并排:"Side by side",一大两小:"One big, two small",两小一大:"Two small, one big",三等分:"Three strips",四宫格:"Quad grid",六宫格:"Six grid",滤镜预设:"Filter presets","滤镜预设{name}":"Filter preset {name}",原图:"Original",色调:"Hue",灰度:"Grayscale",复古黄:"Sepia",黑白:"Mono",复古:"Vintage",暖阳:"Sunny",冷调:"Cool",胶片:"Film",褪色:"Faded",高对比:"Punch",柔焦:"Soft focus",添加阴影:"Add shadow",阴影颜色:"Shadow color",阴影模糊:"Shadow blur",阴影水平偏移:"Shadow X offset",阴影垂直偏移:"Shadow Y offset",清除阴影:"Clear shadow",包含不同尺寸页面:"Pages of different sizes","当前作品包含不同尺寸页面。ZIP 中的图片会保留各自页面尺寸,不会统一拉伸或裁剪。":"This design has pages of different sizes. Each image in the ZIP keeps its own page size and is never stretched or cropped.",继续导出:"Export anyway",画布操作:"Canvas actions",复制:"Copy",剪切:"Cut",粘贴:"Paste",原位复制:"Duplicate in place",原位粘贴:"Paste in place",剪切对象:"Cut object",上移一层:"Bring forward",下移一层:"Send backward",置于顶层:"Bring to front",移到底层:"Send to back",取消隐藏:"Unhide",复制样式:"Copy style",粘贴样式:"Paste style",缩放到选区:"Zoom to selection",页面操作:"Page actions","{name} 的页面操作":"Actions for {name}",重命名此页:"Rename page",复制此页:"Duplicate page",删除此页:"Delete page",上移一位:"Move up",下移一位:"Move down",移到最前:"Move to start",移到最后:"Move to end",组:"Group","图层或父级已锁定,无法组合":"The layer or its parent is locked, so it cannot be grouped","图层或父级已锁定,无法解组":"The layer or its parent is locked, so it cannot be ungrouped",至少选择两个同级图层后才能组合:"Select at least two sibling layers to group",只能组合同一组内的图层:"Only layers in the same group can be grouped",隐藏图层无法组合:"Hidden layers cannot be grouped",当前图层无法组合:"These layers cannot be grouped",请选择一个或多个组合后再解组:"Select one or more groups to ungroup",当前图层无法解组:"These layers cannot be ungrouped",无法在当前编辑范围内插入对象:"Objects cannot be inserted in the current scope",无法在当前编辑范围内粘贴对象:"Objects cannot be pasted in the current scope","组合未能应用到当前文档,请重试":"Grouping did not apply. Please try again.","解组未能应用到当前文档,请重试":"Ungrouping did not apply. Please try again.",对齐到页面:"Align to page",对齐:"Align",分布:"Distribute",删除顶点:"Delete vertex",添加顶点:"Add vertex",拖拽复制:"Drag to duplicate",删除参考线:"Delete guide",新增参考线:"Add guide",拖动顶点:"Drag vertex",请先解锁图片:"Unlock the picture first",图片正在处理中:"The picture is still processing",请先切换到填满模式后裁剪:"Switch to Fill before cropping",适应模式不支持调整取景:"Framing is not available in Fit mode",图片加载完成后可裁剪:"Cropping becomes available once the picture loads",图片加载完成后可调整取景:"Framing becomes available once the picture loads","图片续租失败,请检查网络后重试":"Could not keep the picture. Check your connection and try again.","图片加载失败,请重试":"The picture failed to load. Please try again.",当前裁剪范围无法应用该比例:"That ratio does not fit the current crop","图片裁剪未能应用,请重试":"The crop did not apply. Please try again.","图片插入失败,请稍后重试":"Could not insert the picture. Please try again later.","背景图片设置失败,请稍后重试":"Could not set the background picture. Please try again later.",设为背景:"Set as background","图片加载超时,导出已取消":"Pictures took too long to load, so the export was canceled","图片加载失败,导出已取消":"A picture failed to load, so the export was canceled","导出失败,请稍后重试":"Export failed. Please try again later.","打包导出失败,请稍后重试":"Export all failed. Please try again later.","文件读取失败,请重试":"Could not read the file. Please try again.","没有找到这个项目,它可能已经被删除了":"Project not found. It may have been deleted.",文本内容:"Text content",组合:"Group",所选图层已组合:"Grouped the selected layers",所选组合已解组:"Ungrouped the selected groups",无法组合所选图层:"Could not group the selected layers",无法解组所选图层:"Could not ungroup the selected layers","{name} 已重命名":"Renamed {name}",只能同时选择同一组内的图层:"Only layers in the same group can be selected together","{name} 已设为自身隐藏,仍受父级隐藏影响":"{name} is now hidden itself and still hidden by its parent","{name} 已取消自身隐藏,仍受父级隐藏影响":"{name} is no longer hidden itself but is still hidden by its parent","{name} 已隐藏":"{name} hidden","{name} 已显示":"{name} shown","{name} 已设为自身锁定,仍受父级锁定影响":"{name} is now locked itself and still locked by its parent","{name} 已取消自身锁定,仍受父级锁定影响":"{name} is no longer locked itself but is still locked by its parent","{name} 已锁定":"{name} locked","{name} 已解锁":"{name} unlocked","{name} 已移至第 {n} 层":"Moved {name} to position {n}","图层已锁定,无法调整层级":"The layer is locked, so its stacking cannot change",图层只能在同一组内排序:"Layers can only be reordered within their group","已移动 {count} 个图层至 {name} 上方":H("Moved {count} layer above {name}","Moved {count} layers above {name}","count"),自身隐藏:"Hidden itself",自身可见:"Visible itself","受父级隐藏影响,当前隐藏":"Hidden by its parent",当前隐藏:"Currently hidden",当前可见:"Currently visible",自身锁定:"Locked itself",自身未锁定:"Not locked itself","受父级锁定影响,当前锁定":"Locked by its parent",当前锁定:"Currently locked",当前未锁定:"Currently unlocked","包含锁定后代,结构只读":"Contains locked layers, so its structure is read-only","当前选择包含锁定图层,结构只读":"The selection contains locked layers, so its structure is read-only","隐藏图层 {name}":"Hide layer {name}","显示 {name}":"Show {name}","隐藏 {name}":"Hide {name}","锁定图层 {name}":"Lock layer {name}","解锁 {name}":"Unlock {name}","锁定 {name}":"Lock {name}",隐藏:"hidden",锁定:"locked",和:" and ",";":"; ","第 {n} 层":"Level {n}",折叠图层组:"Collapse group",展开图层组:"Expand group","受父级{state}影响":"Affected by its parent: {state}",重命名图层:"Rename layer",图层组合操作:"Layer grouping","组合所选图层 (Ctrl+G)":"Group selected layers (Ctrl+G)","解组所选图层 (Ctrl+Shift+G)":"Ungroup selected layers (Ctrl+Shift+G)",图层树:"Layer tree","自定义 · {width}×{height}px":"Custom · {width}×{height}px",页面尺寸:"Page size",常用页面比例:"Common page ratios",自定义尺寸:"Custom size",宽度:"Width","宽度 px":"Width px",高度:"Height","高度 px":"Height px",应用尺寸:"Apply size",属性和图层面板:"Properties and layers",自由编辑面板:"Freeform panel","拖动顶点 {n}":"Drag vertex {n}",只能导入本机上的文档:"Only documents on this computer can be imported","读取导入的文档失败,请重试":"Couldn't read the imported document. Try again.",这里只能导入自由画布文档:"Only freeform documents can be imported here",导入的设计:"Imported design",花字:"Text styles",套用花字:"Apply text style",效果:"Effect",效果颜色:"Effect color",效果第二种颜色:"Effect second color",方向:"Direction",镂空:"Hollow",错位:"Splice",投影:"Offset",回声:"Echo",故障:"Glitch",立体:"3D",底色:"Label",荧光笔:"Highlighter",强度:"Strength",偏移:"Offset",厚度:"Depth",扩展:"Spread",风格:"Styles",配色:"Palettes",字体组合:"Font sets",搭配:"Looks",标题:"Title",正文内容:"Body text",全部替换:"Change all","把整套里的 {from} 都换成 {to}":"Change {from} to {to} on every page","把整套里用「{from}」的文字都换成「{to}」":"Set every text in {from} in {to}","{label} 本设计用色":"{label} colors in this design","{label} 本设计 {color}":"{label} design color {color}",我的字体:"My fonts",导入字体:"Import a font","导入字体…":"Import a font…","删除字体 {font}":"Remove font {font}","字体导入失败,请稍后重试":"Could not import the font. Please try again later.","字体文件太大,最大 40 MB":"The font file is too large. The limit is 40 MB.","不是可用的字体文件,请选 TTF、OTF、WOFF 或 WOFF2":"This is not a usable font file. Choose a TTF, OTF, WOFF or WOFF2 file.","浏览器读不了这个字体文件,换一个试试":"The browser cannot read this font file. Try another one.","浏览器存储空间不足,删掉一些字体后再试":"The browser is out of storage. Remove some fonts and try again.","字体读写失败,请稍后重试":"Could not read or save fonts. Please try again later.",当前浏览器无法保存字体:"This browser cannot save fonts.","字体库正在其他标签页中升级,请刷新后重试":"The font library is being upgraded in another tab. Refresh and try again.","{label} 色板":"{label} swatches","{label} 自定义 HEX":"{label} custom hex","{label} 屏幕取色":"{label} eyedropper",屏幕取色:"Eyedropper","{label} 常用颜色":"{label} common colors","{label} 最近使用":"{label} recent colors","{label} 最近 {color}":"{label} recent {color}","{label} 类型":"{label} type",插入图片填充:"Fill with a picture",纯色:"Solid",渐变:"Linear",径向:"Radial",透明:"None","{label} 颜色":"{label} color","{label} 色标 {n} 颜色":"{label} stop {n} color","{label} 色标 {n} hex":"{label} stop {n} hex","{label} 色标 {n} 位置百分比":"{label} stop {n} position %","{label} 删除色标 {n}":"{label} remove stop {n}",删除色标:"Remove stop","{label} 渐变起始色":"{label} gradient start color","{label} 渐变起始 hex":"{label} gradient start hex","{label} 渐变结束色":"{label} gradient end color","{label} 渐变结束 hex":"{label} gradient end hex","{label} 渐变角度":"{label} gradient angle","{label} 渐变角度数值":"{label} gradient angle value","{label} 添加色标":"{label} add stop",添加色标:"Add stop",替换图片:"Replace picture",清除图片:"Remove picture"},LC={...RC,...NC,...MC},eR=[{id:"zh",label:"中文"},{id:"en",label:"English"}],Zw="dingcard.lang.v1",FC={en:LC},pu=new Set;function $C(){if(typeof window>"u")return"zh";try{return localStorage.getItem(Zw)==="en"?"en":"zh"}catch{return"zh"}}let tr=$C();function Jw(e){typeof document<"u"&&(document.documentElement.lang=e==="zh"?"zh-CN":"en")}Jw(tr);function Lp(){return tr}function tR(e){if(e!==tr){tr=e;try{localStorage.setItem(Zw,e)}catch{}Jw(e);for(const t of[...pu])t()}}function nR(){return tr==="zh"?"zh-CN":"en-US"}function Fp(e,t){return t?e.replace(/\{(\w+)\}/g,(n,r)=>r in t?String(t[r]):n):e}function e1(e,t){const n=tr==="zh"?void 0:FC[tr][e];return n===void 0?Fp(e,t):typeof n=="function"?n(t??{}):Fp(n,t)}function OC(e){return pu.add(e),()=>{pu.delete(e)}}function zC(){return te.useSyncExternalStore(OC,Lp,Lp)}function rR(){return zC(),e1}const oR=[{id:"rednote",label:"小红书",width:360,height:480,header:"none"},{id:"weibo",label:"微博",width:360,height:480,header:"weibo"},{id:"twitter",label:"推特",width:360,height:480,header:"twitter"}],Nr=[{id:"light",label:"简约白",background:"#ffffff",color:"#1a1a1a",accent:"#2563eb"},{id:"warm",label:"暖米色",background:"#faf6f0",color:"#3a3226",accent:"#c2703d"},{id:"dark",label:"深空黑",background:"#1c1c1e",color:"#f2f2f7",accent:"#0a84ff"},{id:"mint",label:"薄荷绿",background:"#eef7f2",color:"#1f3a2e",accent:"#2fa36b"},{id:"template-column",label:"专栏",background:"#f3eee4",color:"#1d1a16",accent:"#c0402a",look:"column",type:{fontSize:15,lineHeight:1.85,blockGap:13,padding:30}},{id:"template-memo",label:"备忘录",background:"#fffdf8",color:"#1c1c1e",accent:"#e0a000",look:"memo",type:{fontSize:15,lineHeight:1.8,blockGap:12,padding:26}},{id:"template-letter",label:"信笺",background:"#f6efe1",color:"#2e2a36",accent:"#a5493a",look:"letter",type:{fontSize:15,lineHeight:1.9,blockGap:0,padding:30}},{id:"template-night",label:"夜读",background:"#16171b",color:"#d9d3c6",accent:"#c9a45c",look:"night",type:{fontSize:15,lineHeight:1.9,blockGap:13,padding:30}},{id:"template-aurora",label:"极光",background:"#f1edf7",color:"#2a2735",accent:"#6f55e8",look:"aurora",type:{fontSize:14.5,lineHeight:1.8,blockGap:11,padding:36}},{id:"template-doc",label:"文档",background:"#ffffff",color:"#1f2329",accent:"#3370ff",look:"doc",type:{fontSize:14.5,lineHeight:1.8,blockGap:11,padding:28}},{id:"template-xuan",label:"宣纸",background:"#f2ecdf",color:"#2a2622",accent:"#b23a2e",look:"xuan",type:{fontSize:15,lineHeight:2,blockGap:10,padding:32}},{id:"template-swiss",label:"瑞士",background:"#f4f4f1",color:"#111111",accent:"#e5382a",look:"swiss",type:{fontSize:14.5,lineHeight:1.75,blockGap:12,padding:28}},{id:"template-journal",label:"手账",background:"#fbf7ef",color:"#3a342f",accent:"#e8875a",look:"journal",type:{fontSize:15,lineHeight:1.85,blockGap:12,padding:28}},{id:"template-editorial-archive",label:"旧模板 · 编辑档案",background:"#eee8db",color:"#171411",accent:"#dc3f2f",hidden:!0},{id:"template-public-theatre",label:"旧模板 · 公共剧场",background:"#11110f",color:"#f3ecdc",accent:"#ed3828",hidden:!0},{id:"template-issue-cover",label:"旧模板 · 议题封面",background:"#eee3cf",color:"#18191d",accent:"#ec5a2a",hidden:!0},{id:"template-editorial",label:"旧模板 · 编辑部",background:"#f6f3ea",color:"#171717",accent:"#d94836",hidden:!0},{id:"template-checklist",label:"旧模板 · 清单",background:"#f3f5ed",color:"#14271f",accent:"#174a38",hidden:!0},{id:"template-signal",label:"旧模板 · 信号",background:"#f2f0e8",color:"#111111",accent:"#e4472f",hidden:!0},{id:"template-night-flight",label:"旧模板 · 夜航",background:"#111820",color:"#f2efe6",accent:"#f2bd4b",hidden:!0}];function iR(e){return typeof e!="string"||!e?Nr[0]:Nr.find(t=>t.id===e)??Nr[0]}function sR(e){const t=Nr.filter(r=>r.hidden!==!0);if(typeof e!="string"||!e)return t;const n=Nr.find(r=>r.id===e);return n!=null&&n.hidden?[...t,n]:t}const DC=[{id:"PingFang SC",label:"苹方 PingFang"},{id:"'Noto Sans SC', sans-serif",label:"思源黑体"},{id:"'Noto Serif SC', serif",label:"思源宋体"},{id:"'LXGW WenKai TC', cursive",label:"霞鹜文楷"},{id:"'ZCOOL XiaoWei', serif",label:"站酷小薇"},{id:"Songti SC, serif",label:"系统宋体"},{id:"system-ui, sans-serif",label:"系统默认"}],jC=[{id:"'Playfair Display', serif",label:"Playfair Display"},{id:"'Archivo Black', sans-serif",label:"Archivo Black"},{id:"'Great Vibes', cursive",label:"Great Vibes"},{id:"'ZCOOL QingKe HuangYou', sans-serif",label:"站酷黄油体"},{id:"'Ma Shan Zheng', cursive",label:"马善政毛笔"}],WC=[...DC,...jC],BC=22,HC=16,UC=1.75,KC=14,YC={none:0,weibo:60,twitter:64},lR={nickname:"Shinve",handle:"Shinve",location:"",avatarColor:"#1c1c2e",avatarImage:null,verified:!0,headerFirstPageOnly:!1},aR=["#3b82f6","#e08a2b","#3a9e5f","#9b59d0","#d94a6a"];function cR(e,t,n){var r,o,i,s;return{themeId:t.id,look:t.look??null,width:e.width,height:e.height,padding:((r=t.type)==null?void 0:r.padding)??BC,header:e.header,headerHeight:YC[e.header],background:t.background,color:t.color,accent:t.accent,fontFamily:n,fontSize:((o=t.type)==null?void 0:o.fontSize)??HC,lineHeight:((i=t.type)==null?void 0:i.lineHeight)??UC,blockGap:((s=t.type)==null?void 0:s.blockGap)??KC}}function uR(e,t){return{"--card-w":`${e.width}px`,"--card-h":`${e.height}px`,"--card-pad":`${e.padding}px`,"--card-bg":e.background,"--card-fg":e.color,"--card-accent":e.accent,"--card-font":e.fontFamily,"--card-fs":`${e.fontSize}px`,"--card-lh":String(e.lineHeight),"--card-gap":`${e.blockGap}px`,"--card-radius":`${t}px`}}const $p="'Playfair Display', serif",VC="'Archivo Black', sans-serif",GC="'Noto Serif SC', serif",Op="'LXGW WenKai TC', cursive",Xt=(e,t=2)=>String(e).padStart(t,"0"),zp=e=>Math.max(2,String(e).length),Dp=(e,t)=>`${Xt(e,zp(t))} / ${Xt(t,zp(t))}`,XC=["日","一","二","三","四","五","六"];function QC(e){const t=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],n=Math.max(1,Math.min(99,Math.floor(e)));if(n<10)return t[n];const r=Math.floor(n/10),o=n%10;return`${r===1?"":t[r]}拾${o===0?"":t[o]}`}const t1={column:{folio:Dp,fonts:[$p],words:"“”■"},memo:{folio:(e,t)=>`${e} / ${t}`,date:e=>`${e.getFullYear()}年${e.getMonth()+1}月${e.getDate()}日 ${Xt(e.getHours())}:${Xt(e.getMinutes())}`,words:"‹备忘录⋯✓"},letter:{folio:(e,t)=>`第 ${e} 页 · 共 ${t} 页`,fonts:[Op]},night:{folio:e=>Xt(e),fonts:[$p],words:"“"},aurora:{folio:Dp},doc:{folio:(e,t)=>`${e} / ${t}`,words:"i✓"},xuan:{folio:e=>QC(e),fonts:[GC],words:"「」完零壹贰叁肆伍陆柒捌玖拾"},swiss:{folio:e=>Xt(e),fonts:[VC],words:"/"},journal:{folio:e=>`P.${Xt(e)}`,date:e=>`${Xt(e.getMonth()+1)}.${Xt(e.getDate())} 周${XC[e.getDay()]}`,fonts:[Op],words:"周日一二三四五六✓"}};function qC(e,t,n,r=new Date){var l;const o=t1[e],i=Number.isFinite(n)&&n>0?Math.floor(n):1,s=Math.min(i,Math.max(1,Number.isFinite(t)?Math.floor(t)+1:1));return{folio:o.folio(s,i),date:((l=o.date)==null?void 0:l.call(o,r))??null}}function ZC(e){const t=e.split(`
|
|
46
46
|
`).find(n=>/^#{1,2}\s+\S/.test(n.trim()));return t?t.trim().replace(/^#{1,2}\s+/,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[*_~`]/g,"").trim():""}function fR(e,t,n){if(!e)return[{fontFamily:n,text:t}];const r=t1[e],o=`0123456789/·:.年月日第页共 ${r.words??""}`,i=[{fontFamily:n,text:`${t}${o}`}];for(const s of r.fonts??[])s!==n&&i.push({fontFamily:s,text:`${ZC(t)}${o}`});return i}function JC({look:e,pageRole:t,pageIndex:n,pageCount:r,title:o=""}){if(!e)return null;const{folio:i,date:s}=qC(e,n,r);return _.jsxs("div",{className:`markdown-card-chrome markdown-card-chrome--${e}`,"data-chrome-role":t,"aria-hidden":"true",children:[_.jsx("span",{className:"markdown-chrome-mark"}),o&&_.jsx("span",{className:"markdown-chrome-head",children:o}),s&&_.jsx("span",{className:"markdown-chrome-date",children:s}),_.jsx("span",{className:"markdown-chrome-folio",children:i})]})}function eT(e){const t=e.trim();return t?t.slice(0,1):"·"}function n1({profile:e,shape:t}){const n=t==="circle"?"50%":"8px";return e.avatarImage?_.jsx("img",{className:"avatar",src:e.avatarImage,alt:"",style:{borderRadius:n}}):_.jsx("div",{className:"avatar avatar-fallback",style:{background:e.avatarColor,borderRadius:n},children:eT(e.nickname)})}function tT(){return _.jsxs("svg",{className:"verified",viewBox:"0 0 22 22",width:"15",height:"15","aria-hidden":!0,children:[_.jsx("path",{fill:"#1d9bf0",d:"M20.4 11c0-1.2-.7-2.3-1.7-2.8.3-1.1 0-2.4-.9-3.3-.9-.9-2.2-1.2-3.3-.9C13.3 3 12.2 2.3 11 2.3S8.7 3 8.5 4c-1.1-.3-2.4 0-3.3.9-.9.9-1.2 2.2-.9 3.3-1 .5-1.7 1.6-1.7 2.8s.7 2.3 1.7 2.8c-.3 1.1 0 2.4.9 3.3.9.9 2.2 1.2 3.3.9.2 1 1.3 1.7 2.5 1.7s2.3-.7 2.5-1.7c1.1.3 2.4 0 3.3-.9.9-.9 1.2-2.2.9-3.3 1-.5 1.7-1.6 1.7-2.8z"}),_.jsx("path",{fill:"#fff",d:"M9.8 14.4l-2.8-2.8 1.1-1.1 1.7 1.7 3.9-3.9 1.1 1.1z"})]})}function nT(){return _.jsxs("svg",{className:"verified verified-weibo",viewBox:"0 0 20 20",width:"14",height:"14","aria-hidden":!0,children:[_.jsx("circle",{cx:"10",cy:"10",r:"10",fill:"#f6a623"}),_.jsx("path",{d:"M5.5 10.2l2.7 2.7 6-6.4",fill:"none",stroke:"#fff",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"})]})}const rT="#ff8200";function oT({profile:e}){return _.jsxs("div",{className:"cardhead cardhead-weibo",children:[_.jsxs("div",{className:"cardhead-weibo-avatar-wrap",children:[_.jsx(n1,{profile:e,shape:"circle"}),e.verified&&_.jsx("span",{className:"cardhead-weibo-avatar-badge","aria-hidden":!0,children:_.jsx(nT,{})})]}),_.jsxs("div",{className:"cardhead-meta",children:[_.jsx("span",{className:"cardhead-name",style:{color:rT},children:e.nickname}),_.jsxs("span",{className:"cardhead-sub",children:[sT(),e.location&&_.jsxs("span",{children:[" 发布于 ",e.location]})]})]})]})}function iT({profile:e}){return _.jsxs("div",{className:"cardhead cardhead-twitter",children:[_.jsx(n1,{profile:e,shape:"circle"}),_.jsxs("div",{className:"cardhead-meta",children:[_.jsxs("div",{className:"cardhead-name-row",children:[_.jsx("span",{className:"cardhead-name",children:e.nickname}),e.verified&&_.jsx(tT,{})]}),_.jsxs("div",{className:"cardhead-sub",children:["@",e.handle,e.location&&_.jsxs("span",{children:[" 发布于 ",e.location]})]})]})]})}function sT(){const e=new Date,t=String(e.getFullYear()).slice(2),n=String(e.getHours()).padStart(2,"0"),r=String(e.getMinutes()).padStart(2,"0");return`${t}-${e.getMonth()+1}-${e.getDate()} ${n}:${r}`}function lT(e){const t=e.target;if(!(t instanceof HTMLImageElement))return;const n=t.closest(".img-wrap");!(n instanceof HTMLElement)||!e.currentTarget.contains(n)||n.classList.add("image-load-error")}const dR=te.forwardRef(function({html:t,config:n,profile:r,pageIndex:o,pageCount:i,pageRole:s,showHeader:l=!0,title:a},c){const u=l&&n.header!=="none";return _.jsxs("div",{className:"card",ref:c,"data-card-theme":n.themeId,"data-look":n.look??void 0,"data-page-role":s,"data-page-index":o,"data-page-count":i,"data-has-social-header":String(u),children:[_.jsx(JC,{look:n.look,pageRole:s,pageIndex:o,pageCount:i,title:a}),l&&n.header==="weibo"&&_.jsx(oT,{profile:r}),l&&n.header==="twitter"&&_.jsx(iT,{profile:r}),_.jsx("div",{className:"card-content","data-card-theme":n.themeId,"data-look":n.look??void 0,"data-page-role":s,"data-social":String(u),onErrorCapture:lT,dangerouslySetInnerHTML:{__html:t}})]})}),aT={focusX:.5,focusY:.5,zoom:1};function cT(e){return JSON.stringify([e.scopeGeneration,e.slideId,e.scenePathKey,e.logicalSrc,e.resolvedSrc])}function uT(e,t,n,r){return!n||!r||n.logicalSrc!==e||n.resolvedSrc!==t?null:{identity:n,callback:r,key:cT(n)}}function fT(e){return Number.isFinite(e.naturalWidth)&&e.naturalWidth>0&&Number.isFinite(e.naturalHeight)&&e.naturalHeight>0?{width:e.naturalWidth,height:e.naturalHeight}:null}function Bs({logicalSrc:e,resolvedSrc:t,alt:n,fit:r,framing:o,frameWidth:i,frameHeight:s,className:l,decodeIdentity:a,onDecodeReport:c}){const u=te.useRef(null),d=te.useRef({resolvedSrc:t,generation:0});d.current.resolvedSrc!==t&&(d.current={resolvedSrc:t,generation:d.current.generation+1});const[f,p]=te.useState({resolvedSrc:t,status:t?"loading":"error",naturalSize:null}),w=te.useRef(null),k=f.resolvedSrc===t?f:{status:t?"loading":"error",naturalSize:null},C=uT(e,t,a,c);function m(b){!b||w.current===b.key||(w.current=b.key,b.callback({identity:b.identity,status:"loading"}))}function g(b,A,I){return d.current.generation===A&&d.current.resolvedSrc===I&&b.getAttribute("src")===I}function y(b,A=d.current.generation,I=t,P=C){b&&!g(b,A,I)||d.current.generation!==A||d.current.resolvedSrc!==I||(m(P),p(L=>L.resolvedSrc===I&&L.status==="ready"?L:{resolvedSrc:I,status:"error",naturalSize:null}),P==null||P.callback({identity:P.identity,status:"error"}))}async function S(b){const A=d.current.generation,I=t,P=C;if(!g(b,A,I))return;m(P);try{typeof b.decode=="function"&&await b.decode()}catch{y(b,A,I,P);return}if(!g(b,A,I))return;const L=fT(b);if(!L){y(b,A,I,P);return}p({resolvedSrc:I,status:"ready",naturalSize:L}),P==null||P.callback({identity:P.identity,status:"ready",naturalWidth:L.width,naturalHeight:L.height})}te.useEffect(()=>{const b=d.current.generation,A=u.current;p(I=>I.resolvedSrc===t?I:{resolvedSrc:t,status:t?"loading":"error",naturalSize:null}),m(C),t?A!=null&&A.complete&&S(A):y(null,b,t,C)},[t,e,a==null?void 0:a.scopeGeneration,a==null?void 0:a.slideId,a==null?void 0:a.scenePathKey,a==null?void 0:a.logicalSrc,a==null?void 0:a.resolvedSrc,c]),te.useEffect(()=>()=>{d.current={resolvedSrc:d.current.resolvedSrc,generation:d.current.generation+1}},[]);const x=k.status==="ready"&&k.naturalSize?f0({naturalSize:k.naturalSize,frameSize:{width:i,height:s},fit:r,framing:o}):null,v=r==="contain"||Mi(o,aT),h=k.status!=="error"&&(x!==null||v),E=x?{left:x.left,top:x.top,width:x.width,height:x.height,objectFit:r,objectPosition:"center",visibility:h?"visible":"hidden"}:{left:0,top:0,width:"100%",height:"100%",objectFit:r,objectPosition:"center",visibility:h?"visible":"hidden"};function T(b){S(b.currentTarget)}return _.jsx("div",{className:"freeform-framed-image","data-framed-image":"true","data-image-load-state":k.status,children:t&&_.jsx("img",{ref:u,className:l,"data-framed-image-content":"true",src:t,alt:n,draggable:!1,onLoad:T,onError:b=>y(b.currentTarget),style:E},t)})}const dT="[]";function hR({slide:e,presentationOnly:t=!1,scopeGeneration:n,onDecodeReport:r}){const o=e.background;if(o.type!=="image")return null;const i=Kn.images.resolve(o.src),s=!t&&n!==void 0&&r!==void 0;return _.jsx("div",{className:"freeform-page-background","data-testid":t?void 0:"freeform-page-background","aria-hidden":"true",children:_.jsx(Bs,{logicalSrc:o.src,resolvedSrc:i,fit:o.fit,framing:o.framing,frameWidth:e.width,frameHeight:e.height,className:"freeform-page-background-image",alt:"",decodeIdentity:s?{scopeGeneration:n,slideId:e.id,scenePathKey:dT,logicalSrc:o.src,resolvedSrc:i}:void 0,onDecodeReport:s?r:void 0})})}const jp=.4;function hT(e,t){if(e==="bullet")return 1+jp;const n=String(Math.max(1,t)).length;return Math.round(((n+1)*.6+jp)*100)/100}function pT(e){return e.split(`
|
|
47
47
|
`).filter(t=>t.length>0).length}function gT(e){const t={fontFamily:e.fontFamily,fontSize:e.fontSize,textAlign:e.align,fontWeight:e.fontWeight,...e.lineHeight!==void 0?{lineHeight:e.lineHeight}:{},...e.letterSpacing!==void 0?{letterSpacing:`${e.letterSpacing}px`}:{},...e.italic?{fontStyle:"italic"}:{},...e.vertical?{writingMode:"vertical-rl"}:{}};return e.verticalAlign&&(t.display="flex",t.flexDirection="column",t.justifyContent=e.verticalAlign==="middle"?"safe center":"safe flex-end"),e.paragraphSpacing&&(t["--freeform-paragraph-spacing"]=`${e.paragraphSpacing}px`),e.list&&(t["--freeform-list-indent"]=`${hT(e.list,pT(e.text))}em`),t}function mT(e){return{...e.list?{"data-list":e.list}:{},...e.paragraphSpacing?{"data-paragraph-spacing":""}:{}}}function gu(e,t,n){return e.length===0&&t<n-1}function yT(e,t,n){if(!y0(e))return document.createTextNode(e.text);const r=document.createElement("span");for(const[o,i]of Object.entries(Jc(e,t,n)))r.style.setProperty(o.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`),i);return r.textContent=e.text,r}function wT(e,t,n,r,o){const i=document.createDocumentFragment(),s=m0(t,n);s.forEach((l,a)=>{const c=document.createElement("div");for(const u of l)c.append(yT(u,r,o));gu(l,a,s.length)&&c.append(document.createElement("br")),i.append(c)}),e.replaceChildren(i)}function kT(e){return e.nodeType===Node.ELEMENT_NODE&&(e.tagName==="DIV"||e.tagName==="P")}function ST(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(!(t.nodeType===Node.TEXT_NODE&&(t.textContent??"")===""))return!1;return!0}function Ko(e){const t=[];let n=null;const r=()=>{n===null&&(n="")},o=()=>{n!==null&&t.push(n),n=null},i=s=>{for(const l of Array.from(s.childNodes))if(l.nodeType===Node.TEXT_NODE)r(),(l.textContent??"").split(`
|
|
48
48
|
`).forEach((a,c)=>{c>0&&(o(),r()),n+=a});else if(l.nodeType===Node.ELEMENT_NODE){const a=l;a.tagName==="BR"?(r(),ST(a)||(o(),r())):kT(a)?(o(),r(),i(a),o()):i(a)}};return i(e),o(),t.join(`
|