@skspwork/config-doc 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/package.json +2 -2
  2. package/packages/cli/bin/config-doc.js +1 -1
  3. package/packages/web/.next/standalone/.next/server/app/index.html +1 -1
  4. package/packages/web/.next/standalone/.next/server/app/index.rsc +2 -2
  5. package/packages/web/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  6. package/packages/web/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
  7. package/packages/web/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  8. package/packages/web/.next/standalone/.next/server/chunks/ssr/app_page_tsx_55b2e5ee._.js +1 -1
  9. package/packages/web/.next/standalone/{packages/web/.next/static/chunks/123e553644f400df.js → .next/static/chunks/1747faf69b71cf6d.js} +1 -1
  10. package/packages/web/.next/standalone/components/FileBrowser.tsx +3 -12
  11. package/packages/web/.next/standalone/playwright-report/index.html +1 -1
  12. package/packages/web/.next/static/chunks/{123e553644f400df.js → 1747faf69b71cf6d.js} +1 -1
  13. package/packages/web/.next/standalone/packages/web/public/file.svg +0 -1
  14. package/packages/web/.next/standalone/packages/web/public/globe.svg +0 -1
  15. package/packages/web/.next/standalone/packages/web/public/logo.svg +0 -41
  16. package/packages/web/.next/standalone/packages/web/public/next.svg +0 -1
  17. package/packages/web/.next/standalone/packages/web/public/vercel.svg +0 -1
  18. package/packages/web/.next/standalone/packages/web/public/window.svg +0 -1
  19. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/chunks/30420d12e4f82b67.js +0 -0
  20. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/chunks/4bbca8cd642026de.css +0 -0
  21. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/chunks/4fd93823156e59e8.js +0 -0
  22. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/chunks/5f8f53e7772f4262.js +0 -0
  23. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/chunks/a6dad97d9634a72d.js +0 -0
  24. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/chunks/a6dad97d9634a72d.js.map +0 -0
  25. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/chunks/cc759f7c2413b7ff.js +0 -0
  26. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/chunks/turbopack-5b6cb51ab4268fba.js +0 -0
  27. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/config-doc-build/_buildManifest.js +0 -0
  28. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/config-doc-build/_clientMiddlewareManifest.json +0 -0
  29. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/config-doc-build/_ssgManifest.js +0 -0
  30. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
  31. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
  32. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
  33. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
  34. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
  35. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
  36. /package/packages/web/.next/standalone/{packages/web/.next → .next}/static/media/icon.a94c747f.svg +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31713,e=>{"use strict";var t=e.i(43476),a=e.i(71645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},s=(...e)=>e.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim();var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,a.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:n,iconNode:c,...d},h)=>(0,a.createElement)("svg",{ref:h,...l,width:t,height:t,stroke:e,strokeWidth:o?24*Number(r)/Number(t):r,className:s("lucide",i),...!n&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(n)?n:[n]])),i=(e,t)=>{let l=(0,a.forwardRef)(({className:l,...i},n)=>(0,a.createElement)(o,{ref:n,iconNode:t,className:s(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...i}));return l.displayName=r(e),l},n=i("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),c=i("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);function d({onExportClick:e}){return(0,t.jsx)("header",{className:"bg-white/80 backdrop-blur-md border-b border-gray-200 shadow-sm sticky top-0 z-50",children:(0,t.jsxs)("div",{className:"container mx-auto px-6 py-4 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("img",{src:"/logo.svg",alt:"ConfigDoc",className:"w-12 h-12 rounded-lg"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"ConfigDoc"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Configuration Documentation Tool"})]})]}),(0,t.jsxs)("button",{onClick:e,className:"flex items-center gap-2 px-5 py-2.5 bg-gradient-to-r from-green-500 to-emerald-600 text-white rounded-lg hover:from-green-600 hover:to-emerald-700 shadow-md hover:shadow-lg transition-all duration-200 transform",title:"エクスポート",children:[(0,t.jsx)(c,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"font-medium",children:"エクスポート"})]})]})})}let h=i("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),u=i("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function m({loadedConfigs:e,activeConfigIndex:r,onTabClick:s,onRemoveConfig:l,onAddFileClick:o,onReorder:i}){let[n,c]=(0,a.useState)(null),[d,m]=(0,a.useState)(null),x=()=>{m(null)},g=()=>{c(null),m(null)},f=e.map(e=>e.filePath);return(0,t.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 mb-8 hover:shadow-2xl transition-shadow duration-300",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center",children:(0,t.jsx)(h,{className:"w-5 h-5 text-white"})}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"設定ファイル"})]}),(0,t.jsxs)("button",{onClick:o,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-500 to-blue-600 text-white rounded-lg hover:from-blue-600 hover:to-blue-700 shadow-md hover:shadow-lg transition-all duration-200 transform",children:[(0,t.jsx)(h,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"font-medium",children:"ファイルを追加"})]})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-3",children:e.map((a,o)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{c(o)},onDragOver:e=>{e.preventDefault(),null!==n&&n!==o&&m(o)},onDragLeave:x,onDrop:()=>(t=>{if(null===n||n===t){c(null),m(null);return}let a=[...e],[s]=a.splice(n,1);a.splice(t,0,s);let l=r;r===n?l=t:n<r&&t>=r?l=r-1:n>r&&t<=r&&(l=r+1),i(a,l),c(null),m(null)})(o),onDragEnd:g,onClick:()=>s(o),className:`group flex items-center gap-2 px-4 py-2.5 rounded-xl border-2 cursor-grab transition-all duration-200 ${r===o?"bg-gradient-to-r from-blue-50 to-indigo-50 border-blue-400 shadow-md":"bg-white border-gray-200 hover:border-blue-300 hover:shadow-md"} ${n===o?"opacity-50":""} ${d===o?"border-blue-500 border-dashed":""}`,children:[(0,t.jsx)("span",{className:`text-sm font-medium ${r===o?"text-blue-700":"text-gray-700"}`,children:function(e,t){let a=e.split(/[/\\]/).pop()||e,r=t.filter(e=>e.split(/[/\\]/).pop()===a);if(1===r.length)return a;let s=e.split(/[/\\]/);for(let t=1;t<s.length;t++){let a=s.slice(-t-1).join("/");if(0===r.filter(r=>a===r.split(/[/\\]/).slice(-t-1).join("/")&&r!==e).length)return a}return e}(a.filePath,f)}),(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),l(o)},className:"text-gray-400 hover:text-red-500 transition-colors opacity-0 group-hover:opacity-100",children:(0,t.jsx)(u,{className:"w-4 h-4"})})]},a.filePath))}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl border-2 border-dashed border-gray-300",children:[(0,t.jsx)(h,{className:"w-16 h-16 text-gray-400 mx-auto mb-3"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 font-medium",children:"設定ファイルを選択してください"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"「ファイルを追加」ボタンから開始"})]})]})}let x=i("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),g=i("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),f=i("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),p=i("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),b=i("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);function y({label:e,items:r,onItemsChange:s,editButtonTitle:l,editModeDescription:o,inputPlaceholder:i,newItemPlaceholder:n,deleteButtonTitle:c,addButtonTitle:d,duplicateErrorMessage:h,onRename:m,children:g}){let[y,j]=(0,a.useState)(!1),[N,w]=(0,a.useState)([]),[v,k]=(0,a.useState)(""),[C,S]=(0,a.useState)(null),[P,T]=(0,a.useState)(null),O=(0,a.useMemo)(()=>{if(null===C||null===P||C===P)return N.map((e,t)=>({item:e,originalIndex:t}));let e=N.map((e,t)=>({item:e,originalIndex:t})),[t]=e.splice(C,1);return e.splice(P,0,t),e},[N,C,P]),D=()=>{let e=v.trim();e&&!N.some(t=>t.newName===e)&&(w([...N,{originalName:"",newName:e,isNew:!0}]),k(""))},$=()=>{if(null===C||null===P||C===P){S(null),T(null);return}let e=[...N],[t]=e.splice(C,1);e.splice(P,0,t),w(e),S(null),T(null)},A=()=>{S(null),T(null)},M=()=>{let e=N.map(e=>e.newName.trim()).filter(Boolean);return new Set(e).size!==e.length},E=!M()&&!N.some(e=>!e.newName.trim());return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-gray-700",children:e}),!y&&(0,t.jsx)("button",{onClick:()=>{w(r.map(e=>({originalName:e,newName:e,isNew:!1}))),j(!0),k("")},className:"text-gray-500 hover:text-blue-600 transition-colors p-1",title:l,children:(0,t.jsx)(f,{className:"w-4 h-4"})})]}),y?(0,t.jsxs)("div",{className:"space-y-3 p-4 bg-blue-50 rounded-lg border-2 border-blue-200",children:[(0,t.jsxs)("div",{className:"text-xs font-medium text-blue-700 mb-2",children:[o,"(ドラッグで並び替え可能)"]}),(0,t.jsx)("div",{className:"space-y-2",children:O.map(({item:e,originalIndex:a},r)=>{let s=C===a;return(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{S(a)},onDragOver:e=>{e.preventDefault(),null!==C&&P!==r&&T(r)},onDrop:$,onDragEnd:A,className:`flex items-center gap-2 transition-all ${s?"opacity-50":""}`,children:[(0,t.jsx)("div",{className:"cursor-grab text-gray-400 hover:text-gray-600 p-1",title:"ドラッグして並び替え",children:(0,t.jsx)(b,{className:"w-4 h-4"})}),(0,t.jsx)("input",{type:"text",value:e.newName,onChange:e=>{var t;return t=e.target.value,void w(N.map((e,r)=>r===a?{...e,newName:t}:e))},placeholder:i,className:`flex-1 px-3 py-2 border-2 rounded-lg text-sm focus:ring-2 transition-all duration-200 ${!e.newName.trim()?"border-red-300 focus:border-red-400 focus:ring-red-200":"border-gray-200 focus:border-blue-400 focus:ring-blue-200"}`}),(0,t.jsx)("button",{onClick:()=>{w(N.filter((e,t)=>t!==a))},className:"text-gray-400 hover:text-red-600 transition-colors p-2",title:c,children:(0,t.jsx)(u,{className:"w-4 h-4"})})]},a)})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-2 border-t border-blue-200",children:[(0,t.jsx)("input",{type:"text",value:v,onChange:e=>k(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),D())},placeholder:n,className:"flex-1 px-3 py-2 border-2 border-gray-200 rounded-lg text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-200 transition-all duration-200"}),(0,t.jsx)("button",{onClick:D,disabled:!v.trim()||N.some(e=>e.newName.trim()===v.trim()),className:"px-3 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",title:d,children:(0,t.jsx)(p,{className:"w-4 h-4"})})]}),M()&&(0,t.jsx)("div",{className:"text-xs text-red-600 mt-2",children:h}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-blue-200",children:[(0,t.jsxs)("button",{onClick:()=>{let e=[],t={};for(let a of N){let r=a.newName.trim();r&&(e.push(r),a.isNew||a.originalName===r||(t[a.originalName]=r))}let a=v.trim();a&&!e.includes(a)&&e.push(a),m&&Object.keys(t).length>0&&m(t),s(e),j(!1),w([]),k("")},disabled:!E,className:"flex-1 flex items-center justify-center gap-2 px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed text-sm font-medium",children:[(0,t.jsx)(x,{className:"w-4 h-4"}),"保存"]}),(0,t.jsx)("button",{onClick:()=>{j(!1),w([]),k(""),S(null),T(null)},className:"flex-1 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors text-sm font-medium",children:"キャンセル"})]})]}):g]})}function j({selectedTags:e,availableTags:a,onSelectedTagsChange:r,onAvailableTagsChange:s}){return(0,t.jsx)(y,{label:"タグ",items:a,onItemsChange:t=>{let a=e.filter(e=>t.includes(e));a.length!==e.length&&r(a),s(t)},editButtonTitle:"タグを編集",editModeDescription:"タグの追加・削除・名前変更",inputPlaceholder:"タグ名",newItemPlaceholder:"新しいタグ名を入力",deleteButtonTitle:"タグを削除",addButtonTitle:"タグを追加",duplicateErrorMessage:"同じ名前のタグがあります",onRename:t=>{let a=e.map(e=>t[e]||e);JSON.stringify(a)!==JSON.stringify(e)&&r(a)},children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:0===a.length?(0,t.jsx)("div",{className:"text-sm text-gray-500",children:"タグがありません。鉛筆アイコンをクリックして追加してください。"}):a.map(a=>{let s=e.includes(a);return(0,t.jsxs)("button",{onClick:()=>{e.includes(a)?r(e.filter(e=>e!==a)):r([...e,a])},className:`flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border-2 transition-all duration-200 ${s?"bg-blue-500 text-white border-blue-600 shadow-md":"bg-white text-gray-700 border-gray-200 hover:border-blue-300 hover:bg-blue-50"}`,children:[s&&(0,t.jsx)(g,{className:"w-3 h-3"}),(0,t.jsx)("span",{children:a})]},a)})})})}function N({fields:e,projectFields:a,onFieldsChange:r,onUpdateProjectFields:s}){let l=Object.keys(a);return(0,t.jsx)(y,{label:"フィールド",items:l,onItemsChange:t=>{let a={};for(let r of t)a[r]=e[r]||"";if(r(a),s){let e={};for(let a of t)e[a]="";s(e)}},editButtonTitle:"フィールドを編集",editModeDescription:"フィールドの追加・削除・名前変更",inputPlaceholder:"フィールド名",newItemPlaceholder:"新しいフィールド名を入力",deleteButtonTitle:"フィールドを削除",addButtonTitle:"フィールドを追加",duplicateErrorMessage:"同じ名前のフィールドがあります",onRename:t=>{let a={};for(let[r,s]of Object.entries(e))a[t[r]||r]=s;r(a)},children:(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(e).map(([a,s])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:a}),(0,t.jsx)("textarea",{value:s,onChange:t=>{var s;return s=t.target.value,void r({...e,[a]:s})},className:"w-full border-2 border-gray-200 rounded-lg p-3 min-h-[80px] text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-200 transition-all duration-200 shadow-sm hover:shadow-md",placeholder:`${a}を入力してください`})]},a))})})}function w({selectedPath:e,editingDoc:a,hasUnsavedChanges:r,availableTags:s,projectFields:l,onEditingDocChange:o,onAvailableTagsChange:i,onProjectFieldsChange:c,onSave:d}){return(0,t.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 flex flex-col max-h-[calc(100vh-190px)] hover:shadow-2xl transition-shadow duration-300",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-indigo-500 to-indigo-600 rounded-lg flex items-center justify-center",children:(0,t.jsx)(x,{className:"w-5 h-5 text-white"})}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"プロパティ詳細"})]}),e&&a?(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex-shrink-0 pb-4 border-b border-gray-200",children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"パス"}),(0,t.jsx)("div",{className:"text-sm text-gray-700 bg-gradient-to-r from-blue-50 to-indigo-50 p-3 rounded-lg font-mono border border-blue-200 shadow-sm",children:e})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 space-y-6 min-h-0",children:[(0,t.jsx)(j,{selectedTags:a.tags||[],availableTags:s,onSelectedTagsChange:e=>{o({...a,tags:e})},onAvailableTagsChange:i}),(0,t.jsx)(N,{fields:a.fields||{},projectFields:l,onFieldsChange:e=>{o({...a,fields:e})},onUpdateProjectFields:c})]}),(0,t.jsx)("div",{className:"flex-shrink-0 pt-4 border-t border-gray-200",children:(0,t.jsxs)("button",{onClick:d,disabled:!r,className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg shadow-md transition-all duration-200 transform ${r?"bg-gradient-to-r from-green-500 to-emerald-600 text-white hover:from-green-600 hover:to-emerald-700 hover:shadow-lg cursor-pointer":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:[(0,t.jsx)(x,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"font-medium",children:"保存"})]})})]}):(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center flex-1",children:[(0,t.jsx)("div",{className:"w-20 h-20 bg-gradient-to-br from-gray-100 to-gray-200 rounded-full flex items-center justify-center mb-4",children:(0,t.jsx)(n,{className:"w-10 h-10 text-gray-400"})}),(0,t.jsx)("p",{className:"text-sm text-gray-600 font-medium",children:"プロパティを選択してください"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"左側のツリーから項目を選択"})]})]})}let v=i("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),k=i("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);class C{static flattenConfig(e,t=""){let a={};for(let r in e){let s=t?`${t}:${r}`:r,l=e[r];l&&"object"==typeof l?Array.isArray(l)?l.some(e=>e&&"object"==typeof e&&!Array.isArray(e))?l.forEach((e,t)=>{e&&"object"==typeof e&&!Array.isArray(e)&&Object.assign(a,this.flattenConfig(e,`${s}[${t}]`))}):a[s]=l:Object.assign(a,this.flattenConfig(l,s)):a[s]=l}return a}static buildTree(e,t=""){let a=[];for(let r in e){let s=t?`${t}:${r}`:r,l=e[r];if(l&&"object"==typeof l)if(Array.isArray(l))if(l.some(e=>e&&"object"==typeof e&&!Array.isArray(e))){let e=[];l.forEach((t,a)=>{t&&"object"==typeof t&&!Array.isArray(t)&&e.push({key:`[${a}]`,fullPath:`${s}[${a}]`,value:t,children:this.buildTree(t,`${s}[${a}]`),hasDocumentation:!1,type:"object"})}),a.push({key:r,fullPath:s,value:l,children:e.length>0?e:void 0,hasDocumentation:!1,type:"array"})}else a.push({key:r,fullPath:s,value:l,hasDocumentation:!1,type:"array"});else a.push({key:r,fullPath:s,value:l,children:this.buildTree(l,s),hasDocumentation:!1,type:"object"});else a.push({key:r,fullPath:s,value:l,hasDocumentation:!1,type:typeof l})}return a}}function S({config:e,docs:r,onSelectProperty:s,onEditProperty:l,selectedPath:o}){let[i,c]=(0,a.useState)(new Set),d=(e,a=0)=>{var h;let u,m=(h=e.fullPath,!!(u=r.properties[h])&&(!!(u.tags&&u.tags.length>0||u.fields&&Object.values(u.fields).some(e=>e&&""!==e.trim()))||!1)),x=i.has(e.fullPath),g=o===e.fullPath;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{paddingLeft:`${20*a}px`},className:`group flex items-center gap-2 py-2 px-3 cursor-pointer rounded-lg transition-all duration-150 ${g?"bg-gradient-to-r from-blue-100 to-indigo-100 border-l-4 border-blue-500 shadow-sm":"hover:bg-gradient-to-r hover:from-gray-50 hover:to-gray-100"}`,children:[e.children&&e.children.length>0?(0,t.jsx)("button",{onClick:()=>{var t;let a;return t=e.fullPath,void((a=new Set(i)).has(t)?a.delete(t):a.add(t),c(a))},className:"p-1 hover:bg-blue-100 rounded-md transition-colors",children:x?(0,t.jsx)(k,{className:"w-4 h-4 text-blue-600"}):(0,t.jsx)(v,{className:"w-4 h-4 text-gray-600"})}):(0,t.jsx)("div",{className:"w-6"}),(0,t.jsxs)("div",{onClick:()=>s(e.fullPath),className:"flex-1 flex items-center gap-2",children:[(0,t.jsx)("span",{className:`${e.children?"font-bold text-gray-800":"font-medium text-gray-700"}`,children:e.key}),!e.children&&(0,t.jsxs)("span",{className:"text-sm text-gray-500 truncate max-w-[200px]",children:[": ",JSON.stringify(e.value)]}),m&&(0,t.jsxs)("div",{className:"flex items-center gap-1 px-2 py-0.5 bg-green-100 border border-green-300 rounded-full",children:[(0,t.jsx)(n,{className:"w-3 h-3 text-green-600"}),(0,t.jsx)("span",{className:"text-xs text-green-700 font-medium",children:"Doc"})]})]}),!e.children&&(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),l(e.fullPath)},className:"p-1 hover:bg-gray-200 rounded",title:"編集"})]}),e.children&&x&&(0,t.jsx)("div",{children:e.children.map(e=>d(e,a+1))})]},e.fullPath)},h=C.buildTree(e);return(0,t.jsxs)("div",{className:"h-full flex flex-col border-2 border-gray-100 rounded-xl bg-white shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 border-b-2 border-gray-100 bg-gradient-to-r from-gray-50 to-gray-100",children:[(0,t.jsx)("button",{onClick:()=>{var t;let a,r;c(new Set((t=C.buildTree(e),a=[],r=e=>{e.children&&e.children.length>0&&(a.push(e.fullPath),e.children.forEach(r))},t.forEach(r),a)))},className:"px-4 py-1.5 text-sm font-medium bg-white border-2 border-blue-200 text-blue-600 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition-all duration-200 shadow-sm hover:shadow-md",children:"すべて展開"}),(0,t.jsx)("button",{onClick:()=>{c(new Set)},className:"px-4 py-1.5 text-sm font-medium bg-white border-2 border-gray-200 text-gray-600 rounded-lg hover:bg-gray-50 hover:border-gray-300 transition-all duration-200 shadow-sm hover:shadow-md",children:"すべて閉じる"})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto p-3",children:h.map(e=>d(e))})]})}let P=i("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),T=i("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),O=i("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);function D({isOpen:e,currentPath:r,onSelect:s,onClose:l,multiSelect:o=!1,filterJsonOnly:i=!1,folderSelectMode:n=!1,title:c}){let[d,h]=(0,a.useState)(r),[u,m]=(0,a.useState)([]),[x,g]=(0,a.useState)(!1),[f,p]=(0,a.useState)([]);(0,a.useEffect)(()=>{e&&(h(r),p([]))},[e,r]),(0,a.useEffect)(()=>{e&&b(d)},[e,d]);let b=async e=>{g(!0);try{let t=await fetch("/api/files/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({directory:e})}),a=await t.json();if(a.success){let e=a.data.items;n?e=a.data.items.filter(e=>"directory"===e.type):i&&(e=a.data.items.filter(e=>"directory"===e.type||".json"===e.extension)),m(e)}else console.error("API returned error:",a.error)}catch(e){console.error("Failed to load directory:",e)}finally{g(!1)}},y=()=>d.replace(/\\/g,"/").toLowerCase()!==r.replace(/\\/g,"/").toLowerCase(),j=()=>{p([]),l()};return e?(0,t.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:c||(n?"フォルダを選択":"ファイルを選択")}),(0,t.jsx)("button",{onClick:j,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b bg-gray-50",children:[(0,t.jsx)("button",{onClick:()=>{if(!y())return;let e=d.replace(/\\/g,"/"),t=e.split("/").filter(e=>e);if(t.length>1){let a,s=t.slice(0,-1),l=(a=1===s.length&&s[0].includes(":")?s[0]+"/":s[0].includes(":")?s[0]+"/"+s.slice(1).join("/"):e.startsWith("/")?"/"+s.join("/"):s.join("/")).replace(/\\/g,"/").toLowerCase(),o=r.replace(/\\/g,"/").toLowerCase();(!l.startsWith(o.split("/").slice(0,-1).join("/"))||o.startsWith(l+"/")||o===l)&&h(a)}else if(1===t.length&&!t[0].includes(":")){if("."===r.replace(/\\/g,"/").toLowerCase())return;h(".")}},disabled:!y(),className:`p-2 rounded flex-shrink-0 ${y()?"hover:bg-gray-200":"opacity-50 cursor-not-allowed"}`,title:y()?"上のディレクトリへ":"ルートディレクトリです",children:(0,t.jsx)(O,{className:"w-5 h-5"})}),(0,t.jsxs)("span",{className:"text-sm text-gray-600 flex-1 truncate",children:["パス: ",d]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:x?(0,t.jsx)("div",{className:"text-center text-gray-500",children:"読み込み中..."}):(0,t.jsx)("div",{className:"space-y-1",children:u.map(e=>{let a=f.includes(e.path);return(0,t.jsxs)("div",{onClick:()=>{"directory"===e.type?n?p([e.path]):h(e.path):o?p(t=>t.includes(e.path)?t.filter(t=>t!==e.path):[...t,e.path]):p([e.path])},onDoubleClick:()=>{"directory"===e.type&&(h(e.path),p([]))},className:`flex items-center gap-2 p-2 rounded cursor-pointer hover:bg-gray-100 ${a?"bg-blue-100":""}`,children:["directory"===e.type?(0,t.jsx)(P,{className:"w-5 h-5 text-blue-500"}):(0,t.jsx)(T,{className:"w-5 h-5 text-green-500"}),(0,t.jsx)("span",{className:"text-sm",children:e.name}),a&&(o||n)&&(0,t.jsx)("span",{className:"ml-auto text-blue-500",children:"✓"})]},e.path)})})}),(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-t",children:[n?(0,t.jsx)("div",{className:"text-sm text-gray-600",children:f.length>0?`選択中: ${f[0].split(/[/\\]/).pop()}`:`現在のフォルダ: ${d.split(/[/\\]/).pop()||d}`}):o&&f.length>0?(0,t.jsxs)("div",{className:"text-sm text-gray-600",children:[f.length,"件選択中"]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[(0,t.jsx)("button",{onClick:j,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded",children:"キャンセル"}),(0,t.jsx)("button",{onClick:()=>{n?(s(f.length>0?f:[d]),p([]),l()):f.length>0&&(s(f),p([]),l())},disabled:!n&&0===f.length,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:bg-gray-300 disabled:cursor-not-allowed",children:"選択"})]})]})]})}):null}let $={format:"html",autoExport:!0,fileName:"config-doc",outputDir:".config_doc/output"};function A({isOpen:e,onClose:r,onExport:s,currentSettings:l,rootPath:o="."}){let[i,n]=(0,a.useState)(l||$),[d,h]=(0,a.useState)(!1),[m,x]=(0,a.useState)(!1);(0,a.useEffect)(()=>{l&&n(l)},[l]);let g=(0,a.useMemo)(()=>{let e=o.replace(/\//g,"\\"),t=i.outputDir?.trim()||"",a=i.fileName||"config-doc",r="markdown"===i.format||"markdown-table"===i.format?"md":"html";if(t){let s=t.replace(/\//g,"\\");return`${e}\\${s}\\${a}.${r}`}return`${e}\\${a}.${r}`},[i.format,i.fileName,i.outputDir,o]);if(!e)return null;let f=async()=>{h(!0);try{await s(i),r()}catch(e){console.error("Export failed:",e)}finally{h(!1)}};return(0,t.jsxs)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-6 border-b",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-800",children:"エクスポート設定"}),(0,t.jsx)("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,t.jsx)(u,{className:"w-5 h-5"})})]}),(0,t.jsxs)("div",{className:"p-6 space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力先フォルダ"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:i.outputDir||"",onChange:e=>n({...i,outputDir:e.target.value}),className:"flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"(空欄でプロジェクトルート)"}),(0,t.jsx)("button",{type:"button",onClick:()=>x(!0),className:"px-3 py-2 border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500",title:"フォルダを選択",children:(0,t.jsx)(P,{className:"w-5 h-5 text-gray-500"})})]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"相対パスを入力またはフォルダを選択(空欄でプロジェクトルート、チーム共有設定)"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"ファイル名"}),(0,t.jsx)("input",{type:"text",value:i.fileName??"",onChange:e=>n({...i,fileName:e.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"config-doc"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"拡張子なしのファイル名を指定します(空欄でconfig-doc、チーム共有設定)"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力形式"}),(0,t.jsxs)("select",{value:i.format,onChange:e=>n({...i,format:e.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[(0,t.jsx)("option",{value:"html",children:"HTML"}),(0,t.jsx)("option",{value:"markdown",children:"Markdown"}),(0,t.jsx)("option",{value:"markdown-table",children:"Markdown (テーブル形式)"})]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"html"===i.format?"スタイル付きのHTMLファイルとして出力します":"markdown-table"===i.format?"Markdownテーブル形式で出力します(プロパティ名、説明、値、備考)":"テキストベースのMarkdownファイルとして出力します"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力先パス"}),(0,t.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md text-sm text-gray-700 font-mono break-all",children:g})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"flex items-center h-5",children:(0,t.jsx)("input",{id:"auto-export",type:"checkbox",checked:i.autoExport,onChange:e=>n({...i,autoExport:e.target.checked}),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"})}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("label",{htmlFor:"auto-export",className:"text-sm font-medium text-gray-700 cursor-pointer",children:"保存時に自動エクスポート"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"ドキュメントを保存したときに自動的にHTMLファイルを更新します"})]})]}),i.lastExportedAt&&(0,t.jsx)("div",{className:"pt-4 border-t",children:(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:["最終エクスポート: ",new Date(i.lastExportedAt).toLocaleString("ja-JP")]})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-3 p-6 border-t bg-gray-50 rounded-b-lg",children:[(0,t.jsx)("button",{onClick:r,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"キャンセル"}),(0,t.jsxs)("button",{onClick:f,disabled:d,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,t.jsx)(c,{className:"w-4 h-4"}),d?"エクスポート中...":"エクスポート"]})]})]}),(0,t.jsx)(D,{isOpen:m,currentPath:o,onSelect:e=>{if(e.length>0){let t=e[0],a=o.replace(/\\/g,"/"),r=t.replace(/\\/g,"/"),s=r;r.startsWith(a)&&(s=r.slice(a.length)).startsWith("/")&&(s=s.slice(1)),s||(s="."),n({...i,outputDir:s})}x(!1)},onClose:()=>x(!1),folderSelectMode:!0,title:"出力先フォルダを選択"})]})}let M=i("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),E=i("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),F=i("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);function z({message:e,type:r,duration:s=3e3,onClose:l}){let[o,i]=(0,a.useState)(!1);(0,a.useEffect)(()=>{setTimeout(()=>i(!0),10);let e=setTimeout(()=>{i(!1),setTimeout(l,300)},s);return()=>clearTimeout(e)},[s,l]);let n={success:(0,t.jsx)(M,{className:"w-5 h-5 text-green-500"}),error:(0,t.jsx)(E,{className:"w-5 h-5 text-red-500"}),warning:(0,t.jsx)(F,{className:"w-5 h-5 text-yellow-500"})};return(0,t.jsx)("div",{className:`fixed bottom-4 left-4 z-50 transition-all duration-300 ${o?"opacity-100 translate-y-0":"opacity-0 translate-y-2"}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg border ${{success:"bg-green-50 border-green-200",error:"bg-red-50 border-red-200",warning:"bg-yellow-50 border-yellow-200"}[r]} min-w-[300px] max-w-[500px]`,children:[n[r],(0,t.jsx)("span",{className:"flex-1 text-sm text-gray-800",children:e}),(0,t.jsx)("button",{onClick:()=>{i(!1),setTimeout(l,300)},className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,t.jsx)(u,{className:"w-4 h-4"})})]})})}function J({toasts:e,onRemove:a}){return(0,t.jsx)(t.Fragment,{children:e.map((e,r)=>(0,t.jsx)("div",{style:{bottom:`${16+80*r}px`},className:"fixed left-4 z-50",children:(0,t.jsx)(z,{message:e.message,type:e.type,onClose:()=>a(e.id)})},e.id))})}let L={説明:""};function H(){let[e,r]=(0,a.useState)(!1),[s,l]=(0,a.useState)(!1),{loadedConfigs:o,activeConfigIndex:i,activeConfig:c,selectedPath:h,editingDoc:u,originalDoc:x,hasUnsavedChanges:g,exportSettings:f,availableTags:p,projectFields:b,toasts:y,rootPath:j,setActiveConfigIndex:N,setEditingDoc:v,setHasUnsavedChanges:k,removeToast:C,handleSelectConfigFiles:P,handleRemoveConfig:T,handleReorderConfigs:O,handleSelectProperty:$,handleSaveProperty:M,handleExport:E,handleAvailableTagsChange:F,handleProjectFieldsChange:z,checkForChanges:H,resetSelection:I}=function(){let[e,t]=(0,a.useState)([]),[r,s]=(0,a.useState)(0),[l,o]=(0,a.useState)(""),[i,n]=(0,a.useState)(!1),[c,d]=(0,a.useState)("."),[h,u]=(0,a.useState)(null),[m,x]=(0,a.useState)(null),[g,f]=(0,a.useState)(!1),[p,b]=(0,a.useState)(),[y,j]=(0,a.useState)(["required","nullable","string","number","boolean"]),[N,w]=(0,a.useState)(L),[v,k]=(0,a.useState)([]),C=e[r],S=(0,a.useCallback)((e,t="success")=>{let a=Date.now().toString();k(r=>[...r,{id:a,message:e,type:t}])},[]),P=(0,a.useCallback)(e=>{k(t=>t.filter(t=>t.id!==e))},[]),T=(0,a.useCallback)((e,t)=>{if(!e||!t)return!1;let a=e.tags||[],r=t.tags||[];if(a.length!==r.length||a.some((e,t)=>e!==r[t]))return!0;let s=e.fields||{},l=t.fields||{};for(let e of new Set([...Object.keys(s),...Object.keys(l)]))if((s[e]||"")!==(l[e]||""))return!0;return!1},[]),O=(0,a.useCallback)((e,t)=>{let a=e.replace(/\\/g,"/"),r=t.replace(/\\/g,"/");if(!a.match(/^[a-zA-Z]:\//)&&!a.startsWith("/"))return e;if(a.startsWith(r)){let e=a.substring(r.length);return e.startsWith("/")?e.substring(1):e}return e},[]),D=(0,a.useCallback)(e=>{let t={};for(let a of Object.keys(N))t[a]=e.fields[a]||"";return{...e,fields:t}},[N]),$=(0,a.useCallback)(async e=>{try{let a=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e})}),r=await a.json();r.success&&t(t=>t.some(t=>t.filePath===e)?t:[...t,{filePath:e,configData:r.data.configData,docs:r.data.docs}])}catch(e){console.error("Failed to load config file:",e)}},[]),A=(0,a.useCallback)(async e=>{try{let t=await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePaths:e})}),a=await t.json();a.deletedDocsFiles&&a.deletedDocsFiles.length>0&&S(`${a.deletedDocsFiles.length}件のドキュメントファイルを削除しました`,"warning")}catch(e){console.error("Failed to update metadata:",e)}},[S]),M=(0,a.useCallback)(async()=>{if(p)try{if((await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:p.format,fileName:p.fileName,outputDir:p.outputDir})})).ok){let e={...p,lastExportedAt:new Date().toISOString()};b(e),await fetch("/api/export/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:e})})}}catch(e){console.error("Auto export failed:",e)}},[p]);(0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/project"),t=await e.json();if(t.success&&(d(t.data.rootPath),t.data.hasConfigDoc)){let e=await fetch("/api/config/metadata"),t=await e.json();if(t.success&&t.data?.configFiles)for(let e of t.data.configFiles)await $(e.filePath);t.success&&t.data?.availableTags&&j(t.data.availableTags),t.success&&t.data?.fields&&w(t.data.fields)}let a=await fetch("/api/export/settings"),r=await a.json();r.success&&b(r.data)}catch(e){console.error("Failed to load saved configs:",e)}finally{n(!0)}})()},[$]);let E=(0,a.useCallback)(async a=>{let r=[];for(let t of a){let a=O(t,c);if(!e.some(e=>e.filePath===a))try{let e=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:t})}),s=await e.json();s.success?r.push({filePath:a,configData:s.data.configData,docs:s.data.docs}):S(`設定ファイルの読み込みに失敗しました (${t}): ${s.error}`,"error")}catch(e){console.error("Failed to load config:",e),S(`設定ファイルの読み込み中にエラーが発生しました: ${t}`,"error")}}r.length>0&&t(e=>{let t=[...e,...r];return A(t.map(e=>e.filePath)),t})},[e,c,S,O,A]),F=(0,a.useCallback)(async a=>{let l=e[a];(!l.docs||!(Object.keys(l.docs.properties).length>0)||confirm("既に説明文が設定されていますが、削除してよろしいですか?"))&&(t(e=>{let t=e.filter((e,t)=>t!==a);return A(t.map(e=>e.filePath)),t}),r>=a&&r>0&&s(r-1),o(""),u(null),f(!1))},[r,e,A]),z=(0,a.useCallback)((e,a)=>{t(e),s(a),A(e.map(e=>e.filePath))},[A]),J=(0,a.useCallback)(e=>{if(g&&!confirm("保存されていない変更があります。破棄しますか?"))return;o(e);let t=C?.docs.properties[e];if(t){let e=D({...t,tags:t.tags||[]});u(e),x(e)}else{let t={path:e,tags:[],fields:{...N},modifiedAt:new Date().toISOString()};u(t),x(t)}f(!1)},[C,g,D,N]),H=(0,a.useCallback)(async()=>{if(h&&C)try{let e={...h,modifiedAt:new Date().toISOString()},a=await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:C.filePath,propertyPath:l,propertyDoc:e})}),s=await a.json();s.success?(t(t=>t.map((t,a)=>a===r?{...t,docs:{...t.docs,properties:{...t.docs.properties,[l]:e}}}:t)),u(e),x(e),f(!1),S("保存しました"),p?.autoExport&&await M()):S("保存に失敗しました: "+s.error,"error")}catch(e){console.error("Failed to save:",e),S("保存中にエラーが発生しました","error")}},[C,r,h,p?.autoExport,M,l,S]),I=(0,a.useCallback)(async e=>{try{let t=await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:e.format,fileName:e.fileName,outputDir:e.outputDir})}),a=await t.json();if(a.success){let t={...e,lastExportedAt:new Date().toISOString()};b(t),await fetch("/api/export/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:t})}),S(`エクスポートしました: ${a.outputPath}`)}else S("エクスポートに失敗しました: "+a.error,"error")}catch(e){console.error("Export failed:",e),S("エクスポート中にエラーが発生しました","error")}},[S]),W=(0,a.useCallback)(async a=>{let r=y.filter(e=>!a.includes(e));if(j(a),await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({availableTags:a})}),r.length>0){for(let a of e){let e=!1,s={...a.docs.properties};for(let[t,a]of Object.entries(s))if(a.tags&&a.tags.length>0){let l=a.tags.filter(e=>!r.includes(e));l.length!==a.tags.length&&(s[t]={...a,tags:l},e=!0)}e&&(await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:a.filePath,properties:s})}),t(e=>e.map(e=>e.filePath===a.filePath?{...e,docs:{...e.docs,properties:s}}:e)))}if(h&&h.tags){let e=h.tags.filter(e=>!r.includes(e));if(e.length!==h.tags.length&&(u({...h,tags:e}),m)){let e=(m.tags||[]).filter(e=>!r.includes(e));x({...m,tags:e})}}}},[y,h,e,m]),B=(0,a.useCallback)(async a=>{let r=Object.keys(N),s=Object.keys(a),l=r.filter(e=>!s.includes(e));if(w(a),await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fields:a})}),l.length>0)for(let a of e){let e=!1,r={...a.docs.properties};for(let[t,a]of Object.entries(r))if(a.fields){let s={...a.fields},o=!1;for(let e of l)e in s&&(delete s[e],o=!0);o&&(r[t]={...a,fields:s},e=!0)}e&&(await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:a.filePath,properties:r})}),t(e=>e.map(e=>e.filePath===a.filePath?{...e,docs:{...e.docs,properties:r}}:e)))}if(m){let e={};for(let t of s)e[t]=m.fields?.[t]||"";x({...m,fields:e})}if(h){let e={};for(let t of s)e[t]=h.fields?.[t]||"";let t={...h,fields:e};u(t),f(T(t,m?{...m,fields:Object.fromEntries(s.map(e=>[e,m.fields?.[e]||""]))}:null))}},[T,h,e,m,N]),R=(0,a.useCallback)(()=>{o(""),u(null),f(!1)},[]);return{loadedConfigs:e,activeConfigIndex:r,activeConfig:C,selectedPath:l,editingDoc:h,originalDoc:m,hasUnsavedChanges:g,exportSettings:p,availableTags:y,projectFields:N,toasts:v,rootPath:c,isInitialized:i,setActiveConfigIndex:s,setSelectedPath:o,setEditingDoc:u,setHasUnsavedChanges:f,showToast:S,removeToast:P,loadConfigFile:$,handleSelectConfigFiles:E,handleRemoveConfig:F,handleReorderConfigs:z,handleSelectProperty:J,handleSaveProperty:H,handleExport:I,handleAvailableTagsChange:W,handleProjectFieldsChange:B,checkForChanges:T,resetSelection:R}}();return(0,t.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50",children:[(0,t.jsx)(d,{onExportClick:()=>l(!0)}),(0,t.jsxs)("main",{className:"container mx-auto px-6 py-8",children:[(0,t.jsx)(m,{loadedConfigs:o,activeConfigIndex:i,onTabClick:e=>{N(e),I()},onRemoveConfig:T,onAddFileClick:()=>r(!0),onReorder:O}),c&&(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 flex flex-col max-h-[calc(100vh-190px)] hover:shadow-2xl transition-shadow duration-300",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-purple-500 to-purple-600 rounded-lg flex items-center justify-center",children:(0,t.jsx)(n,{className:"w-5 h-5 text-white"})}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"JSON構造"})]}),(0,t.jsx)("div",{className:"overflow-y-auto flex-1",children:(0,t.jsx)(S,{config:c.configData,docs:c.docs,onSelectProperty:$,onEditProperty:$,selectedPath:h})})]}),(0,t.jsx)(w,{selectedPath:h,editingDoc:u,hasUnsavedChanges:g,availableTags:p,projectFields:b,onEditingDocChange:e=>{v(e),k(H(e,x))},onAvailableTagsChange:F,onProjectFieldsChange:z,onSave:M})]})]}),(0,t.jsx)(D,{isOpen:e,currentPath:j,multiSelect:!0,filterJsonOnly:!0,onSelect:e=>{P(e),r(!1)},onClose:()=>r(!1)}),(0,t.jsx)(A,{isOpen:s,onClose:()=>l(!1),onExport:E,currentSettings:f,rootPath:j}),(0,t.jsx)(J,{toasts:y,onRemove:C})]})}e.s(["default",()=>H],31713)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31713,e=>{"use strict";var t=e.i(43476),a=e.i(71645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},s=(...e)=>e.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim();var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,a.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:n,iconNode:c,...d},h)=>(0,a.createElement)("svg",{ref:h,...l,width:t,height:t,stroke:e,strokeWidth:o?24*Number(r)/Number(t):r,className:s("lucide",i),...!n&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(n)?n:[n]])),i=(e,t)=>{let l=(0,a.forwardRef)(({className:l,...i},n)=>(0,a.createElement)(o,{ref:n,iconNode:t,className:s(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...i}));return l.displayName=r(e),l},n=i("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),c=i("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);function d({onExportClick:e}){return(0,t.jsx)("header",{className:"bg-white/80 backdrop-blur-md border-b border-gray-200 shadow-sm sticky top-0 z-50",children:(0,t.jsxs)("div",{className:"container mx-auto px-6 py-4 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("img",{src:"/logo.svg",alt:"ConfigDoc",className:"w-12 h-12 rounded-lg"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"ConfigDoc"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Configuration Documentation Tool"})]})]}),(0,t.jsxs)("button",{onClick:e,className:"flex items-center gap-2 px-5 py-2.5 bg-gradient-to-r from-green-500 to-emerald-600 text-white rounded-lg hover:from-green-600 hover:to-emerald-700 shadow-md hover:shadow-lg transition-all duration-200 transform",title:"エクスポート",children:[(0,t.jsx)(c,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"font-medium",children:"エクスポート"})]})]})})}let h=i("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),u=i("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function m({loadedConfigs:e,activeConfigIndex:r,onTabClick:s,onRemoveConfig:l,onAddFileClick:o,onReorder:i}){let[n,c]=(0,a.useState)(null),[d,m]=(0,a.useState)(null),x=()=>{m(null)},g=()=>{c(null),m(null)},f=e.map(e=>e.filePath);return(0,t.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 mb-8 hover:shadow-2xl transition-shadow duration-300",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center",children:(0,t.jsx)(h,{className:"w-5 h-5 text-white"})}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"設定ファイル"})]}),(0,t.jsxs)("button",{onClick:o,className:"flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-blue-500 to-blue-600 text-white rounded-lg hover:from-blue-600 hover:to-blue-700 shadow-md hover:shadow-lg transition-all duration-200 transform",children:[(0,t.jsx)(h,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"font-medium",children:"ファイルを追加"})]})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-3",children:e.map((a,o)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{c(o)},onDragOver:e=>{e.preventDefault(),null!==n&&n!==o&&m(o)},onDragLeave:x,onDrop:()=>(t=>{if(null===n||n===t){c(null),m(null);return}let a=[...e],[s]=a.splice(n,1);a.splice(t,0,s);let l=r;r===n?l=t:n<r&&t>=r?l=r-1:n>r&&t<=r&&(l=r+1),i(a,l),c(null),m(null)})(o),onDragEnd:g,onClick:()=>s(o),className:`group flex items-center gap-2 px-4 py-2.5 rounded-xl border-2 cursor-grab transition-all duration-200 ${r===o?"bg-gradient-to-r from-blue-50 to-indigo-50 border-blue-400 shadow-md":"bg-white border-gray-200 hover:border-blue-300 hover:shadow-md"} ${n===o?"opacity-50":""} ${d===o?"border-blue-500 border-dashed":""}`,children:[(0,t.jsx)("span",{className:`text-sm font-medium ${r===o?"text-blue-700":"text-gray-700"}`,children:function(e,t){let a=e.split(/[/\\]/).pop()||e,r=t.filter(e=>e.split(/[/\\]/).pop()===a);if(1===r.length)return a;let s=e.split(/[/\\]/);for(let t=1;t<s.length;t++){let a=s.slice(-t-1).join("/");if(0===r.filter(r=>a===r.split(/[/\\]/).slice(-t-1).join("/")&&r!==e).length)return a}return e}(a.filePath,f)}),(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),l(o)},className:"text-gray-400 hover:text-red-500 transition-colors opacity-0 group-hover:opacity-100",children:(0,t.jsx)(u,{className:"w-4 h-4"})})]},a.filePath))}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gradient-to-br from-gray-50 to-gray-100 rounded-xl border-2 border-dashed border-gray-300",children:[(0,t.jsx)(h,{className:"w-16 h-16 text-gray-400 mx-auto mb-3"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 font-medium",children:"設定ファイルを選択してください"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"「ファイルを追加」ボタンから開始"})]})]})}let x=i("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),g=i("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),f=i("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),p=i("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),b=i("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);function y({label:e,items:r,onItemsChange:s,editButtonTitle:l,editModeDescription:o,inputPlaceholder:i,newItemPlaceholder:n,deleteButtonTitle:c,addButtonTitle:d,duplicateErrorMessage:h,onRename:m,children:g}){let[y,j]=(0,a.useState)(!1),[N,w]=(0,a.useState)([]),[v,k]=(0,a.useState)(""),[C,S]=(0,a.useState)(null),[P,T]=(0,a.useState)(null),O=(0,a.useMemo)(()=>{if(null===C||null===P||C===P)return N.map((e,t)=>({item:e,originalIndex:t}));let e=N.map((e,t)=>({item:e,originalIndex:t})),[t]=e.splice(C,1);return e.splice(P,0,t),e},[N,C,P]),D=()=>{let e=v.trim();e&&!N.some(t=>t.newName===e)&&(w([...N,{originalName:"",newName:e,isNew:!0}]),k(""))},$=()=>{if(null===C||null===P||C===P){S(null),T(null);return}let e=[...N],[t]=e.splice(C,1);e.splice(P,0,t),w(e),S(null),T(null)},A=()=>{S(null),T(null)},M=()=>{let e=N.map(e=>e.newName.trim()).filter(Boolean);return new Set(e).size!==e.length},E=!M()&&!N.some(e=>!e.newName.trim());return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-gray-700",children:e}),!y&&(0,t.jsx)("button",{onClick:()=>{w(r.map(e=>({originalName:e,newName:e,isNew:!1}))),j(!0),k("")},className:"text-gray-500 hover:text-blue-600 transition-colors p-1",title:l,children:(0,t.jsx)(f,{className:"w-4 h-4"})})]}),y?(0,t.jsxs)("div",{className:"space-y-3 p-4 bg-blue-50 rounded-lg border-2 border-blue-200",children:[(0,t.jsxs)("div",{className:"text-xs font-medium text-blue-700 mb-2",children:[o,"(ドラッグで並び替え可能)"]}),(0,t.jsx)("div",{className:"space-y-2",children:O.map(({item:e,originalIndex:a},r)=>{let s=C===a;return(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{S(a)},onDragOver:e=>{e.preventDefault(),null!==C&&P!==r&&T(r)},onDrop:$,onDragEnd:A,className:`flex items-center gap-2 transition-all ${s?"opacity-50":""}`,children:[(0,t.jsx)("div",{className:"cursor-grab text-gray-400 hover:text-gray-600 p-1",title:"ドラッグして並び替え",children:(0,t.jsx)(b,{className:"w-4 h-4"})}),(0,t.jsx)("input",{type:"text",value:e.newName,onChange:e=>{var t;return t=e.target.value,void w(N.map((e,r)=>r===a?{...e,newName:t}:e))},placeholder:i,className:`flex-1 px-3 py-2 border-2 rounded-lg text-sm focus:ring-2 transition-all duration-200 ${!e.newName.trim()?"border-red-300 focus:border-red-400 focus:ring-red-200":"border-gray-200 focus:border-blue-400 focus:ring-blue-200"}`}),(0,t.jsx)("button",{onClick:()=>{w(N.filter((e,t)=>t!==a))},className:"text-gray-400 hover:text-red-600 transition-colors p-2",title:c,children:(0,t.jsx)(u,{className:"w-4 h-4"})})]},a)})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-2 border-t border-blue-200",children:[(0,t.jsx)("input",{type:"text",value:v,onChange:e=>k(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),D())},placeholder:n,className:"flex-1 px-3 py-2 border-2 border-gray-200 rounded-lg text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-200 transition-all duration-200"}),(0,t.jsx)("button",{onClick:D,disabled:!v.trim()||N.some(e=>e.newName.trim()===v.trim()),className:"px-3 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",title:d,children:(0,t.jsx)(p,{className:"w-4 h-4"})})]}),M()&&(0,t.jsx)("div",{className:"text-xs text-red-600 mt-2",children:h}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-3 border-t border-blue-200",children:[(0,t.jsxs)("button",{onClick:()=>{let e=[],t={};for(let a of N){let r=a.newName.trim();r&&(e.push(r),a.isNew||a.originalName===r||(t[a.originalName]=r))}let a=v.trim();a&&!e.includes(a)&&e.push(a),m&&Object.keys(t).length>0&&m(t),s(e),j(!1),w([]),k("")},disabled:!E,className:"flex-1 flex items-center justify-center gap-2 px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed text-sm font-medium",children:[(0,t.jsx)(x,{className:"w-4 h-4"}),"保存"]}),(0,t.jsx)("button",{onClick:()=>{j(!1),w([]),k(""),S(null),T(null)},className:"flex-1 px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors text-sm font-medium",children:"キャンセル"})]})]}):g]})}function j({selectedTags:e,availableTags:a,onSelectedTagsChange:r,onAvailableTagsChange:s}){return(0,t.jsx)(y,{label:"タグ",items:a,onItemsChange:t=>{let a=e.filter(e=>t.includes(e));a.length!==e.length&&r(a),s(t)},editButtonTitle:"タグを編集",editModeDescription:"タグの追加・削除・名前変更",inputPlaceholder:"タグ名",newItemPlaceholder:"新しいタグ名を入力",deleteButtonTitle:"タグを削除",addButtonTitle:"タグを追加",duplicateErrorMessage:"同じ名前のタグがあります",onRename:t=>{let a=e.map(e=>t[e]||e);JSON.stringify(a)!==JSON.stringify(e)&&r(a)},children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:0===a.length?(0,t.jsx)("div",{className:"text-sm text-gray-500",children:"タグがありません。鉛筆アイコンをクリックして追加してください。"}):a.map(a=>{let s=e.includes(a);return(0,t.jsxs)("button",{onClick:()=>{e.includes(a)?r(e.filter(e=>e!==a)):r([...e,a])},className:`flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border-2 transition-all duration-200 ${s?"bg-blue-500 text-white border-blue-600 shadow-md":"bg-white text-gray-700 border-gray-200 hover:border-blue-300 hover:bg-blue-50"}`,children:[s&&(0,t.jsx)(g,{className:"w-3 h-3"}),(0,t.jsx)("span",{children:a})]},a)})})})}function N({fields:e,projectFields:a,onFieldsChange:r,onUpdateProjectFields:s}){let l=Object.keys(a);return(0,t.jsx)(y,{label:"フィールド",items:l,onItemsChange:t=>{let a={};for(let r of t)a[r]=e[r]||"";if(r(a),s){let e={};for(let a of t)e[a]="";s(e)}},editButtonTitle:"フィールドを編集",editModeDescription:"フィールドの追加・削除・名前変更",inputPlaceholder:"フィールド名",newItemPlaceholder:"新しいフィールド名を入力",deleteButtonTitle:"フィールドを削除",addButtonTitle:"フィールドを追加",duplicateErrorMessage:"同じ名前のフィールドがあります",onRename:t=>{let a={};for(let[r,s]of Object.entries(e))a[t[r]||r]=s;r(a)},children:(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(e).map(([a,s])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:a}),(0,t.jsx)("textarea",{value:s,onChange:t=>{var s;return s=t.target.value,void r({...e,[a]:s})},className:"w-full border-2 border-gray-200 rounded-lg p-3 min-h-[80px] text-sm focus:border-blue-400 focus:ring-2 focus:ring-blue-200 transition-all duration-200 shadow-sm hover:shadow-md",placeholder:`${a}を入力してください`})]},a))})})}function w({selectedPath:e,editingDoc:a,hasUnsavedChanges:r,availableTags:s,projectFields:l,onEditingDocChange:o,onAvailableTagsChange:i,onProjectFieldsChange:c,onSave:d}){return(0,t.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 flex flex-col max-h-[calc(100vh-190px)] hover:shadow-2xl transition-shadow duration-300",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-indigo-500 to-indigo-600 rounded-lg flex items-center justify-center",children:(0,t.jsx)(x,{className:"w-5 h-5 text-white"})}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"プロパティ詳細"})]}),e&&a?(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex-shrink-0 pb-4 border-b border-gray-200",children:[(0,t.jsx)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:"パス"}),(0,t.jsx)("div",{className:"text-sm text-gray-700 bg-gradient-to-r from-blue-50 to-indigo-50 p-3 rounded-lg font-mono border border-blue-200 shadow-sm",children:e})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 space-y-6 min-h-0",children:[(0,t.jsx)(j,{selectedTags:a.tags||[],availableTags:s,onSelectedTagsChange:e=>{o({...a,tags:e})},onAvailableTagsChange:i}),(0,t.jsx)(N,{fields:a.fields||{},projectFields:l,onFieldsChange:e=>{o({...a,fields:e})},onUpdateProjectFields:c})]}),(0,t.jsx)("div",{className:"flex-shrink-0 pt-4 border-t border-gray-200",children:(0,t.jsxs)("button",{onClick:d,disabled:!r,className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg shadow-md transition-all duration-200 transform ${r?"bg-gradient-to-r from-green-500 to-emerald-600 text-white hover:from-green-600 hover:to-emerald-700 hover:shadow-lg cursor-pointer":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:[(0,t.jsx)(x,{className:"w-5 h-5"}),(0,t.jsx)("span",{className:"font-medium",children:"保存"})]})})]}):(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center flex-1",children:[(0,t.jsx)("div",{className:"w-20 h-20 bg-gradient-to-br from-gray-100 to-gray-200 rounded-full flex items-center justify-center mb-4",children:(0,t.jsx)(n,{className:"w-10 h-10 text-gray-400"})}),(0,t.jsx)("p",{className:"text-sm text-gray-600 font-medium",children:"プロパティを選択してください"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"左側のツリーから項目を選択"})]})]})}let v=i("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),k=i("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);class C{static flattenConfig(e,t=""){let a={};for(let r in e){let s=t?`${t}:${r}`:r,l=e[r];l&&"object"==typeof l?Array.isArray(l)?l.some(e=>e&&"object"==typeof e&&!Array.isArray(e))?l.forEach((e,t)=>{e&&"object"==typeof e&&!Array.isArray(e)&&Object.assign(a,this.flattenConfig(e,`${s}[${t}]`))}):a[s]=l:Object.assign(a,this.flattenConfig(l,s)):a[s]=l}return a}static buildTree(e,t=""){let a=[];for(let r in e){let s=t?`${t}:${r}`:r,l=e[r];if(l&&"object"==typeof l)if(Array.isArray(l))if(l.some(e=>e&&"object"==typeof e&&!Array.isArray(e))){let e=[];l.forEach((t,a)=>{t&&"object"==typeof t&&!Array.isArray(t)&&e.push({key:`[${a}]`,fullPath:`${s}[${a}]`,value:t,children:this.buildTree(t,`${s}[${a}]`),hasDocumentation:!1,type:"object"})}),a.push({key:r,fullPath:s,value:l,children:e.length>0?e:void 0,hasDocumentation:!1,type:"array"})}else a.push({key:r,fullPath:s,value:l,hasDocumentation:!1,type:"array"});else a.push({key:r,fullPath:s,value:l,children:this.buildTree(l,s),hasDocumentation:!1,type:"object"});else a.push({key:r,fullPath:s,value:l,hasDocumentation:!1,type:typeof l})}return a}}function S({config:e,docs:r,onSelectProperty:s,onEditProperty:l,selectedPath:o}){let[i,c]=(0,a.useState)(new Set),d=(e,a=0)=>{var h;let u,m=(h=e.fullPath,!!(u=r.properties[h])&&(!!(u.tags&&u.tags.length>0||u.fields&&Object.values(u.fields).some(e=>e&&""!==e.trim()))||!1)),x=i.has(e.fullPath),g=o===e.fullPath;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{paddingLeft:`${20*a}px`},className:`group flex items-center gap-2 py-2 px-3 cursor-pointer rounded-lg transition-all duration-150 ${g?"bg-gradient-to-r from-blue-100 to-indigo-100 border-l-4 border-blue-500 shadow-sm":"hover:bg-gradient-to-r hover:from-gray-50 hover:to-gray-100"}`,children:[e.children&&e.children.length>0?(0,t.jsx)("button",{onClick:()=>{var t;let a;return t=e.fullPath,void((a=new Set(i)).has(t)?a.delete(t):a.add(t),c(a))},className:"p-1 hover:bg-blue-100 rounded-md transition-colors",children:x?(0,t.jsx)(k,{className:"w-4 h-4 text-blue-600"}):(0,t.jsx)(v,{className:"w-4 h-4 text-gray-600"})}):(0,t.jsx)("div",{className:"w-6"}),(0,t.jsxs)("div",{onClick:()=>s(e.fullPath),className:"flex-1 flex items-center gap-2",children:[(0,t.jsx)("span",{className:`${e.children?"font-bold text-gray-800":"font-medium text-gray-700"}`,children:e.key}),!e.children&&(0,t.jsxs)("span",{className:"text-sm text-gray-500 truncate max-w-[200px]",children:[": ",JSON.stringify(e.value)]}),m&&(0,t.jsxs)("div",{className:"flex items-center gap-1 px-2 py-0.5 bg-green-100 border border-green-300 rounded-full",children:[(0,t.jsx)(n,{className:"w-3 h-3 text-green-600"}),(0,t.jsx)("span",{className:"text-xs text-green-700 font-medium",children:"Doc"})]})]}),!e.children&&(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),l(e.fullPath)},className:"p-1 hover:bg-gray-200 rounded",title:"編集"})]}),e.children&&x&&(0,t.jsx)("div",{children:e.children.map(e=>d(e,a+1))})]},e.fullPath)},h=C.buildTree(e);return(0,t.jsxs)("div",{className:"h-full flex flex-col border-2 border-gray-100 rounded-xl bg-white shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 border-b-2 border-gray-100 bg-gradient-to-r from-gray-50 to-gray-100",children:[(0,t.jsx)("button",{onClick:()=>{var t;let a,r;c(new Set((t=C.buildTree(e),a=[],r=e=>{e.children&&e.children.length>0&&(a.push(e.fullPath),e.children.forEach(r))},t.forEach(r),a)))},className:"px-4 py-1.5 text-sm font-medium bg-white border-2 border-blue-200 text-blue-600 rounded-lg hover:bg-blue-50 hover:border-blue-300 transition-all duration-200 shadow-sm hover:shadow-md",children:"すべて展開"}),(0,t.jsx)("button",{onClick:()=>{c(new Set)},className:"px-4 py-1.5 text-sm font-medium bg-white border-2 border-gray-200 text-gray-600 rounded-lg hover:bg-gray-50 hover:border-gray-300 transition-all duration-200 shadow-sm hover:shadow-md",children:"すべて閉じる"})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto p-3",children:h.map(e=>d(e))})]})}let P=i("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),T=i("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),O=i("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);function D({isOpen:e,currentPath:r,onSelect:s,onClose:l,multiSelect:o=!1,filterJsonOnly:i=!1,folderSelectMode:n=!1,title:c}){let[d,h]=(0,a.useState)(r),[u,m]=(0,a.useState)([]),[x,g]=(0,a.useState)(!1),[f,p]=(0,a.useState)([]);(0,a.useEffect)(()=>{e&&(h(r),p([]))},[e,r]),(0,a.useEffect)(()=>{e&&b(d)},[e,d]);let b=async e=>{g(!0);try{let t=await fetch("/api/files/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({directory:e})}),a=await t.json();if(a.success){let e=a.data.items;n?e=a.data.items.filter(e=>"directory"===e.type):i&&(e=a.data.items.filter(e=>"directory"===e.type||".json"===e.extension)),m(e)}else console.error("API returned error:",a.error)}catch(e){console.error("Failed to load directory:",e)}finally{g(!1)}},y=()=>d.replace(/\\/g,"/").toLowerCase()!==r.replace(/\\/g,"/").toLowerCase(),j=()=>{p([]),l()};return e?(0,t.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[80vh] flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:c||(n?"フォルダを選択":"ファイルを選択")}),(0,t.jsx)("button",{onClick:j,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b bg-gray-50",children:[(0,t.jsx)("button",{onClick:()=>{if(!y())return;let e=d.replace(/\\/g,"/"),t=e.split("/").filter(e=>e);if(t.length>1){let a,s=t.slice(0,-1),l=(a=1===s.length&&s[0].includes(":")?s[0]+"/":s[0].includes(":")?s[0]+"/"+s.slice(1).join("/"):e.startsWith("/")?"/"+s.join("/"):s.join("/")).replace(/\\/g,"/").toLowerCase(),o=r.replace(/\\/g,"/").toLowerCase();(l.startsWith(o)||l===o)&&h(a)}else if(1===t.length&&!t[0].includes(":")){if("."===r.replace(/\\/g,"/").toLowerCase())return;h(".")}},disabled:!y(),className:`p-2 rounded flex-shrink-0 ${y()?"hover:bg-gray-200":"opacity-50 cursor-not-allowed"}`,title:y()?"上のディレクトリへ":"ルートディレクトリです",children:(0,t.jsx)(O,{className:"w-5 h-5"})}),(0,t.jsxs)("span",{className:"text-sm text-gray-600 flex-1 truncate",children:["パス: ",d]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:x?(0,t.jsx)("div",{className:"text-center text-gray-500",children:"読み込み中..."}):(0,t.jsx)("div",{className:"space-y-1",children:u.map(e=>{let a=f.includes(e.path);return(0,t.jsxs)("div",{onClick:()=>{"directory"===e.type?n?p([e.path]):h(e.path):o?p(t=>t.includes(e.path)?t.filter(t=>t!==e.path):[...t,e.path]):p([e.path])},onDoubleClick:()=>{"directory"===e.type&&(h(e.path),p([]))},className:`flex items-center gap-2 p-2 rounded cursor-pointer hover:bg-gray-100 ${a?"bg-blue-100":""}`,children:["directory"===e.type?(0,t.jsx)(P,{className:"w-5 h-5 text-blue-500"}):(0,t.jsx)(T,{className:"w-5 h-5 text-green-500"}),(0,t.jsx)("span",{className:"text-sm",children:e.name}),a&&(o||n)&&(0,t.jsx)("span",{className:"ml-auto text-blue-500",children:"✓"})]},e.path)})})}),(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-t",children:[n?(0,t.jsx)("div",{className:"text-sm text-gray-600",children:f.length>0?`選択中: ${f[0].split(/[/\\]/).pop()}`:`現在のフォルダ: ${d.split(/[/\\]/).pop()||d}`}):o&&f.length>0?(0,t.jsxs)("div",{className:"text-sm text-gray-600",children:[f.length,"件選択中"]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[(0,t.jsx)("button",{onClick:j,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded",children:"キャンセル"}),(0,t.jsx)("button",{onClick:()=>{n?(s(f.length>0?f:[d]),p([]),l()):f.length>0&&(s(f),p([]),l())},disabled:!n&&0===f.length,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:bg-gray-300 disabled:cursor-not-allowed",children:"選択"})]})]})]})}):null}let $={format:"html",autoExport:!0,fileName:"config-doc",outputDir:".config_doc/output"};function A({isOpen:e,onClose:r,onExport:s,currentSettings:l,rootPath:o="."}){let[i,n]=(0,a.useState)(l||$),[d,h]=(0,a.useState)(!1),[m,x]=(0,a.useState)(!1);(0,a.useEffect)(()=>{l&&n(l)},[l]);let g=(0,a.useMemo)(()=>{let e=o.replace(/\//g,"\\"),t=i.outputDir?.trim()||"",a=i.fileName||"config-doc",r="markdown"===i.format||"markdown-table"===i.format?"md":"html";if(t){let s=t.replace(/\//g,"\\");return`${e}\\${s}\\${a}.${r}`}return`${e}\\${a}.${r}`},[i.format,i.fileName,i.outputDir,o]);if(!e)return null;let f=async()=>{h(!0);try{await s(i),r()}catch(e){console.error("Export failed:",e)}finally{h(!1)}};return(0,t.jsxs)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-6 border-b",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-800",children:"エクスポート設定"}),(0,t.jsx)("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,t.jsx)(u,{className:"w-5 h-5"})})]}),(0,t.jsxs)("div",{className:"p-6 space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力先フォルダ"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:i.outputDir||"",onChange:e=>n({...i,outputDir:e.target.value}),className:"flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"(空欄でプロジェクトルート)"}),(0,t.jsx)("button",{type:"button",onClick:()=>x(!0),className:"px-3 py-2 border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500",title:"フォルダを選択",children:(0,t.jsx)(P,{className:"w-5 h-5 text-gray-500"})})]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"相対パスを入力またはフォルダを選択(空欄でプロジェクトルート、チーム共有設定)"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"ファイル名"}),(0,t.jsx)("input",{type:"text",value:i.fileName??"",onChange:e=>n({...i,fileName:e.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"config-doc"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"拡張子なしのファイル名を指定します(空欄でconfig-doc、チーム共有設定)"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力形式"}),(0,t.jsxs)("select",{value:i.format,onChange:e=>n({...i,format:e.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[(0,t.jsx)("option",{value:"html",children:"HTML"}),(0,t.jsx)("option",{value:"markdown",children:"Markdown"}),(0,t.jsx)("option",{value:"markdown-table",children:"Markdown (テーブル形式)"})]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"html"===i.format?"スタイル付きのHTMLファイルとして出力します":"markdown-table"===i.format?"Markdownテーブル形式で出力します(プロパティ名、説明、値、備考)":"テキストベースのMarkdownファイルとして出力します"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"出力先パス"}),(0,t.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md text-sm text-gray-700 font-mono break-all",children:g})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"flex items-center h-5",children:(0,t.jsx)("input",{id:"auto-export",type:"checkbox",checked:i.autoExport,onChange:e=>n({...i,autoExport:e.target.checked}),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"})}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("label",{htmlFor:"auto-export",className:"text-sm font-medium text-gray-700 cursor-pointer",children:"保存時に自動エクスポート"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"ドキュメントを保存したときに自動的にHTMLファイルを更新します"})]})]}),i.lastExportedAt&&(0,t.jsx)("div",{className:"pt-4 border-t",children:(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:["最終エクスポート: ",new Date(i.lastExportedAt).toLocaleString("ja-JP")]})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-3 p-6 border-t bg-gray-50 rounded-b-lg",children:[(0,t.jsx)("button",{onClick:r,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"キャンセル"}),(0,t.jsxs)("button",{onClick:f,disabled:d,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,t.jsx)(c,{className:"w-4 h-4"}),d?"エクスポート中...":"エクスポート"]})]})]}),(0,t.jsx)(D,{isOpen:m,currentPath:o,onSelect:e=>{if(e.length>0){let t=e[0],a=o.replace(/\\/g,"/"),r=t.replace(/\\/g,"/"),s=r;r.startsWith(a)&&(s=r.slice(a.length)).startsWith("/")&&(s=s.slice(1)),s||(s="."),n({...i,outputDir:s})}x(!1)},onClose:()=>x(!1),folderSelectMode:!0,title:"出力先フォルダを選択"})]})}let M=i("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),E=i("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),F=i("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);function z({message:e,type:r,duration:s=3e3,onClose:l}){let[o,i]=(0,a.useState)(!1);(0,a.useEffect)(()=>{setTimeout(()=>i(!0),10);let e=setTimeout(()=>{i(!1),setTimeout(l,300)},s);return()=>clearTimeout(e)},[s,l]);let n={success:(0,t.jsx)(M,{className:"w-5 h-5 text-green-500"}),error:(0,t.jsx)(E,{className:"w-5 h-5 text-red-500"}),warning:(0,t.jsx)(F,{className:"w-5 h-5 text-yellow-500"})};return(0,t.jsx)("div",{className:`fixed bottom-4 left-4 z-50 transition-all duration-300 ${o?"opacity-100 translate-y-0":"opacity-0 translate-y-2"}`,children:(0,t.jsxs)("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg border ${{success:"bg-green-50 border-green-200",error:"bg-red-50 border-red-200",warning:"bg-yellow-50 border-yellow-200"}[r]} min-w-[300px] max-w-[500px]`,children:[n[r],(0,t.jsx)("span",{className:"flex-1 text-sm text-gray-800",children:e}),(0,t.jsx)("button",{onClick:()=>{i(!1),setTimeout(l,300)},className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,t.jsx)(u,{className:"w-4 h-4"})})]})})}function J({toasts:e,onRemove:a}){return(0,t.jsx)(t.Fragment,{children:e.map((e,r)=>(0,t.jsx)("div",{style:{bottom:`${16+80*r}px`},className:"fixed left-4 z-50",children:(0,t.jsx)(z,{message:e.message,type:e.type,onClose:()=>a(e.id)})},e.id))})}let L={説明:""};function H(){let[e,r]=(0,a.useState)(!1),[s,l]=(0,a.useState)(!1),{loadedConfigs:o,activeConfigIndex:i,activeConfig:c,selectedPath:h,editingDoc:u,originalDoc:x,hasUnsavedChanges:g,exportSettings:f,availableTags:p,projectFields:b,toasts:y,rootPath:j,setActiveConfigIndex:N,setEditingDoc:v,setHasUnsavedChanges:k,removeToast:C,handleSelectConfigFiles:P,handleRemoveConfig:T,handleReorderConfigs:O,handleSelectProperty:$,handleSaveProperty:M,handleExport:E,handleAvailableTagsChange:F,handleProjectFieldsChange:z,checkForChanges:H,resetSelection:I}=function(){let[e,t]=(0,a.useState)([]),[r,s]=(0,a.useState)(0),[l,o]=(0,a.useState)(""),[i,n]=(0,a.useState)(!1),[c,d]=(0,a.useState)("."),[h,u]=(0,a.useState)(null),[m,x]=(0,a.useState)(null),[g,f]=(0,a.useState)(!1),[p,b]=(0,a.useState)(),[y,j]=(0,a.useState)(["required","nullable","string","number","boolean"]),[N,w]=(0,a.useState)(L),[v,k]=(0,a.useState)([]),C=e[r],S=(0,a.useCallback)((e,t="success")=>{let a=Date.now().toString();k(r=>[...r,{id:a,message:e,type:t}])},[]),P=(0,a.useCallback)(e=>{k(t=>t.filter(t=>t.id!==e))},[]),T=(0,a.useCallback)((e,t)=>{if(!e||!t)return!1;let a=e.tags||[],r=t.tags||[];if(a.length!==r.length||a.some((e,t)=>e!==r[t]))return!0;let s=e.fields||{},l=t.fields||{};for(let e of new Set([...Object.keys(s),...Object.keys(l)]))if((s[e]||"")!==(l[e]||""))return!0;return!1},[]),O=(0,a.useCallback)((e,t)=>{let a=e.replace(/\\/g,"/"),r=t.replace(/\\/g,"/");if(!a.match(/^[a-zA-Z]:\//)&&!a.startsWith("/"))return e;if(a.startsWith(r)){let e=a.substring(r.length);return e.startsWith("/")?e.substring(1):e}return e},[]),D=(0,a.useCallback)(e=>{let t={};for(let a of Object.keys(N))t[a]=e.fields[a]||"";return{...e,fields:t}},[N]),$=(0,a.useCallback)(async e=>{try{let a=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e})}),r=await a.json();r.success&&t(t=>t.some(t=>t.filePath===e)?t:[...t,{filePath:e,configData:r.data.configData,docs:r.data.docs}])}catch(e){console.error("Failed to load config file:",e)}},[]),A=(0,a.useCallback)(async e=>{try{let t=await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePaths:e})}),a=await t.json();a.deletedDocsFiles&&a.deletedDocsFiles.length>0&&S(`${a.deletedDocsFiles.length}件のドキュメントファイルを削除しました`,"warning")}catch(e){console.error("Failed to update metadata:",e)}},[S]),M=(0,a.useCallback)(async()=>{if(p)try{if((await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:p.format,fileName:p.fileName,outputDir:p.outputDir})})).ok){let e={...p,lastExportedAt:new Date().toISOString()};b(e),await fetch("/api/export/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:e})})}}catch(e){console.error("Auto export failed:",e)}},[p]);(0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/project"),t=await e.json();if(t.success&&(d(t.data.rootPath),t.data.hasConfigDoc)){let e=await fetch("/api/config/metadata"),t=await e.json();if(t.success&&t.data?.configFiles)for(let e of t.data.configFiles)await $(e.filePath);t.success&&t.data?.availableTags&&j(t.data.availableTags),t.success&&t.data?.fields&&w(t.data.fields)}let a=await fetch("/api/export/settings"),r=await a.json();r.success&&b(r.data)}catch(e){console.error("Failed to load saved configs:",e)}finally{n(!0)}})()},[$]);let E=(0,a.useCallback)(async a=>{let r=[];for(let t of a){let a=O(t,c);if(!e.some(e=>e.filePath===a))try{let e=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:t})}),s=await e.json();s.success?r.push({filePath:a,configData:s.data.configData,docs:s.data.docs}):S(`設定ファイルの読み込みに失敗しました (${t}): ${s.error}`,"error")}catch(e){console.error("Failed to load config:",e),S(`設定ファイルの読み込み中にエラーが発生しました: ${t}`,"error")}}r.length>0&&t(e=>{let t=[...e,...r];return A(t.map(e=>e.filePath)),t})},[e,c,S,O,A]),F=(0,a.useCallback)(async a=>{let l=e[a];(!l.docs||!(Object.keys(l.docs.properties).length>0)||confirm("既に説明文が設定されていますが、削除してよろしいですか?"))&&(t(e=>{let t=e.filter((e,t)=>t!==a);return A(t.map(e=>e.filePath)),t}),r>=a&&r>0&&s(r-1),o(""),u(null),f(!1))},[r,e,A]),z=(0,a.useCallback)((e,a)=>{t(e),s(a),A(e.map(e=>e.filePath))},[A]),J=(0,a.useCallback)(e=>{if(g&&!confirm("保存されていない変更があります。破棄しますか?"))return;o(e);let t=C?.docs.properties[e];if(t){let e=D({...t,tags:t.tags||[]});u(e),x(e)}else{let t={path:e,tags:[],fields:{...N},modifiedAt:new Date().toISOString()};u(t),x(t)}f(!1)},[C,g,D,N]),H=(0,a.useCallback)(async()=>{if(h&&C)try{let e={...h,modifiedAt:new Date().toISOString()},a=await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:C.filePath,propertyPath:l,propertyDoc:e})}),s=await a.json();s.success?(t(t=>t.map((t,a)=>a===r?{...t,docs:{...t.docs,properties:{...t.docs.properties,[l]:e}}}:t)),u(e),x(e),f(!1),S("保存しました"),p?.autoExport&&await M()):S("保存に失敗しました: "+s.error,"error")}catch(e){console.error("Failed to save:",e),S("保存中にエラーが発生しました","error")}},[C,r,h,p?.autoExport,M,l,S]),I=(0,a.useCallback)(async e=>{try{let t=await fetch("/api/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:e.format,fileName:e.fileName,outputDir:e.outputDir})}),a=await t.json();if(a.success){let t={...e,lastExportedAt:new Date().toISOString()};b(t),await fetch("/api/export/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:t})}),S(`エクスポートしました: ${a.outputPath}`)}else S("エクスポートに失敗しました: "+a.error,"error")}catch(e){console.error("Export failed:",e),S("エクスポート中にエラーが発生しました","error")}},[S]),B=(0,a.useCallback)(async a=>{let r=y.filter(e=>!a.includes(e));if(j(a),await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({availableTags:a})}),r.length>0){for(let a of e){let e=!1,s={...a.docs.properties};for(let[t,a]of Object.entries(s))if(a.tags&&a.tags.length>0){let l=a.tags.filter(e=>!r.includes(e));l.length!==a.tags.length&&(s[t]={...a,tags:l},e=!0)}e&&(await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:a.filePath,properties:s})}),t(e=>e.map(e=>e.filePath===a.filePath?{...e,docs:{...e.docs,properties:s}}:e)))}if(h&&h.tags){let e=h.tags.filter(e=>!r.includes(e));if(e.length!==h.tags.length&&(u({...h,tags:e}),m)){let e=(m.tags||[]).filter(e=>!r.includes(e));x({...m,tags:e})}}}},[y,h,e,m]),W=(0,a.useCallback)(async a=>{let r=Object.keys(N),s=Object.keys(a),l=r.filter(e=>!s.includes(e));if(w(a),await fetch("/api/config/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fields:a})}),l.length>0)for(let a of e){let e=!1,r={...a.docs.properties};for(let[t,a]of Object.entries(r))if(a.fields){let s={...a.fields},o=!1;for(let e of l)e in s&&(delete s[e],o=!0);o&&(r[t]={...a,fields:s},e=!0)}e&&(await fetch("/api/config/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configFilePath:a.filePath,properties:r})}),t(e=>e.map(e=>e.filePath===a.filePath?{...e,docs:{...e.docs,properties:r}}:e)))}if(m){let e={};for(let t of s)e[t]=m.fields?.[t]||"";x({...m,fields:e})}if(h){let e={};for(let t of s)e[t]=h.fields?.[t]||"";let t={...h,fields:e};u(t),f(T(t,m?{...m,fields:Object.fromEntries(s.map(e=>[e,m.fields?.[e]||""]))}:null))}},[T,h,e,m,N]),R=(0,a.useCallback)(()=>{o(""),u(null),f(!1)},[]);return{loadedConfigs:e,activeConfigIndex:r,activeConfig:C,selectedPath:l,editingDoc:h,originalDoc:m,hasUnsavedChanges:g,exportSettings:p,availableTags:y,projectFields:N,toasts:v,rootPath:c,isInitialized:i,setActiveConfigIndex:s,setSelectedPath:o,setEditingDoc:u,setHasUnsavedChanges:f,showToast:S,removeToast:P,loadConfigFile:$,handleSelectConfigFiles:E,handleRemoveConfig:F,handleReorderConfigs:z,handleSelectProperty:J,handleSaveProperty:H,handleExport:I,handleAvailableTagsChange:B,handleProjectFieldsChange:W,checkForChanges:T,resetSelection:R}}();return(0,t.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50",children:[(0,t.jsx)(d,{onExportClick:()=>l(!0)}),(0,t.jsxs)("main",{className:"container mx-auto px-6 py-8",children:[(0,t.jsx)(m,{loadedConfigs:o,activeConfigIndex:i,onTabClick:e=>{N(e),I()},onRemoveConfig:T,onAddFileClick:()=>r(!0),onReorder:O}),c&&(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"bg-white/90 backdrop-blur-sm rounded-2xl shadow-xl border border-gray-100 p-6 flex flex-col max-h-[calc(100vh-190px)] hover:shadow-2xl transition-shadow duration-300",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-br from-purple-500 to-purple-600 rounded-lg flex items-center justify-center",children:(0,t.jsx)(n,{className:"w-5 h-5 text-white"})}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:"JSON構造"})]}),(0,t.jsx)("div",{className:"overflow-y-auto flex-1",children:(0,t.jsx)(S,{config:c.configData,docs:c.docs,onSelectProperty:$,onEditProperty:$,selectedPath:h})})]}),(0,t.jsx)(w,{selectedPath:h,editingDoc:u,hasUnsavedChanges:g,availableTags:p,projectFields:b,onEditingDocChange:e=>{v(e),k(H(e,x))},onAvailableTagsChange:F,onProjectFieldsChange:z,onSave:M})]})]}),(0,t.jsx)(D,{isOpen:e,currentPath:j,multiSelect:!0,filterJsonOnly:!0,onSelect:e=>{P(e),r(!1)},onClose:()=>r(!1)}),(0,t.jsx)(A,{isOpen:s,onClose:()=>l(!1),onExport:E,currentSettings:f,rootPath:j}),(0,t.jsx)(J,{toasts:y,onRemove:C})]})}e.s(["default",()=>H],31713)}]);
@@ -1 +0,0 @@
1
- <svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
@@ -1 +0,0 @@
1
- <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
@@ -1,41 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" fill="none">
2
- <defs>
3
- <linearGradient id="bgGradient" x1="0%" y1="0%" x2="100%" y2="100%">
4
- <stop offset="0%" style="stop-color:#3B82F6"/>
5
- <stop offset="50%" style="stop-color:#6366F1"/>
6
- <stop offset="100%" style="stop-color:#8B5CF6"/>
7
- </linearGradient>
8
- <linearGradient id="docGradient" x1="0%" y1="0%" x2="100%" y2="100%">
9
- <stop offset="0%" style="stop-color:#60A5FA"/>
10
- <stop offset="100%" style="stop-color:#A78BFA"/>
11
- </linearGradient>
12
- </defs>
13
-
14
- <!-- 背景の角丸四角 -->
15
- <rect x="8" y="8" width="224" height="224" rx="44" fill="url(#bgGradient)"/>
16
-
17
- <!-- ドキュメントアイコン(背面) -->
18
- <path d="M68 48 L148 48 L172 72 L172 192 L68 192 Z" fill="white" opacity="0.2"/>
19
- <path d="M148 48 L148 72 L172 72" fill="none" stroke="white" stroke-width="4" opacity="0.2"/>
20
-
21
- <!-- ドキュメントアイコン(前面) -->
22
- <path d="M52 64 L132 64 L156 88 L156 208 L52 208 Z" fill="white"/>
23
- <path d="M132 64 L132 88 L156 88" fill="none" stroke="url(#docGradient)" stroke-width="4"/>
24
-
25
- <!-- JSON括弧 { } -->
26
- <text x="104" y="152" font-family="Monaco, Consolas, monospace" font-size="48" font-weight="bold" fill="url(#bgGradient)" text-anchor="middle">{ }</text>
27
-
28
- <!-- 歯車(右下) -->
29
- <circle cx="188" cy="188" r="40" fill="url(#docGradient)"/>
30
- <circle cx="188" cy="188" r="16" fill="white"/>
31
- <g fill="url(#docGradient)">
32
- <rect x="182" y="144" width="12" height="16" rx="4"/>
33
- <rect x="182" y="216" width="12" height="16" rx="4"/>
34
- <rect x="144" y="182" width="16" height="12" rx="4"/>
35
- <rect x="216" y="182" width="16" height="12" rx="4"/>
36
- <rect x="152" y="152" width="12" height="16" rx="4" transform="rotate(45 158 160)"/>
37
- <rect x="212" y="212" width="12" height="16" rx="4" transform="rotate(45 218 220)"/>
38
- <rect x="212" y="152" width="12" height="16" rx="4" transform="rotate(-45 218 160)"/>
39
- <rect x="152" y="212" width="12" height="16" rx="4" transform="rotate(-45 158 220)"/>
40
- </g>
41
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
@@ -1 +0,0 @@
1
- <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
@@ -1 +0,0 @@
1
- <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>