PageSourceSearch

https://filmivast.com/_next/static/chunks/948.265f045a10b72ffb.js

js filmivast.com collected 2026-09-25 07:30:01 UTC 23,213 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[948],{7948:(e,t,a)=>{a.d(t,{CanvasRenderer:()=>et});var r=a(89802),i=a(24059),n=a(44449),o=a(93726),s=a(93096),l=a(16913),h=a(47441),d=a(28767),c=a(7381),u=a(733),p=a(98141),g=a(83239),f=a(62552),x=a(28748);let m=new s.u,v=new s.u,y=new s.u,C=new s.u,_=new s.u;function k(e,t){switch(t.type){case"rectangle":e.rect(t.x,t.y,t.width,t.height);break;case"roundedRectangle":var a,r,i,n,o;a=t.x,r=t.y,i=t.width,n=t.height,o=Math.max(0,Math.min(o=t.radius,Math.min(i,n)/2)),e.moveTo(a+o,r),e.lineTo(a+i-o,r),e.quadraticCurveTo(a+i,r,a+i,r+o),e.lineTo(a+i,r+n-o),e.quadraticCurveTo(a+i,r+n,a+i-o,r+n),e.lineTo(a+o,r+n),e.quadraticCurveTo(a,r+n,a,r+n-o),e.lineTo(a,r+o),e.quadraticCurveTo(a,r,a+o,r);break;case"circle":e.arc(t.x,t.y,t.radius,0,2*Math.PI);break;case"ellipse":e.ellipse?e.ellipse(t.x,t.y,t.halfWidth,t.halfHeight,0,0,2*Math.PI):(e.save(),e.translate(t.x,t.y),e.scale(t.halfWidth,t.halfHeight),e.arc(0,0,1,0,2*Math.PI),e.restore());break;case"triangle":e.moveTo(t.x,t.y),e.lineTo(t.x2,t.y2),e.lineTo(t.x3,t.y3),e.closePath();break;default:{let a=t.points;if(!a?.length)break;e.moveTo(a[0],a[1]);for(let t=2;t<a.length;t+=2)e.lineTo(a[t],a[t+1]);t.closePath&&e.closePath()}}}class w{constructor(){this.shader=null}contextChange(e){}execute(e,t){let a=e.renderer,r=a.canvasContext,i=r.activeContext,n=t.groupTransform,s=a.globalUniforms.globalUniformData?.worldColor??0xffffffff,w=t.groupColorAlpha,T=(s>>>24&255)/255*((w>>>24&255)/255)*(a.filter?.alphaMultiplier??1);if(T<=0)return;let b=(0,d.D)((0,c.u)(0xffffff&w,0xffffff&s)),M=a._roundPixels|t._roundPixels;i.save(),r.setContextTransform(n,1===M),r.setBlendMode(t.groupBlendMode);let I=t.context.instructions;for(let e=0;e<I.length;e++){let t=I[e];if("texture"===t.action){let e=t.data,a=e.image,s=a?l.k.getCanvasSource(a):null;if(!s)continue;let h=e.alpha*T;if(h<=0)continue;let d=(0,c.u)(e.style,b);i.globalAlpha=h;let u=s;0xffffff!==d&&(u=l.k.getTintedCanvas({texture:a},d));let p=a.frame,g=a.source._resolution??a.source.resolution??1,f=p.x*g,x=p.y*g,v=p.width*g,y=p.height*g;u!==s&&(f=0,x=0);let C=e.transform,_=C&&!C.isIdentity(),k=a.rotate;_||k?(m.copyFrom(n),_&&m.append(C),k&&o.E.matrixAppendRotationInv(m,k,e.dx,e.dy,e.dw,e.dh),r.setContextTransform(m,1===M)):r.setContextTransform(n,1===M),i.drawImage(u,f,x,u===s?v:u.width,u===s?y:u.height,k?0:e.dx,k?0:e.dy,e.dw,e.dh),(_||k)&&r.setContextTransform(n,1===M);continue}let a=t.data,s=a?.path?.shapePath;if(!s?.shapePrimitives?.length)continue;let d=a.style,w=(0,c.u)(d.color,b),P=d.alpha*T;if(P<=0)continue;let S="stroke"===t.action;i.globalAlpha=P,S&&(i.lineWidth=d.width,i.lineCap=d.cap,i.lineJoin=d.join,i.miterLimit=d.miterLimit);let R=s.shapePrimitives;!S&&a.hole?.shapePath?.shapePrimitives?.length&&(R[R.length-1].holes=a.hole.shapePath.shapePrimitives);for(let e=0;e<R.length;e++){let t=R[e];if(!t?.shape)continue;let a=t.transform,r=a&&!a.isIdentity(),o=d.texture&&d.texture!==h.g.WHITE,s="global"===d.textureSpace?a:null,c=o?(0,x.Y)(v,d,t.shape,s):null,m=function(e,t,a,r){let i=e.fill;if(i instanceof p._){i.buildGradient();let n=i.texture;if(n){let o=l.k.getTintedPattern(n,t),s=a?C.copyFrom(a).scale(n.source.pixelWidth,n.source.pixelHeight):C.copyFrom(i.transform);return r&&!e.textureSpace&&s.append(r),l.k.applyPatternTransform(o,s),o}}if(i instanceof g.m){let e=l.k.getTintedPattern(i.texture,t);return l.k.applyPatternTransform(e,i.transform,!1),e}let n=e.texture;if(n&&n!==h.g.WHITE){if(!n.source.resource)return"#808080";let r=l.k.getTintedPattern(n,t),i=e.matrix;if(a){let{resolution:e}=n.source;if(i=C.copyFrom(a),n.rotate){let{uvs:t,orig:a}=n;i.prepend(_.set(t.x1-t.x0,t.y1-t.y0,t.x3-t.x0,t.y3-t.y0,t.x0,t.y0).invert()).scale(a.width*e,a.height*e)}else i.scale(n.source.pixelWidth,n.source.pixelHeight).translate(-n.frame.x*e,-n.frame.y*e)}return l.k.applyPatternTransform(r,i),r}return`#${(0xffffff&t).toString(16).padStart(6,"0")}`}(d,w,c,r?y.copyFrom(n).append(a):n);if(r&&(i.save(),i.transform(a.a,a.b,a.c,a.d,a.tx,a.ty)),S)if(.5===d.alignment||d.pixelLine)i.strokeStyle=m,i.beginPath(),k(i,t.shape),i.stroke();else{let e=[],a=[],r=[],n=f.y[t.shape.type];if(n?.build(t.shape,e)){let n=t.shape.closePath??!0;(0,u.h)(e,d,!1,n,a,r),i.fillStyle=m;i.beginPath();for(let e=0;e<r.length;e+=3){let t=2*r[e],n=2*r[e+1],o=2*r[e+2];i.moveTo(a[t],a[t+1]),i.lineTo(a[n],a[n+1]),i.lineTo(a[o],a[o+1]),i.closePath()}i.fill()}else i.strokeStyle=m,i.beginPath(),k(i,t.shape),i.stroke()}else i.fillStyle=m,i.beginPath(),k(i,t.shape),function(e,t){if(!t?.length)return!1;for(let a=0;a<t.length;a++){let r=t[a];if(!r?.shape)continue;let i=r.transform,n=i&&!i.isIdentity();n&&(e.save(),e.transform(i.a,i.b,i.c,i.d,i.tx,i.ty)),k(e,r.shape),n&&e.restore(
1)}return!0}(i,t.holes)?i.fill("evenodd"):i.fill();r&&i.restore()}}i.restore()}destroy(){this.shader=null}}w.extension={type:[r.Ag.CanvasPipesAdaptor],name:"graphics"};var T=a(60345);let b=class e{static _getPatternRepeat(e,t){let a=e&&"clamp-to-edge"!==e,r=t&&"clamp-to-edge"!==t;return a&&r?"repeat":a?"repeat-x":r?"repeat-y":"no-repeat"}start(e,t,a){}execute(t,a){let r=a.elements;if(!r||!r.length)return;let i=t.renderer,n=i.canvasContext,s=n.activeContext;for(let t=0;t<r.length;t++){let h=r[t];if(!h.packAsQuad)continue;let u=h.texture,p=u?l.k.getCanvasSource(u):null;if(!p)continue;let g=u.source.style,f=n.smoothProperty,x="nearest"!==g.scaleMode;s[f]!==x&&(s[f]=x),n.setBlendMode(a.blendMode);let m=i.globalUniforms.globalUniformData?.worldColor??0xffffffff,v=h.color,y=(m>>>24&255)/255*((v>>>24&255)/255)*(i.filter?.alphaMultiplier??1);if(y<=0)continue;s.globalAlpha=y;let C=0xffffff&m,_=0xffffff&v,k=(0,d.D)((0,c.u)(_,C)),w=u.frame,T=g.addressModeU??g.addressMode,b=g.addressModeV??g.addressMode,M=e._getPatternRepeat(T,b),I=u.source._resolution??u.source.resolution??1,P=h.renderable?.renderGroup?.isCachedAsTexture,S=w.x*I,R=w.y*I,A=w.width*I,W=w.height*I,E=h.bounds,H=i.renderTarget.renderTarget.isRoot,B=E.minX,D=E.minY,O=E.maxX-E.minX,U=E.maxY-E.minY,q=u.rotate,F=u.uvs,V=Math.min(F.x0,F.x1,F.x2,F.x3,F.y0,F.y1,F.y2,F.y3),G=Math.max(F.x0,F.x1,F.x2,F.x3,F.y0,F.y1,F.y2,F.y3),L="no-repeat"!==M&&(V<0||G>1),X=!L&&(0xffffff!==k||q),N=q&&!X;N?(e._tempPatternMatrix.copyFrom(h.transform),o.E.matrixAppendRotationInv(e._tempPatternMatrix,q,B,D,O,U),n.setContextTransform(e._tempPatternMatrix,1===h.roundPixels,void 0,P&&H)):n.setContextTransform(h.transform,1===h.roundPixels,void 0,P&&H);let Y=N?0:B,Q=N?0:D;if(N||1!==h.roundPixels||(Y|=0,Q|=0),L){let t=p,a=0xffffff!==k&&!q,r=w.width<=u.source.width&&w.height<=u.source.height;a&&r&&(t=l.k.getTintedCanvas({texture:u},k));let i=s.createPattern(t,M);if(!i||0===O||0===U)continue;let n=1/O,o=1/U,h=(F.x1-F.x0)*n,d=(F.y1-F.y0)*n,c=(F.x3-F.x0)*o,g=(F.y3-F.y0)*o,f=F.x0-h*Y-c*Q,x=F.y0-d*Y-g*Q,m=u.source.pixelWidth,v=u.source.pixelHeight;e._tempPatternMatrix.set(h*m,d*v,c*m,g*v,f*m,x*v),l.k.applyPatternTransform(i,e._tempPatternMatrix),s.fillStyle=i,s.fillRect(Y,Q,O,U)}else{let e=0xffffff!==k||q?l.k.getTintedCanvas({texture:u},k):p,t=e!==p;s.drawImage(e,t?0:S,t?0:R,t?e.width:A,t?e.height:W,Y,Q,O,U)}}}};b._tempPatternMatrix=new s.u,b.extension={type:[r.Ag.CanvasPipesAdaptor],name:"batch"};var M=a(4637),I=a(14086);class P{constructor(e){this._colorStack=[],this._colorStackIndex=0,this._currentColor=0,this._renderer=e}buildStart(){this._colorStack[0]=15,this._colorStackIndex=1,this._currentColor=15}push(e,t,a){this._renderer.renderPipes.batch.break(a);let r=this._colorStack;r[this._colorStackIndex]=r[this._colorStackIndex-1]&e.mask;let i=this._colorStack[this._colorStackIndex];i!==this._currentColor&&(this._currentColor=i,a.add({renderPipeId:"colorMask",colorMask:i,canBundle:!1})),this._colorStackIndex++}pop(e,t,a){this._renderer.renderPipes.batch.break(a);let r=this._colorStack;this._colorStackIndex--;let i=r[this._colorStackIndex-1];i!==this._currentColor&&(this._currentColor=i,a.add({renderPipeId:"colorMask",colorMask:i,canBundle:!1}))}execute(e){}destroy(){this._renderer=null,this._colorStack=null}}P.extension={type:[r.Ag.CanvasPipes],name:"colorMask"};var S=a(87842),R=a(32229);function A(e,t){switch(t.type){case"rectangle":e.rect(t.x,t.y,t.width,t.height);break;case"roundedRectangle":var a,r,i,n,o;a=t.x,r=t.y,i=t.width,n=t.height,o=Math.max(0,Math.min(o=t.radius,Math.min(i,n)/2)),e.moveTo(a+o,r),e.lineTo(a+i-o,r),e.quadraticCurveTo(a+i,r,a+i,r+o),e.lineTo(a+i,r+n-o),e.quadraticCurveTo(a+i,r+n,a+i-o,r+n),e.lineTo(a+o,r+n),e.quadraticCurveTo(a,r+n,a,r+n-o),e.lineTo(a,r+o),e.quadraticCurveTo(a,r,a+o,r);break;case"circle":e.moveTo(t.x+t.radius,t.y),e.arc(t.x,t.y,t.radius,0,2*Math.PI);break;case"ellipse":e.ellipse?(e.moveTo(t.x+t.halfWidth,t.y),e.ellipse(t.x,t.y,t.halfWidth,t.halfHeight,0,0,2*Math.PI)):(e.save(),e.translate(t.x,t.y),e.scale(t.halfWidth,t.halfHeight),e.moveTo(1,0),e.arc(0,0,1,0,2*Math.PI),e.restore(
1));break;case"triangle":e.moveTo(t.x,t.y),e.lineTo(t.x2,t.y2),e.lineTo(t.x3,t.y3),e.closePath();break;default:{let a=t.points;if(!a?.length)break;e.moveTo(a[0],a[1]);for(let t=2;t<a.length;t+=2)e.lineTo(a[t],a[t+1]);t.closePath&&e.closePath()}}}class W{constructor(e){this._warnedMaskTypes=new Set,this._canvasMaskStack=[],this._renderer=e}push(e,t,a){this._renderer.renderPipes.batch.break(a),a.add({renderPipeId:"stencilMask",action:"pushMaskBegin",mask:e,inverse:t._maskOptions.inverse,canBundle:!1})}pop(e,t,a){this._renderer.renderPipes.batch.break(a),a.add({renderPipeId:"stencilMask",action:"popMaskEnd",mask:e,inverse:t._maskOptions.inverse,canBundle:!1})}execute(e){if("pushMaskBegin"!==e.action&&"popMaskEnd"!==e.action)return;let t=this._renderer,a=t.canvasContext,r=a?.activeContext;if(!r)return;if("popMaskEnd"===e.action){this._canvasMaskStack.pop()&&r.restore();return}e.inverse&&this._warnOnce("inverse","CanvasRenderer: inverse masks are not supported on Canvas2D; ignoring inverse flag.");let i=e.mask.mask;if(!(i instanceof S.A)){this._warnOnce("nonGraphics","CanvasRenderer: only Graphics masks are supported in Canvas2D; skipping mask."),this._canvasMaskStack.push(!1);return}let n=i.context?.instructions;if(!n?.length)return void this._canvasMaskStack.push(!1);r.save(),a.setContextTransform(i.groupTransform,(t._roundPixels|i._roundPixels)==1),r.beginPath();let o=!1,s=!1;for(let e=0;e<n.length;e++){let t=n[e],a=t.action;if("fill"!==a&&"stroke"!==a)continue;let i=t.data,l=i?.path?.shapePath;if(!l?.shapePrimitives?.length)continue;let h="stroke"===a,d=l.shapePrimitives;for(let e=0;e<d.length;e++){let t=d[e];if(!t?.shape)continue;let a=t.transform,n=a&&!a.isIdentity();n&&(r.save(),r.transform(a.a,a.b,a.c,a.d,a.tx,a.ty)),h&&i.style?o=function(e,t,a){let r=[],i=[],n=[],o=f.y[t.type];if(!o?.build(t,r))return!1;let s=t.closePath??!0;(0,u.h)(r,a,!1,s,i,n);for(let t=0;t<n.length;t+=3){let a=2*n[t],r=2*n[t+1],o=2*n[t+2];e.moveTo(i[a],i[a+1]),e.lineTo(i[r],i[r+1]),e.lineTo(i[o],i[o+1]),e.closePath()}return!0}(r,t.shape,i.style)||o:(A(r,t.shape),s=function(e,t){if(!t?.length)return!1;for(let a=0;a<t.length;a++){let r=t[a];if(!r?.shape)continue;let i=r.transform,n=i&&!i.isIdentity();n&&(e.save(),e.transform(i.a,i.b,i.c,i.d,i.tx,i.ty)),A(e,r.shape),n&&e.restore()}return!0}(r,t.holes)||s,o=!0),n&&r.restore()}}if(!o){r.restore(),this._canvasMaskStack.push(!1);return}s?r.clip("evenodd"):r.clip(),this._canvasMaskStack.push(!0)}destroy(){this._renderer=null,this._warnedMaskTypes=null,this._canvasMaskStack=null}_warnOnce(e,t){this._warnedMaskTypes.has(e)||(this._warnedMaskTypes.add(e),(0,R.R)(t))}}W.extension={type:[r.Ag.CanvasPipes],name:"stencilMask"};var E=a(73457),H=a(5923),B=a(61682),D=a(96778),O=a(52813),U=a(29334);let q="source-over",F=new s.u;class V{constructor(e){this.activeResolution=1,this.smoothProperty="imageSmoothingEnabled",this.blendModes=function(){let e=(0,U.B)(),t=Object.create(null);return t.inherit=q,t.none=q,t.normal="source-over",t.add="lighter",t.multiply=e?"multiply":q,t.screen=e?"screen":q,t.overlay=e?"overlay":q,t.darken=e?"darken":q,t.lighten=e?"lighten":q,t["color-dodge"]=e?"color-dodge":q,t["color-burn"]=e?"color-burn":q,t["hard-light"]=e?"hard-light":q,t["soft-light"]=e?"soft-light":q,t.difference=e?"difference":q,t.exclusion=e?"exclusion":q,t.saturation=e?"saturation":q,t.color=e?"color":q,t.luminosity=e?"luminosity":q,t["linear-burn"]=e?"color-burn":q,t["linear-dodge"]=e?"color-dodge":q,t["linear-light"]=e?"hard-light":q,t["pin-light"]=e?"hard-light":q,t["vivid-light"]=e?"hard-light":q,t["hard-mix"]=q,t.negation=e?"difference":q,t["normal-npm"]=t.normal,t["add-npm"]=t.add,t["screen-npm"]=t.screen,t.erase
1="destination-out",t.subtract=q,t.divide=q,t.min=q,t.max=q,t}(),this._activeBlendMode="normal",this._projTransform=null,this._outerBlend=!1,this._warnedBlendModes=new Set,this._renderer=e}resolutionChange(e){this.activeResolution=e}init(){let e=this._renderer.background.alpha<1;if(this.rootContext=this._renderer.canvas.getContext("2d",{alpha:e}),this.activeContext=this.rootContext,this.activeResolution=this._renderer.resolution,!this.rootContext.imageSmoothingEnabled){let e=this.rootContext;e.webkitImageSmoothingEnabled?this.smoothProperty="webkitImageSmoothingEnabled":e.mozImageSmoothingEnabled?this.smoothProperty="mozImageSmoothingEnabled":e.oImageSmoothingEnabled?this.smoothProperty="oImageSmoothingEnabled":e.msImageSmoothingEnabled&&(this.smoothProperty="msImageSmoothingEnabled")}}setContextTransform(e,t,a,r){let i=r?s.u.IDENTITY:this._renderer.globalUniforms.globalUniformData?.worldTransformMatrix||s.u.IDENTITY,n=F;n.copyFrom(i),n.append(e);let o=this._projTransform,l=this.activeResolution;if(a=a||l,o){let e=s.u.shared;e.copyFrom(n),e.prepend(o),n=e}t?this.activeContext.setTransform(n.a*a,n.b*a,n.c*a,n.d*a,n.tx*l|0,n.ty*l|0):this.activeContext.setTransform(n.a*a,n.b*a,n.c*a,n.d*a,n.tx*l,n.ty*l)}clear(e,t){let a=this.activeContext,r=this._renderer;if(a.clearRect(0,0,r.width,r.height),e){let i=O.Q.shared.setValue(e);a.globalAlpha=t??i.alpha,a.fillStyle=i.toHex(),a.fillRect(0,0,r.width,r.height),a.globalAlpha=1}}setBlendMode(e){if(this._activeBlendMode===e)return;this._activeBlendMode=e,this._outerBlend=!1;let t=this.blendModes[e];if(!t){this._warnedBlendModes.has(e)||(console.warn(`CanvasRenderer: blend mode "${e}" is not supported in Canvas2D; falling back to "source-over".`),this._warnedBlendModes.add(e)),this.activeContext.globalCompositeOperation="source-over";return}this.activeContext.globalCompositeOperation=t}destroy(){this.rootContext=null,this.activeContext=null,this._warnedBlendModes.clear()}}V.extension={type:[r.Ag.CanvasSystem],name:"canvasContext"};class G{constructor(){this.maxTextures=16,this.maxBatchableTextures=16,this.maxUniformBindings=0}init(){}}G.extension={type:[r.Ag.CanvasSystem],name:"limits"};var L=a(28039),X=a(67111),N=a(40165);class Y{init(e,t){this._renderer=e,this._renderTargetSystem=t}initGpuRenderTarget(e){let t=e.colorTexture,{canvas:a,context:r}=this._ensureCanvas(t);return{canvas:a,context:r,width:a.width,height:a.height}}resizeGpuRenderTarget(e){let t=e.colorTexture,{canvas:a}=this._ensureCanvas(t);a.width=e.pixelWidth,a.height=e.pixelHeight}startRenderPass(e,t,a,r){let i=this._renderTargetSystem.getGpuRenderTarget(e);this._renderer.canvasContext.activeContext=i.context,this._renderer.canvasContext.activeResolution=e.resolution,t&&this.clear(e,t,a,r)}clear(e,t,a,r){let i=this._renderTargetSystem.getGpuRenderTarget(e).context,n=r||{x:0,y:0,width:e.pixelWidth,height:e.pixelHeight};if(i.setTransform(1,0,0,1,0,0),i.clearRect(n.x,n.y,n.width,n.height),a){let e=O.Q.shared.setValue(a);e.alpha>0&&(i.globalAlpha=e.alpha,i.fillStyle=e.toHex(),i.fillRect(n.x,n.y,n.width,n.height),i.globalAlpha=1)}}finishRenderPass(){}copyToTexture(e,t,a,r,i){let n=this._renderTargetSystem.getGpuRenderTarget(e).canvas,o=t.source,{context:s}=this._ensureCanvas(o),l=i?.x??0,h=i?.y??0;return s.drawImage(n,a.x,a.y,r.width,r.height,l,h,r.width,r.height),o.update(),t}copyDepthTexture(e,t,a,r,i){(0,R.R)("[CanvasRenderTargetAdaptor] copyDepthTexture is not supported in the canvas renderer")}destroyGpuRenderTarget(e){}_ensureCanvas(e){let t=e.resource;t&&N.q.test(t)||(t=X.e.get().createCanvas(e.pixelWidth,e.pixelHeight),e.resource=t),(t.width!==e.pixelWidth||t.height!==e.pixelHeight)&&(t.width=e.pixelWidth,t.height=e.pixelHeight);let a=t.getContext("2d");return{canvas:t,context:a}}}class Q extends L.l{constructor(e){super(e),this.adaptor=new Y,this.adaptor.init(e,this)}}Q.extension={type:[r.Ag.CanvasSystem],name:"renderTarget"};class j{constructor(e){}init(){}initSource(e){}generateCanvas(e){let t=X.e.get().createCanvas(),a=t.getContext("2d"),r=l.k.getCanvasSource(e);if(!r)return t;let i=e.frame,n=e.source._resolution??e.source.resolution??1,o=i.x*n,s=i.y*n,h=i.width*n,d=i.height*n;return t.width=Math.ceil(h),t.height=Math.ceil(d),a.drawImage(r,o,s,h,d,0,0,h,d),t}getPixels(e){let t=this.generateCanvas(e);return{pixels:t.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,t.width,t.height).data,width:t.width,height:t.height}}destroy(){}}j.extension={type:[r.Ag.CanvasSystem],name:"texture"};let z=[...B.i,V,G,j,Q],$=[E.j,M.s,T.k,n.a,I.z,W,P,i._],J=[b,w],K=[],Z=[],ee=[];r.XO.handleByNamedList(r.Ag.CanvasSystem,K),r.XO.handleByNamedList(r.Ag.CanvasPipes,Z),r.XO.handleByNamedList(r.Ag.CanvasPipesAdaptor,ee),r.XO.add(...z,...$,...J);class et extends H.k{constructor(){super({name:"canvas",type:D.W.CANVAS,systems:K,renderPipes:Z,renderPipeAdaptors:ee})}}},16913:(e,t,a)=>{a.d(t,{k:()=>o});var r=a(52813),i=a(67111),n=a(93726);
1let o={canvas:null,convertTintToImage:!1,cacheStepsPerColorChannel:8,canUseMultiply:(0,a(29334).B)(),tintMethod:null,_canvasSourceCache:new WeakMap,_unpremultipliedCache:new WeakMap,getCanvasSource:e=>{let t=e.source,a=t?.resource;if(!a)return null;let r="premultiplied-alpha"===t.alphaMode,n=t.resourceWidth??t.pixelWidth,s=t.resourceHeight??t.pixelHeight,l=n!==t.pixelWidth||s!==t.pixelHeight;if(r){if((a instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&a instanceof OffscreenCanvas)&&!l)return a;let e=o._unpremultipliedCache.get(t);if(e?.resourceId===t._resourceId)return e.canvas}if(a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||a instanceof Uint16Array||a instanceof Int16Array||a instanceof Uint32Array||a instanceof Int32Array||a instanceof Float32Array||a instanceof ArrayBuffer){let e=o._canvasSourceCache.get(t);if(e?.resourceId===t._resourceId)return e.canvas;let r=i.e.get().createCanvas(t.pixelWidth,t.pixelHeight),n=r.getContext("2d"),s=n.createImageData(t.pixelWidth,t.pixelHeight),l=s.data,h=a instanceof ArrayBuffer?new Uint8Array(a):new Uint8Array(a.buffer,a.byteOffset,a.byteLength);if("bgra8unorm"===t.format)for(let e=0;e<l.length&&e+3<h.length;e+=4)l[e]=h[e+2],l[e+1]=h[e+1],l[e+2]=h[e],l[e+3]=h[e+3];else l.set(h.subarray(0,l.length));return n.putImageData(s,0,0),o._canvasSourceCache.set(t,{canvas:r,resourceId:t._resourceId}),r}if(r){let e=i.e.get().createCanvas(t.pixelWidth,t.pixelHeight),r=e.getContext("2d",{willReadFrequently:!0});e.width=t.pixelWidth,e.height=t.pixelHeight,r.drawImage(a,0,0);let n=r.getImageData(0,0,e.width,e.height),s=n.data;for(let e=0;e<s.length;e+=4){let t=s[e+3];if(t>0){let a=255/t;s[e]=Math.min(255,s[e]*a+.5),s[e+1]=Math.min(255,s[e+1]*a+.5),s[e+2]=Math.min(255,s[e+2]*a+.5)}}return r.putImageData(n,0,0),o._unpremultipliedCache.set(t,{canvas:e,resourceId:t._resourceId}),e}if(l){let e=o._canvasSourceCache.get(t);if(e?.resourceId===t._resourceId)return e.canvas;let r=i.e.get().createCanvas(t.pixelWidth,t.pixelHeight),n=r.getContext("2d");return r.width=t.pixelWidth,r.height=t.pixelHeight,n.drawImage(a,0,0),o._canvasSourceCache.set(t,{canvas:r,resourceId:t._resourceId}),r}return a},getTintedCanvas:(e,t)=>{let a=e.texture,n=r.Q.shared.setValue(t).toHex(),s=a.tintCache||(a.tintCache={}),l=s[n],h=a.source._resourceId;if(l?.tintId===h)return l;let d=l&&"getContext"in l?l:i.e.get().createCanvas();if(o.tintMethod(a,t,d),d.tintId=h,o.convertTintToImage&&void 0!==d.toDataURL){let e=i.e.get().createImage();e.src=d.toDataURL(),e.tintId=h,s[n]=e}else s[n]=d;return s[n]},getTintedPattern:(e,t)=>{let a=r.Q.shared.setValue(t).toHex(),n=e.patternCache||(e.patternCache={}),s=e.source._resourceId,l=n[a];return l?.tintId===s||(o.canvas||(o.canvas=i.e.get().createCanvas()),o.tintMethod(e,t,o.canvas),(l=o.canvas.getContext("2d").createPattern(o.canvas,"repeat")).tintId=s,n[a]=l),l},applyPatternTransform:(e,t,a=!0)=>{if(!t||!e.setTransform)return;let r=globalThis.DOMMatrix;if(!r)return;let i=new r([t.a,t.b,t.c,t.d,t.tx,t.ty]);e.setTransform(a?i.inverse():i)},tintWithMultiply:(e,t,a)=>{let i=a.getContext("2d"),s=e.frame.clone(),l=e.source._resolution??e.source.resolution??1,h=e.rotate;s.x*=l,s.y*=l,s.width*=l,s.height*=l;let d=n.E.isVertical(h),c=d?s.height:s.width,u=d?s.width:s.height;a.width=Math.ceil(c),a.height=Math.ceil(u),i.save(),i.fillStyle=r.Q.shared.setValue(t).toHex(),i.fillRect(0,0,c,u),i.globalCompositeOperation="multiply";let p=o.getCanvasSource(e);if(!p)return void i.restore();h&&o._applyInverseRotation(i,h,s.width,s.height),i.drawImage(p,s.x,s.y,s.width,s.height,0,0,s.width,s.height),i.globalCompositeOperation="destination-atop",i.drawImage(p,s.x,s.y,s.width,s.height,0,0,s.width,s.height),i.restore()},tintWithOverlay:(e,t,a)=>{let i=a.getContext("2d"),s=e.frame.clone(),l=e.source._resolution??e.source.resolution??1,h=e.rotate;s.x*=l,s.y*=l,s.width*=l,s.height*=l;let d=n.E.isVertical(h),c=d?s.height:s.width,u=d?s.width:s.height;a.width=Math.ceil(c),a.height=Math.ceil(u),i.save(),i.globalCompositeOperation="copy",i.fillStyle=r.Q.shared.setValue(t).toHex(),i.fillRect(0,0,c,u),i.globalCompositeOperation="destination-atop";let p=o.getCanvasSource(e);
1if(!p)return void i.restore();h&&o._applyInverseRotation(i,h,s.width,s.height),i.drawImage(p,s.x,s.y,s.width,s.height,0,0,s.width,s.height),i.restore()},tintWithPerPixel:(e,t,a)=>{let r=a.getContext("2d"),i=e.frame.clone(),s=e.source._resolution??e.source.resolution??1,l=e.rotate;i.x*=s,i.y*=s,i.width*=s,i.height*=s;let h=n.E.isVertical(l),d=h?i.height:i.width,c=h?i.width:i.height;a.width=Math.ceil(d),a.height=Math.ceil(c),r.save(),r.globalCompositeOperation="copy";let u=o.getCanvasSource(e);if(!u)return void r.restore();l&&o._applyInverseRotation(r,l,i.width,i.height),r.drawImage(u,i.x,i.y,i.width,i.height,0,0,i.width,i.height),r.restore();let p=t>>16&255,g=t>>8&255,f=255&t,x=r.getImageData(0,0,d,c),m=x.data;for(let e=0;e<m.length;e+=4)m[e]=m[e]*p/255,m[e+1]=m[e+1]*g/255,m[e+2]=m[e+2]*f/255;r.putImageData(x,0,0)},_applyInverseRotation:(e,t,a,r)=>{let i=n.E.inv(t),o=n.E.uX(i),s=n.E.uY(i),l=n.E.vX(i),h=n.E.vY(i),d=-Math.min(0,o*a,l*r,o*a+l*r),c=-Math.min(0,s*a,h*r,s*a+h*r);e.transform(o,s,l,h,d,c)}};o.tintMethod=o.canUseMultiply?o.tintWithMultiply:o.tintWithPerPixel},29334:(e,t,a)=>{let r;a.d(t,{B:()=>o});var i=a(67111);function n(e){let t=i.e.get().createCanvas(6,1),a=t.getContext("2d");return a.fillStyle=e,a.fillRect(0,0,6,1),t}function o(){if(void 0!==r)return r;try{let e=n("#ff00ff"),t=n("#ffff00"),a=i.e.get().createCanvas(6,1).getContext("2d");a.globalCompositeOperation="multiply",a.drawImage(e,0,0),a.drawImage(t,2,0);let o=a.getImageData(2,0,1,1);if(o){let e=o.data;r=255===e[0]&&0===e[1]&&0===e[2]}else r=!1}catch(e){r=!1}return r}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.