web-interface.assets.1255d548-1449.842221ca2db17ab35e17.js Maven / Gradle / Ivy
(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-1449"],{aswzlbfU:(Ae,de,M)=>{"use strict";M.d(de,{fh:()=>Hn});var g=M("Z7aTuO5B"),P=M("U7y/BNwM");function q(e=!1,t){const{onOpen:r,onClose:n}=t||{},[i,a]=(0,g.useState)(e),c=(0,g.useCallback)(()=>{a(h=>h||(r==null||r(),!0))},[r]),d=(0,g.useCallback)(()=>{a(h=>h&&(n==null||n(),!1))},[n]),D=(0,g.useCallback)(()=>{i?d():c()},[d,c,i]);return[i,{open:c,close:d,toggle:D}]}var X=M("ii0bleBb"),w=M.n(X),V=function(e,t){return V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},V(e,t)};function U(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");V(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var W=function(){return W=Object.assign||function(t){for(var r,n=1,i=arguments.length;n=0;d--)(c=e[d])&&(a=(i<3?c(a):i>3?c(t,r,a):c(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function O(e,t){return function(r,n){t(r,n,e)}}function R(e,t,r,n,i,a){function c($){if($!==void 0&&typeof $!="function")throw new TypeError("Function expected");return $}for(var d=n.kind,D=d==="getter"?"get":d==="setter"?"set":"value",h=!t&&e?n.static?e:e.prototype:null,_=t||(h?Object.getOwnPropertyDescriptor(h,n.name):{}),S,E=!1,j=r.length-1;j>=0;j--){var k={};for(var T in n)k[T]=T==="access"?{}:n[T];for(var T in n.access)k.access[T]=n.access[T];k.addInitializer=function($){if(E)throw new TypeError("Cannot add initializers after decoration has completed");a.push(c($||null))};var L=(0,r[j])(d==="accessor"?{get:_.get,set:_.set}:_[D],k);if(d==="accessor"){if(L===void 0)continue;if(L===null||typeof L!="object")throw new TypeError("Object expected");(S=c(L.get))&&(_.get=S),(S=c(L.set))&&(_.set=S),(S=c(L.init))&&i.unshift(S)}else(S=c(L))&&(d==="field"?i.unshift(S):_[D]=S)}h&&Object.defineProperty(h,n.name,_),E=!0}function v(e,t,r){for(var n=arguments.length>2,i=0;i0&&a[a.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!a||h[1]>a[0]&&h[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function F(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],c;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(d){c={error:d}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return a}function C(){for(var e=[],t=0;t1||d(E,j)})})}function d(E,j){try{D(n[E](j))}catch(k){S(a[0][3],k)}}function D(E){E.value instanceof ee?Promise.resolve(E.value.v).then(h,_):S(a[0][2],E)}function h(E){d("next",E)}function _(E){d("throw",E)}function S(E,j){E(j),a.shift(),a.length&&d(a[0][0],a[0][1])}}function ae(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,a){t[i]=e[i]?function(c){return(r=!r)?{value:ee(e[i](c)),done:!1}:a?a(c):c}:a}}function ar(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof x=="function"?x(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(c){return new Promise(function(d,D){c=e[a](c),i(d,D,c.done,c.value)})}}function i(a,c,d,D){Promise.resolve(D).then(function(h){a({value:h,done:d})},c)}}function sr(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var lr=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function cr(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return lr(t,e),t}function ur(e){return e&&e.__esModule?e:{default:e}}function pr(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function fr(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function dr(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function mr(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var hr=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function gr(e){function t(n){e.error=e.hasError?new hr(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(a){return t(a),r()})}catch(a){t(a)}}if(e.hasError)throw e.error}return r()}const Xn={__extends:U,__assign:W,__rest:we,__decorate:Ze,__param:O,__metadata:u,__awaiter:f,__generator:l,__createBinding:m,__exportStar:b,__values:x,__read:F,__spread:C,__spreadArrays:oe,__spreadArray:ie,__await:ee,__asyncGenerator:H,__asyncDelegator:ae,__asyncValues:ar,__makeTemplateObject:sr,__importStar:cr,__importDefault:ur,__classPrivateFieldGet:pr,__classPrivateFieldSet:fr,__classPrivateFieldIn:dr,__addDisposableResource:mr,__disposeResources:gr};var yr=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Oe(e,t){var r=vr(e);if(typeof r.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(r,"path",{value:typeof t=="string"?t:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function vr(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),i=yr.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var br=[".DS_Store","Thumbs.db"];function Dr(e){return f(this,void 0,void 0,function(){return l(this,function(t){return Ce(e)&&wr(e.dataTransfer)?[2,Er(e.dataTransfer,e.type)]:Or(e)?[2,_r(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,Sr(e)]:[2,[]]})})}function wr(e){return Ce(e)}function Or(e){return Ce(e)&&Ce(e.target)}function Ce(e){return typeof e=="object"&&e!==null}function _r(e){return Xe(e.target.files).map(function(t){return Oe(t)})}function Sr(e){return f(this,void 0,void 0,function(){var t;return l(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return Oe(n)})]}})})}function Er(e,t){return f(this,void 0,void 0,function(){var r,n;return l(this,function(i){switch(i.label){case 0:return e.items?(r=Xe(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(Pr))]):[3,2];case 1:return n=i.sent(),[2,gt(yt(n))];case 2:return[2,gt(Xe(e.files).map(function(a){return Oe(a)}))]}})})}function gt(e){return e.filter(function(t){return br.indexOf(t.name)===-1})}function Xe(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rr)return[!1,At(r)];if(e.sizer)return[!1,At(r)]}return[!0,null]}function se(e){return e!=null}function Kr(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,c=e.maxFiles,d=e.validator;return!a&&t.length>1||a&&c>=1&&t.length>c?!1:t.every(function(D){var h=jt(D,r),_=_e(h,1),S=_[0],E=zt(D,n,i),j=_e(E,1),k=j[0],T=d?d(D):null;return S&&k&&!T})}function je(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ze(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Qn(e){return Je(e)==="object"&&e!==null&&e.kind==="file"}function Tt(e){e.preventDefault()}function Lr(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Nr(e){return e.indexOf("Edge/")!==-1}function Br(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Lr(e)||Nr(e)}function J(){for(var e=arguments.length,t=new Array(e),r=0;r1?i-1:0),c=1;ce.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function on(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}var rt=(0,g.forwardRef)(function(e,t){var r=e.children,n=Te(e,Yr),i=Lt(n),a=i.open,c=Te(i,Gr);return(0,g.useImperativeHandle)(t,function(){return{open:a}},[a]),g.createElement(g.Fragment,null,r(A(A({},c),{},{open:a})))});rt.displayName="Dropzone";var Kt={disabled:!1,getFilesFromEvent:Dr,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};rt.defaultProps=Kt,rt.propTypes={children:w().func,accept:w().objectOf(w().arrayOf(w().string)),multiple:w().bool,preventDropOnDocument:w().bool,noClick:w().bool,noKeyboard:w().bool,noDrag:w().bool,noDragEventsBubbling:w().bool,minSize:w().number,maxSize:w().number,maxFiles:w().number,disabled:w().bool,getFilesFromEvent:w().func,onFileDialogCancel:w().func,onFileDialogOpen:w().func,useFsAccessApi:w().bool,autoFocus:w().bool,onDragEnter:w().func,onDragLeave:w().func,onDragOver:w().func,onDrop:w().func,onDropAccepted:w().func,onDropRejected:w().func,onError:w().func,validator:w().func};const qn=null;var nt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Lt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=A(A({},Kt),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,c=t.minSize,d=t.multiple,D=t.maxFiles,h=t.onDragEnter,_=t.onDragLeave,S=t.onDragOver,E=t.onDrop,j=t.onDropAccepted,k=t.onDropRejected,T=t.onFileDialogCancel,L=t.onFileDialogOpen,$=t.useFsAccessApi,le=t.autoFocus,te=t.preventDropOnDocument,ce=t.noClick,ue=t.noKeyboard,pe=t.noDrag,Z=t.noDragEventsBubbling,Y=t.onError,re=t.validator,fe=(0,g.useMemo)(function(){return Wr(r)},[r]),Re=(0,g.useMemo)(function(){return Ur(r)},[r]),Ee=(0,g.useMemo)(function(){return typeof L=="function"?L:Nt},[L]),he=(0,g.useMemo)(function(){return typeof T=="function"?T:Nt},[T]),I=(0,g.useRef)(null),B=(0,g.useRef)(null),Ie=(0,g.useReducer)(an,nt),Ke=qe(Ie,2),Pe=Ke[0],N=Ke[1],Le=Pe.isFocused,Ne=Pe.isFileDialogActive,ge=(0,g.useRef)(typeof window<"u"&&window.isSecureContext&&$&&Vr()),Be=function(){!ge.current&&Ne&&setTimeout(function(){if(B.current){var y=B.current.files;y.length||(N({type:"closeDialog"}),he())}},300)};(0,g.useEffect)(function(){return window.addEventListener("focus",Be,!1),function(){window.removeEventListener("focus",Be,!1)}},[B,Ne,he,ge]);var Q=(0,g.useRef)([]),ye=function(y){I.current&&I.current.contains(y.target)||(y.preventDefault(),Q.current=[])};(0,g.useEffect)(function(){return te&&(document.addEventListener("dragover",Tt,!1),document.addEventListener("drop",ye,!1)),function(){te&&(document.removeEventListener("dragover",Tt),document.removeEventListener("drop",ye))}},[I,te]),(0,g.useEffect)(function(){return!n&&le&&I.current&&I.current.focus(),function(){}},[I,le,n]);var ne=(0,g.useCallback)(function(p){Y?Y(p):console.error(p)},[Y]),xe=(0,g.useCallback)(function(p){p.preventDefault(),p.persist(),Ye(p),Q.current=[].concat(Jr(Q.current),[p.target]),ze(p)&&Promise.resolve(i(p)).then(function(y){if(!(je(p)&&!Z)){var z=y.length,K=z>0&&Kr({files:y,accept:fe,minSize:c,maxSize:a,multiple:d,maxFiles:D,validator:re}),G=z>0&&!K;N({isDragAccept:K,isDragReject:G,isDragActive:!0,type:"setDraggedFiles"}),h&&h(p)}}).catch(function(y){return ne(y)})},[i,h,ne,Z,fe,c,a,d,D,re]),Ve=(0,g.useCallback)(function(p){p.preventDefault(),p.persist(),Ye(p);var y=ze(p);if(y&&p.dataTransfer)try{p.dataTransfer.dropEffect="copy"}catch{}return y&&S&&S(p),!1},[S,Z]),Ue=(0,g.useCallback)(function(p){p.preventDefault(),p.persist(),Ye(p);var y=Q.current.filter(function(K){return I.current&&I.current.contains(K)}),z=y.indexOf(p.target);z!==-1&&y.splice(z,1),Q.current=y,!(y.length>0)&&(N({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ze(p)&&_&&_(p))},[I,_,Z]),We=(0,g.useCallback)(function(p,y){var z=[],K=[];p.forEach(function(G){var Fe=jt(G,fe),De=qe(Fe,2),ct=De[0],ut=De[1],pt=zt(G,c,a),Ge=qe(pt,2),ft=Ge[0],dt=Ge[1],mt=re?re(G):null;if(ct&&ft&&!mt)z.push(G);else{var ht=[ut,dt];mt&&(ht=ht.concat(mt)),K.push({file:G,errors:ht.filter(function(Zn){return Zn})})}}),(!d&&z.length>1||d&&D>=1&&z.length>D)&&(z.forEach(function(G){K.push({file:G,errors:[Ir]})}),z.splice(0)),N({acceptedFiles:z,fileRejections:K,type:"setFiles"}),E&&E(z,K,y),K.length>0&&k&&k(K,y),z.length>0&&j&&j(z,y)},[N,d,fe,c,a,D,E,j,k,re]),He=(0,g.useCallback)(function(p){p.preventDefault(),p.persist(),Ye(p),Q.current=[],ze(p)&&Promise.resolve(i(p)).then(function(y){je(p)&&!Z||We(y,p)}).catch(function(y){return ne(y)}),N({type:"reset"})},[i,We,ne,Z]),ve=(0,g.useCallback)(function(){if(ge.current){N({type:"openDialog"}),Ee();var p={multiple:d,types:Re};window.showOpenFilePicker(p).then(function(y){return i(y)}).then(function(y){We(y,null),N({type:"closeDialog"})}).catch(function(y){Hr(y)?(he(y),N({type:"closeDialog"})):$r(y)?(ge.current=!1,B.current?(B.current.value=null,B.current.click()):ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):ne(y)});return}B.current&&(N({type:"openDialog"}),Ee(),B.current.value=null,B.current.click())},[N,Ee,he,$,We,ne,Re,d]),rr=(0,g.useCallback)(function(p){!I.current||!I.current.isEqualNode(p.target)||(p.key===" "||p.key==="Enter"||p.keyCode===32||p.keyCode===13)&&(p.preventDefault(),ve())},[I,ve]),nr=(0,g.useCallback)(function(){N({type:"focus"})},[]),or=(0,g.useCallback)(function(){N({type:"blur"})},[]),ir=(0,g.useCallback)(function(){ce||(Br()?setTimeout(ve,0):ve())},[ce,ve]),be=function(y){return n?null:y},lt=function(y){return ue?null:be(y)},$e=function(y){return pe?null:be(y)},Ye=function(y){Z&&y.stopPropagation()},$n=(0,g.useMemo)(function(){return function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=p.refKey,z=y===void 0?"ref":y,K=p.role,G=p.onKeyDown,Fe=p.onFocus,De=p.onBlur,ct=p.onClick,ut=p.onDragEnter,pt=p.onDragOver,Ge=p.onDragLeave,ft=p.onDrop,dt=Te(p,Zr);return A(A(tt({onKeyDown:lt(J(G,rr)),onFocus:lt(J(Fe,nr)),onBlur:lt(J(De,or)),onClick:be(J(ct,ir)),onDragEnter:$e(J(ut,xe)),onDragOver:$e(J(pt,Ve)),onDragLeave:$e(J(Ge,Ue)),onDrop:$e(J(ft,He)),role:typeof K=="string"&&K!==""?K:"presentation"},z,I),!n&&!ue?{tabIndex:0}:{}),dt)}},[I,rr,nr,or,ir,xe,Ve,Ue,He,ue,pe,n]),Yn=(0,g.useCallback)(function(p){p.stopPropagation()},[]),Gn=(0,g.useMemo)(function(){return function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=p.refKey,z=y===void 0?"ref":y,K=p.onChange,G=p.onClick,Fe=Te(p,Xr),De=tt({accept:fe,multiple:d,type:"file",style:{display:"none"},onChange:be(J(K,He)),onClick:be(J(G,Yn)),tabIndex:-1},z,B);return A(A({},De),Fe)}},[B,r,d,He,n]);return A(A({},Pe),{},{isFocused:Le&&!n,getRootProps:$n,getInputProps:Gn,rootRef:I,inputRef:B,open:be(ve)})}function an(e,t){switch(t.type){case"focus":return A(A({},e),{},{isFocused:!0});case"blur":return A(A({},e),{},{isFocused:!1});case"openDialog":return A(A({},nt),{},{isFileDialogActive:!0});case"closeDialog":return A(A({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return A(A({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return A(A({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return A({},nt);default:return e}}function Nt(){}function sn(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function ln(e){const t=(0,g.createContext)(null);return[({children:i,value:a})=>g.createElement(t.Provider,{value:a},i),()=>{const i=(0,g.useContext)(t);if(i===null)throw new Error(e);return i}]}const[cn,un]=ln("Dropzone component was not found in tree");function Bt(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}function pn(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==g.Fragment:!1}var Vt=Object.getOwnPropertySymbols,fn=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable,mn=(e,t)=>{var r={};for(var n in e)fn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vt)for(var n of Vt(e))t.indexOf(n)<0&&dn.call(e,n)&&(r[n]=e[n]);return r};function ot(e){const t=r=>{const n=(0,P.useComponentDefaultProps)(`Dropzone${Bt(e)}`,{},r),{children:i}=n,a=mn(n,["children"]),c=un(),d=pn(i)?i:g.createElement("span",null,i);return c[e]?(0,g.cloneElement)(d,a):null};return t.displayName=`@mantine/dropzone/${Bt(e)}`,t}const hn=ot("accept"),gn=ot("reject"),yn=ot("idle");var vn=Object.defineProperty,bn=Object.defineProperties,Dn=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,Wt=(e,t,r)=>t in e?vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ht=(e,t)=>{for(var r in t||(t={}))wn.call(t,r)&&Wt(e,r,t[r]);if(Ut)for(var r of Ut(t))On.call(t,r)&&Wt(e,r,t[r]);return e},_n=(e,t)=>bn(e,Dn(t)),Sn=(0,P.createStyles)((e,{padding:t,radius:r})=>{const n=e.fn.variant({color:"red",variant:"light"}),i=e.fn.variant({color:e.primaryColor,variant:"light"});return{root:_n(Ht(Ht({},e.fn.fontStyles()),e.fn.focusStyles()),{boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${(0,P.rem)(2)} dashed ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,padding:(0,P.getSize)({size:t,sizes:e.spacing}),borderRadius:e.fn.radius(r),cursor:"pointer",userSelect:"none",transition:"background-color 150ms ease",position:"relative","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&[data-loading]":{cursor:"default","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white}},"&[data-accept]":{backgroundColor:e.colorScheme==="dark"?i.background:e.colors[e.primaryColor][0],borderColor:e.colorScheme==="dark"?i.border:e.colors[e.primaryColor][4],"&:hover":{backgroundColor:e.colorScheme==="dark"?i.background:e.colors[e.primaryColor][0]}},"&[data-reject]":{backgroundColor:e.colorScheme==="dark"?n.background:e.colors.red[0],borderColor:e.colorScheme==="dark"?n.border:e.colors.red[4],"&:hover":{backgroundColor:e.colorScheme==="dark"?n.background:e.colors.red[0]}}}),inner:{pointerEvents:"none",userSelect:"none"}}});const En=Sn;var Pn=Object.defineProperty,xn=Object.defineProperties,Fn=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,Gt=(e,t,r)=>t in e?Pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Se=(e,t)=>{for(var r in t||(t={}))$t.call(t,r)&&Gt(e,r,t[r]);if(ke)for(var r of ke(t))Yt.call(t,r)&&Gt(e,r,t[r]);return e},it=(e,t)=>xn(e,Fn(t)),An=(e,t)=>{var r={};for(var n in e)$t.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ke)for(var n of ke(e))t.indexOf(n)<0&&Yt.call(e,n)&&(r[n]=e[n]);return r};const Cn={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0};function me(e){const t=(0,P.useComponentDefaultProps)("Dropzone",Cn,e),{className:r,padding:n,radius:i,disabled:a,classNames:c,styles:d,loading:D,multiple:h,maxSize:_,accept:S,children:E,onDropAny:j,onDrop:k,onReject:T,openRef:L,name:$,unstyled:le,maxFiles:te,autoFocus:ce,activateOnClick:ue,activateOnDrag:pe,dragEventsBubbling:Z,activateOnKeyboard:Y,onDragEnter:re,onDragLeave:fe,onDragOver:Re,onFileDialogCancel:Ee,onFileDialogOpen:he,preventDropOnDocument:I,useFsAccessApi:B,getFilesFromEvent:Ie,validator:Ke,variant:Pe}=t,N=An(t,["className","padding","radius","disabled","classNames","styles","loading","multiple","maxSize","accept","children","onDropAny","onDrop","onReject","openRef","name","unstyled","maxFiles","autoFocus","activateOnClick","activateOnDrag","dragEventsBubbling","activateOnKeyboard","onDragEnter","onDragLeave","onDragOver","onFileDialogCancel","onFileDialogOpen","preventDropOnDocument","useFsAccessApi","getFilesFromEvent","validator","variant"]),{classes:Le,cx:Ne}=En({radius:i,padding:n},{name:"Dropzone",classNames:c,styles:d,unstyled:le,variant:Pe}),{getRootProps:ge,getInputProps:Be,isDragAccept:Q,isDragReject:ye,open:ne}=Lt(Se({onDrop:j,onDropAccepted:k,onDropRejected:T,disabled:a||D,accept:Array.isArray(S)?S.reduce((Ve,Ue)=>it(Se({},Ve),{[Ue]:[]}),{}):S,multiple:h,maxSize:_,maxFiles:te,autoFocus:ce,noClick:!ue,noDrag:!pe,noDragEventsBubbling:!Z,noKeyboard:!Y,onDragEnter:re,onDragLeave:fe,onDragOver:Re,onFileDialogCancel:Ee,onFileDialogOpen:he,preventDropOnDocument:I,useFsAccessApi:B,validator:Ke},Ie?{getFilesFromEvent:Ie}:null));sn(L,ne);const xe=!Q&&!ye;return g.createElement(cn,{value:{accept:Q,reject:ye,idle:xe}},g.createElement(P.Box,it(Se(Se({},N),ge()),{"data-accept":Q||void 0,"data-reject":ye||void 0,"data-idle":xe||void 0,"data-loading":D||void 0,className:Ne(Le.root,r)}),g.createElement(P.LoadingOverlay,{visible:D,radius:i,unstyled:le}),g.createElement("input",it(Se({},Be()),{name:$})),g.createElement("div",{className:Le.inner},E)))}me.displayName="@mantine/dropzone/Dropzone",me.Accept=hn,me.Reject=gn,me.Idle=yn;const Zt=me;var jn=Object.defineProperty,zn=Object.defineProperties,Tn=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertySymbols,kn=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable,Jt=(e,t,r)=>t in e?jn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rn=(e,t)=>{for(var r in t||(t={}))kn.call(t,r)&&Jt(e,r,t[r]);if(Xt)for(var r of Xt(t))Mn.call(t,r)&&Jt(e,r,t[r]);return e},In=(e,t)=>zn(e,Tn(t)),Kn=(0,P.createStyles)(e=>({wrapper:In(Rn({},e.fn.cover(0)),{position:"fixed",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,display:"flex",padding:e.spacing.xs,transition:"opacity 100ms ease"}),dropzone:{flex:1}}));const Ln=Kn;var Nn=Object.defineProperty,Bn=Object.defineProperties,Vn=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,er=(e,t,r)=>t in e?Nn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,at=(e,t)=>{for(var r in t||(t={}))Qt.call(t,r)&&er(e,r,t[r]);if(Me)for(var r of Me(t))qt.call(t,r)&&er(e,r,t[r]);return e},st=(e,t)=>Bn(e,Vn(t)),Un=(e,t)=>{var r={};for(var n in e)Qt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Me)for(var n of Me(e))t.indexOf(n)<0&&qt.call(e,n)&&(r[n]=e[n]);return r};const Wn={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:(0,P.getDefaultZIndex)("max"),withinPortal:!0};function tr(e){const t=(0,P.useComponentDefaultProps)("DropzoneFullScreen",Wn,e),{classNames:r,styles:n,sx:i,className:a,style:c,unstyled:d,active:D,onDrop:h,onReject:_,zIndex:S,withinPortal:E,portalProps:j}=t,k=Un(t,["classNames","styles","sx","className","style","unstyled","active","onDrop","onReject","zIndex","withinPortal","portalProps"]),[T,L]=g.useState(0),[$,{open:le,close:te}]=q(!1),{classes:ce,cx:ue}=Ln(null,{name:"DropzoneFullScreen",classNames:r,styles:n,unstyled:d}),pe=Y=>{Y.dataTransfer.types.includes("Files")&&(L(re=>re+1),le())},Z=()=>{L(Y=>Y-1)};return(0,g.useEffect)(()=>{T===0&&te()},[T]),(0,g.useEffect)(()=>{if(D)return document.addEventListener("dragenter",pe,!1),document.addEventListener("dragleave",Z,!1),()=>{document.removeEventListener("dragenter",pe,!1),document.removeEventListener("dragleave",Z,!1)}},[D]),g.createElement(P.OptionalPortal,st(at({},j),{withinPortal:E}),g.createElement(P.Box,{className:ue(ce.wrapper,a),sx:i,style:st(at({},c),{opacity:$?1:0,pointerEvents:$?"all":"none",zIndex:S})},g.createElement(me,st(at({},k),{classNames:r,styles:n,unstyled:d,className:ce.dropzone,onDrop:Y=>{h==null||h(Y),te()},onReject:Y=>{_==null||_(Y),te()}}))))}tr.displayName="@mantine/dropzone/DropzoneFullScreen",Zt.FullScreen=tr;const Hn=Zt},PIpk1pyF:(Ae,de)=>{"use strict";var M;M=!0,de.Z=function(g,P){if(g&&P){var q=Array.isArray(P)?P:P.split(","),X=g.name||"",w=(g.type||"").toLowerCase(),V=w.replace(/\/.*$/,"");return q.some(function(U){var W=U.trim().toLowerCase();return W.charAt(0)==="."?X.toLowerCase().endsWith(W):W.endsWith("/*")?V===W.replace(/\/.*$/,""):w===W})}return!0}},"9Dxozsm/":(Ae,de,M)=>{var g=M("VNf9iurS"),P=M("IcUPdRuX"),q=M("Ce+nMSm/"),X=M("Ynj+YPJQ"),w=q(function(V,U){return X(V)?g(V,P(U,1,X,!0)):[]});Ae.exports=w},"+tRdaXwG":(Ae,de,M)=>{"use strict";M.d(de,{Z:()=>Ze});var g=M("WZJ4lp+S"),P=M("Z7aTuO5B");function q(O){return O&&O.stopPropagation&&O.stopPropagation(),O&&O.preventDefault&&O.preventDefault(),!1}function X(O){return O==null?[]:Array.isArray(O)?O.slice():[O]}function w(O){return O!==null&&O.length===1?O[0]:O.slice()}function V(O){Object.keys(O).forEach(R=>{typeof document<"u"&&document.addEventListener(R,O[R],!1)})}function U(O,R){return W(function(v,s){let o=v;return o<=s.min&&(o=s.min),o>=s.max&&(o=s.max),o}(O,R),R)}function W(O,R){const v=(O-R.min)%R.step;let s=O-v;return 2*Math.abs(v)>=R.step&&(s+=v>0?R.step:-R.step),parseFloat(s.toFixed(5))}let we=function(O){function R(s){var o;(o=O.call(this,s)||this).onKeyUp=()=>{o.onEnd()},o.onMouseUp=()=>{o.onEnd(o.getMouseEventMap())},o.onTouchEnd=l=>{l.preventDefault(),o.onEnd(o.getTouchEventMap())},o.onBlur=()=>{o.setState({index:-1},o.onEnd(o.getKeyDownEventMap()))},o.onMouseMove=l=>{o.setState({pending:!0});const m=o.getMousePosition(l),b=o.getDiffPosition(m[0]),x=o.getValueFromPosition(b);o.move(x)},o.onTouchMove=l=>{if(l.touches.length>1)return;o.setState({pending:!0});const m=o.getTouchPosition(l);if(o.isScrolling===void 0){const F=m[0]-o.startPosition[0],C=m[1]-o.startPosition[1];o.isScrolling=Math.abs(C)>Math.abs(F)}if(o.isScrolling)return void o.setState({index:-1});const b=o.getDiffPosition(m[0]),x=o.getValueFromPosition(b);o.move(x)},o.onKeyDown=l=>{if(!(l.ctrlKey||l.shiftKey||l.altKey||l.metaKey))switch(o.setState({pending:!0}),l.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":l.preventDefault(),o.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":l.preventDefault(),o.moveUpByStep();break;case"Home":l.preventDefault(),o.move(o.props.min);break;case"End":l.preventDefault(),o.move(o.props.max);break;case"PageDown":l.preventDefault(),o.moveDownByStep(o.props.pageFn(o.props.step));break;case"PageUp":l.preventDefault(),o.moveUpByStep(o.props.pageFn(o.props.step))}},o.onSliderMouseDown=l=>{if(!o.props.disabled&&l.button!==2){if(o.setState({pending:!0}),!o.props.snapDragDisabled){const m=o.getMousePosition(l);o.forceValueFromPosition(m[0],b=>{o.start(b,m[0]),V(o.getMouseEventMap())})}q(l)}},o.onSliderClick=l=>{if(!o.props.disabled&&o.props.onSliderClick&&!o.hasMoved){const m=o.getMousePosition(l),b=U(o.calcValue(o.calcOffsetFromPosition(m[0])),o.props);o.props.onSliderClick(b)}},o.createOnKeyDown=l=>m=>{o.props.disabled||(o.start(l),V(o.getKeyDownEventMap()),q(m))},o.createOnMouseDown=l=>m=>{if(o.props.disabled||m.button===2)return;o.setState({pending:!0});const b=o.getMousePosition(m);o.start(l,b[0]),V(o.getMouseEventMap()),q(m)},o.createOnTouchStart=l=>m=>{if(o.props.disabled||m.touches.length>1)return;o.setState({pending:!0});const b=o.getTouchPosition(m);o.startPosition=b,o.isScrolling=void 0,o.start(l,b[0]),V(o.getTouchEventMap()),function(x){x.stopPropagation&&x.stopPropagation()}(m)},o.handleResize=()=>{const l=window.setTimeout(()=>{o.pendingResizeTimeouts.shift(),o.resize()},0);o.pendingResizeTimeouts.push(l)},o.renderThumb=(l,m)=>{const b=o.props.thumbClassName+" "+o.props.thumbClassName+"-"+m+" "+(o.state.index===m?o.props.thumbActiveClassName:""),x={ref:C=>{o["thumb"+m]=C},key:o.props.thumbClassName+"-"+m,className:b,style:l,onMouseDown:o.createOnMouseDown(m),onTouchStart:o.createOnTouchStart(m),onFocus:o.createOnKeyDown(m),tabIndex:0,role:"slider","aria-orientation":o.props.orientation,"aria-valuenow":o.state.value[m],"aria-valuemin":o.props.min,"aria-valuemax":o.props.max,"aria-label":Array.isArray(o.props.ariaLabel)?o.props.ariaLabel[m]:o.props.ariaLabel,"aria-labelledby":Array.isArray(o.props.ariaLabelledby)?o.props.ariaLabelledby[m]:o.props.ariaLabelledby,"aria-disabled":o.props.disabled},F={index:m,value:w(o.state.value),valueNow:o.state.value[m]};return o.props.ariaValuetext&&(x["aria-valuetext"]=typeof o.props.ariaValuetext=="string"?o.props.ariaValuetext:o.props.ariaValuetext(F)),o.props.renderThumb(x,F)},o.renderTrack=(l,m,b)=>{const x={key:o.props.trackClassName+"-"+l,className:o.props.trackClassName+" "+o.props.trackClassName+"-"+l,style:o.buildTrackStyle(m,o.state.upperBound-b)},F={index:l,value:w(o.state.value)};return o.props.renderTrack(x,F)};let u=X(s.value);u.length||(u=X(s.defaultValue)),o.pendingResizeTimeouts=[];const f=[];for(let l=0;lU(f,s))}:null},v.componentDidUpdate=function(){this.state.upperBound===0&&this.resize()},v.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()},v.onEnd=function(s){s&&function(o){Object.keys(o).forEach(u=>{typeof document<"u"&&document.removeEventListener(u,o[u],!1)})}(s),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},v.getValue=function(){return w(this.state.value)},v.getClosestIndex=function(s){let o=Number.MAX_VALUE,u=-1;const{value:f}=this.state,l=f.length;for(let m=0;m{o(f),this.fireChangeEvent("onChange")})},v.clearPendingResizeTimeouts=function(){do{const s=this.pendingResizeTimeouts.shift();clearTimeout(s)}while(this.pendingResizeTimeouts.length)},v.start=function(s,o){const u=this["thumb"+s];u&&u.focus();const{zIndices:f}=this.state;f.splice(f.indexOf(s),1),f.push(s),this.setState(l=>({startValue:l.value[s],startPosition:o!==void 0?o:l.startPosition,index:s,zIndices:f}))},v.moveUpByStep=function(s){s===void 0&&(s=this.props.step);const o=this.state.value[this.state.index],u=U(this.props.invert&&this.props.orientation==="horizontal"?o-s:o+s,this.props);this.move(Math.min(u,this.props.max))},v.moveDownByStep=function(s){s===void 0&&(s=this.props.step);const o=this.state.value[this.state.index],u=U(this.props.invert&&this.props.orientation==="horizontal"?o+s:o-s,this.props);this.move(Math.max(u,this.props.min))},v.move=function(s){const o=this.state.value.slice(),{index:u}=this.state,{length:f}=o,l=o[u];if(s===l)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:m,max:b,min:x,minDistance:F}=this.props;if(!m){if(u>0){const C=o[u-1];sC-F&&(s=C-F)}}o[u]=s,m&&f>1&&(s>l?(this.pushSucceeding(o,F,u),function(C,oe,ie,ee){for(let H=0;Hae&&(oe[C-1-H]=ae)}}(f,o,F,b)):ss[f+1];f+=1,l=s[f]+o)s[f+1]=W(l,this.props)},v.pushPreceding=function(s,o,u){for(let f=u,l=s[f]-o;s[f-1]!==null&&l=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(o)+1};return u[this.posMinKey()]=s+"px",u},v.buildTrackStyle=function(s,o){const u={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return u[this.posMinKey()]=s,u[this.posMaxKey()]=o,u},v.buildMarkStyle=function(s){var o;return(o={position:"absolute"})[this.posMinKey()]=s,o},v.renderThumbs=function(s){const{length:o}=s,u=[];for(let l=0;lf):typeof s=="number"&&(s=Array.from({length:o}).map((u,f)=>f).filter(u=>u%s==0)),s.map(parseFloat).sort((u,f)=>u-f).map(u=>{const f=this.calcOffset(u),l={key:u,className:this.props.markClassName,style:this.buildMarkStyle(f)};return this.props.renderMark(l)})},v.render=function(){const s=[],{value:o}=this.state,u=o.length;for(let b=0;b{this.slider=b,this.resizeElementRef.current=b},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},f,l,m)},R}(P.Component);we.displayName="ReactSlider",we.defaultProps={min:0,max:100,step:1,pageFn:O=>10*O,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:O=>P.createElement("div",O),renderTrack:O=>P.createElement("div",O),renderMark:O=>P.createElement("span",O)};var Ze=we}}]);})();
//# sourceMappingURL=1255d548-1449.842221ca2db17ab35e17.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy