commandmate 0.3.5 → 0.4.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.
Files changed (161) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +19 -23
  3. package/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/cache/config.json +3 -3
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/1.pack +0 -0
  9. package/.next/cache/webpack/client-production/2.pack +0 -0
  10. package/.next/cache/webpack/client-production/index.pack +0 -0
  11. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  12. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  13. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  14. package/.next/cache/webpack/server-production/0.pack +0 -0
  15. package/.next/cache/webpack/server-production/index.pack +0 -0
  16. package/.next/next-server.js.nft.json +1 -1
  17. package/.next/prerender-manifest.json +1 -1
  18. package/.next/react-loadable-manifest.json +69 -55
  19. package/.next/required-server-files.json +1 -1
  20. package/.next/server/app/_not-found/page.js +1 -1
  21. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  22. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/app/update-check/route.js +1 -1
  24. package/.next/server/app/api/repositories/clone/route.js +1 -1
  25. package/.next/server/app/api/repositories/route.js +8 -8
  26. package/.next/server/app/api/repositories/scan/route.js +1 -1
  27. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -2
  28. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  29. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  30. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  31. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  32. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  33. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  34. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  35. package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
  36. package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
  37. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  38. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  39. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  40. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js +1 -1
  41. package/.next/server/app/api/worktrees/route.js +1 -1
  42. package/.next/server/app/login/page.js +1 -1
  43. package/.next/server/app/login/page.js.nft.json +1 -1
  44. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  45. package/.next/server/app/page.js +3 -3
  46. package/.next/server/app/page.js.nft.json +1 -1
  47. package/.next/server/app/page_client-reference-manifest.js +1 -1
  48. package/.next/server/app/proxy/[...path]/route.js +4 -4
  49. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +1 -1
  50. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
  51. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/worktrees/[id]/page.js +6 -6
  53. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  54. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/worktrees/[id]/terminal/page.js +2 -4
  56. package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
  57. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app-paths-manifest.json +8 -8
  59. package/.next/server/chunks/{3294.js → 1628.js} +3 -3
  60. package/.next/server/chunks/185.js +36 -0
  61. package/.next/server/chunks/3860.js +1 -1
  62. package/.next/server/chunks/4893.js +2 -2
  63. package/.next/server/chunks/4952.js +1 -1
  64. package/.next/server/chunks/5488.js +6 -6
  65. package/.next/server/chunks/7425.js +34 -31
  66. package/.next/server/chunks/7566.js +2 -2
  67. package/.next/server/chunks/8199.js +1 -0
  68. package/.next/server/chunks/8585.js +1 -1
  69. package/.next/server/chunks/8693.js +1 -1
  70. package/.next/server/middleware-build-manifest.js +1 -1
  71. package/.next/server/middleware-manifest.json +5 -5
  72. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  73. package/.next/server/pages/500.html +1 -1
  74. package/.next/server/server-reference-manifest.json +1 -1
  75. package/.next/static/chunks/12-00c528d46a0a0a1d.js +1 -0
  76. package/.next/static/chunks/{13.feeafc7cc620f8c4.js → 13.b9521543496f4468.js} +1 -1
  77. package/.next/static/chunks/1334.bfedf44ee9fe2761.js +1 -0
  78. package/.next/static/chunks/143.eb6b4671490cd223.js +1 -0
  79. package/.next/static/chunks/{3574.7a94c27e6a496a56.js → 1442.74b5f4de9a4b4e1b.js} +1 -1
  80. package/.next/static/chunks/2083-b5bed0c77cc53281.js +1 -0
  81. package/.next/static/chunks/2725.eb2d236c8030711c.js +1 -0
  82. package/.next/static/chunks/3398-3d40a17387bd554b.js +1 -0
  83. package/.next/static/chunks/3516.3c576047408cae6b.js +1 -0
  84. package/.next/static/chunks/3559.422c6ca760b85750.js +1 -0
  85. package/.next/static/chunks/3956.52c5b9a0071a641d.js +1 -0
  86. package/.next/static/chunks/4012.32b576a4fa621774.js +1 -0
  87. package/.next/static/chunks/4212.e7ba1009bc1da62d.js +131 -0
  88. package/.next/static/chunks/4303.caf91e86105d5e70.js +1 -0
  89. package/.next/static/chunks/4327.4dcda9b6fab6a385.js +82 -0
  90. package/.next/static/chunks/4671.d86d21d0dfdace41.js +1 -0
  91. package/.next/static/chunks/5518.ec88dcb5a27b17fe.js +1 -0
  92. package/.next/static/chunks/6434.08d262283371d333.js +1 -0
  93. package/.next/static/chunks/{656.5e2de0173f5a06bd.js → 656.dc26b973d07d9627.js} +5 -5
  94. package/.next/static/chunks/7119.01777af21b55740c.js +1 -0
  95. package/.next/static/chunks/7293.fb88bb102af4aa04.js +1 -0
  96. package/.next/static/chunks/8913-40625650292eb3d0.js +1 -0
  97. package/.next/static/chunks/8977.fc18b8260cd8bc1f.js +1 -0
  98. package/.next/static/chunks/9552.d959149efd41e84b.js +1 -0
  99. package/.next/static/chunks/app/layout-7198a7a49aa21a97.js +1 -0
  100. package/.next/static/chunks/app/page-7498cf75e69d9227.js +1 -0
  101. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-0599f64a8e80d255.js +1 -0
  102. package/.next/static/chunks/app/worktrees/[id]/page-94ad7a1ce1f0c440.js +1 -0
  103. package/.next/static/chunks/app/worktrees/[id]/terminal/page-175b618c047bc992.js +1 -0
  104. package/.next/static/chunks/d3ac728e.daf595a898e9b720.js +1 -0
  105. package/.next/static/chunks/webpack-f7111aab807d73b9.js +1 -0
  106. package/.next/static/css/f7dc01350168df01.css +3 -0
  107. package/.next/trace +5 -5
  108. package/README.md +66 -56
  109. package/dist/server/server.js +5 -0
  110. package/dist/server/src/lib/auto-yes-manager.js +58 -18
  111. package/dist/server/src/lib/claude-session.js +9 -3
  112. package/dist/server/src/lib/cli-session.js +60 -10
  113. package/dist/server/src/lib/cli-tools/codex.js +7 -7
  114. package/dist/server/src/lib/cli-tools/gemini.js +3 -0
  115. package/dist/server/src/lib/cli-tools/opencode-config.js +179 -33
  116. package/dist/server/src/lib/cli-tools/opencode.js +5 -0
  117. package/dist/server/src/lib/cli-tools/vibe-local.js +3 -0
  118. package/dist/server/src/lib/cmate-parser.js +7 -7
  119. package/dist/server/src/lib/db-migrations.js +18 -1
  120. package/dist/server/src/lib/errors.js +153 -0
  121. package/dist/server/src/lib/prompt-answer-sender.js +3 -0
  122. package/dist/server/src/lib/prompt-detector.js +49 -7
  123. package/dist/server/src/lib/resource-cleanup.js +257 -0
  124. package/dist/server/src/lib/schedule-manager.js +269 -83
  125. package/dist/server/src/lib/tmux-capture-cache.js +221 -0
  126. package/dist/server/src/lib/tmux.js +41 -20
  127. package/dist/server/src/types/markdown-editor.js +9 -1
  128. package/package.json +11 -8
  129. package/.next/server/chunks/539.js +0 -35
  130. package/.next/server/chunks/7458.js +0 -1
  131. package/.next/server/chunks/7808.js +0 -1
  132. package/.next/static/chunks/1038-3509435b68c0967e.js +0 -1
  133. package/.next/static/chunks/1098.49268c9fe1b028fa.js +0 -1
  134. package/.next/static/chunks/2335-98a211e00b94c7ac.js +0 -1
  135. package/.next/static/chunks/3559.f073f72c4466ce0e.js +0 -1
  136. package/.next/static/chunks/3843.3fdda732987f7bb8.js +0 -1
  137. package/.next/static/chunks/4212.52c1bb34fc97d0d0.js +0 -131
  138. package/.next/static/chunks/4327.157a4c226d919531.js +0 -60
  139. package/.next/static/chunks/4362.7bd6f0282e49d79b.js +0 -1
  140. package/.next/static/chunks/4721.40615a5f4f32b5fb.js +0 -1
  141. package/.next/static/chunks/5112.17318d1c6b28044b.js +0 -1
  142. package/.next/static/chunks/6406.9653f0d41ab85059.js +0 -1
  143. package/.next/static/chunks/6792.3c01ac4dda4b5c6d.js +0 -1
  144. package/.next/static/chunks/8091-d65d2ab6daed23c6.js +0 -1
  145. package/.next/static/chunks/8125.245a9df052d274fb.js +0 -1
  146. package/.next/static/chunks/8522.1607e96011c66877.js +0 -1
  147. package/.next/static/chunks/8841.dadeb1ece8e46004.js +0 -1
  148. package/.next/static/chunks/8885.f8d9912b40d74811.js +0 -1
  149. package/.next/static/chunks/9178-88850a7c48deea07.js +0 -1
  150. package/.next/static/chunks/9552.b7dfb7903ead934b.js +0 -1
  151. package/.next/static/chunks/app/layout-9110f9a5e41c6bf4.js +0 -1
  152. package/.next/static/chunks/app/page-9e523a8f415bc707.js +0 -1
  153. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-4a3c0861367e0391.js +0 -1
  154. package/.next/static/chunks/app/worktrees/[id]/page-8fb4dc30b58a5681.js +0 -1
  155. package/.next/static/chunks/app/worktrees/[id]/terminal/page-5d85a7e508ce36d3.js +0 -1
  156. package/.next/static/chunks/d3ac728e.6c9c508274d4d2d5.js +0 -1
  157. package/.next/static/chunks/webpack-81c97591dd5567ac.js +0 -1
  158. package/.next/static/css/45b3a41370668314.css +0 -3
  159. /package/.next/static/chunks/{30d07d85-393352a92199f695.js → 30d07d85.1dc99a921fc18e34.js} +0 -0
  160. /package/.next/static/{p3hosTZoJ22r35fWwUoLr → dwGMLEU53HOvFOWqiZOT0}/_buildManifest.js +0 -0
  161. /package/.next/static/{p3hosTZoJ22r35fWwUoLr → dwGMLEU53HOvFOWqiZOT0}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7119],{97119:function(e,r,t){t.d(r,{diagram:function(){return p}});var n=t(96257),a=t(34960),s=t(55166),i=t(31954),d=t(54327),o={parse:(0,i.eW)(async e=>{let r=await (0,d.Qc)("info",e);i.cM.debug(r)},"parse")},c={version:n.X.version+""},p={parser:o,db:{getVersion:(0,i.eW)(()=>c.version,"getVersion")},renderer:{draw:(0,i.eW)((e,r,t)=>{i.cM.debug("rendering info diagram\n"+e);let n=(0,a.P)(r);(0,s.v2)(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${t}`)},"draw")}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7293],{25770:function(n,t,r){r.d(t,{Z:function(){return o}});var e=r(98721);function u(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new e.Z;++t<r;)this.add(n[t])}u.prototype.add=u.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},u.prototype.has=function(n){return this.__data__.has(n)};var o=u},64364:function(n,t){t.Z=function(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&!1!==t(n[r],r,n););return n}},84168:function(n,t){t.Z=function(n,t){for(var r=-1,e=null==n?0:n.length,u=0,o=[];++r<e;){var c=n[r];t(c,r,n)&&(o[u++]=c)}return o}},88576:function(n,t,r){var e=r(75763);t.Z=function(n,t){return!!(null==n?0:n.length)&&(0,e.Z)(n,t,0)>-1}},30985:function(n,t){t.Z=function(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}},80659:function(n,t){t.Z=function(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}},36366:function(n,t){t.Z=function(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}},77395:function(n,t){t.Z=function(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}},13606:function(n,t,r){r.d(t,{Z:function(){return R}});var e=r(8883),u=r(64364),o=r(54646),c=r(66554),i=r(47799),f=r(49625),a=r(36686),Z=r(63783),l=r(35038),v=r(66443),b=r(1782),s=r(41879),j=r(68748),p=Object.prototype.hasOwnProperty,h=function(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&p.call(n,"index")&&(r.index=n.index,r.input=n.input),r},y=r(15403),d=function(n,t){var r=t?(0,y.Z)(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)},g=/\w*$/,w=function(n){var t=new n.constructor(n.source,g.exec(n));return t.lastIndex=n.lastIndex,t},_=r(40856),A=_.Z?_.Z.prototype:void 0,O=A?A.valueOf:void 0,m=r(76399),S=function(n,t,r){var e=n.constructor;switch(t){case"[object ArrayBuffer]":return(0,y.Z)(n);case"[object Boolean]":case"[object Date]":return new e(+n);case"[object DataView]":return d(n,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,m.Z)(n,r);case"[object Map]":case"[object Set]":return new e;case"[object Number]":case"[object String]":return new e(n);case"[object RegExp]":return w(n);case"[object Symbol]":return O?Object(O.call(n)):{}}},k=r(51700),E=r(28070),x=r(23605),I=r(82370),U=r(65832),B=r(94914),C=B.Z&&B.Z.isMap,D=C?(0,U.Z)(C):function(n){return(0,I.Z)(n)&&"[object Map]"==(0,j.Z)(n)},F=r(7632),M=B.Z&&B.Z.isSet,z=M?(0,U.Z)(M):function(n){return(0,I.Z)(n)&&"[object Set]"==(0,j.Z)(n)},L="[object Arguments]",N="[object Function]",P="[object Object]",$={};$[L]=$["[object Array]"]=$["[object ArrayBuffer]"]=$["[object DataView]"]=$["[object Boolean]"]=$["[object Date]"]=$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Map]"]=$["[object Number]"]=$[P]=$["[object RegExp]"]=$["[object Set]"]=$["[object String]"]=$["[object Symbol]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$["[object Error]"]=$[N]=$["[object WeakMap]"]=!1;var R=function n(t,r,p,y,d,g){var w,_=1&r,A=2&r,O=4&r;if(p&&(w=d?p(t,y,d,g):p(t)),void 0!==w)return w;if(!(0,F.Z)(t))return t;var m=(0,E.Z)(t);if(m){if(w=h(t),!_)return(0,Z.Z)(t,w)}else{var I,U,B,C,M=(0,j.Z)(t),R=M==N||"[object GeneratorFunction]"==M;if((0,x.Z)(t))return(0,a.Z)(t,_);if(M==P||M==L||R&&!d){if(w=A||R?{}:(0,k.Z)(t),!_)return A?(U=(I=w)&&(0,c.Z)(t,(0,f.Z)(t),I),(0,c.Z)(t,(0,v.Z)(t),U)):(C=(B=w)&&(0,c.Z)(t,(0,i.Z)(t),B),(0,c.Z)(t,(0,l.Z)(t),C))}else{if(!$[M])return d?t:{};w=S(t,M,_)}}g||(g=new e.Z);var V=g.get(t);if(V)return V;g.set(t,w),z(t)?t.forEach(function(e){w.add(n(e,r,p,e,t,g))}):D(t)&&t.forEach(function(e,u){w.set(u,n(e,r,p,u,t,g))});var G=O?A?s.Z:b.Z:A?f.Z:i.Z,W=m?void 0:G(t);return(0,u.Z)(W||t,function(e,u){W&&(e=t[u=e]),(0,o.Z)(w,u,n(e,r,p,u,t,g))}),w}},50388:function(n,t,r){r.d(t,{Z:function(){return i}});var e,u,o=r(2369),c=r(82025),i=(e=o.Z,function(n,t){if(null==n)return n;if(!(0,c.Z)(n))return e(n,t);for(var r=n.length,o=-1,i=Object(n);(u?o--:++o<r)&&!1!==t(i[o],o,i););return n})},82673:function(n,t,r){var e=r(50388);t.Z=function(n,t){var r=[];return(0,e.Z)(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}},41764:function(n,t){t.Z=function(n,t,r,e){for(var u=n.length,o=r+(e?1:-1);e?o--:++o<u;)if(t(n[o],o,n))return o;return -1}},28491:function(n,t,r){r.d(t,{Z:function(){return a}});var e=r(36366),u=r(40856),o=r(70351),c=r(28070),i=u.Z?u.Z.isConcatSpreadable:void 0,f=function(n){return(0,c.Z)(n)||(0,o.Z)(n)||!!(i&&n&&n[i])},a=function n(t,r,u,o,c){var i=-1,a=t.length;for(u||(u=f),c||(c=[]);++i<a;){var Z=t[i];r>0&&u(Z)?r>1?n(Z,r-1,u,o,c):(0,e.Z)(c,Z):o||(c[c.length]=Z)}return c}},2369:function(n,t,r){var e=r(19045),u=r(47799);t.Z=function(n,t){return n&&(0,e.Z)(n,t,u.Z)}},83613:function(n,t,r){var e=r(87439),u=r(47373);t.Z=function(n,t){t=(0,e.Z)(t,n);for(var r=0,o=t.length;null!=n&&r<o;)n=n[(0,u.Z)(t[r++])];return r&&r==o?n:void 0}},34635:function(n,t,r){var e=r(36366),u=r(28070);t.Z=function(n,t,r){var o=t(n);return(0,u.Z)(n)?o:(0,e.Z)(o,r(n))}},75763:function(n,t,r){r.d(t,{Z:function(){return c}});var e=r(41764),u=function(n){return n!=n},o=function(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return -1},c=function(n,t,r){return t==t?o(n,t,r):(0,e.Z)(n,u,r)}},18856:function(n,t,r){r.d(t,{Z:function(){return G}});var e=r(8883),u=r(25770),o=r(77395),c=r(92363),i=function(n,t,r,e,i,f){var a=1&r,Z=n.length,l=t.length;if(Z!=l&&!(a&&l>Z))return!1;var v=f.get(n),b=f.get(t);if(v&&b)return v==t&&b==n;var s=-1,j=!0,p=2&r?new u.Z:void 0;for(f.set(n,t),f.set(t,n);++s<Z;){var h=n[s],y=t[s];if(e)var d=a?e(y,h,s,t,n,f):e(h,y,s,n,t,f);if(void 0!==d){if(d)continue;j=!1;break}if(p){if(!(0,o.Z)(t,function(n,t){if(!(0,c.Z)(p,t)&&(h===n||i(h,n,r,e,f)))return p.push(t)})){j=!1;break}}else if(!(h===y||i(h,y,r,e,f))){j=!1;break}}return f.delete(n),f.delete(t),j},f=r(40856),a=r(6408),Z=r(84338),l=function(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r},v=r(64088),b=f.Z?f.Z.prototype:void 0,s=b?b.valueOf:void 0,j=function(n,t,r,e,u,o,c){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!o(new a.Z(n),new a.Z(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,Z.Z)(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=l;case"[object Set]":var b=1&e;if(f||(f=v.Z),n.size!=t.size&&!b)break;var j=c.get(n);if(j)return j==t;e|=2,c.set(n,t);var p=i(f(n),f(t),e,u,o,c);return c.delete(n),p;case"[object Symbol]":if(s)return s.call(n)==s.call(t)}return!1},p=r(1782),h=Object.prototype.hasOwnProperty,y=function(n,t,r,e,u,o){var c=1&r,i=(0,p.Z)(n),f=i.length;if(f!=(0,p.Z)(t).length&&!c)return!1;for(var a=f;a--;){var Z=i[a];if(!(c?Z in t:h.call(t,Z)))return!1}var l=o.get(n),v=o.get(t);if(l&&v)return l==t&&v==n;var b=!0;o.set(n,t),o.set(t,n);for(var s=c;++a<f;){var j=n[Z=i[a]],y=t[Z];if(e)var d=c?e(y,j,Z,t,n,o):e(j,y,Z,n,t,o);if(!(void 0===d?j===y||u(j,y,r,e,o):d)){b=!1;break}s||(s="constructor"==Z)}if(b&&!s){var g=n.constructor,w=t.constructor;g!=w&&"constructor"in n&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof w&&w instanceof w)&&(b=!1)}return o.delete(n),o.delete(t),b},d=r(68748),g=r(28070),w=r(23605),_=r(9798),A="[object Arguments]",O="[object Array]",m="[object Object]",S=Object.prototype.hasOwnProperty,k=function(n,t,r,u,o,c){var f=(0,g.Z)(n),a=(0,g.Z)(t),Z=f?O:(0,d.Z)(n),l=a?O:(0,d.Z)(t);Z=Z==A?m:Z,l=l==A?m:l;var v=Z==m,b=l==m,s=Z==l;if(s&&(0,w.Z)(n)){if(!(0,w.Z)(t))return!1;f=!0,v=!1}if(s&&!v)return c||(c=new e.Z),f||(0,_.Z)(n)?i(n,t,r,u,o,c):j(n,t,Z,r,u,o,c);if(!(1&r)){var p=v&&S.call(n,"__wrapped__"),h=b&&S.call(t,"__wrapped__");if(p||h){var k=p?n.value():n,E=h?t.value():t;return c||(c=new e.Z),o(k,E,r,u,c)}}return!!s&&(c||(c=new e.Z),y(n,t,r,u,o,c))},E=r(82370),x=function n(t,r,e,u,o){return t===r||(null!=t&&null!=r&&((0,E.Z)(t)||(0,E.Z)(r))?k(t,r,e,u,n,o):t!=t&&r!=r)},I=function(n,t,r,u){var o=r.length,c=o,i=!u;if(null==n)return!c;for(n=Object(n);o--;){var f=r[o];if(i&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++o<c;){var a=(f=r[o])[0],Z=n[a],l=f[1];if(i&&f[2]){if(void 0===Z&&!(a in n))return!1}else{var v=new e.Z;if(u)var b=u(Z,l,a,n,t,v);if(!(void 0===b?x(l,Z,3,u,v):b))return!1}}return!0},U=r(7632),B=function(n){return n==n&&!(0,U.Z)(n)},C=r(47799),D=function(n){for(var t=(0,C.Z)(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,B(u)]}return t},F=function(n,t){return function(r){return null!=r&&r[n]===t&&(void 0!==t||n in Object(r))}},M=function(n){var t=D(n);return 1==t.length&&t[0][2]?F(t[0][0],t[0][1]):function(r){return r===n||I(r,n,t)}},z=r(83613),L=function(n,t,r){var e=null==n?void 0:(0,z.Z)(n,t);return void 0===e?r:e},N=r(95222),P=r(19823),$=r(47373),R=r(20937),V=r(62838),G=function(n){var t,r,e;if("function"==typeof n)return n;if(null==n)return R.Z;if("object"==typeof n){;return(0,g.Z)(n)?(t=n[0],r=n[1],(0,P.Z)(t)&&B(r)?F((0,$.Z)(t),r):function(n){var e=L(n,t);return void 0===e&&e===r?(0,N.Z)(n,t):x(r,e,3)}):M(n)}return e=n,(0,P.Z)(e)?(0,V.Z)((0,$.Z)(e)):function(n){return(0,z.Z)(n,e)}}},62838:function(n,t){t.Z=function(n){return function(t){return null==t?void 0:t[n]}}},3394:function(n,t,r){r.d(t,{Z:function(){return l}});var e=r(25770),u=r(88576),o=r(30985),c=r(92363),i=r(32974),f=r(26161),a=r(64088),Z=i.Z&&1/(0,a.Z)(new i.Z([,-0]))[1]==1/0?function(n){return new i.Z(n)}:f.Z,l=function(n,t,r){var i=-1,f=u.Z,l=n.length,v=!0,b=[],s=b;if(r)v=!1,f=o.Z;else if(l>=200){var j=t?null:Z(n);if(j)return(0,a.Z)(j);v=!1,f=c.Z,s=new e.Z}else s=t?[]:b;n:for(;++i<l;){var p=n[i],h=t?t(p):p;if(p=r||0!==p?p:0,v&&h==h){for(var y=s.length;y--;)if(s[y]===h)continue n;t&&s.push(h),b.push(p)}else f(s,h,r)||(s!==b&&s.push(h),b.push(p))}return b}},92363:function(n,t){t.Z=function(n,t){return n.has(t)}},45900:function(n,t,r){var e=r(20937);t.Z=function(n){return"function"==typeof n?n:e.Z}},87439:function(n,t,r){r.d(t,{Z:function(){return b}});var e,u,o,c=r(28070),i=r(19823),f=r(98509),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/\\(\\)?/g,l=(e=function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(a,function(n,r,e,u){t.push(e?u.replace(Z,"$1"):r||n)}),t},o=(u=(0,f.Z)(e,function(n){return 500===o.size&&o.clear(),n})).cache,u),v=r(36720),b=function(n,t){return(0,c.Z)(n)?n:(0,i.Z)(n,t)?[n]:l((0,v.Z)(n))}},1782:function(n,t,r){var e=r(34635),u=r(35038),o=r(47799);t.Z=function(n){return(0,e.Z)(n,o.Z,u.Z)}},41879:function(n,t,r){var e=r(34635),u=r(66443),o=r(49625);t.Z=function(n){return(0,e.Z)(n,o.Z,u.Z)}},35038:function(n,t,r){var e=r(84168),u=r(88157),o=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols,i=c?function(n){return null==n?[]:(n=Object(n),(0,e.Z)(c(n),function(t){return o.call(n,t)}))}:u.Z;t.Z=i},66443:function(n,t,r){var e=r(36366),u=r(91408),o=r(35038),c=r(88157),i=Object.getOwnPropertySymbols?function(n){for(var t=[];n;)(0,e.Z)(t,(0,o.Z)(n)),n=(0,u.Z)(n);return t}:c.Z;t.Z=i},93025:function(n,t,r){var e=r(87439),u=r(70351),o=r(28070),c=r(65482),i=r(53934),f=r(47373);t.Z=function(n,t,r){t=(0,e.Z)(t,n);for(var a=-1,Z=t.length,l=!1;++a<Z;){var v=(0,f.Z)(t[a]);if(!(l=null!=n&&r(n,v)))break;n=n[v]}return l||++a!=Z?l:!!(Z=null==n?0:n.length)&&(0,i.Z)(Z)&&(0,c.Z)(v,Z)&&((0,o.Z)(n)||(0,u.Z)(n))}},19823:function(n,t,r){var e=r(28070),u=r(82245),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;t.Z=function(n,t){if((0,e.Z)(n))return!1;var r=typeof n;return!!("number"==r||"symbol"==r||"boolean"==r||null==n||(0,u.Z)(n))||c.test(n)||!o.test(n)||null!=t&&n in Object(t)}},64088:function(n,t){t.Z=function(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}},47373:function(n,t,r){var e=r(82245),u=1/0;t.Z=function(n){if("string"==typeof n||(0,e.Z)(n))return n;var t=n+"";return"0"==t&&1/n==-u?"-0":t}},52422:function(n,t,r){var e=r(84168),u=r(82673),o=r(18856),c=r(28070);t.Z=function(n,t){return((0,c.Z)(n)?e.Z:u.Z)(n,(0,o.Z)(t,3))}},81585:function(n,t,r){var e=r(64364),u=r(50388),o=r(45900),c=r(28070);t.Z=function(n,t){return((0,c.Z)(n)?e.Z:u.Z)(n,(0,o.Z)(t))}},95222:function(n,t,r){r.d(t,{Z:function(){return o}});var e=function(n,t){return null!=n&&t in Object(n)},u=r(93025),o=function(n,t){return null!=n&&(0,u.Z)(n,t,e)}},82245:function(n,t,r){var e=r(59576),u=r(82370);t.Z=function(n){return"symbol"==typeof n||(0,u.Z)(n)&&"[object Symbol]"==(0,e.Z)(n)}},87826:function(n,t){t.Z=function(n){return void 0===n}},47799:function(n,t,r){var e=r(70836),u=r(35400),o=r(82025);t.Z=function(n){return(0,o.Z)(n)?(0,e.Z)(n):(0,u.Z)(n)}},26161:function(n,t){t.Z=function(){}},49579:function(n,t,r){r.d(t,{Z:function(){return f}});var e=function(n,t,r,e){var u=-1,o=null==n?0:n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r},u=r(50388),o=r(18856),c=function(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=!1,n):t(r,n,u,o)}),r},i=r(28070),f=function(n,t,r){var f=(0,i.Z)(n)?e:c,a=arguments.length<3;return f(n,(0,o.Z)(t,4),r,a,u.Z)}},88157:function(n,t){t.Z=function(){return[]}},36720:function(n,t,r){r.d(t,{Z:function(){return l}});var e=r(40856),u=r(80659),o=r(28070),c=r(82245),i=1/0,f=e.Z?e.Z.prototype:void 0,a=f?f.toString:void 0,Z=function n(t){if("string"==typeof t)return t;if((0,o.Z)(t))return(0,u.Z)(t,n)+"";if((0,c.Z)(t))return a?a.call(t):"";var r=t+"";return"0"==r&&1/t==-i?"-0":r},l=function(n){return null==n?"":Z(n)}},33625:function(n,t,r){r.d(t,{Z:function(){return o}});var e=r(80659),u=r(47799),o=function(n){var t;return null==n?[]:(t=(0,u.Z)(n),(0,e.Z)(t,function(t){return n[t]}))}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8913],{47866:function(e){"use strict";let{entries:t,setPrototypeOf:n,isFrozen:r,getPrototypeOf:o,getOwnPropertyDescriptor:a}=Object,{freeze:i,seal:l,create:s}=Object,{apply:u,construct:c}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),l||(l=function(e){return e}),u||(u=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),c||(c=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});let p=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),d=k(Array.prototype.pop),m=k(Array.prototype.push),h=k(Array.prototype.splice),y=k(String.prototype.toLowerCase),g=k(String.prototype.toString),v=k(String.prototype.match),b=k(String.prototype.replace),T=k(String.prototype.indexOf),E=k(String.prototype.trim),_=k(Object.prototype.hasOwnProperty),A=k(RegExp.prototype.test),O=(V=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(V,t)});function k(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return u(e,t,r)}}function S(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;n&&n(e,null);let a=t.length;for(;a--;){let n=t[a];if("string"==typeof n){let e=o(n);e!==n&&(r(t)||(t[a]=e),n=e)}e[n]=!0}return e}function R(e){let n=s(null);for(let[r,o]of t(e))_(e,r)&&(Array.isArray(o)?n[r]=function(e){for(let t=0;t<e.length;t++)_(e,t)||(e[t]=null);return e}(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=R(o):n[r]=o);return n}function C(e,t){for(;null!==e;){let n=a(e,t);if(n){if(n.get)return k(n.get);if("function"==typeof n.value)return k(n.value)}e=o(e)}return function(){return null}}let N=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),w=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=i(["#text"]),L=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),H=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=l(/<%[\w\W]*|[\w\W]*%>/gm),F=l(/\$\{[\w\W]*/gm),G=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),W=l(/^aria-[\-\w]+$/),B=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=l(/^(?:\w+script|data):/i),Y=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=l(/^html$/i);var V,X=Object.freeze({__proto__:null,ARIA_ATTR:W,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:l(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:G,DOCTYPE_NAME:q,ERB_EXPR:$,IS_ALLOWED_URI:B,IS_SCRIPT_OR_DATA:Z,MUSTACHE_EXPR:U,TMPLIT_EXPR:F});let K={element:1,text:3,progressingInstruction:7,comment:8,document:9},J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Q=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var ee=function e(){let n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,o=t=>e(t);if(o.version="3.3.1",o.removed=[],!r||!r.document||r.document.nodeType!==K.document||!r.Element)return o.isSupported=!1,o;let{document:a}=r,l=a,u=l.currentScript,{DocumentFragment:c,HTMLTemplateElement:k,Node:U,Element:$,NodeFilter:F,NamedNodeMap:G=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Z,trustedTypes:Y}=r,V=$.prototype,ee=C(V,"cloneNode"),et=C(V,"remove"),en=C(V,"nextSibling"),er=C(V,"childNodes"),eo=C(V,"parentNode");if("function"==typeof k){let e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let ea="",{implementation:ei,createNodeIterator:el,createDocumentFragment:es,getElementsByTagName:eu}=a,{importNode:ec}=l,ep=Q();o.isSupported="function"==typeof t&&"function"==typeof eo&&ei&&void 0!==ei.createHTMLDocument;let{MUSTACHE_EXPR:ef,ERB_EXPR:ed,TMPLIT_EXPR:em,DATA_ATTR:eh,ARIA_ATTR:ey,IS_SCRIPT_OR_DATA:eg,ATTR_WHITESPACE:ev,CUSTOM_ELEMENT:eb}=X,{IS_ALLOWED_URI:eT}=X,eE=null,e_=S({},[...N,...w,...x,...M,...P]),eA=null,eO=S({},[...L,...H,...j,...z]),ek=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eS=null,eR=null,eC=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),eN=!0,ew=!0,ex=!1,eI=!0,eM=!1,eD=!0,eP=!1,eL=!1,eH=!1,ej=!1,ez=!1,eU=!1,e$=!0,eF=!1,eG=!0,eW=!1,eB={},eZ=null,eY=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),eq=null,eV=S({},["audio","video","img","source","image","track"]),eX=null,eK=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),eJ="http://www.w3.org/1998/Math/MathML",eQ="http://www.w3.org/2000/svg",e0="http://www.w3.org/1999/xhtml",e1=e0,e2=!1,e9=null,e4=S({},[eJ,eQ,e0],g),e3=S({},["mi","mo","mn","ms","mtext"]),e5=S({},["annotation-xml"]),e8=S({},["title","style","font","a","script"]),e7=null,e6=["application/xhtml+xml","text/html"],te=null,tt=null,tn=a.createElement("form"),tr=function(e){return e instanceof RegExp||e instanceof Function},to=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=R(e),te="application/xhtml+xml"===(e7=-1===e6.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?g:y,eE=_(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,te):e_,eA=_(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,te):eO,e9=_(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,g):e4,eX=_(e,"ADD_URI_SAFE_ATTR")?S(R(eK),e.ADD_URI_SAFE_ATTR,te):eK,eq=_(e,"ADD_DATA_URI_TAGS")?S(R(eV),e.ADD_DATA_URI_TAGS,te):eV,eZ=_(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,te):eY,eS=_(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,te):R({}),eR=_(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,te):R({}),eB=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,eN=!1!==e.ALLOW_ARIA_ATTR,ew=!1!==e.ALLOW_DATA_ATTR,ex=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eI=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eM=e.SAFE_FOR_TEMPLATES||!1,eD=!1!==e.SAFE_FOR_XML,eP=e.WHOLE_DOCUMENT||!1,ej=e.RETURN_DOM||!1,ez=e.RETURN_DOM_FRAGMENT||!1,eU=e.RETURN_TRUSTED_TYPE||!1,eH=e.FORCE_BODY||!1,e$=!1!==e.SANITIZE_DOM,eF=e.SANITIZE_NAMED_PROPS||!1,eG=!1!==e.KEEP_CONTENT,eW=e.IN_PLACE||!1,eT=e.ALLOWED_URI_REGEXP||B,e1=e.NAMESPACE||e0,e3=e.MATHML_TEXT_INTEGRATION_POINTS||e3,e5=e.HTML_INTEGRATION_POINTS||e5,ek=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tr(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ek.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tr(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ek.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ek.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),eM&&(ew=!1),ez&&(ej=!0),eB&&(eE=S({},P),eA=[],!0===eB.html&&(S(eE,N),S(eA,L)),!0===eB.svg&&(S(eE,w),S(eA,H),S(eA,z)),!0===eB.svgFilters&&(S(eE,x),S(eA,H),S(eA,z)),!0===eB.mathMl&&(S(eE,M),S(eA,j),S(eA,z))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?eC.tagCheck=e.ADD_TAGS:(eE===e_&&(eE=R(eE)),S(eE,e.ADD_TAGS,te))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?eC.attributeCheck=e.ADD_ATTR:(eA===eO&&(eA=R(eA)),S(eA,e.ADD_ATTR,te))),e.ADD_URI_SAFE_ATTR&&S(eX,e.ADD_URI_SAFE_ATTR,te),e.FORBID_CONTENTS&&(eZ===eY&&(eZ=R(eZ)),S(eZ,e.FORBID_CONTENTS,te)),e.ADD_FORBID_CONTENTS&&(eZ===eY&&(eZ=R(eZ)),S(eZ,e.ADD_FORBID_CONTENTS,te)),eG&&(eE["#text"]=!0),eP&&S(eE,["html","head","body"]),eE.table&&(S(eE,["tbody"]),delete eS.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw O('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw O('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ea=(n=e.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===n&&(n=J(Y,u)),null!==n&&"string"==typeof ea&&(ea=n.createHTML(""));i&&i(e),tt=e}},ta=S({},[...w,...x,...I]),ti=S({},[...M,...D]),tl=function(e){let t=eo(e);t&&t.tagName||(t={namespaceURI:e1,tagName:"template"});let n=y(e.tagName),r=y(t.tagName);return!!e9[e.namespaceURI]&&(e.namespaceURI===eQ?t.namespaceURI===e0?"svg"===n:t.namespaceURI===eJ?"svg"===n&&("annotation-xml"===r||e3[r]):!!ta[n]:e.namespaceURI===eJ?t.namespaceURI===e0?"math"===n:t.namespaceURI===eQ?"math"===n&&e5[r]:!!ti[n]:e.namespaceURI===e0?(t.namespaceURI!==eQ||!!e5[r])&&(t.namespaceURI!==eJ||!!e3[r])&&!ti[n]&&(e8[n]||!ta[n]):"application/xhtml+xml"===e7&&!!e9[e.namespaceURI])},ts=function(e){m(o.removed,{element:e});try{eo(e).removeChild(e)}catch(t){et(e)}},tu=function(e,t){try{m(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e){if(ej||ez)try{ts(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}}},tc=function(e){let t=null,r=null;if(eH)e="<remove></remove>"+e;else{let t=v(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===e7&&e1===e0&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let o=n?n.createHTML(e):e;if(e1===e0)try{t=new Z().parseFromString(o,e7)}catch(e){}if(!t||!t.documentElement){t=ei.createDocument(e1,"template",null);try{t.documentElement.innerHTML=e2?ea:o}catch(e){}}let i=t.body||t.documentElement;return(e&&r&&i.insertBefore(a.createTextNode(r),i.childNodes[0]||null),e1===e0)?eu.call(t,eP?"html":"body")[0]:eP?t.documentElement:i},tp=function(e){return el.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT|F.SHOW_PROCESSING_INSTRUCTION|F.SHOW_CDATA_SECTION,null)},tf=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},td=function(e){return"function"==typeof U&&e instanceof U};function tm(e,t,n){p(e,e=>{e.call(o,t,n,tt)})}let th=function(e){let t=null;if(tm(ep.beforeSanitizeElements,e,null),tf(e))return ts(e),!0;let n=te(e.nodeName);if(tm(ep.uponSanitizeElement,e,{tagName:n,allowedTags:eE}),eD&&e.hasChildNodes()&&!td(e.firstElementChild)&&A(/<[/\w!]/g,e.innerHTML)&&A(/<[/\w!]/g,e.textContent)||e.nodeType===K.progressingInstruction||eD&&e.nodeType===K.comment&&A(/<[/\w]/g,e.data))return ts(e),!0;if(!(eC.tagCheck instanceof Function&&eC.tagCheck(n))&&(!eE[n]||eS[n])){if(!eS[n]&&tg(n)&&(ek.tagNameCheck instanceof RegExp&&A(ek.tagNameCheck,n)||ek.tagNameCheck instanceof Function&&ek.tagNameCheck(n)))return!1;if(eG&&!eZ[n]){let t=eo(e)||e.parentNode,n=er(e)||e.childNodes;if(n&&t){let r=n.length;for(let o=r-1;o>=0;--o){let r=ee(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,en(e))}}}return ts(e),!0}return e instanceof $&&!tl(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&A(/<\/no(script|embed|frames)/i,e.innerHTML)?(ts(e),!0):(eM&&e.nodeType===K.text&&(t=e.textContent,p([ef,ed,em],e=>{t=b(t,e," ")}),e.textContent!==t&&(m(o.removed,{element:e.cloneNode()}),e.textContent=t)),tm(ep.afterSanitizeElements,e,null),!1)},ty=function(e,t,n){if(e$&&("id"===t||"name"===t)&&(n in a||n in tn))return!1;if(ew&&!eR[t]&&A(eh,t));else if(eN&&A(ey,t));else if(eC.attributeCheck instanceof Function&&eC.attributeCheck(t,e));else if(!eA[t]||eR[t]){if(!(tg(e)&&(ek.tagNameCheck instanceof RegExp&&A(ek.tagNameCheck,e)||ek.tagNameCheck instanceof Function&&ek.tagNameCheck(e))&&(ek.attributeNameCheck instanceof RegExp&&A(ek.attributeNameCheck,t)||ek.attributeNameCheck instanceof Function&&ek.attributeNameCheck(t,e))||"is"===t&&ek.allowCustomizedBuiltInElements&&(ek.tagNameCheck instanceof RegExp&&A(ek.tagNameCheck,n)||ek.tagNameCheck instanceof Function&&ek.tagNameCheck(n))))return!1}else if(eX[t]);else if(A(eT,b(n,ev,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===T(n,"data:")&&eq[e]);else if(ex&&!A(eg,b(n,ev,"")));else if(n)return!1;return!0},tg=function(e){return"annotation-xml"!==e&&v(e,eb)},tv=function(e){tm(ep.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||tf(e))return;let r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eA,forceKeepAttr:void 0},a=t.length;for(;a--;){let{name:i,namespaceURI:l,value:s}=t[a],u=te(i),c="value"===i?s:E(s);if(r.attrName=u,r.attrValue=c,r.keepAttr=!0,r.forceKeepAttr=void 0,tm(ep.uponSanitizeAttribute,e,r),c=r.attrValue,eF&&("id"===u||"name"===u)&&(tu(i,e),c="user-content-"+c),eD&&A(/((--!?|])>)|<\/(style|title|textarea)/i,c)||"attributename"===u&&v(c,"href")){tu(i,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr||!eI&&A(/\/>/i,c)){tu(i,e);continue}eM&&p([ef,ed,em],e=>{c=b(c,e," ")});let f=te(e.nodeName);if(!ty(f,u,c)){tu(i,e);continue}if(n&&"object"==typeof Y&&"function"==typeof Y.getAttributeType){if(l);else switch(Y.getAttributeType(f,u)){case"TrustedHTML":c=n.createHTML(c);break;case"TrustedScriptURL":c=n.createScriptURL(c)}}if(c!==s)try{l?e.setAttributeNS(l,i,c):e.setAttribute(i,c),tf(e)?ts(e):d(o.removed)}catch(t){tu(i,e)}}tm(ep.afterSanitizeAttributes,e,null)},tb=function e(t){let n=null,r=tp(t);for(tm(ep.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)tm(ep.uponSanitizeShadowNode,n,null),th(n),tv(n),n.content instanceof c&&e(n.content);tm(ep.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,i=null,s=null;if((e2=!e)&&(e="<!-->"),"string"!=typeof e&&!td(e)){if("function"==typeof e.toString){if("string"!=typeof(e=e.toString()))throw O("dirty is not a string, aborting")}else throw O("toString is not a function")}if(!o.isSupported)return e;if(eL||to(t),o.removed=[],"string"==typeof e&&(eW=!1),eW){if(e.nodeName){let t=te(e.nodeName);if(!eE[t]||eS[t])throw O("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof U)(a=(r=tc("<!---->")).ownerDocument.importNode(e,!0)).nodeType===K.element&&"BODY"===a.nodeName?r=a:"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!ej&&!eM&&!eP&&-1===e.indexOf("<"))return n&&eU?n.createHTML(e):e;if(!(r=tc(e)))return ej?null:eU?ea:""}r&&eH&&ts(r.firstChild);let u=tp(eW?e:r);for(;i=u.nextNode();)th(i),tv(i),i.content instanceof c&&tb(i.content);if(eW)return e;if(ej){if(ez)for(s=es.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(eA.shadowroot||eA.shadowrootmode)&&(s=ec.call(l,s,!0)),s}let f=eP?r.outerHTML:r.innerHTML;return eP&&eE["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&A(q,r.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+f),eM&&p([ef,ed,em],e=>{f=b(f,e," ")}),n&&eU?n.createHTML(f):f},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};to(e),eL=!0},o.clearConfig=function(){tt=null,eL=!1},o.isValidAttribute=function(e,t,n){return tt||to({}),ty(te(e),te(t),n)},o.addHook=function(e,t){"function"==typeof t&&m(ep[e],t)},o.removeHook=function(e,t){if(void 0!==t){let n=f(ep[e],t);return -1===n?void 0:h(ep[e],n,1)[0]}return d(ep[e])},o.removeHooks=function(e){ep[e]=[]},o.removeAllHooks=function(){ep=Q()},o}();e.exports=ee},47835:function(e,t,n){e.exports=self.DOMPurify||(self.DOMPurify=n(47866).default||n(47866))},30401:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},10407:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},78867:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},88964:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},48736:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},79548:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("folder-input",[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]])},56475:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])},49465:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},14924:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},45675:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},18930:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},76865:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},17689:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return o.a}});var r=n(55775),o=n.n(r)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(47043);n(57437),n(2265);let o=r._(n(15602));function a(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let a={...r,...t};return(0,o.default)({...a,modules:null==(n=a.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let r=n(18993);function o(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let r=n(57437),o=n(2265),a=n(81523),i=n(70049);function l(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},u=function(e){let t={...s,...e},n=(0,o.lazy)(()=>t.loader().then(l)),u=t.loading;function c(e){let l=u?(0,r.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,s=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(i.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(o.Suspense,{fallback:l,children:s})}return c.displayName="LoadableComponent",c}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return a}});let r=n(57437),o=n(20544);function a(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,o.getExpectedRequestStore)("next/dynamic css"),a=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));a.push(...t)}}return 0===a.length?null:(0,r.jsx)(r.Fragment,{children:a.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},10751:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.types=void 0;let a=n(50949);Object.defineProperty(t,"types",{enumerable:!0,get:function(){return a.types}}),o(n(92442),t),o(n(63002),t);let i=n(92442),l=n(63002);o(n(50949),t),t.default=i.tokenizer,e.exports=i.tokenizer,e.exports.types=a.types,e.exports.reconstruct=l.reconstruct},63002:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reconstruct=void 0;let r=n(50949),o=n(31327),a=e=>e.map(t.reconstruct).join(""),i=e=>{if("options"in e)return e.options.map(a).join("|");if("stack"in e)return a(e.stack);throw Error("options or stack must be Root or Group token")};t.reconstruct=e=>{switch(e.type){case r.types.ROOT:return i(e);case r.types.CHAR:{let t=String.fromCharCode(e.value);return(/[[\\{}$^.|?*+()]/.test(t)?"\\":"")+t}case r.types.POSITION:if("^"===e.value||"$"===e.value)return e.value;return`\\${e.value}`;case r.types.REFERENCE:return`\\${e.value}`;case r.types.SET:return o.writeSetTokens(e);case r.types.GROUP:{let t=e.name?`?<${e.name}>`:e.remember?"":e.followedBy?"?=":e.notFollowedBy?"?!":"?:";return`(${t}${i(e)})`}case r.types.REPETITION:{let n;let{min:r,max:o}=e;return n=0===r&&1===o?"?":1===r&&o===1/0?"+":0===r&&o===1/0?"*":o===1/0?`{${r},}`:r===o?`{${r}}`:`{${r},${o}}`,`${t.reconstruct(e.value)}${n}`}case r.types.RANGE:return`${o.setChar(e.from)}-${o.setChar(e.to)}`;default:throw Error(`Invalid token type ${e}`)}}},42829:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NOTANYCHAR=t.WHITESPACE=t.WORDS=t.INTS=void 0;let i=a(n(84220)),l=n(50949);function s(e){let t={},n=0;for(let r of e)r.type===l.types.CHAR&&(t[r.value]=!0),r.type===l.types.RANGE&&(t[`${r.from}-${r.to}`]=!0),n+=1;return{lookup:()=>Object.assign({},t),len:n}}t.INTS=s(i.ints().set),t.WORDS=s(i.words().set),t.WHITESPACE=s(i.whitespace().set),t.NOTANYCHAR=s(i.anyChar().set)},84220:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.anyChar=t.notWhitespace=t.whitespace=t.notInts=t.ints=t.notWords=t.words=void 0;let r=n(50949),o=()=>[{type:r.types.RANGE,from:48,to:57}],a=()=>[{type:r.types.CHAR,value:95},{type:r.types.RANGE,from:97,to:122},{type:r.types.RANGE,from:65,to:90},{type:r.types.RANGE,from:48,to:57}],i=()=>[{type:r.types.CHAR,value:9},{type:r.types.CHAR,value:10},{type:r.types.CHAR,value:11},{type:r.types.CHAR,value:12},{type:r.types.CHAR,value:13},{type:r.types.CHAR,value:32},{type:r.types.CHAR,value:160},{type:r.types.CHAR,value:5760},{type:r.types.RANGE,from:8192,to:8202},{type:r.types.CHAR,value:8232},{type:r.types.CHAR,value:8233},{type:r.types.CHAR,value:8239},{type:r.types.CHAR,value:8287},{type:r.types.CHAR,value:12288},{type:r.types.CHAR,value:65279}],l=()=>[{type:r.types.CHAR,value:10},{type:r.types.CHAR,value:13},{type:r.types.CHAR,value:8232},{type:r.types.CHAR,value:8233}];t.words=()=>({type:r.types.SET,set:a(),not:!1}),t.notWords=()=>({type:r.types.SET,set:a(),not:!0}),t.ints=()=>({type:r.types.SET,set:o(),not:!1}),t.notInts=()=>({type:r.types.SET,set:o(),not:!0}),t.whitespace=()=>({type:r.types.SET,set:i(),not:!1}),t.notWhitespace=()=>({type:r.types.SET,set:i(),not:!0}),t.anyChar=()=>({type:r.types.SET,set:l(),not:!0})},92442:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tokenizer=void 0;let i=a(n(82204)),l=n(50949),s=a(n(84220)),u=/^[a-zA-Z_$]$/i,c=/^[a-zA-Z0-9_$]$/i,p=/\d/;t.tokenizer=e=>{let t=0,n,r={type:l.types.ROOT,stack:[]},o=r,a=r.stack,f=[],d=[],m=0,h=t=>{throw SyntaxError(`Invalid regular expression: /${e}/: Nothing to repeat at column ${t-1}`)},y=i.strToChars(e);for(;t<y.length;)switch(n=y[t++]){case"\\":if(t===y.length)throw SyntaxError(`Invalid regular expression: /${e}/: \\ at end of pattern`);switch(n=y[t++]){case"b":a.push({type:l.types.POSITION,value:"b"});break;case"B":a.push({type:l.types.POSITION,value:"B"});break;case"w":a.push(s.words());break;case"W":a.push(s.notWords());break;case"d":a.push(s.ints());break;case"D":a.push(s.notInts());break;case"s":a.push(s.whitespace());break;case"S":a.push(s.notWhitespace());break;default:if(p.test(n)){let e=n;for(;t<y.length&&p.test(y[t]);)e+=y[t++];let r=parseInt(e,10),o={type:l.types.REFERENCE,value:r};a.push(o),d.push({reference:o,stack:a,index:a.length-1})}else a.push({type:l.types.CHAR,value:n.charCodeAt(0)})}break;case"^":a.push({type:l.types.POSITION,value:"^"});break;case"$":a.push({type:l.types.POSITION,value:"$"});break;case"[":{let n;"^"===y[t]?(n=!0,t++):n=!1;let r=i.tokenizeClass(y.slice(t),e);t+=r[1],a.push({type:l.types.SET,set:r[0],not:n});break}case".":a.push(s.anyChar());break;case"(":{let r={type:l.types.GROUP,stack:[],remember:!0};if("?"===y[t]){if(n=y[t+1],t+=2,"="===n)r.followedBy=!0,r.remember=!1;else if("!"===n)r.notFollowedBy=!0,r.remember=!1;else if("<"===n){let n="";if(u.test(y[t]))n+=y[t],t++;else throw SyntaxError(`Invalid regular expression: /${e}/: Invalid capture group name, character '${y[t]}' after '<' at column ${t+1}`);for(;t<y.length&&c.test(y[t]);)n+=y[t],t++;if(!n)throw SyntaxError(`Invalid regular expression: /${e}/: Invalid capture group name, character '${y[t]}' after '<' at column ${t+1}`);if(">"!==y[t])throw SyntaxError(`Invalid regular expression: /${e}/: Unclosed capture group name, expected '>', found '${y[t]}' at column ${t+1}`);r.name=n,t++}else if(":"===n)r.remember=!1;else throw SyntaxError(`Invalid regular expression: /${e}/: Invalid group, character '${n}' after '?' at column ${t-1}`)}else m+=1;a.push(r),f.push(o),o=r,a=r.stack;break}case")":if(0===f.length)throw SyntaxError(`Invalid regular expression: /${e}/: Unmatched ) at column ${t-1}`);a=(o=f.pop()).options?o.options[o.options.length-1]:o.stack;break;case"|":{o.options||(o.options=[o.stack],delete o.stack);let e=[];o.options.push(e),a=e;break}case"{":{let e=/^(\d+)(,(\d+)?)?\}/.exec(y.slice(t)),n,r;null!==e?(0===a.length&&h(t),n=parseInt(e[1],10),r=e[2]?e[3]?parseInt(e[3],10):1/0:n,t+=e[0].length,a.push({type:l.types.REPETITION,min:n,max:r,value:a.pop()})):a.push({type:l.types.CHAR,value:123});break}case"?":0===a.length&&h(t),a.push({type:l.types.REPETITION,min:0,max:1,value:a.pop()});break;case"+":0===a.length&&h(t),a.push({type:l.types.REPETITION,min:1,max:1/0,value:a.pop()});break;case"*":0===a.length&&h(t),a.push({type:l.types.REPETITION,min:0,max:1/0,value:a.pop()});break;default:a.push({type:l.types.CHAR,value:n.charCodeAt(0)})}if(0!==f.length)throw SyntaxError(`Invalid regular expression: /${e}/: Unterminated group`);return function(e,t){for(let n of e.reverse())if(t<n.reference.value){n.reference.type=l.types.CHAR;let e=n.reference.value.toString();if(n.reference.value=parseInt(e,8),!/^[0-7]+$/.test(e)){let t=0;for(;"8"!==e[t]&&"9"!==e[t];)t+=1;if(0===t?(n.reference.value=e.charCodeAt(0),t+=1):n.reference.value=parseInt(e.slice(0,t),8),e.length>t){let r=n.stack.splice(n.index+1);for(let r of e.slice(t))n.stack.push({type:l.types.CHAR,value:r.charCodeAt(0)});n.stack.push(...r)}}}}(d,m),r}},50949:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(33132),t),o(n(78034),t),o(n(63630),t)},63630:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33132:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78034:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.types=void 0,(n=t.types||(t.types={}))[n.ROOT=0]="ROOT",n[n.GROUP=1]="GROUP",n[n.POSITION=2]="POSITION",n[n.SET=3]="SET",n[n.RANGE=4]="RANGE",n[n.REPETITION=5]="REPETITION",n[n.REFERENCE=6]="REFERENCE",n[n.CHAR=7]="CHAR"},82204:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tokenizeClass=t.strToChars=void 0;let i=n(50949),l=a(n(84220));t.strToChars=e=>e.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(e,t,n,r,o,a,i)=>{if(n)return e;let l=String.fromCharCode(t?8:r?parseInt(r,16):o?parseInt(o,16):a?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(a):({0:0,t:9,n:10,v:11,f:12,r:13})[i]);return/[[\]{}^$.|?*+()]/.test(l)?`\\${l}`:l}),t.tokenizeClass=(e,t)=>{var n,r,o,a,s,u,c;let p=[],f,d,m=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g;for(;null!==(f=m.exec(e));){let e=null!==(c=null!==(u=null!==(s=null!==(a=null!==(o=null!==(r=null!==(n=f[1]&&l.words())&&void 0!==n?n:f[2]&&l.ints())&&void 0!==r?r:f[3]&&l.whitespace())&&void 0!==o?o:f[4]&&l.notWords())&&void 0!==a?a:f[5]&&l.notInts())&&void 0!==s?s:f[6]&&l.notWhitespace())&&void 0!==u?u:f[7]&&{type:i.types.RANGE,from:(f[8]||f[9]).charCodeAt(0),to:(d=f[10]).charCodeAt(d.length-1)})&&void 0!==c?c:(d=f[16])&&{type:i.types.CHAR,value:d.charCodeAt(0)};if(!e)return[p,m.lastIndex];p.push(e)}throw SyntaxError(`Invalid regular expression: /${t}/: Unterminated character class`)}},31327:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.writeSetTokens=t.setChar=void 0;let i=n(50949),l=a(n(42829));function s(e){return 94===e?"\\^":92===e?"\\\\":93===e?"\\]":45===e?"\\-":String.fromCharCode(e)}function u(e,{lookup:t,len:n}){if(n!==e.length)return!1;let r=t();for(let t of e){if(t.type===i.types.SET)return!1;let e=t.type===i.types.CHAR?t.value:`${t.from}-${t.to}`;if(!r[e])return!1;r[e]=!1}return!0}t.setChar=s,t.writeSetTokens=function e(t,n=!1){if(u(t.set,l.INTS))return t.not?"\\D":"\\d";if(u(t.set,l.WORDS))return t.not?"\\W":"\\w";if(t.not&&u(t.set,l.NOTANYCHAR))return".";if(u(t.set,l.WHITESPACE))return t.not?"\\S":"\\s";let r="";for(let n=0;n<t.set.length;n++){var o;r+=(o=t.set[n]).type===i.types.CHAR?s(o.value):o.type===i.types.RANGE?`${s(o.from)}-${s(o.to)}`:e(o,!0)}let a=`${t.not?"^":""}${r}`;return n?a:`[${a}]`}},55125:function(e,t,n){"use strict";let r=n(10751),o=r.types;function a(e,t){var n;t||(t={});let a=void 0===t.limit?25:t.limit;(n=e,"[object RegExp]"===({}).toString.call(n))?e=e.source:"string"!=typeof e&&(e=String(e));try{e=r(e)}catch{return!1}let i=0;return function e(t,n){let r,l;if(t.type===o.REPETITION&&(n++,i++,n>1||i>a))return!1;if(t.options){for(r=0,l=t.options.length;r<l;r++)if(!e({stack:t.options[r]},n))return!1}let s=t.stack||t.value?.stack;if(!s)return!0;for(r=0;r<s.length;r++)if(!e(s[r],n))return!1;return!0}(e,0)}e.exports=a,e.exports.default=a,e.exports.safeRegex=a}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8977],{58977:function(e,c,r){r.d(c,{createArchitectureServices:function(){return t.i}});var t=r(20992);r(95324)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9552],{49552:function(t,e,a){a.d(e,{diagram:function(){return v}});var n,i=a(67665);a(34577),a(23919),a(63025),a(19328),a(54973),a(11866),a(10507),a(33281),a(66691);var r=a(94705),d=a(55166),s=a(31954),o=a(84370),g=a(56434),l=a(68406),p=(0,s.eW)(t=>t.append("circle").attr("class","start-state").attr("r",(0,d.nV)().state.sizeUnit).attr("cx",(0,d.nV)().state.padding+(0,d.nV)().state.sizeUnit).attr("cy",(0,d.nV)().state.padding+(0,d.nV)().state.sizeUnit),"drawStartState"),h=(0,s.eW)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.nV)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.nV)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),c=(0,s.eW)((t,e)=>{let a=t.append("text").attr("x",2*(0,d.nV)().state.padding).attr("y",(0,d.nV)().state.textHeight+2*(0,d.nV)().state.padding).attr("font-size",(0,d.nV)().state.fontSize).attr("class","state-title").text(e.id),n=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.nV)().state.padding).attr("y",(0,d.nV)().state.padding).attr("width",n.width+2*(0,d.nV)().state.padding).attr("height",n.height+2*(0,d.nV)().state.padding).attr("rx",(0,d.nV)().state.radius),a},"drawSimpleState"),x=(0,s.eW)((t,e)=>{let a=(0,s.eW)(function(t,e,a){let n=t.append("tspan").attr("x",2*(0,d.nV)().state.padding).text(e);a||n.attr("dy",(0,d.nV)().state.textHeight)},"addTspan"),n=t.append("text").attr("x",2*(0,d.nV)().state.padding).attr("y",(0,d.nV)().state.textHeight+1.3*(0,d.nV)().state.padding).attr("font-size",(0,d.nV)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,r=t.append("text").attr("x",(0,d.nV)().state.padding).attr("y",i+.4*(0,d.nV)().state.padding+(0,d.nV)().state.dividerMargin+(0,d.nV)().state.textHeight).attr("class","state-description"),o=!0,g=!0;e.descriptions.forEach(function(t){o||(a(r,t,g),g=!1),o=!1});let l=t.append("line").attr("x1",(0,d.nV)().state.padding).attr("y1",(0,d.nV)().state.padding+i+(0,d.nV)().state.dividerMargin/2).attr("y2",(0,d.nV)().state.padding+i+(0,d.nV)().state.dividerMargin/2).attr("class","descr-divider"),p=r.node().getBBox(),h=Math.max(p.width,n.width);return l.attr("x2",h+3*(0,d.nV)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.nV)().state.padding).attr("y",(0,d.nV)().state.padding).attr("width",h+2*(0,d.nV)().state.padding).attr("height",p.height+i+2*(0,d.nV)().state.padding).attr("rx",(0,d.nV)().state.radius),t},"drawDescrState"),V=(0,s.eW)((t,e,a)=>{let n;let i=(0,d.nV)().state.padding,r=2*(0,d.nV)().state.padding,s=t.node().getBBox(),o=s.width,g=s.x,l=t.append("text").attr("x",0).attr("y",(0,d.nV)().state.titleShift).attr("font-size",(0,d.nV)().state.fontSize).attr("class","state-title").text(e.id),p=l.node().getBBox().width+r,h=Math.max(p,o);h===o&&(h+=r);let c=t.node().getBBox();e.doc,n=g-i,p>o&&(n=(o-h)/2+i),Math.abs(g-c.x)<i&&p>o&&(n=g-(p-o)/2);let x=1-(0,d.nV)().state.textHeight;return t.insert("rect",":first-child").attr("x",n).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",c.height+(0,d.nV)().state.textHeight+(0,d.nV)().state.titleShift+1).attr("rx","0"),l.attr("x",n+i),p<=o&&l.attr("x",g+(h-r)/2-p/2+i),t.insert("rect",":first-child").attr("x",n).attr("y",(0,d.nV)().state.titleShift-(0,d.nV)().state.textHeight-(0,d.nV)().state.padding).attr("width",h).attr("height",3*(0,d.nV)().state.textHeight).attr("rx",(0,d.nV)().state.radius),t.insert("rect",":first-child").attr("x",n).attr("y",(0,d.nV)().state.titleShift-(0,d.nV)().state.textHeight-(0,d.nV)().state.padding).attr("width",h).attr("height",c.height+3+2*(0,d.nV)().state.textHeight).attr("rx",(0,d.nV)().state.radius),t},"addTitleAndBox"),u=(0,s.eW)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.nV)().state.sizeUnit+(0,d.nV)().state.miniPadding).attr("cx",(0,d.nV)().state.padding+(0,d.nV)().state.sizeUnit+(0,d.nV)().state.miniPadding).attr("cy",(0,d.nV)().state.padding+(0,d.nV)().state.sizeUnit+(0,d.nV)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.nV)().state.sizeUnit).attr("cx",(0,d.nV)().state.padding+(0,d.nV)().state.sizeUnit+2).attr("cy",(0,d.nV)().state.padding+(0,d.nV)().state.sizeUnit+2)),"drawEndState"),f=(0,s.eW)((t,e)=>{let a=(0,d.nV)().state.forkWidth,n=(0,d.nV)().state.forkHeight;if(e.parentId){let t=a;a=n,n=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",n).attr("x",(0,d.nV)().state.padding).attr("y",(0,d.nV)().state.padding)},"drawForkJoinState"),y=(0,s.eW)((t,e,a,n)=>{let i=0,r=n.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>"),o=(s=s.replace(/\n/g,"<br/>")).split(d.SY.lineBreakRegex),g=1.25*(0,d.nV)().state.noteMargin;for(let t of o){let n=t.trim();if(n.length>0){let t=r.append("tspan");t.text(n),0===g&&(g+=t.node().getBBox().height),i+=g,t.attr("x",e+(0,d.nV)().state.noteMargin),t.attr("y",a+i+1.25*(0,d.nV)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:i}},"_drawLongText"),w=(0,s.eW)((t,e)=>{e.attr("class","state-note");let a=e.append("rect").attr("x",0).attr("y",(0,d.nV)().state.padding),{textWidth:n,textHeight:i}=y(t,0,0,e.append("g"));return a.attr("height",i+2*(0,d.nV)().state.noteMargin),a.attr("width",n+2*(0,d.nV)().state.noteMargin),a},"drawNote"),b=(0,s.eW)(function(t,e){let a=e.id,n={id:a,label:e.id,width:0,height:0},i=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&p(i),"end"===e.type&&u(i),("fork"===e.type||"join"===e.type)&&f(i,e),"note"===e.type&&w(e.note.text,i),"divider"===e.type&&h(i),"default"===e.type&&0===e.descriptions.length&&c(i,e),"default"===e.type&&e.descriptions.length>0&&x(i,e);let r=i.node().getBBox();return n.width=r.width+2*(0,d.nV)().state.padding,n.height=r.height+2*(0,d.nV)().state.padding,n},"drawState"),B=0,m=(0,s.eW)(function(t,e,a){let n=(0,s.eW)(function(t){switch(t){case i.oI.relationType.AGGREGATION:return"aggregation";case i.oI.relationType.EXTENSION:return"extension";case i.oI.relationType.COMPOSITION:return"composition";case i.oI.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));let g=e.points,l=(0,o.jvg)().x(function(t){return t.x}).y(function(t){return t.y}).curve(o.$0Z),p=t.append("path").attr("d",l(g)).attr("id","edge"+B).attr("class","transition"),h="";if((0,d.nV)().state.arrowMarkerAbsolute&&(h=(0,d.Gr)(!0)),p.attr("marker-end","url("+h+"#"+n(i.oI.relationType.DEPENDENCY)+"End)"),void 0!==a.title){let n=t.append("g").attr("class","stateLabel"),{x:i,y:o}=r.w8.calcLabelPosition(e.points),g=d.SY.getRows(a.title),l=0,p=[],h=0,c=0;for(let t=0;t<=g.length;t++){let e=n.append("text").attr("text-anchor","middle").text(g[t]).attr("x",i).attr("y",o+l),a=e.node().getBBox();h=Math.max(h,a.width),c=Math.min(c,a.x),s.cM.info(a.x,i,o+l),0===l&&(l=e.node().getBBox().height,s.cM.info("Title height",l,o)),p.push(e)}let x=l*g.length;if(g.length>1){let t=(g.length-1)*l*.5;p.forEach((e,a)=>e.attr("y",o+a*l-t)),x=l*g.length}let V=n.node().getBBox();n.insert("rect",":first-child").attr("class","box").attr("x",i-h/2-(0,d.nV)().state.padding/2).attr("y",o-x/2-(0,d.nV)().state.padding/2-3.5).attr("width",h+(0,d.nV)().state.padding).attr("height",x+(0,d.nV)().state.padding),s.cM.info(V)}B++},"drawEdge"),M={},k=(0,s.eW)(function(){},"setConf"),S=(0,s.eW)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),E=(0,s.eW)(function(t,e,a,i){let r;n=(0,d.nV)().state;let g=(0,d.nV)().securityLevel;"sandbox"===g&&(r=(0,o.Ys)("#i"+e));let l="sandbox"===g?(0,o.Ys)(r.nodes()[0].contentDocument.body):(0,o.Ys)("body"),p="sandbox"===g?r.nodes()[0].contentDocument:document;s.cM.debug("Rendering diagram "+t);let h=l.select(`[id='${e}']`);S(h),W(i.db.getRootDoc(),h,void 0,!1,l,p,i);let c=n.padding,x=h.node().getBBox(),V=x.width+2*c,u=x.height+2*c;(0,d.v2)(h,u,1.75*V,n.useMaxWidth),h.attr("viewBox",`${x.x-n.padding} ${x.y-n.padding} `+V+" "+u)},"draw"),N=(0,s.eW)(t=>t?t.length*n.fontSizeFactor:1,"getLabelWidth"),W=(0,s.eW)((t,e,a,i,r,o,p)=>{let h;let c=new l.k({compound:!0,multigraph:!0}),x=!0;for(h=0;h<t.length;h++)if("relation"===t[h].stmt){x=!1;break}a?c.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:x?1:n.edgeLengthFactor,nodeSep:x?1:50,isMultiGraph:!0}):c.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:x?1:n.edgeLengthFactor,nodeSep:x?1:50,ranker:"tight-tree",isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}});let u=p.db.getStates(),f=p.db.getRelations();for(let t of Object.keys(u)){let d;let s=u[t];if(a&&(s.parentId=a),s.doc){let t=e.append("g").attr("id",s.id).attr("class","stateGroup");d=W(s.doc,t,s.id,!i,r,o,p);{let e=(t=V(t,s,i)).node().getBBox();d.width=e.width,d.height=e.height+n.padding/2,M[s.id]={y:n.compositTitleSize}}}else d=b(e,s,c);if(s.note){let t=b(e,{descriptions:[],id:s.id+"-note",note:s.note,type:"note"},c);"left of"===s.note.position?(c.setNode(d.id+"-note",t),c.setNode(d.id,d)):(c.setNode(d.id,d),c.setNode(d.id+"-note",t)),c.setParent(d.id,d.id+"-group"),c.setParent(d.id+"-note",d.id+"-group")}else c.setNode(d.id,d)}s.cM.debug("Count=",c.nodeCount(),c);let y=0;f.forEach(function(t){y++,s.cM.debug("Setting edge",t),c.setEdge(t.id1,t.id2,{relation:t,width:N(t.title),height:n.labelHeight*d.SY.getRows(t.title).length,labelpos:"c"},"id"+y)}),(0,g.bK)(c),s.cM.debug("Graph after layout",c.nodes());let w=e.node();c.nodes().forEach(function(t){void 0!==t&&void 0!==c.node(t)?(s.cM.warn("Node "+t+": "+JSON.stringify(c.node(t))),r.select("#"+w.id+" #"+t).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y+(M[t]?M[t].y:0)-c.node(t).height/2)+" )"),r.select("#"+w.id+" #"+t).attr("data-x-shift",c.node(t).x-c.node(t).width/2),o.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach(t=>{let e=t.parentElement,a=0,n=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),Number.isNaN(n=parseInt(e.getAttribute("data-x-shift"),10))&&(n=0)),t.setAttribute("x1",0-n+8),t.setAttribute("x2",a-n-8)})):s.cM.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let B=w.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.cM.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),m(e,c.edge(t),c.edge(t).relation))}),B=w.getBBox();let k={id:a||"root",label:a||"root",width:0,height:0};return k.width=B.width+2*n.padding,k.height=B.height+2*n.padding,s.cM.debug("Doc rendered",k,c),k},"renderDoc"),v={parser:i.J8,get db(){return new i.oI(1)},renderer:{setConf:k,draw:E},styles:i.Ee,init:(0,s.eW)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{22241:function(e,t,n){Promise.resolve().then(n.t.bind(n,2778,23)),Promise.resolve().then(n.bind(n,18828))},18828:function(e,t,n){"use strict";n.d(t,{AppProviders:function(){return m}});var r=n(57437),s=n(69234);function o(e){let{locale:t,...n}=e;if(!t)throw Error(void 0);return(0,r.jsx)(s.Pj,{locale:t,...n})}var a=n(25922),l=n(43241),i=n(34021),c=n(14362);function m(e){let{children:t,locale:n,messages:s,timeZone:m,authEnabled:u=!1}=e;return(0,r.jsx)(o,{locale:n,messages:s,timeZone:m,children:(0,r.jsx)(a.f,{attribute:"class",defaultTheme:"dark",enableSystem:!1,children:(0,r.jsx)(c.H,{authEnabled:u,children:(0,r.jsx)(l.Hn,{children:(0,r.jsx)(i._I,{children:t})})})})})}},2778:function(){},25922:function(e,t,n){"use strict";n.d(t,{F:function(){return m},f:function(){return u}});var r=n(2265),s=(e,t,n,r,s,o,a,l)=>{let i=document.documentElement,c=["light","dark"];function m(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&o?s.map(e=>o[e]||e):s;n?(i.classList.remove(...r),i.classList.add(o&&o[t]?o[t]:t)):i.setAttribute(e,t)}),l&&c.includes(t)&&(i.style.colorScheme=t)}if(r)m(r);else try{let e=localStorage.getItem(t)||n,r=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;m(r)}catch(e){}},o=["light","dark"],a="(prefers-color-scheme: dark)",l="undefined"==typeof window,i=r.createContext(void 0),c={setTheme:e=>{},themes:[]},m=()=>{var e;return null!=(e=r.useContext(i))?e:c},u=e=>r.useContext(i)?r.createElement(r.Fragment,null,e.children):r.createElement(h,{...e}),d=["light","dark"],h=e=>{let{forcedTheme:t,disableTransitionOnChange:n=!1,enableSystem:s=!0,enableColorScheme:l=!0,storageKey:c="theme",themes:m=d,defaultTheme:u=s?"system":"light",attribute:h="data-theme",value:v,children:g,nonce:w,scriptProps:E}=e,[S,k]=r.useState(()=>y(c,u)),[C,T]=r.useState(()=>"system"===S?b():S),x=v?Object.values(v):m,A=r.useCallback(e=>{let t=e;if(!t)return;"system"===e&&s&&(t=b());let r=v?v[t]:t,a=n?p(w):null,i=document.documentElement,c=e=>{"class"===e?(i.classList.remove(...x),r&&i.classList.add(r)):e.startsWith("data-")&&(r?i.setAttribute(e,r):i.removeAttribute(e))};if(Array.isArray(h)?h.forEach(c):c(h),l){let e=o.includes(u)?u:null,n=o.includes(t)?t:e;i.style.colorScheme=n}null==a||a()},[w]),L=r.useCallback(e=>{let t="function"==typeof e?e(S):e;k(t);try{localStorage.setItem(c,t)}catch(e){}},[S]),_=r.useCallback(e=>{T(b(e)),"system"===S&&s&&!t&&A("system")},[S,t]);r.useEffect(()=>{let e=window.matchMedia(a);return e.addListener(_),_(e),()=>e.removeListener(_)},[_]),r.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?k(e.newValue):L(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[L]),r.useEffect(()=>{A(null!=t?t:S)},[t,S]);let j=r.useMemo(()=>({theme:S,setTheme:L,forcedTheme:t,resolvedTheme:"system"===S?C:S,themes:s?[...m,"system"]:m,systemTheme:s?C:void 0}),[S,L,t,C,s,m]);return r.createElement(i.Provider,{value:j},r.createElement(f,{forcedTheme:t,storageKey:c,attribute:h,enableSystem:s,enableColorScheme:l,defaultTheme:u,value:v,themes:m,nonce:w,scriptProps:E}),g)},f=r.memo(e=>{let{forcedTheme:t,storageKey:n,attribute:o,enableSystem:a,enableColorScheme:l,defaultTheme:i,value:c,themes:m,nonce:u,scriptProps:d}=e,h=JSON.stringify([o,n,i,t,m,c,a,l]).slice(1,-1);return r.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:"(".concat(s.toString(),")(").concat(h,")")}})}),y=(e,t)=>{let n;if(!l){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},b=e=>(e||(e=window.matchMedia(a)),e.matches?"dark":"light")}},function(e){e.O(0,[2461,9234,8528,2971,2117,1744],function(){return e(e.s=22241)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{14564:function(e,t,a){Promise.resolve().then(a.bind(a,66677))},66677:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return C}});var r=a(57437),s=a(2265),l=a(98704),n=a(27648),i=a(10789),d=a(38706),o=a(69234),c=a(45306),x=a(98408),m=a(3227);function p(e){let{worktree:t,onSessionKilled:a,onStatusChanged:l}=e,{id:p,name:h,description:u,updatedAt:g,isSessionRunning:y,isWaitingForResponse:b,favorite:v,status:f,link:j}=t,[k,N]=(0,s.useState)(!1),[w,C]=(0,s.useState)(v||!1),[S,z]=(0,s.useState)(!1),[P,A]=(0,s.useState)(f||null),[E,L]=(0,s.useState)(!1),T=(0,d.T)(),D=(0,o.bU)(),R=(0,x.G)(D),I=g?(0,c.Q)(new Date(g),{addSuffix:!0,locale:R}):null,M="main"===h||"master"===h,O=async e=>{if(e.preventDefault(),e.stopPropagation(),confirm(T("worktree.session.confirmKill",{name:h})))try{N(!0),await m.Iv.killSession(p),a&&a()}catch(t){let e=(0,m.zG)(t);alert("".concat(T("worktree.session.failedToKill"),": ").concat(e))}finally{N(!1)}},F=async e=>{e.preventDefault(),e.stopPropagation();try{z(!0);let e=!w;await m.Iv.toggleFavorite(p,e),C(e)}catch(t){let e=(0,m.zG)(t);alert("".concat(T("worktree.errors.failedToUpdateFavorite"),": ").concat(e))}finally{z(!1)}},U=async(e,t)=>{t.preventDefault(),t.stopPropagation();try{L(!0),await m.Iv.updateStatus(p,e),A(e),l&&l()}catch(t){let e=(0,m.zG)(t);alert("".concat(T("worktree.errors.failedToUpdateStatus"),": ").concat(e))}finally{L(!1)}};return(0,r.jsx)(n.default,{href:"/worktrees/".concat(p),className:"block",children:(0,r.jsxs)(i.Zb,{hover:!0,padding:"lg",className:"h-full",children:[(0,r.jsx)(i.Ol,{children:(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsxs)(i.ll,{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)("button",{onClick:F,disabled:S,className:"flex-shrink-0 transition-colors hover:scale-110",title:w?T("common.favorites.remove"):T("common.favorites.add"),children:(0,r.jsx)("svg",{className:"w-5 h-5 ".concat(w?"fill-yellow-400 text-yellow-400":"fill-none text-gray-400"),stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})})}),(0,r.jsx)("span",{className:"truncate",children:h}),M&&(0,r.jsx)(i.Ct,{variant:"info",children:"Main"}),y&&b&&(0,r.jsx)(i.Ct,{variant:"warning",dot:!0,children:T("worktree.status.waitingForResponse")}),y&&!b&&(0,r.jsx)(i.Ct,{variant:"success",dot:!0,children:T("worktree.status.responseCompleted")})]}),y&&(0,r.jsx)(i.zx,{variant:"danger",size:"sm",onClick:O,disabled:k,className:"flex-shrink-0",children:k?T("common.ending"):T("common.end")})]})}),(0,r.jsx)(i.aY,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[u&&(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:"Description"}),(0,r.jsx)("p",{className:"text-sm text-gray-700 dark:text-gray-300 line-clamp-2 whitespace-pre-wrap",children:u})]}),j&&(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:"Link"}),(0,r.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),j&&window.open(j,"_blank","noopener,noreferrer")},className:"flex items-center gap-1 text-sm text-cyan-600 dark:text-cyan-400 hover:text-cyan-800 dark:hover:text-cyan-300 hover:underline transition-colors",title:"Open link in new tab",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),(0,r.jsx)("span",{className:"truncate",children:j})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:"Status"}),(0,r.jsxs)("div",{className:"flex gap-1 flex-wrap",children:[(0,r.jsx)("button",{onClick:e=>U(null,e),disabled:E,className:"px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ".concat(null===P?"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-400 dark:border-gray-500":"bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700"),children:"Not set"}),(0,r.jsx)("button",{onClick:e=>U("todo",e),disabled:E,className:"px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ".concat("todo"===P?"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-400 dark:border-gray-500":"bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700"),children:"ToDo"}),(0,r.jsx)("button",{onClick:e=>U("doing",e),disabled:E,className:"px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ".concat("doing"===P?"bg-cyan-100 dark:bg-cyan-900 text-cyan-700 dark:text-cyan-300 border-cyan-400 dark:border-cyan-600":"bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600 hover:bg-cyan-50 dark:hover:bg-gray-700"),children:"Doing"}),(0,r.jsx)("button",{onClick:e=>U("done",e),disabled:E,className:"px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ".concat("done"===P?"bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300 border-green-400 dark:border-green-600":"bg-white dark:bg-gray-800 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600 hover:bg-green-50 dark:hover:bg-gray-700"),children:"Done"})]})]}),I&&(0,r.jsxs)("div",{className:"flex items-center text-xs text-gray-500 dark:text-gray-400",children:[(0,r.jsx)("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsxs)("span",{children:["Updated ",I]})]})]})})]})})}function h(e){let{initialWorktrees:t=[]}=e,[a,l]=(0,s.useState)(t),[n,d]=(0,s.useState)([]),[o,c]=(0,s.useState)(!t.length),[x,h]=(0,s.useState)(null),[u,g]=(0,s.useState)(""),[y,b]=(0,s.useState)("updated"),[v,f]=(0,s.useState)("desc"),[j,k]=(0,s.useState)(null),[N,w]=(0,s.useState)(null),[C,S]=(0,s.useState)(null),[z,P]=(0,s.useState)([]),[A,E]=(0,s.useState)(!1),[L,T]=(0,s.useState)(null),D=(0,s.useCallback)(async()=>{try{let e=await m.J1.getExcluded();e.success&&P(e.repositories)}catch(e){}},[]),R=(0,s.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{e||c(!0),h(null);let t=await m.Iv.getAll();l(t.worktrees),d(t.repositories)}catch(e){h((0,m.zG)(e))}finally{e||c(!1)}},[]),I=e=>!!(e&&"session_status_changed"===e.type),{status:M}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{worktreeIds:t=[],onMessage:a,onStatusChange:r,autoReconnect:l=!0,reconnectDelay:n=3e3}=e,[i,d]=(0,s.useState)("disconnected"),o=(0,s.useRef)(null),c=(0,s.useRef)(),x=(0,s.useRef)(new Set),m=(0,s.useCallback)(e=>{d(e),null==r||r(e)},[r]),p=(0,s.useCallback)(()=>{var e;if((null===(e=o.current)||void 0===e?void 0:e.readyState)===WebSocket.OPEN)return;m("connecting");let t="https:"===window.location.protocol?"wss:":"ws:",r=new WebSocket("".concat(t,"//").concat(window.location.host));r.onopen=()=>{m("connected"),x.current.forEach(e=>{r.send(JSON.stringify({type:"subscribe",worktreeId:e}))})},r.onmessage=e=>{try{let t=JSON.parse(e.data);null==a||a(t)}catch(e){console.error("Failed to parse WebSocket message:",e)}},r.onerror=()=>{m("error")},r.onclose=()=>{m("disconnected"),o.current=null,l&&(c.current=setTimeout(()=>{p()},n))},o.current=r},[m,a,l,n]),h=(0,s.useCallback)(()=>{c.current&&clearTimeout(c.current),o.current&&(o.current.close(1e3,"Client disconnect"),o.current=null),m("disconnected")},[m]),u=(0,s.useCallback)(e=>{var t;(null===(t=o.current)||void 0===t?void 0:t.readyState)===WebSocket.OPEN&&(o.current.send(JSON.stringify({type:"subscribe",worktreeId:e})),x.current.add(e))},[]),g=(0,s.useCallback)(e=>{var t;(null===(t=o.current)||void 0===t?void 0:t.readyState)===WebSocket.OPEN&&(o.current.send(JSON.stringify({type:"unsubscribe",worktreeId:e})),x.current.delete(e))},[]),y=(0,s.useCallback)(e=>{var t;(null===(t=o.current)||void 0===t?void 0:t.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(e))},[]);return(0,s.useEffect)(()=>(p(),()=>{h()}),[]),(0,s.useEffect)(()=>{"connected"===i&&t.length>0&&t.forEach(e=>{u(e)})},[i,t]),{status:i,subscribe:u,unsubscribe:g,sendMessage:y,connect:p,disconnect:h}}({onMessage:(0,s.useCallback)(e=>{if(I(e.data)){let t=e.data;l(e=>e.map(e=>e.id===t.worktreeId?{...e,isSessionRunning:t.isRunning}:e))}"broadcast"===e.type&&R(!0)},[R])});(0,s.useEffect)(()=>{t.length||R(),D()},[t.length,R,D]),(0,s.useEffect)(()=>{let e=setInterval(()=>{R(!0)},5e3);return()=>clearInterval(e)},[R]),(0,s.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&R(!0)};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[R]);let O=(0,s.useMemo)(()=>{let e=[...a];if(j&&(e=e.filter(e=>e.repositoryPath===j)),null!==N&&(e="unset"===N?e.filter(e=>!e.status):e.filter(e=>e.status===N)),u){let t=u.toLowerCase();e=e.filter(e=>{var a,r;return e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)||e.repositoryName.toLowerCase().includes(t)||(null===(a=e.lastMessageSummary)||void 0===a?void 0:a.toLowerCase().includes(t))||(null===(r=e.description)||void 0===r?void 0:r.toLowerCase().includes(t))})}return e.sort((e,t)=>{let a=0;switch(y){case"name":a=e.name.localeCompare(t.name);break;case"updated":a=(e.updatedAt?new Date(e.updatedAt).getTime():0)-(t.updatedAt?new Date(t.updatedAt).getTime():0);break;case"favorite":a=(e.favorite?1:0)-(t.favorite?1:0)}return"asc"===v?a:-a}),e},[a,j,N,u,y,v]),F=(0,s.useMemo)(()=>{let e=new Map;for(let t of O){let a=t.repositoryPath||"unknown";e.has(a)||e.set(a,[]),e.get(a).push(t)}return e},[O]),U=e=>{y===e?f(e=>"asc"===e?"desc":"asc"):(b(e),f("asc"))},W=async e=>{T(e);try{let t=await m.J1.restore(e);t.warning&&h(t.warning),await R(),await D()}catch(e){h((0,m.zG)(e))}finally{T(null)}},_=async(e,t)=>{var a;let r=(null===(a=n.find(t=>t.path===e))||void 0===a?void 0:a.worktreeCount)||0;if("delete"===prompt('Delete repository "'.concat(t,'"?\n\nThis will delete:\n- ').concat(r,' worktree(s)\n- Related chat history\n- Related memos\n\n* Log files will be preserved\n\nThis repository will be added to the exclusion list.\nIt will NOT be re-registered when you run "Sync All".\nYou can restore it from the excluded repositories list.\n\nType "delete" to confirm:'))){S(e);try{await m.J1.delete(e),j===e&&k(null),await R(),await D()}catch(e){h((0,m.zG)(e))}finally{S(null)}}};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsxs)(i.Ct,{variant:"gray",children:[a.length," branches"]}),n.length>0&&(0,r.jsxs)(i.Ct,{variant:"info",children:[n.length," ",1===n.length?"repository":"repositories"]}),"connected"===M&&(0,r.jsx)(i.Ct,{variant:"success",dot:!0,children:"Live"})]}),(0,r.jsx)("div",{className:"flex gap-2 w-full sm:w-auto",children:(0,r.jsx)(i.zx,{variant:"secondary",size:"sm",onClick:()=>R(),disabled:o,children:o?"Loading...":"Refresh"})})]}),(0,r.jsx)("div",{className:"flex flex-col sm:flex-row gap-3",children:(0,r.jsx)("input",{type:"text",placeholder:"Search worktrees...",value:u,onChange:e=>g(e.target.value),className:"input flex-1"})}),n.length>0&&(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap items-center",children:[(0,r.jsxs)(i.zx,{variant:null===j?"primary":"ghost",size:"sm",onClick:()=>k(null),children:["All (",a.length,")"]}),n.map(e=>(0,r.jsxs)("div",{className:"relative group inline-flex items-center",children:[(0,r.jsxs)(i.zx,{variant:j===e.path?"primary":"ghost",size:"sm",onClick:()=>k(e.path),className:"pr-6",children:[e.name," (",e.worktreeCount,")"]}),(0,r.jsx)("button",{className:"absolute right-1 opacity-0 group-hover:opacity-100 text-gray-400 hover:text-red-500 transition-opacity px-1",onClick:t=>{t.stopPropagation(),_(e.path,e.name)},disabled:C===e.path,title:"Delete repository",children:C===e.path?"...":"x"})]},e.path))]}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap items-center",children:[(0,r.jsx)(i.zx,{variant:null===N?"primary":"ghost",size:"sm",onClick:()=>w(null),children:"All"}),(0,r.jsx)(i.zx,{variant:"todo"===N?"primary":"ghost",size:"sm",onClick:()=>w("todo"),children:"\uD83D\uDCDD ToDo"}),(0,r.jsx)(i.zx,{variant:"doing"===N?"primary":"ghost",size:"sm",onClick:()=>w("doing"),children:"\uD83D\uDEA7 Doing"}),(0,r.jsx)(i.zx,{variant:"done"===N?"primary":"ghost",size:"sm",onClick:()=>w("done"),children:"✅ Done"}),(0,r.jsx)(i.zx,{variant:"unset"===N?"primary":"ghost",size:"sm",onClick:()=>w("unset"),children:"Not set"})]}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-400 self-center",children:"Sort by:"}),(0,r.jsxs)(i.zx,{variant:"favorite"===y?"primary":"ghost",size:"sm",onClick:()=>U("favorite"),children:["⭐ Favorite ","favorite"===y&&("asc"===v?"↑":"↓")]}),(0,r.jsxs)(i.zx,{variant:"name"===y?"primary":"ghost",size:"sm",onClick:()=>U("name"),children:["Name ","name"===y&&("asc"===v?"↑":"↓")]}),(0,r.jsxs)(i.zx,{variant:"updated"===y?"primary":"ghost",size:"sm",onClick:()=>U("updated"),children:["Updated ","updated"===y&&("asc"===v?"↑":"↓")]})]}),x&&(0,r.jsx)("div",{className:"p-4 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg",children:(0,r.jsx)("p",{className:"text-sm text-red-800 dark:text-red-300",children:x})}),o&&!a.length&&(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 dark:border-gray-600 border-t-cyan-600"}),(0,r.jsx)("p",{className:"mt-4 text-gray-600 dark:text-gray-400",children:"Loading worktrees..."})]}),!o&&!x&&0===O.length&&(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),(0,r.jsx)("p",{className:"mt-4 text-gray-600 dark:text-gray-400",children:u?"No worktrees found matching your search":"No worktrees found"})]}),!o&&O.length>0&&(0,r.jsx)("div",{className:"space-y-8",children:Array.from(F.entries()).map(e=>{let[t,a]=e,s=n.find(e=>e.path===t),l=(null==s?void 0:s.name)||"Unknown Repository";return(0,r.jsxs)("div",{className:"space-y-4",children:[(n.length>1||!j)&&(0,r.jsxs)("div",{className:"flex items-center gap-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[(0,r.jsx)("h3",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:l}),(0,r.jsx)(i.Ct,{variant:"gray",children:a.length})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map(e=>(0,r.jsx)(p,{worktree:e,onSessionKilled:R,onStatusChanged:R},e.id))})]},t)})}),z.length>0&&(0,r.jsxs)("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg",children:[(0,r.jsxs)("button",{className:"w-full flex items-center justify-between p-4 text-left hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",onClick:()=>E(!A),children:[(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Excluded Repositories (",z.length,")"]}),(0,r.jsx)("span",{className:"text-gray-400 text-sm",children:A?"Hide":"Show"})]}),A&&(0,r.jsx)("div",{className:"border-t border-gray-200 dark:border-gray-700 divide-y divide-gray-100 dark:divide-gray-800",children:z.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:e.name}),(0,r.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:e.path})]}),(0,r.jsx)(i.zx,{variant:"secondary",size:"sm",onClick:()=>W(e.path),disabled:L===e.path,children:L===e.path?"Restoring...":"Restore"})]},e.id))})]})]})}a(99376),a(74707),a(34343),a(6940),a(43616);class u{static getInstance(){return u.instance||(u.instance=new u),u.instance}normalize(e){let t=e.match(/^ssh:\/\/git@([^:\/]+)(:\d+)?\/(.+?)(\.git)?$/);if(t)return"https://".concat(t[1],"/").concat(t[3]).toLowerCase().replace(/\/$/,"");let a=e.match(/^git@([^:]+):(.+?)(\.git)?$/);return a?"https://".concat(a[1],"/").concat(a[2]).toLowerCase().replace(/\/$/,""):e.replace(/\.git\/?$/,"").replace(/\/$/,"").toLowerCase()}isSameRepository(e,t){return this.normalize(e)===this.normalize(t)}extractRepoName(e){let t=e.match(/^ssh:\/\/git@[^\/]+\/(.+?)(\.git)?$/);if(t){let e=t[1].split("/");return e[e.length-1]}let a=e.match(/:(.+?)(\.git)?$/);if(a&&e.startsWith("git@")){let e=a[1].split("/");return e[e.length-1]}let r=e.match(/\/([^\/]+?)(\.git)?$/);return r?r[1]:""}getUrlType(e){return e.startsWith("https://")?"https":e.startsWith("git@")||e.startsWith("ssh://")?"ssh":null}validate(e){if(!e||"string"!=typeof e||""===e.trim())return{valid:!1,error:"EMPTY_URL"};let t=e.trim();return t.startsWith("https://")?/^https:\/\/[^\/]+\/[^\/]+\/[^\/]+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}:t.startsWith("git@")?/^git@[^:]+:.+\/.+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}:t.startsWith("ssh://")&&/^ssh:\/\/git@[^\/]+(:\d+)?\/[^\/]+\/.+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}}constructor(){}}function g(e){let{onRepositoryAdded:t}=e,[a,l]=(0,s.useState)(!1),[n,d]=(0,s.useState)("local"),[o,c]=(0,s.useState)(""),[x,p]=(0,s.useState)(""),[h,g]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[v,f]=(0,s.useState)(!1),[j,k]=(0,s.useState)(null),[N,w]=(0,s.useState)(null),[C,S]=(0,s.useState)(null),z=u.getInstance(),P=(0,s.useCallback)(async e=>{try{let r=await m.J1.getCloneStatus(e);if("completed"===r.status)S("Repository cloned successfully"),f(!1),k(null),p(""),l(!1),t&&t();else if("failed"===r.status){var a;w((null===(a=r.error)||void 0===a?void 0:a.message)||"Clone failed"),f(!1),k(null)}else("running"===r.status||"pending"===r.status)&&setTimeout(()=>P(e),2e3)}catch(e){w((0,m.zG)(e)),f(!1),k(null)}},[t]);(0,s.useEffect)(()=>{j&&v&&P(j)},[j,v,P]);let A=async e=>{if(e.preventDefault(),!o.trim()){w("Repository path is required");return}w(null),S(null),g(!0);try{let e=await m.J1.scan(o);S(e.message),c(""),l(!1),t&&t()}catch(e){w((0,m.zG)(e))}finally{g(!1)}},E=async e=>{if(e.preventDefault(),!x.trim()){w("Clone URL is required");return}let t=z.validate(x.trim());if(!t.valid){"EMPTY_URL"===t.error?w("Clone URL is required"):w("Invalid URL format");return}w(null),S(null),f(!0);try{let e=await m.J1.clone(x.trim());k(e.jobId)}catch(e){w((0,m.zG)(e)),f(!1)}},L=async()=>{w(null),S(null),b(!0);try{let e=await m.J1.sync();S(e.message),t&&t()}catch(e){w((0,m.zG)(e))}finally{b(!1)}},T=()=>{l(!1),c(""),p(""),w(null),d("local")};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[!a&&(0,r.jsx)(i.zx,{variant:"primary",size:"sm",onClick:()=>l(!0),children:"+ Add Repository"}),(0,r.jsx)(i.zx,{variant:"secondary",size:"sm",onClick:L,disabled:y,children:y?"Syncing...":"Sync All"})]}),a&&(0,r.jsx)(i.Zb,{padding:"lg",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{children:(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2 dark:text-gray-100",children:"Add New Repository"})}),(0,r.jsxs)("div",{className:"flex border-b border-gray-200 dark:border-gray-700",role:"tablist",children:[(0,r.jsx)("button",{role:"tab","aria-selected":"local"===n,onClick:()=>d("local"),className:"px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ".concat("local"===n?"border-cyan-500 text-cyan-600 dark:text-cyan-400":"border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"),children:"Local Path"}),(0,r.jsx)("button",{role:"tab","aria-selected":"url"===n,onClick:()=>d("url"),className:"px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ".concat("url"===n?"border-cyan-500 text-cyan-600 dark:text-cyan-400":"border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"),children:"Clone URL"})]}),"local"===n&&(0,r.jsxs)("form",{onSubmit:A,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4",children:"Enter the absolute path to a git repository containing worktrees."}),(0,r.jsx)("label",{htmlFor:"repositoryPath",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:"Repository Path"}),(0,r.jsx)("input",{id:"repositoryPath",type:"text",value:o,onChange:e=>c(e.target.value),placeholder:"/absolute/path/to/repository",className:"input w-full font-mono text-sm",disabled:h}),(0,r.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Example: /Users/username/projects/my-repo"})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.zx,{type:"submit",variant:"primary",disabled:h||!o.trim(),children:h?"Scanning...":"Scan & Add"}),(0,r.jsx)(i.zx,{type:"button",variant:"ghost",onClick:T,disabled:h,children:"Cancel"})]})]}),"url"===n&&(0,r.jsxs)("form",{onSubmit:E,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4",children:"Enter a git clone URL to clone a remote repository."}),(0,r.jsx)("label",{htmlFor:"cloneUrl",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:"Clone URL"}),(0,r.jsx)("input",{id:"cloneUrl",type:"text",value:x,onChange:e=>p(e.target.value),placeholder:"https://github.com/user/repo.git",className:"input w-full font-mono text-sm",disabled:v}),(0,r.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Supports HTTPS and SSH URLs"})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.zx,{type:"submit",variant:"primary",disabled:v||!x.trim(),children:v?"Cloning...":"Clone"}),(0,r.jsx)(i.zx,{type:"button",variant:"ghost",onClick:T,disabled:v,children:"Cancel"})]})]})]})}),C&&(0,r.jsx)("div",{className:"p-4 bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-800 rounded-lg",children:(0,r.jsx)("p",{className:"text-sm text-green-800 dark:text-green-300",children:C})}),N&&(0,r.jsx)("div",{className:"p-4 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg",children:(0,r.jsx)("p",{className:"text-sm text-red-800 dark:text-red-300",children:N})})]})}function y(e){var t;let{appId:a,pollInterval:l=3e4,showResponseTime:n=!1,compact:i=!1}=e,[d,o]=(0,s.useState)(null),[c,x]=(0,s.useState)(!0),m=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/external-apps/".concat(a,"/health"));if(e.ok){let t=await e.json();o(t)}else o({id:a,healthy:!1,lastChecked:Date.now(),error:"Failed to check health"})}catch(e){o({id:a,healthy:!1,lastChecked:Date.now(),error:"Network error"})}finally{x(!1)}},[a]);if((0,s.useEffect)(()=>{m();let e=setInterval(m,l);return()=>clearInterval(e)},[m,l]),c)return(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-gray-300 dark:bg-gray-600 animate-pulse"}),!i&&(0,r.jsx)("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Checking..."})]});let p=null!==(t=null==d?void 0:d.healthy)&&void 0!==t&&t,h=p?"bg-green-500":"bg-gray-400",u=p?"Running":"Stopped";return i?(0,r.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full ".concat(h),title:u}):(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-full ".concat(h)}),(0,r.jsx)("span",{className:"text-xs ".concat(p?"text-green-600 dark:text-green-400":"text-gray-500 dark:text-gray-400"),children:u}),n&&(null==d?void 0:d.responseTime)!==void 0&&(0,r.jsxs)("span",{className:"text-xs text-gray-400",children:["(",d.responseTime,"ms)"]})]})}function b(e){var t;let{app:a,onEdit:l,onDelete:n}=e,[d,o]=(0,s.useState)(!1),[c,x]=(0,s.useState)(!1),m=async()=>{x(!0);try{await n(a.id)}finally{x(!1),o(!1)}},p="/proxy/".concat(a.pathPrefix,"/");return(0,r.jsxs)(i.Zb,{padding:"md",className:"relative",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h4",{className:"text-base font-semibold text-gray-900 dark:text-gray-100 truncate",children:a.displayName}),(0,r.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 font-mono truncate",children:a.name})]}),(0,r.jsx)(i.Ct,{variant:{sveltekit:"warning",streamlit:"error",nextjs:"info",other:"gray"}[a.appType]||"gray",children:{sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"}[t=a.appType]||t})]}),(0,r.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:"Status"}),(0,r.jsx)(y,{appId:a.id,pollInterval:3e4})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:"Port"}),(0,r.jsxs)("span",{className:"text-sm font-mono text-gray-900 dark:text-gray-100",children:[":",a.targetPort]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:"Path"}),(0,r.jsxs)("span",{className:"text-sm font-mono text-gray-900 dark:text-gray-100 truncate max-w-[150px]",children:["/proxy/",a.pathPrefix,"/"]})]}),a.websocketEnabled&&(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:"WebSocket"}),(0,r.jsx)(i.Ct,{variant:"info",children:"Enabled"})]}),!a.enabled&&(0,r.jsx)("div",{className:"mt-2 py-1 px-2 bg-yellow-50 dark:bg-yellow-900/30 border border-yellow-200 dark:border-yellow-700 rounded text-xs text-yellow-700 dark:text-yellow-300",children:"This app is disabled"})]}),d?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:['Delete "',a.displayName,'"?']}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.zx,{variant:"danger",size:"sm",onClick:m,disabled:c,loading:c,children:"Delete"}),(0,r.jsx)(i.zx,{variant:"ghost",size:"sm",onClick:()=>o(!1),disabled:c,children:"Cancel"})]})]}):(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(i.zx,{variant:"primary",size:"sm",onClick:()=>window.open(p,"_blank"),disabled:!a.enabled,children:"Open"}),(0,r.jsx)(i.zx,{variant:"secondary",size:"sm",onClick:()=>l(a),children:"Settings"}),(0,r.jsx)(i.zx,{variant:"ghost",size:"sm",onClick:()=>o(!0),className:"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/30",children:"Delete"})]})]})}let v={MIN:1024,MAX:65535},f=/^[a-zA-Z0-9-]+$/,j={sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"},k=["sveltekit","streamlit","nextjs","other"].map(e=>({value:e,label:j[e]}));function N(e){let{isOpen:t,onClose:a,editApp:l,onSave:n}=e,d=!!l,[o,c]=(0,s.useState)(""),[x,m]=(0,s.useState)(""),[p,h]=(0,s.useState)(""),[u,g]=(0,s.useState)(""),[y,b]=(0,s.useState)(""),[j,N]=(0,s.useState)(!1),[w,C]=(0,s.useState)(""),[S,z]=(0,s.useState)(!0),[P,A]=(0,s.useState)({}),[E,L]=(0,s.useState)(!1),[T,D]=(0,s.useState)(null);(0,s.useEffect)(()=>{t&&(l?(c(l.displayName),m(l.name),h(l.pathPrefix),g(l.targetPort),b(l.appType),N(l.websocketEnabled),C(l.description||""),z(l.enabled)):(c(""),m(""),h(""),g(""),b(""),N(!1),C(""),z(!0)),A({}),D(null))},[t,l]);let R=async e=>{e.preventDefault(),D(null);let t=function(e,t){var a,r,s,l;let n={};return((null===(a=e.displayName)||void 0===a?void 0:a.trim())||(n.displayName="Display name is required"),t||((null===(r=e.name)||void 0===r?void 0:r.trim())?f.test(e.name)||(n.name="Only alphanumeric characters and hyphens are allowed"):n.name="Identifier name is required",(null===(s=e.pathPrefix)||void 0===s?void 0:s.trim())?f.test(e.pathPrefix)||(n.pathPrefix="Only alphanumeric characters and hyphens are allowed"):n.pathPrefix="Path prefix is required"),e.targetPort)?"number"!=typeof e.targetPort||Number.isInteger(l=e.targetPort)&&l>=v.MIN&&l<=v.MAX||(n.targetPort="Port must be between ".concat(v.MIN," and ").concat(v.MAX)):n.targetPort="Port number is required",t||e.appType||(n.appType="App type is required"),n}({displayName:o,name:x,pathPrefix:p,targetPort:u,appType:y},d);if(Object.keys(t).length>0){A(t);return}A({}),L(!0);try{if(d&&l){let e=await fetch("/api/external-apps/".concat(l.id),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:o,description:w||void 0,targetPort:u||void 0,websocketEnabled:j,enabled:S})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to update app")}}else{let e=await fetch("/api/external-apps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:o,name:x,pathPrefix:p,targetPort:u,appType:y,websocketEnabled:j,description:w||void 0})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to create app")}}n(),a()}catch(e){D(e instanceof Error?e.message:"An error occurred")}finally{L(!1)}};return(0,r.jsx)(i.u_,{isOpen:t,onClose:a,title:d?"Edit External App":"Add External App",size:"md",children:(0,r.jsxs)("form",{onSubmit:R,className:"space-y-4",children:[(0,r.jsx)("div",{className:"rounded-md bg-amber-50 dark:bg-amber-900/30 p-3 mb-4 border border-amber-200 dark:border-amber-700",children:(0,r.jsx)("p",{className:"text-sm text-amber-800 dark:text-amber-300",children:"Proxied apps run under the CommandMate origin and can access CommandMate APIs. Only register trusted applications."})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"displayName",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1",children:["Display Name ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("input",{id:"displayName",type:"text",value:o,onChange:e=>c(e.target.value),className:"input w-full ".concat(P.displayName?"border-red-500":""),placeholder:"My App",disabled:E}),P.displayName&&(0,r.jsx)("p",{className:"mt-1 text-xs text-red-500",children:P.displayName})]}),!d&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1",children:["Identifier Name ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("input",{id:"name",type:"text",value:x,onChange:e=>m(e.target.value),className:"input w-full font-mono ".concat(P.name?"border-red-500":""),placeholder:"my-app",disabled:E}),(0,r.jsx)("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Alphanumeric and hyphens only. Cannot be changed later."}),P.name&&(0,r.jsx)("p",{className:"mt-1 text-xs text-red-500",children:P.name})]}),!d&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"pathPrefix",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1",children:["Path Prefix ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400 mr-1",children:"/proxy/"}),(0,r.jsx)("input",{id:"pathPrefix",type:"text",value:p,onChange:e=>h(e.target.value),className:"input flex-1 font-mono ".concat(P.pathPrefix?"border-red-500":""),placeholder:"app-name",disabled:E}),(0,r.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400 ml-1",children:"/"})]}),(0,r.jsx)("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"URL path for accessing this app. Cannot be changed later."}),P.pathPrefix&&(0,r.jsx)("p",{className:"mt-1 text-xs text-red-500",children:P.pathPrefix})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"targetPort",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1",children:["Port Number ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("input",{id:"targetPort",type:"number",value:u,onChange:e=>g(e.target.value?parseInt(e.target.value,10):""),className:"input w-full font-mono ".concat(P.targetPort?"border-red-500":""),placeholder:"5173",min:v.MIN,max:v.MAX,disabled:E}),(0,r.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["Target port (",v.MIN,"-",v.MAX,")"]}),P.targetPort&&(0,r.jsx)("p",{className:"mt-1 text-xs text-red-500",children:P.targetPort})]}),!d&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"appType",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1",children:["App Type ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)("select",{id:"appType",value:y,onChange:e=>b(e.target.value),className:"input w-full ".concat(P.appType?"border-red-500":""),disabled:E,children:[(0,r.jsx)("option",{value:"",children:"Select app type..."}),k.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))]}),P.appType&&(0,r.jsx)("p",{className:"mt-1 text-xs text-red-500",children:P.appType})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-1",children:"Description"}),(0,r.jsx)("textarea",{id:"description",value:w,onChange:e=>C(e.target.value),className:"input w-full",placeholder:"Optional description...",rows:2,disabled:E})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{id:"websocketEnabled",type:"checkbox",checked:j,onChange:e=>N(e.target.checked),className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500",disabled:E}),(0,r.jsx)("label",{htmlFor:"websocketEnabled",className:"ml-2 text-sm text-gray-700 dark:text-gray-200",children:"Enable WebSocket support"})]}),d&&(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{id:"enabled",type:"checkbox",checked:S,onChange:e=>z(e.target.checked),className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500",disabled:E}),(0,r.jsx)("label",{htmlFor:"enabled",className:"ml-2 text-sm text-gray-700 dark:text-gray-200",children:"App is enabled"})]}),T&&(0,r.jsx)("div",{className:"p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded text-sm text-red-700 dark:text-red-300",children:T}),(0,r.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,r.jsx)(i.zx,{type:"button",variant:"ghost",onClick:a,disabled:E,children:"Cancel"}),(0,r.jsx)(i.zx,{type:"submit",variant:"primary",loading:E,children:d?"Save Changes":"Add App"})]})]})})}function w(){let[e,t]=(0,s.useState)([]),[a,l]=(0,s.useState)(!0),[n,d]=(0,s.useState)(null),[o,c]=(0,s.useState)(!1),[x,m]=(0,s.useState)(null),p=(0,s.useCallback)(async()=>{try{d(null);let e=await fetch("/api/external-apps");if(!e.ok)throw Error("Failed to fetch external apps");let a=await e.json();t(a.apps||[])}catch(e){d(e instanceof Error?e.message:"An error occurred")}finally{l(!1)}},[]);(0,s.useEffect)(()=>{p();let e=setInterval(p,6e4);return()=>clearInterval(e)},[p]);let h=(0,s.useCallback)(e=>{m(e),c(!0)},[]),u=(0,s.useCallback)(()=>{m(null),c(!0)},[]),g=(0,s.useCallback)(async e=>{try{let t=await fetch("/api/external-apps/".concat(e),{method:"DELETE"});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to delete app")}p()}catch(e){console.error("Failed to delete app:",e)}},[p]),y=(0,s.useCallback)(()=>{p()},[p]),v=(0,s.useCallback)(()=>{c(!1),m(null)},[]);return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:"External Apps"}),(0,r.jsx)(i.zx,{variant:"primary",size:"sm",onClick:u,children:"+ Add App"})]}),a?(0,r.jsx)(i.Zb,{padding:"lg",children:(0,r.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-cyan-600"}),(0,r.jsx)("span",{className:"ml-3 text-gray-600 dark:text-gray-300",children:"Loading apps..."})]})}):n?(0,r.jsx)(i.Zb,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("p",{className:"text-red-600 dark:text-red-400 mb-4",children:"Failed to load external apps"}),(0,r.jsx)(i.zx,{variant:"secondary",size:"sm",onClick:p,children:"Retry"})]})}):0===e.length?(0,r.jsx)(i.Zb,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:"No external apps registered yet."}),(0,r.jsx)("p",{className:"text-sm text-gray-400 dark:text-gray-500 mb-4",children:"Add an external app to proxy requests to other frontend applications."}),(0,r.jsx)(i.zx,{variant:"primary",size:"sm",onClick:u,children:"Add Your First App"})]})}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(e=>(0,r.jsx)(b,{app:e,onEdit:h,onDelete:g},e.id))}),(0,r.jsx)(N,{isOpen:o,onClose:v,editApp:x,onSave:y})]})}function C(){let[e,t]=(0,s.useState)(0),a=(0,s.useCallback)(()=>{t(e=>e+1)},[]);return(0,r.jsx)(l.Vw,{children:(0,r.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("h1",{className:"mb-2",children:"CommandMate"}),(0,r.jsxs)("p",{className:"text-base text-gray-600 dark:text-gray-400",children:["Stop managing terminal tabs. Start running issue-driven development.",(0,r.jsx)("br",{}),"CommandMate helps you refine issues, run them in parallel, switch agents when needed, and keep work moving wherever you are."]})]}),(0,r.jsx)("div",{className:"mb-8",children:(0,r.jsx)(g,{onRepositoryAdded:a})}),(0,r.jsx)(h,{},e),(0,r.jsx)("div",{className:"mt-8",children:(0,r.jsx)(w,{})})]})})}}},function(e){e.O(0,[9234,216,12,8528,2083,2971,2117,1744],function(){return e(e.s=14564)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5441],{20084:function(e,r,s){Promise.resolve().then(s.bind(s,50653))},99376:function(e,r,s){"use strict";var t=s(35475);s.o(t,"useParams")&&s.d(r,{useParams:function(){return t.useParams}}),s.o(t,"useRouter")&&s.d(r,{useRouter:function(){return t.useRouter}})},50653:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return x}});var t=s(57437),n=s(2265),a=s(99376),o=s(38706),l=s(10789),i=s(53012),c=s(23260),d=s(12158),m=s(39625),u=s(1243);function x(){let e=(0,a.useRouter)(),r=(0,a.useParams)(),s=(0,o.T)("common"),x=r.id,h=r.path.join("/"),[f,p]=(0,n.useState)(null),[g,b]=(0,n.useState)(!0),[y,j]=(0,n.useState)(null),v=(null==f?void 0:f.extension)==="md"||(null==f?void 0:f.extension)==="markdown";return(0,n.useEffect)(()=>{(async()=>{b(!0),j(null);try{let e=await fetch("/api/worktrees/".concat(x,"/files/").concat(h));if(!e.ok){let r=await e.json();throw Error(r.error||"Failed to load file")}let r=await e.json();p(r)}catch(e){j(e instanceof Error?e.message:"Failed to load file")}finally{b(!1)}})()},[x,h]),(0,t.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,t.jsx)("div",{className:"sticky top-0 z-10 bg-white border-b border-gray-200 shadow-sm",children:(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center gap-3",children:[(0,t.jsxs)("button",{onClick:()=>e.back(),className:"flex items-center gap-2 text-gray-600 hover:text-gray-900 transition-colors","aria-label":s("back"),children:[(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),(0,t.jsx)("span",{className:"hidden sm:inline",children:s("back")})]}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:h})})]})}),(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-6",children:[g&&(0,t.jsx)(l.Zb,{padding:"lg",children:(0,t.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,t.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600"}),(0,t.jsx)("p",{className:"ml-3 text-gray-600",children:"Loading file..."})]})}),y&&(0,t.jsx)(l.Zb,{padding:"lg",children:(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-red-600 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)("p",{className:"text-sm text-red-800",children:y})]})})}),f&&!g&&!y&&(0,t.jsxs)(l.Zb,{padding:"none",children:[(0,t.jsx)("div",{className:"bg-gray-100 px-4 py-3 border-b border-gray-200",children:(0,t.jsxs)("p",{className:"text-xs text-gray-600 font-mono break-all",children:[f.worktreePath,"/",f.path]})}),(0,t.jsx)("div",{className:"p-6 sm:p-8 bg-white",children:f.isVideo?(0,t.jsx)(u.R,{src:f.content,mimeType:f.mimeType}):f.isImage?(0,t.jsx)(m.O,{src:f.content,alt:f.path,mimeType:f.mimeType}):v?(0,t.jsx)("div",{className:"prose prose-slate max-w-none prose-headings:font-semibold prose-h1:text-3xl prose-h1:border-b prose-h1:pb-2 prose-h2:text-2xl prose-h2:border-b prose-h2:pb-2 prose-h3:text-xl prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline prose-code:text-sm prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none prose-img:rounded-lg prose-img:shadow-md",children:(0,t.jsx)(i.UG,{remarkPlugins:[c.Z],rehypePlugins:[d.Z],components:{code:e=>{let{inline:r,className:s,children:n,...a}=e;return r?(0,t.jsx)("code",{className:"bg-gray-100 text-gray-800 px-1.5 py-0.5 rounded text-sm font-mono",...a,children:n}):(0,t.jsx)("code",{className:s,...a,children:n})},pre:e=>{let{children:r}=e;return(0,t.jsx)("pre",{className:"overflow-x-auto",children:r})},table:e=>{let{children:r}=e;return(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("table",{className:"border-collapse border border-gray-300",children:r})})},th:e=>{let{children:r}=e;return(0,t.jsx)("th",{className:"border border-gray-300 bg-gray-100 px-4 py-2 text-left font-semibold",children:r})},td:e=>{let{children:r}=e;return(0,t.jsx)("td",{className:"border border-gray-300 px-4 py-2",children:r})},blockquote:e=>{let{children:r}=e;return(0,t.jsx)("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-700",children:r})}},children:f.content})}):(0,t.jsx)("pre",{className:"bg-gray-50 border border-gray-200 rounded-md p-4 overflow-x-auto text-sm",children:(0,t.jsx)("code",{className:"language-".concat(f.extension),children:f.content})})})]})]})]})}},98702:function(e,r,s){"use strict";s.d(r,{u:function(){return l}});var t=s(57437),n=s(2265),a=s(54887),o=s(3468);function l(e){let{isOpen:r,onClose:s,title:l,children:i,size:c="lg",showCloseButton:d=!0,disableClose:m=!1}=e,u=(0,n.useRef)(null);return((0,n.useEffect)(()=>{if(m)return;let e=e=>{"Escape"===e.key&&r&&s()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,s,m]),(0,n.useEffect)(()=>(r?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[r]),r)?(0,a.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:o.k.MODAL},children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:m?void 0:s}),(0,t.jsx)("div",{className:"relative flex min-h-full items-center justify-center p-2 sm:p-4",children:(0,t.jsxs)("div",{ref:u,className:"relative w-full ".concat({sm:"max-w-[calc(100vw-2rem)] sm:max-w-md",md:"max-w-[calc(100vw-2rem)] sm:max-w-2xl",lg:"max-w-[calc(100vw-2rem)] sm:max-w-4xl",xl:"max-w-[calc(100vw-2rem)] sm:max-w-6xl",full:"max-w-[calc(100vw-2rem)] sm:max-w-[95vw]"}[c]," max-h-[calc(100vh-1rem)] sm:max-h-[calc(100vh-2rem)] flex flex-col bg-white dark:bg-gray-900 rounded-lg shadow-xl transform transition-all"),children:[(l||d)&&(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0",children:[(0,t.jsx)("h3",{className:"text-base sm:text-lg font-semibold text-gray-900 dark:text-gray-100 truncate pr-2",children:l}),d&&(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 transition-colors flex-shrink-0",children:(0,t.jsx)("svg",{className:"w-5 h-5 sm:w-6 sm:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("div",{className:"px-4 sm:px-6 py-3 sm:py-4 overflow-y-auto flex-1 min-h-0",children:i})]})})]}),document.body):null}},10789:function(e,r,s){"use strict";s.d(r,{Ct:function(){return c},zx:function(){return n},Zb:function(){return a},aY:function(){return i},Ol:function(){return o},ll:function(){return l},u_:function(){return d.u}});var t=s(57437);function n(e){let{variant:r="primary",size:s="md",fullWidth:n=!1,loading:a=!1,disabled:o,className:l="",children:i,...c}=e,d=["btn",{primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500"}[r],{sm:"btn-sm",md:"",lg:"btn-lg"}[s],n?"w-full":"",o||a?"opacity-50 cursor-not-allowed":"",l].filter(Boolean).join(" ");return(0,t.jsxs)("button",{className:d,disabled:o||a,...c,children:[a&&(0,t.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i]})}function a(e){let{hover:r=!1,padding:s="md",className:n="",children:a,...o}=e,l=["card",r?"card-hover":"",{none:"",sm:"p-3",md:"p-4",lg:"p-6"}[s],n].filter(Boolean).join(" ");return(0,t.jsx)("div",{className:l,...o,children:a})}function o(e){let{className:r="",children:s,...n}=e;return(0,t.jsx)("div",{className:"mb-3 ".concat(r),...n,children:s})}function l(e){let{className:r="",children:s,...n}=e;return(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 ".concat(r),...n,children:s})}function i(e){let{className:r="",children:s,...n}=e;return(0,t.jsx)("div",{className:r,...n,children:s})}function c(e){let{variant:r="gray",dot:s=!1,className:n="",children:a,...o}=e,l=["badge",{success:"badge-success",warning:"badge-warning",error:"badge-error",info:"badge-info",gray:"badge-gray"}[r],n].filter(Boolean).join(" ");return(0,t.jsxs)("span",{className:l,...o,children:[s&&(0,t.jsx)("span",{className:"mr-1.5 inline-block h-2 w-2 rounded-full ".concat({success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",info:"bg-blue-600",gray:"bg-gray-600"}[r]),"aria-hidden":"true"}),a]})}s(2265);var d=s(98702)},39625:function(e,r,s){"use strict";s.d(r,{O:function(){return a}});var t=s(57437),n=s(2265);function a(e){let{src:r,alt:s,onError:a}=e,[o,l]=(0,n.useState)(!1);return o?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-gray-500",children:[(0,t.jsx)("svg",{className:"w-16 h-16 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,t.jsx)("p",{className:"text-sm",children:"Failed to load image"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:s})]}):(0,t.jsx)("div",{className:"flex items-center justify-center p-4",children:(0,t.jsx)("img",{src:r,alt:s,onError:()=>{l(!0),null==a||a()},style:{maxWidth:"100%",maxHeight:"500px",objectFit:"contain"},className:"rounded-lg shadow-sm"})})}},1243:function(e,r,s){"use strict";s.d(r,{R:function(){return a}});var t=s(57437),n=s(2265);function a(e){let{src:r,onError:s}=e,[a,o]=(0,n.useState)(!0),[l,i]=(0,n.useState)(!1);return l?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-gray-500",children:[(0,t.jsx)("svg",{className:"w-16 h-16 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),(0,t.jsx)("p",{className:"text-sm",children:"Failed to load video"})]}):(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center p-4",children:[a&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600"}),(0,t.jsx)("p",{className:"ml-3 text-gray-600",children:"Loading video..."})]}),(0,t.jsx)("video",{controls:!0,src:r,onLoadedData:()=>{o(!1)},onError:()=>{o(!1),i(!0),null==s||s()},style:{maxWidth:"100%",maxHeight:"500px",display:a?"none":"block"},className:"rounded-lg shadow-sm",children:"Your browser does not support the video tag."})]})}},3468:function(e,r,s){"use strict";s.d(r,{k:function(){return t}});let t={DROPDOWN:10,SIDEBAR:30,MODAL:50,MAXIMIZED_EDITOR:55,TOAST:60,CONTEXT_MENU:70}},38706:function(e,r,s){"use strict";s.d(r,{T:function(){return a}});var t=s(69234);function n(e,r){return(...e)=>{try{return r(...e)}catch{throw Error(void 0)}}}let a=n(0,t.T_);n(0,t.Gb)}},function(e){e.O(0,[9234,3398,2971,2117,1744],function(){return e(e.s=20084)}),_N_E=e.O()}]);