varpn=Object.create,Ye=Object.defineProperty,dn=Object.getPrototypeOf,un=Object.prototype.hasOwnProperty,fn=Object.getOwnPropertyNames,ln=Object.getOwnPropertyDescriptor;varDr=o=>Ye(o,"__esModule",{value:!0});varlo=(o,t)=>()=>(t||(t={exports:{}},o(t.exports,t)),t.exports),Er=(o,t)=>{for(vareint)Ye(o,e,{get:t[e],enumerable:!0})},ft=(o,t,e)=>{if(t&&typeoft=="object"||typeoft=="function")for(letroffn(t))!un.call(o,r)&&r!=="default"&&Ye(o,r,{get:()=>t[r],enumerable:!(e=ln(t,r))||e.enumerable});returno},hn=o=>ft(Dr(Ye(o!=null?pn(dn(o)):{},"default",o&&o.__esModule&&"default"ino?{get:()=>o.default,enumerable:!0}:{value:o,enumerable:!0})),o);import*asCafrom"@tensorflow/tfjs/dist/index.js";import*asNafrom"@tensorflow/tfjs-backend-wasm";varg=lo(xn=>{Dr(xn);ft(xn,Ca);ft(xn,Na)});varvo=lo((Pn,bo)=>{Dr(Pn);Er(Pn,{isNodejs:()=>_n});function_n(){returntypeofglobal=="object"&&!0&&typeofbo!="undefined"&&typeofprocess!="undefined"&&!!process.version}});varya=g();varQr={};Er(Qr,{AnchorPosition:()=>pt,DrawBox:()=>Ue,DrawBoxOptions:()=>Hr,DrawFaceLandmarks:()=>Kr,DrawFaceLandmarksOptions:()=>Zr,DrawTextField:()=>Mt,DrawTextFieldOptions:()=>Ce,drawContour:()=>lt,drawDetections:()=>En,drawFaceExpressions:()=>In,drawFaceLandmarks:()=>kn});functionlt(o,t,e=!1){if(o.beginPath(),t.slice(1).forEach(({x:r,y:n},a)=>{lets=t[a];o.moveTo(s.x,s.y),o.lineTo(r,n)}),e){letr=t[t.length-1],n=t[0];if(!r||!n)return;o.moveTo(r.x,r.y),o.lineTo(n.x,n.y)}o.stroke()}varMr={};Er(Mr,{computeReshapedDimensions:()=>Ir,getCenterPoint:()=>$t,isDimensions:()=>ze,isEven:()=>Ge,isFloat:()=>Nr,isTensor:()=>Bt,isTensor1D:()=>gn,isTensor2D:()=>Cr,isTensor3D:()=>ht,isTensor4D:()=>G,isValidNumber:()=>et,isValidProbablitiy:()=>ee,range:()=>it,round:()=>Rt});varho=g();varS=class{constructor(t,e){if(!et(t)||!et(e))thrownewError(`Dimensions.constructor - expected width and height to be valid numbers, instead have ${JSON.stringify({width:t,height:e})}`);this._width=t,this._height=e}getwidth(){returnthis._width}getheight(){returnthis._height}reverse(){returnnewS(1/this.width,1/this.height)}};functionBt(o,t){returnoinstanceofho.Tensor&&o.shape.length===t}functiongn(o){returnBt(o,1)}functionCr(o){returnBt(o,2)}functionht(o){returnBt(o,3)}functionG(o){returnBt(o,4)}functionNr(o){returno%1!=0}functionGe(o){returno%2==0}functionRt(o,t=2){lete=10**t;returnMath.floor(o*e)/e}functionze(o){returno&&o.width&&o.height}functionIr({width:o,height:t},e){letr=e/Math.max(t,o);returnnewS(Math.round(o*r),Math.round(t*r))}function$t(o){returno.reduce((t,e)=>t.add(e),newx(0,0)).div(newx(o.length,o.length))}functionit(o,t,e){returnArray(o).fill(0).map((r,n)=>t+n*e)}functionet(o){return!!o&&o!==Infinity&&o!==-Infinity&&!Number.isNaN(o)||o===0}functionee(o){returnet(o)&&o>=0&&o<=1}varx=class{constructor(t,e){this._x=t,this._y=e}getx(){returnthis._x}gety(){returnthis._y}add(t){returnnewx(this.x+t.x,this.y+t.y)}sub(t){returnnewx(this.x-t.x,this.y-t.y)}mul(t){returnnewx(this.x*t.x,this.y*t.y)}div(t){returnnewx(this.x/t.x,this.y/t.y)}abs(){returnnewx(Math.abs(this.x),Math.abs(this.y))}magnitude(){returnMath.sqrt(this.x**2+this.y**2)}floor(){returnnewx(Math.floor(this.x),Math.floor(this.y))}};varw=class{staticisRect(t){return!!t&&[t.x,t.y,t.width,t.height].every(et)}staticassertIsValidBox(t,e,r=!1){if(!w.isRect(t))thrownewError(`${e} - invalid box: ${JSON.stringify(t)}, expected object with properties x, y, width, height`);if(!r&&(t.width<0||t.height<0))thrownewError(`${e} - width (${t.width}) and height (${t.height}) must be positive numbers`)}constructor(t,e=!0){letr=t||{},n=[r.left,r.top,r.right,r.bottom].every(et),a=[r.x,r.y,r.width,r.height].every(et);if(!a&&!n)thrownewError(`Box.constructor - expected box to be IBoundingBox | IRect, instead have ${JSON.stringify(r)}`);let[s,i,c,m]=a?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top];w.assertIsValidBox({x:s,y:i,width:c,height:m},"Box.constructor",e),this._x=s,this._y=i,this._width=c,this._height=m}getx(){returnthis._x}gety(){return