2024-05-25 22:12:32 -04:00
|
|
|
var Ul=Object.defineProperty;var kl=(e,t)=>{for(var i in t)Ul(e,i,{get:t[i],enumerable:!0})};var ea={};kl(ea,{FileOrigin:()=>Pt,FileStatus:()=>pt,OptionTypes:()=>Ni,Status:()=>Kn,create:()=>dt,destroy:()=>ut,find:()=>Vi,getOptions:()=>Gi,parse:()=>Bi,registerPlugin:()=>_e,setOptions:()=>xt,supported:()=>zi});var Hl=e=>e instanceof HTMLElement,Wl=(e,t=[],i=[])=>{let a={...e},n=[],r=[],l=()=>({...a}),o=()=>{let p=[...n];return n.length=0,p},s=()=>{let p=[...r];r.length=0,p.forEach(({type:f,data:g})=>{u(f,g)})},u=(p,f,g)=>{if(g&&!document.hidden){r.push({type:p,data:f});return}m[p]&&m[p](f),n.push({type:p,data:f})},c=(p,...f)=>h[p]?h[p](...f):null,d={getState:l,processActionQueue:o,processDispatchQueue:s,dispatch:u,query:c},h={};t.forEach(p=>{h={...p(a),...h}});let m={};return i.forEach(p=>{m={...p(u,c,a),...m}}),d},Yl=(e,t,i)=>{if(typeof i=="function"){e[t]=i;return}Object.defineProperty(e,t,{...i})},te=(e,t)=>{for(let i in e)e.hasOwnProperty(i)&&t(i,e[i])},Ue=e=>{let t={};return te(e,i=>{Yl(t,i,e[i])}),t},ne=(e,t,i=null)=>{if(i===null)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,i)},$l="http://www.w3.org/2000/svg",ql=["svg","path"],wa=e=>ql.includes(e),ei=(e,t,i={})=>{typeof t=="object"&&(i=t,t=null);let a=wa(e)?document.createElementNS($l,e):document.createElement(e);return t&&(wa(e)?ne(a,"class",t):a.className=t),te(i,(n,r)=>{ne(a,n,r)}),a},jl=e=>(t,i)=>{typeof i<"u"&&e.children[i]?e.insertBefore(t,e.children[i]):e.appendChild(t)},Xl=(e,t)=>(i,a)=>(typeof a<"u"?t.splice(a,0,i):t.push(i),i),Ql=(e,t)=>i=>(t.splice(t.indexOf(i),1),i.element.parentNode&&e.removeChild(i.element),i),Zl=(()=>typeof window<"u"&&typeof window.document<"u")(),un=()=>Zl,Kl=un()?ei("svg"):{},Jl="children"in Kl?e=>e.children.length:e=>e.childNodes.length,hn=(e,t,i,a)=>{let n=i[0]||e.left,r=i[1]||e.top,l=n+e.width,o=r+e.height*(a[1]||1),s={element:{...e},inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:n,top:r,right:l,bottom:o}};return t.filter(u=>!u.isRectIgnored()).map(u=>u.rect).forEach(u=>{va(s.inner,{...u.inner}),va(s.outer,{...u.outer})}),La(s.inner),s.outer.bottom+=s.element.marginBottom,s.outer.right+=s.element.marginRight,La(s.outer),s},va=(e,t)=>{t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},La=e=>{e.width=e.right-e.left,e.height=e.bottom-e.top},$e=e=>typeof e=="number",eo=(e,t,i,a=.001)=>Math.abs(e-t)<a&&Math.abs(i)<a,to=({stiffness:e=.5,damping:t=.75,mass:i=10}={})=>{let a=null,n=null,r=0,l=!1,u=Ue({interpolate:(c,d)=>{if(l)return;if(!($e(a)&&$e(n))){l=!0,r=0;return}let h=-(n-a)*e;r+=h/i,n+=r,r*=t,eo(n,a,r)||d?(n=a,r=0,l=!0,u.onupdate(n),u.oncomplete(n)):u.onupdate(n)},target:{set:c=>{if($e(c)&&!$e(n)&&(n=c),a===null&&(a=c,n=c),a=c,n===a||typeof a>"u"){l=!0,r=0,u.onupdate(n),u.oncomplete(n);return}l=!1},get:()=>a},resting:{get:()=>l},onupdate:c=>{},oncomplete:c=>{}});return u};var io=e=>e<.5?2*e*e:-1+(4-2*e)*e,ao=({duration:e=500,easing:t=io,delay:i=0}={})=>{let a=null,n,r,l=!0,o=!1,s=null,c=Ue({interpolate:(d,h)=>{l||s===null||(a===null&&(a=d),!(d-a<i)&&(n=d-a-i,n>=e||h?(n=1,r=o?0:1,c.onupdate(r*s),c.oncomplete(r*s),l=!0):(r=n/e,c.onupdate((n>=0?t(o?1-r:r):0)*s))))},target:{get:()=>o?0:s,set:d=>{if(s===null){s=d,c.onupdate(d),c.oncomplete(d);return}d<s?(s=1,o=!0):(o=!1,s=d),l=!1,a=null}},resting:{get:()=>l},onupdate:d=>{},oncomplete:d=>{}});return c},Aa={spring:to,tween:ao},no=(e,t,i)=>{let a=e[t]&&typeof e[t][i]=="object"?e[t][i]:e[t]||e,n=typeof a=="string"?a:a.type,r=typeof a=="object"?{...a}:{};return Aa[n]?Aa[n](r):null},Ui=(e,t,i,a=!1)=>{t=Array.isArray(t)?t:[t],t.forEach(n=>{e.forEach(r=>{let l=r,o=()=>i[r],s=u=>i[r]=u;typeof r=="object"&&(l=r.key,o=r.getter||o,s=r.setter||s),!(n[l]&&!a)&&(n[l]={get:o,set:s})})})},ro=({mixinConfig:e,viewProps:t,viewInternalAPI:i,viewExternalAPI:a})=>{let n={...t},r=[];return te(e,(l,o)=>{let s=no(o);if(!s)return;s.onupdate=c=>{t[l]=c},s.target=n[l],Ui([{key:l,setter:c=>{s.target!==c&&(s.target=c)},getter:()=>t[l]}],[i,a],t,!0),r.push(s)}),{write:l=>{let o=document.hidden
|
|
|
|
`);for(let a of i){let n=rs(a);if(n){t.name=n;continue}let r=ls(a);if(r){t.size=r;continue}let l=os(a);if(l){t.source=l;continue}}return t},ss=e=>{let t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},i=()=>t.progress,a=()=>{t.request&&t.request.abort&&t.request.abort()},n=()=>{let o=t.source;l.fire("init",o),o instanceof File?l.fire("load",o):o instanceof Blob?l.fire("load",ht(o,o.name)):Mi(o)?l.fire("load",ns(o)):r(o)},r=o=>{if(!e){l.fire("error",{type:"error",body:"Can't load URL",code:400});return}t.timestamp=Date.now(),t.request=e(o,s=>{t.duration=Date.now()-t.timestamp,t.complete=!0,s instanceof Blob&&(s=ht(s,s.name||Ot(o))),l.fire("load",s instanceof Blob?s:s?s.body:null)},s=>{l.fire("error",typeof s=="string"?{type:"error",code:0,body:s}:s)},(s,u,c)=>{if(c&&(t.size=c),t.duration=Date.now()-t.timestamp,!s){t.progress=null;return}t.progress=u/c,l.fire("progress",t.progress)},()=>{l.fire("abort")},s=>{let u=Yi(typeof s=="string"?s:s.headers);l.fire("meta",{size:t.size||u.size,filename:u.name,source:u.source})})},l={...oi(),setSource:o=>t.source=o,getProgress:i,abort:a,load:n};return l},za=e=>/GET|HEAD/.test(e),Xe=(e,t,i)=>{let a={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{n=!0,l.abort()}},n=!1,r=!1;i={method:"POST",headers:{},withCredentials:!1,...i},t=encodeURI(t),za(i.method)&&e&&(t=`${t}${encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))}`);let l=new XMLHttpRequest,o=za(i.method)?l:l.upload;return o.onprogress=s=>{n||a.onprogress(s.lengthComputable,s.loaded,s.total)},l.onreadystatechange=()=>{l.readyState<2||l.readyState===4&&l.status===0||r||(r=!0,a.onheaders(l))},l.onload=()=>{l.status>=200&&l.status<300?a.onload(l):a.onerror(l)},l.onerror=()=>a.onerror(l),l.onabort=()=>{n=!0,a.onabort()},l.ontimeout=()=>a.ontimeout(l),l.open(i.method,t,!0),mt(i.timeout)&&(l.timeout=i.timeout),Object.keys(i.headers).forEach(s=>{let u=unescape(encodeURIComponent(i.headers[s]));l.setRequestHeader(s,u)}),i.responseType&&(l.responseType=i.responseType),i.withCredentials&&(l.withCredentials=!0),l.send(e),a},ie=(e,t,i,a)=>({type:e,code:t,body:i,headers:a}),Qe=e=>t=>{e(ie("error",0,"Timeout",t.getAllResponseHeaders()))},Na=e=>/\?/.test(e),Mt=(...e)=>{let t="";return e.forEach(i=>{t+=Na(t)&&Na(i)?i.replace(/\?/,"&"):i}),t},Ri=(e="",t)=>{if(typeof t=="function")return t;if(!t||!pe(t.url))return null;let i=t.onload||(n=>n),a=t.onerror||(n=>null);return(n,r,l,o,s,u)=>{let c=Xe(n,Mt(e,t.url),{...t,responseType:"blob"});return c.onload=d=>{let h=d.getAllResponseHeaders(),m=Yi(h).name||Ot(n);r(ie("load",d.status,t.method==="HEAD"?null:ht(i(d.response),m),h))},c.onerror=d=>{l(ie("error",d.status,a(d.response)||d.statusText,d.getAllResponseHeaders()))},c.onheaders=d=>{u(ie("headers",d.status,null,d.getAllResponseHeaders()))},c.ontimeout=Qe(l),c.onprogress=o,c.onabort=s,c}},Re={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},cs=(e,t,i,a,n,r,l,o,s,u,c)=>{let d=[],{chunkTransferId:h,chunkServer:m,chunkSize:p,chunkRetryDelays:f}=c,g={serverId:h,aborted:!1},I=t.ondata||(L=>L),E=t.onload||((L,F)=>F==="HEAD"?L.getResponseHeader("Upload-Offset"):L.response),b=t.onerror||(L=>null),_=L=>{let F=new FormData;ce(n)&&F.append(i,JSON.stringify(n));let w=typeof t.headers=="function"?t.headers(a,n):{...t.headers,"Upload-Length":a.size},A={...t,headers:w},C=Xe(I(F),Mt(e,t.url),A);C.onload=D=>L(E(D,A.method)),C.onerror=D=>l(ie("error",D.status,b(D.response)||D.statusText,D.getAllResponseHeaders())),C.ontimeout=Qe(l)},y=L=>{let F=Mt(e,m.url,g.serverId),A={headers:typeof t.headers=="function"?t.headers(g.serverId):{...t.headers},method:"HEAD"},C=Xe(null,F,A);C.onload=D=>L(E(D,A.method)),C.onerror=D=>l(ie("error",D.status,b(D.response)||D.statusText,D.getAllResponseHeaders())),C.ontimeout=Qe(l)},T=Math.floor(a.size/p);for(let L=0;L<=T;L++){let F=L*p,w=a.slice(F,F+p,"application/offset+octet-stream");d[L]={index:L,size:w.size,offset:F,data:w,file:a,progress:0,retries:[...f],status:Re.QUEUED,error:null,request:null,timeout:null}}let v=()=>r(g.serverId),
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var pi=typeof window<"u"&&typeof window.document<"u",De=pi?window:{},ma=pi&&De.document.documentElement?"ontouchstart"in De.document.documentElement:!1,pa=pi?"PointerEvent"in De:!1,Z="cropper",fa="all",Tr="crop",br="move",Ir="zoom",tt="e",it="w",ft="s",ke="n",Dt="ne",Ft="nw",Ct="se",zt="sw",ra="".concat(Z,"-crop"),tr="".concat(Z,"-disabled"),Te="".concat(Z,"-hidden"),ir="".concat(Z,"-hide"),au="".concat(Z,"-invisible"),mi="".concat(Z,"-modal"),la="".concat(Z,"-move"),Bt="".concat(Z,"Action"),ui="".concat(Z,"Preview"),ga="crop",_r="move",Rr="none",oa="crop",sa="cropend",ca="cropmove",da="cropstart",ar="dblclick",nu=ma?"touchstart":"mousedown",ru=ma?"touchmove":"mousemove",lu=ma?"touchend touchcancel":"mouseup",nr=pa?"pointerdown":nu,rr=pa?"pointermove":ru,lr=pa?"pointerup pointercancel":lu,or="ready",sr="resize",cr="wheel",ua="zoom",dr="image/jpeg",ou=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,su=/^data:/,cu=/^data:image\/jpeg;base64,/,du=/^img|canvas$/i,yr=200,Sr=100,ur={viewMode:0,dragMode:ga,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:yr,minContainerHeight:Sr,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},uu='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',hu=Number.isNaN||De.isNaN;function Y(e){return typeof e=="number"&&!hu(e)}var hr=function(t){return t>0&&t<1/0};function ta(e){return typeof e>"u"}function at(e){return aa(e)==="object"&&e!==null}var mu=Object.prototype.hasOwnProperty;function gt(e){if(!at(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&mu.call(i,"isPrototypeOf")}catch{return!1}}function Ee(e){return typeof e=="function"}var pu=Array.prototype.slice;function wr(e){return Array.from?Array.from(e):pu.call(e)}function le(e,t){return e&&Ee(t)&&(Array.isArray(e)||Y(e.length)?wr(e).forEach(function(i,a){t.call(e,i,a,e)}):at(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)})),e}var K=Object.assign||function(t){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];return at(t)&&a.length>0&&a.forEach(function(r){at(r)&&Object.keys(r).forEach(function(l){t[l]=r[l]})}),t},fu=/\.\d*(?:0|9){12}\d*$/;function Tt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return fu.test(e)?Math.round(e*t)/t:e}var gu=/^width|height|left|top|marginLeft|marginTop$/;function He(e,t){var i=e.style;le(t,function(a,n){gu.test(n)&&Y(a)&&(a="".concat(a,"px")),i[n]=a})}function Eu(e,t){return e.classList?e.classL
|
2023-12-14 12:33:03 -05:00
|
|
|
<defs>
|
|
|
|
<radialGradient id="gradient-__UID__" cx=".5" cy="1.25" r="1.15">
|
|
|
|
<stop offset='50%' stop-color='#000000'/>
|
|
|
|
<stop offset='56%' stop-color='#0a0a0a'/>
|
|
|
|
<stop offset='63%' stop-color='#262626'/>
|
|
|
|
<stop offset='69%' stop-color='#4f4f4f'/>
|
|
|
|
<stop offset='75%' stop-color='#808080'/>
|
|
|
|
<stop offset='81%' stop-color='#b1b1b1'/>
|
|
|
|
<stop offset='88%' stop-color='#dadada'/>
|
|
|
|
<stop offset='94%' stop-color='#f6f6f6'/>
|
|
|
|
<stop offset='100%' stop-color='#ffffff'/>
|
|
|
|
</radialGradient>
|
|
|
|
<mask id="mask-__UID__">
|
|
|
|
<rect x="0" y="0" width="500" height="200" fill="url(#gradient-__UID__)"></rect>
|
|
|
|
</mask>
|
|
|
|
</defs>
|
|
|
|
<rect x="0" width="500" height="200" fill="currentColor" mask="url(#mask-__UID__)"></rect>
|
2024-05-25 22:12:32 -04:00
|
|
|
</svg>`,jr=0,xh=e=>e.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:({root:t,props:i})=>{let a=Mh;if(document.querySelector("base")){let n=new URL(window.location.href.replace(window.location.hash,"")).href;a=a.replace(/url\(\#/g,"url("+n+"#")}jr++,t.element.classList.add(`filepond--image-preview-overlay-${i.status}`),t.element.innerHTML=a.replace(/__UID__/g,jr)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),Oh=function(){self.onmessage=e=>{createImageBitmap(e.data.message.file).then(t=>{self.postMessage({id:e.data.id,message:t},[t])})}},Ph=function(){self.onmessage=e=>{let t=e.data.message.imageData,i=e.data.message.colorMatrix,a=t.data,n=a.length,r=i[0],l=i[1],o=i[2],s=i[3],u=i[4],c=i[5],d=i[6],h=i[7],m=i[8],p=i[9],f=i[10],g=i[11],I=i[12],E=i[13],b=i[14],_=i[15],y=i[16],T=i[17],v=i[18],R=i[19],S=0,P=0,O=0,x=0,z=0;for(;S<n;S+=4)P=a[S]/255,O=a[S+1]/255,x=a[S+2]/255,z=a[S+3]/255,a[S]=Math.max(0,Math.min((P*r+O*l+x*o+z*s+u)*255,255)),a[S+1]=Math.max(0,Math.min((P*c+O*d+x*h+z*m+p)*255,255)),a[S+2]=Math.max(0,Math.min((P*f+O*g+x*I+z*E+b)*255,255)),a[S+3]=Math.max(0,Math.min((P*_+O*y+x*T+z*v+R)*255,255));self.postMessage({id:e.data.id,message:t},[t.data.buffer])}},Dh=(e,t)=>{let i=new Image;i.onload=()=>{let a=i.naturalWidth,n=i.naturalHeight;i=null,t(a,n)},i.src=e},Fh={1:()=>[1,0,0,1,0,0],2:e=>[-1,0,0,1,e,0],3:(e,t)=>[-1,0,0,-1,e,t],4:(e,t)=>[1,0,0,-1,0,t],5:()=>[0,1,1,0,0,0],6:(e,t)=>[0,1,-1,0,t,0],7:(e,t)=>[0,-1,-1,0,t,e],8:e=>[0,-1,1,0,0,e]},Ch=(e,t,i,a)=>{a!==-1&&e.transform.apply(e,Fh[a](t,i))},zh=(e,t,i,a)=>{t=Math.round(t),i=Math.round(i);let n=document.createElement("canvas");n.width=t,n.height=i;let r=n.getContext("2d");return a>=5&&a<=8&&([t,i]=[i,t]),Ch(r,t,i,a),r.drawImage(e,0,0,t,i),n},Zr=e=>/^image/.test(e.type)&&!/svg/.test(e.type),Nh=10,Bh=10,Vh=e=>{let t=Math.min(Nh/e.width,Bh/e.height),i=document.createElement("canvas"),a=i.getContext("2d"),n=i.width=Math.ceil(e.width*t),r=i.height=Math.ceil(e.height*t);a.drawImage(e,0,0,n,r);let l=null;try{l=a.getImageData(0,0,n,r).data}catch{return null}let o=l.length,s=0,u=0,c=0,d=0;for(;d<o;d+=4)s+=l[d]*l[d],u+=l[d+1]*l[d+1],c+=l[d+2]*l[d+2];return s=Ia(s,o),u=Ia(u,o),c=Ia(c,o),{r:s,g:u,b:c}},Ia=(e,t)=>Math.floor(Math.sqrt(e/(t/4))),Gh=(e,t)=>(t=t||document.createElement("canvas"),t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t),Uh=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(new Uint8ClampedArray(e.data)),t},kh=e=>new Promise((t,i)=>{let a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),Hh=e=>{let t=xh(e),i=Ah(e),{createWorker:a}=e.utils,n=(E,b,_)=>new Promise(y=>{E.ref.imageData||(E.ref.imageData=_.getContext("2d").getImageData(0,0,_.width,_.height));let T=Uh(E.ref.imageData);if(!b||b.length!==20)return _.getContext("2d").putImageData(T,0,0),y();let v=a(Ph);v.post({imageData:T,colorMatrix:b},R=>{_.getContext("2d").putImageData(R,0,0),v.terminate(),y()},[T.data.buffer])}),r=(E,b)=>{E.removeChildView(b),b.image.width=1,b.image.height=1,b._destroy()},l=({root:E})=>{let b=E.ref.images.shift();return b.opacity=0,b.translateY=-15,E.ref.imageViewBin.push(b),b},o=({root:E,props:b,image:_})=>{let y=b.id,T=E.query("GET_ITEM",{id:y});if(!T)return;let v=T.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},R=E.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),S,P,O=!1;E.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(S=T.getMetadata("markup")||[],P=T.getMetadata("resize"),O=!0);let x=E.appendChildView(E.createChildView(i,{id:y,image:_,crop:v,resize:P,markup:S,dirty:O,background:R,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),E.childViews.length);E.ref.images.push(x),x.opacity=1,x.scaleX=1,x.scaleY=1,x.translateY=0,setTimeout(()=>{E.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:y})},250)},s=({root:E,props:b})=>{let _=E.query("GET_ITEM",{id:b.id});if(!_)return;let y=E.ref.images[E.ref.images.length-1]
|
2023-12-14 12:33:03 -05:00
|
|
|
`+W.outerHTML+`
|
|
|
|
`},""),v=`
|
|
|
|
|
|
|
|
<g>${v.replace(/ /g," ")}</g>
|
|
|
|
|
2024-05-25 22:12:32 -04:00
|
|
|
`}let R=t.aspectRatio||T/y,S=y,P=S*R,O=typeof t.scaleToFit>"u"||t.scaleToFit,x=t.center?t.center.x:.5,z=t.center?t.center.y:.5,L=ol({width:y,height:T},sl({width:S,height:P},R),t.rotation,O?{x,y:z}:{x:.5,y:.5}),F=t.zoom*L,w=t.rotation*(180/Math.PI),A={x:S*.5,y:P*.5},C={x:A.x-y*x,y:A.y-T*z},D=[`rotate(${w} ${A.x} ${A.y})`,`translate(${A.x} ${A.y})`,`scale(${F})`,`translate(${-A.x} ${-A.y})`,`translate(${C.x} ${C.y})`],V=t.flip&&t.flip.horizontal,B=t.flip&&t.flip.vertical,j=[`scale(${V?-1:1} ${B?-1:1})`,`translate(${V?-y:0} ${B?-T:0})`],q=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<svg width="${S}${I}" height="${P}${E}"
|
|
|
|
viewBox="0 0 ${S} ${P}" ${r?'style="background:'+r+'" ':""}
|
2023-12-14 12:33:03 -05:00
|
|
|
preserveAspectRatio="xMinYMin"
|
|
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
|
xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<!-- Generated by PQINA - https://pqina.nl/ -->
|
|
|
|
<title>${d?d.textContent:""}</title>
|
2024-05-25 22:12:32 -04:00
|
|
|
<g transform="${D.join(" ")}">
|
|
|
|
<g transform="${j.join(" ")}">
|
2023-12-14 12:33:03 -05:00
|
|
|
${u.outerHTML}${v}
|
|
|
|
</g>
|
|
|
|
</g>
|
2024-05-25 22:12:32 -04:00
|
|
|
</svg>`;n(q)},l.readAsText(e)}),vm=e=>{let t;try{t=new ImageData(e.width,e.height)}catch{t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},Lm=()=>{let e={resize:c,filter:u},t=(d,h)=>(d.forEach(m=>{h=e[m.type](h,m.data)}),h),i=(d,h)=>{let m=d.transforms,p=null;if(m.forEach(f=>{f.type==="filter"&&(p=f)}),p){let f=null;m.forEach(g=>{g.type==="resize"&&(f=g)}),f&&(f.data.matrix=p.data,m=m.filter(g=>g.type!=="filter"))}h(t(m,d.imageData))};self.onmessage=d=>{i(d.data.message,h=>{self.postMessage({id:d.data.id,message:h},[h.data.buffer])})};let a=1,n=1,r=1;function l(d,h,m){let p=h[d]/255,f=h[d+1]/255,g=h[d+2]/255,I=h[d+3]/255,E=p*m[0]+f*m[1]+g*m[2]+I*m[3]+m[4],b=p*m[5]+f*m[6]+g*m[7]+I*m[8]+m[9],_=p*m[10]+f*m[11]+g*m[12]+I*m[13]+m[14],y=p*m[15]+f*m[16]+g*m[17]+I*m[18]+m[19],T=Math.max(0,E*y)+a*(1-y),v=Math.max(0,b*y)+n*(1-y),R=Math.max(0,_*y)+r*(1-y);h[d]=Math.max(0,Math.min(1,T))*255,h[d+1]=Math.max(0,Math.min(1,v))*255,h[d+2]=Math.max(0,Math.min(1,R))*255}let o=self.JSON.stringify([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);function s(d){return self.JSON.stringify(d||[])===o}function u(d,h){if(!h||s(h))return d;let m=d.data,p=m.length,f=h[0],g=h[1],I=h[2],E=h[3],b=h[4],_=h[5],y=h[6],T=h[7],v=h[8],R=h[9],S=h[10],P=h[11],O=h[12],x=h[13],z=h[14],L=h[15],F=h[16],w=h[17],A=h[18],C=h[19],D=0,V=0,B=0,j=0,q=0,X=0,ue=0,U=0,W=0,$=0,oe=0,J=0;for(;D<p;D+=4)V=m[D]/255,B=m[D+1]/255,j=m[D+2]/255,q=m[D+3]/255,X=V*f+B*g+j*I+q*E+b,ue=V*_+B*y+j*T+q*v+R,U=V*S+B*P+j*O+q*x+z,W=V*L+B*F+j*w+q*A+C,$=Math.max(0,X*W)+a*(1-W),oe=Math.max(0,ue*W)+n*(1-W),J=Math.max(0,U*W)+r*(1-W),m[D]=Math.max(0,Math.min(1,$))*255,m[D+1]=Math.max(0,Math.min(1,oe))*255,m[D+2]=Math.max(0,Math.min(1,J))*255;return d}function c(d,h){let{mode:m="contain",upscale:p=!1,width:f,height:g,matrix:I}=h;if(I=!I||s(I)?null:I,!f&&!g)return u(d,I);if(f===null?f=g:g===null&&(g=f),m!=="force"){let x=f/d.width,z=g/d.height,L=1;if(m==="cover"?L=Math.max(x,z):m==="contain"&&(L=Math.min(x,z)),L>1&&p===!1)return u(d,I);f=d.width*L,g=d.height*L}let E=d.width,b=d.height,_=Math.round(f),y=Math.round(g),T=d.data,v=new Uint8ClampedArray(_*y*4),R=E/_,S=b/y,P=Math.ceil(R*.5),O=Math.ceil(S*.5);for(let x=0;x<y;x++)for(let z=0;z<_;z++){let L=(z+x*_)*4,F=0,w=0,A=0,C=0,D=0,V=0,B=0,j=(x+.5)*S;for(let q=Math.floor(x*S);q<(x+1)*S;q++){let X=Math.abs(j-(q+.5))/O,ue=(z+.5)*R,U=X*X;for(let W=Math.floor(z*R);W<(z+1)*R;W++){let $=Math.abs(ue-(W+.5))/P,oe=Math.sqrt(U+$*$);if(oe>=-1&&oe<=1&&(F=2*oe*oe*oe-3*oe*oe+1,F>0)){$=4*(W+q*E);let J=T[$+3];B+=F*J,A+=F,J<255&&(F=F*J/250),C+=F*T[$],D+=F*T[$+1],V+=F*T[$+2],w+=F}}}v[L]=C/w,v[L+1]=D/w,v[L+2]=V/w,v[L+3]=B/A,I&&l(L,v,I)}return{data:v,width:_,height:y}}},Am=(e,t)=>{if(e.getUint32(t+4,!1)!==1165519206)return;t+=4;let i=e.getUint16(t+=6,!1)===18761;t+=e.getUint32(t+4,i);let a=e.getUint16(t,i);t+=2;for(let n=0;n<a;n++)if(e.getUint16(t+n*12,i)===274)return e.setUint16(t+n*12+8,1,i),!0;return!1},Mm=e=>{let t=new DataView(e);if(t.getUint16(0)!==65496)return null;let i=2,a,n,r=!1;for(;i<t.byteLength&&(a=t.getUint16(i,!1),n=t.getUint16(i+2,!1)+2,!(!(a>=65504&&a<=65519||a===65534)||(r||(r=Am(t,i,n)),i+n>t.byteLength)));)i+=n;return e.slice(0,i)},xm=e=>new Promise(t=>{let i=new FileReader;i.onload=()=>t(Mm(i.result)||null),i.readAsArrayBuffer(e.slice(0,256*1024))}),Om=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,Pm=(e,t)=>{let i=Om();if(i){let a=new i;return a.append(e),a.getBlob(t)}return new Blob([e],{type:t})},Dm=()=>Math.random().toString(36).substr(2,9),Fm=e=>{let t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),i=URL.createObjectURL(t),a=new Worker(i),n=[];return{transfer:()=>{},post:(r,l,o)=>{let s=Dm();n[s]=l,a.onmessage=u=>{let c=n[u.data.id];c&&(c(u.data.message),delete n[u.data.id])},a.postMessage({id:s,message:r},o)},terminate:()=>{a.terminate(),URL.revokeObjectURL(i)}}},Cm=e=>new Promise((t,i)=>{let a=new Image;a.onload=()=>{t(a)},a.onerror=n=>{i(n)},a.src=e}),zm=e=>e.reduce((t,i)=>t.then(a=>i().then(Array.prototy
|
2023-12-14 12:33:03 -05:00
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
filepond/dist/filepond.esm.js:
|
|
|
|
(*!
|
2024-05-25 22:12:32 -04:00
|
|
|
* FilePond 4.31.1
|
2023-12-14 12:33:03 -05:00
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
cropperjs/dist/cropper.esm.js:
|
|
|
|
(*!
|
2024-05-25 22:12:32 -04:00
|
|
|
* Cropper.js v1.6.2
|
2023-12-14 12:33:03 -05:00
|
|
|
* https://fengyuanchen.github.io/cropperjs
|
|
|
|
*
|
|
|
|
* Copyright 2015-present Chen Fengyuan
|
|
|
|
* Released under the MIT license
|
|
|
|
*
|
2024-05-25 22:12:32 -04:00
|
|
|
* Date: 2024-04-21T07:43:05.335Z
|
2023-12-14 12:33:03 -05:00
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.esm.js:
|
|
|
|
(*!
|
|
|
|
* FilePondPluginFileValidateSize 2.2.8
|
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.esm.js:
|
|
|
|
(*!
|
2024-05-25 22:12:32 -04:00
|
|
|
* FilePondPluginFileValidateType 1.2.9
|
2023-12-14 12:33:03 -05:00
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-image-crop/dist/filepond-plugin-image-crop.esm.js:
|
|
|
|
(*!
|
|
|
|
* FilePondPluginImageCrop 2.0.6
|
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-image-edit/dist/filepond-plugin-image-edit.esm.js:
|
|
|
|
(*!
|
|
|
|
* FilePondPluginImageEdit 1.6.3
|
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-image-exif-orientation/dist/filepond-plugin-image-exif-orientation.esm.js:
|
|
|
|
(*!
|
|
|
|
* FilePondPluginImageExifOrientation 1.0.11
|
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-image-preview/dist/filepond-plugin-image-preview.esm.js:
|
|
|
|
(*!
|
2024-05-25 22:12:32 -04:00
|
|
|
* FilePondPluginImagePreview 4.6.12
|
2023-12-14 12:33:03 -05:00
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-image-resize/dist/filepond-plugin-image-resize.esm.js:
|
|
|
|
(*!
|
|
|
|
* FilePondPluginImageResize 2.0.10
|
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-image-transform/dist/filepond-plugin-image-transform.esm.js:
|
|
|
|
(*!
|
|
|
|
* FilePondPluginImageTransform 3.8.7
|
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit https://pqina.nl/filepond/ for details.
|
|
|
|
*)
|
|
|
|
|
|
|
|
filepond-plugin-media-preview/dist/filepond-plugin-media-preview.esm.js:
|
|
|
|
(*!
|
|
|
|
* FilePondPluginMediaPreview 1.0.11
|
|
|
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
|
|
* Please visit undefined for details.
|
|
|
|
*)
|
|
|
|
*/
|