/* Human library homepage: author: ' */ var iA=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var be=Object.prototype.hasOwnProperty;var aA=(A,e)=>{for(var t in e)iA(A,t,{get:e[t],enumerable:!0})},p=(A,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of pe(e))!be.call(A,o)&&o!=="default"&&iA(A,o,{get:()=>e[o],enumerable:!(t=ue(e,o))||t.enumerable});return A};var xA=(A,e,t)=>{if(!e.has(A))throw TypeError("Cannot "+t)};var C=(A,e,t)=>(xA(A,e,"read from private field"),t?t.call(A):e.get(A)),K=(A,e,t)=>{if(e.has(A))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(A):e.set(A,t)},_=(A,e,t,o)=>(xA(A,e,"write to private field"),o?o.call(A,t):e.set(A,t),t);function L(A,e){let t=A.endsWith("/")?"":"/",n=e.startsWith(".")||e.startsWith("/")||e.startsWith("http:")||e.startsWith("https:")||e.startsWith("file:")?`${e}`:`${A}${t}${e}`;if(!n.toLocaleLowerCase().includes(".json"))throw new Error(`Human: ModelPath Error: ${n} Expecting JSON file`);return n}function g(...A){let e=new Date,t=`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}.${e.getMilliseconds().toString().padStart(3,"0")}`;A&&console.log(t,"Human:",...A)}var I=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function U(...A){let e=t=>t&&typeof t=="object";return A.reduce((t,o)=>(Object.keys(o||{}).forEach(n=>{let x=t[n],a=o[n];Array.isArray(x)&&Array.isArray(a)?t[n]=x.concat(...a):e(x)&&e(a)?t[n]=U(x,a):t[n]=a}),t),{})}var yA={backend:"webgl",modelBasePath:"../models/",wasmPath:"../node_modules/@tensorflow/tfjs-backend-wasm/dist/",debug:!0,async:!0,warmup:"full",cacheSensitivity:.75,skipFrame:!1,filter:{enabled:!0,width:0,height:0,flip:!1,return:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:15,skipFrames:15,minConfidence:.2,iouThreshold:.1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json"},iris:{enabled:!0,modelPath:"iris.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:11,minConfidence:.1},emotion:{enabled:!0,minConfidence:.1,skipFrames:17,modelPath:"emotion.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:1,minConfidence:.2,skipFrames:1},hand:{enabled:!0,rotation:!0,skipFrames:18,minConfidence:.1,iouThreshold:.1,maxDetected:2,landmarks:!0,detector:{modelPath:"handdetect.json"},skeleton:{modelPath:"handskeleton.json"}},object:{enabled:!1,modelPath:"mb3-centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:19},segmentation:{enabled:!1,modelPath:"selfie.json"}};function lA(){let A,e;if(typeof navigator!="undefined"){let t=navigator.userAgent.match(/\(([^()]+)\)/g);if(t&&t[0]){let o=t[0].match(/\(([^()]+)\)/g);A=o?o[0].replace(/\(|\)/g,""):"",e=navigator.userAgent.replace(t[0],""),A[1]&&(e=e.replace(t[1],"")),e=e.replace(/ /g," ")}}else typeof process!="undefined"&&(A=`${process.platform} ${process.arch}`,e=`NodeJS ${process.version}`);return{platform:A,agent:e}}var s={};aA(s,{data:()=>Pe,version:()=>ve});p(s,c2);p(s,d2);p(s,f2);p(s,m2);p(s,h2);p(s,u2);import*as cA from"@tensorflow/tfjs/package.json";import*as dA from"@tensorflow/tfjs-core/package.json";import*as fA from"@tensorflow/tfjs-data/package.json";import*as mA from"@tensorflow/tfjs-layers/package.json";import*as hA from"@tensorflow/tfjs-converter/package.json";import{version_cpu as ge}from"@tensorflow/tfjs-backend-cpu/dist/index.js";import{version_webgl as Me}from"@tensorflow/tfjs-backend-webgl/dist/index.js";import{version_wasm as Te}from"@tensorflow/tfjs-backend-wasm/dist/index.js";import*as c2 from"@tensorflow/tfjs-core/dist/index.js";import*as d2 from"@tensorflow/tfjs-layers/dist/index.js";import*as f2 from"@tensorflow/tfjs-converter/dist/index.js";import*as Pe from"@tensorflow/tfjs-data/dist/index.js";import*as m2 from"@tensorflow/tfjs-backend-cpu/dist/index.js";import*as h2 from"@tensorflow/tfjs-backend-webgl/dist/index.js";import*as u2 from"@tensorflow/tfjs-backend-wasm/dist/index.js";var ve={tfjs:(cA==null?void 0:cA.version)||void 0,"tfjs-core":(dA==null?void 0:dA.version)||void 0,"tfjs-data":(fA==null?void 0:fA.version)||void 0,"tfjs-layers":(mA==null?void 0:mA.version)||void 0,"tfjs-converter":(hA==null?void 0:hA.version)||void 0,"tfjs-backend-cpu":ge||void 0,"tfjs-backend-webgl":Me||void 0,"tfjs-backend-wasm":Te||void 0};var J={name:"humangl",priority:99,canvas:null,gl:null,width:1024,height:1024,webGLattr:{alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!1,desynchronized:!0}};function uA(){if(!s.findBackend(J.name)){g("backend registration:",J.name);try{J.canvas=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(J.width,J.height):document.createElement("canvas")}catch(A){g("error: cannot create canvas:",A);return}try{J.gl=J.canvas.getContext("webgl2",J.webGLattr)}catch(A){g("error: cannot get WebGL2 context:",A);return}try{s.setWebGLContext(2,J.gl)}catch(A){g("error: cannot set WebGL2 context:",A);return}try{let A=new s.GPGPUContext(J.gl);s.registerBackend(J.name,()=>new s.MathBackendWebGL(A),J.priority)}catch(A){g("error: cannot register WebGL backend:",A);return}try{s.getKernelsForBackend("webgl").forEach(e=>{let t={...e,backendName:J.name};s.registerKernel(t)})}catch(A){g("error: cannot update WebGL backend registration:",A);return}try{s.ENV.set("WEBGL_VERSION",2)}catch(A){g("error: cannot set WebGL backend flags:",A);return}g("backend registered:",J.name)}}function pA(A,e){let t=[A.startPoint[0]*e[0],A.startPoint[1]*e[1]],o=[A.endPoint[0]*e[0],A.endPoint[1]*e[1]];return{startPoint:t,endPoint:o}}function E0(A){return[Math.abs(A.endPoint[0]-A.startPoint[0]),Math.abs(A.endPoint[1]-A.startPoint[1])]}function m0(A){return[A.startPoint[0]+(A.endPoint[0]-A.startPoint[0])/2,A.startPoint[1]+(A.endPoint[1]-A.startPoint[1])/2]}function h0(A,e,t){let o=e.shape[1],n=e.shape[2],x=[[A.startPoint[1]/o,A.startPoint[0]/n,A.endPoint[1]/o,A.endPoint[0]/n]];return s.image.cropAndResize(e,x,[0],t)}function L0(A,e=1.5){let t=m0(A),o=E0(A),n=[e*o[0]/2,e*o[1]/2],x=[t[0]-n[0],t[1]-n[1]],a=[t[0]+n[0],t[1]+n[1]];return{startPoint:x,endPoint:a,landmarks:A.landmarks}}function H0(A){let e=m0(A),t=E0(A),n=Math.max(...t)/2,x=[Math.round(e[0]-n),Math.round(e[1]-n)],a=[Math.round(e[0]+n),Math.round(e[1]+n)];return{startPoint:x,endPoint:a,landmarks:A.landmarks}}function a5(A){let e=A.map(x=>x[0]),t=A.map(x=>x[1]),o=[Math.min(...e),Math.min(...t)],n=[Math.max(...e),Math.max(...t)];return{startPoint:o,endPoint:n,landmarks:A}}var bA=A=>({startPoint:s.slice(A,[0,0],[-1,2]),endPoint:s.slice(A,[0,2],[-1,2])});var Z0=[[1,0,0],[0,1,0],[0,0,1]];function ze(A){return A-2*Math.PI*Math.floor((A+Math.PI)/(2*Math.PI))}function x5(A,e){let t=Math.PI/2-Math.atan2(-(e[1]-A[1]),e[0]-A[0]);return ze(t)}function gA(A,e){return[[1,0,A],[0,1,e],[0,0,1]]}function r0(A,e){let t=0;for(let o=0;o{let i=s.image.resizeBilinear(e,[this.inputSize,this.inputSize]).div(127.5).sub(.5),c=this.model.execute(i),l;if(Array.isArray(c)){let d=c.sort((R,W)=>R.size-W.size),m=s.concat([d[0],d[2]],2),z=s.concat([d[1],d[3]],2);l=s.concat([z,m],1).squeeze(0)}else l=s.squeeze(c);let f=Re(l,this.anchors,[this.inputSize,this.inputSize]),h=s.slice(l,[0,0],[-1,1]),E=s.sigmoid(h).squeeze().dataSync();return[l,f,E]}),x=await s.image.nonMaxSuppressionAsync(o,n,this.config.face.detector.maxDetected,this.config.face.detector.iouThreshold,this.config.face.detector.minConfidence),a=x.arraySync();x.dispose();let r=[];for(let y=0;ythis.config.face.detector.minConfidence){let c=s.slice(o,[a[y],0],[1,-1]),l=bA(c);c.dispose();let f=this.anchorsData[a[y]],h=s.tidy(()=>s.slice(t,[a[y],zA-1],[1,-1]).squeeze().reshape([zA,-1]));r.push({box:l,landmarks:h,anchor:f,confidence:i})}}return t.dispose(),o.dispose(),{boxes:r,scaleFactor:[e.shape[2]/this.inputSize,e.shape[1]/this.inputSize]}}};async function RA(A){let e=await s.loadGraphModel(L(A.modelBasePath,A.face.detector.modelPath),{fromTFHub:A.face.detector.modelPath.includes("tfhub.dev")}),t=new EA(e,A);return!e||!e.modelUrl?g("load model failed:",A.face.detector.modelPath):A.debug&&g("load model:",e.modelUrl),t}var t0={silhouette:[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109],lipsUpperOuter:[61,185,40,39,37,0,267,269,270,409,291],lipsLowerOuter:[146,91,181,84,17,314,405,321,375,291],lipsUpperInner:[78,191,80,81,82,13,312,311,310,415,308],lipsLowerInner:[78,95,88,178,87,14,317,402,318,324,308],rightEyeUpper0:[246,161,160,159,158,157,173],rightEyeLower0:[33,7,163,144,145,153,154,155,133],rightEyeUpper1:[247,30,29,27,28,56,190],rightEyeLower1:[130,25,110,24,23,22,26,112,243],rightEyeUpper2:[113,225,224,223,222,221,189],rightEyeLower2:[226,31,228,229,230,231,232,233,244],rightEyeLower3:[143,111,117,118,119,120,121,128,245],rightEyebrowUpper:[156,70,63,105,66,107,55,193],rightEyebrowLower:[35,124,46,53,52,65],rightEyeIris:[473,474,475,476,477],leftEyeUpper0:[466,388,387,386,385,384,398],leftEyeLower0:[263,249,390,373,374,380,381,382,362],leftEyeUpper1:[467,260,259,257,258,286,414],leftEyeLower1:[359,255,339,254,253,252,256,341,463],leftEyeUpper2:[342,445,444,443,442,441,413],leftEyeLower2:[446,261,448,449,450,451,452,453,464],leftEyeLower3:[372,340,346,347,348,349,350,357,465],leftEyebrowUpper:[383,300,293,334,296,336,285,417],leftEyebrowLower:[265,353,276,283,282,295],leftEyeIris:[468,469,470,471,472],midwayBetweenEyes:[168],noseTip:[1],noseBottom:[2],noseRightCorner:[98],noseLeftCorner:[327],rightCheek:[205],leftCheek:[425]},y5=[{key:"EyeUpper0",indices:[9,10,11,12,13,14,15]},{key:"EyeUpper1",indices:[25,26,27,28,29,30,31]},{key:"EyeUpper2",indices:[41,42,43,44,45,46,47]},{key:"EyeLower0",indices:[0,1,2,3,4,5,6,7,8]},{key:"EyeLower1",indices:[16,17,18,19,20,21,22,23,24]},{key:"EyeLower2",indices:[32,33,34,35,36,37,38,39,40]},{key:"EyeLower3",indices:[54,55,56,57,58,59,60,61,62]}],R0=[[.499976992607117,.652534008026123],[.500025987625122,.547487020492554],[.499974012374878,.602371990680695],[.482113003730774,.471979022026062],[.500150978565216,.527155995368958],[.499909996986389,.498252987861633],[.499523013830185,.40106201171875],[.289712011814117,.380764007568359],[.499954998493195,.312398016452789],[.499987006187439,.269918978214264],[.500023007392883,.107050001621246],[.500023007392883,.666234016418457],[.5000159740448,.679224014282227],[.500023007392883,.692348003387451],[.499976992607117,.695277988910675],[.499976992607117,.70593398809433],[.499976992607117,.719385027885437],[.499976992607117,.737019002437592],[.499967992305756,.781370997428894],[.499816000461578,.562981009483337],[.473773002624512,.573909997940063],[.104906998574734,.254140973091125],[.365929991006851,.409575998783112],[.338757991790771,.41302502155304],[.311120003461838,.409460008144379],[.274657994508743,.389131009578705],[.393361985683441,.403706014156342],[.345234006643295,.344011008739471],[.370094001293182,.346076011657715],[.319321990013123,.347265005111694],[.297903001308441,.353591024875641],[.24779200553894,.410809993743896],[.396889001131058,.842755019664764],[.280097991228104,.375599980354309],[.106310002505779,.399955987930298],[.2099249958992,.391353011131287],[.355807989835739,.534406006336212],[.471751004457474,.65040397644043],[.474155008792877,.680191993713379],[.439785003662109,.657229006290436],[.414617002010345,.66654098033905],[.450374007225037,.680860996246338],[.428770989179611,.682690978050232],[.374971002340317,.727805018424988],[.486716985702515,.547628998756409],[.485300987958908,.527395009994507],[.257764995098114,.314490020275116],[.401223003864288,.455172002315521],[.429818987846375,.548614978790283],[.421351999044418,.533740997314453],[.276895999908447,.532056987285614],[.483370006084442,.499586999416351],[.33721199631691,.282882988452911],[.296391993761063,.293242990970612],[.169294998049736,.193813979625702],[.447580009698868,.302609980106354],[.392390012741089,.353887975215912],[.354490011930466,.696784019470215],[.067304998636246,.730105042457581],[.442739009857178,.572826027870178],[.457098007202148,.584792017936707],[.381974011659622,.694710969924927],[.392388999462128,.694203019142151],[.277076005935669,.271932005882263],[.422551989555359,.563233017921448],[.385919004678726,.281364023685455],[.383103013038635,.255840003490448],[.331431001424789,.119714021682739],[.229923993349075,.232002973556519],[.364500999450684,.189113974571228],[.229622006416321,.299540996551514],[.173287004232407,.278747975826263],[.472878992557526,.666198015213013],[.446828007698059,.668527007102966],[.422762006521225,.673889994621277],[.445307999849319,.580065965652466],[.388103008270264,.693961024284363],[.403039008378983,.706539988517761],[.403629004955292,.693953037261963],[.460041999816895,.557139039039612],[.431158006191254,.692366003990173],[.452181994915009,.692366003990173],[.475387006998062,.692366003990173],[.465828001499176,.779190003871918],[.472328990697861,.736225962638855],[.473087012767792,.717857003211975],[.473122000694275,.704625964164734],[.473033010959625,.695277988910675],[.427942007780075,.695277988910675],[.426479011774063,.703539967536926],[.423162013292313,.711845993995667],[.4183090031147,.720062971115112],[.390094995498657,.639572978019714],[.013953999616206,.560034036636353],[.499913990497589,.58014702796936],[.413199990987778,.69539999961853],[.409626007080078,.701822996139526],[.468080013990402,.601534962654114],[.422728985548019,.585985004901886],[.463079988956451,.593783974647522],[.37211999297142,.47341400384903],[.334562003612518,.496073007583618],[.411671012639999,.546965003013611],[.242175996303558,.14767599105835],[.290776997804642,.201445996761322],[.327338010072708,.256527006626129],[.399509996175766,.748921036720276],[.441727995872498,.261676013469696],[.429764986038208,.187834024429321],[.412198007106781,.108901023864746],[.288955003023148,.398952007293701],[.218936994671822,.435410976409912],[.41278201341629,.398970007896423],[.257135003805161,.355440020561218],[.427684992551804,.437960982322693],[.448339998722076,.536936044692993],[.178560003638268,.45755398273468],[.247308000922203,.457193970680237],[.286267012357712,.467674970626831],[.332827985286713,.460712015628815],[.368755996227264,.447206974029541],[.398963987827301,.432654976844788],[.476410001516342,.405806005001068],[.189241006970406,.523923993110657],[.228962004184723,.348950982093811],[.490725994110107,.562400996685028],[.404670000076294,.485132992267609],[.019469000399113,.401564002037048],[.426243007183075,.420431017875671],[.396993011236191,.548797011375427],[.266469985246658,.376977026462555],[.439121007919312,.51895797252655],[.032313998788595,.644356966018677],[.419054001569748,.387154996395111],[.462783008813858,.505746960639954],[.238978996872902,.779744982719421],[.198220998048782,.831938028335571],[.107550002634525,.540755033493042],[.183610007166862,.740257024765015],[.134409993886948,.333683013916016],[.385764002799988,.883153975009918],[.490967005491257,.579378008842468],[.382384985685349,.508572995662689],[.174399003386497,.397670984268188],[.318785011768341,.39623498916626],[.343364000320435,.400596976280212],[.396100014448166,.710216999053955],[.187885001301765,.588537991046906],[.430987000465393,.944064974784851],[.318993002176285,.898285031318665],[.266247987747192,.869701027870178],[.500023007392883,.190576016902924],[.499976992607117,.954452991485596],[.366169989109039,.398822009563446],[.393207013607025,.39553701877594],[.410373002290726,.391080021858215],[.194993004202843,.342101991176605],[.388664990663528,.362284004688263],[.365961998701096,.355970978736877],[.343364000320435,.355356991291046],[.318785011768341,.35834002494812],[.301414996385574,.363156020641327],[.058132998645306,.319076001644135],[.301414996385574,.387449026107788],[.499987989664078,.618434011936188],[.415838003158569,.624195992946625],[.445681989192963,.566076993942261],[.465844005346298,.620640993118286],[.49992299079895,.351523995399475],[.288718998432159,.819945991039276],[.335278987884521,.852819979190826],[.440512001514435,.902418971061707],[.128294005990028,.791940987110138],[.408771991729736,.373893976211548],[.455606997013092,.451801002025604],[.499877005815506,.908990025520325],[.375436991453171,.924192011356354],[.11421000212431,.615022003650665],[.448662012815475,.695277988910675],[.4480200111866,.704632043838501],[.447111994028091,.715808033943176],[.444831997156143,.730794012546539],[.430011987686157,.766808986663818],[.406787008047104,.685672998428345],[.400738000869751,.681069016456604],[.392399996519089,.677703022956848],[.367855995893478,.663918972015381],[.247923001646996,.601333022117615],[.452769994735718,.420849978923798],[.43639200925827,.359887003898621],[.416164010763168,.368713974952698],[.413385987281799,.692366003990173],[.228018000721931,.683571994304657],[.468268007040024,.352671027183533],[.411361992359161,.804327011108398],[.499989002943039,.469825029373169],[.479153990745544,.442654013633728],[.499974012374878,.439637005329132],[.432112008333206,.493588984012604],[.499886006116867,.866917014122009],[.49991300702095,.821729004383087],[.456548988819122,.819200992584229],[.344549000263214,.745438992977142],[.37890899181366,.574010014533997],[.374292999505997,.780184984207153],[.319687992334366,.570737957954407],[.357154995203018,.604269981384277],[.295284003019333,.621580958366394],[.447750002145767,.862477004528046],[.410986006259918,.508723020553589],[.31395098567009,.775308012962341],[.354128003120422,.812552988529205],[.324548006057739,.703992962837219],[.189096003770828,.646299958229065],[.279776990413666,.71465802192688],[.1338230073452,.682700991630554],[.336768001317978,.644733011722565],[.429883986711502,.466521978378296],[.455527991056442,.548622965812683],[.437114000320435,.558896005153656],[.467287987470627,.529924988746643],[.414712011814117,.335219979286194],[.37704598903656,.322777986526489],[.344107985496521,.320150971412659],[.312875986099243,.32233202457428],[.283526003360748,.333190023899078],[.241245999932289,.382785975933075],[.102986000478268,.468762993812561],[.267612010240555,.424560010433197],[.297879010438919,.433175981044769],[.333433985710144,.433878004550934],[.366427004337311,.426115989685059],[.396012008190155,.416696012020111],[.420121014118195,.41022801399231],[.007561000064015,.480777025222778],[.432949006557465,.569517970085144],[.458638995885849,.479089021682739],[.473466008901596,.545744001865387],[.476087987422943,.563830018043518],[.468472003936768,.555056989192963],[.433990985155106,.582361996173859],[.483518004417419,.562983989715576],[.482482999563217,.57784903049469],[.42645001411438,.389798998832703],[.438998997211456,.39649498462677],[.450067013502121,.400434017181396],[.289712011814117,.368252992630005],[.276670008897781,.363372981548309],[.517862021923065,.471948027610779],[.710287988185883,.380764007568359],[.526226997375488,.573909997940063],[.895093023777008,.254140973091125],[.634069979190826,.409575998783112],[.661242008209229,.41302502155304],[.688880026340485,.409460008144379],[.725341975688934,.389131009578705],[.606630027294159,.40370500087738],[.654766023159027,.344011008739471],[.629905998706818,.346076011657715],[.680678009986877,.347265005111694],[.702096998691559,.353591024875641],[.75221198797226,.410804986953735],[.602918028831482,.842862963676453],[.719901978969574,.375599980354309],[.893692970275879,.399959981441498],[.790081977844238,.391354024410248],[.643998026847839,.534487962722778],[.528249025344849,.65040397644043],[.525849997997284,.680191040039062],[.560214996337891,.657229006290436],[.585384011268616,.66654098033905],[.549625992774963,.680860996246338],[.57122802734375,.682691991329193],[.624852001667023,.72809898853302],[.513050019741058,.547281980514526],[.51509702205658,.527251958847046],[.742246985435486,.314507007598877],[.598631024360657,.454979002475739],[.570338010787964,.548575043678284],[.578631997108459,.533622980117798],[.723087012767792,.532054007053375],[.516445994377136,.499638974666595],[.662801027297974,.282917976379395],[.70362401008606,.293271005153656],[.830704987049103,.193813979625702],[.552385985851288,.302568018436432],[.607609987258911,.353887975215912],[.645429015159607,.696707010269165],[.932694971561432,.730105042457581],[.557260990142822,.572826027870178],[.542901992797852,.584792017936707],[.6180260181427,.694710969924927],[.607590973377228,.694203019142151],[.722943007946014,.271963000297546],[.577413976192474,.563166975975037],[.614082992076874,.281386971473694],[.616907000541687,.255886018276215],[.668509006500244,.119913995265961],[.770092010498047,.232020974159241],[.635536015033722,.189248979091644],[.77039098739624,.299556016921997],[.826722025871277,.278755009174347],[.527121007442474,.666198015213013],[.553171992301941,.668527007102966],[.577238023281097,.673889994621277],[.554691970348358,.580065965652466],[.611896991729736,.693961024284363],[.59696102142334,.706539988517761],[.596370995044708,.693953037261963],[.539958000183105,.557139039039612],[.568841993808746,.692366003990173],[.547818005084991,.692366003990173],[.52461302280426,.692366003990173],[.534089982509613,.779141008853912],[.527670979499817,.736225962638855],[.526912987232208,.717857003211975],[.526877999305725,.704625964164734],[.526966989040375,.695277988910675],[.572058022022247,.695277988910675],[.573521018028259,.703539967536926],[.57683801651001,.711845993995667],[.581691026687622,.720062971115112],[.609944999217987,.639909982681274],[.986046016216278,.560034036636353],[.5867999792099,.69539999961853],[.590372025966644,.701822996139526],[.531915009021759,.601536989212036],[.577268004417419,.585934996604919],[.536915004253387,.593786001205444],[.627542972564697,.473352015018463],[.665585994720459,.495950996875763],[.588353991508484,.546862006187439],[.757824003696442,.14767599105835],[.709249973297119,.201507985591888],[.672684013843536,.256581008434296],[.600408971309662,.74900496006012],[.55826598405838,.261672019958496],[.570303976535797,.187870979309082],[.588165998458862,.109044015407562],[.711045026779175,.398952007293701],[.781069993972778,.435405015945435],[.587247014045715,.398931980133057],[.742869973182678,.355445981025696],[.572156012058258,.437651991844177],[.55186802148819,.536570012569427],[.821442008018494,.457556009292603],[.752701997756958,.457181990146637],[.71375697851181,.467626988887787],[.66711300611496,.460672974586487],[.631101012229919,.447153985500336],[.6008620262146,.432473003864288],[.523481011390686,.405627012252808],[.810747981071472,.523926019668579],[.771045982837677,.348959028720856],[.509127020835876,.562718033790588],[.595292985439301,.485023975372314],[.980530977249146,.401564002037048],[.573499977588654,.420000016689301],[.602994978427887,.548687994480133],[.733529984951019,.376977026462555],[.560611009597778,.519016981124878],[.967685997486115,.644356966018677],[.580985009670258,.387160003185272],[.537728011608124,.505385041236877],[.760966002941132,.779752969741821],[.801778972148895,.831938028335571],[.892440974712372,.54076099395752],[.816350996494293,.740260004997253],[.865594983100891,.333687007427216],[.614073991775513,.883246004581451],[.508952975273132,.579437971115112],[.617941975593567,.508316040039062],[.825608015060425,.397674977779388],[.681214988231659,.39623498916626],[.656635999679565,.400596976280212],[.603900015354156,.710216999053955],[.81208598613739,.588539004325867],[.56801301240921,.944564998149872],[.681007981300354,.898285031318665],[.733752012252808,.869701027870178],[.633830010890961,.398822009563446],[.606792986392975,.39553701877594],[.589659988880157,.391062021255493],[.805015981197357,.342108011245728],[.611334979534149,.362284004688263],[.634037971496582,.355970978736877],[.656635999679565,.355356991291046],[.681214988231659,.35834002494812],[.698584973812103,.363156020641327],[.941866993904114,.319076001644135],[.698584973812103,.387449026107788],[.584177017211914,.624107003211975],[.554318010807037,.566076993942261],[.534153997898102,.62064003944397],[.711217999458313,.819975018501282],[.664629995822906,.852871000766754],[.559099972248077,.902631998062134],[.871706008911133,.791940987110138],[.591234028339386,.373893976211548],[.544341027736664,.451583981513977],[.624562978744507,.924192011356354],[.88577002286911,.615028977394104],[.551338016986847,.695277988910675],[.551980018615723,.704632043838501],[.552887976169586,.715808033943176],[.555167973041534,.730794012546539],[.569944024085999,.767035007476807],[.593203008174896,.685675978660583],[.599261999130249,.681069016456604],[.607599973678589,.677703022956848],[.631937980651855,.663500010967255],[.752032995223999,.601315021514893],[.547226011753082,.420395016670227],[.563543975353241,.359827995300293],[.583841025829315,.368713974952698],[.586614012718201,.692366003990173],[.771915018558502,.683578014373779],[.531597018241882,.352482974529266],[.588370978832245,.804440975189209],[.52079701423645,.442565023899078],[.567984998226166,.493479013442993],[.543282985687256,.819254994392395],[.655317008495331,.745514988899231],[.621008992195129,.574018001556396],[.625559985637665,.78031200170517],[.680198013782501,.570719003677368],[.64276397228241,.604337990283966],[.704662978649139,.621529996395111],[.552012026309967,.862591981887817],[.589071989059448,.508637011051178],[.685944974422455,.775357007980347],[.645735025405884,.812640011310577],[.675342977046967,.703978002071381],[.810858011245728,.646304965019226],[.72012197971344,.714666962623596],[.866151988506317,.682704985141754],[.663187026977539,.644596993923187],[.570082008838654,.466325998306274],[.544561982154846,.548375964164734],[.562758982181549,.558784961700439],[.531987011432648,.530140042304993],[.585271000862122,.335177004337311],[.622952997684479,.32277899980545],[.655896008014679,.320163011550903],[.687132000923157,.322345972061157],[.716481983661652,.333200991153717],[.758756995201111,.382786989212036],[.897013008594513,.468769013881683],[.732392013072968,.424547016620636],[.70211398601532,.433162987232208],[.66652500629425,.433866024017334],[.633504986763,.426087975502014],[.603875994682312,.416586995124817],[.579657971858978,.409945011138916],[.992439985275269,.480777025222778],[.567192018032074,.569419980049133],[.54136598110199,.478899002075195],[.526564002037048,.546118021011353],[.523913025856018,.563830018043518],[.531529009342194,.555056989192963],[.566035985946655,.582329034805298],[.51631098985672,.563053965568542],[.5174720287323,.577877044677734],[.573594987392426,.389806985855103],[.560697972774506,.395331978797913],[.549755990505219,.399751007556915],[.710287988185883,.368252992630005],[.723330020904541,.363372981548309]],l0=[127,34,139,11,0,37,232,231,120,72,37,39,128,121,47,232,121,128,104,69,67,175,171,148,157,154,155,118,50,101,73,39,40,9,151,108,48,115,131,194,204,211,74,40,185,80,42,183,40,92,186,230,229,118,202,212,214,83,18,17,76,61,146,160,29,30,56,157,173,106,204,194,135,214,192,203,165,98,21,71,68,51,45,4,144,24,23,77,146,91,205,50,187,201,200,18,91,106,182,90,91,181,85,84,17,206,203,36,148,171,140,92,40,39,193,189,244,159,158,28,247,246,161,236,3,196,54,68,104,193,168,8,117,228,31,189,193,55,98,97,99,126,47,100,166,79,218,155,154,26,209,49,131,135,136,150,47,126,217,223,52,53,45,51,134,211,170,140,67,69,108,43,106,91,230,119,120,226,130,247,63,53,52,238,20,242,46,70,156,78,62,96,46,53,63,143,34,227,173,155,133,123,117,111,44,125,19,236,134,51,216,206,205,154,153,22,39,37,167,200,201,208,36,142,100,57,212,202,20,60,99,28,158,157,35,226,113,160,159,27,204,202,210,113,225,46,43,202,204,62,76,77,137,123,116,41,38,72,203,129,142,64,98,240,49,102,64,41,73,74,212,216,207,42,74,184,169,170,211,170,149,176,105,66,69,122,6,168,123,147,187,96,77,90,65,55,107,89,90,180,101,100,120,63,105,104,93,137,227,15,86,85,129,102,49,14,87,86,55,8,9,100,47,121,145,23,22,88,89,179,6,122,196,88,95,96,138,172,136,215,58,172,115,48,219,42,80,81,195,3,51,43,146,61,171,175,199,81,82,38,53,46,225,144,163,110,246,33,7,52,65,66,229,228,117,34,127,234,107,108,69,109,108,151,48,64,235,62,78,191,129,209,126,111,35,143,163,161,246,117,123,50,222,65,52,19,125,141,221,55,65,3,195,197,25,7,33,220,237,44,70,71,139,122,193,245,247,130,33,71,21,162,153,158,159,170,169,150,188,174,196,216,186,92,144,160,161,2,97,167,141,125,241,164,167,37,72,38,12,145,159,160,38,82,13,63,68,71,226,35,111,158,153,154,101,50,205,206,92,165,209,198,217,165,167,97,220,115,218,133,112,243,239,238,241,214,135,169,190,173,133,171,208,32,125,44,237,86,87,178,85,86,179,84,85,180,83,84,181,201,83,182,137,93,132,76,62,183,61,76,184,57,61,185,212,57,186,214,207,187,34,143,156,79,239,237,123,137,177,44,1,4,201,194,32,64,102,129,213,215,138,59,166,219,242,99,97,2,94,141,75,59,235,24,110,228,25,130,226,23,24,229,22,23,230,26,22,231,112,26,232,189,190,243,221,56,190,28,56,221,27,28,222,29,27,223,30,29,224,247,30,225,238,79,20,166,59,75,60,75,240,147,177,215,20,79,166,187,147,213,112,233,244,233,128,245,128,114,188,114,217,174,131,115,220,217,198,236,198,131,134,177,132,58,143,35,124,110,163,7,228,110,25,356,389,368,11,302,267,452,350,349,302,303,269,357,343,277,452,453,357,333,332,297,175,152,377,384,398,382,347,348,330,303,304,270,9,336,337,278,279,360,418,262,431,304,408,409,310,415,407,270,409,410,450,348,347,422,430,434,313,314,17,306,307,375,387,388,260,286,414,398,335,406,418,364,367,416,423,358,327,251,284,298,281,5,4,373,374,253,307,320,321,425,427,411,421,313,18,321,405,406,320,404,405,315,16,17,426,425,266,377,400,369,322,391,269,417,465,464,386,257,258,466,260,388,456,399,419,284,332,333,417,285,8,346,340,261,413,441,285,327,460,328,355,371,329,392,439,438,382,341,256,429,420,360,364,394,379,277,343,437,443,444,283,275,440,363,431,262,369,297,338,337,273,375,321,450,451,349,446,342,467,293,334,282,458,461,462,276,353,383,308,324,325,276,300,293,372,345,447,382,398,362,352,345,340,274,1,19,456,248,281,436,427,425,381,256,252,269,391,393,200,199,428,266,330,329,287,273,422,250,462,328,258,286,384,265,353,342,387,259,257,424,431,430,342,353,276,273,335,424,292,325,307,366,447,345,271,303,302,423,266,371,294,455,460,279,278,294,271,272,304,432,434,427,272,407,408,394,430,431,395,369,400,334,333,299,351,417,168,352,280,411,325,319,320,295,296,336,319,403,404,330,348,349,293,298,333,323,454,447,15,16,315,358,429,279,14,15,316,285,336,9,329,349,350,374,380,252,318,402,403,6,197,419,318,319,325,367,364,365,435,367,397,344,438,439,272,271,311,195,5,281,273,287,291,396,428,199,311,271,268,283,444,445,373,254,339,263,466,249,282,334,296,449,347,346,264,447,454,336,296,299,338,10,151,278,439,455,292,407,415,358,371,355,340,345,372,390,249,466,346,347,280,442,443,282,19,94,370,441,442,295,248,419,197,263,255,359,440,275,274,300,383,368,351,412,465,263,467,466,301,368,389,380,374,386,395,378,379,412,351,419,436,426,322,373,390,388,2,164,393,370,462,461,164,0,267,302,11,12,374,373,387,268,12,13,293,300,301,446,261,340,385,384,381,330,266,425,426,423,391,429,355,437,391,327,326,440,457,438,341,382,362,459,457,461,434,430,394,414,463,362,396,369,262,354,461,457,316,403,402,315,404,403,314,405,404,313,406,405,421,418,406,366,401,361,306,408,407,291,409,408,287,410,409,432,436,410,434,416,411,264,368,383,309,438,457,352,376,401,274,275,4,421,428,262,294,327,358,433,416,367,289,455,439,462,370,326,2,326,370,305,460,455,254,449,448,255,261,446,253,450,449,252,451,450,256,452,451,341,453,452,413,464,463,441,413,414,258,442,441,257,443,442,259,444,443,260,445,444,467,342,445,459,458,250,289,392,290,290,328,460,376,433,435,250,290,392,411,416,433,341,463,464,453,464,465,357,465,412,343,412,399,360,363,440,437,399,456,420,456,363,401,435,288,372,383,353,339,255,249,448,261,255,133,243,190,133,155,112,33,246,247,33,130,25,398,384,286,362,398,414,362,463,341,263,359,467,263,249,255,466,467,260,75,60,166,238,239,79,162,127,139,72,11,37,121,232,120,73,72,39,114,128,47,233,232,128,103,104,67,152,175,148,173,157,155,119,118,101,74,73,40,107,9,108,49,48,131,32,194,211,184,74,185,191,80,183,185,40,186,119,230,118,210,202,214,84,83,17,77,76,146,161,160,30,190,56,173,182,106,194,138,135,192,129,203,98,54,21,68,5,51,4,145,144,23,90,77,91,207,205,187,83,201,18,181,91,182,180,90,181,16,85,17,205,206,36,176,148,140,165,92,39,245,193,244,27,159,28,30,247,161,174,236,196,103,54,104,55,193,8,111,117,31,221,189,55,240,98,99,142,126,100,219,166,218,112,155,26,198,209,131,169,135,150,114,47,217,224,223,53,220,45,134,32,211,140,109,67,108,146,43,91,231,230,120,113,226,247,105,63,52,241,238,242,124,46,156,95,78,96,70,46,63,116,143,227,116,123,111,1,44,19,3,236,51,207,216,205,26,154,22,165,39,167,199,200,208,101,36,100,43,57,202,242,20,99,56,28,157,124,35,113,29,160,27,211,204,210,124,113,46,106,43,204,96,62,77,227,137,116,73,41,72,36,203,142,235,64,240,48,49,64,42,41,74,214,212,207,183,42,184,210,169,211,140,170,176,104,105,69,193,122,168,50,123,187,89,96,90,66,65,107,179,89,180,119,101,120,68,63,104,234,93,227,16,15,85,209,129,49,15,14,86,107,55,9,120,100,121,153,145,22,178,88,179,197,6,196,89,88,96,135,138,136,138,215,172,218,115,219,41,42,81,5,195,51,57,43,61,208,171,199,41,81,38,224,53,225,24,144,110,105,52,66,118,229,117,227,34,234,66,107,69,10,109,151,219,48,235,183,62,191,142,129,126,116,111,143,7,163,246,118,117,50,223,222,52,94,19,141,222,221,65,196,3,197,45,220,44,156,70,139,188,122,245,139,71,162,145,153,159,149,170,150,122,188,196,206,216,92,163,144,161,164,2,167,242,141,241,0,164,37,11,72,12,144,145,160,12,38,13,70,63,71,31,226,111,157,158,154,36,101,205,203,206,165,126,209,217,98,165,97,237,220,218,237,239,241,210,214,169,140,171,32,241,125,237,179,86,178,180,85,179,181,84,180,182,83,181,194,201,182,177,137,132,184,76,183,185,61,184,186,57,185,216,212,186,192,214,187,139,34,156,218,79,237,147,123,177,45,44,4,208,201,32,98,64,129,192,213,138,235,59,219,141,242,97,97,2,141,240,75,235,229,24,228,31,25,226,230,23,229,231,22,230,232,26,231,233,112,232,244,189,243,189,221,190,222,28,221,223,27,222,224,29,223,225,30,224,113,247,225,99,60,240,213,147,215,60,20,166,192,187,213,243,112,244,244,233,245,245,128,188,188,114,174,134,131,220,174,217,236,236,198,134,215,177,58,156,143,124,25,110,7,31,228,25,264,356,368,0,11,267,451,452,349,267,302,269,350,357,277,350,452,357,299,333,297,396,175,377,381,384,382,280,347,330,269,303,270,151,9,337,344,278,360,424,418,431,270,304,409,272,310,407,322,270,410,449,450,347,432,422,434,18,313,17,291,306,375,259,387,260,424,335,418,434,364,416,391,423,327,301,251,298,275,281,4,254,373,253,375,307,321,280,425,411,200,421,18,335,321,406,321,320,405,314,315,17,423,426,266,396,377,369,270,322,269,413,417,464,385,386,258,248,456,419,298,284,333,168,417,8,448,346,261,417,413,285,326,327,328,277,355,329,309,392,438,381,382,256,279,429,360,365,364,379,355,277,437,282,443,283,281,275,363,395,431,369,299,297,337,335,273,321,348,450,349,359,446,467,283,293,282,250,458,462,300,276,383,292,308,325,283,276,293,264,372,447,346,352,340,354,274,19,363,456,281,426,436,425,380,381,252,267,269,393,421,200,428,371,266,329,432,287,422,290,250,328,385,258,384,446,265,342,386,387,257,422,424,430,445,342,276,422,273,424,306,292,307,352,366,345,268,271,302,358,423,371,327,294,460,331,279,294,303,271,304,436,432,427,304,272,408,395,394,431,378,395,400,296,334,299,6,351,168,376,352,411,307,325,320,285,295,336,320,319,404,329,330,349,334,293,333,366,323,447,316,15,315,331,358,279,317,14,316,8,285,9,277,329,350,253,374,252,319,318,403,351,6,419,324,318,325,397,367,365,288,435,397,278,344,439,310,272,311,248,195,281,375,273,291,175,396,199,312,311,268,276,283,445,390,373,339,295,282,296,448,449,346,356,264,454,337,336,299,337,338,151,294,278,455,308,292,415,429,358,355,265,340,372,388,390,466,352,346,280,295,442,282,354,19,370,285,441,295,195,248,197,457,440,274,301,300,368,417,351,465,251,301,389,385,380,386,394,395,379,399,412,419,410,436,322,387,373,388,326,2,393,354,370,461,393,164,267,268,302,12,386,374,387,312,268,13,298,293,301,265,446,340,380,385,381,280,330,425,322,426,391,420,429,437,393,391,326,344,440,438,458,459,461,364,434,394,428,396,262,274,354,457,317,316,402,316,315,403,315,314,404,314,313,405,313,421,406,323,366,361,292,306,407,306,291,408,291,287,409,287,432,410,427,434,411,372,264,383,459,309,457,366,352,401,1,274,4,418,421,262,331,294,358,435,433,367,392,289,439,328,462,326,94,2,370,289,305,455,339,254,448,359,255,446,254,253,449,253,252,450,252,256,451,256,341,452,414,413,463,286,441,414,286,258,441,258,257,442,257,259,443,259,260,444,260,467,445,309,459,250,305,289,290,305,290,460,401,376,435,309,250,392,376,411,433,453,341,464,357,453,465,343,357,412,437,343,399,344,360,440,420,437,456,360,420,363,361,401,288,265,372,353,390,339,249,339,448,255];var je=[127,234,132,58,172,150,149,148,152,377,378,379,397,288,361,454,356,70,63,105,66,107,336,296,334,293,300,168,6,195,4,98,97,2,326,327,33,160,158,133,153,144,362,385,387,263,373,380,57,40,37,0,267,270,287,321,314,17,84,91,78,81,13,311,308,402,14,178],we=[33,133,362,263,1,62,308,159,145,386,374,6,102,331,2,13,14,70,105,107,336,334,300,54,10,284,50,280,234,454,58,288,152],Se=[33,133,362,263,1,78,308],w2=je.map(A=>R0[A]),S2=we.map(A=>R0[A]),W2=Se.map(A=>R0[A]);var l5=t0.leftEyeLower0,c5=t0.rightEyeLower0,u0={leftBounds:[l5[0],l5[l5.length-1]],rightBounds:[c5[0],c5[c5.length-1]]},X0={count:468,mouth:13,symmetryLine:[13,t0.midwayBetweenEyes[0]]},jA={leftEye:0,rightEye:1,nose:2,mouth:3,leftEar:4,rightEar:5,symmetryLine:[3,2]},p0={upperCenter:3,lowerCenter:4,index:71,numCoordinates:76};function F0(A,e,t,o){for(let n=0;n[x[0]/this.meshSize*(l[0]-this.meshSize/2),x[1]/this.meshSize*(l[1]-this.meshSize/2),l[2]]),r=o!==0?V0(o,[0,0]):Z0,y=o!==0?a.map(l=>[...PA(l,r),l[2]]):a,i=o!==0?TA(n):Z0,c=[...m0({startPoint:t.startPoint,endPoint:t.endPoint}),1];return y.map(l=>[Math.round(l[0]+r0(c,i[0])),Math.round(l[1]+r0(c,i[1])),Math.round(l[2])])}getLeftToRightEyeDepthDifference(e){let t=e[u0.leftBounds[0]][2],o=e[u0.rightBounds[0]][2];return t-o}getEyeBox(e,t,o,n,x=!1){let a=H0(L0(a5([e[o],e[n]]),this.irisEnlarge)),r=E0(a),y=s.image.cropAndResize(t,[[a.startPoint[1]/this.meshSize,a.startPoint[0]/this.meshSize,a.endPoint[1]/this.meshSize,a.endPoint[0]/this.meshSize]],[0],[this.irisSize,this.irisSize]);return x&&s.ENV.flags.IS_BROWSER&&(y=s.image.flipLeftRight(y)),{box:a,boxSize:r,crop:y}}getEyeCoords(e,t,o,n=!1){let x=[];for(let a=0;a{let i=a;return y===2?i=n:y===4&&(i=x),[r[0],r[1],i]})}async predict(e,t){let o=!1,n;if((this.skipped===0||this.skipped>t.face.detector.skipFrames||!t.face.mesh.enabled||!t.skipFrame)&&(n=await this.boundingBoxDetector.getBoundingBoxes(e),this.skipped=0),t.skipFrame&&this.skipped++,!t.skipFrame||n&&n.boxes&&(!t.face.mesh.enabled||n.boxes.length!==this.detectedFaces&&this.detectedFaces!==t.face.detector.maxDetected)){this.storedBoxes=[],this.detectedFaces=0;for(let a of n.boxes)this.storedBoxes.push({startPoint:a.box.startPoint.dataSync(),endPoint:a.box.endPoint.dataSync(),landmarks:a.landmarks.arraySync(),confidence:a.confidence});this.storedBoxes.length>0&&(o=!0)}if(o){if(!n||!n.boxes||n.boxes.length===0)return this.storedBoxes=[],this.detectedFaces=0,null;for(let a=0;a{a.box.startPoint.dispose(),a.box.endPoint.dispose(),a.landmarks.dispose()});let x=s.tidy(()=>this.storedBoxes.map((a,r)=>{let y,i=0,c;if(t.face.detector.rotation&&t.face.mesh.enabled&&s.ENV.flags.IS_BROWSER){let[R,W]=a.landmarks.length>=X0.count?X0.symmetryLine:jA.symmetryLine;i=x5(a.landmarks[R],a.landmarks[W]);let M=m0({startPoint:a.startPoint,endPoint:a.endPoint}),u=[M[0]/e.shape[2],M[1]/e.shape[1]],T=s.image.rotateWithOffset(e,i,0,u);c=V0(-i,M),t.face.mesh.enabled?y=h0({startPoint:a.startPoint,endPoint:a.endPoint},T,[this.meshSize,this.meshSize]).div(255):y=h0({startPoint:a.startPoint,endPoint:a.endPoint},T,[this.boxSize,this.boxSize]).div(255)}else{c=Z0;let R=e.clone();t.face.mesh.enabled?y=h0({startPoint:a.startPoint,endPoint:a.endPoint},R,[this.meshSize,this.meshSize]).div(255):y=h0({startPoint:a.startPoint,endPoint:a.endPoint},R,[this.boxSize,this.boxSize]).div(255)}if(!t.face.mesh.enabled)return{mesh:[],box:a,faceConfidence:null,boxConfidence:a.confidence,confidence:a.confidence,image:y};let[,l,f]=this.meshDetector.execute(y),h=l.dataSync()[0];if(h=X0.count?X0.symmetryLine:jA.symmetryLine;i=x5(a.landmarks[R],a.landmarks[W]);let M=m0({startPoint:a.startPoint,endPoint:a.endPoint}),u=[M[0]/e.shape[2],M[1]/e.shape[1]],T=s.image.rotateWithOffset(e.toFloat(),i,0,u);c=V0(-i,M),y=h0({startPoint:a.startPoint,endPoint:a.endPoint},T,[this.meshSize,this.meshSize]).div(255)}let w={mesh:m,box:a,faceConfidence:h,boxConfidence:a.confidence,image:y};return this.storedBoxes[r]={...H0(a),confidence:a.confidence,faceConfidence:h},w}));return t.face.mesh.enabled&&(this.storedBoxes=this.storedBoxes.filter(a=>a.confidence>t.face.detector.minConfidence)),this.detectedFaces=x.length,x}};var V=[null,null,null],f5;async function wA(A,e){let t=await f5.predict(A,e),o=[],n=0;for(let x of t||[]){if(!x||x.isDisposedInternal)continue;let a=x.mesh.map(c=>[c[0]/(A.shape[2]||0),c[1]/(A.shape[1]||0),c[2]/f5.meshSize]),r={};if(x.mesh&&x.mesh.length>0)for(let c of Object.keys(t0))r[c]=t0[c].map(l=>x.mesh[l]);let y=x.box?[Math.trunc(Math.max(0,x.box.startPoint[0])),Math.trunc(Math.max(0,x.box.startPoint[1])),Math.trunc(Math.min(A.shape[2]||0,x.box.endPoint[0])-Math.max(0,x.box.startPoint[0])),Math.trunc(Math.min(A.shape[1]||0,x.box.endPoint[1])-Math.max(0,x.box.startPoint[1]))]:[0,0,0,0],i=x.box?[x.box.startPoint[0]/(A.shape[2]||0),x.box.startPoint[1]/(A.shape[1]||0),(x.box.endPoint[0]-x.box.startPoint[0])/(A.shape[2]||0),(x.box.endPoint[1]-x.box.startPoint[1])/(A.shape[1]||0)]:[0,0,0,0];o.push({id:n++,score:Math.round(100*x.faceConfidence||100*x.boxConfidence||0)/100,boxScore:Math.round(100*x.boxConfidence)/100,faceScore:Math.round(100*x.faceConfidence)/100,box:y,boxRaw:i,mesh:x.mesh,meshRaw:a,annotations:r,image:x.image,tensor:x.image}),x.coords&&x.coords.dispose()}return o}async function m5(A){return!V[0]&&A.face.enabled||!V[1]&&A.face.mesh.enabled||!V[2]&&A.face.iris.enabled?(V=await Promise.all([!V[0]&&A.face.enabled?RA(A):null,!V[1]&&A.face.mesh.enabled?s.loadGraphModel(L(A.modelBasePath,A.face.mesh.modelPath),{fromTFHub:A.face.mesh.modelPath.includes("tfhub.dev")}):null,!V[2]&&A.face.iris.enabled?s.loadGraphModel(L(A.modelBasePath,A.face.iris.modelPath),{fromTFHub:A.face.iris.modelPath.includes("tfhub.dev")}):null]),A.face.mesh.enabled&&(!V[1]||!V[1].modelUrl?g("load model failed:",A.face.mesh.modelPath):A.debug&&g("load model:",V[1].modelUrl)),A.face.iris.enabled&&(!V[2]||!V[2].modelUrl?g("load model failed:",A.face.iris.modelPath):A.debug&&g("load model:",V[2].modelUrl))):A.debug&&(V[0]&&g("cached model:",V[0].model.modelUrl),V[1]&&g("cached model:",V[1].modelUrl),V[2]&&g("cached model:",V[2].modelUrl)),f5=new d5(V[0],V[1],V[2]),V}var SA=l0,WA=R0;var We=["angry","disgust","fear","happy","sad","surprise","neutral"],$,C0=[],kA=0,h5=Number.MAX_SAFE_INTEGER,u5=[.2989,.587,.114];async function p5(A){return $?A.debug&&g("cached model:",$.modelUrl):($=await s.loadGraphModel(L(A.modelBasePath,A.face.emotion.modelPath)),!$||!$.modelUrl?g("load model failed:",A.face.emotion.modelPath):A.debug&&g("load model:",$.modelUrl)),$}async function b5(A,e,t,o){return $?h50?(h5++,C0[t]):(h5=0,new Promise(async n=>{let x=s.image.resizeBilinear(A,[$.inputs[0].shape[2],$.inputs[0].shape[1]],!1),[a,r,y]=s.split(x,3,3);x.dispose();let i=s.mul(a,u5[0]),c=s.mul(r,u5[1]),l=s.mul(y,u5[2]);a.dispose(),r.dispose(),y.dispose();let f=s.addN([i,c,l]);i.dispose(),c.dispose(),l.dispose();let h=s.tidy(()=>f.sub(.5).mul(2));f.dispose();let E=[];if(e.face.emotion.enabled){let d=await $.predict(h),m=d.dataSync();s.dispose(d);for(let z=0;ze.face.emotion.minConfidence&&E.push({score:Math.min(.99,Math.trunc(100*m[z])/100),emotion:We[z]});E.sort((z,w)=>w.score-z.score)}h.dispose(),C0[t]=E,kA=o,n(E)})):null}var A0,q0=[],IA=0,g5=Number.MAX_SAFE_INTEGER;async function M5(A){let e=L(A.modelBasePath,A.face.description.modelPath);return A0?A.debug&&g("cached model:",e):(A0=await s.loadGraphModel(e),A0?A.debug&&g("load model:",e):g("load model failed:",A.face.description.modelPath)),A0}function T5(A,e,t=2){if(!A||!e||(A==null?void 0:A.length)===0||(e==null?void 0:e.length)===0||(A==null?void 0:A.length)!==(e==null?void 0:e.length))return 0;let o=5*A.map((x,a)=>Math.abs(A[a]-e[a])**t).reduce((x,a)=>x+a,0)**(1/t);return Math.max(0,100-o)/100}function NA(A,e,t=0){let o={similarity:0,name:"",source:"",embedding:[]};if(!A||!e||!Array.isArray(A)||!Array.isArray(e))return o;for(let n of e)if(n.embedding&&n.name){let x=T5(A,n.embedding);x>t&&x>o.similarity&&(o={...n,similarity:x})}return o}function P5(A){return s.tidy(()=>{let t=A.image||A.tensor||A;if(!(t instanceof s.Tensor))return null;let o=[[.05,.15,.85,.85]];return A0.inputs[0].shape?(t.shape.length===3?s.image.cropAndResize(s.expandDims(t,0),o,[0],[A0.inputs[0].shape[2],A0.inputs[0].shape[1]]):s.image.cropAndResize(t,o,[0],[A0.inputs[0].shape[2],A0.inputs[0].shape[1]])).mul(255):null})}async function v5(A,e,t,o){var n,x;return A0?g50?(g5++,q0[t]):(g5=0,new Promise(async a=>{let r=P5(A),y,i={age:0,gender:"unknown",genderScore:0,descriptor:[]};e.face.description.enabled&&(y=await A0.predict(r)),s.dispose(r),y&&(s.tidy(()=>{let c=y.find(d=>d.shape[1]===1).dataSync(),l=Math.trunc(200*Math.abs(c[0]-.5))/100;l>e.face.description.minConfidence&&(i.gender=c[0]<=.5?"female":"male",i.genderScore=Math.min(.99,l));let f=y.find(d=>d.shape[1]===100).argMax(1).dataSync()[0],h=y.find(d=>d.shape[1]===100).dataSync();i.age=Math.round(h[f-1]>h[f+1]?10*f-100*h[f-1]:10*f+100*h[f+1])/10;let E=y.find(d=>d.shape[1]===1024);i.descriptor=[...E.dataSync()]}),y.forEach(c=>s.dispose(c))),q0[t]=i,IA=o,a(i)})):null}var ke=A=>{let e=(l,f)=>Math.atan2(l[1]-f[1],l[0]-f[0]);if(!A.annotations.rightEyeIris||!A.annotations.leftEyeIris)return{bearing:0,strength:0};let t=[0,-.1],o=1,n=A.mesh[33][2]>A.mesh[263][2],x=n?A.mesh[473]:A.mesh[468],a=n?[(A.mesh[133][0]+A.mesh[33][0])/2,(A.mesh[133][1]+A.mesh[33][1])/2]:[(A.mesh[263][0]+A.mesh[362][0])/2,(A.mesh[263][1]+A.mesh[362][1])/2],r=n?[A.mesh[133][0]-A.mesh[33][0],A.mesh[23][1]-A.mesh[27][1]]:[A.mesh[263][0]-A.mesh[362][0],A.mesh[253][1]-A.mesh[257][1]],y=[(a[0]-x[0])/r[0]-t[0],o*(x[1]-a[1])/r[1]-t[1]],i=Math.sqrt(y[0]**2+y[1]**2);return i=Math.min(i,A.boxRaw[2]/2,A.boxRaw[3]/2),{bearing:(e([0,0],y)+Math.PI/2)%Math.PI,strength:i}},Ie=(A,e)=>{let t=m=>{let z=Math.sqrt(m[0]*m[0]+m[1]*m[1]+m[2]*m[2]);return m[0]/=z,m[1]/=z,m[2]/=z,m},o=(m,z)=>{let w=m[0]-z[0],R=m[1]-z[1],W=m[2]-z[2];return[w,R,W]},n=(m,z)=>{let w=m[1]*z[2]-m[2]*z[1],R=m[2]*z[0]-m[0]*z[2],W=m[0]*z[1]-m[1]*z[0];return[w,R,W]},x=m=>{let[z,w,R,W,M,u,T,P,b]=m,k,Z,N;return W<1?W>-1?(N=Math.asin(W),Z=Math.atan2(-T,z),k=Math.atan2(-u,M)):(N=-Math.PI/2,Z=-Math.atan2(P,b),k=0):(N=Math.PI/2,Z=Math.atan2(P,b),k=0),{pitch:2*-k,yaw:2*-Z,roll:2*-N}},a=m=>{let z=(R,W,M,u)=>Math.atan2(u-W,M-R);return{pitch:z(m[10][1],m[10][2],m[152][1],m[152][2]),yaw:z(m[33][0],m[33][2],m[263][0],m[263][2]),roll:z(m[33][0],m[33][1],m[263][0],m[263][1])}},r=A.meshRaw;if(!r||r.length<300)return{angle:{pitch:0,yaw:0,roll:0},matrix:[1,0,0,0,1,0,0,0,1],gaze:{bearing:0,strength:0}};let y=Math.max(A.boxRaw[2]*e[0],A.boxRaw[3]*e[1])/1.5,i=[r[10],r[152],r[234],r[454]].map(m=>[m[0]*e[0]/y,m[1]*e[1]/y,m[2]]),c=t(o(i[1],i[0])),l=t(o(i[3],i[2])),f=t(n(l,c));l=n(c,f);let h=[l[0],l[1],l[2],c[0],c[1],c[2],f[0],f[1],f[2]],E=x(h),d=r.length===478?ke(A):{bearing:0,strength:0};return{angle:E,matrix:h,gaze:d}},z5=async(A,e)=>{var c,l,f,h,E,d;let t,o,n,x,a,r,y=[];A.state="run:face",t=I();let i=await wA(e,A.config);if(A.performance.face=Math.trunc(I()-t),!e.shape||e.shape.length!==4)return[];if(!i)return[];for(let m=0;m(A[e]=t,A),{}),Ne=[["leftHip","leftShoulder"],["leftElbow","leftShoulder"],["leftElbow","leftWrist"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["rightHip","rightShoulder"],["rightElbow","rightShoulder"],["rightElbow","rightWrist"],["rightHip","rightKnee"],["rightKnee","rightAnkle"],["leftShoulder","rightShoulder"],["leftHip","rightHip"]],Oe=Ne.map(([A,e])=>[w0[A],w0[e]]),LA=[["nose","leftEye"],["leftEye","leftEar"],["nose","rightEye"],["rightEye","rightEar"],["nose","leftShoulder"],["leftShoulder","leftElbow"],["leftElbow","leftWrist"],["leftShoulder","leftHip"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["nose","rightShoulder"],["rightShoulder","rightElbow"],["rightElbow","rightWrist"],["rightShoulder","rightHip"],["rightHip","rightKnee"],["rightKnee","rightAnkle"]];function HA(A){let e=A.reduce(({maxX:t,maxY:o,minX:n,minY:x},{position:{x:a,y:r}})=>({maxX:Math.max(t,a),maxY:Math.max(o,r),minX:Math.min(n,a),minY:Math.min(x,r)}),{maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY});return[e.minX,e.minY,e.maxX-e.minX,e.maxY-e.minY]}function ZA(A,[e,t],[o,n]){let x=e/o,a=t/n,r=(i,c)=>({id:c,score:i.score,boxRaw:[i.box[0]/n,i.box[1]/o,i.box[2]/n,i.box[3]/o],box:[Math.trunc(i.box[0]*a),Math.trunc(i.box[1]*x),Math.trunc(i.box[2]*a),Math.trunc(i.box[3]*x)],keypoints:i.keypoints.map(({score:l,part:f,position:h})=>({score:l,part:f,position:[Math.trunc(h.x*a),Math.trunc(h.y*x)],positionRaw:[h.x/o,h.y/o]}))});return A.map((i,c)=>r(i,c))}var E5=class{constructor(e,t){this.priorityQueue=new Array(e),this.numberOfElements=-1,this.getElementValue=t}enqueue(e){this.priorityQueue[++this.numberOfElements]=e,this.swim(this.numberOfElements)}dequeue(){let e=this.priorityQueue[0];return this.exchange(0,this.numberOfElements--),this.sink(0),this.priorityQueue[this.numberOfElements+1]=null,e}empty(){return this.numberOfElements===-1}size(){return this.numberOfElements+1}all(){return this.priorityQueue.slice(0,this.numberOfElements+1)}max(){return this.priorityQueue[0]}swim(e){for(;e>0&&this.less(Math.floor(e/2),e);)this.exchange(e,Math.floor(e/2)),e=Math.floor(e/2)}sink(e){for(;2*e<=this.numberOfElements;){let t=2*e;if(tt?t:A}function VA(A,e,t,o){let n=t-A,x=o-e;return n*n+x*x}function S5(A,e){return{x:A.x+e.x,y:A.y+e.y}}var B0=1,b0=16,Le=50**2;function XA(A,e,t,o,n,x,a=2){let r=z=>({y:x.get(z.y,z.x,A),x:x.get(z.y,z.x,x.shape[2]/2+A)}),y=(z,w,R)=>({y:w5(Math.round(z.y/b0),0,w-1),x:w5(Math.round(z.x/b0),0,R-1)}),[i,c]=o.shape,l=y(e.position,i,c),f=r(l),E=S5(e.position,f);for(let z=0;z[w0[f],w0[h]]),a=x.map(([,f])=>f),r=x.map(([f])=>f),y=e.shape[2],i=a.length,c=new Array(y),l=j5(A.part,b0,t);c[A.part.id]={score:A.score,part:j0[A.part.id],position:l};for(let f=i-1;f>=0;--f){let h=a[f],E=r[f];c[h]&&!c[E]&&(c[E]=XA(f,c[h],E,e,t,n))}for(let f=0;fe){r=!1;break}if(!r)break}return r}function Ve(A,e){let[t,o,n]=e.shape,x=new E5(t*o*n,({score:a})=>a);for(let a=0;a{var a;let x=(a=n[o])==null?void 0:a.position;return x?VA(t,e,x.y,x.x)<=Le:!1})}function Xe(A,e){return e.reduce((o,{position:n,score:x},a)=>(FA(A,n,a)||(o+=x),o),0)/e.length}function CA(A,e,t,o,n,x){let a=[],r=Ve(x,e);for(;a.lengthh.score>x);let l=Xe(a,c),f=HA(c);l>x&&a.push({keypoints:c,box:f,score:Math.round(100*l)/100})}return a}var Y,Fe=["MobilenetV1/offset_2/BiasAdd","MobilenetV1/heatmap_2/BiasAdd","MobilenetV1/displacement_fwd_2/BiasAdd","MobilenetV1/displacement_bwd_2/BiasAdd"];async function W5(A,e){let t=s.tidy(()=>{if(!Y.inputs[0].shape)return[];let r=s.image.resizeBilinear(A,[Y.inputs[0].shape[2],Y.inputs[0].shape[1]]).toFloat().div(127.5).sub(1),i=Y.execute(r,Fe).map(c=>s.squeeze(c,[0]));return i[1]=i[1].sigmoid(),i}),o=await Promise.all(t.map(a=>a.buffer()));for(let a of t)a.dispose();let n=await CA(o[0],o[1],o[2],o[3],e.body.maxDetected,e.body.minConfidence);return Y.inputs[0].shape?ZA(n,[A.shape[1],A.shape[2]],[Y.inputs[0].shape[2],Y.inputs[0].shape[1]]):[]}async function k5(A){return Y?A.debug&&g("cached model:",Y.modelUrl):(Y=await s.loadGraphModel(L(A.modelBasePath,A.body.modelPath)),!Y||!Y.modelUrl?g("load model failed:",A.body.modelPath):A.debug&&g("load model:",Y.modelUrl)),Y}function U0(A){return[Math.abs(A.endPoint[0]-A.startPoint[0]),Math.abs(A.endPoint[1]-A.startPoint[1])]}function S0(A){return[A.startPoint[0]+(A.endPoint[0]-A.startPoint[0])/2,A.startPoint[1]+(A.endPoint[1]-A.startPoint[1])/2]}function qA(A,e,t){let o=e.shape[1],n=e.shape[2],x=[[A.startPoint[1]/o,A.startPoint[0]/n,A.endPoint[1]/o,A.endPoint[0]/n]];return s.image.cropAndResize(e,x,[0],t)}function BA(A,e){let t=[A.startPoint[0]*e[0],A.startPoint[1]*e[1]],o=[A.endPoint[0]*e[0],A.endPoint[1]*e[1]],n=A.palmLandmarks.map(x=>[x[0]*e[0],x[1]*e[1]]);return{startPoint:t,endPoint:o,palmLandmarks:n,confidence:A.confidence}}function J0(A,e=1.5){let t=S0(A),o=U0(A),n=[e*o[0]/2,e*o[1]/2],x=[t[0]-n[0],t[1]-n[1]],a=[t[0]+n[0],t[1]+n[1]];return{startPoint:x,endPoint:a,palmLandmarks:A.palmLandmarks}}function Y0(A){let e=S0(A),t=U0(A),n=Math.max(...t)/2,x=[e[0]-n,e[1]-n],a=[e[0]+n,e[1]+n];return{startPoint:x,endPoint:a,palmLandmarks:A.palmLandmarks}}var UA=[{x:.015625,y:.015625},{x:.015625,y:.015625},{x:.046875,y:.015625},{x:.046875,y:.015625},{x:.078125,y:.015625},{x:.078125,y:.015625},{x:.109375,y:.015625},{x:.109375,y:.015625},{x:.140625,y:.015625},{x:.140625,y:.015625},{x:.171875,y:.015625},{x:.171875,y:.015625},{x:.203125,y:.015625},{x:.203125,y:.015625},{x:.234375,y:.015625},{x:.234375,y:.015625},{x:.265625,y:.015625},{x:.265625,y:.015625},{x:.296875,y:.015625},{x:.296875,y:.015625},{x:.328125,y:.015625},{x:.328125,y:.015625},{x:.359375,y:.015625},{x:.359375,y:.015625},{x:.390625,y:.015625},{x:.390625,y:.015625},{x:.421875,y:.015625},{x:.421875,y:.015625},{x:.453125,y:.015625},{x:.453125,y:.015625},{x:.484375,y:.015625},{x:.484375,y:.015625},{x:.515625,y:.015625},{x:.515625,y:.015625},{x:.546875,y:.015625},{x:.546875,y:.015625},{x:.578125,y:.015625},{x:.578125,y:.015625},{x:.609375,y:.015625},{x:.609375,y:.015625},{x:.640625,y:.015625},{x:.640625,y:.015625},{x:.671875,y:.015625},{x:.671875,y:.015625},{x:.703125,y:.015625},{x:.703125,y:.015625},{x:.734375,y:.015625},{x:.734375,y:.015625},{x:.765625,y:.015625},{x:.765625,y:.015625},{x:.796875,y:.015625},{x:.796875,y:.015625},{x:.828125,y:.015625},{x:.828125,y:.015625},{x:.859375,y:.015625},{x:.859375,y:.015625},{x:.890625,y:.015625},{x:.890625,y:.015625},{x:.921875,y:.015625},{x:.921875,y:.015625},{x:.953125,y:.015625},{x:.953125,y:.015625},{x:.984375,y:.015625},{x:.984375,y:.015625},{x:.015625,y:.046875},{x:.015625,y:.046875},{x:.046875,y:.046875},{x:.046875,y:.046875},{x:.078125,y:.046875},{x:.078125,y:.046875},{x:.109375,y:.046875},{x:.109375,y:.046875},{x:.140625,y:.046875},{x:.140625,y:.046875},{x:.171875,y:.046875},{x:.171875,y:.046875},{x:.203125,y:.046875},{x:.203125,y:.046875},{x:.234375,y:.046875},{x:.234375,y:.046875},{x:.265625,y:.046875},{x:.265625,y:.046875},{x:.296875,y:.046875},{x:.296875,y:.046875},{x:.328125,y:.046875},{x:.328125,y:.046875},{x:.359375,y:.046875},{x:.359375,y:.046875},{x:.390625,y:.046875},{x:.390625,y:.046875},{x:.421875,y:.046875},{x:.421875,y:.046875},{x:.453125,y:.046875},{x:.453125,y:.046875},{x:.484375,y:.046875},{x:.484375,y:.046875},{x:.515625,y:.046875},{x:.515625,y:.046875},{x:.546875,y:.046875},{x:.546875,y:.046875},{x:.578125,y:.046875},{x:.578125,y:.046875},{x:.609375,y:.046875},{x:.609375,y:.046875},{x:.640625,y:.046875},{x:.640625,y:.046875},{x:.671875,y:.046875},{x:.671875,y:.046875},{x:.703125,y:.046875},{x:.703125,y:.046875},{x:.734375,y:.046875},{x:.734375,y:.046875},{x:.765625,y:.046875},{x:.765625,y:.046875},{x:.796875,y:.046875},{x:.796875,y:.046875},{x:.828125,y:.046875},{x:.828125,y:.046875},{x:.859375,y:.046875},{x:.859375,y:.046875},{x:.890625,y:.046875},{x:.890625,y:.046875},{x:.921875,y:.046875},{x:.921875,y:.046875},{x:.953125,y:.046875},{x:.953125,y:.046875},{x:.984375,y:.046875},{x:.984375,y:.046875},{x:.015625,y:.078125},{x:.015625,y:.078125},{x:.046875,y:.078125},{x:.046875,y:.078125},{x:.078125,y:.078125},{x:.078125,y:.078125},{x:.109375,y:.078125},{x:.109375,y:.078125},{x:.140625,y:.078125},{x:.140625,y:.078125},{x:.171875,y:.078125},{x:.171875,y:.078125},{x:.203125,y:.078125},{x:.203125,y:.078125},{x:.234375,y:.078125},{x:.234375,y:.078125},{x:.265625,y:.078125},{x:.265625,y:.078125},{x:.296875,y:.078125},{x:.296875,y:.078125},{x:.328125,y:.078125},{x:.328125,y:.078125},{x:.359375,y:.078125},{x:.359375,y:.078125},{x:.390625,y:.078125},{x:.390625,y:.078125},{x:.421875,y:.078125},{x:.421875,y:.078125},{x:.453125,y:.078125},{x:.453125,y:.078125},{x:.484375,y:.078125},{x:.484375,y:.078125},{x:.515625,y:.078125},{x:.515625,y:.078125},{x:.546875,y:.078125},{x:.546875,y:.078125},{x:.578125,y:.078125},{x:.578125,y:.078125},{x:.609375,y:.078125},{x:.609375,y:.078125},{x:.640625,y:.078125},{x:.640625,y:.078125},{x:.671875,y:.078125},{x:.671875,y:.078125},{x:.703125,y:.078125},{x:.703125,y:.078125},{x:.734375,y:.078125},{x:.734375,y:.078125},{x:.765625,y:.078125},{x:.765625,y:.078125},{x:.796875,y:.078125},{x:.796875,y:.078125},{x:.828125,y:.078125},{x:.828125,y:.078125},{x:.859375,y:.078125},{x:.859375,y:.078125},{x:.890625,y:.078125},{x:.890625,y:.078125},{x:.921875,y:.078125},{x:.921875,y:.078125},{x:.953125,y:.078125},{x:.953125,y:.078125},{x:.984375,y:.078125},{x:.984375,y:.078125},{x:.015625,y:.109375},{x:.015625,y:.109375},{x:.046875,y:.109375},{x:.046875,y:.109375},{x:.078125,y:.109375},{x:.078125,y:.109375},{x:.109375,y:.109375},{x:.109375,y:.109375},{x:.140625,y:.109375},{x:.140625,y:.109375},{x:.171875,y:.109375},{x:.171875,y:.109375},{x:.203125,y:.109375},{x:.203125,y:.109375},{x:.234375,y:.109375},{x:.234375,y:.109375},{x:.265625,y:.109375},{x:.265625,y:.109375},{x:.296875,y:.109375},{x:.296875,y:.109375},{x:.328125,y:.109375},{x:.328125,y:.109375},{x:.359375,y:.109375},{x:.359375,y:.109375},{x:.390625,y:.109375},{x:.390625,y:.109375},{x:.421875,y:.109375},{x:.421875,y:.109375},{x:.453125,y:.109375},{x:.453125,y:.109375},{x:.484375,y:.109375},{x:.484375,y:.109375},{x:.515625,y:.109375},{x:.515625,y:.109375},{x:.546875,y:.109375},{x:.546875,y:.109375},{x:.578125,y:.109375},{x:.578125,y:.109375},{x:.609375,y:.109375},{x:.609375,y:.109375},{x:.640625,y:.109375},{x:.640625,y:.109375},{x:.671875,y:.109375},{x:.671875,y:.109375},{x:.703125,y:.109375},{x:.703125,y:.109375},{x:.734375,y:.109375},{x:.734375,y:.109375},{x:.765625,y:.109375},{x:.765625,y:.109375},{x:.796875,y:.109375},{x:.796875,y:.109375},{x:.828125,y:.109375},{x:.828125,y:.109375},{x:.859375,y:.109375},{x:.859375,y:.109375},{x:.890625,y:.109375},{x:.890625,y:.109375},{x:.921875,y:.109375},{x:.921875,y:.109375},{x:.953125,y:.109375},{x:.953125,y:.109375},{x:.984375,y:.109375},{x:.984375,y:.109375},{x:.015625,y:.140625},{x:.015625,y:.140625},{x:.046875,y:.140625},{x:.046875,y:.140625},{x:.078125,y:.140625},{x:.078125,y:.140625},{x:.109375,y:.140625},{x:.109375,y:.140625},{x:.140625,y:.140625},{x:.140625,y:.140625},{x:.171875,y:.140625},{x:.171875,y:.140625},{x:.203125,y:.140625},{x:.203125,y:.140625},{x:.234375,y:.140625},{x:.234375,y:.140625},{x:.265625,y:.140625},{x:.265625,y:.140625},{x:.296875,y:.140625},{x:.296875,y:.140625},{x:.328125,y:.140625},{x:.328125,y:.140625},{x:.359375,y:.140625},{x:.359375,y:.140625},{x:.390625,y:.140625},{x:.390625,y:.140625},{x:.421875,y:.140625},{x:.421875,y:.140625},{x:.453125,y:.140625},{x:.453125,y:.140625},{x:.484375,y:.140625},{x:.484375,y:.140625},{x:.515625,y:.140625},{x:.515625,y:.140625},{x:.546875,y:.140625},{x:.546875,y:.140625},{x:.578125,y:.140625},{x:.578125,y:.140625},{x:.609375,y:.140625},{x:.609375,y:.140625},{x:.640625,y:.140625},{x:.640625,y:.140625},{x:.671875,y:.140625},{x:.671875,y:.140625},{x:.703125,y:.140625},{x:.703125,y:.140625},{x:.734375,y:.140625},{x:.734375,y:.140625},{x:.765625,y:.140625},{x:.765625,y:.140625},{x:.796875,y:.140625},{x:.796875,y:.140625},{x:.828125,y:.140625},{x:.828125,y:.140625},{x:.859375,y:.140625},{x:.859375,y:.140625},{x:.890625,y:.140625},{x:.890625,y:.140625},{x:.921875,y:.140625},{x:.921875,y:.140625},{x:.953125,y:.140625},{x:.953125,y:.140625},{x:.984375,y:.140625},{x:.984375,y:.140625},{x:.015625,y:.171875},{x:.015625,y:.171875},{x:.046875,y:.171875},{x:.046875,y:.171875},{x:.078125,y:.171875},{x:.078125,y:.171875},{x:.109375,y:.171875},{x:.109375,y:.171875},{x:.140625,y:.171875},{x:.140625,y:.171875},{x:.171875,y:.171875},{x:.171875,y:.171875},{x:.203125,y:.171875},{x:.203125,y:.171875},{x:.234375,y:.171875},{x:.234375,y:.171875},{x:.265625,y:.171875},{x:.265625,y:.171875},{x:.296875,y:.171875},{x:.296875,y:.171875},{x:.328125,y:.171875},{x:.328125,y:.171875},{x:.359375,y:.171875},{x:.359375,y:.171875},{x:.390625,y:.171875},{x:.390625,y:.171875},{x:.421875,y:.171875},{x:.421875,y:.171875},{x:.453125,y:.171875},{x:.453125,y:.171875},{x:.484375,y:.171875},{x:.484375,y:.171875},{x:.515625,y:.171875},{x:.515625,y:.171875},{x:.546875,y:.171875},{x:.546875,y:.171875},{x:.578125,y:.171875},{x:.578125,y:.171875},{x:.609375,y:.171875},{x:.609375,y:.171875},{x:.640625,y:.171875},{x:.640625,y:.171875},{x:.671875,y:.171875},{x:.671875,y:.171875},{x:.703125,y:.171875},{x:.703125,y:.171875},{x:.734375,y:.171875},{x:.734375,y:.171875},{x:.765625,y:.171875},{x:.765625,y:.171875},{x:.796875,y:.171875},{x:.796875,y:.171875},{x:.828125,y:.171875},{x:.828125,y:.171875},{x:.859375,y:.171875},{x:.859375,y:.171875},{x:.890625,y:.171875},{x:.890625,y:.171875},{x:.921875,y:.171875},{x:.921875,y:.171875},{x:.953125,y:.171875},{x:.953125,y:.171875},{x:.984375,y:.171875},{x:.984375,y:.171875},{x:.015625,y:.203125},{x:.015625,y:.203125},{x:.046875,y:.203125},{x:.046875,y:.203125},{x:.078125,y:.203125},{x:.078125,y:.203125},{x:.109375,y:.203125},{x:.109375,y:.203125},{x:.140625,y:.203125},{x:.140625,y:.203125},{x:.171875,y:.203125},{x:.171875,y:.203125},{x:.203125,y:.203125},{x:.203125,y:.203125},{x:.234375,y:.203125},{x:.234375,y:.203125},{x:.265625,y:.203125},{x:.265625,y:.203125},{x:.296875,y:.203125},{x:.296875,y:.203125},{x:.328125,y:.203125},{x:.328125,y:.203125},{x:.359375,y:.203125},{x:.359375,y:.203125},{x:.390625,y:.203125},{x:.390625,y:.203125},{x:.421875,y:.203125},{x:.421875,y:.203125},{x:.453125,y:.203125},{x:.453125,y:.203125},{x:.484375,y:.203125},{x:.484375,y:.203125},{x:.515625,y:.203125},{x:.515625,y:.203125},{x:.546875,y:.203125},{x:.546875,y:.203125},{x:.578125,y:.203125},{x:.578125,y:.203125},{x:.609375,y:.203125},{x:.609375,y:.203125},{x:.640625,y:.203125},{x:.640625,y:.203125},{x:.671875,y:.203125},{x:.671875,y:.203125},{x:.703125,y:.203125},{x:.703125,y:.203125},{x:.734375,y:.203125},{x:.734375,y:.203125},{x:.765625,y:.203125},{x:.765625,y:.203125},{x:.796875,y:.203125},{x:.796875,y:.203125},{x:.828125,y:.203125},{x:.828125,y:.203125},{x:.859375,y:.203125},{x:.859375,y:.203125},{x:.890625,y:.203125},{x:.890625,y:.203125},{x:.921875,y:.203125},{x:.921875,y:.203125},{x:.953125,y:.203125},{x:.953125,y:.203125},{x:.984375,y:.203125},{x:.984375,y:.203125},{x:.015625,y:.234375},{x:.015625,y:.234375},{x:.046875,y:.234375},{x:.046875,y:.234375},{x:.078125,y:.234375},{x:.078125,y:.234375},{x:.109375,y:.234375},{x:.109375,y:.234375},{x:.140625,y:.234375},{x:.140625,y:.234375},{x:.171875,y:.234375},{x:.171875,y:.234375},{x:.203125,y:.234375},{x:.203125,y:.234375},{x:.234375,y:.234375},{x:.234375,y:.234375},{x:.265625,y:.234375},{x:.265625,y:.234375},{x:.296875,y:.234375},{x:.296875,y:.234375},{x:.328125,y:.234375},{x:.328125,y:.234375},{x:.359375,y:.234375},{x:.359375,y:.234375},{x:.390625,y:.234375},{x:.390625,y:.234375},{x:.421875,y:.234375},{x:.421875,y:.234375},{x:.453125,y:.234375},{x:.453125,y:.234375},{x:.484375,y:.234375},{x:.484375,y:.234375},{x:.515625,y:.234375},{x:.515625,y:.234375},{x:.546875,y:.234375},{x:.546875,y:.234375},{x:.578125,y:.234375},{x:.578125,y:.234375},{x:.609375,y:.234375},{x:.609375,y:.234375},{x:.640625,y:.234375},{x:.640625,y:.234375},{x:.671875,y:.234375},{x:.671875,y:.234375},{x:.703125,y:.234375},{x:.703125,y:.234375},{x:.734375,y:.234375},{x:.734375,y:.234375},{x:.765625,y:.234375},{x:.765625,y:.234375},{x:.796875,y:.234375},{x:.796875,y:.234375},{x:.828125,y:.234375},{x:.828125,y:.234375},{x:.859375,y:.234375},{x:.859375,y:.234375},{x:.890625,y:.234375},{x:.890625,y:.234375},{x:.921875,y:.234375},{x:.921875,y:.234375},{x:.953125,y:.234375},{x:.953125,y:.234375},{x:.984375,y:.234375},{x:.984375,y:.234375},{x:.015625,y:.265625},{x:.015625,y:.265625},{x:.046875,y:.265625},{x:.046875,y:.265625},{x:.078125,y:.265625},{x:.078125,y:.265625},{x:.109375,y:.265625},{x:.109375,y:.265625},{x:.140625,y:.265625},{x:.140625,y:.265625},{x:.171875,y:.265625},{x:.171875,y:.265625},{x:.203125,y:.265625},{x:.203125,y:.265625},{x:.234375,y:.265625},{x:.234375,y:.265625},{x:.265625,y:.265625},{x:.265625,y:.265625},{x:.296875,y:.265625},{x:.296875,y:.265625},{x:.328125,y:.265625},{x:.328125,y:.265625},{x:.359375,y:.265625},{x:.359375,y:.265625},{x:.390625,y:.265625},{x:.390625,y:.265625},{x:.421875,y:.265625},{x:.421875,y:.265625},{x:.453125,y:.265625},{x:.453125,y:.265625},{x:.484375,y:.265625},{x:.484375,y:.265625},{x:.515625,y:.265625},{x:.515625,y:.265625},{x:.546875,y:.265625},{x:.546875,y:.265625},{x:.578125,y:.265625},{x:.578125,y:.265625},{x:.609375,y:.265625},{x:.609375,y:.265625},{x:.640625,y:.265625},{x:.640625,y:.265625},{x:.671875,y:.265625},{x:.671875,y:.265625},{x:.703125,y:.265625},{x:.703125,y:.265625},{x:.734375,y:.265625},{x:.734375,y:.265625},{x:.765625,y:.265625},{x:.765625,y:.265625},{x:.796875,y:.265625},{x:.796875,y:.265625},{x:.828125,y:.265625},{x:.828125,y:.265625},{x:.859375,y:.265625},{x:.859375,y:.265625},{x:.890625,y:.265625},{x:.890625,y:.265625},{x:.921875,y:.265625},{x:.921875,y:.265625},{x:.953125,y:.265625},{x:.953125,y:.265625},{x:.984375,y:.265625},{x:.984375,y:.265625},{x:.015625,y:.296875},{x:.015625,y:.296875},{x:.046875,y:.296875},{x:.046875,y:.296875},{x:.078125,y:.296875},{x:.078125,y:.296875},{x:.109375,y:.296875},{x:.109375,y:.296875},{x:.140625,y:.296875},{x:.140625,y:.296875},{x:.171875,y:.296875},{x:.171875,y:.296875},{x:.203125,y:.296875},{x:.203125,y:.296875},{x:.234375,y:.296875},{x:.234375,y:.296875},{x:.265625,y:.296875},{x:.265625,y:.296875},{x:.296875,y:.296875},{x:.296875,y:.296875},{x:.328125,y:.296875},{x:.328125,y:.296875},{x:.359375,y:.296875},{x:.359375,y:.296875},{x:.390625,y:.296875},{x:.390625,y:.296875},{x:.421875,y:.296875},{x:.421875,y:.296875},{x:.453125,y:.296875},{x:.453125,y:.296875},{x:.484375,y:.296875},{x:.484375,y:.296875},{x:.515625,y:.296875},{x:.515625,y:.296875},{x:.546875,y:.296875},{x:.546875,y:.296875},{x:.578125,y:.296875},{x:.578125,y:.296875},{x:.609375,y:.296875},{x:.609375,y:.296875},{x:.640625,y:.296875},{x:.640625,y:.296875},{x:.671875,y:.296875},{x:.671875,y:.296875},{x:.703125,y:.296875},{x:.703125,y:.296875},{x:.734375,y:.296875},{x:.734375,y:.296875},{x:.765625,y:.296875},{x:.765625,y:.296875},{x:.796875,y:.296875},{x:.796875,y:.296875},{x:.828125,y:.296875},{x:.828125,y:.296875},{x:.859375,y:.296875},{x:.859375,y:.296875},{x:.890625,y:.296875},{x:.890625,y:.296875},{x:.921875,y:.296875},{x:.921875,y:.296875},{x:.953125,y:.296875},{x:.953125,y:.296875},{x:.984375,y:.296875},{x:.984375,y:.296875},{x:.015625,y:.328125},{x:.015625,y:.328125},{x:.046875,y:.328125},{x:.046875,y:.328125},{x:.078125,y:.328125},{x:.078125,y:.328125},{x:.109375,y:.328125},{x:.109375,y:.328125},{x:.140625,y:.328125},{x:.140625,y:.328125},{x:.171875,y:.328125},{x:.171875,y:.328125},{x:.203125,y:.328125},{x:.203125,y:.328125},{x:.234375,y:.328125},{x:.234375,y:.328125},{x:.265625,y:.328125},{x:.265625,y:.328125},{x:.296875,y:.328125},{x:.296875,y:.328125},{x:.328125,y:.328125},{x:.328125,y:.328125},{x:.359375,y:.328125},{x:.359375,y:.328125},{x:.390625,y:.328125},{x:.390625,y:.328125},{x:.421875,y:.328125},{x:.421875,y:.328125},{x:.453125,y:.328125},{x:.453125,y:.328125},{x:.484375,y:.328125},{x:.484375,y:.328125},{x:.515625,y:.328125},{x:.515625,y:.328125},{x:.546875,y:.328125},{x:.546875,y:.328125},{x:.578125,y:.328125},{x:.578125,y:.328125},{x:.609375,y:.328125},{x:.609375,y:.328125},{x:.640625,y:.328125},{x:.640625,y:.328125},{x:.671875,y:.328125},{x:.671875,y:.328125},{x:.703125,y:.328125},{x:.703125,y:.328125},{x:.734375,y:.328125},{x:.734375,y:.328125},{x:.765625,y:.328125},{x:.765625,y:.328125},{x:.796875,y:.328125},{x:.796875,y:.328125},{x:.828125,y:.328125},{x:.828125,y:.328125},{x:.859375,y:.328125},{x:.859375,y:.328125},{x:.890625,y:.328125},{x:.890625,y:.328125},{x:.921875,y:.328125},{x:.921875,y:.328125},{x:.953125,y:.328125},{x:.953125,y:.328125},{x:.984375,y:.328125},{x:.984375,y:.328125},{x:.015625,y:.359375},{x:.015625,y:.359375},{x:.046875,y:.359375},{x:.046875,y:.359375},{x:.078125,y:.359375},{x:.078125,y:.359375},{x:.109375,y:.359375},{x:.109375,y:.359375},{x:.140625,y:.359375},{x:.140625,y:.359375},{x:.171875,y:.359375},{x:.171875,y:.359375},{x:.203125,y:.359375},{x:.203125,y:.359375},{x:.234375,y:.359375},{x:.234375,y:.359375},{x:.265625,y:.359375},{x:.265625,y:.359375},{x:.296875,y:.359375},{x:.296875,y:.359375},{x:.328125,y:.359375},{x:.328125,y:.359375},{x:.359375,y:.359375},{x:.359375,y:.359375},{x:.390625,y:.359375},{x:.390625,y:.359375},{x:.421875,y:.359375},{x:.421875,y:.359375},{x:.453125,y:.359375},{x:.453125,y:.359375},{x:.484375,y:.359375},{x:.484375,y:.359375},{x:.515625,y:.359375},{x:.515625,y:.359375},{x:.546875,y:.359375},{x:.546875,y:.359375},{x:.578125,y:.359375},{x:.578125,y:.359375},{x:.609375,y:.359375},{x:.609375,y:.359375},{x:.640625,y:.359375},{x:.640625,y:.359375},{x:.671875,y:.359375},{x:.671875,y:.359375},{x:.703125,y:.359375},{x:.703125,y:.359375},{x:.734375,y:.359375},{x:.734375,y:.359375},{x:.765625,y:.359375},{x:.765625,y:.359375},{x:.796875,y:.359375},{x:.796875,y:.359375},{x:.828125,y:.359375},{x:.828125,y:.359375},{x:.859375,y:.359375},{x:.859375,y:.359375},{x:.890625,y:.359375},{x:.890625,y:.359375},{x:.921875,y:.359375},{x:.921875,y:.359375},{x:.953125,y:.359375},{x:.953125,y:.359375},{x:.984375,y:.359375},{x:.984375,y:.359375},{x:.015625,y:.390625},{x:.015625,y:.390625},{x:.046875,y:.390625},{x:.046875,y:.390625},{x:.078125,y:.390625},{x:.078125,y:.390625},{x:.109375,y:.390625},{x:.109375,y:.390625},{x:.140625,y:.390625},{x:.140625,y:.390625},{x:.171875,y:.390625},{x:.171875,y:.390625},{x:.203125,y:.390625},{x:.203125,y:.390625},{x:.234375,y:.390625},{x:.234375,y:.390625},{x:.265625,y:.390625},{x:.265625,y:.390625},{x:.296875,y:.390625},{x:.296875,y:.390625},{x:.328125,y:.390625},{x:.328125,y:.390625},{x:.359375,y:.390625},{x:.359375,y:.390625},{x:.390625,y:.390625},{x:.390625,y:.390625},{x:.421875,y:.390625},{x:.421875,y:.390625},{x:.453125,y:.390625},{x:.453125,y:.390625},{x:.484375,y:.390625},{x:.484375,y:.390625},{x:.515625,y:.390625},{x:.515625,y:.390625},{x:.546875,y:.390625},{x:.546875,y:.390625},{x:.578125,y:.390625},{x:.578125,y:.390625},{x:.609375,y:.390625},{x:.609375,y:.390625},{x:.640625,y:.390625},{x:.640625,y:.390625},{x:.671875,y:.390625},{x:.671875,y:.390625},{x:.703125,y:.390625},{x:.703125,y:.390625},{x:.734375,y:.390625},{x:.734375,y:.390625},{x:.765625,y:.390625},{x:.765625,y:.390625},{x:.796875,y:.390625},{x:.796875,y:.390625},{x:.828125,y:.390625},{x:.828125,y:.390625},{x:.859375,y:.390625},{x:.859375,y:.390625},{x:.890625,y:.390625},{x:.890625,y:.390625},{x:.921875,y:.390625},{x:.921875,y:.390625},{x:.953125,y:.390625},{x:.953125,y:.390625},{x:.984375,y:.390625},{x:.984375,y:.390625},{x:.015625,y:.421875},{x:.015625,y:.421875},{x:.046875,y:.421875},{x:.046875,y:.421875},{x:.078125,y:.421875},{x:.078125,y:.421875},{x:.109375,y:.421875},{x:.109375,y:.421875},{x:.140625,y:.421875},{x:.140625,y:.421875},{x:.171875,y:.421875},{x:.171875,y:.421875},{x:.203125,y:.421875},{x:.203125,y:.421875},{x:.234375,y:.421875},{x:.234375,y:.421875},{x:.265625,y:.421875},{x:.265625,y:.421875},{x:.296875,y:.421875},{x:.296875,y:.421875},{x:.328125,y:.421875},{x:.328125,y:.421875},{x:.359375,y:.421875},{x:.359375,y:.421875},{x:.390625,y:.421875},{x:.390625,y:.421875},{x:.421875,y:.421875},{x:.421875,y:.421875},{x:.453125,y:.421875},{x:.453125,y:.421875},{x:.484375,y:.421875},{x:.484375,y:.421875},{x:.515625,y:.421875},{x:.515625,y:.421875},{x:.546875,y:.421875},{x:.546875,y:.421875},{x:.578125,y:.421875},{x:.578125,y:.421875},{x:.609375,y:.421875},{x:.609375,y:.421875},{x:.640625,y:.421875},{x:.640625,y:.421875},{x:.671875,y:.421875},{x:.671875,y:.421875},{x:.703125,y:.421875},{x:.703125,y:.421875},{x:.734375,y:.421875},{x:.734375,y:.421875},{x:.765625,y:.421875},{x:.765625,y:.421875},{x:.796875,y:.421875},{x:.796875,y:.421875},{x:.828125,y:.421875},{x:.828125,y:.421875},{x:.859375,y:.421875},{x:.859375,y:.421875},{x:.890625,y:.421875},{x:.890625,y:.421875},{x:.921875,y:.421875},{x:.921875,y:.421875},{x:.953125,y:.421875},{x:.953125,y:.421875},{x:.984375,y:.421875},{x:.984375,y:.421875},{x:.015625,y:.453125},{x:.015625,y:.453125},{x:.046875,y:.453125},{x:.046875,y:.453125},{x:.078125,y:.453125},{x:.078125,y:.453125},{x:.109375,y:.453125},{x:.109375,y:.453125},{x:.140625,y:.453125},{x:.140625,y:.453125},{x:.171875,y:.453125},{x:.171875,y:.453125},{x:.203125,y:.453125},{x:.203125,y:.453125},{x:.234375,y:.453125},{x:.234375,y:.453125},{x:.265625,y:.453125},{x:.265625,y:.453125},{x:.296875,y:.453125},{x:.296875,y:.453125},{x:.328125,y:.453125},{x:.328125,y:.453125},{x:.359375,y:.453125},{x:.359375,y:.453125},{x:.390625,y:.453125},{x:.390625,y:.453125},{x:.421875,y:.453125},{x:.421875,y:.453125},{x:.453125,y:.453125},{x:.453125,y:.453125},{x:.484375,y:.453125},{x:.484375,y:.453125},{x:.515625,y:.453125},{x:.515625,y:.453125},{x:.546875,y:.453125},{x:.546875,y:.453125},{x:.578125,y:.453125},{x:.578125,y:.453125},{x:.609375,y:.453125},{x:.609375,y:.453125},{x:.640625,y:.453125},{x:.640625,y:.453125},{x:.671875,y:.453125},{x:.671875,y:.453125},{x:.703125,y:.453125},{x:.703125,y:.453125},{x:.734375,y:.453125},{x:.734375,y:.453125},{x:.765625,y:.453125},{x:.765625,y:.453125},{x:.796875,y:.453125},{x:.796875,y:.453125},{x:.828125,y:.453125},{x:.828125,y:.453125},{x:.859375,y:.453125},{x:.859375,y:.453125},{x:.890625,y:.453125},{x:.890625,y:.453125},{x:.921875,y:.453125},{x:.921875,y:.453125},{x:.953125,y:.453125},{x:.953125,y:.453125},{x:.984375,y:.453125},{x:.984375,y:.453125},{x:.015625,y:.484375},{x:.015625,y:.484375},{x:.046875,y:.484375},{x:.046875,y:.484375},{x:.078125,y:.484375},{x:.078125,y:.484375},{x:.109375,y:.484375},{x:.109375,y:.484375},{x:.140625,y:.484375},{x:.140625,y:.484375},{x:.171875,y:.484375},{x:.171875,y:.484375},{x:.203125,y:.484375},{x:.203125,y:.484375},{x:.234375,y:.484375},{x:.234375,y:.484375},{x:.265625,y:.484375},{x:.265625,y:.484375},{x:.296875,y:.484375},{x:.296875,y:.484375},{x:.328125,y:.484375},{x:.328125,y:.484375},{x:.359375,y:.484375},{x:.359375,y:.484375},{x:.390625,y:.484375},{x:.390625,y:.484375},{x:.421875,y:.484375},{x:.421875,y:.484375},{x:.453125,y:.484375},{x:.453125,y:.484375},{x:.484375,y:.484375},{x:.484375,y:.484375},{x:.515625,y:.484375},{x:.515625,y:.484375},{x:.546875,y:.484375},{x:.546875,y:.484375},{x:.578125,y:.484375},{x:.578125,y:.484375},{x:.609375,y:.484375},{x:.609375,y:.484375},{x:.640625,y:.484375},{x:.640625,y:.484375},{x:.671875,y:.484375},{x:.671875,y:.484375},{x:.703125,y:.484375},{x:.703125,y:.484375},{x:.734375,y:.484375},{x:.734375,y:.484375},{x:.765625,y:.484375},{x:.765625,y:.484375},{x:.796875,y:.484375},{x:.796875,y:.484375},{x:.828125,y:.484375},{x:.828125,y:.484375},{x:.859375,y:.484375},{x:.859375,y:.484375},{x:.890625,y:.484375},{x:.890625,y:.484375},{x:.921875,y:.484375},{x:.921875,y:.484375},{x:.953125,y:.484375},{x:.953125,y:.484375},{x:.984375,y:.484375},{x:.984375,y:.484375},{x:.015625,y:.515625},{x:.015625,y:.515625},{x:.046875,y:.515625},{x:.046875,y:.515625},{x:.078125,y:.515625},{x:.078125,y:.515625},{x:.109375,y:.515625},{x:.109375,y:.515625},{x:.140625,y:.515625},{x:.140625,y:.515625},{x:.171875,y:.515625},{x:.171875,y:.515625},{x:.203125,y:.515625},{x:.203125,y:.515625},{x:.234375,y:.515625},{x:.234375,y:.515625},{x:.265625,y:.515625},{x:.265625,y:.515625},{x:.296875,y:.515625},{x:.296875,y:.515625},{x:.328125,y:.515625},{x:.328125,y:.515625},{x:.359375,y:.515625},{x:.359375,y:.515625},{x:.390625,y:.515625},{x:.390625,y:.515625},{x:.421875,y:.515625},{x:.421875,y:.515625},{x:.453125,y:.515625},{x:.453125,y:.515625},{x:.484375,y:.515625},{x:.484375,y:.515625},{x:.515625,y:.515625},{x:.515625,y:.515625},{x:.546875,y:.515625},{x:.546875,y:.515625},{x:.578125,y:.515625},{x:.578125,y:.515625},{x:.609375,y:.515625},{x:.609375,y:.515625},{x:.640625,y:.515625},{x:.640625,y:.515625},{x:.671875,y:.515625},{x:.671875,y:.515625},{x:.703125,y:.515625},{x:.703125,y:.515625},{x:.734375,y:.515625},{x:.734375,y:.515625},{x:.765625,y:.515625},{x:.765625,y:.515625},{x:.796875,y:.515625},{x:.796875,y:.515625},{x:.828125,y:.515625},{x:.828125,y:.515625},{x:.859375,y:.515625},{x:.859375,y:.515625},{x:.890625,y:.515625},{x:.890625,y:.515625},{x:.921875,y:.515625},{x:.921875,y:.515625},{x:.953125,y:.515625},{x:.953125,y:.515625},{x:.984375,y:.515625},{x:.984375,y:.515625},{x:.015625,y:.546875},{x:.015625,y:.546875},{x:.046875,y:.546875},{x:.046875,y:.546875},{x:.078125,y:.546875},{x:.078125,y:.546875},{x:.109375,y:.546875},{x:.109375,y:.546875},{x:.140625,y:.546875},{x:.140625,y:.546875},{x:.171875,y:.546875},{x:.171875,y:.546875},{x:.203125,y:.546875},{x:.203125,y:.546875},{x:.234375,y:.546875},{x:.234375,y:.546875},{x:.265625,y:.546875},{x:.265625,y:.546875},{x:.296875,y:.546875},{x:.296875,y:.546875},{x:.328125,y:.546875},{x:.328125,y:.546875},{x:.359375,y:.546875},{x:.359375,y:.546875},{x:.390625,y:.546875},{x:.390625,y:.546875},{x:.421875,y:.546875},{x:.421875,y:.546875},{x:.453125,y:.546875},{x:.453125,y:.546875},{x:.484375,y:.546875},{x:.484375,y:.546875},{x:.515625,y:.546875},{x:.515625,y:.546875},{x:.546875,y:.546875},{x:.546875,y:.546875},{x:.578125,y:.546875},{x:.578125,y:.546875},{x:.609375,y:.546875},{x:.609375,y:.546875},{x:.640625,y:.546875},{x:.640625,y:.546875},{x:.671875,y:.546875},{x:.671875,y:.546875},{x:.703125,y:.546875},{x:.703125,y:.546875},{x:.734375,y:.546875},{x:.734375,y:.546875},{x:.765625,y:.546875},{x:.765625,y:.546875},{x:.796875,y:.546875},{x:.796875,y:.546875},{x:.828125,y:.546875},{x:.828125,y:.546875},{x:.859375,y:.546875},{x:.859375,y:.546875},{x:.890625,y:.546875},{x:.890625,y:.546875},{x:.921875,y:.546875},{x:.921875,y:.546875},{x:.953125,y:.546875},{x:.953125,y:.546875},{x:.984375,y:.546875},{x:.984375,y:.546875},{x:.015625,y:.578125},{x:.015625,y:.578125},{x:.046875,y:.578125},{x:.046875,y:.578125},{x:.078125,y:.578125},{x:.078125,y:.578125},{x:.109375,y:.578125},{x:.109375,y:.578125},{x:.140625,y:.578125},{x:.140625,y:.578125},{x:.171875,y:.578125},{x:.171875,y:.578125},{x:.203125,y:.578125},{x:.203125,y:.578125},{x:.234375,y:.578125},{x:.234375,y:.578125},{x:.265625,y:.578125},{x:.265625,y:.578125},{x:.296875,y:.578125},{x:.296875,y:.578125},{x:.328125,y:.578125},{x:.328125,y:.578125},{x:.359375,y:.578125},{x:.359375,y:.578125},{x:.390625,y:.578125},{x:.390625,y:.578125},{x:.421875,y:.578125},{x:.421875,y:.578125},{x:.453125,y:.578125},{x:.453125,y:.578125},{x:.484375,y:.578125},{x:.484375,y:.578125},{x:.515625,y:.578125},{x:.515625,y:.578125},{x:.546875,y:.578125},{x:.546875,y:.578125},{x:.578125,y:.578125},{x:.578125,y:.578125},{x:.609375,y:.578125},{x:.609375,y:.578125},{x:.640625,y:.578125},{x:.640625,y:.578125},{x:.671875,y:.578125},{x:.671875,y:.578125},{x:.703125,y:.578125},{x:.703125,y:.578125},{x:.734375,y:.578125},{x:.734375,y:.578125},{x:.765625,y:.578125},{x:.765625,y:.578125},{x:.796875,y:.578125},{x:.796875,y:.578125},{x:.828125,y:.578125},{x:.828125,y:.578125},{x:.859375,y:.578125},{x:.859375,y:.578125},{x:.890625,y:.578125},{x:.890625,y:.578125},{x:.921875,y:.578125},{x:.921875,y:.578125},{x:.953125,y:.578125},{x:.953125,y:.578125},{x:.984375,y:.578125},{x:.984375,y:.578125},{x:.015625,y:.609375},{x:.015625,y:.609375},{x:.046875,y:.609375},{x:.046875,y:.609375},{x:.078125,y:.609375},{x:.078125,y:.609375},{x:.109375,y:.609375},{x:.109375,y:.609375},{x:.140625,y:.609375},{x:.140625,y:.609375},{x:.171875,y:.609375},{x:.171875,y:.609375},{x:.203125,y:.609375},{x:.203125,y:.609375},{x:.234375,y:.609375},{x:.234375,y:.609375},{x:.265625,y:.609375},{x:.265625,y:.609375},{x:.296875,y:.609375},{x:.296875,y:.609375},{x:.328125,y:.609375},{x:.328125,y:.609375},{x:.359375,y:.609375},{x:.359375,y:.609375},{x:.390625,y:.609375},{x:.390625,y:.609375},{x:.421875,y:.609375},{x:.421875,y:.609375},{x:.453125,y:.609375},{x:.453125,y:.609375},{x:.484375,y:.609375},{x:.484375,y:.609375},{x:.515625,y:.609375},{x:.515625,y:.609375},{x:.546875,y:.609375},{x:.546875,y:.609375},{x:.578125,y:.609375},{x:.578125,y:.609375},{x:.609375,y:.609375},{x:.609375,y:.609375},{x:.640625,y:.609375},{x:.640625,y:.609375},{x:.671875,y:.609375},{x:.671875,y:.609375},{x:.703125,y:.609375},{x:.703125,y:.609375},{x:.734375,y:.609375},{x:.734375,y:.609375},{x:.765625,y:.609375},{x:.765625,y:.609375},{x:.796875,y:.609375},{x:.796875,y:.609375},{x:.828125,y:.609375},{x:.828125,y:.609375},{x:.859375,y:.609375},{x:.859375,y:.609375},{x:.890625,y:.609375},{x:.890625,y:.609375},{x:.921875,y:.609375},{x:.921875,y:.609375},{x:.953125,y:.609375},{x:.953125,y:.609375},{x:.984375,y:.609375},{x:.984375,y:.609375},{x:.015625,y:.640625},{x:.015625,y:.640625},{x:.046875,y:.640625},{x:.046875,y:.640625},{x:.078125,y:.640625},{x:.078125,y:.640625},{x:.109375,y:.640625},{x:.109375,y:.640625},{x:.140625,y:.640625},{x:.140625,y:.640625},{x:.171875,y:.640625},{x:.171875,y:.640625},{x:.203125,y:.640625},{x:.203125,y:.640625},{x:.234375,y:.640625},{x:.234375,y:.640625},{x:.265625,y:.640625},{x:.265625,y:.640625},{x:.296875,y:.640625},{x:.296875,y:.640625},{x:.328125,y:.640625},{x:.328125,y:.640625},{x:.359375,y:.640625},{x:.359375,y:.640625},{x:.390625,y:.640625},{x:.390625,y:.640625},{x:.421875,y:.640625},{x:.421875,y:.640625},{x:.453125,y:.640625},{x:.453125,y:.640625},{x:.484375,y:.640625},{x:.484375,y:.640625},{x:.515625,y:.640625},{x:.515625,y:.640625},{x:.546875,y:.640625},{x:.546875,y:.640625},{x:.578125,y:.640625},{x:.578125,y:.640625},{x:.609375,y:.640625},{x:.609375,y:.640625},{x:.640625,y:.640625},{x:.640625,y:.640625},{x:.671875,y:.640625},{x:.671875,y:.640625},{x:.703125,y:.640625},{x:.703125,y:.640625},{x:.734375,y:.640625},{x:.734375,y:.640625},{x:.765625,y:.640625},{x:.765625,y:.640625},{x:.796875,y:.640625},{x:.796875,y:.640625},{x:.828125,y:.640625},{x:.828125,y:.640625},{x:.859375,y:.640625},{x:.859375,y:.640625},{x:.890625,y:.640625},{x:.890625,y:.640625},{x:.921875,y:.640625},{x:.921875,y:.640625},{x:.953125,y:.640625},{x:.953125,y:.640625},{x:.984375,y:.640625},{x:.984375,y:.640625},{x:.015625,y:.671875},{x:.015625,y:.671875},{x:.046875,y:.671875},{x:.046875,y:.671875},{x:.078125,y:.671875},{x:.078125,y:.671875},{x:.109375,y:.671875},{x:.109375,y:.671875},{x:.140625,y:.671875},{x:.140625,y:.671875},{x:.171875,y:.671875},{x:.171875,y:.671875},{x:.203125,y:.671875},{x:.203125,y:.671875},{x:.234375,y:.671875},{x:.234375,y:.671875},{x:.265625,y:.671875},{x:.265625,y:.671875},{x:.296875,y:.671875},{x:.296875,y:.671875},{x:.328125,y:.671875},{x:.328125,y:.671875},{x:.359375,y:.671875},{x:.359375,y:.671875},{x:.390625,y:.671875},{x:.390625,y:.671875},{x:.421875,y:.671875},{x:.421875,y:.671875},{x:.453125,y:.671875},{x:.453125,y:.671875},{x:.484375,y:.671875},{x:.484375,y:.671875},{x:.515625,y:.671875},{x:.515625,y:.671875},{x:.546875,y:.671875},{x:.546875,y:.671875},{x:.578125,y:.671875},{x:.578125,y:.671875},{x:.609375,y:.671875},{x:.609375,y:.671875},{x:.640625,y:.671875},{x:.640625,y:.671875},{x:.671875,y:.671875},{x:.671875,y:.671875},{x:.703125,y:.671875},{x:.703125,y:.671875},{x:.734375,y:.671875},{x:.734375,y:.671875},{x:.765625,y:.671875},{x:.765625,y:.671875},{x:.796875,y:.671875},{x:.796875,y:.671875},{x:.828125,y:.671875},{x:.828125,y:.671875},{x:.859375,y:.671875},{x:.859375,y:.671875},{x:.890625,y:.671875},{x:.890625,y:.671875},{x:.921875,y:.671875},{x:.921875,y:.671875},{x:.953125,y:.671875},{x:.953125,y:.671875},{x:.984375,y:.671875},{x:.984375,y:.671875},{x:.015625,y:.703125},{x:.015625,y:.703125},{x:.046875,y:.703125},{x:.046875,y:.703125},{x:.078125,y:.703125},{x:.078125,y:.703125},{x:.109375,y:.703125},{x:.109375,y:.703125},{x:.140625,y:.703125},{x:.140625,y:.703125},{x:.171875,y:.703125},{x:.171875,y:.703125},{x:.203125,y:.703125},{x:.203125,y:.703125},{x:.234375,y:.703125},{x:.234375,y:.703125},{x:.265625,y:.703125},{x:.265625,y:.703125},{x:.296875,y:.703125},{x:.296875,y:.703125},{x:.328125,y:.703125},{x:.328125,y:.703125},{x:.359375,y:.703125},{x:.359375,y:.703125},{x:.390625,y:.703125},{x:.390625,y:.703125},{x:.421875,y:.703125},{x:.421875,y:.703125},{x:.453125,y:.703125},{x:.453125,y:.703125},{x:.484375,y:.703125},{x:.484375,y:.703125},{x:.515625,y:.703125},{x:.515625,y:.703125},{x:.546875,y:.703125},{x:.546875,y:.703125},{x:.578125,y:.703125},{x:.578125,y:.703125},{x:.609375,y:.703125},{x:.609375,y:.703125},{x:.640625,y:.703125},{x:.640625,y:.703125},{x:.671875,y:.703125},{x:.671875,y:.703125},{x:.703125,y:.703125},{x:.703125,y:.703125},{x:.734375,y:.703125},{x:.734375,y:.703125},{x:.765625,y:.703125},{x:.765625,y:.703125},{x:.796875,y:.703125},{x:.796875,y:.703125},{x:.828125,y:.703125},{x:.828125,y:.703125},{x:.859375,y:.703125},{x:.859375,y:.703125},{x:.890625,y:.703125},{x:.890625,y:.703125},{x:.921875,y:.703125},{x:.921875,y:.703125},{x:.953125,y:.703125},{x:.953125,y:.703125},{x:.984375,y:.703125},{x:.984375,y:.703125},{x:.015625,y:.734375},{x:.015625,y:.734375},{x:.046875,y:.734375},{x:.046875,y:.734375},{x:.078125,y:.734375},{x:.078125,y:.734375},{x:.109375,y:.734375},{x:.109375,y:.734375},{x:.140625,y:.734375},{x:.140625,y:.734375},{x:.171875,y:.734375},{x:.171875,y:.734375},{x:.203125,y:.734375},{x:.203125,y:.734375},{x:.234375,y:.734375},{x:.234375,y:.734375},{x:.265625,y:.734375},{x:.265625,y:.734375},{x:.296875,y:.734375},{x:.296875,y:.734375},{x:.328125,y:.734375},{x:.328125,y:.734375},{x:.359375,y:.734375},{x:.359375,y:.734375},{x:.390625,y:.734375},{x:.390625,y:.734375},{x:.421875,y:.734375},{x:.421875,y:.734375},{x:.453125,y:.734375},{x:.453125,y:.734375},{x:.484375,y:.734375},{x:.484375,y:.734375},{x:.515625,y:.734375},{x:.515625,y:.734375},{x:.546875,y:.734375},{x:.546875,y:.734375},{x:.578125,y:.734375},{x:.578125,y:.734375},{x:.609375,y:.734375},{x:.609375,y:.734375},{x:.640625,y:.734375},{x:.640625,y:.734375},{x:.671875,y:.734375},{x:.671875,y:.734375},{x:.703125,y:.734375},{x:.703125,y:.734375},{x:.734375,y:.734375},{x:.734375,y:.734375},{x:.765625,y:.734375},{x:.765625,y:.734375},{x:.796875,y:.734375},{x:.796875,y:.734375},{x:.828125,y:.734375},{x:.828125,y:.734375},{x:.859375,y:.734375},{x:.859375,y:.734375},{x:.890625,y:.734375},{x:.890625,y:.734375},{x:.921875,y:.734375},{x:.921875,y:.734375},{x:.953125,y:.734375},{x:.953125,y:.734375},{x:.984375,y:.734375},{x:.984375,y:.734375},{x:.015625,y:.765625},{x:.015625,y:.765625},{x:.046875,y:.765625},{x:.046875,y:.765625},{x:.078125,y:.765625},{x:.078125,y:.765625},{x:.109375,y:.765625},{x:.109375,y:.765625},{x:.140625,y:.765625},{x:.140625,y:.765625},{x:.171875,y:.765625},{x:.171875,y:.765625},{x:.203125,y:.765625},{x:.203125,y:.765625},{x:.234375,y:.765625},{x:.234375,y:.765625},{x:.265625,y:.765625},{x:.265625,y:.765625},{x:.296875,y:.765625},{x:.296875,y:.765625},{x:.328125,y:.765625},{x:.328125,y:.765625},{x:.359375,y:.765625},{x:.359375,y:.765625},{x:.390625,y:.765625},{x:.390625,y:.765625},{x:.421875,y:.765625},{x:.421875,y:.765625},{x:.453125,y:.765625},{x:.453125,y:.765625},{x:.484375,y:.765625},{x:.484375,y:.765625},{x:.515625,y:.765625},{x:.515625,y:.765625},{x:.546875,y:.765625},{x:.546875,y:.765625},{x:.578125,y:.765625},{x:.578125,y:.765625},{x:.609375,y:.765625},{x:.609375,y:.765625},{x:.640625,y:.765625},{x:.640625,y:.765625},{x:.671875,y:.765625},{x:.671875,y:.765625},{x:.703125,y:.765625},{x:.703125,y:.765625},{x:.734375,y:.765625},{x:.734375,y:.765625},{x:.765625,y:.765625},{x:.765625,y:.765625},{x:.796875,y:.765625},{x:.796875,y:.765625},{x:.828125,y:.765625},{x:.828125,y:.765625},{x:.859375,y:.765625},{x:.859375,y:.765625},{x:.890625,y:.765625},{x:.890625,y:.765625},{x:.921875,y:.765625},{x:.921875,y:.765625},{x:.953125,y:.765625},{x:.953125,y:.765625},{x:.984375,y:.765625},{x:.984375,y:.765625},{x:.015625,y:.796875},{x:.015625,y:.796875},{x:.046875,y:.796875},{x:.046875,y:.796875},{x:.078125,y:.796875},{x:.078125,y:.796875},{x:.109375,y:.796875},{x:.109375,y:.796875},{x:.140625,y:.796875},{x:.140625,y:.796875},{x:.171875,y:.796875},{x:.171875,y:.796875},{x:.203125,y:.796875},{x:.203125,y:.796875},{x:.234375,y:.796875},{x:.234375,y:.796875},{x:.265625,y:.796875},{x:.265625,y:.796875},{x:.296875,y:.796875},{x:.296875,y:.796875},{x:.328125,y:.796875},{x:.328125,y:.796875},{x:.359375,y:.796875},{x:.359375,y:.796875},{x:.390625,y:.796875},{x:.390625,y:.796875},{x:.421875,y:.796875},{x:.421875,y:.796875},{x:.453125,y:.796875},{x:.453125,y:.796875},{x:.484375,y:.796875},{x:.484375,y:.796875},{x:.515625,y:.796875},{x:.515625,y:.796875},{x:.546875,y:.796875},{x:.546875,y:.796875},{x:.578125,y:.796875},{x:.578125,y:.796875},{x:.609375,y:.796875},{x:.609375,y:.796875},{x:.640625,y:.796875},{x:.640625,y:.796875},{x:.671875,y:.796875},{x:.671875,y:.796875},{x:.703125,y:.796875},{x:.703125,y:.796875},{x:.734375,y:.796875},{x:.734375,y:.796875},{x:.765625,y:.796875},{x:.765625,y:.796875},{x:.796875,y:.796875},{x:.796875,y:.796875},{x:.828125,y:.796875},{x:.828125,y:.796875},{x:.859375,y:.796875},{x:.859375,y:.796875},{x:.890625,y:.796875},{x:.890625,y:.796875},{x:.921875,y:.796875},{x:.921875,y:.796875},{x:.953125,y:.796875},{x:.953125,y:.796875},{x:.984375,y:.796875},{x:.984375,y:.796875},{x:.015625,y:.828125},{x:.015625,y:.828125},{x:.046875,y:.828125},{x:.046875,y:.828125},{x:.078125,y:.828125},{x:.078125,y:.828125},{x:.109375,y:.828125},{x:.109375,y:.828125},{x:.140625,y:.828125},{x:.140625,y:.828125},{x:.171875,y:.828125},{x:.171875,y:.828125},{x:.203125,y:.828125},{x:.203125,y:.828125},{x:.234375,y:.828125},{x:.234375,y:.828125},{x:.265625,y:.828125},{x:.265625,y:.828125},{x:.296875,y:.828125},{x:.296875,y:.828125},{x:.328125,y:.828125},{x:.328125,y:.828125},{x:.359375,y:.828125},{x:.359375,y:.828125},{x:.390625,y:.828125},{x:.390625,y:.828125},{x:.421875,y:.828125},{x:.421875,y:.828125},{x:.453125,y:.828125},{x:.453125,y:.828125},{x:.484375,y:.828125},{x:.484375,y:.828125},{x:.515625,y:.828125},{x:.515625,y:.828125},{x:.546875,y:.828125},{x:.546875,y:.828125},{x:.578125,y:.828125},{x:.578125,y:.828125},{x:.609375,y:.828125},{x:.609375,y:.828125},{x:.640625,y:.828125},{x:.640625,y:.828125},{x:.671875,y:.828125},{x:.671875,y:.828125},{x:.703125,y:.828125},{x:.703125,y:.828125},{x:.734375,y:.828125},{x:.734375,y:.828125},{x:.765625,y:.828125},{x:.765625,y:.828125},{x:.796875,y:.828125},{x:.796875,y:.828125},{x:.828125,y:.828125},{x:.828125,y:.828125},{x:.859375,y:.828125},{x:.859375,y:.828125},{x:.890625,y:.828125},{x:.890625,y:.828125},{x:.921875,y:.828125},{x:.921875,y:.828125},{x:.953125,y:.828125},{x:.953125,y:.828125},{x:.984375,y:.828125},{x:.984375,y:.828125},{x:.015625,y:.859375},{x:.015625,y:.859375},{x:.046875,y:.859375},{x:.046875,y:.859375},{x:.078125,y:.859375},{x:.078125,y:.859375},{x:.109375,y:.859375},{x:.109375,y:.859375},{x:.140625,y:.859375},{x:.140625,y:.859375},{x:.171875,y:.859375},{x:.171875,y:.859375},{x:.203125,y:.859375},{x:.203125,y:.859375},{x:.234375,y:.859375},{x:.234375,y:.859375},{x:.265625,y:.859375},{x:.265625,y:.859375},{x:.296875,y:.859375},{x:.296875,y:.859375},{x:.328125,y:.859375},{x:.328125,y:.859375},{x:.359375,y:.859375},{x:.359375,y:.859375},{x:.390625,y:.859375},{x:.390625,y:.859375},{x:.421875,y:.859375},{x:.421875,y:.859375},{x:.453125,y:.859375},{x:.453125,y:.859375},{x:.484375,y:.859375},{x:.484375,y:.859375},{x:.515625,y:.859375},{x:.515625,y:.859375},{x:.546875,y:.859375},{x:.546875,y:.859375},{x:.578125,y:.859375},{x:.578125,y:.859375},{x:.609375,y:.859375},{x:.609375,y:.859375},{x:.640625,y:.859375},{x:.640625,y:.859375},{x:.671875,y:.859375},{x:.671875,y:.859375},{x:.703125,y:.859375},{x:.703125,y:.859375},{x:.734375,y:.859375},{x:.734375,y:.859375},{x:.765625,y:.859375},{x:.765625,y:.859375},{x:.796875,y:.859375},{x:.796875,y:.859375},{x:.828125,y:.859375},{x:.828125,y:.859375},{x:.859375,y:.859375},{x:.859375,y:.859375},{x:.890625,y:.859375},{x:.890625,y:.859375},{x:.921875,y:.859375},{x:.921875,y:.859375},{x:.953125,y:.859375},{x:.953125,y:.859375},{x:.984375,y:.859375},{x:.984375,y:.859375},{x:.015625,y:.890625},{x:.015625,y:.890625},{x:.046875,y:.890625},{x:.046875,y:.890625},{x:.078125,y:.890625},{x:.078125,y:.890625},{x:.109375,y:.890625},{x:.109375,y:.890625},{x:.140625,y:.890625},{x:.140625,y:.890625},{x:.171875,y:.890625},{x:.171875,y:.890625},{x:.203125,y:.890625},{x:.203125,y:.890625},{x:.234375,y:.890625},{x:.234375,y:.890625},{x:.265625,y:.890625},{x:.265625,y:.890625},{x:.296875,y:.890625},{x:.296875,y:.890625},{x:.328125,y:.890625},{x:.328125,y:.890625},{x:.359375,y:.890625},{x:.359375,y:.890625},{x:.390625,y:.890625},{x:.390625,y:.890625},{x:.421875,y:.890625},{x:.421875,y:.890625},{x:.453125,y:.890625},{x:.453125,y:.890625},{x:.484375,y:.890625},{x:.484375,y:.890625},{x:.515625,y:.890625},{x:.515625,y:.890625},{x:.546875,y:.890625},{x:.546875,y:.890625},{x:.578125,y:.890625},{x:.578125,y:.890625},{x:.609375,y:.890625},{x:.609375,y:.890625},{x:.640625,y:.890625},{x:.640625,y:.890625},{x:.671875,y:.890625},{x:.671875,y:.890625},{x:.703125,y:.890625},{x:.703125,y:.890625},{x:.734375,y:.890625},{x:.734375,y:.890625},{x:.765625,y:.890625},{x:.765625,y:.890625},{x:.796875,y:.890625},{x:.796875,y:.890625},{x:.828125,y:.890625},{x:.828125,y:.890625},{x:.859375,y:.890625},{x:.859375,y:.890625},{x:.890625,y:.890625},{x:.890625,y:.890625},{x:.921875,y:.890625},{x:.921875,y:.890625},{x:.953125,y:.890625},{x:.953125,y:.890625},{x:.984375,y:.890625},{x:.984375,y:.890625},{x:.015625,y:.921875},{x:.015625,y:.921875},{x:.046875,y:.921875},{x:.046875,y:.921875},{x:.078125,y:.921875},{x:.078125,y:.921875},{x:.109375,y:.921875},{x:.109375,y:.921875},{x:.140625,y:.921875},{x:.140625,y:.921875},{x:.171875,y:.921875},{x:.171875,y:.921875},{x:.203125,y:.921875},{x:.203125,y:.921875},{x:.234375,y:.921875},{x:.234375,y:.921875},{x:.265625,y:.921875},{x:.265625,y:.921875},{x:.296875,y:.921875},{x:.296875,y:.921875},{x:.328125,y:.921875},{x:.328125,y:.921875},{x:.359375,y:.921875},{x:.359375,y:.921875},{x:.390625,y:.921875},{x:.390625,y:.921875},{x:.421875,y:.921875},{x:.421875,y:.921875},{x:.453125,y:.921875},{x:.453125,y:.921875},{x:.484375,y:.921875},{x:.484375,y:.921875},{x:.515625,y:.921875},{x:.515625,y:.921875},{x:.546875,y:.921875},{x:.546875,y:.921875},{x:.578125,y:.921875},{x:.578125,y:.921875},{x:.609375,y:.921875},{x:.609375,y:.921875},{x:.640625,y:.921875},{x:.640625,y:.921875},{x:.671875,y:.921875},{x:.671875,y:.921875},{x:.703125,y:.921875},{x:.703125,y:.921875},{x:.734375,y:.921875},{x:.734375,y:.921875},{x:.765625,y:.921875},{x:.765625,y:.921875},{x:.796875,y:.921875},{x:.796875,y:.921875},{x:.828125,y:.921875},{x:.828125,y:.921875},{x:.859375,y:.921875},{x:.859375,y:.921875},{x:.890625,y:.921875},{x:.890625,y:.921875},{x:.921875,y:.921875},{x:.921875,y:.921875},{x:.953125,y:.921875},{x:.953125,y:.921875},{x:.984375,y:.921875},{x:.984375,y:.921875},{x:.015625,y:.953125},{x:.015625,y:.953125},{x:.046875,y:.953125},{x:.046875,y:.953125},{x:.078125,y:.953125},{x:.078125,y:.953125},{x:.109375,y:.953125},{x:.109375,y:.953125},{x:.140625,y:.953125},{x:.140625,y:.953125},{x:.171875,y:.953125},{x:.171875,y:.953125},{x:.203125,y:.953125},{x:.203125,y:.953125},{x:.234375,y:.953125},{x:.234375,y:.953125},{x:.265625,y:.953125},{x:.265625,y:.953125},{x:.296875,y:.953125},{x:.296875,y:.953125},{x:.328125,y:.953125},{x:.328125,y:.953125},{x:.359375,y:.953125},{x:.359375,y:.953125},{x:.390625,y:.953125},{x:.390625,y:.953125},{x:.421875,y:.953125},{x:.421875,y:.953125},{x:.453125,y:.953125},{x:.453125,y:.953125},{x:.484375,y:.953125},{x:.484375,y:.953125},{x:.515625,y:.953125},{x:.515625,y:.953125},{x:.546875,y:.953125},{x:.546875,y:.953125},{x:.578125,y:.953125},{x:.578125,y:.953125},{x:.609375,y:.953125},{x:.609375,y:.953125},{x:.640625,y:.953125},{x:.640625,y:.953125},{x:.671875,y:.953125},{x:.671875,y:.953125},{x:.703125,y:.953125},{x:.703125,y:.953125},{x:.734375,y:.953125},{x:.734375,y:.953125},{x:.765625,y:.953125},{x:.765625,y:.953125},{x:.796875,y:.953125},{x:.796875,y:.953125},{x:.828125,y:.953125},{x:.828125,y:.953125},{x:.859375,y:.953125},{x:.859375,y:.953125},{x:.890625,y:.953125},{x:.890625,y:.953125},{x:.921875,y:.953125},{x:.921875,y:.953125},{x:.953125,y:.953125},{x:.953125,y:.953125},{x:.984375,y:.953125},{x:.984375,y:.953125},{x:.015625,y:.984375},{x:.015625,y:.984375},{x:.046875,y:.984375},{x:.046875,y:.984375},{x:.078125,y:.984375},{x:.078125,y:.984375},{x:.109375,y:.984375},{x:.109375,y:.984375},{x:.140625,y:.984375},{x:.140625,y:.984375},{x:.171875,y:.984375},{x:.171875,y:.984375},{x:.203125,y:.984375},{x:.203125,y:.984375},{x:.234375,y:.984375},{x:.234375,y:.984375},{x:.265625,y:.984375},{x:.265625,y:.984375},{x:.296875,y:.984375},{x:.296875,y:.984375},{x:.328125,y:.984375},{x:.328125,y:.984375},{x:.359375,y:.984375},{x:.359375,y:.984375},{x:.390625,y:.984375},{x:.390625,y:.984375},{x:.421875,y:.984375},{x:.421875,y:.984375},{x:.453125,y:.984375},{x:.453125,y:.984375},{x:.484375,y:.984375},{x:.484375,y:.984375},{x:.515625,y:.984375},{x:.515625,y:.984375},{x:.546875,y:.984375},{x:.546875,y:.984375},{x:.578125,y:.984375},{x:.578125,y:.984375},{x:.609375,y:.984375},{x:.609375,y:.984375},{x:.640625,y:.984375},{x:.640625,y:.984375},{x:.671875,y:.984375},{x:.671875,y:.984375},{x:.703125,y:.984375},{x:.703125,y:.984375},{x:.734375,y:.984375},{x:.734375,y:.984375},{x:.765625,y:.984375},{x:.765625,y:.984375},{x:.796875,y:.984375},{x:.796875,y:.984375},{x:.828125,y:.984375},{x:.828125,y:.984375},{x:.859375,y:.984375},{x:.859375,y:.984375},{x:.890625,y:.984375},{x:.890625,y:.984375},{x:.921875,y:.984375},{x:.921875,y:.984375},{x:.953125,y:.984375},{x:.953125,y:.984375},{x:.984375,y:.984375},{x:.984375,y:.984375},{x:.03125,y:.03125},{x:.03125,y:.03125},{x:.09375,y:.03125},{x:.09375,y:.03125},{x:.15625,y:.03125},{x:.15625,y:.03125},{x:.21875,y:.03125},{x:.21875,y:.03125},{x:.28125,y:.03125},{x:.28125,y:.03125},{x:.34375,y:.03125},{x:.34375,y:.03125},{x:.40625,y:.03125},{x:.40625,y:.03125},{x:.46875,y:.03125},{x:.46875,y:.03125},{x:.53125,y:.03125},{x:.53125,y:.03125},{x:.59375,y:.03125},{x:.59375,y:.03125},{x:.65625,y:.03125},{x:.65625,y:.03125},{x:.71875,y:.03125},{x:.71875,y:.03125},{x:.78125,y:.03125},{x:.78125,y:.03125},{x:.84375,y:.03125},{x:.84375,y:.03125},{x:.90625,y:.03125},{x:.90625,y:.03125},{x:.96875,y:.03125},{x:.96875,y:.03125},{x:.03125,y:.09375},{x:.03125,y:.09375},{x:.09375,y:.09375},{x:.09375,y:.09375},{x:.15625,y:.09375},{x:.15625,y:.09375},{x:.21875,y:.09375},{x:.21875,y:.09375},{x:.28125,y:.09375},{x:.28125,y:.09375},{x:.34375,y:.09375},{x:.34375,y:.09375},{x:.40625,y:.09375},{x:.40625,y:.09375},{x:.46875,y:.09375},{x:.46875,y:.09375},{x:.53125,y:.09375},{x:.53125,y:.09375},{x:.59375,y:.09375},{x:.59375,y:.09375},{x:.65625,y:.09375},{x:.65625,y:.09375},{x:.71875,y:.09375},{x:.71875,y:.09375},{x:.78125,y:.09375},{x:.78125,y:.09375},{x:.84375,y:.09375},{x:.84375,y:.09375},{x:.90625,y:.09375},{x:.90625,y:.09375},{x:.96875,y:.09375},{x:.96875,y:.09375},{x:.03125,y:.15625},{x:.03125,y:.15625},{x:.09375,y:.15625},{x:.09375,y:.15625},{x:.15625,y:.15625},{x:.15625,y:.15625},{x:.21875,y:.15625},{x:.21875,y:.15625},{x:.28125,y:.15625},{x:.28125,y:.15625},{x:.34375,y:.15625},{x:.34375,y:.15625},{x:.40625,y:.15625},{x:.40625,y:.15625},{x:.46875,y:.15625},{x:.46875,y:.15625},{x:.53125,y:.15625},{x:.53125,y:.15625},{x:.59375,y:.15625},{x:.59375,y:.15625},{x:.65625,y:.15625},{x:.65625,y:.15625},{x:.71875,y:.15625},{x:.71875,y:.15625},{x:.78125,y:.15625},{x:.78125,y:.15625},{x:.84375,y:.15625},{x:.84375,y:.15625},{x:.90625,y:.15625},{x:.90625,y:.15625},{x:.96875,y:.15625},{x:.96875,y:.15625},{x:.03125,y:.21875},{x:.03125,y:.21875},{x:.09375,y:.21875},{x:.09375,y:.21875},{x:.15625,y:.21875},{x:.15625,y:.21875},{x:.21875,y:.21875},{x:.21875,y:.21875},{x:.28125,y:.21875},{x:.28125,y:.21875},{x:.34375,y:.21875},{x:.34375,y:.21875},{x:.40625,y:.21875},{x:.40625,y:.21875},{x:.46875,y:.21875},{x:.46875,y:.21875},{x:.53125,y:.21875},{x:.53125,y:.21875},{x:.59375,y:.21875},{x:.59375,y:.21875},{x:.65625,y:.21875},{x:.65625,y:.21875},{x:.71875,y:.21875},{x:.71875,y:.21875},{x:.78125,y:.21875},{x:.78125,y:.21875},{x:.84375,y:.21875},{x:.84375,y:.21875},{x:.90625,y:.21875},{x:.90625,y:.21875},{x:.96875,y:.21875},{x:.96875,y:.21875},{x:.03125,y:.28125},{x:.03125,y:.28125},{x:.09375,y:.28125},{x:.09375,y:.28125},{x:.15625,y:.28125},{x:.15625,y:.28125},{x:.21875,y:.28125},{x:.21875,y:.28125},{x:.28125,y:.28125},{x:.28125,y:.28125},{x:.34375,y:.28125},{x:.34375,y:.28125},{x:.40625,y:.28125},{x:.40625,y:.28125},{x:.46875,y:.28125},{x:.46875,y:.28125},{x:.53125,y:.28125},{x:.53125,y:.28125},{x:.59375,y:.28125},{x:.59375,y:.28125},{x:.65625,y:.28125},{x:.65625,y:.28125},{x:.71875,y:.28125},{x:.71875,y:.28125},{x:.78125,y:.28125},{x:.78125,y:.28125},{x:.84375,y:.28125},{x:.84375,y:.28125},{x:.90625,y:.28125},{x:.90625,y:.28125},{x:.96875,y:.28125},{x:.96875,y:.28125},{x:.03125,y:.34375},{x:.03125,y:.34375},{x:.09375,y:.34375},{x:.09375,y:.34375},{x:.15625,y:.34375},{x:.15625,y:.34375},{x:.21875,y:.34375},{x:.21875,y:.34375},{x:.28125,y:.34375},{x:.28125,y:.34375},{x:.34375,y:.34375},{x:.34375,y:.34375},{x:.40625,y:.34375},{x:.40625,y:.34375},{x:.46875,y:.34375},{x:.46875,y:.34375},{x:.53125,y:.34375},{x:.53125,y:.34375},{x:.59375,y:.34375},{x:.59375,y:.34375},{x:.65625,y:.34375},{x:.65625,y:.34375},{x:.71875,y:.34375},{x:.71875,y:.34375},{x:.78125,y:.34375},{x:.78125,y:.34375},{x:.84375,y:.34375},{x:.84375,y:.34375},{x:.90625,y:.34375},{x:.90625,y:.34375},{x:.96875,y:.34375},{x:.96875,y:.34375},{x:.03125,y:.40625},{x:.03125,y:.40625},{x:.09375,y:.40625},{x:.09375,y:.40625},{x:.15625,y:.40625},{x:.15625,y:.40625},{x:.21875,y:.40625},{x:.21875,y:.40625},{x:.28125,y:.40625},{x:.28125,y:.40625},{x:.34375,y:.40625},{x:.34375,y:.40625},{x:.40625,y:.40625},{x:.40625,y:.40625},{x:.46875,y:.40625},{x:.46875,y:.40625},{x:.53125,y:.40625},{x:.53125,y:.40625},{x:.59375,y:.40625},{x:.59375,y:.40625},{x:.65625,y:.40625},{x:.65625,y:.40625},{x:.71875,y:.40625},{x:.71875,y:.40625},{x:.78125,y:.40625},{x:.78125,y:.40625},{x:.84375,y:.40625},{x:.84375,y:.40625},{x:.90625,y:.40625},{x:.90625,y:.40625},{x:.96875,y:.40625},{x:.96875,y:.40625},{x:.03125,y:.46875},{x:.03125,y:.46875},{x:.09375,y:.46875},{x:.09375,y:.46875},{x:.15625,y:.46875},{x:.15625,y:.46875},{x:.21875,y:.46875},{x:.21875,y:.46875},{x:.28125,y:.46875},{x:.28125,y:.46875},{x:.34375,y:.46875},{x:.34375,y:.46875},{x:.40625,y:.46875},{x:.40625,y:.46875},{x:.46875,y:.46875},{x:.46875,y:.46875},{x:.53125,y:.46875},{x:.53125,y:.46875},{x:.59375,y:.46875},{x:.59375,y:.46875},{x:.65625,y:.46875},{x:.65625,y:.46875},{x:.71875,y:.46875},{x:.71875,y:.46875},{x:.78125,y:.46875},{x:.78125,y:.46875},{x:.84375,y:.46875},{x:.84375,y:.46875},{x:.90625,y:.46875},{x:.90625,y:.46875},{x:.96875,y:.46875},{x:.96875,y:.46875},{x:.03125,y:.53125},{x:.03125,y:.53125},{x:.09375,y:.53125},{x:.09375,y:.53125},{x:.15625,y:.53125},{x:.15625,y:.53125},{x:.21875,y:.53125},{x:.21875,y:.53125},{x:.28125,y:.53125},{x:.28125,y:.53125},{x:.34375,y:.53125},{x:.34375,y:.53125},{x:.40625,y:.53125},{x:.40625,y:.53125},{x:.46875,y:.53125},{x:.46875,y:.53125},{x:.53125,y:.53125},{x:.53125,y:.53125},{x:.59375,y:.53125},{x:.59375,y:.53125},{x:.65625,y:.53125},{x:.65625,y:.53125},{x:.71875,y:.53125},{x:.71875,y:.53125},{x:.78125,y:.53125},{x:.78125,y:.53125},{x:.84375,y:.53125},{x:.84375,y:.53125},{x:.90625,y:.53125},{x:.90625,y:.53125},{x:.96875,y:.53125},{x:.96875,y:.53125},{x:.03125,y:.59375},{x:.03125,y:.59375},{x:.09375,y:.59375},{x:.09375,y:.59375},{x:.15625,y:.59375},{x:.15625,y:.59375},{x:.21875,y:.59375},{x:.21875,y:.59375},{x:.28125,y:.59375},{x:.28125,y:.59375},{x:.34375,y:.59375},{x:.34375,y:.59375},{x:.40625,y:.59375},{x:.40625,y:.59375},{x:.46875,y:.59375},{x:.46875,y:.59375},{x:.53125,y:.59375},{x:.53125,y:.59375},{x:.59375,y:.59375},{x:.59375,y:.59375},{x:.65625,y:.59375},{x:.65625,y:.59375},{x:.71875,y:.59375},{x:.71875,y:.59375},{x:.78125,y:.59375},{x:.78125,y:.59375},{x:.84375,y:.59375},{x:.84375,y:.59375},{x:.90625,y:.59375},{x:.90625,y:.59375},{x:.96875,y:.59375},{x:.96875,y:.59375},{x:.03125,y:.65625},{x:.03125,y:.65625},{x:.09375,y:.65625},{x:.09375,y:.65625},{x:.15625,y:.65625},{x:.15625,y:.65625},{x:.21875,y:.65625},{x:.21875,y:.65625},{x:.28125,y:.65625},{x:.28125,y:.65625},{x:.34375,y:.65625},{x:.34375,y:.65625},{x:.40625,y:.65625},{x:.40625,y:.65625},{x:.46875,y:.65625},{x:.46875,y:.65625},{x:.53125,y:.65625},{x:.53125,y:.65625},{x:.59375,y:.65625},{x:.59375,y:.65625},{x:.65625,y:.65625},{x:.65625,y:.65625},{x:.71875,y:.65625},{x:.71875,y:.65625},{x:.78125,y:.65625},{x:.78125,y:.65625},{x:.84375,y:.65625},{x:.84375,y:.65625},{x:.90625,y:.65625},{x:.90625,y:.65625},{x:.96875,y:.65625},{x:.96875,y:.65625},{x:.03125,y:.71875},{x:.03125,y:.71875},{x:.09375,y:.71875},{x:.09375,y:.71875},{x:.15625,y:.71875},{x:.15625,y:.71875},{x:.21875,y:.71875},{x:.21875,y:.71875},{x:.28125,y:.71875},{x:.28125,y:.71875},{x:.34375,y:.71875},{x:.34375,y:.71875},{x:.40625,y:.71875},{x:.40625,y:.71875},{x:.46875,y:.71875},{x:.46875,y:.71875},{x:.53125,y:.71875},{x:.53125,y:.71875},{x:.59375,y:.71875},{x:.59375,y:.71875},{x:.65625,y:.71875},{x:.65625,y:.71875},{x:.71875,y:.71875},{x:.71875,y:.71875},{x:.78125,y:.71875},{x:.78125,y:.71875},{x:.84375,y:.71875},{x:.84375,y:.71875},{x:.90625,y:.71875},{x:.90625,y:.71875},{x:.96875,y:.71875},{x:.96875,y:.71875},{x:.03125,y:.78125},{x:.03125,y:.78125},{x:.09375,y:.78125},{x:.09375,y:.78125},{x:.15625,y:.78125},{x:.15625,y:.78125},{x:.21875,y:.78125},{x:.21875,y:.78125},{x:.28125,y:.78125},{x:.28125,y:.78125},{x:.34375,y:.78125},{x:.34375,y:.78125},{x:.40625,y:.78125},{x:.40625,y:.78125},{x:.46875,y:.78125},{x:.46875,y:.78125},{x:.53125,y:.78125},{x:.53125,y:.78125},{x:.59375,y:.78125},{x:.59375,y:.78125},{x:.65625,y:.78125},{x:.65625,y:.78125},{x:.71875,y:.78125},{x:.71875,y:.78125},{x:.78125,y:.78125},{x:.78125,y:.78125},{x:.84375,y:.78125},{x:.84375,y:.78125},{x:.90625,y:.78125},{x:.90625,y:.78125},{x:.96875,y:.78125},{x:.96875,y:.78125},{x:.03125,y:.84375},{x:.03125,y:.84375},{x:.09375,y:.84375},{x:.09375,y:.84375},{x:.15625,y:.84375},{x:.15625,y:.84375},{x:.21875,y:.84375},{x:.21875,y:.84375},{x:.28125,y:.84375},{x:.28125,y:.84375},{x:.34375,y:.84375},{x:.34375,y:.84375},{x:.40625,y:.84375},{x:.40625,y:.84375},{x:.46875,y:.84375},{x:.46875,y:.84375},{x:.53125,y:.84375},{x:.53125,y:.84375},{x:.59375,y:.84375},{x:.59375,y:.84375},{x:.65625,y:.84375},{x:.65625,y:.84375},{x:.71875,y:.84375},{x:.71875,y:.84375},{x:.78125,y:.84375},{x:.78125,y:.84375},{x:.84375,y:.84375},{x:.84375,y:.84375},{x:.90625,y:.84375},{x:.90625,y:.84375},{x:.96875,y:.84375},{x:.96875,y:.84375},{x:.03125,y:.90625},{x:.03125,y:.90625},{x:.09375,y:.90625},{x:.09375,y:.90625},{x:.15625,y:.90625},{x:.15625,y:.90625},{x:.21875,y:.90625},{x:.21875,y:.90625},{x:.28125,y:.90625},{x:.28125,y:.90625},{x:.34375,y:.90625},{x:.34375,y:.90625},{x:.40625,y:.90625},{x:.40625,y:.90625},{x:.46875,y:.90625},{x:.46875,y:.90625},{x:.53125,y:.90625},{x:.53125,y:.90625},{x:.59375,y:.90625},{x:.59375,y:.90625},{x:.65625,y:.90625},{x:.65625,y:.90625},{x:.71875,y:.90625},{x:.71875,y:.90625},{x:.78125,y:.90625},{x:.78125,y:.90625},{x:.84375,y:.90625},{x:.84375,y:.90625},{x:.90625,y:.90625},{x:.90625,y:.90625},{x:.96875,y:.90625},{x:.96875,y:.90625},{x:.03125,y:.96875},{x:.03125,y:.96875},{x:.09375,y:.96875},{x:.09375,y:.96875},{x:.15625,y:.96875},{x:.15625,y:.96875},{x:.21875,y:.96875},{x:.21875,y:.96875},{x:.28125,y:.96875},{x:.28125,y:.96875},{x:.34375,y:.96875},{x:.34375,y:.96875},{x:.40625,y:.96875},{x:.40625,y:.96875},{x:.46875,y:.96875},{x:.46875,y:.96875},{x:.53125,y:.96875},{x:.53125,y:.96875},{x:.59375,y:.96875},{x:.59375,y:.96875},{x:.65625,y:.96875},{x:.65625,y:.96875},{x:.71875,y:.96875},{x:.71875,y:.96875},{x:.78125,y:.96875},{x:.78125,y:.96875},{x:.84375,y:.96875},{x:.84375,y:.96875},{x:.90625,y:.96875},{x:.90625,y:.96875},{x:.96875,y:.96875},{x:.96875,y:.96875},{x:.0625,y:.0625},{x:.0625,y:.0625},{x:.0625,y:.0625},{x:.0625,y:.0625},{x:.0625,y:.0625},{x:.0625,y:.0625},{x:.1875,y:.0625},{x:.1875,y:.0625},{x:.1875,y:.0625},{x:.1875,y:.0625},{x:.1875,y:.0625},{x:.1875,y:.0625},{x:.3125,y:.0625},{x:.3125,y:.0625},{x:.3125,y:.0625},{x:.3125,y:.0625},{x:.3125,y:.0625},{x:.3125,y:.0625},{x:.4375,y:.0625},{x:.4375,y:.0625},{x:.4375,y:.0625},{x:.4375,y:.0625},{x:.4375,y:.0625},{x:.4375,y:.0625},{x:.5625,y:.0625},{x:.5625,y:.0625},{x:.5625,y:.0625},{x:.5625,y:.0625},{x:.5625,y:.0625},{x:.5625,y:.0625},{x:.6875,y:.0625},{x:.6875,y:.0625},{x:.6875,y:.0625},{x:.6875,y:.0625},{x:.6875,y:.0625},{x:.6875,y:.0625},{x:.8125,y:.0625},{x:.8125,y:.0625},{x:.8125,y:.0625},{x:.8125,y:.0625},{x:.8125,y:.0625},{x:.8125,y:.0625},{x:.9375,y:.0625},{x:.9375,y:.0625},{x:.9375,y:.0625},{x:.9375,y:.0625},{x:.9375,y:.0625},{x:.9375,y:.0625},{x:.0625,y:.1875},{x:.0625,y:.1875},{x:.0625,y:.1875},{x:.0625,y:.1875},{x:.0625,y:.1875},{x:.0625,y:.1875},{x:.1875,y:.1875},{x:.1875,y:.1875},{x:.1875,y:.1875},{x:.1875,y:.1875},{x:.1875,y:.1875},{x:.1875,y:.1875},{x:.3125,y:.1875},{x:.3125,y:.1875},{x:.3125,y:.1875},{x:.3125,y:.1875},{x:.3125,y:.1875},{x:.3125,y:.1875},{x:.4375,y:.1875},{x:.4375,y:.1875},{x:.4375,y:.1875},{x:.4375,y:.1875},{x:.4375,y:.1875},{x:.4375,y:.1875},{x:.5625,y:.1875},{x:.5625,y:.1875},{x:.5625,y:.1875},{x:.5625,y:.1875},{x:.5625,y:.1875},{x:.5625,y:.1875},{x:.6875,y:.1875},{x:.6875,y:.1875},{x:.6875,y:.1875},{x:.6875,y:.1875},{x:.6875,y:.1875},{x:.6875,y:.1875},{x:.8125,y:.1875},{x:.8125,y:.1875},{x:.8125,y:.1875},{x:.8125,y:.1875},{x:.8125,y:.1875},{x:.8125,y:.1875},{x:.9375,y:.1875},{x:.9375,y:.1875},{x:.9375,y:.1875},{x:.9375,y:.1875},{x:.9375,y:.1875},{x:.9375,y:.1875},{x:.0625,y:.3125},{x:.0625,y:.3125},{x:.0625,y:.3125},{x:.0625,y:.3125},{x:.0625,y:.3125},{x:.0625,y:.3125},{x:.1875,y:.3125},{x:.1875,y:.3125},{x:.1875,y:.3125},{x:.1875,y:.3125},{x:.1875,y:.3125},{x:.1875,y:.3125},{x:.3125,y:.3125},{x:.3125,y:.3125},{x:.3125,y:.3125},{x:.3125,y:.3125},{x:.3125,y:.3125},{x:.3125,y:.3125},{x:.4375,y:.3125},{x:.4375,y:.3125},{x:.4375,y:.3125},{x:.4375,y:.3125},{x:.4375,y:.3125},{x:.4375,y:.3125},{x:.5625,y:.3125},{x:.5625,y:.3125},{x:.5625,y:.3125},{x:.5625,y:.3125},{x:.5625,y:.3125},{x:.5625,y:.3125},{x:.6875,y:.3125},{x:.6875,y:.3125},{x:.6875,y:.3125},{x:.6875,y:.3125},{x:.6875,y:.3125},{x:.6875,y:.3125},{x:.8125,y:.3125},{x:.8125,y:.3125},{x:.8125,y:.3125},{x:.8125,y:.3125},{x:.8125,y:.3125},{x:.8125,y:.3125},{x:.9375,y:.3125},{x:.9375,y:.3125},{x:.9375,y:.3125},{x:.9375,y:.3125},{x:.9375,y:.3125},{x:.9375,y:.3125},{x:.0625,y:.4375},{x:.0625,y:.4375},{x:.0625,y:.4375},{x:.0625,y:.4375},{x:.0625,y:.4375},{x:.0625,y:.4375},{x:.1875,y:.4375},{x:.1875,y:.4375},{x:.1875,y:.4375},{x:.1875,y:.4375},{x:.1875,y:.4375},{x:.1875,y:.4375},{x:.3125,y:.4375},{x:.3125,y:.4375},{x:.3125,y:.4375},{x:.3125,y:.4375},{x:.3125,y:.4375},{x:.3125,y:.4375},{x:.4375,y:.4375},{x:.4375,y:.4375},{x:.4375,y:.4375},{x:.4375,y:.4375},{x:.4375,y:.4375},{x:.4375,y:.4375},{x:.5625,y:.4375},{x:.5625,y:.4375},{x:.5625,y:.4375},{x:.5625,y:.4375},{x:.5625,y:.4375},{x:.5625,y:.4375},{x:.6875,y:.4375},{x:.6875,y:.4375},{x:.6875,y:.4375},{x:.6875,y:.4375},{x:.6875,y:.4375},{x:.6875,y:.4375},{x:.8125,y:.4375},{x:.8125,y:.4375},{x:.8125,y:.4375},{x:.8125,y:.4375},{x:.8125,y:.4375},{x:.8125,y:.4375},{x:.9375,y:.4375},{x:.9375,y:.4375},{x:.9375,y:.4375},{x:.9375,y:.4375},{x:.9375,y:.4375},{x:.9375,y:.4375},{x:.0625,y:.5625},{x:.0625,y:.5625},{x:.0625,y:.5625},{x:.0625,y:.5625},{x:.0625,y:.5625},{x:.0625,y:.5625},{x:.1875,y:.5625},{x:.1875,y:.5625},{x:.1875,y:.5625},{x:.1875,y:.5625},{x:.1875,y:.5625},{x:.1875,y:.5625},{x:.3125,y:.5625},{x:.3125,y:.5625},{x:.3125,y:.5625},{x:.3125,y:.5625},{x:.3125,y:.5625},{x:.3125,y:.5625},{x:.4375,y:.5625},{x:.4375,y:.5625},{x:.4375,y:.5625},{x:.4375,y:.5625},{x:.4375,y:.5625},{x:.4375,y:.5625},{x:.5625,y:.5625},{x:.5625,y:.5625},{x:.5625,y:.5625},{x:.5625,y:.5625},{x:.5625,y:.5625},{x:.5625,y:.5625},{x:.6875,y:.5625},{x:.6875,y:.5625},{x:.6875,y:.5625},{x:.6875,y:.5625},{x:.6875,y:.5625},{x:.6875,y:.5625},{x:.8125,y:.5625},{x:.8125,y:.5625},{x:.8125,y:.5625},{x:.8125,y:.5625},{x:.8125,y:.5625},{x:.8125,y:.5625},{x:.9375,y:.5625},{x:.9375,y:.5625},{x:.9375,y:.5625},{x:.9375,y:.5625},{x:.9375,y:.5625},{x:.9375,y:.5625},{x:.0625,y:.6875},{x:.0625,y:.6875},{x:.0625,y:.6875},{x:.0625,y:.6875},{x:.0625,y:.6875},{x:.0625,y:.6875},{x:.1875,y:.6875},{x:.1875,y:.6875},{x:.1875,y:.6875},{x:.1875,y:.6875},{x:.1875,y:.6875},{x:.1875,y:.6875},{x:.3125,y:.6875},{x:.3125,y:.6875},{x:.3125,y:.6875},{x:.3125,y:.6875},{x:.3125,y:.6875},{x:.3125,y:.6875},{x:.4375,y:.6875},{x:.4375,y:.6875},{x:.4375,y:.6875},{x:.4375,y:.6875},{x:.4375,y:.6875},{x:.4375,y:.6875},{x:.5625,y:.6875},{x:.5625,y:.6875},{x:.5625,y:.6875},{x:.5625,y:.6875},{x:.5625,y:.6875},{x:.5625,y:.6875},{x:.6875,y:.6875},{x:.6875,y:.6875},{x:.6875,y:.6875},{x:.6875,y:.6875},{x:.6875,y:.6875},{x:.6875,y:.6875},{x:.8125,y:.6875},{x:.8125,y:.6875},{x:.8125,y:.6875},{x:.8125,y:.6875},{x:.8125,y:.6875},{x:.8125,y:.6875},{x:.9375,y:.6875},{x:.9375,y:.6875},{x:.9375,y:.6875},{x:.9375,y:.6875},{x:.9375,y:.6875},{x:.9375,y:.6875},{x:.0625,y:.8125},{x:.0625,y:.8125},{x:.0625,y:.8125},{x:.0625,y:.8125},{x:.0625,y:.8125},{x:.0625,y:.8125},{x:.1875,y:.8125},{x:.1875,y:.8125},{x:.1875,y:.8125},{x:.1875,y:.8125},{x:.1875,y:.8125},{x:.1875,y:.8125},{x:.3125,y:.8125},{x:.3125,y:.8125},{x:.3125,y:.8125},{x:.3125,y:.8125},{x:.3125,y:.8125},{x:.3125,y:.8125},{x:.4375,y:.8125},{x:.4375,y:.8125},{x:.4375,y:.8125},{x:.4375,y:.8125},{x:.4375,y:.8125},{x:.4375,y:.8125},{x:.5625,y:.8125},{x:.5625,y:.8125},{x:.5625,y:.8125},{x:.5625,y:.8125},{x:.5625,y:.8125},{x:.5625,y:.8125},{x:.6875,y:.8125},{x:.6875,y:.8125},{x:.6875,y:.8125},{x:.6875,y:.8125},{x:.6875,y:.8125},{x:.6875,y:.8125},{x:.8125,y:.8125},{x:.8125,y:.8125},{x:.8125,y:.8125},{x:.8125,y:.8125},{x:.8125,y:.8125},{x:.8125,y:.8125},{x:.9375,y:.8125},{x:.9375,y:.8125},{x:.9375,y:.8125},{x:.9375,y:.8125},{x:.9375,y:.8125},{x:.9375,y:.8125},{x:.0625,y:.9375},{x:.0625,y:.9375},{x:.0625,y:.9375},{x:.0625,y:.9375},{x:.0625,y:.9375},{x:.0625,y:.9375},{x:.1875,y:.9375},{x:.1875,y:.9375},{x:.1875,y:.9375},{x:.1875,y:.9375},{x:.1875,y:.9375},{x:.1875,y:.9375},{x:.3125,y:.9375},{x:.3125,y:.9375},{x:.3125,y:.9375},{x:.3125,y:.9375},{x:.3125,y:.9375},{x:.3125,y:.9375},{x:.4375,y:.9375},{x:.4375,y:.9375},{x:.4375,y:.9375},{x:.4375,y:.9375},{x:.4375,y:.9375},{x:.4375,y:.9375},{x:.5625,y:.9375},{x:.5625,y:.9375},{x:.5625,y:.9375},{x:.5625,y:.9375},{x:.5625,y:.9375},{x:.5625,y:.9375},{x:.6875,y:.9375},{x:.6875,y:.9375},{x:.6875,y:.9375},{x:.6875,y:.9375},{x:.6875,y:.9375},{x:.6875,y:.9375},{x:.8125,y:.9375},{x:.8125,y:.9375},{x:.8125,y:.9375},{x:.8125,y:.9375},{x:.8125,y:.9375},{x:.8125,y:.9375},{x:.9375,y:.9375},{x:.9375,y:.9375},{x:.9375,y:.9375},{x:.9375,y:.9375},{x:.9375,y:.9375},{x:.9375,y:.9375}];var I5=class{constructor(e){var t;this.model=e,this.anchors=UA.map(o=>[o.x,o.y]),this.anchorsTensor=s.tensor2d(this.anchors),this.inputSize=(t=this.model)==null?void 0:t.inputs[0].shape[2],this.inputSizeTensor=s.tensor1d([this.inputSize,this.inputSize]),this.doubleInputSizeTensor=s.tensor1d([this.inputSize*2,this.inputSize*2])}normalizeBoxes(e){return s.tidy(()=>{let t=s.slice(e,[0,0],[-1,2]),o=s.slice(e,[0,2],[-1,2]),n=s.add(s.div(t,this.inputSizeTensor),this.anchorsTensor),x=s.div(o,this.doubleInputSizeTensor),a=s.mul(s.sub(n,x),this.inputSizeTensor),r=s.mul(s.add(n,x),this.inputSizeTensor);return s.concat2d([a,r],1)})}normalizeLandmarks(e,t){return s.tidy(()=>{let o=s.add(s.div(e.reshape([-1,7,2]),this.inputSizeTensor),this.anchors[t]);return s.mul(o,this.inputSizeTensor)})}async getBoxes(e,t){let o=this.model.predict(e),n=s.squeeze(o);o.dispose();let x=s.tidy(()=>s.sigmoid(s.slice(n,[0,0],[-1,1])).squeeze()),a=x.dataSync(),r=s.slice(n,[0,1],[-1,4]),y=this.normalizeBoxes(r);r.dispose();let i=await s.image.nonMaxSuppressionAsync(y,a,t.hand.maxDetected,t.hand.iouThreshold,t.hand.minConfidence),c=i.arraySync();x.dispose(),i.dispose();let l=[];for(let f of c)if(a[f]>=t.hand.minConfidence){let h=s.slice(y,[f,0],[1,-1]),E=s.slice(n,[f,5],[1,14]),d=s.tidy(()=>this.normalizeLandmarks(E,f).reshape([-1,2]));E.dispose(),l.push({box:h,palmLandmarks:d,confidence:a[f]})}return n.dispose(),y.dispose(),l}async estimateHandBounds(e,t){let o=e.shape[1],n=e.shape[2],x=s.tidy(()=>e.resizeBilinear([this.inputSize,this.inputSize]).div(127.5).sub(1)),a=await this.getBoxes(x,t);x.dispose();let r=[];if(!a||a.length===0)return r;for(let y of a){let i=y.box.dataSync(),c=i.slice(0,2),l=i.slice(2,4),f=y.palmLandmarks.arraySync();y.box.dispose(),y.palmLandmarks.dispose(),r.push(BA({startPoint:c,endPoint:l,palmLandmarks:f,confidence:y.confidence},[n/this.inputSize,o/this.inputSize]))}return r}};function Ce(A){return A-2*Math.PI*Math.floor((A+Math.PI)/(2*Math.PI))}function JA(A,e){let t=Math.PI/2-Math.atan2(-(e[1]-A[1]),e[0]-A[0]);return Ce(t)}var YA=(A,e)=>[[1,0,A],[0,1,e],[0,0,1]];function i0(A,e){let t=0;for(let o=0;oa[0]),o=e.map(a=>a[1]),n=[Math.min(...t),Math.min(...o)],x=[Math.max(...t),Math.max(...o)];return{startPoint:n,endPoint:x}}getBoxForPalmLandmarks(e,t){let o=e.map(x=>O5([...x,1],t)),n=this.calculateLandmarksBoundingBox(o);return J0(Y0(n),Be)}getBoxForHandLandmarks(e){let t=this.calculateLandmarksBoundingBox(e),o=J0(Y0(t),KA);o.palmLandmarks=[];for(let n=0;n[a[0]*(h[0]-this.inputSize/2),a[1]*(h[1]-this.inputSize/2),a[2]*h[2]]),y=N5(o,[0,0]),i=r.map(h=>[...O5(h,y),h[2]]),c=DA(n),l=[...S0(t),1],f=[i0(l,c[0]),i0(l,c[1])];return i.map(h=>[Math.trunc(h[0]+f[0]),Math.trunc(h[1]+f[1]),Math.trunc(h[2])])}async estimateHands(e,t){let o=!1,n;(this.skipped===0||this.skipped>t.hand.skipFrames||!t.hand.landmarks||!t.skipFrame)&&(n=await this.handDetector.estimateHandBounds(e,t),this.skipped=0),t.skipFrame&&this.skipped++,n&&n.length>0&&(n.length!==this.detectedHands&&this.detectedHands!==t.hand.maxDetected||!t.hand.landmarks)&&(this.detectedHands=0,this.storedBoxes=[...n],this.storedBoxes.length>0&&(o=!0));let x=[];for(let a=0;a=t.hand.minConfidence){let R=s.reshape(z,[-1,3]),W=R.arraySync();z.dispose(),R.dispose();let M=this.transformRawCoords(W,h,y,f),u=this.getBoxForHandLandmarks(M);this.storedBoxes[a]={...u,confidence:w};let T={landmarks:M,confidence:w,box:{topLeft:u.startPoint,bottomRight:u.endPoint}};x.push(T)}else this.storedBoxes[a]=null;z.dispose()}else{let y=J0(Y0(r),KA),i={confidence:r.confidence,box:{topLeft:y.startPoint,bottomRight:y.endPoint}};x.push(i)}}return this.storedBoxes=this.storedBoxes.filter(a=>a!==null),this.detectedHands=x.length,x}};var _A={thumb:[1,2,3,4],indexFinger:[5,6,7,8],middleFinger:[9,10,11,12],ringFinger:[13,14,15,16],pinky:[17,18,19,20],palmBase:[0]},a0,x0,$A;async function H5(A,e){let t=await $A.estimateHands(A,e);if(!t)return[];let o=[];for(let n=0;nt[n].landmarks[c]);let a=t[n].landmarks,r=[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,0,0],y=[0,0,0,0];if(a&&a.length>0){for(let i of a)i[0]r[2]&&(r[2]=i[0]),i[1]>r[3]&&(r[3]=i[1]);r[2]-=r[0],r[3]-=r[1],y=[r[0]/(A.shape[2]||0),r[1]/(A.shape[1]||0),r[2]/(A.shape[2]||0),r[3]/(A.shape[1]||0)]}else r=t[n].box?[Math.trunc(Math.max(0,t[n].box.topLeft[0])),Math.trunc(Math.max(0,t[n].box.topLeft[1])),Math.trunc(Math.min(A.shape[2]||0,t[n].box.bottomRight[0])-Math.max(0,t[n].box.topLeft[0])),Math.trunc(Math.min(A.shape[1]||0,t[n].box.bottomRight[1])-Math.max(0,t[n].box.topLeft[1]))]:[0,0,0,0],y=[t[n].box.topLeft[0]/(A.shape[2]||0),t[n].box.topLeft[1]/(A.shape[1]||0),(t[n].box.bottomRight[0]-t[n].box.topLeft[0])/(A.shape[2]||0),(t[n].box.bottomRight[1]-t[n].box.topLeft[1])/(A.shape[1]||0)];o.push({id:n,score:Math.round(100*t[n].confidence)/100,box:r,boxRaw:y,keypoints:a,annotations:x})}return o}async function Z5(A){!a0||!x0?([a0,x0]=await Promise.all([A.hand.enabled?s.loadGraphModel(L(A.modelBasePath,A.hand.detector.modelPath),{fromTFHub:A.hand.detector.modelPath.includes("tfhub.dev")}):null,A.hand.landmarks?s.loadGraphModel(L(A.modelBasePath,A.hand.skeleton.modelPath),{fromTFHub:A.hand.skeleton.modelPath.includes("tfhub.dev")}):null]),A.hand.enabled&&(!a0||!a0.modelUrl?g("load model failed:",A.hand.detector.modelPath):A.debug&&g("load model:",a0.modelUrl),!x0||!x0.modelUrl?g("load model failed:",A.hand.skeleton.modelPath):A.debug&&g("load model:",x0.modelUrl))):(A.debug&&g("cached model:",a0.modelUrl),A.debug&&g("cached model:",x0.modelUrl));let e=new I5(a0);return $A=new L5(e,x0),[a0,x0]}var Ae=["nose","leftEyeInside","leftEye","leftEyeOutside","rightEyeInside","rightEye","rightEyeOutside","leftEar","rightEar","leftMouth","rightMouth","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftPalm","rightPalm","leftIndex","rightIndex","leftPinky","rightPinky","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle","leftHeel","rightHeel","leftFoot","rightFoot","midHip","forehead","leftThumb","leftHand","rightThumb","rightHand"],ee=["nose","leftEyeInside","leftEye","leftEyeOutside","rightEyeInside","rightEye","rightEyeOutside","leftEar","rightEar","leftMouth","rightMouth","leftShoulder","rightShoulder","leftElbow","rightElbow","left:15","right:16","left:17","right:18","left:19","right:20","left:21","right:22","leftChest","rightChest","neck","forehead","left:27","right:28","left:29","right:30"];var q;async function G0(A){return q?A.debug&&g("cached model:",q.modelUrl):(q=await s.loadGraphModel(L(A.modelBasePath,A.body.modelPath)),q.width=parseInt(q.signature.inputs["input_1:0"].tensorShape.dim[2].size),q.height=parseInt(q.signature.inputs["input_1:0"].tensorShape.dim[1].size),!q||!q.modelUrl?g("load model failed:",A.body.modelPath):A.debug&&g("load model:",q.modelUrl)),q}async function V5(A,e){var d;if(!q)return[];if(!e.body.enabled)return[];let t={width:A.shape[2]||0,height:A.shape[1]||0},o=s.image.resizeBilinear(A,[q.width,q.height],!1),n=s.div(o,[255]);o.dispose();let x=await q.predict(n),a=((d=x.find(m=>m.size===195||m.size===155))==null?void 0:d.dataSync())||[];x.forEach(m=>m.dispose()),n.dispose();let r=[],y=(a==null?void 0:a.length)===195?Ae:ee,i=5;for(let m=0;mm.position[0]),l=r.map(m=>m.position[1]),f=[Math.min(...c),Math.min(...l),Math.max(...c)-Math.min(...c),Math.max(...l)-Math.min(...c)],h=[0,0,0,0],E=r.reduce((m,z)=>z.score>m?z.score:m,0);return[{id:0,score:E,box:f,boxRaw:h,keypoints:r}]}var B,n0=[],X5=[0,0,0,0],F5=[0,0,0,0],D0=0,C5=Number.MAX_SAFE_INTEGER,Ye=["head","neck","rightShoulder","rightElbow","rightWrist","chest","leftShoulder","leftElbow","leftWrist","pelvis","rightHip","rightKnee","rightAnkle","leftHip","leftKnee","leftAnkle"];async function te(A){return B?A.debug&&g("cached model:",B.modelUrl):(B=await s.loadGraphModel(L(A.modelBasePath,A.body.modelPath)),!B||!B.modelUrl?g("load model failed:",A.body.modelPath):A.debug&&g("load model:",B.modelUrl)),B}function Ge(A,e){let[t,o]=A.shape;return s.tidy(()=>{let n=(r,y)=>s.sub(r,s.mul(s.div(r,s.scalar(y,"int32")),s.scalar(y,"int32"))),x=s.reshape(A,[o*t]),a=s.max(x,0).dataSync()[0];if(a>e){let r=s.argMax(x,0),y=n(r,t).dataSync()[0],i=s.div(r,s.scalar(t,"int32")).dataSync()[0];return[y,i,a]}return[0,0,a]})}async function q5(A,e){return C50?(C5++,[{id:0,score:D0,box:X5,boxRaw:F5,keypoints:n0}]):(C5=0,new Promise(async t=>{let o=s.tidy(()=>{if(!B.inputs[0].shape)return null;let i=s.image.resizeBilinear(A,[B.inputs[0].shape[2],B.inputs[0].shape[1]],!1);return s.mul(i,2).sub(1)}),n;if(e.body.enabled&&(n=await B.predict(o)),o.dispose(),n){n0.length=0;let i=n.squeeze();s.dispose(n);let c=i.unstack(2);s.dispose(i);for(let l=0;le.body.minConfidence&&n0.push({score:Math.round(100*E)/100,part:Ye[l],positionRaw:[f/B.inputs[0].shape[2],h/B.inputs[0].shape[1]],position:[Math.round(A.shape[2]*f/B.inputs[0].shape[2]),Math.round(A.shape[1]*h/B.inputs[0].shape[1])]})}c.forEach(l=>s.dispose(l))}D0=n0.reduce((i,c)=>c.score>i?c.score:i,0);let x=n0.map(i=>i.position[0]),a=n0.map(i=>i.position[1]);X5=[Math.min(...x),Math.min(...a),Math.max(...x)-Math.min(...x),Math.max(...a)-Math.min(...a)];let r=n0.map(i=>i.positionRaw[0]),y=n0.map(i=>i.positionRaw[1]);F5=[Math.min(...r),Math.min(...y),Math.max(...r)-Math.min(...r),Math.max(...y)-Math.min(...y)],t([{id:0,score:D0,box:X5,boxRaw:F5,keypoints:n0}])}))}var e0,o0=[],B5=[0,0,0,0],U5=[0,0,0,0],g0=0,J5=Number.MAX_SAFE_INTEGER,De=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"];async function Y5(A){return e0?A.debug&&g("cached model:",e0.modelUrl):(e0=await s.loadGraphModel(L(A.modelBasePath,A.body.modelPath)),!e0||!e0.modelUrl?g("load model failed:",A.body.modelPath):A.debug&&g("load model:",e0.modelUrl)),e0}async function G5(A,e){return J50?(J5++,[{id:0,score:g0,box:B5,boxRaw:U5,keypoints:o0}]):(J5=0,new Promise(async t=>{let o=s.tidy(()=>{if(!e0.inputs[0].shape)return null;let i=s.image.resizeBilinear(A,[e0.inputs[0].shape[2],e0.inputs[0].shape[1]],!1);return s.cast(i,"int32")}),n;if(e.body.enabled&&(n=await e0.predict(o)),o.dispose(),n){o0.length=0;let i=n.arraySync();s.dispose(n);let c=i[0][0];for(let l=0;le.body.minConfidence&&o0.push({score:Math.round(100*g0)/100,part:De[l],positionRaw:[c[l][1],c[l][0]],position:[Math.round((A.shape[2]||0)*c[l][1]),Math.round((A.shape[1]||0)*c[l][0])]})}g0=o0.reduce((i,c)=>c.score>i?c.score:i,0);let x=o0.map(i=>i.position[0]),a=o0.map(i=>i.position[1]);B5=[Math.min(...x),Math.min(...a),Math.max(...x)-Math.min(...x),Math.max(...a)-Math.min(...a)];let r=o0.map(i=>i.positionRaw[0]),y=o0.map(i=>i.positionRaw[1]);U5=[Math.min(...r),Math.min(...y),Math.max(...r)-Math.min(...r),Math.max(...y)-Math.min(...y)],t([{id:0,score:g0,box:B5,boxRaw:U5,keypoints:o0}])}))}var M0=[{class:1,label:"person"},{class:2,label:"bicycle"},{class:3,label:"car"},{class:4,label:"motorcycle"},{class:5,label:"airplane"},{class:6,label:"bus"},{class:7,label:"train"},{class:8,label:"truck"},{class:9,label:"boat"},{class:10,label:"traffic light"},{class:11,label:"fire hydrant"},{class:12,label:"stop sign"},{class:13,label:"parking meter"},{class:14,label:"bench"},{class:15,label:"bird"},{class:16,label:"cat"},{class:17,label:"dog"},{class:18,label:"horse"},{class:19,label:"sheep"},{class:20,label:"cow"},{class:21,label:"elephant"},{class:22,label:"bear"},{class:23,label:"zebra"},{class:24,label:"giraffe"},{class:25,label:"backpack"},{class:26,label:"umbrella"},{class:27,label:"handbag"},{class:28,label:"tie"},{class:29,label:"suitcase"},{class:30,label:"frisbee"},{class:31,label:"skis"},{class:32,label:"snowboard"},{class:33,label:"sports ball"},{class:34,label:"kite"},{class:35,label:"baseball bat"},{class:36,label:"baseball glove"},{class:37,label:"skateboard"},{class:38,label:"surfboard"},{class:39,label:"tennis racket"},{class:40,label:"bottle"},{class:41,label:"wine glass"},{class:42,label:"cup"},{class:43,label:"fork"},{class:44,label:"knife"},{class:45,label:"spoon"},{class:46,label:"bowl"},{class:47,label:"banana"},{class:48,label:"apple"},{class:49,label:"sandwich"},{class:50,label:"orange"},{class:51,label:"broccoli"},{class:52,label:"carrot"},{class:53,label:"hot dog"},{class:54,label:"pizza"},{class:55,label:"donut"},{class:56,label:"cake"},{class:57,label:"chair"},{class:58,label:"couch"},{class:59,label:"potted plant"},{class:60,label:"bed"},{class:61,label:"dining table"},{class:62,label:"toilet"},{class:63,label:"tv"},{class:64,label:"laptop"},{class:65,label:"mouse"},{class:66,label:"remote"},{class:67,label:"keyboard"},{class:68,label:"cell phone"},{class:69,label:"microwave"},{class:70,label:"oven"},{class:71,label:"toaster"},{class:72,label:"sink"},{class:73,label:"refrigerator"},{class:74,label:"book"},{class:75,label:"clock"},{class:76,label:"vase"},{class:77,label:"scissors"},{class:78,label:"teddy bear"},{class:79,label:"hair drier"},{class:80,label:"toothbrush"}];var G,D5=[],K5=Number.MAX_SAFE_INTEGER,K0=2.5;async function Q5(A){if(G)A.debug&&g("cached model:",G.modelUrl);else{G=await s.loadGraphModel(L(A.modelBasePath,A.object.modelPath));let e=Object.values(G.modelSignature.inputs);if(G.inputSize=Array.isArray(e)?parseInt(e[0].tensorShape.dim[2].size):null,!G.inputSize)throw new Error(`Human: Cannot determine model inputSize: ${A.object.modelPath}`);!G||!G.modelUrl?g("load model failed:",A.object.modelPath):A.debug&&g("load model:",G.modelUrl)}return G}async function Ke(A,e,t,o){let n=0,x=[];for(let i of[1,2,4])s.tidy(()=>{var m,z;let c=i*13,l=(m=A.find(w=>w.shape[1]===c**2&&w.shape[2]===M0.length))==null?void 0:m.squeeze(),f=(z=A.find(w=>w.shape[1]===c**2&&w.shape[2]o.object.minConfidence&&R!==61){let M=(.5+Math.trunc(w%c))/c,u=(.5+Math.trunc(w/c))/c,T=E[w].map(F=>F*(c/i/e)),[P,b]=[M-K0/i*T[0],u-K0/i*T[1]],[k,Z]=[M+K0/i*T[2]-P,u+K0/i*T[3]-b],N=[P,b,k,Z];N=N.map(F=>Math.max(0,Math.min(F,1)));let O=[N[0]*t[0],N[1]*t[1],N[2]*t[0],N[3]*t[1]],v={id:n++,score:Math.round(100*W)/100,class:R+1,label:M0[R].label,box:O.map(F=>Math.trunc(F)),boxRaw:N};x.push(v)}}});A.forEach(i=>s.dispose(i));let a=x.map(i=>[i.boxRaw[1],i.boxRaw[0],i.boxRaw[3],i.boxRaw[2]]),r=x.map(i=>i.score),y=[];if(a&&a.length>0){let i=await s.image.nonMaxSuppressionAsync(a,r,o.object.maxDetected,o.object.iouThreshold,o.object.minConfidence);y=i.dataSync(),s.dispose(i)}return x=x.filter((i,c)=>y.includes(c)).sort((i,c)=>c.score-i.score),x}async function _5(A,e){return K50?(K5++,D5):(K5=0,new Promise(async t=>{let o=[A.shape[2],A.shape[1]],n=s.image.resizeBilinear(A,[G.inputSize,G.inputSize],!1),x=n.div(255),a=x.transpose([0,3,1,2]);x.dispose(),n.dispose();let r;e.object.enabled&&(r=await G.predict(a)),a.dispose();let y=await Ke(r,G.inputSize,o,e);D5=y,t(y)}))}var D,$5=[],AA=Number.MAX_SAFE_INTEGER;async function eA(A){if(D)A.debug&&g("cached model:",D.modelUrl);else{D=await s.loadGraphModel(L(A.modelBasePath,A.object.modelPath));let e=Object.values(D.modelSignature.inputs);if(D.inputSize=Array.isArray(e)?parseInt(e[0].tensorShape.dim[2].size):null,!D.inputSize)throw new Error(`Human: Cannot determine model inputSize: ${A.object.modelPath}`);!D||!D.modelUrl?g("load model failed:",A.object.modelPath):A.debug&&g("load model:",D.modelUrl)}return D}async function Qe(A,e,t,o){if(!A)return[];let n=[],x=A.arraySync(),a=s.squeeze(A);A.dispose();let r=s.split(a,6,1);a.dispose();let i=s.stack([r[1],r[0],r[3],r[2]],1).squeeze(),c=r[4].squeeze(),l=r[5].squeeze();r.forEach(d=>d.dispose());let f=await s.image.nonMaxSuppressionAsync(i,c,o.object.maxDetected,o.object.iouThreshold,o.object.minConfidence);i.dispose(),c.dispose(),l.dispose();let h=f.dataSync();f.dispose();let E=0;for(let d of h){let m=Math.trunc(100*x[0][d][4])/100,z=x[0][d][5],w=M0[z].label,R=[x[0][d][0]/e,x[0][d][1]/e,x[0][d][2]/e,x[0][d][3]/e],W=[Math.trunc(R[0]*t[0]),Math.trunc(R[1]*t[1]),Math.trunc(R[2]*t[0]),Math.trunc(R[3]*t[1])];n.push({id:E++,score:m,class:z,label:w,box:W,boxRaw:R})}return n}async function tA(A,e){return AA0?(AA++,$5):(AA=0,new Promise(async t=>{let o=[A.shape[2],A.shape[1]],n=s.image.resizeBilinear(A,[D.inputSize,D.inputSize]),x=e.object.enabled?D.execute(n,["tower_0/detections"]):null;n.dispose();let a=await Qe(x,D.inputSize,o,e);$5=a,t(a)}))}var ne=A=>{if(!A)return[];let e=[];for(let t=0;ty.part==="leftWrist"),n=A[t].keypoints.find(y=>y.part==="rightWrist"),x=A[t].keypoints.find(y=>y.part==="nose");x&&o&&n&&o.position.yy.part==="leftShoulder"),r=A[t].keypoints.find(y=>y.part==="rightShoulder");a&&r&&e.push({body:t,gesture:`leaning ${a.position.y>r.position.y?"left":"right"}`})}return e},oe=A=>{if(!A)return[];let e=[];for(let t=0;t0){let o=A[t].mesh[33][2]-A[t].mesh[263][2];Math.abs(o)<10?e.push({face:t,gesture:"facing center"}):e.push({face:t,gesture:`facing ${o<0?"left":"right"}`}),Math.abs(A[t].mesh[374][1]-A[t].mesh[386][1])/Math.abs(A[t].mesh[443][1]-A[t].mesh[450][1])<.2&&e.push({face:t,gesture:"blink left eye"}),Math.abs(A[t].mesh[145][1]-A[t].mesh[159][1])/Math.abs(A[t].mesh[223][1]-A[t].mesh[230][1])<.2&&e.push({face:t,gesture:"blink right eye"});let a=Math.min(100,500*Math.abs(A[t].mesh[13][1]-A[t].mesh[14][1])/Math.abs(A[t].mesh[10][1]-A[t].mesh[152][1]));a>10&&e.push({face:t,gesture:`mouth ${Math.trunc(a)}% open`});let r=A[t].mesh[152][2];Math.abs(r)>10&&e.push({face:t,gesture:`head ${r<0?"up":"down"}`})}return e},se=A=>{if(!A)return[];let e=[];for(let t=0;t.06||l>.06)&&(i=!1),f>.06&&e.push({iris:t,gesture:"looking right"}),l>.06&&e.push({iris:t,gesture:"looking left"});let h=Math.abs(A[t].mesh[145][1]-A[t].annotations.rightEyeIris[0][1])/A[t].box[3],E=Math.abs(A[t].mesh[374][1]-A[t].annotations.leftEyeIris[0][1])/A[t].box[3];(E<.01||h<.01||E>.022||h>.022)&&(i=!1),(E<.01||h<.01)&&e.push({iris:t,gesture:"looking down"}),(E>.022||h>.022)&&e.push({iris:t,gesture:"looking up"}),i&&e.push({iris:t,gesture:"looking center"})}return e},re=A=>{if(!A)return[];let e=[];for(let t=0;t0){let n=o.reduce((a,r)=>a.position[2]a.position[1](i[f]=0,l))},n=function(r,y){let i=A.createShader(y);if(A.shaderSource(i,r),A.compileShader(i),!A.getShaderParameter(i,A.COMPILE_STATUS))throw new Error("Filter: GL compile failed",A.getShaderInfoLog(i));return i};this.uniform={},this.attribute={};let x=n(e,A.VERTEX_SHADER),a=n(t,A.FRAGMENT_SHADER);if(this.id=A.createProgram(),A.attachShader(this.id,x),A.attachShader(this.id,a),A.linkProgram(this.id),!A.getProgramParameter(this.id,A.LINK_STATUS))throw new Error("Filter: GL link failed",A.getProgramInfoLog(this.id));A.useProgram(this.id),o(e,"attribute",this.attribute);for(let r in this.attribute)this.attribute[r]=A.getAttribLocation(this.id,r);o(e,"uniform",this.uniform),o(t,"uniform",this.uniform);for(let r in this.uniform)this.uniform[r]=A.getUniformLocation(this.id,r)}function ie(A){A||(A={});let e=0,t=null,o=!1,n=-1,x=[null,null],a=[],r=-1,y=-1,i=null,c=null,l={},f=A.canvas||document.createElement("canvas"),h={},E={INTERMEDIATE:1},d=f.getContext("webgl");if(!d)throw new Error("Filter: getContext() failed");this.addFilter=function(M){let u=Array.prototype.slice.call(arguments,1),T=l[M];a.push({func:T,args:u})},this.reset=function(){a=[]};let m=function(M,u){if(!(M===r&&u===y)){if(f.width=M,r=M,f.height=u,y=u,!i){let T=new Float32Array([-1,-1,0,1,1,-1,1,1,-1,1,0,0,-1,1,0,0,1,-1,1,1,1,1,1,0]);i=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,i),d.bufferData(d.ARRAY_BUFFER,T,d.STATIC_DRAW),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)}d.viewport(0,0,r,y),x=[null,null]}},z=function(M,u){let T=d.createFramebuffer();d.bindFramebuffer(d.FRAMEBUFFER,T);let P=d.createRenderbuffer();d.bindRenderbuffer(d.RENDERBUFFER,P);let b=d.createTexture();return d.bindTexture(d.TEXTURE_2D,b),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,M,u,0,d.RGBA,d.UNSIGNED_BYTE,null),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,b,0),d.bindTexture(d.TEXTURE_2D,null),d.bindFramebuffer(d.FRAMEBUFFER,null),{fbo:T,texture:b}},w=function(M){return x[M]=x[M]||z(r,y),x[M]},R=function(M=null){var b,k;let u=null,T=null,P=!1;e===0?u=t:u=(b=w(n))==null?void 0:b.texture,e++,o&&!(M&E.INTERMEDIATE)?(T=null,P=e%2==0):(n=(n+1)%2,T=(k=w(n))==null?void 0:k.fbo),d.bindTexture(d.TEXTURE_2D,u),d.bindFramebuffer(d.FRAMEBUFFER,T),d.uniform1f(c.uniform.flipY,P?-1:1),d.drawArrays(d.TRIANGLES,0,6)};this.apply=function(M){if(m(M.width,M.height),e=0,t||(t=d.createTexture()),d.bindTexture(d.TEXTURE_2D,t),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,M),a.length===0)return R(),f;for(let u=0;u0,x=A.naturalHeight||A.videoHeight||A.height||A.shape&&A.shape[2]>0;if(!n||!x)return{tensor:null,canvas:j};let a=n,r=x;if(a>Q0&&(a=Q0,r=a*x/n),r>Q0&&(r=Q0,a=r*n/x),e.filter.width>0?a=e.filter.width:e.filter.height>0&&(a=n*(e.filter.height/x)),e.filter.height>0?r=e.filter.height:e.filter.width>0&&(r=x*(e.filter.width/n)),!a||!r)throw new Error("Human: Input cannot determine dimension");(!j||(j==null?void 0:j.width)!==a||(j==null?void 0:j.height)!==r)&&(j=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(a,r):document.createElement("canvas"),(j==null?void 0:j.width)!==a&&(j.width=a),(j==null?void 0:j.height)!==r&&(j.height=r));let y=j.getContext("2d");if(A instanceof ImageData?y.putImageData(A,0,0):e.filter.flip&&typeof y.translate!="undefined"?(y.translate(n,0),y.scale(-1,1),y.drawImage(A,0,0,n,x,0,0,j==null?void 0:j.width,j==null?void 0:j.height),y.setTransform(1,0,0,1,0,0)):y.drawImage(A,0,0,n,x,0,0,j==null?void 0:j.width,j==null?void 0:j.height),e.filter.enabled){if((!X||!H||j.width!==H.width||(j==null?void 0:j.height)!==(H==null?void 0:H.height))&&(H=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(j==null?void 0:j.width,j==null?void 0:j.height):document.createElement("canvas"),(H==null?void 0:H.width)!==(j==null?void 0:j.width)&&(H.width=j==null?void 0:j.width),(H==null?void 0:H.height)!==(j==null?void 0:j.height)&&(H.height=j==null?void 0:j.height),X=s.ENV.flags.IS_BROWSER?new ie({canvas:H}):null),!X)return{tensor:null,canvas:j};X.reset(),X.addFilter("brightness",e.filter.brightness),e.filter.contrast!==0&&X.addFilter("contrast",e.filter.contrast),e.filter.sharpness!==0&&X.addFilter("sharpen",e.filter.sharpness),e.filter.blur!==0&&X.addFilter("blur",e.filter.blur),e.filter.saturation!==0&&X.addFilter("saturation",e.filter.saturation),e.filter.hue!==0&&X.addFilter("hue",e.filter.hue),e.filter.negative&&X.addFilter("negative"),e.filter.sepia&&X.addFilter("sepia"),e.filter.vintage&&X.addFilter("brownie"),e.filter.sepia&&X.addFilter("sepia"),e.filter.kodachrome&&X.addFilter("kodachrome"),e.filter.technicolor&&X.addFilter("technicolor"),e.filter.polaroid&&X.addFilter("polaroid"),e.filter.pixelate!==0&&X.addFilter("pixelate",e.filter.pixelate),X.apply(j)}else H=j,X&&(X=null);let i;if(H.data){let c=[H.height,H.width,3];i=s.tensor3d(H.data,c,"int32")}else if(H instanceof ImageData)i=s.browser?s.browser.fromPixels(H):null;else if(e.backend==="webgl"||e.backend==="humangl"){let c=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(a,r):document.createElement("canvas");c.width=a,c.height=r;let l=c.getContext("2d");l==null||l.drawImage(H,0,0),i=s.browser?s.browser.fromPixels(c):null}else{let c=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(a,r):document.createElement("canvas");c.width=a,c.height=r;let l=c.getContext("2d");l==null||l.drawImage(H,0,0);let f=l==null?void 0:l.getImageData(0,0,a,r);i=s.browser?s.browser.fromPixels(f):null}if(i){let c=i.toFloat();t=c.expandDims(0),i.dispose(),c.dispose()}}let o=e.filter.return?H:null;return{tensor:t,canvas:o}}var sA={};aA(sA,{all:()=>e2,body:()=>ye,canvas:()=>A2,face:()=>xe,gesture:()=>ae,hand:()=>le,object:()=>ce,options:()=>y0,person:()=>$e});var y0={color:"rgba(173, 216, 230, 0.6)",labelColor:"rgba(173, 216, 230, 1)",shadowColor:"black",font:'small-caps 14px "Segoe UI"',lineHeight:24,lineWidth:6,pointSize:2,roundRect:28,drawPoints:!1,drawLabels:!0,drawBoxes:!0,drawPolygons:!0,drawGaze:!0,fillPolygons:!1,useDepth:!0,useCurves:!1,bufferedOutput:!0},_0=A=>Math.round(A*180/Math.PI);function nA(A,e,t,o=0,n){A.fillStyle=n.useDepth&&o?`rgba(${127.5+2*o}, ${127.5-2*o}, 255, 0.3)`:n.color,A.beginPath(),A.arc(e,t,n.pointSize,0,2*Math.PI),A.fill()}function W0(A,e,t,o,n,x){if(A.beginPath(),x.useCurves){let a=(e+e+o)/2,r=(t+t+n)/2;A.ellipse(a,r,o/2,n/2,0,0,2*Math.PI)}else A.lineWidth=x.lineWidth,A.moveTo(e+x.roundRect,t),A.lineTo(e+o-x.roundRect,t),A.quadraticCurveTo(e+o,t,e+o,t+x.roundRect),A.lineTo(e+o,t+n-x.roundRect),A.quadraticCurveTo(e+o,t+n,e+o-x.roundRect,t+n),A.lineTo(e+x.roundRect,t+n),A.quadraticCurveTo(e,t+n,e,t+n-x.roundRect),A.lineTo(e,t+x.roundRect),A.quadraticCurveTo(e,t,e+x.roundRect,t),A.closePath();A.stroke()}function oA(A,e=[],t){if(!(e===void 0||e.length===0)){A.beginPath(),A.moveTo(e[0][0],e[0][1]);for(let o of e){let n=o[2]||0;A.strokeStyle=t.useDepth&&n?`rgba(${127.5+2*n}, ${127.5-2*n}, 255, 0.3)`:t.color,A.fillStyle=t.useDepth&&n?`rgba(${127.5+2*n}, ${127.5-2*n}, 255, 0.3)`:t.color,A.lineTo(o[0],Math.round(o[1]))}A.stroke(),t.fillPolygons&&(A.closePath(),A.fill())}}function k0(A,e=[],t){if(!(e===void 0||e.length===0)){if(!t.useCurves||e.length<=2){oA(A,e,t);return}A.moveTo(e[0][0],e[0][1]);for(let o=0;o1&&y[1].length>0){let i=r[1]>0?`#${r[1]}`:"",c=`${r[0]} ${i}: ${y[1]}`;o.shadowColor&&o.shadowColor!==""&&(n.fillStyle=o.shadowColor,n.fillText(c,8,2+x*o.lineHeight)),n.fillStyle=o.labelColor,n.fillText(c,6,0+x*o.lineHeight),x+=1}}}async function xe(A,e,t){var x,a,r,y;let o=U(y0,t);if(!e||!A||!(A instanceof HTMLCanvasElement))return;let n=A.getContext("2d");if(!!n)for(let i of e){n.font=o.font,n.strokeStyle=o.color,n.fillStyle=o.color,o.drawBoxes&&W0(n,i.box[0],i.box[1],i.box[2],i.box[3],o);let c=[];if(c.push(`face: ${Math.trunc(100*i.score)}%`),i.genderScore&&c.push(`${i.gender||""} ${Math.trunc(100*i.genderScore)}%`),i.age&&c.push(`age: ${i.age||""}`),i.iris&&c.push(`distance: ${i.iris}`),i.emotion&&i.emotion.length>0){let l=i.emotion.map(f=>`${Math.trunc(100*f.score)}% ${f.emotion}`);l.length>3&&(l.length=3),c.push(l.join(" "))}i.rotation&&i.rotation.angle&&i.rotation.gaze&&(i.rotation.angle.roll&&c.push(`roll: ${_0(i.rotation.angle.roll)}\xB0 yaw:${_0(i.rotation.angle.yaw)}\xB0 pitch:${_0(i.rotation.angle.pitch)}\xB0`),i.rotation.gaze.bearing&&c.push(`gaze: ${_0(i.rotation.gaze.bearing)}\xB0`)),c.length===0&&c.push("face"),n.fillStyle=o.color;for(let l=c.length-1;l>=0;l--){let f=Math.max(i.box[0],0),h=l*o.lineHeight+i.box[1];o.shadowColor&&o.shadowColor!==""&&(n.fillStyle=o.shadowColor,n.fillText(c[l],f+5,h+16)),n.fillStyle=o.labelColor,n.fillText(c[l],f+4,h+15)}if(n.lineWidth=1,i.mesh&&i.mesh.length>0){if(o.drawPoints)for(let l of i.mesh)nA(n,l[0],l[1],l[2],o);if(o.drawPolygons){n.lineWidth=1;for(let l=0;li.mesh[h]);oA(n,f,o)}if(i.annotations&&i.annotations.leftEyeIris){n.strokeStyle=o.useDepth?"rgba(255, 200, 255, 0.3)":o.color,n.beginPath();let l=Math.abs(i.annotations.leftEyeIris[3][0]-i.annotations.leftEyeIris[1][0])/2,f=Math.abs(i.annotations.leftEyeIris[4][1]-i.annotations.leftEyeIris[2][1])/2;n.ellipse(i.annotations.leftEyeIris[0][0],i.annotations.leftEyeIris[0][1],l,f,0,0,2*Math.PI),n.stroke(),o.fillPolygons&&(n.fillStyle=o.useDepth?"rgba(255, 255, 200, 0.3)":o.color,n.fill())}if(i.annotations&&i.annotations.rightEyeIris){n.strokeStyle=o.useDepth?"rgba(255, 200, 255, 0.3)":o.color,n.beginPath();let l=Math.abs(i.annotations.rightEyeIris[3][0]-i.annotations.rightEyeIris[1][0])/2,f=Math.abs(i.annotations.rightEyeIris[4][1]-i.annotations.rightEyeIris[2][1])/2;n.ellipse(i.annotations.rightEyeIris[0][0],i.annotations.rightEyeIris[0][1],l,f,0,0,2*Math.PI),n.stroke(),o.fillPolygons&&(n.fillStyle=o.useDepth?"rgba(255, 255, 200, 0.3)":o.color,n.fill())}if(o.drawGaze&&((a=(x=i.rotation)==null?void 0:x.gaze)==null?void 0:a.strength)&&((y=(r=i.rotation)==null?void 0:r.gaze)==null?void 0:y.bearing)&&i.annotations.leftEyeIris&&i.annotations.rightEyeIris&&i.annotations.leftEyeIris[0]&&i.annotations.rightEyeIris[0]){n.strokeStyle="pink",n.beginPath();let l=[i.annotations.leftEyeIris[0][0]+Math.sin(i.rotation.gaze.bearing)*i.rotation.gaze.strength*i.box[3],i.annotations.leftEyeIris[0][1]+Math.cos(i.rotation.gaze.bearing)*i.rotation.gaze.strength*i.box[2]];n.moveTo(i.annotations.leftEyeIris[0][0],i.annotations.leftEyeIris[0][1]),n.lineTo(l[0],l[1]);let f=[i.annotations.rightEyeIris[0][0]+Math.sin(i.rotation.gaze.bearing)*i.rotation.gaze.strength*i.box[3],i.annotations.rightEyeIris[0][1]+Math.cos(i.rotation.gaze.bearing)*i.rotation.gaze.strength*i.box[2]];n.moveTo(i.annotations.rightEyeIris[0][0],i.annotations.rightEyeIris[0][1]),n.lineTo(f[0],f[1]),n.stroke()}}}}}async function ye(A,e,t){var x;let o=U(y0,t);if(!e||!A||!(A instanceof HTMLCanvasElement))return;let n=A.getContext("2d");if(!!n){n.lineJoin="round";for(let a=0;ai.part==="leftShoulder"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightShoulder"),r&&y.push([r.position[0],r.position[1]]),k0(n,y,o),y.length=0,r=e[a].keypoints.find(i=>i.part==="rightShoulder"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightHip"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftHip"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftShoulder"),r&&y.push([r.position[0],r.position[1]]),y.length===4&&oA(n,y,o),y.length=0,r=e[a].keypoints.find(i=>i.part==="leftHip"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftKnee"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftAnkle"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftHeel"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftFoot"),r&&y.push([r.position[0],r.position[1]]),k0(n,y,o),y.length=0,r=e[a].keypoints.find(i=>i.part==="rightHip"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightKnee"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightAnkle"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightHeel"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightFoot"),r&&y.push([r.position[0],r.position[1]]),k0(n,y,o),y.length=0,r=e[a].keypoints.find(i=>i.part==="leftShoulder"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftElbow"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftWrist"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="leftPalm"),r&&y.push([r.position[0],r.position[1]]),k0(n,y,o),y.length=0,r=e[a].keypoints.find(i=>i.part==="rightShoulder"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightElbow"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightWrist"),r&&y.push([r.position[0],r.position[1]]),r=e[a].keypoints.find(i=>i.part==="rightPalm"),r&&y.push([r.position[0],r.position[1]]),k0(n,y,o)}}}}async function le(A,e,t){let o=U(y0,t);if(!e||!A||!(A instanceof HTMLCanvasElement))return;let n=A.getContext("2d");if(!!n){n.lineJoin="round",n.font=o.font;for(let x of e){if(o.drawBoxes&&(n.strokeStyle=o.color,n.fillStyle=o.color,W0(n,x.box[0],x.box[1],x.box[2],x.box[3],o),o.drawLabels&&(o.shadowColor&&o.shadowColor!==""&&(n.fillStyle=o.shadowColor,n.fillText("hand",x.box[0]+3,1+x.box[1]+o.lineHeight,x.box[2])),n.fillStyle=o.labelColor,n.fillText("hand",x.box[0]+2,0+x.box[1]+o.lineHeight,x.box[2])),n.stroke()),o.drawPoints&&x.keypoints&&x.keypoints.length>0)for(let a of x.keypoints)n.fillStyle=o.useDepth?`rgba(${127.5+2*a[2]}, ${127.5-2*a[2]}, 255, 0.5)`:o.color,nA(n,a[0],a[1],0,o);if(o.drawLabels){let a=(r,y)=>{n.fillStyle=o.useDepth?`rgba(${127.5+2*r[r.length-1][2]}, ${127.5-2*r[r.length-1][2]}, 255, 0.5)`:o.color,n.fillText(y,r[r.length-1][0]+4,r[r.length-1][1]+4)};n.font=o.font,a(x.annotations.indexFinger,"index"),a(x.annotations.middleFinger,"middle"),a(x.annotations.ringFinger,"ring"),a(x.annotations.pinky,"pinky"),a(x.annotations.thumb,"thumb"),a(x.annotations.palmBase,"palm")}if(o.drawPolygons){let a=r=>{if(!!r)for(let y=0;y0?y-1:0][0],r[y>0?y-1:0][1]),n.lineTo(r[y][0],r[y][1]),n.stroke()};n.lineWidth=o.lineWidth,a(x.annotations.indexFinger),a(x.annotations.middleFinger),a(x.annotations.ringFinger),a(x.annotations.pinky),a(x.annotations.thumb)}}}}async function ce(A,e,t){let o=U(y0,t);if(!e||!A||!(A instanceof HTMLCanvasElement))return;let n=A.getContext("2d");if(!!n){n.lineJoin="round",n.font=o.font;for(let x of e)if(o.drawBoxes){if(n.strokeStyle=o.color,n.fillStyle=o.color,W0(n,x.box[0],x.box[1],x.box[2],x.box[3],o),o.drawLabels){let a=`${Math.round(100*x.score)}% ${x.label}`;o.shadowColor&&o.shadowColor!==""&&(n.fillStyle=o.shadowColor,n.fillText(a,x.box[0]+3,1+x.box[1]+o.lineHeight,x.box[2])),n.fillStyle=o.labelColor,n.fillText(a,x.box[0]+2,0+x.box[1]+o.lineHeight,x.box[2])}n.stroke()}}}async function $e(A,e,t){let o=U(y0,t);if(!e||!A||!(A instanceof HTMLCanvasElement))return;let n=A.getContext("2d");if(!!n){n.lineJoin="round",n.font=o.font;for(let x=0;xv.box[0]&&T.box[0]v.box[1]&&T.box[1]+T.box[3]P.body.box[0]&&v.box[0]+v.box[2]P.body.box[1]&&v.box[1]+v.box[3]P.body.box[0]&&v.box[1]+v.box[3]>P.body.box[1]&&v.box[1]+v.box[3]{v&&v.length===4&&(b.push(v[0],v[0]+v[2]),k.push(v[1],v[1]+v[3]))};Z((z=P.face)==null?void 0:z.box),Z((w=P.body)==null?void 0:w.box),Z((W=(R=P.hands)==null?void 0:R.left)==null?void 0:W.box),Z((u=(M=P.hands)==null?void 0:M.right)==null?void 0:u.box);let N=Math.min(...b),O=Math.min(...k);P.box=[N,O,Math.max(...b)-N,Math.max(...k)-O],n&&n.length===4&&(P.boxRaw=[P.box[0]/n[2],P.box[1]/n[1],P.box[2]/n[2],P.box[3]/n[1]]),a.push(P)}return a}var S={face:[],body:[],hand:[],gesture:[],object:[],persons:[],performance:{},timestamp:0};function fe(A){var n,x,a,r,y,i,c,l,f,h,E,d,m,z,w,R,W,M,u,T,P;let e=Date.now()-A.timestamp,t=e<1e3?8-Math.log(e):1;if(S.canvas=A.canvas,!S.body||A.body.length!==S.body.length)S.body=JSON.parse(JSON.stringify(A.body));else for(let b=0;b((t-1)*S.body[b].box[v]+O)/t),Z=A.body[b].boxRaw.map((O,v)=>((t-1)*S.body[b].boxRaw[v]+O)/t),N=A.body[b].keypoints.map((O,v)=>({score:O.score,part:O.part,position:[S.body[b].keypoints[v]?((t-1)*S.body[b].keypoints[v].position[0]+O.position[0])/t:O.position[0],S.body[b].keypoints[v]?((t-1)*S.body[b].keypoints[v].position[1]+O.position[1])/t:O.position[1]],positionRaw:[S.body[b].keypoints[v]?((t-1)*S.body[b].keypoints[v].positionRaw[0]+O.positionRaw[0])/t:O.position[0],S.body[b].keypoints[v]?((t-1)*S.body[b].keypoints[v].positionRaw[1]+O.positionRaw[1])/t:O.position[1]]}));S.body[b]={...A.body[b],box:k,boxRaw:Z,keypoints:N}}if(!S.hand||A.hand.length!==S.hand.length)S.hand=JSON.parse(JSON.stringify(A.hand));else for(let b=0;b((t-1)*S.hand[b].box[s0]+F)/t),Z=A.hand[b].boxRaw.map((F,s0)=>((t-1)*S.hand[b].boxRaw[s0]+F)/t),N=A.hand[b].keypoints.map((F,s0)=>F.map((f0,z0)=>((t-1)*S.hand[b].keypoints[s0][z0]+f0)/t)),O=Object.keys(A.hand[b].annotations),v={};for(let F of O)v[F]=A.hand[b].annotations[F].map((s0,f0)=>s0.map((z0,i5)=>((t-1)*S.hand[b].annotations[F][f0][i5]+z0)/t));S.hand[b]={...A.hand[b],box:k,boxRaw:Z,keypoints:N,annotations:v}}if(!S.face||A.face.length!==S.face.length)S.face=JSON.parse(JSON.stringify(A.face));else for(let b=0;b((t-1)*S.face[b].box[v]+O)/t),Z=A.face[b].boxRaw.map((O,v)=>((t-1)*S.face[b].boxRaw[v]+O)/t),N={matrix:[0,0,0,0,0,0,0,0,0],angle:{roll:0,yaw:0,pitch:0},gaze:{bearing:0,strength:0}};N.matrix=(n=A.face[b].rotation)==null?void 0:n.matrix,N.angle={roll:((t-1)*(((a=(x=S.face[b].rotation)==null?void 0:x.angle)==null?void 0:a.roll)||0)+(((y=(r=A.face[b].rotation)==null?void 0:r.angle)==null?void 0:y.roll)||0))/t,yaw:((t-1)*(((c=(i=S.face[b].rotation)==null?void 0:i.angle)==null?void 0:c.yaw)||0)+(((f=(l=A.face[b].rotation)==null?void 0:l.angle)==null?void 0:f.yaw)||0))/t,pitch:((t-1)*(((E=(h=S.face[b].rotation)==null?void 0:h.angle)==null?void 0:E.pitch)||0)+(((m=(d=A.face[b].rotation)==null?void 0:d.angle)==null?void 0:m.pitch)||0))/t},N.gaze={bearing:((t-1)*(((w=(z=S.face[b].rotation)==null?void 0:z.gaze)==null?void 0:w.bearing)||0)+(((W=(R=A.face[b].rotation)==null?void 0:R.gaze)==null?void 0:W.bearing)||0))/t,strength:((t-1)*(((u=(M=S.face[b].rotation)==null?void 0:M.gaze)==null?void 0:u.strength)||0)+(((P=(T=A.face[b].rotation)==null?void 0:T.gaze)==null?void 0:P.strength)||0))/t},S.face[b]={...A.face[b],rotation:N,box:k,boxRaw:Z}}if(!S.object||A.object.length!==S.object.length)S.object=JSON.parse(JSON.stringify(A.object));else for(let b=0;b((t-1)*S.object[b].box[O]+N)/t),Z=A.object[b].boxRaw.map((N,O)=>((t-1)*S.object[b].boxRaw[O]+N)/t);S.object[b]={...A.object[b],box:k,boxRaw:Z}}let o=A.persons;if(!S.persons||o.length!==S.persons.length)S.persons=JSON.parse(JSON.stringify(o));else for(let b=0;b((t-1)*S.persons[b].box[Z]+k)/t);return S.gesture=A.gesture,S.performance=A.performance,S}var Q,rA=!1;async function $0(A){return Q?A.debug&&g("cached model:",Q.modelUrl):(Q=await s.loadGraphModel(L(A.modelBasePath,A.segmentation.modelPath)),!Q||!Q.modelUrl?g("load model failed:",A.segmentation.modelPath):A.debug&&g("load model:",Q.modelUrl)),Q}async function t2(A,e){var h,E,d,m;if(!e.segmentation.enabled||!A.tensor||!A.canvas||!Q||!Q.inputs[0].shape)return null;let t=s.image.resizeBilinear(A.tensor,[Q.inputs[0].shape[1],Q.inputs[0].shape[2]],!1),o=t.div(255),n=Q.predict(o);s.dispose(t),s.dispose(o);let x=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(A.canvas.width,A.canvas.height):document.createElement("canvas");x.width=A.canvas.width,x.height=A.canvas.height;let a=s.squeeze(n,0),r;if(a.shape[2]===2){let z=a.softmax(),[w,R]=s.unstack(z,2),W=R.expandDims(2),M=W.expandDims(0);s.dispose(z),s.dispose(w),s.dispose(R);let u=s.image.cropAndResize(M,[[0,0,.5,.5]],[0],[(h=A.tensor)==null?void 0:h.shape[1],(E=A.tensor)==null?void 0:E.shape[2]]);r=u.squeeze(0),s.dispose(u),s.dispose(W),s.dispose(M)}else r=s.image.resizeBilinear(a,[(d=A.tensor)==null?void 0:d.shape[1],(m=A.tensor)==null?void 0:m.shape[2]]);s.browser&&await s.browser.toPixels(r,x),s.dispose(r),s.dispose(a),s.dispose(n);let y=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(A.canvas.width,A.canvas.height):document.createElement("canvas");y.width=A.canvas.width,y.height=A.canvas.height;let i=y.getContext("2d");i.filter="blur(8px",await i.drawImage(x,0,0);let c=i.getImageData(0,0,A.canvas.width,A.canvas.height).data,l=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(A.canvas.width,A.canvas.height):document.createElement("canvas");l.width=A.canvas.width,l.height=A.canvas.height;let f=l.getContext("2d");return await f.drawImage(A.canvas,0,0),f.globalCompositeOperation="darken",f.filter="blur(8px)",await f.drawImage(x,0,0),f.globalCompositeOperation="source-over",f.filter="none",A.canvas=l,c}async function me(A,e,t){var x;if(rA)return null;rA=!0,t.segmentation.enabled||(t.segmentation.enabled=!0),Q||await $0(t);let o=T0(A,t),n=await t2(o,t);if(s.dispose(o.tensor),e&&n){let a=T0(e,t),r=a.canvas;s.dispose(a.tensor);let y=o.canvas,i=(x=y.getContext("2d"))==null?void 0:x.getImageData(0,0,y.width,y.height).data,c=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(y.width,y.height):document.createElement("canvas");c.width=y.width,c.height=y.height;let l=c.getContext("2d");l.globalCompositeOperation="copy",l.drawImage(r,0,0,c.width,c.height);let f=l.getImageData(0,0,c.width,c.height);for(let h=0;h{if(!C(this,I0))return;let t=this.tf.engine().state.numTensors,o=C(this,P0);_(this,P0,t);let n=t-o;n!==0&&g(...e,n)};K(this,t5,e=>{if(!C(this,N0))return null;if(!e)return"input is not defined";if(this.tf.ENV.flags.IS_NODE&&!(e instanceof s.Tensor))return"input must be a tensor";try{this.tf.getBackend()}catch(t){return"backend not loaded"}return null});K(this,O0,async(e=!1)=>{var t;if(this.config.backend&&this.config.backend.length>0&&e||this.tf.getBackend()!==this.config.backend){let o=I();if(this.state="backend",this.config.backend&&this.config.backend.length>0){if(typeof window=="undefined"&&typeof WorkerGlobalScope!="undefined"&&this.config.debug&&g("running inside web worker"),this.tf.ENV.flags.IS_BROWSER&&this.config.backend==="tensorflow"&&(this.config.backend="webgl"),this.tf.ENV.flags.IS_NODE&&(this.config.backend==="webgl"||this.config.backend==="humangl")&&(this.config.backend="tensorflow"),this.config.debug&&g("setting backend:",this.config.backend),this.config.backend==="wasm"){if(this.config.debug&&g("wasm path:",this.config.wasmPath),typeof((t=this.tf)==null?void 0:t.setWasmPaths)!="undefined")this.tf.setWasmPaths(this.config.wasmPath);else throw new Error("Human: WASM backend is not loaded");let n=await this.tf.env().getAsync("WASM_HAS_SIMD_SUPPORT"),x=await this.tf.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT");this.config.debug&&g(`wasm execution: ${n?"SIMD":"no SIMD"} ${x?"multithreaded":"singlethreaded"}`),this.config.debug&&!n&&g("warning: wasm simd support is not enabled")}this.config.backend==="humangl"&&uA();try{await this.tf.setBackend(this.config.backend)}catch(n){g("error: cannot set backend:",this.config.backend,n)}}if(this.tf.enableProdMode(),this.tf.getBackend()==="webgl"||this.tf.getBackend()==="humangl"){this.tf.ENV.set("CHECK_COMPUTATION_FOR_ERRORS",!1),this.tf.ENV.set("WEBGL_CPU_FORWARD",!0),this.tf.ENV.set("WEBGL_PACK_DEPTHWISECONV",!0),typeof this.config.deallocate!="undefined"&&this.config.deallocate&&(g("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:",!0),this.tf.ENV.set("WEBGL_DELETE_TEXTURE_THRESHOLD",0));let n=await this.tf.backend().getGPGPUContext().gl;this.config.debug&&g(`gl version:${n.getParameter(n.VERSION)} renderer:${n.getParameter(n.RENDERER)}`)}await this.tf.ready(),this.performance.backend=Math.trunc(I()-o)}});this.next=e=>fe(e||this.result);K(this,n5,async e=>{if(this.config.cacheSensitivity===0)return!1;let t=32,o=e.resizeBilinear([Math.trunc(e.shape[1]/t),Math.trunc(e.shape[2]/t)]),n=o.dataSync(),x=0;for(let y=0;y10*this.config.cacheSensitivity?0:a),r});K(this,o5,async()=>{let e=(n,x="application/octet-stream")=>fetch(`data:${x};base64,${n}`).then(a=>a.blob()),t,o;switch(this.config.warmup){case"face":t=await e(A5);break;case"full":t=await e(e5);break;default:t=null}if(t){let n=await createImageBitmap(t);o=await this.detect(n,this.config),n.close()}return o});K(this,s5,async()=>new Promise(e=>{let t,o=0;switch(this.config.warmup){case"face":o=256,t="data:image/jpeg;base64,"+A5;break;case"full":case"body":o=1200,t="data:image/jpeg;base64,"+e5;break;default:t=null}let n=new Image;n.onload=async()=>{let x=typeof OffscreenCanvas!="undefined"?new OffscreenCanvas(o,o):document.createElement("canvas");x.width=n.naturalWidth,x.height=n.naturalHeight;let a=x.getContext("2d");a==null||a.drawImage(n,0,0);let r=await this.detect(x,this.config);e(r)},t?n.src=t:e(null)}));K(this,r5,async()=>{let e=n=>Buffer.from(n,"base64"),t;if(this.config.warmup==="face"&&(t=e(A5)),(this.config.warmup==="body"||this.config.warmup==="full")&&(t=e(e5)),!t)return null;let o;if(typeof s.node!="undefined"){let n=s.node.decodeJpeg(t),x=n.expandDims(0);this.tf.dispose(n),o=await this.detect(x,this.config),this.tf.dispose(x)}else this.config.debug&&g("Warmup tfjs-node not loaded");return o});this.config=U(yA,e||{}),this.tf=s,this.draw=sA,this.version=he,this.state="idle",_(this,P0,0),_(this,I0,!1),_(this,N0,!1),_(this,c0,!0),_(this,v0,0),this.performance={backend:0,load:0,image:0,frames:0,cached:0,changed:0,total:0,draw:0},this.models={face:null,posenet:null,blazepose:null,efficientpose:null,movenet:null,handpose:null,age:null,gender:null,emotion:null,embedding:null,nanodet:null,centernet:null,faceres:null,segmentation:null},this.image=t=>T0(t,this.config),this.faceTriangulation=SA,this.faceUVMap=WA,this.sysinfo=lA(),_(this,d0,1)}similarity(e,t){return T5(e,t)}segmentation(e,t){return me(e,t,this.config)}enhance(e){return P5(e)}match(e,t,o=0){return NA(e,t,o)}async load(e){this.state="load";let t=I();e&&(this.config=U(this.config,e)),C(this,c0)&&(this.config.debug&&g(`version: ${this.version}`),this.config.debug&&g(`tfjs version: ${this.tf.version_core}`),this.config.debug&&g("platform:",this.sysinfo.platform),this.config.debug&&g("agent:",this.sysinfo.agent),await C(this,O0).call(this,!0),this.tf.ENV.flags.IS_BROWSER&&(this.config.debug&&g("configuration:",this.config),this.config.debug&&g("tf flags:",this.tf.ENV.flags))),this.config.async?[this.models.face,this.models.emotion,this.models.handpose,this.models.posenet,this.models.blazepose,this.models.efficientpose,this.models.movenet,this.models.nanodet,this.models.centernet,this.models.faceres,this.models.segmentation]=await Promise.all([this.models.face||(this.config.face.enabled?m5(this.config):null),this.models.emotion||(this.config.face.enabled&&this.config.face.emotion.enabled?p5(this.config):null),this.models.handpose||(this.config.hand.enabled?Z5(this.config):null),this.models.posenet||(this.config.body.enabled&&this.config.body.modelPath.includes("posenet")?k5(this.config):null),this.models.blazepose||(this.config.body.enabled&&this.config.body.modelPath.includes("blazepose")?G0(this.config):null),this.models.efficientpose||(this.config.body.enabled&&this.config.body.modelPath.includes("efficientpose")?te(this.config):null),this.models.movenet||(this.config.body.enabled&&this.config.body.modelPath.includes("movenet")?Y5(this.config):null),this.models.nanodet||(this.config.object.enabled&&this.config.object.modelPath.includes("nanodet")?Q5(this.config):null),this.models.centernet||(this.config.object.enabled&&this.config.object.modelPath.includes("centernet")?eA(this.config):null),this.models.faceres||(this.config.face.enabled&&this.config.face.description.enabled?M5(this.config):null),this.models.segmentation||(this.config.segmentation.enabled?$0(this.config):null)]):(this.config.face.enabled&&!this.models.face&&(this.models.face=await m5(this.config)),this.config.face.enabled&&this.config.face.emotion.enabled&&!this.models.emotion&&(this.models.emotion=await p5(this.config)),this.config.hand.enabled&&!this.models.handpose&&(this.models.handpose=await Z5(this.config)),this.config.body.enabled&&!this.models.posenet&&this.config.body.modelPath.includes("posenet")&&(this.models.posenet=await k5(this.config)),this.config.body.enabled&&!this.models.blazepose&&this.config.body.modelPath.includes("blazepose")&&(this.models.blazepose=await G0(this.config)),this.config.body.enabled&&!this.models.efficientpose&&this.config.body.modelPath.includes("efficientpose")&&(this.models.efficientpose=await G0(this.config)),this.config.body.enabled&&!this.models.movenet&&this.config.body.modelPath.includes("movenet")&&(this.models.movenet=await Y5(this.config)),this.config.object.enabled&&!this.models.nanodet&&this.config.object.modelPath.includes("nanodet")&&(this.models.nanodet=await Q5(this.config)),this.config.object.enabled&&!this.models.centernet&&this.config.object.modelPath.includes("centernet")&&(this.models.centernet=await eA(this.config)),this.config.face.enabled&&this.config.face.description.enabled&&!this.models.faceres&&(this.models.faceres=await M5(this.config)),this.config.segmentation.enabled&&!this.models.segmentation&&(this.models.segmentation=await $0(this.config))),C(this,c0)&&(this.config.debug&&g("tf engine state:",this.tf.engine().state.numBytes,"bytes",this.tf.engine().state.numTensors,"tensors"),_(this,c0,!1));let o=Math.trunc(I()-t);o>(this.performance.load||0)&&(this.performance.load=o)}async detect(e,t){return new Promise(async o=>{this.state="config";let n;this.config=U(this.config,t),this.state="check";let x=C(this,t5).call(this,e);x&&(g(x,e),o({error:x}));let a=I();await C(this,O0).call(this),await this.load(),n=I();let r=T0(e,this.config);if(!r||!r.tensor){g("could not convert input to tensor"),o({error:"could not convert input to tensor"});return}this.performance.image=Math.trunc(I()-n),this.analyze("Get Image:"),n=I(),this.config.skipFrame=await C(this,n5).call(this,r.tensor),this.performance.frames||(this.performance.frames=0),this.performance.cached||(this.performance.cached=0),this.performance.frames++,this.config.skipFrame&&this.performance.cached++,this.performance.changed=Math.trunc(I()-n),this.analyze("Check Changed:");let y,i,c,l,f;this.config.async?(y=this.config.face.enabled?z5(this,r.tensor):[],this.performance.face&&delete this.performance.face):(this.state="run:face",n=I(),y=this.config.face.enabled?await z5(this,r.tensor):[],f=Math.trunc(I()-n),f>0&&(this.performance.face=f)),this.analyze("Start Body:"),this.config.async?(this.config.body.modelPath.includes("posenet")?i=this.config.body.enabled?W5(r.tensor,this.config):[]:this.config.body.modelPath.includes("blazepose")?i=this.config.body.enabled?V5(r.tensor,this.config):[]:this.config.body.modelPath.includes("efficientpose")?i=this.config.body.enabled?q5(r.tensor,this.config):[]:this.config.body.modelPath.includes("movenet")&&(i=this.config.body.enabled?G5(r.tensor,this.config):[]),this.performance.body&&delete this.performance.body):(this.state="run:body",n=I(),this.config.body.modelPath.includes("posenet")?i=this.config.body.enabled?await W5(r.tensor,this.config):[]:this.config.body.modelPath.includes("blazepose")?i=this.config.body.enabled?await V5(r.tensor,this.config):[]:this.config.body.modelPath.includes("efficientpose")?i=this.config.body.enabled?await q5(r.tensor,this.config):[]:this.config.body.modelPath.includes("movenet")&&(i=this.config.body.enabled?await G5(r.tensor,this.config):[]),f=Math.trunc(I()-n),f>0&&(this.performance.body=f)),this.analyze("End Body:"),this.analyze("Start Hand:"),this.config.async?(c=this.config.hand.enabled?H5(r.tensor,this.config):[],this.performance.hand&&delete this.performance.hand):(this.state="run:hand",n=I(),c=this.config.hand.enabled?await H5(r.tensor,this.config):[],f=Math.trunc(I()-n),f>0&&(this.performance.hand=f)),this.analyze("End Hand:"),this.analyze("Start Object:"),this.config.async?(this.config.object.modelPath.includes("nanodet")?l=this.config.object.enabled?_5(r.tensor,this.config):[]:this.config.object.modelPath.includes("centernet")&&(l=this.config.object.enabled?tA(r.tensor,this.config):[]),this.performance.object&&delete this.performance.object):(this.state="run:object",n=I(),this.config.object.modelPath.includes("nanodet")?l=this.config.object.enabled?await _5(r.tensor,this.config):[]:this.config.object.modelPath.includes("centernet")&&(l=this.config.object.enabled?await tA(r.tensor,this.config):[]),f=Math.trunc(I()-n),f>0&&(this.performance.object=f)),this.analyze("End Object:"),this.config.async&&([y,i,c,l]=await Promise.all([y,i,c,l]));let h=[];this.config.gesture.enabled&&(n=I(),h=[...oe(y),...ne(i),...re(c),...se(y)],this.config.async?this.performance.gesture&&delete this.performance.gesture:this.performance.gesture=Math.trunc(I()-n)),this.performance.total=Math.trunc(I()-a),this.state="idle",this.result={face:y,body:i,hand:c,gesture:h,object:l,performance:this.performance,canvas:r.canvas,timestamp:Date.now(),get persons(){var E;return de(y,i,c,h,(E=r==null?void 0:r.tensor)==null?void 0:E.shape)}},s.dispose(r.tensor),o(this.result)})}async warmup(e){let t=I();if(e&&(this.config=U(this.config,e)),!this.config.warmup||this.config.warmup==="none")return{error:"null"};let o;typeof createImageBitmap=="function"?o=await C(this,o5).call(this):typeof Image!="undefined"?o=await C(this,s5).call(this):o=await C(this,r5).call(this);let n=I();return this.config.debug&&g("Warmup",this.config.warmup,Math.round(n-t),"ms",o),o}};P0=new WeakMap,I0=new WeakMap,N0=new WeakMap,c0=new WeakMap,d0=new WeakMap,v0=new WeakMap,t5=new WeakMap,O0=new WeakMap,n5=new WeakMap,o5=new WeakMap,s5=new WeakMap,r5=new WeakMap;export{o2 as Human,o2 as default}; //# sourceMappingURL=human.esm-nobundle.js.map