@blinkk/root-cms 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/app.js +5 -5
  2. package/dist/{chunk-3HARN4U6.js → chunk-7Z5IRD2G.js} +176 -83
  3. package/dist/{chunk-2BSW7SIH.js → chunk-N4K6ICFR.js} +4 -4
  4. package/dist/{chunk-BGTUWIV6.js → chunk-PNLLZXVY.js} +4 -4
  5. package/dist/{chunk-C245C557.js → chunk-RXWDB3K4.js} +3 -3
  6. package/dist/{chunk-XLX37FRL.js → chunk-TEKMLYXS.js} +3 -4
  7. package/dist/cli/cli.d.ts +12 -0
  8. package/dist/cli/docs.d.ts +49 -0
  9. package/dist/cli/export.d.ts +11 -0
  10. package/dist/cli/generate-types.d.ts +6 -0
  11. package/dist/cli/import.d.ts +13 -0
  12. package/dist/cli/init-firebase.d.ts +7 -0
  13. package/dist/cli/utils.d.ts +27 -0
  14. package/dist/cli.js +10 -10
  15. package/dist/client.js +1 -1
  16. package/dist/core/ai-tools.d.ts +156 -0
  17. package/dist/core/ai.d.ts +330 -0
  18. package/dist/core/api.d.ts +21 -0
  19. package/dist/core/app.d.ts +16 -0
  20. package/dist/core/checks-translations.d.ts +13 -0
  21. package/dist/core/checks.d.ts +48 -0
  22. package/dist/core/client.d.ts +715 -0
  23. package/dist/core/core.d.ts +5 -0
  24. package/dist/core/cron.d.ts +19 -0
  25. package/dist/core/csv.d.ts +5 -0
  26. package/dist/core/functions.d.ts +9 -0
  27. package/dist/core/plugin.d.ts +357 -0
  28. package/dist/{project.d.ts → core/project.d.ts} +8 -12
  29. package/dist/core/richtext.d.ts +101 -0
  30. package/dist/{core.d.ts → core/route.d.ts} +13 -66
  31. package/dist/core/runtime.d.ts +46 -0
  32. package/dist/{schema-Db_xODoi.d.ts → core/schema.d.ts} +47 -100
  33. package/dist/core/search-extract.d.ts +70 -0
  34. package/dist/core/search-index.d.ts +182 -0
  35. package/dist/core/search-query.d.ts +68 -0
  36. package/dist/core/security.d.ts +6 -0
  37. package/dist/core/server-version.d.ts +5 -0
  38. package/dist/core/services-notifications.d.ts +57 -0
  39. package/dist/core/services.d.ts +44 -0
  40. package/dist/core/sse.d.ts +10 -0
  41. package/dist/core/translations-manager.d.ts +187 -0
  42. package/dist/core/translations.d.ts +83 -0
  43. package/dist/core/url-safety.d.ts +19 -0
  44. package/dist/core/validation.d.ts +30 -0
  45. package/dist/core/values.d.ts +9 -0
  46. package/dist/core/versions.d.ts +48 -0
  47. package/dist/core.js +1 -1
  48. package/dist/edit-M4PN4SGX.js +7 -0
  49. package/dist/functions.js +4 -4
  50. package/dist/{generate-types-SPV7I3A5.js → generate-types-JWIG4QVI.js} +1 -1
  51. package/dist/plugin.js +124 -129
  52. package/dist/shared/marshal.d.ts +68 -0
  53. package/dist/shared/objects.d.ts +9 -0
  54. package/dist/shared/richtext.d.ts +74 -0
  55. package/dist/shared/safe-json.d.ts +11 -0
  56. package/dist/shared/sanitize.d.ts +12 -0
  57. package/dist/shared/slug.d.ts +19 -0
  58. package/dist/shared/sse.d.ts +16 -0
  59. package/dist/shared/strings.d.ts +23 -0
  60. package/dist/ui/AIPage-2LUC2PWC.js +1 -0
  61. package/dist/ui/AssetsPage-PODV4QAB.js +1 -0
  62. package/dist/ui/CollectionPage-4DMKW5YB.js +1 -0
  63. package/dist/ui/ComparePage-JMJE5A5Y.js +1 -0
  64. package/dist/ui/DataPage-MVLZT2BU.js +1 -0
  65. package/dist/ui/DataSourcePage-4RPBXRI2.js +1 -0
  66. package/dist/ui/DocTranslationsPage-XJSPKGVX.js +1 -0
  67. package/dist/ui/DocumentPage-R2PVNG24.js +1 -0
  68. package/dist/ui/EditDataSourcePage-3SHAARNL.js +1 -0
  69. package/dist/ui/EditReleasePage-G5VW2OGW.js +1 -0
  70. package/dist/ui/ImageEditorDialog-4H665KK2.js +81 -0
  71. package/dist/ui/ImageEditorDialog-4H665KK2.js.LEGAL.txt +17 -0
  72. package/dist/ui/LogsPage-K6KYEG2P.js +1 -0
  73. package/dist/ui/NewDataSourcePage-O2VQEOJG.js +1 -0
  74. package/dist/ui/NewReleasePage-RSVS32RZ.js +1 -0
  75. package/dist/ui/NotFoundPage-ZYD5ILG6.js +1 -0
  76. package/dist/ui/ProjectPage-X3YQBWL4.js +1 -0
  77. package/dist/ui/ReleasePage-FJHHXNNB.js +1 -0
  78. package/dist/ui/ReleasesPage-VGWIBNEZ.js +1 -0
  79. package/dist/ui/SettingsPage-C4RXOQ6T.js +1 -0
  80. package/dist/ui/SidebarToolsPage-ZBOKPEMP.js +1 -0
  81. package/dist/ui/TaskPage-BQ4OX5WN.js +1 -0
  82. package/dist/ui/TasksPage-3IGQYVYS.js +1 -0
  83. package/dist/ui/TranslationsArbPage-GGHCWPQL.js +2 -0
  84. package/dist/ui/TranslationsEditPage-E2BCMKYV.js +1 -0
  85. package/dist/ui/TranslationsPage-MC4O4ZNI.js +162 -0
  86. package/dist/ui/ai-tools-5E5ELLZX.js +1 -0
  87. package/dist/ui/chunk-3IYZCUPI.js +1 -0
  88. package/dist/ui/chunk-4KE2SZKH.js +1 -0
  89. package/dist/ui/chunk-4W73RW5I.js +1 -0
  90. package/dist/ui/chunk-54DVDYU6.js +1 -0
  91. package/dist/ui/chunk-5MV6XVGA.js +1 -0
  92. package/dist/ui/chunk-62UWGWON.js +1 -0
  93. package/dist/ui/chunk-6IFGKSIE.js +1 -0
  94. package/dist/ui/chunk-767BAQ53.js +1 -0
  95. package/dist/ui/chunk-AFWBSIPL.js +1 -0
  96. package/dist/ui/chunk-AL3TN2KI.js +1 -0
  97. package/dist/ui/chunk-B6BLDN24.js +141 -0
  98. package/dist/ui/chunk-B6BLDN24.js.LEGAL.txt +106 -0
  99. package/dist/ui/chunk-BZIRGB4W.js +1 -0
  100. package/dist/ui/chunk-C5NH23G4.js +3 -0
  101. package/dist/ui/chunk-CGCKJFL4.js +1 -0
  102. package/dist/ui/chunk-DEGMKEHP.js +1 -0
  103. package/dist/ui/chunk-DTMZLUNY.js +15 -0
  104. package/dist/ui/chunk-DTMZLUNY.js.LEGAL.txt +237 -0
  105. package/dist/ui/chunk-DUJYIOLE.js +5 -0
  106. package/dist/ui/chunk-E2RCCK2T.js +1 -0
  107. package/dist/ui/chunk-EGEB6N4J.js +22 -0
  108. package/dist/ui/chunk-EGEB6N4J.js.LEGAL.txt +1059 -0
  109. package/dist/ui/chunk-GXSAEPU3.js +1 -0
  110. package/dist/ui/chunk-HHMG665Z.js +1 -0
  111. package/dist/ui/chunk-HKINZLMW.js +84 -0
  112. package/dist/ui/chunk-HLMBCVRX.js +1 -0
  113. package/dist/ui/chunk-HRGYNHZ3.js +1 -0
  114. package/dist/ui/chunk-I6ICVKEC.js +1 -0
  115. package/dist/ui/chunk-IU36W2TB.js +1 -0
  116. package/dist/ui/chunk-JDW4UORS.js +1 -0
  117. package/dist/ui/chunk-JHBAMPGB.js +1 -0
  118. package/dist/ui/chunk-JYFLU7DM.js +19 -0
  119. package/dist/ui/chunk-JZFTZ4X4.js +87 -0
  120. package/dist/ui/chunk-JZFTZ4X4.js.LEGAL.txt +9 -0
  121. package/dist/ui/chunk-KFAZBEPV.js +1 -0
  122. package/dist/ui/chunk-KKEWCXVV.js +1 -0
  123. package/dist/ui/chunk-KUCVLANF.js +1 -0
  124. package/dist/ui/chunk-KYDOSLTO.js +1 -0
  125. package/dist/ui/chunk-L4RHGQUG.js +1 -0
  126. package/dist/ui/chunk-MDUBCXU2.js +1 -0
  127. package/dist/ui/chunk-NXQVLOTK.js +1 -0
  128. package/dist/ui/chunk-NZHF733K.js +7 -0
  129. package/dist/ui/chunk-NZHF733K.js.LEGAL.txt +146 -0
  130. package/dist/ui/chunk-ONTGW2VA.js +1 -0
  131. package/dist/ui/chunk-ORXEMIQC.js +1 -0
  132. package/dist/ui/chunk-PHBMVORG.js +1 -0
  133. package/dist/ui/chunk-PJA7YP4A.js +1 -0
  134. package/dist/ui/chunk-PVAE643M.js +1 -0
  135. package/dist/ui/chunk-PWKJDYE2.js +1 -0
  136. package/dist/ui/chunk-RSVO46S3.js +1 -0
  137. package/dist/ui/chunk-SKEP5WYH.js +10 -0
  138. package/dist/ui/chunk-SKEP5WYH.js.LEGAL.txt +176 -0
  139. package/dist/ui/chunk-SQRKKWRG.js +3 -0
  140. package/dist/ui/chunk-UEON4JAT.js +1 -0
  141. package/dist/ui/chunk-V7S4IAGB.js +1 -0
  142. package/dist/ui/chunk-VMT7JFAM.js +1 -0
  143. package/dist/ui/chunk-W3BJ2EZX.js +1 -0
  144. package/dist/ui/chunk-W3HIZQ4Z.js +1 -0
  145. package/dist/ui/chunk-X2WHBGTP.js +1 -0
  146. package/dist/ui/chunk-XOQ3KDSR.js +3 -0
  147. package/dist/ui/chunk-YDO2EDVY.js +1 -0
  148. package/dist/ui/chunk-YFA6U2CV.js +1 -0
  149. package/dist/ui/gcs-L33FIRZU.js +1 -0
  150. package/dist/ui/prerender-Q4YSDCPB.js +1 -0
  151. package/dist/ui/signin.js +1 -1
  152. package/dist/ui/ui.css +1 -1
  153. package/dist/ui/ui.js +1 -630
  154. package/dist/ui/ui.js.LEGAL.txt +19 -732
  155. package/package.json +20 -20
  156. package/dist/client-1puwLgNx.d.ts +0 -1552
  157. package/dist/client.d.ts +0 -5
  158. package/dist/edit-MT4B37QK.js +0 -7
  159. package/dist/functions.d.ts +0 -13
  160. package/dist/plugin.d.ts +0 -5
  161. package/dist/richtext.d.ts +0 -104
@@ -0,0 +1,146 @@
1
+ Bundled license information:
2
+
3
+ react-is/cjs/react-is.production.min.js:
4
+ /** @license React v16.13.1
5
+ * react-is.production.min.js
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+
13
+ @tabler/icons-preact/dist/esm/defaultAttributes.mjs:
14
+ @tabler/icons-preact/dist/esm/createPreactComponent.mjs:
15
+ @tabler/icons-preact/dist/esm/icons/IconArchive.mjs:
16
+ @tabler/icons-preact/dist/esm/icons/IconArrowLeft.mjs:
17
+ @tabler/icons-preact/dist/esm/icons/IconArrowUpRight.mjs:
18
+ @tabler/icons-preact/dist/esm/icons/IconArrowsHorizontal.mjs:
19
+ @tabler/icons-preact/dist/esm/icons/IconArrowsVertical.mjs:
20
+ @tabler/icons-preact/dist/esm/icons/IconBraces.mjs:
21
+ @tabler/icons-preact/dist/esm/icons/IconCalendar.mjs:
22
+ @tabler/icons-preact/dist/esm/icons/IconCheck.mjs:
23
+ @tabler/icons-preact/dist/esm/icons/IconCirclePlus.mjs:
24
+ @tabler/icons-preact/dist/esm/icons/IconCloudOff.mjs:
25
+ @tabler/icons-preact/dist/esm/icons/IconCopy.mjs:
26
+ @tabler/icons-preact/dist/esm/icons/IconCornerDownRight.mjs:
27
+ @tabler/icons-preact/dist/esm/icons/IconDeviceFloppy.mjs:
28
+ @tabler/icons-preact/dist/esm/icons/IconExternalLink.mjs:
29
+ @tabler/icons-preact/dist/esm/icons/IconFileDownload.mjs:
30
+ @tabler/icons-preact/dist/esm/icons/IconFileUpload.mjs:
31
+ @tabler/icons-preact/dist/esm/icons/IconFlag.mjs:
32
+ @tabler/icons-preact/dist/esm/icons/IconLayoutSidebarRightCollapse.mjs:
33
+ @tabler/icons-preact/dist/esm/icons/IconLayoutSidebarRightExpand.mjs:
34
+ @tabler/icons-preact/dist/esm/icons/IconMessageCircle.mjs:
35
+ @tabler/icons-preact/dist/esm/icons/IconMoodLookDown.mjs:
36
+ @tabler/icons-preact/dist/esm/icons/IconPaperclip.mjs:
37
+ @tabler/icons-preact/dist/esm/icons/IconPencil.mjs:
38
+ @tabler/icons-preact/dist/esm/icons/IconRestore.mjs:
39
+ @tabler/icons-preact/dist/esm/icons/IconScissors.mjs:
40
+ @tabler/icons-preact/dist/esm/icons/IconSettings.mjs:
41
+ @tabler/icons-preact/dist/esm/icons/IconTable.mjs:
42
+ @tabler/icons-preact/dist/esm/icons/IconTool.mjs:
43
+ @tabler/icons-preact/dist/esm/icons/IconTrash.mjs:
44
+ @tabler/icons-preact/dist/esm/icons/IconUser.mjs:
45
+ @tabler/icons-preact/dist/esm/icons/IconX.mjs:
46
+ @tabler/icons-preact/dist/esm/icons/IconTrashFilled.mjs:
47
+ @tabler/icons-preact/dist/esm/icons/IconAlarmOff.mjs:
48
+ @tabler/icons-preact/dist/esm/icons/IconAlertTriangle.mjs:
49
+ @tabler/icons-preact/dist/esm/icons/IconAlignJustified.mjs:
50
+ @tabler/icons-preact/dist/esm/icons/IconArchiveOff.mjs:
51
+ @tabler/icons-preact/dist/esm/icons/IconArrowBackUp.mjs:
52
+ @tabler/icons-preact/dist/esm/icons/IconArrowBack.mjs:
53
+ @tabler/icons-preact/dist/esm/icons/IconArrowRight.mjs:
54
+ @tabler/icons-preact/dist/esm/icons/IconBold.mjs:
55
+ @tabler/icons-preact/dist/esm/icons/IconBracketsAngle.mjs:
56
+ @tabler/icons-preact/dist/esm/icons/IconCapsuleHorizontal.mjs:
57
+ @tabler/icons-preact/dist/esm/icons/IconCarrot.mjs:
58
+ @tabler/icons-preact/dist/esm/icons/IconChevronDown.mjs:
59
+ @tabler/icons-preact/dist/esm/icons/IconChevronRight.mjs:
60
+ @tabler/icons-preact/dist/esm/icons/IconCircleArrowDown.mjs:
61
+ @tabler/icons-preact/dist/esm/icons/IconCircleArrowUp.mjs:
62
+ @tabler/icons-preact/dist/esm/icons/IconClearFormatting.mjs:
63
+ @tabler/icons-preact/dist/esm/icons/IconClipboardCopy.mjs:
64
+ @tabler/icons-preact/dist/esm/icons/IconClipboardList.mjs:
65
+ @tabler/icons-preact/dist/esm/icons/IconClipboard.mjs:
66
+ @tabler/icons-preact/dist/esm/icons/IconClock.mjs:
67
+ @tabler/icons-preact/dist/esm/icons/IconCode.mjs:
68
+ @tabler/icons-preact/dist/esm/icons/IconColumns3.mjs:
69
+ @tabler/icons-preact/dist/esm/icons/IconCrop.mjs:
70
+ @tabler/icons-preact/dist/esm/icons/IconDatabase.mjs:
71
+ @tabler/icons-preact/dist/esm/icons/IconDeviceDesktop.mjs:
72
+ @tabler/icons-preact/dist/esm/icons/IconDeviceIpad.mjs:
73
+ @tabler/icons-preact/dist/esm/icons/IconDeviceMobile.mjs:
74
+ @tabler/icons-preact/dist/esm/icons/IconDotsVertical.mjs:
75
+ @tabler/icons-preact/dist/esm/icons/IconDots.mjs:
76
+ @tabler/icons-preact/dist/esm/icons/IconDownload.mjs:
77
+ @tabler/icons-preact/dist/esm/icons/IconFileDiff.mjs:
78
+ @tabler/icons-preact/dist/esm/icons/IconFile.mjs:
79
+ @tabler/icons-preact/dist/esm/icons/IconFilter.mjs:
80
+ @tabler/icons-preact/dist/esm/icons/IconFolder.mjs:
81
+ @tabler/icons-preact/dist/esm/icons/IconGitCompare.mjs:
82
+ @tabler/icons-preact/dist/esm/icons/IconGripVertical.mjs:
83
+ @tabler/icons-preact/dist/esm/icons/IconH1.mjs:
84
+ @tabler/icons-preact/dist/esm/icons/IconH2.mjs:
85
+ @tabler/icons-preact/dist/esm/icons/IconH3.mjs:
86
+ @tabler/icons-preact/dist/esm/icons/IconH4.mjs:
87
+ @tabler/icons-preact/dist/esm/icons/IconH5.mjs:
88
+ @tabler/icons-preact/dist/esm/icons/IconHistory.mjs:
89
+ @tabler/icons-preact/dist/esm/icons/IconHome.mjs:
90
+ @tabler/icons-preact/dist/esm/icons/IconInfoCircle.mjs:
91
+ @tabler/icons-preact/dist/esm/icons/IconItalic.mjs:
92
+ @tabler/icons-preact/dist/esm/icons/IconJson.mjs:
93
+ @tabler/icons-preact/dist/esm/icons/IconLanguageOff.mjs:
94
+ @tabler/icons-preact/dist/esm/icons/IconLanguage.mjs:
95
+ @tabler/icons-preact/dist/esm/icons/IconLayoutGrid.mjs:
96
+ @tabler/icons-preact/dist/esm/icons/IconLayoutList.mjs:
97
+ @tabler/icons-preact/dist/esm/icons/IconLink.mjs:
98
+ @tabler/icons-preact/dist/esm/icons/IconListCheck.mjs:
99
+ @tabler/icons-preact/dist/esm/icons/IconListNumbers.mjs:
100
+ @tabler/icons-preact/dist/esm/icons/IconList.mjs:
101
+ @tabler/icons-preact/dist/esm/icons/IconLoader2.mjs:
102
+ @tabler/icons-preact/dist/esm/icons/IconLockOpen.mjs:
103
+ @tabler/icons-preact/dist/esm/icons/IconLock.mjs:
104
+ @tabler/icons-preact/dist/esm/icons/IconLogout.mjs:
105
+ @tabler/icons-preact/dist/esm/icons/IconMapPin.mjs:
106
+ @tabler/icons-preact/dist/esm/icons/IconMessageCirclePlus.mjs:
107
+ @tabler/icons-preact/dist/esm/icons/IconMessage.mjs:
108
+ @tabler/icons-preact/dist/esm/icons/IconPackage.mjs:
109
+ @tabler/icons-preact/dist/esm/icons/IconPhotoStar.mjs:
110
+ @tabler/icons-preact/dist/esm/icons/IconPhotoUp.mjs:
111
+ @tabler/icons-preact/dist/esm/icons/IconPhoto.mjs:
112
+ @tabler/icons-preact/dist/esm/icons/IconPlanet.mjs:
113
+ @tabler/icons-preact/dist/esm/icons/IconPlayerPlay.mjs:
114
+ @tabler/icons-preact/dist/esm/icons/IconPlayerStop.mjs:
115
+ @tabler/icons-preact/dist/esm/icons/IconPuzzle.mjs:
116
+ @tabler/icons-preact/dist/esm/icons/IconQuote.mjs:
117
+ @tabler/icons-preact/dist/esm/icons/IconReload.mjs:
118
+ @tabler/icons-preact/dist/esm/icons/IconRobot.mjs:
119
+ @tabler/icons-preact/dist/esm/icons/IconRocket.mjs:
120
+ @tabler/icons-preact/dist/esm/icons/IconRowInsertBottom.mjs:
121
+ @tabler/icons-preact/dist/esm/icons/IconRowInsertTop.mjs:
122
+ @tabler/icons-preact/dist/esm/icons/IconSearch.mjs:
123
+ @tabler/icons-preact/dist/esm/icons/IconSend2.mjs:
124
+ @tabler/icons-preact/dist/esm/icons/IconSeparatorHorizontal.mjs:
125
+ @tabler/icons-preact/dist/esm/icons/IconSparkles.mjs:
126
+ @tabler/icons-preact/dist/esm/icons/IconSquareCheck.mjs:
127
+ @tabler/icons-preact/dist/esm/icons/IconSquare.mjs:
128
+ @tabler/icons-preact/dist/esm/icons/IconStrikethrough.mjs:
129
+ @tabler/icons-preact/dist/esm/icons/IconSubscript.mjs:
130
+ @tabler/icons-preact/dist/esm/icons/IconSuperscript.mjs:
131
+ @tabler/icons-preact/dist/esm/icons/IconTagMinus.mjs:
132
+ @tabler/icons-preact/dist/esm/icons/IconTagPlus.mjs:
133
+ @tabler/icons-preact/dist/esm/icons/IconTag.mjs:
134
+ @tabler/icons-preact/dist/esm/icons/IconUnderline.mjs:
135
+ @tabler/icons-preact/dist/esm/icons/IconUserPlus.mjs:
136
+ @tabler/icons-preact/dist/esm/icons/IconWorld.mjs:
137
+ @tabler/icons-preact/dist/esm/icons/IconCircleCheckFilled.mjs:
138
+ @tabler/icons-preact/dist/esm/icons/IconSquareCheckFilled.mjs:
139
+ @tabler/icons-preact/dist/esm/icons/IconTriangleFilled.mjs:
140
+ @tabler/icons-preact/dist/esm/tabler-icons-preact.mjs:
141
+ /**
142
+ * @license @tabler/icons-preact v3.35.0 - MIT
143
+ *
144
+ * This source code is licensed under the MIT license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */
@@ -0,0 +1 @@
1
+ import{f as a}from"./chunk-AL3TN2KI.js";import{Ga as r,Ha as i}from"./chunk-NZHF733K.js";import{d as l}from"./chunk-KUCVLANF.js";function s(o,n){if(n in o)return o[n];let e=`*@${n.split("@").at(-1)}`;return e in o?o[e]:null}function d(o,n){let t=s(o,n);return t==="ADMIN"||t==="EDITOR"}function c(o,n){let t=s(o,n);return t==="ADMIN"||t==="EDITOR"||t==="CONTRIBUTOR"}function f(o){return o.condition?i(r,{label:o.label,children:i("div",{className:a(o.className,"ConditionalTooltip"),style:o.style,children:i("div",{className:"ConditionalTooltip__content",children:o.children})})}):i(l,{children:o.children})}export{d as a,c as b,f as c};
@@ -0,0 +1 @@
1
+ import{b as g,g as d,i as l,j as p,o as h}from"./chunk-EGEB6N4J.js";var r={year:31536e6,month:2628e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3};function w(e,t){let n=Math.abs(e-new Date().getTime());if(n<r.second)return"just now";let i=t||{numeric:"auto"},o=new Intl.RelativeTimeFormat("en",i);return n<r.minute?o.format(Math.round(-n/r.second),"second"):n<r.hour?o.format(Math.round(-n/r.minute),"minute"):n<r.day?o.format(Math.round(-n/r.hour),"hour"):n<r.week?o.format(Math.round(-n/r.day),"day"):new Date(e).toLocaleDateString("en",{year:"numeric",month:"short",day:"numeric"})}function f(){return Math.floor(new Date().getTime())}function I(e){return new Date(e.toMillis()).toLocaleDateString("en",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function M(){let e=a=>a<10?"0"+a:a,t=new Date,n=t.getFullYear(),i=e(t.getMonth()+1),o=e(t.getDate()),s=e(t.getHours()),u=e(t.getMinutes());return`${n}-${i}-${o}T${s}:${u}`}var y={};async function O(e,t){let n=t?.throttle||0,i=t?.throttleId?`${e}::${t.throttleId}`:e;if(b(i,n))return;let o=await fetch("/cms/api/actions.log",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:e,metadata:t?.metadata||{},links:t?.links})});if(o.status!==200){let s=await o.text();console.error(`failed to log action "${e}":`,s);return}y[i]=f()}async function k(e){let t=window.__ROOT_CTX.rootConfig.projectId,n=window.firebase.db,i=g(n,"Projects",t,"ActionLogs"),o=e?.limit,s;if(o){let c=Math.ceil(o*1.5);s=d(i,l("timestamp","desc"),p(c))}else s=d(i,l("timestamp","desc"));let u=await h(s),a=[];function T(c){if(a.length===0)return!1;let m=a.at(-1);return c.action==="doc.save"&&m.action==="doc.save"&&c.by===m.by&&c.metadata.docId===m.metadata.docId&&c.timestamp.toMillis()-m.timestamp.toMillis()<60*r.minute}for(let c of u.docs){if(o&&a.length>=o)break;let m=c.data();T(m)||a.push(m)}return a}function b(e,t){if(t===0)return!1;let n=y[e];return n?f()-n<t:!1}export{r as a,w as b,f as c,I as d,M as e,O as f,k as g};
@@ -0,0 +1 @@
1
+ import{c as Q,e as z,f as N,g as Z}from"./chunk-HKINZLMW.js";import{a as ee}from"./chunk-YDO2EDVY.js";import{a as G,c as K,n as g,p as P,q as B,u as b}from"./chunk-EGEB6N4J.js";import{c as V,e as O,h as S,k as L,y as j}from"./chunk-NZHF733K.js";import{b as ie,d as ne}from"./chunk-PVAE643M.js";var re=ie((ke,te)=>{"use strict";function fe(e,t){if(typeof e!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let r,o=0;return function(...a){clearTimeout(r);let n=Date.now(),c=n-o,d=t-c;d<=0?(o=n,e.apply(this,a)):r=setTimeout(()=>{o=Date.now(),e.apply(this,a)},d)}}te.exports=fe});j();var se=ne(re(),1);j();j();var oe=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},i=(e,t,r)=>(oe(e,t,"read from private field"),r?r.call(e):t.get(e)),p=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},C=(e,t,r,o)=>(oe(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r);function me(e,t){return t!=null?(0,se.default)(e,t):e}var y,U,W,$,k,R,A,J,X,Ie=class{constructor(e=[]){p(this,y,void 0),p(this,U,"ready"),p(this,W,void 0),p(this,$,new Set),p(this,k,new Set),p(this,R,new Set),this.pushMessage=t=>{C(this,y,i(this,y).concat(t)),i(this,A).call(this)},this.popMessage=()=>{C(this,y,i(this,y).slice(0,-1)),i(this,A).call(this)},this.replaceMessage=(t,r)=>{C(this,y,[...i(this,y).slice(0,t),this.snapshot(r),...i(this,y).slice(t+1)]),i(this,A).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,r)=>{let o=r?me(t,r):t;return i(this,$).add(o),()=>{i(this,$).delete(o)}},this["~registerStatusCallback"]=t=>(i(this,k).add(t),()=>{i(this,k).delete(t)}),this["~registerErrorCallback"]=t=>(i(this,R).add(t),()=>{i(this,R).delete(t)}),p(this,A,()=>{i(this,$).forEach(t=>t())}),p(this,J,()=>{i(this,k).forEach(t=>t())}),p(this,X,()=>{i(this,R).forEach(t=>t())}),C(this,y,e)}get status(){return i(this,U)}set status(e){C(this,U,e),i(this,J).call(this)}get error(){return i(this,W)}set error(e){C(this,W,e),i(this,X).call(this)}get messages(){return i(this,y)}set messages(e){C(this,y,[...e]),i(this,A).call(this)}};y=new WeakMap;U=new WeakMap;W=new WeakMap;$=new WeakMap;k=new WeakMap;R=new WeakMap;A=new WeakMap;J=new WeakMap;X=new WeakMap;var x,ae=class extends Q{constructor({messages:e,...t}){let r=new Ie(e);super({...t,state:r}),p(this,x,void 0),this["~registerMessagesCallback"]=(o,s)=>i(this,x)["~registerMessagesCallback"](o,s),this["~registerStatusCallback"]=o=>i(this,x)["~registerStatusCallback"](o),this["~registerErrorCallback"]=o=>i(this,x)["~registerErrorCallback"](o),C(this,x,r)}};x=new WeakMap;function Le({experimental_throttle:e,resume:t=!1,...r}={}){let o=O("chat"in r?{}:{onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen});"chat"in r||(o.current={onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen});let s={...r,onToolCall:u=>{var h,m;return(m=(h=o.current).onToolCall)==null?void 0:m.call(h,u)},onData:u=>{var h,m;return(m=(h=o.current).onData)==null?void 0:m.call(h,u)},onFinish:u=>{var h,m;return(m=(h=o.current).onFinish)==null?void 0:m.call(h,u)},onError:u=>{var h,m;return(m=(h=o.current).onError)==null?void 0:m.call(h,u)},sendAutomaticallyWhen:u=>{var h,m,H;return(H=(m=(h=o.current).sendAutomaticallyWhen)==null?void 0:m.call(h,u))!=null?H:!1}},a=O("chat"in r?r.chat:new ae(s));("chat"in r&&r.chat!==a.current||"id"in r&&a.current.id!==r.id)&&(a.current="chat"in r?r.chat:new ae(s));let c=S(u=>a.current["~registerMessagesCallback"](u,e),[e,a.current.id]),d=L(c,()=>a.current.messages,()=>a.current.messages),f=L(a.current["~registerStatusCallback"],()=>a.current.status,()=>a.current.status),l=L(a.current["~registerErrorCallback"],()=>a.current.error,()=>a.current.error),I=S(u=>{typeof u=="function"&&(u=u(a.current.messages)),a.current.messages=u},[a]);return V(()=>{t&&a.current.resumeStream()},[t,a]),{id:a.current.id,messages:d,setMessages:I,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:l,resumeStream:a.current.resumeStream,status:f,addToolResult:a.current.addToolOutput,addToolOutput:a.current.addToolOutput,addToolApprovalResponse:a.current.addToolApprovalResponse}}var Y=null;function _(){return Y||(Y=import("./ai-tools-5E5ELLZX.js")),Y}var ge=["doc_set","doc_create","doc_updateField","doc_edit","doc_duplicate"];function ye(e){return ge.includes(e)}function E(){let e=window;return{rootConfig:e.__ROOT_CTX.rootConfig,firebase:e.firebase}}function ve(e){let{collection:t,slug:r}=D(e);return`/cms/content/${encodeURIComponent(t)}/${encodeURIComponent(r)}`}function D(e){let t=e.indexOf("/");if(t<=0||t===e.length-1)throw new Error(`invalid docId: "${e}" (expected "Collection/slug")`);return{collection:e.slice(0,t),slug:e.slice(t+1).replace(/\//g,"--")}}function w(e){let{collection:t,slug:r}=D(e),{firebase:o,rootConfig:s}=E();return K(o.db,"Projects",s.projectId,"Collections",t,"Drafts",r)}function M(e){return Z(e,{isTimestamp:t=>t instanceof G,timestampToValue:t=>t.toMillis()})}function we(e){return JSON.parse(JSON.stringify(e??null))}function q(e){if(typeof e!="string")return e;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch{return e}return e}function ce(e){return Array.isArray(e)?e.map(t=>{let r={op:t?.op,path:t?.path};return t&&"value"in t&&(r.value=q(t.value)),t&&t.index!==void 0&&t.index!==null&&(r.index=t.index),r}):[]}function de(e){switch(e.op){case"set":return`Set ${e.path}`;case"insert_item":return e.index===void 0?`Insert into ${e.path} (append)`:`Insert into ${e.path} at ${e.index}`;case"remove_item":return`Remove ${e.path}[${e.index}]`;default:return`${e.op} ${e.path}`}}function De(e,t,r){let o=t.split("."),s=e;for(let c=0;c<o.length-1;c++){let d=o[c],f=Array.isArray(s)?Number(d):d,l=o[c+1];(s[f]===void 0||s[f]===null)&&(s[f]=/^\d+$/.test(l)?[]:{}),s=s[f]}let a=o[o.length-1],n=Array.isArray(s)?Number(a):a;s[n]=r}async function le(e){let t=await g(w(e));if(!t.exists())return{found:!1,fields:{}};let r=t.data();return{found:!0,fields:M(r.fields||{}),raw:r}}function F(e){return{type:"cms-write-receipt",title:e.title,summary:e.summary,docId:e.docId,adminUrl:e.docId?ve(e.docId):void 0,details:[...e.details||[],{label:"Status",value:"Saved to draft"},{label:"Publishing",value:"Manual publish still required"}]}}function v(e){return{toolName:e.toolName,title:e.title,summary:e.summary,docId:e.docId,path:e.path,details:e.details||[],error:e.error,errors:e.errors,hint:e.hint}}async function Xe(e,t){if(!ye(e))throw new Error(`not a write tool: ${e}`);switch(e){case"doc_set":return pe(t);case"doc_create":return be(t);case"doc_updateField":return Ce(t);case"doc_edit":return _e(t);case"doc_duplicate":return Te(t)}}async function pe(e){let{collection:t}=D(e.docId),r=await T(t),{validateFields:o}=await _(),s=o(e.fields,r);if(s.length>0)return v({toolName:"doc_set",title:"Replace draft fields",summary:`Could not validate the replacement fields for ${e.docId}.`,docId:e.docId,error:"VALIDATION_FAILED",errors:s,hint:"The fields payload does not match the collection schema. Read the doc and schema, then retry with a valid payload."});let a=await le(e.docId);return{toolName:"doc_set",title:"Replace draft fields",summary:`Replace all draft fields for ${e.docId}.`,docId:e.docId,before:a.found?a.fields:{},after:e.fields||{},details:[{label:"Document",value:e.docId},{label:"Operation",value:a.found?"Replace draft":"Create draft"}]}}async function be(e){let{collection:t}=D(e.docId);if((await g(w(e.docId))).exists())return v({toolName:"doc_create",title:"Create draft document",summary:`${e.docId} already exists.`,docId:e.docId,error:"ALREADY_EXISTS",hint:"Use an unused slug, or use an update tool for the existing draft."});if(e.fields){let o=await T(t),{validateFields:s}=await _(),a=s(e.fields,o);if(a.length>0)return v({toolName:"doc_create",title:"Create draft document",summary:`Could not validate the initial fields for ${e.docId}.`,docId:e.docId,error:"VALIDATION_FAILED",errors:a,hint:"The fields payload does not match the collection schema."})}return{toolName:"doc_create",title:"Create draft document",summary:`Create ${e.docId} as a new draft document.`,docId:e.docId,before:{},after:e.fields||{},details:[{label:"Document",value:e.docId},{label:"Operation",value:"Create draft"}]}}async function Ce(e){let t=q(e.value),{collection:r}=D(e.docId),o=await T(r),{validateValueAtPath:s}=await _(),a=s(o,e.path,t);if(a.length>0)return v({toolName:"doc_updateField",title:"Update draft field",summary:`Could not validate ${e.path} for ${e.docId}.`,docId:e.docId,path:e.path,error:"VALIDATION_FAILED",errors:a,hint:"The value does not match the field schema. Inspect the doc and schema, then retry with a valid value."});let n=w(e.docId),c=await g(n);if(!c.exists())return v({toolName:"doc_updateField",title:"Update draft field",summary:`${e.docId} does not exist.`,docId:e.docId,path:e.path,error:"NOT_FOUND",hint:`Doc "${e.docId}" does not exist.`});let d=c.data(),f=z(d.fields||{},e.path);if(!f.ok)return v({toolName:"doc_updateField",title:"Update draft field",summary:`Could not resolve ${e.path} in ${e.docId}.`,docId:e.docId,path:e.path,error:"VALIDATION_FAILED",errors:[f.error],hint:"Use zero-based array indices for existing array items, or set the whole array field when appending or removing items."});let l=M(d.fields||{}),I=we(l);return De(I,e.path,t),{toolName:"doc_updateField",title:"Update draft field",summary:`Update ${e.path} in ${e.docId}.`,docId:e.docId,path:e.path,before:l,after:I,details:[{label:"Document",value:e.docId},{label:"Field path",value:e.path},{label:"Operation",value:"Update draft field"}]}}async function _e(e){let t=ce(e.operations),{collection:r}=D(e.docId),o=await T(r),s=await le(e.docId);if(!s.found)return v({toolName:"doc_edit",title:"Edit draft document",summary:`${e.docId} does not exist.`,docId:e.docId,error:"NOT_FOUND",hint:`Doc "${e.docId}" does not exist. Create it with \`doc_create\` first.`});let{applyDocEdits:a,validateFields:n}=await _(),c=a(s.fields,t);if(!c.ok)return v({toolName:"doc_edit",title:"Edit draft document",summary:`Operation ${c.error.opIndex+1} (${c.error.op}) could not be applied to ${e.docId}.`,docId:e.docId,error:"INVALID_OPERATION",errors:[c.error],hint:"Fix the failing operation. Use zero-based array indices, target arrays for insert_item/remove_item, and read the doc with `doc_get` to confirm the current shape."});let d=n(c.fields,o);return d.length>0?v({toolName:"doc_edit",title:"Edit draft document",summary:`The edits to ${e.docId} did not match the collection schema.`,docId:e.docId,error:"VALIDATION_FAILED",errors:d,hint:"The resulting fields do not match the collection schema. Inspect the doc and schema, then retry with valid values."}):{toolName:"doc_edit",title:"Edit draft document",summary:`Apply ${t.length} edit${t.length===1?"":"s"} to ${e.docId}.`,docId:e.docId,before:s.fields,after:c.fields,details:[{label:"Document",value:e.docId},...t.map((f,l)=>({label:`Operation ${l+1}`,value:de(f)}))]}}async function Te(e){let t=w(e.fromDocId),r=await g(t);if(!r.exists())return v({toolName:"doc_duplicate",title:"Duplicate draft document",summary:`${e.fromDocId} does not exist.`,docId:e.toDocId,error:"NOT_FOUND",hint:`Source doc "${e.fromDocId}" does not exist.`,details:[{label:"Source",value:e.fromDocId}]});let o=w(e.toDocId);if((await g(o)).exists())return v({toolName:"doc_duplicate",title:"Duplicate draft document",summary:`${e.toDocId} already exists.`,docId:e.toDocId,error:"ALREADY_EXISTS",hint:`Target doc "${e.toDocId}" already exists.`,details:[{label:"Source",value:e.fromDocId},{label:"Target",value:e.toDocId}]});let a=r.data(),n=M(a.fields||{});return{toolName:"doc_duplicate",title:"Duplicate draft document",summary:`Duplicate ${e.fromDocId} to ${e.toDocId}.`,docId:e.toDocId,before:{},after:n,details:[{label:"Source",value:e.fromDocId},{label:"Target",value:e.toDocId},{label:"Operation",value:"Create draft copy"}]}}async function T(e){return await ee(e)}async function Ae(e){let{collection:t,slug:r}=D(e.docId),o=await T(t),{validateFields:s}=await _(),a=s(e.fields,o);if(a.length>0)return{success:!1,docId:e.docId,error:"VALIDATION_FAILED",errors:a,hint:"The fields payload did not match the collection schema. Read the doc with `doc_get` for an example of the expected shape, then retry with a valid payload."};let{firebase:n}=E(),c=w(e.docId),d=await g(c),l=(d.exists()?d.data():{}).sys||{},I=n.user?.email||"root-cms-ai",u={id:e.docId,collection:t,slug:r,sys:{...l,createdAt:l.createdAt??b(),createdBy:l.createdBy??I,modifiedAt:b(),modifiedBy:I,locales:l.locales??["en"]},fields:N(e.fields)};return await P(c,u),{success:!0,docId:e.docId,receipt:F({title:"Updated draft document",summary:`Replaced all draft fields for ${e.docId}.`,docId:e.docId,details:[{label:"Document",value:e.docId},{label:"Operation",value:"Replace draft fields"}]})}}async function xe(e){let{collection:t,slug:r}=D(e.docId),o=w(e.docId);if((await g(o)).exists())return{success:!1,docId:e.docId,error:"ALREADY_EXISTS",hint:"A doc with this id already exists. Use `doc_set` to overwrite."};if(e.fields){let d=await T(t),{validateFields:f}=await _(),l=f(e.fields,d);if(l.length>0)return{success:!1,docId:e.docId,error:"VALIDATION_FAILED",errors:l,hint:"The fields payload did not match the collection schema."}}let{firebase:a}=E(),n=a.user?.email||"root-cms-ai",c={id:e.docId,collection:t,slug:r,sys:{createdAt:b(),createdBy:n,modifiedAt:b(),modifiedBy:n,locales:["en"]},fields:e.fields?N(e.fields):{}};return await P(o,c),{success:!0,docId:e.docId,receipt:F({title:"Created draft document",summary:`Created ${e.docId} as a new draft document.`,docId:e.docId,details:[{label:"Document",value:e.docId},{label:"Operation",value:"Create draft"}]})}}async function Ee(e){let t=q(e.value),{collection:r}=D(e.docId),o=await T(r),{validateValueAtPath:s}=await _(),a=s(o,e.path,t);if(a.length>0)return{success:!1,docId:e.docId,path:e.path,error:"VALIDATION_FAILED",errors:a,hint:"The value did not match the field schema. Inspect the doc with `doc_get` to see the expected shape, then retry with a valid value."};let n=w(e.docId),c=await g(n);if(!c.exists())return{success:!1,docId:e.docId,path:e.path,error:"NOT_FOUND",hint:`Doc "${e.docId}" does not exist.`};let d=c.data(),f=z(d.fields||{},e.path);if(!f.ok)return{success:!1,docId:e.docId,path:e.path,error:"VALIDATION_FAILED",errors:[f.error],hint:"The path could not be resolved against the current draft. Use zero-based array indices for existing array items, or set the whole array field when appending or removing items."};let{firebase:l}=E(),I=`fields.${f.path}`,u=N(t);return await B(n,{[I]:u,"sys.modifiedAt":b(),"sys.modifiedBy":l.user?.email||"root-cms-ai"}),{success:!0,docId:e.docId,path:e.path,receipt:F({title:"Updated draft field",summary:`Updated ${e.path} in ${e.docId}.`,docId:e.docId,details:[{label:"Document",value:e.docId},{label:"Field path",value:e.path},{label:"Operation",value:"Update draft field"}]})}}async function Oe(e){let t=ce(e.operations),{collection:r}=D(e.docId),o=await T(r),s=w(e.docId),a=await g(s);if(!a.exists())return{success:!1,docId:e.docId,error:"NOT_FOUND",hint:`Doc "${e.docId}" does not exist.`};let n=a.data(),c=M(n.fields||{}),{applyDocEdits:d,validateFields:f}=await _(),l=d(c,t);if(!l.ok)return{success:!1,docId:e.docId,error:"INVALID_OPERATION",errors:[l.error],hint:"Fix the failing operation. Use zero-based array indices, target arrays for insert_item/remove_item, and read the doc with `doc_get` to confirm the current shape."};let I=f(l.fields,o);if(I.length>0)return{success:!1,docId:e.docId,error:"VALIDATION_FAILED",errors:I,hint:"The resulting fields did not match the collection schema. Inspect the doc with `doc_get`, then retry with valid values."};let{firebase:u}=E();return await B(s,{fields:N(l.fields),"sys.modifiedAt":b(),"sys.modifiedBy":u.user?.email||"root-cms-ai"}),{success:!0,docId:e.docId,receipt:F({title:"Edited draft document",summary:`Applied ${t.length} edit${t.length===1?"":"s"} to ${e.docId}.`,docId:e.docId,details:[{label:"Document",value:e.docId},{label:"Operations",value:String(t.length)},...t.map((h,m)=>({label:`Operation ${m+1}`,value:de(h)}))]})}}async function Se(e){let t=w(e.fromDocId),r=await g(t);if(!r.exists())return{success:!1,error:"NOT_FOUND",hint:`Source doc "${e.fromDocId}" does not exist.`};let o=w(e.toDocId);if((await g(o)).exists())return{success:!1,error:"ALREADY_EXISTS",hint:`Target doc "${e.toDocId}" already exists.`};let{collection:a,slug:n}=D(e.toDocId),{firebase:c}=E(),d=c.user?.email||"root-cms-ai",f=r.data(),l={id:e.toDocId,collection:a,slug:n,sys:{createdAt:b(),createdBy:d,modifiedAt:b(),modifiedBy:d,locales:f.sys?.locales??["en"]},fields:f.fields||{}};return await P(o,l),{success:!0,fromDocId:e.fromDocId,toDocId:e.toDocId,receipt:F({title:"Duplicated draft document",summary:`Duplicated ${e.fromDocId} to ${e.toDocId}.`,docId:e.toDocId,details:[{label:"Source",value:e.fromDocId},{label:"Target",value:e.toDocId},{label:"Operation",value:"Create draft copy"}]})}}async function Ne(e){let t=await fetch("/cms/api/ai.translate",{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({sourceText:e.sourceText,targetLocales:e.targetLocales,description:e.description})});if(!t.ok)throw new Error(`ai.translate failed: ${t.status}`);let r=await t.json();if(!r.success)throw new Error(r.error||"translation failed");return{translations:r.translations}}var $e={doc_set:Ae,doc_create:xe,doc_updateField:Ee,doc_edit:Oe,doc_duplicate:Se,doc_translateField:Ne};async function Ye(e,t){let r=$e[e];if(!r)return{error:"UNKNOWN_TOOL",toolName:e};try{return await r(t)}catch(o){return console.error(`tool ${e} failed:`,o),{error:"TOOL_EXECUTION_FAILED",message:o?.message||String(o)}}}export{Le as a,ye as b,Xe as c,Ye as d};
@@ -0,0 +1 @@
1
+ import{f as e}from"./chunk-AL3TN2KI.js";import{Ha as o}from"./chunk-NZHF733K.js";function n(r){return o("div",{className:e(r.className,"Surface"),children:r.children})}export{n as a};
@@ -0,0 +1 @@
1
+ var h=Object.create;var e=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(a,b)=>()=>(a&&(b=a(a=0)),b);var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},g=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of j(b))!l.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=i(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?h(k(a)):{},g(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a)),q=a=>g(e({},"__esModule",{value:!0}),a);export{m as a,n as b,o as c,p as d,q as e};
@@ -0,0 +1 @@
1
+ import{b as o}from"./chunk-ORXEMIQC.js";import{Ga as r,Ha as i,ca as a}from"./chunk-NZHF733K.js";var l={transition:"pop"};function g(t){let e=t.release;return n(e.archivedAt)?i(r,{...l,label:`Archived ${d(e.archivedAt)} by ${e.archivedBy}`,children:i(a,{size:"xs",color:"gray",variant:"filled",children:"Archived"})}):n(e.scheduledAt)?i(r,{...l,label:`Scheduled ${s(e.scheduledAt)} by ${e.scheduledBy}`,wrapLines:!0,width:240,children:i(a,{size:"xs",variant:"gradient",gradient:{from:"grape",to:"pink",deg:35},children:"Scheduled"})}):n(e.publishedAt)?i(r,{...l,label:`Published ${d(e.publishedAt)} by ${e.publishedBy}`,children:i(a,{size:"xs",variant:"gradient",gradient:{from:"teal",to:"lime",deg:105},children:"Published"})}):i(a,{size:"xs",variant:"gradient",gradient:{from:"indigo",to:"cyan"},children:"Unpublished"})}function n(t){return!!(t&&t.toMillis)}function d(t){return t?.toMillis?o(t.toMillis()):o(new Date().getTime())}function s(t){return new Date(t.toMillis()).toLocaleDateString("en",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}export{g as a};
@@ -0,0 +1 @@
1
+ import{k as T}from"./chunk-4KE2SZKH.js";import{f as C}from"./chunk-AFWBSIPL.js";import{f as i}from"./chunk-ORXEMIQC.js";import{a as b,b as g,c as n,g as m,i as R,n as I,o as y,q as l,s as j,t as d,u as f,w as _}from"./chunk-EGEB6N4J.js";var c="Releases";async function E(e,t){if(!e)throw new Error("missing data source id");let r=window.__ROOT_CTX.rootConfig.projectId,o=window.firebase.db,s=n(o,"Projects",r,c,e);await j(o,async a=>{if((await a.get(s)).exists())throw new Error(`release exists: ${e}`);await a.set(s,{...t,id:e,createdAt:f(),createdBy:window.firebase.user.email})}),i("release.create",{metadata:{releaseId:e}})}async function S(){let e=window.__ROOT_CTX.rootConfig.projectId,t=window.firebase.db,r=g(t,"Projects",e,c),o=m(r,R("createdAt","desc")),s=await y(o),a=[];return s.forEach(w=>{a.push(w.data())}),a}async function u(e){let t=window.__ROOT_CTX.rootConfig.projectId,r=window.firebase.db,o=n(r,"Projects",t,c,e),s=await I(o);return s.exists()?s.data():null}async function D(e,t){let r=window.__ROOT_CTX.rootConfig.projectId,o=window.firebase.db,s=n(o,"Projects",r,c,e);await l(s,t),i("release.save",{metadata:{releaseId:e}})}async function X(e){let t=window.__ROOT_CTX.rootConfig.projectId,r=window.firebase.db,o=n(r,"Projects",t,c,e);await l(o,{archivedAt:f(),archivedBy:window.firebase.user.email}),i("release.archive",{metadata:{releaseId:e}})}async function M(e){let t=window.__ROOT_CTX.rootConfig.projectId,r=window.firebase.db,o=n(r,"Projects",t,c,e);await l(o,{archivedAt:d(),archivedBy:d()}),i("release.unarchive",{metadata:{releaseId:e}})}async function k(e){let t=await u(e);if(!t)throw new Error(`release not found: ${e}`);if(t.archivedAt)throw new Error(`release is archived: ${e}`);let r=t.docIds||[],o=t.dataSourceIds||[];if(r.length===0&&o.length===0)throw new Error(`no docs or data sources to publish for release: ${e}`);let s=window.__ROOT_CTX.rootConfig.projectId,a=window.firebase.db,w=n(a,"Projects",s,c,e),p=_(a);p.update(w,{publishedAt:f(),publishedBy:window.firebase.user.email,scheduledAt:d(),scheduledBy:d()}),o.length>0&&await T(o,{batch:p,commitBatch:!1}),await C(r,{batch:p,releaseId:e,publishMessage:t.description}),console.log(`published release: ${e}`);let h={releaseId:e,docIds:r,dataSourceIds:o};t.description&&(h.publishMessage=t.description),i("release.publish",{metadata:h})}async function q(e,t){let r=await u(e);if(!r)throw new Error(`release not found: ${e}`);if(r.archivedAt)throw new Error(`release is archived: ${e}`);typeof t=="number"&&(t=b.fromMillis(t));let o=window.__ROOT_CTX.rootConfig.projectId,s=window.firebase.db,a=n(s,"Projects",o,c,e);await l(a,{scheduledAt:t,scheduledBy:window.firebase.user.email}),i("release.publish",{metadata:{releaseId:e,scheduledAt:t.toMillis()}})}var O=["blue","bold","bright","calm","cool","cosmic","crisp","dark","eager","fast","fresh","gentle","golden","grand","happy","idle","jolly","keen","lively","lucky","mellow","mighty","neat","noble","proud","quiet","rapid","sharp","silver","swift","vivid","warm","wild"],v=["arrow","beacon","breeze","canyon","cedar","comet","coral","crane","dune","eagle","ember","falcon","flame","flint","forest","fox","glacier","harbor","hawk","lantern","maple","meadow","orbit","otter","peak","pine","reef","river","sage","spark","spruce","stone","summit","tide","wolf"];function N(){let e=new Date,t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0"),s=O[Math.floor(Math.random()*O.length)],a=v[Math.floor(Math.random()*v.length)];return`${t}${r}${o}-${s}-${a}`}async function F(e){if(!await u(e))throw new Error(`release not found: ${e}`);let r=window.__ROOT_CTX.rootConfig.projectId,o=window.firebase.db,s=n(o,"Projects",r,c,e);await l(s,{scheduledAt:d(),scheduledBy:d()}),i("release.unschedule",{metadata:{releaseId:e}})}export{E as a,S as b,u as c,D as d,X as e,M as f,k as g,q as h,N as i,F as j};
@@ -0,0 +1,10 @@
1
+ import{B as ke,C as Ee,D as Ue,E as Ie,G as xe,H as Q,c as me,e as J,f as be,g as we,h as Re,p as Te,x as S,y as ye}from"./chunk-DTMZLUNY.js";var De="firebasestorage.googleapis.com",Le="storageBucket",st=120*1e3,rt=600*1e3,ot=1e3;var g=class t extends Te{constructor(e,n,s=0){super(ee(e),`Firebase Storage: ${n} (${ee(e)})`),this.status_=s,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,t.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return ee(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}
2
+ ${this.customData.serverResponse}`:this.message=this._baseMessage}},p;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(p||(p={}));function ee(t){return"storage/"+t}function le(){let t="An unknown error occurred, please check the error payload for server response.";return new g(p.UNKNOWN,t)}function it(t){return new g(p.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function at(t){return new g(p.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function ut(){let t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new g(p.UNAUTHENTICATED,t)}function lt(){return new g(p.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function ct(t){return new g(p.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function Fe(){return new g(p.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Be(){return new g(p.CANCELED,"User canceled the upload/download.")}function ht(t){return new g(p.INVALID_URL,"Invalid URL '"+t+"'.")}function dt(t){return new g(p.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function ft(){return new g(p.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+Le+"' property when initializing the app?")}function Me(){return new g(p.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function pt(){return new g(p.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function _t(t){return new g(p.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function ne(t){return new g(p.INVALID_ARGUMENT,t)}function qe(){return new g(p.APP_DELETED,"The Firebase app was deleted.")}function gt(t){return new g(p.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function $(t,e){return new g(p.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function q(t){throw new g(p.INTERNAL_ERROR,"Internal error: "+t)}var k=class t{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let s;try{s=t.makeFromUrl(e,n)}catch{return new t(e,"")}if(s.path==="")return s;throw dt(e)}static makeFromUrl(e,n){let s=null,r="([A-Za-z0-9.\\-_]+)";function o(b){b.path.charAt(b.path.length-1)==="/"&&(b.path_=b.path_.slice(0,-1))}let i="(/(.*))?$",u=new RegExp("^gs://"+r+i,"i"),a={bucket:1,path:3};function l(b){b.path_=decodeURIComponent(b.path)}let c="v[A-Za-z0-9_]+",d=n.replace(/[.]/g,"\\."),f="(/([^?#]*).*)?$",_=new RegExp(`^https?://${d}/${c}/b/${r}/o${f}`,"i"),h={bucket:1,path:3},T=n===De?"(?:storage.googleapis.com|storage.cloud.google.com)":n,m="([^?#]*)",U=new RegExp(`^https?://${T}/${r}/${m}`,"i"),R=[{regex:u,indices:a,postModify:o},{regex:_,indices:h,postModify:l},{regex:U,indices:{bucket:1,path:2},postModify:l}];for(let b=0;b<R.length;b++){let C=R[b],v=C.regex.exec(e);if(v){let Y=v[C.indices.bucket],M=v[C.indices.path];M||(M=""),s=new t(Y,M),C.postModify(s);break}}if(s==null)throw ht(e);return s}},se=class{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}};function mt(t,e,n){let s=1,r=null,o=null,i=!1,u=0;function a(){return u===2}let l=!1;function c(...m){l||(l=!0,e.apply(null,m))}function d(m){r=setTimeout(()=>{r=null,t(_,a())},m)}function f(){o&&clearTimeout(o)}function _(m,...U){if(l){f();return}if(m){f(),c.call(null,m,...U);return}if(a()||i){f(),c.call(null,m,...U);return}s<64&&(s*=2);let R;u===1?(u=2,R=0):R=(s+Math.random())*1e3,d(R)}let h=!1;function T(m){h||(h=!0,f(),!l&&(r!==null?(m||(u=2),clearTimeout(r),d(0)):m||(u=1)))}return d(0),o=setTimeout(()=>{i=!0,T(!0)},n),T}function bt(t){t(!1)}function wt(t){return t!==void 0}function Rt(t){return typeof t=="function"}function Tt(t){return typeof t=="object"&&!Array.isArray(t)}function ce(t){return typeof t=="string"||t instanceof String}function Ae(t){return he()&&t instanceof Blob}function he(){return typeof Blob<"u"}function Oe(t,e,n,s){if(s<e)throw ne(`Invalid value for '${t}'. Expected ${e} or greater.`);if(s>n)throw ne(`Invalid value for '${t}'. Expected ${n} or less.`)}function z(t,e,n){let s=e;return n==null&&(s=`https://${e}`),`${n}://${s}/v0${t}`}function yt(t){let e=encodeURIComponent,n="?";for(let s in t)if(t.hasOwnProperty(s)){let r=e(s)+"="+e(t[s]);n=n+r+"&"}return n=n.slice(0,-1),n}var P;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(P||(P={}));function $e(t,e){let n=t>=500&&t<600,r=[408,429].indexOf(t)!==-1,o=e.indexOf(t)!==-1;return n||r||o}var re=class{constructor(e,n,s,r,o,i,u,a,l,c,d,f=!0,_=!1){this.url_=e,this.method_=n,this.headers_=s,this.body_=r,this.successCodes_=o,this.additionalRetryCodes_=i,this.callback_=u,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=c,this.connectionFactory_=d,this.retry=f,this.isUsingEmulator=_,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((h,T)=>{this.resolve_=h,this.reject_=T,this.start_()})}start_(){let e=(s,r)=>{if(r){s(!1,new D(!1,null,!0));return}let o=this.connectionFactory_();this.pendingConnection_=o;let i=u=>{let a=u.loaded,l=u.lengthComputable?u.total:-1;this.progressCallback_!==null&&this.progressCallback_(a,l)};this.progressCallback_!==null&&o.addUploadProgressListener(i),o.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&o.removeUploadProgressListener(i),this.pendingConnection_=null;let u=o.getErrorCode()===P.NO_ERROR,a=o.getStatus();if(!u||$e(a,this.additionalRetryCodes_)&&this.retry){let c=o.getErrorCode()===P.ABORT;s(!1,new D(!1,null,c));return}let l=this.successCodes_.indexOf(a)!==-1;s(!0,new D(l,o))})},n=(s,r)=>{let o=this.resolve_,i=this.reject_,u=r.connection;if(r.wasSuccessCode)try{let a=this.callback_(u,u.getResponse());wt(a)?o(a):o()}catch(a){i(a)}else if(u!==null){let a=le();a.serverResponse=u.getErrorText(),this.errorCallback_?i(this.errorCallback_(u,a)):i(a)}else if(r.canceled){let a=this.appDelete_?qe():Be();i(a)}else{let a=Fe();i(a)}};this.canceled_?n(!1,new D(!1,null,!0)):this.backoffId_=mt(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&bt(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}},D=class{constructor(e,n,s){this.wasSuccessCode=e,this.connection=n,this.canceled=!!s}};function kt(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function Et(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function Ut(t,e){e&&(t["X-Firebase-GMPID"]=e)}function It(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}function xt(t,e,n,s,r,o,i=!0,u=!1){let a=yt(t.urlParams),l=t.url+a,c=Object.assign({},t.headers);return Ut(c,e),kt(c,n),Et(c,o),It(c,s),new re(l,t.method,c,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,r,i,u)}function At(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function Ot(...t){let e=At();if(e!==void 0){let n=new e;for(let s=0;s<t.length;s++)n.append(t[s]);return n.getBlob()}else{if(he())return new Blob(t);throw new g(p.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function St(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}function Pt(t){if(typeof atob>"u")throw _t("base-64");return atob(t)}var E={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},H=class{constructor(e,n){this.data=e,this.contentType=n||null}};function Ct(t,e){switch(t){case E.RAW:return new H(He(e));case E.BASE64:case E.BASE64URL:return new H(je(t,e));case E.DATA_URL:return new H(Nt(e),Dt(e))}throw le()}function He(t){let e=[];for(let n=0;n<t.length;n++){let s=t.charCodeAt(n);if(s<=127)e.push(s);else if(s<=2047)e.push(192|s>>6,128|s&63);else if((s&64512)===55296)if(!(n<t.length-1&&(t.charCodeAt(n+1)&64512)===56320))e.push(239,191,189);else{let o=s,i=t.charCodeAt(++n);s=65536|(o&1023)<<10|i&1023,e.push(240|s>>18,128|s>>12&63,128|s>>6&63,128|s&63)}else(s&64512)===56320?e.push(239,191,189):e.push(224|s>>12,128|s>>6&63,128|s&63)}return new Uint8Array(e)}function vt(t){let e;try{e=decodeURIComponent(t)}catch{throw $(E.DATA_URL,"Malformed data URL.")}return He(e)}function je(t,e){switch(t){case E.BASE64:{let r=e.indexOf("-")!==-1,o=e.indexOf("_")!==-1;if(r||o)throw $(t,"Invalid character '"+(r?"-":"_")+"' found: is it base64url encoded?");break}case E.BASE64URL:{let r=e.indexOf("+")!==-1,o=e.indexOf("/")!==-1;if(r||o)throw $(t,"Invalid character '"+(r?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=Pt(e)}catch(r){throw r.message.includes("polyfill")?r:$(t,"Invalid character found")}let s=new Uint8Array(n.length);for(let r=0;r<n.length;r++)s[r]=n.charCodeAt(r);return s}var V=class{constructor(e){this.base64=!1,this.contentType=null;let n=e.match(/^data:([^,]+)?,/);if(n===null)throw $(E.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");let s=n[1]||null;s!=null&&(this.base64=Lt(s,";base64"),this.contentType=this.base64?s.substring(0,s.length-7):s),this.rest=e.substring(e.indexOf(",")+1)}};function Nt(t){let e=new V(t);return e.base64?je(E.BASE64,e.rest):vt(e.rest)}function Dt(t){return new V(t).contentType}function Lt(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}var X=class t{constructor(e,n){let s=0,r="";Ae(e)?(this.data_=e,s=e.size,r=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),s=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),s=e.length),this.size_=s,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,n){if(Ae(this.data_)){let s=this.data_,r=St(s,e,n);return r===null?null:new t(r)}else{let s=new Uint8Array(this.data_.buffer,e,n-e);return new t(s,!0)}}static getBlob(...e){if(he()){let n=e.map(s=>s instanceof t?s.data_:s);return new t(Ot.apply(null,n))}else{let n=e.map(i=>ce(i)?Ct(E.RAW,i).data:i.data_),s=0;n.forEach(i=>{s+=i.byteLength});let r=new Uint8Array(s),o=0;return n.forEach(i=>{for(let u=0;u<i.length;u++)r[o++]=i[u]}),new t(r,!0)}}uploadData(){return this.data_}};function Ft(t){let e;try{e=JSON.parse(t)}catch{return null}return Tt(e)?e:null}function Bt(t){if(t.length===0)return null;let e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function Mt(t,e){let n=e.split("/").filter(s=>s.length>0).join("/");return t.length===0?n:t+"/"+n}function ze(t){let e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}function qt(t,e){return e}var w=class{constructor(e,n,s,r){this.server=e,this.local=n||e,this.writable=!!s,this.xform=r||qt}},W=null;function $t(t){return!ce(t)||t.length<2?t:ze(t)}function de(){if(W)return W;let t=[];t.push(new w("bucket")),t.push(new w("generation")),t.push(new w("metageneration")),t.push(new w("name","fullPath",!0));function e(o,i){return $t(i)}let n=new w("name");n.xform=e,t.push(n);function s(o,i){return i!==void 0?Number(i):i}let r=new w("size");return r.xform=s,t.push(r),t.push(new w("timeCreated")),t.push(new w("updated")),t.push(new w("md5Hash",null,!0)),t.push(new w("cacheControl",null,!0)),t.push(new w("contentDisposition",null,!0)),t.push(new w("contentEncoding",null,!0)),t.push(new w("contentLanguage",null,!0)),t.push(new w("contentType",null,!0)),t.push(new w("metadata","customMetadata",!0)),W=t,W}function Ht(t,e){function n(){let s=t.bucket,r=t.fullPath,o=new k(s,r);return e._makeStorageReference(o)}Object.defineProperty(t,"ref",{get:n})}function jt(t,e,n){let s={};s.type="file";let r=n.length;for(let o=0;o<r;o++){let i=n[o];s[i.local]=i.xform(s,e[i.server])}return Ht(s,t),s}function zt(t,e,n){let s=Ft(e);return s===null?null:jt(t,s,n)}function fe(t,e){let n={},s=e.length;for(let r=0;r<s;r++){let o=e[r];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}var x=class{constructor(e,n,s,r){this.url=e,this.method=n,this.handler=s,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}};function O(t){if(!t)throw le()}function K(t,e){function n(s,r){let o=zt(t,r,e);return O(o!==null),o}return n}function G(t){function e(n,s){let r;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?r=lt():r=ut():n.getStatus()===402?r=at(t.bucket):n.getStatus()===403?r=ct(t.path):r=s,r.status=n.getStatus(),r.serverResponse=s.serverResponse,r}return e}function pe(t){let e=G(t);function n(s,r){let o=e(s,r);return s.getStatus()===404&&(o=it(t.path)),o.serverResponse=r.serverResponse,o}return n}function Ge(t,e,n){let s=e.fullServerUrl(),r=z(s,t.host,t._protocol),o="GET",i=t.maxOperationRetryTime,u=new x(r,o,K(t,n),i);return u.errorHandler=pe(e),u}function Gt(t,e,n,s){let r=e.fullServerUrl(),o=z(r,t.host,t._protocol),i="PATCH",u=fe(n,s),a={"Content-Type":"application/json; charset=utf-8"},l=t.maxOperationRetryTime,c=new x(o,i,K(t,s),l);return c.headers=a,c.body=u,c.errorHandler=pe(e),c}function Wt(t,e){let n=e.fullServerUrl(),s=z(n,t.host,t._protocol),r="DELETE",o=t.maxOperationRetryTime;function i(a,l){}let u=new x(s,r,i,o);return u.successCodes=[200,204],u.errorHandler=pe(e),u}function Vt(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function We(t,e,n){let s=Object.assign({},n);return s.fullPath=t.path,s.size=e.size(),s.contentType||(s.contentType=Vt(null,e)),s}function Xt(t,e,n,s,r){let o=e.bucketOnlyServerUrl(),i={"X-Goog-Upload-Protocol":"multipart"};function u(){let R="";for(let b=0;b<2;b++)R=R+Math.random().toString().slice(2);return R}let a=u();i["Content-Type"]="multipart/related; boundary="+a;let l=We(e,s,r),c=fe(l,n),d="--"+a+`\r
3
+ Content-Type: application/json; charset=utf-8\r
4
+ \r
5
+ `+c+`\r
6
+ --`+a+`\r
7
+ Content-Type: `+l.contentType+`\r
8
+ \r
9
+ `,f=`\r
10
+ --`+a+"--",_=X.getBlob(d,s,f);if(_===null)throw Me();let h={name:l.fullPath},T=z(o,t.host,t._protocol),m="POST",U=t.maxUploadRetryTime,I=new x(T,m,K(t,n),U);return I.urlParams=h,I.headers=i,I.body=_.uploadData(),I.errorHandler=G(e),I}var L=class{constructor(e,n,s,r){this.current=e,this.total=n,this.finalized=!!s,this.metadata=r||null}};function _e(t,e){let n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch{O(!1)}return O(!!n&&(e||["active"]).indexOf(n)!==-1),n}function Kt(t,e,n,s,r){let o=e.bucketOnlyServerUrl(),i=We(e,s,r),u={name:i.fullPath},a=z(o,t.host,t._protocol),l="POST",c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${s.size()}`,"X-Goog-Upload-Header-Content-Type":i.contentType,"Content-Type":"application/json; charset=utf-8"},d=fe(i,n),f=t.maxUploadRetryTime;function _(T){_e(T);let m;try{m=T.getResponseHeader("X-Goog-Upload-URL")}catch{O(!1)}return O(ce(m)),m}let h=new x(a,l,_,f);return h.urlParams=u,h.headers=c,h.body=d,h.errorHandler=G(e),h}function Yt(t,e,n,s){let r={"X-Goog-Upload-Command":"query"};function o(l){let c=_e(l,["active","final"]),d=null;try{d=l.getResponseHeader("X-Goog-Upload-Size-Received")}catch{O(!1)}d||O(!1);let f=Number(d);return O(!isNaN(f)),new L(f,s.size(),c==="final")}let i="POST",u=t.maxUploadRetryTime,a=new x(n,i,o,u);return a.headers=r,a.errorHandler=G(e),a}var Se=256*1024;function Zt(t,e,n,s,r,o,i,u){let a=new L(0,0);if(i?(a.current=i.current,a.total=i.total):(a.current=0,a.total=s.size()),s.size()!==a.total)throw pt();let l=a.total-a.current,c=l;r>0&&(c=Math.min(c,r));let d=a.current,f=d+c,_="";c===0?_="finalize":l===c?_="upload, finalize":_="upload";let h={"X-Goog-Upload-Command":_,"X-Goog-Upload-Offset":`${a.current}`},T=s.slice(d,f);if(T===null)throw Me();function m(b,C){let v=_e(b,["active","final"]),Y=a.current+c,M=s.size(),Z;return v==="final"?Z=K(e,o)(b,C):Z=null,new L(Y,M,v==="final",Z)}let U="POST",I=e.maxUploadRetryTime,R=new x(n,U,m,I);return R.headers=h,R.body=T.uploadData(),R.progressCallback=u||null,R.errorHandler=G(t),R}var y={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function te(t){switch(t){case"running":case"pausing":case"canceling":return y.RUNNING;case"paused":return y.PAUSED;case"success":return y.SUCCESS;case"canceled":return y.CANCELED;case"error":return y.ERROR;default:return y.ERROR}}var oe=class{constructor(e,n,s){if(Rt(e)||n!=null||s!=null)this.next=e,this.error=n??void 0,this.complete=s??void 0;else{let o=e;this.next=o.next,this.error=o.error,this.complete=o.complete}}};function N(t){return(...e)=>{Promise.resolve().then(()=>t(...e))}}var Pe=null,ie=class{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=P.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=P.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=P.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,s,r,o){if(this.sent_)throw q("cannot .send() more than once");if(J(e)&&s&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(n,e,!0),o!==void 0)for(let i in o)o.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,o[i].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw q("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw q("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw q("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw q("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}},ae=class extends ie{initXhr(){this.xhr_.responseType="text"}};function A(){return Pe?Pe():new ae}var ue=class{isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}constructor(e,n,s=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=n,this._metadata=s,this._mappings=de(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=r=>{if(this._request=void 0,this._chunkMultiplier=1,r._codeEquals(p.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{let o=this.isExponentialBackoffExpired();if($e(r.status,[]))if(o)r=Fe();else{this.sleepTime=Math.max(this.sleepTime*2,ot),this._needToFetchStatus=!0,this.completeTransitions_();return}this._error=r,this._transition("error")}},this._metadataErrorHandler=r=>{this._request=void 0,r._codeEquals(p.CANCELED)?this.completeTransitions_():(this._error=r,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((r,o)=>{this._resolve=r,this._reject=o,this._start()}),this._promise.then(null,()=>{})}_makeProgressCallback(){let e=this._transferred;return n=>this._updateProgress(e+n)}_shouldDoResumable(e){return e.size()>256*1024}_start(){this._state==="running"&&this._request===void 0&&(this._resumable?this._uploadUrl===void 0?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([n,s])=>{switch(this._state){case"running":e(n,s);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused");break}})}_createResumable(){this._resolveToken((e,n)=>{let s=Kt(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(s,A,e,n);this._request=r,r.getPromise().then(o=>{this._request=void 0,this._uploadUrl=o,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){let e=this._uploadUrl;this._resolveToken((n,s)=>{let r=Yt(this._ref.storage,this._ref._location,e,this._blob),o=this._ref.storage._makeRequest(r,A,n,s);this._request=o,o.getPromise().then(i=>{i=i,this._request=void 0,this._updateProgress(i.current),this._needToFetchStatus=!1,i.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){let e=Se*this._chunkMultiplier,n=new L(this._transferred,this._blob.size()),s=this._uploadUrl;this._resolveToken((r,o)=>{let i;try{i=Zt(this._ref._location,this._ref.storage,s,this._blob,e,this._mappings,n,this._makeProgressCallback())}catch(a){this._error=a,this._transition("error");return}let u=this._ref.storage._makeRequest(i,A,r,o,!1);this._request=u,u.getPromise().then(a=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(a.current),a.finalized?(this._metadata=a.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){Se*this._chunkMultiplier*2<32*1024*1024&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,n)=>{let s=Ge(this._ref.storage,this._ref._location,this._mappings),r=this._ref.storage._makeRequest(s,A,e,n);this._request=r,r.getPromise().then(o=>{this._request=void 0,this._metadata=o,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,n)=>{let s=Xt(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(s,A,e,n);this._request=r,r.getPromise().then(o=>{this._request=void 0,this._metadata=o,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){let n=this._transferred;this._transferred=e,this._transferred!==n&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,this._request!==void 0?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":let n=this._state==="paused";this._state=e,n&&(this._notifyObservers(),this._start());break;case"paused":this._state=e,this._notifyObservers();break;case"canceled":this._error=Be(),this._state=e,this._notifyObservers();break;case"error":this._state=e,this._notifyObservers();break;case"success":this._state=e,this._notifyObservers();break}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start();break}}get snapshot(){let e=te(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,n,s,r){let o=new oe(n||void 0,s||void 0,r||void 0);return this._addObserver(o),()=>{this._removeObserver(o)}}then(e,n){return this._promise.then(e,n)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){let n=this._observers.indexOf(e);n!==-1&&this._observers.splice(n,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(n=>{this._notifyObserver(n)})}_finishPromise(){if(this._resolve!==void 0){let e=!0;switch(te(this._state)){case y.SUCCESS:N(this._resolve.bind(null,this.snapshot))();break;case y.CANCELED:case y.ERROR:let n=this._reject;N(n.bind(null,this._error))();break;default:e=!1;break}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){switch(te(this._state)){case y.RUNNING:case y.PAUSED:e.next&&N(e.next.bind(e,this.snapshot))();break;case y.SUCCESS:e.complete&&N(e.complete.bind(e))();break;case y.CANCELED:case y.ERROR:e.error&&N(e.error.bind(e,this._error))();break;default:e.error&&N(e.error.bind(e,this._error))()}}resume(){let e=this._state==="paused"||this._state==="pausing";return e&&this._transition("running"),e}pause(){let e=this._state==="running";return e&&this._transition("pausing"),e}cancel(){let e=this._state==="running"||this._state==="pausing";return e&&this._transition("canceling"),e}};var F=class t{constructor(e,n){this._service=e,n instanceof k?this._location=n:this._location=k.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new t(e,n)}get root(){let e=new k(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return ze(this._location.path)}get storage(){return this._service}get parent(){let e=Bt(this._location.path);if(e===null)return null;let n=new k(this._location.bucket,e);return new t(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw gt(e)}};function Jt(t,e,n){return t._throwIfRoot("uploadBytesResumable"),new ue(t,new X(e),n)}function Qt(t){t._throwIfRoot("getMetadata");let e=Ge(t.storage,t._location,de());return t.storage.makeRequestWithTokens(e,A)}function en(t,e){t._throwIfRoot("updateMetadata");let n=Gt(t.storage,t._location,e,de());return t.storage.makeRequestWithTokens(n,A)}function tn(t){t._throwIfRoot("deleteObject");let e=Wt(t.storage,t._location);return t.storage.makeRequestWithTokens(e,A)}function nn(t,e){let n=Mt(t._location.path,e),s=new k(t._location.bucket,n);return new F(t.storage,s)}function sn(t){return/^[A-Za-z]+:\/\//.test(t)}function rn(t,e){return new F(t,e)}function Ve(t,e){if(t instanceof j){let n=t;if(n._bucket==null)throw ft();let s=new F(n,n._bucket);return e!=null?Ve(s,e):s}else return e!==void 0?nn(t,e):t}function on(t,e){if(e&&sn(e)){if(t instanceof j)return rn(t,e);throw ne("To use ref(service, url), the first argument must be a Storage instance.")}else return Ve(t,e)}function Ce(t,e){let n=e?.[Le];return n==null?null:k.makeFromBucketSpec(n,t)}function an(t,e,n,s={}){t.host=`${e}:${n}`;let r=J(e);r&&(be(`https://${t.host}/b`),Re("Storage",!0)),t._isUsingEmulator=!0,t._protocol=r?"https":"http";let{mockUserToken:o}=s;o&&(t._overrideAuthToken=typeof o=="string"?o:we(o,t.app.options.projectId))}var j=class{constructor(e,n,s,r,o,i=!1){this.app=e,this._authProvider=n,this._appCheckProvider=s,this._url=r,this._firebaseVersion=o,this._isUsingEmulator=i,this._bucket=null,this._host=De,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=st,this._maxUploadRetryTime=rt,this._requests=new Set,r!=null?this._bucket=k.makeFromBucketSpec(r,this._host):this._bucket=Ce(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=k.makeFromBucketSpec(this._url,e):this._bucket=Ce(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){Oe("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){Oe("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let e=this._authProvider.getImmediate({optional:!0});if(e){let n=await e.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){if(Ue(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=this._appCheckProvider.getImmediate({optional:!0});return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new F(this,e)}_makeRequest(e,n,s,r,o=!0){if(this._deleted)return new se(qe());{let i=xt(e,this._appId,s,r,n,this._firebaseVersion,o,this._isUsingEmulator);return this._requests.add(i),i.getPromise().then(()=>this._requests.delete(i),()=>this._requests.delete(i)),i}}async makeRequestWithTokens(e,n){let[s,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,s,r).getPromise()}},ve="@firebase/storage",Ne="0.14.0";var Xe="storage";function Ke(t,e,n){return t=S(t),Jt(t,e,n)}function Ye(t){return t=S(t),Qt(t)}function Ze(t,e){return t=S(t),en(t,e)}function Je(t){return t=S(t),tn(t)}function B(t,e){return t=S(t),on(t,e)}function Un(t=xe(),e){t=S(t);let s=Ee(t,Xe).getImmediate({identifier:e}),r=me("storage");return r&&un(s,...r),s}function un(t,e,n,s={}){an(t,e,n,s)}function ln(t,{instanceIdentifier:e}){let n=t.getProvider("app").getImmediate(),s=t.getProvider("auth-internal"),r=t.getProvider("app-check-internal");return new j(n,s,r,e,Ie)}function cn(){ke(new ye(Xe,ln,"PUBLIC").setMultipleInstances(!0)),Q(ve,Ne,""),Q(ve,Ne,"esm2020")}cn();var Qe=["bmp","gif","ico","jpeg","jpg","png","tiff","webp"],et=[...Qe,"svg"],tt=["mp4","webm"],hn="https://lh3.googleusercontent.com/";async function Sn(t,e){let n=window.__ROOT_CTX.rootConfig.projectId,s=await wn(t),r=ge(t.name),o=dn(t,s,r,e),i=`${n}/uploads/${o}`,u=B(window.firebase.storage,i);if(e?.checkExists&&await fn(i))throw new Error(`File already exists: ${i}`);let a=Ke(u,t),l=-1,c=Date.now();return await new Promise((d,f)=>{let _=setInterval(()=>{Date.now()-c>1e4&&(clearInterval(_),f(new Error("Upload stalled: no progress for 10 seconds")))},1e3);a.on("state_changed",h=>{h.bytesTransferred>0&&clearInterval(_),console.log(`uploading ${t.name}: ${h.bytesTransferred} / ${h.totalBytes} bytes`),h.bytesTransferred!==l&&(l=h.bytesTransferred,c=Date.now())},h=>{clearInterval(_),f(h)},()=>{console.log(`uploaded ${i}`),clearInterval(_),d(a.snapshot)})}),pn(u,t,r,e)}async function Pn(t){let e=window.firebase.storage,n;t.startsWith("/")?n=B(e,`gs://${t.substring(1)}`):t.startsWith("http")?n=B(e,t):n=B(e,t),await Je(n),console.log(`deleted ${t}`)}function dn(t,e,n,s){return s?.namingMode==="clean"?t.name:s?.namingMode==="hash-path"||s?.preserveFilename?`${e}/${t.name}`:`${e}.${n}`}async function fn(t){let e=B(window.firebase.storage,t);try{return await Ye(e),!0}catch(n){if(n.code==="storage/object-not-found")return!1;throw n}}async function pn(t,e,n,s){let r={};r.filename=e.name,r.uploadedBy=window.firebase.user.email||"unknown",r.uploadedAt=String(Math.floor(new Date().getTime()));let o=`/${t.bucket}/${t.fullPath}`,i=`https://storage.googleapis.com${o}`;if(et.includes(n)){let a=await mn(e);if(r.width=a.width,r.height=a.height,!s?.disableGci&&Qe.includes(n)){let l=await gn(o);l&&(r.gcsPath=o,i=l)}r.canvasBgColor=await Tn(e)?"dark":"light"}else if(tt.includes(n)){let a=await bn(i);r.width=a.width,r.height=a.height,console.log("video dimensions:",a)}let u=s?.cacheControl||"public, max-age=31536000";return await Ze(t,{cacheControl:u,customMetadata:Rn(r)}),console.log("updated meta data: ",r),{...r,src:i}}function ge(t){return _n(t.split(".").at(-1)||"")}function _n(t){let e=String(t).toLowerCase();return e==="jpeg"&&(e="jpg"),e}async function gn(t){let e=window.__ROOT_CTX.rootConfig.gci;if(!e)return"";let n=new URLSearchParams({gcs:t}),s=`${e}/_/serving_url?${n.toString()}`,r=await window.fetch(s);if(r.status!==200){let i=await r.text();throw console.error(`failed to get gci url: ${s}`),console.error(i),new Error("failed to get gci url")}return(await r.json()).servingUrl}async function mn(t){return new Promise((e,n)=>{let s=new FileReader;s.onload=()=>{let r=new Image;r.onload=()=>{e({width:r.width,height:r.height})},r.onerror=n,r.src=String(s.result)},s.onerror=n,s.readAsDataURL(t)})}async function bn(t){return new Promise((e,n)=>{let s=document.createElement("video");s.addEventListener("loadedmetadata",()=>{let r={width:s.videoWidth,height:s.videoHeight};e(r),document.body.removeChild(s)},!1),s.addEventListener("error",()=>{n(new Error("Failed to load video metadata")),document.body.removeChild(s)},!1),s.className="sr-only",s.src=t,s.preload="metadata",document.body.appendChild(s)})}async function wn(t){let e=await t.arrayBuffer(),n=await crypto.subtle.digest("SHA-1",e);return Array.from(new Uint8Array(n)).map(o=>o.toString(16).padStart(2,"0")).join("")}function Rn(t){let e={};return Object.entries(t).forEach(([n,s])=>{t[n]=String(s).trim()}),e}function Cn(t){if(!t)return!1;if(nt(t)||t.startsWith("data:image/")||t.startsWith("blob:"))return!0;let e=ge(t);return et.includes(e)}function nt(t){return t?t.startsWith(hn):!1}function vn(t){if(!t)return!1;let e=ge(t);return tt.includes(e)}function Nn(t){return nt(t)?t.split("=")[0]+"=s0-d":t}function Tn(t){return new Promise((e,n)=>{let s=new Image,r=new FileReader;r.onload=()=>{s.src=r.result},s.onload=()=>{let o=document.createElement("canvas"),i=o.getContext("2d");o.width=s.width,o.height=s.height,i.drawImage(s,0,0,o.width,o.height);let{data:u}=i.getImageData(0,0,o.width,o.height),a=0,l=0,c=0,d=0,f=Math.floor(u.length/4e4)*4;f<4&&(f=4);for(let h=0;h<u.length;h+=f)u[h+3]<128||(a+=u[h],l+=u[h+1],c+=u[h+2],d++);if(d===0){e(!1);return}let _=.299*(a/d)+.587*(l/d)+.114*(c/d);e(_>128)},s.onerror=n,r.onerror=n,r.readAsDataURL(t)})}export{Un as a,Qe as b,et as c,tt as d,hn as e,Sn as f,Pn as g,fn as h,ge as i,Cn as j,nt as k,vn as l,Nn as m,Tn as n};
@@ -0,0 +1,176 @@
1
+ Bundled license information:
2
+
3
+ @firebase/storage/dist/index.esm.js:
4
+ @firebase/storage/dist/index.esm.js:
5
+ @firebase/storage/dist/index.esm.js:
6
+ @firebase/storage/dist/index.esm.js:
7
+ /**
8
+ * @license
9
+ * Copyright 2017 Google LLC
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License.
22
+ */
23
+
24
+ @firebase/storage/dist/index.esm.js:
25
+ /**
26
+ * @license
27
+ * Copyright 2017 Google LLC
28
+ *
29
+ * Licensed under the Apache License, Version 2.0 (the "License");
30
+ * you may not use this file except in compliance with the License.
31
+ * You may obtain a copy of the License at
32
+ *
33
+ * http://www.apache.org/licenses/LICENSE-2.0
34
+ *
35
+ * Unless required by applicable law or agreed to in writing, software
36
+ * distributed under the License is distributed on an "AS IS" BASIS,
37
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38
+ * See the License for the specific language governing permissions and
39
+ * limitations under the License.
40
+ */
41
+ /**
42
+ * @license
43
+ * Copyright 2022 Google LLC
44
+ *
45
+ * Licensed under the Apache License, Version 2.0 (the "License");
46
+ * you may not use this file except in compliance with the License.
47
+ * You may obtain a copy of the License at
48
+ *
49
+ * http://www.apache.org/licenses/LICENSE-2.0
50
+ *
51
+ * Unless required by applicable law or agreed to in writing, software
52
+ * distributed under the License is distributed on an "AS IS" BASIS,
53
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
54
+ * See the License for the specific language governing permissions and
55
+ * limitations under the License.
56
+ */
57
+ /**
58
+ * @license
59
+ * Copyright 2021 Google LLC
60
+ *
61
+ * Licensed under the Apache License, Version 2.0 (the "License");
62
+ * you may not use this file except in compliance with the License.
63
+ * You may obtain a copy of the License at
64
+ *
65
+ * http://www.apache.org/licenses/LICENSE-2.0
66
+ *
67
+ * Unless required by applicable law or agreed to in writing, software
68
+ * distributed under the License is distributed on an "AS IS" BASIS,
69
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
70
+ * See the License for the specific language governing permissions and
71
+ * limitations under the License.
72
+ */
73
+
74
+ @firebase/storage/dist/index.esm.js:
75
+ /**
76
+ * @license
77
+ * Copyright 2019 Google LLC
78
+ *
79
+ * Licensed under the Apache License, Version 2.0 (the "License");
80
+ * you may not use this file except in compliance with the License.
81
+ * You may obtain a copy of the License at
82
+ *
83
+ * http://www.apache.org/licenses/LICENSE-2.0
84
+ *
85
+ * Unless required by applicable law or agreed to in writing, software
86
+ * distributed under the License is distributed on an "AS IS" BASIS,
87
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
88
+ * See the License for the specific language governing permissions and
89
+ * limitations under the License.
90
+ */
91
+
92
+ @firebase/storage/dist/index.esm.js:
93
+ /**
94
+ * @license
95
+ * Copyright 2017 Google LLC
96
+ *
97
+ * Licensed under the Apache License, Version 2.0 (the "License");
98
+ * you may not use this file except in compliance with the License.
99
+ * You may obtain a copy of the License at
100
+ *
101
+ * http://www.apache.org/licenses/LICENSE-2.0
102
+ *
103
+ * Unless required by applicable law or agreed to in writing, software
104
+ * distributed under the License is distributed on an "AS IS" BASIS,
105
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
+ * See the License for the specific language governing permissions and
107
+ * limitations under the License.
108
+ */
109
+ /**
110
+ * @license
111
+ * Copyright 2019 Google LLC
112
+ *
113
+ * Licensed under the Apache License, Version 2.0 (the "License");
114
+ * you may not use this file except in compliance with the License.
115
+ * You may obtain a copy of the License at
116
+ *
117
+ * http://www.apache.org/licenses/LICENSE-2.0
118
+ *
119
+ * Unless required by applicable law or agreed to in writing, software
120
+ * distributed under the License is distributed on an "AS IS" BASIS,
121
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122
+ * See the License for the specific language governing permissions and
123
+ * limitations under the License.
124
+ */
125
+
126
+ @firebase/storage/dist/index.esm.js:
127
+ /**
128
+ * @license
129
+ * Copyright 2017 Google LLC
130
+ *
131
+ * Licensed under the Apache License, Version 2.0 (the "License");
132
+ * you may not use this file except in compliance with the License.
133
+ * You may obtain a copy of the License at
134
+ *
135
+ * http://www.apache.org/licenses/LICENSE-2.0
136
+ *
137
+ * Unless required by applicable law or agreed to in writing, software
138
+ * distributed under the License is distributed on an "AS IS" BASIS,
139
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
140
+ * See the License for the specific language governing permissions and
141
+ * limitations under the License.
142
+ */
143
+ /**
144
+ * @license
145
+ * Copyright 2020 Google LLC
146
+ *
147
+ * Licensed under the Apache License, Version 2.0 (the "License");
148
+ * you may not use this file except in compliance with the License.
149
+ * You may obtain a copy of the License at
150
+ *
151
+ * http://www.apache.org/licenses/LICENSE-2.0
152
+ *
153
+ * Unless required by applicable law or agreed to in writing, software
154
+ * distributed under the License is distributed on an "AS IS" BASIS,
155
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
156
+ * See the License for the specific language governing permissions and
157
+ * limitations under the License.
158
+ */
159
+
160
+ @firebase/storage/dist/index.esm.js:
161
+ /**
162
+ * @license
163
+ * Copyright 2021 Google LLC
164
+ *
165
+ * Licensed under the Apache License, Version 2.0 (the "License");
166
+ * you may not use this file except in compliance with the License.
167
+ * You may obtain a copy of the License at
168
+ *
169
+ * http://www.apache.org/licenses/LICENSE-2.0
170
+ *
171
+ * Unless required by applicable law or agreed to in writing, software
172
+ * distributed under the License is distributed on an "AS IS" BASIS,
173
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
174
+ * See the License for the specific language governing permissions and
175
+ * limitations under the License.
176
+ */
@@ -0,0 +1,3 @@
1
+ import{a as na,b as P,c as I,d as ia,e as la}from"./chunk-DUJYIOLE.js";import{a as v}from"./chunk-KFAZBEPV.js";import{a as oa}from"./chunk-X2WHBGTP.js";import{a as d}from"./chunk-PJA7YP4A.js";import{a as D}from"./chunk-62UWGWON.js";import{a as A}from"./chunk-I6ICVKEC.js";import{f as Q}from"./chunk-AL3TN2KI.js";import{$a as aa,Db as ta,Ea as J,Ha as a,Kc as ra,Qa as X,Rc as sa,V as G,Xa as Z,a as l,c as W,ea as _,g as V,j as fa,lb as ea,ra as z,va as Y,ya as R,za as q}from"./chunk-NZHF733K.js";fa();var O=[{value:"new",label:"New"},{value:"in-progress",label:"In progress"},{value:"in-review",label:"In review"},{value:"closed",label:"Closed"}],Ta=O.filter(t=>t.value!=="closed"),xa=O.filter(t=>t.value==="closed"),va=[{value:"table",label:a("span",{className:"TaskManager__layoutOption",children:[a(ra,{size:14,strokeWidth:"1.8"}),"Table"]})},{value:"board",label:a("span",{className:"TaskManager__layoutOption",children:[a(ea,{size:14,strokeWidth:"1.8"}),"Board"]})}],ba=[{value:"open",label:"Active"},{value:"assigned-to-me",label:"Assigned to me"}],ha=[{value:"open",label:"Active"},{value:"assigned-to-me",label:"Assigned to me"},{value:"created-by-me",label:"Created by me"},{value:"closed",label:"Closed"},{value:"all",label:"All"}];function qa(t){let e=window.firebase.user.email||"",r=(t.variant||"compact")==="page",{tasks:i,loading:n,error:c}=Sa(r?"all":"open"),[f,b]=l("open"),[p,da]=oa("root-cms-task-manager-layout-v2","table"),[h,j]=l(""),[g,y]=l(""),[M,T]=l(!1),[w,B]=l("normal"),[x,N]=l(""),[C,L]=l(!1),[H,F]=l(!1),pa=r?ha:ba,U=V(()=>za(i,f,e),[i,f,e]),K=U.length,ga=r?`${K} shown`:`${K} active`,ma=!!h.trim()&&!H;async function ka(o){o.preventDefault();let $=h.trim();if(!$)return;let S=Ca($);F(!0);try{await na({title:S.title,description:S.description,assignee:g.trim()||void 0,priority:w,targetLaunchDate:_a(x)}),j(""),y(""),B("normal"),N(""),A({title:"Task created",message:S.title,autoClose:4e3})}catch(ua){A({title:"Could not create task",message:D(ua),color:"red",autoClose:!1})}finally{F(!1)}}return a("div",{className:Q(t.className,"TaskManager",r&&"TaskManager--page"),children:[a(d,{className:"TaskManager__composer",children:a("form",{onSubmit:o=>ka(o),children:[a("div",{className:"TaskManager__composer__header",children:[a("div",{className:"TaskManager__composer__avatar",children:g&&a(v,{email:g,size:32})}),a("div",{children:[a("div",{className:"TaskManager__composer__title",children:"Create a task"}),a("div",{className:"TaskManager__composer__subtitle",children:"Assign it to an agent, a teammate, or yourself."})]})]}),a("textarea",{className:"TaskManager__composer__textarea",value:h,rows:3,placeholder:"Enter a task description. Specify scope, collection, and acceptance criteria.",onInput:o=>{j(o.currentTarget.value)}}),a("div",{className:"TaskManager__composer__footer",children:[a("div",{className:"TaskManager__composer__controls",children:[a(R,{opened:M,onClose:()=>T(!1),position:"bottom",shadow:"md",width:280,withArrow:!0,target:a("button",{className:"TaskManager__composer__control",type:"button","aria-expanded":M,onClick:()=>T(!M),children:[a(sa,{size:15,strokeWidth:"1.8"}),a("span",{children:"assign to..."}),g&&a("span",{className:"TaskManager__composer__control__value",children:m(g)})]}),children:a("div",{className:"TaskManager__composer__popover",children:[a(Y,{autoFocus:!0,label:"Email",placeholder:"teammate@example.com",size:"xs",type:"email",value:g,onChange:o=>y(o.currentTarget.value),onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),T(!1))}}),a("div",{className:"TaskManager__composer__popover__actions",children:[a(_,{compact:!0,size:"xs",variant:"default",onClick:()=>y(""),children:"Clear"}),a(_,{compact:!0,size:"xs",color:"dark",onClick:()=>T(!1),children:"Done"})]})]})}),a(z,{position:"bottom",shadow:"md",control:a("button",{className:"TaskManager__composer__control",type:"button",children:[a(ta,{size:15,strokeWidth:"1.8"}),a("span",{children:w}),a(aa,{size:14,strokeWidth:"1.8"})]}),children:["high","medium","normal"].map(o=>a(z.Item,{className:w===o?"TaskManager__composer__menuItem--active":"",onClick:()=>B(o),children:o},o))}),a(R,{opened:C,onClose:()=>L(!1),position:"bottom",shadow:"md",width:260,withArrow:!0,target:a("button",{className:"TaskManager__composer__control",type:"button","aria-expanded":C,onClick:()=>L(!C),children:[a(Z,{size:15,strokeWidth:"1.8"}),a("span",{children:x?Da(x):"target launch date"})]}),children:a("div",{className:"TaskManager__composer__popover",children:[a("label",{className:"TaskManager__composer__dateLabel",children:["Target launch date",a("input",{type:"date",value:x,onInput:o=>{N(o.currentTarget.value)}})]}),a("div",{className:"TaskManager__composer__popover__actions",children:[a(_,{compact:!0,size:"xs",variant:"default",onClick:()=>N(""),children:"Clear"}),a(_,{compact:!0,size:"xs",color:"dark",onClick:()=>L(!1),children:"Done"})]})]})})]}),a(_,{type:"submit",size:"xs",color:"dark",loading:H,disabled:!ma,rightIcon:a(X,{size:15,strokeWidth:"1.8"}),children:"Create task"})]})]})}),a("div",{className:"TaskManager__listHeader",children:[a("div",{className:"TaskManager__listHeader__summary",children:[a("div",{className:"TaskManager__listHeader__titleLine",children:[a("div",{className:"TaskManager__sectionTitle",children:r?"Tasks":"Active tasks"}),a("span",{className:"TaskManager__listHeader__count",children:ga})]}),a("div",{className:"TaskManager__filters","aria-label":"Task filters",children:pa.map(o=>a("button",{className:f===o.value?"active":"",type:"button",onClick:()=>b(o.value),children:o.label},o.value))})]}),a("div",{className:"TaskManager__listHeader__actions",children:r?a(q,{className:"TaskManager__layoutToggle",size:"xs",value:p,onChange:o=>da(o),data:va}):a(_,{component:"a",href:"/cms/tasks",variant:"default",size:"xs",compact:!0,children:"Show all"})})]}),a(ya,{error:c,filter:f,layout:r?p:"compact",loading:n,tasks:U})]})}function ya(t){let{error:e,filter:s,layout:r,loading:i,tasks:n}=t;return i?a(d,{className:"TaskManager__list",children:a("div",{className:"TaskManager__list__state",children:a(G,{color:"gray",size:"sm"})})}):e?a(d,{className:"TaskManager__list",children:a("div",{className:"TaskManager__list__state error",children:e})}):n.length===0?a(d,{className:"TaskManager__list",children:a("div",{className:"TaskManager__list__state",children:Ra(s,r)})}):r==="board"?a(wa,{filter:s,tasks:n}):r==="table"?a(Ma,{tasks:n}):a(d,{className:"TaskManager__list",children:n.map(c=>a(La,{task:c},c.id))})}function Ma(t){return a(d,{className:"TaskManager__tableSurface",children:a(J,{className:"TaskManager__table",verticalSpacing:"xs",striped:!0,highlightOnHover:!0,fontSize:"xs",children:[a("thead",{children:a("tr",{children:[a("th",{children:"task"}),a("th",{children:"status"}),a("th",{children:"priority"}),a("th",{children:"assignee"}),a("th",{children:"target"}),a("th",{children:"opened"})]})}),a("tbody",{children:t.tasks.map(e=>{let s=e.createdBy||"unknown";return a("tr",{children:[a("td",{children:a("a",{className:"TaskManager__tableTask",href:`/cms/tasks/${e.id}`,children:[a("div",{className:"TaskManager__taskRow__avatar",children:e.assignee&&a(v,{email:e.assignee,size:24})}),a("span",{className:"TaskManager__tableTask__content",children:[a("span",{className:"TaskManager__tableTask__title",children:e.title}),a("span",{className:"TaskManager__tableTask__meta",children:["#",e.id," by ",m(s)]})]})]})}),a("td",{children:a("span",{className:"TaskManager__taskRow__status",children:[a("span",{}),E(e.status)]})}),a("td",{children:a("span",{className:`TaskManager__taskRow__priority TaskManager__taskRow__priority--${u(e.priority)}`,children:u(e.priority)})}),a("td",{children:e.assignee?m(e.assignee):"Unassigned"}),a("td",{children:e.targetLaunchDate?k(e.targetLaunchDate):"None"}),a("td",{children:k(e.createdAt)})]},e.id)})})]})})}function wa(t){let e=Aa(t.tasks,t.filter);return a("div",{className:"TaskManager__board",children:e.map(s=>{let r=t.tasks.filter(i=>ca(i)===s.value);return a("section",{className:"TaskManager__boardColumn",children:[a("div",{className:"TaskManager__boardColumn__header",children:[a("span",{children:s.label}),a("span",{children:r.length})]}),a("div",{className:"TaskManager__boardColumn__tasks",children:[r.length===0&&a("div",{className:"TaskManager__boardColumn__empty",children:"No tasks"}),r.map(i=>a(Na,{task:i},i.id))]})]},s.value)})})}function Na(t){let{task:e}=t,s=e.createdBy||"unknown";return a("a",{className:"TaskManager__boardCard",href:`/cms/tasks/${e.id}`,children:[a("div",{className:"TaskManager__boardCard__title",children:e.title}),e.description&&a("div",{className:"TaskManager__boardCard__description",children:e.description}),a("div",{className:"TaskManager__boardCard__meta",children:["#",e.id," opened ",k(e.createdAt)," by"," ",m(s)]}),a("div",{className:"TaskManager__boardCard__badges",children:[a("span",{className:`TaskManager__taskRow__priority TaskManager__taskRow__priority--${u(e.priority)}`,children:u(e.priority)}),a("span",{className:"TaskManager__boardCard__badge",children:e.assignee?m(e.assignee):"Unassigned"}),e.targetLaunchDate&&a("span",{className:"TaskManager__boardCard__badge",children:["target ",k(e.targetLaunchDate)]})]})]})}function Ca(t){let[e,...s]=t.split(`
2
+ `);for(;s.length>0&&s[0].trim().length===0;)s.shift();return{title:e.trim(),description:s.join(`
3
+ `).trim()}}function La(t){let{task:e}=t,s=e.createdBy||"unknown";return a("a",{className:"TaskManager__taskRow",href:`/cms/tasks/${e.id}`,children:[a("div",{className:"TaskManager__taskRow__avatar",children:e.assignee&&a(v,{email:e.assignee,size:28})}),a("div",{className:"TaskManager__taskRow__content",children:[a("div",{className:"TaskManager__taskRow__title",children:e.title}),a("div",{className:"TaskManager__taskRow__meta",children:["opened ",k(e.createdAt)," by ",m(s)]})]}),a("div",{className:"TaskManager__taskRow__badges",children:[a("div",{className:"TaskManager__taskRow__status",children:[a("span",{}),E(e.status)]}),a("div",{className:`TaskManager__taskRow__priority TaskManager__taskRow__priority--${u(e.priority)}`,children:u(e.priority)}),e.targetLaunchDate&&a("div",{className:"TaskManager__taskRow__date",children:["target ",k(e.targetLaunchDate)]})]})]})}function Sa(t){let[e,s]=l([]),[r,i]=l(!0),[n,c]=l("");return W(()=>{i(!0);let b=(t==="all"?ia:la)(p=>{s(p),c(""),i(!1)},p=>{c(D(p)),i(!1)});return()=>b()},[t]),{tasks:e,loading:r,error:n}}function za(t,e,s){switch(e){case"all":return t;case"closed":return t.filter(r=>!P(r.status));case"assigned-to-me":return t.filter(r=>r.assignee===s);case"created-by-me":return t.filter(r=>r.createdBy===s);default:return t.filter(r=>P(r.status))}}function Ra(t,e){switch(t){case"assigned-to-me":return e==="compact"?"No active tasks are assigned to you.":"No tasks are assigned to you.";case"created-by-me":return"No tasks created by you.";case"closed":return"No closed tasks yet.";case"all":return"No tasks yet.";default:return"No active tasks yet."}}function m(t){return t.split("@")[0]||t}function k(t){return t?.toMillis?new Date(t.toMillis()).toLocaleDateString("en",{month:"short",day:"numeric"}):"just now"}function E(t){return I(t).replace(/[-_]/g," ")}function ca(t){return I(t.status)}function Aa(t,e){let s=e==="open"?Ta:e==="closed"?xa:O,r=new Set(s.map(n=>n.value)),i=t.map(n=>ca(n)).filter(n=>!r.has(n));return[...s,...Array.from(new Set(i)).map(n=>({value:n,label:E(n)}))]}function u(t){return t||"normal"}function _a(t){if(!t)return null;let[e,s,r]=t.split("-").map(Number);return!e||!s||!r?null:new Date(e,s-1,r)}function Da(t){let e=_a(t);return e?e.toLocaleDateString("en",{month:"short",day:"numeric"}):"target launch date"}export{qa as a};
@@ -0,0 +1 @@
1
+ import{d as h,f as d,g as W}from"./chunk-AL3TN2KI.js";import{$ as w,Ac as P,Dc as U,Eb as T,Ga as B,Ha as t,Nb as I,S as k,Sb as H,Y as L,Za as j,a as C,ba as S,c as g,cc as O,gb as N,j as x,nc as R,pb as M,ra as b,vc as z,wc as Z}from"./chunk-NZHF733K.js";import{d as m}from"./chunk-KUCVLANF.js";x();function F(e){g(()=>{let o=window.__ROOT_CTX?.rootConfig,a=o?.projectName||"Root CMS",s=o?.minimalBranding?a:`${a} \u2013 Root CMS`;document.title=e?`${e} \u2013 ${s}`:s},[e])}var f={name:"@blinkk/root-cms",version:"3.0.3",author:"s@blinkk.com",license:"MIT",engines:{node:">=22.0.0"},repository:{type:"git",url:"git+https://github.com/blinkk/rootjs.git",directory:"packages/root-cms"},files:["dist/**/*"],bin:{"root-cms":"./bin/root-cms.js"},type:"module",module:"./dist/core.js",types:"./dist/core/core.d.ts",exports:{".":{types:"./dist/core/core.d.ts",import:"./dist/core.js"},"./client":{types:"./dist/core/client.d.ts",import:"./dist/client.js"},"./core":{types:"./dist/core/core.d.ts",import:"./dist/core.js"},"./functions":{types:"./dist/core/functions.d.ts",import:"./dist/functions.js"},"./plugin":{types:"./dist/core/plugin.d.ts",import:"./dist/plugin.js"},"./project":{types:"./dist/core/project.d.ts",import:"./dist/project.js"},"./richtext":{types:"./dist/core/richtext.d.ts",import:"./dist/richtext.js"}},scripts:{build:'rm -rf dist && concurrently -n "core,signin,ui" npm:build:core npm:build:signin npm:build:ui',"build:core":"node ../../scripts/build-esbuild.mjs ./esbuild.config.json","build:ui":"pnpm build:ui:bundle && pnpm build:ui:clean","build:ui:bundle":"esbuild ui/ui.tsx --bundle --minify --alias:react=@preact/compat --alias:react-dom=@preact/compat --tsconfig=ui/tsconfig.json --outdir=dist/ui --legal-comments=external --splitting --format=esm","build:ui:clean":"rm -f dist/ui/*-*.css","build:signin":"esbuild signin/signin.tsx --bundle --minify --tsconfig=signin/tsconfig.json --outdir=dist/ui --legal-comments=external",dev:'rm -rf dist && concurrently -k -n "core,ui" npm:dev:core npm:dev:signin npm:dev:ui',"dev:core":"pnpm build:core --watch","dev:signin":"pnpm build:signin --watch","dev:ui":"pnpm build:ui:bundle --watch",test:"pnpm build && firebase emulators:exec 'vitest run --exclude=**/*.visual.test.tsx'","test:visual":"vitest run --config=vitest.config.visual.ts","test:watch":"pnpm build && firebase emulators:exec 'vitest'"},dependencies:{"@ag-grid-community/client-side-row-model":"32.3.9","@ag-grid-community/core":"32.3.9","@ag-grid-community/react":"32.3.9","@ag-grid-community/styles":"32.3.9","@ai-sdk/anthropic":"3.0.74","@ai-sdk/google":"3.0.67","@ai-sdk/openai":"3.0.60","@ai-sdk/openai-compatible":"2.0.46","@ai-sdk/react":"3.0.177",ai:"6.0.175",zod:"4.4.3","@google-cloud/firestore":"7.11.3","@hello-pangea/dnd":"18.0.1","@types/cli-progress":"3.11.6","body-parser":"1.20.2","cli-progress":"3.12.0",commander:"11.0.0","csv-parse":"5.5.2","csv-stringify":"6.4.4","date-fns":"4.1.0","date-fns-tz":"3.2.0",diff:"8.0.2","dts-dom":"3.7.0","@mantine/spotlight":"4.2.12","fnv-plus":"1.3.1",jsonwebtoken:"9.0.2",kleur:"4.1.5",minisearch:"7.2.0","sanitize-html":"2.13.1",sirv:"2.0.3","tiny-glob":"0.2.9"},"//":"NOTE(stevenle): due to compat issues with mantine and preact, mantine is pinned to v4.2.12",devDependencies:{"@babel/core":"7.17.9","@blinkk/root":"workspace:*","@editorjs/editorjs":"2.30.8","@editorjs/header":"2.8.8","@editorjs/image":"2.10.2","@editorjs/list":"2.0.6","@editorjs/nested-list":"1.4.3","@editorjs/raw":"2.5.1","@editorjs/table":"2.4.4","@editorjs/underline":"1.2.1","@emotion/react":"11.10.5","@firebase/app-compat":"0.5.2","@firebase/app-types":"0.9.3","@firebase/rules-unit-testing":"5.0.0","@lexical/code":"0.33.1","@lexical/html":"0.33.1","@lexical/link":"0.33.1","@lexical/list":"0.33.1","@lexical/markdown":"0.33.1","@lexical/react":"0.33.1","@lexical/rich-text":"0.33.1","@lexical/selection":"0.33.1","@lexical/table":"0.33.1","@lexical/utils":"0.33.1","@mantine/core":"4.2.12","@mantine/hooks":"4.2.12","@mantine/modals":"4.2.12","@mantine/notifications":"4.2.12","@preact/compat":"18.3.1","@tabler/icons-preact":"3.35.0","@testing-library/preact":"3.2.4","@testing-library/user-event":"14.6.1","@types/body-parser":"1.19.3","@types/fnv-plus":"1.3.2","@types/gapi":"0.0.47","@types/gapi.client.drive-v3":"0.0.4","@types/gapi.client.sheets-v4":"0.0.4","@types/google.accounts":"0.0.14","@types/jsonwebtoken":"9.0.1","@types/node":"24.3.1","@types/sanitize-html":"2.13.0","@vitest/browser":"4.1.6","@vitest/browser-playwright":"4.1.6",concurrently:"7.6.0",esbuild:"0.28.0",firebase:"12.2.1","firebase-admin":"13.5.0","firebase-functions":"6.4.0","firebase-tools":"14.15.2","highlight.js":"11.6.0",jsdom:"27.2.0","json-diff-kit":"1.0.29",lexical:"0.33.1",marked:"9.1.1","mdast-util-from-markdown":"2.0.1","mdast-util-gfm":"3.0.0","micromark-extension-gfm":"3.0.0",playwright:"1.56.1",preact:"10.27.1","preact-iso":"2.11.1","preact-render-to-string":"6.6.7",react:"npm:@preact/compat@18.3.1","react-dom":"npm:@preact/compat@18.3.1","react-easy-crop":"5.5.6","react-json-view-compare":"2.0.2",typescript:"6.0.3",vite:"8.0.13",vitest:"4.1.6",yjs:"13.6.27"},peerDependencies:{"@blinkk/root":"3.0.3","firebase-admin":">=11","firebase-functions":">=4"},peerDependenciesMeta:{"firebase-functions":{optional:!0}}};function V(){return t("svg",{width:"100",height:"23",viewBox:"0 0 100 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("g",{"clip-path":"url(#clip0_1_318)",children:[t("path",{d:"M7.82998 5.01802C3.12925 5.6479 0.833937 18.1194 2.62578 19.6731C5.64773 22.2934 16.6441 14.1722 15.6786 9.46913C15.3009 6.61371 11.2717 4.28377 7.82998 5.01802Z",fill:"black"}),t("path",{d:"M13.9782 0.720147C12.6553 0.896474 12.0093 4.38767 12.5136 4.8226C13.364 5.55611 16.4587 3.28271 16.187 1.96616C16.0807 1.16683 14.9468 0.514607 13.9782 0.720147Z",fill:"black"}),t("path",{d:"M92.7383 17.6275C90.9681 17.6275 89.3816 17.0263 88.3796 16.0744C87.9955 15.7237 87.8953 15.3396 88.246 14.9555L88.8305 14.2541C89.1645 13.87 89.5486 13.7865 89.9327 14.1205C90.6007 14.6883 91.7029 15.1726 92.5713 15.1726C93.5232 15.1726 94.1244 14.8219 94.1244 14.2875C94.1244 13.5193 93.2059 13.4358 91.9868 13.0684C90.417 12.6008 88.5132 11.7324 88.5132 9.64493C88.5132 7.70773 90.25 6.37173 92.7383 6.37173C94.2413 6.37173 95.5272 6.87273 96.4123 7.57413C96.8131 7.90813 96.9467 8.27553 96.596 8.67633L96.0282 9.37773C95.7109 9.76183 95.3435 9.82863 94.926 9.51133C94.3916 9.09383 93.6568 8.69303 92.7884 8.69303C92.0202 8.69303 91.5192 9.01033 91.5192 9.51133C91.5192 10.1292 92.3041 10.4131 93.1224 10.6636C94.9761 11.2314 97.1304 11.8326 97.1304 14.2708C97.1304 16.4585 95.1264 17.6275 92.7383 17.6275Z",fill:"black"}),t("path",{d:"M87.0008 16.6756C87.0843 17.1766 86.8171 17.4271 86.2994 17.4271H85.097C84.596 17.4271 84.3789 17.1766 84.3121 16.6756L83.7443 11.9161L81.757 16.7424C81.5399 17.2434 81.1892 17.5106 80.6882 17.5106H80.5212C80.0202 17.5106 79.6695 17.2434 79.4524 16.7424L77.4651 11.8994L76.8973 16.6756C76.8472 17.1766 76.6301 17.4271 76.1291 17.4271H74.7263C74.2086 17.4271 73.9414 17.1766 74.0082 16.6756L75.4945 7.24013C75.5613 6.75583 75.8786 6.48863 76.3796 6.48863H76.5466C77.0476 6.48863 77.3315 6.75583 77.5486 7.24013L80.6047 13.8032L83.4938 7.24013C83.7109 6.75583 84.0115 6.48863 84.4958 6.48863H84.6795C85.1638 6.48863 85.4811 6.75583 85.5646 7.24013L87.0008 16.6756Z",fill:"black"}),t("path",{d:"M68.6496 17.6275C65.3096 17.6275 62.7211 15.2227 62.7211 11.9996C62.7211 8.77653 65.3096 6.37173 68.683 6.37173C70.3029 6.37173 71.7558 6.97293 72.7745 7.99163C73.1419 8.34233 73.1419 8.77653 72.7745 9.09383L71.9228 9.81193C71.5554 10.1292 71.2047 10.1125 70.8206 9.79523C70.2361 9.31093 69.5013 9.01033 68.683 9.01033C67.013 9.01033 65.7104 10.2628 65.7104 11.9996C65.7104 13.7364 67.013 14.9889 68.683 14.9889C69.5013 14.9889 70.2528 14.6883 70.8206 14.204C71.2047 13.8867 71.5554 13.87 71.9228 14.1873L72.7745 14.9054C73.1419 15.2227 73.1419 15.6569 72.7745 16.0076C71.7558 17.0263 70.3029 17.6275 68.6496 17.6275Z",fill:"black"}),t("path",{d:"M58.575 16.2915C58.7587 16.6923 58.4581 16.8927 58.241 17.0597C57.7233 17.4271 56.9384 17.6442 56.1201 17.6442C54.4501 17.6442 52.8469 16.6923 52.8469 14.4044V11.0978H52.1121C51.6111 11.0978 51.3439 10.8139 51.3439 10.3296V9.76183C51.3439 9.26083 51.6111 8.99363 52.1121 8.99363H52.8469V7.05643C52.8469 6.57213 53.1308 6.38843 53.6151 6.28823L54.9511 6.05443C55.4521 5.95423 55.7193 6.30493 55.7193 6.80593V8.99363H57.3726C57.8569 8.99363 58.1408 9.26083 58.1408 9.76183V10.3296C58.1408 10.8139 57.8569 11.0978 57.3726 11.0978H55.7193V14.1038C55.7193 14.9221 56.1368 15.1893 56.6545 15.1893C56.905 15.1893 57.1555 15.0724 57.3392 14.9555C57.7567 14.6883 57.9571 14.8887 58.1074 15.206L58.575 16.2915Z",fill:"black"}),t("path",{d:"M46.2592 17.6442C43.5538 17.6442 41.5999 15.7738 41.5999 13.2521C41.5999 10.7304 43.5538 8.86003 46.2592 8.86003C48.9646 8.86003 50.9185 10.7304 50.9185 13.2521C50.9185 15.7738 48.9646 17.6442 46.2592 17.6442ZM46.2592 15.1726C47.3113 15.1726 48.0628 14.3543 48.0628 13.2521C48.0628 12.1499 47.3113 11.3316 46.2592 11.3316C45.2071 11.3316 44.4389 12.1499 44.4389 13.2521C44.4389 14.3543 45.2071 15.1726 46.2592 15.1726Z",fill:"black"}),t("path",{d:"M36.052 17.6442C33.3466 17.6442 31.3927 15.7738 31.3927 13.2521C31.3927 10.7304 33.3466 8.86003 36.052 8.86003C38.7574 8.86003 40.7113 10.7304 40.7113 13.2521C40.7113 15.7738 38.7574 17.6442 36.052 17.6442ZM36.052 15.1726C37.1041 15.1726 37.8556 14.3543 37.8556 13.2521C37.8556 12.1499 37.1041 11.3316 36.052 11.3316C34.9999 11.3316 34.2317 12.1499 34.2317 13.2521C34.2317 14.3543 34.9999 15.1726 36.052 15.1726Z",fill:"black"}),t("path",{d:"M28.7099 13.0851L30.6805 16.6422C30.9644 17.1599 30.6638 17.4271 30.1628 17.4271H28.4594C27.9417 17.4271 27.8081 17.1766 27.5242 16.6589L25.7707 13.4859H24.6351V16.6422C24.6351 17.1432 24.3512 17.4271 23.8502 17.4271H22.4808C21.9798 17.4271 21.6959 17.1432 21.6959 16.6422V7.35703C21.6959 6.85603 21.9798 6.57213 22.4808 6.57213H26.5222C29.3111 6.57213 30.8141 7.92483 30.8141 10.1125C30.8141 11.5654 29.9791 12.5841 28.7099 13.0851ZM24.6351 8.96023V11.5153H26.4721C27.2236 11.5153 27.8248 11.0644 27.8248 10.2628C27.8248 9.44453 27.2236 8.96023 26.4721 8.96023H24.6351Z",fill:"black"})]}),t("defs",{children:t("clipPath",{id:"clip0_1_318",children:t("rect",{width:"99",height:"22",fill:"white",transform:"translate(0.0175781 0.177246)"})})})]})}x();function D(e){let[o,a]=C(!1);g(()=>{let c=navigator.userAgentData?.platform??navigator.platform;a(/mac/i.test(c||""))},[]);let s=()=>{W()};return t("button",{type:"button",className:d("SearchBar",e.className),onClick:s,"aria-label":"Open search",children:[t(P,{className:"SearchBar__icon",size:16,stroke:1.5}),t("span",{className:"SearchBar__placeholder",children:"Search"}),t("span",{className:"SearchBar__shortcut","aria-hidden":"true",children:o?"\u2318 + K":"Ctrl + K"})]})}var r="1.5";function i(e){return t("div",{className:"Layout",children:[t(i.Top,{}),t(i.Side,{}),t(i.Main,{...e,children:e.children}),t(i.Bottom,{})]})}function G(e){let a=e.split("?")[0].replace(/\/+$/g,"").split("/").filter(Boolean);return a.length===4&&a[0]==="cms"&&a[1]==="content"}i.Top=()=>{let e=window.__ROOT_CTX.rootConfig,o=e.projectName||e.projectId,a=e.minimalBranding,{url:s}=h(),c=!G(s);return t("div",{className:"Layout__top",children:[a?t(m,{children:[t("a",{className:"Layout__top__logo",href:"/cms",children:o}),t("a",{className:"Layout__top__version",href:"https://github.com/blinkk/rootjs/blob/main/packages/root-cms/CHANGELOG.md",target:"_blank",rel:"noreferrer noopener",children:["v",f.version]})]}):t(m,{children:[t("a",{className:"Layout__top__logo",href:"/cms",children:t(V,{})}),t("a",{className:"Layout__top__version",href:"https://github.com/blinkk/rootjs/blob/main/packages/root-cms/CHANGELOG.md",target:"_blank",rel:"noreferrer noopener",children:["v",f.version]}),t("div",{className:"Layout__top__project",children:o})]}),c&&t("div",{className:"Layout__top__search",children:t(D,{})})]})};i.Side=()=>{let{url:e}=h(),o=e.replace(/\/*$/g,""),a=window.firebase.user,s=window.__ROOT_CTX.sidebar?.tools,c=new Set(window.__ROOT_CTX.sidebar?.hiddenBuiltInTools||[]),n=u=>c.has(u),y=window.__ROOT_CTX.experiments||{},$=async()=>{await window.firebase.auth.signOut(),window.location.href="/cms/login"};return t("div",{className:"Layout__side",children:[t("div",{className:"Layout__side__buttons",children:[!n("home")&&t(i.SideButton,{label:"Home",url:"/cms",active:o==="/cms",children:t(I,{stroke:r})}),!n("content")&&t(i.SideButton,{label:"Content",url:"/cms/content",active:o.startsWith("/cms/content"),children:t(T,{stroke:r})}),y.taskManager&&t(i.SideButton,{label:"Tasks",url:"/cms/tasks",active:o.startsWith("/cms/tasks"),children:t(N,{stroke:r})}),!n("releases")&&t(i.SideButton,{label:"Releases",url:"/cms/releases",active:o.startsWith("/cms/releases"),children:t(Z,{stroke:r})}),!n("data")&&t(i.SideButton,{label:"Data",url:"/cms/data",active:o.startsWith("/cms/data"),children:t(M,{stroke:r})}),!n("assets")&&t(i.SideButton,{label:"Assets",url:"/cms/assets",active:o.startsWith("/cms/assets"),children:t(R,{stroke:r})}),!n("translations")&&t(i.SideButton,{label:"Translations",url:"/cms/translations",active:o.startsWith("/cms/translations"),children:t(H,{stroke:r})}),(y.ai||window.__ROOT_CTX.ai)&&!n("ai")&&t(i.SideButton,{label:"Root AI",url:"/cms/ai",active:o.startsWith("/cms/ai"),children:t(z,{stroke:r})}),s&&t(m,{children:[t("div",{className:"Layout__side__divider"}),Object.entries(s).map(([u,l])=>{let A=l.cmsUrl?.startsWith("/cms/")?l.cmsUrl:void 0,p=l.externalUrl,v=p??A??`/cms/tools/${u}`,_=p?void 0:v.replace(/\/*$/g,""),E=!p&&!!_&&(o===_||o.startsWith(`${_}/`));return t(i.SideButton,{className:"Layout__side__tool",label:l.label||"",url:v,active:E,external:!!p,children:l.icon?t("img",{className:"Layout__side__tool__icon",src:l.icon,alt:l.label||""}):t(j,{stroke:r})},u)}),t("div",{className:"Layout__side__divider"})]}),!n("settings")&&t(i.SideButton,{label:"Settings",url:"/cms/settings",active:o.startsWith("/cms/settings"),children:t(U,{stroke:r})})]}),t("div",{className:"Layout__side__user",children:t(b,{shadow:"md",position:"right",control:t(k,{children:t(S,{src:a.photoURL,alt:a.email,size:30,radius:"xl"})}),children:[t(b.Label,{children:t(L,{size:"xs",color:"dimmed",truncate:!0,children:["Signed in as ",a.email]})}),t(w,{}),t(b.Item,{color:"red",icon:t(O,{style:{width:14,height:14}}),onClick:$,children:"Sign out"})]})})]})};i.SideButton=e=>t(B,{className:d("Layout__side__button",e.className),label:e.label,position:"right",withArrow:!0,children:t("a",{className:d(e.active&&"active"),href:e.url,target:e.external?"_blank":void 0,rel:e.external?"noreferrer noopener":void 0,children:e.children})});i.Main=e=>t("div",{className:"Layout__main",children:e.children});i.Bottom=()=>t("div",{className:"Layout__bottom"});export{F as a,i as b};
@@ -0,0 +1 @@
1
+ import{e as z,j as I}from"./chunk-NXQVLOTK.js";import{c as N,e as L}from"./chunk-3IYZCUPI.js";import{a as C}from"./chunk-X2WHBGTP.js";import{a as w,c as y}from"./chunk-HRGYNHZ3.js";import{b as v}from"./chunk-5MV6XVGA.js";import{Aa as f,Ac as B,Ha as e,V as P,a as g,ea as p,g as M,j as x,va as S}from"./chunk-NZHF733K.js";x();x();function O(o,t){return M(()=>{if(!t.trim())return o;let l=t.toLowerCase();return o.filter(c=>{let[a,u]=c.id.split("/"),r=c.fields||{},n=window.__ROOT_CTX.collections[a],s=v(r,n.preview?.title||"meta.title")||"";return c.id.toLowerCase().includes(l)||s.toLowerCase().includes(l)||u.toLowerCase().includes(l)})},[o,t])}var h="DocPickerModal";function ee(){let o=w(),t=y();return{open:l=>{o.openContextModal(h,{...t,innerProps:l,size:"700px",overflow:"inside"})},close:()=>{o.closeModal(h)}}}function k(o){let{innerProps:t}=o,l=Object.keys(window.__ROOT_CTX.collections);t.collections?.length&&(l=l.filter(i=>t.collections?.includes(i)));let c=[{value:"",label:"Select"}];l.forEach(i=>{c.push({value:i,label:i})});let[a,u]=C("DocPickerModal.lastSelectedCollection",""),r=()=>t.initialCollection?t.initialCollection:a&&l.includes(a)?a:l.length===1?l[0]:"",[n,D]=g(r()),s=i=>{D(i),u(i)};function m(i){t.multiSelect&&t.onChangeMulti?t.onChangeMulti(i.id,!0):t.onChange&&t.onChange(i.id)}function b(i){t.multiSelect&&t.onChangeMulti&&t.onChangeMulti(i.id,!1)}return e("div",{className:"DocPickerModal",children:[l.length===0&&e("div",{className:"DocPickerModal__noCollections",children:"No collections matching schema field definition."}),l.length>0&&e(k.DocsList,{collection:n,onDocSelected:m,onDocUnselected:b,onCollectionChange:s,multiSelect:t.multiSelect,selectedDocIds:t.selectedDocIds,options:{enableSearch:t.enableSearch??!0,enableSort:t.enableSort??!0,enableCreate:t.enableCreate??!0,enableStatusBadges:t.enableStatusBadges??!0,showCollectionSelect:l.length>1,collectionSelectValue:n,collectionSelectOptions:c}})]})}k.DocsList=o=>{let[t,l]=g(""),[c,a]=C(`root::DocPickerModal:${o.collection}:sortBy`,"modifiedAt"),[u,r]=g(!1),[n,D,s]=z(o.collection||"",{orderBy:c}),m=O(s,t),b=[{value:"modifiedAt",label:"Last Modified"},{value:"slug",label:"A-Z"},{value:"slugDesc",label:"Z-A"},{value:"newest",label:"Newest"},{value:"oldest",label:"Oldest"}],i=o.selectedDocIds||[],d=o.options||{};return e("div",{className:"DocPickerModal__DocsList",children:[e("div",{className:"DocPickerModal__DocsList__stickyHeader",children:[d.showCollectionSelect&&e("div",{className:"DocPickerModal__collection__select",children:[e("div",{className:"DocPickerModal__collection__select__label",children:"Content Type:"}),e(f,{data:d.collectionSelectOptions||[],value:d.collectionSelectValue,placeholder:"Select",onChange:_=>{o.onCollectionChange?.(_||"")},size:"xs",radius:0,searchable:!0,autoFocus:!0,dropdownComponent:"div"}),d.collectionSelectValue&&e(p,{variant:"outline",color:"dark",size:"xs",onClick:()=>r(!0),children:"New"})]}),d.enableSearch&&d.collectionSelectValue&&e("div",{className:"DocPickerModal__DocsList__controls",children:[e(S,{placeholder:"Search documents...",value:t,onChange:_=>l(_.target.value),icon:e(B,{size:16}),size:"xs",className:"DocPickerModal__DocsList__controls__search"}),d.enableSort&&e(f,{data:b,value:c,onChange:_=>a(_||"modifiedAt"),size:"xs",className:"DocPickerModal__DocsList__controls__sort"})]}),!n&&s.length>0&&e("div",{className:"DocPickerModal__DocsList__count",children:["Showing ",m.length," of ",s.length," documents"]})]}),e("div",{className:"DocPickerModal__DocsList__docsContainer",children:o.collection?n?e("div",{className:"DocPickerModal__DocsList__loading",children:e(P,{color:"gray",size:"xl"})}):m.length===0?e("div",{className:"DocPickerModal__DocsList__empty",children:s.length===0?"Collection is empty.":"No documents match your search."}):e("div",{className:"DocPickerModal__DocsList__docs",children:m.map(_=>e(k.DocCard,{doc:_,onDocSelected:o.onDocSelected,onDocUnselected:o.onDocUnselected,multiSelect:o.multiSelect,selected:i.includes(_.id),enableStatusBadges:d.enableStatusBadges},_.id))}):e("div",{className:"DocPickerModal__DocsList__empty",children:"Select a content type to view documents"})}),d.collectionSelectValue&&e(I,{collection:d.collectionSelectValue,opened:u,skipNavigation:!0,onClose:()=>{r(!1),D()}})]})};k.DocCard=o=>{let[t,l]=g(!!o.selected),c=o.doc,[a,u]=c.id.split("/"),r=c.fields||{},n=window.__ROOT_CTX.collections[a],D=`/cms/content/${a}/${u}`,s=v(r,n.preview?.title||"meta.title"),m=v(r,n.preview?.image||"meta.image")||n.preview?.defaultImage;return e("div",{className:"DocPickerModal__DocCard",children:[e("div",{className:"DocPickerModal__DocCard__image",onClick:()=>window.open(D,"_blank"),children:e(L,{file:m,width:120,height:90,withPlaceholder:!m?.src})}),e("div",{className:"DocPickerModal__DocCard__content",children:[e("div",{className:"DocPickerModal__DocCard__content__header",children:e("div",{className:"DocPickerModal__DocCard__content__header__docId",onClick:()=>window.open(D,"_blank"),children:c.id})}),e("div",{className:"DocPickerModal__DocCard__content__title",children:e("div",{className:"DocPickerModal__DocCard__content__link",onClick:()=>window.open(D,"_blank"),children:s||"[UNTITLED]"})}),o.enableStatusBadges&&e("div",{className:"DocPickerModal__DocCard__content__badges",children:e(N,{doc:c})})]}),e("div",{className:"DocPickerModal__DocCard__controls",children:e("div",{className:"DocPickerModal__DocCard__controls__buttons",children:o.multiSelect?t?e(p,{variant:"light",color:"blue",size:"xs",onClick:()=>{l(!1),o.onDocUnselected(o.doc)},children:"Unselect"}):e(p,{variant:"filled",color:"blue",size:"xs",onClick:()=>{l(!0),o.onDocSelected(o.doc)},children:"Select"}):e(p,{color:"blue",size:"xs",onClick:()=>o.onDocSelected(o.doc),children:"Select"})})})]})};k.id=h;export{ee as a,k as b};
@@ -0,0 +1 @@
1
+ import{f as n}from"./chunk-AL3TN2KI.js";import{Ha as t}from"./chunk-NZHF733K.js";function f(a){let{className:r,as:h,size:e,weight:o,color:i,children:g,...s}=a;return t(h||"h2",{...s,className:n(r,"heading",e&&`size:${e}`,o&&`weight:${o}`,i&&`color:${i}`),children:g})}export{f as a};