@next-bricks/form 0.10.0 → 0.11.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 (126) hide show
  1. package/dist/bricks.json +94 -29
  2. package/dist/chunks/{1646.2e22b34e.js → 1646.347069fc.js} +2 -2
  3. package/dist/chunks/{1646.2e22b34e.js.map → 1646.347069fc.js.map} +1 -1
  4. package/dist/chunks/{2179.3b96e562.js → 2179.de225eab.js} +2 -2
  5. package/dist/chunks/{6205.61d1edba.js.map → 2179.de225eab.js.map} +1 -1
  6. package/dist/chunks/{3458.9dcdd5bd.js → 3458.2f4a8822.js} +2 -2
  7. package/dist/chunks/{3458.9dcdd5bd.js.map → 3458.2f4a8822.js.map} +1 -1
  8. package/dist/chunks/{3494.f3053c2d.js → 3494.b32e021c.js} +2 -2
  9. package/dist/chunks/{3494.f3053c2d.js.map → 3494.b32e021c.js.map} +1 -1
  10. package/dist/chunks/{4049.6b24a76c.js → 4049.20ecc118.js} +2 -2
  11. package/dist/chunks/{4049.6b24a76c.js.map → 4049.20ecc118.js.map} +1 -1
  12. package/dist/chunks/4131.da9663d6.js +2 -0
  13. package/dist/chunks/4131.da9663d6.js.map +1 -0
  14. package/dist/chunks/{5725.24821b6b.js → 5725.f7227cdf.js} +2 -2
  15. package/dist/chunks/{5725.24821b6b.js.map → 5725.f7227cdf.js.map} +1 -1
  16. package/dist/chunks/{6205.61d1edba.js → 6205.a473c35c.js} +2 -2
  17. package/dist/chunks/{7164.af951c22.js.map → 6205.a473c35c.js.map} +1 -1
  18. package/dist/chunks/{6473.0f2dffe6.js → 6473.f19f32d6.js} +2 -2
  19. package/dist/chunks/{6473.0f2dffe6.js.map → 6473.f19f32d6.js.map} +1 -1
  20. package/dist/chunks/{7164.af951c22.js → 7164.7de667b9.js} +2 -2
  21. package/dist/chunks/{2179.3b96e562.js.map → 7164.7de667b9.js.map} +1 -1
  22. package/dist/chunks/{7672.2ce388a3.js → 7672.9894d92e.js} +2 -2
  23. package/dist/chunks/{7672.2ce388a3.js.map → 7672.9894d92e.js.map} +1 -1
  24. package/dist/chunks/{7746.bea0a826.js → 7746.a5009cba.js} +2 -2
  25. package/dist/chunks/{7746.bea0a826.js.map → 7746.a5009cba.js.map} +1 -1
  26. package/dist/chunks/{7822.efc389c2.js → 7822.4154a218.js} +2 -2
  27. package/dist/chunks/{7822.efc389c2.js.map → 7822.4154a218.js.map} +1 -1
  28. package/dist/chunks/{8691.e0110b53.js → 8691.88d4f17c.js} +2 -2
  29. package/dist/chunks/{8691.e0110b53.js.map → 8691.88d4f17c.js.map} +1 -1
  30. package/dist/chunks/{9223.29f17ea0.js → 9223.f5fd0ea1.js} +2 -2
  31. package/dist/chunks/{9223.29f17ea0.js.map → 9223.f5fd0ea1.js.map} +1 -1
  32. package/dist/chunks/9986.bb3def3f.js +2 -0
  33. package/dist/chunks/9986.bb3def3f.js.map +1 -0
  34. package/dist/chunks/code-editor.e3690b47.js +2 -0
  35. package/dist/chunks/{code-editor.ab59db44.js.map → code-editor.e3690b47.js.map} +1 -1
  36. package/dist/chunks/eo-checkbox.c5010723.js +3 -0
  37. package/dist/chunks/eo-checkbox.c5010723.js.map +1 -0
  38. package/dist/chunks/eo-dynamic-form-item.68db88eb.js +2 -0
  39. package/dist/chunks/eo-dynamic-form-item.68db88eb.js.map +1 -0
  40. package/dist/chunks/eo-form-item.c1d92c43.js +3 -0
  41. package/dist/chunks/eo-form-item.c1d92c43.js.map +1 -0
  42. package/dist/chunks/eo-form.dfefdd7d.js +2 -0
  43. package/dist/chunks/eo-form.dfefdd7d.js.map +1 -0
  44. package/dist/chunks/eo-icon-select.821c7b62.js +3 -0
  45. package/dist/chunks/eo-icon-select.821c7b62.js.map +1 -0
  46. package/dist/chunks/eo-input.c2f5375e.js +3 -0
  47. package/dist/chunks/eo-input.c2f5375e.js.map +1 -0
  48. package/dist/chunks/eo-radio.3c54b91c.js +3 -0
  49. package/dist/chunks/eo-radio.3c54b91c.js.map +1 -0
  50. package/dist/chunks/eo-search.519fbec4.js +3 -0
  51. package/dist/chunks/eo-search.519fbec4.js.map +1 -0
  52. package/dist/chunks/eo-select.5abf2d64.js +3 -0
  53. package/dist/chunks/eo-select.5abf2d64.js.map +1 -0
  54. package/dist/chunks/eo-submit-buttons.03d2dfae.js +2 -0
  55. package/dist/chunks/eo-submit-buttons.03d2dfae.js.map +1 -0
  56. package/dist/chunks/{general-switch.52b1f463.js → eo-switch.a80fc9a7.js} +3 -3
  57. package/dist/chunks/eo-switch.a80fc9a7.js.map +1 -0
  58. package/dist/chunks/eo-textarea.7e65b425.js +3 -0
  59. package/dist/chunks/eo-textarea.7e65b425.js.map +1 -0
  60. package/dist/chunks/eo-upload-image.8c7d6541.js +3 -0
  61. package/dist/chunks/eo-upload-image.8c7d6541.js.map +1 -0
  62. package/dist/chunks/main.3c473511.js +2 -0
  63. package/dist/chunks/{main.429f5ca0.js.map → main.3c473511.js.map} +1 -1
  64. package/dist/index.07479137.js +2 -0
  65. package/dist/index.07479137.js.map +1 -0
  66. package/dist/manifest.json +64 -54
  67. package/dist/types.json +13 -13
  68. package/dist-types/dynamic-form-item/index.d.ts +1 -5
  69. package/dist-types/form-item/index.d.ts +10 -84
  70. package/dist-types/general-switch/index.d.ts +1 -1
  71. package/docs/{general-checkbox.md → eo-checkbox.md} +12 -12
  72. package/docs/{dynamic-form-item.md → eo-dynamic-form-item.md} +12 -12
  73. package/docs/{general-form.md → eo-form.md} +30 -30
  74. package/docs/{icon-select.md → eo-icon-select.md} +1 -1
  75. package/docs/{general-input.md → eo-input.md} +22 -22
  76. package/docs/{general-radio.md → eo-radio.md} +18 -18
  77. package/docs/{general-search.md → eo-search.md} +1 -1
  78. package/docs/{general-select.md → eo-select.md} +14 -14
  79. package/docs/{submit-buttons.md → eo-submit-buttons.md} +8 -8
  80. package/docs/{general-switch.md → eo-switch.md} +6 -6
  81. package/docs/{general-textarea.md → eo-textarea.md} +13 -13
  82. package/docs/{upload-image.md → eo-upload-image.md} +1 -1
  83. package/package.json +4 -4
  84. package/dist/chunks/4131.e68c1d31.js +0 -2
  85. package/dist/chunks/4131.e68c1d31.js.map +0 -1
  86. package/dist/chunks/9986.a3067e83.js +0 -2
  87. package/dist/chunks/9986.a3067e83.js.map +0 -1
  88. package/dist/chunks/code-editor.ab59db44.js +0 -2
  89. package/dist/chunks/dynamic-form-item.204dc28d.js +0 -2
  90. package/dist/chunks/dynamic-form-item.204dc28d.js.map +0 -1
  91. package/dist/chunks/general-checkbox.84f9001b.js +0 -3
  92. package/dist/chunks/general-checkbox.84f9001b.js.map +0 -1
  93. package/dist/chunks/general-form-item.cde675b2.js +0 -3
  94. package/dist/chunks/general-form-item.cde675b2.js.map +0 -1
  95. package/dist/chunks/general-form.e08ecd73.js +0 -2
  96. package/dist/chunks/general-form.e08ecd73.js.map +0 -1
  97. package/dist/chunks/general-input.bcc459ab.js +0 -3
  98. package/dist/chunks/general-input.bcc459ab.js.map +0 -1
  99. package/dist/chunks/general-radio.0162ab98.js +0 -3
  100. package/dist/chunks/general-radio.0162ab98.js.map +0 -1
  101. package/dist/chunks/general-search.a34e9638.js +0 -3
  102. package/dist/chunks/general-search.a34e9638.js.map +0 -1
  103. package/dist/chunks/general-select.f1a3569d.js +0 -3
  104. package/dist/chunks/general-select.f1a3569d.js.map +0 -1
  105. package/dist/chunks/general-switch.52b1f463.js.map +0 -1
  106. package/dist/chunks/general-textarea.d8af5d8d.js +0 -3
  107. package/dist/chunks/general-textarea.d8af5d8d.js.map +0 -1
  108. package/dist/chunks/icon-select.cdef684a.js +0 -3
  109. package/dist/chunks/icon-select.cdef684a.js.map +0 -1
  110. package/dist/chunks/main.429f5ca0.js +0 -2
  111. package/dist/chunks/submit-buttons.83395796.js +0 -2
  112. package/dist/chunks/submit-buttons.83395796.js.map +0 -1
  113. package/dist/chunks/upload-image.121f0dbb.js +0 -3
  114. package/dist/chunks/upload-image.121f0dbb.js.map +0 -1
  115. package/dist/index.6638273e.js +0 -2
  116. package/dist/index.6638273e.js.map +0 -1
  117. /package/dist/chunks/{general-checkbox.84f9001b.js.LICENSE.txt → eo-checkbox.c5010723.js.LICENSE.txt} +0 -0
  118. /package/dist/chunks/{general-form-item.cde675b2.js.LICENSE.txt → eo-form-item.c1d92c43.js.LICENSE.txt} +0 -0
  119. /package/dist/chunks/{general-input.bcc459ab.js.LICENSE.txt → eo-icon-select.821c7b62.js.LICENSE.txt} +0 -0
  120. /package/dist/chunks/{general-radio.0162ab98.js.LICENSE.txt → eo-input.c2f5375e.js.LICENSE.txt} +0 -0
  121. /package/dist/chunks/{general-search.a34e9638.js.LICENSE.txt → eo-radio.3c54b91c.js.LICENSE.txt} +0 -0
  122. /package/dist/chunks/{general-select.f1a3569d.js.LICENSE.txt → eo-search.519fbec4.js.LICENSE.txt} +0 -0
  123. /package/dist/chunks/{general-switch.52b1f463.js.LICENSE.txt → eo-select.5abf2d64.js.LICENSE.txt} +0 -0
  124. /package/dist/chunks/{general-textarea.d8af5d8d.js.LICENSE.txt → eo-switch.a80fc9a7.js.LICENSE.txt} +0 -0
  125. /package/dist/chunks/{icon-select.cdef684a.js.LICENSE.txt → eo-textarea.7e65b425.js.LICENSE.txt} +0 -0
  126. /package/dist/chunks/{upload-image.121f0dbb.js.LICENSE.txt → eo-upload-image.8c7d6541.js.LICENSE.txt} +0 -0
@@ -1,7 +1,7 @@
1
1
  表单下拉选择构件。
2
2
 
3
3
  ```yaml preview
4
- - brick: form.general-select
4
+ - brick: eo-select
5
5
  properties:
6
6
  options:
7
7
  - Beijing
@@ -15,7 +15,7 @@
15
15
  ### Label
16
16
 
17
17
  ```yaml preview
18
- - brick: form.general-select
18
+ - brick: eo-select
19
19
  properties:
20
20
  label: city
21
21
  options:
@@ -28,7 +28,7 @@
28
28
  ### Value
29
29
 
30
30
  ```yaml preview
31
- - brick: form.general-select
31
+ - brick: eo-select
32
32
  properties:
33
33
  label: city
34
34
  value: Shanghai
@@ -42,7 +42,7 @@
42
42
  ### Options
43
43
 
44
44
  ```yaml preview
45
- - brick: form.general-select
45
+ - brick: eo-select
46
46
  properties:
47
47
  label: string
48
48
  options:
@@ -55,7 +55,7 @@
55
55
  properties:
56
56
  style:
57
57
  height: 20px
58
- - brick: form.general-select
58
+ - brick: eo-select
59
59
  properties:
60
60
  label: Array<object>
61
61
  options:
@@ -72,7 +72,7 @@
72
72
  properties:
73
73
  style:
74
74
  height: 20px
75
- - brick: form.general-select
75
+ - brick: eo-select
76
76
  properties:
77
77
  label: boolean
78
78
  options:
@@ -83,7 +83,7 @@
83
83
  ### Disabled
84
84
 
85
85
  ```yaml preview
86
- - brick: form.general-select
86
+ - brick: eo-select
87
87
  properties:
88
88
  options:
89
89
  - label: Beijing
@@ -95,7 +95,7 @@
95
95
  value: 2
96
96
  - label: Shenzhen
97
97
  value: 3
98
- - brick: form.general-select
98
+ - brick: eo-select
99
99
  properties:
100
100
  disabled: true
101
101
  options:
@@ -112,7 +112,7 @@
112
112
  ### Multiple
113
113
 
114
114
  ```yaml preview
115
- - brick: form.general-select
115
+ - brick: eo-select
116
116
  properties:
117
117
  label: multiple
118
118
  multiple: true
@@ -126,7 +126,7 @@
126
126
  ### Placeholder
127
127
 
128
128
  ```yaml preview
129
- - brick: form.general-select
129
+ - brick: eo-select
130
130
  properties:
131
131
  placeholder: This is placeholder...
132
132
  options:
@@ -139,7 +139,7 @@
139
139
  ### Input Style
140
140
 
141
141
  ```yaml preview
142
- - brick: form.general-select
142
+ - brick: eo-select
143
143
  properties:
144
144
  inputStyle:
145
145
  width: 180px
@@ -153,7 +153,7 @@
153
153
  ### Event
154
154
 
155
155
  ```yaml preview
156
- - brick: form.general-select
156
+ - brick: eo-select
157
157
  properties:
158
158
  id: options-change-select
159
159
  label: Single
@@ -171,7 +171,7 @@
171
171
  - action: message.success
172
172
  args:
173
173
  - <% JSON.stringify(EVENT.detail) %>
174
- - brick: form.general-select
174
+ - brick: eo-select
175
175
  properties:
176
176
  label: Multiple
177
177
  multiple: true
@@ -185,7 +185,7 @@
185
185
  - action: message.success
186
186
  args:
187
187
  - <% JSON.stringify(EVENT.detail) %>
188
- - brick: basic.general-button
188
+ - brick: eo-button
189
189
  properties:
190
190
  textContent: Click to change options
191
191
  events:
@@ -1,8 +1,8 @@
1
1
  表单提交按钮。
2
- (tips: 通常在于 form.general-form 构件搭配使用)
2
+ (tips: 通常在于 eo-form 构件搭配使用)
3
3
 
4
4
  ```yaml preview
5
- - brick: form.submit-buttons
5
+ - brick: eo-submit-buttons
6
6
  ```
7
7
 
8
8
  ## Examples
@@ -10,7 +10,7 @@
10
10
  ### Submit Button Text & Cancel Button Text
11
11
 
12
12
  ```yaml preview
13
- - brick: form.submit-buttons
13
+ - brick: eo-submit-buttons
14
14
  properties:
15
15
  submitText: submit
16
16
  cancelText: cancel
@@ -19,12 +19,12 @@
19
19
  ### Disabled After Click & Submit Button Disabled
20
20
 
21
21
  ```yaml preview
22
- - brick: form.submit-buttons
22
+ - brick: eo-submit-buttons
23
23
  properties:
24
24
  submitText: submit
25
25
  cancelText: cancel
26
26
  submitDisabled: true
27
- - brick: form.submit-buttons
27
+ - brick: eo-submit-buttons
28
28
  properties:
29
29
  submitText: click to disabled
30
30
  cancelText: cancel
@@ -34,13 +34,13 @@
34
34
  ### Type
35
35
 
36
36
  ```yaml preview
37
- - brick: form.submit-buttons
37
+ - brick: eo-submit-buttons
38
38
  properties:
39
39
  submitText: submit
40
40
  cancelText: cancel
41
41
  submitType: primary
42
42
  cancelType: text
43
- - brick: form.submit-buttons
43
+ - brick: eo-submit-buttons
44
44
  properties:
45
45
  submitText: click to disabled
46
46
  cancelText: cancel
@@ -51,7 +51,7 @@
51
51
  ### Event
52
52
 
53
53
  ```yaml preview
54
- - brick: form.submit-buttons
54
+ - brick: eo-submit-buttons
55
55
  properties:
56
56
  submitText: submit
57
57
  cancelText: cancel
@@ -5,7 +5,7 @@
5
5
  ### Basic
6
6
 
7
7
  ```yaml preview
8
- - brick: form.general-switch
8
+ - brick: eo-switch
9
9
  events:
10
10
  switch:
11
11
  action: console.log
@@ -16,7 +16,7 @@
16
16
  ### Label
17
17
 
18
18
  ```yaml preview
19
- - brick: form.general-switch
19
+ - brick: eo-switch
20
20
  events:
21
21
  switch:
22
22
  action: console.log
@@ -28,7 +28,7 @@
28
28
  ### disabled
29
29
 
30
30
  ```yaml preview
31
- - brick: form.general-switch
31
+ - brick: eo-switch
32
32
  properties:
33
33
  disabled: true
34
34
  value: true
@@ -38,7 +38,7 @@
38
38
  ### size
39
39
 
40
40
  ```yaml preview
41
- - brick: form.general-switch
41
+ - brick: eo-switch
42
42
  properties:
43
43
  disabled: false
44
44
  value: true
@@ -49,7 +49,7 @@
49
49
  ### cheeckText、unCheckedText、checkedIcon、unCheckedIcon
50
50
 
51
51
  ```yaml preview
52
- - brick: form.general-switch
52
+ - brick: eo-switch
53
53
  properties:
54
54
  checkedText: 123
55
55
  unCheckedText: 456
@@ -68,7 +68,7 @@
68
68
  ### Event
69
69
 
70
70
  ```yaml preview
71
- - brick: form.general-switch
71
+ - brick: eo-switch
72
72
  events:
73
73
  switch:
74
74
  action: console.log
@@ -1,7 +1,7 @@
1
1
  表单多行文本输入框构件。
2
2
 
3
3
  ```yaml preview
4
- - brick: form.general-textarea
4
+ - brick: eo-textarea
5
5
  ```
6
6
 
7
7
  ## Examples
@@ -9,7 +9,7 @@
9
9
  ### Label
10
10
 
11
11
  ```yaml preview
12
- - brick: form.general-textarea
12
+ - brick: eo-textarea
13
13
  properties:
14
14
  label: 多行输入框
15
15
  ```
@@ -17,7 +17,7 @@
17
17
  ### Value
18
18
 
19
19
  ```yaml preview
20
- - brick: form.general-textarea
20
+ - brick: eo-textarea
21
21
  properties:
22
22
  value: Default Value
23
23
  ```
@@ -25,7 +25,7 @@
25
25
  ### Disabled
26
26
 
27
27
  ```yaml preview
28
- - brick: form.general-textarea
28
+ - brick: eo-textarea
29
29
  properties:
30
30
  value: Default Value
31
31
  disabled: true
@@ -34,7 +34,7 @@
34
34
  ### Placeholder
35
35
 
36
36
  ```yaml preview
37
- - brick: form.general-textarea
37
+ - brick: eo-textarea
38
38
  properties:
39
39
  placeholder: This is placeholder...
40
40
  ```
@@ -42,7 +42,7 @@
42
42
  ### max length
43
43
 
44
44
  ```yaml preview
45
- - brick: form.general-textarea
45
+ - brick: eo-textarea
46
46
  properties:
47
47
  placeholder: max length = 10
48
48
  maxLength: 10
@@ -51,16 +51,16 @@
51
51
  ### AutoSize
52
52
 
53
53
  ```yaml preview
54
- - brick: form.general-textarea
54
+ - brick: eo-textarea
55
55
  properties:
56
56
  placeholder: "autoSize: true"
57
57
  autoSize: true
58
- - brick: form.general-textarea
58
+ - brick: eo-textarea
59
59
  properties:
60
60
  placeholder: "autoSize: { minRows: 3}"
61
61
  autoSize:
62
62
  minRows: 3
63
- - brick: form.general-textarea
63
+ - brick: eo-textarea
64
64
  properties:
65
65
  placeholder: "autoSize: { minRows: 3, maxRows: 5}"
66
66
  autoSize:
@@ -71,17 +71,17 @@
71
71
  ### Textarea Style
72
72
 
73
73
  ```yaml preview
74
- - brick: form.general-textarea
74
+ - brick: eo-textarea
75
75
  properties:
76
76
  placeholder: "width: 180px"
77
77
  textareaStyle:
78
78
  width: 180px
79
- - brick: form.general-textarea
79
+ - brick: eo-textarea
80
80
  properties:
81
81
  placeholder: "width: 250px"
82
82
  textareaStyle:
83
83
  width: 250px
84
- - brick: form.general-textarea
84
+ - brick: eo-textarea
85
85
  properties:
86
86
  placeholder: "border style"
87
87
  textareaStyle:
@@ -91,7 +91,7 @@
91
91
  ### Event
92
92
 
93
93
  ```yaml preview
94
- - brick: form.general-textarea
94
+ - brick: eo-textarea
95
95
  events:
96
96
  label: Event
97
97
  change:
@@ -5,7 +5,7 @@
5
5
  ### Basic
6
6
 
7
7
  ```yaml preview
8
- - brick: form.upload-image
8
+ - brick: eo-upload-image
9
9
  events:
10
10
  change:
11
11
  action: console.log
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/form",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/form",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,8 +34,8 @@
34
34
  "postpublish": "mv package.json.bak package.json"
35
35
  },
36
36
  "devDependencies": {
37
- "@next-core/build-next-bricks": "^1.12.0",
38
- "@next-core/test-next": "^1.0.6"
37
+ "@next-core/build-next-bricks": "^1.13.1",
38
+ "@next-core/test-next": "^1.0.7"
39
39
  },
40
- "gitHead": "e0be55e5d98d72d58a8ae382fb70123977c0bf2f"
40
+ "gitHead": "e50dfe754ff730bd5cd1d49a6a16d2c2a0c255c6"
41
41
  }
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_form=self.webpackChunk_next_bricks_form||[]).push([[4131],{6171:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r.d(t,{Z:()=>n})},5866:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5863);function o(e,t){(0,n.Z)(e,t),t.add(e)}},2159:(e,t,r)=>{function n(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,{Z:()=>n})},4131:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>Yt,Notification:()=>ar,StoryboardFunctionRegistryFactory:()=>pe,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>ee,authenticate:()=>ko,batchSetAppsLocalTheme:()=>te,checkIfByTransform:()=>Ct,checkIfOfComputed:()=>It,createHistory:()=>k,createRuntime:()=>fo,customProcessors:()=>M,customTemplates:()=>Pe,fetchByProvider:()=>Co,getAuth:()=>Zo,getBasePath:()=>v,getCssPropertyValue:()=>se,getCurrentMode:()=>ae,getCurrentTheme:()=>X,getHistory:()=>Z,getPageInfo:()=>xn,getRuntime:()=>vo,handleHttpError:()=>or,httpErrorToString:()=>Xt,isLoggedIn:()=>Ao,isUnauthenticatedError:()=>er,logout:()=>Io,matchPath:()=>Ft,registerWidgetFunctions:()=>Be,registerWidgetI18n:()=>L,unstable_createRoot:()=>Oo});var n={};r.r(n),r.d(n,{legacyDoTransform:()=>xo,mountUseBrick:()=>_o,renderUseBrick:()=>Po,unmountUseBrick:()=>Mo,updateSnippetPreviewSettings:()=>$o,updateStoryboard:()=>Bo,updateStoryboardByRoute:()=>Lo,updateStoryboardBySnippet:()=>Fo,updateStoryboardByTemplate:()=>Uo,updateTemplatePreviewSettings:()=>No});var o=r(3028),a=r(4795),i=r(3395),s=r(381),l=r(687),c=r(3979),u=r(2882),d=r(5106),p=r(8874),f=(r(8525),r(9492));function v(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var h=r(2159),m=r(5178);function g(e,t){var r=(0,m.orderBy)(e,(e=>{var t,r,n;return null!==(t=null===(r=e.app)||void 0===r||null===(n=r.homepage)||void 0===n?void 0:n.length)&&void 0!==t?t:0}),"desc");for(var n of r){var o=n.app.homepage;if("string"==typeof o&&"/"===o[0]&&("/"===o?t===o:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(o.replace(/\/+$/,""),"/"))))return n}}function y(e){var t;return!e||(null===(t=vo().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var b,w=["extraQuery","clear","keepHash"],S=!1;function E(e,t){t(!(S=!confirm(e)))}function k(){if(!b){var e=(0,f.createBrowserHistory)({basename:v().replace(/\/$/,""),getUserConfirmation:E});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function a(e,t,n){S=!1,r(e,t),null==n||n(S)}function i(e,t,r){S=!1,n(e,t),null==r||r(S)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:l,keepHash:c}=n,u=(0,h.Z)(n,w),d=new URLSearchParams(l?"":e.location.search),p={};for(var[f,v]of(Object.assign(p,r,s),Object.entries(p)))if(Array.isArray(v))for(var m of(d.delete(f),v))d.append(f,m);else null==v||""===v?d.delete(f):d.set(f,v);("push"===t?a:i)("?".concat(d.toString()).concat(c?e.location.hash:""),u,o)}}return(0,o.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){a((0,o.Z)((0,o.Z)({},e.location),{},{key:void 0,hash:t,state:(0,o.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,o.Z)((0,o.Z)({},e.location),{},{state:(0,o.Z)((0,o.Z)({},e.location.state),{},{notify:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(o,a,i){var s,l="string"==typeof o;return"string"==typeof(s=l?(0,f.parsePath)(o).pathname:o.pathname)&&s.startsWith("/")&&y(function(e){var t,r;return g(null!==(t=null===(r=lo)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](l?v()+o.substring(1):e.createHref(o)):("push"===n?t:r)(o,a,i)}}return{push:n("push"),replace:n("replace")}}((0,o.Z)((0,o.Z)({},e),{},{push:a,replace:i})))}(e)),b=e}return b}function Z(){return b}var I=r(5866),A=r(6171),C=r(9751),T=r(3405),O=r(4212),P=r(5663),R=r(3128),_=new WeakMap,M=new class{constructor(){(0,i.Z)(this,_,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),o=(0,l.Z)(this,_).get(r);if(o||(o=new Map,(0,l.Z)(this,_).set(r,o)),o.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));o.set(n,t)}get(e){return(0,l.Z)(this,_).get(e)}};function x(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=B("app",t.id),o=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;c.i18n.addResourceBundle(t,n,r),o.push(t)})),()=>{for(var e of o)c.i18n.removeResourceBundle(e,n)}}}function B(e,t){return"".concat(e,"/").concat(t)}function L(e,t){var r=B("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;c.i18n.addResourceBundle(t,r,n)}))}function U(e){return c.i18n.getFixedT(null,B("widget",e))}var N,F="brick-next-devtools-panel",$="devtools-frame-active-change",j="devtools-panel-change",K=!0;function D(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var W=()=>{throw new Error("Can't modify read-only proxy object")},V={set:W,defineProperty:W,deleteProperty:W,setPrototypeOf:W};function H(e){return new Proxy(e,V)}function z(e){var{get:t,ownKeys:r}=e;return D()?H(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var G="light",q=new d.JsonStorage(localStorage),Q="apps-theme";function J(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));G=e}function Y(){return G}function X(){return document.documentElement.dataset.theme}function ee(e){e?J(e):e=Y(),e!==X()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function te(e){q.setItem(Q,(0,o.Z)((0,o.Z)({},re()),e))}function re(){var e,t;try{t=q.getItem(Q)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var ne="default";function oe(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));ne=e}function ae(){return document.documentElement.dataset.mode}function ie(e){e?oe(e):e=ne,e!==ae()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function se(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}function le(e,t){var r={};for(var n of e){var o=ce(n,t);void 0!==o&&(r[n]=o)}return r}function ce(e,t){var r,n,o,{collectCoverage:a,widgetId:i,widgetVersion:s,app:l,appendI18nNamespace:u,storyboardFunctions:d,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return a?"/next":v().replace(/\/$/,"");case"FN":return d;case"IMG":return a?{get:e=>"mock/images/".concat(e)}:i?null==uo||null===(r=uo.images)||void 0===r?void 0:r.widgetImagesFactory(i,s):null==uo||null===(n=uo.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return a?m.identity:i?U(i):c.i18n.getFixedT(null,[u,B("app",l.id)].filter(Boolean));case"I18N_TEXT":return a?ue:c.i18nText;case"PERMISSIONS":return H({check:a?de:null==uo||null===(o=uo.checkPermissions)||void 0===o?void 0:o.checkPermissions});case"THEME":return H({getTheme:a?()=>"light":Y});case"console":return p?H(console):void 0;case"location":return a?{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 ue(e){return null==e?void 0:e.en}function de(){return!0}function pe(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=new Map,i=new Proxy(Object.freeze({}),{get:(o,s)=>function(o){var s,l=a.get(o);if(l){if(l.processed)return l.cooked;n&&(s=n.createCollector(o));var c=(0,T.precookFunction)(l.source,{typescript:l.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return l.cooked=(0,T.cook)(c.function,l.source,{rules:{noVar:!0},globalVariables:(0,P.supply)(c.attemptToVisitGlobals,le(c.attemptToVisitGlobals,{collectCoverage:n,widgetId:t,widgetVersion:r,app:e,storyboardFunctions:i,isStoryboardFunction:!0}),!!n),hooks:s&&{beforeEvaluate:s.beforeEvaluate,beforeCall:s.beforeCall,beforeBranch:s.beforeBranch}}),l.processed=!0,l.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),a.clear(),Array.isArray(t))for(var n of t){var o=(0,R.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,R.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");a.set(n.name,{source:n.source,typescript:n.typescript,deps:o,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,o.Z)((0,o.Z)({},t),{},{name:e}),n=(0,R.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,R.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");a.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=a.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:fe,registerStoryboardFunctions:ve,checkPermissionsUsage:he}=pe(),me={};try{me.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var r=e.create,n=e.defineProperty,o=a.prototype;function a(){t.set(this,r(null))}function i(e,t,r){n(e,t,{configurable:!0,writable:!0,value:r})}function s(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,r,n){for(var o=t.get(this),a=o[e]||(o[e]=[]),i=0,s=a.length;i<s;i++)if(a[i].listener===r)return;a.push({target:this,listener:r,options:n})})),i(o,"dispatchEvent",(function(e){var r=t.get(this)[e.type];return r&&(i(e,"target",this),i(e,"currentTarget",this),r.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),i(o,"removeEventListener",(function(e,r){for(var n=t.get(this),o=n[e]||(n[e]=[]),a=0,i=o.length;a<i;a++)if(o[a].listener===r)return void o.splice(a,1)})),me.EventTarget=a}(Object,new WeakMap)}const ge=me.EventTarget;var ye=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),be=new Map([[ye.xLarge,"1920px"],[ye.large,"1600px"],[ye.medium,"1280px"],[ye.small,"1024px"],[ye.xSmall,0]]),we=new ge,Se={},Ee={};function ke(e,t){var r=!1;for(var[n]of(Se[t]=e.matches,be))if(Se[n]&&Ee.breakpoint!==n){Ee.breakpoint=n,r=!0;break}r&&we.dispatchEvent(new CustomEvent("change",{detail:Ee}))}be.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));ke(r,t),r.addEventListener?r.addEventListener("change",(e=>{ke(e,t)})):r.addListener((e=>{ke(e,t)}))}));var Ze=()=>Ee;function Ie(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Ae(e){var t,r;return!(null===(t=e?e.flags:null===(r=vo())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Ce(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var a=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(a),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(a),...n)}var Te=new Set(["prefix"]),Oe=new WeakMap,Pe=new class{constructor(){(0,i.Z)(this,Oe,{writable:!0,value:new Map})}define(e,t){var r,n,a,i,s=(0,l.Z)(this,Oe).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var c=Ae(),u=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},d=[],p=[];for(var[f,v]of Object.entries(u))v.asVariable?(Ce(c,"Template `asVariable`",e,f),c||p.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&d.push([f,v]);var h=(0,o.Z)((0,o.Z)({},t),{},{proxy:(0,o.Z)((0,o.Z)({},t.proxy),{},{properties:Object.fromEntries(d)}),state:(t.state?c?t.state:t.state.map((e=>(0,o.Z)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,l.Z)(this,Oe).set(e,(0,o.Z)((0,o.Z)({},h),{},{name:e}));var g,y,b=(g=h.state,(0,m.uniq)(null!==(y=null==g?void 0:g.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[])),w=Object.entries(null!==(a=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==a?a:{}),S=b.concat(d.map((e=>e[0]))),E=w.map((e=>e[0])),k=S.concat(E).filter((e=>e in HTMLElement.prototype&&!Te.has(e)));if(k.length>0&&(Ce(c,"Using native HTMLElement properties as template properties or methods",e,...k),c))throw new Error('In custom template "'.concat(e,'", ').concat(k.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!s){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return S}static get _dev_only_definedMethods(){return E}$$getElementByRef(e){var t,r,n,o;return null===(t=this.$$tplStateStore)||void 0===t||null===(r=t.hostBrick)||void 0===r||null===(n=r.tplHostMetadata)||void 0===n||null===(o=n.internalBricksByRef.get(e))||void 0===o?void 0:o.element}connectedCallback(){var e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));var t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";var n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}var Z=function(r){if(d.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),"continue";Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var I of b)Z(I);var A=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,o,a=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);a&&(a[null!==(o=r.refProperty)&&void 0!==o?o:e]=t)},enumerable:!0})};for(var[C,T]of d)A(C,T);var O=function(e,r){Object.defineProperty(t.prototype,e,{value(){var t;this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0})};for(var[P,R]of w)O(P,R);customElements.define(e,t)}}get(e){return(0,l.Z)(this,Oe).get(e)}};function Re(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var a=o.get(n);if(!a)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return a}function _e(e,t,r){var n=Re(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}var Me=new Map,xe=new Proxy(Object.freeze({}),{get:(e,t)=>Me.get(t)});function Be(e,t,r){if(Me.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:o}=pe({widgetId:e,widgetVersion:r});Me.set(e,n),o(t)}const Le=(e,t,r)=>{Ve(r);const n=((e,t)=>{const r=Ne(e),n=Ne(t),o=r.pop(),a=n.pop(),i=Ke(r,n);return 0!==i?i:o&&a?Ke(o.split("."),a.split(".")):o||a?o?-1:1:0})(e,t);return De[r].includes(n)},Ue=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ne=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Ue);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Fe=e=>"*"===e||"x"===e||"X"===e,$e=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},je=(e,t)=>{if(Fe(e)||Fe(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])($e(e),$e(t));return r>n?1:r<n?-1:0},Ke=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=je(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},De={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},We=Object.keys(De),Ve=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===We.indexOf(e))throw new Error(`Invalid operator, expected one of ${We.join("|")}`)};function He(e,t){var r=Eo(e);if(!r&&null!=uo&&uo.checkInstalledApps&&(r=uo.checkInstalledApps.getCheckedApp(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return Le(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function ze(e,t,r){var{formStateStoreId:n,formStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var a=o.get(n);if(!a)throw new Error('Form state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return a}var Ge=new Map;function qe(e){return Qe.apply(this,arguments)}function Qe(){return Qe=(0,a.Z)((function*(e){var t,r=null==uo||null===(t=uo.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=uo.flowApi.FLOW_API_PROVIDER);var n=Ge.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)uo.flowApi.registerFlowApiProvider();else if(yield(0,u.loadBricksImperatively)([e],yo()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),Ge.set(e,n),n})),Qe.apply(this,arguments)}var Je=new Map;function Ye(e,t,r){return Xe.apply(this,arguments)}function Xe(){return(Xe=(0,a.Z)((function*(e,t,r){var{useProvider:n,method:a="resolve",args:i=[],onReject:s}=e,l=e.provider;if(l&&!n)throw new Error("You're using \"provider: ".concat(l,'" which is dropped in v3, please use "useProvider" instead'));var c,[u,d]=yield Promise.all([qe(n),gt(i,t)]),p=et(u,n,a,d,r,i),{transform:f}=e;try{c=yield p}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;f=s.transform,c=e}return f?"string"==typeof f?{[f]:c}:gt(f,(0,o.Z)((0,o.Z)({},t),{},{data:c})):c}))).apply(this,arguments)}function et(e,t,r,n,o,a){return tt.apply(this,arguments)}function tt(){return tt=(0,a.Z)((function*(e,t,r,n,o,i){var s,l;try{s=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==o?void 0:o.cache)&&(l=Je.get(s)),l||(l=(0,a.Z)((function*(){var o,a=null!=uo&&null!==(o=uo.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?yield uo.flowApi.getArgsOfFlowApi(t,n,r):n;return e.resolve(...a)}))(),Je.set(s,l)),l})),tt.apply(this,arguments)}var rt=Symbol.for("pre.evaluated.raw"),nt=Symbol.for("pre.evaluated.context");function ot(e){return!(null==e||!e[rt])}function at(e){return e[rt]}function it(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[rt])}var st=new WeakSet([SyntaxError,TypeError,ReferenceError]);function lt(e){return st.has(e.constructor)?e.constructor:TypeError}function ct(){return(ct=(0,a.Z)((function*(e,t,r){var{blockingList:n,run:o}=ut(e,t,r,!0);return yield Promise.all(n),o()}))).apply(this,arguments)}function ut(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=[];if("string"!=typeof e){var i=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,o.Z)((0,o.Z)({},e[nt]),i),e=e[rt]}var s,l={usedArgs:new Set},c={usedArgs:new Set};try{s=(0,T.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,R.collectAppGetMenuUsage)(l,e,t),(0,R.collectInstalledAppsHasUsage)(c,e,t)}}})}catch(t){var p="".concat(t.message,', in "').concat(e,'"');throw new(lt(t))(p)}if(l.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(c.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var f,v,h,g,y={},{attemptToVisitGlobals:b}=s;if(r.lazy||b.has("EVENT")&&!(0,d.hasOwnProperty)(t,"event")||b.has("DATA")&&!(0,d.hasOwnProperty)(t,"data"))return{blockingList:a,run:()=>Object.keys(t).length>0?{[rt]:e,[nt]:t}:e};var w,S,E=Ae(t);(b.has("STATE")||!E&&b.has("TPL"))&&(g=Re(t,"STATE",': "'.concat(e,'"'))),b.has("FORM_STATE")&&(S=ze(t,"FORM_STATE",': "'.concat(e,'"')));var k=D();if(n||k){if(b.has("CTX")&&(f=(0,R.strictCollectMemberUsage)(e,"CTX"),n&&a.push(t.ctxStore.waitFor(f))),g){if(h=(0,R.strictCollectMemberUsage)(e,"STATE"),!E){var Z=(0,R.strictCollectMemberUsage)(e,"TPL");for(var I of Z)h.add(I)}n&&a.push(g.waitFor(h))}S&&(w=(0,R.strictCollectMemberUsage)(e,"FORM_STATE"),n&&a.push(S.waitFor(w))),b.has("PROCESSORS")&&(v=(0,R.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&a.push((0,u.loadProcessorsImperatively)(v,yo())))}if(n){var A,C=b.has("PERMISSIONS");if(!C&&b.has("FN")){var O=[...(0,R.strictCollectMemberUsage)(e,"FN")];C=he(O)}if(C&&a.push(...t.pendingPermissionsPreCheck),l.usedArgs.size>0&&null!=uo&&uo.menu){var _=[...l.usedArgs];a.push(Promise.all(_.map((e=>uo.menu.fetchMenuById(e,t,{getStoryboardByAppId:So,resolveData:Ye,asyncComputeRealValue:gt})))))}c.usedArgs.size>0&&a.push(null==uo||null===(A=uo.checkInstalledApps)||void 0===A?void 0:A.waitForCheckingApps([...c.usedArgs]))}return{blockingList:a,run(){var r,n,a,i,{app:l,location:c,query:u,match:p,flags:k,sys:Z,ctxStore:I,data:A,event:C}=t,O=null!==(r=t.overrideApp)&&void 0!==r?r:l;for(var R of b)switch(R){case"ANCHOR":y[R]=c.hash?c.hash.substring(1):null;break;case"APP":y[R]=(0,o.Z)((0,o.Z)({},(0,m.cloneDeep)(O)),{},{getMenu:null==uo||null===(n=uo.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":y[R]=z({get:(e,t)=>I.getValue(t),ownKeys:()=>Array.from(f)});break;case"DATA":y[R]=A;break;case"EVENT":y[R]=C;break;case"FLAGS":y[R]=H(k);break;case"FORM_STATE":y[R]=z({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(w)});break;case"HASH":y[R]=c.hash;break;case"INSTALLED_APPS":y[R]=H({has:He});break;case"ITEM":(0,d.hasOwnProperty)(t,"forEachItem")?y[R]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":y[R]=H({getItem:Ie("local")});break;case"MEDIA":y[R]=H(Ze());break;case"MISC":y[R]=vo().getMiscSettings();break;case"PARAMS":y[R]=new URLSearchParams(u);break;case"PATH":y[R]=H(null!==(a=null==p?void 0:p.params)&&void 0!==a?a:{});break;case"PATH_NAME":y[R]=c.pathname;break;case"PROCESSORS":y[R]=z({get(e,t){var r=M.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return z({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys:()=>Array.from(v)});break;case"QUERY":y[R]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.get(e)])));break;case"QUERY_ARRAY":y[R]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.getAll(e)])));break;case"SESSION_STORAGE":y[R]=H({getItem:Ie("session")});break;case"TPL":if(Ce(E,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),E)break;case"STATE":y[R]=z({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":y[R]=H(null!=Z?Z:{});break;case"__WIDGET_FN__":y[R]=xe;break;case"__WIDGET_IMG__":y[R]=null==uo||null===(i=uo.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":y[R]=U}Object.assign(y,le(s.attemptToVisitGlobals,{storyboardFunctions:fe,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{var _=(0,T.cook)(s.expression,s.source,{globalVariables:(0,P.supply)(s.attemptToVisitGlobals,y)});return function(e,t){var r=D();if(r&&K&&(!N||"Evaluations"===N)){var n=()=>{var n;null===(n=r.emit)||void 0===n||n.call(r,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(n):setTimeout(n,0)}}("evaluation",{raw:e,context:y,result:_}),_}catch(t){var x="".concat(t.message,', in "').concat(e,'"');throw new(lt(t))(x)}}}}var dt=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 pt(e){switch(e){case dt.USE_BRICK_PROPERTIES:case dt.USE_BRICK_TRANSFORM:case dt.USE_BRICK_EVENTS:case dt.USE_BRICK_IF:case dt.USE_BRICK_LIFECYCLE:case dt.USE_BRICK_DATA_SOURCE:return!0}return!1}function ft(e,t,r){if(pt(e))return e;if(t)switch(e){case dt.USE_BRICK:return dt.USE_BRICK_ITEM;case dt.USE_BRICK_SLOTS_ITEM_BRICKS:return dt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case dt.INITIAL:if("useBrick"===r)return dt.USE_BRICK;break;case dt.USE_BRICK:case dt.USE_BRICK_ITEM:case dt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return dt.USE_BRICK_PROPERTIES;case"transform":return dt.USE_BRICK_TRANSFORM;case"dataSource":return dt.USE_BRICK_DATA_SOURCE;case"events":return dt.USE_BRICK_EVENTS;case"slots":return dt.USE_BRICK_SLOTS;case"children":return dt.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return dt.USE_BRICK_IF;case"lifeCycle":return dt.USE_BRICK_LIFECYCLE}break;case dt.USE_BRICK_SLOTS:return dt.USE_BRICK_SLOTS_ITEM;case dt.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return dt.USE_BRICK_SLOTS_ITEM_BRICKS}return dt.INITIAL}var vt=new WeakSet;function ht(e){if((0,d.isObject)(e)&&!mt(e))if(vt.add(e),Array.isArray(e))e.forEach(ht);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(ht)}}function mt(e){return vt.has(e)}function gt(e,t){return yt.apply(this,arguments)}function yt(){return yt=(0,a.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=ot(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&pt(r.$$stateOfUseBrick),i=a;return n||(0,T.isEvaluable)(e)?(o=yield function(e,t,r){return ct.apply(this,arguments)}(e,t,{lazy:a}),i=it(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?O.transform:O.transformAndInject:r.noInject?St:O.inject)(e,t),i||ht(o),o}if(!(0,d.isObject)(e)||mt(e))return e;if(Array.isArray(e)){var s=wt(r,!0);return Promise.all(e.map((e=>gt(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,o]=e;return Promise.all([gt(n,t),gt(o,t,wt(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),yt.apply(this,arguments)}function bt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=ot(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&pt(r.$$stateOfUseBrick),i=a;return n||(0,T.isEvaluable)(e)?(o=function(e,t,r){var{run:n}=ut(e,t,void 0,!1);return n()}(e,t),i=it(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?O.transform:O.transformAndInject:r.noInject?St:O.inject)(e,t),i||ht(o),o}if(!(0,d.isObject)(e)||mt(e))return e;if(Array.isArray(e)){var s=wt(r,!0);return e.map((e=>bt(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;return[bt(n,t),bt(o,t,wt(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function wt(e,t,r){return e.$$lazyForUseBrick?(0,o.Z)((0,o.Z)({},e),{},{$$stateOfUseBrick:ft(e.$$stateOfUseBrick,t,r)}):e}function St(e){return e}function Et(e,t){return kt.apply(this,arguments)}function kt(){return(kt=(0,a.Z)((function*(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||ot(e.if)?yield gt(e.if,t):e.if)}))).apply(this,arguments)}function Zt(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||ot(e.if)?bt(e.if,t):e.if)}function It(e){return!(0,d.hasOwnProperty)(e,"if")||!!e.if}function At(){return(At=(0,a.Z)((function*(e,t){return(0,d.isObject)(e.if)&&!ot(e.if)?It(yield Ye(e.if,t)):Et(e,t)}))).apply(this,arguments)}function Ct(e,t){return Zt(e,{data:t})}function Tt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,T.isEvaluable)(e):ot(e)){var o="string"==typeof e?e:at(e);if((0,T.isTrackAll)(o)){var a=(0,R.trackAll)(o);a&&(t=a.context,r=a.state,n=a.formState)}else t=(0,R.track)(o,"track context","CTX"),r=(0,R.track)(o,"track state","STATE"),n=(0,R.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function Ot(){return Ot=(0,a.Z)((function*(e){return Object.fromEntries((yield Promise.all(Object.entries(e).map(function(){var e=(0,a.Z)((function*(e){var[t,r]=e,n=yield r;if("style"!==t&&"dataset"!==t||(0,d.isObject)(n))return[t,n]}));return function(t){return e.apply(this,arguments)}}()))).filter(Boolean))})),Ot.apply(this,arguments)}function Pt(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[o,a]of Object.entries(n))e[r][o]=a;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function Rt(e,t,r){var n=function(e,t){return(0,d.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[r,n]=e,o=bt(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?dt.USE_BRICK:dt.INITIAL});if("style"!==r&&"dataset"!==r||(0,d.isObject)(o))return[r,o]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{Pt(e,n)}))}function _t(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Mt(e){return e&&e.sensitive?"":"i"}function xt(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,a=r.start,i=void 0===a||a,s=r.end,l=void 0===s||s,c=r.encode,u=void 0===c?function(e){return e}:c,d=r.delimiter,p=void 0===d?"/#?":d,f=r.endsWith,v="[".concat(_t(void 0===f?"":f),"]|$"),h="[".concat(_t(p),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var b=y[g];if("string"==typeof b)m+=_t(u(b));else{var w=_t(u(b.prefix)),S=_t(u(b.suffix));if(b.pattern)if(t&&t.push(b),w||S)if("+"===b.modifier||"*"===b.modifier){var E="*"===b.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(b.pattern,")(?:").concat(S).concat(w,"(?:").concat(b.pattern,"))*)").concat(S,")").concat(E)}else m+="(?:".concat(w,"(").concat(b.pattern,")").concat(S,")").concat(b.modifier);else"+"===b.modifier||"*"===b.modifier?m+="((?:".concat(b.pattern,")").concat(b.modifier,")"):m+="(".concat(b.pattern,")").concat(b.modifier);else m+="(?:".concat(w).concat(S,")").concat(b.modifier)}}if(l)o||(m+="".concat(h,"?")),m+=r.endsWith?"(?=".concat(v,")"):"$";else{var k=e[e.length-1],Z="string"==typeof k?h.indexOf(k[k.length-1])>-1:void 0===k;o||(m+="(?:".concat(h,"(?=").concat(v,"))?")),Z||(m+="(?=".concat(h,"|").concat(v,")"))}return new RegExp(m,Mt(r))}(function(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,a="";if("?"===e[s=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));a+=e[s++]}else a+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(r));if(!a)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:a}),r=s}else{for(var i="",s=r+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,a="[^".concat(_t(t.delimiter||"/#?"),"]+?"),i=[],s=0,l=0,c="",u=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var n=r[l],o=n.type,a=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(a,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};l<r.length;){var f=u("CHAR"),v=u("NAME"),h=u("PATTERN");if(v||h){var m=f||"";-1===o.indexOf(m)&&(c+=m,m=""),c&&(i.push(c),c=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||a,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)c+=g;else if(c&&(i.push(c),c=""),u("OPEN")){m=p();var y=u("NAME")||"",b=u("PATTERN")||"",w=p();d("CLOSE"),i.push({name:y||(b?s++:""),pattern:y&&!b?a:b,prefix:m,suffix:w,modifier:u("MODIFIER")||""})}else d("END")}}return i}(e,r),t,r)}function Bt(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return Bt(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),Mt(r))}(e,t,r):xt(e,t,r)}var Lt=new Map,Ut=1e4,Nt=0;function Ft(e,t){var{path:r,exact:n=!1,strict:o=!1,sensitive:a=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=Lt.get(r);n||Lt.set(r,n=new Map);var o=n.get(e);if(o)return o;var a=[],i={regexp:Bt(e,a,t),keys:a};return Nt<Ut&&(n.set(e,i),Nt++),i}(r,{end:n,strict:o,sensitive:a}),l=i.exec(e);if(!l)return null;var[c,...u]=l,d=e===c;return n&&!d?null:{path:r,url:"/"===r&&""===c?"/":c,isExact:d,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function $t(){return($t=(0,a.Z)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=r.path.replace(/^\$\{APP.homepage\}/,t.app.homepage),o=Ft(t.location.pathname,{path:n,exact:r.exact});if(o&&(yield Et(r,t)))return t.app.noAuthGuard||r.public||null==uo||!uo.auth||uo.auth.isLoggedIn()?{match:o,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var jt,Kt=Symbol.for("tpl.asyncComputedPropsFromHost"),Dt=Symbol.for("tpl.stateStoreId"),Wt=Symbol.for("tpl.externalForEachItem"),Vt=r(6666),Ht=new Set,zt=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}({}),Gt={[zt.REQUEST_FAILED]:"Request Failed",[zt.SOMETHING_WENT_WRONG]:"Something went wrong!",[zt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[zt.NETWORK_ERROR]:"Network error, please check your network."},qt={[zt.REQUEST_FAILED]:"请求失败",[zt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[zt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[zt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},Qt="core/runtime",Jt={en:Gt,zh:qt},Yt=Object.freeze({show:function(e){return jt?jt.resolve(e):"confirm"===e.type?confirm(e.content)?new Promise((e=>setTimeout((()=>{e()}),1))):new Promise(((e,t)=>setTimeout((()=>{t()}),1))):(alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1e3))))}});function Xt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof C.HttpFetchError)return c.i18n.t("".concat(Qt,":").concat(zt.NETWORK_ERROR));if(e instanceof C.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 er(e){return e instanceof C.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var tr,rr,nr=!1;function or(e){if(!(e instanceof C.HttpAbortError)){if(er(e)&&!window.NO_AUTH_GUARD){if(nr)return;return nr=!0,void Yt.show({type:"confirm",content:c.i18n.t("".concat(Qt,":").concat(zt.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=vo().getFeatureFlags()["sso-enabled"],(t=Z()).push(e?"/sso-auth/login":"/auth/login",{from:(0,o.Z)((0,o.Z)({},t.location),{},{state:void 0})}),nr=!1}),(()=>{nr=!1}))}console.error(e);var t=Xt(e);t!==tr&&(tr=t,Yt.show({type:"error",title:c.i18n.t("".concat(Qt,":").concat(zt.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{tr=void 0})))}}var ar=Object.freeze({show:function(e){rr?rr.resolve(e):alert(e.message)}});function ir(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,o]=t,a=dr(o,r,{element:e});for(var i of(e.addEventListener(n,a),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,a]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(o)))e.$$eventListeners.push([n,null,i])}))}function sr(e){return"string"==typeof e.action}function lr(e){return"string"==typeof e.useProvider}function cr(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function ur(e){return!!e.then}function dr(e,t,r){return function(n){var a,i;for(var s of[].concat(e))if(Zt(s,(0,o.Z)((0,o.Z)({},t),{},{event:n})))if(ur(s))dr(s.then,t,r)(n);else if(sr(s)){var[l,c]=s.action.split(".");switch(s.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":gr(n,c,s.args,s.callback,t);break;case"window.open":yr(n,s.args,t);break;case"location.reload":case"location.assign":kr(n,c,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Zr(n,l,c,s.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":Ir(n,c,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Ar(n,c,s.args,t);break;case"handleHttpError":or(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":wr(n,c,s.args,null===(a=s.batch)||void 0===a||a,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":Sr(n,c,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=Pr(s.args,t,n);_e(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":Er(n,s.args,s.callback,t);break;case"message.subscribe":case"message.unsubscribe":Cr(n,c,s.args,t,r,s.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":ee("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=Pr(s.args,t,n);ee(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":ie("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else lr(s)?pr(n,s,t,r):cr(s)?vr(n,s,t,r):console.error("unknown event handler:",s);else s.else&&dr(s.else,t,r)(n)}}function pr(e,t,r,n){return fr.apply(this,arguments)}function fr(){return(fr=(0,a.Z)((function*(e,t,r,n){try{hr(e,yield qe(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(Xt(e))}}))).apply(this,arguments)}function vr(e,t,r,n){var a=[],i=t.target,s=t.targetRef,l=i;if(("string"==typeof i?(0,T.isEvaluable)(i):ot(i))&&(l=bt(i,(0,o.Z)((0,o.Z)({},r),{},{event:e}))),"string"==typeof l)if("_self"===l)a.push(n.element);else if(t.multiple)a=Array.from(document.querySelectorAll(l));else{var c=document.querySelector(l);null!==c&&a.push(c)}else if(l)l instanceof HTMLElement?a.push(l):console.error("unexpected target:",l);else if(s){var u=s;("string"==typeof s?(0,T.isEvaluable)(s):ot(s))&&(u=bt(s,(0,o.Z)((0,o.Z)({},r),{},{event:e})));var d=[].concat(u),p=_e(r,"targetRef",": ".concat(d.join(", ")));a.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==a.length?function(e){return!!e.method}(t)?a.forEach((o=>{hr(e,o,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Rt(a,t.properties,(0,o.Z)((0,o.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function hr(e,t,r,n,o,a,i){return mr.apply(this,arguments)}function mr(){return mr=(0,a.Z)((function*(e,t,r,n,i,s,l){var c;if("function"==typeof t[n]){var u=function(){var o=(0,a.Z)((function*(){var o,a=Pr(r.args,i,e,l);return lr(r)&&null!=uo&&null!==(o=uo.flowApi)&&void 0!==o&&o.isFlowApiProvider(r.useProvider)&&(a=yield uo.flowApi.getArgsOfFlowApi(r.useProvider,a,n)),t[n](...a)}));return function(){return o.apply(this,arguments)}}();if(r.callback){var d,p=Or(r.callback,i,s),f={progress:p("progress"),success:p("success"),error:p("error"),finally:p("finally")};if(lr(r)&&(d=bt(r.poll,(0,o.Z)((0,o.Z)({},i),{},{event:e}))),null!==(c=d)&&void 0!==c&&c.enabled)!function(e,t,r){var n,{progress:o,success:i,error:s,finally:l}=t,{interval:c,leadingRequestDelay:u,continueOnError:d,delegateLoadingBar:p,expectPollEnd:f,expectPollStopImmediately:v}=r,h=bo();function m(){return g.apply(this,arguments)}function g(){return(g=(0,a.Z)((function*(){var t;Ht.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==bo())||(null==o||o(r),null!=f&&f(r)?(p&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==l||l()):y(null!=c?c:3e3))}}catch(e){(t=(null==v?void 0:v())||h!==bo())||(null==s||s(e),d?y(null!=c?c:3e3):null==l||l())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),Ht.add(n)}y(null!=u?u:0),p&&window.dispatchEvent(new Event("request.start"))}(u,f,d);else try{var v=yield u();f.success(v)}catch(e){f.error(e)}finally{f.finally()}}else u()}else console.error("target has no method:",{target:t,method:n})})),mr.apply(this,arguments)}function gr(e,t,r,n,o){var a=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":a=2,i=!0;break;case"reload":i=!0;break;case"block":a=1,s="setBlockMessage"}var l=[];if(a>0&&((l=Pr(r,o,e,{useEventDetailAsDefault:!0})).length=a),i&&n){var c=Or(n,o,void 0);l.push((e=>{c(e?"error":"success")({blocked:e}),c("finally")({blocked:e})}))}Z()[s](...l)}function yr(e,t,r){var[n,o,a]=Pr(t,r,e);window.open(n,o||"_self",a)}function br(e,t,r,n,o,a){t?n.updateValues(e,r,(e=>Pr(e,o,a)[0])):e.forEach((e=>{var{name:t,value:i}=Pr([e],o,a)[0];n.updateValue(t,i,r)}))}function wr(e,t,r,n,o,a){if(!Array.isArray(r)||!r.every(d.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=Pr(r,a,e);a.ctxStore.updateValue(i,s,t,o,a)}else br(r,n,t,a.ctxStore,a,e)}function Sr(e,t,r,n,o,a){if(Array.isArray(r)&&r.every(d.isObject)&&"update"===t)br(r,n,"replace",a.ctxStore,a,e);else{var[i,s]=Pr(r,a,e);Re(a,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,o,a)}}function Er(e,t,r,n){var[o,a]=Pr(t,n,e);ze(n,"formstate.update",": ".concat(o)).updateValue(o,a,"replace",r,n)}function kr(e,t,r,n){if("assign"===t){var[o]=Pr(r,n,e);location.assign(o)}else location[t]()}function Zr(e,t,r,n,o){var a="localStorage"===t?localStorage:sessionStorage,[i,s]=Pr(n,o,e);"setItem"===r?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function Ir(e,t,r,n){console[t](...Pr(r,n,e,{useEventAsDefault:!0}))}function Ar(e,t,r,n){var o=Pr(r,n,e,{useEventAsDefault:!0});ar.show({type:t,message:o[0]})}function Cr(e,t,r,n,o,a){return Tr.apply(this,arguments)}function Tr(){return(Tr=(0,a.Z)((function*(e,t,r,n,o,a){var i=()=>{var o,a=Pr(r,n,e);return null==uo||null===(o=uo.messageDispatcher)||void 0===o?void 0:o[t](...a)};if(a){var s=Or(a,n,o);try{var l=yield i();s("success")(l)}catch(e){s("error")(e)}finally{s("finally")()}}else i()}))).apply(this,arguments)}function Or(e,t,r){return function(n){return function(o){var a=null==e?void 0:e[n];if(a)try{var i=new CustomEvent("callback.".concat(n),{detail:o});dr(a,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",o)}}}function Pr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?bt(e,(0,o.Z)((0,o.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}var Rr=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class _r{constructor(e,t,r){(0,Vt.Z)(this,"type",void 0),(0,Vt.Z)(this,"data",new Map),(0,Vt.Z)(this,"changeEventType",void 0),(0,Vt.Z)(this,"pendingStack",[]),(0,Vt.Z)(this,"hostBrick",void 0),(0,Vt.Z)(this,"batchUpdate",!1),(0,Vt.Z)(this,"batchUpdateContextsNames",[]),(0,Vt.Z)(this,"rendererContext",void 0),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=r}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}getAffectListByContext(e){var t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){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");var n={},o={},a=[];e.forEach((e=>{var{name:o,value:i}=r([e]),s=this.data.get(o);a.push(...this.getAffectListByContext(o)),s&&(n[o]=s),this.updateValue(o,i,t)})),a.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(o[e]=t)}));var i=e=>{for(var t in e){var r,n=e[t];null===(r=n.eventTarget)||void 0===r||r.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};i(n),i(o),this.batchUpdate=!1}updateValue(e,t,r,n,a){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,d.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,o.Z)({cache:"load"===r?"default":"reload"},t))).then((e=>{i.loaded=!0,i.value=e,i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}),(e=>{null!=n&&n.error||or(e)})),n){var l=Or(n,a);s.then((e=>{l("success")({value:e}),l("finally")()}),(e=>{l("error")(e),l("finally")()}))}}}define(e,t,r){if(Array.isArray(e)&&e.length>0){var n=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX",n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=new Map;for(var n of e){var o=(0,R.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,o)}return r}(e,r),o=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;o.set(i,(null!==(s=o.get(i))&&void 0!==s?s:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),c=new WeakSet,u=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{u.set(e,{resolve:t,reject:r})}))]))),p=function(){var e=(0,a.Z)((function*(e){var r;c.add(e);var a=yield t(e);n.delete(e);var i=null!==(r=o.get(e.name))&&void 0!==r?r:0;if(a){if(u.get(e.name).resolve(),o.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),o.delete(e.name)):o.set(e.name,i-1);yield v()}));return function(t){return e.apply(this,arguments)}}(),f=l;function v(){return h.apply(this,arguments)}function h(){return h=(0,a.Z)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(o,f)).map((e=>e[0])).filter((e=>!c.has(e)));yield Promise.all(e.map(p))})),h.apply(this,arguments)}return{pendingResult:v().then((0,a.Z)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),o=()=>{var e=!1;for(var[t,a]of r.entries())[...a.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&o()};if(o(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),f=!0,yield v()),u.values()))e.resolve()}))).catch((e=>{for(var t of u.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r)),this.type);this.pendingStack.push(n)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,a.Z)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,a.Z)((function*(){for(var{pendingResult:t}of e.pendingStack)yield t}))()}handleAsyncAfterMount(){this.data.forEach((e=>{e.async&&e.loading.then((t=>{e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t}))}))}))}resolve(e,t,r){var n=this;return(0,a.Z)((function*(){if(!(yield Et(e,t)))return!1;var i,s,l;r&&("STATE"===n.type?e.expose:"FORM_STATE"===n.type)&&(0,d.hasOwnProperty)(r,e.name)&&(i=yield r[e.name]);var c="eager";if(void 0===i){if(e.resolve){var u=(0,o.Z)({transform:"value"},e.resolve);if(yield Et(e.resolve,t))s=function(){var e=(0,a.Z)((function*(e){return(yield Ye(u,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),"eager"==(c=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager")?i=yield s():"async"===c&&(l=s());else if(!(0,d.hasOwnProperty)(e,"value"))return!1}s&&"eager"===c||void 0===e.value||(i=yield gt(e.value,t))}var p={value:i,eventTarget:new EventTarget,load:s,loaded:"eager"===c,loading:l,async:"async"===c,deps:[]};if("lazy"===c){var f,{trigger:v}=e.resolve;v&&Rr.includes(v)&&(null===(f=n.rendererContext)||void 0===f||f.registerArbitraryLifeCycle(v,(()=>{n.updateValue(e.name,void 0,"load")})))}if(e.onChange&&p.eventTarget.addEventListener(n.changeEventType,dr(e.onChange,t)),e.track){var h=(0,R.strictCollectMemberUsage)(s?e.resolve:e.value,n.type);for(var m of(!s&&(p.deps=[...h]),h))n.onChange(m,n.batchAddListener((()=>{s?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,bt(e.value,t),"replace")}),e))}if(n.data.has(e.name))throw new Error("".concat(n.type," '").concat(e.name,"' has already been declared"));return n.data.set(e.name,p),!0}))()}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}function Mr(e,t,r){var n,{reversedProxies:o,asyncHostProperties:i,externalSlots:s,tplStateStoreId:l,hostBrick:c}=e;if(t&&o){var u=o.properties.get(t);if(u){var p=function(){var e=(0,a.Z)((function*(e){var t={};for(var{from:r,to:n}of u)if((0,d.hasOwnProperty)(e,r)&&n.refProperty){var o=yield e[r];void 0!==o&&(t[n.refProperty]=o)}return t}));return function(t){return e.apply(this,arguments)}}();n=p(i)}var f=o.slots.get(t);if(f&&s){var v=new Map;for(var{from:h,to:g}of f){var y,b,w,S,E=null!==(y=null===(b=s[h])||void 0===b?void 0:b.bricks)&&void 0!==y?y:[];if(E.length){var k=null!==(w=g.refSlot)&&void 0!==w?w:h,Z=v.get(k);if(!Z){Z=[];for(var I=(0,d.hasOwnProperty)(r,k)?r[k].bricks.length+1:1,A=0;A<I;A+=1)Z.push([]);v.set(k,Z)}var C=null!==(S=g.refPosition)&&void 0!==S?S:-1;Z[(0,m.clamp)(C<0?Z.length+C:C,0,Z.length-1)].push(...(0,d.hasOwnProperty)(c.runtimeContext,"forEachItem")?xr(E,c.runtimeContext.forEachItem):E)}}var T=function(){(0,d.hasOwnProperty)(r,O)||(r[O]={type:"bricks",bricks:[]});var e=r[O];e.bricks=P.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[O]};for(var[O,P]of v.entries())T()}}return{[Kt]:n,[Dt]:l}}function xr(e,t){return e.map((e=>{var r;return(0,o.Z)((0,o.Z)({},e),{},{[Wt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,o]=e;return[n,"routes"===o.type?{type:"routes",routes:Br(o.routes,t)}:{type:"bricks",bricks:xr(null!==(r=o.bricks)&&void 0!==r?r:[],t)}]})))})}))}function Br(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,o.Z)((0,o.Z)({},e),{},{bricks:xr(e.bricks,t)})))}var Lr=["properties","slots","children"];function Ur(e,t){function r(e){return(0,d.isObject)(e)?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,o]=e;return(0,d.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(n)]:[t,n(o)]:[t,r(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:a,slots:i,children:s}=e,l=(0,h.Z)(e,Lr),c=an(s,i),u=Object.fromEntries(Object.entries(null!=c?c:{}).map((e=>{var t,[r,o]=e;return[r,{type:"bricks",bricks:(null!==(t=o.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,o.Z)((0,o.Z)({},l),{},{properties:r(a),slots:u},Mr(t,l.ref,u))}return r(e)}var Nr=["slots","children"],Fr=["properties","slots","children"];function $r(e,t,r,n,a){var i,s=(0,m.uniqueId)("tpl-state-"),l=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{tplStateStoreId:s});delete l.forEachItem,delete l.formStateStoreId;var c=new _r("STATE",r,a);l.tplStateStoreMap.set(s,c),l.tplStateStoreScope&&l.tplStateStoreScope.push(c);var{bricks:u,proxy:d,state:p,contracts:f}=Pe.get(e);null==uo||null===(i=uo.flowApi)||void 0===i||i.collectWidgetContract(f),c.define(p,l,n);var{slots:v,children:g}=t,y=(0,h.Z)(t,Nr),b=(0,o.Z)((0,o.Z)({},y),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:s,proxy:d};var w={properties:new Map,slots:new Map};if(null!=d&&d.properties)for(var[S,E]of Object.entries(d.properties)){var k=w.properties.get(E.ref);k||(k=[],w.properties.set(E.ref,k)),k.push({from:S,to:E})}if(null!=d&&d.slots)for(var[Z,I]of Object.entries(d.slots)){var A=w.slots.get(I.ref);A||(A=[],w.slots.set(I.ref,A)),A.push({from:Z,to:I})}var C={reversedProxies:w,asyncHostProperties:n,externalSlots:an(g,v),tplStateStoreId:s,hostBrick:r};return b.slots={"":{type:"bricks",bricks:u.map((e=>jr(e,C)))}},b}function jr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:a}=e,i=(0,h.Z)(e,Fr),s=an(a,n),l=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,o]=e;return[n,{type:"bricks",bricks:(null!==(r=o.bricks)&&void 0!==r?r:[]).map((e=>jr(e,t)))}]})));return(0,o.Z)((0,o.Z)({},i),{},{properties:Ur(r,t),slots:l},Mr(t,i.ref,l))}var Kr=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),Dr="form-renderer.form-renderer",Wr=Symbol.for("form.stateStoreId");function Vr(e,t,r){var{id:n,bricks:a,events:i,context:s,mountPoint:l,instanceId:c}=e,{brick:u,properties:p}=e,f=t.find((e=>e.fieldId===n));if(f){var v=function(e){var t,r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,o.Z)((0,o.Z)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUMS":t={brick:"forms.general-select",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{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:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{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:(0,o.Z)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,o.Z)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,o.Z)((0,o.Z)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description})}}return t}(f);u||(u=v.brick),p=(0,o.Z)((0,o.Z)({},v.properties),p)}var h={brick:u,properties:p,iid:c,slot:l,events:i,context:s,children:Hr(a,t,r),[Wr]:r};return(0,d.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function Hr(e,t,r){if(Array.isArray(e))return e.map((e=>Vr(e,t,r)))}var zr=["blockingList","node","menuRequests","hasTrackingControls"],Gr=["if","permissionsPreCheck"],qr=["formData"];function Qr(e,t,r,n,o){return Jr.apply(this,arguments)}function Jr(){return Jr=(0,a.Z)((function*(e,t,r,n,a){var i=yield function(e,t){return $t.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var l,c=s.route=i.route,d=(0,o.Z)((0,o.Z)({},r),{},{match:i.match});d.ctxStore.define(c.context,d),d.pendingPermissionsPreCheck.push(null==uo||null===(l=uo.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(c,(e=>gt(e,d))));var{preLoadBricks:p}=c;switch(Array.isArray(p)&&s.blockingList.push((0,u.loadBricksImperatively)(p,yo())),c.type){case"redirect":var f;if("string"!=typeof(f="string"==typeof c.redirect?yield gt(c.redirect,d):(yield Ye((0,o.Z)({transform:"redirect"},c.redirect),d)).redirect))throw console.error("Unexpected redirect result:",f),new Error("Unexpected type of redirect result: ".concat(typeof f));s.redirect={path:f};break;case"routes":s.menuRequests.push(nn(c.menu,d)),on(s,yield Qr(e,c.routes,d,n,a));break;default:s.menuRequests.push(nn(c.menu,d)),on(s,yield Yr(e,c.bricks,d,n,a))}}return s})),Jr.apply(this,arguments)}function Yr(e,t,r,n,o,a,i){return Xr.apply(this,arguments)}function Xr(){return(Xr=(0,a.Z)((function*(e,t,r,n,o,a,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>en(e,t,r,n,o,i,a&&new Map(a)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(o,r,t.node,e),on(s,t)})),s}))).apply(this,arguments)}function en(e,t,r,n,o,a){return tn.apply(this,arguments)}function tn(){return tn=(0,a.Z)((function*(e,t,r,n,i,s){var l,c,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,f={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;var{if:v,permissionsPreCheck:g}=t,y=(0,h.Z)(t,Gr);if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):ot(e)&&(0,T.isTrackAll)(at(e))}(v))return en(e,(0,o.Z)({brick:":if",dataSource:v,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[y]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,o.Z)((0,o.Z)({},e),{},{[r]:t[r]})),{})),r,n,i,s,p);var b=t[Dt],w=t[Wr],S=(0,o.Z)((0,o.Z)({},r),{},{tplStateStoreId:b,formStateStoreId:w});(0,d.hasOwnProperty)(t,Wt)&&(S.forEachItem=t[Wt]);var{context:E}=t;if(Array.isArray(E)&&E.length>0){var k=Ae(S);Ce(k,"Defining context on bricks","check your brick:",t),k||S.ctxStore.define(E,S)}if(S.pendingPermissionsPreCheck.push(null==uo||null===(l=uo.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>gt(e,S)))),!(yield function(e,t){return At.apply(this,arguments)}(t,S)))return f;var Z=t.brick;if(Z.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(Z);var{dataSource:I}=t,A=function(){var r=(0,a.Z)((function*(){var r,o=yield gt(I,S),a=":forEach"===Z?"":":switch"===Z?String(o):o?"":"else",s=an(t.children,t.slots),l=s&&(0,d.hasOwnProperty)(s,a)&&(null===(r=s[a])||void 0===r?void 0:r.bricks);if(!Array.isArray(l))return f;switch(Z){case":forEach":return Array.isArray(o)?function(e,t,r,n,o,a,i){return rn.apply(this,arguments)}(e,o,l,S,n,i,p):f;case":if":case":switch":return Yr(e,l,S,n,i,p,!0)}}));return function(){return r.apply(this,arguments)}}(),C=yield A(),{contextNames:O,stateNames:P}=Tt(I);if(O||P){C.hasTrackingControls=!0;var R=0,_=function(){var t=(0,a.Z)((function*(){var t=++R,r=yield A();r.blockingList.push(...[...S.tplStateStoreMap.values(),...S.formStateStoreMap.values()].map((e=>e.waitForAll())),...S.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),R===t&&n.rerenderControlNode(i,s,r.node,e)}));return function(){return t.apply(this,arguments)}}(),M=(0,m.debounce)(_);if(O)for(var x of O)S.ctxStore.onChange(x,M);if(P)for(var B of P)Re(S,"STATE",': "'.concat(I,'"')).onChange(B,M)}return C}/\.tpl-/.test(Z)&&!Pe.get(Z)&&(yield sn((0,u.loadBricksImperatively)([Z],yo()),Z,n.unknownBricks));var L=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(Pe.get(r))return r}return!!Pe.get(e)&&e}(Z,null===(c=S.app)||void 0===c?void 0:c.id);if(L){var U,N=null!==(U=p.get(L))&&void 0!==U?U:0;if(N>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(L,'"'));p.set(L,N+1)}else Z.includes("-")&&!customElements.get(Z)&&(Z===Dr?customElements.define(Dr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):f.blockingList.push(sn((0,u.enqueueStableLoadBricks)([Z],yo()),Z,n.unknownBricks)));var F,$,j={tag:Kr.BRICK,type:L||Z,return:e,slotId:i,events:t.events,runtimeContext:S,portal:t.portal,iid:t.iid,ref:t.ref};if(f.node=j,Z===Dr){var K,D=null!==(K=t.properties)&&void 0!==K?K:{};({formData:F}=D),$=(0,h.Z)(D,qr)}else $=t.properties;var W=[],V=[],H=function(e,t,r){return(0,d.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e,{contextNames:a,stateNames:i,formStateNames:s}=Tt(o);return(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o}),[n,gt(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?dt.USE_BRICK:dt.INITIAL})]}))):{}}($,S,V),z=function(){var e=(0,a.Z)((function*(){j.properties=yield function(e){return Ot.apply(this,arguments)}(H);var e=t[Kt];if(e){var r=yield e;for(var[n,o]of Object.entries(r))j.properties[n]=o}return function(e,t){var r=function(t){var r=()=>{e.element&&Rt(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var o=Re(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var a of t.stateNames)o.onChange(a,r)}if(t.formStateNames){var i=ze(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}(j,V),j.properties}));return function(){return e.apply(this,arguments)}}();W.push(z()),n.registerBrickLifeCycle(j,t.lifeCycle);var G,q=t;L?q=$r(L,t,j,H,n):Z===Dr&&(q=function(e,t,r,n,a){var i,s,l="string"==typeof e?JSON.parse(e):e,c=(0,m.uniqueId)("form-state-"),u=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{formStateStoreId:c});delete u.forEachItem,delete u.tplStateStoreId;var p=new _r("FORM_STATE",void 0,a);u.formStateStoreMap.set(c,p),u.formStateStoreScope&&u.formStateStoreScope.push(p);var f=null!==(i=l.context)&&void 0!==i?i:[];f.some((e=>"params"===e.name))||f.push({name:"params"}),p.define(f,u,n);var v=Vr(l.formSchema,l.fields,c);return"forms.general-form"===v.brick&&t.events&&(v.events=function(e,t){var r=null!=e?e:{};for(var[n,o]of Object.entries(t))r[n]=(0,d.hasOwnProperty)(r,n)?[r[n],o].flat():o;return r}(v.events,t.events)),"boolean"!=typeof(null===(s=t.properties)||void 0===s?void 0:s.renderRoot)||t.properties.renderRoot?(0,o.Z)((0,o.Z)({},t),{},{slots:void 0,children:[{brick:"basic-bricks.micro-view",properties:{style:{padding:"12px"}},slots:{content:{bricks:[v],type:"bricks"}}}]}):(0,o.Z)((0,o.Z)({},t),{},{slots:void 0,children:[v]})}(F,t,j,H,n)),q.portal&&(j.slotId=void 0),L?delete(G=(0,o.Z)({},S)).forEachItem:G=S;var Q=function(){var e=(0,a.Z)((function*(){var e=an(q.children,q.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?Yr(j,r.bricks,G,n,t,p):Qr(j,r.routes,G,n,t)}))),r=(0,o.Z)((0,o.Z)({},f),{},{node:void 0,blockingList:[]});for(var a of t)on(r,a);r.node&&(j.child=r.node),on(f,(0,o.Z)((0,o.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return W.push(Q()),yield Promise.all(W),f})),tn.apply(this,arguments)}function rn(){return(rn=(0,a.Z)((function*(e,t,r,n,a,i,s){var l={blockingList:[],menuRequests:[]},c=yield Promise.all(t.map(((t,l)=>Promise.all(r.map(((r,c)=>en(e,r,(0,o.Z)((0,o.Z)({},n),{},{forEachItem:t}),a,i,l*c,s&&new Map(s))))))));for(var u of c.flat())on(l,u);return l}))).apply(this,arguments)}function nn(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 gt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function on(e,t){var{blockingList:r,node:n,menuRequests:o,hasTrackingControls:a}=t,i=(0,h.Z)(t,zr);if(e.blockingList.push(...r),e.menuRequests.push(...o),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function an(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var o,a=null!==(o=n.slot)&&void 0!==o?o:"";(0,d.hasOwnProperty)(r,a)||(r[a]={type:"bricks",bricks:[]}),r[a].bricks.push(n)}return r}function sn(e,t,r){return"silent"===r?e.catch((e=>{console.error('Load brick "'.concat(t,'" failed:'),e)})):e}function ln(e){var t,{ref:r,runtimeContext:n,element:o}=e;if(r&&n.tplStateStoreId){var{hostBrick:a}=Re(n,"bindTemplateProxy"),i=a.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var l=function(e){if(u.ref===r){var t,n,i,s=t=>{t.bubbles&&t.stopPropagation(),a.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},l=null!==(t=u.refEvent)&&void 0!==t?t:e;o.addEventListener(l,s),null!==(i=(n=o).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),o.$$proxyListeners.push([l,s])}};for(var[c,u]of Object.entries(s))l(c)}}}function cn(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:o}=Re(r,"unbindTemplateProxy"),a=o.tplHostMetadata;for(var[i,s]of(a.internalBricksByRef.delete(t),null!==(l=n.$$proxyListeners)&&void 0!==l?l:[])){var l;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function un(e){e.innerHTML=""}function dn(e,t){for(var r=e.child,n=[];r;){var o=r.type;o.includes("-")&&!customElements.get(o)&&console.error("Undefined custom element: ".concat(o)),"basic-bricks.script-brick"===o&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var a=t&&r===e.child?t:document.createElement(o);if(r.element=a,r.slotId&&a.setAttribute("slot",r.slotId),r.iid&&(a.dataset.iid=r.iid),Pt(a,r.properties),ir(a,r.events,r.runtimeContext),r.tplHostMetadata&&(a.$$tplStateStore=Re({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),ln(r),r.portal?n.push(a):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(a)),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var i,s=r.return;s;){var l;if(s.childElements)s.tag===Kr.ROOT?null===(l=s.container)||void 0===l||l.append(...s.childElements):s.element.append(...s.childElements),s.childElements=void 0;if(s.tag===Kr.ROOT&&n.length>0&&("function"==typeof s.createPortal?s.createPortal():s.createPortal).append(...n),s.sibling)break;s=s.return}r=null===(i=s)||void 0===i?void 0:i.sibling}}}var pn,fn,vn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],hn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],mn=new WeakMap,gn=new WeakMap,yn=new WeakMap,bn=new WeakMap,wn=new WeakMap,Sn=new WeakSet,En=new WeakSet,kn=new WeakSet,Zn=new WeakSet;class In{constructor(e,t){var r;(0,I.Z)(this,Zn),(0,I.Z)(this,kn),(0,I.Z)(this,En),(0,I.Z)(this,Sn),(0,Vt.Z)(this,"scope",void 0),(0,Vt.Z)(this,"unknownBricks",void 0),(0,i.Z)(this,mn,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}}),(0,i.Z)(this,gn,{writable:!0,value:new Map}),(0,i.Z)(this,yn,{writable:!0,value:void 0}),(0,i.Z)(this,bn,{writable:!0,value:new Map}),(0,i.Z)(this,wn,{writable:!0,value:void 0}),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw"}registerBrickLifeCycle(e,t){if(t){var r=[...vn,..."page"===this.scope?hn:[]];for(var n of r){var o=t[n];o&&(0,l.Z)(this,mn)[n].push({brick:e,handlers:o})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}registerArbitraryLifeCycle(e,t){var r=(0,l.Z)(this,bn).get(e);r?r.add(t):(0,l.Z)(this,bn).set(e,new Set([t]))}memoizeControlNode(e,t,r,n){(0,l.Z)(this,wn)||(0,s.Z)(this,wn,new WeakMap);var o="".concat(null!=e?e:"",".").concat(t),a=(0,l.Z)(this,wn).get(n);a||(a=new Map,(0,l.Z)(this,wn).set(n,a)),a.set(o,{node:r,last:Pn(r),lastNormal:Rn(r),lastPortal:_n(r)})}rerenderControlNode(e,t,r,n){var o,a,i,s,c,u="".concat(null!=e?e:"",".").concat(t),d=(0,l.Z)(this,wn).get(n).get(u),{node:p,last:f,lastNormal:v,lastPortal:h}=d,m=null!==(o=null==v||null===(a=v.element)||void 0===a?void 0:a.nextSibling)&&void 0!==o?o:null,g=null!==(i=null==h||null===(s=h.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=Pn(r);d.node=r,d.last=y,d.lastNormal=Rn(r),d.lastPortal=_n(r);for(var b=n.child;b&&b!==f;){if(b.sibling===p){c=b;break}b=b.sibling}var w=document.createDocumentFragment(),S=document.createDocumentFragment(),E={tag:Kr.ROOT,container:w,createPortal:S,child:r};for(b=r;b;)b.return=E,b=b.sibling;var k,Z,I=Mn(p,f);for((0,A.Z)(this,Sn,An).call(this,I),dn(E),c?c.sibling=r:n.child=r,y&&(y.sibling=null==f?void 0:f.sibling),b=r;b;)b.return=n,b=b.sibling;if(n.tag===Kr.ROOT?null===(k=n.container)||void 0===k||k.insertBefore(w,m):null===(Z=n.element)||void 0===Z||Z.insertBefore(w,m),S.childNodes.length>0){for(var C,T=r;T&&T.return;)T=T.return;if((null===(C=T)||void 0===C?void 0:C.tag)!==Kr.ROOT)throw new Error("Cannot find render root node");("function"==typeof T.createPortal?T.createPortal():T.createPortal).insertBefore(S,g)}var O=Mn(r,y);(0,A.Z)(this,En,Cn).call(this,O)}dispose(){for(var e of Object.values((0,l.Z)(this,mn)))e.length=0;for(var t of(0,l.Z)(this,gn).values()){for(var r of t)r.disconnect();t.length=0}(0,l.Z)(this,gn).clear(),(0,l.Z)(this,yn)&&(we.removeEventListener("change",(0,l.Z)(this,yn)),(0,s.Z)(this,yn,void 0)),(0,s.Z)(this,wn,void 0),(0,l.Z)(this,bn).clear()}dispatchBeforePageLoad(){(0,A.Z)(this,kn,Tn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,A.Z)(this,kn,Tn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,A.Z)(this,kn,Tn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,A.Z)(this,kn,Tn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=Z().location;e&&"#"!==e?(0,A.Z)(this,kn,Tn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,A.Z)(this,kn,Tn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,l.Z)(this,mn).onScrollIntoView)(0,A.Z)(this,Zn,On).call(this,e,t)}initializeMediaChange(){(0,s.Z)(this,yn,(e=>{(0,A.Z)(this,kn,Tn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:H(e.detail)}))})),we.addEventListener("change",(0,l.Z)(this,yn))}initializeMessageDispatcher(){var e,t=function(e){var t=function(t){var r;null==uo||null===(r=uo.messageDispatcher)||void 0===r||r.onMessage(t.channel,(r=>{dr(t.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:r}))}))};for(var r of[].concat(n))t(r)};for(var{brick:r,handlers:n}of(0,l.Z)(this,mn).onMessage)t(r);null==uo||null===(e=uo.messageDispatcher)||void 0===e||e.onClose((()=>{(0,A.Z)(this,kn,Tn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,A.Z)(this,kn,Tn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,A.Z)(this,kn,Tn).call(this,"onUnmount",new CustomEvent("unmount"))}}function An(e){var t=[...vn,..."page"===this.scope?hn:[]],r=[];for(var n of t){var o=(0,m.remove)((0,l.Z)(this,mn)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...o)}for(var a of e){var i,s,c=(0,l.Z)(this,gn).get(a);if(null!=c&&c.length){for(var u of c)u.disconnect();c.length=0,(0,l.Z)(this,gn).delete(a)}cn(a),null===(i=a.element)||void 0===i||delete i.$$tplStateStore,null===(s=a.element)||void 0===s||s.remove()}var d=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)dr(f,p.runtimeContext,p)(d)}function Cn(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,l.Z)(this,mn).onMount)e.has(r)&&dr(n,r.runtimeContext,r)(t);for(var{brick:o,handlers:a}of(0,l.Z)(this,mn).onScrollIntoView)e.has(o)&&(0,A.Z)(this,Zn,On).call(this,o,a)}function Tn(e,t){for(var{brick:r,handlers:n}of(0,l.Z)(this,mn)[e])dr(n,r.runtimeContext,r)(t);var o=(0,l.Z)(this,bn).get(e);if(o)for(var a of o)a()}function On(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,o=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(dr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});o.observe(e.element);var a=(0,l.Z)(this,gn).get(e);a||(a=[],(0,l.Z)(this,gn).set(e,a)),a.push(o)}function Pn(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function Rn(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function _n(e){for(var t,r=e;r;)if(r.portal&&(t=r),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var n,o=r.return;o&&!o.sibling;)o=o.return;r=null===(n=o)||void 0===n?void 0:n.sibling}return t}function Mn(e,t){for(var r=new Set,n=e;n;)if(r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var o,a=n.return;a&&a!==t&&!a.sibling;)a=a.return;if(a===t)break;n=null===(o=a)||void 0===o?void 0:o.sibling}}return r}function xn(){if(!pn){if(pn={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){pn.isInIframe=!0;try{if(window.origin===window.parent.origin){pn.isInIframeOfSameSite=!0;var e="/next/"===v(),t=window.parent.location.pathname,r=t.startsWith("/next/");pn.isInIframeOfNext=0==(Number(e)^Number(r)),pn.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),pn.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(pn)}return pn}function Bn(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var o=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);Pe.define(o,n)}}}function Ln(){return Ln=(0,a.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return Un.apply(this,arguments)}(e)),e.$$fulfilling})),Ln.apply(this,arguments)}function Un(){return(Un=(0,a.Z)((function*(e){var t;yield null==uo||null===(t=uo.fulfilStoryboard)||void 0===t?void 0:t.call(uo,e),x(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}var Nn=new WeakMap,Fn=new WeakMap,$n=new WeakMap,jn=new WeakMap,Kn=new WeakMap,Dn=new WeakMap,Wn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,zn=new WeakMap,Gn=new WeakMap,qn=new WeakMap,Qn=new WeakSet,Jn=new WeakSet,Yn=new WeakSet,Xn=new WeakSet;class eo{constructor(e){(0,I.Z)(this,Xn),(0,I.Z)(this,Yn),(0,I.Z)(this,Jn),(0,I.Z)(this,Qn),(0,i.Z)(this,Nn,{writable:!0,value:void 0}),(0,i.Z)(this,Fn,{writable:!0,value:!1}),(0,i.Z)(this,$n,{writable:!0,value:void 0}),(0,i.Z)(this,jn,{writable:!0,value:void 0}),(0,i.Z)(this,Kn,{writable:!0,value:void 0}),(0,i.Z)(this,Dn,{writable:!0,value:void 0}),(0,i.Z)(this,Wn,{writable:!0,value:new Set}),(0,i.Z)(this,Vn,{writable:!0,value:0}),(0,i.Z)(this,Hn,{writable:!0,value:void 0}),(0,i.Z)(this,zn,{writable:!0,value:void 0}),(0,i.Z)(this,Gn,{writable:!0,value:void 0}),(0,i.Z)(this,qn,{writable:!0,value:void 0}),(0,s.Z)(this,Nn,e);var t=Z();window.addEventListener("beforeunload",(e=>{(0,A.Z)(this,Qn,to).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,A.Z)(this,Qn,to).call(this,{location:e,action:t})))}getRenderId(){return(0,l.Z)(this,Hn)}getRuntimeContext(){return(0,l.Z)(this,Kn)}getRecentApps(){return{currentApp:(0,l.Z)(this,zn),previousApp:(0,l.Z)(this,Gn)}}getNavConfig(){return(0,l.Z)(this,qn)}bootstrap(){window.AbortController&&(fn=new AbortController,C.http.interceptors.request.use((e=>{var t;return(0,o.Z)((0,o.Z)({},e),{},{options:(0,o.Z)((0,o.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:fn.signal})})})));var e=Z();return(0,s.Z)(this,$n,e.location),e.listen(((e,t)=>{var r,n,a,i=!1,c={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,l.Z)(this,$n).key&&!1!==(null===(r=(0,l.Z)(this,$n).state)||void 0===r?void 0:r.notify))||(c.key=void 0),((0,f.locationsAreEqual)((0,o.Z)((0,o.Z)({},(0,l.Z)(this,$n)),c),(0,o.Z)((0,o.Z)({},e),c))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,s.Z)(this,$n,e);else{if(fn&&(fn.abort(),fn=new AbortController),(0,s.Z)(this,$n,e),null===(a=(0,l.Z)(this,Dn))||void 0===a||a.dispatchPageLeave(),"POP"===t&&y(g((0,l.Z)(this,Nn),e.pathname)))return void window.location.reload();(0,l.Z)(this,Fn)?(0,s.Z)(this,jn,e):(0,A.Z)(this,Yn,no).call(this,e).catch(or)}})),(0,A.Z)(this,Yn,no).call(this,e.location)}}function to(e){var t,r=Z(),n=r.getBlockMessage();null===(t=(0,l.Z)(this,Dn))||void 0===t||t.dispatchBeforePageLeave(e);var o=r.getBlockMessage();return!n&&o&&r.unblock(),o}function ro(e,t,r){var n,o;if((0,s.Z)(this,Vn,(n=(0,l.Z)(this,Vn),o=n++,n)),o>10){var a='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(a)}Z().replace(e,t)}function no(e){return oo.apply(this,arguments)}function oo(){return(oo=(0,a.Z)((function*(e){(0,s.Z)(this,Fn,!0);try{yield(0,A.Z)(this,Xn,ao).call(this,e)}finally{if((0,s.Z)(this,Fn,!1),(0,l.Z)(this,jn)){var t=(0,l.Z)(this,jn);(0,s.Z)(this,jn,void 0),yield(0,A.Z)(this,Yn,no).call(this,t)}}}))).apply(this,arguments)}function ao(e){return io.apply(this,arguments)}function io(){return io=(0,a.Z)((function*(e){var t,r;(0,s.Z)(this,Hn,(0,m.uniqueId)("render-id-1")),vt=new WeakSet,Je.clear(),null==uo||null===(t=uo.flowApi)||void 0===t||t.clearCollectWidgetContract(),Z().unblock();var n=g((0,l.Z)(this,Nn),e.pathname),a=null===(r=(0,l.Z)(this,Kn))||void 0===r?void 0:r.app;null!=n&&n.app&&(yield function(e){return Ln.apply(this,arguments)}(n));var i=(0,s.Z)(this,zn,null==n?void 0:n.app),c=a&&i?a.id!==i.id:a!==i,d=vo().getFeatureFlags(),p=(0,l.Z)(this,Dn),f=(t,r)=>{(0,l.Z)(this,Wn).add(p),(0,A.Z)(this,Jn,ro).call(this,t,r,e)},v=()=>{var t=d["sso-enabled"]?"/sso-auth/login":"/auth/login";f(t,{from:e})},h=document.querySelector("#main-mount-point"),y=document.querySelector("#portal-mount-point"),b={tag:Kr.ROOT,container:h,createPortal:y},w=()=>{var e;for(var t of(un(h),un(y),(0,l.Z)(this,Wn).add(p),(0,l.Z)(this,Wn)))t&&(t.dispatchOnUnmount(),t.dispose());(0,l.Z)(this,Wn).clear(),null==uo||null===(e=uo.messageDispatcher)||void 0===e||e.reset(),c&&((0,s.Z)(this,Gn,a),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:a,currentApp:i}})))};if(J(i&&(re()[i.id]||i.theme)||"light"),oe("default"),i){var S,E,k,I,T,O;null==uo||null===(S=uo.checkInstalledApps)||void 0===S||S.preCheckInstalledApps(n,(e=>!!Eo(e)));var P=(0,s.Z)(this,Dn,new In("page")),R=(0,s.Z)(this,Kn,{app:i,location:e,query:new URLSearchParams(e.search),flags:d,sys:(0,o.Z)((0,o.Z)((0,o.Z)({},null==uo||null===(E=uo.auth)||void 0===E?void 0:E.getAuth()),xn()),{},{settings:{brand:vo().getBrandSettings()}}),ctxStore:new _r("CTX",void 0,P),pendingPermissionsPreCheck:[null==uo||null===(k=uo.checkPermissions)||void 0===k?void 0:k.preCheckPermissions(n)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,s.Z)(this,qn,void 0),Bn(n),ve(null===(I=n.meta)||void 0===I?void 0:I.functions,i),null==uo||null===(T=uo.flowApi)||void 0===T||T.collectContract(null===(O=n.meta)||void 0===O?void 0:O.contracts);var _,M=!1,x=[];try{if((_=yield Qr(b,function(e){if(window.parent===window)return e;var t=e,r=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(n.routes),R,P)).unauthenticated)return void v();if(_.redirect)return void f(_.redirect.path,_.redirect.state);(0,s.Z)(this,Vn,0),(0,u.flushStableLoadBricks)(),x=[R.ctxStore,...R.tplStateStoreMap.values(),...R.formStateStoreMap.values()],yield Promise.all([..._.blockingList,...x.map((e=>e.waitForAll())),...R.pendingPermissionsPreCheck]);var B=yield Promise.all(_.menuRequests);(0,s.Z)(this,qn,function(e){var t={breadcrumb:[]};for(var r of e)if(r){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(B))}catch(e){if(console.error("Router failed:",e),er(e)&&!window.NO_AUTH_GUARD)return void v();if(e instanceof C.HttpAbortError)return void(0,l.Z)(this,Wn).add(p);M=!0,_={node:{tag:Kr.BRICK,type:"div",properties:{textContent:Xt(e)},runtimeContext:null,return:b},blockingList:[],menuRequests:[]}}if(b.child=_.node,w(),_.route&&"routes"!==_.route.type||M){if(M||P.dispatchBeforePageLoad(),ee(),ie(),dn(b),window.scrollTo(0,0),!M){for(var L of x)L.handleAsyncAfterMount();P.dispatchPageLoad(),P.dispatchAnchorLoad(),P.dispatchOnMount(),P.initializeScrollIntoView(),P.initializeMediaChange(),P.initializeMessageDispatcher()}return}}else{if(!window.NO_AUTH_GUARD&&null!=uo&&uo.auth&&!uo.auth.isLoggedIn())return void v();w()}ee(),ie();var U={tag:Kr.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:b};b.child=U,dn(b),window.scrollTo(0,0)})),io.apply(this,arguments)}var so,lo,co,uo,po="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:[];function fo(e){if(so)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{var{data:t}=e;if((null==t?void 0:t.source)===F){var r=t.payload;switch(null==r?void 0:r.type){case $:K=r.active;break;case j:N=r.panel}}})),uo=null==e?void 0:e.hooks,(0,c.initializeI18n)(Qt,Jt),p.locale(c.i18n.language),c.i18n.on("languageChanged",(()=>{p.locale(c.i18n.language)})),k(),so=new go}function vo(){return so}var ho=new WeakMap,mo=new WeakMap;class go{constructor(){(0,i.Z)(this,ho,{writable:!0,value:!1}),(0,i.Z)(this,mo,{writable:!0,value:!1})}initialize(e){var t,r;if((0,l.Z)(this,ho))throw new Error("The runtime cannot be initialized more than once");(0,s.Z)(this,ho,!0),function(e){if(Array.isArray(e.storyboards)){var t=function(){if(r.locales){var e="tmp/".concat(r.id);Object.entries(r.locales).forEach((t=>{var[r,n]=t;c.i18n.addResourceBundle(r,e,n)})),r.localeName=c.i18n.getFixedT(null,e)("name",r.name),Object.keys(r.locales).forEach((t=>{c.i18n.removeResourceBundle(t,e)}))}else r.localeName=r.name};for(var{app:r}of e.storyboards)t()}(0,d.isObject)(e.settings)&&(0,d.deepFreeze)(e.settings),e.brickPackages&&(0,d.deepFreeze)(e.brickPackages)}(e),lo=e;var n,{notification:o,dialog:a}=null!==(t=null===(r=e.settings)||void 0===r?void 0:r.presetBricks)&&void 0!==t?t:{};!1!==o&&(n=null!=o?o:"basic.show-notification",(0,this.loadBricks)([n]).then((()=>{rr=document.createElement(n)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==a&&function(e,t){t([e]).then((()=>{jt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=a?a:"basic.show-dialog",this.loadBricks)}bootstrap(e){var t=this;return(0,a.Z)((function*(){if(e&&t.initialize(e),(0,l.Z)(t,mo))throw new Error("The runtime cannot be bootstrapped more than once");(0,s.Z)(t,mo,!0),co=new eo(lo.storyboards),yield co.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=co)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=co)||void 0===e?void 0:e.getRecentApps().currentApp}getFeatureFlags(){var e,t,r,n,a,i;return(0,o.Z)((0,o.Z)((0,o.Z)({},null===(e=lo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.featureFlags),null===(r=co)||void 0===r||null===(n=r.getRecentApps().currentApp)||void 0===n||null===(a=n.config)||void 0===a||null===(i=a.settings)||void 0===i?void 0:i.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t,r,n,a,i;return(0,o.Z)((0,o.Z)({},null===(e=lo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.misc),null===(r=co)||void 0===r||null===(n=r.getRecentApps().currentApp)||void 0===n||null===(a=n.config)||void 0===a||null===(i=a.settings)||void 0===i?void 0:i.misc)}getBrandSettings(){var e,t;return(0,o.Z)({base_title:"DevOps 管理专家"},null===(e=lo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.brand)}getLaunchpadSettings(){var e,t;return(0,o.Z)({columns:7,rows:4},null===(e=lo)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=lo)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=lo)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){var e;return null===(e=co)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,u.loadBricksImperatively)(e,yo())}}function yo(){var e,t;return null!==(e=null===(t=lo)||void 0===t?void 0:t.brickPackages)&&void 0!==e?e:po}function bo(){var e;return null===(e=co)||void 0===e?void 0:e.getRenderId()}function wo(){var e;return null===(e=co)||void 0===e?void 0:e.getRuntimeContext()}function So(e){var t,r;return null===(t=lo)||void 0===t||null===(r=t.storyboards)||void 0===r?void 0:r.find((t=>t.app.id===e))}function Eo(e){var t;return null===(t=So(e))||void 0===t?void 0:t.app}function ko(){for(var e,t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null==uo||null===(e=uo.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function Zo(){var e;return null==uo||null===(e=uo.auth)||void 0===e?void 0:e.getAuth()}function Io(){var e,t;return null==uo||null===(e=uo.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function Ao(){var e;return null==uo||null===(e=uo.auth)||void 0===e?void 0:e.isLoggedIn()}function Co(e,t,r){return To.apply(this,arguments)}function To(){return(To=(0,a.Z)((function*(e,t,r){return et(yield qe(e),e,"resolve",t,r)}))).apply(this,arguments)}function Oo(e){var t,{portal:r,scope:n="fragment",unknownBricks:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;t=r||(()=>((i=document.createElement("div")).style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));var s,l,c=!1;return{render(r){var d=arguments;return(0,a.Z)((function*(){var{theme:a,context:p,functions:f,templates:v,i18n:h}=d.length>1&&void 0!==d[1]?d[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");var m=[].concat(r),g=s;s=new In(n,{unknownBricks:o});var y={ctxStore:new _r("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map},b={tag:Kr.ROOT,container:e,createPortal:t};if("page"===n){var w;J(null!=a?a:"light"),oe("default");var S={id:"demo",homepage:"/demo"};y.app=S;var E={app:S,meta:{i18n:h,customTemplates:v}};null===(w=l)||void 0===w||w(),l=x(E),Bn(E),ve(f,S)}y.ctxStore.define(p,y);var k,Z=!1,I=[];try{k=yield Yr(b,m,y,s),(0,u.flushStableLoadBricks)(),I=[y.ctxStore,...y.tplStateStoreMap.values(),...y.formStateStoreMap.values()],yield Promise.all([...k.blockingList,...I.map((e=>e.waitForAll())),...y.pendingPermissionsPreCheck])}catch(e){Z=!0,k={node:{tag:Kr.BRICK,type:"div",properties:{textContent:Xt(e)},return:b,runtimeContext:null},blockingList:[],menuRequests:[]}}if(b.child=k.node,null==g||g.dispatchOnUnmount(),null==g||g.dispose(),un(e),i&&un(i),"page"===n&&(Z||s.dispatchBeforePageLoad(),ee(),ie()),dn(b),"page"===n&&window.scrollTo(0,0),!Z){for(var A of I)A.handleAsyncAfterMount();"page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher()}}))()},unmount(){c||(c=!0,un(e),i&&(un(i),r||i.remove()))}}}function Po(e,t){return Ro.apply(this,arguments)}function Ro(){return(Ro=(0,a.Z)((function*(e,t){var r,n,a,i=[],s=[],l=(0,o.Z)((0,o.Z)({},wo()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreScope:i,formStateStoreScope:s});null!==(r=l.tplStateStoreMap)&&void 0!==r||(l.tplStateStoreMap=new Map),null!==(n=l.formStateStoreMap)&&void 0!==n||(l.formStateStoreMap=new Map);var c=new In("fragment"),d={tag:Kr.ROOT,createPortal:null},p=e.transform,f=Ae();p&&Ce(f,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var v=yield en(d,f?e:(0,o.Z)((0,o.Z)({},e),{},{properties:(0,o.Z)((0,o.Z)({},e.properties),p)}),l,c);(0,u.flushStableLoadBricks)();var h=[...i,...s];if(yield Promise.all([...v.blockingList,...h.map((e=>e.waitForAll())),...l.pendingPermissionsPreCheck]),null!==(a=v.node)&&void 0!==a&&a.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return d.child=v.node,{tagName:v.node?v.node.type:null,renderRoot:d,rendererContext:c,scopedStores:h}}))).apply(this,arguments)}function _o(e,t){var r,{renderRoot:n,rendererContext:o,scopedStores:a}=e;for(var i of(n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},dn(n,t),a))i.handleAsyncAfterMount();return o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher(),{portal:r}}function Mo(e,t){var{rendererContext:r}=e;t.portal&&(un(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function xo(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return bt(t,(0,o.Z)((0,o.Z)({},wo()),{},{data:e}),{noInject:!0})}function Bo(e,t){var r=So(e);Object.assign(r,(0,o.Z)((0,o.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),x(r)}function Lo(e,t){var r=So(e),n=!1,o=e=>"".concat(e.path,".").concat(e.exact),a=(e,r)=>e.map((e=>{var i=o(e);return"routes"===e.type?(e.routes=a(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=a(r.routes,o(t)),n||r.routes.unshift(t)}function Uo(e,t,r){var n="".concat(e,".").concat(t.name);Pe.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),No(e,t.name,r)}function No(e,t,r){jo(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,o.Z)({brick:t},(0,m.pick)(r,"properties","events","lifeCycle","context"))])}function Fo(e,t){var r;jo(e,"${APP.homepage}/_dev_only_/snippet-preview/".concat(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}])}var $o=Fo;function jo(e,t,r){var{routes:n}=So(e),o=n.findIndex((e=>e.path===t)),a={path:t,bricks:r,menu:!1,exact:!0};-1===o?n.unshift(a):n.splice(o,1,a)}}}]);
2
- //# sourceMappingURL=4131.e68c1d31.js.map