native-fn 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Native = factory());
5
5
  })(this, (function () { 'use strict';
6
6
 
7
- var version = "1.3.3";
7
+ var version = "1.3.4";
8
8
  var packageJSON = {
9
9
  version: version};
10
10
 
@@ -1736,26 +1736,17 @@
1736
1736
  var onChangeSubscriptionManager = createSubscriptionManager(attachOnChange, detachOnChange);
1737
1737
  var virtualKeyboard = globalThis.navigator.virtualKeyboard;
1738
1738
  var pendingRaf = null;
1739
- var pendingStabilize = null;
1740
- var stableInnerHeight = globalThis.innerHeight;
1741
- var stableInnerWidth = globalThis.innerWidth;
1742
1739
  function attachOnChange() {
1743
1740
  EventListener.add(virtualKeyboard, { type: 'geometrychange', callback: onGeometryChange, options: { passive: true } });
1744
- EventListener.add(globalThis, { type: 'resize', callback: onResize, options: { passive: true } });
1745
1741
  }
1746
1742
  function detachOnChange() {
1747
1743
  EventListener.remove(virtualKeyboard, { type: 'geometrychange', callback: onGeometryChange, options: { passive: true } });
1748
- EventListener.remove(globalThis, { type: 'resize', callback: onResize, options: { passive: true } });
1749
1744
  if (pendingRaf !== null) {
1750
1745
  globalThis.cancelAnimationFrame(pendingRaf);
1751
1746
  pendingRaf = null;
1752
1747
  }
1753
- if (pendingStabilize !== null) {
1754
- globalThis.clearTimeout(pendingStabilize);
1755
- pendingStabilize = null;
1756
- }
1757
1748
  }
1758
- function emitAfterFrame() {
1749
+ function onGeometryChange() {
1759
1750
  if (pendingRaf !== null)
1760
1751
  globalThis.cancelAnimationFrame(pendingRaf);
1761
1752
  if (typeof globalThis.requestAnimationFrame === 'function') {
@@ -1770,64 +1761,29 @@
1770
1761
  });
1771
1762
  }
1772
1763
  }
1773
- function onGeometryChange() {
1774
- var rect = virtualKeyboard.boundingRect;
1775
- if (rect.height === 0) {
1776
- if (pendingStabilize !== null) {
1777
- globalThis.clearTimeout(pendingStabilize);
1778
- pendingStabilize = null;
1779
- }
1780
- emitAfterFrame();
1781
- return;
1782
- }
1783
- if (pendingStabilize !== null)
1784
- globalThis.clearTimeout(pendingStabilize);
1785
- pendingStabilize = globalThis.setTimeout(function () {
1786
- pendingStabilize = null;
1787
- emitAfterFrame();
1788
- }, 100);
1789
- }
1790
- function onResize() {
1791
- var rect = virtualKeyboard.boundingRect;
1792
- if (rect.height === 0) {
1793
- stableInnerHeight = globalThis.innerHeight;
1794
- stableInnerWidth = globalThis.innerWidth;
1795
- }
1796
- else {
1797
- var currentInnerHeight = globalThis.innerHeight;
1798
- if (rect.y + rect.height > currentInnerHeight)
1799
- stableInnerHeight = currentInnerHeight - rect.height;
1800
- else
1801
- stableInnerHeight = currentInnerHeight;
1802
- stableInnerWidth = globalThis.innerWidth;
1803
- }
1804
- }
1805
1764
  function getValue() {
1806
1765
  var rect = virtualKeyboard.boundingRect;
1807
1766
  var width = rect.width;
1808
1767
  var height = rect.height;
1809
- var top = 0;
1810
- var bottom = 0;
1811
- var left = 0;
1812
- var right = 0;
1768
+ var top;
1769
+ var left;
1770
+ var bottom;
1771
+ var right;
1813
1772
  if (height === 0) {
1814
- stableInnerHeight = globalThis.innerHeight;
1815
- stableInnerWidth = globalThis.innerWidth;
1773
+ top = 0;
1774
+ bottom = 0;
1816
1775
  }
1817
1776
  else {
1818
- var keyboardMidY = rect.y + height / 2;
1819
- if (keyboardMidY < stableInnerHeight / 2 || rect.y + height > stableInnerHeight) {
1820
- top = stableInnerHeight - height;
1821
- bottom = 0;
1822
- }
1823
- else {
1824
- top = rect.y;
1825
- bottom = Math.max(0, stableInnerHeight - (rect.y + height));
1826
- }
1777
+ top = rect.y;
1778
+ bottom = Math.max(0, globalThis.innerHeight - rect.y);
1827
1779
  }
1828
- if (width > 0) {
1829
- left = Math.max(0, rect.x);
1830
- right = Math.max(0, stableInnerWidth - (rect.x + width));
1780
+ if (width === 0) {
1781
+ left = 0;
1782
+ right = 0;
1783
+ }
1784
+ else {
1785
+ left = rect.x;
1786
+ right = Math.max(0, globalThis.innerWidth - rect.x);
1831
1787
  }
1832
1788
  return {
1833
1789
  top: top,
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Native=t()}(this,(function(){"use strict";var e,t,n="1.3.3",r={matches:!1,media:"not all",onchange:null,addListener:function(){},removeListener:function(){},addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){return!1}};!function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(e||(e={})),t=void 0!==globalThis.matchMedia?globalThis.matchMedia("(prefers-color-scheme: dark)"):r;var o,i,a,l,c,s=globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function u(e,t){for(var n=e.split("."),r=t.split("."),o=Math.max(n.length,r.length),i=0;i<o;i++){var a=void 0,l=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(l=i<r.length?parseInt(r[i],10):0))return 1;if(a<l)return-1}return 0}function d(e){if(void 0===e)return"";var t={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==t?t:e}function p(e){return void 0===e?"":e.replace(/_/g,".")}!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(o||(o={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(i||(i={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(a||(a={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(l||(l={})),c=void 0!==globalThis.navigator.userAgent?globalThis.navigator.userAgent:"";var f={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"},g=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","iw","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],v=[[/windows nt (6\.[23]); arm/i,o.Windows,d],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,d],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,d],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,d],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,d],[/windows ce\/?([\d.]*)/i,o.Windows,d],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,p],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,p],[/cfnetwork\/.+darwin/i,o.iOS,p],[/mac os x ?([\w. ]*)/i,o.MacOS,p],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,p],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],h=[[/windows.+ edge\/([\w.]+)/i,a.EdgeHTML],[/arkweb\/([\w.]+)/i,a.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,a.Blink],[/presto\/([\w.]+)/i,a.Presto],[/webkit\/([\w.]+)/i,a.WebKit],[/trident\/([\w.]+)/i,a.Trident],[/netfront\/([\w.]+)/i,a.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,a.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,a.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,a.Gecko]],b=[[/\b(?:crmo|crios)\/([\w.]+)/i,l.Chrome],[/webview.+edge\/([\w.]+)/i,l.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,l.Edge],[/opera mini\/([-\w.]+)/i,l.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,l.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,l.Opera],[/opios[\/ ]+([\w.]+)/i,l.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,l.Opera],[/\bopr\/([\w.]+)/i,l.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,l.IE],[/(?:ms|\()ie ([\w.]+)/i,l.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,l.IE],[/\bfocus\/([\w.]+)/i,l.Firefox],[/\bopt\/([\w.]+)/i,l.Opera],[/coast\/([\w.]+)/i,l.Opera],[/fxios\/([\w.-]+)/i,l.Firefox],[/samsungbrowser\/([\w.]+)/i,l.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,l.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,l.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,l.Chrome],[/chrome\/([\w.]+) mobile/i,l.Chrome],[/chrome\/v?([\w.]+)/i,l.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/version\/([\w.,]+) .*safari/i,l.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,l.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,l.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,l.Firefox],[/firefox\/([\w.]+)/i,l.Firefox]],m=[],y=[];function w(e){return"function"==typeof e||"object"==typeof e&&null!==e&&"function"==typeof e.handleEvent}function T(e){return"string"==typeof e.media&&"boolean"==typeof e.matches}function k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r="",o=0;o<t.length-2;o++){var i=t[o];void 0!==i&&(r=r+i.charAt(0).toUpperCase()+i.slice(1))}return r}function S(e,t){if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(t)>-1)return t;if("function"==typeof e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(t)>-1)return t;var n;n=void 0!==O[t]?O[t]:I.test(t)?[t,t.replace(I,k)]:[t];for(var r=0;r<A.length;r++)for(var o=0;o<n.length;o++){var i=A[r]+n[o];if(void 0!==e["on"+i])return i}return t}function E(){this.returnValue=!1}function P(){this.cancelBubble=!0}var x,I=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,A=["","webkit","moz","ms","MS","o","O"],O={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},D={useStd:"function"==typeof globalThis.document.addEventListener,add:function(e,t){if(void 0!==t.type&&void 0!==e){var n=t.callback,r=S(e,t.type),o=t.options;if(T(e)&&"function"==typeof e.addListener)try{var i=function(e,t,n){for(var r=0;r<y.length;r++){var o=y[r];if(o.target===e&&o.type===t&&o.callback===n)return o.wrapper}}(e,r,n);return void 0===i&&function(e,t,n,r){y.push({target:e,type:t,callback:n,wrapper:r})}(e,r,n,i=function(e){return function(t){"function"==typeof e?e.call(this,t):e&&"function"==typeof e.handleEvent&&e.handleEvent(t)}}(n)),e.addListener(i)}catch(e){}if("function"==typeof e.addEventListener)try{if(w(n))return e.addEventListener(r,n,o)}catch(e){}if("function"==typeof e.attachEvent){var a=function(e,t,n){for(var r=0;r<m.length;r++){var o=m[r];if(o.target===e&&o.type===t&&o.callback===n)return o.wrapper}}(e,r,n);if("function"==typeof a)return;i=function(t){if(void 0===t&&(t=globalThis.event),void 0!==t){try{Object.defineProperty(t,"currentTarget",{value:e,configurable:!0})}catch(e){}"function"!=typeof t.preventDefault&&(t.preventDefault=E.bind(t)),"function"!=typeof t.stopPropagation&&(t.stopPropagation=P.bind(t)),"function"==typeof n?n.call(e,t):n&&"function"==typeof n.handleEvent&&n.handleEvent(t)}};return function(e,t,n,r){m.push({target:e,type:t,callback:n,wrapper:r})}(e,r,n,i),e.attachEvent("on"+r,i)}}},remove:function(e,t){if(void 0!==t.type&&void 0!==e){var n=t.callback,r=S(e,t.type),o=t.options;if(T(e)){if("function"==typeof e.removeListener)try{var i=function(e,t,n){for(var r=0;r<y.length;r++){var o=y[r];if(o.target===e&&o.type===t&&o.callback===n)return y.splice(r,1),o.wrapper}}(e,r,n);if("function"==typeof i)return e.removeListener(i)}catch(e){}}else{if("function"==typeof e.removeEventListener)try{if(w(n))return e.removeEventListener(r,n,o)}catch(e){}if("function"!=typeof e.detachEvent);else{i=function(e,t,n){for(var r=0;r<m.length;r++){var o=m[r];if(o.target===e&&o.type===t&&o.callback===n)return m.splice(r,1),o.wrapper}}(e,r,n);"function"==typeof i&&e.detachEvent("on"+r,i)}}}}},M=c,C=null,N=void 0,L=void 0,F=void 0,U=void 0,_=void 0,W=void 0,q=null,R={},G=null;function H(e,t){return"function"==typeof t?t(e):"string"==typeof t?t:void 0===e?"":e}function B(e){if(null==e)return e;if(0===e.length)return null;if("C"===(e=e.replace(/_/g,"-"))||"posix"===e.toLowerCase())return"en-US";if(-1!==e.indexOf("."))return B(e.split(".")[0]);if(-1!==e.indexOf("@"))return B(e.split("@")[0]);var t=e.split("-");return 0===t.length?null:(t[0]=t[0].toLowerCase(),t.length>1&&2===t[1].length&&(t[1]=t[1].toUpperCase()),t.length>2&&4===t[1].length&&(t[1]=t[1].charAt(0).toUpperCase()+t[1].slice(1).toLowerCase()),t.join("-"))}function j(){return null!==C&&C.userAgent===M?C:C={userAgent:M,os:V(),browser:z(),engine:Y()}}function V(){for(var e=o.Unknown,t="",n=0;n<v.length;n++){var r=v[n],i=M.match(r[0]);if(null!==i){e=r[1],t=H(i[1],r[2]);break}}if(e===o.iOS&&0===u(t,"18.6")){var a=/\) Version\/([\d.]+)/.exec(M);if(null!==a)parseInt(a[1].split(".")[0],10)>=26&&(t=a[1])}return M===c&&(void 0!==N&&(e=N),void 0!==L&&(t=L),e===o.MacOS&&void 0!==globalThis.navigator.standalone&&globalThis.navigator.maxTouchPoints>2&&(e=o.iOS)),{name:e,version:t}}function z(){for(var e=l.Unknown,t="",n=0;n<b.length;n++){var r=b[n],o=M.match(r[0]);if(null!==o){e=r[1],t=H(o[1],r[2]);break}}return M===c&&(void 0!==F&&(e=F),void 0!==U&&(t=U)),{name:e,version:t}}function Y(){for(var e=a.Unknown,t="",n=0;n<h.length;n++){var r=h[n],o=M.match(r[0]);if(null!==o){e=r[1],t=H(o[1],r[2]);break}}return M===c&&(void 0!==_&&(e=_),void 0!==W&&(t=W)),{name:e,version:t}}function K(){if(null!==G)return G;var e=null,t=[],n=null,r=0,o=!1,i=null;function a(n){"string"==typeof(n=B(n))&&-1===t.indexOf(n)&&(null===e&&(e=n),t.push(n))}if("undefined"!=typeof Intl){try{a(Intl.DateTimeFormat().resolvedOptions().locale)}catch(e){}try{n=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}}void 0!==globalThis.navigator&&(void 0!==globalThis.navigator.languages&&function(e){for(var t=0;t<e.length;t++)a(e[t])}(globalThis.navigator.languages),void 0!==globalThis.navigator.language&&a(globalThis.navigator.language),void 0!==globalThis.navigator.userLanguage&&a(globalThis.navigator.userLanguage),void 0!==globalThis.navigator.browserLanguage&&a(globalThis.navigator.browserLanguage),void 0!==globalThis.navigator.systemLanguage&&a(globalThis.navigator.systemLanguage));try{r=-1*(new Date).getTimezoneOffset()}catch(e){}if("string"==typeof e){if("undefined"!=typeof Intl&&void 0!==Intl.Locale)try{var l=new Intl.Locale(e);"function"==typeof l.getTextInfo?i="rtl"===l.getTextInfo().direction:void 0!==l.textInfo&&(i="rtl"===l.textInfo.direction)}catch(e){}if("boolean"!=typeof i){var c=/^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(e);if(null!==c)for(var s=c[1].toLowerCase(),u=0;u<g.length;u++)if(g[u]===s){i=!0;break}}}return"boolean"==typeof i&&(o=i),G={language:e,languages:t,timezone:n,offset:r,isRTL:o}}function Z(){return void 0===globalThis.navigator||void 0===globalThis.navigator.userAgentData||void 0===globalThis.navigator.userAgentData.getHighEntropyValues?Promise.resolve():globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){try{for(var t=e.fullVersionList||e.brands||[],n=e.platformVersion,r=e.platform,a=j().browser.name,c=null,s=0;s<t.length;s++){var u=null==(g=t[s])?{brand:"",version:""}:"string"==typeof g?{brand:g,version:""}:{brand:g.brand,version:g.version},d=u.version,p=u.brand;/not.a.brand/i.test(p)||((null===c||/Chrom/.test(c)&&"Chromium"!==p||"Edge"===c&&/WebView2/.test(p))&&(p=f[p]||p,null!==(c=a)&&!/Chrom/.test(c)&&/Chrom/.test(p)||("Chrome"===(a=p)||"Chrome WebView"===a||"Chrome Headless"===a?F=l.Chrome:"Edge"===a||"Edge WebView2"===a?F=l.Edge:"Opera Mobi"===a&&(F=l.Opera),U=d),c=p),"Chromium"===p&&(W=d))}"string"==typeof n&&(L=j().os.name===o.Windows?parseInt(n.split(".")[0],10)>=13?"11":"10":n),"string"==typeof r&&(/android/i.test(r)?N=o.Android:/ios|iphone|ipad/i.test(r)?N=o.iOS:/windows|win32/i.test(r)?N=o.Windows:/macos|macintel/i.test(r)&&(N=o.MacOS)),!0===e.mobile&&(q=i.Mobile),C=null}catch(e){}var g})).catch((function(){}))}function X(){return void 0===globalThis.navigator||void 0===globalThis.navigator.gpu?Promise.resolve():globalThis.navigator.gpu.requestAdapter().then((function(e){if(null!==e){var t=e.info;R.architecture=t.architecture,R.description=t.description,R.device=t.device,R.vendor=t.vendor}})).catch((function(){}))}x=Promise.all([Z(),X()]).then((function(){})),D.add(globalThis,{type:"languagechange",callback:function(){G=null}});var J={get ready(){return x},get os(){return j().os},get engine(){return j().engine},get browser(){return j().browser},get userAgent(){return M},set userAgent(e){M!==e&&(M=e,C=null,G=null,N=void 0,L=void 0,F=void 0,U=void 0,_=void 0,W=void 0,q=null,R={},e===c&&(x=Promise.all([Z(),X()]).then((function(){}))))},get locale(){return K()},get device(){return function(){if(M===c&&null!==q)return q;var e=j().os.name;return e===o.iOS||e===o.Android?i.Mobile:e===o.Windows||e===o.MacOS?i.Desktop:i.Unknown}()},get gpu(){return{architecture:R.architecture,description:R.description,device:R.device,vendor:R.vendor}},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(M)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return j().os.name===o.iOS?!0===globalThis.navigator.standalone:void 0!==globalThis.matchMedia&&globalThis.matchMedia("(display-mode: standalone)").matches},Constants:{OS:o,Engines:a,Browsers:l,Devices:i},Errors:{}};function Q(e,t){var n=[];function r(e){var r=o(e);-1!==r&&(n.splice(r,1),0===n.length&&t())}function o(e){for(var t=0;t<n.length;t++)if(n[t].fn===e.fn)return t;return-1}return{emit:function(e){for(var t=n.slice(),o=0;o<t.length;o++)t[o].fn(e),t[o].once&&r(t[o])},subscribe:function(t,i){if(void 0===i&&(i={}),void 0!==i.signal&&i.signal.aborted)return function(){};var a={fn:t,once:!1};void 0!==i.once&&(a.once=i.once),void 0!==i.signal&&(a.signal=i.signal);var l=o(a);-1===l?(n.push(a),1===n.length&&e()):n[l].once&&!a.once&&(n[l].once=!1);var c=function(){D.remove(a.signal,{type:"abort",callback:c}),r(a)};return void 0!==a.signal&&D.add(a.signal,{type:"abort",callback:c}),function(){r(a)}}}}var $=Q((function(){ee=oe(),D.add(t,{type:"change",callback:ie}),J.browser.name===l.SamsungInternet&&(ee=re(),te=globalThis.setInterval((function(){var e=re();e!==ee&&(ee=e,$.emit(e))}),2e3))}),(function(){ee=null,D.remove(t,{type:"change",callback:ie}),J.browser.name===l.SamsungInternet&&(ee=null,null!==te&&(clearInterval(te),te=null))})),ee=null,te=null,ne={get value(){return J.browser.name===l.SamsungInternet?re():oe()},onChange:$.subscribe,Constants:{Appearances:e},Errors:{}};function re(){var t=new Image;if(t.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxIiBoZWlnaHQ9IjEiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDBoMXYxSDB6Ii8+PC9zdmc+",null===s)return e.Light;s.drawImage(t,0,0);var n=s.getImageData(0,0,1,1).data;return(n[0]&n[1]&n[2])<255?e.Dark:e.Light}function oe(){return"not all"===t.media?e.Unknown:t.matches?e.Dark:e.Light}function ie(t){var n;(n=t.matches?e.Dark:e.Light)!==ee&&$.emit(ee=n)}function ae(e,t){var n=e.style;for(var r in t){var o=t[r];void 0!==o&&(n[r]=o)}}function le(e,t){void 0===t&&(t=!0);var n=globalThis.document.createElement(e);return void 0!==n.width&&(n.width="0"),void 0!==n.height&&(n.height="0"),void 0!==n.border&&(n.border="0"),void 0!==n.frameBorder&&(n.frameBorder="0"),void 0!==n.scrolling&&(n.scrolling="no"),void 0!==n.cellPadding&&(n.cellPadding="0"),void 0!==n.cellSpacing&&(n.cellSpacing="0"),void 0!==n.frame&&(n.frame="void"),void 0!==n.rules&&(n.rules="none"),void 0!==n.noWrap&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),t?ae(n,{width:"1px",height:"1px"}):(n.setAttribute("aria-hidden","true"),ae(n,{width:"0",height:"0",zIndex:"-9999",display:"none",visibility:"hidden",pointerEvents:"none"})),ae(n,{position:"absolute",top:"0",left:"0",padding:"0",margin:"0",border:"none",outline:"hidden",clip:"rect(1px, 1px, 1px, 1px)",clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap"}),n}var ce,se={copy:function(e){var t=function(e){if(ue(e)){var t=e.textContent;return null!==t?t:""}if(de(e))return e.toString();if(function(e){return function(e){return null!==e&&"object"==typeof e}(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(t){return""+e}else if("string"!=typeof e)return""+e;return e}(e),n=function(e){var t=null;ue(e)&&(t=e.outerHTML);if(de(e)&&e.rangeCount>0){for(var n=globalThis.document.createElement("div"),r=0;r<e.rangeCount;r++)n.appendChild(e.getRangeAt(r).cloneContents());t=n.innerHTML}if(null===t)return;return t}(e);if(pe()&&(void 0!==globalThis.navigator.clipboard.write||void 0!==globalThis.navigator.clipboard.writeText))return function(e,t){try{if(void 0!==globalThis.ClipboardItem&&void 0!==globalThis.navigator.clipboard.write){var n={};return void 0!==t&&(n["text/html"]=new Blob([t],{type:"text/html"})),n["text/plain"]=new Blob([e],{type:"text/plain"}),globalThis.navigator.clipboard.write([new ClipboardItem(n)]).then((function(){return!0})).catch((function(){return!1}))}if(void 0!==globalThis.navigator.clipboard.writeText)return globalThis.navigator.clipboard.writeText(e).then((function(){return!0})).catch((function(){return!1}))}catch(e){return Promise.resolve(!1)}return Promise.resolve(!1)}(t,n).then((function(e){return!!e||fe(t,n)})).catch((function(){return fe(t,n)}));return Promise.resolve(fe(t,n))},paste:function(){if(pe()&&(void 0!==globalThis.navigator.clipboard.read||void 0!==globalThis.navigator.clipboard.readText))return function(){try{if(void 0!==globalThis.ClipboardItem&&void 0!==globalThis.navigator.clipboard.read)return globalThis.navigator.clipboard.read().then((function(e){if(0===e.length)return Promise.resolve(null);for(var t=0;t<e.length;t++)for(var n=(o=e[t]).types,r=0;r<n.length;r++)if("text/html"===n[r])return o.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<e.length;t++){var o;for(n=(o=e[t]).types,r=0;r<n.length;r++)if("text/plain"===n[r])return o.getType("text/plain").then((function(e){return e.text()})).catch((function(){return null}))}return Promise.resolve(null)})).catch((function(){return null}));if(void 0!==globalThis.navigator.clipboard.readText)return globalThis.navigator.clipboard.readText().then((function(e){return e})).catch((function(){return null}))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}().then((function(e){return null!==e?e:ge()})).catch((function(){return ge()}));return Promise.resolve(ge())},Constants:{},Errors:{}};function ue(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&(1===e.nodeType&&("string"==typeof e.nodeName&&"function"==typeof e.getAttribute))}function de(e){return"[object Selection]"===Object.prototype.toString.call(e)}function pe(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,t=location.hostname;return"https:"===e||"localhost"===t||"127.0.0.1"===t||"[::1]"===t}()&&void 0!==globalThis.navigator.clipboard}function fe(e,t){return function(e,t){if(void 0===globalThis.getSelection||void 0===globalThis.document.createRange)return!1;var n=le("div");n.contentEditable="true",void 0!==t?n.innerHTML=t:n.textContent=e,n.style.whiteSpace="pre",n.style.userSelect="text",n.style.setProperty("-webkit-user-select","text"),n.style.setProperty("-moz-user-select","text"),n.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(n);var r=globalThis.getSelection(),o=globalThis.document.createRange(),i=function(n){try{null!==n.clipboardData&&"function"==typeof n.clipboardData.setData&&(n.preventDefault(),void 0!==t&&n.clipboardData.setData("text/html",t),n.clipboardData.setData("text/plain",e))}catch(e){}};D.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===r)return ve(n,r,i),!1;r.removeAllRanges(),o.selectNodeContents(n),r.addRange(o);var a=globalThis.document.execCommand("copy");return ve(n,r,i),a}catch(e){return ve(n,r,i),!1}}(e,t)||function(e,t){var n=globalThis.clipboardData;if(void 0!==n&&"function"==typeof n.setData)try{return void 0!==t&&n.setData("HTML",t),n.setData("Text",e)}catch(e){return!1}return!1}(e,t)}function ge(){var e=function(){var e=le("div");e.contentEditable="true",globalThis.document.body.appendChild(e),e.focus();var t=null,n=function(e){try{if(null!==e.clipboardData&&"function"==typeof e.clipboardData.getData){e.preventDefault();var n=e.clipboardData.getData("text/html"),r=e.clipboardData.getData("text/plain");""!==n&&(t=n),""!==r&&(t=r)}}catch(e){}};D.add(globalThis.document,{type:"paste",callback:n,options:{once:!0,capture:!0}});try{if(!globalThis.document.execCommand("paste")&&null===t){var r=e.innerHTML;if(""!==r)t=r;else{var o=e.textContent;null!==o&&""!==o&&(t=o)}}return he(e,n),t}catch(t){return he(e,n),null}}();if(null!==e)return e;var t=function(){var e=globalThis.clipboardData;if(void 0!==e&&"function"==typeof e.getData)try{var t=e.getData("Text");return""!==t?t:null}catch(e){return null}return null}();return null!==t?t:""}function ve(e,t,n){null!==t&&t.removeAllRanges(),globalThis.document.body.removeChild(e),D.remove(globalThis.document,{type:"copy",callback:n})}function he(e,t){globalThis.document.body.removeChild(e),D.remove(globalThis.document,{type:"paste",callback:t})}!function(e){e.PortraitPrimary="portrait-primary",e.PortraitSecondary="portrait-secondary",e.LandscapePrimary="landscape-primary",e.LandscapeSecondary="landscape-secondary"}(ce||(ce={})),function(e){e.isLandscape=function(t){return t===e.LandscapePrimary||t===e.LandscapeSecondary},e.isPortrait=function(t){return t===e.PortraitPrimary||t===e.PortraitSecondary}}(ce||(ce={}));var be,me,ye={"safe-area-inset":{top:"safe-area-inset-top",right:"safe-area-inset-right",bottom:"safe-area-inset-bottom",left:"safe-area-inset-left"},"safe-area-max-inset":{top:"safe-area-max-inset-top",right:"safe-area-max-inset-right",bottom:"safe-area-max-inset-bottom",left:"safe-area-max-inset-left"},"titlebar-area":{x:"titlebar-area-x",y:"titlebar-area-y",width:"titlebar-area-width",height:"titlebar-area-height"},"keyboard-inset":{top:"keyboard-inset-top",right:"keyboard-inset-right",bottom:"keyboard-inset-bottom",left:"keyboard-inset-left",width:"keyboard-inset-width",height:"keyboard-inset-height"},"viewport-segment":{width:"viewport-segment-width",height:"viewport-segment-height",top:"viewport-segment-top",right:"viewport-segment-right",bottom:"viewport-segment-bottom",left:"viewport-segment-left"}};function we(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function Te(e){void 0===globalThis.queueMicrotask?"function"!=typeof globalThis.Promise?globalThis.setTimeout(e,0):Promise.resolve().then(e):globalThis.queueMicrotask(e)}be=void 0!==globalThis.matchMedia?globalThis.matchMedia("(orientation: portrait)"):r,me=void 0!==globalThis.matchMedia?globalThis.matchMedia("(device-posture: folded)"):r;function ke(){}function Se(){if(void 0!==globalThis.CSS&&"function"==typeof globalThis.CSS.supports){if(globalThis.CSS.supports("x: env(x)"))return"env";if(globalThis.CSS.supports("x: constant(x)"))return"constant"}}function Ee(){var e=globalThis.viewport,t=globalThis.visualViewport,n=globalThis.navigator.devicePosture,r=void 0!==e,o=!r&&null!=t&&void 0!==t.segments,i=void 0!==n,a=Q((function(){D.add(globalThis,{type:"resize",callback:h}),r?p():o?(g(),p()):(null!==c||(c=b(),globalThis.document.body.appendChild(c)),g())}),(function(){D.remove(globalThis,{type:"resize",callback:h}),r?f():o?(v(),f()):(v(),null!==c&&(null!==c.parentNode&&c.parentNode.removeChild(c),c=null))})),l=Se(),c=null,s=[],u=null;function d(){s=function(){if("function"!=typeof globalThis.matchMedia)return[];for(var e=[],t=2;t<=4;t++)e.push(globalThis.matchMedia("(horizontal-viewport-segments: "+t+")")),e.push(globalThis.matchMedia("(vertical-viewport-segments: "+t+")"));return e}();for(var e=0;e<s.length;e++)D.add(s[e],{type:"change",callback:h});"not all"!==me.media&&D.add(me,{type:"change",callback:h})}function p(){i&&D.add(n,{type:"change",callback:h}),d()}function f(){i&&D.remove(n,{type:"change",callback:h}),function(){for(var e=0;e<s.length;e++)D.remove(s[e],{type:"change",callback:h});s=[],"not all"!==me.media&&D.remove(me,{type:"change",callback:h})}()}function g(){D.add(t,{type:"resize",callback:h,options:{passive:!0}})}function v(){D.remove(t,{type:"resize",callback:h,options:{passive:!0}})}function h(){var e=w();null!==u&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(r.width!==o.width||r.height!==o.height||r.top!==o.top||r.left!==o.left||r.bottom!==o.bottom||r.right!==o.right)return!1}return!0}(u,e)||(u=e,a.emit(e))}function b(){var e=le("div");return e.setAttribute("data-viewport-segment-observer",""),e.style.setProperty("position","fixed","important"),e.style.setProperty("top","0","important"),e.style.setProperty("left","0","important"),e.style.setProperty("visibility","hidden","important"),e.style.setProperty("pointer-events","none","important"),e.style.setProperty("z-index","-1","important"),e.style.setProperty("box-sizing","content-box","important"),e.style.setProperty("padding","0","important"),e.style.setProperty("margin","0","important"),e.style.setProperty("border","0","important"),e.style.setProperty("width","0","important"),e.style.setProperty("height","0","important"),e.style.setProperty("min-width","0","important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("max-width","none","important"),e.style.setProperty("max-height","none","important"),e.style.setProperty("transition","none","important"),e.style.setProperty("animation","none","important"),e.style.setProperty("display","block","important"),e.style.setProperty("float","none","important"),e.style.setProperty("transform","none","important"),e}function m(){var e=globalThis.innerWidth,t=globalThis.innerHeight;return{width:e,height:t,top:0,left:0,bottom:t,right:e}}function y(e){var t=function(){if("function"!=typeof globalThis.matchMedia)return{rows:1,cols:1};for(var e=1,t=1,n=4;n>=2;n--)if(globalThis.matchMedia("(horizontal-viewport-segments: "+n+")").matches){e=n;break}for(n=4;n>=2;n--)if(globalThis.matchMedia("(vertical-viewport-segments: "+n+")").matches){t=n;break}return{rows:t,cols:e}}();if(1===t.rows&&1===t.cols)return[m()];if(void 0===l||void 0===e.style.setProperty)return[m()];for(var n=[],r=0;r<t.rows;r++)for(var o=0;o<t.cols;o++){e.style.setProperty("width",l+"(viewport-segment-width "+r+" "+o+", -1px)","important"),e.style.setProperty("height",l+"(viewport-segment-height "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-top",l+"(viewport-segment-top "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-left",l+"(viewport-segment-left "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-bottom",l+"(viewport-segment-bottom "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-right",l+"(viewport-segment-right "+r+" "+o+", -1px)","important");var i=globalThis.getComputedStyle(e),a=globalThis.parseFloat(i.marginTop);if(!(a<0)){var c=globalThis.parseFloat(i.marginLeft),s=globalThis.parseFloat(i.marginBottom),u=globalThis.parseFloat(i.marginRight),d=globalThis.parseFloat(i.width),p=globalThis.parseFloat(i.height);n.push({width:d,height:p,top:a,left:c,bottom:s,right:u})}}return n}function w(){if(r||o)return function(){var n;if(null==(n=r?e.segments:t.segments)||0===n.length)return[m()];for(var o=[],i=0;i<n.length;i++){var a=n[i];o.push({width:a.width,height:a.height,top:a.top,left:a.left,bottom:a.bottom,right:a.right})}return o}();if(null!==c)return y(c);var n=b();globalThis.document.body.appendChild(n);var i=y(n);return globalThis.document.body.removeChild(n),i}return{get value(){return w()},onChange:a.subscribe,useCssVariable:function(e){if(void 0===globalThis.document)return ke;var t=we(ye["viewport-segment"]),n=globalThis.document.documentElement,r=0;function o(o){for(var i=o.length;i<r;i++)for(var a=0;a<t.length;a++)n.style.removeProperty("--"+e+"-"+i+"-"+t[a]);r=o.length;for(i=0;i<o.length;i++){var l=o[i];for(a=0;a<t.length;a++){var c=t[a];n.style.setProperty("--"+e+"-"+i+"-"+c,l[c]+"px")}}}o(w());var i=a.subscribe((function(e){o(e)}));return function(){i();for(var o=0;o<r;o++)for(var a=0;a<t.length;a++)n.style.removeProperty("--"+e+"-"+o+"-"+t[a]);r=0}}}}function Pe(e){if("keyboard-inset"===e&&void 0!==globalThis.navigator.virtualKeyboard)return function(){var e=Q((function(){D.add(t,{type:"geometrychange",callback:l,options:{passive:!0}}),D.add(globalThis,{type:"resize",callback:c,options:{passive:!0}})}),(function(){D.remove(t,{type:"geometrychange",callback:l,options:{passive:!0}}),D.remove(globalThis,{type:"resize",callback:c,options:{passive:!0}}),null!==n&&(globalThis.cancelAnimationFrame(n),n=null),null!==r&&(globalThis.clearTimeout(r),r=null)})),t=globalThis.navigator.virtualKeyboard,n=null,r=null,o=globalThis.innerHeight,i=globalThis.innerWidth;function a(){null!==n&&globalThis.cancelAnimationFrame(n),"function"==typeof globalThis.requestAnimationFrame?n=globalThis.requestAnimationFrame((function(){n=null,e.emit(s())})):Te((function(){e.emit(s())}))}function l(){if(0===t.boundingRect.height)return null!==r&&(globalThis.clearTimeout(r),r=null),void a();null!==r&&globalThis.clearTimeout(r),r=globalThis.setTimeout((function(){r=null,a()}),100)}function c(){var e=t.boundingRect;if(0===e.height)o=globalThis.innerHeight,i=globalThis.innerWidth;else{var n=globalThis.innerHeight;o=e.y+e.height>n?n-e.height:n,i=globalThis.innerWidth}}function s(){var e=t.boundingRect,n=e.width,r=e.height,a=0,l=0,c=0,s=0;return 0===r?(o=globalThis.innerHeight,i=globalThis.innerWidth):e.y+r/2<o/2||e.y+r>o?(a=o-r,l=0):(a=e.y,l=Math.max(0,o-(e.y+r))),n>0&&(c=Math.max(0,e.x),s=Math.max(0,i-(e.x+n))),{top:a,right:s,bottom:l,left:c,width:n,height:r}}return{get value(){return s()},onChange:e.subscribe,useCssVariable:function(t){if(void 0===globalThis.document)return ke;var n=we(ye["keyboard-inset"]),r=globalThis.document.documentElement;function o(e){for(var o=0;o<n.length;o++){var i=n[o];r.style.setProperty("--"+t+"-"+i,e[i]+"px")}}o(s());var i=e.subscribe((function(e){o(e)}));return function(){i();for(var e=0;e<n.length;e++)r.style.removeProperty("--"+t+"-"+n[e])}}}}();if("viewport-segment"===e)return Ee();var t=ye[e],n=we(t),r=Se(),o=[],i=Q((function(){if(void 0===r)return;null===c&&v()}),(function(){h()})),a={},l=void 0,c=null,s=!1,u=null;try{var d=Object.defineProperty({},"passive",{get:function(){l={passive:!0}}});D.add(globalThis,{type:"test",callback:ke,options:d})}catch(e){}function p(){s||(s=!0,Te((function(){s=!1;var e=m();null!==u&&function(e,t){for(var r=0;r<n.length;r++){var o=n[r];if(e[o]!==t[o])return!1}return!0}(u,e)||(u=e,i.emit(e))})))}function f(e){if(void 0!==e)o.push(e);else for(var t=0;t<o.length;t++)o[t]()}function g(e,n){var o=t[n],i=globalThis.document.createElement("div"),c=globalThis.document.createElement("div"),s=globalThis.document.createElement("div"),u=globalThis.document.createElement("div"),d={position:"absolute",width:"100px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:r+"("+o+")"};ae(i,d),ae(c,d),ae(s,{transition:"0s",animation:"none",width:"400px",height:"400px"}),ae(u,{transition:"0s",animation:"none",width:"250%",height:"250%"}),i.appendChild(s),c.appendChild(u),e.appendChild(i),e.appendChild(c),f((function(){i.scrollTop=c.scrollTop=1e4;var e=i.scrollTop,t=c.scrollTop;function n(){var n;n=this===i?e:t,this.scrollTop!==n&&(i.scrollTop=c.scrollTop=1e4,e=i.scrollTop,t=c.scrollTop,p())}D.add(i,{type:"scroll",callback:n,options:l}),D.add(c,{type:"scroll",callback:n,options:l})}));var g=globalThis.getComputedStyle(i);Object.defineProperty(a,n,{configurable:!0,get:function(){return globalThis.parseFloat(g.paddingBottom)}})}function v(){if(void 0!==r){a={},(c=globalThis.document.createElement("div")).setAttribute("data-"+e+"-observer",""),ae(c,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"});for(t=0;t<n.length;t++)g(c,n[t]);globalThis.document.body.appendChild(c),u=m(),f()}else for(var t=0;t<n.length;t++)a[n[t]]=0}function h(){null!==c&&(null!==c.parentNode&&c.parentNode.removeChild(c),c=null),o.length=0,a={},u=null}function b(e){return a[e]}function m(){for(var e={},t=0;t<n.length;t++){var r=n[t];e[r]=b(r)}return e}return{get value(){if(null!==c)return m();v();var e=m();return h(),e},onChange:function(e,t){return void 0===t&&(t={}),void 0===r?ke:i.subscribe(e,t)},useCssVariable:function(e){if(void 0===r||void 0===globalThis.document)return ke;var t=globalThis.document.documentElement;function o(r){for(var o=0;o<n.length;o++){var i=n[o];t.style.setProperty("--"+e+"-"+String(n[o]),r[i]+"px")}}var a=i.subscribe((function(e){o(e)}));return o(m()),function(){a();for(var r=0;r<n.length;r++)t.style.removeProperty("--"+e+"-"+String(n[r]))}}}}function xe(e,t){function n(r){if(!(this instanceof n))return new n(r);var o=new t(void 0===r?"":r);if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==r&&(o.message=r),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,n);else if(t.captureStackTrace&&"function"==typeof t.captureStackTrace)t.captureStackTrace(o,n);else try{var i=new t;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===t&&(t=Error),n.prototype=Object.create(t.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(t){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}var Ie=xe("PermissionNotGrantedError"),Ae=xe("NotSupportedError"),Oe=Pe("safe-area-inset"),De=Pe("safe-area-max-inset"),Me=Pe("keyboard-inset"),Ce=Pe("titlebar-area"),Ne=Pe("viewport-segment"),Le=Q((function(){_e=He(),D.add(globalThis,{type:"resize",callback:Be})}),(function(){_e=null,D.remove(globalThis,{type:"resize",callback:Be})})),Fe=Q((function(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&"function"==typeof globalThis.screen.orientation.addEventListener)return D.add(globalThis.screen.orientation,{type:"change",callback:je});if(void 0!==globalThis.orientation)return D.add(globalThis,{type:"orientationchange",callback:je});if("not all"!==be.media)return D.add(be,{type:"change",callback:je});throw new Ae("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported")}),(function(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&"function"==typeof globalThis.screen.orientation.removeEventListener)return D.remove(globalThis.screen.orientation,{type:"change",callback:je});if(void 0!==globalThis.orientation)return D.remove(globalThis,{type:"orientationchange",callback:je});if("not all"!==be.media)return D.remove(be,{type:"change",callback:je});throw new Ae("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported")})),Ue=Q((function(){return new Promise((function(e,t){if(!Ve())return t(new Ae("'window.DeviceOrientationEvent' does not supported."));var n=DeviceOrientationEvent;if("function"!=typeof n.requestPermission)return D.add(globalThis,{type:"deviceorientation",callback:ze}),e();n.requestPermission().then((function(n){return"granted"===n?(D.add(globalThis,{type:"deviceorientation",callback:ze}),e()):t(new Ie("'deviceorientation' permission is not granted."))})).catch((function(e){return t(new Ae("'window.DeviceOrientationEvent' does not supported."))}))}))}),(function(){D.remove(globalThis,{type:"deviceorientation",callback:ze})})),_e=null,We=null,qe=null,Re={get value(){return He()},environment:{safeAreaInset:Oe,safeAreaMaxInset:De,keyboardInset:Me,titlebarArea:Ce,viewportSegment:Ne},screenOrientation:{get supported(){return void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&void 0!==globalThis.screen.orientation.type||void 0!==globalThis.orientation||"not all"!==be.media},get value(){return Ge()},onChange:Fe.subscribe},deviceOrientation:{get supported(){return Ve()},get value(){return new Promise((function(e,t){if(null!==qe)return e(qe);if(!Ve())return t(new Ae("'window.DeviceOrientationEvent' does not supported."));var n=DeviceOrientationEvent,r=function(t){var n={alpha:t.alpha,beta:t.beta,gamma:t.gamma,absolute:t.absolute};return qe=n,D.remove(globalThis,{type:"deviceorientation",callback:r}),e(n)};"function"==typeof n.requestPermission?n.requestPermission().then((function(e){if("granted"!==e)return t(new Ie("'deviceorientation' permission is not granted."));D.add(globalThis,{type:"deviceorientation",callback:r})})).catch((function(e){return t(new Ae("'window.DeviceOrientationEvent' does not supported."))})):D.add(globalThis,{type:"deviceorientation",callback:r})}))},onChange:Ue.subscribe},onChange:Le.subscribe,Constants:{Orientation:ce},Errors:{NotSupportedError:Ae,PermissionNotGrantedError:Ie}};function Ge(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&void 0!==globalThis.screen.orientation.type)switch(globalThis.screen.orientation.type){case"portrait-primary":return ce.PortraitPrimary;case"portrait-secondary":return ce.PortraitSecondary;case"landscape-primary":return ce.LandscapePrimary;case"landscape-secondary":return ce.LandscapeSecondary}if(void 0!==globalThis.orientation)switch(globalThis.orientation){case 0:return ce.PortraitPrimary;case 180:return ce.PortraitSecondary;case 90:return ce.LandscapePrimary;case-90:case 270:return ce.LandscapeSecondary}if("not all"===be.media)throw new Ae("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported");return be.matches?ce.PortraitPrimary:ce.LandscapePrimary}function He(){var e=0,t=0,n=0,r=0,o=void 0!==globalThis.devicePixelRatio?globalThis.devicePixelRatio:-1;return void 0!==globalThis.innerWidth&&(e=globalThis.innerWidth,t=globalThis.innerHeight,n=globalThis.outerWidth,r=globalThis.outerHeight),{innerWidth:e,innerHeight:t,outerWidth:n,outerHeight:r,scale:o}}function Be(){var e=He();null!==_e&&e.innerWidth===_e.innerWidth&&e.innerHeight===_e.innerHeight&&e.outerWidth===_e.outerWidth&&e.outerHeight===_e.outerHeight&&e.scale===_e.scale||Le.emit(_e=e)}function je(){var e=Ge();null!==We&&e===We||Fe.emit(We=e)}function Ve(){return void 0!==globalThis.DeviceOrientationEvent}function ze(e){qe={alpha:e.alpha,beta:e.beta,gamma:e.gamma,absolute:e.absolute},Ue.emit(qe)}var Ye,Ke,Ze=xe("InvalidStateError"),Xe=null,Je=null,Qe=!1,$e=function(){if("function"==typeof Symbol){var e=globalThis.__nativeFnFsBridgeKey__;return"symbol"==typeof e?e:globalThis.__nativeFnFsBridgeKey__=Symbol("native.fn.fs.bridged")}return"__nativeFnFsBridged__"}(),et={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}},tt=function(){var e=globalThis.document.documentElement;if(void 0!==globalThis.document.fullscreenEnabled||void 0!==globalThis.document.exitFullscreen)return et.standard;for(var t=["webkit","moz","ms"],n=0;n<t.length;n++){var r=t[n],o=et[r];if(void 0!==globalThis.document[o.enabled]||void 0!==globalThis.document[o.element]||void 0!==globalThis.document[o.exit])return"webkit"===r&&void 0!==e.webkitRequestFullScreen&&(o.request="webkitRequestFullScreen"),o}return null}(),nt=Q((function(){null!=tt&&D.add(globalThis.document,{type:tt.events.change,callback:ut,options:!1});J.os.name===o.iOS&&vt()}),(function(){null!=tt&&D.remove(globalThis.document,{type:tt.events.change,callback:ut,options:!1});if(J.os.name!==o.iOS)return;for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)D.remove(e[t],{type:"webkitbeginfullscreen",callback:pt,options:!1}),D.remove(e[t],{type:"webkitendfullscreen",callback:ft,options:!1}),e[t][$e]=!1})),rt=Q((function(){null!=tt&&D.add(globalThis.document,{type:tt.events.error,callback:dt,options:!1})}),(function(){null!=tt&&D.remove(globalThis.document,{type:tt.events.error,callback:dt,options:!1})})),ot={get supported(){return function(){if(null!==tt)return!0===globalThis.document[tt.enabled];if(J.os.name!==o.iOS)return!1;var e=(t=globalThis.document.querySelector("video"),null!==t?t:null===Xe?Xe=globalThis.document.createElement("video"):Xe);var t;return!0===e.webkitSupportsFullscreen||"function"==typeof e.webkitEnterFullscreen}()},get element(){return it()},get isActive(){return at()},request:function(e,t){return new Promise((function(n,r){if(void 0===e&&(e=function(){if(J.os.name===o.iOS){var e=globalThis.document.querySelector("video");return null!==e?e:void 0}return globalThis.document.documentElement}()),void 0===e)return r(new Ae("Failed to enter fullscreen mode."));if(at()&&it()!==e&&J.browser.name===l.Safari&&J.os.name===o.iOS)return r(new Ae("There is already a Fullscreen element in this document."));var i=e.tagName.toLowerCase(),a=null!==Je&&!0===Je.webkitDisplayingFullscreen;if(null!==tt){var c=e[tt.request];if("function"==typeof c&&!a){var s=c.call(e,t);return void 0!==s&&"function"==typeof s.then?void s.then(n).catch((function(){try{if(J.os.name!==o.iOS)return r(new Ae('The "'+i+'" element does not support fullscreen requests.'));u()}catch(e){r(new Ae('The "'+i+'" element does not support fullscreen requests.'))}})):n()}}function u(){if(J.os.name===o.iOS&&void 0!==e&&"VIDEO"===e.tagName.toUpperCase()){var t=e;if(t.webkitSupportsFullscreen&&"function"==typeof t.webkitEnterFullscreen){if(null===tt&&gt(t),0===t.played.length)t.play().then((function(){try{t.webkitSupportsFullscreen&&"function"==typeof t.webkitEnterFullscreen&&t.webkitEnterFullscreen()}catch(e){return r(new Ze("The object is in an invalid state."))}}));else try{t.webkitEnterFullscreen()}catch(e){return r(new Ze("The object is in an invalid state."))}return Je=t,n()}}r(new Ae('The "'+i+'" element does not support fullscreen requests.'))}u()}))},exit:function(){return new Promise((function(e,t){if(null!==tt){var n=globalThis.document[tt.exit];if("function"==typeof n){var r=n.call(globalThis.document);return void 0!==r&&"function"==typeof r.then?void r.then(e).catch(e):e()}}!function(){if(J.os.name===o.iOS){var n=Je;if(null!==n&&"function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n.webkitDisplayingFullscreen?t(new Ae("Failed to exit fullscreen mode.")):(Je=null,e());for(var r=globalThis.document.querySelectorAll("video"),i=0;i<r.length;i++){var a=r[i];if("function"==typeof a.webkitExitFullscreen&&!0===a.webkitDisplayingFullscreen)return a.webkitExitFullscreen(),a.webkitDisplayingFullscreen?t(new Ae("Failed to exit fullscreen mode.")):(Je=null,e())}if(null===it())return e();t(new Ae("Failed to exit fullscreen mode."))}else t(new Ae("Failed to exit fullscreen mode."))}()}))},toggle:function(e,t){var n=it();if(void 0!==e)return n===e?this.exit():this.request(e,t);return null!==n?this.exit():this.request(void 0,t)},onChange:function(e,t,n){if("function"==typeof e)return nt.subscribe(e,t);var r=e,o=t;return nt.subscribe((function(e){e.element===r&&o(e)}),n)},onError:function(e,t,n){if("function"==typeof e)return rt.subscribe(e,t);var r=e,o=t;return rt.subscribe((function(e){e.element===r&&o(e)}),n)},Constants:{},Errors:{NotSupportedError:Ae,InvalidStateError:Ze}};function it(){if(null===tt)return null!==Je&&!0===Je.webkitDisplayingFullscreen?Je:null;var e=globalThis.document[tt.element];return void 0!==e?e:null}function at(){return null!==it()}function lt(e,t,n){return{nativeEvent:e,element:t,isActive:n}}function ct(e,t,n){nt.emit(lt(e,t,n))}function st(e,t,n){rt.emit(lt(e,t,n))}function ut(e){var t=e.target;t instanceof globalThis.Element&&ct(e,t,at()),t instanceof globalThis.Document&&ct(e,globalThis.document.documentElement,at())}function dt(e){var t=e.target;t instanceof globalThis.Element&&st(e,t,at()),t instanceof globalThis.Document&&st(e,globalThis.document.documentElement,at())}function pt(e){Je=this,ct(e,this,!0)}function ft(e){Je===this&&(Je=null),ct(e,this,!1)}function gt(e){e[$e]||void 0===e.webkitEnterFullscreen&&void 0===e.onwebkitbeginfullscreen||(D.add(e,{type:"webkitbeginfullscreen",callback:pt,options:!1}),D.add(e,{type:"webkitendfullscreen",callback:ft,options:!1}),e[$e]=!0)}function vt(){for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)gt(e[t])}Qe||(Qe=!0,J.os.name===o.iOS&&(vt(),void 0!==globalThis.MutationObserver&&new globalThis.MutationObserver((function(e){if(null!==Je){for(var t=!1,n=0;n<e.length;n++){for(var r=e[n].removedNodes,o=0;o<r.length;o++)if((a=r[o])===Je||a.nodeType===Node.ELEMENT_NODE&&a.contains(Je)){t=!0;break}if(t)break}t&&!globalThis.document.contains(Je)&&(Je=null)}for(n=0;n<e.length;n++){var i=e[n].addedNodes;for(o=0;o<i.length;o++){var a;if((a=i[o]).nodeType===Node.ELEMENT_NODE){var l=a;if("VIDEO"!==l.tagName)for(var c=l.querySelectorAll("video"),s=0;s<c.length;s++)gt(c[s]);else gt(l)}}}})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0}))),function(e){e.Notification="notifications",e.Geolocation="geolocation",e.Camera="camera",e.ClipboardRead="clipboard-read",e.Microphone="microphone",e.MIDI="midi",e.DeviceOrientation="device-orientation",e.DeviceMotion="device-motion"}(Ye||(Ye={})),function(e){e.Grant="grant",e.Denied="denied",e.Prompt="prompt",e.Unsupported="unsupported"}(Ke||(Ke={}));var ht=function(){if(void 0!==globalThis.navigator.mediaDevices&&void 0!==globalThis.navigator.mediaDevices.getUserMedia)return globalThis.navigator.mediaDevices.getUserMedia.bind(globalThis.navigator.mediaDevices);var e=void 0!==globalThis.navigator.getUserMedia?globalThis.navigator.getUserMedia:void 0!==globalThis.navigator.webkitGetUserMedia?globalThis.navigator.webkitGetUserMedia:void 0!==globalThis.navigator.mozGetUserMedia?globalThis.navigator.mozGetUserMedia:void 0!==globalThis.navigator.msGetUserMedia?globalThis.navigator.msGetUserMedia:void 0;return void 0!==e?function(t){return void 0===t&&(t={}),new Promise((function(n,r){e.call(globalThis.navigator,t,n,r)}))}:void 0}(),bt={get supported(){return void 0!==globalThis.navigator.permissions},request:function(e){var t=this;return new Promise((function(n,r){function o(){t.check(e).then(n)}t.check(e).then((function(t){if(t===Ke.Grant)return n(t);switch(e){case Ye.Notification:if(void 0===globalThis.Notification)return n(Ke.Unsupported);globalThis.Notification.requestPermission().then((function(e){n(mt(e))}));break;case Ye.Geolocation:if(void 0===globalThis.navigator.geolocation)return n(Ke.Unsupported);globalThis.navigator.geolocation.getCurrentPosition(o,o);break;case Ye.Microphone:case Ye.Camera:if(void 0===ht)return n(Ke.Unsupported);ht({video:e===Ye.Camera,audio:e===Ye.Microphone}).then((function(e){for(var t=e.getTracks(),n=0;n<t.length;n++)t[n].stop();o()})).catch(o);break;case Ye.ClipboardRead:if(void 0===globalThis.navigator.clipboard||void 0===globalThis.navigator.clipboard.read)return n(Ke.Unsupported);globalThis.navigator.clipboard.read().then(o).catch(o);break;case Ye.MIDI:if(void 0===globalThis.navigator.requestMIDIAccess)return n(Ke.Unsupported);globalThis.navigator.requestMIDIAccess().then(o).catch(o);break;case Ye.DeviceOrientation:case Ye.DeviceMotion:var i=yt(e);if(void 0===i||void 0===i.event)return n(Ke.Unsupported);if("function"!=typeof i.event.requestPermission)return n(Ke.Grant);try{i.event.requestPermission().then((function(e){n(mt(e))}))}catch(e){return r(new Ae("'DeviceOrientationEvent.requestPermission()' must be called within a user gesture context."))}break;default:return n(Ke.Unsupported)}}))}))},check:function(e){if(e===Ye.DeviceOrientation||e===Ye.DeviceMotion)return new Promise((function(t){var n=yt(e);if(void 0===n||void 0===n.event)return t(Ke.Unsupported);if("function"!=typeof n.event.requestPermission)return t(Ke.Grant);var r=!1;D.add(globalThis,{type:n.type,callback:function(){r=!0},options:{once:!0}}),setTimeout((function(){if(r)return t(Ke.Grant);n.event.requestPermission().then((function(e){t(mt(e))})).catch((function(){t(Ke.Prompt)}))}),50)}));return new Promise((function(t){if(void 0===globalThis.navigator.permissions)return t(Ke.Unsupported);globalThis.navigator.permissions.query({name:e}).then((function(e){switch(e.state){case"prompt":return t(Ke.Prompt);case"granted":return t(Ke.Grant);case"denied":return t(Ke.Denied);default:return t(Ke.Unsupported)}}))}))},Constants:{PermissionType:Ye,PermissionState:Ke},Errors:{NotSupportedError:Ae}};function mt(e){switch(e){case"granted":return Ke.Grant;case"denied":return Ke.Denied;case"prompt":case"default":return Ke.Prompt;default:return Ke.Unsupported}}function yt(e){switch(e){case Ye.DeviceOrientation:return{event:globalThis.DeviceOrientationEvent,type:"deviceorientation"};case Ye.DeviceMotion:return{event:globalThis.DeviceMotionEvent,type:"devicemotion"};default:return}}var wt,Tt,kt,St,Et,Pt,xt,It,At,Ot,Dt,Mt=Q((function(){if(!Lt())return;bt.request(Ye.Geolocation).then((function(e){e===Ke.Grant&&(Ct=globalThis.navigator.geolocation.watchPosition((function(e){var t;t=e.coords,Mt.emit(t)})))}))}),(function(){if(!Lt()||null===Ct)return;globalThis.navigator.geolocation.clearWatch(Ct)})),Ct=null,Nt={get value(){return new Promise((function(e,t){function n(n){(function(e){return new Promise((function(t,n){var r;(r="http://ip-api.com/json?fields=lat,lon",new Promise((function(e){var t={},n=void 0;if(void 0===globalThis.fetch){if("undefined"!=typeof XMLHttpRequest){var o=new XMLHttpRequest;o.open("GET",r,!0);for(var i=we(t),a=0;a<i.length;a++){var l=i[a];o.setRequestHeader(l,t[l])}return o.onreadystatechange=function(){if(4===o.readyState)if(o.status>=200&&o.status<300)try{e(JSON.parse(o.responseText))}catch(t){e(void 0)}else e(void 0)},o.onerror=function(){e(void 0)},void o.send(n)}e(void 0)}else fetch(r,{method:"GET",headers:t,body:n}).then((function(t){return t.ok?t.json().then((function(t){e(t)})).catch((function(){e(void 0)})):(e(void 0),Promise.resolve())})).catch((function(){e(void 0)}))}))).then((function(r){if(void 0!==r){var o={latitude:r.lat,longitude:r.lon,accuracy:-1,altitude:null,altitudeAccuracy:null,heading:null,speed:null};t(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=Object(e[0]),r=1;r<e.length;r++){var o=e[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(n[i]=o[i])}return n}(o,{toJSON:function(){return o}}))}else n(e)})).catch((function(){n(e)}))}))})(n).then(e).catch(t)}if(!Lt())return n(new Ae("'navigator.geolocation' does not supported."));bt.request(Ye.Geolocation).then((function(t){if(t!==Ke.Grant)return n(new Ie("'geolocation' permission is not granted."));globalThis.navigator.geolocation.getCurrentPosition((function(t){e(t.coords)}),(function(e){return n(function(e){switch(e.code){case GeolocationPositionError.PERMISSION_DENIED:return new Ie("'geolocation' permission is not granted.");case GeolocationPositionError.POSITION_UNAVAILABLE:return new Ae("The acquisition of the geolocation failed because at least one internal source of position returned an internal error.");case GeolocationPositionError.TIMEOUT:return new Ae("The time allowed to acquire the geolocation was reached before the information was obtained.");default:return new Ae("Unknown error.")}}(e))}))}))}))},get supported(){return Lt()},onChange:Mt.subscribe,Constants:{},Errors:{NotSupportedError:Ae,PermissionNotGrantedError:Ie}};function Lt(){return void 0!==globalThis.navigator.geolocation}!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(Pt||(Pt={})),function(e){e.General="general",e.Network="network",e.Display="display",e.Appearance="appearance",e.Accessibility="accessibility",e.Battery="battery",e.Datetime="datetime",e.Language="language",e.Accounts="accounts",e.Storage="storage"}(xt||(xt={})),function(e){e.Image="image",e.Video="video"}(It||(It={})),function(e){e.User="user",e.Environment="environment"}(At||(At={})),function(e){e.Desktop="desktop",e.Documents="documents",e.Downloads="downloads",e.Music="music",e.Pictures="pictures",e.Videos="videos"}(Ot||(Ot={})),function(e){e.Read="read",e.ReadWrite="readwrite"}(Dt||(Dt={}));var Ft=((wt={})[o.Android]=((Tt={})[xt.General]="intent:#Intent;action=android.settings.SETTINGS;end",Tt[xt.Network]="intent:#Intent;action=android.settings.WIFI_SETTINGS;end",Tt[xt.Display]="intent:#Intent;action=android.settings.DISPLAY_SETTINGS;end",Tt[xt.Appearance]="intent:#Intent;action=android.settings.DISPLAY_SETTINGS;end",Tt[xt.Accessibility]="intent:#Intent;action=android.settings.ACCESSIBILITY_SETTINGS;end",Tt[xt.Battery]="intent:#Intent;action=android.settings.BATTERY_SAVER_SETTINGS;end",Tt[xt.Datetime]="intent:#Intent;action=android.settings.DATE_SETTINGS;end",Tt[xt.Language]="intent:#Intent;action=android.settings.LOCALE_SETTINGS;end",Tt[xt.Accounts]="intent:#Intent;action=android.settings.SYNC_SETTINGS;end",Tt[xt.Storage]="intent:#Intent;action=android.settings.INTERNAL_STORAGE_SETTINGS;end",Tt),wt[o.Windows]=((kt={})[xt.General]="ms-settings:system",kt[xt.Network]="ms-settings:network",kt[xt.Display]="ms-settings:display",kt[xt.Appearance]="ms-settings:colors",kt[xt.Accessibility]="ms-settings:easeofaccess",kt[xt.Battery]="ms-settings:batterysaver",kt[xt.Datetime]="ms-settings:dateandtime",kt[xt.Language]="ms-settings:regionlanguage",kt[xt.Accounts]="ms-settings:emailandaccounts",kt[xt.Storage]="ms-settings:storagesense",kt),wt[o.MacOS]=((St={})[xt.General]="x-apple.systempreferences:",St[xt.Network]="x-apple.systempreferences:com.apple.preference.network",St[xt.Display]="x-apple.systempreferences:com.apple.preference.displays",St[xt.Appearance]="x-apple.systempreferences:com.apple.preference.general",St[xt.Accessibility]="x-apple.systempreferences:com.apple.preference.universalaccess",St[xt.Battery]="x-apple.systempreferences:com.apple.preference.energysaver",St[xt.Datetime]="x-apple.systempreferences:com.apple.preference.datetime",St[xt.Language]="x-apple.systempreferences:com.apple.Localization",St[xt.Accounts]="x-apple.systempreferences:com.apple.preferences.internetaccounts",St[xt.Storage]="x-apple.systempreferences:",St),wt["MacOS13+"]=((Et={})[xt.General]="x-apple.systempreferences:com.apple.General-Settings.extension",Et[xt.Network]="x-apple.systempreferences:com.apple.Network-Settings.extension",Et[xt.Display]="x-apple.systempreferences:com.apple.Displays-Settings.extension",Et[xt.Appearance]="x-apple.systempreferences:com.apple.Appearance-Settings.extension",Et[xt.Accessibility]="x-apple.systempreferences:com.apple.Accessibility-Settings.extension",Et[xt.Battery]="x-apple.systempreferences:com.apple.Battery-Settings.extension",Et[xt.Datetime]="x-apple.systempreferences:com.apple.Date-Time-Settings.extension",Et[xt.Language]="x-apple.systempreferences:com.apple.Localization-Settings.extension",Et[xt.Accounts]="x-apple.systempreferences:com.apple.Internet-Accounts-Settings.extension",Et[xt.Storage]="x-apple.systempreferences:com.apple.settings.Storage",Et),wt);function Ut(){try{if(null!==globalThis.top&&globalThis.top!==globalThis.window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}function _t(e,t){var n;void 0===t&&(t=globalThis);try{n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:t})}catch(e){(n=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(n)}function Wt(e){for(var t="",n=(new Date).getTime(),r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt((n=(9301*n+49297)%233280)%62);return t}function qt(e,t,n){return t|=0,"string"!=typeof e&&(e=String(e)),e.length>=t?e:((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e)}var Rt=xe("URLOpenError"),Gt=xe("UserCancelledError"),Ht={app:function(e){var t,n=J.os.name,r=[],i=[],a={};if(n===o.Android){var l=function(e){return void 0!==e[o.Android]?e[o.Android]:e.android}(e);if(void 0===l)return Promise.reject(dn(i));if(t=l.timeout,a.scheme=sn(l.scheme),a.intent=sn(l.intent),a.packageName=l.packageName,a.fallback=sn(l.fallback),a.appStore=zt(a.packageName,o.Android),a.webStore=Yt(a.packageName,o.Android),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.intent&&(void 0===a.scheme||void 0===a.packageName||void 0===a.fallback)){var c=function(e){for(var t={},n=e.split("#Intent;"),r=n[0].substring(9),o=n[1],i=o.substring(0,o.length-4).split(";"),a={},l=0;l<i.length;l++){var c=i[l],s=c.indexOf("=");-1!==s&&(a[c.substring(0,s)]=c.substring(s+1))}void 0!==a.scheme&&(t.scheme=a.scheme+"://"+r);void 0!==a.package&&(t.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(t.fallback=a["S.browser_fallback_url"]);return t}(a.intent);void 0!==c.scheme&&void 0===a.scheme&&(a.scheme=c.scheme),void 0!==c.packageName&&void 0===a.packageName&&(a.packageName=c.packageName),void 0!==c.fallback&&void 0===a.fallback&&(a.fallback=c.fallback)}void 0!==a.scheme&&void 0===a.intent&&(a.intent=function(e,t,n){var r=e.split("://"),i=r[0],a=r[1],l="intent://";void 0!==a&&(l+=a);l+="#Intent;scheme="+i+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==t&&(l+="package="+t+";");void 0!==n&&"string"==typeof n?l+="S.browser_fallback_url="+globalThis.encodeURIComponent(n)+";":void 0!==t&&(l+="S.browser_fallback_url="+globalThis.encodeURIComponent(zt(t,o.Android))+";");return l+"end"}(a.scheme,a.packageName,a.fallback))}else if(n===o.iOS){l=function(e){return void 0!==e[o.iOS]?e[o.iOS]:e.ios}(e);if(void 0===l)return Promise.reject(dn(i));t=l.timeout,a.scheme=sn(l.scheme),a.bundleId=l.bundleId,a.trackId=l.trackId,a.universal=sn(l.universal),a.fallback=sn(l.fallback),a.appStore=zt(a.trackId,o.iOS),a.webStore=Yt(a.trackId,o.iOS),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.bundleId&&void 0===a.trackId&&(a.trackId=Vt(a.bundleId))}else if(n===o.Windows){l=function(e){return void 0!==e[o.Windows]?e[o.Windows]:e.windows}(e);if(void 0===l)return Promise.reject(dn(i));t=l.timeout,a.scheme=sn(l.scheme),a.productId=l.productId,a.fallback=sn(l.fallback),a.appStore=zt(a.productId,o.Windows),a.webStore=Yt(a.productId,o.Windows),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore}else if(n===o.MacOS){l=function(e){return void 0!==e[o.MacOS]?e[o.MacOS]:e.macos}(e);if(void 0===l)return Promise.reject(dn(i));t=l.timeout,a.scheme=sn(l.scheme),a.bundleId=l.bundleId,a.trackId=l.trackId,a.fallback=sn(l.fallback),a.appStore=zt(a.trackId,o.MacOS),a.webStore=Yt(a.trackId,o.MacOS),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.bundleId&&void 0===a.trackId&&(a.trackId=Vt(a.bundleId))}tn(r,a.intent,Pt.Intent,Zt()),tn(r,a.universal,Pt.Universal,Xt()),tn(r,a.scheme,Pt.Scheme,!0),tn(r,a.fallback,Pt.Fallback,!0),tn(r,a.appStore,Pt.Store,a.allowAppStore),tn(r,a.webStore,Pt.Store,a.allowWebStore),void 0===t&&(t=Kt(n));return new Promise((function(e,n){return function o(a){if(void 0===a&&(a=0),a>=r.length)return n(dn(i));var l=r[a],c=l[0],s=l[1];if("string"==typeof s)return i[a]=s,bn(s,a,t).then((function(){e(c)})).catch((function(){o(a+1)}));i[a]="[function fallback]",s(),e(c)}()}))},telephone:function(e){return mn(e,"tel")},message:function(e){return mn(e,"sms")},mail:function(e){return mn(e,"mailto")},file:function(e){if(void 0!==globalThis.showOpenFilePicker){var t={};if(void 0!==e&&(void 0!==e.multiple&&(t.multiple=e.multiple),void 0!==e.id&&(t.id=e.id),void 0!==e.startIn&&(t.startIn=e.startIn),void 0!==e.accept)){var n={};t.excludeAcceptAllOption=!0,t.types=[{description:"",accept:n}];for(var r=0;r<e.accept.length;r++){var o=e.accept[r];/^\.\w+/i.test(o)?(void 0===n["application/octet-stream"]&&(n["application/octet-stream"]=[]),n["application/octet-stream"].push(o)):/^\w+\/\w+$/i.test(o)&&(n[o]=[])}}return vn(globalThis.showOpenFilePicker(t))}var i=le("input");i.type="file",void 0!==e&&(void 0!==e.multiple&&(i.multiple=e.multiple),void 0!==e.accept&&(i.accept=nn(e.accept)));return vn(i)},directory:function(e){if(!Qt())return Promise.reject(new Ae("'window.showDirectoryPicker' and 'HTMLInputElement.prototype.webkitdirectory' does not supported."));if(void 0!==globalThis.showDirectoryPicker){var t={};return void 0!==e&&(void 0!==e.id&&(t.id=e.id),void 0!==e.startIn&&(t.startIn=e.startIn),void 0!==e.mode&&(t.mode=e.mode)),hn(globalThis.showDirectoryPicker(t))}var n=le("input");return n.type="file",n.webkitdirectory=!0,hn(n)},setting:function(e){var t=J.os.name,n=J.os.version;if(!Jt())return Promise.reject(dn([]));var r=[];switch(t){case o.Android:e!==xt.General&&(e===xt.Accessibility&&u(n,"1.6")>=0?r.push(Ft.Android[xt.Accessibility]):e===xt.Battery&&u(n,"5.1")>=0?r.push(Ft.Android[xt.Battery]):e===xt.Accounts&&u(n,"1.5")>=0?r.push(Ft.Android[xt.Accounts]):e===xt.Storage&&u(n,"3.0")>=0?r.push(Ft.Android[xt.Storage]):r.push(Ft.Android[e])),r.push(Ft.Android[xt.General]);break;case o.Windows:r.push(Ft.Windows[e]);break;case o.MacOS:if(e===xt.Appearance&&u(n,"10.14")<0){r.push(Ft.MacOS[xt.General]);break}u(n,"13.0")<0?r.push(Ft.MacOS[e]):r.push(Ft["MacOS13+"][e])}return new Promise((function(e,t){return function n(o){return void 0===o&&(o=0),o>=r.length?t(dn([])):bn(r[o],o,750).then((function(){e()})).catch((function(){n(o+1)}))}()}))},camera:function(e){var t=le("input");t.type="file",t.accept="image/*;capture=camera",t.capture="environment",void 0!==e&&(void 0!==e.type&&(e.type===It.Image?t.accept="image/*;capture=camera":t.accept="video/*;capture=camcorder"),void 0!==e.capture&&(e.capture===At.Environment?t.capture="environment":t.capture="user"));return vn(t)},contact:function(e){return new Promise((function(t,n){if(!$t())return n(new Ae("'navigator.contacts' does not supported."));var r=!1;void 0!==e&&void 0!==e.multiple&&(r=e.multiple),globalThis.navigator.contacts.getProperties().then((function(e){globalThis.navigator.contacts.select(e,{multiple:r}).then((function(e){t(e)}))}))}))},share:function(e){return new Promise((function(t,n){return en()?globalThis.navigator.canShare(e)?void globalThis.navigator.share(e).then((function(){t()})).catch((function(e){return"AbortError"===e.name?n(new Gt("User cancelled the operation.")):n(new Ae(e.message))})):n(new Ae("The provided data cannot be shared on this device.")):n(new Ae("'navigator.share' does not supported."))}))},calendar:function(e){var t="function"==typeof Date.now?Date.now():(new Date).getTime(),n="BEGIN:VCALENDAR\r\nVERSION:2.0\r\n";""!==globalThis.document.title?n+=cn("PRODID:-//"+an(globalThis.document.title)+"//EN")+"\r\n":n+=cn("PRODID:-//"+an(globalThis.location.host)+"//EN")+"\r\n";n+="BEGIN:VEVENT\r\nUID:"+t+"-"+Wt(10)+"\r\nDTSTAMP:"+un(new Date)+"\r\n",!0===e.allDay?n+="DTSTART;VALUE=DATE:"+un(e.startDate,!0)+"\r\nDTEND;VALUE=DATE:"+un(e.endDate,!0)+"\r\n":n+="DTSTART:"+un(e.startDate)+"\r\nDTEND:"+un(e.endDate)+"\r\n";void 0!==e.title&&(n+=cn("SUMMARY:"+an(e.title))+"\r\n");void 0!==e.description&&(n+=cn("DESCRIPTION:"+an(e.description))+"\r\n");void 0!==e.location&&(n+=cn("LOCATION:"+an(e.location))+"\r\n");if(void 0!==e.recur){var r="FREQ="+e.recur.frequency;void 0!==e.recur.interval&&e.recur.interval>1&&(r+=";INTERVAL="+String(e.recur.interval)),void 0!==e.recur.count&&(r+=";COUNT="+String(e.recur.count)),void 0!==e.recur.until&&(r+=";UNTIL="+un(e.recur.until)),void 0!==e.recur.byMonth&&e.recur.byMonth.length>0&&(r+=";BYMONTH="+nn(e.recur.byMonth)),void 0!==e.recur.byWeekNo&&e.recur.byWeekNo.length>0&&(r+=";BYWEEKNO="+nn(e.recur.byWeekNo)),void 0!==e.recur.byYearDay&&e.recur.byYearDay.length>0&&(r+=";BYYEARDAY="+nn(e.recur.byYearDay)),void 0!==e.recur.byMonthDay&&e.recur.byMonthDay.length>0&&(r+=";BYMONTHDAY="+nn(e.recur.byMonthDay)),void 0!==e.recur.byDay&&e.recur.byDay.length>0&&(r+=";BYDAY="+nn(e.recur.byDay)),void 0!==e.recur.byHour&&e.recur.byHour.length>0&&(r+=";BYHOUR="+nn(e.recur.byHour)),void 0!==e.recur.byMinute&&e.recur.byMinute.length>0&&(r+=";BYMINUTE="+nn(e.recur.byMinute)),void 0!==e.recur.bySecond&&e.recur.bySecond.length>0&&(r+=";BYSECOND="+nn(e.recur.bySecond)),void 0!==e.recur.bySetPos&&e.recur.bySetPos.length>0&&(r+=";BYSETPOS="+nn(e.recur.bySetPos)),void 0!==e.recur.weekStart&&"MO"!==e.recur.weekStart&&(r+=";WKST="+e.recur.weekStart),n+=cn("RRULE:"+r)+"\r\n"}if(void 0!==e.alarm)for(var o=0;o<e.alarm.length;o++){var i=e.alarm[o];if(n+="BEGIN:VALARM\r\nACTION:DISPLAY\r\n",void 0!==i.datetime)n+="TRIGGER;VALUE=DATE-TIME:"+un(i.datetime)+"\r\n";else{var a="";if((void 0===i.before||i.before)&&(a+="-"),a+="P",void 0!==i.weeks&&i.weeks>0)a+=String(i.weeks)+"W";else{void 0!==i.days&&i.days>0&&(a+=String(i.days)+"D");var l=void 0!==i.hours&&i.hours>0,c=void 0!==i.minutes&&i.minutes>0,s=void 0!==i.seconds&&i.seconds>0;(l||c||s)&&(a+="T",l&&(a+=String(i.hours)+"H"),c&&(a+=String(i.minutes)+"M"),s&&(a+=String(i.seconds)+"S"))}n+="TRIGGER:"+a+"\r\n"}void 0!==i.description?n+=cn("DESCRIPTION:"+an(i.description))+"\r\n":n+="DESCRIPTION:Reminder\r\n",void 0===i.datetime&&void 0!==i.repeat&&void 0!==i.repeatDuration&&(n+="REPEAT:"+String(i.repeat)+"\r\n",n+="DURATION:PT"+String(i.repeatDuration)+"M\r\n"),n+="END:VALARM\r\n"}n+="END:VEVENT\r\nEND:VCALENDAR";var u=le("a");u.href="data:text/calendar;charset=utf-8,"+globalThis.encodeURIComponent(n),u.download="event-"+t+".ics",_t(u)},supported:{get intent(){return Zt()},get universal(){return Xt()},get setting(){return Jt()},get directory(){return Qt()},get camera(){return function(){var e=J.os.name,t=J.os.version;return!J.isWebview&&(e===o.iOS&&0===u(t,"10.3.1")||e===o.Android&&u(t,"3.0")>=0)}()},get contact(){return $t()},get share(){return en()},get calendar(){return J.os.name===o.iOS&&u(J.os.version,"15.0")>=0&&J.browser.name===l.Safari&&!J.isWebview}},Constants:{AppOpenState:Pt,SettingType:xt,CameraType:It,CaptureType:At},Errors:{URLOpenError:Rt,NotSupportedError:Ae,UserCancelledError:Gt}},Bt=void 0;function jt(){var e=Ut(),t=e.document,n={},r={},i=void 0!==globalThis.cordova,a=J.os.name===o.iOS,l=a&&u(J.os.version,"8.0")>=0,c=a&&!l,s=D.useStd;return i?(n.focus="resume",n.blur="pause",r.focus=t,r.blur=t):l?(n.visibilitychange="visibilitychange",r.visibilitychange=t):c?(n.focus="pageshow",n.blur="pagehide",r.focus=e,r.blur=e):s?(n.focus="focus",n.blur="blur",n.visibilitychange="visibilitychange",r.focus=e,r.blur=e,r.visibilitychange=t):(n.focus="focus",n.blur="blur",n.visibilitychange="visibilitychange",r.focus=t,r.blur=t,r.visibilitychange=t),{type:n,target:r}}function Vt(e){try{var t=new XMLHttpRequest;if(t.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),200===t.status)try{return function(e){if(void 0===e.results)return;var t=e.results;if(0===t.length)return;var n=t[0];return void 0===n?void 0:""+n.trackId}(JSON.parse(t.response))}catch(e){return}return}catch(e){return}}function zt(e,t){if(void 0!==e)switch(t){case o.Android:return"market://details?id="+e;case o.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case o.Windows:return"ms-windows-store://pdp/?ProductId="+e;case o.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new Rt('Unsupported OS: "'+J.userAgent+'"')}}function Yt(e,t){if(void 0!==e)switch(t){case o.Android:return"https://play.google.com/store/apps/details?id="+e;case o.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case o.Windows:return"https://apps.microsoft.com/detail/"+e;case o.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new Rt('Unsupported OS: "'+J.userAgent+'"')}}function Kt(e){switch(e){case o.iOS:return 2e3;case o.Android:return 1e3;default:return 750}}function Zt(){if(J.os.name!==o.Android)return!1;var e=J.browser.version;return!(J.browser.name===l.SamsungInternet&&u(e,"17.0.1.69")>=0&&u(e,"17.0.7.34")<0)&&(!(J.browser.name===l.Firefox&&u(e,"41.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"59.0")>=0&&u(e,"68.11.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"80.0")>=0&&u(e,"82.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"96.0")>=0&&u(e,"107.0")<0)&&(!(J.browser.name===l.Opera&&u(e,"14.0")<0)&&!(/(?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/[\w.]+;/i.test(J.userAgent)||/instagram[\/ ][-\w.]+/i.test(J.userAgent)||/micromessenger\/([\w.]+)/i.test(J.userAgent)||/musical_ly(?:.+app_?version\/|_)[\w.]+/i.test(J.userAgent)||/ultralite app_version\/[\w.]+/i.test(J.userAgent)))))))}function Xt(){return J.os.name===o.iOS&&u(J.os.version,"9.0")>=0}function Jt(){var e=J.os.name,t=J.os.version;return e!==o.Unknown&&(!(e===o.Android&&!Zt())&&(e!==o.iOS&&((e!==o.Windows||!("Vista"===t||"XP"===t||"2000"===t||"NT 4.0"===t||"NT 3.11"===t||"ME"===t||u(t,"10")<0))&&!(e===o.MacOS&&u(t,"10.10")<0))))}function Qt(){return void 0!==globalThis.showDirectoryPicker||void 0!==le("input").webkitdirectory}function $t(){return void 0!==globalThis.navigator.contacts}function en(){return void 0!==globalThis.navigator.share}function tn(e,t,n,r){void 0===r&&(r=!1),"function"!=typeof t&&"string"!=typeof t||!r||e.push([n,t])}function nn(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=",");for(var r=e.length,o="",i=0;i<r;i++)0!==i&&(o+=n),o+=void 0!==t?t(e[i]):e[i];return o}function rn(e){return globalThis.encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function on(e){return rn(e).replace(/%22/g,'"').replace(/%40/g,"@").replace(/%2C/gi,",")}function an(e){return e.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\r\n|\n|\r/g,"\\n")}function ln(e){return void 0!==globalThis.TextEncoder?(new TextEncoder).encode(e).length:globalThis.unescape(globalThis.encodeURIComponent(e)).length}function cn(e){if(ln(e)<=75)return e;for(var t="",n="",r=0,o=0;o<e.length;o++){var i=e[o],a=ln(e[o]);""!==n&&r+a>75?(t+=n+"\r\n ",n=i,r=a):(n+=i,r+=a)}return t+=n}function sn(e){return e instanceof URL?e.toString():e}function un(e,t){return void 0===t&&(t=!1),t?e.getUTCFullYear()+qt(e.getUTCMonth()+1,2,"0")+qt(e.getUTCDate(),2,"0"):e.getUTCFullYear()+qt(e.getUTCMonth()+1,2,"0")+qt(e.getUTCDate(),2,"0")+"T"+qt(e.getUTCHours(),2,"0")+qt(e.getUTCMinutes(),2,"0")+qt(e.getUTCSeconds(),2,"0")+"Z"}function dn(e){for(var t="",n=0;n<e.length;n++)t+="\n"+(n+1)+": "+e[n];return t.length>0&&(t="\n"+t+"\n"),new Rt("Failed to open any of the provided URLs: "+t)}function pn(){var e=Ut().document;return"hidden"===e.visibilityState||("hidden"===e.webkitVisibilityState||("hidden"===e.mozVisibilityState||("hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus()))))}function fn(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function gn(e){try{e.focus({preventScroll:!0})}catch(t){try{e.focus()}catch(e){}}}function vn(e){if("[object Promise]"===Object.prototype.toString.call(e)){var t=e;return new Promise((function(e,n){t.then((function(t){for(var r=[],o=0;o<t.length;o++)r[o]=t[o].getFile();Promise.all(r).then(e).catch(n)})).catch((function(e){return"AbortError"===e.name?n(new Gt("User cancelled the operation.")):n(new Ae(e.message))}))}))}var n=e,r=jt(),o=Ut().document;return new Promise((function(e,t){var i=!1;function a(a){if(!i){i=!0;var u=n.files,d=[];if(null===u)return e(d);for(var p=0;p<u.length;p++)d.push(u[p]);!function(){Bt=void 0;try{D.remove(r.target.focus,{type:r.type.focus,callback:l}),D.remove(r.target.visibilitychange,{type:r.type.visibilitychange,callback:c}),D.remove(o,{type:"click",callback:s})}catch(e){}}(),a?e(d):t(new Gt("User cancelled the operation."))}}function l(){globalThis.setTimeout((function(){n.value.length>0?a(!0):a(!1)}),1e3)}function c(){pn()||l()}function s(){a(!1)}n.onchange=function(){a(!0)},void 0!==Bt&&Bt(),void 0!==n.oncancel?n.oncancel=function(){a(!1)}:n.onclick=function(){D.add(r.target.visibilitychange,{type:r.type.visibilitychange,callback:c}),D.add(r.target.focus,{type:r.type.focus,callback:l}),globalThis.setTimeout((function(){D.add(o,{type:"click",callback:s})}),100),Bt=function(){a(!1)}},_t(n)}))}function hn(e){if("[object Promise]"===Object.prototype.toString.call(e)){var t=e;return new Promise((function(e,n){t.then((function(t){var r=[],o=[];(function e(t,n){return void 0===n&&(n=""),new Promise((function(i,a){var l=t.entries();!function t(){l.next().then((function(a){if(a.done)return i();var l,c=a.value[0],s=a.value[1];l=""===n?c:n+"/"+c,"file"===s.kind?r.push(s.getFile().then((function(e){o.push({file:e,relativePath:l})}))):r.push(e(s,l)),t()})).catch(a)}()}))})(t,t.name).then((function(){Promise.all(r).then((function(){e(o)})).catch(n)})).catch(n)})).catch((function(e){return"AbortError"===e.name?n(new Gt("User cancelled the operation.")):n(new Ae(e.message))}))}))}var n=e;return new Promise((function(e,t){vn(n).then((function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push({file:o,relativePath:o.webkitRelativePath})}e(n)})).catch(t)}))}function bn(e,t,n){var r=jt(),o=Ut().document,i=void 0,a=void 0;return new Promise((function(l,c){var s,u=!1;function d(e){u||(u=!0,function(){void 0!==s&&(clearTimeout(s),s=void 0);try{D.remove(r.target.blur,{type:r.type.blur,callback:p}),D.remove(r.target.focus,{type:r.type.focus,callback:f}),D.remove(r.target.visibilitychange,{type:r.type.visibilitychange,callback:g})}catch(e){}if(void 0!==i)try{o.body.removeChild(i)}catch(e){}if(void 0!==a)try{o.body.removeChild(a)}catch(e){}}(),e?l():c())}function p(){void 0!==s&&(clearTimeout(s),s=void 0),D.remove(r.target.blur,{type:r.type.blur,callback:p}),D.add(r.target.focus,{type:r.type.focus,callback:f})}function f(){d(!0)}function g(){pn()?p():f()}s=globalThis.setTimeout((function(){d(!1)}),n),D.add(r.target.blur,{type:r.type.blur,callback:p}),D.add(r.target.visibilitychange,{type:r.type.visibilitychange,callback:g}),fn(o)||function(){var e=Ut(),t=e.document;if(gn(e),fn(t))return!0;if(t.body.tabIndex<0&&(t.body.tabIndex=-1),gn(t.body),fn(t))return!0;var n=void 0;try{if(void 0===(n=le("input")))return!1;n.type="text",n.readOnly=!0,t.body.appendChild(n),gn(n);try{n.select()}catch(e){}if(fn(t))return!0}catch(e){}finally{if(null!=n){try{n.blur()}catch(e){}try{t.body.removeChild(n)}catch(e){}}}fn(t)}();try{void 0!==globalThis.cordova?globalThis.open(e,"_system"):(i=function(e,t){var n=Ut(),r=n.document,o=void 0;try{return 0===t?void(n.location.href=e):((o=le("a")).href=e,r.body.appendChild(o),_t(o,n),o)}catch(e){}finally{if(void 0!==o)try{r.body.removeChild(o)}catch(e){}}}(e,t),a=function(e){var t=Ut().document,n=void 0;try{if(void 0===(n=le("iframe")))return;n.src=e,t.body.appendChild(n),globalThis.setTimeout((function(){if(void 0!==n)try{t.body.removeChild(n)}catch(e){}}),500)}catch(e){}return n}(e))}catch(e){d(!1)}}))}function mn(e,t){"string"==typeof e.to&&(e.to=on(e.to)),"string"==typeof e.cc&&(e.cc=on(e.cc)),"string"==typeof e.bcc&&(e.bcc=on(e.bcc)),"string"==typeof e.subject&&(e.subject=rn(e.subject)),"string"==typeof e.body&&(e.body=rn(e.body)),"object"==typeof e.to&&(e.to=nn(e.to,on)),"object"==typeof e.cc&&(e.cc=nn(e.cc,on)),"object"==typeof e.bcc&&(e.bcc=nn(e.bcc,on));var n=[],r=t+":";return"string"==typeof e.to&&(r+=e.to),"string"==typeof e.cc&&n.push("cc="+e.cc),"string"==typeof e.bcc&&n.push("bcc="+e.bcc),"string"==typeof e.subject&&n.push("subject="+e.subject),"string"==typeof e.body&&n.push("body="+e.body),bn(r+"?"+nn(n,void 0,"&"),0,Kt(J.os.name))}var yn=/iemobile/i.test(J.userAgent),wn=/windows phone/i.test(J.userAgent),Tn=null,kn={get value(){return function(){var e=En();if(!e)return;var t=e.getAttribute("content");return"string"==typeof t?t:void 0}()},set value(e){var t;void 0===e?(t=En())&&(t.remove(),Tn=null):function(e){var t=En();null===t&&(t=function(){var e=globalThis.document.createElement("meta");return e.setAttribute("name",Sn()),globalThis.document.head.prepend(e),Tn=e}());t.setAttribute("content",e)}(e)},Constants:{},Errors:{}};function Sn(){return yn?"msapplication-navbutton-color":wn?"msapplication-TileColor":"theme-color"}function En(){return null!==Tn&&Tn.isConnected?Tn:Tn=globalThis.document.querySelector('meta[name="'+Sn()+'"]')}var Pn={get supported(){return xn()},run:function(e){if(xn())return globalThis.navigator.vibrate(e);throw new Ae("'navigator.vibrate' does not supported.")},stop:function(){return this.run(0)},Constants:{},Errors:{NotSupportedError:Ae}};function xn(){return void 0!==globalThis.navigator.vibrate}var In="picture-in-picture",An="inline",On=null,Dn=null,Mn=!1,Cn=function(){if("function"==typeof Symbol){var e=globalThis.__nativeFnPipBridgeKey__;return"symbol"==typeof e?e:globalThis.__nativeFnPipBridgeKey__=Symbol("native.fn.pip.bridged")}return"__nativeFnPipBridged__"}(),Nn=Q((function(){if(_n())return D.add(globalThis.document,{type:"enterpictureinpicture",callback:Gn,options:!1}),void D.add(globalThis.document,{type:"leavepictureinpicture",callback:Hn,options:!1});zn()}),(function(){if(_n())return D.remove(globalThis.document,{type:"enterpictureinpicture",callback:Gn,options:!1}),void D.remove(globalThis.document,{type:"leavepictureinpicture",callback:Hn,options:!1});for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)D.remove(e[t],{type:"webkitpresentationmodechanged",callback:jn,options:!1}),e[t][Cn]=!1})),Ln=Q((function(){D.add(globalThis.document,{type:"pictureinpictureerror",callback:Bn,options:!1})}),(function(){D.remove(globalThis.document,{type:"pictureinpictureerror",callback:Bn,options:!1})})),Fn={get supported(){return function(){if("boolean"==typeof globalThis.document.pictureInPictureEnabled)return globalThis.document.pictureInPictureEnabled;var e=Un();return"function"==typeof e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode(In)}()},get element(){return Yn()},get isActive(){return Kn()},request:function(e){return new Promise((function(t,n){var r;if(void 0===e&&(r=globalThis.document.querySelector("video"),e=null!==r?r:void 0),void 0===e)return n(new Ae("Failed to enter Picture-in-Picture mode."));if(Kn()&&Yn()!==e&&J.browser.name===l.Safari&&J.os.name===o.iOS)return n(new Ae("There is already a Picture-in-Picture element in this document."));var i=e.tagName.toLowerCase();if("video"!==i)return n(new Ae('The "'+i+'" element does not support Picture-in-Picture requests.'));var a=e.requestPictureInPicture,c=null!==Dn&&Dn.webkitPresentationMode===In;if("function"==typeof a&&!Wn()&&!c){var s=a.call(e);return void 0!==s&&"function"==typeof s.then?void s.then(t).catch((function(){try{u()}catch(e){n(new Ae('The "'+i+'" element does not support Picture-in-Picture requests.'))}})):t()}function u(){if(void 0!==e&&"function"==typeof e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode(In)&&"function"==typeof e.webkitSetPresentationMode)return e.disablePictureInPicture?n(new Ae("Picture-in-Picture is disabled on this element.")):(Vn(e),e.webkitSetPresentationMode(In),t());n(new Ae('The "'+i+'" element does not support Picture-in-Picture requests.'))}u()}))},exit:function(){return new Promise((function(e,t){var n=globalThis.document.exitPictureInPicture;if("function"==typeof n&&!Wn()){var r=n.call(globalThis.document);return void 0!==r&&"function"==typeof r.then?void r.then(e).catch((function(){try{o()}catch(e){t(new Ae("Failed to exit Picture-in-Picture mode."))}})):e()}function o(){if(null!==Dn&&"function"==typeof Dn.webkitSetPresentationMode)return Dn.webkitSetPresentationMode(An),e();for(var t=globalThis.document.querySelectorAll("video"),n=0;n<t.length;n++){var r=t[n];if("function"==typeof r.webkitSetPresentationMode&&r.webkitPresentationMode===In)return r.webkitSetPresentationMode(An),e()}return e()}o()}))},toggle:function(e){var t=Yn();if(void 0!==e)return t===e?this.exit():this.request(e);return null!==t?this.exit():this.request(e)},onChange:function(e,t,n){if("function"==typeof e)return Nn.subscribe(e,t);var r=e,o=t;return Nn.subscribe((function(e){e.element===r&&o(e)}),n)},onError:function(e,t,n){if("function"==typeof e)return Ln.subscribe(e,t);var r=e,o=t;return Ln.subscribe((function(e){e.element===r&&o(e)}),n)},Constants:{},Errors:{NotSupportedError:Ae,InvalidStateError:Ze}};function Un(){var e=globalThis.document.querySelector("video");return null!==e?e:null===On?On=globalThis.document.createElement("video"):On}function _n(){return void 0!==globalThis.document.pictureInPictureEnabled}function Wn(){return"function"==typeof Un().webkitSetPresentationMode}function qn(e,t,n){return{nativeEvent:e,element:t,isActive:n}}function Rn(e,t,n){Nn.emit(qn(e,t,n))}function Gn(e){var t=e.target;t instanceof globalThis.HTMLVideoElement&&Rn(e,t,!0)}function Hn(e){var t=e.target;t instanceof globalThis.HTMLVideoElement&&Rn(e,t,!1)}function Bn(e){var t,n,r,o=e.target;o instanceof globalThis.HTMLVideoElement&&(t=e,n=o,r=Kn(),Ln.emit(qn(t,n,r)))}function jn(e){if(this.webkitPresentationMode===In)return Dn=this,void Rn(e,this,!0);this.webkitPresentationMode===An&&Dn===this&&(Dn=null,Rn(e,this,!1))}function Vn(e){e[Cn]||void 0===e.webkitSetPresentationMode&&void 0===e.onwebkitpresentationmodechanged||(D.add(e,{type:"webkitpresentationmodechanged",callback:jn,options:!1}),e[Cn]=!0)}function zn(){for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)Vn(e[t])}function Yn(){var e=globalThis.document.pictureInPictureElement;return null!=e?e:null!==Dn&&Dn.webkitPresentationMode===In?Dn:null}function Kn(){return null!==Yn()}Mn||(Mn=!0,(!_n()||Wn())&&(zn(),void 0!==globalThis.MutationObserver&&new globalThis.MutationObserver((function(e){if(null!==Dn){for(var t=!1,n=0;n<e.length;n++){for(var r=e[n].removedNodes,o=0;o<r.length;o++)if((a=r[o])===Dn||a.nodeType===Node.ELEMENT_NODE&&a.contains(Dn)){t=!0;break}if(t)break}t&&!globalThis.document.contains(Dn)&&(Dn=null)}for(n=0;n<e.length;n++){var i=e[n].addedNodes;for(o=0;o<i.length;o++){var a;if((a=i[o]).nodeType===Node.ELEMENT_NODE){var l=a;if("VIDEO"!==l.tagName)for(var c=l.querySelectorAll("video"),s=0;s<c.length;s++)Vn(c[s]);else Vn(l)}}}})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})));var Zn={get supported(){return Xn()},set:function(e){return Xn()?globalThis.navigator.setAppBadge(e):Promise.reject(new Ae("'navigator.setAppBadge' does not supported."))},clear:function(){return this.set(0)},Constants:{},Errors:{NotSupportedError:Ae}};function Xn(){return void 0!==globalThis.navigator.setAppBadge}var Jn={send:function(e){return new Promise((function(t,n){if(!Qn())return n(new Ae("'window.Notification' does not supported."));bt.request(Ye.Notification).then((function(r){if(r===Ke.Grant){var o={badge:e.badge,body:e.body,data:e.data,dir:e.dir,icon:e.icon,lang:e.lang,requireInteraction:e.requireInteraction,silent:e.silent,tag:e.tag},i=new globalThis.Notification(e.title,o);void 0!==e.onClick&&(i.onclick=e.onClick),void 0!==e.onShow&&(i.onshow=e.onShow),void 0!==e.onClose&&(i.onclose=e.onClose),void 0!==e.onError&&(i.onerror=e.onError),t(i)}else n(new Ie("'notification' permission is not granted."))}))}))},get supported(){return Qn()},Constants:{},Errors:{NotSupportedError:Ae,PermissionNotGrantedError:Ie}};function Qn(){return void 0!==globalThis.Notification}var $n=Q((function(){if(!rr())return;globalThis.navigator.getBattery().then((function(e){er=e,D.add(e,{type:"chargingchange",callback:nr}),D.add(e,{type:"levelchange",callback:nr}),D.add(e,{type:"chargingtimechange",callback:nr}),D.add(e,{type:"dischargingtimechange",callback:nr})}))}),(function(){if(!rr()||null===er)return;D.remove(er,{type:"chargingchange",callback:nr}),D.remove(er,{type:"levelchange",callback:nr}),D.remove(er,{type:"chargingtimechange",callback:nr}),D.remove(er,{type:"dischargingtimechange",callback:nr}),er=null})),er=null,tr={get supported(){return rr()},get value(){return new Promise((function(e,t){if(!rr())return t(new Ae("'navigator.getBattery' does not supported."));globalThis.navigator.getBattery().then(e)}))},onChange:$n.subscribe,Constants:{},Errors:{NotSupportedError:Ae}};function nr(){$n.emit(er)}function rr(){return void 0!==globalThis.navigator.getBattery}return function(){if("object"!=typeof globalThis){Object.defineProperty(Object.prototype,"__getGlobalThis__",{get:function(){return this},configurable:!0});try{var e=__getGlobalThis__;Object.defineProperty(e,"globalThis",{value:e,writable:!0,configurable:!0})}finally{delete Object.prototype.__getGlobalThis__}}}(),{version:n,appearance:ne,badge:Zn,battery:tr,clipboard:se,dimension:Re,fullscreen:ot,geolocation:Nt,notification:Jn,open:Ht,permission:bt,pip:Fn,platform:J,theme:kn,vibration:Pn}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Native=t()}(this,(function(){"use strict";var e,t,n="1.3.4",r={matches:!1,media:"not all",onchange:null,addListener:function(){},removeListener:function(){},addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){return!1}};!function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(e||(e={})),t=void 0!==globalThis.matchMedia?globalThis.matchMedia("(prefers-color-scheme: dark)"):r;var o,i,a,l,c,s=globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function u(e,t){for(var n=e.split("."),r=t.split("."),o=Math.max(n.length,r.length),i=0;i<o;i++){var a=void 0,l=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(l=i<r.length?parseInt(r[i],10):0))return 1;if(a<l)return-1}return 0}function d(e){if(void 0===e)return"";var t={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==t?t:e}function p(e){return void 0===e?"":e.replace(/_/g,".")}!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(o||(o={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(i||(i={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(a||(a={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(l||(l={})),c=void 0!==globalThis.navigator.userAgent?globalThis.navigator.userAgent:"";var f={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"},g=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","iw","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],v=[[/windows nt (6\.[23]); arm/i,o.Windows,d],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,d],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,d],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,d],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,d],[/windows ce\/?([\d.]*)/i,o.Windows,d],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,p],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,p],[/cfnetwork\/.+darwin/i,o.iOS,p],[/mac os x ?([\w. ]*)/i,o.MacOS,p],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,p],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],h=[[/windows.+ edge\/([\w.]+)/i,a.EdgeHTML],[/arkweb\/([\w.]+)/i,a.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,a.Blink],[/presto\/([\w.]+)/i,a.Presto],[/webkit\/([\w.]+)/i,a.WebKit],[/trident\/([\w.]+)/i,a.Trident],[/netfront\/([\w.]+)/i,a.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,a.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,a.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,a.Gecko]],b=[[/\b(?:crmo|crios)\/([\w.]+)/i,l.Chrome],[/webview.+edge\/([\w.]+)/i,l.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,l.Edge],[/opera mini\/([-\w.]+)/i,l.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,l.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,l.Opera],[/opios[\/ ]+([\w.]+)/i,l.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,l.Opera],[/\bopr\/([\w.]+)/i,l.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,l.IE],[/(?:ms|\()ie ([\w.]+)/i,l.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,l.IE],[/\bfocus\/([\w.]+)/i,l.Firefox],[/\bopt\/([\w.]+)/i,l.Opera],[/coast\/([\w.]+)/i,l.Opera],[/fxios\/([\w.-]+)/i,l.Firefox],[/samsungbrowser\/([\w.]+)/i,l.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,l.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,l.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,l.Chrome],[/chrome\/([\w.]+) mobile/i,l.Chrome],[/chrome\/v?([\w.]+)/i,l.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/version\/([\w.,]+) .*safari/i,l.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,l.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,l.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,l.Firefox],[/firefox\/([\w.]+)/i,l.Firefox]],m=[],y=[];function w(e){return"function"==typeof e||"object"==typeof e&&null!==e&&"function"==typeof e.handleEvent}function T(e){return"string"==typeof e.media&&"boolean"==typeof e.matches}function k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r="",o=0;o<t.length-2;o++){var i=t[o];void 0!==i&&(r=r+i.charAt(0).toUpperCase()+i.slice(1))}return r}function S(e,t){if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(t)>-1)return t;if("function"==typeof e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(t)>-1)return t;var n;n=void 0!==O[t]?O[t]:I.test(t)?[t,t.replace(I,k)]:[t];for(var r=0;r<A.length;r++)for(var o=0;o<n.length;o++){var i=A[r]+n[o];if(void 0!==e["on"+i])return i}return t}function E(){this.returnValue=!1}function P(){this.cancelBubble=!0}var x,I=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,A=["","webkit","moz","ms","MS","o","O"],O={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},D={useStd:"function"==typeof globalThis.document.addEventListener,add:function(e,t){if(void 0!==t.type&&void 0!==e){var n=t.callback,r=S(e,t.type),o=t.options;if(T(e)&&"function"==typeof e.addListener)try{var i=function(e,t,n){for(var r=0;r<y.length;r++){var o=y[r];if(o.target===e&&o.type===t&&o.callback===n)return o.wrapper}}(e,r,n);return void 0===i&&function(e,t,n,r){y.push({target:e,type:t,callback:n,wrapper:r})}(e,r,n,i=function(e){return function(t){"function"==typeof e?e.call(this,t):e&&"function"==typeof e.handleEvent&&e.handleEvent(t)}}(n)),e.addListener(i)}catch(e){}if("function"==typeof e.addEventListener)try{if(w(n))return e.addEventListener(r,n,o)}catch(e){}if("function"==typeof e.attachEvent){var a=function(e,t,n){for(var r=0;r<m.length;r++){var o=m[r];if(o.target===e&&o.type===t&&o.callback===n)return o.wrapper}}(e,r,n);if("function"==typeof a)return;i=function(t){if(void 0===t&&(t=globalThis.event),void 0!==t){try{Object.defineProperty(t,"currentTarget",{value:e,configurable:!0})}catch(e){}"function"!=typeof t.preventDefault&&(t.preventDefault=E.bind(t)),"function"!=typeof t.stopPropagation&&(t.stopPropagation=P.bind(t)),"function"==typeof n?n.call(e,t):n&&"function"==typeof n.handleEvent&&n.handleEvent(t)}};return function(e,t,n,r){m.push({target:e,type:t,callback:n,wrapper:r})}(e,r,n,i),e.attachEvent("on"+r,i)}}},remove:function(e,t){if(void 0!==t.type&&void 0!==e){var n=t.callback,r=S(e,t.type),o=t.options;if(T(e)){if("function"==typeof e.removeListener)try{var i=function(e,t,n){for(var r=0;r<y.length;r++){var o=y[r];if(o.target===e&&o.type===t&&o.callback===n)return y.splice(r,1),o.wrapper}}(e,r,n);if("function"==typeof i)return e.removeListener(i)}catch(e){}}else{if("function"==typeof e.removeEventListener)try{if(w(n))return e.removeEventListener(r,n,o)}catch(e){}if("function"!=typeof e.detachEvent);else{i=function(e,t,n){for(var r=0;r<m.length;r++){var o=m[r];if(o.target===e&&o.type===t&&o.callback===n)return m.splice(r,1),o.wrapper}}(e,r,n);"function"==typeof i&&e.detachEvent("on"+r,i)}}}}},M=c,C=null,N=void 0,L=void 0,F=void 0,U=void 0,_=void 0,q=void 0,W=null,R={},G=null;function B(e,t){return"function"==typeof t?t(e):"string"==typeof t?t:void 0===e?"":e}function H(e){if(null==e)return e;if(0===e.length)return null;if("C"===(e=e.replace(/_/g,"-"))||"posix"===e.toLowerCase())return"en-US";if(-1!==e.indexOf("."))return H(e.split(".")[0]);if(-1!==e.indexOf("@"))return H(e.split("@")[0]);var t=e.split("-");return 0===t.length?null:(t[0]=t[0].toLowerCase(),t.length>1&&2===t[1].length&&(t[1]=t[1].toUpperCase()),t.length>2&&4===t[1].length&&(t[1]=t[1].charAt(0).toUpperCase()+t[1].slice(1).toLowerCase()),t.join("-"))}function j(){return null!==C&&C.userAgent===M?C:C={userAgent:M,os:V(),browser:z(),engine:Y()}}function V(){for(var e=o.Unknown,t="",n=0;n<v.length;n++){var r=v[n],i=M.match(r[0]);if(null!==i){e=r[1],t=B(i[1],r[2]);break}}if(e===o.iOS&&0===u(t,"18.6")){var a=/\) Version\/([\d.]+)/.exec(M);if(null!==a)parseInt(a[1].split(".")[0],10)>=26&&(t=a[1])}return M===c&&(void 0!==N&&(e=N),void 0!==L&&(t=L),e===o.MacOS&&void 0!==globalThis.navigator.standalone&&globalThis.navigator.maxTouchPoints>2&&(e=o.iOS)),{name:e,version:t}}function z(){for(var e=l.Unknown,t="",n=0;n<b.length;n++){var r=b[n],o=M.match(r[0]);if(null!==o){e=r[1],t=B(o[1],r[2]);break}}return M===c&&(void 0!==F&&(e=F),void 0!==U&&(t=U)),{name:e,version:t}}function Y(){for(var e=a.Unknown,t="",n=0;n<h.length;n++){var r=h[n],o=M.match(r[0]);if(null!==o){e=r[1],t=B(o[1],r[2]);break}}return M===c&&(void 0!==_&&(e=_),void 0!==q&&(t=q)),{name:e,version:t}}function K(){if(null!==G)return G;var e=null,t=[],n=null,r=0,o=!1,i=null;function a(n){"string"==typeof(n=H(n))&&-1===t.indexOf(n)&&(null===e&&(e=n),t.push(n))}if("undefined"!=typeof Intl){try{a(Intl.DateTimeFormat().resolvedOptions().locale)}catch(e){}try{n=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}}void 0!==globalThis.navigator&&(void 0!==globalThis.navigator.languages&&function(e){for(var t=0;t<e.length;t++)a(e[t])}(globalThis.navigator.languages),void 0!==globalThis.navigator.language&&a(globalThis.navigator.language),void 0!==globalThis.navigator.userLanguage&&a(globalThis.navigator.userLanguage),void 0!==globalThis.navigator.browserLanguage&&a(globalThis.navigator.browserLanguage),void 0!==globalThis.navigator.systemLanguage&&a(globalThis.navigator.systemLanguage));try{r=-1*(new Date).getTimezoneOffset()}catch(e){}if("string"==typeof e){if("undefined"!=typeof Intl&&void 0!==Intl.Locale)try{var l=new Intl.Locale(e);"function"==typeof l.getTextInfo?i="rtl"===l.getTextInfo().direction:void 0!==l.textInfo&&(i="rtl"===l.textInfo.direction)}catch(e){}if("boolean"!=typeof i){var c=/^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(e);if(null!==c)for(var s=c[1].toLowerCase(),u=0;u<g.length;u++)if(g[u]===s){i=!0;break}}}return"boolean"==typeof i&&(o=i),G={language:e,languages:t,timezone:n,offset:r,isRTL:o}}function Z(){return void 0===globalThis.navigator||void 0===globalThis.navigator.userAgentData||void 0===globalThis.navigator.userAgentData.getHighEntropyValues?Promise.resolve():globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){try{for(var t=e.fullVersionList||e.brands||[],n=e.platformVersion,r=e.platform,a=j().browser.name,c=null,s=0;s<t.length;s++){var u=null==(g=t[s])?{brand:"",version:""}:"string"==typeof g?{brand:g,version:""}:{brand:g.brand,version:g.version},d=u.version,p=u.brand;/not.a.brand/i.test(p)||((null===c||/Chrom/.test(c)&&"Chromium"!==p||"Edge"===c&&/WebView2/.test(p))&&(p=f[p]||p,null!==(c=a)&&!/Chrom/.test(c)&&/Chrom/.test(p)||("Chrome"===(a=p)||"Chrome WebView"===a||"Chrome Headless"===a?F=l.Chrome:"Edge"===a||"Edge WebView2"===a?F=l.Edge:"Opera Mobi"===a&&(F=l.Opera),U=d),c=p),"Chromium"===p&&(q=d))}"string"==typeof n&&(L=j().os.name===o.Windows?parseInt(n.split(".")[0],10)>=13?"11":"10":n),"string"==typeof r&&(/android/i.test(r)?N=o.Android:/ios|iphone|ipad/i.test(r)?N=o.iOS:/windows|win32/i.test(r)?N=o.Windows:/macos|macintel/i.test(r)&&(N=o.MacOS)),!0===e.mobile&&(W=i.Mobile),C=null}catch(e){}var g})).catch((function(){}))}function X(){return void 0===globalThis.navigator||void 0===globalThis.navigator.gpu?Promise.resolve():globalThis.navigator.gpu.requestAdapter().then((function(e){if(null!==e){var t=e.info;R.architecture=t.architecture,R.description=t.description,R.device=t.device,R.vendor=t.vendor}})).catch((function(){}))}x=Promise.all([Z(),X()]).then((function(){})),D.add(globalThis,{type:"languagechange",callback:function(){G=null}});var J={get ready(){return x},get os(){return j().os},get engine(){return j().engine},get browser(){return j().browser},get userAgent(){return M},set userAgent(e){M!==e&&(M=e,C=null,G=null,N=void 0,L=void 0,F=void 0,U=void 0,_=void 0,q=void 0,W=null,R={},e===c&&(x=Promise.all([Z(),X()]).then((function(){}))))},get locale(){return K()},get device(){return function(){if(M===c&&null!==W)return W;var e=j().os.name;return e===o.iOS||e===o.Android?i.Mobile:e===o.Windows||e===o.MacOS?i.Desktop:i.Unknown}()},get gpu(){return{architecture:R.architecture,description:R.description,device:R.device,vendor:R.vendor}},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(M)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return j().os.name===o.iOS?!0===globalThis.navigator.standalone:void 0!==globalThis.matchMedia&&globalThis.matchMedia("(display-mode: standalone)").matches},Constants:{OS:o,Engines:a,Browsers:l,Devices:i},Errors:{}};function Q(e,t){var n=[];function r(e){var r=o(e);-1!==r&&(n.splice(r,1),0===n.length&&t())}function o(e){for(var t=0;t<n.length;t++)if(n[t].fn===e.fn)return t;return-1}return{emit:function(e){for(var t=n.slice(),o=0;o<t.length;o++)t[o].fn(e),t[o].once&&r(t[o])},subscribe:function(t,i){if(void 0===i&&(i={}),void 0!==i.signal&&i.signal.aborted)return function(){};var a={fn:t,once:!1};void 0!==i.once&&(a.once=i.once),void 0!==i.signal&&(a.signal=i.signal);var l=o(a);-1===l?(n.push(a),1===n.length&&e()):n[l].once&&!a.once&&(n[l].once=!1);var c=function(){D.remove(a.signal,{type:"abort",callback:c}),r(a)};return void 0!==a.signal&&D.add(a.signal,{type:"abort",callback:c}),function(){r(a)}}}}var $=Q((function(){ee=oe(),D.add(t,{type:"change",callback:ie}),J.browser.name===l.SamsungInternet&&(ee=re(),te=globalThis.setInterval((function(){var e=re();e!==ee&&(ee=e,$.emit(e))}),2e3))}),(function(){ee=null,D.remove(t,{type:"change",callback:ie}),J.browser.name===l.SamsungInternet&&(ee=null,null!==te&&(clearInterval(te),te=null))})),ee=null,te=null,ne={get value(){return J.browser.name===l.SamsungInternet?re():oe()},onChange:$.subscribe,Constants:{Appearances:e},Errors:{}};function re(){var t=new Image;if(t.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxIiBoZWlnaHQ9IjEiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDBoMXYxSDB6Ii8+PC9zdmc+",null===s)return e.Light;s.drawImage(t,0,0);var n=s.getImageData(0,0,1,1).data;return(n[0]&n[1]&n[2])<255?e.Dark:e.Light}function oe(){return"not all"===t.media?e.Unknown:t.matches?e.Dark:e.Light}function ie(t){var n;(n=t.matches?e.Dark:e.Light)!==ee&&$.emit(ee=n)}function ae(e,t){var n=e.style;for(var r in t){var o=t[r];void 0!==o&&(n[r]=o)}}function le(e,t){void 0===t&&(t=!0);var n=globalThis.document.createElement(e);return void 0!==n.width&&(n.width="0"),void 0!==n.height&&(n.height="0"),void 0!==n.border&&(n.border="0"),void 0!==n.frameBorder&&(n.frameBorder="0"),void 0!==n.scrolling&&(n.scrolling="no"),void 0!==n.cellPadding&&(n.cellPadding="0"),void 0!==n.cellSpacing&&(n.cellSpacing="0"),void 0!==n.frame&&(n.frame="void"),void 0!==n.rules&&(n.rules="none"),void 0!==n.noWrap&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),t?ae(n,{width:"1px",height:"1px"}):(n.setAttribute("aria-hidden","true"),ae(n,{width:"0",height:"0",zIndex:"-9999",display:"none",visibility:"hidden",pointerEvents:"none"})),ae(n,{position:"absolute",top:"0",left:"0",padding:"0",margin:"0",border:"none",outline:"hidden",clip:"rect(1px, 1px, 1px, 1px)",clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap"}),n}var ce,se={copy:function(e){var t=function(e){if(ue(e)){var t=e.textContent;return null!==t?t:""}if(de(e))return e.toString();if(function(e){return function(e){return null!==e&&"object"==typeof e}(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(t){return""+e}else if("string"!=typeof e)return""+e;return e}(e),n=function(e){var t=null;ue(e)&&(t=e.outerHTML);if(de(e)&&e.rangeCount>0){for(var n=globalThis.document.createElement("div"),r=0;r<e.rangeCount;r++)n.appendChild(e.getRangeAt(r).cloneContents());t=n.innerHTML}if(null===t)return;return t}(e);if(pe()&&(void 0!==globalThis.navigator.clipboard.write||void 0!==globalThis.navigator.clipboard.writeText))return function(e,t){try{if(void 0!==globalThis.ClipboardItem&&void 0!==globalThis.navigator.clipboard.write){var n={};return void 0!==t&&(n["text/html"]=new Blob([t],{type:"text/html"})),n["text/plain"]=new Blob([e],{type:"text/plain"}),globalThis.navigator.clipboard.write([new ClipboardItem(n)]).then((function(){return!0})).catch((function(){return!1}))}if(void 0!==globalThis.navigator.clipboard.writeText)return globalThis.navigator.clipboard.writeText(e).then((function(){return!0})).catch((function(){return!1}))}catch(e){return Promise.resolve(!1)}return Promise.resolve(!1)}(t,n).then((function(e){return!!e||fe(t,n)})).catch((function(){return fe(t,n)}));return Promise.resolve(fe(t,n))},paste:function(){if(pe()&&(void 0!==globalThis.navigator.clipboard.read||void 0!==globalThis.navigator.clipboard.readText))return function(){try{if(void 0!==globalThis.ClipboardItem&&void 0!==globalThis.navigator.clipboard.read)return globalThis.navigator.clipboard.read().then((function(e){if(0===e.length)return Promise.resolve(null);for(var t=0;t<e.length;t++)for(var n=(o=e[t]).types,r=0;r<n.length;r++)if("text/html"===n[r])return o.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<e.length;t++){var o;for(n=(o=e[t]).types,r=0;r<n.length;r++)if("text/plain"===n[r])return o.getType("text/plain").then((function(e){return e.text()})).catch((function(){return null}))}return Promise.resolve(null)})).catch((function(){return null}));if(void 0!==globalThis.navigator.clipboard.readText)return globalThis.navigator.clipboard.readText().then((function(e){return e})).catch((function(){return null}))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}().then((function(e){return null!==e?e:ge()})).catch((function(){return ge()}));return Promise.resolve(ge())},Constants:{},Errors:{}};function ue(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&(1===e.nodeType&&("string"==typeof e.nodeName&&"function"==typeof e.getAttribute))}function de(e){return"[object Selection]"===Object.prototype.toString.call(e)}function pe(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,t=location.hostname;return"https:"===e||"localhost"===t||"127.0.0.1"===t||"[::1]"===t}()&&void 0!==globalThis.navigator.clipboard}function fe(e,t){return function(e,t){if(void 0===globalThis.getSelection||void 0===globalThis.document.createRange)return!1;var n=le("div");n.contentEditable="true",void 0!==t?n.innerHTML=t:n.textContent=e,n.style.whiteSpace="pre",n.style.userSelect="text",n.style.setProperty("-webkit-user-select","text"),n.style.setProperty("-moz-user-select","text"),n.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(n);var r=globalThis.getSelection(),o=globalThis.document.createRange(),i=function(n){try{null!==n.clipboardData&&"function"==typeof n.clipboardData.setData&&(n.preventDefault(),void 0!==t&&n.clipboardData.setData("text/html",t),n.clipboardData.setData("text/plain",e))}catch(e){}};D.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===r)return ve(n,r,i),!1;r.removeAllRanges(),o.selectNodeContents(n),r.addRange(o);var a=globalThis.document.execCommand("copy");return ve(n,r,i),a}catch(e){return ve(n,r,i),!1}}(e,t)||function(e,t){var n=globalThis.clipboardData;if(void 0!==n&&"function"==typeof n.setData)try{return void 0!==t&&n.setData("HTML",t),n.setData("Text",e)}catch(e){return!1}return!1}(e,t)}function ge(){var e=function(){var e=le("div");e.contentEditable="true",globalThis.document.body.appendChild(e),e.focus();var t=null,n=function(e){try{if(null!==e.clipboardData&&"function"==typeof e.clipboardData.getData){e.preventDefault();var n=e.clipboardData.getData("text/html"),r=e.clipboardData.getData("text/plain");""!==n&&(t=n),""!==r&&(t=r)}}catch(e){}};D.add(globalThis.document,{type:"paste",callback:n,options:{once:!0,capture:!0}});try{if(!globalThis.document.execCommand("paste")&&null===t){var r=e.innerHTML;if(""!==r)t=r;else{var o=e.textContent;null!==o&&""!==o&&(t=o)}}return he(e,n),t}catch(t){return he(e,n),null}}();if(null!==e)return e;var t=function(){var e=globalThis.clipboardData;if(void 0!==e&&"function"==typeof e.getData)try{var t=e.getData("Text");return""!==t?t:null}catch(e){return null}return null}();return null!==t?t:""}function ve(e,t,n){null!==t&&t.removeAllRanges(),globalThis.document.body.removeChild(e),D.remove(globalThis.document,{type:"copy",callback:n})}function he(e,t){globalThis.document.body.removeChild(e),D.remove(globalThis.document,{type:"paste",callback:t})}!function(e){e.PortraitPrimary="portrait-primary",e.PortraitSecondary="portrait-secondary",e.LandscapePrimary="landscape-primary",e.LandscapeSecondary="landscape-secondary"}(ce||(ce={})),function(e){e.isLandscape=function(t){return t===e.LandscapePrimary||t===e.LandscapeSecondary},e.isPortrait=function(t){return t===e.PortraitPrimary||t===e.PortraitSecondary}}(ce||(ce={}));var be,me,ye={"safe-area-inset":{top:"safe-area-inset-top",right:"safe-area-inset-right",bottom:"safe-area-inset-bottom",left:"safe-area-inset-left"},"safe-area-max-inset":{top:"safe-area-max-inset-top",right:"safe-area-max-inset-right",bottom:"safe-area-max-inset-bottom",left:"safe-area-max-inset-left"},"titlebar-area":{x:"titlebar-area-x",y:"titlebar-area-y",width:"titlebar-area-width",height:"titlebar-area-height"},"keyboard-inset":{top:"keyboard-inset-top",right:"keyboard-inset-right",bottom:"keyboard-inset-bottom",left:"keyboard-inset-left",width:"keyboard-inset-width",height:"keyboard-inset-height"},"viewport-segment":{width:"viewport-segment-width",height:"viewport-segment-height",top:"viewport-segment-top",right:"viewport-segment-right",bottom:"viewport-segment-bottom",left:"viewport-segment-left"}};function we(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function Te(e){void 0===globalThis.queueMicrotask?"function"!=typeof globalThis.Promise?globalThis.setTimeout(e,0):Promise.resolve().then(e):globalThis.queueMicrotask(e)}be=void 0!==globalThis.matchMedia?globalThis.matchMedia("(orientation: portrait)"):r,me=void 0!==globalThis.matchMedia?globalThis.matchMedia("(device-posture: folded)"):r;function ke(){}function Se(){if(void 0!==globalThis.CSS&&"function"==typeof globalThis.CSS.supports){if(globalThis.CSS.supports("x: env(x)"))return"env";if(globalThis.CSS.supports("x: constant(x)"))return"constant"}}function Ee(){var e=globalThis.viewport,t=globalThis.visualViewport,n=globalThis.navigator.devicePosture,r=void 0!==e,o=!r&&null!=t&&void 0!==t.segments,i=void 0!==n,a=Q((function(){D.add(globalThis,{type:"resize",callback:h}),r?p():o?(g(),p()):(null!==c||(c=b(),globalThis.document.body.appendChild(c)),g())}),(function(){D.remove(globalThis,{type:"resize",callback:h}),r?f():o?(v(),f()):(v(),null!==c&&(null!==c.parentNode&&c.parentNode.removeChild(c),c=null))})),l=Se(),c=null,s=[],u=null;function d(){s=function(){if("function"!=typeof globalThis.matchMedia)return[];for(var e=[],t=2;t<=4;t++)e.push(globalThis.matchMedia("(horizontal-viewport-segments: "+t+")")),e.push(globalThis.matchMedia("(vertical-viewport-segments: "+t+")"));return e}();for(var e=0;e<s.length;e++)D.add(s[e],{type:"change",callback:h});"not all"!==me.media&&D.add(me,{type:"change",callback:h})}function p(){i&&D.add(n,{type:"change",callback:h}),d()}function f(){i&&D.remove(n,{type:"change",callback:h}),function(){for(var e=0;e<s.length;e++)D.remove(s[e],{type:"change",callback:h});s=[],"not all"!==me.media&&D.remove(me,{type:"change",callback:h})}()}function g(){D.add(t,{type:"resize",callback:h,options:{passive:!0}})}function v(){D.remove(t,{type:"resize",callback:h,options:{passive:!0}})}function h(){var e=w();null!==u&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(r.width!==o.width||r.height!==o.height||r.top!==o.top||r.left!==o.left||r.bottom!==o.bottom||r.right!==o.right)return!1}return!0}(u,e)||(u=e,a.emit(e))}function b(){var e=le("div");return e.setAttribute("data-viewport-segment-observer",""),e.style.setProperty("position","fixed","important"),e.style.setProperty("top","0","important"),e.style.setProperty("left","0","important"),e.style.setProperty("visibility","hidden","important"),e.style.setProperty("pointer-events","none","important"),e.style.setProperty("z-index","-1","important"),e.style.setProperty("box-sizing","content-box","important"),e.style.setProperty("padding","0","important"),e.style.setProperty("margin","0","important"),e.style.setProperty("border","0","important"),e.style.setProperty("width","0","important"),e.style.setProperty("height","0","important"),e.style.setProperty("min-width","0","important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("max-width","none","important"),e.style.setProperty("max-height","none","important"),e.style.setProperty("transition","none","important"),e.style.setProperty("animation","none","important"),e.style.setProperty("display","block","important"),e.style.setProperty("float","none","important"),e.style.setProperty("transform","none","important"),e}function m(){var e=globalThis.innerWidth,t=globalThis.innerHeight;return{width:e,height:t,top:0,left:0,bottom:t,right:e}}function y(e){var t=function(){if("function"!=typeof globalThis.matchMedia)return{rows:1,cols:1};for(var e=1,t=1,n=4;n>=2;n--)if(globalThis.matchMedia("(horizontal-viewport-segments: "+n+")").matches){e=n;break}for(n=4;n>=2;n--)if(globalThis.matchMedia("(vertical-viewport-segments: "+n+")").matches){t=n;break}return{rows:t,cols:e}}();if(1===t.rows&&1===t.cols)return[m()];if(void 0===l||void 0===e.style.setProperty)return[m()];for(var n=[],r=0;r<t.rows;r++)for(var o=0;o<t.cols;o++){e.style.setProperty("width",l+"(viewport-segment-width "+r+" "+o+", -1px)","important"),e.style.setProperty("height",l+"(viewport-segment-height "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-top",l+"(viewport-segment-top "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-left",l+"(viewport-segment-left "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-bottom",l+"(viewport-segment-bottom "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-right",l+"(viewport-segment-right "+r+" "+o+", -1px)","important");var i=globalThis.getComputedStyle(e),a=globalThis.parseFloat(i.marginTop);if(!(a<0)){var c=globalThis.parseFloat(i.marginLeft),s=globalThis.parseFloat(i.marginBottom),u=globalThis.parseFloat(i.marginRight),d=globalThis.parseFloat(i.width),p=globalThis.parseFloat(i.height);n.push({width:d,height:p,top:a,left:c,bottom:s,right:u})}}return n}function w(){if(r||o)return function(){var n;if(null==(n=r?e.segments:t.segments)||0===n.length)return[m()];for(var o=[],i=0;i<n.length;i++){var a=n[i];o.push({width:a.width,height:a.height,top:a.top,left:a.left,bottom:a.bottom,right:a.right})}return o}();if(null!==c)return y(c);var n=b();globalThis.document.body.appendChild(n);var i=y(n);return globalThis.document.body.removeChild(n),i}return{get value(){return w()},onChange:a.subscribe,useCssVariable:function(e){if(void 0===globalThis.document)return ke;var t=we(ye["viewport-segment"]),n=globalThis.document.documentElement,r=0;function o(o){for(var i=o.length;i<r;i++)for(var a=0;a<t.length;a++)n.style.removeProperty("--"+e+"-"+i+"-"+t[a]);r=o.length;for(i=0;i<o.length;i++){var l=o[i];for(a=0;a<t.length;a++){var c=t[a];n.style.setProperty("--"+e+"-"+i+"-"+c,l[c]+"px")}}}o(w());var i=a.subscribe((function(e){o(e)}));return function(){i();for(var o=0;o<r;o++)for(var a=0;a<t.length;a++)n.style.removeProperty("--"+e+"-"+o+"-"+t[a]);r=0}}}}function Pe(e){if("keyboard-inset"===e&&void 0!==globalThis.navigator.virtualKeyboard)return function(){var e=Q((function(){D.add(t,{type:"geometrychange",callback:r,options:{passive:!0}})}),(function(){D.remove(t,{type:"geometrychange",callback:r,options:{passive:!0}}),null!==n&&(globalThis.cancelAnimationFrame(n),n=null)})),t=globalThis.navigator.virtualKeyboard,n=null;function r(){null!==n&&globalThis.cancelAnimationFrame(n),"function"==typeof globalThis.requestAnimationFrame?n=globalThis.requestAnimationFrame((function(){n=null,e.emit(o())})):Te((function(){e.emit(o())}))}function o(){var e,n,r,o,i=t.boundingRect,a=i.width,l=i.height;return 0===l?(e=0,r=0):(e=i.y,r=Math.max(0,globalThis.innerHeight-i.y)),0===a?(n=0,o=0):(n=i.x,o=Math.max(0,globalThis.innerWidth-i.x)),{top:e,right:o,bottom:r,left:n,width:a,height:l}}return{get value(){return o()},onChange:e.subscribe,useCssVariable:function(t){if(void 0===globalThis.document)return ke;var n=we(ye["keyboard-inset"]),r=globalThis.document.documentElement;function i(e){for(var o=0;o<n.length;o++){var i=n[o];r.style.setProperty("--"+t+"-"+i,e[i]+"px")}}i(o());var a=e.subscribe((function(e){i(e)}));return function(){a();for(var e=0;e<n.length;e++)r.style.removeProperty("--"+t+"-"+n[e])}}}}();if("viewport-segment"===e)return Ee();var t=ye[e],n=we(t),r=Se(),o=[],i=Q((function(){if(void 0===r)return;null===c&&v()}),(function(){h()})),a={},l=void 0,c=null,s=!1,u=null;try{var d=Object.defineProperty({},"passive",{get:function(){l={passive:!0}}});D.add(globalThis,{type:"test",callback:ke,options:d})}catch(e){}function p(){s||(s=!0,Te((function(){s=!1;var e=m();null!==u&&function(e,t){for(var r=0;r<n.length;r++){var o=n[r];if(e[o]!==t[o])return!1}return!0}(u,e)||(u=e,i.emit(e))})))}function f(e){if(void 0!==e)o.push(e);else for(var t=0;t<o.length;t++)o[t]()}function g(e,n){var o=t[n],i=globalThis.document.createElement("div"),c=globalThis.document.createElement("div"),s=globalThis.document.createElement("div"),u=globalThis.document.createElement("div"),d={position:"absolute",width:"100px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:r+"("+o+")"};ae(i,d),ae(c,d),ae(s,{transition:"0s",animation:"none",width:"400px",height:"400px"}),ae(u,{transition:"0s",animation:"none",width:"250%",height:"250%"}),i.appendChild(s),c.appendChild(u),e.appendChild(i),e.appendChild(c),f((function(){i.scrollTop=c.scrollTop=1e4;var e=i.scrollTop,t=c.scrollTop;function n(){var n;n=this===i?e:t,this.scrollTop!==n&&(i.scrollTop=c.scrollTop=1e4,e=i.scrollTop,t=c.scrollTop,p())}D.add(i,{type:"scroll",callback:n,options:l}),D.add(c,{type:"scroll",callback:n,options:l})}));var g=globalThis.getComputedStyle(i);Object.defineProperty(a,n,{configurable:!0,get:function(){return globalThis.parseFloat(g.paddingBottom)}})}function v(){if(void 0!==r){a={},(c=globalThis.document.createElement("div")).setAttribute("data-"+e+"-observer",""),ae(c,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"});for(t=0;t<n.length;t++)g(c,n[t]);globalThis.document.body.appendChild(c),u=m(),f()}else for(var t=0;t<n.length;t++)a[n[t]]=0}function h(){null!==c&&(null!==c.parentNode&&c.parentNode.removeChild(c),c=null),o.length=0,a={},u=null}function b(e){return a[e]}function m(){for(var e={},t=0;t<n.length;t++){var r=n[t];e[r]=b(r)}return e}return{get value(){if(null!==c)return m();v();var e=m();return h(),e},onChange:function(e,t){return void 0===t&&(t={}),void 0===r?ke:i.subscribe(e,t)},useCssVariable:function(e){if(void 0===r||void 0===globalThis.document)return ke;var t=globalThis.document.documentElement;function o(r){for(var o=0;o<n.length;o++){var i=n[o];t.style.setProperty("--"+e+"-"+String(n[o]),r[i]+"px")}}var a=i.subscribe((function(e){o(e)}));return o(m()),function(){a();for(var r=0;r<n.length;r++)t.style.removeProperty("--"+e+"-"+String(n[r]))}}}}function xe(e,t){function n(r){if(!(this instanceof n))return new n(r);var o=new t(void 0===r?"":r);if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==r&&(o.message=r),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,n);else if(t.captureStackTrace&&"function"==typeof t.captureStackTrace)t.captureStackTrace(o,n);else try{var i=new t;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===t&&(t=Error),n.prototype=Object.create(t.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(t){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}var Ie=xe("PermissionNotGrantedError"),Ae=xe("NotSupportedError"),Oe=Pe("safe-area-inset"),De=Pe("safe-area-max-inset"),Me=Pe("keyboard-inset"),Ce=Pe("titlebar-area"),Ne=Pe("viewport-segment"),Le=Q((function(){_e=Be(),D.add(globalThis,{type:"resize",callback:He})}),(function(){_e=null,D.remove(globalThis,{type:"resize",callback:He})})),Fe=Q((function(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&"function"==typeof globalThis.screen.orientation.addEventListener)return D.add(globalThis.screen.orientation,{type:"change",callback:je});if(void 0!==globalThis.orientation)return D.add(globalThis,{type:"orientationchange",callback:je});if("not all"!==be.media)return D.add(be,{type:"change",callback:je});throw new Ae("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported")}),(function(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&"function"==typeof globalThis.screen.orientation.removeEventListener)return D.remove(globalThis.screen.orientation,{type:"change",callback:je});if(void 0!==globalThis.orientation)return D.remove(globalThis,{type:"orientationchange",callback:je});if("not all"!==be.media)return D.remove(be,{type:"change",callback:je});throw new Ae("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported")})),Ue=Q((function(){return new Promise((function(e,t){if(!Ve())return t(new Ae("'window.DeviceOrientationEvent' does not supported."));var n=DeviceOrientationEvent;if("function"!=typeof n.requestPermission)return D.add(globalThis,{type:"deviceorientation",callback:ze}),e();n.requestPermission().then((function(n){return"granted"===n?(D.add(globalThis,{type:"deviceorientation",callback:ze}),e()):t(new Ie("'deviceorientation' permission is not granted."))})).catch((function(e){return t(new Ae("'window.DeviceOrientationEvent' does not supported."))}))}))}),(function(){D.remove(globalThis,{type:"deviceorientation",callback:ze})})),_e=null,qe=null,We=null,Re={get value(){return Be()},environment:{safeAreaInset:Oe,safeAreaMaxInset:De,keyboardInset:Me,titlebarArea:Ce,viewportSegment:Ne},screenOrientation:{get supported(){return void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&void 0!==globalThis.screen.orientation.type||void 0!==globalThis.orientation||"not all"!==be.media},get value(){return Ge()},onChange:Fe.subscribe},deviceOrientation:{get supported(){return Ve()},get value(){return new Promise((function(e,t){if(null!==We)return e(We);if(!Ve())return t(new Ae("'window.DeviceOrientationEvent' does not supported."));var n=DeviceOrientationEvent,r=function(t){var n={alpha:t.alpha,beta:t.beta,gamma:t.gamma,absolute:t.absolute};return We=n,D.remove(globalThis,{type:"deviceorientation",callback:r}),e(n)};"function"==typeof n.requestPermission?n.requestPermission().then((function(e){if("granted"!==e)return t(new Ie("'deviceorientation' permission is not granted."));D.add(globalThis,{type:"deviceorientation",callback:r})})).catch((function(e){return t(new Ae("'window.DeviceOrientationEvent' does not supported."))})):D.add(globalThis,{type:"deviceorientation",callback:r})}))},onChange:Ue.subscribe},onChange:Le.subscribe,Constants:{Orientation:ce},Errors:{NotSupportedError:Ae,PermissionNotGrantedError:Ie}};function Ge(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&void 0!==globalThis.screen.orientation.type)switch(globalThis.screen.orientation.type){case"portrait-primary":return ce.PortraitPrimary;case"portrait-secondary":return ce.PortraitSecondary;case"landscape-primary":return ce.LandscapePrimary;case"landscape-secondary":return ce.LandscapeSecondary}if(void 0!==globalThis.orientation)switch(globalThis.orientation){case 0:return ce.PortraitPrimary;case 180:return ce.PortraitSecondary;case 90:return ce.LandscapePrimary;case-90:case 270:return ce.LandscapeSecondary}if("not all"===be.media)throw new Ae("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported");return be.matches?ce.PortraitPrimary:ce.LandscapePrimary}function Be(){var e=0,t=0,n=0,r=0,o=void 0!==globalThis.devicePixelRatio?globalThis.devicePixelRatio:-1;return void 0!==globalThis.innerWidth&&(e=globalThis.innerWidth,t=globalThis.innerHeight,n=globalThis.outerWidth,r=globalThis.outerHeight),{innerWidth:e,innerHeight:t,outerWidth:n,outerHeight:r,scale:o}}function He(){var e=Be();null!==_e&&e.innerWidth===_e.innerWidth&&e.innerHeight===_e.innerHeight&&e.outerWidth===_e.outerWidth&&e.outerHeight===_e.outerHeight&&e.scale===_e.scale||Le.emit(_e=e)}function je(){var e=Ge();null!==qe&&e===qe||Fe.emit(qe=e)}function Ve(){return void 0!==globalThis.DeviceOrientationEvent}function ze(e){We={alpha:e.alpha,beta:e.beta,gamma:e.gamma,absolute:e.absolute},Ue.emit(We)}var Ye,Ke,Ze=xe("InvalidStateError"),Xe=null,Je=null,Qe=!1,$e=function(){if("function"==typeof Symbol){var e=globalThis.__nativeFnFsBridgeKey__;return"symbol"==typeof e?e:globalThis.__nativeFnFsBridgeKey__=Symbol("native.fn.fs.bridged")}return"__nativeFnFsBridged__"}(),et={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}},tt=function(){var e=globalThis.document.documentElement;if(void 0!==globalThis.document.fullscreenEnabled||void 0!==globalThis.document.exitFullscreen)return et.standard;for(var t=["webkit","moz","ms"],n=0;n<t.length;n++){var r=t[n],o=et[r];if(void 0!==globalThis.document[o.enabled]||void 0!==globalThis.document[o.element]||void 0!==globalThis.document[o.exit])return"webkit"===r&&void 0!==e.webkitRequestFullScreen&&(o.request="webkitRequestFullScreen"),o}return null}(),nt=Q((function(){null!=tt&&D.add(globalThis.document,{type:tt.events.change,callback:ut,options:!1});J.os.name===o.iOS&&vt()}),(function(){null!=tt&&D.remove(globalThis.document,{type:tt.events.change,callback:ut,options:!1});if(J.os.name!==o.iOS)return;for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)D.remove(e[t],{type:"webkitbeginfullscreen",callback:pt,options:!1}),D.remove(e[t],{type:"webkitendfullscreen",callback:ft,options:!1}),e[t][$e]=!1})),rt=Q((function(){null!=tt&&D.add(globalThis.document,{type:tt.events.error,callback:dt,options:!1})}),(function(){null!=tt&&D.remove(globalThis.document,{type:tt.events.error,callback:dt,options:!1})})),ot={get supported(){return function(){if(null!==tt)return!0===globalThis.document[tt.enabled];if(J.os.name!==o.iOS)return!1;var e=(t=globalThis.document.querySelector("video"),null!==t?t:null===Xe?Xe=globalThis.document.createElement("video"):Xe);var t;return!0===e.webkitSupportsFullscreen||"function"==typeof e.webkitEnterFullscreen}()},get element(){return it()},get isActive(){return at()},request:function(e,t){return new Promise((function(n,r){if(void 0===e&&(e=function(){if(J.os.name===o.iOS){var e=globalThis.document.querySelector("video");return null!==e?e:void 0}return globalThis.document.documentElement}()),void 0===e)return r(new Ae("Failed to enter fullscreen mode."));if(at()&&it()!==e&&J.browser.name===l.Safari&&J.os.name===o.iOS)return r(new Ae("There is already a Fullscreen element in this document."));var i=e.tagName.toLowerCase(),a=null!==Je&&!0===Je.webkitDisplayingFullscreen;if(null!==tt){var c=e[tt.request];if("function"==typeof c&&!a){var s=c.call(e,t);return void 0!==s&&"function"==typeof s.then?void s.then(n).catch((function(){try{if(J.os.name!==o.iOS)return r(new Ae('The "'+i+'" element does not support fullscreen requests.'));u()}catch(e){r(new Ae('The "'+i+'" element does not support fullscreen requests.'))}})):n()}}function u(){if(J.os.name===o.iOS&&void 0!==e&&"VIDEO"===e.tagName.toUpperCase()){var t=e;if(t.webkitSupportsFullscreen&&"function"==typeof t.webkitEnterFullscreen){if(null===tt&&gt(t),0===t.played.length)t.play().then((function(){try{t.webkitSupportsFullscreen&&"function"==typeof t.webkitEnterFullscreen&&t.webkitEnterFullscreen()}catch(e){return r(new Ze("The object is in an invalid state."))}}));else try{t.webkitEnterFullscreen()}catch(e){return r(new Ze("The object is in an invalid state."))}return Je=t,n()}}r(new Ae('The "'+i+'" element does not support fullscreen requests.'))}u()}))},exit:function(){return new Promise((function(e,t){if(null!==tt){var n=globalThis.document[tt.exit];if("function"==typeof n){var r=n.call(globalThis.document);return void 0!==r&&"function"==typeof r.then?void r.then(e).catch(e):e()}}!function(){if(J.os.name===o.iOS){var n=Je;if(null!==n&&"function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n.webkitDisplayingFullscreen?t(new Ae("Failed to exit fullscreen mode.")):(Je=null,e());for(var r=globalThis.document.querySelectorAll("video"),i=0;i<r.length;i++){var a=r[i];if("function"==typeof a.webkitExitFullscreen&&!0===a.webkitDisplayingFullscreen)return a.webkitExitFullscreen(),a.webkitDisplayingFullscreen?t(new Ae("Failed to exit fullscreen mode.")):(Je=null,e())}if(null===it())return e();t(new Ae("Failed to exit fullscreen mode."))}else t(new Ae("Failed to exit fullscreen mode."))}()}))},toggle:function(e,t){var n=it();if(void 0!==e)return n===e?this.exit():this.request(e,t);return null!==n?this.exit():this.request(void 0,t)},onChange:function(e,t,n){if("function"==typeof e)return nt.subscribe(e,t);var r=e,o=t;return nt.subscribe((function(e){e.element===r&&o(e)}),n)},onError:function(e,t,n){if("function"==typeof e)return rt.subscribe(e,t);var r=e,o=t;return rt.subscribe((function(e){e.element===r&&o(e)}),n)},Constants:{},Errors:{NotSupportedError:Ae,InvalidStateError:Ze}};function it(){if(null===tt)return null!==Je&&!0===Je.webkitDisplayingFullscreen?Je:null;var e=globalThis.document[tt.element];return void 0!==e?e:null}function at(){return null!==it()}function lt(e,t,n){return{nativeEvent:e,element:t,isActive:n}}function ct(e,t,n){nt.emit(lt(e,t,n))}function st(e,t,n){rt.emit(lt(e,t,n))}function ut(e){var t=e.target;t instanceof globalThis.Element&&ct(e,t,at()),t instanceof globalThis.Document&&ct(e,globalThis.document.documentElement,at())}function dt(e){var t=e.target;t instanceof globalThis.Element&&st(e,t,at()),t instanceof globalThis.Document&&st(e,globalThis.document.documentElement,at())}function pt(e){Je=this,ct(e,this,!0)}function ft(e){Je===this&&(Je=null),ct(e,this,!1)}function gt(e){e[$e]||void 0===e.webkitEnterFullscreen&&void 0===e.onwebkitbeginfullscreen||(D.add(e,{type:"webkitbeginfullscreen",callback:pt,options:!1}),D.add(e,{type:"webkitendfullscreen",callback:ft,options:!1}),e[$e]=!0)}function vt(){for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)gt(e[t])}Qe||(Qe=!0,J.os.name===o.iOS&&(vt(),void 0!==globalThis.MutationObserver&&new globalThis.MutationObserver((function(e){if(null!==Je){for(var t=!1,n=0;n<e.length;n++){for(var r=e[n].removedNodes,o=0;o<r.length;o++)if((a=r[o])===Je||a.nodeType===Node.ELEMENT_NODE&&a.contains(Je)){t=!0;break}if(t)break}t&&!globalThis.document.contains(Je)&&(Je=null)}for(n=0;n<e.length;n++){var i=e[n].addedNodes;for(o=0;o<i.length;o++){var a;if((a=i[o]).nodeType===Node.ELEMENT_NODE){var l=a;if("VIDEO"!==l.tagName)for(var c=l.querySelectorAll("video"),s=0;s<c.length;s++)gt(c[s]);else gt(l)}}}})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0}))),function(e){e.Notification="notifications",e.Geolocation="geolocation",e.Camera="camera",e.ClipboardRead="clipboard-read",e.Microphone="microphone",e.MIDI="midi",e.DeviceOrientation="device-orientation",e.DeviceMotion="device-motion"}(Ye||(Ye={})),function(e){e.Grant="grant",e.Denied="denied",e.Prompt="prompt",e.Unsupported="unsupported"}(Ke||(Ke={}));var ht=function(){if(void 0!==globalThis.navigator.mediaDevices&&void 0!==globalThis.navigator.mediaDevices.getUserMedia)return globalThis.navigator.mediaDevices.getUserMedia.bind(globalThis.navigator.mediaDevices);var e=void 0!==globalThis.navigator.getUserMedia?globalThis.navigator.getUserMedia:void 0!==globalThis.navigator.webkitGetUserMedia?globalThis.navigator.webkitGetUserMedia:void 0!==globalThis.navigator.mozGetUserMedia?globalThis.navigator.mozGetUserMedia:void 0!==globalThis.navigator.msGetUserMedia?globalThis.navigator.msGetUserMedia:void 0;return void 0!==e?function(t){return void 0===t&&(t={}),new Promise((function(n,r){e.call(globalThis.navigator,t,n,r)}))}:void 0}(),bt={get supported(){return void 0!==globalThis.navigator.permissions},request:function(e){var t=this;return new Promise((function(n,r){function o(){t.check(e).then(n)}t.check(e).then((function(t){if(t===Ke.Grant)return n(t);switch(e){case Ye.Notification:if(void 0===globalThis.Notification)return n(Ke.Unsupported);globalThis.Notification.requestPermission().then((function(e){n(mt(e))}));break;case Ye.Geolocation:if(void 0===globalThis.navigator.geolocation)return n(Ke.Unsupported);globalThis.navigator.geolocation.getCurrentPosition(o,o);break;case Ye.Microphone:case Ye.Camera:if(void 0===ht)return n(Ke.Unsupported);ht({video:e===Ye.Camera,audio:e===Ye.Microphone}).then((function(e){for(var t=e.getTracks(),n=0;n<t.length;n++)t[n].stop();o()})).catch(o);break;case Ye.ClipboardRead:if(void 0===globalThis.navigator.clipboard||void 0===globalThis.navigator.clipboard.read)return n(Ke.Unsupported);globalThis.navigator.clipboard.read().then(o).catch(o);break;case Ye.MIDI:if(void 0===globalThis.navigator.requestMIDIAccess)return n(Ke.Unsupported);globalThis.navigator.requestMIDIAccess().then(o).catch(o);break;case Ye.DeviceOrientation:case Ye.DeviceMotion:var i=yt(e);if(void 0===i||void 0===i.event)return n(Ke.Unsupported);if("function"!=typeof i.event.requestPermission)return n(Ke.Grant);try{i.event.requestPermission().then((function(e){n(mt(e))}))}catch(e){return r(new Ae("'DeviceOrientationEvent.requestPermission()' must be called within a user gesture context."))}break;default:return n(Ke.Unsupported)}}))}))},check:function(e){if(e===Ye.DeviceOrientation||e===Ye.DeviceMotion)return new Promise((function(t){var n=yt(e);if(void 0===n||void 0===n.event)return t(Ke.Unsupported);if("function"!=typeof n.event.requestPermission)return t(Ke.Grant);var r=!1;D.add(globalThis,{type:n.type,callback:function(){r=!0},options:{once:!0}}),setTimeout((function(){if(r)return t(Ke.Grant);n.event.requestPermission().then((function(e){t(mt(e))})).catch((function(){t(Ke.Prompt)}))}),50)}));return new Promise((function(t){if(void 0===globalThis.navigator.permissions)return t(Ke.Unsupported);globalThis.navigator.permissions.query({name:e}).then((function(e){switch(e.state){case"prompt":return t(Ke.Prompt);case"granted":return t(Ke.Grant);case"denied":return t(Ke.Denied);default:return t(Ke.Unsupported)}}))}))},Constants:{PermissionType:Ye,PermissionState:Ke},Errors:{NotSupportedError:Ae}};function mt(e){switch(e){case"granted":return Ke.Grant;case"denied":return Ke.Denied;case"prompt":case"default":return Ke.Prompt;default:return Ke.Unsupported}}function yt(e){switch(e){case Ye.DeviceOrientation:return{event:globalThis.DeviceOrientationEvent,type:"deviceorientation"};case Ye.DeviceMotion:return{event:globalThis.DeviceMotionEvent,type:"devicemotion"};default:return}}var wt,Tt,kt,St,Et,Pt,xt,It,At,Ot,Dt,Mt=Q((function(){if(!Lt())return;bt.request(Ye.Geolocation).then((function(e){e===Ke.Grant&&(Ct=globalThis.navigator.geolocation.watchPosition((function(e){var t;t=e.coords,Mt.emit(t)})))}))}),(function(){if(!Lt()||null===Ct)return;globalThis.navigator.geolocation.clearWatch(Ct)})),Ct=null,Nt={get value(){return new Promise((function(e,t){function n(n){(function(e){return new Promise((function(t,n){var r;(r="http://ip-api.com/json?fields=lat,lon",new Promise((function(e){var t={},n=void 0;if(void 0===globalThis.fetch){if("undefined"!=typeof XMLHttpRequest){var o=new XMLHttpRequest;o.open("GET",r,!0);for(var i=we(t),a=0;a<i.length;a++){var l=i[a];o.setRequestHeader(l,t[l])}return o.onreadystatechange=function(){if(4===o.readyState)if(o.status>=200&&o.status<300)try{e(JSON.parse(o.responseText))}catch(t){e(void 0)}else e(void 0)},o.onerror=function(){e(void 0)},void o.send(n)}e(void 0)}else fetch(r,{method:"GET",headers:t,body:n}).then((function(t){return t.ok?t.json().then((function(t){e(t)})).catch((function(){e(void 0)})):(e(void 0),Promise.resolve())})).catch((function(){e(void 0)}))}))).then((function(r){if(void 0!==r){var o={latitude:r.lat,longitude:r.lon,accuracy:-1,altitude:null,altitudeAccuracy:null,heading:null,speed:null};t(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=Object(e[0]),r=1;r<e.length;r++){var o=e[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(n[i]=o[i])}return n}(o,{toJSON:function(){return o}}))}else n(e)})).catch((function(){n(e)}))}))})(n).then(e).catch(t)}if(!Lt())return n(new Ae("'navigator.geolocation' does not supported."));bt.request(Ye.Geolocation).then((function(t){if(t!==Ke.Grant)return n(new Ie("'geolocation' permission is not granted."));globalThis.navigator.geolocation.getCurrentPosition((function(t){e(t.coords)}),(function(e){return n(function(e){switch(e.code){case GeolocationPositionError.PERMISSION_DENIED:return new Ie("'geolocation' permission is not granted.");case GeolocationPositionError.POSITION_UNAVAILABLE:return new Ae("The acquisition of the geolocation failed because at least one internal source of position returned an internal error.");case GeolocationPositionError.TIMEOUT:return new Ae("The time allowed to acquire the geolocation was reached before the information was obtained.");default:return new Ae("Unknown error.")}}(e))}))}))}))},get supported(){return Lt()},onChange:Mt.subscribe,Constants:{},Errors:{NotSupportedError:Ae,PermissionNotGrantedError:Ie}};function Lt(){return void 0!==globalThis.navigator.geolocation}!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(Pt||(Pt={})),function(e){e.General="general",e.Network="network",e.Display="display",e.Appearance="appearance",e.Accessibility="accessibility",e.Battery="battery",e.Datetime="datetime",e.Language="language",e.Accounts="accounts",e.Storage="storage"}(xt||(xt={})),function(e){e.Image="image",e.Video="video"}(It||(It={})),function(e){e.User="user",e.Environment="environment"}(At||(At={})),function(e){e.Desktop="desktop",e.Documents="documents",e.Downloads="downloads",e.Music="music",e.Pictures="pictures",e.Videos="videos"}(Ot||(Ot={})),function(e){e.Read="read",e.ReadWrite="readwrite"}(Dt||(Dt={}));var Ft=((wt={})[o.Android]=((Tt={})[xt.General]="intent:#Intent;action=android.settings.SETTINGS;end",Tt[xt.Network]="intent:#Intent;action=android.settings.WIFI_SETTINGS;end",Tt[xt.Display]="intent:#Intent;action=android.settings.DISPLAY_SETTINGS;end",Tt[xt.Appearance]="intent:#Intent;action=android.settings.DISPLAY_SETTINGS;end",Tt[xt.Accessibility]="intent:#Intent;action=android.settings.ACCESSIBILITY_SETTINGS;end",Tt[xt.Battery]="intent:#Intent;action=android.settings.BATTERY_SAVER_SETTINGS;end",Tt[xt.Datetime]="intent:#Intent;action=android.settings.DATE_SETTINGS;end",Tt[xt.Language]="intent:#Intent;action=android.settings.LOCALE_SETTINGS;end",Tt[xt.Accounts]="intent:#Intent;action=android.settings.SYNC_SETTINGS;end",Tt[xt.Storage]="intent:#Intent;action=android.settings.INTERNAL_STORAGE_SETTINGS;end",Tt),wt[o.Windows]=((kt={})[xt.General]="ms-settings:system",kt[xt.Network]="ms-settings:network",kt[xt.Display]="ms-settings:display",kt[xt.Appearance]="ms-settings:colors",kt[xt.Accessibility]="ms-settings:easeofaccess",kt[xt.Battery]="ms-settings:batterysaver",kt[xt.Datetime]="ms-settings:dateandtime",kt[xt.Language]="ms-settings:regionlanguage",kt[xt.Accounts]="ms-settings:emailandaccounts",kt[xt.Storage]="ms-settings:storagesense",kt),wt[o.MacOS]=((St={})[xt.General]="x-apple.systempreferences:",St[xt.Network]="x-apple.systempreferences:com.apple.preference.network",St[xt.Display]="x-apple.systempreferences:com.apple.preference.displays",St[xt.Appearance]="x-apple.systempreferences:com.apple.preference.general",St[xt.Accessibility]="x-apple.systempreferences:com.apple.preference.universalaccess",St[xt.Battery]="x-apple.systempreferences:com.apple.preference.energysaver",St[xt.Datetime]="x-apple.systempreferences:com.apple.preference.datetime",St[xt.Language]="x-apple.systempreferences:com.apple.Localization",St[xt.Accounts]="x-apple.systempreferences:com.apple.preferences.internetaccounts",St[xt.Storage]="x-apple.systempreferences:",St),wt["MacOS13+"]=((Et={})[xt.General]="x-apple.systempreferences:com.apple.General-Settings.extension",Et[xt.Network]="x-apple.systempreferences:com.apple.Network-Settings.extension",Et[xt.Display]="x-apple.systempreferences:com.apple.Displays-Settings.extension",Et[xt.Appearance]="x-apple.systempreferences:com.apple.Appearance-Settings.extension",Et[xt.Accessibility]="x-apple.systempreferences:com.apple.Accessibility-Settings.extension",Et[xt.Battery]="x-apple.systempreferences:com.apple.Battery-Settings.extension",Et[xt.Datetime]="x-apple.systempreferences:com.apple.Date-Time-Settings.extension",Et[xt.Language]="x-apple.systempreferences:com.apple.Localization-Settings.extension",Et[xt.Accounts]="x-apple.systempreferences:com.apple.Internet-Accounts-Settings.extension",Et[xt.Storage]="x-apple.systempreferences:com.apple.settings.Storage",Et),wt);function Ut(){try{if(null!==globalThis.top&&globalThis.top!==globalThis.window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}function _t(e,t){var n;void 0===t&&(t=globalThis);try{n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:t})}catch(e){(n=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(n)}function qt(e){for(var t="",n=(new Date).getTime(),r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt((n=(9301*n+49297)%233280)%62);return t}function Wt(e,t,n){return t|=0,"string"!=typeof e&&(e=String(e)),e.length>=t?e:((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e)}var Rt=xe("URLOpenError"),Gt=xe("UserCancelledError"),Bt={app:function(e){var t,n=J.os.name,r=[],i=[],a={};if(n===o.Android){var l=function(e){return void 0!==e[o.Android]?e[o.Android]:e.android}(e);if(void 0===l)return Promise.reject(dn(i));if(t=l.timeout,a.scheme=sn(l.scheme),a.intent=sn(l.intent),a.packageName=l.packageName,a.fallback=sn(l.fallback),a.appStore=zt(a.packageName,o.Android),a.webStore=Yt(a.packageName,o.Android),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.intent&&(void 0===a.scheme||void 0===a.packageName||void 0===a.fallback)){var c=function(e){for(var t={},n=e.split("#Intent;"),r=n[0].substring(9),o=n[1],i=o.substring(0,o.length-4).split(";"),a={},l=0;l<i.length;l++){var c=i[l],s=c.indexOf("=");-1!==s&&(a[c.substring(0,s)]=c.substring(s+1))}void 0!==a.scheme&&(t.scheme=a.scheme+"://"+r);void 0!==a.package&&(t.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(t.fallback=a["S.browser_fallback_url"]);return t}(a.intent);void 0!==c.scheme&&void 0===a.scheme&&(a.scheme=c.scheme),void 0!==c.packageName&&void 0===a.packageName&&(a.packageName=c.packageName),void 0!==c.fallback&&void 0===a.fallback&&(a.fallback=c.fallback)}void 0!==a.scheme&&void 0===a.intent&&(a.intent=function(e,t,n){var r=e.split("://"),i=r[0],a=r[1],l="intent://";void 0!==a&&(l+=a);l+="#Intent;scheme="+i+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==t&&(l+="package="+t+";");void 0!==n&&"string"==typeof n?l+="S.browser_fallback_url="+globalThis.encodeURIComponent(n)+";":void 0!==t&&(l+="S.browser_fallback_url="+globalThis.encodeURIComponent(zt(t,o.Android))+";");return l+"end"}(a.scheme,a.packageName,a.fallback))}else if(n===o.iOS){l=function(e){return void 0!==e[o.iOS]?e[o.iOS]:e.ios}(e);if(void 0===l)return Promise.reject(dn(i));t=l.timeout,a.scheme=sn(l.scheme),a.bundleId=l.bundleId,a.trackId=l.trackId,a.universal=sn(l.universal),a.fallback=sn(l.fallback),a.appStore=zt(a.trackId,o.iOS),a.webStore=Yt(a.trackId,o.iOS),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.bundleId&&void 0===a.trackId&&(a.trackId=Vt(a.bundleId))}else if(n===o.Windows){l=function(e){return void 0!==e[o.Windows]?e[o.Windows]:e.windows}(e);if(void 0===l)return Promise.reject(dn(i));t=l.timeout,a.scheme=sn(l.scheme),a.productId=l.productId,a.fallback=sn(l.fallback),a.appStore=zt(a.productId,o.Windows),a.webStore=Yt(a.productId,o.Windows),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore}else if(n===o.MacOS){l=function(e){return void 0!==e[o.MacOS]?e[o.MacOS]:e.macos}(e);if(void 0===l)return Promise.reject(dn(i));t=l.timeout,a.scheme=sn(l.scheme),a.bundleId=l.bundleId,a.trackId=l.trackId,a.fallback=sn(l.fallback),a.appStore=zt(a.trackId,o.MacOS),a.webStore=Yt(a.trackId,o.MacOS),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.bundleId&&void 0===a.trackId&&(a.trackId=Vt(a.bundleId))}tn(r,a.intent,Pt.Intent,Zt()),tn(r,a.universal,Pt.Universal,Xt()),tn(r,a.scheme,Pt.Scheme,!0),tn(r,a.fallback,Pt.Fallback,!0),tn(r,a.appStore,Pt.Store,a.allowAppStore),tn(r,a.webStore,Pt.Store,a.allowWebStore),void 0===t&&(t=Kt(n));return new Promise((function(e,n){return function o(a){if(void 0===a&&(a=0),a>=r.length)return n(dn(i));var l=r[a],c=l[0],s=l[1];if("string"==typeof s)return i[a]=s,bn(s,a,t).then((function(){e(c)})).catch((function(){o(a+1)}));i[a]="[function fallback]",s(),e(c)}()}))},telephone:function(e){return mn(e,"tel")},message:function(e){return mn(e,"sms")},mail:function(e){return mn(e,"mailto")},file:function(e){if(void 0!==globalThis.showOpenFilePicker){var t={};if(void 0!==e&&(void 0!==e.multiple&&(t.multiple=e.multiple),void 0!==e.id&&(t.id=e.id),void 0!==e.startIn&&(t.startIn=e.startIn),void 0!==e.accept)){var n={};t.excludeAcceptAllOption=!0,t.types=[{description:"",accept:n}];for(var r=0;r<e.accept.length;r++){var o=e.accept[r];/^\.\w+/i.test(o)?(void 0===n["application/octet-stream"]&&(n["application/octet-stream"]=[]),n["application/octet-stream"].push(o)):/^\w+\/\w+$/i.test(o)&&(n[o]=[])}}return vn(globalThis.showOpenFilePicker(t))}var i=le("input");i.type="file",void 0!==e&&(void 0!==e.multiple&&(i.multiple=e.multiple),void 0!==e.accept&&(i.accept=nn(e.accept)));return vn(i)},directory:function(e){if(!Qt())return Promise.reject(new Ae("'window.showDirectoryPicker' and 'HTMLInputElement.prototype.webkitdirectory' does not supported."));if(void 0!==globalThis.showDirectoryPicker){var t={};return void 0!==e&&(void 0!==e.id&&(t.id=e.id),void 0!==e.startIn&&(t.startIn=e.startIn),void 0!==e.mode&&(t.mode=e.mode)),hn(globalThis.showDirectoryPicker(t))}var n=le("input");return n.type="file",n.webkitdirectory=!0,hn(n)},setting:function(e){var t=J.os.name,n=J.os.version;if(!Jt())return Promise.reject(dn([]));var r=[];switch(t){case o.Android:e!==xt.General&&(e===xt.Accessibility&&u(n,"1.6")>=0?r.push(Ft.Android[xt.Accessibility]):e===xt.Battery&&u(n,"5.1")>=0?r.push(Ft.Android[xt.Battery]):e===xt.Accounts&&u(n,"1.5")>=0?r.push(Ft.Android[xt.Accounts]):e===xt.Storage&&u(n,"3.0")>=0?r.push(Ft.Android[xt.Storage]):r.push(Ft.Android[e])),r.push(Ft.Android[xt.General]);break;case o.Windows:r.push(Ft.Windows[e]);break;case o.MacOS:if(e===xt.Appearance&&u(n,"10.14")<0){r.push(Ft.MacOS[xt.General]);break}u(n,"13.0")<0?r.push(Ft.MacOS[e]):r.push(Ft["MacOS13+"][e])}return new Promise((function(e,t){return function n(o){return void 0===o&&(o=0),o>=r.length?t(dn([])):bn(r[o],o,750).then((function(){e()})).catch((function(){n(o+1)}))}()}))},camera:function(e){var t=le("input");t.type="file",t.accept="image/*;capture=camera",t.capture="environment",void 0!==e&&(void 0!==e.type&&(e.type===It.Image?t.accept="image/*;capture=camera":t.accept="video/*;capture=camcorder"),void 0!==e.capture&&(e.capture===At.Environment?t.capture="environment":t.capture="user"));return vn(t)},contact:function(e){return new Promise((function(t,n){if(!$t())return n(new Ae("'navigator.contacts' does not supported."));var r=!1;void 0!==e&&void 0!==e.multiple&&(r=e.multiple),globalThis.navigator.contacts.getProperties().then((function(e){globalThis.navigator.contacts.select(e,{multiple:r}).then((function(e){t(e)}))}))}))},share:function(e){return new Promise((function(t,n){return en()?globalThis.navigator.canShare(e)?void globalThis.navigator.share(e).then((function(){t()})).catch((function(e){return"AbortError"===e.name?n(new Gt("User cancelled the operation.")):n(new Ae(e.message))})):n(new Ae("The provided data cannot be shared on this device.")):n(new Ae("'navigator.share' does not supported."))}))},calendar:function(e){var t="function"==typeof Date.now?Date.now():(new Date).getTime(),n="BEGIN:VCALENDAR\r\nVERSION:2.0\r\n";""!==globalThis.document.title?n+=cn("PRODID:-//"+an(globalThis.document.title)+"//EN")+"\r\n":n+=cn("PRODID:-//"+an(globalThis.location.host)+"//EN")+"\r\n";n+="BEGIN:VEVENT\r\nUID:"+t+"-"+qt(10)+"\r\nDTSTAMP:"+un(new Date)+"\r\n",!0===e.allDay?n+="DTSTART;VALUE=DATE:"+un(e.startDate,!0)+"\r\nDTEND;VALUE=DATE:"+un(e.endDate,!0)+"\r\n":n+="DTSTART:"+un(e.startDate)+"\r\nDTEND:"+un(e.endDate)+"\r\n";void 0!==e.title&&(n+=cn("SUMMARY:"+an(e.title))+"\r\n");void 0!==e.description&&(n+=cn("DESCRIPTION:"+an(e.description))+"\r\n");void 0!==e.location&&(n+=cn("LOCATION:"+an(e.location))+"\r\n");if(void 0!==e.recur){var r="FREQ="+e.recur.frequency;void 0!==e.recur.interval&&e.recur.interval>1&&(r+=";INTERVAL="+String(e.recur.interval)),void 0!==e.recur.count&&(r+=";COUNT="+String(e.recur.count)),void 0!==e.recur.until&&(r+=";UNTIL="+un(e.recur.until)),void 0!==e.recur.byMonth&&e.recur.byMonth.length>0&&(r+=";BYMONTH="+nn(e.recur.byMonth)),void 0!==e.recur.byWeekNo&&e.recur.byWeekNo.length>0&&(r+=";BYWEEKNO="+nn(e.recur.byWeekNo)),void 0!==e.recur.byYearDay&&e.recur.byYearDay.length>0&&(r+=";BYYEARDAY="+nn(e.recur.byYearDay)),void 0!==e.recur.byMonthDay&&e.recur.byMonthDay.length>0&&(r+=";BYMONTHDAY="+nn(e.recur.byMonthDay)),void 0!==e.recur.byDay&&e.recur.byDay.length>0&&(r+=";BYDAY="+nn(e.recur.byDay)),void 0!==e.recur.byHour&&e.recur.byHour.length>0&&(r+=";BYHOUR="+nn(e.recur.byHour)),void 0!==e.recur.byMinute&&e.recur.byMinute.length>0&&(r+=";BYMINUTE="+nn(e.recur.byMinute)),void 0!==e.recur.bySecond&&e.recur.bySecond.length>0&&(r+=";BYSECOND="+nn(e.recur.bySecond)),void 0!==e.recur.bySetPos&&e.recur.bySetPos.length>0&&(r+=";BYSETPOS="+nn(e.recur.bySetPos)),void 0!==e.recur.weekStart&&"MO"!==e.recur.weekStart&&(r+=";WKST="+e.recur.weekStart),n+=cn("RRULE:"+r)+"\r\n"}if(void 0!==e.alarm)for(var o=0;o<e.alarm.length;o++){var i=e.alarm[o];if(n+="BEGIN:VALARM\r\nACTION:DISPLAY\r\n",void 0!==i.datetime)n+="TRIGGER;VALUE=DATE-TIME:"+un(i.datetime)+"\r\n";else{var a="";if((void 0===i.before||i.before)&&(a+="-"),a+="P",void 0!==i.weeks&&i.weeks>0)a+=String(i.weeks)+"W";else{void 0!==i.days&&i.days>0&&(a+=String(i.days)+"D");var l=void 0!==i.hours&&i.hours>0,c=void 0!==i.minutes&&i.minutes>0,s=void 0!==i.seconds&&i.seconds>0;(l||c||s)&&(a+="T",l&&(a+=String(i.hours)+"H"),c&&(a+=String(i.minutes)+"M"),s&&(a+=String(i.seconds)+"S"))}n+="TRIGGER:"+a+"\r\n"}void 0!==i.description?n+=cn("DESCRIPTION:"+an(i.description))+"\r\n":n+="DESCRIPTION:Reminder\r\n",void 0===i.datetime&&void 0!==i.repeat&&void 0!==i.repeatDuration&&(n+="REPEAT:"+String(i.repeat)+"\r\n",n+="DURATION:PT"+String(i.repeatDuration)+"M\r\n"),n+="END:VALARM\r\n"}n+="END:VEVENT\r\nEND:VCALENDAR";var u=le("a");u.href="data:text/calendar;charset=utf-8,"+globalThis.encodeURIComponent(n),u.download="event-"+t+".ics",_t(u)},supported:{get intent(){return Zt()},get universal(){return Xt()},get setting(){return Jt()},get directory(){return Qt()},get camera(){return function(){var e=J.os.name,t=J.os.version;return!J.isWebview&&(e===o.iOS&&0===u(t,"10.3.1")||e===o.Android&&u(t,"3.0")>=0)}()},get contact(){return $t()},get share(){return en()},get calendar(){return J.os.name===o.iOS&&u(J.os.version,"15.0")>=0&&J.browser.name===l.Safari&&!J.isWebview}},Constants:{AppOpenState:Pt,SettingType:xt,CameraType:It,CaptureType:At},Errors:{URLOpenError:Rt,NotSupportedError:Ae,UserCancelledError:Gt}},Ht=void 0;function jt(){var e=Ut(),t=e.document,n={},r={},i=void 0!==globalThis.cordova,a=J.os.name===o.iOS,l=a&&u(J.os.version,"8.0")>=0,c=a&&!l,s=D.useStd;return i?(n.focus="resume",n.blur="pause",r.focus=t,r.blur=t):l?(n.visibilitychange="visibilitychange",r.visibilitychange=t):c?(n.focus="pageshow",n.blur="pagehide",r.focus=e,r.blur=e):s?(n.focus="focus",n.blur="blur",n.visibilitychange="visibilitychange",r.focus=e,r.blur=e,r.visibilitychange=t):(n.focus="focus",n.blur="blur",n.visibilitychange="visibilitychange",r.focus=t,r.blur=t,r.visibilitychange=t),{type:n,target:r}}function Vt(e){try{var t=new XMLHttpRequest;if(t.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),200===t.status)try{return function(e){if(void 0===e.results)return;var t=e.results;if(0===t.length)return;var n=t[0];return void 0===n?void 0:""+n.trackId}(JSON.parse(t.response))}catch(e){return}return}catch(e){return}}function zt(e,t){if(void 0!==e)switch(t){case o.Android:return"market://details?id="+e;case o.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case o.Windows:return"ms-windows-store://pdp/?ProductId="+e;case o.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new Rt('Unsupported OS: "'+J.userAgent+'"')}}function Yt(e,t){if(void 0!==e)switch(t){case o.Android:return"https://play.google.com/store/apps/details?id="+e;case o.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case o.Windows:return"https://apps.microsoft.com/detail/"+e;case o.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new Rt('Unsupported OS: "'+J.userAgent+'"')}}function Kt(e){switch(e){case o.iOS:return 2e3;case o.Android:return 1e3;default:return 750}}function Zt(){if(J.os.name!==o.Android)return!1;var e=J.browser.version;return!(J.browser.name===l.SamsungInternet&&u(e,"17.0.1.69")>=0&&u(e,"17.0.7.34")<0)&&(!(J.browser.name===l.Firefox&&u(e,"41.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"59.0")>=0&&u(e,"68.11.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"80.0")>=0&&u(e,"82.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"96.0")>=0&&u(e,"107.0")<0)&&(!(J.browser.name===l.Opera&&u(e,"14.0")<0)&&!(/(?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/[\w.]+;/i.test(J.userAgent)||/instagram[\/ ][-\w.]+/i.test(J.userAgent)||/micromessenger\/([\w.]+)/i.test(J.userAgent)||/musical_ly(?:.+app_?version\/|_)[\w.]+/i.test(J.userAgent)||/ultralite app_version\/[\w.]+/i.test(J.userAgent)))))))}function Xt(){return J.os.name===o.iOS&&u(J.os.version,"9.0")>=0}function Jt(){var e=J.os.name,t=J.os.version;return e!==o.Unknown&&(!(e===o.Android&&!Zt())&&(e!==o.iOS&&((e!==o.Windows||!("Vista"===t||"XP"===t||"2000"===t||"NT 4.0"===t||"NT 3.11"===t||"ME"===t||u(t,"10")<0))&&!(e===o.MacOS&&u(t,"10.10")<0))))}function Qt(){return void 0!==globalThis.showDirectoryPicker||void 0!==le("input").webkitdirectory}function $t(){return void 0!==globalThis.navigator.contacts}function en(){return void 0!==globalThis.navigator.share}function tn(e,t,n,r){void 0===r&&(r=!1),"function"!=typeof t&&"string"!=typeof t||!r||e.push([n,t])}function nn(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=",");for(var r=e.length,o="",i=0;i<r;i++)0!==i&&(o+=n),o+=void 0!==t?t(e[i]):e[i];return o}function rn(e){return globalThis.encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function on(e){return rn(e).replace(/%22/g,'"').replace(/%40/g,"@").replace(/%2C/gi,",")}function an(e){return e.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\r\n|\n|\r/g,"\\n")}function ln(e){return void 0!==globalThis.TextEncoder?(new TextEncoder).encode(e).length:globalThis.unescape(globalThis.encodeURIComponent(e)).length}function cn(e){if(ln(e)<=75)return e;for(var t="",n="",r=0,o=0;o<e.length;o++){var i=e[o],a=ln(e[o]);""!==n&&r+a>75?(t+=n+"\r\n ",n=i,r=a):(n+=i,r+=a)}return t+=n}function sn(e){return e instanceof URL?e.toString():e}function un(e,t){return void 0===t&&(t=!1),t?e.getUTCFullYear()+Wt(e.getUTCMonth()+1,2,"0")+Wt(e.getUTCDate(),2,"0"):e.getUTCFullYear()+Wt(e.getUTCMonth()+1,2,"0")+Wt(e.getUTCDate(),2,"0")+"T"+Wt(e.getUTCHours(),2,"0")+Wt(e.getUTCMinutes(),2,"0")+Wt(e.getUTCSeconds(),2,"0")+"Z"}function dn(e){for(var t="",n=0;n<e.length;n++)t+="\n"+(n+1)+": "+e[n];return t.length>0&&(t="\n"+t+"\n"),new Rt("Failed to open any of the provided URLs: "+t)}function pn(){var e=Ut().document;return"hidden"===e.visibilityState||("hidden"===e.webkitVisibilityState||("hidden"===e.mozVisibilityState||("hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus()))))}function fn(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function gn(e){try{e.focus({preventScroll:!0})}catch(t){try{e.focus()}catch(e){}}}function vn(e){if("[object Promise]"===Object.prototype.toString.call(e)){var t=e;return new Promise((function(e,n){t.then((function(t){for(var r=[],o=0;o<t.length;o++)r[o]=t[o].getFile();Promise.all(r).then(e).catch(n)})).catch((function(e){return"AbortError"===e.name?n(new Gt("User cancelled the operation.")):n(new Ae(e.message))}))}))}var n=e,r=jt(),o=Ut().document;return new Promise((function(e,t){var i=!1;function a(a){if(!i){i=!0;var u=n.files,d=[];if(null===u)return e(d);for(var p=0;p<u.length;p++)d.push(u[p]);!function(){Ht=void 0;try{D.remove(r.target.focus,{type:r.type.focus,callback:l}),D.remove(r.target.visibilitychange,{type:r.type.visibilitychange,callback:c}),D.remove(o,{type:"click",callback:s})}catch(e){}}(),a?e(d):t(new Gt("User cancelled the operation."))}}function l(){globalThis.setTimeout((function(){n.value.length>0?a(!0):a(!1)}),1e3)}function c(){pn()||l()}function s(){a(!1)}n.onchange=function(){a(!0)},void 0!==Ht&&Ht(),void 0!==n.oncancel?n.oncancel=function(){a(!1)}:n.onclick=function(){D.add(r.target.visibilitychange,{type:r.type.visibilitychange,callback:c}),D.add(r.target.focus,{type:r.type.focus,callback:l}),globalThis.setTimeout((function(){D.add(o,{type:"click",callback:s})}),100),Ht=function(){a(!1)}},_t(n)}))}function hn(e){if("[object Promise]"===Object.prototype.toString.call(e)){var t=e;return new Promise((function(e,n){t.then((function(t){var r=[],o=[];(function e(t,n){return void 0===n&&(n=""),new Promise((function(i,a){var l=t.entries();!function t(){l.next().then((function(a){if(a.done)return i();var l,c=a.value[0],s=a.value[1];l=""===n?c:n+"/"+c,"file"===s.kind?r.push(s.getFile().then((function(e){o.push({file:e,relativePath:l})}))):r.push(e(s,l)),t()})).catch(a)}()}))})(t,t.name).then((function(){Promise.all(r).then((function(){e(o)})).catch(n)})).catch(n)})).catch((function(e){return"AbortError"===e.name?n(new Gt("User cancelled the operation.")):n(new Ae(e.message))}))}))}var n=e;return new Promise((function(e,t){vn(n).then((function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push({file:o,relativePath:o.webkitRelativePath})}e(n)})).catch(t)}))}function bn(e,t,n){var r=jt(),o=Ut().document,i=void 0,a=void 0;return new Promise((function(l,c){var s,u=!1;function d(e){u||(u=!0,function(){void 0!==s&&(clearTimeout(s),s=void 0);try{D.remove(r.target.blur,{type:r.type.blur,callback:p}),D.remove(r.target.focus,{type:r.type.focus,callback:f}),D.remove(r.target.visibilitychange,{type:r.type.visibilitychange,callback:g})}catch(e){}if(void 0!==i)try{o.body.removeChild(i)}catch(e){}if(void 0!==a)try{o.body.removeChild(a)}catch(e){}}(),e?l():c())}function p(){void 0!==s&&(clearTimeout(s),s=void 0),D.remove(r.target.blur,{type:r.type.blur,callback:p}),D.add(r.target.focus,{type:r.type.focus,callback:f})}function f(){d(!0)}function g(){pn()?p():f()}s=globalThis.setTimeout((function(){d(!1)}),n),D.add(r.target.blur,{type:r.type.blur,callback:p}),D.add(r.target.visibilitychange,{type:r.type.visibilitychange,callback:g}),fn(o)||function(){var e=Ut(),t=e.document;if(gn(e),fn(t))return!0;if(t.body.tabIndex<0&&(t.body.tabIndex=-1),gn(t.body),fn(t))return!0;var n=void 0;try{if(void 0===(n=le("input")))return!1;n.type="text",n.readOnly=!0,t.body.appendChild(n),gn(n);try{n.select()}catch(e){}if(fn(t))return!0}catch(e){}finally{if(null!=n){try{n.blur()}catch(e){}try{t.body.removeChild(n)}catch(e){}}}fn(t)}();try{void 0!==globalThis.cordova?globalThis.open(e,"_system"):(i=function(e,t){var n=Ut(),r=n.document,o=void 0;try{return 0===t?void(n.location.href=e):((o=le("a")).href=e,r.body.appendChild(o),_t(o,n),o)}catch(e){}finally{if(void 0!==o)try{r.body.removeChild(o)}catch(e){}}}(e,t),a=function(e){var t=Ut().document,n=void 0;try{if(void 0===(n=le("iframe")))return;n.src=e,t.body.appendChild(n),globalThis.setTimeout((function(){if(void 0!==n)try{t.body.removeChild(n)}catch(e){}}),500)}catch(e){}return n}(e))}catch(e){d(!1)}}))}function mn(e,t){"string"==typeof e.to&&(e.to=on(e.to)),"string"==typeof e.cc&&(e.cc=on(e.cc)),"string"==typeof e.bcc&&(e.bcc=on(e.bcc)),"string"==typeof e.subject&&(e.subject=rn(e.subject)),"string"==typeof e.body&&(e.body=rn(e.body)),"object"==typeof e.to&&(e.to=nn(e.to,on)),"object"==typeof e.cc&&(e.cc=nn(e.cc,on)),"object"==typeof e.bcc&&(e.bcc=nn(e.bcc,on));var n=[],r=t+":";return"string"==typeof e.to&&(r+=e.to),"string"==typeof e.cc&&n.push("cc="+e.cc),"string"==typeof e.bcc&&n.push("bcc="+e.bcc),"string"==typeof e.subject&&n.push("subject="+e.subject),"string"==typeof e.body&&n.push("body="+e.body),bn(r+"?"+nn(n,void 0,"&"),0,Kt(J.os.name))}var yn=/iemobile/i.test(J.userAgent),wn=/windows phone/i.test(J.userAgent),Tn=null,kn={get value(){return function(){var e=En();if(!e)return;var t=e.getAttribute("content");return"string"==typeof t?t:void 0}()},set value(e){var t;void 0===e?(t=En())&&(t.remove(),Tn=null):function(e){var t=En();null===t&&(t=function(){var e=globalThis.document.createElement("meta");return e.setAttribute("name",Sn()),globalThis.document.head.prepend(e),Tn=e}());t.setAttribute("content",e)}(e)},Constants:{},Errors:{}};function Sn(){return yn?"msapplication-navbutton-color":wn?"msapplication-TileColor":"theme-color"}function En(){return null!==Tn&&Tn.isConnected?Tn:Tn=globalThis.document.querySelector('meta[name="'+Sn()+'"]')}var Pn={get supported(){return xn()},run:function(e){if(xn())return globalThis.navigator.vibrate(e);throw new Ae("'navigator.vibrate' does not supported.")},stop:function(){return this.run(0)},Constants:{},Errors:{NotSupportedError:Ae}};function xn(){return void 0!==globalThis.navigator.vibrate}var In="picture-in-picture",An="inline",On=null,Dn=null,Mn=!1,Cn=function(){if("function"==typeof Symbol){var e=globalThis.__nativeFnPipBridgeKey__;return"symbol"==typeof e?e:globalThis.__nativeFnPipBridgeKey__=Symbol("native.fn.pip.bridged")}return"__nativeFnPipBridged__"}(),Nn=Q((function(){if(_n())return D.add(globalThis.document,{type:"enterpictureinpicture",callback:Gn,options:!1}),void D.add(globalThis.document,{type:"leavepictureinpicture",callback:Bn,options:!1});zn()}),(function(){if(_n())return D.remove(globalThis.document,{type:"enterpictureinpicture",callback:Gn,options:!1}),void D.remove(globalThis.document,{type:"leavepictureinpicture",callback:Bn,options:!1});for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)D.remove(e[t],{type:"webkitpresentationmodechanged",callback:jn,options:!1}),e[t][Cn]=!1})),Ln=Q((function(){D.add(globalThis.document,{type:"pictureinpictureerror",callback:Hn,options:!1})}),(function(){D.remove(globalThis.document,{type:"pictureinpictureerror",callback:Hn,options:!1})})),Fn={get supported(){return function(){if("boolean"==typeof globalThis.document.pictureInPictureEnabled)return globalThis.document.pictureInPictureEnabled;var e=Un();return"function"==typeof e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode(In)}()},get element(){return Yn()},get isActive(){return Kn()},request:function(e){return new Promise((function(t,n){var r;if(void 0===e&&(r=globalThis.document.querySelector("video"),e=null!==r?r:void 0),void 0===e)return n(new Ae("Failed to enter Picture-in-Picture mode."));if(Kn()&&Yn()!==e&&J.browser.name===l.Safari&&J.os.name===o.iOS)return n(new Ae("There is already a Picture-in-Picture element in this document."));var i=e.tagName.toLowerCase();if("video"!==i)return n(new Ae('The "'+i+'" element does not support Picture-in-Picture requests.'));var a=e.requestPictureInPicture,c=null!==Dn&&Dn.webkitPresentationMode===In;if("function"==typeof a&&!qn()&&!c){var s=a.call(e);return void 0!==s&&"function"==typeof s.then?void s.then(t).catch((function(){try{u()}catch(e){n(new Ae('The "'+i+'" element does not support Picture-in-Picture requests.'))}})):t()}function u(){if(void 0!==e&&"function"==typeof e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode(In)&&"function"==typeof e.webkitSetPresentationMode)return e.disablePictureInPicture?n(new Ae("Picture-in-Picture is disabled on this element.")):(Vn(e),e.webkitSetPresentationMode(In),t());n(new Ae('The "'+i+'" element does not support Picture-in-Picture requests.'))}u()}))},exit:function(){return new Promise((function(e,t){var n=globalThis.document.exitPictureInPicture;if("function"==typeof n&&!qn()){var r=n.call(globalThis.document);return void 0!==r&&"function"==typeof r.then?void r.then(e).catch((function(){try{o()}catch(e){t(new Ae("Failed to exit Picture-in-Picture mode."))}})):e()}function o(){if(null!==Dn&&"function"==typeof Dn.webkitSetPresentationMode)return Dn.webkitSetPresentationMode(An),e();for(var t=globalThis.document.querySelectorAll("video"),n=0;n<t.length;n++){var r=t[n];if("function"==typeof r.webkitSetPresentationMode&&r.webkitPresentationMode===In)return r.webkitSetPresentationMode(An),e()}return e()}o()}))},toggle:function(e){var t=Yn();if(void 0!==e)return t===e?this.exit():this.request(e);return null!==t?this.exit():this.request(e)},onChange:function(e,t,n){if("function"==typeof e)return Nn.subscribe(e,t);var r=e,o=t;return Nn.subscribe((function(e){e.element===r&&o(e)}),n)},onError:function(e,t,n){if("function"==typeof e)return Ln.subscribe(e,t);var r=e,o=t;return Ln.subscribe((function(e){e.element===r&&o(e)}),n)},Constants:{},Errors:{NotSupportedError:Ae,InvalidStateError:Ze}};function Un(){var e=globalThis.document.querySelector("video");return null!==e?e:null===On?On=globalThis.document.createElement("video"):On}function _n(){return void 0!==globalThis.document.pictureInPictureEnabled}function qn(){return"function"==typeof Un().webkitSetPresentationMode}function Wn(e,t,n){return{nativeEvent:e,element:t,isActive:n}}function Rn(e,t,n){Nn.emit(Wn(e,t,n))}function Gn(e){var t=e.target;t instanceof globalThis.HTMLVideoElement&&Rn(e,t,!0)}function Bn(e){var t=e.target;t instanceof globalThis.HTMLVideoElement&&Rn(e,t,!1)}function Hn(e){var t,n,r,o=e.target;o instanceof globalThis.HTMLVideoElement&&(t=e,n=o,r=Kn(),Ln.emit(Wn(t,n,r)))}function jn(e){if(this.webkitPresentationMode===In)return Dn=this,void Rn(e,this,!0);this.webkitPresentationMode===An&&Dn===this&&(Dn=null,Rn(e,this,!1))}function Vn(e){e[Cn]||void 0===e.webkitSetPresentationMode&&void 0===e.onwebkitpresentationmodechanged||(D.add(e,{type:"webkitpresentationmodechanged",callback:jn,options:!1}),e[Cn]=!0)}function zn(){for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)Vn(e[t])}function Yn(){var e=globalThis.document.pictureInPictureElement;return null!=e?e:null!==Dn&&Dn.webkitPresentationMode===In?Dn:null}function Kn(){return null!==Yn()}Mn||(Mn=!0,(!_n()||qn())&&(zn(),void 0!==globalThis.MutationObserver&&new globalThis.MutationObserver((function(e){if(null!==Dn){for(var t=!1,n=0;n<e.length;n++){for(var r=e[n].removedNodes,o=0;o<r.length;o++)if((a=r[o])===Dn||a.nodeType===Node.ELEMENT_NODE&&a.contains(Dn)){t=!0;break}if(t)break}t&&!globalThis.document.contains(Dn)&&(Dn=null)}for(n=0;n<e.length;n++){var i=e[n].addedNodes;for(o=0;o<i.length;o++){var a;if((a=i[o]).nodeType===Node.ELEMENT_NODE){var l=a;if("VIDEO"!==l.tagName)for(var c=l.querySelectorAll("video"),s=0;s<c.length;s++)Vn(c[s]);else Vn(l)}}}})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})));var Zn={get supported(){return Xn()},set:function(e){return Xn()?globalThis.navigator.setAppBadge(e):Promise.reject(new Ae("'navigator.setAppBadge' does not supported."))},clear:function(){return this.set(0)},Constants:{},Errors:{NotSupportedError:Ae}};function Xn(){return void 0!==globalThis.navigator.setAppBadge}var Jn={send:function(e){return new Promise((function(t,n){if(!Qn())return n(new Ae("'window.Notification' does not supported."));bt.request(Ye.Notification).then((function(r){if(r===Ke.Grant){var o={badge:e.badge,body:e.body,data:e.data,dir:e.dir,icon:e.icon,lang:e.lang,requireInteraction:e.requireInteraction,silent:e.silent,tag:e.tag},i=new globalThis.Notification(e.title,o);void 0!==e.onClick&&(i.onclick=e.onClick),void 0!==e.onShow&&(i.onshow=e.onShow),void 0!==e.onClose&&(i.onclose=e.onClose),void 0!==e.onError&&(i.onerror=e.onError),t(i)}else n(new Ie("'notification' permission is not granted."))}))}))},get supported(){return Qn()},Constants:{},Errors:{NotSupportedError:Ae,PermissionNotGrantedError:Ie}};function Qn(){return void 0!==globalThis.Notification}var $n=Q((function(){if(!rr())return;globalThis.navigator.getBattery().then((function(e){er=e,D.add(e,{type:"chargingchange",callback:nr}),D.add(e,{type:"levelchange",callback:nr}),D.add(e,{type:"chargingtimechange",callback:nr}),D.add(e,{type:"dischargingtimechange",callback:nr})}))}),(function(){if(!rr()||null===er)return;D.remove(er,{type:"chargingchange",callback:nr}),D.remove(er,{type:"levelchange",callback:nr}),D.remove(er,{type:"chargingtimechange",callback:nr}),D.remove(er,{type:"dischargingtimechange",callback:nr}),er=null})),er=null,tr={get supported(){return rr()},get value(){return new Promise((function(e,t){if(!rr())return t(new Ae("'navigator.getBattery' does not supported."));globalThis.navigator.getBattery().then(e)}))},onChange:$n.subscribe,Constants:{},Errors:{NotSupportedError:Ae}};function nr(){$n.emit(er)}function rr(){return void 0!==globalThis.navigator.getBattery}return function(){if("object"!=typeof globalThis){Object.defineProperty(Object.prototype,"__getGlobalThis__",{get:function(){return this},configurable:!0});try{var e=__getGlobalThis__;Object.defineProperty(e,"globalThis",{value:e,writable:!0,configurable:!0})}finally{delete Object.prototype.__getGlobalThis__}}}(),{version:n,appearance:ne,badge:Zn,battery:tr,clipboard:se,dimension:Re,fullscreen:ot,geolocation:Nt,notification:Jn,open:Bt,permission:bt,pip:Fn,platform:J,theme:kn,vibration:Pn}}));