@undefineds.co/xpod 0.4.17 → 0.4.18

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 (134) hide show
  1. package/config/xpod.base.json +3 -0
  2. package/dist/components/context.jsonld +14 -0
  3. package/dist/identity/ValidatingIdentityProviderHttpHandler.d.ts +32 -1
  4. package/dist/identity/ValidatingIdentityProviderHttpHandler.js +53 -1
  5. package/dist/identity/ValidatingIdentityProviderHttpHandler.jsonld +53 -0
  6. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +39 -10
  7. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsList.js +15 -4
  8. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +1 -1
  9. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +4 -1
  10. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.d.ts +5 -1
  11. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.js +2 -2
  12. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.js +5 -1
  13. package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +4 -0
  14. package/node_modules/@undefineds.co/ai-connections/dist/controller.js +3 -1
  15. package/node_modules/@undefineds.co/extension-sdk/dist/layout.d.ts +39 -0
  16. package/node_modules/@undefineds.co/extension-sdk/dist/layout.js +40 -0
  17. package/node_modules/@undefineds.co/extension-sdk/dist/react/app-layout.d.ts +13 -1
  18. package/node_modules/@undefineds.co/extension-sdk/dist/react/app-layout.js +11 -3
  19. package/node_modules/@undefineds.co/extension-sdk/dist/react/workspace-layout.d.ts +13 -4
  20. package/node_modules/@undefineds.co/extension-sdk/dist/react/workspace-layout.js +68 -11
  21. package/node_modules/@undefineds.co/shared-ui/dist/auth-surface.js +6 -6
  22. package/node_modules/@undefineds.co/shared-ui/dist/dialog.js +4 -4
  23. package/node_modules/@undefineds.co/shared-ui/dist/login.js +1 -1
  24. package/node_modules/@undefineds.co/shared-ui/dist/theme.css +128 -79
  25. package/node_modules/@undefineds.co/shared-ui/dist/toast.js +1 -1
  26. package/node_modules/@undefineds.co/shared-ui/dist/tooltip.js +1 -1
  27. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.cjs +87 -9
  28. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.d.ts +31 -3
  29. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.js +156 -14
  30. package/node_modules/@undefineds.co/solid-sdk/dist/index.cjs +86 -8
  31. package/package.json +2 -2
  32. package/static/app/assets/global.css +1 -0
  33. package/static/app/assets/{index-BCZVzMpj.js → index-BeAi28iA.js} +1 -1
  34. package/static/app/assets/inrupt-smoke.js +37 -36
  35. package/static/app/assets/main.js +3 -3
  36. package/static/app/index.html +2 -2
  37. package/static/app/inrupt-smoke.html +2 -1
  38. package/static/dashboard/assets/{AiConfigContext-BedwuLTE.js → AiConfigContext-DelSqO6L.js} +1 -1
  39. package/static/dashboard/assets/{AiConfigPage-hNTayf8G.js → AiConfigPage-dbg0aDvd.js} +1 -1
  40. package/static/dashboard/assets/DocumentProcessingPanel-0-3nlwQf.js +1 -0
  41. package/static/dashboard/assets/IndexLifecyclePanel-DOI3IxOD.js +1 -0
  42. package/static/dashboard/assets/{IndexSubjectPanel-Bv97-ouZ.js → IndexSubjectPanel-ClDgj0SY.js} +1 -1
  43. package/static/dashboard/assets/ModelAssignmentsPanel-BSWH19oT.js +1 -0
  44. package/static/dashboard/assets/ModelsPage-BrzxCkEl.js +11 -0
  45. package/static/{settings/assets/NetworkPage-D50kdbEu.js → dashboard/assets/NetworkPage-CxEKeaPz.js} +2 -2
  46. package/static/dashboard/assets/{PaneListHeader-ByqK_C6i.js → PaneListHeader-xEjcBu9g.js} +1 -1
  47. package/static/dashboard/assets/SearchIndexingPanel-BGlSvEl5.js +1 -0
  48. package/static/dashboard/assets/{StatusSubjectPanel-DPegcFpA.js → StatusSubjectPanel-6s3JXbOd.js} +1 -1
  49. package/static/dashboard/assets/StatusWorkspace-LYMDa4b0.js +1 -0
  50. package/static/dashboard/assets/{SystemSettingsPage-LyXmd6uP.js → SystemSettingsPage-CF_vH-qe.js} +1 -1
  51. package/static/dashboard/assets/SystemSettingsSubjectPanel-hsfHcJRV.js +33 -0
  52. package/static/dashboard/assets/{XpodAiConnectionsPodStore-DXNERI2-.js → XpodAiConnectionsPodStore-CHM-ZwI3.js} +1 -1
  53. package/static/dashboard/assets/{activity-BwRbcTha.js → activity-B7UdTZ1N.js} +1 -1
  54. package/static/dashboard/assets/{badge-BbRb9MsQ.js → badge-B6RuxNt1.js} +1 -1
  55. package/static/dashboard/assets/collection-runtime-CKBQm3Fl.js +1 -0
  56. package/static/dashboard/assets/dashboard-1zrtbMhM.css +1 -0
  57. package/static/dashboard/assets/{dashboard-D2ozrATv.js → dashboard-Dm_h60lA.js} +175 -135
  58. package/static/dashboard/assets/{download-SIHe8Y5t.js → download-BW035kpj.js} +1 -1
  59. package/static/dashboard/assets/{external-link-CiYw5Q4U.js → external-link-BMrNvf3c.js} +1 -1
  60. package/static/dashboard/assets/{index-DC1jRaVA.js → index-2jlFzexm.js} +1 -1
  61. package/static/dashboard/assets/index-CQDQ8WVr.js +4 -0
  62. package/static/dashboard/assets/{key-round-nKtxP6pb.js → key-round-C9vxhn7T.js} +1 -1
  63. package/static/dashboard/assets/{rotate-ccw-CQm5hHMN.js → rotate-ccw-8Vm0-INc.js} +1 -1
  64. package/static/dashboard/assets/{skeleton-TKyLbiPs.js → skeleton-CY_602wn.js} +1 -1
  65. package/static/dashboard/assets/{waypoints-BQS9t0ky.js → waypoints-DdEdgkxD.js} +1 -1
  66. package/static/dashboard/assets/workspace-layout-Wed840qR.js +1 -0
  67. package/static/dashboard/dashboard.html +2 -2
  68. package/static/settings/assets/{AiConfigContext-eLRkXFtH.js → AiConfigContext-CR3YhTA-.js} +1 -1
  69. package/static/settings/assets/AiConfigPage-DnOvX2Kx.js +1 -0
  70. package/static/settings/assets/DocumentProcessingPanel-CccpHBs3.js +1 -0
  71. package/static/settings/assets/IndexLifecyclePanel-BrECzBoM.js +1 -0
  72. package/static/settings/assets/{IndexSubjectPanel-DT0c11VQ.js → IndexSubjectPanel-CP84xXye.js} +1 -1
  73. package/static/settings/assets/ModelAssignmentsPanel-DbFi67Kk.js +1 -0
  74. package/static/settings/assets/ModelsPage-xjHA88qy.js +11 -0
  75. package/static/settings/assets/NetworkPage-Bj4wc0bh.js +2 -0
  76. package/static/settings/assets/{PaneListHeader-Da5jZFvG.js → PaneListHeader-Bz0UAhZr.js} +1 -1
  77. package/static/settings/assets/SearchIndexingPanel-ykhvw1Vl.js +1 -0
  78. package/static/settings/assets/{StatusSubjectPanel-Upqqlvon.js → StatusSubjectPanel-B2Y6ib3d.js} +1 -1
  79. package/static/settings/assets/StatusWorkspace-tx3Xg56J.js +1 -0
  80. package/static/settings/assets/SystemSettingsPage-BbFkv_Wn.js +1 -0
  81. package/static/settings/assets/SystemSettingsSubjectPanel-CcbpQmTc.js +33 -0
  82. package/static/settings/assets/{XpodAiConnectionsPodStore-nFgD_usD.js → XpodAiConnectionsPodStore-B11u0BOi.js} +2 -2
  83. package/static/settings/assets/{activity-CWy1W2W0.js → activity-BE8Hz8WF.js} +1 -1
  84. package/static/settings/assets/auth-callback-5waKJF0n.js +1 -0
  85. package/static/settings/assets/{badge-v30yFaaj.js → badge-xeRbYBMf.js} +1 -1
  86. package/static/settings/assets/collection-runtime-DIBObcT5.js +1 -0
  87. package/static/settings/assets/{download-C3Dzb60R.js → download-xI5yyfk7.js} +1 -1
  88. package/static/settings/assets/{external-link-DnkJGKNc.js → external-link-DmbiCMuc.js} +1 -1
  89. package/static/settings/assets/global-1zrtbMhM.css +1 -0
  90. package/static/settings/assets/{global-B_WO-aYY.js → global-BOl78fr8.js} +160 -120
  91. package/static/settings/assets/index-CFVXiUnV.js +4 -0
  92. package/static/settings/assets/index-DK6qlahe.js +1 -0
  93. package/static/settings/assets/{index-browser-DzhsXZHm.js → index-browser-Bk7jaLCd.js} +1 -1
  94. package/static/settings/assets/{key-round-DoDbsLae.js → key-round-B3VIp8oI.js} +1 -1
  95. package/static/settings/assets/{rotate-ccw-DNR_R3oT.js → rotate-ccw-DRzTN49Z.js} +1 -1
  96. package/static/settings/assets/{settings-BOznrBjy.js → settings-CCM17CMX.js} +1 -1
  97. package/static/settings/assets/{skeleton-BjHhu9qI.js → skeleton-Ckhw5HG7.js} +1 -1
  98. package/static/settings/assets/{waypoints-BXNph9Fd.js → waypoints-BFMI-qS6.js} +1 -1
  99. package/static/settings/assets/workspace-layout-Co0KpMKd.js +1 -0
  100. package/static/settings/auth-callback.html +3 -3
  101. package/static/settings/settings.html +3 -3
  102. package/static/app/assets/main.css +0 -1
  103. package/static/dashboard/assets/DocumentProcessingPanel-BSb_vOj7.js +0 -1
  104. package/static/dashboard/assets/IndexLifecyclePanel-DAHx-PBG.js +0 -1
  105. package/static/dashboard/assets/ModelAssignmentsPanel-CEJZs9At.js +0 -1
  106. package/static/dashboard/assets/ModelsPage-DkBVXmKT.js +0 -11
  107. package/static/dashboard/assets/NetworkPage-BDqKgRZQ.js +0 -2
  108. package/static/dashboard/assets/SearchIndexingPanel-M-WYaQP3.js +0 -1
  109. package/static/dashboard/assets/StatusWorkspace-CPIkjO9S.js +0 -1
  110. package/static/dashboard/assets/SystemSettingsSubjectPanel-CYHqNIn2.js +0 -33
  111. package/static/dashboard/assets/collection-runtime-BRfZD5oS.js +0 -1
  112. package/static/dashboard/assets/dashboard-rk080mvG.css +0 -1
  113. package/static/dashboard/assets/dialog-BbRbILBP.js +0 -1
  114. package/static/dashboard/assets/index-CExLoewO.js +0 -41
  115. package/static/dashboard/assets/index-CTgU8YW1.js +0 -4
  116. package/static/dashboard/assets/workspace-layout-Csbbr3vZ.js +0 -1
  117. package/static/settings/assets/AiConfigPage-BMO-ytdK.js +0 -1
  118. package/static/settings/assets/DocumentProcessingPanel-CH-HBRzQ.js +0 -1
  119. package/static/settings/assets/IndexLifecyclePanel-ChEMn9D8.js +0 -1
  120. package/static/settings/assets/ModelAssignmentsPanel-T59L_wOk.js +0 -1
  121. package/static/settings/assets/ModelsPage-m_SP4PdE.js +0 -11
  122. package/static/settings/assets/SearchIndexingPanel-DQQd3-Jw.js +0 -1
  123. package/static/settings/assets/StatusWorkspace-CPB49bGd.js +0 -1
  124. package/static/settings/assets/SystemSettingsPage-C0wrxcNw.js +0 -1
  125. package/static/settings/assets/SystemSettingsSubjectPanel-BOm7tUH1.js +0 -33
  126. package/static/settings/assets/auth-callback-HhgEuohz.js +0 -1
  127. package/static/settings/assets/collection-runtime-B7oomxic.js +0 -1
  128. package/static/settings/assets/dialog-BAe7moyL.js +0 -1
  129. package/static/settings/assets/global-rk080mvG.css +0 -1
  130. package/static/settings/assets/index-B51ot_m_.js +0 -1
  131. package/static/settings/assets/index-CHBQVfuZ.js +0 -41
  132. package/static/settings/assets/index-DbqRFton.js +0 -4
  133. package/static/settings/assets/workspace-layout-TZ7fteel.js +0 -1
  134. /package/static/app/assets/{_commonjsHelpers-B-UnjaXt.js → global-BGMlqT2c.js} +0 -0
@@ -0,0 +1 @@
1
+ @theme inline{ --color-background: hsl(var(--background)); --color-foreground: hsl(var(--foreground)); --color-card: hsl(var(--card)); --color-card-foreground: hsl(var(--card-foreground)); --color-primary: hsl(var(--primary)); --color-primary-foreground: hsl(var(--primary-foreground)); --color-secondary: hsl(var(--secondary)); --color-secondary-foreground: hsl(var(--secondary-foreground)); --color-muted: hsl(var(--muted)); --color-muted-foreground: hsl(var(--muted-foreground)); --color-accent: hsl(var(--accent)); --color-accent-foreground: hsl(var(--accent-foreground)); --color-destructive: hsl(var(--destructive)); --color-destructive-foreground: hsl(var(--destructive-foreground)); --color-border: hsl(var(--border)); --color-input: hsl(var(--input)); --color-ring: hsl(var(--ring)); --color-success: hsl(var(--success)); --color-warning: hsl(var(--warning)); --color-layout-sidebar: hsl(var(--layout-sidebar)); --color-layout-list-header: hsl(var(--layout-list-header)); --color-layout-list-hover: hsl(var(--layout-list-hover)); --color-layout-list-item: hsl(var(--layout-list-item)); --color-layout-list-selected: hsl(var(--layout-list-selected)); --color-layout-content: hsl(var(--layout-content)); }*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}input:where([type=text]):focus,input:where(:not([type])):focus,input:where([type=email]):focus,input:where([type=url]):focus,input:where([type=password]):focus,input:where([type=number]):focus,input:where([type=date]):focus,input:where([type=datetime-local]):focus,input:where([type=month]):focus,input:where([type=search]):focus,input:where([type=tel]):focus,input:where([type=time]):focus,input:where([type=week]):focus,select:where([multiple]):focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}select:where([multiple]),select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}input:where([type=checkbox]),input:where([type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}input:where([type=checkbox]){border-radius:0}input:where([type=radio]){border-radius:100%}input:where([type=checkbox]):focus,input:where([type=radio]):focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input:where([type=checkbox]):checked,input:where([type=radio]):checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}input:where([type=checkbox]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=checkbox]):checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}input:where([type=radio]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=radio]):checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}input:where([type=checkbox]):checked:hover,input:where([type=checkbox]):checked:focus,input:where([type=radio]):checked:hover,input:where([type=radio]):checked:focus{border-color:transparent;background-color:currentColor}input:where([type=checkbox]):indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media(forced-colors:active){input:where([type=checkbox]):indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}input:where([type=checkbox]):indeterminate:hover,input:where([type=checkbox]):indeterminate:focus{border-color:transparent;background-color:currentColor}input:where([type=file]){background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}input:where([type=file]):focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}:root{color-scheme:light;--background: 42 38.5% 94.9%;--foreground: 30 13.2% 14.9%;--card: 45 33.3% 97.6%;--card-foreground: 30 13.2% 14.9%;--popover: 45 33.3% 97.6%;--popover-foreground: 30 13.2% 14.9%;--primary: 260.6 36.1% 38%;--primary-foreground: 42 38.5% 94.9%;--secondary: 0 10.2% 90.4%;--secondary-foreground: 30 13.2% 14.9%;--muted: 18 15.6% 87.5%;--muted-foreground: 33.3 9.8% 36.1%;--accent: 324 7.5% 86.9%;--accent-foreground: 30 13.2% 14.9%;--destructive: 352 43% 49%;--destructive-foreground: 0 0% 100%;--border: 36 13.5% 85.5%;--input: 36 4% 51%;--ring: 260.6 36.1% 38%;--lineage: 260.6 36.1% 38%;--lineage-foreground: 42 38.5% 94.9%;--boundary: 202 34% 37%;--boundary-foreground: 0 0% 100%;--success: 160 48% 30%;--success-foreground: 0 0% 100%;--warning: 44 72% 36%;--warning-foreground: 0 0% 100%;--radius-xs: 2px;--radius-sm: 4px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 16px;--radius-3xl: 16px;--radius: .5rem;--layout-sidebar: 41.3 38.1% 91.8%;--layout-list-header: 42 38.5% 94.9%;--layout-list-hover: 0 10.2% 90.4%;--layout-list-item: 45 33.3% 97.6%;--layout-list-selected: 324 7.5% 86.9%;--layout-content: 42 38.5% 94.9%;--purple-medium: 260.6 36.1% 38%;--purple-deep: 261.2 35.7% 28%;--purple-light: 258 48% 84%;--control-strong: 33.3 9.8% 36.1%;--action-hover: 261 35.7% 32.9%;--action-pressed: 261.2 35.7% 28%;--tint-canvas: 0 10.2% 90.4%;--tint-sunken: 18 15.6% 87.5%;--tint-badge: 324 7.5% 86.9%;--layer-base: 0;--layer-sticky: 10;--layer-popover: 20;--layer-backdrop: 30;--layer-modal: 40;--layer-toast: 50;--scrim: 30 13.8% 11.4%}.dark{color-scheme:dark;--background: 30 13.8% 11.4%;--foreground: 42 38.5% 94.9%;--card: 30 13.2% 14.9%;--card-foreground: 42 38.5% 94.9%;--popover: 30 13.2% 14.9%;--popover-foreground: 42 38.5% 94.9%;--primary: 270 16.7% 71.8%;--primary-foreground: 30 13.8% 11.4%;--secondary: 276.9 11.7% 21.8%;--secondary-foreground: 42 38.5% 94.9%;--muted: 276.9 11.7% 21.8%;--muted-foreground: 34.3 15.8% 73.9%;--accent: 276.9 11.7% 21.8%;--accent-foreground: 42 38.5% 94.9%;--destructive: 352 43% 49%;--destructive-foreground: 0 0% 100%;--border: 30 12.3% 25.5%;--input: 32.7 9.2% 53.3%;--ring: 270 16.7% 71.8%;--lineage: 270 16.7% 71.8%;--lineage-foreground: 30 13.8% 11.4%;--boundary: 202 34% 48%;--boundary-foreground: 0 0% 100%;--success: 160 48% 42%;--success-foreground: 0 0% 100%;--warning: 44 72% 48%;--warning-foreground: 0 0% 100%;--layout-sidebar: 30 13.6% 8.6%;--layout-list-header: 30 13.8% 11.4%;--layout-list-hover: 276.9 11.7% 21.8%;--layout-list-item: 30 13.2% 14.9%;--layout-list-selected: 276.9 11.7% 21.8%;--layout-content: 30 13.8% 11.4%;--control-strong: 33.9 13.6% 66.9%;--action-hover: 271.6 16.8% 77.8%;--action-pressed: 264.4 18.8% 66.7%;--tint-canvas: 276.9 11.7% 21.8%;--tint-sunken: 276.9 11.7% 21.8%;--tint-badge: 276.9 11.7% 21.8%;--purple-medium: 270 16.7% 71.8%;--purple-deep: 264.4 18.8% 66.7%;--layer-base: 0;--layer-sticky: 10;--layer-popover: 20;--layer-backdrop: 30;--layer-modal: 40;--layer-toast: 50;--scrim: 30 13.8% 11.4%}.light{color-scheme:light;--background: 42 38.5% 94.9%;--foreground: 30 13.2% 14.9%;--card: 45 33.3% 97.6%;--card-foreground: 30 13.2% 14.9%;--popover: 45 33.3% 97.6%;--popover-foreground: 30 13.2% 14.9%;--primary: 260.6 36.1% 38%;--primary-foreground: 42 38.5% 94.9%;--secondary: 0 10.2% 90.4%;--secondary-foreground: 30 13.2% 14.9%;--muted: 18 15.6% 87.5%;--muted-foreground: 33.3 9.8% 36.1%;--accent: 324 7.5% 86.9%;--accent-foreground: 30 13.2% 14.9%;--destructive: 352 43% 49%;--destructive-foreground: 0 0% 100%;--border: 36 13.5% 85.5%;--input: 36 4% 51%;--ring: 260.6 36.1% 38%;--lineage: 260.6 36.1% 38%;--lineage-foreground: 42 38.5% 94.9%;--boundary: 202 34% 37%;--boundary-foreground: 0 0% 100%;--success: 160 48% 30%;--success-foreground: 0 0% 100%;--warning: 44 72% 36%;--warning-foreground: 0 0% 100%;--layout-sidebar: 41.3 38.1% 91.8%;--layout-list-header: 42 38.5% 94.9%;--layout-list-hover: 0 10.2% 90.4%;--layout-list-item: 45 33.3% 97.6%;--layout-list-selected: 324 7.5% 86.9%;--layout-content: 42 38.5% 94.9%;--purple-medium: 260.6 36.1% 38%;--purple-deep: 261.2 35.7% 28%;--purple-light: 258 48% 84%;--control-strong: 33.3 9.8% 36.1%;--action-hover: 261 35.7% 32.9%;--action-pressed: 261.2 35.7% 28%;--tint-canvas: 0 10.2% 90.4%;--tint-sunken: 18 15.6% 87.5%;--tint-badge: 324 7.5% 86.9%;--layer-base: 0;--layer-sticky: 10;--layer-popover: 20;--layer-backdrop: 30;--layer-modal: 40;--layer-toast: 50;--scrim: 30 13.8% 11.4%}html,body{background-color:hsl(var(--background));color:hsl(var(--foreground))}html input:where(:not([type]),[type=text],[type=email],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=url],[type=week]),html textarea,html select{border:1px solid hsl(var(--input));border-radius:calc(var(--radius) - 2px);background-color:hsl(var(--background));color:hsl(var(--foreground));caret-color:hsl(var(--foreground));--tw-ring-offset-color: hsl(var(--background))}html input::-moz-placeholder,html textarea::-moz-placeholder{color:hsl(var(--muted-foreground));opacity:1}html input::placeholder,html textarea::placeholder{color:hsl(var(--muted-foreground));opacity:1}html input:where([type=checkbox],[type=radio]){border-color:hsl(var(--input));background-color:hsl(var(--background));color:hsl(var(--primary));accent-color:hsl(var(--primary));--tw-ring-offset-color: hsl(var(--background))}html button,html input,html textarea,html select{-webkit-tap-highlight-color:transparent}html button:focus,html input:focus,html textarea:focus,html select:focus,html [role=button]:focus{outline:none}html input:-webkit-autofill,html input:-webkit-autofill:hover,html input:-webkit-autofill:focus,html input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px hsl(var(--background)) inset!important;-webkit-text-fill-color:hsl(var(--foreground))!important;caret-color:hsl(var(--foreground))!important;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s}*{border-color:hsl(var(--border))}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}html,body,#root{min-height:100%;background-color:hsl(var(--background))}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:9999px;background-color:hsl(var(--muted-foreground) / .2);-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}::-webkit-scrollbar-thumb:hover{background-color:hsl(var(--muted-foreground) / .4)}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.xpod-overlay-scrim{background-color:hsl(var(--scrim) / .45)}.warm-card{border:1px solid hsl(var(--border) / .5);border-radius:var(--radius-xl);background-color:hsl(var(--card));box-shadow:0 10px 15px -3px #0000000d,0 4px 6px -4px #0000000d;transition-property:color,background-color,border-color,box-shadow,transform;transition-duration:.3s}.type-h1{font-size:1.5rem;line-height:2rem;font-weight:600;letter-spacing:-.025em}.warm-card{border-radius:.75rem;border-width:1px;border-color:hsl(var(--border) / .5);background-color:hsl(var(--card));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: rgb(0 0 0 / .05);--tw-shadow: var(--tw-shadow-colored);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;animation-duration:.3s}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-right-1{right:-.25rem}.bottom-0{bottom:0}.bottom-0\.5{bottom:.125rem}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-1\/2{left:50%}.left-1\/4{left:25%}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-0\.5{right:.125rem}.right-1{right:.25rem}.right-1\/4{right:25%}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-10{z-index:10}.z-50{z-index:50}.z-\[10000\]{z-index:10000}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.z-\[var\(--layer-backdrop\)\]{z-index:var(--layer-backdrop)}.z-\[var\(--layer-modal\)\]{z-index:var(--layer-modal)}.z-\[var\(--layer-popover\)\]{z-index:var(--layer-popover)}.z-\[var\(--layer-sticky\)\]{z-index:var(--layer-sticky)}.z-\[var\(--layer-toast\)\]{z-index:var(--layer-toast)}.order-last{order:9999}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.m-0{margin:0}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-1{margin-left:-.25rem}.-ml-1\.5{margin-left:-.375rem}.-ml-2{margin-left:-.5rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mr-auto{margin-right:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-2\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.\!contents{display:contents!important}.contents{display:contents}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[400px\]{height:400px}.h-\[500px\]{height:500px}.h-\[600px\]{height:600px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.h-screen{height:100vh}.max-h-24{max-height:6rem}.max-h-48{max-height:12rem}.max-h-96{max-height:24rem}.max-h-\[85vh\]{max-height:85vh}.max-h-\[calc\(100dvh-2rem\)\]{max-height:calc(100dvh - 2rem)}.max-h-\[min\(70vh\,36rem\)\]{max-height:min(70vh,36rem)}.max-h-\[min\(80vh\,48rem\)\]{max-height:min(80vh,48rem)}.min-h-0{min-height:0px}.min-h-14{min-height:3.5rem}.min-h-44{min-height:11rem}.min-h-6{min-height:1.5rem}.min-h-64{min-height:16rem}.min-h-8{min-height:2rem}.min-h-\[100dvh\]{min-height:100dvh}.min-h-\[420px\]{min-height:420px}.min-h-dvh{min-height:100dvh}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[1000px\]{width:1000px}.w-\[1200px\]{width:1200px}.w-\[1px\]{width:1px}.w-\[280px\]{width:280px}.w-\[600px\]{width:600px}.w-\[800px\]{width:800px}.w-\[calc\(100vw-2rem\)\]{width:calc(100vw - 2rem)}.w-\[min\(88vw\,320px\)\]{width:min(88vw,320px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-0{min-width:0px}.min-w-48{min-width:12rem}.min-w-\[1020px\]{min-width:1020px}.min-w-\[10rem\]{min-width:10rem}.min-w-\[1180px\]{min-width:1180px}.min-w-\[720px\]{min-width:720px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[920px\]{min-width:920px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[13rem\]{max-width:13rem}.max-w-\[15rem\]{max-width:15rem}.max-w-\[180px\]{max-width:180px}.max-w-\[18rem\]{max-width:18rem}.max-w-\[19rem\]{max-width:19rem}.max-w-\[220px\]{max-width:220px}.max-w-\[240px\]{max-width:240px}.max-w-\[260px\]{max-width:260px}.max-w-\[300px\]{max-width:300px}.max-w-\[320px\]{max-width:320px}.max-w-\[65ch\]{max-width:65ch}.max-w-\[70vw\]{max-width:70vw}.max-w-\[720px\]{max-width:720px}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.basis-24{flex-basis:6rem}.basis-28{flex-basis:7rem}.basis-64{flex-basis:16rem}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[140px_1fr\]{grid-template-columns:140px 1fr}.grid-cols-\[minmax\(0\,1\.2fr\)_minmax\(0\,1fr\)_minmax\(0\,0\.8fr\)\]{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,.8fr)}.grid-cols-\[minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr)}.grid-cols-\[minmax\(12rem\,15rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(12rem,15rem) minmax(0,1fr)}.grid-rows-\[48px_minmax\(0\,1fr\)\]{grid-template-rows:48px minmax(0,1fr)}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-stretch{justify-content:stretch}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[18\%\]{border-radius:18%}.rounded-\[3px\]{border-radius:3px}.rounded-\[6px\]{border-radius:6px}.rounded-\[7px\]{border-radius:7px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0px}.border-l-2{border-left-width:2px}.border-l-\[3px\]{border-left-width:3px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-t{border-top-width:1px}.border-border{border-color:hsl(var(--border))}.border-border\/20{border-color:hsl(var(--border) / .2)}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-border\/70{border-color:hsl(var(--border) / .7)}.border-destructive\/30{border-color:hsl(var(--destructive) / .3)}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-green-500\/20{border-color:#22c55e33}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-primary-foreground{border-color:hsl(var(--primary-foreground))}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-primary\/30{border-color:hsl(var(--primary) / .3)}.border-primary\/40{border-color:hsl(var(--primary) / .4)}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-success\/30{border-color:hsl(var(--success) / .3)}.border-success\/40{border-color:hsl(var(--success) / .4)}.border-transparent{border-color:transparent}.border-warning\/40{border-color:hsl(var(--warning) / .4)}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-white\/80{border-color:#fffc}.border-zinc-200{--tw-border-opacity: 1;border-color:rgb(228 228 231 / var(--tw-border-opacity, 1))}.border-zinc-200\/50{border-color:#e4e4e780}.border-l-primary{border-left-color:hsl(var(--primary))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[\#7C4DFF\]{--tw-bg-opacity: 1;background-color:rgb(124 77 255 / var(--tw-bg-opacity, 1))}.bg-\[\#7C4DFF\]\/10{background-color:#7c4dff1a}.bg-accent{background-color:hsl(var(--accent))}.bg-accent\/80{background-color:hsl(var(--accent) / .8)}.bg-background{background-color:hsl(var(--background))}.bg-background\/70{background-color:hsl(var(--background) / .7)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/50{background-color:#00000080}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-destructive\/5{background-color:hsl(var(--destructive) / .05)}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/5{background-color:#10b9810d}.bg-green-500\/15{background-color:#22c55e26}.bg-layout-content{background-color:hsl(var(--layout-content))}.bg-layout-sidebar{background-color:hsl(var(--layout-sidebar))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground\/40{background-color:hsl(var(--muted-foreground) / .4)}.bg-muted-foreground\/50{background-color:hsl(var(--muted-foreground) / .5)}.bg-muted-foreground\/60{background-color:hsl(var(--muted-foreground) / .6)}.bg-muted\/10{background-color:hsl(var(--muted) / .1)}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/25{background-color:hsl(var(--muted) / .25)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-muted\/60{background-color:hsl(var(--muted) / .6)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-primary\/\[0\.03\]{background-color:hsl(var(--primary) / .03)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-500{--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity, 1))}.bg-success{background-color:hsl(var(--success))}.bg-success\/10{background-color:hsl(var(--success) / .1)}.bg-success\/15{background-color:hsl(var(--success) / .15)}.bg-transparent{background-color:transparent}.bg-warning\/10{background-color:hsl(var(--warning) / .1)}.bg-warning\/15{background-color:hsl(var(--warning) / .15)}.bg-warning\/60{background-color:hsl(var(--warning) / .6)}.bg-warning\/70{background-color:hsl(var(--warning) / .7)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/70{background-color:#ffffffb3}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity, 1))}.bg-zinc-50{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-\[\#7C4DFF\]\/10{--tw-gradient-from: rgb(124 77 255 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(124 77 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-\[\#7C4DFF\]\/5{--tw-gradient-to: rgb(124 77 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(124 77 255 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-zinc-50{--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-7{padding-top:1.75rem;padding-bottom:1.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-32{padding-top:8rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-7{padding-top:1.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.font-sans{font-family:Inter,system-ui,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[15px\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#7C4DFF\]{--tw-text-opacity: 1;color:rgb(124 77 255 / var(--tw-text-opacity, 1))}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-border{color:hsl(var(--border))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-500{--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-destructive\/60{color:hsl(var(--destructive) / .6)}.text-destructive\/70{color:hsl(var(--destructive) / .7)}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/70{color:hsl(var(--foreground) / .7)}.text-foreground\/80{color:hsl(var(--foreground) / .8)}.text-foreground\/85{color:hsl(var(--foreground) / .85)}.text-foreground\/90{color:hsl(var(--foreground) / .9)}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-muted-foreground\/70{color:hsl(var(--muted-foreground) / .7)}.text-muted-foreground\/80{color:hsl(var(--muted-foreground) / .8)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/80{color:hsl(var(--primary) / .8)}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sky-500{--tw-text-opacity: 1;color:rgb(14 165 233 / var(--tw-text-opacity, 1))}.text-success{color:hsl(var(--success))}.text-teal-500{--tw-text-opacity: 1;color:rgb(20 184 166 / var(--tw-text-opacity, 1))}.text-warning{color:hsl(var(--warning))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-zinc-400{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.text-zinc-600{--tw-text-opacity: 1;color:rgb(82 82 91 / var(--tw-text-opacity, 1))}.text-zinc-900{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-primary{accent-color:hsl(var(--primary))}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[-16px_0_30px_rgba\(15\,23\,42\,0\.08\)\]{--tw-shadow: -16px 0 30px rgba(15,23,42,.08);--tw-shadow-colored: -16px 0 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[16px_0_30px_rgba\(15\,23\,42\,0\.08\)\]{--tw-shadow: 16px 0 30px rgba(15,23,42,.08);--tw-shadow-colored: 16px 0 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-black\/5{--tw-shadow-color: rgb(0 0 0 / .05);--tw-shadow: var(--tw-shadow-colored)}.shadow-destructive\/20{--tw-shadow-color: hsl(var(--destructive) / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary\/20{--tw-shadow-color: hsl(var(--primary) / .2);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[100px\]{--tw-blur: blur(100px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[120px\]{--tw-blur: blur(120px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[150px\]{--tw-blur: blur(150px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[border-color\]{transition-property:border-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[color\,font-size\,top\,transform\]{transition-property:color,font-size,top,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.\!paused{animation-play-state:paused!important}.paused{animation-play-state:paused}.w-compact-modal{width:280px}.h-compact-modal{height:400px}.selection\:bg-\[\#7C4DFF\]\/20 *::-moz-selection{background-color:#7c4dff33}.selection\:bg-\[\#7C4DFF\]\/20 *::selection{background-color:#7c4dff33}.selection\:bg-\[\#7C4DFF\]\/20::-moz-selection{background-color:#7c4dff33}.selection\:bg-\[\#7C4DFF\]\/20::selection{background-color:#7c4dff33}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\:rounded-t-xl:first-child{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.first\:border-t-0:first-child{border-top-width:0px}.first\:pt-0:first-child{padding-top:0}.last\:rounded-b-xl:last-child{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.last\:border-0:last-child{border-width:0px}.last\:border-b-0:last-child{border-bottom-width:0px}.first-of-type\:rounded-t-xl:first-of-type{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.last-of-type\:rounded-b-xl:last-of-type{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.hover\:border-\[\#7C4DFF\]\/50:hover{border-color:#7c4dff80}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:border-border\/60:hover{border-color:hsl(var(--border) / .6)}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary) / .5)}.hover\:bg-\[\#6B3FE8\]:hover{--tw-bg-opacity: 1;background-color:rgb(107 63 232 / var(--tw-bg-opacity, 1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/30:hover{background-color:hsl(var(--accent) / .3)}.hover\:bg-accent\/60:hover{background-color:hsl(var(--accent) / .6)}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-muted\/80:hover{background-color:hsl(var(--muted) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-zinc-200:hover{--tw-bg-opacity: 1;background-color:rgb(228 228 231 / var(--tw-bg-opacity, 1))}.hover\:text-\[\#6B3FE8\]:hover{--tw-text-opacity: 1;color:rgb(107 63 232 / var(--tw-text-opacity, 1))}.hover\:text-\[\#7C4DFF\]:hover{--tw-text-opacity: 1;color:rgb(124 77 255 / var(--tw-text-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-zinc-900:hover{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:border-primary\/50:focus{border-color:hsl(var(--primary) / .5)}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-background:focus{background-color:hsl(var(--background))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:border-primary:focus-visible{border-color:hsl(var(--primary))}.focus-visible\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\:bg-accent:focus-visible{background-color:hsl(var(--accent))}.focus-visible\:bg-accent\/70:focus-visible{background-color:hsl(var(--accent) / .7)}.focus-visible\:bg-background:focus-visible{background-color:hsl(var(--background))}.focus-visible\:bg-destructive\/80:focus-visible{background-color:hsl(var(--destructive) / .8)}.focus-visible\:bg-muted:focus-visible{background-color:hsl(var(--muted))}.focus-visible\:bg-muted\/40:focus-visible{background-color:hsl(var(--muted) / .4)}.focus-visible\:bg-muted\/50:focus-visible{background-color:hsl(var(--muted) / .5)}.focus-visible\:bg-muted\/60:focus-visible{background-color:hsl(var(--muted) / .6)}.focus-visible\:bg-primary\/80:focus-visible{background-color:hsl(var(--primary) / .8)}.focus-visible\:bg-secondary\/70:focus-visible{background-color:hsl(var(--secondary) / .7)}.focus-visible\:text-accent-foreground:focus-visible{color:hsl(var(--accent-foreground))}.focus-visible\:text-foreground:focus-visible{color:hsl(var(--foreground))}.focus-visible\:underline:focus-visible{text-decoration-line:underline}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-ring:focus-visible{outline-color:hsl(var(--ring))}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.active\:translate-y-px:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:cursor-grabbing:active{cursor:grabbing}.enabled\:cursor-grab:enabled{cursor:grab}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group[open] .group-open\:rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:focus-within .group-focus-within\:opacity-100{opacity:1}.group:hover .group-hover\:text-primary{color:hsl(var(--primary))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:-moz-placeholder~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:placeholder-shown~.peer-placeholder-shown\:top-1\/2{top:50%}.peer:-moz-placeholder~.peer-placeholder-shown\:-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:placeholder-shown~.peer-placeholder-shown\:-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:-moz-placeholder~.peer-placeholder-shown\:text-sm{font-size:.875rem;line-height:1.25rem}.peer:placeholder-shown~.peer-placeholder-shown\:text-sm{font-size:.875rem;line-height:1.25rem}.peer:focus~.peer-focus\:top-0{top:0}.peer:focus~.peer-focus\:-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:text-xs{font-size:.75rem;line-height:1rem}.peer:focus~.peer-focus\:text-ring{color:hsl(var(--ring))}.peer:disabled~.peer-disabled\:opacity-50{opacity:.5}.has-\[\[data-presentation\=compact\]\]\:pt-5:has([data-presentation=compact]){padding-top:1.25rem}.aria-\[current\=page\]\:bg-accent[aria-current=page]{background-color:hsl(var(--accent))}.aria-\[current\=page\]\:font-medium[aria-current=page]{font-weight:500}.peer[aria-invalid=true]~.peer-aria-\[invalid\=true\]\:text-destructive{color:hsl(var(--destructive))}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=unchecked\]\:bg-muted\/50[data-state=unchecked]{background-color:hsl(var(--muted) / .5)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-left-full[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-left-full[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-right-full[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}@media(prefers-reduced-motion:reduce){.motion-reduce\:animate-none{animation:none}}.dark\:border-success\/40:is(.dark *){border-color:hsl(var(--success) / .4)}.dark\:border-warning\/40:is(.dark *){border-color:hsl(var(--warning) / .4)}.dark\:border-zinc-900\/80:is(.dark *){border-color:#18181bcc}.dark\:bg-success\/20:is(.dark *){background-color:hsl(var(--success) / .2)}.dark\:bg-success\/40:is(.dark *){background-color:hsl(var(--success) / .4)}.dark\:bg-warning\/20:is(.dark *){background-color:hsl(var(--warning) / .2)}.dark\:bg-warning\/40:is(.dark *){background-color:hsl(var(--warning) / .4)}.dark\:text-emerald-400:is(.dark *){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.dark\:text-primary:is(.dark *){color:hsl(var(--primary))}.dark\:text-success:is(.dark *){color:hsl(var(--success))}.dark\:text-warning:is(.dark *){color:hsl(var(--warning))}@media not all and (min-width:768px){.max-md\:inline-flex{display:inline-flex}.max-md\:hidden{display:none}.max-md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-md\:border-r-0{border-right-width:0px}}@media(min-width:640px){.sm\:order-none{order:0}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-\[232px\]{width:232px}.sm\:w-auto{width:auto}.sm\:max-w-\[45\%\]{max-width:45%}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xs{max-width:20rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr}.sm\:grid-cols-\[minmax\(0\,1fr\)_4\.5rem\]{grid-template-columns:minmax(0,1fr) 4.5rem}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:self-start{align-self:flex-start}.sm\:p-6{padding:1.5rem}.sm\:p-8{padding:2rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:py-8{padding-top:2rem;padding-bottom:2rem}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}}@media(min-width:768px){.md\:col-start-2{grid-column-start:2}.md\:row-start-1{grid-row-start:1}.md\:mb-2{margin-bottom:.5rem}.md\:ml-2{margin-left:.5rem}.md\:mr-0{margin-right:0}.md\:mt-5{margin-top:1.25rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:min-h-full{min-height:100%}.md\:w-\[calc\(100\%-1rem\)\]{width:calc(100% - 1rem)}.md\:w-full{width:100%}.md\:flex-none{flex:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[184px_minmax\(0\,1fr\)\]{grid-template-columns:184px minmax(0,1fr)}.md\:grid-rows-\[minmax\(0\,1fr\)\]{grid-template-rows:minmax(0,1fr)}.md\:flex-col{flex-direction:column}.md\:items-stretch{align-items:stretch}.md\:justify-start{justify-content:flex-start}.md\:gap-1{gap:.25rem}.md\:border-r{border-right-width:1px}.md\:px-0{padding-left:0;padding-right:0}.md\:py-4{padding-top:1rem;padding-bottom:1rem}.md\:text-7xl{font-size:4.5rem;line-height:1}}@media(min-width:900px){.min-\[900px\]\:mx-0{margin-left:0;margin-right:0}.min-\[900px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.min-\[900px\]\:gap-16{gap:4rem}}@media(min-width:1024px){.lg\:mx-0{margin-left:0;margin-right:0}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:shrink-0{flex-shrink:0}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[170px_140px_140px_1fr_auto\]{grid-template-columns:170px 140px 140px 1fr auto}.lg\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.lg\:grid-cols-\[minmax\(220px\,1fr\)_minmax\(320px\,440px\)\]{grid-template-columns:minmax(220px,1fr) minmax(320px,440px)}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:justify-between{justify-content:space-between}.lg\:gap-16{gap:4rem}.lg\:self-start{align-self:flex-start}.lg\:p-8{padding:2rem}.lg\:text-right{text-align:right}}@media(min-width:1280px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:text-3xl{font-size:1.875rem;line-height:2.25rem}}.\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\>div\]\:\!block>div{display:block!important}.\[\&\>div\]\:\!w-full>div{width:100%!important}.\[\&\>div\]\:\!min-w-0>div{min-width:0px!important}.\[\&\>span\+span\]\:ml-3>span+span{margin-left:.75rem}
@@ -1,4 +1,4 @@
1
- import{r as requireEvents,_ as __vitePreload,v as v4}from"./inrupt-smoke.js";import{g as getDefaultExportFromCjs}from"./_commonjsHelpers-B-UnjaXt.js";const urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",generateNanoId=(n=21)=>{let e="";if(typeof globalThis.crypto<"u"&&typeof globalThis.crypto.getRandomValues=="function"){const t=globalThis.crypto.getRandomValues(new Uint8Array(n));for(let r=0;r<n;r++)e+=urlAlphabet[t[r]%urlAlphabet.length]}else{console.warn("Using Math.random fallback for NanoID generation.");for(let t=0;t<n;t++)e+=urlAlphabet[Math.floor(Math.random()*256)%urlAlphabet.length]}return e},hasStringValue$2=n=>typeof n=="object"&&n!==null&&typeof n.value=="string",hasTermValue=n=>typeof n=="object"&&n!==null&&typeof n.term=="object"&&n.term!==null&&typeof n.term?.value=="string",resolveTermIri=n=>{if(typeof n=="string")return n;if(hasStringValue$2(n))return n.value;if(hasTermValue(n))return n.term.value;throw new Error("Term must be a string or VocabTerm with a string value")},entityKind=Symbol.for("drizzle:entityKind");function is(n,e){if(!n||typeof n!="object")return!1;if(n instanceof e)return!0;if(!Object.prototype.hasOwnProperty.call(e,entityKind))throw new Error(`Class "${e.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let t=n.constructor;if(t)for(;t;){if(entityKind in t&&t[entityKind]===e[entityKind])return!0;t=Object.getPrototypeOf(t)}return!1}class Column{table;static[entityKind]="Column";name;primary;notNull;default;defaultFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;config;constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}}const ViewBaseConfig=Symbol.for("drizzle:ViewBaseConfig");class View{static[entityKind]="View";[ViewBaseConfig];constructor({name:e,schema:t,selectedFields:r,query:i}){this[ViewBaseConfig]={name:e,originalName:e,schema:t,selectedFields:r,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new SQL([this])}}const SubqueryConfig=Symbol.for("drizzle:SubqueryConfig");class Subquery{static[entityKind]="Subquery";[SubqueryConfig];constructor(e,t,r,i=!1){this[SubqueryConfig]={sql:e,selection:t,alias:r,isWith:i}}getSQL(){return new SQL([this])}}class SelectionProxyHandler{static[entityKind]="SelectionProxyHandler";config;constructor(e){this.config={...e}}get(e,t){if(t===SubqueryConfig)return{...e[SubqueryConfig],selection:new Proxy(e[SubqueryConfig].selection,this)};if(t===ViewBaseConfig)return{...e[ViewBaseConfig],selectedFields:new Proxy(e[ViewBaseConfig].selectedFields,this)};if(typeof t=="symbol")return e[t];const i=(is(e,Subquery)?e[SubqueryConfig].selection:is(e,View)?e[ViewBaseConfig].selectedFields:e)[t];if(is(i,SQL.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!i.isSelectionField)return i.sql;const s=i.clone();return s.isSelectionField=!0,s}if(is(i,SQL)){if(this.config.sqlBehavior==="sql")return i;throw new Error(`You tried to reference "${t}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return is(i,Column)?this.config.alias?new Proxy(i,new ColumnAliasProxyHandler(new Proxy(i.table,new TableAliasProxyHandler(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!="object"||i===null?i:new Proxy(i,new SelectionProxyHandler(this.config))}}function orderSelectedFields(n,e){return Object.entries(n).reduce((t,[r,i])=>{if(typeof r!="string")return t;const s=e?[...e,r]:[r];return is(i,Column)||is(i,SQL)||is(i,SQL.Aliased)?t.push({path:s,field:i}):is(i,Table)?t.push(...orderSelectedFields(i[Table.Symbol.Columns],s)):t.push(...orderSelectedFields(i,s)),t},[])}function applyMixins(n,e){for(const t of e)for(const r of Object.getOwnPropertyNames(t.prototype))Object.defineProperty(n.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r)||Object.create(null))}function getTableLikeName(n){return is(n,Subquery)?n[SubqueryConfig].alias:is(n,View)?n[ViewBaseConfig].name:is(n,SQL)?void 0:n[Table.Symbol.IsAlias]?n[Table.Symbol.Name]:n[Table.Symbol.BaseName]}const TableName=Symbol.for("drizzle:Name"),Schema=Symbol.for("drizzle:Schema"),Columns=Symbol.for("drizzle:Columns"),OriginalName=Symbol.for("drizzle:OriginalName"),BaseName=Symbol.for("drizzle:BaseName"),IsAlias=Symbol.for("drizzle:IsAlias"),ExtraConfigBuilder=Symbol.for("drizzle:ExtraConfigBuilder"),IsDrizzleTable=Symbol.for("drizzle:IsDrizzleTable");class Table{static[entityKind]="Table";static Symbol={Name:TableName,Schema,OriginalName,Columns,BaseName,IsAlias,ExtraConfigBuilder};[TableName];[OriginalName];[Schema];[Columns];[BaseName];[IsAlias]=!1;[ExtraConfigBuilder]=void 0;[IsDrizzleTable]=!0;constructor(e,t,r){this[TableName]=this[OriginalName]=e,this[Schema]=t,this[BaseName]=r}getSQL(){return new SQL([this])}}class QueryPromise{static[entityKind]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}then(e,t){return this.execute().then(e,t)}}const tracer={startActiveSpan(n,e){return e()}},InlineForeignKeys=Symbol.for("drizzle:PgInlineForeignKeys");class PgTable extends Table{static[entityKind]="PgTable";static Symbol=Object.assign({},Table.Symbol,{InlineForeignKeys});[InlineForeignKeys]=[];[Table.Symbol.ExtraConfigBuilder]=void 0}class TypedQueryBuilder{static[entityKind]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}}class PgSelectQueryBuilder extends TypedQueryBuilder{static[entityKind]="PgSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;constructor({table:e,fields:t,isPartialSelect:r,session:i,dialect:s,withList:o,distinct:a}){super(),this.config={withList:o,table:e,fields:{...t},distinct:a},this.isPartialSelect=r,this.session=i,this.dialect=s,this._={selectedFields:t},this.tableName=getTableLikeName(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(t,r)=>{const i=this.tableName,s=getTableLikeName(t);if(typeof s=="string"&&this.config.joins?.some(o=>o.alias===s))throw new Error(`Alias "${s}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof i=="string"&&(this.config.fields={[i]:this.config.fields}),typeof s=="string"&&!is(t,SQL))){const o=is(t,Subquery)?t[SubqueryConfig].selection:is(t,View)?t[ViewBaseConfig].selectedFields:t[Table.Symbol.Columns];this.config.fields[s]=o}if(typeof r=="function"&&(r=r(new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:t,joinType:e,alias:s}),typeof s=="string")switch(e){case"left":{this.joinsNotNullableMap[s]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!0;break}case"inner":{this.joinsNotNullableMap[s]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!1;break}}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const t=e[0](new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(t)?t:[t]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const t=e[0](new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.orderBy=Array.isArray(t)?t:[t]}else this.config.orderBy=e;return this}limit(e){return this.config.limit=e,this}offset(e){return this.config.offset=e,this}for(e,t={}){return this.config.lockingClauses||(this.config.lockingClauses=[]),this.config.lockingClauses.push({strength:e,config:t}),this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}as(e){return new Proxy(new Subquery(this.getSQL(),this.config.fields,e),new SelectionProxyHandler({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}class PgSelect extends PgSelectQueryBuilder{static[entityKind]="PgSelect";_prepare(e){const{session:t,config:r,dialect:i,joinsNotNullableMap:s}=this;if(!t)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");return tracer.startActiveSpan("drizzle.prepareQuery",()=>{const o=orderSelectedFields(r.fields),a=t.prepareQuery(i.sqlToQuery(this.getSQL()),o,e);return a.joinsNotNullableMap=s,a})}prepare(e){return this._prepare(e)}execute=e=>tracer.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e))}applyMixins(PgSelect,[QueryPromise]);class Relation{sourceTable;referencedTable;relationName;static[entityKind]="Relation";referencedTableName;fieldName;constructor(e,t,r){this.sourceTable=e,this.referencedTable=t,this.relationName=r,this.referencedTableName=t[Table.Symbol.Name]}}function isSQLWrapper(n){return typeof n=="object"&&n!==null&&"getSQL"in n&&typeof n.getSQL=="function"}function mergeQueries(n){const e={sql:"",params:[]};for(const t of n)e.sql+=t.sql,e.params.push(...t.params),t.typings?.length&&(e.typings||(e.typings=[]),e.typings.push(...t.typings));return e}class StringChunk{static[entityKind]="StringChunk";value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new SQL([this])}}class SQL{queryChunks;static[entityKind]="SQL";decoder=noopDecoder;shouldInlineParams=!1;constructor(e){this.queryChunks=e}append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return tracer.startActiveSpan("drizzle.buildSQL",t=>{const r=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(e,t){const r=Object.assign({},t,{inlineParams:t.inlineParams||this.shouldInlineParams,paramStartIndex:t.paramStartIndex||{value:0}}),{escapeName:i,escapeParam:s,prepareTyping:o,inlineParams:a,paramStartIndex:l}=r;return mergeQueries(e.map(c=>{if(is(c,StringChunk))return{sql:c.value.join(""),params:[]};if(is(c,Name))return{sql:i(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const u=[new StringChunk("(")];for(const[f,d]of c.entries())u.push(d),f<c.length-1&&u.push(new StringChunk(", "));return u.push(new StringChunk(")")),this.buildQueryFromSourceParams(u,r)}if(is(c,SQL))return this.buildQueryFromSourceParams(c.queryChunks,{...r,inlineParams:a||c.shouldInlineParams});if(is(c,Table)){const u=c[Table.Symbol.Schema],f=c[Table.Symbol.Name];return{sql:u===void 0?i(f):i(u)+"."+i(f),params:[]}}if(is(c,Column))return{sql:i(c.table[Table.Symbol.Name])+"."+i(c.name),params:[]};if(is(c,View)){const u=c[ViewBaseConfig].schema,f=c[ViewBaseConfig].name;return{sql:u===void 0?i(f):i(u)+"."+i(f),params:[]}}if(is(c,Param)){const u=c.value===null?null:c.encoder.mapToDriverValue(c.value);if(is(u,SQL))return this.buildQueryFromSourceParams([u],r);if(a)return{sql:this.mapInlineParam(u,r),params:[]};let f;return o!==void 0&&(f=[o(c.encoder)]),{sql:s(l.value++,u),params:[u],typings:f}}return is(c,Placeholder)?{sql:s(l.value++,c),params:[c]}:is(c,SQL.Aliased)&&c.fieldAlias!==void 0?{sql:i(c.fieldAlias),params:[]}:is(c,Subquery)?c[SubqueryConfig].isWith?{sql:i(c[SubqueryConfig].alias),params:[]}:this.buildQueryFromSourceParams([new StringChunk("("),c[SubqueryConfig].sql,new StringChunk(") "),new Name(c[SubqueryConfig].alias)],r):isSQLWrapper(c)?this.buildQueryFromSourceParams([new StringChunk("("),c.getSQL(),new StringChunk(")")],r):is(c,Relation)?this.buildQueryFromSourceParams([c.sourceTable,new StringChunk("."),sql.identifier(c.fieldName)],r):a?{sql:this.mapInlineParam(c,r),params:[]}:{sql:s(l.value++,c),params:[c]}}))}mapInlineParam(e,{escapeString:t}){if(e===null)return"null";if(typeof e=="number"||typeof e=="boolean")return e.toString();if(typeof e=="string")return t(e);if(typeof e=="object"){const r=e.toString();return t(r==="[object Object]"?JSON.stringify(e):r)}throw new Error("Unexpected param value: "+e)}getSQL(){return this}as(e){return e===void 0?this:new SQL.Aliased(this,e)}mapWith(e){return this.decoder=typeof e=="function"?{mapFromDriverValue:e}:e,this}inlineParams(){return this.shouldInlineParams=!0,this}}class Name{value;static[entityKind]="Name";brand;constructor(e){this.value=e}getSQL(){return new SQL([this])}}const noopDecoder={mapFromDriverValue:n=>n},noopEncoder={mapToDriverValue:n=>n};({...noopDecoder,...noopEncoder});class Param{value;encoder;static[entityKind]="Param";brand;constructor(e,t=noopEncoder){this.value=e,this.encoder=t}getSQL(){return new SQL([this])}}function sql(n,...e){const t=[];(e.length>0||n.length>0&&n[0]!=="")&&t.push(new StringChunk(n[0]));for(const[r,i]of e.entries())t.push(i,new StringChunk(n[r+1]));return new SQL(t)}(function(n){function e(){return new SQL([])}n.empty=e;function t(l){return new SQL(l)}n.fromList=t;function r(l){return new SQL([new StringChunk(l)])}n.raw=r;function i(l,c){const u=[];for(const[f,d]of l.entries())f>0&&c!==void 0&&u.push(c),u.push(d);return new SQL(u)}n.join=i;function s(l){return new Name(l)}n.identifier=s;function o(l){return new Placeholder(l)}n.placeholder=o;function a(l,c){return new Param(l,c)}n.param=a})(sql||(sql={}));(function(n){class e{sql;fieldAlias;static[entityKind]="SQL.Aliased";isSelectionField=!1;constructor(r,i){this.sql=r,this.fieldAlias=i}getSQL(){return this.sql}clone(){return new e(this.sql,this.fieldAlias)}}n.Aliased=e})(SQL||(SQL={}));class Placeholder{name;static[entityKind]="Placeholder";constructor(e){this.name=e}getSQL(){return new SQL([this])}}Column.prototype.getSQL=function(){return new SQL([this])};class ColumnAliasProxyHandler{table;static[entityKind]="ColumnAliasProxyHandler";constructor(e){this.table=e}get(e,t){return t==="table"?this.table:e[t]}}class TableAliasProxyHandler{alias;replaceOriginalName;static[entityKind]="TableAliasProxyHandler";constructor(e,t){this.alias=e,this.replaceOriginalName=t}get(e,t){if(t===Table.Symbol.IsAlias)return!0;if(t===Table.Symbol.Name)return this.alias;if(this.replaceOriginalName&&t===Table.Symbol.OriginalName)return this.alias;if(t===ViewBaseConfig)return{...e[ViewBaseConfig],name:this.alias,isAlias:!0};if(t===Table.Symbol.Columns){const i=e[Table.Symbol.Columns];if(!i)return i;const s={};return Object.keys(i).map(o=>{s[o]=new Proxy(i[o],new ColumnAliasProxyHandler(new Proxy(e,this)))}),s}const r=e[t];return is(r,Column)?new Proxy(r,new ColumnAliasProxyHandler(new Proxy(e,this))):r}}var _a$b;class ColumnBuilder{constructor(e,t,r={},i,s){this.name=e,this.dataType=t,this.options={...r},this._predicateUri=i,this.elementType=s??null}formatValue(e){if(e==null)throw new Error("Cannot format null or undefined value");if(this.options.isArray){if(!Array.isArray(e))throw new Error("Array column requires array value");return e.map(t=>this.formatSingleValue(t))}return this.formatSingleValue(e)}formatSingleValue(e){const t=this.options.isArray&&this.elementType?this.elementType:this.dataType;if(this.options.linkTarget&&typeof e=="string")return`<${e}>`;switch(t){case"string":return`"${String(e).replace(/"/g,'"')}"`;case"integer":return String(Number(e));case"boolean":return`"${e}"^^<http://www.w3.org/2001/XMLSchema#boolean>`;case"datetime":return`"${(e instanceof Date?e:new Date(e)).toISOString()}"^^<http://www.w3.org/2001/XMLSchema#dateTime>`;case"json":case"object":return`"${JSON.stringify(e).replace(/"/g,'"')}"^^<http://www.w3.org/2001/XMLSchema#json>`;case"uri":if(typeof e!="string"||!e.includes(":"))throw new Error(`URI column requires valid IRI, got: ${e}`);return`<${e}>`;default:return`"${String(e).replace(/"/g,'"')}"`}}parseValue(e,t){return this.parseSingleValue(e,t)}parseSingleValue(e,t){if(!t)return e;if(t.includes("#integer")||t.includes("#int"))return parseInt(e,10);if(t.includes("#decimal")||t.includes("#double"))return parseFloat(e);if(t.includes("#boolean"))return e==="true";if(t.includes("#dateTime"))return new Date(e);if(t.includes("#json"))try{return JSON.parse(e)}catch{return console.warn("Failed to parse JSON value:",e),e}return e.startsWith("http://")||e.startsWith("https://"),e}primaryKey(){return this._predicateUri="@id",this.options={...this.options,primaryKey:!0,required:!0,predicate:"@id"},this}notNull(){return this.options={...this.options,required:!0,notNull:!0},this}predicate(e){const t=resolveTermIri(e);return this._predicateUri=t,this.options={...this.options,predicate:t},this}default(e){return this.options={...this.options,defaultValue:e},this}defaultNow(){return this.options={...this.options,defaultValue:()=>new Date},this}inverse(e=!0){return this.options={...this.options,inverse:e},this}link(e){return typeof e=="string"?e.startsWith("http://")||e.startsWith("https://")?this.options={...this.options,linkTarget:e}:this.options={...this.options,linkTableName:e}:this.options={...this.options,linkTable:e},this}array(){return new ColumnBuilder(this.name,"array",{...this.options,baseType:this.dataType,isArray:!0},this._predicateUri,this.dataType)}getPredicateUri(){return this._predicateUri}}class PodColumnBase{constructor(e,t,r={},i){this.name=e,this.dataType=t,this.options=r,this.tableName=i}getPredicate(e){if(this.options.predicate)return this.options.predicate;if(e)return`${e.uri}${this.name}`;throw new Error(`Missing predicate for column "${this.name}"; please set namespace or predicate explicitly.`)}isLink(){return!!(this.options.linkTarget||this.options.linkTableName||this.options.linkTable)}getLinkTarget(){return this.options.linkTarget}getLinkTableName(){return this.options.linkTableName}getLinkTable(){return this.options.linkTable}primaryKey(){return this.options.primaryKey=!0,this.options.required=!0,this.options.predicate="@id",this}notNull(){return this.options.required=!0,this}default(e){return this.options.defaultValue=e,this}predicate(e){return this.options.predicate=resolveTermIri(e),this}link(e){return typeof e=="string"?e.startsWith("http://")||e.startsWith("https://")?this.options.linkTarget=e:this.options.linkTableName=e:this.options.linkTable=e,this}inverse(e=!0){return this.options.inverse=e,this}isInverse(){return this.options.inverse===!0}formatValue(e){if(e==null)throw new Error("Cannot format null or undefined value");if(this.options.isArray){if(!Array.isArray(e))throw new Error("Array column requires array value");return e.map(t=>this.formatSingleValue(t))}return this.formatSingleValue(e)}formatSingleValue(e){if(this.options.linkTarget&&typeof e=="string")return`<${e}>`;switch(this.dataType){case"string":return`"${String(e).replace(/"/g,'"')}"`;case"integer":return`"${Number(e)}"^^<http://www.w3.org/2001/XMLSchema#integer>`;case"boolean":return`"${e}"^^<http://www.w3.org/2001/XMLSchema#boolean>`;case"datetime":return`"${(e instanceof Date?e:new Date(e)).toISOString()}"^^<http://www.w3.org/2001/XMLSchema#dateTime>`;case"json":case"object":return`"${JSON.stringify(e).replace(/"/g,'"')}"^^<http://www.w3.org/2001/XMLSchema#json>`;case"uri":if(typeof e!="string"||!e.includes(":"))throw new Error(`URI column requires valid IRI, got: ${e}`);return`<${e}>`;default:return`"${String(e).replace(/"/g,'"')}"`}}}_a$b=entityKind;PodColumnBase[_a$b]="PodColumn";class PodStringColumn extends PodColumnBase{constructor(e,t={}){super(e,"string",t)}}class PodIntegerColumn extends PodColumnBase{constructor(e,t={}){super(e,"integer",t)}}class PodBooleanColumn extends PodColumnBase{constructor(e,t={}){super(e,"boolean",t)}}class PodDateTimeColumn extends PodColumnBase{constructor(e,t={}){super(e,"datetime",t)}}class PodJsonColumn extends PodColumnBase{constructor(e,t={}){super(e,"json",t)}}class PodObjectColumn extends PodColumnBase{constructor(e,t={}){super(e,"object",t)}}class PodUriColumn extends PodColumnBase{constructor(e,t={}){super(e,"uri",t)}}class PodArrayColumn extends PodColumnBase{constructor(e,t,r={}){super(e,"array",r),this.elementType=t}}function boolean$2(n,e={}){return new ColumnBuilder(n,"boolean",e)}function timestamp(n,e={}){return new ColumnBuilder(n,"datetime",e)}function json(n,e={}){return new ColumnBuilder(n,"json",e)}function object$1(n,e={}){return new ColumnBuilder(n,"object",e)}function uri(n,e={}){return new ColumnBuilder(n,"uri",e)}function iri(n,e={}){return uri(n,e)}function id(n="id",e={}){const t=new PodStringColumn(n,{...e,predicate:"@id",primaryKey:!0,required:!0,...e.defaultValue!==void 0?{defaultValue:e.defaultValue}:{}});return t._virtualId=!0,t}function string$2(n,e={}){return new ColumnBuilder(n,"string",e)}function int$1(n,e={}){return new ColumnBuilder(n,"integer",e)}function integer$1(n,e={}){return new ColumnBuilder(n,"integer",e)}function date$3(n,e={}){return new ColumnBuilder(n,"datetime",e)}function datetime$2(n,e={}){return new ColumnBuilder(n,"datetime",e)}function text(n,e={}){return new ColumnBuilder(n,"string",e)}function varchar(n,e={}){return new ColumnBuilder(n,"string",e)}function char(n,e={}){return new ColumnBuilder(n,"string",e)}function bigint(n,e={}){return new ColumnBuilder(n,"integer",e)}function smallint(n,e={}){return new ColumnBuilder(n,"integer",e)}function tinyint(n,e={}){return new ColumnBuilder(n,"integer",e)}function mediumint(n,e={}){return new ColumnBuilder(n,"integer",e)}function serial(n,e={}){return new ColumnBuilder(n,"integer",e)}function real(n,e={}){return new ColumnBuilder(n,"integer",e)}function decimal(n,e={}){return new ColumnBuilder(n,"integer",e)}function numeric(n,e={}){return new ColumnBuilder(n,"integer",e)}function float(n,e={}){return new ColumnBuilder(n,"integer",e)}function double(n,e={}){return new ColumnBuilder(n,"integer",e)}function jsonb(n,e={}){return new ColumnBuilder(n,"json",e)}function validateColumnOverride(n,e,t){const r=n.getPredicateUri?.()??n.options?.predicate,i=e.options?.predicate;if(r&&i&&r!==i)throw new Error(`Schema 继承错误: 不能修改 "${t}" 列的 predicate。父 schema 定义为 "${i}",子 schema 尝试改为 "${r}"。子类只能添加约束(notNull, default),不能更改 predicate。`)}function mergeSchemaColumns(n,e){const t={};for(const[r,i]of Object.entries(n.columns))t[r]=i;for(const[r,i]of Object.entries(e)){const s=n.columns[r];if(s&&!(i instanceof PodColumnBase)){validateColumnOverride(i,s,r);const o=i;!o.getPredicateUri?.()&&!o.options?.predicate&&(o.options={...o.options,predicate:s.options?.predicate})}t[r]=i}return t}function deepClone(n){if(n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array)return n.map(e=>deepClone(e));if(typeof n=="object"){const e={},t=n;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=deepClone(t[r]));return e}return n}function renderDefaultIdTemplate(n,e){if(!/\{[^{}]+\}/.test(n))return n;if(/\{\s*id\s*\}/.test(n))throw new Error("id default template uses {key} for the generated local key; {id} is the final resource id");const t=e.row??{},r=resolveDate(t,e.now),i={yyyy:String(r.getUTCFullYear()),MM:String(r.getUTCMonth()+1).padStart(2,"0"),dd:String(r.getUTCDate()).padStart(2,"0")};return n.replace(/\{([^{}]+)\}/g,(s,o)=>{const a=o.trim();if(a==="key")return e.key;if(a==="yyyy")return i.yyyy;if(a==="MM")return i.MM;if(a==="dd")return i.dd;const l=resolveExpression(a,t,e);return l==null?"":String(l)})}function resolveDate(n,e=new Date){const t=n.createdAt??n.favoredAt??n.indexedAt??e,r=t instanceof Date?t:new Date(typeof t=="number"&&Math.abs(t)<1e11?t*1e3:t);return Number.isFinite(r.getTime())?r:e}function resolveExpression(n,e,t){const r=parseExpression(n);let i=resolveTemplatePath(r.path,e,t);for(const s of r.transforms)i=applyTransform(i,s,r.path,t);return r.selector?applyPathSelector(i,r.selector):i}function parseExpression(n){const e=n.match(/^(.+?)\[(.*)\]$/),t=e?e[1].trim():n,[r,...i]=t.split("|").map(s=>s.trim()).filter(Boolean);return{path:r??n,transforms:i,selector:e?.[2]?.trim()}}function resolveTemplatePath(n,e,t){const r=n.split("."),i=r[0];return r.reduce((s,o,a)=>{if(typeof s=="string")return i?resolveResourceProperty(s,i,o,t):void 0;if(!(!s||typeof s!="object"))return i&&isResourceProperty(o)&&!((o==="id"||o==="key")&&o in s)?resolveResourceProperty(s,i,o,t):a>0&&o==="id"&&readRef(s)?extractResourceId(s,i??"",t):s[o]},e)}function isResourceProperty(n){return n==="id"||n==="key"||n==="doc"||n==="document"||n==="dir"||n==="owner"}function resolveResourceProperty(n,e,t,r){if(t==="id")return extractResourceId(n,e,r);const i=extractResourceId(n,e,r);if(i){if(t==="key"){const s=extractTemplateValuesForField(n,e,r);return s?.key??s?.id??deriveResourceKey(i)}if(t==="doc"||t==="document")return resourceDocument(i);if(t==="dir"||t==="owner")return deriveOwnerDir(i)}}function applyTransform(n,e,t,r){if(e==="slug")return slugifyValue(String(n??""));const i=extractResourceId(n,t,r);if(e==="resource")return i;if(e==="document")return i?resourceDocument(i):"";if(e==="owner")return i?deriveOwnerDir(i):"";const s=extractTemplateValuesForField(n,t,r);return e==="id"?s?.id??s?.key??i??"":s?.[e]??""}function extractResourceId(n,e,t){const r=readRef(n);if(!r)return null;const i=resolveLinkedResource(e,t);if(!i)return normalizePodDataResourceId$1(r);if(!isCompleteResourceId$1(r))return renderLinkedResourceId(i,r);const s=relativeSubjectFromRef$1(i,r);return normalizePodDataResourceId$1(s??r)}function extractTemplateValuesForField(n,e,t){const r=readRef(n);if(!r)return null;const i=resolveLinkedResource(e,t);if(!i)return null;const s=relativeSubjectFromRef$1(i,r)??(isCompleteResourceId$1(r)?null:renderLinkedResourceId(i,r));if(!s)return null;const o=resourceTemplate(i);return o?extractVarsFromTemplate(normalizePodDataResourceId$1(s),o):{id:normalizePodDataResourceId$1(s)}}function resolveLinkedResource(n,e){const t=e.links?.[n];if(t)return t;const r=e.resource?.columns?.[n];return r?.getLinkTable?.()??r?.options?.linkTable??null}function resourceTemplate(n){const e=n.getSubjectTemplate?.()??n.config?.subjectTemplate;if(e)return e;const t=n.columns?.id?.options?.defaultValue;return typeof t=="string"?t:null}function renderLinkedResourceId(n,e){const t=resourceTemplate(n);if(!t)return e;const r=n.columns?.id?.options?.defaultValue;return typeof r=="function"?String(r(e,{})):t.replace(/\{([^}]+)\}/g,(i,s)=>{const o=parseTemplateField(s);return o==="id"||o==="key"?e:""})}function readRef(n){if(typeof n=="string"&&n.length>0)return n;if(!n||typeof n!="object")return null;const e=n,t=e["@id"]??e.subject??e.id;return typeof t=="string"&&t.length>0?t:null}function resourcePath(n){return normalizeResourcePath$1(n.getResourcePath?.()??n.config?.base??"")}function relativeSubjectFromRef$1(n,e){const t=resourcePath(n);if(!t)return normalizePodDataResourceId$1(e);const r=Array.from(new Set([t,t.replace(/^\/+/,""),t.endsWith("/")?t.slice(0,-1):t].filter(Boolean)));for(const i of r){const s=e.indexOf(i);if(s<0)continue;let o=e.slice(s+i.length);return o.startsWith("/")&&(o=o.slice(1)),o.length>0?o:null}return normalizePodDataResourceId$1(e)}function extractVarsFromTemplate(n,e){let t=0;const r=new Map,i=[];let s=0;for(const a of e.matchAll(/\{([^}]+)\}/g)){i.push(escapeRegExp$1(e.slice(s,a.index)));const l=`var${t++}`;r.set(l,parseTemplateField(a[1]??"")),i.push(`(?<${l}>.+?)`),s=a.index+a[0].length}i.push(escapeRegExp$1(e.slice(s)));const o=i.join("");try{const a=n.match(new RegExp(`^${o}$`));if(!a?.groups)return null;const l={};for(const[c,u]of Object.entries(a.groups)){const f=r.get(c);!f||u===void 0||(l[f]=decodeURIComponent(u))}return l}catch{return null}}function parseTemplateField(n){const e=n.split("|").map(r=>r.trim()).filter(Boolean)[0]??n,t=e.replace(/\[[^\]]*\]$/u,"").trim();return t.split(".")[0]?.trim()||t||e}function escapeRegExp$1(n){return n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function applyPathSelector(n,e){const t=splitResourcePath(n);if(!t)return;if(/^-?\d+$/.test(e))return t[normalizeIndex(Number(e),t.length)];const r=e.match(/^(-?\d*)\s*:\s*(-?\d*)$/);if(!r)throw new Error(`Invalid id default path selector [${e}]`);const i=r[1]===""?0:normalizeSliceIndex(Number(r[1]),t.length),s=r[2]===""?t.length:normalizeSliceIndex(Number(r[2]),t.length);return t.slice(i,s).join("/")}function splitResourcePath(n){const e=readRef(n);if(!e)return null;const t=normalizePodDataResourceId$1(e),[r,i]=t.split("#"),s=(r??t).split("/").filter(Boolean);return i&&s.push(i),s}function normalizePodDataResourceId$1(n){const e=n.indexOf("#"),[t,r=""]=e>=0?[n.slice(0,e),n.slice(e)]:[n,""],i=t.indexOf("/.data/");return`${i>=0?t.slice(i+7):t.replace(/^\/?\.data\//u,"").replace(/^\/+/u,"")}${r}`}function normalizeResourcePath$1(n){return n.trim().replace(/^(\.\/)+/,"")}function isCompleteResourceId$1(n){return/^https?:\/\//u.test(n)||n.startsWith("/")||n.startsWith("#")||n.includes("#")||/\.(ttl|jsonld|json)(?:$|[?#])/iu.test(n)}function deriveOwnerDir(n){const e=normalizePodDataResourceId$1(n),t=e.indexOf("#"),r=t>=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"",s=r.match(/^(.+)\/\d{4}\/\d{2}\/\d{2}\/[^/]+\.(?:ttl|jsonld|json)$/i);if(s?.[1])return s[1];if(r==="task/index.ttl"&&i&&i!=="this")return`task/${i}`;const o=r.match(/^(.+)\/index\.(?:ttl|jsonld|json)$/i);if(o?.[1])return o[1];const a=r.match(/^(.+)\.(?:ttl|jsonld|json)$/i);if(a?.[1])return a[1];const l=r.split("/").filter(Boolean);return l.length>1?l.slice(0,-1).join("/"):r}function resourceDocument(n){const e=normalizePodDataResourceId$1(n),t=e.indexOf("#");return t>=0?e.slice(0,t):e}function deriveResourceKey(n){const e=normalizePodDataResourceId$1(n),t=e.indexOf("#");if(t>=0){const a=e.slice(t+1);if(a&&a!=="this"&&a!=="me"&&a!=="it")return a}const r=resourceDocument(e).replace(/\/+$/u,""),i=r.match(/(?:^|\/)([^/]+)\/index\.(?:ttl|jsonld|json)$/iu);if(i?.[1])return i[1];const s=r.match(/(?:^|\/)([^/]+)\.(?:ttl|jsonld|json)$/iu);if(s?.[1])return s[1];const o=r.split("/").filter(Boolean);return o.length>0?o[o.length-1]:e}function slugifyValue(n){return n.normalize("NFKC").toLowerCase().trim().replace(/[\s_]+/g,"-").replace(/[^\p{Letter}\p{Number}.-]+/gu,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function normalizeIndex(n,e){return n<0?e+n:n}function normalizeSliceIndex(n,e){const t=n<0?e+n:n;return Math.max(0,Math.min(e,t))}function parseTemplateVariableField$1(n){const e=n.split("|").map(r=>r.trim()).filter(Boolean)[0]??n,t=e.replace(/\[[^\]]*\]$/u,"").trim();return t.split(".")[0]?.trim()||t||e}function normalizeResourcePath(n){return n.trim().replace(/^(\.\/)+/,"")}function podResourcePath(n){return normalizeResourcePath(n.getResourcePath?.()??n.config?.base??"")}function podResourceSubjectTemplate(n){return n.getSubjectTemplate?.()??n.config?.subjectTemplate}function podResourceIdDefaultTemplate(n){const e=n.columns?.id?.options?.defaultValue;return typeof e=="string"?e:void 0}function resourceRelativePrefix(n){const e=podResourcePath(n),t=normalizeResourcePath(n.getContainerPath?.()??n.config?.containerPath??"");return e?t&&e.startsWith(t)?normalizeResourcePath(e.slice(t.length)):e.split("/").pop()??e:""}function qualifyFragmentResourceId(n,e){if(!e.startsWith("#"))return e;const t=resourceRelativePrefix(n);return t?`${t}${e}`:e}function templateRelativeSubject(n,e){if((podResourceSubjectTemplate(n)??podResourceIdDefaultTemplate(n))?.startsWith("#")&&!e.startsWith("#")){const r=e.indexOf("#");if(r>=0)return e.slice(r)}return e}function isBaseRelativeSubjectId$1(n){return!n||/^https?:\/\//.test(n)||n.startsWith("/")?!1:n.startsWith("#")||n.includes("#")||/\.(ttl|jsonld|json)(?:#|$)/i.test(n)}function isTemplateCompleteResourceId(n,e){if(!e||/^https?:\/\//.test(e)||e.startsWith("/"))return!1;const t=podResourceSubjectTemplate(n)??podResourceIdDefaultTemplate(n);return t?extractTemplateValues(templateRelativeSubject(n,e),t)!==null:!1}function isResourceRelativeSubjectId(n,e){return isBaseRelativeSubjectId$1(e)||isTemplateCompleteResourceId(n,e)}function relativeSubjectFromRef(n,e){const t=podResourcePath(n);if(!t)return null;const r=Array.from(new Set([t,t.replace(/^\/+/,""),t.endsWith("/")?t.slice(0,-1):t].filter(Boolean)));for(const i of r){const s=e.indexOf(i);if(s<0)continue;let o=e.slice(s+i.length);if(o.startsWith("/")&&(o=o.slice(1)),o.length>0)return o}return isBaseRelativeSubjectId$1(e)||isTemplateCompleteResourceId(n,e)?normalizeResourcePath(e):null}function extractTemplateValues(n,e){if(!e.includes("{"))return n===e?{}:null;let t=0;const r=new Map,i=[];let s=0;for(const a of e.matchAll(/\{([^}]+)\}/g)){i.push(escapeRegExp(e.slice(s,a.index)));const l=`var${t++}`;r.set(l,parseTemplateVariableField$1(a[1]??"")),i.push(`(?<${l}>.+?)`),s=a.index+a[0].length}i.push(escapeRegExp(e.slice(s)));const o=`^${i.join("")}$`;try{const a=n.match(new RegExp(o));if(!a?.groups)return null;const l={};for(const[c,u]of Object.entries(a.groups)){const f=r.get(c);if(!f||u===void 0)continue;const d=decodeURIComponent(u);if(f in l&&l[f]!==d)return null;l[f]=d}return l}catch{return null}}function escapeRegExp(n){return n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function parsePodResourceRef(n,e){if(!e)return null;const t=relativeSubjectFromRef(n,e);if(!t)return null;const r=qualifyFragmentResourceId(n,t),i=podResourceSubjectTemplate(n)??podResourceIdDefaultTemplate(n),s=i?extractTemplateValues(templateRelativeSubject(n,r),i):{id:decodeURIComponent(r)};return s?{resourceId:decodeURIComponent(r),templateValues:s}:null}function extractPodResourceTemplateValue(n,e,t="id"){return parsePodResourceRef(n,e)?.templateValues[t]??null}function resolvePodBaseUrl(n){const e=n.trim();return e?e.includes("/profile/card#me")?e.replace("/profile/card#me","").replace(/\/+$/u,""):e.replace(/\/+$/u,""):""}function resolvePodBaseUrlFromDatabase(n){if(!n||typeof n!="object")return null;const e=n,t=typeof e.getDialect=="function"?e.getDialect():null,r=readPodUrl(t);if(r)return resolvePodBaseUrl(r);const i=typeof e.getSession=="function"?e.getSession():e.session,s=readPodUrl(i);if(s)return resolvePodBaseUrl(s);const o=readWebId(i);return o&&o.includes("/profile/card#me")?resolvePodBaseUrl(o):null}function normalizePodDataResourceId(n){const e=n.indexOf("#"),[t,r=""]=e>=0?[n.slice(0,e),n.slice(e)]:[n,""],i=t.indexOf("/.data/");return`${i>=0?t.slice(i+7):t.replace(/^\/?\.data\//u,"").replace(/^\/+/u,"")}${r}`}function resolvePodResourceId(n,e){const t=resolveKnownTargetIri(e);if(t)return parsePodResourceRef(n,t)?.resourceId??normalizePodDataResourceId(t);if(typeof e=="string")return assertCompleteStringResourceId(n,e),normalizePodDataResourceId(e);const r=typeof e.id=="string"&&e.id.trim().length>0?e.id.trim():void 0;if(!r)throw new Error("resolvePodResourceId requires a resource id on target.id or a full target IRI");if(isCompleteResourceId(r)||isTemplateCompleteResourceId(n,r))return normalizePodDataResourceId(r);const i=resolveDefaultResourceId(n,r,e);if(i)return normalizePodDataResourceId(i);const s=podResourceSubjectTemplate(n);return normalizePodDataResourceId(s?renderSubjectTemplateResourceId(s,r,e):r)}function resolvePodResourceTemplateValue(n,e,t="id"){return extractPodResourceTemplateValue(n,e,t)}function buildPodResourceIri(n,e){const t=resolvePodBaseUrl(n);if(!t||/^https?:\/\//u.test(e))return e;const r=e.startsWith("/")?e:`/.data/${normalizePodDataResourceId(e)}`;return new URL(r.replace(/^\/+/u,""),`${t}/`).toString()}function buildPodResourceIriForResource(n,e,t){const r=resolveKnownTargetIri(t);if(r)return r;const i=resolvePodRootTargetPath(t);if(i)return buildPodResourceIri(n,i);const s=resolvePodResourceId(e,t),o=isResourceRelativeSubjectId(e,s)?`${podResourcePath(e).replace(/\/+$/u,"")}/${normalizeResourcePath(s)}`:e.resolveUri?.(s)??`/.data/${normalizePodDataResourceId(s)}`;return buildPodResourceIri(n,o)}function buildPodResourceIriForDatabase(n,e,t){const r=resolvePodBaseUrlFromDatabase(n);if(!r)throw new Error("buildPodResourceIriForDatabase requires a database with a Pod URL or WebID");return buildPodResourceIriForResource(r,e,t)}function resolvePodResourceIriForDatabase(n,e,t){if(!t)return null;try{return buildPodResourceIriForDatabase(n,e,t)}catch{return null}}function resolveKnownTargetIri(n){if(typeof n=="string")return/^https?:\/\//u.test(n)?n:null;const e=n["@id"]??n.subject;return typeof e=="string"&&/^https?:\/\//u.test(e)?e:null}function resolvePodRootTargetPath(n){if(typeof n=="string")return n.startsWith("/")?n:null;const e=typeof n.id=="string"?n.id.trim():"";return e.startsWith("/")?e:null}function isCompleteResourceId(n){return/^https?:\/\//u.test(n)||n.startsWith("/")||n.startsWith("#")||n.includes("#")||/\.(ttl|jsonld|json)(?:$|[?#])/iu.test(n)}function assertCompleteStringResourceId(n,e){if(isCompleteResourceId(e)||isTemplateCompleteResourceId(n,e))return;const t=n.columns?.id?.options?.defaultValue!==void 0,r=podResourceSubjectTemplate(n);if(t||r)throw new Error("resolvePodResourceId does not accept local keys as string targets. Pass a structured row object with id and required fields, or pass a complete resource id/IRI.")}function resolveDefaultResourceId(n,e,t){const r=n.columns?.id?.options?.defaultValue;if(r===void 0)return null;if(typeof r=="string")return renderDefaultIdTemplate(r,{key:e,row:t,resource:n});if(typeof r!="function")return String(r);const i=r;return i.length===0?String(i()):String(i(e,t))}function renderSubjectTemplateResourceId(n,e,t){const r=n.replace(/\{\s*id\s*\}/gu,"{key}");return renderDefaultIdTemplate(r,{key:encodeURIComponent(e),row:t})}function readPodUrl(n){if(!n||typeof n!="object")return null;const e=n,t=typeof e.getPodUrl=="function"?e.getPodUrl():e.info?.podUrl??e.podUrl;return typeof t=="string"&&t.trim().length>0?t:null}function readWebId(n){if(!n||typeof n!="object")return null;const e=n,t=e.info?.webId??e.webId;return typeof t=="string"&&t.trim().length>0?t:null}var _a$a;class PodTable{constructor(e,t,r){this.initialized=!1;const i=r.type;if(!i)throw new Error("podTable requires a type (RDF class) via options.type");const s=r.typeIndex,o=s==="private"||s==="public",a=this.resolveBase(r.base,e);this.resourcePath=a.resourcePath,this.containerPath=a.containerPath;const l=this.resolveSubjectTemplate(r.subjectTemplate,a.resourcePath,a.containerPath,e);this.subjectTemplate=l.template,this.hasCustomSubjectTemplate=l.isCustom,this.resourceMode=r.resourceMode??(r.sparqlEndpoint?"sparql":void 0),this.sparqlEndpoint=r.sparqlEndpoint,this.registerTypeIndexEnabled=o&&r.autoRegister!==!1,this.config={name:e,base:a.resourcePath,type:resolveTermIri(i),namespace:r.namespace,typeIndex:o?s:void 0,saiRegistryPath:r.saiRegistryPath,autoRegister:r.autoRegister,containerPath:a.containerPath,hooks:r.hooks},this.subjectTemplate&&(this.config.subjectTemplate=this.subjectTemplate),this.parentClasses=this.normalizeParents(r.subClassOf??[]),this.parentClasses.length>0&&(this.config.subClassOf=[...this.parentClasses]),this.columns=t,Object.assign(this,t);let c=0;for(const u of Object.values(t))if(u.options.primaryKey&&c++,u.table=this,u.tableName=e,!u.options.predicate&&!u._virtualId&&!r.namespace)throw new Error(`Column "${u.name}" in table "${e}" is missing a predicate.`);if(c!==1)throw new Error(`PodTable "${e}" must have exactly one primary key column. Found ${c}.`);this.$inferSelect={},this.$inferInsert={},this.$inferUpdate={},this._={brand:"Table",config:this.config,name:e,schema:void 0,columns:t,inferSelect:{},inferInsert:{},inferUpdate:{}},this.mapping=this.buildTableMapping()}getContainerPath(){return this.containerPath}getType(){return this.config.type}getRdfClass(){return this.getType()}getNamespace(){return this.config.namespace}getSubjectTemplate(){return this.subjectTemplate}buildId(e){return resolvePodResourceId(this,e)}buildIri(e,t){return buildPodResourceIriForResource(e,this,t)}buildIriForDatabase(e,t){return buildPodResourceIriForDatabase(e,this,t)}resolveIriForDatabase(e,t){return resolvePodResourceIriForDatabase(e,this,t)}parseRef(e){return parsePodResourceRef(this,e)}extractTemplateValue(e,t="id"){return extractPodResourceTemplateValue(this,e,t)}hasCustomTemplate(){return this.hasCustomSubjectTemplate}getSubClassOf(){return[...this.parentClasses]}getMapping(){return this.mapping}get $schema(){return new SolidSchema(this.columns,{type:this.config.type,namespace:this.config.namespace,subjectTemplate:this.subjectTemplate,subClassOf:this.parentClasses.length>0?[...this.parentClasses]:void 0})}resolveUri(e){const t=this.subjectTemplate;if(!t)return/^https?:\/\//.test(e)||e.startsWith("/")?e:`${this.config.base.endsWith("/")?this.config.base:`${this.config.base}/`}${e}`;const r=t.replace(/\{id\}/g,e);return r.startsWith("#")?`${this.resourcePath}${r}`:`${this.containerPath.endsWith("/")?this.containerPath:`${this.containerPath}/`}${r}`}resolveBase(e,t){if(!e||e.trim().length===0)throw new Error(`podTable '${t}' requires a 'base' option.`);const r=this.normalizeBaseInput(e),i=this.normalizeResourcePath(r);if(i.endsWith("/")){const o=this.ensureTrailingSlash(i);return{resourcePath:o,containerPath:o}}const s=this.ensureTrailingSlash(this.deriveContainerPath(i));return{resourcePath:i,containerPath:s}}normalizeBaseInput(e){const t=e.trim(),r=t.match(/^([a-zA-Z][\w+.-]*):\/\/(.*)$/);if(r){const[,i,s]=r,o=i.toLowerCase(),a=s.trim();return o==="http"||o==="https"?`${o}://${a}`:a.startsWith("/")?a:`/${a}`}return t}normalizeResourcePath(e){if(/^[a-zA-Z][\w+.-]*:\/\//.test(e))return e;const r=e.trim().replace(/^(\.\/)+/,"").replace(/\/+/g,"/");return r.startsWith("/")?r:`/${r}`}deriveContainerPath(e){const t=e.endsWith("/")?e.slice(0,-1):e,r=t.lastIndexOf("/");return r===-1?"/":t.slice(0,r+1)}ensureTrailingSlash(e){return e.endsWith("/")?e:`${e}/`}getResourcePath(){return this.resourcePath}getResourceMode(){return this.resourceMode}getSparqlEndpoint(){return this.sparqlEndpoint}shouldRegisterTypeIndex(){return this.registerTypeIndexEnabled}async init(e){await e.registerTable(this)}isInitialized(){return this.initialized}markInitialized(e=!0){this.initialized=e}setBase(e){const t=this.resolveBase(e,this.config.name);this.resourcePath=t.resourcePath,this.containerPath=t.containerPath,this.config.base=t.resourcePath,this.config.containerPath=t.containerPath,this._?.config&&(this._.config.base=this.config.base,this._.config.containerPath=this.config.containerPath),this.hasCustomSubjectTemplate||(this.subjectTemplate=void 0,delete this.config.subjectTemplate,this._?.config&&delete this._.config.subjectTemplate),this.mapping=this.buildTableMapping()}setSubjectTemplate(e){this.subjectTemplate=e,this.hasCustomSubjectTemplate=!0,this.config.subjectTemplate=e,this._?.config&&(this._.config.subjectTemplate=e),this.mapping=this.buildTableMapping()}setSparqlEndpoint(e){this.sparqlEndpoint=e,this.resourceMode||(this.resourceMode="sparql")}getColumns(){return this.columns}getColumn(e){return this.columns[e]}hasColumn(e){return e in this.columns}resolveSubjectTemplate(e,t,r,i){return e&&e.trim().length>0?{template:e.trim(),isCustom:!0}:{template:void 0,isCustom:!1}}buildTableMapping(){const e={};for(const t of Object.values(this.columns))e[t.name]=this.buildColumnMapping(t);return{name:this.config.name,type:this.config.type,subjectTemplate:this.subjectTemplate,namespace:this.config.namespace,subClassOf:this.parentClasses.length>0?[...this.parentClasses]:void 0,columns:e,relations:this.relations}}buildColumnMapping(e){const t=e._virtualId?"@id":e.getPredicate(this.config.namespace);return{column:e.name,predicate:t,kind:e.isLink()?"object":"datatype",datatype:this.inferColumnDatatype(e),linkTarget:e.getLinkTarget(),isArray:e.options.isArray??!1,inverse:e.isInverse()}}inferColumnDatatype(e){switch(e.dataType){case"string":return"http://www.w3.org/2001/XMLSchema#string";case"integer":return"http://www.w3.org/2001/XMLSchema#integer";case"boolean":return"http://www.w3.org/2001/XMLSchema#boolean";case"datetime":return"http://www.w3.org/2001/XMLSchema#dateTime";case"json":case"object":return"http://www.w3.org/2001/XMLSchema#json";default:return}}normalizeParents(e){if(!e)return[];const r=(Array.isArray(e)?e:[e]).map(i=>resolveTermIri(i)).filter(i=>i&&i.length>0);return Array.from(new Set(r))}}_a$a=entityKind;PodTable[_a$a]="PodTable";function clonePodColumn(n){const e=deepClone(n.options);let t;switch(n.dataType){case"integer":t=new PodIntegerColumn(n.name,e);break;case"datetime":t=new PodDateTimeColumn(n.name,e);break;case"boolean":t=new PodBooleanColumn(n.name,e);break;case"json":t=new PodJsonColumn(n.name,e);break;case"object":t=new PodObjectColumn(n.name,e);break;case"array":{const r=n.elementType??n.options.baseType??"string";t=new PodArrayColumn(n.name,r,e);break}case"uri":t=new PodUriColumn(n.name,e);break;default:t=new PodStringColumn(n.name,e);break}return n._virtualId&&(t._virtualId=!0),t.relationName=n.relationName,t}function alias(n,e){if(typeof e!="string"||e.trim().length===0)throw new Error("alias() requires a non-empty alias name");const t={};for(const[i,s]of Object.entries(n.columns))t[i]=clonePodColumn(s);const r=new PodTable(e.trim(),t,{base:n.config.base,sparqlEndpoint:n.getSparqlEndpoint(),type:n.config.type,namespace:n.config.namespace,typeIndex:n.config.typeIndex,saiRegistryPath:n.config.saiRegistryPath,subClassOf:n.config.subClassOf,subjectTemplate:n.config.subjectTemplate,resourceMode:n.getResourceMode(),autoRegister:n.config.autoRegister,hooks:n.config.hooks});return r.relations=n.relations,n.isInitialized()&&r.markInitialized(!0),r}function podTable(n,e,t){const r={};for(const[i,s]of Object.entries(e)){if(s instanceof PodColumnBase){r[i]=s;continue}let o;switch(s.dataType){case"integer":o=new PodIntegerColumn(s.name,s.options);break;case"datetime":o=new PodDateTimeColumn(s.name,s.options);break;case"boolean":o=new PodBooleanColumn(s.name,s.options);break;case"json":o=new PodJsonColumn(s.name,s.options);break;case"object":o=new PodObjectColumn(s.name,s.options);break;case"array":{const l=s.elementType??s.options.baseType??"string";o=new PodArrayColumn(s.name,l,s.options);break}case"uri":o=new PodUriColumn(s.name,s.options);break;default:o=new PodStringColumn(s.name,s.options);break}const a=s.getPredicateUri?.();a&&o.predicate(a),r[i]=o}return new PodTable(n,r,t)}class SolidSchema{constructor(e,t){this.columns=e,this.options=t,this.$kind="SolidSchema",this.namespace=t.namespace,this.subjectTemplate=t.subjectTemplate,this.subClassOf=t.subClassOf?Array.isArray(t.subClassOf)?t.subClassOf.map(resolveTermIri):[resolveTermIri(t.subClassOf)]:void 0}table(e,t){return new PodTable(e,this.columns,{...this.options,...t})}extend(e,t){const r=mergeSchemaColumns(this,e),i=[this.type];return this.subClassOf&&i.push(...this.subClassOf),solidSchema(r,{...t,subClassOf:i})}get type(){return resolveTermIri(this.options.type)}}function solidSchema(n,e){const t={};for(const[r,i]of Object.entries(n)){if(i instanceof PodColumnBase){t[r]=i;continue}let s;switch(i.dataType){case"integer":s=new PodIntegerColumn(i.name,i.options);break;case"datetime":s=new PodDateTimeColumn(i.name,i.options);break;case"boolean":s=new PodBooleanColumn(i.name,i.options);break;case"json":s=new PodJsonColumn(i.name,i.options);break;case"object":s=new PodObjectColumn(i.name,i.options);break;case"array":{const a=i.elementType??i.options.baseType??"string";s=new PodArrayColumn(i.name,a,i.options);break}case"uri":s=new PodUriColumn(i.name,i.options);break;default:s=new PodStringColumn(i.name,i.options);break}const o=i.getPredicateUri?.();o&&s.predicate(o),t[r]=s}return new SolidSchema(t,e)}function isSolidSchema(n){return n instanceof SolidSchema||n?.$kind==="SolidSchema"}function relations(n,e){const r=e({one:(i,s={})=>{const o=isSolidSchema(i);return{type:"one",table:i,fields:s.fields,references:s.references,relationName:s.relationName,discover:s.discover,isFederated:o}},many:(i,s={})=>{const o=isSolidSchema(i);return{type:"many",table:i,fields:s.fields,references:s.references,relationName:s.relationName,discover:s.discover,isFederated:o}}});return n.relations=r,r}const index=Object.freeze(Object.defineProperty({__proto__:null,ColumnBuilder,PodArrayColumn,PodBooleanColumn,PodColumnBase,PodDateTimeColumn,PodIntegerColumn,PodJsonColumn,PodObjectColumn,PodStringColumn,PodTable,PodUriColumn,SolidSchema,alias,bigint,boolean:boolean$2,char,date:date$3,datetime:datetime$2,decimal,double,float,generateNanoId,hasStringValue:hasStringValue$2,hasTermValue,id,int:int$1,integer:integer$1,iri,isSolidSchema,json,jsonb,mediumint,mergeSchemaColumns,numeric,object:object$1,podTable,real,relations,resolveTermIri,serial,smallint,solidSchema,string:string$2,text,timestamp,tinyint,uri,validateColumnOverride,varchar},Symbol.toStringTag,{value:"Module"})),XSD$8="http://www.w3.org/2001/XMLSchema#";function getPredicateForColumn(n,e){if(!n)return"http://example.org/unknown";if(typeof e.getMapping=="function"){const i=e.getMapping()?.columns?.[n.name];if(i?.predicate)return i.predicate}if(typeof n.getPredicateUri=="function")return n.getPredicateUri();if(n._predicateUri)return n._predicateUri;if(n.predicate&&typeof n.predicate=="string")return n.predicate;const t=e instanceof SolidSchema?e.options.namespace:e.config.namespace;if(typeof n.getPredicate=="function")try{return n.getPredicate(t)}catch{}return n.options?.predicate?n.options.predicate:t?`${typeof t=="string"?t:t.uri}${n.name}`:(n.name==="id"&&console.log("[DEBUG] getPredicateForColumn 'id' fallback to example.org. Column:",n),`http://example.org/${n.name}`)}function formatValue(n,e,t,r){return Array.isArray(n)?n.map(i=>formatSingleValue(i,e,t,r)):formatSingleValue(n,e,t,r)}function formatSingleValue(n,e,t,r){if(n==null)return'""';if(e?.dataType==="uri"||e?.options?.linkTarget){const i=String(n);if(i.startsWith("<")&&i.endsWith(">")){const s=i.slice(1,-1);return t&&!t.isAbsoluteUri(s)?`<${t.resolveLink(s,e,r)}>`:i}return t?`<${t.resolveLink(i,e,r)}>`:i.startsWith("<")?i:`<${i}>`}return typeof n=="string"?!e&&(n.startsWith("http://")||n.startsWith("https://"))?`<${n}>`:`"${n.replace(/\\/g,"\\\\").replace(/"/g,'"')}"`:typeof n=="number"?Number.isInteger(n)?String(n):`"${n}"^^<${XSD$8}decimal>`:typeof n=="boolean"?`"${n}"^^<${XSD$8}boolean>`:n instanceof Date?`"${n.toISOString()}"^^<${XSD$8}dateTime>`:`"${String(n)}"`}function resolveColumn(n,e){if(n&&typeof n=="object"&&n instanceof PodColumnBase)return n;if(n&&typeof n=="object"&&"name"in n){const t=n.name;if(typeof t=="string"&&e.columns[t])return e.columns[t]}if(typeof n=="string"){const t=e.columns[n];if(t)return t}throw new Error(`Unable to resolve column reference for select field: ${String(n)}`)}function generateSubjectUri(n,e,t){const r=t.resolveSubject(e,n);if(!r)throw new Error("Failed to generate subject URI");return r}var _a$9;class SPARQLExpression{constructor(){this[_a$9]="SPARQLExpression"}}_a$9=Symbol.toStringTag;class BinaryExpression extends SPARQLExpression{constructor(e,t,r){super(),this.left=e,this.operator=t,this.right=r,this.type="binary_expr"}}class LogicalExpression extends SPARQLExpression{constructor(e,t){super(),this.operator=e,this.expressions=t,this.type="logical_expr"}}class UnaryExpression extends SPARQLExpression{constructor(e,t){super(),this.operator=e,this.value=t,this.type="unary_expr"}}class SelectionAliasExpression extends SPARQLExpression{constructor(e){super(),this.alias=e}}function eq(n,e){return new BinaryExpression(n,"=",e)}function ne(n,e){return new BinaryExpression(n,"!=",e)}function gt(n,e){return new BinaryExpression(n,">",e)}function gte(n,e){return new BinaryExpression(n,">=",e)}function lt(n,e){return new BinaryExpression(n,"<",e)}function lte(n,e){return new BinaryExpression(n,"<=",e)}function like(n,e){return new BinaryExpression(n,"LIKE",e)}function ilike(n,e){return new BinaryExpression(n,"ILIKE",e)}function between(n,e,t){return new BinaryExpression(n,"BETWEEN",[e,t])}function notBetween(n,e,t){return new BinaryExpression(n,"NOT BETWEEN",[e,t])}function regex(n,e,t){return new BinaryExpression(n,"REGEX",{pattern:e,flags:t})}function inArray(n,e){return new BinaryExpression(n,"IN",e)}function notInArray(n,e){return new BinaryExpression(n,"NOT IN",e)}function isNull(n){return new UnaryExpression("IS NULL",n)}function isNotNull(n){return new UnaryExpression("IS NOT NULL",n)}function and(...n){return new LogicalExpression("AND",n.filter(Boolean))}function or(...n){return new LogicalExpression("OR",n.filter(Boolean))}function not(n){return new UnaryExpression("NOT",n)}function exists(n){return new UnaryExpression("EXISTS",n)}function notExists(n){return new UnaryExpression("NOT EXISTS",n)}const conditions={eq,ne,gt,gte,lt,lte,like,ilike,between,notBetween,regex,inArray,notInArray,isNull,isNotNull,and,or,not,exists,notExists};function parseActivityStreamsMessage(n){const e=JSON.parse(n);return{id:e.id||e["@id"]||"",type:e.type,object:typeof e.object=="string"?e.object:e.object?.id||e.object?.["@id"]||"",published:e.published||new Date().toISOString(),state:e.state}}class BaseChannel{constructor(e){this._connected=!1,this.config=e}get connected(){return this._connected}handleMessage(e){try{const t=parseActivityStreamsMessage(e);this.config.onNotification(t)}catch(t){this.handleError(new Error(`Failed to parse notification: ${t}`))}}handleError(e){this.config.onError?this.config.onError(e):console.error("[NotificationChannel] Error:",e)}handleClose(){this._connected=!1,this.config.onClose&&this.config.onClose()}}class SSEChannel extends BaseChannel{constructor(e){super(e),this.abortController=null,this.reader=null,this.contentType=""}async connect(){if(this._connected)return;this.abortController=new AbortController;const e=this.config.fetch||fetch;try{const t=`notify-sse-${Date.now()}`,r=await e(this.config.receiveFrom,{method:"GET",headers:{Accept:"text/turtle, text/event-stream","X-Request-ID":t},signal:this.abortController.signal});if(!r.ok)throw new Error(`SSE connection failed: ${r.status} ${r.statusText}`);if(!r.body)throw new Error("SSE response has no body");this.contentType=r.headers.get("content-type")||"",this._connected=!0,this.reader=r.body.getReader(),this.readStream()}catch(t){throw t.name!=="AbortError"&&this.handleError(t),t}}disconnect(){this.abortController&&(this.abortController.abort(),this.abortController=null),this.reader&&(this.reader.cancel().catch(()=>{}),this.reader=null),this._connected=!1,this.handleClose()}async readStream(){if(!this.reader)return;const e=new TextDecoder;let t="";try{for(;this._connected;){const{done:r,value:i}=await this.reader.read();if(r){t.trim()&&this.parseNotification(t.trim()),this.handleClose();break}const s=e.decode(i,{stream:!0});t+=s,this.contentType.includes("text/turtle")?t=this.processTurtleBuffer(t):t=this.processSSEBuffer(t)}}catch(r){r.name!=="AbortError"&&this.handleError(r)}}processTurtleBuffer(e){const t=e.split(`
1
+ import{r as requireEvents,_ as __vitePreload,v as v4}from"./inrupt-smoke.js";import{g as getDefaultExportFromCjs}from"./global-BGMlqT2c.js";const urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",generateNanoId=(n=21)=>{let e="";if(typeof globalThis.crypto<"u"&&typeof globalThis.crypto.getRandomValues=="function"){const t=globalThis.crypto.getRandomValues(new Uint8Array(n));for(let r=0;r<n;r++)e+=urlAlphabet[t[r]%urlAlphabet.length]}else{console.warn("Using Math.random fallback for NanoID generation.");for(let t=0;t<n;t++)e+=urlAlphabet[Math.floor(Math.random()*256)%urlAlphabet.length]}return e},hasStringValue$2=n=>typeof n=="object"&&n!==null&&typeof n.value=="string",hasTermValue=n=>typeof n=="object"&&n!==null&&typeof n.term=="object"&&n.term!==null&&typeof n.term?.value=="string",resolveTermIri=n=>{if(typeof n=="string")return n;if(hasStringValue$2(n))return n.value;if(hasTermValue(n))return n.term.value;throw new Error("Term must be a string or VocabTerm with a string value")},entityKind=Symbol.for("drizzle:entityKind");function is(n,e){if(!n||typeof n!="object")return!1;if(n instanceof e)return!0;if(!Object.prototype.hasOwnProperty.call(e,entityKind))throw new Error(`Class "${e.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let t=n.constructor;if(t)for(;t;){if(entityKind in t&&t[entityKind]===e[entityKind])return!0;t=Object.getPrototypeOf(t)}return!1}class Column{table;static[entityKind]="Column";name;primary;notNull;default;defaultFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;config;constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}}const ViewBaseConfig=Symbol.for("drizzle:ViewBaseConfig");class View{static[entityKind]="View";[ViewBaseConfig];constructor({name:e,schema:t,selectedFields:r,query:i}){this[ViewBaseConfig]={name:e,originalName:e,schema:t,selectedFields:r,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new SQL([this])}}const SubqueryConfig=Symbol.for("drizzle:SubqueryConfig");class Subquery{static[entityKind]="Subquery";[SubqueryConfig];constructor(e,t,r,i=!1){this[SubqueryConfig]={sql:e,selection:t,alias:r,isWith:i}}getSQL(){return new SQL([this])}}class SelectionProxyHandler{static[entityKind]="SelectionProxyHandler";config;constructor(e){this.config={...e}}get(e,t){if(t===SubqueryConfig)return{...e[SubqueryConfig],selection:new Proxy(e[SubqueryConfig].selection,this)};if(t===ViewBaseConfig)return{...e[ViewBaseConfig],selectedFields:new Proxy(e[ViewBaseConfig].selectedFields,this)};if(typeof t=="symbol")return e[t];const i=(is(e,Subquery)?e[SubqueryConfig].selection:is(e,View)?e[ViewBaseConfig].selectedFields:e)[t];if(is(i,SQL.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!i.isSelectionField)return i.sql;const s=i.clone();return s.isSelectionField=!0,s}if(is(i,SQL)){if(this.config.sqlBehavior==="sql")return i;throw new Error(`You tried to reference "${t}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return is(i,Column)?this.config.alias?new Proxy(i,new ColumnAliasProxyHandler(new Proxy(i.table,new TableAliasProxyHandler(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!="object"||i===null?i:new Proxy(i,new SelectionProxyHandler(this.config))}}function orderSelectedFields(n,e){return Object.entries(n).reduce((t,[r,i])=>{if(typeof r!="string")return t;const s=e?[...e,r]:[r];return is(i,Column)||is(i,SQL)||is(i,SQL.Aliased)?t.push({path:s,field:i}):is(i,Table)?t.push(...orderSelectedFields(i[Table.Symbol.Columns],s)):t.push(...orderSelectedFields(i,s)),t},[])}function applyMixins(n,e){for(const t of e)for(const r of Object.getOwnPropertyNames(t.prototype))Object.defineProperty(n.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r)||Object.create(null))}function getTableLikeName(n){return is(n,Subquery)?n[SubqueryConfig].alias:is(n,View)?n[ViewBaseConfig].name:is(n,SQL)?void 0:n[Table.Symbol.IsAlias]?n[Table.Symbol.Name]:n[Table.Symbol.BaseName]}const TableName=Symbol.for("drizzle:Name"),Schema=Symbol.for("drizzle:Schema"),Columns=Symbol.for("drizzle:Columns"),OriginalName=Symbol.for("drizzle:OriginalName"),BaseName=Symbol.for("drizzle:BaseName"),IsAlias=Symbol.for("drizzle:IsAlias"),ExtraConfigBuilder=Symbol.for("drizzle:ExtraConfigBuilder"),IsDrizzleTable=Symbol.for("drizzle:IsDrizzleTable");class Table{static[entityKind]="Table";static Symbol={Name:TableName,Schema,OriginalName,Columns,BaseName,IsAlias,ExtraConfigBuilder};[TableName];[OriginalName];[Schema];[Columns];[BaseName];[IsAlias]=!1;[ExtraConfigBuilder]=void 0;[IsDrizzleTable]=!0;constructor(e,t,r){this[TableName]=this[OriginalName]=e,this[Schema]=t,this[BaseName]=r}getSQL(){return new SQL([this])}}class QueryPromise{static[entityKind]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}then(e,t){return this.execute().then(e,t)}}const tracer={startActiveSpan(n,e){return e()}},InlineForeignKeys=Symbol.for("drizzle:PgInlineForeignKeys");class PgTable extends Table{static[entityKind]="PgTable";static Symbol=Object.assign({},Table.Symbol,{InlineForeignKeys});[InlineForeignKeys]=[];[Table.Symbol.ExtraConfigBuilder]=void 0}class TypedQueryBuilder{static[entityKind]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}}class PgSelectQueryBuilder extends TypedQueryBuilder{static[entityKind]="PgSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;constructor({table:e,fields:t,isPartialSelect:r,session:i,dialect:s,withList:o,distinct:a}){super(),this.config={withList:o,table:e,fields:{...t},distinct:a},this.isPartialSelect=r,this.session=i,this.dialect=s,this._={selectedFields:t},this.tableName=getTableLikeName(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(t,r)=>{const i=this.tableName,s=getTableLikeName(t);if(typeof s=="string"&&this.config.joins?.some(o=>o.alias===s))throw new Error(`Alias "${s}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof i=="string"&&(this.config.fields={[i]:this.config.fields}),typeof s=="string"&&!is(t,SQL))){const o=is(t,Subquery)?t[SubqueryConfig].selection:is(t,View)?t[ViewBaseConfig].selectedFields:t[Table.Symbol.Columns];this.config.fields[s]=o}if(typeof r=="function"&&(r=r(new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:t,joinType:e,alias:s}),typeof s=="string")switch(e){case"left":{this.joinsNotNullableMap[s]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!0;break}case"inner":{this.joinsNotNullableMap[s]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!1;break}}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const t=e[0](new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(t)?t:[t]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const t=e[0](new Proxy(this.config.fields,new SelectionProxyHandler({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.orderBy=Array.isArray(t)?t:[t]}else this.config.orderBy=e;return this}limit(e){return this.config.limit=e,this}offset(e){return this.config.offset=e,this}for(e,t={}){return this.config.lockingClauses||(this.config.lockingClauses=[]),this.config.lockingClauses.push({strength:e,config:t}),this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}as(e){return new Proxy(new Subquery(this.getSQL(),this.config.fields,e),new SelectionProxyHandler({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}}class PgSelect extends PgSelectQueryBuilder{static[entityKind]="PgSelect";_prepare(e){const{session:t,config:r,dialect:i,joinsNotNullableMap:s}=this;if(!t)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");return tracer.startActiveSpan("drizzle.prepareQuery",()=>{const o=orderSelectedFields(r.fields),a=t.prepareQuery(i.sqlToQuery(this.getSQL()),o,e);return a.joinsNotNullableMap=s,a})}prepare(e){return this._prepare(e)}execute=e=>tracer.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e))}applyMixins(PgSelect,[QueryPromise]);class Relation{sourceTable;referencedTable;relationName;static[entityKind]="Relation";referencedTableName;fieldName;constructor(e,t,r){this.sourceTable=e,this.referencedTable=t,this.relationName=r,this.referencedTableName=t[Table.Symbol.Name]}}function isSQLWrapper(n){return typeof n=="object"&&n!==null&&"getSQL"in n&&typeof n.getSQL=="function"}function mergeQueries(n){const e={sql:"",params:[]};for(const t of n)e.sql+=t.sql,e.params.push(...t.params),t.typings?.length&&(e.typings||(e.typings=[]),e.typings.push(...t.typings));return e}class StringChunk{static[entityKind]="StringChunk";value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new SQL([this])}}class SQL{queryChunks;static[entityKind]="SQL";decoder=noopDecoder;shouldInlineParams=!1;constructor(e){this.queryChunks=e}append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return tracer.startActiveSpan("drizzle.buildSQL",t=>{const r=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(e,t){const r=Object.assign({},t,{inlineParams:t.inlineParams||this.shouldInlineParams,paramStartIndex:t.paramStartIndex||{value:0}}),{escapeName:i,escapeParam:s,prepareTyping:o,inlineParams:a,paramStartIndex:l}=r;return mergeQueries(e.map(c=>{if(is(c,StringChunk))return{sql:c.value.join(""),params:[]};if(is(c,Name))return{sql:i(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const u=[new StringChunk("(")];for(const[f,d]of c.entries())u.push(d),f<c.length-1&&u.push(new StringChunk(", "));return u.push(new StringChunk(")")),this.buildQueryFromSourceParams(u,r)}if(is(c,SQL))return this.buildQueryFromSourceParams(c.queryChunks,{...r,inlineParams:a||c.shouldInlineParams});if(is(c,Table)){const u=c[Table.Symbol.Schema],f=c[Table.Symbol.Name];return{sql:u===void 0?i(f):i(u)+"."+i(f),params:[]}}if(is(c,Column))return{sql:i(c.table[Table.Symbol.Name])+"."+i(c.name),params:[]};if(is(c,View)){const u=c[ViewBaseConfig].schema,f=c[ViewBaseConfig].name;return{sql:u===void 0?i(f):i(u)+"."+i(f),params:[]}}if(is(c,Param)){const u=c.value===null?null:c.encoder.mapToDriverValue(c.value);if(is(u,SQL))return this.buildQueryFromSourceParams([u],r);if(a)return{sql:this.mapInlineParam(u,r),params:[]};let f;return o!==void 0&&(f=[o(c.encoder)]),{sql:s(l.value++,u),params:[u],typings:f}}return is(c,Placeholder)?{sql:s(l.value++,c),params:[c]}:is(c,SQL.Aliased)&&c.fieldAlias!==void 0?{sql:i(c.fieldAlias),params:[]}:is(c,Subquery)?c[SubqueryConfig].isWith?{sql:i(c[SubqueryConfig].alias),params:[]}:this.buildQueryFromSourceParams([new StringChunk("("),c[SubqueryConfig].sql,new StringChunk(") "),new Name(c[SubqueryConfig].alias)],r):isSQLWrapper(c)?this.buildQueryFromSourceParams([new StringChunk("("),c.getSQL(),new StringChunk(")")],r):is(c,Relation)?this.buildQueryFromSourceParams([c.sourceTable,new StringChunk("."),sql.identifier(c.fieldName)],r):a?{sql:this.mapInlineParam(c,r),params:[]}:{sql:s(l.value++,c),params:[c]}}))}mapInlineParam(e,{escapeString:t}){if(e===null)return"null";if(typeof e=="number"||typeof e=="boolean")return e.toString();if(typeof e=="string")return t(e);if(typeof e=="object"){const r=e.toString();return t(r==="[object Object]"?JSON.stringify(e):r)}throw new Error("Unexpected param value: "+e)}getSQL(){return this}as(e){return e===void 0?this:new SQL.Aliased(this,e)}mapWith(e){return this.decoder=typeof e=="function"?{mapFromDriverValue:e}:e,this}inlineParams(){return this.shouldInlineParams=!0,this}}class Name{value;static[entityKind]="Name";brand;constructor(e){this.value=e}getSQL(){return new SQL([this])}}const noopDecoder={mapFromDriverValue:n=>n},noopEncoder={mapToDriverValue:n=>n};({...noopDecoder,...noopEncoder});class Param{value;encoder;static[entityKind]="Param";brand;constructor(e,t=noopEncoder){this.value=e,this.encoder=t}getSQL(){return new SQL([this])}}function sql(n,...e){const t=[];(e.length>0||n.length>0&&n[0]!=="")&&t.push(new StringChunk(n[0]));for(const[r,i]of e.entries())t.push(i,new StringChunk(n[r+1]));return new SQL(t)}(function(n){function e(){return new SQL([])}n.empty=e;function t(l){return new SQL(l)}n.fromList=t;function r(l){return new SQL([new StringChunk(l)])}n.raw=r;function i(l,c){const u=[];for(const[f,d]of l.entries())f>0&&c!==void 0&&u.push(c),u.push(d);return new SQL(u)}n.join=i;function s(l){return new Name(l)}n.identifier=s;function o(l){return new Placeholder(l)}n.placeholder=o;function a(l,c){return new Param(l,c)}n.param=a})(sql||(sql={}));(function(n){class e{sql;fieldAlias;static[entityKind]="SQL.Aliased";isSelectionField=!1;constructor(r,i){this.sql=r,this.fieldAlias=i}getSQL(){return this.sql}clone(){return new e(this.sql,this.fieldAlias)}}n.Aliased=e})(SQL||(SQL={}));class Placeholder{name;static[entityKind]="Placeholder";constructor(e){this.name=e}getSQL(){return new SQL([this])}}Column.prototype.getSQL=function(){return new SQL([this])};class ColumnAliasProxyHandler{table;static[entityKind]="ColumnAliasProxyHandler";constructor(e){this.table=e}get(e,t){return t==="table"?this.table:e[t]}}class TableAliasProxyHandler{alias;replaceOriginalName;static[entityKind]="TableAliasProxyHandler";constructor(e,t){this.alias=e,this.replaceOriginalName=t}get(e,t){if(t===Table.Symbol.IsAlias)return!0;if(t===Table.Symbol.Name)return this.alias;if(this.replaceOriginalName&&t===Table.Symbol.OriginalName)return this.alias;if(t===ViewBaseConfig)return{...e[ViewBaseConfig],name:this.alias,isAlias:!0};if(t===Table.Symbol.Columns){const i=e[Table.Symbol.Columns];if(!i)return i;const s={};return Object.keys(i).map(o=>{s[o]=new Proxy(i[o],new ColumnAliasProxyHandler(new Proxy(e,this)))}),s}const r=e[t];return is(r,Column)?new Proxy(r,new ColumnAliasProxyHandler(new Proxy(e,this))):r}}var _a$b;class ColumnBuilder{constructor(e,t,r={},i,s){this.name=e,this.dataType=t,this.options={...r},this._predicateUri=i,this.elementType=s??null}formatValue(e){if(e==null)throw new Error("Cannot format null or undefined value");if(this.options.isArray){if(!Array.isArray(e))throw new Error("Array column requires array value");return e.map(t=>this.formatSingleValue(t))}return this.formatSingleValue(e)}formatSingleValue(e){const t=this.options.isArray&&this.elementType?this.elementType:this.dataType;if(this.options.linkTarget&&typeof e=="string")return`<${e}>`;switch(t){case"string":return`"${String(e).replace(/"/g,'"')}"`;case"integer":return String(Number(e));case"boolean":return`"${e}"^^<http://www.w3.org/2001/XMLSchema#boolean>`;case"datetime":return`"${(e instanceof Date?e:new Date(e)).toISOString()}"^^<http://www.w3.org/2001/XMLSchema#dateTime>`;case"json":case"object":return`"${JSON.stringify(e).replace(/"/g,'"')}"^^<http://www.w3.org/2001/XMLSchema#json>`;case"uri":if(typeof e!="string"||!e.includes(":"))throw new Error(`URI column requires valid IRI, got: ${e}`);return`<${e}>`;default:return`"${String(e).replace(/"/g,'"')}"`}}parseValue(e,t){return this.parseSingleValue(e,t)}parseSingleValue(e,t){if(!t)return e;if(t.includes("#integer")||t.includes("#int"))return parseInt(e,10);if(t.includes("#decimal")||t.includes("#double"))return parseFloat(e);if(t.includes("#boolean"))return e==="true";if(t.includes("#dateTime"))return new Date(e);if(t.includes("#json"))try{return JSON.parse(e)}catch{return console.warn("Failed to parse JSON value:",e),e}return e.startsWith("http://")||e.startsWith("https://"),e}primaryKey(){return this._predicateUri="@id",this.options={...this.options,primaryKey:!0,required:!0,predicate:"@id"},this}notNull(){return this.options={...this.options,required:!0,notNull:!0},this}predicate(e){const t=resolveTermIri(e);return this._predicateUri=t,this.options={...this.options,predicate:t},this}default(e){return this.options={...this.options,defaultValue:e},this}defaultNow(){return this.options={...this.options,defaultValue:()=>new Date},this}inverse(e=!0){return this.options={...this.options,inverse:e},this}link(e){return typeof e=="string"?e.startsWith("http://")||e.startsWith("https://")?this.options={...this.options,linkTarget:e}:this.options={...this.options,linkTableName:e}:this.options={...this.options,linkTable:e},this}array(){return new ColumnBuilder(this.name,"array",{...this.options,baseType:this.dataType,isArray:!0},this._predicateUri,this.dataType)}getPredicateUri(){return this._predicateUri}}class PodColumnBase{constructor(e,t,r={},i){this.name=e,this.dataType=t,this.options=r,this.tableName=i}getPredicate(e){if(this.options.predicate)return this.options.predicate;if(e)return`${e.uri}${this.name}`;throw new Error(`Missing predicate for column "${this.name}"; please set namespace or predicate explicitly.`)}isLink(){return!!(this.options.linkTarget||this.options.linkTableName||this.options.linkTable)}getLinkTarget(){return this.options.linkTarget}getLinkTableName(){return this.options.linkTableName}getLinkTable(){return this.options.linkTable}primaryKey(){return this.options.primaryKey=!0,this.options.required=!0,this.options.predicate="@id",this}notNull(){return this.options.required=!0,this}default(e){return this.options.defaultValue=e,this}predicate(e){return this.options.predicate=resolveTermIri(e),this}link(e){return typeof e=="string"?e.startsWith("http://")||e.startsWith("https://")?this.options.linkTarget=e:this.options.linkTableName=e:this.options.linkTable=e,this}inverse(e=!0){return this.options.inverse=e,this}isInverse(){return this.options.inverse===!0}formatValue(e){if(e==null)throw new Error("Cannot format null or undefined value");if(this.options.isArray){if(!Array.isArray(e))throw new Error("Array column requires array value");return e.map(t=>this.formatSingleValue(t))}return this.formatSingleValue(e)}formatSingleValue(e){if(this.options.linkTarget&&typeof e=="string")return`<${e}>`;switch(this.dataType){case"string":return`"${String(e).replace(/"/g,'"')}"`;case"integer":return`"${Number(e)}"^^<http://www.w3.org/2001/XMLSchema#integer>`;case"boolean":return`"${e}"^^<http://www.w3.org/2001/XMLSchema#boolean>`;case"datetime":return`"${(e instanceof Date?e:new Date(e)).toISOString()}"^^<http://www.w3.org/2001/XMLSchema#dateTime>`;case"json":case"object":return`"${JSON.stringify(e).replace(/"/g,'"')}"^^<http://www.w3.org/2001/XMLSchema#json>`;case"uri":if(typeof e!="string"||!e.includes(":"))throw new Error(`URI column requires valid IRI, got: ${e}`);return`<${e}>`;default:return`"${String(e).replace(/"/g,'"')}"`}}}_a$b=entityKind;PodColumnBase[_a$b]="PodColumn";class PodStringColumn extends PodColumnBase{constructor(e,t={}){super(e,"string",t)}}class PodIntegerColumn extends PodColumnBase{constructor(e,t={}){super(e,"integer",t)}}class PodBooleanColumn extends PodColumnBase{constructor(e,t={}){super(e,"boolean",t)}}class PodDateTimeColumn extends PodColumnBase{constructor(e,t={}){super(e,"datetime",t)}}class PodJsonColumn extends PodColumnBase{constructor(e,t={}){super(e,"json",t)}}class PodObjectColumn extends PodColumnBase{constructor(e,t={}){super(e,"object",t)}}class PodUriColumn extends PodColumnBase{constructor(e,t={}){super(e,"uri",t)}}class PodArrayColumn extends PodColumnBase{constructor(e,t,r={}){super(e,"array",r),this.elementType=t}}function boolean$2(n,e={}){return new ColumnBuilder(n,"boolean",e)}function timestamp(n,e={}){return new ColumnBuilder(n,"datetime",e)}function json(n,e={}){return new ColumnBuilder(n,"json",e)}function object$1(n,e={}){return new ColumnBuilder(n,"object",e)}function uri(n,e={}){return new ColumnBuilder(n,"uri",e)}function iri(n,e={}){return uri(n,e)}function id(n="id",e={}){const t=new PodStringColumn(n,{...e,predicate:"@id",primaryKey:!0,required:!0,...e.defaultValue!==void 0?{defaultValue:e.defaultValue}:{}});return t._virtualId=!0,t}function string$2(n,e={}){return new ColumnBuilder(n,"string",e)}function int$1(n,e={}){return new ColumnBuilder(n,"integer",e)}function integer$1(n,e={}){return new ColumnBuilder(n,"integer",e)}function date$3(n,e={}){return new ColumnBuilder(n,"datetime",e)}function datetime$2(n,e={}){return new ColumnBuilder(n,"datetime",e)}function text(n,e={}){return new ColumnBuilder(n,"string",e)}function varchar(n,e={}){return new ColumnBuilder(n,"string",e)}function char(n,e={}){return new ColumnBuilder(n,"string",e)}function bigint(n,e={}){return new ColumnBuilder(n,"integer",e)}function smallint(n,e={}){return new ColumnBuilder(n,"integer",e)}function tinyint(n,e={}){return new ColumnBuilder(n,"integer",e)}function mediumint(n,e={}){return new ColumnBuilder(n,"integer",e)}function serial(n,e={}){return new ColumnBuilder(n,"integer",e)}function real(n,e={}){return new ColumnBuilder(n,"integer",e)}function decimal(n,e={}){return new ColumnBuilder(n,"integer",e)}function numeric(n,e={}){return new ColumnBuilder(n,"integer",e)}function float(n,e={}){return new ColumnBuilder(n,"integer",e)}function double(n,e={}){return new ColumnBuilder(n,"integer",e)}function jsonb(n,e={}){return new ColumnBuilder(n,"json",e)}function validateColumnOverride(n,e,t){const r=n.getPredicateUri?.()??n.options?.predicate,i=e.options?.predicate;if(r&&i&&r!==i)throw new Error(`Schema 继承错误: 不能修改 "${t}" 列的 predicate。父 schema 定义为 "${i}",子 schema 尝试改为 "${r}"。子类只能添加约束(notNull, default),不能更改 predicate。`)}function mergeSchemaColumns(n,e){const t={};for(const[r,i]of Object.entries(n.columns))t[r]=i;for(const[r,i]of Object.entries(e)){const s=n.columns[r];if(s&&!(i instanceof PodColumnBase)){validateColumnOverride(i,s,r);const o=i;!o.getPredicateUri?.()&&!o.options?.predicate&&(o.options={...o.options,predicate:s.options?.predicate})}t[r]=i}return t}function deepClone(n){if(n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array)return n.map(e=>deepClone(e));if(typeof n=="object"){const e={},t=n;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=deepClone(t[r]));return e}return n}function renderDefaultIdTemplate(n,e){if(!/\{[^{}]+\}/.test(n))return n;if(/\{\s*id\s*\}/.test(n))throw new Error("id default template uses {key} for the generated local key; {id} is the final resource id");const t=e.row??{},r=resolveDate(t,e.now),i={yyyy:String(r.getUTCFullYear()),MM:String(r.getUTCMonth()+1).padStart(2,"0"),dd:String(r.getUTCDate()).padStart(2,"0")};return n.replace(/\{([^{}]+)\}/g,(s,o)=>{const a=o.trim();if(a==="key")return e.key;if(a==="yyyy")return i.yyyy;if(a==="MM")return i.MM;if(a==="dd")return i.dd;const l=resolveExpression(a,t,e);return l==null?"":String(l)})}function resolveDate(n,e=new Date){const t=n.createdAt??n.favoredAt??n.indexedAt??e,r=t instanceof Date?t:new Date(typeof t=="number"&&Math.abs(t)<1e11?t*1e3:t);return Number.isFinite(r.getTime())?r:e}function resolveExpression(n,e,t){const r=parseExpression(n);let i=resolveTemplatePath(r.path,e,t);for(const s of r.transforms)i=applyTransform(i,s,r.path,t);return r.selector?applyPathSelector(i,r.selector):i}function parseExpression(n){const e=n.match(/^(.+?)\[(.*)\]$/),t=e?e[1].trim():n,[r,...i]=t.split("|").map(s=>s.trim()).filter(Boolean);return{path:r??n,transforms:i,selector:e?.[2]?.trim()}}function resolveTemplatePath(n,e,t){const r=n.split("."),i=r[0];return r.reduce((s,o,a)=>{if(typeof s=="string")return i?resolveResourceProperty(s,i,o,t):void 0;if(!(!s||typeof s!="object"))return i&&isResourceProperty(o)&&!((o==="id"||o==="key")&&o in s)?resolveResourceProperty(s,i,o,t):a>0&&o==="id"&&readRef(s)?extractResourceId(s,i??"",t):s[o]},e)}function isResourceProperty(n){return n==="id"||n==="key"||n==="doc"||n==="document"||n==="dir"||n==="owner"}function resolveResourceProperty(n,e,t,r){if(t==="id")return extractResourceId(n,e,r);const i=extractResourceId(n,e,r);if(i){if(t==="key"){const s=extractTemplateValuesForField(n,e,r);return s?.key??s?.id??deriveResourceKey(i)}if(t==="doc"||t==="document")return resourceDocument(i);if(t==="dir"||t==="owner")return deriveOwnerDir(i)}}function applyTransform(n,e,t,r){if(e==="slug")return slugifyValue(String(n??""));const i=extractResourceId(n,t,r);if(e==="resource")return i;if(e==="document")return i?resourceDocument(i):"";if(e==="owner")return i?deriveOwnerDir(i):"";const s=extractTemplateValuesForField(n,t,r);return e==="id"?s?.id??s?.key??i??"":s?.[e]??""}function extractResourceId(n,e,t){const r=readRef(n);if(!r)return null;const i=resolveLinkedResource(e,t);if(!i)return normalizePodDataResourceId$1(r);if(!isCompleteResourceId$1(r))return renderLinkedResourceId(i,r);const s=relativeSubjectFromRef$1(i,r);return normalizePodDataResourceId$1(s??r)}function extractTemplateValuesForField(n,e,t){const r=readRef(n);if(!r)return null;const i=resolveLinkedResource(e,t);if(!i)return null;const s=relativeSubjectFromRef$1(i,r)??(isCompleteResourceId$1(r)?null:renderLinkedResourceId(i,r));if(!s)return null;const o=resourceTemplate(i);return o?extractVarsFromTemplate(normalizePodDataResourceId$1(s),o):{id:normalizePodDataResourceId$1(s)}}function resolveLinkedResource(n,e){const t=e.links?.[n];if(t)return t;const r=e.resource?.columns?.[n];return r?.getLinkTable?.()??r?.options?.linkTable??null}function resourceTemplate(n){const e=n.getSubjectTemplate?.()??n.config?.subjectTemplate;if(e)return e;const t=n.columns?.id?.options?.defaultValue;return typeof t=="string"?t:null}function renderLinkedResourceId(n,e){const t=resourceTemplate(n);if(!t)return e;const r=n.columns?.id?.options?.defaultValue;return typeof r=="function"?String(r(e,{})):t.replace(/\{([^}]+)\}/g,(i,s)=>{const o=parseTemplateField(s);return o==="id"||o==="key"?e:""})}function readRef(n){if(typeof n=="string"&&n.length>0)return n;if(!n||typeof n!="object")return null;const e=n,t=e["@id"]??e.subject??e.id;return typeof t=="string"&&t.length>0?t:null}function resourcePath(n){return normalizeResourcePath$1(n.getResourcePath?.()??n.config?.base??"")}function relativeSubjectFromRef$1(n,e){const t=resourcePath(n);if(!t)return normalizePodDataResourceId$1(e);const r=Array.from(new Set([t,t.replace(/^\/+/,""),t.endsWith("/")?t.slice(0,-1):t].filter(Boolean)));for(const i of r){const s=e.indexOf(i);if(s<0)continue;let o=e.slice(s+i.length);return o.startsWith("/")&&(o=o.slice(1)),o.length>0?o:null}return normalizePodDataResourceId$1(e)}function extractVarsFromTemplate(n,e){let t=0;const r=new Map,i=[];let s=0;for(const a of e.matchAll(/\{([^}]+)\}/g)){i.push(escapeRegExp$1(e.slice(s,a.index)));const l=`var${t++}`;r.set(l,parseTemplateField(a[1]??"")),i.push(`(?<${l}>.+?)`),s=a.index+a[0].length}i.push(escapeRegExp$1(e.slice(s)));const o=i.join("");try{const a=n.match(new RegExp(`^${o}$`));if(!a?.groups)return null;const l={};for(const[c,u]of Object.entries(a.groups)){const f=r.get(c);!f||u===void 0||(l[f]=decodeURIComponent(u))}return l}catch{return null}}function parseTemplateField(n){const e=n.split("|").map(r=>r.trim()).filter(Boolean)[0]??n,t=e.replace(/\[[^\]]*\]$/u,"").trim();return t.split(".")[0]?.trim()||t||e}function escapeRegExp$1(n){return n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function applyPathSelector(n,e){const t=splitResourcePath(n);if(!t)return;if(/^-?\d+$/.test(e))return t[normalizeIndex(Number(e),t.length)];const r=e.match(/^(-?\d*)\s*:\s*(-?\d*)$/);if(!r)throw new Error(`Invalid id default path selector [${e}]`);const i=r[1]===""?0:normalizeSliceIndex(Number(r[1]),t.length),s=r[2]===""?t.length:normalizeSliceIndex(Number(r[2]),t.length);return t.slice(i,s).join("/")}function splitResourcePath(n){const e=readRef(n);if(!e)return null;const t=normalizePodDataResourceId$1(e),[r,i]=t.split("#"),s=(r??t).split("/").filter(Boolean);return i&&s.push(i),s}function normalizePodDataResourceId$1(n){const e=n.indexOf("#"),[t,r=""]=e>=0?[n.slice(0,e),n.slice(e)]:[n,""],i=t.indexOf("/.data/");return`${i>=0?t.slice(i+7):t.replace(/^\/?\.data\//u,"").replace(/^\/+/u,"")}${r}`}function normalizeResourcePath$1(n){return n.trim().replace(/^(\.\/)+/,"")}function isCompleteResourceId$1(n){return/^https?:\/\//u.test(n)||n.startsWith("/")||n.startsWith("#")||n.includes("#")||/\.(ttl|jsonld|json)(?:$|[?#])/iu.test(n)}function deriveOwnerDir(n){const e=normalizePodDataResourceId$1(n),t=e.indexOf("#"),r=t>=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"",s=r.match(/^(.+)\/\d{4}\/\d{2}\/\d{2}\/[^/]+\.(?:ttl|jsonld|json)$/i);if(s?.[1])return s[1];if(r==="task/index.ttl"&&i&&i!=="this")return`task/${i}`;const o=r.match(/^(.+)\/index\.(?:ttl|jsonld|json)$/i);if(o?.[1])return o[1];const a=r.match(/^(.+)\.(?:ttl|jsonld|json)$/i);if(a?.[1])return a[1];const l=r.split("/").filter(Boolean);return l.length>1?l.slice(0,-1).join("/"):r}function resourceDocument(n){const e=normalizePodDataResourceId$1(n),t=e.indexOf("#");return t>=0?e.slice(0,t):e}function deriveResourceKey(n){const e=normalizePodDataResourceId$1(n),t=e.indexOf("#");if(t>=0){const a=e.slice(t+1);if(a&&a!=="this"&&a!=="me"&&a!=="it")return a}const r=resourceDocument(e).replace(/\/+$/u,""),i=r.match(/(?:^|\/)([^/]+)\/index\.(?:ttl|jsonld|json)$/iu);if(i?.[1])return i[1];const s=r.match(/(?:^|\/)([^/]+)\.(?:ttl|jsonld|json)$/iu);if(s?.[1])return s[1];const o=r.split("/").filter(Boolean);return o.length>0?o[o.length-1]:e}function slugifyValue(n){return n.normalize("NFKC").toLowerCase().trim().replace(/[\s_]+/g,"-").replace(/[^\p{Letter}\p{Number}.-]+/gu,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function normalizeIndex(n,e){return n<0?e+n:n}function normalizeSliceIndex(n,e){const t=n<0?e+n:n;return Math.max(0,Math.min(e,t))}function parseTemplateVariableField$1(n){const e=n.split("|").map(r=>r.trim()).filter(Boolean)[0]??n,t=e.replace(/\[[^\]]*\]$/u,"").trim();return t.split(".")[0]?.trim()||t||e}function normalizeResourcePath(n){return n.trim().replace(/^(\.\/)+/,"")}function podResourcePath(n){return normalizeResourcePath(n.getResourcePath?.()??n.config?.base??"")}function podResourceSubjectTemplate(n){return n.getSubjectTemplate?.()??n.config?.subjectTemplate}function podResourceIdDefaultTemplate(n){const e=n.columns?.id?.options?.defaultValue;return typeof e=="string"?e:void 0}function resourceRelativePrefix(n){const e=podResourcePath(n),t=normalizeResourcePath(n.getContainerPath?.()??n.config?.containerPath??"");return e?t&&e.startsWith(t)?normalizeResourcePath(e.slice(t.length)):e.split("/").pop()??e:""}function qualifyFragmentResourceId(n,e){if(!e.startsWith("#"))return e;const t=resourceRelativePrefix(n);return t?`${t}${e}`:e}function templateRelativeSubject(n,e){if((podResourceSubjectTemplate(n)??podResourceIdDefaultTemplate(n))?.startsWith("#")&&!e.startsWith("#")){const r=e.indexOf("#");if(r>=0)return e.slice(r)}return e}function isBaseRelativeSubjectId$1(n){return!n||/^https?:\/\//.test(n)||n.startsWith("/")?!1:n.startsWith("#")||n.includes("#")||/\.(ttl|jsonld|json)(?:#|$)/i.test(n)}function isTemplateCompleteResourceId(n,e){if(!e||/^https?:\/\//.test(e)||e.startsWith("/"))return!1;const t=podResourceSubjectTemplate(n)??podResourceIdDefaultTemplate(n);return t?extractTemplateValues(templateRelativeSubject(n,e),t)!==null:!1}function isResourceRelativeSubjectId(n,e){return isBaseRelativeSubjectId$1(e)||isTemplateCompleteResourceId(n,e)}function relativeSubjectFromRef(n,e){const t=podResourcePath(n);if(!t)return null;const r=Array.from(new Set([t,t.replace(/^\/+/,""),t.endsWith("/")?t.slice(0,-1):t].filter(Boolean)));for(const i of r){const s=e.indexOf(i);if(s<0)continue;let o=e.slice(s+i.length);if(o.startsWith("/")&&(o=o.slice(1)),o.length>0)return o}return isBaseRelativeSubjectId$1(e)||isTemplateCompleteResourceId(n,e)?normalizeResourcePath(e):null}function extractTemplateValues(n,e){if(!e.includes("{"))return n===e?{}:null;let t=0;const r=new Map,i=[];let s=0;for(const a of e.matchAll(/\{([^}]+)\}/g)){i.push(escapeRegExp(e.slice(s,a.index)));const l=`var${t++}`;r.set(l,parseTemplateVariableField$1(a[1]??"")),i.push(`(?<${l}>.+?)`),s=a.index+a[0].length}i.push(escapeRegExp(e.slice(s)));const o=`^${i.join("")}$`;try{const a=n.match(new RegExp(o));if(!a?.groups)return null;const l={};for(const[c,u]of Object.entries(a.groups)){const f=r.get(c);if(!f||u===void 0)continue;const d=decodeURIComponent(u);if(f in l&&l[f]!==d)return null;l[f]=d}return l}catch{return null}}function escapeRegExp(n){return n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function parsePodResourceRef(n,e){if(!e)return null;const t=relativeSubjectFromRef(n,e);if(!t)return null;const r=qualifyFragmentResourceId(n,t),i=podResourceSubjectTemplate(n)??podResourceIdDefaultTemplate(n),s=i?extractTemplateValues(templateRelativeSubject(n,r),i):{id:decodeURIComponent(r)};return s?{resourceId:decodeURIComponent(r),templateValues:s}:null}function extractPodResourceTemplateValue(n,e,t="id"){return parsePodResourceRef(n,e)?.templateValues[t]??null}function resolvePodBaseUrl(n){const e=n.trim();return e?e.includes("/profile/card#me")?e.replace("/profile/card#me","").replace(/\/+$/u,""):e.replace(/\/+$/u,""):""}function resolvePodBaseUrlFromDatabase(n){if(!n||typeof n!="object")return null;const e=n,t=typeof e.getDialect=="function"?e.getDialect():null,r=readPodUrl(t);if(r)return resolvePodBaseUrl(r);const i=typeof e.getSession=="function"?e.getSession():e.session,s=readPodUrl(i);if(s)return resolvePodBaseUrl(s);const o=readWebId(i);return o&&o.includes("/profile/card#me")?resolvePodBaseUrl(o):null}function normalizePodDataResourceId(n){const e=n.indexOf("#"),[t,r=""]=e>=0?[n.slice(0,e),n.slice(e)]:[n,""],i=t.indexOf("/.data/");return`${i>=0?t.slice(i+7):t.replace(/^\/?\.data\//u,"").replace(/^\/+/u,"")}${r}`}function resolvePodResourceId(n,e){const t=resolveKnownTargetIri(e);if(t)return parsePodResourceRef(n,t)?.resourceId??normalizePodDataResourceId(t);if(typeof e=="string")return assertCompleteStringResourceId(n,e),normalizePodDataResourceId(e);const r=typeof e.id=="string"&&e.id.trim().length>0?e.id.trim():void 0;if(!r)throw new Error("resolvePodResourceId requires a resource id on target.id or a full target IRI");if(isCompleteResourceId(r)||isTemplateCompleteResourceId(n,r))return normalizePodDataResourceId(r);const i=resolveDefaultResourceId(n,r,e);if(i)return normalizePodDataResourceId(i);const s=podResourceSubjectTemplate(n);return normalizePodDataResourceId(s?renderSubjectTemplateResourceId(s,r,e):r)}function resolvePodResourceTemplateValue(n,e,t="id"){return extractPodResourceTemplateValue(n,e,t)}function buildPodResourceIri(n,e){const t=resolvePodBaseUrl(n);if(!t||/^https?:\/\//u.test(e))return e;const r=e.startsWith("/")?e:`/.data/${normalizePodDataResourceId(e)}`;return new URL(r.replace(/^\/+/u,""),`${t}/`).toString()}function buildPodResourceIriForResource(n,e,t){const r=resolveKnownTargetIri(t);if(r)return r;const i=resolvePodRootTargetPath(t);if(i)return buildPodResourceIri(n,i);const s=resolvePodResourceId(e,t),o=isResourceRelativeSubjectId(e,s)?`${podResourcePath(e).replace(/\/+$/u,"")}/${normalizeResourcePath(s)}`:e.resolveUri?.(s)??`/.data/${normalizePodDataResourceId(s)}`;return buildPodResourceIri(n,o)}function buildPodResourceIriForDatabase(n,e,t){const r=resolvePodBaseUrlFromDatabase(n);if(!r)throw new Error("buildPodResourceIriForDatabase requires a database with a Pod URL or WebID");return buildPodResourceIriForResource(r,e,t)}function resolvePodResourceIriForDatabase(n,e,t){if(!t)return null;try{return buildPodResourceIriForDatabase(n,e,t)}catch{return null}}function resolveKnownTargetIri(n){if(typeof n=="string")return/^https?:\/\//u.test(n)?n:null;const e=n["@id"]??n.subject;return typeof e=="string"&&/^https?:\/\//u.test(e)?e:null}function resolvePodRootTargetPath(n){if(typeof n=="string")return n.startsWith("/")?n:null;const e=typeof n.id=="string"?n.id.trim():"";return e.startsWith("/")?e:null}function isCompleteResourceId(n){return/^https?:\/\//u.test(n)||n.startsWith("/")||n.startsWith("#")||n.includes("#")||/\.(ttl|jsonld|json)(?:$|[?#])/iu.test(n)}function assertCompleteStringResourceId(n,e){if(isCompleteResourceId(e)||isTemplateCompleteResourceId(n,e))return;const t=n.columns?.id?.options?.defaultValue!==void 0,r=podResourceSubjectTemplate(n);if(t||r)throw new Error("resolvePodResourceId does not accept local keys as string targets. Pass a structured row object with id and required fields, or pass a complete resource id/IRI.")}function resolveDefaultResourceId(n,e,t){const r=n.columns?.id?.options?.defaultValue;if(r===void 0)return null;if(typeof r=="string")return renderDefaultIdTemplate(r,{key:e,row:t,resource:n});if(typeof r!="function")return String(r);const i=r;return i.length===0?String(i()):String(i(e,t))}function renderSubjectTemplateResourceId(n,e,t){const r=n.replace(/\{\s*id\s*\}/gu,"{key}");return renderDefaultIdTemplate(r,{key:encodeURIComponent(e),row:t})}function readPodUrl(n){if(!n||typeof n!="object")return null;const e=n,t=typeof e.getPodUrl=="function"?e.getPodUrl():e.info?.podUrl??e.podUrl;return typeof t=="string"&&t.trim().length>0?t:null}function readWebId(n){if(!n||typeof n!="object")return null;const e=n,t=e.info?.webId??e.webId;return typeof t=="string"&&t.trim().length>0?t:null}var _a$a;class PodTable{constructor(e,t,r){this.initialized=!1;const i=r.type;if(!i)throw new Error("podTable requires a type (RDF class) via options.type");const s=r.typeIndex,o=s==="private"||s==="public",a=this.resolveBase(r.base,e);this.resourcePath=a.resourcePath,this.containerPath=a.containerPath;const l=this.resolveSubjectTemplate(r.subjectTemplate,a.resourcePath,a.containerPath,e);this.subjectTemplate=l.template,this.hasCustomSubjectTemplate=l.isCustom,this.resourceMode=r.resourceMode??(r.sparqlEndpoint?"sparql":void 0),this.sparqlEndpoint=r.sparqlEndpoint,this.registerTypeIndexEnabled=o&&r.autoRegister!==!1,this.config={name:e,base:a.resourcePath,type:resolveTermIri(i),namespace:r.namespace,typeIndex:o?s:void 0,saiRegistryPath:r.saiRegistryPath,autoRegister:r.autoRegister,containerPath:a.containerPath,hooks:r.hooks},this.subjectTemplate&&(this.config.subjectTemplate=this.subjectTemplate),this.parentClasses=this.normalizeParents(r.subClassOf??[]),this.parentClasses.length>0&&(this.config.subClassOf=[...this.parentClasses]),this.columns=t,Object.assign(this,t);let c=0;for(const u of Object.values(t))if(u.options.primaryKey&&c++,u.table=this,u.tableName=e,!u.options.predicate&&!u._virtualId&&!r.namespace)throw new Error(`Column "${u.name}" in table "${e}" is missing a predicate.`);if(c!==1)throw new Error(`PodTable "${e}" must have exactly one primary key column. Found ${c}.`);this.$inferSelect={},this.$inferInsert={},this.$inferUpdate={},this._={brand:"Table",config:this.config,name:e,schema:void 0,columns:t,inferSelect:{},inferInsert:{},inferUpdate:{}},this.mapping=this.buildTableMapping()}getContainerPath(){return this.containerPath}getType(){return this.config.type}getRdfClass(){return this.getType()}getNamespace(){return this.config.namespace}getSubjectTemplate(){return this.subjectTemplate}buildId(e){return resolvePodResourceId(this,e)}buildIri(e,t){return buildPodResourceIriForResource(e,this,t)}buildIriForDatabase(e,t){return buildPodResourceIriForDatabase(e,this,t)}resolveIriForDatabase(e,t){return resolvePodResourceIriForDatabase(e,this,t)}parseRef(e){return parsePodResourceRef(this,e)}extractTemplateValue(e,t="id"){return extractPodResourceTemplateValue(this,e,t)}hasCustomTemplate(){return this.hasCustomSubjectTemplate}getSubClassOf(){return[...this.parentClasses]}getMapping(){return this.mapping}get $schema(){return new SolidSchema(this.columns,{type:this.config.type,namespace:this.config.namespace,subjectTemplate:this.subjectTemplate,subClassOf:this.parentClasses.length>0?[...this.parentClasses]:void 0})}resolveUri(e){const t=this.subjectTemplate;if(!t)return/^https?:\/\//.test(e)||e.startsWith("/")?e:`${this.config.base.endsWith("/")?this.config.base:`${this.config.base}/`}${e}`;const r=t.replace(/\{id\}/g,e);return r.startsWith("#")?`${this.resourcePath}${r}`:`${this.containerPath.endsWith("/")?this.containerPath:`${this.containerPath}/`}${r}`}resolveBase(e,t){if(!e||e.trim().length===0)throw new Error(`podTable '${t}' requires a 'base' option.`);const r=this.normalizeBaseInput(e),i=this.normalizeResourcePath(r);if(i.endsWith("/")){const o=this.ensureTrailingSlash(i);return{resourcePath:o,containerPath:o}}const s=this.ensureTrailingSlash(this.deriveContainerPath(i));return{resourcePath:i,containerPath:s}}normalizeBaseInput(e){const t=e.trim(),r=t.match(/^([a-zA-Z][\w+.-]*):\/\/(.*)$/);if(r){const[,i,s]=r,o=i.toLowerCase(),a=s.trim();return o==="http"||o==="https"?`${o}://${a}`:a.startsWith("/")?a:`/${a}`}return t}normalizeResourcePath(e){if(/^[a-zA-Z][\w+.-]*:\/\//.test(e))return e;const r=e.trim().replace(/^(\.\/)+/,"").replace(/\/+/g,"/");return r.startsWith("/")?r:`/${r}`}deriveContainerPath(e){const t=e.endsWith("/")?e.slice(0,-1):e,r=t.lastIndexOf("/");return r===-1?"/":t.slice(0,r+1)}ensureTrailingSlash(e){return e.endsWith("/")?e:`${e}/`}getResourcePath(){return this.resourcePath}getResourceMode(){return this.resourceMode}getSparqlEndpoint(){return this.sparqlEndpoint}shouldRegisterTypeIndex(){return this.registerTypeIndexEnabled}async init(e){await e.registerTable(this)}isInitialized(){return this.initialized}markInitialized(e=!0){this.initialized=e}setBase(e){const t=this.resolveBase(e,this.config.name);this.resourcePath=t.resourcePath,this.containerPath=t.containerPath,this.config.base=t.resourcePath,this.config.containerPath=t.containerPath,this._?.config&&(this._.config.base=this.config.base,this._.config.containerPath=this.config.containerPath),this.hasCustomSubjectTemplate||(this.subjectTemplate=void 0,delete this.config.subjectTemplate,this._?.config&&delete this._.config.subjectTemplate),this.mapping=this.buildTableMapping()}setSubjectTemplate(e){this.subjectTemplate=e,this.hasCustomSubjectTemplate=!0,this.config.subjectTemplate=e,this._?.config&&(this._.config.subjectTemplate=e),this.mapping=this.buildTableMapping()}setSparqlEndpoint(e){this.sparqlEndpoint=e,this.resourceMode||(this.resourceMode="sparql")}getColumns(){return this.columns}getColumn(e){return this.columns[e]}hasColumn(e){return e in this.columns}resolveSubjectTemplate(e,t,r,i){return e&&e.trim().length>0?{template:e.trim(),isCustom:!0}:{template:void 0,isCustom:!1}}buildTableMapping(){const e={};for(const t of Object.values(this.columns))e[t.name]=this.buildColumnMapping(t);return{name:this.config.name,type:this.config.type,subjectTemplate:this.subjectTemplate,namespace:this.config.namespace,subClassOf:this.parentClasses.length>0?[...this.parentClasses]:void 0,columns:e,relations:this.relations}}buildColumnMapping(e){const t=e._virtualId?"@id":e.getPredicate(this.config.namespace);return{column:e.name,predicate:t,kind:e.isLink()?"object":"datatype",datatype:this.inferColumnDatatype(e),linkTarget:e.getLinkTarget(),isArray:e.options.isArray??!1,inverse:e.isInverse()}}inferColumnDatatype(e){switch(e.dataType){case"string":return"http://www.w3.org/2001/XMLSchema#string";case"integer":return"http://www.w3.org/2001/XMLSchema#integer";case"boolean":return"http://www.w3.org/2001/XMLSchema#boolean";case"datetime":return"http://www.w3.org/2001/XMLSchema#dateTime";case"json":case"object":return"http://www.w3.org/2001/XMLSchema#json";default:return}}normalizeParents(e){if(!e)return[];const r=(Array.isArray(e)?e:[e]).map(i=>resolveTermIri(i)).filter(i=>i&&i.length>0);return Array.from(new Set(r))}}_a$a=entityKind;PodTable[_a$a]="PodTable";function clonePodColumn(n){const e=deepClone(n.options);let t;switch(n.dataType){case"integer":t=new PodIntegerColumn(n.name,e);break;case"datetime":t=new PodDateTimeColumn(n.name,e);break;case"boolean":t=new PodBooleanColumn(n.name,e);break;case"json":t=new PodJsonColumn(n.name,e);break;case"object":t=new PodObjectColumn(n.name,e);break;case"array":{const r=n.elementType??n.options.baseType??"string";t=new PodArrayColumn(n.name,r,e);break}case"uri":t=new PodUriColumn(n.name,e);break;default:t=new PodStringColumn(n.name,e);break}return n._virtualId&&(t._virtualId=!0),t.relationName=n.relationName,t}function alias(n,e){if(typeof e!="string"||e.trim().length===0)throw new Error("alias() requires a non-empty alias name");const t={};for(const[i,s]of Object.entries(n.columns))t[i]=clonePodColumn(s);const r=new PodTable(e.trim(),t,{base:n.config.base,sparqlEndpoint:n.getSparqlEndpoint(),type:n.config.type,namespace:n.config.namespace,typeIndex:n.config.typeIndex,saiRegistryPath:n.config.saiRegistryPath,subClassOf:n.config.subClassOf,subjectTemplate:n.config.subjectTemplate,resourceMode:n.getResourceMode(),autoRegister:n.config.autoRegister,hooks:n.config.hooks});return r.relations=n.relations,n.isInitialized()&&r.markInitialized(!0),r}function podTable(n,e,t){const r={};for(const[i,s]of Object.entries(e)){if(s instanceof PodColumnBase){r[i]=s;continue}let o;switch(s.dataType){case"integer":o=new PodIntegerColumn(s.name,s.options);break;case"datetime":o=new PodDateTimeColumn(s.name,s.options);break;case"boolean":o=new PodBooleanColumn(s.name,s.options);break;case"json":o=new PodJsonColumn(s.name,s.options);break;case"object":o=new PodObjectColumn(s.name,s.options);break;case"array":{const l=s.elementType??s.options.baseType??"string";o=new PodArrayColumn(s.name,l,s.options);break}case"uri":o=new PodUriColumn(s.name,s.options);break;default:o=new PodStringColumn(s.name,s.options);break}const a=s.getPredicateUri?.();a&&o.predicate(a),r[i]=o}return new PodTable(n,r,t)}class SolidSchema{constructor(e,t){this.columns=e,this.options=t,this.$kind="SolidSchema",this.namespace=t.namespace,this.subjectTemplate=t.subjectTemplate,this.subClassOf=t.subClassOf?Array.isArray(t.subClassOf)?t.subClassOf.map(resolveTermIri):[resolveTermIri(t.subClassOf)]:void 0}table(e,t){return new PodTable(e,this.columns,{...this.options,...t})}extend(e,t){const r=mergeSchemaColumns(this,e),i=[this.type];return this.subClassOf&&i.push(...this.subClassOf),solidSchema(r,{...t,subClassOf:i})}get type(){return resolveTermIri(this.options.type)}}function solidSchema(n,e){const t={};for(const[r,i]of Object.entries(n)){if(i instanceof PodColumnBase){t[r]=i;continue}let s;switch(i.dataType){case"integer":s=new PodIntegerColumn(i.name,i.options);break;case"datetime":s=new PodDateTimeColumn(i.name,i.options);break;case"boolean":s=new PodBooleanColumn(i.name,i.options);break;case"json":s=new PodJsonColumn(i.name,i.options);break;case"object":s=new PodObjectColumn(i.name,i.options);break;case"array":{const a=i.elementType??i.options.baseType??"string";s=new PodArrayColumn(i.name,a,i.options);break}case"uri":s=new PodUriColumn(i.name,i.options);break;default:s=new PodStringColumn(i.name,i.options);break}const o=i.getPredicateUri?.();o&&s.predicate(o),t[r]=s}return new SolidSchema(t,e)}function isSolidSchema(n){return n instanceof SolidSchema||n?.$kind==="SolidSchema"}function relations(n,e){const r=e({one:(i,s={})=>{const o=isSolidSchema(i);return{type:"one",table:i,fields:s.fields,references:s.references,relationName:s.relationName,discover:s.discover,isFederated:o}},many:(i,s={})=>{const o=isSolidSchema(i);return{type:"many",table:i,fields:s.fields,references:s.references,relationName:s.relationName,discover:s.discover,isFederated:o}}});return n.relations=r,r}const index=Object.freeze(Object.defineProperty({__proto__:null,ColumnBuilder,PodArrayColumn,PodBooleanColumn,PodColumnBase,PodDateTimeColumn,PodIntegerColumn,PodJsonColumn,PodObjectColumn,PodStringColumn,PodTable,PodUriColumn,SolidSchema,alias,bigint,boolean:boolean$2,char,date:date$3,datetime:datetime$2,decimal,double,float,generateNanoId,hasStringValue:hasStringValue$2,hasTermValue,id,int:int$1,integer:integer$1,iri,isSolidSchema,json,jsonb,mediumint,mergeSchemaColumns,numeric,object:object$1,podTable,real,relations,resolveTermIri,serial,smallint,solidSchema,string:string$2,text,timestamp,tinyint,uri,validateColumnOverride,varchar},Symbol.toStringTag,{value:"Module"})),XSD$8="http://www.w3.org/2001/XMLSchema#";function getPredicateForColumn(n,e){if(!n)return"http://example.org/unknown";if(typeof e.getMapping=="function"){const i=e.getMapping()?.columns?.[n.name];if(i?.predicate)return i.predicate}if(typeof n.getPredicateUri=="function")return n.getPredicateUri();if(n._predicateUri)return n._predicateUri;if(n.predicate&&typeof n.predicate=="string")return n.predicate;const t=e instanceof SolidSchema?e.options.namespace:e.config.namespace;if(typeof n.getPredicate=="function")try{return n.getPredicate(t)}catch{}return n.options?.predicate?n.options.predicate:t?`${typeof t=="string"?t:t.uri}${n.name}`:(n.name==="id"&&console.log("[DEBUG] getPredicateForColumn 'id' fallback to example.org. Column:",n),`http://example.org/${n.name}`)}function formatValue(n,e,t,r){return Array.isArray(n)?n.map(i=>formatSingleValue(i,e,t,r)):formatSingleValue(n,e,t,r)}function formatSingleValue(n,e,t,r){if(n==null)return'""';if(e?.dataType==="uri"||e?.options?.linkTarget){const i=String(n);if(i.startsWith("<")&&i.endsWith(">")){const s=i.slice(1,-1);return t&&!t.isAbsoluteUri(s)?`<${t.resolveLink(s,e,r)}>`:i}return t?`<${t.resolveLink(i,e,r)}>`:i.startsWith("<")?i:`<${i}>`}return typeof n=="string"?!e&&(n.startsWith("http://")||n.startsWith("https://"))?`<${n}>`:`"${n.replace(/\\/g,"\\\\").replace(/"/g,'"')}"`:typeof n=="number"?Number.isInteger(n)?String(n):`"${n}"^^<${XSD$8}decimal>`:typeof n=="boolean"?`"${n}"^^<${XSD$8}boolean>`:n instanceof Date?`"${n.toISOString()}"^^<${XSD$8}dateTime>`:`"${String(n)}"`}function resolveColumn(n,e){if(n&&typeof n=="object"&&n instanceof PodColumnBase)return n;if(n&&typeof n=="object"&&"name"in n){const t=n.name;if(typeof t=="string"&&e.columns[t])return e.columns[t]}if(typeof n=="string"){const t=e.columns[n];if(t)return t}throw new Error(`Unable to resolve column reference for select field: ${String(n)}`)}function generateSubjectUri(n,e,t){const r=t.resolveSubject(e,n);if(!r)throw new Error("Failed to generate subject URI");return r}var _a$9;class SPARQLExpression{constructor(){this[_a$9]="SPARQLExpression"}}_a$9=Symbol.toStringTag;class BinaryExpression extends SPARQLExpression{constructor(e,t,r){super(),this.left=e,this.operator=t,this.right=r,this.type="binary_expr"}}class LogicalExpression extends SPARQLExpression{constructor(e,t){super(),this.operator=e,this.expressions=t,this.type="logical_expr"}}class UnaryExpression extends SPARQLExpression{constructor(e,t){super(),this.operator=e,this.value=t,this.type="unary_expr"}}class SelectionAliasExpression extends SPARQLExpression{constructor(e){super(),this.alias=e}}function eq(n,e){return new BinaryExpression(n,"=",e)}function ne(n,e){return new BinaryExpression(n,"!=",e)}function gt(n,e){return new BinaryExpression(n,">",e)}function gte(n,e){return new BinaryExpression(n,">=",e)}function lt(n,e){return new BinaryExpression(n,"<",e)}function lte(n,e){return new BinaryExpression(n,"<=",e)}function like(n,e){return new BinaryExpression(n,"LIKE",e)}function ilike(n,e){return new BinaryExpression(n,"ILIKE",e)}function between(n,e,t){return new BinaryExpression(n,"BETWEEN",[e,t])}function notBetween(n,e,t){return new BinaryExpression(n,"NOT BETWEEN",[e,t])}function regex(n,e,t){return new BinaryExpression(n,"REGEX",{pattern:e,flags:t})}function inArray(n,e){return new BinaryExpression(n,"IN",e)}function notInArray(n,e){return new BinaryExpression(n,"NOT IN",e)}function isNull(n){return new UnaryExpression("IS NULL",n)}function isNotNull(n){return new UnaryExpression("IS NOT NULL",n)}function and(...n){return new LogicalExpression("AND",n.filter(Boolean))}function or(...n){return new LogicalExpression("OR",n.filter(Boolean))}function not(n){return new UnaryExpression("NOT",n)}function exists(n){return new UnaryExpression("EXISTS",n)}function notExists(n){return new UnaryExpression("NOT EXISTS",n)}const conditions={eq,ne,gt,gte,lt,lte,like,ilike,between,notBetween,regex,inArray,notInArray,isNull,isNotNull,and,or,not,exists,notExists};function parseActivityStreamsMessage(n){const e=JSON.parse(n);return{id:e.id||e["@id"]||"",type:e.type,object:typeof e.object=="string"?e.object:e.object?.id||e.object?.["@id"]||"",published:e.published||new Date().toISOString(),state:e.state}}class BaseChannel{constructor(e){this._connected=!1,this.config=e}get connected(){return this._connected}handleMessage(e){try{const t=parseActivityStreamsMessage(e);this.config.onNotification(t)}catch(t){this.handleError(new Error(`Failed to parse notification: ${t}`))}}handleError(e){this.config.onError?this.config.onError(e):console.error("[NotificationChannel] Error:",e)}handleClose(){this._connected=!1,this.config.onClose&&this.config.onClose()}}class SSEChannel extends BaseChannel{constructor(e){super(e),this.abortController=null,this.reader=null,this.contentType=""}async connect(){if(this._connected)return;this.abortController=new AbortController;const e=this.config.fetch||fetch;try{const t=`notify-sse-${Date.now()}`,r=await e(this.config.receiveFrom,{method:"GET",headers:{Accept:"text/turtle, text/event-stream","X-Request-ID":t},signal:this.abortController.signal});if(!r.ok)throw new Error(`SSE connection failed: ${r.status} ${r.statusText}`);if(!r.body)throw new Error("SSE response has no body");this.contentType=r.headers.get("content-type")||"",this._connected=!0,this.reader=r.body.getReader(),this.readStream()}catch(t){throw t.name!=="AbortError"&&this.handleError(t),t}}disconnect(){this.abortController&&(this.abortController.abort(),this.abortController=null),this.reader&&(this.reader.cancel().catch(()=>{}),this.reader=null),this._connected=!1,this.handleClose()}async readStream(){if(!this.reader)return;const e=new TextDecoder;let t="";try{for(;this._connected;){const{done:r,value:i}=await this.reader.read();if(r){t.trim()&&this.parseNotification(t.trim()),this.handleClose();break}const s=e.decode(i,{stream:!0});t+=s,this.contentType.includes("text/turtle")?t=this.processTurtleBuffer(t):t=this.processSSEBuffer(t)}}catch(r){r.name!=="AbortError"&&this.handleError(r)}}processTurtleBuffer(e){const t=e.split(`
2
2
  `);let r="";for(let i=0;i<t.length;i++){const s=t[i];r+=s+`
3
3
  `,s.trim().endsWith(".")&&(this.parseTurtleNotification(r.trim()),r="")}return r}processSSEBuffer(e){const t=e.split(`
4
4