@next-bricks/form 1.9.23 → 1.10.1

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 (273) hide show
  1. package/dist/bricks.json +1 -1
  2. package/dist/chunks/1045.11757a1e.js +2 -0
  3. package/dist/chunks/1045.11757a1e.js.map +1 -0
  4. package/dist/chunks/1122.c3add55e.js +2 -0
  5. package/dist/chunks/1122.c3add55e.js.map +1 -0
  6. package/dist/chunks/114.f82768cb.js +2 -0
  7. package/dist/chunks/114.f82768cb.js.map +1 -0
  8. package/dist/chunks/1269.2181c664.js +2 -0
  9. package/dist/chunks/1269.2181c664.js.map +1 -0
  10. package/dist/chunks/1370.a56b4fa3.js +2 -0
  11. package/dist/chunks/1370.a56b4fa3.js.map +1 -0
  12. package/dist/chunks/1889.163dd4db.js +2 -0
  13. package/dist/chunks/{1889.8542166a.js.map → 1889.163dd4db.js.map} +1 -1
  14. package/dist/chunks/1940.afe23ba4.js +2 -0
  15. package/dist/chunks/1940.afe23ba4.js.map +1 -0
  16. package/dist/chunks/2052.9f08e1db.js +2 -0
  17. package/dist/chunks/{2052.87b96771.js.map → 2052.9f08e1db.js.map} +1 -1
  18. package/dist/chunks/2277.87d8964f.js +2 -0
  19. package/dist/chunks/2277.87d8964f.js.map +1 -0
  20. package/dist/chunks/3067.8f7b35a9.js +3 -0
  21. package/dist/chunks/{3067.d1bc6dc6.js.map → 3067.8f7b35a9.js.map} +1 -1
  22. package/dist/chunks/3144.07ed2d7c.js +3 -0
  23. package/dist/chunks/{3144.7c98852d.js.map → 3144.07ed2d7c.js.map} +1 -1
  24. package/dist/chunks/3171.a74271b5.js +2 -0
  25. package/dist/chunks/3171.a74271b5.js.map +1 -0
  26. package/dist/chunks/3426.2f9a5a28.js +2 -0
  27. package/dist/chunks/3426.2f9a5a28.js.map +1 -0
  28. package/dist/chunks/3933.a3a26d88.js +2 -0
  29. package/dist/chunks/3933.a3a26d88.js.map +1 -0
  30. package/dist/chunks/4041.48f9b954.js +3 -0
  31. package/dist/chunks/{4041.c06ce61a.js.map → 4041.48f9b954.js.map} +1 -1
  32. package/dist/chunks/4320.ca3377b0.js +3 -0
  33. package/dist/chunks/{4320.7c30ef68.js.map → 4320.ca3377b0.js.map} +1 -1
  34. package/dist/chunks/4658.24239892.js +2 -0
  35. package/dist/chunks/4658.24239892.js.map +1 -0
  36. package/dist/chunks/4741.ed462c44.js +2 -0
  37. package/dist/chunks/{4741.898325bc.js.map → 4741.ed462c44.js.map} +1 -1
  38. package/dist/chunks/4984.1d2ce9d6.js +3 -0
  39. package/dist/chunks/4984.1d2ce9d6.js.LICENSE.txt +1 -0
  40. package/dist/chunks/4984.1d2ce9d6.js.map +1 -0
  41. package/dist/chunks/5053.a529bc9f.js +2 -0
  42. package/dist/chunks/{5053.7dcaeb26.js.map → 5053.a529bc9f.js.map} +1 -1
  43. package/dist/chunks/5250.e92d10c7.js +3 -0
  44. package/dist/chunks/{5250.b2761d34.js.map → 5250.e92d10c7.js.map} +1 -1
  45. package/dist/chunks/5384.8bd748af.js +2 -0
  46. package/dist/chunks/{5384.ebcfe61b.js.map → 5384.8bd748af.js.map} +1 -1
  47. package/dist/chunks/5399.08917443.js +2 -0
  48. package/dist/chunks/5399.08917443.js.map +1 -0
  49. package/dist/chunks/5552.174fbfb2.js +2 -0
  50. package/dist/chunks/5552.174fbfb2.js.map +1 -0
  51. package/dist/chunks/6314.043f309b.js +2 -0
  52. package/dist/chunks/6314.043f309b.js.map +1 -0
  53. package/dist/chunks/6519.512a2834.js +2 -0
  54. package/dist/chunks/6519.512a2834.js.map +1 -0
  55. package/dist/chunks/6773.3b724376.js +2 -0
  56. package/dist/chunks/{6773.4999c644.js.map → 6773.3b724376.js.map} +1 -1
  57. package/dist/chunks/7115.d1893791.js +2 -0
  58. package/dist/chunks/7115.d1893791.js.map +1 -0
  59. package/dist/chunks/726.7bf7cb72.js +2 -0
  60. package/dist/chunks/{726.3f2c2edb.js.map → 726.7bf7cb72.js.map} +1 -1
  61. package/dist/chunks/7304.faf14330.js +2 -0
  62. package/dist/chunks/{7304.2781a21c.js.map → 7304.faf14330.js.map} +1 -1
  63. package/dist/chunks/7434.4471086e.js +2 -0
  64. package/dist/chunks/{7434.0fe3413f.js.map → 7434.4471086e.js.map} +1 -1
  65. package/dist/chunks/7507.c1df682a.js +2 -0
  66. package/dist/chunks/7507.c1df682a.js.map +1 -0
  67. package/dist/chunks/7721.c376ed54.js +3 -0
  68. package/dist/chunks/{7721.09baecc4.js.map → 7721.c376ed54.js.map} +1 -1
  69. package/dist/chunks/7733.d6cde451.js +2 -0
  70. package/dist/chunks/7733.d6cde451.js.map +1 -0
  71. package/dist/chunks/790.8328d4e1.js +2 -0
  72. package/dist/chunks/790.8328d4e1.js.map +1 -0
  73. package/dist/chunks/8097.37e7738b.js +2 -0
  74. package/dist/chunks/8097.37e7738b.js.map +1 -0
  75. package/dist/chunks/825.56517ad0.js +3 -0
  76. package/dist/chunks/825.56517ad0.js.map +1 -0
  77. package/dist/chunks/852.ae478d19.js +3 -0
  78. package/dist/chunks/{852.8dcf2758.js.map → 852.ae478d19.js.map} +1 -1
  79. package/dist/chunks/871.93119d0b.js +2 -0
  80. package/dist/chunks/871.93119d0b.js.map +1 -0
  81. package/dist/chunks/8989.93f530e6.js +2 -0
  82. package/dist/chunks/8989.93f530e6.js.map +1 -0
  83. package/dist/chunks/9259.003e8a2b.js +3 -0
  84. package/dist/chunks/9259.003e8a2b.js.map +1 -0
  85. package/dist/chunks/9496.8bc4dcfe.js +2 -0
  86. package/dist/chunks/9496.8bc4dcfe.js.map +1 -0
  87. package/dist/chunks/9515.bfd568c5.js +2 -0
  88. package/dist/chunks/{9515.43552523.js.map → 9515.bfd568c5.js.map} +1 -1
  89. package/dist/chunks/9559.02e2b1ae.js +2 -0
  90. package/dist/chunks/9559.02e2b1ae.js.map +1 -0
  91. package/dist/chunks/9844.0e7eb437.js +2 -0
  92. package/dist/chunks/{9844.fad75b35.js.map → 9844.0e7eb437.js.map} +1 -1
  93. package/dist/chunks/eo-auto-complete.43fa4b71.js +3 -0
  94. package/dist/chunks/eo-auto-complete.43fa4b71.js.map +1 -0
  95. package/dist/chunks/eo-checkbox.ca7208f0.js +2 -0
  96. package/dist/chunks/eo-checkbox.ca7208f0.js.map +1 -0
  97. package/dist/chunks/eo-color-picker.d8c8b161.js +2 -0
  98. package/dist/chunks/eo-color-picker.d8c8b161.js.map +1 -0
  99. package/dist/chunks/eo-date-picker.135ba4c6.js +2 -0
  100. package/dist/chunks/eo-date-picker.135ba4c6.js.map +1 -0
  101. package/dist/chunks/eo-dynamic-form-item.278431d2.js +3 -0
  102. package/dist/chunks/eo-dynamic-form-item.278431d2.js.map +1 -0
  103. package/dist/chunks/eo-form-item.d5a2783e.js +3 -0
  104. package/dist/chunks/eo-form-item.d5a2783e.js.map +1 -0
  105. package/dist/chunks/eo-form.d0a02a43.js +2 -0
  106. package/dist/chunks/eo-form.d0a02a43.js.map +1 -0
  107. package/dist/chunks/eo-icon-select.f475a488.js +3 -0
  108. package/dist/chunks/eo-icon-select.f475a488.js.map +1 -0
  109. package/dist/chunks/eo-input.3f1ec7bb.js +3 -0
  110. package/dist/chunks/eo-input.3f1ec7bb.js.map +1 -0
  111. package/dist/chunks/eo-radio.b816be4f.js +3 -0
  112. package/dist/chunks/eo-radio.b816be4f.js.map +1 -0
  113. package/dist/chunks/eo-search.a3200125.js +2 -0
  114. package/dist/chunks/eo-search.a3200125.js.map +1 -0
  115. package/dist/chunks/eo-select.dc51ec70.js +3 -0
  116. package/dist/chunks/eo-select.dc51ec70.js.map +1 -0
  117. package/dist/chunks/eo-submit-buttons.a9206787.js +2 -0
  118. package/dist/chunks/eo-submit-buttons.a9206787.js.map +1 -0
  119. package/dist/chunks/eo-switch.66879241.js +3 -0
  120. package/dist/chunks/eo-switch.66879241.js.map +1 -0
  121. package/dist/chunks/eo-textarea.233f7876.js +3 -0
  122. package/dist/chunks/eo-textarea.233f7876.js.map +1 -0
  123. package/dist/chunks/eo-time-picker.b101e6e0.js +2 -0
  124. package/dist/chunks/eo-time-picker.b101e6e0.js.map +1 -0
  125. package/dist/chunks/eo-time-range-picker.fa7564b4.js +2 -0
  126. package/dist/chunks/eo-time-range-picker.fa7564b4.js.map +1 -0
  127. package/dist/chunks/eo-upload-file.6eff2237.js +3 -0
  128. package/dist/chunks/eo-upload-file.6eff2237.js.map +1 -0
  129. package/dist/chunks/eo-upload-image.e8316f6b.js +3 -0
  130. package/dist/chunks/eo-upload-image.e8316f6b.js.map +1 -0
  131. package/dist/chunks/main.18644b0a.js +2 -0
  132. package/dist/chunks/main.18644b0a.js.map +1 -0
  133. package/dist/index.fd7ff312.js +2 -0
  134. package/dist/index.fd7ff312.js.map +1 -0
  135. package/package.json +4 -4
  136. package/dist/chunks/1045.246ae518.js +0 -2
  137. package/dist/chunks/1045.246ae518.js.map +0 -1
  138. package/dist/chunks/1122.760e39bf.js +0 -2
  139. package/dist/chunks/1122.760e39bf.js.map +0 -1
  140. package/dist/chunks/114.1cda5bc2.js +0 -2
  141. package/dist/chunks/114.1cda5bc2.js.map +0 -1
  142. package/dist/chunks/1269.df851610.js +0 -2
  143. package/dist/chunks/1269.df851610.js.map +0 -1
  144. package/dist/chunks/1330.fee707aa.js +0 -2
  145. package/dist/chunks/1330.fee707aa.js.map +0 -1
  146. package/dist/chunks/1370.a4868fd8.js +0 -2
  147. package/dist/chunks/1370.a4868fd8.js.map +0 -1
  148. package/dist/chunks/1889.8542166a.js +0 -2
  149. package/dist/chunks/1940.fe00f23f.js +0 -2
  150. package/dist/chunks/1940.fe00f23f.js.map +0 -1
  151. package/dist/chunks/2052.87b96771.js +0 -2
  152. package/dist/chunks/2277.b982f0ba.js +0 -2
  153. package/dist/chunks/2277.b982f0ba.js.map +0 -1
  154. package/dist/chunks/3067.d1bc6dc6.js +0 -3
  155. package/dist/chunks/3144.7c98852d.js +0 -3
  156. package/dist/chunks/3171.afb5d285.js +0 -2
  157. package/dist/chunks/3171.afb5d285.js.map +0 -1
  158. package/dist/chunks/3426.9055d899.js +0 -2
  159. package/dist/chunks/3426.9055d899.js.map +0 -1
  160. package/dist/chunks/3933.1b01da95.js +0 -2
  161. package/dist/chunks/3933.1b01da95.js.map +0 -1
  162. package/dist/chunks/4041.c06ce61a.js +0 -3
  163. package/dist/chunks/4103.18ccacda.js +0 -2
  164. package/dist/chunks/4103.18ccacda.js.map +0 -1
  165. package/dist/chunks/4320.7c30ef68.js +0 -3
  166. package/dist/chunks/4658.c9e8c145.js +0 -2
  167. package/dist/chunks/4658.c9e8c145.js.map +0 -1
  168. package/dist/chunks/4741.898325bc.js +0 -2
  169. package/dist/chunks/5053.7dcaeb26.js +0 -2
  170. package/dist/chunks/5250.b2761d34.js +0 -3
  171. package/dist/chunks/5384.ebcfe61b.js +0 -2
  172. package/dist/chunks/5399.7cc0c108.js +0 -2
  173. package/dist/chunks/5399.7cc0c108.js.map +0 -1
  174. package/dist/chunks/5552.79ecc9fd.js +0 -2
  175. package/dist/chunks/5552.79ecc9fd.js.map +0 -1
  176. package/dist/chunks/6314.125d31fd.js +0 -2
  177. package/dist/chunks/6314.125d31fd.js.map +0 -1
  178. package/dist/chunks/6519.cae7b3b1.js +0 -2
  179. package/dist/chunks/6519.cae7b3b1.js.map +0 -1
  180. package/dist/chunks/6773.4999c644.js +0 -2
  181. package/dist/chunks/7115.87a523dc.js +0 -2
  182. package/dist/chunks/7115.87a523dc.js.map +0 -1
  183. package/dist/chunks/726.3f2c2edb.js +0 -2
  184. package/dist/chunks/7304.2781a21c.js +0 -2
  185. package/dist/chunks/7434.0fe3413f.js +0 -2
  186. package/dist/chunks/7721.09baecc4.js +0 -3
  187. package/dist/chunks/7733.1e448413.js +0 -2
  188. package/dist/chunks/7733.1e448413.js.map +0 -1
  189. package/dist/chunks/7780.d4884e1f.js +0 -2
  190. package/dist/chunks/7780.d4884e1f.js.map +0 -1
  191. package/dist/chunks/790.00a93f99.js +0 -2
  192. package/dist/chunks/790.00a93f99.js.map +0 -1
  193. package/dist/chunks/8097.d9f6fb91.js +0 -2
  194. package/dist/chunks/8097.d9f6fb91.js.map +0 -1
  195. package/dist/chunks/825.3aec9f13.js +0 -3
  196. package/dist/chunks/825.3aec9f13.js.map +0 -1
  197. package/dist/chunks/852.8dcf2758.js +0 -3
  198. package/dist/chunks/871.536883a1.js +0 -2
  199. package/dist/chunks/871.536883a1.js.map +0 -1
  200. package/dist/chunks/8989.b92b1ae1.js +0 -2
  201. package/dist/chunks/8989.b92b1ae1.js.map +0 -1
  202. package/dist/chunks/9248.b1b19ae2.js +0 -2
  203. package/dist/chunks/9248.b1b19ae2.js.map +0 -1
  204. package/dist/chunks/9259.ada83f1c.js +0 -3
  205. package/dist/chunks/9259.ada83f1c.js.map +0 -1
  206. package/dist/chunks/9496.f9e2cd21.js +0 -2
  207. package/dist/chunks/9496.f9e2cd21.js.map +0 -1
  208. package/dist/chunks/9515.43552523.js +0 -2
  209. package/dist/chunks/9559.8b30d9d3.js +0 -2
  210. package/dist/chunks/9559.8b30d9d3.js.map +0 -1
  211. package/dist/chunks/9844.fad75b35.js +0 -2
  212. package/dist/chunks/eo-auto-complete.99ab8d1f.js +0 -3
  213. package/dist/chunks/eo-auto-complete.99ab8d1f.js.map +0 -1
  214. package/dist/chunks/eo-checkbox.722e5d0a.js +0 -2
  215. package/dist/chunks/eo-checkbox.722e5d0a.js.map +0 -1
  216. package/dist/chunks/eo-color-picker.0e454628.js +0 -2
  217. package/dist/chunks/eo-color-picker.0e454628.js.map +0 -1
  218. package/dist/chunks/eo-date-picker.7c52b046.js +0 -2
  219. package/dist/chunks/eo-date-picker.7c52b046.js.map +0 -1
  220. package/dist/chunks/eo-dynamic-form-item.498dccc5.js +0 -3
  221. package/dist/chunks/eo-dynamic-form-item.498dccc5.js.map +0 -1
  222. package/dist/chunks/eo-form-item.9f47b7f9.js +0 -3
  223. package/dist/chunks/eo-form-item.9f47b7f9.js.map +0 -1
  224. package/dist/chunks/eo-form.91fe39eb.js +0 -2
  225. package/dist/chunks/eo-form.91fe39eb.js.map +0 -1
  226. package/dist/chunks/eo-icon-select.5cc56361.js +0 -3
  227. package/dist/chunks/eo-icon-select.5cc56361.js.map +0 -1
  228. package/dist/chunks/eo-input.8e2c54c5.js +0 -3
  229. package/dist/chunks/eo-input.8e2c54c5.js.map +0 -1
  230. package/dist/chunks/eo-radio.06832d01.js +0 -3
  231. package/dist/chunks/eo-radio.06832d01.js.map +0 -1
  232. package/dist/chunks/eo-search.a4788513.js +0 -2
  233. package/dist/chunks/eo-search.a4788513.js.map +0 -1
  234. package/dist/chunks/eo-select.1f2391cb.js +0 -3
  235. package/dist/chunks/eo-select.1f2391cb.js.map +0 -1
  236. package/dist/chunks/eo-submit-buttons.930edce3.js +0 -2
  237. package/dist/chunks/eo-submit-buttons.930edce3.js.map +0 -1
  238. package/dist/chunks/eo-switch.f34c71c5.js +0 -3
  239. package/dist/chunks/eo-switch.f34c71c5.js.map +0 -1
  240. package/dist/chunks/eo-textarea.63e2fd55.js +0 -3
  241. package/dist/chunks/eo-textarea.63e2fd55.js.map +0 -1
  242. package/dist/chunks/eo-time-picker.ddc044b0.js +0 -2
  243. package/dist/chunks/eo-time-picker.ddc044b0.js.map +0 -1
  244. package/dist/chunks/eo-time-range-picker.ba10640c.js +0 -2
  245. package/dist/chunks/eo-time-range-picker.ba10640c.js.map +0 -1
  246. package/dist/chunks/eo-upload-file.ba9215b9.js +0 -3
  247. package/dist/chunks/eo-upload-file.ba9215b9.js.map +0 -1
  248. package/dist/chunks/eo-upload-image.1bf3487f.js +0 -3
  249. package/dist/chunks/eo-upload-image.1bf3487f.js.map +0 -1
  250. package/dist/chunks/main.da595074.js +0 -2
  251. package/dist/chunks/main.da595074.js.map +0 -1
  252. package/dist/index.8b126fa9.js +0 -2
  253. package/dist/index.8b126fa9.js.map +0 -1
  254. /package/dist/chunks/{3067.d1bc6dc6.js.LICENSE.txt → 3067.8f7b35a9.js.LICENSE.txt} +0 -0
  255. /package/dist/chunks/{3144.7c98852d.js.LICENSE.txt → 3144.07ed2d7c.js.LICENSE.txt} +0 -0
  256. /package/dist/chunks/{4041.c06ce61a.js.LICENSE.txt → 4041.48f9b954.js.LICENSE.txt} +0 -0
  257. /package/dist/chunks/{4320.7c30ef68.js.LICENSE.txt → 4320.ca3377b0.js.LICENSE.txt} +0 -0
  258. /package/dist/chunks/{5250.b2761d34.js.LICENSE.txt → 5250.e92d10c7.js.LICENSE.txt} +0 -0
  259. /package/dist/chunks/{7721.09baecc4.js.LICENSE.txt → 7721.c376ed54.js.LICENSE.txt} +0 -0
  260. /package/dist/chunks/{825.3aec9f13.js.LICENSE.txt → 825.56517ad0.js.LICENSE.txt} +0 -0
  261. /package/dist/chunks/{852.8dcf2758.js.LICENSE.txt → 852.ae478d19.js.LICENSE.txt} +0 -0
  262. /package/dist/chunks/{9259.ada83f1c.js.LICENSE.txt → 9259.003e8a2b.js.LICENSE.txt} +0 -0
  263. /package/dist/chunks/{eo-auto-complete.99ab8d1f.js.LICENSE.txt → eo-auto-complete.43fa4b71.js.LICENSE.txt} +0 -0
  264. /package/dist/chunks/{eo-dynamic-form-item.498dccc5.js.LICENSE.txt → eo-dynamic-form-item.278431d2.js.LICENSE.txt} +0 -0
  265. /package/dist/chunks/{eo-form-item.9f47b7f9.js.LICENSE.txt → eo-form-item.d5a2783e.js.LICENSE.txt} +0 -0
  266. /package/dist/chunks/{eo-icon-select.5cc56361.js.LICENSE.txt → eo-icon-select.f475a488.js.LICENSE.txt} +0 -0
  267. /package/dist/chunks/{eo-input.8e2c54c5.js.LICENSE.txt → eo-input.3f1ec7bb.js.LICENSE.txt} +0 -0
  268. /package/dist/chunks/{eo-radio.06832d01.js.LICENSE.txt → eo-radio.b816be4f.js.LICENSE.txt} +0 -0
  269. /package/dist/chunks/{eo-select.1f2391cb.js.LICENSE.txt → eo-select.dc51ec70.js.LICENSE.txt} +0 -0
  270. /package/dist/chunks/{eo-switch.f34c71c5.js.LICENSE.txt → eo-switch.66879241.js.LICENSE.txt} +0 -0
  271. /package/dist/chunks/{eo-textarea.63e2fd55.js.LICENSE.txt → eo-textarea.233f7876.js.LICENSE.txt} +0 -0
  272. /package/dist/chunks/{eo-upload-file.ba9215b9.js.LICENSE.txt → eo-upload-file.6eff2237.js.LICENSE.txt} +0 -0
  273. /package/dist/chunks/{eo-upload-image.1bf3487f.js.LICENSE.txt → eo-upload-image.e8316f6b.js.LICENSE.txt} +0 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 4984.1d2ce9d6.js.LICENSE.txt */
2
+ "use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[4984],{4984:(e,t,n)=>{n.r(t),n.d(t,{Dialog:()=>Yt,Notification:()=>rn,StoryboardFunctionRegistryFactory:()=>fe,__secret_internals:()=>r,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>cs,batchSetAppsLocalTheme:()=>ne,checkIfByTransform:()=>St,checkIfOfComputed:()=>Et,createHistory:()=>I,createRuntime:()=>Qo,customProcessors:()=>x,customTemplates:()=>_e,fetchByProvider:()=>ps,getAuth:()=>ls,getBasePath:()=>m,getCssPropertyValue:()=>ce,getCurrentMode:()=>ie,getCurrentTheme:()=>ee,getHistory:()=>C,getPageInfo:()=>Xr,getRealValue:()=>hs,getRuntime:()=>Jo,getV2RuntimeFromDll:()=>k,handleHttpError:()=>nn,httpErrorToString:()=>Jt,isLoggedIn:()=>ds,isUnauthenticatedError:()=>Xt,logout:()=>us,matchPath:()=>Lt,registerWidgetFunctions:()=>$e,registerWidgetI18n:()=>N,setUIVersion:()=>eo,unstable_createRoot:()=>fs});var r={};n.r(r),n.d(r,{addRealTimeDataInspectHook:()=>kr,debugDataValue:()=>br,getAddedContracts:()=>wr,getAllContextValues:()=>mr,getBrickPackagesById:()=>gr,getContextValue:()=>hr,getRenderId:()=>yr,legacyDoTransform:()=>sr,loadBricks:()=>vr,mountUseBrick:()=>rr,renderUseBrick:()=>nr,setRealTimeDataInspectRoot:()=>Ar,symbolForRootRuntimeContext:()=>tr,unmountUseBrick:()=>or,updateSnippetPreviewSettings:()=>pr,updateStoryboard:()=>ir,updateStoryboardByRoute:()=>ar,updateStoryboardBySnippet:()=>dr,updateStoryboardByTemplate:()=>cr,updateTemplatePreviewSettings:()=>lr});var o=n(4635),s=n(4586),i=n(918),a=n(2559),c=n(6121),l=n(829),u=n(1586),d=n(8958),p=n(729),f=n(1302),h=(n(6036),n(2890));function m(){const e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var g=n(1030);function v(e,t){const n=(0,g.orderBy)(e,(e=>{var t;return(null===(t=e.app.homepage)||void 0===t?void 0:t.length)??0}),"desc");for(const e of n){const n=e.app.homepage;if("string"==typeof n&&"/"===n[0]&&y(n,t))return e}}function y(e,t){return"/"===e?t===e:`${t.replace(/\/+$/,"")}/`.startsWith(`${e.replace(/\/+$/,"")}/`)}function w(e){var t;return!e||(null===(t=Jo().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}let b,E=!1;function S(e,t){E=!confirm(e),t(!E)}function A(e){const{push:t,replace:n}=e;function r(r){return function(o,s,i){let a;const c="string"==typeof o;return a=c?(0,h.parsePath)(o).pathname:o.pathname,"string"==typeof a&&a.startsWith("/")&&w(function(e){var t;return v((null===(t=qo)||void 0===t?void 0:t.storyboards)??[],e)}(a))?location["push"===r?"assign":"replace"](c?m()+o.substring(1):e.createHref(o)):("push"===r?t:n)(o,s,i)}}return{push:r("push"),replace:r("replace")}}function k(){var e;const{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function I(){if(!b){const e=(0,h.createBrowserHistory)({basename:m().replace(/\/$/,""),getUserConfirmation:S});Object.assign(e,function(e){const{push:t,replace:n}=e;function r(e,n,r){E=!1,t(e,n),null==r||r(E)}function o(e,t,r){E=!1,n(e,t),null==r||r(E)}function s(t){return function(n){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const{extraQuery:a,clear:c,keepHash:l,...u}=s,d=new URLSearchParams(c?"":e.location.search),p={};Object.assign(p,n,a);for(const[e,t]of Object.entries(p))if(Array.isArray(t)){d.delete(e);for(const n of t)d.append(e,n)}else null==t||""===t?d.delete(e):d.set(e,t);("push"===t?r:o)(`?${d.toString()}${l?e.location.hash:""}`,u,i)}}let i;return{pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,n,o){r({...e.location,key:void 0,hash:t,state:{notify:!1,...n}},void 0,o)},reload:function(t){o({...e.location,state:{...e.location.state,notify:!0,noIncremental:!0}},void 0,t)},setBlockMessage:function(e){i=e},getBlockMessage:function(){return i},unblock:function(){i=void 0},...A({...e,push:r,replace:o})}}(e)),b=e}return b}const C=function(){const e=k();if(e)return e.getHistory}()||function(){return b};var R=n(7067),T=n(7389),O=n(8701),P=n(4871),_=n(6639),M=new WeakMap;const x=function(){const e=k();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomProcessor(t,n)})}()||new class{constructor(){(0,i.A)(this,M,new Map)}define(e,t){const[n,r]=e.split(".");let o=(0,l.A)(M,this).get(n);if(o||(o=new Map,(0,l.A)(M,this).set(n,o)),o.has(r))throw new Error(`Custom processor of "${e}" already registered`);o.set(r,t)}get(e){return(0,l.A)(M,this).get(e)}};function B(e){let{app:t,meta:n}=e;if(null!=n&&n.i18n){const e=L("app",t.id),r=[];return Object.entries(n.i18n).forEach((t=>{let[n,o]=t;u.i18n.addResourceBundle(n,e,o),r.push(n)})),()=>{for(const t of r)u.i18n.removeResourceBundle(t,e)}}}function L(e,t){return`${e}/${t}`}function $(e){return u.i18n.getFixedT(null,L("widget",e))}const N=function(){const e=k();if(e)return function(t,n){return e.getRuntime().registerWidgetI18n(t,n)}}()||function(e,t){const n=L("widget",e);Object.entries(t).forEach((e=>{let[t,r]=e;u.i18n.addResourceBundle(t,n,r)}))},U="brick-next-devtools-panel",F="devtools-frame-active-change",j="devtools-panel-change";let D,K=!0;function V(e,t){const n=W();if(!n||"evaluation"===e&&(!K||D&&"Evaluations"!==D))return;const r=()=>{var r;null===(r=n.emit)||void 0===r||r.call(n,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(r):setTimeout(r,0)}function W(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}const H=()=>{throw new Error("Can't modify read-only proxy object")},z={set:H,defineProperty:H,deleteProperty:H,setPrototypeOf:H};function q(e){return new Proxy(e,z)}function G(e){let{get:t,ownKeys:n}=e;return W()?q(Object.fromEntries(n(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}let Y="light";const Q=new p.JsonStorage(localStorage),J="apps-theme";function X(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error(`Unsupported theme: ${e}`);Y=e}function Z(){return Y}function ee(){return document.documentElement.dataset.theme}function te(e){e?X(e):e=Z(),e!==ee()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function ne(e){Q.setItem(J,{...re(),...e})}function re(){let e;try{e=Q.getItem(J)}catch{console.error("JSON parse error inside `getLocalAppsTheme()`")}return e??{}}let oe="default";function se(e){if("dashboard"!==e&&"default"!==e)throw new Error(`Unsupported mode: ${e}`);oe=e}function ie(){return document.documentElement.dataset.mode}function ae(e){e?se(e):e=oe,e!==ie()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function ce(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return n&&(null===(t=window.getComputedStyle(n))||void 0===t?void 0:t.getPropertyValue(e))||""}function le(e,t){const n={};for(const r of e){const e=ue(r,t);void 0!==e&&(n[r]=e)}return n}function ue(e,t){var n,r,o;let{collectCoverage:s,widgetId:i,widgetVersion:a,app:c,appendI18nNamespace:l,storyboardFunctions:d,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return s?"/next":m().replace(/\/$/,"");case"FN":return d;case"IMG":return s?{get:e=>`mock/images/${e}`}:i?null==Yo||null===(n=Yo.images)||void 0===n?void 0:n.widgetImagesFactory(i,a):null==Yo||null===(r=Yo.images)||void 0===r?void 0:r.imagesFactory(c.id,c.isBuildPush,c.currentVersion);case"I18N":return s?g.identity:i?$(i):u.i18n.getFixedT(null,[l,L("app",c.id)].filter(Boolean));case"I18N_TEXT":return s?de:u.i18nText;case"PERMISSIONS":return q({check:s?pe:null==Yo||null===(o=Yo.checkPermissions)||void 0===o?void 0:o.checkPermissions});case"THEME":return q({getTheme:s?()=>"light":Z});case"console":return p?q(console):void 0;case"location":return s?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function de(e){return null==e?void 0:e.en}function pe(){return!0}function fe(){let{widgetId:e,widgetVersion:t,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=new Map,o=new Proxy(Object.freeze({}),{get:(i,a)=>function(i){const a=r.get(i);if(!a)return;if(a.processed)return a.cooked;let c;n&&(c=n.createCollector(i));const l=(0,T.precookFunction)(a.source,{typescript:a.typescript,hooks:c&&{beforeVisit:c.beforeVisit}});return a.cooked=(0,T.cook)(l.function,a.source,{rules:{noVar:!0},globalVariables:(0,_.supply)(l.attemptToVisitGlobals,le(l.attemptToVisitGlobals,{collectCoverage:n,widgetId:e,widgetVersion:t,app:s,storyboardFunctions:o,isStoryboardFunction:!0}),!!n),hooks:c&&{beforeEvaluate:c.beforeEvaluate,beforeCall:c.beforeCall,beforeBranch:c.beforeBranch}}),a.processed=!0,a.cooked}(a)});let s;return{storyboardFunctions:o,registerStoryboardFunctions:function(e,t){if(t&&(s=t),r.clear(),Array.isArray(e))for(const t of e){const e=(0,O.collectMemberUsageInFunction)(t,"FN",!!n),o=(0,O.collectMemberUsageInFunction)(t,"PERMISSIONS",!!n).has("check");r.set(t.name,{source:t.source,typescript:t.typescript,deps:e,hasPermissionsCheck:o})}},updateStoryboardFunction(e,t){const n={...t,name:e},o=(0,O.collectMemberUsageInFunction)(n,"FN",!0),s=(0,O.collectMemberUsageInFunction)(n,"PERMISSIONS",!0).has("check");r.set(e,{source:t.source,typescript:t.typescript,deps:o,hasPermissionsCheck:s})},checkPermissionsUsage(e){const t=new Set,n=e=>{if(!t.has(e)){t.add(e);const o=r.get(e);return!!o&&(o.hasPermissionsCheck||[...o.deps].some(n))}return!1};return e.some(n)}}}const{storyboardFunctions:he,registerStoryboardFunctions:me,checkPermissionsUsage:ge}=fe();var ve={};try{ve.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var n=e.create,r=e.defineProperty,o=s.prototype;function s(){t.set(this,n(null))}function i(e,t,n){r(e,t,{configurable:!0,writable:!0,value:n})}function a(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}i(o,"addEventListener",(function(e,n,r){for(var o=t.get(this),s=o[e]||(o[e]=[]),i=0,a=s.length;i<a;i++)if(s[i].listener===n)return;s.push({target:this,listener:n,options:r})})),i(o,"dispatchEvent",(function(e){var n=t.get(this)[e.type];return n&&(i(e,"target",this),i(e,"currentTarget",this),n.slice(0).some(a,e),delete e.currentTarget,delete e.target),!0})),i(o,"removeEventListener",(function(e,n){for(var r=t.get(this),o=r[e]||(r[e]=[]),s=0,i=o.length;s<i;s++)if(o[s].listener===n)return void o.splice(s,1)})),ve.EventTarget=s}(Object,new WeakMap)}const ye=ve.EventTarget;let we=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({});const be=new Map([[we.xLarge,"1920px"],[we.large,"1600px"],[we.medium,"1280px"],[we.small,"1024px"],[we.xSmall,0]]),Ee=new ye,Se={},Ae={};function ke(e,t){let n=!1;Se[t]=e.matches;for(const[e]of be)if(Se[e]&&Ae.breakpoint!==e){Ae.breakpoint=e,n=!0;break}n&&Ee.dispatchEvent(new CustomEvent("change",{detail:Ae}))}be.forEach(((e,t)=>{const n=window.matchMedia(`(min-width: ${e})`);ke(n,t),n.addEventListener?n.addEventListener("change",(e=>{ke(e,t)})):n.addListener((e=>{ke(e,t)}))}));const Ie=()=>Ae;function Ce(e){return function(t){const n="local"===e?localStorage:sessionStorage;return JSON.parse(n.getItem(t)??"null")}}function Re(e){var t,n;return!(null===(t=e?e.flags:null===(n=Jo())||void 0===n?void 0:n.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Te(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];const s=0===r.length?"":",";e?console.error(`${t} is dropped in v3 strict mode${s}`,...r):console.warn(`${t} is deprecated in v3 and will be dropped in strict mode${s}`,...r)}const Oe=new Set(["prefix"]);var Pe=new WeakMap;const _e=function(){const e=k();if(e)return Object.freeze({define:(t,n)=>e.getRuntime().registerCustomTemplate(t,n)})}()||new class{constructor(){(0,i.A)(this,Pe,new Map)}define(e,t){var n,r;let o=(0,l.A)(Pe,this).has(e);o?console.warn(`Custom template of "${e}" already registered.`):(o=!!customElements.get(e),o&&console.warn(`Custom template of "${e}" already defined by customElements.`));const s=Re(),i=(null===(n=t.proxy)||void 0===n?void 0:n.properties)??{},a=[],c=[];for(const[t,n]of Object.entries(i))n.asVariable?(Te(s,"Template `asVariable`",e,t),s||c.push(t)):n.mergeProperty||n.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,t):n.ref&&a.push([t,n]);const u={...t,proxy:{...t.proxy,properties:Object.fromEntries(a)},state:(t.state?s?t.state:t.state.map((e=>({expose:!0,...e}))):[]).concat(c.map((e=>({name:e,expose:!0}))))};(0,l.A)(Pe,this).set(e,{...u,name:e});const d=(p=u.state,(0,g.uniq)((null==p?void 0:p.filter((e=>e.expose)).map((e=>e.name)))??[]));var p;const f=Object.entries((null===(r=u.proxy)||void 0===r?void 0:r.methods)??{}),h=d.concat(a.map((e=>e[0]))),m=f.map((e=>e[0])),v=h.concat(m).filter((e=>e in HTMLElement.prototype&&!Oe.has(e)));if(v.length>0&&(Te(s,"Using native HTMLElement properties as template properties or methods",e,...v),s))throw new Error(`In custom template "${e}", ${v.map((e=>`"${e}"`)).join(", ")} are native HTMLElement properties, and should be avoid to be used as brick properties or methods.`);if(!o){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return h}static get _dev_only_definedMethods(){return m}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){let e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));const t=document.createDocumentFragment(),n=document.createElement("style");n.textContent=":host{display:block}:host([hidden]){display:none}";const r=document.createElement("slot");t.appendChild(n),t.appendChild(r),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}for(const n of d)a.some((e=>e[0]===n))?console.error(`Cannot define an exposed state that is also a proxy property: "${n}" in ${e}`):Object.defineProperty(t.prototype,n,{get(){return this.$$tplStateStore.getValue(n)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(n,e,"replace")},enumerable:!0});for(const[e,n]of a)Object.defineProperty(t.prototype,e,{get(){return this.$$getElementByRef(n.ref)[n.refProperty??e]},set(t){var r;const o=null===(r=this.$$getElementByRef)||void 0===r?void 0:r.call(this,n.ref);o&&(o[n.refProperty??e]=t)},enumerable:!0});for(const[e,n]of f)Object.defineProperty(t.prototype,e,{value(){this.$$getElementByRef(n.ref)[n.refMethod??e](...arguments)},enumerable:!0});customElements.define(e,t)}}get(e){return(0,l.A)(Pe,this).get(e)}};function Me(e,t,n){let{tplStateStoreId:r,tplStateStoreMap:o}=e;if(!r)throw new Error(`Using "${t}" outside of a custom template${n??""}`);const s=o.get(r);if(!s)throw new Error(`Template state store is not found when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return s}function xe(e,t,n){const r=Me(e,t,n).hostBrick.element;if(!r)throw new Error(`Template host element is gone when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return r}const Be=new Map,Le=new Proxy(Object.freeze({}),{get:(e,t)=>Be.get(t)}),$e=function(){const e=k();if(e)return function(t,n,r){return e.getRuntime().registerWidgetFunctions(t,n,r)}}()||function(e,t,n){if(Be.has(e))throw new Error(`Widget functions of "${e}" already registered`);const{storyboardFunctions:r,registerStoryboardFunctions:o}=fe({widgetId:e,widgetVersion:n});Be.set(e,r),o(t)},Ne=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ue=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Ne);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Fe=e=>"*"===e||"x"===e||"X"===e,je=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},De=(e,t)=>{if(Fe(e)||Fe(t))return 0;const[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(je(e),je(t));return n>r?1:n<r?-1:0},Ke=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=De(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0},Ve=(e,t,n)=>{ze(n);const r=((e,t)=>{const n=Ue(e),r=Ue(t),o=n.pop(),s=r.pop(),i=Ke(n,r);return 0!==i?i:o&&s?Ke(o.split("."),s.split(".")):o||s?o?-1:1:0})(e,t);return We[n].includes(r)},We={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},He=Object.keys(We),ze=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===He.indexOf(e))throw new Error(`Invalid operator, expected one of ${He.join("|")}`)};function qe(e,t){let n=as(e);if(!n&&null!=Yo&&Yo.checkInstalledApps&&(n=Yo.checkInstalledApps.getCheckedApp(e)),!n||"running"===n.installStatus)return!1;if(!t||!n.currentVersion)return!0;const r=t.match(/^([><]=?|=)(.*)$/);try{if(!r)throw new TypeError(`Invalid match version: ${t}`);return Ve(n.currentVersion,r[2],r[1])}catch(e){console.error(e)}return!1}function Ge(e,t,n){let{formStateStoreId:r,formStateStoreMap:o}=e;if(!r)throw new Error(`Using "${t}" outside of form renderer${n??""}`);const s=o.get(r);if(!s)throw new Error(`Form state store is not found when using "${t}"${n??""}.\nThis is a bug of Brick Next, please report it.`);return s}const Ye=new Map;async function Qe(e){var t;const n=null==Yo||null===(t=Yo.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);n&&(e=Yo.flowApi.FLOW_API_PROVIDER);let r=Ye.get(e);if(r)return r;if(e.includes("-")&&!customElements.get(e))if(n)Yo.flowApi.registerFlowApiProvider();else if(await(0,d.loadBricksImperatively)([e],rs()),!customElements.get(e))throw new Error(`Provider not defined: "${e}".`);return r=document.createElement(e),Ye.set(e,r),r}let Je=new WeakSet;function Xe(e){if((0,p.isObject)(e)&&!Ze(e))if(Je.add(e),Array.isArray(e))e.forEach(Xe);else{const t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Xe)}}function Ze(e){return Je.has(e)}const et=new Map;async function tt(e,t,n){const{useProvider:r,method:o="resolve",args:s=[],onReject:i}=e,{provider:a,field:c}=e;if(a&&!r)throw new Error(`You're using "provider: ${a}" which is dropped in v3, please use "useProvider" instead`);const l=null!=c;if(l){const e=Re();if(Te(e,"`resolve.field`"),e)throw new Error("Using deprecated `resolve.field`")}const[u,d]=await Promise.all([Qe(r),mt(s,t)]),p=null==n?void 0:n.renderId,f=nt(u,r,o,d,n,s,!!p&&p!==os());let h,{transform:m}=e;try{const e=await f;h=l?(0,g.get)(e,c):e,Xe(h)}catch(e){if(!function(e){return!(null==e||!e.transform)}(i))throw e;m=i.transform,h=e}return m?"string"==typeof m?{[m]:h}:mt(m,{...t,data:h}):h}async function nt(e,t,n,r,o,s,i){let a,c;try{a=JSON.stringify({useProvider:t,method:n,args:r})}catch(e){if(!s)throw e;a=JSON.stringify({useProvider:t,method:n,originalArgs:s})}return"reload"!==(null==o?void 0:o.cache)&&(c=et.get(a)),c||(c=(async o=>{const s=null!=Yo&&null!==(o=Yo.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?await Yo.flowApi.getArgsOfFlowApi(t,r,n):r;return e[n](...s)})(),i||et.set(a,c)),c}const rt=Symbol.for("pre.evaluated.raw"),ot=Symbol.for("pre.evaluated.context");function st(e){return!(null==e||!e[rt])}function it(e){return e[rt]}function at(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[rt])}const ct=new WeakSet([SyntaxError,TypeError,ReferenceError]);function lt(e){return ct.has(e.constructor)?e.constructor:TypeError}function ut(e,t,n){const{run:r}=dt(e,t,n,!1);return r()}function dt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const o=[];if("string"!=typeof e){const n=(0,g.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t={...e[ot],...n},e=e[rt]}const s={usedArgs:new Set},i={usedArgs:new Set};let a;try{a=(0,T.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,O.collectAppGetMenuUsage)(s,e,t),(0,O.collectInstalledAppsHasUsage)(i,e,t)}}})}catch(t){const n=`${t.message}, in "${e}"`;throw new(lt(t))(n)}if(s.hasNonStaticUsage)throw new Error(`Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "${e}"`);if(i.hasNonStaticUsage)throw new Error(`Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "${e}"`);const c={},{attemptToVisitGlobals:l}=a;if(n.lazy||l.has("EVENT")&&!(0,p.hasOwnProperty)(t,"event")||l.has("DATA")&&!(0,p.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[rt]:e,[ot]:t}:e};let u,f,h,m;const v=Re(t);let y,w;(l.has("STATE")||!v&&l.has("TPL"))&&(m=Me(t,"STATE",`: "${e}"`)),l.has("FORM_STATE")&&(w=Ge(t,"FORM_STATE",`: "${e}"`));const b=W();if(r||b){if(l.has("CTX")&&(u=(0,O.strictCollectMemberUsage)(e,"CTX"),r&&o.push(t.ctxStore.waitFor(u))),m){if(h=(0,O.strictCollectMemberUsage)(e,"STATE"),!v){const t=(0,O.strictCollectMemberUsage)(e,"TPL");for(const e of t)h.add(e)}r&&o.push(m.waitFor(h))}w&&(y=(0,O.strictCollectMemberUsage)(e,"FORM_STATE"),r&&o.push(w.waitFor(y))),l.has("PROCESSORS")&&(f=(0,O.strictCollectMemberUsage)(e,"PROCESSORS",2),r&&o.push((0,d.loadProcessorsImperatively)(f,rs())))}if(r){let n=l.has("PERMISSIONS");if(!n&&l.has("FN")){const t=[...(0,O.strictCollectMemberUsage)(e,"FN")];n=ge(t)}if(n&&o.push(...t.pendingPermissionsPreCheck),s.usedArgs.size>0&&null!=Yo&&Yo.menu){const e=[...s.usedArgs];o.push(Promise.all(e.map((e=>Yo.menu.fetchMenuById(e,t,{getStoryboardByAppId:is,resolveData:tt,asyncComputeRealValue:mt})))))}var E;i.usedArgs.size>0&&o.push(null==Yo||null===(E=Yo.checkInstalledApps)||void 0===E?void 0:E.waitForCheckingApps([...i.usedArgs]))}return{blockingList:o,run(){var n,r;const{app:o,location:s,query:i,match:d,flags:b,sys:E,ctxStore:S,data:A,event:k}=t,I=t.overrideApp??o;for(const o of l)switch(o){case"ANCHOR":c[o]=s.hash?s.hash.substring(1):null;break;case"APP":if(null==I)throw new ReferenceError(`APP is not defined, in "${e}"`);c[o]={...(0,g.cloneDeep)(I),getMenu:null==Yo||null===(n=Yo.menu)||void 0===n?void 0:n.getMenuById};break;case"CTX":c[o]=G({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(u)});break;case"DATA":c[o]=A;break;case"EVENT":c[o]=k;break;case"FLAGS":c[o]=q(b);break;case"FORM_STATE":c[o]=G({get:(e,t)=>w.getValue(t),ownKeys:()=>Array.from(y)});break;case"HASH":c[o]=s.hash;break;case"INSTALLED_APPS":c[o]=q({has:qe});break;case"ITEM":case"INDEX":{const n="ITEM"===o?"forEachItem":"forEachIndex";(0,p.hasOwnProperty)(t,n)?c[o]=t[n]:console.error(`Using \`${o}\` but no \`:forEach\` is found, check your expression: "${e}"`);break}case"LOCAL_STORAGE":c[o]=q({getItem:Ce("local")});break;case"MEDIA":c[o]=q(Ie());break;case"MISC":c[o]=Jo().getMiscSettings();break;case"PARAMS":if(null==i)throw new ReferenceError(`PARAMS is not defined, in "${e}"`);c[o]=new URLSearchParams(i);break;case"PATH":c[o]=q((null==d?void 0:d.params)??{});break;case"PATH_NAME":c[o]=s.pathname;break;case"PROCESSORS":c[o]=G({get(e,t){const n=x.get(t);if(!n)throw new Error(`'PROCESSORS.${t}' is not registered! Have you installed the relevant brick package?`);return G({get:(e,t)=>n.get(t),ownKeys:()=>Array.from(n.keys())})},ownKeys(){const e=new Set;for(const t of f){const n=t.split(".")[0];e.add(n)}return Array.from(e)}});break;case"QUERY":if(null==i)throw new ReferenceError(`QUERY is not defined, in "${e}"`);c[o]=Object.fromEntries(Array.from(i.keys()).map((e=>[e,i.get(e)])));break;case"QUERY_ARRAY":if(null==i)throw new ReferenceError(`QUERY_ARRAY is not defined, in "${e}"`);c[o]=Object.fromEntries(Array.from(i.keys()).map((e=>[e,i.getAll(e)])));break;case"SESSION_STORAGE":c[o]=q({getItem:Ce("session")});break;case"TPL":if(Te(v,'Using "TPL" in expression',`check your expression: "${e}"`),v)break;case"STATE":c[o]=G({get:(e,t)=>m.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":c[o]=q(E??{});break;case"__WIDGET_FN__":c[o]=Le;break;case"__WIDGET_IMG__":c[o]=null==Yo||null===(r=Yo.images)||void 0===r?void 0:r.widgetImagesFactory;break;case"__WIDGET_I18N__":c[o]=$}Object.assign(c,le(a.attemptToVisitGlobals,{storyboardFunctions:he,app:I,appendI18nNamespace:t.appendI18nNamespace}));try{const t=(0,T.cook)(a.expression,a.source,{globalVariables:(0,_.supply)(a.attemptToVisitGlobals,c)});return V("evaluation",{raw:e,context:c,result:t}),t}catch(t){const n=`${t.message}, in "${e}"`;throw new(lt(t))(n)}}}}let pt=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function ft(e){switch(e){case pt.USE_BRICK_PROPERTIES:case pt.USE_BRICK_TRANSFORM:case pt.USE_BRICK_EVENTS:case pt.USE_BRICK_IF:case pt.USE_BRICK_LIFECYCLE:case pt.USE_BRICK_DATA_SOURCE:return!0}return!1}function ht(e,t,n){if(ft(e))return e;if(t)switch(e){case pt.USE_BRICK:return pt.USE_BRICK_ITEM;case pt.USE_BRICK_SLOTS_ITEM_BRICKS:return pt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case pt.INITIAL:if("useBrick"===n)return pt.USE_BRICK;break;case pt.USE_BRICK:case pt.USE_BRICK_ITEM:case pt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(n){case"properties":return pt.USE_BRICK_PROPERTIES;case"transform":return pt.USE_BRICK_TRANSFORM;case"dataSource":return pt.USE_BRICK_DATA_SOURCE;case"events":return pt.USE_BRICK_EVENTS;case"slots":return pt.USE_BRICK_SLOTS;case"children":return pt.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return pt.USE_BRICK_IF;case"lifeCycle":return pt.USE_BRICK_LIFECYCLE}break;case pt.USE_BRICK_SLOTS:return pt.USE_BRICK_SLOTS_ITEM;case pt.USE_BRICK_SLOTS_ITEM:if("bricks"===n)return pt.USE_BRICK_SLOTS_ITEM_BRICKS}return pt.INITIAL}async function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=st(e);if(r||"string"==typeof e){const o=n.$$lazyForUseBrick&&ft(n.$$stateOfUseBrick);let s,i=o;return r||(0,T.isEvaluable)(e)?(s=await async function(e,t,n){const{blockingList:r,run:o}=dt(e,t,n,!0);return await Promise.all(r),o()}(e,t,{lazy:o}),i=at(e)):s=o?e:((0,p.hasOwnProperty)(t,"data")?n.noInject?P.transform:P.transformAndInject:n.noInject?yt:P.inject)(e,t),i||Xe(s),s}if(!(0,p.isObject)(e)||Ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=vt(n,!0);return Promise.all(e.map((e=>mt(e,t,r))))}return Object.fromEntries((await Promise.all(Object.entries(e).map((e=>{let[r,o]=e;return Promise.all([mt(r,t),mt(o,t,vt(n,!1,r))])})))).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=st(e);if(r||"string"==typeof e){const o=n.$$lazyForUseBrick&&ft(n.$$stateOfUseBrick);let s,i=o;return r||(0,T.isEvaluable)(e)?(s=ut(e,t),i=at(e)):s=o?e:((0,p.hasOwnProperty)(t,"data")?n.noInject?P.transform:P.transformAndInject:n.noInject?yt:P.inject)(e,t),i||Xe(s),s}if(!(0,p.isObject)(e)||Ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){const r=vt(n,!0);return e.map((e=>gt(e,t,r)))}return Object.fromEntries(Object.entries(e).map((e=>{let[r,o]=e;return[gt(r,t),gt(o,t,vt(n,!1,r))]})).concat(n.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function vt(e,t,n){return e.$$lazyForUseBrick?{...e,$$stateOfUseBrick:ht(e.$$stateOfUseBrick,t,n)}:e}function yt(e){return e}async function wt(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||st(e.if)?await mt(e.if,t):e.if)}function bt(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||st(e.if)?gt(e.if,t):e.if)}function Et(e){return!(0,p.hasOwnProperty)(e,"if")||!!e.if}const St=function(){const e=k();if(e)return e.looseCheckIfByTransform}()||function(e,t){return bt(e,{data:t})};function At(e){let t=!1,n=!1,r=!1;if("string"==typeof e?(0,T.isEvaluable)(e):st(e)){const o="string"==typeof e?e:it(e);if((0,T.isTrackAll)(o)){const e=(0,O.trackAll)(o);e&&(t=e.context,n=e.state,r=e.formState)}else t=(0,O.track)(o,"track context","CTX"),n=(0,O.track)(o,"track state","STATE"),r=(0,O.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:n,formStateNames:r}}async function kt(e,t){for(const[n,r,o]of e)if(n===t){const e=await r;if(void 0!==e||!o)return e}}async function It(e){const t={};for(const[n,r,o]of e){const e=await r;void 0===e&&o||!("style"!==n&&"dataset"!==n||(0,p.isObject)(e))||(t[n]=e)}return t}function Ct(e,t){if(t)for(const[n,r]of Object.entries(t))switch(n){case"style":case"dataset":for(const[t,o]of Object.entries(r))e[n][t]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error(`set \`${n}\` is prohibited`);default:e[n]=r}}function Rt(e,t,n){const r=function(e,t){return(0,p.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{let[n,r]=e;const o=gt(r,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?pt.USE_BRICK:pt.INITIAL});if("style"!==n&&"dataset"!==n||(0,p.isObject)(o))return[n,o]})).filter(Boolean)):{}}(t,n);Array.isArray(e)||(e=[e]),e.forEach((e=>{Ct(e,r)}))}function Tt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ot(e){return e&&e.sensitive?"":"i"}function Pt(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,s=n.start,i=void 0===s||s,a=n.end,c=void 0===a||a,l=n.encode,u=void 0===l?function(e){return e}:l,d=n.delimiter,p=void 0===d?"/#?":d,f=n.endsWith,h="[".concat(Tt(void 0===f?"":f),"]|$"),m="[".concat(Tt(p),"]"),g=i?"^":"",v=0,y=e;v<y.length;v++){var w=y[v];if("string"==typeof w)g+=Tt(u(w));else{var b=Tt(u(w.prefix)),E=Tt(u(w.suffix));if(w.pattern)if(t&&t.push(w),b||E)if("+"===w.modifier||"*"===w.modifier){var S="*"===w.modifier?"?":"";g+="(?:".concat(b,"((?:").concat(w.pattern,")(?:").concat(E).concat(b,"(?:").concat(w.pattern,"))*)").concat(E,")").concat(S)}else g+="(?:".concat(b,"(").concat(w.pattern,")").concat(E,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?g+="((?:".concat(w.pattern,")").concat(w.modifier,")"):g+="(".concat(w.pattern,")").concat(w.modifier);else g+="(?:".concat(b).concat(E,")").concat(w.modifier)}}if(c)o||(g+="".concat(m,"?")),g+=n.endsWith?"(?=".concat(h,")"):"$";else{var A=e[e.length-1],k="string"==typeof A?m.indexOf(A[A.length-1])>-1:void 0===A;o||(g+="(?:".concat(m,"(?=").concat(h,"))?")),k||(g+="(?=".concat(m,"|").concat(h,")"))}return new RegExp(g,Ot(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,s="";if("?"===e[a=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));s+=e[a++]}else s+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!s)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:s}),n=a}else{for(var i="",a=n+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;i+=e[a++]}if(!i)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:i}),n=a}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,s="[^".concat(Tt(t.delimiter||"/#?"),"]+?"),i=[],a=0,c=0,l="",u=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var r=n[c],o=r.type,s=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(s,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var f=u("CHAR"),h=u("NAME"),m=u("PATTERN");if(h||m){var g=f||"";-1===o.indexOf(g)&&(l+=g,g=""),l&&(i.push(l),l=""),i.push({name:h||a++,prefix:g,suffix:"",pattern:m||s,modifier:u("MODIFIER")||""})}else{var v=f||u("ESCAPED_CHAR");if(v)l+=v;else if(l&&(i.push(l),l=""),u("OPEN")){g=p();var y=u("NAME")||"",w=u("PATTERN")||"",b=p();d("CLOSE"),i.push({name:y||(w?a++:""),pattern:y&&!w?s:w,prefix:g,suffix:b,modifier:u("MODIFIER")||""})}else d("END")}}return i}(e,n),t,n)}function _t(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,o=n.exec(e.source);o;)t.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return _t(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),Ot(n))}(e,t,n):Pt(e,t,n)}const Mt=new Map,xt=1e4;let Bt=0;function Lt(e,t){const{path:n,exact:r=!1,strict:o=!1,sensitive:s=!0}=t;return(Array.isArray(n)?n:[n]).reduce(((t,n)=>{if(t)return t;const{regexp:i,keys:a}=function(e,t){const n=`${t.end}${t.strict}${t.sensitive}`;let r=Mt.get(n);r||Mt.set(n,r=new Map);const o=r.get(e);if(o)return o;const s=[],i={regexp:_t(e,s,t),keys:s};return Bt<xt&&(r.set(e,i),Bt++),i}(n,{end:r,strict:o,sensitive:s}),c=i.exec(e);if(!c)return null;const[l,...u]=c,d=e===l;return r&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:a.reduce(((e,t,n)=>(e[t.name]=u[n],e)),{})}}),null)}function $t(e,t,n){return Lt(n,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}const Nt=Symbol.for("tpl.asyncComputedPropsFromHost"),Ut=Symbol.for("tpl.stateStoreId"),Ft=Symbol.for("tpl.externalForEachItem"),jt=Symbol.for("tpl.externalForEachIndex"),Dt=Symbol.for("tpl.externalNoForEach"),Kt=new Set;let Vt=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e}({});const Wt={[Vt.REQUEST_FAILED]:"Request Failed",[Vt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Vt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Vt.NETWORK_ERROR]:"Network error, please check your network."},Ht={[Vt.REQUEST_FAILED]:"请求失败",[Vt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Vt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Vt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},zt="core/runtime",qt={en:Wt,zh:Ht};let Gt;const Yt=Object.freeze({show:function(e){if(Gt)return Gt.resolve(e);if("confirm"===e.type){const t=confirm(e.content);return new Promise(((e,n)=>setTimeout((()=>{(t?e:n)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function Qt(e){const{search:t,pathname:n}=e,r=n?window.btoa(encodeURIComponent(n)):"",o=t?window.btoa(encodeURIComponent(t)):"";document.cookie=`SALOGINPATH=${r}; path=/`,document.cookie=`SALOGINQUERY=${o}; path=/`}function Jt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof R.HttpFetchError)return u.i18n.t(`${zt}:${Vt.NETWORK_ERROR}`);if(e instanceof R.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function Xt(e){return e instanceof R.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}let Zt,en,tn=!1;function nn(e){if(e instanceof R.HttpAbortError)return;if(Xt(e)&&!window.NO_AUTH_GUARD){if(tn)return;return tn=!0,void Yt.show({type:"confirm",content:u.i18n.t(`${zt}:${Vt.LOGIN_TIMEOUT_MESSAGE}`)}).then((()=>{!function(){const e=Jo().getFeatureFlags()["sso-enabled"],t=C();Qt(t.location),t.push(e?"/sso-auth/login":"/auth/login",{from:{...t.location,state:void 0}})}(),tn=!1}),(()=>{tn=!1}))}console.error(e);const t=Jt(e);t!==Zt&&(Zt=t,Yt.show({type:"error",title:u.i18n.t(`${zt}:${Vt.REQUEST_FAILED}`),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{Zt=void 0})))}const rn=Object.freeze({show:function(e){en?en.resolve(e):alert(e.message)}});function on(e,t,n){t&&Object.entries(t).forEach((t=>{let[r,o]=t;const s=un(o,n,{element:e});e.addEventListener(r,s),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([r,s]),e.$$eventListeners||(e.$$eventListeners=[]);for(const t of[].concat(o))e.$$eventListeners.push([r,null,t])}))}function sn(e){return"string"==typeof e.action}function an(e){return"string"==typeof e.useProvider}function cn(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function ln(e){return!!e.then}function un(e,t,n){return function(r){for(const o of[].concat(e))if(bt(o,{...t,event:r}))if(ln(o))un(o.then,t,n)(r);else if(sn(o)){const[e,s]=o.action.split(".");switch(o.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":hn(r,s,o.args,o.callback,t);break;case"window.open":mn(r,o.args,t);break;case"location.reload":case"location.assign":bn(r,s,o.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":En(r,e,s,o.args,t);break;case"event.preventDefault":r.preventDefault();break;case"event.stopPropagation":r.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":Sn(r,s,o.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":An(r,s,o.args,t);break;case"handleHttpError":nn(r.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":vn(r,s,o.args,o.batch??!0,o.callback,t);break;case"state.update":case"state.refresh":case"state.load":yn(r,s,o.args,o.batch??!0,o.callback,t);break;case"tpl.dispatchEvent":{const[e,n]=Cn(o.args,t,r);xe(t,o.action,`: ${e}`).dispatchEvent(new CustomEvent(e,n));break}case"formstate.update":wn(r,o.args,o.callback,t);break;case"message.subscribe":case"message.unsubscribe":kn(r,s,o.args,t,n,o.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":te("theme.setDarkTheme"===o.action?"dark":"light");break;case"theme.setTheme":{const[e]=Cn(o.args,t,r);te(e);break}case"mode.setDashboardMode":case"mode.setDefaultMode":ae("mode.setDashboardMode"===o.action?"dashboard":"default");break;default:console.error("unknown event listener action:",o.action)}}else an(o)?dn(r,o,t,n):cn(o)?pn(r,o,t,n):console.error("unknown event handler:",o);else o.else&&un(o.else,t,n)(r)}}async function dn(e,t,n,r){try{fn(e,await Qe(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",n,r)}catch(e){console.error(Jt(e))}}function pn(e,t,n,r){let o=[];const s=t.target,i=t.targetRef;let a=s;if(("string"==typeof s?(0,T.isEvaluable)(s):st(s))&&(a=gt(s,{...n,event:e})),"string"==typeof a)if("_self"===a)o.push(r.element);else if(t.multiple)o=Array.from(document.querySelectorAll(a));else{const e=document.querySelector(a);null!==e&&o.push(e)}else if(a)a instanceof HTMLElement?o.push(a):console.error("unexpected target:",a);else if(i){let t=i;("string"==typeof i?(0,T.isEvaluable)(i):st(i))&&(t=gt(i,{...n,event:e}));const r=[].concat(t),s=xe(n,"targetRef",`: ${r.join(", ")}`);o.push(...r.map((e=>{var t;return null===(t=s.$$getElementByRef)||void 0===t?void 0:t.call(s,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((o=>{fn(e,o,t,t.method,n,r,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Rt(o,t.properties,{...n,event:e}):console.error("target not found:",s||i)}async function fn(e,t,n,r,o,s,i){if("function"!=typeof t[r])return void console.error("target has no method:",{target:t,method:r});const a=async()=>{var s;let a=Cn(n.args,o,e,i);var c;return an(n)&&null!=Yo&&null!==(s=Yo.flowApi)&&void 0!==s&&s.isFlowApiProvider(n.useProvider)&&(a=await Yo.flowApi.getArgsOfFlowApi(n.useProvider,a,r,null===(c=n.sse)||void 0===c?void 0:c.stream)),t[r](...a)};if(!n.callback)return void a();const c=In(n.callback,o,s),l={progress:c("progress"),success:c("success"),error:c("error"),finally:c("finally")};if(an(n)){var u,d;const t={...o,event:e};if(gt(null===(u=n.sse)||void 0===u?void 0:u.stream,t))return void async function(e,t){let{progress:n,success:r,error:o,finally:s}=t;const i=os();try{const t=await e();for await(const e of t){if(i!==os())return;null==n||n(e)}if(i!==os())return;null==r||r()}catch(e){if(i!==os())return;null==o||o(e)}finally{null==s||s()}}(a,l);if(gt(null===(d=n.poll)||void 0===d?void 0:d.enabled,t))return void function(e,t,n,r){let{progress:o,success:s,error:i,finally:a}=t;const{expectPollStopImmediately:c,expectPollEnd:l}=n,{interval:u,leadingRequestDelay:d,continueOnError:p,delegateLoadingBar:f}=gt((0,g.pick)(n,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),r),h=os();let m;async function v(){let t;Kt.delete(m);try{var n;if(t=null===(n=gt(c,r))||void 0===n?void 0:n(),t)null==a||a();else{var d;const n=await e(),i=null===(d=gt(c,r))||void 0===d?void 0:d();var g;t=i||h!==os(),t?i&&(null==a||a()):(null==o||o(n),null!==(g=gt(l,r))&&void 0!==g&&g(n)?(f&&window.dispatchEvent(new Event("request.end")),null==s||s(n),null==a||a()):y(u??3e3))}}catch(e){var v;const n=null===(v=gt(c,r))||void 0===v?void 0:v();t=n||h!==os(),t?n&&(null==a||a()):(null==i||i(e),p?y(u??3e3):null==a||a())}finally{f&&t&&window.dispatchEvent(new Event("request.end"))}}function y(e){m=setTimeout(v,e),Kt.add(m)}y(d??0),f&&window.dispatchEvent(new Event("request.start"))}(a,l,n.poll,t)}try{const e=await a();l.success(e)}catch(e){l.error(e)}finally{l.finally()}}function hn(e,t,n,r,o){let s=0,i=!1,a=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":s=2,i=!0;break;case"reload":i=!0;break;case"block":s=1,a="setBlockMessage"}let c=[];if(s>0&&(c=Cn(n,o,e,{useEventDetailAsDefault:!0}),c.length=s),i&&r){const e=In(r,o,void 0);c.push((t=>{e(t?"error":"success")({blocked:t}),e("finally")({blocked:t})}))}C()[a](...c)}function mn(e,t,n){const[r,o,s]=Cn(t,n,e);window.open(r,o||"_self",s)}function gn(e,t,n,r,o,s){t?r.updateValues(e,n,(e=>Cn(e,o,s)[0])):e.forEach((e=>{const{name:t,value:i}=Cn([e],o,s)[0];r.updateValue(t,i,n)}))}function vn(e,t,n,r,o,s){if(!Array.isArray(n)||!n.every(p.isObject)||"assign"!==t&&"replace"!==t){const[r,i]=Cn(n,s,e);s.ctxStore.updateValue(r,i,t,o,s)}else gn(n,r,t,s.ctxStore,s,e)}function yn(e,t,n,r,o,s){if(Array.isArray(n)&&n.every(p.isObject)&&"update"===t)gn(n,r,"replace",Me(s,`state.${t}`,`: ${JSON.stringify(n)}`),s,e);else{const[r,i]=Cn(n,s,e);Me(s,`state.${t}`,`: ${r}`).updateValue(r,i,"update"===t?"replace":t,o,s)}}function wn(e,t,n,r){const[o,s]=Cn(t,r,e);Ge(r,"formstate.update",`: ${o}`).updateValue(o,s,"replace",n,r)}function bn(e,t,n,r){if("assign"===t){const[t]=Cn(n,r,e);location.assign(t)}else location[t]()}function En(e,t,n,r,o){const s="localStorage"===t?localStorage:sessionStorage,[i,a]=Cn(r,o,e);"setItem"===n?void 0!==a&&s.setItem(i,JSON.stringify(a)):s.removeItem(i)}function Sn(e,t,n,r){console[t](...Cn(n,r,e,{useEventAsDefault:!0}))}function An(e,t,n,r){const o=Cn(n,r,e,{useEventAsDefault:!0});rn.show({type:t,message:o[0]})}async function kn(e,t,n,r,o,s){const i=()=>{var o;const s=Cn(n,r,e);return null==Yo||null===(o=Yo.messageDispatcher)||void 0===o?void 0:o[t](...s)};if(!s)return void i();const a=In(s,r,o);try{const e=await i();a("success")(e)}catch(e){a("error")(e)}finally{a("finally")()}}function In(e,t,n){return function(r){return function(o){const s=null==e?void 0:e[r];if(s)try{const e=new CustomEvent(`callback.${r}`,{detail:o});un(s,t,n)(e)}catch(e){console.error(e)}else"error"===r&&console.error("Unhandled callback error:",o)}}}function Cn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?gt(e,{...t,event:n}):r.useEventAsDefault?[n]:r.useEventDetailAsDefault?[n.detail]:[]}function Rn(e){var t;const{ref:n,runtimeContext:r,element:o}=e;if(!n||!r.tplStateStoreId)return;const{hostBrick:s}=Me(r,"bindTemplateProxy"),i=s.tplHostMetadata;i.internalBricksByRef.set(n,e);const a=null===(t=i.proxy)||void 0===t?void 0:t.events;if(a)for(const[e,t]of Object.entries(a))if(t.ref===n){var c;const n=t=>{t.bubbles&&t.stopPropagation(),s.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},r=t.refEvent??e;o.addEventListener(r,n),(c=o).$$proxyListeners??(c.$$proxyListeners=[]),o.$$proxyListeners.push([r,n])}}function Tn(e){const{ref:t,runtimeContext:n,element:r}=e;if(null==n||!n.tplStateStoreId||!t)return;const{hostBrick:o}=Me(n,"unbindTemplateProxy");o.tplHostMetadata.internalBricksByRef.delete(t);for(const[e,t]of r.$$proxyListeners??[])r.removeEventListener(e,t);delete r.$$proxyListeners}let On=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.PLACEHOLDER=3]="PLACEHOLDER",e}({});function Pn(e){e.replaceChildren()}function _n(e,t){window.DISABLE_REACT_FLUSH_SYNC=!1;let n=e.child;const r=[];for(;n;){if(n.tag===On.BRICK){var o;const s=n.type;s.includes("-")&&!customElements.get(s)&&console.error(`Undefined custom element: ${s}`),"basic-bricks.script-brick"===s&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");const i=t&&n===e.child?t:document.createElement(s);n.element=i,n.slotId&&i.setAttribute("slot",n.slotId),n.iid&&(i.dataset.iid=n.iid),null!==(o=n.tplHostMetadata)&&void 0!==o&&o.tplStateStoreId&&(i.dataset.tplStateStoreId=n.tplHostMetadata.tplStateStoreId),Ct(i,n.properties),on(i,n.events,n.runtimeContext),n.tplHostMetadata&&(i.$$tplStateStore=Me({tplStateStoreId:n.tplHostMetadata.tplStateStoreId,tplStateStoreMap:n.runtimeContext.tplStateStoreMap},"mount")),Rn(n),n.portal?r.push(i):n.return&&(n.return.childElements||(n.return.childElements=[]),n.return.childElements.push(i))}if(n.child)n=n.child;else if(n.sibling)n=n.sibling;else{var s;let e=n.return;for(;e;){var i;if(e.childElements)e.tag===On.ROOT?null===(i=e.container)||void 0===i||i.append(...e.childElements):e.element.append(...e.childElements),e.childElements=void 0;if(e.tag===On.ROOT&&r.length>0&&("function"==typeof e.createPortal?e.createPortal():e.createPortal).append(...r),e.sibling)break;e=e.return}n=null===(s=e)||void 0===s?void 0:s.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}const Mn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],xn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"];var Bn=new WeakMap,Ln=new WeakMap,$n=new WeakMap,Nn=new WeakMap,Un=new WeakMap,Fn=new WeakMap,jn=new WeakMap,Dn=new WeakMap,Kn=new WeakMap,Vn=new WeakSet;class Wn{constructor(e,t){(0,o.A)(this,Vn),(0,s.A)(this,"scope",void 0),(0,s.A)(this,"unknownBricks",void 0),(0,s.A)(this,"renderId",void 0),(0,i.A)(this,Bn,void 0),(0,i.A)(this,Ln,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,i.A)(this,$n,new Map),(0,i.A)(this,Nn,void 0),(0,i.A)(this,Un,new Map),(0,i.A)(this,Fn,void 0),(0,i.A)(this,jn,void 0),(0,i.A)(this,Dn,new WeakMap),(0,i.A)(this,Kn,new Map),this.scope=e,this.unknownBricks=(null==t?void 0:t.unknownBricks)??"throw",(0,c.A)(Bn,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,c.A)(jn,this,e)}memoizeMenuRequestNode(e,t){(0,l.A)(Dn,this).set(e,t)}getMenuRequests(){const e=[];let t=(0,l.A)(jn,this);for(;t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var n;t&&!t.sibling;)t=t.return;t=null===(n=t)||void 0===n?void 0:n.sibling}return e}async reMergeMenuRequestNodes(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,l.A)(Dn,this).get(t);(0,l.A)(Dn,this).set(t,n);let o,s=e.child;for(;s&&s!==r;)o=s,s=s.sibling;o?(o.sibling=n,n.sibling=null==r?void 0:r.sibling):e.child=n,await(0,l.A)(Bn,this).mergeMenus(this.getMenuRequests())}reBailout(e){return(0,l.A)(Bn,this).bailout(e)}reCatch(e,t){return(0,l.A)(Bn,this).catch(e,t)}async didPerformIncrementalRender(e,t){let n=!1;const r=[];for(const{parentRoutes:o,callback:s}of[...(0,l.A)(Kn,this).values()].reverse()){const i=o[o.length-1];if(r.includes(i))continue;const a=await s(e,t);a&&r.push(...o.slice(0,-1)),!1!==a&&(n=!0)}return n}performIncrementalRender(e,t,n){(0,l.A)(Kn,this).set(e,{parentRoutes:t,callback:n})}registerBrickLifeCycle(e,t){if(!t)return;const n=[...Mn,..."page"===this.scope?xn:[]];for(const r of n){const n=t[r];n&&(0,l.A)(Ln,this)[r].push({brick:e,handlers:n})}(0,g.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}registerArbitraryLifeCycle(e,t){const n=(0,l.A)(Un,this).get(e);n?n.add(t):(0,l.A)(Un,this).set(e,new Set([t]))}memoize(e,t,n,r){(0,l.A)(Fn,this)||(0,c.A)(Fn,this,new WeakMap);const o=[e??"",...t].join(".");let s=(0,l.A)(Fn,this).get(r);s||(s=new Map,(0,l.A)(Fn,this).set(r,s)),s.set(o,{node:n,last:Yn(n),lastNormal:Qn(n),lastPortal:Xn(n)})}reRender(e,t,n,r){const o=[e??"",...t].join("."),s=(0,l.A)(Fn,this).get(r).get(o),{node:i,last:c,lastNormal:u,lastPortal:d}=s;let p;const f=[];if((null==i?void 0:i.tag)===On.PLACEHOLDER){var h,m;p=(null===(h=function(e){return Jn(e,!0)}(i))||void 0===h?void 0:h.element)??null;const e=null===(m=function(e){return Zn(e,!0)}(i))||void 0===m?void 0:m.element;e&&f.push(e)}else{var g,v;p=(null==u||null===(g=u.element)||void 0===g?void 0:g.nextSibling)??null;let e=null==d||null===(v=d.element)||void 0===v?void 0:v.nextSibling;for(;e&&(f.push(e),e instanceof HTMLElement&&"DIV"===e.tagName);)e=e.nextSibling}const y=Yn(n);let w;s.node=n,s.last=y,s.lastNormal=Qn(n),s.lastPortal=Xn(n);let b=r.child;for(;b&&b!==c;){if(b.sibling===i){w=b;break}b=b.sibling}const E=document.createDocumentFragment(),S=document.createDocumentFragment(),A={tag:On.ROOT,container:E,createPortal:S,child:n};for(b=n;b;)b.return=A,b=b.sibling;const k=er(i,c);for((0,a.A)(Vn,this,Hn).call(this,k),_n(A),w?w.sibling=n:r.child=n,y&&(y.sibling=null==c?void 0:c.sibling),b=n;b;)b.return=r,b=b.sibling;var I,C;if(r.tag===On.ROOT?null===(I=r.container)||void 0===I||I.insertBefore(E,p):null===(C=r.element)||void 0===C||C.insertBefore(E,p),S.childNodes.length>0){var R;let e=n;for(;e&&e.return;)e=e.return;if((null===(R=e)||void 0===R?void 0:R.tag)!==On.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");const t="function"==typeof e.createPortal?e.createPortal():e.createPortal;let r=null;for(const e of f)if(t.contains(e)){r=e;break}t.insertBefore(S,r)}const T=er(n,y);(0,a.A)(Vn,this,zn).call(this,T)}dispose(){for(const e of Object.values((0,l.A)(Ln,this)))e.length=0;for(const e of(0,l.A)($n,this).values()){for(const t of e)t.disconnect();e.length=0}(0,l.A)($n,this).clear(),(0,l.A)(Nn,this)&&(Ee.removeEventListener("change",(0,l.A)(Nn,this)),(0,c.A)(Nn,this,void 0)),(0,c.A)(Fn,this,void 0),(0,l.A)(Un,this).clear(),(0,l.A)(Kn,this).clear(),(0,c.A)(Dn,this,void 0)}dispatchBeforePageLoad(){(0,a.A)(Vn,this,qn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){const e=new CustomEvent("page.load");(0,a.A)(Vn,this,qn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,a.A)(Vn,this,qn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,a.A)(Vn,this,qn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){const{hash:e}=C().location;e&&"#"!==e?(0,a.A)(Vn,this,qn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,a.A)(Vn,this,qn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(const{brick:e,handlers:t}of(0,l.A)(Ln,this).onScrollIntoView)(0,a.A)(Vn,this,Gn).call(this,e,t)}initializeMediaChange(){(0,c.A)(Nn,this,(e=>{(0,a.A)(Vn,this,qn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:q(e.detail)}))})),Ee.addEventListener("change",(0,l.A)(Nn,this))}initializeMessageDispatcher(){var e;for(const{brick:e,handlers:n}of(0,l.A)(Ln,this).onMessage)for(const r of[].concat(n)){var t;null==Yo||null===(t=Yo.messageDispatcher)||void 0===t||t.onMessage(r.channel,(t=>{un(r.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:t}))}))}null==Yo||null===(e=Yo.messageDispatcher)||void 0===e||e.onClose((()=>{(0,a.A)(Vn,this,qn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,a.A)(Vn,this,qn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,a.A)(Vn,this,qn).call(this,"onUnmount",new CustomEvent("unmount"))}}function Hn(e){const t=[...Mn,..."page"===this.scope?xn:[]],n=[];for(const r of t){const t=(0,g.remove)((0,l.A)(Ln,this)[r],(t=>e.has(t.brick)));"onUnmount"===r&&n.push(...t)}for(const t of e){var r,o;const e=(0,l.A)($n,this).get(t);if(null!=e&&e.length){for(const t of e)t.disconnect();e.length=0,(0,l.A)($n,this).delete(t)}Tn(t),null===(r=t.element)||void 0===r||delete r.$$tplStateStore,null===(o=t.element)||void 0===o||o.remove()}const s=new CustomEvent("unmount");for(const{brick:e,handlers:t}of n)un(t,e.runtimeContext,e)(s)}function zn(e){const t=new CustomEvent("mount");for(const{brick:n,handlers:r}of(0,l.A)(Ln,this).onMount)e.has(n)&&un(r,n.runtimeContext,n)(t);for(const{brick:t,handlers:n}of(0,l.A)(Ln,this).onScrollIntoView)e.has(t)&&(0,a.A)(Vn,this,Gn).call(this,t,n)}function qn(e,t){for(const{brick:n,handlers:r}of(0,l.A)(Ln,this)[e])un(r,n.runtimeContext,n)(t);const n=(0,l.A)(Un,this).get(e);if(n)for(const e of n)e()}function Gn(e,t){const n=t.threshold??.1,r=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(un(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});r.observe(e.element);let o=(0,l.A)($n,this).get(e);o||(o=[],(0,l.A)($n,this).set(e,o)),o.push(r)}function Yn(e){let t=e;for(;null!==(n=t)&&void 0!==n&&n.sibling;){var n;t=t.sibling}return t}function Qn(e){return Jn(e,!1)}function Jn(e,t){let n,r=e;for(;r;){if(r.tag===On.BRICK&&!r.portal){if(t)return r;n=r}r=r.sibling}return n}function Xn(e){return Zn(e,!1)}function Zn(e,t){let n,r=e;for(;r;){if(r.tag===On.BRICK&&r.portal){if(t)return r;n=r}if(r.child)r=r.child;else if(r.sibling)r=r.sibling;else{var o;let e=r.return;for(;e&&!e.sibling;)e=e.return;r=null===(o=e)||void 0===o?void 0:o.sibling}}return n}function er(e,t){const n=new Set;let r=e;for(;r;)if(r.tag===On.BRICK&&n.add(r),r.child)r=r.child;else{if(r===t)break;if(r.sibling)r=r.sibling;else{var o;let e=r.return;for(;e&&e!==t&&!e.sibling;)e=e.return;if(e===t)break;r=null===(o=e)||void 0===o?void 0:o.sibling}}return n}const tr=Symbol.for("root.runtimeContext");async function nr(e,t,n){var r,o;const[s,i,a]=Wr({...e[tr]??ss(),data:t,pendingPermissionsPreCheck:[]});s.tplStateStoreMap??(s.tplStateStoreMap=new Map),s.formStateStoreMap??(s.formStateStoreMap=new Map);const c=new Wn("fragment"),l={tag:On.ROOT,createPortal:null},u=e.transform,d=Re();u&&Te(d,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);const p=await Dr(l,d&&!n?e:{errorBoundary:n,...e,properties:{...e.properties,...u}},s,c,[],{}),f=[...i,...a];if(await Vr(p,s,f),(null===(r=p.node)||void 0===r?void 0:r.tag)===On.PLACEHOLDER)throw new Error("The root brick of useBrick cannot be an ignored control node");if(null!==(o=p.node)&&void 0!==o&&o.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return l.child=p.node,{tagName:p.node?p.node.type:null,renderRoot:l,rendererContext:c,scopedStores:f}}function rr(e,t){let n,{renderRoot:r,rendererContext:o,scopedStores:s}=e;r.createPortal=()=>{const e=document.querySelector("#portal-mount-point");return n=document.createElement("div"),e.appendChild(n),n},_n(r,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher();for(const e of s)e.mountAsyncData();return{portal:n}}function or(e,t){let{rendererContext:n}=e;t.portal&&(Pn(t.portal),t.portal.remove()),n.dispatchOnUnmount(),n.dispose()}function sr(e,t,n){if(n)throw new Error("Legacy doTransform does not support options in v3");return gt(t,{...ss(),data:e},{noInject:!0})}function ir(e,t){const n=is(e);Object.assign(n,{...t,meta:{...n.meta,...t.meta},$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1}),B(n)}function ar(e,t){const n=is(e);let r=!1;const o=e=>`${e.path}.${e.exact}`,s=(e,n)=>e.map((e=>{const i=o(e);return"routes"===e.type?(e.routes=s(e.routes,n),e):i===n?(r=!0,t):e}));n.routes=s(n.routes,o(t)),r||n.routes.unshift(t)}function cr(e,t,n){const r=`${e}.${t.name}`;_e.define(r,{bricks:t.bricks,proxy:t.proxy,state:t.state}),lr(e,t.name,n)}function lr(e,t,n){fr(e,`\${APP.homepage}/_dev_only_/template-preview/${t}`,[{brick:t,...(0,g.pick)(n,"properties","events","lifeCycle","context","slots","children")}])}function ur(e){return`\${APP.homepage}/_dev_only_/snippet-preview/${e}`}function dr(e,t){var n;fr(e,ur(t.snippetId),null!==(n=t.bricks)&&void 0!==n&&n.length?t.bricks:[{brick:"span"}],t.context)}const pr=dr;function fr(e,t,n,r){const{routes:o}=is(e),s=o.findIndex((e=>e.path===t)),i={path:t,bricks:n,context:r,menu:!1,exact:!0};-1===s?o.unshift(i):o.splice(s,1,i)}function hr(e,t){let{tplStateStoreId:n}=t;const r=ss();return n?Me({...r,tplStateStoreId:n},"STATE").getValue(e):r.ctxStore.getValue(e)}function mr(e){let{tplStateStoreId:t}=e;const n=ss();return t?Me({...n,tplStateStoreId:t},"STATE").getAllValues():n.ctxStore.getAllValues()}function gr(e){return rs().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function vr(e){return(0,d.loadBricksImperatively)(e,rs())}function yr(){return os()}async function wr(e,t){let{appId:n,updateStoryboardType:r,collectUsedContracts:o}=t;const s=is(n);let i;if("route"===r)i={routes:[e]};else if("template"===r)i={meta:{customTemplates:[e]}};else if("snippet"===r){var a;const t=ur(e.snippetId);i={routes:[null==s||null===(a=s.routes)||void 0===a?void 0:a.find((e=>e.path===t))]}}const c=[];return i&&o&&(await o(i)).forEach((e=>{var t;const[n,r,o]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=s&&null!==(t=s.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===r&&e.name===o))||c.push(e)})),c}async function br(e,t){let{tplStateStoreId:n}=t;const r={...ss(),tplStateStoreId:n};return e.resolve?tt(e.resolve,r,{cache:"reload"}):mt(e.value,r)}let Er;const Sr=[];function Ar(e){Er=e;const t=mr({tplStateStoreId:e.tplStateStoreId});Ir({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function kr(e){Sr.push(e)}function Ir(e){setTimeout((()=>{for(const t of Sr)try{t(e)}catch(t){console.error(`RealTimeDataInspectHook failed (${e.changeType}):`,t)}}))}const Cr=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Rr{constructor(e,t,n,r){(0,s.A)(this,"type",void 0),(0,s.A)(this,"data",new Map),(0,s.A)(this,"changeEventType",void 0),(0,s.A)(this,"pendingStack",[]),(0,s.A)(this,"hostBrick",void 0),(0,s.A)(this,"stateStoreId",void 0),(0,s.A)(this,"batchUpdate",!1),(0,s.A)(this,"batchUpdateContextsNames",[]),(0,s.A)(this,"rendererContext",void 0),(0,s.A)(this,"routeMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=n,this.stateStoreId=r}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{let[t,{value:n}]=e;return[t,n]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(Er){const{tplStateStoreId:n}=Er;(n?"STATE"===this.type&&this.stateStoreId===n:"CTX"===this.type)&&Ir({changeType:"update",tplStateStoreId:n,detail:{name:e,value:t}})}}getAffectListByContext(e){const t=[e];return this.data.forEach(((e,n)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(n)&&t.push(...this.getAffectListByContext(n))})),t.shift(),[...new Set(t)]}updateValues(e,t,n){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");const r={},o={},s=[];e.forEach((e=>{const{name:o,value:i}=n([e]),a=this.data.get(o);s.push(...this.getAffectListByContext(o)),a&&(r[o]=a),this.updateValue(o,i,t)})),s.filter((e=>!r[e])).forEach((e=>{const t=this.data.get(e);t&&(o[e]=t)}));const i=e=>{for(const n in e){var t;const r=e[n];null===(t=r.eventTarget)||void 0===t||t.dispatchEvent(new CustomEvent(this.changeEventType,{detail:r.value}))}};i(r),i(o),this.batchUpdate=!1}updateValue(e,t,n,r,o){const s=this.data.get(e);if(!s)throw new Error(`${this.type} '${e}' is not defined`);if("refresh"!==n&&"load"!==n)"replace"===n?s.value=t:(0,p.isObject)(s.value)?Object.assign(s.value,t):(console.warn(`Non-object current value of "${this.type}.${e}" for "context.assign", try "context.replace" instead.`),s.value=t),this.batchUpdate||s.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:s.value}));else{if(!s.useResolve)throw new Error(`You can not ${n} "${this.type}.${e}" which is not using resolve`);let i;"load"===n&&(s.loaded?i=Promise.resolve(s.value):s.loading&&(i=s.loading));const a=e=>{var t;let n;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(n=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&n!==os()};if(i||(i=s.loading=s.load({cache:"load"===n?"default":"reload",...t}),i.then((e=>{this.finishLoad(s,e)}),(e=>{!s.useResolve||a(e)||null!=r&&r.error||nn(e)}))),r){const e=In(r,o);i.then((t=>{e("success")({value:t}),e("finally")()}),(t=>{!a(t)&&r.error&&e("error")(t),e("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,n,r){if(Array.isArray(e)&&e.length>0){const o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX";const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",n=arguments.length>2?arguments[2]:void 0;const r=new Map;for(const o of e){const e=[o.if,o.value,o.resolve],s=(0,O.collectMemberUsage)(e,t);if(!n&&"STATE"===t){const t=(0,O.collectMemberUsage)(e,"TPL");for(const e of t.usedProperties)s.usedProperties.add(e);t.hasNonStaticUsage&&(s.hasNonStaticUsage=!0)}r.set(o,s)}return r}(e,n,arguments.length>3?arguments[3]:void 0),o=new Map;for(const e of Array.from(r.keys()).map((e=>e.name)))o.set(e,(o.get(e)??0)+1);const s=Array.from(r.values()).some((e=>e.hasNonStaticUsage)),i=new WeakSet,a=new Map,c=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,n)=>{a.set(e,{resolve:t,reject:n})}))]))),l=async e=>{i.add(e);const n=await t(e);r.delete(e);const s=o.get(e.name)??0;if(n){if(a.get(e.name).resolve(),o.delete(e.name),0===s)throw new Error(`Duplicated context defined: ${e.name}`)}else 1===s?(a.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,s-1);await d()};let u=s;async function d(){const e=Array.from(r.entries()).filter(function(e,t){return(n,r)=>t?0===r:![...n[1].usedProperties].some((t=>e.has(t)))}(o,u)).map((e=>e[0])).filter((e=>!i.has(e)));await Promise.all(e.map(l))}return{pendingResult:d().then((async()=>{r.size>0&&(function(e,t){const n=new Map(e),r=new Set(Array.from(n.keys()).map((e=>e.name))),o=()=>{let e=!1;for(const[t,o]of n.entries())[...o.usedProperties].some((e=>r.has(e)))||(n.delete(t),r.delete(t.name),e=!0);e&&o()};if(o(),n.size>0)throw new ReferenceError(`Circular ${t} detected: ${Array.from(n.keys()).map((e=>e.name)).join(", ")}`)}(r,n),u=!0,await d());for(const e of a.values())e.resolve()})).catch((e=>{for(const t of a.values())t.reject(e);throw e})),pendingContexts:c}}(e,(e=>this.resolve(e,t,n,r)),this.type,Re(t));this.pendingStack.push(o)}}onChange(e,t){var n;null===(n=this.data.get(e))||void 0===n||n.eventTarget.addEventListener(this.changeEventType,t)}async waitFor(e){for(const{pendingContexts:t}of this.pendingStack)await Promise.all([...e].map((e=>t.get(e))))}async waitForAll(){for(const{pendingContexts:e}of this.pendingStack)for(const t of e.values())t.catch((()=>{}));for(const{pendingResult:e}of this.pendingStack)await e}mountAsyncData(e){this.data.forEach((t=>{var n;if(t.async&&(!e||null!==(n=this.routeMap.get(e))&&void 0!==n&&n.has(t.name))){if(t.asyncMounted)return void console.error(`Async data "${t.name}" already mounted. This is a bug of Brick Next, please report it.`);t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}async resolve(e,t,n,r){if(!await wt(e,t))return!1;let o,s,i,a,c,l;if(n&&("STATE"===this.type?e.expose:"FORM_STATE"===this.type)&&(o=await kt(n,e.name)),void 0===o){if(e.resolve){const n=(0,p.hasOwnProperty)(e,"value");c=e.track&&n&&(0,p.hasOwnProperty)(e.resolve,"if")&&(0,O.strictCollectMemberUsage)(e.resolve.if,this.type).size>0;const r={transform:"value",...e.resolve};if(a=await wt(e.resolve,t),(a||c)&&(s=async e=>{var n;return(await tt(r,t,{...e,renderId:null===(n=this.rendererContext)||void 0===n?void 0:n.renderId})).value}),a)l=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager","eager"===l?o=await s():"async"===l&&(i=s());else if(!n)return!1}a&&"eager"===l||void 0===e.value||(o=await mt(e.value,t))}if(this.data.has(e.name))throw new Error(`${this.type} '${e.name}' has already been declared`);const u={name:e.name,value:o,eventTarget:new ye,useResolve:a,load:s,loaded:"eager"===l,loading:i,async:"async"===l,deps:[]};if("lazy"===l){const{trigger:t}=e.resolve;var d;t&&Cr.includes(t)&&(null===(d=this.rendererContext)||void 0===d||d.registerArbitraryLifeCycle(t,(()=>{this.updateValue(e.name,void 0,"load")})))}if(e.onChange&&u.eventTarget.addEventListener(this.changeEventType,un(e.onChange,t)),e.track){const n=(0,O.strictCollectMemberUsage)(c?[e.resolve,e.value]:s?e.resolve:e.value,this.type);!s&&(u.deps=[...n]);for(const r of n)this.onChange(r,this.batchAddListener((()=>{u.useResolve=c?bt(e.resolve,t):!!s,u.useResolve?this.updateValue(e.name,{cache:"default"},"refresh"):this.updateValue(e.name,gt(e.value,t),"replace")}),e))}if(u.eventTarget.addEventListener(this.changeEventType,(t=>{this.notifyRealTimeDataChange(e.name,t.detail)})),this.data.set(e.name,u),Array.isArray(r))for(const t of r){const n=this.routeMap.get(t);n?n.add(e.name):this.routeMap.set(t,new Set([e.name]))}return!0}disposeDataInRoutes(e){for(const t of e){const e=this.routeMap.get(t);if(void 0!==e)for(const t of e)this.data.delete(t)}}batchAddListener(e,t){return n=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(n)}}}function Tr(e,t,n){const{reversedProxies:r,asyncHostPropertyEntries:o,externalSlots:s,tplStateStoreId:i,hostBrick:a}=e;let c;if(t&&r){const i=r.properties.get(t);i&&(u=o,c=i.map((e=>{let{from:t,to:n}=e;const r=u.filter((e=>e[0]===t));if(r.length>0&&n.refProperty)return[n.refProperty,kt(r,t),!0]})).filter(Boolean));const d=r.slots.get(t);if(d&&s){const t=new Map;for(const{from:r,to:o}of d){var l;const i=(null===(l=s[r])||void 0===l?void 0:l.bricks)??[];if(!i.length)continue;const c=o.refSlot??r;let u=t.get(c);if(!u){u=[];const e=(0,p.hasOwnProperty)(n,c)?n[c].bricks.length+1:1;for(let t=0;t<e;t+=1)u.push([]);t.set(c,u)}const d=o.refPosition??-1,f=(0,p.hasOwnProperty)(a.runtimeContext,"forEachItem");u[(0,g.clamp)(d<0?u.length+d:d,0,u.length-1)].push(..."base-layout-v3.tpl-scroll-load-list"!==e.__temporary_tpl_tag_name&&"shrcb-homepage.tpl-custom-scroll-load-list"!==e.__temporary_tpl_tag_name||f?Or(i,f,a.runtimeContext.forEachItem,a.runtimeContext.forEachIndex):i)}for(const[e,r]of t.entries()){(0,p.hasOwnProperty)(n,e)||(n[e]={type:"bricks",bricks:[]});const t=n[e];t.bricks=r.flatMap(((e,n)=>n<t.bricks.length?e.concat(t.bricks[n]):e)),0===t.bricks.length&&delete n[e]}}}var u;return{[Nt]:c,[Ut]:i}}function Or(e,t,n,r){return e.map((e=>{let{children:o,slots:s,[Ft]:i,[jt]:a,[Dt]:c,...l}=e;return{...l,...t?{[Ft]:n,[jt]:r}:{[Dt]:!0},slots:":forEach"===l.brick?qr(o,s):Object.fromEntries(Object.entries(qr(o,s)??{}).map((e=>{let[o,s]=e;return[o,"routes"===s.type?{type:"routes",routes:Pr(s.routes,t,n,r)}:{type:"bricks",bricks:Or(s.bricks,t,n,r)}]})))}}))}function Pr(e,t,n,r){return e.map((e=>"routes"===e.type?{...e,routes:Pr(e.routes,t,n,r)}:"redirect"===e.type?e:{...e,bricks:Or(e.bricks,t,n,r)}))}function _r(e,t){function n(e){return(0,p.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(n):Object.fromEntries(Object.entries(e).map((e=>{let[t,o]=e;return(0,p.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(r)]:[t,r(o)]:[t,n(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function r(e){const{properties:o,slots:s,children:i,...a}=e,c=qr(i,s),l=Object.fromEntries(Object.entries(c??{}).map((e=>{let[t,n]=e;return[t,{type:"bricks",bricks:(n.bricks??[]).map(r)}]})));return{...a,properties:n(o),slots:l,...Tr(t,a.ref,l)}}return n(e)}function Mr(e,t,n,r,o){var s;const i=(0,g.uniqueId)("tpl-state-"),a={...n.runtimeContext,tplStateStoreId:i};delete a.forEachItem,delete a.forEachIndex,delete a.formStateStoreId;const c=new Rr("STATE",n,o,i);a.tplStateStoreMap.set(i,c),a.tplStateStoreScope&&a.tplStateStoreScope.push(c);const{bricks:l,proxy:u,state:d,contracts:p}=_e.get(e);null==Yo||null===(s=Yo.flowApi)||void 0===s||s.collectWidgetContract(p),c.define(d,a,r);const{slots:f,children:h,...m}=t,v={...m,brick:e};n.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:i,proxy:u};const y={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(const[e,t]of Object.entries(u.properties)){let n=y.properties.get(t.ref);n||(n=[],y.properties.set(t.ref,n)),n.push({from:e,to:t})}if(null!=u&&u.slots)for(const[e,t]of Object.entries(u.slots)){let n=y.slots.get(t.ref);n||(n=[],y.slots.set(t.ref,n)),n.push({from:e,to:t})}const w={reversedProxies:y,asyncHostPropertyEntries:r,externalSlots:qr(h,f),tplStateStoreId:i,hostBrick:n,__temporary_tpl_tag_name:e};return v.slots={"":{type:"bricks",bricks:l.map((e=>xr(e,w)))}},v}function xr(e,t){null===e.if&&delete e.if;const{properties:n,slots:r,children:o,...s}=e,i=qr(o,r),a=Object.fromEntries(Object.entries(i??{}).map((e=>{let[n,r]=e;return[n,{type:"bricks",bricks:(r.bricks??[]).map((e=>xr(e,t)))}]})));return{...s,properties:_r(n,t),slots:a,...Tr(t,s.ref,a)}}const Br="form-renderer.form-renderer",Lr=Symbol.for("form.stateStoreId"),$r=["forms.general-form","form.general-form","eo-form"];function Nr(e,t,n){const{id:r,bricks:o,events:s,context:i,mountPoint:a,instanceId:c}=e;let{brick:l,properties:u}=e;const d=t.find((e=>e.fieldId===r));if(d){const e=function(e){let t;const n={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},r=()=>{var t,n;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(n=e.limit)||void 0===n?void 0:n.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}}};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:{...n,...r()}};break;case"FLOAT":t={brick:"forms.general-input-number",properties:{...n,...r(),placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUM":t={brick:"forms.general-select",properties:{...n,...r(),options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUMS":t={brick:"forms.general-select",properties:{...n,...r(),mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:{...n,...r(),placeholder:e.description}};break;case"IP":t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}}};break;case"JSON":t={brick:"forms.general-textarea",properties:{...n}};break;case"ARRAY":t={brick:"forms.general-select",properties:{...n}};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:{...n,...r()}};break;default:t={brick:"forms.general-input",properties:{...n,...r(),placeholder:e.description}}}return t}(d);l||(l=e.brick),u={...e.properties,...u}}const f={brick:l,properties:u,iid:c,slot:a,events:s,context:i,children:Ur(o,t,n),[Lr]:n};return(0,p.hasOwnProperty)(e,"if")&&(f.if=e.if),f}function Ur(e,t,n){if(Array.isArray(e))return e.map((e=>Nr(e,t,n)))}async function Fr(e,t,n,r,o,s,i,a){const c=await async function(e,t){for(const n of e){if("string"!=typeof n.path)throw console.error("Invalid route with invalid path:",n),new Error("Invalid route with invalid type of path: "+typeof n.path);const e=$t(n,t.app.homepage,t.location.pathname);if(e&&await wt(n,t))return t.app.noAuthGuard||n.public||null==Yo||!Yo.auth||Yo.auth.isLoggedIn()?{match:e,route:n}:"unauthenticated"}return"missed"}(t,n),l={blockingList:[]},u=l.menuRequestNode={return:s};switch(c){case"missed":break;case"unauthenticated":l.unauthenticated=!0;break;default:{var p;const s=l.route=c.route;l.path=c.match.path;const f={...n,match:c.match};a&&f.ctxStore.disposeDataInRoutes(t);const h=o.concat(s);f.ctxStore.define(s.context,f,void 0,h),f.pendingPermissionsPreCheck.push(null==Yo||null===(p=Yo.checkPermissions)||void 0===p?void 0:p.preCheckPermissionsForBrickOrRoute(s,(e=>mt(e,f))));const{preLoadBricks:m}=s;if(Array.isArray(m)&&l.blockingList.push((0,d.loadBricksImperatively)(m,rs())),"redirect"===s.type){let e;if(e="string"==typeof s.redirect?await mt(s.redirect,f):(await tt({transform:"redirect",...s.redirect},f)).redirect,"string"!=typeof e)throw console.error("Unexpected redirect result:",e),new Error("Unexpected type of redirect result: "+typeof e);l.redirect={path:e}}else{const n=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return mt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(s.menu,f);let o;n&&(u.request=n),a||r.memoizeMenuRequestNode(t,u),o="routes"===s.type?await Fr(e,s.routes,f,r,h,u,i):await jr(e,s.bricks,f,r,h,u,i),Hr(l,o),zr(u,o.menuRequestNode)}}}return l}async function jr(e,t,n,r,o,s,i,a,c){!function(e,t,n){function r(e){if((0,p.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(r);else for(const[t,n]of Object.entries(e))(0,p.isObject)(n)&&"useBrick"===t?Array.isArray(n)?n.forEach((e=>o(e,!0))):o(n,!0,!0):r(n)}function o(e,s,i){if(s&&(e[tr]=t),r(e.properties),n&&!i)return;const a=qr(e.children,e.slots);for(const e of Object.values(a??{}))for(const t of e.bricks??[])o(t,s)}for(const t of e)o(t)}(t,n,!0);const l={blockingList:[]},u=c??[];return(await Promise.all(t.map(((t,c)=>Dr(e,t,n,r,o,s,i,u.concat(c),a&&new Map(a)))))).forEach(((t,n)=>{t.hasTrackingControls&&r.memoize(i,u.concat(n),t.node,e),Hr(l,t)})),l}async function Dr(e,t,n,r,o,s,i){let a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new Map;try{return await async function(e,t,n,r,o,s,i,a,c){var l,u;const f={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;const{if:h,permissionsPreCheck:m,...v}=t;if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):st(e)&&(0,T.isTrackAll)(it(e))}(h))return Dr(e,{brick:":if",dataSource:h,permissionsPreCheck:m,slots:{"":{type:"bricks",bricks:[v]}},...Object.getOwnPropertySymbols(t).reduce(((e,n)=>({...e,[n]:t[n]})),{})},n,r,o,s,i,a,c);const w=t[Ut],b=t[Lr],E={...n,tplStateStoreId:w,formStateStoreId:b};(0,p.hasOwnProperty)(t,Ft)?(E.forEachItem=t[Ft],E.forEachIndex=t[jt]):t[Dt]&&(delete E.forEachItem,delete E.forEachIndex);const{context:S}=t;if(Array.isArray(S)&&S.length>0){const e=Re(E);Te(e,"Defining context on bricks","check your brick:",t),e||E.ctxStore.define(S,E)}if(E.pendingPermissionsPreCheck.push(null==Yo||null===(l=Yo.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>mt(e,E)))),!await async function(e,t){return(0,p.isObject)(e.if)&&!st(e.if)?Et(await tt(e.if,t)):wt(e,t)}(t,E))return f;const A=t.brick;if(A.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error(`Unknown storyboard control node: "${e}"`)}(A);const{dataSource:n}=t,l=async l=>{var u;const d=await mt(n,l),f=":forEach"===A?"":":switch"===A?String(d):d?"":"else",h=qr(t.children,t.slots),m=h&&(0,p.hasOwnProperty)(h,f)&&(null===(u=h[f])||void 0===u?void 0:u.bricks);if(!Array.isArray(m))return{blockingList:[]};switch(A){case":forEach":return Array.isArray(d)?async function(e,t,n,r,o,s,i,a,c,l){const u={blockingList:[]},d=t.length,p=await Promise.all(t.map(((t,u)=>Promise.all(n.map(((n,p)=>Dr(e,n,{...r,forEachItem:t,forEachIndex:u},o,s,i,a,l.concat(u*d+p),c&&new Map(c))))))));return p.flat().forEach(((t,n)=>{t.hasTrackingControls&&o.memoize(a,l.concat(n),t.node,e),Hr(u,t)})),u}(e,d,m,l,r,o,s,i,c,a):{blockingList:[]};case":if":case":switch":return jr(e,m,l,r,o,s,i,c,a)}},u=async t=>{const n=await l(t);return n.node??(n.node={tag:On.PLACEHOLDER,return:e}),n},d=await u(E),{onMount:f,onUnmount:h}=t.lifeCycle??{},{contextNames:m,stateNames:v}=At(n);if(m||v){d.hasTrackingControls=!0;let t=0;const o=async()=>{const n=++t,[o,s,c]=Wr(E),l=await u(o),d=[...s,...c];if(await Vr(l,o,d),t===n){h&&un(h,E)(new CustomEvent("unmount",{detail:{rerender:!0}})),r.reRender(i,a,l.node,e),f&&un(f,o)(new CustomEvent("mount",{detail:{rerender:!0}}));for(const e of d)e.mountAsyncData()}},s=(0,g.debounce)(o);if(m)for(const e of m)E.ctxStore.onChange(e,s);if(v)for(const e of v)Me(E,"STATE",`: "${n}"`).onChange(e,s)}return f&&r.registerArbitraryLifeCycle("onMount",(()=>{un(f,E)(new CustomEvent("mount",{detail:{rerender:!1}}))})),h&&r.registerArbitraryLifeCycle("onUnmount",(()=>{un(h,E)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),d}/\.tpl-/.test(A)&&!_e.get(A)&&await Gr((0,d.loadBricksImperatively)([A],rs()),"brick",A,r.unknownBricks);const k=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){const n=`${t}.${e}`;if(_e.get(n))return n}return!!_e.get(e)&&e}(A,null===(u=E.app)||void 0===u?void 0:u.id);if(k){const e=c.get(k)??0;if(e>=10)throw new Error(`Maximum custom template stack overflowed: "${k}"`);c.set(k,e+1)}else A.includes("-")&&!customElements.get(A)&&(A===Br?customElements.define(Br,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):f.blockingList.push(Gr((0,d.enqueueStableLoadBricks)([A],rs()),"brick",A,r.unknownBricks)));let I,C;A===Br?({formData:I,...C}=t.properties??{}):C=t.properties;const R=[],P=function(e,t,n){return(0,p.isObject)(e)?Object.entries(e).map((e=>{let[r,o]=e;const{contextNames:s,stateNames:i,formStateNames:a}=At(o);return(s||i||a)&&n.push({contextNames:s,stateNames:i,formStateNames:a,propName:r,propValue:o}),[r,mt(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?pt.USE_BRICK:pt.INITIAL})]})):[]}(C,E,R),_=t[Nt];_&&P.push(..._);const M="script"===A;if(M||"link"===A){const e=await It(P);if(M?e.src:"stylesheet"===e.rel&&e.href){const t=window.PUBLIC_ROOT??"";if(M){const{src:n,...r}=e;await Gr((0,d.loadScript)(n,t,r),"script",n,"silent")}else{const{href:n,...r}=e;await Gr((0,d.loadStyle)(n,t,r),"stylesheet",n,"silent")}return f}}const x={tag:On.BRICK,type:k||A,return:e,slotId:i,events:t.events,runtimeContext:E,portal:t.portal,iid:t.iid,ref:t.ref};f.node=x;const B=(0,O.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);B.size>0&&f.blockingList.push(Gr((0,d.loadProcessorsImperatively)(B,rs()),"processors",[...B].join(", "),r.unknownBricks));const L=[];L.push((async()=>{x.properties=await It(P),function(e,t){for(const n of t){const t=()=>{e.element&&Rt(e.element,{[n.propName]:n.propValue},e.runtimeContext)};if(n.contextNames)for(const r of n.contextNames)e.runtimeContext.ctxStore.onChange(r,t);if(n.stateNames){const r=Me(e.runtimeContext,"STATE",`: "${n.propValue}"`);for(const e of n.stateNames)r.onChange(e,t)}if(n.formStateNames){const r=Ge(e.runtimeContext,"FORM_STATE",`: "${n.propValue}"`);for(const e of n.formStateNames)r.onChange(e,t)}}}(x,R)})()),r.registerBrickLifeCycle(x,t.lifeCycle);let $,N=t;k?N=Mr(k,t,x,P,r):A===Br&&(N=function(e,t,n,r,o){var s;const i="string"==typeof e?JSON.parse(e):e,a=(0,g.uniqueId)("form-state-"),c={...n.runtimeContext,formStateStoreId:a};delete c.forEachItem,delete c.forEachIndex,delete c.tplStateStoreId;const l=new Rr("FORM_STATE",void 0,o,a);c.formStateStoreMap.set(a,l),c.formStateStoreScope&&c.formStateStoreScope.push(l);const u=i.context??[];u.some((e=>"params"===e.name))||u.push({name:"params"}),l.define(u,c,r);const d=Nr(i.formSchema,i.fields,a);return $r.includes(d.brick)&&t.events&&(d.events=function(e,t){const n=e??{};for(const[e,r]of Object.entries(t))n[e]=(0,p.hasOwnProperty)(n,e)?[n[e],r].flat():r;return n}(d.events,t.events)),"boolean"!=typeof(null===(s=t.properties)||void 0===s?void 0:s.renderRoot)||t.properties.renderRoot?{...t,slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[d]}]}:{...t,slots:void 0,children:[d]}}(I,t,x,P,r)),N.portal&&(x.slotId=void 0),k?($={...E},delete $.forEachItem,delete $.forEachIndex):$=E;return L.push((async()=>{const e=qr(N.children,N.slots);if(!e)return;const t=new Map,n=await Promise.all(Object.entries(e).map(((e,n)=>{let[i,a]=e;if("routes"!==a.type)return jr(x,a.bricks,$,r,o,s,i,c);const l=o[o.length-1];return null!=l&&l.incrementalSubRoutes&&(t.set(n,i),r.performIncrementalRender(a,o,(async(e,t)=>{const{homepage:n}=$.app,{pathname:c}=e;if(!y(n,c)||!o.every((e=>{let r,o;return(r=$t(e,n,t.pathname))&&(o=$t(e,n,c))&&(e!==l||(0,g.isEqual)(r.params,o.params))})))return!1;const[u,d,p]=Wr({...$,location:e,query:new URLSearchParams(e.search)});let f,h=!1,m=[];try{if(f=await Fr(x,a.routes,u,r,o,s,i,!0),f.route){if(r.reBailout(f))return!0;m=[...d,...p],await Vr(f,u,[u.ctxStore,...m])}await r.reMergeMenuRequestNodes(s,a.routes,f.menuRequestNode)}catch(e){console.error("Incremental sub-router failed:",e);const t=r.reCatch(e,x);if(!t)return!0;({failed:h,output:f}=t),await r.reMergeMenuRequestNodes(s,a.routes,f.menuRequestNode)}if(r.reRender(i,[],f.node,x),!h){u.ctxStore.mountAsyncData(f.route);for(const e of m)e.mountAsyncData()}return!!f.route||null}))),Fr(x,a.routes,$,r,o,s,i)}))),i={...f,node:void 0,blockingList:[],menuRequestNode:void 0};n.forEach(((e,n)=>{t.has(n)&&r.memoize(t.get(n),[],e.node,x),Hr(i,e),function(e,t){const n=t.menuRequestNode;if(n)if(e.menuRequestNode){let t=e.menuRequestNode;for(;t.sibling;)t=t.sibling;t.sibling=n}else e.menuRequestNode=n}(i,e)})),i.node&&(x.child=i.node),Hr(f,{...i,node:void 0}),zr(s,f.menuRequestNode=i.menuRequestNode)})()),await Promise.all(L),f}(e,t,n,r,o,s,i,a,c)}catch(n){if(t.errorBoundary)return console.error("Error caught by error boundary:",n),{node:{tag:On.BRICK,type:"div",properties:{textContent:Jt(n),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:e},blockingList:[]};throw n}}function Kr(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function Vr(e,t,n){return(0,d.flushStableLoadBricks)(),Promise.all([...e.blockingList,...n.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function Wr(e){const t=[],n=[];return[{...e,tplStateStoreScope:t,formStateStoreScope:n},t,n]}function Hr(e,t){const{blockingList:n,node:r,menuRequestNode:o,hasTrackingControls:s,...i}=t;if(e.blockingList.push(...n),r)if(e.node){let t=e.node;for(;t.sibling;)t=t.sibling;t.sibling=r}else e.node=r;Object.assign(e,i)}function zr(e,t){if(t)if(e.child){let n=e.child;for(;n.sibling;)n=n.sibling;n.sibling=t}else e.child=t}function qr(e,t){let n=t;if(Array.isArray(e)&&!n){n={};for(const t of e){const e=t.slot??"";(0,p.hasOwnProperty)(n,e)||(n[e]={type:"bricks",bricks:[]}),n[e].bricks.push(t)}}return n}function Gr(e,t,n,r){return"silent"===r?e.catch((e=>{console.error('Load %s "%s" failed:',t,n,e)})):e}let Yr,Qr,Jr;function Xr(){if(!Yr){if(Yr={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){Yr.isInIframe=!0;try{if(window.origin===window.parent.origin){Yr.isInIframeOfSameSite=!0;const e="/next/"===m(),t=window.parent.location.pathname,n=t.startsWith("/next/");Yr.isInIframeOfNext=0==(Number(e)^Number(n)),Yr.isInIframeOfVisualBuilder=t.startsWith((n?"/next":"")+"/visual-builder/"),Yr.isInIframeOfLegacyConsole=e&&!n}}catch(e){}}Object.freeze(Yr)}return Yr}function Zr(e){var t;if(e.$$registerCustomTemplateProcessed)return;e.$$registerCustomTemplateProcessed=!0;const n=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(n))for(const t of n){const n=t.name.includes(".")?t.name:`${e.app.id}.${t.name}`;_e.define(n,t)}}function eo(e){let t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}const to="basic.show-watermark";var no=new WeakMap,ro=new WeakMap,oo=new WeakMap,so=new WeakMap,io=new WeakMap,ao=new WeakMap,co=new WeakMap,lo=new WeakMap,uo=new WeakMap,po=new WeakMap,fo=new WeakMap,ho=new WeakMap,mo=new WeakSet;class go{constructor(e){(0,o.A)(this,mo),(0,i.A)(this,no,void 0),(0,i.A)(this,ro,!1),(0,i.A)(this,oo,void 0),(0,i.A)(this,so,void 0),(0,i.A)(this,io,void 0),(0,i.A)(this,ao,void 0),(0,i.A)(this,co,new Set),(0,i.A)(this,lo,0),(0,i.A)(this,uo,void 0),(0,i.A)(this,po,void 0),(0,i.A)(this,fo,void 0),(0,i.A)(this,ho,void 0),(0,c.A)(no,this,e);const t=C();window.addEventListener("beforeunload",(e=>{(0,a.A)(mo,this,vo).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,a.A)(mo,this,vo).call(this,{location:e,action:t})))}getRenderId(){return(0,l.A)(uo,this)}getRuntimeContext(){return(0,l.A)(io,this)}getRecentApps(){return{currentApp:(0,l.A)(po,this),previousApp:(0,l.A)(fo,this)}}getNavConfig(){return(0,l.A)(ho,this)}bootstrap(){window.AbortController&&(Qr=new AbortController,R.http.interceptors.request.use((e=>{var t;return{...e,options:{...e.options,signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:Qr.signal}}})));const e=C();(0,c.A)(oo,this,e.location);let t=0;return e.listen((async(e,n)=>{var r,o,s,i;const u=++t;let d;const p={hash:void 0,state:void 0};var f;if(void 0!==e.key&&("POP"!==n||void 0!==(0,l.A)(oo,this).key&&!1!==(null===(r=(0,l.A)(oo,this).state)||void 0===r?void 0:r.notify))||(p.key=void 0),((0,h.locationsAreEqual)({...(0,l.A)(oo,this),...p},{...e,...p})||"POP"!==n&&!1===(null===(o=e.state)||void 0===o?void 0:o.notify))&&(d=!0),d||null!==(s=e.state)&&void 0!==s&&s.noIncremental||(d=await(null===(f=(0,l.A)(ao,this))||void 0===f?void 0:f.didPerformIncrementalRender(e,(0,l.A)(oo,this)))),t===u)if(d)(0,c.A)(oo,this,e);else{if(Qr&&(Qr.abort(),Qr=new AbortController),(0,c.A)(oo,this,e),null===(i=(0,l.A)(ao,this))||void 0===i||i.dispatchPageLeave(),"POP"===n&&w(v((0,l.A)(no,this),e.pathname)))return void window.location.reload();(0,l.A)(ro,this)?(0,c.A)(so,this,e):(V("locationChange"),(0,a.A)(mo,this,wo).call(this,e).catch(nn))}})),(0,a.A)(mo,this,wo).call(this,e.location)}}function vo(e){var t;const n=C(),r=n.getBlockMessage();null===(t=(0,l.A)(ao,this))||void 0===t||t.dispatchBeforePageLeave(e);const o=n.getBlockMessage();return!r&&o&&n.unblock(),o}function yo(e,t,n){var r,o;if((0,c.A)(lo,this,(r=(0,l.A)(lo,this),o=r++,r)),o>10){const t=`Infinite redirect detected: from "${n.pathname}${n.search}${n.hash}" to "${e}"`;throw new Error(t)}C().replace(e,t)}async function wo(e){(0,c.A)(ro,this,!0);try{await(0,a.A)(mo,this,bo).call(this,e)}finally{if((0,c.A)(ro,this,!1),(0,l.A)(so,this)){const e=(0,l.A)(so,this);(0,c.A)(so,this,void 0),await(0,a.A)(mo,this,wo).call(this,e)}}}async function bo(e){var t,n,r,o;const s=(0,c.A)(uo,this,(0,g.uniqueId)("render-id-"));Je=new WeakSet,et.clear(),null==Yo||null===(t=Yo.flowApi)||void 0===t||t.clearCollectWidgetContract(),C().unblock();const i=null==Yo||null===(n=Yo.pageView)||void 0===n?void 0:n.create(),u=v((0,l.A)(no,this),e.pathname),p=null===(r=(0,l.A)(io,this))||void 0===r?void 0:r.app,f=null==u||null===(o=u.app)||void 0===o?void 0:o.id;window.BOOTSTRAP_UNION_FILE&&f&&f!==(null==p?void 0:p.id)&&function(e){const{appId:t,version:n}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",n))}({appId:f,version:u.app.currentVersion}),null!=u&&u.app&&await async function(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=async function(e){var t;await(null==Yo||null===(t=Yo.fulfilStoryboard)||void 0===t?void 0:t.call(Yo,e)),B(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}(e)),e.$$fulfilling}(u);const h=(0,c.A)(po,this,null==u?void 0:u.app);!function(){var e,t,n,r,o;const s=Jo().getFeatureFlags(),i=Jo().getMiscSettings();if(!s["show-watermark"])return;const a="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),c=(null==Yo||null===(n=Yo.auth)||void 0===n||null===(n=n.getAuth())||void 0===n?void 0:n.username)??"",l=i.watermarkConfig??{flags:{}},u={content:[..."string"==typeof l.content?[l.content]:l.content??[],null!==(r=l.flags)&&void 0!==r&&r["show-development"]&&a?"Development":"",null!==(o=l.flags)&&void 0!==o&&o["show-user"]?c:""].filter(Boolean),zIndex:1001,width:200,font:{fontSize:28},gap:[190,190],...(0,g.omit)(l,["content","flags"])};Jr?Jr.resolve(u):(0,d.loadBricksImperatively)([to],rs()).then((()=>{Jr=document.createElement(to),Jr.resolve(u)}),(e=>{console.error("Load watermark service failed:",e)}))}();const m=p&&h?p.id!==h.id:p!==h,y=Jo().getFeatureFlags(),w=(0,l.A)(ao,this),b=(t,n)=>{null==i||i({status:"redirected"}),(0,l.A)(co,this).add(w),(0,a.A)(mo,this,yo).call(this,t,n,e)},E=()=>{const t=y["sso-enabled"]?"/sso-auth/login":"/auth/login";Qt(e),b(t,{from:e})},S=document.querySelector("#main-mount-point"),A=document.querySelector("#portal-mount-point"),k={tag:On.ROOT,container:S,createPortal:A},I=()=>{var e;Pn(S),Pn(A),(0,l.A)(co,this).add(w);for(const e of(0,l.A)(co,this))e&&(e.dispatchOnUnmount(),e.dispose());(0,l.A)(co,this).clear(),null==Yo||null===(e=Yo.messageDispatcher)||void 0===e||e.reset(),m&&((0,c.A)(fo,this,p),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:p,currentApp:h}})))};if(X(h&&(re()[h.id]||h.theme)||"light"),se("default"),h){var T,O,P,_,M,x;null==Yo||null===(T=Yo.checkInstalledApps)||void 0===T||T.preCheckInstalledApps(u,(e=>!!as(e)));const t={bailout:e=>e.unauthenticated?(E(),!0):e.redirect?(b(e.redirect.path,e.redirect.state),!0):void(0,c.A)(lo,this,0),mergeMenus:async e=>{const t=await Promise.all(e);(0,c.A)(ho,this,function(e){const t={breadcrumb:[]};for(const n of e){const{breadcrumb:e}=n;e&&(e.overwrite?t.breadcrumb=e.items:t.breadcrumb.push(...e.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,l.A)(ho,this)}))},catch:(t,n)=>{if(!Xt(t)||window.NO_AUTH_GUARD){if(!(t instanceof R.HttpAbortError)){const r=Jo().getMiscSettings().noAuthGuardLoginPath;return Xt(t)&&r?void b(r,{from:e}):{failed:!0,output:{node:{tag:On.BRICK,type:"div",properties:{textContent:Jt(t),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:n},blockingList:[]}}}(0,l.A)(co,this).add(w)}else E()}},n=(0,c.A)(ao,this,new Wn("page",{routeHelper:t,renderId:s})),r=(0,c.A)(io,this,{app:h,location:e,query:new URLSearchParams(e.search),flags:y,sys:{...null==Yo||null===(O=Yo.auth)||void 0===O?void 0:O.getAuth(),...Xr(),settings:{brand:Jo().getBrandSettings()}},ctxStore:new Rr("CTX",void 0,n),pendingPermissionsPreCheck:[null==Yo||null===(P=Yo.checkPermissions)||void 0===P?void 0:P.preCheckPermissions(u)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,c.A)(ho,this,void 0),Zr(u),me(null===(_=u.meta)||void 0===_?void 0:_.functions,h),null==Yo||null===(M=Yo.flowApi)||void 0===M||M.collectContract(null===(x=u.meta)||void 0===x?void 0:x.contracts);let o,a=!1,d=[];try{const e={};if(o=await Fr(k,function(e){if(window.parent===window)return e;let t=e;const n=(0,g.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)];const r=(0,g.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)],t}(u.routes),r,n,[],e),t.bailout(o))return;d=Kr(r),await Vr(o,r,d),e.child=o.menuRequestNode,n.setInitialMenuRequestNode(e),await t.mergeMenus(n.getMenuRequests())}catch(e){console.error("Router failed:",e);const n=t.catch(e,k);if(!n)return;({failed:a,output:o}=n)}if(k.child=o.node,I(),o.route&&"routes"!==o.route.type||a){if(a||n.dispatchBeforePageLoad(),te(),ae(),eo(null==h?void 0:h.uiVersion),_n(k),window.scrollTo(0,0),a)null==i||i({status:"failed"});else{n.dispatchPageLoad(),n.dispatchAnchorLoad(),n.dispatchOnMount(),n.initializeScrollIntoView(),n.initializeMediaChange(),n.initializeMessageDispatcher();for(const e of d)e.mountAsyncData();null==i||i({status:"ok",path:o.path,pageTitle:document.title})}return void V("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=Yo&&Yo.auth&&!Yo.auth.isLoggedIn())return void E();I()}te(),ae();const L={tag:On.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:k};k.child=L,_n(k),window.scrollTo(0,0),null==i||i({status:"not-found"}),V("rendered")}const Eo="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;var So=n(4579),Ao=n(4501),ko=2,Io=.16,Co=.05,Ro=.05,To=.15,Oo=5,Po=4,_o=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Mo(e){var t=e.r,n=e.g,r=e.b,o=(0,So.wE)(t,n,r);return{h:360*o.h,s:o.s,v:o.v}}function xo(e){var t=e.r,n=e.g,r=e.b;return"#".concat((0,So.Ob)(t,n,r,!1))}function Bo(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-ko*t:Math.round(e.h)+ko*t:n?Math.round(e.h)+ko*t:Math.round(e.h)-ko*t)<0?r+=360:r>=360&&(r-=360),r}function Lo(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-Io*t:t===Po?e.s+Io:e.s+Co*t)>1&&(r=1),n&&t===Oo&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function $o(e,t,n){var r;return(r=n?e.v+Ro*t:e.v-To*t)>1&&(r=1),Number(r.toFixed(2))}function No(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,Ao.RO)(e),o=Oo;o>0;o-=1){var s=Mo(r),i=xo((0,Ao.RO)({h:Bo(s,o,!0),s:Lo(s,o,!0),v:$o(s,o,!0)}));n.push(i)}n.push(xo(r));for(var a=1;a<=Po;a+=1){var c=Mo(r),l=xo((0,Ao.RO)({h:Bo(c,a),s:Lo(c,a),v:$o(c,a)}));n.push(l)}return"dark"===t.theme?_o.map((function(e){var r,o,s,i=e.index,a=e.opacity;return xo((r=(0,Ao.RO)(t.backgroundColor||"#141414"),s=100*a/100,{r:((o=(0,Ao.RO)(n[i])).r-r.r)*s+r.r,g:(o.g-r.g)*s+r.g,b:(o.b-r.b)*s+r.b}))})):n}var Uo={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Fo={},jo={};function Do(e){return':root,\n[data-override-theme="light"] {\n'.concat(e,"}")}function Ko(e){return'html[data-theme="dark-v2"],\n[data-override-theme="dark-v2"] {\n'.concat(e,"}")}function Vo(e){return e.match(/[0-9a-fA-F]{2}/g).map((e=>parseInt(e,16))).join(", ")}function Wo(e,t,n){return"dark"===t?No(e,{theme:t,backgroundColor:n})[5]:e}function Ho(e){const t=[];if(["light","dark"].forEach((n=>{if(e[n])switch(e.type){case"brandColor":t.push(function(e,t){return("dark"===e?Ko:Do)("string"==typeof(n=t)?" --color-brand: ".concat(n,";\n"):[" --color-brand: ".concat(n.default,";")," --color-brand-hover: ".concat(n.hover,";")," --color-brand-active: ".concat(n.active,";"),""].join("\n"));var n}(n,e[n]));break;case"baseColors":t.push(function(e,t,n){return("dark"===e?Ko:Do)("".concat(function(e,t){return Object.entries(e).flatMap((e=>{var[n,r]=e;return function(e){if(!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid base color name: ".concat(JSON.stringify(e)))}(n),r.map(((e,r)=>[" --palette-".concat(n,"-").concat(r+1,"-channel: ").concat(Vo(e),";")].concat("dark"===t?[]:" --palette-".concat(n,"-").concat(r+1,": rgb(var(--palette-").concat(n,"-").concat(r+1,"-channel));")).join("\n"))).concat("")})).join("\n")}(function(e,t,n){return Object.fromEntries(Object.entries(e).map((e=>{var[r,o]=e;return[r,No(o,"dark"===t?{theme:t,backgroundColor:n}:void 0)]})))}(t,e,n),e),"\n").concat(function(e,t,n){return Object.entries({green:"green",red:"red",blue:"blue",orange:"orange",cyan:"cyan",purple:"purple",geekblue:"indigo"}).flatMap((r=>{var[o,s]=r;return[" --theme-".concat(o,"-color-rgb-channel: ").concat(Vo(Wo(t[s],e,n)),";"),..."dark"===e?[]:[" --theme-".concat(o,"-color: var(--palette-").concat(s,"-6);")," --theme-".concat(o,"-border-color: var(--palette-").concat(s,"-3);")]," --theme-".concat(o,"-background: var(--palette-").concat(s,"-").concat("dark"===e?2:1,");"),""]})).join("\n")}(e,t,n)))}(n,e[n],e.backgroundColor));break;case"variables":t.push(function(e,t){return("dark"===e?Ko:Do)(function(e){return Object.entries(e).map((e=>{var[t,n]=e;return function(e){if(!/^--[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid css variable name: ".concat(JSON.stringify(e)))}(t)," ".concat(t,": ").concat(n,";")})).concat("").join("\n")}(t))}(n,e[n]))}})),t.length>0){const e=document.createElement("style");return e.textContent=t.join("\n\n"),document.head.appendChild(e),()=>{e.remove()}}}let zo,qo,Go,Yo;function Qo(e){if(zo)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{let{data:t}=e;if((null==t?void 0:t.source)!==U)return;const n=t.payload;switch(null==n?void 0:n.type){case F:K=n.active;break;case j:D=n.panel}})),Yo=null==e?void 0:e.hooks,(0,u.initializeI18n)(zt,qt),f.locale(u.i18n.language),u.i18n.on("languageChanged",(()=>{f.locale(u.i18n.language)})),I(),zo=new ts,zo}Object.keys(Uo).forEach((function(e){Fo[e]=No(Uo[e]),Fo[e].primary=Fo[e][5],jo[e]=No(Uo[e],{theme:"dark",backgroundColor:"#141414"}),jo[e].primary=jo[e][5]})),Fo.red,Fo.volcano,Fo.gold,Fo.orange,Fo.yellow,Fo.lime,Fo.green,Fo.cyan,Fo.blue,Fo.geekblue,Fo.purple,Fo.magenta,Fo.grey;const Jo=function(){const e=k();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return zo};var Xo=new WeakMap,Zo=new WeakMap,es=new WeakSet;class ts{constructor(){(0,o.A)(this,es),(0,i.A)(this,Xo,!1),(0,i.A)(this,Zo,!1),(0,s.A)(this,"version",3)}initialize(e){var t;if((0,l.A)(Xo,this))throw new Error("The runtime cannot be initialized more than once");(0,c.A)(Xo,this,!0),function(e){(0,p.isObject)(e.settings)&&(0,p.deepFreeze)(e.settings),e.brickPackages&&(0,p.deepFreeze)(e.brickPackages)}(e),qo=e;const{notification:n,dialog:r}=(0,a.A)(es,this,ns).call(this);var o;!1!==n&&(o=n??"basic.show-notification",(0,this.loadBricks)([o]).then((()=>{en=document.createElement(o)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==r&&function(e,t){t([e]).then((()=>{Gt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(r??"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?Ho({type:"brandColor",...e.brandColor}):e.baseColors?Ho({type:"baseColors",...e.baseColors}):e.variables&&Ho({type:"variables",...e.variables}))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}async bootstrap(e){if(e&&this.initialize(e),(0,l.A)(Zo,this))throw new Error("The runtime cannot be bootstrapped more than once");(0,c.A)(Zo,this,!0),Go=new go(qo.storyboards),await Go.bootstrap()}getRecentApps(){var e;return(null===(e=Go)||void 0===e?void 0:e.getRecentApps())??{}}getCurrentApp(){var e;return null===(e=Go)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return qe(e,t)}getFeatureFlags(){var e,t;return{...null===(e=qo)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags,...null===(t=Go)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags,"migrate-to-brick-next-v3":!0}}getMiscSettings(){var e,t;return{...null===(e=qo)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc,...null===(t=Go)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc}}getBrandSettings(){var e;return{base_title:"DevOps 管理专家",...null===(e=qo)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand}}getLaunchpadSettings(){var e;return{columns:7,rows:4,...null===(e=qo)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad}}getDesktops(){var e;return(null===(e=qo)||void 0===e?void 0:e.desktops)??[]}getLaunchpadSiteMap(){var e;return(null===(e=qo)||void 0===e?void 0:e.siteSort)??[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){const t=this.getBrandSettings().base_title;document.title=e?`${e} - ${t}`:t}getNavConfig(){var e;return null===(e=Go)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,d.loadBricksImperatively)(e,rs())}}function ns(){var e;return(null===(e=qo)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.presetBricks)??{}}function rs(){var e;return function(e,t){if(null==t||!t.length)return e;const n=new Map;return[...e,...t].forEach((e=>{const t=e.filePath.split("/")[1];n.set(t,e)})),Array.from(n.values())}(null===(e=qo)||void 0===e?void 0:e.brickPackages,window.PUBLIC_DEPS)??Eo??window.STANDALONE_BRICK_PACKAGES??[]}function os(){var e;return null===(e=Go)||void 0===e?void 0:e.getRenderId()}function ss(){var e;return null===(e=Go)||void 0===e?void 0:e.getRuntimeContext()}function is(e){var t;return null===(t=qo)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function as(e){var t;return null===(t=is(e))||void 0===t?void 0:t.app}function cs(){for(var e,t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==Yo||null===(e=Yo.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...r)}function ls(){var e;return null==Yo||null===(e=Yo.auth)||void 0===e?void 0:e.getAuth()}function us(){var e,t;return null==Yo||null===(e=Yo.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function ds(){var e;return null==Yo||null===(e=Yo.auth)||void 0===e?void 0:e.isLoggedIn()}async function ps(e,t,n){return nt(await Qe(e),e,"resolve",t,n)}function fs(e){let t,{portal:n,scope:r="fragment",unknownBricks:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=n;t=n||(()=>(s=document.createElement("div"),s.style.position="absolute",s.style.width=s.style.height="0",document.body.append(s),s));let i,a,c=!1;return{async render(n){let{theme:l,uiVersion:u,context:d,functions:p,templates:f,i18n:h,url:m,app:v}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");const y=[].concat(n),w=i,b=(0,g.uniqueId)("render-id-");i=new Wn(r,{unknownBricks:o,renderId:b});const E={ctxStore:new Rr("CTX",void 0,i),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map};if(m){const e=new URL(m);E.query=e.searchParams,E.location={pathname:e.pathname,search:e.search,hash:e.hash,state:void 0}}const S={tag:On.ROOT,container:e,createPortal:t};if("page"===r){var A;X(l??"light"),se("default"),eo(u),v??(v={id:"demo",homepage:"/demo"}),E.app=v;const e={app:v,meta:{i18n:h,customTemplates:f}};null===(A=a)||void 0===A||A(),a=B(e),Zr(e),me(p,v)}E.ctxStore.define(d,E);let k,I=!1,C=[];try{k=await jr(S,y,E,i,[],{}),C=Kr(E),await Vr(k,E,C)}catch(e){I=!0,k={node:{tag:On.BRICK,type:"div",properties:{textContent:Jt(e),dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},return:S,runtimeContext:null},blockingList:[]}}if(S.child=k.node,null==w||w.dispatchOnUnmount(),null==w||w.dispose(),Pn(e),s&&Pn(s),"page"===r&&(I||i.dispatchBeforePageLoad(),te(),ae()),_n(S),"page"===r&&window.scrollTo(0,0),!I){for(const e of C)e.mountAsyncData();"page"===r&&i.dispatchPageLoad(),i.dispatchOnMount(),i.initializeScrollIntoView(),i.initializeMediaChange(),i.initializeMessageDispatcher()}},unmount(){c||(c=!0,Pn(e),s&&(Pn(s),n||s.remove()))}}}function hs(e){let{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...ss()};t&&(n.query=new URLSearchParams(C().location.search));const r=t=>{if("string"==typeof t){if((0,T.isEvaluable)(t)){const e=ut(t,n);return Xe(e),e}return(0,P.inject)(t,n)}return!(0,p.isObject)(t)||Ze(e)?t:Array.isArray(t)?t.map((e=>r(e))):Object.fromEntries(Object.entries(t).map((e=>{let[t,n]=e;return[r(t),r(n)]})))};return r(e)}}}]);
3
+ //# sourceMappingURL=4984.1d2ce9d6.js.map
@@ -0,0 +1 @@
1
+ /*! (c) Andrea Giammarchi - ISC */