@slashid/jump-page 0.0.8-package.5 → 0.0.8-package.6

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.
@@ -0,0 +1,40 @@
1
+ import{r as D,R as eo}from"./index.03be2d59.js";/* empty css */var to={exports:{}},Jt={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var da=D,ua=Symbol.for("react.element"),la=Symbol.for("react.fragment"),fa=Object.prototype.hasOwnProperty,ha=da.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pa={key:!0,ref:!0,__self:!0,__source:!0};function no(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)fa.call(t,r)&&!pa.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:ua,type:e,key:o,ref:i,props:s,_owner:ha.current}}Jt.Fragment=la;Jt.jsx=no;Jt.jsxs=no;to.exports=Jt;var p=to.exports;function P(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ro=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{},In={},At={},qe=ro.parcelRequire91fc;qe==null&&(qe=function(e){if(e in In)return In[e].exports;if(e in At){var t=At[e];delete At[e];var n={id:e,exports:{}};return In[e]=n,t.call(n.exports,n,n.exports),n.exports}var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r},qe.register=function(t,n){At[t]=n},ro.parcelRequire91fc=qe);var ga=qe.register;ga("lDZ5d",function(e,t){(function(n,r){var s="1.0.37",o="",i="?",a="function",c="undefined",u="object",m="string",f="major",d="model",l="name",h="type",g="vendor",_="version",G="architecture",Ce="console",v="mobile",$="tablet",W="smarttv",B="wearable",ue="embedded",ye=500,Ie="Amazon",Re="Apple",tt="ASUS",nt="BlackBerry",le="Browser",St="Chrome",oa="Edge",Et="Firefox",kt="Google",Pr="Huawei",xn="LG",vn="Microsoft",Lr="Motorola",Ct="Opera",It="Samsung",Nr="Sharp",Rt="Sony",$n="Xiaomi",Sn="Zebra",Mr="Facebook",Ur="Chromium OS",Fr="Mac OS",ia=function(S,I){var x={};for(var T in S)I[T]&&I[T].length%2===0?x[T]=I[T].concat(S[T]):x[T]=S[T];return x},Dt=function(S){for(var I={},x=0;x<S.length;x++)I[S[x].toUpperCase()]=S[x];return I},Vr=function(S,I){return typeof S===m?rt(I).indexOf(rt(S))!==-1:!1},rt=function(S){return S.toLowerCase()},aa=function(S){return typeof S===m?S.replace(/[^\d\.]/g,o).split(".")[0]:r},En=function(S,I){if(typeof S===m)return S=S.replace(/^\s\s*/,o),typeof I===c?S:S.substring(0,ye)},st=function(S,I){for(var x=0,T,xe,oe,k,y,ie;x<I.length&&!y;){var Cn=I[x],Hr=I[x+1];for(T=xe=0;T<Cn.length&&!y&&Cn[T];)if(y=Cn[T++].exec(S),y)for(oe=0;oe<Hr.length;oe++)ie=y[++xe],k=Hr[oe],typeof k===u&&k.length>0?k.length===2?typeof k[1]==a?this[k[0]]=k[1].call(this,ie):this[k[0]]=k[1]:k.length===3?typeof k[1]===a&&!(k[1].exec&&k[1].test)?this[k[0]]=ie?k[1].call(this,ie,k[2]):r:this[k[0]]=ie?ie.replace(k[1],k[2]):r:k.length===4&&(this[k[0]]=ie?k[3].call(this,ie.replace(k[1],k[2])):r):this[k]=ie||r;x+=2}},kn=function(S,I){for(var x in I)if(typeof I[x]===u&&I[x].length>0){for(var T=0;T<I[x].length;T++)if(Vr(I[x][T],S))return x===i?r:x}else if(Vr(I[x],S))return x===i?r:x;return S},ca={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Br={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},qr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[_,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[_,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,_],[/opios[\/ ]+([\w\.]+)/i],[_,[l,Ct+" Mini"]],[/\bopr\/([\w\.]+)/i],[_,[l,Ct]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[_,[l,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,_],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[_,[l,"UC"+le]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[_,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[_,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[_,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[_,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[_,[l,"Smart Lenovo "+le]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+le],_],[/\bfocus\/([\w\.]+)/i],[_,[l,Et+" Focus"]],[/\bopt\/([\w\.]+)/i],[_,[l,Ct+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[_,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[_,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[_,[l,Ct+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[_,[l,"MIUI "+le]],[/fxios\/([-\w\.]+)/i],[_,[l,Et]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+le]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+le],_],[/samsungbrowser\/([\w\.]+)/i],[_,[l,It+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],_],[/metasr[\/ ]?([\d\.]+)/i],[_,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],_],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,_],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,Mr],_],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,_],[/\bgsa\/([\w\.]+) .*safari\//i],[_,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[_,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[_,[l,St+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,St+" WebView"],_],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[_,[l,"Android "+le]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,_],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[_,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[_,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[_,kn,ca]],[/(webkit|khtml)\/([\w\.]+)/i],[l,_],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],_],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[_,[l,Et+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[l,_],[/(cobalt)\/([\w\.]+)/i],[l,[_,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[G,"amd64"]],[/(ia32(?=;))/i],[[G,rt]],[/((?:i[346]|x)86)[;\)]/i],[[G,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[G,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[G,"armhf"]],[/windows (ce|mobile); ppc;/i],[[G,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[G,/ower/,o,rt]],[/(sun4\w)[;\)]/i],[[G,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[G,rt]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[g,It],[h,$]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[g,It],[h,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[g,Re],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[g,Re],[h,$]],[/(macintosh);/i],[d,[g,Re]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[g,Nr],[h,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[g,Pr],[h,$]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[g,Pr],[h,v]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[g,$n],[h,v]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[g,$n],[h,$]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[g,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[g,"Vivo"],[h,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[g,"Realme"],[h,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[g,Lr],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[g,Lr],[h,$]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[g,xn],[h,$]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[g,xn],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[g,"Lenovo"],[h,$]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[g,"Nokia"],[h,v]],[/(pixel c)\b/i],[d,[g,kt],[h,$]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[g,kt],[h,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[g,Rt],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[g,Rt],[h,$]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[g,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[g,Ie],[h,$]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[g,Ie],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[d,g,[h,$]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[g,nt],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[g,tt],[h,$]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[g,tt],[h,v]],[/(nexus 9)/i],[d,[g,"HTC"],[h,$]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[d,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[g,"Acer"],[h,$]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[g,"Meizu"],[h,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[g,"Ulefone"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,d,[h,v]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,d,[h,$]],[/(surface duo)/i],[d,[g,vn],[h,$]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[g,"Fairphone"],[h,v]],[/(u304aa)/i],[d,[g,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[d,[g,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[d,[g,"RCA"],[h,$]],[/\b(venue[\d ]{2,7}) b/i],[d,[g,"Dell"],[h,$]],[/\b(q(?:mv|ta)\w+) b/i],[d,[g,"Verizon"],[h,$]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[g,"Barnes & Noble"],[h,$]],[/\b(tm\d{3}\w+) b/i],[d,[g,"NuVision"],[h,$]],[/\b(k88) b/i],[d,[g,"ZTE"],[h,$]],[/\b(nx\d{3}j) b/i],[d,[g,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[d,[g,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[d,[g,"Swiss"],[h,$]],[/\b((zeki)?tb.*\b) b/i],[d,[g,"Zeki"],[h,$]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],d,[h,$]],[/\b(ns-?\w{0,9}) b/i],[d,[g,"Insignia"],[h,$]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[g,"NextBook"],[h,$]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],d,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],d,[h,v]],[/\b(ph-1) /i],[d,[g,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[g,"Envizen"],[h,$]],[/\b(trio[-\w\. ]+) b/i],[d,[g,"MachSpeed"],[h,$]],[/\btu_(1491) b/i],[d,[g,"Rotor"],[h,$]],[/(shield[\w ]+) b/i],[d,[g,"Nvidia"],[h,$]],[/(sprint) (\w+)/i],[g,d,[h,v]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[g,vn],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[g,Sn],[h,$]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[g,Sn],[h,v]],[/smart-tv.+(samsung)/i],[g,[h,W]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[g,It],[h,W]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,xn],[h,W]],[/(apple) ?tv/i],[g,[d,Re+" TV"],[h,W]],[/crkey/i],[[d,St+"cast"],[g,kt],[h,W]],[/droid.+aft(\w+)( bui|\))/i],[d,[g,Ie],[h,W]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[g,Nr],[h,W]],[/(bravia[\w ]+)( bui|\))/i],[d,[g,Rt],[h,W]],[/(mitv-\w{5}) bui/i],[d,[g,$n],[h,W]],[/Hbbtv.*(technisat) (.*);/i],[g,d,[h,W]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,En],[d,En],[h,W]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,W]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,d,[h,Ce]],[/droid.+; (shield) bui/i],[d,[g,"Nvidia"],[h,Ce]],[/(playstation [345portablevi]+)/i],[d,[g,Rt],[h,Ce]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[g,vn],[h,Ce]],[/((pebble))app/i],[g,d,[h,B]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[g,Re],[h,B]],[/droid.+; (glass) \d/i],[d,[g,kt],[h,B]],[/droid.+; (wt63?0{2,3})\)/i],[d,[g,Sn],[h,B]],[/(quest( 2| pro)?)/i],[d,[g,Mr],[h,B]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[h,ue]],[/(aeobc)\b/i],[d,[g,Ie],[h,ue]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[h,$]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,$]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[_,[l,oa+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[_,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,_],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[_,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,_],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[_,kn,Br]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[_,kn,Br],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[_,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,Fr],[_,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[_,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,_],[/\(bb(10);/i],[_,[l,nt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[_,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[_,[l,Et+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[_,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[_,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[_,[l,St+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,Ur],_],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,_],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],_],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,_]]},Y=function(S,I){if(typeof S===u&&(I=S,S=r),!(this instanceof Y))return new Y(S,I).getResult();var x=typeof n!==c&&n.navigator?n.navigator:r,T=S||(x&&x.userAgent?x.userAgent:o),xe=x&&x.userAgentData?x.userAgentData:r,oe=I?ia(qr,I):qr,k=x&&x.userAgent==T;return this.getBrowser=function(){var y={};return y[l]=r,y[_]=r,st.call(y,T,oe.browser),y[f]=aa(y[_]),k&&x&&x.brave&&typeof x.brave.isBrave==a&&(y[l]="Brave"),y},this.getCPU=function(){var y={};return y[G]=r,st.call(y,T,oe.cpu),y},this.getDevice=function(){var y={};return y[g]=r,y[d]=r,y[h]=r,st.call(y,T,oe.device),k&&!y[h]&&xe&&xe.mobile&&(y[h]=v),k&&y[d]=="Macintosh"&&x&&typeof x.standalone!==c&&x.maxTouchPoints&&x.maxTouchPoints>2&&(y[d]="iPad",y[h]=$),y},this.getEngine=function(){var y={};return y[l]=r,y[_]=r,st.call(y,T,oe.engine),y},this.getOS=function(){var y={};return y[l]=r,y[_]=r,st.call(y,T,oe.os),k&&!y[l]&&xe&&xe.platform!="Unknown"&&(y[l]=xe.platform.replace(/chrome os/i,Ur).replace(/macos/i,Fr)),y},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return T},this.setUA=function(y){return T=typeof y===m&&y.length>ye?En(y,ye):y,this},this.setUA(T),this};Y.VERSION=s,Y.BROWSER=Dt([l,_,f]),Y.CPU=Dt([G]),Y.DEVICE=Dt([d,g,h,Ce,v,W,$,B,ue]),Y.ENGINE=Y.OS=Dt([l,_]),typeof t!==c?(e.exports&&(t=e.exports=Y),t.UAParser=Y):typeof define===a&&define.amd?define(function(){return Y}):typeof n!==c&&(n.UAParser=Y);var Fe=typeof n!==c&&(n.jQuery||n.Zepto);if(Fe&&!Fe.ua){var Tt=new Y;Fe.ua=Tt.getResult(),Fe.ua.get=function(){return Tt.getUA()},Fe.ua.set=function(S){Tt.setUA(S);var I=Tt.getResult();for(var x in I)Fe.ua[x]=I[x]}}})(typeof window=="object"?window:this)});var lr={};lr=JSON.parse(`{"name":"@slashid/slashid","private":false,"publishConfig":{"access":"public"},"version":"3.21.0-rc.1","description":"Client SDK for the /id platform","homepage":"https://slashid.dev","author":"SlashID","license":"MIT","main":"./dist/bundle/slashid.js","module":"./dist/esmodule/slashid.esm.js","esmodule":"./dist/esmodule/slashid.esm.js","commonjs":"./dist/commonjs/slashid.cjs.js","bundle":"./dist/bundle/slashid.js","types":"./dist/types/slashid.d.ts","exports":{".":{"require":"./dist/commonjs/slashid.cjs.js","import":"./dist/esmodule/slashid.esm.js","default":"./dist/commonjs/slashid.cjs.js","types":"./dist/types/slashid.d.ts"}},"targets":{"esmodule":{"source":"src/targets/package.ts","context":"browser","isLibrary":true,"outputFormat":"esmodule","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"commonjs":{"source":"src/targets/package.ts","context":"node","isLibrary":true,"outputFormat":"commonjs","engines":{"node":">= 12"}},"bundle":{"source":"src/targets/bundle.ts","context":"browser","outputFormat":"global","engines":{"browsers":["> 0.5%","last 2 versions","not dead"]}},"page":{"source":"static/sdk.html","context":"browser","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"types":{"source":"src/targets/package.ts"}},"files":["dist/*"],"keywords":["slashid","SlashID","auth","openid","authentication","jwt","browser"],"scripts":{"clean":"rm -rf dist docs","lint":"eslint ./src --ext .ts","format":"prettier --config .prettierrc.json 'src/**/*.ts' --write","test:ts":"tsc --project tsconfig.json --noEmit","test:unit":"jest","test:unit:watch":"jest --watch","test:unit:ci":"jest --ci","test:integration":"playwright test","build":"rm -rf dist && parcel build --no-cache && cp compat/esmodule/package.json dist/esmodule","docs":"rm -rf docs && typedoc","dist":"npm run lint && npm run build","all":"npm run dist && npm run docs","serve:all":"parcel serve 'static/*.html' --port 8080 --no-cache","serve:example":"parcel serve static/index.html --port 8080 --no-cache","serve:jump":"parcel serve static/sdk.html --port 8080 --no-cache","serve:docs":"parcel serve docs/index.html --port 8081 --no-cache","push:docs":"aws s3 sync docs s3://slashiddoc/sdk/v$(node tools/version.js --major) && (aws cloudfront create-invalidation --distribution-id ETLBNGAAF97EN --paths \\"/*\\")","changeset":"changeset","prepublishOnly":"npm run all","publish:ci":"npm run build && changeset publish"},"devDependencies":{"@parcel/core":"2.12.0","@parcel/packager-ts":"2.12.0","@parcel/transformer-babel":"2.12.0","@parcel/transformer-js":"2.12.0","@parcel/transformer-json":"2.12.0","@parcel/transformer-react-refresh-wrap":"2.12.0","@parcel/transformer-typescript-types":"2.12.0","@playwright/test":"^1.25.0","@types/jest":"^28.1.7","@types/node":"~15.0.2","@types/qrcode":"^1.5.0","@types/ua-parser-js":"^0.7.39","@typescript-eslint/eslint-plugin":"^4.15.1","@typescript-eslint/parser":"^4.15.1","danger":"^11.2.6","eslint":"^7.20.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","isomorphic-fetch":"^3.0.0","jest":"^28.1.3","jest-environment-jsdom":"^28.1.3","jest-fetch-mock":"^3.0.3","parcel":"2.12.0","prettier":"^2.7.1","ts-jest":"^28.0.8","typedoc":"^0.23.00","typedoc-plugin-mdn-links":"^2.0.0","typedoc-plugin-missing-exports":"^1.0.0","typescript":"~4.7.0"},"dependencies":{"@changesets/cli":"^2.26.2","@types/uuid":"8.3.4","changeset":"^0.2.6","compare-versions":"^6.1.0","docdash":"^1.2.0","jwt-decode":"^3.1.2","qrcode":"^1.5.1","querystring-es3":"^0.2.1","regenerator-runtime":"^0.13.9","ua-parser-js":"^1.0.37","url":"^0.11.0","uuid":"8.3.2"}}`);const[ma,_a,ba]=lr.version.split("."),F={major:ma,minor:_a,patch:ba,raw:lr.version},wa="https://api.slashid.com".replace(/\/+$/,"");class be{set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:wa}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||so}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:async()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}constructor(t={}){this.configuration=t}}const we=new be;class Ee{withMiddleware(...t){const n=this.clone();return n.middleware=n.middleware.concat(...t),n}withPreMiddleware(...t){const n=t.map(r=>({pre:r}));return this.withMiddleware(...n)}withPostMiddleware(...t){const n=t.map(r=>({post:r}));return this.withMiddleware(...n)}isJsonMime(t){return t?Ee.jsonRegex.test(t):!1}async request(t,n){const{url:r,init:s}=await this.createFetchParams(t,n),o=await this.fetchApi(r,s);if(o&&o.status>=200&&o.status<300)return o;throw new va(o,"Response returned an error code")}async createFetchParams(t,n){let r=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(r+="?"+this.configuration.queryParamsStringify(t.query));const s=Object.assign({},this.configuration.headers,t.headers);Object.keys(s).forEach(u=>s[u]===void 0?delete s[u]:{});const o=typeof n=="function"?n:async()=>n,i={method:t.method,headers:s,body:t.body,credentials:this.configuration.credentials},a={...i,...await o({init:i,context:t})},c={...a,body:xa(a.body)||a.body instanceof URLSearchParams||ya(a.body)?a.body:JSON.stringify(a.body)};return{url:r,init:c}}clone(){const t=this.constructor,n=new t(this.configuration);return n.middleware=this.middleware.slice(),n}constructor(t=we){this.configuration=t,this.fetchApi=async(n,r)=>{let s={url:n,init:r};for(const i of this.middleware)i.pre&&(s=await i.pre({fetch:this.fetchApi,...s})||s);let o;try{o=await(this.configuration.fetchApi||fetch)(s.url,s.init)}catch(i){for(const a of this.middleware)a.onError&&(o=await a.onError({fetch:this.fetchApi,url:s.url,init:s.init,error:i,response:o?o.clone():void 0})||o);if(o===void 0)throw i instanceof Error?new $a(i,"The request failed and the interceptors did not return an alternative response"):i}for(const i of this.middleware)i.post&&(o=await i.post({fetch:this.fetchApi,url:s.url,init:s.init,response:o.clone()})||o);return o},this.middleware=t.middleware}}Ee.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ya(e){return typeof Blob<"u"&&e instanceof Blob}function xa(e){return typeof FormData<"u"&&e instanceof FormData}class va extends Error{constructor(t,n){super(n),this.response=t,this.name="ResponseError"}}class $a extends Error{constructor(t,n){super(n),this.cause=t,this.name="FetchError"}}class z extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const Rn={csv:",",ssv:" ",tsv:" ",pipes:"|"};function b(e,t){const n=e[t];return n!=null}function so(e,t=""){return Object.keys(e).map(n=>oo(n,e[n],t)).filter(n=>n.length>0).join("&")}function oo(e,t,n=""){const r=n+(n.length?`[${e}]`:e);if(t instanceof Array){const s=t.map(o=>encodeURIComponent(String(o))).join(`&${encodeURIComponent(r)}=`);return`${encodeURIComponent(r)}=${s}`}if(t instanceof Set){const s=Array.from(t);return oo(e,s,n)}return t instanceof Date?`${encodeURIComponent(r)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?so(t,r):`${encodeURIComponent(r)}=${encodeURIComponent(String(t))}`}class N{async value(){return this.transformer(await this.raw.json())}constructor(t,n=r=>r){this.raw=t,this.transformer=n}}class Vt{async value(){}constructor(t){this.raw=t}}function Sa(e){return Ea(e)}function Ea(e,t){return e==null?e:{limit:e.limit,offset:e.offset,total_count:e.total_count}}function Q(e){return ka(e)}function ka(e,t){return e==null?e:{pagination:b(e,"pagination")?Sa(e.pagination):void 0}}const q={Webauthn:"webauthn",EmailLink:"email_link",SmsLink:"sms_link",OtpViaSms:"otp_via_sms",OtpViaEmail:"otp_via_email",Totp:"totp",Oidc:"oidc",Saml:"saml",Api:"api",DirectId:"direct_id",Password:"password",Impersonate:"impersonate"};function ee(e){return Ca(e)}function Ca(e,t){return e}function io(e){return e}function Ia(e){if(e!==void 0)return e===null?null:{method:e.method}}function te(e){return Ra(e)}function Ra(e,t){return e==null?e:{httpcode:b(e,"httpcode")?e.httpcode:void 0,message:b(e,"message")?e.message:void 0}}function Dn(e){return Da(e)}function Da(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0}}const K={Proxy:"proxy",WebauthnCreate:"webauthn_create",WebauthnGet:"webauthn_get",Nonce:"nonce",Otp:"otp",Oidc:"oidc",Saml:"saml",PasswordSet:"password_set",PasswordVerify:"password_verify",PasswordReset:"password_reset",TotpRegister:"totp_register",TotpVerify:"totp_verify"};function ne(e){return Ta(e)}function Ta(e,t){return e}function Aa(e){if(e!==void 0)return e===null?null:{challenge:e.challenge}}function Oa(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:Aa(e.data)}}function za(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function Pa(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:za(e.data)}}function La(e){if(e!==void 0)return e===null?null:{password:e.password}}function Na(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:La(e.data)}}function Ma(e){if(e!==void 0)return e===null?null:{password:e.password}}function Ua(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:Ma(e.data)}}function Fa(e){if(e!==void 0)return e===null?null:{password:e.password}}function Va(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:Fa(e.data)}}function Ba(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function qa(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:Ba(e.data)}}function Ha(e){if(e!==void 0)return e===null?null:{otp:e.otp}}function Ga(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:Ha(e.data)}}function Wa(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}function Ka(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}function Tn(e){if(e!==void 0){if(e===null)return null;switch(e.challenge_type){case"nonce":return Oa(e);case"otp":return Pa(e);case"password_reset":return Na(e);case"password_set":return Ua(e);case"password_verify":return Va(e);case"totp_register":return qa(e);case"totp_verify":return Ga(e);case"webauthn_create":return Wa(e);case"webauthn_get":return Ka(e);default:throw new Error(`No variant of Attestation exists with 'challenge_type=${e.challenge_type}'`)}}}const He={EmailAddress:"email_address",PhoneNumber:"phone_number"};function Ya(e){return Ja(e)}function Ja(e,t){return e}function ao(e){return ja(e)}function ja(e,t){return e==null?e:{type:Ya(e.type),value:e.value}}function jt(e){if(e!==void 0)return e===null?null:{type:e.type,value:e.value}}function Xa(e){return Za(e)}function Za(e,t){return e}function Qa(e){return ec(e)}function ec(e,t){return e==null?e:{challenge:b(e,"challenge")?e.challenge:void 0}}function tc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:b(e,"options")?Qa(e.options):void 0}}function nc(e){return rc(e)}function rc(e,t){return e==null?e:{auth_code_url:e.auth_code_url}}function sc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:nc(e.options)}}function oc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method)}}function ic(e){return ac(e)}function ac(e,t){return e}function cc(e){return dc(e)}function dc(e,t){return e}function uc(e){return lc(e)}function lc(e,t){return e==null?e:{name:Xa(e.name),pattern:e.pattern,match_type:ic(e.match_type),pattern_qualifiers:b(e,"pattern_qualifiers")?e.pattern_qualifiers.map(cc):void 0}}function co(e){return fc(e)}function fc(e,t){return e==null?e:{regular_expressions:b(e,"regular_expressions")?e.regular_expressions.map(uc):void 0}}function hc(e){return pc(e)}function pc(e,t){return e==null?e:{validation_rules:co(e.validation_rules)}}function gc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:hc(e.options)}}function mc(e){return _c(e)}function _c(e,t){return e==null?e:{validation_rules:co(e.validation_rules)}}function bc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:mc(e.options)}}function wc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method)}}function yc(e){return xc(e)}function xc(e,t){return e==null?e:{challenge_id:b(e,"challenge_id")?e.challenge_id:void 0}}function vc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:b(e,"options")?yc(e.options):void 0}}function $c(e){return Sc(e)}function Sc(e,t){return e==null?e:{start_authentication_url:e.start_authentication_url}}function Ec(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:$c(e.options)}}function kc(e){return Cc(e)}function Cc(e,t){return e==null?e:{key_uri:e.key_uri,qr_code_data_b64:e.qr_code_data_b64,recovery_codes:e.recovery_codes}}function Ic(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:b(e,"options")?kc(e.options):void 0}}function Rc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method)}}function Dc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:b(e,"options")?e.options:void 0}}function Tc(e,t){return e==null?e:{id:e.id,type:ne(e.type),authentication_method:ee(e.authentication_method),options:b(e,"options")?e.options:void 0}}function Ac(e){return Oc(e)}function Oc(e,t){if(e==null)return e;switch(e.type){case"nonce":return{...tc(e,!0),type:"nonce"};case"oidc":return{...sc(e,!0),type:"oidc"};case"otp":return{...oc(e,!0),type:"otp"};case"password_reset":return{...gc(e,!0),type:"password_reset"};case"password_set":return{...bc(e,!0),type:"password_set"};case"password_verify":return{...wc(e,!0),type:"password_verify"};case"proxy":return{...vc(e,!0),type:"proxy"};case"saml":return{...Ec(e,!0),type:"saml"};case"totp_register":return{...Ic(e,!0),type:"totp_register"};case"totp_verify":return{...Rc(e,!0),type:"totp_verify"};case"webauthn_create":return{...Dc(e,!0),type:"webauthn_create"};case"webauthn_get":return{...Tc(e,!0),type:"webauthn_get"};default:throw new Error(`No variant of ChallengeListInner exists with 'type=${e.type}'`)}}function zc(e){return Pc(e)}function Pc(e,t){return e}function Lc(e){if(e!==void 0)return e===null?null:{method:e.method}}function Nc(e){if(e!==void 0)return e===null?null:{method:e.method,redirect_target:e.redirect_target}}const Ge={AuthenticationSucceededV1:"AuthenticationSucceeded_v1",AuthenticationFailedV1:"AuthenticationFailed_v1",PersonCreatedV1:"PersonCreated_v1",PersonDeletedV1:"PersonDeleted_v1",VirtualPageLoadedV1:"VirtualPageLoaded_v1",SlashIdsdkLoadedV1:"SlashIDSDKLoaded_v1",PersonIdentifiedV1:"PersonIdentified_v1",PersonLoggedOutV1:"PersonLoggedOut_v1",TokenMintedV1:"TokenMinted_v1",PasswordChangedV1:"PasswordChanged_v1",GdprConsentsChangedV1:"GdprConsentsChanged_v1",GateServerStartedV1:"GateServerStarted_v1",GateRequestHandledV1:"GateRequestHandled_v1"};function Mc(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id,authenticated_methods:e.authenticated_methods===void 0?void 0:e.authenticated_methods.map(io),failed_authn_method:e.failed_authn_method,failure_reason:e.failure_reason,failure_detail:e.failure_detail,handle:jt(e.handle),challenge_id:e.challenge_id}}function Uc(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id,success_authn_method:e.success_authn_method,authenticated_methods:e.authenticated_methods.map(io),handle:jt(e.handle)}}function Fc(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function Vc(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function Bc(e){if(e!==void 0)return e===null?null:{event_name:e.event_name}}function qc(e){if(e!==void 0)return e===null?null:{event_name:e.event_name,person_id:e.person_id}}function Hc(e){if(e!==void 0){if(e===null)return null;switch(e.event_name){case"AuthenticationFailed_v1":return Mc(e);case"AuthenticationSucceeded_v1":return Uc(e);case"PersonIdentified_v1":return Fc(e);case"PersonLoggedOut_v1":return Vc(e);case"SlashIDSDKLoaded_v1":return Bc(e);case"VirtualPageLoaded_v1":return qc(e);default:throw new Error(`No variant of EventPostRequestEventData exists with 'event_name=${e.event_name}'`)}}}function Gr(e){if(e!==void 0)return e===null?null:{organization_id:e.organization_id,analytics_correlation_id:e.analytics_correlation_id,window_location:e.window_location,user_agent:e.user_agent,event_data:Hc(e.event_data)}}function Gc(e){return Wc(e)}function Wc(e,t){return e==null?e:{params:b(e,"params")?e.params:void 0,type:zc(e.type),label:b(e,"label")?e.label:void 0,id:e.id,last_used:b(e,"last_used")?new Date(e.last_used):void 0}}function Kc(e){if(e!==void 0)return e===null?null:{method:e.method}}const dt={Popup:"popup",Redirect:"redirect"};function Yc(e){if(e!==void 0)return e===null?null:{method:e.method,client_id:e.client_id,provider:e.provider,ux_mode:e.ux_mode,redirect_target:e.redirect_target,requires_groups:e.requires_groups,pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}function Jc(e){if(e!==void 0)return e===null?null:{method:e.method}}function jc(e){if(e!==void 0)return e===null?null:{method:e.method}}function Xc(e){if(e!==void 0)return e===null?null:{method:e.method}}const ut={Popup:"popup",Redirect:"redirect"};function Zc(e){if(e!==void 0)return e===null?null:{method:e.method,provider_credentials_id:e.provider_credentials_id,ux_mode:e.ux_mode,redirect_target:e.redirect_target,pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}function Qc(e){if(e!==void 0)return e===null?null:{method:e.method,redirect_target:e.redirect_target}}function ed(e){if(e!==void 0)return e===null?null:{method:e.method}}const td={None:"none",Indirect:"indirect",Direct:"direct"};const Wr={Any:"any",Platform:"platform",CrossPlatform:"cross_platform"};const nd={Discouraged:"discouraged",Preferred:"preferred",Required:"required"};const rd={Discouraged:"discouraged",Preferred:"preferred",Required:"required"};function sd(e){if(e!==void 0)return e===null?null:{method:e.method,scope:e.scope,available_credential_ids:e.available_credential_ids,attachment:e.attachment,user_verification:e.user_verification,resident_key:e.resident_key,attestation:e.attestation}}function od(e){if(e!==void 0){if(e===null)return null;switch(e.method){case"api":return Ia(e);case"direct_id":return Lc(e);case"email_link":return Nc(e);case"impersonate":return Kc(e);case"oidc":return Yc(e);case"otp_via_email":return Jc(e);case"otp_via_sms":return jc(e);case"password":return Xc(e);case"saml":return Zc(e);case"sms_link":return Qc(e);case"totp":return ed(e);case"webauthn":return sd(e);default:throw new Error(`No variant of FactorOptions exists with 'method=${e.method}'`)}}}function id(e){if(e!==void 0)return e===null?null:{method:e.method,options:od(e.options)}}function ad(e){return cd(e)}function cd(e,t){return e}function dd(e){return e}function ud(e){return ld(e)}function ld(e,t){return e==null?e:{consent_level:ad(e.consent_level),created_at:new Date(e.created_at)}}function Kr(e){if(e!==void 0)return e===null?null:{consent_levels:e.consent_levels.map(dd)}}function uo(e){return fd(e)}function fd(e,t){return e==null?e:{consents:e.consents.map(ud)}}function hd(e){return pd(e)}function pd(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?e.result:void 0}}function gd(e){return md(e)}function md(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?e.result:void 0}}function Yr(e){return _d(e)}function _d(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?e.result:void 0}}function An(e){return bd(e)}function bd(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?e.result:void 0}}function wd(e){return yd(e)}function yd(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?uo(e.result):void 0}}function xd(e){return vd(e)}function vd(e,t){return e==null?e:{id:e.id,org_name:e.org_name,tenant_name:e.tenant_name}}function $d(e){return Sd(e)}function Sd(e,t){return e==null?e:{id:e.id,org_name:e.org_name,tenant_name:e.tenant_name,managed_organizations:b(e,"managed_organizations")?e.managed_organizations.map(xd):void 0}}function Ed(e){return kd(e)}function kd(e,t){return e==null?e:{id:e.id,parent_id:b(e,"parent_id")?e.parent_id:void 0,name:b(e,"name")?e.name:void 0,tenant_name:b(e,"tenant_name")?e.tenant_name:void 0,children_ids:b(e,"children_ids")?e.children_ids:void 0,person_pool_orgs_ids:b(e,"person_pool_orgs_ids")?e.person_pool_orgs_ids:void 0,group_pool_orgs_ids:b(e,"group_pool_orgs_ids")?e.group_pool_orgs_ids:void 0,manager_org_id:b(e,"manager_org_id")?e.manager_org_id:void 0,person_in_manager_org:e.person_in_manager_org}}function Cd(e){return Id(e)}function Id(e,t){return e==null?e:{active:e.active,person_id:e.person_id,roles:b(e,"roles")?e.roles:void 0,region:e.region,handles:b(e,"handles")?e.handles.map(ao):void 0,groups:b(e,"groups")?e.groups:void 0,attributes:b(e,"attributes")?e.attributes:void 0}}function Rd(e){return Dd(e)}function Dd(e,t){return e==null?e:{person:Cd(e.person),organizations:e.organizations.map($d),org_hierarchy:e.org_hierarchy.map(Ed),handles:e.handles.map(ao),credentials:e.credentials.map(Gc)}}function Td(e){return Ad(e)}function Ad(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:Rd(e.result)}}function Od(e){if(e!==void 0)return e===null?null:{handle:jt(e.handle),factor:id(e.factor)}}function zd(e){return Pd(e)}function Pd(e,t){return e==null?e:{token:b(e,"token")?e.token:void 0,redirect_uri:b(e,"redirect_uri")?e.redirect_uri:void 0}}function Ld(e){return Nd(e)}function Nd(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?zd(e.result):void 0}}function Md(e){return Ud(e)}function Ud(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?e.result:void 0}}function On(e){return Fd(e)}function Fd(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?e.result.map(Ac):void 0}}function Vd(e){if(e!==void 0)return e===null?null:{challenge_id:e.challenge_id,code:e.code,pkce_code_verifier:e.pkce_code_verifier}}function Bd(e){return qd(e)}function qd(e,t){return e==null?e:{valid:e.valid,invalidity_reason:b(e,"invalidity_reason")?e.invalidity_reason:void 0,expires_in_seconds:b(e,"expires_in_seconds")?e.expires_in_seconds:void 0,expires_at:b(e,"expires_at")?new Date(e.expires_at):void 0}}function Hd(e){return Gd(e)}function Gd(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:b(e,"result")?Bd(e.result):void 0}}function Jr(e){return Wd(e)}function Wd(e,t){return e==null?e:{meta:b(e,"meta")?Q(e.meta):void 0,errors:b(e,"errors")?e.errors.map(te):void 0,result:uo(e.result)}}function Kd(e){if(e!==void 0)return e===null?null:{method:e.method}}function Yd(e){if(e!==void 0)return e===null?null:{handle:jt(e.handle),factor:Kd(e.factor)}}function Jd(e){if(e!==void 0)return e===null?null:{token:e.token}}class jr extends Ee{async deleteAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new z("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling deleteAttributesBucketName.");const r={};t.attributes&&(r.attributes=t.attributes.join(Rn.csv));const s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"DELETE",headers:s,query:r},n);return new N(o,i=>Dn(i))}async deleteAttributesBucketName(t,n){return await(await this.deleteAttributesBucketNameRaw(t,n)).value()}async getAttributesRaw(t,n){const r={};t.buckets&&(r.buckets=t.buckets.join(Rn.csv));const s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes",method:"GET",headers:s,query:r},n);return new N(o,i=>hd(i))}async getAttributes(t={},n){return await(await this.getAttributesRaw(t,n)).value()}async getAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new z("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling getAttributesBucketName.");const r={};t.attributes&&(r.attributes=t.attributes.join(Rn.csv));const s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"GET",headers:s,query:r},n);return new N(o,i=>gd(i))}async getAttributesBucketName(t,n){return await(await this.getAttributesBucketNameRaw(t,n)).value()}async putAttributesRaw(t,n){if(t.body===null||t.body===void 0)throw new z("body","Required parameter requestParameters.body was null or undefined when calling putAttributes.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes",method:"PUT",headers:s,query:r,body:t.body},n);return new N(o,i=>Dn(i))}async putAttributes(t,n){return await(await this.putAttributesRaw(t,n)).value()}async putAttributesBucketNameRaw(t,n){if(t.bucketName===null||t.bucketName===void 0)throw new z("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling putAttributesBucketName.");if(t.body===null||t.body===void 0)throw new z("body","Required parameter requestParameters.body was null or undefined when calling putAttributesBucketName.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attributes/{bucket_name}".replace("{bucket_name}",encodeURIComponent(String(t.bucketName))),method:"PUT",headers:s,query:r,body:t.body},n);return new N(o,i=>Dn(i))}async putAttributesBucketName(t,n){return await(await this.putAttributesBucketNameRaw(t,n)).value()}}class Ae extends Ee{async getChallengeChallengeIdRaw(t,n){if(t.challengeId===null||t.challengeId===void 0)throw new z("challengeId","Required parameter requestParameters.challengeId was null or undefined when calling getChallengeChallengeId.");const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/challenge/{challenge_id}".replace("{challenge_id}",encodeURIComponent(String(t.challengeId))),method:"GET",headers:s,query:r},n);return new N(o,i=>Yr(i))}async getChallengeChallengeId(t,n){return await(await this.getChallengeChallengeIdRaw(t,n)).value()}async getChallengeChallengeIdV2Raw(t,n){if(t.challengeId===null||t.challengeId===void 0)throw new z("challengeId","Required parameter requestParameters.challengeId was null or undefined when calling getChallengeChallengeIdV2.");const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/challenge/{challenge_id}/v2".replace("{challenge_id}",encodeURIComponent(String(t.challengeId))),method:"GET",headers:s,query:r},n);return new N(o,i=>An(i))}async getChallengeChallengeIdV2(t,n){return await(await this.getChallengeChallengeIdV2Raw(t,n)).value()}async getChallengePackChallengePackIdRaw(t,n){if(t.challengePackId===null||t.challengePackId===void 0)throw new z("challengePackId","Required parameter requestParameters.challengePackId was null or undefined when calling getChallengePackChallengePackId.");const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/challenge_pack/{challenge_pack_id}".replace("{challenge_pack_id}",encodeURIComponent(String(t.challengePackId))),method:"GET",headers:s,query:r},n);return new N(o,i=>On(i))}async getChallengePackChallengePackId(t,n){return await(await this.getChallengePackChallengePackIdRaw(t,n)).value()}async getMeRaw(t){const n={},r={};if(this.configuration&&this.configuration.accessToken){const o=this.configuration.accessToken,i=await o("Bearer",[]);i&&(r.Authorization=`Bearer ${i}`)}const s=await this.request({path:"/me",method:"GET",headers:r,query:n},t);return new N(s,o=>Td(o))}async getMe(t){return await(await this.getMeRaw(t)).value()}async getTokenRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new z("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling getToken.");const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(s["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/token",method:"GET",headers:s,query:r},n);return new N(o,i=>An(i))}async getToken(t,n){return await(await this.getTokenRaw(t,n)).value()}async postAttestationRaw(t,n){if(t.attestation===null||t.attestation===void 0)throw new z("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestation.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attestation",method:"POST",headers:s,query:r,body:Tn(t.attestation)},n);return new N(o,i=>Yr(i))}async postAttestation(t,n){return await(await this.postAttestationRaw(t,n)).value()}async postAttestationV2Raw(t,n){if(t.attestation===null||t.attestation===void 0)throw new z("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestationV2.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attestation/v2",method:"POST",headers:s,query:r,body:Tn(t.attestation)},n);return new N(o,i=>An(i))}async postAttestationV2(t,n){return await(await this.postAttestationV2Raw(t,n)).value()}async postAttestationV3Raw(t,n){if(t.attestation===null||t.attestation===void 0)throw new z("attestation","Required parameter requestParameters.attestation was null or undefined when calling postAttestationV3.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/attestation/v3",method:"POST",headers:s,query:r,body:Tn(t.attestation)},n);return new N(o,i=>Ld(i))}async postAttestationV3(t,n){return await(await this.postAttestationV3Raw(t,n)).value()}async postDirectIdRaw(t,n){const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/direct-id",method:"POST",headers:s,query:r},n);return new N(o,i=>Md(i))}async postDirectId(t={},n){return await(await this.postDirectIdRaw(t,n)).value()}async postIdRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new z("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postId.");if(t.iDRequest===null||t.iDRequest===void 0)throw new z("iDRequest","Required parameter requestParameters.iDRequest was null or undefined when calling postId.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(s["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/id",method:"POST",headers:s,query:r,body:Od(t.iDRequest)},n);return new N(o,i=>On(i))}async postId(t,n){return await(await this.postIdRaw(t,n)).value()}async postRecoverRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new z("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postRecover.");if(t.recoverRequest===null||t.recoverRequest===void 0)throw new z("recoverRequest","Required parameter requestParameters.recoverRequest was null or undefined when calling postRecover.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(s["SlashID-OrgID"]=String(t.slashIDOrgID)),t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/recover",method:"POST",headers:s,query:r,body:Yd(t.recoverRequest)},n);return new N(o,i=>On(i))}async postRecover(t,n){return await(await this.postRecoverRaw(t,n)).value()}async postSsoResolveRaw(t,n){if(t.slashIDOrgID===null||t.slashIDOrgID===void 0)throw new z("slashIDOrgID","Required parameter requestParameters.slashIDOrgID was null or undefined when calling postSsoResolve.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDOrgID!==void 0&&t.slashIDOrgID!==null&&(s["SlashID-OrgID"]=String(t.slashIDOrgID)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/sso/resolve",method:"POST",headers:s,query:r,body:Vd(t.postSsoResolveRequest)},n);return new Vt(o)}async postSsoResolve(t,n){await this.postSsoResolveRaw(t,n)}}class jd extends Ee{async postActionsSdkRaw(t,n){if(t.eventPostRequest===null||t.eventPostRequest===void 0)throw new z("eventPostRequest","Required parameter requestParameters.eventPostRequest was null or undefined when calling postActionsSdk.");const r={},s={};if(s["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/actions/sdk",method:"POST",headers:s,query:r,body:Gr(t.eventPostRequest)},n);return new Vt(o)}async postActionsSdk(t,n){await this.postActionsSdkRaw(t,n)}async postEventsRaw(t,n){if(t.eventPostRequest===null||t.eventPostRequest===void 0)throw new z("eventPostRequest","Required parameter requestParameters.eventPostRequest was null or undefined when calling postEvents.");const r={},s={};if(s["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/events",method:"POST",headers:s,query:r,body:Gr(t.eventPostRequest)},n);return new Vt(o)}async postEvents(t,n){await this.postEventsRaw(t,n)}}class Xr extends Ee{async deleteConsentGdprRaw(t,n){const r={};t.consentLevels&&(r.consent_levels=t.consentLevels),t.deleteAll!==void 0&&(r.deleteAll=t.deleteAll);const s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/consent/gdpr",method:"DELETE",headers:s,query:r},n);return new Vt(o)}async deleteConsentGdpr(t={},n){await this.deleteConsentGdprRaw(t,n)}async getConsentGdprRaw(t,n){const r={},s={};if(t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/consent/gdpr",method:"GET",headers:s,query:r},n);return new N(o,i=>wd(i))}async getConsentGdpr(t={},n){return await(await this.getConsentGdprRaw(t,n)).value()}async postConsentGdprRaw(t,n){if(t.gDPRConsentRequest===null||t.gDPRConsentRequest===void 0)throw new z("gDPRConsentRequest","Required parameter requestParameters.gDPRConsentRequest was null or undefined when calling postConsentGdpr.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/consent/gdpr",method:"POST",headers:s,query:r,body:Kr(t.gDPRConsentRequest)},n);return new N(o,i=>Jr(i))}async postConsentGdpr(t,n){return await(await this.postConsentGdprRaw(t,n)).value()}async putConsentGdprRaw(t,n){if(t.gDPRConsentRequest===null||t.gDPRConsentRequest===void 0)throw new z("gDPRConsentRequest","Required parameter requestParameters.gDPRConsentRequest was null or undefined when calling putConsentGdpr.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/consent/gdpr",method:"PUT",headers:s,query:r,body:Kr(t.gDPRConsentRequest)},n);return new N(o,i=>Jr(i))}async putConsentGdpr(t,n){return await(await this.putConsentGdprRaw(t,n)).value()}}class Zr extends Ee{async postTokenValidateRaw(t,n){if(t.validateTokenReq===null||t.validateTokenReq===void 0)throw new z("validateTokenReq","Required parameter requestParameters.validateTokenReq was null or undefined when calling postTokenValidate.");const r={},s={};if(s["Content-Type"]="application/json",t.slashIDSdkVersion!==void 0&&t.slashIDSdkVersion!==null&&(s["SlashID-SdkVersion"]=String(t.slashIDSdkVersion)),this.configuration&&this.configuration.accessToken){const i=this.configuration.accessToken,a=await i("Bearer",[]);a&&(s.Authorization=`Bearer ${a}`)}const o=await this.request({path:"/token/validate",method:"POST",headers:s,query:r,body:Jd(t.validateTokenReq)},n);return new N(o,i=>Hd(i))}async postTokenValidate(t,n){return await(await this.postTokenValidateRaw(t,n)).value()}}function Xd(){const n=window.screenX+(window.innerWidth-400)/2;return`width=400,height=600,top=${window.screenY+(window.innerHeight-600)/2},left=${n},resizable,scrollbars=yes,status=1`}function lo(){const e=Xd(),t=window.open(window.location.href,"/id:popup",e);if(!t)throw new Error("SlashId: Popup blocked, please consider redirect instead");const n='<div style="position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);">You will be redirected in a moment...</div>';try{var r;t==null||(r=t.document)===null||r===void 0||r.write(n)}catch(o){console.error(o),t.document&&t.document.body&&(t.document.body.innerHTML=n)}finally{t.blur()}return[t,o=>(t&&(t.location=o,t.focus()),t)]}function Zd(e,t){return e.origin+e.pathname===t.origin+t.pathname}function fo(e){let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"}var Ot,Qd=new Uint8Array(16);function eu(){if(!Ot&&(Ot=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ot))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ot(Qd)}var tu=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function nu(e){return typeof e=="string"&&tu.test(e)}var ru=nu,U=[];for(var zn=0;zn<256;++zn)U.push((zn+256).toString(16).substr(1));function su(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(U[e[t+0]]+U[e[t+1]]+U[e[t+2]]+U[e[t+3]]+"-"+U[e[t+4]]+U[e[t+5]]+"-"+U[e[t+6]]+U[e[t+7]]+"-"+U[e[t+8]]+U[e[t+9]]+"-"+U[e[t+10]]+U[e[t+11]]+U[e[t+12]]+U[e[t+13]]+U[e[t+14]]+U[e[t+15]]).toLowerCase();if(!ru(n))throw TypeError("Stringified UUID is invalid");return n}var ou=su;function iu(e,t,n){e=e||{};var r=e.random||(e.rng||eu)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=r[s];return t}return ou(r)}var We=iu;function Ve(e){const t=e.replace(/_/g,"/").replace(/-/g,"+"),n=atob(t);return Uint8Array.from(n,r=>r.charCodeAt(0))}function fe(e,t=!0){const n=String.fromCharCode(...e),r=btoa(n);return t?r.replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,""):r}const au="challenges",cu="sidcp",qn="@SLASHID/CSRF_TOKEN",Hn="@SLASHID/PKCE_CODE_VERIFIER";var Bt;(function(e){e[e.StorageGetItem=0]="StorageGetItem",e[e.StorageSetItem=1]="StorageSetItem",e[e.Ping=2]="Ping",e[e.ChallengeWebauthnCreate=3]="ChallengeWebauthnCreate",e[e.ChallengeWebauthnGet=4]="ChallengeWebauthnGet",e[e.SSOChallenge=5]="SSOChallenge"})(Bt||(Bt={}));class du{constructor(){this.id=bt(),this.type=2}}class Qr{constructor(t,n){this.id=t,this.error=n}}class uu{constructor(t,n){this.type=3,this.id=bt(),this.slashIDOptions=t,this.challenge=n}}class es{constructor(t,n,r){this.id=t,this.attestation=n,this.error=r}}class lu{constructor(t,n){this.type=4,this.id=bt(),this.slashIDOptions=t,this.challenge=n}}class ts{constructor(t,n,r){this.id=t,this.attestation=n,this.error=r}}class fu{constructor(t){this.type=0,this.id=bt(),this.key=t}}class ns{constructor(t,n,r){this.id=t,this.value=n,this.error=r}}class hu{constructor(t,n){this.id=bt(),this.type=1,this.key=t,this.value=n}}class rs{constructor(t,n){this.id=t,this.error=n}}function bt(){const e=new Uint32Array(1);return window.crypto.getRandomValues(e),e[0]}function ss(e){const t=new URLSearchParams(e),n=t.get("sso_challenge_id"),r=t.get("sso_code"),s=t.get("csrf_token");return!n||!r||!s?null:{ssoChallengeID:n,ssoCode:r,csrfToken:s}}function pu(e){return e.type===3}function gu(e){return e.type===4}function mu(e){return e&&e.type===5}function _u(e){return e.type===2}function bu(e){return typeof e=="object"&&!!e.baseURL&&!!e.sdkURL}const wu=["http:","https:"];function ho(e){if(!e)throw new TypeError("options cannot be null");if(e.environment){if(typeof e.environment=="string"&&e.environment!=="production"&&e.environment!=="sandbox")throw new TypeError("If 'environment' is set as a string, it must be either 'production' or 'sandbox'");if(typeof e.environment=="object"){if(typeof e.environment.baseURL!="string")throw new TypeError("'environment.baseURL' must be a string");if(typeof e.environment.sdkURL!="string")throw new TypeError("'environment.sdkURL' must be a string")}}if(e.environment&&(e.baseURL||e.sdkURL))throw new TypeError("If 'environment' is set, 'baseURL' and 'sdkURL' cannot be set at the same time. Use a custom environment instead.");if(e.baseURL){if(typeof e.baseURL!="string")throw new TypeError("'baseURL' must be a string");let r;try{r=new URL(e.baseURL)}catch{throw new TypeError("'baseURL' must be a valid URL")}if(wu.indexOf(r.protocol)===-1)throw new TypeError("'baseURL' must be either an http or https URL")}if(e.sdkURL){if(typeof e.sdkURL!="string")throw new TypeError("'sdkURL' must be a string");try{new URL(e.sdkURL)}catch{throw new TypeError("'sdkURL' must be a valid URL")}}const{analyticsEnabled:t=!0,oid:n}=e;if(t&&!n)throw new Error("Analytics require the 'oid' parameter to be set when instantiating SlashID()")}function yu(e){return e.environment?xu(e.environment):{baseURL:e.baseURL||Gn.production.baseURL,sdkURL:e.sdkURL||Gn.production.sdkURL}}const Gn={production:{baseURL:"https://api.slashid.com",sdkURL:"https://cdn.slashid.com/sdk.html"},sandbox:{baseURL:"https://api.sandbox.slashid.com",sdkURL:"https://cdn.sandbox.slashid.com/sdk.html"}};function xu(e){if(typeof e=="string")return Gn[e];if(bu(e))return{baseURL:e.baseURL,sdkURL:e.sdkURL};throw new TypeError("'environment' must be either a string or an object")}function Xt(e){const t=yu(e);var n;return{oid:e.oid,analyticsEnabled:(n=e.analyticsEnabled)!==null&&n!==void 0?n:!0,...t}}class po{constructor(t){this.getOTP=t?.getOTP}}async function go(){const e=We(),t=We()+We(),n=new TextEncoder().encode(t),r=await window.crypto.subtle.digest("SHA-256",n),s=fe(new Uint8Array(r));return window.localStorage.setItem(qn,e),window.localStorage.setItem(Hn,t),{csrf_token:e,pkce_code_challenge:s}}async function vu(e){if(e.method!=="oidc")throw new Error(`Can't create OIDC extras for method: ${e.method}`);let t={};const{client_id:n,provider:r}=e.options;let{ux_mode:s,redirect_target:o}=e.options;if(s||(s=dt.Popup),o||(o=window.location.href),s===dt.Redirect&&!fo(o))throw new Error(`If OIDC ux_mode was set to "redirect" a "redirect_target" is required, got ${o}`);if(s===dt.Popup){const[c,u]=lo();t={...t,popup:c,setPopupUrl:u}}const{csrf_token:i,pkce_code_challenge:a}=await go();return{...e,options:{...e.options,client_id:n,provider:r,ux_mode:s,redirect_target:o,csrf_token:i,pkce_code_challenge:a},extras:t}}async function $u(e){if(e.method!=="saml")throw new Error(`Can't create SAML extras for method: ${e.method}`);let t={},{ux_mode:n,redirect_target:r}=e.options;if(n||(n=ut.Popup),r||(r=window.location.href),n===ut.Redirect&&!fo(r))throw new Error(`If SAML ux_mode was set to "redirect" a "redirect_target" is required, got ${r}`);if(n===ut.Popup){const[i,a]=lo();t={...t,popup:i,setPopupUrl:a}}const{csrf_token:s,pkce_code_challenge:o}=await go();return{...e,options:{...e.options,ux_mode:n,redirect_target:r,csrf_token:s,pkce_code_challenge:o},extras:t}}function Wn(e){this.message=e}Wn.prototype=new Error,Wn.prototype.name="InvalidCharacterError";var os=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Wn("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)&&(i+=String.fromCharCode(255&n>>(-2*s&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function Su(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(os(n).replace(/(.)/g,function(r,s){var o=s.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return os(t)}}function qt(e){this.message=e}function Eu(e,t){if(typeof e!="string")throw new qt("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(Su(e.split(".")[n]))}catch(r){throw new qt("Invalid token specified: "+r.message)}}qt.prototype=new Error,qt.prototype.name="InvalidTokenError";var Pn=Eu;const ku={end_user_read_write:"end_user_read_write",end_user_read_only:"end_user_read_only",end_user_no_access:"end_user_no_access","person_pool-end_user_read_write":"person_pool-end_user_read_write","person_pool-end_user_read_only":"person_pool-end_user_read_only","person_pool-end_user_no_access":"person_pool-end_user_no_access"};class Cu{async get(t){const n=await this.user.getAttributesClient().getAttributesBucketName({bucketName:this.bucketName,attributes:t,slashIDSdkVersion:F.raw},{cache:"no-cache"}),r=n.errors;if(r)throw r;return n.result}async set(t){const r=(await this.user.getAttributesClient().putAttributesBucketName({bucketName:this.bucketName,body:t,slashIDSdkVersion:F.raw},{cache:"no-cache"})).errors;if(r)throw r}async delete(t){const r=(await this.user.getAttributesClient().deleteAttributesBucketName({bucketName:this.bucketName,slashIDSdkVersion:F.raw,attributes:t},{cache:"no-cache"})).errors;if(r)throw r}constructor({user:t,bucketName:n}){this.user=t,this.bucketName=n}}function Iu(e){return e?typeof e.user_token=="string":!1}class fr{initialize(t,n){try{t=JSON.parse(t)}catch{}if(typeof t!="string")throw new TypeError("token must be a string");try{const s=Pn(t);Iu(s)?(this._token=s.user_token,this._tokenContainer=t):this._token=t}catch(s){throw new TypeError(s.toString())}this._clientOptions=Xt(n??{});const r=new be({...we,...n?.baseURL&&{basePath:n.baseURL},accessToken:this._token});this._apiClient=new Ae(r),this._attrsClient=new jr(r),this._tokenClient=new Zr(r),this._personConsentsApi=new Xr(r)}updateToken(t){this.initialize(t,this._clientOptions)}get decoded(){if(!this._token)throw new Error("Cannot call methods on unauthenticated user");try{return Pn(this._token)}catch(t){throw new TypeError(t.toString())}}get tokenClaims(){return this.decoded}get decodedTokenContainer(){if(this._tokenContainer)try{return Pn(this._tokenContainer)}catch(t){throw new TypeError(t.toString())}}get tokenContainerClaims(){return this.decodedTokenContainer}updateClient(t){var n;this._token=t;const r=new be({...we,...((n=this._clientOptions)===null||n===void 0?void 0:n.baseURL)&&{basePath:this._clientOptions.baseURL},accessToken:t});this._apiClient=new Ae(r),this._attrsClient=new jr(r),this._tokenClient=new Zr(r),this._personConsentsApi=new Xr(r)}get ID(){return this.decoded.person_id}get token(){var t;return(t=this._token)!==null&&t!==void 0?t:""}get tokenContainer(){return this._tokenContainer||""}get oid(){return this.decoded.oid}get firstLogin(){return this.decoded.first_token}get authentication(){return this.decoded.authenticated_methods||[]}get authentications(){return this.decoded.authentications||[]}async createDirectID(){const{result:t}=await this._apiClient.postDirectId({slashIDSdkVersion:F.raw});return t}async logout(){this.updateClient(void 0),this._tokenContainer=void 0}async validateToken(){var t;const n=await((t=this._tokenClient)===null||t===void 0?void 0:t.postTokenValidate({validateTokenReq:{token:this.token},slashIDSdkVersion:F.raw},{cache:"no-cache"})),r=n.errors;if(r)throw r;return n.result}getGroups(){const t=this.decoded.groups_claim_name||"groups";return this.decoded[t]}getAttributesClient(){return this._attrsClient}getBucket(t=ku.end_user_read_write){return new Cu({user:this,bucketName:t})}async get(t){return this.getBucket().get(t)}async set(t){return this.getBucket().set(t)}async delete(t){return this.getBucket().delete(t)}async getGDPRConsent(){const t=await this._personConsentsApi.getConsentGdpr({slashIDSdkVersion:F.raw}),n=t.errors;if(n)throw n;return t.result}async setGDPRConsent({consentLevels:t}){const n=await this._personConsentsApi.putConsentGdpr({gDPRConsentRequest:{consent_levels:t},slashIDSdkVersion:F.raw}),r=n.errors;if(r)throw r;return n.result}async addGDPRConsent({consentLevels:t}){const n=await this._personConsentsApi.postConsentGdpr({gDPRConsentRequest:{consent_levels:t},slashIDSdkVersion:F.raw}),r=n.errors;if(r)throw r;return n.result}async removeGDPRConsent({consentLevels:t}){return this._personConsentsApi.deleteConsentGdpr({slashIDSdkVersion:F.raw,consentLevels:t})}async removeGDPRConsentAll(){return this._personConsentsApi.deleteConsentGdpr({slashIDSdkVersion:F.raw,deleteAll:!0})}async getOrganizations(){const t=await this._apiClient.getMe(),n=t.errors;if(n)throw n;return t.result.organizations}async getHandles(){const{errors:t,result:n}=await this._apiClient.getMe();if(t)throw t;return n.handles}async getTokenForOrganization(t){const n=await this._apiClient.getToken({slashIDOrgID:t,slashIDSdkVersion:F.raw}),r=n.errors;if(r)throw r;return n.result}toString(){var t,n;return(n=(t=this._tokenContainer)!==null&&t!==void 0?t:this._token)!==null&&n!==void 0?n:""}toJSON(){var t,n;return`${(n=(t=this._tokenContainer)!==null&&t!==void 0?t:this._token)!==null&&n!==void 0?n:""}`}constructor(t,n){this.initialize(t,n)}}var O={};P(O,"InvalidAuthenticationMethodError",function(){return De});P(O,"isResponseError",function(){return Ne});P(O,"isSlashIDError",function(){return wt});P(O,"RESPONSE_HEADERS",function(){return mo});P(O,"serialiseResponseError",function(){return _o});P(O,"isRateLimitError",function(){return pr});P(O,"isTimeoutError",function(){return bo});P(O,"isBadPasskeyScopeError",function(){return wo});P(O,"isPasskeyPromptError",function(){return yo});P(O,"isThrownResponse",function(){return Ht});P(O,"isTimeoutInPayload",function(){return xo});P(O,"isRateLimitInPayload",function(){return vo});P(O,"isOIDCPopupBlockedError",function(){return $o});P(O,"isNetworkError",function(){return So});P(O,"RateLimitError",function(){return ft});P(O,"clientGeneratedErrorSlugs",function(){return Eo});P(O,"isClientGeneratedErrorSlug",function(){return Ru});P(O,"SlashIDError",function(){return Te});P(O,"toSlashIDError",function(){return ko});P(O,"ensureError",function(){return Du});P(O,"getErrorMessage",function(){return gr});P(O,"createEventFromError",function(){return Co});class De extends Error{constructor(t,n){super(`Authentication method '${t}': ${n}`)}}const Zt=async e=>{var t,n,r,s,o,i,a;if(Ne(e))return(a=(n=(await e.response.clone().json()).errors)===null||n===void 0||(t=n[0])===null||t===void 0?void 0:t.message)!==null&&a!==void 0?a:e.message;var c;return wt(e)?(c=(i=e.context.response)===null||i===void 0||(o=i.body)===null||o===void 0||(s=o.errors)===null||s===void 0||(r=s[0])===null||r===void 0?void 0:r.message)!==null&&c!==void 0?c:e.message:e instanceof Error?e.message:""},hr=e=>{var t,n;return Ne(e)?e.response.status:wt(e)?(t=e.context.response)===null||t===void 0?void 0:t.status:(n=e.response)===null||n===void 0?void 0:n.status};function Ne(e){return e.name==="ResponseError"&&e.response instanceof Response}const mo={SlashIDCorrelationID:"slashid-correlation-id"},_o=async e=>({status:e.response.status,statusText:e.response.statusText,url:e.response.url,type:e.response.type,ok:e.response.ok,redirected:e.response.redirected,headers:Object.fromEntries(e.response.headers),body:JSON.stringify(await e.response.clone().json(),null,2)});function pr(e){return hr(e)===429}async function bo(e){const t=hr(e),n=await Zt(e);return(t===401||t===403)&&n==="authentication has expired"}async function wo(e){const t=/selected scope '(.*?)' is not equal to or a registrable domain suffix of origin '(.*?)'/,n=hr(e),r=await Zt(e);return n===400&&t.test(r)}async function yo(e){const t=/The operation either timed out or was not allowed. See: https:\/\/www.w3.org\/TR\/webauthn-2\/#sctn-privacy-considerations-client./,n=/This request has been cancelled by the user./,r=/The operation was aborted./,s=/Operation failed./,o=/The WebAuthn API is not available in the current environment/,i=/An unknown error occurred while talking to the credential manager./,a=await Zt(e);return e instanceof Error&&(t.test(a)||n.test(a)||r.test(a)||s.test(a)||o.test(a)||i.test(a))}function Ht(e){return typeof e=="object"&&Array.isArray(e.errors)&&e.errors.every(t=>typeof t.httpcode=="number"&&typeof t.message=="string")}function xo(e){return e.errors.some(t=>t.message==="authentication has expired")}function vo(e){return e.errors.some(t=>t.httpcode===429)}async function $o(e){const t=/Popup blocked, please consider redirect instead/,n=await Zt(e);return e instanceof DOMException&&t.test(n)}function So(e,t){return e instanceof TypeError&&!t}class ft extends Error{static async fromResponseError(t){const r=(await t.response.clone().json()).errors.find(s=>s.httpcode===429);return r?new ft(t,r.message):new ft(t)}constructor(t,n){super(n||"Too many requests!"),this.name="RateLimitError",this.response=t.response}}const Eo=["incorrect_otp_code_via_email","incorrect_otp_code_via_sms","incorrect_otp_code","invalid_password","incorrect_password","recovery_failed","passkey_bad_scope","passkey_prompt_failed","oidc_popup_blocked","rate_limit_exceeded","timeout","client_side_error","unspecified"],Ru=e=>Eo.includes(e);class Te extends Error{static fromError(t,n){return new Te({name:t.name,message:t.message,context:n,cause:t})}constructor({name:t="SlashIDError",message:n="An error occured in @slashid/slashid",context:r={},cause:s}){super(n,{cause:s}),this.name=t,this.context=r}}function wt(e){return e instanceof Te}async function ko(e){if(e instanceof Error){if(Ne(e)){const r=await _o(e);return Te.fromError(e,{response:r,correlationId:r.headers[mo.SlashIDCorrelationID]})}return Te.fromError(e)}let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch{}const n=new Error(`Non-Error thrown: ${t}`);return Te.fromError(n)}function Du(e){if(e instanceof Error)return e;let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch{}return new Error(`Non-Error thrown: ${t}`)}async function gr(e){return(wt(e)?e:await ko(e)).message}async function Co(e,{authenticationFactor:t,handle:n,previousToken:r,challengeId:s}){const o=await(async()=>{if(await yo(e))return"passkey_prompt_failed";if(await $o(e))return"oidc_popup_blocked";if(!wt(e)&&!Ne(e)&&!Ht(e))return null;if(pr(e))return"rate_limit_exceeded";if(await bo(e))return"timeout";if(await wo(e))return"passkey_bad_scope";if(Ht(e)){if(xo(e))return"timeout";if(vo(e))return"rate_limit_exceeded"}return"unspecified"})();return{authenticationFactor:t,handle:n,errorText:o||"client_side_error",previousToken:r,challengeId:s,failureDetail:await gr(e)}}function Ke(e){return new Promise(t=>setTimeout(t,e))}async function is(){const e=document.hasFocus();for(;!e&&!document.hasFocus();)await Ke(50);return e}const as={PopupBlocked:"Popup blocked",BadOAuthURL:"Bad OAuth sign in URL"},cs={PopupBlocked:"Popup blocked",BadAuthURL:"Bad authentication URL"};function Tu(e){return e.errorText==="client_side_error"}const Au=["otpSmsSent","otpCodeSent","otpIncorrectCodeSubmitted","passwordSetReady","passwordResetReady","passwordVerifyReady","invalidPasswordSubmitted","incorrectPasswordSubmitted","oauthFlowStarted","oauthFlowFailed","userAuthenticatedFromURL","idFlowSucceeded","idFlowStarted","idFlowFailed","recoveryFlowStarted","recoveryFlowSucceeded","recoveryFlowFailed","webAuthnChallengeProcessed","redirectUriDiscovered"],Ou=["otpCodeSubmitted","passwordSubmitted"],zu=["clientSideError"];function ds(e){return Au.includes(e)}function Pu(e){return Ou.includes(e)}function Ln(e){return zu.includes(e)}function Lu(){const e=new Map;function t(r){function s(o){r(o.payload)}return e.set(r,s),s}function n(r){if(e.has(r))return e.get(r)}return{decorate:t,getDecorator:n}}async function Kn(e){return new Promise(async(n,r)=>{const s=new du;let o=!1;const i=a=>{const c=a.data;c.id===s.id&&(window.removeEventListener("message",i),c.error?r(c.error):(o=!0,n(e)))};for(window.addEventListener("message",i);!o;)e.postMessage(s,"*"),await Ke(50)})}class Nu{async getRemoteWindow(){var t;const n=(t=this.remote)===null||t===void 0?void 0:t.contentWindow;if(!n)throw new Error("this context has no remote");return this.remoteReady||(await Kn(n),this.remoteReady=!0),n}async processEvent(t){let n=null;if(window.parent&&t.source===window.parent&&(n=window.parent),!!n)switch(t.data.type){case Bt.StorageGetItem:{const r=t.data;try{const s=await this.localGetItem(r.key);n.postMessage(new ns(t.data.id,s),"*")}catch(s){n.postMessage(new ns(t.data.id,null,s),"*")}}break;case Bt.StorageSetItem:{const r=t.data;try{await this.localSetItem(r.key,r.value),n.postMessage(new rs(t.data.id),"*")}catch(s){n.postMessage(new rs(t.data.id,s),"*")}}break}}async localGetItem(t){return window.localStorage.getItem(t)}async remoteGetItem(t){let n=null;return this.remote&&(n=await new Promise((r,s)=>{const o=new fu(t),i=a=>{const c=a.data;c.id===o.id&&(window.removeEventListener("message",i),c.error?s(c.error):r(c.value))};window.addEventListener("message",i),this.getRemoteWindow().then(a=>{a.postMessage(o,"*")})})),n}async localSetItem(t,n){return window.localStorage.setItem(t,n)}async remoteSetItem(t,n){this.remote&&await new Promise((r,s)=>{const o=new hu(t,n),i=a=>{const c=a.data;c.id===o.id&&(window.removeEventListener("message",i),c.error?s(c.error):r())};window.addEventListener("message",i),this.getRemoteWindow().then(a=>{a.postMessage(o,"*")})})}constructor(t,n){this.remoteReady=!1,this.remote=t,this.remoteOrigin=n,this.remote||window.addEventListener("message",this.processEvent.bind(this))}}class Io{constructor(t){this.store=t}}class ae extends Io{stringify(t){return JSON.stringify(t)}parse(t){return t?JSON.parse(t):[]}async getAll(){const t=this.parse(await this.store.localGetItem(ae.LOCAL_STORAGE_IDENTIFIERS_KEY)),n=this.parse(await this.store.remoteGetItem(ae.LOCAL_STORAGE_IDENTIFIERS_KEY));return ae.merge(t,n)}async add(t){const n=await this.getAll(),r=this.stringify(ae.merge(n,[t]));await this.store.localSetItem(ae.LOCAL_STORAGE_IDENTIFIERS_KEY,r),await this.store.remoteSetItem(ae.LOCAL_STORAGE_IDENTIFIERS_KEY,r)}static identifiersEqual(t,n){return t.type===n.type&&t.value===n.value}static merge(t,n){return t.concat(...n).reduce((r,s)=>{for(const o of r)if(ae.identifiersEqual(o,s))return r;return r.push(s),r},[])}}ae.LOCAL_STORAGE_IDENTIFIERS_KEY="SLASHID_IDENTIFIERS";class Qt extends Io{static identifiersEqual(t,n){return t===n}static merge(t,n){return t.concat(...n).reduce((r,s)=>{for(const o of r)if(Qt.identifiersEqual(o,s))return r;return r.push(s),r},[])}}class pe extends Qt{stringify(t){return JSON.stringify(t)}parse(t){if(!t)return[];let n=null;try{n=JSON.parse(t)}catch{return[t]}return Array.isArray(n)?n.filter(s=>typeof s=="string"):[]}async getAll(){const t=this.parse(await this.store.localGetItem(pe.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY)),n=this.parse(await this.store.remoteGetItem(pe.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY));return pe.merge(t,n)}async add(t){const n=await this.getAll(),r=this.stringify(pe.merge(n,[t]));await this.store.localSetItem(pe.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY,r),await this.store.remoteSetItem(pe.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY,r)}}pe.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY="SLASHID_WEBAUTHN_CREDENTIAL_ID";class ht extends Qt{stringify(t){return JSON.stringify(t)}parse(t){if(!t)return{};let n=null;try{n=JSON.parse(t)}catch{return{}}if(typeof n!="object")return{};const r={};for(const s of Object.keys(n)){if(typeof s!="string"||!Array.isArray(n[s]))continue;const o=n[s].filter(i=>typeof i=="string");r[s]=o}return r}async getAll(){return this.parse(await this.store.localGetItem(ht.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2))}async get(t){return!this.store.remoteOrigin||this.store.remoteOrigin.endsWith(t)?this.v1Storage.getAll():(await this.getAll())[t]||[]}async add(t,n){if(!this.store.remoteOrigin||this.store.remoteOrigin.endsWith(t)){this.v1Storage.add(n);return}const r=await this.getAll(),s=r[t]||[];for(const i of s)if(i===n){console.warn(`Attempted to add already present credential ID: scope=${t} credId=${n}`);return}s.push(n),r[t]=s;const o=this.stringify(r);await this.store.localSetItem(ht.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2,o)}constructor(t){super(t),this.v1Storage=new pe(t)}}ht.LOCAL_STORAGE_WEBAUTHN_CREDENTIAL_ID_KEY_V2="SLASHID_WEBAUTHN_CREDENTIAL_ID_V2";class Mu extends fr{async mfa(t,n){let r;if(!t)throw new Error("at least one of PersonHandle or Factor is required");t.type&&t.value&&(r=t),t.method&&(n=t);const s=await this._slashid._id(this.decoded.oid,r,n,this._token);this.updateToken(s.toString())}constructor(t,n){super(t,n),this._slashid=n instanceof Gt?n:new Gt(n)}}const Uu=/firefox|fxios|deno/i,Fu=(e,t)=>({sendEvent:async n=>{try{await e(`${t.baseURL}/actions/sdk`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(r){console.error("@slashid/slashid-sdk: failed to send event",{error:r,event:n})}}}),Vu=(e,t)=>({sendEvent:async n=>{const r=Uu.test(navigator.userAgent);try{await e(`${t.baseURL}/actions/sdk`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!r})}catch(s){console.error("@slashid/slashid-sdk: failed to send event",{error:s,event:n})}}});class Bu{createCorrelationID(){return We()}createEventMetadata({location:t,userAgent:n}={location:"/",userAgent:""}){var r,s,o;return{organization_id:(o=(s=this.config.oid)!==null&&s!==void 0?s:(r=this.user)===null||r===void 0?void 0:r.oid)!==null&&o!==void 0?o:"",analytics_correlation_id:this.correlationId,window_location:t,user_agent:n}}sendEvent(t){this.transport.sendEvent(t)}trackPersonIdentified({user:t}){const n={event_name:Ge.PersonIdentifiedV1,person_id:t.ID},r={...this.createEventMetadata(),event_data:n};this.sendEvent(r)}trackPersonLoggedOut(t){const n=new fr(t.token,this.config),r={event_name:Ge.PersonLoggedOutV1,person_id:n.ID},s={...this.createEventMetadata(),event_data:r};this.sendEvent(s)}identify(t){this.user=t,this.trackPersonIdentified({user:t})}logout(){const t=this.user;t&&(this.trackPersonLoggedOut({token:t.token}),this.user=void 0)}trackVirtualPageView(t){const{url:n=""}=t,r={event_name:Ge.VirtualPageLoadedV1};var s;const o={...this.createEventMetadata({location:n,userAgent:(s=t.userAgent)!==null&&s!==void 0?s:""}),event_data:r};this.sendEvent(o)}constructor({options:t,user:n,transport:r}){t&&ho(t),this.config=Xt(t??{}),this.transport=r??Fu(fetch,this.config),this.eventsAPI=new jd(new be({...we,basePath:this.config.baseURL})),this.user=n,this.correlationId=this.createCorrelationID()}}class qu extends Bu{createCorrelationID(){const t="@slashid/EVENTS_CORRELATION_ID";try{const r=sessionStorage.getItem(t);if(r)return r}catch{}const n=We();try{sessionStorage.setItem(t,n)}catch{}return n}createEventMetadata({location:t,userAgent:n}={location:window.location.href,userAgent:navigator.userAgent}){return super.createEventMetadata({location:t,userAgent:n})}subscribeToDomainEvents(){this.sdk.subscribe("idFlowSucceeded",n=>this.trackAuthenticationSuccess(n)),this.sdk.subscribe("idFlowFailed",n=>this.trackAuthenticationFailure(n)),this.sdk.subscribe("invalidPasswordSubmitted",n=>this.trackAuthenticationFailure({...n,errorText:"invalid_password"})),this.sdk.subscribe("incorrectPasswordSubmitted",n=>this.trackAuthenticationFailure({...n,errorText:"incorrect_password"})),this.sdk.subscribe("otpIncorrectCodeSubmitted",n=>{var r;const s=(()=>{var o,i;return((o=n.factor)===null||o===void 0?void 0:o.method)==="otp_via_email"?"incorrect_otp_code_via_email":((i=n.factor)===null||i===void 0?void 0:i.method)==="otp_via_sms"?"incorrect_otp_code_via_sms":"incorrect_otp_code"})();this.trackAuthenticationFailure({errorText:s,authenticationFactor:{method:(r=n.factor)===null||r===void 0?void 0:r.method},challengeId:n.challengeId})}),Oo(this.sdk).subscribe("clientSideError",n=>{this.trackAuthenticationFailure({...n,errorText:"client_side_error"})})}trackAuthenticationSuccess(t){var n;const r=this.sdk.getUser(t.token);this.identify(r);const s={event_name:Ge.AuthenticationSucceededV1,person_id:r.ID,success_authn_method:(n=t.authenticationFactor)===null||n===void 0?void 0:n.method,authenticated_methods:r.authentication,...t.handle&&{handle:t.handle}},o={...this.createEventMetadata(),event_data:s};this.sendEvent(o)}trackAuthenticationFailure(t){var n;const r=t.previousToken?this.sdk.getUser(t.previousToken):void 0,s={event_name:Ge.AuthenticationFailedV1,failed_authn_method:(n=t.authenticationFactor)===null||n===void 0?void 0:n.method,authenticated_methods:r?.authentication,failure_reason:t.errorText,...t.handle&&{handle:t.handle},...t.challengeId&&{challenge_id:t.challengeId},...t.failureDetail&&{failure_detail:t.failureDetail}},o={...this.createEventMetadata(),event_data:s};this.sendEvent(o)}trackSdkLoaded(){const t={...this.createEventMetadata(),event_data:{event_name:Ge.SlashIdsdkLoadedV1}};this.sendEvent(t)}trackVirtualPageView(t){const{url:n=window.location.href,userAgent:r=navigator.userAgent}=t;super.trackVirtualPageView({url:n,userAgent:r})}constructor({sdk:t,user:n}){const r={oid:t.oid,baseURL:t.baseURL,sdkURL:t.sdkURL,analyticsEnabled:!0},s=Xt(r);super({options:r,user:n,transport:Vu(fetch,s)}),this.sdk=t,this.subscribeToDomainEvents(),this.trackSdkLoaded()}}function Hu(e){var t;const n=(t=e.pattern_qualifiers)===null||t===void 0?void 0:t.reduce((s,o)=>o==="case_insensitive"?s+"i":s,"");return new RegExp(e.pattern,n)}function us(e){const t=e.options.validation_rules.regular_expressions;return t?t.map(r=>{const s=Hu(r);return{type:"regex",name:r.name,regexp:s,matchType:r.match_type}}):[]}function ls({password:e,rules:t}){const n=[];return t.forEach(r=>{const s=r.regexp.test(e);(s&&r.matchType==="must_not_match"||!s&&r.matchType==="must_match")&&n.push(r)}),n.length===0?{valid:!0,failedRules:[]}:{valid:!1,failedRules:n}}const Ro="SlashID-SdkRetryCount";function Gu(e){if(!e.headers)return 0;const n=new Headers(e.headers).get(Ro);return n?parseInt(n):0}function pt({baseDelayMs:e,maxRetries:t}){return{onError:async({error:n,response:r,url:s,init:o,fetch:i})=>{if(So(n,r)){const a=Gu(o);return a>=t?r:(await Ke(Math.pow(2,a)*e),await i(s,{...o,headers:{...o.headers,[Ro]:`${a+1}`}}))}return r}}}class lt{updateClient(t){this.authnClient=new Ae(new be({...we,basePath:this.slashID.baseURL,middleware:[pt({maxRetries:5,baseDelayMs:500})],...t&&{accessToken:t}}))}async processChallenges({challenges:t,authnFactor:n,previousToken:r}){this.updateClient(r);let s;for(const o of t)s=await this.process(o,n);if(!s)throw new Error("no user token in attestation response");return s}async process(t,n){var r;let s;switch(t.type){case K.Proxy:return this.processProxyChallenge(t);case K.Nonce:s=await this.processNonceChallenge(t);break;case K.Otp:{const c=new po(n?.options);s=await this.processOTPChallenge(t,c);break}case K.WebauthnGet:s=await this.processWebAuthnGetChallenge(t);break;case K.WebauthnCreate:s=await this.processWebAuthnCreateChallenge(t);break;case K.Oidc:return this.processOIDCChallenge(t,n);case K.Saml:return this.processSAMLChallenge(t,n);case K.PasswordSet:s=await this.processPasswordSetChallenge(t);break;case K.PasswordVerify:s=await this.processPasswordVerifyChallenge(t);break;case K.PasswordReset:s=await this.processPasswordResetChallenge(t);break;default:throw new Error("unhandled challenge type: "+t.toString())}let o;try{o=await this.authnClient.postAttestationV3({attestation:s,slashIDSdkVersion:F.raw},{cache:"no-cache"})}catch(c){if(Ne(c))o=await c.response.json();else throw c}if((c=>typeof c=="object"&&typeof c.result=="object"&&typeof c.result.redirect_uri=="string")(o)&&((r=o.result)===null||r===void 0?void 0:r.redirect_uri)!==void 0){const{redirect_uri:c}=o.result;typeof c=="string"&&c&&this.emitter.emit({name:"redirectUriDiscovered",payload:{redirectUri:c},meta:{access:"public"}})}if(Ht(o)&&o.errors.length){if(o.errors[0].httpcode===400&&t.type===K.PasswordSet)return this.notifySlashID("invalidPasswordSubmitted",{failedRules:[],authenticationFactor:n,challengeId:t.id,failureDetail:o.errors[0].message}),this.process(t,n);if(o.errors[0].httpcode===401&&t.type===K.PasswordVerify)return this.notifySlashID("incorrectPasswordSubmitted",{authenticationFactor:n,challengeId:t.id,failureDetail:o.errors[0].message}),this.process(t,n);if(o.errors[0].httpcode===401&&t.type===K.Otp)return this.notifySlashID("otpIncorrectCodeSubmitted",{factor:n,challengeId:t.id}),this.process(t,n);throw o}const a=o.result.token;if(!a)throw new Error("no user token in attestation response");if(t.type===K.WebauthnCreate){const c=t.options;this.slashID.credentialStorage.add(c.rp.id,s.data.rawId)}return a}async processProxyChallenge(t){let n;for(;!n;){await Ke(1e3);const r=await this.authnClient.getChallengeChallengeIdV2({challengeId:t.options.challenge_id,slashIDSdkVersion:F.raw},{cache:"no-cache"});if(r.errors&&(r.errors.length!==1||r.errors[0].httpcode!==202))throw r;n=r.result}return n}async processNonceChallenge(t){var n;return{challenge_id:t.id,challenge_type:t.type,data:{challenge:(n=t.options)===null||n===void 0?void 0:n.challenge}}}shouldProcessEvent(t){var n,r,s,o;return!t.meta||!t.meta.authFlowId&&!t.meta.recoveryFlowId?!0:!(!((n=this.flowMeta)===null||n===void 0)&&n.authFlowId&&((r=t.meta)===null||r===void 0?void 0:r.authFlowId)!==this.flowMeta.authFlowId||!((s=this.flowMeta)===null||s===void 0)&&s.recoveryFlowId&&((o=t.meta)===null||o===void 0?void 0:o.recoveryFlowId)!==this.flowMeta.recoveryFlowId)}async processOTPChallenge(t,n){this.notifySlashID("otpSmsSent"),this.notifySlashID("otpCodeSent");const r=new Promise(i=>{const a=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("otpCodeSubmitted",a),i(c.payload))};this.emitter.on("otpCodeSubmitted",a)});typeof n.getOTP=="function"&&n.getOTP().then(i=>this.notifySlashID("otpCodeSubmitted",i));const s=await r;if(!s)throw new Error("no OTP code provided");return{challenge_id:t.id,challenge_type:t.type,data:{otp:s}}}async processWebAuthnGetChallenge(t){const n=await is(),r=t.options;if(this.slashID.isLocalScope(r.rpId)){const s={challenge:Ve(r.challenge),extensions:r.extensions,rpId:r.rpId,timeout:r.timeout,userVerification:r.userVerification},o=r.allowCredentials;if(o){s.allowCredentials=new Array(o.length);for(let f=0;f<o.length;f++){const d=o[f];s.allowCredentials[f]={id:Ve(d.id),type:d.type,transports:d.transports}}}const i=await navigator.credentials.get({publicKey:s});if(!i)throw new Error("could not create assert credential");const a=i.response,c=fe(new Uint8Array(i.rawId)),u={id:i.id,rawId:c,type:i.type,clientExtensionResults:i.getClientExtensionResults(),response:{clientDataJSON:fe(new Uint8Array(a.clientDataJSON)),authenticatorData:fe(new Uint8Array(a.authenticatorData)),signature:fe(new Uint8Array(a.signature)),userHandle:a.userHandle?fe(new Uint8Array(a.userHandle)):null}},m={challenge_id:t.id,challenge_type:t.type,data:u};return this.notifySlashID("webAuthnChallengeProcessed",{credentialId:c}),m}else{const s=this.slashID.getSDKUrl();let o;if(await Gt.canGetPublicKeyCredentialsInIFrame()){if(o=this.slashID.iframe.contentWindow,!o)throw new Error("cannot get global id iframe")}else if(n||await Ke(200),o=window.open(s.toString()),!o)throw new Error("cannot open global id window");return new Promise((a,c)=>{const u=new lu({baseURL:this.slashID.baseURL,sdkURL:this.slashID.sdkURL},t),m=f=>{const d=f.data;d.id===u.id&&(o.close(),window.removeEventListener("message",m),d.error?c(d.error):a(d.attestation))};window.addEventListener("message",m),Kn(o).then(f=>{f.postMessage(u,s.origin)})})}}async processWebAuthnCreateChallenge(t){const n=await is(),r=t.options;if(this.slashID.isLocalScope(r.rp.id)){const s={challenge:Ve(r.challenge),rp:r.rp,user:{id:Ve(r.user.id),name:r.user.name,displayName:r.user.displayName},pubKeyCredParams:r.pubKeyCredParams,authenticatorSelection:r.authenticatorSelection,timeout:r.timeout,extensions:r.extensions,attestation:r.attestation},o=r.excludeCredentials;if(o){s.excludeCredentials=new Array(o.length);for(let f=0;f<o.length;f++){const d=o[f];s.excludeCredentials[f]={id:Ve(d.id),type:d.type,transports:d.transports}}}const i=await navigator.credentials.create({publicKey:s});if(!i)throw new Error("cannot create credential");const a=i.response,c=fe(new Uint8Array(i.rawId)),u={id:i.id,rawId:c,type:i.type,clientExtensionResults:i.getClientExtensionResults(),response:{attestationObject:fe(new Uint8Array(a.attestationObject)),clientDataJSON:fe(new Uint8Array(a.clientDataJSON))}},m={challenge_id:t.id,challenge_type:t.type,data:u};return this.notifySlashID("webAuthnChallengeProcessed",{credentialId:c}),m}else return n||await Ke(200),new Promise((o,i)=>{const a=this.slashID.getSDKUrl(),c=window.open(a.toString());if(!c){i(new Error("cannot open global id window"));return}const u=new uu({baseURL:this.slashID.baseURL,sdkURL:this.slashID.sdkURL},t),m=f=>{const d=f.data;d.id===u.id&&(c.close(),window.removeEventListener("message",m),d.error?i(d.error):o(d.attestation))};window.addEventListener("message",m),Kn(c).then(f=>{f.postMessage(u,a.origin)})})}async processOIDCChallenge(t,n){if(n.options.ux_mode===dt.Popup){var r;const o=n.extras.setPopupUrl(t.options.auth_code_url);if(!(!(t==null||(r=t.options)===null||r===void 0)&&r.auth_code_url)){var s;throw this.notifySlashID("oauthFlowFailed",{...n.options,reason:as.BadOAuthURL}),new Error(`Bad OAuth URL - got ${t==null||(s=t.options)===null||s===void 0?void 0:s.auth_code_url}`)}if(!o)throw this.notifySlashID("oauthFlowFailed",{...n.options,reason:as.PopupBlocked}),new Error("OIDC flow unsuccesful!")}else if(n.options.ux_mode===dt.Redirect)window.location.assign(t.options.auth_code_url);else throw new Error(`Unsupported OAuth ux_mode - got ${n.options.ux_mode}`);return this.notifySlashID("oauthFlowStarted",n.options),""}async processSAMLChallenge(t,n){if(n.options.ux_mode===ut.Popup){var r;const o=n.extras.setPopupUrl(t.options.start_authentication_url);if(!(!(t==null||(r=t.options)===null||r===void 0)&&r.start_authentication_url)){var s;throw this.notifySlashID("popupFailed",{reason:cs.BadAuthURL}),new Error(`Bad authentication URL - got ${t==null||(s=t.options)===null||s===void 0?void 0:s.start_authentication_url}`)}if(!o)throw this.notifySlashID("popupFailed",{reason:cs.PopupBlocked}),new Error("SAML flow unsuccesful!")}else if(n.options.ux_mode===ut.Redirect)window.location.assign(t.options.start_authentication_url);else throw new Error(`Unsupported SAML ux_mode - got ${n.options.ux_mode}`);return""}async processPasswordSetChallenge(t){this.notifySlashID("passwordSetReady");const r=await new Promise(i=>{const a=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("passwordSubmitted",a),i(c.payload))};this.emitter.on("passwordSubmitted",a)}),s=ls({password:r,rules:us(t)});return s.valid?{challenge_id:t.id,challenge_type:t.type,data:{password:r}}:(this.notifySlashID("invalidPasswordSubmitted",{failedRules:s.failedRules,challengeId:t.id,failureDetail:`invalid_password: ${s.failedRules.map(i=>i.name).join(",")}`}),await this.processPasswordSetChallenge(t))}processPasswordVerifyChallenge(t){return this.notifySlashID("passwordVerifyReady"),new Promise(r=>{const s=o=>{this.shouldProcessEvent(o)&&(this.emitter.off("passwordSubmitted",s),r(o.payload))};this.emitter.on("passwordSubmitted",s)}).then(r=>{if(!r)throw new Error("No password provided");return{challenge_id:t.id,challenge_type:t.type,data:{password:r}}})}async processPasswordResetChallenge(t){this.notifySlashID("passwordResetReady");const r=await new Promise(i=>{const a=c=>{this.shouldProcessEvent(c)&&(this.emitter.off("passwordSubmitted",a),i(c.payload))};this.emitter.on("passwordSubmitted",a)}),s=ls({password:r,rules:us(t)});return s.valid?{challenge_id:t.id,challenge_type:t.type,data:{password:r}}:(this.notifySlashID("invalidPasswordSubmitted",{failedRules:s.failedRules,challengeId:t.id,failureDetail:`invalid_password: ${s.failedRules.map(i=>i.name).join(",")}`}),await this.processPasswordSetChallenge(t))}constructor(t,n,r){this.notifySlashID=(s,o)=>{this.emitter.emit({name:s,payload:o,meta:{access:"public",...this.flowMeta}})},this.slashID=t,this.authnClient=new Ae(new be({...we,basePath:this.slashID.baseURL,middleware:[pt({maxRetries:5,baseDelayMs:500})]})),this.emitter=n,this.flowMeta=r}}class fs{shouldProcessEvent(t){var n;return!(this.flowId&&((n=t.meta)===null||n===void 0?void 0:n.authFlowId)!==this.flowId)}async id(t,n,r){return this._id(t,n,r)}async _id(t,n,r,s){if(r)switch(r.method){case q.Webauthn.toString():{if(!(navigator&&window.PublicKeyCredential))throw new De(q.Webauthn,"The WebAuthn API is not available in the current environment");let f=r.options;f||(f={}),f.scope||(f.scope=window.location.hostname);const d=await this.slashID.credentialStorage.get(f.scope);if(d&&(f.available_credential_ids=d),f.attachment||(f.attachment=Wr.Any),f.user_verification||(f.user_verification=rd.Preferred),f.resident_key||(f.resident_key=nd.Preferred),f.attestation||(f.attestation=td.None),f.attachment===Wr.Platform&&!await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable())throw new De(q.Webauthn,`This device has no authenticator available with attachment '${f.attachment}'`);r.options=f}break;case q.EmailLink.toString():case q.OtpViaEmail.toString():if(n&&n.type!==He.EmailAddress)throw new De(r.method,`A handle of type '${He.EmailAddress}' is required, got '${n.type}' instead`);break;case q.SmsLink.toString():case q.OtpViaSms.toString():if(n&&n.type!==He.PhoneNumber)throw new De(r.method,`A handle of type '${He.PhoneNumber}' is required, got '${n.type}' instead`);r.options=new po(r.options);break;case q.Oidc.toString():{if(n)throw new De(r.method,"OIDC should not be used with handles");r=await vu(r);const f=d=>{var l,h;if(!this.shouldProcessEvent(d))return;const g=r;!(g==null||(l=g.extras)===null||l===void 0)&&l.popup&&(g==null||(h=g.extras)===null||h===void 0||h.popup.close()),this.emitter.off("oauthFlowFailed",f)};this.emitter.on("oauthFlowFailed",f)}break;case q.Saml.toString():{if(n)throw new De(r.method,"SAML should not be used with handles");r=await $u(r);const f=d=>{var l,h;if(!this.shouldProcessEvent(d))return;const g=r;!(g==null||(l=g.extras)===null||l===void 0)&&l.popup&&(g==null||(h=g.extras)===null||h===void 0||h.popup.close()),this.emitter.off("popupFailed",f)};this.emitter.on("popupFailed",f)}break}const o={method:r?.method,options:r?.options};o.method!==void 0&&(o.options={...o.options,method:o.method}),this.emitter.emit({name:"idFlowStarted",payload:{authenticationFactor:r},meta:{authFlowId:this.flowId,access:"public"}});const a=await new Ae(new be({...we,basePath:this.slashID.baseURL,middleware:[pt({maxRetries:5,baseDelayMs:500})],...s&&{accessToken:s}})).postId({slashIDOrgID:t,slashIDSdkVersion:F.raw,iDRequest:{handle:n,factor:o}},{cache:"no-cache"});if(a.errors)throw a;const c=a.result;if(!c)throw new Error("no challenges in ID response");const m=await new lt(this.slashID,this.emitter,{authFlowId:this.flowId}).processChallenges({challenges:c,authnFactor:r,previousToken:s});if(n)try{this.slashID.identifiersStorage.add(n)}catch(f){console.warn(f)}return this.emitter.emit({name:"idFlowSucceeded",payload:{token:`${m}`,authenticationFactor:r,handle:n},meta:{authFlowId:this.flowId,access:"public"}}),this.slashID.getUser(m)}async recover({handle:t,factor:n}){const r=new Ae(new be({...we,basePath:this.slashID.baseURL,middleware:[pt({maxRetries:5,baseDelayMs:500})]})),{result:s}=await r.postRecover({recoverRequest:{handle:t,factor:n},slashIDSdkVersion:F.raw,slashIDOrgID:this.slashID.oid});if(!s)throw new Error("no result in recover response");await new lt(this.slashID,this.emitter,{recoveryFlowId:this.flowId}).processChallenges({challenges:s,authnFactor:n})}constructor(t,n){this.slashID=t,this.flowId=We(),this.emitter=n}}function Wu(){const e={},t=new Set;function n(i,a){e[i]||(e[i]=new Set),e[i].add(a)}function r(i,a){const c=e[i];c&&c.delete(a)}function s(i){const a=e[i.name];if(!a||!a.size)return;let c=!1;const u=t.size>0?[...t].reduce((m,f)=>c?m:f(m,()=>{c=!0})||m,i):i;c||a.forEach(m=>m(u))}function o(i){t.add(i)}return{on:n,off:r,emit:s,use:o}}const hs="__SlashID_iframe",Do=Symbol(),To=Symbol(),Ao=Symbol(),Oo=e=>({publish:(t,n)=>e[Do](t,n),subscribe:(t,n)=>e[To](t,n),unsubscribe:(t,n)=>e[Ao](t,n)});class Gt{getAnalytics(){if(!this.analytics)throw new Error("Analytics has to be enabled and oid has to be set to use this method");return this.analytics}static async canGetPublicKeyCredentialsInIFrame(){const t=window;return!!t.chrome&&(!!t.chrome.webstore||!!t.chrome.runtime)}createFlowScopeMiddleware(){const t=this;return function(r,s){var o,i,a,c;return r.meta&&r.meta.authFlowId&&(!((o=t.authFlow)===null||o===void 0)&&o.flowId)&&((i=t.authFlow)===null||i===void 0?void 0:i.flowId)!==r.meta.authFlowId||r.meta&&r.meta.recoveryFlowId&&(!((a=t.recoveryFlow)===null||a===void 0)&&a.flowId)&&((c=t.recoveryFlow)===null||c===void 0?void 0:c.flowId)!==r.meta.recoveryFlowId?s():r}}publish(t,n){var r,s;if(!Pu(t))throw new Error(`Unsupported event name: ${t}`);this.emitter.emit({name:t,payload:n,meta:{access:"public",authFlowId:(r=this.authFlow)===null||r===void 0?void 0:r.flowId,recoveryFlowId:(s=this.recoveryFlow)===null||s===void 0?void 0:s.flowId}})}[Do](t,n){var r,s;if(!Ln(t))throw new Error(`Unsupported event name: ${t}`);this.emitter.emit({name:t,payload:n,meta:{access:"private",authFlowId:(r=this.authFlow)===null||r===void 0?void 0:r.flowId,recoveryFlowId:(s=this.recoveryFlow)===null||s===void 0?void 0:s.flowId}})}subscribe(t,n){if(!ds(t))throw new Error(`Unsupported event name: ${t}`);const r=this.emitterDecoratorFactory.decorate(n);this.emitter.on(t,r)}[To](t,n){if(!Ln(t))throw new Error(`Unsupported event name: ${t}`);const r=this.emitterDecoratorFactory.decorate(n);this.emitter.on(t,r)}unsubscribe(t,n){if(!ds(t))throw new Error(`Unsupported event name: ${t}`);const r=this.emitterDecoratorFactory.getDecorator(n);r&&this.emitter.off(t,r)}[Ao](t,n){if(!Ln(t))throw new Error(`Unsupported event name: ${t}`);const r=this.emitterDecoratorFactory.getDecorator(n);r&&this.emitter.off(t,r)}async getChallengesFromURL(){const t=window.location.search,n=new URLSearchParams(t);let r;const s=n.get(cu),o=n.get(au);if(s&&o)throw new Error("found both 'challenges' and 'sidcp' URL query parameters");if(s){const i=await this.authnClient.getChallengePackChallengePackId({challengePackId:s,slashIDSdkVersion:F.raw},{cache:"no-cache"});if(i.errors)throw i;r=i.result}else if(o){const i=Ve(o),a=new TextDecoder("utf-8").decode(i);r=JSON.parse(a)}return r}async getUserFromURL(){if(!this.urlChallengesUser){let n;try{n=await this.getChallengesFromURL()}catch(r){throw await this.processError(r,{}),r}if(n){var t;const r=ss(window.location.search);r&&this.resolveSSOChallenge(r);let s;try{s=await new lt(this,this.emitter).processChallenges({challenges:n})}catch(o){throw await this.processError(o,{}),o}if(this.urlChallengesUser=new fr(s,{baseURL:this.baseURL,sdkURL:this.sdkURL}),!((t=this.urlChallengesUser.authentications)===null||t===void 0)&&t.length){const o=this.urlChallengesUser.authentications[this.urlChallengesUser.authentications.length-1];this.emitter.emit({name:"idFlowSucceeded",payload:{token:s,authenticationFactor:{method:o.method},handle:o.handle},meta:{access:"public"}})}}}return this.urlChallengesUser&&this.emitter.emit({name:"userAuthenticatedFromURL",payload:{token:this.urlChallengesUser.token},meta:{access:"public"}}),this.urlChallengesUser}async resolveSSOChallenge({ssoChallengeID:t,ssoCode:n,csrfToken:r}){if(!(!t||!n||!r))try{const s=window.localStorage.getItem(qn);if(!s)throw new Error("no CSRF token stored");if(r!==s)throw new Error("CSRF token mismatch");const o=window.localStorage.getItem(Hn);if(!o)throw new Error("no PKCE code verifier stored");await this.authnClient.postSsoResolve({slashIDOrgID:this.oid,postSsoResolveRequest:{challenge_id:t,code:n,pkce_code_verifier:o}})}catch(s){this.processError(s,{})}finally{window.localStorage.removeItem(qn),window.localStorage.removeItem(Hn)}}async processEvent(t){if(mu(t.data)){if(t.origin!==this.baseURL)return;const r=ss(t.data.urlParams);r&&await this.resolveSSOChallenge(r);return}let n=null;if(window.opener&&t.source===window.opener&&(n=window.opener),window.parent&&t.source===window.parent&&(n=window.parent),!!n){if(_u(t.data)){const r=t.data;try{n.postMessage(new Qr(r.id),"*")}catch(s){n.postMessage(new Qr(r.id,s.toString()),"*")}}if(pu(t.data)){const r=t.data;try{const o=await new lt(this,this.emitter).processWebAuthnCreateChallenge(r.challenge);n.postMessage(new es(r.id,o),"*")}catch(s){n.postMessage(new es(r.id,null,s.toString()),"*")}}if(gu(t.data)){const r=t.data;try{const o=await new lt(this,this.emitter).processWebAuthnGetChallenge(r.challenge);n.postMessage(new ts(r.id,o),"*")}catch(s){n.postMessage(new ts(r.id,null,s.toString()),"*")}}}}async listenForEvents(){window.addEventListener("message",this.processEvent.bind(this))}setupIFrame(){const t=this.getSDKUrl().toString();if(Zd(new URL(window.location.href),new URL(this.sdkURL)))return null;let n=document.getElementById(hs);return n&&n.src!==t&&(n.remove(),n=null),n||(n=document.createElement("iframe"),n.id=hs,n.allow="publickey-credentials-get *",n.src=t,n.style.display="none",document.body.appendChild(n)),n}async getAvailableAuthenticationMethods(t){const n=[q.Password];switch(t){case He.EmailAddress:n.push(q.EmailLink,q.OtpViaEmail);break;case He.PhoneNumber:n.push(q.SmsLink,q.OtpViaSms);break;default:throw new Error(`unhandled handle type: ${t}`)}return navigator&&window.PublicKeyCredential&&n.unshift(q.Webauthn),n}getUser(t){return new Mu(t,this)}async id(t,n,r){return this._id(t,n,r)}createAuthFlow(){const t=new fs(this,this.emitter);return this.authFlow=t,t}clearAuthFlow(t){this.authFlow===t&&(this.authFlow=null)}createRecoveryFlow(){const t=new fs(this,this.emitter);return this.recoveryFlow=t,t}clearRecoveryFlow(t){this.recoveryFlow===t&&(this.recoveryFlow=null)}async _id(t,n,r,s){const o=this.createAuthFlow();try{return await o._id(t,n,r,s)}catch(i){throw await this.processError(i,{authenticationFactor:r,handle:n,previousToken:s}),Ne(i)&&pr(i)?await ft.fromResponseError(i):i}finally{this.clearAuthFlow(o)}}async getAvailableIdentifiers(){try{return this.identifiersStorage.getAll()}catch(t){return console.warn(t),[]}}async recover({handle:t,factor:n}){if(!this.oid)throw new Error("oid is required - please initialize the SDK with an organization ID");const r=this.createRecoveryFlow();this.emitter.emit({name:"recoveryFlowStarted",payload:{handle:t,authenticationFactor:n},meta:{access:"public",recoveryFlowId:r.flowId}});try{await r.recover({handle:t,factor:n}),this.recoveryFlow=null,this.emitter.emit({name:"recoveryFlowSucceeded",payload:{handle:t,authenticationFactor:n},meta:{access:"public",recoveryFlowId:r.flowId}})}catch(s){const o=await gr(s),i={errorText:"recovery_failed",authenticationFactor:n,handle:t,failureDetail:o};throw this.emitter.emit({name:"recoveryFlowFailed",payload:i,meta:{access:"public",recoveryFlowId:r.flowId}}),s}finally{this.clearRecoveryFlow(r)}}getSDKUrl(){const t=new URL(this.sdkURL);return t.searchParams.append("v",F.raw),t}isLocalScope(t){return window.location.hostname.endsWith(t)}async processError(t,{authenticationFactor:n,handle:r,previousToken:s,challengeId:o}){var i,a;const c=await Co(t,{authenticationFactor:n,handle:r,previousToken:s,challengeId:o});Tu(c)?Oo(this).publish("clientSideError",c):this.emitter.emit({name:"idFlowFailed",payload:c,meta:{access:"public",authFlowId:(i=this.authFlow)===null||i===void 0?void 0:i.flowId,recoveryFlowId:(a=this.recoveryFlow)===null||a===void 0?void 0:a.flowId}})}constructor(t){t&&ho(t);const{baseURL:n,sdkURL:r,oid:s,analyticsEnabled:o=!0}=Xt(t??{});this.baseURL=n,this.sdkURL=r,this.oid=s,this.authFlow=null,this.recoveryFlow=null,this.authnClient=new Ae(new be({...we,basePath:this.baseURL,middleware:[pt({maxRetries:5,baseDelayMs:500})]})),this.iframe=this.setupIFrame();const i=new Nu(this.iframe,this.getSDKUrl().origin);this.identifiersStorage=new ae(i),this.credentialStorage=new ht(i),this.urlChallengesUser=null,this.emitter=Wu(),this.emitter.use(this.createFlowScopeMiddleware()),this.emitterDecoratorFactory=Lu(),this.analytics=o?new qu({sdk:this}):void 0,this.listenForEvents()}}qe("lDZ5d");({...O});({...O});const zo=Object.prototype.toString;function mr(e){switch(zo.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Oe(e,Error)}}function Ze(e,t){return zo.call(e)===`[object ${t}]`}function _r(e){return Ze(e,"ErrorEvent")}function ps(e){return Ze(e,"DOMError")}function Ku(e){return Ze(e,"DOMException")}function me(e){return Ze(e,"String")}function br(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function wr(e){return e===null||br(e)||typeof e!="object"&&typeof e!="function"}function Je(e){return Ze(e,"Object")}function en(e){return typeof Event<"u"&&Oe(e,Event)}function Yu(e){return typeof Element<"u"&&Oe(e,Element)}function Ju(e){return Ze(e,"RegExp")}function tn(e){return!!(e&&e.then&&typeof e.then=="function")}function ju(e){return Je(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Xu(e){return typeof e=="number"&&e!==e}function Oe(e,t){try{return e instanceof t}catch{return!1}}function Po(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Ye(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function gs(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{Po(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Zu(e,t,n=!1){return me(e)?Ju(t)?t.test(e):me(t)?n?e===t:e.includes(t):!1:!1}function nn(e,t=[],n=!1){return t.some(r=>Zu(e,r,n))}function Qu(e,t,n=250,r,s,o,i){if(!o.exception||!o.exception.values||!i||!Oe(i.originalException,Error))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=el(Yn(e,t,s,i.originalException,r,o.exception.values,a,0),n))}function Yn(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(Oe(r[s],Error)){ms(i,a);const u=e(t,r[s]),m=c.length;_s(u,s,m,a),c=Yn(e,t,n,r[s],s,[u,...c],u,m)}return Array.isArray(r.errors)&&r.errors.forEach((u,m)=>{if(Oe(u,Error)){ms(i,a);const f=e(t,u),d=c.length;_s(f,`errors[${m}]`,d,a),c=Yn(e,t,n,u,s,[f,...c],f,d)}}),c}function ms(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function _s(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function el(e,t){return e.map(n=>(n.value&&(n.value=Ye(n.value,t)),n))}function zt(e){return e&&e.Math==Math?e:void 0}const C=typeof globalThis=="object"&&zt(globalThis)||typeof window=="object"&&zt(window)||typeof self=="object"&&zt(self)||typeof global=="object"&&zt(global)||function(){return this}()||{};function yr(){return C}function Lo(e,t,n){const r=n||C,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const xr=yr(),tl=80;function No(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const m=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||tl;for(;n&&o++<r&&(u=nl(n,m),!(u==="html"||o>1&&i+s.length*c+u.length>=f));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function nl(e,t){const n=e,r=[];let s,o,i,a,c;if(!n||!n.tagName)return"";if(xr.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(f=>n.getAttribute(f)).map(f=>[f,n.getAttribute(f)]):null;if(u&&u.length)u.forEach(f=>{r.push(`[${f[0]}="${f[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&me(s))for(o=s.split(/\s+/),c=0;c<o.length;c++)r.push(`.${o[c]}`);const m=["aria-label","type","name","title","alt"];for(c=0;c<m.length;c++)i=m[c],a=n.getAttribute(i),a&&r.push(`[${i}="${a}"]`);return r.join("")}function rl(){try{return xr.document.location.href}catch{return""}}function sl(e){if(!xr.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const yt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ol="Sentry Logger ",Jn=["debug","info","warn","error","log","assert","trace"],Wt={};function rn(e){if(!("console"in C))return e();const t=C.console,n={},r=Object.keys(Wt);r.forEach(s=>{const o=Wt[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function il(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return yt?Jn.forEach(n=>{t[n]=(...r)=>{e&&rn(()=>{C.console[n](`${ol}[${n}]:`,...r)})}}):Jn.forEach(n=>{t[n]=()=>{}}),t}const w=il(),al=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function cl(e){return e==="http"||e==="https"}function Qe(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function dl(e){const t=al.exec(e);if(!t){rn(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o,i="",a]=t.slice(1);let c="",u=a;const m=u.split("/");if(m.length>1&&(c=m.slice(0,-1).join("/"),u=m.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return Mo({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Mo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ul(e){if(!yt)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(w.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?cl(r)?t&&isNaN(parseInt(t,10))?(w.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(w.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(w.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Uo(e){const t=typeof e=="string"?dl(e):Mo(e);if(!(!t||!ul(t)))return t}class ce extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function V(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&Fo(s,r),e[t]=s}function gt(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{yt&&w.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Fo(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,gt(e,"__sentry_original__",t)}catch{}}function vr(e){return e.__sentry_original__}function ll(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Vo(e){if(mr(e))return{message:e.message,name:e.name,stack:e.stack,...ws(e)};if(en(e)){const t={type:e.type,target:bs(e.target),currentTarget:bs(e.currentTarget),...ws(e)};return typeof CustomEvent<"u"&&Oe(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function bs(e){try{return Yu(e)?No(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ws(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function fl(e,t=40){const n=Object.keys(Vo(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Ye(n[0],t);for(let r=n.length;r>0;r--){const s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:Ye(s,t)}return""}function ge(e){return jn(e,new Map)}function jn(e,t){if(hl(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=jn(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(jn(s,t))}),r}return e}function hl(e){if(!Je(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Bo=50,ys=/\(error: (.*)\)/,xs=/captureMessage|captureException/;function qo(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const s=[],o=n.split(`
10
+ `);for(let i=r;i<o.length;i++){const a=o[i];if(a.length>1024)continue;const c=ys.test(a)?a.replace(ys,"$1"):a;if(!c.match(/\S*Error: /)){for(const u of t){const m=u(c);if(m){s.push(m);break}}if(s.length>=Bo)break}}return gl(s)}}function pl(e){return Array.isArray(e)?qo(...e):e}function gl(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),xs.test(t[t.length-1].function||"")&&(t.pop(),xs.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Bo).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const Nn="<anonymous>";function Se(e){try{return!e||typeof e!="function"?Nn:e.name||Nn}catch{return Nn}}const Ft={},vs={};function Me(e,t){Ft[e]=Ft[e]||[],Ft[e].push(t)}function Ue(e,t){vs[e]||(t(),vs[e]=!0)}function se(e,t){const n=e&&Ft[e];if(n)for(const r of n)try{r(t)}catch(s){yt&&w.error(`Error while triggering instrumentation handler.
11
+ Type: ${e}
12
+ Name: ${Se(r)}
13
+ Error:`,s)}}function ml(e){const t="console";Me(t,e),Ue(t,_l)}function _l(){"console"in C&&Jn.forEach(function(e){e in C.console&&V(C.console,e,function(t){return Wt[e]=t,function(...n){se("console",{args:n,level:e});const s=Wt[e];s&&s.apply(C.console,n)}})})}function Z(){const e=C,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Ho(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function $e(e){const{message:t,event_id:n}=e;if(t)return t;const r=Ho(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Xn(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function mt(e,t){const n=Ho(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s&&s.data,...t.data};n.mechanism.data=o}}function $s(e){if(e&&e.__sentry_captured__)return!0;try{gt(e,"__sentry_captured__",!0)}catch{}return!1}function Go(e){return Array.isArray(e)?e:[e]}const Be=C,bl=1e3;let Ss,Zn,Qn;function wl(e){const t="dom";Me(t,e),Ue(t,yl)}function yl(){if(!Be.document)return;const e=se.bind(null,"dom"),t=Es(e,!0);Be.document.addEventListener("click",t,!1),Be.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=Be[n]&&Be[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(V(r,"addEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},m=u[o]=u[o]||{refCount:0};if(!m.handler){const f=Es(e);m.handler=f,s.call(this,o,f,a)}m.refCount++}catch{}return s.call(this,o,i,a)}}),V(r,"removeEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},m=u[o];m&&(m.refCount--,m.refCount<=0&&(s.call(this,o,m.handler,a),m.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,i,a)}}))})}function xl(e){if(e.type!==Zn)return!1;try{if(!e.target||e.target._sentryId!==Qn)return!1}catch{}return!0}function vl(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Es(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=$l(n);if(vl(n.type,r))return;gt(n,"_sentryCaptured",!0),r&&!r._sentryId&&gt(r,"_sentryId",Z());const s=n.type==="keypress"?"input":n.type;xl(n)||(e({event:n,name:s,global:t}),Zn=n.type,Qn=r?r._sentryId:void 0),clearTimeout(Ss),Ss=Be.setTimeout(()=>{Qn=void 0,Zn=void 0},bl)}}function $l(e){try{return e.target}catch{return null}}const er=yr();function Wo(){if(!("fetch"in er))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function tr(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Sl(){if(typeof EdgeRuntime=="string")return!0;if(!Wo())return!1;if(tr(er.fetch))return!0;let e=!1;const t=er.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=tr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){yt&&w.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function El(e){const t="fetch";Me(t,e),Ue(t,kl)}function kl(){Sl()&&V(C,"fetch",function(e){return function(...t){const{method:n,url:r}=Cl(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return se("fetch",{...s}),e.apply(C,t).then(o=>{const i={...s,endTimestamp:Date.now(),response:o};return se("fetch",i),o},o=>{const i={...s,endTimestamp:Date.now(),error:o};throw se("fetch",i),o})}})}function nr(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ks(e){return typeof e=="string"?e:e?nr(e,"url")?e.url:e.toString?e.toString():"":""}function Cl(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:ks(n),method:nr(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:ks(t),method:nr(t,"method")?String(t.method).toUpperCase():"GET"}}let Pt=null;function Il(e){const t="error";Me(t,e),Ue(t,Rl)}function Rl(){Pt=C.onerror,C.onerror=function(e,t,n,r,s){return se("error",{column:r,error:s,line:n,msg:e,url:t}),Pt&&!Pt.__SENTRY_LOADER__?Pt.apply(this,arguments):!1},C.onerror.__SENTRY_INSTRUMENTED__=!0}let Lt=null;function Dl(e){const t="unhandledrejection";Me(t,e),Ue(t,Tl)}function Tl(){Lt=C.onunhandledrejection,C.onunhandledrejection=function(e){return se("unhandledrejection",e),Lt&&!Lt.__SENTRY_LOADER__?Lt.apply(this,arguments):!0},C.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Nt=yr();function Al(){const e=Nt.chrome,t=e&&e.app&&e.app.runtime,n="history"in Nt&&!!Nt.history.pushState&&!!Nt.history.replaceState;return!t&&n}const ot=C;let Mt;function Ko(e){const t="history";Me(t,e),Ue(t,Ol)}function Ol(){if(!Al())return;const e=ot.onpopstate;ot.onpopstate=function(...n){const r=ot.location.href,s=Mt;if(Mt=r,se("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const o=Mt,i=String(s);Mt=i,se("history",{from:o,to:i})}return n.apply(this,r)}}V(ot.history,"pushState",t),V(ot.history,"replaceState",t)}const zl=C,at="__sentry_xhr_v3__";function Pl(e){const t="xhr";Me(t,e),Ue(t,Ll)}function Ll(){if(!zl.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;V(e,"open",function(t){return function(...n){const r=Date.now(),s=me(n[0])?n[0].toUpperCase():void 0,o=Nl(n[1]);if(!s||!o)return t.apply(this,n);this[at]={method:s,url:o,request_headers:{}},s==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const a=this[at];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,o],endTimestamp:Date.now(),startTimestamp:r,xhr:this};se("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?V(this,"onreadystatechange",function(a){return function(...c){return i(),a.apply(this,c)}}):this.addEventListener("readystatechange",i),V(this,"setRequestHeader",function(a){return function(...c){const[u,m]=c,f=this[at];return f&&me(u)&&me(m)&&(f.request_headers[u.toLowerCase()]=m),a.apply(this,c)}}),t.apply(this,n)}}),V(e,"send",function(t){return function(...n){const r=this[at];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return se("xhr",s),t.apply(this,n)}})}function Nl(e){if(me(e))return e;try{return e.toString()}catch{}}function Ml(){return"npm"}function Ul(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let o=0;o<t.length;o++)if(t[o]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let o=0;o<t.length;o++)if(t[o]===s){t.splice(o,1);break}}return[n,r]}function ve(e,t=100,n=1/0){try{return rr("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Yo(e,t=3,n=100*1024){const r=ve(e,t);return ql(r)>n?Yo(e,t-1,n):r}function rr(e,t,n=1/0,r=1/0,s=Ul()){const[o,i]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!Xu(t))return t;const a=Fl(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const l=u.toJSON();return rr("",l,c-1,r,s)}catch{}const m=Array.isArray(t)?[]:{};let f=0;const d=Vo(t);for(const l in d){if(!Object.prototype.hasOwnProperty.call(d,l))continue;if(f>=r){m[l]="[MaxProperties ~]";break}const h=d[l];m[l]=rr(l,h,c-1,r,s),f++}return i(t),m}function Fl(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Po(t))return"[VueViewModel]";if(ju(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Se(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Vl(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Vl(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Bl(e){return~-encodeURI(e).split(/%..|./).length}function ql(e){return Bl(JSON.stringify(e))}var he;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(he||(he={}));function je(e){return new J(t=>{t(e)})}function $r(e){return new J((t,n)=>{n(e)})}class J{constructor(t){J.prototype.__init.call(this),J.prototype.__init2.call(this),J.prototype.__init3.call(this),J.prototype.__init4.call(this),this._state=he.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new J((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new J((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(he.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(he.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===he.PENDING){if(tn(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===he.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===he.RESOLVED&&n[1](this._value),this._state===he.REJECTED&&n[2](this._value),n[0]=!0)})}}}function Hl(e){const t=[];function n(){return e===void 0||t.length<e}function r(i){return t.splice(t.indexOf(i),1)[0]}function s(i){if(!n())return $r(new ce("Not adding Promise because buffer limit was reached."));const a=i();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(i){return new J((a,c)=>{let u=t.length;if(!u)return a(!0);const m=setTimeout(()=>{i&&i>0&&a(!1)},i);t.forEach(f=>{je(f).then(()=>{--u||(clearTimeout(m),a(!0))},c)})})}return{$:t,add:s,drain:o}}function Mn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const Gl=["fatal","error","warning","log","info","debug"];function Wl(e){return e==="warn"?"warning":Gl.includes(e)?e:"log"}const Jo=1e3;function xt(){return Date.now()/Jo}function Kl(){const{performance:e}=C;if(!e||!e.now)return xt;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Jo}const jo=Kl();(()=>{const{performance:e}=C;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):t,u=c<t;return o||u?s<=c?e.timeOrigin:i:r})();function et(e,t=[]){return[e,t]}function Yl(e,t){const[n,r]=e;return[n,[...r,t]]}function Cs(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function sr(e,t){return(t||new TextEncoder).encode(e)}function Jl(e,t){const[n,r]=e;let s=JSON.stringify(n);function o(i){typeof s=="string"?s=typeof i=="string"?s+i:[sr(s,t),i]:s.push(typeof i=="string"?sr(i,t):i)}for(const i of r){const[a,c]=i;if(o(`
14
+ ${JSON.stringify(a)}
15
+ `),typeof c=="string"||c instanceof Uint8Array)o(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(ve(c))}o(u)}}return typeof s=="string"?s:jl(s)}function jl(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Xl(e,t){const n=typeof e.data=="string"?sr(e.data,t):e.data;return[ge({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Zl={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"statsd"};function Is(e){return Zl[e]}function Xo(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ql(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Qe(r)},...s&&{trace:ge({...s})}}}function ef(e,t,n){const r=[{type:"client_report"},{timestamp:n||xt(),discarded_events:e}];return et(t?{dsn:t}:{},[r])}const tf=60*1e3;function nf(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?tf:r-t}function rf(e,t){return e[t]||e.all||0}function sf(e,t,n=Date.now()){return rf(e,t)>n}function of(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u]=a.split(":",2),m=parseInt(c,10),f=(isNaN(m)?60:m)*1e3;if(!u)s.all=r+f;else for(const d of u.split(";"))s[d]=r+f}else i?s.all=r+nf(i,r):t===429&&(s.all=r+60*1e3);return s}const A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,sn="production";function Sr(){return Lo("globalEventProcessors",()=>[])}function af(e){Sr().push(e)}function Kt(e,t,n,r=0){return new J((s,o)=>{const i=e[r];if(t===null||typeof i!="function")s(t);else{const a=i({...t},n);A&&i.id&&a===null&&w.log(`Event processor "${i.id}" dropped event`),tn(a)?a.then(c=>Kt(e,c,n,r+1).then(s)).then(null,o):Kt(e,a,n,r+1).then(s).then(null,o)}})}function Zo(e){const t=jo(),n={sid:Z(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>cf(n)};return e&&ze(n,e),n}function ze(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||jo(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Z()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Qo(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),ze(e,n)}function cf(e){return ge({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const df=1;function uf(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,tags:a,origin:c}=_t(e);return ge({data:r,op:s,parent_span_id:o,span_id:t,status:i,tags:a,trace_id:n,origin:c})}function _t(e){return lf(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function lf(e){return typeof e.getSpanJSON=="function"}function ff(e){const{traceFlags:t}=e.spanContext();return!!(t&df)}function hf(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Z(),timestamp:t.timestamp||xt()},u=n.integrations||e.integrations.map(_=>_.name);pf(c,e),_f(c,u),t.type===void 0&&gf(c,e.stackParser);const m=wf(r,n.captureContext);n.mechanism&&mt(c,n.mechanism);const f=s&&s.getEventProcessors?s.getEventProcessors():[],d=Tf().getScopeData();if(o){const _=o.getScopeData();As(d,_)}if(m){const _=m.getScopeData();As(d,_)}const l=[...n.attachments||[],...d.attachments];l.length&&(n.attachments=l),ii(c,d);const h=[...f,...Sr(),...d.eventProcessors];return Kt(h,c,n).then(_=>(_&&mf(_),typeof i=="number"&&i>0?bf(_,i,a):_))}function pf(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:sn),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=Ye(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=Ye(i.value,o));const a=e.request;a&&a.url&&(a.url=Ye(a.url,o))}const Rs=new WeakMap;function gf(e,t){const n=C._sentryDebugIds;if(!n)return;let r;const s=Rs.get(t);s?r=s:(r=new Map,Rs.set(t,r));const o=Object.keys(n).reduce((i,a)=>{let c;const u=r.get(a);u?c=u:(c=t(a),r.set(a,c));for(let m=c.length-1;m>=0;m--){const f=c[m];if(f.filename){i[f.filename]=n[a];break}}return i},{});try{e.exception.values.forEach(i=>{i.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function mf(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function _f(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function bf(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:ve(s.data,t,n)}}))},...e.user&&{user:ve(e.user,t,n)},...e.contexts&&{contexts:ve(e.contexts,t,n)},...e.extra&&{extra:ve(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ve(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>{const o=_t(s).data;return o&&(s.data=ve(o,t,n)),s})),r}function wf(e,t){if(!t)return e;const n=e?e.clone():new _e;return n.update(t),n}function yf(e){if(e)return xf(e)?{captureContext:e}:$f(e)?{captureContext:e}:e}function xf(e){return e instanceof _e||typeof e=="function"}const vf=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function $f(e){return Object.keys(e).some(t=>vf.includes(t))}function on(e,t){return de().captureException(e,yf(t))}function ei(e,t){return de().captureEvent(e,t)}function Pe(e,t){de().addBreadcrumb(e,t)}function ti(...e){const t=de();if(e.length===2){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function H(){return de().getClient()}function vt(){return de().getScope()}function Ds(e){const t=H(),n=cn(),r=vt(),{release:s,environment:o=sn}=t&&t.getOptions()||{},{userAgent:i}=C.navigator||{},a=Zo({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&c.status==="ok"&&ze(c,{status:"exited"}),ni(),n.setSession(a),r.setSession(a),a}function ni(){const e=cn(),t=vt(),n=t.getSession()||e.getSession();n&&Qo(n),ri(),e.setSession(),t.setSession()}function ri(){const e=cn(),t=vt(),n=H(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Ts(e=!1){if(e){ni();return}ri()}function si(e){return e.transaction}function oi(e,t,n){const r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},i=ge({environment:r.environment||sn,release:r.release,user_segment:o,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",i),i}function Sf(e){const t=H();if(!t)return{};const n=oi(_t(e).trace_id||"",t,vt()),r=si(e);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:o,source:i}=r.metadata;o!=null&&(n.sample_rate=`${o}`);const a=_t(r);return i&&i!=="url"&&(n.transaction=a.description),n.sampled=String(ff(r)),t.emit&&t.emit("createDsc",n),n}function ii(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;Ef(e,t),r&&If(e,r),Rf(e,n),kf(e,s),Cf(e,o)}function As(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:m,attachments:f,propagationContext:d,transactionName:l,span:h}=t;it(e,"extra",n),it(e,"tags",r),it(e,"user",s),it(e,"contexts",o),it(e,"sdkProcessingMetadata",a),i&&(e.level=i),l&&(e.transactionName=l),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),m.length&&(e.eventProcessors=[...e.eventProcessors,...m]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...d}}function it(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Ef(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=ge(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=ge(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const m=ge(s);m&&Object.keys(m).length&&(e.user={...m,...e.user});const f=ge(o);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),i&&(e.level=i),a&&(e.transaction=a)}function kf(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Cf(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function If(e,t){e.contexts={trace:uf(t),...e.contexts};const n=si(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Sf(t),...e.sdkProcessingMetadata};const r=_t(n).description;r&&(e.tags={transaction:r,...e.tags})}}function Rf(e,t){e.fingerprint=e.fingerprint?Go(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Df=100;let Un;class _e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Os()}static clone(t){return t?t.clone():new _e}clone(){const t=new _e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&ze(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t;if(n instanceof _e){const r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Je(n)){const r=t;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Os(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Df;if(r<=0)return this;const s={timestamp:xt(),...t},o=this._breadcrumbs;return o.push(s),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:s,_extra:o,_user:i,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:m,_sdkProcessingMetadata:f,_transactionName:d,_span:l}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:s,extra:o,user:i,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:m,sdkProcessingMetadata:f,transactionName:d,span:l}}applyToEvent(t,n={},r=[]){ii(t,this.getScopeData());const s=[...r,...Sr(),...this._eventProcessors];return Kt(s,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:Z();if(!this._client)return w.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r&&r.event_id?r.event_id:Z();if(!this._client)return w.warn("No client configured on scope - will not capture message!"),s;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Z();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(w.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Tf(){return Un||(Un=new _e),Un}function Os(){return{traceId:Z(),spanId:Z().substring(16)}}const or="7.108.0",ai=parseFloat(or),Af=100;class ci{constructor(t,n,r,s=ai){this._version=s;let o;n?o=n:(o=new _e,o.setClient(t));let i;r?i=r:(i=new _e,i.setClient(t)),this._stack=[{scope:o}],t&&this.bindClient(t),this._isolationScope=i}isOlderThan(t){return this._version<t}bindClient(t){const n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const n=this.pushScope();let r;try{r=t(n)}catch(s){throw this.popScope(),s}return tn(r)?r.then(s=>(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Z(),s=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureMessage(t,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:Z(),o=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s}),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Z();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Af}=s.getOptions&&s.getOptions()||{};if(i<=0)return;const c={timestamp:xt(),...t},u=o?rn(()=>o(c,n)):c;u!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,i))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=zs(this);try{t(this)}finally{zs(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return A&&w.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){const r=this._callExtensionMethod("startTransaction",t,n);return A&&!r&&(this.getClient()?w.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
16
+ Sentry.addTracingExtensions();
17
+ Sentry.init({...});
18
+ `):w.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&Qo(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:o=sn}=r&&r.getOptions()||{},{userAgent:i}=C.navigator||{},a=Zo({release:s,environment:o,user:n.getUser(),...i&&{userAgent:i},...t}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&ze(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){const s=an().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n);A&&w.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function an(){return C.__SENTRY__=C.__SENTRY__||{extensions:{},hub:void 0},C}function zs(e){const t=an(),n=ir(t);return di(t,e),n}function de(){const e=an();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Of(e)}function cn(){return de().getIsolationScope()}function Of(e=an()){return(!zf(e)||ir(e).isOlderThan(ai))&&di(e,new ci),ir(e)}function zf(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function ir(e){return Lo("hub",()=>new ci,e)}function di(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function Pf(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Lf(e,t,n,r){const s=Xo(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Qe(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return et(o,[i])}function Nf(e,t,n,r){const s=Xo(n),o=e.type&&e.type!=="replay_event"?e.type:"event";Pf(e,n&&n.sdk);const i=Ql(e,s,r,t);return delete e.sdkProcessingMetadata,et(i,[[{type:o},e]])}const Mf="7";function ui(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Uf(e){return`${ui(e)}${e.projectId}/envelope/`}function Ff(e,t){return ll({sentry_key:e.publicKey,sentry_version:Mf,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Vf(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${Uf(e)}?${Ff(e,r)}`}function Bf(e,t){const n=Uo(e);if(!n)return"";const r=`${ui(n)}embed/error-page/`;let s=`dsn=${Qe(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=t.user;if(!i)continue;i.name&&(s+=`&name=${encodeURIComponent(i.name)}`),i.email&&(s+=`&email=${encodeURIComponent(i.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${s}`}const Ps=[];function qf(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function Hf(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Go(n(t)):r=t;const s=qf(r),o=Wf(s,i=>i.name==="Debug");if(o!==-1){const[i]=s.splice(o,1);s.push(i)}return s}function Gf(e,t){const n={};return t.forEach(r=>{r&&li(e,r,n)}),n}function Ls(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function li(e,t,n){if(n[t.name]){A&&w.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Ps.indexOf(t.name)===-1&&(t.setupOnce(af,de),Ps.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}A&&w.log(`Integration installed: ${t.name}`)}function Wf(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function ke(e,t){return Object.assign(function(...r){return t(...r)},{id:e})}function Kf(e){let t="";for(const n of e){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([o,i])=>`${o}:${i}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
19
+ `}return t}function Yf(e,t,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=Qe(t));const o=Jf(e);return et(s,[o])}function Jf(e){const t=Kf(e);return[{type:"statsd",length:t.length},t]}const Ns="Not capturing exception because it's already been captured.";class jf{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Uo(t.dsn):A&&w.warn("No DSN provided, client will not send events."),this._dsn){const n=Vf(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if($s(t)){A&&w.log(Ns);return}let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(o=>this._captureEvent(o,n,r)).then(o=>{s=o})),s}captureMessage(t,n,r,s){let o=r&&r.event_id;const i=br(t)?t:String(t),a=wr(t)?this.eventFromMessage(i,n,r):this.eventFromException(t,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{o=c})),o}captureEvent(t,n,r){if(n&&n.originalException&&$s(n.originalException)){A&&w.log(Ns);return}let s=n&&n.event_id;const i=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,i||r).then(a=>{s=a})),s}captureSession(t){typeof t.release!="string"?A&&w.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),ze(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):je(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return A&&w.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const n=this._integrations[t.name];li(this,t,this._integrations),n||Ls(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Nf(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=Yl(r,Xl(o,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const n=Lf(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=`${t}:${n}`;A&&w.log(`Adding outcome: "${s}"`),this._outcomes[s]=this._outcomes[s]+1||1}}captureAggregateMetrics(t){A&&w.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const n=Yf(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Gf(this,t),Ls(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,n){let r=!1,s=!1;const o=n.exception&&n.exception.values;if(o){s=!0;for(const c of o){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(ze(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new J(n=>{let r=0;const s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=s,t&&r>=t&&(clearInterval(o),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=cn()){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",t,n),hf(o,t,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:m,spanId:f,parentSpanId:d,dsc:l}=c;a.contexts={trace:{trace_id:m,span_id:f,parent_span_id:d},...a.contexts};const h=l||oi(m,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(A){const o=s;o.logLevel==="log"?w.log(o.message):w.warn(o)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:o}=s,i=hi(t),a=fi(t),c=t.type||"error",u=`before send for type \`${c}\``;if(a&&typeof o=="number"&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",t),$r(new ce(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const m=c==="replay_event"?"replay":c,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,d).then(l=>{if(l===null)throw this.recordDroppedEvent("event_processor",m,t),new ce("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return l;const g=Zf(s,l,n);return Xf(g,u)}).then(l=>{if(l===null)throw this.recordDroppedEvent("before_send",m,t),new ce(`${u} returned \`null\`, will not send event.`,"log");const h=r&&r.getSession();!i&&h&&this._updateSessionFromEvent(h,l);const g=l.transaction_info;if(i&&g&&l.transaction!==t.transaction){const _="custom";l.transaction_info={...g,source:_}}return this.sendEvent(l,n),l}).then(null,l=>{throw l instanceof ce?l:(this.captureException(l,{data:{__sentry__:!0},originalException:l}),new ce(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
20
+ Reason: ${l}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{A&&w.error("Error while sending event:",n)});A&&w.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function Xf(e,t){const n=`${t} must return \`null\` or a valid event.`;if(tn(e))return e.then(r=>{if(!Je(r)&&r!==null)throw new ce(n);return r},r=>{throw new ce(`${t} rejected with ${r}`)});if(!Je(e)&&e!==null)throw new ce(n);return e}function Zf(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;return fi(t)&&r?r(t,n):hi(t)&&s?s(t,n):t}function fi(e){return e.type===void 0}function hi(e){return e.type==="transaction"}function Qf(e,t){t.debug===!0&&(A?w.enable():rn(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),vt().update(t.initialScope);const r=new e(t);eh(r),th(r)}function eh(e){const n=de().getStackTop();n.client=e,n.scope.setClient(e)}function th(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const nh=30;function pi(e,t,n=Hl(e.bufferSize||nh)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(Cs(i,(f,d)=>{const l=Is(d);if(sf(r,l)){const h=Ms(f,d);e.recordDroppedEvent("ratelimit_backoff",l,h)}else a.push(f)}),a.length===0)return je();const c=et(i[0],a),u=f=>{Cs(c,(d,l)=>{const h=Ms(d,l);e.recordDroppedEvent(f,Is(l),h)})},m=()=>t({body:Jl(c,e.textEncoder)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&A&&w.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=of(r,f),f),f=>{throw u("network_error"),f});return n.add(m).then(f=>f,f=>{if(f instanceof ce)return A&&w.error("Skipped sending event because buffer is full."),u("queue_overflow"),je();throw f})}return o.__sentry__baseTransport__=!0,{send:o,flush:s}}function Ms(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function gi(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:or})),version:or}),e._metadata=s}const rh=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],sh=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],mi="InboundFilters",oh=(e={})=>({name:mi,setupOnce(){},processEvent(t,n,r){const s=r.getOptions(),o=ih(e,s);return ah(t,o)?null:t}}),_i=oh;ke(mi,_i);function ih(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:rh],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:sh],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function ah(e,t){return t.ignoreInternal&&hh(e)?(A&&w.warn(`Event dropped due to being internal Sentry Error.
21
+ Event: ${$e(e)}`),!0):ch(e,t.ignoreErrors)?(A&&w.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
22
+ Event: ${$e(e)}`),!0):dh(e,t.ignoreTransactions)?(A&&w.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
23
+ Event: ${$e(e)}`),!0):uh(e,t.denyUrls)?(A&&w.warn(`Event dropped due to being matched by \`denyUrls\` option.
24
+ Event: ${$e(e)}.
25
+ Url: ${Yt(e)}`),!0):lh(e,t.allowUrls)?!1:(A&&w.warn(`Event dropped due to not being matched by \`allowUrls\` option.
26
+ Event: ${$e(e)}.
27
+ Url: ${Yt(e)}`),!0)}function ch(e,t){return e.type||!t||!t.length?!1:fh(e).some(n=>nn(n,t))}function dh(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?nn(n,t):!1}function uh(e,t){if(!t||!t.length)return!1;const n=Yt(e);return n?nn(n,t):!1}function lh(e,t){if(!t||!t.length)return!0;const n=Yt(e);return n?nn(n,t):!0}function fh(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),A&&t.length===0&&w.error(`Could not extract message for event ${$e(e)}`),t}function hh(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function ph(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Yt(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?ph(t):null}catch{return A&&w.error(`Cannot extract url for event ${$e(e)}`),null}}let Us;const bi="FunctionToString",Fs=new WeakMap,gh=()=>({name:bi,setupOnce(){Us=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=vr(this),n=Fs.has(H())&&t!==void 0?t:this;return Us.apply(n,e)}}catch{}},setup(e){Fs.set(e,!0)}}),wi=gh;ke(bi,wi);const E=C;let ar=0;function yi(){return ar>0}function mh(){ar++,setTimeout(()=>{ar--})}function Xe(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(vr(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const o=s.map(i=>Xe(i,t));return e.apply(this,o)}catch(o){throw mh(),ti(i=>{i.addEventProcessor(a=>(t.mechanism&&(Xn(a,void 0,void 0),mt(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),on(o)}),o}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Fo(r,e),gt(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const X=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function xi(e,t){const n=Er(e,t),r={type:t&&t.name,value:yh(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function _h(e,t,n,r){const s=H(),o=s&&s.getOptions().normalizeDepth,i={exception:{values:[{type:en(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:$h(t,{isUnhandledRejection:r})}]},extra:{__serialized__:Yo(t,o)}};if(n){const a=Er(e,n);a.length&&(i.exception.values[0].stacktrace={frames:a})}return i}function Fn(e,t){return{exception:{values:[xi(e,t)]}}}function Er(e,t){const n=t.stacktrace||t.stack||"",r=wh(t);try{return e(n,r)}catch{}return[]}const bh=/Minified React error #\d+;/i;function wh(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(bh.test(e.message))return 1}return 0}function yh(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function xh(e,t,n,r){const s=n&&n.syntheticException||void 0,o=kr(e,t,s,r);return mt(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),je(o)}function vh(e,t,n="info",r,s){const o=r&&r.syntheticException||void 0,i=cr(e,t,o,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),je(i)}function kr(e,t,n,r,s){let o;if(_r(t)&&t.error)return Fn(e,t.error);if(ps(t)||Ku(t)){const i=t;if("stack"in t)o=Fn(e,t);else{const a=i.name||(ps(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=cr(e,c,n,r),Xn(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return mr(t)?Fn(e,t):Je(t)||en(t)?(o=_h(e,t,n,s),mt(o,{synthetic:!0}),o):(o=cr(e,t,n,r),Xn(o,`${t}`,void 0),mt(o,{synthetic:!0}),o)}function cr(e,t,n,r){const s={};if(r&&n){const o=Er(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(br(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function $h(e,{isUnhandledRejection:t}){const n=fl(e),r=t?"promise rejection":"exception";return _r(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:en(e)?`Event \`${Sh(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Sh(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Eh(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Qe(r)}},o=kh(e);return et(s,[o])}function kh(e){return[{type:"user_report"},e]}class Ch extends jf{constructor(t){const n=E.SENTRY_SDK_SOURCE||Ml();gi(t,"browser",["browser"],n),super(t),t.sendClientReports&&E.document&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return xh(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return vh(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){X&&w.warn("SDK not enabled, will not capture user feedback.");return}const n=Eh(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0){X&&w.log("No outcomes to send");return}if(!this._dsn){X&&w.log("No dsn provided, will not send outcomes");return}X&&w.log("Sending outcomes:",t);const n=ef(t,this._options.tunnel&&Qe(this._dsn));this._sendEnvelope(n)}}let ct;function Ih(){if(ct)return ct;if(tr(E.fetch))return ct=E.fetch.bind(E);const e=E.document;let t=E.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){X&&w.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return ct=t.bind(E)}function Rh(){ct=void 0}function Dh(e,t=Ih()){let n=0,r=0;function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(c=>(n-=i,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Rh(),n-=i,r--,$r(c)}}return pi(e,s)}const Th=4;function Ah(e){function t(n){return new J((r,s)=>{const o=new XMLHttpRequest;o.onerror=s,o.onreadystatechange=()=>{o.readyState===Th&&r({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url);for(const i in e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&o.setRequestHeader(i,e.headers[i]);o.send(n.body)})}return pi(e,t)}const dn="?",Oh=30,zh=40,Ph=50;function Cr(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Lh=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Nh=/\((\S*)(?::(\d+))(?::(\d+))\)/,Mh=e=>{const t=Lh.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const o=Nh.exec(t[2]);o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3])}const[r,s]=vi(t[1]||dn,t[2]);return Cr(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},Uh=[Oh,Mh],Fh=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Vh=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Bh=e=>{const t=Fh.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=Vh.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||dn;return[s,r]=vi(s,r),Cr(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},qh=[Ph,Bh],Hh=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Gh=e=>{const t=Hh.exec(e);return t?Cr(t[2],t[1]||dn,+t[3],t[4]?+t[4]:void 0):void 0},Wh=[zh,Gh],Kh=[Uh,qh,Wh],Yh=qo(...Kh),vi=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:dn,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ut=1024,$i="Breadcrumbs",Jh=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:$i,setupOnce(){},setup(n){t.console&&ml(Zh(n)),t.dom&&wl(Xh(n,t.dom)),t.xhr&&Pl(Qh(n)),t.fetch&&El(ep(n)),t.history&&Ko(tp(n)),t.sentry&&n.on&&n.on("beforeSendEvent",jh(n))}}},Si=Jh;ke($i,Si);function jh(e){return function(n){H()===e&&Pe({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:$e(n)},{event:n})}}function Xh(e,t){return function(r){if(H()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Ut&&(X&&w.warn(`\`dom.maxStringLength\` cannot exceed ${Ut}, but a value of ${a} was configured. Sentry will use ${Ut} instead.`),a=Ut),typeof i=="string"&&(i=[i]);try{const u=r.event,m=np(u)?u.target:u;s=No(m,{keyAttrs:i,maxStringLength:a}),o=sl(m)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),Pe(c,{event:r.event,name:r.name,global:r.global})}}function Zh(e){return function(n){if(H()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Wl(n.level),message:gs(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${gs(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Pe(r,{input:n.args,level:n.level})}}function Qh(e){return function(n){if(H()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[at];if(!r||!s||!o)return;const{method:i,url:a,status_code:c,body:u}=o,m={method:i,url:a,status_code:c},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};Pe({category:"xhr",data:m,type:"http"},f)}}function ep(e){return function(n){if(H()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};Pe({category:"fetch",data:o,level:"error",type:"http"},i)}else{const o=n.response,i={...n.fetchData,status_code:o&&o.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:s};Pe({category:"fetch",data:i,type:"http"},a)}}}function tp(e){return function(n){if(H()!==e)return;let r=n.from,s=n.to;const o=Mn(E.location.href);let i=r?Mn(r):void 0;const a=Mn(s);(!i||!i.path)&&(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),Pe({category:"navigation",data:{from:r,to:s}})}}function np(e){return!!e&&!!e.target}const Ei="Dedupe",rp=()=>{let e;return{name:Ei,setupOnce(){},processEvent(t){if(t.type)return t;try{if(sp(t,e))return X&&w.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},ki=rp;ke(Ei,ki);function sp(e,t){return t?!!(op(e,t)||ip(e,t)):!1}function op(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ii(e,t)||!Ci(e,t))}function ip(e,t){const n=Vs(t),r=Vs(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ii(e,t)||!Ci(e,t))}function Ci(e,t){let n=Bs(e),r=Bs(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function Ii(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Vs(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Bs(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const Ri="GlobalHandlers",ap=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ri,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(cp(n),qs("onerror")),t.onunhandledrejection&&(dp(n),qs("onunhandledrejection"))}}},Di=ap;ke(Ri,Di);function cp(e){Il(t=>{const{stackParser:n,attachStacktrace:r}=Ai();if(H()!==e||yi())return;const{msg:s,url:o,line:i,column:a,error:c}=t,u=c===void 0&&me(s)?fp(s,o,i,a):Ti(kr(n,c||s,void 0,r,!1),o,i,a);u.level="error",ei(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function dp(e){Dl(t=>{const{stackParser:n,attachStacktrace:r}=Ai();if(H()!==e||yi())return;const s=up(t),o=wr(s)?lp(s):kr(n,s,void 0,r,!0);o.level="error",ei(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function up(e){if(wr(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function lp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function fp(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=_r(e)?e.message:e,i="Error";const a=o.match(s);return a&&(i=a[1],o=a[2]),Ti({exception:{values:[{type:i,value:o}]}},t,n,r)}function Ti(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,m=isNaN(parseInt(n,10))?void 0:n,f=me(t)&&t.length>0?t:rl();return c.length===0&&c.push({colno:u,filename:f,function:"?",in_app:!0,lineno:m}),e}function qs(e){X&&w.log(`Global Handler attached: ${e}`)}function Ai(){const e=H();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Oi="HttpContext",hp=()=>({name:Oi,setupOnce(){},preprocessEvent(e){if(!E.navigator&&!E.location&&!E.document)return;const t=e.request&&e.request.url||E.location&&E.location.href,{referrer:n}=E.document||{},{userAgent:r}=E.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),zi=hp;ke(Oi,zi);const pp="cause",gp=5,Pi="LinkedErrors",mp=(e={})=>{const t=e.limit||gp,n=e.key||pp;return{name:Pi,setupOnce(){},preprocessEvent(r,s,o){const i=o.getOptions();Qu(xi,i.stackParser,i.maxValueLength,n,t,r,s)}}},Li=mp;ke(Pi,Li);const _p=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Ni="TryCatch",bp=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Ni,setupOnce(){t.setTimeout&&V(E,"setTimeout",Hs),t.setInterval&&V(E,"setInterval",Hs),t.requestAnimationFrame&&V(E,"requestAnimationFrame",wp),t.XMLHttpRequest&&"XMLHttpRequest"in E&&V(XMLHttpRequest.prototype,"send",yp);const n=t.eventTarget;n&&(Array.isArray(n)?n:_p).forEach(xp)}}},Mi=bp;ke(Ni,Mi);function Hs(e){return function(...t){const n=t[0];return t[0]=Xe(n,{mechanism:{data:{function:Se(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function wp(e){return function(t){return e.apply(this,[Xe(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Se(e)},handled:!1,type:"instrument"}})])}}function yp(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&V(n,s,function(o){const i={mechanism:{data:{function:s,handler:Se(o)},handled:!1,type:"instrument"}},a=vr(o);return a&&(i.mechanism.data.handler=Se(a)),Xe(o,i)})}),e.apply(this,t)}}function xp(e){const t=E,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(V(n,"addEventListener",function(r){return function(s,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Xe(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Se(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Xe(o,{mechanism:{data:{function:"addEventListener",handler:Se(o),target:e},handled:!1,type:"instrument"}}),i])}}),V(n,"removeEventListener",function(r){return function(s,o,i){const a=o;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,i)}catch{}return r.call(this,s,a,i)}}))}const vp=[_i(),wi(),Mi(),Si(),Di(),Li(),ki(),zi()];function $p(e){return[...vp]}function Sp(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=$p()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),E.SENTRY_RELEASE&&E.SENTRY_RELEASE.id&&(e.release=E.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:pl(e.stackParser||Yh),integrations:Hf(e),transport:e.transport||(Wo()?Dh:Ah)};Qf(Ch,t),e.autoSessionTracking&&Ep()}const Gs=(e={},t=de())=>{if(!E.document){X&&w.error("Global document not defined in showReportDialog call");return}const{client:n,scope:r}=t.getStackTop(),s=e.dsn||n&&n.getDsn();if(!s){X&&w.error("DSN not configured for showReportDialog call");return}r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const o=E.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=Bf(s,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:i}=e;if(i){const c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{i()}finally{E.removeEventListener("message",c)}};E.addEventListener("message",c)}const a=E.document.head||E.document.body;a?a.appendChild(o):X&&w.error("Not injecting report dialog. No injection point found in HTML")};function Ep(){if(typeof E.document>"u"){X&&w.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Ds({ignoreDuration:!0}),Ts(),Ko(({from:e,to:t})=>{e!==void 0&&e!==t&&(Ds({ignoreDuration:!0}),Ts())})}function kp(e){const t={...e};gi(t,"react"),Sp(t)}var Ui={exports:{}},R={};/** @license React v16.13.1
28
+ * react-is.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var M=typeof Symbol=="function"&&Symbol.for,Ir=M?Symbol.for("react.element"):60103,Rr=M?Symbol.for("react.portal"):60106,un=M?Symbol.for("react.fragment"):60107,ln=M?Symbol.for("react.strict_mode"):60108,fn=M?Symbol.for("react.profiler"):60114,hn=M?Symbol.for("react.provider"):60109,pn=M?Symbol.for("react.context"):60110,Dr=M?Symbol.for("react.async_mode"):60111,gn=M?Symbol.for("react.concurrent_mode"):60111,mn=M?Symbol.for("react.forward_ref"):60112,_n=M?Symbol.for("react.suspense"):60113,Cp=M?Symbol.for("react.suspense_list"):60120,bn=M?Symbol.for("react.memo"):60115,wn=M?Symbol.for("react.lazy"):60116,Ip=M?Symbol.for("react.block"):60121,Rp=M?Symbol.for("react.fundamental"):60117,Dp=M?Symbol.for("react.responder"):60118,Tp=M?Symbol.for("react.scope"):60119;function j(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ir:switch(e=e.type,e){case Dr:case gn:case un:case fn:case ln:case _n:return e;default:switch(e=e&&e.$$typeof,e){case pn:case mn:case wn:case bn:case hn:return e;default:return t}}case Rr:return t}}}function Fi(e){return j(e)===gn}R.AsyncMode=Dr;R.ConcurrentMode=gn;R.ContextConsumer=pn;R.ContextProvider=hn;R.Element=Ir;R.ForwardRef=mn;R.Fragment=un;R.Lazy=wn;R.Memo=bn;R.Portal=Rr;R.Profiler=fn;R.StrictMode=ln;R.Suspense=_n;R.isAsyncMode=function(e){return Fi(e)||j(e)===Dr};R.isConcurrentMode=Fi;R.isContextConsumer=function(e){return j(e)===pn};R.isContextProvider=function(e){return j(e)===hn};R.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ir};R.isForwardRef=function(e){return j(e)===mn};R.isFragment=function(e){return j(e)===un};R.isLazy=function(e){return j(e)===wn};R.isMemo=function(e){return j(e)===bn};R.isPortal=function(e){return j(e)===Rr};R.isProfiler=function(e){return j(e)===fn};R.isStrictMode=function(e){return j(e)===ln};R.isSuspense=function(e){return j(e)===_n};R.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===un||e===gn||e===fn||e===ln||e===_n||e===Cp||typeof e=="object"&&e!==null&&(e.$$typeof===wn||e.$$typeof===bn||e.$$typeof===hn||e.$$typeof===pn||e.$$typeof===mn||e.$$typeof===Rp||e.$$typeof===Dp||e.$$typeof===Tp||e.$$typeof===Ip)};R.typeOf=j;Ui.exports=R;var Ap=Ui.exports,Vi=Ap,Op={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},zp={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Bi={};Bi[Vi.ForwardRef]=Op;Bi[Vi.Memo]=zp;const Pp=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Lp(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Ws={componentStack:null,error:null,eventId:null};function Np(e,t){const n=new WeakMap;function r(s,o){if(!n.has(s)){if(s.cause)return n.set(s,!0),r(s.cause,o);s.cause=o}}r(e,t)}class Tr extends D.Component{constructor(t){super(t),Tr.prototype.__init.call(this),this.state=Ws,this._openFallbackReportDialog=!0;const n=H();n&&n.on&&t.showDialog&&(this._openFallbackReportDialog=!1,n.on("afterSendEvent",r=>{!r.type&&r.event_id===this._lastEventId&&Gs({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:n}){const{beforeCapture:r,onError:s,showDialog:o,dialogOptions:i}=this.props;ti(a=>{if(Lp(D.version)&&mr(t)){const u=new Error(t.message);u.name=`React ErrorBoundary ${t.name}`,u.stack=n,Np(t,u)}r&&r(a,t,n);const c=on(t,{captureContext:{contexts:{react:{componentStack:n}}},mechanism:{handled:!!this.props.fallback}});s&&s(t,n,c),o&&(this._lastEventId=c,this._openFallbackReportDialog&&Gs({...i,eventId:c})),this.setState({error:t,componentStack:n,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:s}=this.props;s&&s(t,n,r)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:n,componentStack:r,eventId:s}=this.state;t&&t(n,r,s),this.setState(Ws)}}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.error){let s;return typeof t=="function"?s=t({error:r.error,componentStack:r.componentStack,resetError:this.resetErrorBoundary,eventId:r.eventId}):s=t,D.isValidElement(s)?s:(t&&Pp&&w.warn("fallback did not produce a valid ReactElement"),null)}return typeof n=="function"?n():n}}function qi(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=qi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function re(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=qi(e))&&(r&&(r+=" "),r+=t);return r}var Mp="y2413r0",Up="y2413r1",Fp="y2413r2",Vp="y2413r3",Ks="sid-theme-root";function Hi(){return typeof window<"u"&&globalThis===window}function Gi({theme:e,className:t}){return re(Ks,`${Ks}__${e}`,Vp,{[Mp]:e==="dark",[Fp]:e==="auto",[Up]:e==="light"},t)}function Bp({theme:e,className:t}){const n=Gi({theme:e,className:t});document.body.classList.add(...n.split(" "))}const Wi=({children:e})=>p.jsx("div",{className:Gi({theme:"light"}),children:e}),qp=({children:e,theme:t="light",className:n})=>{const[r,s]=eo.useState(!1);return D.useLayoutEffect(()=>{r||s(!0)},[n,r,t]),D.useLayoutEffect(()=>{r&&Bp({theme:t,className:n})},[n,r,t]),r?p.jsx(p.Fragment,{children:e}):p.jsx(Wi,{children:e})};function Hp({children:e,theme:t="light",className:n}){return Hi()?p.jsx(qp,{theme:t,className:n,children:e}):p.jsx(Wi,{children:e})}var Gp={default:"_92y0ua2 _92y0ua1",short:"_92y0ua3 _92y0ua1"};const Ki=({className:e,variant:t="default"})=>p.jsx("div",{className:re(Gp[t],e)});var Wp={primary:"eccmw2 eccmw0",secondary:"eccmw3 eccmw0",secondaryMd:"eccmw4 eccmw0 eccmw1",neutral:"eccmw5 eccmw0",neutralMd:"eccmw6 eccmw0 eccmw1",ghost:"eccmw7 eccmw0",ghostMd:"eccmw8 eccmw0 eccmw1"},Kp="eccmw9",Yp="eccmwa",Jp={primary:"eccmwb",secondary:"eccmwc",secondaryMd:"eccmwd",neutral:"eccmwe",neutralMd:"eccmwf",ghost:"eccmwg",ghostMd:"eccmwh"};const Yi=D.forwardRef(({children:e,onClick:t,className:n,type:r="button",variant:s="primary",testId:o,icon:i,disabled:a,loading:c=!1},u)=>p.jsx("button",{ref:u,"data-testid":o,type:r,disabled:a,className:re("sid-button",`sid-button--${s}`,Wp[s],{[Kp]:a},n),onClick:t,children:c?p.jsx(Ki,{variant:"short",className:Jp[s]}):p.jsxs(p.Fragment,{children:[i?p.jsx("i",{className:Yp,children:i}):null,e]})}));Yi.displayName="Button";var jp="_1doytsg0",Xp="_1doytsg3",Zp="_1doytsg4",Qp={text:"_1doytsg6 _1doytsg5",email:"_1doytsg7 _1doytsg5",password:"_1doytsg8 _1doytsg5",tel:"_1doytsg9 _1doytsg5"},eg="_1doytsga",tg="_1doytsgc";const ng=({id:e,name:t,label:n,placeholder:r="",autoComplete:s="",value:o,onChange:i,type:a="text"})=>{const c=D.useCallback(u=>{i(u)},[i]);return p.jsxs("div",{className:Qp[a],children:[p.jsx("label",{htmlFor:e,className:eg,children:n}),p.jsx("input",{type:a,id:e,name:t,className:jp,placeholder:r,value:o,onChange:c,autoComplete:s})]})},Ar=`
35
+ @media (prefers-color-scheme: dark) {
36
+ .sid-theme-root__auto path { fill: white; }
37
+ }
38
+
39
+ .sid-theme-root__dark path { fill: white; }
40
+ `;function rg(){return p.jsxs("svg",{width:"5",height:"20",viewBox:"0 0 5 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 0C3.32843 1.19209e-07 4 0.671573 4 1.5L4 11.5C4 12.3284 3.32843 13 2.5 13C1.67157 13 1 12.3284 1 11.5L1 1.5C1 0.671573 1.67157 -1.19209e-07 2.5 0Z",fill:"white"}),p.jsx("path",{d:"M4.5 18C4.5 19.1046 3.60457 20 2.5 20C1.39543 20 0.5 19.1046 0.5 18C0.5 16.8954 1.39543 16 2.5 16C3.60457 16 4.5 16.8954 4.5 18Z",fill:"white"})]})}const sg=()=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("style",{children:Ar}),p.jsx("g",{clipPath:"url(#clip0_2610_9920)",children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.220551 7.4C1.00905 5.8258 3.50342 2 8.00001 2C12.4966 2 14.991 5.8258 15.7796 7.4C16.0733 7.98635 16.0737 8.0153 15.7796 8.60228C14.99 10.1778 12.4949 14 8.00001 14C3.50298 14 1.00762 10.1738 0.219399 8.6C-0.0739824 8.01422 -0.0726647 7.98539 0.220551 7.4ZM8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8Z",fill:"#142049"})}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_2610_9920",children:p.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),og=()=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("style",{children:Ar}),p.jsxs("g",{clipPath:"url(#clip0_2610_9933)",children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.220551 7.4C1.00905 5.8258 3.50342 2 8.00001 2C12.4966 2 14.991 5.8258 15.7796 7.4C16.0733 7.98635 16.0737 8.0153 15.7796 8.60228C14.99 10.1778 12.4949 14 8.00001 14C3.50298 14 1.00762 10.1738 0.219399 8.6C-0.0739824 8.01422 -0.0726647 7.98539 0.220551 7.4ZM8 12C10.2091 12 12 10.2091 12 8C12 5.79086 10.2091 4 8 4C5.79086 4 4 5.79086 4 8C4 10.2091 5.79086 12 8 12ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8Z",fill:"#142049"}),p.jsx("path",{d:"M2.34314 2.34315L13.6568 13.6569",stroke:"#142049",strokeWidth:"1.5",strokeLinecap:"round"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_2610_9933",children:p.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),Ji=()=>p.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("style",{children:Ar}),p.jsx("path",{d:"M12.686 10L2 30.228H5.198L15.884 10H12.686Z",fill:"#2A6AFF"}),p.jsx("path",{d:"M19.7923 15.694C20.9373 15.694 21.8723 14.732 21.8723 13.588C21.8723 12.444 20.9373 11.482 19.7923 11.482C18.6223 11.482 17.6873 12.444 17.6873 13.588C17.6873 14.732 18.6233 15.694 19.7933 15.694H19.7923ZM18.0773 17.514V30.228H21.4573V17.514H18.0773ZM34.1883 10V18.502C33.172 17.6398 31.8809 17.1695 30.5483 17.176C26.8563 17.176 24.0743 20.14 24.0743 23.884C24.0743 27.628 26.8563 30.592 30.5483 30.592C32.0823 30.592 33.4343 30.02 34.4483 29.032V30.228H37.5683V10H34.1883ZM30.9383 27.42C28.9883 27.42 27.5583 25.912 27.5583 23.884C27.5583 21.856 28.9883 20.348 30.9383 20.348C32.8883 20.348 34.3183 21.856 34.3183 23.884C34.3183 25.912 32.8883 27.42 30.9383 27.42Z",fill:"#142049"})]}),Ys=e=>{const[t,n]=D.useState(!1);return p.jsxs("div",{className:re("sid-input","sid-input--password",Xp,e.error&&Zp,e.className),children:[p.jsx(ng,{...e,type:t?"text":"password"}),p.jsx("button",{tabIndex:-1,className:tg,type:"button",onClick:()=>n(!t),children:t?p.jsx(og,{}):p.jsx(sg,{})})]})};var ig="_1rf2mux3",ag="_1rf2mux5",cg={blue:"_1rf2mux6 _1rf2mux4",red:"_1rf2mux7 _1rf2mux4"},dg="_1rf2mux9",ug={blue:"_1rf2muxa _1rf2mux8",red:"_1rf2muxb _1rf2mux8"},lg="_1rf2muxd",fg={blue:"_1rf2muxe _1rf2muxc",red:"_1rf2muxf _1rf2muxc"},hg="_1rf2muxg";const Or=({children:e,className:t,variant:n="blue",shouldAnimate:r=!0})=>p.jsxs("div",{className:re(ig,t),children:[p.jsx("div",{className:re(cg[n],{[ag]:r})}),p.jsx("div",{className:re(ug[n],{[dg]:r})}),p.jsx("div",{className:re(fg[n],{[lg]:r})}),p.jsx("div",{className:hg,children:e})]});function pg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function js(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Js(Object(n),!0).forEach(function(r){pg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var gg=(e,t,n)=>{for(var r of Object.keys(e)){var s;if(e[r]!==((s=t[r])!==null&&s!==void 0?s:n[r]))return!1}return!0},ji=e=>t=>{var n=e.defaultClassName,r=js(js({},e.defaultVariants),t);for(var s in r){var o,i=(o=r[s])!==null&&o!==void 0?o:e.defaultVariants[s];if(i!=null){var a=i;typeof a=="boolean"&&(a=a===!0?"true":"false");var c=e.variantClassNames[s][a];c&&(n+=" "+c)}}for(var[u,m]of e.compoundVariants)gg(u,r,e.defaultVariants)&&(n+=" "+m);return n},mg=ji({defaultClassName:"s3l9sv0",variantClassNames:{direction:{vertical:"s3l9sv1",horizontal:"s3l9sv2"},space:{between:"s3l9sv3",evenly:"s3l9sv4"}},defaultVariants:{direction:"vertical"},compoundVariants:[]});function _g(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bg(e){var t=_g(e,"string");return typeof t=="symbol"?t:String(t)}function wg(e,t,n){return t=bg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Vn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xs(Object(n),!0).forEach(function(r){wg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xs(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var yg=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var s=Object.assign({},...n.map(c=>c.styles)),o=Object.keys(s),i=o.filter(c=>"mappings"in s[c]),a=c=>{var u=[],m={},f=Vn({},c),d=!1;for(var l of i){var h=c[l];if(h!=null){var g=s[l];d=!0;for(var _ of g.mappings)m[_]=h,f[_]==null&&delete f[_]}}var G=d?Vn(Vn({},m),f):c,Ce=function(){var B=G[v],ue=s[v];try{if(ue.mappings)return"continue";if(typeof B=="string"||typeof B=="number")u.push(ue.values[B].defaultClass);else if(Array.isArray(B))for(var ye=0;ye<B.length;ye++){var Ie=B[ye];if(Ie!=null){var Re=ue.responsiveArray[ye];u.push(ue.values[Ie].conditions[Re])}}else for(var tt in B){var nt=B[tt];nt!=null&&u.push(ue.values[nt].conditions[tt])}}catch(le){throw le}};for(var v in G)var $=Ce();return e(u.join(" "))};return Object.assign(a,{properties:new Set(o)})},xg=e=>e,vg=function(){return yg(xg)(...arguments)},Xi=vg({conditions:{defaultCondition:"lightMode",conditionNames:["lightMode","darkMode"],responsiveArray:void 0},styles:{color:{values:{background:{conditions:{lightMode:"_1hbz9ox0",darkMode:"_1hbz9ox1"},defaultClass:"_1hbz9ox0"},mute:{conditions:{lightMode:"_1hbz9ox2",darkMode:"_1hbz9ox3"},defaultClass:"_1hbz9ox2"},panel:{conditions:{lightMode:"_1hbz9ox4",darkMode:"_1hbz9ox5"},defaultClass:"_1hbz9ox4"},foreground:{conditions:{lightMode:"_1hbz9ox6",darkMode:"_1hbz9ox7"},defaultClass:"_1hbz9ox6"},contrast:{conditions:{lightMode:"_1hbz9ox8",darkMode:"_1hbz9ox9"},defaultClass:"_1hbz9ox8"},secondary:{conditions:{lightMode:"_1hbz9oxa",darkMode:"_1hbz9oxb"},defaultClass:"_1hbz9oxa"},tertiary:{conditions:{lightMode:"_1hbz9oxc",darkMode:"_1hbz9oxd"},defaultClass:"_1hbz9oxc"},placeholder:{conditions:{lightMode:"_1hbz9oxe",darkMode:"_1hbz9oxf"},defaultClass:"_1hbz9oxe"},smooth:{conditions:{lightMode:"_1hbz9oxg",darkMode:"_1hbz9oxh"},defaultClass:"_1hbz9oxg"},subtle:{conditions:{lightMode:"_1hbz9oxi",darkMode:"_1hbz9oxj"},defaultClass:"_1hbz9oxi"},soft:{conditions:{lightMode:"_1hbz9oxk",darkMode:"_1hbz9oxl"},defaultClass:"_1hbz9oxk"},offset:{conditions:{lightMode:"_1hbz9oxm",darkMode:"_1hbz9oxn"},defaultClass:"_1hbz9oxm"},primary:{conditions:{lightMode:"_1hbz9oxo",darkMode:"_1hbz9oxp"},defaultClass:"_1hbz9oxo"},primaryHover:{conditions:{lightMode:"_1hbz9oxq",darkMode:"_1hbz9oxr"},defaultClass:"_1hbz9oxq"},transparent:{conditions:{lightMode:"_1hbz9oxs",darkMode:"_1hbz9oxt"},defaultClass:"_1hbz9oxs"},error:{conditions:{lightMode:"_1hbz9oxu",darkMode:"_1hbz9oxv"},defaultClass:"_1hbz9oxu"},auxiliary:{conditions:{lightMode:"_1hbz9oxw",darkMode:"_1hbz9oxx"},defaultClass:"_1hbz9oxw"},success:{conditions:{lightMode:"_1hbz9oxy",darkMode:"_1hbz9oxz"},defaultClass:"_1hbz9oxy"},foregroundSuccess:{conditions:{lightMode:"_1hbz9ox10",darkMode:"_1hbz9ox11"},defaultClass:"_1hbz9ox10"},backgroundSuccess:{conditions:{lightMode:"_1hbz9ox12",darkMode:"_1hbz9ox13"},defaultClass:"_1hbz9ox12"},failure:{conditions:{lightMode:"_1hbz9ox14",darkMode:"_1hbz9ox15"},defaultClass:"_1hbz9ox14"},foregroundFailure:{conditions:{lightMode:"_1hbz9ox16",darkMode:"_1hbz9ox17"},defaultClass:"_1hbz9ox16"},backgroundFailure:{conditions:{lightMode:"_1hbz9ox18",darkMode:"_1hbz9ox19"},defaultClass:"_1hbz9ox18"}}},backgroundColor:{values:{background:{conditions:{lightMode:"_1hbz9ox1a",darkMode:"_1hbz9ox1b"},defaultClass:"_1hbz9ox1a"},mute:{conditions:{lightMode:"_1hbz9ox1c",darkMode:"_1hbz9ox1d"},defaultClass:"_1hbz9ox1c"},panel:{conditions:{lightMode:"_1hbz9ox1e",darkMode:"_1hbz9ox1f"},defaultClass:"_1hbz9ox1e"},foreground:{conditions:{lightMode:"_1hbz9ox1g",darkMode:"_1hbz9ox1h"},defaultClass:"_1hbz9ox1g"},contrast:{conditions:{lightMode:"_1hbz9ox1i",darkMode:"_1hbz9ox1j"},defaultClass:"_1hbz9ox1i"},secondary:{conditions:{lightMode:"_1hbz9ox1k",darkMode:"_1hbz9ox1l"},defaultClass:"_1hbz9ox1k"},tertiary:{conditions:{lightMode:"_1hbz9ox1m",darkMode:"_1hbz9ox1n"},defaultClass:"_1hbz9ox1m"},placeholder:{conditions:{lightMode:"_1hbz9ox1o",darkMode:"_1hbz9ox1p"},defaultClass:"_1hbz9ox1o"},smooth:{conditions:{lightMode:"_1hbz9ox1q",darkMode:"_1hbz9ox1r"},defaultClass:"_1hbz9ox1q"},subtle:{conditions:{lightMode:"_1hbz9ox1s",darkMode:"_1hbz9ox1t"},defaultClass:"_1hbz9ox1s"},soft:{conditions:{lightMode:"_1hbz9ox1u",darkMode:"_1hbz9ox1v"},defaultClass:"_1hbz9ox1u"},offset:{conditions:{lightMode:"_1hbz9ox1w",darkMode:"_1hbz9ox1x"},defaultClass:"_1hbz9ox1w"},primary:{conditions:{lightMode:"_1hbz9ox1y",darkMode:"_1hbz9ox1z"},defaultClass:"_1hbz9ox1y"},primaryHover:{conditions:{lightMode:"_1hbz9ox20",darkMode:"_1hbz9ox21"},defaultClass:"_1hbz9ox20"},transparent:{conditions:{lightMode:"_1hbz9ox22",darkMode:"_1hbz9ox23"},defaultClass:"_1hbz9ox22"},error:{conditions:{lightMode:"_1hbz9ox24",darkMode:"_1hbz9ox25"},defaultClass:"_1hbz9ox24"},auxiliary:{conditions:{lightMode:"_1hbz9ox26",darkMode:"_1hbz9ox27"},defaultClass:"_1hbz9ox26"},success:{conditions:{lightMode:"_1hbz9ox28",darkMode:"_1hbz9ox29"},defaultClass:"_1hbz9ox28"},foregroundSuccess:{conditions:{lightMode:"_1hbz9ox2a",darkMode:"_1hbz9ox2b"},defaultClass:"_1hbz9ox2a"},backgroundSuccess:{conditions:{lightMode:"_1hbz9ox2c",darkMode:"_1hbz9ox2d"},defaultClass:"_1hbz9ox2c"},failure:{conditions:{lightMode:"_1hbz9ox2e",darkMode:"_1hbz9ox2f"},defaultClass:"_1hbz9ox2e"},foregroundFailure:{conditions:{lightMode:"_1hbz9ox2g",darkMode:"_1hbz9ox2h"},defaultClass:"_1hbz9ox2g"},backgroundFailure:{conditions:{lightMode:"_1hbz9ox2i",darkMode:"_1hbz9ox2j"},defaultClass:"_1hbz9ox2i"}}}}},{conditions:void 0,styles:{marginY:{mappings:["marginTop","marginBottom"]},marginX:{mappings:["marginLeft","marginRight"]},gap:{values:{0:{defaultClass:"_1hbz9ox2k"},1:{defaultClass:"_1hbz9ox2l"},2:{defaultClass:"_1hbz9ox2m"},3:{defaultClass:"_1hbz9ox2n"},4:{defaultClass:"_1hbz9ox2o"},5:{defaultClass:"_1hbz9ox2p"},6:{defaultClass:"_1hbz9ox2q"},7:{defaultClass:"_1hbz9ox2r"},8:{defaultClass:"_1hbz9ox2s"},9:{defaultClass:"_1hbz9ox2t"},10:{defaultClass:"_1hbz9ox2u"},11:{defaultClass:"_1hbz9ox2v"},12:{defaultClass:"_1hbz9ox2w"},13:{defaultClass:"_1hbz9ox2x"},14:{defaultClass:"_1hbz9ox2y"},15:{defaultClass:"_1hbz9ox2z"},16:{defaultClass:"_1hbz9ox30"},20:{defaultClass:"_1hbz9ox31"},24:{defaultClass:"_1hbz9ox32"},28:{defaultClass:"_1hbz9ox33"},32:{defaultClass:"_1hbz9ox34"},36:{defaultClass:"_1hbz9ox35"},40:{defaultClass:"_1hbz9ox36"},44:{defaultClass:"_1hbz9ox37"},48:{defaultClass:"_1hbz9ox38"},52:{defaultClass:"_1hbz9ox39"},56:{defaultClass:"_1hbz9ox3a"},60:{defaultClass:"_1hbz9ox3b"},64:{defaultClass:"_1hbz9ox3c"},68:{defaultClass:"_1hbz9ox3d"},72:{defaultClass:"_1hbz9ox3e"},76:{defaultClass:"_1hbz9ox3f"},80:{defaultClass:"_1hbz9ox3g"},96:{defaultClass:"_1hbz9ox3h"},px:{defaultClass:"_1hbz9ox3i"},"0.25":{defaultClass:"_1hbz9ox3j"},"0.5":{defaultClass:"_1hbz9ox3k"},"0.75":{defaultClass:"_1hbz9ox3l"},"1.5":{defaultClass:"_1hbz9ox3m"},"2.5":{defaultClass:"_1hbz9ox3n"},"3.5":{defaultClass:"_1hbz9ox3o"}}},marginTop:{values:{0:{defaultClass:"_1hbz9ox3p"},1:{defaultClass:"_1hbz9ox3q"},2:{defaultClass:"_1hbz9ox3r"},3:{defaultClass:"_1hbz9ox3s"},4:{defaultClass:"_1hbz9ox3t"},5:{defaultClass:"_1hbz9ox3u"},6:{defaultClass:"_1hbz9ox3v"},7:{defaultClass:"_1hbz9ox3w"},8:{defaultClass:"_1hbz9ox3x"},9:{defaultClass:"_1hbz9ox3y"},10:{defaultClass:"_1hbz9ox3z"},11:{defaultClass:"_1hbz9ox40"},12:{defaultClass:"_1hbz9ox41"},13:{defaultClass:"_1hbz9ox42"},14:{defaultClass:"_1hbz9ox43"},15:{defaultClass:"_1hbz9ox44"},16:{defaultClass:"_1hbz9ox45"},20:{defaultClass:"_1hbz9ox46"},24:{defaultClass:"_1hbz9ox47"},28:{defaultClass:"_1hbz9ox48"},32:{defaultClass:"_1hbz9ox49"},36:{defaultClass:"_1hbz9ox4a"},40:{defaultClass:"_1hbz9ox4b"},44:{defaultClass:"_1hbz9ox4c"},48:{defaultClass:"_1hbz9ox4d"},52:{defaultClass:"_1hbz9ox4e"},56:{defaultClass:"_1hbz9ox4f"},60:{defaultClass:"_1hbz9ox4g"},64:{defaultClass:"_1hbz9ox4h"},68:{defaultClass:"_1hbz9ox4i"},72:{defaultClass:"_1hbz9ox4j"},76:{defaultClass:"_1hbz9ox4k"},80:{defaultClass:"_1hbz9ox4l"},96:{defaultClass:"_1hbz9ox4m"},px:{defaultClass:"_1hbz9ox4n"},"0.25":{defaultClass:"_1hbz9ox4o"},"0.5":{defaultClass:"_1hbz9ox4p"},"0.75":{defaultClass:"_1hbz9ox4q"},"1.5":{defaultClass:"_1hbz9ox4r"},"2.5":{defaultClass:"_1hbz9ox4s"},"3.5":{defaultClass:"_1hbz9ox4t"}}},marginBottom:{values:{0:{defaultClass:"_1hbz9ox4u"},1:{defaultClass:"_1hbz9ox4v"},2:{defaultClass:"_1hbz9ox4w"},3:{defaultClass:"_1hbz9ox4x"},4:{defaultClass:"_1hbz9ox4y"},5:{defaultClass:"_1hbz9ox4z"},6:{defaultClass:"_1hbz9ox50"},7:{defaultClass:"_1hbz9ox51"},8:{defaultClass:"_1hbz9ox52"},9:{defaultClass:"_1hbz9ox53"},10:{defaultClass:"_1hbz9ox54"},11:{defaultClass:"_1hbz9ox55"},12:{defaultClass:"_1hbz9ox56"},13:{defaultClass:"_1hbz9ox57"},14:{defaultClass:"_1hbz9ox58"},15:{defaultClass:"_1hbz9ox59"},16:{defaultClass:"_1hbz9ox5a"},20:{defaultClass:"_1hbz9ox5b"},24:{defaultClass:"_1hbz9ox5c"},28:{defaultClass:"_1hbz9ox5d"},32:{defaultClass:"_1hbz9ox5e"},36:{defaultClass:"_1hbz9ox5f"},40:{defaultClass:"_1hbz9ox5g"},44:{defaultClass:"_1hbz9ox5h"},48:{defaultClass:"_1hbz9ox5i"},52:{defaultClass:"_1hbz9ox5j"},56:{defaultClass:"_1hbz9ox5k"},60:{defaultClass:"_1hbz9ox5l"},64:{defaultClass:"_1hbz9ox5m"},68:{defaultClass:"_1hbz9ox5n"},72:{defaultClass:"_1hbz9ox5o"},76:{defaultClass:"_1hbz9ox5p"},80:{defaultClass:"_1hbz9ox5q"},96:{defaultClass:"_1hbz9ox5r"},px:{defaultClass:"_1hbz9ox5s"},"0.25":{defaultClass:"_1hbz9ox5t"},"0.5":{defaultClass:"_1hbz9ox5u"},"0.75":{defaultClass:"_1hbz9ox5v"},"1.5":{defaultClass:"_1hbz9ox5w"},"2.5":{defaultClass:"_1hbz9ox5x"},"3.5":{defaultClass:"_1hbz9ox5y"}}},marginLeft:{values:{0:{defaultClass:"_1hbz9ox5z"},1:{defaultClass:"_1hbz9ox60"},2:{defaultClass:"_1hbz9ox61"},3:{defaultClass:"_1hbz9ox62"},4:{defaultClass:"_1hbz9ox63"},5:{defaultClass:"_1hbz9ox64"},6:{defaultClass:"_1hbz9ox65"},7:{defaultClass:"_1hbz9ox66"},8:{defaultClass:"_1hbz9ox67"},9:{defaultClass:"_1hbz9ox68"},10:{defaultClass:"_1hbz9ox69"},11:{defaultClass:"_1hbz9ox6a"},12:{defaultClass:"_1hbz9ox6b"},13:{defaultClass:"_1hbz9ox6c"},14:{defaultClass:"_1hbz9ox6d"},15:{defaultClass:"_1hbz9ox6e"},16:{defaultClass:"_1hbz9ox6f"},20:{defaultClass:"_1hbz9ox6g"},24:{defaultClass:"_1hbz9ox6h"},28:{defaultClass:"_1hbz9ox6i"},32:{defaultClass:"_1hbz9ox6j"},36:{defaultClass:"_1hbz9ox6k"},40:{defaultClass:"_1hbz9ox6l"},44:{defaultClass:"_1hbz9ox6m"},48:{defaultClass:"_1hbz9ox6n"},52:{defaultClass:"_1hbz9ox6o"},56:{defaultClass:"_1hbz9ox6p"},60:{defaultClass:"_1hbz9ox6q"},64:{defaultClass:"_1hbz9ox6r"},68:{defaultClass:"_1hbz9ox6s"},72:{defaultClass:"_1hbz9ox6t"},76:{defaultClass:"_1hbz9ox6u"},80:{defaultClass:"_1hbz9ox6v"},96:{defaultClass:"_1hbz9ox6w"},px:{defaultClass:"_1hbz9ox6x"},"0.25":{defaultClass:"_1hbz9ox6y"},"0.5":{defaultClass:"_1hbz9ox6z"},"0.75":{defaultClass:"_1hbz9ox70"},"1.5":{defaultClass:"_1hbz9ox71"},"2.5":{defaultClass:"_1hbz9ox72"},"3.5":{defaultClass:"_1hbz9ox73"}}},marginRight:{values:{0:{defaultClass:"_1hbz9ox74"},1:{defaultClass:"_1hbz9ox75"},2:{defaultClass:"_1hbz9ox76"},3:{defaultClass:"_1hbz9ox77"},4:{defaultClass:"_1hbz9ox78"},5:{defaultClass:"_1hbz9ox79"},6:{defaultClass:"_1hbz9ox7a"},7:{defaultClass:"_1hbz9ox7b"},8:{defaultClass:"_1hbz9ox7c"},9:{defaultClass:"_1hbz9ox7d"},10:{defaultClass:"_1hbz9ox7e"},11:{defaultClass:"_1hbz9ox7f"},12:{defaultClass:"_1hbz9ox7g"},13:{defaultClass:"_1hbz9ox7h"},14:{defaultClass:"_1hbz9ox7i"},15:{defaultClass:"_1hbz9ox7j"},16:{defaultClass:"_1hbz9ox7k"},20:{defaultClass:"_1hbz9ox7l"},24:{defaultClass:"_1hbz9ox7m"},28:{defaultClass:"_1hbz9ox7n"},32:{defaultClass:"_1hbz9ox7o"},36:{defaultClass:"_1hbz9ox7p"},40:{defaultClass:"_1hbz9ox7q"},44:{defaultClass:"_1hbz9ox7r"},48:{defaultClass:"_1hbz9ox7s"},52:{defaultClass:"_1hbz9ox7t"},56:{defaultClass:"_1hbz9ox7u"},60:{defaultClass:"_1hbz9ox7v"},64:{defaultClass:"_1hbz9ox7w"},68:{defaultClass:"_1hbz9ox7x"},72:{defaultClass:"_1hbz9ox7y"},76:{defaultClass:"_1hbz9ox7z"},80:{defaultClass:"_1hbz9ox80"},96:{defaultClass:"_1hbz9ox81"},px:{defaultClass:"_1hbz9ox82"},"0.25":{defaultClass:"_1hbz9ox83"},"0.5":{defaultClass:"_1hbz9ox84"},"0.75":{defaultClass:"_1hbz9ox85"},"1.5":{defaultClass:"_1hbz9ox86"},"2.5":{defaultClass:"_1hbz9ox87"},"3.5":{defaultClass:"_1hbz9ox88"}}}}});const yn=e=>p.jsx("div",{className:re("sid-stack",mg(e.variant),Xi({gap:e.space||"2"}),e.className),style:e.style,children:e.children});var $g=ji({defaultClassName:"_1wn0ypy0",variantClassNames:{size:{xs:"_1wn0ypy1",sm:"_1wn0ypy2",base:"_1wn0ypy3",xl:"_1wn0ypy4","2xl-title":"_1wn0ypy5"},weight:{medium:"_1wn0ypy6",semibold:"_1wn0ypy7",bold:"_1wn0ypy8"},color:{contrast:"_1wn0ypy9",tertiary:"_1wn0ypya",placeholder:"_1wn0ypyb",white:"_1wn0ypyc",success:"_1wn0ypyd",failure:"_1wn0ypye"}},defaultVariants:{size:"base",weight:"medium"},compoundVariants:[]});const Sg={text:{}},zr=D.createContext(Sg);zr.displayName="SlashIDTextContext";const Eg=({text:e,children:t})=>{const n=D.useMemo(()=>({text:e}),[e]);return p.jsx(zr.Provider,{value:n,children:t})};function kg(){const{text:e}=eo.useContext(zr);return e}const Bn={opening:"{{",closing:"}}"};function Zi(e,t){return e.includes(Bn.opening)?Object.keys(t).reduce((r,s)=>r.replace(`${Bn.opening}${s}${Bn.closing}`,t[s]),e):e}const dr=({as:e,t,tokens:n,variant:r,className:s,children:o})=>{const i=kg(),a=e||"p";return p.jsxs(a,{className:re("sid-text",`sid-text--${e}`,$g(r),s),children:[n?Zi(i[t],n):i[t],o||null]})};var Cg="iokgmp1";function Zs({width:e,height:t,minHeight:n,maxHeight:r,minWidth:s,maxWidth:o}){return p.jsx("div",{className:Cg,style:{width:e,height:t,minHeight:n,maxHeight:r,minWidth:s,maxWidth:o}})}function Ig(){const e=navigator.language.toLowerCase();return e==="ja"||e.startsWith("ja-")?"ja":"en"}const L={"footer.text":"Top-tier security by SlashID","initial.title":"Logging you in...","initial.details":"Please follow the on-screen instructions.","recover.password.title":"Reset password","recover.password.details":"Enter your new password.","recover.password.input.password.label":"Password","recover.password.input.confirmPassword.label":"Confirm password","recover.password.input.placeholder":"Type your new password","recover.password.submit":"Reset password","recover.password.validation.passwordsDoNotMatch":"Passwords do not match","recover.password.validation.length":"8-256 characters required","recover.password.validation.password_variants":"Contains word 'password'","recover.password.validation.admin_variants":"Contains word 'admin'","recover.password.validation.user_variants":"Contains word 'user'","recover.password.validation.alphanumeric_sequences_1":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.alphanumeric_sequences_2":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_sequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_subsequences_ascending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_sequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.numeric_subsequences_descending":"Illegal sequence: {{ILLEGAL_SEQUENCE}}","recover.password.validation.common_password_xkcd":"Common password","success.title":"All done!","success.details":"Please return to the website.","error.title":"Something went wrong...","error.detail":"Please log in again."},Qi={en:L,ja:{"footer.text":L["footer.text"],"initial.title":"ログイン処理を行っています。","initial.details":"処理完了後、画面は自動で切り替わります。","success.title":"認証が完了しました!","success.details":"このページを閉じて、元のページへ戻ってください。","recover.password.title":L["recover.password.title"],"recover.password.details":L["recover.password.details"],"recover.password.input.password.label":L["recover.password.input.password.label"],"recover.password.input.confirmPassword.label":L["recover.password.input.confirmPassword.label"],"recover.password.input.placeholder":L["recover.password.input.placeholder"],"recover.password.submit":L["recover.password.submit"],"recover.password.validation.passwordsDoNotMatch":L["recover.password.validation.passwordsDoNotMatch"],"recover.password.validation.length":L["recover.password.validation.length"],"recover.password.validation.password_variants":L["recover.password.validation.password_variants"],"recover.password.validation.admin_variants":L["recover.password.validation.admin_variants"],"recover.password.validation.user_variants":L["recover.password.validation.user_variants"],"recover.password.validation.alphanumeric_sequences_1":L["recover.password.validation.alphanumeric_sequences_1"],"recover.password.validation.alphanumeric_sequences_2":L["recover.password.validation.alphanumeric_sequences_2"],"recover.password.validation.numeric_sequences_ascending":L["recover.password.validation.numeric_sequences_ascending"],"recover.password.validation.numeric_subsequences_ascending":L["recover.password.validation.numeric_subsequences_ascending"],"recover.password.validation.numeric_sequences_descending":L["recover.password.validation.numeric_sequences_descending"],"recover.password.validation.numeric_subsequences_descending":L["recover.password.validation.numeric_subsequences_descending"],"recover.password.validation.common_password_xkcd":L["recover.password.validation.common_password_xkcd"],"error.title":L["error.title"],"error.detail":"再度ログインをしてください。"}},Rg=e=>t=>Qi[e][t],ea={logo:p.jsx(Ji,{}),language:"en",state:"initial",sdk:void 0},ta=D.createContext(ea),$t=()=>D.useContext(ta),Le=e=>p.jsx(dr,{...e});var Dg="_1vg0oop0",Tg="_1vg0oop1",Ag="_1vg0oop2",Og="_1vg0oop3";function zg(){const{logo:e}=$t();return p.jsx("div",{className:Og,children:e})}function Pg(){return p.jsx(Le,{t:"footer.text",variant:{size:"xs",weight:"semibold",color:"placeholder"}})}function na({children:e,className:t,header:n=p.jsx(zg,{}),footer:r=p.jsx(Pg,{})}){return p.jsxs("article",{className:re(Dg,t),children:[n&&p.jsx("header",{className:Tg,children:n}),p.jsx("div",{children:e}),r&&p.jsx("footer",{className:Ag,children:r})]})}function ra(){return p.jsx(Or,{children:p.jsx(Ki,{})})}function Lg(){return p.jsxs(p.Fragment,{children:[p.jsxs(yn,{space:"2",children:[p.jsx(Zs,{width:"75%",height:24}),p.jsx(Zs,{width:"50%",height:16})]}),p.jsx(ra,{})]})}function Ng({type:e}){return p.jsx(Or,{variant:e==="warning"?"blue":"red",shouldAnimate:!1,children:p.jsx(rg,{})})}function ur({type:e,redirectUri:t}){return t&&window.location.replace(t),p.jsxs(p.Fragment,{children:[p.jsxs(yn,{space:"0.25",children:[p.jsx(Le,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"error.title"}),p.jsx(Le,{as:"h2",t:"error.detail",variant:{color:"contrast",weight:"semibold"}})]}),p.jsx(Ng,{type:e})]})}var Mg="_8vopmj0",Ug="_8vopmj2";function Fg(){const{language:e}=$t();return D.useMemo(()=>Rg(e),[e])}function Vg(e){return`recover.password.validation.${e.failedRules[0].name}`}function Bg({errorEvent:e,password:t}){const n=e.failedRules[0];let r="";if(n.matchType==="must_not_match"){const s=n.regexp.exec(t);r=s!==null?s[0]:""}return r?{ILLEGAL_SEQUENCE:r}:{}}function qg({message:e}){return p.jsx("span",{className:Ug,children:e})}function Hg(){const e=Fg(),{sdk:t}=$t(),[n,r]=D.useState(""),[s,o]=D.useState(""),[i,a]=D.useState(null),[c,u]=D.useState("initial");D.useEffect(()=>{const l=h=>{a(Zi(e(Vg(h)),Bg({errorEvent:h,password:n}))),u("initial")};return t?.subscribe("invalidPasswordSubmitted",l),()=>{t?.unsubscribe("invalidPasswordSubmitted",l)}},[e,t,n,a]);const m=l=>{if(l.preventDefault(),!!t){if(!n||n!==s){a(e("recover.password.validation.passwordsDoNotMatch"));return}t.publish("passwordSubmitted",n),u("submitting")}},f=l=>{r(l.target.value),a(null)},d=l=>{o(l.target.value),a(null)};return p.jsxs(p.Fragment,{children:[p.jsxs(yn,{space:"0.25",children:[p.jsx(dr,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"recover.password.title"}),p.jsx(dr,{variant:{color:"contrast",weight:"semibold"},as:"h2",t:"recover.password.details"})]}),p.jsxs("form",{onSubmit:m,children:[p.jsxs("div",{className:Mg,children:[p.jsx(Ys,{id:"password-input",label:e("recover.password.input.password.label"),placeholder:e("recover.password.input.placeholder"),name:"password",value:n??"",onChange:f,error:!!i,autoComplete:"new-password"}),p.jsx(Ys,{id:"password-input-confirm",label:e("recover.password.input.confirmPassword.label"),placeholder:e("recover.password.input.placeholder"),name:"passwordConfirm",value:s??"",onChange:d,className:Xi({marginTop:"4"}),error:!!i,autoComplete:"new-password"}),i&&p.jsx(qg,{message:i})]}),p.jsx(Yi,{type:"submit",variant:"primary",testId:"sid-form-initial-submit-button",disabled:c==="submitting",loading:c==="submitting",children:e("recover.password.submit")})]})]})}class Gg extends Error{errors;constructor(t){super(t.length>0?t[0].message:"Unknown SlashID error"),this.errors=t}}function Wg(e){return!!(typeof e=="object"&&e!==null&&"errors"in e&&Array.isArray(e.errors))}function sa(e){if(e instanceof Error)return e;if(Wg(e))return new Gg(e.errors);let t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch{}return new Error(`This value was thrown as is, not through an Error: ${t}`)}function Kg({onSuccess:e,onError:t,flowType:n,onRedirectDiscovered:r}){const{sdk:s}=$t();return D.useEffect(()=>{if(!s)return;r&&s?.subscribe("redirectUriDiscovered",r);async function o(){try{await s?.getUserFromURL(),e()}catch(i){const a=sa(i);on(a),t({error:a})}}return o(),()=>{r&&s.unsubscribe("redirectUriDiscovered",r)}},[n,t,e,s]),n==="password-recovery"?p.jsx(Hg,{}):p.jsxs(p.Fragment,{children:[p.jsxs(yn,{space:"0.25",children:[p.jsx(Le,{as:"h1",variant:{size:"2xl-title",weight:"bold"},t:"initial.title"}),p.jsx(Le,{variant:{color:"contrast",weight:"semibold"},as:"h2",t:"initial.details"})]}),p.jsx(ra,{})]})}const Yg=()=>p.jsx(Or,{children:p.jsx("svg",{width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.8505 0.705985C20.6342 1.38283 20.7209 2.56684 20.044 3.35055L8.16908 17.1005C7.80192 17.5256 7.2635 17.7637 6.70195 17.7493C6.1404 17.7349 5.61489 17.4695 5.27002 17.0261L0.895049 11.4011C0.259296 10.5837 0.406547 9.4057 1.22394 8.76995C2.04134 8.13419 3.21935 8.28145 3.8551 9.09884L6.82592 12.9185L17.2059 0.89949C17.8828 0.115778 19.0668 0.0291434 19.8505 0.705985Z",fill:"white"})})});function Jg({redirectUri:e}={}){return e&&window.location.replace(e),p.jsxs("article",{"data-testid":"sid-form-success-state",children:[p.jsx(Le,{as:"h1",t:"success.title",variant:{size:"2xl-title",weight:"bold"}}),p.jsx(Le,{as:"h2",t:"success.details",variant:{color:"contrast",weight:"semibold"}}),p.jsx(Yg,{})]})}function jg(e){return e.some(t=>t.type==="password_reset")}function Xg(e){return jg(e)?"password-recovery":"catch-all"}function Zg(){const[e,t]=D.useState({state:"initial"}),{sdk:n,state:r}=$t();D.useEffect(()=>{if(e.state!=="initial")return;async function u(){if(!n)return;t({state:"parsing-url"});let m=[];try{m=await n.getChallengesFromURL()}catch(d){on(sa(d))}if(!m){t({state:"no-challenges",challenges:null});return}const f=Xg(m);t({state:"progress",challenges:m,flowType:f})}u()},[r,e.state,n]);const s=()=>{e.state==="progress"&&t({state:"success",challenges:e.challenges,flowType:e.flowType})},o=({error:u})=>{e.state==="progress"&&t({state:"error",challenges:e.challenges,flowType:e.flowType,error:u})},[i,a]=D.useState(void 0),c=u=>{a(u.redirectUri)};return p.jsxs(na,{children:[(r!=="ready"||e.state==="parsing-url")&&p.jsx(Lg,{}),r==="ready"&&p.jsxs(p.Fragment,{children:[e.state==="progress"&&p.jsx(Kg,{onSuccess:s,onError:o,flowType:e.flowType,onRedirectDiscovered:c}),e.state==="no-challenges"&&p.jsx(ur,{type:"warning"}),e.state==="success"&&p.jsx(Jg,{redirectUri:i}),e.state==="error"&&p.jsx(ur,{type:"error",redirectUri:i})]})]})}var Qg="d0vxn40";const Qs={sdkURL:"https://jump.slashid.local/sdk.html",baseURL:"https://api.slashid.local"};function nm(){const e=Hi(),[t,n]=D.useState("initial"),r=D.useRef(void 0);D.useEffect(()=>{t==="initial"&&(kp({dsn:"https://6435e8a20ba8b61404fb4621d2aedd4a@o4505317722619904.ingest.sentry.io/4506275681075200"}),r.current=new Gt({analyticsEnabled:!1,sdkURL:Qs.sdkURL,baseURL:Qs.baseURL}),n("ready"))},[t]);const s=D.useMemo(()=>!e||t=="initial"?ea:{logo:p.jsx(Ji,{}),language:Ig(),state:t,sdk:r.current},[t,e]);return p.jsx(Hp,{theme:"light",children:p.jsx(Tr,{fallback:p.jsx(na,{children:p.jsx(ur,{type:"error"})}),children:p.jsx(ta.Provider,{value:s,children:p.jsx(Eg,{text:Qi[s.language],children:p.jsx("main",{className:Qg,children:p.jsx(Zg,{})})})})})})}export{nm as App};