var useEditorWithJQuery=function(){"use strict";const o="pintura";return(c,i)=>{if(!c||!i)return;const{appendEditor:h,appendDefaultEditor:d,isSupported:y,dispatchEditorEvents:l}=i;if(!y()){c.fn[o]=()=>{};return}const E=t=>!t.length||typeof t[0]=="object",b=(t,n)=>{const e=Object.getOwnPropertyDescriptor(t,n);return e?typeof e.get<"u":!1},m=(t,n)=>{const e=Object.getOwnPropertyDescriptor(t,n);return e?typeof e.set<"u":!1},w=(t,n)=>typeof t[n]=="function",u=new Map,a=t=>function(...n){const e=[],O=this.each(function(){if(E(n)){const p=t(this,n[0]),g=l(p,this);p.on("destroy",()=>{g.forEach(j=>j()),u.delete(this)}),u.set(this,p);return}const r=u.get(this);if(!r)return;const s=n[0],f=n.concat().slice(1);if(w(r,s)){e.push(r[s].apply(r,f));return}if(m(r,s)&&f.length){r[s]=f[0];return}if(b(r,s)){e.push(r[s]);return}console.warn("$()."+o+'("'+s+'") is an unknown property or method.')});return e.length?this.length===1?e[0]:e:O};c.fn[o]=a(h),c.fn[o+"Default"]=a(d),Object.keys(i).forEach(t=>c.fn[o][t]=i[t])}}();
