@novu/js 3.16.0 → 3.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6I5A5OGE_js = require('../chunk-6I5A5OGE.js');
3
+ var chunkSP44ETLM_js = require('../chunk-SP44ETLM.js');
4
4
  var chunkWDGG3OER_js = require('../chunk-WDGG3OER.js');
5
5
  var chunk7B52C2XE_js = require('../chunk-7B52C2XE.js');
6
6
  var web = require('solid-js/web');
@@ -37,7 +37,7 @@ function _interopNamespace(e) {
37
37
  var clsx__default = /*#__PURE__*/_interopDefault(clsx);
38
38
  var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
39
39
 
40
- // _qj8zj3k96:/home/runner/_work/novu/novu/packages/js/src/ui/index.directcss
40
+ // _gq6z8z4nv:/home/runner/work/novu/novu/packages/js/src/ui/index.directcss
41
41
  var ui_default = `.novu{scrollbar-color:var(--nv-color-secondary-foreground-alpha-300) #0000;:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{border:0 solid #e5e7eb;box-sizing:border-box}:where(html,:host){line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;tab-size:4;-webkit-tap-highlight-color:transparent}:where(body){line-height:inherit;margin:0}:where(hr){border-top-width:1px;color:inherit;height:0}:where(abbr:where([title])){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(a){color:inherit;text-decoration:inherit}:where(b,strong){font-weight:bolder}:where(code,kbd,samp,pre){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}:where(small){font-size:80%}:where(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:initial}:where(sub){bottom:-.25em}:where(sup){top:-.5em}:where(table){border-collapse:collapse;border-color:inherit;text-indent:0}:where(button,input,optgroup,select,textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}:where(button,select){text-transform:none}:where(button,input:where([type=button]),input:where([type=reset]),input:where([type=submit])){-webkit-appearance:button;background-color:initial;background-image:none}:where(:-moz-focusring){outline:auto}:where(:-moz-ui-invalid){box-shadow:none}:where(progress){vertical-align:initial}:where(*)::-webkit-inner-spin-button,:where(*)::-webkit-outer-spin-button{height:auto}:where([type=search]){-webkit-appearance:textfield;outline-offset:-2px}:where(*)::-webkit-search-decoration{-webkit-appearance:none}:where(*)::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(summary){display:list-item}:where(blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre){margin:0}:where(fieldset){margin:0;padding:0}:where(legend){padding:0}:where(ol,ul,menu){list-style:none;margin:0;padding:0}:where(dialog){padding:0}:where(textarea){resize:vertical}:where(input)::placeholder,:where(textarea)::placeholder{color:#9ca3af;opacity:1}:where(button,[role=button]){cursor:pointer}:where(:disabled){cursor:default}:where(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(img,video){height:auto;max-width:100%}:where([hidden]){display:none}:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:where(*) ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-webkit-scrollbar{height:.5rem;width:.5rem}::-webkit-scrollbar-thumb{background-clip:"padding-box";background-color:var(--nv-color-secondary-foreground-alpha-300);border-radius:.25rem}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:initial}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}}.nt-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.\\!nt-pointer-events-auto{pointer-events:auto!important}.nt-invisible{visibility:hidden}.nt-absolute{position:absolute}.nt-relative{position:relative}.nt-inset-0{inset:0}.nt-inset-2{inset:.5rem}.nt-bottom-0{bottom:0}.nt-left-0{left:0}.nt-left-0\\.5{left:.125rem}.nt-right-0{right:0}.nt-right-3{right:.75rem}.nt-top-0{top:0}.nt-top-0\\.5{top:.125rem}.nt-top-3{top:.75rem}.nt-z-10{z-index:10}.nt-z-\\[-1\\]{z-index:-1}.-nt-m-1{margin:-.25rem}.nt-mx-auto{margin-left:auto;margin-right:auto}.-nt-mt-2{margin-top:-.5rem}.-nt-mt-\\[2px\\]{margin-top:-2px}.nt--mt-\\[50px\\]{margin-top:-50px}.nt-mb-1{margin-bottom:.25rem}.nt-mb-2{margin-bottom:.5rem}.nt-mb-3{margin-bottom:.75rem}.nt-mb-4{margin-bottom:1rem}.nt-mb-\\[0\\.625rem\\]{margin-bottom:.625rem}.nt-ml-1{margin-left:.25rem}.nt-ml-2{margin-left:.5rem}.nt-ml-auto{margin-left:auto}.nt-mr-2{margin-right:.5rem}.nt-mr-auto{margin-right:auto}.nt-mt-1{margin-top:.25rem}.nt-mt-1\\.5{margin-top:.375rem}.nt-mt-auto{margin-top:auto}.nt-block{display:block}.nt-flex{display:flex}.nt-inline-flex{display:inline-flex}.nt-grid{display:grid}.nt-hidden{display:none}.nt-aspect-square{aspect-ratio:1/1}.nt-size-1\\.5{height:.375rem;width:.375rem}.nt-size-2{height:.5rem;width:.5rem}.nt-size-2\\.5{height:.625rem;width:.625rem}.nt-size-3{height:.75rem;width:.75rem}.nt-size-3\\.5{height:.875rem;width:.875rem}.nt-size-4{height:1rem;width:1rem}.nt-size-5{height:1.25rem;width:1.25rem}.nt-size-6{height:1.5rem;width:1.5rem}.nt-size-8{height:2rem;width:2rem}.nt-size-fit{height:-webkit-fit-content;height:fit-content;width:-webkit-fit-content;width:fit-content}.nt-size-full{height:100%;width:100%}.nt-h-2{height:.5rem}.nt-h-3{height:.75rem}.nt-h-3\\.5{height:.875rem}.nt-h-4{height:1rem}.nt-h-5{height:1.25rem}.nt-h-6{height:1.5rem}.nt-h-7{height:1.75rem}.nt-h-8{height:2rem}.nt-h-9{height:2.25rem}.nt-h-\\[600px\\]{height:600px}.nt-h-auto{height:auto}.nt-h-fit{height:-webkit-fit-content;height:fit-content}.nt-h-full{height:100%}.nt-max-h-\\[160px\\]{max-height:160px}.nt-min-h-0{min-height:0}.nt-min-h-\\[272px\\]{min-height:272px}.nt-w-1\\.5{width:.375rem}.nt-w-1\\/3{width:33.333333%}.nt-w-2\\/3{width:66.666667%}.nt-w-5{width:1.25rem}.nt-w-7{width:1.75rem}.nt-w-8{width:2rem}.nt-w-\\[260px\\]{width:260px}.nt-w-\\[350px\\]{width:350px}.nt-w-\\[3px\\]{width:3px}.nt-w-\\[400px\\]{width:400px}.nt-w-\\[60px\\]{width:60px}.nt-w-\\[calc\\(2ch\\+2rem\\)\\]{width:calc(2ch + 2rem)}.nt-w-fit{width:-webkit-fit-content;width:fit-content}.nt-w-full{width:100%}.nt-w-max{width:-webkit-max-content;width:max-content}.nt-min-w-52{min-width:13rem}.nt-min-w-\\[120px\\]{min-width:120px}.nt-min-w-\\[220px\\]{min-width:220px}.nt-min-w-\\[74px\\]{min-width:74px}.nt-max-w-56{max-width:14rem}.nt-max-w-\\[120px\\]{max-width:120px}.nt-max-w-\\[220px\\]{max-width:220px}.nt-flex-1{flex:1 1 0%}.nt-shrink-0{flex-shrink:0}.nt-translate-x-1\\/2{--tw-translate-x:50%}.nt-transform,.nt-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes nt-shimmer{0%{opacity:1}50%{opacity:.6}to{opacity:1}}.nt-animate-shimmer{animation:nt-shimmer 1.5s ease-in-out infinite}@keyframes nt-spin{to{transform:rotate(1turn)}}.nt-animate-spin{animation:nt-spin 1s linear infinite}.nt-cursor-default{cursor:default}.nt-cursor-not-allowed{cursor:not-allowed}.nt-cursor-pointer{cursor:pointer}.nt-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.nt-flex-row{flex-direction:row}.nt-flex-col{flex-direction:column}.nt-flex-wrap{flex-wrap:wrap}.nt-flex-nowrap{flex-wrap:nowrap}.nt-items-start{align-items:flex-start}.nt-items-center{align-items:center}.nt-justify-end{justify-content:flex-end}.nt-justify-center{justify-content:center}.nt-justify-between{justify-content:space-between}.nt-gap-0\\.5{gap:.125rem}.nt-gap-1{gap:.25rem}.nt-gap-1\\.5{gap:.375rem}.nt-gap-2{gap:.5rem}.nt-gap-3{gap:.75rem}.nt-gap-4{gap:1rem}.nt-gap-6{gap:1.5rem}.nt-gap-8{gap:2rem}.nt-self-stretch{align-self:stretch}.nt-overflow-auto{overflow:auto}.nt-overflow-hidden{overflow:hidden}.nt-overflow-y-auto{overflow-y:auto}.nt-overflow-x-hidden{overflow-x:hidden}.nt-truncate{overflow:hidden;text-overflow:ellipsis}.nt-truncate,.nt-whitespace-nowrap{white-space:nowrap}.nt-whitespace-pre-wrap{white-space:pre-wrap}.nt-rounded{border-radius:var(--nv-radius-base)}.nt-rounded-full{border-radius:var(--nv-radius-full)}.nt-rounded-lg{border-radius:var(--nv-radius-lg)}.nt-rounded-md{border-radius:var(--nv-radius-md)}.nt-rounded-sm{border-radius:var(--nv-radius-sm)}.nt-rounded-xl{border-radius:var(--nv-radius-xl)}.nt-rounded-b-lg{border-bottom-left-radius:var(--nv-radius-lg);border-bottom-right-radius:var(--nv-radius-lg)}.nt-border{border-width:1px}.nt-border-b{border-bottom-width:1px}.nt-border-t{border-top-width:1px}.nt-border-background{border-color:var(--nv-color-background)}.nt-border-border{border-color:var(--nv-color-neutral-alpha-100)}.nt-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.nt-border-neutral-alpha-100{border-color:var(--nv-color-neutral-alpha-100)}.nt-border-neutral-alpha-200{border-color:var(--nv-color-neutral-alpha-200)}.nt-border-neutral-alpha-400{border-color:var(--nv-color-neutral-alpha-400)}.nt-border-neutral-alpha-50{border-color:var(--nv-color-neutral-alpha-50)}.nt-border-primary{border-color:var(--nv-color-primary)}.nt-border-t-neutral-alpha-200{border-top-color:var(--nv-color-neutral-alpha-200)}.nt-bg-\\[oklch\\(from_var\\(--nv-color-stripes\\)_l_c_h_\\/_0\\.1\\)\\]{background-color:oklch(from var(--nv-color-stripes) l c h/.1)}.nt-bg-background{background-color:var(--nv-color-background)}.nt-bg-counter{background-color:var(--nv-color-counter)}.nt-bg-foreground{background-color:var(--nv-color-foreground)}.nt-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.nt-bg-neutral-alpha-100{background-color:var(--nv-color-neutral-alpha-100)}.nt-bg-neutral-alpha-25{background-color:var(--nv-color-neutral-alpha-25)}.nt-bg-neutral-alpha-300{background-color:var(--nv-color-neutral-alpha-300)}.nt-bg-neutral-alpha-50{background-color:var(--nv-color-neutral-alpha-50)}.nt-bg-primary{background-color:var(--nv-color-primary)}.nt-bg-primary-alpha-300{background-color:var(--nv-color-primary-alpha-300)}.nt-bg-primary-alpha-400{background-color:var(--nv-color-primary-alpha-400)}.nt-bg-secondary{background-color:var(--nv-color-secondary)}.nt-bg-severity-high{background-color:var(--nv-color-severity-high)}.nt-bg-severity-high-alpha-100{background-color:var(--nv-color-severity-high-alpha-100)}.nt-bg-severity-high-alpha-200{background-color:var(--nv-color-severity-high-alpha-200)}.nt-bg-severity-high-alpha-300{background-color:var(--nv-color-severity-high-alpha-300)}.nt-bg-severity-high-alpha-50{background-color:var(--nv-color-severity-high-alpha-50)}.nt-bg-severity-low{background-color:var(--nv-color-severity-low)}.nt-bg-severity-low-alpha-100{background-color:var(--nv-color-severity-low-alpha-100)}.nt-bg-severity-low-alpha-200{background-color:var(--nv-color-severity-low-alpha-200)}.nt-bg-severity-low-alpha-300{background-color:var(--nv-color-severity-low-alpha-300)}.nt-bg-severity-low-alpha-50{background-color:var(--nv-color-severity-low-alpha-50)}.nt-bg-severity-medium{background-color:var(--nv-color-severity-medium)}.nt-bg-severity-medium-alpha-100{background-color:var(--nv-color-severity-medium-alpha-100)}.nt-bg-severity-medium-alpha-200{background-color:var(--nv-color-severity-medium-alpha-200)}.nt-bg-severity-medium-alpha-300{background-color:var(--nv-color-severity-medium-alpha-300)}.nt-bg-severity-medium-alpha-50{background-color:var(--nv-color-severity-medium-alpha-50)}.nt-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.nt-bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.nt-bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.nt-from-foreground-alpha-50{--tw-gradient-from:var(--nv-color-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-primary-foreground-alpha-200{--tw-gradient-from:var(--nv-color-primary-foreground-alpha-200) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-transparent{--tw-gradient-from:#0000 var(--tw-gradient-from-position);--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-20\\%{--tw-gradient-from-position:20%}.nt-to-background{--tw-gradient-to:var(--nv-color-background) var(--tw-gradient-to-position)}.nt-to-transparent{--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.nt-object-cover{object-fit:cover}.nt-p-0{padding:0}.nt-p-0\\.5{padding:.125rem}.nt-p-1{padding:.25rem}.nt-p-2{padding:.5rem}.nt-p-2\\.5{padding:.625rem}.nt-p-3{padding:.75rem}.nt-p-4{padding:1rem}.nt-px-1{padding-left:.25rem;padding-right:.25rem}.nt-px-2{padding-left:.5rem;padding-right:.5rem}.nt-px-3{padding-left:.75rem;padding-right:.75rem}.nt-px-4{padding-left:1rem;padding-right:1rem}.nt-px-8{padding-left:2rem;padding-right:2rem}.nt-px-\\[6px\\]{padding-left:6px;padding-right:6px}.nt-py-1{padding-bottom:.25rem;padding-top:.25rem}.nt-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.nt-py-2{padding-bottom:.5rem;padding-top:.5rem}.nt-py-3{padding-bottom:.75rem;padding-top:.75rem}.nt-py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}.nt-py-4{padding-bottom:1rem;padding-top:1rem}.nt-py-px{padding-bottom:1px;padding-top:1px}.nt-pb-12{padding-bottom:3rem}.nt-pb-2{padding-bottom:.5rem}.nt-pb-\\[0\\.625rem\\]{padding-bottom:.625rem}.nt-pr-0{padding-right:0}.nt-pt-2{padding-top:.5rem}.nt-pt-2\\.5{padding-top:.625rem}.nt-pt-8{padding-top:2rem}.nt-text-left{text-align:left}.nt-text-center{text-align:center}.nt-text-start{text-align:start}.nt-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.nt-text-\\[0\\.8rem\\]{font-size:.8rem}.nt-text-\\[12px\\]{font-size:12px}.nt-text-base{font-size:var(--nv-font-size-base);line-height:var(--nv-line-height-base)}.nt-text-sm{font-size:var(--nv-font-size-sm);line-height:var(--nv-line-height-sm)}.nt-text-xl{font-size:var(--nv-font-size-xl);line-height:var(--nv-line-height-xl)}.nt-text-xs{font-size:var(--nv-font-size-xs);line-height:var(--nv-line-height-xs)}.nt-font-medium{font-weight:500}.nt-font-normal{font-weight:400}.nt-font-semibold{font-weight:600}.nt-italic{font-style:italic}.nt-leading-none{line-height:1}.nt-text-\\[\\#000000\\]{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.nt-text-background{color:var(--nv-color-background)}.nt-text-counter-foreground{color:var(--nv-color-counter-foreground)}.nt-text-foreground{color:var(--nv-color-foreground)}.nt-text-foreground-alpha-300{color:var(--nv-color-foreground-alpha-300)}.nt-text-foreground-alpha-400{color:var(--nv-color-foreground-alpha-400)}.nt-text-foreground-alpha-600{color:var(--nv-color-foreground-alpha-600)}.nt-text-foreground-alpha-700{color:var(--nv-color-foreground-alpha-700)}.nt-text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.nt-text-neutral-alpha-500{color:var(--nv-color-neutral-alpha-500)}.nt-text-primary-foreground{color:var(--nv-color-primary-foreground)}.nt-text-secondary-foreground{color:var(--nv-color-secondary-foreground)}.nt-text-stripes{color:var(--nv-color-stripes)}.nt-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.nt-underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.nt-opacity-0{opacity:0}.nt-opacity-20{opacity:.2}.nt-opacity-50{opacity:.5}.nt-shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_0_0_0\\.5px_var\\(--nv-color-primary-600\\)\\]{--tw-shadow:0 0 0 0.5px var(--nv-color-primary-600);--tw-shadow-colored:0 0 0 0.5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_0_0_0\\.5px_var\\(--nv-color-secondary-600\\)\\]{--tw-shadow:0 0 0 0.5px var(--nv-color-secondary-600);--tw-shadow-colored:0 0 0 0.5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_1px_2px_0_rgba\\(10\\,13\\,20\\,0\\.03\\)\\]{--tw-shadow:0 1px 2px 0 #0a0d1408;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0px_1px_2px_0px_rgba\\(10\\,13\\,20\\,0\\.03\\)\\]{--tw-shadow:0px 1px 2px 0px #0a0d1408;--tw-shadow-colored:0px 1px 2px 0px var(--tw-shadow-color)}.nt-shadow-\\[0px_1px_2px_0px_rgba\\(10\\,13\\,20\\,0\\.03\\)\\],.nt-shadow-dropdown{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-dropdown{--tw-shadow:0px 12px 16px -4px oklch(from var(--nv-color-shadow) l c h/0.08),0px 4px 6px -2px oklch(from var(--nv-color-shadow) l c h/0.03);--tw-shadow-colored:0px 12px 16px -4px var(--tw-shadow-color),0px 4px 6px -2px var(--tw-shadow-color)}.nt-shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.nt-shadow-lg,.nt-shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.nt-shadow-popover{--tw-shadow:0px 8px 26px 0px oklch(from var(--nv-color-shadow) l c h/0.08),0px 2px 6px 0px oklch(from var(--nv-color-shadow) l c h/0.12);--tw-shadow-colored:0px 8px 26px 0px var(--tw-shadow-color),0px 2px 6px 0px var(--tw-shadow-color)}.nt-shadow-popover,.nt-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.nt-shadow-tooltip{--tw-shadow:0 5px 20px 0 oklch(from var(--nv-color-shadow) l c h/0.08);--tw-shadow-colored:0 5px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-ring-offset-background{--tw-ring-offset-color:var(--nv-color-background)}.nt-backdrop-blur-lg{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.nt-transition{transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-\\[width\\]{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,-webkit-text-decoration-color;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,-webkit-text-decoration-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-duration-100{transition-duration:.1s}.nt-duration-200{transition-duration:.2s}.nt-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.nt-will-change-\\[width\\]{will-change:width}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.nt-animate-in{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.nt-fade-in{--tw-enter-opacity:0}.nt-slide-in-from-top-2{--tw-enter-translate-y:-0.5rem}.nt-duration-100{animation-duration:.1s}.nt-duration-200{animation-duration:.2s}.nt-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-foreground\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-foreground) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-high\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-high) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-high\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-high) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-low\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-low) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-low\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-low) 80% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-medium\\)_45\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-medium) 45% c h)}.\\[--bell-gradient-end\\:oklch\\(from_var\\(--nv-color-severity-medium\\)_80\\%_c_h\\)\\]{--bell-gradient-end:oklch(from var(--nv-color-severity-medium) 80% c h)}.\\[--bell-gradient-start\\:var\\(--nv-color-foreground\\)\\]{--bell-gradient-start:var(--nv-color-foreground)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-high\\)\\]{--bell-gradient-start:var(--nv-color-severity-high)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-low\\)\\]{--bell-gradient-start:var(--nv-color-severity-low)}.\\[--bell-gradient-start\\:var\\(--nv-color-severity-medium\\)\\]{--bell-gradient-start:var(--nv-color-severity-medium)}.\\[interpolate-size\\:allow-keywords\\]{interpolate-size:allow-keywords}.\\[line-height\\:16px\\]{line-height:16px}.\\[scrollbar-gutter\\:stable\\]{scrollbar-gutter:stable}.\\[word-break\\:break-word\\]{word-break:break-word}.before\\:nt-absolute:before{content:var(--tw-content);position:absolute}.before\\:nt-inset-0:before{content:var(--tw-content);inset:0}.before\\:-nt-right-\\[calc\\(0\\+var\\(--stripes-size\\)\\)\\]:before{content:var(--tw-content);right:calc(var(--stripes-size)*-1)}.before\\:nt-m-1:before{content:var(--tw-content);margin:.25rem}@keyframes nt-stripes{0%{content:var(--tw-content);transform:translateX(0)}to{content:var(--tw-content);transform:translateX(calc(var(--stripes-size)*-1))}}.before\\:nt-animate-stripes:before{animation:nt-stripes 1s linear infinite paused;content:var(--tw-content)}.before\\:nt-rounded-full:before{border-radius:var(--nv-radius-full);content:var(--tw-content)}.before\\:nt-rounded-md:before{border-radius:var(--nv-radius-md);content:var(--tw-content)}.before\\:nt-rounded-xl:before{border-radius:var(--nv-radius-xl);content:var(--tw-content)}.before\\:nt-border:before{border-width:1px;content:var(--tw-content)}.before\\:nt-border-primary-foreground-alpha-100:before{border-color:var(--nv-color-primary-foreground-alpha-100);content:var(--tw-content)}.before\\:nt-border-secondary-foreground-alpha-100:before{border-color:var(--nv-color-secondary-foreground-alpha-100);content:var(--tw-content)}.before\\:nt-bg-severity-high-alpha-200:before{background-color:var(--nv-color-severity-high-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-high-alpha-300:before{background-color:var(--nv-color-severity-high-alpha-300);content:var(--tw-content)}.before\\:nt-bg-severity-low-alpha-200:before{background-color:var(--nv-color-severity-low-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-low-alpha-300:before{background-color:var(--nv-color-severity-low-alpha-300);content:var(--tw-content)}.before\\:nt-bg-severity-medium-alpha-200:before{background-color:var(--nv-color-severity-medium-alpha-200);content:var(--tw-content)}.before\\:nt-bg-severity-medium-alpha-300:before{background-color:var(--nv-color-severity-medium-alpha-300);content:var(--tw-content)}.before\\:nt-bg-dev-stripes-gradient:before{background-image:repeating-linear-gradient(135deg,oklch(from var(--nv-color-stripes) l c h/.1) 25%,oklch(from var(--nv-color-stripes) l c h/.1) 50%,oklch(from var(--nv-color-stripes) l c h/.2) 50%,oklch(from var(--nv-color-stripes) l c h/.2) 75%);content:var(--tw-content)}.before\\:nt-bg-\\[length\\:var\\(--stripes-size\\)_var\\(--stripes-size\\)\\]:before{background-size:var(--stripes-size) var(--stripes-size);content:var(--tw-content)}.before\\:nt-content-\\[\\"\\"\\]:before{--tw-content:"";content:var(--tw-content)}.before\\:\\[mask-image\\:linear-gradient\\(transparent_0\\%\\2c black\\)\\]:before{content:var(--tw-content);-webkit-mask-image:linear-gradient(#0000,#000);mask-image:linear-gradient(#0000,#000)}.after\\:nt-absolute:after{content:var(--tw-content);position:absolute}.after\\:nt-inset-0:after{content:var(--tw-content);inset:0}.after\\:-nt-top-12:after{content:var(--tw-content);top:-3rem}.after\\:nt-bottom-0:after{bottom:0;content:var(--tw-content)}.after\\:nt-left-0:after{content:var(--tw-content);left:0}.after\\:nt-left-0\\.5:after{content:var(--tw-content);left:.125rem}.after\\:nt-top-0\\.5:after{content:var(--tw-content);top:.125rem}.after\\:nt-size-3:after{content:var(--tw-content);height:.75rem;width:.75rem}.after\\:nt-h-\\[2px\\]:after{content:var(--tw-content);height:2px}.after\\:nt-w-full:after{content:var(--tw-content);width:100%}.after\\:nt-translate-x-1\\/2:after{--tw-translate-x:50%}.after\\:nt-translate-x-1\\/2:after,.after\\:nt-translate-x-full:after{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\\:nt-translate-x-full:after{--tw-translate-x:100%}.after\\:nt-rounded-full:after{border-radius:var(--nv-radius-full);content:var(--tw-content)}.after\\:nt-rounded-md:after{border-radius:var(--nv-radius-md);content:var(--tw-content)}.after\\:nt-rounded-xl:after{border-radius:var(--nv-radius-xl);content:var(--tw-content)}.after\\:nt-border-b-2:after{border-bottom-width:2px;content:var(--tw-content)}.after\\:nt-border-background:after{border-color:var(--nv-color-background);content:var(--tw-content)}.after\\:nt-border-b-primary:after{border-bottom-color:var(--nv-color-primary);content:var(--tw-content)}.after\\:nt-border-b-transparent:after{border-bottom-color:#0000;content:var(--tw-content)}.after\\:nt-bg-background:after{background-color:var(--nv-color-background);content:var(--tw-content)}.after\\:nt-bg-\\[linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-background\\)_l_c_h_\\/_0\\.9\\)_55\\%\\2c transparent\\)\\]:after{background-image:linear-gradient(180deg,#0000,oklch(from var(--nv-color-background) l c h/.9) 55%,#0000);content:var(--tw-content)}.after\\:nt-bg-\\[linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-stripes\\)_l_c_h_\\/_0\\.07\\)_55\\%\\2c transparent\\)\\2c linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-background\\)_l_c_h_\\/_0\\.9\\)_55\\%\\2c transparent\\)\\]:after{background-image:linear-gradient(180deg,#0000,oklch(from var(--nv-color-stripes) l c h/.07) 55%,#0000),linear-gradient(180deg,#0000,oklch(from var(--nv-color-background) l c h/.9) 55%,#0000);content:var(--tw-content)}.after\\:nt-bg-gradient-to-b:after{background-image:linear-gradient(to bottom,var(--tw-gradient-stops));content:var(--tw-content)}.after\\:nt-from-primary-foreground-alpha-50:after{content:var(--tw-content);--tw-gradient-from:var(--nv-color-primary-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\\:nt-from-secondary-foreground-alpha-50:after{content:var(--tw-content);--tw-gradient-from:var(--nv-color-secondary-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\\:nt-to-transparent:after{content:var(--tw-content);--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.after\\:nt-opacity-0:after{content:var(--tw-content);opacity:0}.after\\:nt-transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\\:nt-transition-opacity:after{content:var(--tw-content);transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\\:nt-duration-200:after{transition-duration:.2s}.after\\:nt-content-\\[\\"\\"\\]:after,.after\\:nt-content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.after\\:nt-duration-200:after{animation-duration:.2s;content:var(--tw-content)}.hover\\:nt-bg-neutral-alpha-100:hover{background-color:var(--nv-color-neutral-alpha-100)}.hover\\:nt-bg-neutral-alpha-50:hover{background-color:var(--nv-color-neutral-alpha-50)}.hover\\:nt-bg-primary-600:hover{background-color:var(--nv-color-primary-600)}.hover\\:nt-bg-primary-alpha-25:hover{background-color:var(--nv-color-primary-alpha-25)}.hover\\:nt-bg-primary-alpha-400:hover{background-color:var(--nv-color-primary-alpha-400)}.hover\\:nt-bg-severity-high-alpha-50:hover{background-color:var(--nv-color-severity-high-alpha-50)}.hover\\:nt-bg-severity-low-alpha-50:hover{background-color:var(--nv-color-severity-low-alpha-50)}.hover\\:nt-bg-severity-medium-alpha-50:hover{background-color:var(--nv-color-severity-medium-alpha-50)}.hover\\:nt-text-foreground-alpha-800:hover{color:var(--nv-color-foreground-alpha-800)}.before\\:hover\\:\\[animation-play-state\\:running\\]:hover:before{animation-play-state:running;content:var(--tw-content)}.hover\\:after\\:nt-opacity-100:hover:after{content:var(--tw-content);opacity:1}.focus\\:nt-outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus-visible\\:nt-rounded-lg:focus-visible{border-radius:var(--nv-radius-lg)}.focus-visible\\:nt-rounded-md:focus-visible{border-radius:var(--nv-radius-md)}.focus-visible\\:nt-rounded-xl:focus-visible{border-radius:var(--nv-radius-xl)}.focus-visible\\:nt-bg-neutral-alpha-50:focus-visible{background-color:var(--nv-color-neutral-alpha-50)}.focus-visible\\:nt-outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\\:nt-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:nt-ring-primary:focus-visible{--tw-ring-color:var(--nv-color-primary)}.focus-visible\\:nt-ring-ring:focus-visible{--tw-ring-color:var(--nv-color-ring)}.focus-visible\\:nt-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:nt-pointer-events-none:disabled{pointer-events:none}.disabled\\:nt-opacity-20:disabled{opacity:.2}.disabled\\:nt-opacity-50:disabled{opacity:.5}.nt-group:focus-within .group-focus-within\\:nt-opacity-100{opacity:1}.nt-group:hover .group-hover\\:nt-bg-severity-high-alpha-500{background-color:var(--nv-color-severity-high-alpha-500)}.nt-group:hover .group-hover\\:nt-bg-severity-low-alpha-500{background-color:var(--nv-color-severity-low-alpha-500)}.nt-group:hover .group-hover\\:nt-bg-severity-medium-alpha-500{background-color:var(--nv-color-severity-medium-alpha-500)}.nt-group:hover .group-hover\\:nt-opacity-0{opacity:0}.nt-group:hover .group-hover\\:nt-opacity-100{opacity:1}.nt-peer:focus-visible~.peer-focus-visible\\:nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-peer:focus-visible~.peer-focus-visible\\:nt-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.nt-peer:focus-visible~.peer-focus-visible\\:nt-ring-offset-2{--tw-ring-offset-width:2px}.data-\\[open\\=true\\]\\:nt-rotate-180[data-open=true]{--tw-rotate:180deg}.data-\\[open\\=true\\]\\:nt-rotate-180[data-open=true],.data-\\[open\\=true\\]\\:nt-transform[data-open=true]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[disabled\\]\\:nt-cursor-not-allowed[data-disabled]{cursor:not-allowed}.data-\\[checked\\]\\:nt-border-none[data-checked],.data-\\[indeterminate\\]\\:nt-border-none[data-indeterminate]{border-style:none}.data-\\[checked\\]\\:nt-bg-primary[data-checked],.data-\\[indeterminate\\]\\:nt-bg-primary[data-indeterminate]{background-color:var(--nv-color-primary)}.data-\\[checked\\]\\:nt-text-primary-foreground[data-checked]{color:var(--nv-color-primary-foreground)}.data-\\[disabled\\=true\\]\\:nt-text-foreground-alpha-400[data-disabled=true]{color:var(--nv-color-foreground-alpha-400)}.data-\\[disabled\\=true\\]\\:nt-text-foreground-alpha-600[data-disabled=true]{color:var(--nv-color-foreground-alpha-600)}.data-\\[indeterminate\\]\\:nt-text-primary-foreground[data-indeterminate]{color:var(--nv-color-primary-foreground)}.data-\\[state\\=active\\]\\:nt-text-foreground[data-state=active]{color:var(--nv-color-foreground)}.data-\\[disabled\\]\\:nt-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:after\\:nt-border-b-2[data-state=active]:after{border-bottom-width:2px;content:var(--tw-content)}.data-\\[state\\=active\\]\\:after\\:nt-border-primary[data-state=active]:after{border-color:var(--nv-color-primary);content:var(--tw-content)}.data-\\[state\\=active\\]\\:after\\:nt-opacity-100[data-state=active]:after{content:var(--tw-content);opacity:1}.\\[\\&\\:not\\(\\:first-child\\)\\]\\:nt-border-t:not(:first-child){border-top-width:1px}.\\[\\&_\\.nv-notificationList\\]\\:nt-pb-12 .nv-notificationList{padding-bottom:3rem}.\\[\\&_\\.nv-notificationList\\]\\:nt-pb-8 .nv-notificationList{padding-bottom:2rem}.\\[\\&_\\.nv-preferencesContainer\\]\\:nt-pb-12 .nv-preferencesContainer{padding-bottom:3rem}.\\[\\&_\\.nv-preferencesContainer\\]\\:nt-pb-8 .nv-preferencesContainer{padding-bottom:2rem}.\\[\\&_stop\\]\\:nt-transition-\\[stop-color\\] stop{transition-duration:.15s;transition-property:stop-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\\[\\&_svg\\]\\:nt-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:nt-shrink-0 svg{flex-shrink:0}`;
42
42
 
43
43
  // src/ui/config/appearanceKeys.ts
@@ -371,12 +371,20 @@ var linkSlackUserAppearanceKeys = [
371
371
  "linkSlackUserButtonIcon",
372
372
  "linkSlackUserButtonLabel"
373
373
  ];
374
+ var linkMsTeamsUserAppearanceKeys = [
375
+ "linkMsTeamsUserContainer",
376
+ "linkMsTeamsUserButton",
377
+ "linkMsTeamsUserButtonContainer",
378
+ "linkMsTeamsUserButtonIcon",
379
+ "linkMsTeamsUserButtonLabel"
380
+ ];
374
381
  var appearanceKeys = [
375
382
  ...commonAppearanceKeys,
376
383
  ...inboxAppearanceKeys,
377
384
  ...subscriptionAppearanceKeys,
378
385
  ...connectChatAppearanceKeys,
379
386
  ...linkSlackUserAppearanceKeys,
387
+ ...linkMsTeamsUserAppearanceKeys,
380
388
  ...channelConnectButtonAppearanceKeys
381
389
  ];
382
390
  var commonLocalization = {
@@ -1376,6 +1384,10 @@ function useLocalization() {
1376
1384
 
1377
1385
  // src/ui/context/InboxContext.tsx
1378
1386
  var InboxContext = solidJs.createContext(void 0);
1387
+ var KEYLESS_APPLICATION_IDENTIFIER_PREFIX = "pk_keyless_";
1388
+ function isKeylessApplicationIdentifier(applicationIdentifier) {
1389
+ return !!(applicationIdentifier == null ? void 0 : applicationIdentifier.startsWith(KEYLESS_APPLICATION_IDENTIFIER_PREFIX));
1390
+ }
1379
1391
  var STATUS_TO_FILTER = {
1380
1392
  ["unreadRead" /* UNREAD_READ */]: {
1381
1393
  archived: false,
@@ -1478,20 +1490,22 @@ var InboxProvider = (props) => {
1478
1490
  eventHandler: ({
1479
1491
  data
1480
1492
  }) => {
1481
- var _a2, _b2;
1493
+ var _a2;
1482
1494
  if (!data) {
1483
1495
  return;
1484
1496
  }
1485
- const identifier = window.localStorage.getItem("novu_keyless_application_identifier");
1497
+ const storedKeylessIdentifier = window.localStorage.getItem("novu_keyless_application_identifier");
1486
1498
  setHideBranding(data.removeNovuBranding);
1487
1499
  setIsDevelopmentMode(data.isDevelopmentMode);
1488
1500
  setMaxSnoozeDurationHours(data.maxSnoozeDurationHours);
1489
1501
  setContextKeys(data.contextKeys);
1490
- if (data.isDevelopmentMode && !props.applicationIdentifier) {
1491
- setIsKeyless(!data.applicationIdentifier || !!(identifier == null ? void 0 : identifier.startsWith("pk_keyless_")));
1502
+ if (!props.applicationIdentifier) {
1503
+ const keylessActive = isKeylessApplicationIdentifier(data.applicationIdentifier) || isKeylessApplicationIdentifier(storedKeylessIdentifier);
1504
+ setIsKeyless(keylessActive);
1492
1505
  setApplicationIdentifier((_a2 = data.applicationIdentifier) != null ? _a2 : null);
1493
1506
  } else {
1494
- setApplicationIdentifier((_b2 = props.applicationIdentifier) != null ? _b2 : null);
1507
+ setIsKeyless(false);
1508
+ setApplicationIdentifier(props.applicationIdentifier);
1495
1509
  }
1496
1510
  }
1497
1511
  });
@@ -1535,7 +1549,7 @@ var NovuContext = solidJs.createContext(void 0);
1535
1549
  function NovuProvider(props) {
1536
1550
  const novu = solidJs.createMemo(() => {
1537
1551
  const novuValue = typeof props.novu === "function" ? props.novu() : props.novu;
1538
- return novuValue || new chunk6I5A5OGE_js.Novu(props.options);
1552
+ return novuValue || new chunkSP44ETLM_js.Novu(props.options);
1539
1553
  });
1540
1554
  return web.createComponent(NovuContext.Provider, {
1541
1555
  value: novu,
@@ -1687,8 +1701,8 @@ var CountProvider = (props) => {
1687
1701
  const tabTags = getTagsFromTab(tab);
1688
1702
  const tabDataFilterCriteria = (_a = tab.filter) == null ? void 0 : _a.data;
1689
1703
  const tabSeverityFilterCriteria = (_b = tab.filter) == null ? void 0 : _b.severity;
1690
- const matchesTagFilter = chunk6I5A5OGE_js.checkNotificationTagFilter(notification.tags, tabTags);
1691
- const matchesDataFilterCriteria = chunk6I5A5OGE_js.checkNotificationDataFilter(notification.data, tabDataFilterCriteria);
1704
+ const matchesTagFilter = chunkSP44ETLM_js.checkNotificationTagFilter(notification.tags, tabTags);
1705
+ const matchesDataFilterCriteria = chunkSP44ETLM_js.checkNotificationDataFilter(notification.data, tabDataFilterCriteria);
1692
1706
  const matchesSeverityFilterCriteria = !tabSeverityFilterCriteria || Array.isArray(tabSeverityFilterCriteria) && tabSeverityFilterCriteria.length === 0 || Array.isArray(tabSeverityFilterCriteria) && tabSeverityFilterCriteria.includes(notification.severity) || !Array.isArray(tabSeverityFilterCriteria) && tabSeverityFilterCriteria === notification.severity;
1693
1707
  if (matchesTagFilter && matchesDataFilterCriteria && matchesSeverityFilterCriteria) {
1694
1708
  const filterKey = createKey({
@@ -1871,11 +1885,8 @@ var useChannelConnection = (options) => {
1871
1885
  return null;
1872
1886
  }
1873
1887
  }));
1874
- const connect = (args) => chunk7B52C2XE_js.__async(null, null, function* () {
1875
- setLoading(true);
1876
- const response = yield novuAccessor().channelConnections.generateOAuthUrl(args);
1877
- setLoading(false);
1878
- return response;
1888
+ const generateConnectOAuthUrl = (args) => chunk7B52C2XE_js.__async(null, null, function* () {
1889
+ return novuAccessor().channelConnections.generateConnectOAuthUrl(args);
1879
1890
  });
1880
1891
  const disconnect = (identifier) => chunk7B52C2XE_js.__async(null, null, function* () {
1881
1892
  setLoading(true);
@@ -1936,7 +1947,7 @@ var useChannelConnection = (options) => {
1936
1947
  solidJs.createEffect(() => {
1937
1948
  setLoading(connection.loading);
1938
1949
  });
1939
- return { connection, loading, mutate, refetch, connect, disconnect };
1950
+ return { connection, loading, mutate, refetch, generateConnectOAuthUrl, disconnect };
1940
1951
  };
1941
1952
  var _tmpl$ = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg fill=currentColor viewBox="0 0 24 24"><path d="M18.364 5.636 16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364">`);
1942
1953
  function Loader(props) {
@@ -2564,7 +2575,7 @@ var Footer = (props) => {
2564
2575
  });
2565
2576
  };
2566
2577
  function getCurrentDomain() {
2567
- if (chunk6I5A5OGE_js.isBrowser()) {
2578
+ if (chunkSP44ETLM_js.isBrowser()) {
2568
2579
  return window.location.hostname;
2569
2580
  }
2570
2581
  return "";
@@ -2576,7 +2587,7 @@ function getCurlCommand() {
2576
2587
  return "";
2577
2588
  }
2578
2589
  const DEFAULT_BACKEND_URL = typeof window !== "undefined" && window.NOVU_LOCAL_BACKEND_URL || "https://api.novu.co";
2579
- return `curl -X POST ${DEFAULT_BACKEND_URL}/${chunk6I5A5OGE_js.DEFAULT_API_VERSION}/events/trigger -H 'Authorization: Keyless ${identifier}' -H 'Content-Type: application/json' -d '{
2590
+ return `curl -X POST ${DEFAULT_BACKEND_URL}/${chunkSP44ETLM_js.DEFAULT_API_VERSION}/events/trigger -H 'Authorization: Keyless ${identifier}' -H 'Content-Type: application/json' -d '{
2580
2591
  "name": "hello-world",
2581
2592
  "to": {
2582
2593
  "subscriberId": "keyless-subscriber-id"
@@ -3271,7 +3282,7 @@ var useNotificationsInfiniteScroll = (props) => {
3271
3282
  );
3272
3283
  solidJs.createEffect(() => {
3273
3284
  const listener = ({ data: data2 }) => {
3274
- if (!data2 || !chunk6I5A5OGE_js.isSameFilter(filter, data2.filter)) {
3285
+ if (!data2 || !chunkSP44ETLM_js.isSameFilter(filter, data2.filter)) {
3275
3286
  return;
3276
3287
  }
3277
3288
  mutate({ data: data2.notifications, hasMore: data2.hasMore });
@@ -3281,7 +3292,7 @@ var useNotificationsInfiniteScroll = (props) => {
3281
3292
  });
3282
3293
  solidJs.createEffect(() => chunk7B52C2XE_js.__async(null, null, function* () {
3283
3294
  const newFilter = chunk7B52C2XE_js.__spreadValues({}, props.options());
3284
- if (chunk6I5A5OGE_js.isSameFilter(filter, newFilter)) {
3295
+ if (chunkSP44ETLM_js.isSameFilter(filter, newFilter)) {
3285
3296
  return;
3286
3297
  }
3287
3298
  novuAccessor().notifications.clearCache();
@@ -6774,7 +6785,7 @@ var ConnectChat = (props) => {
6774
6785
  const {
6775
6786
  connection,
6776
6787
  loading,
6777
- connect,
6788
+ generateConnectOAuthUrl: connect,
6778
6789
  disconnect
6779
6790
  } = useChannelConnection({
6780
6791
  integrationIdentifier: props.integrationIdentifier,
@@ -9415,104 +9426,122 @@ var Inbox = (props) => {
9415
9426
  }
9416
9427
  });
9417
9428
  };
9429
+ var _tmpl$88 = /* @__PURE__ */ web.template(`<svg width=16 height=16 viewBox="0 0 32 32"fill=none xmlns=http://www.w3.org/2000/svg><path fill=#7B83EB d="M16.901 10.757a4.589 4.589 0 1 0 0-9.177 4.589 4.589 0 0 0 0 9.177Z"></path><path fill=#000 d="M16.578 7.151h-4.156l.02.092.002.008.022.084a4.593 4.593 0 0 0 5.423 3.316V8.462a1.315 1.315 0 0 0-1.311-1.31Z"opacity=.1></path><path fill=#000 d="M15.593 8.135h-2.835a4.59 4.59 0 0 0 4.146 2.622V9.445a1.315 1.315 0 0 0-1.31-1.31Z"opacity=.2></path><path fill=#5059C9 d="M27.223 11.084a3.441 3.441 0 1 0 0-6.883 3.441 3.441 0 0 0 0 6.883ZM30.18 12.067h-7.73a.63.63 0 0 0-.629.63v7.973a5.035 5.035 0 0 0 3.9 4.999 4.922 4.922 0 0 0 5.933-4.814v-7.313a1.475 1.475 0 0 0-1.475-1.475Z"></path><path fill=#7B83EB d="M24.77 13.542v9.34a7.861 7.861 0 0 1-14.67 3.933 7.06 7.06 0 0 1-.49-.983 8.228 8.228 0 0 1-.325-.983 8.103 8.103 0 0 1-.246-1.966v-9.34a1.473 1.473 0 0 1 1.475-1.476h12.782a1.473 1.473 0 0 1 1.474 1.475Z"></path><path fill=#000 d="M15.593 8.135h-2.835a4.59 4.59 0 0 0 4.146 2.622V9.445a1.315 1.315 0 0 0-1.31-1.31Z"opacity=.2></path><path fill=#000 d="M17.888 12.067v12.457a1.298 1.298 0 0 1-1.023 1.269.952.952 0 0 1-.285.04H9.61a8.228 8.228 0 0 1-.325-.984 8.103 8.103 0 0 1-.246-1.966v-9.34a1.473 1.473 0 0 1 1.475-1.476h7.374Z"opacity=.1></path><path fill=#000 d="M16.905 12.067v13.44a.953.953 0 0 1-.04.286 1.298 1.298 0 0 1-1.268 1.022h-5.496a7.06 7.06 0 0 1-.492-.983 8.228 8.228 0 0 1-.324-.983 8.103 8.103 0 0 1-.246-1.966v-9.34a1.473 1.473 0 0 1 1.475-1.476h6.39Z"opacity=.2></path><path fill=#000 d="M16.905 12.067v11.474a1.314 1.314 0 0 1-1.308 1.308H9.285a8.103 8.103 0 0 1-.246-1.966v-9.34a1.473 1.473 0 0 1 1.475-1.476h6.39Z"opacity=.2></path><path fill=#000 d="M10.514 12.067a1.472 1.472 0 0 0-1.475 1.475v9.34c.001.664.084 1.324.246 1.967h5.329a1.314 1.314 0 0 0 1.307-1.308V12.067h-5.407Z"opacity=.2></path><path fill=#4B53BC d="M1.498 8.135h13.11a1.31 1.31 0 0 1 1.31 1.31v13.11a1.31 1.31 0 0 1-1.31 1.311H1.498a1.31 1.31 0 0 1-1.31-1.31V9.445a1.31 1.31 0 0 1 1.31-1.311Z"></path><path fill=#fff d="M11.967 13.027h-2.94v7.885H7.098v-7.885H4.141V11.09h7.826v1.937Z">`);
9430
+ var MsTeamsColored = (props) => {
9431
+ return (() => {
9432
+ var _el$ = _tmpl$88();
9433
+ web.spread(_el$, props, true, true);
9434
+ return _el$;
9435
+ })();
9436
+ };
9418
9437
 
9419
- // src/ui/components/slack-constants.ts
9420
- var DEFAULT_CONNECTION_IDENTIFIER = "chconn-slack-default";
9421
- var DEFAULT_INTEGRATION_IDENTIFIER = "slack";
9438
+ // src/ui/components/constants.ts
9439
+ var DEFAULT_MSTEAMS_CONNECTION_IDENTIFIER = "chconn-msteams-default";
9440
+ var DEFAULT_SLACK_CONNECTION_IDENTIFIER = "chconn-slack-default";
9441
+ function buildDefaultConnectionIdentifier(prefix, subscriberId) {
9442
+ if (!subscriberId) {
9443
+ return prefix;
9444
+ }
9445
+ return `${prefix}-${subscriberId}`;
9446
+ }
9422
9447
 
9423
- // src/ui/components/slack-connect-button/SlackConnectButton.tsx
9424
- var _tmpl$88 = /* @__PURE__ */ web.template(`<span>`);
9448
+ // src/ui/components/msteams-connect-button/MsTeamsConnectButton.tsx
9449
+ var _tmpl$89 = /* @__PURE__ */ web.template(`<span>`);
9425
9450
  var _tmpl$228 = /* @__PURE__ */ web.template(`<div>`);
9426
9451
  var _tmpl$318 = /* @__PURE__ */ web.template(`<code>context`);
9427
- var _tmpl$414 = /* @__PURE__ */ web.template(`<code>SlackConnectButton`);
9452
+ var _tmpl$414 = /* @__PURE__ */ web.template(`<code>MsTeamsConnectButton`);
9428
9453
  var _tmpl$512 = /* @__PURE__ */ web.template(`<code>NovuProvider`);
9429
9454
  var _tmpl$611 = /* @__PURE__ */ web.template(`<code>connectionMode="shared"`);
9430
- var POLL_INTERVAL_MS = 2500;
9431
- var POLL_TIMEOUT_MS = 12e4;
9432
- var SlackConnectButton = (props) => {
9455
+ var POLL_INITIAL_INTERVAL_MS = 2500;
9456
+ var POLL_MAX_INTERVAL_MS = 3e4;
9457
+ var POLL_BACKOFF_FACTOR = 1.5;
9458
+ var POLL_TIMEOUT_MS = 3e5;
9459
+ var MsTeamsConnectButton = (props) => {
9433
9460
  const style = useStyle();
9434
9461
  const novuAccessor = useNovu();
9435
- const integrationIdentifier = () => {
9462
+ const integrationIdentifier = () => props.integrationIdentifier;
9463
+ const connectionMode = () => {
9464
+ var _a;
9465
+ return (_a = props.connectionMode) != null ? _a : "subscriber";
9466
+ };
9467
+ const resolvedContext = () => {
9468
+ var _a;
9469
+ return (_a = props.context) != null ? _a : novuAccessor().context;
9470
+ };
9471
+ const resolvedSubscriberId = () => {
9436
9472
  var _a;
9437
- return (_a = props.integrationIdentifier) != null ? _a : DEFAULT_INTEGRATION_IDENTIFIER;
9473
+ return connectionMode() === "subscriber" ? (_a = props.subscriberId) != null ? _a : novuAccessor().subscriberId : void 0;
9438
9474
  };
9439
9475
  const connectionIdentifier = () => {
9440
9476
  var _a;
9441
- return (_a = props.connectionIdentifier) != null ? _a : DEFAULT_CONNECTION_IDENTIFIER;
9477
+ return (_a = props.connectionIdentifier) != null ? _a : buildDefaultConnectionIdentifier(DEFAULT_MSTEAMS_CONNECTION_IDENTIFIER, resolvedSubscriberId());
9442
9478
  };
9443
9479
  const {
9444
9480
  connection,
9445
9481
  loading,
9446
- connect,
9447
9482
  disconnect,
9448
- mutate
9483
+ mutate,
9484
+ generateConnectOAuthUrl
9449
9485
  } = useChannelConnection({
9450
9486
  integrationIdentifier: integrationIdentifier(),
9451
9487
  connectionIdentifier: connectionIdentifier(),
9452
9488
  subscriberId: props.subscriberId
9453
9489
  });
9454
9490
  const [actionLoading, setActionLoading] = solidJs.createSignal(false);
9455
- const connectionMode = () => {
9456
- var _a;
9457
- return (_a = props.connectionMode) != null ? _a : "subscriber";
9458
- };
9459
- const resolvedContext = () => {
9460
- var _a;
9461
- return (_a = props.context) != null ? _a : novuAccessor().context;
9462
- };
9463
9491
  const isMisconfigured = solidJs.createMemo(() => connectionMode() === "shared" && !resolvedContext());
9464
9492
  solidJs.createEffect(() => {
9465
9493
  if (isMisconfigured()) {
9466
- console.warn('[Novu] SlackConnectButton: "context" is required when connectionMode is "shared". Provide it via the context prop on SlackConnectButton or on NovuProvider.');
9494
+ console.warn('[Novu] MsTeamsConnectButton: "context" is required when connectionMode is "shared". Provide it via the context prop on MsTeamsConnectButton or on NovuProvider.');
9467
9495
  }
9468
9496
  });
9469
9497
  const isConnected = () => !!connection();
9470
9498
  const isLoading = () => loading() || actionLoading();
9471
- const intervalIdRef = {
9499
+ const timeoutIdRef = {
9472
9500
  current: null
9473
9501
  };
9474
9502
  solidJs.onCleanup(() => {
9475
- if (intervalIdRef.current !== null) {
9476
- clearInterval(intervalIdRef.current);
9477
- intervalIdRef.current = null;
9503
+ if (timeoutIdRef.current !== null) {
9504
+ clearTimeout(timeoutIdRef.current);
9505
+ timeoutIdRef.current = null;
9478
9506
  }
9479
9507
  });
9480
9508
  const startPolling = () => {
9481
- if (intervalIdRef.current !== null) {
9482
- clearInterval(intervalIdRef.current);
9483
- intervalIdRef.current = null;
9509
+ const connId = connectionIdentifier();
9510
+ if (timeoutIdRef.current !== null) {
9511
+ clearTimeout(timeoutIdRef.current);
9512
+ timeoutIdRef.current = null;
9484
9513
  }
9485
9514
  const startedAt = Date.now();
9486
- intervalIdRef.current = setInterval(() => chunk7B52C2XE_js.__async(null, null, function* () {
9487
- var _a, _b;
9488
- try {
9489
- const response = yield novuAccessor().channelConnections.get({
9490
- identifier: connectionIdentifier()
9491
- });
9492
- if (response.data) {
9493
- if (intervalIdRef.current !== null) {
9494
- clearInterval(intervalIdRef.current);
9495
- intervalIdRef.current = null;
9515
+ const schedulePoll = (intervalMs) => {
9516
+ timeoutIdRef.current = setTimeout(() => chunk7B52C2XE_js.__async(null, null, function* () {
9517
+ var _a, _b;
9518
+ try {
9519
+ const response = yield novuAccessor().channelConnections.get({
9520
+ identifier: connId
9521
+ });
9522
+ if (response.data) {
9523
+ timeoutIdRef.current = null;
9524
+ setActionLoading(false);
9525
+ mutate(response.data);
9526
+ (_a = props.onConnectSuccess) == null ? void 0 : _a.call(props, connId);
9527
+ return;
9496
9528
  }
9529
+ } catch (e) {
9530
+ }
9531
+ if (Date.now() - startedAt >= POLL_TIMEOUT_MS) {
9532
+ timeoutIdRef.current = null;
9497
9533
  setActionLoading(false);
9498
- mutate(response.data);
9499
- (_a = props.onConnectSuccess) == null ? void 0 : _a.call(props, connectionIdentifier());
9534
+ (_b = props.onConnectError) == null ? void 0 : _b.call(props, new Error("MS Teams OAuth timed out. Please try again."));
9500
9535
  return;
9501
9536
  }
9502
- } catch (e) {
9503
- }
9504
- if (Date.now() - startedAt >= POLL_TIMEOUT_MS) {
9505
- if (intervalIdRef.current !== null) {
9506
- clearInterval(intervalIdRef.current);
9507
- intervalIdRef.current = null;
9508
- }
9509
- setActionLoading(false);
9510
- (_b = props.onConnectError) == null ? void 0 : _b.call(props, new Error("Slack OAuth timed out. Please try again."));
9511
- }
9512
- }), POLL_INTERVAL_MS);
9537
+ const nextInterval = Math.min(intervalMs * POLL_BACKOFF_FACTOR, POLL_MAX_INTERVAL_MS);
9538
+ schedulePoll(nextInterval);
9539
+ }), intervalMs);
9540
+ };
9541
+ schedulePoll(POLL_INITIAL_INTERVAL_MS);
9513
9542
  };
9514
9543
  const handleClick = () => chunk7B52C2XE_js.__async(null, null, function* () {
9515
- var _a, _b, _c, _d, _e, _f;
9544
+ var _a, _b, _c, _d, _e, _f, _g, _h;
9516
9545
  if (isConnected()) {
9517
9546
  const identifier = (_a = connection()) == null ? void 0 : _a.identifier;
9518
9547
  if (!identifier) return;
@@ -9526,28 +9555,32 @@ var SlackConnectButton = (props) => {
9526
9555
  setActionLoading(true);
9527
9556
  const mode = connectionMode();
9528
9557
  const ctx = resolvedContext();
9529
- const resolvedSubscriberId = mode === "subscriber" ? (_d = props.subscriberId) != null ? _d : novuAccessor().subscriberId : void 0;
9530
- const result = yield connect({
9558
+ const resolvedSubscriberId2 = mode === "subscriber" ? (_d = props.subscriberId) != null ? _d : novuAccessor().subscriberId : void 0;
9559
+ const result = yield generateConnectOAuthUrl({
9531
9560
  integrationIdentifier: integrationIdentifier(),
9532
9561
  connectionIdentifier: connectionIdentifier(),
9533
- subscriberId: resolvedSubscriberId,
9562
+ subscriberId: resolvedSubscriberId2,
9534
9563
  context: ctx,
9535
9564
  scope: props.scope,
9536
- connectionMode: mode
9565
+ connectionMode: mode,
9566
+ autoLinkUser: mode === "subscriber" ? (_e = props.autoLinkUser) != null ? _e : true : false
9537
9567
  });
9538
9568
  if (result.error) {
9539
9569
  setActionLoading(false);
9540
- (_e = props.onConnectError) == null ? void 0 : _e.call(props, result.error);
9570
+ (_f = props.onConnectError) == null ? void 0 : _f.call(props, result.error);
9541
9571
  return;
9542
9572
  }
9543
- if ((_f = result.data) == null ? void 0 : _f.url) {
9573
+ if ((_g = result.data) == null ? void 0 : _g.url) {
9544
9574
  window.open(result.data.url, "_blank", "noopener,noreferrer");
9545
9575
  startPolling();
9576
+ } else {
9577
+ setActionLoading(false);
9578
+ (_h = props.onConnectError) == null ? void 0 : _h.call(props, new Error("OAuth URL was not returned. Please try again."));
9546
9579
  }
9547
9580
  }
9548
9581
  });
9549
9582
  const buttonContent = () => (() => {
9550
- var _el$ = _tmpl$88();
9583
+ var _el$ = _tmpl$89();
9551
9584
  web.insert(_el$, web.createComponent(Motion.span, {
9552
9585
  initial: {
9553
9586
  opacity: 1
@@ -9577,7 +9610,7 @@ var SlackConnectButton = (props) => {
9577
9610
  },
9578
9611
  get fallback() {
9579
9612
  return (() => {
9580
- var _el$3 = _tmpl$88();
9613
+ var _el$3 = _tmpl$89();
9581
9614
  web.insert(_el$3, web.createComponent(CheckCircleFill, {
9582
9615
  "class": "nt-size-full"
9583
9616
  }));
@@ -9605,7 +9638,7 @@ var SlackConnectButton = (props) => {
9605
9638
  });
9606
9639
  },
9607
9640
  get fallback() {
9608
- return web.createComponent(SlackColored, {
9641
+ return web.createComponent(MsTeamsColored, {
9609
9642
  get ["class"]() {
9610
9643
  return style({
9611
9644
  key: "channelConnectButtonIcon",
@@ -9619,10 +9652,10 @@ var SlackConnectButton = (props) => {
9619
9652
  });
9620
9653
  }
9621
9654
  })), (() => {
9622
- var _el$2 = _tmpl$88();
9655
+ var _el$2 = _tmpl$89();
9623
9656
  web.insert(_el$2, () => {
9624
9657
  var _a, _b;
9625
- return isConnected() ? (_a = props.connectedLabel) != null ? _a : "Connected" : (_b = props.connectLabel) != null ? _b : "Connect Slack";
9658
+ return isConnected() ? (_a = props.connectedLabel) != null ? _a : "Connected" : (_b = props.connectLabel) != null ? _b : "Connect MS Teams";
9626
9659
  });
9627
9660
  web.effect(() => web.className(_el$2, style({
9628
9661
  key: "channelConnectButtonLabel",
@@ -9747,21 +9780,103 @@ var SlackConnectButton = (props) => {
9747
9780
  }
9748
9781
  });
9749
9782
  };
9750
- var _tmpl$89 = /* @__PURE__ */ web.template(`<span>`);
9783
+ var useChannelEndpoint = (options) => {
9784
+ const novuAccessor = useNovu();
9785
+ const [loading, setLoading] = solidJs.createSignal(true);
9786
+ const [endpoint, { mutate, refetch }] = solidJs.createResource(options, (_0) => chunk7B52C2XE_js.__async(null, [_0], function* ({ endpointIdentifier }) {
9787
+ var _a;
9788
+ try {
9789
+ if (!endpointIdentifier) {
9790
+ return null;
9791
+ }
9792
+ const response = yield novuAccessor().channelEndpoints.get({
9793
+ identifier: endpointIdentifier
9794
+ });
9795
+ return (_a = response.data) != null ? _a : null;
9796
+ } catch (e) {
9797
+ return null;
9798
+ }
9799
+ }));
9800
+ const generateLinkUserOAuthUrl = (args) => chunk7B52C2XE_js.__async(null, null, function* () {
9801
+ return novuAccessor().channelEndpoints.generateLinkUserOAuthUrl(args);
9802
+ });
9803
+ const create = (args) => chunk7B52C2XE_js.__async(null, null, function* () {
9804
+ setLoading(true);
9805
+ const response = yield novuAccessor().channelEndpoints.create(args);
9806
+ if (response.data) {
9807
+ mutate(response.data);
9808
+ }
9809
+ setLoading(false);
9810
+ return response;
9811
+ });
9812
+ const remove = (identifier) => chunk7B52C2XE_js.__async(null, null, function* () {
9813
+ setLoading(true);
9814
+ const response = yield novuAccessor().channelEndpoints.delete({ identifier });
9815
+ if (!response.error) {
9816
+ mutate(null);
9817
+ }
9818
+ setLoading(false);
9819
+ return response;
9820
+ });
9821
+ solidJs.onMount(() => {
9822
+ const currentNovu = novuAccessor();
9823
+ const cleanupCreatePending = currentNovu.on("channel-endpoint.create.pending", () => {
9824
+ setLoading(true);
9825
+ });
9826
+ const cleanupCreateResolved = currentNovu.on("channel-endpoint.create.resolved", ({ data }) => {
9827
+ mutate(data != null ? data : null);
9828
+ setLoading(false);
9829
+ });
9830
+ const cleanupDeletePending = currentNovu.on("channel-endpoint.delete.pending", ({ args }) => {
9831
+ if (!args || args.identifier !== options.endpointIdentifier) {
9832
+ return;
9833
+ }
9834
+ setLoading(true);
9835
+ });
9836
+ const cleanupDeleteResolved = currentNovu.on("channel-endpoint.delete.resolved", ({ args }) => {
9837
+ if (!args || args.identifier !== options.endpointIdentifier) {
9838
+ return;
9839
+ }
9840
+ mutate(null);
9841
+ setLoading(false);
9842
+ });
9843
+ solidJs.onCleanup(() => {
9844
+ cleanupCreatePending();
9845
+ cleanupCreateResolved();
9846
+ cleanupDeletePending();
9847
+ cleanupDeleteResolved();
9848
+ });
9849
+ });
9850
+ solidJs.createEffect(() => {
9851
+ setLoading(endpoint.loading);
9852
+ });
9853
+ return { endpoint, loading, mutate, refetch, generateLinkUserOAuthUrl, create, remove };
9854
+ };
9855
+
9856
+ // src/ui/components/msteams-link-user/MsTeamsLinkUser.tsx
9857
+ var _tmpl$90 = /* @__PURE__ */ web.template(`<span>`);
9751
9858
  var _tmpl$229 = /* @__PURE__ */ web.template(`<div>`);
9752
- var POLL_INTERVAL_MS2 = 2500;
9859
+ var POLL_INTERVAL_MS = 2500;
9753
9860
  var POLL_TIMEOUT_MS2 = 12e4;
9754
- var SlackLinkUser = (props) => {
9861
+ var MsTeamsLinkUser = (props) => {
9755
9862
  const style = useStyle();
9756
9863
  const novuAccessor = useNovu();
9757
- const integrationIdentifier = () => {
9864
+ const integrationIdentifier = () => props.integrationIdentifier;
9865
+ const resolvedSubscriberId = () => {
9758
9866
  var _a;
9759
- return (_a = props.integrationIdentifier) != null ? _a : DEFAULT_INTEGRATION_IDENTIFIER;
9867
+ return (_a = props.subscriberId) != null ? _a : novuAccessor().subscriberId;
9760
9868
  };
9761
9869
  const connectionIdentifier = () => {
9762
9870
  var _a;
9763
- return (_a = props.connectionIdentifier) != null ? _a : DEFAULT_CONNECTION_IDENTIFIER;
9871
+ return (_a = props.connectionIdentifier) != null ? _a : buildDefaultConnectionIdentifier(DEFAULT_MSTEAMS_CONNECTION_IDENTIFIER, resolvedSubscriberId());
9764
9872
  };
9873
+ const {
9874
+ generateLinkUserOAuthUrl
9875
+ } = useChannelEndpoint({
9876
+ integrationIdentifier: integrationIdentifier(),
9877
+ connectionIdentifier: connectionIdentifier(),
9878
+ subscriberId: props.subscriberId
9879
+ });
9765
9880
  const [endpoint, setEndpoint] = solidJs.createSignal(null);
9766
9881
  const [loading, setLoading] = solidJs.createSignal(true);
9767
9882
  const [actionLoading, setActionLoading] = solidJs.createSignal(false);
@@ -9785,7 +9900,7 @@ var SlackLinkUser = (props) => {
9785
9900
  integrationIdentifier: intId,
9786
9901
  connectionIdentifier: connId
9787
9902
  });
9788
- const existing = (_b = (_a = response.data) == null ? void 0 : _a.find((ep) => ep.type === "slack_user")) != null ? _b : null;
9903
+ const existing = (_b = (_a = response.data) == null ? void 0 : _a.find((ep) => ep.type === "ms_teams_user")) != null ? _b : null;
9789
9904
  setEndpoint(existing);
9790
9905
  } catch (e) {
9791
9906
  setEndpoint(null);
@@ -9816,7 +9931,7 @@ var SlackLinkUser = (props) => {
9816
9931
  integrationIdentifier: integrationIdentifier(),
9817
9932
  connectionIdentifier: connectionIdentifier()
9818
9933
  });
9819
- const found = (_b = (_a = response.data) == null ? void 0 : _a.find((ep) => ep.type === "slack_user")) != null ? _b : null;
9934
+ const found = (_b = (_a = response.data) == null ? void 0 : _a.find((ep) => ep.type === "ms_teams_user")) != null ? _b : null;
9820
9935
  if (found) {
9821
9936
  clearInterval(pollingIntervalId);
9822
9937
  setActionLoading(false);
@@ -9831,12 +9946,12 @@ var SlackLinkUser = (props) => {
9831
9946
  if (Date.now() - startedAt >= POLL_TIMEOUT_MS2) {
9832
9947
  clearInterval(pollingIntervalId);
9833
9948
  setActionLoading(false);
9834
- (_d = props.onLinkError) == null ? void 0 : _d.call(props, new Error("Slack OAuth timed out. Please try again."));
9949
+ (_d = props.onLinkError) == null ? void 0 : _d.call(props, new Error("MS Teams OAuth timed out. Please try again."));
9835
9950
  }
9836
- }), POLL_INTERVAL_MS2);
9951
+ }), POLL_INTERVAL_MS);
9837
9952
  };
9838
9953
  const handleClick = () => chunk7B52C2XE_js.__async(null, null, function* () {
9839
- var _a, _b, _c, _d, _e, _f;
9954
+ var _a, _b, _c, _d, _e, _f, _g, _h;
9840
9955
  if (isLinked()) {
9841
9956
  const identifier = (_a = endpoint()) == null ? void 0 : _a.identifier;
9842
9957
  if (!identifier) return;
@@ -9852,23 +9967,29 @@ var SlackLinkUser = (props) => {
9852
9967
  (_c = props.onUnlinkSuccess) == null ? void 0 : _c.call(props);
9853
9968
  }
9854
9969
  } else {
9970
+ const resolvedSubscriberId2 = (_d = props.subscriberId) != null ? _d : novuAccessor().subscriberId;
9971
+ if (!resolvedSubscriberId2) {
9972
+ (_e = props.onLinkError) == null ? void 0 : _e.call(props, new Error("subscriberId is required to link an MS Teams user"));
9973
+ return;
9974
+ }
9855
9975
  setActionLoading(true);
9856
- const result = yield novuAccessor().channelConnections.generateOAuthUrl({
9976
+ const result = yield generateLinkUserOAuthUrl({
9857
9977
  integrationIdentifier: integrationIdentifier(),
9858
9978
  connectionIdentifier: connectionIdentifier(),
9859
- subscriberId: (_d = props.subscriberId) != null ? _d : novuAccessor().subscriberId,
9860
- context: props.context,
9861
- mode: "link_user",
9862
- userScope: ["identity.basic"]
9979
+ subscriberId: resolvedSubscriberId2,
9980
+ context: props.context
9863
9981
  });
9864
9982
  if (result.error) {
9865
9983
  setActionLoading(false);
9866
- (_e = props.onLinkError) == null ? void 0 : _e.call(props, result.error);
9984
+ (_f = props.onLinkError) == null ? void 0 : _f.call(props, result.error);
9867
9985
  return;
9868
9986
  }
9869
- if ((_f = result.data) == null ? void 0 : _f.url) {
9987
+ if ((_g = result.data) == null ? void 0 : _g.url) {
9870
9988
  window.open(result.data.url, "_blank", "noopener,noreferrer");
9871
9989
  startPolling();
9990
+ } else {
9991
+ setActionLoading(false);
9992
+ (_h = props.onLinkError) == null ? void 0 : _h.call(props, new Error("OAuth URL was not returned. Please try again."));
9872
9993
  }
9873
9994
  }
9874
9995
  });
@@ -9877,7 +9998,7 @@ var SlackLinkUser = (props) => {
9877
9998
  web.insert(_el$, web.createComponent(Button, {
9878
9999
  get ["class"]() {
9879
10000
  return style({
9880
- key: "linkSlackUserButton",
10001
+ key: "linkMsTeamsUserButton",
9881
10002
  className: "nt-transition-[width] nt-duration-800 nt-will-change-[width]",
9882
10003
  context: {
9883
10004
  linked: isLinked()
@@ -9890,7 +10011,7 @@ var SlackLinkUser = (props) => {
9890
10011
  return isLoading();
9891
10012
  },
9892
10013
  get children() {
9893
- var _el$2 = _tmpl$89();
10014
+ var _el$2 = _tmpl$90();
9894
10015
  web.insert(_el$2, web.createComponent(Motion.span, {
9895
10016
  initial: {
9896
10017
  opacity: 1
@@ -9915,7 +10036,7 @@ var SlackLinkUser = (props) => {
9915
10036
  iconKey: "channelConnect",
9916
10037
  get ["class"]() {
9917
10038
  return style({
9918
- key: "linkSlackUserButtonIcon",
10039
+ key: "linkMsTeamsUserButtonIcon",
9919
10040
  className: "nt-size-4 nt-shrink-0",
9920
10041
  iconKey: "channelConnect",
9921
10042
  context: {
@@ -9924,10 +10045,10 @@ var SlackLinkUser = (props) => {
9924
10045
  });
9925
10046
  },
9926
10047
  get fallback() {
9927
- return web.createComponent(SlackColored, {
10048
+ return web.createComponent(MsTeamsColored, {
9928
10049
  get ["class"]() {
9929
10050
  return style({
9930
- key: "linkSlackUserButtonIcon",
10051
+ key: "linkMsTeamsUserButtonIcon",
9931
10052
  className: "nt-size-4 nt-shrink-0",
9932
10053
  iconKey: "channelConnect",
9933
10054
  context: {
@@ -9944,7 +10065,7 @@ var SlackLinkUser = (props) => {
9944
10065
  iconKey: "channelConnected",
9945
10066
  get ["class"]() {
9946
10067
  return style({
9947
- key: "linkSlackUserButtonIcon",
10068
+ key: "linkMsTeamsUserButtonIcon",
9948
10069
  className: "nt-inline-flex nt-items-center nt-justify-center nt-size-4 nt-shrink-0 nt-rounded-full nt-bg-white nt-shadow-[0_1px_2px_0_rgba(10,13,20,0.03)]",
9949
10070
  iconKey: "channelConnected",
9950
10071
  context: {
@@ -9954,12 +10075,12 @@ var SlackLinkUser = (props) => {
9954
10075
  },
9955
10076
  get fallback() {
9956
10077
  return (() => {
9957
- var _el$4 = _tmpl$89();
10078
+ var _el$4 = _tmpl$90();
9958
10079
  web.insert(_el$4, web.createComponent(CheckCircleFill, {
9959
10080
  "class": "nt-size-full"
9960
10081
  }));
9961
10082
  web.effect(() => web.className(_el$4, style({
9962
- key: "linkSlackUserButtonIcon",
10083
+ key: "linkMsTeamsUserButtonIcon",
9963
10084
  className: "nt-inline-flex nt-items-center nt-justify-center nt-size-4 nt-shrink-0 nt-rounded-full nt-bg-white nt-shadow-[0_1px_2px_0_rgba(10,13,20,0.03)]",
9964
10085
  iconKey: "channelConnected",
9965
10086
  context: {
@@ -9972,13 +10093,13 @@ var SlackLinkUser = (props) => {
9972
10093
  });
9973
10094
  }
9974
10095
  }), (() => {
9975
- var _el$3 = _tmpl$89();
10096
+ var _el$3 = _tmpl$90();
9976
10097
  web.insert(_el$3, () => {
9977
10098
  var _a, _b;
9978
- return isLinked() ? (_a = props.unlinkLabel) != null ? _a : "Unlink" : (_b = props.linkLabel) != null ? _b : "Link User";
10099
+ return isLinked() ? (_a = props.unlinkLabel) != null ? _a : "Unlink" : (_b = props.linkLabel) != null ? _b : "Link Teams User";
9979
10100
  });
9980
10101
  web.effect(() => web.className(_el$3, style({
9981
- key: "linkSlackUserButtonLabel",
10102
+ key: "linkMsTeamsUserButtonLabel",
9982
10103
  className: "[line-height:16px]",
9983
10104
  context: {
9984
10105
  linked: isLinked()
@@ -10009,7 +10130,7 @@ var SlackLinkUser = (props) => {
10009
10130
  }
10010
10131
  }), null);
10011
10132
  web.effect(() => web.className(_el$2, style({
10012
- key: "linkSlackUserButtonContainer",
10133
+ key: "linkMsTeamsUserButtonContainer",
10013
10134
  className: "nt-relative nt-overflow-hidden nt-inline-flex nt-items-center nt-justify-center nt-gap-1",
10014
10135
  context: {
10015
10136
  linked: isLinked()
@@ -10019,7 +10140,7 @@ var SlackLinkUser = (props) => {
10019
10140
  }
10020
10141
  }));
10021
10142
  web.effect(() => web.className(_el$, style({
10022
- key: "linkSlackUserContainer",
10143
+ key: "linkMsTeamsUserContainer",
10023
10144
  className: "nt-flex nt-items-center nt-gap-2",
10024
10145
  context: {
10025
10146
  linked: isLinked()
@@ -10028,69 +10149,697 @@ var SlackLinkUser = (props) => {
10028
10149
  return _el$;
10029
10150
  })();
10030
10151
  };
10031
- var useSubscription = (options) => {
10152
+ var _tmpl$91 = /* @__PURE__ */ web.template(`<span>`);
10153
+ var _tmpl$230 = /* @__PURE__ */ web.template(`<div>`);
10154
+ var _tmpl$319 = /* @__PURE__ */ web.template(`<code>context`);
10155
+ var _tmpl$415 = /* @__PURE__ */ web.template(`<code>SlackConnectButton`);
10156
+ var _tmpl$513 = /* @__PURE__ */ web.template(`<code>NovuProvider`);
10157
+ var _tmpl$612 = /* @__PURE__ */ web.template(`<code>connectionMode="shared"`);
10158
+ var POLL_INTERVAL_MS2 = 2500;
10159
+ var POLL_TIMEOUT_MS3 = 12e4;
10160
+ var SlackConnectButton = (props) => {
10161
+ const style = useStyle();
10032
10162
  const novuAccessor = useNovu();
10033
- const identifier = () => {
10163
+ const integrationIdentifier = () => props.integrationIdentifier;
10164
+ const connectionMode = () => {
10034
10165
  var _a;
10035
- const subscriberId = novuAccessor().subscriberId;
10036
- const contextKey = novuAccessor().contextKey;
10037
- return (_a = options.identifier) != null ? _a : chunkWDGG3OER_js.buildSubscriptionIdentifier({ topicKey: options.topicKey, subscriberId, contextKey });
10166
+ return (_a = props.connectionMode) != null ? _a : "subscriber";
10038
10167
  };
10039
- const [loading, setLoading] = solidJs.createSignal(true);
10040
- const [subscription, { mutate, refetch }] = solidJs.createResource(
10041
- options || {},
10042
- (_0) => chunk7B52C2XE_js.__async(null, [_0], function* ({ topicKey, identifier: identifier2, workflowIds, tags }) {
10043
- try {
10044
- const response = yield novuAccessor().subscriptions.get({
10045
- topicKey,
10046
- identifier: identifier2,
10047
- workflowIds,
10048
- tags
10049
- });
10050
- return response.data;
10051
- } catch (error) {
10052
- console.error("Error fetching subscription:", error);
10053
- throw error;
10054
- }
10055
- })
10056
- );
10057
- const create = (args) => chunk7B52C2XE_js.__async(null, null, function* () {
10058
- setLoading(true);
10059
- const response = yield novuAccessor().subscriptions.create(args);
10060
- if (response.data) {
10061
- mutate(response.data);
10168
+ const resolvedContext = () => {
10169
+ var _a;
10170
+ return (_a = props.context) != null ? _a : novuAccessor().context;
10171
+ };
10172
+ const resolvedSubscriberId = () => {
10173
+ var _a;
10174
+ return connectionMode() === "subscriber" ? (_a = props.subscriberId) != null ? _a : novuAccessor().subscriberId : void 0;
10175
+ };
10176
+ const connectionIdentifier = () => {
10177
+ var _a;
10178
+ return (_a = props.connectionIdentifier) != null ? _a : buildDefaultConnectionIdentifier(DEFAULT_SLACK_CONNECTION_IDENTIFIER, resolvedSubscriberId());
10179
+ };
10180
+ const {
10181
+ connection,
10182
+ loading,
10183
+ disconnect,
10184
+ mutate,
10185
+ generateConnectOAuthUrl
10186
+ } = useChannelConnection({
10187
+ integrationIdentifier: integrationIdentifier(),
10188
+ connectionIdentifier: connectionIdentifier(),
10189
+ subscriberId: props.subscriberId
10190
+ });
10191
+ const [actionLoading, setActionLoading] = solidJs.createSignal(false);
10192
+ const isMisconfigured = solidJs.createMemo(() => connectionMode() === "shared" && !resolvedContext());
10193
+ solidJs.createEffect(() => {
10194
+ if (isMisconfigured()) {
10195
+ console.warn('[Novu] SlackConnectButton: "context" is required when connectionMode is "shared". Provide it via the context prop on SlackConnectButton or on NovuProvider.');
10062
10196
  }
10063
- setLoading(false);
10064
- return response;
10065
10197
  });
10066
- const remove = (args) => chunk7B52C2XE_js.__async(null, null, function* () {
10067
- setLoading(true);
10068
- const response = "subscription" in args ? yield novuAccessor().subscriptions.delete({ subscription: args.subscription }) : yield novuAccessor().subscriptions.delete({ topicKey: args.topicKey, subscriptionId: args.subscriptionId });
10069
- mutate(null);
10070
- setLoading(false);
10071
- return response;
10198
+ const isConnected = () => !!connection();
10199
+ const isLoading = () => loading() || actionLoading();
10200
+ const intervalIdRef = {
10201
+ current: null
10202
+ };
10203
+ solidJs.onCleanup(() => {
10204
+ if (intervalIdRef.current !== null) {
10205
+ clearInterval(intervalIdRef.current);
10206
+ intervalIdRef.current = null;
10207
+ }
10072
10208
  });
10073
- solidJs.onMount(() => {
10074
- const listener = ({ data }) => {
10075
- if (!data || data.topicKey !== options.topicKey || data.identifier !== identifier()) {
10076
- return;
10077
- }
10078
- mutate(data);
10079
- setLoading(false);
10080
- };
10081
- const currentNovu = novuAccessor();
10082
- const cleanupCreatePending = currentNovu.on("subscription.create.pending", ({ args }) => {
10083
- if (!args || args.topicKey !== options.topicKey || args.identifier !== identifier()) {
10084
- return;
10085
- }
10086
- setLoading(true);
10087
- });
10088
- const cleanupCreate = currentNovu.on("subscription.create.resolved", listener);
10089
- const cleanupUpdate = currentNovu.on("subscription.update.resolved", listener);
10090
- const cleanupDeletePending = currentNovu.on("subscription.delete.pending", ({ args }) => {
10091
- var _a, _b;
10092
- const subscriptionId = (_a = subscription()) == null ? void 0 : _a.id;
10093
- const subscriptionIdentifier = (_b = subscription()) == null ? void 0 : _b.identifier;
10209
+ const startPolling = () => {
10210
+ const connId = connectionIdentifier();
10211
+ if (intervalIdRef.current !== null) {
10212
+ clearInterval(intervalIdRef.current);
10213
+ intervalIdRef.current = null;
10214
+ }
10215
+ const startedAt = Date.now();
10216
+ intervalIdRef.current = setInterval(() => chunk7B52C2XE_js.__async(null, null, function* () {
10217
+ var _a, _b;
10218
+ try {
10219
+ const response = yield novuAccessor().channelConnections.get({
10220
+ identifier: connId
10221
+ });
10222
+ if (response.data) {
10223
+ if (intervalIdRef.current !== null) {
10224
+ clearInterval(intervalIdRef.current);
10225
+ intervalIdRef.current = null;
10226
+ }
10227
+ setActionLoading(false);
10228
+ mutate(response.data);
10229
+ (_a = props.onConnectSuccess) == null ? void 0 : _a.call(props, connId);
10230
+ return;
10231
+ }
10232
+ } catch (e) {
10233
+ }
10234
+ if (Date.now() - startedAt >= POLL_TIMEOUT_MS3) {
10235
+ if (intervalIdRef.current !== null) {
10236
+ clearInterval(intervalIdRef.current);
10237
+ intervalIdRef.current = null;
10238
+ }
10239
+ setActionLoading(false);
10240
+ (_b = props.onConnectError) == null ? void 0 : _b.call(props, new Error("Slack OAuth timed out. Please try again."));
10241
+ }
10242
+ }), POLL_INTERVAL_MS2);
10243
+ };
10244
+ const handleClick = () => chunk7B52C2XE_js.__async(null, null, function* () {
10245
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10246
+ if (isConnected()) {
10247
+ const identifier = (_a = connection()) == null ? void 0 : _a.identifier;
10248
+ if (!identifier) return;
10249
+ const result = yield disconnect(identifier);
10250
+ if (result.error) {
10251
+ (_b = props.onDisconnectError) == null ? void 0 : _b.call(props, result.error);
10252
+ } else {
10253
+ (_c = props.onDisconnectSuccess) == null ? void 0 : _c.call(props);
10254
+ }
10255
+ } else {
10256
+ setActionLoading(true);
10257
+ const mode = connectionMode();
10258
+ const ctx = resolvedContext();
10259
+ const resolvedSubscriberId2 = mode === "subscriber" ? (_d = props.subscriberId) != null ? _d : novuAccessor().subscriberId : void 0;
10260
+ const result = yield generateConnectOAuthUrl({
10261
+ integrationIdentifier: integrationIdentifier(),
10262
+ connectionIdentifier: connectionIdentifier(),
10263
+ subscriberId: resolvedSubscriberId2,
10264
+ context: ctx,
10265
+ scope: props.scope,
10266
+ connectionMode: mode,
10267
+ autoLinkUser: mode === "subscriber" ? (_e = props.autoLinkUser) != null ? _e : true : false
10268
+ });
10269
+ if (result.error) {
10270
+ setActionLoading(false);
10271
+ (_f = props.onConnectError) == null ? void 0 : _f.call(props, result.error);
10272
+ return;
10273
+ }
10274
+ if ((_g = result.data) == null ? void 0 : _g.url) {
10275
+ window.open(result.data.url, "_blank", "noopener,noreferrer");
10276
+ startPolling();
10277
+ } else {
10278
+ setActionLoading(false);
10279
+ (_h = props.onConnectError) == null ? void 0 : _h.call(props, new Error("OAuth URL was not returned. Please try again."));
10280
+ }
10281
+ }
10282
+ });
10283
+ const buttonContent = () => (() => {
10284
+ var _el$ = _tmpl$91();
10285
+ web.insert(_el$, web.createComponent(Motion.span, {
10286
+ initial: {
10287
+ opacity: 1
10288
+ },
10289
+ get animate() {
10290
+ return {
10291
+ opacity: actionLoading() ? 0 : 1
10292
+ };
10293
+ },
10294
+ transition: {
10295
+ easing: "ease-in-out",
10296
+ duration: 0.2
10297
+ },
10298
+ "class": "nt-inline-flex nt-items-center nt-gap-1",
10299
+ get children() {
10300
+ return [web.memo(() => web.memo(() => !!isConnected())() ? web.createComponent(IconRendererWrapper, {
10301
+ iconKey: "channelConnected",
10302
+ get ["class"]() {
10303
+ return style({
10304
+ key: "channelConnectButtonIcon",
10305
+ className: "nt-inline-flex nt-items-center nt-justify-center nt-size-4 nt-shrink-0 nt-rounded-full nt-bg-white nt-shadow-[0_1px_2px_0_rgba(10,13,20,0.03)]",
10306
+ iconKey: "channelConnected",
10307
+ context: {
10308
+ connected: true
10309
+ }
10310
+ });
10311
+ },
10312
+ get fallback() {
10313
+ return (() => {
10314
+ var _el$3 = _tmpl$91();
10315
+ web.insert(_el$3, web.createComponent(CheckCircleFill, {
10316
+ "class": "nt-size-full"
10317
+ }));
10318
+ web.effect(() => web.className(_el$3, style({
10319
+ key: "channelConnectButtonIcon",
10320
+ className: "nt-inline-flex nt-items-center nt-justify-center nt-size-4 nt-shrink-0 nt-rounded-full nt-bg-white nt-shadow-[0_1px_2px_0_rgba(10,13,20,0.03)]",
10321
+ iconKey: "channelConnected",
10322
+ context: {
10323
+ connected: true
10324
+ }
10325
+ })));
10326
+ return _el$3;
10327
+ })();
10328
+ }
10329
+ }) : web.createComponent(IconRendererWrapper, {
10330
+ iconKey: "channelConnect",
10331
+ get ["class"]() {
10332
+ return style({
10333
+ key: "channelConnectButtonIcon",
10334
+ className: "nt-size-4 nt-shrink-0",
10335
+ iconKey: "channelConnect",
10336
+ context: {
10337
+ connected: false
10338
+ }
10339
+ });
10340
+ },
10341
+ get fallback() {
10342
+ return web.createComponent(SlackColored, {
10343
+ get ["class"]() {
10344
+ return style({
10345
+ key: "channelConnectButtonIcon",
10346
+ className: "nt-size-4 nt-shrink-0",
10347
+ iconKey: "channelConnect",
10348
+ context: {
10349
+ connected: false
10350
+ }
10351
+ });
10352
+ }
10353
+ });
10354
+ }
10355
+ })), (() => {
10356
+ var _el$2 = _tmpl$91();
10357
+ web.insert(_el$2, () => {
10358
+ var _a, _b;
10359
+ return isConnected() ? (_a = props.connectedLabel) != null ? _a : "Connected" : (_b = props.connectLabel) != null ? _b : "Connect Slack";
10360
+ });
10361
+ web.effect(() => web.className(_el$2, style({
10362
+ key: "channelConnectButtonLabel",
10363
+ className: "[line-height:16px]",
10364
+ context: {
10365
+ connected: isConnected()
10366
+ }
10367
+ })));
10368
+ return _el$2;
10369
+ })()];
10370
+ }
10371
+ }), null);
10372
+ web.insert(_el$, web.createComponent(Motion.span, {
10373
+ initial: {
10374
+ opacity: 0
10375
+ },
10376
+ get animate() {
10377
+ return {
10378
+ opacity: actionLoading() ? 1 : 0
10379
+ };
10380
+ },
10381
+ transition: {
10382
+ easing: "ease-in-out",
10383
+ duration: 0.2
10384
+ },
10385
+ "class": "nt-absolute nt-left-0 nt-inline-flex nt-items-center",
10386
+ get children() {
10387
+ return web.createComponent(Loader, {
10388
+ "class": "nt-text-foreground-alpha-600 nt-size-3.5 nt-animate-spin"
10389
+ });
10390
+ }
10391
+ }), null);
10392
+ web.effect(() => web.className(_el$, style({
10393
+ key: "channelConnectButtonInner",
10394
+ className: "nt-relative nt-overflow-hidden nt-inline-flex nt-items-center nt-justify-center nt-gap-1",
10395
+ context: {
10396
+ connected: isConnected()
10397
+ }
10398
+ })));
10399
+ return _el$;
10400
+ })();
10401
+ return web.createComponent(solidJs.Show, {
10402
+ get when() {
10403
+ return !loading();
10404
+ },
10405
+ get fallback() {
10406
+ return web.createComponent(Loader, {
10407
+ "class": "nt-text-foreground-alpha-600 nt-size-4 nt-animate-spin"
10408
+ });
10409
+ },
10410
+ get children() {
10411
+ var _el$4 = _tmpl$230();
10412
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
10413
+ get when() {
10414
+ return !isMisconfigured();
10415
+ },
10416
+ get fallback() {
10417
+ return web.createComponent(Tooltip.Root, {
10418
+ get children() {
10419
+ return [web.createComponent(Tooltip.Trigger, {
10420
+ asChild: (triggerProps) => web.createComponent(Button, web.mergeProps({
10421
+ get ["class"]() {
10422
+ return style({
10423
+ key: "channelConnectButton",
10424
+ className: "nt-transition-[width] nt-duration-800 nt-will-change-[width] !nt-pointer-events-auto",
10425
+ context: {
10426
+ connected: false
10427
+ }
10428
+ });
10429
+ },
10430
+ variant: "secondary",
10431
+ disabled: true
10432
+ }, triggerProps, {
10433
+ get children() {
10434
+ return buttonContent();
10435
+ }
10436
+ }))
10437
+ }), web.createComponent(Tooltip.Content, {
10438
+ get ["class"]() {
10439
+ return style({
10440
+ key: "channelConnectButtonMisconfiguredTooltip",
10441
+ className: "nt-bg-foreground nt-p-2 nt-shadow-tooltip nt-rounded-lg nt-text-background nt-text-xs nt-max-w-[220px]"
10442
+ });
10443
+ },
10444
+ get children() {
10445
+ return ["Missing context \u2014 provide a ", _tmpl$319(), " prop on ", _tmpl$415(), " or", " ", _tmpl$513(), " when using ", _tmpl$612()];
10446
+ }
10447
+ })];
10448
+ }
10449
+ });
10450
+ },
10451
+ get children() {
10452
+ return web.createComponent(Button, {
10453
+ get ["class"]() {
10454
+ return style({
10455
+ key: "channelConnectButton",
10456
+ className: "nt-transition-[width] nt-duration-800 nt-will-change-[width]",
10457
+ context: {
10458
+ connected: isConnected()
10459
+ }
10460
+ });
10461
+ },
10462
+ variant: "secondary",
10463
+ onClick: handleClick,
10464
+ get disabled() {
10465
+ return isLoading();
10466
+ },
10467
+ get children() {
10468
+ return buttonContent();
10469
+ }
10470
+ });
10471
+ }
10472
+ }));
10473
+ web.effect(() => web.className(_el$4, style({
10474
+ key: "channelConnectButtonContainer",
10475
+ className: "nt-flex nt-items-center nt-gap-2",
10476
+ context: {
10477
+ connected: isConnected()
10478
+ }
10479
+ })));
10480
+ return _el$4;
10481
+ }
10482
+ });
10483
+ };
10484
+ var _tmpl$92 = /* @__PURE__ */ web.template(`<span>`);
10485
+ var _tmpl$231 = /* @__PURE__ */ web.template(`<div>`);
10486
+ var POLL_INTERVAL_MS3 = 2500;
10487
+ var POLL_TIMEOUT_MS4 = 12e4;
10488
+ var SlackLinkUser = (props) => {
10489
+ const style = useStyle();
10490
+ const novuAccessor = useNovu();
10491
+ const integrationIdentifier = () => props.integrationIdentifier;
10492
+ const resolvedSubscriberId = () => {
10493
+ var _a;
10494
+ return (_a = props.subscriberId) != null ? _a : novuAccessor().subscriberId;
10495
+ };
10496
+ const connectionIdentifier = () => {
10497
+ var _a;
10498
+ return (_a = props.connectionIdentifier) != null ? _a : buildDefaultConnectionIdentifier(DEFAULT_SLACK_CONNECTION_IDENTIFIER, resolvedSubscriberId());
10499
+ };
10500
+ const {
10501
+ generateLinkUserOAuthUrl
10502
+ } = useChannelEndpoint({
10503
+ integrationIdentifier: integrationIdentifier(),
10504
+ connectionIdentifier: connectionIdentifier(),
10505
+ subscriberId: props.subscriberId
10506
+ });
10507
+ const [endpoint, setEndpoint] = solidJs.createSignal(null);
10508
+ const [loading, setLoading] = solidJs.createSignal(true);
10509
+ const [actionLoading, setActionLoading] = solidJs.createSignal(false);
10510
+ let pollingIntervalId;
10511
+ solidJs.onCleanup(() => {
10512
+ clearInterval(pollingIntervalId);
10513
+ });
10514
+ const isLinked = () => !!endpoint();
10515
+ const isLoading = () => loading() || actionLoading();
10516
+ solidJs.createResource(() => ({
10517
+ integrationIdentifier: integrationIdentifier(),
10518
+ connectionIdentifier: connectionIdentifier()
10519
+ }), (_0) => chunk7B52C2XE_js.__async(null, [_0], function* ({
10520
+ integrationIdentifier: intId,
10521
+ connectionIdentifier: connId
10522
+ }) {
10523
+ var _a, _b;
10524
+ setLoading(true);
10525
+ try {
10526
+ const response = yield novuAccessor().channelEndpoints.list({
10527
+ integrationIdentifier: intId,
10528
+ connectionIdentifier: connId
10529
+ });
10530
+ const existing = (_b = (_a = response.data) == null ? void 0 : _a.find((ep) => ep.type === "slack_user")) != null ? _b : null;
10531
+ setEndpoint(existing);
10532
+ } catch (e) {
10533
+ setEndpoint(null);
10534
+ } finally {
10535
+ setLoading(false);
10536
+ }
10537
+ }));
10538
+ solidJs.onMount(() => {
10539
+ const currentNovu = novuAccessor();
10540
+ const cleanupDelete = currentNovu.on("channel-endpoint.delete.resolved", ({
10541
+ args
10542
+ }) => {
10543
+ var _a;
10544
+ if ((args == null ? void 0 : args.identifier) && args.identifier === ((_a = endpoint()) == null ? void 0 : _a.identifier)) {
10545
+ setEndpoint(null);
10546
+ }
10547
+ });
10548
+ solidJs.onCleanup(() => {
10549
+ cleanupDelete();
10550
+ });
10551
+ });
10552
+ const startPolling = () => {
10553
+ const startedAt = Date.now();
10554
+ pollingIntervalId = setInterval(() => chunk7B52C2XE_js.__async(null, null, function* () {
10555
+ var _a, _b, _c, _d;
10556
+ try {
10557
+ const response = yield novuAccessor().channelEndpoints.list({
10558
+ integrationIdentifier: integrationIdentifier(),
10559
+ connectionIdentifier: connectionIdentifier()
10560
+ });
10561
+ const found = (_b = (_a = response.data) == null ? void 0 : _a.find((ep) => ep.type === "slack_user")) != null ? _b : null;
10562
+ if (found) {
10563
+ clearInterval(pollingIntervalId);
10564
+ setActionLoading(false);
10565
+ setEndpoint(found);
10566
+ (_c = props.onLinkSuccess) == null ? void 0 : _c.call(props, {
10567
+ identifier: found.identifier
10568
+ });
10569
+ return;
10570
+ }
10571
+ } catch (e) {
10572
+ }
10573
+ if (Date.now() - startedAt >= POLL_TIMEOUT_MS4) {
10574
+ clearInterval(pollingIntervalId);
10575
+ setActionLoading(false);
10576
+ (_d = props.onLinkError) == null ? void 0 : _d.call(props, new Error("Slack OAuth timed out. Please try again."));
10577
+ }
10578
+ }), POLL_INTERVAL_MS3);
10579
+ };
10580
+ const handleClick = () => chunk7B52C2XE_js.__async(null, null, function* () {
10581
+ var _a, _b, _c, _d, _e, _f, _g, _h;
10582
+ if (isLinked()) {
10583
+ const identifier = (_a = endpoint()) == null ? void 0 : _a.identifier;
10584
+ if (!identifier) return;
10585
+ setActionLoading(true);
10586
+ const result = yield novuAccessor().channelEndpoints.delete({
10587
+ identifier
10588
+ });
10589
+ setActionLoading(false);
10590
+ if (result.error) {
10591
+ (_b = props.onUnlinkError) == null ? void 0 : _b.call(props, result.error);
10592
+ } else {
10593
+ setEndpoint(null);
10594
+ (_c = props.onUnlinkSuccess) == null ? void 0 : _c.call(props);
10595
+ }
10596
+ } else {
10597
+ const resolvedSubscriberId2 = (_d = props.subscriberId) != null ? _d : novuAccessor().subscriberId;
10598
+ if (!resolvedSubscriberId2) {
10599
+ (_e = props.onLinkError) == null ? void 0 : _e.call(props, new Error("subscriberId is required to link a Slack user"));
10600
+ return;
10601
+ }
10602
+ setActionLoading(true);
10603
+ const result = yield generateLinkUserOAuthUrl({
10604
+ integrationIdentifier: integrationIdentifier(),
10605
+ connectionIdentifier: connectionIdentifier(),
10606
+ subscriberId: resolvedSubscriberId2,
10607
+ context: props.context,
10608
+ userScope: ["identity.basic"]
10609
+ });
10610
+ if (result.error) {
10611
+ setActionLoading(false);
10612
+ (_f = props.onLinkError) == null ? void 0 : _f.call(props, result.error);
10613
+ return;
10614
+ }
10615
+ if ((_g = result.data) == null ? void 0 : _g.url) {
10616
+ window.open(result.data.url, "_blank", "noopener,noreferrer");
10617
+ startPolling();
10618
+ } else {
10619
+ setActionLoading(false);
10620
+ (_h = props.onLinkError) == null ? void 0 : _h.call(props, new Error("OAuth URL was not returned. Please try again."));
10621
+ }
10622
+ }
10623
+ });
10624
+ return (() => {
10625
+ var _el$ = _tmpl$231();
10626
+ web.insert(_el$, web.createComponent(Button, {
10627
+ get ["class"]() {
10628
+ return style({
10629
+ key: "linkSlackUserButton",
10630
+ className: "nt-transition-[width] nt-duration-800 nt-will-change-[width]",
10631
+ context: {
10632
+ linked: isLinked()
10633
+ }
10634
+ });
10635
+ },
10636
+ variant: "secondary",
10637
+ onClick: handleClick,
10638
+ get disabled() {
10639
+ return isLoading();
10640
+ },
10641
+ get children() {
10642
+ var _el$2 = _tmpl$92();
10643
+ web.insert(_el$2, web.createComponent(Motion.span, {
10644
+ initial: {
10645
+ opacity: 1
10646
+ },
10647
+ get animate() {
10648
+ return {
10649
+ opacity: isLoading() ? 0 : 1
10650
+ };
10651
+ },
10652
+ transition: {
10653
+ easing: "ease-in-out",
10654
+ duration: 0.2
10655
+ },
10656
+ "class": "nt-inline-flex nt-items-center nt-gap-1",
10657
+ get children() {
10658
+ return [web.createComponent(solidJs.Show, {
10659
+ get when() {
10660
+ return isLinked();
10661
+ },
10662
+ get fallback() {
10663
+ return web.createComponent(IconRendererWrapper, {
10664
+ iconKey: "channelConnect",
10665
+ get ["class"]() {
10666
+ return style({
10667
+ key: "linkSlackUserButtonIcon",
10668
+ className: "nt-size-4 nt-shrink-0",
10669
+ iconKey: "channelConnect",
10670
+ context: {
10671
+ linked: false
10672
+ }
10673
+ });
10674
+ },
10675
+ get fallback() {
10676
+ return web.createComponent(SlackColored, {
10677
+ get ["class"]() {
10678
+ return style({
10679
+ key: "linkSlackUserButtonIcon",
10680
+ className: "nt-size-4 nt-shrink-0",
10681
+ iconKey: "channelConnect",
10682
+ context: {
10683
+ linked: false
10684
+ }
10685
+ });
10686
+ }
10687
+ });
10688
+ }
10689
+ });
10690
+ },
10691
+ get children() {
10692
+ return web.createComponent(IconRendererWrapper, {
10693
+ iconKey: "channelConnected",
10694
+ get ["class"]() {
10695
+ return style({
10696
+ key: "linkSlackUserButtonIcon",
10697
+ className: "nt-inline-flex nt-items-center nt-justify-center nt-size-4 nt-shrink-0 nt-rounded-full nt-bg-white nt-shadow-[0_1px_2px_0_rgba(10,13,20,0.03)]",
10698
+ iconKey: "channelConnected",
10699
+ context: {
10700
+ linked: true
10701
+ }
10702
+ });
10703
+ },
10704
+ get fallback() {
10705
+ return (() => {
10706
+ var _el$4 = _tmpl$92();
10707
+ web.insert(_el$4, web.createComponent(CheckCircleFill, {
10708
+ "class": "nt-size-full"
10709
+ }));
10710
+ web.effect(() => web.className(_el$4, style({
10711
+ key: "linkSlackUserButtonIcon",
10712
+ className: "nt-inline-flex nt-items-center nt-justify-center nt-size-4 nt-shrink-0 nt-rounded-full nt-bg-white nt-shadow-[0_1px_2px_0_rgba(10,13,20,0.03)]",
10713
+ iconKey: "channelConnected",
10714
+ context: {
10715
+ linked: true
10716
+ }
10717
+ })));
10718
+ return _el$4;
10719
+ })();
10720
+ }
10721
+ });
10722
+ }
10723
+ }), (() => {
10724
+ var _el$3 = _tmpl$92();
10725
+ web.insert(_el$3, () => {
10726
+ var _a, _b;
10727
+ return isLinked() ? (_a = props.unlinkLabel) != null ? _a : "Unlink" : (_b = props.linkLabel) != null ? _b : "Link User";
10728
+ });
10729
+ web.effect(() => web.className(_el$3, style({
10730
+ key: "linkSlackUserButtonLabel",
10731
+ className: "[line-height:16px]",
10732
+ context: {
10733
+ linked: isLinked()
10734
+ }
10735
+ })));
10736
+ return _el$3;
10737
+ })()];
10738
+ }
10739
+ }), null);
10740
+ web.insert(_el$2, web.createComponent(Motion.span, {
10741
+ initial: {
10742
+ opacity: 1
10743
+ },
10744
+ get animate() {
10745
+ return {
10746
+ opacity: isLoading() ? 1 : 0
10747
+ };
10748
+ },
10749
+ transition: {
10750
+ easing: "ease-in-out",
10751
+ duration: 0.2
10752
+ },
10753
+ "class": "nt-absolute nt-left-0 nt-inline-flex nt-items-center",
10754
+ get children() {
10755
+ return web.createComponent(Loader, {
10756
+ "class": "nt-text-foreground-alpha-600 nt-size-3.5 nt-animate-spin"
10757
+ });
10758
+ }
10759
+ }), null);
10760
+ web.effect(() => web.className(_el$2, style({
10761
+ key: "linkSlackUserButtonContainer",
10762
+ className: "nt-relative nt-overflow-hidden nt-inline-flex nt-items-center nt-justify-center nt-gap-1",
10763
+ context: {
10764
+ linked: isLinked()
10765
+ }
10766
+ })));
10767
+ return _el$2;
10768
+ }
10769
+ }));
10770
+ web.effect(() => web.className(_el$, style({
10771
+ key: "linkSlackUserContainer",
10772
+ className: "nt-flex nt-items-center nt-gap-2",
10773
+ context: {
10774
+ linked: isLinked()
10775
+ }
10776
+ })));
10777
+ return _el$;
10778
+ })();
10779
+ };
10780
+ var useSubscription = (options) => {
10781
+ const novuAccessor = useNovu();
10782
+ const identifier = () => {
10783
+ var _a;
10784
+ const subscriberId = novuAccessor().subscriberId;
10785
+ const contextKey = novuAccessor().contextKey;
10786
+ return (_a = options.identifier) != null ? _a : chunkWDGG3OER_js.buildSubscriptionIdentifier({ topicKey: options.topicKey, subscriberId, contextKey });
10787
+ };
10788
+ const [loading, setLoading] = solidJs.createSignal(true);
10789
+ const [subscription, { mutate, refetch }] = solidJs.createResource(
10790
+ options || {},
10791
+ (_0) => chunk7B52C2XE_js.__async(null, [_0], function* ({ topicKey, identifier: identifier2, workflowIds, tags }) {
10792
+ try {
10793
+ const response = yield novuAccessor().subscriptions.get({
10794
+ topicKey,
10795
+ identifier: identifier2,
10796
+ workflowIds,
10797
+ tags
10798
+ });
10799
+ return response.data;
10800
+ } catch (error) {
10801
+ console.error("Error fetching subscription:", error);
10802
+ throw error;
10803
+ }
10804
+ })
10805
+ );
10806
+ const create = (args) => chunk7B52C2XE_js.__async(null, null, function* () {
10807
+ setLoading(true);
10808
+ const response = yield novuAccessor().subscriptions.create(args);
10809
+ if (response.data) {
10810
+ mutate(response.data);
10811
+ }
10812
+ setLoading(false);
10813
+ return response;
10814
+ });
10815
+ const remove = (args) => chunk7B52C2XE_js.__async(null, null, function* () {
10816
+ setLoading(true);
10817
+ const response = "subscription" in args ? yield novuAccessor().subscriptions.delete({ subscription: args.subscription }) : yield novuAccessor().subscriptions.delete({ topicKey: args.topicKey, subscriptionId: args.subscriptionId });
10818
+ mutate(null);
10819
+ setLoading(false);
10820
+ return response;
10821
+ });
10822
+ solidJs.onMount(() => {
10823
+ const listener = ({ data }) => {
10824
+ if (!data || data.topicKey !== options.topicKey || data.identifier !== identifier()) {
10825
+ return;
10826
+ }
10827
+ mutate(data);
10828
+ setLoading(false);
10829
+ };
10830
+ const currentNovu = novuAccessor();
10831
+ const cleanupCreatePending = currentNovu.on("subscription.create.pending", ({ args }) => {
10832
+ if (!args || args.topicKey !== options.topicKey || args.identifier !== identifier()) {
10833
+ return;
10834
+ }
10835
+ setLoading(true);
10836
+ });
10837
+ const cleanupCreate = currentNovu.on("subscription.create.resolved", listener);
10838
+ const cleanupUpdate = currentNovu.on("subscription.update.resolved", listener);
10839
+ const cleanupDeletePending = currentNovu.on("subscription.delete.pending", ({ args }) => {
10840
+ var _a, _b;
10841
+ const subscriptionId = (_a = subscription()) == null ? void 0 : _a.id;
10842
+ const subscriptionIdentifier = (_b = subscription()) == null ? void 0 : _b.identifier;
10094
10843
  if (!args || "subscriptionId" in args && args.subscriptionId !== subscriptionId && args.subscriptionId !== subscriptionIdentifier || "subscription" in args && args.subscription.id !== subscriptionId && args.subscription.identifier !== subscriptionIdentifier) {
10095
10844
  return;
10096
10845
  }
@@ -10119,25 +10868,25 @@ var useSubscription = (options) => {
10119
10868
  });
10120
10869
  return { subscription, loading, mutate, refetch, create, remove };
10121
10870
  };
10122
- var _tmpl$90 = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 16 16"><path fill=currentColor d="M9.237 12.088c0 .362-.128.71-.357.965-.23.255-.541.398-.866.398s-.637-.143-.866-.398a1.45 1.45 0 0 1-.357-.965zM11.23 4.373a.39.39 0 0 1 .53.57l-7.402 6.903a.39.39 0 0 1-.531-.57zM11.058 6.652q.015.162.015.327v.4A4.37 4.37 0 0 0 12 10.097l.142.177c.16.2.2.487.1.732a.61.61 0 0 1-.557.402H5.96zM8.014 2.55c.338 0 .612.305.612.682v.41c.53.119 1.011.392 1.404.775L4.215 9.84c.478-.707.74-1.57.74-2.46v-.4c0-1.648 1.052-3.023 2.448-3.338v-.409c0-.377.273-.681.61-.681">`);
10871
+ var _tmpl$93 = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 16 16"><path fill=currentColor d="M9.237 12.088c0 .362-.128.71-.357.965-.23.255-.541.398-.866.398s-.637-.143-.866-.398a1.45 1.45 0 0 1-.357-.965zM11.23 4.373a.39.39 0 0 1 .53.57l-7.402 6.903a.39.39 0 0 1-.531-.57zM11.058 6.652q.015.162.015.327v.4A4.37 4.37 0 0 0 12 10.097l.142.177c.16.2.2.487.1.732a.61.61 0 0 1-.557.402H5.96zM8.014 2.55c.338 0 .612.305.612.682v.41c.53.119 1.011.392 1.404.775L4.215 9.84c.478-.707.74-1.57.74-2.46v-.4c0-1.648 1.052-3.023 2.448-3.338v-.409c0-.377.273-.681.61-.681">`);
10123
10872
  function BellCross(props) {
10124
10873
  return (() => {
10125
- var _el$ = _tmpl$90();
10874
+ var _el$ = _tmpl$93();
10126
10875
  web.spread(_el$, props, true, true);
10127
10876
  return _el$;
10128
10877
  })();
10129
10878
  }
10130
- var _tmpl$91 = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 16 16"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=1.1 d="M7.206 12.5c.08.152.196.278.336.366a.86.86 0 0 0 .916 0 .96.96 0 0 0 .336-.366m.58-6.5h2.75M10.75 4.5v3m.918 1.732q.156.227.338.431.091.11.113.257a.54.54 0 0 1-.033.282.5.5 0 0 1-.17.217.43.43 0 0 1-.25.08H4.334a.43.43 0 0 1-.25-.08.5.5 0 0 1-.17-.217.54.54 0 0 1 .081-.539C4.604 8.978 5.25 8.25 5.25 6c0-.515.121-1.02.352-1.47.231-.448.564-.824.967-1.092a2.6 2.6 0 0 1 1.333-.436c.471-.018.94.096 1.358.332">`);
10879
+ var _tmpl$94 = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 16 16"><path stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=1.1 d="M7.206 12.5c.08.152.196.278.336.366a.86.86 0 0 0 .916 0 .96.96 0 0 0 .336-.366m.58-6.5h2.75M10.75 4.5v3m.918 1.732q.156.227.338.431.091.11.113.257a.54.54 0 0 1-.033.282.5.5 0 0 1-.17.217.43.43 0 0 1-.25.08H4.334a.43.43 0 0 1-.25-.08.5.5 0 0 1-.17-.217.54.54 0 0 1 .081-.539C4.604 8.978 5.25 8.25 5.25 6c0-.515.121-1.02.352-1.47.231-.448.564-.824.967-1.092a2.6 2.6 0 0 1 1.333-.436c.471-.018.94.096 1.358.332">`);
10131
10880
  function BellPlus(props) {
10132
10881
  return (() => {
10133
- var _el$ = _tmpl$91();
10882
+ var _el$ = _tmpl$94();
10134
10883
  web.spread(_el$, props, true, true);
10135
10884
  return _el$;
10136
10885
  })();
10137
10886
  }
10138
10887
 
10139
10888
  // src/ui/components/subscription/SubscriptionButton.tsx
10140
- var _tmpl$92 = /* @__PURE__ */ web.template(`<span><span>`);
10889
+ var _tmpl$95 = /* @__PURE__ */ web.template(`<span><span>`);
10141
10890
  var iconKeyToComponentMap3 = {
10142
10891
  bellCross: BellCross,
10143
10892
  bellPlus: BellPlus
@@ -10171,7 +10920,7 @@ var SubscriptionButton = (props) => {
10171
10920
  return props.loading;
10172
10921
  },
10173
10922
  get children() {
10174
- var _el$ = _tmpl$92(), _el$2 = _el$.firstChild;
10923
+ var _el$ = _tmpl$95(), _el$2 = _el$.firstChild;
10175
10924
  web.insert(_el$, web.createComponent(Motion.span, {
10176
10925
  initial: {
10177
10926
  opacity: 1
@@ -10292,9 +11041,9 @@ var SubscriptionButton = (props) => {
10292
11041
  }
10293
11042
  });
10294
11043
  };
10295
- var _tmpl$93 = /* @__PURE__ */ web.template(`<div>`);
10296
- var _tmpl$230 = /* @__PURE__ */ web.template(`<div><div><div><span></span></div><div><span>`);
10297
- var _tmpl$319 = /* @__PURE__ */ web.template(`<div><label>`);
11044
+ var _tmpl$96 = /* @__PURE__ */ web.template(`<div>`);
11045
+ var _tmpl$232 = /* @__PURE__ */ web.template(`<div><div><div><span></span></div><div><span>`);
11046
+ var _tmpl$320 = /* @__PURE__ */ web.template(`<div><label>`);
10298
11047
  var SubscriptionPreferenceGroupRow = (props) => {
10299
11048
  const style = useStyle();
10300
11049
  const {
@@ -10339,7 +11088,7 @@ var SubscriptionPreferenceGroupRow = (props) => {
10339
11088
  return preference.enabled;
10340
11089
  };
10341
11090
  return (() => {
10342
- var _el$ = _tmpl$230(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild;
11091
+ var _el$ = _tmpl$232(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild;
10343
11092
  _el$2.$$click = () => {
10344
11093
  setIsOpened((prev) => !prev);
10345
11094
  };
@@ -10405,13 +11154,13 @@ var SubscriptionPreferenceGroupRow = (props) => {
10405
11154
  return isOpened();
10406
11155
  },
10407
11156
  get children() {
10408
- var _el$7 = _tmpl$93();
11157
+ var _el$7 = _tmpl$96();
10409
11158
  web.insert(_el$7, web.createComponent(solidJs.For, {
10410
11159
  get each() {
10411
11160
  return preferences();
10412
11161
  },
10413
11162
  children: (el) => (() => {
10414
- var _el$8 = _tmpl$319(), _el$9 = _el$8.firstChild;
11163
+ var _el$8 = _tmpl$320(), _el$9 = _el$8.firstChild;
10415
11164
  web.insert(_el$9, () => {
10416
11165
  var _a;
10417
11166
  return (_a = el.label) != null ? _a : t(el.preference.workflow.identifier);
@@ -10533,7 +11282,7 @@ var SubscriptionPreferenceGroupRow = (props) => {
10533
11282
  })();
10534
11283
  };
10535
11284
  web.delegateEvents(["click"]);
10536
- var _tmpl$94 = /* @__PURE__ */ web.template(`<div><label>`);
11285
+ var _tmpl$97 = /* @__PURE__ */ web.template(`<div><label>`);
10537
11286
  var SubscriptionPreferenceRow = (props) => {
10538
11287
  const style = useStyle();
10539
11288
  const {
@@ -10549,7 +11298,7 @@ var SubscriptionPreferenceRow = (props) => {
10549
11298
  return preference().enabled;
10550
11299
  };
10551
11300
  return (() => {
10552
- var _el$ = _tmpl$94(), _el$2 = _el$.firstChild;
11301
+ var _el$ = _tmpl$97(), _el$2 = _el$.firstChild;
10553
11302
  web.insert(_el$2, () => {
10554
11303
  var _a;
10555
11304
  return (_a = props.preference.label) != null ? _a : t(preference().workflow.identifier);
@@ -10594,19 +11343,19 @@ var SubscriptionPreferenceRow = (props) => {
10594
11343
  return _el$;
10595
11344
  })();
10596
11345
  };
10597
- var _tmpl$95 = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg width=138 height=100 fill=none viewBox="0 0 138 100"><rect width=131.1 height=33.1 x=3.025 y=.45 stroke=#e1e4ea stroke-dasharray="10 2.7"stroke-width=.9 rx=3.55></rect><rect width=123.1 height=25.1 x=7.025 y=4.45 fill=#fff rx=1.55></rect><rect width=123.1 height=25.1 x=7.025 y=4.45 stroke=#f2f2f2 stroke-width=.9 rx=1.55></rect><g clip-path=url(#a)><path stroke=#cacfd8 stroke-linecap=round stroke-linejoin=round stroke-width=1.08 d="m66.7 17 1.25 1.25 2.5-2.5M72.74 17a4.167 4.167 0 1 1-8.333 0 4.167 4.167 0 0 1 8.334 0"></path></g><g filter=url(#b)><g clip-path=url(#c)><rect width=132 height=29 x=1.724 y=67.207 fill=#fcfcfc rx=4 transform="rotate(-4 1.724 67.207)"></rect><path fill=#f4f4f4 d="M10.402 76.625a4 4 0 0 1 3.711-4.27l9.976-.697a4 4 0 0 1 4.27 3.711l.627 8.978a4 4 0 0 1-3.711 4.27l-9.976.697a4 4 0 0 1-4.27-3.71z"></path><path fill=#e4e4e4 d="M19.345 75.498c-.316.022-.55.319-.527.664l.027.374c-1.28.38-2.172 1.706-2.067 3.214l.026.367a3.97 3.97 0 0 1-.69 2.546l-.12.171a.67.67 0 0 0-.049.677.57.57 0 0 0 .546.332l6.84-.479a.57.57 0 0 0 .495-.404.67.67 0 0 0-.141-.664l-.143-.152a3.96 3.96 0 0 1-1.038-2.426l-.026-.366c-.105-1.508-1.173-2.699-2.493-2.896l-.026-.374c-.025-.345-.299-.606-.614-.584m1.479 9.555c.197-.248.294-.575.271-.906l-1.14.08-1.14.08c.023.331.165.64.395.86.23.218.53.328.832.307.303-.021.584-.172.782-.42"></path><rect width=27 height=3 x=36.373 y=75.311 fill=url(#d) rx=1.5 transform="rotate(-4 36.373 75.31)"></rect><rect width=59 height=3 x=36.722 y=80.299 fill=url(#e) rx=1.5 transform="rotate(-4 36.722 80.299)"></rect><rect width=59 height=3 x=36.722 y=80.299 fill=url(#f) rx=1.5 transform="rotate(-4 36.722 80.299)"></rect></g><rect width=132 height=29 x=1.724 y=67.207 stroke=#e6e6e6 stroke-opacity=.5 stroke-width=.6 rx=4 transform="rotate(-4 1.724 67.207)"></rect></g><path stroke=#e1e4ea stroke-linejoin=bevel d="M68.596 37v23.614"></path><defs><linearGradient id=d x1=29.846 x2=67.676 y1=76.586 y2=76.586 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=e x1=22.458 x2=105.123 y1=81.574 y2=81.574 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=f x1=22.458 x2=105.123 y1=81.574 y2=81.574 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><clipPath id=a><path fill=#fff d="M63.575 12h10v10h-10z"></path></clipPath><clipPath id=c><rect width=132 height=29 x=1.724 y=67.207 fill=#fff rx=4 transform="rotate(-4 1.724 67.207)"></rect></clipPath><filter id=b width=137.15 height=41.586 x=0 y=57.969 color-interpolation-filters=sRGB filterUnits=userSpaceOnUse><feFlood flood-opacity=0 result=BackgroundImageFix></feFlood><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=1.693></feOffset><feGaussianBlur stdDeviation=.847></feGaussianBlur><feColorMatrix values="0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0.02 0"></feColorMatrix><feBlend in2=BackgroundImageFix result=effect1_dropShadow_4908_18899></feBlend><feBlend in=SourceGraphic in2=effect1_dropShadow_4908_18899 result=shape></feBlend><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=-2></feOffset><feComposite in2=hardAlpha k2=-1 k3=1 operator=arithmetic></feComposite><feColorMatrix values="0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 1 0"></feColorMatrix><feBlend in2=shape result=effect2_innerShadow_4908_18899>`);
11346
+ var _tmpl$98 = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg width=138 height=100 fill=none viewBox="0 0 138 100"><rect width=131.1 height=33.1 x=3.025 y=.45 stroke=#e1e4ea stroke-dasharray="10 2.7"stroke-width=.9 rx=3.55></rect><rect width=123.1 height=25.1 x=7.025 y=4.45 fill=#fff rx=1.55></rect><rect width=123.1 height=25.1 x=7.025 y=4.45 stroke=#f2f2f2 stroke-width=.9 rx=1.55></rect><g clip-path=url(#a)><path stroke=#cacfd8 stroke-linecap=round stroke-linejoin=round stroke-width=1.08 d="m66.7 17 1.25 1.25 2.5-2.5M72.74 17a4.167 4.167 0 1 1-8.333 0 4.167 4.167 0 0 1 8.334 0"></path></g><g filter=url(#b)><g clip-path=url(#c)><rect width=132 height=29 x=1.724 y=67.207 fill=#fcfcfc rx=4 transform="rotate(-4 1.724 67.207)"></rect><path fill=#f4f4f4 d="M10.402 76.625a4 4 0 0 1 3.711-4.27l9.976-.697a4 4 0 0 1 4.27 3.711l.627 8.978a4 4 0 0 1-3.711 4.27l-9.976.697a4 4 0 0 1-4.27-3.71z"></path><path fill=#e4e4e4 d="M19.345 75.498c-.316.022-.55.319-.527.664l.027.374c-1.28.38-2.172 1.706-2.067 3.214l.026.367a3.97 3.97 0 0 1-.69 2.546l-.12.171a.67.67 0 0 0-.049.677.57.57 0 0 0 .546.332l6.84-.479a.57.57 0 0 0 .495-.404.67.67 0 0 0-.141-.664l-.143-.152a3.96 3.96 0 0 1-1.038-2.426l-.026-.366c-.105-1.508-1.173-2.699-2.493-2.896l-.026-.374c-.025-.345-.299-.606-.614-.584m1.479 9.555c.197-.248.294-.575.271-.906l-1.14.08-1.14.08c.023.331.165.64.395.86.23.218.53.328.832.307.303-.021.584-.172.782-.42"></path><rect width=27 height=3 x=36.373 y=75.311 fill=url(#d) rx=1.5 transform="rotate(-4 36.373 75.31)"></rect><rect width=59 height=3 x=36.722 y=80.299 fill=url(#e) rx=1.5 transform="rotate(-4 36.722 80.299)"></rect><rect width=59 height=3 x=36.722 y=80.299 fill=url(#f) rx=1.5 transform="rotate(-4 36.722 80.299)"></rect></g><rect width=132 height=29 x=1.724 y=67.207 stroke=#e6e6e6 stroke-opacity=.5 stroke-width=.6 rx=4 transform="rotate(-4 1.724 67.207)"></rect></g><path stroke=#e1e4ea stroke-linejoin=bevel d="M68.596 37v23.614"></path><defs><linearGradient id=d x1=29.846 x2=67.676 y1=76.586 y2=76.586 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=e x1=22.458 x2=105.123 y1=81.574 y2=81.574 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=f x1=22.458 x2=105.123 y1=81.574 y2=81.574 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><clipPath id=a><path fill=#fff d="M63.575 12h10v10h-10z"></path></clipPath><clipPath id=c><rect width=132 height=29 x=1.724 y=67.207 fill=#fff rx=4 transform="rotate(-4 1.724 67.207)"></rect></clipPath><filter id=b width=137.15 height=41.586 x=0 y=57.969 color-interpolation-filters=sRGB filterUnits=userSpaceOnUse><feFlood flood-opacity=0 result=BackgroundImageFix></feFlood><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=1.693></feOffset><feGaussianBlur stdDeviation=.847></feGaussianBlur><feColorMatrix values="0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0.02 0"></feColorMatrix><feBlend in2=BackgroundImageFix result=effect1_dropShadow_4908_18899></feBlend><feBlend in=SourceGraphic in2=effect1_dropShadow_4908_18899 result=shape></feBlend><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=-2></feOffset><feComposite in2=hardAlpha k2=-1 k3=1 operator=arithmetic></feComposite><feColorMatrix values="0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 1 0"></feColorMatrix><feBlend in2=shape result=effect2_innerShadow_4908_18899>`);
10598
11347
  var EmptyState = () => {
10599
- return _tmpl$95();
11348
+ return _tmpl$98();
10600
11349
  };
10601
- var _tmpl$96 = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg width=136 height=88 fill=none viewBox="0 0 136 88"><g filter=url(#a)><g clip-path=url(#b)><rect width=132 height=29 x=1.993 y=.301 fill=#fcfcfc rx=4></rect><path fill=#f4f4f4 d="M9.993 10.3a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4v9a4 4 0 0 1-4 4h-10a4 4 0 0 1-4-4z"></path><path fill=#e4e4e4 d="M18.993 9.8c-.316 0-.572.28-.572.626v.375c-1.303.289-2.285 1.55-2.285 3.062v.367c0 .918-.31 1.805-.866 2.493l-.133.162a.67.67 0 0 0-.094.672.57.57 0 0 0 .521.369h6.857a.57.57 0 0 0 .522-.37.67.67 0 0 0-.095-.671l-.132-.162a3.96 3.96 0 0 1-.866-2.492v-.368c0-1.511-.982-2.773-2.286-3.062v-.375c0-.346-.255-.625-.571-.625m.809 9.636c.214-.235.334-.553.334-.885H17.85c0 .332.12.65.334.885s.505.365.809.365c.303 0 .594-.131.809-.365"></path><rect width=27 height=3 x=35.993 y=10.801 fill=url(#c) rx=1.5></rect><rect width=59 height=3 x=35.993 y=15.801 fill=url(#d) rx=1.5></rect><rect width=59 height=3 x=35.993 y=15.801 fill=url(#e) rx=1.5></rect></g><rect width=132 height=29 x=1.993 y=.301 stroke=#e6e6e6 stroke-opacity=.5 stroke-width=.6 rx=4></rect></g><rect width=131.1 height=33.1 x=2.443 y=53.751 stroke=#e1e4ea stroke-dasharray="10 2.7"stroke-width=.9 rx=3.55></rect><rect width=123.1 height=25.1 x=6.443 y=57.751 fill=#fff rx=1.55></rect><rect width=123.1 height=25.1 x=6.443 y=57.751 stroke=#f2f2f2 stroke-width=.9 rx=1.55></rect><path fill=#cacfd8 d="M68.743 71.145v.784a2.25 2.25 0 0 0-3 2.122h-.75a3 3 0 0 1 3.75-2.906m-.75-.47a2.25 2.25 0 1 1-.001-4.498 2.25 2.25 0 0 1 .001 4.499m0-.75a1.5 1.5 0 1 0 0-2.999 1.5 1.5 0 0 0 0 3m2.47 2.25-.686-.685.53-.53 1.591 1.59-1.59 1.592-.531-.53.686-.686h-1.345v-.75z"></path><path stroke=#e1e4ea stroke-linejoin=bevel d="M67.993 50.3v-18"></path><defs><linearGradient id=c x1=29.466 x2=67.295 y1=12.076 y2=12.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=d x1=21.729 x2=104.394 y1=17.076 y2=17.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=e x1=21.729 x2=104.394 y1=17.076 y2=17.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><clipPath id=b><rect width=132 height=29 x=1.993 y=.301 fill=#fff rx=4></rect></clipPath><filter id=a width=135.986 height=32.988 x=0 y=0 color-interpolation-filters=sRGB filterUnits=userSpaceOnUse><feFlood flood-opacity=0 result=BackgroundImageFix></feFlood><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=1.693></feOffset><feGaussianBlur stdDeviation=.847></feGaussianBlur><feColorMatrix values="0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0.02 0"></feColorMatrix><feBlend in2=BackgroundImageFix result=effect1_dropShadow_4850_12317></feBlend><feBlend in=SourceGraphic in2=effect1_dropShadow_4850_12317 result=shape></feBlend><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=-2></feOffset><feComposite in2=hardAlpha k2=-1 k3=1 operator=arithmetic></feComposite><feColorMatrix values="0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 1 0"></feColorMatrix><feBlend in2=shape result=effect2_innerShadow_4850_12317>`);
11350
+ var _tmpl$99 = /* @__PURE__ */ web.template(`<svg xmlns=http://www.w3.org/2000/svg width=136 height=88 fill=none viewBox="0 0 136 88"><g filter=url(#a)><g clip-path=url(#b)><rect width=132 height=29 x=1.993 y=.301 fill=#fcfcfc rx=4></rect><path fill=#f4f4f4 d="M9.993 10.3a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4v9a4 4 0 0 1-4 4h-10a4 4 0 0 1-4-4z"></path><path fill=#e4e4e4 d="M18.993 9.8c-.316 0-.572.28-.572.626v.375c-1.303.289-2.285 1.55-2.285 3.062v.367c0 .918-.31 1.805-.866 2.493l-.133.162a.67.67 0 0 0-.094.672.57.57 0 0 0 .521.369h6.857a.57.57 0 0 0 .522-.37.67.67 0 0 0-.095-.671l-.132-.162a3.96 3.96 0 0 1-.866-2.492v-.368c0-1.511-.982-2.773-2.286-3.062v-.375c0-.346-.255-.625-.571-.625m.809 9.636c.214-.235.334-.553.334-.885H17.85c0 .332.12.65.334.885s.505.365.809.365c.303 0 .594-.131.809-.365"></path><rect width=27 height=3 x=35.993 y=10.801 fill=url(#c) rx=1.5></rect><rect width=59 height=3 x=35.993 y=15.801 fill=url(#d) rx=1.5></rect><rect width=59 height=3 x=35.993 y=15.801 fill=url(#e) rx=1.5></rect></g><rect width=132 height=29 x=1.993 y=.301 stroke=#e6e6e6 stroke-opacity=.5 stroke-width=.6 rx=4></rect></g><rect width=131.1 height=33.1 x=2.443 y=53.751 stroke=#e1e4ea stroke-dasharray="10 2.7"stroke-width=.9 rx=3.55></rect><rect width=123.1 height=25.1 x=6.443 y=57.751 fill=#fff rx=1.55></rect><rect width=123.1 height=25.1 x=6.443 y=57.751 stroke=#f2f2f2 stroke-width=.9 rx=1.55></rect><path fill=#cacfd8 d="M68.743 71.145v.784a2.25 2.25 0 0 0-3 2.122h-.75a3 3 0 0 1 3.75-2.906m-.75-.47a2.25 2.25 0 1 1-.001-4.498 2.25 2.25 0 0 1 .001 4.499m0-.75a1.5 1.5 0 1 0 0-2.999 1.5 1.5 0 0 0 0 3m2.47 2.25-.686-.685.53-.53 1.591 1.59-1.59 1.592-.531-.53.686-.686h-1.345v-.75z"></path><path stroke=#e1e4ea stroke-linejoin=bevel d="M67.993 50.3v-18"></path><defs><linearGradient id=c x1=29.466 x2=67.295 y1=12.076 y2=12.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=d x1=21.729 x2=104.394 y1=17.076 y2=17.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><linearGradient id=e x1=21.729 x2=104.394 y1=17.076 y2=17.076 gradientUnits=userSpaceOnUse><stop stop-color=#e4e4e4></stop><stop offset=.48 stop-color=#f1f1f1></stop><stop offset=.992 stop-color=#fcfcfc stop-opacity=.75></stop></linearGradient><clipPath id=b><rect width=132 height=29 x=1.993 y=.301 fill=#fff rx=4></rect></clipPath><filter id=a width=135.986 height=32.988 x=0 y=0 color-interpolation-filters=sRGB filterUnits=userSpaceOnUse><feFlood flood-opacity=0 result=BackgroundImageFix></feFlood><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=1.693></feOffset><feGaussianBlur stdDeviation=.847></feGaussianBlur><feColorMatrix values="0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0 0.917008 0 0 0 0.02 0"></feColorMatrix><feBlend in2=BackgroundImageFix result=effect1_dropShadow_4850_12317></feBlend><feBlend in=SourceGraphic in2=effect1_dropShadow_4850_12317 result=shape></feBlend><feColorMatrix in=SourceAlpha result=hardAlpha values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy=-2></feOffset><feComposite in2=hardAlpha k2=-1 k3=1 operator=arithmetic></feComposite><feColorMatrix values="0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 0 0.975488 0 0 0 1 0"></feColorMatrix><feBlend in2=shape result=effect2_innerShadow_4850_12317>`);
10602
11351
  var NotSubscribedState = () => {
10603
- return _tmpl$96();
11352
+ return _tmpl$99();
10604
11353
  };
10605
- var _tmpl$97 = /* @__PURE__ */ web.template(`<div><div></div><div></div><div>`);
11354
+ var _tmpl$100 = /* @__PURE__ */ web.template(`<div><div></div><div></div><div>`);
10606
11355
  var SubscriptionPreferencesListSkeleton = () => {
10607
11356
  const style = useStyle();
10608
11357
  return (() => {
10609
- var _el$ = _tmpl$97(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling;
11358
+ var _el$ = _tmpl$100(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling;
10610
11359
  web.insert(_el$2, web.createComponent(SkeletonText, {
10611
11360
  appearanceKey: "notificationList__skeletonText",
10612
11361
  "class": "nt-h-3.5 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded-sm nt-animate-shimmer"
@@ -10661,7 +11410,7 @@ var SubscriptionPreferencesListSkeleton = () => {
10661
11410
  };
10662
11411
 
10663
11412
  // src/ui/components/subscription/SubscriptionPreferencesFallback.tsx
10664
- var _tmpl$98 = /* @__PURE__ */ web.template(`<div><div><span></span><span>`);
11413
+ var _tmpl$101 = /* @__PURE__ */ web.template(`<div><div><span></span><span>`);
10665
11414
  var SubscriptionPreferencesFallback = (props) => {
10666
11415
  const style = useStyle();
10667
11416
  const {
@@ -10679,7 +11428,7 @@ var SubscriptionPreferencesFallback = (props) => {
10679
11428
  return web.createComponent(SubscriptionPreferencesListSkeleton, {});
10680
11429
  },
10681
11430
  get children() {
10682
- var _el$ = _tmpl$98(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
11431
+ var _el$ = _tmpl$101(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
10683
11432
  web.insert(_el$, web.createComponent(solidJs.Show, {
10684
11433
  get when() {
10685
11434
  return hasEmptyPreferences();
@@ -10758,9 +11507,9 @@ var SubscriptionPreferencesFallback = (props) => {
10758
11507
  };
10759
11508
 
10760
11509
  // src/ui/components/subscription/SubscriptionPreferences.tsx
10761
- var _tmpl$99 = /* @__PURE__ */ web.template(`<div class=nt-max-w-56>`);
10762
- var _tmpl$231 = /* @__PURE__ */ web.template(`<div><p>`);
10763
- var _tmpl$320 = /* @__PURE__ */ web.template(`<div>`);
11510
+ var _tmpl$102 = /* @__PURE__ */ web.template(`<div class=nt-max-w-56>`);
11511
+ var _tmpl$233 = /* @__PURE__ */ web.template(`<div><p>`);
11512
+ var _tmpl$321 = /* @__PURE__ */ web.template(`<div>`);
10764
11513
  var SubscriptionPreferences = (props) => {
10765
11514
  const style = useStyle();
10766
11515
  const {
@@ -10857,7 +11606,7 @@ var SubscriptionPreferences = (props) => {
10857
11606
  });
10858
11607
  });
10859
11608
  return (() => {
10860
- var _el$ = _tmpl$320();
11609
+ var _el$ = _tmpl$321();
10861
11610
  web.insert(_el$, web.createComponent(solidJs.Show, {
10862
11611
  get when() {
10863
11612
  return !props.renderPreferences;
@@ -10876,7 +11625,7 @@ var SubscriptionPreferences = (props) => {
10876
11625
  },
10877
11626
  get children() {
10878
11627
  return [(() => {
10879
- var _el$2 = _tmpl$231(), _el$3 = _el$2.firstChild;
11628
+ var _el$2 = _tmpl$233(), _el$3 = _el$2.firstChild;
10880
11629
  web.insert(_el$3, () => t("subscription.preferences.header"));
10881
11630
  web.insert(_el$2, web.createComponent(Tooltip.Root, {
10882
11631
  get children() {
@@ -10900,7 +11649,7 @@ var SubscriptionPreferences = (props) => {
10900
11649
  }), web.createComponent(Tooltip.Content, {
10901
11650
  "data-localization": "subscription.preferences.headerInfo",
10902
11651
  get children() {
10903
- var _el$4 = _tmpl$99();
11652
+ var _el$4 = _tmpl$102();
10904
11653
  web.insert(_el$4, () => t("subscription.preferences.headerInfo"));
10905
11654
  return _el$4;
10906
11655
  }
@@ -10931,7 +11680,7 @@ var SubscriptionPreferences = (props) => {
10931
11680
  });
10932
11681
  return _el$2;
10933
11682
  })(), (() => {
10934
- var _el$5 = _tmpl$320();
11683
+ var _el$5 = _tmpl$321();
10935
11684
  web.insert(_el$5, web.createComponent(solidJs.Show, {
10936
11685
  get when() {
10937
11686
  var _a, _b, _c, _d;
@@ -10952,7 +11701,7 @@ var SubscriptionPreferences = (props) => {
10952
11701
  });
10953
11702
  },
10954
11703
  get children() {
10955
- var _el$6 = _tmpl$320();
11704
+ var _el$6 = _tmpl$321();
10956
11705
  web.insert(_el$6, web.createComponent(solidJs.Index, {
10957
11706
  get each() {
10958
11707
  return groupedPreferences();
@@ -11203,7 +11952,7 @@ var SubscriptionCog = (props) => {
11203
11952
  };
11204
11953
 
11205
11954
  // src/ui/components/subscription/Subscription.tsx
11206
- var _tmpl$100 = /* @__PURE__ */ web.template(`<div>`);
11955
+ var _tmpl$103 = /* @__PURE__ */ web.template(`<div>`);
11207
11956
  function extractWorkflowIds(preferences) {
11208
11957
  var _a;
11209
11958
  const ids = [];
@@ -11282,7 +12031,7 @@ var Subscription = (props) => {
11282
12031
  }
11283
12032
  };
11284
12033
  return (() => {
11285
- var _el$ = _tmpl$100();
12034
+ var _el$ = _tmpl$103();
11286
12035
  web.insert(_el$, web.createComponent(SubscriptionButton, {
11287
12036
  get subscription() {
11288
12037
  return subscription();
@@ -11561,10 +12310,12 @@ var novuComponents = {
11561
12310
  SubscriptionPreferences: SubscriptionPreferencesWrapper,
11562
12311
  ConnectChat,
11563
12312
  SlackLinkUser,
11564
- SlackConnectButton
12313
+ SlackConnectButton,
12314
+ MsTeamsLinkUser,
12315
+ MsTeamsConnectButton
11565
12316
  };
11566
12317
  var SUBSCRIPTION_COMPONENTS = ["Subscription", "SubscriptionButton", "SubscriptionPreferences"];
11567
- var CHANNEL_COMPONENTS = ["ConnectChat", "SlackLinkUser", "SlackConnectButton"];
12318
+ var CHANNEL_COMPONENTS = ["ConnectChat", "SlackLinkUser", "SlackConnectButton", "MsTeamsLinkUser", "MsTeamsConnectButton"];
11568
12319
  var InboxComponentsRenderer = (props) => {
11569
12320
  return web.createComponent(solidJs.Show, {
11570
12321
  get when() {