@larksuite/whiteboard-cli 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +52 -0
  2. package/dist/chunk.-FJK_2VA.js +1 -0
  3. package/dist/chunk.-KunFrvE.js +1 -0
  4. package/dist/chunk.B4FPRt6V.js +1 -0
  5. package/dist/chunk.B8xHLZF_.js +1 -0
  6. package/dist/chunk.BLDnd8gX.js +1 -0
  7. package/dist/chunk.BMvV5DQt.js +1 -0
  8. package/dist/chunk.BNFkGioO.js +1 -0
  9. package/dist/chunk.BVz28z0Y.js +1 -0
  10. package/dist/chunk.Bg8Ll5zR.js +1 -0
  11. package/dist/chunk.BgnRu4_B.js +1 -0
  12. package/dist/chunk.Bipt59tZ.js +1 -0
  13. package/dist/chunk.BiyCx1qi.js +1 -0
  14. package/dist/chunk.Bj92WaAy.js +1 -0
  15. package/dist/chunk.BjnKfJvw.js +1 -0
  16. package/dist/chunk.Bojb1ps8.js +1 -0
  17. package/dist/chunk.Brd3GrGK.js +1 -0
  18. package/dist/chunk.Bs73HfoF.js +1 -0
  19. package/dist/chunk.BttETcgN.js +1 -0
  20. package/dist/chunk.Bv8h1u2B.js +1 -0
  21. package/dist/chunk.ByRnTt6f.js +1 -0
  22. package/dist/chunk.CPQZqiGZ.js +1 -0
  23. package/dist/chunk.CQaz__hZ.js +1 -0
  24. package/dist/chunk.CWWXLLup.js +1 -0
  25. package/dist/chunk.CZGOZyCo.js +1 -0
  26. package/dist/chunk.CdveAgec.js +1 -0
  27. package/dist/chunk.CnZnIY-w.js +1 -0
  28. package/dist/chunk.CoIwPY7b.js +1 -0
  29. package/dist/chunk.CrWYhW1h.js +1 -0
  30. package/dist/chunk.CtItLEn_.js +1 -0
  31. package/dist/chunk.CyBEuhAR.js +1 -0
  32. package/dist/chunk.D5UiT4or.js +1 -0
  33. package/dist/chunk.D8kIYUUI.js +1 -0
  34. package/dist/chunk.DA9yp2ZC.js +1 -0
  35. package/dist/chunk.DA_UOv84.js +1 -0
  36. package/dist/chunk.DBt3dSzm.js +1 -0
  37. package/dist/chunk.DFr6dqOJ.js +1 -0
  38. package/dist/chunk.DHWxhQrI.js +1 -0
  39. package/dist/chunk.DSSMSyZs.js +1 -0
  40. package/dist/chunk.DT0s3TjO.js +1 -0
  41. package/dist/chunk.DTcdZGaQ.js +1 -0
  42. package/dist/chunk.DYq4313j.js +1 -0
  43. package/dist/chunk.DZXDwgXn.js +1 -0
  44. package/dist/chunk.Db9CFjph.js +1 -0
  45. package/dist/chunk.DbUX8Bd7.js +1 -0
  46. package/dist/chunk.Dct97cVQ.js +1 -0
  47. package/dist/chunk.DnN-wsE6.js +1 -0
  48. package/dist/chunk.DoclU709.js +1 -0
  49. package/dist/chunk.DrhHwobG.js +1 -0
  50. package/dist/chunk.DvhFMvHK.js +1 -0
  51. package/dist/chunk.Dw7NIKJC.js +1 -0
  52. package/dist/chunk.DxMkI5kB.js +1 -0
  53. package/dist/chunk.Efeac_5l.js +1 -0
  54. package/dist/chunk.HIBY9pp1.js +1 -0
  55. package/dist/chunk.XG_xX7fr.js +1 -0
  56. package/dist/chunk.Xo03ElO6.js +1 -0
  57. package/dist/chunk.ZypiRTGH.js +1 -0
  58. package/dist/chunk.c2U1xcPX.js +1 -0
  59. package/dist/chunk.gGwukLc-.js +1 -0
  60. package/dist/chunk.l0hKJN_3.js +1 -0
  61. package/dist/chunk.mOm2kyKt.js +1 -0
  62. package/dist/chunk.p9-kTvpI.js +1 -0
  63. package/dist/chunk.r5uZ6Ud_.js +1 -0
  64. package/dist/chunk.wsJv66Kg.js +1 -0
  65. package/dist/cli.js +1 -1
  66. package/dist/fonts/NotoSansSC-Regular.ttf +0 -0
  67. package/package.json +5 -3
  68. package/dist/chunk.-MNR-YEw.js +0 -1
  69. package/dist/chunk.036JIGIJ.js +0 -1
  70. package/dist/chunk.1MdQfmA7.js +0 -1
  71. package/dist/chunk.6gH6YPVZ.js +0 -1
  72. package/dist/chunk.A-5YTz2G.js +0 -1
  73. package/dist/chunk.Aa6cbEcO.js +0 -1
  74. package/dist/chunk.B-2znPrY.js +0 -1
  75. package/dist/chunk.B16ny4Wi.js +0 -1
  76. package/dist/chunk.B9MQdI8V.js +0 -1
  77. package/dist/chunk.BMjZcF-t.js +0 -1
  78. package/dist/chunk.BSShltuS.js +0 -1
  79. package/dist/chunk.BT7EsSkv.js +0 -1
  80. package/dist/chunk.BTf8izoT.js +0 -1
  81. package/dist/chunk.BUbMwUYa.js +0 -1
  82. package/dist/chunk.BatQj144.js +0 -1
  83. package/dist/chunk.Be0gk_rZ.js +0 -1
  84. package/dist/chunk.BeZL24-e.js +0 -1
  85. package/dist/chunk.BgjM0MuO.js +0 -1
  86. package/dist/chunk.BrtwnK94.js +0 -1
  87. package/dist/chunk.Bwax33JA.js +0 -1
  88. package/dist/chunk.C4jKgtuo.js +0 -1
  89. package/dist/chunk.C96tIJxK.js +0 -1
  90. package/dist/chunk.C9wcw-KV.js +0 -1
  91. package/dist/chunk.CEQMB8Aj.js +0 -1
  92. package/dist/chunk.CEVzn1et.js +0 -1
  93. package/dist/chunk.CNoFy-SE.js +0 -1
  94. package/dist/chunk.CNzLAoJw.js +0 -1
  95. package/dist/chunk.CPHHtRTj.js +0 -1
  96. package/dist/chunk.CPLIqxaH.js +0 -1
  97. package/dist/chunk.CSnwQoPY.js +0 -1
  98. package/dist/chunk.CYOjTk4R.js +0 -1
  99. package/dist/chunk.CaOQq6Kk.js +0 -1
  100. package/dist/chunk.CauP6Slq.js +0 -1
  101. package/dist/chunk.Cb8kIxhb.js +0 -1
  102. package/dist/chunk.CeXpNlzn.js +0 -1
  103. package/dist/chunk.Ch-nu2QN.js +0 -1
  104. package/dist/chunk.CxsUFJNC.js +0 -1
  105. package/dist/chunk.CyPL9PLz.js +0 -1
  106. package/dist/chunk.Cz8SOoPX.js +0 -1
  107. package/dist/chunk.D2_pVdGR.js +0 -1
  108. package/dist/chunk.D3WtiqTp.js +0 -1
  109. package/dist/chunk.D44rcLgy.js +0 -1
  110. package/dist/chunk.DC5TbUff.js +0 -1
  111. package/dist/chunk.DFnkK54C.js +0 -1
  112. package/dist/chunk.DS9BUhkq.js +0 -1
  113. package/dist/chunk.DU5zEu7n.js +0 -1
  114. package/dist/chunk.DUYap5FG.js +0 -1
  115. package/dist/chunk.DmEjQVmS.js +0 -1
  116. package/dist/chunk.DySm15CX.js +0 -1
  117. package/dist/chunk.KJXtTP3q.js +0 -1
  118. package/dist/chunk.KfQZbmEA.js +0 -1
  119. package/dist/chunk.ONVOCVWs.js +0 -1
  120. package/dist/chunk.PaQ6hAhA.js +0 -1
  121. package/dist/chunk.Rds_wM04.js +0 -1
  122. package/dist/chunk.WlCfe-vq.js +0 -1
  123. package/dist/chunk.YPrv_cKM.js +0 -1
  124. package/dist/chunk.b0n18req.js +0 -1
  125. package/dist/chunk.bc8CGCVq.js +0 -1
  126. package/dist/chunk.fQVpu1E6.js +0 -1
  127. package/dist/chunk.kSPve681.js +0 -1
  128. package/dist/chunk.m7m1Q8WW.js +0 -1
  129. package/dist/chunk.mGbj7P80.js +0 -1
  130. package/dist/chunk.nEn2oqsP.js +0 -1
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # @larksuite/whiteboard-cli
2
+
3
+ Headless whiteboard engine CLI — render auto-layout DSL JSON or Mermaid diagrams to PNG.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @larksuite/whiteboard-cli
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ # Render from DSL JSON
15
+ whiteboard-cli -i diagram.json -o diagram.png
16
+
17
+ # Render from Mermaid
18
+ whiteboard-cli -i flowchart.mmd -o flowchart.png
19
+
20
+ # From stdin
21
+ echo '{"version":2,"nodes":[{"type":"rect","width":200,"height":100,"text":"Hello"}]}' \
22
+ | whiteboard-cli --output hello.png
23
+
24
+ # Export layout coordinates (for two-stage rendering)
25
+ whiteboard-cli -i diagram.json -o diagram.png -l coords.json
26
+ ```
27
+
28
+ ## Options
29
+
30
+ | Option | Description |
31
+ |--------|-------------|
32
+ | `-i, --input <path>` | Input path (reads from stdin if omitted), automatically detects format |
33
+ | `-o, --output <path>` | Output path for main product |
34
+ | `-f, --from <type>` | Force input format: `dsl` or `mermaid` |
35
+ | `-t, --to <type>` | Main product type: `image` (default) or `openapi` |
36
+ | `-s, --scale <num>` | Pixel density scale factor (default: `2`), only valid for `-t image` |
37
+ | `-l, --layout <file>` | Output computed layout coordinates to JSON file |
38
+ | `-F, --format <type>` | Delivery format: `json` (default), `ndjson`, or `data` |
39
+ | `-b, --base64` | Return Base64 string for image output, only valid for `-t image` |
40
+ | `-d, --dry-run` | Dry run mode: validate and layout, but skip rendering/writing |
41
+ | `-V, --verbose` | Verbose logging to stderr |
42
+ | `-v, --version` | Show version information |
43
+ | `-h, --help` | Show help |
44
+
45
+ ## System Requirements
46
+
47
+ - **Node.js** >= 18
48
+
49
+ ## License
50
+
51
+ This software is licensed under the **@larksuite/whiteboard-cli license**.
52
+ See the [LICENSE](https://www.npmjs.com/package/@larksuite/whiteboard-cli?activeTab=code) file and [THIRD-PARTY-LICENSES.md](https://www.npmjs.com/package/@larksuite/whiteboard-cli?activeTab=code) included in the package for full terms, conditions, and third-party notices.
@@ -0,0 +1 @@
1
+ (function(b,c){const r=f,d=b();while(!![]){try{const i=parseInt(r(0x160))/0x1+parseInt(r(0x159))/0x2*(parseInt(r(0x15a))/0x3)+-parseInt(r(0x172))/0x4*(parseInt(r(0x16e))/0x5)+parseInt(r(0x161))/0x6+-parseInt(r(0x15f))/0x7+-parseInt(r(0x165))/0x8+-parseInt(r(0x171))/0x9;if(i===c)break;else d['push'](d['shift']());}catch(j){d['push'](d['shift']());}}}(e,0xd207e));function f(a,b){a=a-0x154;const c=e();let d=c[a];return d;}let g=function(i){const w=f,j=(function(){let m=!![];return function(n,o){const p=m?function(){const s=f;if(o){const q=o[s(0x156)](n,arguments);return o=null,q;}}:function(){};return m=![],p;};}()),k=j(this,function(){const t=f;return k[t(0x167)]()[t(0x154)](t(0x15c))[t(0x167)]()[t(0x162)](k)[t(0x154)](t(0x15c));});k();const l=(function(){let m=!![];return function(n,o){const p=m?function(){const u=f;if(o){const q=o[u(0x156)](n,arguments);return o=null,q;}}:function(){};return m=![],p;};}());return(function(){l(this,function(){const v=f,m=new RegExp(v(0x170)),n=new RegExp(v(0x16a),'i'),o=h(v(0x166));!m[v(0x16d)](o+v(0x169))||!n[v(0x16d)](o+v(0x164))?o('0'):h();})();}()),(i[i[w(0x16f)]=0x0]=w(0x16f),i[i[w(0x15e)]=0x1]=w(0x15e),i[i[w(0x163)]=0x2]=w(0x163),i);}({});function e(){const y=['gger','action','66WVKTcu','118011HgHkjT','while\x20(true)\x20{}','(((.+)+)+)+$','length','AUTO_HEIGHT','6689606oNnQdD','659700wChmvh','9264144YllJgj','constructor','FIXED','input','1067864zOycFC','init','toString','counter','chain','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','call','debu','test','5FpaACo','AUTO_WIDTH','function\x20*\x5c(\x20*\x5c)','6357789LAWqDT','3383988yanCtr','stateObject','search','string','apply'];e=function(){return y;};return e();}export{g as SizeModeEnum};function h(b){function c(d){const x=f;if(typeof d===x(0x155))return function(i){}[x(0x162)](x(0x15b))[x(0x156)](x(0x168));else(''+d/d)[x(0x15d)]!==0x1||d%0x14===0x0?function(){return!![];}[x(0x162)](x(0x16c)+x(0x157))[x(0x16b)](x(0x158)):function(){return![];}[x(0x162)](x(0x16c)+x(0x157))[x(0x156)](x(0x173));c(++d);}try{if(b)return c;else c(0x0);}catch(d){}}
@@ -0,0 +1 @@
1
+ var H=h;(function(w,x){var B=h,y=w();while(!![]){try{var z=-parseInt(B(0x210))/0x1+-parseInt(B(0x20d))/0x2+parseInt(B(0x203))/0x3+-parseInt(B(0x1f8))/0x4+-parseInt(B(0x20e))/0x5*(-parseInt(B(0x201))/0x6)+parseInt(B(0x1f2))/0x7*(-parseInt(B(0x1f6))/0x8)+-parseInt(B(0x208))/0x9*(-parseInt(B(0x206))/0xa);if(z===x)break;else y['push'](y['shift']());}catch(A){y['push'](y['shift']());}}}(g,0x798cb));var i=(function(){var w=!![];return function(x,y){var z=w?function(){var C=h;if(y){var A=y[C(0x1ff)](x,arguments);return y=null,A;}}:function(){};return w=![],z;};}()),j=i(this,function(){var D=h;return j[D(0x20b)]()[D(0x1fb)](D(0x205))[D(0x20b)]()[D(0x1fa)](j)[D(0x1fb)](D(0x205));});j();var k=(function(){var w=!![];return function(x,y){var z=w?function(){var E=h;if(y){var A=y[E(0x1ff)](x,arguments);return y=null,A;}}:function(){};return w=![],z;};}());(function(){k(this,function(){var F=h,w=new RegExp(F(0x1f3)),x=new RegExp(F(0x209),'i'),y=v(F(0x207));!w[F(0x1f7)](y+F(0x20f))||!x[F(0x1f7)](y+F(0x1f9))?y('0'):v();})();}());import{U as l,V as m,B as n,M as p}from'./chunk.c2U1xcPX.js';function g(){var J=['chain','976135xhBELx','call','35WJSVLk','function\x20*\x5c(\x20*\x5c)','state','gger','935512yADinr','test','2251088WGJnri','input','constructor','search','debu','arrowMarkerAbsolute','string','apply','length','636ccypRk','stateObject','622359kPKWNp','while\x20(true)\x20{}','(((.+)+)+)+$','220aVSbnM','init','998784PffBrU','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','counter','toString','action','1449448tdJfWR','32890lKQZjl'];g=function(){return J;};return g();}function h(a,b){a=a-0x1f1;var c=g();var d=c[a];return d;}import{k as q}from'./chunk.BMvV5DQt.js';import'./chunk.mOm2kyKt.js';import'./chunk.CPQZqiGZ.js';var u={'parser':n,get 'db'(){return new p(0x2);},'renderer':m,'styles':l,'init':q(w=>{var G=h;w[G(0x1f4)]||(w[G(0x1f4)]={}),w[G(0x1f4)][G(0x1fd)]=w[G(0x1fd)];},H(0x207))};export{u as diagram};function v(w){function x(z){var I=h;if(typeof z===I(0x1fe))return function(A){}[I(0x1fa)](I(0x204))[I(0x1ff)](I(0x20a));else(''+z/z)[I(0x200)]!==0x1||z%0x14===0x0?function(){return!![];}[I(0x1fa)](I(0x1fc)+I(0x1f5))[I(0x1f1)](I(0x20c)):function(){return![];}[I(0x1fa)](I(0x1fc)+I(0x1f5))[I(0x1ff)](I(0x202));x(++z);}try{if(w)return x;else x(0x0);}catch(z){}}
@@ -0,0 +1 @@
1
+ var B=f;(function(o,p){var v=f,q=o();while(!![]){try{var s=parseInt(v(0x1af))/0x1+-parseInt(v(0x1be))/0x2+-parseInt(v(0x1bc))/0x3+-parseInt(v(0x1a8))/0x4*(parseInt(v(0x1c2))/0x5)+-parseInt(v(0x1a5))/0x6*(parseInt(v(0x1b0))/0x7)+parseInt(v(0x1b2))/0x8*(-parseInt(v(0x1b5))/0x9)+parseInt(v(0x1a3))/0xa;if(s===p)break;else q['push'](q['shift']());}catch(u){q['push'](q['shift']());}}}(e,0x9852b));var g=(function(){var o=!![];return function(p,q){var s=o?function(){var w=f;if(q){var u=q[w(0x1a9)](p,arguments);return q=null,u;}}:function(){};return o=![],s;};}()),h=g(this,function(){var x=f;return h[x(0x1c3)]()[x(0x1b7)](x(0x1b1))[x(0x1c3)]()[x(0x1bb)](h)[x(0x1b7)](x(0x1b1));});function e(){var E=['while\x20(true)\x20{}','stateObject','constructor','2687808wZLKSJ','counter','351918omYfmX','call','debu','action','635bKZjCS','toString','30843240WIprzH','length','14634geVKsh','gger','string','38092HLCTKt','apply','init','test','records','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','ImperativeState','214737XJuSab','735oNdZaE','(((.+)+)+)+$','6520sRPvdd','chain','function\x20*\x5c(\x20*\x5c)','1521kvgypD','input','search','reset'];e=function(){return E;};return e();}h();var j=(function(){var o=!![];return function(p,q){var s=o?function(){var y=f;if(q){var u=q[y(0x1a9)](p,arguments);return q=null,u;}}:function(){};return o=![],s;};}());(function(){j(this,function(){var z=f,o=new RegExp(z(0x1b4)),p=new RegExp(z(0x1ad),'i'),q=n(z(0x1aa));!o[z(0x1ab)](q+z(0x1b3))||!p[z(0x1ab)](q+z(0x1b6))?q('0'):n();})();}());import{k}from'./chunk.BMvV5DQt.js';var l,m=(k(l=class{constructor(o){var A=f;this[A(0x1aa)]=o,this[A(0x1ac)]=this[A(0x1aa)]();}[B(0x1b8)](){var C=B;this[C(0x1ac)]=this[C(0x1aa)]();}},B(0x1ae)),l);export{m as e};function f(a,b){a=a-0x1a3;var c=e();var d=c[a];return d;}function n(o){function p(q){var D=f;if(typeof q===D(0x1a7))return function(s){}[D(0x1bb)](D(0x1b9))[D(0x1a9)](D(0x1bd));else(''+q/q)[D(0x1a4)]!==0x1||q%0x14===0x0?function(){return!![];}[D(0x1bb)](D(0x1c0)+D(0x1a6))[D(0x1bf)](D(0x1c1)):function(){return![];}[D(0x1bb)](D(0x1c0)+D(0x1a6))[D(0x1a9)](D(0x1ba));p(++q);}try{if(o)return p;else p(0x0);}catch(q){}}
@@ -0,0 +1 @@
1
+ var U=m;function m(a,b){a=a-0x135;var c=j();var d=c[a];return d;}(function(J,K){var O=m,L=J();while(!![]){try{var M=parseInt(O(0x13f))/0x1+-parseInt(O(0x151))/0x2+-parseInt(O(0x135))/0x3+parseInt(O(0x13b))/0x4*(-parseInt(O(0x13c))/0x5)+parseInt(O(0x155))/0x6+parseInt(O(0x147))/0x7*(-parseInt(O(0x157))/0x8)+parseInt(O(0x145))/0x9;if(M===K)break;else L['push'](L['shift']());}catch(N){L['push'](L['shift']());}}}(j,0x2788c));function j(){var X=['8aUAflg','string','885951oxBisw','action','length','chain','stateObject','init','979372nWBJmZ','5fmnzmc','debu','register','213344hSbFdP','ServiceRegistry','gger','search','apply','TokenBuilder','6453450pBpltl','test','1689156cySTTN','(((.+)+)+)+$','toString','while\x20(true)\x20{}','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','counter','RadarTokenBuilder','createRadarServices','radar-beta','call','52472DpOCXj','ValueConverter','constructor','input','235452UbcIxa','function\x20*\x5c(\x20*\x5c)'];j=function(){return X;};return j();}var p=(function(){var J=!![];return function(K,L){var M=J?function(){var P=m;if(L){var N=L[P(0x143)](K,arguments);return L=null,N;}}:function(){};return J=![],M;};}()),q=p(this,function(){var Q=m;return q[Q(0x149)]()[Q(0x142)](Q(0x148))[Q(0x149)]()[Q(0x153)](q)[Q(0x142)](Q(0x148));});q();var v=(function(){var J=!![];return function(K,L){var M=J?function(){var R=m;if(L){var N=L[R(0x143)](K,arguments);return L=null,N;}}:function(){};return J=![],M;};}());(function(){v(this,function(){var S=m,J=new RegExp(S(0x156)),K=new RegExp(S(0x14b),'i'),L=I(S(0x13a));!J[S(0x146)](L+S(0x138))||!K[S(0x146)](L+S(0x154))?L('0'):I();})();}());import{z as w,q as x,a,K as y,W as z,M as A,V as B,b as C,C as D}from'./chunk.DoclU709.js';import'./chunk.BMvV5DQt.js';import'./chunk.CoIwPY7b.js';var E,F=(a(E=class extends D{constructor(){var T=m;super([T(0x14f)]);}},U(0x14d)),E),G={'parser':{'TokenBuilder':a(()=>new F(),U(0x144)),'ValueConverter':a(()=>new C(),U(0x152))}};function H(J=w){var V=U;const K=x(B(J),A),L=x(z({'shared':K}),y,G);return K[V(0x140)][V(0x13e)](L),{'shared':K,'Radar':L};}a(H,U(0x14e));export{G as RadarModule,H as createRadarServices};function I(J){function K(L){var W=m;if(typeof L===W(0x158))return function(M){}[W(0x153)](W(0x14a))[W(0x143)](W(0x14c));else(''+L/L)[W(0x137)]!==0x1||L%0x14===0x0?function(){return!![];}[W(0x153)](W(0x13d)+W(0x141))[W(0x150)](W(0x136)):function(){return![];}[W(0x153)](W(0x13d)+W(0x141))[W(0x143)](W(0x139));K(++L);}try{if(J)return K;else K(0x0);}catch(L){}}
@@ -0,0 +1 @@
1
+ const Z=h;(function(x,y){const U=h,z=x();while(!![]){try{const A=parseInt(U(0x9f))/0x1+-parseInt(U(0xaf))/0x2*(parseInt(U(0xa4))/0x3)+parseInt(U(0xb6))/0x4*(parseInt(U(0x99))/0x5)+parseInt(U(0xa0))/0x6*(parseInt(U(0xd5))/0x7)+-parseInt(U(0xbe))/0x8+parseInt(U(0x95))/0x9+parseInt(U(0x9d))/0xa;if(A===y)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(g,0xe1ea6));const i=(function(){let x=!![];return function(y,z){const A=x?function(){const V=h;if(z){const B=z[V(0x9e)](y,arguments);return z=null,B;}}:function(){};return x=![],A;};}()),j=i(this,function(){const W=h;return j[W(0xab)]()[W(0xcf)](W(0xdb))[W(0xab)]()[W(0xa8)](j)[W(0xcf)](W(0xdb));});j();function g(){const af=['chain','forEach','getContext','height','getAllNodes','cache','exportToImageData','8137120yVkfnu','drawOnGLCtx','restoreNodeScale','set','getImageData','clearMindMapLineForExport','gger','input','getRectNode','while\x20(true)\x20{}','maxExportPixelSize','width','save','ceil','init','minX','sqrt','search','drawNodes','restoreMindMapLineForExport','getConfig','overrideNodeScale','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','2866003TtMqoB','sortGraphicsV2','debu','length','test','call','(((.+)+)+)+$','push','from','changedMindMaps','scale','getValidScale','restore','drawTitle','currentScale','Section','fillRect','counter','searchNodes','5625108pVbNiz','map','afterScale','type','185xjcYMh','getNodesImageOffscreenCanvas','canvas','getImageOffscreenCanvas','659740MhoIXr','apply','422226toawOp','12dAqhaN','action','toBlob','beforeDrawNodes','1682247rfyfGv','getPadding','function\x20*\x5c(\x20*\x5c)','fillStyle','constructor','Failed\x20to\x20get\x202D\x20context\x20from\x20canvas','getBounds','toString','exportToImageBlob','maxY','stateObject','2DifNhL','maxX','translate','createElement','children','minY','string','61748UBxUxE'];g=function(){return af;};return g();}const k=(function(){let x=!![];return function(y,z){const A=x?function(){const X=h;if(z){const B=z[X(0x9e)](y,arguments);return z=null,B;}}:function(){};return x=![],A;};}());(function(){k(this,function(){const Y=h,x=new RegExp(Y(0xa6)),y=new RegExp(Y(0xd4),'i'),z=w(Y(0xcc));!x[Y(0xd9)](z+Y(0xb7))||!y[Y(0xd9)](z+Y(0xc5))?z('0'):w();})();}());import{G as l}from'./chunk.wsJv66Kg.js';import{M as m,R as p,r,a as q,G as u}from'./chunk.DBt3dSzm.js';import'./chunk.DT0s3TjO.js';import'./chunk.-FJK_2VA.js';import'./chunk.DvhFMvHK.js';function h(a,b){a=a-0x89;const c=g();let d=c[a];return d;}class v{[Z(0x8b)]=[];[Z(0x8d)](x,y){const a0=Z,z=Math[a0(0xcb)](x[a0(0xb0)]-x[a0(0xcd)]),A=Math[a0(0xcb)](x[a0(0xad)]-x[a0(0xb4)]),B=l[a0(0xd2)]()[a0(0xc8)];return z*A*y*y<B?y:Math[a0(0xce)](B/(z*A));}[Z(0xa3)](x){const a1=Z;this[a1(0x8b)]=m[a1(0xc3)](x);}[Z(0xbb)](x){const a2=Z,y=[];return x[a2(0xb8)](z=>{const a3=a2;y[a3(0x89)](z),z[a3(0xb3)]?.[a3(0xd8)]&&y[a3(0x89)](...this[a3(0xbb)](z[a3(0xb3)]));}),y;}[Z(0xd0)](x,y,z){const a4=Z,A=this[a4(0xbb)](x),B=Array[a4(0x8a)](new Set(A)),C=p[a4(0xd6)](B),D=this[a4(0xd3)](B,z);try{const E=[];C[a4(0xb8)](F=>{const a5=a4;F[a5(0xbf)](y),F[a5(0x98)]===r[a5(0x91)]&&E[a5(0x89)](F);}),E[a4(0xb8)](F=>F[a4(0x8f)](y));}finally{this[a4(0xc0)](D),m[a4(0xd1)](this[a4(0x8b)]);}}[Z(0xd3)](x,y){const a6=Z,z=new Map();return x[a6(0xb8)](A=>{const a7=a6;z[a7(0xc1)](A,A[a7(0x90)]),A[a7(0x97)](y);}),z;}[Z(0xc0)](x){const a8=Z;x[a8(0xb8)]((y,z)=>{const a9=a8;z[a9(0x97)](y);});}[Z(0x9a)](y,z,A='',B=[]){const aa=Z;this[aa(0xa3)](y);const C=document[aa(0xb2)](aa(0x9b)),D=this[aa(0xbb)](y)[aa(0x96)](T=>T[aa(0xc6)]()),E=q[aa(0xaa)](D,aa(0xbc)),{topPadding:F,leftPadding:G,rightPadding:H,bottomPadding:I}=u[aa(0xa5)](B),J=E[aa(0xb0)]+H,K=E[aa(0xcd)]-G,L=E[aa(0xad)]+I,O=E[aa(0xb4)]-F,P=J-K,Q=L-O,R=this[aa(0x8d)]({'id':'','minX':K,'maxX':J,'minY':O,'maxY':L},z);C[aa(0xc9)]=R*P,C[aa(0xba)]=R*Q;const S=C[aa(0xb9)]('2d');if(!S)throw new Error(aa(0xa9));return S[aa(0x8c)](R,R),S[aa(0xb1)](-K,-O),A&&(S[aa(0xca)](),S[aa(0xa7)]=A,S[aa(0x92)](K,O,P,Q),S[aa(0x8e)]()),this[aa(0xd0)](y,S,R),C;}[Z(0x9c)](x,y,z,A=''){const ab=Z,B=document[ab(0xb2)](ab(0x9b)),{minX:C,maxY:D,minY:E,maxX:F}=y,G=F-C,H=D-E,I=x[ab(0x94)](C,E,F,D),J=this[ab(0x8d)]({'id':'','minX':C,'maxX':F,'minY':E,'maxY':D},z);this[ab(0xa3)](I),B[ab(0xc9)]=J*G,B[ab(0xba)]=J*H;const K=B[ab(0xb9)]('2d');if(!K)throw new Error(ab(0xa9));return K[ab(0x8c)](J,J),K[ab(0xb1)](-C,-E),A&&(K[ab(0xca)](),K[ab(0xa7)]=A,K[ab(0x92)](C,E,G,H),K[ab(0x8e)]()),this[ab(0xd0)](I,K,J),B;}[Z(0xac)](x,y,z,A=''){return new Promise(B=>{const ac=h;this[ac(0x9c)](x,y,z,A)[ac(0xa2)](C=>{B(C);});});}[Z(0xbd)](x,y,z,A=''){const ad=Z,{minX:B,maxY:C,minY:D,maxX:E}=y,F=E-B,G=C-D,H=this[ad(0x9c)](x,y,z,A)[ad(0xb9)]('2d');if(!H)throw new Error(ad(0xa9));return H[ad(0xc2)](0x0,0x0,F,G);}}export{v as ExportImageWorker};function w(x){function z(A){const ae=h;if(typeof A===ae(0xb5))return function(B){}[ae(0xa8)](ae(0xc7))[ae(0x9e)](ae(0x93));else(''+A/A)[ae(0xd8)]!==0x1||A%0x14===0x0?function(){return!![];}[ae(0xa8)](ae(0xd7)+ae(0xc4))[ae(0xda)](ae(0xa1)):function(){return![];}[ae(0xa8)](ae(0xd7)+ae(0xc4))[ae(0x9e)](ae(0xae));z(++A);}try{if(x)return z;else z(0x0);}catch(A){}}