Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mux/mux-uploader-react

Package Overview
Dependencies
Maintainers
1
Versions
523
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mux/mux-uploader-react - npm Package Compare versions

Comparing version 0.1.0-canary.410-87acf67 to 0.1.0-canary.411-3efe356

17

dist/cjs.json

@@ -9,3 +9,3 @@ {

"../mux-uploader/dist/index.mjs": {
"bytes": 24526,
"bytes": 24492,
"imports": [

@@ -234,3 +234,3 @@ {

"src/index.tsx": {
"bytes": 4209,
"bytes": 4368,
"imports": [

@@ -278,2 +278,7 @@ {

{
"path": "../mux-uploader/dist/index.mjs",
"kind": "import-statement",
"original": "@mux/mux-uploader"
},
{
"path": "src/common/utils.ts",

@@ -307,3 +312,3 @@ "kind": "import-statement",

"inputs": {},
"bytes": 221959
"bytes": 222131
},

@@ -397,3 +402,3 @@ "dist/index.cjs.js": {

"src/index.tsx": {
"bytesInOutput": 955
"bytesInOutput": 996
},

@@ -404,3 +409,3 @@ "../../node_modules/@mux/upchunk/dist/upchunk.mjs": {

"../mux-uploader/dist/index.mjs": {
"bytesInOutput": 24148
"bytesInOutput": 24114
},

@@ -435,5 +440,5 @@ "src/mux-uploader-drop.tsx": {

},
"bytes": 54192
"bytes": 54199
}
}
}

@@ -9,3 +9,3 @@ {

"../mux-uploader/dist/index.mjs": {
"bytes": 24526,
"bytes": 24492,
"imports": [

@@ -234,3 +234,3 @@ {

"src/index.tsx": {
"bytes": 4209,
"bytes": 4368,
"imports": [

@@ -278,2 +278,7 @@ {

{
"path": "../mux-uploader/dist/index.mjs",
"kind": "import-statement",
"original": "@mux/mux-uploader"
},
{
"path": "src/common/utils.ts",

@@ -307,3 +312,3 @@ "kind": "import-statement",

"inputs": {},
"bytes": 221515
"bytes": 221658
},

@@ -400,2 +405,3 @@ "dist/index.mjs": {

"MuxUploaderStatus",
"ProgressTypes",
"default"

@@ -406,3 +412,3 @@ ],

"src/index.tsx": {
"bytesInOutput": 716
"bytesInOutput": 736
},

@@ -413,3 +419,3 @@ "../../node_modules/@mux/upchunk/dist/upchunk.mjs": {

"../mux-uploader/dist/index.mjs": {
"bytesInOutput": 24136
"bytesInOutput": 24102
},

@@ -444,5 +450,5 @@ "src/mux-uploader-drop.tsx": {

},
"bytes": 53281
"bytes": 53287
}
}
}

@@ -1,4 +0,4 @@

"use strict";"use client";var Kt=Object.create;var he=Object.defineProperty;var Yt=Object.getOwnPropertyDescriptor;var Zt=Object.getOwnPropertyNames;var Jt=Object.getPrototypeOf,Qt=Object.prototype.hasOwnProperty;var er=(e,t)=>{for(var r in t)he(e,r,{get:t[r],enumerable:!0})},Ne=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Zt(t))!Qt.call(e,s)&&s!==r&&he(e,s,{get:()=>t[s],enumerable:!(n=Yt(t,s))||n.enumerable});return e};var F=(e,t,r)=>(r=e!=null?Kt(Jt(e)):{},Ne(t||!e||!e.__esModule?he(r,"default",{value:e,enumerable:!0}):r,e)),tr=e=>Ne(he({},"__esModule",{value:!0}),e);var Pn={};er(Pn,{MuxUploaderDrop:()=>_t,MuxUploaderFileSelect:()=>Ot,MuxUploaderPause:()=>Nt,MuxUploaderProgress:()=>Dt,MuxUploaderRetry:()=>Bt,MuxUploaderStatus:()=>Wt,default:()=>Tn});module.exports=tr(Pn);var j=F(require("react"));var rr=Object.create,Je=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,Qe=Object.getOwnPropertyNames,sr=Object.getPrototypeOf,ir=Object.prototype.hasOwnProperty,K=(e,t)=>function(){return t||(0,e[Qe(e)[0]])((t={exports:{}}).exports,t),t.exports},ar=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Qe(t))!ir.call(e,s)&&s!==r&&Je(e,s,{get:()=>t[s],enumerable:!(n=nr(t,s))||n.enumerable});return e},or=(e,t,r)=>(r=e!=null?rr(sr(e)):{},ar(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),lr=K({"node_modules/global/window.js"(e,t){var r;typeof window!="undefined"?r=window:typeof global!="undefined"?r=global:typeof self!="undefined"?r=self:r={},t.exports=r}}),ur=K({"node_modules/is-function/index.js"(e,t){t.exports=n;var r=Object.prototype.toString;function n(s){if(!s)return!1;var i=r.call(s);return i==="[object Function]"||typeof s=="function"&&i!=="[object RegExp]"||typeof window!="undefined"&&(s===window.setTimeout||s===window.alert||s===window.confirm||s===window.prompt)}}}),dr=K({"node_modules/parse-headers/parse-headers.js"(e,t){var r=function(s){return s.replace(/^\s+|\s+$/g,"")},n=function(s){return Object.prototype.toString.call(s)==="[object Array]"};t.exports=function(s){if(!s)return{};for(var i={},l=r(s).split(`
`),u=0;u<l.length;u++){var c=l[u],h=c.indexOf(":"),g=r(c.slice(0,h)).toLowerCase(),S=r(c.slice(h+1));typeof i[g]=="undefined"?i[g]=S:n(i[g])?i[g].push(S):i[g]=[i[g],S]}return i}}}),pr=K({"node_modules/xtend/immutable.js"(e,t){t.exports=n;var r=Object.prototype.hasOwnProperty;function n(){for(var s={},i=0;i<arguments.length;i++){var l=arguments[i];for(var u in l)r.call(l,u)&&(s[u]=l[u])}return s}}}),cr=K({"node_modules/xhr/index.js"(e,t){"use strict";var r=lr(),n=ur(),s=dr(),i=pr();t.exports=h,t.exports.default=h,h.XMLHttpRequest=r.XMLHttpRequest||ke,h.XDomainRequest="withCredentials"in new h.XMLHttpRequest?h.XMLHttpRequest:r.XDomainRequest,l(["get","put","post","patch","head","delete"],function(o){h[o==="delete"?"del":o]=function(v,b,_){return b=c(v,b,_),b.method=o.toUpperCase(),g(b)}});function l(o,v){for(var b=0;b<o.length;b++)v(o[b])}function u(o){for(var v in o)if(o.hasOwnProperty(v))return!1;return!0}function c(o,v,b){var _=o;return n(v)?(b=v,typeof o=="string"&&(_={uri:o})):_=i(v,{uri:o}),_.callback=b,_}function h(o,v,b){return v=c(o,v,b),g(v)}function g(o){if(typeof o.callback=="undefined")throw new Error("callback argument missing");var v=!1,b=function(D,ce,Vt){v||(v=!0,o.callback(D,ce,Vt))};function _(){d.readyState===4&&setTimeout(Fe,0)}function Gt(){var f=void 0;if(d.response?f=d.response:f=d.responseText||S(d),Be)try{f=JSON.parse(f)}catch{}return f}function Ce(f){return clearTimeout(Me),f instanceof Error||(f=new Error(""+(f||"Unknown XMLHttpRequest Error"))),f.statusCode=0,b(f,He)}function Fe(){if(!pe){var f;clearTimeout(Me),o.useXDR&&d.status===void 0?f=200:f=d.status===1223?204:d.status;var D=He,ce=null;return f!==0?(D={body:Gt(),statusCode:f,method:q,headers:{},url:Se,rawRequest:d},d.getAllResponseHeaders&&(D.headers=s(d.getAllResponseHeaders()))):ce=new Error("Internal XMLHttpRequest Error"),b(ce,D,D.body)}}var d=o.xhr||null;d||(o.cors||o.useXDR?d=new h.XDomainRequest:d=new h.XMLHttpRequest);var de,pe,Se=d.url=o.uri||o.url,q=d.method=o.method||"GET",Re=o.body||o.data,T=d.headers=o.headers||{},we=!!o.sync,Be=!1,Me,He={body:void 0,headers:{},statusCode:0,method:q,url:Se,rawRequest:d};if("json"in o&&o.json!==!1&&(Be=!0,T.accept||T.Accept||(T.Accept="application/json"),q!=="GET"&&q!=="HEAD"&&(T["content-type"]||T["Content-Type"]||(T["Content-Type"]="application/json"),Re=JSON.stringify(o.json===!0?Re:o.json))),d.onreadystatechange=_,d.onload=Fe,d.onerror=Ce,d.onprogress=function(){},d.onabort=function(){pe=!0},d.ontimeout=Ce,d.open(q,Se,!we,o.username,o.password),we||(d.withCredentials=!!o.withCredentials),!we&&o.timeout>0&&(Me=setTimeout(function(){if(!pe){pe=!0,d.abort("timeout");var f=new Error("XMLHttpRequest timeout");f.code="ETIMEDOUT",Ce(f)}},o.timeout)),d.setRequestHeader)for(de in T)T.hasOwnProperty(de)&&d.setRequestHeader(de,T[de]);else if(o.headers&&!u(o.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in o&&(d.responseType=o.responseType),"beforeSend"in o&&typeof o.beforeSend=="function"&&o.beforeSend(d),d.send(Re||null),d}function S(o){try{if(o.responseType==="document")return o.responseXML;var v=o.responseXML&&o.responseXML.documentElement.nodeName==="parsererror";if(o.responseType===""&&!v)return o.responseXML}catch{}return null}function ke(){}}});function _e(e,t,...r){if(!e)throw new TypeError(et(t,r))}function et(e,t){let r=0;return e.replace(/%[os]/gu,()=>tt(t[r++]))}function tt(e){return typeof e!="object"||e===null?String(e):Object.prototype.toString.call(e)}var je;function hr(e){try{let t=e instanceof Error?e:new Error(tt(e));if(je){je(t);return}if(typeof dispatchEvent=="function"&&typeof ErrorEvent=="function")dispatchEvent(new ErrorEvent("error",{error:t,message:t.message}));else if(typeof process!="undefined"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)}catch{}}var R=typeof window!="undefined"?window:typeof self!="undefined"?self:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:void 0,We,P=class{constructor(e,t){this.code=e,this.message=t}warn(...e){var t;try{if(We){We({...this,args:e});return}let r=((t=new Error().stack)!==null&&t!==void 0?t:"").replace(/^(?:.+?\n){2}/gu,`
`);console.warn(this.message,...e,r)}catch{}}},fr=new P("W01","Unable to initialize event under dispatching."),mr=new P("W02","Assigning any falsy value to 'cancelBubble' property has no effect."),gr=new P("W03","Assigning any truthy value to 'returnValue' property has no effect."),vr=new P("W04","Unable to preventDefault on non-cancelable events."),br=new P("W05","Unable to preventDefault inside passive event listener invocation."),yr=new P("W06","An event listener wasn't added because it has been added already: %o, %o"),Te=new P("W07","The %o option value was abandoned because the event listener wasn't added as duplicated."),$e=new P("W08","The 'callback' argument must be a function or an object that has 'handleEvent' method: %o"),Un=new P("W09","Event attribute handler must be a function: %o"),A=class{static get NONE(){return Xe}static get CAPTURING_PHASE(){return qe}static get AT_TARGET(){return Ge}static get BUBBLING_PHASE(){return Ve}constructor(e,t){Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let r=t!=null?t:{};Le.set(this,{type:String(e),bubbles:!!r.bubbles,cancelable:!!r.cancelable,composed:!!r.composed,target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1,inPassiveListenerFlag:!1,dispatchFlag:!1,timeStamp:Date.now()})}get type(){return m(this).type}get target(){return m(this).target}get srcElement(){return m(this).target}get currentTarget(){return m(this).currentTarget}composedPath(){let e=m(this).currentTarget;return e?[e]:[]}get NONE(){return Xe}get CAPTURING_PHASE(){return qe}get AT_TARGET(){return Ge}get BUBBLING_PHASE(){return Ve}get eventPhase(){return m(this).dispatchFlag?2:0}stopPropagation(){m(this).stopPropagationFlag=!0}get cancelBubble(){return m(this).stopPropagationFlag}set cancelBubble(e){e?m(this).stopPropagationFlag=!0:mr.warn()}stopImmediatePropagation(){let e=m(this);e.stopPropagationFlag=e.stopImmediatePropagationFlag=!0}get bubbles(){return m(this).bubbles}get cancelable(){return m(this).cancelable}get returnValue(){return!m(this).canceledFlag}set returnValue(e){e?gr.warn():Ke(m(this))}preventDefault(){Ke(m(this))}get defaultPrevented(){return m(this).canceledFlag}get composed(){return m(this).composed}get isTrusted(){return!1}get timeStamp(){return m(this).timeStamp}initEvent(e,t=!1,r=!1){let n=m(this);if(n.dispatchFlag){fr.warn();return}Le.set(this,{...n,type:String(e),bubbles:!!t,cancelable:!!r,target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1})}},Xe=0,qe=1,Ge=2,Ve=3,Le=new WeakMap;function m(e,t="this"){let r=Le.get(e);return _e(r!=null,"'%s' must be an object that Event constructor created, but got another one: %o",t,e),r}function Ke(e){if(e.inPassiveListenerFlag){br.warn();return}if(!e.cancelable){vr.warn();return}e.canceledFlag=!0}Object.defineProperty(A,"NONE",{enumerable:!0});Object.defineProperty(A,"CAPTURING_PHASE",{enumerable:!0});Object.defineProperty(A,"AT_TARGET",{enumerable:!0});Object.defineProperty(A,"BUBBLING_PHASE",{enumerable:!0});var Pe=Object.getOwnPropertyNames(A.prototype);for(let e=0;e<Pe.length;++e)Pe[e]!=="constructor"&&Object.defineProperty(A.prototype,Pe[e],{enumerable:!0});typeof R!="undefined"&&typeof R.Event!="undefined"&&Object.setPrototypeOf(A.prototype,R.Event.prototype);function Er(e){return R.DOMException?new R.DOMException(e,"InvalidStateError"):(W==null&&(W=class rt extends Error{constructor(r){super(r),Error.captureStackTrace&&Error.captureStackTrace(this,rt)}get code(){return 11}get name(){return"InvalidStateError"}},Object.defineProperties(W.prototype,{code:{enumerable:!0},name:{enumerable:!0}}),Ze(W),Ze(W.prototype)),new W(e))}var W,Ye={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};function Ze(e){let t=Object.keys(Ye);for(let r=0;r<t.length;++r){let n=t[r],s=Ye[n];Object.defineProperty(e,n,{get(){return s},configurable:!0,enumerable:!0})}}var me=class extends A{static wrap(e){return new(st(e))(e)}constructor(e){super(e.type,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed}),e.cancelBubble&&super.stopPropagation(),e.defaultPrevented&&super.preventDefault(),nt.set(this,{original:e});let t=Object.keys(e);for(let r=0;r<t.length;++r){let n=t[r];n in this||Object.defineProperty(this,n,it(e,n))}}stopPropagation(){super.stopPropagation();let{original:e}=z(this);"stopPropagation"in e&&e.stopPropagation()}get cancelBubble(){return super.cancelBubble}set cancelBubble(e){super.cancelBubble=e;let{original:t}=z(this);"cancelBubble"in t&&(t.cancelBubble=e)}stopImmediatePropagation(){super.stopImmediatePropagation();let{original:e}=z(this);"stopImmediatePropagation"in e&&e.stopImmediatePropagation()}get returnValue(){return super.returnValue}set returnValue(e){super.returnValue=e;let{original:t}=z(this);"returnValue"in t&&(t.returnValue=e)}preventDefault(){super.preventDefault();let{original:e}=z(this);"preventDefault"in e&&e.preventDefault()}get timeStamp(){let{original:e}=z(this);return"timeStamp"in e?e.timeStamp:super.timeStamp}},nt=new WeakMap;function z(e){let t=nt.get(e);return _e(t!=null,"'this' is expected an Event object, but got",e),t}var fe=new WeakMap;fe.set(Object.prototype,me);typeof R!="undefined"&&typeof R.Event!="undefined"&&fe.set(R.Event.prototype,me);function st(e){let t=Object.getPrototypeOf(e);if(t==null)return me;let r=fe.get(t);return r==null&&(r=xr(st(t),t),fe.set(t,r)),r}function xr(e,t){class r extends e{}let n=Object.keys(t);for(let s=0;s<n.length;++s)Object.defineProperty(r.prototype,n[s],it(t,n[s]));return r}function it(e,t){let r=Object.getOwnPropertyDescriptor(e,t);return{get(){let n=z(this).original,s=n[t];return typeof s=="function"?s.bind(n):s},set(n){let s=z(this).original;s[t]=n},configurable:r.configurable,enumerable:r.enumerable}}function kr(e,t,r,n,s,i){return{callback:e,flags:(t?1:0)|(r?2:0)|(n?4:0),signal:s,signalListener:i}}function Cr(e){e.flags|=8}function at(e){return(e.flags&1)===1}function ot(e){return(e.flags&2)===2}function lt(e){return(e.flags&4)===4}function Sr(e){return(e.flags&8)===8}function Rr({callback:e},t,r){try{typeof e=="function"?e.call(t,r):typeof e.handleEvent=="function"&&e.handleEvent(r)}catch(n){hr(n)}}function ut({listeners:e},t,r){for(let n=0;n<e.length;++n)if(e[n].callback===t&&at(e[n])===r)return n;return-1}function wr(e,t,r,n,s,i){let l;i&&(l=dt.bind(null,e,t,r),i.addEventListener("abort",l));let u=kr(t,r,n,s,i,l);return e.cow?(e.cow=!1,e.listeners=[...e.listeners,u]):e.listeners.push(u),u}function dt(e,t,r){let n=ut(e,t,r);return n!==-1?pt(e,n):!1}function pt(e,t,r=!1){let n=e.listeners[t];return Cr(n),n.signal&&n.signal.removeEventListener("abort",n.signalListener),e.cow&&!r?(e.cow=!1,e.listeners=e.listeners.filter((s,i)=>i!==t),!1):(e.listeners.splice(t,1),!0)}function Mr(){return Object.create(null)}function Tr(e,t){var r;return(r=e[t])!==null&&r!==void 0?r:e[t]={attrCallback:void 0,attrListener:void 0,cow:!1,listeners:[]}}var ge=class{constructor(){ct.set(this,Mr())}addEventListener(e,t,r){let n=Ae(this),{callback:s,capture:i,once:l,passive:u,signal:c,type:h}=Pr(e,t,r);if(s==null||c!=null&&c.aborted)return;let g=Tr(n,h),S=ut(g,s,i);if(S!==-1){Ur(g.listeners[S],u,l,c);return}wr(g,s,i,u,l,c)}removeEventListener(e,t,r){let n=Ae(this),{callback:s,capture:i,type:l}=Ar(e,t,r),u=n[l];s!=null&&u&&dt(u,s,i)}dispatchEvent(e){let t=Ae(this)[String(e.type)];if(t==null)return!0;let r=e instanceof A?e:me.wrap(e),n=m(r,"event");if(n.dispatchFlag)throw Er("This event has been in dispatching.");if(n.dispatchFlag=!0,n.target=n.currentTarget=this,!n.stopPropagationFlag){let{cow:s,listeners:i}=t;t.cow=!0;for(let l=0;l<i.length;++l){let u=i[l];if(!Sr(u)&&(lt(u)&&pt(t,l,!s)&&(l-=1),n.inPassiveListenerFlag=ot(u),Rr(u,this,r),n.inPassiveListenerFlag=!1,n.stopImmediatePropagationFlag))break}s||(t.cow=!1)}return n.target=null,n.currentTarget=null,n.stopImmediatePropagationFlag=!1,n.stopPropagationFlag=!1,n.dispatchFlag=!1,!n.canceledFlag}},ct=new WeakMap;function Ae(e,t="this"){let r=ct.get(e);return _e(r!=null,"'%s' must be an object that EventTarget constructor created, but got another one: %o",t,e),r}function Pr(e,t,r){var n;return ht(t),typeof r=="object"&&r!==null?{type:String(e),callback:t!=null?t:void 0,capture:!!r.capture,passive:!!r.passive,once:!!r.once,signal:(n=r.signal)!==null&&n!==void 0?n:void 0}:{type:String(e),callback:t!=null?t:void 0,capture:!!r,passive:!1,once:!1,signal:void 0}}function Ar(e,t,r){return ht(t),typeof r=="object"&&r!==null?{type:String(e),callback:t!=null?t:void 0,capture:!!r.capture}:{type:String(e),callback:t!=null?t:void 0,capture:!!r}}function ht(e){if(!(typeof e=="function"||typeof e=="object"&&e!==null&&typeof e.handleEvent=="function")){if(e==null||typeof e=="object"){$e.warn(e);return}throw new TypeError(et($e.message,[e]))}}function Ur(e,t,r,n){yr.warn(at(e)?"capture":"bubble",e.callback),ot(e)!==t&&Te.warn("passive"),lt(e)!==r&&Te.warn("once"),e.signal!==n&&Te.warn("signal")}var Ue=Object.getOwnPropertyNames(ge.prototype);for(let e=0;e<Ue.length;++e)Ue[e]!=="constructor"&&Object.defineProperty(ge.prototype,Ue[e],{enumerable:!0});typeof R!="undefined"&&typeof R.EventTarget!="undefined"&&Object.setPrototypeOf(ge.prototype,R.EventTarget.prototype);var Lr=or(cr()),ze=30720,Y=512e3,Z=256,G=(e,{minChunkSize:t=Z,maxChunkSize:r=Y}={})=>e==null||typeof e=="number"&&e>=256&&e%256===0&&e>=t&&e<=r,V=(e,{minChunkSize:t=Z,maxChunkSize:r=Y}={})=>new TypeError(`chunkSize ${e} must be a positive number in multiples of 256, between ${t} and ${r}`),_r=class{constructor(e,t={}){this.readableStream=e;var r,n,s;if(!G(t.defaultChunkSize,t))throw V(t.defaultChunkSize,t);this.defaultChunkSize=(r=t.defaultChunkSize)!=null?r:ze,this.minChunkSize=(n=t.minChunkSize)!=null?n:Z,this.maxChunkSize=(s=t.maxChunkSize)!=null?s:Y}get chunkSize(){var e;return(e=this._chunkSize)!=null?e:this.defaultChunkSize}set chunkSize(e){if(!G(e,this))throw V(e,this);this._chunkSize=e}get chunkByteSize(){return this.chunkSize*1024}get error(){return this._error}async*[Symbol.asyncIterator](){let e,t=this.readableStream.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r){if(e){let i=e;e=void 0,yield i}break}let s=n instanceof Uint8Array?new Blob([n],{type:"application/octet-stream"}):n;for(e=e?new Blob([e,s]):s;e;)if(e.size===this.chunkByteSize){let i=e;e=void 0,yield i;break}else{if(e.size<this.chunkByteSize)break;{let i=e.slice(0,this.chunkByteSize);e=e.slice(this.chunkByteSize),yield i}}}}catch(r){this._error=r}finally{if(e){let r=e;e=void 0,yield r}t.releaseLock();return}}},zr=class{constructor(e,t={}){this.file=e;var r,n,s;if(!G(t.defaultChunkSize,t))throw V(t.defaultChunkSize,t);this.defaultChunkSize=(r=t.defaultChunkSize)!=null?r:ze,this.minChunkSize=(n=t.minChunkSize)!=null?n:Z,this.maxChunkSize=(s=t.maxChunkSize)!=null?s:Y}get chunkSize(){var e;return(e=this._chunkSize)!=null?e:this.defaultChunkSize}set chunkSize(e){if(!G(e,this))throw V(e,this);this._chunkSize=e}get chunkByteSize(){return this.chunkSize*1024}get error(){return this._error}async*[Symbol.asyncIterator](){let e=new FileReader,t=0,r=()=>new Promise(n=>{if(t>=this.file.size){n(void 0);return}let s=Math.min(this.chunkByteSize,this.file.size-t);e.onload=()=>{e.result!==null?n(new Blob([e.result],{type:"application/octet-stream"})):n(void 0)},e.readAsArrayBuffer(this.file.slice(t,t+s))});try{for(;;){let n=await r();if(n)t+=n.size,yield n;else break}}catch(n){this._error=n}}},Or=[200,201,202,204,308],ft=[408,502,503,504],Ir=[308],mt=(e,t)=>!!e&&Or.includes(e.statusCode),Dr=(e,{retryCodes:t=ft})=>!e||t.includes(e.statusCode),Fr=(e,t)=>t.attemptCount>=t.attempts||!(mt(e)||Dr(e,t)),Br=(e,t)=>{var r;if(!e||!Ir.includes(e.statusCode)||!((r=e.headers)!=null&&r.range))return!1;let n=e.headers.range.match(/bytes=(\d+)-(\d+)/);return n?parseInt(n[2],10)!==t.currentChunkEndByte:!1},Oe=class{static createUpload(e){return new Oe(e)}constructor(e){if(this.eventTarget=new ge,this.endpoint=e.endpoint,this.file=e.file,this.headers=e.headers||{},this.method=e.method||"PUT",this.attempts=e.attempts||5,this.delayBeforeAttempt=e.delayBeforeAttempt||1,this.retryCodes=e.retryCodes||ft,this.dynamicChunkSize=e.dynamicChunkSize||!1,this.maxFileBytes=(e.maxFileSize||0)*1024,this.chunkCount=0,this.attemptCount=0,this._offline=typeof window!="undefined"&&!window.navigator.onLine,this._paused=!1,this.success=!1,this.nextChunkRangeStart=0,e.useLargeFileWorkaround){let t=r=>{this.chunkedIterable.error&&(console.warn(`Unable to read file of size ${this.file.size} bytes via a ReadableStream. Falling back to in-memory FileReader!`),r.stopImmediatePropagation(),this.chunkedIterable=new zr(this.file,{...e,defaultChunkSize:e.chunkSize}),this.chunkedIterator=this.chunkedIterable[Symbol.asyncIterator](),this.getEndpoint().then(()=>{this.sendChunks()}),this.off("error",t))};this.on("error",t)}this.chunkedIterable=new _r(this.file.stream(),{...e,defaultChunkSize:e.chunkSize}),this.chunkedIterator=this.chunkedIterable[Symbol.asyncIterator](),this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window!="undefined"&&(window.addEventListener("online",()=>{this.offline&&(this._offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline||(this._offline=!0,this.dispatch("offline"))}))}get maxChunkSize(){var e,t;return(t=(e=this.chunkedIterable)==null?void 0:e.maxChunkSize)!=null?t:Y}get minChunkSize(){var e,t;return(t=(e=this.chunkedIterable)==null?void 0:e.minChunkSize)!=null?t:Z}get chunkSize(){var e,t;return(t=(e=this.chunkedIterable)==null?void 0:e.chunkSize)!=null?t:ze}set chunkSize(e){this.chunkedIterable.chunkSize=e}get chunkByteSize(){return this.chunkedIterable.chunkByteSize}get totalChunkSize(){return Math.ceil(this.file.size/this.chunkByteSize)}on(e,t){this.eventTarget.addEventListener(e,t)}once(e,t){this.eventTarget.addEventListener(e,t,{once:!0})}off(e,t){this.eventTarget.removeEventListener(e,t)}get offline(){return this._offline}get paused(){return this._paused}abort(){var e;this.pause(),(e=this.currentXhr)==null||e.abort()}pause(){this._paused=!0}resume(){this._paused&&(this._paused=!1,this.sendChunks())}get successfulPercentage(){return this.nextChunkRangeStart/this.file.size}dispatch(e,t){let r=new CustomEvent(e,{detail:t});this.eventTarget.dispatchEvent(r)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint must be defined as a string or a function that returns a promise");if(!(this.file instanceof File))throw new TypeError("file must be a File object");if(this.headers&&typeof this.headers!="function"&&typeof this.headers!="object")throw new TypeError("headers must be null, an object, or a function that returns an object or a promise");if(!G(this.chunkSize,{maxChunkSize:this.maxChunkSize,minChunkSize:this.minChunkSize}))throw V(this.chunkSize,{maxChunkSize:this.maxChunkSize,minChunkSize:this.minChunkSize});if(this.maxChunkSize&&(typeof this.maxChunkSize!="number"||this.maxChunkSize<256||this.maxChunkSize%256!==0||this.maxChunkSize<this.chunkSize||this.maxChunkSize<this.minChunkSize))throw new TypeError(`maxChunkSize must be a positive number in multiples of 256, and larger than or equal to both ${this.minChunkSize} and ${this.chunkSize}`);if(this.minChunkSize&&(typeof this.minChunkSize!="number"||this.minChunkSize<256||this.minChunkSize%256!==0||this.minChunkSize>this.chunkSize||this.minChunkSize>this.maxChunkSize))throw new TypeError(`minChunkSize must be a positive number in multiples of 256, and smaller than ${this.chunkSize} and ${this.maxChunkSize}`);if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`file size exceeds maximum (${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("retries must be a positive number");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("delayBeforeAttempt must be a positive number")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(e=>(this.endpointValue=e,this.endpointValue))}xhrPromise(e){let t=r=>{r.upload.onprogress=n=>{var s;let i=this.totalChunks-this.chunkCount,l=(this.file.size-this.nextChunkRangeStart)/this.file.size/i,c=n.loaded/((s=n.total)!=null?s:this.chunkByteSize)*l;this.dispatch("progress",Math.min((this.successfulPercentage+c)*100,100))}};return new Promise((r,n)=>{this.currentXhr=(0,Lr.default)({...e,beforeSend:t},(s,i)=>(this.currentXhr=void 0,s?n(s):r(i)))})}async sendChunk(e){let t=this.nextChunkRangeStart,r=t+e.size-1,s={...await(typeof this.headers=="function"?this.headers():this.headers),"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${r}/${this.file.size}`};return this.dispatch("attempt",{chunkNumber:this.chunkCount,totalChunks:this.totalChunks,chunkSize:this.chunkSize}),this.xhrPromise({headers:s,url:this.endpointValue,method:this.method,body:e})}async sendChunkWithRetries(e){let t=async(l,u)=>{var c;let g=(new Date().getTime()-this.lastChunkStart.getTime())/1e3;if(this.dispatch("chunkSuccess",{chunk:this.chunkCount,chunkSize:this.chunkSize,attempts:this.attemptCount,timeInterval:g,response:l}),this.attemptCount=0,this.chunkCount=((c=this.chunkCount)!=null?c:0)+1,this.nextChunkRangeStart=this.nextChunkRangeStart+this.chunkByteSize,this.dynamicChunkSize){let S=this.chunkSize;g<10?S=Math.min(this.chunkSize*2,this.maxChunkSize):g>30&&(S=Math.max(this.chunkSize/2,this.minChunkSize)),this.chunkSize=Math.ceil(S/256)*256;let ke=(this.file.size-this.nextChunkRangeStart)/this.chunkByteSize;this.totalChunks=Math.ceil(this.chunkCount+ke)}return!0},r=async(l,u)=>(this.dispatch("progress",Math.min(this.successfulPercentage*100,100)),this.dispatch("error",{message:`Server responded with ${l.statusCode}. Stopping upload.`,chunk:this.chunkCount,attempts:this.attemptCount,response:l}),!1),n=async(l,u)=>(this.dispatch("attemptFailure",{message:`An error occured uploading chunk ${this.chunkCount}. ${this.attempts-this.attemptCount} retries left.`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount,response:l}),new Promise(c=>{setTimeout(async()=>{if(this._paused||this.offline){this.pendingChunk=e,c(!1);return}let h=await this.sendChunkWithRetries(e);c(h)},this.delayBeforeAttempt*1e3)})),s;try{this.attemptCount=this.attemptCount+1,this.lastChunkStart=new Date,s=await this.sendChunk(e)}catch(l){typeof(l==null?void 0:l.statusCode)=="number"&&(s=l)}let i={retryCodes:this.retryCodes,attemptCount:this.attemptCount,attempts:this.attempts,currentChunkEndByte:this.nextChunkRangeStart+e.size-1};return Br(s,i)?n(s,e):mt(s,i)?t(s,e):Fr(s,i)?r(s,e):n(s,e)}async sendChunks(){if(this.pendingChunk&&!(this._paused||this.offline)){let e=this.pendingChunk;this.pendingChunk=void 0;let t=await this.sendChunkWithRetries(e);this.success&&t&&this.dispatch("success")}for(;!(this.success||this._paused||this.offline);){let{value:e,done:t}=await this.chunkedIterator.next(),r=!e&&t;if(e&&(r=await this.sendChunkWithRetries(e)),this.chunkedIterable.error){r=!1,this.dispatch("error",{message:`Unable to read file of size ${this.file.size} bytes. Try loading from another browser.`});return}if(this.success=!!t,this.success&&r&&this.dispatch("success"),!r)return}}};var Hr=Object.defineProperty,Nr=(e,t)=>{for(var r in t)Hr(e,r,{get:t[r],enumerable:!0})},bt=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},a=(e,t,r)=>(bt(e,t,"read from private field"),r?r.call(e):t.get(e)),E=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},x=(e,t,r,n)=>(bt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),jr={};Nr(jr,{ProgressTypes:()=>$});var $={BAR:"bar",RADIAL:"radial",PERCENTAGE:"percentage"},Ee=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class e extends Ee{}globalThis.DocumentFragment=e}var De=class extends Ee{},Wr=class extends Ee{},$r={get(e){},define(e,t,r){},upgrade(e){},whenDefined(e){return Promise.resolve(De)}},be,Xr=class{constructor(e,t={}){E(this,be,void 0),x(this,be,t==null?void 0:t.detail)}get detail(){return a(this,be)}initCustomEvent(){}};be=new WeakMap;function qr(e,t){return new De}var yt={document:{createElement:qr},DocumentFragment,customElements:$r,CustomEvent:Xr,EventTarget:Ee,HTMLElement:De,HTMLVideoElement:Wr},Et=typeof window=="undefined"||typeof globalThis.customElements=="undefined",p=Et?yt:globalThis,M=Et?yt.document:globalThis.document,xt=(e,t)=>e?e.closest(t)||xt(e.getRootNode().host,t):null,N=e=>{let t=e.getAttribute("mux-uploader");return t?document.getElementById(t):xt(e,"mux-uploader")},kt=M.createElement("template");kt.innerHTML=`
"use strict";"use client";var Yt=Object.create;var he=Object.defineProperty;var Zt=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var Qt=Object.getPrototypeOf,er=Object.prototype.hasOwnProperty;var tr=(e,t)=>{for(var r in t)he(e,r,{get:t[r],enumerable:!0})},je=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Jt(t))!er.call(e,s)&&s!==r&&he(e,s,{get:()=>t[s],enumerable:!(n=Zt(t,s))||n.enumerable});return e};var F=(e,t,r)=>(r=e!=null?Yt(Qt(e)):{},je(t||!e||!e.__esModule?he(r,"default",{value:e,enumerable:!0}):r,e)),rr=e=>je(he({},"__esModule",{value:!0}),e);var An={};tr(An,{MuxUploaderDrop:()=>zt,MuxUploaderFileSelect:()=>It,MuxUploaderPause:()=>jt,MuxUploaderProgress:()=>Ft,MuxUploaderRetry:()=>Ht,MuxUploaderStatus:()=>$t,ProgressTypes:()=>Rn,default:()=>Pn});module.exports=rr(An);var j=F(require("react"));var nr=Object.create,Qe=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,et=Object.getOwnPropertyNames,ir=Object.getPrototypeOf,ar=Object.prototype.hasOwnProperty,K=(e,t)=>function(){return t||(0,e[et(e)[0]])((t={exports:{}}).exports,t),t.exports},or=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of et(t))!ar.call(e,s)&&s!==r&&Qe(e,s,{get:()=>t[s],enumerable:!(n=sr(t,s))||n.enumerable});return e},lr=(e,t,r)=>(r=e!=null?nr(ir(e)):{},or(t||!e||!e.__esModule?Qe(r,"default",{value:e,enumerable:!0}):r,e)),ur=K({"node_modules/global/window.js"(e,t){var r;typeof window!="undefined"?r=window:typeof global!="undefined"?r=global:typeof self!="undefined"?r=self:r={},t.exports=r}}),dr=K({"node_modules/is-function/index.js"(e,t){t.exports=n;var r=Object.prototype.toString;function n(s){if(!s)return!1;var i=r.call(s);return i==="[object Function]"||typeof s=="function"&&i!=="[object RegExp]"||typeof window!="undefined"&&(s===window.setTimeout||s===window.alert||s===window.confirm||s===window.prompt)}}}),pr=K({"node_modules/parse-headers/parse-headers.js"(e,t){var r=function(s){return s.replace(/^\s+|\s+$/g,"")},n=function(s){return Object.prototype.toString.call(s)==="[object Array]"};t.exports=function(s){if(!s)return{};for(var i={},l=r(s).split(`
`),u=0;u<l.length;u++){var c=l[u],h=c.indexOf(":"),g=r(c.slice(0,h)).toLowerCase(),S=r(c.slice(h+1));typeof i[g]=="undefined"?i[g]=S:n(i[g])?i[g].push(S):i[g]=[i[g],S]}return i}}}),cr=K({"node_modules/xtend/immutable.js"(e,t){t.exports=n;var r=Object.prototype.hasOwnProperty;function n(){for(var s={},i=0;i<arguments.length;i++){var l=arguments[i];for(var u in l)r.call(l,u)&&(s[u]=l[u])}return s}}}),hr=K({"node_modules/xhr/index.js"(e,t){"use strict";var r=ur(),n=dr(),s=pr(),i=cr();t.exports=h,t.exports.default=h,h.XMLHttpRequest=r.XMLHttpRequest||ke,h.XDomainRequest="withCredentials"in new h.XMLHttpRequest?h.XMLHttpRequest:r.XDomainRequest,l(["get","put","post","patch","head","delete"],function(o){h[o==="delete"?"del":o]=function(v,b,_){return b=c(v,b,_),b.method=o.toUpperCase(),g(b)}});function l(o,v){for(var b=0;b<o.length;b++)v(o[b])}function u(o){for(var v in o)if(o.hasOwnProperty(v))return!1;return!0}function c(o,v,b){var _=o;return n(v)?(b=v,typeof o=="string"&&(_={uri:o})):_=i(v,{uri:o}),_.callback=b,_}function h(o,v,b){return v=c(o,v,b),g(v)}function g(o){if(typeof o.callback=="undefined")throw new Error("callback argument missing");var v=!1,b=function(D,ce,Kt){v||(v=!0,o.callback(D,ce,Kt))};function _(){d.readyState===4&&setTimeout(Be,0)}function Vt(){var f=void 0;if(d.response?f=d.response:f=d.responseText||S(d),He)try{f=JSON.parse(f)}catch{}return f}function Ce(f){return clearTimeout(Me),f instanceof Error||(f=new Error(""+(f||"Unknown XMLHttpRequest Error"))),f.statusCode=0,b(f,Ne)}function Be(){if(!pe){var f;clearTimeout(Me),o.useXDR&&d.status===void 0?f=200:f=d.status===1223?204:d.status;var D=Ne,ce=null;return f!==0?(D={body:Vt(),statusCode:f,method:q,headers:{},url:Se,rawRequest:d},d.getAllResponseHeaders&&(D.headers=s(d.getAllResponseHeaders()))):ce=new Error("Internal XMLHttpRequest Error"),b(ce,D,D.body)}}var d=o.xhr||null;d||(o.cors||o.useXDR?d=new h.XDomainRequest:d=new h.XMLHttpRequest);var de,pe,Se=d.url=o.uri||o.url,q=d.method=o.method||"GET",Re=o.body||o.data,T=d.headers=o.headers||{},we=!!o.sync,He=!1,Me,Ne={body:void 0,headers:{},statusCode:0,method:q,url:Se,rawRequest:d};if("json"in o&&o.json!==!1&&(He=!0,T.accept||T.Accept||(T.Accept="application/json"),q!=="GET"&&q!=="HEAD"&&(T["content-type"]||T["Content-Type"]||(T["Content-Type"]="application/json"),Re=JSON.stringify(o.json===!0?Re:o.json))),d.onreadystatechange=_,d.onload=Be,d.onerror=Ce,d.onprogress=function(){},d.onabort=function(){pe=!0},d.ontimeout=Ce,d.open(q,Se,!we,o.username,o.password),we||(d.withCredentials=!!o.withCredentials),!we&&o.timeout>0&&(Me=setTimeout(function(){if(!pe){pe=!0,d.abort("timeout");var f=new Error("XMLHttpRequest timeout");f.code="ETIMEDOUT",Ce(f)}},o.timeout)),d.setRequestHeader)for(de in T)T.hasOwnProperty(de)&&d.setRequestHeader(de,T[de]);else if(o.headers&&!u(o.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in o&&(d.responseType=o.responseType),"beforeSend"in o&&typeof o.beforeSend=="function"&&o.beforeSend(d),d.send(Re||null),d}function S(o){try{if(o.responseType==="document")return o.responseXML;var v=o.responseXML&&o.responseXML.documentElement.nodeName==="parsererror";if(o.responseType===""&&!v)return o.responseXML}catch{}return null}function ke(){}}});function _e(e,t,...r){if(!e)throw new TypeError(tt(t,r))}function tt(e,t){let r=0;return e.replace(/%[os]/gu,()=>rt(t[r++]))}function rt(e){return typeof e!="object"||e===null?String(e):Object.prototype.toString.call(e)}var We;function fr(e){try{let t=e instanceof Error?e:new Error(rt(e));if(We){We(t);return}if(typeof dispatchEvent=="function"&&typeof ErrorEvent=="function")dispatchEvent(new ErrorEvent("error",{error:t,message:t.message}));else if(typeof process!="undefined"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)}catch{}}var R=typeof window!="undefined"?window:typeof self!="undefined"?self:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:void 0,$e,P=class{constructor(e,t){this.code=e,this.message=t}warn(...e){var t;try{if($e){$e({...this,args:e});return}let r=((t=new Error().stack)!==null&&t!==void 0?t:"").replace(/^(?:.+?\n){2}/gu,`
`);console.warn(this.message,...e,r)}catch{}}},mr=new P("W01","Unable to initialize event under dispatching."),gr=new P("W02","Assigning any falsy value to 'cancelBubble' property has no effect."),vr=new P("W03","Assigning any truthy value to 'returnValue' property has no effect."),br=new P("W04","Unable to preventDefault on non-cancelable events."),yr=new P("W05","Unable to preventDefault inside passive event listener invocation."),Er=new P("W06","An event listener wasn't added because it has been added already: %o, %o"),Te=new P("W07","The %o option value was abandoned because the event listener wasn't added as duplicated."),Xe=new P("W08","The 'callback' argument must be a function or an object that has 'handleEvent' method: %o"),Ln=new P("W09","Event attribute handler must be a function: %o"),A=class{static get NONE(){return qe}static get CAPTURING_PHASE(){return Ge}static get AT_TARGET(){return Ve}static get BUBBLING_PHASE(){return Ke}constructor(e,t){Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let r=t!=null?t:{};Le.set(this,{type:String(e),bubbles:!!r.bubbles,cancelable:!!r.cancelable,composed:!!r.composed,target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1,inPassiveListenerFlag:!1,dispatchFlag:!1,timeStamp:Date.now()})}get type(){return m(this).type}get target(){return m(this).target}get srcElement(){return m(this).target}get currentTarget(){return m(this).currentTarget}composedPath(){let e=m(this).currentTarget;return e?[e]:[]}get NONE(){return qe}get CAPTURING_PHASE(){return Ge}get AT_TARGET(){return Ve}get BUBBLING_PHASE(){return Ke}get eventPhase(){return m(this).dispatchFlag?2:0}stopPropagation(){m(this).stopPropagationFlag=!0}get cancelBubble(){return m(this).stopPropagationFlag}set cancelBubble(e){e?m(this).stopPropagationFlag=!0:gr.warn()}stopImmediatePropagation(){let e=m(this);e.stopPropagationFlag=e.stopImmediatePropagationFlag=!0}get bubbles(){return m(this).bubbles}get cancelable(){return m(this).cancelable}get returnValue(){return!m(this).canceledFlag}set returnValue(e){e?vr.warn():Ye(m(this))}preventDefault(){Ye(m(this))}get defaultPrevented(){return m(this).canceledFlag}get composed(){return m(this).composed}get isTrusted(){return!1}get timeStamp(){return m(this).timeStamp}initEvent(e,t=!1,r=!1){let n=m(this);if(n.dispatchFlag){mr.warn();return}Le.set(this,{...n,type:String(e),bubbles:!!t,cancelable:!!r,target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1})}},qe=0,Ge=1,Ve=2,Ke=3,Le=new WeakMap;function m(e,t="this"){let r=Le.get(e);return _e(r!=null,"'%s' must be an object that Event constructor created, but got another one: %o",t,e),r}function Ye(e){if(e.inPassiveListenerFlag){yr.warn();return}if(!e.cancelable){br.warn();return}e.canceledFlag=!0}Object.defineProperty(A,"NONE",{enumerable:!0});Object.defineProperty(A,"CAPTURING_PHASE",{enumerable:!0});Object.defineProperty(A,"AT_TARGET",{enumerable:!0});Object.defineProperty(A,"BUBBLING_PHASE",{enumerable:!0});var Pe=Object.getOwnPropertyNames(A.prototype);for(let e=0;e<Pe.length;++e)Pe[e]!=="constructor"&&Object.defineProperty(A.prototype,Pe[e],{enumerable:!0});typeof R!="undefined"&&typeof R.Event!="undefined"&&Object.setPrototypeOf(A.prototype,R.Event.prototype);function xr(e){return R.DOMException?new R.DOMException(e,"InvalidStateError"):(W==null&&(W=class nt extends Error{constructor(r){super(r),Error.captureStackTrace&&Error.captureStackTrace(this,nt)}get code(){return 11}get name(){return"InvalidStateError"}},Object.defineProperties(W.prototype,{code:{enumerable:!0},name:{enumerable:!0}}),Je(W),Je(W.prototype)),new W(e))}var W,Ze={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};function Je(e){let t=Object.keys(Ze);for(let r=0;r<t.length;++r){let n=t[r],s=Ze[n];Object.defineProperty(e,n,{get(){return s},configurable:!0,enumerable:!0})}}var me=class extends A{static wrap(e){return new(it(e))(e)}constructor(e){super(e.type,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed}),e.cancelBubble&&super.stopPropagation(),e.defaultPrevented&&super.preventDefault(),st.set(this,{original:e});let t=Object.keys(e);for(let r=0;r<t.length;++r){let n=t[r];n in this||Object.defineProperty(this,n,at(e,n))}}stopPropagation(){super.stopPropagation();let{original:e}=z(this);"stopPropagation"in e&&e.stopPropagation()}get cancelBubble(){return super.cancelBubble}set cancelBubble(e){super.cancelBubble=e;let{original:t}=z(this);"cancelBubble"in t&&(t.cancelBubble=e)}stopImmediatePropagation(){super.stopImmediatePropagation();let{original:e}=z(this);"stopImmediatePropagation"in e&&e.stopImmediatePropagation()}get returnValue(){return super.returnValue}set returnValue(e){super.returnValue=e;let{original:t}=z(this);"returnValue"in t&&(t.returnValue=e)}preventDefault(){super.preventDefault();let{original:e}=z(this);"preventDefault"in e&&e.preventDefault()}get timeStamp(){let{original:e}=z(this);return"timeStamp"in e?e.timeStamp:super.timeStamp}},st=new WeakMap;function z(e){let t=st.get(e);return _e(t!=null,"'this' is expected an Event object, but got",e),t}var fe=new WeakMap;fe.set(Object.prototype,me);typeof R!="undefined"&&typeof R.Event!="undefined"&&fe.set(R.Event.prototype,me);function it(e){let t=Object.getPrototypeOf(e);if(t==null)return me;let r=fe.get(t);return r==null&&(r=kr(it(t),t),fe.set(t,r)),r}function kr(e,t){class r extends e{}let n=Object.keys(t);for(let s=0;s<n.length;++s)Object.defineProperty(r.prototype,n[s],at(t,n[s]));return r}function at(e,t){let r=Object.getOwnPropertyDescriptor(e,t);return{get(){let n=z(this).original,s=n[t];return typeof s=="function"?s.bind(n):s},set(n){let s=z(this).original;s[t]=n},configurable:r.configurable,enumerable:r.enumerable}}function Cr(e,t,r,n,s,i){return{callback:e,flags:(t?1:0)|(r?2:0)|(n?4:0),signal:s,signalListener:i}}function Sr(e){e.flags|=8}function ot(e){return(e.flags&1)===1}function lt(e){return(e.flags&2)===2}function ut(e){return(e.flags&4)===4}function Rr(e){return(e.flags&8)===8}function wr({callback:e},t,r){try{typeof e=="function"?e.call(t,r):typeof e.handleEvent=="function"&&e.handleEvent(r)}catch(n){fr(n)}}function dt({listeners:e},t,r){for(let n=0;n<e.length;++n)if(e[n].callback===t&&ot(e[n])===r)return n;return-1}function Mr(e,t,r,n,s,i){let l;i&&(l=pt.bind(null,e,t,r),i.addEventListener("abort",l));let u=Cr(t,r,n,s,i,l);return e.cow?(e.cow=!1,e.listeners=[...e.listeners,u]):e.listeners.push(u),u}function pt(e,t,r){let n=dt(e,t,r);return n!==-1?ct(e,n):!1}function ct(e,t,r=!1){let n=e.listeners[t];return Sr(n),n.signal&&n.signal.removeEventListener("abort",n.signalListener),e.cow&&!r?(e.cow=!1,e.listeners=e.listeners.filter((s,i)=>i!==t),!1):(e.listeners.splice(t,1),!0)}function Tr(){return Object.create(null)}function Pr(e,t){var r;return(r=e[t])!==null&&r!==void 0?r:e[t]={attrCallback:void 0,attrListener:void 0,cow:!1,listeners:[]}}var ge=class{constructor(){ht.set(this,Tr())}addEventListener(e,t,r){let n=Ae(this),{callback:s,capture:i,once:l,passive:u,signal:c,type:h}=Ar(e,t,r);if(s==null||c!=null&&c.aborted)return;let g=Pr(n,h),S=dt(g,s,i);if(S!==-1){Lr(g.listeners[S],u,l,c);return}Mr(g,s,i,u,l,c)}removeEventListener(e,t,r){let n=Ae(this),{callback:s,capture:i,type:l}=Ur(e,t,r),u=n[l];s!=null&&u&&pt(u,s,i)}dispatchEvent(e){let t=Ae(this)[String(e.type)];if(t==null)return!0;let r=e instanceof A?e:me.wrap(e),n=m(r,"event");if(n.dispatchFlag)throw xr("This event has been in dispatching.");if(n.dispatchFlag=!0,n.target=n.currentTarget=this,!n.stopPropagationFlag){let{cow:s,listeners:i}=t;t.cow=!0;for(let l=0;l<i.length;++l){let u=i[l];if(!Rr(u)&&(ut(u)&&ct(t,l,!s)&&(l-=1),n.inPassiveListenerFlag=lt(u),wr(u,this,r),n.inPassiveListenerFlag=!1,n.stopImmediatePropagationFlag))break}s||(t.cow=!1)}return n.target=null,n.currentTarget=null,n.stopImmediatePropagationFlag=!1,n.stopPropagationFlag=!1,n.dispatchFlag=!1,!n.canceledFlag}},ht=new WeakMap;function Ae(e,t="this"){let r=ht.get(e);return _e(r!=null,"'%s' must be an object that EventTarget constructor created, but got another one: %o",t,e),r}function Ar(e,t,r){var n;return ft(t),typeof r=="object"&&r!==null?{type:String(e),callback:t!=null?t:void 0,capture:!!r.capture,passive:!!r.passive,once:!!r.once,signal:(n=r.signal)!==null&&n!==void 0?n:void 0}:{type:String(e),callback:t!=null?t:void 0,capture:!!r,passive:!1,once:!1,signal:void 0}}function Ur(e,t,r){return ft(t),typeof r=="object"&&r!==null?{type:String(e),callback:t!=null?t:void 0,capture:!!r.capture}:{type:String(e),callback:t!=null?t:void 0,capture:!!r}}function ft(e){if(!(typeof e=="function"||typeof e=="object"&&e!==null&&typeof e.handleEvent=="function")){if(e==null||typeof e=="object"){Xe.warn(e);return}throw new TypeError(tt(Xe.message,[e]))}}function Lr(e,t,r,n){Er.warn(ot(e)?"capture":"bubble",e.callback),lt(e)!==t&&Te.warn("passive"),ut(e)!==r&&Te.warn("once"),e.signal!==n&&Te.warn("signal")}var Ue=Object.getOwnPropertyNames(ge.prototype);for(let e=0;e<Ue.length;++e)Ue[e]!=="constructor"&&Object.defineProperty(ge.prototype,Ue[e],{enumerable:!0});typeof R!="undefined"&&typeof R.EventTarget!="undefined"&&Object.setPrototypeOf(ge.prototype,R.EventTarget.prototype);var _r=lr(hr()),ze=30720,Y=512e3,Z=256,G=(e,{minChunkSize:t=Z,maxChunkSize:r=Y}={})=>e==null||typeof e=="number"&&e>=256&&e%256===0&&e>=t&&e<=r,V=(e,{minChunkSize:t=Z,maxChunkSize:r=Y}={})=>new TypeError(`chunkSize ${e} must be a positive number in multiples of 256, between ${t} and ${r}`),zr=class{constructor(e,t={}){this.readableStream=e;var r,n,s;if(!G(t.defaultChunkSize,t))throw V(t.defaultChunkSize,t);this.defaultChunkSize=(r=t.defaultChunkSize)!=null?r:ze,this.minChunkSize=(n=t.minChunkSize)!=null?n:Z,this.maxChunkSize=(s=t.maxChunkSize)!=null?s:Y}get chunkSize(){var e;return(e=this._chunkSize)!=null?e:this.defaultChunkSize}set chunkSize(e){if(!G(e,this))throw V(e,this);this._chunkSize=e}get chunkByteSize(){return this.chunkSize*1024}get error(){return this._error}async*[Symbol.asyncIterator](){let e,t=this.readableStream.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r){if(e){let i=e;e=void 0,yield i}break}let s=n instanceof Uint8Array?new Blob([n],{type:"application/octet-stream"}):n;for(e=e?new Blob([e,s]):s;e;)if(e.size===this.chunkByteSize){let i=e;e=void 0,yield i;break}else{if(e.size<this.chunkByteSize)break;{let i=e.slice(0,this.chunkByteSize);e=e.slice(this.chunkByteSize),yield i}}}}catch(r){this._error=r}finally{if(e){let r=e;e=void 0,yield r}t.releaseLock();return}}},Or=class{constructor(e,t={}){this.file=e;var r,n,s;if(!G(t.defaultChunkSize,t))throw V(t.defaultChunkSize,t);this.defaultChunkSize=(r=t.defaultChunkSize)!=null?r:ze,this.minChunkSize=(n=t.minChunkSize)!=null?n:Z,this.maxChunkSize=(s=t.maxChunkSize)!=null?s:Y}get chunkSize(){var e;return(e=this._chunkSize)!=null?e:this.defaultChunkSize}set chunkSize(e){if(!G(e,this))throw V(e,this);this._chunkSize=e}get chunkByteSize(){return this.chunkSize*1024}get error(){return this._error}async*[Symbol.asyncIterator](){let e=new FileReader,t=0,r=()=>new Promise(n=>{if(t>=this.file.size){n(void 0);return}let s=Math.min(this.chunkByteSize,this.file.size-t);e.onload=()=>{e.result!==null?n(new Blob([e.result],{type:"application/octet-stream"})):n(void 0)},e.readAsArrayBuffer(this.file.slice(t,t+s))});try{for(;;){let n=await r();if(n)t+=n.size,yield n;else break}}catch(n){this._error=n}}},Ir=[200,201,202,204,308],mt=[408,502,503,504],Dr=[308],gt=(e,t)=>!!e&&Ir.includes(e.statusCode),Fr=(e,{retryCodes:t=mt})=>!e||t.includes(e.statusCode),Br=(e,t)=>t.attemptCount>=t.attempts||!(gt(e)||Fr(e,t)),Hr=(e,t)=>{var r;if(!e||!Dr.includes(e.statusCode)||!((r=e.headers)!=null&&r.range))return!1;let n=e.headers.range.match(/bytes=(\d+)-(\d+)/);return n?parseInt(n[2],10)!==t.currentChunkEndByte:!1},Oe=class{static createUpload(e){return new Oe(e)}constructor(e){if(this.eventTarget=new ge,this.endpoint=e.endpoint,this.file=e.file,this.headers=e.headers||{},this.method=e.method||"PUT",this.attempts=e.attempts||5,this.delayBeforeAttempt=e.delayBeforeAttempt||1,this.retryCodes=e.retryCodes||mt,this.dynamicChunkSize=e.dynamicChunkSize||!1,this.maxFileBytes=(e.maxFileSize||0)*1024,this.chunkCount=0,this.attemptCount=0,this._offline=typeof window!="undefined"&&!window.navigator.onLine,this._paused=!1,this.success=!1,this.nextChunkRangeStart=0,e.useLargeFileWorkaround){let t=r=>{this.chunkedIterable.error&&(console.warn(`Unable to read file of size ${this.file.size} bytes via a ReadableStream. Falling back to in-memory FileReader!`),r.stopImmediatePropagation(),this.chunkedIterable=new Or(this.file,{...e,defaultChunkSize:e.chunkSize}),this.chunkedIterator=this.chunkedIterable[Symbol.asyncIterator](),this.getEndpoint().then(()=>{this.sendChunks()}),this.off("error",t))};this.on("error",t)}this.chunkedIterable=new zr(this.file.stream(),{...e,defaultChunkSize:e.chunkSize}),this.chunkedIterator=this.chunkedIterable[Symbol.asyncIterator](),this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window!="undefined"&&(window.addEventListener("online",()=>{this.offline&&(this._offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline||(this._offline=!0,this.dispatch("offline"))}))}get maxChunkSize(){var e,t;return(t=(e=this.chunkedIterable)==null?void 0:e.maxChunkSize)!=null?t:Y}get minChunkSize(){var e,t;return(t=(e=this.chunkedIterable)==null?void 0:e.minChunkSize)!=null?t:Z}get chunkSize(){var e,t;return(t=(e=this.chunkedIterable)==null?void 0:e.chunkSize)!=null?t:ze}set chunkSize(e){this.chunkedIterable.chunkSize=e}get chunkByteSize(){return this.chunkedIterable.chunkByteSize}get totalChunkSize(){return Math.ceil(this.file.size/this.chunkByteSize)}on(e,t){this.eventTarget.addEventListener(e,t)}once(e,t){this.eventTarget.addEventListener(e,t,{once:!0})}off(e,t){this.eventTarget.removeEventListener(e,t)}get offline(){return this._offline}get paused(){return this._paused}abort(){var e;this.pause(),(e=this.currentXhr)==null||e.abort()}pause(){this._paused=!0}resume(){this._paused&&(this._paused=!1,this.sendChunks())}get successfulPercentage(){return this.nextChunkRangeStart/this.file.size}dispatch(e,t){let r=new CustomEvent(e,{detail:t});this.eventTarget.dispatchEvent(r)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint must be defined as a string or a function that returns a promise");if(!(this.file instanceof File))throw new TypeError("file must be a File object");if(this.headers&&typeof this.headers!="function"&&typeof this.headers!="object")throw new TypeError("headers must be null, an object, or a function that returns an object or a promise");if(!G(this.chunkSize,{maxChunkSize:this.maxChunkSize,minChunkSize:this.minChunkSize}))throw V(this.chunkSize,{maxChunkSize:this.maxChunkSize,minChunkSize:this.minChunkSize});if(this.maxChunkSize&&(typeof this.maxChunkSize!="number"||this.maxChunkSize<256||this.maxChunkSize%256!==0||this.maxChunkSize<this.chunkSize||this.maxChunkSize<this.minChunkSize))throw new TypeError(`maxChunkSize must be a positive number in multiples of 256, and larger than or equal to both ${this.minChunkSize} and ${this.chunkSize}`);if(this.minChunkSize&&(typeof this.minChunkSize!="number"||this.minChunkSize<256||this.minChunkSize%256!==0||this.minChunkSize>this.chunkSize||this.minChunkSize>this.maxChunkSize))throw new TypeError(`minChunkSize must be a positive number in multiples of 256, and smaller than ${this.chunkSize} and ${this.maxChunkSize}`);if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`file size exceeds maximum (${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("retries must be a positive number");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("delayBeforeAttempt must be a positive number")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(e=>(this.endpointValue=e,this.endpointValue))}xhrPromise(e){let t=r=>{r.upload.onprogress=n=>{var s;let i=this.totalChunks-this.chunkCount,l=(this.file.size-this.nextChunkRangeStart)/this.file.size/i,c=n.loaded/((s=n.total)!=null?s:this.chunkByteSize)*l;this.dispatch("progress",Math.min((this.successfulPercentage+c)*100,100))}};return new Promise((r,n)=>{this.currentXhr=(0,_r.default)({...e,beforeSend:t},(s,i)=>(this.currentXhr=void 0,s?n(s):r(i)))})}async sendChunk(e){let t=this.nextChunkRangeStart,r=t+e.size-1,s={...await(typeof this.headers=="function"?this.headers():this.headers),"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${r}/${this.file.size}`};return this.dispatch("attempt",{chunkNumber:this.chunkCount,totalChunks:this.totalChunks,chunkSize:this.chunkSize}),this.xhrPromise({headers:s,url:this.endpointValue,method:this.method,body:e})}async sendChunkWithRetries(e){let t=async(l,u)=>{var c;let g=(new Date().getTime()-this.lastChunkStart.getTime())/1e3;if(this.dispatch("chunkSuccess",{chunk:this.chunkCount,chunkSize:this.chunkSize,attempts:this.attemptCount,timeInterval:g,response:l}),this.attemptCount=0,this.chunkCount=((c=this.chunkCount)!=null?c:0)+1,this.nextChunkRangeStart=this.nextChunkRangeStart+this.chunkByteSize,this.dynamicChunkSize){let S=this.chunkSize;g<10?S=Math.min(this.chunkSize*2,this.maxChunkSize):g>30&&(S=Math.max(this.chunkSize/2,this.minChunkSize)),this.chunkSize=Math.ceil(S/256)*256;let ke=(this.file.size-this.nextChunkRangeStart)/this.chunkByteSize;this.totalChunks=Math.ceil(this.chunkCount+ke)}return!0},r=async(l,u)=>(this.dispatch("progress",Math.min(this.successfulPercentage*100,100)),this.dispatch("error",{message:`Server responded with ${l.statusCode}. Stopping upload.`,chunk:this.chunkCount,attempts:this.attemptCount,response:l}),!1),n=async(l,u)=>(this.dispatch("attemptFailure",{message:`An error occured uploading chunk ${this.chunkCount}. ${this.attempts-this.attemptCount} retries left.`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount,response:l}),new Promise(c=>{setTimeout(async()=>{if(this._paused||this.offline){this.pendingChunk=e,c(!1);return}let h=await this.sendChunkWithRetries(e);c(h)},this.delayBeforeAttempt*1e3)})),s;try{this.attemptCount=this.attemptCount+1,this.lastChunkStart=new Date,s=await this.sendChunk(e)}catch(l){typeof(l==null?void 0:l.statusCode)=="number"&&(s=l)}let i={retryCodes:this.retryCodes,attemptCount:this.attemptCount,attempts:this.attempts,currentChunkEndByte:this.nextChunkRangeStart+e.size-1};return Hr(s,i)?n(s,e):gt(s,i)?t(s,e):Br(s,i)?r(s,e):n(s,e)}async sendChunks(){if(this.pendingChunk&&!(this._paused||this.offline)){let e=this.pendingChunk;this.pendingChunk=void 0;let t=await this.sendChunkWithRetries(e);this.success&&t&&this.dispatch("success")}for(;!(this.success||this._paused||this.offline);){let{value:e,done:t}=await this.chunkedIterator.next(),r=!e&&t;if(e&&(r=await this.sendChunkWithRetries(e)),this.chunkedIterable.error){r=!1,this.dispatch("error",{message:`Unable to read file of size ${this.file.size} bytes. Try loading from another browser.`});return}if(this.success=!!t,this.success&&r&&this.dispatch("success"),!r)return}}};var Nr=Object.defineProperty,jr=(e,t)=>{for(var r in t)Nr(e,r,{get:t[r],enumerable:!0})},yt=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},a=(e,t,r)=>(yt(e,t,"read from private field"),r?r.call(e):t.get(e)),E=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},x=(e,t,r,n)=>(yt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),De={};jr(De,{ProgressTypes:()=>$});var $={BAR:"bar",RADIAL:"radial",PERCENTAGE:"percentage"},Ee=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class e extends Ee{}globalThis.DocumentFragment=e}var Fe=class extends Ee{},Wr=class extends Ee{},$r={get(e){},define(e,t,r){},upgrade(e){},whenDefined(e){return Promise.resolve(Fe)}},be,Xr=class{constructor(e,t={}){E(this,be,void 0),x(this,be,t==null?void 0:t.detail)}get detail(){return a(this,be)}initCustomEvent(){}};be=new WeakMap;function qr(e,t){return new Fe}var Et={document:{createElement:qr},DocumentFragment,customElements:$r,CustomEvent:Xr,EventTarget:Ee,HTMLElement:Fe,HTMLVideoElement:Wr},xt=typeof window=="undefined"||typeof globalThis.customElements=="undefined",p=xt?Et:globalThis,M=xt?Et.document:globalThis.document,kt=(e,t)=>e?e.closest(t)||kt(e.getRootNode().host,t):null,N=e=>{let t=e.getAttribute("mux-uploader");return t?document.getElementById(t):kt(e,"mux-uploader")},Ct=M.createElement("template");Ct.innerHTML=`
<style>

@@ -63,3 +63,3 @@ :host {

</div>
`;var Ie={MUX_UPLOADER:"mux-uploader",OVERLAY_TEXT:"overlay-text"},ye,U,J,gt=class extends p.HTMLElement{constructor(){super(),E(this,ye,void 0),E(this,U,void 0),E(this,J,void 0);let e=this.attachShadow({mode:"open"});e.appendChild(kt.content.cloneNode(!0)),x(this,ye,e.getElementById("overlay-label"))}connectedCallback(){if(x(this,U,N(this)),x(this,J,new AbortController),a(this,U)){let e={signal:a(this,J).signal};a(this,U).addEventListener("file-ready",()=>this.toggleAttribute("file-ready",!0),e),a(this,U).addEventListener("uploadstart",()=>this.toggleAttribute("upload-in-progress",!0),e),a(this,U).addEventListener("success",()=>{this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!0)},e),a(this,U).addEventListener("reset",()=>{this.toggleAttribute("file-ready",!1),this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!1)},e),this.setupDragEvents(e)}}disconnectedCallback(){var e;(e=a(this,J))==null||e.abort()}attributeChangedCallback(e,t,r){e===Ie.OVERLAY_TEXT&&t!==r?a(this,ye).innerHTML=r!=null?r:"":e==="active"&&this.hasAttribute("overlay")&&r!=null&&(this._currentDragTarget=this)}static get observedAttributes(){return[Ie.OVERLAY_TEXT,Ie.MUX_UPLOADER,"active"]}setupDragEvents(e){this.addEventListener("dragenter",t=>{this._currentDragTarget=t.target,t.preventDefault(),t.stopPropagation(),this.toggleAttribute("active",!0)},e),this.addEventListener("dragleave",t=>{this._currentDragTarget===t.target&&(this._currentDragTarget=void 0,this.toggleAttribute("active",!1))},e),this.addEventListener("dragover",t=>{t.preventDefault(),t.stopPropagation()},e),this.addEventListener("drop",t=>{var r;t.preventDefault(),t.stopPropagation();let{dataTransfer:n}=t,{files:s}=n,i=s[0];((r=a(this,U))!=null?r:this).dispatchEvent(new CustomEvent("file-ready",{composed:!0,bubbles:!0,detail:i})),this.removeAttribute("active")},e)}};ye=new WeakMap,U=new WeakMap,J=new WeakMap;p.customElements.get("mux-uploader-drop")||(p.customElements.define("mux-uploader-drop",gt),p.MuxUploaderDropElement=gt);function Gr(e){return`${Math.floor(e)}%`}var Ct=M.createElement("template"),Vr="Media upload progress bar";Ct.innerHTML=`
`;var Ie={MUX_UPLOADER:"mux-uploader",OVERLAY_TEXT:"overlay-text"},ye,U,J,vt=class extends p.HTMLElement{constructor(){super(),E(this,ye,void 0),E(this,U,void 0),E(this,J,void 0);let e=this.attachShadow({mode:"open"});e.appendChild(Ct.content.cloneNode(!0)),x(this,ye,e.getElementById("overlay-label"))}connectedCallback(){if(x(this,U,N(this)),x(this,J,new AbortController),a(this,U)){let e={signal:a(this,J).signal};a(this,U).addEventListener("file-ready",()=>this.toggleAttribute("file-ready",!0),e),a(this,U).addEventListener("uploadstart",()=>this.toggleAttribute("upload-in-progress",!0),e),a(this,U).addEventListener("success",()=>{this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!0)},e),a(this,U).addEventListener("reset",()=>{this.toggleAttribute("file-ready",!1),this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!1)},e),this.setupDragEvents(e)}}disconnectedCallback(){var e;(e=a(this,J))==null||e.abort()}attributeChangedCallback(e,t,r){e===Ie.OVERLAY_TEXT&&t!==r?a(this,ye).innerHTML=r!=null?r:"":e==="active"&&this.hasAttribute("overlay")&&r!=null&&(this._currentDragTarget=this)}static get observedAttributes(){return[Ie.OVERLAY_TEXT,Ie.MUX_UPLOADER,"active"]}setupDragEvents(e){this.addEventListener("dragenter",t=>{this._currentDragTarget=t.target,t.preventDefault(),t.stopPropagation(),this.toggleAttribute("active",!0)},e),this.addEventListener("dragleave",t=>{this._currentDragTarget===t.target&&(this._currentDragTarget=void 0,this.toggleAttribute("active",!1))},e),this.addEventListener("dragover",t=>{t.preventDefault(),t.stopPropagation()},e),this.addEventListener("drop",t=>{var r;t.preventDefault(),t.stopPropagation();let{dataTransfer:n}=t,{files:s}=n,i=s[0];((r=a(this,U))!=null?r:this).dispatchEvent(new CustomEvent("file-ready",{composed:!0,bubbles:!0,detail:i})),this.removeAttribute("active")},e)}};ye=new WeakMap,U=new WeakMap,J=new WeakMap;p.customElements.get("mux-uploader-drop")||(p.customElements.define("mux-uploader-drop",vt),p.MuxUploaderDropElement=vt);function Gr(e){return`${Math.floor(e)}%`}var St=M.createElement("template"),Vr="Media upload progress bar";St.innerHTML=`
<style>

@@ -148,3 +148,3 @@ :host {

</div>
`;var O,Q,Kr=class extends p.HTMLElement{constructor(){var e,t,r,n;super(),E(this,O,void 0),E(this,Q,void 0),this.onUploadStart=()=>{var s;(s=this.progressBar)==null||s.focus(),this.toggleAttribute("upload-in-progress",!0)},this.onProgress=s=>{var i;let l=s.detail;switch((i=this.progressBar)==null||i.setAttribute("aria-valuenow",`${Math.floor(l)}`),this.getAttribute("type")){case $.BAR:{this.progressBar&&(this.progressBar.style.width=`${l}%`);break}case $.RADIAL:{if(this.svgCircle){let u=this.getCircumference()-l/100*this.getCircumference();this.svgCircle.style.strokeDashoffset=u.toString()}break}case $.PERCENTAGE:{this.uploadPercentage&&(this.uploadPercentage.innerHTML=Gr(l));break}}},this.onSuccess=()=>{this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!0)},this.onReset=()=>{this.toggleAttribute("upload-in-progress",!1),this.uploadPercentage&&(this.uploadPercentage.innerHTML=""),this.svgCircle&&(this.svgCircle.style.strokeDashoffset=`${this.getCircumference()}`)},this.attachShadow({mode:"open"}).appendChild(Ct.content.cloneNode(!0)),this.svgCircle=(e=this.shadowRoot)==null?void 0:e.querySelector("circle"),this.progressBar=(t=this.shadowRoot)==null?void 0:t.getElementById("progress-bar"),this.uploadPercentage=(r=this.shadowRoot)==null?void 0:r.getElementById("percentage-type"),(n=this.progressBar)==null||n.setAttribute("aria-description",Vr)}connectedCallback(){if(this.setDefaultType(),x(this,O,N(this)),x(this,Q,new AbortController),a(this,O)){let e={signal:a(this,Q).signal};a(this,O).addEventListener("uploadstart",this.onUploadStart,e),a(this,O).addEventListener("reset",this.onReset),a(this,O).addEventListener("progress",this.onProgress),a(this,O).addEventListener("success",this.onSuccess)}}disconnectedCallback(){var e;(e=a(this,Q))==null||e.abort()}getRadius(){var e;return Number((e=this.svgCircle)==null?void 0:e.getAttribute("r"))}getCircumference(){return this.getRadius()*2*Math.PI}setDefaultType(){let e=this.getAttribute("type");e||this.setAttribute("type",$.BAR),e===$.RADIAL&&this.svgCircle&&(this.svgCircle.style.strokeDasharray=`${this.getCircumference()} ${this.getCircumference()}`,this.svgCircle.style.strokeDashoffset=`${this.getCircumference()}`)}};O=new WeakMap,Q=new WeakMap;p.customElements.get("mux-uploader-progress")||p.customElements.define("mux-uploader-progress",Kr);var St=M.createElement("template");St.innerHTML=`
`;var O,Q,Kr=class extends p.HTMLElement{constructor(){var e,t,r,n;super(),E(this,O,void 0),E(this,Q,void 0),this.onUploadStart=()=>{var s;(s=this.progressBar)==null||s.focus(),this.toggleAttribute("upload-in-progress",!0)},this.onProgress=s=>{var i;let l=s.detail;switch((i=this.progressBar)==null||i.setAttribute("aria-valuenow",`${Math.floor(l)}`),this.getAttribute("type")){case $.BAR:{this.progressBar&&(this.progressBar.style.width=`${l}%`);break}case $.RADIAL:{if(this.svgCircle){let u=this.getCircumference()-l/100*this.getCircumference();this.svgCircle.style.strokeDashoffset=u.toString()}break}case $.PERCENTAGE:{this.uploadPercentage&&(this.uploadPercentage.innerHTML=Gr(l));break}}},this.onSuccess=()=>{this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!0)},this.onReset=()=>{this.toggleAttribute("upload-in-progress",!1),this.uploadPercentage&&(this.uploadPercentage.innerHTML=""),this.svgCircle&&(this.svgCircle.style.strokeDashoffset=`${this.getCircumference()}`)},this.attachShadow({mode:"open"}).appendChild(St.content.cloneNode(!0)),this.svgCircle=(e=this.shadowRoot)==null?void 0:e.querySelector("circle"),this.progressBar=(t=this.shadowRoot)==null?void 0:t.getElementById("progress-bar"),this.uploadPercentage=(r=this.shadowRoot)==null?void 0:r.getElementById("percentage-type"),(n=this.progressBar)==null||n.setAttribute("aria-description",Vr)}connectedCallback(){if(this.setDefaultType(),x(this,O,N(this)),x(this,Q,new AbortController),a(this,O)){let e={signal:a(this,Q).signal};a(this,O).addEventListener("uploadstart",this.onUploadStart,e),a(this,O).addEventListener("reset",this.onReset),a(this,O).addEventListener("progress",this.onProgress),a(this,O).addEventListener("success",this.onSuccess)}}disconnectedCallback(){var e;(e=a(this,Q))==null||e.abort()}getRadius(){var e;return Number((e=this.svgCircle)==null?void 0:e.getAttribute("r"))}getCircumference(){return this.getRadius()*2*Math.PI}setDefaultType(){let e=this.getAttribute("type");e||this.setAttribute("type",$.BAR),e===$.RADIAL&&this.svgCircle&&(this.svgCircle.style.strokeDasharray=`${this.getCircumference()} ${this.getCircumference()}`,this.svgCircle.style.strokeDashoffset=`${this.getCircumference()}`)}};O=new WeakMap,Q=new WeakMap;p.customElements.get("mux-uploader-progress")||p.customElements.define("mux-uploader-progress",Kr);var Rt=M.createElement("template");Rt.innerHTML=`
<style>

@@ -158,3 +158,3 @@

<span id="status-message" role="status" aria-live="polite"></span>
`;var w,ee,Yr=class extends p.HTMLElement{constructor(){var e;super(),E(this,w,void 0),E(this,ee,void 0),this.clearStatusMessage=()=>{this.toggleAttribute("upload-error",!1),this.statusMessage&&(this.statusMessage.innerHTML="")},this.onUploadError=t=>{this.toggleAttribute("upload-error",!0),this.statusMessage&&(this.statusMessage.innerHTML=t.detail.message)},this.onSuccess=()=>{this.toggleAttribute("upload-error",!1);let t="Upload complete!";this.statusMessage&&(this.statusMessage.innerHTML=t),console.info(t)},this.onOffline=()=>{this.toggleAttribute("upload-error",!1);let t="Currently offline. Upload will resume automatically when online.";this.statusMessage&&(this.statusMessage.innerHTML=t)},this.attachShadow({mode:"open"}).appendChild(St.content.cloneNode(!0)),this.statusMessage=(e=this.shadowRoot)==null?void 0:e.getElementById("status-message")}connectedCallback(){if(x(this,w,N(this)),x(this,ee,new AbortController),a(this,w)){let e={signal:a(this,ee).signal};a(this,w).addEventListener("reset",this.clearStatusMessage,e),a(this,w).addEventListener("uploaderror",this.onUploadError,e),a(this,w).addEventListener("success",this.onSuccess,e),a(this,w).addEventListener("uploadstart",this.clearStatusMessage,e),a(this,w).addEventListener("offline",this.onOffline,e),a(this,w).addEventListener("online",this.clearStatusMessage,e)}}disconnectedCallback(){var e;(e=a(this,ee))==null||e.abort()}};w=new WeakMap,ee=new WeakMap;p.customElements.get("mux-uploader-status")||p.customElements.define("mux-uploader-status",Yr);var Rt=M.createElement("template");Rt.innerHTML=`
`;var w,ee,Yr=class extends p.HTMLElement{constructor(){var e;super(),E(this,w,void 0),E(this,ee,void 0),this.clearStatusMessage=()=>{this.toggleAttribute("upload-error",!1),this.statusMessage&&(this.statusMessage.innerHTML="")},this.onUploadError=t=>{this.toggleAttribute("upload-error",!0),this.statusMessage&&(this.statusMessage.innerHTML=t.detail.message)},this.onSuccess=()=>{this.toggleAttribute("upload-error",!1);let t="Upload complete!";this.statusMessage&&(this.statusMessage.innerHTML=t),console.info(t)},this.onOffline=()=>{this.toggleAttribute("upload-error",!1);let t="Currently offline. Upload will resume automatically when online.";this.statusMessage&&(this.statusMessage.innerHTML=t)},this.attachShadow({mode:"open"}).appendChild(Rt.content.cloneNode(!0)),this.statusMessage=(e=this.shadowRoot)==null?void 0:e.getElementById("status-message")}connectedCallback(){if(x(this,w,N(this)),x(this,ee,new AbortController),a(this,w)){let e={signal:a(this,ee).signal};a(this,w).addEventListener("reset",this.clearStatusMessage,e),a(this,w).addEventListener("uploaderror",this.onUploadError,e),a(this,w).addEventListener("success",this.onSuccess,e),a(this,w).addEventListener("uploadstart",this.clearStatusMessage,e),a(this,w).addEventListener("offline",this.onOffline,e),a(this,w).addEventListener("online",this.clearStatusMessage,e)}}disconnectedCallback(){var e;(e=a(this,ee))==null||e.abort()}};w=new WeakMap,ee=new WeakMap;p.customElements.get("mux-uploader-status")||p.customElements.define("mux-uploader-status",Yr);var wt=M.createElement("template");wt.innerHTML=`
<style>

@@ -175,3 +175,3 @@ #retry-button {

<span id="retry-button" role="button" tabindex="0">Try again</span>
`;var B,te,Zr=class extends p.HTMLElement{constructor(){var e;super(),E(this,B,void 0),E(this,te,void 0),this.handleKeyup=t=>{let r=["Enter"," "],{key:n}=t;r.includes(n)&&this.triggerReset()},this.triggerReset=()=>{var t;(t=a(this,B))==null||t.dispatchEvent(new CustomEvent("reset"))},this.attachShadow({mode:"open"}).appendChild(Rt.content.cloneNode(!0)),this.retryButton=(e=this.shadowRoot)==null?void 0:e.getElementById("retry-button")}connectedCallback(){var e,t;if(x(this,B,N(this)),x(this,te,new AbortController),a(this,B)){let r={signal:a(this,te).signal};a(this,B).addEventListener("uploaderror",()=>this.toggleAttribute("upload-error",!0)),a(this,B).addEventListener("reset",()=>this.toggleAttribute("upload-error",!1)),(e=this.retryButton)==null||e.addEventListener("click",this.triggerReset,r),(t=this.retryButton)==null||t.addEventListener("keyup",this.handleKeyup,r)}}disconnectedCallback(){var e;(e=a(this,te))==null||e.abort()}};B=new WeakMap,te=new WeakMap;p.customElements.get("mux-uploader-retry")||p.customElements.define("mux-uploader-retry",Zr);var wt=M.createElement("template");wt.innerHTML=`
`;var B,te,Zr=class extends p.HTMLElement{constructor(){var e;super(),E(this,B,void 0),E(this,te,void 0),this.handleKeyup=t=>{let r=["Enter"," "],{key:n}=t;r.includes(n)&&this.triggerReset()},this.triggerReset=()=>{var t;(t=a(this,B))==null||t.dispatchEvent(new CustomEvent("reset"))},this.attachShadow({mode:"open"}).appendChild(wt.content.cloneNode(!0)),this.retryButton=(e=this.shadowRoot)==null?void 0:e.getElementById("retry-button")}connectedCallback(){var e,t;if(x(this,B,N(this)),x(this,te,new AbortController),a(this,B)){let r={signal:a(this,te).signal};a(this,B).addEventListener("uploaderror",()=>this.toggleAttribute("upload-error",!0)),a(this,B).addEventListener("reset",()=>this.toggleAttribute("upload-error",!1)),(e=this.retryButton)==null||e.addEventListener("click",this.triggerReset,r),(t=this.retryButton)==null||t.addEventListener("keyup",this.handleKeyup,r)}}disconnectedCallback(){var e;(e=a(this,te))==null||e.abort()}};B=new WeakMap,te=new WeakMap;p.customElements.get("mux-uploader-retry")||p.customElements.define("mux-uploader-retry",Zr);var Mt=M.createElement("template");Mt.innerHTML=`
<style>

@@ -214,3 +214,3 @@ #pause-button {

<button id="pause-button">Pause</span>
`;var y,re,Jr=class extends p.HTMLElement{constructor(){super(),E(this,y,void 0),E(this,re,void 0),this.triggerPause=()=>{if(!a(this,y)){console.warn("pausing before a mux-uploader element is associated is unsupported!");return}this.pauseButton.disabled||(a(this,y).paused=!a(this,y).paused)},this.attachShadow({mode:"open"}).appendChild(wt.content.cloneNode(!0))}connectedCallback(){if(x(this,y,N(this)),x(this,re,new AbortController),a(this,y)){let e={signal:a(this,re).signal};a(this,y).addEventListener("uploadstart",()=>this.toggleAttribute("upload-in-progress",!0),e),a(this,y).addEventListener("uploaderror",()=>{this.toggleAttribute("upload-error",!0),this.toggleAttribute("upload-complete",!1),this.toggleAttribute("upload-in-progress",!1)}),a(this,y).addEventListener("success",()=>{this.toggleAttribute("upload-complete",!0),this.toggleAttribute("upload-error",!1),this.toggleAttribute("upload-in-progress",!1)}),a(this,y).addEventListener("reset",()=>{this.toggleAttribute("upload-error",!1),this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!1)}),a(this,y).addEventListener("pausedchange",()=>{var t;if(this.pauseButton.disabled=!1,!a(this,y))return;let r=(t=a(this,y).paused)!=null?t:!1;this.pauseButton.innerHTML=r?"Pausing...":"Pause",r&&(this.pauseButton.disabled=!0,a(this,y).addEventListener("chunksuccess",()=>{var n;this.pauseButton.innerHTML=(n=a(this,y))!=null&&n.paused?"Resume":"Pause",this.pauseButton.disabled=!1},{once:!0}))}),this.pauseButton.addEventListener("click",this.triggerPause,e)}}disconnectedCallback(){var e;(e=a(this,re))==null||e.abort()}get pauseButton(){var e;return(e=this.shadowRoot)==null?void 0:e.getElementById("pause-button")}};y=new WeakMap,re=new WeakMap;p.customElements.get("mux-uploader-pause")||p.customElements.define("mux-uploader-pause",Jr);var Mt=`
`;var y,re,Jr=class extends p.HTMLElement{constructor(){super(),E(this,y,void 0),E(this,re,void 0),this.triggerPause=()=>{if(!a(this,y)){console.warn("pausing before a mux-uploader element is associated is unsupported!");return}this.pauseButton.disabled||(a(this,y).paused=!a(this,y).paused)},this.attachShadow({mode:"open"}).appendChild(Mt.content.cloneNode(!0))}connectedCallback(){if(x(this,y,N(this)),x(this,re,new AbortController),a(this,y)){let e={signal:a(this,re).signal};a(this,y).addEventListener("uploadstart",()=>this.toggleAttribute("upload-in-progress",!0),e),a(this,y).addEventListener("uploaderror",()=>{this.toggleAttribute("upload-error",!0),this.toggleAttribute("upload-complete",!1),this.toggleAttribute("upload-in-progress",!1)}),a(this,y).addEventListener("success",()=>{this.toggleAttribute("upload-complete",!0),this.toggleAttribute("upload-error",!1),this.toggleAttribute("upload-in-progress",!1)}),a(this,y).addEventListener("reset",()=>{this.toggleAttribute("upload-error",!1),this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!1)}),a(this,y).addEventListener("pausedchange",()=>{var t;if(this.pauseButton.disabled=!1,!a(this,y))return;let r=(t=a(this,y).paused)!=null?t:!1;this.pauseButton.innerHTML=r?"Pausing...":"Pause",r&&(this.pauseButton.disabled=!0,a(this,y).addEventListener("chunksuccess",()=>{var n;this.pauseButton.innerHTML=(n=a(this,y))!=null&&n.paused?"Resume":"Pause",this.pauseButton.disabled=!1},{once:!0}))}),this.pauseButton.addEventListener("click",this.triggerPause,e)}}disconnectedCallback(){var e;(e=a(this,re))==null||e.abort()}get pauseButton(){var e;return(e=this.shadowRoot)==null?void 0:e.getElementById("pause-button")}};y=new WeakMap,re=new WeakMap;p.customElements.get("mux-uploader-pause")||p.customElements.define("mux-uploader-pause",Jr);var Tt=`
<style>

@@ -244,3 +244,3 @@ #file-select {

<button id="file-select" type="button" part="file-select-button">Upload a video</button>
`,Tt=M.createElement("template");Tt.innerHTML=`
`,Pt=M.createElement("template");Pt.innerHTML=`
<style>

@@ -251,5 +251,5 @@ :host { display: inline-block; }

<slot>
${Mt}
${Tt}
</slot>
`;var L,I,ne,Qr=class extends p.HTMLElement{constructor(){var e,t,r;super(),E(this,L,void 0),E(this,I,void 0),E(this,ne,void 0),this.attachShadow({mode:"open"}).appendChild(Tt.content.cloneNode(!0)),this.handleFilePickerElClick=this.handleFilePickerElClick.bind(this),this.filePickerEl=(e=this.shadowRoot)==null?void 0:e.querySelector("button"),(r=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"))==null||r.addEventListener("slotchange",n=>{let s=n.currentTarget;this.filePickerEl=s.assignedElements({flatten:!0}).filter(i=>!["STYLE"].includes(i.nodeName))[0]})}connectedCallback(){if(x(this,I,N(this)),x(this,ne,new AbortController),a(this,I)){let e={signal:a(this,ne).signal};a(this,I).addEventListener("file-ready",()=>{this.filePickerEl&&(this.filePickerEl.style.display="none")},e),a(this,I).addEventListener("uploadstart",()=>this.toggleAttribute("upload-in-progress",!0),e),a(this,I).addEventListener("success",()=>{this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!0)},e),a(this,I).addEventListener("reset",()=>{this.filePickerEl&&(this.filePickerEl.style.display="block")},e)}}disconnectedCallback(){var e;(e=a(this,ne))==null||e.abort()}get filePickerEl(){return a(this,L)}set filePickerEl(e){e!==a(this,L)&&(a(this,L)&&a(this,L).removeEventListener("click",this.handleFilePickerElClick),x(this,L,e),a(this,L)&&a(this,L).addEventListener("click",this.handleFilePickerElClick))}handleFilePickerElClick(){var e,t;let r=this.getAttribute("mux-uploader"),n=r?M.getElementById(r):this.getRootNode().host;(t=(e=n==null?void 0:n.shadowRoot)==null?void 0:e.querySelector("#hidden-file-input"))==null||t.click()}};L=new WeakMap,I=new WeakMap,ne=new WeakMap;p.customElements.get("mux-uploader-file-select")||p.customElements.define("mux-uploader-file-select",Qr);function ve(e,t){return e?"":t}function en(e){let{noDrop:t,noProgress:r,noStatus:n,noRetry:s,pausable:i}=e,l=t?"div":'mux-uploader-drop overlay part="drop"',u=ve(r,`
`;var L,I,ne,Qr=class extends p.HTMLElement{constructor(){var e,t,r;super(),E(this,L,void 0),E(this,I,void 0),E(this,ne,void 0),this.attachShadow({mode:"open"}).appendChild(Pt.content.cloneNode(!0)),this.handleFilePickerElClick=this.handleFilePickerElClick.bind(this),this.filePickerEl=(e=this.shadowRoot)==null?void 0:e.querySelector("button"),(r=(t=this.shadowRoot)==null?void 0:t.querySelector("slot"))==null||r.addEventListener("slotchange",n=>{let s=n.currentTarget;this.filePickerEl=s.assignedElements({flatten:!0}).filter(i=>!["STYLE"].includes(i.nodeName))[0]})}connectedCallback(){if(x(this,I,N(this)),x(this,ne,new AbortController),a(this,I)){let e={signal:a(this,ne).signal};a(this,I).addEventListener("file-ready",()=>{this.filePickerEl&&(this.filePickerEl.style.display="none")},e),a(this,I).addEventListener("uploadstart",()=>this.toggleAttribute("upload-in-progress",!0),e),a(this,I).addEventListener("success",()=>{this.toggleAttribute("upload-in-progress",!1),this.toggleAttribute("upload-complete",!0)},e),a(this,I).addEventListener("reset",()=>{this.filePickerEl&&(this.filePickerEl.style.display="block")},e)}}disconnectedCallback(){var e;(e=a(this,ne))==null||e.abort()}get filePickerEl(){return a(this,L)}set filePickerEl(e){e!==a(this,L)&&(a(this,L)&&a(this,L).removeEventListener("click",this.handleFilePickerElClick),x(this,L,e),a(this,L)&&a(this,L).addEventListener("click",this.handleFilePickerElClick))}handleFilePickerElClick(){var e,t;let r=this.getAttribute("mux-uploader"),n=r?M.getElementById(r):this.getRootNode().host;(t=(e=n==null?void 0:n.shadowRoot)==null?void 0:e.querySelector("#hidden-file-input"))==null||t.click()}};L=new WeakMap,I=new WeakMap,ne=new WeakMap;p.customElements.get("mux-uploader-file-select")||p.customElements.define("mux-uploader-file-select",Qr);function ve(e,t){return e?"":t}function en(e){let{noDrop:t,noProgress:r,noStatus:n,noRetry:s,pausable:i}=e,l=t?"div":'mux-uploader-drop overlay part="drop"',u=ve(r,`
<mux-uploader-progress part="progress progress-percentage" type="percentage"></mux-uploader-progress>

@@ -265,3 +265,3 @@ <mux-uploader-progress part="progress progress-bar" type="bar"></mux-uploader-progress>

<slot name="file-select">
${Mt}
${Tt}
</slot>

@@ -272,3 +272,3 @@ </mux-uploader-file-select>

</${l}>
`)}var Pt=M.createElement("template");Pt.innerHTML=`
`)}var At=M.createElement("template");At.innerHTML=`
<style>

@@ -291,3 +291,3 @@ :host {

<mux-uploader-sr-text></mux-uploader-sr-text>
`;var vt=class extends p.HTMLElement{constructor(){var e;super(),this.attachShadow({mode:"open"}).appendChild(Pt.content.cloneNode(!0)),this.updateLayout(),(e=this.hiddenFileInput)==null||e.addEventListener("change",()=>{var t,r;let n=(r=(t=this.hiddenFileInput)==null?void 0:t.files)==null?void 0:r[0];n&&this.dispatchEvent(new CustomEvent("file-ready",{composed:!0,bubbles:!0,detail:n}))})}static get observedAttributes(){return["pausable","no-drop","no-progress","no-status","no-retry","max-file-size","use-large-file-workaround"]}connectedCallback(){this.addEventListener("file-ready",this.handleUpload),this.addEventListener("reset",this.resetState)}disconnectedCallback(){this.removeEventListener("file-ready",this.handleUpload,!1),this.removeEventListener("reset",this.resetState)}attributeChangedCallback(){this.updateLayout()}get hiddenFileInput(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("#hidden-file-input")}get endpoint(){var e;return(e=this.getAttribute("endpoint"))!=null?e:this._endpoint}set endpoint(e){e!==this.endpoint&&(typeof e=="string"?this.setAttribute("endpoint",e):e==null&&this.removeAttribute("endpoint"),this._endpoint=e)}get noDrop(){return this.hasAttribute("no-drop")}set noDrop(e){this.toggleAttribute("no-drop",!!e)}get noProgress(){return this.hasAttribute("no-progress")}set noProgress(e){this.toggleAttribute("no-progress",!!e)}get noStatus(){return this.hasAttribute("no-status")}set noStatus(e){this.toggleAttribute("no-status",!!e)}get noRetry(){return this.hasAttribute("no-retry")}set noRetry(e){this.toggleAttribute("no-retry",!!e)}get pausable(){return this.hasAttribute("pausable")}set pausable(e){this.toggleAttribute("pausable",!!e)}get dynamicChunkSize(){return this.hasAttribute("dynamic-chunk-size")}set dynamicChunkSize(e){e!==this.hasAttribute("dynamic-chunk-size")&&(e?this.setAttribute("dynamic-chunk-size",""):this.removeAttribute("dynamic-chunk-size"))}get useLargeFileWorkaround(){return this.hasAttribute("use-large-file-workaround")}set useLargeFileWorkaround(e){e!=this.useLargeFileWorkaround&&this.toggleAttribute("use-large-file-workaround",!!e)}get maxFileSize(){let e=this.getAttribute("max-file-size");return e!==null?parseInt(e):void 0}set maxFileSize(e){e?this.setAttribute("max-file-size",e.toString()):this.removeAttribute("max-file-size")}get chunkSize(){let e=this.getAttribute("chunk-size");return e!==null?parseInt(e):void 0}set chunkSize(e){e?this.setAttribute("chunk-size",e.toString()):this.removeAttribute("chunk-size")}get upload(){return this._upload}get paused(){var e,t;return(t=(e=this.upload)==null?void 0:e.paused)!=null?t:!1}set paused(e){if(!this.upload){console.warn("Pausing before an upload has begun is unsupported");return}let t=!!e;t!==this.paused&&(t?(console.log("pausing upchunk!"),this.upload.pause()):this.upload.resume(),this.toggleAttribute("paused",t),this.dispatchEvent(new CustomEvent("pausedchange",{detail:t})))}updateLayout(){let e=this.shadowRoot.querySelector("mux-uploader-drop, div");e&&e.remove();let t=en(this);this.shadowRoot.appendChild(t)}setError(e){this.setAttribute("upload-error",""),this.dispatchEvent(new CustomEvent("uploaderror",{detail:{message:e}}))}resetState(){this.removeAttribute("upload-error"),this.removeAttribute("upload-in-progress"),this.removeAttribute("upload-complete"),this.hiddenFileInput.value=""}handleUpload(e){let t=this.endpoint,r=this.dynamicChunkSize;if(t)this.removeAttribute("upload-error");else{this.setError("No url or endpoint specified -- cannot handleUpload");return}try{let n=Oe.createUpload({endpoint:t,dynamicChunkSize:r,file:e.detail,maxFileSize:this.maxFileSize,chunkSize:this.chunkSize,useLargeFileWorkaround:this.useLargeFileWorkaround});this._upload=n,this.dispatchEvent(new CustomEvent("uploadstart",{detail:{file:n.file,chunkSize:n.chunkSize}})),this.setAttribute("upload-in-progress",""),n.offline&&this.dispatchEvent(new CustomEvent("offline")),n.on("attempt",s=>{this.dispatchEvent(new CustomEvent("chunkattempt",s))}),n.on("chunkSuccess",s=>{this.dispatchEvent(new CustomEvent("chunksuccess",s))}),n.on("error",s=>{this.setAttribute("upload-error",""),console.error("error handler",s.detail.message),this.dispatchEvent(new CustomEvent("uploaderror",s))}),n.on("progress",s=>{this.dispatchEvent(new CustomEvent("progress",s))}),n.on("success",s=>{this.removeAttribute("upload-in-progress"),this.setAttribute("upload-complete",""),this.dispatchEvent(new CustomEvent("success",s))}),n.on("offline",s=>{this.dispatchEvent(new CustomEvent("offline",s))}),n.on("online",s=>{this.dispatchEvent(new CustomEvent("online",s))})}catch(n){n instanceof Error&&this.setError(n.message)}}};p.customElements.get("mux-uploader")||(p.customElements.define("mux-uploader",vt),p.MuxUploaderElement=vt);var At=M.createElement("template");At.innerHTML=`
`;var bt=class extends p.HTMLElement{constructor(){var e;super(),this.attachShadow({mode:"open"}).appendChild(At.content.cloneNode(!0)),this.updateLayout(),(e=this.hiddenFileInput)==null||e.addEventListener("change",()=>{var t,r;let n=(r=(t=this.hiddenFileInput)==null?void 0:t.files)==null?void 0:r[0];n&&this.dispatchEvent(new CustomEvent("file-ready",{composed:!0,bubbles:!0,detail:n}))})}static get observedAttributes(){return["pausable","no-drop","no-progress","no-status","no-retry","max-file-size","use-large-file-workaround"]}connectedCallback(){this.addEventListener("file-ready",this.handleUpload),this.addEventListener("reset",this.resetState)}disconnectedCallback(){this.removeEventListener("file-ready",this.handleUpload,!1),this.removeEventListener("reset",this.resetState)}attributeChangedCallback(){this.updateLayout()}get hiddenFileInput(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("#hidden-file-input")}get endpoint(){var e;return(e=this.getAttribute("endpoint"))!=null?e:this._endpoint}set endpoint(e){e!==this.endpoint&&(typeof e=="string"?this.setAttribute("endpoint",e):e==null&&this.removeAttribute("endpoint"),this._endpoint=e)}get noDrop(){return this.hasAttribute("no-drop")}set noDrop(e){this.toggleAttribute("no-drop",!!e)}get noProgress(){return this.hasAttribute("no-progress")}set noProgress(e){this.toggleAttribute("no-progress",!!e)}get noStatus(){return this.hasAttribute("no-status")}set noStatus(e){this.toggleAttribute("no-status",!!e)}get noRetry(){return this.hasAttribute("no-retry")}set noRetry(e){this.toggleAttribute("no-retry",!!e)}get pausable(){return this.hasAttribute("pausable")}set pausable(e){this.toggleAttribute("pausable",!!e)}get dynamicChunkSize(){return this.hasAttribute("dynamic-chunk-size")}set dynamicChunkSize(e){e!==this.hasAttribute("dynamic-chunk-size")&&(e?this.setAttribute("dynamic-chunk-size",""):this.removeAttribute("dynamic-chunk-size"))}get useLargeFileWorkaround(){return this.hasAttribute("use-large-file-workaround")}set useLargeFileWorkaround(e){e!=this.useLargeFileWorkaround&&this.toggleAttribute("use-large-file-workaround",!!e)}get maxFileSize(){let e=this.getAttribute("max-file-size");return e!==null?parseInt(e):void 0}set maxFileSize(e){e?this.setAttribute("max-file-size",e.toString()):this.removeAttribute("max-file-size")}get chunkSize(){let e=this.getAttribute("chunk-size");return e!==null?parseInt(e):void 0}set chunkSize(e){e?this.setAttribute("chunk-size",e.toString()):this.removeAttribute("chunk-size")}get upload(){return this._upload}get paused(){var e,t;return(t=(e=this.upload)==null?void 0:e.paused)!=null?t:!1}set paused(e){if(!this.upload){console.warn("Pausing before an upload has begun is unsupported");return}let t=!!e;t!==this.paused&&(t?this.upload.pause():this.upload.resume(),this.toggleAttribute("paused",t),this.dispatchEvent(new CustomEvent("pausedchange",{detail:t})))}updateLayout(){let e=this.shadowRoot.querySelector("mux-uploader-drop, div");e&&e.remove();let t=en(this);this.shadowRoot.appendChild(t)}setError(e){this.setAttribute("upload-error",""),this.dispatchEvent(new CustomEvent("uploaderror",{detail:{message:e}}))}resetState(){this.removeAttribute("upload-error"),this.removeAttribute("upload-in-progress"),this.removeAttribute("upload-complete"),this.hiddenFileInput.value=""}handleUpload(e){let t=this.endpoint,r=this.dynamicChunkSize;if(t)this.removeAttribute("upload-error");else{this.setError("No url or endpoint specified -- cannot handleUpload");return}try{let n=Oe.createUpload({endpoint:t,dynamicChunkSize:r,file:e.detail,maxFileSize:this.maxFileSize,chunkSize:this.chunkSize,useLargeFileWorkaround:this.useLargeFileWorkaround});this._upload=n,this.dispatchEvent(new CustomEvent("uploadstart",{detail:{file:n.file,chunkSize:n.chunkSize}})),this.setAttribute("upload-in-progress",""),n.offline&&this.dispatchEvent(new CustomEvent("offline")),n.on("attempt",s=>{this.dispatchEvent(new CustomEvent("chunkattempt",s))}),n.on("chunkSuccess",s=>{this.dispatchEvent(new CustomEvent("chunksuccess",s))}),n.on("error",s=>{this.setAttribute("upload-error",""),console.error("error handler",s.detail.message),this.dispatchEvent(new CustomEvent("uploaderror",s))}),n.on("progress",s=>{this.dispatchEvent(new CustomEvent("progress",s))}),n.on("success",s=>{this.removeAttribute("upload-in-progress"),this.setAttribute("upload-complete",""),this.dispatchEvent(new CustomEvent("success",s))}),n.on("offline",s=>{this.dispatchEvent(new CustomEvent("offline",s))}),n.on("online",s=>{this.dispatchEvent(new CustomEvent("online",s))})}catch(n){n instanceof Error&&this.setError(n.message)}}};p.customElements.get("mux-uploader")||(p.customElements.define("mux-uploader",bt),p.MuxUploaderElement=bt);var Ut=M.createElement("template");Ut.innerHTML=`
<style>

@@ -306,3 +306,3 @@

<div class="sr-only" id="sr-only" aria-live="polite"></div>
`;var H,tn=class extends p.HTMLElement{constructor(){var e;super(),E(this,H,void 0),this.attachShadow({mode:"open"}).appendChild(At.content.cloneNode(!0)),this.srOnlyText=(e=this.shadowRoot)==null?void 0:e.getElementById("sr-only")}connectedCallback(){x(this,H,N(this)),a(this,H)&&a(this,H).addEventListener("success",this.updateText.bind(this))}disconnectedCallback(){a(this,H)&&a(this,H).removeEventListener("success",this.updateText.bind(this))}updateText(){this.srOnlyText&&(this.srOnlyText.textContent="Upload complete!")}};H=new WeakMap;p.customElements.get("mux-uploader-sr-text")||p.customElements.define("mux-uploader-sr-text",tn);var se=F(require("react"));var Ut={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay"},rn=e=>e==null,nn=(e,t)=>rn(t)?!1:e in t,sn=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),an=(e,t)=>{if(!(typeof t=="boolean"&&!t)){if(nn(e,Ut))return Ut[e];if(typeof t!=null)return/[A-Z]/.test(e)?sn(e):e}};var on=(e,t)=>typeof e=="boolean"?"":e,k=(e={})=>Object.entries(e).reduce((t,[r,n])=>{let s=an(r,n);if(!s)return t;let i=on(n,r);return t[s]=i,t},{});var Lt=require("react");var xe=require("react"),C=(...e)=>{let t=(0,xe.useRef)(null);return(0,xe.useEffect)(()=>{e.forEach(r=>{r&&(typeof r=="function"?r(t.current):r.current=t.current)})},[e]),t};var ln=se.default.forwardRef(({children:e,...t},r)=>se.default.createElement("mux-uploader-drop",k({...t,ref:r}),e)),un=se.default.forwardRef((e,t)=>{let r=(0,Lt.useRef)(null),n=C(r,t);return se.default.createElement(ln,{ref:n,...e})}),_t=un;var ie=F(require("react"));var zt=require("react");var dn=ie.default.forwardRef(({children:e,...t},r)=>ie.default.createElement("mux-uploader-file-select",k({...t,ref:r}),e)),pn=ie.default.forwardRef((e,t)=>{let r=(0,zt.useRef)(null),n=C(r,t);return ie.default.createElement(dn,{ref:n,...e})}),Ot=pn;var ae=F(require("react"));var It=require("react");var cn=ae.default.forwardRef(({children:e,...t},r)=>ae.default.createElement("mux-uploader-progress",k({...t,ref:r}),e)),hn=ae.default.forwardRef((e,t)=>{let r=(0,It.useRef)(null),n=C(r,t);return ae.default.createElement(cn,{ref:n,...e})}),Dt=hn;var oe=F(require("react"));var Ft=require("react");var fn=oe.default.forwardRef(({children:e,...t},r)=>oe.default.createElement("mux-uploader-retry",k({...t,ref:r}),e)),mn=oe.default.forwardRef((e,t)=>{let r=(0,Ft.useRef)(null),n=C(r,t);return oe.default.createElement(fn,{ref:n,...e})}),Bt=mn;var le=F(require("react"));var Ht=require("react");var gn=le.default.forwardRef(({children:e,...t},r)=>le.default.createElement("mux-uploader-retry",k({...t,ref:r}),e)),vn=le.default.forwardRef((e,t)=>{let r=(0,Ht.useRef)(null),n=C(r,t);return le.default.createElement(gn,{ref:n,...e})}),Nt=vn;var ue=F(require("react"));var jt=require("react");var bn=ue.default.forwardRef(({children:e,...t},r)=>ue.default.createElement("mux-uploader-status",k({...t,ref:r}),e)),yn=ue.default.forwardRef((e,t)=>{let r=(0,jt.useRef)(null),n=C(r,t);return ue.default.createElement(bn,{ref:n,...e})}),Wt=yn;var qt=require("react");var $t=require("react"),En=Object.prototype.hasOwnProperty,xn=(e,t)=>{if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.some((s,i)=>t[i]===s);let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++)if(!En.call(t,r[s])||!Object.is(e[r[s]],t[r[s]]))return!1;return!0},kn=(e,t,r)=>!xn(t,e[r]),Cn=(e,t,r)=>{e[r]=t},Sn=(e,t,r,n=Cn,s=kn)=>(0,$t.useEffect)(()=>{let i=r==null?void 0:r.current;i&&s(i,t,e)&&n(i,t,e)},[r==null?void 0:r.current,t]),Xt=Sn;var Rn=j.default.forwardRef(({children:e,...t},r)=>j.default.createElement("mux-uploader",k({...t,ref:r}),e)),X=(e,t,r)=>(0,j.useEffect)(()=>{let n=t==null?void 0:t.current;if(!(!n||!r))return n.addEventListener(e,r),()=>{n.removeEventListener(e,r)}},[t==null?void 0:t.current,r]),wn=(e,t)=>{let{onUploadStart:r,onChunkAttempt:n,onChunkSuccess:s,onUploadError:i,onProgress:l,onSuccess:u,endpoint:c,...h}=t;return Xt("endpoint",c,e),X("uploadstart",e,r),X("chunkattempt",e,n),X("chunksuccess",e,s),X("uploaderror",e,i),X("progress",e,l),X("success",e,u),[h]},Mn=j.default.forwardRef((e,t)=>{let r=(0,qt.useRef)(null),n=C(r,t),[s]=wn(r,e);return j.default.createElement(Rn,{ref:n,...s})});var Tn=Mn;
`;var H,tn=class extends p.HTMLElement{constructor(){var e;super(),E(this,H,void 0),this.attachShadow({mode:"open"}).appendChild(Ut.content.cloneNode(!0)),this.srOnlyText=(e=this.shadowRoot)==null?void 0:e.getElementById("sr-only")}connectedCallback(){x(this,H,N(this)),a(this,H)&&a(this,H).addEventListener("success",this.updateText.bind(this))}disconnectedCallback(){a(this,H)&&a(this,H).removeEventListener("success",this.updateText.bind(this))}updateText(){this.srOnlyText&&(this.srOnlyText.textContent="Upload complete!")}};H=new WeakMap;p.customElements.get("mux-uploader-sr-text")||p.customElements.define("mux-uploader-sr-text",tn);var se=F(require("react"));var Lt={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay"},rn=e=>e==null,nn=(e,t)=>rn(t)?!1:e in t,sn=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),an=(e,t)=>{if(!(typeof t=="boolean"&&!t)){if(nn(e,Lt))return Lt[e];if(typeof t!=null)return/[A-Z]/.test(e)?sn(e):e}};var on=(e,t)=>typeof e=="boolean"?"":e,k=(e={})=>Object.entries(e).reduce((t,[r,n])=>{let s=an(r,n);if(!s)return t;let i=on(n,r);return t[s]=i,t},{});var _t=require("react");var xe=require("react"),C=(...e)=>{let t=(0,xe.useRef)(null);return(0,xe.useEffect)(()=>{e.forEach(r=>{r&&(typeof r=="function"?r(t.current):r.current=t.current)})},[e]),t};var ln=se.default.forwardRef(({children:e,...t},r)=>se.default.createElement("mux-uploader-drop",k({...t,ref:r}),e)),un=se.default.forwardRef((e,t)=>{let r=(0,_t.useRef)(null),n=C(r,t);return se.default.createElement(ln,{ref:n,...e})}),zt=un;var ie=F(require("react"));var Ot=require("react");var dn=ie.default.forwardRef(({children:e,...t},r)=>ie.default.createElement("mux-uploader-file-select",k({...t,ref:r}),e)),pn=ie.default.forwardRef((e,t)=>{let r=(0,Ot.useRef)(null),n=C(r,t);return ie.default.createElement(dn,{ref:n,...e})}),It=pn;var ae=F(require("react"));var Dt=require("react");var cn=ae.default.forwardRef(({children:e,...t},r)=>ae.default.createElement("mux-uploader-progress",k({...t,ref:r}),e)),hn=ae.default.forwardRef((e,t)=>{let r=(0,Dt.useRef)(null),n=C(r,t);return ae.default.createElement(cn,{ref:n,...e})}),Ft=hn;var oe=F(require("react"));var Bt=require("react");var fn=oe.default.forwardRef(({children:e,...t},r)=>oe.default.createElement("mux-uploader-retry",k({...t,ref:r}),e)),mn=oe.default.forwardRef((e,t)=>{let r=(0,Bt.useRef)(null),n=C(r,t);return oe.default.createElement(fn,{ref:n,...e})}),Ht=mn;var le=F(require("react"));var Nt=require("react");var gn=le.default.forwardRef(({children:e,...t},r)=>le.default.createElement("mux-uploader-retry",k({...t,ref:r}),e)),vn=le.default.forwardRef((e,t)=>{let r=(0,Nt.useRef)(null),n=C(r,t);return le.default.createElement(gn,{ref:n,...e})}),jt=vn;var ue=F(require("react"));var Wt=require("react");var bn=ue.default.forwardRef(({children:e,...t},r)=>ue.default.createElement("mux-uploader-status",k({...t,ref:r}),e)),yn=ue.default.forwardRef((e,t)=>{let r=(0,Wt.useRef)(null),n=C(r,t);return ue.default.createElement(bn,{ref:n,...e})}),$t=yn;var Gt=require("react");var Xt=require("react"),En=Object.prototype.hasOwnProperty,xn=(e,t)=>{if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.some((s,i)=>t[i]===s);let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++)if(!En.call(t,r[s])||!Object.is(e[r[s]],t[r[s]]))return!1;return!0},kn=(e,t,r)=>!xn(t,e[r]),Cn=(e,t,r)=>{e[r]=t},Sn=(e,t,r,n=Cn,s=kn)=>(0,Xt.useEffect)(()=>{let i=r==null?void 0:r.current;i&&s(i,t,e)&&n(i,t,e)},[r==null?void 0:r.current,t]),qt=Sn;var Rn=De.ProgressTypes,wn=j.default.forwardRef(({children:e,...t},r)=>j.default.createElement("mux-uploader",k({...t,ref:r}),e)),X=(e,t,r)=>(0,j.useEffect)(()=>{let n=t==null?void 0:t.current;if(!(!n||!r))return n.addEventListener(e,r),()=>{n.removeEventListener(e,r)}},[t==null?void 0:t.current,r]),Mn=(e,t)=>{let{onUploadStart:r,onChunkAttempt:n,onChunkSuccess:s,onUploadError:i,onProgress:l,onSuccess:u,endpoint:c,...h}=t;return qt("endpoint",c,e),X("uploadstart",e,r),X("chunkattempt",e,n),X("chunksuccess",e,s),X("uploaderror",e,i),X("progress",e,l),X("success",e,u),[h]},Tn=j.default.forwardRef((e,t)=>{let r=(0,Gt.useRef)(null),n=C(r,t),[s]=Mn(r,e);return j.default.createElement(wn,{ref:n,...s})});var Pn=Tn;
//# sourceMappingURL=index.cjs.js.map

@@ -12,2 +12,5 @@ import React from 'react';

import { MuxUploaderElementEventMap } from '@mux/mux-uploader';
import { constants } from '@mux/mux-uploader';
export declare const ProgressTypes: constants.ProgressTypes;
export type ProgressTypes = typeof ProgressTypes;
export type MuxUploaderRefAttributes = MuxUploaderElement;

@@ -20,3 +23,3 @@ interface GenericEventListener<T extends Event = CustomEvent> {

endpoint?: MuxUploaderElement['endpoint'];
type?: string;
type?: ProgressTypes;
noDrop?: boolean;

@@ -46,3 +49,3 @@ noProgress?: boolean;

endpoint?: MuxUploaderElement['endpoint'];
type?: string | undefined;
type?: constants.ProgressTypes | undefined;
noDrop?: boolean | undefined;

@@ -49,0 +52,0 @@ noProgress?: boolean | undefined;

@@ -12,2 +12,5 @@ import React from 'react';

import type { MuxUploaderElementEventMap } from '@mux/mux-uploader';
import { constants } from '@mux/mux-uploader';
export declare const ProgressTypes: constants.ProgressTypes;
export type ProgressTypes = typeof ProgressTypes;
export type MuxUploaderRefAttributes = MuxUploaderElement;

@@ -20,3 +23,3 @@ interface GenericEventListener<T extends Event = CustomEvent> {

endpoint?: MuxUploaderElement['endpoint'];
type?: string;
type?: ProgressTypes;
noDrop?: boolean;

@@ -46,3 +49,3 @@ noProgress?: boolean;

endpoint?: MuxUploaderElement['endpoint'];
type?: string | undefined;
type?: constants.ProgressTypes | undefined;
noDrop?: boolean | undefined;

@@ -49,0 +52,0 @@ noProgress?: boolean | undefined;

{
"name": "@mux/mux-uploader-react",
"version": "0.1.0-canary.410-87acf67",
"version": "0.1.0-canary.411-3efe356",
"description": "An uploader element for React that handles Mux Direct Uploads and a visual progress bar for you",

@@ -73,3 +73,3 @@ "keywords": [

"dependencies": {
"@mux/mux-uploader": "0.1.0-canary.409-87acf67",
"@mux/mux-uploader": "0.1.0-canary.410-3efe356",
"prop-types": "^15.7.2"

@@ -76,0 +76,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc