native-fn 1.0.45 → 1.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/native.cjs +30 -24
  2. package/dist/native.min.cjs +1 -1
  3. package/dist/native.min.mjs +1 -1
  4. package/dist/native.mjs +30 -24
  5. package/dist/native.umd.js +30 -24
  6. package/dist/native.umd.min.js +1 -1
  7. package/dist/plugin/app/index.cjs +28 -22
  8. package/dist/plugin/app/index.d.ts +1 -0
  9. package/dist/plugin/app/index.min.cjs +1 -1
  10. package/dist/plugin/app/index.min.mjs +1 -1
  11. package/dist/plugin/app/index.mjs +28 -22
  12. package/dist/plugin/app/index.umd.js +28 -22
  13. package/dist/plugin/app/index.umd.min.js +1 -1
  14. package/dist/plugin/app/src/constants/platform.d.ts +1 -0
  15. package/dist/plugin/app/src/utils/require.d.ts +1 -1
  16. package/dist/plugin/camera/index.cjs +28 -22
  17. package/dist/plugin/camera/index.min.cjs +1 -1
  18. package/dist/plugin/camera/index.min.mjs +1 -1
  19. package/dist/plugin/camera/index.mjs +28 -22
  20. package/dist/plugin/camera/index.umd.js +28 -22
  21. package/dist/plugin/camera/index.umd.min.js +1 -1
  22. package/dist/plugin/camera/src/constants/platform.d.ts +1 -0
  23. package/dist/plugin/camera/src/utils/require.d.ts +1 -1
  24. package/dist/plugin/clipboard/src/constants/platform.d.ts +1 -0
  25. package/dist/plugin/clipboard/src/utils/require.d.ts +1 -1
  26. package/dist/plugin/fullscreen/index.cjs +28 -22
  27. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  28. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  29. package/dist/plugin/fullscreen/index.mjs +28 -22
  30. package/dist/plugin/fullscreen/index.umd.js +28 -22
  31. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  32. package/dist/plugin/fullscreen/src/constants/platform.d.ts +1 -0
  33. package/dist/plugin/fullscreen/src/utils/require.d.ts +1 -1
  34. package/dist/plugin/theme/index.cjs +28 -22
  35. package/dist/plugin/theme/index.min.cjs +1 -1
  36. package/dist/plugin/theme/index.min.mjs +1 -1
  37. package/dist/plugin/theme/index.mjs +28 -22
  38. package/dist/plugin/theme/index.umd.js +28 -22
  39. package/dist/plugin/theme/index.umd.min.js +1 -1
  40. package/dist/plugin/theme/src/constants/platform.d.ts +1 -0
  41. package/dist/plugin/theme/src/utils/require.d.ts +1 -1
  42. package/dist/src/constants/platform.d.ts +1 -0
  43. package/dist/src/utils/require.d.ts +1 -1
  44. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),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"}(r||(r={})),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"}(i||(i={}));var o={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:navigator.userAgent,isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},t=[[/windows nt (6\.[23]); arm/i,e.Windows,a],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,a],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,a],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,a],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,a],[/windows ce\/?([\d.]*)/i,e.Windows,a],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,u],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,u],[/cfnetwork\/.+darwin/i,e.iOS,u],[/mac os x ?([\w. ]*)/i,e.MacOS,u],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,u],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],l=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],s=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function a(e){if(void 0===e)return"";var n={"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!==n?n:e}function u(e){return void 0===e?"":e.replace(/_/g,".")}function c(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var d=0;d<t.length;d++){var m=(v=t[d])[0],f=v[1],b=v[2];if(null!==(g=o.userAgent.match(m))){o.os=f,o.osVersion=c(g[1],b),f===e.iOS||f===e.Android?o.device=n.Mobile:f!==e.Windows&&f!==e.MacOS||(o.device=n.Desktop);break}}for(d=0;d<l.length;d++){m=(v=l[d])[0];var w=v[1];b=v[2];if(null!==(g=o.userAgent.match(m))){o.engine=w,o.engineVersion=c(g[1],b);break}}for(d=0;d<s.length;d++){m=(v=s[d])[0];var v,g,h=v[1];b=v[2];if(null!==(g=o.userAgent.match(m))){o.browser=h,o.browserVersion=c(g[1],b);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{import("react-native").then((function(e){console.log(e.Platform)}))}catch(e){}else o.isNodeJS&&function(e){if("require"in globalThis&&"function"==typeof globalThis.require)try{return Promise.resolve(globalThis.require(e))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}("os").then((function(n){if(null!==n){var r,i=n.platform(),t=n.release(),l=(r=t.split("."),{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")});switch(i){case"win32":o.os=e.Windows,o.osVersion=10===l.major&&0===l.minor&&l.build>=22e3?"11":10===l.major&&0===l.minor&&l.build<22e3?"10":6===l.major&&3===l.minor?"8.1":6===l.major&&2===l.minor?"8":6===l.major&&1===l.minor?"7":6===l.major&&0===l.minor?"Vista":5===l.major&&1===l.minor||5===l.major&&2===l.minor?"XP":5===l.major&&0===l.minor?"2000":4===l.major&&90===l.minor?"ME":4===l.major&&0===l.minor?"NT 4.0":3===l.major&&51===l.minor?"NT 3.11":t;break;case"darwin":o.os=e.MacOS,o.osVersion=l.major>=24?l.major-9+"."+l.minor+"."+l.build:23===l.major?"14."+l.minor+"."+l.build:22===l.major?"13."+l.minor+"."+l.build:21===l.major?"12."+l.minor+"."+l.build:20===l.major?"11."+l.minor+"."+l.build:19===l.major?"10.15."+l.minor:18===l.major?"10.14."+l.minor:17===l.major?"10.13."+l.minor:16===l.major?"10.12."+l.minor:15===l.major?"10.11."+l.minor:14===l.major?"10.10."+l.minor:13===l.major?"10.9."+l.minor:l.major>=5&&l.major<=12?"10."+(l.major-4)+"."+l.minor:t;break;case"android":o.os=e.Android,o.osVersion=t;break;case"linux":/android/i.test(t)&&(o.os=e.Android,o.osVersion=t)}}}));void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],t=n.platformVersion,l=0;l<i.length;l++){var s=null==(r=i[l])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},a=s.brand,u=s.version;/not.a.brand/i.test(a)||"Chromium"===a&&(o.engineVersion=u)}"string"==typeof t&&(o.os===e.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?o.osVersion="11":o.osVersion=t)})),o.isMobile=o.device===n.Mobile,o.isDesktop=o.device===n.Desktop,o.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(o.userAgent),o.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(o.os);var p={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"}}};function k(){return e.iOS===o.os}var E=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return p.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=p[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:p.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function l(r,o){return new Promise((function(t,l){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var a=s.call(r,o);return void 0!==a&&"function"==typeof a.then?void a.then((function(){t()})).catch((function(){k()?u():l()})):void t()}catch(e){if(!k())return void l()}}function u(){if(k()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}l()}u()}))}function s(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var l=t.call(document);return void 0!==l&&"function"==typeof l.then?void l.then((function(){r()})).catch((function(){i()})):void r()}}if(k()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),a=0;a<s.length;a++){var u=s[a];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),k())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!k())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:l,exit:s,toggle:function(e,n){return t()?s():l(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),F={installed:!1,name:"Fullscreen",module:E,Constants:{},Errors:{}};module.exports=F;
1
+ "use strict";var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),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"}(r||(r={})),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"}(i||(i={}));var o,t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function u(e){if(void 0===e)return"";var n={"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!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var m=0;m<a.length;m++){var f=(g=a[m])[0],b=g[1],w=g[2];if(null!==(h=t.userAgent.match(f))){t.os=b,t.osVersion=d(h[1],w),b===e.iOS||b===e.Android?t.device=n.Mobile:b!==e.Windows&&b!==e.MacOS||(t.device=n.Desktop);break}}for(m=0;m<s.length;m++){f=(g=s[m])[0];var v=g[1];w=g[2];if(null!==(h=t.userAgent.match(f))){t.engine=v,t.engineVersion=d(h[1],w);break}}for(m=0;m<l.length;m++){f=(g=l[m])[0];var g,h,p=g[1];w=g[2];if(null!==(h=t.userAgent.match(f))){t.browser=p,t.browserVersion=d(h[1],w);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{switch(b=(k=require("react-native").Platform).OS){case"android":t.os=e.Android;break;case"ios":t.os=e.iOS;break;case"windows":t.os=e.Windows;break;case"macos":t.os=e.MacOS}}catch(e){}else if(t.isNodeJS)try{var k=(b=require("os")).platform(),E=b.release(),F=(o=E.split("."),{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")});switch(k){case"win32":t.os=e.Windows,t.osVersion=10===F.major&&0===F.minor&&F.build>=22e3?"11":10===F.major&&0===F.minor&&F.build<22e3?"10":6===F.major&&3===F.minor?"8.1":6===F.major&&2===F.minor?"8":6===F.major&&1===F.minor?"7":6===F.major&&0===F.minor?"Vista":5===F.major&&1===F.minor||5===F.major&&2===F.minor?"XP":5===F.major&&0===F.minor?"2000":4===F.major&&90===F.minor?"ME":4===F.major&&0===F.minor?"NT 4.0":3===F.major&&51===F.minor?"NT 3.11":E;break;case"darwin":t.os=e.MacOS,t.osVersion=F.major>=24?F.major-9+"."+F.minor+"."+F.build:23===F.major?"14."+F.minor+"."+F.build:22===F.major?"13."+F.minor+"."+F.build:21===F.major?"12."+F.minor+"."+F.build:20===F.major?"11."+F.minor+"."+F.build:19===F.major?"10.15."+F.minor:18===F.major?"10.14."+F.minor:17===F.major?"10.13."+F.minor:16===F.major?"10.12."+F.minor:15===F.major?"10.11."+F.minor:14===F.major?"10.10."+F.minor:13===F.major?"10.9."+F.minor:F.major>=5&&F.major<=12?"10."+(F.major-4)+"."+F.minor:E;break;case"android":t.os=e.Android,t.osVersion=E;break;case"linux":/android/i.test(E)&&(t.os=e.Android,t.osVersion=E)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],o=n.platformVersion,a=0;a<i.length;a++){var s=null==(r=i[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof o&&(t.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=o)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var S={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"}}};function T(){return e.iOS===t.os}var x=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return S.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=S[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:S.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function a(r,o){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,o);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){T()?u():a()})):void t()}catch(e){if(!T())return void a()}}function u(){if(T()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){i()})):void r()}}if(T()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),T())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!T())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),j={installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}};module.exports=j;
@@ -1 +1 @@
1
- var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),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"}(r||(r={})),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"}(i||(i={}));var o={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:navigator.userAgent,isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},t=[[/windows nt (6\.[23]); arm/i,e.Windows,s],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,s],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,s],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,s],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,s],[/windows ce\/?([\d.]*)/i,e.Windows,s],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,u],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,u],[/cfnetwork\/.+darwin/i,e.iOS,u],[/mac os x ?([\w. ]*)/i,e.MacOS,u],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,u],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],l=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],a=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function s(e){if(void 0===e)return"";var n={"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!==n?n:e}function u(e){return void 0===e?"":e.replace(/_/g,".")}function c(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var d=0;d<t.length;d++){var m=(v=t[d])[0],f=v[1],b=v[2];if(null!==(g=o.userAgent.match(m))){o.os=f,o.osVersion=c(g[1],b),f===e.iOS||f===e.Android?o.device=n.Mobile:f!==e.Windows&&f!==e.MacOS||(o.device=n.Desktop);break}}for(d=0;d<l.length;d++){m=(v=l[d])[0];var w=v[1];b=v[2];if(null!==(g=o.userAgent.match(m))){o.engine=w,o.engineVersion=c(g[1],b);break}}for(d=0;d<a.length;d++){m=(v=a[d])[0];var v,g,h=v[1];b=v[2];if(null!==(g=o.userAgent.match(m))){o.browser=h,o.browserVersion=c(g[1],b);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{import("react-native").then((function(e){console.log(e.Platform)}))}catch(e){}else o.isNodeJS&&function(e){if("require"in globalThis&&"function"==typeof globalThis.require)try{return Promise.resolve(globalThis.require(e))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}("os").then((function(n){if(null!==n){var r,i=n.platform(),t=n.release(),l=(r=t.split("."),{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")});switch(i){case"win32":o.os=e.Windows,o.osVersion=10===l.major&&0===l.minor&&l.build>=22e3?"11":10===l.major&&0===l.minor&&l.build<22e3?"10":6===l.major&&3===l.minor?"8.1":6===l.major&&2===l.minor?"8":6===l.major&&1===l.minor?"7":6===l.major&&0===l.minor?"Vista":5===l.major&&1===l.minor||5===l.major&&2===l.minor?"XP":5===l.major&&0===l.minor?"2000":4===l.major&&90===l.minor?"ME":4===l.major&&0===l.minor?"NT 4.0":3===l.major&&51===l.minor?"NT 3.11":t;break;case"darwin":o.os=e.MacOS,o.osVersion=l.major>=24?l.major-9+"."+l.minor+"."+l.build:23===l.major?"14."+l.minor+"."+l.build:22===l.major?"13."+l.minor+"."+l.build:21===l.major?"12."+l.minor+"."+l.build:20===l.major?"11."+l.minor+"."+l.build:19===l.major?"10.15."+l.minor:18===l.major?"10.14."+l.minor:17===l.major?"10.13."+l.minor:16===l.major?"10.12."+l.minor:15===l.major?"10.11."+l.minor:14===l.major?"10.10."+l.minor:13===l.major?"10.9."+l.minor:l.major>=5&&l.major<=12?"10."+(l.major-4)+"."+l.minor:t;break;case"android":o.os=e.Android,o.osVersion=t;break;case"linux":/android/i.test(t)&&(o.os=e.Android,o.osVersion=t)}}}));void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],t=n.platformVersion,l=0;l<i.length;l++){var a=null==(r=i[l])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,u=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(o.engineVersion=u)}"string"==typeof t&&(o.os===e.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?o.osVersion="11":o.osVersion=t)})),o.isMobile=o.device===n.Mobile,o.isDesktop=o.device===n.Desktop,o.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(o.userAgent),o.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(o.os);var p={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"}}};function k(){return e.iOS===o.os}var E=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return p.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=p[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:p.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function l(r,o){return new Promise((function(t,l){if(null!==e){var a=r[e.request];if("function"==typeof a)try{var s=a.call(r,o);return void 0!==s&&"function"==typeof s.then?void s.then((function(){t()})).catch((function(){k()?u():l()})):void t()}catch(e){if(!k())return void l()}}function u(){if(k()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}l()}u()}))}function a(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var l=t.call(document);return void 0!==l&&"function"==typeof l.then?void l.then((function(){r()})).catch((function(){i()})):void r()}}if(k()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var a=document.querySelectorAll("video"),s=0;s<a.length;s++){var u=a[s];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),k())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!k())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:l,exit:a,toggle:function(e,n){return t()?a():l(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),F={installed:!1,name:"Fullscreen",module:E,Constants:{},Errors:{}};export{F as default};
1
+ var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),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"}(r||(r={})),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"}(i||(i={}));var o,t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function u(e){if(void 0===e)return"";var n={"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!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var m=0;m<a.length;m++){var f=(g=a[m])[0],b=g[1],w=g[2];if(null!==(h=t.userAgent.match(f))){t.os=b,t.osVersion=d(h[1],w),b===e.iOS||b===e.Android?t.device=n.Mobile:b!==e.Windows&&b!==e.MacOS||(t.device=n.Desktop);break}}for(m=0;m<s.length;m++){f=(g=s[m])[0];var v=g[1];w=g[2];if(null!==(h=t.userAgent.match(f))){t.engine=v,t.engineVersion=d(h[1],w);break}}for(m=0;m<l.length;m++){f=(g=l[m])[0];var g,h,p=g[1];w=g[2];if(null!==(h=t.userAgent.match(f))){t.browser=p,t.browserVersion=d(h[1],w);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{switch(b=(k=require("react-native").Platform).OS){case"android":t.os=e.Android;break;case"ios":t.os=e.iOS;break;case"windows":t.os=e.Windows;break;case"macos":t.os=e.MacOS}}catch(e){}else if(t.isNodeJS)try{var k=(b=require("os")).platform(),E=b.release(),F=(o=E.split("."),{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")});switch(k){case"win32":t.os=e.Windows,t.osVersion=10===F.major&&0===F.minor&&F.build>=22e3?"11":10===F.major&&0===F.minor&&F.build<22e3?"10":6===F.major&&3===F.minor?"8.1":6===F.major&&2===F.minor?"8":6===F.major&&1===F.minor?"7":6===F.major&&0===F.minor?"Vista":5===F.major&&1===F.minor||5===F.major&&2===F.minor?"XP":5===F.major&&0===F.minor?"2000":4===F.major&&90===F.minor?"ME":4===F.major&&0===F.minor?"NT 4.0":3===F.major&&51===F.minor?"NT 3.11":E;break;case"darwin":t.os=e.MacOS,t.osVersion=F.major>=24?F.major-9+"."+F.minor+"."+F.build:23===F.major?"14."+F.minor+"."+F.build:22===F.major?"13."+F.minor+"."+F.build:21===F.major?"12."+F.minor+"."+F.build:20===F.major?"11."+F.minor+"."+F.build:19===F.major?"10.15."+F.minor:18===F.major?"10.14."+F.minor:17===F.major?"10.13."+F.minor:16===F.major?"10.12."+F.minor:15===F.major?"10.11."+F.minor:14===F.major?"10.10."+F.minor:13===F.major?"10.9."+F.minor:F.major>=5&&F.major<=12?"10."+(F.major-4)+"."+F.minor:E;break;case"android":t.os=e.Android,t.osVersion=E;break;case"linux":/android/i.test(E)&&(t.os=e.Android,t.osVersion=E)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],o=n.platformVersion,a=0;a<i.length;a++){var s=null==(r=i[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof o&&(t.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=o)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var S={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"}}};function T(){return e.iOS===t.os}var x=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return S.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=S[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:S.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function a(r,o){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,o);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){T()?u():a()})):void t()}catch(e){if(!T())return void a()}}function u(){if(T()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){i()})):void r()}}if(T()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),T())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!T())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),j={installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}};export{j as default};
@@ -1,15 +1,3 @@
1
- function require(moduleName) {
2
- if ('require' in globalThis && typeof globalThis.require === 'function') {
3
- try {
4
- return Promise.resolve(globalThis.require(moduleName));
5
- }
6
- catch (_) {
7
- return Promise.resolve(null);
8
- }
9
- }
10
- return Promise.resolve(null);
11
- }
12
-
13
1
  var OS;
14
2
  (function (OS) {
15
3
  OS["Unknown"] = "Unknown";
@@ -58,7 +46,7 @@ var Platform = {
58
46
  browser: Browsers.Unknown,
59
47
  browserVersion: '',
60
48
  renderer: getRenderer(),
61
- userAgent: navigator.userAgent,
49
+ userAgent: getUserAgent(),
62
50
  isWebview: false,
63
51
  isMobile: false,
64
52
  isDesktop: false,
@@ -166,6 +154,11 @@ function normalizeBrand(entry) {
166
154
  return { brand: entry, version: '' };
167
155
  return { brand: entry.brand, version: entry.version };
168
156
  }
157
+ function getUserAgent() {
158
+ if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string')
159
+ return navigator.userAgent;
160
+ return '';
161
+ }
169
162
  function getRenderer() {
170
163
  if (typeof globalThis.document === 'undefined')
171
164
  return '';
@@ -249,19 +242,30 @@ for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
249
242
  }
250
243
  if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
251
244
  try {
252
- import('react-native')
253
- .then(function (reactNative) {
254
- console.log(reactNative.Platform);
255
- });
245
+ var reactNative = require('react-native');
246
+ var platform = reactNative.Platform;
247
+ var os = platform.OS;
248
+ switch (os) {
249
+ case 'android':
250
+ Platform.os = OS.Android;
251
+ break;
252
+ case 'ios':
253
+ Platform.os = OS.iOS;
254
+ break;
255
+ case 'windows':
256
+ Platform.os = OS.Windows;
257
+ break;
258
+ case 'macos':
259
+ Platform.os = OS.MacOS;
260
+ break;
261
+ }
256
262
  }
257
263
  catch (_) {
258
264
  }
259
265
  }
260
266
  else if (Platform.isNodeJS) {
261
- require('os')
262
- .then(function (os) {
263
- if (os === null)
264
- return;
267
+ try {
268
+ var os = require('os');
265
269
  var platform = os.platform();
266
270
  var release = os.release();
267
271
  var version = getNodeOSVersion(release);
@@ -337,7 +341,9 @@ else if (Platform.isNodeJS) {
337
341
  }
338
342
  break;
339
343
  }
340
- });
344
+ }
345
+ catch (_) {
346
+ }
341
347
  }
342
348
  if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntropyValues !== undefined) {
343
349
  navigator
@@ -4,18 +4,6 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Fullscreen = factory());
5
5
  })(this, (function () { 'use strict';
6
6
 
7
- function require(moduleName) {
8
- if ('require' in globalThis && typeof globalThis.require === 'function') {
9
- try {
10
- return Promise.resolve(globalThis.require(moduleName));
11
- }
12
- catch (_) {
13
- return Promise.resolve(null);
14
- }
15
- }
16
- return Promise.resolve(null);
17
- }
18
-
19
7
  var OS;
20
8
  (function (OS) {
21
9
  OS["Unknown"] = "Unknown";
@@ -64,7 +52,7 @@
64
52
  browser: Browsers.Unknown,
65
53
  browserVersion: '',
66
54
  renderer: getRenderer(),
67
- userAgent: navigator.userAgent,
55
+ userAgent: getUserAgent(),
68
56
  isWebview: false,
69
57
  isMobile: false,
70
58
  isDesktop: false,
@@ -172,6 +160,11 @@
172
160
  return { brand: entry, version: '' };
173
161
  return { brand: entry.brand, version: entry.version };
174
162
  }
163
+ function getUserAgent() {
164
+ if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string')
165
+ return navigator.userAgent;
166
+ return '';
167
+ }
175
168
  function getRenderer() {
176
169
  if (typeof globalThis.document === 'undefined')
177
170
  return '';
@@ -255,19 +248,30 @@
255
248
  }
256
249
  if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
257
250
  try {
258
- import('react-native')
259
- .then(function (reactNative) {
260
- console.log(reactNative.Platform);
261
- });
251
+ var reactNative = require('react-native');
252
+ var platform = reactNative.Platform;
253
+ var os = platform.OS;
254
+ switch (os) {
255
+ case 'android':
256
+ Platform.os = OS.Android;
257
+ break;
258
+ case 'ios':
259
+ Platform.os = OS.iOS;
260
+ break;
261
+ case 'windows':
262
+ Platform.os = OS.Windows;
263
+ break;
264
+ case 'macos':
265
+ Platform.os = OS.MacOS;
266
+ break;
267
+ }
262
268
  }
263
269
  catch (_) {
264
270
  }
265
271
  }
266
272
  else if (Platform.isNodeJS) {
267
- require('os')
268
- .then(function (os) {
269
- if (os === null)
270
- return;
273
+ try {
274
+ var os = require('os');
271
275
  var platform = os.platform();
272
276
  var release = os.release();
273
277
  var version = getNodeOSVersion(release);
@@ -343,7 +347,9 @@
343
347
  }
344
348
  break;
345
349
  }
346
- });
350
+ }
351
+ catch (_) {
352
+ }
347
353
  }
348
354
  if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntropyValues !== undefined) {
349
355
  navigator
@@ -1 +1 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"use strict";var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),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"}(r||(r={})),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"}(i||(i={}));var o={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:navigator.userAgent,isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},t=[[/windows nt (6\.[23]); arm/i,e.Windows,a],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,a],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,a],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,a],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,a],[/windows ce\/?([\d.]*)/i,e.Windows,a],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,u],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,u],[/cfnetwork\/.+darwin/i,e.iOS,u],[/mac os x ?([\w. ]*)/i,e.MacOS,u],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,u],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],l=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],s=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function a(e){if(void 0===e)return"";var n={"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!==n?n:e}function u(e){return void 0===e?"":e.replace(/_/g,".")}function c(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var d=0;d<t.length;d++){var f=(v=t[d])[0],m=v[1],b=v[2];if(null!==(g=o.userAgent.match(f))){o.os=m,o.osVersion=c(g[1],b),m===e.iOS||m===e.Android?o.device=n.Mobile:m!==e.Windows&&m!==e.MacOS||(o.device=n.Desktop);break}}for(d=0;d<l.length;d++){f=(v=l[d])[0];var w=v[1];b=v[2];if(null!==(g=o.userAgent.match(f))){o.engine=w,o.engineVersion=c(g[1],b);break}}for(d=0;d<s.length;d++){f=(v=s[d])[0];var v,g,h=v[1];b=v[2];if(null!==(g=o.userAgent.match(f))){o.browser=h,o.browserVersion=c(g[1],b);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{import("react-native").then((function(e){console.log(e.Platform)}))}catch(e){}else o.isNodeJS&&function(e){if("require"in globalThis&&"function"==typeof globalThis.require)try{return Promise.resolve(globalThis.require(e))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}("os").then((function(n){if(null!==n){var r,i=n.platform(),t=n.release(),l=(r=t.split("."),{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")});switch(i){case"win32":o.os=e.Windows,o.osVersion=10===l.major&&0===l.minor&&l.build>=22e3?"11":10===l.major&&0===l.minor&&l.build<22e3?"10":6===l.major&&3===l.minor?"8.1":6===l.major&&2===l.minor?"8":6===l.major&&1===l.minor?"7":6===l.major&&0===l.minor?"Vista":5===l.major&&1===l.minor||5===l.major&&2===l.minor?"XP":5===l.major&&0===l.minor?"2000":4===l.major&&90===l.minor?"ME":4===l.major&&0===l.minor?"NT 4.0":3===l.major&&51===l.minor?"NT 3.11":t;break;case"darwin":o.os=e.MacOS,o.osVersion=l.major>=24?l.major-9+"."+l.minor+"."+l.build:23===l.major?"14."+l.minor+"."+l.build:22===l.major?"13."+l.minor+"."+l.build:21===l.major?"12."+l.minor+"."+l.build:20===l.major?"11."+l.minor+"."+l.build:19===l.major?"10.15."+l.minor:18===l.major?"10.14."+l.minor:17===l.major?"10.13."+l.minor:16===l.major?"10.12."+l.minor:15===l.major?"10.11."+l.minor:14===l.major?"10.10."+l.minor:13===l.major?"10.9."+l.minor:l.major>=5&&l.major<=12?"10."+(l.major-4)+"."+l.minor:t;break;case"android":o.os=e.Android,o.osVersion=t;break;case"linux":/android/i.test(t)&&(o.os=e.Android,o.osVersion=t)}}}));void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],t=n.platformVersion,l=0;l<i.length;l++){var s=null==(r=i[l])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},a=s.brand,u=s.version;/not.a.brand/i.test(a)||"Chromium"===a&&(o.engineVersion=u)}"string"==typeof t&&(o.os===e.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?o.osVersion="11":o.osVersion=t)})),o.isMobile=o.device===n.Mobile,o.isDesktop=o.device===n.Desktop,o.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(o.userAgent),o.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(o.os);var p={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"}}};function k(){return e.iOS===o.os}var E=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return p.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=p[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:p.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function l(r,o){return new Promise((function(t,l){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var a=s.call(r,o);return void 0!==a&&"function"==typeof a.then?void a.then((function(){t()})).catch((function(){k()?u():l()})):void t()}catch(e){if(!k())return void l()}}function u(){if(k()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}l()}u()}))}function s(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var l=t.call(document);return void 0!==l&&"function"==typeof l.then?void l.then((function(){r()})).catch((function(){i()})):void r()}}if(k()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),a=0;a<s.length;a++){var u=s[a];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),k())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!k())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:l,exit:s,toggle:function(e,n){return t()?s():l(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}();return{installed:!1,name:"Fullscreen",module:E,Constants:{},Errors:{}}}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"use strict";var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),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"}(r||(r={})),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"}(i||(i={}));var o,t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},s=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],a=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function u(e){if(void 0===e)return"";var n={"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!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var f=0;f<s.length;f++){var m=(g=s[f])[0],b=g[1],w=g[2];if(null!==(h=t.userAgent.match(m))){t.os=b,t.osVersion=d(h[1],w),b===e.iOS||b===e.Android?t.device=n.Mobile:b!==e.Windows&&b!==e.MacOS||(t.device=n.Desktop);break}}for(f=0;f<a.length;f++){m=(g=a[f])[0];var v=g[1];w=g[2];if(null!==(h=t.userAgent.match(m))){t.engine=v,t.engineVersion=d(h[1],w);break}}for(f=0;f<l.length;f++){m=(g=l[f])[0];var g,h,p=g[1];w=g[2];if(null!==(h=t.userAgent.match(m))){t.browser=p,t.browserVersion=d(h[1],w);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{switch(b=(k=require("react-native").Platform).OS){case"android":t.os=e.Android;break;case"ios":t.os=e.iOS;break;case"windows":t.os=e.Windows;break;case"macos":t.os=e.MacOS}}catch(e){}else if(t.isNodeJS)try{var k=(b=require("os")).platform(),E=b.release(),F=(o=E.split("."),{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")});switch(k){case"win32":t.os=e.Windows,t.osVersion=10===F.major&&0===F.minor&&F.build>=22e3?"11":10===F.major&&0===F.minor&&F.build<22e3?"10":6===F.major&&3===F.minor?"8.1":6===F.major&&2===F.minor?"8":6===F.major&&1===F.minor?"7":6===F.major&&0===F.minor?"Vista":5===F.major&&1===F.minor||5===F.major&&2===F.minor?"XP":5===F.major&&0===F.minor?"2000":4===F.major&&90===F.minor?"ME":4===F.major&&0===F.minor?"NT 4.0":3===F.major&&51===F.minor?"NT 3.11":E;break;case"darwin":t.os=e.MacOS,t.osVersion=F.major>=24?F.major-9+"."+F.minor+"."+F.build:23===F.major?"14."+F.minor+"."+F.build:22===F.major?"13."+F.minor+"."+F.build:21===F.major?"12."+F.minor+"."+F.build:20===F.major?"11."+F.minor+"."+F.build:19===F.major?"10.15."+F.minor:18===F.major?"10.14."+F.minor:17===F.major?"10.13."+F.minor:16===F.major?"10.12."+F.minor:15===F.major?"10.11."+F.minor:14===F.major?"10.10."+F.minor:13===F.major?"10.9."+F.minor:F.major>=5&&F.major<=12?"10."+(F.major-4)+"."+F.minor:E;break;case"android":t.os=e.Android,t.osVersion=E;break;case"linux":/android/i.test(E)&&(t.os=e.Android,t.osVersion=E)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],o=n.platformVersion,s=0;s<i.length;s++){var a=null==(r=i[s])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=a.brand,u=a.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof o&&(t.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=o)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var S={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"}}};function T(){return e.iOS===t.os}var x=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return S.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=S[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:S.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function s(r,o){return new Promise((function(t,s){if(null!==e){var a=r[e.request];if("function"==typeof a)try{var l=a.call(r,o);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){T()?u():s()})):void t()}catch(e){if(!T())return void s()}}function u(){if(T()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}s()}u()}))}function a(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var s=t.call(document);return void 0!==s&&"function"==typeof s.then?void s.then((function(){r()})).catch((function(){i()})):void r()}}if(T()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var a=document.querySelectorAll("video"),l=0;l<a.length;l++){var u=a[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),T())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!T())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:s,exit:a,toggle:function(e,n){return t()?a():s(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}();return{installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}}}));
@@ -1,6 +1,7 @@
1
1
  import { PlatformInstance } from "../types/platform";
2
2
  declare global {
3
3
  interface Navigator {
4
+ userAgent?: string;
4
5
  userAgentData?: UserAgentData;
5
6
  }
6
7
  }
@@ -1 +1 @@
1
- export default function require<T = any>(moduleName: string): Promise<T | null>;
1
+ export default function require<T = any>(moduleName: string): T | null;
@@ -1,17 +1,5 @@
1
1
  'use strict';
2
2
 
3
- function require$1(moduleName) {
4
- if ('require' in globalThis && typeof globalThis.require === 'function') {
5
- try {
6
- return Promise.resolve(globalThis.require(moduleName));
7
- }
8
- catch (_) {
9
- return Promise.resolve(null);
10
- }
11
- }
12
- return Promise.resolve(null);
13
- }
14
-
15
3
  var OS;
16
4
  (function (OS) {
17
5
  OS["Unknown"] = "Unknown";
@@ -60,7 +48,7 @@ var Platform = {
60
48
  browser: Browsers.Unknown,
61
49
  browserVersion: '',
62
50
  renderer: getRenderer(),
63
- userAgent: navigator.userAgent,
51
+ userAgent: getUserAgent(),
64
52
  isWebview: false,
65
53
  isMobile: false,
66
54
  isDesktop: false,
@@ -168,6 +156,11 @@ function normalizeBrand(entry) {
168
156
  return { brand: entry, version: '' };
169
157
  return { brand: entry.brand, version: entry.version };
170
158
  }
159
+ function getUserAgent() {
160
+ if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string')
161
+ return navigator.userAgent;
162
+ return '';
163
+ }
171
164
  function getRenderer() {
172
165
  if (typeof globalThis.document === 'undefined')
173
166
  return '';
@@ -251,19 +244,30 @@ for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
251
244
  }
252
245
  if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
253
246
  try {
254
- import('react-native')
255
- .then(function (reactNative) {
256
- console.log(reactNative.Platform);
257
- });
247
+ var reactNative = require('react-native');
248
+ var platform = reactNative.Platform;
249
+ var os = platform.OS;
250
+ switch (os) {
251
+ case 'android':
252
+ Platform.os = OS.Android;
253
+ break;
254
+ case 'ios':
255
+ Platform.os = OS.iOS;
256
+ break;
257
+ case 'windows':
258
+ Platform.os = OS.Windows;
259
+ break;
260
+ case 'macos':
261
+ Platform.os = OS.MacOS;
262
+ break;
263
+ }
258
264
  }
259
265
  catch (_) {
260
266
  }
261
267
  }
262
268
  else if (Platform.isNodeJS) {
263
- require$1('os')
264
- .then(function (os) {
265
- if (os === null)
266
- return;
269
+ try {
270
+ var os = require('os');
267
271
  var platform = os.platform();
268
272
  var release = os.release();
269
273
  var version = getNodeOSVersion(release);
@@ -339,7 +343,9 @@ else if (Platform.isNodeJS) {
339
343
  }
340
344
  break;
341
345
  }
342
- });
346
+ }
347
+ catch (_) {
348
+ }
343
349
  }
344
350
  if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntropyValues !== undefined) {
345
351
  navigator
@@ -1 +1 @@
1
- "use strict";var e,r,n,t;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(r||(r={})),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"}(n||(n={})),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"}(t||(t={}));var o,i={device:r.Unknown,os:e.Unknown,osVersion:"",engine:n.Unknown,engineVersion:"",browser:t.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:navigator.userAgent,isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,n.EdgeHTML],[/arkweb\/([\w.]+)/i,n.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,n.Blink],[/presto\/([\w.]+)/i,n.Presto],[/webkit\/([\w.]+)/i,n.WebKit],[/trident\/([\w.]+)/i,n.Trident],[/netfront\/([\w.]+)/i,n.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,n.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,n.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,n.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,t.Chrome],[/webview.+edge\/([\w.]+)/i,t.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,t.Edge],[/opera mini\/([-\w.]+)/i,t.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,t.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,t.Opera],[/opios[\/ ]+([\w.]+)/i,t.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,t.Opera],[/\bopr\/([\w.]+)/i,t.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,t.IE],[/(?:ms|\()ie ([\w.]+)/i,t.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,t.IE],[/\bfocus\/([\w.]+)/i,t.Firefox],[/\bopt\/([\w.]+)/i,t.Opera],[/coast\/([\w.]+)/i,t.Opera],[/fxios\/([\w.-]+)/i,t.Firefox],[/samsungbrowser\/([\w.]+)/i,t.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,t.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,t.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,t.Chrome],[/chrome\/([\w.]+) mobile/i,t.Chrome],[/chrome\/v?([\w.]+)/i,t.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/version\/([\w.,]+) .*safari/i,t.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,t.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,t.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,t.Firefox],[/firefox\/([\w.]+)/i,t.Firefox]];function u(e){if(void 0===e)return"";var r={"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!==r?r:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function d(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}for(var f=0;f<a.length;f++){var m=(b=a[f])[0],p=b[1],v=b[2];if(null!==(g=i.userAgent.match(m))){i.os=p,i.osVersion=d(g[1],v),p===e.iOS||p===e.Android?i.device=r.Mobile:p!==e.Windows&&p!==e.MacOS||(i.device=r.Desktop);break}}for(f=0;f<s.length;f++){m=(b=s[f])[0];var h=b[1];v=b[2];if(null!==(g=i.userAgent.match(m))){i.engine=h,i.engineVersion=d(g[1],v);break}}for(f=0;f<l.length;f++){m=(b=l[f])[0];var b,g,w=b[1];v=b[2];if(null!==(g=i.userAgent.match(m))){i.browser=w,i.browserVersion=d(g[1],v);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{import("react-native").then((function(e){console.log(e.Platform)}))}catch(e){}else i.isNodeJS&&function(e){if("require"in globalThis&&"function"==typeof globalThis.require)try{return Promise.resolve(globalThis.require(e))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}("os").then((function(r){if(null!==r){var n,t=r.platform(),o=r.release(),a=(n=o.split("."),{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")});switch(t){case"win32":i.os=e.Windows,i.osVersion=10===a.major&&0===a.minor&&a.build>=22e3?"11":10===a.major&&0===a.minor&&a.build<22e3?"10":6===a.major&&3===a.minor?"8.1":6===a.major&&2===a.minor?"8":6===a.major&&1===a.minor?"7":6===a.major&&0===a.minor?"Vista":5===a.major&&1===a.minor||5===a.major&&2===a.minor?"XP":5===a.major&&0===a.minor?"2000":4===a.major&&90===a.minor?"ME":4===a.major&&0===a.minor?"NT 4.0":3===a.major&&51===a.minor?"NT 3.11":o;break;case"darwin":i.os=e.MacOS,i.osVersion=a.major>=24?a.major-9+"."+a.minor+"."+a.build:23===a.major?"14."+a.minor+"."+a.build:22===a.major?"13."+a.minor+"."+a.build:21===a.major?"12."+a.minor+"."+a.build:20===a.major?"11."+a.minor+"."+a.build:19===a.major?"10.15."+a.minor:18===a.major?"10.14."+a.minor:17===a.major?"10.13."+a.minor:16===a.major?"10.12."+a.minor:15===a.major?"10.11."+a.minor:14===a.major?"10.10."+a.minor:13===a.major?"10.9."+a.minor:a.major>=5&&a.major<=12?"10."+(a.major-4)+"."+a.minor:o;break;case"android":i.os=e.Android,i.osVersion=o;break;case"linux":/android/i.test(o)&&(i.os=e.Android,i.osVersion=o)}}}));void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var n,t=r.fullVersionList||r.brands||[],o=r.platformVersion,a=0;a<t.length;a++){var s=null==(n=t[a])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(i.engineVersion=u)}"string"==typeof o&&(i.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?i.osVersion="11":i.osVersion=o)})),i.isMobile=i.device===r.Mobile,i.isDesktop=i.device===r.Desktop,i.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(i.userAgent),i.isStandalone=function(r){return"matchMedia"in globalThis&&(r===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(i.os),function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(o||(o={}));var y=globalThis.matchMedia("(prefers-color-scheme: dark)"),S="not all"!==y.media,T=i.browser!==t.Chrome||i.isMobile&&function(e,r){for(var n=e.split("."),t=r.split("."),o=Math.max(n.length,t.length),i=0;i<o;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<t.length?parseInt(t[i],10):0))return 1;if(a<s)return-1}return 0}(i.browserVersion,"92")>=0,k=globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0}),x=/iemobile/i.test(i.userAgent),E=/windows phone/i.test(i.userAgent),j=[];function M(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(e,r){function n(t){if(!(this instanceof n))return new n(t);var o=new r(t||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==t&&(o.message=t),"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(r.captureStackTrace&&"function"==typeof r.captureStackTrace)r.captureStackTrace(o,n);else try{var i=new r;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===r&&(r=Error),n.prototype=Object.create(r.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(r){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}"function"==typeof SuppressedError&&SuppressedError;var I=A("EasingError"),C=A("CubicBezierSyntaxError",I),N=A("LinearSyntaxError",I),F=A("StepSyntaxError",I),L=A("UnsupportedEasingFunctionError",I),O={linear:"linear(0, 1)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)","step-start":"steps(1, jump-start)","step-end":"steps(1, jump-end)"};function P(e,r,n){return e<r?r:e>n?n:e}function W(e){var r=function(e){var r=e.match(/cubic-bezier\((.*)\)/);if(null===r)throw new C("Invalid cubic-bezier syntax");var n=r[1].trim().split(","),t=[];if(4!==n.length)throw new C("Cubic-bezier must have exactly 4 numeric values");for(var o=0;o<4;o++){var i=parseFloat(n[o]);if(isNaN(i))throw new C("Cubic-bezier must have exactly 4 numeric values");if(o%2==0&&(i<0||i>1))throw new C("x1 and x2 must be between 0 and 1");t.push(i)}return{x1:t[0],y1:t[1],x2:t[2],y2:t[3]}}(e),n=r.x1,t=r.x2,o=r.y1,i=r.y2;return function(e){if(0===(e=P(e,0,1))||1===e)return e;var r=function(e,r,o){if(void 0===r&&(r=1e-6),void 0===o&&(o=50),e<=0)return 0;if(e>=1)return 1;for(var i=e,a=0;a<o;a++){var s=3*(1-i)*(1-i)*i*n+3*(1-i)*i*i*t+i*i*i,l=3*(1-i)*(1-i)*n+6*(1-i)*i*(t-n)+3*i*i*(1-t);if(Math.abs(l)<r)break;var u=i-(s-e)/l;if(Math.abs(u-i)<r){i=u;break}i=Math.max(0,Math.min(1,u))}return i}(e);return 3*(1-r)*(1-r)*r*o+3*(1-r)*r*r*i+r*r*r}}function D(e){var r=function(e){var r,n,t=e.match(/linear\((.*)\)/);if(null===t)throw new N("Invalid linear syntax");var o=t[1].trim();if(""===o)throw new N("Linear function must have at least one point");for(var i=o.split(","),a=[],s=0;s<i.length;s++){var l=i[s].trim(),u=l.match(/^([+-]?\d*\.?\d+)((?:\s+[+-]?\d*\.?\d+%){2,})$/);if(null===u){var c=l.match(/^([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)%$/);if(null===c){var d=l.match(/^([+-]?\d*\.?\d+)$/);if(null===d)throw new N('Invalid linear point format: "'+l+'"');a.push({position:1===i.length?0:s/(i.length-1),value:parseFloat(d[1])})}else a.push({position:parseFloat(c[2])/100,value:parseFloat(c[1])})}else{var f=parseFloat(u[1]),m=u[2].trim().split(/\s+/);try{for(var p=(r=void 0,M(m)),v=p.next();!v.done;v=p.next()){var h=v.value;a.push({value:f,position:parseFloat(h)/100})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}}if(0===a.length)throw new N("No valid points found in linear function");return a.sort((function(e,r){return e.position-r.position})),a[0].position>0&&a.unshift({position:0,value:0}),a[a.length-1].position<1&&a.push({position:1,value:1}),a}(e);return function(e){if((e=P(e,0,1))<=r[0].position)return r[0].value;if(e>=r[r.length-1].position)return r[r.length-1].value;for(var n=0;n<r.length-1;n++){var t=r[n],o=r[n+1];if(e>=t.position&&e<=o.position){if(t.position===o.position)return o.value;var i=(e-t.position)/(o.position-t.position);return t.value+(o.value-t.value)*i}}return r[r.length-1].value}}function U(e){if(function(e){return!/(linear|cubic-bezier|steps)\((.*)\)/.test(e)}(e)&&(e=O[e]),function(e){return/cubic-bezier\(/.test(e)}(e))return W(e);if(function(e){return/linear\(/.test(e)}(e))return D(e);if(function(e){return/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/.test(e)}(e))return function(e){var r=e.match(/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/);if(null===r)throw new F("Invalid steps syntax");var n=parseInt(r[1],10),t=r[2];if(n<=0)throw new F("Steps count must be a positive integer");if("jump-none"===t&&n<2)throw new F("jump-none requires at least 2 steps");return function(e){switch(e=P(e,0,1),t){case"start":case"jump-start":return 0===e?1/n:1===e?1:Math.ceil(e*n)/n;case void 0:case"end":case"jump-end":return 1===e?1:Math.floor(e*n)/n;case"jump-both":return 0===e?0:1===e?1:Math.round(e*(n+1))/(n+1);case"jump-none":return 0===e?0:1===e?1:Math.floor(e*(n-1))/(n-1);default:throw new F('Unsupported step position: "'+t+'"')}}}(e);throw new L('Unsupported easing function: "'+e+'"')}var V=A("UnsupportedColorError");function R(e){if("undefined"!=typeof CSS&&CSS.supports&&!CSS.supports("color",e))throw new V('Unsupported color: "'+e+'".');if(null!==k)try{k.clearRect(0,0,1,1),k.fillStyle=e,k.fillRect(0,0,1,1);var r=k.getImageData(0,0,1,1).data;return{red:r[0],green:r[1],blue:r[2],alpha:parseFloat((r[3]/255).toFixed(2))}}catch(e){}var n=function(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),r?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}}("div");if(void 0===n)throw new V('Failed to parse color values from: "'+e+'".');n.style.color=e,globalThis.document.body.appendChild(n);try{var t=globalThis.getComputedStyle(n).color,o=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/),i=t.match(/rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:\/\s*([\d.]+%?))?\s*\)/),a=o||i;if(null===a)throw new V('Unsupported color: "'+e+'".');var s=parseInt(a[1],10),l=parseInt(a[2],10),u=parseInt(a[3],10),c=1;if(void 0!==a[4]){var d=a[4];c="%"===d.charAt(d.length-1)?parseFloat((parseFloat(d)/100).toFixed(2)):parseFloat(parseFloat(d).toFixed(2))}if(isNaN(s)||isNaN(l)||isNaN(u)||isNaN(c))throw new V('Failed to parse color values from: "'+e+'".');return{red:s,green:l,blue:u,alpha:c}}finally{globalThis.document.body.removeChild(n)}}var z,H={},q=null,B=null,_=null,G=null,K={setThemeColor:function(e,r){void 0===r&&(r={duration:0,easingFunction:"linear",appearance:"default"});var n=r.duration,t=U(r.easingFunction),i=r.appearance;null!==q&&(globalThis.cancelAnimationFrame(q),q=null,null!==B&&(B(te()),B=null));var a=te();void 0===a&&(a=void 0!==r.defaultColor?r.defaultColor:J()===o.Dark?"#181818ff":"#dcdcdcff");var s=R(a),l=R(e);return new Promise((function(e){B=e;var r=null;q=globalThis.requestAnimationFrame((function o(a){null===r&&(r=a);var u,c=a-r;u=0===n?1:Math.min(c/n,1);var d=t(u),f={red:Math.round(s.red+(l.red-s.red)*d),green:Math.round(s.green+(l.green-s.green)*d),blue:Math.round(s.blue+(l.blue-s.blue)*d),alpha:+(s.alpha+(l.alpha-s.alpha)*d).toFixed(2)};(function(e){void 0===e&&(e="default");var r;r=!T||!S||x||E?"default":e;var n=H[r];if(void 0!==n)return n;n=globalThis.document.createElement("meta"),x?n.setAttribute("name","msapplication-navbutton-color"):E?n.setAttribute("name","msapplication-TileColor"):n.setAttribute("name","theme-color");"default"!==e&&n.setAttribute("media","(prefers-color-scheme: "+r+")");return globalThis.document.head.prepend(n),H[e]=n})(i).setAttribute("content",$(f)),u<1?q=globalThis.requestAnimationFrame(o):(q=null,null!==B&&(e(te()),q=null))}))}))},getThemeColor:te,removeThemeColor:function(e){void 0===e&&(e="default");var r=H[e];void 0!==r&&r.remove();H[e]=void 0},detectAppearance:function(){return i.browser===t.SamsungInternet?X():Promise.resolve(J())},onAppearanceChange:function(e,r){void 0===r&&(r=!1);var n={fn:e,capture:!1,once:!1};"boolean"==typeof r&&(r={capture:r});void 0!==r.capture&&(n.capture=r.capture);void 0!==r.once&&(n.once=r.once);void 0!==r.signal&&(n.signal=r.signal);var o=re(n);-1===o?(j.push(n),1===j.length&&(i.browser===t.SamsungInternet?(X().then((function(e){_=e})),G=globalThis.setInterval((function(){X().then((function(e){e!==_&&(_=e,Y(e))}))}),2e3)):(a=n.capture,_=J(),"function"==typeof y.addEventListener?y.addEventListener("change",Q,a):"function"==typeof y.addListener&&y.addListener(Q))),this.detectAppearance().then(Y)):j[o].once&&!n.once&&(j[o].once=!1);var a;void 0!==n.signal&&(n.signal.aborted?ee(n):n.signal.addEventListener("abort",(function e(){void 0!==n.signal&&n.signal.removeEventListener("abort",e),ee(n)})));return function(){ee(n)}}};function Z(e){var r=e.toString(16);switch(r.length){case 0:return"00";case 1:return"0"+r;default:return r}}function $(e){return"#"+Z(e.red)+Z(e.green)+Z(e.blue)+Z(Math.round(255*e.alpha))}function X(){return new Promise((function(e){var r=new Image;r.onload=function(){if(null===k)return e(o.Light);k.drawImage(r,0,0);var n=k.getImageData(0,0,1,1).data;(n[0]&n[1]&n[2])<255?e(o.Dark):e(o.Light)},r.onerror=function(){e(o.Unknown)},r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IndoaXRlIi8+PC9zdmc+"}))}function J(){return S?y.matches?o.Dark:o.Light:o.Unknown}function Q(e){var r;(r=e.matches?o.Dark:o.Light)!==_&&Y(_=r)}function Y(e){for(var r=0;r<j.length;r++){var n=j[r];n.fn(e),n.once&&ee(n)}}function ee(e){var r,n=re(e);-1!==n&&j.splice(n,1),0===j.length&&(i.browser===t.SamsungInternet?(_=null,null!==G&&(clearInterval(G),G=null)):(r=e.capture,_=null,"function"==typeof y.removeEventListener?y.removeEventListener("change",Q,r):"function"==typeof y.removeListener&&y.removeListener(Q)))}function re(e){for(var r=0;r<j.length;r++)if(j[r].fn===e.fn&&j[r].capture===e.capture)return r;return-1}function ne(){var e;H={},e=x?'meta[name="msapplication-navbutton-color"]':E?'meta[name="msapplication-TileColor"]':'meta[name="theme-color"]';var r=globalThis.document.querySelectorAll(e);if(T&&S&&!x&&!E)for(var n=0;n<r.length;n++){var t=r.item(n),o=t.getAttribute("media");if("(prefers-color-scheme: dark)"===o&&void 0===H.dark?H.dark=t:"(prefers-color-scheme: light)"===o&&void 0===H.light?H.light=t:null===o&&void 0===H.default&&(H.default=t),void 0!==H.dark&&void 0!==H.light&&void 0!==H.default)return}else H.default=r[0]}function te(){var e=function(){if(x)return globalThis.document.querySelector('meta[name="msapplication-navbutton-color"]');if(E)return globalThis.document.querySelector('meta[name="msapplication-TileColor"]');if(!T||!S)return globalThis.document.querySelector('meta[name="theme-color"]');var e,r=globalThis.document.querySelectorAll('meta[name="theme-color"]');e=J()===o.Dark?"(prefers-color-scheme: dark)":"(prefers-color-scheme: light)";for(var n=0;n<r.length;n++){var t=r.item(n);if(t.hasAttribute("content")){var i=t.getAttribute("media");if(null===i||i===e)return t}}return null}();return null!==e?e.getAttribute("content"):i.browser===t.Safari?i.isStandalone?J()===o.Dark?"#ffffffff":"#000000ff":$(R(globalThis.getComputedStyle(globalThis.document.body).backgroundColor)):i.browser===t.Chrome?J()===o.Dark?"#28292cff":"#ffffffff":void 0}z=new MutationObserver((function(e){for(var r=0;r<e.length;r++){for(var n=e[r],t=n.addedNodes,o=n.removedNodes,i=0;i<t.length;i++)if(t[i]instanceof HTMLMetaElement)return ne();for(i=0;i<o.length;i++)if(o[i]instanceof HTMLMetaElement)return ne()}})),"function"==typeof y.addEventListener?y.addEventListener("change",ne):"function"==typeof y.addListener&&y.addListener(ne),z.observe(globalThis.document.head,{childList:!0}),ne();var oe={installed:!1,name:"Theme",module:K,Constants:{Appearances:o},Errors:{EasingError:I,UnsupportedEasingFunctionError:L,StepSyntaxError:F,LinearSyntaxError:N,CubicBezierSyntaxError:C,UnsupportedColorError:V}};module.exports=oe;
1
+ "use strict";var e,r,n,t;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(r||(r={})),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"}(n||(n={})),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"}(t||(t={}));var o,i,a={device:r.Unknown,os:e.Unknown,osVersion:"",engine:n.Unknown,engineVersion:"",browser:t.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},s=[[/windows nt (6\.[23]); arm/i,e.Windows,d],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,d],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,d],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,d],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,d],[/windows ce\/?([\d.]*)/i,e.Windows,d],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],l=[[/windows.+ edge\/([\w.]+)/i,n.EdgeHTML],[/arkweb\/([\w.]+)/i,n.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,n.Blink],[/presto\/([\w.]+)/i,n.Presto],[/webkit\/([\w.]+)/i,n.WebKit],[/trident\/([\w.]+)/i,n.Trident],[/netfront\/([\w.]+)/i,n.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,n.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,n.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,n.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,t.Chrome],[/webview.+edge\/([\w.]+)/i,t.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,t.Edge],[/opera mini\/([-\w.]+)/i,t.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,t.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,t.Opera],[/opios[\/ ]+([\w.]+)/i,t.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,t.Opera],[/\bopr\/([\w.]+)/i,t.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,t.IE],[/(?:ms|\()ie ([\w.]+)/i,t.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,t.IE],[/\bfocus\/([\w.]+)/i,t.Firefox],[/\bopt\/([\w.]+)/i,t.Opera],[/coast\/([\w.]+)/i,t.Opera],[/fxios\/([\w.-]+)/i,t.Firefox],[/samsungbrowser\/([\w.]+)/i,t.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,t.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,t.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,t.Chrome],[/chrome\/([\w.]+) mobile/i,t.Chrome],[/chrome\/v?([\w.]+)/i,t.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/version\/([\w.,]+) .*safari/i,t.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,t.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,t.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,t.Firefox],[/firefox\/([\w.]+)/i,t.Firefox]];function d(e){if(void 0===e)return"";var r={"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!==r?r:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function f(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}for(var m=0;m<s.length;m++){var p=(g=s[m])[0],v=g[1],h=g[2];if(null!==(w=a.userAgent.match(p))){a.os=v,a.osVersion=f(w[1],h),v===e.iOS||v===e.Android?a.device=r.Mobile:v!==e.Windows&&v!==e.MacOS||(a.device=r.Desktop);break}}for(m=0;m<l.length;m++){p=(g=l[m])[0];var b=g[1];h=g[2];if(null!==(w=a.userAgent.match(p))){a.engine=b,a.engineVersion=f(w[1],h);break}}for(m=0;m<u.length;m++){p=(g=u[m])[0];var g,w,y=g[1];h=g[2];if(null!==(w=a.userAgent.match(p))){a.browser=y,a.browserVersion=f(w[1],h);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{switch(v=(S=require("react-native").Platform).OS){case"android":a.os=e.Android;break;case"ios":a.os=e.iOS;break;case"windows":a.os=e.Windows;break;case"macos":a.os=e.MacOS}}catch(e){}else if(a.isNodeJS)try{var S=(v=require("os")).platform(),k=v.release(),T=(o=k.split("."),{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")});switch(S){case"win32":a.os=e.Windows,a.osVersion=10===T.major&&0===T.minor&&T.build>=22e3?"11":10===T.major&&0===T.minor&&T.build<22e3?"10":6===T.major&&3===T.minor?"8.1":6===T.major&&2===T.minor?"8":6===T.major&&1===T.minor?"7":6===T.major&&0===T.minor?"Vista":5===T.major&&1===T.minor||5===T.major&&2===T.minor?"XP":5===T.major&&0===T.minor?"2000":4===T.major&&90===T.minor?"ME":4===T.major&&0===T.minor?"NT 4.0":3===T.major&&51===T.minor?"NT 3.11":k;break;case"darwin":a.os=e.MacOS,a.osVersion=T.major>=24?T.major-9+"."+T.minor+"."+T.build:23===T.major?"14."+T.minor+"."+T.build:22===T.major?"13."+T.minor+"."+T.build:21===T.major?"12."+T.minor+"."+T.build:20===T.major?"11."+T.minor+"."+T.build:19===T.major?"10.15."+T.minor:18===T.major?"10.14."+T.minor:17===T.major?"10.13."+T.minor:16===T.major?"10.12."+T.minor:15===T.major?"10.11."+T.minor:14===T.major?"10.10."+T.minor:13===T.major?"10.9."+T.minor:T.major>=5&&T.major<=12?"10."+(T.major-4)+"."+T.minor:k;break;case"android":a.os=e.Android,a.osVersion=k;break;case"linux":/android/i.test(k)&&(a.os=e.Android,a.osVersion=k)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var n,t=r.fullVersionList||r.brands||[],o=r.platformVersion,i=0;i<t.length;i++){var s=null==(n=t[i])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(a.engineVersion=u)}"string"==typeof o&&(a.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?a.osVersion="11":a.osVersion=o)})),a.isMobile=a.device===r.Mobile,a.isDesktop=a.device===r.Desktop,a.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(a.userAgent),a.isStandalone=function(r){return"matchMedia"in globalThis&&(r===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(a.os),function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(i||(i={}));var x=globalThis.matchMedia("(prefers-color-scheme: dark)"),E="not all"!==x.media,j=a.browser!==t.Chrome||a.isMobile&&function(e,r){for(var n=e.split("."),t=r.split("."),o=Math.max(n.length,t.length),i=0;i<o;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<t.length?parseInt(t[i],10):0))return 1;if(a<s)return-1}return 0}(a.browserVersion,"92")>=0,M=globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0}),A=/iemobile/i.test(a.userAgent),I=/windows phone/i.test(a.userAgent),C=[];function N(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function F(e,r){function n(t){if(!(this instanceof n))return new n(t);var o=new r(t||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==t&&(o.message=t),"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(r.captureStackTrace&&"function"==typeof r.captureStackTrace)r.captureStackTrace(o,n);else try{var i=new r;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===r&&(r=Error),n.prototype=Object.create(r.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(r){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}"function"==typeof SuppressedError&&SuppressedError;var L=F("EasingError"),O=F("CubicBezierSyntaxError",L),W=F("LinearSyntaxError",L),P=F("StepSyntaxError",L),D=F("UnsupportedEasingFunctionError",L),U={linear:"linear(0, 1)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)","step-start":"steps(1, jump-start)","step-end":"steps(1, jump-end)"};function V(e,r,n){return e<r?r:e>n?n:e}function R(e){var r=function(e){var r=e.match(/cubic-bezier\((.*)\)/);if(null===r)throw new O("Invalid cubic-bezier syntax");var n=r[1].trim().split(","),t=[];if(4!==n.length)throw new O("Cubic-bezier must have exactly 4 numeric values");for(var o=0;o<4;o++){var i=parseFloat(n[o]);if(isNaN(i))throw new O("Cubic-bezier must have exactly 4 numeric values");if(o%2==0&&(i<0||i>1))throw new O("x1 and x2 must be between 0 and 1");t.push(i)}return{x1:t[0],y1:t[1],x2:t[2],y2:t[3]}}(e),n=r.x1,t=r.x2,o=r.y1,i=r.y2;return function(e){if(0===(e=V(e,0,1))||1===e)return e;var r=function(e,r,o){if(void 0===r&&(r=1e-6),void 0===o&&(o=50),e<=0)return 0;if(e>=1)return 1;for(var i=e,a=0;a<o;a++){var s=3*(1-i)*(1-i)*i*n+3*(1-i)*i*i*t+i*i*i,l=3*(1-i)*(1-i)*n+6*(1-i)*i*(t-n)+3*i*i*(1-t);if(Math.abs(l)<r)break;var u=i-(s-e)/l;if(Math.abs(u-i)<r){i=u;break}i=Math.max(0,Math.min(1,u))}return i}(e);return 3*(1-r)*(1-r)*r*o+3*(1-r)*r*r*i+r*r*r}}function z(e){var r=function(e){var r,n,t=e.match(/linear\((.*)\)/);if(null===t)throw new W("Invalid linear syntax");var o=t[1].trim();if(""===o)throw new W("Linear function must have at least one point");for(var i=o.split(","),a=[],s=0;s<i.length;s++){var l=i[s].trim(),u=l.match(/^([+-]?\d*\.?\d+)((?:\s+[+-]?\d*\.?\d+%){2,})$/);if(null===u){var d=l.match(/^([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)%$/);if(null===d){var c=l.match(/^([+-]?\d*\.?\d+)$/);if(null===c)throw new W('Invalid linear point format: "'+l+'"');a.push({position:1===i.length?0:s/(i.length-1),value:parseFloat(c[1])})}else a.push({position:parseFloat(d[2])/100,value:parseFloat(d[1])})}else{var f=parseFloat(u[1]),m=u[2].trim().split(/\s+/);try{for(var p=(r=void 0,N(m)),v=p.next();!v.done;v=p.next()){var h=v.value;a.push({value:f,position:parseFloat(h)/100})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}}if(0===a.length)throw new W("No valid points found in linear function");return a.sort((function(e,r){return e.position-r.position})),a[0].position>0&&a.unshift({position:0,value:0}),a[a.length-1].position<1&&a.push({position:1,value:1}),a}(e);return function(e){if((e=V(e,0,1))<=r[0].position)return r[0].value;if(e>=r[r.length-1].position)return r[r.length-1].value;for(var n=0;n<r.length-1;n++){var t=r[n],o=r[n+1];if(e>=t.position&&e<=o.position){if(t.position===o.position)return o.value;var i=(e-t.position)/(o.position-t.position);return t.value+(o.value-t.value)*i}}return r[r.length-1].value}}function H(e){if(function(e){return!/(linear|cubic-bezier|steps)\((.*)\)/.test(e)}(e)&&(e=U[e]),function(e){return/cubic-bezier\(/.test(e)}(e))return R(e);if(function(e){return/linear\(/.test(e)}(e))return z(e);if(function(e){return/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/.test(e)}(e))return function(e){var r=e.match(/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/);if(null===r)throw new P("Invalid steps syntax");var n=parseInt(r[1],10),t=r[2];if(n<=0)throw new P("Steps count must be a positive integer");if("jump-none"===t&&n<2)throw new P("jump-none requires at least 2 steps");return function(e){switch(e=V(e,0,1),t){case"start":case"jump-start":return 0===e?1/n:1===e?1:Math.ceil(e*n)/n;case void 0:case"end":case"jump-end":return 1===e?1:Math.floor(e*n)/n;case"jump-both":return 0===e?0:1===e?1:Math.round(e*(n+1))/(n+1);case"jump-none":return 0===e?0:1===e?1:Math.floor(e*(n-1))/(n-1);default:throw new P('Unsupported step position: "'+t+'"')}}}(e);throw new D('Unsupported easing function: "'+e+'"')}var B=F("UnsupportedColorError");function q(e){if("undefined"!=typeof CSS&&CSS.supports&&!CSS.supports("color",e))throw new B('Unsupported color: "'+e+'".');if(null!==M)try{M.clearRect(0,0,1,1),M.fillStyle=e,M.fillRect(0,0,1,1);var r=M.getImageData(0,0,1,1).data;return{red:r[0],green:r[1],blue:r[2],alpha:parseFloat((r[3]/255).toFixed(2))}}catch(e){}var n=function(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),r?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}}("div");if(void 0===n)throw new B('Failed to parse color values from: "'+e+'".');n.style.color=e,globalThis.document.body.appendChild(n);try{var t=globalThis.getComputedStyle(n).color,o=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/),i=t.match(/rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:\/\s*([\d.]+%?))?\s*\)/),a=o||i;if(null===a)throw new B('Unsupported color: "'+e+'".');var s=parseInt(a[1],10),l=parseInt(a[2],10),u=parseInt(a[3],10),d=1;if(void 0!==a[4]){var c=a[4];d="%"===c.charAt(c.length-1)?parseFloat((parseFloat(c)/100).toFixed(2)):parseFloat(parseFloat(c).toFixed(2))}if(isNaN(s)||isNaN(l)||isNaN(u)||isNaN(d))throw new B('Failed to parse color values from: "'+e+'".');return{red:s,green:l,blue:u,alpha:d}}finally{globalThis.document.body.removeChild(n)}}var _,G={},K=null,Z=null,$=null,X=null,J={setThemeColor:function(e,r){void 0===r&&(r={duration:0,easingFunction:"linear",appearance:"default"});var n=r.duration,t=H(r.easingFunction),o=r.appearance;null!==K&&(globalThis.cancelAnimationFrame(K),K=null,null!==Z&&(Z(se()),Z=null));var a=se();void 0===a&&(a=void 0!==r.defaultColor?r.defaultColor:re()===i.Dark?"#181818ff":"#dcdcdcff");var s=q(a),l=q(e);return new Promise((function(e){Z=e;var r=null;K=globalThis.requestAnimationFrame((function i(a){null===r&&(r=a);var u,d=a-r;u=0===n?1:Math.min(d/n,1);var c=t(u),f={red:Math.round(s.red+(l.red-s.red)*c),green:Math.round(s.green+(l.green-s.green)*c),blue:Math.round(s.blue+(l.blue-s.blue)*c),alpha:+(s.alpha+(l.alpha-s.alpha)*c).toFixed(2)};(function(e){void 0===e&&(e="default");var r;r=!j||!E||A||I?"default":e;var n=G[r];if(void 0!==n)return n;n=globalThis.document.createElement("meta"),A?n.setAttribute("name","msapplication-navbutton-color"):I?n.setAttribute("name","msapplication-TileColor"):n.setAttribute("name","theme-color");"default"!==e&&n.setAttribute("media","(prefers-color-scheme: "+r+")");return globalThis.document.head.prepend(n),G[e]=n})(o).setAttribute("content",Y(f)),u<1?K=globalThis.requestAnimationFrame(i):(K=null,null!==Z&&(e(se()),K=null))}))}))},getThemeColor:se,removeThemeColor:function(e){void 0===e&&(e="default");var r=G[e];void 0!==r&&r.remove();G[e]=void 0},detectAppearance:function(){return a.browser===t.SamsungInternet?ee():Promise.resolve(re())},onAppearanceChange:function(e,r){void 0===r&&(r=!1);var n={fn:e,capture:!1,once:!1};"boolean"==typeof r&&(r={capture:r});void 0!==r.capture&&(n.capture=r.capture);void 0!==r.once&&(n.once=r.once);void 0!==r.signal&&(n.signal=r.signal);var o=ie(n);-1===o?(C.push(n),1===C.length&&(a.browser===t.SamsungInternet?(ee().then((function(e){$=e})),X=globalThis.setInterval((function(){ee().then((function(e){e!==$&&($=e,te(e))}))}),2e3)):(i=n.capture,$=re(),"function"==typeof x.addEventListener?x.addEventListener("change",ne,i):"function"==typeof x.addListener&&x.addListener(ne))),this.detectAppearance().then(te)):C[o].once&&!n.once&&(C[o].once=!1);var i;void 0!==n.signal&&(n.signal.aborted?oe(n):n.signal.addEventListener("abort",(function e(){void 0!==n.signal&&n.signal.removeEventListener("abort",e),oe(n)})));return function(){oe(n)}}};function Q(e){var r=e.toString(16);switch(r.length){case 0:return"00";case 1:return"0"+r;default:return r}}function Y(e){return"#"+Q(e.red)+Q(e.green)+Q(e.blue)+Q(Math.round(255*e.alpha))}function ee(){return new Promise((function(e){var r=new Image;r.onload=function(){if(null===M)return e(i.Light);M.drawImage(r,0,0);var n=M.getImageData(0,0,1,1).data;(n[0]&n[1]&n[2])<255?e(i.Dark):e(i.Light)},r.onerror=function(){e(i.Unknown)},r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IndoaXRlIi8+PC9zdmc+"}))}function re(){return E?x.matches?i.Dark:i.Light:i.Unknown}function ne(e){var r;(r=e.matches?i.Dark:i.Light)!==$&&te($=r)}function te(e){for(var r=0;r<C.length;r++){var n=C[r];n.fn(e),n.once&&oe(n)}}function oe(e){var r,n=ie(e);-1!==n&&C.splice(n,1),0===C.length&&(a.browser===t.SamsungInternet?($=null,null!==X&&(clearInterval(X),X=null)):(r=e.capture,$=null,"function"==typeof x.removeEventListener?x.removeEventListener("change",ne,r):"function"==typeof x.removeListener&&x.removeListener(ne)))}function ie(e){for(var r=0;r<C.length;r++)if(C[r].fn===e.fn&&C[r].capture===e.capture)return r;return-1}function ae(){var e;G={},e=A?'meta[name="msapplication-navbutton-color"]':I?'meta[name="msapplication-TileColor"]':'meta[name="theme-color"]';var r=globalThis.document.querySelectorAll(e);if(j&&E&&!A&&!I)for(var n=0;n<r.length;n++){var t=r.item(n),o=t.getAttribute("media");if("(prefers-color-scheme: dark)"===o&&void 0===G.dark?G.dark=t:"(prefers-color-scheme: light)"===o&&void 0===G.light?G.light=t:null===o&&void 0===G.default&&(G.default=t),void 0!==G.dark&&void 0!==G.light&&void 0!==G.default)return}else G.default=r[0]}function se(){var e=function(){if(A)return globalThis.document.querySelector('meta[name="msapplication-navbutton-color"]');if(I)return globalThis.document.querySelector('meta[name="msapplication-TileColor"]');if(!j||!E)return globalThis.document.querySelector('meta[name="theme-color"]');var e,r=globalThis.document.querySelectorAll('meta[name="theme-color"]');e=re()===i.Dark?"(prefers-color-scheme: dark)":"(prefers-color-scheme: light)";for(var n=0;n<r.length;n++){var t=r.item(n);if(t.hasAttribute("content")){var o=t.getAttribute("media");if(null===o||o===e)return t}}return null}();return null!==e?e.getAttribute("content"):a.browser===t.Safari?a.isStandalone?re()===i.Dark?"#ffffffff":"#000000ff":Y(q(globalThis.getComputedStyle(globalThis.document.body).backgroundColor)):a.browser===t.Chrome?re()===i.Dark?"#28292cff":"#ffffffff":void 0}_=new MutationObserver((function(e){for(var r=0;r<e.length;r++){for(var n=e[r],t=n.addedNodes,o=n.removedNodes,i=0;i<t.length;i++)if(t[i]instanceof HTMLMetaElement)return ae();for(i=0;i<o.length;i++)if(o[i]instanceof HTMLMetaElement)return ae()}})),"function"==typeof x.addEventListener?x.addEventListener("change",ae):"function"==typeof x.addListener&&x.addListener(ae),_.observe(globalThis.document.head,{childList:!0}),ae();var le={installed:!1,name:"Theme",module:J,Constants:{Appearances:i},Errors:{EasingError:L,UnsupportedEasingFunctionError:D,StepSyntaxError:P,LinearSyntaxError:W,CubicBezierSyntaxError:O,UnsupportedColorError:B}};module.exports=le;