@foxy.io/elements 1.16.0-beta.1 → 1.16.0-beta.4

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 (477) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +2 -2
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  5. package/dist/cdn/foxy-attribute-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-form.js +1 -1
  7. package/dist/cdn/foxy-cancellation-form.js +1 -1
  8. package/dist/cdn/foxy-collection-page.js +1 -1
  9. package/dist/cdn/foxy-collection-pages.js +1 -1
  10. package/dist/cdn/foxy-copy-to-clipboard.js +1 -0
  11. package/dist/cdn/foxy-coupon-card.js +1 -1
  12. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  13. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  14. package/dist/cdn/foxy-coupon-detail-card.js +1 -0
  15. package/dist/cdn/foxy-coupon-form.js +1 -1
  16. package/dist/cdn/foxy-custom-field-card.js +1 -1
  17. package/dist/cdn/foxy-custom-field-form.js +1 -1
  18. package/dist/cdn/foxy-customer-api.js +1 -1
  19. package/dist/cdn/foxy-customer-card.js +1 -1
  20. package/dist/cdn/foxy-customer-form.js +1 -1
  21. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  22. package/dist/cdn/foxy-customer-portal.js +15 -15
  23. package/dist/cdn/foxy-customer.js +6 -6
  24. package/dist/cdn/foxy-customers-table.js +1 -1
  25. package/dist/cdn/foxy-discount-builder.js +1 -0
  26. package/dist/cdn/foxy-discount-card.js +1 -1
  27. package/dist/cdn/foxy-discount-detail-card.js +1 -0
  28. package/dist/cdn/foxy-donation.js +1 -1
  29. package/dist/cdn/foxy-email-template-form.js +1 -1
  30. package/dist/cdn/foxy-error-entry-card.js +1 -1
  31. package/dist/cdn/foxy-form-dialog.js +1 -1
  32. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  33. package/dist/cdn/foxy-gift-card-card.js +1 -1
  34. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  35. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  36. package/dist/cdn/foxy-gift-card-form.js +1 -1
  37. package/dist/cdn/foxy-i18n.js +1 -1
  38. package/dist/cdn/foxy-item-card.js +1 -0
  39. package/dist/cdn/foxy-item-form.js +1 -0
  40. package/dist/cdn/foxy-item-option-card.js +1 -0
  41. package/dist/cdn/foxy-item-option-form.js +1 -0
  42. package/dist/cdn/foxy-items-form.js +1 -1
  43. package/dist/cdn/foxy-nucleon-element.js +1 -1
  44. package/dist/cdn/foxy-pagination.js +1 -1
  45. package/dist/cdn/foxy-payment-card.js +1 -1
  46. package/dist/cdn/foxy-payment-method-card.js +1 -1
  47. package/dist/cdn/foxy-query-builder.js +1 -1
  48. package/dist/cdn/foxy-report-form.js +15 -15
  49. package/dist/cdn/foxy-reports-table.js +2 -2
  50. package/dist/cdn/foxy-shipment-card.js +17 -0
  51. package/dist/cdn/foxy-sign-in-form.js +1 -1
  52. package/dist/cdn/foxy-spinner.js +2 -2
  53. package/dist/cdn/foxy-subscription-card.js +1 -1
  54. package/dist/cdn/foxy-subscription-form.js +4 -4
  55. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  56. package/dist/cdn/foxy-swipe-actions.js +1 -0
  57. package/dist/cdn/foxy-table.js +1 -1
  58. package/dist/cdn/foxy-tax-card.js +1 -1
  59. package/dist/cdn/foxy-tax-form.js +1 -1
  60. package/dist/cdn/foxy-template-config-form.js +1 -1
  61. package/dist/cdn/foxy-template-form.js +1 -1
  62. package/dist/cdn/foxy-transaction-card.js +1 -1
  63. package/dist/cdn/foxy-transaction.js +64 -0
  64. package/dist/cdn/foxy-transactions-table.js +1 -1
  65. package/dist/cdn/foxy-user-form.js +1 -1
  66. package/dist/cdn/foxy-users-table.js +1 -1
  67. package/dist/cdn/shared-007660a6.js +12 -0
  68. package/dist/cdn/{shared-9221e6b2.js → shared-0479553e.js} +1 -1
  69. package/dist/cdn/shared-06014421.js +1 -0
  70. package/dist/cdn/shared-072abf87.js +1 -0
  71. package/dist/cdn/{shared-b0f0e8b5.js → shared-11c2efc8.js} +1 -1
  72. package/dist/cdn/shared-1b064836.js +1 -0
  73. package/dist/cdn/shared-1ddccf4d.js +1 -0
  74. package/dist/cdn/{shared-15f2aeb5.js → shared-22103348.js} +1 -1
  75. package/dist/cdn/{shared-cb71ddbc.js → shared-25e9c276.js} +3 -3
  76. package/dist/cdn/{shared-448781f9.js → shared-2bb49907.js} +1 -1
  77. package/dist/cdn/shared-2eee69db.js +1 -0
  78. package/dist/cdn/shared-3026cee0.js +15 -0
  79. package/dist/cdn/shared-34998df6.js +1 -0
  80. package/dist/cdn/{shared-278a8b9d.js → shared-35de1004.js} +10 -10
  81. package/dist/cdn/{shared-31166bdc.js → shared-368a2f85.js} +1 -1
  82. package/dist/cdn/{shared-7f463a38.js → shared-38f8a319.js} +7 -7
  83. package/dist/cdn/{shared-e5937698.js → shared-3ffd77da.js} +14 -19
  84. package/dist/cdn/shared-4e63d6e0.js +1 -0
  85. package/dist/cdn/{shared-b20f463a.js → shared-5097c880.js} +2 -11
  86. package/dist/cdn/shared-518902c8.js +1 -0
  87. package/dist/cdn/shared-5e75308a.js +1 -0
  88. package/dist/cdn/{shared-d9aed64e.js → shared-60e98fbf.js} +1 -1
  89. package/dist/cdn/shared-64657919.js +1 -0
  90. package/dist/cdn/{shared-666e8a90.js → shared-757bb517.js} +1 -1
  91. package/dist/cdn/{shared-bf6c685e.js → shared-7819b0b0.js} +1 -1
  92. package/dist/cdn/shared-7f33a83a.js +159 -0
  93. package/dist/cdn/{shared-e8abe6c6.js → shared-7f3ca8e7.js} +5 -5
  94. package/dist/cdn/shared-874bbae5.js +1 -0
  95. package/dist/cdn/shared-92d6f937.js +1 -0
  96. package/dist/cdn/shared-935ba2fc.js +1 -0
  97. package/dist/cdn/shared-96df3c85.js +1 -0
  98. package/dist/cdn/{shared-218ba06e.js → shared-99065f2a.js} +1 -1
  99. package/dist/cdn/shared-9a089d49.js +1 -0
  100. package/dist/cdn/shared-9d4835ed.js +1 -0
  101. package/dist/cdn/{shared-24064bd3.js → shared-9d7aaf7a.js} +1 -1
  102. package/dist/cdn/shared-a8e21a41.js +1 -0
  103. package/dist/cdn/shared-b4a4a92b.js +1 -0
  104. package/dist/cdn/{shared-5d169043.js → shared-b8f492a4.js} +1 -1
  105. package/dist/cdn/{shared-ee53f7e5.js → shared-bbfdfee2.js} +10 -10
  106. package/dist/cdn/{shared-3821923d.js → shared-bc94606b.js} +1 -1
  107. package/dist/cdn/shared-c3c424cd.js +1 -0
  108. package/dist/cdn/shared-c4f0a219.js +1 -0
  109. package/dist/cdn/{shared-6d45a07b.js → shared-d3bf9ac0.js} +2 -2
  110. package/dist/cdn/shared-d3ffe0ef.js +1 -0
  111. package/dist/cdn/{shared-b710881a.js → shared-d519a301.js} +2 -2
  112. package/dist/cdn/shared-e090608c.js +201 -0
  113. package/dist/cdn/{shared-a81a95e8.js → shared-e59c65e3.js} +1 -1
  114. package/dist/cdn/shared-e6f3e9f0.js +6 -0
  115. package/dist/cdn/shared-ea9af4b0.js +29 -0
  116. package/dist/cdn/{shared-59e44f29.js → shared-f0ba30e8.js} +1 -1
  117. package/dist/cdn/{shared-756034e4.js → shared-f3655f42.js} +1 -1
  118. package/dist/cdn/{shared-07134f93.js → shared-f3b35364.js} +1 -1
  119. package/dist/cdn/{shared-e367b5fc.js → shared-f3f9f752.js} +9 -9
  120. package/dist/cdn/shared-f7bddf72.js +9 -0
  121. package/dist/cdn/shared-fe8ec1f9.js +1 -0
  122. package/dist/cdn/translations/copy-to-clipboard/en.json +6 -0
  123. package/dist/cdn/translations/coupon-form/en.json +21 -2
  124. package/dist/cdn/translations/gift-card-form/en.json +21 -0
  125. package/dist/cdn/translations/item-card/en.json +9 -0
  126. package/dist/cdn/translations/item-form/en.json +387 -0
  127. package/dist/cdn/translations/item-option-form/en.json +43 -0
  128. package/dist/cdn/translations/report-form/en.json +14 -2
  129. package/dist/cdn/translations/shipment-card/en.json +470 -0
  130. package/dist/cdn/translations/transaction/en.json +941 -0
  131. package/dist/elements/index.d.ts +1 -0
  132. package/dist/elements/index.js +2 -0
  133. package/dist/elements/index.js.map +1 -0
  134. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +12 -0
  135. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +65 -0
  136. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -0
  137. package/dist/elements/internal/InternalAsyncComboBoxControl/index.d.ts +4 -0
  138. package/dist/elements/internal/InternalAsyncComboBoxControl/index.js +6 -0
  139. package/dist/elements/internal/InternalAsyncComboBoxControl/index.js.map +1 -0
  140. package/dist/elements/internal/InternalCard/InternalCard.d.ts +13 -0
  141. package/dist/elements/internal/InternalCard/InternalCard.js +43 -0
  142. package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -0
  143. package/dist/elements/internal/InternalCard/index.d.ts +6 -0
  144. package/dist/elements/internal/InternalCard/index.js +8 -0
  145. package/dist/elements/internal/InternalCard/index.js.map +1 -0
  146. package/dist/elements/internal/InternalCollapsibleCard/InternalCollapsibleCard.d.ts +16 -0
  147. package/dist/elements/internal/InternalCollapsibleCard/InternalCollapsibleCard.js +63 -0
  148. package/dist/elements/internal/InternalCollapsibleCard/InternalCollapsibleCard.js.map +1 -0
  149. package/dist/elements/internal/InternalCollapsibleCard/index.d.ts +5 -0
  150. package/dist/elements/internal/InternalCollapsibleCard/index.js +7 -0
  151. package/dist/elements/internal/InternalCollapsibleCard/index.js.map +1 -0
  152. package/dist/elements/internal/InternalCollectionCard/InternalCollectionCard.d.ts +13 -0
  153. package/dist/elements/internal/InternalCollectionCard/InternalCollectionCard.js +119 -0
  154. package/dist/elements/internal/InternalCollectionCard/InternalCollectionCard.js.map +1 -0
  155. package/dist/elements/internal/InternalCollectionCard/index.d.ts +7 -0
  156. package/dist/elements/internal/InternalCollectionCard/index.js +9 -0
  157. package/dist/elements/internal/InternalCollectionCard/index.js.map +1 -0
  158. package/dist/elements/internal/InternalControl/InternalControl.d.ts +21 -0
  159. package/dist/elements/internal/InternalControl/InternalControl.js +53 -0
  160. package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -0
  161. package/dist/elements/internal/InternalControl/index.d.ts +2 -0
  162. package/dist/elements/internal/InternalControl/index.js +4 -0
  163. package/dist/elements/internal/InternalControl/index.js.map +1 -0
  164. package/dist/elements/internal/InternalCreateControl/InternalCreateControl.d.ts +13 -0
  165. package/dist/elements/internal/InternalCreateControl/InternalCreateControl.js +47 -0
  166. package/dist/elements/internal/InternalCreateControl/InternalCreateControl.js.map +1 -0
  167. package/dist/elements/internal/InternalCreateControl/index.d.ts +4 -0
  168. package/dist/elements/internal/InternalCreateControl/index.js +6 -0
  169. package/dist/elements/internal/InternalCreateControl/index.js.map +1 -0
  170. package/dist/elements/internal/InternalDateControl/InternalDateControl.d.ts +7 -0
  171. package/dist/elements/internal/InternalDateControl/InternalDateControl.js +48 -0
  172. package/dist/elements/internal/InternalDateControl/InternalDateControl.js.map +1 -0
  173. package/dist/elements/internal/InternalDateControl/index.d.ts +4 -0
  174. package/dist/elements/internal/InternalDateControl/index.js +6 -0
  175. package/dist/elements/internal/InternalDateControl/index.js.map +1 -0
  176. package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.d.ts +6 -0
  177. package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js +39 -0
  178. package/dist/elements/internal/InternalDeleteControl/InternalDeleteControl.js.map +1 -0
  179. package/dist/elements/internal/InternalDeleteControl/index.d.ts +5 -0
  180. package/dist/elements/internal/InternalDeleteControl/index.js +7 -0
  181. package/dist/elements/internal/InternalDeleteControl/index.js.map +1 -0
  182. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +25 -0
  183. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +78 -0
  184. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -0
  185. package/dist/elements/internal/InternalEditableControl/index.d.ts +3 -0
  186. package/dist/elements/internal/InternalEditableControl/index.js +5 -0
  187. package/dist/elements/internal/InternalEditableControl/index.js.map +1 -0
  188. package/dist/elements/internal/InternalForm/InternalForm.d.ts +13 -0
  189. package/dist/elements/internal/InternalForm/InternalForm.js +49 -0
  190. package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -0
  191. package/dist/elements/internal/InternalForm/index.d.ts +6 -0
  192. package/dist/elements/internal/InternalForm/index.js +8 -0
  193. package/dist/elements/internal/InternalForm/index.js.map +1 -0
  194. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +9 -0
  195. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +115 -0
  196. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -0
  197. package/dist/elements/internal/InternalFrequencyControl/index.d.ts +7 -0
  198. package/dist/elements/internal/InternalFrequencyControl/index.js +9 -0
  199. package/dist/elements/internal/InternalFrequencyControl/index.js.map +1 -0
  200. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +5 -0
  201. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +28 -0
  202. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -0
  203. package/dist/elements/internal/InternalIntegerControl/index.d.ts +4 -0
  204. package/dist/elements/internal/InternalIntegerControl/index.js +6 -0
  205. package/dist/elements/internal/InternalIntegerControl/index.js.map +1 -0
  206. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.d.ts +5 -0
  207. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +28 -0
  208. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -0
  209. package/dist/elements/internal/InternalNumberControl/index.d.ts +4 -0
  210. package/dist/elements/internal/InternalNumberControl/index.js +6 -0
  211. package/dist/elements/internal/InternalNumberControl/index.js.map +1 -0
  212. package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +5 -0
  213. package/dist/elements/internal/InternalTextControl/InternalTextControl.js +27 -0
  214. package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -0
  215. package/dist/elements/internal/InternalTextControl/index.d.ts +4 -0
  216. package/dist/elements/internal/InternalTextControl/index.js +6 -0
  217. package/dist/elements/internal/InternalTextControl/index.js.map +1 -0
  218. package/dist/elements/internal/InternalTimestampsControl/InternalTimestampsControl.d.ts +8 -0
  219. package/dist/elements/internal/InternalTimestampsControl/InternalTimestampsControl.js +56 -0
  220. package/dist/elements/internal/InternalTimestampsControl/InternalTimestampsControl.js.map +1 -0
  221. package/dist/elements/internal/InternalTimestampsControl/index.d.ts +2 -0
  222. package/dist/elements/internal/InternalTimestampsControl/index.js +4 -0
  223. package/dist/elements/internal/InternalTimestampsControl/index.js.map +1 -0
  224. package/dist/elements/private/Dialog/Dialog.d.ts +4 -2
  225. package/dist/elements/private/Dialog/Dialog.js +3 -1
  226. package/dist/elements/private/Dialog/Dialog.js.map +1 -1
  227. package/dist/elements/private/EditableList/EditableList.d.ts +4 -2
  228. package/dist/elements/private/EditableList/EditableList.js +3 -1
  229. package/dist/elements/private/EditableList/EditableList.js.map +1 -1
  230. package/dist/elements/private/FrequencyInput/FrequencyInput.d.ts +3 -1
  231. package/dist/elements/private/FrequencyInput/FrequencyInput.js +2 -1
  232. package/dist/elements/private/FrequencyInput/FrequencyInput.js.map +1 -1
  233. package/dist/elements/public/CollectionPage/CollectionPage.d.ts +4 -3
  234. package/dist/elements/public/CollectionPage/CollectionPage.js +5 -3
  235. package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
  236. package/dist/elements/public/CollectionPage/types.d.ts +1 -0
  237. package/dist/elements/public/CollectionPage/types.js.map +1 -1
  238. package/dist/elements/public/CollectionPages/CollectionPages.d.ts +4 -2
  239. package/dist/elements/public/CollectionPages/CollectionPages.js +3 -1
  240. package/dist/elements/public/CollectionPages/CollectionPages.js.map +1 -1
  241. package/dist/elements/public/CopyToClipboard/CopyToClipboard.d.ts +14 -0
  242. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js +112 -0
  243. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js.map +1 -0
  244. package/dist/elements/public/CopyToClipboard/index.d.ts +4 -0
  245. package/dist/elements/public/CopyToClipboard/index.js +6 -0
  246. package/dist/elements/public/CopyToClipboard/index.js.map +1 -0
  247. package/dist/elements/public/CouponDetailCard/CouponDetailCard.d.ts +25 -0
  248. package/dist/elements/public/CouponDetailCard/CouponDetailCard.js +58 -0
  249. package/dist/elements/public/CouponDetailCard/CouponDetailCard.js.map +1 -0
  250. package/dist/elements/public/CouponDetailCard/index.d.ts +5 -0
  251. package/dist/elements/public/CouponDetailCard/index.js +7 -0
  252. package/dist/elements/public/CouponDetailCard/index.js.map +1 -0
  253. package/dist/elements/public/CouponDetailCard/types.d.ts +3 -0
  254. package/dist/elements/public/CouponDetailCard/types.js +2 -0
  255. package/dist/elements/public/CouponDetailCard/types.js.map +1 -0
  256. package/dist/elements/public/CouponForm/CouponForm.js +36 -35
  257. package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
  258. package/dist/elements/public/CouponForm/index.d.ts +1 -0
  259. package/dist/elements/public/CouponForm/index.js +1 -0
  260. package/dist/elements/public/CouponForm/index.js.map +1 -1
  261. package/dist/elements/public/CustomerApi/CustomerApi.d.ts +3 -1
  262. package/dist/elements/public/CustomerApi/CustomerApi.js +2 -1
  263. package/dist/elements/public/CustomerApi/CustomerApi.js.map +1 -1
  264. package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.d.ts +3 -1
  265. package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.js +2 -1
  266. package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.js.map +1 -1
  267. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.d.ts +3 -1
  268. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +2 -1
  269. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
  270. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.d.ts +3 -1
  271. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +2 -1
  272. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
  273. package/dist/elements/public/CustomerPortal/InternalCustomerPortalTransactions.d.ts +3 -1
  274. package/dist/elements/public/CustomerPortal/InternalCustomerPortalTransactions.js +2 -1
  275. package/dist/elements/public/CustomerPortal/InternalCustomerPortalTransactions.js.map +1 -1
  276. package/dist/elements/public/DiscountBuilder/DiscountBuilder.d.ts +28 -0
  277. package/dist/elements/public/DiscountBuilder/DiscountBuilder.js +339 -0
  278. package/dist/elements/public/DiscountBuilder/DiscountBuilder.js.map +1 -0
  279. package/dist/elements/public/DiscountBuilder/index.d.ts +2 -0
  280. package/dist/elements/public/DiscountBuilder/index.js +4 -0
  281. package/dist/elements/public/DiscountBuilder/index.js.map +1 -0
  282. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.d.ts +25 -0
  283. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js +58 -0
  284. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js.map +1 -0
  285. package/dist/elements/public/DiscountDetailCard/index.d.ts +5 -0
  286. package/dist/elements/public/DiscountDetailCard/index.js +7 -0
  287. package/dist/elements/public/DiscountDetailCard/index.js.map +1 -0
  288. package/dist/elements/public/DiscountDetailCard/types.d.ts +3 -0
  289. package/dist/elements/public/DiscountDetailCard/types.js +2 -0
  290. package/dist/elements/public/DiscountDetailCard/types.js.map +1 -0
  291. package/dist/elements/public/GiftCardForm/GiftCardForm.js +28 -15
  292. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
  293. package/dist/elements/public/GiftCardForm/index.d.ts +1 -0
  294. package/dist/elements/public/GiftCardForm/index.js +1 -0
  295. package/dist/elements/public/GiftCardForm/index.js.map +1 -1
  296. package/dist/elements/public/I18n/I18n.d.ts +3 -1
  297. package/dist/elements/public/I18n/I18n.js +2 -1
  298. package/dist/elements/public/I18n/I18n.js.map +1 -1
  299. package/dist/elements/public/ItemCard/ItemCard.d.ts +16 -0
  300. package/dist/elements/public/ItemCard/ItemCard.js +139 -0
  301. package/dist/elements/public/ItemCard/ItemCard.js.map +1 -0
  302. package/dist/elements/public/ItemCard/index.d.ts +4 -0
  303. package/dist/elements/public/ItemCard/index.js +6 -0
  304. package/dist/elements/public/ItemCard/index.js.map +1 -0
  305. package/dist/elements/public/ItemCard/types.d.ts +5 -0
  306. package/dist/elements/public/ItemCard/types.js +2 -0
  307. package/dist/elements/public/ItemCard/types.js.map +1 -0
  308. package/dist/elements/public/ItemForm/ItemForm.d.ts +19 -0
  309. package/dist/elements/public/ItemForm/ItemForm.js +96 -0
  310. package/dist/elements/public/ItemForm/ItemForm.js.map +1 -0
  311. package/dist/elements/public/ItemForm/index.d.ts +19 -0
  312. package/dist/elements/public/ItemForm/index.js +21 -0
  313. package/dist/elements/public/ItemForm/index.js.map +1 -0
  314. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.d.ts +6 -0
  315. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js +23 -0
  316. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js.map +1 -0
  317. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.d.ts +6 -0
  318. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js +8 -0
  319. package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js.map +1 -0
  320. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.d.ts +6 -0
  321. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js +31 -0
  322. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js.map +1 -0
  323. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.d.ts +5 -0
  324. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js +7 -0
  325. package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js.map +1 -0
  326. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.d.ts +6 -0
  327. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js +48 -0
  328. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js.map +1 -0
  329. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.d.ts +7 -0
  330. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +9 -0
  331. package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +1 -0
  332. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.d.ts +6 -0
  333. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js +32 -0
  334. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js.map +1 -0
  335. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.d.ts +5 -0
  336. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js +7 -0
  337. package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js.map +1 -0
  338. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.d.ts +6 -0
  339. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js +75 -0
  340. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js.map +1 -0
  341. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.d.ts +8 -0
  342. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js +10 -0
  343. package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js.map +1 -0
  344. package/dist/elements/public/ItemForm/types.d.ts +3 -0
  345. package/dist/elements/public/ItemForm/types.js +2 -0
  346. package/dist/elements/public/ItemForm/types.js.map +1 -0
  347. package/dist/elements/public/ItemOptionCard/ItemOptionCard.d.ts +25 -0
  348. package/dist/elements/public/ItemOptionCard/ItemOptionCard.js +56 -0
  349. package/dist/elements/public/ItemOptionCard/ItemOptionCard.js.map +1 -0
  350. package/dist/elements/public/ItemOptionCard/index.d.ts +6 -0
  351. package/dist/elements/public/ItemOptionCard/index.js +8 -0
  352. package/dist/elements/public/ItemOptionCard/index.js.map +1 -0
  353. package/dist/elements/public/ItemOptionCard/types.d.ts +11 -0
  354. package/dist/elements/public/ItemOptionCard/types.js +2 -0
  355. package/dist/elements/public/ItemOptionCard/types.js.map +1 -0
  356. package/dist/elements/public/ItemOptionForm/ItemOptionForm.d.ts +12 -0
  357. package/dist/elements/public/ItemOptionForm/ItemOptionForm.js +23 -0
  358. package/dist/elements/public/ItemOptionForm/ItemOptionForm.js.map +1 -0
  359. package/dist/elements/public/ItemOptionForm/index.d.ts +5 -0
  360. package/dist/elements/public/ItemOptionForm/index.js +7 -0
  361. package/dist/elements/public/ItemOptionForm/index.js.map +1 -0
  362. package/dist/elements/public/ItemOptionForm/types.d.ts +3 -0
  363. package/dist/elements/public/ItemOptionForm/types.js +2 -0
  364. package/dist/elements/public/ItemOptionForm/types.js.map +1 -0
  365. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +7 -1
  366. package/dist/elements/public/NucleonElement/NucleonElement.js +13 -1
  367. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  368. package/dist/elements/public/Pagination/Pagination.d.ts +3 -1
  369. package/dist/elements/public/Pagination/Pagination.js +3 -2
  370. package/dist/elements/public/Pagination/Pagination.js.map +1 -1
  371. package/dist/elements/public/PaymentCard/PaymentCard.js +1 -1
  372. package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -1
  373. package/dist/elements/public/QueryBuilder/QueryBuilder.d.ts +3 -1
  374. package/dist/elements/public/QueryBuilder/QueryBuilder.js +2 -1
  375. package/dist/elements/public/QueryBuilder/QueryBuilder.js.map +1 -1
  376. package/dist/elements/public/ReportForm/ReportForm.d.ts +9 -9
  377. package/dist/elements/public/ReportForm/ReportForm.js +159 -73
  378. package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
  379. package/dist/elements/public/ReportForm/index.d.ts +4 -1
  380. package/dist/elements/public/ReportForm/index.js +4 -1
  381. package/dist/elements/public/ReportForm/index.js.map +1 -1
  382. package/dist/elements/public/ReportForm/types.d.ts +2 -4
  383. package/dist/elements/public/ReportForm/types.js.map +1 -1
  384. package/dist/elements/public/ReportForm/utils.d.ts +16 -0
  385. package/dist/elements/public/ReportForm/utils.js +73 -0
  386. package/dist/elements/public/ReportForm/utils.js.map +1 -0
  387. package/dist/elements/public/ShipmentCard/ShipmentCard.d.ts +22 -0
  388. package/dist/elements/public/ShipmentCard/ShipmentCard.js +114 -0
  389. package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -0
  390. package/dist/elements/public/ShipmentCard/index.d.ts +7 -0
  391. package/dist/elements/public/ShipmentCard/index.js +9 -0
  392. package/dist/elements/public/ShipmentCard/index.js.map +1 -0
  393. package/dist/elements/public/ShipmentCard/types.d.ts +18 -0
  394. package/dist/elements/public/ShipmentCard/types.js +2 -0
  395. package/dist/elements/public/ShipmentCard/types.js.map +1 -0
  396. package/dist/elements/public/Spinner/Spinner.d.ts +4 -2
  397. package/dist/elements/public/Spinner/Spinner.js +3 -1
  398. package/dist/elements/public/Spinner/Spinner.js.map +1 -1
  399. package/dist/elements/public/SwipeActions/SwipeActions.d.ts +13 -0
  400. package/dist/elements/public/SwipeActions/SwipeActions.js +116 -0
  401. package/dist/elements/public/SwipeActions/SwipeActions.js.map +1 -0
  402. package/dist/elements/public/SwipeActions/index.d.ts +2 -0
  403. package/dist/elements/public/SwipeActions/index.js +4 -0
  404. package/dist/elements/public/SwipeActions/index.js.map +1 -0
  405. package/dist/elements/public/Transaction/Transaction.d.ts +13 -0
  406. package/dist/elements/public/Transaction/Transaction.js +101 -0
  407. package/dist/elements/public/Transaction/Transaction.js.map +1 -0
  408. package/dist/elements/public/Transaction/index.d.ts +19 -0
  409. package/dist/elements/public/Transaction/index.js +21 -0
  410. package/dist/elements/public/Transaction/index.js.map +1 -0
  411. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.d.ts +9 -0
  412. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +69 -0
  413. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -0
  414. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +4 -0
  415. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +6 -0
  416. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -0
  417. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.d.ts +5 -0
  418. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js +36 -0
  419. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js.map +1 -0
  420. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.d.ts +7 -0
  421. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js +9 -0
  422. package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js.map +1 -0
  423. package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.d.ts +11 -0
  424. package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js +50 -0
  425. package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js.map +1 -0
  426. package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.d.ts +5 -0
  427. package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js +7 -0
  428. package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js.map +1 -0
  429. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.d.ts +8 -0
  430. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +77 -0
  431. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -0
  432. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.d.ts +4 -0
  433. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.js +6 -0
  434. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.js.map +1 -0
  435. package/dist/elements/public/Transaction/types.d.ts +3 -0
  436. package/dist/elements/public/Transaction/types.js +2 -0
  437. package/dist/elements/public/Transaction/types.js.map +1 -0
  438. package/dist/elements/public/index.d.ts +11 -0
  439. package/dist/elements/public/index.defined.d.ts +11 -0
  440. package/dist/elements/public/index.defined.js +11 -0
  441. package/dist/elements/public/index.defined.js.map +1 -1
  442. package/dist/elements/public/index.js +11 -0
  443. package/dist/elements/public/index.js.map +1 -1
  444. package/dist/mixins/configurable.d.ts +5 -3
  445. package/dist/mixins/configurable.js +39 -4
  446. package/dist/mixins/configurable.js.map +1 -1
  447. package/dist/mixins/inferrable.d.ts +15 -0
  448. package/dist/mixins/inferrable.js +66 -0
  449. package/dist/mixins/inferrable.js.map +1 -0
  450. package/dist/mixins/themeable.js +6637 -4
  451. package/dist/mixins/themeable.js.map +1 -1
  452. package/dist/mixins/translatable.d.ts +3 -1
  453. package/dist/mixins/translatable.js +13 -1
  454. package/dist/mixins/translatable.js.map +1 -1
  455. package/package.json +1 -1
  456. package/dist/cdn/shared-061f64fc.js +0 -1
  457. package/dist/cdn/shared-21419f10.js +0 -1
  458. package/dist/cdn/shared-29db2caa.js +0 -230
  459. package/dist/cdn/shared-2a89f737.js +0 -1
  460. package/dist/cdn/shared-312fdfb6.js +0 -1
  461. package/dist/cdn/shared-385ab830.js +0 -1
  462. package/dist/cdn/shared-39e3ae67.js +0 -1
  463. package/dist/cdn/shared-4190da71.js +0 -1
  464. package/dist/cdn/shared-4792a0b8.js +0 -1
  465. package/dist/cdn/shared-5535f38f.js +0 -15
  466. package/dist/cdn/shared-56646cd3.js +0 -1
  467. package/dist/cdn/shared-63eaded9.js +0 -159
  468. package/dist/cdn/shared-7f0a9790.js +0 -1
  469. package/dist/cdn/shared-9783e5ce.js +0 -1
  470. package/dist/cdn/shared-9da4822a.js +0 -12
  471. package/dist/cdn/shared-b07ef791.js +0 -1
  472. package/dist/cdn/shared-da709e9d.js +0 -1
  473. package/dist/cdn/shared-db4aacb2.js +0 -1
  474. package/dist/cdn/shared-dd4971b5.js +0 -1
  475. package/dist/cdn/shared-df730f90.js +0 -1
  476. package/dist/cdn/shared-e94c2670.js +0 -1
  477. package/dist/cdn/shared-edfe5274.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA6HF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAgB,SAAU,SAAQ,mBAAmB,CACzD,eAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAC5C;CAAG","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-combo-box::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-time-picker {\n width: 100%;\n }\n\n vaadin-date-time-picker {\n width: 100%;\n }\n\n vaadin-button {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAOF,CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAgB,SAAU,SAAQ,mBAAmB,CACzD,eAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAC5C;CAAG","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-combo-box::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-time-picker {\n width: 100%;\n }\n\n vaadin-date-time-picker {\n width: 100%;\n }\n\n vaadin-button {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\nregisterStyles(\n 'vaadin-date-time-picker',\n css`\n vaadin-date-time-picker-custom-field {\n --lumo-text-field-size: auto;\n padding: 0;\n }\n\n vaadin-date-time-picker-custom-field::part(label) {\n padding-bottom: 0.5em;\n }\n `\n);\n\nregisterStyles(\n 'vaadin-date-time-picker-date-picker',\n css`\n :host {\n --lumo-text-field-size: auto;\n }\n vaadin-date-time-picker-date-text-field {\n padding: 0;\n }\n `\n);\n\nregisterStyles(\n 'vaadin-date-time-picker-time-picker',\n css`\n :host {\n --lumo-text-field-size: auto;\n }\n vaadin-date-time-picker-time-text-field {\n padding: 0;\n }\n `\n);\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { Constructor, LitElement, PropertyDeclarations } from 'lit-element';
2
2
  import { StringMap, TFunction, i18n } from 'i18next';
3
3
  import { Themeable } from './themeable';
4
+ import { InferrableMixinHost } from './inferrable';
4
5
  /**
5
6
  * One of the base classes for each rel-specific element in the collection,
6
7
  * providing internationalization capabilities to the derived components.
@@ -64,8 +65,9 @@ export declare abstract class Translatable extends Themeable {
64
65
  protected get _isI18nReady(): boolean;
65
66
  protected get _t(): TFunction;
66
67
  }
67
- declare type Base = Constructor<LitElement> & {
68
+ declare type Base = Constructor<InferrableMixinHost> & Constructor<LitElement> & {
68
69
  properties?: PropertyDeclarations;
70
+ inferredProperties: string[];
69
71
  };
70
72
  declare type Translator = (key: string, options?: StringMap) => string;
71
73
  export declare class TranslatableMixinHost {
@@ -159,7 +159,7 @@ export const TranslatableMixin = (BaseElement, defaultNS = '') => {
159
159
  const keys = [
160
160
  ...[defaultNS, ...this.ns.split(' ').reverse()]
161
161
  .map(v => v.trim())
162
- .filter((v, i, a) => a.indexOf(v) === i && v.length > 0)
162
+ .filter(v => v.length > 0)
163
163
  .reverse()
164
164
  .map((v, i, a) => `${v}:${[...a.slice(i + 1), key].join('.')}`),
165
165
  `shared:${key}`,
@@ -167,6 +167,9 @@ export const TranslatableMixin = (BaseElement, defaultNS = '') => {
167
167
  return I18nElement.i18next.t(keys, { lng: this.lang, ...options }).toString();
168
168
  };
169
169
  }
170
+ static get inferredProperties() {
171
+ return [...super.inferredProperties, 'lang', 'ns'];
172
+ }
170
173
  static get properties() {
171
174
  return {
172
175
  ...super.properties,
@@ -198,6 +201,15 @@ export const TranslatableMixin = (BaseElement, defaultNS = '') => {
198
201
  super.disconnectedCallback();
199
202
  (_a = this.__untrackTranslations) === null || _a === void 0 ? void 0 : _a.call(this);
200
203
  }
204
+ applyInferredProperties(context) {
205
+ super.applyInferredProperties(context);
206
+ if (this.infer === null)
207
+ return;
208
+ const lang = context.get('lang');
209
+ const ns = context.get('ns');
210
+ this.lang = lang !== null && lang !== void 0 ? lang : '';
211
+ this.ns = ns ? `${ns} ${this.infer}`.trim() : defaultNS;
212
+ }
201
213
  };
202
214
  };
203
215
  //# sourceMappingURL=translatable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"translatable.js","sourceRoot":"","sources":["../../src/mixins/translatable.ts"],"names":[],"mappings":"AACA,OAAO,OAAuD,MAAM,SAAS,CAAC;AAE9E,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,uBAAoB;AACxC,OAAO,EAAE,GAAG,EAAE,kBAAe;AAE7B;;;;;;;GAOG;AACH,MAAM,OAAgB,YAAa,SAAQ,SAAS;IA+DlD;;;;;OAKG;IACH,YAAY,SAAS,GAAG,QAAQ;QAC9B,KAAK,EAAE,CAAC;QAXF,WAAM,GAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAwB,CAAC,CAAC,CAAC,CAAC;QAEzD,SAAI,GAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAuB,CAAC,CAAC,CAAC,CAAC;QAU5D,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;QACpB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IACvD,CAAC;IA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,SAAS,CAAC;QACnB,CAAC;QAyBD,iBAAiB;YACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC1B,MAAM,WAAW,GAAG,cAAc,CAAC,GAAG,CAAC,WAAW,CAA4B,CAAC;YAC/E,IAAI,CAAC,qBAAqB,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,mBAAmB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAC5F,CAAC;QAED,gBAAgB;QAChB,OAAO,CAAC,iBAA2C;YACjD,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;YAEjC,MAAM,WAAW,GAAG,cAAc,CAAC,GAAG,CAAC,WAAW,CAA4B,CAAC;YAC/E,IAAI,CAAC,WAAW;gBAAE,OAAO;YAEzB,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAChF,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1F,CAAC;QAED,oBAAoB;;YAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;YAC7B,MAAA,IAAI,CAAC,qBAAqB,+CAA1B,IAAI,EAA2B;QACjC,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Constructor, LitElement, PropertyDeclarations } from 'lit-element';\nimport i18next, { FormatFunction, StringMap, TFunction, i18n } from 'i18next';\n\nimport HttpApi from 'i18next-http-backend';\nimport { I18n } from '../elements/public/I18n/I18n';\nimport { Themeable } from './themeable';\nimport { cdn } from '../env';\n\n/**\n * One of the base classes for each rel-specific element in the collection,\n * providing internationalization capabilities to the derived components.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Translatable extends Themeable {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n lang: { type: String, noAccessor: true },\n ns: { type: String, noAccessor: true },\n };\n }\n\n /**\n * i18next formatter that converts given value to lowecase.\n * @see https://www.i18next.com/translation-function/formatting\n */\n private static __fLowercase: FormatFunction = (value): string => {\n return value.toLowerCase();\n };\n\n /**\n * i18next formatter that presents an array of serializable items\n * as `[0], [1], [...] and [length - 1]`. For example, given an array like\n * the following: `['a', 'b', 'c']`, it will output `'a, b and c'`.\n * @see https://www.i18next.com/translation-function/formatting\n */\n private static __fList: FormatFunction = (value): string => {\n return (value as string[])\n .map((v, i, a) => {\n if (i === 0) return v;\n const part = i === a.length - 1 ? ` $t(and) ` : ',';\n return `${part} ${v}`;\n })\n .join('');\n };\n\n /**\n * Chooses the right i18next formatter for the given template.\n * @see https://www.i18next.com/translation-function/formatting\n */\n private static __f: FormatFunction = (...args): string => {\n const value = args[0];\n const formats = args[1]?.split(' ') ?? [];\n\n return formats.reduce((result, format) => {\n switch (format) {\n case 'lowercase':\n return Translatable.__fLowercase(result);\n case 'list':\n return Translatable.__fList(result);\n default:\n return result;\n }\n }, value);\n };\n\n private static __whenI18NReady: Promise<TFunction>;\n\n private static __isI18NReady = false;\n\n private static __i18n: i18n;\n\n private __lang = (this._i18n.options.fallbackLng as string[])[0];\n\n private __ns = (this._i18n.options.fallbackNS as string[])[0];\n\n /**\n * Creates class instance and starts loading missing translations\n * in background. Triggers render when ready.\n *\n * @param defaultNS Name of the folder translations for this component are stored in. Usually a node name without vendor prefix.\n */\n constructor(defaultNS = 'global') {\n super();\n this.ns = defaultNS;\n this._whenI18nReady.then(() => this.requestUpdate());\n }\n\n /**\n * Contains the language this component presents its translatable\n * content in. Assigning a value to this property will load new\n * translations in background and trigger a render afterwards.\n *\n * **Example:** `\"en\"`\n */\n public get lang(): string {\n return this.__lang;\n }\n\n public set lang(value: string) {\n if (!value || value === 'undefined') return;\n this.__lang = value;\n this._i18n.loadLanguages(value).then(() => {\n if (this.__lang === value) this.requestUpdate();\n });\n }\n\n /**\n * The namespace to look for the translations in. We use this property to\n * sync namespace settings with the parent element and it's highly unlikely\n * that you'll ever need to set or read it in your code.\n *\n * **Example:** `\"admin\"`\n */\n public get ns(): string {\n return this.__ns;\n }\n\n public set ns(value: string) {\n this.__ns = value;\n this._i18n.loadNamespaces(value).then(() => {\n if (this.__ns === value) this.requestUpdate();\n });\n }\n\n private static __initI18N() {\n this.__i18n = i18next.createInstance();\n this.__i18n.use(HttpApi);\n\n this.__whenI18NReady = this.__i18n.init({\n ns: ['global'],\n supportedLngs: ['nl', 'en', 'es', 'sv', 'fi', 'fr', 'de', 'zh', 'no', 'it', 'pl'],\n interpolation: { format: Translatable.__f },\n fallbackLng: 'en',\n fallbackNS: 'global',\n defaultNS: 'global',\n detection: {\n order: ['querystring', 'navigator', 'htmlTag', 'path', 'subdomain'],\n caches: [],\n },\n backend: {\n loadPath: `${cdn}/translations/{{ns}}/{{lng}}.json`,\n },\n });\n\n this.__whenI18NReady.then(() => (this.__isI18NReady = true));\n\n return this.__i18n;\n }\n\n protected get _i18n(): i18n {\n return Translatable.__i18n ?? Translatable.__initI18N();\n }\n\n protected get _whenI18nReady(): Promise<TFunction> {\n return Translatable.__whenI18NReady;\n }\n\n protected get _isI18nReady(): boolean {\n return Translatable.__isI18NReady;\n }\n\n protected get _t(): TFunction {\n const ns = [this.__ns, this._i18n.options.fallbackNS as string];\n return this._i18n.getFixedT(this.__lang, ns);\n }\n}\n\ntype Base = Constructor<LitElement> & { properties?: PropertyDeclarations };\ntype Translator = (key: string, options?: StringMap) => string;\n\nexport declare class TranslatableMixinHost {\n /** Optional ISO 639-1 code describing the language element content is written in. */\n lang: string;\n\n /**\n * Namespace used by this element.\n * @since 1.4.0\n */\n ns: string;\n\n /**\n * Translation function from i18next fixed to the current language and element namespace.\n * @since 1.4.0\n */\n get t(): Translator;\n}\n\nexport const TranslatableMixin = <T extends Base>(\n BaseElement: T,\n defaultNS = ''\n): T & Constructor<TranslatableMixinHost> & { defaultNS: string } => {\n return class TranslatableElement extends BaseElement {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n lang: { type: String },\n ns: { type: String },\n };\n }\n\n static get defaultNS(): string {\n return defaultNS;\n }\n\n lang = '';\n\n ns = defaultNS;\n\n t: Translator = (key, options) => {\n const I18nElement = customElements.get('foxy-i18n') as typeof I18n | undefined;\n\n if (!I18nElement) return key;\n\n const keys = [\n ...[defaultNS, ...this.ns.split(' ').reverse()]\n .map(v => v.trim())\n .filter((v, i, a) => a.indexOf(v) === i && v.length > 0)\n .reverse()\n .map((v, i, a) => `${v}:${[...a.slice(i + 1), key].join('.')}`),\n `shared:${key}`,\n ];\n\n return I18nElement.i18next.t(keys, { lng: this.lang, ...options }).toString();\n };\n\n private __untrackTranslations?: () => void;\n\n connectedCallback(): void {\n super.connectedCallback();\n const I18nElement = customElements.get('foxy-i18n') as typeof I18n | undefined;\n this.__untrackTranslations = I18nElement?.onTranslationChange(() => this.requestUpdate());\n }\n\n /** @readonly */\n updated(changedProperties: Map<keyof I18n, unknown>): void {\n super.updated(changedProperties);\n\n const I18nElement = customElements.get('foxy-i18n') as typeof I18n | undefined;\n if (!I18nElement) return;\n\n if (changedProperties.has('lang')) I18nElement.i18next.loadLanguages(this.lang);\n if (changedProperties.has('ns')) I18nElement.i18next.loadNamespaces(this.ns.split(' '));\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.__untrackTranslations?.();\n }\n };\n};\n"]}
1
+ {"version":3,"file":"translatable.js","sourceRoot":"","sources":["../../src/mixins/translatable.ts"],"names":[],"mappings":"AACA,OAAO,OAAuD,MAAM,SAAS,CAAC;AAE9E,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,uBAAoB;AACxC,OAAO,EAAE,GAAG,EAAE,kBAAe;AAG7B;;;;;;;GAOG;AACH,MAAM,OAAgB,YAAa,SAAQ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C;QAED,oBAAoB;;YAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;YAC7B,MAAA,IAAI,CAAC,qBAAqB,+CAA1B,IAAI,EAA2B;QACjC,CAAC;QAED,uBAAuB,CAAC,OAA6B;YACnD,KAAK,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;YACvC,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;gBAAE,OAAO;YAEhC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAuB,CAAC;YACvD,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAuB,CAAC;YAEnD,IAAI,CAAC,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC;YACvB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1D,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Constructor, LitElement, PropertyDeclarations } from 'lit-element';\nimport i18next, { FormatFunction, StringMap, TFunction, i18n } from 'i18next';\n\nimport HttpApi from 'i18next-http-backend';\nimport { I18n } from '../elements/public/I18n/I18n';\nimport { Themeable } from './themeable';\nimport { cdn } from '../env';\nimport { InferrableMixinHost } from './inferrable';\n\n/**\n * One of the base classes for each rel-specific element in the collection,\n * providing internationalization capabilities to the derived components.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Translatable extends Themeable {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n lang: { type: String, noAccessor: true },\n ns: { type: String, noAccessor: true },\n };\n }\n\n /**\n * i18next formatter that converts given value to lowecase.\n * @see https://www.i18next.com/translation-function/formatting\n */\n private static __fLowercase: FormatFunction = (value): string => {\n return value.toLowerCase();\n };\n\n /**\n * i18next formatter that presents an array of serializable items\n * as `[0], [1], [...] and [length - 1]`. For example, given an array like\n * the following: `['a', 'b', 'c']`, it will output `'a, b and c'`.\n * @see https://www.i18next.com/translation-function/formatting\n */\n private static __fList: FormatFunction = (value): string => {\n return (value as string[])\n .map((v, i, a) => {\n if (i === 0) return v;\n const part = i === a.length - 1 ? ` $t(and) ` : ',';\n return `${part} ${v}`;\n })\n .join('');\n };\n\n /**\n * Chooses the right i18next formatter for the given template.\n * @see https://www.i18next.com/translation-function/formatting\n */\n private static __f: FormatFunction = (...args): string => {\n const value = args[0];\n const formats = args[1]?.split(' ') ?? [];\n\n return formats.reduce((result, format) => {\n switch (format) {\n case 'lowercase':\n return Translatable.__fLowercase(result);\n case 'list':\n return Translatable.__fList(result);\n default:\n return result;\n }\n }, value);\n };\n\n private static __whenI18NReady: Promise<TFunction>;\n\n private static __isI18NReady = false;\n\n private static __i18n: i18n;\n\n private __lang = (this._i18n.options.fallbackLng as string[])[0];\n\n private __ns = (this._i18n.options.fallbackNS as string[])[0];\n\n /**\n * Creates class instance and starts loading missing translations\n * in background. Triggers render when ready.\n *\n * @param defaultNS Name of the folder translations for this component are stored in. Usually a node name without vendor prefix.\n */\n constructor(defaultNS = 'global') {\n super();\n this.ns = defaultNS;\n this._whenI18nReady.then(() => this.requestUpdate());\n }\n\n /**\n * Contains the language this component presents its translatable\n * content in. Assigning a value to this property will load new\n * translations in background and trigger a render afterwards.\n *\n * **Example:** `\"en\"`\n */\n public get lang(): string {\n return this.__lang;\n }\n\n public set lang(value: string) {\n if (!value || value === 'undefined') return;\n this.__lang = value;\n this._i18n.loadLanguages(value).then(() => {\n if (this.__lang === value) this.requestUpdate();\n });\n }\n\n /**\n * The namespace to look for the translations in. We use this property to\n * sync namespace settings with the parent element and it's highly unlikely\n * that you'll ever need to set or read it in your code.\n *\n * **Example:** `\"admin\"`\n */\n public get ns(): string {\n return this.__ns;\n }\n\n public set ns(value: string) {\n this.__ns = value;\n this._i18n.loadNamespaces(value).then(() => {\n if (this.__ns === value) this.requestUpdate();\n });\n }\n\n private static __initI18N() {\n this.__i18n = i18next.createInstance();\n this.__i18n.use(HttpApi);\n\n this.__whenI18NReady = this.__i18n.init({\n ns: ['global'],\n supportedLngs: ['nl', 'en', 'es', 'sv', 'fi', 'fr', 'de', 'zh', 'no', 'it', 'pl'],\n interpolation: { format: Translatable.__f },\n fallbackLng: 'en',\n fallbackNS: 'global',\n defaultNS: 'global',\n detection: {\n order: ['querystring', 'navigator', 'htmlTag', 'path', 'subdomain'],\n caches: [],\n },\n backend: {\n loadPath: `${cdn}/translations/{{ns}}/{{lng}}.json`,\n },\n });\n\n this.__whenI18NReady.then(() => (this.__isI18NReady = true));\n\n return this.__i18n;\n }\n\n protected get _i18n(): i18n {\n return Translatable.__i18n ?? Translatable.__initI18N();\n }\n\n protected get _whenI18nReady(): Promise<TFunction> {\n return Translatable.__whenI18NReady;\n }\n\n protected get _isI18nReady(): boolean {\n return Translatable.__isI18NReady;\n }\n\n protected get _t(): TFunction {\n const ns = [this.__ns, this._i18n.options.fallbackNS as string];\n return this._i18n.getFixedT(this.__lang, ns);\n }\n}\n\ntype Base = Constructor<InferrableMixinHost> &\n Constructor<LitElement> & { properties?: PropertyDeclarations; inferredProperties: string[] };\n\ntype Translator = (key: string, options?: StringMap) => string;\n\nexport declare class TranslatableMixinHost {\n /** Optional ISO 639-1 code describing the language element content is written in. */\n lang: string;\n\n /**\n * Namespace used by this element.\n * @since 1.4.0\n */\n ns: string;\n\n /**\n * Translation function from i18next fixed to the current language and element namespace.\n * @since 1.4.0\n */\n get t(): Translator;\n}\n\nexport const TranslatableMixin = <T extends Base>(\n BaseElement: T,\n defaultNS = ''\n): T & Constructor<TranslatableMixinHost> & { defaultNS: string } => {\n return class TranslatableElement extends BaseElement {\n static get inferredProperties(): string[] {\n return [...super.inferredProperties, 'lang', 'ns'];\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n lang: { type: String },\n ns: { type: String },\n };\n }\n\n static get defaultNS(): string {\n return defaultNS;\n }\n\n lang = '';\n\n ns = defaultNS;\n\n t: Translator = (key, options) => {\n const I18nElement = customElements.get('foxy-i18n') as typeof I18n | undefined;\n\n if (!I18nElement) return key;\n\n const keys = [\n ...[defaultNS, ...this.ns.split(' ').reverse()]\n .map(v => v.trim())\n .filter(v => v.length > 0)\n .reverse()\n .map((v, i, a) => `${v}:${[...a.slice(i + 1), key].join('.')}`),\n `shared:${key}`,\n ];\n\n return I18nElement.i18next.t(keys, { lng: this.lang, ...options }).toString();\n };\n\n private __untrackTranslations?: () => void;\n\n connectedCallback(): void {\n super.connectedCallback();\n const I18nElement = customElements.get('foxy-i18n') as typeof I18n | undefined;\n this.__untrackTranslations = I18nElement?.onTranslationChange(() => this.requestUpdate());\n }\n\n /** @readonly */\n updated(changedProperties: Map<keyof I18n, unknown>): void {\n super.updated(changedProperties);\n\n const I18nElement = customElements.get('foxy-i18n') as typeof I18n | undefined;\n if (!I18nElement) return;\n\n if (changedProperties.has('lang')) I18nElement.i18next.loadLanguages(this.lang);\n if (changedProperties.has('ns')) I18nElement.i18next.loadNamespaces(this.ns.split(' '));\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.__untrackTranslations?.();\n }\n\n applyInferredProperties(context: Map<string, unknown>): void {\n super.applyInferredProperties(context);\n if (this.infer === null) return;\n\n const lang = context.get('lang') as string | undefined;\n const ns = context.get('ns') as string | undefined;\n\n this.lang = lang ?? '';\n this.ns = ns ? `${ns} ${this.infer}`.trim() : defaultNS;\n }\n };\n};\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/elements",
3
3
  "type": "module",
4
- "version": "1.16.0-beta.1",
4
+ "version": "1.16.0-beta.4",
5
5
  "description": "E-commerce web components by Foxy.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1 +0,0 @@
1
- import{h as t,_ as e}from"./shared-63eaded9.js";import{C as i}from"./shared-df730f90.js";import{N as s}from"./shared-39e3ae67.js";import{T as r}from"./shared-385ab830.js";import{c as a}from"./shared-4e709717.js";let d,l,n,o=t=>t;const h=i(r(s));class p extends h{constructor(){super(...arguments),this.templates={},this.lang="",this.ns="",this.__renderTitle=e=>t(d||(d=o` <div data-testid="title"> ${0} <div class="text-secondary truncate"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==e?void 0:e(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=e=>t(l||(l=o` <div data-testid="subtitle"> ${0} <div class="font-semibold truncate"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==e?void 0:e(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}static get properties(){return e(e({},super.properties),{},{lang:{type:String},ns:{type:String}})}render(e){var i,s;const r=this.hiddenSelector;return t(n||(n=o` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-m"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),r.matches("title",!0)?"":this.__renderTitle(null==e?void 0:e.title),r.matches("subtitle",!0)?"":this.__renderSubtitle(null==e?void 0:e.subtitle),a({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(i=customElements.get("foxy-spinner"))||void 0===i?void 0:i.defaultNS)&&void 0!==s?s:"")}}export{p as T};
@@ -1 +0,0 @@
1
- import{c as e,g as t,L as r,_ as n,h as s}from"./shared-63eaded9.js";import{A as o}from"./shared-448781f9.js";import"./shared-59e44f29.js";import{C as i}from"./shared-df730f90.js";import{F as a}from"./shared-5535f38f.js";var u=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var r=function(e){var t=e.path,r=e.domain,n=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==r?"":";domain="+r,null==n?"":";expires="+n.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,n){return[encodeURIComponent(e),"=",encodeURIComponent(t),r(n)].join("")}})),c=e((function(e,t){function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){s=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(s)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},n=new RegExp("\\s*;\\s*");return e.split(n).forEach((function(e){var n=r(e.split("="),2),s=n[0],o=n[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),l=e((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var n=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,n,o;return t=e,(n=[{key:"clear",value:function(){var e=this,t=c.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=c.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=c.parseCookies(this._getCookie()),r=Object.keys(t).sort();return e<r.length?r[e]:null}},{key:"removeItem",value:function(e,t){var r=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),n=u.formatCookie(e,"",r);this._setCookie(n)}},{key:"setItem",value:function(e,t,r){var n=Object.assign(Object.assign({},this._defaultOptions),r),s=u.formatCookie(e,t,n);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=c.parseCookies(this._getCookie());return Object.keys(e).length}}])&&r(t.prototype,n),o&&r(t,o),e}();t.CookieStorage=n;var s={defineProperty:function(e,t,r){return e.setItem(t.toString(),String(r.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,r){if("string"==typeof t&&t in e)return e[t];var n=e.getItem(t.toString());return null!==n?n:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],r=0;r<e.length;r++){var n=e.key(r);null!==n&&t.push(n)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,r,n){return e.setItem(t.toString(),String(r)),!0}}})),f=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return l.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return u.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return c.parseCookies}})})));class p extends f.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===o.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),r=super.getItem("fx.customer.start"),n=super.getItem("fx.customer.jwt");if(null===e||null===t||null===r||null===n)return null;const s={session_token:e,date_created:r,expires_in:parseInt(t),jwt:n},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,r){if(e!==o.SESSION)return super.setItem(e,t,r);{const e=JSON.parse(t),r=1e3*e.expires_in,n=new Date(new Date(e.date_created).getTime()+r);super.setItem("fx.customer",e.session_token,{expires:n}),super.setItem("fx.customer.jwt",e.jwt,{expires:n}),super.setItem("fx.customer.start",e.date_created,{expires:n}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:n}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:n})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const h=new p;let d,m=e=>e;class g extends(i(r)){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof a))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const r=new a("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:n=>{"foxy://customer-api/session"===r.request.url&&e.requestUpdate(),401===n.status&&e.requestUpdate(),t.respondWith(Promise.resolve(n))}});e.dispatchEvent(r)&&r.respondWith(e.__handleRequest(r.request))}}static get properties(){return n(n({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(o.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return s(d||(d=m` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:h,local:localStorage};return new o({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new g.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let r,s;try{await this.api.signIn(t.credential),this.dispatchEvent(new g.SignInEvent("signin")),this.requestUpdate(),r=200,s=n({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof o.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;r=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:r})}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleRequest(e){const t=e.url,r=e.method;try{if("foxy://customer-api/session"===t){if("DELETE"===r)return this.__handleVirtualAuthSessionDelete();if("POST"===r)return this.__handleVirtualAuthSessionPost(e)}if("foxy://customer-api/recover"===t&&"POST"===r)return this.__handleVirtualAuthRecoverPost(e);const n=await this.api.fetch(e);return 401===n.status&&(this.api.storage.clear(),this.dispatchEvent(new g.SignOutEvent("signout")),this.requestUpdate()),n}catch(e){return new Response(null,{status:500})}}}g.SignOutEvent=class extends CustomEvent{},g.SignInEvent=class extends CustomEvent{};export{g as C};
@@ -1,230 +0,0 @@
1
- /**
2
- @license
3
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
- Code distributed by Google as part of the polymer project is also
8
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
- */
10
- window.JSCompiler_renameProperty=function(t,e){return t};
11
- /**
12
- @license
13
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
14
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
15
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
16
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
17
- Code distributed by Google as part of the polymer project is also
18
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
19
- */
20
- class t{constructor(t){this.value=t.toString()}toString(){return this.value}}function e(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof t)return function(e){if(e instanceof t)return e.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${e}`)}(e);throw new Error(`non-template value passed to Polymer's html function: ${e}`)}const n=function(t,...n){const r=document.createElement("template");return r.innerHTML=n.reduce(((n,r,i)=>n+e(r)+t[i+1]),t[0]),r};
21
- /**
22
- @license
23
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
24
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
25
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
26
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
27
- Code distributed by Google as part of the polymer project is also
28
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
29
- */let r,i=null,o=window.HTMLImports&&window.HTMLImports.whenReady||null;function s(t){requestAnimationFrame((function(){o?o(t):(i||(i=new Promise((t=>{r=t})),"complete"===document.readyState?r():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&r()}))),i.then((function(){t&&t()})))}))}
30
- /**
31
- @license
32
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
33
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
34
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
35
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
36
- Code distributed by Google as part of the polymer project is also
37
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
38
- */const a="__shadyCSSCachedStyle";let l=null,d=null;class c{constructor(){this.customStyles=[],this.enqueued=!1,s((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&d&&(this.enqueued=!0,s(d))}addCustomStyle(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[a])return t[a];let e;return e=t.getStyle?t.getStyle():t,e}processStyles(){const t=this.customStyles;for(let e=0;e<t.length;e++){const n=t[e];if(n[a])continue;const r=this.getStyleForCustomStyle(n);if(r){const t=r.__appliedElement||r;l&&l(t),n[a]=t}}return t}}c.prototype.addCustomStyle=c.prototype.addCustomStyle,c.prototype.getStyleForCustomStyle=c.prototype.getStyleForCustomStyle,c.prototype.processStyles=c.prototype.processStyles,Object.defineProperties(c.prototype,{transformCallback:{get:()=>l,set(t){l=t}},validateCallback:{get:()=>d,set(t){let e=!1;d||(e=!0),d=t,e&&this.enqueueDocumentValidation()}}});
39
- /**
40
- @license
41
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
42
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
43
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
44
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
45
- Code distributed by Google as part of the polymer project is also
46
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
47
- */
48
- const h=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,u=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,p=/@media\s(.*)/;
49
- /**
50
- @license
51
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
52
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
53
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
54
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
55
- Code distributed by Google as part of the polymer project is also
56
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
57
- */
58
- function _(t,e){for(let n in e)null===n?t.style.removeProperty(n):t.style.setProperty(n,e[n])}function f(t,e){const n=window.getComputedStyle(t).getPropertyValue(e);return n?n.trim():""}function m(t){const e=u.test(t)||h.test(t);return u.lastIndex=0,h.lastIndex=0,e}
59
- /**
60
- @license
61
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
62
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
63
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
64
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
65
- Code distributed by Google as part of the polymer project is also
66
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
67
- */const y=!(window.ShadyDOM&&window.ShadyDOM.inUse);let g,P;function w(t){g=(!t||!t.shimcssproperties)&&(y||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(P=window.ShadyCSS.cssBuild);const b=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?g=window.ShadyCSS.nativeCss:window.ShadyCSS?(w(window.ShadyCSS),window.ShadyCSS=void 0):w(window.WebComponents&&window.WebComponents.flags);const S=g,v=new c;
68
- /**
69
- @license
70
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
71
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
72
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
73
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
74
- Code distributed by Google as part of the polymer project is also
75
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
76
- */window.ShadyCSS||(window.ShadyCSS={prepareTemplate(t,e,n){},prepareTemplateDom(t,e){},prepareTemplateStyles(t,e,n){},styleSubtree(t,e){v.processStyles(),_(t,e)},styleElement(t){v.processStyles()},styleDocument(t){v.processStyles(),_(document.body,t)},getComputedStyleValue:(t,e)=>f(t,e),flushCustomStyles(){},nativeCss:S,nativeShadow:y,cssBuild:P,disableRuntime:b}),window.ShadyCSS.CustomStyleInterface=v;
77
- /**
78
- @license
79
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
80
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
81
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
82
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
83
- Code distributed by Google as part of the polymer project is also
84
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
85
- */
86
- let C,E,T=/(url\()([^)]*)(\))/g,O=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function A(t,e){if(t&&O.test(t))return t;if("//"===t)return t;if(void 0===C){C=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",C="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),C)try{return new URL(t,e).href}catch(e){return t}return E||(E=document.implementation.createHTMLDocument("temp"),E.base=E.createElement("base"),E.head.appendChild(E.base),E.anchor=E.createElement("a"),E.body.appendChild(E.anchor)),E.base.href=e,E.anchor.href=t,E.anchor.href||t}function N(t,e){return t.replace(T,(function(t,n,r,i){return n+"'"+A(r.replace(/["']/g,""),e)+"'"+i}))}function x(t){return t.substring(0,t.lastIndexOf("/")+1)}
87
- /**
88
- @license
89
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
90
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
91
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
92
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
93
- Code distributed by Google as part of the polymer project is also
94
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
95
- */const I=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const L=I&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let M=window.Polymer&&window.Polymer.rootPath||x(document.baseURI||window.location.href),R=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,D=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,k=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,F=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,z=window.Polymer&&window.Polymer.legacyOptimizations||!1,H=window.Polymer&&window.Polymer.legacyWarnings||!1,B=window.Polymer&&window.Polymer.syncInitialRender||!1,Y=window.Polymer&&window.Polymer.legacyUndefined||!1,j=window.Polymer&&window.Polymer.orderedComputed||!1,$=window.Polymer&&window.Polymer.removeNestedTemplates||!1,q=window.Polymer&&window.Polymer.fastDomIf||!1,J=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,U=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1,V=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,X={},W={};function G(t,e){X[t]=W[t.toLowerCase()]=e}function Z(t){return X[t]||W[t.toLowerCase()]}class K extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let n=Z(t);return n&&e?n.querySelector(e):n}return null}attributeChangedCallback(t,e,n,r){e!==n&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=A(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=x(e)}return this.__assetpath}register(t){if(t=t||this.id){if(k&&void 0!==Z(t))throw G(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,G(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}K.prototype.modules=X,customElements.define("dom-module",K);function Q(t){return K.import(t)}function tt(t){const e=N((t.body?t.body:t).textContent,t.baseURI),n=document.createElement("style");return n.textContent=e,n}function et(t){const e=t.trim().split(/\s+/),n=[];for(let t=0;t<e.length;t++)n.push(...nt(e[t]));return n}function nt(t){const e=Q(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...it(e));const n=e.querySelector("template");n&&t.push(...rt(n,e.assetpath)),e._styles=t}return e._styles}function rt(t,e){if(!t._styles){const n=[],r=t.content.querySelectorAll("style");for(let t=0;t<r.length;t++){let i=r[t],o=i.getAttribute("include");o&&n.push(...et(o).filter((function(t,e,n){return n.indexOf(t)===e}))),e&&(i.textContent=N(i.textContent,e)),n.push(i)}t._styles=n}return t._styles}function it(t){const e=[],n=t.querySelectorAll("link[rel=import][type~=css]");for(let t=0;t<n.length;t++){let r=n[t];if(r.import){const t=r.import,n=r.hasAttribute("shady-unscoped");if(n&&!t._unscopedStyle){const e=tt(t);e.setAttribute("shady-unscoped",""),t._unscopedStyle=e}else t._style||(t._style=tt(t));e.push(n?t._unscopedStyle:t._style)}}return e}function ot(t){let e=Q(t);if(e&&void 0===e._cssText){let t=function(t){let e="",n=it(t);for(let t=0;t<n.length;t++)e+=n[t].textContent;return e}
96
- /**
97
- @license
98
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
99
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
100
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
101
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
102
- Code distributed by Google as part of the polymer project is also
103
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
104
- */(e),n=e.querySelector("template");n&&(t+=function(t,e){let n="";const r=rt(t,e);for(let t=0;t<r.length;t++){let e=r[t];e.parentNode&&e.parentNode.removeChild(e),n+=e.textContent}return n}(n,e.assetpath)),e._cssText=t||null}return e||console.warn("Could not find style data in module named",t),e&&e._cssText||""}const st=window.ShadyCSS.CustomStyleInterface;class at extends HTMLElement{constructor(){super(),this._style=null,st.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const t=this.querySelector("style");if(!t)return null;this._style=t;const e=t.getAttribute("include");return e&&(t.removeAttribute("include"),t.textContent=function(t){let e=t.trim().split(/\s+/),n="";for(let t=0;t<e.length;t++)n+=ot(e[t]);return n}(e)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}window.customElements.define("custom-style",at);
105
- /**
106
- @license
107
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
108
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
109
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
110
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
111
- Code distributed by Google as part of the polymer project is also
112
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
113
- */
114
- let lt=0;const dt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let n=lt++;return function(r){let i=r.__mixinSet;if(i&&i[n])return r;let o=e,s=o.get(r);if(!s){s=t(r),o.set(r,s);let e=Object.create(s.__mixinSet||i||null);e[n]=!0,s.__mixinSet=e}return s}},ct=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
115
- /**
116
- @license
117
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
118
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
119
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
120
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
121
- Code distributed by Google as part of the polymer project is also
122
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
123
- */
124
- /**
125
- @license
126
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
127
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
128
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
129
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
130
- Code distributed by Google as part of the polymer project is also
131
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
132
- */
133
- function ht(t){return t.indexOf(".")>=0}function ut(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function pt(t,e){return 0===t.indexOf(e+".")}function _t(t,e){return 0===e.indexOf(t+".")}function ft(t,e,n){return e+n.slice(t.length)}function mt(t,e){return t===e||pt(t,e)||_t(t,e)}function yt(t){if(Array.isArray(t)){let e=[];for(let n=0;n<t.length;n++){let r=t[n].toString().split(".");for(let t=0;t<r.length;t++)e.push(r[t])}return e.join(".")}return t}function gt(t){return Array.isArray(t)?yt(t).split("."):t.toString().split(".")}function Pt(t,e,n){let r=t,i=gt(e);for(let t=0;t<i.length;t++){if(!r)return;r=r[i[t]]}return n&&(n.path=i.join(".")),r}function wt(t,e,n){let r=t,i=gt(e),o=i[i.length-1];if(i.length>1){for(let t=0;t<i.length-1;t++){if(r=r[i[t]],!r)return}r[o]=n}else r[e]=n;return i.join(".")}
134
- /**
135
- @license
136
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
137
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
138
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
139
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
140
- Code distributed by Google as part of the polymer project is also
141
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
142
- */const bt={},St=/-[a-z]/g,vt=/([A-Z])/g;function Ct(t){return bt[t]||(bt[t]=t.indexOf("-")<0?t:t.replace(St,(t=>t[1].toUpperCase())))}function Et(t){return bt[t]||(bt[t]=t.replace(vt,"-$1").toLowerCase())}
143
- /**
144
- @license
145
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
146
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
147
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
148
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
149
- Code distributed by Google as part of the polymer project is also
150
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
151
- */let Tt=0,Ot=0,At=[],Nt=0,xt=!1,It=document.createTextNode("");new window.MutationObserver((function(){xt=!1;const t=At.length;for(let e=0;e<t;e++){let t=At[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}At.splice(0,t),Ot+=t})).observe(It,{characterData:!0});const Lt={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Mt={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Rt={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Dt={run:t=>(xt||(xt=!0,It.textContent=Nt++),At.push(t),Tt++),cancel(t){const e=t-Ot;if(e>=0){if(!At[e])throw new Error("invalid async handle: "+t);At[e]=null}}},kt=Dt,Ft=dt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let n in t)n in e||e._createPropertyAccessor(n)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,n){let r=this.__data[t],i=this._shouldPropertyChange(t,e,r);return i&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),i}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,kt.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(t,e,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,n)),this.__dataCounter--}_shouldPropertiesChange(t,e,n){return Boolean(e)}_propertiesChanged(t,e,n){}_shouldPropertyChange(t,e,n){return n!==e&&(n==n||e==e)}attributeChangedCallback(t,e,n,r){e!==n&&this._attributeToProperty(t,n),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,n,r)}_attributeToProperty(t,e,n){if(!this.__serializing){const r=this.__dataAttributes,i=r&&r[t]||t;this[i]=this._deserializeValue(e,n||this.constructor.typeForProperty(i))}}_propertyToAttribute(t,e,n){this.__serializing=!0,n=arguments.length<3?this[t]:n,this._valueToNodeAttribute(this,n,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,n){const r=this._serializeValue(e);"class"!==n&&"name"!==n&&"slot"!==n||(t=ct(t)),void 0===r?t.removeAttribute(n):t.setAttribute(n,r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),zt={};let Ht=HTMLElement.prototype;for(;Ht;){let t=Object.getOwnPropertyNames(Ht);for(let e=0;e<t.length;e++)zt[t[e]]=!0;Ht=Object.getPrototypeOf(Ht)}const Bt=dt((t=>{const e=Ft(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Ct(t[e]))}static attributeNameForProperty(t){return Et(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){const n=this;n.hasAttribute(t)||this._valueToNodeAttribute(n,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t)try{return JSON.stringify(t)}catch(t){return""}}return super._serializeValue(t)}_deserializeValue(t,e){let n;switch(e){case Object:try{n=JSON.parse(t)}catch(e){n=t}break;case Array:try{n=JSON.parse(t)}catch(e){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:n=isNaN(t)?String(t):Number(t),n=new Date(n);break;default:n=super._deserializeValue(t,e)}return n}_definePropertyAccessor(t,e){!function(t,e){if(!zt[e]){let n=t[e];void 0!==n&&(t.__data?t._setPendingProperty(e,n):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=n))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Yt={"dom-if":!0,"dom-repeat":!0};
152
- /**
153
- @license
154
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
155
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
156
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
157
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
158
- Code distributed by Google as part of the polymer project is also
159
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
160
- */let jt=!1,$t=!1;function qt(t){(function(){if(!jt){jt=!0;const t=document.createElement("textarea");t.placeholder="a",$t=t.placeholder===t.textContent}return $t})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}function Jt(t){let e=t.getAttribute("is");if(e&&Yt[e]){let n=t;for(n.removeAttribute("is"),t=n.ownerDocument.createElement(e),n.parentNode.replaceChild(t,n),t.appendChild(n);n.attributes.length;)t.setAttribute(n.attributes[0].name,n.attributes[0].value),n.removeAttribute(n.attributes[0].name)}return t}function Ut(t,e){let n=e.parentInfo&&Ut(t,e.parentInfo);if(!n)return t;for(let t=n.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function Vt(t,e,n,r){r.id&&(e[r.id]=n)}function Xt(t,e,n){if(n.events&&n.events.length)for(let r,i=0,o=n.events;i<o.length&&(r=o[i]);i++)t._addMethodEventListenerToNode(e,r.name,r.value,t)}function Wt(t,e,n,r){n.templateInfo&&(e._templateInfo=n.templateInfo,e._parentTemplateInfo=r)}const Gt=dt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let n=t._templateInfo={};n.nodeInfoList=[],n.nestedTemplate=Boolean(e),n.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,n,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,n){return this._parseTemplateNode(t.content,e,n)}static _parseTemplateNode(t,e,n){let r=!1,i=t;return"template"!=i.localName||i.hasAttribute("preserve-content")?"slot"===i.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(i,e,n)||r,qt(i),i.firstChild&&this._parseTemplateChildNodes(i,e,n),i.hasAttributes&&i.hasAttributes()&&(r=this._parseTemplateNodeAttributes(i,e,n)||r),r||n.noted}static _parseTemplateChildNodes(t,e,n){if("script"!==t.localName&&"style"!==t.localName)for(let r,i=t.firstChild,o=0;i;i=r){if("template"==i.localName&&(i=Jt(i)),r=i.nextSibling,i.nodeType===Node.TEXT_NODE){let n=r;for(;n&&n.nodeType===Node.TEXT_NODE;)i.textContent+=n.textContent,r=n.nextSibling,t.removeChild(n),n=r;if(e.stripWhiteSpace&&!i.textContent.trim()){t.removeChild(i);continue}}let s={parentIndex:o,parentInfo:n};this._parseTemplateNode(i,e,s)&&(s.infoIndex=e.nodeInfoList.push(s)-1),i.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,n){let r=t,i=this._parseTemplate(r,e);return(i.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),n.templateInfo=i,!0}static _parseTemplateNodeAttributes(t,e,n){let r=!1,i=Array.from(t.attributes);for(let o,s=i.length-1;o=i[s];s--)r=this._parseTemplateNodeAttribute(t,e,n,o.name,o.value)||r;return r}static _parseTemplateNodeAttribute(t,e,n,r,i){return"on-"===r.slice(0,3)?(t.removeAttribute(r),n.events=n.events||[],n.events.push({name:r.slice(3),value:i}),!0):"id"===r&&(n.id=i,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let n=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=e.content||t.content,i=document.importNode(r,!0);i.__noInsertionPoint=!e.hasInsertionPoint;let o=i.nodeList=new Array(n.length);i.$={};for(let t,r=0,s=n.length;r<s&&(t=n[r]);r++){let n=o[r]=Ut(i,t);Vt(0,i.$,n,t),Wt(0,n,t,e),Xt(this,n,t)}return i=i,i}_addMethodEventListenerToNode(t,e,n,r){let i=function(t,e,n){return t=t._methodHost||t,function(e){t[n]?t[n](e,e.detail):console.warn("listener method `"+n+"` not defined")}}(r=r||t,0,n);return this._addEventListenerToNode(t,e,i),i}_addEventListenerToNode(t,e,n){t.addEventListener(e,n)}_removeEventListenerFromNode(t,e,n){t.removeEventListener(e,n)}}));
161
- /**
162
- * @fileoverview
163
- * @suppress {checkPrototypalTypes}
164
- * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
165
- * This code may only be used under the BSD style license found at
166
- * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
167
- * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
168
- * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
169
- * Google as part of the polymer project is also subject to an additional IP
170
- * rights grant found at http://polymer.github.io/PATENTS.txt
171
- */let Zt=0;const Kt=[],Qt={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},te=/[A-Z]/;function ee(t,e,n){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),n))for(let t in r){let e=r[t],n=r[t]=Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]}}else r=t[e]={};return r}function ne(t,e,n,r,i,o){if(e){let s=!1;const a=Zt++;for(let l in n){let d=e[i?ut(l):l];if(d)for(let e,c=0,h=d.length;c<h&&(e=d[c]);c++)e.info&&e.info.lastRun===a||i&&!ie(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,n,r,e.info,i,o),s=!0)}return s}return!1}function re(t,e,n,r,i,o,s,a){let l=!1,d=e[s?ut(r):r];if(d)for(let e,c=0,h=d.length;c<h&&(e=d[c]);c++)e.info&&e.info.lastRun===n||s&&!ie(r,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,r,i,o,e.info,s,a),l=!0);return l}function ie(t,e){if(e){let n=e.name;return n==t||!(!e.structured||!pt(n,t))||!(!e.wildcard||!_t(n,t))}return!0}function oe(t,e,n,r,i){let o="string"==typeof i.method?t[i.method]:i.method,s=i.property;o?o.call(t,t.__data[s],r[s]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function se(t,e,n){let r=ut(e);if(r!==e){return ae(t,Et(r)+"-changed",n[e],e),!0}return!1}function ae(t,e,n,r){let i={value:n,queueProperty:!0};r&&(i.path=r),ct(t).dispatchEvent(new CustomEvent(e,{detail:i}))}function le(t,e,n,r,i,o){let s=(o?ut(e):e)!=e?e:null,a=s?Pt(t,s):t.__data[e];s&&void 0===a&&(a=n[e]),ae(t,i.eventName,a,s)}function de(t,e,n,r,i){let o=t.__data[e];R&&(o=R(o,i.attrName,"attribute",t)),t._propertyToAttribute(e,i.attrName,o)}function ce(t,e,n,r){let i=t[Qt.COMPUTE];if(i)if(j){Zt++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const n=t[Qt.COMPUTE];let r,{counts:i,ready:o,total:s}=function(t){const e=t.__computeInfo,n={},r=t[Qt.COMPUTE],i=[];let o=0;for(let t in e){const r=e[t];o+=n[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||i.push(t);return{counts:n,ready:i,total:o}}(t);for(;r=o.shift();){e.set(r,e.size);const t=n[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--s,0==--i[e]&&o.push(e)}))}if(0!==s){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),s=[];for(let t in e)ue(t,i,s,o,r);let a;for(;a=s.shift();)pe(t,"",e,n,a)&&ue(a.methodInfo,i,s,o,r);Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;ne(t,i,o,n,r);)Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}const he=(t,e,n)=>{let r=0,i=e.length-1,o=-1;for(;r<=i;){const s=r+i>>1,a=n.get(e[s].methodInfo)-n.get(t.methodInfo);if(a<0)r=s+1;else{if(!(a>0)){o=s;break}i=s-1}}o<0&&(o=i+1),e.splice(o,0,t)},ue=(t,e,n,r,i)=>{const o=e[i?ut(t):t];if(o)for(let e=0;e<o.length;e++){const s=o[e];s.info.lastRun===Zt||i&&!ie(t,s.trigger)||(s.info.lastRun=Zt,he(s.info,n,r))}};function pe(t,e,n,r,i){let o=we(t,e,n,r,i);if(o===Kt)return!1;let s=i.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[s]?t._setPendingProperty(s,o,!0):(t[s]=o,!1)}function _e(t,e,n,r,i,o,s){n.bindings=n.bindings||[];let a={kind:r,target:i,parts:o,literal:s,isCompound:1!==o.length};if(n.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Et(i)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let n=0;n<a.parts.length;n++){let r=a.parts[n];r.compoundIndex=n,fe(t,e,a,r,l)}}function fe(t,e,n,r,i){if(!r.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+n.target+' because "-" is not a valid attribute starting character');else{let o=r.dependencies,s={index:i,binding:n,part:r,evaluator:t};for(let n=0;n<o.length;n++){let r=o[n];"string"==typeof r&&(r=Ee(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:me,info:s,trigger:r})}}}function me(t,e,n,r,i,o,s){let a=s[i.index],l=i.binding,d=i.part;if(o&&d.source&&e.length>d.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let r=n[e];e=ft(d.source,l.target,e),a._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(a)}else{let s=i.evaluator._evaluateBinding(t,d,e,n,r,o);s!==Kt&&function(t,e,n,r,i){i=function(t,e,n,r){if(n.isCompound){let i=t.__dataCompoundStorage[n.target];i[r.compoundIndex]=e,e=i.join("")}"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e));return e}(e,i,n,r),R&&(i=R(i,n.target,n.kind,e));if("attribute"==n.kind)t._valueToNodeAttribute(e,i,n.target);else{let r=n.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[Qt.READ_ONLY]&&e[Qt.READ_ONLY][r]||e._setPendingProperty(r,i)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,i)}}(t,a,l,d,s)}}function ye(t,e){if(e.isCompound){let n=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,i=new Array(r.length);for(let t=0;t<r.length;t++)i[t]=r[t].literal;let o=e.target;n[o]=i,e.literal&&"property"==e.kind&&("className"===o&&(t=ct(t)),t[o]=e.literal)}}function ge(t,e,n){if(n.listenerEvent){let r=n.parts[0];t.addEventListener(n.listenerEvent,(function(t){!function(t,e,n,r,i){let o,s=t.detail,a=s&&s.path;a?(r=ft(n,r,a),o=s&&s.value):o=t.currentTarget[n],o=i?!o:o,e[Qt.READ_ONLY]&&e[Qt.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,o,!0,Boolean(a))||s&&s.queueProperty||e._invalidateProperties()}(t,e,n.target,r.source,r.negate)}))}}function Pe(t,e,n,r,i,o){o=e.static||o&&("object"!=typeof o||o[e.methodName]);let s={methodName:e.methodName,args:e.args,methodInfo:i,dynamicFn:o};for(let i,o=0;o<e.args.length&&(i=e.args[o]);o++)i.literal||t._addPropertyEffect(i.rootProperty,n,{fn:r,info:s,trigger:i});return o&&t._addPropertyEffect(e.methodName,n,{fn:r,info:s}),s}function we(t,e,n,r,i){let o=t._methodHost||t,s=o[i.methodName];if(s){let r=t._marshalArgs(i.args,e,n);return r===Kt?Kt:s.apply(o,r)}i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}const be=[],Se=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function ve(t){let e="";for(let n=0;n<t.length;n++){e+=t[n].literal||""}return e}function Ce(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:be};if(e[2].trim()){return function(t,e){return e.args=t.map((function(t){let n=Ee(t);return n.literal||(e.static=!1),n}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t)}return t}return null}function Ee(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),n={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.rootProperty=ut(e),n.structured=ht(e),n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n}function Te(t,e,n){let r=Pt(t,n);return void 0===r&&(r=e[n]),r}function Oe(t,e,n,r){const i={indexSplices:r};Y&&!t._overrideLegacyUndefined&&(e.splices=i),t.notifyPath(n+".splices",i),t.notifyPath(n+".length",e.length),Y&&!t._overrideLegacyUndefined&&(i.indexSplices=[])}function Ae(t,e,n,r,i,o){Oe(t,e,n,[{index:r,addedCount:i,removed:o,object:e,type:"splice"}])}const Ne=dt((t=>{const e=Gt(Bt(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return Qt}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(xe.length){let t=xe[xe.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Qt.READ_ONLY];for(let n in t)e&&e[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=t[n])}_addPropertyEffect(t,e,n){this._createPropertyAccessor(t,e==Qt.READ_ONLY);let r=ee(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(n)}_removePropertyEffect(t,e,n){let r=ee(this,e,!0)[t],i=r.indexOf(n);i>=0&&r.splice(i,1)}_hasPropertyEffect(t,e){let n=this[e];return Boolean(n&&n[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Qt.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Qt.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Qt.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Qt.COMPUTE)}_setPendingPropertyOrPath(t,e,n,r){if(r||ut(Array.isArray(t)?t[0]:t)!==t){if(!r){let n=Pt(this,t);if(!(t=wt(this,t,e))||!super._shouldPropertyChange(t,e,n))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,n))return function(t,e,n){let r=t.__dataLinkedPaths;if(r){let i;for(let o in r){let s=r[o];_t(o,e)?(i=ft(o,s,e),t._setPendingPropertyOrPath(i,n,!0,!0)):_t(s,e)&&(i=ft(s,o,e),t._setPendingPropertyOrPath(i,n,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,n);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,n){n===t[e]&&"object"!=typeof n||("className"===e&&(t=ct(t)),t[e]=n)}_setPendingProperty(t,e,n){let r=this.__dataHasPaths&&ht(t),i=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,i[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[Qt.NOTIFY]&&this[Qt.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=n),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let n=t[e];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let n in t)!e&&this[Qt.READ_ONLY]&&this[Qt.READ_ONLY][n]||this._setPendingPropertyOrPath(n,t[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,n){let r,i=this.__dataHasPaths;this.__dataHasPaths=!1,ce(this,e,n,i),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,n,i),this._flushClients(),ne(this,this[Qt.REFLECT],e,n,i),ne(this,this[Qt.OBSERVE],e,n,i),r&&function(t,e,n,r,i){let o,s,a=t[Qt.NOTIFY],l=Zt++;for(let s in e)e[s]&&(a&&re(t,a,l,s,n,r,i)||i&&se(t,s,n))&&(o=!0);o&&(s=t.__dataHost)&&s._invalidateProperties&&s._invalidateProperties()}(this,r,e,n,i),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,n){this[Qt.PROPAGATE]&&ne(this,this[Qt.PROPAGATE],t,e,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,n)}_runEffectsForTemplate(t,e,n,r){const i=(e,r)=>{ne(this,t.propertyEffects,e,n,r,t.nodeList);for(let i=t.firstChild;i;i=i.nextSibling)this._runEffectsForTemplate(i,e,n,r)};t.runEffects?t.runEffects(i,e,r):i(e,r)}linkPaths(t,e){t=yt(t),e=yt(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=yt(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let n={path:""};Oe(this,Pt(this,t,n),n.path,e)}get(t,e){return Pt(e||this,t)}set(t,e,n){n?wt(n,t,e):this[Qt.READ_ONLY]&&this[Qt.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let n={path:""},r=Pt(this,t,n),i=r.length,o=r.push(...e);return e.length&&Ae(this,r,n.path,i,e.length,[]),o}pop(t){let e={path:""},n=Pt(this,t,e),r=Boolean(n.length),i=n.pop();return r&&Ae(this,n,e.path,n.length,0,[i]),i}splice(t,e,n,...r){let i,o={path:""},s=Pt(this,t,o);return e<0?e=s.length-Math.floor(-e):e&&(e=Math.floor(e)),i=2===arguments.length?s.splice(e):s.splice(e,n,...r),(r.length||i.length)&&Ae(this,s,o.path,e,r.length,i),i}shift(t){let e={path:""},n=Pt(this,t,e),r=Boolean(n.length),i=n.shift();return r&&Ae(this,n,e.path,0,0,[i]),i}unshift(t,...e){let n={path:""},r=Pt(this,t,n),i=r.unshift(...e);return e.length&&Ae(this,r,n.path,0,e.length,[]),i}notifyPath(t,e){let n;if(1==arguments.length){let r={path:""};e=Pt(this,t,r),n=r.path}else n=Array.isArray(t)?yt(t):t;this._setPendingPropertyOrPath(n,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var n;this._addPropertyEffect(t,Qt.READ_ONLY),e&&(this["_set"+(n=t,n[0].toUpperCase()+n.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,n){let r={property:t,method:e,dynamicFn:Boolean(n)};this._addPropertyEffect(t,Qt.OBSERVE,{fn:oe,info:r,trigger:{name:t}}),n&&this._addPropertyEffect(e,Qt.OBSERVE,{fn:oe,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let n=Ce(t);if(!n)throw new Error("Malformed observer expression '"+t+"'");Pe(this,n,Qt.OBSERVE,we,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Qt.NOTIFY,{fn:le,info:{eventName:Et(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Qt.REFLECT,{fn:de,info:{attrName:e}})}_createComputedProperty(t,e,n){let r=Ce(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const i=Pe(this,r,Qt.COMPUTE,pe,t,n);ee(this,"__computeInfo")[t]=i}_marshalArgs(t,e,n){const r=this.__data,i=[];for(let o=0,s=t.length;o<s;o++){let{name:s,structured:a,wildcard:l,value:d,literal:c}=t[o];if(!c)if(l){const t=_t(s,e),i=Te(r,n,t?e:s);d={path:t?e:s,value:i,base:t?Pt(r,s):i}}else d=a?Te(r,n,s):r[s];if(Y&&!this._overrideLegacyUndefined&&void 0===d&&t.length>1)return Kt;i[o]=d}return i}static addPropertyEffect(t,e,n){this.prototype._addPropertyEffect(t,e,n)}static createPropertyObserver(t,e,n){this.prototype._createPropertyObserver(t,e,n)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,n){this.prototype._createComputedProperty(t,e,n)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let n=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==n;if(!r)for(let t in n.propertyEffects)this._createPropertyAccessor(t);if(e)if(n=Object.create(n),n.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;n.parent=e,e.lastChild=n,n.previousSibling=r,r?r.nextSibling=n:e.firstChild=n}else this.__templateInfo=n;else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(t,e,n){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(n)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),xe.push(this);let n=super._stampTemplate(t,e);if(xe.pop(),e.nodeList=n.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=n.firstChild;e;e=e.nextSibling)t.push(e)}return n.templateInfo=e,function(t,e){let{nodeList:n,nodeInfoList:r}=e;if(r.length)for(let e=0;e<r.length;e++){let i=r[e],o=n[e],s=i.bindings;if(s)for(let e=0;e<s.length;e++){let n=s[e];ye(o,n),ge(o,t,n)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:n,nextSibling:r,parent:i}=e;n?n.nextSibling=r:i&&(i.firstChild=r),r?r.previousSibling=n:i&&(i.lastChild=n),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];ct(ct(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,n,r){let i=e._parseTemplateNode.call(this,t,n,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,n);e&&(t.textContent=ve(e)||" ",_e(this,n,r,"text","textContent",e),i=!0)}return i}static _parseTemplateNodeAttribute(t,n,r,i,o){let s=this._parseBindings(o,n);if(s){let e=i,o="property";te.test(i)?o="attribute":"$"==i[i.length-1]&&(i=i.slice(0,-1),o="attribute");let a=ve(s);return a&&"attribute"==o&&("class"==i&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(i)),t.setAttribute(i,a)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(i,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(i=Ct(i)),_e(this,n,r,o,i,s,a),!0}return e._parseTemplateNodeAttribute.call(this,t,n,r,i,o)}static _parseTemplateNestedTemplate(t,n,r){let i=e._parseTemplateNestedTemplate.call(this,t,n,r);const o=t.parentNode,s=r.templateInfo,a="dom-if"===o.localName,l="dom-repeat"===o.localName;$&&(a||l)&&(o.removeChild(t),(r=r.parentInfo).templateInfo=s,r.noted=!0,i=!1);let d=s.hostProps;if(q&&a)d&&(n.hostProps=Object.assign(n.hostProps||{},d),$||(r.parentInfo.noted=!0));else{let t="{";for(let e in d){_e(this,n,r,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}}return i}static _parseBindings(t,e){let n,r=[],i=0;for(;null!==(n=Se.exec(t));){n.index>i&&r.push({literal:t.slice(i,n.index)});let o=n[1][0],s=Boolean(n[2]),a=n[3].trim(),l=!1,d="",c=-1;"{"==o&&(c=a.indexOf("::"))>0&&(d=a.substring(c+2),a=a.substring(0,c),l=!0);let h=Ce(a),u=[];if(h){let{args:t,methodName:n}=h;for(let e=0;e<t.length;e++){let n=t[e];n.literal||u.push(n)}let r=e.dynamicFns;(r&&r[n]||h.static)&&(u.push(n),h.dynamicFn=!0)}else u.push(a);r.push({source:a,mode:o,negate:s,customEvent:l,signature:h,dependencies:u,event:d}),i=Se.lastIndex}if(i&&i<t.length){let e=t.substring(i);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,n,r,i,o){let s;return s=e.signature?we(t,n,r,0,e.signature):n!=e.source?Pt(t,e.source):o&&ht(n)?Pt(t,n):t.__data[n],e.negate&&(s=!s),s}}})),xe=[];
172
- /**
173
- @license
174
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
175
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
176
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
177
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
178
- Code distributed by Google as part of the polymer project is also
179
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
180
- */
181
- function Ie(t){}
182
- /**
183
- @license
184
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
185
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
186
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
187
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
188
- Code distributed by Google as part of the polymer project is also
189
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
190
- */const Le=dt((t=>{const e=Ft(t);function n(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof i?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const n=t.properties;n&&(e=function(t){const e={};for(let n in t){const r=t[n];e[n]="function"==typeof r?{type:r}:r}return e}(n))}t.__ownProperties=e}return t.__ownProperties}class i extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=n(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=n(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i})),Me=window.ShadyCSS&&window.ShadyCSS.cssBuild,Re=dt((t=>{const e=Le(Ne(t));function n(t,e,n,r){n.computed&&(n.readOnly=!0),n.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,n.computed,r)),n.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!n.computed):!1===n.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),n.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===n.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),n.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===n.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),n.observer&&t._createPropertyObserver(e,n.observer,r[n.observer]),t._addPropertyToAttributeMap(e)}function r(t,e,n,r){if(!Me){const i=e.content.querySelectorAll("style"),o=rt(e),s=function(t){let e=Q(t);return e?it(e):[]}(n),a=e.content.firstElementChild;for(let n=0;n<s.length;n++){let i=s[n];i.textContent=t._processStyleText(i.textContent,r),e.content.insertBefore(i,a)}let l=0;for(let e=0;e<o.length;e++){let n=o[e],s=i[l];s!==n?(n=n.cloneNode(!0),s.parentNode.insertBefore(n,s)):l++,n.textContent=t._processStyleText(n.textContent,r)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,n),V&&Me&&L){const n=e.content.querySelectorAll("style");if(n){let e="";Array.from(n).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}}return class extends e{static get polymerElementVersion(){return"3.4.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((n=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",n))||(n.__ownObservers=n.hasOwnProperty(JSCompiler_renameProperty("observers",n))?n.observers:null),n.__ownObservers);var n;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):z||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)n(this.prototype,e,t[e],t)}static createObservers(t,e){const n=this.prototype;for(let r=0;r<t.length;r++)n._createMethodObserver(t[r],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){const t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!k||F)&&(e=K.import(t,"template"),k&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=x(t.url);else{const t=K.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=M,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let n in e){let r=e[n];"value"in r&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[n]=r)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let n=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof n.value?n.value.call(this):n.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return N(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const n=this.importPath;r(this,e,t,n?A(n):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=ct(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),B&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=A(this.importPath)),A(t,e)}static _parseTemplateContent(t,n,r){return n.dynamicFns=n.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,n,r)}static _addTemplatePropertyEffect(t,n,r){return!H||n in this._properties||r.info.part.signature&&r.info.part.signature.static||r.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,n,r)}}})),De=Re(HTMLElement);
191
- /**
192
- * @fileoverview
193
- * @suppress {checkPrototypalTypes}
194
- * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
195
- * This code may only be used under the BSD style license found at
196
- * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
197
- * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
198
- * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
199
- * Google as part of the polymer project is also subject to an additional IP
200
- * rights grant found at http://polymer.github.io/PATENTS.txt
201
- */
202
- /**
203
- @license
204
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
205
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
206
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
207
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
208
- Code distributed by Google as part of the polymer project is also
209
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
210
- */
211
- class ke{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,Fe.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Fe.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,n){return t instanceof ke?t._cancelAsync():t=new ke,t.setConfig(e,n),t}}let Fe=new Set;const ze=function(t){Fe.add(t)},He=function(){const t=Boolean(Fe.size);return Fe.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};
212
- /**
213
- @license
214
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
215
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
216
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
217
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
218
- Code distributed by Google as part of the polymer project is also
219
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
220
- */
221
- let Be="string"==typeof document.head.style.touchAction,Ye="__polymerGestures",je="__polymerGesturesHandled",$e="__polymerGesturesTouchAction",qe=["mousedown","mousemove","mouseup","click"],Je=[0,1,4,2],Ue=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Ve(t){return qe.indexOf(t)>-1}let Xe=!1;function We(t){if(!Ve(t)&&"touchend"!==t)return Be&&Xe&&D?{passive:!0}:void 0}!function(){try{let t=Object.defineProperty({},"passive",{get(){Xe=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();let Ge=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const Ze=[],Ke={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},Qe={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function tn(t){let e=Array.prototype.slice.call(t.labels||[]);if(!e.length){e=[];let n=t.getRootNode();if(t.id){let r=n.querySelectorAll(`label[for = ${t.id}]`);for(let t=0;t<r.length;t++)e.push(r[t])}}return e}let en=function(t){let e=t.sourceCapabilities;var n;if((!e||e.firesTouchEvents)&&(t[je]={skip:!0},"click"===t.type)){let e=!1,r=ln(t);for(let t=0;t<r.length;t++){if(r[t].nodeType===Node.ELEMENT_NODE)if("label"===r[t].localName)Ze.push(r[t]);else if(n=r[t],Ke[n.localName]){let n=tn(r[t]);for(let t=0;t<n.length;t++)e=e||Ze.indexOf(n[t])>-1}if(r[t]===on.mouse.target)return}if(e)return;t.preventDefault(),t.stopPropagation()}};function nn(t){let e=Ge?["click"]:qe;for(let n,r=0;r<e.length;r++)n=e[r],t?(Ze.length=0,document.addEventListener(n,en,!0)):document.removeEventListener(n,en,!0)}function rn(t){let e=t.type;if(!Ve(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Ue&&(e=Je[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}let on={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function sn(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function an(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}document.addEventListener("touchend",(function(t){on.mouse.mouseIgnoreJob||nn(!0),on.mouse.target=ln(t)[0],on.mouse.mouseIgnoreJob=ke.debounce(on.mouse.mouseIgnoreJob,Lt.after(2500),(function(){nn(),on.mouse.target=null,on.mouse.mouseIgnoreJob=null}))}),!!Xe&&{passive:!0});const ln=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],dn={},cn=[];function hn(t){const e=ln(t);return e.length>0?e[0]:t.target}function un(t){let e,n=t.type,r=t.currentTarget.__polymerGestures;if(!r)return;let i=r[n];if(i){if(!t[je]&&(t[je]={},"touch"===n.slice(0,5))){let e=(t=t).changedTouches[0];if("touchstart"===n&&1===t.touches.length&&(on.touch.id=e.identifier),on.touch.id!==e.identifier)return;Be||"touchstart"!==n&&"touchmove"!==n||function(t){let e=t.changedTouches[0],n=t.type;if("touchstart"===n)on.touch.x=e.clientX,on.touch.y=e.clientY,on.touch.scrollDecided=!1;else if("touchmove"===n){if(on.touch.scrollDecided)return;on.touch.scrollDecided=!0;let n=function(t){let e="auto",n=ln(t);for(let t,r=0;r<n.length;r++)if(t=n[r],t[$e]){e=t[$e];break}return e}(t),r=!1,i=Math.abs(on.touch.x-e.clientX),o=Math.abs(on.touch.y-e.clientY);t.cancelable&&("none"===n?r=!0:"pan-x"===n?r=o>i:"pan-y"===n&&(r=i>o)),r?t.preventDefault():gn("track")}}(t)}if(e=t[je],!e.skip){for(let n,r=0;r<cn.length;r++)n=cn[r],i[n.name]&&!e[n.name]&&n.flow&&n.flow.start.indexOf(t.type)>-1&&n.reset&&n.reset();for(let r,o=0;o<cn.length;o++)r=cn[o],i[r.name]&&!e[r.name]&&(e[r.name]=!0,r[n](t))}}}function pn(t,e,n){return!!dn[e]&&(function(t,e,n){let r=dn[e],i=r.deps,o=r.name,s=t[Ye];s||(t[Ye]=s={});for(let e,n,r=0;r<i.length;r++)e=i[r],Ge&&Ve(e)&&"click"!==e||(n=s[e],n||(s[e]=n={_count:0}),0===n._count&&t.addEventListener(e,un,We(e)),n[o]=(n[o]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),r.touchAction&&mn(t,r.touchAction)}(t,e,n),!0)}function _n(t,e,n){return!!dn[e]&&(function(t,e,n){let r=dn[e],i=r.deps,o=r.name,s=t[Ye];if(s)for(let e,n,r=0;r<i.length;r++)e=i[r],n=s[e],n&&n[o]&&(n[o]=(n[o]||1)-1,n._count=(n._count||1)-1,0===n._count&&t.removeEventListener(e,un,We(e)));t.removeEventListener(e,n)}(t,e,n),!0)}function fn(t){cn.push(t);for(let e=0;e<t.emits.length;e++)dn[t.emits[e]]=t}function mn(t,e){Be&&t instanceof HTMLElement&&Dt.run((()=>{t.style.touchAction=e})),t[$e]=e}function yn(t,e,n){let r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=n,ct(t).dispatchEvent(r),r.defaultPrevented){let t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function gn(t){let e=function(t){for(let e,n=0;n<cn.length;n++){e=cn[n];for(let n,r=0;r<e.emits.length;r++)if(n=e.emits[r],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Pn(t,e,n,r){e&&yn(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function(t){return gn(t)}})}function wn(t,e,n){if(t.prevent)return!1;if(t.started)return!0;let r=Math.abs(t.x-e),i=Math.abs(t.y-n);return r>=5||i>=5}function bn(t,e,n){if(!e)return;let r,i=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1],s=o.x-t.x,a=o.y-t.y,l=0;i&&(r=o.x-i.x,l=o.y-i.y),yn(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:s,dy:a,ddx:r,ddy:l,sourceEvent:n,hover:function(){return function(t,e){let n=document.elementFromPoint(t,e),r=n;for(;r&&r.shadowRoot&&!window.ShadyDOM;){let i=r;if(r=r.shadowRoot.elementFromPoint(t,e),i===r)break;r&&(n=r)}return n}(n.clientX,n.clientY)}})}function Sn(t,e,n){let r=Math.abs(e.clientX-t.x),i=Math.abs(e.clientY-t.y),o=hn(n||e);!o||Qe[o.localName]&&o.hasAttribute("disabled")||(isNaN(r)||isNaN(i)||r<=25&&i<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;let e=hn(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;let n=e.getBoundingClientRect(),r=t.pageX,i=t.pageY;return!(r>=n.left&&r<=n.right&&i>=n.top&&i<=n.bottom)}return!1}(e))&&(t.prevent||yn(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}
222
- /**
223
- @license
224
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
225
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
226
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
227
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
228
- Code distributed by Google as part of the polymer project is also
229
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
230
- */fn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){an(this.info)},mousedown:function(t){if(!rn(t))return;let e=hn(t),n=this;sn(this.info,(function(t){rn(t)||(Pn("up",e,t),an(n.info))}),(function(t){rn(t)&&Pn("up",e,t),an(n.info)})),Pn("down",e,t)},touchstart:function(t){Pn("down",hn(t),t.changedTouches[0],t)},touchend:function(t){Pn("up",hn(t),t.changedTouches[0],t)}}),fn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,an(this.info)},mousedown:function(t){if(!rn(t))return;let e=hn(t),n=this,r=function(t){let r=t.clientX,i=t.clientY;wn(n.info,r,i)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&gn("tap"),n.info.addMove({x:r,y:i}),rn(t)||(n.info.state="end",an(n.info)),e&&bn(n.info,e,t),n.info.started=!0)};sn(this.info,r,(function(t){n.info.started&&r(t),an(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=hn(t),n=t.changedTouches[0],r=n.clientX,i=n.clientY;wn(this.info,r,i)&&("start"===this.info.state&&gn("tap"),this.info.addMove({x:r,y:i}),bn(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=hn(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),bn(this.info,e,n))}}),fn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){rn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){rn(t)&&Sn(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){Sn(this.info,t.changedTouches[0],t)}});const vn=dt((t=>class extends t{_addEventListenerToNode(t,e,n){pn(t,e,n)||super._addEventListenerToNode(t,e,n)}_removeEventListenerFromNode(t,e,n){_n(t,e,n)||super._removeEventListenerFromNode(t,e,n)}}));export{Ne as A,k as B,H as C,K as D,Re as E,I as F,vn as G,J as H,mt as I,ft as J,q as K,ut as L,p as M,Ct as N,De as P,h as V,ke as a,Mt as b,pn as c,P as d,ze as e,He as f,S as g,n as h,Rt as i,m as j,u as k,f as l,b as m,y as n,dt as o,Bt as p,Dt as q,Me as r,U as s,Lt as t,_ as u,Ie as v,ct as w,z as x,mn as y,Pt as z};
@@ -1 +0,0 @@
1
- import{L as e,_ as s,j as t,h as r}from"./shared-63eaded9.js";import"./shared-278a8b9d.js";import"./shared-9da4822a.js";import"./shared-bf6c685e.js";import{T as a}from"./shared-385ab830.js";import{c as i}from"./shared-4e709717.js";class c extends CustomEvent{constructor(e){super("change",{detail:e})}}let o,l,d=e=>e;class h extends(a(e)){constructor(){super(...arguments),this.readonly=!1,this.disabled=!1,this.checked=!1}static get properties(){return s(s({},super.properties),{},{readonly:{type:Boolean},disabled:{type:Boolean},checked:{type:Boolean}})}static get styles(){return[super.styles,t(o||(o=d`:host{--check-size:1.125rem}label{margin:calc(((1rem * var(--lumo-line-height-s)) - var(--check-size))/ -2) 0}label>:first-child{height:calc(1rem * var(--lumo-line-height-s))}.ml-xxl{margin-left:calc(var(--lumo-space-m) + var(--check-size))}.check{height:var(--check-size);width:var(--check-size)}`))]}render(){return r(l||(l=d` <label class="${0}"> <div class="flex items-center"> <div class="${0}"> <iron-icon icon="lumo:checkmark" class="${0}"> </iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ?disabled="${0}" data-testid="input" @change="${0}"> </div> </div> <div class="flex-1 font-lumo leading-s ml-m"> <slot></slot> </div> </label> <div class="${0}"> <slot name="content"></slot> </div> `),i({"flex items-start group transition-colors":!0,"cursor-default":this.disabled||this.readonly,"text-disabled":this.disabled,"text-secondary":this.readonly,"cursor-pointer":!this.disabled}),i({"flex-shrink-0 check transition-colors rounded-s border":!0,"focus-within-shadow-outline":!0,"bg-primary text-primary-contrast":!this.readonly&&this.checked,"border-dashed border-contrast-30":this.readonly,"border-transparent":!this.readonly,"opacity-50":this.disabled,"text-secondary bg-contrast-20":!this.readonly&&!this.checked,"group-hover-bg-contrast-30":!this.readonly&&!this.checked}),i({"block w-full h-full transition-transform transform":!0,"scale-100":this.checked,"scale-0":!this.checked}),this.checked,this.disabled,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation(),this.checked=!this.checked,this.dispatchEvent(new c(this.checked))}),i({"font-lumo ml-xxl transition-colors":!0,"text-disabled":this.disabled}))}}export{h as C,c as a};