@wannaby/wanna-sdk 3.3.0-alpha.5 → 3.3.0
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.
- package/README.md +4 -0
- package/core.js +127 -125
- package/iframe.html +1 -1
- package/package.json +1 -1
- package/CHANGELOG.md +0 -76
package/README.md
CHANGED
|
@@ -20,3 +20,7 @@ See the list of supported environments on our [documentation portal](https://doc
|
|
|
20
20
|
## Examples
|
|
21
21
|
|
|
22
22
|
Visit our [examples repo](https://github.com/WANNABY/websdk-examples/) for the reference usage of the WANNA SDK with different scenarios.
|
|
23
|
+
|
|
24
|
+
## Changelog
|
|
25
|
+
|
|
26
|
+
Visit our [documentation portal](https://docs.wanna.fashion/web/intro) for detailed changelog.
|
package/core.js
CHANGED
|
@@ -370,7 +370,7 @@ var i=t("d2c6015c070e2bebfb14"),g=t("96709e75f40e34025574"),r=t("f7b4cdbdc48628b
|
|
|
370
370
|
if(i({target:"Promise",proto:!0,real:!0,forced:!!r&&I((function(){r.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(A){var e=s(this,o("Promise")),t=a(A)
|
|
371
371
|
return this.then(t?function(t){return n(e,A()).then((function(){return t}))}:A,t?function(t){return n(e,A()).then((function(){throw t}))}:A)}}),!g&&a(r)){var C=o("Promise").prototype.finally
|
|
372
372
|
r.prototype.finally!==C&&B(r.prototype,"finally",C,{unsafe:!0})}},"302d5b9d0be817529ac1":(A,e,t)=>{"use strict"
|
|
373
|
-
var i,g,r,I,o=t("d2c6015c070e2bebfb14"),a=t("96709e75f40e34025574"),s=t("bdf769e41bfccf0b5dda"),n=t("d700abe7aa15e6cea2b3"),B=t("62f94fd1f8d4430e8346"),C=t("f7b4cdbdc48628bf0542"),E=t("cf7a74b85e1315e84b8a"),c=t("fef5915794f7d242d691"),h=t("289b953beca9076338f6"),d=t("3517cca774d8c0209c08"),l=t("6110ffbf076d979bdbcf"),u=t("47252be5c531eaa4f043"),f=t("53a2db31217b81c0bcc8"),w=t("2a0da7f8b0aa3e275f00"),D=t("2f9e9b75053b40e5f9b8"),m=t("d9f3eee07e527622f375"),p=t("2f8c66eb1c64fa2f6f17"),y=t("5eaad31011787ab80b06"),G=t("35fa39bb446db3f1bf02"),R=t("80170dd13f17db553afa").set,N=t("d83d221dd5cbc6da88b5"),S=t("13cd6036100dfd2c16c3"),k=t("6368ba608c3d68cfe909"),b=t("4d0a4b8680ffcfcaff45"),_=t("01888946f87e63f28fb4"),U=t("c0d1de502735433bad24"),Y=t("4aa145be81408656c4d5"),L=t("12349297345593d1db1e"),H=t("2ac951b1c6c29ae2d7c7"),v=t("341d9aed1b509e970178"),x=t("9e5845a66ef1b7714ac7"),J=t("86f7db590a96c349c0e7"),T=H("species"),
|
|
373
|
+
var i,g,r,I,o=t("d2c6015c070e2bebfb14"),a=t("96709e75f40e34025574"),s=t("bdf769e41bfccf0b5dda"),n=t("d700abe7aa15e6cea2b3"),B=t("62f94fd1f8d4430e8346"),C=t("f7b4cdbdc48628bf0542"),E=t("cf7a74b85e1315e84b8a"),c=t("fef5915794f7d242d691"),h=t("289b953beca9076338f6"),d=t("3517cca774d8c0209c08"),l=t("6110ffbf076d979bdbcf"),u=t("47252be5c531eaa4f043"),f=t("53a2db31217b81c0bcc8"),w=t("2a0da7f8b0aa3e275f00"),D=t("2f9e9b75053b40e5f9b8"),m=t("d9f3eee07e527622f375"),p=t("2f8c66eb1c64fa2f6f17"),y=t("5eaad31011787ab80b06"),G=t("35fa39bb446db3f1bf02"),R=t("80170dd13f17db553afa").set,N=t("d83d221dd5cbc6da88b5"),S=t("13cd6036100dfd2c16c3"),k=t("6368ba608c3d68cfe909"),b=t("4d0a4b8680ffcfcaff45"),_=t("01888946f87e63f28fb4"),U=t("c0d1de502735433bad24"),Y=t("4aa145be81408656c4d5"),L=t("12349297345593d1db1e"),H=t("2ac951b1c6c29ae2d7c7"),v=t("341d9aed1b509e970178"),x=t("9e5845a66ef1b7714ac7"),J=t("86f7db590a96c349c0e7"),T=H("species"),P="Promise",K=Y.getterFor(P),O=Y.set,z=Y.getterFor(P),q=C&&C.prototype,j=C,V=q,W=s.TypeError,Z=s.document,X=s.process,$=b.f,AA=$,eA=!!(Z&&Z.createEvent&&s.dispatchEvent),tA=f(s.PromiseRejectionEvent),iA="unhandledrejection",gA=!1,rA=L(P,(function(){var A=m(j),e=A!==String(j)
|
|
374
374
|
if(!e&&66===J)return!0
|
|
375
375
|
if(a&&!V.finally)return!0
|
|
376
376
|
if(J>=51&&/native code/.test(A))return!1
|
|
@@ -387,13 +387,13 @@ var i=isThenable(e)
|
|
|
387
387
|
i?N((function(){var t={done:!1}
|
|
388
388
|
try{B(i,e,bind(internalResolve,t,A),bind(internalReject,t,A))}catch(e){internalReject(t,e,A)}})):(A.value=e,A.state=1,notify(A,!1))}catch(e){internalReject({done:!1},e,A)}}}
|
|
389
389
|
if(rA&&(V=(j=function Promise(A){D(this,V),u(A),B(i,this)
|
|
390
|
-
var e=
|
|
391
|
-
try{A(bind(internalResolve,e),bind(internalReject,e))}catch(A){internalReject(e,A)}}).prototype,(i=function Promise(A){O(this,{type:
|
|
392
|
-
return t.parent=!0,i.ok=!f(A)||A,i.fail=f(e)&&e,i.domain=x?X.domain:void 0,0==t.state?t.reactions.add(i):N((function(){callReaction(i,t)})),i.promise},catch:function(A){return this.then(void 0,A)}}),g=function(){var A=new i,e=
|
|
390
|
+
var e=K(this)
|
|
391
|
+
try{A(bind(internalResolve,e),bind(internalReject,e))}catch(A){internalReject(e,A)}}).prototype,(i=function Promise(A){O(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new U,rejection:!1,state:0,value:void 0})}).prototype=c(V,{then:function then(A,e){var t=z(this),i=$(G(this,j))
|
|
392
|
+
return t.parent=!0,i.ok=!f(A)||A,i.fail=f(e)&&e,i.domain=x?X.domain:void 0,0==t.state?t.reactions.add(i):N((function(){callReaction(i,t)})),i.promise},catch:function(A){return this.then(void 0,A)}}),g=function(){var A=new i,e=K(A)
|
|
393
393
|
this.promise=A,this.resolve=bind(internalResolve,e),this.reject=bind(internalReject,e)},b.f=$=function(A){return A===j||A===r?new g(A):AA(A)},!a&&f(C)&&q!==Object.prototype)){I=q.then,gA||(E(q,"then",(function then(A,e){var t=this
|
|
394
394
|
return new j((function(A,e){B(I,t,A,e)})).then(A,e)}),{unsafe:!0}),E(q,"catch",V.catch,{unsafe:!0}))
|
|
395
|
-
try{delete q.constructor}catch(A){}h&&h(q,V)}o({global:!0,wrap:!0,forced:rA},{Promise:j}),d(j,
|
|
396
|
-
return B(e.reject,void 0,A),e.promise}}),o({target:
|
|
395
|
+
try{delete q.constructor}catch(A){}h&&h(q,V)}o({global:!0,wrap:!0,forced:rA},{Promise:j}),d(j,P,!1,!0),l(P),r=n(P),o({target:P,stat:!0,forced:rA},{reject:function reject(A){var e=$(this)
|
|
396
|
+
return B(e.reject,void 0,A),e.promise}}),o({target:P,stat:!0,forced:a||rA},{resolve:function resolve(A){return S(a&&this===r?j:this,A)}}),o({target:P,stat:!0,forced:IA},{all:function all(A){var e=this,t=$(e),i=t.resolve,g=t.reject,r=_((function(){var t=u(e.resolve),r=[],I=0,o=1
|
|
397
397
|
p(A,(function(A){var a=I++,s=!1
|
|
398
398
|
o++,B(t,e,A).then((function(A){s||(s=!0,r[a]=A,--o||i(r))}),g)})),--o||i(r)}))
|
|
399
399
|
return r.error&&g(r.value),t.promise},race:function race(A){var e=this,t=$(e),i=t.reject,g=_((function(){var g=u(e.resolve)
|
|
@@ -451,11 +451,11 @@ handlePrototype(r)},"1e9f329c34da89a4efd6":(A,e,t)=>{var i=t("bdf769e41bfccf0b5d
|
|
|
451
451
|
for(var C in g)handlePrototype(i[C]&&i[C].prototype,C)
|
|
452
452
|
handlePrototype(r,"DOMTokenList")},"8e5531a739ad2a362fcc":function(A,e,t){var i
|
|
453
453
|
!function(g,r){"use strict"
|
|
454
|
-
var I="function",o="undefined",a="object",s="string",n="major",B="model",C="name",E="type",c="vendor",h="version",d="architecture",l="console",u="mobile",f="tablet",w="smarttv",D="wearable",m="embedded",p="Amazon",y="Apple",G="ASUS",R="BlackBerry",N="Browser",S="Chrome",k="Firefox",b="Google",_="Huawei",U="LG",Y="Microsoft",L="Motorola",H="Opera",v="Samsung",x="Sharp",J="Sony",T="Xiaomi",
|
|
454
|
+
var I="function",o="undefined",a="object",s="string",n="major",B="model",C="name",E="type",c="vendor",h="version",d="architecture",l="console",u="mobile",f="tablet",w="smarttv",D="wearable",m="embedded",p="Amazon",y="Apple",G="ASUS",R="BlackBerry",N="Browser",S="Chrome",k="Firefox",b="Google",_="Huawei",U="LG",Y="Microsoft",L="Motorola",H="Opera",v="Samsung",x="Sharp",J="Sony",T="Xiaomi",P="Zebra",K="Facebook",O="Chromium OS",z="Mac OS",enumerize=function(A){for(var e={},t=0;t<A.length;t++)e[A[t].toUpperCase()]=A[t]
|
|
455
455
|
return e},has=function(A,e){return typeof A===s&&-1!==lowerize(e).indexOf(lowerize(A))},lowerize=function(A){return A.toLowerCase()},trim=function(A,e){if(typeof A===s)return A=A.replace(/^\s\s*/,""),typeof e===o?A:A.substring(0,350)},rgxMapper=function(A,e){for(var t,i,g,o,s,n,B=0;B<e.length&&!s;){var C=e[B],E=e[B+1]
|
|
456
456
|
for(t=i=0;t<C.length&&!s&&C[t];)if(s=C[t++].exec(A))for(g=0;g<E.length;g++)n=s[++i],typeof(o=E[g])===a&&o.length>0?2===o.length?typeof o[1]==I?this[o[0]]=o[1].call(this,n):this[o[0]]=o[1]:3===o.length?typeof o[1]!==I||o[1].exec&&o[1].test?this[o[0]]=n?n.replace(o[1],o[2]):r:this[o[0]]=n?o[1].call(this,n,o[2]):r:4===o.length&&(this[o[0]]=n?o[3].call(this,n.replace(o[1],o[2])):r):this[o]=n||r
|
|
457
457
|
B+=2}},strMapper=function(A,e){for(var t in e)if(typeof e[t]===a&&e[t].length>0){for(var i=0;i<e[t].length;i++)if(has(e[t][i],A))return"?"===t?r:t}else if(has(e[t],A))return"?"===t?r:t
|
|
458
|
-
return A},q={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],[h,[C,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[C,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[C,h],[/opios[\/ ]+([\w\.]+)/i],[h,[C,H+" Mini"]],[/\bopr\/([\w\.]+)/i],[h,[C,H]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\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],[C,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[C,"UC"+N]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[h,[C,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[C,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[C,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[C,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[C,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[C,/(.+)/,"$1 Secure "+N],h],[/\bfocus\/([\w\.]+)/i],[h,[C,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[C,H+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[C,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[C,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[C,H+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[C,"MIUI "+N]],[/fxios\/([-\w\.]+)/i],[h,[C,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[C,"360 "+N]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[C,/(.+)/,"$1 "+N],h],[/(comodo_dragon)\/([\w\.]+)/i],[[C,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[C,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[C],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[C,P],h],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[C,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[C,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[C,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[C,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[C,S+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[C,"Android "+N]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[C,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[C,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,C],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[C,[h,strMapper,{"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],[C,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[C,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[C,k+" 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],[C,h],[/(cobalt)\/([\w\.]+)/i],[C,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[d,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[d,"armhf"]],[/windows (ce|mobile); ppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[d,/ower/,"",lowerize]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[d,lowerize]]],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],[B,[c,v],[E,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[B,[c,v],[E,u]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[B,[c,y],[E,u]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[B,[c,y],[E,f]],[/(macintosh);/i],[B,[c,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[B,[c,x],[E,u]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[B,[c,_],[E,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[B,[c,_],[E,u]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[B,/_/g," "],[c,T],[E,u]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[B,/_/g," "],[c,T],[E,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[B,[c,"OPPO"],[E,u]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[B,[c,"Vivo"],[E,u]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[B,[c,"Realme"],[E,u]],[/\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],[B,[c,L],[E,u]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[B,[c,L],[E,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[B,[c,U],[E,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[B,[c,U],[E,u]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[B,[c,"Lenovo"],[E,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[B,/_/g," "],[c,"Nokia"],[E,u]],[/(pixel c)\b/i],[B,[c,b],[E,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[B,[c,b],[E,u]],[/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],[B,[c,J],[E,u]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[B,"Xperia Tablet"],[c,J],[E,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[B,[c,"OnePlus"],[E,u]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[B,[c,p],[E,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[B,/(.+)/g,"Fire Phone $1"],[c,p],[E,u]],[/(playbook);[-\w\),; ]+(rim)/i],[B,c,[E,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[B,[c,R],[E,u]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[B,[c,G],[E,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[B,[c,G],[E,u]],[/(nexus 9)/i],[B,[c,"HTC"],[E,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[c,[B,/_/g," "],[E,u]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[B,[c,"Acer"],[E,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[B,[c,"Meizu"],[E,u]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[c,B,[E,u]],[/(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],[c,B,[E,f]],[/(surface duo)/i],[B,[c,Y],[E,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[B,[c,"Fairphone"],[E,u]],[/(u304aa)/i],[B,[c,"AT&T"],[E,u]],[/\bsie-(\w*)/i],[B,[c,"Siemens"],[E,u]],[/\b(rct\w+) b/i],[B,[c,"RCA"],[E,f]],[/\b(venue[\d ]{2,7}) b/i],[B,[c,"Dell"],[E,f]],[/\b(q(?:mv|ta)\w+) b/i],[B,[c,"Verizon"],[E,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[B,[c,"Barnes & Noble"],[E,f]],[/\b(tm\d{3}\w+) b/i],[B,[c,"NuVision"],[E,f]],[/\b(k88) b/i],[B,[c,"ZTE"],[E,f]],[/\b(nx\d{3}j) b/i],[B,[c,"ZTE"],[E,u]],[/\b(gen\d{3}) b.+49h/i],[B,[c,"Swiss"],[E,u]],[/\b(zur\d{3}) b/i],[B,[c,"Swiss"],[E,f]],[/\b((zeki)?tb.*\b) b/i],[B,[c,"Zeki"],[E,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],B,[E,f]],[/\b(ns-?\w{0,9}) b/i],[B,[c,"Insignia"],[E,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[B,[c,"NextBook"],[E,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],B,[E,u]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],B,[E,u]],[/\b(ph-1) /i],[B,[c,"Essential"],[E,u]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[B,[c,"Envizen"],[E,f]],[/\b(trio[-\w\. ]+) b/i],[B,[c,"MachSpeed"],[E,f]],[/\btu_(1491) b/i],[B,[c,"Rotor"],[E,f]],[/(shield[\w ]+) b/i],[B,[c,"Nvidia"],[E,f]],[/(sprint) (\w+)/i],[c,B,[E,u]],[/(kin\.[onetw]{3})/i],[[B,/\./g," "],[c,Y],[E,u]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[B,[c,K],[E,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[B,[c,K],[E,u]],[/smart-tv.+(samsung)/i],[c,[E,w]],[/hbbtv.+maple;(\d+)/i],[[B,/^/,"SmartTV"],[c,v],[E,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,U],[E,w]],[/(apple) ?tv/i],[c,[B,y+" TV"],[E,w]],[/crkey/i],[[B,S+"cast"],[c,b],[E,w]],[/droid.+aft(\w)( bui|\))/i],[B,[c,p],[E,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[B,[c,x],[E,w]],[/(bravia[\w ]+)( bui|\))/i],[B,[c,J],[E,w]],[/(mitv-\w{5}) bui/i],[B,[c,T],[E,w]],[/Hbbtv.*(technisat) (.*);/i],[c,B,[E,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[c,trim],[B,trim],[E,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[E,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,B,[E,l]],[/droid.+; (shield) bui/i],[B,[c,"Nvidia"],[E,l]],[/(playstation [345portablevi]+)/i],[B,[c,J],[E,l]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[B,[c,Y],[E,l]],[/((pebble))app/i],[c,B,[E,D]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[B,[c,y],[E,D]],[/droid.+; (glass) \d/i],[B,[c,b],[E,D]],[/droid.+; (wt63?0{2,3})\)/i],[B,[c,K],[E,D]],[/(quest( 2| pro)?)/i],[B,[c,P],[E,D]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[E,m]],[/(aeobc)\b/i],[B,[c,p],[E,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[B,[E,u]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[B,[E,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[E,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[E,u]],[/(android[-\w\. ]{0,9});.+buil/i],[B,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[C,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[C,"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],[C,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,C]],os:[[/microsoft (windows) (vista|xp)/i],[C,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[C,[h,strMapper,q]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[C,"Windows"],[h,strMapper,q]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[C,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[C,z],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,C],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[C,h],[/\(bb(10);/i],[h,[C,R]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[C,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[C,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[C,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[C,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[C,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[C,O],h],[/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],[C,h],[/(sunos) ?([\w\.\d]*)/i],[[C,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[C,h]]},UAParser=function(A,e){if(typeof A===a&&(e=A,A=r),!(this instanceof UAParser))return new UAParser(A,e).getResult()
|
|
458
|
+
return A},q={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],[h,[C,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[C,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[C,h],[/opios[\/ ]+([\w\.]+)/i],[h,[C,H+" Mini"]],[/\bopr\/([\w\.]+)/i],[h,[C,H]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\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],[C,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[C,"UC"+N]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[h,[C,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[C,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[C,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[C,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[C,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[C,/(.+)/,"$1 Secure "+N],h],[/\bfocus\/([\w\.]+)/i],[h,[C,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[C,H+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[C,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[C,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[C,H+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[C,"MIUI "+N]],[/fxios\/([-\w\.]+)/i],[h,[C,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[C,"360 "+N]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[C,/(.+)/,"$1 "+N],h],[/(comodo_dragon)\/([\w\.]+)/i],[[C,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[C,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[C],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[C,K],h],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[C,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[C,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[C,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[C,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[C,S+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[C,"Android "+N]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[C,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[C,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,C],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[C,[h,strMapper,{"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],[C,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[C,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[C,k+" 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],[C,h],[/(cobalt)\/([\w\.]+)/i],[C,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[d,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[d,"armhf"]],[/windows (ce|mobile); ppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[d,/ower/,"",lowerize]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[d,lowerize]]],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],[B,[c,v],[E,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[B,[c,v],[E,u]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[B,[c,y],[E,u]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[B,[c,y],[E,f]],[/(macintosh);/i],[B,[c,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[B,[c,x],[E,u]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[B,[c,_],[E,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[B,[c,_],[E,u]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[B,/_/g," "],[c,T],[E,u]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[B,/_/g," "],[c,T],[E,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[B,[c,"OPPO"],[E,u]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[B,[c,"Vivo"],[E,u]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[B,[c,"Realme"],[E,u]],[/\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],[B,[c,L],[E,u]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[B,[c,L],[E,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[B,[c,U],[E,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[B,[c,U],[E,u]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[B,[c,"Lenovo"],[E,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[B,/_/g," "],[c,"Nokia"],[E,u]],[/(pixel c)\b/i],[B,[c,b],[E,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[B,[c,b],[E,u]],[/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],[B,[c,J],[E,u]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[B,"Xperia Tablet"],[c,J],[E,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[B,[c,"OnePlus"],[E,u]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[B,[c,p],[E,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[B,/(.+)/g,"Fire Phone $1"],[c,p],[E,u]],[/(playbook);[-\w\),; ]+(rim)/i],[B,c,[E,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[B,[c,R],[E,u]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[B,[c,G],[E,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[B,[c,G],[E,u]],[/(nexus 9)/i],[B,[c,"HTC"],[E,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[c,[B,/_/g," "],[E,u]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[B,[c,"Acer"],[E,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[B,[c,"Meizu"],[E,u]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[c,B,[E,u]],[/(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],[c,B,[E,f]],[/(surface duo)/i],[B,[c,Y],[E,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[B,[c,"Fairphone"],[E,u]],[/(u304aa)/i],[B,[c,"AT&T"],[E,u]],[/\bsie-(\w*)/i],[B,[c,"Siemens"],[E,u]],[/\b(rct\w+) b/i],[B,[c,"RCA"],[E,f]],[/\b(venue[\d ]{2,7}) b/i],[B,[c,"Dell"],[E,f]],[/\b(q(?:mv|ta)\w+) b/i],[B,[c,"Verizon"],[E,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[B,[c,"Barnes & Noble"],[E,f]],[/\b(tm\d{3}\w+) b/i],[B,[c,"NuVision"],[E,f]],[/\b(k88) b/i],[B,[c,"ZTE"],[E,f]],[/\b(nx\d{3}j) b/i],[B,[c,"ZTE"],[E,u]],[/\b(gen\d{3}) b.+49h/i],[B,[c,"Swiss"],[E,u]],[/\b(zur\d{3}) b/i],[B,[c,"Swiss"],[E,f]],[/\b((zeki)?tb.*\b) b/i],[B,[c,"Zeki"],[E,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],B,[E,f]],[/\b(ns-?\w{0,9}) b/i],[B,[c,"Insignia"],[E,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[B,[c,"NextBook"],[E,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],B,[E,u]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],B,[E,u]],[/\b(ph-1) /i],[B,[c,"Essential"],[E,u]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[B,[c,"Envizen"],[E,f]],[/\b(trio[-\w\. ]+) b/i],[B,[c,"MachSpeed"],[E,f]],[/\btu_(1491) b/i],[B,[c,"Rotor"],[E,f]],[/(shield[\w ]+) b/i],[B,[c,"Nvidia"],[E,f]],[/(sprint) (\w+)/i],[c,B,[E,u]],[/(kin\.[onetw]{3})/i],[[B,/\./g," "],[c,Y],[E,u]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[B,[c,P],[E,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[B,[c,P],[E,u]],[/smart-tv.+(samsung)/i],[c,[E,w]],[/hbbtv.+maple;(\d+)/i],[[B,/^/,"SmartTV"],[c,v],[E,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,U],[E,w]],[/(apple) ?tv/i],[c,[B,y+" TV"],[E,w]],[/crkey/i],[[B,S+"cast"],[c,b],[E,w]],[/droid.+aft(\w)( bui|\))/i],[B,[c,p],[E,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[B,[c,x],[E,w]],[/(bravia[\w ]+)( bui|\))/i],[B,[c,J],[E,w]],[/(mitv-\w{5}) bui/i],[B,[c,T],[E,w]],[/Hbbtv.*(technisat) (.*);/i],[c,B,[E,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[c,trim],[B,trim],[E,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[E,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,B,[E,l]],[/droid.+; (shield) bui/i],[B,[c,"Nvidia"],[E,l]],[/(playstation [345portablevi]+)/i],[B,[c,J],[E,l]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[B,[c,Y],[E,l]],[/((pebble))app/i],[c,B,[E,D]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[B,[c,y],[E,D]],[/droid.+; (glass) \d/i],[B,[c,b],[E,D]],[/droid.+; (wt63?0{2,3})\)/i],[B,[c,P],[E,D]],[/(quest( 2| pro)?)/i],[B,[c,K],[E,D]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[E,m]],[/(aeobc)\b/i],[B,[c,p],[E,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[B,[E,u]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[B,[E,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[E,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[E,u]],[/(android[-\w\. ]{0,9});.+buil/i],[B,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[C,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[C,"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],[C,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,C]],os:[[/microsoft (windows) (vista|xp)/i],[C,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[C,[h,strMapper,q]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[C,"Windows"],[h,strMapper,q]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[C,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[C,z],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,C],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[C,h],[/\(bb(10);/i],[h,[C,R]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[C,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[C,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[C,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[C,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[C,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[C,O],h],[/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],[C,h],[/(sunos) ?([\w\.\d]*)/i],[[C,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[C,h]]},UAParser=function(A,e){if(typeof A===a&&(e=A,A=r),!(this instanceof UAParser))return new UAParser(A,e).getResult()
|
|
459
459
|
var t=typeof g!==o&&g.navigator?g.navigator:r,i=A||(t&&t.userAgent?t.userAgent:""),l=t&&t.userAgentData?t.userAgentData:r,w=e?function(A,e){var t={}
|
|
460
460
|
for(var i in A)e[i]&&e[i].length%2===0?t[i]=e[i].concat(A[i]):t[i]=A[i]
|
|
461
461
|
return t}(j,e):j,D=t&&t.userAgent==i
|
|
@@ -482,7 +482,7 @@ try{return this||new Function("return this")()}catch(A){if("object"===typeof win
|
|
|
482
482
|
var A={}
|
|
483
483
|
__webpack_require__.r(A),__webpack_require__.d(A,{emit:()=>emit,setEmitAction:()=>setEmitAction})
|
|
484
484
|
__webpack_require__("41d983a9671842059e02"),__webpack_require__("9cae3d1f874f77656a8b"),__webpack_require__("c814e6220534e23a38e3"),__webpack_require__("e7bbd96008ef7aaad9a4"),__webpack_require__("d6dd597dc17c7e0d2f31"),__webpack_require__("81ac36b664e314030fc4"),__webpack_require__("1e9f329c34da89a4efd6")
|
|
485
|
-
var e="error",t="model",i=1280,g=720,r="".concat("WANNA","_").concat("EVENT"),I="".concat(r,"_SDK_LOADED"),o="".concat(r,"_LOAD_RESOURCE_MODEL"),a="".concat(r,"_LOAD_RESOURCE_MODEL_ACKNOWLEDGE"),s="".concat(r,"_RESOURCE_LOAD_STARTED"),n="".concat(r,"_RESOURCE_LOAD_PROGRESS"),B="".concat(r,"_RESOURCE_LOAD_FINISHED"),C="".concat(r,"_RESOURCE_LOAD_FAILED"),E="".concat(r,"_START_INIT"),c="".concat(r,"_INIT_STARTED"),h="".concat(r,"_INIT_FINISHED"),d="".concat(r,"_INIT_FAILED"),l="".concat(r,"_LAZY_INIT_FAILED"),u="".concat(r,"_DESTROY"),f="".concat(r,"_DESTROY_ACKNOWLEDGE"),w="".concat(r,"_DESTROYED"),D="".concat(r,"_DESTROY_FAILED"),m="".concat(r,"_START_PIPELINE"),p="".concat(r,"_START_PIPELINE_ACKNOWLEDGE"),y="".concat(r,"_PIPELINE_STARTED"),G="".concat(r,"_PIPELINE_START_FAILED"),R="".concat(r,"_PAUSE_PIPELINE"),N="".concat(r,"_PAUSE_PIPELINE_ACKNOWLEDGE"),S="".concat(r,"_PIPELINE_PAUSED"),k="".concat(r,"_PIPELINE_PAUSE_FAILED"),b=("".concat(r,"_STOP_PIPELINE"),"".concat(r,"_STOP_PIPELINE_ACKNOWLEDGE"),"".concat(r,"_PIPELINE_STOPPED"),"".concat(r,"_PIPELINE_STOP_FAILED"),"".concat(r,"_CHANGE_CAMERA")),_="".concat(r,"_CHANGE_CAMERA_ACKNOWLEDGE"),U="".concat(r,"_CAMERA_CHANGED"),Y="".concat(r,"_CAMERA_CHANGE_FAILED"),L="".concat(r,"_SWITCH_CAMERA_FACING_MODE"),H="".concat(r,"_SWITCH_CAMERA_FACING_MODE_ACKNOWLEDGE"),v="".concat(r,"_CAMERA_FACING_MODE_SWITCHED"),x="".concat(r,"_CAMERA_SWITCH_FACING_MODE_FAILED"),J="".concat(r,"_CAMERA_ACCESS_REQUESTED"),T="".concat(r,"_CAMERA_ACCESS_GRANTED"),
|
|
485
|
+
var e="error",t="model",i=1280,g=720,r="".concat("WANNA","_").concat("EVENT"),I="".concat(r,"_SDK_LOADED"),o="".concat(r,"_LOAD_RESOURCE_MODEL"),a="".concat(r,"_LOAD_RESOURCE_MODEL_ACKNOWLEDGE"),s="".concat(r,"_RESOURCE_LOAD_STARTED"),n="".concat(r,"_RESOURCE_LOAD_PROGRESS"),B="".concat(r,"_RESOURCE_LOAD_FINISHED"),C="".concat(r,"_RESOURCE_LOAD_FAILED"),E="".concat(r,"_START_INIT"),c="".concat(r,"_INIT_STARTED"),h="".concat(r,"_INIT_FINISHED"),d="".concat(r,"_INIT_FAILED"),l="".concat(r,"_LAZY_INIT_FAILED"),u="".concat(r,"_DESTROY"),f="".concat(r,"_DESTROY_ACKNOWLEDGE"),w="".concat(r,"_DESTROYED"),D="".concat(r,"_DESTROY_FAILED"),m="".concat(r,"_START_PIPELINE"),p="".concat(r,"_START_PIPELINE_ACKNOWLEDGE"),y="".concat(r,"_PIPELINE_STARTED"),G="".concat(r,"_PIPELINE_START_FAILED"),R="".concat(r,"_PAUSE_PIPELINE"),N="".concat(r,"_PAUSE_PIPELINE_ACKNOWLEDGE"),S="".concat(r,"_PIPELINE_PAUSED"),k="".concat(r,"_PIPELINE_PAUSE_FAILED"),b=("".concat(r,"_STOP_PIPELINE"),"".concat(r,"_STOP_PIPELINE_ACKNOWLEDGE"),"".concat(r,"_PIPELINE_STOPPED"),"".concat(r,"_PIPELINE_STOP_FAILED"),"".concat(r,"_CHANGE_CAMERA")),_="".concat(r,"_CHANGE_CAMERA_ACKNOWLEDGE"),U="".concat(r,"_CAMERA_CHANGED"),Y="".concat(r,"_CAMERA_CHANGE_FAILED"),L="".concat(r,"_SWITCH_CAMERA_FACING_MODE"),H="".concat(r,"_SWITCH_CAMERA_FACING_MODE_ACKNOWLEDGE"),v="".concat(r,"_CAMERA_FACING_MODE_SWITCHED"),x="".concat(r,"_CAMERA_SWITCH_FACING_MODE_FAILED"),J="".concat(r,"_CAMERA_ACCESS_REQUESTED"),T="".concat(r,"_CAMERA_ACCESS_GRANTED"),P="".concat(r,"_CAMERA_ACCESS_FAILED"),K="".concat(r,"_GET_CAMERAS_LIST"),O="".concat(r,"_GET_CAMERAS_LIST_ACKNOWLEDGE"),z="".concat(r,"_CAMERAS_LIST"),q="".concat(r,"_CAMERAS_LIST_FAILED"),j="".concat(r,"_SET_MODEL"),V="".concat(r,"_SET_MODEL_ACKNOWLEDGE"),W="".concat(r,"_MODEL_SET"),Z="".concat(r,"_MODEL_SET_FAILED"),X="".concat(r,"_LOG_3D_VIEWER_DURATION"),$="".concat(r,"_LOG_3D_VIEWER_DURATION_ACKNOWLEDGE"),AA="".concat(r,"_LOG_3D_VIEWER_DURATION_SENT"),eA="".concat(r,"_LOG_3D_VIEWER_DURATION_FAILED"),tA="".concat(r,"_TAKE_PHOTO"),iA="".concat(r,"_TAKE_PHOTO_ACKNOWLEDGE"),gA="".concat(r,"_PHOTO_TAKEN"),rA="".concat(r,"_PHOTO_TAKE_FAILED"),IA="".concat(r,"_TRY_ON"),oA="".concat(r,"_3D_SUCCEEDED"),aA="".concat(r,"_ERROR"),sA="".concat(r,"_OBJECT_APPEARED"),nA="".concat(r,"_OBJECT_DISAPPEARED"),BA="".concat(r,"_DEBUG"),CA="".concat(r,"_DEBUG_ACKNOWLEDGE"),QA="".concat(r,"_DEBUG_FAILED"),EA="".concat(r,"_DEBUG_SUCCESS"),cA="".concat(r,"_FREEZE_ON_CAMERA_CHANGE"),hA="".concat(r,"_WARMED_UP"),dA="".concat(r,"_FRAME_SIZE_CHANGED"),lA="".concat(r,"_INIT_VIDEO"),uA="".concat(r,"_INIT_VIDEO_ACKNOWLEDGE"),fA="".concat(r,"_VIDEO_INITIALIZED"),wA="".concat(r,"_VIDEO_INIT_FAILED"),DA="".concat(r,"_LOG"),mA="".concat(r,"_SET_MODE"),pA="".concat(r,"_SET_MODE_ACKNOWLEDGE"),yA="".concat(r,"_MODE_SET"),GA="".concat(r,"_SET_MODE_FAILED"),RA="".concat(r,"_SET_POI"),MA="".concat(r,"_SET_POI_ACKNOWLEDGE"),FA="".concat(r,"_POI_SET"),NA="".concat(r,"_SET_POI_FAILED"),SA="".concat(r,"_RESET_CAMERA_POSITION"),kA="".concat(r,"_RESET_CAMERA_POSITION_ACKNOWLEDGE"),bA="".concat(r,"_RESET_CAMERA_POSITION_FINISHED"),_A="".concat(r,"_RESET_CAMERA_POSITION_FAILED"),UA="".concat(r,"_CAMERA_ZOOM"),YA="".concat(r,"_CAMERA_ZOOM_ACKNOWLEDGE"),LA="".concat(r,"_CAMERA_ZOOMED"),HA="".concat(r,"_CAMERA_ZOOM_FAILED"),vA="".concat(r,"_TOGGLE_PANNING_MODE"),xA="".concat(r,"_TOGGLE_PANNING_MODE_ACKNOWLEDGE"),JA="".concat(r,"_TOGGLE_PANNING_MODE_SUCCESS"),TA="".concat(r,"_TOGGLE_PANNING_MODE_FAILED"),PA="".concat(r,"_START_PANNING"),KA="".concat(r,"_FINISH_PANNING"),OA="".concat(r,"_ONBOARDING"),zA="".concat(r,"_ONBOARDING_ACKNOWLEDGE"),qA="".concat(r,"_ONBOARDING_SUCCESS"),jA="".concat(r,"_ONBOARDING_FAILED"),VA="".concat(r,"_TOGGLE_DIMENSIONS"),WA="".concat(r,"_TOGGLE_DIMENSIONS_ACKNOWLEDGE"),ZA="".concat(r,"_TOGGLE_DIMENSIONS_SUCCESS"),XA="".concat(r,"_TOGGLE_DIMENSIONS_FAILED"),$A="".concat(r,"_INTERACTION_STARTED"),Ae="".concat(r,"_INTERACTION_ENDED"),ee="".concat(r,"_GET_WRIST_MEASUREMENT_CONFIG"),te="".concat(r,"_GET_WRIST_MEASUREMENT_CONFIG_ACKNOWLEDGE"),ie="".concat(r,"_WRIST_MEASUREMENT_CONFIG"),ge="".concat(r,"_WRIST_MEASUREMENT_CONFIG_FAILED"),re="".concat(r,"_GET_ASSET_URL"),Ie="".concat(r,"_GET_ASSET_URL_ACKNOWLEDGE"),oe="".concat(r,"_GET_ASSET_URL_SUCCESS"),ae="".concat(r,"_GET_ASSET_URL_FAILED"),se="".concat(r,"_WAIT_FOR_ALL_LOGS_SENT"),ne="".concat(r,"_WAIT_FOR_ALL_LOGS_SENT_ACKNOWLEDGE"),Be="".concat(r,"_WAIT_FOR_ALL_LOGS_SENT_SUCCESS"),Ce=("".concat(r,"_WAIT_FOR_ALL_LOGS_SENT_FAILED"),"".concat(r,"_SET_PERSON_HEIGHT")),Qe="".concat(r,"_SET_PERSON_HEIGHT_ACKNOWLEDGE"),Ee="".concat(r,"_PERSON_HEIGHT_SET"),ce="".concat(r,"_SET_PERSON_HEIGHT_FAILED"),he="".concat(r,"_LOG_PUBLIC_EVENT"),de="".concat(r,"_LOG_PUBLIC_EVENT_ACKNOWLEDGE"),le="".concat(r,"_PUBLIC_EVENT_LOGGED"),ue="".concat(r,"_LOG_PUBLIC_EVENT_FAILED"),fe="".concat(r,"_GET_GLTF_MODELS"),we="".concat(r,"_GET_GLTF_MODELS_ACKNOWLEDGE"),De="".concat(r,"_GET_GLTF_MODELS_SUCCESS"),me="".concat(r,"_GET_GLTF_MODELS_FAILED"),pe="".concat(r,"_SET_GLTF_MODEL"),ye="".concat(r,"_SET_GLTF_MODEL_ACKNOWLEDGE"),Ge="".concat(r,"_SET_GLTF_MODEL_SUCCESS"),Re="".concat(r,"_SET_GLTF_MODEL_FAILED"),Me="".concat(r,"_TOGGLE_BAGS_INSIDE"),Fe="".concat(r,"_TOGGLE_BAGS_INSIDE_ACKNOWLEDGE"),Ne="".concat(r,"_TOGGLE_BAGS_INSIDE_SUCCESS"),Se="".concat(r,"_TOGGLE_BAGS_INSIDE_FAILED")
|
|
486
486
|
const ke=
|
|
487
487
|
// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
488
488
|
class EventEmitter{constructor(){this.events={},this.verbose=!1,this.__setDefaultErrorListener()}__setDefaultErrorListener(){this.on(e,this.__defaultErrorListener.bind(this))}__defaultErrorListener(A){if(this.events.error&&1===this.events.error.length){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i]
|
|
@@ -500,7 +500,7 @@ a&&("log"===o||"warn"===o||"info"===o||"error"===o?console[o]("[".concat(this.co
|
|
|
500
500
|
|
|
501
501
|
;// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
502
502
|
var be="sneakers",_e="watch",Ue="bag",Ye="clothes",Le="scarf",He="generic",ve=[be,_e,Ue,Ye,Le]
|
|
503
|
-
const xe=be,Je=_e,Te=Ue,
|
|
503
|
+
const xe=be,Je=_e,Te=Ue,Pe=He,Ke=Ye,Oe=Le
|
|
504
504
|
|
|
505
505
|
;// Copyright © 2022 WANNABY Inc. All rights reserved.
|
|
506
506
|
var ze="vto",qe="3d",je=[ze,qe]
|
|
@@ -544,7 +544,7 @@ function _next(A){asyncGeneratorStep(r,i,g,_next,_throw,"next",A)}function _thro
|
|
|
544
544
|
return null!==e&&void 0!==e&&null!==(A=e.userAgentData)&&void 0!==A&&A.getHighEntropyValues?yield e.userAgentData.getHighEntropyValues(["architecture","model","platformVersion","fullVersionList"]):{}}))
|
|
545
545
|
return function getUserAgentHints(){return A.apply(this,arguments)}}(),Ft=new(Bt()),Nt=Ft.getDevice(),St=Ft.getOS(),kt=Ft.getBrowser(),bt=Ft.getUA()
|
|
546
546
|
kt.name===ut&&St.name===Dt&&(kt.name=lt),kt.version||kt.name!==lt||(kt.version=St.version)
|
|
547
|
-
var _t,Ut,Yt=St.version,Lt=(kt.name,kt.name===ut||kt.name,kt.name===ht),Ht=kt.name===ct,vt=kt.name===wt,xt=(kt.name,kt.name,kt.name,St.name===Dt||(_t="iPad",(Ut=getNavigatorInstance())&&Ut.platform&&(-1!==Ut.platform.indexOf(_t)||"MacIntel"===Ut.platform&&Ut.maxTouchPoints>1&&!window.MSStream))),Jt=St.name===mt,Tt=kt.vendor||Ct,
|
|
547
|
+
var _t,Ut,Yt=St.version,Lt=(kt.name,kt.name===ut||kt.name,kt.name===ht),Ht=kt.name===ct,vt=kt.name===wt,xt=(kt.name,kt.name,kt.name,St.name===Dt||(_t="iPad",(Ut=getNavigatorInstance())&&Ut.platform&&(-1!==Ut.platform.indexOf(_t)||"MacIntel"===Ut.platform&&Ut.maxTouchPoints>1&&!window.MSStream))),Jt=St.name===mt,Tt=kt.vendor||Ct,Pt=Nt.model||Ct,Kt=Nt.vendor||Ct,Ot=kt.name||Ct,zt=Nt.type===Gt,qt=(Nt.type,Nt.type,["EXT_color_buffer_float"])
|
|
548
548
|
__webpack_require__("5652e634c5c30d93d4d6"),__webpack_require__("87e1f99482cebfda8add"),__webpack_require__("4beec9dec8d48546aa7e"),__webpack_require__("837615960468ad3093e4"),__webpack_require__("c06c15d06f4af9a8ce93")
|
|
549
549
|
function standalone_utils_asyncGeneratorStep(A,e,t,i,g,r,I){try{var o=A[r](I),a=o.value}catch(A){return void t(A)}o.done?e(a):Promise.resolve(a).then(i,g)}
|
|
550
550
|
// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
@@ -618,14 +618,14 @@ A=i+"/"+A,e=J.isAbs(i)}return(e?"/":"")+(A=J.normalizeArray(A.split("/").filter(
|
|
|
618
618
|
for(var t=trim(A.split("/")),i=trim(e.split("/")),g=Math.min(t.length,i.length),r=g,I=0;I<g;I++)if(t[I]!==i[I]){r=I
|
|
619
619
|
break}var o=[]
|
|
620
620
|
for(I=r;I<t.length;I++)o.push("..")
|
|
621
|
-
return(o=o.concat(i.slice(r))).join("/")}},
|
|
622
|
-
if(g-e>16&&A.buffer&&
|
|
621
|
+
return(o=o.concat(i.slice(r))).join("/")}},P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,UTF8ArrayToString=(A,e,t)=>{for(var i=e+t,g=e;A[g]&&!(g>=i);)++g
|
|
622
|
+
if(g-e>16&&A.buffer&&P)return P.decode(A.subarray(e,g))
|
|
623
623
|
for(var r="";e<g;){var I=A[e++]
|
|
624
624
|
if(128&I){var o=63&A[e++]
|
|
625
625
|
if(192!=(224&I)){var a=63&A[e++]
|
|
626
626
|
if((I=224==(240&I)?(15&I)<<12|o<<6|a:(7&I)<<18|o<<12|a<<6|63&A[e++])<65536)r+=String.fromCharCode(I)
|
|
627
627
|
else{var s=I-65536
|
|
628
|
-
r+=String.fromCharCode(55296|s>>10,56320|1023&s)}}else r+=String.fromCharCode((31&I)<<6|o)}else r+=String.fromCharCode(I)}return r},
|
|
628
|
+
r+=String.fromCharCode(55296|s>>10,56320|1023&s)}}else r+=String.fromCharCode((31&I)<<6|o)}else r+=String.fromCharCode(I)}return r},K=[],lengthBytesUTF8=A=>{for(var e=0,t=0;t<A.length;++t){var i=A.charCodeAt(t)
|
|
629
629
|
i<=127?e++:i<=2047?e+=2:i>=55296&&i<=57343?(e+=4,++t):e+=3}return e},stringToUTF8Array=(A,e,t,i)=>{if(!(i>0))return 0
|
|
630
630
|
for(var g=t,r=t+i-1,I=0;I<A.length;++I){var o=A.charCodeAt(I)
|
|
631
631
|
if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&A.charCodeAt(++I)),o<=127){if(t>=r)break
|
|
@@ -641,9 +641,9 @@ for(var r=0,I=0;I<i;I++){var o
|
|
|
641
641
|
try{o=A.tty.ops.get_char(A.tty)}catch(A){throw new Z.ErrnoError(29)}if(void 0===o&&0===r)throw new Z.ErrnoError(6)
|
|
642
642
|
if(null===o||void 0===o)break
|
|
643
643
|
r++,e[t+I]=o}return r&&(A.node.timestamp=Date.now()),r},write(A,e,t,i,g){if(!A.tty||!A.tty.ops.put_char)throw new Z.ErrnoError(60)
|
|
644
|
-
try{for(var r=0;r<i;r++)A.tty.ops.put_char(A.tty,e[t+r])}catch(A){throw new Z.ErrnoError(29)}return i&&(A.node.timestamp=Date.now()),r}},default_tty_ops:{get_char:A=>(()=>{if(!
|
|
644
|
+
try{for(var r=0;r<i;r++)A.tty.ops.put_char(A.tty,e[t+r])}catch(A){throw new Z.ErrnoError(29)}return i&&(A.node.timestamp=Date.now()),r}},default_tty_ops:{get_char:A=>(()=>{if(!K.length){var A=null
|
|
645
645
|
if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(A=window.prompt("Input: "))&&(A+="\n"):"function"==typeof readline&&null!==(A=readline())&&(A+="\n"),!A)return null
|
|
646
|
-
|
|
646
|
+
K=intArrayFromString(A,!0)}return K.shift()})(),put_char(A,e){null===e||10===e?(E(UTF8ArrayToString(A.output,0)),A.output=[]):0!=e&&A.output.push(e)},fsync(A){A.output&&A.output.length>0&&(E(UTF8ArrayToString(A.output,0)),A.output=[])},ioctl_tcgets:A=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(A,e,t)=>0,ioctl_tiocgwinsz:A=>[24,80]},default_tty1_ops:{put_char(A,e){null===e||10===e?(c(UTF8ArrayToString(A.output,0)),A.output=[]):0!=e&&A.output.push(e)},fsync(A){A.output&&A.output.length>0&&(c(UTF8ArrayToString(A.output,0)),A.output=[])}}},mmapAlloc=A=>{abort()},V={ops_table:null,mount:A=>V.createNode(null,"/",16895,0),createNode(A,e,t,i){if(Z.isBlkdev(t)||Z.isFIFO(t))throw new Z.ErrnoError(63)
|
|
647
647
|
V.ops_table||={dir:{node:{getattr:V.node_ops.getattr,setattr:V.node_ops.setattr,lookup:V.node_ops.lookup,mknod:V.node_ops.mknod,rename:V.node_ops.rename,unlink:V.node_ops.unlink,rmdir:V.node_ops.rmdir,readdir:V.node_ops.readdir,symlink:V.node_ops.symlink},stream:{llseek:V.stream_ops.llseek}},file:{node:{getattr:V.node_ops.getattr,setattr:V.node_ops.setattr},stream:{llseek:V.stream_ops.llseek,read:V.stream_ops.read,write:V.stream_ops.write,allocate:V.stream_ops.allocate,mmap:V.stream_ops.mmap,msync:V.stream_ops.msync}},link:{node:{getattr:V.node_ops.getattr,setattr:V.node_ops.setattr,readlink:V.node_ops.readlink},stream:{}},chrdev:{node:{getattr:V.node_ops.getattr,setattr:V.node_ops.setattr},stream:Z.chrdev_stream_ops}}
|
|
648
648
|
var g=Z.createNode(A,e,t,i)
|
|
649
649
|
return Z.isDir(g.mode)?(g.node_ops=V.ops_table.dir.node,g.stream_ops=V.ops_table.dir.stream,g.contents={}):Z.isFile(g.mode)?(g.node_ops=V.ops_table.file.node,g.stream_ops=V.ops_table.file.stream,g.usedBytes=0,g.contents=null):Z.isLink(g.mode)?(g.node_ops=V.ops_table.link.node,g.stream_ops=V.ops_table.link.stream):Z.isChrdev(g.mode)&&(g.node_ops=V.ops_table.chrdev.node,g.stream_ops=V.ops_table.chrdev.stream),g.timestamp=Date.now(),A&&(A.contents[e]=g,A.timestamp=g.timestamp),g},getFileDataAsTypedArray:A=>A.contents?A.contents.subarray?A.contents.subarray(0,A.usedBytes):new Uint8Array(A.contents):new Uint8Array(0),expandFileStorage(A,e){var t=A.contents?A.contents.length:0
|
|
@@ -1315,7 +1315,7 @@ const setIfNotNil=(A,e,t)=>(null!=e&&(t[A]=e),t),areSizesEqual=(A,e)=>(null===A|
|
|
|
1315
1315
|
const ci=
|
|
1316
1316
|
// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
1317
1317
|
class Pipeline{constructor(A,e,t){this.steps=A.map((A=>{const e=A.runner()
|
|
1318
|
-
return{step:A,generator:e}})),this.onAfterRenderCallbacks=[],this.onStopCallback=()=>{},this.video=e,this.frame=t,this.persistentContext={}
|
|
1318
|
+
return{step:A,generator:e}})),this.onAfterRenderCallbacks=[],this.onStopCallback=()=>{},this.video=e,this.frame=t,this.persistentContext={}}async init(){const A=[this.frame.init()],e=this.steps.map((A=>{let{step:e,generator:t}=A
|
|
1319
1319
|
return Promise.resolve().then((()=>e.init())).then((A=>(t.next(),A)))})),t=await Promise.all([...A,...e]).then((e=>e.slice(A.length)))
|
|
1320
1320
|
return t.reduce(((A,e)=>e?{...A,...e}:A),{})}reInit(A){return Promise.all(this.steps.map((e=>{let{step:t}=e
|
|
1321
1321
|
return Promise.resolve().then((()=>t.reInit(A)))}))).then((A=>A.reduce(((A,e)=>(e&&"object"===typeof e&&!Array.isArray(e)||(e={}),{...A,...e})),{})))}getError(A,e,t){return new st(`Error in a pipline step: ${A}.`,{messageParams:{context:t,step:e.step.constructor.name}})}getInitialContext(){return{video:this.video,frame:this.frame,persistent:this.persistentContext}}async runSteps(){if(!this.running)return
|
|
@@ -1335,7 +1335,7 @@ this.running=!0
|
|
|
1335
1335
|
return this.runningPromise=(async()=>{for(A=performance.now();this.running;){this.stepsPromise=this.runSteps(),await this.stepsPromise
|
|
1336
1336
|
const e=performance.now()-A
|
|
1337
1337
|
this.onAfterRenderCallbacks.forEach((A=>{A(this.steps.map((A=>{let{step:e}=A
|
|
1338
|
-
return{name:e.constructor.name,timeSpent:e.timeSpent,timeSpentDetails:e.performanceTime}})),e)})),A=performance.now()}})(),this.
|
|
1338
|
+
return{name:e.constructor.name,timeSpent:e.timeSpent,timeSpentDetails:e.performanceTime}})),e)})),A=performance.now()}})(),this.runningPromise}onAfterRender(A){return this.onAfterRenderCallbacks.push(A),this}removeOnAfterRender(A){const e=this.onAfterRenderCallbacks.findIndex((e=>e===A));-1!==e&&this.onAfterRenderCallbacks.splice(e,1)}onStop(A){return this.onStopCallback=A,this}stop(){this.running=!1,this.steps.forEach((A=>{let{generator:e}=A
|
|
1339
1339
|
e.return()})),this.onStopCallback(this.steps)}async pause(){this.running=!1,await this.stepsPromise}isRunning(){return this.running}getDebugData(){return this.steps.reduce(((A,e)=>({...A,...e.step.getDebugData()})),{})}}
|
|
1340
1340
|
|
|
1341
1341
|
;// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
@@ -1350,7 +1350,7 @@ throw new TypeError("@@toPrimitive must return a primitive value.")}return("stri
|
|
|
1350
1350
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
1351
1351
|
(A,"string")
|
|
1352
1352
|
return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}class DynamicFrame{constructor(A){let{frames:e,logger:t,...i}=A
|
|
1353
|
-
DynamicFrame_defineProperty(this,"proxiedMethods",["debugGrayframe","debugNnInput","debugBbox","debugImage","enterStep","getDebugData","getDownscaledGrayMat","getDownscaledSize","getDownscaledTensorData","getDownscaledBboxTensorData","onBeforeExecute","onBeforeRender","renderBackground","renderFullFrame","requiresRotation","setStream","setBbox"]),DynamicFrame_defineProperty(this,"proxiedProps",["height","sizeChanged","width","bbox","scaledBbox"
|
|
1353
|
+
DynamicFrame_defineProperty(this,"proxiedMethods",["debugGrayframe","debugNnInput","debugBbox","debugImage","enterStep","getDebugData","getDownscaledGrayMat","getDownscaledSize","getDownscaledTensorData","getDownscaledBboxTensorData","onBeforeExecute","onBeforeRender","renderBackground","renderFullFrame","requiresRotation","setStream","setBbox","setStreamMirroring"]),DynamicFrame_defineProperty(this,"proxiedProps",["height","sizeChanged","width","bbox","scaledBbox"]),this.name=DynamicFrame.name,this.frames=e,this.props=i,this.logger=t,this._createNextFrame(e,0),this._createProxiedProps(this.proxiedProps),this._createProxiedMethods(this.proxiedMethods)}_createNextFrame(A,e){this.frameIndex=this._selectSupportedFrameImplementation(A,e),this.frame=new A[this.frameIndex](this.props)}_selectSupportedFrameImplementation(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0
|
|
1354
1354
|
const t=A.slice(e).findIndex((A=>A.isSupported()))
|
|
1355
1355
|
if(t<0)throw new Error("No supported frames")
|
|
1356
1356
|
return e+t}_createProxiedProps(A){A.forEach((A=>{Object.defineProperty(this,A,{get(){return this.frame[A]}})}))}_createProxiedMethods(A){A.forEach((A=>{this[A]=function(){return this.frame[A].apply(this.frame,arguments)}}))}async init(){let A=!1
|
|
@@ -1374,7 +1374,7 @@ return cornersToBbox([Math.round(o-s),Math.round(a-n)],[Math.round(o+s),Math.rou
|
|
|
1374
1374
|
return[g,cornersToBboxCropped(I,[Math.round(t.width-o*r),Math.round(t.height-a*r)],t)]}function resize(A,e,t){t.resize(A,e,new t.Size(e.cols,e.rows),0,0,t.INTER_LINEAR)}function resizeBbox(A,e,t,i){const[[g,r,I,o],[a,s,n,B]]=getSourceDestinationExtendedBboxes(t,{width:A.cols,height:A.rows},{width:e.cols,height:e.rows})
|
|
1375
1375
|
e.setTo(new i.Scalar(0))
|
|
1376
1376
|
const C=A.roi(new i.Rect(g,r,I,o)),E=e.roi(new i.Rect(a,s,n,B))
|
|
1377
|
-
resize(C,E,i),C.delete(),E.delete()}function BaseFrame_defineProperty(A,e,t){return(e=function BaseFrame_toPropertyKey(A){var e=function BaseFrame_toPrimitive(A,e){if("object"!=typeof A||!A)return A
|
|
1377
|
+
resize(C,E,i),C.delete(),E.delete()}function flipX(A,e,t){t.flip(A,e,1)}function BaseFrame_defineProperty(A,e,t){return(e=function BaseFrame_toPropertyKey(A){var e=function BaseFrame_toPrimitive(A,e){if("object"!=typeof A||!A)return A
|
|
1378
1378
|
var t=A[Symbol.toPrimitive]
|
|
1379
1379
|
if(void 0!==t){var i=t.call(A,e||"default")
|
|
1380
1380
|
if("object"!=typeof i)return i
|
|
@@ -1383,9 +1383,9 @@ throw new TypeError("@@toPrimitive must return a primitive value.")}return("stri
|
|
|
1383
1383
|
(A,"string")
|
|
1384
1384
|
return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}const di=getPlayButton()
|
|
1385
1385
|
class BaseFrame{constructor(A){let{nn:e,video:t,libInjector:i,resetStream:g,onSizeChange:r,enableFrameRotation:I=!1}=A
|
|
1386
|
-
BaseFrame_defineProperty(this,"_acceptedProps",["sizeChanged","_currentStep","_index"]),this.name=this.constructor.name,[this._frame,this._prevFrame]=getBackgroundCanvases(),this.webglCanvas=getWebglCanvas(),this.nn=e,this.video=t,this.libInjector=i,this.resetStream=g,this._onSizeChange=r,this.width=0,this.height=0,this.sizeChanged=!1,this.bbox=[0,0,0,0],this.scaledBbox=[0,0,0,0],this.
|
|
1386
|
+
BaseFrame_defineProperty(this,"_acceptedProps",["sizeChanged","_currentStep","_index"]),BaseFrame_defineProperty(this,"shouldBeMirrored",!1),this.name=this.constructor.name,[this._frame,this._prevFrame]=getBackgroundCanvases(),this.webglCanvas=getWebglCanvas(),this.nn=e,this.video=t,this.libInjector=i,this.resetStream=g,this._onSizeChange=r,this.width=0,this.height=0,this.sizeChanged=!1,this.bbox=[0,0,0,0],this.scaledBbox=[0,0,0,0],this.enableFrameRotation=I,this._currentStep=null,this._frameRate=0,this._timeLastCaptured=0,this._index=-1,this.cv=null,this._init=onceSuccess(this._init)}async _init(){await Promise.all([this.libInjector.getOpenCv()]).then((A=>{let[{cv:e}]=A
|
|
1387
1387
|
this.cv=e}))}async init(){await Promise.race([this._init().catch((A=>{emit(l,st.toObject(A))})),Promise.resolve({})])}setSize(A){let{width:e,height:t}=A
|
|
1388
|
-
areSizesEqual(this,{width:e,height:t})?this.sizeChanged=!1:(this.sizeChanged=!0,this.width=e,this.height=t,this.setBbox([0,0,e,t]),this.onSizeChange(),this._onSizeChange({width:e,height:t}))}setBbox(A){this.bbox=A||[0,0,this.width,this.height],this.scaledBbox=scaleBboxToRatio(this.bbox,this.getDownscaledSize())
|
|
1388
|
+
areSizesEqual(this,{width:e,height:t})?this.sizeChanged=!1:(this.sizeChanged=!0,this.width=e,this.height=t,this.setBbox([0,0,e,t]),this.onSizeChange(),this._onSizeChange({width:e,height:t}))}setBbox(A){this.bbox=A||[0,0,this.width,this.height],this.scaledBbox=scaleBboxToRatio(this.bbox,this.getDownscaledSize())}setStreamMirroring(A){this.shouldBeMirrored=A}requiresRotation(A){const{width:e,height:t}=A||this
|
|
1389
1389
|
return this.enableFrameRotation&&Boolean(t>e)}enterStep(A){this._currentStep&&Object.keys(this._currentStep.performanceTime).filter((A=>{if(!this._currentStep.performanceTime[A].end)return this._currentStep.stopTimer(A),A.startsWith("p__")||(this._currentStep.performanceTime["p__"+A]=this._currentStep.performanceTime[A],delete this._currentStep.performanceTime[A]),!0})).map((e=>{e.startsWith("p__")?A.startTimer(e):A.startTimer("p__"+e)})),this._currentStep=A}startTimer(A){this._currentStep.startTimer(A)}stopTimer(A){this._currentStep.stopTimer(A)}profile(A,e){if(!this._currentStep)return e()
|
|
1390
1390
|
const t=this._currentStep
|
|
1391
1391
|
this._index
|
|
@@ -1403,7 +1403,7 @@ this.profile("saveFrameToFile",(()=>{window.saveFrameToFile(i,e,!1,t)}))}async e
|
|
|
1403
1403
|
return function(){return this._index!==e&&(t=A.apply(this,arguments),e=this._index),t}}debugNnInput(A,e){const{data:t,width:i,height:g}=e
|
|
1404
1404
|
let r
|
|
1405
1405
|
try{r=new this.cv.matFromArray(g,i,this.cv.CV_32FC3,t),this.debugImage(A,r)}finally{var I
|
|
1406
|
-
null===(I=r)||void 0===I||I.delete()}}debugBbox(A){const e=A.getContext("2d"),[t,i,g,r]=this.
|
|
1406
|
+
null===(I=r)||void 0===I||I.delete()}}debugBbox(A){const e=A.getContext("2d"),[t,i,g,r]=cropBbox(this.scaledBbox,this)
|
|
1407
1407
|
e.beginPath(),e.lineWidth="2",e.strokeStyle="red",e.rect(t,i,g,r),e.stroke()}debugGrayframe(A){const e=this.getGrayscaleMat()
|
|
1408
1408
|
this.debugImage(A,e)}debugImage(A,e){this.cv.imshow(A,e)}delete(){}acceptState(A){this._acceptedProps.forEach((e=>{this[e]=A[e]})),this.width=0,this.height=0,this.sizeChanged=!0}getDebugData(){return{frame:this.name}}static isSupported(){return!1}_bgrU8MatToGrayMat(A,e){this.cv.cvtColor(A,e,this.cv.COLOR_BGR2GRAY)}_bgrU8MatToBgrF32Mat(A,e){A.convertTo(e,this.cv.CV_32F,1/255,0)}_matToTensorData(A){return{data:A.data32F,width:A.cols,height:A.rows}}}__webpack_require__("52b07ba05eba8f693663"),__webpack_require__("4203b339b536279ea291"),__webpack_require__("cbaf2240d78c47f0f156"),__webpack_require__("8e1a223b4032ef8649c8"),__webpack_require__("97736dd946dfb5b845a1"),__webpack_require__("8eaa32b36ac642742c6d"),__webpack_require__("316876464663ec88817e")
|
|
1409
1409
|
|
|
@@ -1424,13 +1424,13 @@ throw new TypeError("@@toPrimitive must return a primitive value.")}return("stri
|
|
|
1424
1424
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
1425
1425
|
(A,"string")
|
|
1426
1426
|
return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}class EncodedVideoFrame{constructor(A){let{cv:e,getDownscaledSize:t,profile:i}=A
|
|
1427
|
-
EncodedVideoFrame_defineProperty(this,"FALLBACK_FORMAT_FOR_COPY_TO",!1),EncodedVideoFrame_defineProperty(this,"FALLBACK_NON_YUV_TO_YUV_FORMAT",!1),this.cv=e,this.getDownscaledSize=t,this.profile=i,this.width=null,this.height=null,this.format=null,this.matFullResEncoded=null,this.matDownscaledEncoded=null}_getEncodedSizes(A){let{format:e,height:t,width:i}=A
|
|
1427
|
+
EncodedVideoFrame_defineProperty(this,"FALLBACK_FORMAT_FOR_COPY_TO",!1),EncodedVideoFrame_defineProperty(this,"FALLBACK_NON_YUV_TO_YUV_FORMAT",!1),this.cv=e,this.getDownscaledSize=t,this.profile=i,this.width=null,this.height=null,this.format=null,this.matFullResNonMirrored=null,this.matFullResEncoded=null,this.matDownscaledEncoded=null}_getEncodedSizes(A){let{format:e,height:t,width:i}=A
|
|
1428
1428
|
const{width:g,height:r}=this.getDownscaledSize({width:i,height:t})
|
|
1429
1429
|
let I,o
|
|
1430
1430
|
return processFormat(e,{yuvCallback:()=>{I=1.5,o=this.cv.CV_8UC1},rgbaCallback:()=>{I=1,o=this.cv.CV_8UC4}}),{fullResSize:{width:i,height:Math.floor(t*I)},downscaledSize:{width:g,height:Math.floor(r*I)},channels:o}}_updateSizes(A){let{format:e,height:t,width:i}=A
|
|
1431
1431
|
if(this.format===e&&areSizesEqual(this,{width:i,height:t}))return
|
|
1432
1432
|
this.format=e,this.height=t,this.width=i
|
|
1433
|
-
const{fullResSize:{width:g,height:r},downscaledSize:{width:I,height:o},channels:a}=this._getEncodedSizes({format:e,height:t,width:i});[this.matFullResEncoded,this.matDownscaledEncoded]=[[this.matFullResEncoded,[r,g],a],[this.matDownscaledEncoded,[o,I],a]].map((A=>{let[e,[t,i],g]=A
|
|
1433
|
+
const{fullResSize:{width:g,height:r},downscaledSize:{width:I,height:o},channels:a}=this._getEncodedSizes({format:e,height:t,width:i});[this.matFullResNonMirrored,this.matFullResEncoded,this.matDownscaledEncoded]=[[this.matFullResNonMirrored,[r,g],a],[this.matFullResEncoded,[r,g],a],[this.matDownscaledEncoded,[o,I],a]].map((A=>{let[e,[t,i],g]=A
|
|
1434
1434
|
return e?e.create(t,i,g):e=new this.cv.Mat(t,i,g),e}))}_frameToYUV(A,e){const{width:t,height:i}=A.visibleRect
|
|
1435
1435
|
this.matFullResEncoded?this.matFullResEncoded.create(3*i/2,t,this.cv.CV_8UC1):this.matFullResEncoded=new this.cv.Mat(3*i/2,t,this.cv.CV_8UC1),this.tmpCanvas=this.tmpCanvas||document.createElement("canvas"),this.tmpCanvas.width=t,this.tmpCanvas.height=i,this.tmpCanvas.getContext("2d").drawImage(A,0,0)
|
|
1436
1436
|
const g=this.cv.imread(this.tmpCanvas)
|
|
@@ -1438,15 +1438,15 @@ switch(this.cv.cvtColor(g,this.matFullResEncoded,this.cv.COLOR_RGBA2YUV_I420),g.
|
|
|
1438
1438
|
case ui:{const{data:A}=this.matFullResEncoded,e=t*i,g=t*i/4,r=new Uint8Array(t*i/2)
|
|
1439
1439
|
for(let t=0;t<g;++t)r[2*t]=A[e+t],r[2*t+1]=A[e+g+t]
|
|
1440
1440
|
A.set(r,e)
|
|
1441
|
-
break}default:throw new Error(`Fallback to "${e}" is not supported.`)}}async acceptFrameData(A){let{buffer:
|
|
1442
|
-
const{height:
|
|
1443
|
-
if(e)return this._updateSizes({format:
|
|
1444
|
-
let
|
|
1445
|
-
this.FALLBACK_NON_YUV_TO_YUV_FORMAT&&!function isYUV(A){return A===li||A===ui}(
|
|
1446
|
-
const{timestamp:A,visibleRect:{width:e,height:t}}=
|
|
1447
|
-
|
|
1448
|
-
try{await this.profile("copyTo",(async()=>{await
|
|
1449
|
-
this.profile("slow-fallback-for-copyTo",(()=>{this._frameToYUV(
|
|
1441
|
+
break}default:throw new Error(`Fallback to "${e}" is not supported.`)}}_mirrorEncodedData(){processFormat(this.format,{yuvCallback:()=>this._mirrorYUV(this.matFullResNonMirrored,this.matFullResEncoded),rgbaCallback:()=>{flipX(this.matFullResNonMirrored,this.matFullResEncoded,this.cv)}})}_acceptBuffer(A){this.shouldBeMirrored?this.matFullResNonMirrored.data.set(new Uint8Array(A)):this.matFullResEncoded.data.set(new Uint8Array(A)),this.shouldBeMirrored&&this._mirrorEncodedData()}async _acceptVideoFrame(A){await A.copyTo(this.shouldBeMirrored?this.matFullResNonMirrored.data:this.matFullResEncoded.data),this.shouldBeMirrored&&this._mirrorEncodedData()}async acceptFrameData(A,e){let{buffer:t,format:i,frame:g}=A
|
|
1442
|
+
const{height:r,width:I}=g.visibleRect
|
|
1443
|
+
if(this.shouldBeMirrored=e,t)return this._updateSizes({format:i,height:r,width:I}),void this._acceptBuffer(t)
|
|
1444
|
+
let o=!1
|
|
1445
|
+
this.FALLBACK_NON_YUV_TO_YUV_FORMAT&&!function isYUV(A){return A===li||A===ui}(g.format)&&this.profile("slow-fallback-for-nv12-frame",(()=>{this._frameToYUV(g,this.FALLBACK_NON_YUV_TO_YUV_FORMAT)
|
|
1446
|
+
const{timestamp:A,visibleRect:{width:e,height:t}}=g
|
|
1447
|
+
g=new VideoFrame(this.matFullResEncoded.data,{format:this.FALLBACK_NON_YUV_TO_YUV_FORMAT,codedWidth:e,codedHeight:t,timestamp:A}),o=!0})),({format:i}=g),this._updateSizes({format:i,height:r,width:I})
|
|
1448
|
+
try{await this.profile("copyTo",(async()=>{await this._acceptVideoFrame(g)})),o&&g.close()}catch(A){if(!this.FALLBACK_FORMAT_FOR_COPY_TO||A)throw new st("Failed to copy frame to mat",{cause:A||new Error("undefined error from copyTo")})
|
|
1449
|
+
this.profile("slow-fallback-for-copyTo",(()=>{this._frameToYUV(g,this.FALLBACK_FORMAT_FOR_COPY_TO),this.format=this.FALLBACK_FORMAT_FOR_COPY_TO}))}}_mirrorYUV(A,e){this._processYUV(A,e,this,this,((A,e)=>{flipX(A,e,this.cv)}),this.format)}_extractI420UV(A,e){let{width:t,height:i}=e
|
|
1450
1450
|
const g=A.roi(new this.cv.Rect(0,i,t,i/2)),r=g.reshape(1,1)
|
|
1451
1451
|
g.delete()
|
|
1452
1452
|
const I=r.cols/2,[o,a]=[0,I].map((A=>r.roi(new this.cv.Rect(A,0,I,1)))).map((A=>{const e=A.reshape(1,i/2)
|
|
@@ -1459,11 +1459,11 @@ if(g===li)return null===(r=this.uvVector)||void 0===r||r.delete(),this.uvVector=
|
|
|
1459
1459
|
if(g===ui)return this._extractNV12UV(A,{width:t,height:i})
|
|
1460
1460
|
throw new Error(`Unsupported format "${g}".`)}_extractYUV(A,e){let{width:t,height:i,format:g}=e
|
|
1461
1461
|
const r=A.roi(new this.cv.Rect(0,0,t,i)),[I,o]=this._extractUV(A,{width:t,height:i,format:g})
|
|
1462
|
-
return[r,I,o]}_processYUV(A,e,t,i,g){const{width:
|
|
1463
|
-
g(e,t),e.delete(),t.delete()}))}_downscaleYUV(A,e,t){this._processYUV(A,e,this,this.getDownscaledSize(),t)}convertToBGR(A){processFormat(this.format,{yuvCallback:()=>this._downscaleYUV(this.matFullResEncoded,this.matDownscaledEncoded,((A,e)=>resize(A,e,this.cv))),rgbaCallback:()=>resize(this.matFullResEncoded,this.matDownscaledEncoded,this.cv)}),this._convertColor(this.matDownscaledEncoded,A)}convertBboxToBGR(A,e){processFormat(this.format,{yuvCallback:()=>this._downscaleYUV(this.matFullResEncoded,this.matDownscaledEncoded,((A,t)=>{const i=this.width/A.cols,g=this.height/A.rows
|
|
1462
|
+
return[r,I,o]}_processYUV(A,e,t,i,g,r){const{width:I,height:o}=t,{width:a,height:s}=i,[n,B,C]=this._extractYUV(A,{width:I,height:o,format:r}),[E,c,h]=this._extractYUV(e,{width:a,height:s,format:li});[[n,E],[B,c],[C,h]].forEach((A=>{let[e,t]=A
|
|
1463
|
+
g(e,t),e.delete(),t.delete()}))}_downscaleYUV(A,e,t){this._processYUV(A,e,this,this.getDownscaledSize(),t,this.shouldBeMirrored?li:this.format)}convertToBGR(A){processFormat(this.format,{yuvCallback:()=>this._downscaleYUV(this.matFullResEncoded,this.matDownscaledEncoded,((A,e)=>resize(A,e,this.cv))),rgbaCallback:()=>resize(this.matFullResEncoded,this.matDownscaledEncoded,this.cv)}),this._convertColor(this.matDownscaledEncoded,A)}convertBboxToBGR(A,e){processFormat(this.format,{yuvCallback:()=>this._downscaleYUV(this.matFullResEncoded,this.matDownscaledEncoded,((A,t)=>{const i=this.width/A.cols,g=this.height/A.rows
|
|
1464
1464
|
resizeBbox(A,t,[Math.floor(e[0]/i),Math.floor(e[1]/g),Math.ceil(e[2]/i),Math.ceil(e[3]/g)],this.cv)})),rgbaCallback:()=>resizeBbox(this.matFullResEncoded,this.matDownscaledEncoded,e,this.cv)}),this._convertColor(this.matDownscaledEncoded,A)}_convertColor(A,e){this.cv.cvtColor(A,e,this.cv[pi[this.format]])}}
|
|
1465
1465
|
// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
1466
|
-
function drawImage(A,e,t,i){A.drawImage(e,0,0,t,i)}function MediaStreamTrackProcessorFrame_defineProperty(A,e,t){return(e=function MediaStreamTrackProcessorFrame_toPropertyKey(A){var e=function MediaStreamTrackProcessorFrame_toPrimitive(A,e){if("object"!=typeof A||!A)return A
|
|
1466
|
+
function drawImage(A,e,t,i){arguments.length>4&&void 0!==arguments[4]&&arguments[4]&&(A.translate(t,0),A.scale(-1,1)),A.drawImage(e,0,0,t,i)}function MediaStreamTrackProcessorFrame_defineProperty(A,e,t){return(e=function MediaStreamTrackProcessorFrame_toPropertyKey(A){var e=function MediaStreamTrackProcessorFrame_toPrimitive(A,e){if("object"!=typeof A||!A)return A
|
|
1467
1467
|
var t=A[Symbol.toPrimitive]
|
|
1468
1468
|
if(void 0!==t){var i=t.call(A,e||"default")
|
|
1469
1469
|
if("object"!=typeof i)return i
|
|
@@ -1485,15 +1485,15 @@ this.promise&&await this.onBeforeRender(),null===(e=this.background)||void 0===e
|
|
|
1485
1485
|
let{value:t,done:i}=await this.profile("read",(async()=>{try{return await this.reader.read()}catch(A){throw new st("Failed to read frame.",{cause:A})}}))
|
|
1486
1486
|
if(!t)throw new st("Cannot read frame. Perhaps camera permissions were revoked.")
|
|
1487
1487
|
return{frame:t}}async readFrameData(A){const{frame:e}=A,t=e.visibleRect
|
|
1488
|
-
return this.matricesInitialized&&areSizesEqual(this.encodedVideoFrame,t)||(this.preinitMatrices(t),this.matricesInitialized=!0),await this.encodedVideoFrame.acceptFrameData(A),t}async _requestFrame(A){if(A)throw new Error("eval is not supported yet");[this._frame,this._prevFrame]=[this._prevFrame,this._frame]
|
|
1488
|
+
return this.matricesInitialized&&areSizesEqual(this.encodedVideoFrame,t)||(this.preinitMatrices(t),this.matricesInitialized=!0),await this.encodedVideoFrame.acceptFrameData(A,this.shouldBeMirrored),t}async _requestFrame(A){if(A)throw new Error("eval is not supported yet");[this._frame,this._prevFrame]=[this._prevFrame,this._frame]
|
|
1489
1489
|
const e=await this.getFrameData(A),{frame:t}=e
|
|
1490
1490
|
this.background=t
|
|
1491
1491
|
const i=await this.readFrameData(e)
|
|
1492
|
-
return this.USE_BITMAPS&&this.profile("createBitmapPromise",(()=>{this.promise=createImageBitmap(t).finally((()=>{t.close()}))})),i}_haveEnoughData(){return!0}getDownscaledBgrU8Mat(){return this.encodedVideoFrame.convertToBGR(this.matDownscaledBgrU8),this.matDownscaledBgrU8}getDownscaledBboxBgrU8Mat(){return this.encodedVideoFrame.convertBboxToBGR(this.matDownscaledBboxBgrU8,this.
|
|
1492
|
+
return this.USE_BITMAPS&&this.profile("createBitmapPromise",(()=>{this.promise=createImageBitmap(t).finally((()=>{t.close()}))})),i}_haveEnoughData(){return!0}getDownscaledBgrU8Mat(){return this.encodedVideoFrame.convertToBGR(this.matDownscaledBgrU8),this.matDownscaledBgrU8}getDownscaledBboxBgrU8Mat(){return this.encodedVideoFrame.convertBboxToBGR(this.matDownscaledBboxBgrU8,this.scaledBbox),this.matDownscaledBboxBgrU8}getDownscaledTensorMat(){return this._bgrU8MatToBgrF32Mat(this.getDownscaledBgrU8Mat(),this.matDownscaledBgrF32),this.matDownscaledBgrF32}getDownscaledBboxTensorMat(){return this._bgrU8MatToBgrF32Mat(this.getDownscaledBboxBgrU8Mat(),this.matDownscaledBboxBgrF32),this.matDownscaledBboxBgrF32}getDownscaledTensorData(){const A=this.getDownscaledTensorMat()
|
|
1493
1493
|
let e
|
|
1494
1494
|
return this.requiresRotation()?(this.profile("cv.rotate",(()=>{this.cv.rotate(A,this.matDownscaledRotated,this.cv.ROTATE_90_COUNTERCLOCKWISE)})),e=this.matDownscaledRotated):e=A,this._matToTensorData(e)}getDownscaledBboxTensorData(){const A=this.getDownscaledBboxTensorMat()
|
|
1495
1495
|
return this._matToTensorData(A)}getDownscaledGrayMat(){return this._bgrU8MatToGrayMat(this.getDownscaledBgrU8Mat(),this.matDownscaledGray),this.matDownscaledGray}async onBeforeRender(){this.USE_BITMAPS&&(this.background=await this.profile("onBeforeRender",(()=>this.promise)),this.promise=null)}_showFrame(){this._frame.classList.add("current-background"),this._prevFrame.classList.remove("current-background")}_drawBackground(A){let{width:e,height:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this
|
|
1496
|
-
this._frame.width=e,this._frame.height=t,this.profile("background",(()=>{drawImage(this._frame.getContext("2d",this.fullscreenContextAttributes),A,e,t)}))}renderBackground(){this._drawBackground(this.background),this.background.close(),this.background=null,this._showFrame()}delete(){var A,e
|
|
1496
|
+
this._frame.width=e,this._frame.height=t,this.profile("background",(()=>{drawImage(this._frame.getContext("2d",this.fullscreenContextAttributes),A,e,t,this.shouldBeMirrored)}))}renderBackground(){this._drawBackground(this.background),this.background.close(),this.background=null,this._showFrame()}delete(){var A,e
|
|
1497
1497
|
this.USE_BITMAPS?null===(A=this.promise)||void 0===A||A.then((A=>A.close())):null===(e=this.background)||void 0===e||e.close()}getDebugData(){var A
|
|
1498
1498
|
return{...super.getDebugData(),format:(null===(A=this.encodedVideoFrame)||void 0===A?void 0:A.format)||"-"}}static isSupported(){return[typeof MediaStreamTrackProcessor,typeof VideoFrame].every((A=>"undefined"!==A))}}function DoubleBufferedCanvasFrame_defineProperty(A,e,t){return(e=function DoubleBufferedCanvasFrame_toPropertyKey(A){var e=function DoubleBufferedCanvasFrame_toPrimitive(A,e){if("object"!=typeof A||!A)return A
|
|
1499
1499
|
var t=A[Symbol.toPrimitive]
|
|
@@ -1506,11 +1506,11 @@ return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enum
|
|
|
1506
1506
|
class DoubleBufferedCanvasFrame extends BaseFrame{constructor(){super(...arguments),DoubleBufferedCanvasFrame_defineProperty(this,"fullscreenContextAttributes",{alpha:!1}),DoubleBufferedCanvasFrame_defineProperty(this,"downscaledContextAttributes",{alpha:!1,willReadFrequently:!0}),this.downscaledCanvas=null,this.downscaledBboxCanvas=null,this.matDownscaledRgbaU8=null,this.matDownscaledBboxRgbaU8=null,this.matDownscaledBgrU8=null,this.matDownscaledBgrF32=null,this.matDownscaledBboxBgrF32=null,this.matDownscaledBboxBgrU8=null,this.matDownscaledGray=null,this.getDownscaledCanvas=BaseFrame.cachePerFrame(this.getDownscaledCanvas),this.getDownscaledBboxCanvas=BaseFrame.cachePerFrame(this.getDownscaledBboxCanvas),this.getDownscaledBgrU8Mat=BaseFrame.cachePerFrame(this.getDownscaledBgrU8Mat),this.getDownscaledBboxBgrU8Mat=BaseFrame.cachePerFrame(this.getDownscaledBboxBgrU8Mat),this.getDownscaledTensorMat=BaseFrame.cachePerFrame(this.getDownscaledTensorMat),this.getDownscaledBboxTensorMat=BaseFrame.cachePerFrame(this.getDownscaledBboxTensorMat),this._frameRate=30}async getVideoFrame(A,e){let t,i,g
|
|
1507
1507
|
e?(t=e,({width:i,height:g}=e)):(t=this.video,i=this.video.videoWidth,g=this.video.videoHeight)
|
|
1508
1508
|
const r=A.getContext("2d",this.fullscreenContextAttributes)
|
|
1509
|
-
if(i>0&&g>0){if(A.width=i,A.height=g,this.USE_BITMAPS)try{t=await this.profile("createFullResImageBitmap",(async()=>await createImageBitmap(t)))}catch(A){}this.profile("drawImage",(()=>{drawImage(r,t,i,g),t.close&&t.close()}))}return A}enterStep(A){super.enterStep(A),this.downscaledCanvas=this.downscaledCanvas||this._initDownscaledCanvas(),this.downscaledBboxCanvas=this.downscaledBboxCanvas||this._initDownscaledCanvas()}_initDownscaledCanvas(){const A=this.getCanvas(this.getDownscaledSize())
|
|
1509
|
+
if(i>0&&g>0){if(A.width=i,A.height=g,this.USE_BITMAPS)try{t=await this.profile("createFullResImageBitmap",(async()=>await createImageBitmap(t)))}catch(A){}this.profile("drawImage",(()=>{drawImage(r,t,i,g,this.shouldBeMirrored),t.close&&t.close()}))}return A}enterStep(A){super.enterStep(A),this.downscaledCanvas=this.downscaledCanvas||this._initDownscaledCanvas(),this.downscaledBboxCanvas=this.downscaledBboxCanvas||this._initDownscaledCanvas()}_initDownscaledCanvas(){const A=this.getCanvas(this.getDownscaledSize())
|
|
1510
1510
|
return A.mozImageSmoothingEnabled=!1,A.webkitImageSmoothingEnabled=!1,A.imageSmoothingEnabled=!1,A}getCanvas(){return this._currentStep.getCanvas(...arguments)}getDownscaledCanvas(){return this.downscaleFrameToCanvas(this.downscaledCanvas),this.downscaledCanvas}getDownscaledBboxCanvas(){const{width:A,height:e}=this.getDownscaledSize()
|
|
1511
1511
|
return this.convertFrameBboxToCanvas(this.downscaledBboxCanvas,A,e),this.downscaledBboxCanvas}convertFrameToCanvas(A,e,t){A.width=e,A.height=t
|
|
1512
1512
|
A.getContext("2d",this.downscaledContextAttributes).drawImage(this._frame,0,0,e,t)}convertFrameBboxToCanvas(A,e,t){A.width=e,A.height=t
|
|
1513
|
-
const[[i,g,r,I],[o,a,s,n]]=getSourceDestinationExtendedBboxes(this.
|
|
1513
|
+
const[[i,g,r,I],[o,a,s,n]]=getSourceDestinationExtendedBboxes(this.scaledBbox,{width:this.width,height:this.height},{width:e,height:t})
|
|
1514
1514
|
A.getContext("2d",this.downscaledContextAttributes).drawImage(this._frame,i,g,r,I,o,a,s,n)}downscaleFrameToCanvas(A){const{width:e,height:t}=this.getDownscaledSize()
|
|
1515
1515
|
this.convertFrameToCanvas(A,e,t)}setStream(A){this.video.srcObject=A}async checkStream(){if(this.video.src)await this._checkVideo()
|
|
1516
1516
|
else{const A=await this._checkStream(this.video.srcObject)
|
|
@@ -1775,14 +1775,14 @@ return e[3]=A[0],e[7]=A[1],e[11]=A[2],e}static extractTranslation(A){return[A[3]
|
|
|
1775
1775
|
for(let i=0;i<4;i++)for(let g=0;g<4;g++)for(let r=0;r<4;r++)t[4*i+g]+=A[4*i+r]*e[4*r+g]
|
|
1776
1776
|
return t}static mulCol(A,e){const t=Si.zeros(4)
|
|
1777
1777
|
for(let i=0;i<4;i++)for(let g=0;g<4;g++)t[i]+=A[4*i+g]*e[g]
|
|
1778
|
-
return t}static copy(A){return A.slice()}}const
|
|
1778
|
+
return t}static copy(A){return A.slice()}}const Pi=TransformMatrix,Ki="TYPE_INNER_STUB",Oi={intersectLegWithShin:function(A,e,t){if(!t)return A.map(((A,t)=>this.max(A,255-e[t])))
|
|
1779
1779
|
for(let i=0;i<t.length;++i)t[i]=this.max(A[i],255-e[i])},getInnerStubs:async function(A,e){try{await A.wait_for_load()
|
|
1780
|
-
const[t,i]=await this.getObjectsFromLoader(A,
|
|
1780
|
+
const[t,i]=await this.getObjectsFromLoader(A,Ki,e)
|
|
1781
1781
|
return{leftInnerStub:null===t||void 0===t?void 0:t.scene,rightInnerStub:null===i||void 0===i?void 0:i.scene}}catch(A){throw new st("Error loading inner stub",{cause:A})}},_getAdditionalModelResources:async function(A){let{modelId:e,mainPromise:t,loadContext:i}=A
|
|
1782
1782
|
const g=[t],r=await this.modelMetaManager.getMeta(e)
|
|
1783
1783
|
if(!!r.findInlineDatapackEntryByLabel("inner_stub_rmdesc")){const A=this.innerStubLoaderFactory.create(r)
|
|
1784
1784
|
g.push(this.getInnerStubs(A,i))}return Promise.all(g).then((A=>{let[e,t={}]=A
|
|
1785
|
-
return{...e,...t}})).catch((A=>{throw new st("Error loading sneakers additional model resources",{cause:A,params:{model:e}})}))},TYPE_INNER_STUB:
|
|
1785
|
+
return{...e,...t}})).catch((A=>{throw new st("Error loading sneakers additional model resources",{cause:A,params:{model:e}})}))},TYPE_INNER_STUB:Ki}
|
|
1786
1786
|
|
|
1787
1787
|
;// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
1788
1788
|
class Q{static identity(){return[1,0,0,0]}static multiply(A,e){let[t,i,g,r]=A,[I,o,a,s]=e
|
|
@@ -2106,16 +2106,16 @@ setModelStructure(this.lib,this.scene,e,t)}}RenderStepR2_defineProperty(RenderSt
|
|
|
2106
2106
|
const Vi="\n #version 300 es\n precision lowp float;\n layout(location = 0) in vec3 a_pos;\n layout(location = 1) in vec2 a_tex_pos;\n\n out vec2 v_tex_pos;\n\n void main() {\n v_tex_pos = a_tex_pos;\n gl_Position = vec4(a_pos.y, -a_pos.x, a_pos.z, 1.0);\n }\n".trim(),Wi="\n #version 300 es\n precision lowp float;\n layout(location = 0) in vec3 a_pos;\n layout(location = 1) in vec2 a_tex_pos;\n\n out vec2 v_tex_pos;\n\n void main() {\n v_tex_pos = a_tex_pos;\n gl_Position = vec4(a_pos, 1.0);\n }\n".trim(),Zi="\n #version 300 es\n precision lowp float;\n precision lowp sampler2D;\n uniform sampler2D u_tex;\n in vec2 v_tex_pos;\n out vec4 out_color;\n\n void main() {\n if (texture(u_tex, v_tex_pos).r > 0.5) {\n discard;\n } else {\n out_color = vec4(1.0, 1.0, 1.0, 1.0);\n }\n }\n".trim()
|
|
2107
2107
|
function isModelSkinnable(A,e){let t=e[A].shin,i=e[A].foot
|
|
2108
2108
|
return t&&i}function findJointsTransform(A,e,t,i,g,r,I,o){let{frameWidth:a,frameHeight:s}=I
|
|
2109
|
-
const n=[a/2,0,0,a/2,0,-s/2,0,s/2,0,0,1,0,0,0,0,1],B=o.matFromArray(4,4,o.CV_32F,e.flat()).inv(o.DECOMP_LU).data32F,C=
|
|
2109
|
+
const n=[a/2,0,0,a/2,0,-s/2,0,s/2,0,0,1,0,0,0,0,1],B=o.matFromArray(4,4,o.CV_32F,e.flat()).inv(o.DECOMP_LU).data32F,C=Pi.mul(n,t.get_projection_matrix()),E=o.matFromArray(4,4,o.CV_32F,C).inv(o.DECOMP_LU).data32F,c=Pi.mul(t.get_view_matrix(),Pi.mul(r.get_scene_transform().get_world_space_transform(A),B)),h=o.matFromArray(4,4,o.CV_32F,c).inv(o.DECOMP_LU).data32F
|
|
2110
2110
|
let d=g[A].shin.flat(),l=g[A].foot.flat()
|
|
2111
|
-
l=
|
|
2112
|
-
let u=o.matFromArray(4,4,o.CV_32F,d).inv(o.DECOMP_LU).data32F,f=
|
|
2111
|
+
l=Pi.mul(e.flat(),l),d=Pi.mul(l,d)
|
|
2112
|
+
let u=o.matFromArray(4,4,o.CV_32F,d).inv(o.DECOMP_LU).data32F,f=Pi.mulCol(d,[0,0,0,1]),w=Pi.mulCol(d,[0,1,0,0]),D=Si.normalize(w),m=Si.add(f,Si.multiplyScalar(D,.57)),p=Array.from(m),y=Pi.mulCol(Pi.mul(C,c),m),G=Pi.mulCol(Pi.mul(C,c),f),R=y[3]
|
|
2113
2113
|
y=Si.multiplyScalar(y,1/y[3]),G=Si.multiplyScalar(G,1/G[3])
|
|
2114
2114
|
let N=[Math.cos(i.shinLine),Math.sin(i.shinLine)],S=Si.len(Si.sub(y,G)),k=Si.add(G,Si.multiplyScalar(N.concat([0,0]),S))
|
|
2115
2115
|
k=Si.multiplyScalar(k,R)
|
|
2116
|
-
let b=
|
|
2116
|
+
let b=Pi.mulCol(c,m),_=Pi.mulCol(E,k)
|
|
2117
2117
|
_=Si.multiplyScalar(_,1/_[3]),_=Si.multiplyScalar(_,1/_[2]),_=Si.multiplyScalar(_,b[2]),_[3]=1
|
|
2118
|
-
let U=
|
|
2118
|
+
let U=Pi.mulCol(h,_),Y=Pi.mulCol(u,p),L=Pi.mulCol(u,U),H=
|
|
2119
2119
|
// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
2120
2120
|
function find_3d_rotation(A,e){let t=Si.dot(A,e),i=M3.identity()
|
|
2121
2121
|
if(Math.abs(t-1)<1e-10)return M3.identity()
|
|
@@ -2124,8 +2124,8 @@ if(Math.abs(t+1)<1e-10)return M3.from_array([-1,0,0,0,-1,0,0,0,-1])
|
|
|
2124
2124
|
return M3.add(i,o,I)}}(Si.normalize(Y.slice(0,3)),Si.normalize(L.slice(0,3)))
|
|
2125
2125
|
return[...H[0],0,...H[1],0,...H[2],0,0,0,0,1]}function applyJointsTransforms(A,e,t,i,g,r){if(!isModelSkinnable(A,g))return
|
|
2126
2126
|
let I=g[A].shin.flat(),o=g[A].foot.flat()
|
|
2127
|
-
o=
|
|
2128
|
-
let a=r.matFromArray(4,4,r.CV_32F,o).inv(r.DECOMP_LU).data32F,s=
|
|
2127
|
+
o=Pi.mul(t.flat(),o),I=Pi.mul(o,I)
|
|
2128
|
+
let a=r.matFromArray(4,4,r.CV_32F,o).inv(r.DECOMP_LU).data32F,s=Pi.mul(a,I),n=Pi.mul(s,e)
|
|
2129
2129
|
i.access_object(A).access((A=>!A.get_name().includes("Shin_bone")||(A.set_transform_matrix(n),!1)),(A=>{}))}function RenderStepSneaker_defineProperty(A,e,t){return(e=function RenderStepSneaker_toPropertyKey(A){var e=function RenderStepSneaker_toPrimitive(A,e){if("object"!=typeof A||!A)return A
|
|
2130
2130
|
var t=A[Symbol.toPrimitive]
|
|
2131
2131
|
if(void 0!==t){var i=t.call(A,e||"default")
|
|
@@ -2140,8 +2140,8 @@ if(!A)throw new Error("Failed to get opposite side model")
|
|
|
2140
2140
|
return e.scene.clone_object(t,A),{scene:A,animations:i}}))}getTagsForObjects(A){return A===this.TYPE_INNER_STUB?[this.TAG_INNER_STUB_LEFT,this.TAG_INNER_STUB_RIGHT]:super.getTagsForObjects(A)}async getAdditionalModelResources(A){let{modelId:e,loadContext:t}=A
|
|
2141
2141
|
return this._getAdditionalModelResources({modelId:e,loadContext:t,mainPromise:super.getAdditionalModelResources({modelId:e,loadContext:t})})}validateUniversalOccluder(A){let{leftOccluderScene:e,rightOccluderScene:t}=A
|
|
2142
2142
|
if(!e&&!t)throw new Error("At least left or right sneaker occluder should be present.")}setupUniversalOccluder(A,e){let{leftOccluderScene:t,rightOccluderScene:i,leftOccluderAutoposArray:g,rightOccluderAutoposArray:r}=A,I=t,o=i
|
|
2143
|
-
return!t&&i?I=this._getOppositeSideModel({scene:i},e).scene:!i&&t&&(o=this._getOppositeSideModel({scene:t},e).scene),{leftOccluderScene:I,leftOccluderAutoposArray:t?
|
|
2144
|
-
return{model:this._getOppositeSideModel(t,e),autoposArray:
|
|
2143
|
+
return!t&&i?I=this._getOppositeSideModel({scene:i},e).scene:!i&&t&&(o=this._getOppositeSideModel({scene:t},e).scene),{leftOccluderScene:I,leftOccluderAutoposArray:t?Pi.identity():Pi.mul(matrix_M4.to_array(Yi),r),rightOccluderScene:o,rightOccluderAutoposArray:i?Pi.identity():Pi.mul(matrix_M4.to_array(Yi),g)}}prepareMissingSideModel(A,e){let{model:t,modelAutopos:i}=A
|
|
2144
|
+
return{model:this._getOppositeSideModel(t,e),autoposArray:Pi.mul(matrix_M4.to_array(Yi),i)}}setInnerStubs(A){let{leftInnerStub:e,rightInnerStub:t,loadContext:i}=A
|
|
2145
2145
|
const g=!e,r=!t
|
|
2146
2146
|
if(g&&r)return this.leftInnerStub=null,void(this.rightInnerStub=null)
|
|
2147
2147
|
this.tryCatchWrap((()=>{g?e=this._getOppositeSideModel({scene:t},i).scene:r&&(t=this._getOppositeSideModel({scene:e},i).scene)
|
|
@@ -2259,7 +2259,7 @@ throw new TypeError("@@toPrimitive must return a primitive value.")}return("stri
|
|
|
2259
2259
|
(A,"string")
|
|
2260
2260
|
return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}const $i=class RenderStepWatch extends RenderStepR2{constructor(A){super(A),RenderStepWatch_defineProperty(this,"TAG_SEGMENTATION_PLANE_LEFT",101),RenderStepWatch_defineProperty(this,"TAG_SEGMENTATION_PLANE_RIGHT",102),RenderStepWatch_defineProperty(this,"TAG_SHADOW_RECEIVER_LEFT",201),RenderStepWatch_defineProperty(this,"TAG_SHADOW_RECEIVER_RIGHT",202),RenderStepWatch_defineProperty(this,"OCCLUSION_BIT",0),RenderStepWatch_defineProperty(this,"OCCLUDER_OCCLUSION_BIT",1),this.DEBUG_SEGMENTATION&&(this.DEBUG_MASKS=!1)}prepareContext(A){return A.objects.left.exists&&(A.objects.right.exists=!1),A}validateUniversalOccluder(A){let{leftOccluderScene:e,rightOccluderScene:t}=A
|
|
2261
2261
|
if(!e||!t)throw new Error("Both left and right watch occluders should be present.")}prepareMissingSideModel(A,e){let{model:t,oppositeModelAutopos:i}=A
|
|
2262
|
-
return{model:{scene:t.scene,animations:t.animations},autoposArray:i||
|
|
2262
|
+
return{model:{scene:t.scene,animations:t.animations},autoposArray:i||Pi.identity()}}updateOccluders(A){let{leftOccluderScene:e,rightOccluderScene:t,loadContext:i}=A
|
|
2263
2263
|
this.tryCatchWrap((()=>{const A=this.createColoredMaterial({color:[1,1,1,1]})
|
|
2264
2264
|
this.DEBUG_MASKS||A.set_color_write_mask(this.lib.sg_color_mask.COLORMASK_NONE)
|
|
2265
2265
|
try{this.setMaterial(this.TAG_OCCLUDER_LEFT,A,i.scene),this.setMaterial(this.TAG_OCCLUDER_RIGHT,A,i.scene)}finally{A.delete()}this.setObjectStencilBit(e,this.OCCLUDER_OCCLUSION_BIT,i.scene),this.setObjectStencilBit(t,this.OCCLUDER_OCCLUSION_BIT,i.scene)})),this.leftOccluder=e,this.rightOccluder=t}_setupShadows(A,e){A.is_enabled?(this.DEBUG_MASKS||(this.leftShadowReceiver=this.TAG_SHADOW_RECEIVER_LEFT,this.setupShadowReceiver(this.leftOccluder,this.leftShadowReceiver,e),this.addLeftModel(this.leftShadowReceiver,((A,e)=>e)),this.leftOccluder!==this.rightOccluder&&(this.rightShadowReceiver=this.TAG_SHADOW_RECEIVER_RIGHT,this.setupShadowReceiver(this.rightOccluder,this.rightShadowReceiver,e),this.addRightModel(this.rightShadowReceiver,((A,e)=>e)))),[this.leftModel,this.rightModel,this.leftOccluder,this.rightOccluder].forEach((A=>{this.accessMaterials(A,(A=>{A.set_cast_shadows(!0),A.set_receive_shadows(!1)}),e)}))):this.leftShadowReceiver=this.rightShadowReceiver=null}setupShadowReceiver(A,e,t){this.tryCatchWrap((()=>{let i
|
|
@@ -2292,7 +2292,7 @@ return A.forEach((A=>{const{min:[t,i,g],max:[r,I,o]}=e,[a,s,n]=A
|
|
|
2292
2292
|
e.min=[Math.min(t,a),Math.min(i,s),Math.min(g,n)],e.max=[Math.max(r,a),Math.max(I,s),Math.max(o,n)]})),e})(getAABBCorners(A).map((A=>matrix_M4.to_vec(matrix_M4.multiply(matrix_M4.from_array(e),matrix_M4.vec_to_col(A))).slice(0,3))))
|
|
2293
2293
|
|
|
2294
2294
|
;// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
2295
|
-
function toColumn(A){return A.concat(1)}function transformPoint(A,e){return
|
|
2295
|
+
function toColumn(A){return A.concat(1)}function transformPoint(A,e){return Pi.mulCol(e,toColumn(A)).slice(0,3)}function calculateJointsPositions(A,e){return((A,e)=>{let t=new Array(e.length).fill(null)
|
|
2296
2296
|
const i=new Map(e.map(((A,e)=>[A,e])))
|
|
2297
2297
|
let g=0
|
|
2298
2298
|
return A.access((A=>{const r=A.get_name()
|
|
@@ -2306,12 +2306,12 @@ throw new TypeError("@@toPrimitive must return a primitive value.")}return("stri
|
|
|
2306
2306
|
(A,"string")
|
|
2307
2307
|
return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}const rg=class RenderStepWearable extends RenderStepR2{constructor(){super(...arguments),RenderStepWearable_defineProperty(this,"DEBUG_SEGMENTATION",!1),RenderStepWearable_defineProperty(this,"DEBUG_OCCLUDERS",!1),RenderStepWearable_defineProperty(this,"TAG_PERSON_OCCLUDER",201),RenderStepWearable_defineProperty(this,"OCCLUSION_BIT",0),RenderStepWearable_defineProperty(this,"OCCLUDER_OCCLUSION_BIT",1),RenderStepWearable_defineProperty(this,"OCCLUDER_Z_SHIFT",.025),RenderStepWearable_defineProperty(this,"cameraRotation",Q.around_x(Math.PI)),RenderStepWearable_defineProperty(this,"envMapAdditionalRotation",Q.around_y(-Math.PI/2)),RenderStepWearable_defineProperty(this,"jointsRestPositions",null)}render(A,e,t){let{translation:i,jointsTransforms:g}=t
|
|
2308
2308
|
this._applyTransformToModel(this.leftModel,i),this._applyJointsTransformsTo(this.leftModel,g)}renderLeftOcclusions(A){let{translation:e,jointsTransforms:t}=A
|
|
2309
|
-
const i=
|
|
2309
|
+
const i=Pi.copy(e)
|
|
2310
2310
|
i[11]+=this.OCCLUDER_Z_SHIFT,this._applyTransformToModel(this.TAG_PERSON_OCCLUDER,i),this._applyJointsTransformsTo(this.TAG_PERSON_OCCLUDER,t)}_applyJointsTransformsTo(A,e){!
|
|
2311
2311
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
2312
2312
|
function applyJointsTransformsTo(A,e,t){const i=A.get_tag()
|
|
2313
2313
|
A.accept((A=>{const g=A.get_name()
|
|
2314
|
-
return!ig.has(g)||tg.has(g)||e.set_model_space_transform(i,A.get_node_index(),{local_transform:
|
|
2314
|
+
return!ig.has(g)||tg.has(g)||e.set_model_space_transform(i,A.get_node_index(),{local_transform:Pi.mul(A.get_transform_matrix(),t[Ag[g]]),morph_weights:A.get_morph_weights()}),!0}),(()=>{}))}(this.scene.access_object(A),this.scene_view.access_scene_transform(),e)}_applyTransformToModel(A,e){this.scene_view.access_scene_transform().set_world_space_transform(A,e)}applyLoadContext(A){super.applyLoadContext(A),this.jointsRestPositions=calculateJointsPositions(this.scene.access_object(this.TAG_PERSON_OCCLUDER),this.scene_view.get_scene_transform())}validateUniversalOccluder(A){if(!A.leftOccluderScene)throw new st("Empty person occluder.")}setupUniversalOccluder(A,e){return this.DEBUG_OCCLUDERS||this._makeModelTransparent(this.TAG_PERSON_OCCLUDER,e.scene),super.setupUniversalOccluder(A,e)}prepareContext(A){return A.persistent.jointsRestPositions=this.jointsRestPositions,super.prepareContext(A)}_makeModelTransparent(A,e){const t=this.createTransparentMaterial()
|
|
2315
2315
|
this.accessMeshes(A,(A=>A.set_material(t)),e)}updateOccluders(){}renderRightOcclusions(){}showLeftObjects(){[this.TAG_PERSON_OCCLUDER,this.leftModel].map((A=>this.showObject(A)))}showRightObjects(){}setupSceneForOcclusions(A){let{context:e}=A
|
|
2316
2316
|
e.persistent.viewMatrix=this.camera.get_view_matrix()}getTaggedSegmentation(A){return[]}updateSegmentationData(A){let{segmentation:e,sWidth:t,sHeight:i}=A
|
|
2317
2317
|
const{buffers:g}=e,r=[]
|
|
@@ -2336,7 +2336,7 @@ throw new TypeError("@@toPrimitive must return a primitive value.")}return("stri
|
|
|
2336
2336
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
2337
2337
|
(A,"string")
|
|
2338
2338
|
return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}const og=class RenderStepClothes extends rg{constructor(){super(...arguments),RenderStepClothes_defineProperty(this,"TAG_SEGMENTATION_HAND_FOREARM",102),RenderStepClothes_defineProperty(this,"TAG_SEGMENTATION_PLANE_PHONE",103),RenderStepClothes_defineProperty(this,"TAG_SEGMENTATION_PLANE_FACE",104),RenderStepClothes_defineProperty(this,"TAG_SEGMENTATION_HAND",105),RenderStepClothes_defineProperty(this,"TYPE_HANDS_OCCLUDER","TYPE_HANDS_OCCLUDER"),RenderStepClothes_defineProperty(this,"TAG_HANDS_OCCLUDER_LEFT",251),RenderStepClothes_defineProperty(this,"TAG_HANDS_OCCLUDER_RIGHT",252)}setupUniversalOccluder(A,e){return this.DEBUG_OCCLUDERS||(this._makeModelTransparent(this.TAG_PERSON_OCCLUDER,e.scene),this._makeModelTransparent(this.TAG_HANDS_OCCLUDER_LEFT,e.scene),this._makeModelTransparent(this.TAG_HANDS_OCCLUDER_RIGHT,e.scene)),super.setupUniversalOccluder(A,e)}showLeftObjects(){[this.TAG_PERSON_OCCLUDER,!this.DEBUG_SEGMENTATION&&this.TAG_HANDS_OCCLUDER_LEFT,!this.DEBUG_SEGMENTATION&&this.TAG_HANDS_OCCLUDER_RIGHT,this.leftModel].map((A=>this.showObject(A)))}renderLeftOcclusions(A){let{translation:e,jointsTransforms:t}=A
|
|
2339
|
-
const i=
|
|
2339
|
+
const i=Pi.copy(e)
|
|
2340
2340
|
i[11]+=this.OCCLUDER_Z_SHIFT,this._applyTransformToModel(this.TAG_PERSON_OCCLUDER,i),this._applyJointsTransformsTo(this.TAG_PERSON_OCCLUDER,t),this._applyTransformToModel(this.TAG_HANDS_OCCLUDER_LEFT,i),this._applyJointsTransformsTo(this.TAG_HANDS_OCCLUDER_LEFT,t),this._applyTransformToModel(this.TAG_HANDS_OCCLUDER_RIGHT,i),this._applyJointsTransformsTo(this.TAG_HANDS_OCCLUDER_RIGHT,t)}getTaggedSegmentation(A){return[[A.faceSegmentation,this.TAG_SEGMENTATION_PLANE_FACE],[A.phoneSegmentation,this.TAG_SEGMENTATION_PLANE_PHONE],[A.handForearmSegmentation,this.TAG_SEGMENTATION_HAND_FOREARM],[A.handSegmentation,this.TAG_SEGMENTATION_HAND]]}updateOccluders(A){let{loadContext:e}=A
|
|
2341
2341
|
this.tryCatchWrap((()=>{this.setObjectStencilBit(this.TAG_HANDS_OCCLUDER_LEFT,this.OCCLUDER_OCCLUSION_BIT,e.scene),this.setObjectStencilBit(this.TAG_HANDS_OCCLUDER_RIGHT,this.OCCLUDER_OCCLUSION_BIT,e.scene)}))}updateSegmentationData(A){let{segmentation:e,sWidth:t,sHeight:i}=A
|
|
2342
2342
|
const{buffers:g}=e,r=[]
|
|
@@ -2544,7 +2544,7 @@ return A.access((A=>(A.get_mesh_count()>0&&![cg.PLANE_AO,cg.STRAP_LONG_AO,cg.DIM
|
|
|
2544
2544
|
this.sceneAnimations=new SceneAnimations({rmdescData:t,sceneData:e,scene:i,sceneView:this.scene_view})}start3dMode(){if(this.currentModelId!==this.modelId){if(this.viewerModelInfo=null,this.destroyControls(),!this.viewerModel||this.shouldUpdateViewerModel){const A=this.get3dModeResolution()
|
|
2545
2545
|
this.apply3dModeResolution(A),this.render3dModeBackground(),this.mergePairModels(),this.prepareModelNodes()
|
|
2546
2546
|
const{model:e,cameras:t,modelLength:i,modelCenter:g}=this.get3dModeModel(),r=this.getDefaultCameraPositionAndTarget(),I=t.length>0?{target:r.target,position:ki.sub(t[0].position,ki.sub(t[0].target,g))}:r,o=this.getInteractionsLayer(),a=new OrbitControls(o,(A=>"ios"===A||"android"===A)(this.device))
|
|
2547
|
-
a.on("startPanning",(()=>{this.emitter.emit(
|
|
2547
|
+
a.on("startPanning",(()=>{this.emitter.emit(PA),this.togglePanningModeCursor(!0)})).on("finishPanning",(A=>{this.emitter.emit(KA,A),this.togglePanningModeCursor(A)})).on("start",(()=>{this.emitter.emit($A)})).on("end",(()=>{this.emitter.emit(Ae)})),this.animations=new Animations({orbitControls:a,r2:this.lib,onAnimationUpdate:this.requestRender3dModeFrame}),this.cameraControls=new CameraControls({r2:this.lib,orbitControls:a,animations:this.animations,viewerSize:this.viewerSize,modelType:this.modelType,model:e,modelLength:i,modelCenter:g,interactionElement:o,scene:this.scene,sceneView:this.scene_view,renderSystem:this.render_system,collidableNodes:this.getSizeCalculationNodes(e),get3dModeModel:this.get3dModeModel,tryCatchWrap:this.tryCatchWrap,enableDoubleClick:this.enableDoubleClick}),this.camera=this.cameraControls.getRenderCamera(),this.cameraControls.on("change",this.requestRender3dModeFrame),I.position=this.getCameraPositionToFitModelPOI(I),this.cameraControls.lookAt(I.position,I.target),this.viewerModel=e,this.currentModelId=this.modelId,this.first3dRenderSucceeded=!1}requestAnimationFrame(this.renderFrame)}}setupPrevState(A,e){}getCameraPositionToFitModelPOI(A){let{position:e,target:t,withDimensions:i=!1}=A
|
|
2548
2548
|
return this.tryCatchWrap((()=>{const{model:A}=this.get3dModeModel(),{width:g,height:r}=this.viewerSize,{position:I,target:o,maxDistanceBounceStart:a}=this.cameraControls.orbitControls
|
|
2549
2549
|
this.cameraControls.updateSceneTransformations(e,t)
|
|
2550
2550
|
let s=this.getSizeCalculationNodes(A)
|
|
@@ -2602,7 +2602,7 @@ throw new TypeError("@@toPrimitive must return a primitive value.")}return("stri
|
|
|
2602
2602
|
return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}const Ng={[cg.MAIN]:1,[cg.PLANE_AO]:1,[cg.DIMENSIONS_CM]:2,[cg.DIMENSIONS_INCH]:2,[cg.STRAP_LONG]:2,[cg.STRAP_LONG_AO]:2},Sg={[Cg]:cg.DIMENSIONS_CM,[Qg]:cg.DIMENSIONS_INCH}
|
|
2603
2603
|
|
|
2604
2604
|
;// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
2605
|
-
const kg={[ze]:{[xe]:Xi,[Je]:$i,[Te]:Ig,[
|
|
2605
|
+
const kg={[ze]:{[xe]:Xi,[Je]:$i,[Te]:Ig,[Ke]:og,[Oe]:ag},[qe]:{[Te]:class Viewer3dBag extends Viewer3d{constructor(A){super(A),Viewer3dBag_defineProperty(this,"toggleDimensions",(async(A,e)=>{this.logger.logEvent("log_3d_dimensions_clicked",this.modelId,String(A))
|
|
2606
2606
|
const{model:t,longStrapExist:i}=this.get3dModeModel(),g=Sg[e],r=getNodeByName(t,g)
|
|
2607
2607
|
if(!r)return
|
|
2608
2608
|
const I=getNodesByNames(t,[cg.STRAP_LONG])
|
|
@@ -2624,7 +2624,7 @@ setNodesBlendingState(t,this.lib,!0)}getSizeCalculationNodes(A){const e=super.ge
|
|
|
2624
2624
|
if(getNodeByName(A,cg.MAIN)){const t=getNodeByName(A,cg.STRAP_LONG)
|
|
2625
2625
|
t&&e.push(t)}return e}toggleBagsInside(A){this.playSceneAnimation(A?"OpenAnimation":"CloseAnimation")}get3dModeModel(){if(this.viewerModelInfo)return this.viewerModelInfo
|
|
2626
2626
|
const A=this.scene.access_object(this.leftModel),e=getNodeByName(A,cg.MAIN)
|
|
2627
|
-
return super.get3dModeModel(e),this.viewerModelInfo.longStrapExist=void 0!==getNodeByName(A,cg.STRAP_LONG),this.viewerModelInfo}},[Je]:Viewer3d,[xe]:Viewer3d,[
|
|
2627
|
+
return super.get3dModeModel(e),this.viewerModelInfo.longStrapExist=void 0!==getNodeByName(A,cg.STRAP_LONG),this.viewerModelInfo}},[Je]:Viewer3d,[xe]:Viewer3d,[Ke]:Viewer3d,[Oe]:Viewer3d,[Pe]:Viewer3d}}
|
|
2628
2628
|
function RenderStepRoot_defineProperty(A,e,t){return(e=function RenderStepRoot_toPropertyKey(A){var e=function RenderStepRoot_toPrimitive(A,e){if("object"!=typeof A||!A)return A
|
|
2629
2629
|
var t=A[Symbol.toPrimitive]
|
|
2630
2630
|
if(void 0!==t){var i=t.call(A,e||"default")
|
|
@@ -2660,13 +2660,13 @@ e=cornersToBboxCropped([t[0]-g*this.BBOX_SCALE_LEFT,t[1]-g*this.BBOX_SCALE_TOP],
|
|
|
2660
2660
|
;// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
2661
2661
|
function computeJointsGlobalTransforms(A,e,t){const i=[]
|
|
2662
2662
|
for(const g of Object.keys(Ag)){const r=Ag[g],I=eg[g],o=I?i[Ag[I]]:A,a=t[r],s=e[r]
|
|
2663
|
-
i[r]=
|
|
2663
|
+
i[r]=Pi.mul(Pi.mul(o,Pi.ofTranslation(a)),Pi.mul(s,Pi.ofTranslation(Si.negate(a))))}return i}function computeJointsPositions(A,e,t){const i=[]
|
|
2664
2664
|
for(const g of A){const A=Ag[g]
|
|
2665
2665
|
i.push(transformPoint(e[A],t[A]))}return i}function computeJointsMeshPositions(A,e,t){const i=Array(e.length)
|
|
2666
2666
|
for(let A=0;A<e.length;A++){i[A]=Si.zeros(16)
|
|
2667
2667
|
for(let g=0;g<4;g++)for(let r=0;r<4;r++){const I=4*g+r
|
|
2668
2668
|
for(let g=0;g<e[A].length;g++){const[r,o]=e[A][g]
|
|
2669
|
-
i[A][I]+=o*t[r][I]}}}return i.map(((e,t)=>transformPoint(A[t],e)))}const Ug=JSON.parse('{"W":[[-0.0670342743396759,0.2851885259151459,0.0032449353020638227],[0.003777990350499749,0.2879028618335724,0.06042288616299629],[0.07616502046585083,0.282633513212204,0.0013319245772436261],[0.10859954357147217,0.2666488289833069,0.013438087888062],[0.05935005098581314,0.258896142244339,0.03469371795654297],[0.028351638466119766,0.24979540705680847,0.054054319858551025],[0.003275811206549406,0.24533258378505707,0.05460682511329651],[-0.021493472158908844,0.24866095185279846,0.05424347147345543],[-0.05414045602083206,0.256844699382782,0.03507509082555771],[-0.06564442813396454,0.23618768155574799,0.052040938287973404],[-0.049001798033714294,0.2142186164855957,0.06883901357650757],[0.0012916993582621217,0.19116483628749847,0.08805926144123077],[0.07202834635972977,0.2197674959897995,0.06363009661436081],[0.14162635803222656,0.25185489654541016,0.03650950267910957],[-0.116208516061306,0.18822608888149261,0.0741225853562355],[-0.0496419258415699,0.16860558092594147,0.09924191236495972],[0.0010725661413744092,0.17357802391052246,0.0956256166100502],[0.08739244937896729,0.17362171411514282,0.09401733428239822],[0.11739575862884521,0.17396168410778046,0.08473397046327591],[0.13994504511356354,0.17199276387691498,0.07594182342290878],[0.12444806098937988,0.14173583686351776,0.10043170303106308],[0.06825992465019226,0.14166472852230072,0.1191890686750412],[0.0015895302640274167,0.12829022109508514,0.12011031061410904],[-0.047902509570121765,0.10563388466835022,0.1360519826412201],[-0.1064986139535904,0.12608718872070312,0.1156383752822876],[0.06819386780261993,0.12659549713134766,0.12875032424926758],[0.12015333771705627,0.0989239439368248,0.12506721913814545],[0.0025601170491427183,0.09151558578014374,0.1308031529188156],[-0.03423932567238808,0.07609562575817108,0.1370588093996048],[-0.08516895025968552,0.03599664196372032,0.1181034967303276],[-0.06604434549808502,0.024558117613196373,0.1239568218588829],[0.0018645630916580558,0.006299558561295271,0.14390769600868225],[0.08032397925853729,0.054042186588048935,0.13449688255786896],[0.12049878388643265,0.03649953380227089,0.10083246231079102],[0.10587798804044724,-0.015672966837882996,0.10719040036201477],[-0.04629475995898247,-0.01304212398827076,0.14439155161380768],[-0.10295768827199936,-0.03567085042595863,0.10676814615726471],[0.07117130607366562,-0.013850473798811436,0.13644756376743317],[0.020747100934386253,-0.057150326669216156,0.15983355045318604],[-0.10369129478931427,-0.077202707529068,0.11188778281211853],[-0.06689342111349106,-0.0782540813088417,0.1455792784690857],[-0.0026714238338172436,-0.07964145392179489,0.16255807876586914],[0.06147849187254906,-0.0783548429608345,0.14895473420619965],[0.11716889590024948,-0.07773824036121368,0.10093235969543457]],"n":[[[9,0.5083162188529968],[12,0.40946266055107117],[14,0.06890705972909927],[15,0.013314086943864822]],[[9,0.3130219578742981],[12,0.6140164136886597],[14,0.00571630010381341],[15,0.06724534928798676]],[[9,0.593102216720581],[12,0.27318909764289856],[13,0.12310980260372162],[16,0.010598893277347088]],[[9,0.2852371037006378],[12,0.0102176358923316],[13,0.6936635375022888],[16,0.010881726630032063]],[[9,0.6514266729354858],[12,0.16792413592338562],[13,0.1715087741613388],[15,0.009140417911112309]],[[9,0.8047480583190918],[12,0.1260119378566742],[13,0.06203717365860939],[14,0.007202845066785812]],[[9,0.9123064875602722],[12,0.06257989257574081],[13,0.011415788903832436],[14,0.013697851449251175]],[[9,0.8023254871368408],[12,0.12943746149539948],[14,0.06541182845830917],[15,0.002825214294716716]],[[9,0.6531810164451599],[12,0.16903121769428253],[14,0.1732672154903412],[15,0.004520540591329336]],[[9,0.7445388436317444],[12,0.0301669891923666],[14,0.21969987452030182],[15,0.005594270769506693]],[[9,0.9100150465965271],[12,0.008025020360946655],[14,0.07500991970300674],[15,0.00694999611005187]],[[3,0.0016959442291408777],[9,0.9853029251098633],[14,0.005165004171431065],[17,0.007836122065782547]],[[9,0.8229203820228577],[12,0.010936477221548557],[13,0.15898142755031586],[16,0.007161715999245644]],[[9,0.13728807866573334],[10,0.0014138936530798674],[13,0.8199062347412109],[16,0.041391771286726]],[[6,0.01244832668453455],[9,0.6946360468864441],[14,0.2895357310771942],[17,0.0033799000084400177]],[[6,0.028119763359427452],[9,0.9524573087692261],[14,0.014862744137644768],[17,0.004560161381959915]],[[6,0.019638046622276306],[9,0.9720686078071594],[12,0.0014598076231777668],[17,0.006833529565483332]],[[6,0.02755601331591606],[9,0.9153590798377991],[13,0.055160097777843475],[16,0.0019248353783041239]],[[6,0.026427021250128746],[9,0.8064203262329102],[13,0.16540364921092987],[15,0.0017490216996520758]],[[6,0.020616179332137108],[9,0.6729477643966675],[13,0.29148203134536743],[16,0.014954003505408764]],[[6,0.12808118760585785],[9,0.8075220584869385],[13,0.05854526534676552],[16,0.0058514829725027084]],[[6,0.14477920532226562],[9,0.8351560831069946],[13,0.017794564366340637],[16,0.0022701455745846033]],[[6,0.26860836148262024],[9,0.7183286547660828],[14,0.005997056141495705],[17,0.007065893150866032]],[[3,0.0075964489951729774],[6,0.4230806827545166],[9,0.5673036575317383],[14,0.0020191818475723267]],[[6,0.25829222798347473],[9,0.7168476581573486],[14,0.022918710485100746],[17,0.0019414299167692661]],[[6,0.253845751285553],[9,0.7265201210975647],[13,0.01798873394727707],[16,0.0016454035649076104]],[[6,0.5562059879302979],[9,0.42213088274002075],[13,0.02007417008280754],[16,0.0015889356145635247]],[[3,0.02195204235613346],[6,0.5951573252677917],[9,0.377634197473526],[14,0.005256425589323044]],[[1,0.00105667719617486],[3,0.03202398121356964],[6,0.6597716808319092],[9,0.3071476221084595]],[[0,0.007437651976943016],[3,0.07580146193504333],[6,0.8638856410980225],[9,0.05287524312734604]],[[0,0.004574339371174574],[3,0.15215124189853668],[6,0.8028835654258728],[9,0.04039083793759346]],[[0,0.021531743928790092],[3,0.3894800543785095],[6,0.5684242844581604],[9,0.020563920959830284]],[[3,0.035873085260391235],[6,0.8077408075332642],[9,0.1550101637840271],[13,0.0013759705470874906]],[[3,0.07629653811454773],[6,0.856023371219635],[9,0.05859913304448128],[13,0.009080983698368073]],[[0,0.02261139638721943],[3,0.40344852209091187],[6,0.5670594573020935],[9,0.006880642380565405]],[[0,0.024191560223698616],[3,0.43569299578666687],[6,0.5277100205421448],[9,0.012405410408973694]],[[0,0.038991495966911316],[3,0.5389872193336487],[6,0.4203125238418579],[9,0.001708783209323883]],[[0,0.028374871239066124],[3,0.4035349190235138],[6,0.5521810054779053],[9,0.015909239649772644]],[[0,0.11212236434221268],[3,0.726383626461029],[5,0.0006135199218988419],[6,0.1608804613351822]],[[0,0.16075140237808228],[3,0.6812017560005188],[5,0.001904829521663487],[6,0.156141996383667]],[[0,0.16511686146259308],[3,0.7020062804222107],[6,0.13191653788089752],[13,0.0009603415965102613]],[[0,0.1615496128797531],[3,0.738474428653717],[5,0.000746697885915637],[6,0.09922924637794495]],[[0,0.17024487257003784],[3,0.7002102732658386],[6,0.1290169209241867],[9,0.0005279314937070012]],[[0,0.16328594088554382],[2,0.001173901604488492],[3,0.6813648343086243],[6,0.15417534112930298]]]}'),Yg=JSON.parse('{"W":[[-0.005581510718911886,-0.1349666863679886,0.16438616812229156]],"n":[[[0,0.4565586745738983],[3,0.5216977000236511],[6,0.012674110010266304],[9,0.009069545194506645]]]}'),Lg=JSON.parse('{"W":[[0.0015895302640274167,0.12829022109508514,0.12011031061410904],[-0.09797707200050354,0.28524237871170044,-0.0340692400932312],[-0.00011176200496265665,0.5555177927017212,0.006299180444329977],[-0.12711624801158905,-1.1618430614471436,0.14703765511512756]]}'),Hg=Ug.n,vg=Ug.W,xg=Yg.n,Jg=Yg.W,Tg=Lg.W[0],
|
|
2669
|
+
i[A][I]+=o*t[r][I]}}}return i.map(((e,t)=>transformPoint(A[t],e)))}const Ug=JSON.parse('{"W":[[-0.0670342743396759,0.2851885259151459,0.0032449353020638227],[0.003777990350499749,0.2879028618335724,0.06042288616299629],[0.07616502046585083,0.282633513212204,0.0013319245772436261],[0.10859954357147217,0.2666488289833069,0.013438087888062],[0.05935005098581314,0.258896142244339,0.03469371795654297],[0.028351638466119766,0.24979540705680847,0.054054319858551025],[0.003275811206549406,0.24533258378505707,0.05460682511329651],[-0.021493472158908844,0.24866095185279846,0.05424347147345543],[-0.05414045602083206,0.256844699382782,0.03507509082555771],[-0.06564442813396454,0.23618768155574799,0.052040938287973404],[-0.049001798033714294,0.2142186164855957,0.06883901357650757],[0.0012916993582621217,0.19116483628749847,0.08805926144123077],[0.07202834635972977,0.2197674959897995,0.06363009661436081],[0.14162635803222656,0.25185489654541016,0.03650950267910957],[-0.116208516061306,0.18822608888149261,0.0741225853562355],[-0.0496419258415699,0.16860558092594147,0.09924191236495972],[0.0010725661413744092,0.17357802391052246,0.0956256166100502],[0.08739244937896729,0.17362171411514282,0.09401733428239822],[0.11739575862884521,0.17396168410778046,0.08473397046327591],[0.13994504511356354,0.17199276387691498,0.07594182342290878],[0.12444806098937988,0.14173583686351776,0.10043170303106308],[0.06825992465019226,0.14166472852230072,0.1191890686750412],[0.0015895302640274167,0.12829022109508514,0.12011031061410904],[-0.047902509570121765,0.10563388466835022,0.1360519826412201],[-0.1064986139535904,0.12608718872070312,0.1156383752822876],[0.06819386780261993,0.12659549713134766,0.12875032424926758],[0.12015333771705627,0.0989239439368248,0.12506721913814545],[0.0025601170491427183,0.09151558578014374,0.1308031529188156],[-0.03423932567238808,0.07609562575817108,0.1370588093996048],[-0.08516895025968552,0.03599664196372032,0.1181034967303276],[-0.06604434549808502,0.024558117613196373,0.1239568218588829],[0.0018645630916580558,0.006299558561295271,0.14390769600868225],[0.08032397925853729,0.054042186588048935,0.13449688255786896],[0.12049878388643265,0.03649953380227089,0.10083246231079102],[0.10587798804044724,-0.015672966837882996,0.10719040036201477],[-0.04629475995898247,-0.01304212398827076,0.14439155161380768],[-0.10295768827199936,-0.03567085042595863,0.10676814615726471],[0.07117130607366562,-0.013850473798811436,0.13644756376743317],[0.020747100934386253,-0.057150326669216156,0.15983355045318604],[-0.10369129478931427,-0.077202707529068,0.11188778281211853],[-0.06689342111349106,-0.0782540813088417,0.1455792784690857],[-0.0026714238338172436,-0.07964145392179489,0.16255807876586914],[0.06147849187254906,-0.0783548429608345,0.14895473420619965],[0.11716889590024948,-0.07773824036121368,0.10093235969543457]],"n":[[[9,0.5083162188529968],[12,0.40946266055107117],[14,0.06890705972909927],[15,0.013314086943864822]],[[9,0.3130219578742981],[12,0.6140164136886597],[14,0.00571630010381341],[15,0.06724534928798676]],[[9,0.593102216720581],[12,0.27318909764289856],[13,0.12310980260372162],[16,0.010598893277347088]],[[9,0.2852371037006378],[12,0.0102176358923316],[13,0.6936635375022888],[16,0.010881726630032063]],[[9,0.6514266729354858],[12,0.16792413592338562],[13,0.1715087741613388],[15,0.009140417911112309]],[[9,0.8047480583190918],[12,0.1260119378566742],[13,0.06203717365860939],[14,0.007202845066785812]],[[9,0.9123064875602722],[12,0.06257989257574081],[13,0.011415788903832436],[14,0.013697851449251175]],[[9,0.8023254871368408],[12,0.12943746149539948],[14,0.06541182845830917],[15,0.002825214294716716]],[[9,0.6531810164451599],[12,0.16903121769428253],[14,0.1732672154903412],[15,0.004520540591329336]],[[9,0.7445388436317444],[12,0.0301669891923666],[14,0.21969987452030182],[15,0.005594270769506693]],[[9,0.9100150465965271],[12,0.008025020360946655],[14,0.07500991970300674],[15,0.00694999611005187]],[[3,0.0016959442291408777],[9,0.9853029251098633],[14,0.005165004171431065],[17,0.007836122065782547]],[[9,0.8229203820228577],[12,0.010936477221548557],[13,0.15898142755031586],[16,0.007161715999245644]],[[9,0.13728807866573334],[10,0.0014138936530798674],[13,0.8199062347412109],[16,0.041391771286726]],[[6,0.01244832668453455],[9,0.6946360468864441],[14,0.2895357310771942],[17,0.0033799000084400177]],[[6,0.028119763359427452],[9,0.9524573087692261],[14,0.014862744137644768],[17,0.004560161381959915]],[[6,0.019638046622276306],[9,0.9720686078071594],[12,0.0014598076231777668],[17,0.006833529565483332]],[[6,0.02755601331591606],[9,0.9153590798377991],[13,0.055160097777843475],[16,0.0019248353783041239]],[[6,0.026427021250128746],[9,0.8064203262329102],[13,0.16540364921092987],[15,0.0017490216996520758]],[[6,0.020616179332137108],[9,0.6729477643966675],[13,0.29148203134536743],[16,0.014954003505408764]],[[6,0.12808118760585785],[9,0.8075220584869385],[13,0.05854526534676552],[16,0.0058514829725027084]],[[6,0.14477920532226562],[9,0.8351560831069946],[13,0.017794564366340637],[16,0.0022701455745846033]],[[6,0.26860836148262024],[9,0.7183286547660828],[14,0.005997056141495705],[17,0.007065893150866032]],[[3,0.0075964489951729774],[6,0.4230806827545166],[9,0.5673036575317383],[14,0.0020191818475723267]],[[6,0.25829222798347473],[9,0.7168476581573486],[14,0.022918710485100746],[17,0.0019414299167692661]],[[6,0.253845751285553],[9,0.7265201210975647],[13,0.01798873394727707],[16,0.0016454035649076104]],[[6,0.5562059879302979],[9,0.42213088274002075],[13,0.02007417008280754],[16,0.0015889356145635247]],[[3,0.02195204235613346],[6,0.5951573252677917],[9,0.377634197473526],[14,0.005256425589323044]],[[1,0.00105667719617486],[3,0.03202398121356964],[6,0.6597716808319092],[9,0.3071476221084595]],[[0,0.007437651976943016],[3,0.07580146193504333],[6,0.8638856410980225],[9,0.05287524312734604]],[[0,0.004574339371174574],[3,0.15215124189853668],[6,0.8028835654258728],[9,0.04039083793759346]],[[0,0.021531743928790092],[3,0.3894800543785095],[6,0.5684242844581604],[9,0.020563920959830284]],[[3,0.035873085260391235],[6,0.8077408075332642],[9,0.1550101637840271],[13,0.0013759705470874906]],[[3,0.07629653811454773],[6,0.856023371219635],[9,0.05859913304448128],[13,0.009080983698368073]],[[0,0.02261139638721943],[3,0.40344852209091187],[6,0.5670594573020935],[9,0.006880642380565405]],[[0,0.024191560223698616],[3,0.43569299578666687],[6,0.5277100205421448],[9,0.012405410408973694]],[[0,0.038991495966911316],[3,0.5389872193336487],[6,0.4203125238418579],[9,0.001708783209323883]],[[0,0.028374871239066124],[3,0.4035349190235138],[6,0.5521810054779053],[9,0.015909239649772644]],[[0,0.11212236434221268],[3,0.726383626461029],[5,0.0006135199218988419],[6,0.1608804613351822]],[[0,0.16075140237808228],[3,0.6812017560005188],[5,0.001904829521663487],[6,0.156141996383667]],[[0,0.16511686146259308],[3,0.7020062804222107],[6,0.13191653788089752],[13,0.0009603415965102613]],[[0,0.1615496128797531],[3,0.738474428653717],[5,0.000746697885915637],[6,0.09922924637794495]],[[0,0.17024487257003784],[3,0.7002102732658386],[6,0.1290169209241867],[9,0.0005279314937070012]],[[0,0.16328594088554382],[2,0.001173901604488492],[3,0.6813648343086243],[6,0.15417534112930298]]]}'),Yg=JSON.parse('{"W":[[-0.005581510718911886,-0.1349666863679886,0.16438616812229156]],"n":[[[0,0.4565586745738983],[3,0.5216977000236511],[6,0.012674110010266304],[9,0.009069545194506645]]]}'),Lg=JSON.parse('{"W":[[0.0015895302640274167,0.12829022109508514,0.12011031061410904],[-0.09797707200050354,0.28524237871170044,-0.0340692400932312],[-0.00011176200496265665,0.5555177927017212,0.006299180444329977],[-0.12711624801158905,-1.1618430614471436,0.14703765511512756]]}'),Hg=Ug.n,vg=Ug.W,xg=Yg.n,Jg=Yg.W,Tg=Lg.W[0],Pg=Lg.W[1],Kg=Lg.W[2],Og=Lg.W[3]
|
|
2670
2670
|
|
|
2671
2671
|
;// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
2672
2672
|
class FilterHandsVisibilityStep extends Mi{constructor(){super(),this.KEY_JOINTS=["L_Wrist","R_Wrist"]}*generator(){for(;;){const A=yield,{jointsTransforms:e,translation:t}=A.objects.left,{jointsRestPositions:i}=A.persistent
|
|
@@ -2727,7 +2727,7 @@ if(A&&(A=this.cv.solvePnP(g,r,I,o,s,a,!0,this.cv.SOLVEPNP_ITERATIVE)),!A)return[
|
|
|
2727
2727
|
const e=matrix_M4.rotation_from_rodrigues(this.cv,M.from_cv_mat(this.cv,s)),t=M.from_cv_mat(this.cv,a)
|
|
2728
2728
|
return[!0,M.to_vec(e),M.to_vec(t).slice(0,3)]}catch(A){throw new st("Failed to solve pnp",{cause:A})}finally{g.delete(),r.delete(),I.delete(),o.delete(),s.delete(),a.delete()}}}
|
|
2729
2729
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
2730
|
-
function projectPointToOpencvSpace(A,e){const[t,i,,g]=
|
|
2730
|
+
function projectPointToOpencvSpace(A,e){const[t,i,,g]=Pi.mulCol(e,toColumn(A)),r=[t/g,i/g]
|
|
2731
2731
|
return function convertFromOpenGlToOpenCVSpaceInPlace(A){A[0]=(A[0]+1)/2,A[1]=(1-A[1])/2}(r),r}function scalePoint(A,e,t){let[i,g]=A
|
|
2732
2732
|
return[i*(t.width/e.width),g*(t.height/e.height)]}function projectionMatrixFrom(A){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100
|
|
2733
2733
|
const i=A[0],g=A[4],r=e-t
|
|
@@ -2737,16 +2737,16 @@ class JointsBasedSmoothingStep extends Mi{constructor(A,e){super(),this.libInjec
|
|
|
2737
2737
|
this.opticalFlowManager=new OpticalFlowManager(A),this.poseComputationManager=new PoseComputationManager(A)},this._init=onceSuccess(this._init.bind(this))}async init(){return Promise.race([this._init().catch((A=>{emit(l,st.toObject(A))})),Promise.resolve()])}*generator(){let A=[]
|
|
2738
2738
|
for(;;){const e=yield,{translation:t,jointsTransforms:i}=e.objects.left,{jointsRestPositions:g,viewMatrix:r}=e.persistent
|
|
2739
2739
|
if(!g||!r){yield Ei.next(e)
|
|
2740
|
-
continue}const I=matrix_M4.make_intrinsics_for_frame_size(e.frame.scaledBbox[2],e.frame.scaledBbox[3]).flat(),o=
|
|
2740
|
+
continue}const I=matrix_M4.make_intrinsics_for_frame_size(e.frame.scaledBbox[2],e.frame.scaledBbox[3]).flat(),o=Pi.mul(projectionMatrixFrom(I),r)
|
|
2741
2741
|
this.startTimer("runOpticalFlowWithFilter")
|
|
2742
2742
|
const a=this.runOpticalFlowWithFilter(t,i,g,e.frame,A,o)
|
|
2743
2743
|
this.stopTimer("runOpticalFlowWithFilter"),A=a,this.startTimer("runSolvePnP")
|
|
2744
2744
|
const[s,n]=this.runSolvePnP(t,i,g,a,e.frame,I,o)
|
|
2745
|
-
this.stopTimer("runSolvePnP"),e.objects.left.jointsTransforms=s,e.objects.left.translation=
|
|
2745
|
+
this.stopTimer("runSolvePnP"),e.objects.left.jointsTransforms=s,e.objects.left.translation=Pi.ofTranslation(n),e.objects.left.jointsProjections={chestPoint:a[gg.indexOf("Spine3")],neckPoint:a[gg.indexOf("Neck")]},yield Ei.next(e)}}runSolvePnP(A,e,t,i,g,r,I){const o=this.lerpTranslationComputer.compute(Pi.extractTranslation(A)),a=this.slerpJointsQuaternionsComputer.compute(e.map((A=>Q.from_rotation_matrix(A)))).map((A=>Q.to_rotation_matrix(A))),s=this.getSelected3DPoints(Pi.ofTranslation(o),a,t),n=[],B=[],C={width:g.scaledBbox[2],height:g.scaledBbox[3]}
|
|
2746
2746
|
if(s.forEach(((A,e)=>{const t=i[e],r=[t[0]-g.scaledBbox[0],t[1]-g.scaledBbox[1]];(function isPointVisible(A,e){let[t,i]=A
|
|
2747
2747
|
return t>=0&&t<e.width&&i>=0&&i<e.height})(r,C)&&(n.push(A),B.push(r))})),this.DEBUG_SOLVE_PNP){const A=n.map((A=>function mapPointToFrameInPlace(A,e){return A[0]=A[0]*e.width,A[1]=A[1]*e.height,A}(projectPointToOpencvSpace(A,I),C)))
|
|
2748
2748
|
this.debugProjections("onlyVisible3DPointsProjections",A,g,"red"),this.debugProjections("onlyVisibleProjections",B,g,"yellow")}const[E,c,h]=this.poseComputationManager.solvePnP(n,B,r)
|
|
2749
|
-
return E?[[
|
|
2749
|
+
return E?[[Pi.mul(c,a[0]),...a.slice(1)],this.calculateResultTranslation(s[0],c,h,o)]:[a,o]}runOpticalFlowWithFilter(A,e,t,i,g,r){const I=this.getSelected3DPoints(A,e,t).map((A=>function mapPointToBboxInPlace(A,e){return A[0]=A[0]*e[2]+e[0],A[1]=A[1]*e[3]+e[1],A}(projectPointToOpencvSpace(A,r),i.scaledBbox)))
|
|
2750
2750
|
this.DEBUG_OPTICAL_FLOW&&this.debugProjections("predictedProjections",I,i,"red")
|
|
2751
2751
|
const o=i.getDownscaledSize(),a=g.map((A=>scalePoint(A,i,o))),s=i.getDownscaledGrayMat()
|
|
2752
2752
|
this.DEBUG_OPTICAL_FLOW&&this.debugOpticalFlowInput(s,a,i)
|
|
@@ -2762,7 +2762,7 @@ return{x:e,y:t}})),Array.from(Array(e.length)).fill(i),3)}debugOpticalFlowInput(
|
|
|
2762
2762
|
return{x:e,y:t}})),Array.from(Array(e.length)).fill("red"),2)}}
|
|
2763
2763
|
// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
2764
2764
|
class ScaleBagSizeStep extends Mi{constructor(A){super(),this.personHeightCM=A}*generator(){for(;;){const A=yield,{translation:e}=A.objects.left
|
|
2765
|
-
if(this.personHeightCM){const A=Tg[2],t=
|
|
2765
|
+
if(this.personHeightCM){const A=Tg[2],t=Pg[1],i=Kg[1]-Og[1],g=this.personHeightCM/100/i,r=i/2,I=A*g,o=(t-r)*g+r-t,a=e[11],s=I-A+(a*g-a)
|
|
2766
2766
|
e[7]+=o,e[11]+=s}yield Ei.next(A)}}reInit(A){return null!==A&&void 0!==A&&A.hasOwnProperty("personHeight")&&(this.personHeightCM=A.personHeight),super.reInit()}getDebugData(){return{...super.getDebugData(),personHeight:this.personHeightCM?`${this.personHeightCM} cm`:"not specified"}}}__webpack_require__("19b450ff8abff61be1cd"),__webpack_require__("b3b040e9ce3071c7bbad")
|
|
2767
2767
|
const jg=
|
|
2768
2768
|
// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
@@ -3027,7 +3027,7 @@ assignResultsToContext(A,{flagsResult:this.parseFlags(t),segmentationsResult:par
|
|
|
3027
3027
|
const Ir={offset:0,size:144},or={offset:154,size:3},ar={offset:209,size:1},sr={offset:210,size:1},nr={rightHandForearmMask:{channel:27},leftHandForearmMask:{channel:26},phoneMask:{channel:28}}
|
|
3028
3028
|
|
|
3029
3029
|
;// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
3030
|
-
function parseFlags(A){return{jointsTransforms:extractJointsTransforms(extractOutput(A,Ir)),globalTransform:
|
|
3030
|
+
function parseFlags(A){return{jointsTransforms:extractJointsTransforms(extractOutput(A,Ir)),globalTransform:Pi.ofTranslation(Array.from(extractOutput(A,or))),presence:sigmoid(extractOutput(A,ar)[0]),phonePresence:sigmoid(extractOutput(A,sr)[0])}}
|
|
3031
3031
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
3032
3032
|
class RunNNStepBagTfjs extends RunNNStepWearableTfjs{constructor(){super(...arguments),this.segmentationOutputs=nr}parseFlags(A){return parseFlags(A)}}class RunNNStepBagTflite extends RunNNStepWearableTflite{constructor(){super(...arguments),this.segmentationOutputs=nr}parseFlags(A){return parseFlags(A)}}
|
|
3033
3033
|
// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
@@ -3037,14 +3037,14 @@ return Boolean(Number(t))}function debugUtils_parseQueryParams(A){return{debugBb
|
|
|
3037
3037
|
const Br={offset:0,size:144},Cr={offset:154,size:3},Qr={offset:209,size:1},Er={offset:210,size:1},cr={faceMask:{channel:26},handMask:{channel:27},handForearmMask:{channel:29},phoneMask:{channel:30}}
|
|
3038
3038
|
|
|
3039
3039
|
;// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
3040
|
-
function nnUtils_parseFlags(A){return{jointsTransforms:extractJointsTransforms(extractOutput(A,Br)),globalTransform:
|
|
3040
|
+
function nnUtils_parseFlags(A){return{jointsTransforms:extractJointsTransforms(extractOutput(A,Br)),globalTransform:Pi.ofTranslation(Array.from(extractOutput(A,Cr))),presence:sigmoid(extractOutput(A,Qr)[0]),phonePresence:sigmoid(extractOutput(A,Er)[0])}}
|
|
3041
3041
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
3042
3042
|
class RunNNStepClothesTfjs extends RunNNStepWearableTfjs{constructor(){super(...arguments),this.segmentationOutputs=cr}parseFlags(A){return nnUtils_parseFlags(A)}}class RunNNStepClothesTflite extends RunNNStepWearableTflite{constructor(){super(...arguments),this.segmentationOutputs=cr}parseFlags(A){return nnUtils_parseFlags(A)}}
|
|
3043
3043
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
3044
3044
|
const hr={offset:0,size:144},dr={offset:154,size:3},lr={offset:209,size:1},ur={offset:210,size:1},fr={rightHandForearmMask:{channel:27},leftHandForearmMask:{channel:26},faceMask:{channel:28},phoneMask:{channel:29}}
|
|
3045
3045
|
|
|
3046
3046
|
;// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
3047
|
-
function scarf_nnUtils_parseFlags(A){return{jointsTransforms:extractJointsTransforms(extractOutput(A,hr)),globalTransform:
|
|
3047
|
+
function scarf_nnUtils_parseFlags(A){return{jointsTransforms:extractJointsTransforms(extractOutput(A,hr)),globalTransform:Pi.ofTranslation(Array.from(extractOutput(A,dr))),presence:sigmoid(extractOutput(A,lr)[0]),phonePresence:sigmoid(extractOutput(A,ur)[0])}}
|
|
3048
3048
|
// Copyright © 2023 WANNABY Inc. All rights reserved.
|
|
3049
3049
|
class RunNNStepScarfTfjs extends RunNNStepWearableTfjs{constructor(){super(...arguments),this.segmentationOutputs=fr}parseFlags(A){return scarf_nnUtils_parseFlags(A)}}class RunNNStepScarfTflite extends RunNNStepWearableTflite{constructor(){super(...arguments),this.segmentationOutputs=fr}parseFlags(A){return scarf_nnUtils_parseFlags(A)}}function OpticalFlowStep_defineProperty(A,e,t){return(e=function OpticalFlowStep_toPropertyKey(A){var e=function OpticalFlowStep_toPrimitive(A,e){if("object"!=typeof A||!A)return A
|
|
3050
3050
|
var t=A[Symbol.toPrimitive]
|
|
@@ -3150,7 +3150,7 @@ return[t-e-1,i-g-1]})),o=this.objectPoints[g]
|
|
|
3150
3150
|
this.useKeypointsPresence&&(this.filterKeypointsForPnP?(I=I.filter(((A,e)=>r.keypointsPresence[e])),o=o.filter(((A,e)=>r.keypointsPresence[e]))):r.keypointsPresence.filter((A=>A)).length<this.requiredNumberOfKeypoints&&(o=[],I=[]))
|
|
3151
3151
|
const[a,s,n]=this.solvePnP(o.flat(),I.flat(),e.flat())
|
|
3152
3152
|
let B,C,E
|
|
3153
|
-
this.stopTimer(`SOLVE_PNP_${g.toUpperCase()}`),a&&(E=M3.rotation_from_rodrigues(this.cv,s),B=this.projection_loss(E,n,e,o,I,A.frame),C=this.base_object_len(o,I)),r.loss=B/C,a&&r.loss<=this.reprojectionThreshold?(r.translation=n,r.rotation=E):r.exists=!1}yield Ei.next({...A})}}},yr={batchSize:0,interpolateSize:0,gpuArgmax:!1,disableOpticalFlow:!1,useKeypointsPresence:!1,filterKeypointsForPnP:!1,requiredNumberOfKeypoints:4},Gr={...yr,networkName:"current_network",meanLeft:[.6152729814285715,.2921321985714286,.1368148742857143],meanRight:[-.6152729814285715,.2921321985714286,.1368148742857143],reprojectionThreshold:.07,appearThreshold:.7,disappearThreshold:.216,segmentationSmoothMultiplier:.7},Rr={...yr,networkName:"current_network",meanLeft:[0,0,0],meanRight:[0,0,0],reprojectionThreshold:.2,appearThreshold:.84,disappearThreshold:.22},Mr={...yr,networkName:"current_network",meanLeft:[0,0,0],meanRight:[0,0,0],reprojectionThreshold:.2,appearThreshold:.99,disappearThreshold:.22,lerpAlpha:.4,bboxAlpha:.01,phonePresenceThreshold:.5},Fr={...yr,networkName:"current_network",meanLeft:[0,0,0],meanRight:[0,0,0],reprojectionThreshold:.2,appearThreshold:.99,disappearThreshold:.22,lerpAlpha:.4,bboxAlpha:.01,phonePresenceThreshold:.5},Nr={...yr,networkName:"current_network",meanLeft:[0,0,0],meanRight:[0,0,0],reprojectionThreshold:.2,appearThreshold:.99,disappearThreshold:.22,lerpAlpha:.4,bboxAlpha:.01,phonePresenceThreshold:.5},Sr="OCCLUSION_REFINED_STUB_V2",kr="OCCLUSION_STUB_INTERSECTION",br={[xe]:Gr,[Je]:Rr,[Te]:Mr,[
|
|
3153
|
+
this.stopTimer(`SOLVE_PNP_${g.toUpperCase()}`),a&&(E=M3.rotation_from_rodrigues(this.cv,s),B=this.projection_loss(E,n,e,o,I,A.frame),C=this.base_object_len(o,I)),r.loss=B/C,a&&r.loss<=this.reprojectionThreshold?(r.translation=n,r.rotation=E):r.exists=!1}yield Ei.next({...A})}}},yr={batchSize:0,interpolateSize:0,gpuArgmax:!1,disableOpticalFlow:!1,useKeypointsPresence:!1,filterKeypointsForPnP:!1,requiredNumberOfKeypoints:4},Gr={...yr,networkName:"current_network",meanLeft:[.6152729814285715,.2921321985714286,.1368148742857143],meanRight:[-.6152729814285715,.2921321985714286,.1368148742857143],reprojectionThreshold:.07,appearThreshold:.7,disappearThreshold:.216,segmentationSmoothMultiplier:.7},Rr={...yr,networkName:"current_network",meanLeft:[0,0,0],meanRight:[0,0,0],reprojectionThreshold:.2,appearThreshold:.84,disappearThreshold:.22},Mr={...yr,networkName:"current_network",meanLeft:[0,0,0],meanRight:[0,0,0],reprojectionThreshold:.2,appearThreshold:.99,disappearThreshold:.22,lerpAlpha:.4,bboxAlpha:.01,phonePresenceThreshold:.5},Fr={...yr,networkName:"current_network",meanLeft:[0,0,0],meanRight:[0,0,0],reprojectionThreshold:.2,appearThreshold:.99,disappearThreshold:.22,lerpAlpha:.4,bboxAlpha:.01,phonePresenceThreshold:.5},Nr={...yr,networkName:"current_network",meanLeft:[0,0,0],meanRight:[0,0,0],reprojectionThreshold:.2,appearThreshold:.99,disappearThreshold:.22,lerpAlpha:.4,bboxAlpha:.01,phonePresenceThreshold:.5},Sr="OCCLUSION_REFINED_STUB_V2",kr="OCCLUSION_STUB_INTERSECTION",br={[xe]:Gr,[Je]:Rr,[Te]:Mr,[Ke]:Fr,[Oe]:Nr},inferenceConfigs=A=>{const e=br[A]
|
|
3154
3154
|
if(!e)throw new Error(`No inference config for "${A}" type`)
|
|
3155
3155
|
return e},_r={validateOcclusionType(){if(this.nn.occlusion!==Sr)throw new Error(`Not implemented occlusion ${this.nn.occlusion}.`)},extractSegmentations(A,e,t){let[i,g]=t
|
|
3156
3156
|
const r=i*g,[I,o,a,s]=[0,1,2,3].map((t=>{const i=new Float32Array(A.buffer,e+t*r*4,r)
|
|
@@ -3213,8 +3213,9 @@ return await this.pause(),null===e||void 0===e||e.stop(),this.renderStep.realRen
|
|
|
3213
3213
|
return this.renderStep.showOnboarding(A)}async getGltfModels(){if(!this.renderStep)throw new Error("Render step has not been initialized yet")
|
|
3214
3214
|
return this.renderStep.getGltfModels()}setGltfModel(A){let{id:e,gltf:t}=A
|
|
3215
3215
|
if(!this.renderStep)throw new Error("Render step has not been initialized yet")
|
|
3216
|
-
this.renderStep.setGltfModel({id:e,gltf:t})}setStream(A){this.frame&&this.frame.setStream(A)}
|
|
3217
|
-
|
|
3216
|
+
this.renderStep.setGltfModel({id:e,gltf:t})}setStream(A){this.frame&&this.frame.setStream(A)}setStreamMirroring(A){var e
|
|
3217
|
+
null===(e=this.frame)||void 0===e||e.setStreamMirroring(A)}getDebugData(){let A={cameraResolution:this.frame?`${this.frame.width}x${this.frame.height}`:"",enableFrameRotation:this.enableFrameRotation}
|
|
3218
|
+
return this.frame&&(A={...A,...this.frame.getDebugData()}),this.pipeline&&(A={...A,...this.pipeline.getDebugData()}),A}},vr=Hr,xr={current_network:{...{occlusion:Sr,presenceChannels:[43,42],shinLineChannels:[44,45,46,47],shinLineErrorChannels:[48,49],numKeypoints:7,numSegmentations:4,segmentationExtract:"sigmoid",legSegmentationChannels:[14,15],shinSegmentationChannels:[16,17],h:160,w:160,keypoints:{left:[[.003437418571428541,.008509601428571434,.002596665714285712],[-.41033487142857145,.11493873142857142,-.029121094285714286],[.38472701857142855,-.16602557857142858,-.0630702742857143],[.26864875857142856,-.0302288485714286,.1308711957142857],[-.27453814142857147,.2351113014285714,-.029121094285714286],[-.24058894142857146,-.06417801857142857,.11187599571428572],[.26864875857142856,-.09812718857142858,-.12403139428571429]],right:[[-.003437418571428541,.008509601428571434,.002596665714285712],[.41033487142857145,.11493873142857142,-.029121094285714286],[-.38472701857142855,-.16602557857142858,-.0630702742857143],[-.26864875857142856,-.0302288485714286,.1308711957142857],[.27453814142857147,.2351113014285714,-.029121094285714286],[.24058894142857146,-.06417801857142857,.11187599571428572],[-.26864875857142856,-.09812718857142858,-.12403139428571429]]}},name:"current_network"}},Jr={current_network:{...{occlusion:kr,presenceChannels:[67,66],numKeypoints:11,numSegmentations:2,h:96,w:160,keypoints:{left:[[-1.045245,3.374546,2.195376],[-1.014471,5.519645,.954189],[.938918,5.548434,.93742],[.962832,3.351265,2.208817],[.086582,4.56379,1.478994],[-1.027692,2.959061,-3.035946],[-.944437,1.312956,-2.274435],[.955185,1.309367,-2.278131],[.917633,2.814196,-3.141179],[-.01889,.425957,1.100461],[-.012251,6.066441,-1.870021]],right:[[1.045245,3.374546,2.195376],[1.014471,5.519645,.954189],[-.938918,5.548434,.93742],[-.962832,3.351265,2.208817],[-.086582,4.56379,1.478994],[1.027692,2.959061,-3.035946],[.944437,1.312956,-2.274435],[-.955185,1.309367,-2.278131],[-.917633,2.814196,-3.141179],[.01889,.425957,1.100461],[.012251,6.066441,-1.870021]]}},name:"current_network"}},Tr={current_network:{h:160,w:96,numSegmentations:29,name:"current_network"}},Pr={current_network:{h:160,w:96,numSegmentations:31,name:"current_network"}},Kr={current_network:{h:160,w:96,numSegmentations:30,name:"current_network"}},Or={[xe]:xr,[Je]:Jr,[Te]:Tr,[Ke]:Pr,[Oe]:Kr},config=(A,e)=>{const t=Or[A]
|
|
3218
3219
|
if(!t)throw new Error(`No type network configs for "${A}" type`)
|
|
3219
3220
|
const i=t[e]
|
|
3220
3221
|
if(!i)throw new Error(`No network configs for "${e}" network name`)
|
|
@@ -3419,10 +3420,10 @@ break}if(b||err(2),x<256)t[n++]=x
|
|
|
3419
3420
|
else{if(256==x){v=s,B=null
|
|
3420
3421
|
break}var J=x-254
|
|
3421
3422
|
if(x>264){var T=sI[y=x-257]
|
|
3422
|
-
J=bits(A,s,(1<<T)-1)+QI[y],s+=T}var
|
|
3423
|
-
|
|
3424
|
-
Y=hI[
|
|
3425
|
-
if(
|
|
3423
|
+
J=bits(A,s,(1<<T)-1)+QI[y],s+=T}var P=C[bits16(A,s)&H],K=P>>4
|
|
3424
|
+
P||err(3),s+=15&P
|
|
3425
|
+
Y=hI[K]
|
|
3426
|
+
if(K>3){T=nI[K]
|
|
3426
3427
|
Y+=bits16(A,s)&(1<<T)-1,s+=T}if(s>h){o&&err(0)
|
|
3427
3428
|
break}I&&cbuf(n+131072)
|
|
3428
3429
|
var O=n+J
|
|
@@ -3517,7 +3518,7 @@ class CameraHardwareError extends Error{constructor(A){super("Camera hardware er
|
|
|
3517
3518
|
// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
3518
3519
|
class CameraPermissionDeniedError extends Error{constructor(A){super("Camera permission denied: ".concat(A.message)),this.name=ni}}
|
|
3519
3520
|
// Copyright © 2021 WANNABY Inc. All rights reserved.
|
|
3520
|
-
const matchDevicePredicate=A=>[["vendor",Tt],["model",
|
|
3521
|
+
const matchDevicePredicate=A=>[["vendor",Tt],["model",Pt],["browser",Ot]].every((e=>{let[t,i]=e
|
|
3521
3522
|
return((A,e,t)=>!Object.prototype.hasOwnProperty.call(t||{},A)||t[A]===e)(t,i,A)})),kI=[{vendor:"none",model:"ANA-NX9",browser:"Chrome",getCameraId:A=>{var e
|
|
3522
3523
|
return null===(e=A.filter((A=>A.label.includes("facing back"))).at(-1))||void 0===e?void 0:e.deviceId}}]
|
|
3523
3524
|
const bI=new class Camera{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
@@ -3535,8 +3536,10 @@ try{return await navigator.mediaDevices.getUserMedia(A)}catch(A){if("NotAllowedE
|
|
|
3535
3536
|
if(SI.includes(A.name))throw new CameraHardwareError(A)
|
|
3536
3537
|
throw A}}async tryToGetStream(A){let{cameraId:e,facingMode:t}=A
|
|
3537
3538
|
return await new Promise((async(A,i)=>{let g,r,I;(Lt||Ht)&&(I=setTimeout((()=>i(new Error("Too long initializing of the stream"))),2e4))
|
|
3538
|
-
|
|
3539
|
-
|
|
3539
|
+
const getStreamByConstraints=async()=>(r=await this.getConstraints({keyword:"ideal",cameraId:e,facingMode:t}),this.getUserMedia(r))
|
|
3540
|
+
try{g=await getStreamByConstraints()}catch(A){if(A instanceof CameraPermissionDeniedError)return void i(A)
|
|
3541
|
+
try{g=await getStreamByConstraints()}catch(A){return void i(A)}}finally{clearTimeout(I)}A(g)}))}getDeviceIdFromStream(A){const e=A.getVideoTracks(),t=null===e||void 0===e?void 0:e[0],i=null===t||void 0===t?void 0:t.getSettings()
|
|
3542
|
+
return null===i||void 0===i?void 0:i.deviceId}async areLabelsEmpty(){return(await this.getDevicesList()||[]).every((A=>{let{label:e}=A
|
|
3540
3543
|
return!e||!/(back|front)/.test(e)}))}async init(A){let e
|
|
3541
3544
|
const t=(null===A||void 0===A?void 0:A.cameraId)||this.deviceId
|
|
3542
3545
|
let i=t
|
|
@@ -3599,17 +3602,17 @@ return t(e)}}
|
|
|
3599
3602
|
class EnvMapResourcesLoader{constructor(A,e,t){this.datapackMetaManager=A,this.modelMetaManager=e,this.useTestEnvMap=t,this.RESOURCE_KEY="envMap",this.resourceManager=new Ti({cacheStrategies:{[this.RESOURCE_KEY]:{name:Ti.CACHE_LRU,size:7}}})}async load(A){try{const e=await this.modelMetaManager.getMeta(A),t=[...this.getDatapackResourceFiles(),...this.getModelResourceFiles(e)],i=performance.now(),g=this.resourceManager.getLoader(this.RESOURCE_KEY,t),[r,I,o]=await g.load(),a=performance.now()
|
|
3600
3603
|
return{data:{id:g.getId(),dfgLut:r,ldCubeDiffuse:I,ldCubeGgx:o},wasInCache:g.cacheHit,loadingStartTime:i,loadingFinishTime:a}}catch(e){throw new st(`Failed to load env map for model ${A}.`,{cause:e})}}getModelResourceFiles(A){return["ld_cube_diffuse.wnbtex","ld_cube_ggx.wnbtex"].map((e=>{if(this.useTestEnvMap)return ResourceFileFactory.bufferResourceOf(`./datapacks/assets/r2/test-envmap/${e}`)
|
|
3601
3604
|
const t=A.getUriDatapackEntryByName(e)
|
|
3602
|
-
return ResourceFileFactory.bufferResourceOf(t.uri)}))}getDatapackResourceFiles(){return[ResourceFileFactory.bufferResourceOf(this.datapackMetaManager.getFileUrl("single_scatter_dfg_lut.wnbtex"))]}}const getCanvasScreenshot=async A=>{let{backgroundCanvas:e,webglCanvas:t,previewSize:i,watermarkUrl:g,watermarkOffset:r
|
|
3603
|
-
const
|
|
3604
|
-
|
|
3605
|
-
const
|
|
3606
|
-
if(!
|
|
3607
|
-
let
|
|
3608
|
-
if(
|
|
3609
|
-
|
|
3605
|
+
return ResourceFileFactory.bufferResourceOf(t.uri)}))}getDatapackResourceFiles(){return[ResourceFileFactory.bufferResourceOf(this.datapackMetaManager.getFileUrl("single_scatter_dfg_lut.wnbtex"))]}}const getCanvasScreenshot=async A=>{let{backgroundCanvas:e,webglCanvas:t,previewSize:i,watermarkUrl:g,watermarkOffset:r}=A
|
|
3606
|
+
const I=document.createElement("canvas"),{width:o,height:a}=getCropSizeByAspect(e.width<t.width?e:t,i.width/i.height)
|
|
3607
|
+
I.width=o,I.height=a
|
|
3608
|
+
const s=I.getContext("2d")
|
|
3609
|
+
if(!s)throw new Error("Could not get 2d context for screenshot.")
|
|
3610
|
+
let n
|
|
3611
|
+
if([e,t].forEach((A=>{const{width:e,height:t}=getCropSizeByAspect(A,i.width/i.height)
|
|
3612
|
+
s.drawImage(A,(A.width-e)/2,(A.height-t)/2,e,t,0,0,o,a)})),n=g?await getImage(g):await LI(),n){let A=n.width,e=n.height
|
|
3610
3613
|
e>40&&(A=Math.floor(40*A/e),e=40),A>190&&(e=Math.floor(190*e/A),A=190)
|
|
3611
|
-
const t=
|
|
3612
|
-
|
|
3614
|
+
const t=o/i.width,g=calculateWatermarkOffset((null===r||void 0===r?void 0:r.x)??12,A,o,t),I=calculateWatermarkOffset((null===r||void 0===r?void 0:r.y)??-12,e,a,t)
|
|
3615
|
+
s.drawImage(n,g,I,A*t,e*t)}return new Promise(((A,e)=>{try{I.toBlob((i=>{i?A(i):e(new st("Failed to create screenshot",{params:{webglCanvas:t,width:o,height:a,watermarkUrl:g}}))}))}catch(A){e(new st("Error in getCanvasScreenshot",{cause:A,params:{webglCanvas:t,width:o,height:a,watermarkUrl:g}}))}}))}
|
|
3613
3616
|
function calculateWatermarkOffset(A,e,t,i){return"center"===A?(t-e*i)/2:A>=0?A*i:t-(e+Math.abs(A))*i}const LI=once((async()=>{const A=new Blob(['<svg width="72" height="24" viewBox="0 0 72 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11.2677 3L13.0218 13.41H13.123L14.9782 3H18.1809L14.9521 19.1538H11.5487L9.63931 8.05094H9.53985L7.63221 19.1538H4.22884L1 3H4.40337L6.20977 13.41H6.31188L8.11653 3H11.2677Z" fill="white"/>\n <path d="M25.609 3L30.2096 19.1538H26.7521L25.7608 15.4358H21.0842L20.0676 19.1538H16.8911L21.4909 3H25.609ZM21.8216 12.718H25.0234L23.4989 6.94866H23.3977L21.8216 12.718Z" fill="white"/>\n <path d="M39.5051 12.5639H39.6063V3H42.7322V19.1538H40.0636L34.5746 8.97449H34.4724V19.1538H31.3213V3H34.5501L39.5051 12.5639Z" fill="white"/>\n <path d="M52.5471 12.5639H52.6483V3H55.7742V19.1538H53.1056L47.6166 8.97449H47.5127V19.1538H44.3633V3H47.5921L52.5471 12.5639Z" fill="white"/>\n <path d="M65.6047 3L70.2019 19.1538H66.7479L65.7566 15.4358H61.0808L60.0642 19.1538H56.8868L61.4866 3H65.6047ZM61.8173 12.718H65.02L63.4945 6.94866H63.3951L61.8173 12.718Z" fill="white"/>\n</svg>\n'],{type:"image/svg+xml"}),e=URL.createObjectURL(A),t=await getImage(e)
|
|
3614
3617
|
return URL.revokeObjectURL(e),t})),getImage=A=>new Promise(((e,t)=>{const i=new Image
|
|
3615
3618
|
i.onload=()=>e(i),i.onerror=()=>t(new Error(`Failed to download ${A}.`)),i.crossOrigin="anonymous",i.src=A})),getCropSizeByAspect=(A,e)=>{let{width:t,height:i}=A
|
|
@@ -3628,45 +3631,45 @@ Yr.init(xI),
|
|
|
3628
3631
|
// Copyright © 2024 WANNABY Inc. All rights reserved.
|
|
3629
3632
|
function initGlobalErrorListeners(A){window.addEventListener("error",(A=>{A.stopImmediatePropagation(),Yr.handleError(new st(`Window error: ${A.message}`,{cause:A.error}))})),window.addEventListener("unhandledrejection",(A=>{A.stopImmediatePropagation(),Yr.handleError(new st(`Unhandled rejection: ${A.reason}`,{cause:A.reason instanceof Error?A.reason:new Error(A.reason)}))}))}(),oi.on("error",(A=>{TI&&xI.logError(st.fromObject(A))})),setEmitAction((function(A){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i]
|
|
3630
3633
|
oi.remoteEmit(A,...t)}))
|
|
3631
|
-
const
|
|
3634
|
+
const PI=document.getElementById("wrapper"),KI=document.getElementById("video"),OI=getWebglCanvas(),zI=getDebugOverlayWrapper(),qI=document.getElementById("background-canvases"),jI=document.getElementById("screen-loading-stub"),VI=getPlayButton()
|
|
3632
3635
|
TI=new class CoreSdk{constructor(){var A=this
|
|
3633
3636
|
src_defineProperty(this,"setMode",queueCalls((async(A,e)=>{var t
|
|
3634
3637
|
if(this.mode===A)return
|
|
3635
3638
|
this.mode=A,this.type=e,await this.dataProvider.change_mode(A,e),null===(t=this.arInferenceDebugger)||void 0===t||t.toggleDebugDiv(A),this.modelsManager.modelType=e,this.modelsManager.mode=A,this.modelMetaManager.mode=A
|
|
3636
3639
|
const i=await this.getInferenceInitParams(A,e)
|
|
3637
|
-
return await vr.prepareMode(i),A===qe?(
|
|
3638
|
-
return A.killStream(),A.initStream({cameraId:e,src:t,facingMode:i})})),src_defineProperty(this,"recalcDimensions",jt((function(){let{videoWidth:e,videoHeight:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:
|
|
3640
|
+
return await vr.prepareMode(i),A===qe?(qI.style.display="none",this.hideVideo(),this.killStream(),this.initVideo.reset(),this.setStreamMirroring()):this.videoSize={width:0,height:0},!0}))),src_defineProperty(this,"setPersonHeight",queueCalls((async A=>{vr.reInit({personHeight:A}),vr.initParams&&(vr.initParams.personHeight=A)}))),src_defineProperty(this,"resetStream",(async function(){let{cameraId:e,src:t,facingMode:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
3641
|
+
return A.killStream(),A.initStream({cameraId:e,src:t,facingMode:i})})),src_defineProperty(this,"recalcDimensions",jt((function(){let{videoWidth:e,videoHeight:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:KI
|
|
3639
3642
|
const{width:i,height:g}=A.calcCanvasDimensions({videoWidth:e,videoHeight:t})
|
|
3640
|
-
i&&g&&[
|
|
3641
|
-
const i=t||
|
|
3642
|
-
areSizesEqual(A.videoSize,{width:g,height:i})||(A.videoSize={width:g,height:i},oi.remoteEmit(dA,A.videoSize),A.recalcDimensions({videoWidth:g,videoHeight:i}),A.pipelineInitialized&&await vr.reInit({size:{height:i,width:g}}))}),50)),src_defineProperty(this,"handleWindowResize",jt((async()=>{const{width:A,height:e}=getAvailableSize(
|
|
3643
|
+
i&&g&&[KI,OI,zI,qI].forEach((e=>A.setCssSize(e,{width:i,height:g})))}),50)),src_defineProperty(this,"handleVideoResize",jt((async function(){let{videoWidth:e,videoHeight:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
3644
|
+
const i=t||KI.videoHeight,g=e||KI.videoWidth
|
|
3645
|
+
areSizesEqual(A.videoSize,{width:g,height:i})||(A.videoSize={width:g,height:i},oi.remoteEmit(dA,A.videoSize),A.recalcDimensions({videoWidth:g,videoHeight:i}),A.pipelineInitialized&&await vr.reInit({size:{height:i,width:g}}))}),50)),src_defineProperty(this,"handleWindowResize",jt((async()=>{const{width:A,height:e}=getAvailableSize(PI)
|
|
3643
3646
|
areSizesEqual(this.viewer3dSize,{width:A,height:e})||(this.viewer3dSize={width:A,height:e},vr.reInit({viewer3dSize:{height:e,width:A}}))
|
|
3644
3647
|
const{width:t,height:i}=this.videoSize
|
|
3645
3648
|
this.recalcDimensions({videoWidth:t,videoHeight:i})}),50)),src_defineProperty(this,"setupStream",onceSuccess((async function(){let{src:e,facingMode:t,cameraId:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
3646
3649
|
if(A.isRecordVideoMode)return
|
|
3647
3650
|
const{permissionGranted:g,error:r}=await A.checkCameraPermissions({src:e,facingMode:t,cameraId:i})
|
|
3648
|
-
if(!g)throw new st("Failed to setup stream",{cause:r})}))),src_defineProperty(this,"setupVideoListeners",once((()=>{
|
|
3651
|
+
if(!g)throw new st("Failed to setup stream",{cause:r})}))),src_defineProperty(this,"setupVideoListeners",once((()=>{KI.addEventListener("loadedmetadata",this.handleVideoResize),KI.addEventListener("resize",this.handleVideoResize),KI.addEventListener("playing",(()=>{this.showVideo()}))}))),src_defineProperty(this,"setupVideo",queueCalls((async function(){let{src:e,stream:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
3649
3652
|
return A.setupVideoListeners(),new Promise((async(i,g)=>{let r
|
|
3650
|
-
const onFirstReady=()=>{r(),
|
|
3653
|
+
const onFirstReady=()=>{r(),jI.style.display="none",i({width:KI.videoWidth,height:KI.videoHeight})},onError=()=>{r()
|
|
3651
3654
|
let A="Failed to init video."
|
|
3652
|
-
|
|
3653
|
-
r=()=>{
|
|
3655
|
+
KI.error&&(A+=` ${KI.error.code} ${KI.error.message}`),g(new Error(A))}
|
|
3656
|
+
r=()=>{KI.removeEventListener("loadedmetadata",onFirstReady),KI.removeEventListener("play",onFirstReady),KI.removeEventListener("error",onError)},KI.addEventListener("loadedmetadata",onFirstReady),KI.addEventListener("play",onFirstReady),KI.addEventListener("error",onError)
|
|
3654
3657
|
try{await A.setVideoSource({src:e,stream:t})}catch(A){r(),g(A)}}))}))),src_defineProperty(this,"handleStreamVisibilityChange",(()=>{var A
|
|
3655
3658
|
this.mode!==qe&&("visible"===document.visibilityState&&(null!==vr&&void 0!==vr&&null!==(A=vr.pipeline)&&void 0!==A&&A.running?vr.reInit({resetStream:!0}):this.resetStream()))})),src_defineProperty(this,"setupStreamListeners",once((()=>{rr&&document.addEventListener("visibilitychange",this.handleStreamVisibilityChange)}))),src_defineProperty(this,"initVideo",once((async function(){let e,{src:t,facingMode:i,cameraId:g}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
3656
|
-
return A.isRecordVideoMode?(t&&(
|
|
3659
|
+
return A.isRecordVideoMode?(t&&(KI.crossOrigin="anonymous",KI.src=t),void(jI.style.display="none")):(t||(await A.setupStream({facingMode:i,cameraId:g}),e=await A.initStream(),A.setupStreamListeners()),await A.setupVideo({src:t,stream:e}))}))),src_defineProperty(this,"initPipelineSource",once((async()=>{await this.initVideo()}))),this.pipelineInitialized=!1,this.inDebugMode=!1,this.videoSize={width:0,height:0},this.viewer3dSize={width:0,height:0},this.modelId=null,this.delayedErrors=[],this.useLocalLibs=!1,this.loadedModels=new Set,this.internalEventsEmitter=new ke,this.dataProvider=null,this.isLowPowerModeEnabled=!1,this._setupInternalEventsHandlers(),zt?PI.classList.add("desktopWrapper"):PI.classList.remove("desktopWrapper"),this._setupEventHandlers(),this._runLowPowerModeDetection()}_setupInternalEventsHandlers(){this.internalEventsEmitter.on(ai,(()=>{this.firstLazyStepInitStartedTimestamp||(this.firstLazyStepInitStartedTimestamp=Date.now()),this.lazyStepInitCounter=(this.lazyStepInitCounter||0)+1})),this.internalEventsEmitter.on(si,(()=>{this.lazyStepInitCounter-=1,0===this.lazyStepInitCounter&&this.logMeasureSessionInitialization({initTimestamp:this.initTimestamp,downloadTimestamp:this.firstLazyStepInitStartedTimestamp})}))}_setupEventHandlers(){document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this._runLowPowerModeDetection()}))}async _runLowPowerModeDetection(){this.isLowPowerModeEnabled=await LowerPowerModeDetector_isLowPowerModeEnabled(),xI.isReady()&&xI.appendLoggingData({low_power_mode:this.isLowPowerModeEnabled})}showVideo(){KI.classList.add("video-visible")}hideVideo(){KI.classList.remove("video-visible")}setModelId(A){this.modelId=A}logMeasureColdWarmStart(A){let{modelId:e,downloadingTime:t,startTime:i}=A
|
|
3657
3660
|
const g=performance.now()-i
|
|
3658
3661
|
this.loadedModels.has(e)?xI.logEvent("log_measure_warm_start",t,g):xI.logEvent("log_measure_cold_start",t,g)}logMeasureSessionInitialization(A){let{initTimestamp:e,downloadTimestamp:t}=A
|
|
3659
3662
|
const i=Date.now(),g=i-e,r=i-t
|
|
3660
3663
|
if(g<0||r<0){const A=JSON.stringify({initTimestamp:e,initFileTimestamp:HI,totalInitTime:g,totalDownloadTime:r})
|
|
3661
3664
|
xI.logError(new st(`NegativeTimestampError: Wrong measure calc in logMeasureSessionInitialization: ${A}`))}else setTimeout((()=>{xI.logEvent("log_measure_session_initialization",r,g)}))}async start(){const A=[]
|
|
3662
|
-
this.mode===We?(
|
|
3663
|
-
const showVTOCanvases=()=>{
|
|
3665
|
+
this.mode===We?(jI.style.display="none",this.recalcDimensions()):A.push(this.initPipelineSource()),A.push(vr.reInit({action:"start",size:this.videoSize})),await Promise.all(A),vr.start(),this.showCanvases()}showCanvases(){if(this.mode===qe)return void(OI.style.display="initial")
|
|
3666
|
+
const showVTOCanvases=()=>{OI.style.display="initial",qI.style.display="initial",vr.pipeline.removeOnAfterRender(showVTOCanvases)}
|
|
3664
3667
|
vr.pipeline.onAfterRender(showVTOCanvases)}destroy(){vr.stop()}async pause(){await vr.pause()}async getInferenceInitParams(A,e){let t={mode:A,type:e,debug:this.inDebugMode}
|
|
3665
3668
|
if(ve.includes(e)){var i
|
|
3666
3669
|
const A=Boolean(null===(i=this.query)||void 0===i?void 0:i.tflite)||await(async()=>await isSimdAvailable())()
|
|
3667
3670
|
xI.appendLoggingData({inference:A?"tflite":"tfjs"})
|
|
3668
3671
|
const{nnConfig:g,batchSize:r,interpolateSize:I,isRecordVideoMode:o,...a}=this.getInferenceConfig({query:this.query,type:e})
|
|
3669
|
-
t={...t,...a,nn:g,cacheCanvas:!r&&!I,subpixel:!0,batchSize:r,interpolateSize:I,segmentationThreshold:.5,isRecordVideoMode:o,useTflite:A},this.isRecordVideoMode=o}return xI.appendLoggingData({mode:A,kind:e===be?"footwear":e}),this.viewer3dSize=getAvailableSize(
|
|
3672
|
+
t={...t,...a,nn:g,cacheCanvas:!r&&!I,subpixel:!0,batchSize:r,interpolateSize:I,segmentationThreshold:.5,isRecordVideoMode:o,useTflite:A},this.isRecordVideoMode=o}return xI.appendLoggingData({mode:A,kind:e===be?"footwear":e}),this.viewer3dSize=getAvailableSize(PI),t}initArInferenceDebugger(A){var e
|
|
3670
3673
|
const t=parseInt(null===(e=this.query)||void 0===e?void 0:e.debugTrackerSize)||100
|
|
3671
3674
|
let i=""
|
|
3672
3675
|
const rememberTimeToFirstRender=()=>{i=Date.now()-this.initTimestamp+"ms",vr.pipeline.removeOnAfterRender(rememberTimeToFirstRender)}
|
|
@@ -3693,32 +3696,31 @@ this.libInjector=new LibInjector,this.libInjector.init({dataProvider:this.dataPr
|
|
|
3693
3696
|
const u=Boolean(null===e||void 0===e?void 0:e.useTestEnvMap)
|
|
3694
3697
|
this.envMapResourceLoader=new EnvMapResourcesLoader(this.datapackMetaManager,this.modelMetaManager,u),this.modelsManager=new NI({modelMetaManager:this.modelMetaManager,datapackMetaManager:this.datapackMetaManager,modelsCacheSize:r,logger:xI,type:o,mode:n})
|
|
3695
3698
|
const f=new R2Loader(this.libInjector,this.useLocalLibs)
|
|
3696
|
-
f.init(
|
|
3697
|
-
try{await vr.init({...h,video:
|
|
3699
|
+
f.init(OI)
|
|
3700
|
+
try{await vr.init({...h,video:KI,isVideoSource:!(null===e||void 0===e||!e.src),webglCanvas:OI,resetStream:()=>this.resetStream(),onSizeChange:A=>{let{width:e,height:t}=A
|
|
3698
3701
|
return this.handleVideoResize({videoWidth:e,videoHeight:t})},modelId:i,dataProvider:this.dataProvider,modelsCacheSize:r,logger:xI,type:o,viewer3dSize:this.viewer3dSize,mode:n,device:c.device,personHeight:E,libInjector:this.libInjector,modelsManager:this.modelsManager,datapackMetaManager:this.datapackMetaManager,modelMetaManager:this.modelMetaManager,envMapResourceLoader:this.envMapResourceLoader,internalEventsEmitter:this.internalEventsEmitter,enableDoubleClick:C,r2Loader:f,fpsLogger:this.fpsLogger,fpsCounter:this.fpsCounter,query:e}),vr.frame&&xI.appendLoggingData({frame:vr.frame.name}),this.inDebugMode&&this.mode===Ve&&vr.pipeline&&this.initArInferenceDebugger(h.useTflite)}catch(A){throw Number.isInteger(A)&&(A=new Error(this.dataProvider.get_exception_msg(A))),new st("Failed to init pipeline",{cause:A})}vI.addEventListener("resize",this.handleWindowResize),this.pipelineInitialized=!0,setTimeout((()=>{xI.logEvent("log_init")}))}async initDataProviderAndLogger(A){let{license:e,parentHostname:t,metaUrlPrefix:i,wasmEventsParams:g}=A
|
|
3699
3702
|
const r=await gi(),I=getNonGuaranteedEventsParams(xI)
|
|
3700
3703
|
let o=ri
|
|
3701
3704
|
try{this.dataProvider=new r.DataProvider(e,{bundle:t,kind:this.type,mode:this.mode,metaVersion:o,metaUrlPrefix:i||""})}catch(A){throw Number.isInteger(A)?A=new Error(r.get_exception_msg(A)):"string"===typeof A&&(A=new Error(A)),new st("Failed to create DataProvider. Check license key.",{cause:A})}const a=this.dataProvider.get_new_logger({...g,bundle:t,kind:this.type,metaVersion:o,metaUrlPrefix:i||""},this.inDebugMode)
|
|
3702
|
-
xI.init({wasmLogger:a,debug:this.inDebugMode}),xI.appendLoggingData({...await I,low_power_mode:this.isLowPowerModeEnabled}),await this.dataProvider.init(a),this.dataProvider.get_exception_msg=r.get_exception_msg,this.dataProvider.doLeakCheck=r.doLeakCheck,this.dataProvider.destroy=function(){this._deleted||(this.delete(),this._deleted=!0),a.isDeleted()||a.delete()}}setVideoElementStream(A){
|
|
3703
|
-
const e=
|
|
3704
|
-
|
|
3705
|
-
vr.pipeline.onceStarted?vr.pipeline.onAfterRender(toggleMirroring):toggleMirroring()}}killStream(){this.setVideoElementStream(null),bI.stopStream()}async initStream(){let A,{cameraId:e,src:t,facingMode:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
3705
|
+
xI.init({wasmLogger:a,debug:this.inDebugMode}),xI.appendLoggingData({...await I,low_power_mode:this.isLowPowerModeEnabled}),await this.dataProvider.init(a),this.dataProvider.get_exception_msg=r.get_exception_msg,this.dataProvider.doLeakCheck=r.doLeakCheck,this.dataProvider.destroy=function(){this._deleted||(this.delete(),this._deleted=!0),a.isDeleted()||a.delete()}}setVideoElementStream(A){KI.removeAttribute("src"),KI.srcObject=A}setStreamMirroring(A){if(!A)return void KI.classList.remove("video-mirrored")
|
|
3706
|
+
const e=KI.classList.contains("video-mirrored"),t="user"===A.getTracks()[0].getSettings().facingMode||zt
|
|
3707
|
+
vr.setStreamMirroring(t),t!==e&&KI.classList.toggle("video-mirrored")}killStream(){this.setVideoElementStream(null),bI.stopStream()}async initStream(){let A,{cameraId:e,src:t,facingMode:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
3706
3708
|
return t?(oi.remoteEmit(U,"fakeCameraId"),!0):(A=e?await bI.getStream({cameraId:e}):i?await bI.switchTo({facingMode:i}):await bI.getStream(),A&&(vr.setStream(A),this.setStreamMirroring(A),oi.remoteEmit(U,bI.getDeviceIdFromStream(A))),A)}async checkCameraPermissions(){let{src:A,facingMode:e,cameraId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
3707
3709
|
oi.remoteEmit(J)
|
|
3708
3710
|
try{let i
|
|
3709
3711
|
i=A?{contentHint:"",id:"fakeId",kind:"videoinput",label:"fakeLabel",muted:!0,readyState:0,settings:{facingMode:e}}:await bI.checkPermissions({facingMode:e,cameraId:t})
|
|
3710
3712
|
const g=i.settings.facingMode
|
|
3711
|
-
xI.logEvent("log_camera_access_granted",g??"unknown"),oi.remoteEmit(T,i)}catch(A){return oi.remoteEmit(
|
|
3712
|
-
A.style.width=`${t}px`,A.style.height=`${i}px`}calcCanvasDimensions(){let{videoWidth:A,videoHeight:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:
|
|
3713
|
+
xI.logEvent("log_camera_access_granted",g??"unknown"),oi.remoteEmit(T,i)}catch(A){return oi.remoteEmit(P,st.toObject(A)),{permissionGranted:!1,error:new st("Failed to get camera stream",{cause:A})}}return{permissionGranted:!0}}getAvailableSize(){return this.inDebugMode&&zt&&this.mode===Ve?PI.classList.add("arWrapper"):PI.classList.remove("arWrapper"),getAvailableSize(PI)}setCssSize(A,e){let{width:t,height:i}=e
|
|
3714
|
+
A.style.width=`${t}px`,A.style.height=`${i}px`}calcCanvasDimensions(){let{videoWidth:A,videoHeight:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:KI
|
|
3713
3715
|
const{width:t,height:i}=this.getAvailableSize()
|
|
3714
3716
|
let g,r
|
|
3715
3717
|
if(this.mode===We)g=t,r=i
|
|
3716
3718
|
else if(A&&e){const I=((A,e)=>{var{width:t,height:i}=A,{width:g,height:r}=e
|
|
3717
3719
|
return Math.max(t/g,i/r)})({width:t,height:i},{width:A,height:e})
|
|
3718
|
-
g=Math.round(A*I),r=Math.round(e*I)}return{width:g,height:r}}async setupVideoAutoplay(){utils_video_useAutoPlayClickVideo()&&await hi({playButton:
|
|
3720
|
+
g=Math.round(A*I),r=Math.round(e*I)}return{width:g,height:r}}async setupVideoAutoplay(){utils_video_useAutoPlayClickVideo()&&await hi({playButton:VI,video:KI})}async setVideoSource(A){let{src:e,stream:t}=A
|
|
3719
3721
|
if(!this.isRecordVideoMode){if(t)this.setVideoElementStream(t)
|
|
3720
3722
|
else{if(!e)throw new Error("No source for video is set.")
|
|
3721
|
-
|
|
3723
|
+
KI.src!==e&&(this.killStream(),KI.loop=!0,KI.crossOrigin="anonymous",KI.disablePictureInPicture=!0,KI.src=e)}await this.setupVideoAutoplay()}}getMode(){return this.mode}async debug(A){if(!this.debugger.handleDebug(A))return vr.reInit(A)}async setPOI(A){if(this.mode!==We)throw new Error("setPOI only available in 3D mode")
|
|
3722
3724
|
await vr.reInit({poi:A})}async resetCameraPosition(){if(this.mode!==We)throw new Error("resetCameraPosition only available in 3D mode")
|
|
3723
3725
|
await vr.reInit({resetCameraPosition:!0})}async cameraZoom(A){if(this.mode!==We)throw new Error("cameraZoom only available in 3D mode")
|
|
3724
3726
|
await vr.reInit({cameraZoom:A})}async togglePanningMode(A){if(this.mode!==We)throw new Error("togglePanningMode only available in 3D mode")
|
|
@@ -3731,9 +3733,9 @@ break
|
|
|
3731
3733
|
case"datapack":this.useLocalLibs=!1
|
|
3732
3734
|
break
|
|
3733
3735
|
default:throw new Error("Invalid libs source: use 'local' or 'datapack'")}}getPublicAssetUrl(A){try{return TI.dataProvider.get_datapack_file_url(`assets/${A}`)}catch(A){if(Number.isInteger(A))throw new Error(TI.dataProvider.get_exception_msg(A))
|
|
3734
|
-
throw A}}},oi.on(E,(async(A,e)=>{let{query:t,inDebugMode:i,license:g,modelsCacheSize:r,type:I,metaUrlPrefix:o,initTimestamp:a,mode:s,inViewport:n,enableDoubleClick:B,personHeight:C}=A,{origin:E,source:l}=e
|
|
3736
|
+
throw A}}},oi.on(E,(async(A,e)=>{let{query:t={},inDebugMode:i,license:g,modelsCacheSize:r,type:I,metaUrlPrefix:o,initTimestamp:a,mode:s,inViewport:n,enableDoubleClick:B,personHeight:C}=A,{origin:E,source:l}=e
|
|
3735
3737
|
try{let A
|
|
3736
|
-
|
|
3738
|
+
jI.style.display="initial",oi.init({origin:E,eventTarget:l}),oi.remoteEmit(c)
|
|
3737
3739
|
try{A=new URL(E).hostname}catch(A){throw new st(`Failed to get parent hostname from origin "${E}".`,{cause:A})}await TI.init({query:t,inDebugMode:i,license:g,modelsCacheSize:r,parentHostname:A,type:I,initTimestamp:a,mode:s,metaUrlPrefix:o,inViewport:n,enableDoubleClick:B,personHeight:C}),oi.remoteEmit(h)}catch(A){oi.remoteEmitError(d,A)}})).on(m,(async()=>{try{oi.remoteEmit(p),await TI.start(),oi.remoteEmit(y)}catch(A){oi.remoteEmitError(G,A)}})).on(R,(async()=>{try{oi.remoteEmit(N),await TI.pause(),oi.remoteEmit(S)}catch(A){oi.remoteEmitError(k,A)}})).on(o,(async A=>{let{modelId:e}=A
|
|
3738
3740
|
const i=performance.now(),g={type:t,id:e}
|
|
3739
3741
|
try{oi.remoteEmit(a)
|
|
@@ -3743,16 +3745,16 @@ try{const A=performance.now()
|
|
|
3743
3745
|
oi.remoteEmit(V,{modelId:e})
|
|
3744
3746
|
const{modelWasSet:t,downloadingTime:i,modelInfo:g}=await vr.reInit({modelId:e})
|
|
3745
3747
|
t&&(TI.setModelId(e),TI.logMeasureColdWarmStart({modelId:e,startTime:A,downloadingTime:i})),TI.loadedModels.add(e),oi.remoteEmit(W,{modelId:e,modelInfo:g,modelWasSet:t})}catch(A){oi.remoteEmitError(Z,{modelId:e},A)}})).on(X,(async A=>{let{duration:e,visible:t}=A
|
|
3746
|
-
try{oi.remoteEmit($),t&&(TI.visibilityChange(!0),TI.inViewportStartTime=performance.now()),!t&&TI.modelId&&xI.logEvent("log_3d_closed",TI.modelId,`${e}`),oi.remoteEmit(AA)}catch(A){oi.remoteEmitError(eA,{},A)}})).on(
|
|
3748
|
+
try{oi.remoteEmit($),t&&(TI.visibilityChange(!0),TI.inViewportStartTime=performance.now()),!t&&TI.modelId&&xI.logEvent("log_3d_closed",TI.modelId,`${e}`),oi.remoteEmit(AA)}catch(A){oi.remoteEmitError(eA,{},A)}})).on(K,(async()=>{try{oi.remoteEmit(O),await TI.setupStream({src:KI.src})
|
|
3747
3749
|
const A=(await bI.getDevicesListByOs()).map((A=>{let{deviceId:e,label:t}=A
|
|
3748
3750
|
return{label:t,id:e}}))
|
|
3749
3751
|
oi.remoteEmit(z,A)}catch(A){oi.remoteEmitError(q,A)}})).on(b,(async A=>{let{cameraId:e}=A
|
|
3750
3752
|
try{var t
|
|
3751
|
-
oi.remoteEmit(_),await TI.setupStream({src:
|
|
3753
|
+
oi.remoteEmit(_),await TI.setupStream({src:KI.src})
|
|
3752
3754
|
const A=null===vr||void 0===vr||null===(t=vr.pipeline)||void 0===t?void 0:t.running
|
|
3753
3755
|
await TI.pause(),await TI.resetStream({cameraId:e}),A&&TI.start(),oi.remoteEmit(U,e)}catch(A){oi.remoteEmitError(Y,e,A)}})).on(L,(async A=>{let{facingMode:e}=A
|
|
3754
3756
|
try{var t
|
|
3755
|
-
oi.remoteEmit(H),await TI.setupStream({src:
|
|
3757
|
+
oi.remoteEmit(H),await TI.setupStream({src:KI.src})
|
|
3756
3758
|
const A=null===vr||void 0===vr||null===(t=vr.pipeline)||void 0===t?void 0:t.running
|
|
3757
3759
|
await TI.pause()
|
|
3758
3760
|
const i=await TI.resetStream({facingMode:e})
|
|
@@ -3760,10 +3762,10 @@ A&&TI.start()
|
|
|
3760
3762
|
const g=bI.getStreamDetails(i).settings.facingMode
|
|
3761
3763
|
xI.logEvent("log_camera_switched",g??"unknown"),oi.remoteEmit(v,g)}catch(A){oi.remoteEmitError(x,e,A)}})).on(tA,(async A=>{let{watermarkUrl:e,watermarkOffset:t}=A
|
|
3762
3764
|
try{oi.remoteEmit(iA)
|
|
3763
|
-
const A=TI.getAvailableSize(),i=getCurrentBackground()
|
|
3764
|
-
Jt&&
|
|
3765
|
-
const
|
|
3766
|
-
xI.logEvent("log_photo_taken",TI.modelId),oi.remoteEmit(gA,
|
|
3765
|
+
const A=TI.getAvailableSize(),i=getCurrentBackground()
|
|
3766
|
+
Jt&&Kt===Rt&&"12"===Yt&&await getCanvasScreenshot({backgroundCanvas:i,webglCanvas:OI,previewSize:A,watermarkUrl:e,watermarkOffset:t})
|
|
3767
|
+
const g=await getCanvasScreenshot({backgroundCanvas:i,webglCanvas:OI,previewSize:A,watermarkUrl:e,watermarkOffset:t})
|
|
3768
|
+
xI.logEvent("log_photo_taken",TI.modelId),oi.remoteEmit(gA,g)}catch(A){oi.remoteEmitError(rA,A)}})).on(lA,(async A=>{let{src:e,facingMode:t,cameraId:i}=A
|
|
3767
3769
|
try{oi.remoteEmit(uA)
|
|
3768
3770
|
const A=await TI.initVideo({src:e,facingMode:t,cameraId:i})
|
|
3769
3771
|
oi.remoteEmit(fA,A)}catch(A){oi.remoteEmitError(wA,A)}})).on(u,(()=>{try{oi.remoteEmit(f),TI.destroy(),oi.remoteEmit(w)}catch(A){oi.remoteEmitError(D,A)}finally{oi.destroy()}})).on(mA,(async A=>{let{mode:e,modelType:t,startTime:i}=A
|
package/iframe.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!-- Copyright © 2024 WANNABY INC. All rights reserved. --><!doctype html><html><head><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="ie=edge"><title>WANNABY / WEB-AR</title><meta name="description" content="WANNA WEB-AR"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="mobile-web-app-capable" content="yes"><style>body,html{height:100%;margin:0;padding:0}*{touch-action:none}.wrapper{height:100%;position:relative;overflow:hidden}#background-canvases,#debug-canvases,#interactions-layer,.wrapper canvas,.wrapper video{height:100%;width:100%}#canvases-wrapper{width:100%;height:100%;display:grid;grid-auto-columns:1fr;align-content:center;justify-content:center}#canvases-wrapper>*{position:relative;grid-column-start:1;grid-row-start:1}#debug-canvases{display:flex;flex-direction:column;gap:20px}#debug-canvases>div>canvas{position:absolute}#background-canvases{z-index:-1}#debug-canvases,#debug-overlay>canvas,#interactions-layer{position:absolute;top:0;left:0}#interactions-layer{user-select:none;-webkit-user-select:none}#background-canvases canvas:not(.current-background){display:none}#debug{position:absolute;top:200px;right:0;bottom:0;min-width:220px;max-height:calc(100% - 300px);overflow:auto;color:#fff;padding:5px;text-align:right}#debug,#debug *{touch-action:pan-x pan-y}#debug>div{padding:0 5px}.has-substeps>span{font-weight:700}.has-substeps{border:1px solid;margin:5px 0}video{opacity:0;position:absolute;top:0;z-index:-1}.video-mirrored{transform:scaleX(-1)}.video-visible{opacity:1}#screen-loading-stub{width:100%;height:100%;display:none;background:#fff;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}#play-button{display:none;position:absolute;top:50%;right:0;background-color:transparent;color:transparent;outline:0;border:none}@media (orientation:landscape){.desktopWrapper.arWrapper canvas,.desktopWrapper.arWrapper video{height:100%;width:auto}.desktopWrapper.arWrapper #debug{color:#000}.desktopWrapper.arWrapper #debug>*{border-color:#000}}</style><script defer="defer" src="./core.js?
|
|
1
|
+
<!-- Copyright © 2024 WANNABY INC. All rights reserved. --><!doctype html><html><head><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="ie=edge"><title>WANNABY / WEB-AR</title><meta name="description" content="WANNA WEB-AR"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="mobile-web-app-capable" content="yes"><style>body,html{height:100%;margin:0;padding:0}*{touch-action:none}.wrapper{height:100%;position:relative;overflow:hidden}#background-canvases,#debug-canvases,#interactions-layer,.wrapper canvas,.wrapper video{height:100%;width:100%}#canvases-wrapper{width:100%;height:100%;display:grid;grid-auto-columns:1fr;align-content:center;justify-content:center}#canvases-wrapper>*{position:relative;grid-column-start:1;grid-row-start:1}#debug-canvases{display:flex;flex-direction:column;gap:20px}#debug-canvases>div>canvas{position:absolute}#background-canvases{z-index:-1}#debug-canvases,#debug-overlay>canvas,#interactions-layer{position:absolute;top:0;left:0}#interactions-layer{user-select:none;-webkit-user-select:none}#background-canvases canvas:not(.current-background){display:none}#debug{position:absolute;top:200px;right:0;bottom:0;min-width:220px;max-height:calc(100% - 300px);overflow:auto;color:#fff;padding:5px;text-align:right}#debug,#debug *{touch-action:pan-x pan-y}#debug>div{padding:0 5px}.has-substeps>span{font-weight:700}.has-substeps{border:1px solid;margin:5px 0}video{opacity:0;position:absolute;top:0;z-index:-1}.video-mirrored{transform:scaleX(-1)}.video-visible{opacity:1}#screen-loading-stub{width:100%;height:100%;display:none;background:#fff;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}#play-button{display:none;position:absolute;top:50%;right:0;background-color:transparent;color:transparent;outline:0;border:none}@media (orientation:landscape){.desktopWrapper.arWrapper canvas,.desktopWrapper.arWrapper video{height:100%;width:auto}.desktopWrapper.arWrapper #debug{color:#000}.desktopWrapper.arWrapper #debug>*{border-color:#000}}</style><script defer="defer" src="./core.js?2eb1eaae85a5c2674917"></script></head><body><div id="wrapper" class="wrapper"><div id="screen-loading-stub"></div><button id="play-button">play</button><div id="canvases-wrapper"><video autoplay muted playsinline id="video" aria-hidden="true"></video><div id="background-canvases"><canvas></canvas><canvas></canvas><canvas></canvas></div><canvas id="three-canvas"></canvas><div id="debug-overlay"></div></div><div id="debug-canvases"></div><div id="debug"></div><div id="interactions-layer"></div></div></body></html>
|
package/package.json
CHANGED
package/CHANGELOG.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
## 3.2.0 (July 2024)
|
|
2
|
-
- High boots VTO
|
|
3
|
-
|
|
4
|
-
## 3.1.0 (July 2024)
|
|
5
|
-
- Scarfs VTO
|
|
6
|
-
- 3D Viewer Improvements
|
|
7
|
-
- Feature-based browser support
|
|
8
|
-
|
|
9
|
-
## 3.0.0 (Mar 2024)
|
|
10
|
-
- Bags Virtual Try-on
|
|
11
|
-
- 3D Viewer UI/UX update
|
|
12
|
-
- Improved gems support
|
|
13
|
-
|
|
14
|
-
## 2.8.0 (Feb 2024)
|
|
15
|
-
- Wrist Measurement Tool UX/UI enhancements
|
|
16
|
-
- Improved image quality
|
|
17
|
-
- Fixed two sneakers on one foot
|
|
18
|
-
|
|
19
|
-
## 2.7.4 (Dec 2023)
|
|
20
|
-
- Bug fixes and improvements
|
|
21
|
-
|
|
22
|
-
## 2.7.3 (Nov 2023)
|
|
23
|
-
- 3D Viewer fixes and improvements
|
|
24
|
-
|
|
25
|
-
## 2.7.2 (Nov 2023)
|
|
26
|
-
|
|
27
|
-
- Support Naver and Google App browsers
|
|
28
|
-
- Bug fixes
|
|
29
|
-
|
|
30
|
-
## 2.7.1 (Oct 2023)
|
|
31
|
-
|
|
32
|
-
- 3D Viewer fixes and improvements
|
|
33
|
-
- iOS 17 camera fixes
|
|
34
|
-
|
|
35
|
-
## 2.7.0 (Sept 2023)
|
|
36
|
-
|
|
37
|
-
- Rendering improvements
|
|
38
|
-
- Better Gems & Transparency Support
|
|
39
|
-
- 3D Viewer For Everything Release
|
|
40
|
-
- Performance improvements for Android devices
|
|
41
|
-
|
|
42
|
-
## 2.6.1 (Oct 2023)
|
|
43
|
-
|
|
44
|
-
- Iframe integration fixes
|
|
45
|
-
|
|
46
|
-
## 2.6.0 (June 2023)
|
|
47
|
-
|
|
48
|
-
- Rendering improvements
|
|
49
|
-
- Cold start time optimization
|
|
50
|
-
- Customizable watermark on a photo
|
|
51
|
-
|
|
52
|
-
## 2.5.0 (March 2023)
|
|
53
|
-
|
|
54
|
-
- Supported browsers update
|
|
55
|
-
- Android WebView code sample
|
|
56
|
-
- Technical improvements and bug fixes
|
|
57
|
-
|
|
58
|
-
## 2.4.0 (December 2022)
|
|
59
|
-
|
|
60
|
-
- Add Wrist measure tool for watches
|
|
61
|
-
- Fix cameras behavior in 3D Viewer
|
|
62
|
-
- Fix Safari 15.7 support
|
|
63
|
-
|
|
64
|
-
## 2.3.0 (September 2022)
|
|
65
|
-
|
|
66
|
-
- Footwear VTO quality improvements - more stable segmentation to avoid edges flickering
|
|
67
|
-
- Start time speed up for 3D Viewer for Handbags
|
|
68
|
-
- New rendering engine for better VTO realism - will be used for specific cases only
|
|
69
|
-
|
|
70
|
-
## 2.2.15 (August 2022)
|
|
71
|
-
|
|
72
|
-
- Fix model center detection in 3D Viewer
|
|
73
|
-
|
|
74
|
-
## 2.2.11 (July 2022)
|
|
75
|
-
|
|
76
|
-
- Fix iframe camera policy
|