From 84a8d9bd1d0a91449021321399cfba7455aa427e Mon Sep 17 00:00:00 2001 From: capdiem Date: Mon, 15 Jul 2024 15:37:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix(Select):=20revert=20the?= =?UTF-8?q?=20changes=20that=20using=20Virtualize=20for=20rendering=20the?= =?UTF-8?q?=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Masa.Blazor.JS/src/interop.ts | 13 +++++-- src/Masa.Blazor/Components/Menu/MMenu.razor | 1 + .../Components/Menu/MMenu.razor.cs | 2 ++ .../Components/Select/MSelect.razor | 3 +- .../Components/Select/MSelect.razor.cs | 36 ++++++++++++++++++- .../Components/Select/MSelectList.razor | 8 ++--- .../JSInterop/JsInteropConstants.cs | 6 ++++ src/Masa.Blazor/Mixins/Menuable/MMenuable.cs | 1 - .../Mixins/Menuable/MenuablePosition.cs | 1 - src/Masa.Blazor/wwwroot/js/masa-blazor.js | 2 +- src/Masa.Blazor/wwwroot/js/masa-blazor.js.map | 2 +- 11 files changed, 63 insertions(+), 12 deletions(-) diff --git a/src/Masa.Blazor.JS/src/interop.ts b/src/Masa.Blazor.JS/src/interop.ts index 597f9a2855..dcd7ceb151 100644 --- a/src/Masa.Blazor.JS/src/interop.ts +++ b/src/Masa.Blazor.JS/src/interop.ts @@ -1044,7 +1044,7 @@ export function getMenuableDimensions(hasActivator, activatorSelector, isDefault var dimensions = { activator: {} as any, - content: {}, + content: {} as any, relativeYOffset: 0, offsetParentLeft: 0 }; @@ -1077,6 +1077,8 @@ export function getMenuableDimensions(hasActivator, activatorSelector, isDefault } dimensions.content = measure(contentElement, isDefaultAttach) + dimensions.content.offsetLeft = contentElement.offsetLeft + dimensions.content.offsetTop = contentElement.offsetTop } }, contentElement); @@ -1108,7 +1110,7 @@ function measure(el: HTMLElement, isDefaultAttach) { return rect } -function getRoundedBoundedClientRect(el: Element) { +function getRoundedBoundedClientRect(el: Element): any { if (!el || !el.nodeType) { return null } @@ -1592,3 +1594,10 @@ export function unregisterTableScrollEvent(wrapper: HTMLElement) { delete wrapper["_m_table_scroll_event"] } } + +export function isScrollNearBottom(element: HTMLElement, threshold: number = 200) { + if (!element) { + return false; + } + return element.scrollHeight - (element.scrollTop + element.clientHeight) < threshold; +} \ No newline at end of file diff --git a/src/Masa.Blazor/Components/Menu/MMenu.razor b/src/Masa.Blazor/Components/Menu/MMenu.razor index 693fd3d2da..57b5754d27 100644 --- a/src/Masa.Blazor/Components/Menu/MMenu.razor +++ b/src/Masa.Blazor/Components/Menu/MMenu.razor @@ -41,6 +41,7 @@ Style="@style" Class="@css" id="@_contentId" + onscroll="@OnScroll" ReferenceCaptureAction="el => ContentElement = el"> @ChildContent diff --git a/src/Masa.Blazor/Components/Menu/MMenu.razor.cs b/src/Masa.Blazor/Components/Menu/MMenu.razor.cs index 386ecb191f..8f2f2d7bc2 100644 --- a/src/Masa.Blazor/Components/Menu/MMenu.razor.cs +++ b/src/Masa.Blazor/Components/Menu/MMenu.razor.cs @@ -34,6 +34,8 @@ public bool CloseOnContentClick [Parameter] [MasaApiParameter("auto")] public StringNumber MaxHeight { get; set; } = "auto"; + [Parameter] public EventCallback OnScroll { get; set; } + [Parameter] public EventCallback OnOutsideClick { get; set; } [Parameter] public string? Origin { get; set; } diff --git a/src/Masa.Blazor/Components/Select/MSelect.razor b/src/Masa.Blazor/Components/Select/MSelect.razor index a76dde8aec..8c456258be 100644 --- a/src/Masa.Blazor/Components/Select/MSelect.razor +++ b/src/Masa.Blazor/Components/Select/MSelect.razor @@ -169,6 +169,7 @@ Right="@ComputedMenuProps.Right" Top="@ComputedMenuProps.Top" Transition="@ComputedMenuProps.Transition" + OnScroll="@OnMenuScroll" @ref="@MMenu"> @GenSelectList() @@ -191,7 +192,7 @@ Color="@ItemColor" Dense="@Dense" HideSelected="@HideSelected" - Items="@ComputedItems" + Items="@VirtualizedItems" ItemDisabled="@ItemDisabled" ItemText="@ItemText" ItemValue="@ItemValue" diff --git a/src/Masa.Blazor/Components/Select/MSelect.razor.cs b/src/Masa.Blazor/Components/Select/MSelect.razor.cs index 5a73a8caf9..541fdeb38d 100644 --- a/src/Masa.Blazor/Components/Select/MSelect.razor.cs +++ b/src/Masa.Blazor/Components/Select/MSelect.razor.cs @@ -1,6 +1,5 @@ using System.Linq.Expressions; using Masa.Blazor.Components.Input; -using Masa.Blazor.Mixins; using StyleBuilder = Masa.Blazor.Core.StyleBuilder; namespace Masa.Blazor; @@ -155,6 +154,8 @@ protected BMenuProps ComputedMenuProps protected List AllItems => FilterDuplicates(CachedItems.Concat(Items)).ToList(); protected virtual List ComputedItems => AllItems; + + private List VirtualizedItems => MMenu?.Auto is true ? ComputedItems : ComputedItems.Take(lastItem).ToList(); protected List ComputedItemsIfHideSelected => HideSelected ? ComputedItems.Where(item => !SelectedItems.Contains(item)).ToList() : ComputedItems; @@ -734,6 +735,39 @@ protected virtual async Task OnTabDown(KeyboardEventArgs args) } } + private int lastItem = 20; + private CancellationTokenSource? _scrollCts; + + private async Task OnMenuScroll(WheelEventArgs args) + { + try + { + if (!IsMenuActive || lastItem > ComputedItems.Count) + { + return; + } + + _scrollCts?.Cancel(); + _scrollCts = new CancellationTokenSource(); + await Task.Delay(16, _scrollCts.Token); + + var content = MMenu?.Dimensions.Content; + if (content is not null) + { + var showMoreItems = await Js.InvokeAsync(JsInteropConstants.IsScrollNearBottom, MMenu!.ContentElement, 200); + if (showMoreItems) + { + lastItem += 20; + StateHasChanged(); + } + } + } + catch (TaskCanceledException) + { + // ignored + } + } + public override async Task HandleOnBlurAsync(FocusEventArgs args) { if (OnBlur.HasDelegate) diff --git a/src/Masa.Blazor/Components/Select/MSelectList.razor b/src/Masa.Blazor/Components/Select/MSelectList.razor index 61817a925f..87285b2214 100644 --- a/src/Masa.Blazor/Components/Select/MSelectList.razor +++ b/src/Masa.Blazor/Components/Select/MSelectList.razor @@ -3,7 +3,6 @@ @typeparam TItem @typeparam TItemValue @typeparam TValue -@using Microsoft.AspNetCore.Components.Web.Virtualization 0) { - - + @foreach(var item in computedItems) + { + @VirtualizeItemContent(item) + } } else { diff --git a/src/Masa.Blazor/JSInterop/JsInteropConstants.cs b/src/Masa.Blazor/JSInterop/JsInteropConstants.cs index 767f1c6225..760bb261b5 100644 --- a/src/Masa.Blazor/JSInterop/JsInteropConstants.cs +++ b/src/Masa.Blazor/JSInterop/JsInteropConstants.cs @@ -167,4 +167,10 @@ public static class JsInteropConstants internal static string RegisterTableScrollEvent => $"{JsInteropFuncNamePrefix}registerTableScrollEvent"; internal static string UnregisterTableScrollEvent => $"{JsInteropFuncNamePrefix}unregisterTableScrollEvent"; + + /// + /// Check if the scroll is near the bottom of the element. + /// Arguments: element, threshold + /// + public static string IsScrollNearBottom => $"{JsInteropFuncNamePrefix}isScrollNearBottom"; } \ No newline at end of file diff --git a/src/Masa.Blazor/Mixins/Menuable/MMenuable.cs b/src/Masa.Blazor/Mixins/Menuable/MMenuable.cs index 2cd3d2bb5b..7890a88165 100644 --- a/src/Masa.Blazor/Mixins/Menuable/MMenuable.cs +++ b/src/Masa.Blazor/Mixins/Menuable/MMenuable.cs @@ -167,7 +167,6 @@ protected double ComputedTop { OffsetTop = PositionY ?? AbsoluteY, OffsetLeft = PositionX ?? AbsoluteX, - ScrollHeight = 0, Top = PositionY ?? AbsoluteY, Bottom = PositionY ?? AbsoluteY, Left = PositionX ?? AbsoluteX, diff --git a/src/Masa.Blazor/Mixins/Menuable/MenuablePosition.cs b/src/Masa.Blazor/Mixins/Menuable/MenuablePosition.cs index af91bd82ae..1e4e4425bd 100644 --- a/src/Masa.Blazor/Mixins/Menuable/MenuablePosition.cs +++ b/src/Masa.Blazor/Mixins/Menuable/MenuablePosition.cs @@ -4,7 +4,6 @@ public class MenuablePosition : BoundingClientRect { public double OffsetTop { get; set; } public double OffsetLeft { get; set; } - public double ScrollHeight { get; set; } public MenuablePosition() { diff --git a/src/Masa.Blazor/wwwroot/js/masa-blazor.js b/src/Masa.Blazor/wwwroot/js/masa-blazor.js index 361311d2d9..bb18a861ed 100644 --- a/src/Masa.Blazor/wwwroot/js/masa-blazor.js +++ b/src/Masa.Blazor/wwwroot/js/masa-blazor.js @@ -1,2 +1,2 @@ -!function(){"use strict";function e(e,t,n,o){return new(n||(n=Promise))((function(r,i){function l(e){try{a(o.next(e))}catch(e){i(e)}}function s(e){try{a(o.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,s)}a((o=o.apply(e,t||[])).next())}))}let t=!1;try{if("undefined"!=typeof window){const e=Object.defineProperty({},"passive",{get:()=>{t=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}const n=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function o(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function r(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var o=e,r=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&r++;1!=r&&(n+=":nth-of-type("+r+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}function i(e){let t;try{if(e)if("string"==typeof e)if("document"===e)t=document.documentElement;else if(e.indexOf("__.__")>0){let n=e.split("__.__"),o=0,r=document.querySelector(n[o++]);if(r)for(;n[o];)r=r[n[o]],o++;r instanceof HTMLElement&&(t=r)}else t=document.querySelector(e);else t=e;else t=document.body}catch(e){console.error(e)}return t}const l=!("undefined"==typeof window||"undefined"==typeof document||!window.document||!window.document.createElement),s=["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"];function a(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function c(e){return{detail:e.detail,touches:u(e.touches),targetTouches:u(e.targetTouches),changedTouches:u(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function u(e){const t=[];for(let n=0;np("mouse",e)})}function f(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>{const t=(n=e,Object.assign(Object.assign({},a(n)),{dataTransfer:n.dataTransfer?{dropEffect:n.dataTransfer.dropEffect,effectAllowed:n.dataTransfer.effectAllowed,files:Array.from(n.dataTransfer.files).map((e=>e.name)),items:Array.from(n.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:n.dataTransfer.types}:null}));var n;const o=e.dataTransfer.getData("data-value"),r=e.dataTransfer.getData("offsetX"),i=e.dataTransfer.getData("offsetY");return t.dataTransfer.data={value:o,offsetX:Number(r),offsetY:Number(i)},t}})}function p(e,t){let n={target:{}};return"mouse"===e?n=Object.assign(Object.assign({},n),a(t)):"touch"===e&&(n=Object.assign(Object.assign({},n),c(t))),n.target=function(e){const t=e,n={},o=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return o?(n.elementReferenceId=o,n.selector=`[${o}]`):n.selector=r(t),n.class=t.getAttribute("class"),n}(t.target),n}let m=0;const h={};var v=Object.freeze({__proto__:null,registerSliderEvents:function(n,o){h[m]=s;const r=document.querySelector("[data-app]"),i=!t||{passive:!0,capture:!0},l=!!t&&{passive:!0};return n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),m++;function s(t){return e(this,void 0,void 0,(function*(){const e="touches"in t;c(t),r.addEventListener(e?"touchmove":"mousemove",c,l),function(e,t,n,o=!1){const r=i=>{n(i),e.removeEventListener(t,r,o)};e.addEventListener(t,r,o)}(r,e?"touchend":"mouseup",a,i),e?yield o.invokeMethodAsync("OnTouchStartInternal",p("touch",t)):yield o.invokeMethodAsync("OnMouseDownInternal",p("mouse",t))}))}function a(t){return e(this,void 0,void 0,(function*(){t.stopPropagation(),r.removeEventListener("touchmove",c,l),r.removeEventListener("mousemove",c,l),yield o.invokeMethodAsync("OnMouseUpInternal")}))}function c(t){return e(this,void 0,void 0,(function*(){const e="touches"in t,n={type:t.type,clientX:e?t.touches[0].clientX:t.clientX,clientY:e?t.touches[0].clientY:t.clientY};yield o.invokeMethodAsync("OnMouseMoveInternal",n)}))}},unregisterSliderEvents:function(e,t){if(e){const n=h[t];e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n),delete h[t]}}});let g=0;const y={};function w(e,t,n){e.style.height="0";const o=e.scrollHeight,r=parseInt(t,10)*parseFloat(n);e.style.height=Math.max(o,r)+"px"}var b=Object.freeze({__proto__:null,registerTextareaAutoGrowEvent:function(e){const t=e=>{const t=e.target;if(void 0===t.getAttribute("data-auto-grow"))return;const n=t.getAttribute("rows"),o=t.getAttribute("data-row-height");w(t,n,o)};return y[g]=t,e.addEventListener("input",t),g++},unregisterTextareaAutoGrowEvent:function(e,t){if(!e)return;const n=y[t];n&&e.removeEventListener("input",n)},calculateTextareaHeight:w}),E=function(e,t,n){var o=null,r=null,i=function(){o&&(clearTimeout(o),r=null,o=null)},l=function(){if(!t)return e.apply(this,arguments);var l=this,s=arguments,a=n&&!o;return i(),r=function(){e.apply(l,s)},o=setTimeout((function(){if(o=null,!a){var e=r;return r=null,e()}}),t),a?r():void 0};return l.cancel=i,l.flush=function(){var e=r;i(),e&&e()},l};var T=function(e,t,n){var o=null,r=null,i=n&&n.leading,l=n&&n.trailing;null==i&&(i=!0);null==l&&(l=!i);1==i&&(l=!1);var s=function(){o&&(clearTimeout(o),o=null)},a=function(){var n=i&&!o,s=this,a=arguments;if(r=function(){return e.apply(s,a)},o||(o=setTimeout((function(){if(o=null,l)return r()}),t)),n)return n=!1,r()};return a.cancel=s,a.flush=function(){var e=r;s(),e&&e()},a};function L(){var e,t;d("exmousedown","mousedown"),d("exmouseup","mouseup"),d("exclick","click"),d("exmouseleave","mouseleave"),d("exmouseenter","mouseenter"),d("exmousemove","mousemove"),e="extouchstart",t="touchstart",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>p("touch",e)}),function(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t})}("transitionend","transitionend"),f("exdrop","drop"),Blazor&&Blazor.registerCustomEventType("auxclick",{browserEventName:"auxclick",createEventArgs:a})}const _=80;function C(e,t){e.style.transform=t,e.style.webkitTransform=t}function x(e){return"TouchEvent"===e.constructor.name}function S(e){return"KeyboardEvent"===e.constructor.name}const k={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const o=document.createElement("span"),r=document.createElement("span");o.appendChild(r),o.className="m-ripple__container",n.class&&(o.className+=` ${n.class}`);const{radius:i,scale:l,x:s,y:a,centerX:c,centerY:u}=((e,t,n={})=>{let o=0,r=0;if(!S(e)){const n=t.getBoundingClientRect(),i=x(e)?e.touches[e.touches.length-1]:e;o=i.clientX-n.left,r=i.clientY-n.top}let i=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((o-i)**2+(r-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const s=(t.clientWidth-2*i)/2+"px",a=(t.clientHeight-2*i)/2+"px";return{radius:i,scale:l,x:n.center?s:o-i+"px",y:n.center?a:r-i+"px",centerX:s,centerY:a}})(e,t,n),d=2*i+"px";r.className="m-ripple__animation",r.style.width=d,r.style.height=d,t.appendChild(o);const f=window.getComputedStyle(t);f&&"static"===f.position&&(t.style.position="relative",t.dataset.previousPosition="static"),r.classList.add("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--visible"),C(r,`translate(${s}, ${a}) scale3d(${l},${l},${l})`),r.dataset.activated=String(performance.now()),setTimeout((()=>{r.classList.remove("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--in"),C(r,`translate(${c}, ${u}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("m-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const o=performance.now()-Number(n.dataset.activated),r=Math.max(250-o,0);setTimeout((()=>{n.classList.remove("m-ripple__animation--in"),n.classList.add("m-ripple__animation--out"),setTimeout((()=>{var t;1===e.getElementsByClassName("m-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),(null===(t=n.parentNode)||void 0===t?void 0:t.parentNode)===e&&e.removeChild(n.parentNode)}),300)}),r)}};function M(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,x(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||S(e),n._ripple.class&&(t.class=n._ripple.class),x(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{k.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),_)}else k.show(e,n,t)}}function A(e){const t=e.currentTarget;if(t&&t._ripple)if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null;t._ripple.showTimer=setTimeout((()=>A(e)))}else window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),k.hide(t)}function O(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}function N(e){const t=e.currentTarget;t.keyboardRipple||e.keyCode!==n.enter&&e.keyCode!==n.space||(t.keyboardRipple=!0,M(e))}function H(e){e.currentTarget.keyboardRipple=!1,A(e)}function B(e){const t=e.currentTarget;!0===t.keyboardRipple&&(t.keyboardRipple=!1,A(e))}function I(e,t,n){let o=!1;t?o=!0:k.hide(e);const r=t||{};e._ripple=e._ripple||{},e._ripple.enabled=o,e._ripple=Object.assign(Object.assign({},e._ripple),{centered:r.center,class:r.class,circle:r.circle}),o&&!n?(e.addEventListener("touchstart",M,{passive:!0}),e.addEventListener("touchend",A,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("touchcancel",A),e.addEventListener("mousedown",M),e.addEventListener("mouseup",A),e.addEventListener("mouseleave",A),e.addEventListener("keydown",N),e.addEventListener("keyup",H),e.addEventListener("blur",B),e.addEventListener("dragstart",A,{passive:!0})):!o&&n&&Y(e)}function Y(e){e.removeEventListener("mousedown",M),e.removeEventListener("touchstart",M),e.removeEventListener("touchend",A),e.removeEventListener("touchmove",O),e.removeEventListener("touchcancel",A),e.removeEventListener("mouseup",A),e.removeEventListener("mouseleave",A),e.removeEventListener("keydown",N),e.removeEventListener("keyup",H),e.removeEventListener("dragstart",A),e.removeEventListener("blur",B),e._ripple.enabled=!1}function P(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||P(e.parentNode)}function W(e){var t={};t.offsetTop=e.offsetTop||0,t.offsetLeft=e.offsetLeft||0,t.scrollHeight=e.scrollHeight||0,t.scrollWidth=e.scrollWidth||0,t.scrollLeft=e.scrollLeft||0,t.scrollTop=e.scrollTop||0,t.clientTop=e.clientTop||0,t.clientLeft=e.clientLeft||0,t.clientHeight=e.clientHeight||0,t.clientWidth=e.clientWidth||0;var n=function(e){var t=new Object;if(t.x=0,t.y=0,null!==e&&e.getBoundingClientRect){var n=document.documentElement,o=e.getBoundingClientRect(),r=n.scrollLeft,i=n.scrollTop;t.offsetWidth=o.width,t.offsetHeight=o.height,t.relativeTop=o.top,t.relativeBottom=o.bottom,t.relativeLeft=o.left,t.relativeRight=o.right,t.absoluteLeft=o.left+r,t.absoluteTop=o.top+i}return t}(e);return t.offsetWidth=Math.round(n.offsetWidth)||0,t.offsetHeight=Math.round(n.offsetHeight)||0,t.relativeTop=Math.round(n.relativeTop)||0,t.relativeBottom=Math.round(n.relativeBottom)||0,t.relativeLeft=Math.round(n.relativeLeft)||0,t.relativeRight=Math.round(n.relativeRight)||0,t.absoluteLeft=Math.round(n.absoluteLeft)||0,t.absoluteTop=Math.round(n.absoluteTop)||0,t}window.onload=function(){var e;L(),e="pastewithdata",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:"paste",createEventArgs:e=>({type:e.type,pastedData:e.clipboardData.getData("text")})}),function(){const e=new MutationObserver(((e,n)=>{for(const n of e){if("childList"===n.type&&n.addedNodes.length>0)for(const e of n.addedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("ripple")&&!e._ripple&&I(e,t(e),!1);if("attributes"===n.type){const e=n.target;e.hasAttribute("ripple")&&!e._ripple&&("ripple"===n.attributeName?I(e,t(e),!1):!e.hasAttribute("ripple")&&e._ripple&&(Y(e),delete e._ripple))}if("attributes"===n.type&&"ripple"===n.attributeName){const e=n.target;e._ripple&&I(e,t(e),e._ripple.enabled)}if("childList"===n.type&&n.removedNodes.length>0)for(const e of n.removedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e._ripple&&(Y(e),delete e._ripple)}}));function t(e){const t=e.getAttribute("ripple");if("string"!=typeof t&&!t||"false"===t)return null;const n={};return t.split("&").forEach((e=>{"center"===e?n.center=!0:"circle"===e?n.circle=!0:n.class=e.trim()})),n}const n=document.querySelectorAll("[ripple]");for(const e of n)I(e,t(e),!1);e.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ripple"],attributeOldValue:!1})}()};var D={};function X(){return document.activeElement.getAttribute("id")||""}function q(e=[],t=[]){const n={};return e&&(e.forEach((e=>n[e]=window[e])),n.pageYOffset=K()),t&&t.forEach((e=>n[e]=document.documentElement[e])),n}function z(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1==e.nodeType}function R(e=[],t){const n=[P(i(t))],o=[...document.getElementsByClassName("m-menu__content--active"),...document.getElementsByClassName("m-dialog__content--active")];for(let t=0;t{if(o){if(o.offsetParent){const t=j(o.offsetParent);s.relativeYOffset=K()+t.top,e?(s.activator.top-=s.relativeYOffset,s.activator.left-=window.pageXOffset+t.left):s.offsetParentLeft=t.left}s.content=$(o,n)}}),o),s}function K(){let e=window.pageYOffset;const t=parseInt(document.documentElement.style.getPropertyValue("--m-body-scroll-y"));return t&&(e+=Math.abs(t)),e}function $(e,t){if(!e)return{};const n=j(e);if(!t){const t=window.getComputedStyle(e);n.left=parseInt(t.marginLeft),n.top=parseInt(t.marginTop)}return n}function j(e){if(!e||!e.nodeType)return null;const t=e.getBoundingClientRect();return{top:Math.round(t.top),left:Math.round(t.left),bottom:Math.round(t.bottom),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function V(e,t,n,o){e.preventDefault();const r=e.key;if("ArrowLeft"===r||"Backspace"===r){if("Backspace"===r){const e={type:r,index:t,value:""};o&&o.invokeMethodAsync("Invoke",e)}U(t-1,n)}else"ArrowRight"===r&&U(t+1,n)}function U(e,t){if(e<0)U(0,t);else if(e>=t.length)U(t.length-1,t);else if(document.activeElement!==t[e]){i(t[e]).focus()}}function G(e,t,n){const o=i(n[t]);o&&document.activeElement===o&&o.select()}function Z(e,t,n,o){const r=e.target.value;if(r&&""!==r&&(U(t+1,n),o)){const e={type:"Input",index:t,value:r};o.invokeMethodAsync("Invoke",e)}}function J(){var e,t,n="weird_get_top_level_domain=cookie",o=document.location.hostname.split(".");for(e=o.length-1;e>=0;e--)if(t=o.slice(e).join("."),document.cookie=n+";domain=."+t+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+t+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",t}function Q(e){e.stopPropagation()}var ee=Object.freeze({__proto__:null,getZIndex:P,getDomInfo:function(e,t="body"){var n={},o=i(e);if(o)if(o.style&&"none"===o.style.display){var r=o.cloneNode(!0);r.style.display="inline-block",r.style["z-index"]=-1e3,o.parentElement.appendChild(r),n=W(r),o.parentElement.removeChild(r)}else n=W(o);return n},getParentClientWidthOrWindowInnerWidth:function(e){return e.parentElement?e.parentElement.clientWidth:window.innerWidth},triggerEvent:function(e,t,n,o){var r=i(e),l=document.createEvent(t);return l.initEvent(n),o&&l.stopPropagation(),r.dispatchEvent(l)},setProperty:function(e,t,n){i(e)[t]=n},getBoundingClientRect:function(e,t="body"){var n,o;let r=i(e);var l={};if(r&&r.getBoundingClientRect)if(r.style&&"none"===r.style.display){var s=r.cloneNode(!0);s.style.display="inline-block",s.style["z-index"]=-1e3,null===(n=document.querySelector(t))||void 0===n||n.appendChild(s),l=s.getBoundingClientRect(),null===(o=document.querySelector(t))||void 0===o||o.removeChild(s)}else l=r.getBoundingClientRect();return l},addHtmlElementEventListener:function(e,t,n,o,i){let l;if(l="window"==e?window:"document"==e?document.documentElement:document.querySelector(e),!l)return!1;var a=(null==i?void 0:i.key)||`${e}:${t}`;const u={};var d=e=>{var t;if((null==i?void 0:i.stopPropagation)&&e.stopPropagation(),("boolean"!=typeof e.cancelable||e.cancelable)&&(null==i?void 0:i.preventDefault)&&e.preventDefault(),(null==i?void 0:i.relatedTarget)&&(null===(t=document.querySelector(i.relatedTarget))||void 0===t?void 0:t.contains(e.relatedTarget)))return;let o={};if(s.includes(e.type))o=c(e);else for(var l in e)"string"!=typeof e[l]&&"number"!=typeof e[l]||(o[l]=e[l]);if(e.target&&e.target!==window&&e.target!==document){o.target={};const t=e.target,n=t.getAttributeNames().find((e=>e.startsWith("_bl_")));n?(o.target.elementReferenceId=n,o.target.selector=`[${n}]`):o.target.selector=r(t),o.target.class=t.getAttribute("class")}n.invokeMethodAsync("Invoke",o)};return(null==i?void 0:i.debounce)&&i.debounce>0?u.listener=E(d,i.debounce):(null==i?void 0:i.throttle)&&i.throttle>0?u.listener=T(d,i.throttle,{trailing:!0}):u.listener=d,u.options=o,u.handle=n,D[a]?D[a].push(u):D[a]=[u],l.addEventListener(t,u.listener,u.options),!0},removeHtmlElementEventListener:function(e,t,n){let o;o="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var r=D[n=n||`${e}:${t}`];r&&(r.forEach((e=>{e.handle.dispose(),null==o||o.removeEventListener(t,e.listener,e.options)})),D[n]=[])},addMouseleaveEventListener:function(e){var t=document.querySelector(e);t&&t.addEventListener()},contains:function(e,t){const n=i(e);return!(!n||!n.contains)&&n.contains(i(t))},equalsOrContains:function(e,t){const n=i(e),o=i(t);return!!n&&n.contains&&!!o&&(n==o||n.contains(o))},copy:function(e){navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}(e)},focus:function(e,t=!1){let n=i(e);n instanceof HTMLElement?n.focus({preventScroll:t}):console.error("Unable to focus an invalid element")},select:function(e){let t=i(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error("Unable to select an invalid element");t.select()},hasFocus:function(e){let t=i(e);return document.activeElement===t},blur:function(e){i(e).blur()},log:function(e){console.log(e)},scrollIntoView:function(e,t){let n=i(e);n instanceof HTMLElement&&(null===t||null==t?n.scrollIntoView():"boolean"==typeof t?n.scrollIntoView(t):n.scrollIntoView({block:null==t.block?void 0:t.block,inline:null==t.inline?void 0:t.inline,behavior:t.behavior}))},scrollIntoParentView:function(e,t=!1,n=!1,o=1,r="smooth"){const l=i(e);if(l instanceof HTMLElement){let e=l;for(;o>0;)if(e=e.parentElement,o--,!e)return;const i={behavior:r};if(t)if(n)i.left=l.offsetLeft;else{const t=l.offsetLeft-e.offsetLeft;t-e.scrollLeft<0?i.left=t:t+l.offsetWidth-e.scrollLeft>e.offsetWidth&&(i.left=t+l.offsetWidth-e.offsetWidth)}else if(n)i.top=l.offsetTop;else{const t=l.offsetTop-e.offsetTop;t-e.scrollTop<0?i.top=t:t+l.offsetHeight-e.scrollTop>e.offsetHeight&&(i.top=t+l.offsetHeight-e.offsetHeight)}(i.left||i.top)&&e.scrollTo(i)}},scrollTo:function(e,t){let n=i(e);if(n instanceof HTMLElement){const e={left:null===t.left?void 0:t.left,top:null===t.top?void 0:t.top,behavior:t.behavior};n.scrollTo(e)}},scrollToTarget:function(e,t=null,n=0){const o=document.querySelector(e);if(o){let e;e=t?o.offsetTop:o.getBoundingClientRect().top+window.scrollY;(t?document.querySelector(t):document.documentElement).scrollTo({top:e-n,behavior:"smooth"})}},scrollToElement:function(e,t,n){const o=i(e);if(!o)return;const r=o.getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:r,behavior:n})},scrollToActiveElement:function(e,t=".active",n="center"){let o,r=i(e);"string"==typeof t&&(o=e.querySelector(t)),r&&o&&(r.scrollTop="center"===n?o.offsetTop-r.offsetHeight/2+o.offsetHeight/2:o.offsetTop-n)},addClsToFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.add(t)},removeClsFromFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.remove(t)},getAbsoluteTop:function e(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},getAbsoluteLeft:function e(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},addElementToBody:function(e){document.body.appendChild(e)},delElementFromBody:function(e){document.body.removeChild(e)},addElementTo:function(e,t){let n=i(t);n&&e&&n.appendChild(e)},delElementFrom:function(e,t){let n=i(t);n&&e&&n.removeChild(e)},getActiveElement:X,focusDialog:function e(t,n=0){let o=document.querySelector(t);o&&!o.hasAttribute("disabled")&&setTimeout((()=>{o.focus(),"#"+X()!==t&&n<10&&e(t,n+1)}),10)},getWindow:function(){return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,isTop:0==window.scrollY,isBottom:window.scrollY+window.innerHeight==document.body.clientHeight}},getWindowAndDocumentProps:q,css:function(e,t,n=null){var o=i(e);if("string"==typeof t)o.style[t]=n;else for(let e in t)t.hasOwnProperty(e)&&(o.style[e]=t[e])},addCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.add(t):n.classList.add(...t)},removeCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.remove(t):n.classList.remove(...t)},elementScrollIntoView:function(e){let t=i(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},getScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},getScrollParent:function(e,t=undefined){null!=t||(t=l?window:void 0);let n=e;for(;n&&n!==t&&z(n);){const{overflowY:e}=window.getComputedStyle(n);if(/scroll|auto|overlay/i.test(e))return n;n=n.parentNode}return t},getScrollTop:function(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)},getInnerText:function(e){return i(e).innerText},getMenuOrDialogMaxZIndex:R,getMaxZIndex:function(){return[...document.all].reduce(((e,t)=>Math.max(e,+window.getComputedStyle(t).zIndex||0)),0)},getStyle:function(e,t){return(e=i(e)).currentStyle?e.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(t):void 0},getTextAreaInfo:function(e){var t={},n=i(e);return t.scrollHeight=n.scrollHeight||0,e.currentStyle?(t.lineHeight=parseFloat(e.currentStyle["line-height"]),t.paddingTop=parseFloat(e.currentStyle["padding-top"]),t.paddingBottom=parseFloat(e.currentStyle["padding-bottom"]),t.borderBottom=parseFloat(e.currentStyle["border-bottom"]),t.borderTop=parseFloat(e.currentStyle["border-top"])):window.getComputedStyle&&(t.lineHeight=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height")),t.paddingTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-top")),t.paddingBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-bottom")),t.borderBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-bottom")),t.borderTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-top"))),Object.is(NaN,t.borderTop)&&(t.borderTop=1),Object.is(NaN,t.borderBottom)&&(t.borderBottom=1),t},disposeObj:function(e){},upsertThemeStyle:function(e,t){const n=document.getElementById(e);n&&document.head.removeChild(n);const o=document.createElement("style");o.id=e,o.type="text/css",o.innerHTML=t,document.head.insertAdjacentElement("beforeend",o)},getImageDimensions:function(e){return new Promise((function(t,n){var o=new Image;o.src=e,o.onload=function(){t({width:o.width,height:o.height,hasError:!1})},o.onerror=function(){t({width:0,height:0,hasError:!0})}}))},enablePreventDefaultForEvent:function(e,t,n){const o=i(e);o&&("keydown"===t?o.addEventListener(t,(e=>{Array.isArray(n)?n.includes(e.code)&&e.preventDefault():e.preventDefault()})):o.addEventListener(t,(e=>{e.preventDefault&&e.preventDefault()})))},getBoundingClientRects:function(e){for(var t=document.querySelectorAll(e),n=[],o=0;o{if(e.target!==i(t)&&(e.preventDefault(),e.stopPropagation()),n){const t={Detail:e.detail,ScreenX:e.screenX,ScreenY:e.screenY,ClientX:e.clientX,ClientY:e.clientY,OffsetX:e.offsetX,OffsetY:e.offsetY,PageX:e.pageX,PageY:e.pageY,Button:e.button,Buttons:e.buttons,CtrlKey:e.ctrlKey,ShiftKey:e.shiftKey,AltKey:e.altKey,MetaKey:e.metaKey,Type:e.type};n.invokeMethodAsync("Invoke",t)}};e.addEventListener("mousedown",r);const l={listener:r,handle:n},s=`registerTextFieldOnMouseDown_${o(e)}`;D[s]=[l]},unregisterTextFieldOnMouseDown:function(e){const t=`registerTextFieldOnMouseDown_${o(e)}`,n=D[t];n&&n.length&&n.forEach((t=>{t.handle.dispose(),e&&e.removeEventListener("mousedown",t.listener)}))},containsActiveElement:function(e){var t=i(e);return t&&t.contains?t.contains(document.activeElement):null},copyChild:function(e){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.setAttribute("contenteditable","true"),e.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.execCommand("unselect"),e.blur(),e.removeAttribute("contenteditable"))},copyText:function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)}));else{var t=document.createElement("textarea");t.value=e,t.readOnly=!0,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}},getMenuableDimensions:F,invokeMultipleMethod:function(e,t,n,o,r,i,l,s,a){var c={windowAndDocument:null,dimensions:null,zIndex:0};return c.windowAndDocument=q(e,t),c.dimensions=F(n,o,r,i,l,s),c.zIndex=R([i],a),c},registerOTPInputOnInputEvent:function(e,t){for(let n=0;nZ(o,n,e,t),r=t=>G(t,n,e),i=o=>V(o,n,e,t);e[n].addEventListener("input",o),e[n].addEventListener("focus",r),e[n].addEventListener("keyup",i),e[n]._optInput={inputListener:o,focusListener:r,keyupListener:i}}},unregisterOTPInputOnInputEvent:function(e){for(let t=0;ti.offsetTop-8?l.scrollTo({top:i.offsetTop-i.clientHeight,behavior:"smooth"}):s+a=r-n},get_top_domain:J,setCookie:function(e,t){if(null!=t){var n=J();n?isNaN(n[0])&&(n=`.${n}`):n="";var o=new Date;o.setTime(o.getTime()+2592e6),document.cookie=`${e}=${escape(null==t?void 0:t.toString())};path=/;expires=${o.toUTCString()};domain=${n}`}},getCookie:function(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n?unescape(n[2]):null},registerDragEvent:function(e,t){if(e){const n=o(e),r=e=>{if(t){const n=e.target.getAttribute(t);e.dataTransfer.setData(t,n),e.dataTransfer.setData("offsetX",e.offsetX.toString()),e.dataTransfer.setData("offsetY",e.offsetY.toString())}};D[`${n}:dragstart`]=[{listener:r}],e.addEventListener("dragstart",r)}},unregisterDragEvent:function(e){const t=o(e);if(t){const n=`${t}:dragstart`;D[n]&&D[n].forEach((t=>{e.removeEventListener("dragstart",t.listener)}))}},resizableDataTable:function(e){const t=e.querySelector("table"),n=t.querySelector(".m-data-table-header").getElementsByTagName("tr")[0],o=n?n.children:[];if(!o)return;t.style.overflow="hidden";const r=t.offsetHeight;for(var i=0;ie.stopPropagation())),n.addEventListener("mousedown",(function(e){i=e.target.parentElement,l=i.nextElementSibling,r=e.pageX,u=t.offsetWidth;var n=function(e){if("border-box"==s(e,"box-sizing"))return 0;var t=s(e,"padding-left"),n=s(e,"padding-right");return parseInt(t)+parseInt(n)}(i);a=i.offsetWidth-n,l&&(c=l.offsetWidth-n)})),document.addEventListener("mousemove",(function(n){if(i){let o=n.pageX-r;e.classList.contains("m-data-table--rtl")&&(o=0-o);let s=a+o;i.style.width=s+"px";if(e.classList.contains("m-data-table--resizable-overflow"))return void(t.style.width=u+o+"px");if(e.classList.contains("m-data-table--resizable-independent")){let e=c-o;const t=a+c;o>0?l&&e{const t=e.scrollWidth,n=e.clientWidth,o=e.scrollLeft,r=e.parentElement.classList.contains("m-data-table--rtl");Math.abs(t-((r?-o:o)+n))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolled-to-right")):Math.abs(o-(r?t-n:0))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-right"),e.classList.add("scrolled-to-left")):(e.classList.remove("scrolled-to-right"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolling"))};t(),e.addEventListener("scroll",t),e._m_table_scroll_event=t},unregisterTableScrollEvent:function(e){const t=e._m_table_scroll_event;t&&(e.removeEventListener("scroll",t),delete e._m_table_scroll_event)}});window.MasaBlazor={interop:Object.assign(Object.assign(Object.assign({},ee),v),b),xgplayerPlugins:[]}}(); +!function(){"use strict";function e(e,t,n,o){return new(n||(n=Promise))((function(r,i){function l(e){try{a(o.next(e))}catch(e){i(e)}}function s(e){try{a(o.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,s)}a((o=o.apply(e,t||[])).next())}))}let t=!1;try{if("undefined"!=typeof window){const e=Object.defineProperty({},"passive",{get:()=>{t=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}const n=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function o(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function r(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var o=e,r=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&r++;1!=r&&(n+=":nth-of-type("+r+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}function i(e){let t;try{if(e)if("string"==typeof e)if("document"===e)t=document.documentElement;else if(e.indexOf("__.__")>0){let n=e.split("__.__"),o=0,r=document.querySelector(n[o++]);if(r)for(;n[o];)r=r[n[o]],o++;r instanceof HTMLElement&&(t=r)}else t=document.querySelector(e);else t=e;else t=document.body}catch(e){console.error(e)}return t}const l=!("undefined"==typeof window||"undefined"==typeof document||!window.document||!window.document.createElement),s=["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"];function a(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function c(e){return{detail:e.detail,touches:u(e.touches),targetTouches:u(e.targetTouches),changedTouches:u(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function u(e){const t=[];for(let n=0;np("mouse",e)})}function f(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>{const t=(n=e,Object.assign(Object.assign({},a(n)),{dataTransfer:n.dataTransfer?{dropEffect:n.dataTransfer.dropEffect,effectAllowed:n.dataTransfer.effectAllowed,files:Array.from(n.dataTransfer.files).map((e=>e.name)),items:Array.from(n.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:n.dataTransfer.types}:null}));var n;const o=e.dataTransfer.getData("data-value"),r=e.dataTransfer.getData("offsetX"),i=e.dataTransfer.getData("offsetY");return t.dataTransfer.data={value:o,offsetX:Number(r),offsetY:Number(i)},t}})}function p(e,t){let n={target:{}};return"mouse"===e?n=Object.assign(Object.assign({},n),a(t)):"touch"===e&&(n=Object.assign(Object.assign({},n),c(t))),n.target=function(e){const t=e,n={},o=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return o?(n.elementReferenceId=o,n.selector=`[${o}]`):n.selector=r(t),n.class=t.getAttribute("class"),n}(t.target),n}let m=0;const h={};var v=Object.freeze({__proto__:null,registerSliderEvents:function(n,o){h[m]=s;const r=document.querySelector("[data-app]"),i=!t||{passive:!0,capture:!0},l=!!t&&{passive:!0};return n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),m++;function s(t){return e(this,void 0,void 0,(function*(){const e="touches"in t;c(t),r.addEventListener(e?"touchmove":"mousemove",c,l),function(e,t,n,o=!1){const r=i=>{n(i),e.removeEventListener(t,r,o)};e.addEventListener(t,r,o)}(r,e?"touchend":"mouseup",a,i),e?yield o.invokeMethodAsync("OnTouchStartInternal",p("touch",t)):yield o.invokeMethodAsync("OnMouseDownInternal",p("mouse",t))}))}function a(t){return e(this,void 0,void 0,(function*(){t.stopPropagation(),r.removeEventListener("touchmove",c,l),r.removeEventListener("mousemove",c,l),yield o.invokeMethodAsync("OnMouseUpInternal")}))}function c(t){return e(this,void 0,void 0,(function*(){const e="touches"in t,n={type:t.type,clientX:e?t.touches[0].clientX:t.clientX,clientY:e?t.touches[0].clientY:t.clientY};yield o.invokeMethodAsync("OnMouseMoveInternal",n)}))}},unregisterSliderEvents:function(e,t){if(e){const n=h[t];e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n),delete h[t]}}});let g=0;const y={};function w(e,t,n){e.style.height="0";const o=e.scrollHeight,r=parseInt(t,10)*parseFloat(n);e.style.height=Math.max(o,r)+"px"}var b=Object.freeze({__proto__:null,registerTextareaAutoGrowEvent:function(e){const t=e=>{const t=e.target;if(void 0===t.getAttribute("data-auto-grow"))return;const n=t.getAttribute("rows"),o=t.getAttribute("data-row-height");w(t,n,o)};return y[g]=t,e.addEventListener("input",t),g++},unregisterTextareaAutoGrowEvent:function(e,t){if(!e)return;const n=y[t];n&&e.removeEventListener("input",n)},calculateTextareaHeight:w}),E=function(e,t,n){var o=null,r=null,i=function(){o&&(clearTimeout(o),r=null,o=null)},l=function(){if(!t)return e.apply(this,arguments);var l=this,s=arguments,a=n&&!o;return i(),r=function(){e.apply(l,s)},o=setTimeout((function(){if(o=null,!a){var e=r;return r=null,e()}}),t),a?r():void 0};return l.cancel=i,l.flush=function(){var e=r;i(),e&&e()},l};var T=function(e,t,n){var o=null,r=null,i=n&&n.leading,l=n&&n.trailing;null==i&&(i=!0);null==l&&(l=!i);1==i&&(l=!1);var s=function(){o&&(clearTimeout(o),o=null)},a=function(){var n=i&&!o,s=this,a=arguments;if(r=function(){return e.apply(s,a)},o||(o=setTimeout((function(){if(o=null,l)return r()}),t)),n)return n=!1,r()};return a.cancel=s,a.flush=function(){var e=r;s(),e&&e()},a};function L(){var e,t;d("exmousedown","mousedown"),d("exmouseup","mouseup"),d("exclick","click"),d("exmouseleave","mouseleave"),d("exmouseenter","mouseenter"),d("exmousemove","mousemove"),e="extouchstart",t="touchstart",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>p("touch",e)}),function(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t})}("transitionend","transitionend"),f("exdrop","drop"),Blazor&&Blazor.registerCustomEventType("auxclick",{browserEventName:"auxclick",createEventArgs:a})}const _=80;function C(e,t){e.style.transform=t,e.style.webkitTransform=t}function x(e){return"TouchEvent"===e.constructor.name}function S(e){return"KeyboardEvent"===e.constructor.name}const k={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const o=document.createElement("span"),r=document.createElement("span");o.appendChild(r),o.className="m-ripple__container",n.class&&(o.className+=` ${n.class}`);const{radius:i,scale:l,x:s,y:a,centerX:c,centerY:u}=((e,t,n={})=>{let o=0,r=0;if(!S(e)){const n=t.getBoundingClientRect(),i=x(e)?e.touches[e.touches.length-1]:e;o=i.clientX-n.left,r=i.clientY-n.top}let i=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((o-i)**2+(r-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const s=(t.clientWidth-2*i)/2+"px",a=(t.clientHeight-2*i)/2+"px";return{radius:i,scale:l,x:n.center?s:o-i+"px",y:n.center?a:r-i+"px",centerX:s,centerY:a}})(e,t,n),d=2*i+"px";r.className="m-ripple__animation",r.style.width=d,r.style.height=d,t.appendChild(o);const f=window.getComputedStyle(t);f&&"static"===f.position&&(t.style.position="relative",t.dataset.previousPosition="static"),r.classList.add("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--visible"),C(r,`translate(${s}, ${a}) scale3d(${l},${l},${l})`),r.dataset.activated=String(performance.now()),setTimeout((()=>{r.classList.remove("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--in"),C(r,`translate(${c}, ${u}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("m-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const o=performance.now()-Number(n.dataset.activated),r=Math.max(250-o,0);setTimeout((()=>{n.classList.remove("m-ripple__animation--in"),n.classList.add("m-ripple__animation--out"),setTimeout((()=>{var t;1===e.getElementsByClassName("m-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),(null===(t=n.parentNode)||void 0===t?void 0:t.parentNode)===e&&e.removeChild(n.parentNode)}),300)}),r)}};function M(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,x(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||S(e),n._ripple.class&&(t.class=n._ripple.class),x(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{k.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),_)}else k.show(e,n,t)}}function A(e){const t=e.currentTarget;if(t&&t._ripple)if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null;t._ripple.showTimer=setTimeout((()=>A(e)))}else window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),k.hide(t)}function O(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}function N(e){const t=e.currentTarget;t.keyboardRipple||e.keyCode!==n.enter&&e.keyCode!==n.space||(t.keyboardRipple=!0,M(e))}function H(e){e.currentTarget.keyboardRipple=!1,A(e)}function B(e){const t=e.currentTarget;!0===t.keyboardRipple&&(t.keyboardRipple=!1,A(e))}function I(e,t,n){let o=!1;t?o=!0:k.hide(e);const r=t||{};e._ripple=e._ripple||{},e._ripple.enabled=o,e._ripple=Object.assign(Object.assign({},e._ripple),{centered:r.center,class:r.class,circle:r.circle}),o&&!n?(e.addEventListener("touchstart",M,{passive:!0}),e.addEventListener("touchend",A,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("touchcancel",A),e.addEventListener("mousedown",M),e.addEventListener("mouseup",A),e.addEventListener("mouseleave",A),e.addEventListener("keydown",N),e.addEventListener("keyup",H),e.addEventListener("blur",B),e.addEventListener("dragstart",A,{passive:!0})):!o&&n&&Y(e)}function Y(e){e.removeEventListener("mousedown",M),e.removeEventListener("touchstart",M),e.removeEventListener("touchend",A),e.removeEventListener("touchmove",O),e.removeEventListener("touchcancel",A),e.removeEventListener("mouseup",A),e.removeEventListener("mouseleave",A),e.removeEventListener("keydown",N),e.removeEventListener("keyup",H),e.removeEventListener("dragstart",A),e.removeEventListener("blur",B),e._ripple.enabled=!1}function P(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||P(e.parentNode)}function W(e){var t={};t.offsetTop=e.offsetTop||0,t.offsetLeft=e.offsetLeft||0,t.scrollHeight=e.scrollHeight||0,t.scrollWidth=e.scrollWidth||0,t.scrollLeft=e.scrollLeft||0,t.scrollTop=e.scrollTop||0,t.clientTop=e.clientTop||0,t.clientLeft=e.clientLeft||0,t.clientHeight=e.clientHeight||0,t.clientWidth=e.clientWidth||0;var n=function(e){var t=new Object;if(t.x=0,t.y=0,null!==e&&e.getBoundingClientRect){var n=document.documentElement,o=e.getBoundingClientRect(),r=n.scrollLeft,i=n.scrollTop;t.offsetWidth=o.width,t.offsetHeight=o.height,t.relativeTop=o.top,t.relativeBottom=o.bottom,t.relativeLeft=o.left,t.relativeRight=o.right,t.absoluteLeft=o.left+r,t.absoluteTop=o.top+i}return t}(e);return t.offsetWidth=Math.round(n.offsetWidth)||0,t.offsetHeight=Math.round(n.offsetHeight)||0,t.relativeTop=Math.round(n.relativeTop)||0,t.relativeBottom=Math.round(n.relativeBottom)||0,t.relativeLeft=Math.round(n.relativeLeft)||0,t.relativeRight=Math.round(n.relativeRight)||0,t.absoluteLeft=Math.round(n.absoluteLeft)||0,t.absoluteTop=Math.round(n.absoluteTop)||0,t}window.onload=function(){var e;L(),e="pastewithdata",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:"paste",createEventArgs:e=>({type:e.type,pastedData:e.clipboardData.getData("text")})}),function(){const e=new MutationObserver(((e,n)=>{for(const n of e){if("childList"===n.type&&n.addedNodes.length>0)for(const e of n.addedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("ripple")&&!e._ripple&&I(e,t(e),!1);if("attributes"===n.type){const e=n.target;e.hasAttribute("ripple")&&!e._ripple&&("ripple"===n.attributeName?I(e,t(e),!1):!e.hasAttribute("ripple")&&e._ripple&&(Y(e),delete e._ripple))}if("attributes"===n.type&&"ripple"===n.attributeName){const e=n.target;e._ripple&&I(e,t(e),e._ripple.enabled)}if("childList"===n.type&&n.removedNodes.length>0)for(const e of n.removedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e._ripple&&(Y(e),delete e._ripple)}}));function t(e){const t=e.getAttribute("ripple");if("string"!=typeof t&&!t||"false"===t)return null;const n={};return t.split("&").forEach((e=>{"center"===e?n.center=!0:"circle"===e?n.circle=!0:n.class=e.trim()})),n}const n=document.querySelectorAll("[ripple]");for(const e of n)I(e,t(e),!1);e.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ripple"],attributeOldValue:!1})}()};var D={};function X(){return document.activeElement.getAttribute("id")||""}function q(e=[],t=[]){const n={};return e&&(e.forEach((e=>n[e]=window[e])),n.pageYOffset=K()),t&&t.forEach((e=>n[e]=document.documentElement[e])),n}function z(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1==e.nodeType}function R(e=[],t){const n=[P(i(t))],o=[...document.getElementsByClassName("m-menu__content--active"),...document.getElementsByClassName("m-dialog__content--active")];for(let t=0;t{if(o){if(o.offsetParent){const t=j(o.offsetParent);s.relativeYOffset=K()+t.top,e?(s.activator.top-=s.relativeYOffset,s.activator.left-=window.pageXOffset+t.left):s.offsetParentLeft=t.left}s.content=$(o,n),s.content.offsetLeft=o.offsetLeft,s.content.offsetTop=o.offsetTop}}),o),s}function K(){let e=window.pageYOffset;const t=parseInt(document.documentElement.style.getPropertyValue("--m-body-scroll-y"));return t&&(e+=Math.abs(t)),e}function $(e,t){if(!e)return{};const n=j(e);if(!t){const t=window.getComputedStyle(e);n.left=parseInt(t.marginLeft),n.top=parseInt(t.marginTop)}return n}function j(e){if(!e||!e.nodeType)return null;const t=e.getBoundingClientRect();return{top:Math.round(t.top),left:Math.round(t.left),bottom:Math.round(t.bottom),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function V(e,t,n,o){e.preventDefault();const r=e.key;if("ArrowLeft"===r||"Backspace"===r){if("Backspace"===r){const e={type:r,index:t,value:""};o&&o.invokeMethodAsync("Invoke",e)}U(t-1,n)}else"ArrowRight"===r&&U(t+1,n)}function U(e,t){if(e<0)U(0,t);else if(e>=t.length)U(t.length-1,t);else if(document.activeElement!==t[e]){i(t[e]).focus()}}function G(e,t,n){const o=i(n[t]);o&&document.activeElement===o&&o.select()}function Z(e,t,n,o){const r=e.target.value;if(r&&""!==r&&(U(t+1,n),o)){const e={type:"Input",index:t,value:r};o.invokeMethodAsync("Invoke",e)}}function J(){var e,t,n="weird_get_top_level_domain=cookie",o=document.location.hostname.split(".");for(e=o.length-1;e>=0;e--)if(t=o.slice(e).join("."),document.cookie=n+";domain=."+t+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+t+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",t}function Q(e){e.stopPropagation()}var ee=Object.freeze({__proto__:null,getZIndex:P,getDomInfo:function(e,t="body"){var n={},o=i(e);if(o)if(o.style&&"none"===o.style.display){var r=o.cloneNode(!0);r.style.display="inline-block",r.style["z-index"]=-1e3,o.parentElement.appendChild(r),n=W(r),o.parentElement.removeChild(r)}else n=W(o);return n},getParentClientWidthOrWindowInnerWidth:function(e){return e.parentElement?e.parentElement.clientWidth:window.innerWidth},triggerEvent:function(e,t,n,o){var r=i(e),l=document.createEvent(t);return l.initEvent(n),o&&l.stopPropagation(),r.dispatchEvent(l)},setProperty:function(e,t,n){i(e)[t]=n},getBoundingClientRect:function(e,t="body"){var n,o;let r=i(e);var l={};if(r&&r.getBoundingClientRect)if(r.style&&"none"===r.style.display){var s=r.cloneNode(!0);s.style.display="inline-block",s.style["z-index"]=-1e3,null===(n=document.querySelector(t))||void 0===n||n.appendChild(s),l=s.getBoundingClientRect(),null===(o=document.querySelector(t))||void 0===o||o.removeChild(s)}else l=r.getBoundingClientRect();return l},addHtmlElementEventListener:function(e,t,n,o,i){let l;if(l="window"==e?window:"document"==e?document.documentElement:document.querySelector(e),!l)return!1;var a=(null==i?void 0:i.key)||`${e}:${t}`;const u={};var d=e=>{var t;if((null==i?void 0:i.stopPropagation)&&e.stopPropagation(),("boolean"!=typeof e.cancelable||e.cancelable)&&(null==i?void 0:i.preventDefault)&&e.preventDefault(),(null==i?void 0:i.relatedTarget)&&(null===(t=document.querySelector(i.relatedTarget))||void 0===t?void 0:t.contains(e.relatedTarget)))return;let o={};if(s.includes(e.type))o=c(e);else for(var l in e)"string"!=typeof e[l]&&"number"!=typeof e[l]||(o[l]=e[l]);if(e.target&&e.target!==window&&e.target!==document){o.target={};const t=e.target,n=t.getAttributeNames().find((e=>e.startsWith("_bl_")));n?(o.target.elementReferenceId=n,o.target.selector=`[${n}]`):o.target.selector=r(t),o.target.class=t.getAttribute("class")}n.invokeMethodAsync("Invoke",o)};return(null==i?void 0:i.debounce)&&i.debounce>0?u.listener=E(d,i.debounce):(null==i?void 0:i.throttle)&&i.throttle>0?u.listener=T(d,i.throttle,{trailing:!0}):u.listener=d,u.options=o,u.handle=n,D[a]?D[a].push(u):D[a]=[u],l.addEventListener(t,u.listener,u.options),!0},removeHtmlElementEventListener:function(e,t,n){let o;o="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var r=D[n=n||`${e}:${t}`];r&&(r.forEach((e=>{e.handle.dispose(),null==o||o.removeEventListener(t,e.listener,e.options)})),D[n]=[])},addMouseleaveEventListener:function(e){var t=document.querySelector(e);t&&t.addEventListener()},contains:function(e,t){const n=i(e);return!(!n||!n.contains)&&n.contains(i(t))},equalsOrContains:function(e,t){const n=i(e),o=i(t);return!!n&&n.contains&&!!o&&(n==o||n.contains(o))},copy:function(e){navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}(e)},focus:function(e,t=!1){let n=i(e);n instanceof HTMLElement?n.focus({preventScroll:t}):console.error("Unable to focus an invalid element")},select:function(e){let t=i(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error("Unable to select an invalid element");t.select()},hasFocus:function(e){let t=i(e);return document.activeElement===t},blur:function(e){i(e).blur()},log:function(e){console.log(e)},scrollIntoView:function(e,t){let n=i(e);n instanceof HTMLElement&&(null===t||null==t?n.scrollIntoView():"boolean"==typeof t?n.scrollIntoView(t):n.scrollIntoView({block:null==t.block?void 0:t.block,inline:null==t.inline?void 0:t.inline,behavior:t.behavior}))},scrollIntoParentView:function(e,t=!1,n=!1,o=1,r="smooth"){const l=i(e);if(l instanceof HTMLElement){let e=l;for(;o>0;)if(e=e.parentElement,o--,!e)return;const i={behavior:r};if(t)if(n)i.left=l.offsetLeft;else{const t=l.offsetLeft-e.offsetLeft;t-e.scrollLeft<0?i.left=t:t+l.offsetWidth-e.scrollLeft>e.offsetWidth&&(i.left=t+l.offsetWidth-e.offsetWidth)}else if(n)i.top=l.offsetTop;else{const t=l.offsetTop-e.offsetTop;t-e.scrollTop<0?i.top=t:t+l.offsetHeight-e.scrollTop>e.offsetHeight&&(i.top=t+l.offsetHeight-e.offsetHeight)}(i.left||i.top)&&e.scrollTo(i)}},scrollTo:function(e,t){let n=i(e);if(n instanceof HTMLElement){const e={left:null===t.left?void 0:t.left,top:null===t.top?void 0:t.top,behavior:t.behavior};n.scrollTo(e)}},scrollToTarget:function(e,t=null,n=0){const o=document.querySelector(e);if(o){let e;e=t?o.offsetTop:o.getBoundingClientRect().top+window.scrollY;(t?document.querySelector(t):document.documentElement).scrollTo({top:e-n,behavior:"smooth"})}},scrollToElement:function(e,t,n){const o=i(e);if(!o)return;const r=o.getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:r,behavior:n})},scrollToActiveElement:function(e,t=".active",n="center"){let o,r=i(e);"string"==typeof t&&(o=e.querySelector(t)),r&&o&&(r.scrollTop="center"===n?o.offsetTop-r.offsetHeight/2+o.offsetHeight/2:o.offsetTop-n)},addClsToFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.add(t)},removeClsFromFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.remove(t)},getAbsoluteTop:function e(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},getAbsoluteLeft:function e(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},addElementToBody:function(e){document.body.appendChild(e)},delElementFromBody:function(e){document.body.removeChild(e)},addElementTo:function(e,t){let n=i(t);n&&e&&n.appendChild(e)},delElementFrom:function(e,t){let n=i(t);n&&e&&n.removeChild(e)},getActiveElement:X,focusDialog:function e(t,n=0){let o=document.querySelector(t);o&&!o.hasAttribute("disabled")&&setTimeout((()=>{o.focus(),"#"+X()!==t&&n<10&&e(t,n+1)}),10)},getWindow:function(){return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,isTop:0==window.scrollY,isBottom:window.scrollY+window.innerHeight==document.body.clientHeight}},getWindowAndDocumentProps:q,css:function(e,t,n=null){var o=i(e);if("string"==typeof t)o.style[t]=n;else for(let e in t)t.hasOwnProperty(e)&&(o.style[e]=t[e])},addCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.add(t):n.classList.add(...t)},removeCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.remove(t):n.classList.remove(...t)},elementScrollIntoView:function(e){let t=i(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},getScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},getScrollParent:function(e,t=undefined){null!=t||(t=l?window:void 0);let n=e;for(;n&&n!==t&&z(n);){const{overflowY:e}=window.getComputedStyle(n);if(/scroll|auto|overlay/i.test(e))return n;n=n.parentNode}return t},getScrollTop:function(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)},getInnerText:function(e){return i(e).innerText},getMenuOrDialogMaxZIndex:R,getMaxZIndex:function(){return[...document.all].reduce(((e,t)=>Math.max(e,+window.getComputedStyle(t).zIndex||0)),0)},getStyle:function(e,t){return(e=i(e)).currentStyle?e.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(t):void 0},getTextAreaInfo:function(e){var t={},n=i(e);return t.scrollHeight=n.scrollHeight||0,e.currentStyle?(t.lineHeight=parseFloat(e.currentStyle["line-height"]),t.paddingTop=parseFloat(e.currentStyle["padding-top"]),t.paddingBottom=parseFloat(e.currentStyle["padding-bottom"]),t.borderBottom=parseFloat(e.currentStyle["border-bottom"]),t.borderTop=parseFloat(e.currentStyle["border-top"])):window.getComputedStyle&&(t.lineHeight=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height")),t.paddingTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-top")),t.paddingBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-bottom")),t.borderBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-bottom")),t.borderTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-top"))),Object.is(NaN,t.borderTop)&&(t.borderTop=1),Object.is(NaN,t.borderBottom)&&(t.borderBottom=1),t},disposeObj:function(e){},upsertThemeStyle:function(e,t){const n=document.getElementById(e);n&&document.head.removeChild(n);const o=document.createElement("style");o.id=e,o.type="text/css",o.innerHTML=t,document.head.insertAdjacentElement("beforeend",o)},getImageDimensions:function(e){return new Promise((function(t,n){var o=new Image;o.src=e,o.onload=function(){t({width:o.width,height:o.height,hasError:!1})},o.onerror=function(){t({width:0,height:0,hasError:!0})}}))},enablePreventDefaultForEvent:function(e,t,n){const o=i(e);o&&("keydown"===t?o.addEventListener(t,(e=>{Array.isArray(n)?n.includes(e.code)&&e.preventDefault():e.preventDefault()})):o.addEventListener(t,(e=>{e.preventDefault&&e.preventDefault()})))},getBoundingClientRects:function(e){for(var t=document.querySelectorAll(e),n=[],o=0;o{if(e.target!==i(t)&&(e.preventDefault(),e.stopPropagation()),n){const t={Detail:e.detail,ScreenX:e.screenX,ScreenY:e.screenY,ClientX:e.clientX,ClientY:e.clientY,OffsetX:e.offsetX,OffsetY:e.offsetY,PageX:e.pageX,PageY:e.pageY,Button:e.button,Buttons:e.buttons,CtrlKey:e.ctrlKey,ShiftKey:e.shiftKey,AltKey:e.altKey,MetaKey:e.metaKey,Type:e.type};n.invokeMethodAsync("Invoke",t)}};e.addEventListener("mousedown",r);const l={listener:r,handle:n},s=`registerTextFieldOnMouseDown_${o(e)}`;D[s]=[l]},unregisterTextFieldOnMouseDown:function(e){const t=`registerTextFieldOnMouseDown_${o(e)}`,n=D[t];n&&n.length&&n.forEach((t=>{t.handle.dispose(),e&&e.removeEventListener("mousedown",t.listener)}))},containsActiveElement:function(e){var t=i(e);return t&&t.contains?t.contains(document.activeElement):null},copyChild:function(e){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.setAttribute("contenteditable","true"),e.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.execCommand("unselect"),e.blur(),e.removeAttribute("contenteditable"))},copyText:function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)}));else{var t=document.createElement("textarea");t.value=e,t.readOnly=!0,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}},getMenuableDimensions:F,invokeMultipleMethod:function(e,t,n,o,r,i,l,s,a){var c={windowAndDocument:null,dimensions:null,zIndex:0};return c.windowAndDocument=q(e,t),c.dimensions=F(n,o,r,i,l,s),c.zIndex=R([i],a),c},registerOTPInputOnInputEvent:function(e,t){for(let n=0;nZ(o,n,e,t),r=t=>G(t,n,e),i=o=>V(o,n,e,t);e[n].addEventListener("input",o),e[n].addEventListener("focus",r),e[n].addEventListener("keyup",i),e[n]._optInput={inputListener:o,focusListener:r,keyupListener:i}}},unregisterOTPInputOnInputEvent:function(e){for(let t=0;ti.offsetTop-8?l.scrollTo({top:i.offsetTop-i.clientHeight,behavior:"smooth"}):s+a=r-n},get_top_domain:J,setCookie:function(e,t){if(null!=t){var n=J();n?isNaN(n[0])&&(n=`.${n}`):n="";var o=new Date;o.setTime(o.getTime()+2592e6),document.cookie=`${e}=${escape(null==t?void 0:t.toString())};path=/;expires=${o.toUTCString()};domain=${n}`}},getCookie:function(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n?unescape(n[2]):null},registerDragEvent:function(e,t){if(e){const n=o(e),r=e=>{if(t){const n=e.target.getAttribute(t);e.dataTransfer.setData(t,n),e.dataTransfer.setData("offsetX",e.offsetX.toString()),e.dataTransfer.setData("offsetY",e.offsetY.toString())}};D[`${n}:dragstart`]=[{listener:r}],e.addEventListener("dragstart",r)}},unregisterDragEvent:function(e){const t=o(e);if(t){const n=`${t}:dragstart`;D[n]&&D[n].forEach((t=>{e.removeEventListener("dragstart",t.listener)}))}},resizableDataTable:function(e){const t=e.querySelector("table"),n=t.querySelector(".m-data-table-header").getElementsByTagName("tr")[0],o=n?n.children:[];if(!o)return;t.style.overflow="hidden";const r=t.offsetHeight;for(var i=0;ie.stopPropagation())),n.addEventListener("mousedown",(function(e){i=e.target.parentElement,l=i.nextElementSibling,r=e.pageX,u=t.offsetWidth;var n=function(e){if("border-box"==s(e,"box-sizing"))return 0;var t=s(e,"padding-left"),n=s(e,"padding-right");return parseInt(t)+parseInt(n)}(i);a=i.offsetWidth-n,l&&(c=l.offsetWidth-n)})),document.addEventListener("mousemove",(function(n){if(i){let o=n.pageX-r;e.classList.contains("m-data-table--rtl")&&(o=0-o);let s=a+o;i.style.width=s+"px";if(e.classList.contains("m-data-table--resizable-overflow"))return void(t.style.width=u+o+"px");if(e.classList.contains("m-data-table--resizable-independent")){let e=c-o;const t=a+c;o>0?l&&e{const t=e.scrollWidth,n=e.clientWidth,o=e.scrollLeft,r=e.parentElement.classList.contains("m-data-table--rtl");Math.abs(t-((r?-o:o)+n))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolled-to-right")):Math.abs(o-(r?t-n:0))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-right"),e.classList.add("scrolled-to-left")):(e.classList.remove("scrolled-to-right"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolling"))};t(),e.addEventListener("scroll",t),e._m_table_scroll_event=t},unregisterTableScrollEvent:function(e){const t=e._m_table_scroll_event;t&&(e.removeEventListener("scroll",t),delete e._m_table_scroll_event)},isScrollNearBottom:function(e,t=200){return!!e&&e.scrollHeight-(e.scrollTop+e.clientHeight)= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export function addOnceEventListener (\r\n el: EventTarget,\r\n eventName: string,\r\n cb: (event: Event) => void,\r\n options: boolean | AddEventListenerOptions = false\r\n): void {\r\n const once = (event: Event) => {\r\n cb(event)\r\n el.removeEventListener(eventName, once, options)\r\n }\r\n\r\n el.addEventListener(eventName, once, options)\r\n}\r\n\r\nlet passiveSupported = false\r\ntry {\r\n if (typeof window !== 'undefined') {\r\n const testListenerOpts = Object.defineProperty({}, 'passive', {\r\n get: () => {\r\n passiveSupported = true\r\n },\r\n })\r\n\r\n window.addEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n window.removeEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n }\r\n} catch (e) { console.warn(e) } /* eslint-disable-line no-console */\r\nexport { passiveSupported }\r\n\r\nexport function addPassiveEventListener (\r\n el: EventTarget,\r\n event: string,\r\n cb: ((e: any) => void),\r\n options: {}\r\n): void {\r\n el.addEventListener(event, cb, passiveSupported ? options : false)\r\n}\r\n\r\nexport function getZIndex (el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\n// KeyboardEvent.keyCode aliases\r\nexport const keyCodes = Object.freeze({\r\n enter: 13,\r\n tab: 9,\r\n delete: 46,\r\n esc: 27,\r\n space: 32,\r\n up: 38,\r\n down: 40,\r\n left: 37,\r\n right: 39,\r\n end: 35,\r\n home: 36,\r\n del: 46,\r\n backspace: 8,\r\n insert: 45,\r\n pageup: 33,\r\n pagedown: 34,\r\n shift: 16,\r\n})\r\n\r\n/** Polyfill for Event.prototype.composedPath */\r\nexport function composedPath (e: Event): EventTarget[] {\r\n if (e.composedPath) return e.composedPath()\r\n\r\n const path = []\r\n let el = e.target as Element\r\n\r\n while (el) {\r\n path.push(el)\r\n\r\n if (el.tagName === 'HTML') {\r\n path.push(document)\r\n path.push(window)\r\n\r\n return path\r\n }\r\n\r\n el = el.parentElement!\r\n }\r\n return path\r\n}\r\n\r\nexport function getBlazorId(el) {\r\n if (!el) {\r\n return null;\r\n }\r\n let _bl_ = el.getAttributeNames().find(a => a.startsWith('_bl_'))\r\n if (_bl_) {\r\n _bl_ = _bl_.substring(4);\r\n }\r\n\r\n return _bl_;\r\n}\r\n\r\nexport function getElementSelector(el) {\r\n if (!(el instanceof Element))\r\n return;\r\n var path = [];\r\n while (el.nodeType === Node.ELEMENT_NODE) {\r\n var selector = el.nodeName.toLowerCase();\r\n if (el.id) {\r\n selector = '#' + el.id;\r\n path.unshift(selector);\r\n break;\r\n } else {\r\n var sib = el, nth = 1;\r\n while (sib = sib.previousElementSibling) {\r\n if (sib.nodeName.toLowerCase() == selector)\r\n nth++;\r\n }\r\n if (nth != 1)\r\n selector += \":nth-of-type(\" + nth + \")\";\r\n }\r\n path.unshift(selector);\r\n el = el.parentNode;\r\n }\r\n return path.join(\" > \");\r\n}\r\n\r\nexport function getEventTarget(target: HTMLElement | EventTarget) {\r\n const el = target as HTMLElement;\r\n const eventTarget: MbEventTarget = {};\r\n const elementReferenceId = el\r\n .getAttributeNames()\r\n .find((a) => a.startsWith(\"_bl_\"));\r\n if (elementReferenceId) {\r\n eventTarget.elementReferenceId = elementReferenceId;\r\n eventTarget.selector = `[${elementReferenceId}]`;\r\n } else {\r\n eventTarget.selector = getElementSelector(el);\r\n }\r\n\r\n eventTarget.class = el.getAttribute(\"class\");\r\n\r\n return eventTarget;\r\n}\r\n\r\nexport function getDom(elOrString: Element | string | undefined) {\r\n let element: HTMLElement;\r\n\r\n try {\r\n if (!elOrString) {\r\n element = document.body;\r\n } else if (typeof elOrString === \"string\") {\r\n if (elOrString === \"document\") {\r\n element = document.documentElement;\r\n } else if (elOrString.indexOf(\"__.__\") > 0) {\r\n // for example: el__.__parentElement\r\n let array = elOrString.split(\"__.__\");\r\n let i = 0;\r\n let el = document.querySelector(array[i++]);\r\n\r\n if (el) {\r\n while (array[i]) {\r\n el = el[array[i]];\r\n i++;\r\n }\r\n }\r\n\r\n if (el instanceof HTMLElement) {\r\n element = el;\r\n }\r\n } else {\r\n element = document.querySelector(elOrString);\r\n }\r\n } else {\r\n element = elOrString as HTMLElement;\r\n }\r\n\r\n } catch (error) {\r\n console.error(error)\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport const canUseDom = !!(\r\n typeof window !== 'undefined' &&\r\n typeof document !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n)\r\n\r\nexport function convertToUnit (str: number, unit?: string): string\r\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\r\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\r\n if (str == null || str === '') {\r\n return undefined\r\n } else if (isNaN(+str!)) {\r\n return String(str)\r\n } else if (!isFinite(+str!)) {\r\n return undefined\r\n } else {\r\n return `${Number(str)}${unit}`\r\n }\r\n}","// see https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Rendering/Events/EventTypes.ts\r\n// updated at 2022/08/31\r\n\r\nexport const touchEvents = [\r\n \"touchcancel\",\r\n \"touchend\",\r\n \"touchmove\",\r\n \"touchenter\",\r\n \"touchleave\",\r\n \"touchstart\",\r\n];\r\n\r\nexport function parseMouseEvent(event: MouseEvent): Blazor.MouseEventArgs {\r\n return {\r\n detail: event.detail,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n offsetX: event.offsetX,\r\n offsetY: event.offsetY,\r\n pageX: event.pageX,\r\n pageY: event.pageY,\r\n button: event.button,\r\n buttons: event.buttons,\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n } as Blazor.MouseEventArgs;\r\n}\r\n\r\nexport function parseTouchEvent(event: TouchEvent): Blazor.TouchEventArgs {\r\n return {\r\n detail: event.detail,\r\n touches: parseTouch(event.touches),\r\n targetTouches: parseTouch(event.targetTouches),\r\n changedTouches: parseTouch(event.changedTouches),\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n };\r\n}\r\n\r\nfunction parseTouch(touchList: TouchList): Blazor.TouchPoint[] {\r\n const touches: Blazor.TouchPoint[] = [];\r\n\r\n for (let i = 0; i < touchList.length; i++) {\r\n const touch = touchList[i];\r\n touches.push({\r\n identifier: touch.identifier,\r\n clientX: touch.clientX,\r\n clientY: touch.clientY,\r\n screenX: touch.screenX,\r\n screenY: touch.screenY,\r\n pageX: touch.pageX,\r\n pageY: touch.pageY,\r\n });\r\n }\r\n return touches;\r\n}\r\n\r\nexport function parseChangeEvent(event: Event): Blazor.ChangeEventArgs {\r\n const element = event.target as Element;\r\n if (isTimeBasedInput(element)) {\r\n const normalizedValue = normalizeTimeBasedValue(element);\r\n return { value: normalizedValue };\r\n } else if (isMultipleSelectInput(element)) {\r\n const selectElement = element as HTMLSelectElement;\r\n const selectedValues = Array.from(selectElement.options)\r\n .filter((option) => option.selected)\r\n .map((option) => option.value);\r\n return { value: selectedValues };\r\n } else {\r\n const targetIsCheckbox = isCheckbox(element);\r\n const newValue = targetIsCheckbox ? !!element[\"checked\"] : element[\"value\"];\r\n return { value: newValue };\r\n }\r\n}\r\n\r\nexport function parseDragEvent(event: DragEvent): Blazor.DragEventArgs {\r\n return {\r\n ...parseMouseEvent(event),\r\n dataTransfer: event.dataTransfer ? {\r\n dropEffect: event.dataTransfer.dropEffect,\r\n effectAllowed: event.dataTransfer.effectAllowed,\r\n files: Array.from(event.dataTransfer.files).map(f => f.name),\r\n items: Array.from(event.dataTransfer.items).map(i => ({ kind: i.kind, type: i.type })),\r\n types: event.dataTransfer.types\r\n } : null,\r\n };\r\n}\r\n\r\nfunction isTimeBasedInput(element: Element): element is HTMLInputElement {\r\n return timeBasedInputs.indexOf(element.getAttribute(\"type\")!) !== -1;\r\n}\r\n\r\nconst timeBasedInputs = [\"date\", \"datetime-local\", \"month\", \"time\", \"week\"];\r\n\r\nfunction normalizeTimeBasedValue(element: HTMLInputElement): string {\r\n const value = element.value;\r\n const type = element.type;\r\n switch (type) {\r\n case \"date\":\r\n case \"month\":\r\n return value;\r\n case \"datetime-local\":\r\n return value.length === 16 ? value + \":00\" : value; // Convert yyyy-MM-ddTHH:mm to yyyy-MM-ddTHH:mm:00\r\n case \"time\":\r\n return value.length === 5 ? value + \":00\" : value; // Convert hh:mm to hh:mm:00\r\n case \"week\":\r\n // For now we are not going to normalize input type week as it is not trivial\r\n return value;\r\n }\r\n\r\n throw new Error(`Invalid element type '${type}'.`);\r\n}\r\n\r\nfunction isMultipleSelectInput(element: Element): element is HTMLSelectElement {\r\n return (\r\n element instanceof HTMLSelectElement && element.type === \"select-multiple\"\r\n );\r\n}\r\n\r\nfunction isCheckbox(element: Element | null): boolean {\r\n return (\r\n !!element &&\r\n element.tagName === \"INPUT\" &&\r\n element.getAttribute(\"type\") === \"checkbox\"\r\n );\r\n}\r\n","import { getEventTarget } from \"../utils/helper\";\r\nimport { parseDragEvent, parseMouseEvent, parseTouchEvent } from \"./EventType\";\r\n\r\nexport function registerExtraMouseEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"mouse\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraTouchEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"touch\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraDropEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: (e: DragEvent) => {\r\n const eventArgs = parseDragEvent(e);\r\n const value = e.dataTransfer.getData('data-value');\r\n const offsetX = e.dataTransfer.getData('offsetX');\r\n const offsetY = e.dataTransfer.getData('offsetY');\r\n\r\n eventArgs.dataTransfer['data'] = {\r\n value,\r\n offsetX: Number(offsetX),\r\n offsetY: Number(offsetY)\r\n }\r\n\r\n return eventArgs;\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function createSharedEventArgs(type: \"mouse\" | \"touch\", e: Event,) {\r\n let args = { target: {} }\r\n if (type === 'mouse') {\r\n args = {\r\n ...args,\r\n ...parseMouseEvent(e as MouseEvent)\r\n }\r\n } else if (type === 'touch') {\r\n args = {\r\n ...args,\r\n ...parseTouchEvent(e as TouchEvent)\r\n }\r\n }\r\n\r\n args.target = getEventTarget(e.target);\r\n\r\n return args;\r\n}","import { createSharedEventArgs } from \"events/extra\";\r\nimport { addOnceEventListener, passiveSupported } from \"utils/helper\";\r\n\r\nlet sliderHandleId = 0;\r\nconst sliderHandlesById = {};\r\n\r\nexport function registerSliderEvents(\r\n el: HTMLElement,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n sliderHandlesById[sliderHandleId] = onSliderMouseDown;\r\n\r\n const app = document.querySelector(\"[data-app]\");\r\n\r\n const mouseUpOptions = passiveSupported\r\n ? { passive: true, capture: true }\r\n : true;\r\n\r\n const mouseMoveOptions = passiveSupported ? { passive: true } : false;\r\n\r\n el.addEventListener(\"mousedown\", onSliderMouseDown);\r\n el.addEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n return sliderHandleId++;\r\n\r\n async function onSliderMouseDown(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n\r\n onMouseMove(e);\r\n\r\n app.addEventListener(\r\n isTouchEvent ? \"touchmove\" : \"mousemove\",\r\n onMouseMove,\r\n mouseMoveOptions\r\n );\r\n addOnceEventListener(\r\n app,\r\n isTouchEvent ? \"touchend\" : \"mouseup\",\r\n onSliderMouseUp,\r\n mouseUpOptions\r\n );\r\n\r\n if (isTouchEvent) {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnTouchStartInternal\",\r\n createSharedEventArgs(\"touch\", e)\r\n );\r\n } else {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnMouseDownInternal\",\r\n createSharedEventArgs(\"mouse\", e)\r\n );\r\n }\r\n }\r\n\r\n async function onSliderMouseUp(e: Event) {\r\n e.stopPropagation();\r\n\r\n app.removeEventListener(\"touchmove\", onMouseMove, mouseMoveOptions as any);\r\n app.removeEventListener(\"mousemove\", onMouseMove, mouseMoveOptions as any);\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseUpInternal\");\r\n }\r\n\r\n async function onMouseMove(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n const payload = {\r\n type: e.type,\r\n clientX: isTouchEvent ? e.touches[0].clientX : e.clientX,\r\n clientY: isTouchEvent ? e.touches[0].clientY : e.clientY,\r\n };\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseMoveInternal\", payload);\r\n }\r\n}\r\n\r\nexport function unregisterSliderEvents(el: HTMLElement, id: number) {\r\n if (el) {\r\n const onSliderMouseDown = sliderHandlesById[id];\r\n el.removeEventListener(\"mousedown\", onSliderMouseDown);\r\n el.removeEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n delete sliderHandlesById[id];\r\n }\r\n}\r\n","\r\nlet textareaAutoGrowNextId = 0;\r\nconst textareaAutoGrowMap: {\r\n [prop: string]: (e: HTMLElementEventMap['input']) => void;\r\n} = {}\r\n\r\nexport function registerTextareaAutoGrowEvent(input: HTMLElement) {\r\n const id = textareaAutoGrowNextId;\r\n const inputCallback = (e: HTMLElementEventMap['input']) => {\r\n const target = e.target as HTMLTextAreaElement;\r\n const autoGrow = target.getAttribute('data-auto-grow');\r\n if (autoGrow === undefined) {\r\n return;\r\n }\r\n const rows = target.getAttribute('rows');\r\n const rowHeight = target.getAttribute('data-row-height');\r\n calculateTextareaHeight(target, rows, rowHeight)\r\n };\r\n\r\n textareaAutoGrowMap[id] = inputCallback;\r\n\r\n input.addEventListener('input', inputCallback)\r\n\r\n return textareaAutoGrowNextId++;\r\n}\r\n\r\nexport function unregisterTextareaAutoGrowEvent(input: HTMLElement, textareaAutoGrowNextId: number) {\r\n if (!input) return;\r\n const inputCallback = textareaAutoGrowMap[textareaAutoGrowNextId];\r\n if (inputCallback) {\r\n input.removeEventListener('input', inputCallback);\r\n }\r\n}\r\n\r\nexport function calculateTextareaHeight(textarea: HTMLTextAreaElement, rows: string, rowHeight: string) {\r\n textarea.style.height = '0'\r\n const height = textarea.scrollHeight;\r\n const minHeight = parseInt(rows, 10) * parseFloat(rowHeight);\r\n textarea.style.height = Math.max(height, minHeight) + 'px';\r\n}","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import { parseMouseEvent } from \"./EventType\";\r\nimport { registerExtraDropEvent, registerExtraMouseEvent, registerExtraTouchEvent } from \"./extra\";\r\n\r\nexport function registerExtraEvents() {\r\n registerExtraMouseEvent(\"exmousedown\", \"mousedown\");\r\n registerExtraMouseEvent(\"exmouseup\", \"mouseup\");\r\n registerExtraMouseEvent(\"exclick\", \"click\");\r\n registerExtraMouseEvent(\"exmouseleave\", \"mouseleave\");\r\n registerExtraMouseEvent(\"exmouseenter\", \"mouseenter\");\r\n registerExtraMouseEvent(\"exmousemove\", \"mousemove\");\r\n registerExtraTouchEvent(\"extouchstart\", \"touchstart\");\r\n registerEvent(\"transitionend\", \"transitionend\");\r\n registerExtraDropEvent(\"exdrop\", \"drop\");\r\n registerAuxclickEvent();\r\n}\r\n\r\nfunction registerEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n });\r\n }\r\n}\r\n\r\nfunction registerAuxclickEvent() {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(\"auxclick\", {\r\n browserEventName: \"auxclick\",\r\n createEventArgs: parseMouseEvent\r\n });\r\n }\r\n}\r\n","import { keyCodes } from \"utils/helper\";\r\n\r\ntype RippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & {\r\n rippleStop?: boolean;\r\n};\r\n\r\nconst DELAY_RIPPLE = 80;\r\n\r\nfunction transform(el: HTMLElement, value: string) {\r\n el.style.transform = value;\r\n el.style.webkitTransform = value;\r\n}\r\n\r\nexport interface RippleOptions {\r\n class?: string;\r\n center?: boolean;\r\n circle?: boolean;\r\n}\r\n\r\nfunction isTouchEvent(e: RippleEvent): e is TouchEvent {\r\n return e.constructor.name === \"TouchEvent\";\r\n}\r\n\r\nfunction isKeyboardEvent(e: RippleEvent): e is KeyboardEvent {\r\n return e.constructor.name === \"KeyboardEvent\";\r\n}\r\n\r\nconst calculate = (\r\n e: RippleEvent,\r\n el: HTMLElement,\r\n value: RippleOptions = {}\r\n) => {\r\n let localX = 0;\r\n let localY = 0;\r\n\r\n if (!isKeyboardEvent(e)) {\r\n const offset = el.getBoundingClientRect();\r\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\r\n\r\n localX = target.clientX - offset.left;\r\n localY = target.clientY - offset.top;\r\n }\r\n\r\n let radius = 0;\r\n let scale = 0.3;\r\n if (el._ripple && el._ripple.circle) {\r\n scale = 0.15;\r\n radius = el.clientWidth / 2;\r\n radius = value.center\r\n ? radius\r\n : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\r\n } else {\r\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\r\n }\r\n\r\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\r\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\r\n\r\n const x = value.center ? centerX : `${localX - radius}px`;\r\n const y = value.center ? centerY : `${localY - radius}px`;\r\n\r\n return { radius, scale, x, y, centerX, centerY };\r\n};\r\n\r\nconst ripples = {\r\n /* eslint-disable max-statements */\r\n show(e: RippleEvent, el: HTMLElement, value: RippleOptions = {}) {\r\n if (!el._ripple || !el._ripple.enabled) {\r\n return;\r\n }\r\n\r\n const container = document.createElement(\"span\");\r\n const animation = document.createElement(\"span\");\r\n\r\n container.appendChild(animation);\r\n container.className = \"m-ripple__container\";\r\n\r\n if (value.class) {\r\n container.className += ` ${value.class}`;\r\n }\r\n\r\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);\r\n\r\n const size = `${radius * 2}px`;\r\n animation.className = \"m-ripple__animation\";\r\n animation.style.width = size;\r\n animation.style.height = size;\r\n\r\n el.appendChild(container);\r\n\r\n const computed = window.getComputedStyle(el);\r\n if (computed && computed.position === \"static\") {\r\n el.style.position = \"relative\";\r\n el.dataset.previousPosition = \"static\";\r\n }\r\n\r\n animation.classList.add(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--visible\");\r\n transform(\r\n animation,\r\n `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`\r\n );\r\n animation.dataset.activated = String(performance.now());\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--in\");\r\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\r\n }, 0);\r\n },\r\n\r\n hide(el: HTMLElement | null) {\r\n if (!el || !el._ripple || !el._ripple.enabled) return;\r\n\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n\r\n if (ripples.length === 0) return;\r\n const animation = ripples[ripples.length - 1];\r\n\r\n if (animation.dataset.isHiding) return;\r\n else animation.dataset.isHiding = \"true\";\r\n\r\n const diff = performance.now() - Number(animation.dataset.activated);\r\n const delay = Math.max(250 - diff, 0);\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--in\");\r\n animation.classList.add(\"m-ripple__animation--out\");\r\n\r\n setTimeout(() => {\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n if (ripples.length === 1 && el.dataset.previousPosition) {\r\n el.style.position = el.dataset.previousPosition;\r\n delete el.dataset.previousPosition;\r\n }\r\n\r\n if (animation.parentNode?.parentNode === el)\r\n el.removeChild(animation.parentNode);\r\n }, 300);\r\n }, delay);\r\n },\r\n};\r\n\r\nfunction rippleShow(e: RippleEvent) {\r\n const value: RippleOptions = {};\r\n const element = e.currentTarget as HTMLElement;\r\n\r\n if (!element || !element._ripple || element._ripple.touched || e.rippleStop)\r\n return;\r\n\r\n // Don't allow the event to trigger ripples on any other elements\r\n e.rippleStop = true;\r\n\r\n if (isTouchEvent(e)) {\r\n element._ripple.touched = true;\r\n element._ripple.isTouch = true;\r\n } else {\r\n // It's possible for touch events to fire\r\n // as mouse events on Android/iOS, this\r\n // will skip the event call if it has\r\n // already been registered as touch\r\n if (element._ripple.isTouch) return;\r\n }\r\n value.center = element._ripple.centered || isKeyboardEvent(e);\r\n if (element._ripple.class) {\r\n value.class = element._ripple.class;\r\n }\r\n\r\n if (isTouchEvent(e)) {\r\n // already queued that shows or hides the ripple\r\n if (element._ripple.showTimerCommit) return;\r\n\r\n element._ripple.showTimerCommit = () => {\r\n ripples.show(e, element, value);\r\n };\r\n element._ripple.showTimer = window.setTimeout(() => {\r\n if (element && element._ripple && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n }\r\n }, DELAY_RIPPLE);\r\n } else {\r\n ripples.show(e, element, value);\r\n }\r\n}\r\n\r\nfunction rippleHide(e: Event) {\r\n const element = e.currentTarget as HTMLElement | null;\r\n if (!element || !element._ripple) return;\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n\r\n // The touch interaction occurs before the show timer is triggered.\r\n // We still want to show ripple effect.\r\n if (e.type === \"touchend\" && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n\r\n // re-queue ripple hiding\r\n var timerHandler: TimerHandler = () => rippleHide(e);\r\n element._ripple.showTimer = setTimeout(timerHandler);\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (element._ripple) {\r\n element._ripple.touched = false;\r\n }\r\n });\r\n ripples.hide(element);\r\n}\r\n\r\nfunction rippleCancelShow(e: MouseEvent | TouchEvent) {\r\n const element = e.currentTarget as HTMLElement | undefined;\r\n\r\n if (!element || !element._ripple) return;\r\n\r\n if (element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit = null;\r\n }\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n}\r\n\r\nfunction keyboardRippleShow(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (\r\n !target[\"keyboardRipple\"] &&\r\n (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)\r\n ) {\r\n target[\"keyboardRipple\"] = true;\r\n rippleShow(e);\r\n }\r\n}\r\n\r\nfunction keyboardRippleHide(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n}\r\n\r\nfunction focusRippleHide(e: FocusEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (target[\"keyboardRipple\"] === true) {\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n }\r\n}\r\nexport function updateRipple(\r\n el: HTMLElement,\r\n options: RippleOptions | null,\r\n wasEnabled: boolean\r\n) {\r\n let enabled = false;\r\n if (options) {\r\n enabled = true;\r\n } else {\r\n ripples.hide(el);\r\n }\r\n\r\n const value = options || {};\r\n el._ripple = el._ripple || {};\r\n el._ripple.enabled = enabled;\r\n el._ripple = {\r\n ...el._ripple,\r\n centered: value.center,\r\n class: value.class,\r\n circle: value.circle,\r\n };\r\n\r\n if (enabled && !wasEnabled) {\r\n el.addEventListener(\"touchstart\", rippleShow, { passive: true });\r\n el.addEventListener(\"touchend\", rippleHide, { passive: true });\r\n el.addEventListener(\"touchmove\", rippleCancelShow, { passive: true });\r\n el.addEventListener(\"touchcancel\", rippleHide);\r\n\r\n el.addEventListener(\"mousedown\", rippleShow);\r\n el.addEventListener(\"mouseup\", rippleHide);\r\n el.addEventListener(\"mouseleave\", rippleHide);\r\n\r\n el.addEventListener(\"keydown\", keyboardRippleShow);\r\n el.addEventListener(\"keyup\", keyboardRippleHide);\r\n\r\n el.addEventListener(\"blur\", focusRippleHide);\r\n\r\n // Anchor tags can be dragged, causes other hides to fail - #1537\r\n el.addEventListener(\"dragstart\", rippleHide, { passive: true });\r\n } else if (!enabled && wasEnabled) {\r\n removeListeners(el);\r\n }\r\n}\r\n\r\nexport function removeListeners(el: HTMLElement) {\r\n el.removeEventListener(\"mousedown\", rippleShow);\r\n el.removeEventListener(\"touchstart\", rippleShow);\r\n el.removeEventListener(\"touchend\", rippleHide);\r\n el.removeEventListener(\"touchmove\", rippleCancelShow);\r\n el.removeEventListener(\"touchcancel\", rippleHide);\r\n el.removeEventListener(\"mouseup\", rippleHide);\r\n el.removeEventListener(\"mouseleave\", rippleHide);\r\n el.removeEventListener(\"keydown\", keyboardRippleShow);\r\n el.removeEventListener(\"keyup\", keyboardRippleHide);\r\n el.removeEventListener(\"dragstart\", rippleHide);\r\n el.removeEventListener(\"blur\", focusRippleHide);\r\n el._ripple.enabled = false;\r\n}\r\n","import debounceIt from \"just-debounce-it\";\r\nimport throttle from \"just-throttle\";\r\n\r\nimport { parseDragEvent, parseTouchEvent, touchEvents } from \"./events/EventType\";\r\nimport { registerExtraEvents } from \"./events/index\";\r\nimport registerRippleObserver from \"./ripple\";\r\nimport { canUseDom, getBlazorId, getDom, getElementSelector } from \"./utils/helper\";\r\n\r\nwindow.onload = function () {\r\n registerExtraEvents();\r\n registerPasteWithData(\"pastewithdata\")\r\n registerRippleObserver();\r\n}\r\n\r\nexport function getZIndex(el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\nexport function getDomInfo(element, selector = \"body\") {\r\n var result = {};\r\n\r\n var dom = getDom(element);\r\n\r\n if (dom) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n // clone and set display not none because\r\n // element with display:none can not get the dom info\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n dom.parentElement.appendChild(cloned);\r\n\r\n result = getDomInfoObj(cloned);\r\n\r\n dom.parentElement.removeChild(cloned);\r\n } else {\r\n result = getDomInfoObj(dom);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction getDomInfoObj(dom: HTMLElement) {\r\n var result = {};\r\n result[\"offsetTop\"] = dom.offsetTop || 0;\r\n result[\"offsetLeft\"] = dom.offsetLeft || 0;\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n result[\"scrollWidth\"] = dom.scrollWidth || 0;\r\n result[\"scrollLeft\"] = dom.scrollLeft || 0;\r\n result[\"scrollTop\"] = dom.scrollTop || 0;\r\n result[\"clientTop\"] = dom.clientTop || 0;\r\n result[\"clientLeft\"] = dom.clientLeft || 0;\r\n result[\"clientHeight\"] = dom.clientHeight || 0;\r\n result[\"clientWidth\"] = dom.clientWidth || 0;\r\n var position = getElementPos(dom);\r\n result[\"offsetWidth\"] = Math.round(position.offsetWidth) || 0;\r\n result[\"offsetHeight\"] = Math.round(position.offsetHeight) || 0;\r\n result[\"relativeTop\"] = Math.round(position.relativeTop) || 0;\r\n result[\"relativeBottom\"] = Math.round(position.relativeBottom) || 0;\r\n result[\"relativeLeft\"] = Math.round(position.relativeLeft) || 0;\r\n result[\"relativeRight\"] = Math.round(position.relativeRight) || 0;\r\n result[\"absoluteLeft\"] = Math.round(position.absoluteLeft) || 0;\r\n result[\"absoluteTop\"] = Math.round(position.absoluteTop) || 0;\r\n return result;\r\n}\r\n\r\nfunction getElementPos(element) {\r\n var res: any = new Object();\r\n res.x = 0;\r\n res.y = 0;\r\n if (element !== null) {\r\n if (element.getBoundingClientRect) {\r\n var viewportElement = document.documentElement;\r\n var box = element.getBoundingClientRect();\r\n var scrollLeft = viewportElement.scrollLeft;\r\n var scrollTop = viewportElement.scrollTop;\r\n\r\n res.offsetWidth = box.width;\r\n res.offsetHeight = box.height;\r\n res.relativeTop = box.top;\r\n res.relativeBottom = box.bottom;\r\n res.relativeLeft = box.left;\r\n res.relativeRight = box.right;\r\n res.absoluteLeft = box.left + scrollLeft;\r\n res.absoluteTop = box.top + scrollTop;\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nexport function getParentClientWidthOrWindowInnerWidth(element: HTMLElement) {\r\n return element.parentElement ? element.parentElement.clientWidth : window.innerWidth;\r\n}\r\n\r\nexport function triggerEvent(elOrString, eventName: string, eventType: string, stopPropagation: boolean) {\r\n var dom = getDom(elOrString);\r\n var evt = document.createEvent(eventName);\r\n evt.initEvent(eventType);\r\n\r\n if (stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n return dom.dispatchEvent(evt);\r\n}\r\n\r\nexport function setProperty(elOrString, name, value) {\r\n var dom = getDom(elOrString);\r\n dom[name] = value;\r\n}\r\n\r\nexport function getBoundingClientRect(elOrString, attach = \"body\") {\r\n let dom = getDom(elOrString);\r\n\r\n var result = {};\r\n\r\n if (dom && dom.getBoundingClientRect) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n document.querySelector(attach)?.appendChild(cloned);\r\n\r\n result = cloned.getBoundingClientRect();\r\n\r\n document.querySelector(attach)?.removeChild(cloned);\r\n } else {\r\n result = dom.getBoundingClientRect();\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvar htmlElementEventListenerConfigs: { [prop: string]: HtmlElementEventListenerConfig[] } = {}\r\n\r\ntype HtmlElementEventListenerConfig = {\r\n listener?: (args: any) => void;\r\n options?: any;\r\n handle?: DotNet.DotNetObject;\r\n}\r\n\r\nexport function addHtmlElementEventListener(\r\n selector: \"window\" | \"document\" | K,\r\n type: string,\r\n invoker: DotNet.DotNetObject,\r\n options?: boolean | AddEventListenerOptions,\r\n extras?: Partial> & { relatedTarget?: string, throttle?: number, debounce?: number, key?: string }) {\r\n let htmlElement: HTMLElement | Window\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n if (!htmlElement) {\r\n // throw new Error(\"Unable to find the element.\");\r\n return false;\r\n }\r\n\r\n var key = extras?.key || `${selector}:${type}`;\r\n\r\n //save for remove\r\n const config: HtmlElementEventListenerConfig = {};\r\n\r\n var listener = (e: any): void => {\r\n if (extras?.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n\r\n if ((typeof e.cancelable !== \"boolean\" || e.cancelable) && extras?.preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // mouseleave relatedTarget\r\n if (extras?.relatedTarget && document.querySelector(extras.relatedTarget)?.contains(e.relatedTarget)) {\r\n return;\r\n }\r\n\r\n let obj: any = {}\r\n\r\n if (touchEvents.includes(e.type)) {\r\n obj = parseTouchEvent(e)\r\n } else {\r\n for (var k in e) {\r\n if (typeof e[k] == 'string' || typeof e[k] == 'number') {\r\n obj[k] = e[k];\r\n }\r\n }\r\n }\r\n\r\n if (e.target && e.target !== window && e.target !== document) {\r\n obj.target = {}\r\n const target = e.target as HTMLElement;\r\n const elementReferenceId = target.getAttributeNames().find(a => a.startsWith('_bl_'));\r\n if (elementReferenceId) {\r\n obj.target['elementReferenceId'] = elementReferenceId\r\n obj.target['selector'] = `[${elementReferenceId}]`\r\n } else {\r\n obj.target['selector'] = getElementSelector(target)\r\n }\r\n\r\n obj.target['class'] = target.getAttribute('class')\r\n }\r\n\r\n invoker.invokeMethodAsync('Invoke', obj);\r\n };\r\n\r\n if (extras?.debounce && extras.debounce > 0) {\r\n config.listener = debounceIt(listener, extras.debounce)\r\n } else if (extras?.throttle && extras.throttle > 0) {\r\n config.listener = throttle(listener, extras.throttle, { trailing: true })\r\n } else {\r\n config.listener = listener;\r\n }\r\n\r\n config.options = options;\r\n config.handle = invoker\r\n\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].push(config);\r\n } else {\r\n htmlElementEventListenerConfigs[key] = [config]\r\n }\r\n\r\n htmlElement.addEventListener(type, config.listener, config.options);\r\n\r\n return true;\r\n}\r\n\r\nexport function removeHtmlElementEventListener(selector, type, k?: string) {\r\n let htmlElement: any\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var k = k || `${selector}:${type}`;\r\n\r\n var configs = htmlElementEventListenerConfigs[k];\r\n\r\n if (configs) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n htmlElement?.removeEventListener(type, item.listener, item.options);\r\n });\r\n\r\n htmlElementEventListenerConfigs[k] = []\r\n }\r\n}\r\n\r\nexport function addMouseleaveEventListener(selector) {\r\n var htmlElement = document.querySelector(selector);\r\n if (htmlElement) {\r\n htmlElement.addEventListener()\r\n }\r\n}\r\n\r\nexport function contains(e1, e2) {\r\n const dom1 = getDom(e1);\r\n if (dom1 && dom1.contains) {\r\n return dom1.contains(getDom(e2));\r\n }\r\n return false;\r\n}\r\n\r\nexport function equalsOrContains(e1: any, e2: any) {\r\n const dom1 = getDom(e1);\r\n const dom2 = getDom(e2);\r\n return !!dom1 && dom1.contains && !!dom2 && (dom1 == dom2 || dom1.contains(dom2));\r\n}\r\n\r\nfunction fallbackCopyTextToClipboard(text) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n}\r\n\r\nexport function copy(text) {\r\n if (!navigator.clipboard) {\r\n fallbackCopyTextToClipboard(text);\r\n return;\r\n }\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function focus(elOrString, preventScroll: boolean = false) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLElement)) {\r\n console.error(\"Unable to focus an invalid element\");\r\n } else {\r\n dom.focus({ preventScroll });\r\n }\r\n}\r\n\r\nexport function select(elOrString) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement))\r\n throw new Error(\"Unable to select an invalid element\")\r\n dom.select()\r\n}\r\n\r\nexport function hasFocus(selector) {\r\n let dom = getDom(selector);\r\n return (document.activeElement === dom);\r\n}\r\n\r\nexport function blur(selector) {\r\n let dom = getDom(selector);\r\n dom.blur();\r\n}\r\n\r\nexport function log(text) {\r\n console.log(text);\r\n}\r\n\r\nexport function scrollIntoView(target, arg?: boolean | ScrollIntoViewOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n if (arg === null || arg == undefined) {\r\n dom.scrollIntoView();\r\n } else if (typeof arg === 'boolean') {\r\n dom.scrollIntoView(arg);\r\n } else {\r\n dom.scrollIntoView({\r\n block: arg.block == null ? undefined : arg.block,\r\n inline: arg.inline == null ? undefined : arg.inline,\r\n behavior: arg.behavior\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport function scrollIntoParentView(\r\n target,\r\n inline = false,\r\n start = false,\r\n level = 1,\r\n behavior: ScrollBehavior = \"smooth\",\r\n) {\r\n const dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n let parent: HTMLElement = dom;\r\n while (level > 0) {\r\n parent = parent.parentElement;\r\n level--;\r\n if (!parent) {\r\n return;\r\n }\r\n }\r\n\r\n const options: ScrollToOptions = {\r\n behavior,\r\n };\r\n\r\n if (inline) {\r\n if (start) {\r\n options.left = dom.offsetLeft\r\n } else {\r\n const to = dom.offsetLeft - parent.offsetLeft;\r\n if (to - parent.scrollLeft < 0) {\r\n options.left = to;\r\n } else if (\r\n to + dom.offsetWidth - parent.scrollLeft >\r\n parent.offsetWidth\r\n ) {\r\n options.left = to + dom.offsetWidth - parent.offsetWidth;\r\n }\r\n }\r\n } else {\r\n if (start) {\r\n options.top = dom.offsetTop;\r\n } else {\r\n const to = dom.offsetTop - parent.offsetTop;\r\n if (to - parent.scrollTop < 0) {\r\n options.top = to;\r\n } else if (\r\n to + dom.offsetHeight - parent.scrollTop >\r\n parent.offsetHeight\r\n ) {\r\n options.top = to + dom.offsetHeight - parent.offsetHeight;\r\n }\r\n }\r\n }\r\n\r\n if (options.left || options.top) {\r\n parent.scrollTo(options);\r\n }\r\n }\r\n}\r\n\r\nexport function scrollTo(target, options: ScrollToOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n const o = {\r\n left: options.left === null ? undefined : options.left,\r\n top: options.top === null ? undefined : options.top,\r\n behavior: options.behavior\r\n }\r\n dom.scrollTo(o)\r\n }\r\n}\r\n\r\nexport function scrollToTarget(\r\n target: string,\r\n container: string = null,\r\n offset: number = 0\r\n) {\r\n const targetEl: HTMLElement = document.querySelector(target);\r\n if (targetEl) {\r\n let top ;\r\n if (container) {\r\n top = targetEl.offsetTop;\r\n } else {\r\n top = targetEl.getBoundingClientRect().top + window.scrollY;\r\n }\r\n const containerEl = container\r\n ? document.querySelector(container)\r\n : document.documentElement\r\n containerEl.scrollTo({\r\n top: top - offset,\r\n behavior: \"smooth\",\r\n });\r\n }\r\n}\r\n\r\nexport function scrollToElement(target, offset: number, behavior?: ScrollBehavior) {\r\n const dom = getDom(target)\r\n if (!dom) return;\r\n const domPosition = dom.getBoundingClientRect().top;\r\n const offsetPosition = domPosition + window.pageYOffset - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: behavior\r\n })\r\n}\r\n\r\nexport function scrollToActiveElement(\r\n container,\r\n element = \".active\",\r\n position: \"center\" | number = \"center\"\r\n) {\r\n let containerEl: HTMLElement = getDom(container);\r\n\r\n let activeEl: HTMLElement\r\n if (typeof element === 'string') {\r\n activeEl = container.querySelector(element)\r\n }\r\n\r\n if (!containerEl || !activeEl) {\r\n return;\r\n }\r\n\r\n if (position === 'center') {\r\n containerEl.scrollTop = activeEl.offsetTop - containerEl.offsetHeight / 2 + activeEl.offsetHeight / 2;\r\n }\r\n else {\r\n containerEl.scrollTop = activeEl.offsetTop - position\r\n }\r\n}\r\n\r\nexport function addClsToFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeClsFromFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.remove(className);\r\n }\r\n}\r\n\r\nexport function getAbsoluteTop(e) {\r\n var offset = e.offsetTop;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteTop(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function getAbsoluteLeft(e) {\r\n var offset = e.offsetLeft;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteLeft(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function addElementToBody(element) {\r\n document.body.appendChild(element);\r\n}\r\n\r\nexport function delElementFromBody(element) {\r\n document.body.removeChild(element);\r\n}\r\n\r\nexport function addElementTo(addElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && addElement) {\r\n parent.appendChild(addElement);\r\n }\r\n}\r\n\r\nexport function delElementFrom(delElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && delElement) {\r\n parent.removeChild(delElement);\r\n }\r\n}\r\n\r\nexport function getActiveElement() {\r\n let element = document.activeElement;\r\n let id = element.getAttribute(\"id\") || \"\";\r\n return id;\r\n}\r\n\r\nexport function focusDialog(selector: string, count: number = 0) {\r\n let ele = document.querySelector(selector);\r\n if (ele && !ele.hasAttribute(\"disabled\")) {\r\n setTimeout(() => {\r\n ele.focus();\r\n let curId = \"#\" + getActiveElement();\r\n if (curId !== selector) {\r\n if (count < 10) {\r\n focusDialog(selector, count + 1);\r\n }\r\n }\r\n }, 10);\r\n }\r\n}\r\n\r\nexport function getWindow() {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n pageXOffset: window.pageXOffset,\r\n pageYOffset: window.pageYOffset,\r\n isTop: window.scrollY == 0,\r\n isBottom: (window.scrollY + window.innerHeight) == document.body.clientHeight\r\n };\r\n}\r\n\r\nexport function getWindowAndDocumentProps(windowProps: string[] = [], documentProps: string[] = []) {\r\n const obj = {}\r\n\r\n if (windowProps) {\r\n windowProps.forEach(prop => obj[prop] = window[prop]);\r\n obj['pageYOffset'] = getPageYOffset();\r\n }\r\n\r\n if (documentProps) {\r\n documentProps.forEach(prop => obj[prop] = document.documentElement[prop]);\r\n }\r\n\r\n return obj\r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n var timeout;\r\n return () => {\r\n const context = this, args = arguments;\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func.apply(this, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n};\r\n\r\nexport function css(element: any, name: string | object, value: string | null = null) {\r\n var dom = getDom(element);\r\n if (typeof name === 'string') {\r\n dom.style[name] = value;\r\n } else {\r\n for (let key in name) {\r\n if (name.hasOwnProperty(key)) {\r\n dom.style[key] = name[key];\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function addCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.add(clsName);\r\n } else {\r\n element.classList.add(...clsName);\r\n }\r\n}\r\n\r\nexport function removeCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.remove(clsName);\r\n } else {\r\n element.classList.remove(...clsName);\r\n }\r\n}\r\n\r\nexport function elementScrollIntoView(selector: Element | string) {\r\n let element = getDom(selector);\r\n\r\n if (!element)\r\n return;\r\n\r\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n}\r\n\r\nconst hasScrollbar = () => {\r\n let overflow = document.body.style.overflow;\r\n if (overflow && overflow === \"hidden\") return false;\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\nexport function getScroll() {\r\n return { x: window.pageXOffset, y: window.pageYOffset };\r\n}\r\n\r\nfunction isElement(node: Element) {\r\n const ELEMENT_NODE_TYPE = 1;\r\n return (\r\n node.tagName !== \"HTML\" &&\r\n node.tagName !== \"BODY\" &&\r\n node.nodeType == ELEMENT_NODE_TYPE\r\n )\r\n}\r\n\r\nexport function getScrollParent(el: Element | undefined, root: HTMLElement | Window | undefined = undefined) {\r\n root ??= canUseDom ? window : undefined;\r\n\r\n let node = el;\r\n while (node && node !== root && isElement(node)) {\r\n const { overflowY } = window.getComputedStyle(node);\r\n if (/scroll|auto|overlay/i.test(overflowY)) {\r\n return node;\r\n }\r\n\r\n node = node.parentNode as Element;\r\n }\r\n\r\n return root;\r\n}\r\n\r\nexport function getScrollTop(el: HTMLElement | Window): number {\r\n const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;\r\n\r\n // iOS scroll bounce cause minus scrollTop\r\n return Math.max(top, 0);\r\n}\r\n\r\nexport function getInnerText(element) {\r\n let dom = getDom(element);\r\n return dom.innerText;\r\n}\r\n\r\nexport function getMenuOrDialogMaxZIndex(exclude: Element[] = [], element: Element) {\r\n const base = getDom(element);\r\n // Start with lowest allowed z-index or z-index of\r\n // base component's element, whichever is greater\r\n const zis = [getZIndex(base)]\r\n\r\n const activeElements = [\r\n ...document.getElementsByClassName('m-menu__content--active'),\r\n ...document.getElementsByClassName('m-dialog__content--active'),\r\n ]\r\n\r\n // Get z-index for all active dialogs\r\n for (let index = 0; index < activeElements.length; index++) {\r\n if (!exclude.includes(activeElements[index])) {\r\n zis.push(getZIndex(activeElements[index]))\r\n }\r\n }\r\n\r\n return Math.max(...zis)\r\n}\r\n\r\nexport function getMaxZIndex() {\r\n return [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)\r\n}\r\n\r\nexport function getStyle(element, styleProp) {\r\n element = getDom(element);\r\n\r\n if (element.currentStyle) {\r\n return element.currentStyle[styleProp];\r\n } else if (window.getComputedStyle) {\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\r\n }\r\n}\r\n\r\nexport function getTextAreaInfo(element) {\r\n var result = {};\r\n var dom = getDom(element);\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n\r\n if (element.currentStyle) {\r\n result[\"lineHeight\"] = parseFloat(element.currentStyle[\"line-height\"]);\r\n result[\"paddingTop\"] = parseFloat(element.currentStyle[\"padding-top\"]);\r\n result[\"paddingBottom\"] = parseFloat(element.currentStyle[\"padding-bottom\"]);\r\n result[\"borderBottom\"] = parseFloat(element.currentStyle[\"border-bottom\"]);\r\n result[\"borderTop\"] = parseFloat(element.currentStyle[\"border-top\"]);\r\n } else if (window.getComputedStyle) {\r\n result[\"lineHeight\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"line-height\"));\r\n result[\"paddingTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-top\"));\r\n result[\"paddingBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-bottom\"));\r\n result[\"borderBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-bottom\"));\r\n result[\"borderTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-top\"));\r\n }\r\n //Firefox can return this as NaN, so it has to be handled here like that.\r\n if (Object.is(NaN, result[\"borderTop\"]))\r\n result[\"borderTop\"] = 1;\r\n if (Object.is(NaN, result[\"borderBottom\"]))\r\n result[\"borderBottom\"] = 1;\r\n return result;\r\n}\r\n\r\nconst objReferenceDict = {};\r\n\r\nexport function disposeObj(objReferenceName) {\r\n delete objReferenceDict[objReferenceName];\r\n}\r\n\r\nexport function upsertThemeStyle(id: string, style: string) {\r\n const d = document.getElementById(id);\r\n if (d) {\r\n document.head.removeChild(d);\r\n }\r\n\r\n const d_style = document.createElement('style')\r\n d_style.id = id;\r\n d_style.type = \"text/css\";\r\n d_style.innerHTML = style;\r\n\r\n document.head.insertAdjacentElement('beforeend', d_style)\r\n}\r\n\r\nexport function getImageDimensions(src: string) {\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image()\r\n img.src = src\r\n img.onload = function () {\r\n resolve({\r\n width: img.width,\r\n height: img.height,\r\n hasError: false\r\n })\r\n }\r\n img.onerror = function () {\r\n resolve({\r\n width: 0,\r\n height: 0,\r\n hasError: true\r\n })\r\n }\r\n })\r\n}\r\n\r\nexport function enablePreventDefaultForEvent(element: any, event: string, condition?: any) {\r\n const dom = getDom(element);\r\n if (!dom) return;\r\n if (event === 'keydown') {\r\n dom.addEventListener(event, (e: KeyboardEvent) => {\r\n if (Array.isArray(condition)) {\r\n var codes = condition as string[];\r\n if (codes.includes(e.code)) {\r\n e.preventDefault();\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n })\r\n } else {\r\n dom.addEventListener(event, e => {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getBoundingClientRects(selector) {\r\n var elements = document.querySelectorAll(selector);\r\n\r\n var result = [];\r\n\r\n for (var i = 0; i < elements.length; i++) {\r\n var e: Element = elements[i];\r\n var dom = {\r\n id: e.id,\r\n rect: e.getBoundingClientRect()\r\n };\r\n result.push(dom);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getSize(selectors, sizeProp) {\r\n var el = getDom(selectors);\r\n\r\n var display = el.style.display;\r\n var overflow = el.style.overflow;\r\n\r\n el.style.display = \"\";\r\n el.style.overflow = \"hidden\";\r\n\r\n var size = el[\"offset\" + sizeProp.charAt(0).toUpperCase() + sizeProp.slice(1)] || 0;\r\n\r\n el.style.display = display;\r\n el.style.overflow = overflow;\r\n\r\n return size;\r\n}\r\n\r\nexport function getProp(elOrString, name) {\r\n if (elOrString === 'window') {\r\n return window[name];\r\n }\r\n\r\n var el = getDom(elOrString);\r\n if (!el) {\r\n return null;\r\n }\r\n\r\n return el[name];\r\n}\r\n\r\nexport function updateWindowTransition(selectors, isActive, item) {\r\n var el: HTMLElement = getDom(selectors);\r\n var container: HTMLElement = el.querySelector('.m-window__container');\r\n\r\n if (item) {\r\n var itemEl: HTMLElement = getDom(item);\r\n container.style.height = itemEl.clientHeight + 'px';\r\n return;\r\n }\r\n\r\n if (isActive) {\r\n container.classList.add('m-window__container--is-active');\r\n container.style.height = el.clientHeight + 'px';\r\n } else {\r\n container.style.height = '';\r\n container.classList.remove('m-window__container--is-active');\r\n }\r\n}\r\n\r\nexport function getScrollHeightWithoutHeight(elOrString) {\r\n var el: HTMLElement = getDom(elOrString);\r\n if (!el) {\r\n return 0;\r\n }\r\n\r\n var height = el.style.height;\r\n el.style.height = '0'\r\n var scrollHeight = el.scrollHeight;\r\n el.style.height = height;\r\n\r\n return scrollHeight;\r\n}\r\n\r\nfunction registerPasteWithData(customEventName) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(customEventName, {\r\n browserEventName: 'paste',\r\n createEventArgs: (event: ClipboardEvent) => {\r\n return {\r\n type: event.type,\r\n pastedData: event.clipboardData.getData('text')\r\n };\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function registerTextFieldOnMouseDown(element, inputElement, callback) {\r\n if (!element || !inputElement) return\r\n\r\n const listener = (e: MouseEvent) => {\r\n const target = e.target;\r\n const inputDom = getDom(inputElement);\r\n if (target !== inputDom) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n if (callback) {\r\n const mouseEventArgs = {\r\n Detail: e.detail,\r\n ScreenX: e.screenX,\r\n ScreenY: e.screenY,\r\n ClientX: e.clientX,\r\n ClientY: e.clientY,\r\n OffsetX: e.offsetX,\r\n OffsetY: e.offsetY,\r\n PageX: e.pageX,\r\n PageY: e.pageY,\r\n Button: e.button,\r\n Buttons: e.buttons,\r\n CtrlKey: e.ctrlKey,\r\n ShiftKey: e.shiftKey,\r\n AltKey: e.altKey,\r\n MetaKey: e.metaKey,\r\n Type: e.type\r\n }\r\n\r\n callback.invokeMethodAsync('Invoke', mouseEventArgs);\r\n }\r\n };\r\n\r\n element.addEventListener('mousedown', listener)\r\n\r\n const config: HtmlElementEventListenerConfig = {\r\n listener,\r\n handle: callback\r\n };\r\n\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n htmlElementEventListenerConfigs[key] = [config]\r\n}\r\n\r\nexport function unregisterTextFieldOnMouseDown(element: HTMLElement) {\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n const configs = htmlElementEventListenerConfigs[key]\r\n if (configs && configs.length) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n if (element) {\r\n element.removeEventListener(\"mousedown\", item.listener);\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function containsActiveElement(selector) {\r\n var el = getDom(selector);\r\n if (el && el.contains) {\r\n return el.contains(document.activeElement);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function copyChild(el) {\r\n if (typeof el === 'string') {\r\n el = document.querySelector(el);\r\n }\r\n\r\n if (!el) return;\r\n\r\n el.setAttribute('contenteditable', 'true');\r\n el.focus();\r\n document.execCommand('selectAll', false, null);\r\n document.execCommand('copy');\r\n document.execCommand('unselect');\r\n el.blur();\r\n el.removeAttribute('contenteditable');\r\n}\r\n\r\nexport function copyText(text) {\r\n if (!navigator.clipboard) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n textArea.readOnly = true;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n return;\r\n }\r\n\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function getMenuableDimensions(hasActivator, activatorSelector, isDefaultAttach, contentElement, attached, attachSelector) {\r\n if (!attached) {\r\n var container = document.querySelector(attachSelector);\r\n if (contentElement.nodeType) {\r\n container.appendChild(contentElement);\r\n }\r\n }\r\n\r\n var dimensions = {\r\n activator: {} as any,\r\n content: {},\r\n relativeYOffset: 0,\r\n offsetParentLeft: 0\r\n };\r\n\r\n if (hasActivator) {\r\n var activator = document.querySelector(activatorSelector);\r\n dimensions.activator = measure(activator, isDefaultAttach)\r\n dimensions.activator.offsetLeft = activator.offsetLeft\r\n if (!isDefaultAttach) {\r\n // account for css padding causing things to not line up\r\n // this is mostly for v-autocomplete, hopefully it won't break anything\r\n dimensions.activator.offsetTop = activator.offsetTop\r\n } else {\r\n dimensions.activator.offsetTop = 0\r\n }\r\n }\r\n\r\n sneakPeek(() => {\r\n if (contentElement) {\r\n if (contentElement.offsetParent) {\r\n const offsetRect = getRoundedBoundedClientRect(contentElement.offsetParent)\r\n dimensions.relativeYOffset = getPageYOffset() + offsetRect.top\r\n\r\n if (hasActivator) {\r\n dimensions.activator.top -= dimensions.relativeYOffset\r\n dimensions.activator.left -= window.pageXOffset + offsetRect.left\r\n } else {\r\n dimensions.offsetParentLeft = offsetRect.left\r\n }\r\n }\r\n\r\n dimensions.content = measure(contentElement, isDefaultAttach)\r\n }\r\n }, contentElement);\r\n\r\n return dimensions;\r\n}\r\n\r\nfunction getPageYOffset() {\r\n let pageYOffset = window.pageYOffset\r\n const blockedScrollY = parseInt(document.documentElement.style.getPropertyValue('--m-body-scroll-y'))\r\n if (blockedScrollY) {\r\n pageYOffset += Math.abs(blockedScrollY);\r\n }\r\n return pageYOffset\r\n}\r\n\r\nfunction measure(el: HTMLElement, isDefaultAttach) {\r\n if (!el) return {}\r\n\r\n const rect = getRoundedBoundedClientRect(el)\r\n\r\n // Account for activator margin\r\n if (!isDefaultAttach) {\r\n const style = window.getComputedStyle(el)\r\n\r\n rect.left = parseInt(style.marginLeft!)\r\n rect.top = parseInt(style.marginTop!)\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getRoundedBoundedClientRect(el: Element) {\r\n if (!el || !el.nodeType) {\r\n return null\r\n }\r\n\r\n const rect = el.getBoundingClientRect()\r\n return {\r\n top: Math.round(rect.top),\r\n left: Math.round(rect.left),\r\n bottom: Math.round(rect.bottom),\r\n right: Math.round(rect.right),\r\n width: Math.round(rect.width),\r\n height: Math.round(rect.height),\r\n }\r\n}\r\n\r\nfunction sneakPeek(cb: () => void, el) {\r\n if (!el || !el.style || el.style.display !== 'none') {\r\n cb()\r\n return\r\n }\r\n\r\n el.style.display = 'inline-block'\r\n cb()\r\n el.style.display = 'none'\r\n}\r\n\r\nexport function invokeMultipleMethod(windowProps, documentProps, hasActivator, activatorSelector, attach, contentElement, attached, attachSelector, element) {\r\n var multipleResult = {\r\n windowAndDocument: null,\r\n dimensions: null,\r\n zIndex: 0\r\n };\r\n\r\n multipleResult.windowAndDocument = getWindowAndDocumentProps(windowProps, documentProps);\r\n multipleResult.dimensions = getMenuableDimensions(hasActivator, activatorSelector, attach, contentElement, attached, attachSelector);\r\n multipleResult.zIndex = getMenuOrDialogMaxZIndex([contentElement], element);\r\n\r\n return multipleResult;\r\n}\r\n\r\nexport function registerOTPInputOnInputEvent(elementList, callback) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const inputListener = (e: Event) => otpInputOnInputEvent(e, i, elementList, callback);\r\n const focusListener = (e: Event) => otpInputFocusEvent(e, i, elementList);\r\n const keyupListener =(e: KeyboardEvent) => otpInputKeyupEvent(e, i, elementList, callback);\r\n\r\n elementList[i].addEventListener('input', inputListener);\r\n elementList[i].addEventListener('focus', focusListener);\r\n elementList[i].addEventListener('keyup', keyupListener);\r\n\r\n elementList[i]._optInput = {\r\n inputListener,\r\n focusListener,\r\n keyupListener\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputKeyupEvent(e: KeyboardEvent, otpIdx: number, elementList, callback) {\r\n e.preventDefault();\r\n const eventKey = e.key;\r\n if (eventKey === 'ArrowLeft' || eventKey === 'Backspace') {\r\n if (eventKey === 'Backspace') {\r\n const obj = {\r\n type: eventKey,\r\n index: otpIdx,\r\n value: ''\r\n }\r\n if (callback) {\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n otpInputFocus(otpIdx - 1, elementList);\r\n }\r\n else if (eventKey === 'ArrowRight') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n }\r\n}\r\n\r\nfunction otpInputFocus(focusIndex: number, elementList) {\r\n if (focusIndex < 0) {\r\n otpInputFocus(0, elementList);\r\n }\r\n else if (focusIndex >= elementList.length) {\r\n otpInputFocus(elementList.length - 1, elementList);\r\n }\r\n else {\r\n if (document.activeElement !== elementList[focusIndex]) {\r\n const element = getDom(elementList[focusIndex])\r\n element.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputFocusEvent(e: Event, otpIdx: number, elementList) {\r\n const element = getDom(elementList[otpIdx]) as HTMLInputElement;\r\n if (element && document.activeElement === element) {\r\n element.select();\r\n }\r\n}\r\n\r\nfunction otpInputOnInputEvent(e: Event, otpIdx: number, elementList, callback) {\r\n const target = e.target as HTMLInputElement;\r\n const value = target.value;\r\n\r\n if (value && value !== '') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n\r\n if (callback) {\r\n const obj = {\r\n type: 'Input',\r\n index: otpIdx,\r\n value: value\r\n }\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n}\r\n\r\nexport function unregisterOTPInputOnInputEvent(elementList) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const el = elementList[i]\r\n if(el && el._optInput) {\r\n el.removeEventListener('input', el._optInput.inputListener)\r\n el.removeEventListener('focus', el._optInput.focusListener)\r\n el.removeEventListener('keyup', el._optInput.keyupListener)\r\n }\r\n }\r\n}\r\n\r\nexport function getListIndexWhereAttributeExists(selector: string, attribute:string, value: string) {\r\n const tiles = document.querySelectorAll(selector);\r\n if (!tiles) {\r\n return -1;\r\n }\r\n\r\n let index = -1;\r\n for (let i = 0; i < tiles.length; i++) {\r\n if (tiles[i].getAttribute(attribute) === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n}\r\n\r\nexport function scrollToTile(contentSelector: string, tilesSelector: string, index: number, keyCode: string) {\r\n var tiles = document.querySelectorAll(tilesSelector)\r\n if (!tiles) return;\r\n\r\n let tile = tiles[index] as HTMLElement;\r\n\r\n if (!tile) return;\r\n\r\n const content = document.querySelector(contentSelector);\r\n if (!content) return;\r\n\r\n const scrollTop = content.scrollTop;\r\n const contentHeight = content.clientHeight;\r\n\r\n if (scrollTop > tile.offsetTop - 8) {\r\n content.scrollTo({ top: tile.offsetTop - tile.clientHeight, behavior: \"smooth\" })\r\n } else if (scrollTop + contentHeight < tile.offsetTop + tile.clientHeight + 8) {\r\n content.scrollTo({ top: tile.offsetTop - contentHeight + tile.clientHeight * 2, behavior: \"smooth\" })\r\n }\r\n}\r\n\r\nexport function getElementTranslateY(element) {\r\n const style = window.getComputedStyle(element);\r\n const transform = style.transform || style.webkitTransform;\r\n const translateY = transform.slice(7, transform.length - 1).split(', ')[5];\r\n\r\n return Number(translateY);\r\n}\r\n\r\nfunction isWindow(element: any | Window): element is Window {\r\n return element === window\r\n}\r\n\r\nexport function checkIfThresholdIsExceededWhenScrolling(el: Element, parent: any, threshold: number) {\r\n if (!el || !parent) return\r\n\r\n let parentElement: HTMLElement | Window\r\n\r\n if (parent == \"window\") {\r\n parentElement = window;\r\n } else if (parent == \"document\") {\r\n parentElement = document.documentElement;\r\n } else {\r\n parentElement = document.querySelector(parent);\r\n }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const elementTop = rect.top;\r\n const current = isWindow(parentElement)\r\n ? window.innerHeight\r\n : parentElement.getBoundingClientRect().bottom\r\n\r\n return (current >= elementTop - threshold)\r\n}\r\n\r\nexport function get_top_domain() {\r\n var i, h,\r\n weird_cookie = 'weird_get_top_level_domain=cookie',\r\n hostname = document.location.hostname.split('.');\r\n for (i = hostname.length - 1; i >= 0; i--) {\r\n h = hostname.slice(i).join('.');\r\n document.cookie = weird_cookie + ';domain=.' + h + ';';\r\n if (document.cookie.indexOf(weird_cookie) > -1) {\r\n // We were able to store a cookie! This must be it\r\n document.cookie = weird_cookie.split('=')[0] + '=;domain=.' + h + ';expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n return h;\r\n }\r\n }\r\n}\r\n\r\nexport function setCookie(name, value) {\r\n if (value === null || value === undefined) {\r\n return;\r\n }\r\n\r\n var domain = get_top_domain();\r\n if (!domain) {\r\n domain = '';\r\n }else if (isNaN(domain[0])) {\r\n domain = `.${domain}`;\r\n }\r\n var Days = 30;\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);\r\n document.cookie = `${name}=${escape(value?.toString())};path=/;expires=${exp.toUTCString()};domain=${domain}`;\r\n}\r\n\r\nexport function getCookie(name) {\r\n const reg = new RegExp(`(^| )${name}=([^;]*)(;|$)`);\r\n const arr = document.cookie.match(reg);\r\n if (arr) {\r\n return unescape(arr[2]);\r\n }\r\n return null;\r\n}\r\n\r\nexport function registerDragEvent(el: HTMLElement, dataKey?: string) {\r\n if (el) {\r\n const blazorId = getBlazorId(el);\r\n const listener = (e: DragEvent) => {\r\n if (dataKey) {\r\n const dataValue = (e.target as HTMLElement).getAttribute(dataKey);\r\n e.dataTransfer.setData(dataKey, dataValue);\r\n e.dataTransfer.setData('offsetX', e.offsetX.toString())\r\n e.dataTransfer.setData('offsetY', e.offsetY.toString())\r\n }\r\n };\r\n const key = `${blazorId}:dragstart`;\r\n htmlElementEventListenerConfigs[key] = [{\r\n listener\r\n }];\r\n el.addEventListener(\"dragstart\", listener);\r\n }\r\n}\r\n\r\nexport function unregisterDragEvent(el: HTMLElement) {\r\n const blazorId = getBlazorId(el);\r\n if (blazorId) {\r\n const key = `${blazorId}:dragstart`;\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].forEach((config) => {\r\n el.removeEventListener(\"dragstart\", config.listener);\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function resizableDataTable(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n table.style.overflow = 'hidden';\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n if (!colResizeDiv) continue\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n\r\n let minWidth = (col.firstElementChild as HTMLElement).offsetWidth; // width of span\r\n minWidth = minWidth + 32 + 18 + 1 + 1; // 32:padding 18:sort\r\n if(!col.style.minWidth){\r\n col.minWidth = minWidth;\r\n col.style.minWidth = minWidth + \"px\";\r\n }\r\n\r\n setListeners(colResizeDiv);\r\n }\r\n\r\n function setListeners(div: HTMLDivElement) {\r\n let pageX:number\r\n let curCol: HTMLElement;\r\n let nxtCol: HTMLElement;\r\n let curColWidth: number;\r\n let nxtColWidth: number;\r\n let tableWidth: number;\r\n\r\n div.addEventListener('click', e => e.stopPropagation());\r\n\r\n div.addEventListener('mousedown', function (e) {\r\n curCol = (e.target as HTMLElement).parentElement;\r\n nxtCol = curCol.nextElementSibling as HTMLElement;\r\n pageX = e.pageX;\r\n\r\n tableWidth = table.offsetWidth;\r\n\r\n var padding = paddingDiff(curCol);\r\n\r\n curColWidth = curCol.offsetWidth - padding;\r\n if (nxtCol)\r\n nxtColWidth = nxtCol.offsetWidth - padding;\r\n });\r\n\r\n document.addEventListener(\"mousemove\", function (e) {\r\n if (curCol) {\r\n let diffX = e.pageX - pageX;\r\n\r\n const isRtl = dataTable.classList.contains(\"m-data-table--rtl\")\r\n if (isRtl) {\r\n diffX = 0 - diffX;\r\n }\r\n\r\n let newCurColWidth = curColWidth + diffX;\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n const isOverflow = dataTable.classList.contains(\r\n \"m-data-table--resizable-overflow\"\r\n );\r\n if (isOverflow) {\r\n table.style.width = tableWidth + diffX + \"px\";\r\n return;\r\n }\r\n\r\n const isIndependent = dataTable.classList.contains(\r\n \"m-data-table--resizable-independent\"\r\n );\r\n if (isIndependent) {\r\n let newNextColWidth = nxtColWidth - diffX;\r\n const twoColWidth = curColWidth + nxtColWidth;\r\n\r\n if (diffX > 0) {\r\n if (nxtCol) {\r\n if (newNextColWidth < nxtCol[\"minWidth\"]) {\r\n newNextColWidth = nxtCol[\"minWidth\"];\r\n newCurColWidth = twoColWidth - newNextColWidth;\r\n }\r\n }\r\n } else {\r\n if (newCurColWidth < curCol[\"minWidth\"]) {\r\n newCurColWidth = curCol[\"minWidth\"];\r\n newNextColWidth = twoColWidth - newCurColWidth;\r\n }\r\n }\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n if (nxtCol) {\r\n nxtCol.style.width = newNextColWidth + \"px\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n document.addEventListener('mouseup', function (e) {\r\n if (curCol) {\r\n for (let i = 0; i < cols.length; i++) {\r\n const col:any = cols[i];\r\n col.style.width = col['offsetWidth'] + \"px\"\r\n }\r\n }\r\n curCol = undefined;\r\n nxtCol = undefined;\r\n pageX = undefined;\r\n nxtColWidth = undefined;\r\n curColWidth = undefined;\r\n tableWidth = undefined;\r\n });\r\n }\r\n\r\n function paddingDiff(col) {\r\n if (getStyleVal(col, 'box-sizing') == 'border-box') {\r\n return 0;\r\n }\r\n\r\n var padLeft = getStyleVal(col, 'padding-left');\r\n var padRight = getStyleVal(col, 'padding-right');\r\n return (parseInt(padLeft) + parseInt(padRight));\r\n }\r\n\r\n function getStyleVal(elm, css) {\r\n return (window.getComputedStyle(elm, null).getPropertyValue(css))\r\n }\r\n}\r\n\r\nexport function updateDataTableResizeHeight(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n }\r\n}\r\n\r\nfunction stopPropagation(e) {\r\n e.stopPropagation();\r\n}\r\n\r\nexport function addStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.addEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function removeStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.removeEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function historyBack() {\r\n history.back();\r\n}\r\n\r\nexport function historyGo(delta: number) {\r\n history.go(delta);\r\n}\r\n\r\nexport function historyReplace(href) {\r\n history.replaceState(null, /*ignore title*/ '', href);\r\n}\r\n\r\nexport function registerTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = () => {\r\n const scrollWidth = wrapper.scrollWidth;\r\n const clientWidth = wrapper.clientWidth;\r\n const scrollLeft = wrapper.scrollLeft;\r\n\r\n const rtl = wrapper.parentElement.classList.contains('m-data-table--rtl');\r\n\r\n if (Math.abs(scrollWidth -((rtl ? -scrollLeft : scrollLeft) + clientWidth)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-left')\r\n wrapper.classList.add('scrolled-to-right');\r\n } else if (Math.abs(scrollLeft - (rtl ? scrollWidth - clientWidth : 0)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-right')\r\n wrapper.classList.add('scrolled-to-left');\r\n } else {\r\n wrapper.classList.remove('scrolled-to-right');\r\n wrapper.classList.remove('scrolled-to-left');\r\n wrapper.classList.add('scrolling');\r\n }\r\n }\r\n\r\n listener();\r\n\r\n wrapper.addEventListener('scroll', listener)\r\n wrapper[\"_m_table_scroll_event\"] = listener\r\n}\r\n\r\nexport function unregisterTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = wrapper[\"_m_table_scroll_event\"]\r\n if (listener) {\r\n wrapper.removeEventListener('scroll', listener)\r\n delete wrapper[\"_m_table_scroll_event\"]\r\n }\r\n}\r\n","import { removeListeners, RippleOptions, updateRipple } from \"./ripple\";\r\n\r\nexport default function registerRippleObserver() {\r\n const observer = new MutationObserver((mutationsList, observer) => {\r\n for (const mutation of mutationsList) {\r\n if (mutation.type === \"childList\" && mutation.addedNodes.length > 0) {\r\n for (const node of mutation.addedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (\r\n node.nodeType === Node.ELEMENT_NODE &&\r\n node.hasAttribute(\"ripple\") &&\r\n !node._ripple\r\n ) {\r\n updateRipple(node, convertRippleAttributeToOptions(node), false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 处理属性变动\r\n if (mutation.type === \"attributes\") {\r\n const target = mutation.target as HTMLElement;\r\n if (target.hasAttribute(\"ripple\") && !target._ripple) {\r\n if (mutation.attributeName === \"ripple\") {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n false\r\n );\r\n } else if (!target.hasAttribute(\"ripple\") && target._ripple) {\r\n removeListeners(target);\r\n delete target._ripple;\r\n }\r\n }\r\n }\r\n\r\n if (\r\n mutation.type === \"attributes\" &&\r\n mutation.attributeName === \"ripple\"\r\n ) {\r\n const target = mutation.target as HTMLElement;\r\n if (target._ripple) {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n target._ripple.enabled\r\n );\r\n }\r\n }\r\n\r\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\r\n for (const node of mutation.removedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (node.nodeType === Node.ELEMENT_NODE && node._ripple) {\r\n removeListeners(node);\r\n delete node._ripple;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // ripple=\"false\",\r\n // ripple=\"\",\r\n // ripple=\"true\",\r\n // ripple=\"center\",\r\n // ripple=\"circle\",\r\n // ripple=\"circle¢er\"\r\n // ripple=\"center&custom-css\",\r\n // ripple=\"circle&custom-css\",\r\n // ripple=\"custom-css\"\r\n function convertRippleAttributeToOptions(\r\n target: HTMLElement\r\n ): RippleOptions | null {\r\n const value = target.getAttribute(\"ripple\");\r\n if ((typeof value !== \"string\" && !value) || value === \"false\") {\r\n return null;\r\n }\r\n\r\n const options: RippleOptions = {};\r\n\r\n const props = value.split(\"&\");\r\n props.forEach((prop) => {\r\n if (prop === \"center\") {\r\n options.center = true;\r\n } else if (prop === \"circle\") {\r\n options.circle = true;\r\n } else {\r\n options.class = prop.trim();\r\n }\r\n });\r\n\r\n return options;\r\n }\r\n\r\n const initialElements = document.querySelectorAll(\"[ripple]\");\r\n\r\n for (const element of initialElements) {\r\n updateRipple(element, convertRippleAttributeToOptions(element), false);\r\n }\r\n\r\n observer.observe(document, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n attributeFilter: [\"ripple\"],\r\n attributeOldValue: false,\r\n });\r\n}\r\n","import * as slider from \"./components/slider\";\r\nimport * as textarea from \"./components/textarea\";\r\nimport * as interop from \"./interop\";\r\nimport { MarkdownParser } from \"./proxies/markdown-it\";\r\n\r\ndeclare global {\r\n interface Window {\r\n MasaBlazor: {\r\n interop: {};\r\n extendMarkdownIt?: (parser: MarkdownParser) => void;\r\n xgplayerPlugins: any[];\r\n xgplayerPluginOptions?: { [prop: string]: any };\r\n };\r\n }\r\n}\r\n\r\nwindow.MasaBlazor = {\r\n interop: {\r\n ...interop,\r\n ...slider,\r\n ...textarea\r\n },\r\n xgplayerPlugins: [],\r\n};\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","passiveSupported","window","testListenerOpts","Object","defineProperty","get","addEventListener","removeEventListener","console","warn","keyCodes","freeze","enter","tab","delete","esc","space","up","down","left","right","end","home","del","backspace","insert","pageup","pagedown","shift","getBlazorId","el","_bl_","getAttributeNames","find","a","startsWith","substring","getElementSelector","Element","path","nodeType","Node","ELEMENT_NODE","selector","nodeName","toLowerCase","id","unshift","sib","nth","previousElementSibling","parentNode","join","getDom","elOrString","element","document","documentElement","indexOf","array","split","i","querySelector","HTMLElement","body","error","canUseDom","createElement","touchEvents","parseMouseEvent","event","detail","screenX","screenY","clientX","clientY","offsetX","offsetY","pageX","pageY","button","buttons","ctrlKey","shiftKey","altKey","metaKey","type","parseTouchEvent","touches","parseTouch","targetTouches","changedTouches","touchList","length","touch","push","identifier","registerExtraMouseEvent","eventType","eventName","Blazor","registerCustomEventType","browserEventName","createEventArgs","createSharedEventArgs","registerExtraDropEvent","eventArgs","assign","dataTransfer","dropEffect","effectAllowed","files","Array","from","map","f","name","items","kind","types","getData","Number","args","target","eventTarget","elementReferenceId","class","getAttribute","getEventTarget","sliderHandleId","sliderHandlesById","dotnetHelper","onSliderMouseDown","app","mouseUpOptions","passive","capture","mouseMoveOptions","isTouchEvent","onMouseMove","cb","options","once","addOnceEventListener","onSliderMouseUp","invokeMethodAsync","stopPropagation","payload","textareaAutoGrowNextId","textareaAutoGrowMap","calculateTextareaHeight","textarea","rows","rowHeight","style","height","scrollHeight","minHeight","parseInt","parseFloat","Math","max","input","inputCallback","undefined","functionDebounce","fn","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","debounceWrapper","this","arguments","context","callNow","setTimeout","call","cancel","flush","functionThrottle","interval","timeoutId","throttledFn","leading","trailing","throttleWrapper","registerExtraEvents","registerEvent","DELAY_RIPPLE","transform","webkitTransform","constructor","isKeyboardEvent","ripples","show","_ripple","enabled","container","animation","appendChild","className","radius","scale","x","y","centerX","centerY","localX","localY","offset","getBoundingClientRect","top","circle","clientWidth","center","sqrt","clientHeight","calculate","size","width","computed","getComputedStyle","position","dataset","previousPosition","classList","add","activated","String","performance","now","remove","hide","getElementsByClassName","isHiding","diff","delay","_a","removeChild","rippleShow","currentTarget","touched","rippleStop","isTouch","centered","showTimerCommit","showTimer","rippleHide","rippleCancelShow","keyboardRippleShow","keyCode","keyboardRippleHide","focusRippleHide","updateRipple","wasEnabled","removeListeners","getZIndex","index","getPropertyValue","getDomInfoObj","dom","offsetTop","offsetLeft","scrollWidth","scrollLeft","scrollTop","clientTop","clientLeft","res","viewportElement","box","offsetWidth","offsetHeight","relativeTop","relativeBottom","bottom","relativeLeft","relativeRight","absoluteLeft","absoluteTop","getElementPos","round","onload","customEventName","pastedData","clipboardData","observer","MutationObserver","mutationsList","mutation","addedNodes","node","hasAttribute","convertRippleAttributeToOptions","attributeName","removedNodes","forEach","prop","trim","initialElements","querySelectorAll","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","registerRippleObserver","htmlElementEventListenerConfigs","getActiveElement","activeElement","getWindowAndDocumentProps","windowProps","documentProps","obj","getPageYOffset","isElement","tagName","getMenuOrDialogMaxZIndex","exclude","zis","activeElements","includes","getMenuableDimensions","hasActivator","activatorSelector","isDefaultAttach","contentElement","attached","attachSelector","dimensions","activator","content","relativeYOffset","offsetParentLeft","measure","display","sneakPeek","offsetParent","offsetRect","getRoundedBoundedClientRect","pageXOffset","pageYOffset","blockedScrollY","abs","rect","marginLeft","marginTop","otpInputKeyupEvent","otpIdx","elementList","callback","preventDefault","eventKey","key","otpInputFocus","focusIndex","focus","otpInputFocusEvent","select","otpInputOnInputEvent","get_top_domain","h","weird_cookie","hostname","location","slice","cookie","cloned","cloneNode","parentElement","innerWidth","evt","createEvent","initEvent","dispatchEvent","attach","_b","invoker","extras","htmlElement","config","listener","cancelable","relatedTarget","contains","k","debounce","debounceIt","throttle","handle","configs","item","dispose","e1","e2","dom1","dom2","text","navigator","clipboard","writeText","log","err","textArea","msg","execCommand","fallbackCopyTextToClipboard","preventScroll","HTMLInputElement","HTMLTextAreaElement","Error","blur","arg","scrollIntoView","block","inline","behavior","start","level","parent","to","scrollTo","o","targetEl","scrollY","offsetPosition","activeEl","containerEl","firstElementChild","getAbsoluteTop","getAbsoluteLeft","addElement","elementSelector","delElement","focusDialog","count","ele","innerHeight","isTop","isBottom","hasOwnProperty","clsName","root","overflowY","test","innerText","all","reduce","r","zIndex","styleProp","currentStyle","defaultView","is","NaN","objReferenceName","d","getElementById","head","d_style","innerHTML","insertAdjacentElement","src","img","Image","hasError","onerror","condition","isArray","code","elements","selectors","sizeProp","overflow","charAt","toUpperCase","isActive","itemEl","inputElement","mouseEventArgs","Detail","ScreenX","ScreenY","ClientX","ClientY","OffsetX","OffsetY","PageX","PageY","Button","Buttons","CtrlKey","ShiftKey","AltKey","MetaKey","Type","setAttribute","removeAttribute","readOnly","multipleResult","windowAndDocument","inputListener","focusListener","keyupListener","_optInput","attribute","tiles","contentSelector","tilesSelector","tile","contentHeight","translateY","threshold","elementTop","domain","isNaN","exp","Date","setTime","getTime","Days","escape","toString","toUTCString","reg","RegExp","arr","match","unescape","dataKey","blazorId","dataValue","setData","dataTable","table","row","getElementsByTagName","cols","children","tableHeight","col","colResizeDiv","minWidth","setListeners","div","curCol","nxtCol","curColWidth","nxtColWidth","tableWidth","nextElementSibling","padding","getStyleVal","padLeft","padRight","paddingDiff","diffX","newCurColWidth","newNextColWidth","twoColWidth","elm","css","history","back","delta","go","href","replaceState","wrapper","rtl","MasaBlazor","interop","slider","xgplayerPlugins"],"mappings":"yBAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,E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AI3L,CACrC,6BAEM,SAAqC2L,GACzC,MAAM3L,EAAW2L,EAA+B,sBAC5C3L,IACF2L,EAAQrjB,oBAAoB,SAAU0X,UAC/B2L,EAA+B,sBAE1C,IEziDA3jB,OAAO6jB,WAAa,CAClBC,qDACKA,IACAC,GACAza,GAEL0a,gBAAiB"} \ No newline at end of file +{"version":3,"file":"masa-blazor.js","sources":["../../../Masa.Blazor.JS/node_modules/tslib/tslib.es6.js","../../../Masa.Blazor.JS/src/utils/helper.ts","../../../Masa.Blazor.JS/src/events/EventType.ts","../../../Masa.Blazor.JS/src/events/extra.ts","../../../Masa.Blazor.JS/src/components/slider/index.ts","../../../Masa.Blazor.JS/src/components/textarea/index.ts","../../../Masa.Blazor.JS/node_modules/just-debounce-it/index.mjs","../../../Masa.Blazor.JS/node_modules/just-throttle/index.mjs","../../../Masa.Blazor.JS/src/events/index.ts","../../../Masa.Blazor.JS/src/ripple/ripple.ts","../../../Masa.Blazor.JS/src/interop.ts","../../../Masa.Blazor.JS/src/ripple/index.ts","../../../Masa.Blazor.JS/src/main.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export function addOnceEventListener (\r\n el: EventTarget,\r\n eventName: string,\r\n cb: (event: Event) => void,\r\n options: boolean | AddEventListenerOptions = false\r\n): void {\r\n const once = (event: Event) => {\r\n cb(event)\r\n el.removeEventListener(eventName, once, options)\r\n }\r\n\r\n el.addEventListener(eventName, once, options)\r\n}\r\n\r\nlet passiveSupported = false\r\ntry {\r\n if (typeof window !== 'undefined') {\r\n const testListenerOpts = Object.defineProperty({}, 'passive', {\r\n get: () => {\r\n passiveSupported = true\r\n },\r\n })\r\n\r\n window.addEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n window.removeEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n }\r\n} catch (e) { console.warn(e) } /* eslint-disable-line no-console */\r\nexport { passiveSupported }\r\n\r\nexport function addPassiveEventListener (\r\n el: EventTarget,\r\n event: string,\r\n cb: ((e: any) => void),\r\n options: {}\r\n): void {\r\n el.addEventListener(event, cb, passiveSupported ? options : false)\r\n}\r\n\r\nexport function getZIndex (el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\n// KeyboardEvent.keyCode aliases\r\nexport const keyCodes = Object.freeze({\r\n enter: 13,\r\n tab: 9,\r\n delete: 46,\r\n esc: 27,\r\n space: 32,\r\n up: 38,\r\n down: 40,\r\n left: 37,\r\n right: 39,\r\n end: 35,\r\n home: 36,\r\n del: 46,\r\n backspace: 8,\r\n insert: 45,\r\n pageup: 33,\r\n pagedown: 34,\r\n shift: 16,\r\n})\r\n\r\n/** Polyfill for Event.prototype.composedPath */\r\nexport function composedPath (e: Event): EventTarget[] {\r\n if (e.composedPath) return e.composedPath()\r\n\r\n const path = []\r\n let el = e.target as Element\r\n\r\n while (el) {\r\n path.push(el)\r\n\r\n if (el.tagName === 'HTML') {\r\n path.push(document)\r\n path.push(window)\r\n\r\n return path\r\n }\r\n\r\n el = el.parentElement!\r\n }\r\n return path\r\n}\r\n\r\nexport function getBlazorId(el) {\r\n if (!el) {\r\n return null;\r\n }\r\n let _bl_ = el.getAttributeNames().find(a => a.startsWith('_bl_'))\r\n if (_bl_) {\r\n _bl_ = _bl_.substring(4);\r\n }\r\n\r\n return _bl_;\r\n}\r\n\r\nexport function getElementSelector(el) {\r\n if (!(el instanceof Element))\r\n return;\r\n var path = [];\r\n while (el.nodeType === Node.ELEMENT_NODE) {\r\n var selector = el.nodeName.toLowerCase();\r\n if (el.id) {\r\n selector = '#' + el.id;\r\n path.unshift(selector);\r\n break;\r\n } else {\r\n var sib = el, nth = 1;\r\n while (sib = sib.previousElementSibling) {\r\n if (sib.nodeName.toLowerCase() == selector)\r\n nth++;\r\n }\r\n if (nth != 1)\r\n selector += \":nth-of-type(\" + nth + \")\";\r\n }\r\n path.unshift(selector);\r\n el = el.parentNode;\r\n }\r\n return path.join(\" > \");\r\n}\r\n\r\nexport function getEventTarget(target: HTMLElement | EventTarget) {\r\n const el = target as HTMLElement;\r\n const eventTarget: MbEventTarget = {};\r\n const elementReferenceId = el\r\n .getAttributeNames()\r\n .find((a) => a.startsWith(\"_bl_\"));\r\n if (elementReferenceId) {\r\n eventTarget.elementReferenceId = elementReferenceId;\r\n eventTarget.selector = `[${elementReferenceId}]`;\r\n } else {\r\n eventTarget.selector = getElementSelector(el);\r\n }\r\n\r\n eventTarget.class = el.getAttribute(\"class\");\r\n\r\n return eventTarget;\r\n}\r\n\r\nexport function getDom(elOrString: Element | string | undefined) {\r\n let element: HTMLElement;\r\n\r\n try {\r\n if (!elOrString) {\r\n element = document.body;\r\n } else if (typeof elOrString === \"string\") {\r\n if (elOrString === \"document\") {\r\n element = document.documentElement;\r\n } else if (elOrString.indexOf(\"__.__\") > 0) {\r\n // for example: el__.__parentElement\r\n let array = elOrString.split(\"__.__\");\r\n let i = 0;\r\n let el = document.querySelector(array[i++]);\r\n\r\n if (el) {\r\n while (array[i]) {\r\n el = el[array[i]];\r\n i++;\r\n }\r\n }\r\n\r\n if (el instanceof HTMLElement) {\r\n element = el;\r\n }\r\n } else {\r\n element = document.querySelector(elOrString);\r\n }\r\n } else {\r\n element = elOrString as HTMLElement;\r\n }\r\n\r\n } catch (error) {\r\n console.error(error)\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport const canUseDom = !!(\r\n typeof window !== 'undefined' &&\r\n typeof document !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n)\r\n\r\nexport function convertToUnit (str: number, unit?: string): string\r\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\r\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\r\n if (str == null || str === '') {\r\n return undefined\r\n } else if (isNaN(+str!)) {\r\n return String(str)\r\n } else if (!isFinite(+str!)) {\r\n return undefined\r\n } else {\r\n return `${Number(str)}${unit}`\r\n }\r\n}","// see https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Rendering/Events/EventTypes.ts\r\n// updated at 2022/08/31\r\n\r\nexport const touchEvents = [\r\n \"touchcancel\",\r\n \"touchend\",\r\n \"touchmove\",\r\n \"touchenter\",\r\n \"touchleave\",\r\n \"touchstart\",\r\n];\r\n\r\nexport function parseMouseEvent(event: MouseEvent): Blazor.MouseEventArgs {\r\n return {\r\n detail: event.detail,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n offsetX: event.offsetX,\r\n offsetY: event.offsetY,\r\n pageX: event.pageX,\r\n pageY: event.pageY,\r\n button: event.button,\r\n buttons: event.buttons,\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n } as Blazor.MouseEventArgs;\r\n}\r\n\r\nexport function parseTouchEvent(event: TouchEvent): Blazor.TouchEventArgs {\r\n return {\r\n detail: event.detail,\r\n touches: parseTouch(event.touches),\r\n targetTouches: parseTouch(event.targetTouches),\r\n changedTouches: parseTouch(event.changedTouches),\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n };\r\n}\r\n\r\nfunction parseTouch(touchList: TouchList): Blazor.TouchPoint[] {\r\n const touches: Blazor.TouchPoint[] = [];\r\n\r\n for (let i = 0; i < touchList.length; i++) {\r\n const touch = touchList[i];\r\n touches.push({\r\n identifier: touch.identifier,\r\n clientX: touch.clientX,\r\n clientY: touch.clientY,\r\n screenX: touch.screenX,\r\n screenY: touch.screenY,\r\n pageX: touch.pageX,\r\n pageY: touch.pageY,\r\n });\r\n }\r\n return touches;\r\n}\r\n\r\nexport function parseChangeEvent(event: Event): Blazor.ChangeEventArgs {\r\n const element = event.target as Element;\r\n if (isTimeBasedInput(element)) {\r\n const normalizedValue = normalizeTimeBasedValue(element);\r\n return { value: normalizedValue };\r\n } else if (isMultipleSelectInput(element)) {\r\n const selectElement = element as HTMLSelectElement;\r\n const selectedValues = Array.from(selectElement.options)\r\n .filter((option) => option.selected)\r\n .map((option) => option.value);\r\n return { value: selectedValues };\r\n } else {\r\n const targetIsCheckbox = isCheckbox(element);\r\n const newValue = targetIsCheckbox ? !!element[\"checked\"] : element[\"value\"];\r\n return { value: newValue };\r\n }\r\n}\r\n\r\nexport function parseDragEvent(event: DragEvent): Blazor.DragEventArgs {\r\n return {\r\n ...parseMouseEvent(event),\r\n dataTransfer: event.dataTransfer ? {\r\n dropEffect: event.dataTransfer.dropEffect,\r\n effectAllowed: event.dataTransfer.effectAllowed,\r\n files: Array.from(event.dataTransfer.files).map(f => f.name),\r\n items: Array.from(event.dataTransfer.items).map(i => ({ kind: i.kind, type: i.type })),\r\n types: event.dataTransfer.types\r\n } : null,\r\n };\r\n}\r\n\r\nfunction isTimeBasedInput(element: Element): element is HTMLInputElement {\r\n return timeBasedInputs.indexOf(element.getAttribute(\"type\")!) !== -1;\r\n}\r\n\r\nconst timeBasedInputs = [\"date\", \"datetime-local\", \"month\", \"time\", \"week\"];\r\n\r\nfunction normalizeTimeBasedValue(element: HTMLInputElement): string {\r\n const value = element.value;\r\n const type = element.type;\r\n switch (type) {\r\n case \"date\":\r\n case \"month\":\r\n return value;\r\n case \"datetime-local\":\r\n return value.length === 16 ? value + \":00\" : value; // Convert yyyy-MM-ddTHH:mm to yyyy-MM-ddTHH:mm:00\r\n case \"time\":\r\n return value.length === 5 ? value + \":00\" : value; // Convert hh:mm to hh:mm:00\r\n case \"week\":\r\n // For now we are not going to normalize input type week as it is not trivial\r\n return value;\r\n }\r\n\r\n throw new Error(`Invalid element type '${type}'.`);\r\n}\r\n\r\nfunction isMultipleSelectInput(element: Element): element is HTMLSelectElement {\r\n return (\r\n element instanceof HTMLSelectElement && element.type === \"select-multiple\"\r\n );\r\n}\r\n\r\nfunction isCheckbox(element: Element | null): boolean {\r\n return (\r\n !!element &&\r\n element.tagName === \"INPUT\" &&\r\n element.getAttribute(\"type\") === \"checkbox\"\r\n );\r\n}\r\n","import { getEventTarget } from \"../utils/helper\";\r\nimport { parseDragEvent, parseMouseEvent, parseTouchEvent } from \"./EventType\";\r\n\r\nexport function registerExtraMouseEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"mouse\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraTouchEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"touch\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraDropEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: (e: DragEvent) => {\r\n const eventArgs = parseDragEvent(e);\r\n const value = e.dataTransfer.getData('data-value');\r\n const offsetX = e.dataTransfer.getData('offsetX');\r\n const offsetY = e.dataTransfer.getData('offsetY');\r\n\r\n eventArgs.dataTransfer['data'] = {\r\n value,\r\n offsetX: Number(offsetX),\r\n offsetY: Number(offsetY)\r\n }\r\n\r\n return eventArgs;\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function createSharedEventArgs(type: \"mouse\" | \"touch\", e: Event,) {\r\n let args = { target: {} }\r\n if (type === 'mouse') {\r\n args = {\r\n ...args,\r\n ...parseMouseEvent(e as MouseEvent)\r\n }\r\n } else if (type === 'touch') {\r\n args = {\r\n ...args,\r\n ...parseTouchEvent(e as TouchEvent)\r\n }\r\n }\r\n\r\n args.target = getEventTarget(e.target);\r\n\r\n return args;\r\n}","import { createSharedEventArgs } from \"events/extra\";\r\nimport { addOnceEventListener, passiveSupported } from \"utils/helper\";\r\n\r\nlet sliderHandleId = 0;\r\nconst sliderHandlesById = {};\r\n\r\nexport function registerSliderEvents(\r\n el: HTMLElement,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n sliderHandlesById[sliderHandleId] = onSliderMouseDown;\r\n\r\n const app = document.querySelector(\"[data-app]\");\r\n\r\n const mouseUpOptions = passiveSupported\r\n ? { passive: true, capture: true }\r\n : true;\r\n\r\n const mouseMoveOptions = passiveSupported ? { passive: true } : false;\r\n\r\n el.addEventListener(\"mousedown\", onSliderMouseDown);\r\n el.addEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n return sliderHandleId++;\r\n\r\n async function onSliderMouseDown(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n\r\n onMouseMove(e);\r\n\r\n app.addEventListener(\r\n isTouchEvent ? \"touchmove\" : \"mousemove\",\r\n onMouseMove,\r\n mouseMoveOptions\r\n );\r\n addOnceEventListener(\r\n app,\r\n isTouchEvent ? \"touchend\" : \"mouseup\",\r\n onSliderMouseUp,\r\n mouseUpOptions\r\n );\r\n\r\n if (isTouchEvent) {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnTouchStartInternal\",\r\n createSharedEventArgs(\"touch\", e)\r\n );\r\n } else {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnMouseDownInternal\",\r\n createSharedEventArgs(\"mouse\", e)\r\n );\r\n }\r\n }\r\n\r\n async function onSliderMouseUp(e: Event) {\r\n e.stopPropagation();\r\n\r\n app.removeEventListener(\"touchmove\", onMouseMove, mouseMoveOptions as any);\r\n app.removeEventListener(\"mousemove\", onMouseMove, mouseMoveOptions as any);\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseUpInternal\");\r\n }\r\n\r\n async function onMouseMove(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n const payload = {\r\n type: e.type,\r\n clientX: isTouchEvent ? e.touches[0].clientX : e.clientX,\r\n clientY: isTouchEvent ? e.touches[0].clientY : e.clientY,\r\n };\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseMoveInternal\", payload);\r\n }\r\n}\r\n\r\nexport function unregisterSliderEvents(el: HTMLElement, id: number) {\r\n if (el) {\r\n const onSliderMouseDown = sliderHandlesById[id];\r\n el.removeEventListener(\"mousedown\", onSliderMouseDown);\r\n el.removeEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n delete sliderHandlesById[id];\r\n }\r\n}\r\n","\r\nlet textareaAutoGrowNextId = 0;\r\nconst textareaAutoGrowMap: {\r\n [prop: string]: (e: HTMLElementEventMap['input']) => void;\r\n} = {}\r\n\r\nexport function registerTextareaAutoGrowEvent(input: HTMLElement) {\r\n const id = textareaAutoGrowNextId;\r\n const inputCallback = (e: HTMLElementEventMap['input']) => {\r\n const target = e.target as HTMLTextAreaElement;\r\n const autoGrow = target.getAttribute('data-auto-grow');\r\n if (autoGrow === undefined) {\r\n return;\r\n }\r\n const rows = target.getAttribute('rows');\r\n const rowHeight = target.getAttribute('data-row-height');\r\n calculateTextareaHeight(target, rows, rowHeight)\r\n };\r\n\r\n textareaAutoGrowMap[id] = inputCallback;\r\n\r\n input.addEventListener('input', inputCallback)\r\n\r\n return textareaAutoGrowNextId++;\r\n}\r\n\r\nexport function unregisterTextareaAutoGrowEvent(input: HTMLElement, textareaAutoGrowNextId: number) {\r\n if (!input) return;\r\n const inputCallback = textareaAutoGrowMap[textareaAutoGrowNextId];\r\n if (inputCallback) {\r\n input.removeEventListener('input', inputCallback);\r\n }\r\n}\r\n\r\nexport function calculateTextareaHeight(textarea: HTMLTextAreaElement, rows: string, rowHeight: string) {\r\n textarea.style.height = '0'\r\n const height = textarea.scrollHeight;\r\n const minHeight = parseInt(rows, 10) * parseFloat(rowHeight);\r\n textarea.style.height = Math.max(height, minHeight) + 'px';\r\n}","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import { parseMouseEvent } from \"./EventType\";\r\nimport { registerExtraDropEvent, registerExtraMouseEvent, registerExtraTouchEvent } from \"./extra\";\r\n\r\nexport function registerExtraEvents() {\r\n registerExtraMouseEvent(\"exmousedown\", \"mousedown\");\r\n registerExtraMouseEvent(\"exmouseup\", \"mouseup\");\r\n registerExtraMouseEvent(\"exclick\", \"click\");\r\n registerExtraMouseEvent(\"exmouseleave\", \"mouseleave\");\r\n registerExtraMouseEvent(\"exmouseenter\", \"mouseenter\");\r\n registerExtraMouseEvent(\"exmousemove\", \"mousemove\");\r\n registerExtraTouchEvent(\"extouchstart\", \"touchstart\");\r\n registerEvent(\"transitionend\", \"transitionend\");\r\n registerExtraDropEvent(\"exdrop\", \"drop\");\r\n registerAuxclickEvent();\r\n}\r\n\r\nfunction registerEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n });\r\n }\r\n}\r\n\r\nfunction registerAuxclickEvent() {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(\"auxclick\", {\r\n browserEventName: \"auxclick\",\r\n createEventArgs: parseMouseEvent\r\n });\r\n }\r\n}\r\n","import { keyCodes } from \"utils/helper\";\r\n\r\ntype RippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & {\r\n rippleStop?: boolean;\r\n};\r\n\r\nconst DELAY_RIPPLE = 80;\r\n\r\nfunction transform(el: HTMLElement, value: string) {\r\n el.style.transform = value;\r\n el.style.webkitTransform = value;\r\n}\r\n\r\nexport interface RippleOptions {\r\n class?: string;\r\n center?: boolean;\r\n circle?: boolean;\r\n}\r\n\r\nfunction isTouchEvent(e: RippleEvent): e is TouchEvent {\r\n return e.constructor.name === \"TouchEvent\";\r\n}\r\n\r\nfunction isKeyboardEvent(e: RippleEvent): e is KeyboardEvent {\r\n return e.constructor.name === \"KeyboardEvent\";\r\n}\r\n\r\nconst calculate = (\r\n e: RippleEvent,\r\n el: HTMLElement,\r\n value: RippleOptions = {}\r\n) => {\r\n let localX = 0;\r\n let localY = 0;\r\n\r\n if (!isKeyboardEvent(e)) {\r\n const offset = el.getBoundingClientRect();\r\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\r\n\r\n localX = target.clientX - offset.left;\r\n localY = target.clientY - offset.top;\r\n }\r\n\r\n let radius = 0;\r\n let scale = 0.3;\r\n if (el._ripple && el._ripple.circle) {\r\n scale = 0.15;\r\n radius = el.clientWidth / 2;\r\n radius = value.center\r\n ? radius\r\n : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\r\n } else {\r\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\r\n }\r\n\r\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\r\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\r\n\r\n const x = value.center ? centerX : `${localX - radius}px`;\r\n const y = value.center ? centerY : `${localY - radius}px`;\r\n\r\n return { radius, scale, x, y, centerX, centerY };\r\n};\r\n\r\nconst ripples = {\r\n /* eslint-disable max-statements */\r\n show(e: RippleEvent, el: HTMLElement, value: RippleOptions = {}) {\r\n if (!el._ripple || !el._ripple.enabled) {\r\n return;\r\n }\r\n\r\n const container = document.createElement(\"span\");\r\n const animation = document.createElement(\"span\");\r\n\r\n container.appendChild(animation);\r\n container.className = \"m-ripple__container\";\r\n\r\n if (value.class) {\r\n container.className += ` ${value.class}`;\r\n }\r\n\r\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);\r\n\r\n const size = `${radius * 2}px`;\r\n animation.className = \"m-ripple__animation\";\r\n animation.style.width = size;\r\n animation.style.height = size;\r\n\r\n el.appendChild(container);\r\n\r\n const computed = window.getComputedStyle(el);\r\n if (computed && computed.position === \"static\") {\r\n el.style.position = \"relative\";\r\n el.dataset.previousPosition = \"static\";\r\n }\r\n\r\n animation.classList.add(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--visible\");\r\n transform(\r\n animation,\r\n `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`\r\n );\r\n animation.dataset.activated = String(performance.now());\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--in\");\r\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\r\n }, 0);\r\n },\r\n\r\n hide(el: HTMLElement | null) {\r\n if (!el || !el._ripple || !el._ripple.enabled) return;\r\n\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n\r\n if (ripples.length === 0) return;\r\n const animation = ripples[ripples.length - 1];\r\n\r\n if (animation.dataset.isHiding) return;\r\n else animation.dataset.isHiding = \"true\";\r\n\r\n const diff = performance.now() - Number(animation.dataset.activated);\r\n const delay = Math.max(250 - diff, 0);\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--in\");\r\n animation.classList.add(\"m-ripple__animation--out\");\r\n\r\n setTimeout(() => {\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n if (ripples.length === 1 && el.dataset.previousPosition) {\r\n el.style.position = el.dataset.previousPosition;\r\n delete el.dataset.previousPosition;\r\n }\r\n\r\n if (animation.parentNode?.parentNode === el)\r\n el.removeChild(animation.parentNode);\r\n }, 300);\r\n }, delay);\r\n },\r\n};\r\n\r\nfunction rippleShow(e: RippleEvent) {\r\n const value: RippleOptions = {};\r\n const element = e.currentTarget as HTMLElement;\r\n\r\n if (!element || !element._ripple || element._ripple.touched || e.rippleStop)\r\n return;\r\n\r\n // Don't allow the event to trigger ripples on any other elements\r\n e.rippleStop = true;\r\n\r\n if (isTouchEvent(e)) {\r\n element._ripple.touched = true;\r\n element._ripple.isTouch = true;\r\n } else {\r\n // It's possible for touch events to fire\r\n // as mouse events on Android/iOS, this\r\n // will skip the event call if it has\r\n // already been registered as touch\r\n if (element._ripple.isTouch) return;\r\n }\r\n value.center = element._ripple.centered || isKeyboardEvent(e);\r\n if (element._ripple.class) {\r\n value.class = element._ripple.class;\r\n }\r\n\r\n if (isTouchEvent(e)) {\r\n // already queued that shows or hides the ripple\r\n if (element._ripple.showTimerCommit) return;\r\n\r\n element._ripple.showTimerCommit = () => {\r\n ripples.show(e, element, value);\r\n };\r\n element._ripple.showTimer = window.setTimeout(() => {\r\n if (element && element._ripple && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n }\r\n }, DELAY_RIPPLE);\r\n } else {\r\n ripples.show(e, element, value);\r\n }\r\n}\r\n\r\nfunction rippleHide(e: Event) {\r\n const element = e.currentTarget as HTMLElement | null;\r\n if (!element || !element._ripple) return;\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n\r\n // The touch interaction occurs before the show timer is triggered.\r\n // We still want to show ripple effect.\r\n if (e.type === \"touchend\" && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n\r\n // re-queue ripple hiding\r\n var timerHandler: TimerHandler = () => rippleHide(e);\r\n element._ripple.showTimer = setTimeout(timerHandler);\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (element._ripple) {\r\n element._ripple.touched = false;\r\n }\r\n });\r\n ripples.hide(element);\r\n}\r\n\r\nfunction rippleCancelShow(e: MouseEvent | TouchEvent) {\r\n const element = e.currentTarget as HTMLElement | undefined;\r\n\r\n if (!element || !element._ripple) return;\r\n\r\n if (element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit = null;\r\n }\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n}\r\n\r\nfunction keyboardRippleShow(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (\r\n !target[\"keyboardRipple\"] &&\r\n (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)\r\n ) {\r\n target[\"keyboardRipple\"] = true;\r\n rippleShow(e);\r\n }\r\n}\r\n\r\nfunction keyboardRippleHide(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n}\r\n\r\nfunction focusRippleHide(e: FocusEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (target[\"keyboardRipple\"] === true) {\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n }\r\n}\r\nexport function updateRipple(\r\n el: HTMLElement,\r\n options: RippleOptions | null,\r\n wasEnabled: boolean\r\n) {\r\n let enabled = false;\r\n if (options) {\r\n enabled = true;\r\n } else {\r\n ripples.hide(el);\r\n }\r\n\r\n const value = options || {};\r\n el._ripple = el._ripple || {};\r\n el._ripple.enabled = enabled;\r\n el._ripple = {\r\n ...el._ripple,\r\n centered: value.center,\r\n class: value.class,\r\n circle: value.circle,\r\n };\r\n\r\n if (enabled && !wasEnabled) {\r\n el.addEventListener(\"touchstart\", rippleShow, { passive: true });\r\n el.addEventListener(\"touchend\", rippleHide, { passive: true });\r\n el.addEventListener(\"touchmove\", rippleCancelShow, { passive: true });\r\n el.addEventListener(\"touchcancel\", rippleHide);\r\n\r\n el.addEventListener(\"mousedown\", rippleShow);\r\n el.addEventListener(\"mouseup\", rippleHide);\r\n el.addEventListener(\"mouseleave\", rippleHide);\r\n\r\n el.addEventListener(\"keydown\", keyboardRippleShow);\r\n el.addEventListener(\"keyup\", keyboardRippleHide);\r\n\r\n el.addEventListener(\"blur\", focusRippleHide);\r\n\r\n // Anchor tags can be dragged, causes other hides to fail - #1537\r\n el.addEventListener(\"dragstart\", rippleHide, { passive: true });\r\n } else if (!enabled && wasEnabled) {\r\n removeListeners(el);\r\n }\r\n}\r\n\r\nexport function removeListeners(el: HTMLElement) {\r\n el.removeEventListener(\"mousedown\", rippleShow);\r\n el.removeEventListener(\"touchstart\", rippleShow);\r\n el.removeEventListener(\"touchend\", rippleHide);\r\n el.removeEventListener(\"touchmove\", rippleCancelShow);\r\n el.removeEventListener(\"touchcancel\", rippleHide);\r\n el.removeEventListener(\"mouseup\", rippleHide);\r\n el.removeEventListener(\"mouseleave\", rippleHide);\r\n el.removeEventListener(\"keydown\", keyboardRippleShow);\r\n el.removeEventListener(\"keyup\", keyboardRippleHide);\r\n el.removeEventListener(\"dragstart\", rippleHide);\r\n el.removeEventListener(\"blur\", focusRippleHide);\r\n el._ripple.enabled = false;\r\n}\r\n","import debounceIt from \"just-debounce-it\";\r\nimport throttle from \"just-throttle\";\r\n\r\nimport { parseDragEvent, parseTouchEvent, touchEvents } from \"./events/EventType\";\r\nimport { registerExtraEvents } from \"./events/index\";\r\nimport registerRippleObserver from \"./ripple\";\r\nimport { canUseDom, getBlazorId, getDom, getElementSelector } from \"./utils/helper\";\r\n\r\nwindow.onload = function () {\r\n registerExtraEvents();\r\n registerPasteWithData(\"pastewithdata\")\r\n registerRippleObserver();\r\n}\r\n\r\nexport function getZIndex(el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\nexport function getDomInfo(element, selector = \"body\") {\r\n var result = {};\r\n\r\n var dom = getDom(element);\r\n\r\n if (dom) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n // clone and set display not none because\r\n // element with display:none can not get the dom info\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n dom.parentElement.appendChild(cloned);\r\n\r\n result = getDomInfoObj(cloned);\r\n\r\n dom.parentElement.removeChild(cloned);\r\n } else {\r\n result = getDomInfoObj(dom);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction getDomInfoObj(dom: HTMLElement) {\r\n var result = {};\r\n result[\"offsetTop\"] = dom.offsetTop || 0;\r\n result[\"offsetLeft\"] = dom.offsetLeft || 0;\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n result[\"scrollWidth\"] = dom.scrollWidth || 0;\r\n result[\"scrollLeft\"] = dom.scrollLeft || 0;\r\n result[\"scrollTop\"] = dom.scrollTop || 0;\r\n result[\"clientTop\"] = dom.clientTop || 0;\r\n result[\"clientLeft\"] = dom.clientLeft || 0;\r\n result[\"clientHeight\"] = dom.clientHeight || 0;\r\n result[\"clientWidth\"] = dom.clientWidth || 0;\r\n var position = getElementPos(dom);\r\n result[\"offsetWidth\"] = Math.round(position.offsetWidth) || 0;\r\n result[\"offsetHeight\"] = Math.round(position.offsetHeight) || 0;\r\n result[\"relativeTop\"] = Math.round(position.relativeTop) || 0;\r\n result[\"relativeBottom\"] = Math.round(position.relativeBottom) || 0;\r\n result[\"relativeLeft\"] = Math.round(position.relativeLeft) || 0;\r\n result[\"relativeRight\"] = Math.round(position.relativeRight) || 0;\r\n result[\"absoluteLeft\"] = Math.round(position.absoluteLeft) || 0;\r\n result[\"absoluteTop\"] = Math.round(position.absoluteTop) || 0;\r\n return result;\r\n}\r\n\r\nfunction getElementPos(element) {\r\n var res: any = new Object();\r\n res.x = 0;\r\n res.y = 0;\r\n if (element !== null) {\r\n if (element.getBoundingClientRect) {\r\n var viewportElement = document.documentElement;\r\n var box = element.getBoundingClientRect();\r\n var scrollLeft = viewportElement.scrollLeft;\r\n var scrollTop = viewportElement.scrollTop;\r\n\r\n res.offsetWidth = box.width;\r\n res.offsetHeight = box.height;\r\n res.relativeTop = box.top;\r\n res.relativeBottom = box.bottom;\r\n res.relativeLeft = box.left;\r\n res.relativeRight = box.right;\r\n res.absoluteLeft = box.left + scrollLeft;\r\n res.absoluteTop = box.top + scrollTop;\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nexport function getParentClientWidthOrWindowInnerWidth(element: HTMLElement) {\r\n return element.parentElement ? element.parentElement.clientWidth : window.innerWidth;\r\n}\r\n\r\nexport function triggerEvent(elOrString, eventName: string, eventType: string, stopPropagation: boolean) {\r\n var dom = getDom(elOrString);\r\n var evt = document.createEvent(eventName);\r\n evt.initEvent(eventType);\r\n\r\n if (stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n return dom.dispatchEvent(evt);\r\n}\r\n\r\nexport function setProperty(elOrString, name, value) {\r\n var dom = getDom(elOrString);\r\n dom[name] = value;\r\n}\r\n\r\nexport function getBoundingClientRect(elOrString, attach = \"body\") {\r\n let dom = getDom(elOrString);\r\n\r\n var result = {};\r\n\r\n if (dom && dom.getBoundingClientRect) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n document.querySelector(attach)?.appendChild(cloned);\r\n\r\n result = cloned.getBoundingClientRect();\r\n\r\n document.querySelector(attach)?.removeChild(cloned);\r\n } else {\r\n result = dom.getBoundingClientRect();\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvar htmlElementEventListenerConfigs: { [prop: string]: HtmlElementEventListenerConfig[] } = {}\r\n\r\ntype HtmlElementEventListenerConfig = {\r\n listener?: (args: any) => void;\r\n options?: any;\r\n handle?: DotNet.DotNetObject;\r\n}\r\n\r\nexport function addHtmlElementEventListener(\r\n selector: \"window\" | \"document\" | K,\r\n type: string,\r\n invoker: DotNet.DotNetObject,\r\n options?: boolean | AddEventListenerOptions,\r\n extras?: Partial> & { relatedTarget?: string, throttle?: number, debounce?: number, key?: string }) {\r\n let htmlElement: HTMLElement | Window\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n if (!htmlElement) {\r\n // throw new Error(\"Unable to find the element.\");\r\n return false;\r\n }\r\n\r\n var key = extras?.key || `${selector}:${type}`;\r\n\r\n //save for remove\r\n const config: HtmlElementEventListenerConfig = {};\r\n\r\n var listener = (e: any): void => {\r\n if (extras?.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n\r\n if ((typeof e.cancelable !== \"boolean\" || e.cancelable) && extras?.preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // mouseleave relatedTarget\r\n if (extras?.relatedTarget && document.querySelector(extras.relatedTarget)?.contains(e.relatedTarget)) {\r\n return;\r\n }\r\n\r\n let obj: any = {}\r\n\r\n if (touchEvents.includes(e.type)) {\r\n obj = parseTouchEvent(e)\r\n } else {\r\n for (var k in e) {\r\n if (typeof e[k] == 'string' || typeof e[k] == 'number') {\r\n obj[k] = e[k];\r\n }\r\n }\r\n }\r\n\r\n if (e.target && e.target !== window && e.target !== document) {\r\n obj.target = {}\r\n const target = e.target as HTMLElement;\r\n const elementReferenceId = target.getAttributeNames().find(a => a.startsWith('_bl_'));\r\n if (elementReferenceId) {\r\n obj.target['elementReferenceId'] = elementReferenceId\r\n obj.target['selector'] = `[${elementReferenceId}]`\r\n } else {\r\n obj.target['selector'] = getElementSelector(target)\r\n }\r\n\r\n obj.target['class'] = target.getAttribute('class')\r\n }\r\n\r\n invoker.invokeMethodAsync('Invoke', obj);\r\n };\r\n\r\n if (extras?.debounce && extras.debounce > 0) {\r\n config.listener = debounceIt(listener, extras.debounce)\r\n } else if (extras?.throttle && extras.throttle > 0) {\r\n config.listener = throttle(listener, extras.throttle, { trailing: true })\r\n } else {\r\n config.listener = listener;\r\n }\r\n\r\n config.options = options;\r\n config.handle = invoker\r\n\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].push(config);\r\n } else {\r\n htmlElementEventListenerConfigs[key] = [config]\r\n }\r\n\r\n htmlElement.addEventListener(type, config.listener, config.options);\r\n\r\n return true;\r\n}\r\n\r\nexport function removeHtmlElementEventListener(selector, type, k?: string) {\r\n let htmlElement: any\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var k = k || `${selector}:${type}`;\r\n\r\n var configs = htmlElementEventListenerConfigs[k];\r\n\r\n if (configs) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n htmlElement?.removeEventListener(type, item.listener, item.options);\r\n });\r\n\r\n htmlElementEventListenerConfigs[k] = []\r\n }\r\n}\r\n\r\nexport function addMouseleaveEventListener(selector) {\r\n var htmlElement = document.querySelector(selector);\r\n if (htmlElement) {\r\n htmlElement.addEventListener()\r\n }\r\n}\r\n\r\nexport function contains(e1, e2) {\r\n const dom1 = getDom(e1);\r\n if (dom1 && dom1.contains) {\r\n return dom1.contains(getDom(e2));\r\n }\r\n return false;\r\n}\r\n\r\nexport function equalsOrContains(e1: any, e2: any) {\r\n const dom1 = getDom(e1);\r\n const dom2 = getDom(e2);\r\n return !!dom1 && dom1.contains && !!dom2 && (dom1 == dom2 || dom1.contains(dom2));\r\n}\r\n\r\nfunction fallbackCopyTextToClipboard(text) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n}\r\n\r\nexport function copy(text) {\r\n if (!navigator.clipboard) {\r\n fallbackCopyTextToClipboard(text);\r\n return;\r\n }\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function focus(elOrString, preventScroll: boolean = false) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLElement)) {\r\n console.error(\"Unable to focus an invalid element\");\r\n } else {\r\n dom.focus({ preventScroll });\r\n }\r\n}\r\n\r\nexport function select(elOrString) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement))\r\n throw new Error(\"Unable to select an invalid element\")\r\n dom.select()\r\n}\r\n\r\nexport function hasFocus(selector) {\r\n let dom = getDom(selector);\r\n return (document.activeElement === dom);\r\n}\r\n\r\nexport function blur(selector) {\r\n let dom = getDom(selector);\r\n dom.blur();\r\n}\r\n\r\nexport function log(text) {\r\n console.log(text);\r\n}\r\n\r\nexport function scrollIntoView(target, arg?: boolean | ScrollIntoViewOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n if (arg === null || arg == undefined) {\r\n dom.scrollIntoView();\r\n } else if (typeof arg === 'boolean') {\r\n dom.scrollIntoView(arg);\r\n } else {\r\n dom.scrollIntoView({\r\n block: arg.block == null ? undefined : arg.block,\r\n inline: arg.inline == null ? undefined : arg.inline,\r\n behavior: arg.behavior\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport function scrollIntoParentView(\r\n target,\r\n inline = false,\r\n start = false,\r\n level = 1,\r\n behavior: ScrollBehavior = \"smooth\",\r\n) {\r\n const dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n let parent: HTMLElement = dom;\r\n while (level > 0) {\r\n parent = parent.parentElement;\r\n level--;\r\n if (!parent) {\r\n return;\r\n }\r\n }\r\n\r\n const options: ScrollToOptions = {\r\n behavior,\r\n };\r\n\r\n if (inline) {\r\n if (start) {\r\n options.left = dom.offsetLeft\r\n } else {\r\n const to = dom.offsetLeft - parent.offsetLeft;\r\n if (to - parent.scrollLeft < 0) {\r\n options.left = to;\r\n } else if (\r\n to + dom.offsetWidth - parent.scrollLeft >\r\n parent.offsetWidth\r\n ) {\r\n options.left = to + dom.offsetWidth - parent.offsetWidth;\r\n }\r\n }\r\n } else {\r\n if (start) {\r\n options.top = dom.offsetTop;\r\n } else {\r\n const to = dom.offsetTop - parent.offsetTop;\r\n if (to - parent.scrollTop < 0) {\r\n options.top = to;\r\n } else if (\r\n to + dom.offsetHeight - parent.scrollTop >\r\n parent.offsetHeight\r\n ) {\r\n options.top = to + dom.offsetHeight - parent.offsetHeight;\r\n }\r\n }\r\n }\r\n\r\n if (options.left || options.top) {\r\n parent.scrollTo(options);\r\n }\r\n }\r\n}\r\n\r\nexport function scrollTo(target, options: ScrollToOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n const o = {\r\n left: options.left === null ? undefined : options.left,\r\n top: options.top === null ? undefined : options.top,\r\n behavior: options.behavior\r\n }\r\n dom.scrollTo(o)\r\n }\r\n}\r\n\r\nexport function scrollToTarget(\r\n target: string,\r\n container: string = null,\r\n offset: number = 0\r\n) {\r\n const targetEl: HTMLElement = document.querySelector(target);\r\n if (targetEl) {\r\n let top ;\r\n if (container) {\r\n top = targetEl.offsetTop;\r\n } else {\r\n top = targetEl.getBoundingClientRect().top + window.scrollY;\r\n }\r\n const containerEl = container\r\n ? document.querySelector(container)\r\n : document.documentElement\r\n containerEl.scrollTo({\r\n top: top - offset,\r\n behavior: \"smooth\",\r\n });\r\n }\r\n}\r\n\r\nexport function scrollToElement(target, offset: number, behavior?: ScrollBehavior) {\r\n const dom = getDom(target)\r\n if (!dom) return;\r\n const domPosition = dom.getBoundingClientRect().top;\r\n const offsetPosition = domPosition + window.pageYOffset - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: behavior\r\n })\r\n}\r\n\r\nexport function scrollToActiveElement(\r\n container,\r\n element = \".active\",\r\n position: \"center\" | number = \"center\"\r\n) {\r\n let containerEl: HTMLElement = getDom(container);\r\n\r\n let activeEl: HTMLElement\r\n if (typeof element === 'string') {\r\n activeEl = container.querySelector(element)\r\n }\r\n\r\n if (!containerEl || !activeEl) {\r\n return;\r\n }\r\n\r\n if (position === 'center') {\r\n containerEl.scrollTop = activeEl.offsetTop - containerEl.offsetHeight / 2 + activeEl.offsetHeight / 2;\r\n }\r\n else {\r\n containerEl.scrollTop = activeEl.offsetTop - position\r\n }\r\n}\r\n\r\nexport function addClsToFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeClsFromFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.remove(className);\r\n }\r\n}\r\n\r\nexport function getAbsoluteTop(e) {\r\n var offset = e.offsetTop;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteTop(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function getAbsoluteLeft(e) {\r\n var offset = e.offsetLeft;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteLeft(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function addElementToBody(element) {\r\n document.body.appendChild(element);\r\n}\r\n\r\nexport function delElementFromBody(element) {\r\n document.body.removeChild(element);\r\n}\r\n\r\nexport function addElementTo(addElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && addElement) {\r\n parent.appendChild(addElement);\r\n }\r\n}\r\n\r\nexport function delElementFrom(delElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && delElement) {\r\n parent.removeChild(delElement);\r\n }\r\n}\r\n\r\nexport function getActiveElement() {\r\n let element = document.activeElement;\r\n let id = element.getAttribute(\"id\") || \"\";\r\n return id;\r\n}\r\n\r\nexport function focusDialog(selector: string, count: number = 0) {\r\n let ele = document.querySelector(selector);\r\n if (ele && !ele.hasAttribute(\"disabled\")) {\r\n setTimeout(() => {\r\n ele.focus();\r\n let curId = \"#\" + getActiveElement();\r\n if (curId !== selector) {\r\n if (count < 10) {\r\n focusDialog(selector, count + 1);\r\n }\r\n }\r\n }, 10);\r\n }\r\n}\r\n\r\nexport function getWindow() {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n pageXOffset: window.pageXOffset,\r\n pageYOffset: window.pageYOffset,\r\n isTop: window.scrollY == 0,\r\n isBottom: (window.scrollY + window.innerHeight) == document.body.clientHeight\r\n };\r\n}\r\n\r\nexport function getWindowAndDocumentProps(windowProps: string[] = [], documentProps: string[] = []) {\r\n const obj = {}\r\n\r\n if (windowProps) {\r\n windowProps.forEach(prop => obj[prop] = window[prop]);\r\n obj['pageYOffset'] = getPageYOffset();\r\n }\r\n\r\n if (documentProps) {\r\n documentProps.forEach(prop => obj[prop] = document.documentElement[prop]);\r\n }\r\n\r\n return obj\r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n var timeout;\r\n return () => {\r\n const context = this, args = arguments;\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func.apply(this, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n};\r\n\r\nexport function css(element: any, name: string | object, value: string | null = null) {\r\n var dom = getDom(element);\r\n if (typeof name === 'string') {\r\n dom.style[name] = value;\r\n } else {\r\n for (let key in name) {\r\n if (name.hasOwnProperty(key)) {\r\n dom.style[key] = name[key];\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function addCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.add(clsName);\r\n } else {\r\n element.classList.add(...clsName);\r\n }\r\n}\r\n\r\nexport function removeCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.remove(clsName);\r\n } else {\r\n element.classList.remove(...clsName);\r\n }\r\n}\r\n\r\nexport function elementScrollIntoView(selector: Element | string) {\r\n let element = getDom(selector);\r\n\r\n if (!element)\r\n return;\r\n\r\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n}\r\n\r\nconst hasScrollbar = () => {\r\n let overflow = document.body.style.overflow;\r\n if (overflow && overflow === \"hidden\") return false;\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\nexport function getScroll() {\r\n return { x: window.pageXOffset, y: window.pageYOffset };\r\n}\r\n\r\nfunction isElement(node: Element) {\r\n const ELEMENT_NODE_TYPE = 1;\r\n return (\r\n node.tagName !== \"HTML\" &&\r\n node.tagName !== \"BODY\" &&\r\n node.nodeType == ELEMENT_NODE_TYPE\r\n )\r\n}\r\n\r\nexport function getScrollParent(el: Element | undefined, root: HTMLElement | Window | undefined = undefined) {\r\n root ??= canUseDom ? window : undefined;\r\n\r\n let node = el;\r\n while (node && node !== root && isElement(node)) {\r\n const { overflowY } = window.getComputedStyle(node);\r\n if (/scroll|auto|overlay/i.test(overflowY)) {\r\n return node;\r\n }\r\n\r\n node = node.parentNode as Element;\r\n }\r\n\r\n return root;\r\n}\r\n\r\nexport function getScrollTop(el: HTMLElement | Window): number {\r\n const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;\r\n\r\n // iOS scroll bounce cause minus scrollTop\r\n return Math.max(top, 0);\r\n}\r\n\r\nexport function getInnerText(element) {\r\n let dom = getDom(element);\r\n return dom.innerText;\r\n}\r\n\r\nexport function getMenuOrDialogMaxZIndex(exclude: Element[] = [], element: Element) {\r\n const base = getDom(element);\r\n // Start with lowest allowed z-index or z-index of\r\n // base component's element, whichever is greater\r\n const zis = [getZIndex(base)]\r\n\r\n const activeElements = [\r\n ...document.getElementsByClassName('m-menu__content--active'),\r\n ...document.getElementsByClassName('m-dialog__content--active'),\r\n ]\r\n\r\n // Get z-index for all active dialogs\r\n for (let index = 0; index < activeElements.length; index++) {\r\n if (!exclude.includes(activeElements[index])) {\r\n zis.push(getZIndex(activeElements[index]))\r\n }\r\n }\r\n\r\n return Math.max(...zis)\r\n}\r\n\r\nexport function getMaxZIndex() {\r\n return [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)\r\n}\r\n\r\nexport function getStyle(element, styleProp) {\r\n element = getDom(element);\r\n\r\n if (element.currentStyle) {\r\n return element.currentStyle[styleProp];\r\n } else if (window.getComputedStyle) {\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\r\n }\r\n}\r\n\r\nexport function getTextAreaInfo(element) {\r\n var result = {};\r\n var dom = getDom(element);\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n\r\n if (element.currentStyle) {\r\n result[\"lineHeight\"] = parseFloat(element.currentStyle[\"line-height\"]);\r\n result[\"paddingTop\"] = parseFloat(element.currentStyle[\"padding-top\"]);\r\n result[\"paddingBottom\"] = parseFloat(element.currentStyle[\"padding-bottom\"]);\r\n result[\"borderBottom\"] = parseFloat(element.currentStyle[\"border-bottom\"]);\r\n result[\"borderTop\"] = parseFloat(element.currentStyle[\"border-top\"]);\r\n } else if (window.getComputedStyle) {\r\n result[\"lineHeight\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"line-height\"));\r\n result[\"paddingTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-top\"));\r\n result[\"paddingBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-bottom\"));\r\n result[\"borderBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-bottom\"));\r\n result[\"borderTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-top\"));\r\n }\r\n //Firefox can return this as NaN, so it has to be handled here like that.\r\n if (Object.is(NaN, result[\"borderTop\"]))\r\n result[\"borderTop\"] = 1;\r\n if (Object.is(NaN, result[\"borderBottom\"]))\r\n result[\"borderBottom\"] = 1;\r\n return result;\r\n}\r\n\r\nconst objReferenceDict = {};\r\n\r\nexport function disposeObj(objReferenceName) {\r\n delete objReferenceDict[objReferenceName];\r\n}\r\n\r\nexport function upsertThemeStyle(id: string, style: string) {\r\n const d = document.getElementById(id);\r\n if (d) {\r\n document.head.removeChild(d);\r\n }\r\n\r\n const d_style = document.createElement('style')\r\n d_style.id = id;\r\n d_style.type = \"text/css\";\r\n d_style.innerHTML = style;\r\n\r\n document.head.insertAdjacentElement('beforeend', d_style)\r\n}\r\n\r\nexport function getImageDimensions(src: string) {\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image()\r\n img.src = src\r\n img.onload = function () {\r\n resolve({\r\n width: img.width,\r\n height: img.height,\r\n hasError: false\r\n })\r\n }\r\n img.onerror = function () {\r\n resolve({\r\n width: 0,\r\n height: 0,\r\n hasError: true\r\n })\r\n }\r\n })\r\n}\r\n\r\nexport function enablePreventDefaultForEvent(element: any, event: string, condition?: any) {\r\n const dom = getDom(element);\r\n if (!dom) return;\r\n if (event === 'keydown') {\r\n dom.addEventListener(event, (e: KeyboardEvent) => {\r\n if (Array.isArray(condition)) {\r\n var codes = condition as string[];\r\n if (codes.includes(e.code)) {\r\n e.preventDefault();\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n })\r\n } else {\r\n dom.addEventListener(event, e => {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getBoundingClientRects(selector) {\r\n var elements = document.querySelectorAll(selector);\r\n\r\n var result = [];\r\n\r\n for (var i = 0; i < elements.length; i++) {\r\n var e: Element = elements[i];\r\n var dom = {\r\n id: e.id,\r\n rect: e.getBoundingClientRect()\r\n };\r\n result.push(dom);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getSize(selectors, sizeProp) {\r\n var el = getDom(selectors);\r\n\r\n var display = el.style.display;\r\n var overflow = el.style.overflow;\r\n\r\n el.style.display = \"\";\r\n el.style.overflow = \"hidden\";\r\n\r\n var size = el[\"offset\" + sizeProp.charAt(0).toUpperCase() + sizeProp.slice(1)] || 0;\r\n\r\n el.style.display = display;\r\n el.style.overflow = overflow;\r\n\r\n return size;\r\n}\r\n\r\nexport function getProp(elOrString, name) {\r\n if (elOrString === 'window') {\r\n return window[name];\r\n }\r\n\r\n var el = getDom(elOrString);\r\n if (!el) {\r\n return null;\r\n }\r\n\r\n return el[name];\r\n}\r\n\r\nexport function updateWindowTransition(selectors, isActive, item) {\r\n var el: HTMLElement = getDom(selectors);\r\n var container: HTMLElement = el.querySelector('.m-window__container');\r\n\r\n if (item) {\r\n var itemEl: HTMLElement = getDom(item);\r\n container.style.height = itemEl.clientHeight + 'px';\r\n return;\r\n }\r\n\r\n if (isActive) {\r\n container.classList.add('m-window__container--is-active');\r\n container.style.height = el.clientHeight + 'px';\r\n } else {\r\n container.style.height = '';\r\n container.classList.remove('m-window__container--is-active');\r\n }\r\n}\r\n\r\nexport function getScrollHeightWithoutHeight(elOrString) {\r\n var el: HTMLElement = getDom(elOrString);\r\n if (!el) {\r\n return 0;\r\n }\r\n\r\n var height = el.style.height;\r\n el.style.height = '0'\r\n var scrollHeight = el.scrollHeight;\r\n el.style.height = height;\r\n\r\n return scrollHeight;\r\n}\r\n\r\nfunction registerPasteWithData(customEventName) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(customEventName, {\r\n browserEventName: 'paste',\r\n createEventArgs: (event: ClipboardEvent) => {\r\n return {\r\n type: event.type,\r\n pastedData: event.clipboardData.getData('text')\r\n };\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function registerTextFieldOnMouseDown(element, inputElement, callback) {\r\n if (!element || !inputElement) return\r\n\r\n const listener = (e: MouseEvent) => {\r\n const target = e.target;\r\n const inputDom = getDom(inputElement);\r\n if (target !== inputDom) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n if (callback) {\r\n const mouseEventArgs = {\r\n Detail: e.detail,\r\n ScreenX: e.screenX,\r\n ScreenY: e.screenY,\r\n ClientX: e.clientX,\r\n ClientY: e.clientY,\r\n OffsetX: e.offsetX,\r\n OffsetY: e.offsetY,\r\n PageX: e.pageX,\r\n PageY: e.pageY,\r\n Button: e.button,\r\n Buttons: e.buttons,\r\n CtrlKey: e.ctrlKey,\r\n ShiftKey: e.shiftKey,\r\n AltKey: e.altKey,\r\n MetaKey: e.metaKey,\r\n Type: e.type\r\n }\r\n\r\n callback.invokeMethodAsync('Invoke', mouseEventArgs);\r\n }\r\n };\r\n\r\n element.addEventListener('mousedown', listener)\r\n\r\n const config: HtmlElementEventListenerConfig = {\r\n listener,\r\n handle: callback\r\n };\r\n\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n htmlElementEventListenerConfigs[key] = [config]\r\n}\r\n\r\nexport function unregisterTextFieldOnMouseDown(element: HTMLElement) {\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n const configs = htmlElementEventListenerConfigs[key]\r\n if (configs && configs.length) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n if (element) {\r\n element.removeEventListener(\"mousedown\", item.listener);\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function containsActiveElement(selector) {\r\n var el = getDom(selector);\r\n if (el && el.contains) {\r\n return el.contains(document.activeElement);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function copyChild(el) {\r\n if (typeof el === 'string') {\r\n el = document.querySelector(el);\r\n }\r\n\r\n if (!el) return;\r\n\r\n el.setAttribute('contenteditable', 'true');\r\n el.focus();\r\n document.execCommand('selectAll', false, null);\r\n document.execCommand('copy');\r\n document.execCommand('unselect');\r\n el.blur();\r\n el.removeAttribute('contenteditable');\r\n}\r\n\r\nexport function copyText(text) {\r\n if (!navigator.clipboard) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n textArea.readOnly = true;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n return;\r\n }\r\n\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function getMenuableDimensions(hasActivator, activatorSelector, isDefaultAttach, contentElement, attached, attachSelector) {\r\n if (!attached) {\r\n var container = document.querySelector(attachSelector);\r\n if (contentElement.nodeType) {\r\n container.appendChild(contentElement);\r\n }\r\n }\r\n\r\n var dimensions = {\r\n activator: {} as any,\r\n content: {} as any,\r\n relativeYOffset: 0,\r\n offsetParentLeft: 0\r\n };\r\n\r\n if (hasActivator) {\r\n var activator = document.querySelector(activatorSelector);\r\n dimensions.activator = measure(activator, isDefaultAttach)\r\n dimensions.activator.offsetLeft = activator.offsetLeft\r\n if (!isDefaultAttach) {\r\n // account for css padding causing things to not line up\r\n // this is mostly for v-autocomplete, hopefully it won't break anything\r\n dimensions.activator.offsetTop = activator.offsetTop\r\n } else {\r\n dimensions.activator.offsetTop = 0\r\n }\r\n }\r\n\r\n sneakPeek(() => {\r\n if (contentElement) {\r\n if (contentElement.offsetParent) {\r\n const offsetRect = getRoundedBoundedClientRect(contentElement.offsetParent)\r\n dimensions.relativeYOffset = getPageYOffset() + offsetRect.top\r\n\r\n if (hasActivator) {\r\n dimensions.activator.top -= dimensions.relativeYOffset\r\n dimensions.activator.left -= window.pageXOffset + offsetRect.left\r\n } else {\r\n dimensions.offsetParentLeft = offsetRect.left\r\n }\r\n }\r\n\r\n dimensions.content = measure(contentElement, isDefaultAttach)\r\n dimensions.content.offsetLeft = contentElement.offsetLeft\r\n dimensions.content.offsetTop = contentElement.offsetTop\r\n }\r\n }, contentElement);\r\n\r\n return dimensions;\r\n}\r\n\r\nfunction getPageYOffset() {\r\n let pageYOffset = window.pageYOffset\r\n const blockedScrollY = parseInt(document.documentElement.style.getPropertyValue('--m-body-scroll-y'))\r\n if (blockedScrollY) {\r\n pageYOffset += Math.abs(blockedScrollY);\r\n }\r\n return pageYOffset\r\n}\r\n\r\nfunction measure(el: HTMLElement, isDefaultAttach) {\r\n if (!el) return {}\r\n\r\n const rect = getRoundedBoundedClientRect(el)\r\n\r\n // Account for activator margin\r\n if (!isDefaultAttach) {\r\n const style = window.getComputedStyle(el)\r\n\r\n rect.left = parseInt(style.marginLeft!)\r\n rect.top = parseInt(style.marginTop!)\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getRoundedBoundedClientRect(el: Element): any {\r\n if (!el || !el.nodeType) {\r\n return null\r\n }\r\n\r\n const rect = el.getBoundingClientRect()\r\n return {\r\n top: Math.round(rect.top),\r\n left: Math.round(rect.left),\r\n bottom: Math.round(rect.bottom),\r\n right: Math.round(rect.right),\r\n width: Math.round(rect.width),\r\n height: Math.round(rect.height),\r\n }\r\n}\r\n\r\nfunction sneakPeek(cb: () => void, el) {\r\n if (!el || !el.style || el.style.display !== 'none') {\r\n cb()\r\n return\r\n }\r\n\r\n el.style.display = 'inline-block'\r\n cb()\r\n el.style.display = 'none'\r\n}\r\n\r\nexport function invokeMultipleMethod(windowProps, documentProps, hasActivator, activatorSelector, attach, contentElement, attached, attachSelector, element) {\r\n var multipleResult = {\r\n windowAndDocument: null,\r\n dimensions: null,\r\n zIndex: 0\r\n };\r\n\r\n multipleResult.windowAndDocument = getWindowAndDocumentProps(windowProps, documentProps);\r\n multipleResult.dimensions = getMenuableDimensions(hasActivator, activatorSelector, attach, contentElement, attached, attachSelector);\r\n multipleResult.zIndex = getMenuOrDialogMaxZIndex([contentElement], element);\r\n\r\n return multipleResult;\r\n}\r\n\r\nexport function registerOTPInputOnInputEvent(elementList, callback) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const inputListener = (e: Event) => otpInputOnInputEvent(e, i, elementList, callback);\r\n const focusListener = (e: Event) => otpInputFocusEvent(e, i, elementList);\r\n const keyupListener =(e: KeyboardEvent) => otpInputKeyupEvent(e, i, elementList, callback);\r\n\r\n elementList[i].addEventListener('input', inputListener);\r\n elementList[i].addEventListener('focus', focusListener);\r\n elementList[i].addEventListener('keyup', keyupListener);\r\n\r\n elementList[i]._optInput = {\r\n inputListener,\r\n focusListener,\r\n keyupListener\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputKeyupEvent(e: KeyboardEvent, otpIdx: number, elementList, callback) {\r\n e.preventDefault();\r\n const eventKey = e.key;\r\n if (eventKey === 'ArrowLeft' || eventKey === 'Backspace') {\r\n if (eventKey === 'Backspace') {\r\n const obj = {\r\n type: eventKey,\r\n index: otpIdx,\r\n value: ''\r\n }\r\n if (callback) {\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n otpInputFocus(otpIdx - 1, elementList);\r\n }\r\n else if (eventKey === 'ArrowRight') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n }\r\n}\r\n\r\nfunction otpInputFocus(focusIndex: number, elementList) {\r\n if (focusIndex < 0) {\r\n otpInputFocus(0, elementList);\r\n }\r\n else if (focusIndex >= elementList.length) {\r\n otpInputFocus(elementList.length - 1, elementList);\r\n }\r\n else {\r\n if (document.activeElement !== elementList[focusIndex]) {\r\n const element = getDom(elementList[focusIndex])\r\n element.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputFocusEvent(e: Event, otpIdx: number, elementList) {\r\n const element = getDom(elementList[otpIdx]) as HTMLInputElement;\r\n if (element && document.activeElement === element) {\r\n element.select();\r\n }\r\n}\r\n\r\nfunction otpInputOnInputEvent(e: Event, otpIdx: number, elementList, callback) {\r\n const target = e.target as HTMLInputElement;\r\n const value = target.value;\r\n\r\n if (value && value !== '') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n\r\n if (callback) {\r\n const obj = {\r\n type: 'Input',\r\n index: otpIdx,\r\n value: value\r\n }\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n}\r\n\r\nexport function unregisterOTPInputOnInputEvent(elementList) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const el = elementList[i]\r\n if(el && el._optInput) {\r\n el.removeEventListener('input', el._optInput.inputListener)\r\n el.removeEventListener('focus', el._optInput.focusListener)\r\n el.removeEventListener('keyup', el._optInput.keyupListener)\r\n }\r\n }\r\n}\r\n\r\nexport function getListIndexWhereAttributeExists(selector: string, attribute:string, value: string) {\r\n const tiles = document.querySelectorAll(selector);\r\n if (!tiles) {\r\n return -1;\r\n }\r\n\r\n let index = -1;\r\n for (let i = 0; i < tiles.length; i++) {\r\n if (tiles[i].getAttribute(attribute) === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n}\r\n\r\nexport function scrollToTile(contentSelector: string, tilesSelector: string, index: number, keyCode: string) {\r\n var tiles = document.querySelectorAll(tilesSelector)\r\n if (!tiles) return;\r\n\r\n let tile = tiles[index] as HTMLElement;\r\n\r\n if (!tile) return;\r\n\r\n const content = document.querySelector(contentSelector);\r\n if (!content) return;\r\n\r\n const scrollTop = content.scrollTop;\r\n const contentHeight = content.clientHeight;\r\n\r\n if (scrollTop > tile.offsetTop - 8) {\r\n content.scrollTo({ top: tile.offsetTop - tile.clientHeight, behavior: \"smooth\" })\r\n } else if (scrollTop + contentHeight < tile.offsetTop + tile.clientHeight + 8) {\r\n content.scrollTo({ top: tile.offsetTop - contentHeight + tile.clientHeight * 2, behavior: \"smooth\" })\r\n }\r\n}\r\n\r\nexport function getElementTranslateY(element) {\r\n const style = window.getComputedStyle(element);\r\n const transform = style.transform || style.webkitTransform;\r\n const translateY = transform.slice(7, transform.length - 1).split(', ')[5];\r\n\r\n return Number(translateY);\r\n}\r\n\r\nfunction isWindow(element: any | Window): element is Window {\r\n return element === window\r\n}\r\n\r\nexport function checkIfThresholdIsExceededWhenScrolling(el: Element, parent: any, threshold: number) {\r\n if (!el || !parent) return\r\n\r\n let parentElement: HTMLElement | Window\r\n\r\n if (parent == \"window\") {\r\n parentElement = window;\r\n } else if (parent == \"document\") {\r\n parentElement = document.documentElement;\r\n } else {\r\n parentElement = document.querySelector(parent);\r\n }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const elementTop = rect.top;\r\n const current = isWindow(parentElement)\r\n ? window.innerHeight\r\n : parentElement.getBoundingClientRect().bottom\r\n\r\n return (current >= elementTop - threshold)\r\n}\r\n\r\nexport function get_top_domain() {\r\n var i, h,\r\n weird_cookie = 'weird_get_top_level_domain=cookie',\r\n hostname = document.location.hostname.split('.');\r\n for (i = hostname.length - 1; i >= 0; i--) {\r\n h = hostname.slice(i).join('.');\r\n document.cookie = weird_cookie + ';domain=.' + h + ';';\r\n if (document.cookie.indexOf(weird_cookie) > -1) {\r\n // We were able to store a cookie! This must be it\r\n document.cookie = weird_cookie.split('=')[0] + '=;domain=.' + h + ';expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n return h;\r\n }\r\n }\r\n}\r\n\r\nexport function setCookie(name, value) {\r\n if (value === null || value === undefined) {\r\n return;\r\n }\r\n\r\n var domain = get_top_domain();\r\n if (!domain) {\r\n domain = '';\r\n }else if (isNaN(domain[0])) {\r\n domain = `.${domain}`;\r\n }\r\n var Days = 30;\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);\r\n document.cookie = `${name}=${escape(value?.toString())};path=/;expires=${exp.toUTCString()};domain=${domain}`;\r\n}\r\n\r\nexport function getCookie(name) {\r\n const reg = new RegExp(`(^| )${name}=([^;]*)(;|$)`);\r\n const arr = document.cookie.match(reg);\r\n if (arr) {\r\n return unescape(arr[2]);\r\n }\r\n return null;\r\n}\r\n\r\nexport function registerDragEvent(el: HTMLElement, dataKey?: string) {\r\n if (el) {\r\n const blazorId = getBlazorId(el);\r\n const listener = (e: DragEvent) => {\r\n if (dataKey) {\r\n const dataValue = (e.target as HTMLElement).getAttribute(dataKey);\r\n e.dataTransfer.setData(dataKey, dataValue);\r\n e.dataTransfer.setData('offsetX', e.offsetX.toString())\r\n e.dataTransfer.setData('offsetY', e.offsetY.toString())\r\n }\r\n };\r\n const key = `${blazorId}:dragstart`;\r\n htmlElementEventListenerConfigs[key] = [{\r\n listener\r\n }];\r\n el.addEventListener(\"dragstart\", listener);\r\n }\r\n}\r\n\r\nexport function unregisterDragEvent(el: HTMLElement) {\r\n const blazorId = getBlazorId(el);\r\n if (blazorId) {\r\n const key = `${blazorId}:dragstart`;\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].forEach((config) => {\r\n el.removeEventListener(\"dragstart\", config.listener);\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function resizableDataTable(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n table.style.overflow = 'hidden';\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n if (!colResizeDiv) continue\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n\r\n let minWidth = (col.firstElementChild as HTMLElement).offsetWidth; // width of span\r\n minWidth = minWidth + 32 + 18 + 1 + 1; // 32:padding 18:sort\r\n if(!col.style.minWidth){\r\n col.minWidth = minWidth;\r\n col.style.minWidth = minWidth + \"px\";\r\n }\r\n\r\n setListeners(colResizeDiv);\r\n }\r\n\r\n function setListeners(div: HTMLDivElement) {\r\n let pageX:number\r\n let curCol: HTMLElement;\r\n let nxtCol: HTMLElement;\r\n let curColWidth: number;\r\n let nxtColWidth: number;\r\n let tableWidth: number;\r\n\r\n div.addEventListener('click', e => e.stopPropagation());\r\n\r\n div.addEventListener('mousedown', function (e) {\r\n curCol = (e.target as HTMLElement).parentElement;\r\n nxtCol = curCol.nextElementSibling as HTMLElement;\r\n pageX = e.pageX;\r\n\r\n tableWidth = table.offsetWidth;\r\n\r\n var padding = paddingDiff(curCol);\r\n\r\n curColWidth = curCol.offsetWidth - padding;\r\n if (nxtCol)\r\n nxtColWidth = nxtCol.offsetWidth - padding;\r\n });\r\n\r\n document.addEventListener(\"mousemove\", function (e) {\r\n if (curCol) {\r\n let diffX = e.pageX - pageX;\r\n\r\n const isRtl = dataTable.classList.contains(\"m-data-table--rtl\")\r\n if (isRtl) {\r\n diffX = 0 - diffX;\r\n }\r\n\r\n let newCurColWidth = curColWidth + diffX;\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n const isOverflow = dataTable.classList.contains(\r\n \"m-data-table--resizable-overflow\"\r\n );\r\n if (isOverflow) {\r\n table.style.width = tableWidth + diffX + \"px\";\r\n return;\r\n }\r\n\r\n const isIndependent = dataTable.classList.contains(\r\n \"m-data-table--resizable-independent\"\r\n );\r\n if (isIndependent) {\r\n let newNextColWidth = nxtColWidth - diffX;\r\n const twoColWidth = curColWidth + nxtColWidth;\r\n\r\n if (diffX > 0) {\r\n if (nxtCol) {\r\n if (newNextColWidth < nxtCol[\"minWidth\"]) {\r\n newNextColWidth = nxtCol[\"minWidth\"];\r\n newCurColWidth = twoColWidth - newNextColWidth;\r\n }\r\n }\r\n } else {\r\n if (newCurColWidth < curCol[\"minWidth\"]) {\r\n newCurColWidth = curCol[\"minWidth\"];\r\n newNextColWidth = twoColWidth - newCurColWidth;\r\n }\r\n }\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n if (nxtCol) {\r\n nxtCol.style.width = newNextColWidth + \"px\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n document.addEventListener('mouseup', function (e) {\r\n if (curCol) {\r\n for (let i = 0; i < cols.length; i++) {\r\n const col:any = cols[i];\r\n col.style.width = col['offsetWidth'] + \"px\"\r\n }\r\n }\r\n curCol = undefined;\r\n nxtCol = undefined;\r\n pageX = undefined;\r\n nxtColWidth = undefined;\r\n curColWidth = undefined;\r\n tableWidth = undefined;\r\n });\r\n }\r\n\r\n function paddingDiff(col) {\r\n if (getStyleVal(col, 'box-sizing') == 'border-box') {\r\n return 0;\r\n }\r\n\r\n var padLeft = getStyleVal(col, 'padding-left');\r\n var padRight = getStyleVal(col, 'padding-right');\r\n return (parseInt(padLeft) + parseInt(padRight));\r\n }\r\n\r\n function getStyleVal(elm, css) {\r\n return (window.getComputedStyle(elm, null).getPropertyValue(css))\r\n }\r\n}\r\n\r\nexport function updateDataTableResizeHeight(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n }\r\n}\r\n\r\nfunction stopPropagation(e) {\r\n e.stopPropagation();\r\n}\r\n\r\nexport function addStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.addEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function removeStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.removeEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function historyBack() {\r\n history.back();\r\n}\r\n\r\nexport function historyGo(delta: number) {\r\n history.go(delta);\r\n}\r\n\r\nexport function historyReplace(href) {\r\n history.replaceState(null, /*ignore title*/ '', href);\r\n}\r\n\r\nexport function registerTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = () => {\r\n const scrollWidth = wrapper.scrollWidth;\r\n const clientWidth = wrapper.clientWidth;\r\n const scrollLeft = wrapper.scrollLeft;\r\n\r\n const rtl = wrapper.parentElement.classList.contains('m-data-table--rtl');\r\n\r\n if (Math.abs(scrollWidth -((rtl ? -scrollLeft : scrollLeft) + clientWidth)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-left')\r\n wrapper.classList.add('scrolled-to-right');\r\n } else if (Math.abs(scrollLeft - (rtl ? scrollWidth - clientWidth : 0)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-right')\r\n wrapper.classList.add('scrolled-to-left');\r\n } else {\r\n wrapper.classList.remove('scrolled-to-right');\r\n wrapper.classList.remove('scrolled-to-left');\r\n wrapper.classList.add('scrolling');\r\n }\r\n }\r\n\r\n listener();\r\n\r\n wrapper.addEventListener('scroll', listener)\r\n wrapper[\"_m_table_scroll_event\"] = listener\r\n}\r\n\r\nexport function unregisterTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = wrapper[\"_m_table_scroll_event\"]\r\n if (listener) {\r\n wrapper.removeEventListener('scroll', listener)\r\n delete wrapper[\"_m_table_scroll_event\"]\r\n }\r\n}\r\n\r\nexport function isScrollNearBottom(element: HTMLElement, threshold: number = 200) {\r\n if (!element) {\r\n return false;\r\n }\r\n return element.scrollHeight - (element.scrollTop + element.clientHeight) < threshold;\r\n}","import { removeListeners, RippleOptions, updateRipple } from \"./ripple\";\r\n\r\nexport default function registerRippleObserver() {\r\n const observer = new MutationObserver((mutationsList, observer) => {\r\n for (const mutation of mutationsList) {\r\n if (mutation.type === \"childList\" && mutation.addedNodes.length > 0) {\r\n for (const node of mutation.addedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (\r\n node.nodeType === Node.ELEMENT_NODE &&\r\n node.hasAttribute(\"ripple\") &&\r\n !node._ripple\r\n ) {\r\n updateRipple(node, convertRippleAttributeToOptions(node), false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 处理属性变动\r\n if (mutation.type === \"attributes\") {\r\n const target = mutation.target as HTMLElement;\r\n if (target.hasAttribute(\"ripple\") && !target._ripple) {\r\n if (mutation.attributeName === \"ripple\") {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n false\r\n );\r\n } else if (!target.hasAttribute(\"ripple\") && target._ripple) {\r\n removeListeners(target);\r\n delete target._ripple;\r\n }\r\n }\r\n }\r\n\r\n if (\r\n mutation.type === \"attributes\" &&\r\n mutation.attributeName === \"ripple\"\r\n ) {\r\n const target = mutation.target as HTMLElement;\r\n if (target._ripple) {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n target._ripple.enabled\r\n );\r\n }\r\n }\r\n\r\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\r\n for (const node of mutation.removedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (node.nodeType === Node.ELEMENT_NODE && node._ripple) {\r\n removeListeners(node);\r\n delete node._ripple;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // ripple=\"false\",\r\n // ripple=\"\",\r\n // ripple=\"true\",\r\n // ripple=\"center\",\r\n // ripple=\"circle\",\r\n // ripple=\"circle¢er\"\r\n // ripple=\"center&custom-css\",\r\n // ripple=\"circle&custom-css\",\r\n // ripple=\"custom-css\"\r\n function convertRippleAttributeToOptions(\r\n target: HTMLElement\r\n ): RippleOptions | null {\r\n const value = target.getAttribute(\"ripple\");\r\n if ((typeof value !== \"string\" && !value) || value === \"false\") {\r\n return null;\r\n }\r\n\r\n const options: RippleOptions = {};\r\n\r\n const props = value.split(\"&\");\r\n props.forEach((prop) => {\r\n if (prop === \"center\") {\r\n options.center = true;\r\n } else if (prop === \"circle\") {\r\n options.circle = true;\r\n } else {\r\n options.class = prop.trim();\r\n }\r\n });\r\n\r\n return options;\r\n }\r\n\r\n const initialElements = document.querySelectorAll(\"[ripple]\");\r\n\r\n for (const element of initialElements) {\r\n updateRipple(element, convertRippleAttributeToOptions(element), false);\r\n }\r\n\r\n observer.observe(document, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n attributeFilter: [\"ripple\"],\r\n attributeOldValue: false,\r\n });\r\n}\r\n","import * as slider from \"./components/slider\";\r\nimport * as textarea from \"./components/textarea\";\r\nimport * as interop from \"./interop\";\r\nimport { MarkdownParser } from \"./proxies/markdown-it\";\r\n\r\ndeclare global {\r\n interface Window {\r\n MasaBlazor: {\r\n interop: {};\r\n extendMarkdownIt?: (parser: MarkdownParser) => void;\r\n xgplayerPlugins: any[];\r\n xgplayerPluginOptions?: { [prop: string]: any };\r\n };\r\n }\r\n}\r\n\r\nwindow.MasaBlazor = {\r\n interop: {\r\n ...interop,\r\n ...slider,\r\n ...textarea\r\n },\r\n xgplayerPlugins: [],\r\n};\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","passiveSupported","window","testListenerOpts","Object","defineProperty","get","addEventListener","removeEventListener","console","warn","keyCodes","freeze","enter","tab","delete","esc","space","up","down","left","right","end","home","del","backspace","insert","pageup","pagedown","shift","getBlazorId","el","_bl_","getAttributeNames","find","a","startsWith","substring","getElementSelector","Element","path","nodeType","Node","ELEMENT_NODE","selector","nodeName","toLowerCase","id","unshift","sib","nth","previousElementSibling","parentNode","join","getDom","elOrString","element","document","documentElement","indexOf","array","split","i","querySelector","HTMLElement","body","error","canUseDom","createElement","touchEvents","parseMouseEvent","event","detail","screenX","screenY","clientX","clientY","offsetX","offsetY","pageX","pageY","button","buttons","ctrlKey","shiftKey","altKey","metaKey","type","parseTouchEvent","touches","parseTouch","targetTouches","changedTouches","touchList","length","touch","push","identifier","registerExtraMouseEvent","eventType","eventName","Blazor","registerCustomEventType","browserEventName","createEventArgs","createSharedEventArgs","registerExtraDropEvent","eventArgs","assign","dataTransfer","dropEffect","effectAllowed","files","Array","from","map","f","name","items","kind","types","getData","Number","args","target","eventTarget","elementReferenceId","class","getAttribute","getEventTarget","sliderHandleId","sliderHandlesById","dotnetHelper","onSliderMouseDown","app","mouseUpOptions","passive","capture","mouseMoveOptions","isTouchEvent","onMouseMove","cb","options","once","addOnceEventListener","onSliderMouseUp","invokeMethodAsync","stopPropagation","payload","textareaAutoGrowNextId","textareaAutoGrowMap","calculateTextareaHeight","textarea","rows","rowHeight","style","height","scrollHeight","minHeight","parseInt","parseFloat","Math","max","input","inputCallback","undefined","functionDebounce","fn","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","debounceWrapper","this","arguments","context","callNow","setTimeout","call","cancel","flush","functionThrottle","interval","timeoutId","throttledFn","leading","trailing","throttleWrapper","registerExtraEvents","registerEvent","DELAY_RIPPLE","transform","webkitTransform","constructor","isKeyboardEvent","ripples","show","_ripple","enabled","container","animation","appendChild","className","radius","scale","x","y","centerX","centerY","localX","localY","offset","getBoundingClientRect","top","circle","clientWidth","center","sqrt","clientHeight","calculate","size","width","computed","getComputedStyle","position","dataset","previousPosition","classList","add","activated","String","performance","now","remove","hide","getElementsByClassName","isHiding","diff","delay","_a","removeChild","rippleShow","currentTarget","touched","rippleStop","isTouch","centered","showTimerCommit","showTimer","rippleHide","rippleCancelShow","keyboardRippleShow","keyCode","keyboardRippleHide","focusRippleHide","updateRipple","wasEnabled","removeListeners","getZIndex","index","getPropertyValue","getDomInfoObj","dom","offsetTop","offsetLeft","scrollWidth","scrollLeft","scrollTop","clientTop","clientLeft","res","viewportElement","box","offsetWidth","offsetHeight","relativeTop","relativeBottom","bottom","relativeLeft","relativeRight","absoluteLeft","absoluteTop","getElementPos","round","onload","customEventName","pastedData","clipboardData","observer","MutationObserver","mutationsList","mutation","addedNodes","node","hasAttribute","convertRippleAttributeToOptions","attributeName","removedNodes","forEach","prop","trim","initialElements","querySelectorAll","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","registerRippleObserver","htmlElementEventListenerConfigs","getActiveElement","activeElement","getWindowAndDocumentProps","windowProps","documentProps","obj","getPageYOffset","isElement","tagName","getMenuOrDialogMaxZIndex","exclude","zis","activeElements","includes","getMenuableDimensions","hasActivator","activatorSelector","isDefaultAttach","contentElement","attached","attachSelector","dimensions","activator","content","relativeYOffset","offsetParentLeft","measure","display","sneakPeek","offsetParent","offsetRect","getRoundedBoundedClientRect","pageXOffset","pageYOffset","blockedScrollY","abs","rect","marginLeft","marginTop","otpInputKeyupEvent","otpIdx","elementList","callback","preventDefault","eventKey","key","otpInputFocus","focusIndex","focus","otpInputFocusEvent","select","otpInputOnInputEvent","get_top_domain","h","weird_cookie","hostname","location","slice","cookie","cloned","cloneNode","parentElement","innerWidth","evt","createEvent","initEvent","dispatchEvent","attach","_b","invoker","extras","htmlElement","config","listener","cancelable","relatedTarget","contains","k","debounce","debounceIt","throttle","handle","configs","item","dispose","e1","e2","dom1","dom2","text","navigator","clipboard","writeText","log","err","textArea","msg","execCommand","fallbackCopyTextToClipboard","preventScroll","HTMLInputElement","HTMLTextAreaElement","Error","blur","arg","scrollIntoView","block","inline","behavior","start","level","parent","to","scrollTo","o","targetEl","scrollY","offsetPosition","activeEl","containerEl","firstElementChild","getAbsoluteTop","getAbsoluteLeft","addElement","elementSelector","delElement","focusDialog","count","ele","innerHeight","isTop","isBottom","hasOwnProperty","clsName","root","overflowY","test","innerText","all","reduce","r","zIndex","styleProp","currentStyle","defaultView","is","NaN","objReferenceName","d","getElementById","head","d_style","innerHTML","insertAdjacentElement","src","img","Image","hasError","onerror","condition","isArray","code","elements","selectors","sizeProp","overflow","charAt","toUpperCase","isActive","itemEl","inputElement","mouseEventArgs","Detail","ScreenX","ScreenY","ClientX","ClientY","OffsetX","OffsetY","PageX","PageY","Button","Buttons","CtrlKey","ShiftKey","AltKey","MetaKey","Type","setAttribute","removeAttribute","readOnly","multipleResult","windowAndDocument","inputListener","focusListener","keyupListener","_optInput","attribute","tiles","contentSelector","tilesSelector","tile","contentHeight","translateY","threshold","elementTop","domain","isNaN","exp","Date","setTime","getTime","Days","escape","toString","toUTCString","reg","RegExp","arr","match","unescape","dataKey","blazorId","dataValue","setData","dataTable","table","row","getElementsByTagName","cols","children","tableHeight","col","colResizeDiv","minWidth","setListeners","div","curCol","nxtCol","curColWidth","nxtColWidth","tableWidth","nextElementSibling","padding","getStyleVal","padLeft","padRight","paddingDiff","diffX","newCurColWidth","newNextColWidth","twoColWidth","elm","css","history","back","delta","go","href","replaceState","wrapper","rtl","MasaBlazor","interop","slider","xgplayerPlugins"],"mappings":"yBAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK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C,IAAI,aACvB,EAGH4J,IAEA2L,EAAQtjB,iBAAiB,SAAU2X,GACnC2L,EAA+B,sBAAI3L,CACrC,6BAEM,SAAqC2L,GACzC,MAAM3L,EAAW2L,EAA+B,sBAC5C3L,IACF2L,EAAQrjB,oBAAoB,SAAU0X,UAC/B2L,EAA+B,sBAE1C,8BAEmCrgB,EAAsB6c,EAAoB,KAC3E,QAAK7c,GAGEA,EAAQqG,cAAgBrG,EAAQqN,UAAYrN,EAAQoK,cAAgByS,CAC7E,IEljDAngB,OAAO6jB,WAAa,CAClBC,qDACKA,IACAC,GACAza,GAEL0a,gBAAiB"} \ No newline at end of file From 62ac8016947b04ffa66401317f7a2ecd5b41b015 Mon Sep 17 00:00:00 2001 From: capdiem Date: Tue, 16 Jul 2024 10:36:47 +0800 Subject: [PATCH 2/2] merge from develop and resolve conflicts --- src/Masa.Blazor.JS/src/interop.ts | 37 +++++++- .../Components/Input/MInput.Validatable.cs | 2 +- .../Components/ItemGroup/MGroupable.cs | 6 +- .../Components/ItemGroup/MItemGroupBase.cs | 39 ++++---- src/Masa.Blazor/Components/Tabs/MTab.razor | 16 ++-- src/Masa.Blazor/Components/Tabs/MTabs.razor | 12 +-- .../Components/Tabs/MTabs.razor.cs | 94 ++++++------------- src/Masa.Blazor/Components/Tabs/MTabsBar.cs | 7 ++ .../Components/Window/MWindow.razor.cs | 7 -- .../Components/Window/MWindowItem.razor | 4 +- .../JSInterop/JsInteropConstants.cs | 4 +- .../Abstract/PatternPathComponentBase.cs | 21 ++++- src/Masa.Blazor/wwwroot/js/masa-blazor.js | 2 +- src/Masa.Blazor/wwwroot/js/masa-blazor.js.map | 2 +- 14 files changed, 128 insertions(+), 125 deletions(-) diff --git a/src/Masa.Blazor.JS/src/interop.ts b/src/Masa.Blazor.JS/src/interop.ts index dcd7ceb151..ed836c6e8a 100644 --- a/src/Masa.Blazor.JS/src/interop.ts +++ b/src/Masa.Blazor.JS/src/interop.ts @@ -1110,7 +1110,7 @@ function measure(el: HTMLElement, isDefaultAttach) { return rect } -function getRoundedBoundedClientRect(el: Element): any { +function getRoundedBoundedClientRect(el: Element) { if (!el || !el.nodeType) { return null } @@ -1595,6 +1595,41 @@ export function unregisterTableScrollEvent(wrapper: HTMLElement) { } } +export function updateTabSlider( + sliderWrapper: HTMLElement, + tab: HTMLElement, + sliderSize: number, + vertical: boolean, + isReversed: boolean +) { + if (!sliderWrapper) { + console.warn('[MTab] the element of slider wrapper is not found') + return; + } + + if (!tab) { + console.warn('[MTab] the element of tab to be activated is not found') + return; + } + + const height = !vertical ? sliderSize : tab.scrollHeight; + const left = vertical ? 0 : tab.offsetLeft; + const right = vertical ? 0 : tab.offsetLeft + tab.offsetWidth; + const top = tab.offsetTop; + const width = vertical ? sliderSize : tab.clientWidth; + sliderWrapper.style.width = `${width}px`; + sliderWrapper.style.height = `${height}px`; + if (!isReversed) { + sliderWrapper.style.left = `${left}px`; + } + if (isReversed) { + sliderWrapper.style.right = `${right}px`; + } + if (vertical) { + sliderWrapper.style.top = `${top}px`; + } +} + export function isScrollNearBottom(element: HTMLElement, threshold: number = 200) { if (!element) { return false; diff --git a/src/Masa.Blazor/Components/Input/MInput.Validatable.cs b/src/Masa.Blazor/Components/Input/MInput.Validatable.cs index 50440c714e..3009e7d816 100644 --- a/src/Masa.Blazor/Components/Input/MInput.Validatable.cs +++ b/src/Masa.Blazor/Components/Input/MInput.Validatable.cs @@ -346,7 +346,7 @@ protected virtual void OnInternalValueChange(TValue? val) { _internalValueChangingFromOnValueChanged = false; } - else if (ValueChanged.HasDelegate) + else { if (_changeType != InternalValueChangeType.Input && !DisableSetValueByJsInterop) { diff --git a/src/Masa.Blazor/Components/ItemGroup/MGroupable.cs b/src/Masa.Blazor/Components/ItemGroup/MGroupable.cs index 252c108f40..495717994f 100644 --- a/src/Masa.Blazor/Components/ItemGroup/MGroupable.cs +++ b/src/Masa.Blazor/Components/ItemGroup/MGroupable.cs @@ -99,7 +99,7 @@ protected override async Task OnInitializedAsync() if (this is IGroupable item) { - ItemGroup!.Register(item); + await ItemGroup!.Register(item); } await base.OnInitializedAsync(); @@ -132,10 +132,9 @@ public async Task RefreshState() if (!Matched || HasRoutableAncestor) return; await SetInternalIsActive(ValueMatched); - StateHasChanged(); } - protected virtual async Task ToggleAsync() + protected async Task ToggleAsync() { if (!Matched) return; @@ -149,6 +148,7 @@ protected async Task SetInternalIsActive(bool val, bool force = false) if (InternalIsActive != val || force) { InternalIsActive = val; + StateHasChanged(); } } else diff --git a/src/Masa.Blazor/Components/ItemGroup/MItemGroupBase.cs b/src/Masa.Blazor/Components/ItemGroup/MItemGroupBase.cs index 79121a5ba3..f1e6840f1f 100644 --- a/src/Masa.Blazor/Components/ItemGroup/MItemGroupBase.cs +++ b/src/Masa.Blazor/Components/ItemGroup/MItemGroupBase.cs @@ -51,7 +51,10 @@ internal List InternalValues set => SetValue(value); } - protected StringNumber? InternalValue => InternalValues?.LastOrDefault(); + protected StringNumber? InternalValue => InternalValues.LastOrDefault(); + + private HashSet _prevInternalValues = []; + private CancellationTokenSource? _cts; protected override void OnParametersSet() { @@ -64,10 +67,14 @@ protected override void OnParametersSet() GroupType = TargetGroup.Value; } - RefreshItemsState(); + if (!_prevInternalValues.SetEquals(InternalValues)) + { + _prevInternalValues = [..InternalValues]; + RefreshItemsState(); + } } - private void RefreshItemsState() + protected virtual void RefreshItemsState() { Items.ForEach(item => item.RefreshState()); } @@ -77,7 +84,7 @@ protected StringNumber InitDefaultItemValue() return _registeredItemsIndex++; } - internal virtual void Register(IGroupable item) + internal virtual async Task Register(IGroupable item) { item.Value ??= InitDefaultItemValue(); @@ -89,26 +96,22 @@ internal virtual void Register(IGroupable item) { if (InternalValues.Count == 0) { - InternalValues = new List() { item.Value }; + InternalValues = [item.Value]; if (Multiple) { - if (ValuesChanged.HasDelegate) - { - ValuesChanged.InvokeAsync(InternalValues.ToList()); - } + await ValuesChanged.InvokeAsync(InternalValues.ToList()); } else { - if (ValueChanged.HasDelegate) - { - ValueChanged.InvokeAsync(item.Value); - } + await ValueChanged.InvokeAsync(item.Value); } } } - RefreshItemsState(); + _cts?.Cancel(); + _cts = new CancellationTokenSource(); + await RunTaskInMicrosecondsAsync(RefreshItemsState, 16, _cts.Token); } public virtual void Unregister(IGroupable item) @@ -153,8 +156,6 @@ public async Task ToggleAsync(StringNumber? key) { InternalValues = Values.ToList(); } - - StateHasChanged(); } } else @@ -170,8 +171,6 @@ public async Task ToggleAsync(StringNumber? key) { InternalValues = new List() { Value }; } - - StateHasChanged(); } } @@ -184,13 +183,13 @@ private void InitOrUpdateInternalValues() { if (!IsDirtyParameter(nameof(Values))) return; - InternalValues = Values == null ? new List() : Values.ToList(); + InternalValues = Values == null ? [] : Values.ToList(); } else { if (!IsDirtyParameter(nameof(Value))) return; - InternalValues = Value == null ? new List() : new List() { Value }; + InternalValues = Value == null ? [] : [Value]; } } diff --git a/src/Masa.Blazor/Components/Tabs/MTab.razor b/src/Masa.Blazor/Components/Tabs/MTab.razor index fa93422da6..ec84c2addc 100644 --- a/src/Masa.Blazor/Components/Tabs/MTab.razor +++ b/src/Masa.Blazor/Components/Tabs/MTab.razor @@ -3,11 +3,13 @@ @inherits MRoutableGroupItem - @ChildContent + Class="@GetClass()" + Style="@GetStyle()" + ReferenceCaptureAction="r => Ref = r" + id="@Id" + @onclick="HandleOnClick" + @attributes="@Attributes"> + + @ChildContent + \ No newline at end of file diff --git a/src/Masa.Blazor/Components/Tabs/MTabs.razor b/src/Masa.Blazor/Components/Tabs/MTabs.razor index 933a283a1d..6a2d542a95 100644 --- a/src/Masa.Blazor/Components/Tabs/MTabs.razor +++ b/src/Masa.Blazor/Components/Tabs/MTabs.razor @@ -14,7 +14,7 @@ PrevIcon="@PrevIcon" ShowArrows="@ShowArrows" Value="@Value" - ValueChanged="@ValueChanged" + ValueChanged="@OnValueChanged" Color="@Color" ActiveClass="@ActiveClass" CenterActive="@CenterActive" @@ -54,16 +54,8 @@ private RenderFragment GenSlider() => __builder => { - var style = StyleBuilder.Create() - .AddWidth(Slider.width) - .AddHeight(Slider.height) - .AddIf("left", Slider.left.ToUnit(), !IsReversed) - .AddIf("right", Slider.right.ToUnit(), IsReversed) - .AddIf("top", Slider.top.ToUnit(), Vertical) - .AddIf("transition", "none", Slider.left == null); -
+ @ref="@_sliderWrapperRef">
diff --git a/src/Masa.Blazor/Components/Tabs/MTabs.razor.cs b/src/Masa.Blazor/Components/Tabs/MTabs.razor.cs index 596f99c0f3..a1674b73f9 100644 --- a/src/Masa.Blazor/Components/Tabs/MTabs.razor.cs +++ b/src/Masa.Blazor/Components/Tabs/MTabs.razor.cs @@ -47,25 +47,9 @@ public partial class MTabs : MasaComponentBase, IThemeable [Parameter] public string? SliderColor { get; set; } [Parameter] [MasaApiParameter(2)] public StringNumber SliderSize { get; set; } = 2; - [Parameter] public StringNumber? Value { get; set; } - private EventCallback? _valueChanged; - - [Parameter] - public EventCallback ValueChanged - { - get - { - if (_valueChanged.HasValue) - { - return _valueChanged.Value; - } - - return EventCallback.Factory.Create(this, (v) => Value = v); - } - set => _valueChanged = value; - } + [Parameter] public EventCallback ValueChanged { get; set; } [Parameter] public bool Vertical { get; set; } @@ -80,10 +64,10 @@ public EventCallback ValueChanged [Parameter] public bool Dark { get; set; } [Parameter] public bool Light { get; set; } - private StringNumber? _prevValue; private int _registeredTabItemsIndex; - private bool _callSliderOnAfterRender; private CancellationTokenSource? _callSliderCts; + private ElementReference _sliderWrapperRef; + private bool _isFirstRender = true; private List TabItems { get; set; } = new(); @@ -132,17 +116,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) { await ResizeJSModule.ObserverAsync(Ref, OnResize); await IntersectJSModule.ObserverAsync(Ref, OnIntersectAsync); - _callSliderOnAfterRender = true; - } - else if (_prevValue != Value) - { - _prevValue = Value; - _callSliderOnAfterRender = true; - } - - if (_callSliderOnAfterRender) - { - _callSliderOnAfterRender = false; + _isFirstRender = false; await CallSlider(); } } @@ -158,7 +132,7 @@ protected override void OnParametersSet() if (MasaBlazor.IsSsr && !IndependentTheme) { CascadingIsDark = MasaBlazor.Theme.Dark; - } + } } #endif @@ -187,9 +161,19 @@ private async Task OnIntersectAsync(IntersectEventArgs e) } } + private async Task OnValueChanged(StringNumber? val) + { + if (Value == val) + { + return; + } + Value = val; + await ValueChanged.InvokeAsync(val); + } + public bool IsReversed => RTL && Vertical; - public MSlideGroup? Instance => TabsBarRef as MSlideGroup; + public MItemGroup? Instance => TabsBarRef as MItemGroup; public void RegisterTabItem(ITabItem tabItem) { @@ -212,40 +196,16 @@ public void UnregisterTabItem(ITabItem tabItem) [MasaApiPublicMethod] public async Task CallSlider() { - if (HideSlider) return; - - _callSliderCts?.Cancel(); - _callSliderCts = new(); - - try - { - await Task.Delay(16, _callSliderCts.Token); - - var item = Instance?.Items?.FirstOrDefault(item => item.Value == Instance.Value); - if (item?.Ref.Context == null) - { - Slider = (0, 0, 0, 0, 0); - } - else - { - var el = await Js.InvokeAsync(JsInteropConstants.GetDomInfo, item.Ref); - var height = !Vertical ? SliderSize.TryGetNumber().number : el.ScrollHeight; - var left = Vertical ? 0 : el.OffsetLeft; - var right = Vertical ? 0 : el.OffsetLeft + el.OffsetWidth; - var top = el.OffsetTop; - var width = Vertical - ? SliderSize.TryGetNumber().number - : el.ClientWidth; // REVIEW: el.ScrollWidth was used in Vuetify2 - - Slider = (height, left, right, top, width); - } - - StateHasChanged(); - } - catch (TaskCanceledException) - { - // ignored - } + if (HideSlider || _isFirstRender) return; + + var item = Instance?.Items.FirstOrDefault(item => item.Value == Value); + await Js.InvokeVoidAsync( + JsInteropConstants.UpdateTabSlider, + _sliderWrapperRef, + item?.Ref, + SliderSize.TryGetNumber().number, + Vertical, + IsReversed); } private async Task OnResize() @@ -264,7 +224,7 @@ private async Task OnResize() [MasaApiPublicMethod] public void CallSliderAfterRender() { - _callSliderOnAfterRender = true; + NextTick(CallSlider); } protected override async ValueTask DisposeAsyncCore() diff --git a/src/Masa.Blazor/Components/Tabs/MTabsBar.cs b/src/Masa.Blazor/Components/Tabs/MTabsBar.cs index 8b31a1ba2c..331be052cf 100644 --- a/src/Masa.Blazor/Components/Tabs/MTabsBar.cs +++ b/src/Masa.Blazor/Components/Tabs/MTabsBar.cs @@ -63,6 +63,13 @@ protected override IEnumerable BuildContentClass() return base.BuildContentClass().Concat(new[] { _block.Element("content").Name }); } + protected override void RefreshItemsState() + { + base.RefreshItemsState(); + + Tabs?.CallSlider(); + } + public override void Unregister(IGroupable item) { base.Unregister(item); diff --git a/src/Masa.Blazor/Components/Window/MWindow.razor.cs b/src/Masa.Blazor/Components/Window/MWindow.razor.cs index ebf8f97146..4c020de41c 100644 --- a/src/Masa.Blazor/Components/Window/MWindow.razor.cs +++ b/src/Masa.Blazor/Components/Window/MWindow.razor.cs @@ -116,13 +116,6 @@ protected override void RegisterWatchers(PropertyWatcher watcher) watcher.Watch>(nameof(InternalValues), UpdateInternalIndex); } - internal override void Register(IGroupable item) - { - base.Register(item); - - StateHasChanged(); - } - public void RenderState() { StateHasChanged(); diff --git a/src/Masa.Blazor/Components/Window/MWindowItem.razor b/src/Masa.Blazor/Components/Window/MWindowItem.razor index d7276fef2b..72ce802756 100644 --- a/src/Masa.Blazor/Components/Window/MWindowItem.razor +++ b/src/Masa.Blazor/Components/Window/MWindowItem.razor @@ -16,7 +16,9 @@ ReferenceCaptureAction="r => Ref = r" Tag="@Tag" @attributes="@Attributes"> - @GenChildContent() + + @GenChildContent() + } diff --git a/src/Masa.Blazor/JSInterop/JsInteropConstants.cs b/src/Masa.Blazor/JSInterop/JsInteropConstants.cs index 760bb261b5..6961e457b2 100644 --- a/src/Masa.Blazor/JSInterop/JsInteropConstants.cs +++ b/src/Masa.Blazor/JSInterop/JsInteropConstants.cs @@ -167,7 +167,9 @@ public static class JsInteropConstants internal static string RegisterTableScrollEvent => $"{JsInteropFuncNamePrefix}registerTableScrollEvent"; internal static string UnregisterTableScrollEvent => $"{JsInteropFuncNamePrefix}unregisterTableScrollEvent"; - + + internal static string UpdateTabSlider => $"{JsInteropFuncNamePrefix}updateTabSlider"; + /// /// Check if the scroll is near the bottom of the element. /// Arguments: element, threshold diff --git a/src/Masa.Blazor/Presets/PageTabs/Abstract/PatternPathComponentBase.cs b/src/Masa.Blazor/Presets/PageTabs/Abstract/PatternPathComponentBase.cs index 6ff8e2a8be..e7088bec70 100644 --- a/src/Masa.Blazor/Presets/PageTabs/Abstract/PatternPathComponentBase.cs +++ b/src/Masa.Blazor/Presets/PageTabs/Abstract/PatternPathComponentBase.cs @@ -19,15 +19,18 @@ public class PatternPathComponentBase : MasaComponentBase protected HashSet CachedSelfPatternRegexes = new(); + protected override void OnInitialized() + { + base.OnInitialized(); + + UpsertCachedSelfPatternRegexes(); + } + protected override void OnParametersSet() { base.OnParametersSet(); - if (_prevSelfPatterns.SetEquals(SelfPatterns)) return; - - _prevSelfPatterns = new HashSet(SelfPatterns); - CachedSelfPatternRegexes = - new HashSet(SelfPatterns.Select(p => new Regex(p, RegexOptions.IgnoreCase))); + UpsertCachedSelfPatternRegexes(); } protected virtual PatternPath GetCurrentPatternPath() @@ -38,4 +41,12 @@ protected virtual PatternPath GetCurrentPatternPath() ? new PatternPath(absolutePath) : new PatternPath(selfPatternRegex.ToString(), absolutePath); } + + private void UpsertCachedSelfPatternRegexes() + { + if (_prevSelfPatterns.SetEquals(SelfPatterns)) return; + + _prevSelfPatterns = [..SelfPatterns]; + CachedSelfPatternRegexes = [..SelfPatterns.Select(p => new Regex(p, RegexOptions.IgnoreCase))]; + } } \ No newline at end of file diff --git a/src/Masa.Blazor/wwwroot/js/masa-blazor.js b/src/Masa.Blazor/wwwroot/js/masa-blazor.js index bb18a861ed..65af469482 100644 --- a/src/Masa.Blazor/wwwroot/js/masa-blazor.js +++ b/src/Masa.Blazor/wwwroot/js/masa-blazor.js @@ -1,2 +1,2 @@ -!function(){"use strict";function e(e,t,n,o){return new(n||(n=Promise))((function(r,i){function l(e){try{a(o.next(e))}catch(e){i(e)}}function s(e){try{a(o.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,s)}a((o=o.apply(e,t||[])).next())}))}let t=!1;try{if("undefined"!=typeof window){const e=Object.defineProperty({},"passive",{get:()=>{t=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}const n=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function o(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function r(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var o=e,r=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&r++;1!=r&&(n+=":nth-of-type("+r+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}function i(e){let t;try{if(e)if("string"==typeof e)if("document"===e)t=document.documentElement;else if(e.indexOf("__.__")>0){let n=e.split("__.__"),o=0,r=document.querySelector(n[o++]);if(r)for(;n[o];)r=r[n[o]],o++;r instanceof HTMLElement&&(t=r)}else t=document.querySelector(e);else t=e;else t=document.body}catch(e){console.error(e)}return t}const l=!("undefined"==typeof window||"undefined"==typeof document||!window.document||!window.document.createElement),s=["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"];function a(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function c(e){return{detail:e.detail,touches:u(e.touches),targetTouches:u(e.targetTouches),changedTouches:u(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function u(e){const t=[];for(let n=0;np("mouse",e)})}function f(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>{const t=(n=e,Object.assign(Object.assign({},a(n)),{dataTransfer:n.dataTransfer?{dropEffect:n.dataTransfer.dropEffect,effectAllowed:n.dataTransfer.effectAllowed,files:Array.from(n.dataTransfer.files).map((e=>e.name)),items:Array.from(n.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:n.dataTransfer.types}:null}));var n;const o=e.dataTransfer.getData("data-value"),r=e.dataTransfer.getData("offsetX"),i=e.dataTransfer.getData("offsetY");return t.dataTransfer.data={value:o,offsetX:Number(r),offsetY:Number(i)},t}})}function p(e,t){let n={target:{}};return"mouse"===e?n=Object.assign(Object.assign({},n),a(t)):"touch"===e&&(n=Object.assign(Object.assign({},n),c(t))),n.target=function(e){const t=e,n={},o=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return o?(n.elementReferenceId=o,n.selector=`[${o}]`):n.selector=r(t),n.class=t.getAttribute("class"),n}(t.target),n}let m=0;const h={};var v=Object.freeze({__proto__:null,registerSliderEvents:function(n,o){h[m]=s;const r=document.querySelector("[data-app]"),i=!t||{passive:!0,capture:!0},l=!!t&&{passive:!0};return n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),m++;function s(t){return e(this,void 0,void 0,(function*(){const e="touches"in t;c(t),r.addEventListener(e?"touchmove":"mousemove",c,l),function(e,t,n,o=!1){const r=i=>{n(i),e.removeEventListener(t,r,o)};e.addEventListener(t,r,o)}(r,e?"touchend":"mouseup",a,i),e?yield o.invokeMethodAsync("OnTouchStartInternal",p("touch",t)):yield o.invokeMethodAsync("OnMouseDownInternal",p("mouse",t))}))}function a(t){return e(this,void 0,void 0,(function*(){t.stopPropagation(),r.removeEventListener("touchmove",c,l),r.removeEventListener("mousemove",c,l),yield o.invokeMethodAsync("OnMouseUpInternal")}))}function c(t){return e(this,void 0,void 0,(function*(){const e="touches"in t,n={type:t.type,clientX:e?t.touches[0].clientX:t.clientX,clientY:e?t.touches[0].clientY:t.clientY};yield o.invokeMethodAsync("OnMouseMoveInternal",n)}))}},unregisterSliderEvents:function(e,t){if(e){const n=h[t];e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n),delete h[t]}}});let g=0;const y={};function w(e,t,n){e.style.height="0";const o=e.scrollHeight,r=parseInt(t,10)*parseFloat(n);e.style.height=Math.max(o,r)+"px"}var b=Object.freeze({__proto__:null,registerTextareaAutoGrowEvent:function(e){const t=e=>{const t=e.target;if(void 0===t.getAttribute("data-auto-grow"))return;const n=t.getAttribute("rows"),o=t.getAttribute("data-row-height");w(t,n,o)};return y[g]=t,e.addEventListener("input",t),g++},unregisterTextareaAutoGrowEvent:function(e,t){if(!e)return;const n=y[t];n&&e.removeEventListener("input",n)},calculateTextareaHeight:w}),E=function(e,t,n){var o=null,r=null,i=function(){o&&(clearTimeout(o),r=null,o=null)},l=function(){if(!t)return e.apply(this,arguments);var l=this,s=arguments,a=n&&!o;return i(),r=function(){e.apply(l,s)},o=setTimeout((function(){if(o=null,!a){var e=r;return r=null,e()}}),t),a?r():void 0};return l.cancel=i,l.flush=function(){var e=r;i(),e&&e()},l};var T=function(e,t,n){var o=null,r=null,i=n&&n.leading,l=n&&n.trailing;null==i&&(i=!0);null==l&&(l=!i);1==i&&(l=!1);var s=function(){o&&(clearTimeout(o),o=null)},a=function(){var n=i&&!o,s=this,a=arguments;if(r=function(){return e.apply(s,a)},o||(o=setTimeout((function(){if(o=null,l)return r()}),t)),n)return n=!1,r()};return a.cancel=s,a.flush=function(){var e=r;s(),e&&e()},a};function L(){var e,t;d("exmousedown","mousedown"),d("exmouseup","mouseup"),d("exclick","click"),d("exmouseleave","mouseleave"),d("exmouseenter","mouseenter"),d("exmousemove","mousemove"),e="extouchstart",t="touchstart",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>p("touch",e)}),function(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t})}("transitionend","transitionend"),f("exdrop","drop"),Blazor&&Blazor.registerCustomEventType("auxclick",{browserEventName:"auxclick",createEventArgs:a})}const _=80;function C(e,t){e.style.transform=t,e.style.webkitTransform=t}function x(e){return"TouchEvent"===e.constructor.name}function S(e){return"KeyboardEvent"===e.constructor.name}const k={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const o=document.createElement("span"),r=document.createElement("span");o.appendChild(r),o.className="m-ripple__container",n.class&&(o.className+=` ${n.class}`);const{radius:i,scale:l,x:s,y:a,centerX:c,centerY:u}=((e,t,n={})=>{let o=0,r=0;if(!S(e)){const n=t.getBoundingClientRect(),i=x(e)?e.touches[e.touches.length-1]:e;o=i.clientX-n.left,r=i.clientY-n.top}let i=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((o-i)**2+(r-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const s=(t.clientWidth-2*i)/2+"px",a=(t.clientHeight-2*i)/2+"px";return{radius:i,scale:l,x:n.center?s:o-i+"px",y:n.center?a:r-i+"px",centerX:s,centerY:a}})(e,t,n),d=2*i+"px";r.className="m-ripple__animation",r.style.width=d,r.style.height=d,t.appendChild(o);const f=window.getComputedStyle(t);f&&"static"===f.position&&(t.style.position="relative",t.dataset.previousPosition="static"),r.classList.add("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--visible"),C(r,`translate(${s}, ${a}) scale3d(${l},${l},${l})`),r.dataset.activated=String(performance.now()),setTimeout((()=>{r.classList.remove("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--in"),C(r,`translate(${c}, ${u}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("m-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const o=performance.now()-Number(n.dataset.activated),r=Math.max(250-o,0);setTimeout((()=>{n.classList.remove("m-ripple__animation--in"),n.classList.add("m-ripple__animation--out"),setTimeout((()=>{var t;1===e.getElementsByClassName("m-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),(null===(t=n.parentNode)||void 0===t?void 0:t.parentNode)===e&&e.removeChild(n.parentNode)}),300)}),r)}};function M(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,x(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||S(e),n._ripple.class&&(t.class=n._ripple.class),x(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{k.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),_)}else k.show(e,n,t)}}function A(e){const t=e.currentTarget;if(t&&t._ripple)if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null;t._ripple.showTimer=setTimeout((()=>A(e)))}else window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),k.hide(t)}function O(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}function N(e){const t=e.currentTarget;t.keyboardRipple||e.keyCode!==n.enter&&e.keyCode!==n.space||(t.keyboardRipple=!0,M(e))}function H(e){e.currentTarget.keyboardRipple=!1,A(e)}function B(e){const t=e.currentTarget;!0===t.keyboardRipple&&(t.keyboardRipple=!1,A(e))}function I(e,t,n){let o=!1;t?o=!0:k.hide(e);const r=t||{};e._ripple=e._ripple||{},e._ripple.enabled=o,e._ripple=Object.assign(Object.assign({},e._ripple),{centered:r.center,class:r.class,circle:r.circle}),o&&!n?(e.addEventListener("touchstart",M,{passive:!0}),e.addEventListener("touchend",A,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("touchcancel",A),e.addEventListener("mousedown",M),e.addEventListener("mouseup",A),e.addEventListener("mouseleave",A),e.addEventListener("keydown",N),e.addEventListener("keyup",H),e.addEventListener("blur",B),e.addEventListener("dragstart",A,{passive:!0})):!o&&n&&Y(e)}function Y(e){e.removeEventListener("mousedown",M),e.removeEventListener("touchstart",M),e.removeEventListener("touchend",A),e.removeEventListener("touchmove",O),e.removeEventListener("touchcancel",A),e.removeEventListener("mouseup",A),e.removeEventListener("mouseleave",A),e.removeEventListener("keydown",N),e.removeEventListener("keyup",H),e.removeEventListener("dragstart",A),e.removeEventListener("blur",B),e._ripple.enabled=!1}function P(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||P(e.parentNode)}function W(e){var t={};t.offsetTop=e.offsetTop||0,t.offsetLeft=e.offsetLeft||0,t.scrollHeight=e.scrollHeight||0,t.scrollWidth=e.scrollWidth||0,t.scrollLeft=e.scrollLeft||0,t.scrollTop=e.scrollTop||0,t.clientTop=e.clientTop||0,t.clientLeft=e.clientLeft||0,t.clientHeight=e.clientHeight||0,t.clientWidth=e.clientWidth||0;var n=function(e){var t=new Object;if(t.x=0,t.y=0,null!==e&&e.getBoundingClientRect){var n=document.documentElement,o=e.getBoundingClientRect(),r=n.scrollLeft,i=n.scrollTop;t.offsetWidth=o.width,t.offsetHeight=o.height,t.relativeTop=o.top,t.relativeBottom=o.bottom,t.relativeLeft=o.left,t.relativeRight=o.right,t.absoluteLeft=o.left+r,t.absoluteTop=o.top+i}return t}(e);return t.offsetWidth=Math.round(n.offsetWidth)||0,t.offsetHeight=Math.round(n.offsetHeight)||0,t.relativeTop=Math.round(n.relativeTop)||0,t.relativeBottom=Math.round(n.relativeBottom)||0,t.relativeLeft=Math.round(n.relativeLeft)||0,t.relativeRight=Math.round(n.relativeRight)||0,t.absoluteLeft=Math.round(n.absoluteLeft)||0,t.absoluteTop=Math.round(n.absoluteTop)||0,t}window.onload=function(){var e;L(),e="pastewithdata",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:"paste",createEventArgs:e=>({type:e.type,pastedData:e.clipboardData.getData("text")})}),function(){const e=new MutationObserver(((e,n)=>{for(const n of e){if("childList"===n.type&&n.addedNodes.length>0)for(const e of n.addedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("ripple")&&!e._ripple&&I(e,t(e),!1);if("attributes"===n.type){const e=n.target;e.hasAttribute("ripple")&&!e._ripple&&("ripple"===n.attributeName?I(e,t(e),!1):!e.hasAttribute("ripple")&&e._ripple&&(Y(e),delete e._ripple))}if("attributes"===n.type&&"ripple"===n.attributeName){const e=n.target;e._ripple&&I(e,t(e),e._ripple.enabled)}if("childList"===n.type&&n.removedNodes.length>0)for(const e of n.removedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e._ripple&&(Y(e),delete e._ripple)}}));function t(e){const t=e.getAttribute("ripple");if("string"!=typeof t&&!t||"false"===t)return null;const n={};return t.split("&").forEach((e=>{"center"===e?n.center=!0:"circle"===e?n.circle=!0:n.class=e.trim()})),n}const n=document.querySelectorAll("[ripple]");for(const e of n)I(e,t(e),!1);e.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ripple"],attributeOldValue:!1})}()};var D={};function X(){return document.activeElement.getAttribute("id")||""}function q(e=[],t=[]){const n={};return e&&(e.forEach((e=>n[e]=window[e])),n.pageYOffset=K()),t&&t.forEach((e=>n[e]=document.documentElement[e])),n}function z(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1==e.nodeType}function R(e=[],t){const n=[P(i(t))],o=[...document.getElementsByClassName("m-menu__content--active"),...document.getElementsByClassName("m-dialog__content--active")];for(let t=0;t{if(o){if(o.offsetParent){const t=j(o.offsetParent);s.relativeYOffset=K()+t.top,e?(s.activator.top-=s.relativeYOffset,s.activator.left-=window.pageXOffset+t.left):s.offsetParentLeft=t.left}s.content=$(o,n),s.content.offsetLeft=o.offsetLeft,s.content.offsetTop=o.offsetTop}}),o),s}function K(){let e=window.pageYOffset;const t=parseInt(document.documentElement.style.getPropertyValue("--m-body-scroll-y"));return t&&(e+=Math.abs(t)),e}function $(e,t){if(!e)return{};const n=j(e);if(!t){const t=window.getComputedStyle(e);n.left=parseInt(t.marginLeft),n.top=parseInt(t.marginTop)}return n}function j(e){if(!e||!e.nodeType)return null;const t=e.getBoundingClientRect();return{top:Math.round(t.top),left:Math.round(t.left),bottom:Math.round(t.bottom),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function V(e,t,n,o){e.preventDefault();const r=e.key;if("ArrowLeft"===r||"Backspace"===r){if("Backspace"===r){const e={type:r,index:t,value:""};o&&o.invokeMethodAsync("Invoke",e)}U(t-1,n)}else"ArrowRight"===r&&U(t+1,n)}function U(e,t){if(e<0)U(0,t);else if(e>=t.length)U(t.length-1,t);else if(document.activeElement!==t[e]){i(t[e]).focus()}}function G(e,t,n){const o=i(n[t]);o&&document.activeElement===o&&o.select()}function Z(e,t,n,o){const r=e.target.value;if(r&&""!==r&&(U(t+1,n),o)){const e={type:"Input",index:t,value:r};o.invokeMethodAsync("Invoke",e)}}function J(){var e,t,n="weird_get_top_level_domain=cookie",o=document.location.hostname.split(".");for(e=o.length-1;e>=0;e--)if(t=o.slice(e).join("."),document.cookie=n+";domain=."+t+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+t+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",t}function Q(e){e.stopPropagation()}var ee=Object.freeze({__proto__:null,getZIndex:P,getDomInfo:function(e,t="body"){var n={},o=i(e);if(o)if(o.style&&"none"===o.style.display){var r=o.cloneNode(!0);r.style.display="inline-block",r.style["z-index"]=-1e3,o.parentElement.appendChild(r),n=W(r),o.parentElement.removeChild(r)}else n=W(o);return n},getParentClientWidthOrWindowInnerWidth:function(e){return e.parentElement?e.parentElement.clientWidth:window.innerWidth},triggerEvent:function(e,t,n,o){var r=i(e),l=document.createEvent(t);return l.initEvent(n),o&&l.stopPropagation(),r.dispatchEvent(l)},setProperty:function(e,t,n){i(e)[t]=n},getBoundingClientRect:function(e,t="body"){var n,o;let r=i(e);var l={};if(r&&r.getBoundingClientRect)if(r.style&&"none"===r.style.display){var s=r.cloneNode(!0);s.style.display="inline-block",s.style["z-index"]=-1e3,null===(n=document.querySelector(t))||void 0===n||n.appendChild(s),l=s.getBoundingClientRect(),null===(o=document.querySelector(t))||void 0===o||o.removeChild(s)}else l=r.getBoundingClientRect();return l},addHtmlElementEventListener:function(e,t,n,o,i){let l;if(l="window"==e?window:"document"==e?document.documentElement:document.querySelector(e),!l)return!1;var a=(null==i?void 0:i.key)||`${e}:${t}`;const u={};var d=e=>{var t;if((null==i?void 0:i.stopPropagation)&&e.stopPropagation(),("boolean"!=typeof e.cancelable||e.cancelable)&&(null==i?void 0:i.preventDefault)&&e.preventDefault(),(null==i?void 0:i.relatedTarget)&&(null===(t=document.querySelector(i.relatedTarget))||void 0===t?void 0:t.contains(e.relatedTarget)))return;let o={};if(s.includes(e.type))o=c(e);else for(var l in e)"string"!=typeof e[l]&&"number"!=typeof e[l]||(o[l]=e[l]);if(e.target&&e.target!==window&&e.target!==document){o.target={};const t=e.target,n=t.getAttributeNames().find((e=>e.startsWith("_bl_")));n?(o.target.elementReferenceId=n,o.target.selector=`[${n}]`):o.target.selector=r(t),o.target.class=t.getAttribute("class")}n.invokeMethodAsync("Invoke",o)};return(null==i?void 0:i.debounce)&&i.debounce>0?u.listener=E(d,i.debounce):(null==i?void 0:i.throttle)&&i.throttle>0?u.listener=T(d,i.throttle,{trailing:!0}):u.listener=d,u.options=o,u.handle=n,D[a]?D[a].push(u):D[a]=[u],l.addEventListener(t,u.listener,u.options),!0},removeHtmlElementEventListener:function(e,t,n){let o;o="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var r=D[n=n||`${e}:${t}`];r&&(r.forEach((e=>{e.handle.dispose(),null==o||o.removeEventListener(t,e.listener,e.options)})),D[n]=[])},addMouseleaveEventListener:function(e){var t=document.querySelector(e);t&&t.addEventListener()},contains:function(e,t){const n=i(e);return!(!n||!n.contains)&&n.contains(i(t))},equalsOrContains:function(e,t){const n=i(e),o=i(t);return!!n&&n.contains&&!!o&&(n==o||n.contains(o))},copy:function(e){navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}(e)},focus:function(e,t=!1){let n=i(e);n instanceof HTMLElement?n.focus({preventScroll:t}):console.error("Unable to focus an invalid element")},select:function(e){let t=i(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error("Unable to select an invalid element");t.select()},hasFocus:function(e){let t=i(e);return document.activeElement===t},blur:function(e){i(e).blur()},log:function(e){console.log(e)},scrollIntoView:function(e,t){let n=i(e);n instanceof HTMLElement&&(null===t||null==t?n.scrollIntoView():"boolean"==typeof t?n.scrollIntoView(t):n.scrollIntoView({block:null==t.block?void 0:t.block,inline:null==t.inline?void 0:t.inline,behavior:t.behavior}))},scrollIntoParentView:function(e,t=!1,n=!1,o=1,r="smooth"){const l=i(e);if(l instanceof HTMLElement){let e=l;for(;o>0;)if(e=e.parentElement,o--,!e)return;const i={behavior:r};if(t)if(n)i.left=l.offsetLeft;else{const t=l.offsetLeft-e.offsetLeft;t-e.scrollLeft<0?i.left=t:t+l.offsetWidth-e.scrollLeft>e.offsetWidth&&(i.left=t+l.offsetWidth-e.offsetWidth)}else if(n)i.top=l.offsetTop;else{const t=l.offsetTop-e.offsetTop;t-e.scrollTop<0?i.top=t:t+l.offsetHeight-e.scrollTop>e.offsetHeight&&(i.top=t+l.offsetHeight-e.offsetHeight)}(i.left||i.top)&&e.scrollTo(i)}},scrollTo:function(e,t){let n=i(e);if(n instanceof HTMLElement){const e={left:null===t.left?void 0:t.left,top:null===t.top?void 0:t.top,behavior:t.behavior};n.scrollTo(e)}},scrollToTarget:function(e,t=null,n=0){const o=document.querySelector(e);if(o){let e;e=t?o.offsetTop:o.getBoundingClientRect().top+window.scrollY;(t?document.querySelector(t):document.documentElement).scrollTo({top:e-n,behavior:"smooth"})}},scrollToElement:function(e,t,n){const o=i(e);if(!o)return;const r=o.getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:r,behavior:n})},scrollToActiveElement:function(e,t=".active",n="center"){let o,r=i(e);"string"==typeof t&&(o=e.querySelector(t)),r&&o&&(r.scrollTop="center"===n?o.offsetTop-r.offsetHeight/2+o.offsetHeight/2:o.offsetTop-n)},addClsToFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.add(t)},removeClsFromFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.remove(t)},getAbsoluteTop:function e(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},getAbsoluteLeft:function e(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},addElementToBody:function(e){document.body.appendChild(e)},delElementFromBody:function(e){document.body.removeChild(e)},addElementTo:function(e,t){let n=i(t);n&&e&&n.appendChild(e)},delElementFrom:function(e,t){let n=i(t);n&&e&&n.removeChild(e)},getActiveElement:X,focusDialog:function e(t,n=0){let o=document.querySelector(t);o&&!o.hasAttribute("disabled")&&setTimeout((()=>{o.focus(),"#"+X()!==t&&n<10&&e(t,n+1)}),10)},getWindow:function(){return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,isTop:0==window.scrollY,isBottom:window.scrollY+window.innerHeight==document.body.clientHeight}},getWindowAndDocumentProps:q,css:function(e,t,n=null){var o=i(e);if("string"==typeof t)o.style[t]=n;else for(let e in t)t.hasOwnProperty(e)&&(o.style[e]=t[e])},addCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.add(t):n.classList.add(...t)},removeCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.remove(t):n.classList.remove(...t)},elementScrollIntoView:function(e){let t=i(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},getScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},getScrollParent:function(e,t=undefined){null!=t||(t=l?window:void 0);let n=e;for(;n&&n!==t&&z(n);){const{overflowY:e}=window.getComputedStyle(n);if(/scroll|auto|overlay/i.test(e))return n;n=n.parentNode}return t},getScrollTop:function(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)},getInnerText:function(e){return i(e).innerText},getMenuOrDialogMaxZIndex:R,getMaxZIndex:function(){return[...document.all].reduce(((e,t)=>Math.max(e,+window.getComputedStyle(t).zIndex||0)),0)},getStyle:function(e,t){return(e=i(e)).currentStyle?e.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(t):void 0},getTextAreaInfo:function(e){var t={},n=i(e);return t.scrollHeight=n.scrollHeight||0,e.currentStyle?(t.lineHeight=parseFloat(e.currentStyle["line-height"]),t.paddingTop=parseFloat(e.currentStyle["padding-top"]),t.paddingBottom=parseFloat(e.currentStyle["padding-bottom"]),t.borderBottom=parseFloat(e.currentStyle["border-bottom"]),t.borderTop=parseFloat(e.currentStyle["border-top"])):window.getComputedStyle&&(t.lineHeight=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height")),t.paddingTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-top")),t.paddingBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-bottom")),t.borderBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-bottom")),t.borderTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-top"))),Object.is(NaN,t.borderTop)&&(t.borderTop=1),Object.is(NaN,t.borderBottom)&&(t.borderBottom=1),t},disposeObj:function(e){},upsertThemeStyle:function(e,t){const n=document.getElementById(e);n&&document.head.removeChild(n);const o=document.createElement("style");o.id=e,o.type="text/css",o.innerHTML=t,document.head.insertAdjacentElement("beforeend",o)},getImageDimensions:function(e){return new Promise((function(t,n){var o=new Image;o.src=e,o.onload=function(){t({width:o.width,height:o.height,hasError:!1})},o.onerror=function(){t({width:0,height:0,hasError:!0})}}))},enablePreventDefaultForEvent:function(e,t,n){const o=i(e);o&&("keydown"===t?o.addEventListener(t,(e=>{Array.isArray(n)?n.includes(e.code)&&e.preventDefault():e.preventDefault()})):o.addEventListener(t,(e=>{e.preventDefault&&e.preventDefault()})))},getBoundingClientRects:function(e){for(var t=document.querySelectorAll(e),n=[],o=0;o{if(e.target!==i(t)&&(e.preventDefault(),e.stopPropagation()),n){const t={Detail:e.detail,ScreenX:e.screenX,ScreenY:e.screenY,ClientX:e.clientX,ClientY:e.clientY,OffsetX:e.offsetX,OffsetY:e.offsetY,PageX:e.pageX,PageY:e.pageY,Button:e.button,Buttons:e.buttons,CtrlKey:e.ctrlKey,ShiftKey:e.shiftKey,AltKey:e.altKey,MetaKey:e.metaKey,Type:e.type};n.invokeMethodAsync("Invoke",t)}};e.addEventListener("mousedown",r);const l={listener:r,handle:n},s=`registerTextFieldOnMouseDown_${o(e)}`;D[s]=[l]},unregisterTextFieldOnMouseDown:function(e){const t=`registerTextFieldOnMouseDown_${o(e)}`,n=D[t];n&&n.length&&n.forEach((t=>{t.handle.dispose(),e&&e.removeEventListener("mousedown",t.listener)}))},containsActiveElement:function(e){var t=i(e);return t&&t.contains?t.contains(document.activeElement):null},copyChild:function(e){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.setAttribute("contenteditable","true"),e.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.execCommand("unselect"),e.blur(),e.removeAttribute("contenteditable"))},copyText:function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)}));else{var t=document.createElement("textarea");t.value=e,t.readOnly=!0,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}},getMenuableDimensions:F,invokeMultipleMethod:function(e,t,n,o,r,i,l,s,a){var c={windowAndDocument:null,dimensions:null,zIndex:0};return c.windowAndDocument=q(e,t),c.dimensions=F(n,o,r,i,l,s),c.zIndex=R([i],a),c},registerOTPInputOnInputEvent:function(e,t){for(let n=0;nZ(o,n,e,t),r=t=>G(t,n,e),i=o=>V(o,n,e,t);e[n].addEventListener("input",o),e[n].addEventListener("focus",r),e[n].addEventListener("keyup",i),e[n]._optInput={inputListener:o,focusListener:r,keyupListener:i}}},unregisterOTPInputOnInputEvent:function(e){for(let t=0;ti.offsetTop-8?l.scrollTo({top:i.offsetTop-i.clientHeight,behavior:"smooth"}):s+a=r-n},get_top_domain:J,setCookie:function(e,t){if(null!=t){var n=J();n?isNaN(n[0])&&(n=`.${n}`):n="";var o=new Date;o.setTime(o.getTime()+2592e6),document.cookie=`${e}=${escape(null==t?void 0:t.toString())};path=/;expires=${o.toUTCString()};domain=${n}`}},getCookie:function(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n?unescape(n[2]):null},registerDragEvent:function(e,t){if(e){const n=o(e),r=e=>{if(t){const n=e.target.getAttribute(t);e.dataTransfer.setData(t,n),e.dataTransfer.setData("offsetX",e.offsetX.toString()),e.dataTransfer.setData("offsetY",e.offsetY.toString())}};D[`${n}:dragstart`]=[{listener:r}],e.addEventListener("dragstart",r)}},unregisterDragEvent:function(e){const t=o(e);if(t){const n=`${t}:dragstart`;D[n]&&D[n].forEach((t=>{e.removeEventListener("dragstart",t.listener)}))}},resizableDataTable:function(e){const t=e.querySelector("table"),n=t.querySelector(".m-data-table-header").getElementsByTagName("tr")[0],o=n?n.children:[];if(!o)return;t.style.overflow="hidden";const r=t.offsetHeight;for(var i=0;ie.stopPropagation())),n.addEventListener("mousedown",(function(e){i=e.target.parentElement,l=i.nextElementSibling,r=e.pageX,u=t.offsetWidth;var n=function(e){if("border-box"==s(e,"box-sizing"))return 0;var t=s(e,"padding-left"),n=s(e,"padding-right");return parseInt(t)+parseInt(n)}(i);a=i.offsetWidth-n,l&&(c=l.offsetWidth-n)})),document.addEventListener("mousemove",(function(n){if(i){let o=n.pageX-r;e.classList.contains("m-data-table--rtl")&&(o=0-o);let s=a+o;i.style.width=s+"px";if(e.classList.contains("m-data-table--resizable-overflow"))return void(t.style.width=u+o+"px");if(e.classList.contains("m-data-table--resizable-independent")){let e=c-o;const t=a+c;o>0?l&&e{const t=e.scrollWidth,n=e.clientWidth,o=e.scrollLeft,r=e.parentElement.classList.contains("m-data-table--rtl");Math.abs(t-((r?-o:o)+n))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolled-to-right")):Math.abs(o-(r?t-n:0))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-right"),e.classList.add("scrolled-to-left")):(e.classList.remove("scrolled-to-right"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolling"))};t(),e.addEventListener("scroll",t),e._m_table_scroll_event=t},unregisterTableScrollEvent:function(e){const t=e._m_table_scroll_event;t&&(e.removeEventListener("scroll",t),delete e._m_table_scroll_event)},isScrollNearBottom:function(e,t=200){return!!e&&e.scrollHeight-(e.scrollTop+e.clientHeight){t=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}const n=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function o(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function r(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var o=e,r=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&r++;1!=r&&(n+=":nth-of-type("+r+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}function i(e){let t;try{if(e)if("string"==typeof e)if("document"===e)t=document.documentElement;else if(e.indexOf("__.__")>0){let n=e.split("__.__"),o=0,r=document.querySelector(n[o++]);if(r)for(;n[o];)r=r[n[o]],o++;r instanceof HTMLElement&&(t=r)}else t=document.querySelector(e);else t=e;else t=document.body}catch(e){console.error(e)}return t}const l=!("undefined"==typeof window||"undefined"==typeof document||!window.document||!window.document.createElement),s=["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"];function a(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function c(e){return{detail:e.detail,touches:u(e.touches),targetTouches:u(e.targetTouches),changedTouches:u(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function u(e){const t=[];for(let n=0;np("mouse",e)})}function f(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>{const t=(n=e,Object.assign(Object.assign({},a(n)),{dataTransfer:n.dataTransfer?{dropEffect:n.dataTransfer.dropEffect,effectAllowed:n.dataTransfer.effectAllowed,files:Array.from(n.dataTransfer.files).map((e=>e.name)),items:Array.from(n.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:n.dataTransfer.types}:null}));var n;const o=e.dataTransfer.getData("data-value"),r=e.dataTransfer.getData("offsetX"),i=e.dataTransfer.getData("offsetY");return t.dataTransfer.data={value:o,offsetX:Number(r),offsetY:Number(i)},t}})}function p(e,t){let n={target:{}};return"mouse"===e?n=Object.assign(Object.assign({},n),a(t)):"touch"===e&&(n=Object.assign(Object.assign({},n),c(t))),n.target=function(e){const t=e,n={},o=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return o?(n.elementReferenceId=o,n.selector=`[${o}]`):n.selector=r(t),n.class=t.getAttribute("class"),n}(t.target),n}let m=0;const h={};var v=Object.freeze({__proto__:null,registerSliderEvents:function(n,o){h[m]=s;const r=document.querySelector("[data-app]"),i=!t||{passive:!0,capture:!0},l=!!t&&{passive:!0};return n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),m++;function s(t){return e(this,void 0,void 0,(function*(){const e="touches"in t;c(t),r.addEventListener(e?"touchmove":"mousemove",c,l),function(e,t,n,o=!1){const r=i=>{n(i),e.removeEventListener(t,r,o)};e.addEventListener(t,r,o)}(r,e?"touchend":"mouseup",a,i),e?yield o.invokeMethodAsync("OnTouchStartInternal",p("touch",t)):yield o.invokeMethodAsync("OnMouseDownInternal",p("mouse",t))}))}function a(t){return e(this,void 0,void 0,(function*(){t.stopPropagation(),r.removeEventListener("touchmove",c,l),r.removeEventListener("mousemove",c,l),yield o.invokeMethodAsync("OnMouseUpInternal")}))}function c(t){return e(this,void 0,void 0,(function*(){const e="touches"in t,n={type:t.type,clientX:e?t.touches[0].clientX:t.clientX,clientY:e?t.touches[0].clientY:t.clientY};yield o.invokeMethodAsync("OnMouseMoveInternal",n)}))}},unregisterSliderEvents:function(e,t){if(e){const n=h[t];e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n),delete h[t]}}});let g=0;const y={};function w(e,t,n){e.style.height="0";const o=e.scrollHeight,r=parseInt(t,10)*parseFloat(n);e.style.height=Math.max(o,r)+"px"}var b=Object.freeze({__proto__:null,registerTextareaAutoGrowEvent:function(e){const t=e=>{const t=e.target;if(void 0===t.getAttribute("data-auto-grow"))return;const n=t.getAttribute("rows"),o=t.getAttribute("data-row-height");w(t,n,o)};return y[g]=t,e.addEventListener("input",t),g++},unregisterTextareaAutoGrowEvent:function(e,t){if(!e)return;const n=y[t];n&&e.removeEventListener("input",n)},calculateTextareaHeight:w}),E=function(e,t,n){var o=null,r=null,i=function(){o&&(clearTimeout(o),r=null,o=null)},l=function(){if(!t)return e.apply(this,arguments);var l=this,s=arguments,a=n&&!o;return i(),r=function(){e.apply(l,s)},o=setTimeout((function(){if(o=null,!a){var e=r;return r=null,e()}}),t),a?r():void 0};return l.cancel=i,l.flush=function(){var e=r;i(),e&&e()},l};var T=function(e,t,n){var o=null,r=null,i=n&&n.leading,l=n&&n.trailing;null==i&&(i=!0);null==l&&(l=!i);1==i&&(l=!1);var s=function(){o&&(clearTimeout(o),o=null)},a=function(){var n=i&&!o,s=this,a=arguments;if(r=function(){return e.apply(s,a)},o||(o=setTimeout((function(){if(o=null,l)return r()}),t)),n)return n=!1,r()};return a.cancel=s,a.flush=function(){var e=r;s(),e&&e()},a};function L(){var e,t;d("exmousedown","mousedown"),d("exmouseup","mouseup"),d("exclick","click"),d("exmouseleave","mouseleave"),d("exmouseenter","mouseenter"),d("exmousemove","mousemove"),e="extouchstart",t="touchstart",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>p("touch",e)}),function(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t})}("transitionend","transitionend"),f("exdrop","drop"),Blazor&&Blazor.registerCustomEventType("auxclick",{browserEventName:"auxclick",createEventArgs:a})}const _=80;function C(e,t){e.style.transform=t,e.style.webkitTransform=t}function x(e){return"TouchEvent"===e.constructor.name}function S(e){return"KeyboardEvent"===e.constructor.name}const M={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const o=document.createElement("span"),r=document.createElement("span");o.appendChild(r),o.className="m-ripple__container",n.class&&(o.className+=` ${n.class}`);const{radius:i,scale:l,x:s,y:a,centerX:c,centerY:u}=((e,t,n={})=>{let o=0,r=0;if(!S(e)){const n=t.getBoundingClientRect(),i=x(e)?e.touches[e.touches.length-1]:e;o=i.clientX-n.left,r=i.clientY-n.top}let i=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((o-i)**2+(r-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const s=(t.clientWidth-2*i)/2+"px",a=(t.clientHeight-2*i)/2+"px";return{radius:i,scale:l,x:n.center?s:o-i+"px",y:n.center?a:r-i+"px",centerX:s,centerY:a}})(e,t,n),d=2*i+"px";r.className="m-ripple__animation",r.style.width=d,r.style.height=d,t.appendChild(o);const f=window.getComputedStyle(t);f&&"static"===f.position&&(t.style.position="relative",t.dataset.previousPosition="static"),r.classList.add("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--visible"),C(r,`translate(${s}, ${a}) scale3d(${l},${l},${l})`),r.dataset.activated=String(performance.now()),setTimeout((()=>{r.classList.remove("m-ripple__animation--enter"),r.classList.add("m-ripple__animation--in"),C(r,`translate(${c}, ${u}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("m-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const o=performance.now()-Number(n.dataset.activated),r=Math.max(250-o,0);setTimeout((()=>{n.classList.remove("m-ripple__animation--in"),n.classList.add("m-ripple__animation--out"),setTimeout((()=>{var t;1===e.getElementsByClassName("m-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),(null===(t=n.parentNode)||void 0===t?void 0:t.parentNode)===e&&e.removeChild(n.parentNode)}),300)}),r)}};function k(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,x(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||S(e),n._ripple.class&&(t.class=n._ripple.class),x(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{M.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),_)}else M.show(e,n,t)}}function A(e){const t=e.currentTarget;if(t&&t._ripple)if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null;t._ripple.showTimer=setTimeout((()=>A(e)))}else window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),M.hide(t)}function O(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}function N(e){const t=e.currentTarget;t.keyboardRipple||e.keyCode!==n.enter&&e.keyCode!==n.space||(t.keyboardRipple=!0,k(e))}function H(e){e.currentTarget.keyboardRipple=!1,A(e)}function B(e){const t=e.currentTarget;!0===t.keyboardRipple&&(t.keyboardRipple=!1,A(e))}function I(e,t,n){let o=!1;t?o=!0:M.hide(e);const r=t||{};e._ripple=e._ripple||{},e._ripple.enabled=o,e._ripple=Object.assign(Object.assign({},e._ripple),{centered:r.center,class:r.class,circle:r.circle}),o&&!n?(e.addEventListener("touchstart",k,{passive:!0}),e.addEventListener("touchend",A,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("touchcancel",A),e.addEventListener("mousedown",k),e.addEventListener("mouseup",A),e.addEventListener("mouseleave",A),e.addEventListener("keydown",N),e.addEventListener("keyup",H),e.addEventListener("blur",B),e.addEventListener("dragstart",A,{passive:!0})):!o&&n&&Y(e)}function Y(e){e.removeEventListener("mousedown",k),e.removeEventListener("touchstart",k),e.removeEventListener("touchend",A),e.removeEventListener("touchmove",O),e.removeEventListener("touchcancel",A),e.removeEventListener("mouseup",A),e.removeEventListener("mouseleave",A),e.removeEventListener("keydown",N),e.removeEventListener("keyup",H),e.removeEventListener("dragstart",A),e.removeEventListener("blur",B),e._ripple.enabled=!1}function P(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||P(e.parentNode)}function W(e){var t={};t.offsetTop=e.offsetTop||0,t.offsetLeft=e.offsetLeft||0,t.scrollHeight=e.scrollHeight||0,t.scrollWidth=e.scrollWidth||0,t.scrollLeft=e.scrollLeft||0,t.scrollTop=e.scrollTop||0,t.clientTop=e.clientTop||0,t.clientLeft=e.clientLeft||0,t.clientHeight=e.clientHeight||0,t.clientWidth=e.clientWidth||0;var n=function(e){var t=new Object;if(t.x=0,t.y=0,null!==e&&e.getBoundingClientRect){var n=document.documentElement,o=e.getBoundingClientRect(),r=n.scrollLeft,i=n.scrollTop;t.offsetWidth=o.width,t.offsetHeight=o.height,t.relativeTop=o.top,t.relativeBottom=o.bottom,t.relativeLeft=o.left,t.relativeRight=o.right,t.absoluteLeft=o.left+r,t.absoluteTop=o.top+i}return t}(e);return t.offsetWidth=Math.round(n.offsetWidth)||0,t.offsetHeight=Math.round(n.offsetHeight)||0,t.relativeTop=Math.round(n.relativeTop)||0,t.relativeBottom=Math.round(n.relativeBottom)||0,t.relativeLeft=Math.round(n.relativeLeft)||0,t.relativeRight=Math.round(n.relativeRight)||0,t.absoluteLeft=Math.round(n.absoluteLeft)||0,t.absoluteTop=Math.round(n.absoluteTop)||0,t}window.onload=function(){var e;L(),e="pastewithdata",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:"paste",createEventArgs:e=>({type:e.type,pastedData:e.clipboardData.getData("text")})}),function(){const e=new MutationObserver(((e,n)=>{for(const n of e){if("childList"===n.type&&n.addedNodes.length>0)for(const e of n.addedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("ripple")&&!e._ripple&&I(e,t(e),!1);if("attributes"===n.type){const e=n.target;e.hasAttribute("ripple")&&!e._ripple&&("ripple"===n.attributeName?I(e,t(e),!1):!e.hasAttribute("ripple")&&e._ripple&&(Y(e),delete e._ripple))}if("attributes"===n.type&&"ripple"===n.attributeName){const e=n.target;e._ripple&&I(e,t(e),e._ripple.enabled)}if("childList"===n.type&&n.removedNodes.length>0)for(const e of n.removedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e._ripple&&(Y(e),delete e._ripple)}}));function t(e){const t=e.getAttribute("ripple");if("string"!=typeof t&&!t||"false"===t)return null;const n={};return t.split("&").forEach((e=>{"center"===e?n.center=!0:"circle"===e?n.circle=!0:n.class=e.trim()})),n}const n=document.querySelectorAll("[ripple]");for(const e of n)I(e,t(e),!1);e.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ripple"],attributeOldValue:!1})}()};var D={};function X(){return document.activeElement.getAttribute("id")||""}function q(e=[],t=[]){const n={};return e&&(e.forEach((e=>n[e]=window[e])),n.pageYOffset=F()),t&&t.forEach((e=>n[e]=document.documentElement[e])),n}function z(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1==e.nodeType}function $(e=[],t){const n=[P(i(t))],o=[...document.getElementsByClassName("m-menu__content--active"),...document.getElementsByClassName("m-dialog__content--active")];for(let t=0;t{if(o){if(o.offsetParent){const t=j(o.offsetParent);s.relativeYOffset=F()+t.top,e?(s.activator.top-=s.relativeYOffset,s.activator.left-=window.pageXOffset+t.left):s.offsetParentLeft=t.left}s.content=K(o,n),s.content.offsetLeft=o.offsetLeft,s.content.offsetTop=o.offsetTop}}),o),s}function F(){let e=window.pageYOffset;const t=parseInt(document.documentElement.style.getPropertyValue("--m-body-scroll-y"));return t&&(e+=Math.abs(t)),e}function K(e,t){if(!e)return{};const n=j(e);if(!t){const t=window.getComputedStyle(e);n.left=parseInt(t.marginLeft),n.top=parseInt(t.marginTop)}return n}function j(e){if(!e||!e.nodeType)return null;const t=e.getBoundingClientRect();return{top:Math.round(t.top),left:Math.round(t.left),bottom:Math.round(t.bottom),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function V(e,t,n,o){e.preventDefault();const r=e.key;if("ArrowLeft"===r||"Backspace"===r){if("Backspace"===r){const e={type:r,index:t,value:""};o&&o.invokeMethodAsync("Invoke",e)}U(t-1,n)}else"ArrowRight"===r&&U(t+1,n)}function U(e,t){if(e<0)U(0,t);else if(e>=t.length)U(t.length-1,t);else if(document.activeElement!==t[e]){i(t[e]).focus()}}function G(e,t,n){const o=i(n[t]);o&&document.activeElement===o&&o.select()}function Z(e,t,n,o){const r=e.target.value;if(r&&""!==r&&(U(t+1,n),o)){const e={type:"Input",index:t,value:r};o.invokeMethodAsync("Invoke",e)}}function J(){var e,t,n="weird_get_top_level_domain=cookie",o=document.location.hostname.split(".");for(e=o.length-1;e>=0;e--)if(t=o.slice(e).join("."),document.cookie=n+";domain=."+t+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+t+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",t}function Q(e){e.stopPropagation()}var ee=Object.freeze({__proto__:null,getZIndex:P,getDomInfo:function(e,t="body"){var n={},o=i(e);if(o)if(o.style&&"none"===o.style.display){var r=o.cloneNode(!0);r.style.display="inline-block",r.style["z-index"]=-1e3,o.parentElement.appendChild(r),n=W(r),o.parentElement.removeChild(r)}else n=W(o);return n},getParentClientWidthOrWindowInnerWidth:function(e){return e.parentElement?e.parentElement.clientWidth:window.innerWidth},triggerEvent:function(e,t,n,o){var r=i(e),l=document.createEvent(t);return l.initEvent(n),o&&l.stopPropagation(),r.dispatchEvent(l)},setProperty:function(e,t,n){i(e)[t]=n},getBoundingClientRect:function(e,t="body"){var n,o;let r=i(e);var l={};if(r&&r.getBoundingClientRect)if(r.style&&"none"===r.style.display){var s=r.cloneNode(!0);s.style.display="inline-block",s.style["z-index"]=-1e3,null===(n=document.querySelector(t))||void 0===n||n.appendChild(s),l=s.getBoundingClientRect(),null===(o=document.querySelector(t))||void 0===o||o.removeChild(s)}else l=r.getBoundingClientRect();return l},addHtmlElementEventListener:function(e,t,n,o,i){let l;if(l="window"==e?window:"document"==e?document.documentElement:document.querySelector(e),!l)return!1;var a=(null==i?void 0:i.key)||`${e}:${t}`;const u={};var d=e=>{var t;if((null==i?void 0:i.stopPropagation)&&e.stopPropagation(),("boolean"!=typeof e.cancelable||e.cancelable)&&(null==i?void 0:i.preventDefault)&&e.preventDefault(),(null==i?void 0:i.relatedTarget)&&(null===(t=document.querySelector(i.relatedTarget))||void 0===t?void 0:t.contains(e.relatedTarget)))return;let o={};if(s.includes(e.type))o=c(e);else for(var l in e)"string"!=typeof e[l]&&"number"!=typeof e[l]||(o[l]=e[l]);if(e.target&&e.target!==window&&e.target!==document){o.target={};const t=e.target,n=t.getAttributeNames().find((e=>e.startsWith("_bl_")));n?(o.target.elementReferenceId=n,o.target.selector=`[${n}]`):o.target.selector=r(t),o.target.class=t.getAttribute("class")}n.invokeMethodAsync("Invoke",o)};return(null==i?void 0:i.debounce)&&i.debounce>0?u.listener=E(d,i.debounce):(null==i?void 0:i.throttle)&&i.throttle>0?u.listener=T(d,i.throttle,{trailing:!0}):u.listener=d,u.options=o,u.handle=n,D[a]?D[a].push(u):D[a]=[u],l.addEventListener(t,u.listener,u.options),!0},removeHtmlElementEventListener:function(e,t,n){let o;o="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var r=D[n=n||`${e}:${t}`];r&&(r.forEach((e=>{e.handle.dispose(),null==o||o.removeEventListener(t,e.listener,e.options)})),D[n]=[])},addMouseleaveEventListener:function(e){var t=document.querySelector(e);t&&t.addEventListener()},contains:function(e,t){const n=i(e);return!(!n||!n.contains)&&n.contains(i(t))},equalsOrContains:function(e,t){const n=i(e),o=i(t);return!!n&&n.contains&&!!o&&(n==o||n.contains(o))},copy:function(e){navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}(e)},focus:function(e,t=!1){let n=i(e);n instanceof HTMLElement?n.focus({preventScroll:t}):console.error("Unable to focus an invalid element")},select:function(e){let t=i(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error("Unable to select an invalid element");t.select()},hasFocus:function(e){let t=i(e);return document.activeElement===t},blur:function(e){i(e).blur()},log:function(e){console.log(e)},scrollIntoView:function(e,t){let n=i(e);n instanceof HTMLElement&&(null===t||null==t?n.scrollIntoView():"boolean"==typeof t?n.scrollIntoView(t):n.scrollIntoView({block:null==t.block?void 0:t.block,inline:null==t.inline?void 0:t.inline,behavior:t.behavior}))},scrollIntoParentView:function(e,t=!1,n=!1,o=1,r="smooth"){const l=i(e);if(l instanceof HTMLElement){let e=l;for(;o>0;)if(e=e.parentElement,o--,!e)return;const i={behavior:r};if(t)if(n)i.left=l.offsetLeft;else{const t=l.offsetLeft-e.offsetLeft;t-e.scrollLeft<0?i.left=t:t+l.offsetWidth-e.scrollLeft>e.offsetWidth&&(i.left=t+l.offsetWidth-e.offsetWidth)}else if(n)i.top=l.offsetTop;else{const t=l.offsetTop-e.offsetTop;t-e.scrollTop<0?i.top=t:t+l.offsetHeight-e.scrollTop>e.offsetHeight&&(i.top=t+l.offsetHeight-e.offsetHeight)}(i.left||i.top)&&e.scrollTo(i)}},scrollTo:function(e,t){let n=i(e);if(n instanceof HTMLElement){const e={left:null===t.left?void 0:t.left,top:null===t.top?void 0:t.top,behavior:t.behavior};n.scrollTo(e)}},scrollToTarget:function(e,t=null,n=0){const o=document.querySelector(e);if(o){let e;e=t?o.offsetTop:o.getBoundingClientRect().top+window.scrollY;(t?document.querySelector(t):document.documentElement).scrollTo({top:e-n,behavior:"smooth"})}},scrollToElement:function(e,t,n){const o=i(e);if(!o)return;const r=o.getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:r,behavior:n})},scrollToActiveElement:function(e,t=".active",n="center"){let o,r=i(e);"string"==typeof t&&(o=e.querySelector(t)),r&&o&&(r.scrollTop="center"===n?o.offsetTop-r.offsetHeight/2+o.offsetHeight/2:o.offsetTop-n)},addClsToFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.add(t)},removeClsFromFirstChild:function(e,t){var n=i(e);n.firstElementChild&&n.firstElementChild.classList.remove(t)},getAbsoluteTop:function e(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},getAbsoluteLeft:function e(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},addElementToBody:function(e){document.body.appendChild(e)},delElementFromBody:function(e){document.body.removeChild(e)},addElementTo:function(e,t){let n=i(t);n&&e&&n.appendChild(e)},delElementFrom:function(e,t){let n=i(t);n&&e&&n.removeChild(e)},getActiveElement:X,focusDialog:function e(t,n=0){let o=document.querySelector(t);o&&!o.hasAttribute("disabled")&&setTimeout((()=>{o.focus(),"#"+X()!==t&&n<10&&e(t,n+1)}),10)},getWindow:function(){return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,isTop:0==window.scrollY,isBottom:window.scrollY+window.innerHeight==document.body.clientHeight}},getWindowAndDocumentProps:q,css:function(e,t,n=null){var o=i(e);if("string"==typeof t)o.style[t]=n;else for(let e in t)t.hasOwnProperty(e)&&(o.style[e]=t[e])},addCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.add(t):n.classList.add(...t)},removeCls:function(e,t){let n=i(e);"string"==typeof t?n.classList.remove(t):n.classList.remove(...t)},elementScrollIntoView:function(e){let t=i(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},getScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},getScrollParent:function(e,t=undefined){null!=t||(t=l?window:void 0);let n=e;for(;n&&n!==t&&z(n);){const{overflowY:e}=window.getComputedStyle(n);if(/scroll|auto|overlay/i.test(e))return n;n=n.parentNode}return t},getScrollTop:function(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)},getInnerText:function(e){return i(e).innerText},getMenuOrDialogMaxZIndex:$,getMaxZIndex:function(){return[...document.all].reduce(((e,t)=>Math.max(e,+window.getComputedStyle(t).zIndex||0)),0)},getStyle:function(e,t){return(e=i(e)).currentStyle?e.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(t):void 0},getTextAreaInfo:function(e){var t={},n=i(e);return t.scrollHeight=n.scrollHeight||0,e.currentStyle?(t.lineHeight=parseFloat(e.currentStyle["line-height"]),t.paddingTop=parseFloat(e.currentStyle["padding-top"]),t.paddingBottom=parseFloat(e.currentStyle["padding-bottom"]),t.borderBottom=parseFloat(e.currentStyle["border-bottom"]),t.borderTop=parseFloat(e.currentStyle["border-top"])):window.getComputedStyle&&(t.lineHeight=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height")),t.paddingTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-top")),t.paddingBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-bottom")),t.borderBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-bottom")),t.borderTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-top"))),Object.is(NaN,t.borderTop)&&(t.borderTop=1),Object.is(NaN,t.borderBottom)&&(t.borderBottom=1),t},disposeObj:function(e){},upsertThemeStyle:function(e,t){const n=document.getElementById(e);n&&document.head.removeChild(n);const o=document.createElement("style");o.id=e,o.type="text/css",o.innerHTML=t,document.head.insertAdjacentElement("beforeend",o)},getImageDimensions:function(e){return new Promise((function(t,n){var o=new Image;o.src=e,o.onload=function(){t({width:o.width,height:o.height,hasError:!1})},o.onerror=function(){t({width:0,height:0,hasError:!0})}}))},enablePreventDefaultForEvent:function(e,t,n){const o=i(e);o&&("keydown"===t?o.addEventListener(t,(e=>{Array.isArray(n)?n.includes(e.code)&&e.preventDefault():e.preventDefault()})):o.addEventListener(t,(e=>{e.preventDefault&&e.preventDefault()})))},getBoundingClientRects:function(e){for(var t=document.querySelectorAll(e),n=[],o=0;o{if(e.target!==i(t)&&(e.preventDefault(),e.stopPropagation()),n){const t={Detail:e.detail,ScreenX:e.screenX,ScreenY:e.screenY,ClientX:e.clientX,ClientY:e.clientY,OffsetX:e.offsetX,OffsetY:e.offsetY,PageX:e.pageX,PageY:e.pageY,Button:e.button,Buttons:e.buttons,CtrlKey:e.ctrlKey,ShiftKey:e.shiftKey,AltKey:e.altKey,MetaKey:e.metaKey,Type:e.type};n.invokeMethodAsync("Invoke",t)}};e.addEventListener("mousedown",r);const l={listener:r,handle:n},s=`registerTextFieldOnMouseDown_${o(e)}`;D[s]=[l]},unregisterTextFieldOnMouseDown:function(e){const t=`registerTextFieldOnMouseDown_${o(e)}`,n=D[t];n&&n.length&&n.forEach((t=>{t.handle.dispose(),e&&e.removeEventListener("mousedown",t.listener)}))},containsActiveElement:function(e){var t=i(e);return t&&t.contains?t.contains(document.activeElement):null},copyChild:function(e){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.setAttribute("contenteditable","true"),e.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.execCommand("unselect"),e.blur(),e.removeAttribute("contenteditable"))},copyText:function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)}));else{var t=document.createElement("textarea");t.value=e,t.readOnly=!0,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}},getMenuableDimensions:R,invokeMultipleMethod:function(e,t,n,o,r,i,l,s,a){var c={windowAndDocument:null,dimensions:null,zIndex:0};return c.windowAndDocument=q(e,t),c.dimensions=R(n,o,r,i,l,s),c.zIndex=$([i],a),c},registerOTPInputOnInputEvent:function(e,t){for(let n=0;nZ(o,n,e,t),r=t=>G(t,n,e),i=o=>V(o,n,e,t);e[n].addEventListener("input",o),e[n].addEventListener("focus",r),e[n].addEventListener("keyup",i),e[n]._optInput={inputListener:o,focusListener:r,keyupListener:i}}},unregisterOTPInputOnInputEvent:function(e){for(let t=0;ti.offsetTop-8?l.scrollTo({top:i.offsetTop-i.clientHeight,behavior:"smooth"}):s+a=r-n},get_top_domain:J,setCookie:function(e,t){if(null!=t){var n=J();n?isNaN(n[0])&&(n=`.${n}`):n="";var o=new Date;o.setTime(o.getTime()+2592e6),document.cookie=`${e}=${escape(null==t?void 0:t.toString())};path=/;expires=${o.toUTCString()};domain=${n}`}},getCookie:function(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n?unescape(n[2]):null},registerDragEvent:function(e,t){if(e){const n=o(e),r=e=>{if(t){const n=e.target.getAttribute(t);e.dataTransfer.setData(t,n),e.dataTransfer.setData("offsetX",e.offsetX.toString()),e.dataTransfer.setData("offsetY",e.offsetY.toString())}};D[`${n}:dragstart`]=[{listener:r}],e.addEventListener("dragstart",r)}},unregisterDragEvent:function(e){const t=o(e);if(t){const n=`${t}:dragstart`;D[n]&&D[n].forEach((t=>{e.removeEventListener("dragstart",t.listener)}))}},resizableDataTable:function(e){const t=e.querySelector("table"),n=t.querySelector(".m-data-table-header").getElementsByTagName("tr")[0],o=n?n.children:[];if(!o)return;t.style.overflow="hidden";const r=t.offsetHeight;for(var i=0;ie.stopPropagation())),n.addEventListener("mousedown",(function(e){i=e.target.parentElement,l=i.nextElementSibling,r=e.pageX,u=t.offsetWidth;var n=function(e){if("border-box"==s(e,"box-sizing"))return 0;var t=s(e,"padding-left"),n=s(e,"padding-right");return parseInt(t)+parseInt(n)}(i);a=i.offsetWidth-n,l&&(c=l.offsetWidth-n)})),document.addEventListener("mousemove",(function(n){if(i){let o=n.pageX-r;e.classList.contains("m-data-table--rtl")&&(o=0-o);let s=a+o;i.style.width=s+"px";if(e.classList.contains("m-data-table--resizable-overflow"))return void(t.style.width=u+o+"px");if(e.classList.contains("m-data-table--resizable-independent")){let e=c-o;const t=a+c;o>0?l&&e{const t=e.scrollWidth,n=e.clientWidth,o=e.scrollLeft,r=e.parentElement.classList.contains("m-data-table--rtl");Math.abs(t-((r?-o:o)+n))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolled-to-right")):Math.abs(o-(r?t-n:0))<1?(e.classList.remove("scrolling"),e.classList.remove("scrolled-to-right"),e.classList.add("scrolled-to-left")):(e.classList.remove("scrolled-to-right"),e.classList.remove("scrolled-to-left"),e.classList.add("scrolling"))};t(),e.addEventListener("scroll",t),e._m_table_scroll_event=t},unregisterTableScrollEvent:function(e){const t=e._m_table_scroll_event;t&&(e.removeEventListener("scroll",t),delete e._m_table_scroll_event)},updateTabSlider:function(e,t,n,o,r){if(!e)return void console.warn("[MTab] the element of slider wrapper is not found");if(!t)return void console.warn("[MTab] the element of tab to be activated is not found");const i=o?t.scrollHeight:n,l=o?0:t.offsetLeft,s=o?0:t.offsetLeft+t.offsetWidth,a=t.offsetTop,c=o?n:t.clientWidth;e.style.width=`${c}px`,e.style.height=`${i}px`,r||(e.style.left=`${l}px`),r&&(e.style.right=`${s}px`),o&&(e.style.top=`${a}px`)},isScrollNearBottom:function(e,t=200){return!!e&&e.scrollHeight-(e.scrollTop+e.clientHeight)= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export function addOnceEventListener (\r\n el: EventTarget,\r\n eventName: string,\r\n cb: (event: Event) => void,\r\n options: boolean | AddEventListenerOptions = false\r\n): void {\r\n const once = (event: Event) => {\r\n cb(event)\r\n el.removeEventListener(eventName, once, options)\r\n }\r\n\r\n el.addEventListener(eventName, once, options)\r\n}\r\n\r\nlet passiveSupported = false\r\ntry {\r\n if (typeof window !== 'undefined') {\r\n const testListenerOpts = Object.defineProperty({}, 'passive', {\r\n get: () => {\r\n passiveSupported = true\r\n },\r\n })\r\n\r\n window.addEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n window.removeEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n }\r\n} catch (e) { console.warn(e) } /* eslint-disable-line no-console */\r\nexport { passiveSupported }\r\n\r\nexport function addPassiveEventListener (\r\n el: EventTarget,\r\n event: string,\r\n cb: ((e: any) => void),\r\n options: {}\r\n): void {\r\n el.addEventListener(event, cb, passiveSupported ? options : false)\r\n}\r\n\r\nexport function getZIndex (el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\n// KeyboardEvent.keyCode aliases\r\nexport const keyCodes = Object.freeze({\r\n enter: 13,\r\n tab: 9,\r\n delete: 46,\r\n esc: 27,\r\n space: 32,\r\n up: 38,\r\n down: 40,\r\n left: 37,\r\n right: 39,\r\n end: 35,\r\n home: 36,\r\n del: 46,\r\n backspace: 8,\r\n insert: 45,\r\n pageup: 33,\r\n pagedown: 34,\r\n shift: 16,\r\n})\r\n\r\n/** Polyfill for Event.prototype.composedPath */\r\nexport function composedPath (e: Event): EventTarget[] {\r\n if (e.composedPath) return e.composedPath()\r\n\r\n const path = []\r\n let el = e.target as Element\r\n\r\n while (el) {\r\n path.push(el)\r\n\r\n if (el.tagName === 'HTML') {\r\n path.push(document)\r\n path.push(window)\r\n\r\n return path\r\n }\r\n\r\n el = el.parentElement!\r\n }\r\n return path\r\n}\r\n\r\nexport function getBlazorId(el) {\r\n if (!el) {\r\n return null;\r\n }\r\n let _bl_ = el.getAttributeNames().find(a => a.startsWith('_bl_'))\r\n if (_bl_) {\r\n _bl_ = _bl_.substring(4);\r\n }\r\n\r\n return _bl_;\r\n}\r\n\r\nexport function getElementSelector(el) {\r\n if (!(el instanceof Element))\r\n return;\r\n var path = [];\r\n while (el.nodeType === Node.ELEMENT_NODE) {\r\n var selector = el.nodeName.toLowerCase();\r\n if (el.id) {\r\n selector = '#' + el.id;\r\n path.unshift(selector);\r\n break;\r\n } else {\r\n var sib = el, nth = 1;\r\n while (sib = sib.previousElementSibling) {\r\n if (sib.nodeName.toLowerCase() == selector)\r\n nth++;\r\n }\r\n if (nth != 1)\r\n selector += \":nth-of-type(\" + nth + \")\";\r\n }\r\n path.unshift(selector);\r\n el = el.parentNode;\r\n }\r\n return path.join(\" > \");\r\n}\r\n\r\nexport function getEventTarget(target: HTMLElement | EventTarget) {\r\n const el = target as HTMLElement;\r\n const eventTarget: MbEventTarget = {};\r\n const elementReferenceId = el\r\n .getAttributeNames()\r\n .find((a) => a.startsWith(\"_bl_\"));\r\n if (elementReferenceId) {\r\n eventTarget.elementReferenceId = elementReferenceId;\r\n eventTarget.selector = `[${elementReferenceId}]`;\r\n } else {\r\n eventTarget.selector = getElementSelector(el);\r\n }\r\n\r\n eventTarget.class = el.getAttribute(\"class\");\r\n\r\n return eventTarget;\r\n}\r\n\r\nexport function getDom(elOrString: Element | string | undefined) {\r\n let element: HTMLElement;\r\n\r\n try {\r\n if (!elOrString) {\r\n element = document.body;\r\n } else if (typeof elOrString === \"string\") {\r\n if (elOrString === \"document\") {\r\n element = document.documentElement;\r\n } else if (elOrString.indexOf(\"__.__\") > 0) {\r\n // for example: el__.__parentElement\r\n let array = elOrString.split(\"__.__\");\r\n let i = 0;\r\n let el = document.querySelector(array[i++]);\r\n\r\n if (el) {\r\n while (array[i]) {\r\n el = el[array[i]];\r\n i++;\r\n }\r\n }\r\n\r\n if (el instanceof HTMLElement) {\r\n element = el;\r\n }\r\n } else {\r\n element = document.querySelector(elOrString);\r\n }\r\n } else {\r\n element = elOrString as HTMLElement;\r\n }\r\n\r\n } catch (error) {\r\n console.error(error)\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport const canUseDom = !!(\r\n typeof window !== 'undefined' &&\r\n typeof document !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n)\r\n\r\nexport function convertToUnit (str: number, unit?: string): string\r\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\r\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\r\n if (str == null || str === '') {\r\n return undefined\r\n } else if (isNaN(+str!)) {\r\n return String(str)\r\n } else if (!isFinite(+str!)) {\r\n return undefined\r\n } else {\r\n return `${Number(str)}${unit}`\r\n }\r\n}","// see https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Rendering/Events/EventTypes.ts\r\n// updated at 2022/08/31\r\n\r\nexport const touchEvents = [\r\n \"touchcancel\",\r\n \"touchend\",\r\n \"touchmove\",\r\n \"touchenter\",\r\n \"touchleave\",\r\n \"touchstart\",\r\n];\r\n\r\nexport function parseMouseEvent(event: MouseEvent): Blazor.MouseEventArgs {\r\n return {\r\n detail: event.detail,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n offsetX: event.offsetX,\r\n offsetY: event.offsetY,\r\n pageX: event.pageX,\r\n pageY: event.pageY,\r\n button: event.button,\r\n buttons: event.buttons,\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n } as Blazor.MouseEventArgs;\r\n}\r\n\r\nexport function parseTouchEvent(event: TouchEvent): Blazor.TouchEventArgs {\r\n return {\r\n detail: event.detail,\r\n touches: parseTouch(event.touches),\r\n targetTouches: parseTouch(event.targetTouches),\r\n changedTouches: parseTouch(event.changedTouches),\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n };\r\n}\r\n\r\nfunction parseTouch(touchList: TouchList): Blazor.TouchPoint[] {\r\n const touches: Blazor.TouchPoint[] = [];\r\n\r\n for (let i = 0; i < touchList.length; i++) {\r\n const touch = touchList[i];\r\n touches.push({\r\n identifier: touch.identifier,\r\n clientX: touch.clientX,\r\n clientY: touch.clientY,\r\n screenX: touch.screenX,\r\n screenY: touch.screenY,\r\n pageX: touch.pageX,\r\n pageY: touch.pageY,\r\n });\r\n }\r\n return touches;\r\n}\r\n\r\nexport function parseChangeEvent(event: Event): Blazor.ChangeEventArgs {\r\n const element = event.target as Element;\r\n if (isTimeBasedInput(element)) {\r\n const normalizedValue = normalizeTimeBasedValue(element);\r\n return { value: normalizedValue };\r\n } else if (isMultipleSelectInput(element)) {\r\n const selectElement = element as HTMLSelectElement;\r\n const selectedValues = Array.from(selectElement.options)\r\n .filter((option) => option.selected)\r\n .map((option) => option.value);\r\n return { value: selectedValues };\r\n } else {\r\n const targetIsCheckbox = isCheckbox(element);\r\n const newValue = targetIsCheckbox ? !!element[\"checked\"] : element[\"value\"];\r\n return { value: newValue };\r\n }\r\n}\r\n\r\nexport function parseDragEvent(event: DragEvent): Blazor.DragEventArgs {\r\n return {\r\n ...parseMouseEvent(event),\r\n dataTransfer: event.dataTransfer ? {\r\n dropEffect: event.dataTransfer.dropEffect,\r\n effectAllowed: event.dataTransfer.effectAllowed,\r\n files: Array.from(event.dataTransfer.files).map(f => f.name),\r\n items: Array.from(event.dataTransfer.items).map(i => ({ kind: i.kind, type: i.type })),\r\n types: event.dataTransfer.types\r\n } : null,\r\n };\r\n}\r\n\r\nfunction isTimeBasedInput(element: Element): element is HTMLInputElement {\r\n return timeBasedInputs.indexOf(element.getAttribute(\"type\")!) !== -1;\r\n}\r\n\r\nconst timeBasedInputs = [\"date\", \"datetime-local\", \"month\", \"time\", \"week\"];\r\n\r\nfunction normalizeTimeBasedValue(element: HTMLInputElement): string {\r\n const value = element.value;\r\n const type = element.type;\r\n switch (type) {\r\n case \"date\":\r\n case \"month\":\r\n return value;\r\n case \"datetime-local\":\r\n return value.length === 16 ? value + \":00\" : value; // Convert yyyy-MM-ddTHH:mm to yyyy-MM-ddTHH:mm:00\r\n case \"time\":\r\n return value.length === 5 ? value + \":00\" : value; // Convert hh:mm to hh:mm:00\r\n case \"week\":\r\n // For now we are not going to normalize input type week as it is not trivial\r\n return value;\r\n }\r\n\r\n throw new Error(`Invalid element type '${type}'.`);\r\n}\r\n\r\nfunction isMultipleSelectInput(element: Element): element is HTMLSelectElement {\r\n return (\r\n element instanceof HTMLSelectElement && element.type === \"select-multiple\"\r\n );\r\n}\r\n\r\nfunction isCheckbox(element: Element | null): boolean {\r\n return (\r\n !!element &&\r\n element.tagName === \"INPUT\" &&\r\n element.getAttribute(\"type\") === \"checkbox\"\r\n );\r\n}\r\n","import { getEventTarget } from \"../utils/helper\";\r\nimport { parseDragEvent, parseMouseEvent, parseTouchEvent } from \"./EventType\";\r\n\r\nexport function registerExtraMouseEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"mouse\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraTouchEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"touch\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraDropEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: (e: DragEvent) => {\r\n const eventArgs = parseDragEvent(e);\r\n const value = e.dataTransfer.getData('data-value');\r\n const offsetX = e.dataTransfer.getData('offsetX');\r\n const offsetY = e.dataTransfer.getData('offsetY');\r\n\r\n eventArgs.dataTransfer['data'] = {\r\n value,\r\n offsetX: Number(offsetX),\r\n offsetY: Number(offsetY)\r\n }\r\n\r\n return eventArgs;\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function createSharedEventArgs(type: \"mouse\" | \"touch\", e: Event,) {\r\n let args = { target: {} }\r\n if (type === 'mouse') {\r\n args = {\r\n ...args,\r\n ...parseMouseEvent(e as MouseEvent)\r\n }\r\n } else if (type === 'touch') {\r\n args = {\r\n ...args,\r\n ...parseTouchEvent(e as TouchEvent)\r\n }\r\n }\r\n\r\n args.target = getEventTarget(e.target);\r\n\r\n return args;\r\n}","import { createSharedEventArgs } from \"events/extra\";\r\nimport { addOnceEventListener, passiveSupported } from \"utils/helper\";\r\n\r\nlet sliderHandleId = 0;\r\nconst sliderHandlesById = {};\r\n\r\nexport function registerSliderEvents(\r\n el: HTMLElement,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n sliderHandlesById[sliderHandleId] = onSliderMouseDown;\r\n\r\n const app = document.querySelector(\"[data-app]\");\r\n\r\n const mouseUpOptions = passiveSupported\r\n ? { passive: true, capture: true }\r\n : true;\r\n\r\n const mouseMoveOptions = passiveSupported ? { passive: true } : false;\r\n\r\n el.addEventListener(\"mousedown\", onSliderMouseDown);\r\n el.addEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n return sliderHandleId++;\r\n\r\n async function onSliderMouseDown(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n\r\n onMouseMove(e);\r\n\r\n app.addEventListener(\r\n isTouchEvent ? \"touchmove\" : \"mousemove\",\r\n onMouseMove,\r\n mouseMoveOptions\r\n );\r\n addOnceEventListener(\r\n app,\r\n isTouchEvent ? \"touchend\" : \"mouseup\",\r\n onSliderMouseUp,\r\n mouseUpOptions\r\n );\r\n\r\n if (isTouchEvent) {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnTouchStartInternal\",\r\n createSharedEventArgs(\"touch\", e)\r\n );\r\n } else {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnMouseDownInternal\",\r\n createSharedEventArgs(\"mouse\", e)\r\n );\r\n }\r\n }\r\n\r\n async function onSliderMouseUp(e: Event) {\r\n e.stopPropagation();\r\n\r\n app.removeEventListener(\"touchmove\", onMouseMove, mouseMoveOptions as any);\r\n app.removeEventListener(\"mousemove\", onMouseMove, mouseMoveOptions as any);\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseUpInternal\");\r\n }\r\n\r\n async function onMouseMove(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n const payload = {\r\n type: e.type,\r\n clientX: isTouchEvent ? e.touches[0].clientX : e.clientX,\r\n clientY: isTouchEvent ? e.touches[0].clientY : e.clientY,\r\n };\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseMoveInternal\", payload);\r\n }\r\n}\r\n\r\nexport function unregisterSliderEvents(el: HTMLElement, id: number) {\r\n if (el) {\r\n const onSliderMouseDown = sliderHandlesById[id];\r\n el.removeEventListener(\"mousedown\", onSliderMouseDown);\r\n el.removeEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n delete sliderHandlesById[id];\r\n }\r\n}\r\n","\r\nlet textareaAutoGrowNextId = 0;\r\nconst textareaAutoGrowMap: {\r\n [prop: string]: (e: HTMLElementEventMap['input']) => void;\r\n} = {}\r\n\r\nexport function registerTextareaAutoGrowEvent(input: HTMLElement) {\r\n const id = textareaAutoGrowNextId;\r\n const inputCallback = (e: HTMLElementEventMap['input']) => {\r\n const target = e.target as HTMLTextAreaElement;\r\n const autoGrow = target.getAttribute('data-auto-grow');\r\n if (autoGrow === undefined) {\r\n return;\r\n }\r\n const rows = target.getAttribute('rows');\r\n const rowHeight = target.getAttribute('data-row-height');\r\n calculateTextareaHeight(target, rows, rowHeight)\r\n };\r\n\r\n textareaAutoGrowMap[id] = inputCallback;\r\n\r\n input.addEventListener('input', inputCallback)\r\n\r\n return textareaAutoGrowNextId++;\r\n}\r\n\r\nexport function unregisterTextareaAutoGrowEvent(input: HTMLElement, textareaAutoGrowNextId: number) {\r\n if (!input) return;\r\n const inputCallback = textareaAutoGrowMap[textareaAutoGrowNextId];\r\n if (inputCallback) {\r\n input.removeEventListener('input', inputCallback);\r\n }\r\n}\r\n\r\nexport function calculateTextareaHeight(textarea: HTMLTextAreaElement, rows: string, rowHeight: string) {\r\n textarea.style.height = '0'\r\n const height = textarea.scrollHeight;\r\n const minHeight = parseInt(rows, 10) * parseFloat(rowHeight);\r\n textarea.style.height = Math.max(height, minHeight) + 'px';\r\n}","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import { parseMouseEvent } from \"./EventType\";\r\nimport { registerExtraDropEvent, registerExtraMouseEvent, registerExtraTouchEvent } from \"./extra\";\r\n\r\nexport function registerExtraEvents() {\r\n registerExtraMouseEvent(\"exmousedown\", \"mousedown\");\r\n registerExtraMouseEvent(\"exmouseup\", \"mouseup\");\r\n registerExtraMouseEvent(\"exclick\", \"click\");\r\n registerExtraMouseEvent(\"exmouseleave\", \"mouseleave\");\r\n registerExtraMouseEvent(\"exmouseenter\", \"mouseenter\");\r\n registerExtraMouseEvent(\"exmousemove\", \"mousemove\");\r\n registerExtraTouchEvent(\"extouchstart\", \"touchstart\");\r\n registerEvent(\"transitionend\", \"transitionend\");\r\n registerExtraDropEvent(\"exdrop\", \"drop\");\r\n registerAuxclickEvent();\r\n}\r\n\r\nfunction registerEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n });\r\n }\r\n}\r\n\r\nfunction registerAuxclickEvent() {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(\"auxclick\", {\r\n browserEventName: \"auxclick\",\r\n createEventArgs: parseMouseEvent\r\n });\r\n }\r\n}\r\n","import { keyCodes } from \"utils/helper\";\r\n\r\ntype RippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & {\r\n rippleStop?: boolean;\r\n};\r\n\r\nconst DELAY_RIPPLE = 80;\r\n\r\nfunction transform(el: HTMLElement, value: string) {\r\n el.style.transform = value;\r\n el.style.webkitTransform = value;\r\n}\r\n\r\nexport interface RippleOptions {\r\n class?: string;\r\n center?: boolean;\r\n circle?: boolean;\r\n}\r\n\r\nfunction isTouchEvent(e: RippleEvent): e is TouchEvent {\r\n return e.constructor.name === \"TouchEvent\";\r\n}\r\n\r\nfunction isKeyboardEvent(e: RippleEvent): e is KeyboardEvent {\r\n return e.constructor.name === \"KeyboardEvent\";\r\n}\r\n\r\nconst calculate = (\r\n e: RippleEvent,\r\n el: HTMLElement,\r\n value: RippleOptions = {}\r\n) => {\r\n let localX = 0;\r\n let localY = 0;\r\n\r\n if (!isKeyboardEvent(e)) {\r\n const offset = el.getBoundingClientRect();\r\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\r\n\r\n localX = target.clientX - offset.left;\r\n localY = target.clientY - offset.top;\r\n }\r\n\r\n let radius = 0;\r\n let scale = 0.3;\r\n if (el._ripple && el._ripple.circle) {\r\n scale = 0.15;\r\n radius = el.clientWidth / 2;\r\n radius = value.center\r\n ? radius\r\n : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\r\n } else {\r\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\r\n }\r\n\r\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\r\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\r\n\r\n const x = value.center ? centerX : `${localX - radius}px`;\r\n const y = value.center ? centerY : `${localY - radius}px`;\r\n\r\n return { radius, scale, x, y, centerX, centerY };\r\n};\r\n\r\nconst ripples = {\r\n /* eslint-disable max-statements */\r\n show(e: RippleEvent, el: HTMLElement, value: RippleOptions = {}) {\r\n if (!el._ripple || !el._ripple.enabled) {\r\n return;\r\n }\r\n\r\n const container = document.createElement(\"span\");\r\n const animation = document.createElement(\"span\");\r\n\r\n container.appendChild(animation);\r\n container.className = \"m-ripple__container\";\r\n\r\n if (value.class) {\r\n container.className += ` ${value.class}`;\r\n }\r\n\r\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);\r\n\r\n const size = `${radius * 2}px`;\r\n animation.className = \"m-ripple__animation\";\r\n animation.style.width = size;\r\n animation.style.height = size;\r\n\r\n el.appendChild(container);\r\n\r\n const computed = window.getComputedStyle(el);\r\n if (computed && computed.position === \"static\") {\r\n el.style.position = \"relative\";\r\n el.dataset.previousPosition = \"static\";\r\n }\r\n\r\n animation.classList.add(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--visible\");\r\n transform(\r\n animation,\r\n `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`\r\n );\r\n animation.dataset.activated = String(performance.now());\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--in\");\r\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\r\n }, 0);\r\n },\r\n\r\n hide(el: HTMLElement | null) {\r\n if (!el || !el._ripple || !el._ripple.enabled) return;\r\n\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n\r\n if (ripples.length === 0) return;\r\n const animation = ripples[ripples.length - 1];\r\n\r\n if (animation.dataset.isHiding) return;\r\n else animation.dataset.isHiding = \"true\";\r\n\r\n const diff = performance.now() - Number(animation.dataset.activated);\r\n const delay = Math.max(250 - diff, 0);\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--in\");\r\n animation.classList.add(\"m-ripple__animation--out\");\r\n\r\n setTimeout(() => {\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n if (ripples.length === 1 && el.dataset.previousPosition) {\r\n el.style.position = el.dataset.previousPosition;\r\n delete el.dataset.previousPosition;\r\n }\r\n\r\n if (animation.parentNode?.parentNode === el)\r\n el.removeChild(animation.parentNode);\r\n }, 300);\r\n }, delay);\r\n },\r\n};\r\n\r\nfunction rippleShow(e: RippleEvent) {\r\n const value: RippleOptions = {};\r\n const element = e.currentTarget as HTMLElement;\r\n\r\n if (!element || !element._ripple || element._ripple.touched || e.rippleStop)\r\n return;\r\n\r\n // Don't allow the event to trigger ripples on any other elements\r\n e.rippleStop = true;\r\n\r\n if (isTouchEvent(e)) {\r\n element._ripple.touched = true;\r\n element._ripple.isTouch = true;\r\n } else {\r\n // It's possible for touch events to fire\r\n // as mouse events on Android/iOS, this\r\n // will skip the event call if it has\r\n // already been registered as touch\r\n if (element._ripple.isTouch) return;\r\n }\r\n value.center = element._ripple.centered || isKeyboardEvent(e);\r\n if (element._ripple.class) {\r\n value.class = element._ripple.class;\r\n }\r\n\r\n if (isTouchEvent(e)) {\r\n // already queued that shows or hides the ripple\r\n if (element._ripple.showTimerCommit) return;\r\n\r\n element._ripple.showTimerCommit = () => {\r\n ripples.show(e, element, value);\r\n };\r\n element._ripple.showTimer = window.setTimeout(() => {\r\n if (element && element._ripple && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n }\r\n }, DELAY_RIPPLE);\r\n } else {\r\n ripples.show(e, element, value);\r\n }\r\n}\r\n\r\nfunction rippleHide(e: Event) {\r\n const element = e.currentTarget as HTMLElement | null;\r\n if (!element || !element._ripple) return;\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n\r\n // The touch interaction occurs before the show timer is triggered.\r\n // We still want to show ripple effect.\r\n if (e.type === \"touchend\" && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n\r\n // re-queue ripple hiding\r\n var timerHandler: TimerHandler = () => rippleHide(e);\r\n element._ripple.showTimer = setTimeout(timerHandler);\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (element._ripple) {\r\n element._ripple.touched = false;\r\n }\r\n });\r\n ripples.hide(element);\r\n}\r\n\r\nfunction rippleCancelShow(e: MouseEvent | TouchEvent) {\r\n const element = e.currentTarget as HTMLElement | undefined;\r\n\r\n if (!element || !element._ripple) return;\r\n\r\n if (element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit = null;\r\n }\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n}\r\n\r\nfunction keyboardRippleShow(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (\r\n !target[\"keyboardRipple\"] &&\r\n (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)\r\n ) {\r\n target[\"keyboardRipple\"] = true;\r\n rippleShow(e);\r\n }\r\n}\r\n\r\nfunction keyboardRippleHide(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n}\r\n\r\nfunction focusRippleHide(e: FocusEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (target[\"keyboardRipple\"] === true) {\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n }\r\n}\r\nexport function updateRipple(\r\n el: HTMLElement,\r\n options: RippleOptions | null,\r\n wasEnabled: boolean\r\n) {\r\n let enabled = false;\r\n if (options) {\r\n enabled = true;\r\n } else {\r\n ripples.hide(el);\r\n }\r\n\r\n const value = options || {};\r\n el._ripple = el._ripple || {};\r\n el._ripple.enabled = enabled;\r\n el._ripple = {\r\n ...el._ripple,\r\n centered: value.center,\r\n class: value.class,\r\n circle: value.circle,\r\n };\r\n\r\n if (enabled && !wasEnabled) {\r\n el.addEventListener(\"touchstart\", rippleShow, { passive: true });\r\n el.addEventListener(\"touchend\", rippleHide, { passive: true });\r\n el.addEventListener(\"touchmove\", rippleCancelShow, { passive: true });\r\n el.addEventListener(\"touchcancel\", rippleHide);\r\n\r\n el.addEventListener(\"mousedown\", rippleShow);\r\n el.addEventListener(\"mouseup\", rippleHide);\r\n el.addEventListener(\"mouseleave\", rippleHide);\r\n\r\n el.addEventListener(\"keydown\", keyboardRippleShow);\r\n el.addEventListener(\"keyup\", keyboardRippleHide);\r\n\r\n el.addEventListener(\"blur\", focusRippleHide);\r\n\r\n // Anchor tags can be dragged, causes other hides to fail - #1537\r\n el.addEventListener(\"dragstart\", rippleHide, { passive: true });\r\n } else if (!enabled && wasEnabled) {\r\n removeListeners(el);\r\n }\r\n}\r\n\r\nexport function removeListeners(el: HTMLElement) {\r\n el.removeEventListener(\"mousedown\", rippleShow);\r\n el.removeEventListener(\"touchstart\", rippleShow);\r\n el.removeEventListener(\"touchend\", rippleHide);\r\n el.removeEventListener(\"touchmove\", rippleCancelShow);\r\n el.removeEventListener(\"touchcancel\", rippleHide);\r\n el.removeEventListener(\"mouseup\", rippleHide);\r\n el.removeEventListener(\"mouseleave\", rippleHide);\r\n el.removeEventListener(\"keydown\", keyboardRippleShow);\r\n el.removeEventListener(\"keyup\", keyboardRippleHide);\r\n el.removeEventListener(\"dragstart\", rippleHide);\r\n el.removeEventListener(\"blur\", focusRippleHide);\r\n el._ripple.enabled = false;\r\n}\r\n","import debounceIt from \"just-debounce-it\";\r\nimport throttle from \"just-throttle\";\r\n\r\nimport { parseDragEvent, parseTouchEvent, touchEvents } from \"./events/EventType\";\r\nimport { registerExtraEvents } from \"./events/index\";\r\nimport registerRippleObserver from \"./ripple\";\r\nimport { canUseDom, getBlazorId, getDom, getElementSelector } from \"./utils/helper\";\r\n\r\nwindow.onload = function () {\r\n registerExtraEvents();\r\n registerPasteWithData(\"pastewithdata\")\r\n registerRippleObserver();\r\n}\r\n\r\nexport function getZIndex(el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\nexport function getDomInfo(element, selector = \"body\") {\r\n var result = {};\r\n\r\n var dom = getDom(element);\r\n\r\n if (dom) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n // clone and set display not none because\r\n // element with display:none can not get the dom info\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n dom.parentElement.appendChild(cloned);\r\n\r\n result = getDomInfoObj(cloned);\r\n\r\n dom.parentElement.removeChild(cloned);\r\n } else {\r\n result = getDomInfoObj(dom);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction getDomInfoObj(dom: HTMLElement) {\r\n var result = {};\r\n result[\"offsetTop\"] = dom.offsetTop || 0;\r\n result[\"offsetLeft\"] = dom.offsetLeft || 0;\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n result[\"scrollWidth\"] = dom.scrollWidth || 0;\r\n result[\"scrollLeft\"] = dom.scrollLeft || 0;\r\n result[\"scrollTop\"] = dom.scrollTop || 0;\r\n result[\"clientTop\"] = dom.clientTop || 0;\r\n result[\"clientLeft\"] = dom.clientLeft || 0;\r\n result[\"clientHeight\"] = dom.clientHeight || 0;\r\n result[\"clientWidth\"] = dom.clientWidth || 0;\r\n var position = getElementPos(dom);\r\n result[\"offsetWidth\"] = Math.round(position.offsetWidth) || 0;\r\n result[\"offsetHeight\"] = Math.round(position.offsetHeight) || 0;\r\n result[\"relativeTop\"] = Math.round(position.relativeTop) || 0;\r\n result[\"relativeBottom\"] = Math.round(position.relativeBottom) || 0;\r\n result[\"relativeLeft\"] = Math.round(position.relativeLeft) || 0;\r\n result[\"relativeRight\"] = Math.round(position.relativeRight) || 0;\r\n result[\"absoluteLeft\"] = Math.round(position.absoluteLeft) || 0;\r\n result[\"absoluteTop\"] = Math.round(position.absoluteTop) || 0;\r\n return result;\r\n}\r\n\r\nfunction getElementPos(element) {\r\n var res: any = new Object();\r\n res.x = 0;\r\n res.y = 0;\r\n if (element !== null) {\r\n if (element.getBoundingClientRect) {\r\n var viewportElement = document.documentElement;\r\n var box = element.getBoundingClientRect();\r\n var scrollLeft = viewportElement.scrollLeft;\r\n var scrollTop = viewportElement.scrollTop;\r\n\r\n res.offsetWidth = box.width;\r\n res.offsetHeight = box.height;\r\n res.relativeTop = box.top;\r\n res.relativeBottom = box.bottom;\r\n res.relativeLeft = box.left;\r\n res.relativeRight = box.right;\r\n res.absoluteLeft = box.left + scrollLeft;\r\n res.absoluteTop = box.top + scrollTop;\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nexport function getParentClientWidthOrWindowInnerWidth(element: HTMLElement) {\r\n return element.parentElement ? element.parentElement.clientWidth : window.innerWidth;\r\n}\r\n\r\nexport function triggerEvent(elOrString, eventName: string, eventType: string, stopPropagation: boolean) {\r\n var dom = getDom(elOrString);\r\n var evt = document.createEvent(eventName);\r\n evt.initEvent(eventType);\r\n\r\n if (stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n return dom.dispatchEvent(evt);\r\n}\r\n\r\nexport function setProperty(elOrString, name, value) {\r\n var dom = getDom(elOrString);\r\n dom[name] = value;\r\n}\r\n\r\nexport function getBoundingClientRect(elOrString, attach = \"body\") {\r\n let dom = getDom(elOrString);\r\n\r\n var result = {};\r\n\r\n if (dom && dom.getBoundingClientRect) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n document.querySelector(attach)?.appendChild(cloned);\r\n\r\n result = cloned.getBoundingClientRect();\r\n\r\n document.querySelector(attach)?.removeChild(cloned);\r\n } else {\r\n result = dom.getBoundingClientRect();\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvar htmlElementEventListenerConfigs: { [prop: string]: HtmlElementEventListenerConfig[] } = {}\r\n\r\ntype HtmlElementEventListenerConfig = {\r\n listener?: (args: any) => void;\r\n options?: any;\r\n handle?: DotNet.DotNetObject;\r\n}\r\n\r\nexport function addHtmlElementEventListener(\r\n selector: \"window\" | \"document\" | K,\r\n type: string,\r\n invoker: DotNet.DotNetObject,\r\n options?: boolean | AddEventListenerOptions,\r\n extras?: Partial> & { relatedTarget?: string, throttle?: number, debounce?: number, key?: string }) {\r\n let htmlElement: HTMLElement | Window\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n if (!htmlElement) {\r\n // throw new Error(\"Unable to find the element.\");\r\n return false;\r\n }\r\n\r\n var key = extras?.key || `${selector}:${type}`;\r\n\r\n //save for remove\r\n const config: HtmlElementEventListenerConfig = {};\r\n\r\n var listener = (e: any): void => {\r\n if (extras?.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n\r\n if ((typeof e.cancelable !== \"boolean\" || e.cancelable) && extras?.preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // mouseleave relatedTarget\r\n if (extras?.relatedTarget && document.querySelector(extras.relatedTarget)?.contains(e.relatedTarget)) {\r\n return;\r\n }\r\n\r\n let obj: any = {}\r\n\r\n if (touchEvents.includes(e.type)) {\r\n obj = parseTouchEvent(e)\r\n } else {\r\n for (var k in e) {\r\n if (typeof e[k] == 'string' || typeof e[k] == 'number') {\r\n obj[k] = e[k];\r\n }\r\n }\r\n }\r\n\r\n if (e.target && e.target !== window && e.target !== document) {\r\n obj.target = {}\r\n const target = e.target as HTMLElement;\r\n const elementReferenceId = target.getAttributeNames().find(a => a.startsWith('_bl_'));\r\n if (elementReferenceId) {\r\n obj.target['elementReferenceId'] = elementReferenceId\r\n obj.target['selector'] = `[${elementReferenceId}]`\r\n } else {\r\n obj.target['selector'] = getElementSelector(target)\r\n }\r\n\r\n obj.target['class'] = target.getAttribute('class')\r\n }\r\n\r\n invoker.invokeMethodAsync('Invoke', obj);\r\n };\r\n\r\n if (extras?.debounce && extras.debounce > 0) {\r\n config.listener = debounceIt(listener, extras.debounce)\r\n } else if (extras?.throttle && extras.throttle > 0) {\r\n config.listener = throttle(listener, extras.throttle, { trailing: true })\r\n } else {\r\n config.listener = listener;\r\n }\r\n\r\n config.options = options;\r\n config.handle = invoker\r\n\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].push(config);\r\n } else {\r\n htmlElementEventListenerConfigs[key] = [config]\r\n }\r\n\r\n htmlElement.addEventListener(type, config.listener, config.options);\r\n\r\n return true;\r\n}\r\n\r\nexport function removeHtmlElementEventListener(selector, type, k?: string) {\r\n let htmlElement: any\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var k = k || `${selector}:${type}`;\r\n\r\n var configs = htmlElementEventListenerConfigs[k];\r\n\r\n if (configs) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n htmlElement?.removeEventListener(type, item.listener, item.options);\r\n });\r\n\r\n htmlElementEventListenerConfigs[k] = []\r\n }\r\n}\r\n\r\nexport function addMouseleaveEventListener(selector) {\r\n var htmlElement = document.querySelector(selector);\r\n if (htmlElement) {\r\n htmlElement.addEventListener()\r\n }\r\n}\r\n\r\nexport function contains(e1, e2) {\r\n const dom1 = getDom(e1);\r\n if (dom1 && dom1.contains) {\r\n return dom1.contains(getDom(e2));\r\n }\r\n return false;\r\n}\r\n\r\nexport function equalsOrContains(e1: any, e2: any) {\r\n const dom1 = getDom(e1);\r\n const dom2 = getDom(e2);\r\n return !!dom1 && dom1.contains && !!dom2 && (dom1 == dom2 || dom1.contains(dom2));\r\n}\r\n\r\nfunction fallbackCopyTextToClipboard(text) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n}\r\n\r\nexport function copy(text) {\r\n if (!navigator.clipboard) {\r\n fallbackCopyTextToClipboard(text);\r\n return;\r\n }\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function focus(elOrString, preventScroll: boolean = false) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLElement)) {\r\n console.error(\"Unable to focus an invalid element\");\r\n } else {\r\n dom.focus({ preventScroll });\r\n }\r\n}\r\n\r\nexport function select(elOrString) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement))\r\n throw new Error(\"Unable to select an invalid element\")\r\n dom.select()\r\n}\r\n\r\nexport function hasFocus(selector) {\r\n let dom = getDom(selector);\r\n return (document.activeElement === dom);\r\n}\r\n\r\nexport function blur(selector) {\r\n let dom = getDom(selector);\r\n dom.blur();\r\n}\r\n\r\nexport function log(text) {\r\n console.log(text);\r\n}\r\n\r\nexport function scrollIntoView(target, arg?: boolean | ScrollIntoViewOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n if (arg === null || arg == undefined) {\r\n dom.scrollIntoView();\r\n } else if (typeof arg === 'boolean') {\r\n dom.scrollIntoView(arg);\r\n } else {\r\n dom.scrollIntoView({\r\n block: arg.block == null ? undefined : arg.block,\r\n inline: arg.inline == null ? undefined : arg.inline,\r\n behavior: arg.behavior\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport function scrollIntoParentView(\r\n target,\r\n inline = false,\r\n start = false,\r\n level = 1,\r\n behavior: ScrollBehavior = \"smooth\",\r\n) {\r\n const dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n let parent: HTMLElement = dom;\r\n while (level > 0) {\r\n parent = parent.parentElement;\r\n level--;\r\n if (!parent) {\r\n return;\r\n }\r\n }\r\n\r\n const options: ScrollToOptions = {\r\n behavior,\r\n };\r\n\r\n if (inline) {\r\n if (start) {\r\n options.left = dom.offsetLeft\r\n } else {\r\n const to = dom.offsetLeft - parent.offsetLeft;\r\n if (to - parent.scrollLeft < 0) {\r\n options.left = to;\r\n } else if (\r\n to + dom.offsetWidth - parent.scrollLeft >\r\n parent.offsetWidth\r\n ) {\r\n options.left = to + dom.offsetWidth - parent.offsetWidth;\r\n }\r\n }\r\n } else {\r\n if (start) {\r\n options.top = dom.offsetTop;\r\n } else {\r\n const to = dom.offsetTop - parent.offsetTop;\r\n if (to - parent.scrollTop < 0) {\r\n options.top = to;\r\n } else if (\r\n to + dom.offsetHeight - parent.scrollTop >\r\n parent.offsetHeight\r\n ) {\r\n options.top = to + dom.offsetHeight - parent.offsetHeight;\r\n }\r\n }\r\n }\r\n\r\n if (options.left || options.top) {\r\n parent.scrollTo(options);\r\n }\r\n }\r\n}\r\n\r\nexport function scrollTo(target, options: ScrollToOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n const o = {\r\n left: options.left === null ? undefined : options.left,\r\n top: options.top === null ? undefined : options.top,\r\n behavior: options.behavior\r\n }\r\n dom.scrollTo(o)\r\n }\r\n}\r\n\r\nexport function scrollToTarget(\r\n target: string,\r\n container: string = null,\r\n offset: number = 0\r\n) {\r\n const targetEl: HTMLElement = document.querySelector(target);\r\n if (targetEl) {\r\n let top ;\r\n if (container) {\r\n top = targetEl.offsetTop;\r\n } else {\r\n top = targetEl.getBoundingClientRect().top + window.scrollY;\r\n }\r\n const containerEl = container\r\n ? document.querySelector(container)\r\n : document.documentElement\r\n containerEl.scrollTo({\r\n top: top - offset,\r\n behavior: \"smooth\",\r\n });\r\n }\r\n}\r\n\r\nexport function scrollToElement(target, offset: number, behavior?: ScrollBehavior) {\r\n const dom = getDom(target)\r\n if (!dom) return;\r\n const domPosition = dom.getBoundingClientRect().top;\r\n const offsetPosition = domPosition + window.pageYOffset - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: behavior\r\n })\r\n}\r\n\r\nexport function scrollToActiveElement(\r\n container,\r\n element = \".active\",\r\n position: \"center\" | number = \"center\"\r\n) {\r\n let containerEl: HTMLElement = getDom(container);\r\n\r\n let activeEl: HTMLElement\r\n if (typeof element === 'string') {\r\n activeEl = container.querySelector(element)\r\n }\r\n\r\n if (!containerEl || !activeEl) {\r\n return;\r\n }\r\n\r\n if (position === 'center') {\r\n containerEl.scrollTop = activeEl.offsetTop - containerEl.offsetHeight / 2 + activeEl.offsetHeight / 2;\r\n }\r\n else {\r\n containerEl.scrollTop = activeEl.offsetTop - position\r\n }\r\n}\r\n\r\nexport function addClsToFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeClsFromFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.remove(className);\r\n }\r\n}\r\n\r\nexport function getAbsoluteTop(e) {\r\n var offset = e.offsetTop;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteTop(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function getAbsoluteLeft(e) {\r\n var offset = e.offsetLeft;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteLeft(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function addElementToBody(element) {\r\n document.body.appendChild(element);\r\n}\r\n\r\nexport function delElementFromBody(element) {\r\n document.body.removeChild(element);\r\n}\r\n\r\nexport function addElementTo(addElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && addElement) {\r\n parent.appendChild(addElement);\r\n }\r\n}\r\n\r\nexport function delElementFrom(delElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && delElement) {\r\n parent.removeChild(delElement);\r\n }\r\n}\r\n\r\nexport function getActiveElement() {\r\n let element = document.activeElement;\r\n let id = element.getAttribute(\"id\") || \"\";\r\n return id;\r\n}\r\n\r\nexport function focusDialog(selector: string, count: number = 0) {\r\n let ele = document.querySelector(selector);\r\n if (ele && !ele.hasAttribute(\"disabled\")) {\r\n setTimeout(() => {\r\n ele.focus();\r\n let curId = \"#\" + getActiveElement();\r\n if (curId !== selector) {\r\n if (count < 10) {\r\n focusDialog(selector, count + 1);\r\n }\r\n }\r\n }, 10);\r\n }\r\n}\r\n\r\nexport function getWindow() {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n pageXOffset: window.pageXOffset,\r\n pageYOffset: window.pageYOffset,\r\n isTop: window.scrollY == 0,\r\n isBottom: (window.scrollY + window.innerHeight) == document.body.clientHeight\r\n };\r\n}\r\n\r\nexport function getWindowAndDocumentProps(windowProps: string[] = [], documentProps: string[] = []) {\r\n const obj = {}\r\n\r\n if (windowProps) {\r\n windowProps.forEach(prop => obj[prop] = window[prop]);\r\n obj['pageYOffset'] = getPageYOffset();\r\n }\r\n\r\n if (documentProps) {\r\n documentProps.forEach(prop => obj[prop] = document.documentElement[prop]);\r\n }\r\n\r\n return obj\r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n var timeout;\r\n return () => {\r\n const context = this, args = arguments;\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func.apply(this, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n};\r\n\r\nexport function css(element: any, name: string | object, value: string | null = null) {\r\n var dom = getDom(element);\r\n if (typeof name === 'string') {\r\n dom.style[name] = value;\r\n } else {\r\n for (let key in name) {\r\n if (name.hasOwnProperty(key)) {\r\n dom.style[key] = name[key];\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function addCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.add(clsName);\r\n } else {\r\n element.classList.add(...clsName);\r\n }\r\n}\r\n\r\nexport function removeCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.remove(clsName);\r\n } else {\r\n element.classList.remove(...clsName);\r\n }\r\n}\r\n\r\nexport function elementScrollIntoView(selector: Element | string) {\r\n let element = getDom(selector);\r\n\r\n if (!element)\r\n return;\r\n\r\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n}\r\n\r\nconst hasScrollbar = () => {\r\n let overflow = document.body.style.overflow;\r\n if (overflow && overflow === \"hidden\") return false;\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\nexport function getScroll() {\r\n return { x: window.pageXOffset, y: window.pageYOffset };\r\n}\r\n\r\nfunction isElement(node: Element) {\r\n const ELEMENT_NODE_TYPE = 1;\r\n return (\r\n node.tagName !== \"HTML\" &&\r\n node.tagName !== \"BODY\" &&\r\n node.nodeType == ELEMENT_NODE_TYPE\r\n )\r\n}\r\n\r\nexport function getScrollParent(el: Element | undefined, root: HTMLElement | Window | undefined = undefined) {\r\n root ??= canUseDom ? window : undefined;\r\n\r\n let node = el;\r\n while (node && node !== root && isElement(node)) {\r\n const { overflowY } = window.getComputedStyle(node);\r\n if (/scroll|auto|overlay/i.test(overflowY)) {\r\n return node;\r\n }\r\n\r\n node = node.parentNode as Element;\r\n }\r\n\r\n return root;\r\n}\r\n\r\nexport function getScrollTop(el: HTMLElement | Window): number {\r\n const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;\r\n\r\n // iOS scroll bounce cause minus scrollTop\r\n return Math.max(top, 0);\r\n}\r\n\r\nexport function getInnerText(element) {\r\n let dom = getDom(element);\r\n return dom.innerText;\r\n}\r\n\r\nexport function getMenuOrDialogMaxZIndex(exclude: Element[] = [], element: Element) {\r\n const base = getDom(element);\r\n // Start with lowest allowed z-index or z-index of\r\n // base component's element, whichever is greater\r\n const zis = [getZIndex(base)]\r\n\r\n const activeElements = [\r\n ...document.getElementsByClassName('m-menu__content--active'),\r\n ...document.getElementsByClassName('m-dialog__content--active'),\r\n ]\r\n\r\n // Get z-index for all active dialogs\r\n for (let index = 0; index < activeElements.length; index++) {\r\n if (!exclude.includes(activeElements[index])) {\r\n zis.push(getZIndex(activeElements[index]))\r\n }\r\n }\r\n\r\n return Math.max(...zis)\r\n}\r\n\r\nexport function getMaxZIndex() {\r\n return [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)\r\n}\r\n\r\nexport function getStyle(element, styleProp) {\r\n element = getDom(element);\r\n\r\n if (element.currentStyle) {\r\n return element.currentStyle[styleProp];\r\n } else if (window.getComputedStyle) {\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\r\n }\r\n}\r\n\r\nexport function getTextAreaInfo(element) {\r\n var result = {};\r\n var dom = getDom(element);\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n\r\n if (element.currentStyle) {\r\n result[\"lineHeight\"] = parseFloat(element.currentStyle[\"line-height\"]);\r\n result[\"paddingTop\"] = parseFloat(element.currentStyle[\"padding-top\"]);\r\n result[\"paddingBottom\"] = parseFloat(element.currentStyle[\"padding-bottom\"]);\r\n result[\"borderBottom\"] = parseFloat(element.currentStyle[\"border-bottom\"]);\r\n result[\"borderTop\"] = parseFloat(element.currentStyle[\"border-top\"]);\r\n } else if (window.getComputedStyle) {\r\n result[\"lineHeight\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"line-height\"));\r\n result[\"paddingTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-top\"));\r\n result[\"paddingBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-bottom\"));\r\n result[\"borderBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-bottom\"));\r\n result[\"borderTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-top\"));\r\n }\r\n //Firefox can return this as NaN, so it has to be handled here like that.\r\n if (Object.is(NaN, result[\"borderTop\"]))\r\n result[\"borderTop\"] = 1;\r\n if (Object.is(NaN, result[\"borderBottom\"]))\r\n result[\"borderBottom\"] = 1;\r\n return result;\r\n}\r\n\r\nconst objReferenceDict = {};\r\n\r\nexport function disposeObj(objReferenceName) {\r\n delete objReferenceDict[objReferenceName];\r\n}\r\n\r\nexport function upsertThemeStyle(id: string, style: string) {\r\n const d = document.getElementById(id);\r\n if (d) {\r\n document.head.removeChild(d);\r\n }\r\n\r\n const d_style = document.createElement('style')\r\n d_style.id = id;\r\n d_style.type = \"text/css\";\r\n d_style.innerHTML = style;\r\n\r\n document.head.insertAdjacentElement('beforeend', d_style)\r\n}\r\n\r\nexport function getImageDimensions(src: string) {\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image()\r\n img.src = src\r\n img.onload = function () {\r\n resolve({\r\n width: img.width,\r\n height: img.height,\r\n hasError: false\r\n })\r\n }\r\n img.onerror = function () {\r\n resolve({\r\n width: 0,\r\n height: 0,\r\n hasError: true\r\n })\r\n }\r\n })\r\n}\r\n\r\nexport function enablePreventDefaultForEvent(element: any, event: string, condition?: any) {\r\n const dom = getDom(element);\r\n if (!dom) return;\r\n if (event === 'keydown') {\r\n dom.addEventListener(event, (e: KeyboardEvent) => {\r\n if (Array.isArray(condition)) {\r\n var codes = condition as string[];\r\n if (codes.includes(e.code)) {\r\n e.preventDefault();\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n })\r\n } else {\r\n dom.addEventListener(event, e => {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getBoundingClientRects(selector) {\r\n var elements = document.querySelectorAll(selector);\r\n\r\n var result = [];\r\n\r\n for (var i = 0; i < elements.length; i++) {\r\n var e: Element = elements[i];\r\n var dom = {\r\n id: e.id,\r\n rect: e.getBoundingClientRect()\r\n };\r\n result.push(dom);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getSize(selectors, sizeProp) {\r\n var el = getDom(selectors);\r\n\r\n var display = el.style.display;\r\n var overflow = el.style.overflow;\r\n\r\n el.style.display = \"\";\r\n el.style.overflow = \"hidden\";\r\n\r\n var size = el[\"offset\" + sizeProp.charAt(0).toUpperCase() + sizeProp.slice(1)] || 0;\r\n\r\n el.style.display = display;\r\n el.style.overflow = overflow;\r\n\r\n return size;\r\n}\r\n\r\nexport function getProp(elOrString, name) {\r\n if (elOrString === 'window') {\r\n return window[name];\r\n }\r\n\r\n var el = getDom(elOrString);\r\n if (!el) {\r\n return null;\r\n }\r\n\r\n return el[name];\r\n}\r\n\r\nexport function updateWindowTransition(selectors, isActive, item) {\r\n var el: HTMLElement = getDom(selectors);\r\n var container: HTMLElement = el.querySelector('.m-window__container');\r\n\r\n if (item) {\r\n var itemEl: HTMLElement = getDom(item);\r\n container.style.height = itemEl.clientHeight + 'px';\r\n return;\r\n }\r\n\r\n if (isActive) {\r\n container.classList.add('m-window__container--is-active');\r\n container.style.height = el.clientHeight + 'px';\r\n } else {\r\n container.style.height = '';\r\n container.classList.remove('m-window__container--is-active');\r\n }\r\n}\r\n\r\nexport function getScrollHeightWithoutHeight(elOrString) {\r\n var el: HTMLElement = getDom(elOrString);\r\n if (!el) {\r\n return 0;\r\n }\r\n\r\n var height = el.style.height;\r\n el.style.height = '0'\r\n var scrollHeight = el.scrollHeight;\r\n el.style.height = height;\r\n\r\n return scrollHeight;\r\n}\r\n\r\nfunction registerPasteWithData(customEventName) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(customEventName, {\r\n browserEventName: 'paste',\r\n createEventArgs: (event: ClipboardEvent) => {\r\n return {\r\n type: event.type,\r\n pastedData: event.clipboardData.getData('text')\r\n };\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function registerTextFieldOnMouseDown(element, inputElement, callback) {\r\n if (!element || !inputElement) return\r\n\r\n const listener = (e: MouseEvent) => {\r\n const target = e.target;\r\n const inputDom = getDom(inputElement);\r\n if (target !== inputDom) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n if (callback) {\r\n const mouseEventArgs = {\r\n Detail: e.detail,\r\n ScreenX: e.screenX,\r\n ScreenY: e.screenY,\r\n ClientX: e.clientX,\r\n ClientY: e.clientY,\r\n OffsetX: e.offsetX,\r\n OffsetY: e.offsetY,\r\n PageX: e.pageX,\r\n PageY: e.pageY,\r\n Button: e.button,\r\n Buttons: e.buttons,\r\n CtrlKey: e.ctrlKey,\r\n ShiftKey: e.shiftKey,\r\n AltKey: e.altKey,\r\n MetaKey: e.metaKey,\r\n Type: e.type\r\n }\r\n\r\n callback.invokeMethodAsync('Invoke', mouseEventArgs);\r\n }\r\n };\r\n\r\n element.addEventListener('mousedown', listener)\r\n\r\n const config: HtmlElementEventListenerConfig = {\r\n listener,\r\n handle: callback\r\n };\r\n\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n htmlElementEventListenerConfigs[key] = [config]\r\n}\r\n\r\nexport function unregisterTextFieldOnMouseDown(element: HTMLElement) {\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n const configs = htmlElementEventListenerConfigs[key]\r\n if (configs && configs.length) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n if (element) {\r\n element.removeEventListener(\"mousedown\", item.listener);\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function containsActiveElement(selector) {\r\n var el = getDom(selector);\r\n if (el && el.contains) {\r\n return el.contains(document.activeElement);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function copyChild(el) {\r\n if (typeof el === 'string') {\r\n el = document.querySelector(el);\r\n }\r\n\r\n if (!el) return;\r\n\r\n el.setAttribute('contenteditable', 'true');\r\n el.focus();\r\n document.execCommand('selectAll', false, null);\r\n document.execCommand('copy');\r\n document.execCommand('unselect');\r\n el.blur();\r\n el.removeAttribute('contenteditable');\r\n}\r\n\r\nexport function copyText(text) {\r\n if (!navigator.clipboard) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n textArea.readOnly = true;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n return;\r\n }\r\n\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function getMenuableDimensions(hasActivator, activatorSelector, isDefaultAttach, contentElement, attached, attachSelector) {\r\n if (!attached) {\r\n var container = document.querySelector(attachSelector);\r\n if (contentElement.nodeType) {\r\n container.appendChild(contentElement);\r\n }\r\n }\r\n\r\n var dimensions = {\r\n activator: {} as any,\r\n content: {} as any,\r\n relativeYOffset: 0,\r\n offsetParentLeft: 0\r\n };\r\n\r\n if (hasActivator) {\r\n var activator = document.querySelector(activatorSelector);\r\n dimensions.activator = measure(activator, isDefaultAttach)\r\n dimensions.activator.offsetLeft = activator.offsetLeft\r\n if (!isDefaultAttach) {\r\n // account for css padding causing things to not line up\r\n // this is mostly for v-autocomplete, hopefully it won't break anything\r\n dimensions.activator.offsetTop = activator.offsetTop\r\n } else {\r\n dimensions.activator.offsetTop = 0\r\n }\r\n }\r\n\r\n sneakPeek(() => {\r\n if (contentElement) {\r\n if (contentElement.offsetParent) {\r\n const offsetRect = getRoundedBoundedClientRect(contentElement.offsetParent)\r\n dimensions.relativeYOffset = getPageYOffset() + offsetRect.top\r\n\r\n if (hasActivator) {\r\n dimensions.activator.top -= dimensions.relativeYOffset\r\n dimensions.activator.left -= window.pageXOffset + offsetRect.left\r\n } else {\r\n dimensions.offsetParentLeft = offsetRect.left\r\n }\r\n }\r\n\r\n dimensions.content = measure(contentElement, isDefaultAttach)\r\n dimensions.content.offsetLeft = contentElement.offsetLeft\r\n dimensions.content.offsetTop = contentElement.offsetTop\r\n }\r\n }, contentElement);\r\n\r\n return dimensions;\r\n}\r\n\r\nfunction getPageYOffset() {\r\n let pageYOffset = window.pageYOffset\r\n const blockedScrollY = parseInt(document.documentElement.style.getPropertyValue('--m-body-scroll-y'))\r\n if (blockedScrollY) {\r\n pageYOffset += Math.abs(blockedScrollY);\r\n }\r\n return pageYOffset\r\n}\r\n\r\nfunction measure(el: HTMLElement, isDefaultAttach) {\r\n if (!el) return {}\r\n\r\n const rect = getRoundedBoundedClientRect(el)\r\n\r\n // Account for activator margin\r\n if (!isDefaultAttach) {\r\n const style = window.getComputedStyle(el)\r\n\r\n rect.left = parseInt(style.marginLeft!)\r\n rect.top = parseInt(style.marginTop!)\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getRoundedBoundedClientRect(el: Element): any {\r\n if (!el || !el.nodeType) {\r\n return null\r\n }\r\n\r\n const rect = el.getBoundingClientRect()\r\n return {\r\n top: Math.round(rect.top),\r\n left: Math.round(rect.left),\r\n bottom: Math.round(rect.bottom),\r\n right: Math.round(rect.right),\r\n width: Math.round(rect.width),\r\n height: Math.round(rect.height),\r\n }\r\n}\r\n\r\nfunction sneakPeek(cb: () => void, el) {\r\n if (!el || !el.style || el.style.display !== 'none') {\r\n cb()\r\n return\r\n }\r\n\r\n el.style.display = 'inline-block'\r\n cb()\r\n el.style.display = 'none'\r\n}\r\n\r\nexport function invokeMultipleMethod(windowProps, documentProps, hasActivator, activatorSelector, attach, contentElement, attached, attachSelector, element) {\r\n var multipleResult = {\r\n windowAndDocument: null,\r\n dimensions: null,\r\n zIndex: 0\r\n };\r\n\r\n multipleResult.windowAndDocument = getWindowAndDocumentProps(windowProps, documentProps);\r\n multipleResult.dimensions = getMenuableDimensions(hasActivator, activatorSelector, attach, contentElement, attached, attachSelector);\r\n multipleResult.zIndex = getMenuOrDialogMaxZIndex([contentElement], element);\r\n\r\n return multipleResult;\r\n}\r\n\r\nexport function registerOTPInputOnInputEvent(elementList, callback) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const inputListener = (e: Event) => otpInputOnInputEvent(e, i, elementList, callback);\r\n const focusListener = (e: Event) => otpInputFocusEvent(e, i, elementList);\r\n const keyupListener =(e: KeyboardEvent) => otpInputKeyupEvent(e, i, elementList, callback);\r\n\r\n elementList[i].addEventListener('input', inputListener);\r\n elementList[i].addEventListener('focus', focusListener);\r\n elementList[i].addEventListener('keyup', keyupListener);\r\n\r\n elementList[i]._optInput = {\r\n inputListener,\r\n focusListener,\r\n keyupListener\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputKeyupEvent(e: KeyboardEvent, otpIdx: number, elementList, callback) {\r\n e.preventDefault();\r\n const eventKey = e.key;\r\n if (eventKey === 'ArrowLeft' || eventKey === 'Backspace') {\r\n if (eventKey === 'Backspace') {\r\n const obj = {\r\n type: eventKey,\r\n index: otpIdx,\r\n value: ''\r\n }\r\n if (callback) {\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n otpInputFocus(otpIdx - 1, elementList);\r\n }\r\n else if (eventKey === 'ArrowRight') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n }\r\n}\r\n\r\nfunction otpInputFocus(focusIndex: number, elementList) {\r\n if (focusIndex < 0) {\r\n otpInputFocus(0, elementList);\r\n }\r\n else if (focusIndex >= elementList.length) {\r\n otpInputFocus(elementList.length - 1, elementList);\r\n }\r\n else {\r\n if (document.activeElement !== elementList[focusIndex]) {\r\n const element = getDom(elementList[focusIndex])\r\n element.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputFocusEvent(e: Event, otpIdx: number, elementList) {\r\n const element = getDom(elementList[otpIdx]) as HTMLInputElement;\r\n if (element && document.activeElement === element) {\r\n element.select();\r\n }\r\n}\r\n\r\nfunction otpInputOnInputEvent(e: Event, otpIdx: number, elementList, callback) {\r\n const target = e.target as HTMLInputElement;\r\n const value = target.value;\r\n\r\n if (value && value !== '') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n\r\n if (callback) {\r\n const obj = {\r\n type: 'Input',\r\n index: otpIdx,\r\n value: value\r\n }\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n}\r\n\r\nexport function unregisterOTPInputOnInputEvent(elementList) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const el = elementList[i]\r\n if(el && el._optInput) {\r\n el.removeEventListener('input', el._optInput.inputListener)\r\n el.removeEventListener('focus', el._optInput.focusListener)\r\n el.removeEventListener('keyup', el._optInput.keyupListener)\r\n }\r\n }\r\n}\r\n\r\nexport function getListIndexWhereAttributeExists(selector: string, attribute:string, value: string) {\r\n const tiles = document.querySelectorAll(selector);\r\n if (!tiles) {\r\n return -1;\r\n }\r\n\r\n let index = -1;\r\n for (let i = 0; i < tiles.length; i++) {\r\n if (tiles[i].getAttribute(attribute) === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n}\r\n\r\nexport function scrollToTile(contentSelector: string, tilesSelector: string, index: number, keyCode: string) {\r\n var tiles = document.querySelectorAll(tilesSelector)\r\n if (!tiles) return;\r\n\r\n let tile = tiles[index] as HTMLElement;\r\n\r\n if (!tile) return;\r\n\r\n const content = document.querySelector(contentSelector);\r\n if (!content) return;\r\n\r\n const scrollTop = content.scrollTop;\r\n const contentHeight = content.clientHeight;\r\n\r\n if (scrollTop > tile.offsetTop - 8) {\r\n content.scrollTo({ top: tile.offsetTop - tile.clientHeight, behavior: \"smooth\" })\r\n } else if (scrollTop + contentHeight < tile.offsetTop + tile.clientHeight + 8) {\r\n content.scrollTo({ top: tile.offsetTop - contentHeight + tile.clientHeight * 2, behavior: \"smooth\" })\r\n }\r\n}\r\n\r\nexport function getElementTranslateY(element) {\r\n const style = window.getComputedStyle(element);\r\n const transform = style.transform || style.webkitTransform;\r\n const translateY = transform.slice(7, transform.length - 1).split(', ')[5];\r\n\r\n return Number(translateY);\r\n}\r\n\r\nfunction isWindow(element: any | Window): element is Window {\r\n return element === window\r\n}\r\n\r\nexport function checkIfThresholdIsExceededWhenScrolling(el: Element, parent: any, threshold: number) {\r\n if (!el || !parent) return\r\n\r\n let parentElement: HTMLElement | Window\r\n\r\n if (parent == \"window\") {\r\n parentElement = window;\r\n } else if (parent == \"document\") {\r\n parentElement = document.documentElement;\r\n } else {\r\n parentElement = document.querySelector(parent);\r\n }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const elementTop = rect.top;\r\n const current = isWindow(parentElement)\r\n ? window.innerHeight\r\n : parentElement.getBoundingClientRect().bottom\r\n\r\n return (current >= elementTop - threshold)\r\n}\r\n\r\nexport function get_top_domain() {\r\n var i, h,\r\n weird_cookie = 'weird_get_top_level_domain=cookie',\r\n hostname = document.location.hostname.split('.');\r\n for (i = hostname.length - 1; i >= 0; i--) {\r\n h = hostname.slice(i).join('.');\r\n document.cookie = weird_cookie + ';domain=.' + h + ';';\r\n if (document.cookie.indexOf(weird_cookie) > -1) {\r\n // We were able to store a cookie! This must be it\r\n document.cookie = weird_cookie.split('=')[0] + '=;domain=.' + h + ';expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n return h;\r\n }\r\n }\r\n}\r\n\r\nexport function setCookie(name, value) {\r\n if (value === null || value === undefined) {\r\n return;\r\n }\r\n\r\n var domain = get_top_domain();\r\n if (!domain) {\r\n domain = '';\r\n }else if (isNaN(domain[0])) {\r\n domain = `.${domain}`;\r\n }\r\n var Days = 30;\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);\r\n document.cookie = `${name}=${escape(value?.toString())};path=/;expires=${exp.toUTCString()};domain=${domain}`;\r\n}\r\n\r\nexport function getCookie(name) {\r\n const reg = new RegExp(`(^| )${name}=([^;]*)(;|$)`);\r\n const arr = document.cookie.match(reg);\r\n if (arr) {\r\n return unescape(arr[2]);\r\n }\r\n return null;\r\n}\r\n\r\nexport function registerDragEvent(el: HTMLElement, dataKey?: string) {\r\n if (el) {\r\n const blazorId = getBlazorId(el);\r\n const listener = (e: DragEvent) => {\r\n if (dataKey) {\r\n const dataValue = (e.target as HTMLElement).getAttribute(dataKey);\r\n e.dataTransfer.setData(dataKey, dataValue);\r\n e.dataTransfer.setData('offsetX', e.offsetX.toString())\r\n e.dataTransfer.setData('offsetY', e.offsetY.toString())\r\n }\r\n };\r\n const key = `${blazorId}:dragstart`;\r\n htmlElementEventListenerConfigs[key] = [{\r\n listener\r\n }];\r\n el.addEventListener(\"dragstart\", listener);\r\n }\r\n}\r\n\r\nexport function unregisterDragEvent(el: HTMLElement) {\r\n const blazorId = getBlazorId(el);\r\n if (blazorId) {\r\n const key = `${blazorId}:dragstart`;\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].forEach((config) => {\r\n el.removeEventListener(\"dragstart\", config.listener);\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function resizableDataTable(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n table.style.overflow = 'hidden';\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n if (!colResizeDiv) continue\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n\r\n let minWidth = (col.firstElementChild as HTMLElement).offsetWidth; // width of span\r\n minWidth = minWidth + 32 + 18 + 1 + 1; // 32:padding 18:sort\r\n if(!col.style.minWidth){\r\n col.minWidth = minWidth;\r\n col.style.minWidth = minWidth + \"px\";\r\n }\r\n\r\n setListeners(colResizeDiv);\r\n }\r\n\r\n function setListeners(div: HTMLDivElement) {\r\n let pageX:number\r\n let curCol: HTMLElement;\r\n let nxtCol: HTMLElement;\r\n let curColWidth: number;\r\n let nxtColWidth: number;\r\n let tableWidth: number;\r\n\r\n div.addEventListener('click', e => e.stopPropagation());\r\n\r\n div.addEventListener('mousedown', function (e) {\r\n curCol = (e.target as HTMLElement).parentElement;\r\n nxtCol = curCol.nextElementSibling as HTMLElement;\r\n pageX = e.pageX;\r\n\r\n tableWidth = table.offsetWidth;\r\n\r\n var padding = paddingDiff(curCol);\r\n\r\n curColWidth = curCol.offsetWidth - padding;\r\n if (nxtCol)\r\n nxtColWidth = nxtCol.offsetWidth - padding;\r\n });\r\n\r\n document.addEventListener(\"mousemove\", function (e) {\r\n if (curCol) {\r\n let diffX = e.pageX - pageX;\r\n\r\n const isRtl = dataTable.classList.contains(\"m-data-table--rtl\")\r\n if (isRtl) {\r\n diffX = 0 - diffX;\r\n }\r\n\r\n let newCurColWidth = curColWidth + diffX;\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n const isOverflow = dataTable.classList.contains(\r\n \"m-data-table--resizable-overflow\"\r\n );\r\n if (isOverflow) {\r\n table.style.width = tableWidth + diffX + \"px\";\r\n return;\r\n }\r\n\r\n const isIndependent = dataTable.classList.contains(\r\n \"m-data-table--resizable-independent\"\r\n );\r\n if (isIndependent) {\r\n let newNextColWidth = nxtColWidth - diffX;\r\n const twoColWidth = curColWidth + nxtColWidth;\r\n\r\n if (diffX > 0) {\r\n if (nxtCol) {\r\n if (newNextColWidth < nxtCol[\"minWidth\"]) {\r\n newNextColWidth = nxtCol[\"minWidth\"];\r\n newCurColWidth = twoColWidth - newNextColWidth;\r\n }\r\n }\r\n } else {\r\n if (newCurColWidth < curCol[\"minWidth\"]) {\r\n newCurColWidth = curCol[\"minWidth\"];\r\n newNextColWidth = twoColWidth - newCurColWidth;\r\n }\r\n }\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n if (nxtCol) {\r\n nxtCol.style.width = newNextColWidth + \"px\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n document.addEventListener('mouseup', function (e) {\r\n if (curCol) {\r\n for (let i = 0; i < cols.length; i++) {\r\n const col:any = cols[i];\r\n col.style.width = col['offsetWidth'] + \"px\"\r\n }\r\n }\r\n curCol = undefined;\r\n nxtCol = undefined;\r\n pageX = undefined;\r\n nxtColWidth = undefined;\r\n curColWidth = undefined;\r\n tableWidth = undefined;\r\n });\r\n }\r\n\r\n function paddingDiff(col) {\r\n if (getStyleVal(col, 'box-sizing') == 'border-box') {\r\n return 0;\r\n }\r\n\r\n var padLeft = getStyleVal(col, 'padding-left');\r\n var padRight = getStyleVal(col, 'padding-right');\r\n return (parseInt(padLeft) + parseInt(padRight));\r\n }\r\n\r\n function getStyleVal(elm, css) {\r\n return (window.getComputedStyle(elm, null).getPropertyValue(css))\r\n }\r\n}\r\n\r\nexport function updateDataTableResizeHeight(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n }\r\n}\r\n\r\nfunction stopPropagation(e) {\r\n e.stopPropagation();\r\n}\r\n\r\nexport function addStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.addEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function removeStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.removeEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function historyBack() {\r\n history.back();\r\n}\r\n\r\nexport function historyGo(delta: number) {\r\n history.go(delta);\r\n}\r\n\r\nexport function historyReplace(href) {\r\n history.replaceState(null, /*ignore title*/ '', href);\r\n}\r\n\r\nexport function registerTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = () => {\r\n const scrollWidth = wrapper.scrollWidth;\r\n const clientWidth = wrapper.clientWidth;\r\n const scrollLeft = wrapper.scrollLeft;\r\n\r\n const rtl = wrapper.parentElement.classList.contains('m-data-table--rtl');\r\n\r\n if (Math.abs(scrollWidth -((rtl ? -scrollLeft : scrollLeft) + clientWidth)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-left')\r\n wrapper.classList.add('scrolled-to-right');\r\n } else if (Math.abs(scrollLeft - (rtl ? scrollWidth - clientWidth : 0)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-right')\r\n wrapper.classList.add('scrolled-to-left');\r\n } else {\r\n wrapper.classList.remove('scrolled-to-right');\r\n wrapper.classList.remove('scrolled-to-left');\r\n wrapper.classList.add('scrolling');\r\n }\r\n }\r\n\r\n listener();\r\n\r\n wrapper.addEventListener('scroll', listener)\r\n wrapper[\"_m_table_scroll_event\"] = listener\r\n}\r\n\r\nexport function unregisterTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = wrapper[\"_m_table_scroll_event\"]\r\n if (listener) {\r\n wrapper.removeEventListener('scroll', listener)\r\n delete wrapper[\"_m_table_scroll_event\"]\r\n }\r\n}\r\n\r\nexport function isScrollNearBottom(element: HTMLElement, threshold: number = 200) {\r\n if (!element) {\r\n return false;\r\n }\r\n return element.scrollHeight - (element.scrollTop + element.clientHeight) < threshold;\r\n}","import { removeListeners, RippleOptions, updateRipple } from \"./ripple\";\r\n\r\nexport default function registerRippleObserver() {\r\n const observer = new MutationObserver((mutationsList, observer) => {\r\n for (const mutation of mutationsList) {\r\n if (mutation.type === \"childList\" && mutation.addedNodes.length > 0) {\r\n for (const node of mutation.addedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (\r\n node.nodeType === Node.ELEMENT_NODE &&\r\n node.hasAttribute(\"ripple\") &&\r\n !node._ripple\r\n ) {\r\n updateRipple(node, convertRippleAttributeToOptions(node), false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 处理属性变动\r\n if (mutation.type === \"attributes\") {\r\n const target = mutation.target as HTMLElement;\r\n if (target.hasAttribute(\"ripple\") && !target._ripple) {\r\n if (mutation.attributeName === \"ripple\") {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n false\r\n );\r\n } else if (!target.hasAttribute(\"ripple\") && target._ripple) {\r\n removeListeners(target);\r\n delete target._ripple;\r\n }\r\n }\r\n }\r\n\r\n if (\r\n mutation.type === \"attributes\" &&\r\n mutation.attributeName === \"ripple\"\r\n ) {\r\n const target = mutation.target as HTMLElement;\r\n if (target._ripple) {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n target._ripple.enabled\r\n );\r\n }\r\n }\r\n\r\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\r\n for (const node of mutation.removedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (node.nodeType === Node.ELEMENT_NODE && node._ripple) {\r\n removeListeners(node);\r\n delete node._ripple;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // ripple=\"false\",\r\n // ripple=\"\",\r\n // ripple=\"true\",\r\n // ripple=\"center\",\r\n // ripple=\"circle\",\r\n // ripple=\"circle¢er\"\r\n // ripple=\"center&custom-css\",\r\n // ripple=\"circle&custom-css\",\r\n // ripple=\"custom-css\"\r\n function convertRippleAttributeToOptions(\r\n target: HTMLElement\r\n ): RippleOptions | null {\r\n const value = target.getAttribute(\"ripple\");\r\n if ((typeof value !== \"string\" && !value) || value === \"false\") {\r\n return null;\r\n }\r\n\r\n const options: RippleOptions = {};\r\n\r\n const props = value.split(\"&\");\r\n props.forEach((prop) => {\r\n if (prop === \"center\") {\r\n options.center = true;\r\n } else if (prop === \"circle\") {\r\n options.circle = true;\r\n } else {\r\n options.class = prop.trim();\r\n }\r\n });\r\n\r\n return options;\r\n }\r\n\r\n const initialElements = document.querySelectorAll(\"[ripple]\");\r\n\r\n for (const element of initialElements) {\r\n updateRipple(element, convertRippleAttributeToOptions(element), false);\r\n }\r\n\r\n observer.observe(document, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n attributeFilter: [\"ripple\"],\r\n attributeOldValue: false,\r\n });\r\n}\r\n","import * as slider from \"./components/slider\";\r\nimport * as textarea from \"./components/textarea\";\r\nimport * as interop from \"./interop\";\r\nimport { MarkdownParser } from \"./proxies/markdown-it\";\r\n\r\ndeclare global {\r\n interface Window {\r\n MasaBlazor: {\r\n interop: {};\r\n extendMarkdownIt?: (parser: MarkdownParser) => void;\r\n xgplayerPlugins: any[];\r\n xgplayerPluginOptions?: { [prop: string]: any };\r\n };\r\n }\r\n}\r\n\r\nwindow.MasaBlazor = {\r\n interop: {\r\n ...interop,\r\n ...slider,\r\n ...textarea\r\n },\r\n xgplayerPlugins: [],\r\n};\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","passiveSupported","window","testListenerOpts","Object","defineProperty","get","addEventListener","removeEventListener","console","warn","keyCodes","freeze","enter","tab","delete","esc","space","up","down","left","right","end","home","del","backspace","insert","pageup","pagedown","shift","getBlazorId","el","_bl_","getAttributeNames","find","a","startsWith","substring","getElementSelector","Element","path","nodeType","Node","ELEMENT_NODE","selector","nodeName","toLowerCase","id","unshift","sib","nth","previousElementSibling","parentNode","join","getDom","elOrString","element","document","documentElement","indexOf","array","split","i","querySelector","HTMLElement","body","error","canUseDom","createElement","touchEvents","parseMouseEvent","event","detail","screenX","screenY","clientX","clientY","offsetX","offsetY","pageX","pageY","button","buttons","ctrlKey","shiftKey","altKey","metaKey","type","parseTouchEvent","touches","parseTouch","targetTouches","changedTouches","touchList","length","touch","push","identifier","registerExtraMouseEvent","eventType","eventName","Blazor","registerCustomEventType","browserEventName","createEventArgs","createSharedEventArgs","registerExtraDropEvent","eventArgs","assign","dataTransfer","dropEffect","effectAllowed","files","Array","from","map","f","name","items","kind","types","getData","Number","args","target","eventTarget","elementReferenceId","class","getAttribute","getEventTarget","sliderHandleId","sliderHandlesById","dotnetHelper","onSliderMouseDown","app","mouseUpOptions","passive","capture","mouseMoveOptions","isTouchEvent","onMouseMove","cb","options","once","addOnceEventListener","onSliderMouseUp","invokeMethodAsync","stopPropagation","payload","textareaAutoGrowNextId","textareaAutoGrowMap","calculateTextareaHeight","textarea","rows","rowHeight","style","height","scrollHeight","minHeight","parseInt","parseFloat","Math","max","input","inputCallback","undefined","functionDebounce","fn","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","debounceWrapper","this","arguments","context","callNow","setTimeout","call","cancel","flush","functionThrottle","interval","timeoutId","throttledFn","leading","trailing","throttleWrapper","registerExtraEvents","registerEvent","DELAY_RIPPLE","transform","webkitTransform","constructor","isKeyboardEvent","ripples","show","_ripple","enabled","container","animation","appendChild","className","radius","scale","x","y","centerX","centerY","localX","localY","offset","getBoundingClientRect","top","circle","clientWidth","center","sqrt","clientHeight","calculate","size","width","computed","getComputedStyle","position","dataset","previousPosition","classList","add","activated","String","performance","now","remove","hide","getElementsByClassName","isHiding","diff","delay","_a","removeChild","rippleShow","currentTarget","touched","rippleStop","isTouch","centered","showTimerCommit","showTimer","rippleHide","rippleCancelShow","keyboardRippleShow","keyCode","keyboardRippleHide","focusRippleHide","updateRipple","wasEnabled","removeListeners","getZIndex","index","getPropertyValue","getDomInfoObj","dom","offsetTop","offsetLeft","scrollWidth","scrollLeft","scrollTop","clientTop","clientLeft","res","viewportElement","box","offsetWidth","offsetHeight","relativeTop","relativeBottom","bottom","relativeLeft","relativeRight","absoluteLeft","absoluteTop","getElementPos","round","onload","customEventName","pastedData","clipboardData","observer","MutationObserver","mutationsList","mutation","addedNodes","node","hasAttribute","convertRippleAttributeToOptions","attributeName","removedNodes","forEach","prop","trim","initialElements","querySelectorAll","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","registerRippleObserver","htmlElementEventListenerConfigs","getActiveElement","activeElement","getWindowAndDocumentProps","windowProps","documentProps","obj","getPageYOffset","isElement","tagName","getMenuOrDialogMaxZIndex","exclude","zis","activeElements","includes","getMenuableDimensions","hasActivator","activatorSelector","isDefaultAttach","contentElement","attached","attachSelector","dimensions","activator","content","relativeYOffset","offsetParentLeft","measure","display","sneakPeek","offsetParent","offsetRect","getRoundedBoundedClientRect","pageXOffset","pageYOffset","blockedScrollY","abs","rect","marginLeft","marginTop","otpInputKeyupEvent","otpIdx","elementList","callback","preventDefault","eventKey","key","otpInputFocus","focusIndex","focus","otpInputFocusEvent","select","otpInputOnInputEvent","get_top_domain","h","weird_cookie","hostname","location","slice","cookie","cloned","cloneNode","parentElement","innerWidth","evt","createEvent","initEvent","dispatchEvent","attach","_b","invoker","extras","htmlElement","config","listener","cancelable","relatedTarget","contains","k","debounce","debounceIt","throttle","handle","configs","item","dispose","e1","e2","dom1","dom2","text","navigator","clipboard","writeText","log","err","textArea","msg","execCommand","fallbackCopyTextToClipboard","preventScroll","HTMLInputElement","HTMLTextAreaElement","Error","blur","arg","scrollIntoView","block","inline","behavior","start","level","parent","to","scrollTo","o","targetEl","scrollY","offsetPosition","activeEl","containerEl","firstElementChild","getAbsoluteTop","getAbsoluteLeft","addElement","elementSelector","delElement","focusDialog","count","ele","innerHeight","isTop","isBottom","hasOwnProperty","clsName","root","overflowY","test","innerText","all","reduce","r","zIndex","styleProp","currentStyle","defaultView","is","NaN","objReferenceName","d","getElementById","head","d_style","innerHTML","insertAdjacentElement","src","img","Image","hasError","onerror","condition","isArray","code","elements","selectors","sizeProp","overflow","charAt","toUpperCase","isActive","itemEl","inputElement","mouseEventArgs","Detail","ScreenX","ScreenY","ClientX","ClientY","OffsetX","OffsetY","PageX","PageY","Button","Buttons","CtrlKey","ShiftKey","AltKey","MetaKey","Type","setAttribute","removeAttribute","readOnly","multipleResult","windowAndDocument","inputListener","focusListener","keyupListener","_optInput","attribute","tiles","contentSelector","tilesSelector","tile","contentHeight","translateY","threshold","elementTop","domain","isNaN","exp","Date","setTime","getTime","Days","escape","toString","toUTCString","reg","RegExp","arr","match","unescape","dataKey","blazorId","dataValue","setData","dataTable","table","row","getElementsByTagName","cols","children","tableHeight","col","colResizeDiv","minWidth","setListeners","div","curCol","nxtCol","curColWidth","nxtColWidth","tableWidth","nextElementSibling","padding","getStyleVal","padLeft","padRight","paddingDiff","diffX","newCurColWidth","newNextColWidth","twoColWidth","elm","css","history","back","delta","go","href","replaceState","wrapper","rtl","MasaBlazor","interop","slider","xgplayerPlugins"],"mappings":"yBAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAA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AI,aACvB,EAGH4J,IAEA2L,EAAQtjB,iBAAiB,SAAU2X,GACnC2L,EAA+B,sBAAI3L,CACrC,6BAEM,SAAqC2L,GACzC,MAAM3L,EAAW2L,EAA+B,sBAC5C3L,IACF2L,EAAQrjB,oBAAoB,SAAU0X,UAC/B2L,EAA+B,sBAE1C,8BAEmCrgB,EAAsB6c,EAAoB,KAC3E,QAAK7c,GAGEA,EAAQqG,cAAgBrG,EAAQqN,UAAYrN,EAAQoK,cAAgByS,CAC7E,IEljDAngB,OAAO6jB,WAAa,CAClBC,qDACKA,IACAC,GACAza,GAEL0a,gBAAiB"} \ No newline at end of file +{"version":3,"file":"masa-blazor.js","sources":["../../../Masa.Blazor.JS/node_modules/tslib/tslib.es6.js","../../../Masa.Blazor.JS/src/utils/helper.ts","../../../Masa.Blazor.JS/src/events/EventType.ts","../../../Masa.Blazor.JS/src/events/extra.ts","../../../Masa.Blazor.JS/src/components/slider/index.ts","../../../Masa.Blazor.JS/src/components/textarea/index.ts","../../../Masa.Blazor.JS/node_modules/just-debounce-it/index.mjs","../../../Masa.Blazor.JS/node_modules/just-throttle/index.mjs","../../../Masa.Blazor.JS/src/events/index.ts","../../../Masa.Blazor.JS/src/ripple/ripple.ts","../../../Masa.Blazor.JS/src/interop.ts","../../../Masa.Blazor.JS/src/ripple/index.ts","../../../Masa.Blazor.JS/src/main.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export function addOnceEventListener (\r\n el: EventTarget,\r\n eventName: string,\r\n cb: (event: Event) => void,\r\n options: boolean | AddEventListenerOptions = false\r\n): void {\r\n const once = (event: Event) => {\r\n cb(event)\r\n el.removeEventListener(eventName, once, options)\r\n }\r\n\r\n el.addEventListener(eventName, once, options)\r\n}\r\n\r\nlet passiveSupported = false\r\ntry {\r\n if (typeof window !== 'undefined') {\r\n const testListenerOpts = Object.defineProperty({}, 'passive', {\r\n get: () => {\r\n passiveSupported = true\r\n },\r\n })\r\n\r\n window.addEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n window.removeEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n }\r\n} catch (e) { console.warn(e) } /* eslint-disable-line no-console */\r\nexport { passiveSupported }\r\n\r\nexport function addPassiveEventListener (\r\n el: EventTarget,\r\n event: string,\r\n cb: ((e: any) => void),\r\n options: {}\r\n): void {\r\n el.addEventListener(event, cb, passiveSupported ? options : false)\r\n}\r\n\r\nexport function getZIndex (el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\n// KeyboardEvent.keyCode aliases\r\nexport const keyCodes = Object.freeze({\r\n enter: 13,\r\n tab: 9,\r\n delete: 46,\r\n esc: 27,\r\n space: 32,\r\n up: 38,\r\n down: 40,\r\n left: 37,\r\n right: 39,\r\n end: 35,\r\n home: 36,\r\n del: 46,\r\n backspace: 8,\r\n insert: 45,\r\n pageup: 33,\r\n pagedown: 34,\r\n shift: 16,\r\n})\r\n\r\n/** Polyfill for Event.prototype.composedPath */\r\nexport function composedPath (e: Event): EventTarget[] {\r\n if (e.composedPath) return e.composedPath()\r\n\r\n const path = []\r\n let el = e.target as Element\r\n\r\n while (el) {\r\n path.push(el)\r\n\r\n if (el.tagName === 'HTML') {\r\n path.push(document)\r\n path.push(window)\r\n\r\n return path\r\n }\r\n\r\n el = el.parentElement!\r\n }\r\n return path\r\n}\r\n\r\nexport function getBlazorId(el) {\r\n if (!el) {\r\n return null;\r\n }\r\n let _bl_ = el.getAttributeNames().find(a => a.startsWith('_bl_'))\r\n if (_bl_) {\r\n _bl_ = _bl_.substring(4);\r\n }\r\n\r\n return _bl_;\r\n}\r\n\r\nexport function getElementSelector(el) {\r\n if (!(el instanceof Element))\r\n return;\r\n var path = [];\r\n while (el.nodeType === Node.ELEMENT_NODE) {\r\n var selector = el.nodeName.toLowerCase();\r\n if (el.id) {\r\n selector = '#' + el.id;\r\n path.unshift(selector);\r\n break;\r\n } else {\r\n var sib = el, nth = 1;\r\n while (sib = sib.previousElementSibling) {\r\n if (sib.nodeName.toLowerCase() == selector)\r\n nth++;\r\n }\r\n if (nth != 1)\r\n selector += \":nth-of-type(\" + nth + \")\";\r\n }\r\n path.unshift(selector);\r\n el = el.parentNode;\r\n }\r\n return path.join(\" > \");\r\n}\r\n\r\nexport function getEventTarget(target: HTMLElement | EventTarget) {\r\n const el = target as HTMLElement;\r\n const eventTarget: MbEventTarget = {};\r\n const elementReferenceId = el\r\n .getAttributeNames()\r\n .find((a) => a.startsWith(\"_bl_\"));\r\n if (elementReferenceId) {\r\n eventTarget.elementReferenceId = elementReferenceId;\r\n eventTarget.selector = `[${elementReferenceId}]`;\r\n } else {\r\n eventTarget.selector = getElementSelector(el);\r\n }\r\n\r\n eventTarget.class = el.getAttribute(\"class\");\r\n\r\n return eventTarget;\r\n}\r\n\r\nexport function getDom(elOrString: Element | string | undefined) {\r\n let element: HTMLElement;\r\n\r\n try {\r\n if (!elOrString) {\r\n element = document.body;\r\n } else if (typeof elOrString === \"string\") {\r\n if (elOrString === \"document\") {\r\n element = document.documentElement;\r\n } else if (elOrString.indexOf(\"__.__\") > 0) {\r\n // for example: el__.__parentElement\r\n let array = elOrString.split(\"__.__\");\r\n let i = 0;\r\n let el = document.querySelector(array[i++]);\r\n\r\n if (el) {\r\n while (array[i]) {\r\n el = el[array[i]];\r\n i++;\r\n }\r\n }\r\n\r\n if (el instanceof HTMLElement) {\r\n element = el;\r\n }\r\n } else {\r\n element = document.querySelector(elOrString);\r\n }\r\n } else {\r\n element = elOrString as HTMLElement;\r\n }\r\n\r\n } catch (error) {\r\n console.error(error)\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport const canUseDom = !!(\r\n typeof window !== 'undefined' &&\r\n typeof document !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n)\r\n\r\nexport function convertToUnit (str: number, unit?: string): string\r\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\r\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\r\n if (str == null || str === '') {\r\n return undefined\r\n } else if (isNaN(+str!)) {\r\n return String(str)\r\n } else if (!isFinite(+str!)) {\r\n return undefined\r\n } else {\r\n return `${Number(str)}${unit}`\r\n }\r\n}","// see https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Rendering/Events/EventTypes.ts\r\n// updated at 2022/08/31\r\n\r\nexport const touchEvents = [\r\n \"touchcancel\",\r\n \"touchend\",\r\n \"touchmove\",\r\n \"touchenter\",\r\n \"touchleave\",\r\n \"touchstart\",\r\n];\r\n\r\nexport function parseMouseEvent(event: MouseEvent): Blazor.MouseEventArgs {\r\n return {\r\n detail: event.detail,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n offsetX: event.offsetX,\r\n offsetY: event.offsetY,\r\n pageX: event.pageX,\r\n pageY: event.pageY,\r\n button: event.button,\r\n buttons: event.buttons,\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n } as Blazor.MouseEventArgs;\r\n}\r\n\r\nexport function parseTouchEvent(event: TouchEvent): Blazor.TouchEventArgs {\r\n return {\r\n detail: event.detail,\r\n touches: parseTouch(event.touches),\r\n targetTouches: parseTouch(event.targetTouches),\r\n changedTouches: parseTouch(event.changedTouches),\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n };\r\n}\r\n\r\nfunction parseTouch(touchList: TouchList): Blazor.TouchPoint[] {\r\n const touches: Blazor.TouchPoint[] = [];\r\n\r\n for (let i = 0; i < touchList.length; i++) {\r\n const touch = touchList[i];\r\n touches.push({\r\n identifier: touch.identifier,\r\n clientX: touch.clientX,\r\n clientY: touch.clientY,\r\n screenX: touch.screenX,\r\n screenY: touch.screenY,\r\n pageX: touch.pageX,\r\n pageY: touch.pageY,\r\n });\r\n }\r\n return touches;\r\n}\r\n\r\nexport function parseChangeEvent(event: Event): Blazor.ChangeEventArgs {\r\n const element = event.target as Element;\r\n if (isTimeBasedInput(element)) {\r\n const normalizedValue = normalizeTimeBasedValue(element);\r\n return { value: normalizedValue };\r\n } else if (isMultipleSelectInput(element)) {\r\n const selectElement = element as HTMLSelectElement;\r\n const selectedValues = Array.from(selectElement.options)\r\n .filter((option) => option.selected)\r\n .map((option) => option.value);\r\n return { value: selectedValues };\r\n } else {\r\n const targetIsCheckbox = isCheckbox(element);\r\n const newValue = targetIsCheckbox ? !!element[\"checked\"] : element[\"value\"];\r\n return { value: newValue };\r\n }\r\n}\r\n\r\nexport function parseDragEvent(event: DragEvent): Blazor.DragEventArgs {\r\n return {\r\n ...parseMouseEvent(event),\r\n dataTransfer: event.dataTransfer ? {\r\n dropEffect: event.dataTransfer.dropEffect,\r\n effectAllowed: event.dataTransfer.effectAllowed,\r\n files: Array.from(event.dataTransfer.files).map(f => f.name),\r\n items: Array.from(event.dataTransfer.items).map(i => ({ kind: i.kind, type: i.type })),\r\n types: event.dataTransfer.types\r\n } : null,\r\n };\r\n}\r\n\r\nfunction isTimeBasedInput(element: Element): element is HTMLInputElement {\r\n return timeBasedInputs.indexOf(element.getAttribute(\"type\")!) !== -1;\r\n}\r\n\r\nconst timeBasedInputs = [\"date\", \"datetime-local\", \"month\", \"time\", \"week\"];\r\n\r\nfunction normalizeTimeBasedValue(element: HTMLInputElement): string {\r\n const value = element.value;\r\n const type = element.type;\r\n switch (type) {\r\n case \"date\":\r\n case \"month\":\r\n return value;\r\n case \"datetime-local\":\r\n return value.length === 16 ? value + \":00\" : value; // Convert yyyy-MM-ddTHH:mm to yyyy-MM-ddTHH:mm:00\r\n case \"time\":\r\n return value.length === 5 ? value + \":00\" : value; // Convert hh:mm to hh:mm:00\r\n case \"week\":\r\n // For now we are not going to normalize input type week as it is not trivial\r\n return value;\r\n }\r\n\r\n throw new Error(`Invalid element type '${type}'.`);\r\n}\r\n\r\nfunction isMultipleSelectInput(element: Element): element is HTMLSelectElement {\r\n return (\r\n element instanceof HTMLSelectElement && element.type === \"select-multiple\"\r\n );\r\n}\r\n\r\nfunction isCheckbox(element: Element | null): boolean {\r\n return (\r\n !!element &&\r\n element.tagName === \"INPUT\" &&\r\n element.getAttribute(\"type\") === \"checkbox\"\r\n );\r\n}\r\n","import { getEventTarget } from \"../utils/helper\";\r\nimport { parseDragEvent, parseMouseEvent, parseTouchEvent } from \"./EventType\";\r\n\r\nexport function registerExtraMouseEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"mouse\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraTouchEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"touch\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraDropEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: (e: DragEvent) => {\r\n const eventArgs = parseDragEvent(e);\r\n const value = e.dataTransfer.getData('data-value');\r\n const offsetX = e.dataTransfer.getData('offsetX');\r\n const offsetY = e.dataTransfer.getData('offsetY');\r\n\r\n eventArgs.dataTransfer['data'] = {\r\n value,\r\n offsetX: Number(offsetX),\r\n offsetY: Number(offsetY)\r\n }\r\n\r\n return eventArgs;\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function createSharedEventArgs(type: \"mouse\" | \"touch\", e: Event,) {\r\n let args = { target: {} }\r\n if (type === 'mouse') {\r\n args = {\r\n ...args,\r\n ...parseMouseEvent(e as MouseEvent)\r\n }\r\n } else if (type === 'touch') {\r\n args = {\r\n ...args,\r\n ...parseTouchEvent(e as TouchEvent)\r\n }\r\n }\r\n\r\n args.target = getEventTarget(e.target);\r\n\r\n return args;\r\n}","import { createSharedEventArgs } from \"events/extra\";\r\nimport { addOnceEventListener, passiveSupported } from \"utils/helper\";\r\n\r\nlet sliderHandleId = 0;\r\nconst sliderHandlesById = {};\r\n\r\nexport function registerSliderEvents(\r\n el: HTMLElement,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n sliderHandlesById[sliderHandleId] = onSliderMouseDown;\r\n\r\n const app = document.querySelector(\"[data-app]\");\r\n\r\n const mouseUpOptions = passiveSupported\r\n ? { passive: true, capture: true }\r\n : true;\r\n\r\n const mouseMoveOptions = passiveSupported ? { passive: true } : false;\r\n\r\n el.addEventListener(\"mousedown\", onSliderMouseDown);\r\n el.addEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n return sliderHandleId++;\r\n\r\n async function onSliderMouseDown(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n\r\n onMouseMove(e);\r\n\r\n app.addEventListener(\r\n isTouchEvent ? \"touchmove\" : \"mousemove\",\r\n onMouseMove,\r\n mouseMoveOptions\r\n );\r\n addOnceEventListener(\r\n app,\r\n isTouchEvent ? \"touchend\" : \"mouseup\",\r\n onSliderMouseUp,\r\n mouseUpOptions\r\n );\r\n\r\n if (isTouchEvent) {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnTouchStartInternal\",\r\n createSharedEventArgs(\"touch\", e)\r\n );\r\n } else {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnMouseDownInternal\",\r\n createSharedEventArgs(\"mouse\", e)\r\n );\r\n }\r\n }\r\n\r\n async function onSliderMouseUp(e: Event) {\r\n e.stopPropagation();\r\n\r\n app.removeEventListener(\"touchmove\", onMouseMove, mouseMoveOptions as any);\r\n app.removeEventListener(\"mousemove\", onMouseMove, mouseMoveOptions as any);\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseUpInternal\");\r\n }\r\n\r\n async function onMouseMove(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n const payload = {\r\n type: e.type,\r\n clientX: isTouchEvent ? e.touches[0].clientX : e.clientX,\r\n clientY: isTouchEvent ? e.touches[0].clientY : e.clientY,\r\n };\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseMoveInternal\", payload);\r\n }\r\n}\r\n\r\nexport function unregisterSliderEvents(el: HTMLElement, id: number) {\r\n if (el) {\r\n const onSliderMouseDown = sliderHandlesById[id];\r\n el.removeEventListener(\"mousedown\", onSliderMouseDown);\r\n el.removeEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n delete sliderHandlesById[id];\r\n }\r\n}\r\n","\r\nlet textareaAutoGrowNextId = 0;\r\nconst textareaAutoGrowMap: {\r\n [prop: string]: (e: HTMLElementEventMap['input']) => void;\r\n} = {}\r\n\r\nexport function registerTextareaAutoGrowEvent(input: HTMLElement) {\r\n const id = textareaAutoGrowNextId;\r\n const inputCallback = (e: HTMLElementEventMap['input']) => {\r\n const target = e.target as HTMLTextAreaElement;\r\n const autoGrow = target.getAttribute('data-auto-grow');\r\n if (autoGrow === undefined) {\r\n return;\r\n }\r\n const rows = target.getAttribute('rows');\r\n const rowHeight = target.getAttribute('data-row-height');\r\n calculateTextareaHeight(target, rows, rowHeight)\r\n };\r\n\r\n textareaAutoGrowMap[id] = inputCallback;\r\n\r\n input.addEventListener('input', inputCallback)\r\n\r\n return textareaAutoGrowNextId++;\r\n}\r\n\r\nexport function unregisterTextareaAutoGrowEvent(input: HTMLElement, textareaAutoGrowNextId: number) {\r\n if (!input) return;\r\n const inputCallback = textareaAutoGrowMap[textareaAutoGrowNextId];\r\n if (inputCallback) {\r\n input.removeEventListener('input', inputCallback);\r\n }\r\n}\r\n\r\nexport function calculateTextareaHeight(textarea: HTMLTextAreaElement, rows: string, rowHeight: string) {\r\n textarea.style.height = '0'\r\n const height = textarea.scrollHeight;\r\n const minHeight = parseInt(rows, 10) * parseFloat(rowHeight);\r\n textarea.style.height = Math.max(height, minHeight) + 'px';\r\n}","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import { parseMouseEvent } from \"./EventType\";\r\nimport { registerExtraDropEvent, registerExtraMouseEvent, registerExtraTouchEvent } from \"./extra\";\r\n\r\nexport function registerExtraEvents() {\r\n registerExtraMouseEvent(\"exmousedown\", \"mousedown\");\r\n registerExtraMouseEvent(\"exmouseup\", \"mouseup\");\r\n registerExtraMouseEvent(\"exclick\", \"click\");\r\n registerExtraMouseEvent(\"exmouseleave\", \"mouseleave\");\r\n registerExtraMouseEvent(\"exmouseenter\", \"mouseenter\");\r\n registerExtraMouseEvent(\"exmousemove\", \"mousemove\");\r\n registerExtraTouchEvent(\"extouchstart\", \"touchstart\");\r\n registerEvent(\"transitionend\", \"transitionend\");\r\n registerExtraDropEvent(\"exdrop\", \"drop\");\r\n registerAuxclickEvent();\r\n}\r\n\r\nfunction registerEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n });\r\n }\r\n}\r\n\r\nfunction registerAuxclickEvent() {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(\"auxclick\", {\r\n browserEventName: \"auxclick\",\r\n createEventArgs: parseMouseEvent\r\n });\r\n }\r\n}\r\n","import { keyCodes } from \"utils/helper\";\r\n\r\ntype RippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & {\r\n rippleStop?: boolean;\r\n};\r\n\r\nconst DELAY_RIPPLE = 80;\r\n\r\nfunction transform(el: HTMLElement, value: string) {\r\n el.style.transform = value;\r\n el.style.webkitTransform = value;\r\n}\r\n\r\nexport interface RippleOptions {\r\n class?: string;\r\n center?: boolean;\r\n circle?: boolean;\r\n}\r\n\r\nfunction isTouchEvent(e: RippleEvent): e is TouchEvent {\r\n return e.constructor.name === \"TouchEvent\";\r\n}\r\n\r\nfunction isKeyboardEvent(e: RippleEvent): e is KeyboardEvent {\r\n return e.constructor.name === \"KeyboardEvent\";\r\n}\r\n\r\nconst calculate = (\r\n e: RippleEvent,\r\n el: HTMLElement,\r\n value: RippleOptions = {}\r\n) => {\r\n let localX = 0;\r\n let localY = 0;\r\n\r\n if (!isKeyboardEvent(e)) {\r\n const offset = el.getBoundingClientRect();\r\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\r\n\r\n localX = target.clientX - offset.left;\r\n localY = target.clientY - offset.top;\r\n }\r\n\r\n let radius = 0;\r\n let scale = 0.3;\r\n if (el._ripple && el._ripple.circle) {\r\n scale = 0.15;\r\n radius = el.clientWidth / 2;\r\n radius = value.center\r\n ? radius\r\n : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\r\n } else {\r\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\r\n }\r\n\r\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\r\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\r\n\r\n const x = value.center ? centerX : `${localX - radius}px`;\r\n const y = value.center ? centerY : `${localY - radius}px`;\r\n\r\n return { radius, scale, x, y, centerX, centerY };\r\n};\r\n\r\nconst ripples = {\r\n /* eslint-disable max-statements */\r\n show(e: RippleEvent, el: HTMLElement, value: RippleOptions = {}) {\r\n if (!el._ripple || !el._ripple.enabled) {\r\n return;\r\n }\r\n\r\n const container = document.createElement(\"span\");\r\n const animation = document.createElement(\"span\");\r\n\r\n container.appendChild(animation);\r\n container.className = \"m-ripple__container\";\r\n\r\n if (value.class) {\r\n container.className += ` ${value.class}`;\r\n }\r\n\r\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);\r\n\r\n const size = `${radius * 2}px`;\r\n animation.className = \"m-ripple__animation\";\r\n animation.style.width = size;\r\n animation.style.height = size;\r\n\r\n el.appendChild(container);\r\n\r\n const computed = window.getComputedStyle(el);\r\n if (computed && computed.position === \"static\") {\r\n el.style.position = \"relative\";\r\n el.dataset.previousPosition = \"static\";\r\n }\r\n\r\n animation.classList.add(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--visible\");\r\n transform(\r\n animation,\r\n `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`\r\n );\r\n animation.dataset.activated = String(performance.now());\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--in\");\r\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\r\n }, 0);\r\n },\r\n\r\n hide(el: HTMLElement | null) {\r\n if (!el || !el._ripple || !el._ripple.enabled) return;\r\n\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n\r\n if (ripples.length === 0) return;\r\n const animation = ripples[ripples.length - 1];\r\n\r\n if (animation.dataset.isHiding) return;\r\n else animation.dataset.isHiding = \"true\";\r\n\r\n const diff = performance.now() - Number(animation.dataset.activated);\r\n const delay = Math.max(250 - diff, 0);\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--in\");\r\n animation.classList.add(\"m-ripple__animation--out\");\r\n\r\n setTimeout(() => {\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n if (ripples.length === 1 && el.dataset.previousPosition) {\r\n el.style.position = el.dataset.previousPosition;\r\n delete el.dataset.previousPosition;\r\n }\r\n\r\n if (animation.parentNode?.parentNode === el)\r\n el.removeChild(animation.parentNode);\r\n }, 300);\r\n }, delay);\r\n },\r\n};\r\n\r\nfunction rippleShow(e: RippleEvent) {\r\n const value: RippleOptions = {};\r\n const element = e.currentTarget as HTMLElement;\r\n\r\n if (!element || !element._ripple || element._ripple.touched || e.rippleStop)\r\n return;\r\n\r\n // Don't allow the event to trigger ripples on any other elements\r\n e.rippleStop = true;\r\n\r\n if (isTouchEvent(e)) {\r\n element._ripple.touched = true;\r\n element._ripple.isTouch = true;\r\n } else {\r\n // It's possible for touch events to fire\r\n // as mouse events on Android/iOS, this\r\n // will skip the event call if it has\r\n // already been registered as touch\r\n if (element._ripple.isTouch) return;\r\n }\r\n value.center = element._ripple.centered || isKeyboardEvent(e);\r\n if (element._ripple.class) {\r\n value.class = element._ripple.class;\r\n }\r\n\r\n if (isTouchEvent(e)) {\r\n // already queued that shows or hides the ripple\r\n if (element._ripple.showTimerCommit) return;\r\n\r\n element._ripple.showTimerCommit = () => {\r\n ripples.show(e, element, value);\r\n };\r\n element._ripple.showTimer = window.setTimeout(() => {\r\n if (element && element._ripple && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n }\r\n }, DELAY_RIPPLE);\r\n } else {\r\n ripples.show(e, element, value);\r\n }\r\n}\r\n\r\nfunction rippleHide(e: Event) {\r\n const element = e.currentTarget as HTMLElement | null;\r\n if (!element || !element._ripple) return;\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n\r\n // The touch interaction occurs before the show timer is triggered.\r\n // We still want to show ripple effect.\r\n if (e.type === \"touchend\" && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n\r\n // re-queue ripple hiding\r\n var timerHandler: TimerHandler = () => rippleHide(e);\r\n element._ripple.showTimer = setTimeout(timerHandler);\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (element._ripple) {\r\n element._ripple.touched = false;\r\n }\r\n });\r\n ripples.hide(element);\r\n}\r\n\r\nfunction rippleCancelShow(e: MouseEvent | TouchEvent) {\r\n const element = e.currentTarget as HTMLElement | undefined;\r\n\r\n if (!element || !element._ripple) return;\r\n\r\n if (element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit = null;\r\n }\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n}\r\n\r\nfunction keyboardRippleShow(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (\r\n !target[\"keyboardRipple\"] &&\r\n (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)\r\n ) {\r\n target[\"keyboardRipple\"] = true;\r\n rippleShow(e);\r\n }\r\n}\r\n\r\nfunction keyboardRippleHide(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n}\r\n\r\nfunction focusRippleHide(e: FocusEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (target[\"keyboardRipple\"] === true) {\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n }\r\n}\r\nexport function updateRipple(\r\n el: HTMLElement,\r\n options: RippleOptions | null,\r\n wasEnabled: boolean\r\n) {\r\n let enabled = false;\r\n if (options) {\r\n enabled = true;\r\n } else {\r\n ripples.hide(el);\r\n }\r\n\r\n const value = options || {};\r\n el._ripple = el._ripple || {};\r\n el._ripple.enabled = enabled;\r\n el._ripple = {\r\n ...el._ripple,\r\n centered: value.center,\r\n class: value.class,\r\n circle: value.circle,\r\n };\r\n\r\n if (enabled && !wasEnabled) {\r\n el.addEventListener(\"touchstart\", rippleShow, { passive: true });\r\n el.addEventListener(\"touchend\", rippleHide, { passive: true });\r\n el.addEventListener(\"touchmove\", rippleCancelShow, { passive: true });\r\n el.addEventListener(\"touchcancel\", rippleHide);\r\n\r\n el.addEventListener(\"mousedown\", rippleShow);\r\n el.addEventListener(\"mouseup\", rippleHide);\r\n el.addEventListener(\"mouseleave\", rippleHide);\r\n\r\n el.addEventListener(\"keydown\", keyboardRippleShow);\r\n el.addEventListener(\"keyup\", keyboardRippleHide);\r\n\r\n el.addEventListener(\"blur\", focusRippleHide);\r\n\r\n // Anchor tags can be dragged, causes other hides to fail - #1537\r\n el.addEventListener(\"dragstart\", rippleHide, { passive: true });\r\n } else if (!enabled && wasEnabled) {\r\n removeListeners(el);\r\n }\r\n}\r\n\r\nexport function removeListeners(el: HTMLElement) {\r\n el.removeEventListener(\"mousedown\", rippleShow);\r\n el.removeEventListener(\"touchstart\", rippleShow);\r\n el.removeEventListener(\"touchend\", rippleHide);\r\n el.removeEventListener(\"touchmove\", rippleCancelShow);\r\n el.removeEventListener(\"touchcancel\", rippleHide);\r\n el.removeEventListener(\"mouseup\", rippleHide);\r\n el.removeEventListener(\"mouseleave\", rippleHide);\r\n el.removeEventListener(\"keydown\", keyboardRippleShow);\r\n el.removeEventListener(\"keyup\", keyboardRippleHide);\r\n el.removeEventListener(\"dragstart\", rippleHide);\r\n el.removeEventListener(\"blur\", focusRippleHide);\r\n el._ripple.enabled = false;\r\n}\r\n","import debounceIt from \"just-debounce-it\";\r\nimport throttle from \"just-throttle\";\r\n\r\nimport { parseDragEvent, parseTouchEvent, touchEvents } from \"./events/EventType\";\r\nimport { registerExtraEvents } from \"./events/index\";\r\nimport registerRippleObserver from \"./ripple\";\r\nimport { canUseDom, getBlazorId, getDom, getElementSelector } from \"./utils/helper\";\r\n\r\nwindow.onload = function () {\r\n registerExtraEvents();\r\n registerPasteWithData(\"pastewithdata\")\r\n registerRippleObserver();\r\n}\r\n\r\nexport function getZIndex(el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\nexport function getDomInfo(element, selector = \"body\") {\r\n var result = {};\r\n\r\n var dom = getDom(element);\r\n\r\n if (dom) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n // clone and set display not none because\r\n // element with display:none can not get the dom info\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n dom.parentElement.appendChild(cloned);\r\n\r\n result = getDomInfoObj(cloned);\r\n\r\n dom.parentElement.removeChild(cloned);\r\n } else {\r\n result = getDomInfoObj(dom);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction getDomInfoObj(dom: HTMLElement) {\r\n var result = {};\r\n result[\"offsetTop\"] = dom.offsetTop || 0;\r\n result[\"offsetLeft\"] = dom.offsetLeft || 0;\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n result[\"scrollWidth\"] = dom.scrollWidth || 0;\r\n result[\"scrollLeft\"] = dom.scrollLeft || 0;\r\n result[\"scrollTop\"] = dom.scrollTop || 0;\r\n result[\"clientTop\"] = dom.clientTop || 0;\r\n result[\"clientLeft\"] = dom.clientLeft || 0;\r\n result[\"clientHeight\"] = dom.clientHeight || 0;\r\n result[\"clientWidth\"] = dom.clientWidth || 0;\r\n var position = getElementPos(dom);\r\n result[\"offsetWidth\"] = Math.round(position.offsetWidth) || 0;\r\n result[\"offsetHeight\"] = Math.round(position.offsetHeight) || 0;\r\n result[\"relativeTop\"] = Math.round(position.relativeTop) || 0;\r\n result[\"relativeBottom\"] = Math.round(position.relativeBottom) || 0;\r\n result[\"relativeLeft\"] = Math.round(position.relativeLeft) || 0;\r\n result[\"relativeRight\"] = Math.round(position.relativeRight) || 0;\r\n result[\"absoluteLeft\"] = Math.round(position.absoluteLeft) || 0;\r\n result[\"absoluteTop\"] = Math.round(position.absoluteTop) || 0;\r\n return result;\r\n}\r\n\r\nfunction getElementPos(element) {\r\n var res: any = new Object();\r\n res.x = 0;\r\n res.y = 0;\r\n if (element !== null) {\r\n if (element.getBoundingClientRect) {\r\n var viewportElement = document.documentElement;\r\n var box = element.getBoundingClientRect();\r\n var scrollLeft = viewportElement.scrollLeft;\r\n var scrollTop = viewportElement.scrollTop;\r\n\r\n res.offsetWidth = box.width;\r\n res.offsetHeight = box.height;\r\n res.relativeTop = box.top;\r\n res.relativeBottom = box.bottom;\r\n res.relativeLeft = box.left;\r\n res.relativeRight = box.right;\r\n res.absoluteLeft = box.left + scrollLeft;\r\n res.absoluteTop = box.top + scrollTop;\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nexport function getParentClientWidthOrWindowInnerWidth(element: HTMLElement) {\r\n return element.parentElement ? element.parentElement.clientWidth : window.innerWidth;\r\n}\r\n\r\nexport function triggerEvent(elOrString, eventName: string, eventType: string, stopPropagation: boolean) {\r\n var dom = getDom(elOrString);\r\n var evt = document.createEvent(eventName);\r\n evt.initEvent(eventType);\r\n\r\n if (stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n return dom.dispatchEvent(evt);\r\n}\r\n\r\nexport function setProperty(elOrString, name, value) {\r\n var dom = getDom(elOrString);\r\n dom[name] = value;\r\n}\r\n\r\nexport function getBoundingClientRect(elOrString, attach = \"body\") {\r\n let dom = getDom(elOrString);\r\n\r\n var result = {};\r\n\r\n if (dom && dom.getBoundingClientRect) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n document.querySelector(attach)?.appendChild(cloned);\r\n\r\n result = cloned.getBoundingClientRect();\r\n\r\n document.querySelector(attach)?.removeChild(cloned);\r\n } else {\r\n result = dom.getBoundingClientRect();\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvar htmlElementEventListenerConfigs: { [prop: string]: HtmlElementEventListenerConfig[] } = {}\r\n\r\ntype HtmlElementEventListenerConfig = {\r\n listener?: (args: any) => void;\r\n options?: any;\r\n handle?: DotNet.DotNetObject;\r\n}\r\n\r\nexport function addHtmlElementEventListener(\r\n selector: \"window\" | \"document\" | K,\r\n type: string,\r\n invoker: DotNet.DotNetObject,\r\n options?: boolean | AddEventListenerOptions,\r\n extras?: Partial> & { relatedTarget?: string, throttle?: number, debounce?: number, key?: string }) {\r\n let htmlElement: HTMLElement | Window\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n if (!htmlElement) {\r\n // throw new Error(\"Unable to find the element.\");\r\n return false;\r\n }\r\n\r\n var key = extras?.key || `${selector}:${type}`;\r\n\r\n //save for remove\r\n const config: HtmlElementEventListenerConfig = {};\r\n\r\n var listener = (e: any): void => {\r\n if (extras?.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n\r\n if ((typeof e.cancelable !== \"boolean\" || e.cancelable) && extras?.preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // mouseleave relatedTarget\r\n if (extras?.relatedTarget && document.querySelector(extras.relatedTarget)?.contains(e.relatedTarget)) {\r\n return;\r\n }\r\n\r\n let obj: any = {}\r\n\r\n if (touchEvents.includes(e.type)) {\r\n obj = parseTouchEvent(e)\r\n } else {\r\n for (var k in e) {\r\n if (typeof e[k] == 'string' || typeof e[k] == 'number') {\r\n obj[k] = e[k];\r\n }\r\n }\r\n }\r\n\r\n if (e.target && e.target !== window && e.target !== document) {\r\n obj.target = {}\r\n const target = e.target as HTMLElement;\r\n const elementReferenceId = target.getAttributeNames().find(a => a.startsWith('_bl_'));\r\n if (elementReferenceId) {\r\n obj.target['elementReferenceId'] = elementReferenceId\r\n obj.target['selector'] = `[${elementReferenceId}]`\r\n } else {\r\n obj.target['selector'] = getElementSelector(target)\r\n }\r\n\r\n obj.target['class'] = target.getAttribute('class')\r\n }\r\n\r\n invoker.invokeMethodAsync('Invoke', obj);\r\n };\r\n\r\n if (extras?.debounce && extras.debounce > 0) {\r\n config.listener = debounceIt(listener, extras.debounce)\r\n } else if (extras?.throttle && extras.throttle > 0) {\r\n config.listener = throttle(listener, extras.throttle, { trailing: true })\r\n } else {\r\n config.listener = listener;\r\n }\r\n\r\n config.options = options;\r\n config.handle = invoker\r\n\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].push(config);\r\n } else {\r\n htmlElementEventListenerConfigs[key] = [config]\r\n }\r\n\r\n htmlElement.addEventListener(type, config.listener, config.options);\r\n\r\n return true;\r\n}\r\n\r\nexport function removeHtmlElementEventListener(selector, type, k?: string) {\r\n let htmlElement: any\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var k = k || `${selector}:${type}`;\r\n\r\n var configs = htmlElementEventListenerConfigs[k];\r\n\r\n if (configs) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n htmlElement?.removeEventListener(type, item.listener, item.options);\r\n });\r\n\r\n htmlElementEventListenerConfigs[k] = []\r\n }\r\n}\r\n\r\nexport function addMouseleaveEventListener(selector) {\r\n var htmlElement = document.querySelector(selector);\r\n if (htmlElement) {\r\n htmlElement.addEventListener()\r\n }\r\n}\r\n\r\nexport function contains(e1, e2) {\r\n const dom1 = getDom(e1);\r\n if (dom1 && dom1.contains) {\r\n return dom1.contains(getDom(e2));\r\n }\r\n return false;\r\n}\r\n\r\nexport function equalsOrContains(e1: any, e2: any) {\r\n const dom1 = getDom(e1);\r\n const dom2 = getDom(e2);\r\n return !!dom1 && dom1.contains && !!dom2 && (dom1 == dom2 || dom1.contains(dom2));\r\n}\r\n\r\nfunction fallbackCopyTextToClipboard(text) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n}\r\n\r\nexport function copy(text) {\r\n if (!navigator.clipboard) {\r\n fallbackCopyTextToClipboard(text);\r\n return;\r\n }\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function focus(elOrString, preventScroll: boolean = false) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLElement)) {\r\n console.error(\"Unable to focus an invalid element\");\r\n } else {\r\n dom.focus({ preventScroll });\r\n }\r\n}\r\n\r\nexport function select(elOrString) {\r\n let dom = getDom(elOrString);\r\n if (!(dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement))\r\n throw new Error(\"Unable to select an invalid element\")\r\n dom.select()\r\n}\r\n\r\nexport function hasFocus(selector) {\r\n let dom = getDom(selector);\r\n return (document.activeElement === dom);\r\n}\r\n\r\nexport function blur(selector) {\r\n let dom = getDom(selector);\r\n dom.blur();\r\n}\r\n\r\nexport function log(text) {\r\n console.log(text);\r\n}\r\n\r\nexport function scrollIntoView(target, arg?: boolean | ScrollIntoViewOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n if (arg === null || arg == undefined) {\r\n dom.scrollIntoView();\r\n } else if (typeof arg === 'boolean') {\r\n dom.scrollIntoView(arg);\r\n } else {\r\n dom.scrollIntoView({\r\n block: arg.block == null ? undefined : arg.block,\r\n inline: arg.inline == null ? undefined : arg.inline,\r\n behavior: arg.behavior\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport function scrollIntoParentView(\r\n target,\r\n inline = false,\r\n start = false,\r\n level = 1,\r\n behavior: ScrollBehavior = \"smooth\",\r\n) {\r\n const dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n let parent: HTMLElement = dom;\r\n while (level > 0) {\r\n parent = parent.parentElement;\r\n level--;\r\n if (!parent) {\r\n return;\r\n }\r\n }\r\n\r\n const options: ScrollToOptions = {\r\n behavior,\r\n };\r\n\r\n if (inline) {\r\n if (start) {\r\n options.left = dom.offsetLeft\r\n } else {\r\n const to = dom.offsetLeft - parent.offsetLeft;\r\n if (to - parent.scrollLeft < 0) {\r\n options.left = to;\r\n } else if (\r\n to + dom.offsetWidth - parent.scrollLeft >\r\n parent.offsetWidth\r\n ) {\r\n options.left = to + dom.offsetWidth - parent.offsetWidth;\r\n }\r\n }\r\n } else {\r\n if (start) {\r\n options.top = dom.offsetTop;\r\n } else {\r\n const to = dom.offsetTop - parent.offsetTop;\r\n if (to - parent.scrollTop < 0) {\r\n options.top = to;\r\n } else if (\r\n to + dom.offsetHeight - parent.scrollTop >\r\n parent.offsetHeight\r\n ) {\r\n options.top = to + dom.offsetHeight - parent.offsetHeight;\r\n }\r\n }\r\n }\r\n\r\n if (options.left || options.top) {\r\n parent.scrollTo(options);\r\n }\r\n }\r\n}\r\n\r\nexport function scrollTo(target, options: ScrollToOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n const o = {\r\n left: options.left === null ? undefined : options.left,\r\n top: options.top === null ? undefined : options.top,\r\n behavior: options.behavior\r\n }\r\n dom.scrollTo(o)\r\n }\r\n}\r\n\r\nexport function scrollToTarget(\r\n target: string,\r\n container: string = null,\r\n offset: number = 0\r\n) {\r\n const targetEl: HTMLElement = document.querySelector(target);\r\n if (targetEl) {\r\n let top ;\r\n if (container) {\r\n top = targetEl.offsetTop;\r\n } else {\r\n top = targetEl.getBoundingClientRect().top + window.scrollY;\r\n }\r\n const containerEl = container\r\n ? document.querySelector(container)\r\n : document.documentElement\r\n containerEl.scrollTo({\r\n top: top - offset,\r\n behavior: \"smooth\",\r\n });\r\n }\r\n}\r\n\r\nexport function scrollToElement(target, offset: number, behavior?: ScrollBehavior) {\r\n const dom = getDom(target)\r\n if (!dom) return;\r\n const domPosition = dom.getBoundingClientRect().top;\r\n const offsetPosition = domPosition + window.pageYOffset - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: behavior\r\n })\r\n}\r\n\r\nexport function scrollToActiveElement(\r\n container,\r\n element = \".active\",\r\n position: \"center\" | number = \"center\"\r\n) {\r\n let containerEl: HTMLElement = getDom(container);\r\n\r\n let activeEl: HTMLElement\r\n if (typeof element === 'string') {\r\n activeEl = container.querySelector(element)\r\n }\r\n\r\n if (!containerEl || !activeEl) {\r\n return;\r\n }\r\n\r\n if (position === 'center') {\r\n containerEl.scrollTop = activeEl.offsetTop - containerEl.offsetHeight / 2 + activeEl.offsetHeight / 2;\r\n }\r\n else {\r\n containerEl.scrollTop = activeEl.offsetTop - position\r\n }\r\n}\r\n\r\nexport function addClsToFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeClsFromFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.remove(className);\r\n }\r\n}\r\n\r\nexport function getAbsoluteTop(e) {\r\n var offset = e.offsetTop;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteTop(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function getAbsoluteLeft(e) {\r\n var offset = e.offsetLeft;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteLeft(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function addElementToBody(element) {\r\n document.body.appendChild(element);\r\n}\r\n\r\nexport function delElementFromBody(element) {\r\n document.body.removeChild(element);\r\n}\r\n\r\nexport function addElementTo(addElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && addElement) {\r\n parent.appendChild(addElement);\r\n }\r\n}\r\n\r\nexport function delElementFrom(delElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && delElement) {\r\n parent.removeChild(delElement);\r\n }\r\n}\r\n\r\nexport function getActiveElement() {\r\n let element = document.activeElement;\r\n let id = element.getAttribute(\"id\") || \"\";\r\n return id;\r\n}\r\n\r\nexport function focusDialog(selector: string, count: number = 0) {\r\n let ele = document.querySelector(selector);\r\n if (ele && !ele.hasAttribute(\"disabled\")) {\r\n setTimeout(() => {\r\n ele.focus();\r\n let curId = \"#\" + getActiveElement();\r\n if (curId !== selector) {\r\n if (count < 10) {\r\n focusDialog(selector, count + 1);\r\n }\r\n }\r\n }, 10);\r\n }\r\n}\r\n\r\nexport function getWindow() {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n pageXOffset: window.pageXOffset,\r\n pageYOffset: window.pageYOffset,\r\n isTop: window.scrollY == 0,\r\n isBottom: (window.scrollY + window.innerHeight) == document.body.clientHeight\r\n };\r\n}\r\n\r\nexport function getWindowAndDocumentProps(windowProps: string[] = [], documentProps: string[] = []) {\r\n const obj = {}\r\n\r\n if (windowProps) {\r\n windowProps.forEach(prop => obj[prop] = window[prop]);\r\n obj['pageYOffset'] = getPageYOffset();\r\n }\r\n\r\n if (documentProps) {\r\n documentProps.forEach(prop => obj[prop] = document.documentElement[prop]);\r\n }\r\n\r\n return obj\r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n var timeout;\r\n return () => {\r\n const context = this, args = arguments;\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func.apply(this, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n};\r\n\r\nexport function css(element: any, name: string | object, value: string | null = null) {\r\n var dom = getDom(element);\r\n if (typeof name === 'string') {\r\n dom.style[name] = value;\r\n } else {\r\n for (let key in name) {\r\n if (name.hasOwnProperty(key)) {\r\n dom.style[key] = name[key];\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function addCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.add(clsName);\r\n } else {\r\n element.classList.add(...clsName);\r\n }\r\n}\r\n\r\nexport function removeCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.remove(clsName);\r\n } else {\r\n element.classList.remove(...clsName);\r\n }\r\n}\r\n\r\nexport function elementScrollIntoView(selector: Element | string) {\r\n let element = getDom(selector);\r\n\r\n if (!element)\r\n return;\r\n\r\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n}\r\n\r\nconst hasScrollbar = () => {\r\n let overflow = document.body.style.overflow;\r\n if (overflow && overflow === \"hidden\") return false;\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\nexport function getScroll() {\r\n return { x: window.pageXOffset, y: window.pageYOffset };\r\n}\r\n\r\nfunction isElement(node: Element) {\r\n const ELEMENT_NODE_TYPE = 1;\r\n return (\r\n node.tagName !== \"HTML\" &&\r\n node.tagName !== \"BODY\" &&\r\n node.nodeType == ELEMENT_NODE_TYPE\r\n )\r\n}\r\n\r\nexport function getScrollParent(el: Element | undefined, root: HTMLElement | Window | undefined = undefined) {\r\n root ??= canUseDom ? window : undefined;\r\n\r\n let node = el;\r\n while (node && node !== root && isElement(node)) {\r\n const { overflowY } = window.getComputedStyle(node);\r\n if (/scroll|auto|overlay/i.test(overflowY)) {\r\n return node;\r\n }\r\n\r\n node = node.parentNode as Element;\r\n }\r\n\r\n return root;\r\n}\r\n\r\nexport function getScrollTop(el: HTMLElement | Window): number {\r\n const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;\r\n\r\n // iOS scroll bounce cause minus scrollTop\r\n return Math.max(top, 0);\r\n}\r\n\r\nexport function getInnerText(element) {\r\n let dom = getDom(element);\r\n return dom.innerText;\r\n}\r\n\r\nexport function getMenuOrDialogMaxZIndex(exclude: Element[] = [], element: Element) {\r\n const base = getDom(element);\r\n // Start with lowest allowed z-index or z-index of\r\n // base component's element, whichever is greater\r\n const zis = [getZIndex(base)]\r\n\r\n const activeElements = [\r\n ...document.getElementsByClassName('m-menu__content--active'),\r\n ...document.getElementsByClassName('m-dialog__content--active'),\r\n ]\r\n\r\n // Get z-index for all active dialogs\r\n for (let index = 0; index < activeElements.length; index++) {\r\n if (!exclude.includes(activeElements[index])) {\r\n zis.push(getZIndex(activeElements[index]))\r\n }\r\n }\r\n\r\n return Math.max(...zis)\r\n}\r\n\r\nexport function getMaxZIndex() {\r\n return [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)\r\n}\r\n\r\nexport function getStyle(element, styleProp) {\r\n element = getDom(element);\r\n\r\n if (element.currentStyle) {\r\n return element.currentStyle[styleProp];\r\n } else if (window.getComputedStyle) {\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\r\n }\r\n}\r\n\r\nexport function getTextAreaInfo(element) {\r\n var result = {};\r\n var dom = getDom(element);\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n\r\n if (element.currentStyle) {\r\n result[\"lineHeight\"] = parseFloat(element.currentStyle[\"line-height\"]);\r\n result[\"paddingTop\"] = parseFloat(element.currentStyle[\"padding-top\"]);\r\n result[\"paddingBottom\"] = parseFloat(element.currentStyle[\"padding-bottom\"]);\r\n result[\"borderBottom\"] = parseFloat(element.currentStyle[\"border-bottom\"]);\r\n result[\"borderTop\"] = parseFloat(element.currentStyle[\"border-top\"]);\r\n } else if (window.getComputedStyle) {\r\n result[\"lineHeight\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"line-height\"));\r\n result[\"paddingTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-top\"));\r\n result[\"paddingBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-bottom\"));\r\n result[\"borderBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-bottom\"));\r\n result[\"borderTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-top\"));\r\n }\r\n //Firefox can return this as NaN, so it has to be handled here like that.\r\n if (Object.is(NaN, result[\"borderTop\"]))\r\n result[\"borderTop\"] = 1;\r\n if (Object.is(NaN, result[\"borderBottom\"]))\r\n result[\"borderBottom\"] = 1;\r\n return result;\r\n}\r\n\r\nconst objReferenceDict = {};\r\n\r\nexport function disposeObj(objReferenceName) {\r\n delete objReferenceDict[objReferenceName];\r\n}\r\n\r\nexport function upsertThemeStyle(id: string, style: string) {\r\n const d = document.getElementById(id);\r\n if (d) {\r\n document.head.removeChild(d);\r\n }\r\n\r\n const d_style = document.createElement('style')\r\n d_style.id = id;\r\n d_style.type = \"text/css\";\r\n d_style.innerHTML = style;\r\n\r\n document.head.insertAdjacentElement('beforeend', d_style)\r\n}\r\n\r\nexport function getImageDimensions(src: string) {\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image()\r\n img.src = src\r\n img.onload = function () {\r\n resolve({\r\n width: img.width,\r\n height: img.height,\r\n hasError: false\r\n })\r\n }\r\n img.onerror = function () {\r\n resolve({\r\n width: 0,\r\n height: 0,\r\n hasError: true\r\n })\r\n }\r\n })\r\n}\r\n\r\nexport function enablePreventDefaultForEvent(element: any, event: string, condition?: any) {\r\n const dom = getDom(element);\r\n if (!dom) return;\r\n if (event === 'keydown') {\r\n dom.addEventListener(event, (e: KeyboardEvent) => {\r\n if (Array.isArray(condition)) {\r\n var codes = condition as string[];\r\n if (codes.includes(e.code)) {\r\n e.preventDefault();\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n })\r\n } else {\r\n dom.addEventListener(event, e => {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getBoundingClientRects(selector) {\r\n var elements = document.querySelectorAll(selector);\r\n\r\n var result = [];\r\n\r\n for (var i = 0; i < elements.length; i++) {\r\n var e: Element = elements[i];\r\n var dom = {\r\n id: e.id,\r\n rect: e.getBoundingClientRect()\r\n };\r\n result.push(dom);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getSize(selectors, sizeProp) {\r\n var el = getDom(selectors);\r\n\r\n var display = el.style.display;\r\n var overflow = el.style.overflow;\r\n\r\n el.style.display = \"\";\r\n el.style.overflow = \"hidden\";\r\n\r\n var size = el[\"offset\" + sizeProp.charAt(0).toUpperCase() + sizeProp.slice(1)] || 0;\r\n\r\n el.style.display = display;\r\n el.style.overflow = overflow;\r\n\r\n return size;\r\n}\r\n\r\nexport function getProp(elOrString, name) {\r\n if (elOrString === 'window') {\r\n return window[name];\r\n }\r\n\r\n var el = getDom(elOrString);\r\n if (!el) {\r\n return null;\r\n }\r\n\r\n return el[name];\r\n}\r\n\r\nexport function updateWindowTransition(selectors, isActive, item) {\r\n var el: HTMLElement = getDom(selectors);\r\n var container: HTMLElement = el.querySelector('.m-window__container');\r\n\r\n if (item) {\r\n var itemEl: HTMLElement = getDom(item);\r\n container.style.height = itemEl.clientHeight + 'px';\r\n return;\r\n }\r\n\r\n if (isActive) {\r\n container.classList.add('m-window__container--is-active');\r\n container.style.height = el.clientHeight + 'px';\r\n } else {\r\n container.style.height = '';\r\n container.classList.remove('m-window__container--is-active');\r\n }\r\n}\r\n\r\nexport function getScrollHeightWithoutHeight(elOrString) {\r\n var el: HTMLElement = getDom(elOrString);\r\n if (!el) {\r\n return 0;\r\n }\r\n\r\n var height = el.style.height;\r\n el.style.height = '0'\r\n var scrollHeight = el.scrollHeight;\r\n el.style.height = height;\r\n\r\n return scrollHeight;\r\n}\r\n\r\nfunction registerPasteWithData(customEventName) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(customEventName, {\r\n browserEventName: 'paste',\r\n createEventArgs: (event: ClipboardEvent) => {\r\n return {\r\n type: event.type,\r\n pastedData: event.clipboardData.getData('text')\r\n };\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function registerTextFieldOnMouseDown(element, inputElement, callback) {\r\n if (!element || !inputElement) return\r\n\r\n const listener = (e: MouseEvent) => {\r\n const target = e.target;\r\n const inputDom = getDom(inputElement);\r\n if (target !== inputDom) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n if (callback) {\r\n const mouseEventArgs = {\r\n Detail: e.detail,\r\n ScreenX: e.screenX,\r\n ScreenY: e.screenY,\r\n ClientX: e.clientX,\r\n ClientY: e.clientY,\r\n OffsetX: e.offsetX,\r\n OffsetY: e.offsetY,\r\n PageX: e.pageX,\r\n PageY: e.pageY,\r\n Button: e.button,\r\n Buttons: e.buttons,\r\n CtrlKey: e.ctrlKey,\r\n ShiftKey: e.shiftKey,\r\n AltKey: e.altKey,\r\n MetaKey: e.metaKey,\r\n Type: e.type\r\n }\r\n\r\n callback.invokeMethodAsync('Invoke', mouseEventArgs);\r\n }\r\n };\r\n\r\n element.addEventListener('mousedown', listener)\r\n\r\n const config: HtmlElementEventListenerConfig = {\r\n listener,\r\n handle: callback\r\n };\r\n\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n htmlElementEventListenerConfigs[key] = [config]\r\n}\r\n\r\nexport function unregisterTextFieldOnMouseDown(element: HTMLElement) {\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n const configs = htmlElementEventListenerConfigs[key]\r\n if (configs && configs.length) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n if (element) {\r\n element.removeEventListener(\"mousedown\", item.listener);\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function containsActiveElement(selector) {\r\n var el = getDom(selector);\r\n if (el && el.contains) {\r\n return el.contains(document.activeElement);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function copyChild(el) {\r\n if (typeof el === 'string') {\r\n el = document.querySelector(el);\r\n }\r\n\r\n if (!el) return;\r\n\r\n el.setAttribute('contenteditable', 'true');\r\n el.focus();\r\n document.execCommand('selectAll', false, null);\r\n document.execCommand('copy');\r\n document.execCommand('unselect');\r\n el.blur();\r\n el.removeAttribute('contenteditable');\r\n}\r\n\r\nexport function copyText(text) {\r\n if (!navigator.clipboard) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n textArea.readOnly = true;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n return;\r\n }\r\n\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function getMenuableDimensions(hasActivator, activatorSelector, isDefaultAttach, contentElement, attached, attachSelector) {\r\n if (!attached) {\r\n var container = document.querySelector(attachSelector);\r\n if (contentElement.nodeType) {\r\n container.appendChild(contentElement);\r\n }\r\n }\r\n\r\n var dimensions = {\r\n activator: {} as any,\r\n content: {} as any,\r\n relativeYOffset: 0,\r\n offsetParentLeft: 0\r\n };\r\n\r\n if (hasActivator) {\r\n var activator = document.querySelector(activatorSelector);\r\n dimensions.activator = measure(activator, isDefaultAttach)\r\n dimensions.activator.offsetLeft = activator.offsetLeft\r\n if (!isDefaultAttach) {\r\n // account for css padding causing things to not line up\r\n // this is mostly for v-autocomplete, hopefully it won't break anything\r\n dimensions.activator.offsetTop = activator.offsetTop\r\n } else {\r\n dimensions.activator.offsetTop = 0\r\n }\r\n }\r\n\r\n sneakPeek(() => {\r\n if (contentElement) {\r\n if (contentElement.offsetParent) {\r\n const offsetRect = getRoundedBoundedClientRect(contentElement.offsetParent)\r\n dimensions.relativeYOffset = getPageYOffset() + offsetRect.top\r\n\r\n if (hasActivator) {\r\n dimensions.activator.top -= dimensions.relativeYOffset\r\n dimensions.activator.left -= window.pageXOffset + offsetRect.left\r\n } else {\r\n dimensions.offsetParentLeft = offsetRect.left\r\n }\r\n }\r\n\r\n dimensions.content = measure(contentElement, isDefaultAttach)\r\n dimensions.content.offsetLeft = contentElement.offsetLeft\r\n dimensions.content.offsetTop = contentElement.offsetTop\r\n }\r\n }, contentElement);\r\n\r\n return dimensions;\r\n}\r\n\r\nfunction getPageYOffset() {\r\n let pageYOffset = window.pageYOffset\r\n const blockedScrollY = parseInt(document.documentElement.style.getPropertyValue('--m-body-scroll-y'))\r\n if (blockedScrollY) {\r\n pageYOffset += Math.abs(blockedScrollY);\r\n }\r\n return pageYOffset\r\n}\r\n\r\nfunction measure(el: HTMLElement, isDefaultAttach) {\r\n if (!el) return {}\r\n\r\n const rect = getRoundedBoundedClientRect(el)\r\n\r\n // Account for activator margin\r\n if (!isDefaultAttach) {\r\n const style = window.getComputedStyle(el)\r\n\r\n rect.left = parseInt(style.marginLeft!)\r\n rect.top = parseInt(style.marginTop!)\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getRoundedBoundedClientRect(el: Element) {\r\n if (!el || !el.nodeType) {\r\n return null\r\n }\r\n\r\n const rect = el.getBoundingClientRect()\r\n return {\r\n top: Math.round(rect.top),\r\n left: Math.round(rect.left),\r\n bottom: Math.round(rect.bottom),\r\n right: Math.round(rect.right),\r\n width: Math.round(rect.width),\r\n height: Math.round(rect.height),\r\n }\r\n}\r\n\r\nfunction sneakPeek(cb: () => void, el) {\r\n if (!el || !el.style || el.style.display !== 'none') {\r\n cb()\r\n return\r\n }\r\n\r\n el.style.display = 'inline-block'\r\n cb()\r\n el.style.display = 'none'\r\n}\r\n\r\nexport function invokeMultipleMethod(windowProps, documentProps, hasActivator, activatorSelector, attach, contentElement, attached, attachSelector, element) {\r\n var multipleResult = {\r\n windowAndDocument: null,\r\n dimensions: null,\r\n zIndex: 0\r\n };\r\n\r\n multipleResult.windowAndDocument = getWindowAndDocumentProps(windowProps, documentProps);\r\n multipleResult.dimensions = getMenuableDimensions(hasActivator, activatorSelector, attach, contentElement, attached, attachSelector);\r\n multipleResult.zIndex = getMenuOrDialogMaxZIndex([contentElement], element);\r\n\r\n return multipleResult;\r\n}\r\n\r\nexport function registerOTPInputOnInputEvent(elementList, callback) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const inputListener = (e: Event) => otpInputOnInputEvent(e, i, elementList, callback);\r\n const focusListener = (e: Event) => otpInputFocusEvent(e, i, elementList);\r\n const keyupListener =(e: KeyboardEvent) => otpInputKeyupEvent(e, i, elementList, callback);\r\n\r\n elementList[i].addEventListener('input', inputListener);\r\n elementList[i].addEventListener('focus', focusListener);\r\n elementList[i].addEventListener('keyup', keyupListener);\r\n\r\n elementList[i]._optInput = {\r\n inputListener,\r\n focusListener,\r\n keyupListener\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputKeyupEvent(e: KeyboardEvent, otpIdx: number, elementList, callback) {\r\n e.preventDefault();\r\n const eventKey = e.key;\r\n if (eventKey === 'ArrowLeft' || eventKey === 'Backspace') {\r\n if (eventKey === 'Backspace') {\r\n const obj = {\r\n type: eventKey,\r\n index: otpIdx,\r\n value: ''\r\n }\r\n if (callback) {\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n otpInputFocus(otpIdx - 1, elementList);\r\n }\r\n else if (eventKey === 'ArrowRight') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n }\r\n}\r\n\r\nfunction otpInputFocus(focusIndex: number, elementList) {\r\n if (focusIndex < 0) {\r\n otpInputFocus(0, elementList);\r\n }\r\n else if (focusIndex >= elementList.length) {\r\n otpInputFocus(elementList.length - 1, elementList);\r\n }\r\n else {\r\n if (document.activeElement !== elementList[focusIndex]) {\r\n const element = getDom(elementList[focusIndex])\r\n element.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputFocusEvent(e: Event, otpIdx: number, elementList) {\r\n const element = getDom(elementList[otpIdx]) as HTMLInputElement;\r\n if (element && document.activeElement === element) {\r\n element.select();\r\n }\r\n}\r\n\r\nfunction otpInputOnInputEvent(e: Event, otpIdx: number, elementList, callback) {\r\n const target = e.target as HTMLInputElement;\r\n const value = target.value;\r\n\r\n if (value && value !== '') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n\r\n if (callback) {\r\n const obj = {\r\n type: 'Input',\r\n index: otpIdx,\r\n value: value\r\n }\r\n callback.invokeMethodAsync('Invoke', obj);\r\n }\r\n }\r\n}\r\n\r\nexport function unregisterOTPInputOnInputEvent(elementList) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const el = elementList[i]\r\n if(el && el._optInput) {\r\n el.removeEventListener('input', el._optInput.inputListener)\r\n el.removeEventListener('focus', el._optInput.focusListener)\r\n el.removeEventListener('keyup', el._optInput.keyupListener)\r\n }\r\n }\r\n}\r\n\r\nexport function getListIndexWhereAttributeExists(selector: string, attribute:string, value: string) {\r\n const tiles = document.querySelectorAll(selector);\r\n if (!tiles) {\r\n return -1;\r\n }\r\n\r\n let index = -1;\r\n for (let i = 0; i < tiles.length; i++) {\r\n if (tiles[i].getAttribute(attribute) === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n}\r\n\r\nexport function scrollToTile(contentSelector: string, tilesSelector: string, index: number, keyCode: string) {\r\n var tiles = document.querySelectorAll(tilesSelector)\r\n if (!tiles) return;\r\n\r\n let tile = tiles[index] as HTMLElement;\r\n\r\n if (!tile) return;\r\n\r\n const content = document.querySelector(contentSelector);\r\n if (!content) return;\r\n\r\n const scrollTop = content.scrollTop;\r\n const contentHeight = content.clientHeight;\r\n\r\n if (scrollTop > tile.offsetTop - 8) {\r\n content.scrollTo({ top: tile.offsetTop - tile.clientHeight, behavior: \"smooth\" })\r\n } else if (scrollTop + contentHeight < tile.offsetTop + tile.clientHeight + 8) {\r\n content.scrollTo({ top: tile.offsetTop - contentHeight + tile.clientHeight * 2, behavior: \"smooth\" })\r\n }\r\n}\r\n\r\nexport function getElementTranslateY(element) {\r\n const style = window.getComputedStyle(element);\r\n const transform = style.transform || style.webkitTransform;\r\n const translateY = transform.slice(7, transform.length - 1).split(', ')[5];\r\n\r\n return Number(translateY);\r\n}\r\n\r\nfunction isWindow(element: any | Window): element is Window {\r\n return element === window\r\n}\r\n\r\nexport function checkIfThresholdIsExceededWhenScrolling(el: Element, parent: any, threshold: number) {\r\n if (!el || !parent) return\r\n\r\n let parentElement: HTMLElement | Window\r\n\r\n if (parent == \"window\") {\r\n parentElement = window;\r\n } else if (parent == \"document\") {\r\n parentElement = document.documentElement;\r\n } else {\r\n parentElement = document.querySelector(parent);\r\n }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const elementTop = rect.top;\r\n const current = isWindow(parentElement)\r\n ? window.innerHeight\r\n : parentElement.getBoundingClientRect().bottom\r\n\r\n return (current >= elementTop - threshold)\r\n}\r\n\r\nexport function get_top_domain() {\r\n var i, h,\r\n weird_cookie = 'weird_get_top_level_domain=cookie',\r\n hostname = document.location.hostname.split('.');\r\n for (i = hostname.length - 1; i >= 0; i--) {\r\n h = hostname.slice(i).join('.');\r\n document.cookie = weird_cookie + ';domain=.' + h + ';';\r\n if (document.cookie.indexOf(weird_cookie) > -1) {\r\n // We were able to store a cookie! This must be it\r\n document.cookie = weird_cookie.split('=')[0] + '=;domain=.' + h + ';expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n return h;\r\n }\r\n }\r\n}\r\n\r\nexport function setCookie(name, value) {\r\n if (value === null || value === undefined) {\r\n return;\r\n }\r\n\r\n var domain = get_top_domain();\r\n if (!domain) {\r\n domain = '';\r\n }else if (isNaN(domain[0])) {\r\n domain = `.${domain}`;\r\n }\r\n var Days = 30;\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);\r\n document.cookie = `${name}=${escape(value?.toString())};path=/;expires=${exp.toUTCString()};domain=${domain}`;\r\n}\r\n\r\nexport function getCookie(name) {\r\n const reg = new RegExp(`(^| )${name}=([^;]*)(;|$)`);\r\n const arr = document.cookie.match(reg);\r\n if (arr) {\r\n return unescape(arr[2]);\r\n }\r\n return null;\r\n}\r\n\r\nexport function registerDragEvent(el: HTMLElement, dataKey?: string) {\r\n if (el) {\r\n const blazorId = getBlazorId(el);\r\n const listener = (e: DragEvent) => {\r\n if (dataKey) {\r\n const dataValue = (e.target as HTMLElement).getAttribute(dataKey);\r\n e.dataTransfer.setData(dataKey, dataValue);\r\n e.dataTransfer.setData('offsetX', e.offsetX.toString())\r\n e.dataTransfer.setData('offsetY', e.offsetY.toString())\r\n }\r\n };\r\n const key = `${blazorId}:dragstart`;\r\n htmlElementEventListenerConfigs[key] = [{\r\n listener\r\n }];\r\n el.addEventListener(\"dragstart\", listener);\r\n }\r\n}\r\n\r\nexport function unregisterDragEvent(el: HTMLElement) {\r\n const blazorId = getBlazorId(el);\r\n if (blazorId) {\r\n const key = `${blazorId}:dragstart`;\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].forEach((config) => {\r\n el.removeEventListener(\"dragstart\", config.listener);\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function resizableDataTable(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n table.style.overflow = 'hidden';\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n if (!colResizeDiv) continue\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n\r\n let minWidth = (col.firstElementChild as HTMLElement).offsetWidth; // width of span\r\n minWidth = minWidth + 32 + 18 + 1 + 1; // 32:padding 18:sort\r\n if(!col.style.minWidth){\r\n col.minWidth = minWidth;\r\n col.style.minWidth = minWidth + \"px\";\r\n }\r\n\r\n setListeners(colResizeDiv);\r\n }\r\n\r\n function setListeners(div: HTMLDivElement) {\r\n let pageX:number\r\n let curCol: HTMLElement;\r\n let nxtCol: HTMLElement;\r\n let curColWidth: number;\r\n let nxtColWidth: number;\r\n let tableWidth: number;\r\n\r\n div.addEventListener('click', e => e.stopPropagation());\r\n\r\n div.addEventListener('mousedown', function (e) {\r\n curCol = (e.target as HTMLElement).parentElement;\r\n nxtCol = curCol.nextElementSibling as HTMLElement;\r\n pageX = e.pageX;\r\n\r\n tableWidth = table.offsetWidth;\r\n\r\n var padding = paddingDiff(curCol);\r\n\r\n curColWidth = curCol.offsetWidth - padding;\r\n if (nxtCol)\r\n nxtColWidth = nxtCol.offsetWidth - padding;\r\n });\r\n\r\n document.addEventListener(\"mousemove\", function (e) {\r\n if (curCol) {\r\n let diffX = e.pageX - pageX;\r\n\r\n const isRtl = dataTable.classList.contains(\"m-data-table--rtl\")\r\n if (isRtl) {\r\n diffX = 0 - diffX;\r\n }\r\n\r\n let newCurColWidth = curColWidth + diffX;\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n const isOverflow = dataTable.classList.contains(\r\n \"m-data-table--resizable-overflow\"\r\n );\r\n if (isOverflow) {\r\n table.style.width = tableWidth + diffX + \"px\";\r\n return;\r\n }\r\n\r\n const isIndependent = dataTable.classList.contains(\r\n \"m-data-table--resizable-independent\"\r\n );\r\n if (isIndependent) {\r\n let newNextColWidth = nxtColWidth - diffX;\r\n const twoColWidth = curColWidth + nxtColWidth;\r\n\r\n if (diffX > 0) {\r\n if (nxtCol) {\r\n if (newNextColWidth < nxtCol[\"minWidth\"]) {\r\n newNextColWidth = nxtCol[\"minWidth\"];\r\n newCurColWidth = twoColWidth - newNextColWidth;\r\n }\r\n }\r\n } else {\r\n if (newCurColWidth < curCol[\"minWidth\"]) {\r\n newCurColWidth = curCol[\"minWidth\"];\r\n newNextColWidth = twoColWidth - newCurColWidth;\r\n }\r\n }\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n if (nxtCol) {\r\n nxtCol.style.width = newNextColWidth + \"px\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n document.addEventListener('mouseup', function (e) {\r\n if (curCol) {\r\n for (let i = 0; i < cols.length; i++) {\r\n const col:any = cols[i];\r\n col.style.width = col['offsetWidth'] + \"px\"\r\n }\r\n }\r\n curCol = undefined;\r\n nxtCol = undefined;\r\n pageX = undefined;\r\n nxtColWidth = undefined;\r\n curColWidth = undefined;\r\n tableWidth = undefined;\r\n });\r\n }\r\n\r\n function paddingDiff(col) {\r\n if (getStyleVal(col, 'box-sizing') == 'border-box') {\r\n return 0;\r\n }\r\n\r\n var padLeft = getStyleVal(col, 'padding-left');\r\n var padRight = getStyleVal(col, 'padding-right');\r\n return (parseInt(padLeft) + parseInt(padRight));\r\n }\r\n\r\n function getStyleVal(elm, css) {\r\n return (window.getComputedStyle(elm, null).getPropertyValue(css))\r\n }\r\n}\r\n\r\nexport function updateDataTableResizeHeight(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n }\r\n}\r\n\r\nfunction stopPropagation(e) {\r\n e.stopPropagation();\r\n}\r\n\r\nexport function addStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.addEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function removeStopPropagationEvent(el: any, type: keyof HTMLElementEventMap) {\r\n const dom = getDom(el);\r\n dom.removeEventListener(type, stopPropagation);\r\n}\r\n\r\nexport function historyBack() {\r\n history.back();\r\n}\r\n\r\nexport function historyGo(delta: number) {\r\n history.go(delta);\r\n}\r\n\r\nexport function historyReplace(href) {\r\n history.replaceState(null, /*ignore title*/ '', href);\r\n}\r\n\r\nexport function registerTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = () => {\r\n const scrollWidth = wrapper.scrollWidth;\r\n const clientWidth = wrapper.clientWidth;\r\n const scrollLeft = wrapper.scrollLeft;\r\n\r\n const rtl = wrapper.parentElement.classList.contains('m-data-table--rtl');\r\n\r\n if (Math.abs(scrollWidth -((rtl ? -scrollLeft : scrollLeft) + clientWidth)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-left')\r\n wrapper.classList.add('scrolled-to-right');\r\n } else if (Math.abs(scrollLeft - (rtl ? scrollWidth - clientWidth : 0)) < 1) {\r\n wrapper.classList.remove('scrolling')\r\n wrapper.classList.remove('scrolled-to-right')\r\n wrapper.classList.add('scrolled-to-left');\r\n } else {\r\n wrapper.classList.remove('scrolled-to-right');\r\n wrapper.classList.remove('scrolled-to-left');\r\n wrapper.classList.add('scrolling');\r\n }\r\n }\r\n\r\n listener();\r\n\r\n wrapper.addEventListener('scroll', listener)\r\n wrapper[\"_m_table_scroll_event\"] = listener\r\n}\r\n\r\nexport function unregisterTableScrollEvent(wrapper: HTMLElement) {\r\n const listener = wrapper[\"_m_table_scroll_event\"]\r\n if (listener) {\r\n wrapper.removeEventListener('scroll', listener)\r\n delete wrapper[\"_m_table_scroll_event\"]\r\n }\r\n}\r\n\r\nexport function updateTabSlider(\r\n sliderWrapper: HTMLElement,\r\n tab: HTMLElement,\r\n sliderSize: number,\r\n vertical: boolean,\r\n isReversed: boolean\r\n) {\r\n if (!sliderWrapper) {\r\n console.warn('[MTab] the element of slider wrapper is not found')\r\n return;\r\n }\r\n\r\n if (!tab) {\r\n console.warn('[MTab] the element of tab to be activated is not found')\r\n return;\r\n }\r\n\r\n const height = !vertical ? sliderSize : tab.scrollHeight;\r\n const left = vertical ? 0 : tab.offsetLeft;\r\n const right = vertical ? 0 : tab.offsetLeft + tab.offsetWidth;\r\n const top = tab.offsetTop;\r\n const width = vertical ? sliderSize : tab.clientWidth;\r\n sliderWrapper.style.width = `${width}px`;\r\n sliderWrapper.style.height = `${height}px`;\r\n if (!isReversed) {\r\n sliderWrapper.style.left = `${left}px`;\r\n }\r\n if (isReversed) {\r\n sliderWrapper.style.right = `${right}px`;\r\n }\r\n if (vertical) {\r\n sliderWrapper.style.top = `${top}px`;\r\n }\r\n}\r\n\r\nexport function isScrollNearBottom(element: HTMLElement, threshold: number = 200) {\r\n if (!element) {\r\n return false;\r\n }\r\n return element.scrollHeight - (element.scrollTop + element.clientHeight) < threshold;\r\n}","import { removeListeners, RippleOptions, updateRipple } from \"./ripple\";\r\n\r\nexport default function registerRippleObserver() {\r\n const observer = new MutationObserver((mutationsList, observer) => {\r\n for (const mutation of mutationsList) {\r\n if (mutation.type === \"childList\" && mutation.addedNodes.length > 0) {\r\n for (const node of mutation.addedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (\r\n node.nodeType === Node.ELEMENT_NODE &&\r\n node.hasAttribute(\"ripple\") &&\r\n !node._ripple\r\n ) {\r\n updateRipple(node, convertRippleAttributeToOptions(node), false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 处理属性变动\r\n if (mutation.type === \"attributes\") {\r\n const target = mutation.target as HTMLElement;\r\n if (target.hasAttribute(\"ripple\") && !target._ripple) {\r\n if (mutation.attributeName === \"ripple\") {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n false\r\n );\r\n } else if (!target.hasAttribute(\"ripple\") && target._ripple) {\r\n removeListeners(target);\r\n delete target._ripple;\r\n }\r\n }\r\n }\r\n\r\n if (\r\n mutation.type === \"attributes\" &&\r\n mutation.attributeName === \"ripple\"\r\n ) {\r\n const target = mutation.target as HTMLElement;\r\n if (target._ripple) {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n target._ripple.enabled\r\n );\r\n }\r\n }\r\n\r\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\r\n for (const node of mutation.removedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (node.nodeType === Node.ELEMENT_NODE && node._ripple) {\r\n removeListeners(node);\r\n delete node._ripple;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // ripple=\"false\",\r\n // ripple=\"\",\r\n // ripple=\"true\",\r\n // ripple=\"center\",\r\n // ripple=\"circle\",\r\n // ripple=\"circle¢er\"\r\n // ripple=\"center&custom-css\",\r\n // ripple=\"circle&custom-css\",\r\n // ripple=\"custom-css\"\r\n function convertRippleAttributeToOptions(\r\n target: HTMLElement\r\n ): RippleOptions | null {\r\n const value = target.getAttribute(\"ripple\");\r\n if ((typeof value !== \"string\" && !value) || value === \"false\") {\r\n return null;\r\n }\r\n\r\n const options: RippleOptions = {};\r\n\r\n const props = value.split(\"&\");\r\n props.forEach((prop) => {\r\n if (prop === \"center\") {\r\n options.center = true;\r\n } else if (prop === \"circle\") {\r\n options.circle = true;\r\n } else {\r\n options.class = prop.trim();\r\n }\r\n });\r\n\r\n return options;\r\n }\r\n\r\n const initialElements = document.querySelectorAll(\"[ripple]\");\r\n\r\n for (const element of initialElements) {\r\n updateRipple(element, convertRippleAttributeToOptions(element), false);\r\n }\r\n\r\n observer.observe(document, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n attributeFilter: [\"ripple\"],\r\n attributeOldValue: false,\r\n });\r\n}\r\n","import * as slider from \"./components/slider\";\r\nimport * as textarea from \"./components/textarea\";\r\nimport * as interop from \"./interop\";\r\nimport { MarkdownParser } from \"./proxies/markdown-it\";\r\n\r\ndeclare global {\r\n interface Window {\r\n MasaBlazor: {\r\n interop: {};\r\n extendMarkdownIt?: (parser: MarkdownParser) => void;\r\n xgplayerPlugins: any[];\r\n xgplayerPluginOptions?: { [prop: string]: any };\r\n };\r\n }\r\n}\r\n\r\nwindow.MasaBlazor = {\r\n interop: {\r\n ...interop,\r\n ...slider,\r\n ...textarea\r\n },\r\n xgplayerPlugins: [],\r\n};\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","passiveSupported","window","testListenerOpts","Object","defineProperty","get","addEventListener","removeEventListener","console","warn","keyCodes","freeze","enter","tab","delete","esc","space","up","down","left","right","end","home","del","backspace","insert","pageup","pagedown","shift","getBlazorId","el","_bl_","getAttributeNames","find","a","startsWith","substring","getElementSelector","Element","path","nodeType","Node","ELEMENT_NODE","selector","nodeName","toLowerCase","id","unshift","sib","nth","previousElementSibling","parentNode","join","getDom","elOrString","element","document","documentElement","indexOf","array","split","i","querySelector","HTMLElement","body","error","canUseDom","createElement","touchEvents","parseMouseEvent","event","detail","screenX","screenY","clientX","clientY","offsetX","offsetY","pageX","pageY","button","buttons","ctrlKey","shiftKey","altKey","metaKey","type","parseTouchEvent","touches","parseTouch","targetTouches","changedTouches","touchList","length","touch","push","identifier","registerExtraMouseEvent","eventType","eventName","Blazor","registerCustomEventType","browserEventName","createEventArgs","createSharedEventArgs","registerExtraDropEvent","eventArgs","assign","dataTransfer","dropEffect","effectAllowed","files","Array","from","map","f","name","items","kind","types","getData","Number","args","target","eventTarget","elementReferenceId","class","getAttribute","getEventTarget","sliderHandleId","sliderHandlesById","dotnetHelper","onSliderMouseDown","app","mouseUpOptions","passive","capture","mouseMoveOptions","isTouchEvent","onMouseMove","cb","options","once","addOnceEventListener","onSliderMouseUp","invokeMethodAsync","stopPropagation","payload","textareaAutoGrowNextId","textareaAutoGrowMap","calculateTextareaHeight","textarea","rows","rowHeight","style","height","scrollHeight","minHeight","parseInt","parseFloat","Math","max","input","inputCallback","undefined","functionDebounce","fn","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","debounceWrapper","this","arguments","context","callNow","setTimeout","call","cancel","flush","functionThrottle","interval","timeoutId","throttledFn","leading","trailing","throttleWrapper","registerExtraEvents","registerEvent","DELAY_RIPPLE","transform","webkitTransform","constructor","isKeyboardEvent","ripples","show","_ripple","enabled","container","animation","appendChild","className","radius","scale","x","y","centerX","centerY","localX","localY","offset","getBoundingClientRect","top","circle","clientWidth","center","sqrt","clientHeight","calculate","size","width","computed","getComputedStyle","position","dataset","previousPosition","classList","add","activated","String","performance","now","remove","hide","getElementsByClassName","isHiding","diff","delay","_a","removeChild","rippleShow","currentTarget","touched","rippleStop","isTouch","centered","showTimerCommit","showTimer","rippleHide","rippleCancelShow","keyboardRippleShow","keyCode","keyboardRippleHide","focusRippleHide","updateRipple","wasEnabled","removeListeners","getZIndex","index","getPropertyValue","getDomInfoObj","dom","offsetTop","offsetLeft","scrollWidth","scrollLeft","scrollTop","clientTop","clientLeft","res","viewportElement","box","offsetWidth","offsetHeight","relativeTop","relativeBottom","bottom","relativeLeft","relativeRight","absoluteLeft","absoluteTop","getElementPos","round","onload","customEventName","pastedData","clipboardData","observer","MutationObserver","mutationsList","mutation","addedNodes","node","hasAttribute","convertRippleAttributeToOptions","attributeName","removedNodes","forEach","prop","trim","initialElements","querySelectorAll","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","registerRippleObserver","htmlElementEventListenerConfigs","getActiveElement","activeElement","getWindowAndDocumentProps","windowProps","documentProps","obj","getPageYOffset","isElement","tagName","getMenuOrDialogMaxZIndex","exclude","zis","activeElements","includes","getMenuableDimensions","hasActivator","activatorSelector","isDefaultAttach","contentElement","attached","attachSelector","dimensions","activator","content","relativeYOffset","offsetParentLeft","measure","display","sneakPeek","offsetParent","offsetRect","getRoundedBoundedClientRect","pageXOffset","pageYOffset","blockedScrollY","abs","rect","marginLeft","marginTop","otpInputKeyupEvent","otpIdx","elementList","callback","preventDefault","eventKey","key","otpInputFocus","focusIndex","focus","otpInputFocusEvent","select","otpInputOnInputEvent","get_top_domain","h","weird_cookie","hostname","location","slice","cookie","cloned","cloneNode","parentElement","innerWidth","evt","createEvent","initEvent","dispatchEvent","attach","_b","invoker","extras","htmlElement","config","listener","cancelable","relatedTarget","contains","k","debounce","debounceIt","throttle","handle","configs","item","dispose","e1","e2","dom1","dom2","text","navigator","clipboard","writeText","log","err","textArea","msg","execCommand","fallbackCopyTextToClipboard","preventScroll","HTMLInputElement","HTMLTextAreaElement","Error","blur","arg","scrollIntoView","block","inline","behavior","start","level","parent","to","scrollTo","o","targetEl","scrollY","offsetPosition","activeEl","containerEl","firstElementChild","getAbsoluteTop","getAbsoluteLeft","addElement","elementSelector","delElement","focusDialog","count","ele","innerHeight","isTop","isBottom","hasOwnProperty","clsName","root","overflowY","test","innerText","all","reduce","r","zIndex","styleProp","currentStyle","defaultView","is","NaN","objReferenceName","d","getElementById","head","d_style","innerHTML","insertAdjacentElement","src","img","Image","hasError","onerror","condition","isArray","code","elements","selectors","sizeProp","overflow","charAt","toUpperCase","isActive","itemEl","inputElement","mouseEventArgs","Detail","ScreenX","ScreenY","ClientX","ClientY","OffsetX","OffsetY","PageX","PageY","Button","Buttons","CtrlKey","ShiftKey","AltKey","MetaKey","Type","setAttribute","removeAttribute","readOnly","multipleResult","windowAndDocument","inputListener","focusListener","keyupListener","_optInput","attribute","tiles","contentSelector","tilesSelector","tile","contentHeight","translateY","threshold","elementTop","domain","isNaN","exp","Date","setTime","getTime","Days","escape","toString","toUTCString","reg","RegExp","arr","match","unescape","dataKey","blazorId","dataValue","setData","dataTable","table","row","getElementsByTagName","cols","children","tableHeight","col","colResizeDiv","minWidth","setListeners","div","curCol","nxtCol","curColWidth","nxtColWidth","tableWidth","nextElementSibling","padding","getStyleVal","padLeft","padRight","paddingDiff","diffX","newCurColWidth","newNextColWidth","twoColWidth","elm","css","history","back","delta","go","href","replaceState","wrapper","rtl","sliderWrapper","sliderSize","vertical","isReversed","MasaBlazor","interop","slider","xgplayerPlugins"],"mappings":"yBAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAO,KAIhBO,KAAKR,EAAWK,EAAY,CAC9GH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,OACtE,GACA,CC5GA,IAAIO,GAAmB,EACvB,IACE,GAAsB,oBAAXC,OAAwB,CACjC,MAAMC,EAAmBC,OAAOC,eAAe,CAAA,EAAI,UAAW,CAC5DC,IAAK,KACHL,GAAmB,CAAI,IAI3BC,OAAOK,iBAAiB,eAAuBJ,EAAyBA,GACxED,OAAOM,oBAAoB,eAAuBL,EAAyBA,EAC5E,CAC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