elanous 0.2.41 → 0.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/pwa/out/404/index.html +1 -1
- package/apps/pwa/out/404.html +1 -1
- package/apps/pwa/out/_next/static/{GiOLWmt4MqDZePubBjA4Q → Om5xS9jpjSXJCeTNGYEi4}/_buildManifest.js +1 -1
- package/apps/pwa/out/_next/static/chunks/{2fe2c302.41b517f88d6fe502.js → 0966f8a1.745fcd44f64a87ea.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{385e4574.e9886ab32759eda3.js → 0ad6802e.ae7afb63fdcb4491.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/114.2b90424d1a3ce84c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1151-5c2bb8f002ca2dd6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1200.6a37c202f9f17e9a.js +226 -0
- package/apps/pwa/out/_next/static/chunks/1261-a616d5728e02e624.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1313-19f737e0222c4444.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1357.3bbef3976c37f94a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1362-20adddfaf662b0fa.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6874.d5cf7eb8edb2cabe.js → 1406.a1dc2ab6f8449374.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/1737-9491fc6ab29b9ec6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1803-4f91a8e7dcaf042c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5744.b9415e18ad623100.js → 1961.a81b12872c3e93a9.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/1970cf59.2d4d8ce5d6c81853.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1971-8890f3962ba7ee0a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2073-ba274e00e4f9efb4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5471.1e611302ed3a7c53.js → 2144.25b292396712196d.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/{3230-49298c3b73ef2268.js → 2268-53861f339e0b65a2.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{9834.63ab2bbc3153172e.js → 2312.0c8b61e22d3136d7.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{1800.f7ff51dc4978a958.js → 2573.387a707f6f9d720c.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/273.f156eee28f11af77.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2873.d2140e5a82546401.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{9048.212083de42d25be3.js → 3072.01338851ca21a6f7.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/3091.a5a4143dea33d197.js +90 -0
- package/apps/pwa/out/_next/static/chunks/3095.dc44586a5f83b86d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2263.e09b6edea33bad2d.js → 3113.d7472bbc27d580c7.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/3228-9650b6447b6fa288.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3402.44b565b314f2263c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{addc2b32.8c4ff8f0aefe987d.js → 3557ac4a.c8931684475018ad.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/360.ae9f9f4c33c395e8.js +79 -0
- package/apps/pwa/out/_next/static/chunks/3638.80412ea63aae8f3f.js +286 -0
- package/apps/pwa/out/_next/static/chunks/{a0a01613.6d1cca322238d7fe.js → 363bfab3.9623b9f89363541f.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/3694.e0099884345f0198.js +64 -0
- package/apps/pwa/out/_next/static/chunks/3744.54f87db52acfd1ab.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3903.3ef4656c67572764.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3935.16701e33f8982dc9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3955.6922286237f2ac2b.js +24 -0
- package/apps/pwa/out/_next/static/chunks/3969.272ee7f9fd6c62e5.js +34 -0
- package/apps/pwa/out/_next/static/chunks/4199.ce86b281fd0a60b7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4311-6dd3144002cc0c2d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4426-2b230fad00c88930.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{530.d26346e18089640a.js → 4445.7990c76b3751a918.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/4447-14c5161fa59166c7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4856-b0b8075bba8c53f4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4870-de370d65e73c0bb5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4885-2c989165c4b29fad.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4894.fec2ca9e99caefa2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5093.8f04b7f8cb899a95.js +94 -0
- package/apps/pwa/out/_next/static/chunks/5122-2bb177cebf89e19a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5154.5f56dc3902e3d275.js +36 -0
- package/apps/pwa/out/_next/static/chunks/529.64ff7257180b2ac9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5394.5dabeb0c62293a28.js +93 -0
- package/apps/pwa/out/_next/static/chunks/5461.08bf2404ff38ec85.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5474-22e08a85583209b2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{1219.7e17964e0e7cd8e5.js → 5564.9e72532188f57586.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/5567-265df39ed8fe9dcb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5570-a94ae19811cb2046.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5574-b47c9ef2dceff1fd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5628.6ddb2d5ffba4ff4c.js +309 -0
- package/apps/pwa/out/_next/static/chunks/5730.43d7ccc09988e646.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{1178.1aa9cad0e7695427.js → 5789.2da35c258292e1e5.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{4133.2056bb4d78f621af.js → 5824.da9527b15a3221e5.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/5866.366966af47fdde5d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{4527.a69f2894d1bc9f4a.js → 5930.8b4df3b46c32b05a.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/5963-c4d8469c52a0828b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6001.ec4049ceb3c43418.js +27 -0
- package/apps/pwa/out/_next/static/chunks/6120-471f03db1e299c0c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6175-41479e643aca1878.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6291.a2de4f9787637075.js +104 -0
- package/apps/pwa/out/_next/static/chunks/6400-6699907c3537436a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6428.1f4327d6ae5fdf9a.js +287 -0
- package/apps/pwa/out/_next/static/chunks/644.02cb026fa44bcd0a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6466-6c87d60d3dd174fb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{9507.7026657a2f47eb64.js → 6540.c7bef57ad8f90a87.js} +16 -16
- package/apps/pwa/out/_next/static/chunks/6773.d4264665ab31bec0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6822.3c789f1a8443e774.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5574.f35accf4f132b29d.js → 6944.309f4e3ea54d1537.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7261-8ff69d3b2ee671fd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7266.084c6bbc70035140.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7271.5c0100e7320aa856.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7429-bf5731358c8f2f68.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7464.01f7a0ae1215fbe7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7479.0fcad5f37eb64f0c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7483.427a2fe2049e388d.js +148 -0
- package/apps/pwa/out/_next/static/chunks/7502-be74718178e13e56.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7530.0889722b19572065.js +24 -0
- package/apps/pwa/out/_next/static/chunks/7645.5b2ee3ad45c55ea3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7788.7d1c79f1a8e18946.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7900.096f455c7c1efc53.js +77 -0
- package/apps/pwa/out/_next/static/chunks/7910-6f139bcafd238b9f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7966.f71c8958d1637548.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5947-135e26537d80a6b9.js → 8062-7cd0bcc7f01455ba.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/8073.f6cf2f2c71aafbd0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8201.190b94088980f430.js +74 -0
- package/apps/pwa/out/_next/static/chunks/8205.282ca4bb62d54a0a.js +62 -0
- package/apps/pwa/out/_next/static/chunks/8313-dfa1021bb58a46d6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/837-81336ebaca8198a8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8447.7963352ef5f71b76.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8574-868e8129525ef6d9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8588.d1c6a2903727ce87.js +149 -0
- package/apps/pwa/out/_next/static/chunks/8637.90f92d5c8db4732c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2743.5d3f76948be32b34.js → 868.6e953be05bcf6dca.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/8706-e1fe0309343a2273.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8749-06384cdfc4520add.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5964-7e21164a8f2cf0ce.js → 8861-cc1fa1c7b920fa8e.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/8967-7dfebf710c9dec9d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5159.115f1c2ca471386c.js → 8986.8e2e4efbfa655c59.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/8997-3c564dbb3b58b055.js +1 -0
- package/apps/pwa/out/_next/static/chunks/923.2034d10ae91e9c20.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9312.bc1b89c5d4368033.js +1 -0
- package/apps/pwa/out/_next/static/chunks/943.39ae5e82f4f1893f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9469.0500480de55fb205.js +32 -0
- package/apps/pwa/out/_next/static/chunks/9770.5f75bc6088b16109.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9810-2543267050e58b82.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9870.8419702475254745.js +8 -0
- package/apps/pwa/out/_next/static/chunks/9941-376d1b74d51b01a4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9958.385434ab04241758.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{b2271e54.c1de3347976e90b0.js → aa57532f.510551854ff239b1.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-deea1450b17cb8dc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-70985b904f8650ef.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-a2e15e33e56a4353.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/board/page-fc72ce2db12d6ca9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-be03e41f9436ebd9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/bots/page-35a35999382da3f2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-3ff5b1e6ca88b848.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/page-a65101300a0ee5c1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/consult/page-3aca5b6d67dba511.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/control/page-45b8ab0a71e61314.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/decisions/page-53046e282d4cda8e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-17809e60e8354c17.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/page-fd2442d347bf5898.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/exec/page-e9d720d6fc082e21.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/field/page-6b8b4267bab0a677.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-deea1450b17cb8dc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/inside/page-8bcf6233ac7c17af.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/page-7cc25591cfc2126f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/layout-053e871f35c9beba.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live/page-eff819f0c2d5e084.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live-run/page-4d7e9d8db5274a87.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/loops/page-2b2d8f5aa5f69ad4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/market/page-0b8f92c5062e68b1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-1bd9d0fdac2ced3d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/morning/page-9ee28f7df07428ea.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/not-found-44b7a1ff468c6648.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-cbc6523711dc1b65.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-fdad47899c2695be.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/release/{page-40f9e19149024298.js → page-79a8b5fee4c20871.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-03e8ac9606aeaffb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-4cd55c55ec287e2f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/page-db17b4305404161e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-30041d848350fd02.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-c540da022dbf86b0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-9399efc538da057f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/{page-a142dfb0331a05f5.js → page-ca2d09128c585ca4.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-0e2635aecd343038.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-ef7f4399b6b7726e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-deea1450b17cb8dc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/page-caf530535b875468.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/page-eaa20c1543a5fd8e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-c541eb1b75120f61.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-ab5e213eda9479f4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/term/page-0a815f34367b6db6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/today/page-e858ba0ed9393b68.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-1638ee9dd6e0582f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/page-4cf5a399109391f2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-b4396321238798ec.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-cb72bfd21006781a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-6135d0242afbc434.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-a1dccf907eddb856.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{53aeb4ee-51c92f8d683f5220.js → c7945435-b44d4dbe90ba0dcb.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{2fdf2931.b431eee4fb468bc3.js → cb0f8df8.09a4a6be97e3fc5f.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{c0c1a699.0ba79f97005965d4.js → d96660fb.cbc21a2a88539dbb.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/ea514caa.05a24f78d9dffe5f.js +122 -0
- package/apps/pwa/out/_next/static/chunks/{83184dcd-0ee6247ff41eb3f2.js → fb7d20d5-6892502b6ee39ca6.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/framework-e8a911e19b1be41f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-7022f418fabba021.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-app-e5f15df755756a1e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_app-4525f91e36940c9b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_error-140f0e519c085b0f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/webpack-8f22ef63dcb865b1.js +1 -0
- package/apps/pwa/out/_next/static/css/{b9d8151e48998417.css → 62c858ad53854f47.css} +1 -1
- package/apps/pwa/out/_next/static/css/d1f8bb401740a549.css +1 -0
- package/apps/pwa/out/approvals/index.html +1 -1
- package/apps/pwa/out/approvals/index.txt +23 -23
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +23 -23
- package/apps/pwa/out/board/index.html +1 -1
- package/apps/pwa/out/board/index.txt +23 -23
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +22 -22
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +22 -22
- package/apps/pwa/out/ceo/index.html +1 -1
- package/apps/pwa/out/ceo/index.txt +23 -23
- package/apps/pwa/out/chat/index.html +1 -1
- package/apps/pwa/out/chat/index.txt +22 -22
- package/apps/pwa/out/consult/index.html +1 -1
- package/apps/pwa/out/consult/index.txt +23 -23
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +23 -23
- package/apps/pwa/out/decisions/index.html +1 -1
- package/apps/pwa/out/decisions/index.txt +22 -22
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +23 -23
- package/apps/pwa/out/editor/index.html +1 -1
- package/apps/pwa/out/editor/index.txt +24 -25
- package/apps/pwa/out/exec/index.html +1 -1
- package/apps/pwa/out/exec/index.txt +23 -23
- package/apps/pwa/out/field/index.html +1 -1
- package/apps/pwa/out/field/index.txt +23 -23
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +22 -22
- package/apps/pwa/out/inside/index.html +1 -1
- package/apps/pwa/out/inside/index.txt +23 -23
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +23 -23
- package/apps/pwa/out/live/index.html +1 -1
- package/apps/pwa/out/live/index.txt +24 -25
- package/apps/pwa/out/live-run/index.html +1 -1
- package/apps/pwa/out/live-run/index.txt +24 -25
- package/apps/pwa/out/loops/index.html +1 -1
- package/apps/pwa/out/loops/index.txt +22 -22
- package/apps/pwa/out/market/index.html +1 -1
- package/apps/pwa/out/market/index.txt +22 -22
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +22 -22
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +23 -23
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +23 -23
- package/apps/pwa/out/ops/checklist/index.html +1 -1
- package/apps/pwa/out/ops/checklist/index.txt +22 -22
- package/apps/pwa/out/ops/release/index.html +1 -1
- package/apps/pwa/out/ops/release/index.txt +22 -22
- package/apps/pwa/out/ops/seats/index.html +1 -1
- package/apps/pwa/out/ops/seats/index.txt +22 -22
- package/apps/pwa/out/outputs/index.html +1 -1
- package/apps/pwa/out/outputs/index.txt +22 -22
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +23 -23
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +23 -23
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +22 -22
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +23 -23
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +23 -23
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +23 -23
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +23 -23
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +23 -23
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +22 -22
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +23 -23
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +23 -23
- package/apps/pwa/out/today/index.html +1 -1
- package/apps/pwa/out/today/index.txt +23 -23
- package/apps/pwa/out/trace/index.html +1 -1
- package/apps/pwa/out/trace/index.txt +23 -23
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +23 -23
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +23 -23
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +23 -23
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +23 -23
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +23 -23
- package/catalog/external-commands.yaml +5 -3
- package/catalog/meta/catalogVersion.yaml +2 -1
- package/catalog/signing/catalog-signing-public.pem +3 -0
- package/docs/goal-context/04-mock-scenarios.md +13 -0
- package/graphs/catalog/catalog.yaml +1 -1
- package/graphs/heal/heal-loop.yaml +1 -0
- package/graphs/intake/intake-daily.yaml +16 -0
- package/graphs/intake/news-sources.yaml +1 -0
- package/graphs/intake/recipes.yaml +7 -0
- package/graphs/overlays/examples/research-runtime-empty-terminal.yaml +28 -0
- package/graphs/overlays/stop-heal-ladder.yaml +113 -0
- package/graphs/profiles/local.yaml +5 -0
- package/graphs/profiles/pod.yaml +4 -0
- package/graphs/units/verbs/recipes.yaml +11 -11
- package/graphs/work/research-report.yaml +10 -2
- package/package.json +6 -2
- package/plugins/demo-absorption-briefing/plugin.json +18 -0
- package/plugins/demo-absorption-briefing/skills/demo-absorption-briefing/SKILL.md +8 -0
- package/plugins/demo-browser-hand/plugin.json +13 -0
- package/plugins/demo-browser-hand/skills/demo-browser-hand/SKILL.md +8 -0
- package/plugins/demo-linear-secretary/plugin.json +15 -0
- package/plugins/demo-linear-secretary/skills/demo-linear-secretary/SKILL.md +8 -0
- package/plugins/demo-plugin-wizard/plugin.json +11 -0
- package/plugins/demo-plugin-wizard/skills/demo-plugin-wizard/SKILL.md +8 -0
- package/plugins/demo-research/plugin.json +16 -0
- package/plugins/demo-research/skills/demo-research/SKILL.md +8 -0
- package/plugins/demo-video-briefing/plugin.json +15 -0
- package/plugins/demo-video-briefing/skills/demo-video-briefing/SKILL.md +8 -0
- package/scripts/build-signed-catalog.ts +48 -0
- package/scripts/ci-typecheck-main-delta.sh +88 -0
- package/scripts/codex-fallback-live-probe.ts +1 -1
- package/scripts/demo/demo1104-parallel-scenes.ts +301 -0
- package/scripts/demo/demo1104-stage.config.ts +21 -0
- package/scripts/demo/demo1104-stage.ts +316 -0
- package/scripts/goal-method-audit.ts +17 -1
- package/scripts/graph-units/land-enqueue.ts +90 -0
- package/scripts/heal/run-role.ts +99 -5
- package/scripts/hooks/codex-notify.sh +32 -0
- package/scripts/install.sh +10 -38
- package/scripts/land-global-checks.ts +6 -1
- package/scripts/landing-heal/land-plan.ts +57 -0
- package/scripts/lib/decompose-ab.ts +1 -0
- package/scripts/lib/fixtures/tui-regress/help-insufficient-commands.txt +15 -0
- package/scripts/lib/fixtures/tui-regress/help-live.txt +42 -0
- package/scripts/lib/fixtures/tui-regress/help-missing-keys.txt +21 -0
- package/scripts/lib/fixtures/tui-regress/help-original.txt +51 -0
- package/scripts/lib/fixtures/tui-regress/help-shifted-input.txt +26 -0
- package/scripts/lib/tui-regress-checks.ts +33 -13
- package/scripts/release-loop/auto-approve-node.ts +1 -1
- package/scripts/release-loop/gate-autoheal-sim-evidence.ts +60 -0
- package/scripts/release-loop/gate-baseline-receipt.ts +47 -9
- package/scripts/release-loop/gate-image-pin.ts +81 -0
- package/scripts/release-loop/gate-method.ts +139 -0
- package/scripts/release-loop/gate-node-sim.ts +207 -0
- package/scripts/release-loop/gate-node.ts +463 -64
- package/scripts/release-loop/gate-pod-image-sticky-plan.ts +99 -0
- package/scripts/release-loop/gate-radius-live.ts +97 -13
- package/scripts/release-loop/gate-shard-dispatch.ts +43 -0
- package/scripts/release-loop/gate-traffic-mode.ts +151 -3
- package/scripts/release-loop/gate-train-receipts.ts +122 -0
- package/scripts/release-loop/node-verdict.ts +38 -25
- package/scripts/release-loop/preflight.ts +362 -8
- package/scripts/release-loop/resume-release.ts +83 -8
- package/scripts/release-loop/unattended-release.ts +20 -9
- package/scripts/rhythm/daily.ts +36 -4
- package/scripts/rhythm/linear-progress-sync.ts +298 -0
- package/scripts/ux-sim.ts +18 -1
- package/scripts/video-pipeline.ts +9 -1
- package/scripts/warm-pool-provider-config.ts +286 -0
- package/skills/omni-crawl/SKILL.md +5 -2
- package/skills/omni-crawl/scripts/main.ts +84 -23
- package/src/acp/agent-manager.ts +1 -0
- package/src/acp/codex-app-server-agent.ts +33 -0
- package/src/acp/codex-app-server-client.ts +153 -16
- package/src/acp/core-turn-bridge.ts +27 -9
- package/src/acp/event-router.ts +20 -1
- package/src/acp/server.ts +6 -0
- package/src/agent/registry.ts +2 -0
- package/src/agent/task-notification.ts +25 -5
- package/src/agent/types.ts +6 -0
- package/src/agent-mission/browser-roundtrip-coordinator.ts +85 -0
- package/src/agent-mission/claude-headless.ts +4 -1
- package/src/agent-mission/codex-exec.ts +105 -0
- package/src/agent-mission/driver.ts +192 -11
- package/src/agent-mission/grok-auth-status.ts +47 -0
- package/src/agent-mission/hand-hooks.ts +101 -0
- package/src/agent-mission/mission-cli.ts +63 -4
- package/src/agent-mission/mission-hand-reply.ts +118 -0
- package/src/agent-mission/mission-line.ts +180 -0
- package/src/agent-mission/mission-out.ts +833 -0
- package/src/agent-mission/tool-install.ts +200 -3
- package/src/agent-substrate/context-strategy.ts +4 -4
- package/src/agent-substrate/self-review-cli.ts +178 -13
- package/src/agents/general-purpose.md +1 -1
- package/src/auto-research/research-turn.ts +211 -53
- package/src/autopilot/pr-manager.ts +69 -10
- package/src/autopilot/pty-control-loop.ts +2 -0
- package/src/boot/daemon-tools/self-implement.ts +3 -1
- package/src/boot/daemon-tools/web-search.ts +1 -2
- package/src/briefing/brief-items.ts +55 -11
- package/src/capture/tui-self-report.ts +22 -6
- package/src/chat/index.ts +1 -1
- package/src/cli/agent-cli.ts +2 -1
- package/src/cli/catalog-cli.ts +31 -0
- package/src/cli/connector-cli.ts +16 -0
- package/src/cli/doctor-fix.ts +2 -2
- package/src/cli/fixtures/review-loop-breaker/opwaiver-32646-1694ccc7a170.json +1 -0
- package/src/cli/fixtures/review-loop-breaker/opwaiver-32853-bd8f73595c83.json +1 -0
- package/src/cli/fixtures/review-loop-breaker/opwaiver-33097-1cc85900413c.json +1 -0
- package/src/cli/fixtures/review-loop-breaker/opwaiver-33106-972f31e4a3ca.json +1 -0
- package/src/cli/fixtures/review-loop-breaker/opwaiver-33113-3ab51f05968f.json +1 -0
- package/src/cli/fixtures/review-loop-breaker/pr-33097-1cc85900413c.json +1 -0
- package/src/cli/intake-source-cli.ts +44 -8
- package/src/cli/msg-cli.ts +32 -3
- package/src/cli/pr-cli.ts +21 -1
- package/src/cli/pr-land-heavy-remote.ts +75 -5
- package/src/cli/pr-land-overlap-evidence.ts +113 -2
- package/src/cli/pr-land-pod-shadow-job.ts +202 -4
- package/src/cli/pr-land-pod-shadow.ts +9 -2
- package/src/cli/release-checklist-read-cli.ts +57 -19
- package/src/cli/release-cli.ts +23 -3
- package/src/cli/research-cli.ts +13 -5
- package/src/cli/setup-cli.ts +166 -6
- package/src/cli/setup-keys.ts +187 -0
- package/src/cli/task-plugin-wizard-host.ts +114 -0
- package/src/cli/tasks-cli.ts +61 -9
- package/src/cli/tui-test-cli.ts +186 -0
- package/src/compact/auto.ts +8 -1
- package/src/config.ts +4 -2
- package/src/connectors/linear-daily-progress.ts +228 -0
- package/src/connectors/linear-projector.ts +34 -12
- package/src/connectors/linear.ts +151 -7
- package/src/control-plane/ledger.ts +52 -2
- package/src/control-plane/server.ts +16 -2
- package/src/core-turn/deep-turn-bloom.ts +67 -0
- package/src/core-turn/research-policy.ts +37 -0
- package/src/core-turn/run-core-turn.ts +606 -95
- package/src/core-turn/run-goal-loop.ts +18 -0
- package/src/core-turn/types.ts +4 -0
- package/src/dashboard/chat/acp-chat.ts +10 -0
- package/src/dashboard/classic-sidetab-mission-job.ts +161 -0
- package/src/dashboard/classic-sidetab-mission-pair.ts +81 -0
- package/src/dashboard/classic-sidetab-mission-trio.ts +219 -0
- package/src/dashboard/classic-sidetab-mission.ts +347 -0
- package/src/dashboard/index.ts +517 -18
- package/src/dashboard/input/agent-wake.ts +23 -1
- package/src/dashboard/input/chat-main-acp-dispatch.ts +23 -0
- package/src/dashboard/input/chat-main-plain-turn-runtime.ts +17 -0
- package/src/dashboard/mission-cli-consumer.ts +165 -0
- package/src/dashboard/plugin-wizard-runtime.ts +50 -0
- package/src/dashboard/plugin-wizard-tool.ts +55 -0
- package/src/dashboard/seat-boot-preamble.ts +171 -1
- package/src/dashboard/side-basic-runtime.ts +54 -1
- package/src/dashboard/sidetab-runtime.ts +90 -1
- package/src/dashboard/skill-catalog-preamble.ts +101 -0
- package/src/dashboard/skill-detection-runtime.ts +55 -15
- package/src/dashboard/slash-runtime/dashboard-handlers.ts +15 -0
- package/src/dashboard/terminal-popup-runtime.ts +6 -3
- package/src/dashboard/turn-preamble.ts +53 -15
- package/src/dashboard/turn-prompt-runtime.ts +4 -2
- package/src/decisions/linear-progress-summary.ts +78 -0
- package/src/decisions/linear-progress-sync.ts +152 -0
- package/src/domains/outbound-alert.ts +49 -11
- package/src/domains/telegram-kind-route.ts +16 -9
- package/src/graph-runner/arg-allowance.ts +13 -0
- package/src/graph-runner/graph-cli.ts +23 -7
- package/src/graph-runner/graph-run-api.ts +3 -1
- package/src/graph-runner/graph-tick.ts +10 -2
- package/src/graph-runner/runner.ts +86 -18
- package/src/graph-wizard/mission-compose.ts +407 -12
- package/src/grok/agent-search.ts +14 -4
- package/src/grok/credential.ts +28 -11
- package/src/harness/dispatch-backpressure.ts +54 -1
- package/src/harness/dispatch-shadow-compare.ts +74 -0
- package/src/harness/harness-cli-command.ts +11 -1
- package/src/harness/harness-pod-dispatch.ts +81 -15
- package/src/harness/harness-stop.ts +155 -11
- package/src/harness/skill-exec.ts +21 -9
- package/src/harness/skill-select.ts +1 -1
- package/src/hooks/error-report-cloud.ts +101 -0
- package/src/hooks/receiver.ts +29 -2
- package/src/index.ts +159 -13
- package/src/instance/spawn-elanous.ts +6 -4
- package/src/intake-plane/actions.ts +354 -0
- package/src/intake-plane/adapters/telegram-ambient.ts +34 -18
- package/src/intake-plane/intake-sources.ts +78 -8
- package/src/intake-plane/items.ts +14 -4
- package/src/intake-plane/linear-mission-sync.ts +80 -0
- package/src/intake-plane/linear-secretary-runtime.ts +178 -0
- package/src/intake-plane/linear-wish.ts +227 -1
- package/src/life/life-cli.ts +168 -0
- package/src/life/life-kinds.ts +160 -0
- package/src/live-supply/budget-consumer.ts +78 -0
- package/src/live-supply/read.ts +3 -0
- package/src/live-supply/snapshot.ts +45 -0
- package/src/llm/provider-credentials.ts +8 -2
- package/src/llm.ts +168 -9
- package/src/loops/orchestrator/coordinator-shadow.ts +226 -0
- package/src/loops/orchestrator/tick.ts +13 -0
- package/src/maturity/feature-maturity.ts +4 -4
- package/src/msg/msg-sse-server.ts +3 -3
- package/src/msg/msg-store.ts +177 -19
- package/src/native-tool-catalog.ts +38 -4
- package/src/nexus/api/harness-traversal.ts +11 -0
- package/src/nexus/api/http-server.ts +37 -1
- package/src/nexus/api/mcp-public-allowlist.ts +2 -0
- package/src/nexus/index.ts +7 -2
- package/src/nexus/outbound/format.ts +9 -0
- package/src/nexus/outbound/router.ts +98 -13
- package/src/nexus/setup-status.ts +9 -0
- package/src/nexus/state/state.ts +3 -0
- package/src/oauth/codex-account-store.ts +20 -7
- package/src/oauth/codex-owner-mirror.ts +44 -0
- package/src/oauth/codex.ts +17 -2
- package/src/oauth/fallback-chain.ts +47 -17
- package/src/onboarding/first-run-doctor.ts +8 -1
- package/src/onboarding/first-run.ts +85 -26
- package/src/onboarding/key-setup.ts +103 -0
- package/src/onboarding/menu-answer.ts +13 -0
- package/src/onboarding/secret-prompt.ts +37 -0
- package/src/plugins/install/plugin-install.ts +59 -0
- package/src/pr-tool/census.ts +133 -2
- package/src/pty-shell/pty-control-ipc.ts +4 -1
- package/src/pty-shell/tui-run-state.ts +188 -2
- package/src/registry/catalog-server.ts +232 -0
- package/src/registry/loader.ts +45 -1
- package/src/registry/types.ts +1 -2
- package/src/release-loop/checklist-target-path-hint.ts +13 -0
- package/src/release-loop/checklist.ts +9 -1
- package/src/repl/index.ts +43 -2
- package/src/research/axis-fanout.ts +136 -16
- package/src/research/bloom-exemplars.ts +3 -1
- package/src/research/gap-followup.ts +13 -1
- package/src/research/plugin-discovery.ts +36 -14
- package/src/research-bridge/invoke.ts +22 -5
- package/src/research-bridge/types.ts +2 -0
- package/src/self-dev/ask-launch-flow.ts +72 -1
- package/src/self-dev/decompose.ts +119 -5
- package/src/self-dev/dev-cli.ts +4 -1
- package/src/self-dev/dev-pipeline.ts +5 -0
- package/src/self-dev/draft-residue.ts +64 -5
- package/src/self-dev/graph-front-nodes.ts +2 -1
- package/src/self-dev/graph-journey-route.ts +76 -21
- package/src/self-dev/launch-preflight-text.ts +5 -6
- package/src/self-dev/launch-preflight.ts +58 -0
- package/src/self-dev/orchestrate.ts +13 -3
- package/src/self-dev/review-provider-fallback.ts +9 -2
- package/src/self-dev/run-supervisor.ts +42 -4
- package/src/self-dev/run-types.ts +4 -0
- package/src/self-dev/shard-aggregate.ts +4 -0
- package/src/self-dev/shard-run.ts +36 -15
- package/src/self-implement/abandoned-classification.ts +12 -3
- package/src/self-implement/budget-gate.ts +7 -0
- package/src/self-implement/child-llm-preference.ts +10 -1
- package/src/self-implement/doctor-visit.ts +118 -8
- package/src/self-implement/elanous-tui-spawn.ts +3 -0
- package/src/self-implement/fixtures/tdd-green-missing-passing-child-transcript.txt +2 -0
- package/src/self-implement/gate-artifacts.ts +2 -1
- package/src/self-implement/goal-author-cli.ts +4 -2
- package/src/self-implement/goal-author.ts +684 -7
- package/src/self-implement/graph-overlay-yaml.ts +37 -4
- package/src/self-implement/graph-overlay.ts +3 -1
- package/src/self-implement/graph-profile-yaml.ts +107 -0
- package/src/self-implement/graph-yaml.ts +26 -3
- package/src/self-implement/headless-elanous-driver.ts +31 -2
- package/src/self-implement/heal-intake.ts +112 -4
- package/src/self-implement/heal-triage.ts +20 -0
- package/src/self-implement/host-regate.ts +27 -4
- package/src/self-implement/merge-train.ts +5 -0
- package/src/self-implement/off-diff-evidence.ts +249 -5
- package/src/self-implement/orchestrator.ts +365 -25
- package/src/self-implement/regate-detail.ts +38 -1
- package/src/self-implement/rework-child-provider.ts +25 -0
- package/src/self-implement/run-chart.ts +122 -0
- package/src/self-implement/run-ledger.ts +162 -11
- package/src/self-implement/run-stop.ts +188 -4
- package/src/self-implement/runtime-overlay-run-steps.ts +95 -0
- package/src/self-implement/stop-autoheal.ts +13 -0
- package/src/self-implement/tdd-evidence-tags.ts +9 -0
- package/src/self-implement/train-gate-receipt.ts +166 -0
- package/src/self-implement/train-gate-remote.ts +62 -18
- package/src/session/chat.ts +40 -4
- package/src/session/session-fanout.ts +2 -0
- package/src/session/streaming/acp-stream-sink.ts +2 -1
- package/src/session/streaming/chunk-producer.ts +6 -0
- package/src/session/streaming/stream-compositor.ts +3 -2
- package/src/session-runtime/index.ts +135 -5
- package/src/session-runtime/retry-policy.ts +1 -1
- package/src/session-runtime/tier-flip.ts +3 -3
- package/src/setup/llm-env-detect.ts +3 -0
- package/src/setup/service-key-catalog.ts +46 -0
- package/src/setup/service-keys.ts +241 -0
- package/src/sidetab-core/model.ts +19 -5
- package/src/sidetab-core/visible-agent-mission.ts +262 -0
- package/src/skills/name-match.ts +20 -0
- package/src/skills/tools/agent.ts +53 -6
- package/src/skills/tools/omni-search.ts +173 -13
- package/src/task-agent/parent-host.ts +10 -0
- package/src/task-agent/pod-distributor-entry.ts +3 -0
- package/src/task-agent/repair-outcomes.ts +65 -0
- package/src/task-agent/task-hand.ts +47 -7
- package/src/task-orchestrator/dispatcher.ts +14 -1
- package/src/task-orchestrator/linear-capture-events.ts +55 -0
- package/src/task-orchestrator/store.ts +16 -5
- package/src/task-orchestrator/surfaces/pod-artifact-return.ts +4 -0
- package/src/task-orchestrator/surfaces/pod-distributor.ts +48 -0
- package/src/task-orchestrator/surfaces/pod-failure-reason.ts +92 -1
- package/src/task-orchestrator/surfaces/pod-ledger-collect.ts +38 -1
- package/src/task-orchestrator/surfaces/pod-ledger-events.ts +113 -14
- package/src/task-orchestrator/surfaces/pod-si-warm-entry.ts +33 -6
- package/src/task-orchestrator/surfaces/pod-source-bundle.ts +45 -9
- package/src/task-orchestrator/surfaces/pod-source-receive.ts +178 -16
- package/src/task-orchestrator/surfaces/pod-source-spec.ts +3 -3
- package/src/task-orchestrator/surfaces/pod-warm-switch.ts +2 -0
- package/src/task-orchestrator/surfaces/pod-warm-worker-provider.ts +237 -41
- package/src/task-orchestrator/surfaces/pod-warm-worker-runtime.ts +80 -3
- package/src/task-orchestrator/surfaces/self-implement-pod.ts +337 -51
- package/src/task-orchestrator/surfaces/self-implement.ts +27 -3
- package/src/task-orchestrator/surfaces/warm-reuse-evidence.ts +169 -0
- package/src/task-orchestrator/types.ts +14 -0
- package/src/telegram.ts +14 -16
- package/src/terminal/coding-agent.ts +14 -5
- package/src/terminal/session-registry.ts +1 -1
- package/src/tokens.ts +35 -2
- package/src/tool-hints/gate.ts +1 -0
- package/src/tool-runtime/agent-runtime.ts +2 -0
- package/src/tool-runtime/browser-hand-runtime.ts +381 -0
- package/src/tool-runtime/browser-runtime.ts +2 -1
- package/src/tool-runtime/elanous-linear-issue-runtime.ts +76 -0
- package/src/tool-runtime/elanous-linear-secretary-runtime.ts +57 -0
- package/src/tool-runtime/elanous-skills-list-runtime.ts +5 -1
- package/src/tool-runtime/graph-mcp-runtimes.ts +240 -0
- package/src/tool-runtime/index.ts +6 -0
- package/src/tool-runtime/skill-exec-runtime.ts +33 -13
- package/src/tool-runtime/types.ts +4 -0
- package/src/tui/entry.ts +38 -5
- package/src/tui/sidetab/attach.ts +177 -1
- package/src/tui/sidetab/herdr-portal.ts +225 -0
- package/src/tui-client/local-chat-turn.ts +26 -13
- package/src/tui.ts +22 -0
- package/src/user-config.ts +34 -9
- package/src/user-intent/types.ts +4 -3
- package/src/ux-sim/browser-hand.ts +165 -0
- package/src/ux-sim/draft-inventory-builder.ts +198 -0
- package/src/ux-sim/fake-browser-page.ts +81 -0
- package/src/ux-sim/fake-kubectl.ts +37 -3
- package/src/ux-sim/fake-linear-device.ts +31 -0
- package/src/ux-sim/fault-pool-cap.ts +11 -6
- package/src/ux-sim/graph-engine-sim.ts +47 -0
- package/src/ux-sim/linear-secretary.ts +216 -0
- package/src/ux-sim/mock-scenario-catalog.json +93 -0
- package/src/ux-sim/mock-scenario-catalog.ts +274 -0
- package/src/ux-sim/onboarding-first-run-device.ts +31 -21
- package/src/ux-sim/scenario.ts +185 -48
- package/src/ux-sim/service-key-setup.ts +50 -0
- package/src/ux-sim/term-slash-device.ts +74 -0
- package/src/ux-sim/turn-throw-sim.ts +31 -0
- package/src/version/packed-revision.json +1 -1
- package/src/voice/voice-tts-singleton.ts +18 -3
- package/src/web-search/exa.ts +77 -0
- package/src/web-search/grok.ts +5 -9
- package/src/web-search/index.ts +30 -9
- package/src/web-search/provider.ts +4 -1
- package/src/web-search/x-intent.ts +5 -0
- package/apps/pwa/out/_next/static/chunks/1115.434ae2ecb0ad986d.js +0 -149
- package/apps/pwa/out/_next/static/chunks/1121.667cec0bcdbb3fdb.js +0 -36
- package/apps/pwa/out/_next/static/chunks/1197-54da59d250a6e476.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1245.1cfd13b26dbd71d6.js +0 -287
- package/apps/pwa/out/_next/static/chunks/1494-f93046ff5c5a124d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1609.2b312797599b8e45.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1661.0dd330f3d89f73f3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/167-0c121e4b47e0f9da.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1700.cdc2bf8cc685e221.js +0 -90
- package/apps/pwa/out/_next/static/chunks/1703-78e46acad29f3cfc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1765.679b29625c8e88d4.js +0 -77
- package/apps/pwa/out/_next/static/chunks/1971-7efb628c471dc5a0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1999-8de7b7bb36801913.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2073.689dcb2680113d76.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2198-557d49184104d165.js +0 -1
- package/apps/pwa/out/_next/static/chunks/221-440ce67fa9f5c839.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2427-8ed8e98624cbd664.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2457-725c5827bc003795.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2491-2718b15a5ccb75a5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2527-5c636a43c7cc5dde.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2692-1027cb16fe4ccf49.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2773.0e80b9d325fb5635.js +0 -32
- package/apps/pwa/out/_next/static/chunks/2873-0f3cb56c8e3528ea.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3097.864e92bdaa2f4d15.js +0 -79
- package/apps/pwa/out/_next/static/chunks/3136-d6870ba63300a93e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3173-0289113d434e83b7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/325-dd9208a1a0ab7ce4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3283.528f430dd043fb4e.js +0 -74
- package/apps/pwa/out/_next/static/chunks/3295.cc8cb13b8f0dae1a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3688-86e3b88abf18cb3b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3804-7220467a5473a8df.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3808.3e1e247ce7bdf889.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3927.b5473ad109da44c5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3934-98ea94832e194796.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4156.ba4de4a3664f04b4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4297-239ca82f293faab0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4320-dcc5a7734126f4c9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4434.94b4c552a2d91e69.js +0 -148
- package/apps/pwa/out/_next/static/chunks/4579.03e4092f73950965.js +0 -226
- package/apps/pwa/out/_next/static/chunks/4667.97e31aa38c95c475.js +0 -309
- package/apps/pwa/out/_next/static/chunks/4702.4a4adc1f16d7c93b.js +0 -64
- package/apps/pwa/out/_next/static/chunks/4815.481501c57b3568d9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/487-d16e698ef14662d9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4888-7a38bf522c9cc6fe.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5034-30e429d6bb086881.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5040-35c494e60dadd97d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/50c6ab1e.81a96e419350909d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5154.4b6a836179356f30.js +0 -94
- package/apps/pwa/out/_next/static/chunks/5228-a8200df486278f2d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5379.97af106d09566f69.js +0 -8
- package/apps/pwa/out/_next/static/chunks/5479-b6372e762719f92f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5534-699c5cbcbc96c5d7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5701.9c4e8f250312eeee.js +0 -24
- package/apps/pwa/out/_next/static/chunks/5892.2526d962339662d8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5937.c2df9e3447e1f667.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5941.8210cc93c9202c0a.js +0 -286
- package/apps/pwa/out/_next/static/chunks/5975.4004f820ae3cecd5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6142-7ccd48795d7abd55.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6160.bf9177b8c1bfb243.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6398.71ba0690c8027555.js +0 -27
- package/apps/pwa/out/_next/static/chunks/6492.2bd5c10edc1a064e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6552.a3840aa7da35ad68.js +0 -62
- package/apps/pwa/out/_next/static/chunks/6736.1e36d3ac5fa5e41d.js +0 -24
- package/apps/pwa/out/_next/static/chunks/6900.3ccbe069bdd4556a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/71327eb4.add50b365f94bf3a.js +0 -122
- package/apps/pwa/out/_next/static/chunks/7136.deca3e3a2ddaa374.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7139-ee9f8ed2677a40b3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7191.fdc955f7d96064a4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7423-e0aa5d9e2962120e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7453.afc1ea7e05d56a8c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7503-5e6a3d7fe67e4a0c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7761-476fd7bf768abd34.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7975.eafb12097a0a9e62.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8050-9b364bdef8f71927.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8152.64e253c35cccfaae.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8190.620f0231b3924bcb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8448.45b6b1f1a99eeb35.js +0 -104
- package/apps/pwa/out/_next/static/chunks/8464-e24f10451b658aac.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8477.e4c944bb3aa5d2f3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8710.ca385257d5ca422e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8830.627ccf294ec2465c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8880.64c445592f04acaf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8981.c706964c8ba27aff.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9053.bd0fffaff8d3f836.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9161-c66e723d7ec9d682.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9185.1ecdf9b65c0bb684.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9356.fccd5f58086b4ff5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9446.dc0406109371d329.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9506.dcf25d467a42627e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9541.eb8e2f8480c7feca.js +0 -93
- package/apps/pwa/out/_next/static/chunks/9577.ed7582186efa5482.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9579.4a8169600fff2058.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9642-ff2e039eb62e3b92.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9659-8f2323348113ad80.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9724.4c5623af2db43153.js +0 -34
- package/apps/pwa/out/_next/static/chunks/9869.81a1e24ca682d5a0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-8d9d76ea322d855c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-ed2c4e59f9f1fe21.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-2dc99e03c5d76ca0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-b5a3a788330e920f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-14949db884bfa672.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-ea76c85b36388a97.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-01716d20af62d325.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/chat/page-62baf6881a64b1e9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/consult/page-f89ba590c2af8afa.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/control/page-22f8b0f78d9637e5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/decisions/page-817f9d7e6820be80.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-ffb9bc0d2650249a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/editor/page-f6d0e64873c0f629.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/exec/page-8bfa0d4ba23a209d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/field/page-f5060462249e32c7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-8d9d76ea322d855c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/inside/page-b2049f8b1ef79117.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/intake/page-1446c5fa93907f11.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/layout-b48a7a07c5204156.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-e974b8c4ca47614c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live-run/page-8a919b869bd28594.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/loops/page-d31b8de6bfcd72ed.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/market/page-64765f817909db29.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-d128c8569a36ee9b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/morning/page-b2679d357e9b9270.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-6fabec98a9e7b269.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-048f30149dcf1349.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-9113181d6b5a2725.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-1e7a755a13227611.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-3c8f8b67a203cf07.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/page-18032f5437215062.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-da3b739192fd0ee3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-d332545571bd6fd1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-5237aa5b3f3b8ec5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-d16e56c3989c147e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-6b6593600869e2cd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-8d9d76ea322d855c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-29e8b8a8396b55cb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/share/page-b3414d856a1a7e2f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-c3affa52b7ce961b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-f21dddf9f95b6fab.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/term/page-f5a30a24745bf088.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-8c8569a09b4d4e34.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/trace/page-2ce32722c0243483.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/vault/page-4767b0d9c0a98c6c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-116ee1339c387a75.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-35e8c50ca4ef7ffc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-52e17113356bb891.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-7458ae05ed2ac1a0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/framework-ad6c9dd524ad6ef8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-app-2ddd1f2b44d6aa59.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-e3d82bdc358d20c5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_app-71d5aa3896e1655f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_error-03ffc54e00438546.js +0 -1
- package/apps/pwa/out/_next/static/chunks/webpack-56bb89af5a611d0b.js +0 -1
- package/apps/pwa/out/_next/static/css/be9019f696217521.css +0 -1
- package/apps/pwa/out/_next/static/css/d0a48dc099ed86cf.css +0 -1
- /package/apps/pwa/out/_next/static/{GiOLWmt4MqDZePubBjA4Q → Om5xS9jpjSXJCeTNGYEi4}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4320],{50121:(e,t,s)=>{s.d(t,{X:()=>i});var a=s(95453);let r=null,n=[],l=[];function i(e){let[t,s]=(0,a.useState)(()=>r&&Date.now()-r.at<3e5?r.providers:n),[i,d]=(0,a.useState)(()=>r&&Date.now()-r.at<3e5?r.models:l),[o,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(null),x=(0,a.useCallback)(async()=>{c(!0),m(null);try{let t=await e.getRegistryCatalog(),a=t.providers.map(e=>({id:e.id,displayName:e.displayName,aliases:e.aliases,modelPrefixes:e.modelPrefixes,apiKeyEnv:e.apiKeyEnv,endpointPattern:e.endpointPattern,capabilities:e.capabilities,builtIn:e.builtIn})),n=t.models.map(e=>({id:e.id,provider:e.provider,displayName:e.displayName,...void 0!==e.family?{family:e.family}:{},...void 0!==e.familyShortcut?{familyShortcut:e.familyShortcut}:{},...void 0!==e.contextSize?{contextSize:e.contextSize}:{},...void 0!==e.outputMaxTokens?{outputMaxTokens:e.outputMaxTokens}:{},...void 0!==e.vision?{vision:e.vision}:{},...void 0!==e.reasoning?{reasoning:e.reasoning}:{},...void 0!==e.toolCalling?{toolCalling:e.toolCalling}:{},...void 0!==e.pricing?{pricing:e.pricing}:{},...void 0!==e.deprecated?{deprecated:e.deprecated}:{},...void 0!==e.releaseDate?{releaseDate:e.releaseDate}:{},...void 0!==e.kind?{kind:e.kind}:{}}));r={at:Date.now(),providers:a,models:n},s(a),d(n)}catch(e){m(e instanceof Error?e.message:String(e))}finally{c(!1)}},[e]);(0,a.useEffect)(()=>{if(r&&Date.now()-r.at<3e5){s(r.providers),d(r.models);return}x()},[x]);let p=(0,a.useCallback)(async()=>{r=null,await x()},[x]),h=(0,a.useMemo)(()=>t.map(e=>e.id),[t]),f=(0,a.useMemo)(()=>{let e=new Map;for(let t of i){let s=e.get(t.provider);s?s.push(t):e.set(t.provider,[t])}return t=>{var s;return t?null!=(s=e.get(t))?s:[]:i}},[i]);return{providers:t,providerIds:h,models:i,modelsByProvider:f,loading:o,error:u,reload:p}}},55165:(e,t,s)=>{s.d(t,{MQ:()=>n,OY:()=>a,fG:()=>r});let a="elanous:nav-prefs";function r(e){try{return"1"===window.localStorage.getItem(e)}catch(e){return!1}}function n(e,t){try{t?window.localStorage.setItem(e,"1"):window.localStorage.removeItem(e)}catch(e){}try{window.dispatchEvent(new Event(a))}catch(e){}}},56424:(e,t,s)=>{s.d(t,{GZ:()=>i,_n:()=>u,gu:()=>o,mB:()=>d,sY:()=>c,u9:()=>m});let a="elanous.showroom.intentPanel.collapsed",r="elanous.showroom.intentPanel.displayMode",n="fixed",l=new Set(["fixed","popup","off"]);function i(){try{return"true"===window.localStorage.getItem(a)}catch(e){return!1}}function d(e){try{e?window.localStorage.setItem(a,"true"):window.localStorage.removeItem(a),window.dispatchEvent(new StorageEvent("storage",{key:a,newValue:e?"true":null}))}catch(e){}}function o(e){let t=t=>{(t.key===a||null===t.key)&&e(i())};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}function c(){try{let e=window.localStorage.getItem(r);if(e&&l.has(e))return e;return n}catch(e){return n}}function u(e){try{e===n?window.localStorage.removeItem(r):window.localStorage.setItem(r,e),window.dispatchEvent(new StorageEvent("storage",{key:r,newValue:e===n?null:e}))}catch(e){}}function m(e){let t=t=>{(t.key===r||null===t.key)&&e(c())};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}},65807:(e,t,s)=>{s.d(t,{HS:()=>a,O2:()=>n,Rk:()=>o,XP:()=>c,sR:()=>d,uU:()=>r});let a=["auto","default","neutral","dark","forest"],r="elanous.mermaid.theme",n="elanous:mermaid-theme-change",l=null,i=null;function d(){if(i!==window&&(l=null),null!==l)return l;try{var e;let t=window.localStorage.getItem(r);return null!=(e=a.find(e=>e===t))?e:"auto"}catch(e){return"auto"}}function o(e){i=window;try{window.localStorage.setItem(r,e),l=null}catch(t){l=e}window.dispatchEvent(new Event(n))}function c(e,t){for(let t of e.matchAll(/%%\{\s*init\s*:\s*\{([\s\S]*?)\}\s*\}%%/gi)){var s;let e=null==(s=t[1])?void 0:s.match(/(?:^|,)\s*['"]?theme['"]?\s*:\s*['"]?(default|neutral|dark|forest|base)\b/i);if(e)return e[1].toLowerCase()}return"auto"===t?"default":t}},84320:(e,t,s)=>{s.d(t,{O:()=>e8});var a=s(59977),r=s(95453),n=s(3151),l=s(86083),i=s(65807),d=s(53414),o=s(23310),c=s(68050);let u="pushcut-webhook",m="pushcut";async function x(e,t){return e.fetchJson("/v1/config/secrets",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:u,value:t})})}async function p(e){return e.fetchJson("/v1/registry/bindings?channel=".concat(m))}async function h(e,t){var s;let a=null!=(s=t.method)?s:"POST",r={};return void 0!==t.sessionId&&(r.sessionId=t.sessionId),void 0!==t.label&&(r.label=t.label),void 0!==t.meta&&(r.meta=t.meta),void 0!==t.mergeMeta&&(r.mergeMeta=t.mergeMeta),e.fetchJson("/v1/registry/bindings/".concat(m,"/").concat(encodeURIComponent(t.token)),{method:a,headers:{"content-type":"application/json"},body:JSON.stringify(r)})}async function f(e,t){return e.fetchJson("/v1/registry/bindings/".concat(m,"/").concat(encodeURIComponent(t)),{method:"DELETE"})}var b=s(13783);let g="elanous.pwa.pushSubscriptionId",j="elanous.pwa.pushSubscriptionLabel";function v(){let e="Notification"in window&&"serviceWorker"in navigator&&"PushManager"in window,t=null,s=null;try{t=window.localStorage.getItem(g),s=window.localStorage.getItem(j)}catch(e){}return{supported:e,permission:e?Notification.permission:"unknown",cachedId:t,cachedLabel:s}}async function y(e){var t,s;let a,r;if(!("Notification"in window)||!("serviceWorker"in navigator)||!("PushManager"in window))return{status:"unsupported",reason:"Notification/PushManager API absent"};if(!e.baseUrl)return{status:"error",reason:"daemon baseUrl not configured"};if("granted"!==await Notification.requestPermission())return(0,b.cY)("pwa.push.permission-denied"),{status:"permission-denied"};let n=e.baseUrl.replace(/\/$/,"");try{let e=await fetch("".concat(n,"/v1/push/vapid-public-key"));if(!e.ok)throw Error("HTTP ".concat(e.status));let t=await e.json();if(!t.publicKey)throw Error("missing publicKey in response");a=t.publicKey}catch(e){return{status:"error",reason:"vapid fetch: ".concat(e instanceof Error?e.message:String(e))}}let l=await navigator.serviceWorker.ready;try{r=await l.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),s=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),a=new Uint8Array(s.length);for(let e=0;e<s.length;e+=1)a[e]=s.charCodeAt(e);return a}(a)})}catch(e){return{status:"error",reason:"subscribe: ".concat(e instanceof Error?e.message:String(e))}}let i=r.toJSON(),d=null!=(s=e.label)?s:"".concat(null!=(t=navigator.userAgent.split(" ")[0])?t:"browser"," ").concat(new Date().toISOString().slice(0,10));try{let t=await fetch("".concat(n,"/v1/push/subscribe"),{method:"POST",headers:{"content-type":"application/json",...e.token?{authorization:"Bearer ".concat(e.token)}:{}},body:JSON.stringify({subscription:i,label:d})});if(!t.ok){let e=await t.text();try{await r.unsubscribe()}catch(e){}return{status:"error",reason:"subscribe POST: ".concat(t.status," ").concat(e.slice(0,200))}}let s=await t.json();if(!s.id){try{await r.unsubscribe()}catch(e){}return{status:"error",reason:"daemon did not return subscription id"}}try{window.localStorage.setItem(g,s.id),window.localStorage.setItem(j,d)}catch(e){}return(0,b.cY)("pwa.push.enabled",{id:s.id,label:d}),{status:"enabled",id:s.id}}catch(e){try{await r.unsubscribe()}catch(e){}return{status:"error",reason:e instanceof Error?e.message:String(e)}}}async function N(e){let t=null;try{t=window.localStorage.getItem(g)}catch(e){}if(!t)return{status:"not-subscribed"};try{if("serviceWorker"in navigator){let e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();t&&await t.unsubscribe()}}catch(e){}if(e.baseUrl)try{await fetch("".concat(e.baseUrl.replace(/\/$/,""),"/v1/push/subscribe/").concat(encodeURIComponent(t)),{method:"DELETE",...e.token?{headers:{authorization:"Bearer ".concat(e.token)}}:{}})}catch(e){(0,b.cY)("pwa.push.disable.daemon-failed",{reason:e instanceof Error?e.message:String(e)})}try{window.localStorage.removeItem(g),window.localStorage.removeItem(j)}catch(e){}return{status:"disabled"}}var k=s(99106);let w=[{value:"none",label:"none — auto-detect / Quick Setup 안내"},{value:"codex",label:"codex — OpenAI Codex (OAuth or OPENAI_API_KEY)"},{value:"claude-code",label:"claude-code — Anthropic (claude-code CLI 인증)"},{value:"gemini",label:"gemini — Google (GEMINI_API_KEY)"}];function S(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"loading"});try{let t=await e.getChatBackendDetection();s({status:"ok",snapshot:t})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async t=>{if(e){l({status:"mutating",target:t});try{await e.putSwitch("global.chat.defaultBackend",{value:t}),await c(),l({status:"idle"})}catch(e){l({status:"error",error:e.message})}}},[e,c]);return((0,r.useEffect)(()=>{c()},[c]),i&&e)?(0,a.jsxs)("section",{"data-testid":"quick-setup-card",className:"rounded border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Quick Setup — chat 백엔드"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"chat 탭이 사용할 LLM 백엔드 1개만 셋업하면 됩니다. 데스크탑 NEXUS TUI Settings 탭과 같은 안내."})]}),(0,a.jsx)(d.$,{"data-testid":"quick-setup-refresh",variant:"outline",size:"sm",disabled:"loading"===t.status,onClick:()=>void c(),"aria-label":"detection 재실행",title:"env / OAuth 재감지 (TUI 의 r 키 mirror)",children:"loading"===t.status?"…":"Refresh"})]}),"idle"===t.status&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"대기 중…"}),"loading"===t.status&&(0,a.jsx)("p",{"data-testid":"quick-setup-loading",className:"text-xs text-muted-foreground",children:"detection 진행 중…"}),"error"===t.status&&(0,a.jsx)("p",{"data-testid":"quick-setup-error",className:"text-xs text-destructive",children:t.error}),"ok"===t.status&&(0,a.jsx)(C,{snapshot:t.snapshot,swap:n,onSwap:u})]}):null}function C(e){let{snapshot:t,swap:s,onSwap:r}=e,n="none"!==t.detection.backend;return(0,a.jsxs)("div",{className:"space-y-3 text-xs",children:[(0,a.jsx)("div",{"data-testid":"quick-setup-status",children:n?(0,a.jsxs)("span",{children:["현재 wired \xb7"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1 font-mono",children:t.detection.backend})," ",(0,a.jsxs)("span",{className:"text-muted-foreground",children:["(",t.detection.source,")"]})]}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"현재 wired \xb7 (없음 — 아래 3 provider 중 1개 셋업)"})}),(0,a.jsx)("ul",{className:"space-y-2","data-testid":"quick-setup-entries",children:t.entries.map(e=>(0,a.jsx)(U,{entry:e,wired:t.detection.backend===e.provider},e.provider))}),(0,a.jsxs)("div",{className:"space-y-1 border-t border-border/40 pt-2",children:[(0,a.jsx)("label",{className:"block text-[11px] text-muted-foreground",htmlFor:"quick-setup-swap",children:"Backend swap (`global.chat.defaultBackend` 변경)"}),(0,a.jsx)("select",{id:"quick-setup-swap","data-testid":"quick-setup-swap",value:t.detection.backend,disabled:"mutating"===s.status,onChange:e=>r(e.target.value),className:"flex h-8 w-full rounded-md border border-input bg-background px-2 py-1 text-xs shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",children:w.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"mutating"===s.status&&(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["적용 중 (target: ",(0,a.jsx)("code",{children:s.target}),")…"]}),"error"===s.status&&(0,a.jsxs)("p",{"data-testid":"quick-setup-swap-error",className:"text-[11px] text-destructive",children:["swap 실패 \xb7 ",s.error]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"새 chat 탭부터 적용 \xb7 기존 chat 인스턴스는 per-tab override 또는 재시작 시 반영. 변경은 즉시 NEXUS daemon 의 UserConfig 에 저장."})]}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Grok \xb7 중국 4종 (kimi/qwen/glm/deepseek) 등은 NEXUS chat 우선순위 외 — daemon 탭 또는 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous legacy"})," ","에서 사용."]})]})}function U(e){let{entry:t,wired:s}=e;return(0,a.jsxs)("li",{"data-testid":"quick-setup-provider-".concat(t.provider),"data-wired":s?"true":"false",className:"rounded border border-border/60 bg-background p-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 font-medium",children:[(0,a.jsx)("span",{"aria-hidden":"true",children:s?"▶":" "}),(0,a.jsx)("span",{children:t.label})]}),(0,a.jsx)("ul",{className:"mt-1 space-y-1",children:t.paths.map(e=>(0,a.jsxs)("li",{"data-testid":"quick-setup-path-".concat(t.provider,"-").concat(e.tag),"data-detected":e.detected?"true":"false",className:"flex gap-2",children:[(0,a.jsx)("span",{"aria-label":e.detected?"detected":"missing",children:e.detected?"✓":"◯"}),(0,a.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:e.tag}),(0,a.jsx)("span",{className:"text-[11px]",children:e.hint})]},e.tag))})]})}var P=s(38830),E=s(43159),M=s(70264);let A="global.nexus.firstBootGuideShown";function z(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"loading"});try{let t=await e.getSwitch(A),a=!0===t.switch.value;s({status:a?"hidden":"shown"})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async()=>{if(e){l(!0);try{await e.putSwitch(A,{value:!0}),s({status:"hidden"})}catch(e){s({status:"error",error:e.message})}finally{l(!1)}}},[e]);return((0,r.useEffect)(()=>{c()},[c]),i&&e&&"shown"===t.status)?(0,a.jsxs)("section",{"data-testid":"welcome-card",className:"rounded border border-primary/30 bg-primary/5 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"✦ Welcome to elanous NEXUS"}),(0,a.jsx)(d.$,{"data-testid":"welcome-card-dismiss",variant:"ghost",size:"sm",disabled:n,onClick:()=>void u(),"aria-label":"환영 카드 닫기",children:n?"…":"Got it"})]}),(0,a.jsxs)("div",{className:"space-y-2 text-xs text-muted-foreground",children:[(0,a.jsx)("p",{children:"모바일 / iOS / 원격에서도 같은 NEXUS 에 접속 — 데스크탑 TUI 와 이 PWA 는 같은 daemon 의 두 surface (UserConfig SSoT 공유)."}),(0,a.jsxs)("p",{children:["Chat 백엔드를 셋업하지 않았다면 위의 ",(0,a.jsx)("strong",{children:"Quick Setup"})," ","카드에서 1개만 선택하면 됩니다."]}),(0,a.jsxs)("p",{children:["Telegram \xb7 Discord allowlist \xb7 자동 부팅 (launchd / systemd) 등"," ",(0,a.jsx)("em",{children:"advanced 셋업"}),"은 데스크탑에서"," ",(0,a.jsx)("span",{className:"font-mono",children:"elanous legacy"})," →"," ",(0,a.jsx)("span",{className:"font-mono",children:"/setup"})," wizard 에서 셋업 (NEXUS 미mirror 영역)."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"font-mono",children:"[Got it]"})," ","한 번 누르면 다음부터 안 보입니다 (TUI 와 동기화)."]})]})]}):null}let I=[{area:"Chat 백엔드",status:"✓ NEXUS native",location:"PWA Quick Setup card"},{area:"Telegram bot token",status:"✓ NEXUS native",location:"PWA Secret modal"},{area:"Discord bot token",status:"✓ NEXUS native",location:"PWA Secret modal"},{area:"Telegram allowlist",status:"◯ Wizard 전용",location:"desktop",cmd:"elanous legacy → /setup"},{area:"Discord guild \xb7 voice",status:"◯ Wizard 전용",location:"desktop",cmd:"elanous legacy → /setup"},{area:"OS 자동 부팅",status:"◯ NEXUS subcommand",location:"desktop",cmd:"elanous nexus install --launchd"}];function T(){return(0,a.jsxs)("section",{"data-testid":"advanced-setup-map",className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Advanced setup map"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:[(0,a.jsx)("p",{className:"mb-2 text-muted-foreground",children:"NEXUS native 셋업 영역은 PWA 에서 직접 \xb7 그 외 advanced 셋업은 desktop wizard 또는 NEXUS subcommand 에서."}),(0,a.jsxs)("table",{className:"w-full text-left text-[11px]",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border text-muted-foreground",children:[(0,a.jsx)("th",{className:"py-1 pr-2 font-medium",children:"영역"}),(0,a.jsx)("th",{className:"py-1 pr-2 font-medium",children:"상태"}),(0,a.jsx)("th",{className:"py-1 font-medium",children:"셋업 위치"})]})}),(0,a.jsx)("tbody",{children:I.map(e=>(0,a.jsxs)("tr",{"data-testid":"advanced-setup-row-".concat(e.area),className:"border-b border-border/50 last:border-0",children:[(0,a.jsx)("td",{className:"py-1.5 pr-2 font-medium",children:e.area}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono text-[10px]",children:e.status}),(0,a.jsxs)("td",{className:"py-1.5 text-muted-foreground",children:[e.location,e.cmd&&(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[10px]",children:e.cmd})]})]})]},e.area))})]})]})]})}function R(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"minting"}),l(!1);try{let t=await e.mintConnectToken();s({status:"shown",token:t.token,hint:t.hint})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async()=>{if("shown"===t.status)try{await navigator.clipboard.writeText(t.token),l(!0),setTimeout(()=>l(!1),2e3)}catch(e){s({status:"error",error:"clipboard: ".concat(e.message)})}},[t]);return i&&e?(0,a.jsxs)("section",{"data-testid":"connect-token-card",className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"연결 토큰 만들기 (다른 기기용)"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(0,a.jsxs)("p",{className:"text-muted-foreground",children:["다른 머신에서 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous nexus connect <host>"})," 시 paste 할 bearer token 을 발급. 한 번 paste 하면 그 머신의 bookmark 에 영구 저장 — 매번 재발급할 필요 없음."]}),"idle"===t.status&&(0,a.jsx)(d.$,{size:"sm",onClick:()=>void c(),"data-testid":"connect-token-generate",children:"Generate connect token"}),"minting"===t.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Minting…"}),"shown"===t.status&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("code",{className:"block break-all rounded bg-muted p-2 font-mono text-[11px] select-all","data-testid":"connect-token-value",children:t.token}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(d.$,{size:"sm",onClick:()=>void u(),"data-testid":"connect-token-copy",children:n?"✓ Copied":"Copy to clipboard"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>s({status:"idle"}),"data-testid":"connect-token-hide",children:"Hide"})]}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:t.hint})]}),"error"===t.status&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-rose-500",children:["발급 실패: ",t.error]}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>s({status:"idle"}),children:"Reset"})]})]})]}):null}var L=s(13276),D=s(49549),$=s(29695),O=s(85104),Y=s(8464),B=s(73642);function _(){return(0,k.Qj)()?(0,a.jsx)(Q,{}):null}function Q(){var e;let{data:t,isLoading:s,error:r,refetch:n,isFetching:l}=function(){let e=(0,k.M1)();return(0,Y.I)({queryKey:B.AF.platforms(),queryFn:()=>e.getPlatforms(),refetchInterval:3e4})}(),i=null!=(e=null==t?void 0:t.platforms)?e:[],d=i.filter(e=>"connected"===e.status).length;return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"platform-connections-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Platform connections"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)("span",{"data-testid":"platform-summary",children:t?"".concat(d," of ").concat(i.length," connected"):s?"loading…":""}),(0,a.jsx)("button",{type:"button",onClick:()=>n(),disabled:l,"aria-label":"Refresh platform connection status",className:"rounded p-1 hover:bg-surface-elevated disabled:opacity-50",children:(0,a.jsx)(L.A,{className:"h-3 w-3 ".concat(l?"animate-spin":"")})})]})]}),r&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),r instanceof Error?r.message:"Failed to load platform list"]}),s&&!t&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/platforms…"}),t&&(0,a.jsx)("ul",{className:"space-y-1.5",role:"list",children:i.map(e=>(0,a.jsx)(W,{entry:e},e.id))})]})}function W(e){let{entry:t}=e,s="connected"===t.status;return(0,a.jsxs)("li",{"data-testid":"platform-row-".concat(t.id),"data-status":t.status,className:"flex items-start gap-3 rounded-md border border-border bg-surface px-3 py-2",children:[(0,a.jsx)("div",{className:"mt-0.5 flex-shrink-0",children:s?(0,a.jsx)($.A,{className:"h-4 w-4 text-green-600","aria-label":"connected"}):(0,a.jsx)(O.A,{className:"h-4 w-4 text-muted-foreground","aria-label":"not configured"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,a.jsx)("span",{className:"text-[12px] font-medium",children:t.label}),(0,a.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider ".concat(s?"bg-green-600/10 text-green-700":"bg-muted text-muted-foreground"),children:s?"connected":"not configured"})]}),(0,a.jsx)("div",{className:"text-[11px] text-muted-foreground",children:t.detail}),!s&&t.hint&&(0,a.jsx)("div",{className:"text-[10px] italic text-muted-foreground/80",children:t.hint})]})]})}var F=s(26046);function H(){var e,t;let s=(0,k.Qj)(),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)({status:"idle"}),[c,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(!0)},[]);let m=(0,r.useCallback)(async()=>{if(s){l({status:"loading"});try{var e,t,a;let r=await fetch("".concat(s.baseUrl,"/v1/hitl/audit/recent?channel=pushcut&limit=").concat(1),{credentials:"include"}),n=await r.json();if(!r.ok||!n.ok)return void l({status:"error",error:null!=(t=n.error)?t:"HTTP ".concat(r.status),fetchedAt:Date.now()});let i=null==(e=n.entries)?void 0:e[n.entries.length-1];l({status:"ok",count:null!=(a=n.count)?a:0,lastEntry:i,fetchedAt:Date.now()})}catch(e){l({status:"error",error:e.message,fetchedAt:Date.now()})}}},[s]),x=(0,r.useCallback)(async()=>{if(s){o({status:"sending"});try{var e,t;let a=await fetch("".concat(s.baseUrl,"/v1/hitl/test-pushcut"),{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({})}),r=await a.json();a.ok&&r.ok?(o({status:"ok",banner:"✓ sent → ".concat(null!=(e=r.notificationName)?e:"(unknown)")}),m()):o({status:"error",banner:"✗ ".concat(null!=(t=r.reason)?t:"HTTP ".concat(a.status)).concat(r.hint?" \xb7 ".concat(r.hint):"")})}catch(e){o({status:"error",banner:"✗ ".concat(e.message)})}}},[s,m]);if((0,r.useEffect)(()=>{m()},[m]),!c||!s)return null;let p=n.lastEntry,h=p?(t=Date.now()-p.ts)<0?"just now":t<6e4?"".concat(Math.floor(t/1e3),"s ago"):t<36e5?"".concat(Math.floor(t/6e4),"m ago"):t<864e5?"".concat(Math.floor(t/36e5),"h ago"):"".concat(Math.floor(t/864e5),"d ago"):"(no Pushcut deliveries recorded yet)";return(0,a.jsxs)("section",{"data-testid":"pushcut-settings-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDCF2 Pushcut HITL channel"}),(0,a.jsx)(d.$,{"data-testid":"pushcut-settings-refresh",variant:"ghost",size:"sm",onClick:()=>void m(),"aria-label":"Refresh Pushcut status",children:"↻"})]}),(0,a.jsxs)("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last delivery"}),(0,a.jsx)("dd",{"data-testid":"pushcut-last-delivery",className:"font-mono",children:"loading"===n.status?"…":h}),p?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last answer"}),(0,a.jsxs)("dd",{className:"font-mono",children:[p.answer?"yes":"no"," \xb7 ",p.elapsedMs,"ms"]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last requestId"}),(0,a.jsx)("dd",{className:"font-mono break-all",children:p.requestId})]}):null,(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Total recorded"}),(0,a.jsx)("dd",{className:"font-mono",children:"ok"===n.status?null!=(e=n.count)?e:0:"—"})]}),"error"===n.status?(0,a.jsxs)("p",{className:"mt-2 text-xs text-destructive",children:["audit fetch failed: ",n.error]}):null,(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsx)(d.$,{"data-testid":"pushcut-test-button",variant:"outline",size:"sm",disabled:"sending"===i.status,onClick:()=>void x(),children:"sending"===i.status?"…":"Test notification"}),i.banner?(0,a.jsx)("span",{"data-testid":"pushcut-test-banner",className:"ok"===i.status?"text-xs text-emerald-600 font-mono":"text-xs text-destructive font-mono",children:i.banner}):null]}),(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-muted-foreground",children:["Audit log: ",(0,a.jsx)("span",{className:"font-mono",children:"$ELANOUS_DIR/hitl-log.jsonl"})," ","(rotates at 100 MB \xb7 cv-3 β-4)"]})]})}var K=s(56424);let V=[{value:"fixed",label:"고정 (Fixed)",blurb:"입력 바 위에 항상 표시. 키보드 위주 dogfood 에 좋음."},{value:"popup",label:"팝업 (Popup)",blurb:"턴이 끝날 때마다 잠깐 (~6초) 나타나고 자동 dismiss. 모바일 화면 절약."},{value:"off",label:"끔 (Off)",blurb:"완전 숨김. 입력만으로 진행하고 싶을 때."}];function q(){let[e,t]=(0,r.useState)("fixed"),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>(n(!0),t((0,K.sY)()),(0,K.u9)(t)),[]),(0,a.jsxs)("section",{"data-testid":"intent-panel-settings",className:"rounded-lg border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Intent Panel"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Showroom 의 intent 6-button 패널 표시 방식을 선택합니다."})]}),(0,a.jsx)("div",{role:"radiogroup","aria-label":"intent panel display mode",className:"mt-3 space-y-2",children:V.map(r=>{let n=s&&e===r.value;return(0,a.jsxs)("label",{"data-testid":"intent-panel-mode-".concat(r.value),className:"flex cursor-pointer items-start gap-3 rounded-md border border-border/60 p-3 hover:border-border","data-active":n?"true":"false",children:[(0,a.jsx)("input",{type:"radio",name:"intent-panel-display-mode",value:r.value,checked:n,onChange:()=>{var e;return e=r.value,void((0,K._n)(e),t(e))},className:"mt-0.5 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:r.label}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:r.blurb})]})]},r.value)})})]})}var X=s(36241);function G(){let[e,t]=(0,r.useState)(X.kv),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>(n(!0),t((0,X.Vm)()),(0,X.$L)(t)),[]),(0,a.jsxs)("section",{"data-testid":"chat-routing-settings",className:"rounded-lg border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Chat input classification"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"입력 중 자동 분류를 켜거나 끕니다. 전송은 기존 ACP 경로를 유지합니다."})]}),(0,a.jsx)("div",{className:"mt-3 space-y-2",children:(0,a.jsxs)("label",{"data-testid":"chat-routing-auto",className:"flex cursor-pointer items-start gap-3 rounded-md border border-border/60 p-3 hover:border-border","data-active":s&&e.autoRouting?"true":"false",children:[(0,a.jsx)("input",{type:"checkbox",checked:s?e.autoRouting:X.kv.autoRouting,onChange:e=>{var s;return s=e.target.checked,void((0,X.Kz)(s),t(e=>({...e,autoRouting:s})))},className:"mt-0.5 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"Automatic routing"}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"입력 중 mission router 가 plan / build / review / research / quick / vision 으로 자동 분류합니다. OFF (default) 시 분류 요청을 보내지 않습니다."})]})]})})]})}function J(){var e,t,s,l;let{connection:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=(0,r.useContext)(n.C),o=null!=(t=null!=(e=null==i?void 0:i.baseUrl)?e:null==d?void 0:d.config.baseUrl)?t:"",c=null!=(l=null!=(s=null==i?void 0:i.token)?s:null==d?void 0:d.config.token)?l:"",[u,m]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)("");(0,r.useEffect)(()=>{if(m(null),f(""),!o)return;let e=new AbortController;return(async()=>{try{let t=await fetch("".concat(o.replace(/\/$/,""),"/v1/config/chat-fast-path"),{signal:e.signal,credentials:"same-origin",...c?{headers:{authorization:"Bearer ".concat(c)}}:{}});if(!t.ok)throw Error("HTTP ".concat(t.status));let s=await t.json();e.signal.aborted||m(s.enabled)}catch(t){e.signal.aborted||f(t instanceof Error?t.message:String(t))}})(),()=>e.abort()},[o,c]);let b=async e=>{p(!0),f("");try{let t=await fetch("".concat(o.replace(/\/$/,""),"/v1/config/chat-fast-path"),{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json",...c?{authorization:"Bearer ".concat(c)}:{}},body:JSON.stringify({enabled:e})});if(!t.ok)throw Error("HTTP ".concat(t.status));let s=await t.json();m(s.enabled)}catch(e){f(e instanceof Error?e.message:String(e))}finally{p(!1)}};return(0,a.jsxs)("section",{className:"space-y-3 rounded-lg border border-border bg-card p-4","data-testid":"fast-reply-card",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"짧은 물음은 빠르게"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:'인사\xb7짧은 물음은 도구 없이 먼저 답합니다 — 확인이 필요하면 "확인해 볼까요?"'}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox",checked:null!=u&&u,disabled:null===u||x,onChange:e=>{b(e.target.checked)},"aria-label":"빠른 답변 켜기/끄기"}),null===u?"불러오는 중":u?"켜짐":"꺼짐"]}),h&&(0,a.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:h})]})}function Z(e){let t=Object.entries(e);return 0===t.length?"—":t.map(e=>{let[t,s]=e;return"".concat(t,":").concat(s)}).join(" \xb7 ")}function ee(){let{config:e}=(0,n.Q)(),[t,s]=(0,r.useState)({ocr:{total:0,failures:0,byProvider:{},byPolishMode:{}},save:{total:0,failures:0,byPolishMode:{}},client:{cancel:0,edit:0,discard:0},startedAt:"",ts:""}),[l,i]=(0,r.useState)(!1),[o,c]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1),x=(0,r.useCallback)(async()=>{if(e.baseUrl){m(!0);try{let t=await fetch("".concat(e.baseUrl,"/v1/metrics/notes-from-image"),{...e.token?{headers:{authorization:"Bearer ".concat(e.token)}}:{}});if(!t.ok)return void c("HTTP ".concat(t.status));let a=await t.json();s(a.snapshot),i(a.wired),c(null),(0,b.cY)("notes-metrics.snapshot",{wired:a.wired,ocrTotal:a.snapshot.ocr.total,saveTotal:a.snapshot.save.total})}catch(e){c(String(e instanceof Error?e.message:e))}finally{m(!1)}}},[e.baseUrl,e.token]);(0,r.useEffect)(()=>{x();let e=setInterval(()=>{x()},1e4);return()=>clearInterval(e)},[x]);let p=t.ocr.total-t.ocr.failures,h=t.save.total-t.save.failures;return(0,a.jsxs)("section",{"data-testid":"notes-metrics-card",className:"rounded-lg border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-heading text-sm font-medium",children:"카메라 노트 metric"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"카메라 → markdown 노트 파이프라인 사용량 (daemon 재시작 시 0 으로 리셋)."})]}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>void x(),disabled:u,"aria-label":"refresh notes metrics",children:(0,a.jsx)(L.A,{className:u?"h-3.5 w-3.5 animate-spin":"h-3.5 w-3.5"})})]}),!l&&(0,a.jsx)("p",{"data-testid":"notes-metrics-not-wired",className:"mb-3 rounded bg-muted/50 px-2 py-1 text-xs text-muted-foreground",children:"collector 미wire — runNexus 재기동 후 측정 시작."}),o&&(0,a.jsxs)("p",{"data-testid":"notes-metrics-error",className:"mb-3 text-xs text-destructive",children:["metric fetch 실패: ",o]}),(0,a.jsxs)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR 총 / 성공 / 실패"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-ocr",children:[t.ocr.total," / ",p," / ",t.ocr.failures]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR provider"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-ocr-providers",children:Z(t.ocr.byProvider)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR polishMode"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-ocr-polish",children:Z(t.ocr.byPolishMode)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Save 총 / 성공 / 실패"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-save",children:[t.save.total," / ",h," / ",t.save.failures]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Save polishMode"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-save-polish",children:Z(t.save.byPolishMode)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Client cancel \xb7 edit \xb7 discard"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-client",children:[t.client.cancel," \xb7 ",t.client.edit," \xb7 ",t.client.discard]})]}),t.startedAt&&l&&(0,a.jsxs)("p",{className:"mt-3 text-[10px] text-muted-foreground",children:["since ",t.startedAt]})]})}var et=s(64555);function es(){let[e,t]=(0,r.useState)(et.hn);(0,r.useEffect)(()=>{t((0,et.hn)())},[]);let s=e=>{t((0,et.qv)(e)),(0,b.cY)("settings.ocr-prefs.update",e)};return(0,a.jsxs)("section",{"data-testid":"ocr-prefs-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDCF7 OCR 기본 설정"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"사진 → 노트 모달의 초기 토글 상태. 매번 같은 옵션을 켜고 있다면 default 로 저장."})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-md border border-input bg-background px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:"LLM 비전 default"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7 더 정확하지만 느림 + 비쌈"})]}),(0,a.jsx)("input",{type:"checkbox","data-testid":"ocr-prefs-llm-vision",checked:e.defaultUseLlmVision,onChange:e=>s({defaultUseLlmVision:e.target.checked}),"aria-label":"LLM 비전 default"})]}),(0,a.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-md border border-input bg-background px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:"손글씨 default"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7 handwriting strength 자동 추가"})]}),(0,a.jsx)("input",{type:"checkbox","data-testid":"ocr-prefs-handwriting",checked:e.defaultPreferHandwriting,onChange:e=>s({defaultPreferHandwriting:e.target.checked}),"aria-label":"손글씨 default"})]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{t((0,et.sg)()),(0,b.cY)("settings.ocr-prefs.reset")},className:"text-xs text-muted-foreground","data-testid":"ocr-prefs-reset",children:"기본값으로 리셋"})})]})}let ea=["lm-studio","vllm","ollama","anthropic-openai-wrap"],er={"lm-studio":"http://localhost:1234",vllm:"http://localhost:8000",ollama:"http://localhost:11434","anthropic-openai-wrap":"https://api.anthropic.com"};function en(){let{client:e,config:t}=(0,n.Q)(),[s,l]=(0,r.useState)({status:"idle"}),[i,u]=(0,r.useState)(0),[m,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)(""),[f,b]=(0,r.useState)("anthropic-openai-wrap"),[g,j]=(0,r.useState)(er["anthropic-openai-wrap"]),[v,y]=(0,r.useState)(""),[N,k]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!t.baseUrl)return void l({status:"idle"});let s=!1;return l({status:"loading"}),(async()=>{try{let t=await e.getLlmHosts();s||l({status:"ok",data:t})}catch(e){s||l({status:"error",error:e instanceof Error?e.message:String(e)})}})(),()=>{s=!0}},[e,t.baseUrl,i]);let w=(0,r.useCallback)(()=>u(e=>e+1),[]),S=(0,r.useCallback)(e=>{b(e),j(er[e])},[]),C=(0,r.useCallback)(async()=>{let t=p.trim(),a=g.trim(),r=v.trim();if(!t||!a)return void c.oR.error("name + endpoint 필수");if("anthropic-openai-wrap"===f&&!r)return void c.oR.error("Anthropic 은 apiKey 필수");k(!0);try{var n,l;let i=[...(null!=(l=null==(n=s.data)?void 0:n.hosts)?l:[]).filter(e=>e.name!==t).map(e=>{let t={name:e.name,kind:e.kind,endpoint:e.endpoint};return e.apiKey&&"[redacted]"!==e.apiKey&&(t.apiKey=e.apiKey),t}),{name:t,kind:f,endpoint:a,...r?{apiKey:r}:{}}];await e.setLlmHosts(i),c.oR.success("host '".concat(t,"' 추가됨")),h(""),y(""),x(!1),w()}catch(e){c.oR.error("추가 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,p,f,g,v,s.data,w]),U=(0,r.useCallback)(async t=>{k(!0);try{var a,r;let n=(null!=(r=null==(a=s.data)?void 0:a.hosts)?r:[]).filter(e=>e.name!==t).map(e=>{let t={name:e.name,kind:e.kind,endpoint:e.endpoint};return e.apiKey&&"[redacted]"!==e.apiKey&&(t.apiKey=e.apiKey),t});await e.setLlmHosts(n),c.oR.success("host '".concat(t,"' 제거됨")),w()}catch(e){c.oR.error("제거 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,s.data,w]),P=(0,r.useCallback)(async()=>{k(!0);try{await e.clearLlmHosts(),c.oR.success("env / legacy 로 환원"),w()}catch(e){c.oR.error("reset 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,w]);if(!t.baseUrl)return null;let E=s.data,M=(null==E?void 0:E.source)==="override"?"bg-fuchsia-100 text-fuchsia-700 dark:bg-fuchsia-900 dark:text-fuchsia-200":(null==E?void 0:E.source)==="env"?"bg-amber-100 text-amber-700 dark:bg-amber-900 dark:text-amber-200":"bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300";return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"llm-hosts-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM Hosts"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[E&&(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium uppercase ".concat(M),"data-testid":"llm-hosts-source-badge",children:E.source}),(0,a.jsx)("span",{"data-testid":"llm-hosts-count",children:E?"".concat(E.count," host").concat(1===E.count?"":"s"):"loading"===s.status?"loading…":""}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:w,disabled:"loading"===s.status||N,"data-testid":"llm-hosts-refresh",children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(null==E?void 0:E.deprecations)&&E.deprecations.length>0&&(0,a.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 p-2 text-[11px] text-amber-800 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-200","data-testid":"llm-hosts-deprecations",children:[(0,a.jsx)("p",{className:"font-medium",children:"호환성 경고 \xb7 다음 release 에서 제거 예정"}),(0,a.jsx)("ul",{className:"ml-4 list-disc",children:E.deprecations.map(e=>(0,a.jsx)("li",{className:"font-mono text-[10px]",children:e},e))})]}),"error"===s.status&&(0,a.jsxs)("p",{className:"text-rose-500","data-testid":"llm-hosts-error",children:["조회 실패 \xb7 ",s.error]}),"loading"===s.status&&!E&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing /v1/llm/hosts…"}),E&&0===E.hosts.length&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"No hosts configured. Add one below to enable a remote LLM provider (e.g. Anthropic / Gemini API direct)."}),E&&E.hosts.length>0&&(0,a.jsx)("ul",{className:"space-y-1","data-testid":"llm-hosts-list",children:E.hosts.map(e=>(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border bg-muted/30 px-2 py-1","data-testid":"llm-host-row-".concat(e.name),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[11px] font-medium",children:[(0,a.jsx)("span",{children:e.name}),(0,a.jsx)("span",{className:"rounded bg-muted px-1 text-[9px] uppercase text-muted-foreground",children:e.kind}),"[redacted]"===e.apiKey&&(0,a.jsx)("span",{className:"rounded bg-emerald-100 px-1 text-[9px] uppercase text-emerald-700 dark:bg-emerald-900 dark:text-emerald-200",title:"apiKey configured (server-side, not echoed)","data-testid":"llm-host-key-badge-".concat(e.name),children:"key"})]}),(0,a.jsx)("div",{className:"truncate font-mono text-[10px] text-muted-foreground",children:e.endpoint})]}),"override"===E.source&&(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{U(e.name)},disabled:N,"data-testid":"llm-host-remove-".concat(e.name),children:"Remove"})]},e.name))}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:[(0,a.jsx)(d.$,{size:"sm",onClick:()=>x(e=>!e),disabled:N,"data-testid":"llm-hosts-add-toggle",children:m?"Cancel add":"Add host"}),(null==E?void 0:E.source)==="override"&&(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{P()},disabled:N,"data-testid":"llm-hosts-reset",children:"Reset to env/legacy"})]}),m&&(0,a.jsxs)("div",{className:"mt-2 space-y-1.5 rounded border border-dashed border-border p-2","data-testid":"llm-hosts-add-form",children:[(0,a.jsx)(o.p,{value:p,placeholder:"name (e.g. anthropic-cloud)",onChange:e=>h(e.target.value),"data-testid":"llm-hosts-add-name",className:"text-[11px]"}),(0,a.jsx)("select",{value:f,onChange:e=>S(e.target.value),className:"flex h-8 w-full rounded-md border border-input bg-background px-2 text-xs","data-testid":"llm-hosts-add-kind",children:ea.map(e=>(0,a.jsx)("option",{value:e,children:e},e))}),(0,a.jsx)(o.p,{value:g,placeholder:"endpoint URL",onChange:e=>j(e.target.value),"data-testid":"llm-hosts-add-endpoint",className:"text-[11px]"}),"anthropic-openai-wrap"===f&&(0,a.jsx)(o.p,{type:"password",value:v,placeholder:"apiKey (sk-ant-…)",onChange:e=>y(e.target.value),"data-testid":"llm-hosts-add-apikey",className:"text-[11px]"}),(0,a.jsx)(d.$,{size:"sm",onClick:()=>{C()},disabled:N||!p.trim()||!g.trim(),"data-testid":"llm-hosts-add-submit",children:N?"Saving…":"Save"})]})]}),(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["In-memory override \xb7 daemon restart reverts to ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"ELANOUS_LLM_HOSTS"})," env / legacy single host. Permanent change → set the env var in ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:".zshrc"})," or ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"launchctl setenv"}),". PUT replaces the full list, so re-add Anthropic/Gemini hosts in one go (existing apiKeys appear as ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"[redacted]"})," and aren’t round-trippable)."]})]})}var el=s(16521);function ei(){var e,t;let[s,n]=(0,r.useState)(el.lu);(0,r.useEffect)(()=>{n((0,el.lu)())},[]);let l=s.speakingThresholdMultiplier===el.Qc.speakingThresholdMultiplier;return(0,a.jsxs)("section",{"data-testid":"voice-prefs-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83C\uDF99️ Voice barge-in 튜닝"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"BI-2 ducking 강도 — TTS 재생 중 자기-에코 false-fire 를 막는 RMS multiplier. 변경은 voice toggle off → on 또는 새로고침 시 적용."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsx)("span",{className:"font-medium",children:"speaking threshold multiplier"}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"voice-prefs-multiplier-value",children:(e=s.speakingThresholdMultiplier,"".concat(e.toFixed(1),"\xd7"))})]}),(0,a.jsx)("input",{type:"range",min:el.u4,max:el.M_,step:.1,value:s.speakingThresholdMultiplier,onChange:e=>{var t;return t={speakingThresholdMultiplier:Number(e.target.value)},void(n((0,el.ik)(t)),(0,b.cY)("settings.voice-prefs.update",t))},"data-testid":"voice-prefs-multiplier-slider","aria-label":"Speaking threshold multiplier","aria-valuemin":el.u4,"aria-valuemax":el.M_,"aria-valuenow":s.speakingThresholdMultiplier,className:"w-full"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground","data-testid":"voice-prefs-hint",children:(t=s.speakingThresholdMultiplier)<=1.2?"거의 ducking 없음 — 자기-에코 false-fire 가능":t<=1.7?"약한 ducking — 강한 AEC 환경 + 빠른 cut-in":t<=2.5?"기본값 — 대부분 환경에서 균형":t<=3.5?"강한 ducking — 시끄러운 환경 / 민감한 마이크":"매우 강한 ducking — 자기-에코가 심한 환경"})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{n((0,el.KS)()),(0,b.cY)("settings.voice-prefs.reset")},disabled:l,className:"text-xs text-muted-foreground","data-testid":"voice-prefs-reset",children:["기본값으로 리셋 (",el.Qc.speakingThresholdMultiplier.toFixed(1),"\xd7)"]})})]})}var ed=s(28660),eo=s(32516),ec=s(2159);function eu(e){let{currentTier:t,nextTier:s,currentTierMonthlyUsd:n,nextTierMonthlyUsd:l,monthSoFarUsd:i,onConfirm:o,onCancel:c}=e,u=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;null==(e=u.current)||e.focus()},[]);let m=eo.YS[t],x=eo.YS[s],p=l>n,h=p?'Switch to "'.concat(eo.LW[s],'" tier?'):'Switch to "'.concat(eo.LW[s],'" tier (cheaper)'),f=l-n,b=f>=0?"+".concat((0,eo.Bg)(Math.abs(f))):"-".concat((0,eo.Bg)(Math.abs(f)));return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"tier-confirm-title","aria-describedby":"tier-confirm-summary","data-testid":"tier-change-confirm-modal",onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),c())},children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-lg border bg-white p-4 shadow-xl dark:bg-zinc-900 ".concat(p?"border-amber-300 dark:border-amber-700":"border-emerald-300 dark:border-emerald-700"),children:[(0,a.jsxs)("h2",{id:"tier-confirm-title",className:"mb-2 text-sm font-medium ".concat(p?"text-amber-700 dark:text-amber-300":"text-emerald-700 dark:text-emerald-300"),children:[p?"⚠️":"✓"," ",h]}),(0,a.jsx)("p",{id:"tier-confirm-summary",className:"mb-3 text-xs text-zinc-700 dark:text-zinc-300",children:x.rationale}),(0,a.jsxs)("dl",{className:"mb-4 space-y-1.5 text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("dt",{className:"text-zinc-500 dark:text-zinc-400",children:"Month so far"}),(0,a.jsx)("dd",{className:"font-mono tabular-nums text-zinc-900 dark:text-zinc-100","data-testid":"tier-confirm-month-so-far",children:(0,eo.Bg)(i).replace("/mo","")})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("dt",{className:"text-zinc-500 dark:text-zinc-400",children:["At current tier (",eo.LW[t],")"]}),(0,a.jsx)("dd",{className:"font-mono tabular-nums text-zinc-900 dark:text-zinc-100","data-testid":"tier-confirm-current-projected",children:(0,eo.Bg)(n)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between rounded px-2 py-1 ".concat(p?"bg-amber-50 dark:bg-amber-950/40":"bg-emerald-50 dark:bg-emerald-950/40"),children:[(0,a.jsxs)("dt",{className:p?"text-amber-700 dark:text-amber-300":"text-emerald-700 dark:text-emerald-300",children:["At new tier (",eo.LW[s],")"]}),(0,a.jsxs)("dd",{className:"font-mono tabular-nums ".concat(p?"text-amber-900 dark:text-amber-100":"text-emerald-900 dark:text-emerald-100"),"data-testid":"tier-confirm-next-projected",children:[(0,eo.Bg)(l),(0,a.jsxs)("span",{className:"ml-1 text-[10px] opacity-70","data-testid":"tier-confirm-delta",children:["(",b,")"]})]})]})]}),(0,a.jsxs)("p",{className:"mb-3 text-[11px] text-zinc-500 dark:text-zinc-400","data-testid":"tier-confirm-rate-line",children:["Per-call: $",m.usdPerMinAudio.toFixed(3),"/min → $",(x.usdPerMinAudio+x.loadedExtraUsdPerMin).toFixed(3),"/min"]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:c,"data-testid":"tier-confirm-cancel",children:"Cancel"}),(0,a.jsx)(d.$,{ref:u,type:"button",size:"sm",onClick:o,"data-testid":"tier-confirm-confirm",className:p?"bg-amber-600 text-white hover:bg-amber-700":"bg-emerald-600 text-white hover:bg-emerald-700",children:p?"Confirm switch":"Switch"})]})]})})}let em=eo.Ql.length;function ex(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)("idle"),[m]=(0,r.useState)(0);(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&(l(s),u("synced"))})(),()=>{e=!0}},[t]);let x=(0,ec.gF)(s),p=eo.YS[x],h=void 0===s.stt,f=(0,eo.K0)(null!=i?i:x),g=(0,r.useMemo)(()=>{let e={};for(let t of eo.Ql)e[t]=(0,eo.nX)(t,s.audioMinPerDay);return e},[s.audioMinPerDay]),j=e=>{l((0,ec.Pz)({stt:e})),u("syncing"),(0,b.cY)("settings.model-tier.update",{stt:e}),(0,ed.ZB)(t,e).then(u)};return(0,a.jsxs)("section",{"data-testid":"voice-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83C\uDF9A️ Voice transcription quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick how accurate vs. cheap the speech-to-text should be — elanous picks the model. Switching takes effect on the next voice call."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[x],h&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"voice-model-tier-default-badge",children:"Smart default"}),"syncing"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"voice-model-tier-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"voice-model-tier-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"voice-model-tier-sync-status",title:"Daemon unreachable — change saved locally \xb7 will sync when daemon comes back",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"voice-model-tier-sync-status",title:"Daemon refused the write — local copy still has your choice",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"voice-model-tier-cost",children:s.audioMinPerDay>0?(0,eo.Bg)(g[x]):"".concat((p.usdPerMinAudio+p.loadedExtraUsdPerMin).toFixed(3),"/min")})]}),(0,a.jsx)("input",{type:"range",min:0,max:em-1,step:1,value:f,onChange:e=>{let t=function(e){let t=Math.max(0,Math.min(em-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));if(t!==x){if(function(e){let{currentTier:t,nextTier:s,currentTierMonthlyUsd:a,nextTierMonthlyUsd:r,audioMinPerDay:n}=e;if(t===s)return!1;let l=r-a;if(l<0)return!1;if(n>0)return l>=1;let i=eo.YS[t].usdPerMinAudio+eo.YS[t].loadedExtraUsdPerMin,d=eo.YS[s].usdPerMinAudio+eo.YS[s].loadedExtraUsdPerMin;return 0===i?d>0:d>=5*i}({currentTier:x,nextTier:t,currentTierMonthlyUsd:g[x],nextTierMonthlyUsd:g[t],audioMinPerDay:s.audioMinPerDay}))return void o(t);j(t)}},"data-testid":"voice-model-tier-slider","aria-label":"Voice transcription tier","aria-valuemin":0,"aria-valuemax":em-1,"aria-valuenow":f,"aria-valuetext":eo.LW[x],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"voice-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===x?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"voice-model-tier-rationale",children:p.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"voice-model-tier-model-id",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:p.model}),"wip"===p.status&&(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-500/10 px-1 py-0.5 text-amber-600",children:"WIP \xb7 install local binary first"})]})]})}),(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l((0,ec.Pv)()),o(null),u("syncing"),(0,b.cY)("settings.model-tier.reset"),(0,ed.ZB)(t,null).then(u)},disabled:h,className:"text-xs text-muted-foreground","data-testid":"voice-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]}),s.audioMinPerDay>0&&(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground","data-testid":"voice-model-tier-usage-hint",children:["~",s.audioMinPerDay.toFixed(0)," min/day \xb7 14-day rolling avg"]})]}),i&&(0,a.jsx)(eu,{currentTier:x,nextTier:i,currentTierMonthlyUsd:g[x],nextTierMonthlyUsd:g[i],monthSoFarUsd:m,onConfirm:()=>{i&&j(i),o(null)},onCancel:()=>{o(null),(0,b.cY)("settings.model-tier.cancel",{from:x})}})]})}let ep=eo.Ql.length;function eh(e){return"string"==typeof e&&(0,eo.D9)(e)?e:"anthropic"}function ef(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)(()=>eh(e.provider)),[c,u]=(0,r.useState)("idle");(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&(l(s),u("synced"))})(),()=>{e=!0}},[t]),(0,r.useEffect)(()=>{o(eh(e.provider))},[e.provider]);let m=(0,ec.oA)(s),x=void 0===s.llm,p=(0,eo.K0)(m),h=(0,eo.f7)(i,m);return(0,a.jsxs)("section",{"data-testid":"llm-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83E\uDDE0 AI assistant quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick how careful vs. fast the model should think. elanous chooses the right model on your active provider \xb7 the slider stays the same across providers."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[m],x&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"llm-model-tier-default-badge",children:"Smart default"}),"syncing"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"llm-model-tier-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"llm-model-tier-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"llm-model-tier-sync-status",title:"Daemon unreachable",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"llm-model-tier-sync-status",title:"Daemon refused the write",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"llm-model-tier-provider",children:eo.T0[i]})]}),(0,a.jsx)("input",{type:"range",min:0,max:ep-1,step:1,value:p,onChange:e=>{let s=function(e){let t=Math.max(0,Math.min(ep-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));s!==m&&(l((0,ec.Pz)({llm:s})),u("syncing"),(0,b.cY)("settings.model-tier.llm.update",{llm:s}),(0,ed.tM)(t,s).then(u))},"data-testid":"llm-model-tier-slider","aria-label":"AI assistant tier","aria-valuemin":0,"aria-valuemax":ep-1,"aria-valuenow":p,"aria-valuetext":eo.LW[m],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"llm-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===m?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"llm-model-tier-rationale",children:h.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"llm-model-tier-model-id",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:h.model}),h.reasoningLevel&&(0,a.jsxs)("span",{className:"ml-1 text-muted-foreground",children:["\xb7 reasoning: ",(0,a.jsx)("span",{className:"font-mono",children:h.reasoningLevel})]}),"wip"===h.status&&(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-500/10 px-1 py-0.5 text-amber-600",children:"WIP \xb7 install local runtime first"})]})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l((0,ec.Pz)({llm:void 0})),u("syncing"),(0,b.cY)("settings.model-tier.llm.reset"),(0,ed.tM)(t,null).then(u)},disabled:x,className:"text-xs text-muted-foreground","data-testid":"llm-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]})})]})}let eb=eo.Ql.length;function eg(){var e;let{config:t}=(0,n.Q)(),s=(0,r.useMemo)(()=>({baseUrl:t.baseUrl,...t.token?{token:t.token}:{}}),[t.baseUrl,t.token]),[l,i]=(0,r.useState)(ec.Ij),[o,c]=(0,r.useState)("idle");(0,r.useEffect)(()=>{i((0,ec.Ij)());let e=!1;return(async()=>{let t=await (0,ed.ee)(s);!e&&t&&(i(t),c("synced"))})(),()=>{e=!0}},[s]);let u=(0,ec.Md)(l),m=eo.eP[u],x=void 0===l.tts,p=(0,eo.K0)(u),h=!Number.isFinite(e=m.usdPerCharacter)||e<=0?"free":"$".concat((1e6*e).toFixed(0),"/M chars");return(0,a.jsxs)("section",{"data-testid":"tts-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDD0A Voice playback quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick text-to-speech quality vs. cost. Voice identity (Rachel \xb7 SoYoung \xb7 custom) lives in a separate picker (Phase 2 M2-2b)."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[u],x&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"tts-model-tier-default-badge",children:"Smart default"}),"syncing"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"tts-model-tier-sync-status",children:"Syncing…"}),"synced"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"tts-model-tier-sync-status",children:"Synced"}),"offline"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"tts-model-tier-sync-status",children:"Offline"}),"error"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"tts-model-tier-sync-status",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"tts-model-tier-rate",children:h})]}),(0,a.jsx)("input",{type:"range",min:0,max:eb-1,step:1,value:p,onChange:e=>{let t=function(e){let t=Math.max(0,Math.min(eb-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));t!==u&&(i((0,ec.Pz)({tts:t})),c("syncing"),(0,b.cY)("settings.model-tier.tts.update",{tts:t}),(0,ed.pP)(s,t).then(c))},"data-testid":"tts-model-tier-slider","aria-label":"Voice playback tier","aria-valuemin":0,"aria-valuemax":eb-1,"aria-valuenow":p,"aria-valuetext":eo.LW[u],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"tts-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===u?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"tts-model-tier-rationale",children:m.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"tts-model-tier-model-id",children:["Provider: ",(0,a.jsx)("span",{className:"font-mono",children:m.provider}),(0,a.jsx)("span",{className:"ml-1",children:"\xb7"}),(0,a.jsxs)("span",{className:"ml-1",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:m.model})]})]})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{i((0,ec.Pz)({tts:void 0})),c("syncing"),(0,b.cY)("settings.model-tier.tts.reset"),(0,ed.pP)(s,null).then(c)},disabled:x,className:"text-xs text-muted-foreground","data-testid":"tts-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]})})]})}let ej=null;async function ev(e){var t;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.baseUrl)return null;let a=null!=(t=s.now)?t:Date.now();if(!s.bypassMemo&&ej&&a-ej.fetchedAt<6e4)return ej.lib;try{let t=e.baseUrl.replace(/\/$/,"")+"/v1/elevenlabs/voices",s={};e.token&&(s.authorization="Bearer ".concat(e.token));let r=await fetch(t,{headers:s});if(!r.ok)return null;let n=await r.json(),l={voices:Array.isArray(n.voices)?n.voices:[],configured:!0===n.configured,fromCache:!0===n.fromCache};return ej={fetchedAt:a,lib:l},l}catch(e){return null}}let ey="elanous.tts-voice.recent";function eN(){if("undefined"==typeof localStorage)return[];try{let e=localStorage.getItem(ey);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e&&e.length>0).slice(0,5)}catch(e){return[]}}let ek=[{key:"default",label:"Default",hint:"Fallback when a specific context isn't set"},{key:"chat",label:"Chat reply",hint:"Used by the PWA / TUI chat surface"},{key:"digest",label:"Morning digest",hint:"Daily summary read-back (P2-D7)"},{key:"alert",label:"Push alerts",hint:"Urgency-driven voice for push notifications"},{key:"discord",label:"Discord bot",hint:"X9 Discord voice channel + DM voice replies"}],ew="elanous.tts-voice-map";function eS(){if("undefined"==typeof localStorage)return{};try{let e=localStorage.getItem(ew);if(!e)return{};let t=JSON.parse(e),s={};for(let e of ek){let a=t[e.key];"string"==typeof a&&a.trim().length>0&&(s[e.key]=a.trim())}return s}catch(e){return{}}}function eC(e){return[e.gender,e.accent,e.category].filter(Boolean).join(" \xb7 ")||"voice"}function eU(){var e;let{config:t}=(0,n.Q)(),s=(0,r.useMemo)(()=>({baseUrl:t.baseUrl,...t.token?{token:t.token}:{}}),[t.baseUrl,t.token]),[l,i]=(0,r.useState)(eS),[c,u]=(0,r.useState)("idle"),[m,x]=(0,r.useState)(null),[p,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(null),[j,v]=(0,r.useState)(eN),y=(0,r.useRef)(null),[N,k]=(0,r.useState)(null);(0,r.useEffect)(()=>{i(eS()),v(eN());let e=!1;return(async()=>{let t=await ev(s);e||(x(t),u(null===t?"offline":"synced"))})(),()=>{e=!0}},[s]);let w=(0,r.useMemo)(()=>{let e=new Map;if(m)for(let t of m.voices)e.set(t.id,t);return e},[m]),S=(0,r.useMemo)(()=>{if(!m)return[];var e=m.voices;let t=p.trim().toLowerCase();return t?e.filter(e=>[e.name,e.category,e.accent,e.gender,e.age,e.description,e.language,e.id].filter(Boolean).join(" ").toLowerCase().includes(t)):[...e]},[m,p]),C=async(e,t)=>{let a=(null!=t?t:"").trim(),r={...l};a?r[e]=a:delete r[e],i(r);if("undefined"!=typeof localStorage)try{localStorage.setItem(ew,JSON.stringify(r))}catch(e){}a&&(!function(e){if("undefined"==typeof localStorage||!e||"string"!=typeof e)return;let t=e.trim();if(!t)return;let s=eN().filter(e=>e!==t),a=[t,...s].slice(0,5);try{localStorage.setItem(ey,JSON.stringify(a))}catch(e){}}(a),v(eN())),u("syncing"),(0,b.cY)("settings.tts-voice.apply",{context:e,voiceId:a||null}),u(await (0,ed.D4)(s,{[e]:a||null}))},U=async()=>{if(i({}),"undefined"!=typeof localStorage)try{localStorage.removeItem(ew)}catch(e){}u("syncing"),(0,b.cY)("settings.tts-voice.reset-all"),u(await (0,ed.D4)(s,{default:null,chat:null,digest:null,alert:null,discord:null}))},P=e=>{if(!e.previewUrl)return;y.current&&(y.current.pause(),y.current.src="");let t=new Audio(e.previewUrl);y.current=t,k(e.id),t.addEventListener("ended",()=>k(t=>t===e.id?null:t)),t.addEventListener("error",()=>k(t=>t===e.id?null:t)),t.play().catch(()=>k(t=>t===e.id?null:t)),(0,b.cY)("settings.tts-voice.preview",{voiceId:e.id})},E=()=>{y.current&&(y.current.pause(),y.current.src="",y.current=null),k(null)},M=Object.keys(l).length>0,A=null!==m&&m.voices.length>0;return(0,a.jsxs)("section",{"data-testid":"tts-voice-id-picker-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDDE3️ Voice identity (per context)"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick a different voice per surface (chat / morning digest / alerts / Discord). Browse the ElevenLabs library or paste a voice id directly."})]}),"syncing"===c&&(0,a.jsx)("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"tts-voice-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"tts-voice-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"tts-voice-sync-status",title:"Daemon unreachable",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"tts-voice-sync-status",children:"Sync error"})]}),m&&!m.configured&&(0,a.jsxs)("div",{className:"mb-3 rounded bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300","data-testid":"tts-voice-library-unconfigured",children:["ElevenLabs API key not set — set ",(0,a.jsx)("code",{className:"font-mono",children:"ELEVENLABS_API_KEY"})," in your env or store via ",(0,a.jsx)("code",{className:"font-mono",children:"elanous config set-secret elevenlabs.apiKey <key>"})," ","to browse the 10k+ voice library."]}),(0,a.jsx)("div",{className:"space-y-2","data-testid":"tts-voice-rows",children:ek.map(e=>{let t=l[e.key],s=t?w.get(t):void 0;return(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-baseline justify-between gap-2 text-xs",children:[(0,a.jsx)("span",{className:"font-medium","data-testid":"tts-voice-row-".concat(e.key,"-label"),children:e.label}),s&&(0,a.jsxs)("span",{className:"text-[11px] text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-current-name"),children:[s.name," ",(0,a.jsxs)("span",{className:"opacity-60",children:["\xb7 ",eC(s)]})]}),t&&!s&&(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-current"),children:t})]}),(0,a.jsx)("p",{className:"mb-1 text-[10px] text-muted-foreground",children:e.hint}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(o.p,{defaultValue:null!=t?t:"",onBlur:s=>{let a=s.target.value.trim();a!==(null!=t?t:"")&&C(e.key,a||null)},placeholder:"Voice id (paste) or use Browse →",className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-input")}),(0,a.jsx)(d.$,{type:"button",size:"sm",variant:f===e.key?"default":"outline",onClick:()=>g(f===e.key?null:e.key),disabled:!A,className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-browse"),title:A?"Browse library":"Library not loaded yet",children:"Browse"}),(null==s?void 0:s.previewUrl)&&(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>N===s.id?E():P(s),className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-preview"),children:N===s.id?"⏸":"▶"}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(e.key,null),disabled:!t,className:"text-xs text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-clear"),children:"Clear"})]})]},e.key)})}),null!==f&&A&&(0,a.jsxs)("div",{className:"mt-3 rounded-md border border-input bg-background p-2","data-testid":"tts-voice-library-catalog",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,a.jsx)(o.p,{value:p,onChange:e=>h(e.target.value),placeholder:"Search voices (name \xb7 accent \xb7 gender \xb7 description)",className:"text-xs","data-testid":"tts-voice-library-search"}),(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>g(null),className:"text-xs text-muted-foreground","data-testid":"tts-voice-library-close",children:"Close"})]}),j.length>0&&!p&&(0,a.jsxs)("div",{className:"mb-2","data-testid":"tts-voice-recent-row",children:[(0,a.jsx)("p",{className:"mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Recently used"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:j.map(e=>{let t=w.get(e);return t?(0,a.jsx)("button",{type:"button",className:"rounded border border-border/40 bg-muted/30 px-2 py-1 text-[11px] hover:bg-muted",onClick:()=>f&&C(f,e),"data-testid":"tts-voice-recent-".concat(e),children:t.name},e):null})})]}),(0,a.jsxs)("p",{className:"mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:[S.length," voice",1===S.length?"":"s",p&&' matching "'.concat(p,'"')]}),(0,a.jsxs)("div",{className:"max-h-64 space-y-1 overflow-y-auto pr-1","data-testid":"tts-voice-library-list",children:[S.slice(0,50).map(e=>{let t=N===e.id;return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded border border-border/40 bg-muted/20 px-2 py-1 text-xs","data-testid":"tts-voice-library-row-".concat(e.id),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate font-medium",children:e.name}),(0,a.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:[eC(e),e.description&&(0,a.jsxs)("span",{children:[" \xb7 ",e.description]})]})]}),e.previewUrl&&(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>t?E():P(e),className:"text-xs","data-testid":"tts-voice-library-preview-".concat(e.id),children:t?"⏸":"▶"}),(0,a.jsx)(d.$,{type:"button",size:"sm",onClick:()=>f&&C(f,e.id),className:"text-xs","data-testid":"tts-voice-library-apply-".concat(e.id),children:"Apply"})]},e.id)}),S.length>50&&(0,a.jsxs)("p",{className:"text-center text-[10px] text-muted-foreground",children:["Showing first 50 of ",S.length," \xb7 refine the search to see more"]}),0===S.length&&(0,a.jsxs)("p",{className:"px-2 py-4 text-center text-[11px] text-muted-foreground",children:['No voices match "',p,'"']})]})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:U,disabled:!M,className:"text-xs text-muted-foreground","data-testid":"tts-voice-reset-all",children:"Reset all"}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground/80",children:A?"".concat(null!=(e=null==m?void 0:m.voices.length)?e:0," voices \xb7 library cache via daemon"):"Paste voice id manually until daemon library is reachable"})]})]})}let eP={casual_chat:{id:"casual_chat",label:"Casual chat",icon:"\uD83D\uDCAC",description:"Day-to-day messaging \xb7 cheap STT / LLM \xb7 no read-back.",tiers:{stt:"budget",llm:"budget",tts:"budget"}},meeting:{id:"meeting",label:"Meeting notes",icon:"\uD83D\uDCCB",description:"Balanced accuracy for transcripts \xb7 standard LLM summarization.",tiers:{stt:"balanced",llm:"balanced",tts:"balanced"},monthlyUsdCap:5},medical_dictation:{id:"medical_dictation",label:"Medical / legal dictation",icon:"\uD83C\uDFE5",description:"Loaded STT (timestamps + jargon adaptation) \xb7 Best LLM \xb7 ElevenLabs voice.",tiers:{stt:"loaded",llm:"best",tts:"best"},monthlyUsdCap:20},live_caption:{id:"live_caption",label:"Live captioning",icon:"\uD83C\uDFAC",description:"Low-latency STT \xb7 LLM disabled \xb7 no read-back.",tiers:{stt:"balanced",llm:"budget",tts:"budget"}},sleep_mode:{id:"sleep_mode",label:"Sleep mode",icon:"\uD83C\uDF19",description:"Cost zero \xb7 local-only models \xb7 no API calls.",tiers:{stt:"budget",llm:"budget",tts:"budget"},monthlyUsdCap:0}},eE=["casual_chat","meeting","medical_dictation","live_caption","sleep_mode"],eM="elanous.active-preset";function eA(){if("undefined"!=typeof localStorage)try{let e=localStorage.getItem(eM);if(!e)return;return eE.includes(e)?e:void 0}catch(e){return}}function ez(e){if("undefined"!=typeof localStorage)try{null===e?localStorage.removeItem(eM):localStorage.setItem(eM,e)}catch(e){}}function eI(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(eA),[i,o]=(0,r.useState)("idle"),[c,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{l(eA())},[]);let m=async e=>{u(e.id),o("syncing"),(0,b.cY)("settings.preset.apply",{id:e.id}),ez(e.id),l(e.id),o(await (0,ed.F$)(t,{id:e.id,tiers:e.tiers,...e.ttsVoice?{ttsVoice:e.ttsVoice}:{},...void 0!==e.monthlyUsdCap?{monthlyUsdCap:e.monthlyUsdCap}:{}})),u(null)},x=async()=>{o("syncing"),(0,b.cY)("settings.preset.clear"),ez(null),l(void 0),o(await (0,ed.F$)(t,null))};return(0,a.jsxs)("section",{"data-testid":"preset-card-grid",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"⚡ Quick presets"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"One-click bundles for common use cases — applies STT, LLM, TTS, voice id, and budget cap together. You can still fine-tune any slider after applying."})]}),"syncing"===i&&(0,a.jsx)("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"preset-sync-status",children:"Syncing…"}),"synced"===i&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"preset-sync-status",children:"Synced"}),"offline"===i&&(0,a.jsx)("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"preset-sync-status",children:"Offline"}),"error"===i&&(0,a.jsx)("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"preset-sync-status",children:"Sync error"})]}),s&&(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between rounded bg-emerald-500/5 px-3 py-2 text-xs","data-testid":"preset-active-banner",children:[(0,a.jsxs)("span",{className:"text-emerald-700 dark:text-emerald-300",children:["✓ Active preset: ",(0,a.jsx)("strong",{children:eP[s].label})]}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:x,className:"text-[11px] text-muted-foreground","data-testid":"preset-clear-active",children:"Clear preset"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3","data-testid":"preset-card-list",children:eE.map(e=>{let t=eP[e],r=s===e,n=c===e;return(0,a.jsxs)("button",{type:"button",onClick:()=>m(t),disabled:n,className:"rounded-md border px-3 py-2 text-left transition-colors ".concat(r?"border-emerald-500 bg-emerald-500/5":"border-border/60 bg-background hover:bg-muted/40"),"data-testid":"preset-card-".concat(e),children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold",children:[t.icon," ",t.label]}),r&&(0,a.jsx)("span",{className:"text-[10px] text-emerald-600",children:"active"}),n&&(0,a.jsx)("span",{className:"text-[10px] text-blue-600",children:"applying…"})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:t.description}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1 text-[9px] text-muted-foreground",children:[t.tiers.stt&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["stt:",t.tiers.stt]}),t.tiers.llm&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["llm:",t.tiers.llm]}),t.tiers.tts&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["tts:",t.tiers.tts]}),void 0!==t.monthlyUsdCap&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["cap:$",t.monthlyUsdCap]})]})]},e)})})]})}var eT=s(28406),eR=s(9585),eL=s(76266),eD=s(81818),e$=s(50121);let eO={skills:"\uD83D\uDEE0️",toolRestrictions:"\uD83D\uDD12",structuredOutput:"\uD83D\uDCCB",thinkingControl:"\uD83D\uDCAD",effortControl:"⚙️",sessionResume:"↩️",mcp:"\uD83E\uDDE9",hooks:"\uD83E\uDE9D",agents:"\uD83E\uDD16",envInjection:"\uD83D\uDD11",costControl:"\uD83D\uDCB0",fallbackModel:"\uD83D\uDD01",sandbox:"\uD83E\uDDF1",multiHostFanout:"\uD83C\uDF10"};function eY(){let{client:e,config:t}=(0,n.Q)(),s=(0,e$.X)(e),[l,i]=(0,r.useState)({}),[d,o]=(0,r.useState)({state:"idle"}),[c,u]=(0,r.useState)("list"),m=(0,r.useMemo)(()=>{let e=s.providers[0];return e?Object.keys(e.capabilities).sort():[]},[s.providers]);(0,r.useEffect)(()=>{if(s.providers.length>0&&0===Object.keys(l).length){let e={};for(let t of s.providers)e[t.id]=!1;i(e)}},[s.providers,l]);let x=(0,r.useCallback)(e=>{i(t=>({...t,[e]:!t[e]}))},[]),p=(0,r.useCallback)(async()=>{o({state:"running"});try{var e,a;let r="".concat(null!=(a=null==(e=t.baseUrl)?void 0:e.replace(/\/$/,""))?a:"","/v1/registry/discovery"),n={};t.token&&(n.authorization="Bearer ".concat(t.token));let l=await fetch(r,{method:"POST",headers:n});if(!l.ok)return void o({state:"error",detail:"HTTP ".concat(l.status)});await s.reload(),o({state:"ok"})}catch(e){o({state:"error",detail:e instanceof Error?e.message:String(e)})}},[t.baseUrl,t.token,s]);return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"llm-catalog-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM Catalog"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)("span",{"data-testid":"llm-catalog-summary",children:s.loading?"loading…":"".concat(s.providers.length," providers \xb7 ").concat(s.models.length," models")}),(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>"list"===e?"matrix":"list"),"aria-label":"Toggle view: list vs capability matrix","data-testid":"llm-catalog-view-toggle",className:"rounded px-1.5 py-0.5 text-[10px] uppercase font-medium hover:bg-surface-elevated",children:"list"===c?"matrix":"list"}),(0,a.jsx)("button",{type:"button",onClick:p,disabled:"running"===d.state||s.loading,"aria-label":"Run discovery refresh","data-testid":"llm-catalog-refresh",className:"rounded p-1 hover:bg-surface-elevated disabled:opacity-50",children:(0,a.jsx)(L.A,{className:"h-3 w-3 ".concat("running"===d.state?"animate-spin":"")})})]})]}),s.error&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error","data-testid":"llm-catalog-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),s.error]}),"error"===d.state&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),"discovery failed \xb7 ",d.detail]}),"ok"===d.state&&(0,a.jsx)("p",{className:"text-[11px] text-emerald-600 dark:text-emerald-400",children:"discovery complete — catalog refreshed"}),s.loading&&0===s.providers.length&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/registry/catalog…"}),s.providers.length>0&&"matrix"===c&&(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-border","data-testid":"llm-catalog-matrix",children:(0,a.jsxs)("table",{className:"min-w-full text-[10px]",children:[(0,a.jsx)("thead",{className:"bg-surface-elevated",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"sticky left-0 z-10 bg-surface-elevated px-2 py-1 text-left font-medium",children:"Provider"}),m.map(e=>{var t;return(0,a.jsx)("th",{className:"px-1.5 py-1 text-center font-medium uppercase text-muted-foreground",title:e,children:null!=(t=eO[e])?t:e.slice(0,3)},e)})]})}),(0,a.jsx)("tbody",{children:s.providers.map(e=>(0,a.jsxs)("tr",{className:"border-t border-border/40","data-testid":"llm-catalog-matrix-row-".concat(e.id),children:[(0,a.jsx)("td",{className:"sticky left-0 z-10 bg-card px-2 py-1 font-mono text-[10px]",children:e.id}),m.map(t=>{let s=e.capabilities[t];return(0,a.jsx)("td",{className:"px-1.5 py-1 text-center",title:"".concat(e.id," \xb7 ").concat(t,": ").concat(s?"yes":"no"),children:s?(0,a.jsx)(eT.A,{className:"mx-auto h-3 w-3 text-emerald-600 dark:text-emerald-400"}):(0,a.jsx)(eR.A,{className:"mx-auto h-3 w-3 text-muted-foreground/50"})},t)})]},e.id))})]})}),s.providers.length>0&&"list"===c&&(0,a.jsx)("ul",{className:"space-y-1 rounded-md border border-border","data-testid":"llm-catalog-provider-list",children:s.providers.map(e=>{var t;let r=s.modelsByProvider(e.id),n=null!=(t=l[e.id])&&t,i=Object.entries(e.capabilities).filter(e=>{let[,t]=e;return!0===t}).map(e=>{let[t]=e;return t});return(0,a.jsxs)("li",{className:"border-b border-border/40 last:border-0","data-testid":"llm-catalog-provider-".concat(e.id),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>x(e.id),"aria-expanded":n,className:"flex w-full items-start justify-between gap-2 px-2 py-1.5 text-left hover:bg-surface-elevated","data-testid":"llm-catalog-provider-toggle-".concat(e.id),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] font-medium",children:[n?(0,a.jsx)(eL.A,{className:"h-3 w-3"}):(0,a.jsx)(eD.A,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:e.displayName}),(0,a.jsx)("span",{className:"rounded bg-muted px-1 font-mono text-[9px] uppercase text-muted-foreground",children:e.id})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-0.5 pl-4 text-[10px] text-muted-foreground",children:i.map(e=>{var t;return(0,a.jsxs)("span",{className:"rounded bg-surface-elevated px-1",title:e,children:[null!=(t=eO[e])?t:"\xb7"," ",e]},e)})})]}),(0,a.jsxs)("span",{className:"shrink-0 rounded bg-muted px-1 text-[10px] text-muted-foreground",children:[r.length," model",1===r.length?"":"s"]})]}),n&&(0,a.jsxs)("ul",{className:"border-t border-border/40 bg-surface-elevated/50 px-2 py-1","data-testid":"llm-catalog-models-".concat(e.id),children:[0===r.length&&(0,a.jsx)("li",{className:"py-1 text-[10px] text-muted-foreground",children:"no models registered for this provider"}),r.map(e=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 py-0.5 font-mono text-[10px]","data-testid":"llm-catalog-model-".concat(e.id),children:[(0,a.jsx)("span",{className:"truncate",title:e.id,children:e.id}),(0,a.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:[e.contextSize?"".concat(Math.round(e.contextSize/1e3),"k ctx"):"—",e.pricing?" \xb7 $".concat(e.pricing.inputPerMTok,"/$").concat(e.pricing.outputPerMTok):""]})]},e.id))]})]},e.id)})})]})}var eB=s(98902);function e_(e){let{status:t,percent:s,monthlyUsdCap:n,monthSoFarUsd:l,recommendedFallback:i,notifyAtPct:o,onApply:c,onAdjustCap:u,onDismiss:m}=e,[x,p]=(0,r.useState)("switch"),h=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;null==(e=h.current)||e.focus()},[]);let f="cap-exceeded"===t,b=eo.LW[i],g=(0,eo.Bg)(l).replace("/mo",""),j=(0,eo.Bg)(n).replace("/mo","");return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"budget-threshold-title","aria-describedby":"budget-threshold-summary","data-testid":"budget-threshold-modal","data-status":t,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),m())},children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-lg border bg-white p-4 shadow-xl dark:bg-zinc-900 ".concat(f?"border-rose-300 dark:border-rose-700":"border-amber-300 dark:border-amber-700"),children:[(0,a.jsxs)("h2",{id:"budget-threshold-title",className:"mb-2 text-sm font-medium ".concat(f?"text-rose-700 dark:text-rose-300":"text-amber-700 dark:text-amber-300"),children:["\uD83D\uDCB0 You've used ",g," of ",j," monthly cap (",Math.round(s),"%)"]}),(0,a.jsx)("p",{id:"budget-threshold-summary",className:"mb-3 text-xs text-zinc-600 dark:text-zinc-400","data-testid":"budget-threshold-summary",children:f?"You've passed the cap. elanous recommends falling back to ".concat(b," tier for the rest of this month."):"You're past the ".concat(o,"% threshold. elanous can switch to ").concat(b," tier to slow the burn.")}),(0,a.jsxs)("fieldset",{className:"mb-4 space-y-1.5 text-xs","data-testid":"budget-threshold-choices",children:[(0,a.jsx)("legend",{className:"sr-only",children:"Auto-fallback options"}),(0,a.jsx)(eQ,{id:"switch",label:"Switch to ".concat(b," tier for the rest of this month"),checked:"switch"===x,onSelect:()=>p("switch")}),(0,a.jsx)(eQ,{id:"continue",label:"Continue at current tier (may exceed cap)",checked:"continue"===x,onSelect:()=>p("continue")}),(0,a.jsx)(eQ,{id:"local-only",label:"Use local-only models (cost = $0)",checked:"local-only"===x,onSelect:()=>p("local-only")})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:u,"data-testid":"budget-threshold-adjust-cap",children:"Adjust cap"}),(0,a.jsx)(d.$,{ref:h,type:"button",size:"sm",onClick:()=>c(x,i),"data-testid":"budget-threshold-apply",className:f?"bg-rose-600 text-white hover:bg-rose-700":"bg-amber-600 text-white hover:bg-amber-700",children:"Apply"})]})]})})}function eQ(e){let{id:t,label:s,checked:r,onSelect:n}=e;return(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded px-2 py-1 ".concat(r?"bg-zinc-100 dark:bg-zinc-800":"hover:bg-zinc-50 dark:hover:bg-zinc-800/50"),"data-testid":"budget-threshold-choice-".concat(t),children:[(0,a.jsx)("input",{type:"radio",name:"budget-threshold-choice",value:t,checked:r,onChange:n,className:"h-3 w-3"}),(0,a.jsx)("span",{className:"text-zinc-700 dark:text-zinc-200",children:s})]})}function eW(e){var t,s;let{pollMs:l=6e4,onAdjustCap:i}=e,{config:d}=(0,n.Q)(),[o,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!d.baseUrl)return;let e=!1,t=async()=>{let t=await (0,eB.gh)({baseUrl:d.baseUrl,...d.token?{token:d.token}:{}});e||u(t)};if(t(),l<=0)return()=>{e=!0};let s=setInterval(()=>{t()},l);return()=>{e=!0,clearInterval(s)}},[d.baseUrl,d.token,l]);let m=(0,r.useCallback)(async(e,t)=>{if(!o)return;if("continue"===e){(0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"}),c.oR.message("Continuing at current tier — elanous will nag again at next threshold.");return}let s=await (0,eB.iQ)({baseUrl:d.baseUrl,...d.token?{token:d.token}:{}},t);"synced"===s?c.oR.success("Switched STT/LLM/TTS to ".concat(t,".")):"offline"===s?c.oR.error("Daemon offline — change saved locally, will sync when online."):c.oR.error("Budget fallback failed: ".concat(s,".")),(0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"})},[d.baseUrl,d.token,o]),x=(0,r.useCallback)(()=>{o&&((0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"}))},[o]),p=(0,r.useCallback)(()=>{i&&i(),x()},[i,x]);return o&&(0,eB.Vl)(o)?(0,a.jsx)(e_,{status:o.status,percent:null!=(t=o.percent)?t:0,monthlyUsdCap:null!=(s=o.monthlyUsdCap)?s:0,monthSoFarUsd:o.monthSoFarUsd,recommendedFallback:o.recommendedFallback,notifyAtPct:o.notifyAtPct,onApply:(e,t)=>{m(e,t)},onAdjustCap:p,onDismiss:x}):null}let eF={embedding:"RAG retrieval \xb7 similarity. Most users never touch this.",vision:"OCR \xb7 screenshot analysis \xb7 note-from-image."};function eH(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)("idle"),[c,u]=(0,r.useState)("idle");(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&l(s)})(),()=>{e=!0}},[t]);let m=async(e,s)=>{(0,b.cY)("pwa.settings.tier.embedding-vision","selected ".concat(e,"=").concat(s)),"embedding"===e?(o("syncing"),o(await (0,ed.zs)(t,s)),l(e=>({...e,embedding:s}))):(u("syncing"),u(await (0,ed.We)(t,s)),l(e=>({...e,vision:s})))},x=e=>{let t="embedding"===e?(0,ec.ew)(s):(0,ec.lH)(s),r="embedding"===e?!!s.embedding:!!s.vision,n="embedding"===e?i:c;return(0,a.jsxs)("div",{className:"space-y-1.5","data-testid":"embedding-vision-row-".concat(e),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"embedding"===e?"Embedding":"Vision"}),(0,a.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:r?"Saved \xb7 ".concat(n):"Smart default"})]}),(0,a.jsx)("p",{className:"text-[11px] text-zinc-500 dark:text-zinc-400",children:eF[e]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:eo.Ql.map(s=>(0,a.jsx)(d.$,{size:"sm",variant:s===t?"default":"outline",onClick:()=>{m(e,s)},"data-testid":"embedding-vision-".concat(e,"-").concat(s),className:"text-[11px]",children:eo.LW[s]},s))})]})};return(0,a.jsxs)("section",{className:"space-y-4 rounded-md border border-border bg-card p-4","data-testid":"embedding-vision-card",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Embedding \xb7 Vision tier"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Phase 3 scaffolding — model selection for RAG embedding + image vision. Resolvers wired; call-site integration follows as RAG / vision pipelines come online."})]}),x("embedding"),x("vision")]})}var eK=s(45045);function eV(e){var t,s;return{displayName:e.displayName,description:null!=(t=e.description)?t:"",systemPrompt:null!=(s=e.systemPrompt)?s:""}}function eq(e,t){let s=eV(e),a={};return t.displayName!==s.displayName&&(a.displayName=t.displayName),t.description!==s.description&&(a.description=t.description),t.systemPrompt!==s.systemPrompt&&(a.systemPrompt=t.systemPrompt),a}function eX(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)(!1),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)({}),[m,x]=(0,r.useState)([]),[p,h]=(0,r.useState)(null),[f,b]=(0,r.useState)(""),[g,j]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),[S,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{s(!0)},[]);let U=(0,r.useCallback)(async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){o(null),t||l({status:"loading"});try{let s=await e.getPersonas();l({status:"ok",personas:s.personas}),t||u({})}catch(e){t?o(e.message):l({status:"error",message:e.message})}}},[e]);(0,r.useEffect)(()=>{t&&e&&(U(),e.getPersonaPresets().then(e=>x(e.presets)).catch(e=>h(e.message)))},[t,e,U]);let P=(0,r.useCallback)(async()=>{if(e&&f&&g.trim()&&!v){y(!0),w(null),C(null);try{let t=await e.createPersona({preset:f,name:g.trim()});C("".concat(t.persona.displayName," 인격이 생성되었습니다.")),j(""),await U(!0)}catch(e){w(e.message)}finally{y(!1)}}},[e,f,g,v,U]),E=(0,r.useCallback)((e,t,s)=>{u(a=>{var r;let n={...null==(r=a[e.personaId])?void 0:r.draft};return s===eV(e)[t]?delete n[t]:n[t]=s,{...a,[e.personaId]:{draft:n,saving:!1,error:void 0}}})},[]),M=(0,r.useCallback)(async t=>{if(!e)return;let s=t.personaId,a=c[s];if(!a||a.saving)return;let r=eq(t,{...eV(t),...a.draft});if(0!==Object.keys(r).length){u(e=>({...e,[s]:{...a,saving:!0,error:void 0}}));try{let t=await e.patchPersona(s,r);l(e=>"ok"!==e.status?e:{status:"ok",personas:e.personas.map(e=>e.personaId===s?t.persona:e)}),u(e=>{let{[s]:t,...a}=e;return a})}catch(e){u(t=>({...t,[s]:{...a,saving:!1,error:e.message}}))}}},[e,c]);return t&&e?(0,a.jsxs)("section",{id:"personas","data-testid":"persona-card",className:"space-y-3 rounded border border-border bg-card p-4",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Personas"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"프리셋으로 인격을 만들고 이름, 설명, 시스템 프롬프트를 편집합니다."})]}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>{U()},disabled:"loading"===n.status,children:"Refresh"})]}),(0,a.jsxs)("form",{className:"flex flex-wrap items-end gap-2",onSubmit:e=>{e.preventDefault(),P()},children:[(0,a.jsxs)("label",{className:"flex min-w-36 flex-1 flex-col gap-1 text-xs",htmlFor:"persona-preset",children:["프리셋",(0,a.jsxs)("select",{id:"persona-preset",value:f,onChange:e=>{b(e.target.value),w(null),C(null)},disabled:v,className:"rounded border border-input bg-background px-2.5 py-1.5",children:[(0,a.jsx)("option",{value:"",children:"프리셋 선택"}),m.map(e=>(0,a.jsx)("option",{value:e.personaId,children:e.displayName},e.personaId))]})]}),(0,a.jsxs)("label",{className:"flex min-w-36 flex-1 flex-col gap-1 text-xs",htmlFor:"persona-new-name",children:["이름",(0,a.jsx)("input",{id:"persona-new-name",value:g,onChange:e=>{j(e.target.value),w(null),C(null)},disabled:v,placeholder:"새 인격 이름",className:"rounded border border-input bg-background px-2.5 py-1.5"})]}),(0,a.jsx)(d.$,{type:"submit",size:"sm",disabled:!f||!g.trim()||v,children:v?"생성중…":"인격 만들기"})]}),p?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["프리셋 로드 실패: ",p]}):null,N?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["인격 생성 실패: ",N]}):null,S?(0,a.jsx)("p",{role:"status",className:"text-xs text-green-700 dark:text-green-400",children:S}):null,i?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["인격 목록 새로고침 실패: ",i]}):null,"idle"===n.status||"loading"===n.status?(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading personas…"}):null,"error"===n.status?(0,a.jsxs)("p",{className:"text-xs text-destructive",children:["persona 로드 실패: ",n.message]}):null,"ok"===n.status&&0===n.personas.length?(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"아직 인격이 없습니다. 위에서 프리셋을 골라 새 인격을 만드세요."}):null,"ok"===n.status&&n.personas.length>0?(0,a.jsx)("ul",{className:"flex flex-col gap-3",children:n.personas.map(e=>(0,a.jsx)(eG,{persona:e,edit:c[e.personaId],onDraftChange:E,onSave:M},e.personaId))}):null,(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Note: ⚗ Auto describer 와 orchestrator routing 은"," ",(0,a.jsx)("a",{href:"https://github.com/ElanvitalAI/elanous/blob/main/docs/research/RESEARCH-hermes-pr27572-triage-orchestrator-deferred-2026-05-19.md",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Hermes PR #27572 research"})," ","채택 시 활성화 예정."]})]}):null}function eG(e){var t;let{persona:s,edit:r,onDraftChange:n,onSave:l}=e,i={...eV(s),...null==r?void 0:r.draft},o=Object.keys(eq(s,i)).length>0,c=null!=(t=null==r?void 0:r.saving)&&t,u=280-i.description.length<0;return(0,a.jsxs)("li",{className:"flex flex-col gap-2 rounded border border-border bg-background p-3","data-testid":"persona-row-".concat(s.personaId),children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[s.brandColor?(0,a.jsx)("span",{className:"inline-block h-3 w-3 rounded",style:{backgroundColor:s.brandColor},"aria-hidden":!0}):null,(0,a.jsx)("span",{className:"text-sm font-medium",children:s.displayName}),(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:s.personaId})]}),s.primaryModel?(0,a.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:s.primaryModel}):null]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["표시 이름",(0,a.jsx)("input",{value:i.displayName,onChange:e=>n(s,"displayName",e.target.value),disabled:c,"data-testid":"persona-display-name-".concat(s.personaId),className:"w-full rounded border border-input bg-transparent px-2.5 py-1.5"})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["설명",(0,a.jsx)("textarea",{value:i.description,onChange:e=>n(s,"description",e.target.value),rows:2,maxLength:560,placeholder:"이 persona 가 무엇을 잘 하는지 1-2 문장으로 적어주세요.",disabled:c,"data-testid":"persona-description-".concat(s.personaId),className:(0,eK.cn)("w-full rounded border border-input bg-transparent px-2.5 py-1.5 text-xs","focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50",u&&"border-destructive")})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["시스템 프롬프트",(0,a.jsx)("textarea",{value:i.systemPrompt,onChange:e=>n(s,"systemPrompt",e.target.value),rows:5,disabled:c,"data-testid":"persona-system-prompt-".concat(s.personaId),className:"w-full rounded border border-input bg-transparent px-2.5 py-1.5 font-mono text-xs"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("span",{className:(0,eK.cn)("font-mono text-[10px]",u?"text-destructive":"text-muted-foreground"),children:[i.description.length," / ",280]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(null==r?void 0:r.error)?(0,a.jsx)("span",{className:"text-[10px] text-destructive",children:r.error}):null,(0,a.jsx)(d.$,{size:"sm",onClick:()=>l(s),disabled:!o||c||u||!i.displayName.trim(),"data-testid":"persona-save-".concat(s.personaId),children:c?"저장중…":"저장"})]})]})]})}let eJ="2026-10-29T05:16:24.404Z",eZ="479072f";function e0(e){try{return new Date(e).toLocaleString("ko-KR",{timeZone:"Asia/Seoul",year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch(t){return e}}function e1(){let[e,t]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=!1;return fetch("/v1/health").then(e=>e.ok?e.json():null).then(s=>{!e&&s&&"number"==typeof s.startedAt&&t({startedAt:s.startedAt,sha:"string"==typeof s.daemonSha?s.daemonSha:""})}).catch(()=>{}),()=>{e=!0}},[]);let s=eZ&&"unknown"!==eZ?eZ:"",n=(null==e?void 0:e.sha)&&"unknown"!==e.sha?e.sha:"",l=!!n&&!!s&&n!==s;return(0,a.jsxs)("section",{className:"space-y-3 rounded-2xl border border-border bg-card p-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"빌드 정보"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"배포 최신 여부 판별 — 새로고침 후 시각/SHA 가 안 바뀌면 옛 캐시."})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"rounded-xl bg-muted/40 p-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:"PWA 프론트 빌드"}),(0,a.jsxs)("div",{className:"mt-1 font-mono text-sm",children:[eJ?e0(eJ):"—",s?" \xb7 ".concat(s):""]})]}),(0,a.jsxs)("div",{className:"rounded-xl bg-muted/40 p-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:"데몬(백엔드) 시작"}),(0,a.jsxs)("div",{className:"mt-1 font-mono text-sm ".concat(l?"text-amber-500":""),children:[e?e0(new Date(e.startedAt).toISOString()):"…",n?" \xb7 ".concat(n):""]}),l&&(0,a.jsx)("div",{className:"mt-1 text-[11px] text-amber-500",children:"프론트/데몬 SHA 불일치 — 재빌드\xb7재시작 필요"})]})]})]})}var e2=s(16522),e5=s(55165);function e3(){let{read:e=e5.fG,write:t=e5.MQ}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[s,n]=(0,r.useState)(!1),[l,i]=(0,r.useState)(!1);(0,r.useEffect)(()=>{n(e(e2.f4)),i(e(e2.vm))},[e]);let d=e=>e2.Ue.filter(t=>t.visibility===e).map(e=>e.label).join(" \xb7 "),o=(e,s,a)=>{a(s),t(e,s)};return(0,a.jsxs)("section",{className:"space-y-3 rounded-2xl border border-border bg-card p-4","aria-label":"메뉴",children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"메뉴"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"메뉴에는 주요 탭만 보입니다. Labs(베타)와 숨긴 탭은 이 기기에서만 켤 수 있고, 숨긴 탭도 주소로는 열립니다."}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox","data-elanous-action":"menu-show-labs",checked:s,onChange:e=>o(e2.f4,e.target.checked,n)}),(0,a.jsxs)("span",{children:["Labs 탭 보기 ",(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",d("labs"),")"]})]})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox","data-elanous-action":"menu-show-hidden",checked:l,onChange:e=>o(e2.vm,e.target.checked,i)}),(0,a.jsxs)("span",{children:["숨긴 탭 보기 ",(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",d("hidden"),")"]})]})]})]})}let e4=["","claude","gemini","grok","codex"];function e6(){let[e,t]=(0,r.useState)(i.sR);return(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Mermaid theme"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"자동은 밝은 default 도식입니다. 노트의 init 테마 지시가 이 설정보다 우선합니다."}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Mermaid theme",children:i.HS.map(s=>(0,a.jsx)(d.$,{type:"button",variant:e===s?"default":"outline",size:"sm","aria-pressed":e===s,onClick:()=>{t(s),(0,i.Rk)(s)},children:"auto"===s?"자동":s},s))})]})}function e8(){var e,t,s,i,b,g;let{config:j,setConfig:k,client:w,sessionId:C}=(0,n.Q)();(0,r.useEffect)(()=>{if("#bearer-token"!==window.location.hash)return;let e=window.setTimeout(()=>{let e=document.getElementById("bearer-token");null==e||e.scrollIntoView({block:"center"}),null==e||e.focus()},50);return()=>window.clearTimeout(e)},[]);let{theme:U,setTheme:A}=(0,l.D)(),[I,L]=(0,r.useState)({status:"idle"}),[D,$]=(0,r.useState)({status:"idle"}),[O,Y]=(0,r.useState)({status:"idle"}),[B,Q]=(0,r.useState)(0),[W,K]=(0,r.useState)({status:"idle"}),[V,X]=(0,r.useState)(0),[Z,et]=(0,r.useState)({status:"idle"}),[ea,er]=(0,r.useState)(0),[el,ed]=(0,r.useState)(()=>({supported:!1,permission:"unknown",cachedId:null,cachedLabel:null})),[eo,ec]=(0,r.useState)(!1),[eu,em]=(0,r.useState)(null);(0,r.useEffect)(()=>{ed(v())},[]);let ep=(0,r.useCallback)(()=>{ed(v())},[]),eh=(0,r.useCallback)(async()=>{ec(!0),em(null);try{let e=await y({baseUrl:j.baseUrl,...j.token?{token:j.token}:{}});"enabled"===e.status?c.oR.success("Notifications enabled"):"permission-denied"===e.status?c.oR.error("Permission denied — enable in browser/iOS settings"):"unsupported"===e.status?c.oR.error("Push not supported: ".concat(e.reason)):(em(e.reason),c.oR.error("Enable failed: ".concat(e.reason)))}finally{ec(!1),ep()}},[j.baseUrl,j.token,ep]),eb=(0,r.useCallback)(async()=>{ec(!0);try{await N({baseUrl:j.baseUrl,...j.token?{token:j.token}:{}}),c.oR.success("Notifications disabled")}finally{ec(!1),ep()}},[j.baseUrl,j.token,ep]),ej=(0,r.useCallback)(async()=>{if(j.baseUrl)try{var e,t;let s=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/push/test"),{method:"POST",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(!s.ok)return void c.oR.error("Test failed: HTTP ".concat(s.status));let a=await s.json();c.oR.success("Test sent: ".concat(null!=(e=a.delivered)?e:0," / ").concat(null!=(t=a.attempted)?t:0," delivered"))}catch(e){c.oR.error("Test failed: ".concat(e instanceof Error?e.message:String(e)))}},[j.baseUrl,j.token]),[ev,ey]=(0,r.useState)(""),[eN,ek]=(0,r.useState)(""),[ew,eS]=(0,r.useState)(""),[eC,eP]=(0,r.useState)(null),[eE,eM]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!j.baseUrl)return void L({status:"idle"});let e=!1,t=new AbortController,s=Date.now();return L({status:"loading"}),(async()=>{try{let a=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/health"),{signal:t.signal});if(e)return;let r=Date.now()-s;if(!a.ok)return void L({status:"error",error:"HTTP ".concat(a.status),latencyMs:r,checkedAt:Date.now()});let n=await a.json();L({status:n.ok?"ok":"error",..."number"==typeof n.sessions?{sessions:n.sessions}:{},latencyMs:r,checkedAt:Date.now(),...n.ok?{}:{error:"health.ok=false"}})}catch(t){if(e)return;L({status:"error",error:t instanceof Error?t.message:String(t),latencyMs:Date.now()-s,checkedAt:Date.now()})}})(),()=>{e=!0,t.abort()}},[j.baseUrl]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void $({status:"idle"});let e=!1,t=new AbortController;return $({status:"loading"}),(async()=>{try{var s,a;let r=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/tools"),{signal:t.signal,credentials:"same-origin",mode:"same-origin",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(!r.ok)return void $({status:"error",error:"HTTP ".concat(r.status)});let n=await r.json(),l=(null!=(s=n.specs)?s:[]).map(e=>{var t;return"string"==typeof e?{name:e,description:""}:{name:e.name,description:null!=(t=e.description)?t:""}});$({status:"ok",kind:null!=(a=n.kind)?a:"none",specs:l})}catch(t){if(e)return;$({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,t.abort()}},[I.status,I.checkedAt,j.baseUrl,j.token]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void Y({status:"idle"});let e=!1,t=new AbortController;return Y({status:"loading"}),(async()=>{try{var s;let a=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/diag/auth-trace"),{signal:t.signal,credentials:"same-origin",mode:"same-origin",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(!a.ok)return void Y({status:"error",error:"HTTP ".concat(a.status)});let r=await a.json();Y({status:"ok",entries:null!=(s=r.entries)?s:[],fetchedAt:Date.now()})}catch(t){if(e)return;Y({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,t.abort()}},[I.status,I.checkedAt,j.baseUrl,j.token,B]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl||!C)return void K({status:"idle"});let e=!1,t=null,s=new AbortController;return K({status:"loading"}),(async()=>{try{let a="".concat(j.baseUrl.replace(/\/$/,""),"/v1/turns/last/screenshot?session=").concat(encodeURIComponent(C)),r=await fetch(a,{signal:s.signal,...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(404===r.status)return void K({status:"none",fetchedAt:Date.now()});if(!r.ok)return void K({status:"error",error:"HTTP ".concat(r.status)});let n=await r.blob();if(e)return;t=URL.createObjectURL(n),K({status:"ok",objectUrl:t,fetchedAt:Date.now()})}catch(t){if(e)return;K({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,s.abort(),t&&URL.revokeObjectURL(t)}},[I.status,j.baseUrl,j.token,C,V]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void et({status:"idle"});let e=!1;return et(e=>({...e,status:"loading"})),(async()=>{try{let t=await p(w);if(e)return;et(e=>({status:"ok",bindings:t.bindings,...e.secretRef?{secretRef:e.secretRef}:{},...e.pendingSecretValue?{pendingSecretValue:e.pendingSecretValue}:{}}))}catch(s){if(e)return;let t=s instanceof Error?s.message:String(s);t.includes("404")||t.includes("Not Found")?et({status:"nexus-missing"}):et({status:"error",error:t})}})(),()=>{e=!0}},[w,I.status,j.baseUrl,ea]);let eA=(0,r.useCallback)(()=>{er(e=>e+1)},[]),ez=(0,r.useCallback)(async()=>{eM(!0);try{let e=function(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}(),t=await x(w,e);et(s=>({...s,secretRef:t.ref,pendingSecretValue:e})),c.oR.success("Pushcut secret rotated \xb7 copy + paste into iPhone Shortcut")}catch(t){let e=t instanceof Error?t.message:String(t);c.oR.error("secret rotate failed: ".concat(e))}finally{eM(!1)}},[w]),eT=(0,r.useCallback)(async()=>{if(!ev.trim())return void c.oR.error("token required");let e=eN.trim()||C;if(!e)return void c.oR.error("sessionId required (auto-fill: open this session in /term first)");eP("__new__");try{await h(w,{token:ev.trim(),sessionId:e,...ew.trim()?{label:ew.trim()}:{}}),c.oR.success("binding saved"),ey(""),ek(""),eS(""),eA()}catch(e){c.oR.error("binding save failed: ".concat(e instanceof Error?e.message:String(e)))}finally{eP(null)}},[w,ev,eN,ew,C,eA]),eR=(0,r.useCallback)(async e=>{eP(e);try{await f(w,e),c.oR.success("binding deleted: ".concat(e.slice(0,8),"…")),eA()}catch(e){c.oR.error("delete failed: ".concat(e instanceof Error?e.message:String(e)))}finally{eP(null)}},[w,eA]),eL=e=>"number"!=typeof e?"—":"".concat(e," ms"),eD=e=>{if(!e)return"";let t=Math.floor((Date.now()-e)/1e3);return t<5?"just now":t<60?"".concat(t,"s ago"):"".concat(Math.floor(t/60),"m ago")};return(0,a.jsxs)("div",{className:"mx-auto max-w-2xl space-y-8 p-6",children:[(0,a.jsx)(eW,{}),(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Settings"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Daemon connection, provider default, theme. Stored in localStorage."})]}),(0,a.jsx)(z,{}),(0,a.jsx)(S,{}),(0,a.jsx)(P.Q,{}),(0,a.jsx)(E.lN,{}),(0,a.jsx)(M.Q,{}),(0,a.jsx)("div",{id:"channels",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(_,{}),(0,a.jsx)(F.W,{}),(0,a.jsx)("div",{id:"advanced",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(eY,{}),(0,a.jsx)(en,{}),(0,a.jsx)(H,{}),(0,a.jsx)(G,{}),(0,a.jsx)(J,{}),(0,a.jsx)(q,{}),(0,a.jsx)(ee,{}),(0,a.jsx)(es,{}),(0,a.jsx)("div",{id:"voice",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(ei,{}),(0,a.jsx)(eI,{}),(0,a.jsx)(ex,{}),(0,a.jsx)(ef,{}),(0,a.jsx)(eg,{}),(0,a.jsx)(eU,{}),(0,a.jsx)(eH,{}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"데몬 연결"}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Base URL"}),(0,a.jsx)(o.p,{value:j.baseUrl,placeholder:"http://localhost:31415",onChange:e=>k({baseUrl:e.target.value})})]}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"연결 토큰"}),(0,a.jsx)(o.p,{id:"bearer-token",type:"password",value:j.token,placeholder:"다른 기기에서 만든 연결 토큰을 붙여 넣으세요",onChange:e=>k({token:e.target.value})})]}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Default provider"}),(0,a.jsx)("select",{value:j.provider,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",onChange:e=>k({provider:e.target.value}),children:e4.map(e=>(0,a.jsx)("option",{value:e,children:e||"(none — server default)"},e))})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Daemon health"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>{k({baseUrl:j.baseUrl})},disabled:!j.baseUrl,children:"Recheck"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["idle"===I.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Set Base URL above to probe."}),"loading"===I.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"ok"===I.status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-emerald-500","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-foreground",children:"Reachable"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:eL(I.latencyMs)}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:eD(I.checkedAt)})]}),"number"==typeof I.sessions&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Active sessions: ",(0,a.jsx)("span",{className:"font-mono text-foreground",children:I.sessions})]})]}),"error"===I.status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-rose-500","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-rose-600 dark:text-rose-400",children:"Unreachable"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:eL(I.latencyMs)}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:eD(I.checkedAt)})]}),(0,a.jsx)("p",{className:"break-all font-mono text-[11px] text-muted-foreground",children:I.error}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Verify Base URL \xb7 daemon running (",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous serve --status"}),") \xb7 network reachable from this device."]})]})]})]}),(0,a.jsx)("div",{id:"tools",className:"scroll-mt-8","aria-hidden":!0}),("ok"===D.status||"error"===D.status)&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM tool surface"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["ok"===D.status&&"none"===D.kind&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Tools 미설정 — `elanous serve --tools readonly` 또는 `webterm` 으로 활성화."}),"ok"===D.status&&D.kind&&"none"!==D.kind&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full ".concat("webterm"===D.kind?"bg-amber-500":"bg-emerald-500"),"aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-foreground",children:"kind:"}),(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:D.kind}),"webterm"===D.kind&&(0,a.jsx)("span",{className:"text-[10px] text-amber-600 dark:text-amber-400",children:"(write-capable)"})]}),D.specs&&D.specs.length>0&&(0,a.jsx)("ul",{className:"flex flex-wrap gap-1",children:D.specs.map(e=>(0,a.jsx)("li",{title:e.description,className:"rounded border border-border bg-muted/50 px-1.5 py-0.5 font-mono text-[10px]",children:e.name},e.name))})]}),"error"===D.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"tool surface 조회 실패"})," \xb7 ",D.error]})]})]}),("ok"===O.status||"error"===O.status)&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Auth trace"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>Q(e=>e+1),children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["error"===O.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"auth-trace 조회 실패"})," \xb7 ",O.error]}),"ok"===O.status&&(null!=(i=null==(e=O.entries)?void 0:e.length)?i:0)===0&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"아직 auth 결정 없음. /v1/* 호출이 한 번도 없었다는 뜻."}),"ok"===O.status&&O.entries&&O.entries.length>0&&(0,a.jsx)("div",{className:"max-h-64 overflow-auto font-mono text-[10px]",children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-card text-muted-foreground",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-1 text-left",children:"time"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"path"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"ok"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"reason"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"sfs"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"origin"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"host"})]})}),(0,a.jsx)("tbody",{children:O.entries.slice().reverse().slice(0,30).map((e,t)=>{var s,r,n;return(0,a.jsxs)("tr",{className:"border-t border-border/50",children:[(0,a.jsx)("td",{className:"px-1 whitespace-nowrap",children:new Date(e.ts).toLocaleTimeString()}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[120px]",children:e.path}),(0,a.jsx)("td",{className:"px-1 ".concat(e.ok?"text-emerald-500":"text-rose-500"),children:e.ok?"Y":"N"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:e.reason}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[80px]",children:null!=(s=e.sfs)?s:"∅"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:null!=(r=e.origin)?r:"∅"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:null!=(n=e.host)?n:"∅"})]},"".concat(e.ts,"-").concat(t))})})]})})]})]}),C&&"webterm"===D.kind&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Last screenshot"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>X(e=>e+1),disabled:"loading"===W.status||!j.baseUrl,children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["loading"===W.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"none"===W.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["아직 agent 가 screenshot 을 호출한 적 없음. ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"WebTerminalScreenshot"})," tool 실행 후 Refresh."]}),"ok"===W.status&&W.objectUrl&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Most recent ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"tool_result"})," image in this session."]}),(0,a.jsx)("img",{src:W.objectUrl,alt:"Last screenshot",className:"max-w-full rounded border border-border bg-black"})]}),"error"===W.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"screenshot 조회 실패"})," \xb7 ",W.error]})]})]}),("idle"!==Z.status||"ok"===I.status)&&(0,a.jsxs)("section",{className:"space-y-3","data-testid":"pushcut-section",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Pushcut webhook"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:eA,disabled:"loading"===Z.status||!j.baseUrl,"data-testid":"pushcut-refresh",children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-3",children:["loading"===Z.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"nexus-missing"===Z.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["NEXUS endpoints not reachable. ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"elanous nexus"})," 로 띄우면 secret + binding 관리가 활성됩니다.",(0,a.jsxs)("span",{className:"block mt-1 text-[10px]",children:["(현재 daemon 만 단독 실행 중인 경우 — 본 섹션은 NEXUS HTTP 의 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/v1/registry/bindings"})," + ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/v1/config/secrets"})," 의존)"]})]}),"error"===Z.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"조회 실패"})," \xb7 ",Z.error]}),("ok"===Z.status||Z.secretRef)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"HMAC secret"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{ez()},disabled:eE||!j.baseUrl,"data-testid":"pushcut-rotate-secret",children:eE?"Rotating…":"Rotate"})]}),Z.secretRef&&(0,a.jsxs)("p",{className:"font-mono text-[10px] text-muted-foreground",children:["ref: ",(0,a.jsx)("span",{className:"text-foreground",children:Z.secretRef})," \xb7 id: ",(0,a.jsx)("span",{className:"text-foreground",children:u})]}),Z.pendingSecretValue&&(0,a.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 px-2 py-1.5 dark:border-amber-700 dark:bg-amber-950",children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-amber-700 dark:text-amber-200",children:"Copy now — only shown once"}),(0,a.jsx)("code",{className:"block break-all font-mono text-[11px] text-amber-900 dark:text-amber-100 select-all","data-testid":"pushcut-secret-value",children:Z.pendingSecretValue}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-amber-700 dark:text-amber-300",children:["Paste into iPhone “elanous-camera” Pushcut Shortcut Header ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"X-Pushcut-Sig"})," recipe."]})]})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"연결 (토큰 → 대화)"}),(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[null!=(b=null==(t=Z.bindings)?void 0:t.length)?b:0," active"]})]}),(null!=(g=null==(s=Z.bindings)?void 0:s.length)?g:0)===0&&"ok"===Z.status&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"No bindings yet. Add one below — the daemon will route Pushcut webhooks for that token to the chosen session."}),Z.bindings&&Z.bindings.length>0&&(0,a.jsx)("ul",{className:"space-y-1","data-testid":"pushcut-bindings-list",children:Z.bindings.map(e=>{var t,s;return(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border bg-muted/30 px-2 py-1",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 space-y-0.5",children:[(0,a.jsx)("div",{className:"font-mono text-[11px] font-medium truncate",children:null!=(t=e.label)?t:"(no label)"}),(0,a.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground truncate",children:["token: ",e.key.length>16?"".concat(e.key.slice(0,8),"…").concat(e.key.slice(-4)):e.key]}),(0,a.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground truncate",children:["session: ",null!=(s=e.sessionId)?s:"(unset)"]})]}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{eR(e.key)},disabled:eC===e.key,"data-testid":"pushcut-delete-".concat(e.key),children:eC===e.key?"Deleting…":"Delete"})]},e.key)})}),(0,a.jsxs)("div",{className:"space-y-1.5 rounded border border-dashed border-border p-2 mt-2",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium text-muted-foreground",children:"Add binding"}),(0,a.jsx)(o.p,{value:ev,placeholder:"token (webhook URL key)",onChange:e=>ey(e.target.value),"data-testid":"pushcut-add-token",className:"text-[11px]"}),(0,a.jsx)(o.p,{value:eN,placeholder:C?"sessionId (default: ".concat(C.slice(0,12),"…)"):"sessionId",onChange:e=>ek(e.target.value),"data-testid":"pushcut-add-session",className:"text-[11px]"}),(0,a.jsx)(o.p,{value:ew,placeholder:"label (e.g. iPhone 15)",onChange:e=>eS(e.target.value),"data-testid":"pushcut-add-label",className:"text-[11px]"}),(0,a.jsx)(d.$,{size:"sm",onClick:()=>{eT()},disabled:"__new__"===eC||!ev.trim(),"data-testid":"pushcut-add-submit",children:"__new__"===eC?"Saving…":"Add"})]})]})]})]}),(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Channel: ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:m})," \xb7 powered by NEXUS subsystem registry (PR τ #1698) + secret backend (PR σ #1696). Webhook receiver lands in a follow-up daemon-side PR."]})]}),(0,a.jsx)("div",{id:"ios",className:"scroll-mt-8","aria-hidden":!0}),el.supported&&(0,a.jsxs)("section",{className:"space-y-3","data-testid":"webpush-section",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Notifications"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full ".concat(el.cachedId?"bg-emerald-500":"denied"===el.permission?"bg-rose-500":"bg-muted-foreground"),"aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium",children:el.cachedId?"Subscribed":"denied"===el.permission?"Permission denied":"Not subscribed"}),el.cachedLabel&&(0,a.jsx)("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground",children:el.cachedLabel})]}),"denied"===el.permission&&(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Browser/iOS denied notification permission. Enable in Settings → Safari → Notifications, then reload."}),eu&&(0,a.jsx)("p",{className:"text-[10px] text-rose-500 break-all","data-testid":"webpush-error",children:eu}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[!el.cachedId&&(0,a.jsx)(d.$,{size:"sm",onClick:()=>{eh()},disabled:eo||!j.baseUrl||"denied"===el.permission,"data-testid":"webpush-enable",children:eo?"Enabling…":"Enable notifications"}),el.cachedId&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{eb()},disabled:eo,"data-testid":"webpush-disable",children:eo?"Disabling…":"Disable"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{ej()},disabled:eo||!j.baseUrl,"data-testid":"webpush-test",children:"Send test"})]})]}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Push 알림은 PWA 가 닫혀 있어도 도착합니다 — agent turn 완료 \xb7 녹화 종료 등. iOS 16.4+ home-screen installed PWA 만 작동 (Pushcut 가 fallback)."})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"대화"}),(0,a.jsx)("div",{className:"rounded-md border border-border bg-card px-3 py-2 font-mono text-xs",children:C||"(no session yet)"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["A new session id is allocated on first load. Use Chat’s",(0,a.jsx)("code",{className:"mx-1 rounded bg-muted px-1.5 py-0.5",children:":fork"}),"meta-command to start fresh once U-3 ships."]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Theme"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:l.z.map(e=>(0,a.jsx)(d.$,{variant:e===U?"default":"outline",size:"sm",onClick:()=>A(e),children:e},e))})]}),(0,a.jsx)(e6,{}),(0,a.jsx)(eX,{}),(0,a.jsx)(T,{}),(0,a.jsx)(R,{}),(0,a.jsx)(e3,{}),(0,a.jsx)(e1,{}),(0,a.jsx)(d.$,{onClick:()=>c.oR.success("Settings saved"),children:"Saved"})]})}},86083:(e,t,s)=>{s.d(t,{D:()=>p,ThemeProvider:()=>x,z:()=>i});var a=s(59977),r=s(95453),n=s(13783),l=s(99106);let i=["catppuccin-mocha","mocha-pastel-accent","catppuccin-latte","rose-pine-dawn","nord-light","elanous-pastel-default"],d="elanous.pwa.theme",o="dashboard.theme.active",c="catppuccin-mocha";function u(e){return"string"==typeof e&&i.includes(e)}let m=(0,r.createContext)(null);function x(e){let{children:t}=e,s=(0,l.Qj)(),[x,p]=(0,r.useState)(c),h=(0,r.useRef)(0),f=(0,r.useCallback)(e=>{p(e),document.documentElement.dataset.theme=e},[]);(0,r.useEffect)(()=>{let e=localStorage.getItem(d),t=u(e)?e:c;f(t),(0,n.cY)("webterm.provider.theme.init",{theme:t})},[f]),(0,r.useEffect)(()=>{if(!s)return;let e=!0,t=h.current;return s.getSwitch(o).then(s=>{let{switch:a}=s;e&&t===h.current&&u(a.value)&&(f(a.value),localStorage.setItem(d,a.value))}).catch(()=>void 0),()=>{e=!1}},[f,s]);let b=(0,r.useCallback)(e=>{u(e)&&(h.current+=1,f(e),localStorage.setItem(d,e),(0,n.cY)("webterm.provider.theme.set",{theme:e}),null==s||s.putSwitch(o,{value:e}).catch(()=>void 0))},[f,s]);return(0,a.jsx)(m.Provider,{value:{theme:x,setTheme:b,themes:i},children:t})}function p(){let e=(0,r.useContext)(m);if(!e)throw Error("useTheme must be used inside <ThemeProvider>");return e}}}]);
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4434],{51199:(t,e,i)=>{i.d(e,{CP:()=>u,Ck:()=>d,HT:()=>y,PB:()=>p,aC:()=>h,lC:()=>o,m:()=>c,tk:()=>l});var r=i(52732),n=i(61628),a=i(68446),s=i(57801),l=(0,n.K)((t,e)=>{let i=t.append("rect");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),e.name&&i.attr("name",e.name),e.rx&&i.attr("rx",e.rx),e.ry&&i.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)i.attr(t,e.attrs[t]);return e.class&&i.attr("class",e.class),i},"drawRect"),o=(0,n.K)((t,e)=>{l(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=(0,n.K)((t,e)=>{let i=e.text.replace(r.H1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let a=n.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(i),n},"drawText"),h=(0,n.K)((t,e,i,r)=>{let n=t.append("image");n.attr("x",e),n.attr("y",i);let s=(0,a.J)(r);n.attr("xlink:href",s)},"drawImage"),u=(0,n.K)((t,e,i,r)=>{let n=t.append("use");n.attr("x",e),n.attr("y",i);let s=(0,a.J)(r);n.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),p=(0,n.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),y=(0,n.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),d=(0,n.K)(()=>{let t=(0,s.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,s.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},53861:(t,e,i)=>{i.d(e,{o:()=>r});var r=(0,i(61628).K)(()=>`
|
|
2
|
-
/* Font Awesome icon styling - consolidated */
|
|
3
|
-
.label-icon {
|
|
4
|
-
display: inline-block;
|
|
5
|
-
height: 1em;
|
|
6
|
-
overflow: visible;
|
|
7
|
-
vertical-align: -0.125em;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.node .label-icon path {
|
|
11
|
-
fill: currentColor;
|
|
12
|
-
stroke: revert;
|
|
13
|
-
stroke-width: revert;
|
|
14
|
-
}
|
|
15
|
-
`,"getIconStyles")},84434:(t,e,i)=>{i.d(e,{diagram:()=>Y});var r=i(53861),n=i(51199),a=i(52732);i(64330);var s=i(61628),l=i(57801),o=function(){var t=(0,s.K)(function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},"o"),e=[6,8,10,11,12,14,16,17,18],i=[1,9],r=[1,10],n=[1,11],a=[1,12],l=[1,13],o=[1,14],c={trace:(0,s.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,s.K)(function(t,e,i,r,n,a,s){var l=a.length-1;switch(n){case 1:return a[l-1];case 2:case 6:case 7:this.$=[];break;case 3:a[l-1].push(a[l]),this.$=a[l-1];break;case 4:case 5:this.$=a[l];break;case 8:r.setDiagramTitle(a[l].substr(6)),this.$=a[l].substr(6);break;case 9:this.$=a[l].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[l].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[l].substr(8)),this.$=a[l].substr(8);break;case 13:r.addTask(a[l-1],a[l]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:r,14:n,16:a,17:l,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:r,14:n,16:a,17:l,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,s.K)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,s.K)(function(t){var e=this,i=[0],r=[],n=[null],a=[],l=this.table,o="",c=0,h=0,u=0,p=a.slice.call(arguments,1),y=Object.create(this.lexer),d={};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d[f]=this.yy[f]);y.setInput(t,d),d.lexer=y,d.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;a.push(g);var x=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||y.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.parseError?this.parseError=d.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K)(function(t){i.length=i.length-2*t,n.length=n.length-t,a.length=a.length-t},"popStack"),(0,s.K)(m,"lex");for(var k,_,b,v,w,K,$,T,M,E={};;){if(b=i[i.length-1],this.defaultActions[b]?v=this.defaultActions[b]:(null==k&&(k=m()),v=l[b]&&l[b][k]),void 0===v||!v.length||!v[0]){var S="";for(K in M=[],l[b])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");S=y.showPosition?"Parse error on line "+(c+1)+":\n"+y.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(S,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:g,expected:M})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+b+", token: "+k);switch(v[0]){case 1:i.push(k),n.push(y.yytext),a.push(y.yylloc),i.push(v[1]),k=null,_?(k=_,_=null):(h=y.yyleng,o=y.yytext,c=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if($=this.productions_[v[1]][1],E.$=n[n.length-$],E._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},x&&(E._$.range=[a[a.length-($||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(E,[o,h,c,d,v[1],n,a].concat(p))))return w;$&&(i=i.slice(0,-1*$*2),n=n.slice(0,-1*$),a=a.slice(0,-1*$)),i.push(this.productions_[v[1]][0]),n.push(E.$),a.push(E._$),T=l[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0},"parse")};function h(){this.yy={}}return c.lexer={EOF:1,parseError:(0,s.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,s.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K)(function(){return this._more=!0,this},"more"),reject:(0,s.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K)(function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var a in n)this[a]=n[a];return!1},"test_match"),next:(0,s.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,r,n=this._currentRules(),a=0;a<n.length;a++)if((i=this._input.match(this.rules[n[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K)(function(t,e,i,r){switch(i){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}},(0,s.K)(h,"Parser"),h.prototype=c,c.Parser=h,new h}();o.parser=o;var c="",h=[],u=[],p=[],y=(0,s.K)(function(){h.length=0,u.length=0,c="",p.length=0,(0,a.IU)()},"clear"),d=(0,s.K)(function(t){c=t,h.push(t)},"addSection"),f=(0,s.K)(function(){return h},"getSections"),g=(0,s.K)(function(){let t=_(),e=0;for(;!t&&e<100;)t=_(),e++;return u.push(...p),u},"getTasks"),x=(0,s.K)(function(){let t=[];return u.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),m=(0,s.K)(function(t,e){let i=e.substr(1).split(":"),r=0,n=[];1===i.length?(r=Number(i[0]),n=[]):(r=Number(i[0]),n=i[1].split(","));let a=n.map(t=>t.trim()),s={section:c,type:c,people:a,task:t,score:r};p.push(s)},"addTask"),k=(0,s.K)(function(t){let e={section:c,type:c,description:t,task:t,classes:[]};u.push(e)},"addTaskOrg"),_=(0,s.K)(function(){let t=(0,s.K)(function(t){return p[t].processed},"compileTask"),e=!0;for(let[i,r]of p.entries())t(i),e=e&&r.processed;return e},"compileTasks"),b=(0,s.K)(function(){return x()},"getActors"),v={getConfig:(0,s.K)(()=>(0,a.D7)().journey,"getConfig"),clear:y,setDiagramTitle:a.ke,getDiagramTitle:a.ab,setAccTitle:a.SV,getAccTitle:a.iN,setAccDescription:a.EI,getAccDescription:a.m7,addSection:d,getSections:f,getTasks:g,addTask:m,addTaskOrg:k,getActors:b},w=(0,s.K)(t=>`.label {
|
|
16
|
-
font-family: ${t.fontFamily};
|
|
17
|
-
color: ${t.textColor};
|
|
18
|
-
}
|
|
19
|
-
.mouth {
|
|
20
|
-
stroke: #666;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
line {
|
|
24
|
-
stroke: ${t.textColor}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.legend {
|
|
28
|
-
fill: ${t.textColor};
|
|
29
|
-
font-family: ${t.fontFamily};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.label text {
|
|
33
|
-
fill: #333;
|
|
34
|
-
}
|
|
35
|
-
.label {
|
|
36
|
-
color: ${t.textColor}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.face {
|
|
40
|
-
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
|
|
41
|
-
stroke: #999;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.node rect,
|
|
45
|
-
.node circle,
|
|
46
|
-
.node ellipse,
|
|
47
|
-
.node polygon,
|
|
48
|
-
.node path {
|
|
49
|
-
fill: ${t.mainBkg};
|
|
50
|
-
stroke: ${t.nodeBorder};
|
|
51
|
-
stroke-width: 1px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.node .label {
|
|
55
|
-
text-align: center;
|
|
56
|
-
}
|
|
57
|
-
.node.clickable {
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.arrowheadPath {
|
|
62
|
-
fill: ${t.arrowheadColor};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.edgePaths .path {
|
|
66
|
-
stroke: ${t.lineColor};
|
|
67
|
-
stroke-width: 1.5px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.flowchart-link {
|
|
71
|
-
stroke: ${t.lineColor};
|
|
72
|
-
fill: none;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.edgeLabel {
|
|
76
|
-
background-color: ${t.edgeLabelBackground};
|
|
77
|
-
rect {
|
|
78
|
-
opacity: 0.5;
|
|
79
|
-
}
|
|
80
|
-
text-align: center;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.cluster rect {
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.cluster text {
|
|
87
|
-
fill: ${t.titleColor};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
div.mermaidTooltip {
|
|
91
|
-
position: absolute;
|
|
92
|
-
text-align: center;
|
|
93
|
-
max-width: 200px;
|
|
94
|
-
padding: 2px;
|
|
95
|
-
font-family: ${t.fontFamily};
|
|
96
|
-
font-size: 12px;
|
|
97
|
-
background: ${t.tertiaryColor};
|
|
98
|
-
border: 1px solid ${t.border2};
|
|
99
|
-
border-radius: 2px;
|
|
100
|
-
pointer-events: none;
|
|
101
|
-
z-index: 100;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.task-type-0, .section-type-0 {
|
|
105
|
-
${t.fillType0?`fill: ${t.fillType0}`:""};
|
|
106
|
-
}
|
|
107
|
-
.task-type-1, .section-type-1 {
|
|
108
|
-
${t.fillType0?`fill: ${t.fillType1}`:""};
|
|
109
|
-
}
|
|
110
|
-
.task-type-2, .section-type-2 {
|
|
111
|
-
${t.fillType0?`fill: ${t.fillType2}`:""};
|
|
112
|
-
}
|
|
113
|
-
.task-type-3, .section-type-3 {
|
|
114
|
-
${t.fillType0?`fill: ${t.fillType3}`:""};
|
|
115
|
-
}
|
|
116
|
-
.task-type-4, .section-type-4 {
|
|
117
|
-
${t.fillType0?`fill: ${t.fillType4}`:""};
|
|
118
|
-
}
|
|
119
|
-
.task-type-5, .section-type-5 {
|
|
120
|
-
${t.fillType0?`fill: ${t.fillType5}`:""};
|
|
121
|
-
}
|
|
122
|
-
.task-type-6, .section-type-6 {
|
|
123
|
-
${t.fillType0?`fill: ${t.fillType6}`:""};
|
|
124
|
-
}
|
|
125
|
-
.task-type-7, .section-type-7 {
|
|
126
|
-
${t.fillType0?`fill: ${t.fillType7}`:""};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.actor-0 {
|
|
130
|
-
${t.actor0?`fill: ${t.actor0}`:""};
|
|
131
|
-
}
|
|
132
|
-
.actor-1 {
|
|
133
|
-
${t.actor1?`fill: ${t.actor1}`:""};
|
|
134
|
-
}
|
|
135
|
-
.actor-2 {
|
|
136
|
-
${t.actor2?`fill: ${t.actor2}`:""};
|
|
137
|
-
}
|
|
138
|
-
.actor-3 {
|
|
139
|
-
${t.actor3?`fill: ${t.actor3}`:""};
|
|
140
|
-
}
|
|
141
|
-
.actor-4 {
|
|
142
|
-
${t.actor4?`fill: ${t.actor4}`:""};
|
|
143
|
-
}
|
|
144
|
-
.actor-5 {
|
|
145
|
-
${t.actor5?`fill: ${t.actor5}`:""};
|
|
146
|
-
}
|
|
147
|
-
${(0,r.o)()}
|
|
148
|
-
`,"getStyles"),K=(0,s.K)(function(t,e){return(0,n.tk)(t,e)},"drawRect"),$=(0,s.K)(function(t,e){let i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function n(t){let i=(0,l.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){let i=(0,l.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K)(n,"smile"),(0,s.K)(a,"sad"),(0,s.K)(o,"ambivalent"),e.score>3?n(r):e.score<3?a(r):o(r),i},"drawFace"),T=(0,s.K)(function(t,e){let i=t.append("circle");return i.attr("cx",e.cx),i.attr("cy",e.cy),i.attr("class","actor-"+e.pos),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("r",e.r),void 0!==i.class&&i.attr("class",i.class),void 0!==e.title&&i.append("title").text(e.title),i},"drawCircle"),M=(0,s.K)(function(t,e){return(0,n.m)(t,e)},"drawText"),E=(0,s.K)(function(t,e,i){let r=t.append("g"),a=(0,n.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),a.height=i.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,K(r,a),I(i)(e.text,r,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),S=-1,C=(0,s.K)(function(t,e,i,r){let a=e.x+i.width/2,s=t.append("g");S++,s.append("line").attr("id",r+"-task"+S).attr("x1",a).attr("y1",e.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),$(s,{cx:a,cy:300+(5-e.score)*30,score:e.score});let l=(0,n.PB)();l.x=e.x,l.y=e.y,l.fill=e.fill,l.width=i.width,l.height=i.height,l.class="task task-type-"+e.num,l.rx=3,l.ry=3,K(s,l);let o=e.x+14;e.people.forEach(t=>{let i=e.actors[t].color;T(s,{cx:o,cy:e.y,r:7,fill:i,stroke:"#000",title:t,pos:e.actors[t].position}),o+=10}),I(i)(e.task,s,l.x,l.y,l.width,l.height,{class:"task"},i,e.colour)},"drawTask"),I=function(){function t(t,e,i,n,a,s,l,o){r(e.append("text").attr("x",i+a/2).attr("y",n+s/2+5).style("font-color",o).style("text-anchor","middle").text(t),l)}function e(t,e,i,n,a,s,l,o,c){let{taskFontSize:h,taskFontFamily:u}=o,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){let o=t*h-h*(p.length-1)/2,y=e.append("text").attr("x",i+a/2).attr("y",n).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);y.append("tspan").attr("x",i+a/2).attr("dy",o).text(p[t]),y.attr("y",n+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,l)}}function i(t,i,n,a,s,l,o,c){let h=i.append("switch"),u=h.append("foreignObject").attr("x",n).attr("y",a).attr("width",s).attr("height",l).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,n,a,s,l,o,c),r(u,o)}function r(t,e){for(let i in e)i in e&&t.attr(i,e[i])}return(0,s.K)(t,"byText"),(0,s.K)(e,"byTspan"),(0,s.K)(i,"byFo"),(0,s.K)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?i:"old"===r.textPlacement?t:e}}(),P={drawCircle:T,drawSection:E,drawText:M,drawTask:C,initGraphics:(0,s.K)(function(t,e){S=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},A=(0,s.K)(function(t){Object.keys(t).forEach(function(e){V[e]=t[e]})},"setConf"),j={},L=0;function D(t){let e=(0,a.D7)().journey,i=e.maxLabelWidth;L=0;let r=60;Object.keys(j).forEach(n=>{let a=j[n].color,s={cx:20,cy:r,r:7,fill:a,stroke:"#000",pos:j[n].position};P.drawCircle(t,s);let l=t.append("text").attr("visibility","hidden").text(n),o=l.node().getBoundingClientRect().width;l.remove();let c=[];if(o<=i)c=[n];else{let e=n.split(" "),r="";l=t.append("text").attr("visibility","hidden"),e.forEach(t=>{let e=r?`${r} ${t}`:t;if(l.text(e),l.node().getBoundingClientRect().width>i){if(r&&c.push(r),r=t,l.text(t),l.node().getBoundingClientRect().width>i){let e="";for(let r of t)e+=r,l.text(e+"-"),l.node().getBoundingClientRect().width>i&&(c.push(e.slice(0,-1)+"-"),e=r);r=e}}else r=e}),r&&c.push(r),l.remove()}c.forEach((i,n)=>{let a={x:40,y:r+7+20*n,fill:"#666",text:i,textMargin:e.boxTextMargin??5},s=P.drawText(t,a).node().getBoundingClientRect().width;s>L&&s>e.leftMargin-s&&(L=s)}),r+=Math.max(20,20*c.length)})}(0,s.K)(D,"drawActorLegend");var V=(0,a.D7)().journey,B=0,F=(0,s.K)(function(t,e,i,r){let n,s=(0,a.D7)(),o=s.journey.titleColor,c=s.journey.titleFontSize,h=s.journey.titleFontFamily,u=s.securityLevel;"sandbox"===u&&(n=(0,l.Ltv)("#i"+e));let p="sandbox"===u?(0,l.Ltv)(n.nodes()[0].contentDocument.body):(0,l.Ltv)("body");N.init();let y=p.select("#"+e);P.initGraphics(y,e);let d=r.db.getTasks(),f=r.db.getDiagramTitle(),g=r.db.getActors();for(let t in j)delete j[t];let x=0;g.forEach(t=>{j[t]={color:V.actorColours[x%V.actorColours.length],position:x},x++}),D(y),B=V.leftMargin+L,N.insert(0,0,B,50*Object.keys(j).length),z(y,d,0,e);let m=N.getBounds();f&&y.append("text").text(f).attr("x",B).attr("font-size",c).attr("font-weight","bold").attr("y",25).attr("fill",o).attr("font-family",h);let k=m.stopy-m.starty+2*V.diagramMarginY,_=B+m.stopx+2*V.diagramMarginX;(0,a.a$)(y,k,_,V.useMaxWidth),y.append("line").attr("x1",B).attr("y1",4*V.height).attr("x2",_-B-4).attr("y2",4*V.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");let b=70*!!f;y.attr("viewBox",`${m.startx} -25 ${_} ${k+b}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",k+b+25)},"draw"),N={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,s.K)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,s.K)(function(t,e,i,r){void 0===t[e]?t[e]=i:t[e]=r(i,t[e])},"updateVal"),updateBounds:(0,s.K)(function(t,e,i,r){let n=(0,a.D7)().journey,l=this,o=0;function c(a){return(0,s.K)(function(s){o++;let c=l.sequenceItems.length-o+1;l.updateVal(s,"starty",e-c*n.boxMargin,Math.min),l.updateVal(s,"stopy",r+c*n.boxMargin,Math.max),l.updateVal(N.data,"startx",t-c*n.boxMargin,Math.min),l.updateVal(N.data,"stopx",i+c*n.boxMargin,Math.max),"activation"!==a&&(l.updateVal(s,"startx",t-c*n.boxMargin,Math.min),l.updateVal(s,"stopx",i+c*n.boxMargin,Math.max),l.updateVal(N.data,"starty",e-c*n.boxMargin,Math.min),l.updateVal(N.data,"stopy",r+c*n.boxMargin,Math.max))},"updateItemBounds")}(0,s.K)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,s.K)(function(t,e,i,r){let n=Math.min(t,i),a=Math.max(t,i),s=Math.min(e,r),l=Math.max(e,r);this.updateVal(N.data,"startx",n,Math.min),this.updateVal(N.data,"starty",s,Math.min),this.updateVal(N.data,"stopx",a,Math.max),this.updateVal(N.data,"stopy",l,Math.max),this.updateBounds(n,s,a,l)},"insert"),bumpVerticalPos:(0,s.K)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,s.K)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,s.K)(function(){return this.data},"getBounds")},R=V.sectionFills,O=V.sectionColours,z=(0,s.K)(function(t,e,i,r){let n=(0,a.D7)().journey,s="",l=i+(2*n.height+n.diagramMarginY),o=0,c="#CCC",h="black",u=0;for(let[i,a]of e.entries()){if(s!==a.section){c=R[o%R.length],u=o%R.length,h=O[o%O.length];let r=0,l=a.section;for(let t=i;t<e.length;t++)if(e[t].section==l)r+=1;else break;let p={x:i*n.taskMargin+i*n.width+B,y:50,text:a.section,fill:c,num:u,colour:h,taskCount:r};P.drawSection(t,p,n),s=a.section,o++}let p=a.people.reduce((t,e)=>(j[e]&&(t[e]=j[e]),t),{});a.x=i*n.taskMargin+i*n.width+B,a.y=l,a.width=n.diagramMarginX,a.height=n.diagramMarginY,a.colour=h,a.fill=c,a.num=u,a.actors=p,P.drawTask(t,a,n,r),N.insert(a.x,a.y,a.x+a.width+n.taskMargin,450)}},"drawTasks"),W={setConf:A,draw:F},Y={parser:o,db:v,renderer:W,styles:w,init:(0,s.K)(t=>{W.setConf(t.journey),v.clear()},"init")}}}]);
|