varpr=Object.defineProperty;varao=Object.prototype.hasOwnProperty,so=Object.getOwnPropertyNames,io=Object.getOwnPropertyDescriptor;vardr=(o,t)=>{for(vareint)pr(o,e,{get:t[e],enumerable:!0})},wt=(o,t,e)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofso(t))!ao.call(o,r)&&r!=="default"&&pr(o,r,{get:()=>t[r],enumerable:!(e=io(t,r))||e.enumerable});returno};varn={};wt(n,Qo);wt(n,tn);import*asQofrom"@tensorflow/tfjs/dist/index.js";import*astnfrom"@tensorflow/tfjs-backend-wasm";varTo={};dr(To,{AnchorPosition:()=>J,DrawBox:()=>ue,DrawBoxOptions:()=>Ae,DrawFaceLandmarks:()=>Oe,DrawFaceLandmarksOptions:()=>$e,DrawTextField:()=>st,DrawTextFieldOptions:()=>Vt,drawContour:()=>q,drawDetections:()=>go,drawFaceExpressions:()=>vo,drawFaceLandmarks:()=>Fo});functionq(o,t,e=!1){if(o.beginPath(),t.slice(1).forEach(({x:r,y:a},s)=>{leti=t[s];o.moveTo(i.x,i.y),o.lineTo(r,a)}),e){letr=t[t.length-1],a=t[0];if(!r||!a)return;o.moveTo(r.x,r.y),o.lineTo(a.x,a.y)}o.stroke()}varco={};dr(co,{computeReshapedDimensions:()=>Me,getCenterPoint:()=>dt,isDimensions:()=>ie,isEven:()=>se,isFloat:()=>Ee,isTensor:()=>mt,isTensor1D:()=>mo,isTensor2D:()=>De,isTensor3D:()=>Z,isTensor4D:()=>B,isValidNumber:()=>H,isValidProbablitiy:()=>Pt,range:()=>U,round:()=>pt});varL=class{constructor(t,e){if(!H(t)||!H(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(){returnnewL(1/this.width,1/this.height)}};functionmt(o,t){returnoinstanceofn.Tensor&&o.shape.length===t}functionmo(o){returnmt(o,1)}functionDe(o){returnmt(o,2)}functionZ(o){returnmt(o,3)}functionB(o){returnmt(o,4)}functionEe(o){returno%1!=0}functionse(o){returno%2==0}functionpt(o,t=2){lete=10**t;returnMath.floor(o*e)/e}functionie(o){returno&&o.width&&o.height}functionMe({width:o,height:t},e){letr=e/Math.max(t,o);returnnewL(Math.round(o*r),Math.round(t*r))}functiondt(o){returno.reduce((t,e)=>t.add(e),newx(0,0)).div(newx(o.length,o.length))}functionU(o,t,e){returnArray(o).fill(0).map((r,a)=>t+a*e)}functionH(o){return!!o&&o!==Infinity&&o!==-Infinity&&!Number.isNaN(o)||o===0}functionPt(o){returnH(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(H)}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||{},a=[r.left,r.top,r.right,r.bottom].every(H),s=[r.x,r.y,r.width,r.height].every(H);if(!s&&!a)thrownewError(`Box.constructor - expected box to be IBoundingBox | IRect, instead have ${JSON.stringify(r)}`);let[i,c,m,p]=s?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top];w.assertIsValidBox({x:i,y:c,width:m,height:p},"Box.constructor",e),this._x=i,this._y=c,this._width=m,this._height=p}getx(){returnthis._x}gety(){returnthis._y}getwidth(){returnthis._width}getheight(){returnthis._height}getleft(){returnthis.x}gettop(){returnthis.y}getright(){returnthis.x+this.width}getbottom(){returnthis.y+this.height}getarea(){returnthis.width*this.height}gettopLeft(){returnnewx(this.left,this.top)}gettopRight(){returnnewx(this.right,this.top)}getbottomLeft(){returnnewx(this.left,this.bottom)}getbottomRight(){returnnewx(this.right,this.bottom)}round(){let[t,e,r,a]=[this.x,this.y,this.width,this.height].map(s=>