@pine-ds/core 3.2.0 → 3.4.0

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 (627) hide show
  1. package/components/floating-ui.dom.js +1321 -0
  2. package/components/floating-ui.dom.js.map +1 -0
  3. package/components/index.d.ts +4 -0
  4. package/components/index.js +2 -0
  5. package/components/index.js.map +1 -1
  6. package/components/index2.js +1 -1
  7. package/components/index2.js.map +1 -1
  8. package/components/mock-pds-modal.js +1 -1
  9. package/components/pds-box2.js.map +1 -1
  10. package/components/pds-button2.js +1 -1
  11. package/components/pds-button2.js.map +1 -1
  12. package/components/pds-chip.js +21 -6
  13. package/components/pds-chip.js.map +1 -1
  14. package/components/pds-combobox.d.ts +11 -0
  15. package/components/pds-combobox.js +1771 -0
  16. package/components/pds-combobox.js.map +1 -0
  17. package/components/pds-copytext.js +1 -1
  18. package/components/pds-divider.js +1 -1
  19. package/components/pds-dropdown-menu-item.js +1 -1
  20. package/components/pds-dropdown-menu-separator.js +1 -1
  21. package/components/pds-dropdown-menu.js +4 -1320
  22. package/components/pds-dropdown-menu.js.map +1 -1
  23. package/components/pds-icon2.js +151 -18
  24. package/components/pds-icon2.js.map +1 -1
  25. package/components/pds-image.js +2 -2
  26. package/components/pds-input.js +111 -21
  27. package/components/pds-input.js.map +1 -1
  28. package/components/pds-link2.js +2 -2
  29. package/components/pds-loader2.js +1 -1
  30. package/components/pds-modal-content.js +2 -2
  31. package/components/pds-modal-footer.js +1 -1
  32. package/components/pds-modal-header.js +1 -1
  33. package/components/pds-modal.js +2 -2
  34. package/components/pds-popover.js +1 -1
  35. package/components/pds-progress.js +1 -1
  36. package/components/pds-property.d.ts +11 -0
  37. package/components/pds-property.js +55 -0
  38. package/components/pds-property.js.map +1 -0
  39. package/components/pds-radio.js +3 -3
  40. package/components/pds-row.js +1 -1
  41. package/components/pds-select.js +12 -3
  42. package/components/pds-select.js.map +1 -1
  43. package/components/pds-sortable-item.js +1 -1
  44. package/components/pds-sortable.js +1 -1
  45. package/components/pds-switch.js +3 -3
  46. package/components/pds-tab.js +3 -3
  47. package/components/pds-table-body.js +1 -1
  48. package/components/pds-table-cell2.js +2 -2
  49. package/components/pds-table-head-cell2.js +2 -2
  50. package/components/pds-table-head.js +1 -1
  51. package/components/pds-table-row.js +1 -1
  52. package/components/pds-table.js +1 -1
  53. package/components/pds-tabpanel.js +1 -1
  54. package/components/pds-tabs.js +1 -1
  55. package/components/pds-text2.js +1 -1
  56. package/components/pds-text2.js.map +1 -1
  57. package/components/pds-textarea.js +18 -5
  58. package/components/pds-textarea.js.map +1 -1
  59. package/components/pds-toast.js +3 -3
  60. package/components/pds-tooltip.js +17 -1
  61. package/components/pds-tooltip.js.map +1 -1
  62. package/dist/cjs/floating-ui.dom-Bz4BD-cr.js +1326 -0
  63. package/dist/cjs/floating-ui.dom-Bz4BD-cr.js.map +1 -0
  64. package/dist/cjs/{index-CG2Rr2io.js → index-BfqrB2cC.js} +3 -3
  65. package/dist/cjs/index-BfqrB2cC.js.map +1 -0
  66. package/dist/cjs/loader.cjs.js +1 -1
  67. package/dist/cjs/mock-pds-modal.cjs.entry.js +1 -1
  68. package/dist/cjs/pds-accordion.cjs.entry.js +1 -1
  69. package/dist/cjs/pds-avatar.cjs.entry.js +1 -1
  70. package/dist/cjs/pds-box.cjs.entry.js.map +1 -1
  71. package/dist/cjs/pds-box.entry.cjs.js.map +1 -1
  72. package/dist/cjs/pds-button.cjs.entry.js +2 -2
  73. package/dist/cjs/pds-button.cjs.entry.js.map +1 -1
  74. package/dist/cjs/pds-button.entry.cjs.js.map +1 -1
  75. package/dist/cjs/pds-checkbox.cjs.entry.js +1 -1
  76. package/dist/cjs/pds-chip.cjs.entry.js +21 -7
  77. package/dist/cjs/pds-chip.cjs.entry.js.map +1 -1
  78. package/dist/cjs/pds-chip.entry.cjs.js.map +1 -1
  79. package/dist/cjs/pds-combobox.cjs.entry.js +1717 -0
  80. package/dist/cjs/pds-combobox.cjs.entry.js.map +1 -0
  81. package/dist/cjs/pds-combobox.entry.cjs.js.map +1 -0
  82. package/dist/cjs/pds-copytext.cjs.entry.js +2 -2
  83. package/dist/cjs/pds-divider.cjs.entry.js +1 -1
  84. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +1 -1
  85. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +1 -1
  86. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +4 -1320
  87. package/dist/cjs/pds-dropdown-menu.cjs.entry.js.map +1 -1
  88. package/dist/cjs/pds-dropdown-menu.entry.cjs.js.map +1 -1
  89. package/dist/cjs/pds-icon.cjs.entry.js +148 -15
  90. package/dist/cjs/pds-icon.cjs.entry.js.map +1 -1
  91. package/dist/cjs/pds-icon.entry.cjs.js.map +1 -1
  92. package/dist/cjs/pds-image.cjs.entry.js +2 -2
  93. package/dist/cjs/pds-input.cjs.entry.js +100 -21
  94. package/dist/cjs/pds-input.cjs.entry.js.map +1 -1
  95. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  96. package/dist/cjs/pds-link.cjs.entry.js +3 -3
  97. package/dist/cjs/pds-loader.cjs.entry.js +1 -1
  98. package/dist/cjs/pds-modal-content.cjs.entry.js +2 -2
  99. package/dist/cjs/pds-modal-footer.cjs.entry.js +1 -1
  100. package/dist/cjs/pds-modal-header.cjs.entry.js +1 -1
  101. package/dist/cjs/pds-modal.cjs.entry.js +2 -2
  102. package/dist/cjs/pds-popover.cjs.entry.js +1 -1
  103. package/dist/cjs/pds-progress.cjs.entry.js +1 -1
  104. package/dist/cjs/pds-property.cjs.entry.js +24 -0
  105. package/dist/cjs/pds-property.cjs.entry.js.map +1 -0
  106. package/dist/cjs/pds-property.entry.cjs.js.map +1 -0
  107. package/dist/cjs/pds-radio.cjs.entry.js +4 -4
  108. package/dist/cjs/pds-row.cjs.entry.js +1 -1
  109. package/dist/cjs/pds-select.cjs.entry.js +12 -4
  110. package/dist/cjs/pds-select.cjs.entry.js.map +1 -1
  111. package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
  112. package/dist/cjs/pds-sortable-item.cjs.entry.js +2 -2
  113. package/dist/cjs/pds-sortable.cjs.entry.js +1 -1
  114. package/dist/cjs/pds-switch.cjs.entry.js +4 -4
  115. package/dist/cjs/pds-tab.cjs.entry.js +3 -3
  116. package/dist/cjs/pds-table-body.cjs.entry.js +1 -1
  117. package/dist/cjs/pds-table-cell.cjs.entry.js +2 -2
  118. package/dist/cjs/pds-table-head-cell.cjs.entry.js +3 -3
  119. package/dist/cjs/pds-table-head.cjs.entry.js +1 -1
  120. package/dist/cjs/pds-table-row.cjs.entry.js +1 -1
  121. package/dist/cjs/pds-table.cjs.entry.js +1 -1
  122. package/dist/cjs/pds-tabpanel.cjs.entry.js +1 -1
  123. package/dist/cjs/pds-tabs.cjs.entry.js +1 -1
  124. package/dist/cjs/pds-text.cjs.entry.js +1 -1
  125. package/dist/cjs/pds-text.cjs.entry.js.map +1 -1
  126. package/dist/cjs/pds-text.entry.cjs.js.map +1 -1
  127. package/dist/cjs/pds-textarea.cjs.entry.js +18 -6
  128. package/dist/cjs/pds-textarea.cjs.entry.js.map +1 -1
  129. package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
  130. package/dist/cjs/pds-toast.cjs.entry.js +3 -3
  131. package/dist/cjs/pds-tooltip.cjs.entry.js +17 -1
  132. package/dist/cjs/pds-tooltip.cjs.entry.js.map +1 -1
  133. package/dist/cjs/pds-tooltip.entry.cjs.js.map +1 -1
  134. package/dist/cjs/pine-core.cjs.js +1 -1
  135. package/dist/collection/collection-manifest.json +2 -0
  136. package/dist/collection/components/pds-button/pds-button.css +17 -5
  137. package/dist/collection/components/pds-chip/pds-chip.css +48 -11
  138. package/dist/collection/components/pds-chip/pds-chip.js +42 -9
  139. package/dist/collection/components/pds-chip/pds-chip.js.map +1 -1
  140. package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +17 -0
  141. package/dist/collection/components/pds-combobox/pds-combobox.css +223 -0
  142. package/dist/collection/components/pds-combobox/pds-combobox.js +783 -0
  143. package/dist/collection/components/pds-combobox/pds-combobox.js.map +1 -0
  144. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +194 -0
  145. package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
  146. package/dist/collection/components/pds-divider/pds-divider.js +1 -1
  147. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +1 -1
  148. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
  149. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +1 -1
  150. package/dist/collection/components/pds-image/pds-image.js +2 -2
  151. package/dist/collection/components/pds-input/pds-input.css +184 -43
  152. package/dist/collection/components/pds-input/pds-input.js +226 -21
  153. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  154. package/dist/collection/components/pds-input/stories/pds-input.stories.js +182 -0
  155. package/dist/collection/components/pds-link/pds-link.js +2 -2
  156. package/dist/collection/components/pds-loader/pds-loader.js +1 -1
  157. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
  158. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
  159. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
  160. package/dist/collection/components/pds-modal/pds-modal.js +2 -2
  161. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
  162. package/dist/collection/components/pds-popover/pds-popover.js +1 -1
  163. package/dist/collection/components/pds-progress/pds-progress.js +1 -1
  164. package/dist/collection/components/pds-property/pds-property.css +4 -0
  165. package/dist/collection/components/pds-property/pds-property.js +71 -0
  166. package/dist/collection/components/pds-property/pds-property.js.map +1 -0
  167. package/dist/collection/components/pds-property/stories/pds-property.stories.js +20 -0
  168. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  169. package/dist/collection/components/pds-row/pds-row.js +1 -1
  170. package/dist/collection/components/pds-select/pds-select.css +53 -5
  171. package/dist/collection/components/pds-select/pds-select.js +32 -2
  172. package/dist/collection/components/pds-select/pds-select.js.map +1 -1
  173. package/dist/collection/components/pds-select/stories/pds-select.stories.js +44 -0
  174. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  175. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  176. package/dist/collection/components/pds-switch/pds-switch.js +3 -3
  177. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  178. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  179. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  180. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
  181. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  182. package/dist/collection/components/pds-table/pds-table.js +1 -1
  183. package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +3 -3
  184. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
  185. package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
  186. package/dist/collection/components/pds-text/pds-text.js +4 -1
  187. package/dist/collection/components/pds-text/pds-text.js.map +1 -1
  188. package/dist/collection/components/pds-textarea/pds-textarea.css +18 -0
  189. package/dist/collection/components/pds-textarea/pds-textarea.js +21 -5
  190. package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
  191. package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +48 -1
  192. package/dist/collection/components/pds-toast/pds-toast.js +3 -3
  193. package/dist/collection/components/pds-tooltip/pds-tooltip.js +17 -1
  194. package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +1 -1
  195. package/dist/docs.json +1162 -227
  196. package/dist/esm/floating-ui.dom-D_FwyeSw.js +1321 -0
  197. package/dist/esm/floating-ui.dom-D_FwyeSw.js.map +1 -0
  198. package/dist/esm/{index-_4gljHh-.js → index-CzVv99mW.js} +3 -3
  199. package/dist/esm/index-CzVv99mW.js.map +1 -0
  200. package/dist/esm/loader.js +1 -1
  201. package/dist/esm/mock-pds-modal.entry.js +1 -1
  202. package/dist/esm/pds-accordion.entry.js +1 -1
  203. package/dist/esm/pds-avatar.entry.js +1 -1
  204. package/dist/esm/pds-box.entry.js.map +1 -1
  205. package/dist/esm/pds-button.entry.js +2 -2
  206. package/dist/esm/pds-button.entry.js.map +1 -1
  207. package/dist/esm/pds-checkbox.entry.js +1 -1
  208. package/dist/esm/pds-chip.entry.js +21 -7
  209. package/dist/esm/pds-chip.entry.js.map +1 -1
  210. package/dist/esm/pds-combobox.entry.js +1715 -0
  211. package/dist/esm/pds-combobox.entry.js.map +1 -0
  212. package/dist/esm/pds-copytext.entry.js +2 -2
  213. package/dist/esm/pds-divider.entry.js +1 -1
  214. package/dist/esm/pds-dropdown-menu-item.entry.js +1 -1
  215. package/dist/esm/pds-dropdown-menu-separator.entry.js +1 -1
  216. package/dist/esm/pds-dropdown-menu.entry.js +2 -1318
  217. package/dist/esm/pds-dropdown-menu.entry.js.map +1 -1
  218. package/dist/esm/pds-icon.entry.js +148 -15
  219. package/dist/esm/pds-icon.entry.js.map +1 -1
  220. package/dist/esm/pds-image.entry.js +2 -2
  221. package/dist/esm/pds-input.entry.js +100 -21
  222. package/dist/esm/pds-input.entry.js.map +1 -1
  223. package/dist/esm/pds-link.entry.js +3 -3
  224. package/dist/esm/pds-loader.entry.js +1 -1
  225. package/dist/esm/pds-modal-content.entry.js +2 -2
  226. package/dist/esm/pds-modal-footer.entry.js +1 -1
  227. package/dist/esm/pds-modal-header.entry.js +1 -1
  228. package/dist/esm/pds-modal.entry.js +2 -2
  229. package/dist/esm/pds-popover.entry.js +1 -1
  230. package/dist/esm/pds-progress.entry.js +1 -1
  231. package/dist/esm/pds-property.entry.js +22 -0
  232. package/dist/esm/pds-property.entry.js.map +1 -0
  233. package/dist/esm/pds-radio.entry.js +4 -4
  234. package/dist/esm/pds-row.entry.js +1 -1
  235. package/dist/esm/pds-select.entry.js +13 -5
  236. package/dist/esm/pds-select.entry.js.map +1 -1
  237. package/dist/esm/pds-sortable-item.entry.js +2 -2
  238. package/dist/esm/pds-sortable.entry.js +1 -1
  239. package/dist/esm/pds-switch.entry.js +4 -4
  240. package/dist/esm/pds-tab.entry.js +3 -3
  241. package/dist/esm/pds-table-body.entry.js +1 -1
  242. package/dist/esm/pds-table-cell.entry.js +2 -2
  243. package/dist/esm/pds-table-head-cell.entry.js +3 -3
  244. package/dist/esm/pds-table-head.entry.js +1 -1
  245. package/dist/esm/pds-table-row.entry.js +1 -1
  246. package/dist/esm/pds-table.entry.js +1 -1
  247. package/dist/esm/pds-tabpanel.entry.js +1 -1
  248. package/dist/esm/pds-tabs.entry.js +1 -1
  249. package/dist/esm/pds-text.entry.js +1 -1
  250. package/dist/esm/pds-text.entry.js.map +1 -1
  251. package/dist/esm/pds-textarea.entry.js +18 -6
  252. package/dist/esm/pds-textarea.entry.js.map +1 -1
  253. package/dist/esm/pds-toast.entry.js +3 -3
  254. package/dist/esm/pds-tooltip.entry.js +17 -1
  255. package/dist/esm/pds-tooltip.entry.js.map +1 -1
  256. package/dist/esm/pine-core.js +1 -1
  257. package/dist/esm-es5/floating-ui.dom-D_FwyeSw.js +2 -0
  258. package/dist/esm-es5/floating-ui.dom-D_FwyeSw.js.map +1 -0
  259. package/dist/esm-es5/{index-_4gljHh-.js → index-CzVv99mW.js} +1 -1
  260. package/dist/esm-es5/index-CzVv99mW.js.map +1 -0
  261. package/dist/esm-es5/loader.js +1 -1
  262. package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
  263. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  264. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  265. package/dist/esm-es5/pds-box.entry.js.map +1 -1
  266. package/dist/esm-es5/pds-button.entry.js +1 -1
  267. package/dist/esm-es5/pds-button.entry.js.map +1 -1
  268. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  269. package/dist/esm-es5/pds-chip.entry.js +1 -1
  270. package/dist/esm-es5/pds-chip.entry.js.map +1 -1
  271. package/dist/esm-es5/pds-combobox.entry.js +3 -0
  272. package/dist/esm-es5/pds-combobox.entry.js.map +1 -0
  273. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  274. package/dist/esm-es5/pds-divider.entry.js +1 -1
  275. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  276. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
  277. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  278. package/dist/esm-es5/pds-dropdown-menu.entry.js.map +1 -1
  279. package/dist/esm-es5/pds-icon.entry.js +1 -1
  280. package/dist/esm-es5/pds-icon.entry.js.map +1 -1
  281. package/dist/esm-es5/pds-image.entry.js +1 -1
  282. package/dist/esm-es5/pds-input.entry.js +1 -1
  283. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  284. package/dist/esm-es5/pds-link.entry.js +1 -1
  285. package/dist/esm-es5/pds-loader.entry.js +1 -1
  286. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  287. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  288. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  289. package/dist/esm-es5/pds-modal.entry.js +1 -1
  290. package/dist/esm-es5/pds-popover.entry.js +1 -1
  291. package/dist/esm-es5/pds-progress.entry.js +1 -1
  292. package/dist/esm-es5/pds-property.entry.js +2 -0
  293. package/dist/esm-es5/pds-property.entry.js.map +1 -0
  294. package/dist/esm-es5/pds-radio.entry.js +1 -1
  295. package/dist/esm-es5/pds-row.entry.js +1 -1
  296. package/dist/esm-es5/pds-select.entry.js +1 -1
  297. package/dist/esm-es5/pds-select.entry.js.map +1 -1
  298. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  299. package/dist/esm-es5/pds-sortable.entry.js +1 -1
  300. package/dist/esm-es5/pds-switch.entry.js +1 -1
  301. package/dist/esm-es5/pds-tab.entry.js +1 -1
  302. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  303. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  304. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  305. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  306. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  307. package/dist/esm-es5/pds-table.entry.js +1 -1
  308. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  309. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  310. package/dist/esm-es5/pds-text.entry.js +1 -1
  311. package/dist/esm-es5/pds-text.entry.js.map +1 -1
  312. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  313. package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
  314. package/dist/esm-es5/pds-toast.entry.js +1 -1
  315. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  316. package/dist/esm-es5/pds-tooltip.entry.js.map +1 -1
  317. package/dist/esm-es5/pine-core.js +1 -1
  318. package/dist/pine-core/{p-e2dc81c0.entry.js → p-000ed179.entry.js} +2 -2
  319. package/dist/pine-core/{p-c1b0f921.system.entry.js → p-0c6e9ba0.system.entry.js} +2 -2
  320. package/dist/pine-core/p-160c6806.system.entry.js +2 -0
  321. package/dist/pine-core/p-160c6806.system.entry.js.map +1 -0
  322. package/dist/pine-core/p-1e056ca3.system.entry.js +2 -0
  323. package/dist/pine-core/p-1e056ca3.system.entry.js.map +1 -0
  324. package/dist/pine-core/{p-596e0292.system.entry.js → p-1ef5f46b.system.entry.js} +2 -2
  325. package/dist/pine-core/{p-7ff213bb.system.entry.js → p-256d15bc.system.entry.js} +2 -2
  326. package/dist/pine-core/{p-17d3fa8b.entry.js → p-27b52fc5.entry.js} +2 -2
  327. package/dist/pine-core/{p-833f08f3.entry.js → p-2a2cd90d.entry.js} +2 -2
  328. package/dist/pine-core/{p-4288c861.entry.js → p-2f0aedfa.entry.js} +2 -2
  329. package/dist/pine-core/{p-78cb1c40.system.entry.js → p-2fbc5f8c.system.entry.js} +2 -2
  330. package/dist/pine-core/{p-b7ba6316.entry.js → p-30449e82.entry.js} +2 -2
  331. package/dist/pine-core/p-307b456a.entry.js +2 -0
  332. package/dist/pine-core/p-307b456a.entry.js.map +1 -0
  333. package/dist/pine-core/{p-761946a0.entry.js → p-31fe86a6.entry.js} +2 -2
  334. package/dist/pine-core/p-357b6dd6.system.entry.js +2 -0
  335. package/dist/pine-core/{p-85ff1482.entry.js → p-36d3352a.entry.js} +2 -2
  336. package/dist/pine-core/p-38248640.entry.js +2 -0
  337. package/dist/pine-core/p-38248640.entry.js.map +1 -0
  338. package/dist/pine-core/{p-3798a631.system.entry.js → p-383af1d4.system.entry.js} +2 -2
  339. package/dist/pine-core/{p-bcc4edaa.entry.js → p-39fbd912.entry.js} +2 -2
  340. package/dist/pine-core/p-3b43a1ea.entry.js +2 -0
  341. package/dist/pine-core/{p-a52b1413.entry.js.map → p-3b43a1ea.entry.js.map} +1 -1
  342. package/dist/pine-core/{p-5c4aceb7.entry.js → p-3bbb6fc1.entry.js} +2 -2
  343. package/dist/pine-core/p-3df372d1.entry.js +3 -0
  344. package/dist/pine-core/p-3df372d1.entry.js.map +1 -0
  345. package/dist/pine-core/p-3fd658ad.system.entry.js +2 -0
  346. package/dist/pine-core/p-3fd658ad.system.entry.js.map +1 -0
  347. package/dist/pine-core/p-447fa824.system.entry.js +2 -0
  348. package/dist/pine-core/p-447fa824.system.entry.js.map +1 -0
  349. package/dist/pine-core/p-495a206d.entry.js +2 -0
  350. package/dist/pine-core/p-495a206d.entry.js.map +1 -0
  351. package/dist/pine-core/p-4a69106a.system.entry.js +2 -0
  352. package/dist/pine-core/p-4a69106a.system.entry.js.map +1 -0
  353. package/dist/pine-core/p-4d22ca40.entry.js +2 -0
  354. package/dist/pine-core/p-4d22ca40.entry.js.map +1 -0
  355. package/dist/pine-core/p-5033d9e8.entry.js +2 -0
  356. package/dist/pine-core/{p-6a2296e6.system.entry.js → p-5706c81b.system.entry.js} +2 -2
  357. package/dist/pine-core/p-5a1af174.entry.js +2 -0
  358. package/dist/pine-core/p-5a1af174.entry.js.map +1 -0
  359. package/dist/pine-core/{p-1224c874.entry.js → p-5fdbbab9.entry.js} +2 -2
  360. package/dist/pine-core/{p-121e03ad.system.entry.js → p-61b7ff04.system.entry.js} +2 -2
  361. package/dist/pine-core/{p-111e7da2.system.entry.js → p-62bc2080.system.entry.js} +2 -2
  362. package/dist/pine-core/{p-367e188f.entry.js → p-64c897bb.entry.js} +2 -2
  363. package/dist/pine-core/{p-f2c807ac.entry.js → p-667eb50e.entry.js} +2 -2
  364. package/dist/pine-core/{p-77c3a10d.entry.js → p-6d36fae0.entry.js} +2 -2
  365. package/dist/pine-core/p-6ef51211.entry.js +2 -0
  366. package/dist/pine-core/{p-D-4Xbxlj.system.js.map → p-6tdMlyau.system.js.map} +1 -1
  367. package/dist/pine-core/p-708c66c2.entry.js +2 -0
  368. package/dist/pine-core/p-708c66c2.entry.js.map +1 -0
  369. package/dist/pine-core/p-73412ca9.system.entry.js.map +1 -1
  370. package/dist/pine-core/{p-bd04212c.system.entry.js → p-7a431264.system.entry.js} +2 -2
  371. package/dist/pine-core/p-7a431264.system.entry.js.map +1 -0
  372. package/dist/pine-core/{p-d6ac2862.system.entry.js → p-7da6180d.system.entry.js} +2 -2
  373. package/dist/pine-core/{p-c4294be2.entry.js → p-80246c79.entry.js} +2 -2
  374. package/dist/pine-core/{p-2296c34f.entry.js → p-822e90ee.entry.js} +2 -2
  375. package/dist/pine-core/p-822e90ee.entry.js.map +1 -0
  376. package/dist/pine-core/{p-24607f93.entry.js → p-82388e60.entry.js} +2 -2
  377. package/dist/pine-core/p-90a8d1bd.entry.js +2 -0
  378. package/dist/pine-core/p-90a8d1bd.entry.js.map +1 -0
  379. package/dist/pine-core/{p-7b38e384.system.entry.js → p-91520803.system.entry.js} +2 -2
  380. package/dist/pine-core/{p-3f82ac77.system.entry.js → p-982edcaf.system.entry.js} +2 -2
  381. package/dist/pine-core/p-9b8a3659.system.entry.js +2 -0
  382. package/dist/pine-core/{p-730221a8.system.entry.js → p-9cc1844a.system.entry.js} +2 -2
  383. package/dist/pine-core/{p-ef9ed75a.system.entry.js → p-9d8bb7f7.system.entry.js} +2 -2
  384. package/dist/pine-core/{p-71265b2a.system.entry.js → p-9df7ba40.system.entry.js} +2 -2
  385. package/dist/pine-core/p-9e22eab5.system.entry.js +2 -0
  386. package/dist/pine-core/p-B-xQ7Q5Y.system.js.map +1 -0
  387. package/dist/pine-core/p-BHZ6CSg4.system.js.map +1 -1
  388. package/dist/pine-core/{p-CWtKi9tV.system.js.map → p-BJRnZhwF.system.js.map} +1 -1
  389. package/dist/pine-core/{p-Derxa-nn.system.js.map → p-BPlIGHM4.system.js.map} +1 -1
  390. package/dist/pine-core/p-BSg_Clcf.system.js.map +1 -0
  391. package/dist/pine-core/{p-B5JFBYFw.system.js.map → p-Bdnq3aMi.system.js.map} +1 -1
  392. package/dist/pine-core/{p-PkSWq78_.system.js.map → p-Bgszb25I.system.js.map} +1 -1
  393. package/dist/pine-core/p-BlpTiOHo.system.js.map +1 -0
  394. package/dist/pine-core/{p-CzKqvFNN.system.js.map → p-Bok_Wwo5.system.js.map} +1 -1
  395. package/dist/pine-core/{p-DiJV28pi.system.js.map → p-Bpn2QYa2.system.js.map} +1 -1
  396. package/dist/pine-core/{p-DS7q5AvX.system.js.map → p-Bq1H4MPi.system.js.map} +1 -1
  397. package/dist/pine-core/p-BsL2GDnH.system.js +1 -1
  398. package/dist/pine-core/{p-CnPERKGo.system.js.map → p-C47kwjaJ.system.js.map} +1 -1
  399. package/dist/pine-core/{p-D9LPgNmN.system.js.map → p-CD40xhZg.system.js.map} +1 -1
  400. package/dist/pine-core/{p-C-oNYS10.system.js.map → p-CLsVcJCa.system.js.map} +1 -1
  401. package/dist/pine-core/{p-DgOMN0Ur.system.js.map → p-CLscfXhT.system.js.map} +1 -1
  402. package/dist/pine-core/{p-CcsZC7UR.system.js.map → p-CTJnwc4I.system.js.map} +1 -1
  403. package/dist/pine-core/p-CUHK9C55.system.js.map +1 -0
  404. package/dist/pine-core/p-CaJHqbdu.system.js.map +1 -0
  405. package/dist/pine-core/p-Ci1ZzxGS.system.js.map +1 -0
  406. package/dist/pine-core/{p-yku4NLl6.system.js.map → p-ClrDO1lY.system.js.map} +1 -1
  407. package/dist/pine-core/{p-D5vuiRx2.system.js.map → p-Cly-fzRE.system.js.map} +1 -1
  408. package/dist/pine-core/{p-BVUeEWjl.system.js.map → p-CtuIf6LK.system.js.map} +1 -1
  409. package/dist/pine-core/p-Ctwx2R4g.system.js.map +1 -0
  410. package/dist/pine-core/{p-3D0orTx_.system.js.map → p-CuHZffVk.system.js.map} +1 -1
  411. package/dist/pine-core/{p-_4gljHh-.js → p-CzVv99mW.js} +1 -1
  412. package/dist/pine-core/p-CzVv99mW.js.map +1 -0
  413. package/dist/pine-core/{p-DbVkYdnF.system.js.map → p-D1LdgjO0.system.js.map} +1 -1
  414. package/dist/pine-core/p-DJPo1iGw.system.js.map +1 -0
  415. package/dist/pine-core/{p-HBgo7i_E.system.js.map → p-DKGUedTE.system.js.map} +1 -1
  416. package/dist/pine-core/{p-CLNi-hRD.system.js.map → p-DNqc41uY.system.js.map} +1 -1
  417. package/dist/pine-core/{p-Bo6FQRlR.system.js.map → p-DQCWs_Ih.system.js.map} +1 -1
  418. package/dist/pine-core/p-DX9uSGoE.system.js.map +1 -0
  419. package/dist/pine-core/p-D_FwyeSw.js +2 -0
  420. package/dist/pine-core/p-D_FwyeSw.js.map +1 -0
  421. package/dist/pine-core/{p-B4W0_y2p.system.js → p-DiBM9O5Q.system.js} +1 -1
  422. package/dist/pine-core/p-DiBM9O5Q.system.js.map +1 -0
  423. package/dist/pine-core/{p-CV405yTU.system.js.map → p-DwwM3-D4.system.js.map} +1 -1
  424. package/dist/pine-core/{p-Cj2r1nL6.system.js.map → p-DxydR7R6.system.js.map} +1 -1
  425. package/dist/pine-core/{p-DKSZziVY.system.js.map → p-Gn2xhxDz.system.js.map} +1 -1
  426. package/dist/pine-core/{p-B-pTdYoP.system.js.map → p-PuPjQNmU.system.js.map} +1 -1
  427. package/dist/pine-core/{p-DV_GadHU.system.js.map → p-PwBWYqtO.system.js.map} +1 -1
  428. package/dist/pine-core/{p-CsM74dxm.system.js.map → p-U_efBpHV.system.js.map} +1 -1
  429. package/dist/pine-core/p-ZCkmy1Gu.system.js +2 -0
  430. package/dist/pine-core/p-ZCkmy1Gu.system.js.map +1 -0
  431. package/dist/pine-core/{p-83ffc1cc.entry.js → p-a4d19fb1.entry.js} +2 -2
  432. package/dist/pine-core/p-af5c9fbd.system.entry.js +2 -0
  433. package/dist/pine-core/{p-146fcd44.entry.js → p-b214c043.entry.js} +2 -2
  434. package/dist/pine-core/p-b5dc7a18.entry.js +2 -0
  435. package/dist/pine-core/p-b5dc7a18.entry.js.map +1 -0
  436. package/dist/pine-core/{p-c0f74199.entry.js → p-b6d18604.entry.js} +2 -2
  437. package/dist/pine-core/{p-BOJnNd1p.system.js.map → p-b6lYO9O3.system.js.map} +1 -1
  438. package/dist/pine-core/{p-04df41d7.system.entry.js → p-b93825c4.system.entry.js} +2 -2
  439. package/dist/pine-core/{p-48e76945.system.entry.js → p-c5a7c8e9.system.entry.js} +2 -2
  440. package/dist/pine-core/{p-30142a25.system.entry.js → p-c5da4a97.system.entry.js} +2 -2
  441. package/dist/pine-core/p-c93786f1.system.entry.js +2 -0
  442. package/dist/pine-core/{p-78fb945e.system.entry.js → p-cc15bf6c.system.entry.js} +2 -2
  443. package/dist/pine-core/p-d0ec666b.entry.js +2 -0
  444. package/dist/pine-core/p-d21156cf.entry.js +2 -0
  445. package/dist/pine-core/p-d21156cf.entry.js.map +1 -0
  446. package/dist/pine-core/p-d2d6b3a6.system.entry.js +2 -0
  447. package/dist/pine-core/p-d2d6b3a6.system.entry.js.map +1 -0
  448. package/dist/pine-core/{p-942fa145.system.entry.js → p-d451c7b5.system.entry.js} +2 -2
  449. package/dist/pine-core/p-d64527b2.system.entry.js +2 -0
  450. package/dist/pine-core/p-d64527b2.system.entry.js.map +1 -0
  451. package/dist/pine-core/{p-28e28f42.system.entry.js → p-d6b1f60d.system.entry.js} +2 -2
  452. package/dist/pine-core/{p-722012ac.entry.js → p-d989287d.entry.js} +2 -2
  453. package/dist/pine-core/{p-d2ccda59.system.entry.js → p-e0a35811.system.entry.js} +2 -2
  454. package/dist/pine-core/{p-e9d972db.system.entry.js → p-e0a6ba6f.system.entry.js} +2 -2
  455. package/dist/pine-core/{p-1bd715ee.system.entry.js → p-e416f7a8.system.entry.js} +2 -2
  456. package/dist/pine-core/p-e416f7a8.system.entry.js.map +1 -0
  457. package/dist/pine-core/{p-984578f8.system.entry.js → p-e53547e2.system.entry.js} +2 -2
  458. package/dist/pine-core/p-e68dd704.system.entry.js +2 -0
  459. package/dist/pine-core/p-e68dd704.system.entry.js.map +1 -0
  460. package/dist/pine-core/{p-b2796d3c.system.entry.js → p-e7322ff9.system.entry.js} +2 -2
  461. package/dist/pine-core/{p-83c632f6.system.entry.js → p-e8a4eafa.system.entry.js} +2 -2
  462. package/dist/pine-core/{p-f9e01886.system.entry.js → p-ec1c3452.system.entry.js} +2 -2
  463. package/dist/pine-core/p-ee0117a2.entry.js +2 -0
  464. package/dist/pine-core/{p-d1b222f5.entry.js.map → p-ee0117a2.entry.js.map} +1 -1
  465. package/dist/pine-core/{p-a394645a.system.entry.js → p-eef645bd.system.entry.js} +2 -2
  466. package/dist/pine-core/{p-cd2cd116.entry.js → p-ef08f005.entry.js} +2 -2
  467. package/dist/pine-core/p-f256dd8a.entry.js.map +1 -1
  468. package/dist/pine-core/{p-0572825b.entry.js → p-f29baa16.entry.js} +2 -2
  469. package/dist/pine-core/{p-4ff0838c.entry.js → p-f30b1479.entry.js} +2 -2
  470. package/dist/pine-core/p-f455deb5.entry.js +2 -0
  471. package/dist/pine-core/{p-f47133fd.entry.js → p-f7c02b89.entry.js} +2 -2
  472. package/dist/pine-core/p-f9005ac9.entry.js +2 -0
  473. package/dist/pine-core/p-faaa1caa.system.entry.js +4 -0
  474. package/dist/pine-core/p-faaa1caa.system.entry.js.map +1 -0
  475. package/dist/pine-core/{p-99b5e1a5.entry.js → p-fd3b7077.entry.js} +2 -2
  476. package/dist/pine-core/{p-1b109c01.entry.js → p-fe73a67f.entry.js} +2 -2
  477. package/dist/pine-core/{p-DEsea81X.system.js.map → p-ipxZYSGJ.system.js.map} +1 -1
  478. package/dist/pine-core/p-lWwPttyv.system.js.map +1 -0
  479. package/dist/pine-core/{p-CiDIFl28.system.js.map → p-mWJg54bF.system.js.map} +1 -1
  480. package/dist/pine-core/{p-CDIHBBTC.system.js.map → p-y1DacLeb.system.js.map} +1 -1
  481. package/dist/pine-core/{p-Bs9Nyvj2.system.js.map → p-ydqm5FGv.system.js.map} +1 -1
  482. package/dist/pine-core/{p-DN9puCWI.system.js.map → p-zZHye4hT.system.js.map} +1 -1
  483. package/dist/pine-core/pds-box.entry.esm.js.map +1 -1
  484. package/dist/pine-core/pds-button.entry.esm.js.map +1 -1
  485. package/dist/pine-core/pds-chip.entry.esm.js.map +1 -1
  486. package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -0
  487. package/dist/pine-core/pds-dropdown-menu.entry.esm.js.map +1 -1
  488. package/dist/pine-core/pds-icon.entry.esm.js.map +1 -1
  489. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  490. package/dist/pine-core/pds-property.entry.esm.js.map +1 -0
  491. package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
  492. package/dist/pine-core/pds-text.entry.esm.js.map +1 -1
  493. package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
  494. package/dist/pine-core/pds-tooltip.entry.esm.js.map +1 -1
  495. package/dist/pine-core/pine-core.esm.js +1 -1
  496. package/dist/types/components/pds-chip/pds-chip.d.ts +9 -1
  497. package/dist/types/components/pds-combobox/pds-combobox.d.ts +153 -0
  498. package/dist/types/components/pds-input/pds-input.d.ts +63 -9
  499. package/dist/types/components/pds-property/pds-property.d.ts +14 -0
  500. package/dist/types/components/pds-select/pds-select.d.ts +9 -0
  501. package/dist/types/components/pds-text/pds-text.d.ts +3 -0
  502. package/dist/types/components/pds-textarea/pds-textarea.d.ts +8 -0
  503. package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +3 -0
  504. package/dist/types/components.d.ts +275 -6
  505. package/hydrate/index.js +2367 -260
  506. package/hydrate/index.mjs +2367 -260
  507. package/package.json +4 -2
  508. package/dist/cjs/index-CG2Rr2io.js.map +0 -1
  509. package/dist/esm/index-_4gljHh-.js.map +0 -1
  510. package/dist/esm-es5/index-_4gljHh-.js.map +0 -1
  511. package/dist/pine-core/p-0069abf8.system.entry.js +0 -2
  512. package/dist/pine-core/p-0069abf8.system.entry.js.map +0 -1
  513. package/dist/pine-core/p-03d8cb4c.system.entry.js +0 -2
  514. package/dist/pine-core/p-1bd715ee.system.entry.js.map +0 -1
  515. package/dist/pine-core/p-1eec6bea.system.entry.js +0 -2
  516. package/dist/pine-core/p-1eec6bea.system.entry.js.map +0 -1
  517. package/dist/pine-core/p-21c3aaeb.entry.js +0 -2
  518. package/dist/pine-core/p-2296c34f.entry.js.map +0 -1
  519. package/dist/pine-core/p-29ad0b86.entry.js +0 -2
  520. package/dist/pine-core/p-29ad0b86.entry.js.map +0 -1
  521. package/dist/pine-core/p-32bd3e33.entry.js +0 -2
  522. package/dist/pine-core/p-32bd3e33.entry.js.map +0 -1
  523. package/dist/pine-core/p-3e91dccd.entry.js +0 -2
  524. package/dist/pine-core/p-3e91dccd.entry.js.map +0 -1
  525. package/dist/pine-core/p-49265849.system.entry.js +0 -2
  526. package/dist/pine-core/p-513c16c7.entry.js +0 -2
  527. package/dist/pine-core/p-513c16c7.entry.js.map +0 -1
  528. package/dist/pine-core/p-5acda4ac.system.entry.js +0 -2
  529. package/dist/pine-core/p-5acda4ac.system.entry.js.map +0 -1
  530. package/dist/pine-core/p-5e1e7762.entry.js +0 -2
  531. package/dist/pine-core/p-624db3d6.system.entry.js +0 -2
  532. package/dist/pine-core/p-624db3d6.system.entry.js.map +0 -1
  533. package/dist/pine-core/p-71f01676.system.entry.js +0 -2
  534. package/dist/pine-core/p-742d4490.entry.js +0 -2
  535. package/dist/pine-core/p-742d4490.entry.js.map +0 -1
  536. package/dist/pine-core/p-7e92ec48.system.entry.js +0 -2
  537. package/dist/pine-core/p-7e92ec48.system.entry.js.map +0 -1
  538. package/dist/pine-core/p-8023086c.entry.js +0 -2
  539. package/dist/pine-core/p-8023086c.entry.js.map +0 -1
  540. package/dist/pine-core/p-83252078.system.entry.js +0 -2
  541. package/dist/pine-core/p-86d388a2.entry.js +0 -2
  542. package/dist/pine-core/p-929bb7ab.system.entry.js +0 -2
  543. package/dist/pine-core/p-B4W0_y2p.system.js.map +0 -1
  544. package/dist/pine-core/p-B5LBNcOw.system.js.map +0 -1
  545. package/dist/pine-core/p-BO1OsmVU.system.js.map +0 -1
  546. package/dist/pine-core/p-C3ud771n.system.js.map +0 -1
  547. package/dist/pine-core/p-CtAVdPaE.system.js.map +0 -1
  548. package/dist/pine-core/p-D8DRYw9w.system.js.map +0 -1
  549. package/dist/pine-core/p-DyQ_s5MV.system.js.map +0 -1
  550. package/dist/pine-core/p-M2Hhmwex.system.js.map +0 -1
  551. package/dist/pine-core/p-_4gljHh-.js.map +0 -1
  552. package/dist/pine-core/p-a2572675.system.entry.js +0 -2
  553. package/dist/pine-core/p-a2572675.system.entry.js.map +0 -1
  554. package/dist/pine-core/p-a52b1413.entry.js +0 -2
  555. package/dist/pine-core/p-abec6606.entry.js +0 -2
  556. package/dist/pine-core/p-abec6606.entry.js.map +0 -1
  557. package/dist/pine-core/p-b3d05184.entry.js +0 -2
  558. package/dist/pine-core/p-b3d05184.entry.js.map +0 -1
  559. package/dist/pine-core/p-b9c13f99.entry.js +0 -2
  560. package/dist/pine-core/p-bd04212c.system.entry.js.map +0 -1
  561. package/dist/pine-core/p-d1b222f5.entry.js +0 -2
  562. package/dist/pine-core/p-e09a3682.system.entry.js +0 -2
  563. package/dist/pine-core/p-e09a3682.system.entry.js.map +0 -1
  564. package/dist/pine-core/p-e6d6e103.entry.js +0 -2
  565. package/dist/pine-core/p-xgOOHGQo.system.js.map +0 -1
  566. /package/dist/pine-core/{p-e2dc81c0.entry.js.map → p-000ed179.entry.js.map} +0 -0
  567. /package/dist/pine-core/{p-c1b0f921.system.entry.js.map → p-0c6e9ba0.system.entry.js.map} +0 -0
  568. /package/dist/pine-core/{p-596e0292.system.entry.js.map → p-1ef5f46b.system.entry.js.map} +0 -0
  569. /package/dist/pine-core/{p-7ff213bb.system.entry.js.map → p-256d15bc.system.entry.js.map} +0 -0
  570. /package/dist/pine-core/{p-17d3fa8b.entry.js.map → p-27b52fc5.entry.js.map} +0 -0
  571. /package/dist/pine-core/{p-833f08f3.entry.js.map → p-2a2cd90d.entry.js.map} +0 -0
  572. /package/dist/pine-core/{p-4288c861.entry.js.map → p-2f0aedfa.entry.js.map} +0 -0
  573. /package/dist/pine-core/{p-78cb1c40.system.entry.js.map → p-2fbc5f8c.system.entry.js.map} +0 -0
  574. /package/dist/pine-core/{p-b7ba6316.entry.js.map → p-30449e82.entry.js.map} +0 -0
  575. /package/dist/pine-core/{p-761946a0.entry.js.map → p-31fe86a6.entry.js.map} +0 -0
  576. /package/dist/pine-core/{p-83252078.system.entry.js.map → p-357b6dd6.system.entry.js.map} +0 -0
  577. /package/dist/pine-core/{p-85ff1482.entry.js.map → p-36d3352a.entry.js.map} +0 -0
  578. /package/dist/pine-core/{p-3798a631.system.entry.js.map → p-383af1d4.system.entry.js.map} +0 -0
  579. /package/dist/pine-core/{p-bcc4edaa.entry.js.map → p-39fbd912.entry.js.map} +0 -0
  580. /package/dist/pine-core/{p-5c4aceb7.entry.js.map → p-3bbb6fc1.entry.js.map} +0 -0
  581. /package/dist/pine-core/{p-86d388a2.entry.js.map → p-5033d9e8.entry.js.map} +0 -0
  582. /package/dist/pine-core/{p-6a2296e6.system.entry.js.map → p-5706c81b.system.entry.js.map} +0 -0
  583. /package/dist/pine-core/{p-1224c874.entry.js.map → p-5fdbbab9.entry.js.map} +0 -0
  584. /package/dist/pine-core/{p-121e03ad.system.entry.js.map → p-61b7ff04.system.entry.js.map} +0 -0
  585. /package/dist/pine-core/{p-111e7da2.system.entry.js.map → p-62bc2080.system.entry.js.map} +0 -0
  586. /package/dist/pine-core/{p-367e188f.entry.js.map → p-64c897bb.entry.js.map} +0 -0
  587. /package/dist/pine-core/{p-f2c807ac.entry.js.map → p-667eb50e.entry.js.map} +0 -0
  588. /package/dist/pine-core/{p-77c3a10d.entry.js.map → p-6d36fae0.entry.js.map} +0 -0
  589. /package/dist/pine-core/{p-5e1e7762.entry.js.map → p-6ef51211.entry.js.map} +0 -0
  590. /package/dist/pine-core/{p-d6ac2862.system.entry.js.map → p-7da6180d.system.entry.js.map} +0 -0
  591. /package/dist/pine-core/{p-c4294be2.entry.js.map → p-80246c79.entry.js.map} +0 -0
  592. /package/dist/pine-core/{p-24607f93.entry.js.map → p-82388e60.entry.js.map} +0 -0
  593. /package/dist/pine-core/{p-7b38e384.system.entry.js.map → p-91520803.system.entry.js.map} +0 -0
  594. /package/dist/pine-core/{p-3f82ac77.system.entry.js.map → p-982edcaf.system.entry.js.map} +0 -0
  595. /package/dist/pine-core/{p-49265849.system.entry.js.map → p-9b8a3659.system.entry.js.map} +0 -0
  596. /package/dist/pine-core/{p-730221a8.system.entry.js.map → p-9cc1844a.system.entry.js.map} +0 -0
  597. /package/dist/pine-core/{p-ef9ed75a.system.entry.js.map → p-9d8bb7f7.system.entry.js.map} +0 -0
  598. /package/dist/pine-core/{p-71265b2a.system.entry.js.map → p-9df7ba40.system.entry.js.map} +0 -0
  599. /package/dist/pine-core/{p-929bb7ab.system.entry.js.map → p-9e22eab5.system.entry.js.map} +0 -0
  600. /package/dist/pine-core/{p-83ffc1cc.entry.js.map → p-a4d19fb1.entry.js.map} +0 -0
  601. /package/dist/pine-core/{p-03d8cb4c.system.entry.js.map → p-af5c9fbd.system.entry.js.map} +0 -0
  602. /package/dist/pine-core/{p-146fcd44.entry.js.map → p-b214c043.entry.js.map} +0 -0
  603. /package/dist/pine-core/{p-c0f74199.entry.js.map → p-b6d18604.entry.js.map} +0 -0
  604. /package/dist/pine-core/{p-04df41d7.system.entry.js.map → p-b93825c4.system.entry.js.map} +0 -0
  605. /package/dist/pine-core/{p-48e76945.system.entry.js.map → p-c5a7c8e9.system.entry.js.map} +0 -0
  606. /package/dist/pine-core/{p-30142a25.system.entry.js.map → p-c5da4a97.system.entry.js.map} +0 -0
  607. /package/dist/pine-core/{p-71f01676.system.entry.js.map → p-c93786f1.system.entry.js.map} +0 -0
  608. /package/dist/pine-core/{p-78fb945e.system.entry.js.map → p-cc15bf6c.system.entry.js.map} +0 -0
  609. /package/dist/pine-core/{p-b9c13f99.entry.js.map → p-d0ec666b.entry.js.map} +0 -0
  610. /package/dist/pine-core/{p-942fa145.system.entry.js.map → p-d451c7b5.system.entry.js.map} +0 -0
  611. /package/dist/pine-core/{p-28e28f42.system.entry.js.map → p-d6b1f60d.system.entry.js.map} +0 -0
  612. /package/dist/pine-core/{p-722012ac.entry.js.map → p-d989287d.entry.js.map} +0 -0
  613. /package/dist/pine-core/{p-d2ccda59.system.entry.js.map → p-e0a35811.system.entry.js.map} +0 -0
  614. /package/dist/pine-core/{p-e9d972db.system.entry.js.map → p-e0a6ba6f.system.entry.js.map} +0 -0
  615. /package/dist/pine-core/{p-984578f8.system.entry.js.map → p-e53547e2.system.entry.js.map} +0 -0
  616. /package/dist/pine-core/{p-b2796d3c.system.entry.js.map → p-e7322ff9.system.entry.js.map} +0 -0
  617. /package/dist/pine-core/{p-83c632f6.system.entry.js.map → p-e8a4eafa.system.entry.js.map} +0 -0
  618. /package/dist/pine-core/{p-f9e01886.system.entry.js.map → p-ec1c3452.system.entry.js.map} +0 -0
  619. /package/dist/pine-core/{p-a394645a.system.entry.js.map → p-eef645bd.system.entry.js.map} +0 -0
  620. /package/dist/pine-core/{p-cd2cd116.entry.js.map → p-ef08f005.entry.js.map} +0 -0
  621. /package/dist/pine-core/{p-0572825b.entry.js.map → p-f29baa16.entry.js.map} +0 -0
  622. /package/dist/pine-core/{p-4ff0838c.entry.js.map → p-f30b1479.entry.js.map} +0 -0
  623. /package/dist/pine-core/{p-21c3aaeb.entry.js.map → p-f455deb5.entry.js.map} +0 -0
  624. /package/dist/pine-core/{p-f47133fd.entry.js.map → p-f7c02b89.entry.js.map} +0 -0
  625. /package/dist/pine-core/{p-e6d6e103.entry.js.map → p-f9005ac9.entry.js.map} +0 -0
  626. /package/dist/pine-core/{p-99b5e1a5.entry.js.map → p-fd3b7077.entry.js.map} +0 -0
  627. /package/dist/pine-core/{p-1b109c01.entry.js.map → p-fe73a67f.entry.js.map} +0 -0
@@ -0,0 +1,1717 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CxX7ua5d.js');
4
+ var floatingUi_dom = require('./floating-ui.dom-Bz4BD-cr.js');
5
+
6
+ /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
7
+
8
+ const {
9
+ entries,
10
+ setPrototypeOf,
11
+ isFrozen,
12
+ getPrototypeOf,
13
+ getOwnPropertyDescriptor
14
+ } = Object;
15
+ let {
16
+ freeze,
17
+ seal,
18
+ create
19
+ } = Object; // eslint-disable-line import/no-mutable-exports
20
+ let {
21
+ apply,
22
+ construct
23
+ } = typeof Reflect !== 'undefined' && Reflect;
24
+ if (!freeze) {
25
+ freeze = function freeze(x) {
26
+ return x;
27
+ };
28
+ }
29
+ if (!seal) {
30
+ seal = function seal(x) {
31
+ return x;
32
+ };
33
+ }
34
+ if (!apply) {
35
+ apply = function apply(fun, thisValue, args) {
36
+ return fun.apply(thisValue, args);
37
+ };
38
+ }
39
+ if (!construct) {
40
+ construct = function construct(Func, args) {
41
+ return new Func(...args);
42
+ };
43
+ }
44
+ const arrayForEach = unapply(Array.prototype.forEach);
45
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
46
+ const arrayPop = unapply(Array.prototype.pop);
47
+ const arrayPush = unapply(Array.prototype.push);
48
+ const arraySplice = unapply(Array.prototype.splice);
49
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
50
+ const stringToString = unapply(String.prototype.toString);
51
+ const stringMatch = unapply(String.prototype.match);
52
+ const stringReplace = unapply(String.prototype.replace);
53
+ const stringIndexOf = unapply(String.prototype.indexOf);
54
+ const stringTrim = unapply(String.prototype.trim);
55
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
56
+ const regExpTest = unapply(RegExp.prototype.test);
57
+ const typeErrorCreate = unconstruct(TypeError);
58
+ /**
59
+ * Creates a new function that calls the given function with a specified thisArg and arguments.
60
+ *
61
+ * @param func - The function to be wrapped and called.
62
+ * @returns A new function that calls the given function with a specified thisArg and arguments.
63
+ */
64
+ function unapply(func) {
65
+ return function (thisArg) {
66
+ if (thisArg instanceof RegExp) {
67
+ thisArg.lastIndex = 0;
68
+ }
69
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
70
+ args[_key - 1] = arguments[_key];
71
+ }
72
+ return apply(func, thisArg, args);
73
+ };
74
+ }
75
+ /**
76
+ * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
77
+ *
78
+ * @param func - The constructor function to be wrapped and called.
79
+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
80
+ */
81
+ function unconstruct(func) {
82
+ return function () {
83
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
84
+ args[_key2] = arguments[_key2];
85
+ }
86
+ return construct(func, args);
87
+ };
88
+ }
89
+ /**
90
+ * Add properties to a lookup table
91
+ *
92
+ * @param set - The set to which elements will be added.
93
+ * @param array - The array containing elements to be added to the set.
94
+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
95
+ * @returns The modified set with added elements.
96
+ */
97
+ function addToSet(set, array) {
98
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
99
+ if (setPrototypeOf) {
100
+ // Make 'in' and truthy checks like Boolean(set.constructor)
101
+ // independent of any properties defined on Object.prototype.
102
+ // Prevent prototype setters from intercepting set as a this value.
103
+ setPrototypeOf(set, null);
104
+ }
105
+ let l = array.length;
106
+ while (l--) {
107
+ let element = array[l];
108
+ if (typeof element === 'string') {
109
+ const lcElement = transformCaseFunc(element);
110
+ if (lcElement !== element) {
111
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
112
+ if (!isFrozen(array)) {
113
+ array[l] = lcElement;
114
+ }
115
+ element = lcElement;
116
+ }
117
+ }
118
+ set[element] = true;
119
+ }
120
+ return set;
121
+ }
122
+ /**
123
+ * Clean up an array to harden against CSPP
124
+ *
125
+ * @param array - The array to be cleaned.
126
+ * @returns The cleaned version of the array
127
+ */
128
+ function cleanArray(array) {
129
+ for (let index = 0; index < array.length; index++) {
130
+ const isPropertyExist = objectHasOwnProperty(array, index);
131
+ if (!isPropertyExist) {
132
+ array[index] = null;
133
+ }
134
+ }
135
+ return array;
136
+ }
137
+ /**
138
+ * Shallow clone an object
139
+ *
140
+ * @param object - The object to be cloned.
141
+ * @returns A new object that copies the original.
142
+ */
143
+ function clone(object) {
144
+ const newObject = create(null);
145
+ for (const [property, value] of entries(object)) {
146
+ const isPropertyExist = objectHasOwnProperty(object, property);
147
+ if (isPropertyExist) {
148
+ if (Array.isArray(value)) {
149
+ newObject[property] = cleanArray(value);
150
+ } else if (value && typeof value === 'object' && value.constructor === Object) {
151
+ newObject[property] = clone(value);
152
+ } else {
153
+ newObject[property] = value;
154
+ }
155
+ }
156
+ }
157
+ return newObject;
158
+ }
159
+ /**
160
+ * This method automatically checks if the prop is function or getter and behaves accordingly.
161
+ *
162
+ * @param object - The object to look up the getter function in its prototype chain.
163
+ * @param prop - The property name for which to find the getter function.
164
+ * @returns The getter function found in the prototype chain or a fallback function.
165
+ */
166
+ function lookupGetter(object, prop) {
167
+ while (object !== null) {
168
+ const desc = getOwnPropertyDescriptor(object, prop);
169
+ if (desc) {
170
+ if (desc.get) {
171
+ return unapply(desc.get);
172
+ }
173
+ if (typeof desc.value === 'function') {
174
+ return unapply(desc.value);
175
+ }
176
+ }
177
+ object = getPrototypeOf(object);
178
+ }
179
+ function fallbackValue() {
180
+ return null;
181
+ }
182
+ return fallbackValue;
183
+ }
184
+
185
+ const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
186
+ const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
187
+ const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
188
+ // List of SVG elements that are disallowed by default.
189
+ // We still need to know them so that we can do namespace
190
+ // checks properly in case one wants to add them to
191
+ // allow-list.
192
+ const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
193
+ const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
194
+ // Similarly to SVG, we want to know all MathML elements,
195
+ // even those that we disallow by default.
196
+ const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
197
+ const text = freeze(['#text']);
198
+
199
+ const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
200
+ const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
201
+ const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
202
+ const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
203
+
204
+ // eslint-disable-next-line unicorn/better-regex
205
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
206
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
207
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
208
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
209
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
210
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
211
+ );
212
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
213
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
214
+ );
215
+ const DOCTYPE_NAME = seal(/^html$/i);
216
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
217
+
218
+ var EXPRESSIONS = /*#__PURE__*/Object.freeze({
219
+ __proto__: null,
220
+ ARIA_ATTR: ARIA_ATTR,
221
+ ATTR_WHITESPACE: ATTR_WHITESPACE,
222
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT,
223
+ DATA_ATTR: DATA_ATTR,
224
+ DOCTYPE_NAME: DOCTYPE_NAME,
225
+ ERB_EXPR: ERB_EXPR,
226
+ IS_ALLOWED_URI: IS_ALLOWED_URI,
227
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
228
+ MUSTACHE_EXPR: MUSTACHE_EXPR,
229
+ TMPLIT_EXPR: TMPLIT_EXPR
230
+ });
231
+
232
+ /* eslint-disable @typescript-eslint/indent */
233
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
234
+ const NODE_TYPE = {
235
+ element: 1,
236
+ text: 3,
237
+ // Deprecated
238
+ progressingInstruction: 7,
239
+ comment: 8,
240
+ document: 9};
241
+ const getGlobal = function getGlobal() {
242
+ return typeof window === 'undefined' ? null : window;
243
+ };
244
+ /**
245
+ * Creates a no-op policy for internal use only.
246
+ * Don't export this function outside this module!
247
+ * @param trustedTypes The policy factory.
248
+ * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
249
+ * @return The policy created (or null, if Trusted Types
250
+ * are not supported or creating the policy failed).
251
+ */
252
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
253
+ if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
254
+ return null;
255
+ }
256
+ // Allow the callers to control the unique policy name
257
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
258
+ // Policy creation with duplicate names throws in Trusted Types.
259
+ let suffix = null;
260
+ const ATTR_NAME = 'data-tt-policy-suffix';
261
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
262
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
263
+ }
264
+ const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
265
+ try {
266
+ return trustedTypes.createPolicy(policyName, {
267
+ createHTML(html) {
268
+ return html;
269
+ },
270
+ createScriptURL(scriptUrl) {
271
+ return scriptUrl;
272
+ }
273
+ });
274
+ } catch (_) {
275
+ // Policy creation failed (most likely another DOMPurify script has
276
+ // already run). Skip creating the policy, as this will only cause errors
277
+ // if TT are enforced.
278
+ console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
279
+ return null;
280
+ }
281
+ };
282
+ const _createHooksMap = function _createHooksMap() {
283
+ return {
284
+ afterSanitizeAttributes: [],
285
+ afterSanitizeElements: [],
286
+ afterSanitizeShadowDOM: [],
287
+ beforeSanitizeAttributes: [],
288
+ beforeSanitizeElements: [],
289
+ beforeSanitizeShadowDOM: [],
290
+ uponSanitizeAttribute: [],
291
+ uponSanitizeElement: [],
292
+ uponSanitizeShadowNode: []
293
+ };
294
+ };
295
+ function createDOMPurify() {
296
+ let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
297
+ const DOMPurify = root => createDOMPurify(root);
298
+ DOMPurify.version = '3.2.6';
299
+ DOMPurify.removed = [];
300
+ if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
301
+ // Not running in a browser, provide a factory function
302
+ // so that you can pass your own Window
303
+ DOMPurify.isSupported = false;
304
+ return DOMPurify;
305
+ }
306
+ let {
307
+ document
308
+ } = window;
309
+ const originalDocument = document;
310
+ const currentScript = originalDocument.currentScript;
311
+ const {
312
+ DocumentFragment,
313
+ HTMLTemplateElement,
314
+ Node,
315
+ Element,
316
+ NodeFilter,
317
+ NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
318
+ HTMLFormElement,
319
+ DOMParser,
320
+ trustedTypes
321
+ } = window;
322
+ const ElementPrototype = Element.prototype;
323
+ const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
324
+ const remove = lookupGetter(ElementPrototype, 'remove');
325
+ const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
326
+ const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
327
+ const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
328
+ // As per issue #47, the web-components registry is inherited by a
329
+ // new document created via createHTMLDocument. As per the spec
330
+ // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
331
+ // a new empty registry is used when creating a template contents owner
332
+ // document, so we use that as our parent document to ensure nothing
333
+ // is inherited.
334
+ if (typeof HTMLTemplateElement === 'function') {
335
+ const template = document.createElement('template');
336
+ if (template.content && template.content.ownerDocument) {
337
+ document = template.content.ownerDocument;
338
+ }
339
+ }
340
+ let trustedTypesPolicy;
341
+ let emptyHTML = '';
342
+ const {
343
+ implementation,
344
+ createNodeIterator,
345
+ createDocumentFragment,
346
+ getElementsByTagName
347
+ } = document;
348
+ const {
349
+ importNode
350
+ } = originalDocument;
351
+ let hooks = _createHooksMap();
352
+ /**
353
+ * Expose whether this browser supports running the full DOMPurify.
354
+ */
355
+ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
356
+ const {
357
+ MUSTACHE_EXPR,
358
+ ERB_EXPR,
359
+ TMPLIT_EXPR,
360
+ DATA_ATTR,
361
+ ARIA_ATTR,
362
+ IS_SCRIPT_OR_DATA,
363
+ ATTR_WHITESPACE,
364
+ CUSTOM_ELEMENT
365
+ } = EXPRESSIONS;
366
+ let {
367
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
368
+ } = EXPRESSIONS;
369
+ /**
370
+ * We consider the elements and attributes below to be safe. Ideally
371
+ * don't add any new ones but feel free to remove unwanted ones.
372
+ */
373
+ /* allowed element names */
374
+ let ALLOWED_TAGS = null;
375
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
376
+ /* Allowed attribute names */
377
+ let ALLOWED_ATTR = null;
378
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
379
+ /*
380
+ * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
381
+ * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
382
+ * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
383
+ * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
384
+ */
385
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
386
+ tagNameCheck: {
387
+ writable: true,
388
+ configurable: false,
389
+ enumerable: true,
390
+ value: null
391
+ },
392
+ attributeNameCheck: {
393
+ writable: true,
394
+ configurable: false,
395
+ enumerable: true,
396
+ value: null
397
+ },
398
+ allowCustomizedBuiltInElements: {
399
+ writable: true,
400
+ configurable: false,
401
+ enumerable: true,
402
+ value: false
403
+ }
404
+ }));
405
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
406
+ let FORBID_TAGS = null;
407
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
408
+ let FORBID_ATTR = null;
409
+ /* Decide if ARIA attributes are okay */
410
+ let ALLOW_ARIA_ATTR = true;
411
+ /* Decide if custom data attributes are okay */
412
+ let ALLOW_DATA_ATTR = true;
413
+ /* Decide if unknown protocols are okay */
414
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
415
+ /* Decide if self-closing tags in attributes are allowed.
416
+ * Usually removed due to a mXSS issue in jQuery 3.0 */
417
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
418
+ /* Output should be safe for common template engines.
419
+ * This means, DOMPurify removes data attributes, mustaches and ERB
420
+ */
421
+ let SAFE_FOR_TEMPLATES = false;
422
+ /* Output should be safe even for XML used within HTML and alike.
423
+ * This means, DOMPurify removes comments when containing risky content.
424
+ */
425
+ let SAFE_FOR_XML = true;
426
+ /* Decide if document with <html>... should be returned */
427
+ let WHOLE_DOCUMENT = false;
428
+ /* Track whether config is already set on this instance of DOMPurify. */
429
+ let SET_CONFIG = false;
430
+ /* Decide if all elements (e.g. style, script) must be children of
431
+ * document.body. By default, browsers might move them to document.head */
432
+ let FORCE_BODY = false;
433
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
434
+ * string (or a TrustedHTML object if Trusted Types are supported).
435
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
436
+ */
437
+ let RETURN_DOM = false;
438
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
439
+ * string (or a TrustedHTML object if Trusted Types are supported) */
440
+ let RETURN_DOM_FRAGMENT = false;
441
+ /* Try to return a Trusted Type object instead of a string, return a string in
442
+ * case Trusted Types are not supported */
443
+ let RETURN_TRUSTED_TYPE = false;
444
+ /* Output should be free from DOM clobbering attacks?
445
+ * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
446
+ */
447
+ let SANITIZE_DOM = true;
448
+ /* Achieve full DOM Clobbering protection by isolating the namespace of named
449
+ * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
450
+ *
451
+ * HTML/DOM spec rules that enable DOM Clobbering:
452
+ * - Named Access on Window (§7.3.3)
453
+ * - DOM Tree Accessors (§3.1.5)
454
+ * - Form Element Parent-Child Relations (§4.10.3)
455
+ * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
456
+ * - HTMLCollection (§4.2.10.2)
457
+ *
458
+ * Namespace isolation is implemented by prefixing `id` and `name` attributes
459
+ * with a constant string, i.e., `user-content-`
460
+ */
461
+ let SANITIZE_NAMED_PROPS = false;
462
+ const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
463
+ /* Keep element content when removing element? */
464
+ let KEEP_CONTENT = true;
465
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
466
+ * of importing it into a new Document and returning a sanitized copy */
467
+ let IN_PLACE = false;
468
+ /* Allow usage of profiles like html, svg and mathMl */
469
+ let USE_PROFILES = {};
470
+ /* Tags to ignore content of when KEEP_CONTENT is true */
471
+ let FORBID_CONTENTS = null;
472
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
473
+ /* Tags that are safe for data: URIs */
474
+ let DATA_URI_TAGS = null;
475
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
476
+ /* Attributes safe for values like "javascript:" */
477
+ let URI_SAFE_ATTRIBUTES = null;
478
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
479
+ const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
480
+ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
481
+ const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
482
+ /* Document namespace */
483
+ let NAMESPACE = HTML_NAMESPACE;
484
+ let IS_EMPTY_INPUT = false;
485
+ /* Allowed XHTML+XML namespaces */
486
+ let ALLOWED_NAMESPACES = null;
487
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
488
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
489
+ let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
490
+ // Certain elements are allowed in both SVG and HTML
491
+ // namespace. We need to specify them explicitly
492
+ // so that they don't get erroneously deleted from
493
+ // HTML namespace.
494
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
495
+ /* Parsing of strict XHTML documents */
496
+ let PARSER_MEDIA_TYPE = null;
497
+ const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
498
+ const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
499
+ let transformCaseFunc = null;
500
+ /* Keep a reference to config to pass to hooks */
501
+ let CONFIG = null;
502
+ /* Ideally, do not touch anything below this line */
503
+ /* ______________________________________________ */
504
+ const formElement = document.createElement('form');
505
+ const isRegexOrFunction = function isRegexOrFunction(testValue) {
506
+ return testValue instanceof RegExp || testValue instanceof Function;
507
+ };
508
+ /**
509
+ * _parseConfig
510
+ *
511
+ * @param cfg optional config literal
512
+ */
513
+ // eslint-disable-next-line complexity
514
+ const _parseConfig = function _parseConfig() {
515
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
516
+ if (CONFIG && CONFIG === cfg) {
517
+ return;
518
+ }
519
+ /* Shield configuration object from tampering */
520
+ if (!cfg || typeof cfg !== 'object') {
521
+ cfg = {};
522
+ }
523
+ /* Shield configuration object from prototype pollution */
524
+ cfg = clone(cfg);
525
+ PARSER_MEDIA_TYPE =
526
+ // eslint-disable-next-line unicorn/prefer-includes
527
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
528
+ // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
529
+ transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
530
+ /* Set configuration parameters */
531
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
532
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
533
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
534
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
535
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
536
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
537
+ FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
538
+ FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
539
+ USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
540
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
541
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
542
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
543
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
544
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
545
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
546
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
547
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
548
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
549
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
550
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
551
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
552
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
553
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
554
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
555
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
556
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
557
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
558
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
559
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
560
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
561
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
562
+ }
563
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
564
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
565
+ }
566
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
567
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
568
+ }
569
+ if (SAFE_FOR_TEMPLATES) {
570
+ ALLOW_DATA_ATTR = false;
571
+ }
572
+ if (RETURN_DOM_FRAGMENT) {
573
+ RETURN_DOM = true;
574
+ }
575
+ /* Parse profile info */
576
+ if (USE_PROFILES) {
577
+ ALLOWED_TAGS = addToSet({}, text);
578
+ ALLOWED_ATTR = [];
579
+ if (USE_PROFILES.html === true) {
580
+ addToSet(ALLOWED_TAGS, html$1);
581
+ addToSet(ALLOWED_ATTR, html);
582
+ }
583
+ if (USE_PROFILES.svg === true) {
584
+ addToSet(ALLOWED_TAGS, svg$1);
585
+ addToSet(ALLOWED_ATTR, svg);
586
+ addToSet(ALLOWED_ATTR, xml);
587
+ }
588
+ if (USE_PROFILES.svgFilters === true) {
589
+ addToSet(ALLOWED_TAGS, svgFilters);
590
+ addToSet(ALLOWED_ATTR, svg);
591
+ addToSet(ALLOWED_ATTR, xml);
592
+ }
593
+ if (USE_PROFILES.mathMl === true) {
594
+ addToSet(ALLOWED_TAGS, mathMl$1);
595
+ addToSet(ALLOWED_ATTR, mathMl);
596
+ addToSet(ALLOWED_ATTR, xml);
597
+ }
598
+ }
599
+ /* Merge configuration parameters */
600
+ if (cfg.ADD_TAGS) {
601
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
602
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
603
+ }
604
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
605
+ }
606
+ if (cfg.ADD_ATTR) {
607
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
608
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
609
+ }
610
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
611
+ }
612
+ if (cfg.ADD_URI_SAFE_ATTR) {
613
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
614
+ }
615
+ if (cfg.FORBID_CONTENTS) {
616
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
617
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
618
+ }
619
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
620
+ }
621
+ /* Add #text in case KEEP_CONTENT is set to true */
622
+ if (KEEP_CONTENT) {
623
+ ALLOWED_TAGS['#text'] = true;
624
+ }
625
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
626
+ if (WHOLE_DOCUMENT) {
627
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
628
+ }
629
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
630
+ if (ALLOWED_TAGS.table) {
631
+ addToSet(ALLOWED_TAGS, ['tbody']);
632
+ delete FORBID_TAGS.tbody;
633
+ }
634
+ if (cfg.TRUSTED_TYPES_POLICY) {
635
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
636
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
637
+ }
638
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
639
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
640
+ }
641
+ // Overwrite existing TrustedTypes policy.
642
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
643
+ // Sign local variables required by `sanitize`.
644
+ emptyHTML = trustedTypesPolicy.createHTML('');
645
+ } else {
646
+ // Uninitialized policy, attempt to initialize the internal dompurify policy.
647
+ if (trustedTypesPolicy === undefined) {
648
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
649
+ }
650
+ // If creating the internal policy succeeded sign internal variables.
651
+ if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
652
+ emptyHTML = trustedTypesPolicy.createHTML('');
653
+ }
654
+ }
655
+ // Prevent further manipulation of configuration.
656
+ // Not available in IE8, Safari 5, etc.
657
+ if (freeze) {
658
+ freeze(cfg);
659
+ }
660
+ CONFIG = cfg;
661
+ };
662
+ /* Keep track of all possible SVG and MathML tags
663
+ * so that we can perform the namespace checks
664
+ * correctly. */
665
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
666
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
667
+ /**
668
+ * @param element a DOM element whose namespace is being checked
669
+ * @returns Return false if the element has a
670
+ * namespace that a spec-compliant parser would never
671
+ * return. Return true otherwise.
672
+ */
673
+ const _checkValidNamespace = function _checkValidNamespace(element) {
674
+ let parent = getParentNode(element);
675
+ // In JSDOM, if we're inside shadow DOM, then parentNode
676
+ // can be null. We just simulate parent in this case.
677
+ if (!parent || !parent.tagName) {
678
+ parent = {
679
+ namespaceURI: NAMESPACE,
680
+ tagName: 'template'
681
+ };
682
+ }
683
+ const tagName = stringToLowerCase(element.tagName);
684
+ const parentTagName = stringToLowerCase(parent.tagName);
685
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
686
+ return false;
687
+ }
688
+ if (element.namespaceURI === SVG_NAMESPACE) {
689
+ // The only way to switch from HTML namespace to SVG
690
+ // is via <svg>. If it happens via any other tag, then
691
+ // it should be killed.
692
+ if (parent.namespaceURI === HTML_NAMESPACE) {
693
+ return tagName === 'svg';
694
+ }
695
+ // The only way to switch from MathML to SVG is via`
696
+ // svg if parent is either <annotation-xml> or MathML
697
+ // text integration points.
698
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
699
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
700
+ }
701
+ // We only allow elements that are defined in SVG
702
+ // spec. All others are disallowed in SVG namespace.
703
+ return Boolean(ALL_SVG_TAGS[tagName]);
704
+ }
705
+ if (element.namespaceURI === MATHML_NAMESPACE) {
706
+ // The only way to switch from HTML namespace to MathML
707
+ // is via <math>. If it happens via any other tag, then
708
+ // it should be killed.
709
+ if (parent.namespaceURI === HTML_NAMESPACE) {
710
+ return tagName === 'math';
711
+ }
712
+ // The only way to switch from SVG to MathML is via
713
+ // <math> and HTML integration points
714
+ if (parent.namespaceURI === SVG_NAMESPACE) {
715
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
716
+ }
717
+ // We only allow elements that are defined in MathML
718
+ // spec. All others are disallowed in MathML namespace.
719
+ return Boolean(ALL_MATHML_TAGS[tagName]);
720
+ }
721
+ if (element.namespaceURI === HTML_NAMESPACE) {
722
+ // The only way to switch from SVG to HTML is via
723
+ // HTML integration points, and from MathML to HTML
724
+ // is via MathML text integration points
725
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
726
+ return false;
727
+ }
728
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
729
+ return false;
730
+ }
731
+ // We disallow tags that are specific for MathML
732
+ // or SVG and should never appear in HTML namespace
733
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
734
+ }
735
+ // For XHTML and XML documents that support custom namespaces
736
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
737
+ return true;
738
+ }
739
+ // The code should never reach this place (this means
740
+ // that the element somehow got namespace that is not
741
+ // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
742
+ // Return false just in case.
743
+ return false;
744
+ };
745
+ /**
746
+ * _forceRemove
747
+ *
748
+ * @param node a DOM node
749
+ */
750
+ const _forceRemove = function _forceRemove(node) {
751
+ arrayPush(DOMPurify.removed, {
752
+ element: node
753
+ });
754
+ try {
755
+ // eslint-disable-next-line unicorn/prefer-dom-node-remove
756
+ getParentNode(node).removeChild(node);
757
+ } catch (_) {
758
+ remove(node);
759
+ }
760
+ };
761
+ /**
762
+ * _removeAttribute
763
+ *
764
+ * @param name an Attribute name
765
+ * @param element a DOM node
766
+ */
767
+ const _removeAttribute = function _removeAttribute(name, element) {
768
+ try {
769
+ arrayPush(DOMPurify.removed, {
770
+ attribute: element.getAttributeNode(name),
771
+ from: element
772
+ });
773
+ } catch (_) {
774
+ arrayPush(DOMPurify.removed, {
775
+ attribute: null,
776
+ from: element
777
+ });
778
+ }
779
+ element.removeAttribute(name);
780
+ // We void attribute values for unremovable "is" attributes
781
+ if (name === 'is') {
782
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
783
+ try {
784
+ _forceRemove(element);
785
+ } catch (_) {}
786
+ } else {
787
+ try {
788
+ element.setAttribute(name, '');
789
+ } catch (_) {}
790
+ }
791
+ }
792
+ };
793
+ /**
794
+ * _initDocument
795
+ *
796
+ * @param dirty - a string of dirty markup
797
+ * @return a DOM, filled with the dirty markup
798
+ */
799
+ const _initDocument = function _initDocument(dirty) {
800
+ /* Create a HTML document */
801
+ let doc = null;
802
+ let leadingWhitespace = null;
803
+ if (FORCE_BODY) {
804
+ dirty = '<remove></remove>' + dirty;
805
+ } else {
806
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
807
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
808
+ leadingWhitespace = matches && matches[0];
809
+ }
810
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
811
+ // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
812
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
813
+ }
814
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
815
+ /*
816
+ * Use the DOMParser API by default, fallback later if needs be
817
+ * DOMParser not work for svg when has multiple root element.
818
+ */
819
+ if (NAMESPACE === HTML_NAMESPACE) {
820
+ try {
821
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
822
+ } catch (_) {}
823
+ }
824
+ /* Use createHTMLDocument in case DOMParser is not available */
825
+ if (!doc || !doc.documentElement) {
826
+ doc = implementation.createDocument(NAMESPACE, 'template', null);
827
+ try {
828
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
829
+ } catch (_) {
830
+ // Syntax error if dirtyPayload is invalid xml
831
+ }
832
+ }
833
+ const body = doc.body || doc.documentElement;
834
+ if (dirty && leadingWhitespace) {
835
+ body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
836
+ }
837
+ /* Work on whole document or just its body */
838
+ if (NAMESPACE === HTML_NAMESPACE) {
839
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
840
+ }
841
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
842
+ };
843
+ /**
844
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
845
+ *
846
+ * @param root The root element or node to start traversing on.
847
+ * @return The created NodeIterator
848
+ */
849
+ const _createNodeIterator = function _createNodeIterator(root) {
850
+ return createNodeIterator.call(root.ownerDocument || root, root,
851
+ // eslint-disable-next-line no-bitwise
852
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
853
+ };
854
+ /**
855
+ * _isClobbered
856
+ *
857
+ * @param element element to check for clobbering attacks
858
+ * @return true if clobbered, false if safe
859
+ */
860
+ const _isClobbered = function _isClobbered(element) {
861
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
862
+ };
863
+ /**
864
+ * Checks whether the given object is a DOM node.
865
+ *
866
+ * @param value object to check whether it's a DOM node
867
+ * @return true is object is a DOM node
868
+ */
869
+ const _isNode = function _isNode(value) {
870
+ return typeof Node === 'function' && value instanceof Node;
871
+ };
872
+ function _executeHooks(hooks, currentNode, data) {
873
+ arrayForEach(hooks, hook => {
874
+ hook.call(DOMPurify, currentNode, data, CONFIG);
875
+ });
876
+ }
877
+ /**
878
+ * _sanitizeElements
879
+ *
880
+ * @protect nodeName
881
+ * @protect textContent
882
+ * @protect removeChild
883
+ * @param currentNode to check for permission to exist
884
+ * @return true if node was killed, false if left alive
885
+ */
886
+ const _sanitizeElements = function _sanitizeElements(currentNode) {
887
+ let content = null;
888
+ /* Execute a hook if present */
889
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
890
+ /* Check if element is clobbered or can clobber */
891
+ if (_isClobbered(currentNode)) {
892
+ _forceRemove(currentNode);
893
+ return true;
894
+ }
895
+ /* Now let's check the element's type and name */
896
+ const tagName = transformCaseFunc(currentNode.nodeName);
897
+ /* Execute a hook if present */
898
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
899
+ tagName,
900
+ allowedTags: ALLOWED_TAGS
901
+ });
902
+ /* Detect mXSS attempts abusing namespace confusion */
903
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
904
+ _forceRemove(currentNode);
905
+ return true;
906
+ }
907
+ /* Remove any occurrence of processing instructions */
908
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
909
+ _forceRemove(currentNode);
910
+ return true;
911
+ }
912
+ /* Remove any kind of possibly harmful comments */
913
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
914
+ _forceRemove(currentNode);
915
+ return true;
916
+ }
917
+ /* Remove element if anything forbids its presence */
918
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
919
+ /* Check if we have a custom element to handle */
920
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
921
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
922
+ return false;
923
+ }
924
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
925
+ return false;
926
+ }
927
+ }
928
+ /* Keep content except for bad-listed elements */
929
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
930
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
931
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
932
+ if (childNodes && parentNode) {
933
+ const childCount = childNodes.length;
934
+ for (let i = childCount - 1; i >= 0; --i) {
935
+ const childClone = cloneNode(childNodes[i], true);
936
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
937
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
938
+ }
939
+ }
940
+ }
941
+ _forceRemove(currentNode);
942
+ return true;
943
+ }
944
+ /* Check whether element has a valid namespace */
945
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
946
+ _forceRemove(currentNode);
947
+ return true;
948
+ }
949
+ /* Make sure that older browsers don't get fallback-tag mXSS */
950
+ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
951
+ _forceRemove(currentNode);
952
+ return true;
953
+ }
954
+ /* Sanitize element content to be template-safe */
955
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
956
+ /* Get the element's text content */
957
+ content = currentNode.textContent;
958
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
959
+ content = stringReplace(content, expr, ' ');
960
+ });
961
+ if (currentNode.textContent !== content) {
962
+ arrayPush(DOMPurify.removed, {
963
+ element: currentNode.cloneNode()
964
+ });
965
+ currentNode.textContent = content;
966
+ }
967
+ }
968
+ /* Execute a hook if present */
969
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
970
+ return false;
971
+ };
972
+ /**
973
+ * _isValidAttribute
974
+ *
975
+ * @param lcTag Lowercase tag name of containing element.
976
+ * @param lcName Lowercase attribute name.
977
+ * @param value Attribute value.
978
+ * @return Returns true if `value` is valid, otherwise false.
979
+ */
980
+ // eslint-disable-next-line complexity
981
+ const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
982
+ /* Make sure attribute cannot clobber */
983
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
984
+ return false;
985
+ }
986
+ /* Allow valid data-* attributes: At least one character after "-"
987
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
988
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
989
+ We don't need to check the value; it's always URI safe. */
990
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
991
+ if (
992
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
993
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
994
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
995
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
996
+ // Alternative, second condition checks if it's an `is`-attribute, AND
997
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
998
+ lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
999
+ return false;
1000
+ }
1001
+ /* Check value is safe. First, is attr inert? If so, is safe */
1002
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
1003
+ return false;
1004
+ } else ;
1005
+ return true;
1006
+ };
1007
+ /**
1008
+ * _isBasicCustomElement
1009
+ * checks if at least one dash is included in tagName, and it's not the first char
1010
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1011
+ *
1012
+ * @param tagName name of the tag of the node to sanitize
1013
+ * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1014
+ */
1015
+ const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1016
+ return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
1017
+ };
1018
+ /**
1019
+ * _sanitizeAttributes
1020
+ *
1021
+ * @protect attributes
1022
+ * @protect nodeName
1023
+ * @protect removeAttribute
1024
+ * @protect setAttribute
1025
+ *
1026
+ * @param currentNode to sanitize
1027
+ */
1028
+ const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1029
+ /* Execute a hook if present */
1030
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1031
+ const {
1032
+ attributes
1033
+ } = currentNode;
1034
+ /* Check if we have attributes; if not we might have a text node */
1035
+ if (!attributes || _isClobbered(currentNode)) {
1036
+ return;
1037
+ }
1038
+ const hookEvent = {
1039
+ attrName: '',
1040
+ attrValue: '',
1041
+ keepAttr: true,
1042
+ allowedAttributes: ALLOWED_ATTR,
1043
+ forceKeepAttr: undefined
1044
+ };
1045
+ let l = attributes.length;
1046
+ /* Go backwards over all attributes; safely remove bad ones */
1047
+ while (l--) {
1048
+ const attr = attributes[l];
1049
+ const {
1050
+ name,
1051
+ namespaceURI,
1052
+ value: attrValue
1053
+ } = attr;
1054
+ const lcName = transformCaseFunc(name);
1055
+ const initValue = attrValue;
1056
+ let value = name === 'value' ? initValue : stringTrim(initValue);
1057
+ /* Execute a hook if present */
1058
+ hookEvent.attrName = lcName;
1059
+ hookEvent.attrValue = value;
1060
+ hookEvent.keepAttr = true;
1061
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1062
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1063
+ value = hookEvent.attrValue;
1064
+ /* Full DOM Clobbering protection via namespace isolation,
1065
+ * Prefix id and name attributes with `user-content-`
1066
+ */
1067
+ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1068
+ // Remove the attribute with this value
1069
+ _removeAttribute(name, currentNode);
1070
+ // Prefix the value and later re-create the attribute with the sanitized value
1071
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
1072
+ }
1073
+ /* Work around a security issue with comments inside attributes */
1074
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
1075
+ _removeAttribute(name, currentNode);
1076
+ continue;
1077
+ }
1078
+ /* Did the hooks approve of the attribute? */
1079
+ if (hookEvent.forceKeepAttr) {
1080
+ continue;
1081
+ }
1082
+ /* Did the hooks approve of the attribute? */
1083
+ if (!hookEvent.keepAttr) {
1084
+ _removeAttribute(name, currentNode);
1085
+ continue;
1086
+ }
1087
+ /* Work around a security issue in jQuery 3.0 */
1088
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1089
+ _removeAttribute(name, currentNode);
1090
+ continue;
1091
+ }
1092
+ /* Sanitize attribute content to be template-safe */
1093
+ if (SAFE_FOR_TEMPLATES) {
1094
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1095
+ value = stringReplace(value, expr, ' ');
1096
+ });
1097
+ }
1098
+ /* Is `value` valid for this attribute? */
1099
+ const lcTag = transformCaseFunc(currentNode.nodeName);
1100
+ if (!_isValidAttribute(lcTag, lcName, value)) {
1101
+ _removeAttribute(name, currentNode);
1102
+ continue;
1103
+ }
1104
+ /* Handle attributes that require Trusted Types */
1105
+ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1106
+ if (namespaceURI) ; else {
1107
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1108
+ case 'TrustedHTML':
1109
+ {
1110
+ value = trustedTypesPolicy.createHTML(value);
1111
+ break;
1112
+ }
1113
+ case 'TrustedScriptURL':
1114
+ {
1115
+ value = trustedTypesPolicy.createScriptURL(value);
1116
+ break;
1117
+ }
1118
+ }
1119
+ }
1120
+ }
1121
+ /* Handle invalid data-* attribute set by try-catching it */
1122
+ if (value !== initValue) {
1123
+ try {
1124
+ if (namespaceURI) {
1125
+ currentNode.setAttributeNS(namespaceURI, name, value);
1126
+ } else {
1127
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1128
+ currentNode.setAttribute(name, value);
1129
+ }
1130
+ if (_isClobbered(currentNode)) {
1131
+ _forceRemove(currentNode);
1132
+ } else {
1133
+ arrayPop(DOMPurify.removed);
1134
+ }
1135
+ } catch (_) {
1136
+ _removeAttribute(name, currentNode);
1137
+ }
1138
+ }
1139
+ }
1140
+ /* Execute a hook if present */
1141
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1142
+ };
1143
+ /**
1144
+ * _sanitizeShadowDOM
1145
+ *
1146
+ * @param fragment to iterate over recursively
1147
+ */
1148
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1149
+ let shadowNode = null;
1150
+ const shadowIterator = _createNodeIterator(fragment);
1151
+ /* Execute a hook if present */
1152
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1153
+ while (shadowNode = shadowIterator.nextNode()) {
1154
+ /* Execute a hook if present */
1155
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1156
+ /* Sanitize tags and elements */
1157
+ _sanitizeElements(shadowNode);
1158
+ /* Check attributes next */
1159
+ _sanitizeAttributes(shadowNode);
1160
+ /* Deep shadow DOM detected */
1161
+ if (shadowNode.content instanceof DocumentFragment) {
1162
+ _sanitizeShadowDOM(shadowNode.content);
1163
+ }
1164
+ }
1165
+ /* Execute a hook if present */
1166
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1167
+ };
1168
+ // eslint-disable-next-line complexity
1169
+ DOMPurify.sanitize = function (dirty) {
1170
+ let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1171
+ let body = null;
1172
+ let importedNode = null;
1173
+ let currentNode = null;
1174
+ let returnNode = null;
1175
+ /* Make sure we have a string to sanitize.
1176
+ DO NOT return early, as this will return the wrong type if
1177
+ the user has requested a DOM object rather than a string */
1178
+ IS_EMPTY_INPUT = !dirty;
1179
+ if (IS_EMPTY_INPUT) {
1180
+ dirty = '<!-->';
1181
+ }
1182
+ /* Stringify, in case dirty is an object */
1183
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
1184
+ if (typeof dirty.toString === 'function') {
1185
+ dirty = dirty.toString();
1186
+ if (typeof dirty !== 'string') {
1187
+ throw typeErrorCreate('dirty is not a string, aborting');
1188
+ }
1189
+ } else {
1190
+ throw typeErrorCreate('toString is not a function');
1191
+ }
1192
+ }
1193
+ /* Return dirty HTML if DOMPurify cannot run */
1194
+ if (!DOMPurify.isSupported) {
1195
+ return dirty;
1196
+ }
1197
+ /* Assign config vars */
1198
+ if (!SET_CONFIG) {
1199
+ _parseConfig(cfg);
1200
+ }
1201
+ /* Clean up removed elements */
1202
+ DOMPurify.removed = [];
1203
+ /* Check if dirty is correctly typed for IN_PLACE */
1204
+ if (typeof dirty === 'string') {
1205
+ IN_PLACE = false;
1206
+ }
1207
+ if (IN_PLACE) {
1208
+ /* Do some early pre-sanitization to avoid unsafe root nodes */
1209
+ if (dirty.nodeName) {
1210
+ const tagName = transformCaseFunc(dirty.nodeName);
1211
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1212
+ throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1213
+ }
1214
+ }
1215
+ } else if (dirty instanceof Node) {
1216
+ /* If dirty is a DOM element, append to an empty document to avoid
1217
+ elements being stripped by the parser */
1218
+ body = _initDocument('<!---->');
1219
+ importedNode = body.ownerDocument.importNode(dirty, true);
1220
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
1221
+ /* Node is already a body, use as is */
1222
+ body = importedNode;
1223
+ } else if (importedNode.nodeName === 'HTML') {
1224
+ body = importedNode;
1225
+ } else {
1226
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1227
+ body.appendChild(importedNode);
1228
+ }
1229
+ } else {
1230
+ /* Exit directly if we have nothing to do */
1231
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1232
+ // eslint-disable-next-line unicorn/prefer-includes
1233
+ dirty.indexOf('<') === -1) {
1234
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1235
+ }
1236
+ /* Initialize the document to work on */
1237
+ body = _initDocument(dirty);
1238
+ /* Check we have a DOM node from the data */
1239
+ if (!body) {
1240
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1241
+ }
1242
+ }
1243
+ /* Remove first element node (ours) if FORCE_BODY is set */
1244
+ if (body && FORCE_BODY) {
1245
+ _forceRemove(body.firstChild);
1246
+ }
1247
+ /* Get node iterator */
1248
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
1249
+ /* Now start iterating over the created document */
1250
+ while (currentNode = nodeIterator.nextNode()) {
1251
+ /* Sanitize tags and elements */
1252
+ _sanitizeElements(currentNode);
1253
+ /* Check attributes next */
1254
+ _sanitizeAttributes(currentNode);
1255
+ /* Shadow DOM detected, sanitize it */
1256
+ if (currentNode.content instanceof DocumentFragment) {
1257
+ _sanitizeShadowDOM(currentNode.content);
1258
+ }
1259
+ }
1260
+ /* If we sanitized `dirty` in-place, return it. */
1261
+ if (IN_PLACE) {
1262
+ return dirty;
1263
+ }
1264
+ /* Return sanitized string or DOM */
1265
+ if (RETURN_DOM) {
1266
+ if (RETURN_DOM_FRAGMENT) {
1267
+ returnNode = createDocumentFragment.call(body.ownerDocument);
1268
+ while (body.firstChild) {
1269
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1270
+ returnNode.appendChild(body.firstChild);
1271
+ }
1272
+ } else {
1273
+ returnNode = body;
1274
+ }
1275
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
1276
+ /*
1277
+ AdoptNode() is not used because internal state is not reset
1278
+ (e.g. the past names map of a HTMLFormElement), this is safe
1279
+ in theory but we would rather not risk another attack vector.
1280
+ The state that is cloned by importNode() is explicitly defined
1281
+ by the specs.
1282
+ */
1283
+ returnNode = importNode.call(originalDocument, returnNode, true);
1284
+ }
1285
+ return returnNode;
1286
+ }
1287
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1288
+ /* Serialize doctype if allowed */
1289
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1290
+ serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1291
+ }
1292
+ /* Sanitize final string template-safe */
1293
+ if (SAFE_FOR_TEMPLATES) {
1294
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1295
+ serializedHTML = stringReplace(serializedHTML, expr, ' ');
1296
+ });
1297
+ }
1298
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1299
+ };
1300
+ DOMPurify.setConfig = function () {
1301
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1302
+ _parseConfig(cfg);
1303
+ SET_CONFIG = true;
1304
+ };
1305
+ DOMPurify.clearConfig = function () {
1306
+ CONFIG = null;
1307
+ SET_CONFIG = false;
1308
+ };
1309
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
1310
+ /* Initialize shared config vars if necessary. */
1311
+ if (!CONFIG) {
1312
+ _parseConfig({});
1313
+ }
1314
+ const lcTag = transformCaseFunc(tag);
1315
+ const lcName = transformCaseFunc(attr);
1316
+ return _isValidAttribute(lcTag, lcName, value);
1317
+ };
1318
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
1319
+ if (typeof hookFunction !== 'function') {
1320
+ return;
1321
+ }
1322
+ arrayPush(hooks[entryPoint], hookFunction);
1323
+ };
1324
+ DOMPurify.removeHook = function (entryPoint, hookFunction) {
1325
+ if (hookFunction !== undefined) {
1326
+ const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
1327
+ return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
1328
+ }
1329
+ return arrayPop(hooks[entryPoint]);
1330
+ };
1331
+ DOMPurify.removeHooks = function (entryPoint) {
1332
+ hooks[entryPoint] = [];
1333
+ };
1334
+ DOMPurify.removeAllHooks = function () {
1335
+ hooks = _createHooksMap();
1336
+ };
1337
+ return DOMPurify;
1338
+ }
1339
+ var purify = createDOMPurify();
1340
+
1341
+ const pdsComboboxCss = ":host{display:block}.pds-combobox{position:relative}.pds-combobox__label{display:block;font-size:0.95rem;-webkit-margin-after:var(--pine-dimension-150);margin-block-end:var(--pine-dimension-150)}.pds-combobox__input{background:var(--pine-color-background-container);border:1px solid var(--pine-color-border);border-radius:var(--pine-dimension-125);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-active);-ms-flex:1;flex:1;font:var(--pine-typography-body-medium);padding:var(--pine-dimension-xs) var(--pine-dimension-150);-webkit-transition:border-color 0.2s ease;transition:border-color 0.2s ease;width:100%}.pds-combobox__input:hover:not(:disabled){border-color:var(--pine-color-border-hover)}.pds-combobox__input:disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-combobox__input:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-combobox__input:focus-visible{border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-combobox__input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__input::placeholder{color:var(--pine-color-text-placeholder)}.pds-combobox__listbox{background:var(--pine-color-background-container);border:0;border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);list-style:none;margin:0;min-width:220px;overflow-y:auto;padding:var(--pine-dimension-xs);position:absolute;z-index:1000}.pds-combobox__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-combobox__option[aria-selected=true]{background:var(--pine-color-grey-150)}.pds-combobox__option .pds-combobox__option--layout .pds-combobox__option-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__option:last-child{-webkit-margin-after:0;margin-block-end:0}.pds-combobox__option--highlighted,.pds-combobox__option[selected],.pds-combobox__option--selected{background:var(--pine-color-grey-150)}.pds-combobox__option-check{color:currentColor;font-size:var(--pine-dimension-150);-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__button-trigger{-ms-flex-align:center;align-items:center;background:var(--color-background-default, var(--pine-color-secondary));border:var(--pine-border);border-radius:var(--pine-border-radius-full);color:var(--color-text-default, #ffffff);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body-medium);-ms-flex-pack:justify;justify-content:space-between;min-height:var(--pine-dimension-450);outline:none;padding:0 var(--pine-dimension-sm);-webkit-transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, background 0.15s, -webkit-box-shadow 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s;transition:border-color 0.15s, box-shadow 0.15s, background 0.15s, -webkit-box-shadow 0.15s;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.pds-combobox__button-trigger .pds-combobox__button-trigger-layout-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}.pds-combobox__button-trigger .trigger-content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;width:100%}.pds-combobox__button-trigger:focus-visible{border-color:var(--color-border-focus, var(--pine-color-border));-webkit-box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring));box-shadow:0 0 0 2px var(--color-outline, var(--pine-color-focus-ring))}.pds-combobox__button-trigger:hover{background:var(--color-background-hover, var(--pine-color-secondary-hover));border-color:var(--color-border-hover, var(--pine-color-border-hover))}.pds-combobox__button-trigger[aria-disabled=true],.pds-combobox__button-trigger:disabled{background:var(--color-background-disabled, var(--pine-color-secondary-disabled));border-color:var(--color-border-disabled, var(--pine-color-border-disabled));color:var(--color-text-disabled, var(--pine-color-text-secondary-disabled));cursor:not-allowed;opacity:0.6}.pds-combobox__button-trigger-label{color:inherit;-ms-flex:1 1 auto;flex:1 1 auto;text-align:start}.pds-combobox__button-trigger-chevron{color:currentColor;-webkit-margin-start:var(--pine-dimension-150);margin-inline-start:var(--pine-dimension-150)}.pds-combobox__button-trigger--primary{--color-background-default:var(--pine-color-primary);--color-background-hover:var(--pine-color-primary-hover);--color-background-disabled:var(--pine-color-primary-disabled);--color-border-default:var(--pine-color-primary);--color-border-hover:var(--pine-color-primary-hover);--color-border-disabled:var(--pine-color-primary-disabled);--color-border-focus:var(--pine-color-primary);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-primary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--accent{--color-background-default:var(--pine-color-accent);--color-background-hover:var(--pine-color-accent-hover);--color-background-disabled:var(--pine-color-accent-disabled);--color-border-default:var(--pine-color-accent);--color-border-hover:var(--pine-color-accent-hover);--color-border-disabled:var(--pine-color-accent-disabled);--color-border-focus:var(--pine-color-accent);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-accent-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--secondary{--color-background-default:var(--pine-color-secondary);--color-background-hover:var(--pine-color-secondary-hover);--color-background-disabled:var(--pine-color-secondary-disabled);--color-border-default:var(--pine-color-border);--color-border-hover:var(--pine-color-border-hover);--color-border-disabled:var(--pine-color-border-disabled);--color-border-focus:var(--pine-color-border);--color-text-default:var(--pine-color-text-secondary);--color-text-disabled:var(--pine-color-text-secondary-disabled);--color-outline:var(--pine-color-focus-ring)}.pds-combobox__button-trigger--destructive{--color-background-default:var(--pine-color-danger);--color-background-hover:var(--pine-color-danger-hover);--color-background-disabled:var(--pine-color-danger-disabled);--color-border-default:var(--pine-color-danger);--color-border-hover:var(--pine-color-danger-hover);--color-border-disabled:var(--pine-color-danger-disabled);--color-border-focus:var(--pine-color-danger);--color-text-default:var(--pine-color-text-primary);--color-text-disabled:var(--pine-color-text-danger-disabled);--color-outline:var(--pine-color-focus-ring-danger)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[data-layout]{border-radius:var(--pine-dimension-125);padding-block:var(--pine-dimension-xs)}";
1342
+
1343
+ const PdsCombobox = class {
1344
+ constructor(hostRef) {
1345
+ index.registerInstance(this, hostRef);
1346
+ this.pdsComboboxChange = index.createEvent(this, "pdsComboboxChange");
1347
+ /**
1348
+ * Enable custom layout content for options. Options with data-layout attribute will render their HTML content.
1349
+ * ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
1350
+ * @default false
1351
+ */
1352
+ this.customOptionLayouts = false;
1353
+ /**
1354
+ * Enable custom layout content for the button trigger via the trigger-content slot.
1355
+ * When true, uses slot content for initial state but updates dynamically with selected option layout.
1356
+ * ⚠️ Security Warning: Only use with trusted content. Basic XSS protection is applied, but avoid user-generated content.
1357
+ * @default false
1358
+ */
1359
+ this.customTriggerContent = false;
1360
+ /**
1361
+ * If true, the combobox is disabled.
1362
+ */
1363
+ this.disabled = false;
1364
+ /**
1365
+ * Placement of the dropdown relative to the trigger.
1366
+ * @default 'bottom-start'
1367
+ */
1368
+ this.dropdownPlacement = 'bottom-start';
1369
+ /**
1370
+ * Width of the dropdown. Any valid CSS width value.
1371
+ * @default '236px'
1372
+ */
1373
+ this.dropdownWidth = '236px';
1374
+ /**
1375
+ * Visually hides the label text for instances where only the combobox should be displayed.
1376
+ * Label remains accessible to assistive technology such as screen readers.
1377
+ */
1378
+ this.hideLabel = false;
1379
+ /**
1380
+ * Determines the combobox mode: 'filter' (filter options as you type) or 'select-only' (show all options).
1381
+ * @default 'filter'
1382
+ */
1383
+ this.mode = 'filter';
1384
+ /**
1385
+ * Determines the combobox trigger: 'input' (editable input) or 'button' (button-like, non-editable).
1386
+ * @default 'input'
1387
+ */
1388
+ this.trigger = 'input';
1389
+ /**
1390
+ * Width of the trigger (button or input). Any valid CSS width value.
1391
+ * @default 'fit-content'
1392
+ */
1393
+ this.triggerWidth = 'fit-content';
1394
+ /**
1395
+ * The visual variant for the button trigger. Matches Pine button variants.
1396
+ * @default 'secondary'
1397
+ */
1398
+ this.triggerVariant = 'secondary';
1399
+ /**
1400
+ * The value of the combobox input.
1401
+ */
1402
+ this.value = '';
1403
+ /**
1404
+ * Internal state for filtered options
1405
+ */
1406
+ this.filteredOptions = [];
1407
+ /**
1408
+ * Internal state for the currently highlighted option index
1409
+ */
1410
+ this.highlightedIndex = -1;
1411
+ /**
1412
+ * Internal state for dropdown open/close
1413
+ */
1414
+ this.isOpen = false;
1415
+ /**
1416
+ * Internal state for the currently selected option
1417
+ */
1418
+ this.selectedOption = null;
1419
+ /**
1420
+ * Internal state for the sanitized layout content of the selected option
1421
+ */
1422
+ this.selectedOptionLayoutContent = '';
1423
+ this.optionEls = [];
1424
+ this.handleInput = (e) => {
1425
+ const target = e.target;
1426
+ this.value = target.value;
1427
+ this.isOpen = true;
1428
+ this.filterOptions();
1429
+ setTimeout(() => this.openDropdownPositioning(), 0);
1430
+ };
1431
+ this.handleFocus = () => {
1432
+ this.isOpen = true;
1433
+ this.filterOptions();
1434
+ setTimeout(() => this.openDropdownPositioning(), 0);
1435
+ };
1436
+ this.handleKeyDown = (e) => {
1437
+ if (!this.isOpen && (e.key === 'ArrowDown' || e.key === 'ArrowUp')) {
1438
+ this.isOpen = true;
1439
+ return;
1440
+ }
1441
+ switch (e.key) {
1442
+ case 'ArrowDown':
1443
+ this.highlightedIndex = Math.min(this.highlightedIndex + 1, this.filteredOptions.length - 1);
1444
+ break;
1445
+ case 'ArrowUp':
1446
+ this.highlightedIndex = Math.max(this.highlightedIndex - 1, 0);
1447
+ break;
1448
+ case 'Enter':
1449
+ if (this.isOpen && this.highlightedIndex >= 0 && this.highlightedIndex < this.filteredOptions.length) {
1450
+ this.handleOptionClick(this.filteredOptions[this.highlightedIndex]);
1451
+ }
1452
+ break;
1453
+ case 'Escape':
1454
+ this.isOpen = false;
1455
+ break;
1456
+ }
1457
+ };
1458
+ // Event handler for option click
1459
+ this.onOptionClick = (event) => {
1460
+ const idx = Number(event.currentTarget.getAttribute('data-option-index'));
1461
+ const option = this.filteredOptions[idx];
1462
+ this.handleOptionClick(option);
1463
+ };
1464
+ // Event handler for mouse enter on option
1465
+ this.onOptionMouseEnter = (event) => {
1466
+ const idx = Number(event.currentTarget.getAttribute('data-option-index'));
1467
+ this.highlightedIndex = idx;
1468
+ };
1469
+ // Prevent blur on mousedown
1470
+ this.onOptionMouseDown = (event) => {
1471
+ event.preventDefault();
1472
+ };
1473
+ // Handler for button trigger click
1474
+ this.onButtonTriggerClick = () => {
1475
+ this.isOpen = !this.isOpen;
1476
+ if (this.isOpen)
1477
+ setTimeout(() => this.openDropdownPositioning(), 0);
1478
+ };
1479
+ // Handler for button trigger keyboard events
1480
+ this.onButtonTriggerKeyDown = (e) => {
1481
+ if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {
1482
+ e.preventDefault();
1483
+ this.isOpen = true;
1484
+ this.highlightedIndex = 0;
1485
+ setTimeout(() => this.openDropdownPositioning(), 0);
1486
+ }
1487
+ else if (e.key === 'Escape') {
1488
+ this.isOpen = false;
1489
+ }
1490
+ };
1491
+ // Close dropdown when focus leaves the combobox
1492
+ this.onComboboxFocusOut = (event) => {
1493
+ const relatedTarget = event.relatedTarget;
1494
+ if (!this.el.contains(relatedTarget)) {
1495
+ this.isOpen = false;
1496
+ // If there's a selected option but the input value doesn't match, restore the selected option's value
1497
+ if (this.selectedOption && this.value !== this.getOptionLabel(this.selectedOption)) {
1498
+ this.value = this.getOptionLabel(this.selectedOption);
1499
+ }
1500
+ }
1501
+ };
1502
+ }
1503
+ componentWillLoad() {
1504
+ this.updateOptions();
1505
+ }
1506
+ handleValueChange() {
1507
+ this.filterOptions();
1508
+ }
1509
+ handleSelectedOptionChange() {
1510
+ // Update the layout content when selected option changes
1511
+ this.selectedOptionLayoutContent = this.selectedOption && this.isOptionLayout(this.selectedOption)
1512
+ ? this.getOptionLayoutContent(this.selectedOption)
1513
+ : '';
1514
+ }
1515
+ updateOptions() {
1516
+ var _a;
1517
+ // Get all <option> elements from the slot
1518
+ const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot[name="option"], slot:not([name])');
1519
+ if (slot) {
1520
+ this.optionEls = slot.assignedElements({ flatten: true })
1521
+ .filter(el => el.tagName === 'OPTION');
1522
+ // Set initial selected option if one exists (only check DOM on initialization)
1523
+ if (!this.selectedOption) {
1524
+ const initialSelected = this.optionEls.find(opt => opt.hasAttribute('selected')) || null;
1525
+ this.setSelectedOption(initialSelected);
1526
+ }
1527
+ this.filterOptions();
1528
+ }
1529
+ }
1530
+ // Helper method to get option label, falling back to text content if no label attribute
1531
+ getOptionLabel(option) {
1532
+ return option.label || option.textContent || '';
1533
+ }
1534
+ // Helper method to get option layout content
1535
+ getOptionLayoutContent(option) {
1536
+ return this.sanitizeHtml(option.innerHTML || '');
1537
+ }
1538
+ // HTML sanitization using DOMPurify library to prevent XSS attacks
1539
+ sanitizeHtml(html) {
1540
+ // Configure DOMPurify to allow Pine Design System components while removing dangerous content
1541
+ const config = {
1542
+ // Allow all custom elements (including pds-* components)
1543
+ CUSTOM_ELEMENT_HANDLING: {
1544
+ tagNameCheck: (tagName) => {
1545
+ // Allow all pds-* tags and standard safe HTML tags
1546
+ return tagName.startsWith('pds-') || /^[a-z]+$/i.test(tagName);
1547
+ },
1548
+ attributeNameCheck: (attr) => {
1549
+ // Allow standard HTML attributes, data-* attributes, and Pine component attributes
1550
+ return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(attr) || attr.startsWith('data-') || attr.startsWith('aria-');
1551
+ },
1552
+ allowCustomizedBuiltInElements: false,
1553
+ },
1554
+ // Allow standard safe attributes
1555
+ ALLOW_DATA_ATTR: true,
1556
+ ALLOW_ARIA_ATTR: true,
1557
+ // Specifically forbid dangerous tags
1558
+ FORBID_TAGS: ['script', 'iframe', 'object', 'embed', 'form', 'input', 'textarea', 'select', 'button', 'style'],
1559
+ // Forbid all event handler attributes
1560
+ FORBID_ATTR: [
1561
+ 'onerror', 'onload', 'onclick', 'onmouseover', 'onmouseout', 'onmousemove',
1562
+ 'onfocus', 'onblur', 'onchange', 'onsubmit', 'onkeydown', 'onkeyup', 'onkeypress',
1563
+ 'onmousedown', 'onmouseup', 'ondblclick', 'oncontextmenu', 'onscroll'
1564
+ ],
1565
+ // Safe protocol whitelist
1566
+ ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,
1567
+ };
1568
+ return purify.sanitize(html, config);
1569
+ }
1570
+ // Helper method to check if option should render as layout
1571
+ isOptionLayout(option) {
1572
+ return this.customOptionLayouts && option.hasAttribute('data-layout');
1573
+ }
1574
+ // Helper method to check if option is selected (single source of truth)
1575
+ isOptionSelected(option) {
1576
+ return this.selectedOption === option;
1577
+ }
1578
+ // Helper method to set selected option (centralized state management)
1579
+ setSelectedOption(option) {
1580
+ this.selectedOption = option;
1581
+ }
1582
+ filterOptions() {
1583
+ if (this.mode === 'select-only') {
1584
+ this.filteredOptions = this.optionEls;
1585
+ }
1586
+ else {
1587
+ const val = this.value.toLowerCase();
1588
+ this.filteredOptions = this.optionEls.filter(option => {
1589
+ // For layout options, search both text content and data-search-text attribute
1590
+ if (this.isOptionLayout(option)) {
1591
+ const searchText = option.getAttribute('data-search-text') || option.textContent || '';
1592
+ return searchText.toLowerCase().includes(val);
1593
+ }
1594
+ return this.getOptionLabel(option).toLowerCase().includes(val);
1595
+ });
1596
+ }
1597
+ this.highlightedIndex = -1;
1598
+ }
1599
+ openDropdownPositioning() {
1600
+ if (this.triggerEl && this.listboxEl) {
1601
+ // Apply width and max-height BEFORE positioning calculations
1602
+ this.listboxEl.style.width = this.dropdownWidth;
1603
+ if (this.maxHeight) {
1604
+ this.listboxEl.style.maxHeight = this.maxHeight;
1605
+ this.listboxEl.style.overflowY = 'auto';
1606
+ }
1607
+ floatingUi_dom.computePosition(this.triggerEl, this.listboxEl, {
1608
+ placement: this.dropdownPlacement,
1609
+ strategy: 'absolute',
1610
+ middleware: [floatingUi_dom.offset(12), floatingUi_dom.flip(), floatingUi_dom.shift({ padding: 5 })],
1611
+ }).then(({ x, y }) => {
1612
+ Object.assign(this.listboxEl.style, {
1613
+ left: `${x}px`,
1614
+ top: `${y}px`,
1615
+ position: 'absolute',
1616
+ zIndex: 1000,
1617
+ });
1618
+ });
1619
+ }
1620
+ }
1621
+ /**
1622
+ * Sets focus on the native input element.
1623
+ */
1624
+ async setFocus() {
1625
+ var _a;
1626
+ (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
1627
+ }
1628
+ /**
1629
+ * Gets the value of the currently selected option.
1630
+ */
1631
+ async getSelectedValue() {
1632
+ return this.selectedOption ? this.selectedOption.value : null;
1633
+ }
1634
+ // Get the label of the selected option
1635
+ get selectedLabel() {
1636
+ return this.selectedOption ? this.getOptionLabel(this.selectedOption) : '';
1637
+ }
1638
+ // Get the layout content of the selected option for button trigger
1639
+ get selectedLayoutContent() {
1640
+ return this.selectedOptionLayoutContent;
1641
+ }
1642
+ // Check if selected option has layout
1643
+ get selectedHasLayout() {
1644
+ return this.selectedOption ? this.isOptionLayout(this.selectedOption) : false;
1645
+ }
1646
+ handleOptionClick(option) {
1647
+ // Update reactive state - single source of truth
1648
+ this.setSelectedOption(option);
1649
+ this.value = this.getOptionLabel(option);
1650
+ this.isOpen = false;
1651
+ this.pdsComboboxChange.emit({ value: option.value });
1652
+ }
1653
+ renderDropdown() {
1654
+ if (!this.isOpen || this.filteredOptions.length === 0)
1655
+ return null;
1656
+ return (index.h("ul", { class: "pds-combobox__listbox", role: "listbox", id: "pds-combobox-listbox", ref: el => (this.listboxEl = el) }, this.filteredOptions.map((option, idx) => {
1657
+ const isSelected = this.isOptionSelected(option);
1658
+ const isHighlighted = this.highlightedIndex === idx;
1659
+ const isLayout = this.isOptionLayout(option);
1660
+ return (index.h("li", { key: option.value, id: `pds-combobox-option-${idx}`, role: "option", "aria-selected": isSelected ? 'true' : 'false', class: {
1661
+ 'pds-combobox__option': true,
1662
+ 'pds-combobox__option--highlighted': isHighlighted,
1663
+ 'pds-combobox__option--layout': isLayout,
1664
+ }, "data-option-index": idx, onMouseDown: this.onOptionMouseDown, onClick: this.onOptionClick, onMouseEnter: this.onOptionMouseEnter }, isLayout ? (index.h("pds-box", { class: "pds-combobox__option-layout-wrapper", innerHTML: this.getOptionLayoutContent(option) })) : (this.getOptionLabel(option)), isSelected && index.h("pds-icon", { icon: "check", size: "regular", class: "pds-combobox__option-check" })));
1665
+ })));
1666
+ }
1667
+ // Helper method to render the caret icon
1668
+ renderCaretIcon() {
1669
+ return index.h("pds-icon", { icon: "caret-down", "aria-hidden": "true", "aria-label": "dropdown indicator", class: "pds-combobox__button-trigger-chevron" });
1670
+ }
1671
+ // Helper method to render layout content
1672
+ renderLayoutContent() {
1673
+ return (index.h("div", { class: "pds-combobox__button-trigger-layout-wrapper", innerHTML: this.selectedLayoutContent }));
1674
+ }
1675
+ // Helper method to render default text content
1676
+ renderDefaultContent() {
1677
+ return (index.h("span", { class: "pds-combobox__button-trigger-label" }, this.selectedLabel || this.placeholder));
1678
+ }
1679
+ // Helper method to check if we should show layout content
1680
+ shouldShowLayoutContent() {
1681
+ return this.selectedHasLayout && !!this.selectedLayoutContent;
1682
+ }
1683
+ renderButtonTriggerContent() {
1684
+ // Case 1: Custom trigger content with layout priority
1685
+ if (this.customTriggerContent) {
1686
+ if (this.shouldShowLayoutContent()) {
1687
+ return [this.renderLayoutContent(), this.renderCaretIcon()];
1688
+ }
1689
+ // Fall back to slot content when no layout is available
1690
+ return index.h("slot", { name: "trigger-content" });
1691
+ }
1692
+ // Case 2: Standard mode with layout content
1693
+ if (this.shouldShowLayoutContent()) {
1694
+ return [this.renderLayoutContent(), this.renderCaretIcon()];
1695
+ }
1696
+ // Case 3: Standard mode with default text content
1697
+ return [this.renderDefaultContent(), this.renderCaretIcon()];
1698
+ }
1699
+ render() {
1700
+ const triggerClass = `pds-combobox__button-trigger pds-combobox__button-trigger--${this.triggerVariant}`;
1701
+ return (index.h(index.Host, { key: 'ecc1f18dcb9869055af047446364afd66d13e5f6' }, index.h("div", { key: 'caf80cf07647666e6ea21bc7e8fa7e944a98f3b5', class: "pds-combobox", tabIndex: -1, onFocusout: this.onComboboxFocusOut }, this.label && (index.h("label", { key: '08d38b21ce3c2d78a6a405b81e4291d2f5e61aed', htmlFor: this.componentId, class: "pds-combobox__label" }, index.h("span", { key: '58a3986e2656522377fce50dfad73a0960e8a9db', class: this.hideLabel ? 'visually-hidden' : '' }, this.label))), this.trigger === 'input' ? (index.h("input", { ref: el => {
1702
+ this.inputEl = el;
1703
+ this.triggerEl = el;
1704
+ }, class: "pds-combobox__input", style: { width: this.triggerWidth }, type: "text", role: "combobox", "aria-autocomplete": "list", "aria-controls": "pds-combobox-listbox", "aria-activedescendant": this.highlightedIndex >= 0 ? `pds-combobox-option-${this.highlightedIndex}` : undefined, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, value: this.value, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown, autocomplete: "off", part: "input" })) : (index.h("div", { class: triggerClass, style: { width: this.triggerWidth }, role: "combobox", "aria-haspopup": "listbox", "aria-controls": "pds-combobox-listbox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.hideLabel ? this.label : undefined, id: this.componentId, tabIndex: 0, onClick: this.onButtonTriggerClick, "data-layout": this.customTriggerContent, onKeyDown: this.onButtonTriggerKeyDown, ref: el => (this.triggerEl = el), part: "button-trigger" }, this.renderButtonTriggerContent())), index.h("div", { key: 'a91eb5b7998c9274de0f7e7e5184def30d23ad06', style: { display: 'none' } }, index.h("slot", { key: '40dbc40a9286b8caade78bfb70af366193bb08f2', onSlotchange: () => this.updateOptions() })), this.renderDropdown())));
1705
+ }
1706
+ get el() { return index.getElement(this); }
1707
+ static get watchers() { return {
1708
+ "value": ["handleValueChange"],
1709
+ "selectedOption": ["handleSelectedOptionChange"]
1710
+ }; }
1711
+ };
1712
+ PdsCombobox.style = pdsComboboxCss;
1713
+
1714
+ exports.pds_combobox = PdsCombobox;
1715
+ //# sourceMappingURL=pds-combobox.entry.cjs.js.map
1716
+
1717
+ //# sourceMappingURL=pds-combobox.cjs.entry.js.map