@slashid/slashid
Version:
Client SDK for the /id platform
286 lines • 201 kB
JavaScript
!function(){function e(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var t,r,n,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a={},o={},s=i.parcelRequire91fc;null==s&&((s=function(e){if(e in a)return a[e].exports;if(e in o){var t=o[e];delete o[e];var r={id:e,exports:{}};return a[e]=r,t.call(r.exports,r,r.exports),r.exports}var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}).register=function(e,t){o[e]=t},i.parcelRequire91fc=s),(0,s.register)("81oe6",function(e,t){!/////////////////////////////////////////////////////////////////////////////////
/* UAParser.js v1.0.37
Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
MIT License *//*
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
Supports browser & node.js environment.
Demo : https://faisalman.github.io/ua-parser-js
Source : https://github.com/faisalman/ua-parser-js *//////////////////////////////////////////////////////////////////////////////////
function(r,n){//////////////
// Constants
/////////////
var i="function",a="undefined",o="object",s="string",l="major",d="model",u="name",c="type",h="vendor",p="version",w="architecture",m="console",g="mobile",f="tablet",v="smarttv",y="wearable",_="embedded",b="Amazon",I="Apple",k="ASUS",S="BlackBerry",D="Browser",R="Chrome",E="Firefox",C="Google",A="Huawei",P="Microsoft",T="Motorola",x="Opera",O="Samsung",q="Sharp",U="Sony",L="Xiaomi",V="Zebra",F="Facebook",N="Chromium OS",B="Mac OS",j=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},M=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},z=function(e,t){return typeof e===s&&-1!==$(t).indexOf($(e))},$=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},W=function(e,t){// loop through all regexes maps
for(var r,a,s,l,d,u,c=0;c<t.length&&!d;){var h=t[c],p=t[c+1];// odd sequence (1,3,5,..)
// try matching uastring with regexes
for(r=a=0;r<h.length&&!d&&h[r];)if(d=h[r++].exec(e))for(s=0;s<p.length;s++)u=d[++a],typeof(l=p[s])===o&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,u):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=u?u.replace(l[1],l[2]):n:this[l[0]]=u?l[1].call(this,u,l[2]):n:4===l.length&&(this[l[0]]=u?l[3].call(this,u.replace(l[1],l[2])):n):this[l]=u||n;c+=2}},H=function(e,t){for(var r in t)// check if current value is array
if(typeof t[r]===o&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(z(t[r][i],e))return"?"===r?n:r}else if(z(t[r],e))return"?"===r?n:r;return e},K={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"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i// Chrome for Android/iOS
],[p,[u,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i// Microsoft Edge
],[p,[u,"Edge"]],[// Presto based
/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i// Opera
],[u,p],[/opios[\/ ]+([\w\.]+)/i// Opera mini on iphone >= 8.0
],[p,[u,x+" Mini"]],[/\bopr\/([\w\.]+)/i// Opera Webkit
],[p,[u,x]],[// Mixed
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i// Baidu
],[p,[u,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,// Trident based
/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,// Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
/(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,// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i// Weibo
],[u,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i// UCBrowser
],[p,[u,"UC"+D]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i// WeChat
],[p,[u,"WeChat"]],[/konqueror\/([\w\.]+)/i// Konqueror
],[p,[u,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i// IE11
],[p,[u,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i// Yandex
],[p,[u,"Yandex"]],[/slbrowser\/([\w\.]+)/i// Smart Lenovo Browser
],[p,[u,"Smart Lenovo "+D]],[/(avast|avg)\/([\w\.]+)/i// Avast/AVG Secure Browser
],[[u,/(.+)/,"$1 Secure "+D],p],[/\bfocus\/([\w\.]+)/i// Firefox Focus
],[p,[u,E+" Focus"]],[/\bopt\/([\w\.]+)/i// Opera Touch
],[p,[u,x+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i// Coc Coc Browser
],[p,[u,"Coc Coc"]],[/dolfin\/([\w\.]+)/i// Dolphin
],[p,[u,"Dolphin"]],[/coast\/([\w\.]+)/i// Opera Coast
],[p,[u,x+" Coast"]],[/miuibrowser\/([\w\.]+)/i// MIUI Browser
],[p,[u,"MIUI "+D]],[/fxios\/([-\w\.]+)/i// Firefox for iOS
],[p,[u,E]],[/\bqihu|(qi?ho?o?|360)browser/i// 360
],[[u,"360 "+D]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[u,/(.+)/,"$1 "+D],p],[/samsungbrowser\/([\w\.]+)/i// Samsung Internet
],[p,[u,O+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i// Comodo Dragon
],[[u,/_/g," "],p],[/metasr[\/ ]?([\d\.]+)/i// Sogou Explorer
],[p,[u,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i// Sogou Mobile
],[[u,"Sogou Mobile"],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i// QQBrowser/2345 Browser
],[u,p],[/(lbbrowser)/i,/\[(linkedin)app\]/i// LinkedIn App for iOS & Android
],[u],[// WebView
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i// Facebook App for iOS & Android
],[[u,F],p],[/(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// Chromium/Instagram/Snapchat
],[u,p],[/\bgsa\/([\w\.]+) .*safari\//i// Google Search Appliance on iOS
],[p,[u,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i// TikTok
],[p,[u,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i// Chrome Headless
],[p,[u,R+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i// Chrome WebView
],[[u,R+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i// Android Browser
],[p,[u,"Android "+D]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i// Chrome/OmniWeb/Arora/Tizen/Nokia
],[u,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i// Mobile Safari
],[p,[u,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i// Safari & Safari Mobile
],[p,u],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i// Safari < 3.0
],[u,[p,H,{"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[u,p],[// Gecko based
/(navigator|netscape\d?)\/([-\w\.]+)/i// Netscape
],[[u,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i// Firefox Reality
],[p,[u,E+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,// IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar
/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,// Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,// Other
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
/(links) \(([\w\.]+)/i,/panasonic;(viera)/i// Panasonic Viera
],[u,p],[/(cobalt)\/([\w\.]+)/i// Cobalt
],[u,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i// AMD64 (x64)
],[[w,"amd64"]],[/(ia32(?=;))/i// IA32 (quicktime)
],[[w,$]],[/((?:i[346]|x)86)[;\)]/i// IA32 (x86)
],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i// ARM64
],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i// ARMHF
],[[w,"armhf"]],[// PocketPC mistakenly identified as PowerPC
/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i// PowerPC
],[[w,/ower/,"",$]],[/(sun4\w)[;\)]/i// SPARC
],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,$]]],device:[[//////////////////////////
// MOBILES & TABLETS
/////////////////////////
// Samsung
/\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,[h,O],[c,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[h,O],[c,g]],[// Apple
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i// iPod/iPhone
],[d,[h,I],[c,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[h,I],[c,f]],[/(macintosh);/i],[d,[h,I]],[// Sharp
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[h,q],[c,g]],[// Huawei
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[h,A],[c,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[h,A],[c,g]],[// Xiaomi
/\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// Xiaomi Mi
],[[d,/_/g," "],[h,L],[c,g]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i// Mi Pad tablets
],[[d,/_/g," "],[h,L],[c,f]],[// OPPO
/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[h,"OPPO"],[c,g]],[// Vivo
/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[h,"Vivo"],[c,g]],[// Realme
/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[h,"Realme"],[c,g]],[// Motorola
/\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,[h,T],[c,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[h,T],[c,f]],[// LG
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[h,"LG"],[c,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[h,"LG"],[c,g]],[// Lenovo
/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[h,"Lenovo"],[c,f]],[// Nokia
/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[h,"Nokia"],[c,g]],[// Google
/(pixel c)\b/i// Google Pixel C
],[d,[h,C],[c,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i// Google Pixel
],[d,[h,C],[c,g]],[// Sony
/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,[h,U],[c,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[h,U],[c,f]],[// OnePlus
/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[h,"OnePlus"],[c,g]],[// Amazon
/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i// Kindle Fire HD
],[d,[h,b],[c,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i// Fire Phone
],[[d,/(.+)/g,"Fire Phone $1"],[h,b],[c,g]],[// BlackBerry
/(playbook);[-\w\),; ]+(rim)/i// BlackBerry PlayBook
],[d,h,[c,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i// BlackBerry 10
],[d,[h,S],[c,g]],[// Asus
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[h,k],[c,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[h,k],[c,g]],[// HTC
/(nexus 9)/i// HTC Nexus 9
],[d,[h,"HTC"],[c,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,// ZTE
/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i// Alcatel/GeeksPhone/Nexian/Panasonic/Sony
],[h,[d,/_/g," "],[c,g]],[// Acer
/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[h,"Acer"],[c,f]],[// Meizu
/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[h,"Meizu"],[c,g]],[// Ulefone
/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[h,"Ulefone"],[c,g]],[// MIXED
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i// OPPO
],[h,d,[c,g]],[/(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// Vodafone
],[h,d,[c,f]],[/(surface duo)/i// Surface Duo
],[d,[h,P],[c,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i// Fairphone
],[d,[h,"Fairphone"],[c,g]],[/(u304aa)/i// AT&T
],[d,[h,"AT&T"],[c,g]],[/\bsie-(\w*)/i// Siemens
],[d,[h,"Siemens"],[c,g]],[/\b(rct\w+) b/i// RCA Tablets
],[d,[h,"RCA"],[c,f]],[/\b(venue[\d ]{2,7}) b/i// Dell Venue Tablets
],[d,[h,"Dell"],[c,f]],[/\b(q(?:mv|ta)\w+) b/i// Verizon Tablet
],[d,[h,"Verizon"],[c,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i// Barnes & Noble Tablet
],[d,[h,"Barnes & Noble"],[c,f]],[/\b(tm\d{3}\w+) b/i],[d,[h,"NuVision"],[c,f]],[/\b(k88) b/i// ZTE K Series Tablet
],[d,[h,"ZTE"],[c,f]],[/\b(nx\d{3}j) b/i// ZTE Nubia
],[d,[h,"ZTE"],[c,g]],[/\b(gen\d{3}) b.+49h/i// Swiss GEN Mobile
],[d,[h,"Swiss"],[c,g]],[/\b(zur\d{3}) b/i// Swiss ZUR Tablet
],[d,[h,"Swiss"],[c,f]],[/\b((zeki)?tb.*\b) b/i// Zeki Tablets
],[d,[h,"Zeki"],[c,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i// Dragon Touch Tablet
],[[h,"Dragon Touch"],d,[c,f]],[/\b(ns-?\w{0,9}) b/i// Insignia Tablets
],[d,[h,"Insignia"],[c,f]],[/\b((nxa|next)-?\w{0,9}) b/i// NextBook Tablets
],[d,[h,"NextBook"],[c,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i// Voice Xtreme Phones
],[[h,"Voice"],d,[c,g]],[/\b(lvtel\-)?(v1[12]) b/i// LvTel Phones
],[[h,"LvTel"],d,[c,g]],[/\b(ph-1) /i// Essential PH-1
],[d,[h,"Essential"],[c,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i// Envizen Tablets
],[d,[h,"Envizen"],[c,f]],[/\b(trio[-\w\. ]+) b/i// MachSpeed Tablets
],[d,[h,"MachSpeed"],[c,f]],[/\btu_(1491) b/i// Rotor Tablets
],[d,[h,"Rotor"],[c,f]],[/(shield[\w ]+) b/i// Nvidia Shield Tablets
],[d,[h,"Nvidia"],[c,f]],[/(sprint) (\w+)/i// Sprint Phones
],[h,d,[c,g]],[/(kin\.[onetw]{3})/i// Microsoft Kin
],[[d,/\./g," "],[h,P],[c,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i// Zebra
],[d,[h,V],[c,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[h,V],[c,g]],[///////////////////
// SMARTTVS
///////////////////
/smart-tv.+(samsung)/i// Samsung
],[h,[c,v]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[h,O],[c,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i// LG SmartTV
],[[h,"LG"],[c,v]],[/(apple) ?tv/i// Apple TV
],[h,[d,I+" TV"],[c,v]],[/crkey/i// Google Chromecast
],[[d,R+"cast"],[h,C],[c,v]],[/droid.+aft(\w+)( bui|\))/i// Fire TV
],[d,[h,b],[c,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i// Sharp
],[d,[h,q],[c,v]],[/(bravia[\w ]+)( bui|\))/i// Sony
],[d,[h,U],[c,v]],[/(mitv-\w{5}) bui/i// Xiaomi
],[d,[h,L],[c,v]],[/Hbbtv.*(technisat) (.*);/i// TechniSAT
],[h,d,[c,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i// HbbTV devices
],[[h,G],[d,G],[c,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i// SmartTV from Unidentified Vendors
],[[c,v]],[///////////////////
// CONSOLES
///////////////////
/(ouya)/i,/(nintendo) ([wids3utch]+)/i// Nintendo
],[h,d,[c,m]],[/droid.+; (shield) bui/i// Nvidia
],[d,[h,"Nvidia"],[c,m]],[/(playstation [345portablevi]+)/i// Playstation
],[d,[h,U],[c,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i// Microsoft Xbox
],[d,[h,P],[c,m]],[///////////////////
// WEARABLES
///////////////////
/((pebble))app/i// Pebble
],[h,d,[c,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i// Apple Watch
],[d,[h,I],[c,y]],[/droid.+; (glass) \d/i// Google Glass
],[d,[h,C],[c,y]],[/droid.+; (wt63?0{2,3})\)/i],[d,[h,V],[c,y]],[/(quest( 2| pro)?)/i// Oculus Quest
],[d,[h,F],[c,y]],[///////////////////
// EMBEDDED
///////////////////
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i// Tesla
],[h,[c,_]],[/(aeobc)\b/i// Echo Dot
],[d,[h,b],[c,_]],[////////////////////
// MIXED (GENERIC)
///////////////////
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i// Android Phones from Unidentified Vendors
],[d,[c,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i// Android Tablets from Unidentified Vendors
],[d,[c,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i// Unidentifiable Tablet
],[[c,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i// Unidentifiable Mobile
],[[c,g]],[/(android[-\w\. ]{0,9});.+buil/i// Generic Android Device
],[d,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i// EdgeHTML
],[p,[u,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i// Blink
],[p,[u,"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],[u,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i// Gecko
],[p,u]],os:[[// Windows
/microsoft (windows) (vista|xp)/i// Windows (iTunes)
],[u,p],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i// Windows Phone
],[u,[p,H,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,H,K],[u,"Windows"]],[// iOS/macOS
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[u,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i// Mac OS
],[[u,B],[p,/_/g,"."]],[// Mobile OSes
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i// Android-x86/HarmonyOS
],[p,u],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i// Series 40
],[u,p],[/\(bb(10);/i// BlackBerry 10
],[p,[u,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i// Symbian
],[p,[u,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i// Firefox OS
],[p,[u,E+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i// WebOS
],[p,[u,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i// watchOS
],[p,[u,"watchOS"]],[// Google Chromecast
/crkey\/([\d\.]+)/i// Google Chromecast
],[p,[u,R+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i// Chromium OS
],[[u,N],p],[// Smart TVs
/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,// Console
/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,// Other
/\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,// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i// Haiku
],[u,p],[/(sunos) ?([\w\.\d]*)/i// Solaris
],[[u,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i// UNIX
],[u,p]]},Y=function(e,t){if(typeof e===o&&(t=e,e=n),!(this instanceof Y))return new Y(e,t).getResult();var m=typeof r!==a&&r.navigator?r.navigator:n,v=e||(m&&m.userAgent?m.userAgent:""),y=m&&m.userAgentData?m.userAgentData:n,_=t?j(J,t):J,b=m&&m.userAgent==v;return this.getBrowser=function(){var e,t={};return t[u]=n,t[p]=n,W.call(t,v,_.browser),t[l]=typeof(e=t[p])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:n,b&&m&&m.brave&&typeof m.brave.isBrave==i&&(t[u]="Brave"),t},this.getCPU=function(){var e={};return e[w]=n,W.call(e,v,_.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[d]=n,e[c]=n,W.call(e,v,_.device),b&&!e[c]&&y&&y.mobile&&(e[c]=g),b&&"Macintosh"==e[d]&&m&&typeof m.standalone!==a&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[d]="iPad",e[c]=f),e},this.getEngine=function(){var e={};return e[u]=n,e[p]=n,W.call(e,v,_.engine),e},this.getOS=function(){var e={};return e[u]=n,e[p]=n,W.call(e,v,_.os),b&&!e[u]&&y&&"Unknown"!=y.platform&&(e[u]=y.platform.replace(/chrome os/i,N).replace(/macos/i,B)),e},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 v},this.setUA=function(e){return v=typeof e===s&&e.length>500?G(e,500):e,this},this.setUA(v),this};Y.VERSION="1.0.37",Y.BROWSER=M([u,p,l]),Y.CPU=M([w]),Y.DEVICE=M([d,h,c,m,g,v,f,y,_]),Y.ENGINE=Y.OS=M([u,p]),typeof t!==a?(e.exports&&(t=e.exports=Y),t.UAParser=Y):typeof define===i&&define.amd?define(function(){return Y}):typeof r!==a&&(r.UAParser=Y);// jQuery/Zepto specific (optional)
// Note:
// In AMD env the global scope should be kept clean, but jQuery is an exception.
// jQuery always exports to global scope, unless jQuery.noConflict(true) is used,
// and we should catch that.
var X=typeof r!==a&&(r.jQuery||r.Zepto);if(X&&!X.ua){var Z=new Y;X.ua=Z.getResult(),X.ua.get=function(){return Z.getUA()},X.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)X.ua[r]=t[r]}}}("object"==typeof window?window:this)});// TODO generate on build from git tag
var l={};l=JSON.parse('{"name":"@slashid/slashid","private":false,"publishConfig":{"access":"public"},"version":"3.29.6","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":{"@changesets/cli":"^2.28.1","@parcel/core":"2.12.0","@parcel/packager-ts":"2.12.0","@parcel/resolver-default":"^2.13.2","@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.42.1","@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","https-proxy-agent":"^7.0.5","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":{"@types/uuid":"8.3.4","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"},"resolutions":{"@babel/runtime":"7.26.10","@babel/helpers":"7.26.10"}}');let[d,u,c]=(0,l.version).split("."),h={major:d,minor:u,patch:c,raw:l.version},p="https://api.slashid.com".replace(/\/+$/,"");class w{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return null!=this.configuration.basePath?this.configuration.basePath:p}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||function e(t,r=""){return Object.keys(t).map(n=>(function t(r,n,i=""){let a=i+(i.length?`[${r}]`:r);if(n instanceof Array){let e=n.map(e=>encodeURIComponent(String(e))).join(`&${encodeURIComponent(a)}=`);return`${encodeURIComponent(a)}=${e}`}if(n instanceof Set){let e=Array.from(n);return t(r,e,i)}return n instanceof Date?`${encodeURIComponent(a)}=${encodeURIComponent(n.toISOString())}`:n instanceof Object?e(n,a):`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`})(n,t[n],r)).filter(e=>e.length>0).join("&")}}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){let e=this.configuration.apiKey;if(e)return"function"==typeof e?e:()=>e}get accessToken(){let e=this.configuration.accessToken;if(e)return"function"==typeof e?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}let m=new w;class g{static #e=this.jsonRegex=RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");constructor(e=m){this.configuration=e,this.fetchApi=async(e,t)=>{let r,n={url:e,init:t};for(let e of this.middleware)e.pre&&(n=await e.pre({fetch:this.fetchApi,...n})||n);try{r=await (this.configuration.fetchApi||fetch)(n.url,n.init)}catch(e){for(let t of this.middleware)t.onError&&(r=await t.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:e,response:r?r.clone():void 0})||r);if(void 0===r){if(e instanceof Error)throw new v(e,"The request failed and the interceptors did not return an alternative response");throw e}}for(let e of this.middleware)e.post&&(r=await e.post({fetch:this.fetchApi,url:n.url,init:n.init,response:r.clone()})||r);return r},this.middleware=e.middleware}withMiddleware(...e){let t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){let t=e.map(e=>({pre:e}));return this.withMiddleware(...t)}withPostMiddleware(...e){let t=e.map(e=>({post:e}));return this.withMiddleware(...t)}/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/isJsonMime(e){return!!e&&g.jsonRegex.test(e)}async request(e,t){let{url:r,init:n}=await this.createFetchParams(e,t),i=await this.fetchApi(r,n);if(i&&i.status>=200&&i.status<300)return i;throw new f(i,"Response returned an error code")}async createFetchParams(e,t){var r,n;let i=this.configuration.basePath+e.path;void 0!==e.query&&0!==Object.keys(e.query).length&&// this is done to avoid urls ending with a "?" character which buggy webservers
// do not handle correctly sometimes.
(i+="?"+this.configuration.queryParamsStringify(e.query));let a=Object.assign({},this.configuration.headers,e.headers);Object.keys(a).forEach(e=>void 0===a[e]?delete a[e]:{});let o={method:e.method,headers:a,body:e.body,credentials:this.configuration.credentials},s={...o,...await ("function"==typeof t?t:async()=>t)({init:o,context:e})},l={...s,body:(r=s.body,"undefined"!=typeof FormData&&r instanceof FormData||s.body instanceof URLSearchParams||(n=s.body,"undefined"!=typeof Blob&&n instanceof Blob))?s.body:JSON.stringify(s.body)};return{url:i,init:l}}/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/clone(){let e=this.constructor,t=new e(this.configuration);return t.middleware=this.middleware.slice(),t}}class f extends Error{constructor(e,t){super(t),this.response=e,this.name="ResponseError"}}class v extends Error{constructor(e,t){super(t),this.cause=e,this.name="FetchError"}}class y extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}let _={csv:","};function b(e,t){let r=e[t];return null!=r}class I{constructor(e,t=e=>e){this.raw=e,this.transformer=t}async value(){return this.transformer(await this.raw.json())}}class k{constructor(e){this.raw=e}async value(){}}function S(e){return function(e,t){var r;return null==e?e:{pagination:b(e,"pagination")?null==(r=e.pagination)?r:{limit:r.limit,offset:r.offset,total_count:r.total_count}:void 0}}(e,0)}function D(e){return null==e?e:{httpcode:b(e,"httpcode")?e.httpcode:void 0,message:b(e,"message")?e.message:void 0}}function R(e){return null==e?e:{meta:b(e,"meta")?S(e.meta):void 0,errors:b(e,"errors")?e.errors.map(D):void 0}}/* tslint:disable *//* eslint-disable *//**
* SlashID API v1.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*//* tslint:disable *//* eslint-disable *//**
* SlashID API v1.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*//* tslint:disable *//* eslint-disable *//**
* SlashID API v1.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*//**
*
* @export
*/let E={UiCustomization:"ui_customization",AuthnContextUpdate:"authn_context_update",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 C(e){return e}function A(e){if(void 0!==e){if(null===e)return null;switch(e.challenge_type){case"nonce":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:function(e){if(void 0!==e)return null===e?null:{challenge:e.challenge}}(e.data)}}(e);case"otp":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:function(e){if(void 0!==e)return null===e?null:{otp:e.otp}}(e.data)}}(e);case"password_reset":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:function(e){if(void 0!==e)return null===e?null:{password:e.password}}(e.data)}}(e);case"password_set":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:function(e){if(void 0!==e)return null===e?null:{password:e.password}}(e.data)}}(e);case"password_verify":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:function(e){if(void 0!==e)return null===e?null:{password:e.password}}(e.data)}}(e);case"totp_register":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:function(e){if(void 0!==e)return null===e?null:{otp:e.otp}}(e.data)}}(e);case"totp_verify":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:function(e){if(void 0!==e)return null===e?null:{otp:e.otp}}(e.data)}}(e);case"webauthn_create":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}(e);case"webauthn_get":return function(e){if(void 0!==e)return null===e?null:{challenge_id:e.challenge_id,challenge_type:e.challenge_type,data:e.data}}(e);default:throw Error(`No variant of Attestation exists with 'challenge_type=${e.challenge_type}'`)}}}/* tslint:disable *//* eslint-disable *//**
* SlashID API v1.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*//* tslint:disable *//* eslint-disable *//**
* SlashID API v1.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*//**
* Allowed login factor
* @export
*/let P={Webauthn:"webauthn",EmailLink:"email_link",SmsLink:"sms_link",OtpViaSms:"otp_via_sms",OtpViaEmail:"otp_via_email",Totp:"totp",Oidc:"oidc",Saml:"saml",Password:"password"};function T(e){return e}function x(e){return e}/* tslint:disable *//* eslint-disable *//**
* SlashID API v1.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*//* tslint:disable *//* eslint-disable *//**
* SlashID API v1.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*//**
*
* @export
*/let O={EmailAddress:"email_address",PhoneNumber:"phone_number",Username:"username"};function q(e){return function(e,t){var r;return null==e?e:{type:r=e.type,value:e.value}}(e,0)}function U(e){if(void 0!==e)return null===e?null:{type:e.type,value:e.value}}/* tslint:disable *//* eslint-disable *//**
* SlashID API v1.1
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*//**
* Determines how the OIDC login page is presented to the user; defaults to popup.
* @export
*/let L={Popup:"popup",Redirect:"redirect"},V={Popup:"popup",Redirect:"redirect"},F={None:"none"},N={Any:"any",Platform:"platform"},B={Preferred:"preferred"},j={Preferred:"preferred"};function M(e){if(void 0!==e)return null===e?null:{method:x(e.method),options:function(e){if(void 0!==e){if(null===e)return null;switch(e.method){case"email_link":return function(e){if(void 0!==e)return null===e?null:{method:x(e.method),redirect_target:e.redirect_target}}(e);case"oidc":return function(e){if(void 0!==e)return null===e?null:{method:x(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}}(e);case"otp_via_email":return function(e){if(void 0!==e)return null===e?null:{method:x(e.method)}}(e);case"otp_via_sms":return function(e){if(void 0!==e)return null===e?null:{method:x(e.method)}}(e);case"password":return function(e){if(void 0!==e)return null===e?null:{method:x(e.method)}}(e);case"saml":return function(e){if(void 0!==e)return null===e?null:{method:x(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}}(e);case"sms_link":return function(e){if(void 0!==e)return null===e?null:{method:x(e.method),redirect_target:e.redirect_target}}(e);case"totp":return function(e){if(void 0!==e)return null===e?null:{method:x(e.method)}}(e);case"webauthn":return function(e){if(void 0!==e)return null===e?null:{method:x(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}}(e);default:throw Error(`No variant of FactorOptions exists with 'method=${e.method}'`)}}}(e.options)}}function z(e){return e}function $(e){return function(e,t){var r,n;return null==e?e:{name:r=e.name,pattern:e.pattern,match_type:n=e.match_type,pattern_qualifiers:b(e,"pattern_qualifiers")?e.pattern_qualifiers.map(z):void 0}}(e,0)}function G(e,t){return null==e?e:{regular_expressions:b(e,"regular_expressions")?e.regular_expressions.map($):void 0}}function W(e){return function(e,t){if(null==e)return e;switch(e.type){case"authn_context_update":return{...null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:function(e,t){var r;return null==e?e:{target_org_id:e.target_org_id,factor:b(e,"factor")?null==(r=e.factor)?r:{method:b(r,"method")?T(r.method):void 0,options:b(r,"options")?function(e,t){if(null==e)return e;switch(e.method){case"email_link":return{...null==e?e:{method:T(e.method),redirect_target:b(e,"redirect_target")?e.redirect_target:void 0},method:"email_link"};case"oidc":return{...function(e,t){var r,n,i;return null==e?e:{method:T(e.method),client_id:e.client_id,provider:r=e.provider,ux_mode:b(e,"ux_mode")?n=e.ux_mode:void 0,redirect_target:b(e,"redirect_target")?e.redirect_target:void 0,requires_groups:b(e,"requires_groups")?i=e.requires_groups:void 0,pkce_code_challenge:b(e,"pkce_code_challenge")?e.pkce_code_challenge:void 0,csrf_token:b(e,"csrf_token")?e.csrf_token:void 0}}(e,0),method:"oidc"};case"otp_via_email":return{...null==e?e:{method:T(e.method)},method:"otp_via_email"};case"otp_via_sms":return{...null==e?e:{method:T(e.method)},method:"otp_via_sms"};case"password":return{...null==e?e:{method:T(e.method)},method:"password"};case"saml":return{...function(e,t){var r;return null==e?e:{method:T(e.method),provider_credentials_id:e.provider_credentials_id,ux_mode:b(e,"ux_mode")?r=e.ux_mode:void 0,redirect_target:b(e,"redirect_target")?e.redirect_target:void 0,pkce_code_challenge:b(e,"pkce_code_challenge")?e.pkce_code_challenge:void 0,csrf_token:b(e,"csrf_token")?e.csrf_token:void 0}}(e,0),method:"saml"};case"sms_link":return{...null==e?e:{method:T(e.method),redirect_target:b(e,"redirect_target")?e.redirect_target:void 0},method:"sms_link"};case"totp":return{...null==e?e:{method:T(e.method)},method:"totp"};case"webauthn":return{...function(e,t){var r,n,i,a;return null==e?e:{method:T(e.method),scope:b(e,"scope")?e.scope:void 0,available_credential_ids:b(e,"available_credential_ids")?e.available_credential_ids:void 0,attachment:b(e,"attachment")?r=e.attachment:void 0,user_verification:b(e,"user_verification")?n=e.user_verification:void 0,resident_key:b(e,"resident_key")?i=e.resident_key:void 0,attestation:b(e,"attestation")?a=e.attestation:void 0}}(e,0),method:"webauthn"};default:throw Error(`No variant of FactorOptions exists with 'method=${e.method}'`)}}(r.options,0):void 0}:void 0}}(e.options,0)},type:"authn_context_update"};case"nonce":return{...function(e,t){var r;return null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:b(e,"options")?null==(r=e.options)?r:{challenge:b(r,"challenge")?r.challenge:void 0}:void 0}}(e,0),type:"nonce"};case"oidc":return{...function(e,t){var r;return null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:null==(r=e.options)?r:{auth_code_url:r.auth_code_url}}}(e,0),type:"oidc"};case"otp":return{...null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method)},type:"otp"};case"password_reset":return{...function(e,t){var r;return null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:null==(r=e.options)?r:{validation_rules:G(r.validation_rules,!1)}}}(e,0),type:"password_reset"};case"password_set":return{...function(e,t){var r;return null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:null==(r=e.options)?r:{validation_rules:G(r.validation_rules,!1)}}}(e,0),type:"password_set"};case"password_verify":return{...null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method)},type:"password_verify"};case"proxy":return{...function(e,t){var r;return null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:b(e,"options")?null==(r=e.options)?r:{challenge_id:b(r,"challenge_id")?r.challenge_id:void 0}:void 0}}(e,0),type:"proxy"};case"saml":return{...function(e,t){var r;return null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:null==(r=e.options)?r:{start_authentication_url:r.start_authentication_url}}}(e,0),type:"saml"};case"totp_register":return{...function(e,t){var r;return null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:b(e,"options")?null==(r=e.options)?r:{key_uri:r.key_uri,qr_code_data_b64:r.qr_code_data_b64,recovery_codes:r.recovery_codes}:void 0}}(e,0),type:"totp_register"};case"totp_verify":return{...null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method)},type:"totp_verify"};case"ui_customization":return{...function(e,t){var r;return null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:b(e,"options")?null==(r=e.options)?r:{authn_redirect_page_ui_config:b(r,"authn_redirect_page_ui_config")?r.authn_redirect_page_ui_config:void 0}:void 0}}(e,0),type:"ui_customization"};case"webauthn_create":return{...null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:b(e,"options")?e.options:void 0},type:"webauthn_create"};case"webauthn_get":return{...null==e?e:{id:e.id,type:C(e.type),authentication_method:T(e.authentication_method),options:b(e,"options")?e.options:void 0},type:"webauthn_get"};default:throw Error(`No variant of ChallengeListInner exists with 'type=${e.type}'`)}}(e,0)}function H(e){if(void 0!==e)return null===e?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:function(e){if(void 0!==e){if(null===e)return null;switch(e.event_name){case"AuthenticationFailed_v1":return function(e){if(void 0!==e)return null===e?null:{event_name:e.event_name,person_id:e.person_id,authenticated_methods:void 0===e.authenticated_methods?void 0:e.authenticated_methods.map(x),failed_authn_method:x(e.failed_authn_method),failure_reason:e.failure_reason,failure_detail:e.failure_detail,handle:U(e.handle),challenge_id:e.challenge_id}}(e);case"AuthenticationSucceeded_v1":return function(e){if(void 0!==e)return null===e?null:{event_name:e.event_name,person_id:e.person_id,success_authn_method:x(e.success_authn_method),authenticated_methods:e.authenticated_methods.map(x),handle:U(e.handle)}}(e);case"PersonIdentified_v1":return function(e){if(void 0!==e)return null===e?null:{event_name:e.event_name,person_id:e.person_id}}(e);case"PersonLoggedOut_v1":return function(e){if(void 0!==e)return null===e?null:{event_name:e.event_name,person_id:e.person_id}}(e);case"SlashIDSDKLoaded_v1":return function(e){if(void 0!==e)return null===e?null:{event_name:e.event_name}}(e);case"VirtualPageLoaded_v1":return function(e){if(void 0!==e)return null===e?null:{event_name:e.event_name,person_id:e.person_id}}(e);default:throw Error(`No variant of EventPostRequestEventData exists with 'event_name=${e.event_name}'`)}}}(e.event_data)}}function K(e){return function(e,t){if(null==e)return e;switch(e.type){case"password":return{...function(e,t){var r,n;return null==e?e:{id:e.id,last_used:b(e,"last_used")?new Date(e.last_used):void 0,type:r=e.type,params:null==(n=e.params)?n:{password_hash:n.password_hash},label:b(e,"label")?e.label:void 0}}(e,0),type:"password"};case"public-key":return{...function(e,t){var r;return null==e?e:{id:e.id,last_used:b(e,"last_used")?new Date(e.last_used):void 0,type:r=e.type,params:function(e,t){var r;return null==e?e:{webauthn_credential_id:e.webauthn_credential_id,public_key:e.public_key,attestation_type:e.attestation_type,authenticator:null==(r=e.authenticator)?r:{aaguid:r.aaguid,sign_count:b(r,"sign_count")?r.sign_count:void 0,clone_warning:b(r,"clone_warning")?r.clone_warning:void 0}}}(e.params,0),label:b(e,"label")?e.label:void 0}}(e,0),type:"public-key"};case"totp":return{...function(e,t){var r,n;return null==e?e:{id:e.id,last_used:b(e,"last_used")?new Date(e.last_used):void 0,type:r=e.type,params:null==(n=e.params)?n:{recovery_codes_total:n.recovery_codes_total,recovery_codes_unused:n.recovery_codes_unused},label:b(e,"label")?e.label:void 0}}(e,0),type:"totp"};default:throw Error(`No variant of ExportedCredential exists with 'type=${e.type}'`)}}(e,0)}function J(e){return e}function Y(e){return function(e,t){var r;return null==e?e:{consent_level:r=e.consent_level,created_at:new Date(e.created_at)}}(e,0)}function X(e){if(void 0!==e)return null===e?null:{consent_levels:e.consent_levels.map(J)}}function Z(e,t){return null==e?e:{consents:e.consents.map(Y)}}function Q(e,t){return null==e?e:{meta:b(e,"meta")?S(e.meta):void 0,errors:b(e,"errors")?e.errors.map(D):void 0,result:b(e,"result")?e.result:void 0}}function ee(e,t){return null==e?e:{meta:b(e,"meta")?S(e.meta):void 0,errors:b(e,"errors")?e.errors.map(D):void 0,result:b(e,"result")?e.result:void 0}}function et(e){return null==e?e:{id:e.id,parent_id:b(e,"parent_id")?e.parent_id:void 0,org_name:e.org_name,tenant_name:e.tenant_name}}function er(e){return null==e?e:{id:e.id,parent_id:b(e,"parent_id")?e.parent_id:void 0,org_name:e.org_name,tenant_name:e.tenant_name,managed_organizations:b(e,"managed_organizations")?e.managed_organizations.map(et):void 0}}function en(e){return null==e?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,inherits_rbac_pools:e.inherits_rbac_pools}}function ei(e,t){return null==e?e:{meta:b(e,"meta")?S(e.meta):void 0,errors:b(e,"errors")?e.errors.map(D):void 0,result:b(e,"result")?function(e,t){if(null==e)return e;switch(e.type){case"challenge_list":return{...function(e,t){var r;return null==e?e:{type:r=e.type,challenges:e.challenges.map(W)}}(e,0),type:"challenge_list"};case"token":return{...function(e,t){var r;return null==e?e:{type:r=e.type,token:e.token}}(e,0),type:"token"};default:throw Error(`No variant of TokenV2Response exists with 'type=${e.type}'`)}}(e.result,0):void 0}}function ea(e){if(void 0!==e)return null===e?null:{pkce_code_challenge:e.pkce_code_challenge,csrf_token:e.csrf_token}}function eo(e,t){return null==e?e:{meta:b(e,"meta")?S(e.meta):void 0,errors:b(e,"errors")?e.errors.map(D):void 0,result:b(e,"result")?e.result.map(W):void 0}}function es(e,t){return null==e?e:{meta:b(e,"meta")?S(e.meta):void 0,errors:b(e,"errors")?e.errors.map(D):void 0,result:e.result}}function el(e,t){return null==e?e:{meta:b(e,"meta")?S(e.meta):void 0,errors:b(e,"errors")?e.errors.map(D):void 0,result:Z(e.result,!1)}}class ed extends g{/**
* Delete attributes from a single bucket
*/async deleteAttributesBucketNameRaw(e,t){if(null===e.bucketName||void 0===e.bucketName)throw new y("bucketName","Required parameter requestParameters.bucketName was null or undefined when calling deleteAttributesBucketName.");let r={};e.attributes&&(r.attributes=e.attributes.join(_.csv));let n={};if(void 0!==e.slashIDSdkVersion&&null!==e.slashIDSdkVersion&&(n["SlashID-SdkVersion"]=String(e.s