{"version":3,"file":"scripts.min.js","sources":["../src/js/jquery.waitforimages.js","../src/js/script.js"],"names":["factory","define","amd","exports","module","require","jQuery","$","img","eventNamespace","hasSrcset","Image","srcset","sizes","waitForImages","hasImageProperties","hasImageAttributes","expr","pseudos","obj","is","uncached","complete","fn","finishedCallback","eachCallback","waitForAll","allImgsLength","allImgsLoaded","deferred","Deferred","originalCollection","this","allImgs","hasImgProperties","matchUrl","isPlainObject","arguments","each","finished","length","noop","TypeError","find","addBack","element","push","src","attr","i","property","match","propertyValue","css","exec","attribute","call","resolveWith","image","events","one","me","event","eachArguments","type","apply","notifyWith","off","promise","window","addEventListener","__ImagePicker","formData","params","JFCustomWidget","getWidgetSettings","_imageLinks","selectedMethod","items","images","imageLinks","imageLabels","imageHeight","fixedSize","limit","currentPage","align","dontClear","init","split","indexOf","displayImages","setLimit","attachEventListener","document","getElementById","style","justifyContent","Left","Center","Right","text","parseInt","select","self","editedValues","index","row","item","splits","key","DomPurify","sanitize","decodeURIComponent","name","trim","search","imageStr","value","JFCustomWidgetUtils","hasMetadata","values","extractMetadata","imageUrl","div","loader","divLabel","divimg","imageLabel","addClass","tabindex","alt","data","on","e","keyCode","target","click","handleErrorImage","append","html","height","outerHeight","siblings","parent","width","outerWidth","hide","fadeIn","some","label","url","setFrameSize","hasClass","removeAttr","remove","setInterval","stopPropagation","thisparent","wasSelected","removeClass","toggleClass","sendData","getData","requestFrameResize","el","setTimeout","dataJson","hideWidgetError","children","valid","buildMetadata","clearWidget","widget","subscribe","sendSubmit"],"mappings":"CAGYA,IACc,YAAlB,OAAOC,QAAyBA,OAAOC,IAEvCD,OAAO,CAAC,UAAWD,CAAO,EACA,UAAnB,OAAOG,QAEdC,OAAOD,QAAUH,EAAQK,QAAQ,QAAQ,CAAC,EAG1CL,EAAQM,MAAM,CAEtB,GAAE,SAAUC,GAER,IAG0BC,EAHtBC,EAAiB,gBAGjBC,GAAsBF,EAEvB,IAAIG,OADQC,QAAUJ,EAAIK,MAI7BN,EA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