@descope/web-components-ui 3.20.4 → 3.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/cjs/index.cjs.js +358 -25
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +358 -25
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1411.js +339 -0
  6. package/dist/umd/1411.js.map +1 -0
  7. package/dist/umd/189.js +171 -0
  8. package/dist/umd/189.js.map +1 -0
  9. package/dist/umd/2894.js +339 -0
  10. package/dist/umd/2894.js.map +1 -0
  11. package/dist/umd/3792.js +339 -0
  12. package/dist/umd/3792.js.map +1 -0
  13. package/dist/umd/{9117.js → 384.js} +121 -9
  14. package/dist/umd/{descope-tooltip.js.LICENSE.txt → 384.js.LICENSE.txt} +2 -2
  15. package/dist/umd/384.js.map +1 -0
  16. package/dist/umd/4268.js +339 -0
  17. package/dist/umd/4268.js.LICENSE.txt +11 -0
  18. package/dist/umd/4268.js.map +1 -0
  19. package/dist/umd/513.js +339 -0
  20. package/dist/umd/513.js.LICENSE.txt +11 -0
  21. package/dist/umd/513.js.map +1 -0
  22. package/dist/umd/6227.js +320 -0
  23. package/dist/umd/6227.js.map +1 -0
  24. package/dist/umd/6535.js +115 -0
  25. package/dist/umd/{9275.js.LICENSE.txt → 6535.js.LICENSE.txt} +0 -6
  26. package/dist/umd/6535.js.map +1 -0
  27. package/dist/umd/6649.js +339 -0
  28. package/dist/umd/6649.js.LICENSE.txt +11 -0
  29. package/dist/umd/6649.js.map +1 -0
  30. package/dist/umd/7125.js +339 -0
  31. package/dist/umd/7125.js.LICENSE.txt +11 -0
  32. package/dist/umd/7125.js.map +1 -0
  33. package/dist/umd/{5263.js → 8264.js} +5 -5
  34. package/dist/umd/8264.js.map +1 -0
  35. package/dist/umd/8983.js +7 -324
  36. package/dist/umd/8983.js.map +1 -1
  37. package/dist/umd/9030.js +339 -0
  38. package/dist/umd/9030.js.LICENSE.txt +11 -0
  39. package/dist/umd/9030.js.map +1 -0
  40. package/dist/umd/9380.js +130 -0
  41. package/dist/umd/9380.js.map +1 -0
  42. package/dist/umd/9506.js +339 -0
  43. package/dist/umd/9506.js.LICENSE.txt +11 -0
  44. package/dist/umd/9506.js.map +1 -0
  45. package/dist/umd/DescopeDev.js +1 -1
  46. package/dist/umd/DescopeDev.js.map +1 -1
  47. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  48. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
  49. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  50. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
  51. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -338
  52. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
  53. package/dist/umd/descope-apps-list.js +161 -1
  54. package/dist/umd/descope-apps-list.js.LICENSE.txt +17 -0
  55. package/dist/umd/descope-apps-list.js.map +1 -1
  56. package/dist/umd/descope-avatar.js +5 -20
  57. package/dist/umd/descope-avatar.js.LICENSE.txt +0 -12
  58. package/dist/umd/descope-avatar.js.map +1 -1
  59. package/dist/umd/descope-button.js +3 -3
  60. package/dist/umd/descope-button.js.LICENSE.txt +6 -0
  61. package/dist/umd/descope-button.js.map +1 -1
  62. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  63. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  64. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -321
  65. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt +0 -6
  66. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -1
  67. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +5 -322
  68. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -1
  69. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -321
  70. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +0 -6
  71. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -1
  72. package/dist/umd/descope-multi-line-mappings.js +1 -1
  73. package/dist/umd/descope-multi-line-mappings.js.map +1 -1
  74. package/dist/umd/descope-multi-sso.js +1 -338
  75. package/dist/umd/descope-multi-sso.js.map +1 -1
  76. package/dist/umd/descope-outbound-app-button.js +1 -338
  77. package/dist/umd/descope-outbound-app-button.js.map +1 -1
  78. package/dist/umd/descope-recovery-codes.js +1 -1
  79. package/dist/umd/descope-recovery-codes.js.map +1 -1
  80. package/dist/umd/descope-timer-button.js +1 -338
  81. package/dist/umd/descope-timer-button.js.map +1 -1
  82. package/dist/umd/descope-tooltip.js +1 -2
  83. package/dist/umd/descope-tooltip.js.map +1 -1
  84. package/dist/umd/descope-upload-file-index-js.js +1 -338
  85. package/dist/umd/descope-upload-file-index-js.js.map +1 -1
  86. package/dist/umd/descope-user-attribute-index-js.js +1 -338
  87. package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
  88. package/dist/umd/descope-user-auth-method-index-js.js +1 -338
  89. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
  90. package/dist/umd/descope-user-passkeys.js +1 -338
  91. package/dist/umd/descope-user-passkeys.js.map +1 -1
  92. package/dist/umd/index.js +1 -1
  93. package/dist/umd/index.js.map +1 -1
  94. package/package.json +42 -42
  95. package/dist/umd/1453.js +0 -177
  96. package/dist/umd/1453.js.LICENSE.txt +0 -29
  97. package/dist/umd/1453.js.map +0 -1
  98. package/dist/umd/5263.js.map +0 -1
  99. package/dist/umd/6063.js +0 -18
  100. package/dist/umd/6063.js.map +0 -1
  101. package/dist/umd/6818.js +0 -3
  102. package/dist/umd/6818.js.map +0 -1
  103. package/dist/umd/8248.js +0 -171
  104. package/dist/umd/8248.js.map +0 -1
  105. package/dist/umd/8968.js +0 -432
  106. package/dist/umd/8968.js.map +0 -1
  107. package/dist/umd/9117.js.map +0 -1
  108. package/dist/umd/9275.js +0 -18
  109. package/dist/umd/9275.js.map +0 -1
  110. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.LICENSE.txt +0 -5
  111. package/dist/umd/descope-multi-sso.js.LICENSE.txt +0 -5
  112. package/dist/umd/descope-outbound-app-button.js.LICENSE.txt +0 -5
  113. package/dist/umd/descope-timer-button.js.LICENSE.txt +0 -5
  114. package/dist/umd/descope-upload-file-index-js.js.LICENSE.txt +0 -5
  115. package/dist/umd/descope-user-attribute-index-js.js.LICENSE.txt +0 -5
  116. package/dist/umd/descope-user-passkeys.js.LICENSE.txt +0 -5
  117. /package/dist/umd/{8968.js.LICENSE.txt → 1411.js.LICENSE.txt} +0 -0
  118. /package/dist/umd/{6063.js.LICENSE.txt → 189.js.LICENSE.txt} +0 -0
  119. /package/dist/umd/{9117.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
  120. /package/dist/umd/{descope-user-auth-method-index-js.js.LICENSE.txt → 3792.js.LICENSE.txt} +0 -0
  121. /package/dist/umd/{6818.js.LICENSE.txt → 6227.js.LICENSE.txt} +0 -0
  122. /package/dist/umd/{5263.js.LICENSE.txt → 8264.js.LICENSE.txt} +0 -0
  123. /package/dist/umd/{8248.js.LICENSE.txt → 9380.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"descope-timer-button.js","mappings":";wIAAAA,EAAAC,QAAA,o/BCYO,MAAAC,GAAsB,EAAAC,EAAAC,IAAgB,WAsC7CC,KAAQA,EAAAC,MAAAA,EAAAC,YAAAA,GAA2B,CACnCF,KAAA,CAAUG,SAAA,aACVF,MAAA,CAAWE,SAAA,iBACXD,YAAA,CAAiBC,SAAA,gCAGjB,IAAAC,EAEO,MAAAC,GAAoB,EAAAC,EAAAC,KACzB,EAAAC,EAAAC,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,YAC5B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyQlB,EAAA6C,EAAAlB,IAAc,gBAAAtG,EAAA,CAA4BuG,SAAA","sources":["webpack://@descope/web-components-ui/../components/descope-timer/src/component/clock.svg","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/TimerButtonClass.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/TimerClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/index.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button-base.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/src/vaadin-button.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js"],"sourcesContent":["module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA=\"","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { TimerClass } from '@descope-ui/descope-timer/class';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\n\nexport const componentName = getComponentName('timer-button');\n\nconst buttonAttrs = [\n 'button-variant',\n 'button-mode',\n 'size',\n 'text-align',\n 'full-width',\n];\n\nconst mapButtonAttrs = {\n 'button-variant': 'variant',\n 'button-mode': 'mode',\n};\n\nconst timerAttrs = [\n 'timer-seconds',\n 'timer-hide-icon',\n 'timer-paused',\n 'size',\n 'text-align',\n 'full-width',\n];\n\nconst mapTimerAttrs = {\n 'timer-seconds': 'seconds',\n 'timer-hide-icon': 'hide-icon',\n 'timer-paused': 'paused',\n};\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > div',\n});\n\nclass RawTimerButton extends BaseClass {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-timer class=\"timer\"></descope-timer>\n <descope-button class=\"button\" disabled=\"true\">\n <slot></slot>\n </descope-button>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n }\n /* allow timer to grow along the main axis in the wrapper flex container */\n :host(:not([timer-inside=\"true\"])) .timer {\n flex: 1;\n }\n :host([timer-inside=\"true\"]) .timer {\n flex: 0 0 auto;\n }\n `,\n this,\n );\n\n this.wrapper = this.shadowRoot.querySelector('.wrapper');\n this.timer = this.shadowRoot.querySelector('.timer');\n this.button = this.shadowRoot.querySelector('.button');\n this.forwardingSlot = this.shadowRoot.querySelector('.button slot');\n\n this.timer.addEventListener('timer-started', () => this.onTimerStarted());\n this.timer.addEventListener('timer-ended', () => this.onTimerEnded());\n\n this.syncTimerPlacement();\n\n this.button.addEventListener('click', this.onClick.bind(this));\n }\n\n static get observedAttributes() {\n return [\n ...(super.observedAttributes || []),\n 'timer-inside',\n 'timer-position',\n ];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n if (name === 'timer-inside' || name === 'timer-position') {\n this.syncTimerPlacement();\n }\n }\n\n get #isTimerInside() {\n return this.getAttribute('timer-inside') === 'true';\n }\n\n get #isReversed() {\n return this.getAttribute('timer-position') === 'end';\n }\n\n syncTimerPlacement() {\n if (this.#isTimerInside) {\n this.#placeTimerInsideButton(this.#isReversed);\n } else {\n this.#placeTimerOutsideButton();\n }\n }\n\n #placeTimerInsideButton(reversed) {\n if (reversed) {\n // timer after label text (right)\n if (this.timer.previousSibling !== this.forwardingSlot) {\n this.button.appendChild(this.timer);\n }\n } else {\n // timer before label text (left) — matches default outside position (above/before button)\n if (this.timer.nextSibling !== this.forwardingSlot) {\n this.button.insertBefore(this.timer, this.forwardingSlot);\n }\n }\n }\n\n #placeTimerOutsideButton() {\n // move timer back as a wrapper sibling, before the button so flex-column puts it above\n if (this.timer.parentElement !== this.wrapper) {\n this.wrapper.insertBefore(this.timer, this.button);\n }\n }\n\n set onclick(val) {\n this.button.onclick = val;\n }\n\n init() {\n super.init?.();\n\n forwardAttrs(this, this.button, {\n includeAttrs: buttonAttrs,\n mapAttrs: mapButtonAttrs,\n });\n\n forwardAttrs(this, this.timer, {\n includeAttrs: timerAttrs,\n mapAttrs: mapTimerAttrs,\n });\n\n // When we sync attributes, the `disabled` attribute is being compared to the attribute\n // on Vaadin component; since the Vaadin component has no `disabled` attribute, we sync\n // that back to our component.\n // This is pending a more generic fix in the way we sync attibutes.\n this.button.shadowRoot\n .querySelector('vaadin-button')\n .setAttribute('disabled', 'true');\n }\n\n onTimerStarted() {\n this.toggleButtonDisable(true);\n }\n\n onTimerEnded() {\n this.toggleButtonDisable(false);\n }\n\n onClick() {\n this.timer.reset();\n }\n\n toggleButtonDisable(isDisabled) {\n setTimeout(() => {\n isDisabled\n ? this.button.setAttribute('disabled', 'true')\n : this.button.removeAttribute('disabled');\n });\n }\n}\n\nconst {\n host,\n nestedTimer,\n nestedButton,\n timerInsideNotReversed,\n timerInsideReversed,\n} = {\n host: { selector: () => ':host' },\n nestedTimer: { selector: () => ':host([timer-inside=\"true\"]) .timer' },\n nestedButton: {\n selector: () => ':host([timer-inside=\"true\"]) .button',\n },\n timerInsideNotReversed: {\n selector: () =>\n ':host([timer-inside=\"true\"]:not([timer-position=\"end\"])) .timer',\n },\n timerInsideReversed: {\n selector: () => ':host([timer-inside=\"true\"][timer-position=\"end\"]) .timer',\n },\n};\n\nexport const TimerButtonClass = compose(\n createStyleMixin({\n mappings: {\n gap: {},\n flexDirection: {},\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n timerTextColor: {\n ...nestedTimer,\n property: TimerClass.cssVarList.textColor,\n },\n timerIconColor: {\n ...nestedTimer,\n property: TimerClass.cssVarList.iconColor,\n },\n timerHostWidth: {\n ...nestedTimer,\n property: TimerClass.cssVarList.hostWidth,\n },\n buttonLabelSpacing: {\n ...nestedButton,\n property: ButtonClass.cssVarList.labelSpacing,\n },\n timerInsideGapEnd: {\n ...timerInsideNotReversed,\n property: 'margin-inline-end',\n },\n timerInsideGapStart: {\n ...timerInsideReversed,\n property: 'margin-inline-start',\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimerButton);\n","import { componentName, TimerButtonClass } from './TimerButtonClass';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-timer';\n\ncustomElements.define(componentName, TimerButtonClass);\n\nexport { TimerButtonClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport clockIcon from './clock.svg';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { formatTime } from './helpers';\n\nexport const componentName = getComponentName('timer');\n\nconst observedAttributes = ['seconds', 'hide-icon', 'paused'];\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n});\n\nconst DEFAULT_INTERVAL = 1000;\n\nclass RawTimer extends BaseClass {\n #timeRemains = 0;\n\n #intervalId;\n\n static get observedAttributes() {\n return observedAttributes.concat(BaseClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-icon src=\"${clockIcon}\" class=\"icon\"></descope-icon>\n <div class=\"timer\"></div>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n user-select: none;\n -webkit-user-select: none;\n }\n .wrapper {\n display: flex;\n align-items: center;\n flex-direction: row;\n width: 100%;\n }\n .hidden {\n display: none;\n }\n `,\n this,\n );\n\n this.icon = this.shadowRoot.querySelector('.icon');\n this.timer = this.shadowRoot.querySelector('.timer');\n }\n\n get seconds() {\n const val = this.getAttribute('seconds');\n const secs = parseInt(val || 0, 10) * 1000;\n return Math.max(0, secs);\n }\n\n // we use `pause` attribute for allowing preview mode by executing `pause`\n get isPaused() {\n return this.getAttribute('paused') === 'true';\n }\n\n init() {\n super.init?.();\n\n this.#timeRemains = this.seconds;\n }\n\n startInterval() {\n const intervalCycle = () => {\n this.#decreaseInterval();\n if (!this.#timeRemains) this.stop();\n this.#updateDisplay(this.#timeRemains);\n };\n\n if (this.#timeRemains) {\n this.#intervalId = setInterval(intervalCycle, DEFAULT_INTERVAL);\n } else {\n this.stop();\n }\n }\n\n stopInterval() {\n clearInterval(this.#intervalId);\n }\n\n #decreaseInterval() {\n this.#timeRemains = this.#timeRemains - DEFAULT_INTERVAL;\n }\n\n reset() {\n this.#timeRemains = this.seconds;\n this.#updateDisplay(this.#timeRemains);\n\n if (this.isPaused) return;\n\n this.dispatchEvent(new CustomEvent('timer-started', { bubbles: true }));\n this.startInterval();\n }\n\n stop() {\n this.stopInterval();\n this.#timeRemains = 0;\n this.#updateDisplay(this.#timeRemains);\n this.dispatchEvent(new CustomEvent('timer-ended', { bubbles: true }));\n }\n\n pause() {\n this.setAttribute('paused', 'true');\n this.stopInterval();\n }\n\n resume() {\n this.removeAttribute('paused');\n this.startInterval();\n }\n\n #updateDisplay(val) {\n this.timer.textContent = formatTime(val);\n }\n\n #toggleIcon(val) {\n this.icon.classList.toggle('hidden', val);\n }\n\n #handlePause(paused) {\n setTimeout(() => {\n if (paused) {\n this.pause();\n } else {\n // we want to prevent a another interval from starting in case previous interval was not yet cleared\n if (!this.#intervalId) {\n this.resume();\n }\n }\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'seconds') {\n this.reset();\n }\n if (attrName === 'hide-icon') {\n this.#toggleIcon(newValue === 'true');\n }\n if (attrName === 'paused') {\n this.#handlePause(newValue === 'true');\n }\n }\n }\n}\n\nconst { host, icon, timer } = {\n host: { selector: () => ':host' },\n icon: { selector: () => '.icon' },\n timer: { selector: () => '.timer' },\n};\n\nexport const TimerClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: {},\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n fontFamily: {},\n minHeight: {},\n fontWeight: { ...timer },\n lineHeight: { ...timer },\n textColor: { ...timer, property: 'color' },\n gap: {},\n textAlign: { property: 'justify-content' },\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n iconColor: { ...icon, property: IconClass.cssVarList.fill },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimer);\n","const fmt = (val, pad = 2) => String(val).padStart(pad, '0');\n\nexport const formatTime = (ms = 0) => {\n const totalSeconds = Math.floor(ms / 1000);\n\n const secondsInMinute = 60;\n const secondsInHour = secondsInMinute * 60;\n\n const hours = Math.floor(totalSeconds / secondsInHour);\n const minutes = Math.floor((totalSeconds % secondsInHour) / secondsInMinute);\n const seconds = totalSeconds % secondsInMinute;\n\n const timeParts = [...(hours ? [fmt(hours)] : []), fmt(minutes), fmt(seconds)];\n\n return timeParts.join(':');\n};\n","import { componentName, TimerClass } from './TimerClass';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, TimerClass);\n\nexport { TimerClass, componentName };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));\n height: var(--_button-size);\n padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));\n margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));\n font-weight: var(--vaadin-button-font-weight, 500);\n color: var(--_lumo-button-text-color);\n background: var(--_lumo-button-background);\n border: var(--vaadin-button-border, none);\n border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n --_button-size: var(--vaadin-button-height, var(--lumo-button-size));\n --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));\n --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);\n /* Used by notification */\n --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));\n --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));\n --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));\n --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n --_background: transparent !important;\n background: var(--vaadin-button-tertiary-background, var(--_background));\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n border: var(--vaadin-button-tertiary-border, none);\n color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));\n font-weight: var(--vaadin-button-tertiary-font-weight, 500);\n padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background: var(--_lumo-button-primary-background);\n border: var(--vaadin-button-primary-border, none);\n color: var(--_lumo-button-primary-text-color);\n font-weight: var(--vaadin-button-primary-font-weight, 600);\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n"],"names":["module","exports","componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","componentsHelpers","buttonAttrs","mapButtonAttrs","timerAttrs","mapTimerAttrs","BaseClass","baseClasses","nestedTimer","nestedButton","timerInsideNotReversed","timerInsideReversed","TimerButtonClass","utils","componentsMixins","gap","flexDirection","timerTextColor","TimerClass","textColor","timerIconColor","timerHostWidth","buttonLabelSpacing","timerInsideGapEnd","timerInsideGapStart","wrapper","shadowRoot","timer","button","forwardingSlot","addEventListener","onTimerStarted","onTimerEnded","syncTimerPlacement","onClick","bind","name","isTimerInside","isReversed","placeTimerInsideButton","placeTimerOutsideButton","reversed","previousSibling","nextSibling","insertBefore","parentElement","onclick","val","EA","includeAttrs","mapAttrs","toggleButtonDisable","reset","isDisabled","setTimeout","removeAttribute","icon","minHeight","lineHeight","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_5__","timeRemains","intervalId","concat","_clock_svg__WEBPACK_IMPORTED_MODULE_4___default","seconds","secs","parseInt","Math","max","isPaused","startInterval","setInterval","decreaseInterval","stop","updateDisplay","stopInterval","clearInterval","dispatchEvent","CustomEvent","bubbles","pause","resume","textContent","_helpers__WEBPACK_IMPORTED_MODULE_6__","f","toggleIcon","toggle","handlePause","paused","fmt","pad","String","padStart","formatTime","ms","totalSeconds","floor","hours","secondsInMinute","minutes","join","_TimerClass__WEBPACK_IMPORTED_MODULE_0__","buttonStyles","AH","ButtonMixin","superClass","active_mixin","e","tabindex_mixin","l","focus_mixin","y","properties","tabindex","type","Number","reflectToAttribute","_activeKeys","ready","hasAttribute","_onKeyDown","event","altKey","shiftKey","ctrlKey","metaKey","includes","key","preventDefault","vaadin_themable_mixin","SF","moduleId","Button","element_mixin","cp","controller_mixin","w","polymer_element","Pu","is","template","qy","_tooltipController","tooltip_controller","I","addController","src_define","X","_vaadin_vaadin_themable_mixin_vaadin_themable_mixin_js__WEBPACK_IMPORTED_MODULE_5__"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-timer-button.js","mappings":"mIAAAA,EAAAC,QAAA,o/BCYO,MAAAC,GAAsB,EAAAC,EAAAC,IAAgB,WAsC7CC,KAAQA,EAAAC,MAAAA,EAAAC,YAAAA,GAA2B,CACnCF,KAAA,CAAUG,SAAA,aACVF,MAAA,CAAWE,SAAA,iBACXD,YAAA,CAAiBC,SAAA,gCAGjB,IAAAC,EAEO,MAAAC,GAAoB,EAAAC,EAAAC,KACzB,EAAAC,EAAAC,IAAY,CAAGC,SAAA,EAAaC,KAAA,aAAAC,MAAA,YAC5B,EAAAJ,EAAAK,IAAgB,CAClBC,SAAA,CACAC,UAAA,CAAmBC,SAAA,SACnBC,aAAA,IAAsBjB,EAAAgB,SAAA,aACtBE,WAAA,CAAoBF,SAAA,UACpBG,cAAA,IAAuBnB,EA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ACA,CAEA,IAAAG,GACAtK,KAAAwK,eACAxK,MAAAyJ,EAAA,EACAzJ,MAAAuK,EAAAvK,MAAAyJ,GACAzJ,KAAA0K,cAAA,IAAAC,YAAA,eAAwDC,SAAA,IACxD,CAEA,KAAAC,GACA7K,KAAA+C,aAAA,iBACA/C,KAAAwK,cACA,CAEA,MAAAM,GACA9K,KAAAoJ,gBAAA,UACApJ,KAAAmK,eACA,CAEA,EAAAI,CAAA3B,GACA5I,KAAAwH,MAAAuD,aAA6B,EAAAC,EAAAC,GAAUrC,EACvC,CAEA,EAAAsC,CAAAtC,GACA5I,KAAAqJ,KAAAlH,UAAAgJ,OAAA,SAAAvC,EACA,CAEA,EAAAwC,CAAAC,GACAlC,WAAA,KACAkC,EACArL,KAAA6K,QAGA7K,MAAA0J,GACA1J,KAAA8K,UAIA,CAEA,wBAAArH,CAAAC,EAAAC,EAAAC,GACAzD,MAAAsD,2BAAAC,EAAAC,EAAAC,GAEAA,IAAAD,IACA,YAAAD,GACA1D,KAAAiJ,QAEA,cAAAvF,GACA1D,MAAAkL,EAAA,SAAAtH,GAEA,WAAAF,GACA1D,MAAAoL,EAAA,SAAAxH,GAGA,gDC1KA,MAAA0H,EAAA,CAAA1C,EAAA2C,EAAA,IAAAC,OAAA5C,GAAA6C,SAAAF,EAAA,KAEOG,EAAA,CAAAC,EAAA,KACP,MAAAC,EAAA5B,KAAA6B,MAAAF,EAAA,KAKAG,EAAA9B,KAAA6B,MAAAD,EAFAG,MAGAC,EAAAhC,KAAA6B,MAAAD,EAHAG,KADA,IAKAlC,EAAA+B,EALA,GASA,MAFA,IAAAE,EAAA,CAAAR,EAAAQ,IAAA,GAAAR,EAAAU,GAAAV,EAAAzB,IAEAoC,KAAA,kHCXA7L,eAAAC,OAAsB6L,EAAA3L,EAAe2L,EAAAhI","sources":["webpack://@descope/web-components-ui/../components/descope-timer/src/component/clock.svg","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/TimerButtonClass.js","webpack://@descope/web-components-ui/../components/descope-timer-button/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/TimerClass.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-timer/src/component/index.js"],"sourcesContent":["module.exports = \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMWVtIiBoZWlnaHQ9IjFlbSIgdmlld0JveD0iMCAwIDEwNCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxwYXRoIGQ9Ik01MC4zMzM0IDAuMzMzMjUyQzIyLjgzMzQgMC4zMzMyNTIgMC4zMzMzNzQgMjIuODMzMyAwLjMzMzM3NCA1MC4zMzMzQzAuMzMzMzc0IDc3LjgzMzMgMjIuODMzNCAxMDAuMzMzIDUwLjMzMzQgMTAwLjMzM0M3Ny44MzM0IDEwMC4zMzMgMTAwLjMzMyA3Ny44MzMzIDEwMC4zMzMgNTAuMzMzM0MxMDAuMzMzIDIyLjgzMzMgNzcuODMzNCAwLjMzMzI1MiA1MC4zMzM0IDAuMzMzMjUyWk01MC4zMzM0IDg3LjgzMzNDMjkuNzA4NCA4Ny44MzMzIDEyLjgzMzQgNzAuOTU4MyAxMi44MzM0IDUwLjMzMzNDMTIuODMzNCAyOS43MDgzIDI5LjcwODQgMTIuODMzMyA1MC4zMzM0IDEyLjgzMzNDNzAuOTU4NCAxMi44MzMzIDg3LjgzMzQgMjkuNzA4MyA4Ny44MzM0IDUwLjMzMzNDODcuODMzNCA3MC45NTgzIDcwLjk1ODQgODcuODMzMyA1MC4zMzM0IDg3LjgzMzNaIiBmaWxsPSIjMTgxQTFDIi8+IDxwYXRoIGQ9Ik01MC4zMzI4IDE5LjA4MzNINDQuMDgyOFY1Ni41ODMySDc1LjMzMjhWNTAuMzMzMkg1MC4zMzI4VjE5LjA4MzNaIiBmaWxsPSIjMTgxQTFDIi8+IDwvc3ZnPiA=\"","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n stretchMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n stretchMixin({ triggers: [{ attr: 'full-width', value: 'true' }] }),\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostMaxWidth: { ...host, property: 'max-width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n max-height: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style', 'st-height', 'st-width'],\n componentName,\n }),\n);\n","import '@descope-ui/descope-image';\n\nimport { componentName, IconClass } from './IconClass';\n\ncustomElements.define(componentName, IconClass);\n\nexport { IconClass, componentName };\n"," \nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.getSrc);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get getSrc() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n \n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.getSrc);\n\n createImage(this.getSrc, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.getSrc === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { componentName, ImageClass } from './ImageClass';\n\ncustomElements.define(componentName, ImageClass);\n\nexport { ImageClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport { TimerClass } from '@descope-ui/descope-timer/class';\nimport { ButtonClass } from '@descope-ui/descope-button/class';\n\nexport const componentName = getComponentName('timer-button');\n\nconst buttonAttrs = [\n 'button-variant',\n 'button-mode',\n 'size',\n 'text-align',\n 'full-width',\n];\n\nconst mapButtonAttrs = {\n 'button-variant': 'variant',\n 'button-mode': 'mode',\n};\n\nconst timerAttrs = [\n 'timer-seconds',\n 'timer-hide-icon',\n 'timer-paused',\n 'size',\n 'text-align',\n 'full-width',\n];\n\nconst mapTimerAttrs = {\n 'timer-seconds': 'seconds',\n 'timer-hide-icon': 'hide-icon',\n 'timer-paused': 'paused',\n};\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > div',\n});\n\nclass RawTimerButton extends BaseClass {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-timer class=\"timer\"></descope-timer>\n <descope-button class=\"button\" disabled=\"true\">\n <slot></slot>\n </descope-button>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n .wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n }\n /* allow timer to grow along the main axis in the wrapper flex container */\n :host(:not([timer-inside=\"true\"])) .timer {\n flex: 1;\n }\n :host([timer-inside=\"true\"]) .timer {\n flex: 0 0 auto;\n }\n `,\n this,\n );\n\n this.wrapper = this.shadowRoot.querySelector('.wrapper');\n this.timer = this.shadowRoot.querySelector('.timer');\n this.button = this.shadowRoot.querySelector('.button');\n this.forwardingSlot = this.shadowRoot.querySelector('.button slot');\n\n this.timer.addEventListener('timer-started', () => this.onTimerStarted());\n this.timer.addEventListener('timer-ended', () => this.onTimerEnded());\n\n this.syncTimerPlacement();\n\n this.button.addEventListener('click', this.onClick.bind(this));\n }\n\n static get observedAttributes() {\n return [\n ...(super.observedAttributes || []),\n 'timer-inside',\n 'timer-position',\n ];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n if (name === 'timer-inside' || name === 'timer-position') {\n this.syncTimerPlacement();\n }\n }\n\n get #isTimerInside() {\n return this.getAttribute('timer-inside') === 'true';\n }\n\n get #isReversed() {\n return this.getAttribute('timer-position') === 'end';\n }\n\n syncTimerPlacement() {\n if (this.#isTimerInside) {\n this.#placeTimerInsideButton(this.#isReversed);\n } else {\n this.#placeTimerOutsideButton();\n }\n }\n\n #placeTimerInsideButton(reversed) {\n if (reversed) {\n // timer after label text (right)\n if (this.timer.previousSibling !== this.forwardingSlot) {\n this.button.appendChild(this.timer);\n }\n } else {\n // timer before label text (left) — matches default outside position (above/before button)\n if (this.timer.nextSibling !== this.forwardingSlot) {\n this.button.insertBefore(this.timer, this.forwardingSlot);\n }\n }\n }\n\n #placeTimerOutsideButton() {\n // move timer back as a wrapper sibling, before the button so flex-column puts it above\n if (this.timer.parentElement !== this.wrapper) {\n this.wrapper.insertBefore(this.timer, this.button);\n }\n }\n\n set onclick(val) {\n this.button.onclick = val;\n }\n\n init() {\n super.init?.();\n\n forwardAttrs(this, this.button, {\n includeAttrs: buttonAttrs,\n mapAttrs: mapButtonAttrs,\n });\n\n forwardAttrs(this, this.timer, {\n includeAttrs: timerAttrs,\n mapAttrs: mapTimerAttrs,\n });\n\n // When we sync attributes, the `disabled` attribute is being compared to the attribute\n // on Vaadin component; since the Vaadin component has no `disabled` attribute, we sync\n // that back to our component.\n // This is pending a more generic fix in the way we sync attibutes.\n this.button.shadowRoot\n .querySelector('vaadin-button')\n .setAttribute('disabled', 'true');\n }\n\n onTimerStarted() {\n this.toggleButtonDisable(true);\n }\n\n onTimerEnded() {\n this.toggleButtonDisable(false);\n }\n\n onClick() {\n this.timer.reset();\n }\n\n toggleButtonDisable(isDisabled) {\n setTimeout(() => {\n isDisabled\n ? this.button.setAttribute('disabled', 'true')\n : this.button.removeAttribute('disabled');\n });\n }\n}\n\nconst {\n host,\n nestedTimer,\n nestedButton,\n timerInsideNotReversed,\n timerInsideReversed,\n} = {\n host: { selector: () => ':host' },\n nestedTimer: { selector: () => ':host([timer-inside=\"true\"]) .timer' },\n nestedButton: {\n selector: () => ':host([timer-inside=\"true\"]) .button',\n },\n timerInsideNotReversed: {\n selector: () =>\n ':host([timer-inside=\"true\"]:not([timer-position=\"end\"])) .timer',\n },\n timerInsideReversed: {\n selector: () => ':host([timer-inside=\"true\"][timer-position=\"end\"]) .timer',\n },\n};\n\nexport const TimerButtonClass = compose(\n createStyleMixin({\n mappings: {\n gap: {},\n flexDirection: {},\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n timerTextColor: {\n ...nestedTimer,\n property: TimerClass.cssVarList.textColor,\n },\n timerIconColor: {\n ...nestedTimer,\n property: TimerClass.cssVarList.iconColor,\n },\n timerHostWidth: {\n ...nestedTimer,\n property: TimerClass.cssVarList.hostWidth,\n },\n buttonLabelSpacing: {\n ...nestedButton,\n property: ButtonClass.cssVarList.labelSpacing,\n },\n timerInsideGapEnd: {\n ...timerInsideNotReversed,\n property: 'margin-inline-end',\n },\n timerInsideGapStart: {\n ...timerInsideReversed,\n property: 'margin-inline-start',\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimerButton);\n","import { componentName, TimerButtonClass } from './TimerButtonClass';\nimport '@descope-ui/descope-button';\nimport '@descope-ui/descope-timer';\n\ncustomElements.define(componentName, TimerButtonClass);\n\nexport { TimerButtonClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n} from '@descope-ui/common/components-helpers';\nimport clockIcon from './clock.svg';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { formatTime } from './helpers';\n\nexport const componentName = getComponentName('timer');\n\nconst observedAttributes = ['seconds', 'hide-icon', 'paused'];\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: ':host > .wrapper',\n});\n\nconst DEFAULT_INTERVAL = 1000;\n\nclass RawTimer extends BaseClass {\n #timeRemains = 0;\n\n #intervalId;\n\n static get observedAttributes() {\n return observedAttributes.concat(BaseClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-icon src=\"${clockIcon}\" class=\"icon\"></descope-icon>\n <div class=\"timer\"></div>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n user-select: none;\n -webkit-user-select: none;\n }\n .wrapper {\n display: flex;\n align-items: center;\n flex-direction: row;\n width: 100%;\n }\n .hidden {\n display: none;\n }\n `,\n this,\n );\n\n this.icon = this.shadowRoot.querySelector('.icon');\n this.timer = this.shadowRoot.querySelector('.timer');\n }\n\n get seconds() {\n const val = this.getAttribute('seconds');\n const secs = parseInt(val || 0, 10) * 1000;\n return Math.max(0, secs);\n }\n\n // we use `pause` attribute for allowing preview mode by executing `pause`\n get isPaused() {\n return this.getAttribute('paused') === 'true';\n }\n\n init() {\n super.init?.();\n\n this.#timeRemains = this.seconds;\n }\n\n startInterval() {\n const intervalCycle = () => {\n this.#decreaseInterval();\n if (!this.#timeRemains) this.stop();\n this.#updateDisplay(this.#timeRemains);\n };\n\n if (this.#timeRemains) {\n this.#intervalId = setInterval(intervalCycle, DEFAULT_INTERVAL);\n } else {\n this.stop();\n }\n }\n\n stopInterval() {\n clearInterval(this.#intervalId);\n }\n\n #decreaseInterval() {\n this.#timeRemains = this.#timeRemains - DEFAULT_INTERVAL;\n }\n\n reset() {\n this.#timeRemains = this.seconds;\n this.#updateDisplay(this.#timeRemains);\n\n if (this.isPaused) return;\n\n this.dispatchEvent(new CustomEvent('timer-started', { bubbles: true }));\n this.startInterval();\n }\n\n stop() {\n this.stopInterval();\n this.#timeRemains = 0;\n this.#updateDisplay(this.#timeRemains);\n this.dispatchEvent(new CustomEvent('timer-ended', { bubbles: true }));\n }\n\n pause() {\n this.setAttribute('paused', 'true');\n this.stopInterval();\n }\n\n resume() {\n this.removeAttribute('paused');\n this.startInterval();\n }\n\n #updateDisplay(val) {\n this.timer.textContent = formatTime(val);\n }\n\n #toggleIcon(val) {\n this.icon.classList.toggle('hidden', val);\n }\n\n #handlePause(paused) {\n setTimeout(() => {\n if (paused) {\n this.pause();\n } else {\n // we want to prevent a another interval from starting in case previous interval was not yet cleared\n if (!this.#intervalId) {\n this.resume();\n }\n }\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'seconds') {\n this.reset();\n }\n if (attrName === 'hide-icon') {\n this.#toggleIcon(newValue === 'true');\n }\n if (attrName === 'paused') {\n this.#handlePause(newValue === 'true');\n }\n }\n }\n}\n\nconst { host, icon, timer } = {\n host: { selector: () => ':host' },\n icon: { selector: () => '.icon' },\n timer: { selector: () => '.timer' },\n};\n\nexport const TimerClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: {},\n iconSize: [\n { ...icon, property: 'width' },\n { ...icon, property: 'height' },\n ],\n fontFamily: {},\n minHeight: {},\n fontWeight: { ...timer },\n lineHeight: { ...timer },\n textColor: { ...timer, property: 'color' },\n gap: {},\n textAlign: { property: 'justify-content' },\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n iconColor: { ...icon, property: IconClass.cssVarList.fill },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawTimer);\n","const fmt = (val, pad = 2) => String(val).padStart(pad, '0');\n\nexport const formatTime = (ms = 0) => {\n const totalSeconds = Math.floor(ms / 1000);\n\n const secondsInMinute = 60;\n const secondsInHour = secondsInMinute * 60;\n\n const hours = Math.floor(totalSeconds / secondsInHour);\n const minutes = Math.floor((totalSeconds % secondsInHour) / secondsInMinute);\n const seconds = totalSeconds % secondsInMinute;\n\n const timeParts = [...(hours ? [fmt(hours)] : []), fmt(minutes), fmt(seconds)];\n\n return timeParts.join(':');\n};\n","import { componentName, TimerClass } from './TimerClass';\nimport '@descope-ui/descope-icon';\n\ncustomElements.define(componentName, TimerClass);\n\nexport { TimerClass, componentName };\n"],"names":["module","exports","componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_1__","xE","host","label","slottedIcon","selector","loadingIndicatorStyles","ButtonClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_0__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_2__","DM","triggers","attr","value","RF","mappings","hostWidth","property","hostMaxWidth","hostHeight","hostDirection","fontSize","fontFamily","fontWeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_3__","S","cssVarList","fill","labelTextDecoration","labelSpacing","textAlign","iconSize","_clickableMixin__WEBPACK_IMPORTED_MODULE_4__","G","VO","tQ","tz","slots","wrappedEleName","style","excludeAttrsSync","color","clickableMixin","superclass","isLoading","this","getAttribute","click","super","customElements","define","_ButtonClass__WEBPACK_IMPORTED_MODULE_0__","T","J","IconClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_3__","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","_descope_ui_descope_image_class__WEBPACK_IMPORTED_MODULE_2__","q","height","width","_IconClass__WEBPACK_IMPORTED_MODULE_1__","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","srcAttrs","RawImage","_descope_ui_common_base_classes__WEBPACK_IMPORTED_MODULE_1__","qu","baseSelector","observedAttributes","constructor","attachShadow","mode","innerHTML","fz","init","toggleVisibility","getSrc","onThemeChange","renderImage","isVisible","classList","remove","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","ImageClass","_helpers__WEBPACK_IMPORTED_MODULE_4__","m","then","res","appendChild","shouldRender","src","srcVal","attributeChangedCallback","attrName","oldValue","newValue","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_2__","createSvgEle","text","clean","dompurify__WEBPACK_IMPORTED_MODULE_0__","A","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","querySelector","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","_ImageClass__WEBPACK_IMPORTED_MODULE_0__","componentsHelpers","buttonAttrs","mapButtonAttrs","timerAttrs","mapTimerAttrs","BaseClass","baseClasses","nestedTimer","nestedButton","timerInsideNotReversed","timerInsideReversed","TimerButtonClass","utils","componentsMixins","gap","flexDirection","timerTextColor","TimerClass","textColor","timerIconColor","timerHostWidth","buttonLabelSpacing","timerInsideGapEnd","timerInsideGapStart","wrapper","shadowRoot","timer","button","forwardingSlot","addEventListener","onTimerStarted","onTimerEnded","syncTimerPlacement","onClick","bind","name","isTimerInside","isReversed","placeTimerInsideButton","placeTimerOutsideButton","reversed","previousSibling","nextSibling","insertBefore","parentElement","onclick","val","EA","includeAttrs","mapAttrs","toggleButtonDisable","reset","isDisabled","setTimeout","removeAttribute","icon","minHeight","lineHeight","_descope_ui_descope_icon_class__WEBPACK_IMPORTED_MODULE_5__","timeRemains","intervalId","concat","_clock_svg__WEBPACK_IMPORTED_MODULE_4___default","seconds","secs","parseInt","Math","max","isPaused","startInterval","setInterval","decreaseInterval","stop","updateDisplay","stopInterval","clearInterval","dispatchEvent","CustomEvent","bubbles","pause","resume","textContent","_helpers__WEBPACK_IMPORTED_MODULE_6__","f","toggleIcon","toggle","handlePause","paused","fmt","pad","String","padStart","formatTime","ms","totalSeconds","floor","hours","secondsInMinute","minutes","join","_TimerClass__WEBPACK_IMPORTED_MODULE_0__"],"sourceRoot":""}
@@ -1,3 +1,2 @@
1
- /*! For license information please see descope-tooltip.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[628,2294,3267,4159,9261],{13094(t,e,o){o.r(e),o.d(e,{AnchoredClass:()=>a,componentName:()=>h});var n=o(88961),s=o(72270),i=o(25964),r=o(63200);const h=(0,i.xE)("anchored");class l extends((0,s.qu)({componentName:h,baseSelector:".anchored-root"})){#t=null;#e=null;#o=null;#n=null;get#s(){return this.defaultSlot.assignedElements({flatten:!0})[0]}get#i(){return this.shadowRoot.querySelector('slot[name="anchored"]')?.assignedElements()[0]}get#r(){return this.getRootNode().host}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="anchored-root" part="root">\n <slot></slot>\n <div class="anchored-host" part="anchored">\n <slot name="anchored"></slot>\n </div>\n </div>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])")}init(){super.init?.(),(0,i.fz)("\n :host {\n display: inline-flex;\n position: relative;\n box-sizing: border-box;\n }\n\n :host(:not([has-anchor])) {\n display: none;\n }\n\n .anchored-root {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n }\n\n /* Make anchor fill the flex row and allow it to shrink. */\n ::slotted(*:not([slot])) {\n flex-grow: 1; /* fill the flex row */\n flex-shrink: 1; /* compress when constrained */\n flex-basis: auto; /* start from the anchor's natural size */\n min-width: 0; /* flex items won't shrink below content size without this */\n }\n\n /* Anchored container covers the anchor but is invisible to pointer events. */\n .anchored-host {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n /* Restore interactivity for actual anchored content. */\n ::slotted([slot=\"anchored\"]) {\n pointer-events: auto;\n }\n ",this),this.#h(),this.defaultSlot.addEventListener("slotchange",()=>this.#l()),this.#l()}#a(){const t=this.#s?.classList?.contains("hidden");this.classList.toggle("hidden",t)}#l(){this.#d(),this.#t=this.#c(this.#t,this.#r,"stretch"),this.#e=this.#c(this.#e,this.#i,"st-host-direction"),this.#p()}#p(){this.#n?.disconnect(),this.#s&&(this.#n=(0,i.mx)(this.#s,()=>this.#a(),{includeAttrs:["class"]}))}connectedCallback(){super.connectedCallback?.(),this.#p(),this.#a()}#h(){const t="\n descope-anchored {\n width: 100%; /* fill the outer host so the anchored element spans the full anchor width */\n }\n :host([stretch]) {\n display: inline-flex; /* switch from inline-block so internal children are flex items */\n width: 100%; /* fill non-flex parents */\n flex-grow: 1; /* absorb extra space in flex parents */\n flex-shrink: 0; /* hold full width — shrink:1 would let siblings squeeze it below 100% */\n flex-basis: auto; /* defer to width:100% on the main axis; avoids forcing 100% height in column-flex parents */\n min-width: 0; /* prevent overflow when the outer host is itself inside a constrained flex row */\n }\n ";this.#o?this.#o.replaceSync(t):this.#r&&(this.#o=(0,i.fz)(t,this.#r))}#c(t,e,o){return t?.disconnect(),e?.removeAttribute(o),this.#s&&e?(0,i.EA)(this.#s,e,{includeAttrs:[o]}):null}disconnectedCallback(){super.disconnectedCallback?.(),this.#t?.disconnect(),this.#e?.disconnect(),this.#n?.disconnect()}#d(){this.toggleAttribute("has-anchor",!!this.#s),this.#a()}}const a=(0,r.Zz)(n.tQ)(l);customElements.define(h,a)},76231(t,e,o){o.d(e,{T:()=>d,m:()=>p});var n=o(92540),s=o(88961),i=o(63200),r=o(36976),h=o(72270),l=o(54847),a=o(25964);const d=(0,a.xE)("enriched-text");class c extends((0,h.qu)({componentName:d,baseSelector:":host > div"})){#u;#m;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,a.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#b(),(0,a.Ge)(this,this.#y.bind(this)),this.contentNode?.addEventListener("click",t=>{t.target instanceof HTMLAnchorElement&&t.stopPropagation()})}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),o!==e&&("readonly"===t&&this.onReadOnlyChange("true"===o),"link-target-blank"===t&&this.#b())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(t,e,o,n,s)=>("_"===t[e].markup&&(t[e].tag="u"),this.#m(t,e,o,n,s)),this.processor.renderer.rules.em_close=(t,e,o,n,s)=>("_"===t[e].markup&&(t[e].tag="u"),this.#m(t,e,o,n,s))}#g(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(t,e,o,n,s)=>(t[e].attrSet("target","_blank"),this.#u(t,e,o,n,s)):this.processor.renderer.rules.link_open=this.#u}#v(){this.processor&&this.processor.disable(r.M)}#f(){this.#v()}#x(){this.#u=this.processor.renderer.rules.link_open||((t,e,o,n,s)=>s.renderToken(t,e,o)),this.#m=this.processor.renderer.rules.em_open||((t,e,o,n,s)=>s.renderToken(t,e,o))}#b(){this.processor=new n.A("commonmark",{html:!0}),this.#x(),this.#f(),this.#g(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#y(){if(!this.processor)return;let t=(0,l.G)(this.innerHTML);!t?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const e=this.processor.parse(t,{references:void 0});t=this.processor.renderer.render(e,{html:!0,breaks:!0})}catch{console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=t,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(t){t?this.contentNode.setAttribute("inert",t):this.contentNode.removeAttribute("inert")}}const p=(0,i.Zz)((0,s.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,s.RF)({componentNameOverride:(0,a.xE)("link")}),(0,s.RF)({componentNameOverride:(0,a.xE)("text")}),(0,s.DM)({triggers:[{attr:"full-width",value:"true"}]}),s.VO,s.tQ)(c)},36976(t,e,o){o.d(e,{M:()=>n});const n=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54847(t,e,o){o.d(e,{G:()=>n});const n=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value}},55838(t,e,o){o.r(e),o.d(e,{EnrichedTextClass:()=>n.m,componentName:()=>n.T}),o(90512);var n=o(76231);customElements.define(n.T,n.m)},75464(t,e,o){o.d(e,{J:()=>g,T:()=>l});var n=o(88961),s=o(63200),i=o(25964),r=o(72270),h=o(66434);const l=(0,i.xE)("link"),a=["href","readonly"];class d extends((0,r.qu)({componentName:l,baseSelector:":host a"})){static get observedAttributes(){return a.concat(super.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,i.fz)('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),this.anchor=this.shadowRoot.querySelector("a"),(0,i.EA)(this,this.anchor,{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,i.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]}),this.anchor.addEventListener("click",t=>{this.readOnly&&t.preventDefault()})}get readOnly(){return"true"===this.getAttribute("readonly")}}const c={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>h.s.componentName}},{anchor:p,text:u,host:m,wrapper:b,link:y}=c,g=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...u,property:"direction"},textAlign:b,textDecoration:{...y,property:"text-decoration",fallback:"none"},textColor:[{...p,property:"color"},{...u,property:h.s.cssVarList.textColor}],cursor:p}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(d)},90512(t,e,o){o.r(e),o.d(e,{LinkClass:()=>n.J,componentName:()=>n.T});var n=o(75464);o(63595),customElements.define(n.T,n.J)},66434(t,e,o){o.d(e,{T:()=>h,s:()=>d});var n=o(88961),s=o(63200),i=o(25964),r=o(72270);const h=(0,i.xE)("text");class l extends((0,r.qu)({componentName:h,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,i.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,i.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:a}={host:{selector:()=>":host"}},d=(0,s.Zz)((0,n.RF)({mappings:{hostWidth:{...a,property:"width"},hostDirection:{...a,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(l)},63595(t,e,o){o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)},38516(t,e,o){o.r(e),o.d(e,{TooltipClass:()=>u,componentName:()=>l}),o(13094),o(55838),o(17017),o(76720);var n=o(88961),s=o(63200),i=o(25964),r=o(72270),h=o(76231);const l=(0,i.xE)("tooltip"),a=["text","position","hide-delay","hover-delay","opened"];class d extends((0,r.qu)({componentName:l,baseSelector:"vaadin-tooltip"})){#C=null;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-anchored>\n <slot></slot>\n <vaadin-tooltip slot="anchored"></vaadin-tooltip>\n </descope-anchored>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.tooltip=this.shadowRoot.querySelector("vaadin-tooltip"),this.anchored=this.shadowRoot.querySelector("descope-anchored")}#a(){const t=this.anchored?.classList?.contains("hidden");this.classList.toggle("hidden",t)}static get observedAttributes(){return a.concat(super.observedAttributes||[])}get isOpened(){return"true"===this.getAttribute("opened")}get overlay(){return this.tooltip?._overlayElement}get overlayContentNode(){return this.overlay?.shadowRoot.querySelector('[part="content"]')}get tooltipText(){return this.getAttribute("text")?.trim()||""}get isStaticDisplay(){return"true"===this.getAttribute("static-display")}get srLabel(){return this.tooltip?.querySelector('[slot="sr-label"]')}#N(){this.isStaticDisplay?(this.#w(),this.setAttribute("inert","true")):this.removeAttribute("inert")}#w(){this.overlay&&(this.overlay.style.display="block",this.overlay.style.position="static")}init(){super.init?.(),(0,i.fz)('\n :host {\n display: inline-block;\n }\n vaadin-tooltip {\n display: block;\n position: absolute;\n width: 0;\n height: 0;\n overflow: hidden;\n }\n /* Stack anchor above the anchored element so the tooltip flows below it inline. */\n :host([static-display="true"]) descope-anchored::part(root) {\n flex-direction: column;\n }\n :host([static-display="true"]) descope-anchored::part(anchored) {\n position: static;\n inset: unset;\n }\n :host([static-display="true"]) vaadin-tooltip {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n }\n :host([static-display="true"]) vaadin-tooltip [slot="sr-label"] {\n display: none;\n }\n',this),this.defaultSlot.addEventListener("slotchange",()=>this.#k()),this.#k(),setTimeout(()=>this.#S())}#A(){this.#C?.disconnect(),this.anchored&&(this.#C=(0,i.mx)(this.anchored,()=>this.#a(),{includeAttrs:["class"]}))}connectedCallback(){super.connectedCallback?.(),this.#a(),this.#A()}disconnectedCallback(){super.disconnectedCallback?.(),this.#C?.disconnect()}#k(){const t=this.defaultSlot?.assignedElements()?.[0];t&&(this.tooltip.target=t)}#S(){this.#T(),this.#E(),(0,i.EA)(this,this.tooltip,{includeAttrs:["position","opened"]}),this.#O()}#_(){this.overlayContentNode.innerHTML=""}#R(){const t=document.createElement("descope-enriched-text");return t.setAttribute("link-target-blank","true"),t.textContent=this.tooltipText,t}#T(){this.overlayContentNode&&setTimeout(()=>{this.#_(),this.textComponent=this.#R(),this.overlayContentNode.appendChild(this.textComponent),this.srLabel&&!this.tooltipText&&this.srLabel.setAttribute("aria-hidden","true"),(0,i.EA)(this,this.textComponent,{includeAttrs:["readonly"]})})}#E(){if(!this.overlay)return;const t=this.overlay._attachOverlay?.bind(this.overlay);this.overlay._detachOverlay=()=>{},this.overlay._attachOverlay=()=>{t?.(),setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.overlay._updatePosition?.()})},this.isOpened&&setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.#N(),this.overlay._updatePosition?.()})}#O(){this.tooltip?.toggleAttribute("manual",this.isOpened)}#L(t){if(!this.textComponent)return;const e=(t??"").trim();this.textComponent.textContent=e,this.srLabel&&(e?this.srLabel.removeAttribute("aria-hidden"):this.srLabel.setAttribute("aria-hidden","true"))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&("text"===t&&this.#L(o),"opened"===t&&this.#O())}}const{overlay:c,content:p}={overlay:{selector:()=>"vaadin-tooltip-overlay::part(overlay)"},content:{selector:()=>"vaadin-tooltip-overlay::part(content)"}},u=(0,s.Zz)(n.tQ,(0,n.mA)({selector:"",mappings:{fontFamily:{...p,property:h.m.cssVarList.fontFamilyOverride},fontSize:{...p,property:h.m.cssVarList.fontSizeOverride},fontWeight:{...p,property:h.m.cssVarList.fontWeightOverride},textColor:{...p,property:h.m.cssVarList.textColorOverride},hostDirection:{...p,property:h.m.cssVarList.hostDirectionOverride},backgroundColor:[{...c},{...p}],borderColor:{...c},borderStyle:{...c},borderWidth:{...c},borderRadius:{...c},boxShadow:{...c},horizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],verticalPadding:[{...p,property:"padding-top"},{...p,property:"padding-bottom"}]},forward:{attributes:["style"],include:!1}}))(d);customElements.define(l,u)},1508(t,e,o){function n(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}function s(t){const e=[];let o;return"slot"===t.localName?o=t.assignedElements():(e.push(t),o=[...t.children]),o.forEach(t=>e.push(...s(t))),e}function i(t,e){return e?e.closest(t)||i(t,e.getRootNode().host):null}function r(t){return t?new Set(t.split(" ")):new Set}function h(t){return t?[...t].join(" "):""}function l(t,e,o){const n=r(t.getAttribute(e));n.add(o),t.setAttribute(e,h(n))}function a(t,e,o){const n=r(t.getAttribute(e));n.delete(o),0!==n.size?t.setAttribute(e,h(n)):t.removeAttribute(e)}function d(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}o.d(e,{Dy:()=>n,J$:()=>s,Wr:()=>a,Z4:()=>r,ZA:()=>d,el:()=>i,iA:()=>l,sz:()=>h})},44099(t,e,o){o.d(e,{r:()=>r});var n=o(1508),s=o(65641),i=o(11707);class r extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${(0,i.I)()}`}constructor(t,e,o,n={}){super();const{initializer:s,multiple:i,observe:r,useUniqueId:h}=n;this.host=t,this.slotName=e,this.tagName=o,this.observe="boolean"!=typeof r||r,this.multiple="boolean"==typeof i&&i,this.slotInitializer=s,i&&(this.nodes=[]),h&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach(t=>{this.initAddedNode(t)})}attachDefaultNode(){const{host:t,slotName:e,tagName:o}=this;let n=this.defaultNode;return!n&&o&&(n=document.createElement(o),n instanceof Element&&(""!==e&&n.setAttribute("slot",e),this.defaultNode=n)),n&&(this.node=n,t.appendChild(n)),n}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t)}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,o=this.host.shadowRoot.querySelector(e);this.__slotObserver=new s.P(o,({addedNodes:t,removedNodes:e})=>{const o=this.multiple?this.nodes:[this.node],s=t.filter(t=>!(0,n.ZA)(t)&&!o.includes(t));e.length&&(this.nodes=o.filter(t=>!e.includes(t)),e.forEach(t=>{this.teardownNode(t)})),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...s].filter(t=>t!==this.defaultNode),s.forEach(t=>{this.initAddedNode(t)})):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))})}}},65641(t,e,o){o.d(e,{P:()=>n});class n{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush()}))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const o=[],n=[];t.length&&(e=t.filter(t=>!this._storedNodes.includes(t))),this._storedNodes.length&&this._storedNodes.forEach((e,s)=>{const i=t.indexOf(e);-1===i?o.push(e):i!==s&&n.push(e)}),(e.length||o.length||n.length)&&this.callback({addedNodes:e,movedNodes:n,removedNodes:o}),this._storedNodes=t}}},11707(t,e,o){o.d(e,{I:()=>s});let n=0;function s(){return n++}}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[628,2294,3267,4159,9261],{13094(t,e,o){o.r(e),o.d(e,{AnchoredClass:()=>h,componentName:()=>a});var n=o(88961),r=o(72270),s=o(25964),i=o(63200);const a=(0,s.xE)("anchored");class l extends((0,r.qu)({componentName:a,baseSelector:".anchored-root"})){#t=null;#e=null;#o=null;#n=null;get#r(){return this.defaultSlot.assignedElements({flatten:!0})[0]}get#s(){return this.shadowRoot.querySelector('slot[name="anchored"]')?.assignedElements()[0]}get#i(){return this.getRootNode().host}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="anchored-root" part="root">\n <slot></slot>\n <div class="anchored-host" part="anchored">\n <slot name="anchored"></slot>\n </div>\n </div>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])")}init(){super.init?.(),(0,s.fz)("\n :host {\n display: inline-flex;\n position: relative;\n box-sizing: border-box;\n }\n\n :host(:not([has-anchor])) {\n display: none;\n }\n\n .anchored-root {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n }\n\n /* Make anchor fill the flex row and allow it to shrink. */\n ::slotted(*:not([slot])) {\n flex-grow: 1; /* fill the flex row */\n flex-shrink: 1; /* compress when constrained */\n flex-basis: auto; /* start from the anchor's natural size */\n min-width: 0; /* flex items won't shrink below content size without this */\n }\n\n /* Anchored container covers the anchor but is invisible to pointer events. */\n .anchored-host {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n /* Restore interactivity for actual anchored content. */\n ::slotted([slot=\"anchored\"]) {\n pointer-events: auto;\n }\n ",this),this.#a(),this.defaultSlot.addEventListener("slotchange",()=>this.#l()),this.#l()}#h(){const t=this.#r?.classList?.contains("hidden");this.classList.toggle("hidden",t)}#l(){this.#c(),this.#t=this.#d(this.#t,this.#i,"stretch"),this.#e=this.#d(this.#e,this.#s,"st-host-direction"),this.#p()}#p(){this.#n?.disconnect(),this.#r&&(this.#n=(0,s.mx)(this.#r,()=>this.#h(),{includeAttrs:["class"]}))}connectedCallback(){super.connectedCallback?.(),this.#p(),this.#h()}#a(){const t="\n descope-anchored {\n width: 100%; /* fill the outer host so the anchored element spans the full anchor width */\n }\n :host([stretch]) {\n display: inline-flex; /* switch from inline-block so internal children are flex items */\n width: 100%; /* fill non-flex parents */\n flex-grow: 1; /* absorb extra space in flex parents */\n flex-shrink: 0; /* hold full width — shrink:1 would let siblings squeeze it below 100% */\n flex-basis: auto; /* defer to width:100% on the main axis; avoids forcing 100% height in column-flex parents */\n min-width: 0; /* prevent overflow when the outer host is itself inside a constrained flex row */\n }\n ";this.#o?this.#o.replaceSync(t):this.#i&&(this.#o=(0,s.fz)(t,this.#i))}#d(t,e,o){return t?.disconnect(),e?.removeAttribute(o),this.#r&&e?(0,s.EA)(this.#r,e,{includeAttrs:[o]}):null}disconnectedCallback(){super.disconnectedCallback?.(),this.#t?.disconnect(),this.#e?.disconnect(),this.#n?.disconnect()}#c(){this.toggleAttribute("has-anchor",!!this.#r),this.#h()}}const h=(0,i.Zz)(n.tQ)(l);customElements.define(a,h)},76231(t,e,o){o.d(e,{T:()=>c,m:()=>p});var n=o(92540),r=o(88961),s=o(63200),i=o(36976),a=o(72270),l=o(54847),h=o(25964);const c=(0,h.xE)("enriched-text");class d extends((0,a.qu)({componentName:c,baseSelector:":host > div"})){#u;#m;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,h.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#y(),(0,h.Ge)(this,this.#b.bind(this)),this.contentNode?.addEventListener("click",t=>{t.target instanceof HTMLAnchorElement&&t.stopPropagation()})}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),o!==e&&("readonly"===t&&this.onReadOnlyChange("true"===o),"link-target-blank"===t&&this.#y())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(t,e,o,n,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#m(t,e,o,n,r)),this.processor.renderer.rules.em_close=(t,e,o,n,r)=>("_"===t[e].markup&&(t[e].tag="u"),this.#m(t,e,o,n,r))}#v(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(t,e,o,n,r)=>(t[e].attrSet("target","_blank"),this.#u(t,e,o,n,r)):this.processor.renderer.rules.link_open=this.#u}#g(){this.processor&&this.processor.disable(i.M)}#f(){this.#g()}#x(){this.#u=this.processor.renderer.rules.link_open||((t,e,o,n,r)=>r.renderToken(t,e,o)),this.#m=this.processor.renderer.rules.em_open||((t,e,o,n,r)=>r.renderToken(t,e,o))}#y(){this.processor=new n.A("commonmark",{html:!0}),this.#x(),this.#f(),this.#v(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#b(){if(!this.processor)return;let t=(0,l.G)(this.innerHTML);!t?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const e=this.processor.parse(t,{references:void 0});t=this.processor.renderer.render(e,{html:!0,breaks:!0})}catch{console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=t,this.contentNode.firstChild?.setAttribute("part","content")}onReadOnlyChange(t){t?this.contentNode.setAttribute("inert",t):this.contentNode.removeAttribute("inert")}}const p=(0,s.Zz)((0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,r.RF)({componentNameOverride:(0,h.xE)("link")}),(0,r.RF)({componentNameOverride:(0,h.xE)("text")}),(0,r.DM)({triggers:[{attr:"full-width",value:"true"}]}),r.VO,r.tQ)(d)},36976(t,e,o){o.d(e,{M:()=>n});const n=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},54847(t,e,o){o.d(e,{G:()=>n});const n=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value}},55838(t,e,o){o.r(e),o.d(e,{EnrichedTextClass:()=>n.m,componentName:()=>n.T}),o(90512);var n=o(76231);customElements.define(n.T,n.m)},75464(t,e,o){o.d(e,{J:()=>v,T:()=>l});var n=o(88961),r=o(63200),s=o(25964),i=o(72270),a=o(66434);const l=(0,s.xE)("link"),h=["href","readonly"];class c extends((0,i.qu)({componentName:l,baseSelector:":host a"})){static get observedAttributes(){return h.concat(super.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<div>\n\t\t\t<descope-text part="wrapper">\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t',(0,s.fz)('\n :host {\n\t\t\tdisplay: inline-block;\n line-height: 1em;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t}\n\n :host([ellipsis="true"]) descope-text {\n display: inline-flex;\n }\n :host([ellipsis="true"]) descope-text::part(text-wrapper) {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ',this),this.anchor=this.shadowRoot.querySelector("a"),(0,s.EA)(this,this.anchor,{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,s.EA)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]}),this.anchor.addEventListener("click",t=>{this.readOnly&&t.preventDefault()})}get readOnly(){return"true"===this.getAttribute("readonly")}}const d={host:{selector:()=>":host"},link:{selector:()=>":host a"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>a.s.componentName}},{anchor:p,text:u,host:m,wrapper:y,link:b}=d,v=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...m,property:"width"},hostDirection:{...u,property:"direction"},textAlign:y,textDecoration:{...b,property:"text-decoration",fallback:"none"},textColor:[{...p,property:"color"},{...u,property:a.s.cssVarList.textColor}],cursor:p}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(c)},90512(t,e,o){o.r(e),o.d(e,{LinkClass:()=>n.J,componentName:()=>n.T});var n=o(75464);o(63595),customElements.define(n.T,n.J)},66434(t,e,o){o.d(e,{T:()=>a,s:()=>c});var n=o(88961),r=o(63200),s=o(25964),i=o(72270);const a=(0,s.xE)("text");class l extends((0,i.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""})}}const{host:h}={host:{selector:()=>":host"}},c=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...h,property:"width"},hostDirection:{...h,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),(0,n.DM)({triggers:[{attr:"full-width",value:"true"}]}),n.VO,n.tQ)(l)},63595(t,e,o){o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)},54240(t,e,o){o.r(e),o.d(e,{TooltipClass:()=>u,componentName:()=>l}),o(13094),o(55838),o(57760);var n=o(88961),r=o(63200),s=o(25964),i=o(72270),a=o(76231);const l=(0,s.xE)("tooltip"),h=["text","position","hide-delay","hover-delay","opened"];class c extends((0,i.qu)({componentName:l,baseSelector:"vaadin-tooltip"})){#C=null;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <descope-anchored>\n <slot></slot>\n <vaadin-tooltip slot="anchored"></vaadin-tooltip>\n </descope-anchored>\n ',this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.tooltip=this.shadowRoot.querySelector("vaadin-tooltip"),this.anchored=this.shadowRoot.querySelector("descope-anchored")}#h(){const t=this.anchored?.classList?.contains("hidden");this.classList.toggle("hidden",t)}static get observedAttributes(){return h.concat(super.observedAttributes||[])}get isOpened(){return"true"===this.getAttribute("opened")}get overlay(){return this.tooltip?._overlayElement}get overlayContentNode(){return this.overlay?.shadowRoot.querySelector('[part="content"]')}get tooltipText(){return this.getAttribute("text")?.trim()||""}get isStaticDisplay(){return"true"===this.getAttribute("static-display")}get srLabel(){return this.tooltip?.querySelector('[slot="sr-label"]')}#k(){this.isStaticDisplay?(this.#w(),this.setAttribute("inert","true")):this.removeAttribute("inert")}#w(){this.overlay&&(this.overlay.style.display="block",this.overlay.style.position="static")}init(){super.init?.(),(0,s.fz)('\n :host {\n display: inline-block;\n }\n vaadin-tooltip {\n display: block;\n position: absolute;\n width: 0;\n height: 0;\n overflow: hidden;\n }\n /* Stack anchor above the anchored element so the tooltip flows below it inline. */\n :host([static-display="true"]) descope-anchored::part(root) {\n flex-direction: column;\n }\n :host([static-display="true"]) descope-anchored::part(anchored) {\n position: static;\n inset: unset;\n }\n :host([static-display="true"]) vaadin-tooltip {\n position: static;\n width: auto;\n height: auto;\n overflow: visible;\n }\n :host([static-display="true"]) vaadin-tooltip [slot="sr-label"] {\n display: none;\n }\n',this),this.defaultSlot.addEventListener("slotchange",()=>this.#S()),this.#S(),setTimeout(()=>this.#A())}#T(){this.#C?.disconnect(),this.anchored&&(this.#C=(0,s.mx)(this.anchored,()=>this.#h(),{includeAttrs:["class"]}))}connectedCallback(){super.connectedCallback?.(),this.#h(),this.#T()}disconnectedCallback(){super.disconnectedCallback?.(),this.#C?.disconnect()}#S(){const t=this.defaultSlot?.assignedElements()?.[0];t&&(this.tooltip.target=t)}#A(){this.#O(),this.#R(),(0,s.EA)(this,this.tooltip,{includeAttrs:["position","opened"]}),this.#L()}#E(){this.overlayContentNode.innerHTML=""}#N(){const t=document.createElement("descope-enriched-text");return t.setAttribute("link-target-blank","true"),t.textContent=this.tooltipText,t}#O(){this.overlayContentNode&&setTimeout(()=>{this.#E(),this.textComponent=this.#N(),this.overlayContentNode.appendChild(this.textComponent),this.srLabel&&!this.tooltipText&&this.srLabel.setAttribute("aria-hidden","true"),(0,s.EA)(this,this.textComponent,{includeAttrs:["readonly"]})})}#R(){if(!this.overlay)return;const t=this.overlay._attachOverlay?.bind(this.overlay);this.overlay._detachOverlay=()=>{},this.overlay._attachOverlay=()=>{t?.(),setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.overlay._updatePosition?.()})},this.isOpened&&setTimeout(()=>{this.tooltip.shadowRoot.appendChild(this.overlay),this.#k(),this.overlay._updatePosition?.()})}#L(){this.tooltip?.toggleAttribute("manual",this.isOpened)}#_(t){if(!this.textComponent)return;const e=(t??"").trim();this.textComponent.textContent=e,this.srLabel&&(e?this.srLabel.removeAttribute("aria-hidden"):this.srLabel.setAttribute("aria-hidden","true"))}attributeChangedCallback(t,e,o){super.attributeChangedCallback?.(t,e,o),e!==o&&("text"===t&&this.#_(o),"opened"===t&&this.#L())}}const{overlay:d,content:p}={overlay:{selector:()=>"vaadin-tooltip-overlay::part(overlay)"},content:{selector:()=>"vaadin-tooltip-overlay::part(content)"}},u=(0,r.Zz)(n.tQ,(0,n.mA)({selector:"",mappings:{fontFamily:{...p,property:a.m.cssVarList.fontFamilyOverride},fontSize:{...p,property:a.m.cssVarList.fontSizeOverride},fontWeight:{...p,property:a.m.cssVarList.fontWeightOverride},textColor:{...p,property:a.m.cssVarList.textColorOverride},hostDirection:{...p,property:a.m.cssVarList.hostDirectionOverride},backgroundColor:[{...d},{...p}],borderColor:{...d},borderStyle:{...d},borderWidth:{...d},borderRadius:{...d},boxShadow:{...d},horizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"}],verticalPadding:[{...p,property:"padding-top"},{...p,property:"padding-bottom"}]},forward:{attributes:["style"],include:!1}}))(c);customElements.define(l,u)}}]);
3
2
  //# sourceMappingURL=descope-tooltip.js.map