@webority/ui-elements 0.53.1 → 0.55.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.
- package/dist/WuiAutocomplete-CE7wT-Vc.js +13 -0
- package/dist/WuiCarousel-C33Z8FBt.js +1 -0
- package/dist/WuiCodeBlock-BcLJhLBJ.js +1 -0
- package/dist/WuiCommandPalette-CcmFOWNc.js +2 -0
- package/dist/WuiCommentThread-Bww7P_cu.js +1 -0
- package/dist/{WuiCountrySelect-GJrl6sUP.js → WuiCountrySelect-D92rrSvW.js} +1 -1
- package/dist/WuiDataTable-tR8Lp4XZ.js +1 -0
- package/dist/{WuiDatePicker-CI7wLkmd.js → WuiDatePicker-_BzQ2m1e.js} +1 -1
- package/dist/WuiDateRange-CrVodISl.js +25 -0
- package/dist/WuiDrawer-BuvDLR6M.js +1 -0
- package/dist/WuiHoverCard-CNEawHmO.js +1 -0
- package/dist/WuiInlineEdit-CI-3C7yP.js +1 -0
- package/dist/WuiLightbox-hluak_-q.js +1 -0
- package/dist/WuiMentionInput-DW7N1Zne.js +1 -0
- package/dist/WuiMenubar-D2tb_3eU.js +1 -0
- package/dist/WuiMultiSelect-WUNCdkzW.js +25 -0
- package/dist/WuiNavigationMenu-BsLnvz2Y.js +1 -0
- package/dist/WuiNotificationCenter-DKdvaSbm.js +1 -0
- package/dist/WuiOnboardingChecklist-s2DG6PZ0.js +1 -0
- package/dist/WuiOverflow-CB3j6q6n.js +1 -0
- package/dist/WuiRating-BzeW6iDC.js +1 -0
- package/dist/WuiRecordPager-yXv4g2ZR.js +1 -0
- package/dist/WuiRelativeTime-Cfc8TMd8.js +1 -0
- package/dist/WuiResizable-m2Ypa-zD.js +1 -0
- package/dist/WuiRollingNumber-DBgi_3l7.js +1 -0
- package/dist/{WuiSelect-DcbtqI9s.js → WuiSelect-CT8tgsxL.js} +1 -1
- package/dist/WuiShortcuts-CMibF1XM.js +1 -0
- package/dist/WuiShowMore-Bu7IQcXS.js +1 -0
- package/dist/WuiTour-DW3kPaR9.js +488 -0
- package/dist/WuiTruncate-BLl2u3b-.js +1 -0
- package/dist/WuiWhatsNew-BO78119Z.js +1 -0
- package/dist/copyText-DM5HhXjf.js +1 -0
- package/dist/elements/autocomplete.js +1 -1
- package/dist/elements/carousel.js +1 -0
- package/dist/elements/code-block.js +1 -0
- package/dist/elements/command-palette.js +1 -1
- package/dist/elements/comment-thread.js +1 -0
- package/dist/elements/country-select.js +1 -1
- package/dist/elements/data-table.js +1 -0
- package/dist/elements/date-range.js +1 -1
- package/dist/elements/datepicker.js +1 -1
- package/dist/elements/drawer.js +1 -0
- package/dist/elements/hover-card.js +1 -0
- package/dist/elements/inline-edit.js +1 -0
- package/dist/elements/lightbox.js +1 -0
- package/dist/elements/mention-input.js +1 -0
- package/dist/elements/menubar.js +1 -0
- package/dist/elements/multiselect.js +1 -1
- package/dist/elements/navigation-menu.js +1 -0
- package/dist/elements/notification-center.js +1 -0
- package/dist/elements/onboarding-checklist.js +1 -0
- package/dist/elements/overflow.js +1 -0
- package/dist/elements/rating.js +1 -0
- package/dist/elements/record-pager.js +1 -0
- package/dist/elements/relative-time.js +1 -0
- package/dist/elements/resizable.js +1 -0
- package/dist/elements/rolling-number.js +1 -0
- package/dist/elements/select.js +1 -1
- package/dist/elements/shortcuts.js +1 -0
- package/dist/elements/show-more.js +1 -0
- package/dist/elements/tour.js +1 -1
- package/dist/elements/truncate.js +1 -0
- package/dist/elements/whats-new.js +1 -0
- package/dist/helpers.js +1 -1
- package/dist/notificationDays-pYmoU0g6.js +1 -0
- package/dist/{optionLabel-DOZb8ERB.js → optionLabel-BBaur8Bs.js} +1 -1
- package/dist/shortcutKeys-BQiDpsTJ.js +1 -0
- package/dist/themeTransition-C61cbmZ4.js +1 -0
- package/dist/types/chatClient.d.ts +4 -4
- package/dist/ui-chat-core.js +1 -1
- package/dist/ui-chat.global.js +1 -1
- package/dist/ui-chat.js +1 -1
- package/dist/ui-elements.global.js +462 -143
- package/dist/ui-elements.js +1 -1
- package/dist/ui-tour.global.js +1 -1
- package/package.json +24 -1
- package/dist/WuiAutocomplete-DvXHihD6.js +0 -13
- package/dist/WuiCommandPalette-CfbMtT6z.js +0 -2
- package/dist/WuiDateRange-BFpOjqWn.js +0 -25
- package/dist/WuiMultiSelect-BCZE2VHM.js +0 -25
- package/dist/WuiTour-CEoudHTq.js +0 -169
- package/dist/themeTransition-lkmQm8FR.js +0 -1
package/dist/WuiTour-CEoudHTq.js
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./elementBase-BlsR4tqa.js";import{n as t,r as n,t as r}from"./anchorOverlay-WcDeH46q.js";import{t as i}from"./tourOpenMark-nPeAJFSo.js";var a=`
|
|
2
|
-
:host {
|
|
3
|
-
all: initial;
|
|
4
|
-
${Object.entries({"--wui-z-tour":`1550`,"--wui-radius-sm":`8px`,"--wui-radius-lg":`14px`,"--wui-shadow-overlay":`0 8px 28px -6px rgba(7, 20, 55, 0.14)`,"--color-primary":`#4F46E5`,"--color-primary-hover":`#4338CA`,"--color-primary-ink":`#4F46E5`,"--color-primary-text":`#FFFFFF`,"--color-scrim-strong":`color-mix(in srgb, #071437 62%, transparent)`,"--color-surface":`#FFFFFF`,"--color-text":`#071437`,"--color-text-muted":`#4B5675`,"--color-border":`#EBEDF3`}).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
5
|
-
`)}
|
|
6
|
-
}
|
|
7
|
-
*, *::before, *::after {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
}
|
|
10
|
-
[hidden] {
|
|
11
|
-
display: none !important;
|
|
12
|
-
}
|
|
13
|
-
.visually-hidden {
|
|
14
|
-
position: absolute !important;
|
|
15
|
-
width: 1px !important;
|
|
16
|
-
height: 1px !important;
|
|
17
|
-
padding: 0 !important;
|
|
18
|
-
margin: -1px !important;
|
|
19
|
-
overflow: hidden !important;
|
|
20
|
-
clip: rect(0, 0, 0, 0) !important;
|
|
21
|
-
white-space: nowrap !important;
|
|
22
|
-
border: 0 !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.btn {
|
|
26
|
-
display: inline-block;
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: 0.25rem 0.5rem;
|
|
29
|
-
border: 1px solid transparent;
|
|
30
|
-
border-radius: 0.375rem;
|
|
31
|
-
background: transparent;
|
|
32
|
-
font: inherit;
|
|
33
|
-
font-size: 0.875rem;
|
|
34
|
-
font-weight: 500;
|
|
35
|
-
line-height: 1.5;
|
|
36
|
-
text-align: center;
|
|
37
|
-
text-decoration: none;
|
|
38
|
-
white-space: nowrap;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
}
|
|
41
|
-
.btn:focus-visible {
|
|
42
|
-
outline: 2px solid var(--color-primary);
|
|
43
|
-
outline-offset: 2px;
|
|
44
|
-
}
|
|
45
|
-
.btn-primary {
|
|
46
|
-
background: var(--color-primary);
|
|
47
|
-
border-color: var(--color-primary);
|
|
48
|
-
color: var(--color-primary-text);
|
|
49
|
-
}
|
|
50
|
-
.btn-primary:hover {
|
|
51
|
-
background: var(--color-primary-hover);
|
|
52
|
-
border-color: var(--color-primary-hover);
|
|
53
|
-
}
|
|
54
|
-
.btn-outline-secondary {
|
|
55
|
-
border-color: var(--color-text-muted);
|
|
56
|
-
color: var(--color-text-muted);
|
|
57
|
-
}
|
|
58
|
-
.btn-outline-secondary:hover {
|
|
59
|
-
background: var(--color-bg-muted);
|
|
60
|
-
color: var(--color-text);
|
|
61
|
-
}
|
|
62
|
-
.btn-link {
|
|
63
|
-
font-weight: 400;
|
|
64
|
-
color: var(--color-primary-ink);
|
|
65
|
-
text-decoration: underline;
|
|
66
|
-
}
|
|
67
|
-
.btn-link:hover {
|
|
68
|
-
color: var(--color-primary-hover);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.wui-tour-layer {
|
|
72
|
-
position: fixed;
|
|
73
|
-
inset: 0;
|
|
74
|
-
z-index: var(--wui-z-tour);
|
|
75
|
-
pointer-events: none;
|
|
76
|
-
font-family: "Webority Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
77
|
-
font-size: 16px;
|
|
78
|
-
font-weight: 400;
|
|
79
|
-
line-height: 1.5;
|
|
80
|
-
color: var(--color-text);
|
|
81
|
-
text-align: start;
|
|
82
|
-
}
|
|
83
|
-
.wui-tour-spot {
|
|
84
|
-
position: fixed;
|
|
85
|
-
border-radius: var(--wui-radius-sm);
|
|
86
|
-
box-shadow:
|
|
87
|
-
0 0 0 2px var(--color-primary),
|
|
88
|
-
0 0 0 100vmax var(--color-scrim-strong);
|
|
89
|
-
pointer-events: none;
|
|
90
|
-
}
|
|
91
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
92
|
-
.wui-tour-spot {
|
|
93
|
-
transition:
|
|
94
|
-
top 160ms ease,
|
|
95
|
-
left 160ms ease,
|
|
96
|
-
width 160ms ease,
|
|
97
|
-
height 160ms ease;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
.wui-tour-card {
|
|
101
|
-
display: flex;
|
|
102
|
-
flex-direction: column;
|
|
103
|
-
gap: 8px;
|
|
104
|
-
width: min(360px, 100vw - 16px);
|
|
105
|
-
padding: 16px;
|
|
106
|
-
overflow-y: auto;
|
|
107
|
-
background: var(--color-surface);
|
|
108
|
-
color: var(--color-text);
|
|
109
|
-
border: 1px solid var(--color-border);
|
|
110
|
-
border-radius: var(--wui-radius-lg);
|
|
111
|
-
corner-shape: squircle;
|
|
112
|
-
box-shadow: var(--wui-shadow-overlay);
|
|
113
|
-
pointer-events: auto;
|
|
114
|
-
}
|
|
115
|
-
.wui-tour-card:focus {
|
|
116
|
-
outline: none;
|
|
117
|
-
}
|
|
118
|
-
.wui-tour-card:focus-visible {
|
|
119
|
-
outline: 2px solid var(--color-primary);
|
|
120
|
-
outline-offset: 2px;
|
|
121
|
-
}
|
|
122
|
-
.wui-tour-position {
|
|
123
|
-
margin: 0;
|
|
124
|
-
font-size: 12px;
|
|
125
|
-
color: var(--color-text-muted);
|
|
126
|
-
}
|
|
127
|
-
.wui-tour-title {
|
|
128
|
-
margin: 0;
|
|
129
|
-
font-size: 16px;
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
}
|
|
132
|
-
.wui-tour-text {
|
|
133
|
-
margin: 0;
|
|
134
|
-
font-size: 14px;
|
|
135
|
-
color: var(--color-text-muted);
|
|
136
|
-
}
|
|
137
|
-
.wui-tour-actions {
|
|
138
|
-
display: flex;
|
|
139
|
-
align-items: center;
|
|
140
|
-
justify-content: space-between;
|
|
141
|
-
gap: 8px;
|
|
142
|
-
margin-top: 4px;
|
|
143
|
-
}
|
|
144
|
-
.wui-tour-nav {
|
|
145
|
-
display: flex;
|
|
146
|
-
gap: 8px;
|
|
147
|
-
}
|
|
148
|
-
.wui-tour-skip {
|
|
149
|
-
color: var(--color-text-muted);
|
|
150
|
-
}
|
|
151
|
-
.wui-tour-back,
|
|
152
|
-
.wui-tour-next {
|
|
153
|
-
min-width: 64px;
|
|
154
|
-
}
|
|
155
|
-
`,o=`wui-tour-step`,s=`wui-tour-host`,c=`wui-tour-seen:`,l={back:`Back`,next:`Next`,skip:`Skip`,done:`Done`},u={back:`back-label`,next:`next-label`,skip:`skip-label`,done:`done-label`},d=4,f=4,p=0;function m(e=c,t=globalThis.localStorage){return{isSeen:async n=>t.getItem(e+n)===`1`,markSeen:async n=>{t.setItem(e+n,`1`)}}}var h=e=>!e?.isConnected||getComputedStyle(e).visibility===`hidden`?!1:e.getClientRects().length>0,g=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)),_=()=>{let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e},v=null;function y(e){if(`adoptedStyleSheets`in e&&typeof CSSStyleSheet==`function`&&`replaceSync`in CSSStyleSheet.prototype){v||(v=new CSSStyleSheet,v.replaceSync(a)),e.adoptedStyleSheets=[v];return}let t=document.createElement(`style`);t.textContent=a,e.appendChild(t)}var b=class extends e{static get observedAttributes(){return[`open`]}constructor(){super(),this.seenStore=null,this.onBeforeStep=null,this._run=0,this._running=!1,this._layer=null,this._outer=null,this._shadow=null}connectedCallback(){this.hasAttribute(`open`)&&this.start()}disconnectedCallback(){this.stop()}attributeChangedCallback(e,t,n){e!==`open`||!this.isConnected||(n===null?this.stop():this.start())}get tourId(){return this.getAttribute(`tour-id`)||``}set tourId(e){e==null||e===``?this.removeAttribute(`tour-id`):this.setAttribute(`tour-id`,String(e))}get isolated(){return this.hasAttribute(`isolated`)}set isolated(e){this.toggleAttribute(`isolated`,e===!0||e===``||e===`true`)}_stepList(){return Array.from(this.querySelectorAll(`:scope > ${o}`),e=>({target:e.getAttribute(`target`)||``,title:e.getAttribute(`title`)||void 0,description:e.textContent.trim()}))}_store(){return this.seenStore?this.seenStore:this.getAttribute(`seen-store`)===`local`?m():globalThis.window?.WUI?.tour?.seenStore||null}_label(e){return this.getAttribute(u[e])||l[e]}async start(){if(this._running)return;this._running=!0;let e=++this._run;this.hasAttribute(`open`)||this.setAttribute(`open`,``);try{await this._start(e)}catch(t){throw e===this._run&&(this._running=!1),t}}async _start(e){this._steps=this._stepList();let t=this._store();if(t&&!this.tourId)throw Error(`<wui-tour> needs a tour-id to use a seen store.`);if(t&&await t.isSeen(this.tourId)){e===this._run&&this._finish(`alreadySeen`);return}this._returnFocus=document.activeElement;let n=await this._locate(0,1,e);if(e===this._run){if(!n){this._finish(`noTargets`);return}this._firstIndex=n.index,this._build(),this._show(n)}}next(){return this._move(1)}back(){return!this._current||this._current.index<=this._firstIndex?Promise.resolve():this._move(-1)}async goTo(e){if(this._current){if(!Number.isInteger(e)||e<0||e>=this._steps.length)throw RangeError(`<wui-tour> has no step ${e}; it has ${this._steps.length}.`);await this._go(e,1)}}stop(){this._running&&(this._run++,this._teardown(),this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`))}async _locate(e,t,n){let r=this._steps;for(let i=e;i>=0&&i<r.length;i+=t){let e=r[i];if(await this._beforeStep(e,i),n!==this._run)return null;if(!e.target)return{index:i,target:null};let t=document.querySelector(e.target);if(h(t))return{index:i,target:t}}return null}async _beforeStep(e,t){let n=[];this.dispatchEvent(new CustomEvent(`wui-tour:beforestep`,{bubbles:!0,detail:{step:e,index:t,wait:e=>n.push(e)}})),await Promise.all(n),typeof this.onBeforeStep==`function`&&await this.onBeforeStep(e,t)}_build(){let e=`wui-tour-${++p}`,n=document.createElement(`div`);n.className=`wui-tour-layer`,n.innerHTML=`
|
|
156
|
-
<div class="wui-tour-spot" aria-hidden="true"></div>
|
|
157
|
-
<div class="wui-tour-card" role="dialog" aria-modal="true" tabindex="-1" aria-labelledby="${e}-title" aria-describedby="${e}-text">
|
|
158
|
-
<p class="wui-tour-position"></p>
|
|
159
|
-
<h2 class="wui-tour-title" id="${e}-title"></h2>
|
|
160
|
-
<p class="wui-tour-text" id="${e}-text"></p>
|
|
161
|
-
<div class="wui-tour-actions">
|
|
162
|
-
<button type="button" class="btn btn-sm btn-link wui-tour-skip"></button>
|
|
163
|
-
<div class="wui-tour-nav">
|
|
164
|
-
<button type="button" class="btn btn-sm btn-outline-secondary wui-tour-back"></button>
|
|
165
|
-
<button type="button" class="btn btn-sm btn-primary wui-tour-next"></button>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
<div class="visually-hidden" role="status" aria-live="polite"></div>`;let r=n;this._shadow=null,this.isolated&&(r=document.createElement(s),this._shadow=r.attachShadow({mode:`open`}),y(this._shadow),this._shadow.appendChild(n)),document.body.appendChild(r),document.documentElement.setAttribute(i,``),this._outer=r,this._layer=n,this._spot=n.querySelector(`.wui-tour-spot`),this._card=n.querySelector(`.wui-tour-card`),this._live=n.querySelector(`[role=status]`),this._card.querySelector(`.wui-tour-skip`).addEventListener(`click`,()=>this._close(`skipped`)),this._card.querySelector(`.wui-tour-back`).addEventListener(`click`,()=>this._move(-1)),this._card.querySelector(`.wui-tour-next`).addEventListener(`click`,()=>this._move(1)),this._shadow&&this._card.removeAttribute(`aria-modal`),this._onKey=e=>this._key(e),this._onFocusIn=e=>{this._layer&&!this._layer.contains(e.target)&&this._card.focus()},document.addEventListener(`keydown`,this._onKey,!0),this._shadow||document.addEventListener(`focusin`,this._onFocusIn),t(r,()=>this._place())}_active(){return this._shadow?this._shadow.activeElement:document.activeElement}_show(e){this._current=e;let{index:t,target:n}=e,r=this._steps[t],i=this._steps,a=t===i.length-1,o=this._card;o.querySelector(`.wui-tour-position`).textContent=`Step ${t+1} of ${i.length}`;let s=o.querySelector(`.wui-tour-title`);s.textContent=r.title||``,s.hidden=!r.title,o.querySelector(`.wui-tour-text`).textContent=r.description||``,o.querySelector(`.wui-tour-skip`).textContent=this._label(`skip`),o.querySelector(`.wui-tour-back`).textContent=this._label(`back`),o.querySelector(`.wui-tour-back`).hidden=t<=this._firstIndex,o.querySelector(`.wui-tour-next`).textContent=this._label(a?`done`:`next`),this._live.textContent=[`Step ${t+1} of ${i.length}`,r.title,r.description].filter(Boolean).join(`. `),this._scrollTo(n),this._place();let c=this._active();(o.contains(c)?!c.hidden:this._shadow!==null&&g(_()))||o.focus(),this.dispatchEvent(new CustomEvent(`wui-tour:step`,{bubbles:!0,detail:{step:r,index:t}}))}_scrollTo(e){if(!e?.scrollIntoView)return;this._card.style.maxHeight=``;let t=this._card.offsetHeight+f*2;if(e.getBoundingClientRect().height+d*2+t*2<=window.innerHeight){e.scrollIntoView({block:`center`,inline:`nearest`});return}let n=e.style.scrollMarginTop;e.style.scrollMarginTop=`${t+d}px`,e.scrollIntoView({block:`start`,inline:`nearest`}),e.style.scrollMarginTop=n}_place(){if(!this._current||!this._layer)return;let e=this._spot.style,t=this._card.style;if(!this._current.target){e.top=`50%`,e.left=`50%`,e.width=`0px`,e.height=`0px`,e.boxShadow=`0 0 0 100vmax var(--color-scrim-strong)`,this._card.classList.remove(`drop-up`),t.position=`fixed`,t.top=`50%`,t.left=`50%`,t.transform=`translate(-50%, -50%)`,t.maxHeight=`calc(100vh - 16px)`;return}e.boxShadow=``,t.transform=``;let n=this._current.target.getBoundingClientRect(),i={top:n.top-d,left:n.left-d,width:n.width+d*2,height:n.height+d*2,bottom:n.bottom+d,right:n.right+d};e.top=`${i.top}px`,e.left=`${i.left}px`,e.width=`${i.width}px`,e.height=`${i.height}px`;let a=this._card.scrollTop;t.maxHeight=``;let o=this._card.offsetHeight,s=window.innerHeight-f*2,c=Math.max(i.top,window.innerHeight-i.bottom)-f*2,l=Math.min(n.bottom,window.innerHeight)-Math.max(n.top,0);o<=c+1||l<Math.min(o,s)+f*2?r({getBoundingClientRect:()=>i},this._card,{clampHeight:!0}):this._placeOver(n,o,s),this._card.scrollTop=a}_placeOver(e,t,n){let r=this._card;r.classList.remove(`drop-up`),r.style.position=`fixed`,r.style.maxHeight=t>n?`${Math.max(n,0)}px`:``;let i=Math.min(e.bottom,window.innerHeight)-f;r.style.top=`${Math.max(f,i-Math.min(t,n))}px`;let a=Math.min(e.left+f,window.innerWidth-r.offsetWidth-f);r.style.left=`${Math.max(f,a)}px`}async _move(e){this._current&&await this._go(this._current.index+e,e)}async _go(e,t){if(!this._current||this._moving)return;this._moving=!0;let n=this._run;try{let r=await this._locate(e,t,n);if(n!==this._run)return;r?this._show(r):t>0&&await this._close(`finished`)}finally{this._moving=!1}}_key(e){if(!(!this._layer||e.altKey||e.ctrlKey||e.metaKey)){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this._close(`skipped`);else if(e.key===`ArrowRight`||e.key===`ArrowLeft`){if(this._shadow&&g(e.composedPath?.()[0]??e.target))return;e.preventDefault(),e.key===`ArrowRight`?this._move(1):this._current.index>this._firstIndex&&this._move(-1)}else if(e.key===`Tab`&&!this._shadow){let t=Array.from(this._card.querySelectorAll(`button`)).filter(e=>!e.hidden),n=t[0],r=t[t.length-1],i=this._active();!this._card.contains(i)||e.shiftKey&&(i===n||i===this._card)?(e.preventDefault(),(e.shiftKey?r:n).focus()):!e.shiftKey&&i===r&&(e.preventDefault(),n.focus())}}}_teardown(){if(!this._layer)return;document.removeEventListener(`keydown`,this._onKey,!0),document.removeEventListener(`focusin`,this._onFocusIn);let e=!this._shadow||this._shadow.activeElement!==null||!document.activeElement||document.activeElement===document.body;n(this._outer),this._outer.remove(),document.documentElement.removeAttribute(i),this._outer=null,this._shadow=null,this._layer=null,this._current=null;let t=this._returnFocus;this._returnFocus=null,e&&t?.isConnected&&t.focus?.()}async _close(e){let t=this._run;this._teardown();let n=this._store();try{n&&t===this._run&&await n.markSeen(this.tourId)}finally{this._finish(e)}}_finish(e){this._run++,this._running=!1,this.hasAttribute(`open`)&&this.removeAttribute(`open`),this.dispatchEvent(new CustomEvent(`wui-tour:close`,{bubbles:!0,detail:{reason:e}}))}};export{m as n,b as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif`,t=10,n=512,r=`image/webp`,i=[96,48],a={dialogTitle:`Edit photo`,dialogSubtitle:`Drag to position the photo, then zoom or rotate it.`,save:`Save photo`,cancel:`Cancel`,choose:`Upload photo`,change:`Change photo`,camera:`Take photo`,remove:`Remove photo`,unreadable:`That photo could not be opened. Choose a JPG, PNG or WebP image.`,heicUnreadable:`This browser cannot open HEIC photos. Choose a JPG, PNG or WebP image instead.`,cropFailed:`That photo could not be saved. Try again, or choose another one.`};function o(e){if(!e)return!1;let t=String(e.type||``).toLowerCase();return t===`image/heic`||t===`image/heif`||/\.hei[cf]$/i.test(String(e.name||``))}function s(e){return o(e)?a.heicUnreadable:a.unreadable}function c(e,t){let n=Number(t);return{name:e?.name||`photo`,type:r,size:Number.isInteger(n)&&n>0?n:512}}var l=2e3;async function u(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),!!n}catch{return!1}}var d=`image/png,image/jpeg,image/webp`,f=5,p={"image/png":[`.png`],"image/jpeg":[`.jpg`,`.jpeg`],"image/webp":[`.webp`],"image/gif":[`.gif`],"image/svg+xml":[`.svg`],"image/heic":[`.heic`],"image/heif":[`.heif`],"application/pdf":[`.pdf`],"text/plain":[`.txt`]},m={"image/png":`PNG`,"image/jpeg":`JPG`,"image/webp":`WEBP`,"image/gif":`GIF`,"image/svg+xml":`SVG`,"image/heic":`HEIC`,"image/heif":`HEIC`,"application/pdf":`PDF`,"text/plain":`text file`,".png":`PNG`,".jpg":`JPG`,".jpeg":`JPG`,".webp":`WEBP`,".gif":`GIF`,".svg":`SVG`,".heic":`HEIC`,".heif":`HEIC`,".pdf":`PDF`,".txt":`text file`},h=e=>String(e||``).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean),g=[`.png`,`.jpg`,`.jpeg`,`.webp`,`.gif`,`.svg`,`.bmp`,`.avif`,`.heic`,`.heif`];function _(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t.startsWith(`image/`);let n=typeof e==`string`?e:e.name||e.url||``,r=String(n).toLowerCase();return g.some(e=>r.endsWith(e))}function v(e){if(!e)return!1;let t=typeof e==`object`&&e.type?String(e.type).toLowerCase():``;if(t)return t===`application/pdf`;let n=typeof e==`string`?e:e.name||e.url||``;return String(n).toLowerCase().split(/[?#]/)[0].endsWith(`.pdf`)}function y(e){let t=h(e);return t.length?t.every(e=>e.startsWith(`.`)?g.includes(e):e===`image/*`||e.startsWith(`image/`)):!1}function b(e){let t=[];for(let n of h(e)){let e=m[n]||(n.startsWith(`.`)?n.slice(1).toUpperCase():n.toUpperCase());t.includes(e)||t.push(e)}return t.length<=1?t[0]||`supported`:`${t.slice(0,-1).join(`, `)} or ${t[t.length-1]}`}function x(e,t){let n=h(t);if(!n.length)return!0;let r=(e.type||``).toLowerCase(),i=(e.name||``).toLowerCase();return n.some(e=>e.startsWith(`.`)?i.endsWith(e):e.endsWith(`/*`)?r.startsWith(e.slice(0,-1)):r&&r===e?!0:!r&&(p[e]||[]).some(e=>i.endsWith(e)))}function S(e,t={}){if(!e)return null;let n=t.accept===void 0?d:t.accept,r=t.maxSizeMb===void 0?5:t.maxSizeMb;if(!x(e,n)){let e=b(n);return`Choose a ${e.endsWith(` file`)?e:`${e} file`}.`}return r>0&&e.size>r*1024*1024?`Keep the file under ${r} MB.`:null}var C=/[0-9]/,w={9:C,A:/[A-Za-z]/,"*":/[0-9A-Za-z]/},T=/[9A*]/,E=new Set([`text`,`tel`,`search`,`url`,`password`]),D=e=>{let t=e.replace(/\D/g,``);return t.length===12&&t.startsWith(`91`)?t.slice(2):t.length===11&&t.startsWith(`0`)?t.slice(1):e},O=e=>{let t=Number(e.slice(0,2)),n=Number(e.slice(2,4)),r=Number(e.slice(4,8));if(r<1)return!1;let i=new Date(Date.UTC(r,n-1,t));return i.getUTCFullYear()===r&&i.getUTCMonth()===n-1&&i.getUTCDate()===t},k=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,A=e=>{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());return t?`${t[3]}-${t[2]}-${t[1]}`:e};function j(e,{upper:t=!1,normalize:n,valid:r,post:i=e=>e,message:a=`Enter the full value`}={}){let o=[...e].map(e=>w[e]?{re:w[e]}:{lit:e}),s=o.filter(e=>e.re).length;return{inputMode:o.every(e=>!e.re||e.re===C)?`numeric`:`text`,normalize:n,post:i,message:a,extract(e){let n=``,r=0;for(let i of e){for(;r<o.length&&o[r].lit!==void 0&&o[r].lit!==i;)r++;if(r>=o.length)break;let e=o[r];e.lit===void 0?e.re.test(i)&&(n+=t?i.toUpperCase():i,r++):r++}return n},layout(e){let t=``,n=[],r=0;for(let i=0;i<o.length&&r<e.length;i++)o[i].lit===void 0?(t+=e[r++],n.push(!0)):(t+=o[i].lit,n.push(!1));return{text:t,isRaw:n}},isValid:e=>e.length===s&&(!r||r(e))}}function M(){return{inputMode:`decimal`,post:e=>e,message:`Enter a valid amount`,extract(e){let t=``,n=!1,r=0;for(let i of e)C.test(i)?n?r<2&&(t+=i,r++):t+=i:i===`.`&&!n&&(n=!0,t+=i);return t.startsWith(`.`)&&(t=`0${t}`),t.replace(/^0+(?=\d)/,``)},layout(e){let[t,n]=e.split(`.`),r=k(t)+(e.includes(`.`)?`.${n}`:``);return{text:r,isRaw:[...r].map(e=>e!==`,`)}},isValid:e=>/^\d+(\.\d{1,2})?$/.test(e)}}var N={"phone-in":()=>j(`99999 99999`,{normalize:D,valid:e=>/^[6-9]/.test(e),message:`Enter a 10-digit mobile number`}),pan:()=>j(`AAAAA9999A`,{upper:!0,valid:e=>/^[A-Z]{5}\d{4}[A-Z]$/.test(e),message:`Enter a valid PAN`}),gstin:()=>j(`99AAAAA9999A***`,{upper:!0,valid:e=>/^\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(e),message:`Enter a valid GSTIN`}),aadhaar:()=>j(`9999 9999 9999`,{valid:e=>/^[2-9]/.test(e),message:`Enter a valid 12-digit Aadhaar number`}),ifsc:()=>j(`AAAA*******`,{upper:!0,valid:e=>/^[A-Z]{4}0[A-Z0-9]{6}$/.test(e),message:`Enter a valid IFSC`}),"pin-code":()=>j(`999999`,{valid:e=>/^[1-9]/.test(e),message:`Enter a valid 6-digit PIN code`}),date:()=>j(`99-99-9999`,{normalize:A,valid:O,post:(e,t)=>e.length===8&&O(e)?`${e.slice(4)}-${e.slice(2,4)}-${e.slice(0,2)}`:t,message:`Enter a valid date as DD-MM-YYYY`}),amount:M},ee=Object.keys(N),te=e=>{let t=String(e).toLowerCase();return Object.hasOwn(N,t)?t:void 0},ne=e=>T.test(String(e))&&te(e)===void 0,P=new Map;function F(e){if(e==null||e===``)return null;let t=String(e);return P.has(t)||(ne(t)?P.set(t,j(t)):P.set(t,Object.hasOwn(N,t)?N[t]():null)),P.get(t)}var I=(e,t)=>e.normalize?e.normalize(t):t;function re(e,t){let n=F(e);return n?n.extract(I(n,String(t??``))):String(t??``)}function ie(e,t){let n=F(e);if(!n)return String(t??``);let r=n.extract(I(n,String(t??``)));return n.post(r,n.layout(r).text)}function ae(e,t){let n=F(e);return n?n.layout(n.extract(I(n,String(t??``)))).text:String(t??``)}var oe=(e,t)=>{if(t<=0)return 0;let n=0;for(let r=0;r<e.length;r++)if(e[r]&&++n===t)return r+1;return e.length},L=new WeakMap,R=e=>L.get(e)?.(),se=new WeakMap;function ce(e,t,n,r){let i=e.getAll(t),a=se.get(e);a||se.set(e,a=new Set);let o=i.findIndex((e,r)=>e===n&&!a.has(`${t}\u0000${r}`));if(!(o<0)){if(a.add(`${t}\u0000${o}`),i[o]=r,i.length===1){e.set(t,r);return}e.delete(t);for(let n of i)e.append(t,n)}}function le(e){let t=null,n=null,r=!1,i=(t,n)=>n===null?e.removeAttribute(t):e.setAttribute(t,n),a,o,s=()=>{t?.remove(),t=null,n&&(n.hidden=!1),n=null,r&&e.classList.remove(`error`),r=!1,a!==void 0&&i(`aria-invalid`,a),o!==void 0&&i(`aria-describedby`,o),a=void 0,o=void 0};return i=>{if(!i){s();return}let c=e.closest(`.field`),l=c?.querySelector(`.field-error`);l&&l!==t&&l.textContent.trim()||(t||(r=!e.classList.contains(`error`),e.classList.add(`error`),a=e.getAttribute(`aria-invalid`),o=e.getAttribute(`aria-describedby`),c&&(t=document.createElement(`div`),t.className=`field-error`,e.id&&(t.id=`${e.id}-error`),n=c.querySelector(`.field-hint`),n&&(n.hidden=!0),c.insertBefore(t,[...c.children].find(e=>e.classList.contains(`field-count`))??null),t.id&&e.setAttribute(`aria-describedby`,t.id)),e.setAttribute(`aria-invalid`,`true`)),t&&(t.textContent=i))}}function ue(e,{mask:t,postFormatted:n=!1,onChange:r,onInvalidChange:i}={}){let a=F(t);if(!a||!E.has(e.type))return()=>{};let o=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(o,`value`).set,c=!e.hasAttribute(`inputmode`);c&&e.setAttribute(`inputmode`,a.inputMode);let l=i??le(e),u=null,d=!1,f=!1,p=!1,m=``,h=``,g,_=()=>{let e=p?m:``;e!==h&&(h=e,l(h))},v=(t,n,i)=>{let o=a.extract(t.slice(0,n)).length,c=a.extract(t),{text:l,isRaw:d}=a.layout(c);if(e.value!==l&&(s.call(e,l),document.activeElement===e&&E.has(e.type))){let t=oe(d,o);e.setSelectionRange(t,t)}e.dataset.maskRaw=c,m=c&&!a.isValid(c)?a.message:``,e.setCustomValidity(m),_(),i&&c!==u&&r?.(c,l),u=c},y=Object.getOwnPropertyDescriptor(e,`value`),b=y??Object.getOwnPropertyDescriptor(o,`value`);Object.defineProperty(e,"value",{configurable:!0,enumerable:b.enumerable,get:()=>b.get.call(e),set:t=>{if(b.set.call(e,t),f)return;let n=I(a,e.value);v(n,n.length,!0)}});let x=()=>{d=!0,e.dispatchEvent(new Event(`input`,{bubbles:!0})),d=!1},S=t=>{if(d||f||t.isComposing)return;let n=t.inputType===`insertText`&&(t.data?.length??0)<=1||t.inputType?.startsWith(`delete`)?e.value:I(a,e.value);v(n,e.selectionStart??n.length,!0)},C=()=>{f=!0},w=()=>{f=!1;let t=I(a,e.value);v(t,e.selectionStart??t.length,!0),x()},T=t=>{let n=t.inputType===`deleteContentBackward`;if(!n&&t.inputType!==`deleteContentForward`||t.isComposing)return;let r=e.selectionStart;if(r==null||r!==e.selectionEnd)return;let{isRaw:i}=a.layout(a.extract(e.value)),o=n?r-1:r;for(;o>=0&&o<i.length&&!i[o];)o+=n?-1:1;o!==(n?r-1:r)&&(t.preventDefault(),!(o<0||o>=i.length)&&(v(e.value.slice(0,o)+e.value.slice(o+1),n?o:r,!0),x()))},D=t=>{if(e.readOnly||e.disabled)return;let n=t.clipboardData?.getData(`text`);if(n==null)return;t.preventDefault();let r=I(a,n),i=e.selectionStart??e.value.length,o=e.selectionEnd??i;v(e.value.slice(0,i)+r+e.value.slice(o),i+r.length,!0),x()},O=()=>{let t=a.extract(e.value);return a.post(t,a.layout(t).text)},k=()=>{p=!0,_()};e.addEventListener(`input`,S),e.addEventListener(`beforeinput`,T),e.addEventListener(`paste`,D),e.addEventListener(`compositionstart`,C),e.addEventListener(`compositionend`,w),e.addEventListener(`blur`,k),e.addEventListener(`invalid`,k);let A=e.form,j=t=>{e.name&&!e.disabled&&ce(t.formData,e.name,e.value,O())},M=()=>{clearTimeout(g),g=setTimeout(()=>{p=!1,v(I(a,e.value),e.value.length,!0)},0)};n||(A?.addEventListener(`formdata`,j),L.set(e,O)),A?.addEventListener(`reset`,M),A?.addEventListener(`submit`,k);let N=I(a,e.value);return v(N,N.length,!1),()=>{clearTimeout(g),e.removeEventListener(`input`,S),e.removeEventListener(`beforeinput`,T),e.removeEventListener(`paste`,D),e.removeEventListener(`compositionstart`,C),e.removeEventListener(`compositionend`,w),e.removeEventListener(`blur`,k),e.removeEventListener(`invalid`,k),A?.removeEventListener(`formdata`,j),A?.removeEventListener(`reset`,M),A?.removeEventListener(`submit`,k),L.delete(e),y?Object.defineProperty(e,"value",y):delete e.value,p=!1,m=``,_(),e.setCustomValidity(``),delete e.dataset.maskRaw,c&&e.removeAttribute(`inputmode`)}}function de(){let e=typeof window>`u`?void 0:window.jQuery?.validator?.prototype;if(!e||e.wuiMaskHook)return;let t=e.elementValue;e.elementValue=function(e){let n=R(e);return n===void 0?t.call(this,e):n},e.wuiMaskHook=!0}var z=new WeakMap,B,V=e=>{z.has(e)||z.set(e,ue(e,{mask:e.dataset.appMask,postFormatted:e.hasAttribute(`data-mask-post-formatted`)}))},fe=e=>e.nodeType===1?[...e.matches(`input[data-app-mask]`)?[e]:[],...e.querySelectorAll(`input[data-app-mask]`)]:[];function pe(){B||typeof MutationObserver>`u`||(B=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of fe(e))z.get(t)?.(),z.delete(t);for(let e of t.addedNodes)for(let t of fe(e))V(t)}}),B.observe(document.documentElement,{childList:!0,subtree:!0}))}function me(e=document){de();for(let t of e.querySelectorAll(`input[data-app-mask]`))V(t);e===document&&pe()}var H={minLength:10,uppercase:!0,lowercase:!0,digit:!0,special:!0,uniqueChars:0,customRules:[]},he=`Password requirements`;function ge(e){return e===!0||e==null?{...H}:{...H,...e}}function _e(e){let t=ge(e),n=[];if(t.minLength>0&&n.push({key:`length`,label:`At least ${t.minLength} characters long`,test:e=>e.length>=t.minLength}),t.uppercase&&n.push({key:`uppercase`,label:`At least one uppercase letter`,test:e=>/[A-Z]/.test(e)}),t.lowercase&&n.push({key:`lowercase`,label:`At least one lowercase letter`,test:e=>/[a-z]/.test(e)}),t.digit&&n.push({key:`digit`,label:`At least one digit`,test:e=>/[0-9]/.test(e)}),t.special&&n.push({key:`special`,label:`At least one special character`,test:e=>/[^A-Za-z0-9]/.test(e)}),t.uniqueChars>0){let e=t.uniqueChars;n.push({key:`unique`,label:`At least ${e} unique character${e>1?`s`:``}`,test:t=>new Set(t).size>=e})}for(let[e,r]of(t.customRules??[]).entries()){let t=new RegExp(r.pattern);n.push({key:`custom-${e}`,label:r.label,test:e=>t.test(e)})}return n}function ve(e,t){let n=e==null?``:String(e);return _e(t).map(e=>({key:e.key,label:e.label,met:e.test(n)}))}function ye(e,t){return ve(e,t).every(e=>e.met)}var U=`.table-wrap, .table-responsive, [class*="table-responsive-"]`,W=1;function be(e){let t=()=>{let t=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft);e.toggleAttribute(`data-wui-overflow-start`,t>W&&n>W),e.toggleAttribute(`data-wui-overflow-end`,t>W&&n<t-W)};e.addEventListener(`scroll`,t,{passive:!0});let n=null;if(typeof ResizeObserver<`u`){n=new ResizeObserver(t),n.observe(e);for(let t of e.children)n.observe(t)}return t(),()=>{e.removeEventListener(`scroll`,t),n?.disconnect(),e.removeAttribute(`data-wui-overflow-start`),e.removeAttribute(`data-wui-overflow-end`)}}var G=new WeakMap,K,q=e=>{G.has(e)||G.set(e,be(e))},xe=e=>e.nodeType===1?[...e.matches(`.table-wrap, .table-responsive, [class*="table-responsive-"]`)?[e]:[],...e.querySelectorAll(U)]:[];function Se(){K||typeof MutationObserver>`u`||(K=new MutationObserver(e=>{for(let t of e){for(let e of t.removedNodes)for(let t of xe(e))G.get(t)?.(),G.delete(t);for(let e of t.addedNodes)for(let t of xe(e))q(t)}}),K.observe(document.documentElement,{childList:!0,subtree:!0}))}function Ce(e=document){for(let t of e.querySelectorAll(U))q(t);e===document&&Se()}var we=[`light`,`dark`,`auto`],Te=[`wave`,`circle`,`slide`,`blinds`,`fade`,`none`],Ee=`wave`,J=`theme`,Y={wave:1100,circle:700,slide:600,blinds:900,fade:350,none:0},X=`wui-theme-switching`,De=`wui:theme:change`,Oe=`wui-theme-toggle`,ke=`(prefers-color-scheme: dark)`,Ae=e=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(e).matches,je=e=>we.includes(e);function Me(e){return e===`dark`||e===`auto`&&Ae(ke)?`dark`:`light`}function Ne(e=J){let t=null;try{t=window.localStorage.getItem(e)}catch{}return je(t)?t:`auto`}function Pe(e,t=J){try{window.localStorage.setItem(t,e)}catch{}}function Fe(e){let t=document.documentElement,n=Me(e);t.setAttribute(`data-theme`,e),t.setAttribute(`data-bs-theme`,n),document.dispatchEvent(new CustomEvent(De,{detail:{mode:n,preference:e}}))}var Ie=`(function(k){var m;try{m=localStorage.getItem(k)}catch{}if(m!=='light'&&m!=='dark')m='auto';var r=document.documentElement,q=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null;function s(){var t=r.getAttribute('data-theme');r.setAttribute('data-bs-theme',t==='auto'?(q&&q.matches?'dark':'light'):t)}r.setAttribute('data-theme',m);s();if(q&&q.addEventListener)q.addEventListener('change',function(){if(r.getAttribute('data-theme')==='auto')s()})})(`;function Le(e=J){return`${Ie}${JSON.stringify(String(e)).replace(/</g,`\\u003c`)})`}function Re(e,{includeAuto:t=!1}={}){return e===`light`?`dark`:e===`dark`&&t?`auto`:`light`}function ze(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(ke),n=()=>e(t.matches?`dark`:`light`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Z=60,Be=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,Q=e=>e.toFixed(1),$=(e,t)=>`${Q(e)}px ${Q(t)}px`,Ve={amplitude:22,segments:36,cycles:1.5,ripples:2},He=6,Ue=(e,t,n,r,i)=>{let{amplitude:a,segments:o,cycles:s}=Ve,c=n*(t+2*a),l=i?t+a-c:c-a,u=i?t+2*a:-2*a,d=[$(0,u)];for(let t=0;t<=o;t++){let n=e*t/o,i=l+a*Math.sin(2*Math.PI*s*t/o+r);d.push($(n,i))}return d.push($(e,u)),`polygon(${d.join(`, `)})`},We=(e,t,n,r)=>{let i=t/He,a=[];for(let t=0;t<He;t++){let o=t*i,s=i*n,c=r?o+i-s:o,l=r?o+i:o+s;a.push($(0,c),$(e,c),$(e,l),$(0,l))}return`polygon(${a.join(`, `)})`};function Ge(e,{width:t,height:n,to:r=`dark`,origin:i}={}){let a=r===`dark`,o=[];for(let r=0;r<=Z;r++){let s=r/Z,c=Be(s);switch(e){case`circle`:{let e=i?.x??t/2,r=i?.y??n/2,a=Math.hypot(Math.max(e,t-e),Math.max(r,n-r));o.push({clipPath:`circle(${Q(a*c)}px at ${Q(e)}px ${Q(r)}px)`});break}case`slide`:{let e=n*(1-c);o.push({clipPath:a?`inset(${Q(e)}px 0px 0px 0px)`:`inset(0px 0px ${Q(e)}px 0px)`});break}case`blinds`:o.push({clipPath:We(t,n,c,a)});break;case`fade`:o.push({clipPath:`none`,opacity:c});break;case`none`:return[];default:o.push({clipPath:Ue(t,n,c,s*Ve.ripples*2*Math.PI,a)})}}return o}function Ke(e,{effect:t=Ee,to:n,origin:r,duration:i,live:a}={}){let o=document.documentElement,s=n!==void 0&&o.getAttribute(`data-bs-theme`)===n;if(t===`none`||s||Ae(`(prefers-reduced-motion: reduce)`)||typeof document.startViewTransition!=`function`||typeof o.animate!=`function`)return e(),Promise.resolve(!1);o.classList.add(X);let c=a instanceof Element?a:null;c&&(c.style.viewTransitionName=Oe);let l=document.startViewTransition(e),u=i??Y[t]??Y.wave;return l.ready.then(()=>{let e=Ge(t,{width:window.innerWidth,height:window.innerHeight,to:n,origin:r});o.animate(e,{duration:u,easing:`linear`,fill:`both`,pseudoElement:`::view-transition-new(root)`})}).catch(()=>{}),l.finished.catch(()=>{}).then(()=>(o.classList.remove(X),c&&(c.style.viewTransitionName=``),!0))}export{c as $,ae as A,_ as B,he as C,E as D,ye as E,re as F,l as G,v as H,F as I,t as J,u as K,d as L,ne as M,R as N,ee as O,ie as P,a as Q,f as R,H as S,ve as T,x as U,y as V,S as W,r as X,n as Y,i as Z,Ke as _,Te as a,be as b,we as c,Re as d,s as et,Ne as f,Ge as g,Le as h,De as i,me as j,ue as k,X as l,Pe as m,J as n,Y as o,Me as p,e as q,Ie as r,Oe as s,Ee as t,o as tt,Fe as u,ze as v,_e as w,Ce as x,U as y,b as z};
|