diff --git a/enferno/admin/templates/admin/activity.html b/enferno/admin/templates/admin/activity.html index 3d9c992fd..57f63bfdc 100644 --- a/enferno/admin/templates/admin/activity.html +++ b/enferno/admin/templates/admin/activity.html @@ -148,7 +148,7 @@ - + diff --git a/enferno/admin/templates/admin/actors.html b/enferno/admin/templates/admin/actors.html index cbd43d099..a5d508f30 100644 --- a/enferno/admin/templates/admin/actors.html +++ b/enferno/admin/templates/admin/actors.html @@ -1,7 +1,7 @@ {% extends 'layout.html' %} {% block css %} - + {% endblock %} {% block content %} @@ -345,7 +345,7 @@ - + diff --git a/enferno/admin/templates/admin/bulletins.html b/enferno/admin/templates/admin/bulletins.html index 0263ef312..ffff3a4e4 100644 --- a/enferno/admin/templates/admin/bulletins.html +++ b/enferno/admin/templates/admin/bulletins.html @@ -1,7 +1,7 @@ {% extends 'layout.html' %} {% block css %} - + @@ -437,7 +437,7 @@ - + diff --git a/enferno/data_import/templates/media-import.html b/enferno/data_import/templates/media-import.html index 534b7ae23..e8a6d771d 100644 --- a/enferno/data_import/templates/media-import.html +++ b/enferno/data_import/templates/media-import.html @@ -1,6 +1,6 @@ {% extends 'layout.html' %} {% block css %} - + @@ -344,7 +344,7 @@ - + diff --git a/enferno/data_import/templates/sheets-import.html b/enferno/data_import/templates/sheets-import.html index f6b114ebf..df89a45d9 100644 --- a/enferno/data_import/templates/sheets-import.html +++ b/enferno/data_import/templates/sheets-import.html @@ -1,6 +1,6 @@ {% extends 'layout.html' %} {% block css %} - + {% endblock %} {% block content %} @@ -824,7 +824,7 @@
{{ _('Event Type') }}
{% block js %} - + diff --git a/enferno/static/css/dropzone.min.css b/enferno/static/css/dropzone.min.css deleted file mode 100644 index 37bc2156d..000000000 --- a/enferno/static/css/dropzone.min.css +++ /dev/null @@ -1 +0,0 @@ -@keyframes passing-through{0%{opacity:0;transform:translateY(40px)}30%,70%{opacity:1;transform:translateY(0px)}100%{opacity:0;transform:translateY(-40px)}}@keyframes slide-in{0%{opacity:0;transform:translateY(40px)}30%{opacity:1;transform:translateY(0px)}}@keyframes pulse{0%{transform:scale(1)}10%{transform:scale(1.1)}20%{transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:1px solid rgba(0,0,0,.8);border-radius:5px;padding:20px 20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-message .dz-button{background:none;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(to bottom, #eee, #ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:#fff}.dropzone .dz-preview.dz-image-preview .dz-details{transition:opacity .2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,.8);background-color:rgba(255,255,255,.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,.4);padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{transform:scale(1.05, 1.05);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px;background:rgba(0,0,0,.8);border-radius:50%}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{display:block;width:54px;height:54px;fill:#fff}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;transition:all .2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:20px;top:50%;margin-top:-10px;left:15%;right:15%;border:3px solid rgba(0,0,0,.8);background:rgba(0,0,0,.8);border-radius:10px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#fff;display:block;position:relative;height:100%;width:0;transition:width 300ms ease-in-out;border-radius:17px}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;transition:opacity .3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#b10606;padding:.5em 1em;color:#fff}.dropzone .dz-preview .dz-error-message:after{content:"";position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #b10606}/*# sourceMappingURL=dropzone.css.map */ diff --git a/enferno/static/js/Sortable.min.js b/enferno/static/js/Sortable.min.js index 95423a649..8148b9dda 100644 --- a/enferno/static/js/Sortable.min.js +++ b/enferno/static/js/Sortable.min.js @@ -1,2 +1,2 @@ -/*! Sortable 1.15.6 - MIT | git://github.com/SortableJS/Sortable.git */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function I(o){for(var t=1;tt.length)&&(e=t.length);for(var n=0,o=new Array(e);n"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function g(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===n)&&f(t,e)||o&&t===n)return t}while(t!==n&&(t=g(t)))}return null}var m,v=/\s+/g;function k(t,e,n){var o;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(o=(" "+t.className+" ").replace(v," ").replace(" "+e+" "," "),t.className=(o+(n?" "+e:"")).replace(v," ")))}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];o[e=!(e in o||-1!==e.indexOf("webkit"))?"-webkit-"+e:e]=n+("string"==typeof n?"":"px")}}function b(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform")}while(o&&"none"!==o&&(n=o+" "+n),!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function D(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=n.left-e&&i<=n.right+e,e=r>=n.top-e&&r<=n.bottom+e;return o&&e?a=t:void 0}}),a);if(e){var n,o={};for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[K]._onDragOver(o)}}var i,r,a}function Ft(t){Z&&Z.parentNode[K]._isOutsideThisEl(t.target)}function jt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[K]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return kt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==jt.supportPointer&&"PointerEvent"in window&&(!u||c),emptyInsertThreshold:5};for(n in z.initializePlugins(this,t,i),i)n in e||(e[n]=i[n]);for(o in Rt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&It,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?h(t,"pointerdown",this._onTapStart):(h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),St.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,A())}function Ht(t,e,n,o,i,r,a,l){var s,c,u=t[K],d=u.options.onMove;return!window.CustomEvent||y||w?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c=d?d.call(u,s,a):c}function Lt(t){t.draggable=!1}function Kt(){xt=!1}function Wt(t){return setTimeout(t,0)}function zt(t){return clearTimeout(t)}jt.prototype={constructor:jt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(vt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(!function(t){Ot.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Ot.push(o)}}(o),!Z&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=P(l,t.draggable,o,!1))&&l.animated||et===l)){if(it=j(l),at=j(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return V({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),U("filter",n,{evt:e}),void(i&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return V({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),U("filter",n,{evt:e}),!0}))return void(i&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;n&&!Z&&n.parentNode===r&&(o=X(n),J=r,$=(Z=n).parentNode,tt=Z.nextSibling,et=n,st=a.group,ut={target:jt.dragged=Z,clientX:(e||t).clientX,clientY:(e||t).clientY},ft=ut.clientX-o.left,gt=ut.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Z.style["will-change"]="all",o=function(){U("delayEnded",i,{evt:t}),jt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!s&&i.nativeDraggable&&(Z.draggable=!0),i._triggerDragStart(t,e),V({sortable:i,name:"choose",originalEvent:t}),k(Z,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){D(Z,t.trim(),Lt)}),h(l,"dragover",Bt),h(l,"mousemove",Bt),h(l,"touchmove",Bt),a.supportPointer?(h(l,"pointerup",i._onDrop),this.nativeDraggable||h(l,"pointercancel",i._onDrop)):(h(l,"mouseup",i._onDrop),h(l,"touchend",i._onDrop),h(l,"touchcancel",i._onDrop)),s&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),U("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||y)?o():jt.eventCanceled?this._onDrop():(a.supportPointer?(h(l,"pointerup",i._disableDelayedDrag),h(l,"pointercancel",i._disableDelayedDrag)):(h(l,"mouseup",i._disableDelayedDrag),h(l,"touchend",i._disableDelayedDrag),h(l,"touchcancel",i._disableDelayedDrag)),h(l,"mousemove",i._delayedDragTouchMoveHandler),h(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&h(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Lt(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._disableDelayedDrag),p(t,"touchend",this._disableDelayedDrag),p(t,"touchcancel",this._disableDelayedDrag),p(t,"pointerup",this._disableDelayedDrag),p(t,"pointercancel",this._disableDelayedDrag),p(t,"mousemove",this._delayedDragTouchMoveHandler),p(t,"touchmove",this._delayedDragTouchMoveHandler),p(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?h(document,"pointermove",this._onTouchMove):h(document,e?"touchmove":"mousemove",this._onTouchMove):(h(Z,"dragend",this),h(J,"dragstart",this._onDragStart));try{document.selection?Wt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;Dt=!1,J&&Z?(U("dragStarted",this,{evt:e}),this.nativeDraggable&&h(document,"dragover",Ft),n=this.options,t||k(Z,n.dragClass,!1),k(Z,n.ghostClass,!0),jt.active=this,t&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Xt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(Z.parentNode[K]._isOutsideThisEl(t),e)do{if(e[K])if(e[K]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=g(t=e));Yt()}},_onTouchMove:function(t){if(ut){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Q&&b(Q,!0),a=Q&&r&&r.a,l=Q&&r&&r.d,e=At&&wt&&E(wt),a=(i.clientX-ut.clientX+o.x)/(a||1)+(e?e[0]-Tt[0]:0)/(a||1),l=(i.clientY-ut.clientY+o.y)/(l||1)+(e?e[1]-Tt[1]:0)/(l||1);if(!jt.active&&!Dt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))E.right+10||S.clientY>x.bottom&&S.clientX>x.left:S.clientY>E.bottom+10||S.clientX>x.right&&S.clientY>x.top)||m.animated)){if(m&&(t=n,e=r,C=X(B((_=this).el,0,_.options,!0)),_=L(_.el,_.options,Q),e?t.clientX<_.left-10||t.clientYt.length)&&(e=t.length);for(var n=0,o=Array(e);n"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function m(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===n)&&g(t,e)||o&&t===n)return t}while(t!==n&&(t=m(t)))}return null}var v,b=/\s+/g;function k(t,e,n){var o;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(o=(" "+t.className+" ").replace(b," ").replace(" "+e+" "," "),t.className=(o+(n?" "+e:"")).replace(b," ")))}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];o[e=!(e in o||-1!==e.indexOf("webkit"))?"-webkit-"+e:e]=n+("string"==typeof n?"":"px")}}function D(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform")}while(o&&"none"!==o&&(n=o+" "+n),!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function E(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=n.left-e&&i<=n.right+e,e=r>=n.top-e&&r<=n.bottom+e;return o&&e?a=t:void 0}}),a);if(e){var n,o={};for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[K]._onDragOver(o)}}var i,r,a}function jt(t){$&&$.parentNode[K]._isOutsideThisEl(t.target)}function Ht(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[K]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Rt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ht.supportPointer&&"PointerEvent"in window&&(!u||d),emptyInsertThreshold:5};for(n in G.initializePlugins(this,t,i),i)n in e||(e[n]=i[n]);for(o in Xt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?f(t,"pointerdown",this._onTapStart):(f(t,"mousedown",this._onTapStart),f(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(f(t,"dragover",this),f(t,"dragenter",this)),_t.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,N())}function Lt(t,e,n,o,i,r,a,l){var s,c,u=t[K],d=u.options.onMove;return!window.CustomEvent||y||w?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c=d?d.call(u,s,a):c}function Kt(t){t.draggable=!1}function Wt(){Ot=!1}function zt(t){return setTimeout(t,0)}function Gt(t){return clearTimeout(t)}Ht.prototype={constructor:Ht,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,$):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(!function(t){Mt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Mt.push(o)}}(o),!$&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=P(l,t.draggable,o,!1))&&l.animated||nt===l)){if(rt=j(l),lt=j(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return Z({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),q("filter",n,{evt:e}),void(i&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return Z({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),q("filter",n,{evt:e}),!0}))return void(i&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;n&&!$&&n.parentNode===r&&(o=X(n),tt=r,Q=($=n).parentNode,et=$.nextSibling,nt=n,ct=a.group,dt={target:Ht.dragged=$,clientX:(e||t).clientX,clientY:(e||t).clientY},gt=dt.clientX-o.left,mt=dt.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,$.style["will-change"]="all",o=function(){q("delayEnded",i,{evt:t}),Ht.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!c&&i.nativeDraggable&&($.draggable=!0),i._triggerDragStart(t,e),Z({sortable:i,name:"choose",originalEvent:t}),k($,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){E($,t.trim(),Kt)}),f(l,"dragover",Ft),f(l,"mousemove",Ft),f(l,"touchmove",Ft),a.supportPointer?(f(l,"pointerup",i._onDrop),this.nativeDraggable||f(l,"pointercancel",i._onDrop)):(f(l,"mouseup",i._onDrop),f(l,"touchend",i._onDrop),f(l,"touchcancel",i._onDrop)),c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$.draggable=!0),q("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||y)?o():Ht.eventCanceled?this._onDrop():(a.supportPointer?(f(l,"pointerup",i._disableDelayedDrag),f(l,"pointercancel",i._disableDelayedDrag)):(f(l,"mouseup",i._disableDelayedDrag),f(l,"touchend",i._disableDelayedDrag),f(l,"touchcancel",i._disableDelayedDrag)),f(l,"mousemove",i._delayedDragTouchMoveHandler),f(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&f(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$&&Kt($),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._disableDelayedDrag),p(t,"touchend",this._disableDelayedDrag),p(t,"touchcancel",this._disableDelayedDrag),p(t,"pointerup",this._disableDelayedDrag),p(t,"pointercancel",this._disableDelayedDrag),p(t,"mousemove",this._delayedDragTouchMoveHandler),p(t,"touchmove",this._delayedDragTouchMoveHandler),p(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?f(document,"pointermove",this._onTouchMove):f(document,e?"touchmove":"mousemove",this._onTouchMove):(f($,"dragend",this),f(tt,"dragstart",this._onDragStart));try{document.selection?zt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;Et=!1,tt&&$?(q("dragStarted",this,{evt:e}),this.nativeDraggable&&f(document,"dragover",jt),n=this.options,t||k($,n.dragClass,!1),k($,n.ghostClass,!0),Ht.active=this,t&&this._appendGhost(),Z({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Yt();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==e;)e=t;if($.parentNode[K]._isOutsideThisEl(t),e)do{if(e[K])if(e[K]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=m(t=e));Bt()}},_onTouchMove:function(t){if(dt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=J&&D(J,!0),a=J&&r&&r.a,l=J&&r&&r.d,e=Nt&&Dt&&S(Dt),a=(i.clientX-dt.clientX+o.x)/(a||1)+(e?e[0]-xt[0]:0)/(a||1),l=(i.clientY-dt.clientY+o.y)/(l||1)+(e?e[1]-xt[1]:0)/(l||1);if(!Ht.active&&!Et){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))E.right+10||S.clientY>x.bottom&&S.clientX>x.left:S.clientY>E.bottom+10||S.clientX>x.right&&S.clientY>x.top)||m.animated)){if(m&&(t=n,e=r,C=X(B((_=this).el,0,_.options,!0)),_=L(_.el,_.options,J),e?t.clientX<_.left-10||t.clientYe.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n3?(o=h===r)&&(s=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&pr||r>h)&&(i[4]=n,i[5]=r,d.n=h,u=0))}if(o||n>1)return a;throw l=!0,r}return function(o,f,h){if(c>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,h),u=f,s=h;(t=u<2?e:s)||!l;){i||(u?u<3?(u>1&&(d.n=-1),p(u,s)):d.n=s:d.v=s);try{if(c=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(l=d.n<0)?s:n.call(r,d))!==a)break}catch(t){i=e,u=1,s=t}finally{c=1}}return{value:t,done:l}}}(n,o,i),!0),c}var a={};function u(){}function s(){}function c(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(g(t={},r,function(){return this}),t),l=c.prototype=u.prototype=Object.create(f);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,g(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return s.prototype=c,g(l,"constructor",c),g(c,"constructor",s),s.displayName="GeneratorFunction",g(c,o,"GeneratorFunction"),g(l),g(l,o,"Generator"),g(l,r,function(){return this}),g(l,"toString",function(){return"[object Generator]"}),(m=function(){return{w:i,m:d}})()}function g(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}g=function(e,t,n,r){function i(t,n){g(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},g(e,t,n,r)}function w(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function A(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function T(e){return function(){return new j(e.apply(this,arguments))}}function j(t){var n,r;function o(n,r){try{var a=t[n](r),u=a.value,s=u instanceof e;Promise.resolve(s?u.v:u).then(function(e){if(s){var r="return"===n?"return":"next";if(!u.k||e.done)return o(r,e);e=t[r](e).value}i(a.done?"return":"normal",e)},function(e){o("throw",e)})}catch(e){i("throw",e)}}function i(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(i,a){var u={key:e,arg:t,resolve:i,reject:a,next:null};r?r=r.next=u:(n=r=u,o(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}function P(e){var t="function"==typeof Map?new Map:void 0;return P=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&O(o,n.prototype),o}(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,e)},P(e)}function k(e,t){return function(){return e.apply(t,arguments)}}j.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},j.prototype.next=function(e){return this._invoke("next",e)},j.prototype.throw=function(e){return this._invoke("throw",e)},j.prototype.return=function(e){return this._invoke("return",e)};var x,C=Object.prototype.toString,N=Object.getPrototypeOf,D=Symbol.iterator,U=Symbol.toStringTag,F=(x=Object.create(null),function(e){var t=C.call(e);return x[t]||(x[t]=t.slice(8,-1).toLowerCase())}),L=function(e){return e=e.toLowerCase(),function(t){return F(t)===e}},B=function(e){return function(t){return _(t)===e}},I=Array.isArray,q=B("undefined");function M(e){return null!==e&&!q(e)&&null!==e.constructor&&!q(e.constructor)&&J(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var z=L("ArrayBuffer");var H=B("string"),J=B("function"),W=B("number"),K=function(e){return null!==e&&"object"===_(e)},V=function(e){if("object"!==F(e))return!1;var t=N(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||U in e||D in e)},X=L("Date"),G=L("File"),$=L("Blob"),Q=L("FileList");var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Z=void 0!==Y.FormData?Y.FormData:void 0,ee=L("URLSearchParams"),te=E(["ReadableStream","Request","Response","Headers"].map(L),4),ne=te[0],re=te[1],oe=te[2],ie=te[3];function ae(e,t){var n,r,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,i=void 0!==o&&o;if(null!=e)if("object"!==_(e)&&(e=[e]),I(e))for(n=0,r=e.length;n0;)if(t===(n=r[o]).toLowerCase())return n;return null}var se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ce=function(e){return!q(e)&&e!==se};var fe,le=(fe="undefined"!=typeof Uint8Array&&N(Uint8Array),function(e){return fe&&e instanceof fe}),de=L("HTMLFormElement"),pe=function(){var e=Object.prototype.hasOwnProperty;return function(t,n){return e.call(t,n)}}(),he=L("RegExp"),ye=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};ae(n,function(n,o){var i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};var ve,be,me,ge,we=L("AsyncFunction"),Oe=(ve="function"==typeof setImmediate,be=J(se.postMessage),ve?setImmediate:be?(me="axios@".concat(Math.random()),ge=[],se.addEventListener("message",function(e){var t=e.source,n=e.data;t===se&&n===me&&ge.length&&ge.shift()()},!1),function(e){ge.push(e),se.postMessage(me,"*")}):function(e){return setTimeout(e)}),Ee="undefined"!=typeof queueMicrotask?queueMicrotask.bind(se):"undefined"!=typeof process&&process.nextTick||Oe,Re={isArray:I,isArrayBuffer:z,isBuffer:M,isFormData:function(e){if(!e)return!1;if(Z&&e instanceof Z)return!0;var t=N(e);if(!t||t===Object.prototype)return!1;if(!J(e.append))return!1;var n=F(e);return"formdata"===n||"object"===n&&J(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&z(e.buffer)},isString:H,isNumber:W,isBoolean:function(e){return!0===e||!1===e},isObject:K,isPlainObject:V,isEmptyObject:function(e){if(!K(e)||M(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ne,isRequest:re,isResponse:oe,isHeaders:ie,isUndefined:q,isDate:X,isFile:G,isReactNativeBlob:function(e){return!(!e||void 0===e.uri)},isReactNative:function(e){return e&&void 0!==e.getParts},isBlob:$,isRegExp:he,isFunction:J,isStream:function(e){return K(e)&&J(e.pipe)},isURLSearchParams:ee,isTypedArray:le,isFileList:Q,forEach:ae,merge:function e(){for(var t=ce(this)&&this||{},n=t.caseless,r=t.skipUndefined,o={},i=function(t,i){if("__proto__"!==i&&"constructor"!==i&&"prototype"!==i){var a=n&&ue(o,i)||i,u=pe(o,a)?o[a]:void 0;V(u)&&V(t)?o[a]=e(u,t):V(t)?o[a]=e({},t):I(t)?o[a]=t.slice():r&&q(t)||(o[a]=t)}},a=arguments.length,u=new Array(a),s=0;s3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,u={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==n&&N(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:F,kindOfTest:L,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(I(e))return e;var t=e.length;if(!W(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[D]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:de,hasOwnProperty:pe,hasOwnProp:pe,reduceDescriptors:ye,freezeMethods:function(e){ye(e,function(t,n){if(J(e)&&["arguments","caller","callee"].includes(n))return!1;var r=e[n];J(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:function(e,t){var n={},r=function(e){e.forEach(function(e){n[e]=!0})};return I(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:ue,global:se,isContextDefined:ce,isSpecCompliantForm:function(e){return!!(e&&J(e.append)&&"FormData"===e[U]&&e[D])},toJSONObject:function(e){var t=new Array(10),n=function(e,r){if(K(e)){if(t.indexOf(e)>=0)return;if(M(e))return e;if(!("toJSON"in e)){t[r]=e;var o=I(e)?[]:{};return ae(e,function(e,t){var i=n(e,r+1);!q(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:we,isThenable:function(e){return e&&(K(e)||J(e))&&J(e.then)&&J(e.catch)},setImmediate:Oe,asap:Ee,isIterable:function(e){return null!=e&&J(e[D])}},Se=Re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_e=Symbol("internals"),Ae=/[^\x09\x20-\x7E\x80-\xFF]/g;function Te(e){return e&&String(e).trim().toLowerCase()}function je(e){return!1===e||null==e?e:Re.isArray(e)?e.map(je):function(e){for(var t=0,n=e.length;tt;){var o=e.charCodeAt(n-1);if(9!==o&&32!==o)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(Ae,""))}function Pe(e,t,n,r,o){return Re.isFunction(r)?r.call(this,t,n):(o&&(t=n),Re.isString(t)?Re.isString(r)?-1!==t.indexOf(r):Re.isRegExp(r)?r.test(t):void 0:void 0)}var ke=function(){return l(function e(t){c(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=Te(t);if(!o)throw new Error("header name must be a non-empty string");var i=Re.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=je(e))}var i=function(e,t){return Re.forEach(e,function(e,n){return o(e,n,t)})};if(Re.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Re.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i(function(e){var t,n,r,o={};return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||o[t]&&Se[t]||("set-cookie"===t?o[t]?o[t].push(n):o[t]=[n]:o[t]=o[t]?o[t]+", "+n:n)}),o}(e),t);else if(Re.isObject(e)&&Re.isIterable(e)){var a,u,s,c={},f=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=A(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(e);try{for(f.s();!(s=f.n()).done;){var l=s.value;if(!Re.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[u=l[0]]=(a=c[u])?Re.isArray(a)?[].concat(R(a),[l[1]]):[a,l[1]]:l[1]}}catch(e){f.e(e)}finally{f.f()}i(c,t)}else null!=e&&o(t,e,n);return this}},{key:"get",value:function(e,t){if(e=Te(e)){var n=Re.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(Re.isFunction(t))return t.call(this,r,n);if(Re.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Te(e)){var n=Re.findKey(this,e);return!(!n||void 0===this[n]||t&&!Pe(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=Te(e)){var o=Re.findKey(n,e);!o||t&&!Pe(0,n[o],o,t)||(delete n[o],r=!0)}}return Re.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!Pe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return Re.forEach(this,function(r,o){var i=Re.findKey(n,o);if(i)return t[i]=je(r),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})}(o):String(o).trim();a!==o&&delete t[o],t[a]=je(r),n[a]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r1?n-1:0),o=1;o0?xe(e,t):Re.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}}],[{key:"from",value:function(e,n,r,o,i,a){var u=new t(e.message,n||e.code,r,o,i);return u.cause=e,u.name=e.name,null!=e.status&&null==u.status&&(u.status=e.status),a&&Object.assign(u,a),u}}])}(P(Error));Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ce.ERR_BAD_OPTION="ERR_BAD_OPTION",Ce.ECONNABORTED="ECONNABORTED",Ce.ETIMEDOUT="ETIMEDOUT",Ce.ECONNREFUSED="ECONNREFUSED",Ce.ERR_NETWORK="ERR_NETWORK",Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ce.ERR_DEPRECATED="ERR_DEPRECATED",Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ce.ERR_CANCELED="ERR_CANCELED",Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ce.ERR_INVALID_URL="ERR_INVALID_URL",Ce.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function Ne(e){return Re.isPlainObject(e)||Re.isArray(e)}function De(e){return Re.endsWith(e,"[]")?e.slice(0,-2):e}function Ue(e,t,n){return e?e.concat(t).map(function(e,t){return e=De(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var Fe=Re.toFlatObject(Re,{},null,function(e){return/^is[A-Z]/.test(e)});function Le(e,t,n){if(!Re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=Re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Re.isUndefined(t[e])})).metaTokens,o=n.visitor||l,i=n.dots,a=n.indexes,u=n.Blob||"undefined"!=typeof Blob&&Blob,s=void 0===n.maxDepth?100:n.maxDepth,c=u&&Re.isSpecCompliantForm(t);if(!Re.isFunction(o))throw new TypeError("visitor must be a function");function f(e){if(null===e)return"";if(Re.isDate(e))return e.toISOString();if(Re.isBoolean(e))return e.toString();if(!c&&Re.isBlob(e))throw new Ce("Blob is not supported. Use a Buffer instead.");return Re.isArrayBuffer(e)||Re.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){var u=e;if(Re.isReactNative(t)&&Re.isReactNativeBlob(e))return t.append(Ue(o,n,i),f(e)),!1;if(e&&!o&&"object"===_(e))if(Re.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Re.isArray(e)&&function(e){return Re.isArray(e)&&!e.some(Ne)}(e)||(Re.isFileList(e)||Re.endsWith(n,"[]"))&&(u=Re.toArray(e)))return n=De(n),u.forEach(function(e,r){!Re.isUndefined(e)&&null!==e&&t.append(!0===a?Ue([n],r,i):null===a?n:n+"[]",f(e))}),!1;return!!Ne(e)||(t.append(Ue(o,n,i),f(e)),!1)}var d=[],p=Object.assign(Fe,{defaultVisitor:l,convertValue:f,isVisitable:Ne});if(!Re.isObject(e))throw new TypeError("data must be an object");return function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!Re.isUndefined(n)){if(i>s)throw new Ce("Object is too deeply nested ("+i+" levels). Max depth: "+s,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),Re.forEach(n,function(n,a){!0===(!(Re.isUndefined(n)||null===n)&&o.call(t,n,Re.isString(a)?a.trim():a,r,p))&&e(n,r?r.concat(a):[a],i+1)}),d.pop()}}(e),t}function Be(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Ie(e,t){this._pairs=[],e&&Le(e,this,t)}var qe=Ie.prototype;function Me(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ze(e,t,n){if(!t)return e;var r,o=n&&n.encode||Me,i=Re.isFunction(n)?{serialize:n}:n,a=i&&i.serialize;if(r=a?a(t,i):Re.isURLSearchParams(t)?t.toString():new Ie(t,i).toString(o)){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}qe.append=function(e,t){this._pairs.push([e,t])},qe.toString=function(e){var t=e?function(t){return e.call(this,t,Be)}:Be;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var He=function(){return l(function e(){c(this,e),this.handlers=[]},[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){Re.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),Je={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},We={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ke="undefined"!=typeof window&&"undefined"!=typeof document,Ve="object"===("undefined"==typeof navigator?"undefined":_(navigator))&&navigator||void 0,Xe=Ke&&(!Ve||["ReactNative","NativeScript","NS"].indexOf(Ve.product)<0),Ge="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,$e=Ke&&window.location.href||"http://localhost",Qe=b(b({},Object.freeze({__proto__:null,hasBrowserEnv:Ke,hasStandardBrowserEnv:Xe,hasStandardBrowserWebWorkerEnv:Ge,navigator:Ve,origin:$e})),We);function Ye(e){function t(e,n,r,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),u=o>=e.length;return i=!i&&Re.isArray(r)?r.length:i,u?(Re.hasOwnProp(r,i)?r[i]=Re.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!a):(r[i]&&Re.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Re.isArray(r[i])&&(r[i]=function(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t-1,i=Re.isObject(e);if(i&&Re.isHTMLForm(e)&&(e=new FormData(e)),Re.isFormData(e))return o?JSON.stringify(Ye(e)):e;if(Re.isArrayBuffer(e)||Re.isBuffer(e)||Re.isStream(e)||Re.isFile(e)||Re.isBlob(e)||Re.isReadableStream(e))return e;if(Re.isArrayBufferView(e))return e.buffer;if(Re.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){var a=Ze(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Le(e,new Qe.classes.URLSearchParams,b({visitor:function(e,t,n,r){return Qe.isNode&&Re.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,a).toString();if((n=Re.isFileList(e))||r.indexOf("multipart/form-data")>-1){var u=Ze(this,"env"),s=u&&u.FormData;return Le(n?{"files[]":e}:e,s&&new s,a)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(Re.isString(e))try{return(t||JSON.parse)(e),Re.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=Ze(this,"transitional")||et.transitional,n=t&&t.forcedJSONParsing,r=Ze(this,"responseType"),o="json"===r;if(Re.isResponse(e)||Re.isReadableStream(e))return e;if(e&&Re.isString(e)&&(n&&!r||o)){var i=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,Ze(this,"parseReviver"))}catch(e){if(i){if("SyntaxError"===e.name)throw Ce.from(e,Ce.ERR_BAD_RESPONSE,this,null,Ze(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qe.classes.FormData,Blob:Qe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function tt(e,t){var n=this||et,r=t||n,o=ke.from(r.headers),i=r.data;return Re.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function nt(e){return!(!e||!e.__CANCEL__)}Re.forEach(["delete","get","head","post","put","patch","query"],function(e){et.headers[e]={}});var rt=function(e){function t(e,n,r){var o;return c(this,t),(o=s(this,t,[null==e?"canceled":e,Ce.ERR_CANCELED,n,r])).name="CanceledError",o.__CANCEL__=!0,o}return h(t,e),l(t)}(Ce);function ot(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ce("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ce.ERR_BAD_REQUEST:Ce.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}var it=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0,o=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(u){var s=Date.now(),c=o[a];n||(n=s),r[i]=u,o[i]=s;for(var f=a,l=0;f!==i;)l+=r[f++],f%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(s-n1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(void 0,R(t))};return[function(){for(var e=Date.now(),t=e-o,u=arguments.length,s=new Array(u),c=0;c=i?a(s,e):(n=s,r||(r=setTimeout(function(){r=null,a(n)},i-t)))},function(){return n&&a(n)}]}(function(n){var i=n.loaded,a=n.lengthComputable?n.total:void 0,u=null!=a?Math.min(i,a):i,s=Math.max(0,u-r),c=o(s);r=Math.max(r,u);var f=d({loaded:u,total:a,progress:a?u/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a?(a-u)/c:void 0,event:n,lengthComputable:null!=a},t?"download":"upload",!0);e(f)},n)},at=function(e,t){var n=null!=e;return[function(r){return t[0]({lengthComputable:n,total:e,loaded:r})},t[1]]},ut=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102)&&(s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102)&&(o-=2,a+=2)}var c=0,f=i-1,l=function(e){return e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e))};f>=0&&(61===r.charCodeAt(f)?(c++,f--):l(f)&&(c++,f-=3)),1===c&&f>=0&&(61===r.charCodeAt(f)||l(f))&&c++;var d=3*Math.floor(o/4)-(c||0);return d>0?d:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(r,"utf8");for(var p=0,h=0,y=r.length;h=55296&&v<=56319&&h+1=56320&&b<=57343?(p+=4,h++):p+=3}else p+=3}return p}var Et="1.16.0",Rt=Re.isFunction,St=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r-1,x=Re.isNumber(P)&&P>-1,C=u||fetch,O=O?(O+"").toLowerCase():"text",N=vt([f,d&&d.toAbortSignal()],p),D=null,U=N&&N.unsubscribe&&function(){N.unsubscribe()},e.p=1,!k||"string"!=typeof r||!r.startsWith("data:")){e.n=2;break}if(!(Ot(r)>j)){e.n=2;break}throw new Ce("maxContentLength size of "+j+" exceeded",Ce.ERR_BAD_RESPONSE,t,D);case 2:if(!x||"get"===i||"head"===i){e.n=4;break}return e.n=3,R(S,a);case 3:if(!("number"==typeof(L=e.v)&&isFinite(L)&&L>P)){e.n=4;break}throw new Ce("Request body larger than maxBodyLength limit",Ce.ERR_BAD_REQUEST,t,D);case 4:if(!(ae=y&&v&&"get"!==i&&"head"!==i)){e.n=6;break}return e.n=5,R(S,a);case 5:ue=F=e.v,ae=0!==ue;case 6:if(!ae){e.n=7;break}B=new s(r,{method:"POST",body:a,duplex:"half"}),Re.isFormData(a)&&(I=B.headers.get("content-type"))&&S.setContentType(I),B.body&&(q=at(F,it(ut(y))),M=E(q,2),z=M[0],H=M[1],a=wt(B.body,65536,z,H));case 7:return Re.isString(A)||(A=A?"include":"omit"),J=l&&"credentials"in s.prototype,Re.isFormData(a)&&(W=S.getContentType())&&/^multipart\/form-data/i.test(W)&&!/boundary=/i.test(W)&&S.delete("content-type"),S.set("User-Agent","axios/"+Et,!1),K=b(b({},T),{},{signal:N,method:i.toUpperCase(),headers:S.normalize().toJSON(),body:a,duplex:"half",credentials:J?A:void 0}),D=l&&new s(r,K),e.n=8,l?C(D,T):C(r,K);case 8:if(V=e.v,!k){e.n=9;break}if(!(null!=(X=Re.toFiniteNumber(V.headers.get("content-length")))&&X>j)){e.n=9;break}throw new Ce("maxContentLength size of "+j+" exceeded",Ce.ERR_BAD_RESPONSE,t,D);case 9:return G=g&&("stream"===O||"response"===O),g&&V.body&&(h||k||G&&U)&&($={},["status","statusText","headers"].forEach(function(e){$[e]=V[e]}),Q=Re.toFiniteNumber(V.headers.get("content-length")),Y=h&&at(Q,it(ut(h),!0))||[],Z=E(Y,2),ee=Z[0],te=Z[1],ne=function(e){if(k&&e>j)throw new Ce("maxContentLength size of "+j+" exceeded",Ce.ERR_BAD_RESPONSE,t,D);ee&&ee(e)},V=new c(wt(V.body,65536,ne,function(){te&&te(),U&&U()}),$)),O=O||"text",e.n=10,w[Re.findKey(w,O)||"text"](V,t);case 10:if(re=e.v,!k||g||G){e.n=11;break}if(null!=re&&("number"==typeof re.byteLength?oe=re.byteLength:"number"==typeof re.size?oe=re.size:"string"==typeof re&&(oe="function"==typeof o?(new o).encode(re).byteLength:re.length)),!("number"==typeof oe&&oe>j)){e.n=11;break}throw new Ce("maxContentLength size of "+j+" exceeded",Ce.ERR_BAD_RESPONSE,t,D);case 11:return!G&&U&&U(),e.n=12,new Promise(function(e,n){ot(e,n,{data:re,headers:ke.from(V.headers),status:V.status,statusText:V.statusText,config:t,request:D})});case 12:return e.a(2,e.v);case 13:if(e.p=13,se=e.v,U&&U(),!(N&&N.aborted&&N.reason instanceof Ce)){e.n=14;break}throw(ie=N.reason).config=t,D&&(ie.request=D),se!==ie&&(ie.cause=se),ie;case 14:if(!se||"TypeError"!==se.name||!/Load failed|fetch/i.test(se.message)){e.n=15;break}throw Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,t,D,se&&se.response),{cause:se.cause||se});case 15:throw Ce.from(se,se&&se.code,t,D,se&&se.response);case 16:return e.a(2)}},e,null,[[1,13]])}));return function(t){return e.apply(this,arguments)}}()},At=new Map,Tt=function(e){for(var t,n,r=e&&e.env||{},o=r.fetch,i=[r.Request,r.Response,o],a=i.length,u=At;a--;)t=i[a],void 0===(n=u.get(t))&&u.set(t,n=a?new Map:_t(r)),u=n;return n};Tt();var jt={http:null,xhr:yt,fetch:{get:Tt}};Re.forEach(jt,function(e,t){if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Pt=function(e){return"- ".concat(e)},kt=function(e){return Re.isFunction(e)||null===e||!1===e};var xt={getAdapter:function(e,t){for(var n,r,o=(e=Re.isArray(e)?e:[e]).length,i={},a=0;a1?"since :\n"+s.map(Pt).join("\n"):" "+Pt(s[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return r},adapters:jt};function Ct(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rt(null,e)}function Nt(e){return Ct(e),e.headers=ke.from(e.headers),e.data=tt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xt.getAdapter(e.adapter||et.adapter,e)(e).then(function(t){Ct(e),e.response=t;try{t.data=tt.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=ke.from(t.headers),t},function(t){if(!nt(t)&&(Ct(e),t&&t.response)){e.response=t.response;try{t.response.data=tt.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=ke.from(t.response.headers)}return Promise.reject(t)})}var Dt={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Dt[e]=function(n){return _(n)===e||"a"+(t<1?"n ":" ")+e}});var Ut={};Dt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Et+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new Ce(r(o," has been removed"+(t?" in "+t:"")),Ce.ERR_DEPRECATED);return t&&!Ut[o]&&(Ut[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Dt.spelling=function(e){return function(t,n){return console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0}};var Ft={assertOptions:function(e,t,n){if("object"!==_(e))throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){var u=e[i],s=void 0===u||a(u,i,e);if(!0!==s)throw new Ce("option "+i+" must be "+s,Ce.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ce("Unknown option "+i,Ce.ERR_BAD_OPTION)}},validators:Dt},Lt=Ft.validators,Bt=function(){return l(function e(t){c(this,e),this.defaults=t||{},this.interceptors={request:new He,response:new He}},[{key:"request",value:(e=a(m().m(function e(t,n){var r,o,i,a,u,s;return m().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,n);case 1:return e.a(2,e.v);case 2:if(e.p=2,(s=e.v)instanceof Error){r={},Error.captureStackTrace?Error.captureStackTrace(r):r=new Error,o=function(){if(!r.stack)return"";var e=r.stack.indexOf("\n");return-1===e?"":r.stack.slice(e+1)}();try{s.stack?o&&(i=o.indexOf("\n"),a=-1===i?-1:o.indexOf("\n",i+1),u=-1===a?"":o.slice(a+1),String(s.stack).endsWith(u)||(s.stack+="\n"+o)):s.stack=o}catch(e){}}throw s;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,n){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=dt(this.defaults,t),r=n.transitional,o=n.paramsSerializer,i=n.headers;void 0!==r&&Ft.assertOptions(r,{silentJSONParsing:Lt.transitional(Lt.boolean),forcedJSONParsing:Lt.transitional(Lt.boolean),clarifyTimeoutError:Lt.transitional(Lt.boolean),legacyInterceptorReqResOrdering:Lt.transitional(Lt.boolean)},!1),null!=o&&(Re.isFunction(o)?t.paramsSerializer={serialize:o}:Ft.assertOptions(o,{encode:Lt.function,serialize:Lt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ft.assertOptions(t,{baseUrl:Lt.spelling("baseURL"),withXsrfToken:Lt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&Re.merge(i.common,i[t.method]);i&&Re.forEach(["delete","get","head","post","put","patch","query","common"],function(e){delete i[e]}),t.headers=ke.concat(a,i);var u=[],s=!0;this.interceptors.request.forEach(function(e){if("function"!=typeof e.runWhen||!1!==e.runWhen(t)){s=s&&e.synchronous;var n=t.transitional||Je;n&&n.legacyInterceptorReqResOrdering?u.unshift(e.fulfilled,e.rejected):u.push(e.fulfilled,e.rejected)}});var c,f=[];this.interceptors.response.forEach(function(e){f.push(e.fulfilled,e.rejected)});var l,d=0;if(!s){var p=[Nt.bind(this),void 0];for(p.unshift.apply(p,u),p.push.apply(p,f),l=p.length,c=Promise.resolve(t);d0;)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t(function(e,t,o){r.reason||(r.reason=new rt(e,t,o),n(r.reason))})}return l(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,n=function(e){t.abort(e)};return this.subscribe(n),t.signal.unsubscribe=function(){return e.unsubscribe(n)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}();var qt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(qt).forEach(function(e){var t=E(e,2),n=t[0],r=t[1];qt[r]=n});var Mt=function e(t){var n=new Bt(t),r=k(Bt.prototype.request,n);return Re.extend(r,Bt.prototype,n,{allOwnKeys:!0}),Re.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(dt(t,n))},r}(et);return Mt.Axios=Bt,Mt.CanceledError=rt,Mt.CancelToken=It,Mt.isCancel=nt,Mt.VERSION=Et,Mt.toFormData=Le,Mt.AxiosError=Ce,Mt.Cancel=Mt.CanceledError,Mt.all=function(e){return Promise.all(e)},Mt.spread=function(e){return function(t){return e.apply(null,t)}},Mt.isAxiosError=function(e){return Re.isObject(e)&&!0===e.isAxiosError},Mt.mergeConfig=dt,Mt.AxiosHeaders=ke,Mt.formToJSON=function(e){return Ye(Re.isHTMLForm(e)?new FormData(e):e)},Mt.getAdapter=xt.getAdapter,Mt.HttpStatusCode=qt,Mt.default=Mt,Mt}); +var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var s=r&&r.prototype instanceof u?r:u,c=Object.create(s.prototype);return g(c,"_invoke",function(n,r,o){var i,u,s,c=0,f=o||[],l=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,u=0,s=e,d.n=n,a}};function p(n,r){for(u=n,s=r,t=0;!l&&c&&!o&&t3?(o=h===r)&&(s=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&pr||r>h)&&(i[4]=n,i[5]=r,d.n=h,u=0))}if(o||n>1)return a;throw l=!0,r}return function(o,f,h){if(c>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,h),u=f,s=h;(t=u<2?e:s)||!l;){i||(u?u<3?(u>1&&(d.n=-1),p(u,s)):d.n=s:d.v=s);try{if(c=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(l=d.n<0)?s:n.call(r,d))!==a)break}catch(t){i=e,u=1,s=t}finally{c=1}}return{value:t,done:l}}}(n,o,i),!0),c}var a={};function u(){}function s(){}function c(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(g(t={},r,function(){return this}),t),l=c.prototype=u.prototype=Object.create(f);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,g(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return s.prototype=c,g(l,"constructor",c),g(c,"constructor",s),s.displayName="GeneratorFunction",g(c,o,"GeneratorFunction"),g(l),g(l,o,"Generator"),g(l,r,function(){return this}),g(l,"toString",function(){return"[object Generator]"}),(m=function(){return{w:i,m:d}})()}function g(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}g=function(e,t,n,r){function i(t,n){g(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},g(e,t,n,r)}function w(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function A(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function P(e){return function(){return new T(e.apply(this,arguments))}}function T(t){var n,r;function o(n,r){try{var a=t[n](r),u=a.value,s=u instanceof e;Promise.resolve(s?u.v:u).then(function(e){if(s){var r="return"===n&&u.k?n:"next";if(!u.k||e.done)return o(r,e);e=t[r](e).value}i(!!a.done,e)},function(e){o("throw",e)})}catch(e){i(2,e)}}function i(e,t){2===e?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(i,a){var u={key:e,arg:t,resolve:i,reject:a,next:null};r?r=r.next=u:(n=r=u,o(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}function j(e){var t="function"==typeof Map?new Map:void 0;return j=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(v())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&O(o,n.prototype),o}(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),O(n,e)},j(e)}function k(e,t){return function(){return e.apply(t,arguments)}}T.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},T.prototype.next=function(e){return this._invoke("next",e)},T.prototype.throw=function(e){return this._invoke("throw",e)},T.prototype.return=function(e){return this._invoke("return",e)};var C,x=Object.prototype.toString,N=Object.getPrototypeOf,U=Symbol.iterator,D=Symbol.toStringTag,L=function(){var e=Object.prototype.hasOwnProperty;return function(t,n){return e.call(t,n)}}(),F=function(e,t){for(var n=e,r=[];null!=n&&n!==Object.prototype;){if(-1!==r.indexOf(n))return!1;if(r.push(n),L(n,t))return!0;n=N(n)}return!1},B=(C=Object.create(null),function(e){var t=x.call(e);return C[t]||(C[t]=t.slice(8,-1).toLowerCase())}),I=function(e){return e=e.toLowerCase(),function(t){return B(t)===e}},q=function(e){return function(t){return _(t)===e}},M=Array.isArray,z=q("undefined");function H(e){return null!==e&&!z(e)&&null!==e.constructor&&!z(e.constructor)&&V(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var W=I("ArrayBuffer");var J=q("string"),V=q("function"),K=q("number"),X=function(e){return null!==e&&"object"===_(e)},G=function(e){if(!X(e))return!1;var t=N(e);return!(null!==t&&t!==Object.prototype&&null!==N(t)||F(e,D)||F(e,U))},$=I("Date"),Q=I("File"),Z=I("Blob"),Y=I("FileList");var ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},te=void 0!==ee.FormData?ee.FormData:void 0,ne=I("URLSearchParams"),re=E(["ReadableStream","Request","Response","Headers"].map(I),4),oe=re[0],ie=re[1],ae=re[2],ue=re[3];function se(e,t){var n,r,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,i=void 0!==o&&o;if(null!=e)if("object"!==_(e)&&(e=[e]),M(e))for(n=0,r=e.length;n0;)if(t===(n=r[o]).toLowerCase())return n;return null}var fe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,le=function(e){return!z(e)&&e!==fe};var de,pe=(de="undefined"!=typeof Uint8Array&&N(Uint8Array),function(e){return de&&e instanceof de}),he=I("HTMLFormElement"),ve=Object.prototype.propertyIsEnumerable,ye=I("RegExp"),be=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};se(n,function(n,o){var i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};var me,ge,we,Oe,Ee=I("AsyncFunction"),Re=(me="function"==typeof setImmediate,ge=V(fe.postMessage),me?setImmediate:ge?(we="axios@".concat(Math.random()),Oe=[],fe.addEventListener("message",function(e){var t=e.source,n=e.data;t===fe&&n===we&&Oe.length&&Oe.shift()()},!1),function(e){Oe.push(e),fe.postMessage(we,"*")}):function(e){return setTimeout(e)}),Se="undefined"!=typeof queueMicrotask?queueMicrotask.bind(fe):"undefined"!=typeof process&&process.nextTick||Re,_e=function(e){return null!=e&&V(e[U])},Ae={isArray:M,isArrayBuffer:W,isBuffer:H,isFormData:function(e){if(!e)return!1;if(te&&e instanceof te)return!0;var t=N(e);if(!t||t===Object.prototype)return!1;if(!V(e.append))return!1;var n=B(e);return"formdata"===n||"object"===n&&V(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&W(e.buffer)},isString:J,isNumber:K,isBoolean:function(e){return!0===e||!1===e},isObject:X,isPlainObject:G,isEmptyObject:function(e){if(!X(e)||H(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:oe,isRequest:ie,isResponse:ae,isHeaders:ue,isUndefined:z,isDate:$,isFile:Q,isReactNativeBlob:function(e){return!(!e||void 0===e.uri)},isReactNative:function(e){return e&&void 0!==e.getParts},isBlob:Z,isRegExp:ye,isFunction:V,isStream:function(e){return X(e)&&V(e.pipe)},isURLSearchParams:ne,isTypedArray:pe,isFileList:Y,forEach:se,merge:function e(){for(var t=le(this)&&this||{},n=t.caseless,r=t.skipUndefined,o={},i=function(t,i){if("__proto__"!==i&&"constructor"!==i&&"prototype"!==i){var a=n&&"string"==typeof i&&ce(o,i)||i,u=L(o,a)?o[a]:void 0;G(u)&&G(t)?o[a]=e(u,t):G(t)?o[a]=e({},t):M(t)?o[a]=t.slice():r&&z(t)||(o[a]=t)}},a=0,u=arguments.length;a3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,u={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==n&&N(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:B,kindOfTest:I,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(M(e))return e;var t=e.length;if(!K(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[U]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:he,hasOwnProperty:L,hasOwnProp:L,hasOwnInPrototypeChain:F,getSafeProp:function(e,t){return null!=e&&F(e,t)?e[t]:void 0},reduceDescriptors:be,freezeMethods:function(e){be(e,function(t,n){if(V(e)&&["arguments","caller","callee"].includes(n))return!1;var r=e[n];V(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:function(e,t){var n={},r=function(e){e.forEach(function(e){n[e]=!0})};return M(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:ce,global:fe,isContextDefined:le,isSpecCompliantForm:function(e){return!!(e&&V(e.append)&&"FormData"===e[D]&&e[U])},toJSONObject:function(e){var t=new WeakSet,n=function(e){if(X(e)){if(t.has(e))return;if(H(e))return e;if(!("toJSON"in e)){t.add(e);var r=M(e)?[]:{};return se(e,function(e,t){var o=n(e);!z(o)&&(r[t]=o)}),t.delete(e),r}}return e};return n(e)},isAsyncFn:Ee,isThenable:function(e){return e&&(X(e)||V(e))&&V(e.then)&&V(e.catch)},setImmediate:Re,asap:Se,isIterable:_e,isSafeIterable:function(e){return null!=e&&F(e,U)&&_e(e)}},Pe=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Te=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),je=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ke(e,t){return Ae.isArray(e)?e.map(function(e){return ke(e,t)}):function(e){for(var t=0,n=e.length;tt;){var o=e.charCodeAt(n-1);if(9!==o&&32!==o)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function Ce(e){var t=Object.create(null);return Ae.forEach(e.toJSON(),function(e,n){t[n]=function(e){return ke(e,je)}(e)}),t}var xe=Symbol("internals");function Ne(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return!1===e||null==e?e:Ae.isArray(e)?e.map(Ue):function(e){return ke(e,Te)}(String(e))}function De(e,t,n,r,o){return Ae.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ae.isString(t)?Ae.isString(r)?-1!==t.indexOf(r):Ae.isRegExp(r)?r.test(t):void 0:void 0)}var Le=function(){return l(function e(t){c(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=Ne(t);if(o){var i=Ae.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ue(e))}}var i=function(e,t){return Ae.forEach(e,function(e,n){return o(e,n,t)})};if(Ae.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Ae.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i(function(e){var t,n,r,o={};return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||o[t]&&Pe[t]||("set-cookie"===t?o[t]?o[t].push(n):o[t]=[n]:o[t]=o[t]?o[t]+", "+n:n)}),o}(e),t);else if(Ae.isObject(e)&&Ae.isSafeIterable(e)){var a,u,s,c=Object.create(null),f=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=A(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(e);try{for(f.s();!(s=f.n()).done;){var l=s.value;if(!Ae.isArray(l))throw new TypeError("Object iterator must return a key-value pair");u=l[0],Ae.hasOwnProp(c,u)?(a=c[u],c[u]=Ae.isArray(a)?[].concat(R(a),[l[1]]):[a,l[1]]):c[u]=l[1]}}catch(e){f.e(e)}finally{f.f()}i(c,t)}else null!=e&&o(t,e,n);return this}},{key:"get",value:function(e,t){if(e=Ne(e)){var n=Ae.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(Ae.isFunction(t))return t.call(this,r,n);if(Ae.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Ne(e)){var n=Ae.findKey(this,e);return!(!n||void 0===this[n]||t&&!De(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=Ne(e)){var o=Ae.findKey(n,e);!o||t&&!De(0,n[o],o,t)||(delete n[o],r=!0)}}return Ae.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!De(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return Ae.forEach(this,function(r,o){var i=Ae.findKey(n,o);if(i)return t[i]=Ue(r),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})}(o):String(o).trim();a!==o&&delete t[o],t[a]=Ue(r),n[a]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r1?n-1:0),o=1;o0?Fe(e,t):Ae.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}}],[{key:"from",value:function(e,n,r,o,i,a){var u=new t(e.message,n||e.code,r,o,i);return Object.defineProperty(u,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),u.name=e.name,null!=e.status&&null==u.status&&(u.status=e.status),a&&Object.assign(u,a),u}}])}(j(Error));Be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Be.ERR_BAD_OPTION="ERR_BAD_OPTION",Be.ECONNABORTED="ECONNABORTED",Be.ETIMEDOUT="ETIMEDOUT",Be.ECONNREFUSED="ECONNREFUSED",Be.ERR_NETWORK="ERR_NETWORK",Be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Be.ERR_DEPRECATED="ERR_DEPRECATED",Be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Be.ERR_CANCELED="ERR_CANCELED",Be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Be.ERR_INVALID_URL="ERR_INVALID_URL",Be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function Ie(e){return Ae.isPlainObject(e)||Ae.isArray(e)}function qe(e){return Ae.endsWith(e,"[]")?e.slice(0,-2):e}function Me(e,t,n){return e?e.concat(t).map(function(e,t){return e=qe(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var ze=Ae.toFlatObject(Ae,{},null,function(e){return/^is[A-Z]/.test(e)});function He(e,t,n){if(!Ae.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=Ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Ae.isUndefined(t[e])})).metaTokens,o=n.visitor||p,i=n.dots,a=n.indexes,u=n.Blob||"undefined"!=typeof Blob&&Blob,s=void 0===n.maxDepth?100:n.maxDepth,c=u&&Ae.isSpecCompliantForm(t),f=[];if(!Ae.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Ae.isDate(e))return e.toISOString();if(Ae.isBoolean(e))return e.toString();if(!c&&Ae.isBlob(e))throw new Be("Blob is not supported. Use a Buffer instead.");if(Ae.isArrayBuffer(e)||Ae.isTypedArray(e)){if(c&&"function"==typeof u)return new u([e]);if("undefined"!=typeof Buffer)return Buffer.from(e);throw new Be("Blob is not supported. Use a Buffer instead.",Be.ERR_NOT_SUPPORT)}return e}function d(e){if(e>s)throw new Be("Object is too deeply nested ("+e+" levels). Max depth: "+s,Be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,n,o){var u=e;if(Ae.isReactNative(t)&&Ae.isReactNativeBlob(e))return t.append(Me(o,n,i),l(e)),!1;if(e&&!o&&"object"===_(e))if(Ae.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=function(e,t){if(s===1/0)return JSON.stringify(e);var n=[];return JSON.stringify(e,function(e,r){if(!Ae.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),d(t+n.length-1),r})}(e,1);else if(Ae.isArray(e)&&function(e){return Ae.isArray(e)&&!e.some(Ie)}(e)||(Ae.isFileList(e)||Ae.endsWith(n,"[]"))&&(u=Ae.toArray(e)))return n=qe(n),u.forEach(function(e,r){!Ae.isUndefined(e)&&null!==e&&t.append(!0===a?Me([n],r,i):null===a?n:n+"[]",l(e))}),!1;return!!Ie(e)||(t.append(Me(o,n,i),l(e)),!1)}var h=Object.assign(ze,{defaultVisitor:p,convertValue:l,isVisitable:Ie});if(!Ae.isObject(e))throw new TypeError("data must be an object");return function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!Ae.isUndefined(n)){if(d(i),-1!==f.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));f.push(n),Ae.forEach(n,function(n,a){!0===(!(Ae.isUndefined(n)||null===n)&&o.call(t,n,Ae.isString(a)?a.trim():a,r,h))&&e(n,r?r.concat(a):[a],i+1)}),f.pop()}}(e),t}function We(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Je(e,t){this._pairs=[],e&&He(e,this,t)}var Ve=Je.prototype;function Ke(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Xe(e,t,n){if(!t)return e;e=e||"";var r,o=Ae.isFunction(n)?{serialize:n}:n,i=Ae.getSafeProp(o,"encode")||Ke,a=Ae.getSafeProp(o,"serialize");if(r=a?a(t,o):Ae.isURLSearchParams(t)?t.toString():new Je(t,o).toString(i)){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}Ve.append=function(e,t){this._pairs.push([e,t])},Ve.toString=function(e){var t=this,n=e?function(n){return e.call(t,n,We)}:We;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};var Ge=function(){return l(function e(){c(this,e),this.handlers=[]},[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){Ae.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),$e={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Qe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Je,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ze="undefined"!=typeof window&&"undefined"!=typeof document,Ye="object"===("undefined"==typeof navigator?"undefined":_(navigator))&&navigator||void 0,et=Ze&&(!Ye||["ReactNative","NativeScript","NS"].indexOf(Ye.product)<0),tt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,nt=Ze&&window.location.href||"http://localhost",rt=b(b({},Object.freeze({__proto__:null,hasBrowserEnv:Ze,hasStandardBrowserEnv:et,hasStandardBrowserWebWorkerEnv:tt,navigator:Ye,origin:nt})),Qe);function ot(e){if(e>100)throw new Be("FormData field is too deeply nested ("+e+" levels). Max depth: 100",Be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function it(e){function t(e,n,r,o){ot(o);var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),u=o>=e.length;return i=!i&&Ae.isArray(r)?r.length:i,u?(Ae.hasOwnProp(r,i)?r[i]=Ae.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!a):(Ae.hasOwnProp(r,i)&&Ae.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Ae.isArray(r[i])&&(r[i]=function(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t-1,i=Ae.isObject(e);if(i&&Ae.isHTMLForm(e)&&(e=new FormData(e)),Ae.isFormData(e))return o?JSON.stringify(it(e)):e;if(Ae.isArrayBuffer(e)||Ae.isBuffer(e)||Ae.isStream(e)||Ae.isFile(e)||Ae.isBlob(e)||Ae.isReadableStream(e))return e;if(Ae.isArrayBufferView(e))return e.buffer;if(Ae.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){var a=at(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return He(e,new rt.classes.URLSearchParams,b({visitor:function(e,t,n,r){return rt.isNode&&Ae.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,a).toString();if((n=Ae.isFileList(e))||r.indexOf("multipart/form-data")>-1){var u=at(this,"env"),s=u&&u.FormData;return He(n?{"files[]":e}:e,s&&new s,a)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(Ae.isString(e))try{return(t||JSON.parse)(e),Ae.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=at(this,"transitional")||ut.transitional,n=t&&t.forcedJSONParsing,r=at(this,"responseType"),o="json"===r;if(Ae.isResponse(e)||Ae.isReadableStream(e))return e;if(e&&Ae.isString(e)&&(n&&!r||o)){var i=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,at(this,"parseReviver"))}catch(e){if(i){if("SyntaxError"===e.name)throw Be.from(e,Be.ERR_BAD_RESPONSE,this,null,at(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function st(e,t){var n=this||ut,r=t||n,o=Le.from(r.headers),i=r.data;return Ae.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ct(e){return!(!e||!e.__CANCEL__)}Ae.forEach(["delete","get","head","post","put","patch","query"],function(e){ut.headers[e]={}});var ft=function(e){function t(e,n,r){var o;return c(this,t),(o=s(this,t,[null==e?"canceled":e,Be.ERR_CANCELED,n,r])).name="CanceledError",o.__CANCEL__=!0,o}return h(t,e),l(t)}(Be);function lt(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Be("Request failed with status code "+n.status,n.status>=400&&n.status<500?Be.ERR_BAD_REQUEST:Be.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}var dt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0,o=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(u){var s=Date.now(),c=o[a];n||(n=s),r[i]=u,o[i]=s;for(var f=a,l=0;f!==i;)l+=r[f++],f%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(s-n1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(void 0,R(t))};return[function(){for(var e=Date.now(),t=e-o,u=arguments.length,s=new Array(u),c=0;c=i?a(s,e):(n=s,r||(r=setTimeout(function(){r=null,a(n)},i-t)))},function(){return n&&a(n)}]}(function(n){if(n&&"number"==typeof n.loaded){var i=n.loaded,a=n.lengthComputable?n.total:void 0,u=null!=a?Math.min(i,a):i,s=Math.max(0,u-r),c=o(s);r=Math.max(r,u);var f=d({loaded:u,total:a,progress:a?u/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a?(a-u)/c:void 0,event:n,lengthComputable:null!=a},t?"download":"upload",!0);e(f)}},n)},pt=function(e,t){var n=null!=e;return[function(r){return t[0]({lengthComputable:n,total:e,loaded:r})},t[1]]},ht=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},xt=function(e,t,n){return t+2=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e))};f>=0&&(61===r.charCodeAt(f)?(c++,f--):l(f)&&(c++,f-=3)),1===c&&f>=0&&(61===r.charCodeAt(f)||l(f))&&c++;var d=3*Math.floor(o/4)-(c||0);return d>0?d:0}for(var p=0,h=0,v=r.length;h=55296&&y<=56319&&h+1=56320&&b<=57343?(p+=4,h++):p+=3}else p+=3}return p}var Ut="1.18.1",Dt=Ae.isFunction,Lt=function(e){return encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})},Ft=function(e){if(!Ae.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Bt=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r-1,N=Ae.isNumber(C)&&C>-1,U=function(e){return Ae.hasOwnProp(t,e)?t[e]:void 0},D=i||fetch,_=_?(_+"").toLowerCase():"text",L=At([l,d&&d.toAbortSignal()],h),F=null,B=L&&L.unsubscribe&&function(){L.unsubscribe()},q=null,M=function(){return new Be("Request body larger than maxBodyLength limit",Be.ERR_BAD_REQUEST,t,F)},e.p=1,z=void 0,(H=U("auth"))&&(W=Ae.getSafeProp(H,"username")||"",J=Ae.getSafeProp(H,"password")||"",z={username:W,password:J}),It(o)&&(V=new URL(o,rt.origin),z||!V.username&&!V.password||(K=Ft(V.username),X=Ft(V.password),z={username:K,password:X}),(V.username||V.password)&&(V.username="",V.password="",o=V.href)),z&&(A.delete("authorization"),A.set("Authorization","Basic "+btoa(Lt((z.username||"")+":"+(z.password||""))))),!x||"string"!=typeof o||!o.startsWith("data:")){e.n=2;break}if(!(Nt(o)>k)){e.n=2;break}throw new Be("maxContentLength size of "+k+" exceeded",Be.ERR_BAD_RESPONSE,t,F);case 2:if(!N||"get"===a||"head"===a){e.n=4;break}return e.n=3,w(c);case 3:if("number"!=typeof(G=e.v)||!isFinite(G)){e.n=4;break}if(I=G,!(G>C)){e.n=4;break}throw M();case 4:if($=N&&(Ae.isReadableStream(c)||Ae.isStream(c)),Q=function(e,t,n){return kt(e,65536,function(e){if(N&&e>C)throw q=M();t&&t(e)},n)},!v||"get"===a||"head"===a||!S&&!$){e.n=8;break}if(null!=I){e.n=6;break}return e.n=5,O(A,c);case 5:Ee=e.v,e.n=7;break;case 6:Ee=I;case 7:(0!==(I=Ee)||$)&&(Z=new u(o,{method:"POST",body:c,duplex:"half"}),Ae.isFormData(c)&&(Y=Z.headers.get("content-type"))&&A.setContentType(Y),Z.body&&(ee=S&&pt(I,dt(ht(S)))||[],te=E(ee,2),ne=te[0],re=te[1],c=Q(Z.body,ne,re))),e.n=10;break;case 8:if(!$||f||!p||"get"===a||"head"===a){e.n=9;break}c=Q(c),e.n=10;break;case 9:if(!$||!f||v||"get"===a||"head"===a){e.n=10;break}throw new Be("Stream request bodies are not supported by the current fetch implementation",Be.ERR_NOT_SUPPORT,t,F);case 10:return Ae.isString(T)||(T=T?"include":"omit"),oe=f&&"credentials"in u.prototype,Ae.isFormData(c)&&(ie=A.getContentType())&&/^multipart\/form-data/i.test(ie)&&!/boundary=/i.test(ie)&&A.delete("content-type"),A.set("User-Agent","axios/"+Ut,!1),ae=b(b({},j),{},{signal:L,method:a.toUpperCase(),headers:Ce(A.normalize()),body:c,duplex:"half",credentials:oe?T:void 0}),F=f&&new u(o,ae),e.n=11,f?D(F,j):D(o,ae);case 11:if(ue=e.v,se=Le.from(ue.headers),!x){e.n=12;break}if(!(null!=(ce=Ae.toFiniteNumber(se.getContentLength()))&&ce>k)){e.n=12;break}throw new Be("maxContentLength size of "+k+" exceeded",Be.ERR_BAD_RESPONSE,t,F);case 12:return fe=y&&("stream"===_||"response"===_),y&&ue.body&&(R||x||fe&&B)&&(le={},["status","statusText","headers"].forEach(function(e){le[e]=ue[e]}),de=Ae.toFiniteNumber(se.getContentLength()),pe=R&&pt(de,dt(ht(R),!0))||[],he=E(pe,2),ve=he[0],ye=he[1],be=function(e){if(x&&e>k)throw new Be("maxContentLength size of "+k+" exceeded",Be.ERR_BAD_RESPONSE,t,F);ve&&ve(e)},ue=new s(kt(ue.body,65536,be,function(){ye&&ye(),B&&B()}),le)),_=_||"text",e.n=13,g[Ae.findKey(g,_)||"text"](ue,t);case 13:if(me=e.v,!x||y||fe){e.n=14;break}if(null!=me&&("number"==typeof me.byteLength?ge=me.byteLength:"number"==typeof me.size?ge=me.size:"string"==typeof me&&(ge="function"==typeof r?(new r).encode(me).byteLength:me.length)),!("number"==typeof ge&&ge>k)){e.n=14;break}throw new Be("maxContentLength size of "+k+" exceeded",Be.ERR_BAD_RESPONSE,t,F);case 14:return!fe&&B&&B(),e.n=15,new Promise(function(e,n){lt(e,n,{data:me,headers:Le.from(ue.headers),status:ue.status,statusText:ue.statusText,config:t,request:F})});case 15:return e.a(2,e.v);case 16:if(e.p=16,Re=e.v,B&&B(),!(L&&L.aborted&&L.reason instanceof Be)){e.n=17;break}throw(we=L.reason).config=t,F&&(we.request=F),Re!==we&&Object.defineProperty(we,"cause",{__proto__:null,value:Re,writable:!0,enumerable:!1,configurable:!0}),we;case 17:if(!q){e.n=18;break}throw F&&!q.request&&(q.request=F),q;case 18:if(!(Re instanceof Be)){e.n=19;break}throw F&&!Re.request&&(Re.request=F),Re;case 19:if(!Re||"TypeError"!==Re.name||!/Load failed|fetch/i.test(Re.message)){e.n=20;break}throw Oe=new Be("Network Error",Be.ERR_NETWORK,t,F,Re&&Re.response),Object.defineProperty(Oe,"cause",{__proto__:null,value:Re.cause||Re,writable:!0,enumerable:!1,configurable:!0}),Oe;case 20:throw Be.from(Re,Re&&Re.code,t,F,Re&&Re.response);case 21:return e.a(2)}},e,null,[[1,16]])}));return function(t){return e.apply(this,arguments)}}()},Mt=new Map,zt=function(e){for(var t,n,r=e&&e.env||{},o=r.fetch,i=[r.Request,r.Response,o],a=i.length,u=Mt;a--;)t=i[a],void 0===(n=u.get(t))&&u.set(t,n=a?new Map:qt(r)),u=n;return n};zt();var Ht={http:null,xhr:_t,fetch:{get:zt}};Ae.forEach(Ht,function(e,t){if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Wt=function(e){return"- ".concat(e)},Jt=function(e){return Ae.isFunction(e)||null===e||!1===e};var Vt={getAdapter:function(e,t){for(var n,r,o=(e=Ae.isArray(e)?e:[e]).length,i={},a=0;a1?"since :\n"+s.map(Wt).join("\n"):" "+Wt(s[0]):"as no adapter specified";throw new Be("There is no suitable adapter to dispatch the request "+c,Be.ERR_NOT_SUPPORT)}return r},adapters:Ht};function Kt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ft(null,e)}function Xt(e){return Kt(e),e.headers=Le.from(e.headers),e.data=st.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vt.getAdapter(e.adapter||ut.adapter,e)(e).then(function(t){Kt(e),e.response=t;try{t.data=st.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=Le.from(t.headers),t},function(t){if(!ct(t)&&(Kt(e),t&&t.response)){e.response=t.response;try{t.response.data=st.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=Le.from(t.response.headers)}return Promise.reject(t)})}var Gt={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Gt[e]=function(n){return _(n)===e||"a"+(t<1?"n ":" ")+e}});var $t={};Gt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Ut+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new Be(r(o," has been removed"+(t?" in "+t:"")),Be.ERR_DEPRECATED);return t&&!$t[o]&&($t[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Gt.spelling=function(e){return function(t,n){return console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0}};var Qt={assertOptions:function(e,t,n){if("object"!==_(e)||null===e)throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){var u=e[i],s=void 0===u||a(u,i,e);if(!0!==s)throw new Be("option "+i+" must be "+s,Be.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Be("Unknown option "+i,Be.ERR_BAD_OPTION)}},validators:Gt},Zt=Qt.validators,Yt=function(){return l(function e(t){c(this,e),this.defaults=t||{},this.interceptors={request:new Ge,response:new Ge}},[{key:"request",value:(e=a(m().m(function e(t,n){var r,o,i,a,u,s;return m().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,n);case 1:return e.a(2,e.v);case 2:if(e.p=2,(s=e.v)instanceof Error){r={},Error.captureStackTrace?Error.captureStackTrace(r):r=new Error,o=function(){if(!r.stack)return"";var e=r.stack.indexOf("\n");return-1===e?"":r.stack.slice(e+1)}();try{s.stack?o&&(i=o.indexOf("\n"),a=-1===i?-1:o.indexOf("\n",i+1),u=-1===a?"":o.slice(a+1),String(s.stack).endsWith(u)||(s.stack+="\n"+o)):s.stack=o}catch(e){}}throw s;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,n){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=Et(this.defaults,t),r=n.transitional,o=n.paramsSerializer,i=n.headers;void 0!==r&&Qt.assertOptions(r,{silentJSONParsing:Zt.transitional(Zt.boolean),forcedJSONParsing:Zt.transitional(Zt.boolean),clarifyTimeoutError:Zt.transitional(Zt.boolean),legacyInterceptorReqResOrdering:Zt.transitional(Zt.boolean),advertiseZstdAcceptEncoding:Zt.transitional(Zt.boolean),validateStatusUndefinedResolves:Zt.transitional(Zt.boolean)},!1),null!=o&&(Ae.isFunction(o)?t.paramsSerializer={serialize:o}:Qt.assertOptions(o,{encode:Zt.function,serialize:Zt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Qt.assertOptions(t,{baseUrl:Zt.spelling("baseURL"),withXsrfToken:Zt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&Ae.merge(i.common,i[t.method]);i&&Ae.forEach(["delete","get","head","post","put","patch","query","common"],function(e){delete i[e]}),t.headers=Le.concat(a,i);var u=[],s=!0;this.interceptors.request.forEach(function(e){if("function"!=typeof e.runWhen||!1!==e.runWhen(t)){s=s&&e.synchronous;var n=t.transitional||$e;n&&n.legacyInterceptorReqResOrdering?u.unshift(e.fulfilled,e.rejected):u.push(e.fulfilled,e.rejected)}});var c,f=[];this.interceptors.response.forEach(function(e){f.push(e.fulfilled,e.rejected)});var l,d=0;if(!s){var p=[Xt.bind(this),void 0];for(p.unshift.apply(p,u),p.push.apply(p,f),l=p.length,c=Promise.resolve(t);d0;)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t(function(e,t,o){r.reason||(r.reason=new ft(e,t,o),n(r.reason))})}return l(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,n=function(e){t.abort(e)};return this.subscribe(n),t.signal.unsubscribe=function(){return e.unsubscribe(n)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}();var tn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(tn).forEach(function(e){var t=E(e,2),n=t[0],r=t[1];tn[r]=n});var nn=function e(t){var n=new Yt(t),r=k(Yt.prototype.request,n);return Ae.extend(r,Yt.prototype,n,{allOwnKeys:!0}),Ae.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Et(t,n))},r}(ut);return nn.Axios=Yt,nn.CanceledError=ft,nn.CancelToken=en,nn.isCancel=ct,nn.VERSION=Ut,nn.toFormData=He,nn.AxiosError=Be,nn.Cancel=nn.CanceledError,nn.all=function(e){return Promise.all(e)},nn.spread=function(e){return function(t){return e.apply(null,t)}},nn.isAxiosError=function(e){return Ae.isObject(e)&&!0===e.isAxiosError},nn.mergeConfig=Et,nn.AxiosHeaders=Le,nn.formToJSON=function(e){return it(Ae.isHTMLForm(e)?new FormData(e):e)},nn.getAdapter=Vt.getAdapter,nn.HttpStatusCode=tn,nn.default=nn,nn}); //# sourceMappingURL=axios.min.js.map diff --git a/enferno/static/js/components/VueDropzone.js b/enferno/static/js/components/VueDropzone.js index 00b28eae0..37e01063e 100644 --- a/enferno/static/js/components/VueDropzone.js +++ b/enferno/static/js/components/VueDropzone.js @@ -1,3 +1,5 @@ +Dropzone.autoDiscover = false; + const VueDropzone = Vue.defineComponent({ props: { options: { diff --git a/enferno/static/js/croppr/croppr.min.js b/enferno/static/js/croppr/croppr.min.js index 59eb44390..35dc8bdce 100644 --- a/enferno/static/js/croppr/croppr.min.js +++ b/enferno/static/js/croppr/croppr.min.js @@ -1 +1,2 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Croppr=e()}(this,function(){"use strict";function t(t){t.addEventListener("touchstart",e),t.addEventListener("touchend",e),t.addEventListener("touchmove",e)}function e(t){t.preventDefault();var e=t.changedTouches[0],i={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"};e.target.dispatchEvent(new MouseEvent(i[t.type],{bubbles:!0,cancelable:!0,view:window,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY}))}function i(t,e){return Number(Math.round(t+"e"+e)+"e-"+e)}!function(){for(var t=0,e=["ms","moz","webkit","o"],i=0;i0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return this.x1=null==t?this.x1:t,this.y1=null==e?this.y1:e,this.x2=null==i?this.x2:i,this.y2=null==n?this.y2:n,this}},{key:"width",value:function(){return Math.abs(this.x2-this.x1)}},{key:"height",value:function(){return Math.abs(this.y2-this.y1)}},{key:"resize",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0],n=this.x1+this.width()*i[0],o=this.y1+this.height()*i[1];return this.x1=n-t*i[0],this.y1=o-e*i[1],this.x2=this.x1+t,this.y2=this.y1+e,this}},{key:"scale",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],i=this.width()*t,n=this.height()*t;return this.resize(i,n,e),this}},{key:"move",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.width(),n=this.height();return t=null===t?this.x1:t,e=null===e?this.y1:e,this.x1=t,this.y1=e,this.x2=t+i,this.y2=e+n,this}},{key:"getRelativePoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=this.width()*t[0],i=this.height()*t[1];return[e,i]}},{key:"getAbsolutePoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=this.x1+this.width()*t[0],i=this.y1+this.height()*t[1];return[e,i]}},{key:"constrainToRatio",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"height";if(null!==t){this.width(),this.height();switch(i){case"height":this.resize(this.width(),this.width()*t,e);break;case"width":this.resize(1*this.height()/t,this.height(),e);break;default:this.resize(this.width(),this.width()*t,e)}return this}}},{key:"constrainToBoundary",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0],n=this.getAbsolutePoint(i),o=h(n,2),s=o[0],r=o[1],a=s,l=r,u=t-s,d=e-r,c=-2*i[0]+1,v=-2*i[1]+1,p=null,m=null;switch(c){case-1:p=a;break;case 0:p=2*Math.min(a,u);break;case 1:p=u}switch(v){case-1:m=l;break;case 0:m=2*Math.min(l,d);break;case 1:m=d}if(this.width()>p){var f=p/this.width();this.scale(f,i)}if(this.height()>m){var g=m/this.height();this.scale(g,i)}return this}},{key:"constrainToSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[0,0],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(s&&(s>1?(t=1*e/s,n*=s):s<1&&(e=t*s,i=1*n/s)),t&&this.width()>t){var r=t,a=null===s?this.height():e;this.resize(r,a,o)}if(e&&this.height()>e){var h=null===s?this.width():t,l=e;this.resize(h,l,o)}if(i&&this.width()2&&void 0!==arguments[2]&&arguments[2];if(n(this,e),this.options=e.parseOptions(i||{}),!t.nodeName&&(t=document.querySelector(t),null==t))throw"Unable to find element.";if(!t.getAttribute("src"))throw"Image src not provided.";this._initialized=!1,this._targetEl=t,s||(0===t.width||0===t.height?t.onload=function(){o.initialize()}:this.initialize())}return o(e,[{key:"initialize",value:function(){this.createDOM(this._targetEl),this.options.convertToPixels(this.cropperEl),this.attachHandlerEvents(),this.attachRegionEvents(),this.attachOverlayEvents(),this.box=this.initializeBox(this.options),this.redraw(),this._initialized=!0,null!==this.options.onInitialize&&this.options.onInitialize(this)}},{key:"createDOM",value:function(e){this.containerEl=document.createElement("div"),this.containerEl.className="croppr-container",this.eventBus=this.containerEl,t(this.containerEl),this.cropperEl=document.createElement("div"),this.cropperEl.className="croppr",this.imageEl=document.createElement("img"),this.imageEl.setAttribute("src",e.getAttribute("src")),this.imageEl.setAttribute("alt",e.getAttribute("alt")),this.imageEl.className="croppr-image",this.imageClippedEl=this.imageEl.cloneNode(),this.imageClippedEl.className="croppr-imageClipped",this.regionEl=document.createElement("div"),this.regionEl.className="croppr-region",this.overlayEl=document.createElement("div"),this.overlayEl.className="croppr-overlay";var i=document.createElement("div");i.className="croppr-handleContainer",this.handles=[];for(var n=0;n>31,l=a[1]-t.cropperEl.offsetHeight/2>>31,u=(h^l)+l+l+4,d=-2*u+8,c=0;co.width&&(i=o.width),n<0?n=0:n>o.height&&(n=o.height);var s=this.activeHandle.originPoint.slice(),r=this.activeHandle.originX,a=this.activeHandle.originY,h=this.activeHandle.handle,l=1===h.constraints[0],d=1===h.constraints[1],c=1===h.constraints[2],v=1===h.constraints[3],p=(v||d)&&(l||c),m=v||d?r:this.box.x1,f=v||d?r:this.box.x2,g=l||c?a:this.box.y1,E=l||c?a:this.box.y2;m=v?i:m,f=d?i:f,g=l?n:g,E=c?n:E;var w=!1,y=!1;if((v||d)&&(w=v?i>r:ia:nC.y1+z*C.width()||na.width&&this.box.move(a.width-this.box.width(),null),this.box.y1<0&&this.box.move(null,0),this.box.y2>a.height&&this.box.move(null,a.height-this.box.height()),this.redraw(),null!==this.options.onCropMove&&this.options.onCropMove(this.getValue())}},{key:"onRegionMoveEnd",value:function(t){null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue())}},{key:"getValue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t&&(t=this.options.returnMode),"real"==t){var e=this.imageEl.naturalWidth,n=this.imageEl.naturalHeight,o=e/this.imageEl.offsetWidth,s=n/this.imageEl.offsetHeight;return{x:Math.round(this.box.x1*o),y:Math.round(this.box.y1*s),width:Math.round(this.box.width()*o),height:Math.round(this.box.height()*s)}}if("ratio"==t){var r=this.imageEl.offsetWidth,a=this.imageEl.offsetHeight;return{x:i(this.box.x1/r,3),y:i(this.box.y1/a,3),width:i(this.box.width()/r,3),height:i(this.box.height()/a,3)}}if("raw"==t)return{x:Math.round(this.box.x1),y:Math.round(this.box.y1),width:Math.round(this.box.width()),height:Math.round(this.box.height())}}}],[{key:"parseOptions",value:function(t){var e={aspectRatio:null,maxSize:{width:null,height:null},minSize:{width:null,height:null},startSize:{width:100,height:100,unit:"%"},returnMode:"real",onInitialize:null,onCropStart:null,onCropMove:null,onCropEnd:null},i=null;void 0!==t.aspectRatio&&("number"==typeof t.aspectRatio?i=t.aspectRatio:t.aspectRatio instanceof Array&&(i=t.aspectRatio[1]/t.aspectRatio[0]));var n=null;void 0!==t.maxSize&&null!==t.maxSize&&(n={width:t.maxSize[0]||null,height:t.maxSize[1]||null,unit:t.maxSize[2]||"px"});var o=null;void 0!==t.minSize&&null!==t.minSize&&(o={width:t.minSize[0]||null,height:t.minSize[1]||null,unit:t.minSize[2]||"px"});var s=null;void 0!==t.startSize&&null!==t.startSize&&(s={width:t.startSize[0]||null,height:t.startSize[1]||null,unit:t.startSize[2]||"%"});var r=null;"function"==typeof t.onInitialize&&(r=t.onInitialize);var a=null;"function"==typeof t.onCropStart&&(a=t.onCropStart);var h=null;"function"==typeof t.onCropEnd&&(h=t.onCropEnd);var l=null;"function"==typeof t.onUpdate&&(console.warn("Croppr.js: `onUpdate` is deprecated and will be removed in the next major release. Please use `onCropMove` or `onCropEnd` instead."),l=t.onUpdate),"function"==typeof t.onCropMove&&(l=t.onCropMove);var u=null;if(void 0!==t.returnMode){var d=t.returnMode.toLowerCase();if(["real","ratio","raw"].indexOf(d)===-1)throw"Invalid return mode.";u=d}var c=function(t){for(var e=t.offsetWidth,i=t.offsetHeight,n=["maxSize","minSize","startSize"],o=0;o2&&void 0!==arguments[2]&&arguments[2];return n(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i,o))}return r(e,t),o(e,[{key:"getValue",value:function(t){return s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"getValue",this).call(this,t)}},{key:"moveTo",value:function(t,e){return this.box.move(t,e),this.redraw(),null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue()),this}},{key:"resizeTo",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[.5,.5];return this.box.resize(t,e,i),this.redraw(),null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue()),this}},{key:"scaleBy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[.5,.5];return this.box.scale(t,e),this.redraw(),null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue()),this}},{key:"reset",value:function(){return this.box=this.initializeBox(this.options),this.redraw(),null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue()),this}}]),e}(c);return v}); +// https://github.com/jamesssooi/Croppr.js/releases/tag/v2.3.0 +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Croppr=e()}(this,function(){"use strict";function t(t){t.addEventListener("touchstart",e),t.addEventListener("touchend",e),t.addEventListener("touchmove",e)}function e(t){t.preventDefault();var e=t.changedTouches[0],i={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"};e.target.dispatchEvent(new MouseEvent(i[t.type],{bubbles:!0,cancelable:!0,view:window,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY}))}function i(t,e){return Number(Math.round(t+"e"+e)+"e-"+e)}!function(){for(var t=0,e=["ms","moz","webkit","o"],i=0;i0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return this.x1=null==t?this.x1:t,this.y1=null==e?this.y1:e,this.x2=null==i?this.x2:i,this.y2=null==n?this.y2:n,this}},{key:"width",value:function(){return Math.abs(this.x2-this.x1)}},{key:"height",value:function(){return Math.abs(this.y2-this.y1)}},{key:"resize",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0],n=this.x1+this.width()*i[0],o=this.y1+this.height()*i[1];return this.x1=n-t*i[0],this.y1=o-e*i[1],this.x2=this.x1+t,this.y2=this.y1+e,this}},{key:"scale",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],i=this.width()*t,n=this.height()*t;return this.resize(i,n,e),this}},{key:"move",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.width(),n=this.height();return t=null===t?this.x1:t,e=null===e?this.y1:e,this.x1=t,this.y1=e,this.x2=t+i,this.y2=e+n,this}},{key:"getRelativePoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=this.width()*t[0],i=this.height()*t[1];return[e,i]}},{key:"getAbsolutePoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=this.x1+this.width()*t[0],i=this.y1+this.height()*t[1];return[e,i]}},{key:"constrainToRatio",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"height";if(null!==t){this.width(),this.height();switch(i){case"height":this.resize(this.width(),this.width()*t,e);break;case"width":this.resize(1*this.height()/t,this.height(),e);break;default:this.resize(this.width(),this.width()*t,e)}return this}}},{key:"constrainToBoundary",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0],n=this.getAbsolutePoint(i),o=h(n,2),s=o[0],r=o[1],a=s,l=r,u=t-s,d=e-r,c=-2*i[0]+1,p=-2*i[1]+1,v=null,m=null;switch(c){case-1:v=a;break;case 0:v=2*Math.min(a,u);break;case 1:v=u}switch(p){case-1:m=l;break;case 0:m=2*Math.min(l,d);break;case 1:m=d}if(this.width()>v){var f=v/this.width();this.scale(f,i)}if(this.height()>m){var g=m/this.height();this.scale(g,i)}return this}},{key:"constrainToSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[0,0],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(s&&(s>1?(t=1*e/s,n*=s):s<1&&(e=t*s,i=1*n/s)),t&&this.width()>t){var r=t,a=null===s?this.height():e;this.resize(r,a,o)}if(e&&this.height()>e){var h=null===s?this.width():t,l=e;this.resize(h,l,o)}if(i&&this.width()2&&void 0!==arguments[2]&&arguments[2];if(n(this,e),this.options=e.parseOptions(i||{}),!t.nodeName&&(t=document.querySelector(t),null==t))throw"Unable to find element.";if(!t.getAttribute("src"))throw"Image src not provided.";this._initialized=!1,this._restore={parent:t.parentNode,element:t},s||(0===t.width||0===t.height?t.onload=function(){o.initialize(t)}:this.initialize(t))}return o(e,[{key:"initialize",value:function(t){this.createDOM(t),this.options.convertToPixels(this.cropperEl),this.attachHandlerEvents(),this.attachRegionEvents(),this.attachOverlayEvents(),this.box=this.initializeBox(this.options),this.redraw(),this._initialized=!0,null!==this.options.onInitialize&&this.options.onInitialize(this)}},{key:"createDOM",value:function(e){this.containerEl=document.createElement("div"),this.containerEl.className="croppr-container",this.eventBus=this.containerEl,t(this.containerEl),this.cropperEl=document.createElement("div"),this.cropperEl.className="croppr",this.imageEl=document.createElement("img"),this.imageEl.setAttribute("src",e.getAttribute("src")),this.imageEl.setAttribute("alt",e.getAttribute("alt")),this.imageEl.className="croppr-image",this.imageClippedEl=this.imageEl.cloneNode(),this.imageClippedEl.className="croppr-imageClipped",this.regionEl=document.createElement("div"),this.regionEl.className="croppr-region",this.overlayEl=document.createElement("div"),this.overlayEl.className="croppr-overlay";var i=document.createElement("div");i.className="croppr-handleContainer",this.handles=[];for(var n=0;n>31,l=a[1]-t.cropperEl.offsetHeight/2>>31,u=(h^l)+l+l+4,d=-2*u+8,c=0;co.width&&(i=o.width),n<0?n=0:n>o.height&&(n=o.height);var s=this.activeHandle.originPoint.slice(),r=this.activeHandle.originX,a=this.activeHandle.originY,h=this.activeHandle.handle,l=1===h.constraints[0],d=1===h.constraints[1],c=1===h.constraints[2],p=1===h.constraints[3],v=(p||d)&&(l||c),m=p||d?r:this.box.x1,f=p||d?r:this.box.x2,g=l||c?a:this.box.y1,E=l||c?a:this.box.y2;m=p?i:m,f=d?i:f,g=l?n:g,E=c?n:E;var w=!1,y=!1;if((p||d)&&(w=p?i>r:ia:nC.y1+z*C.width()||na.width&&this.box.move(a.width-this.box.width(),null),this.box.y1<0&&this.box.move(null,0),this.box.y2>a.height&&this.box.move(null,a.height-this.box.height()),this.redraw(),null!==this.options.onCropMove&&this.options.onCropMove(this.getValue())}},{key:"onRegionMoveEnd",value:function(t){null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue())}},{key:"getValue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t&&(t=this.options.returnMode),"real"==t){var e=this.imageEl.naturalWidth,n=this.imageEl.naturalHeight,o=e/this.imageEl.offsetWidth,s=n/this.imageEl.offsetHeight;return{x:Math.round(this.box.x1*o),y:Math.round(this.box.y1*s),width:Math.round(this.box.width()*o),height:Math.round(this.box.height()*s)}}if("ratio"==t){var r=this.imageEl.offsetWidth,a=this.imageEl.offsetHeight;return{x:i(this.box.x1/r,3),y:i(this.box.y1/a,3),width:i(this.box.width()/r,3),height:i(this.box.height()/a,3)}}if("raw"==t)return{x:Math.round(this.box.x1),y:Math.round(this.box.y1),width:Math.round(this.box.width()),height:Math.round(this.box.height())}}}],[{key:"parseOptions",value:function(t){var e={aspectRatio:null,maxSize:{width:null,height:null},minSize:{width:null,height:null},startSize:{width:100,height:100,unit:"%"},returnMode:"real",onInitialize:null,onCropStart:null,onCropMove:null,onCropEnd:null},i=null;void 0!==t.aspectRatio&&("number"==typeof t.aspectRatio?i=t.aspectRatio:t.aspectRatio instanceof Array&&(i=t.aspectRatio[1]/t.aspectRatio[0]));var n=null;void 0!==t.maxSize&&null!==t.maxSize&&(n={width:t.maxSize[0]||null,height:t.maxSize[1]||null,unit:t.maxSize[2]||"px"});var o=null;void 0!==t.minSize&&null!==t.minSize&&(o={width:t.minSize[0]||null,height:t.minSize[1]||null,unit:t.minSize[2]||"px"});var s=null;void 0!==t.startSize&&null!==t.startSize&&(s={width:t.startSize[0]||null,height:t.startSize[1]||null,unit:t.startSize[2]||"%"});var r=null;"function"==typeof t.onInitialize&&(r=t.onInitialize);var a=null;"function"==typeof t.onCropStart&&(a=t.onCropStart);var h=null;"function"==typeof t.onCropEnd&&(h=t.onCropEnd);var l=null;"function"==typeof t.onUpdate&&(console.warn("Croppr.js: `onUpdate` is deprecated and will be removed in the next major release. Please use `onCropMove` or `onCropEnd` instead."),l=t.onUpdate),"function"==typeof t.onCropMove&&(l=t.onCropMove);var u=null;if(void 0!==t.returnMode){var d=t.returnMode.toLowerCase();if(["real","ratio","raw"].indexOf(d)===-1)throw"Invalid return mode.";u=d}var c=function(t){for(var e=t.offsetWidth,i=t.offsetHeight,n=["maxSize","minSize","startSize"],o=0;o2&&void 0!==arguments[2]&&arguments[2];return n(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,i,o))}return r(e,t),o(e,[{key:"getValue",value:function(t){return s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"getValue",this).call(this,t)}},{key:"setImage",value:function(t){return s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setImage",this).call(this,t)}},{key:"destroy",value:function(){return s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"moveTo",value:function(t,e){return this.box.move(t,e),this.redraw(),null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue()),this}},{key:"resizeTo",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[.5,.5];return this.box.resize(t,e,i),this.redraw(),null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue()),this}},{key:"scaleBy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[.5,.5];return this.box.scale(t,e),this.redraw(),null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue()),this}},{key:"reset",value:function(){return this.box=this.initializeBox(this.options),this.redraw(),null!==this.options.onCropEnd&&this.options.onCropEnd(this.getValue()),this}}]),e}(c);return p}); diff --git a/enferno/static/js/docx-preview/docx-preview.min.js b/enferno/static/js/docx-preview/docx-preview.min.js index 968d34475..f201a2f3f 100644 --- a/enferno/static/js/docx-preview/docx-preview.min.js +++ b/enferno/static/js/docx-preview/docx-preview.min.js @@ -2,7 +2,7 @@ * @license * docx-preview * Released under Apache License 2.0 - * Copyright Volodymyr Baydalka + * Copyright Volodymyr Baydalka | https://cdn.jsdelivr.net/npm/docx-preview@0.3.7/dist/docx-preview.min.js */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jszip")):"function"==typeof define&&define.amd?define(["exports","jszip"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).docx={},e.JSZip)}(this,function(e,t){"use strict";var r;function a(e){return/^[^"'].*\s.*[^"']$/.test(e)?`'${e}'`:e}function s(e){let t=e.lastIndexOf("/")+1;return[0==t?"":e.substring(0,t),0==t?e:e.substring(t)]}function n(e,t){try{const r="http://docx/";return new URL(e,r+t).toString().substring(r.length)}catch{return`${t}${e}`}}function l(e,t){return e.reduce((e,r)=>(e[t(r)]=r,e),{})}function o(e){return e&&"object"==typeof e&&!Array.isArray(e)}function i(e,...t){if(!t.length)return e;const r=t.shift();if(o(e)&&o(r))for(const t in r)if(o(r[t])){i(e[t]??(e[t]={}),r[t])}else e[t]=r[t];return i(e,...t)}function c(e){return Array.isArray(e)?e:[e]}!function(e){e.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",e.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",e.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",e.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",e.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",e.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",e.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",e.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",e.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",e.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",e.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",e.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",e.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",e.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",e.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",e.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",e.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties",e.Comments="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",e.CommentsExtended="http://schemas.microsoft.com/office/2011/relationships/commentsExtended",e.AltChunk="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk"}(r||(r={}));const h="http://schemas.openxmlformats.org/wordprocessingml/2006/main",m={mul:.05,unit:"pt"},p={mul:1/12700,unit:"pt"},u={mul:.5,unit:"pt"},d={mul:.125,unit:"pt",min:.25,max:12},f={mul:1,unit:"pt"},g={mul:.02,unit:"%"};function b(e,t=m){if(null==e||/.+(p[xt]|[%])$/.test(e))return e;var r=parseInt(e)*t.mul;return t.min&&t.max&&(r=function(e,t,r){return t>e?t:rfunction(e,t){let r={name:t.attr(e,"name"),embedFontRefs:[]};for(let a of t.elements(e))switch(a.localName){case"family":r.family=t.attr(a,"val");break;case"altName":r.altName=t.attr(a,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":r.embedFontRefs.push(C(a,t))}return r}(e,t))}function C(e,t){return{id:t.attr(e,"id"),key:t.attr(e,"fontKey"),type:P[e.localName]}}class x extends S{parseXml(e){this.fonts=w(e,this._package.xmlParser)}}class N{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new k}get(e){const t=function(e){return e.startsWith("/")?e.substr(1):e}(e);return this._zip.files[t]??this._zip.files[t.replace(/\//g,"\\")]}update(e,t){this._zip.file(e,t)}static async load(e,r){const a=await t.loadAsync(e);return new N(a,r)}save(e="blob"){return this._zip.generateAsync({type:e})}load(e,t="string"){return this.get(e)?.async(t)??Promise.resolve(null)}async loadRelationships(e=null){let t="_rels/.rels";if(null!=e){const[r,a]=s(e);t=`${r}_rels/${a}.rels`}const r=await this.load(t);return r?(a=this.parseXmlDocument(r).firstElementChild,(n=this.xmlParser).elements(a).map(e=>({id:n.attr(e,"Id"),type:n.attr(e,"Type"),target:n.attr(e,"Target"),targetMode:n.attr(e,"TargetMode")}))):null;var a,n}parseXmlDocument(e){return function(e,t=!1){var r;t&&(e=e.replace(/<[?].*[?]>/,"")),e=65279===(r=e).charCodeAt(0)?r.substring(1):r;const a=(new DOMParser).parseFromString(e,"application/xml"),s=(n=a,n.getElementsByTagName("parsererror")[0]?.textContent);var n;if(s)throw new Error(s);return a}(e,this.options.trimXmlDeclaration)}}class M extends S{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}}function A(e,t){return{type:t.attr(e,"val"),color:t.attr(e,"color"),size:t.lengthAttr(e,"sz",d),offset:t.lengthAttr(e,"space",f),frame:t.boolAttr(e,"frame"),shadow:t.boolAttr(e,"shadow")}}function E(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"left":r.left=A(a,t);break;case"top":r.top=A(a,t);break;case"right":r.right=A(a,t);break;case"bottom":r.bottom=A(a,t)}return r}var T,R;function B(e,t=v){var r={};for(let a of t.elements(e))switch(a.localName){case"pgSz":r.pageSize={width:t.lengthAttr(a,"w"),height:t.lengthAttr(a,"h"),orientation:t.attr(a,"orient")};break;case"type":r.type=t.attr(a,"val");break;case"pgMar":r.pageMargins={left:t.lengthAttr(a,"left"),right:t.lengthAttr(a,"right"),top:t.lengthAttr(a,"top"),bottom:t.lengthAttr(a,"bottom"),header:t.lengthAttr(a,"header"),footer:t.lengthAttr(a,"footer"),gutter:t.lengthAttr(a,"gutter")};break;case"cols":r.columns=D(a,t);break;case"headerReference":(r.headerRefs??(r.headerRefs=[])).push(F(a,t));break;case"footerReference":(r.footerRefs??(r.footerRefs=[])).push(F(a,t));break;case"titlePg":r.titlePage=t.boolAttr(a,"val",!0);break;case"pgBorders":r.pageBorders=E(a,t);break;case"pgNumType":r.pageNumber=$(a,t)}return r}function D(e,t){return{numberOfColumns:t.intAttr(e,"num"),space:t.lengthAttr(e,"space"),separator:t.boolAttr(e,"sep"),equalWidth:t.boolAttr(e,"equalWidth",!0),columns:t.elements(e,"col").map(e=>({width:t.lengthAttr(e,"w"),space:t.lengthAttr(e,"space")}))}}function $(e,t){return{chapSep:t.attr(e,"chapSep"),chapStyle:t.attr(e,"chapStyle"),format:t.attr(e,"fmt"),start:t.intAttr(e,"start")}}function F(e,t){return{id:t.attr(e,"id"),type:t.attr(e,"type")}}function L(e,t){let r={};for(let a of t.elements(e))I(a,r,t);return r}function I(e,t,r){return!!y(e,t,r)}function O(e,t){let r={};for(let a of t.elements(e))H(a,r,t);return r}function H(e,t,r){if(e.namespaceURI!=h)return!1;if(y(e,t,r))return!0;switch(e.localName){case"tabs":t.tabs=function(e,t){return t.elements(e,"tab").map(e=>({position:t.lengthAttr(e,"pos"),leader:t.attr(e,"leader"),style:t.attr(e,"val")}))}(e,r);break;case"sectPr":t.sectionProps=B(e,r);break;case"numPr":t.numbering=function(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"numId":r.id=t.attr(a,"val");break;case"ilvl":r.level=t.intAttr(a,"val")}return r}(e,r);break;case"spacing":return t.lineSpacing=function(e,t){return{before:t.lengthAttr(e,"before"),after:t.lengthAttr(e,"after"),line:t.intAttr(e,"line"),lineRule:t.attr(e,"lineRule")}}(e,r),!1;case"textAlignment":return t.textAlignment=r.attr(e,"val"),!1;case"keepLines":t.keepLines=r.boolAttr(e,"val",!0);break;case"keepNext":t.keepNext=r.boolAttr(e,"val",!0);break;case"pageBreakBefore":t.pageBreakBefore=r.boolAttr(e,"val",!0);break;case"outlineLvl":t.outlineLevel=r.intAttr(e,"val");break;case"pStyle":t.styleName=r.attr(e,"val");break;case"rPr":t.runProps=L(e,r);break;default:return!1}return!0}function _(e,t){let r={id:t.attr(e,"numId"),overrides:[]};for(let a of t.elements(e))switch(a.localName){case"abstractNumId":r.abstractId=t.attr(a,"val");break;case"lvlOverride":r.overrides.push(j(a,t))}return r}function z(e,t){let r={id:t.attr(e,"abstractNumId"),levels:[]};for(let a of t.elements(e))switch(a.localName){case"name":r.name=t.attr(a,"val");break;case"multiLevelType":r.multiLevelType=t.attr(a,"val");break;case"numStyleLink":r.numberingStyleLink=t.attr(a,"val");break;case"styleLink":r.styleLink=t.attr(a,"val");break;case"lvl":r.levels.push(V(a,t))}return r}function V(e,t){let r={level:t.intAttr(e,"ilvl")};for(let a of t.elements(e))switch(a.localName){case"start":r.start=t.attr(a,"val");break;case"lvlRestart":r.restart=t.intAttr(a,"val");break;case"numFmt":r.format=t.attr(a,"val");break;case"lvlText":r.text=t.attr(a,"val");break;case"lvlJc":r.justification=t.attr(a,"val");break;case"lvlPicBulletId":r.bulletPictureId=t.attr(a,"val");break;case"pStyle":r.paragraphStyle=t.attr(a,"val");break;case"pPr":r.paragraphProps=O(a,t);break;case"rPr":r.runProps=L(a,t)}return r}function j(e,t){let r={level:t.intAttr(e,"ilvl")};for(let a of t.elements(e))switch(a.localName){case"startOverride":r.start=t.intAttr(a,"val");break;case"lvl":r.numberingLevel=V(a,t)}return r}function W(e,t){var r=t.element(e,"pict"),a=r&&t.element(r,"shape"),s=a&&t.element(a,"imagedata");return s?{id:t.attr(e,"numPicBulletId"),referenceId:t.attr(s,"id"),style:t.attr(a,"style")}:null}!function(e){e.Continuous="continuous",e.NextPage="nextPage",e.NextColumn="nextColumn",e.EvenPage="evenPage",e.OddPage="oddPage"}(T||(T={}));class X extends S{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){Object.assign(this,function(e,t){let r={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let a of t.elements(e))switch(a.localName){case"num":r.numberings.push(_(a,t));break;case"abstractNum":r.abstractNumberings.push(z(a,t));break;case"numPicBullet":r.bulletPictures.push(W(a,t))}return r}(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}}class G extends S{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}}!function(e){e.Document="document",e.Paragraph="paragraph",e.Run="run",e.Break="break",e.NoBreakHyphen="noBreakHyphen",e.Table="table",e.Row="row",e.Cell="cell",e.Hyperlink="hyperlink",e.SmartTag="smartTag",e.Drawing="drawing",e.Image="image",e.Text="text",e.Tab="tab",e.Symbol="symbol",e.BookmarkStart="bookmarkStart",e.BookmarkEnd="bookmarkEnd",e.Footer="footer",e.Header="header",e.FootnoteReference="footnoteReference",e.EndnoteReference="endnoteReference",e.Footnote="footnote",e.Endnote="endnote",e.SimpleField="simpleField",e.ComplexField="complexField",e.Instruction="instruction",e.VmlPicture="vmlPicture",e.MmlMath="mmlMath",e.MmlMathParagraph="mmlMathParagraph",e.MmlFraction="mmlFraction",e.MmlFunction="mmlFunction",e.MmlFunctionName="mmlFunctionName",e.MmlNumerator="mmlNumerator",e.MmlDenominator="mmlDenominator",e.MmlRadical="mmlRadical",e.MmlBase="mmlBase",e.MmlDegree="mmlDegree",e.MmlSuperscript="mmlSuperscript",e.MmlSubscript="mmlSubscript",e.MmlPreSubSuper="mmlPreSubSuper",e.MmlSubArgument="mmlSubArgument",e.MmlSuperArgument="mmlSuperArgument",e.MmlNary="mmlNary",e.MmlDelimiter="mmlDelimiter",e.MmlRun="mmlRun",e.MmlEquationArray="mmlEquationArray",e.MmlLimit="mmlLimit",e.MmlLimitLower="mmlLimitLower",e.MmlMatrix="mmlMatrix",e.MmlMatrixRow="mmlMatrixRow",e.MmlBox="mmlBox",e.MmlBar="mmlBar",e.MmlGroupChar="mmlGroupChar",e.VmlElement="vmlElement",e.Inserted="inserted",e.Deleted="deleted",e.DeletedText="deletedText",e.Comment="comment",e.CommentReference="commentReference",e.CommentRangeStart="commentRangeStart",e.CommentRangeEnd="commentRangeEnd",e.AltChunk="altChunk"}(R||(R={}));class U{constructor(){this.children=[],this.cssStyle={}}}class q extends U{constructor(){super(...arguments),this.type=R.Header}}class J extends U{constructor(){super(...arguments),this.type=R.Footer}}class Z extends S{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}}class K extends Z{createRootElement(){return new q}}class Y extends Z{createRootElement(){return new J}}function Q(e){if(void 0!==e)return parseInt(e)}class ee extends S{parseXml(e){this.props=function(e,t){const r={};for(let a of t.elements(e))switch(a.localName){case"Template":r.template=a.textContent;break;case"Pages":r.pages=Q(a.textContent);break;case"Words":r.words=Q(a.textContent);break;case"Characters":r.characters=Q(a.textContent);break;case"Application":r.application=a.textContent;break;case"Lines":r.lines=Q(a.textContent);break;case"Paragraphs":r.paragraphs=Q(a.textContent);break;case"Company":r.company=a.textContent;break;case"AppVersion":r.appVersion=a.textContent}return r}(e,this._package.xmlParser)}}class te extends S{parseXml(e){this.props=function(e,t){const r={};for(let a of t.elements(e))switch(a.localName){case"title":r.title=a.textContent;break;case"description":r.description=a.textContent;break;case"subject":r.subject=a.textContent;break;case"creator":r.creator=a.textContent;break;case"keywords":r.keywords=a.textContent;break;case"language":r.language=a.textContent;break;case"lastModifiedBy":r.lastModifiedBy=a.textContent;break;case"revision":a.textContent&&(r.revision=parseInt(a.textContent))}return r}(e,this._package.xmlParser)}}class re{}function ae(e,t){var r={name:t.attr(e,"name"),colors:{}};for(let n of t.elements(e)){var a=t.element(n,"srgbClr"),s=t.element(n,"sysClr");a?r.colors[n.localName]=t.attr(a,"val"):s&&(r.colors[n.localName]=t.attr(s,"lastClr"))}return r}function se(e,t){var r={name:t.attr(e,"name")};for(let a of t.elements(e))switch(a.localName){case"majorFont":r.majorFont=ne(a,t);break;case"minorFont":r.minorFont=ne(a,t)}return r}function ne(e,t){return{latinTypeface:t.elementAttr(e,"latin","typeface"),eaTypeface:t.elementAttr(e,"ea","typeface"),csTypeface:t.elementAttr(e,"cs","typeface")}}class le extends S{constructor(e,t){super(e,t)}parseXml(e){this.theme=function(e,t){var r=new re,a=t.element(e,"themeElements");for(let e of t.elements(a))switch(e.localName){case"clrScheme":r.colorScheme=ae(e,t);break;case"fontScheme":r.fontScheme=se(e,t)}return r}(e,this._package.xmlParser)}}class oe{}class ie extends oe{constructor(){super(...arguments),this.type=R.Footnote}}class ce extends oe{constructor(){super(...arguments),this.type=R.Endnote}}class he extends S{constructor(e,t,r){super(e,t),this._documentParser=r}}class me extends he{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"footnote",ie)}}class pe extends he{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"endnote",ce)}}function ue(e,t){var r={defaultNoteIds:[]};for(let a of t.elements(e))switch(a.localName){case"numFmt":r.nummeringFormat=t.attr(a,"val");break;case"footnote":case"endnote":r.defaultNoteIds.push(t.attr(a,"id"))}return r}class de extends S{constructor(e,t){super(e,t)}parseXml(e){this.settings=function(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"defaultTabStop":r.defaultTabStop=t.lengthAttr(a,"val");break;case"footnotePr":r.footnoteProps=ue(a,t);break;case"endnotePr":r.endnoteProps=ue(a,t);break;case"autoHyphenation":r.autoHyphenation=t.boolAttr(a,"val")}return r}(e,this._package.xmlParser)}}class fe extends S{parseXml(e){this.props=function(e,t){return t.elements(e,"property").map(e=>{const r=e.firstChild;return{formatId:t.attr(e,"fmtid"),name:t.attr(e,"name"),type:r.nodeName,value:r.textContent}})}(e,this._package.xmlParser)}}class ge extends S{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.comments=this._documentParser.parseComments(e),this.commentMap=l(this.comments,e=>e.id)}}class be extends S{constructor(e,t){super(e,t),this.comments=[]}parseXml(e){const t=this._package.xmlParser;for(let r of t.elements(e,"commentEx"))this.comments.push({paraId:t.attr(r,"paraId"),paraIdParent:t.attr(r,"paraIdParent"),done:t.boolAttr(r,"done")});this.commentMap=l(this.comments,e=>e.paraId)}}const ye=[{type:r.OfficeDocument,target:"word/document.xml"},{type:r.ExtendedProperties,target:"docProps/app.xml"},{type:r.CoreProperties,target:"docProps/core.xml"},{type:r.CustomProperties,target:"docProps/custom.xml"}];class ke{constructor(){this.parts=[],this.partsMap={}}static async load(e,t,r){var a=new ke;return a._options=r,a._parser=t,a._package=await N.load(e,r),a.rels=await a._package.loadRelationships(),await Promise.all(ye.map(e=>{const t=a.rels.find(t=>t.type===e.type)??e;return a.loadRelationshipPart(t.target,t.type)})),a}save(e="blob"){return this._package.save(e)}async loadRelationshipPart(e,t){if(this.partsMap[e])return this.partsMap[e];if(!this._package.get(e))return null;let a=null;switch(t){case r.OfficeDocument:this.documentPart=a=new M(this._package,e,this._parser);break;case r.FontTable:this.fontTablePart=a=new x(this._package,e);break;case r.Numbering:this.numberingPart=a=new X(this._package,e,this._parser);break;case r.Styles:this.stylesPart=a=new G(this._package,e,this._parser);break;case r.Theme:this.themePart=a=new le(this._package,e);break;case r.Footnotes:this.footnotesPart=a=new me(this._package,e,this._parser);break;case r.Endnotes:this.endnotesPart=a=new pe(this._package,e,this._parser);break;case r.Footer:a=new Y(this._package,e,this._parser);break;case r.Header:a=new K(this._package,e,this._parser);break;case r.CoreProperties:this.corePropsPart=a=new te(this._package,e);break;case r.ExtendedProperties:this.extendedPropsPart=a=new ee(this._package,e);break;case r.CustomProperties:a=new fe(this._package,e);break;case r.Settings:this.settingsPart=a=new de(this._package,e);break;case r.Comments:this.commentsPart=a=new ge(this._package,e,this._parser);break;case r.CommentsExtended:this.commentsExtendedPart=a=new be(this._package,e)}if(null==a)return Promise.resolve(null);if(this.partsMap[e]=a,this.parts.push(a),await a.load(),a.rels?.length>0){const[e]=s(a.path);await Promise.all(a.rels.map(t=>this.loadRelationshipPart(n(t.target,e),t.type)))}return a}async loadDocumentImage(e,t){const r=await this.loadResource(t??this.documentPart,e,"blob");return this.blobToURL(r)}async loadNumberingImage(e){const t=await this.loadResource(this.numberingPart,e,"blob");return this.blobToURL(t)}async loadFont(e,t){const r=await this.loadResource(this.fontTablePart,e,"uint8array");return r?this.blobToURL(new Blob([ve(r,t)])):r}async loadAltChunk(e,t){return await this.loadResource(t??this.documentPart,e,"string")}blobToURL(e){return e?this._options.useBase64URL?function(e){return new Promise((t,r)=>{const a=new FileReader;a.onloadend=()=>t(a.result),a.onerror=()=>r(),a.readAsDataURL(e)})}(e):URL.createObjectURL(e):null}findPartByRelId(e,t=null){var r=(t.rels??this.rels).find(t=>t.id==e);const a=t?s(t.path)[0]:"";return r?this.partsMap[n(r.target,a)]:null}getPathById(e,t){const r=e.rels.find(e=>e.id==t),[a]=s(e.path);return r?n(r.target,a):null}loadResource(e,t,r){const a=this.getPathById(e,t);return a?this._package.load(a,r):Promise.resolve(null)}}function ve(e,t){const r=t.replace(/{|}|-/g,""),a=new Array(16);for(let e=0;e<16;e++)a[16-e-1]=parseInt(r.substring(2*e,2*e+2),16);for(let t=0;t<32;t++)e[t]=e[t]^a[t%16];return e}function Se(e,t){return{type:R.BookmarkStart,id:t.attr(e,"id"),name:t.attr(e,"name"),colFirst:t.intAttr(e,"colFirst"),colLast:t.intAttr(e,"colLast")}}function Pe(e,t){return{type:R.BookmarkEnd,id:t.attr(e,"id")}}class we extends U{constructor(){super(...arguments),this.type=R.VmlElement,this.attrs={}}}function Ce(e,t){var r=new we;switch(e.localName){case"rect":r.tagName="rect",Object.assign(r.attrs,{width:"100%",height:"100%"});break;case"oval":r.tagName="ellipse",Object.assign(r.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":r.tagName="line";break;case"shape":r.tagName="g";break;case"textbox":r.tagName="foreignObject",Object.assign(r.attrs,{width:"100%",height:"100%"});break;default:return null}for(const t of v.attrs(e))switch(t.localName){case"style":r.cssStyleText=t.value;break;case"fillcolor":r.attrs.fill=t.value;break;case"from":const[e,a]=Me(t.value);Object.assign(r.attrs,{x1:e,y1:a});break;case"to":const[s,n]=Me(t.value);Object.assign(r.attrs,{x2:s,y2:n})}for(const a of v.elements(e))switch(a.localName){case"stroke":Object.assign(r.attrs,xe(a));break;case"fill":Object.assign(r.attrs,Ne());break;case"imagedata":r.tagName="image",Object.assign(r.attrs,{width:"100%",height:"100%"}),r.imageHref={id:v.attr(a,"id"),title:v.attr(a,"title")};break;case"txbxContent":r.children.push(...t.parseBodyElements(a));break;default:const e=Ce(a,t);e&&r.children.push(e)}return r}function xe(e){return{stroke:v.attr(e,"color"),"stroke-width":v.lengthAttr(e,"weight",p)??"1px"}}function Ne(e){return{}}function Me(e){return e.split(",")}class Ae extends U{constructor(){super(...arguments),this.type=R.Comment}}class Ee extends U{constructor(e){super(),this.id=e,this.type=R.CommentReference}}class Te extends U{constructor(e){super(),this.id=e,this.type=R.CommentRangeStart}}class Re extends U{constructor(e){super(),this.id=e,this.type=R.CommentRangeEnd}}var Be="inherit",De="black",$e="black",Fe="transparent";const Le=[],Ie={oMath:R.MmlMath,oMathPara:R.MmlMathParagraph,f:R.MmlFraction,func:R.MmlFunction,fName:R.MmlFunctionName,num:R.MmlNumerator,den:R.MmlDenominator,rad:R.MmlRadical,deg:R.MmlDegree,e:R.MmlBase,sSup:R.MmlSuperscript,sSub:R.MmlSubscript,sPre:R.MmlPreSubSuper,sup:R.MmlSuperArgument,sub:R.MmlSubArgument,d:R.MmlDelimiter,nary:R.MmlNary,eqArr:R.MmlEquationArray,lim:R.MmlLimit,limLow:R.MmlLimitLower,m:R.MmlMatrix,mr:R.MmlMatrixRow,box:R.MmlBox,bar:R.MmlBar,groupChr:R.MmlGroupChar};class Oe{constructor(e){this.options={ignoreWidth:!1,debug:!1,...e}}parseNotes(e,t,r){var a=[];for(let s of v.elements(e,t)){const e=new r;e.id=v.attr(s,"id"),e.noteType=v.attr(s,"type"),e.children=this.parseBodyElements(s),a.push(e)}return a}parseComments(e){var t=[];for(let r of v.elements(e,"comment")){const e=new Ae;e.id=v.attr(r,"id"),e.author=v.attr(r,"author"),e.initials=v.attr(r,"initials"),e.date=v.attr(r,"date"),e.children=this.parseBodyElements(r),t.push(e)}return t}parseDocumentFile(e){var t=v.element(e,"body"),r=v.element(e,"background"),a=v.element(t,"sectPr");return{type:R.Document,children:this.parseBodyElements(t),props:a?B(a,v):{},cssStyle:r?this.parseBackground(r):{}}}parseBackground(e){var t={},r=_e.colorAttr(e,"color");return r&&(t["background-color"]=r),t}parseBodyElements(e){var t=[];for(const r of v.elements(e))switch(r.localName){case"p":t.push(this.parseParagraph(r));break;case"altChunk":t.push(this.parseAltChunk(r));break;case"tbl":t.push(this.parseTable(r));break;case"sdt":t.push(...this.parseSdt(r,e=>this.parseBodyElements(e)))}return t}parseStylesFile(e){var t=[];for(const r of v.elements(e))switch(r.localName){case"style":t.push(this.parseStyle(r));break;case"docDefaults":t.push(this.parseDefaultStyles(r))}return t}parseDefaultStyles(e){var t={id:null,name:null,target:null,basedOn:null,styles:[]};for(const s of v.elements(e))switch(s.localName){case"rPrDefault":var r=v.element(s,"rPr");r&&t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})});break;case"pPrDefault":var a=v.element(s,"pPr");a&&t.styles.push({target:"p",values:this.parseDefaultProperties(a,{})})}return t}parseStyle(e){var t={id:v.attr(e,"styleId"),isDefault:v.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(v.attr(e,"type")){case"paragraph":t.target="p";break;case"table":t.target="table";break;case"character":t.target="span"}for(const r of v.elements(e))switch(r.localName){case"basedOn":t.basedOn=v.attr(r,"val");break;case"name":t.name=v.attr(r,"val");break;case"link":t.linked=v.attr(r,"val");break;case"next":t.next=v.attr(r,"val");break;case"aliases":t.aliases=v.attr(r,"val").split(",");break;case"pPr":t.styles.push({target:"p",values:this.parseDefaultProperties(r,{})}),t.paragraphProps=O(r,v);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})}),t.runProps=L(r,v);break;case"tblPr":case"tcPr":t.styles.push({target:"td",values:this.parseDefaultProperties(r,{})});break;case"tblStylePr":for(let e of this.parseTableStyle(r))t.styles.push(e);break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:this.options.debug&&console.warn(`DOCX: Unknown style element: ${r.localName}`)}return t}parseTableStyle(e){var t=[],r="",a="";switch(v.attr(e,"type")){case"firstRow":a=".first-row",r="tr.first-row td";break;case"lastRow":a=".last-row",r="tr.last-row td";break;case"firstCol":a=".first-col",r="td.first-col";break;case"lastCol":a=".last-col",r="td.last-col";break;case"band1Vert":a=":not(.no-vband)",r="td.odd-col";break;case"band2Vert":a=":not(.no-vband)",r="td.even-col";break;case"band1Horz":a=":not(.no-hband)",r="tr.odd-row";break;case"band2Horz":a=":not(.no-hband)",r="tr.even-row";break;default:return[]}for(const s of v.elements(e))switch(s.localName){case"pPr":t.push({target:`${r} p`,mod:a,values:this.parseDefaultProperties(s,{})});break;case"rPr":t.push({target:`${r} span`,mod:a,values:this.parseDefaultProperties(s,{})});break;case"tblPr":case"tcPr":t.push({target:r,mod:a,values:this.parseDefaultProperties(s,{})})}return t}parseNumberingFile(e){var t=[],r={},a=[];for(const l of v.elements(e))switch(l.localName){case"abstractNum":this.parseAbstractNumbering(l,a).forEach(e=>t.push(e));break;case"numPicBullet":a.push(this.parseNumberingPicBullet(l));break;case"num":var s=v.attr(l,"numId"),n=v.elementAttr(l,"abstractNumId","val");r[n]=s}return t.forEach(e=>e.id=r[e.id]),t}parseNumberingPicBullet(e){var t=v.element(e,"pict"),r=t&&v.element(t,"shape"),a=r&&v.element(r,"imagedata");return a?{id:v.intAttr(e,"numPicBulletId"),src:v.attr(a,"id"),style:v.attr(r,"style")}:null}parseAbstractNumbering(e,t){var r=[],a=v.attr(e,"abstractNumId");for(const s of v.elements(e))if("lvl"===s.localName)r.push(this.parseNumberingLevel(a,s,t));return r}parseNumberingLevel(e,t,r){var a={id:e,level:v.intAttr(t,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};for(const e of v.elements(t))switch(e.localName){case"start":a.start=v.intAttr(e,"val");break;case"pPr":this.parseDefaultProperties(e,a.pStyle);break;case"rPr":this.parseDefaultProperties(e,a.rStyle);break;case"lvlPicBulletId":var s=v.intAttr(e,"val");a.bullet=r.find(e=>e?.id==s);break;case"lvlText":a.levelText=v.attr(e,"val");break;case"pStyle":a.pStyleName=v.attr(e,"val");break;case"numFmt":a.format=v.attr(e,"val");break;case"suff":a.suff=v.attr(e,"val")}return a}parseSdt(e,t){const r=v.element(e,"sdtContent");return r?t(r):[]}parseInserted(e,t){return{type:R.Inserted,children:t(e)?.children??[]}}parseDeleted(e,t){return{type:R.Deleted,children:t(e)?.children??[]}}parseAltChunk(e){return{type:R.AltChunk,children:[],id:v.attr(e,"id")}}parseParagraph(e){var t={type:R.Paragraph,children:[]};for(let r of v.elements(e))switch(r.localName){case"pPr":this.parseParagraphProperties(r,t);break;case"r":t.children.push(this.parseRun(r,t));break;case"hyperlink":t.children.push(this.parseHyperlink(r,t));break;case"smartTag":t.children.push(this.parseSmartTag(r,t));break;case"bookmarkStart":t.children.push(Se(r,v));break;case"bookmarkEnd":t.children.push(Pe(r,v));break;case"commentRangeStart":t.children.push(new Te(v.attr(r,"id")));break;case"commentRangeEnd":t.children.push(new Re(v.attr(r,"id")));break;case"oMath":case"oMathPara":t.children.push(this.parseMathElement(r));break;case"sdt":t.children.push(...this.parseSdt(r,e=>this.parseParagraph(e).children));break;case"ins":t.children.push(this.parseInserted(r,e=>this.parseParagraph(e)));break;case"del":t.children.push(this.parseDeleted(r,e=>this.parseParagraph(e)))}return t}parseParagraphProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,e=>{if(H(e,t,v))return!0;switch(e.localName){case"pStyle":t.styleName=v.attr(e,"val");break;case"cnfStyle":t.className=ze.classNameOfCnfStyle(e);break;case"framePr":this.parseFrame(e,t);break;case"rPr":break;default:return!1}return!0})}parseFrame(e,t){"drop"==v.attr(e,"dropCap")&&(t.cssStyle.float="left")}parseHyperlink(e,t){var r={type:R.Hyperlink,parent:t,children:[]};r.anchor=v.attr(e,"anchor"),r.id=v.attr(e,"id");for(const t of v.elements(e))if("r"===t.localName)r.children.push(this.parseRun(t,r));return r}parseSmartTag(e,t){var r={type:R.SmartTag,parent:t,children:[]},a=v.attr(e,"uri"),s=v.attr(e,"element");a&&(r.uri=a),s&&(r.element=s);for(const t of v.elements(e))if("r"===t.localName)r.children.push(this.parseRun(t,r));return r}parseRun(e,t){var r={type:R.Run,parent:t,children:[]};for(let t of v.elements(e))switch(t=this.checkAlternateContent(t),t.localName){case"t":r.children.push({type:R.Text,text:t.textContent});break;case"delText":r.children.push({type:R.DeletedText,text:t.textContent});break;case"commentReference":r.children.push(new Ee(v.attr(t,"id")));break;case"fldSimple":r.children.push({type:R.SimpleField,instruction:v.attr(t,"instr"),lock:v.boolAttr(t,"lock",!1),dirty:v.boolAttr(t,"dirty",!1)});break;case"instrText":r.fieldRun=!0,r.children.push({type:R.Instruction,text:t.textContent});break;case"fldChar":r.fieldRun=!0,r.children.push({type:R.ComplexField,charType:v.attr(t,"fldCharType"),lock:v.boolAttr(t,"lock",!1),dirty:v.boolAttr(t,"dirty",!1)});break;case"noBreakHyphen":r.children.push({type:R.NoBreakHyphen});break;case"br":r.children.push({type:R.Break,break:v.attr(t,"type")||"textWrapping"});break;case"lastRenderedPageBreak":r.children.push({type:R.Break,break:"lastRenderedPageBreak"});break;case"sym":r.children.push({type:R.Symbol,font:a(v.attr(t,"font")),char:v.attr(t,"char")});break;case"tab":r.children.push({type:R.Tab});break;case"footnoteReference":r.children.push({type:R.FootnoteReference,id:v.attr(t,"id")});break;case"endnoteReference":r.children.push({type:R.EndnoteReference,id:v.attr(t,"id")});break;case"drawing":let e=this.parseDrawing(t);e&&(r.children=[e]);break;case"pict":r.children.push(this.parseVmlPicture(t));break;case"rPr":this.parseRunProperties(t,r)}return r}parseMathElement(e){const t=`${e.localName}Pr`,r={type:Ie[e.localName],children:[]};for(const s of v.elements(e)){if(Ie[s.localName])r.children.push(this.parseMathElement(s));else if("r"==s.localName){var a=this.parseRun(s);a.type=R.MmlRun,r.children.push(a)}else s.localName==t&&(r.props=this.parseMathProperies(s))}return r}parseMathProperies(e){const t={};for(const r of v.elements(e))switch(r.localName){case"chr":t.char=v.attr(r,"val");break;case"vertJc":t.verticalJustification=v.attr(r,"val");break;case"pos":t.position=v.attr(r,"val");break;case"degHide":t.hideDegree=v.boolAttr(r,"val");break;case"begChr":t.beginChar=v.attr(r,"val");break;case"endChr":t.endChar=v.attr(r,"val")}return t}parseRunProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,e=>{switch(e.localName){case"rStyle":t.styleName=v.attr(e,"val");break;case"vertAlign":t.verticalAlign=ze.valueOfVertAlign(e,!0);break;default:return!1}return!0})}parseVmlPicture(e){const t={type:R.VmlPicture,children:[]};for(const r of v.elements(e)){const e=Ce(r,this);e&&t.children.push(e)}return t}checkAlternateContent(e){if("AlternateContent"!=e.localName)return e;var t=v.element(e,"Choice");if(t){var r=v.attr(t,"Requires"),a=e.lookupNamespaceURI(r);if(Le.includes(a))return t.firstElementChild}return v.element(e,"Fallback")?.firstElementChild}parseDrawing(e){for(var t of v.elements(e))switch(t.localName){case"inline":case"anchor":return this.parseDrawingWrapper(t)}}parseDrawingWrapper(e){var t={type:R.Drawing,children:[],cssStyle:{}},r="anchor"==e.localName;let a=null,s=v.boolAttr(e,"simplePos");v.boolAttr(e,"behindDoc");let n={relative:"page",align:"left",offset:"0"},l={relative:"page",align:"top",offset:"0"};for(var o of v.elements(e))switch(o.localName){case"simplePos":s&&(n.offset=v.lengthAttr(o,"x",p),l.offset=v.lengthAttr(o,"y",p));break;case"extent":t.cssStyle.width=v.lengthAttr(o,"cx",p),t.cssStyle.height=v.lengthAttr(o,"cy",p);break;case"positionH":case"positionV":if(!s){let e="positionH"==o.localName?n:l;var i=v.element(o,"align"),c=v.element(o,"posOffset");e.relative=v.attr(o,"relativeFrom")??e.relative,i&&(e.align=i.textContent),c&&(e.offset=b(c.textContent,p))}break;case"wrapTopAndBottom":a="wrapTopAndBottom";break;case"wrapNone":a="wrapNone";break;case"graphic":var h=this.parseGraphic(o);h&&t.children.push(h)}return"wrapTopAndBottom"==a?(t.cssStyle.display="block",n.align&&(t.cssStyle["text-align"]=n.align,t.cssStyle.width="100%")):"wrapNone"==a?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",n.offset&&(t.cssStyle.left=n.offset),l.offset&&(t.cssStyle.top=l.offset)):!r||"left"!=n.align&&"right"!=n.align||(t.cssStyle.float=n.align),t}parseGraphic(e){var t=v.element(e,"graphicData");for(let e of v.elements(t))if("pic"===e.localName)return this.parsePicture(e);return null}parsePicture(e){var t={type:R.Image,src:"",cssStyle:{}},r=v.element(e,"blipFill"),a=v.element(r,"blip"),s=v.element(r,"srcRect");t.src=v.attr(a,"embed"),s&&(t.srcRect=[v.intAttr(s,"l",0)/1e5,v.intAttr(s,"t",0)/1e5,v.intAttr(s,"r",0)/1e5,v.intAttr(s,"b",0)/1e5]);var n=v.element(e,"spPr"),l=v.element(n,"xfrm");if(t.cssStyle.position="relative",l)for(var o of(t.rotation=v.intAttr(l,"rot",0)/6e4,v.elements(l)))switch(o.localName){case"ext":t.cssStyle.width=v.lengthAttr(o,"cx",p),t.cssStyle.height=v.lengthAttr(o,"cy",p);break;case"off":t.cssStyle.left=v.lengthAttr(o,"x",p),t.cssStyle.top=v.lengthAttr(o,"y",p)}return t}parseTable(e){var t={type:R.Table,children:[]};for(const r of v.elements(e))switch(r.localName){case"tr":t.children.push(this.parseTableRow(r));break;case"tblGrid":t.columns=this.parseTableColumns(r);break;case"tblPr":this.parseTableProperties(r,t)}return t}parseTableColumns(e){var t=[];for(const r of v.elements(e))if("gridCol"===r.localName)t.push({width:v.lengthAttr(r,"w")});return t}parseTableProperties(e,t){switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,e=>{switch(e.localName){case"tblStyle":t.styleName=v.attr(e,"val");break;case"tblLook":t.className=ze.classNameOftblLook(e);break;case"tblpPr":this.parseTablePosition(e,t);break;case"tblStyleColBandSize":t.colBandSize=v.intAttr(e,"val");break;case"tblStyleRowBandSize":t.rowBandSize=v.intAttr(e,"val");break;case"hidden":t.cssStyle.display="none";break;default:return!1}return!0}),t.cssStyle["text-align"]){case"center":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto";break;case"right":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto"}}parseTablePosition(e,t){var r=v.lengthAttr(e,"topFromText"),a=v.lengthAttr(e,"bottomFromText"),s=v.lengthAttr(e,"rightFromText"),n=v.lengthAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=ze.addSize(t.cssStyle["margin-bottom"],a),t.cssStyle["margin-left"]=ze.addSize(t.cssStyle["margin-left"],n),t.cssStyle["margin-right"]=ze.addSize(t.cssStyle["margin-right"],s),t.cssStyle["margin-top"]=ze.addSize(t.cssStyle["margin-top"],r)}parseTableRow(e){var t={type:R.Row,children:[]};for(const r of v.elements(e))switch(r.localName){case"tc":t.children.push(this.parseTableCell(r));break;case"trPr":case"tblPrEx":this.parseTableRowProperties(r,t)}return t}parseTableRowProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,e=>{switch(e.localName){case"cnfStyle":t.className=ze.classNameOfCnfStyle(e);break;case"tblHeader":t.isHeader=v.boolAttr(e,"val");break;case"gridBefore":t.gridBefore=v.intAttr(e,"val");break;case"gridAfter":t.gridAfter=v.intAttr(e,"val");break;default:return!1}return!0})}parseTableCell(e){var t={type:R.Cell,children:[]};for(const r of v.elements(e))switch(r.localName){case"tbl":t.children.push(this.parseTable(r));break;case"p":t.children.push(this.parseParagraph(r));break;case"tcPr":this.parseTableCellProperties(r,t)}return t}parseTableCellProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,e=>{switch(e.localName){case"gridSpan":t.span=v.intAttr(e,"val",null);break;case"vMerge":t.verticalMerge=v.attr(e,"val")??"continue";break;case"cnfStyle":t.className=ze.classNameOfCnfStyle(e);break;default:return!1}return!0}),this.parseTableCellVerticalText(e,t)}parseTableCellVerticalText(e,t){const r={btLr:{writingMode:"vertical-rl",transform:"rotate(180deg)"},lrTb:{writingMode:"vertical-lr",transform:"none"},tbRl:{writingMode:"vertical-rl",transform:"none"}};for(const a of v.elements(e))if("textDirection"===a.localName){const e=r[v.attr(a,"val")]||{writingMode:"horizontal-tb"};t.cssStyle["writing-mode"]=e.writingMode,t.cssStyle.transform=e.transform}}parseDefaultProperties(e,t=null,r=null,a=null){t=t||{};for(const s of v.elements(e))if(!a?.(s))switch(s.localName){case"jc":t["text-align"]=ze.valueOfJc(s);break;case"textAlignment":t["vertical-align"]=ze.valueOfTextAlignment(s);break;case"color":t.color=_e.colorAttr(s,"val",null,De);break;case"sz":t["font-size"]=t["min-height"]=v.lengthAttr(s,"val",u);break;case"shd":t["background-color"]=_e.colorAttr(s,"fill",null,Be);break;case"highlight":t["background-color"]=_e.colorAttr(s,"val",null,Fe);break;case"vertAlign":break;case"position":t.verticalAlign=v.lengthAttr(s,"val",u);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":t.width=ze.valueOfSize(s,"w");break;case"trHeight":this.parseTrHeight(s,t);break;case"strike":t["text-decoration"]=v.boolAttr(s,"val",!0)?"line-through":"none";break;case"b":t["font-weight"]=v.boolAttr(s,"val",!0)?"bold":"normal";break;case"i":t["font-style"]=v.boolAttr(s,"val",!0)?"italic":"normal";break;case"caps":t["text-transform"]=v.boolAttr(s,"val",!0)?"uppercase":"none";break;case"smallCaps":t["font-variant"]=v.boolAttr(s,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(s,t);break;case"ind":case"tblInd":this.parseIndentation(s,t);break;case"rFonts":this.parseFont(s,t);break;case"tblBorders":this.parseBorderProperties(s,r||t);break;case"tblCellSpacing":t["border-spacing"]=ze.valueOfMargin(s),t["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(s,t);break;case"bdr":t.border=ze.valueOfBorder(s);break;case"tcBorders":this.parseBorderProperties(s,t);break;case"vanish":v.boolAttr(s,"val",!0)&&(t.display="none");break;case"kern":case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(s,r||t);break;case"tblLayout":t["table-layout"]=ze.valueOfTblLayout(s);break;case"vAlign":t["vertical-align"]=ze.valueOfTextAlignment(s);break;case"spacing":"pPr"==e.localName&&this.parseSpacing(s,t);break;case"wordWrap":v.boolAttr(s,"val")&&(t["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":t.hyphens=v.boolAttr(s,"val",!0)?"none":"auto";break;case"lang":t.$lang=v.attr(s,"val");break;case"rtl":case"bidi":v.boolAttr(s,"val",!0)&&(t.direction="rtl");break;case"bCs":case"iCs":case"szCs":case"tabs":case"outlineLvl":case"contextualSpacing":case"tblStyleColBandSize":case"tblStyleRowBandSize":case"webHidden":case"pageBreakBefore":case"suppressLineNumbers":case"keepLines":case"keepNext":case"widowControl":case"bidi":case"rtl":case"noProof":break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${e.localName}.${s.localName}`)}return t}parseUnderline(e,t){var r=v.attr(e,"val");if(null!=r){switch(r){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration"]="underline dashed";break;case"dotted":case"dottedHeavy":t["text-decoration"]="underline dotted";break;case"double":t["text-decoration"]="underline double";break;case"single":case"thick":case"words":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration"]="underline wavy";break;case"none":t["text-decoration"]="none"}var a=_e.colorAttr(e,"color");a&&(t["text-decoration-color"]=a)}}parseFont(e,t){var r=[v.attr(e,"ascii"),ze.themeValue(e,"asciiTheme"),v.attr(e,"eastAsia")].filter(e=>e).map(e=>a(e));r.length>0&&(t["font-family"]=[...new Set(r)].join(", "))}parseIndentation(e,t){var r=v.lengthAttr(e,"firstLine"),a=v.lengthAttr(e,"hanging"),s=v.lengthAttr(e,"left"),n=v.lengthAttr(e,"start"),l=v.lengthAttr(e,"right"),o=v.lengthAttr(e,"end");r&&(t["text-indent"]=r),a&&(t["text-indent"]=`-${a}`),(s||n)&&(t["margin-inline-start"]=s||n),(l||o)&&(t["margin-inline-end"]=l||o)}parseSpacing(e,t){var r=v.lengthAttr(e,"before"),a=v.lengthAttr(e,"after"),s=v.intAttr(e,"line",null),n=v.attr(e,"lineRule");if(r&&(t["margin-top"]=r),a&&(t["margin-bottom"]=a),null!==s)switch(n){case"auto":t["line-height"]=`${(s/240).toFixed(2)}`;break;case"atLeast":t["line-height"]=`calc(100% + ${s/20}pt)`;break;default:t["line-height"]=t["min-height"]=s/20+"pt"}}parseMarginProperties(e,t){for(const r of v.elements(e))switch(r.localName){case"left":t["padding-left"]=ze.valueOfMargin(r);break;case"right":t["padding-right"]=ze.valueOfMargin(r);break;case"top":t["padding-top"]=ze.valueOfMargin(r);break;case"bottom":t["padding-bottom"]=ze.valueOfMargin(r)}}parseTrHeight(e,t){v.attr(e,"hRule"),t.height=v.lengthAttr(e,"val")}parseBorderProperties(e,t){for(const r of v.elements(e))switch(r.localName){case"start":case"left":t["border-left"]=ze.valueOfBorder(r);break;case"end":case"right":t["border-right"]=ze.valueOfBorder(r);break;case"top":t["border-top"]=ze.valueOfBorder(r);break;case"bottom":t["border-bottom"]=ze.valueOfBorder(r)}}}const He=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class _e{static colorAttr(e,t,r=null,a="black"){var s=v.attr(e,t);if(s)return"auto"==s?a:He.includes(s)?s:`#${s}`;var n=v.attr(e,"themeColor");return n?`var(--docx-${n}-color)`:r}}class ze{static themeValue(e,t){var r=v.attr(e,t);return r?`var(--docx-${r}-font)`:null}static valueOfSize(e,t){var r=m;switch(v.attr(e,"type")){case"dxa":break;case"pct":r=g;break;case"auto":return"auto"}return v.lengthAttr(e,t,r)}static valueOfMargin(e){return v.lengthAttr(e,"w")}static valueOfBorder(e){var t=ze.parseBorderType(v.attr(e,"val"));if("none"==t)return"none";var r=_e.colorAttr(e,"color");return`${v.lengthAttr(e,"sz",d)} ${t} ${"auto"==r?$e:r}`}static parseBorderType(e){switch(e){case"single":case"dashDotStroked":case"thick":case"thickThinLargeGap":case"thickThinMediumGap":case"thickThinSmallGap":case"thinThickLargeGap":case"thinThickMediumGap":case"thinThickSmallGap":case"thinThickThinLargeGap":case"thinThickThinMediumGap":case"thinThickThinSmallGap":case"threeDEmboss":case"threeDEngrave":case"wave":return"solid";case"dashed":case"dashSmallGap":return"dashed";case"dotDash":case"dotDotDash":case"dotted":return"dotted";case"double":case"doubleWave":case"triple":return"double";case"inset":return"inset";case"nil":case"none":return"none";case"outset":return"outset"}return"solid"}static valueOfTblLayout(e){return"fixed"==v.attr(e,"val")?"fixed":"auto"}static classNameOfCnfStyle(e){const t=v.attr(e,"val");return["first-row","last-row","first-col","last-col","odd-col","even-col","odd-row","even-row","ne-cell","nw-cell","se-cell","sw-cell"].filter((e,r)=>"1"==t[r]).join(" ")}static valueOfJc(e){var t=v.attr(e,"val");switch(t){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return t}static valueOfVertAlign(e,t=!1){var r=v.attr(e,"val");switch(r){case"subscript":return"sub";case"superscript":return t?"sup":"super"}return t?null:r}static valueOfTextAlignment(e){var t=v.attr(e,"val");switch(t){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return t}static addSize(e,t){return null==e?t:null==t?e:`calc(${e} + ${t})`}static classNameOftblLook(e){const t=v.hexAttr(e,"val",0);let r="";return(v.boolAttr(e,"firstRow")||32&t)&&(r+=" first-row"),(v.boolAttr(e,"lastRow")||64&t)&&(r+=" last-row"),(v.boolAttr(e,"firstColumn")||128&t)&&(r+=" first-col"),(v.boolAttr(e,"lastColumn")||256&t)&&(r+=" last-col"),(v.boolAttr(e,"noHBand")||512&t)&&(r+=" no-hband"),(v.boolAttr(e,"noVBand")||1024&t)&&(r+=" no-vband"),r.trim()}}const Ve={pos:0,leader:"none",style:"left"};function je(e,t,r,a=.75){const s=e.closest("p"),n=e.getBoundingClientRect(),l=s.getBoundingClientRect(),o=getComputedStyle(s),i=t?.length>0?t.map(e=>({pos:We(e.position),leader:e.leader,style:e.style})).sort((e,t)=>e.pos-t.pos):[Ve],c=i[i.length-1],h=l.width*a,m=We(r);let p=c.pos+m;if(p"clear"!=e.style&&e.pos>f);if(null==g)return;let b=1;if("right"==g.style||"center"==g.style){const t=Array.from(s.querySelectorAll(`.${e.className}`)),r=t.indexOf(e)+1,n=document.createRange();n.setStart(e,1),re.id)),e.endnotesPart&&(this.endnoteMap=l(e.endnotesPart.notes,e=>e.id)),e.settingsPart&&(this.defaultTabSize=e.settingsPart.settings?.defaultTabStop),!a.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,r);var s=this.renderSections(e.documentPart.body);this.options.inWrapper?t.appendChild(this.renderWrapper(s)):Je(t,s),this.commentHighlight&&a.renderComments&&CSS.highlights.set(`${this.className}-comments`,this.commentHighlight),this.postRenderTasks.forEach(e=>e()),await Promise.allSettled(this.tasks),this.refreshTabStops()}renderTheme(e,t){const r={},a=e.theme?.fontScheme;a&&(a.majorFont&&(r["--docx-majorHAnsi-font"]=a.majorFont.latinTypeface),a.minorFont&&(r["--docx-minorHAnsi-font"]=a.minorFont.latinTypeface));const s=e.theme?.colorScheme;if(s)for(let[e,t]of Object.entries(s.colors))r[`--docx-${e}-color`]=`#${t}`;const n=this.styleToString(`.${this.className}`,r);t.appendChild(this.createStyleElement(n))}renderFontTable(e,t){for(let r of e.fonts)for(let e of r.embedFontRefs)this.tasks.push(this.document.loadFont(e.id,e.key).then(s=>{const n={"font-family":a(r.name),src:`url(${s})`};"bold"!=e.type&&"boldItalic"!=e.type||(n["font-weight"]="bold"),"italic"!=e.type&&"boldItalic"!=e.type||(n["font-style"]="italic");const l=this.styleToString("@font-face",n);t.appendChild(this.createComment(`docxjs ${r.name} font`)),t.appendChild(this.createStyleElement(l))}))}processStyleName(e){return e?`${this.className}_${function(e){return e?.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}(e)}`:this.className}processStyles(e){const t=l(e.filter(e=>null!=e.id),e=>e.id);for(const a of e.filter(e=>e.basedOn)){var r=t[a.basedOn];if(r){a.paragraphProps=i(a.paragraphProps,r.paragraphProps),a.runProps=i(a.runProps,r.runProps);for(const e of r.styles){const t=a.styles.find(t=>t.target==e.target);t?this.copyStyleProperties(e.values,t.values):a.styles.push({...e,values:{...e.values}})}}else this.options.debug&&console.warn(`Can't find base style ${a.basedOn}`)}for(let t of e)t.cssName=this.processStyleName(t.id);return t}prodessNumberings(e){for(let t of e.filter(e=>e.pStyleName)){const e=this.findStyle(t.pStyleName);e?.paragraphProps?.numbering&&(e.paragraphProps.numbering.level=t.level)}}processElement(e){if(e.children)for(var t of e.children)t.parent=e,t.type==R.Table?this.processTable(t):this.processElement(t)}processTable(e){for(var t of e.children)for(var r of t.children)r.cssStyle=this.copyStyleProperties(e.cellStyle,r.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(r)}copyStyleProperties(e,t,r=null){if(!e)return t;for(var a of(null==t&&(t={}),null==r&&(r=Object.getOwnPropertyNames(e)),r))e.hasOwnProperty(a)&&!t.hasOwnProperty(a)&&(t[a]=e[a]);return t}createPageElement(e,t){var r=this.createElement("section",{className:e});return t&&(t.pageMargins&&(r.style.paddingLeft=t.pageMargins.left,r.style.paddingRight=t.pageMargins.right,r.style.paddingTop=t.pageMargins.top,r.style.paddingBottom=t.pageMargins.bottom),t.pageSize&&(this.options.ignoreWidth||(r.style.width=t.pageSize.width),this.options.ignoreHeight||(r.style.minHeight=t.pageSize.height))),r}createSectionContent(e){var t=this.createElement("article");return e.columns&&e.columns.numberOfColumns&&(t.style.columnCount=`${e.columns.numberOfColumns}`,t.style.columnGap=e.columns.space,e.columns.separator&&(t.style.columnRule="1px solid black")),t}renderSections(e){const t=[];this.processElement(e);const r=this.splitBySection(e.children,e.props),a=this.groupByPageBreaks(r);let s=null;for(let r=0,l=a.length;r"first"==e.type):null)??(r%2==1?e.find(e=>"even"==e.type):null)??e.find(e=>"default"==e.type),l=n&&this.document.findPartByRelId(n.id,this.document.documentPart);if(l){this.currentPart=l,this.usedHederFooterParts.includes(l.path)||(this.processElement(l.rootElement),this.usedHederFooterParts.push(l.path));const[e]=this.renderElements([l.rootElement],s);t?.pageMargins&&(l.rootElement.type===R.Header?(e.style.marginTop=`calc(${t.pageMargins.header} - ${t.pageMargins.top})`,e.style.minHeight=`calc(${t.pageMargins.top} - ${t.pageMargins.header})`):l.rootElement.type===R.Footer&&(e.style.marginBottom=`calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`,e.style.minHeight=`calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(e){return e.type==R.Break&&("lastRenderedPageBreak"==e.break?!this.options.ignoreLastRenderedPageBreak:"page"==e.break)}isPageBreakSection(e,t){return!!e&&(!!t&&(e.pageSize?.orientation!=t.pageSize?.orientation||e.pageSize?.width!=t.pageSize?.width||e.pageSize?.height!=t.pageSize?.height))}splitBySection(e,t){var r={sectProps:null,elements:[],pageBreak:!1},a=[r];for(let t of e){if(t.type==R.Paragraph){const e=this.findStyle(t.styleName);e?.paragraphProps?.pageBreakBefore&&(r.sectProps=s,r.pageBreak=!0,r={sectProps:null,elements:[],pageBreak:!1},a.push(r))}if(r.elements.push(t),t.type==R.Paragraph){const e=t;var s=e.sectionProps,n=-1,l=-1;if(this.options.breakPages&&e.children&&(n=e.children.findIndex(e=>-1!=(l=e.children?.findIndex(this.isPageBreakElement.bind(this))??-1))),(s||-1!=n)&&(r.sectProps=s,r.pageBreak=-1!=n,r={sectProps:null,elements:[],pageBreak:!1},a.push(r)),-1!=n){let a=e.children[n],s=l=0;e--)null==a[e].sectProps?a[e].sectProps=c??t:c=a[e].sectProps;return a}groupByPageBreaks(e){let t,r=[];const a=[r];for(let s of e)r.push(s),(this.options.ignoreLastRenderedPageBreak||s.pageBreak||this.isPageBreakSection(t,s.sectProps))&&a.push(r=[]),t=s.sectProps;return a.filter(e=>e.length>0)}renderWrapper(e){return this.createElement("div",{className:`${this.className}-wrapper`},e)}renderDefaultStyle(){var e=this.className,t=`\n.${e}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } \n.${e}-wrapper>section.${e} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }`;this.options.hideWrapperOnPrint&&(t=`@media not print { ${t} }`);var r=`${t}\n.${e} { color: black; hyphens: auto; text-underline-position: from-font; }\nsection.${e} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }\nsection.${e}>article { margin-bottom: auto; z-index: 1; }\nsection.${e}>footer { z-index: 1; }\n.${e} table { border-collapse: collapse; }\n.${e} table td, .${e} table th { vertical-align: top; }\n.${e} p { margin: 0pt; min-height: 1em; }\n.${e} span { white-space: pre-wrap; overflow-wrap: break-word; }\n.${e} a { color: inherit; text-decoration: inherit; }\n.${e} svg { fill: transparent; }\n`;return this.options.renderComments&&(r+=`\n.${e}-comment-ref { cursor: default; }\n.${e}-comment-popover { display: none; z-index: 1000; padding: 0.5rem; background: white; position: absolute; box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.25); width: 30ch; }\n.${e}-comment-ref:hover~.${e}-comment-popover { display: block; }\n.${e}-comment-author,.${e}-comment-date { font-size: 0.875rem; color: #888; }\n`),this.createStyleElement(r)}renderNumbering(e,t){var r="",a=[];for(var s of e){var n=`p.${this.numberingClass(s.id,s.level)}`,l="none";if(s.bullet){let e=`--${this.className}-${s.bullet.src}`.toLowerCase();r+=this.styleToString(`${n}:before`,{content:"' '",display:"inline-block",background:`var(${e})`},s.bullet.style),this.tasks.push(this.document.loadNumberingImage(s.bullet.src).then(r=>{var a=`${this.rootSelector} { ${e}: url(${r}) }`;t.appendChild(this.createStyleElement(a))}))}else if(s.levelText){let e=this.numberingCounter(s.id,s.level);const t=e+" "+(s.start-1);s.level>0&&(r+=this.styleToString(`p.${this.numberingClass(s.id,s.level-1)}`,{"counter-set":t})),a.push(t),r+=this.styleToString(`${n}:before`,{content:this.levelTextToContent(s.levelText,s.suff,s.id,this.numFormatToCssValue(s.format)),"counter-increment":e,...s.rStyle})}else l=this.numFormatToCssValue(s.format);r+=this.styleToString(n,{display:"list-item","list-style-position":"inside","list-style-type":l,...s.pStyle})}return a.length>0&&(r+=this.styleToString(this.rootSelector,{"counter-reset":a.join(" ")})),this.createStyleElement(r)}renderStyles(e){var t="";const r=this.styleMap,a=l(e.filter(e=>e.isDefault),e=>e.target);for(const l of e){var s=l.styles;if(l.linked){var n=l.linked&&r[l.linked];n?s=s.concat(n.styles):this.options.debug&&console.warn(`Can't find linked style ${l.linked}`)}for(const e of s){var o=`${l.target??""}.${l.cssName}`;l.target!=e.target&&(o+=` ${e.target}`),a[l.target]==l&&(o=`.${this.className} ${l.target}, `+o),t+=this.styleToString(o,e.values)}}return this.createStyleElement(t)}renderNotes(e,t,r){var a=e.map(e=>t[e]).filter(e=>e);if(a.length>0){var s=this.createElement("ol",null,this.renderElements(a));r.appendChild(s)}}renderElement(e){switch(e.type){case R.Paragraph:return this.renderParagraph(e);case R.BookmarkStart:return this.renderBookmarkStart(e);case R.BookmarkEnd:return null;case R.Run:return this.renderRun(e);case R.Table:return this.renderTable(e);case R.Row:return this.renderTableRow(e);case R.Cell:return this.renderTableCell(e);case R.Hyperlink:return this.renderHyperlink(e);case R.SmartTag:return this.renderSmartTag(e);case R.Drawing:return this.renderDrawing(e);case R.Image:return this.renderImage(e);case R.Text:case R.Text:return this.renderText(e);case R.DeletedText:return this.renderDeletedText(e);case R.Tab:return this.renderTab(e);case R.Symbol:return this.renderSymbol(e);case R.Break:return this.renderBreak(e);case R.Footer:return this.renderContainer(e,"footer");case R.Header:return this.renderContainer(e,"header");case R.Footnote:case R.Endnote:return this.renderContainer(e,"li");case R.FootnoteReference:return this.renderFootnoteReference(e);case R.EndnoteReference:return this.renderEndnoteReference(e);case R.NoBreakHyphen:return this.createElement("wbr");case R.VmlPicture:return this.renderVmlPicture(e);case R.VmlElement:return this.renderVmlElement(e);case R.MmlMath:return this.renderContainerNS(e,Ge,"math",{xmlns:Ge});case R.MmlMathParagraph:return this.renderContainer(e,"span");case R.MmlFraction:return this.renderContainerNS(e,Ge,"mfrac");case R.MmlBase:return this.renderContainerNS(e,Ge,e.parent.type==R.MmlMatrixRow?"mtd":"mrow");case R.MmlNumerator:case R.MmlDenominator:case R.MmlFunction:case R.MmlLimit:case R.MmlBox:return this.renderContainerNS(e,Ge,"mrow");case R.MmlGroupChar:return this.renderMmlGroupChar(e);case R.MmlLimitLower:return this.renderContainerNS(e,Ge,"munder");case R.MmlMatrix:return this.renderContainerNS(e,Ge,"mtable");case R.MmlMatrixRow:return this.renderContainerNS(e,Ge,"mtr");case R.MmlRadical:return this.renderMmlRadical(e);case R.MmlSuperscript:return this.renderContainerNS(e,Ge,"msup");case R.MmlSubscript:return this.renderContainerNS(e,Ge,"msub");case R.MmlDegree:case R.MmlSuperArgument:case R.MmlSubArgument:return this.renderContainerNS(e,Ge,"mn");case R.MmlFunctionName:return this.renderContainerNS(e,Ge,"ms");case R.MmlDelimiter:return this.renderMmlDelimiter(e);case R.MmlRun:return this.renderMmlRun(e);case R.MmlNary:return this.renderMmlNary(e);case R.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case R.MmlBar:return this.renderMmlBar(e);case R.MmlEquationArray:return this.renderMllList(e);case R.Inserted:return this.renderInserted(e);case R.Deleted:return this.renderDeleted(e);case R.CommentRangeStart:return this.renderCommentRangeStart(e);case R.CommentRangeEnd:return this.renderCommentRangeEnd(e);case R.CommentReference:return this.renderCommentReference(e);case R.AltChunk:return this.renderAltChunk(e)}return null}renderElements(e,t){if(null==e)return null;var r=e.flatMap(e=>this.renderElement(e)).filter(e=>null!=e);return t&&Je(t,r),r}renderContainer(e,t,r){return this.createElement(t,r,this.renderElements(e.children))}renderContainerNS(e,t,r,a){return this.createElementNS(t,r,a,this.renderElements(e.children))}renderParagraph(e){var t=this.renderContainer(e,"p");const r=this.findStyle(e.styleName);e.tabs??(e.tabs=r?.paragraphProps?.tabs),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProperties(t.style,e);const a=e.numbering??r?.paragraphProps?.numbering;return a&&t.classList.add(this.numberingClass(a.id,a.level)),t}renderRunProperties(e,t){this.renderCommonProperties(e,t)}renderCommonProperties(e,t){null!=t&&(t.color&&(e.color=t.color),t.fontSize&&(e["font-size"]=t.fontSize))}renderHyperlink(e){var t=this.renderContainer(e,"a");this.renderStyleValues(e.cssStyle,t);let r="";if(e.id){const t=this.document.documentPart.rels.find(t=>t.id==e.id&&"External"===t.targetMode);r=t?.target??r}return e.anchor&&(r+=`#${e.anchor}`),t.href=r,t}renderSmartTag(e){return this.renderContainer(e,"span")}renderCommentRangeStart(e){if(!this.options.renderComments)return null;const t=new Range;this.commentHighlight?.add(t);const r=this.createComment(`start of comment #${e.id}`);return this.later(()=>t.setStart(r,0)),this.commentMap[e.id]=t,r}renderCommentRangeEnd(e){if(!this.options.renderComments)return null;const t=this.commentMap[e.id],r=this.createComment(`end of comment #${e.id}`);return this.later(()=>t?.setEnd(r,0)),r}renderCommentReference(e){if(!this.options.renderComments)return null;var t=this.document.commentsPart?.commentMap[e.id];if(!t)return null;const r=new DocumentFragment,a=this.createElement("span",{className:`${this.className}-comment-ref`},["💬"]),s=this.createElement("div",{className:`${this.className}-comment-popover`});return this.renderCommentContent(t,s),r.appendChild(this.createComment(`comment #${t.id} by ${t.author} on ${t.date}`)),r.appendChild(a),r.appendChild(s),r}renderAltChunk(e){if(!this.options.renderAltChunks)return null;var t=this.createElement("iframe");return this.tasks.push(this.document.loadAltChunk(e.id,this.currentPart).then(e=>{t.srcdoc=e})),t}renderCommentContent(e,t){t.appendChild(this.createElement("div",{className:`${this.className}-comment-author`},[e.author])),t.appendChild(this.createElement("div",{className:`${this.className}-comment-date`},[new Date(e.date).toLocaleString()])),this.renderElements(e.children,t)}renderDrawing(e){var t=this.renderContainer(e,"div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",this.renderStyleValues(e.cssStyle,t),t}renderImage(e){let t=this.createElement("img"),r=e.cssStyle?.transform;if(this.renderStyleValues(e.cssStyle,t),e.srcRect&&e.srcRect.some(e=>0!=e)){var[a,s,n,l]=e.srcRect;r=`scale(${1/(1-a-n)}, ${1/(1-s-l)})`,t.style["clip-path"]=`rect(${(100*s).toFixed(2)}% ${(100*(1-n)).toFixed(2)}% ${(100*(1-l)).toFixed(2)}% ${(100*a).toFixed(2)}%)`}return e.rotation&&(r=`rotate(${e.rotation}deg) ${r??""}`),t.style.transform=r?.trim(),this.document&&this.tasks.push(this.document.loadDocumentImage(e.src,this.currentPart).then(e=>{t.src=e})),t}renderText(e){return this.htmlDocument.createTextNode(e.text)}renderDeletedText(e){return this.options.renderChanges?this.renderText(e):null}renderBreak(e){return"textWrapping"==e.break?this.createElement("br"):null}renderInserted(e){return this.options.renderChanges?this.renderContainer(e,"ins"):this.renderElements(e.children)}renderDeleted(e){return this.options.renderChanges?this.renderContainer(e,"del"):null}renderSymbol(e){var t=this.createElement("span");return t.style.fontFamily=e.font,t.innerHTML=`&#x${e.char};`,t}renderFootnoteReference(e){var t=this.createElement("sup");return this.currentFootnoteIds.push(e.id),t.textContent=`${this.currentFootnoteIds.length}`,t}renderEndnoteReference(e){var t=this.createElement("sup");return this.currentEndnoteIds.push(e.id),t.textContent=`${this.currentEndnoteIds.length}`,t}renderTab(e){var t=this.createElement("span");if(t.innerHTML=" ",this.options.experimental){t.className=this.tabStopClass();var r=function(e,t){var r=e.parent;for(;null!=r&&r.type!=t;)r=r.parent;return r}(e,R.Paragraph)?.tabs;this.currentTabs.push({stops:r,span:t})}return t}renderBookmarkStart(e){return this.createElement("span",{id:e.name})}renderRun(e){if(e.fieldRun)return null;const t=this.createElement("span");if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.verticalAlign){const r=this.createElement(e.verticalAlign);this.renderElements(e.children,r),t.appendChild(r)}else this.renderElements(e.children,t);return t}renderTable(e){let t=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},e.columns&&t.appendChild(this.renderTableColumns(e.columns)),this.renderClass(e,t),this.renderElements(e.children,t),this.renderStyleValues(e.cssStyle,t),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),t}renderTableColumns(e){let t=this.createElement("colgroup");for(let r of e){let e=this.createElement("col");r.width&&(e.style.width=r.width),t.appendChild(e)}return t}renderTableRow(e){let t=this.createElement("tr");return this.currentCellPosition.col=0,e.gridBefore&&t.appendChild(this.renderTableCellPlaceholder(e.gridBefore)),this.renderClass(e,t),this.renderElements(e.children,t),this.renderStyleValues(e.cssStyle,t),e.gridAfter&&t.appendChild(this.renderTableCellPlaceholder(e.gridAfter)),this.currentCellPosition.row++,t}renderTableCellPlaceholder(e){const t=this.createElement("td",{colSpan:e});return t.style.border="none",t}renderTableCell(e){let t=this.renderContainer(e,"td");const r=this.currentCellPosition.col;return e.verticalMerge?"restart"==e.verticalMerge?(this.currentVerticalMerge[r]=t,t.rowSpan=1):this.currentVerticalMerge[r]&&(this.currentVerticalMerge[r].rowSpan+=1,t.style.display="none"):this.currentVerticalMerge[r]=null,this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),this.currentCellPosition.col+=t.colSpan,t}renderVmlPicture(e){return this.renderContainer(e,"div")}renderVmlElement(e){var t=this.createSvgElement("svg");t.setAttribute("style",e.cssStyleText);const r=this.renderVmlChildElement(e);return e.imageHref?.id&&this.tasks.push(this.document?.loadDocumentImage(e.imageHref.id,this.currentPart).then(e=>r.setAttribute("href",e))),t.appendChild(r),requestAnimationFrame(()=>{const e=t.firstElementChild.getBBox();t.setAttribute("width",`${Math.ceil(e.x+e.width)}`),t.setAttribute("height",`${Math.ceil(e.y+e.height)}`)}),t}renderVmlChildElement(e){const t=this.createSvgElement(e.tagName);Object.entries(e.attrs).forEach(([e,r])=>t.setAttribute(e,r));for(let r of e.children)r.type==R.VmlElement?t.appendChild(this.renderVmlChildElement(r)):t.appendChild(...c(this.renderElement(r)));return t}renderMmlRadical(e){const t=e.children.find(e=>e.type==R.MmlBase);if(e.props?.hideDegree)return this.createElementNS(Ge,"msqrt",null,this.renderElements([t]));const r=e.children.find(e=>e.type==R.MmlDegree);return this.createElementNS(Ge,"mroot",null,this.renderElements([t,r]))}renderMmlDelimiter(e){const t=[];return t.push(this.createElementNS(Ge,"mo",null,[e.props.beginChar??"("])),t.push(...this.renderElements(e.children)),t.push(this.createElementNS(Ge,"mo",null,[e.props.endChar??")"])),this.createElementNS(Ge,"mrow",null,t)}renderMmlNary(e){const t=[],r=l(e.children,e=>e.type),a=r[R.MmlSuperArgument],s=r[R.MmlSubArgument],n=a?this.createElementNS(Ge,"mo",null,c(this.renderElement(a))):null,o=s?this.createElementNS(Ge,"mo",null,c(this.renderElement(s))):null,i=this.createElementNS(Ge,"mo",null,[e.props?.char??"∫"]);return n||o?t.push(this.createElementNS(Ge,"munderover",null,[i,o,n])):n?t.push(this.createElementNS(Ge,"mover",null,[i,n])):o?t.push(this.createElementNS(Ge,"munder",null,[i,o])):t.push(i),t.push(...this.renderElements(r[R.MmlBase].children)),this.createElementNS(Ge,"mrow",null,t)}renderMmlPreSubSuper(e){const t=[],r=l(e.children,e=>e.type),a=r[R.MmlSuperArgument],s=r[R.MmlSubArgument],n=a?this.createElementNS(Ge,"mo",null,c(this.renderElement(a))):null,o=s?this.createElementNS(Ge,"mo",null,c(this.renderElement(s))):null,i=this.createElementNS(Ge,"mo",null);return t.push(this.createElementNS(Ge,"msubsup",null,[i,o,n])),t.push(...this.renderElements(r[R.MmlBase].children)),this.createElementNS(Ge,"mrow",null,t)}renderMmlGroupChar(e){const t="bot"===e.props.verticalJustification?"mover":"munder",r=this.renderContainerNS(e,Ge,t);return e.props.char&&r.appendChild(this.createElementNS(Ge,"mo",null,[e.props.char])),r}renderMmlBar(e){const t=this.renderContainerNS(e,Ge,"mrow");switch(e.props.position){case"top":t.style.textDecoration="overline";break;case"bottom":t.style.textDecoration="underline"}return t}renderMmlRun(e){const t=this.createElementNS(Ge,"ms",null,this.renderElements(e.children));return this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),t}renderMllList(e){const t=this.createElementNS(Ge,"mtable");this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t);for(let r of this.renderElements(e.children))t.appendChild(this.createElementNS(Ge,"mtr",null,[this.createElementNS(Ge,"mtd",null,[r])]));return t}renderStyleValues(e,t){for(let r in e)r.startsWith("$")?t.setAttribute(r.slice(1),e[r]):t.style[r]=e[r]}renderClass(e,t){e.className&&(t.className=e.className),e.styleName&&t.classList.add(this.processStyleName(e.styleName))}findStyle(e){return e&&this.styleMap?.[e]}numberingClass(e,t){return`${this.className}-num-${e}-${t}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(e,t,r=null){let a=`${e} {\r\n`;for(const e in t)e.startsWith("$")||(a+=` ${e}: ${t[e]};\r\n`);return r&&(a+=r),a+"}\r\n"}numberingCounter(e,t){return`${this.className}-num-${e}-${t}`}levelTextToContent(e,t,r,a){return`"${e.replace(/%\d*/g,e=>{let t=parseInt(e.substring(1),10)-1;return`"counter(${this.numberingCounter(r,t)}, ${a})"`})}${{tab:"\\9",space:"\\a0"}[t]??""}"`}numFormatToCssValue(e){return{none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman",decimalZero:"decimal-leading-zero",aiueo:"katakana",aiueoFullWidth:"katakana",chineseCounting:"simp-chinese-informal",chineseCountingThousand:"simp-chinese-informal",chineseLegalSimplified:"simp-chinese-formal",chosung:"hangul-consonant",ideographDigital:"cjk-ideographic",ideographTraditional:"cjk-heavenly-stem",ideographLegalTraditional:"trad-chinese-formal",ideographZodiac:"cjk-earthly-branch",iroha:"katakana-iroha",irohaFullWidth:"katakana-iroha",japaneseCounting:"japanese-informal",japaneseDigitalTenThousand:"cjk-decimal",japaneseLegal:"japanese-formal",thaiNumbers:"thai",koreanCounting:"korean-hangul-formal",koreanDigital:"korean-hangul-formal",koreanDigital2:"korean-hanja-informal",hebrew1:"hebrew",hebrew2:"hebrew",hindiNumbers:"devanagari",ganada:"hangul",taiwaneseCounting:"cjk-ideographic",taiwaneseCountingThousand:"cjk-ideographic",taiwaneseDigital:"cjk-decimal"}[e]??e}refreshTabStops(){this.options.experimental&&setTimeout(()=>{const e=function(e=document.body){const t=document.createElement("div");t.style.width="100pt",e.appendChild(t);const r=100/t.offsetWidth;return e.removeChild(t),r}();for(let t of this.currentTabs)je(t.span,t.stops,this.defaultTabSize,e)},500)}createElementNS(e,t,r,a){var s=e?this.htmlDocument.createElementNS(e,t):this.htmlDocument.createElement(t);return Object.assign(s,r),a&&Je(s,a),s}createElement(e,t,r){return this.createElementNS(void 0,e,t,r)}createSvgElement(e,t,r){return this.createElementNS(Xe,e,t,r)}createStyleElement(e){return this.createElement("style",{innerHTML:e})}createComment(e){return this.htmlDocument.createComment(e)}later(e){this.postRenderTasks.push(e)}}function qe(e){e.innerHTML=""}function Je(e,t){t.forEach(t=>{return e.appendChild("string"==typeof(r=t)||r instanceof String?document.createTextNode(t):t);var r})}const Ze={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,hideWrapperOnPrint:!1,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1,renderComments:!1,renderAltChunks:!0};function Ke(e,t){const r={...Ze,...t};return ke.load(e,new Oe(r),r)}async function Ye(e,t,r,a){const s={...Ze,...a},n=new Ue(window.document);return await n.render(e,t,r,s)}e.defaultOptions=Ze,e.parseAsync=Ke,e.renderAsync=async function(e,t,r,a){const s=await Ke(e,a);return await Ye(s,t,r,a),s},e.renderDocument=Ye}); //# sourceMappingURL=docx-preview.min.js.map \ No newline at end of file diff --git a/enferno/static/js/dropzone.min.js b/enferno/static/js/dropzone.min.js deleted file mode 100644 index 452d224f5..000000000 --- a/enferno/static/js/dropzone.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(){function e(e){return e&&e.__esModule?e.default:e}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var i=0;i1?t-1:0),n=1;n'),this.element.appendChild(e));var l=e.getElementsByTagName("span")[0];return l&&(null!=l.textContent?l.textContent=this.options.dictFallbackMessage:null!=l.innerText&&(l.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,i,n){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},a=e.width/e.height;null==t&&null==i?(t=r.srcWidth,i=r.srcHeight):null==t?t=i*a:null==i&&(i=t/a);var o=(t=Math.min(t,r.srcWidth))/(i=Math.min(i,r.srcHeight));if(r.srcWidth>t||r.srcHeight>i)if("crop"===n)a>o?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*o):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/o);else{if("contain"!==n)throw new Error("Unknown resizeMethod '".concat(n,"'"));a>o?i=t/a:t=i*a}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=i,r},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:e('
'),drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){var t=this;e.previewElement=f.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);var i=!0,n=!1,r=void 0;try{for(var a,o=e.previewElement.querySelectorAll("[data-dz-name]")[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value;l.textContent=e.name}}catch(e){n=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(n)throw r}}var s=!0,u=!1,c=void 0;try{for(var d,h=e.previewElement.querySelectorAll("[data-dz-size]")[Symbol.iterator]();!(s=(d=h.next()).done);s=!0)(l=d.value).innerHTML=this.filesize(e.size)}catch(e){u=!0,c=e}finally{try{s||null==h.return||h.return()}finally{if(u)throw c}}this.options.addRemoveLinks&&(e._removeLink=f.createElement(''.concat(this.options.dictRemoveFile,"")),e.previewElement.appendChild(e._removeLink));var p=function(i){var n=t;if(i.preventDefault(),i.stopPropagation(),e.status===f.UPLOADING)return f.confirm(t.options.dictCancelUploadConfirmation,(function(){return n.removeFile(e)}));var r=t;return t.options.dictRemoveFileConfirmation?f.confirm(t.options.dictRemoveFileConfirmation,(function(){return r.removeFile(e)})):t.removeFile(e)},m=!0,v=!1,y=void 0;try{for(var g,b=e.previewElement.querySelectorAll("[data-dz-remove]")[Symbol.iterator]();!(m=(g=b.next()).done);m=!0){g.value.addEventListener("click",p)}}catch(e){v=!0,y=e}finally{try{m||null==b.return||b.return()}finally{if(v)throw y}}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");var i=!0,n=!1,r=void 0;try{for(var a,o=e.previewElement.querySelectorAll("[data-dz-thumbnail]")[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value;l.alt=e.name,l.src=t}}catch(e){n=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(n)throw r}}return setTimeout((function(){return e.previewElement.classList.add("dz-image-preview")}),1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"string"!=typeof t&&t.error&&(t=t.error);var i=!0,n=!1,r=void 0;try{for(var a,o=e.previewElement.querySelectorAll("[data-dz-errormessage]")[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){a.value.textContent=t}}catch(e){n=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(n)throw r}}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,i){var n=!0,r=!1,a=void 0;if(e.previewElement)try{for(var o,l=e.previewElement.querySelectorAll("[data-dz-uploadprogress]")[Symbol.iterator]();!(n=(o=l.next()).done);n=!0){var s=o.value;"PROGRESS"===s.nodeName?s.value=t:s.style.width="".concat(t,"%")}}catch(e){r=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw a}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},f=function(n){"use strict";function o(n,r){var l,c,d,h;if(i(this,o),(l=s(this,(c=o,a(c)).call(this))).element=n,l.clickableElements=[],l.listeners=[],l.files=[],"string"==typeof l.element&&(l.element=document.querySelector(l.element)),!l.element||null==l.element.nodeType)throw new Error("Invalid dropzone element.");if(l.element.dropzone)throw new Error("Dropzone already attached.");o.instances.push(t(l)),l.element.dropzone=t(l);var f=null!=(h=o.optionsForElement(l.element))?h:{};if(l.options=e(u)(!0,{},p,f,null!=r?r:{}),l.options.previewTemplate=l.options.previewTemplate.replace(/\n*/g,""),l.options.forceFallback||!o.isBrowserSupported())return s(l,l.options.fallback.call(t(l)));if(null==l.options.url&&(l.options.url=l.element.getAttribute("action")),!l.options.url)throw new Error("No URL provided.");if(l.options.acceptedFiles&&l.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(l.options.uploadMultiple&&l.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return l.options.acceptedMimeTypes&&(l.options.acceptedFiles=l.options.acceptedMimeTypes,delete l.options.acceptedMimeTypes),null!=l.options.renameFilename&&(l.options.renameFile=function(e){return l.options.renameFilename.call(t(l),e.name,e)}),"string"==typeof l.options.method&&(l.options.method=l.options.method.toUpperCase()),(d=l.getExistingFallback())&&d.parentNode&&d.parentNode.removeChild(d),!1!==l.options.previewsContainer&&(l.options.previewsContainer?l.previewsContainer=o.getElement(l.options.previewsContainer,"previewsContainer"):l.previewsContainer=l.element),l.options.clickable&&(!0===l.options.clickable?l.clickableElements=[l.element]:l.clickableElements=o.getElements(l.options.clickable,"clickable")),l.init(),l}return l(o,n),r(o,[{key:"getAcceptedFiles",value:function(){return this.files.filter((function(e){return e.accepted})).map((function(e){return e}))}},{key:"getRejectedFiles",value:function(){return this.files.filter((function(e){return!e.accepted})).map((function(e){return e}))}},{key:"getFilesWithStatus",value:function(e){return this.files.filter((function(t){return t.status===e})).map((function(e){return e}))}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(o.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(o.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(o.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter((function(e){return e.status===o.UPLOADING||e.status===o.QUEUED})).map((function(e){return e}))}},{key:"init",value:function(){var e=this,t=this,i=this,n=this,r=this,a=this,l=this,s=this,u=this,c=this,d=this;if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(o.createElement('
"))),this.clickableElements.length){var h=this,p=function(){var e=h;h.hiddenFileInput&&h.hiddenFileInput.parentNode.removeChild(h.hiddenFileInput),h.hiddenFileInput=document.createElement("input"),h.hiddenFileInput.setAttribute("type","file"),(null===h.options.maxFiles||h.options.maxFiles>1)&&h.hiddenFileInput.setAttribute("multiple","multiple"),h.hiddenFileInput.className="dz-hidden-input",null!==h.options.acceptedFiles&&h.hiddenFileInput.setAttribute("accept",h.options.acceptedFiles),null!==h.options.capture&&h.hiddenFileInput.setAttribute("capture",h.options.capture),h.hiddenFileInput.setAttribute("tabindex","-1"),h.hiddenFileInput.style.visibility="hidden",h.hiddenFileInput.style.position="absolute",h.hiddenFileInput.style.top="0",h.hiddenFileInput.style.left="0",h.hiddenFileInput.style.height="0",h.hiddenFileInput.style.width="0",o.getElement(h.options.hiddenInputContainer,"hiddenInputContainer").appendChild(h.hiddenFileInput),h.hiddenFileInput.addEventListener("change",(function(){var t=e.hiddenFileInput.files,i=!0,n=!1,r=void 0;if(t.length)try{for(var a,o=t[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value;e.addFile(l)}}catch(e){n=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(n)throw r}}e.emit("addedfiles",t),p()}))};p()}this.URL=null!==window.URL?window.URL:window.webkitURL;var f=!0,m=!1,v=void 0;try{for(var y,g=this.events[Symbol.iterator]();!(f=(y=g.next()).done);f=!0){var b=y.value;this.on(b,this.options[b])}}catch(e){m=!0,v=e}finally{try{f||null==g.return||g.return()}finally{if(m)throw v}}this.on("uploadprogress",(function(){return e.updateTotalUploadProgress()})),this.on("removedfile",(function(){return t.updateTotalUploadProgress()})),this.on("canceled",(function(e){return i.emit("complete",e)})),this.on("complete",(function(e){var t=n;if(0===n.getAddedFiles().length&&0===n.getUploadingFiles().length&&0===n.getQueuedFiles().length)return setTimeout((function(){return t.emit("queuecomplete")}),0)}));var k=function(e){if(function(e){if(e.dataTransfer.types)for(var t=0;t")),i+='');var n=o.createElement(i);return"FORM"!==this.element.tagName?(t=o.createElement('
'))).appendChild(n):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:n}},{key:"getExistingFallback",value:function(){var e=function(e){var t=!0,i=!1,n=void 0;try{for(var r,a=e[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var o=r.value;if(/(^| )fallback($| )/.test(o.className))return o}}catch(e){i=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(i)throw n}}},t=!0,i=!1,n=void 0;try{for(var r,a=["div","form"][Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var o,l=r.value;if(o=e(this.element.getElementsByTagName(l)))return o}}catch(e){i=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(i)throw n}}}},{key:"setupEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var i in e.events){var n=e.events[i];t.push(e.element.addEventListener(i,n,!1))}return t}()}))}},{key:"removeEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var i in e.events){var n=e.events[i];t.push(e.element.removeEventListener(i,n,!1))}return t}()}))}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach((function(e){return e.classList.remove("dz-clickable")})),this.removeEventListeners(),this.disabled=!0,this.files.map((function(t){return e.cancelUpload(t)}))}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach((function(e){return e.classList.add("dz-clickable")})),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,i="b";if(e>0){for(var n=["tb","gb","mb","kb","b"],r=0;r=Math.pow(this.options.filesizeBase,4-r)/10){t=e/Math.pow(this.options.filesizeBase,4-r),i=a;break}}t=Math.round(10*t)/10}return"".concat(t," ").concat(this.options.dictFileSizeUnits[i])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],i=0;i0){var n=!0,r=!1,o=void 0;try{for(var l,s=i[Symbol.iterator]();!(n=(l=s.next()).done);n=!0){var u=l.value,c=e;u.isFile?u.file((function(e){if(!c.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath="".concat(t,"/").concat(e.name),c.addFile(e)})):u.isDirectory&&e._addFilesFromDirectory(u,"".concat(t,"/").concat(u.name))}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}a()}return null}),r)};return a()}},{key:"accept",value:function(e,t){this.options.maxFilesize&&e.size>1048576*this.options.maxFilesize?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):o.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var t=this;e.upload={uuid:o.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=o.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,(function(i){i?(e.accepted=!1,t._errorProcessing([e],i)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function(e){var t=!0,i=!1,n=void 0;try{for(var r,a=e[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var o=r.value;this.enqueueFile(o)}}catch(e){i=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(i)throw n}}return null}},{key:"enqueueFile",value:function(e){if(e.status!==o.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");var t=this;if(e.status=o.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return t.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function(e){if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1048576*this.options.maxThumbnailFilesize){var t=this;return this._thumbnailQueue.push(e),setTimeout((function(){return t._processThumbnailQueue()}),0)}}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(i){return e.emit("thumbnail",t,i),e._processingThumbnail=!1,e._processThumbnailQueue()}))}}},{key:"removeFile",value:function(e){if(e.status===o.UPLOADING&&this.cancelUpload(e),this.files=m(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);var t=!0,i=!1,n=void 0;try{for(var r,a=this.files.slice()[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var l=r.value;(l.status!==o.UPLOADING||e)&&this.removeFile(l)}}catch(e){i=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(i)throw n}}return null}},{key:"resizeImage",value:function(e,t,i,n,r){var a=this;return this.createThumbnail(e,t,i,n,!0,(function(t,i){if(null==i)return r(e);var n=a.options.resizeMimeType;null==n&&(n=e.type);var l=i.toDataURL(n,a.options.resizeQuality);return"image/jpeg"!==n&&"image/jpg"!==n||(l=g.restore(e.dataURL,l)),r(o.dataURItoBlob(l))}))}},{key:"createThumbnail",value:function(e,t,i,n,r,a){var o=this,l=new FileReader;l.onload=function(){e.dataURL=l.result,"image/svg+xml"!==e.type?o.createThumbnailFromUrl(e,t,i,n,r,a):null!=a&&a(l.result)},l.readAsDataURL(e)}},{key:"displayExistingFile",value:function(e,t,i,n,r){var a=void 0===r||r;if(this.emit("addedfile",e),this.emit("complete",e),a){var o=this;e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,(function(t){o.emit("thumbnail",e,t),i&&i()}),n)}else this.emit("thumbnail",e,t),i&&i()}},{key:"createThumbnailFromUrl",value:function(e,t,i,n,r,a,o){var l=this,s=document.createElement("img");return o&&(s.crossOrigin=o),r="from-image"!=getComputedStyle(document.body).imageOrientation&&r,s.onload=function(){var o=l,u=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(u=function(e){return EXIF.getData(s,(function(){return e(EXIF.getTag(this,"Orientation"))}))}),u((function(r){e.width=s.width,e.height=s.height;var l=o.options.resize.call(o,e,t,i,n),u=document.createElement("canvas"),c=u.getContext("2d");switch(u.width=l.trgWidth,u.height=l.trgHeight,r>4&&(u.width=l.trgHeight,u.height=l.trgWidth),r){case 2:c.translate(u.width,0),c.scale(-1,1);break;case 3:c.translate(u.width,u.height),c.rotate(Math.PI);break;case 4:c.translate(0,u.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-u.width);break;case 7:c.rotate(.5*Math.PI),c.translate(u.height,-u.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-u.height,0)}y(c,s,null!=l.srcX?l.srcX:0,null!=l.srcY?l.srcY:0,l.srcWidth,l.srcHeight,null!=l.trgX?l.trgX:0,null!=l.trgY?l.trgY:0,l.trgWidth,l.trgHeight);var d=u.toDataURL("image/png");if(null!=a)return a(d,u)}))},null!=a&&(s.onerror=a),s.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,i=t;if(!(t>=e)){var n=this.getQueuedFiles();if(n.length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,e-t));for(;i1?t-1:0),n=1;nt.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(n.size/t.options.chunkSize)}if(e[0].upload.chunked){var r=t,a=t,l=e[0];n=i[0];l.upload.chunks=[];var s=function(){for(var t=0;void 0!==l.upload.chunks[t];)t++;if(!(t>=l.upload.totalChunkCount)){0;var i=t*r.options.chunkSize,a=Math.min(i+r.options.chunkSize,n.size),s={name:r._getParamName(0),data:n.webkitSlice?n.webkitSlice(i,a):n.slice(i,a),filename:l.upload.filename,chunkIndex:t};l.upload.chunks[t]={file:l,index:t,dataBlock:s,status:o.UPLOADING,progress:0,retries:0},r._uploadData(e,[s])}};if(l.upload.finishedChunkUpload=function(t,i){var n=a,r=!0;t.status=o.SUCCESS,t.dataBlock=null,t.xhr=null;for(var u=0;u=o;l?a++:a--)r[a]=t.charCodeAt(a);return new Blob([n],{type:i})};var m=function(e,t){return e.filter((function(e){return e!==t})).map((function(e){return e}))},v=function(e){return e.replace(/[\-_](\w)/g,(function(e){return e.charAt(1).toUpperCase()}))};f.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},f.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},f.getElement=function(e,t){var i;if("string"==typeof e?i=document.querySelector(e):null!=e.nodeType&&(i=e),null==i)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector or a plain HTML element."));return i},f.getElements=function(e,t){var i,n;if(e instanceof Array){n=[];try{var r=!0,a=!1,o=void 0;try{for(var l=e[Symbol.iterator]();!(r=(s=l.next()).done);r=!0)i=s.value,n.push(this.getElement(i,t))}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}}catch(e){n=null}}else if("string"==typeof e){n=[];r=!0,a=!1,o=void 0;try{var s;for(l=document.querySelectorAll(e)[Symbol.iterator]();!(r=(s=l.next()).done);r=!0)i=s.value,n.push(i)}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}}else null!=e.nodeType&&(n=[e]);if(null==n||!n.length)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return n},f.confirm=function(e,t,i){return window.confirm(e)?t():null!=i?i():void 0},f.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");var i=e.type,n=i.replace(/\/.*$/,""),r=!0,a=!1,o=void 0;try{for(var l,s=t[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var u=l.value;if("."===(u=u.trim()).charAt(0)){if(-1!==e.name.toLowerCase().indexOf(u.toLowerCase(),e.name.length-u.length))return!0}else if(/\/\*$/.test(u)){if(n===u.replace(/\/.*$/,""))return!0}else if(i===u)return!0}}catch(e){a=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each((function(){return new f(this,e)}))}),f.ADDED="added",f.QUEUED="queued",f.ACCEPTED=f.QUEUED,f.UPLOADING="uploading",f.PROCESSING=f.UPLOADING,f.CANCELED="canceled",f.ERROR="error",f.SUCCESS="success";var y=function(e,t,i,n,r,a,o,l,s,u){var c=function(e){e.naturalWidth;var t=e.naturalHeight,i=document.createElement("canvas");i.width=1,i.height=t;var n=i.getContext("2d");n.drawImage(e,0,0);for(var r=n.getImageData(1,0,1,t).data,a=0,o=t,l=t;l>a;)0===r[4*(l-1)+3]?o=l:a=l,l=o+a>>1;var s=l/t;return 0===s?1:s}(t);return e.drawImage(t,i,n,r,a,o,l,s,u/c)},g=function(){"use strict";function e(){i(this,e)}return r(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",i=void 0,n=void 0,r="",a=void 0,o=void 0,l=void 0,s="",u=0;a=(i=e[u++])>>2,o=(3&i)<<4|(n=e[u++])>>4,l=(15&n)<<2|(r=e[u++])>>6,s=63&r,isNaN(n)?l=s=64:isNaN(r)&&(s=64),t=t+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(s),i=n=r="",a=o=l=s="",ue.length)break}return i}},{key:"decode64",value:function(e){var t=void 0,i=void 0,n="",r=void 0,a=void 0,o="",l=0,s=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");t=this.KEY_STR.indexOf(e.charAt(l++))<<2|(r=this.KEY_STR.indexOf(e.charAt(l++)))>>4,i=(15&r)<<4|(a=this.KEY_STR.indexOf(e.charAt(l++)))>>2,n=(3&a)<<6|(o=this.KEY_STR.indexOf(e.charAt(l++))),s.push(t),64!==a&&s.push(i),64!==o&&s.push(n),t=i=n="",r=a=o="",l> 8 & 0xFF]; -}; - -var packInt32 = function (number) { - return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF]; -}; - -var unpackInt32 = function (buffer) { - return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0]; -}; - -var packFloat32 = function (number) { - return packIEEE754(number, 23, 4); -}; - -var packFloat64 = function (number) { - return packIEEE754(number, 52, 8); -}; - -var addGetter = function (Constructor, key) { - defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } }); -}; - -var get = function (view, count, index, isLittleEndian) { - var intIndex = toIndex(index); - var store = getInternalState(view); - if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX); - var bytes = getInternalState(store.buffer).bytes; - var start = intIndex + store.byteOffset; - var pack = bytes.slice(start, start + count); - return isLittleEndian ? pack : pack.reverse(); -}; - -var set = function (view, count, index, conversion, value, isLittleEndian) { - var intIndex = toIndex(index); - var store = getInternalState(view); - if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX); - var bytes = getInternalState(store.buffer).bytes; - var start = intIndex + store.byteOffset; - var pack = conversion(+value); - for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1]; -}; - -if (!NATIVE_ARRAY_BUFFER) { - $ArrayBuffer = function ArrayBuffer(length) { - anInstance(this, $ArrayBuffer, ARRAY_BUFFER); - var byteLength = toIndex(length); - setInternalState(this, { - bytes: arrayFill.call(new Array(byteLength), 0), - byteLength: byteLength - }); - if (!DESCRIPTORS) this.byteLength = byteLength; - }; - - $DataView = function DataView(buffer, byteOffset, byteLength) { - anInstance(this, $DataView, DATA_VIEW); - anInstance(buffer, $ArrayBuffer, DATA_VIEW); - var bufferLength = getInternalState(buffer).byteLength; - var offset = toInteger(byteOffset); - if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset'); - byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); - if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); - setInternalState(this, { - buffer: buffer, - byteLength: byteLength, - byteOffset: offset - }); - if (!DESCRIPTORS) { - this.buffer = buffer; - this.byteLength = byteLength; - this.byteOffset = offset; - } - }; - - if (DESCRIPTORS) { - addGetter($ArrayBuffer, 'byteLength'); - addGetter($DataView, 'buffer'); - addGetter($DataView, 'byteLength'); - addGetter($DataView, 'byteOffset'); - } - - redefineAll($DataView[PROTOTYPE], { - getInt8: function getInt8(byteOffset) { - return get(this, 1, byteOffset)[0] << 24 >> 24; - }, - getUint8: function getUint8(byteOffset) { - return get(this, 1, byteOffset)[0]; - }, - getInt16: function getInt16(byteOffset /* , littleEndian */) { - var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); - return (bytes[1] << 8 | bytes[0]) << 16 >> 16; - }, - getUint16: function getUint16(byteOffset /* , littleEndian */) { - var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); - return bytes[1] << 8 | bytes[0]; - }, - getInt32: function getInt32(byteOffset /* , littleEndian */) { - return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)); - }, - getUint32: function getUint32(byteOffset /* , littleEndian */) { - return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0; - }, - getFloat32: function getFloat32(byteOffset /* , littleEndian */) { - return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23); - }, - getFloat64: function getFloat64(byteOffset /* , littleEndian */) { - return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52); - }, - setInt8: function setInt8(byteOffset, value) { - set(this, 1, byteOffset, packInt8, value); - }, - setUint8: function setUint8(byteOffset, value) { - set(this, 1, byteOffset, packInt8, value); - }, - setInt16: function setInt16(byteOffset, value /* , littleEndian */) { - set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); - }, - setUint16: function setUint16(byteOffset, value /* , littleEndian */) { - set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); - }, - setInt32: function setInt32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); - }, - setUint32: function setUint32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); - }, - setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { - set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined); - }, - setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { - set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined); - } - }); -} else { - /* eslint-disable no-new -- required for testing */ - if (!fails(function () { - NativeArrayBuffer(1); - }) || !fails(function () { - new NativeArrayBuffer(-1); - }) || fails(function () { - new NativeArrayBuffer(); - new NativeArrayBuffer(1.5); - new NativeArrayBuffer(NaN); - return NativeArrayBuffer.name != ARRAY_BUFFER; - })) { - /* eslint-enable no-new -- required for testing */ - $ArrayBuffer = function ArrayBuffer(length) { - anInstance(this, $ArrayBuffer); - return new NativeArrayBuffer(toIndex(length)); - }; - var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE]; - for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) { - if (!((key = keys[j++]) in $ArrayBuffer)) { - createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]); - } - } - ArrayBufferPrototype.constructor = $ArrayBuffer; - } - - // WebKit bug - the same parent prototype for typed arrays and data view - if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) { - setPrototypeOf($DataViewPrototype, ObjectPrototype); - } - - // iOS Safari 7.x bug - var testView = new $DataView(new $ArrayBuffer(2)); - var nativeSetInt8 = $DataViewPrototype.setInt8; - testView.setInt8(0, 2147483648); - testView.setInt8(1, 2147483649); - if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, { - setInt8: function setInt8(byteOffset, value) { - nativeSetInt8.call(this, byteOffset, value << 24 >> 24); - }, - setUint8: function setUint8(byteOffset, value) { - nativeSetInt8.call(this, byteOffset, value << 24 >> 24); - } - }, { unsafe: true }); -} - -setToStringTag($ArrayBuffer, ARRAY_BUFFER); -setToStringTag($DataView, DATA_VIEW); - -module.exports = { - ArrayBuffer: $ArrayBuffer, - DataView: $DataView -}; - - -/***/ }), - -/***/ 1048: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var toObject = __webpack_require__(7908); -var toAbsoluteIndex = __webpack_require__(1400); -var toLength = __webpack_require__(7466); - -var min = Math.min; - -// `Array.prototype.copyWithin` method implementation -// https://tc39.es/ecma262/#sec-array.prototype.copywithin -module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { - var O = toObject(this); - var len = toLength(O.length); - var to = toAbsoluteIndex(target, len); - var from = toAbsoluteIndex(start, len); - var end = arguments.length > 2 ? arguments[2] : undefined; - var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); - var inc = 1; - if (from < to && to < from + count) { - inc = -1; - from += count - 1; - to += count - 1; - } - while (count-- > 0) { - if (from in O) O[to] = O[from]; - else delete O[to]; - to += inc; - from += inc; - } return O; -}; - - -/***/ }), - -/***/ 1285: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var toObject = __webpack_require__(7908); -var toAbsoluteIndex = __webpack_require__(1400); -var toLength = __webpack_require__(7466); - -// `Array.prototype.fill` method implementation -// https://tc39.es/ecma262/#sec-array.prototype.fill -module.exports = function fill(value /* , start = 0, end = @length */) { - var O = toObject(this); - var length = toLength(O.length); - var argumentsLength = arguments.length; - var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length); - var end = argumentsLength > 2 ? arguments[2] : undefined; - var endPos = end === undefined ? length : toAbsoluteIndex(end, length); - while (endPos > index) O[index++] = value; - return O; -}; - - -/***/ }), - -/***/ 8533: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $forEach = __webpack_require__(2092).forEach; -var arrayMethodIsStrict = __webpack_require__(9341); - -var STRICT_METHOD = arrayMethodIsStrict('forEach'); - -// `Array.prototype.forEach` method implementation -// https://tc39.es/ecma262/#sec-array.prototype.foreach -module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); -} : [].forEach; - - -/***/ }), - -/***/ 8457: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var bind = __webpack_require__(9974); -var toObject = __webpack_require__(7908); -var callWithSafeIterationClosing = __webpack_require__(3411); -var isArrayIteratorMethod = __webpack_require__(7659); -var toLength = __webpack_require__(7466); -var createProperty = __webpack_require__(6135); -var getIteratorMethod = __webpack_require__(1246); - -// `Array.from` method implementation -// https://tc39.es/ecma262/#sec-array.from -module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var argumentsLength = arguments.length; - var mapfn = argumentsLength > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var iteratorMethod = getIteratorMethod(O); - var index = 0; - var length, result, step, iterator, next, value; - if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); - // if the target is not iterable or it's an array with the default iterator - use a simple case - if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { - iterator = iteratorMethod.call(O); - next = iterator.next; - result = new C(); - for (;!(step = next.call(iterator)).done; index++) { - value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; - createProperty(result, index, value); - } - } else { - length = toLength(O.length); - result = new C(length); - for (;length > index; index++) { - value = mapping ? mapfn(O[index], index) : O[index]; - createProperty(result, index, value); - } - } - result.length = index; - return result; -}; - - -/***/ }), - -/***/ 1318: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toIndexedObject = __webpack_require__(5656); -var toLength = __webpack_require__(7466); -var toAbsoluteIndex = __webpack_require__(1400); - -// `Array.prototype.{ indexOf, includes }` methods implementation -var createMethod = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIndexedObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare -- NaN check - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare -- NaN check - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) { - if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; - -module.exports = { - // `Array.prototype.includes` method - // https://tc39.es/ecma262/#sec-array.prototype.includes - includes: createMethod(true), - // `Array.prototype.indexOf` method - // https://tc39.es/ecma262/#sec-array.prototype.indexof - indexOf: createMethod(false) -}; - - -/***/ }), - -/***/ 2092: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var bind = __webpack_require__(9974); -var IndexedObject = __webpack_require__(8361); -var toObject = __webpack_require__(7908); -var toLength = __webpack_require__(7466); -var arraySpeciesCreate = __webpack_require__(5417); - -var push = [].push; - -// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation -var createMethod = function (TYPE) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var IS_FILTER_OUT = TYPE == 7; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function ($this, callbackfn, that, specificCreate) { - var O = toObject($this); - var self = IndexedObject(O); - var boundFunction = bind(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var create = specificCreate || arraySpeciesCreate; - var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; - var value, result; - for (;length > index; index++) if (NO_HOLES || index in self) { - value = self[index]; - result = boundFunction(value, index, O); - if (TYPE) { - if (IS_MAP) target[index] = result; // map - else if (result) switch (TYPE) { - case 3: return true; // some - case 5: return value; // find - case 6: return index; // findIndex - case 2: push.call(target, value); // filter - } else switch (TYPE) { - case 4: return false; // every - case 7: push.call(target, value); // filterOut - } - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; - }; -}; - -module.exports = { - // `Array.prototype.forEach` method - // https://tc39.es/ecma262/#sec-array.prototype.foreach - forEach: createMethod(0), - // `Array.prototype.map` method - // https://tc39.es/ecma262/#sec-array.prototype.map - map: createMethod(1), - // `Array.prototype.filter` method - // https://tc39.es/ecma262/#sec-array.prototype.filter - filter: createMethod(2), - // `Array.prototype.some` method - // https://tc39.es/ecma262/#sec-array.prototype.some - some: createMethod(3), - // `Array.prototype.every` method - // https://tc39.es/ecma262/#sec-array.prototype.every - every: createMethod(4), - // `Array.prototype.find` method - // https://tc39.es/ecma262/#sec-array.prototype.find - find: createMethod(5), - // `Array.prototype.findIndex` method - // https://tc39.es/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod(6), - // `Array.prototype.filterOut` method - // https://github.com/tc39/proposal-array-filtering - filterOut: createMethod(7) -}; - - -/***/ }), - -/***/ 6583: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var toIndexedObject = __webpack_require__(5656); -var toInteger = __webpack_require__(9958); -var toLength = __webpack_require__(7466); -var arrayMethodIsStrict = __webpack_require__(9341); - -var min = Math.min; -var nativeLastIndexOf = [].lastIndexOf; -var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0; -var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf'); -var FORCED = NEGATIVE_ZERO || !STRICT_METHOD; - -// `Array.prototype.lastIndexOf` method implementation -// https://tc39.es/ecma262/#sec-array.prototype.lastindexof -module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { - // convert -0 to +0 - if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0; - var O = toIndexedObject(this); - var length = toLength(O.length); - var index = length - 1; - if (arguments.length > 1) index = min(index, toInteger(arguments[1])); - if (index < 0) index = length + index; - for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0; - return -1; -} : nativeLastIndexOf; - - -/***/ }), - -/***/ 1194: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fails = __webpack_require__(7293); -var wellKnownSymbol = __webpack_require__(5112); -var V8_VERSION = __webpack_require__(7392); - -var SPECIES = wellKnownSymbol('species'); - -module.exports = function (METHOD_NAME) { - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/677 - return V8_VERSION >= 51 || !fails(function () { - var array = []; - var constructor = array.constructor = {}; - constructor[SPECIES] = function () { - return { foo: 1 }; - }; - return array[METHOD_NAME](Boolean).foo !== 1; - }); -}; - - -/***/ }), - -/***/ 9341: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var fails = __webpack_require__(7293); - -module.exports = function (METHOD_NAME, argument) { - var method = [][METHOD_NAME]; - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing - method.call(null, argument || function () { throw 1; }, 1); - }); -}; - - -/***/ }), - -/***/ 3671: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var aFunction = __webpack_require__(3099); -var toObject = __webpack_require__(7908); -var IndexedObject = __webpack_require__(8361); -var toLength = __webpack_require__(7466); - -// `Array.prototype.{ reduce, reduceRight }` methods implementation -var createMethod = function (IS_RIGHT) { - return function (that, callbackfn, argumentsLength, memo) { - aFunction(callbackfn); - var O = toObject(that); - var self = IndexedObject(O); - var length = toLength(O.length); - var index = IS_RIGHT ? length - 1 : 0; - var i = IS_RIGHT ? -1 : 1; - if (argumentsLength < 2) while (true) { - if (index in self) { - memo = self[index]; - index += i; - break; - } - index += i; - if (IS_RIGHT ? index < 0 : length <= index) { - throw TypeError('Reduce of empty array with no initial value'); - } - } - for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { - memo = callbackfn(memo, self[index], index, O); - } - return memo; - }; -}; - -module.exports = { - // `Array.prototype.reduce` method - // https://tc39.es/ecma262/#sec-array.prototype.reduce - left: createMethod(false), - // `Array.prototype.reduceRight` method - // https://tc39.es/ecma262/#sec-array.prototype.reduceright - right: createMethod(true) -}; - - -/***/ }), - -/***/ 5417: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var isObject = __webpack_require__(111); -var isArray = __webpack_require__(3157); -var wellKnownSymbol = __webpack_require__(5112); - -var SPECIES = wellKnownSymbol('species'); - -// `ArraySpeciesCreate` abstract operation -// https://tc39.es/ecma262/#sec-arrayspeciescreate -module.exports = function (originalArray, length) { - var C; - if (isArray(originalArray)) { - C = originalArray.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - else if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); -}; - - -/***/ }), - -/***/ 3411: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var anObject = __webpack_require__(9670); -var iteratorClose = __webpack_require__(9212); - -// call something on iterator step with safe closing on error -module.exports = function (iterator, fn, value, ENTRIES) { - try { - return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (error) { - iteratorClose(iterator); - throw error; - } -}; - - -/***/ }), - -/***/ 7072: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var wellKnownSymbol = __webpack_require__(5112); - -var ITERATOR = wellKnownSymbol('iterator'); -var SAFE_CLOSING = false; - -try { - var called = 0; - var iteratorWithReturn = { - next: function () { - return { done: !!called++ }; - }, - 'return': function () { - SAFE_CLOSING = true; - } - }; - iteratorWithReturn[ITERATOR] = function () { - return this; - }; - // eslint-disable-next-line no-throw-literal -- required for testing - Array.from(iteratorWithReturn, function () { throw 2; }); -} catch (error) { /* empty */ } - -module.exports = function (exec, SKIP_CLOSING) { - if (!SKIP_CLOSING && !SAFE_CLOSING) return false; - var ITERATION_SUPPORT = false; - try { - var object = {}; - object[ITERATOR] = function () { - return { - next: function () { - return { done: ITERATION_SUPPORT = true }; - } - }; - }; - exec(object); - } catch (error) { /* empty */ } - return ITERATION_SUPPORT; -}; - - -/***/ }), - -/***/ 4326: -/***/ (function(module) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), - -/***/ 648: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); -var classofRaw = __webpack_require__(4326); -var wellKnownSymbol = __webpack_require__(5112); - -var TO_STRING_TAG = wellKnownSymbol('toStringTag'); -// ES3 wrong here -var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; - -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (error) { /* empty */ } -}; - -// getting tag from ES6+ `Object.prototype.toString` -module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { - var O, tag, result; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag - // builtinTag case - : CORRECT_ARGUMENTS ? classofRaw(O) - // ES3 arguments fallback - : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; -}; - - -/***/ }), - -/***/ 9920: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var has = __webpack_require__(6656); -var ownKeys = __webpack_require__(3887); -var getOwnPropertyDescriptorModule = __webpack_require__(1236); -var definePropertyModule = __webpack_require__(3070); - -module.exports = function (target, source) { - var keys = ownKeys(source); - var defineProperty = definePropertyModule.f; - var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } -}; - - -/***/ }), - -/***/ 8544: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fails = __webpack_require__(7293); - -module.exports = !fails(function () { - function F() { /* empty */ } - F.prototype.constructor = null; - return Object.getPrototypeOf(new F()) !== F.prototype; -}); - - -/***/ }), - -/***/ 4994: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var IteratorPrototype = __webpack_require__(3383).IteratorPrototype; -var create = __webpack_require__(30); -var createPropertyDescriptor = __webpack_require__(9114); -var setToStringTag = __webpack_require__(8003); -var Iterators = __webpack_require__(7497); - -var returnThis = function () { return this; }; - -module.exports = function (IteratorConstructor, NAME, next) { - var TO_STRING_TAG = NAME + ' Iterator'; - IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); - setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); - Iterators[TO_STRING_TAG] = returnThis; - return IteratorConstructor; -}; - - -/***/ }), - -/***/ 8880: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(9781); -var definePropertyModule = __webpack_require__(3070); -var createPropertyDescriptor = __webpack_require__(9114); - -module.exports = DESCRIPTORS ? function (object, key, value) { - return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), - -/***/ 9114: -/***/ (function(module) { - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - - -/***/ }), - -/***/ 6135: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var toPrimitive = __webpack_require__(7593); -var definePropertyModule = __webpack_require__(3070); -var createPropertyDescriptor = __webpack_require__(9114); - -module.exports = function (object, key, value) { - var propertyKey = toPrimitive(key); - if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); - else object[propertyKey] = value; -}; - - -/***/ }), - -/***/ 654: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var createIteratorConstructor = __webpack_require__(4994); -var getPrototypeOf = __webpack_require__(9518); -var setPrototypeOf = __webpack_require__(7674); -var setToStringTag = __webpack_require__(8003); -var createNonEnumerableProperty = __webpack_require__(8880); -var redefine = __webpack_require__(1320); -var wellKnownSymbol = __webpack_require__(5112); -var IS_PURE = __webpack_require__(1913); -var Iterators = __webpack_require__(7497); -var IteratorsCore = __webpack_require__(3383); - -var IteratorPrototype = IteratorsCore.IteratorPrototype; -var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; -var ITERATOR = wellKnownSymbol('iterator'); -var KEYS = 'keys'; -var VALUES = 'values'; -var ENTRIES = 'entries'; - -var returnThis = function () { return this; }; - -module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { - createIteratorConstructor(IteratorConstructor, NAME, next); - - var getIterationMethod = function (KIND) { - if (KIND === DEFAULT && defaultIterator) return defaultIterator; - if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; - switch (KIND) { - case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; - case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; - case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; - } return function () { return new IteratorConstructor(this); }; - }; - - var TO_STRING_TAG = NAME + ' Iterator'; - var INCORRECT_VALUES_NAME = false; - var IterablePrototype = Iterable.prototype; - var nativeIterator = IterablePrototype[ITERATOR] - || IterablePrototype['@@iterator'] - || DEFAULT && IterablePrototype[DEFAULT]; - var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); - var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; - var CurrentIteratorPrototype, methods, KEY; - - // fix native - if (anyNativeIterator) { - CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); - if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { - if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { - if (setPrototypeOf) { - setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); - } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') { - createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis); - } - } - // Set @@toStringTag to native iterators - setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); - if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; - } - } - - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { - INCORRECT_VALUES_NAME = true; - defaultIterator = function values() { return nativeIterator.call(this); }; - } - - // define iterator - if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { - createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator); - } - Iterators[NAME] = defaultIterator; - - // export additional methods - if (DEFAULT) { - methods = { - values: getIterationMethod(VALUES), - keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), - entries: getIterationMethod(ENTRIES) - }; - if (FORCED) for (KEY in methods) { - if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { - redefine(IterablePrototype, KEY, methods[KEY]); - } - } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); - } - - return methods; -}; - - -/***/ }), - -/***/ 9781: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fails = __webpack_require__(7293); - -// Detect IE8's incomplete defineProperty implementation -module.exports = !fails(function () { - return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; -}); - - -/***/ }), - -/***/ 317: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var isObject = __webpack_require__(111); - -var document = global.document; -// typeof document.createElement is 'object' in old IE -var EXISTS = isObject(document) && isObject(document.createElement); - -module.exports = function (it) { - return EXISTS ? document.createElement(it) : {}; -}; - - -/***/ }), - -/***/ 8324: -/***/ (function(module) { - -// iterable DOM collections -// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods -module.exports = { - CSSRuleList: 0, - CSSStyleDeclaration: 0, - CSSValueList: 0, - ClientRectList: 0, - DOMRectList: 0, - DOMStringList: 0, - DOMTokenList: 1, - DataTransferItemList: 0, - FileList: 0, - HTMLAllCollection: 0, - HTMLCollection: 0, - HTMLFormElement: 0, - HTMLSelectElement: 0, - MediaList: 0, - MimeTypeArray: 0, - NamedNodeMap: 0, - NodeList: 1, - PaintRequestList: 0, - Plugin: 0, - PluginArray: 0, - SVGLengthList: 0, - SVGNumberList: 0, - SVGPathSegList: 0, - SVGPointList: 0, - SVGStringList: 0, - SVGTransformList: 0, - SourceBufferList: 0, - StyleSheetList: 0, - TextTrackCueList: 0, - TextTrackList: 0, - TouchList: 0 -}; - - -/***/ }), - -/***/ 8113: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var getBuiltIn = __webpack_require__(5005); - -module.exports = getBuiltIn('navigator', 'userAgent') || ''; - - -/***/ }), - -/***/ 7392: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var userAgent = __webpack_require__(8113); - -var process = global.process; -var versions = process && process.versions; -var v8 = versions && versions.v8; -var match, version; - -if (v8) { - match = v8.split('.'); - version = match[0] + match[1]; -} else if (userAgent) { - match = userAgent.match(/Edge\/(\d+)/); - if (!match || match[1] >= 74) { - match = userAgent.match(/Chrome\/(\d+)/); - if (match) version = match[1]; - } -} - -module.exports = version && +version; - - -/***/ }), - -/***/ 748: -/***/ (function(module) { - -// IE8- don't enum bug keys -module.exports = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' -]; - - -/***/ }), - -/***/ 2109: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var getOwnPropertyDescriptor = __webpack_require__(1236).f; -var createNonEnumerableProperty = __webpack_require__(8880); -var redefine = __webpack_require__(1320); -var setGlobal = __webpack_require__(3505); -var copyConstructorProperties = __webpack_require__(9920); -var isForced = __webpack_require__(4705); - -/* - options.target - name of the target object - options.global - target is the global object - options.stat - export as static methods of target - options.proto - export as prototype methods of target - options.real - real prototype method for the `pure` version - options.forced - export even if the native feature is available - options.bind - bind methods to the target, required for the `pure` version - options.wrap - wrap constructors to preventing global pollution, required for the `pure` version - options.unsafe - use the simple assignment of property instead of delete + defineProperty - options.sham - add a flag to not completely full polyfills - options.enumerable - export as enumerable property - options.noTargetGet - prevent calling a getter on target -*/ -module.exports = function (options, source) { - var TARGET = options.target; - var GLOBAL = options.global; - var STATIC = options.stat; - var FORCED, target, key, targetProperty, sourceProperty, descriptor; - if (GLOBAL) { - target = global; - } else if (STATIC) { - target = global[TARGET] || setGlobal(TARGET, {}); - } else { - target = (global[TARGET] || {}).prototype; - } - if (target) for (key in source) { - sourceProperty = source[key]; - if (options.noTargetGet) { - descriptor = getOwnPropertyDescriptor(target, key); - targetProperty = descriptor && descriptor.value; - } else targetProperty = target[key]; - FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); - // contained in target - if (!FORCED && targetProperty !== undefined) { - if (typeof sourceProperty === typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - // add a flag to not completely full polyfills - if (options.sham || (targetProperty && targetProperty.sham)) { - createNonEnumerableProperty(sourceProperty, 'sham', true); - } - // extend global - redefine(target, key, sourceProperty, options); - } -}; - - -/***/ }), - -/***/ 7293: -/***/ (function(module) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (error) { - return true; - } -}; - - -/***/ }), - -/***/ 7007: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -// TODO: Remove from `core-js@4` since it's moved to entry points -__webpack_require__(4916); -var redefine = __webpack_require__(1320); -var fails = __webpack_require__(7293); -var wellKnownSymbol = __webpack_require__(5112); -var regexpExec = __webpack_require__(2261); -var createNonEnumerableProperty = __webpack_require__(8880); - -var SPECIES = wellKnownSymbol('species'); - -var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { - // #replace needs built-in support for named groups. - // #match works fine because it just return the exec results, even if it has - // a "grops" property. - var re = /./; - re.exec = function () { - var result = []; - result.groups = { a: '7' }; - return result; - }; - return ''.replace(re, '$') !== '7'; -}); - -// IE <= 11 replaces $0 with the whole match, as if it was $& -// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 -var REPLACE_KEEPS_$0 = (function () { - return 'a'.replace(/./, '$0') === '$0'; -})(); - -var REPLACE = wellKnownSymbol('replace'); -// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string -var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { - if (/./[REPLACE]) { - return /./[REPLACE]('a', '$0') === ''; - } - return false; -})(); - -// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec -// Weex JS has frozen built-in prototypes, so use try / catch wrapper -var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { - // eslint-disable-next-line regexp/no-empty-group -- required for testing - var re = /(?:)/; - var originalExec = re.exec; - re.exec = function () { return originalExec.apply(this, arguments); }; - var result = 'ab'.split(re); - return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; -}); - -module.exports = function (KEY, length, exec, sham) { - var SYMBOL = wellKnownSymbol(KEY); - - var DELEGATES_TO_SYMBOL = !fails(function () { - // String methods call symbol-named RegEp methods - var O = {}; - O[SYMBOL] = function () { return 7; }; - return ''[KEY](O) != 7; - }); - - var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { - // Symbol-named RegExp methods call .exec - var execCalled = false; - var re = /a/; - - if (KEY === 'split') { - // We can't use real regex here since it causes deoptimization - // and serious performance degradation in V8 - // https://github.com/zloirock/core-js/issues/306 - re = {}; - // RegExp[@@split] doesn't call the regex's exec method, but first creates - // a new one. We need to return the patched regex when creating the new one. - re.constructor = {}; - re.constructor[SPECIES] = function () { return re; }; - re.flags = ''; - re[SYMBOL] = /./[SYMBOL]; - } - - re.exec = function () { execCalled = true; return null; }; - - re[SYMBOL](''); - return !execCalled; - }); - - if ( - !DELEGATES_TO_SYMBOL || - !DELEGATES_TO_EXEC || - (KEY === 'replace' && !( - REPLACE_SUPPORTS_NAMED_GROUPS && - REPLACE_KEEPS_$0 && - !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE - )) || - (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) - ) { - var nativeRegExpMethod = /./[SYMBOL]; - var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { - if (regexp.exec === regexpExec) { - if (DELEGATES_TO_SYMBOL && !forceStringMethod) { - // The native String method already delegates to @@method (this - // polyfilled function), leasing to infinite recursion. - // We avoid it by directly calling the native @@method method. - return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; - } - return { done: true, value: nativeMethod.call(str, regexp, arg2) }; - } - return { done: false }; - }, { - REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, - REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE - }); - var stringMethod = methods[0]; - var regexMethod = methods[1]; - - redefine(String.prototype, KEY, stringMethod); - redefine(RegExp.prototype, SYMBOL, length == 2 - // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) - // 21.2.5.11 RegExp.prototype[@@split](string, limit) - ? function (string, arg) { return regexMethod.call(string, this, arg); } - // 21.2.5.6 RegExp.prototype[@@match](string) - // 21.2.5.9 RegExp.prototype[@@search](string) - : function (string) { return regexMethod.call(string, this); } - ); - } - - if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); -}; - - -/***/ }), - -/***/ 9974: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var aFunction = __webpack_require__(3099); - -// optional / simple context binding -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 0: return function () { - return fn.call(that); - }; - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), - -/***/ 5005: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var path = __webpack_require__(857); -var global = __webpack_require__(7854); - -var aFunction = function (variable) { - return typeof variable == 'function' ? variable : undefined; -}; - -module.exports = function (namespace, method) { - return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) - : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; -}; - - -/***/ }), - -/***/ 1246: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var classof = __webpack_require__(648); -var Iterators = __webpack_require__(7497); -var wellKnownSymbol = __webpack_require__(5112); - -var ITERATOR = wellKnownSymbol('iterator'); - -module.exports = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; - - -/***/ }), - -/***/ 8554: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var anObject = __webpack_require__(9670); -var getIteratorMethod = __webpack_require__(1246); - -module.exports = function (it) { - var iteratorMethod = getIteratorMethod(it); - if (typeof iteratorMethod != 'function') { - throw TypeError(String(it) + ' is not iterable'); - } return anObject(iteratorMethod.call(it)); -}; - - -/***/ }), - -/***/ 647: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toObject = __webpack_require__(7908); - -var floor = Math.floor; -var replace = ''.replace; -var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g; -var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g; - -// https://tc39.es/ecma262/#sec-getsubstitution -module.exports = function (matched, str, position, captures, namedCaptures, replacement) { - var tailPos = position + matched.length; - var m = captures.length; - var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; - if (namedCaptures !== undefined) { - namedCaptures = toObject(namedCaptures); - symbols = SUBSTITUTION_SYMBOLS; - } - return replace.call(replacement, symbols, function (match, ch) { - var capture; - switch (ch.charAt(0)) { - case '$': return '$'; - case '&': return matched; - case '`': return str.slice(0, position); - case "'": return str.slice(tailPos); - case '<': - capture = namedCaptures[ch.slice(1, -1)]; - break; - default: // \d\d? - var n = +ch; - if (n === 0) return match; - if (n > m) { - var f = floor(n / 10); - if (f === 0) return match; - if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); - return match; - } - capture = captures[n - 1]; - } - return capture === undefined ? '' : capture; - }); -}; - - -/***/ }), - -/***/ 7854: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var check = function (it) { - return it && it.Math == Math && it; -}; - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -module.exports = - /* global globalThis -- safe */ - check(typeof globalThis == 'object' && globalThis) || - check(typeof window == 'object' && window) || - check(typeof self == 'object' && self) || - check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) || - // eslint-disable-next-line no-new-func -- fallback - (function () { return this; })() || Function('return this')(); - - -/***/ }), - -/***/ 6656: -/***/ (function(module) { - -var hasOwnProperty = {}.hasOwnProperty; - -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), - -/***/ 3501: -/***/ (function(module) { - -module.exports = {}; - - -/***/ }), - -/***/ 490: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var getBuiltIn = __webpack_require__(5005); - -module.exports = getBuiltIn('document', 'documentElement'); - - -/***/ }), - -/***/ 4664: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(9781); -var fails = __webpack_require__(7293); -var createElement = __webpack_require__(317); - -// Thank's IE8 for his funny defineProperty -module.exports = !DESCRIPTORS && !fails(function () { - return Object.defineProperty(createElement('div'), 'a', { - get: function () { return 7; } - }).a != 7; -}); - - -/***/ }), - -/***/ 1179: -/***/ (function(module) { - -// IEEE754 conversions based on https://github.com/feross/ieee754 -var abs = Math.abs; -var pow = Math.pow; -var floor = Math.floor; -var log = Math.log; -var LN2 = Math.LN2; - -var pack = function (number, mantissaLength, bytes) { - var buffer = new Array(bytes); - var exponentLength = bytes * 8 - mantissaLength - 1; - var eMax = (1 << exponentLength) - 1; - var eBias = eMax >> 1; - var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0; - var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0; - var index = 0; - var exponent, mantissa, c; - number = abs(number); - // eslint-disable-next-line no-self-compare -- NaN check - if (number != number || number === Infinity) { - // eslint-disable-next-line no-self-compare -- NaN check - mantissa = number != number ? 1 : 0; - exponent = eMax; - } else { - exponent = floor(log(number) / LN2); - if (number * (c = pow(2, -exponent)) < 1) { - exponent--; - c *= 2; - } - if (exponent + eBias >= 1) { - number += rt / c; - } else { - number += rt * pow(2, 1 - eBias); - } - if (number * c >= 2) { - exponent++; - c /= 2; - } - if (exponent + eBias >= eMax) { - mantissa = 0; - exponent = eMax; - } else if (exponent + eBias >= 1) { - mantissa = (number * c - 1) * pow(2, mantissaLength); - exponent = exponent + eBias; - } else { - mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength); - exponent = 0; - } - } - for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8); - exponent = exponent << mantissaLength | mantissa; - exponentLength += mantissaLength; - for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8); - buffer[--index] |= sign * 128; - return buffer; -}; - -var unpack = function (buffer, mantissaLength) { - var bytes = buffer.length; - var exponentLength = bytes * 8 - mantissaLength - 1; - var eMax = (1 << exponentLength) - 1; - var eBias = eMax >> 1; - var nBits = exponentLength - 7; - var index = bytes - 1; - var sign = buffer[index--]; - var exponent = sign & 127; - var mantissa; - sign >>= 7; - for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8); - mantissa = exponent & (1 << -nBits) - 1; - exponent >>= -nBits; - nBits += mantissaLength; - for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8); - if (exponent === 0) { - exponent = 1 - eBias; - } else if (exponent === eMax) { - return mantissa ? NaN : sign ? -Infinity : Infinity; - } else { - mantissa = mantissa + pow(2, mantissaLength); - exponent = exponent - eBias; - } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); -}; - -module.exports = { - pack: pack, - unpack: unpack -}; - - -/***/ }), - -/***/ 8361: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fails = __webpack_require__(7293); -var classof = __webpack_require__(4326); - -var split = ''.split; - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -module.exports = fails(function () { - // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 - // eslint-disable-next-line no-prototype-builtins -- safe - return !Object('z').propertyIsEnumerable(0); -}) ? function (it) { - return classof(it) == 'String' ? split.call(it, '') : Object(it); -} : Object; - - -/***/ }), - -/***/ 9587: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var isObject = __webpack_require__(111); -var setPrototypeOf = __webpack_require__(7674); - -// makes subclassing work correct for wrapped built-ins -module.exports = function ($this, dummy, Wrapper) { - var NewTarget, NewTargetPrototype; - if ( - // it can work only with native `setPrototypeOf` - setPrototypeOf && - // we haven't completely correct pre-ES6 way for getting `new.target`, so use this - typeof (NewTarget = dummy.constructor) == 'function' && - NewTarget !== Wrapper && - isObject(NewTargetPrototype = NewTarget.prototype) && - NewTargetPrototype !== Wrapper.prototype - ) setPrototypeOf($this, NewTargetPrototype); - return $this; -}; - - -/***/ }), - -/***/ 2788: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var store = __webpack_require__(5465); - -var functionToString = Function.toString; - -// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper -if (typeof store.inspectSource != 'function') { - store.inspectSource = function (it) { - return functionToString.call(it); - }; -} - -module.exports = store.inspectSource; - - -/***/ }), - -/***/ 9909: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var NATIVE_WEAK_MAP = __webpack_require__(8536); -var global = __webpack_require__(7854); -var isObject = __webpack_require__(111); -var createNonEnumerableProperty = __webpack_require__(8880); -var objectHas = __webpack_require__(6656); -var shared = __webpack_require__(5465); -var sharedKey = __webpack_require__(6200); -var hiddenKeys = __webpack_require__(3501); - -var WeakMap = global.WeakMap; -var set, get, has; - -var enforce = function (it) { - return has(it) ? get(it) : set(it, {}); -}; - -var getterFor = function (TYPE) { - return function (it) { - var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { - throw TypeError('Incompatible receiver, ' + TYPE + ' required'); - } return state; - }; -}; - -if (NATIVE_WEAK_MAP) { - var store = shared.state || (shared.state = new WeakMap()); - var wmget = store.get; - var wmhas = store.has; - var wmset = store.set; - set = function (it, metadata) { - metadata.facade = it; - wmset.call(store, it, metadata); - return metadata; - }; - get = function (it) { - return wmget.call(store, it) || {}; - }; - has = function (it) { - return wmhas.call(store, it); - }; -} else { - var STATE = sharedKey('state'); - hiddenKeys[STATE] = true; - set = function (it, metadata) { - metadata.facade = it; - createNonEnumerableProperty(it, STATE, metadata); - return metadata; - }; - get = function (it) { - return objectHas(it, STATE) ? it[STATE] : {}; - }; - has = function (it) { - return objectHas(it, STATE); - }; -} - -module.exports = { - set: set, - get: get, - has: has, - enforce: enforce, - getterFor: getterFor -}; - - -/***/ }), - -/***/ 7659: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var wellKnownSymbol = __webpack_require__(5112); -var Iterators = __webpack_require__(7497); - -var ITERATOR = wellKnownSymbol('iterator'); -var ArrayPrototype = Array.prototype; - -// check on default Array iterator -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); -}; - - -/***/ }), - -/***/ 3157: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var classof = __webpack_require__(4326); - -// `IsArray` abstract operation -// https://tc39.es/ecma262/#sec-isarray -module.exports = Array.isArray || function isArray(arg) { - return classof(arg) == 'Array'; -}; - - -/***/ }), - -/***/ 4705: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fails = __webpack_require__(7293); - -var replacement = /#|\.prototype\./; - -var isForced = function (feature, detection) { - var value = data[normalize(feature)]; - return value == POLYFILL ? true - : value == NATIVE ? false - : typeof detection == 'function' ? fails(detection) - : !!detection; -}; - -var normalize = isForced.normalize = function (string) { - return String(string).replace(replacement, '.').toLowerCase(); -}; - -var data = isForced.data = {}; -var NATIVE = isForced.NATIVE = 'N'; -var POLYFILL = isForced.POLYFILL = 'P'; - -module.exports = isForced; - - -/***/ }), - -/***/ 111: -/***/ (function(module) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - - -/***/ }), - -/***/ 1913: -/***/ (function(module) { - -module.exports = false; - - -/***/ }), - -/***/ 7850: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var isObject = __webpack_require__(111); -var classof = __webpack_require__(4326); -var wellKnownSymbol = __webpack_require__(5112); - -var MATCH = wellKnownSymbol('match'); - -// `IsRegExp` abstract operation -// https://tc39.es/ecma262/#sec-isregexp -module.exports = function (it) { - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp'); -}; - - -/***/ }), - -/***/ 9212: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var anObject = __webpack_require__(9670); - -module.exports = function (iterator) { - var returnMethod = iterator['return']; - if (returnMethod !== undefined) { - return anObject(returnMethod.call(iterator)).value; - } -}; - - -/***/ }), - -/***/ 3383: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var fails = __webpack_require__(7293); -var getPrototypeOf = __webpack_require__(9518); -var createNonEnumerableProperty = __webpack_require__(8880); -var has = __webpack_require__(6656); -var wellKnownSymbol = __webpack_require__(5112); -var IS_PURE = __webpack_require__(1913); - -var ITERATOR = wellKnownSymbol('iterator'); -var BUGGY_SAFARI_ITERATORS = false; - -var returnThis = function () { return this; }; - -// `%IteratorPrototype%` object -// https://tc39.es/ecma262/#sec-%iteratorprototype%-object -var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; - -if ([].keys) { - arrayIterator = [].keys(); - // Safari 8 has buggy iterators w/o `next` - if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; - else { - PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); - if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; - } -} - -var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () { - var test = {}; - // FF44- legacy iterators case - return IteratorPrototype[ITERATOR].call(test) !== test; -}); - -if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) { - createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis); -} - -module.exports = { - IteratorPrototype: IteratorPrototype, - BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS -}; - - -/***/ }), - -/***/ 7497: -/***/ (function(module) { - -module.exports = {}; - - -/***/ }), - -/***/ 133: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fails = __webpack_require__(7293); - -module.exports = !!Object.getOwnPropertySymbols && !fails(function () { - // Chrome 38 Symbol has incorrect toString conversion - /* global Symbol -- required for testing */ - return !String(Symbol()); -}); - - -/***/ }), - -/***/ 590: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fails = __webpack_require__(7293); -var wellKnownSymbol = __webpack_require__(5112); -var IS_PURE = __webpack_require__(1913); - -var ITERATOR = wellKnownSymbol('iterator'); - -module.exports = !fails(function () { - var url = new URL('b?a=1&b=2&c=3', 'http://a'); - var searchParams = url.searchParams; - var result = ''; - url.pathname = 'c%20d'; - searchParams.forEach(function (value, key) { - searchParams['delete']('b'); - result += key + value; - }); - return (IS_PURE && !url.toJSON) - || !searchParams.sort - || url.href !== 'http://a/c%20d?a=1&c=3' - || searchParams.get('c') !== '3' - || String(new URLSearchParams('?a=1')) !== 'a=1' - || !searchParams[ITERATOR] - // throws in Edge - || new URL('https://a@b').username !== 'a' - || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' - // not punycoded in Edge - || new URL('http://тест').host !== 'xn--e1aybc' - // not escaped in Chrome 62- - || new URL('http://a#б').hash !== '#%D0%B1' - // fails in Chrome 66- - || result !== 'a1c3' - // throws in Safari - || new URL('http://x', undefined).host !== 'x'; -}); - - -/***/ }), - -/***/ 8536: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var inspectSource = __webpack_require__(2788); - -var WeakMap = global.WeakMap; - -module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); - - -/***/ }), - -/***/ 1574: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var DESCRIPTORS = __webpack_require__(9781); -var fails = __webpack_require__(7293); -var objectKeys = __webpack_require__(1956); -var getOwnPropertySymbolsModule = __webpack_require__(5181); -var propertyIsEnumerableModule = __webpack_require__(5296); -var toObject = __webpack_require__(7908); -var IndexedObject = __webpack_require__(8361); - -var nativeAssign = Object.assign; -var defineProperty = Object.defineProperty; - -// `Object.assign` method -// https://tc39.es/ecma262/#sec-object.assign -module.exports = !nativeAssign || fails(function () { - // should have correct order of operations (Edge bug) - if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', { - enumerable: true, - get: function () { - defineProperty(this, 'b', { - value: 3, - enumerable: false - }); - } - }), { b: 2 })).b !== 1) return true; - // should work with symbols and should have deterministic property order (V8 bug) - var A = {}; - var B = {}; - /* global Symbol -- required for testing */ - var symbol = Symbol(); - var alphabet = 'abcdefghijklmnopqrst'; - A[symbol] = 7; - alphabet.split('').forEach(function (chr) { B[chr] = chr; }); - return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` - var T = toObject(target); - var argumentsLength = arguments.length; - var index = 1; - var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; - var propertyIsEnumerable = propertyIsEnumerableModule.f; - while (argumentsLength > index) { - var S = IndexedObject(arguments[index++]); - var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) { - key = keys[j++]; - if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key]; - } - } return T; -} : nativeAssign; - - -/***/ }), - -/***/ 30: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var anObject = __webpack_require__(9670); -var defineProperties = __webpack_require__(6048); -var enumBugKeys = __webpack_require__(748); -var hiddenKeys = __webpack_require__(3501); -var html = __webpack_require__(490); -var documentCreateElement = __webpack_require__(317); -var sharedKey = __webpack_require__(6200); - -var GT = '>'; -var LT = '<'; -var PROTOTYPE = 'prototype'; -var SCRIPT = 'script'; -var IE_PROTO = sharedKey('IE_PROTO'); - -var EmptyConstructor = function () { /* empty */ }; - -var scriptTag = function (content) { - return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; -}; - -// Create object with fake `null` prototype: use ActiveX Object with cleared prototype -var NullProtoObjectViaActiveX = function (activeXDocument) { - activeXDocument.write(scriptTag('')); - activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - activeXDocument = null; // avoid memory leak - return temp; -}; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var NullProtoObjectViaIFrame = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = documentCreateElement('iframe'); - var JS = 'java' + SCRIPT + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - // https://github.com/zloirock/core-js/issues/475 - iframe.src = String(JS); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(scriptTag('document.F=Object')); - iframeDocument.close(); - return iframeDocument.F; -}; - -// Check for document.domain and active x support -// No need to use active x approach when document.domain is not set -// see https://github.com/es-shims/es5-shim/issues/150 -// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 -// avoid IE GC bug -var activeXDocument; -var NullProtoObject = function () { - try { - /* global ActiveXObject -- old IE */ - activeXDocument = document.domain && new ActiveXObject('htmlfile'); - } catch (error) { /* ignore */ } - NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); - var length = enumBugKeys.length; - while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; - return NullProtoObject(); -}; - -hiddenKeys[IE_PROTO] = true; - -// `Object.create` method -// https://tc39.es/ecma262/#sec-object.create -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - EmptyConstructor[PROTOTYPE] = anObject(O); - result = new EmptyConstructor(); - EmptyConstructor[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = NullProtoObject(); - return Properties === undefined ? result : defineProperties(result, Properties); -}; - - -/***/ }), - -/***/ 6048: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(9781); -var definePropertyModule = __webpack_require__(3070); -var anObject = __webpack_require__(9670); -var objectKeys = __webpack_require__(1956); - -// `Object.defineProperties` method -// https://tc39.es/ecma262/#sec-object.defineproperties -module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = objectKeys(Properties); - var length = keys.length; - var index = 0; - var key; - while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]); - return O; -}; - - -/***/ }), - -/***/ 3070: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(9781); -var IE8_DOM_DEFINE = __webpack_require__(4664); -var anObject = __webpack_require__(9670); -var toPrimitive = __webpack_require__(7593); - -var nativeDefineProperty = Object.defineProperty; - -// `Object.defineProperty` method -// https://tc39.es/ecma262/#sec-object.defineproperty -exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return nativeDefineProperty(O, P, Attributes); - } catch (error) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - - -/***/ }), - -/***/ 1236: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(9781); -var propertyIsEnumerableModule = __webpack_require__(5296); -var createPropertyDescriptor = __webpack_require__(9114); -var toIndexedObject = __webpack_require__(5656); -var toPrimitive = __webpack_require__(7593); -var has = __webpack_require__(6656); -var IE8_DOM_DEFINE = __webpack_require__(4664); - -var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - -// `Object.getOwnPropertyDescriptor` method -// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor -exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { - O = toIndexedObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return nativeGetOwnPropertyDescriptor(O, P); - } catch (error) { /* empty */ } - if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); -}; - - -/***/ }), - -/***/ 8006: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -var internalObjectKeys = __webpack_require__(6324); -var enumBugKeys = __webpack_require__(748); - -var hiddenKeys = enumBugKeys.concat('length', 'prototype'); - -// `Object.getOwnPropertyNames` method -// https://tc39.es/ecma262/#sec-object.getownpropertynames -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return internalObjectKeys(O, hiddenKeys); -}; - - -/***/ }), - -/***/ 5181: -/***/ (function(__unused_webpack_module, exports) { - -exports.f = Object.getOwnPropertySymbols; - - -/***/ }), - -/***/ 9518: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var has = __webpack_require__(6656); -var toObject = __webpack_require__(7908); -var sharedKey = __webpack_require__(6200); -var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544); - -var IE_PROTO = sharedKey('IE_PROTO'); -var ObjectPrototype = Object.prototype; - -// `Object.getPrototypeOf` method -// https://tc39.es/ecma262/#sec-object.getprototypeof -module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectPrototype : null; -}; - - -/***/ }), - -/***/ 6324: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var has = __webpack_require__(6656); -var toIndexedObject = __webpack_require__(5656); -var indexOf = __webpack_require__(1318).indexOf; -var hiddenKeys = __webpack_require__(3501); - -module.exports = function (object, names) { - var O = toIndexedObject(object); - var i = 0; - var result = []; - var key; - for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~indexOf(result, key) || result.push(key); - } - return result; -}; - - -/***/ }), - -/***/ 1956: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var internalObjectKeys = __webpack_require__(6324); -var enumBugKeys = __webpack_require__(748); - -// `Object.keys` method -// https://tc39.es/ecma262/#sec-object.keys -module.exports = Object.keys || function keys(O) { - return internalObjectKeys(O, enumBugKeys); -}; - - -/***/ }), - -/***/ 5296: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -var nativePropertyIsEnumerable = {}.propertyIsEnumerable; -var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - -// Nashorn ~ JDK8 bug -var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); - -// `Object.prototype.propertyIsEnumerable` method implementation -// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable -exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor(this, V); - return !!descriptor && descriptor.enumerable; -} : nativePropertyIsEnumerable; - - -/***/ }), - -/***/ 7674: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/* eslint-disable no-proto -- safe */ -var anObject = __webpack_require__(9670); -var aPossiblePrototype = __webpack_require__(6077); - -// `Object.setPrototypeOf` method -// https://tc39.es/ecma262/#sec-object.setprototypeof -// Works with __proto__ only. Old v8 can't work with null proto objects. -module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { - var CORRECT_SETTER = false; - var test = {}; - var setter; - try { - setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; - setter.call(test, []); - CORRECT_SETTER = test instanceof Array; - } catch (error) { /* empty */ } - return function setPrototypeOf(O, proto) { - anObject(O); - aPossiblePrototype(proto); - if (CORRECT_SETTER) setter.call(O, proto); - else O.__proto__ = proto; - return O; - }; -}() : undefined); - - -/***/ }), - -/***/ 288: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); -var classof = __webpack_require__(648); - -// `Object.prototype.toString` method implementation -// https://tc39.es/ecma262/#sec-object.prototype.tostring -module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { - return '[object ' + classof(this) + ']'; -}; - - -/***/ }), - -/***/ 3887: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var getBuiltIn = __webpack_require__(5005); -var getOwnPropertyNamesModule = __webpack_require__(8006); -var getOwnPropertySymbolsModule = __webpack_require__(5181); -var anObject = __webpack_require__(9670); - -// all object keys, includes non-enumerable and symbols -module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { - var keys = getOwnPropertyNamesModule.f(anObject(it)); - var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; - return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; -}; - - -/***/ }), - -/***/ 857: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); - -module.exports = global; - - -/***/ }), - -/***/ 2248: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var redefine = __webpack_require__(1320); - -module.exports = function (target, src, options) { - for (var key in src) redefine(target, key, src[key], options); - return target; -}; - - -/***/ }), - -/***/ 1320: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var createNonEnumerableProperty = __webpack_require__(8880); -var has = __webpack_require__(6656); -var setGlobal = __webpack_require__(3505); -var inspectSource = __webpack_require__(2788); -var InternalStateModule = __webpack_require__(9909); - -var getInternalState = InternalStateModule.get; -var enforceInternalState = InternalStateModule.enforce; -var TEMPLATE = String(String).split('String'); - -(module.exports = function (O, key, value, options) { - var unsafe = options ? !!options.unsafe : false; - var simple = options ? !!options.enumerable : false; - var noTargetGet = options ? !!options.noTargetGet : false; - var state; - if (typeof value == 'function') { - if (typeof key == 'string' && !has(value, 'name')) { - createNonEnumerableProperty(value, 'name', key); - } - state = enforceInternalState(value); - if (!state.source) { - state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); - } - } - if (O === global) { - if (simple) O[key] = value; - else setGlobal(key, value); - return; - } else if (!unsafe) { - delete O[key]; - } else if (!noTargetGet && O[key]) { - simple = true; - } - if (simple) O[key] = value; - else createNonEnumerableProperty(O, key, value); -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, 'toString', function toString() { - return typeof this == 'function' && getInternalState(this).source || inspectSource(this); -}); - - -/***/ }), - -/***/ 7651: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var classof = __webpack_require__(4326); -var regexpExec = __webpack_require__(2261); - -// `RegExpExec` abstract operation -// https://tc39.es/ecma262/#sec-regexpexec -module.exports = function (R, S) { - var exec = R.exec; - if (typeof exec === 'function') { - var result = exec.call(R, S); - if (typeof result !== 'object') { - throw TypeError('RegExp exec method returned something other than an Object or null'); - } - return result; - } - - if (classof(R) !== 'RegExp') { - throw TypeError('RegExp#exec called on incompatible receiver'); - } - - return regexpExec.call(R, S); -}; - - - -/***/ }), - -/***/ 2261: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var regexpFlags = __webpack_require__(7066); -var stickyHelpers = __webpack_require__(2999); - -var nativeExec = RegExp.prototype.exec; -// This always refers to the native implementation, because the -// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, -// which loads this file before patching the method. -var nativeReplace = String.prototype.replace; - -var patchedExec = nativeExec; - -var UPDATES_LAST_INDEX_WRONG = (function () { - var re1 = /a/; - var re2 = /b*/g; - nativeExec.call(re1, 'a'); - nativeExec.call(re2, 'a'); - return re1.lastIndex !== 0 || re2.lastIndex !== 0; -})(); - -var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; - -// nonparticipating capturing group, copied from es5-shim's String#split patch. -// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing -var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; - -var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y; - -if (PATCH) { - patchedExec = function exec(str) { - var re = this; - var lastIndex, reCopy, match, i; - var sticky = UNSUPPORTED_Y && re.sticky; - var flags = regexpFlags.call(re); - var source = re.source; - var charsAdded = 0; - var strCopy = str; - - if (sticky) { - flags = flags.replace('y', ''); - if (flags.indexOf('g') === -1) { - flags += 'g'; - } - - strCopy = String(str).slice(re.lastIndex); - // Support anchored sticky behavior. - if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { - source = '(?: ' + source + ')'; - strCopy = ' ' + strCopy; - charsAdded++; - } - // ^(? + rx + ) is needed, in combination with some str slicing, to - // simulate the 'y' flag. - reCopy = new RegExp('^(?:' + source + ')', flags); - } - - if (NPCG_INCLUDED) { - reCopy = new RegExp('^' + source + '$(?!\\s)', flags); - } - if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; - - match = nativeExec.call(sticky ? reCopy : re, strCopy); - - if (sticky) { - if (match) { - match.input = match.input.slice(charsAdded); - match[0] = match[0].slice(charsAdded); - match.index = re.lastIndex; - re.lastIndex += match[0].length; - } else re.lastIndex = 0; - } else if (UPDATES_LAST_INDEX_WRONG && match) { - re.lastIndex = re.global ? match.index + match[0].length : lastIndex; - } - if (NPCG_INCLUDED && match && match.length > 1) { - // Fix browsers whose `exec` methods don't consistently return `undefined` - // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ - nativeReplace.call(match[0], reCopy, function () { - for (i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) match[i] = undefined; - } - }); - } - - return match; - }; -} - -module.exports = patchedExec; - - -/***/ }), - -/***/ 7066: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var anObject = __webpack_require__(9670); - -// `RegExp.prototype.flags` getter implementation -// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags -module.exports = function () { - var that = anObject(this); - var result = ''; - if (that.global) result += 'g'; - if (that.ignoreCase) result += 'i'; - if (that.multiline) result += 'm'; - if (that.dotAll) result += 's'; - if (that.unicode) result += 'u'; - if (that.sticky) result += 'y'; - return result; -}; - - -/***/ }), - -/***/ 2999: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -var fails = __webpack_require__(7293); - -// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, -// so we use an intermediate function. -function RE(s, f) { - return RegExp(s, f); -} - -exports.UNSUPPORTED_Y = fails(function () { - // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError - var re = RE('a', 'y'); - re.lastIndex = 2; - return re.exec('abcd') != null; -}); - -exports.BROKEN_CARET = fails(function () { - // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 - var re = RE('^r', 'gy'); - re.lastIndex = 2; - return re.exec('str') != null; -}); - - -/***/ }), - -/***/ 4488: -/***/ (function(module) { - -// `RequireObjectCoercible` abstract operation -// https://tc39.es/ecma262/#sec-requireobjectcoercible -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), - -/***/ 3505: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var createNonEnumerableProperty = __webpack_require__(8880); - -module.exports = function (key, value) { - try { - createNonEnumerableProperty(global, key, value); - } catch (error) { - global[key] = value; - } return value; -}; - - -/***/ }), - -/***/ 6340: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var getBuiltIn = __webpack_require__(5005); -var definePropertyModule = __webpack_require__(3070); -var wellKnownSymbol = __webpack_require__(5112); -var DESCRIPTORS = __webpack_require__(9781); - -var SPECIES = wellKnownSymbol('species'); - -module.exports = function (CONSTRUCTOR_NAME) { - var Constructor = getBuiltIn(CONSTRUCTOR_NAME); - var defineProperty = definePropertyModule.f; - - if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { - defineProperty(Constructor, SPECIES, { - configurable: true, - get: function () { return this; } - }); - } -}; - - -/***/ }), - -/***/ 8003: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var defineProperty = __webpack_require__(3070).f; -var has = __webpack_require__(6656); -var wellKnownSymbol = __webpack_require__(5112); - -var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - -module.exports = function (it, TAG, STATIC) { - if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { - defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); - } -}; - - -/***/ }), - -/***/ 6200: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var shared = __webpack_require__(2309); -var uid = __webpack_require__(9711); - -var keys = shared('keys'); - -module.exports = function (key) { - return keys[key] || (keys[key] = uid(key)); -}; - - -/***/ }), - -/***/ 5465: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var setGlobal = __webpack_require__(3505); - -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || setGlobal(SHARED, {}); - -module.exports = store; - - -/***/ }), - -/***/ 2309: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var IS_PURE = __webpack_require__(1913); -var store = __webpack_require__(5465); - -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: '3.9.0', - mode: IS_PURE ? 'pure' : 'global', - copyright: '© 2021 Denis Pushkarev (zloirock.ru)' -}); - - -/***/ }), - -/***/ 6707: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var anObject = __webpack_require__(9670); -var aFunction = __webpack_require__(3099); -var wellKnownSymbol = __webpack_require__(5112); - -var SPECIES = wellKnownSymbol('species'); - -// `SpeciesConstructor` abstract operation -// https://tc39.es/ecma262/#sec-speciesconstructor -module.exports = function (O, defaultConstructor) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S); -}; - - -/***/ }), - -/***/ 8710: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toInteger = __webpack_require__(9958); -var requireObjectCoercible = __webpack_require__(4488); - -// `String.prototype.{ codePointAt, at }` methods implementation -var createMethod = function (CONVERT_TO_STRING) { - return function ($this, pos) { - var S = String(requireObjectCoercible($this)); - var position = toInteger(pos); - var size = S.length; - var first, second; - if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; - first = S.charCodeAt(position); - return first < 0xD800 || first > 0xDBFF || position + 1 === size - || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF - ? CONVERT_TO_STRING ? S.charAt(position) : first - : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; - }; -}; - -module.exports = { - // `String.prototype.codePointAt` method - // https://tc39.es/ecma262/#sec-string.prototype.codepointat - codeAt: createMethod(false), - // `String.prototype.at` method - // https://github.com/mathiasbynens/String.prototype.at - charAt: createMethod(true) -}; - - -/***/ }), - -/***/ 3197: -/***/ (function(module) { - -"use strict"; - -// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter = '-'; // '\x2D' -var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars -var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators -var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process'; -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - */ -var ucs2decode = function (string) { - var output = []; - var counter = 0; - var length = string.length; - while (counter < length) { - var value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -}; - -/** - * Converts a digit/integer into a basic code point. - */ -var digitToBasic = function (digit) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - */ -var adapt = function (delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - */ -// eslint-disable-next-line max-statements -- TODO -var encode = function (input) { - var output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - var inputLength = input.length; - - // Initialize the state. - var n = initialN; - var delta = 0; - var bias = initialBias; - var i, currentValue; - - // Handle the basic code points. - for (i = 0; i < input.length; i++) { - currentValue = input[i]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - var basicLength = output.length; // number of basic code points. - var handledCPCount = basicLength; // number of code points that have been handled; - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - // All non-basic code points < n have been handled already. Find the next larger one: - var m = maxInt; - for (i = 0; i < input.length; i++) { - currentValue = input[i]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , but guard against overflow. - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - throw RangeError(OVERFLOW_ERROR); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (i = 0; i < input.length; i++) { - currentValue = input[i]; - if (currentValue < n && ++delta > maxInt) { - throw RangeError(OVERFLOW_ERROR); - } - if (currentValue == n) { - // Represent delta as a generalized variable-length integer. - var q = delta; - for (var k = base; /* no condition */; k += base) { - var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) break; - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT))); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - } - return output.join(''); -}; - -module.exports = function (input) { - var encoded = []; - var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.'); - var i, label; - for (i = 0; i < labels.length; i++) { - label = labels[i]; - encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label); - } - return encoded.join('.'); -}; - - -/***/ }), - -/***/ 6091: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var fails = __webpack_require__(7293); -var whitespaces = __webpack_require__(1361); - -var non = '\u200B\u0085\u180E'; - -// check that a method works with the correct list -// of whitespaces and has a correct name -module.exports = function (METHOD_NAME) { - return fails(function () { - return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME; - }); -}; - - -/***/ }), - -/***/ 3111: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var requireObjectCoercible = __webpack_require__(4488); -var whitespaces = __webpack_require__(1361); - -var whitespace = '[' + whitespaces + ']'; -var ltrim = RegExp('^' + whitespace + whitespace + '*'); -var rtrim = RegExp(whitespace + whitespace + '*$'); - -// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation -var createMethod = function (TYPE) { - return function ($this) { - var string = String(requireObjectCoercible($this)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); - return string; - }; -}; - -module.exports = { - // `String.prototype.{ trimLeft, trimStart }` methods - // https://tc39.es/ecma262/#sec-string.prototype.trimstart - start: createMethod(1), - // `String.prototype.{ trimRight, trimEnd }` methods - // https://tc39.es/ecma262/#sec-string.prototype.trimend - end: createMethod(2), - // `String.prototype.trim` method - // https://tc39.es/ecma262/#sec-string.prototype.trim - trim: createMethod(3) -}; - - -/***/ }), - -/***/ 1400: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toInteger = __webpack_require__(9958); - -var max = Math.max; -var min = Math.min; - -// Helper for a popular repeating case of the spec: -// Let integer be ? ToInteger(index). -// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). -module.exports = function (index, length) { - var integer = toInteger(index); - return integer < 0 ? max(integer + length, 0) : min(integer, length); -}; - - -/***/ }), - -/***/ 7067: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toInteger = __webpack_require__(9958); -var toLength = __webpack_require__(7466); - -// `ToIndex` abstract operation -// https://tc39.es/ecma262/#sec-toindex -module.exports = function (it) { - if (it === undefined) return 0; - var number = toInteger(it); - var length = toLength(number); - if (number !== length) throw RangeError('Wrong length or index'); - return length; -}; - - -/***/ }), - -/***/ 5656: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -// toObject with fallback for non-array-like ES3 strings -var IndexedObject = __webpack_require__(8361); -var requireObjectCoercible = __webpack_require__(4488); - -module.exports = function (it) { - return IndexedObject(requireObjectCoercible(it)); -}; - - -/***/ }), - -/***/ 9958: -/***/ (function(module) { - -var ceil = Math.ceil; -var floor = Math.floor; - -// `ToInteger` abstract operation -// https://tc39.es/ecma262/#sec-tointeger -module.exports = function (argument) { - return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); -}; - - -/***/ }), - -/***/ 7466: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toInteger = __webpack_require__(9958); - -var min = Math.min; - -// `ToLength` abstract operation -// https://tc39.es/ecma262/#sec-tolength -module.exports = function (argument) { - return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 -}; - - -/***/ }), - -/***/ 7908: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var requireObjectCoercible = __webpack_require__(4488); - -// `ToObject` abstract operation -// https://tc39.es/ecma262/#sec-toobject -module.exports = function (argument) { - return Object(requireObjectCoercible(argument)); -}; - - -/***/ }), - -/***/ 4590: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toPositiveInteger = __webpack_require__(3002); - -module.exports = function (it, BYTES) { - var offset = toPositiveInteger(it); - if (offset % BYTES) throw RangeError('Wrong offset'); - return offset; -}; - - -/***/ }), - -/***/ 3002: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toInteger = __webpack_require__(9958); - -module.exports = function (it) { - var result = toInteger(it); - if (result < 0) throw RangeError("The argument can't be less than 0"); - return result; -}; - - -/***/ }), - -/***/ 7593: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var isObject = __webpack_require__(111); - -// `ToPrimitive` abstract operation -// https://tc39.es/ecma262/#sec-toprimitive -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (input, PREFERRED_STRING) { - if (!isObject(input)) return input; - var fn, val; - if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; - if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), - -/***/ 1694: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var wellKnownSymbol = __webpack_require__(5112); - -var TO_STRING_TAG = wellKnownSymbol('toStringTag'); -var test = {}; - -test[TO_STRING_TAG] = 'z'; - -module.exports = String(test) === '[object z]'; - - -/***/ }), - -/***/ 9843: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var global = __webpack_require__(7854); -var DESCRIPTORS = __webpack_require__(9781); -var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832); -var ArrayBufferViewCore = __webpack_require__(260); -var ArrayBufferModule = __webpack_require__(3331); -var anInstance = __webpack_require__(5787); -var createPropertyDescriptor = __webpack_require__(9114); -var createNonEnumerableProperty = __webpack_require__(8880); -var toLength = __webpack_require__(7466); -var toIndex = __webpack_require__(7067); -var toOffset = __webpack_require__(4590); -var toPrimitive = __webpack_require__(7593); -var has = __webpack_require__(6656); -var classof = __webpack_require__(648); -var isObject = __webpack_require__(111); -var create = __webpack_require__(30); -var setPrototypeOf = __webpack_require__(7674); -var getOwnPropertyNames = __webpack_require__(8006).f; -var typedArrayFrom = __webpack_require__(7321); -var forEach = __webpack_require__(2092).forEach; -var setSpecies = __webpack_require__(6340); -var definePropertyModule = __webpack_require__(3070); -var getOwnPropertyDescriptorModule = __webpack_require__(1236); -var InternalStateModule = __webpack_require__(9909); -var inheritIfRequired = __webpack_require__(9587); - -var getInternalState = InternalStateModule.get; -var setInternalState = InternalStateModule.set; -var nativeDefineProperty = definePropertyModule.f; -var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; -var round = Math.round; -var RangeError = global.RangeError; -var ArrayBuffer = ArrayBufferModule.ArrayBuffer; -var DataView = ArrayBufferModule.DataView; -var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS; -var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG; -var TypedArray = ArrayBufferViewCore.TypedArray; -var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype; -var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; -var isTypedArray = ArrayBufferViewCore.isTypedArray; -var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; -var WRONG_LENGTH = 'Wrong length'; - -var fromList = function (C, list) { - var index = 0; - var length = list.length; - var result = new (aTypedArrayConstructor(C))(length); - while (length > index) result[index] = list[index++]; - return result; -}; - -var addGetter = function (it, key) { - nativeDefineProperty(it, key, { get: function () { - return getInternalState(this)[key]; - } }); -}; - -var isArrayBuffer = function (it) { - var klass; - return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer'; -}; - -var isTypedArrayIndex = function (target, key) { - return isTypedArray(target) - && typeof key != 'symbol' - && key in target - && String(+key) == String(key); -}; - -var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) { - return isTypedArrayIndex(target, key = toPrimitive(key, true)) - ? createPropertyDescriptor(2, target[key]) - : nativeGetOwnPropertyDescriptor(target, key); -}; - -var wrappedDefineProperty = function defineProperty(target, key, descriptor) { - if (isTypedArrayIndex(target, key = toPrimitive(key, true)) - && isObject(descriptor) - && has(descriptor, 'value') - && !has(descriptor, 'get') - && !has(descriptor, 'set') - // TODO: add validation descriptor w/o calling accessors - && !descriptor.configurable - && (!has(descriptor, 'writable') || descriptor.writable) - && (!has(descriptor, 'enumerable') || descriptor.enumerable) - ) { - target[key] = descriptor.value; - return target; - } return nativeDefineProperty(target, key, descriptor); -}; - -if (DESCRIPTORS) { - if (!NATIVE_ARRAY_BUFFER_VIEWS) { - getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor; - definePropertyModule.f = wrappedDefineProperty; - addGetter(TypedArrayPrototype, 'buffer'); - addGetter(TypedArrayPrototype, 'byteOffset'); - addGetter(TypedArrayPrototype, 'byteLength'); - addGetter(TypedArrayPrototype, 'length'); - } - - $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, { - getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor, - defineProperty: wrappedDefineProperty - }); - - module.exports = function (TYPE, wrapper, CLAMPED) { - var BYTES = TYPE.match(/\d+$/)[0] / 8; - var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array'; - var GETTER = 'get' + TYPE; - var SETTER = 'set' + TYPE; - var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME]; - var TypedArrayConstructor = NativeTypedArrayConstructor; - var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype; - var exported = {}; - - var getter = function (that, index) { - var data = getInternalState(that); - return data.view[GETTER](index * BYTES + data.byteOffset, true); - }; - - var setter = function (that, index, value) { - var data = getInternalState(that); - if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF; - data.view[SETTER](index * BYTES + data.byteOffset, value, true); - }; - - var addElement = function (that, index) { - nativeDefineProperty(that, index, { - get: function () { - return getter(this, index); - }, - set: function (value) { - return setter(this, index, value); - }, - enumerable: true - }); - }; - - if (!NATIVE_ARRAY_BUFFER_VIEWS) { - TypedArrayConstructor = wrapper(function (that, data, offset, $length) { - anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME); - var index = 0; - var byteOffset = 0; - var buffer, byteLength, length; - if (!isObject(data)) { - length = toIndex(data); - byteLength = length * BYTES; - buffer = new ArrayBuffer(byteLength); - } else if (isArrayBuffer(data)) { - buffer = data; - byteOffset = toOffset(offset, BYTES); - var $len = data.byteLength; - if ($length === undefined) { - if ($len % BYTES) throw RangeError(WRONG_LENGTH); - byteLength = $len - byteOffset; - if (byteLength < 0) throw RangeError(WRONG_LENGTH); - } else { - byteLength = toLength($length) * BYTES; - if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH); - } - length = byteLength / BYTES; - } else if (isTypedArray(data)) { - return fromList(TypedArrayConstructor, data); - } else { - return typedArrayFrom.call(TypedArrayConstructor, data); - } - setInternalState(that, { - buffer: buffer, - byteOffset: byteOffset, - byteLength: byteLength, - length: length, - view: new DataView(buffer) - }); - while (index < length) addElement(that, index++); - }); - - if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); - TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype); - } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) { - TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) { - anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME); - return inheritIfRequired(function () { - if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data)); - if (isArrayBuffer(data)) return $length !== undefined - ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length) - : typedArrayOffset !== undefined - ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES)) - : new NativeTypedArrayConstructor(data); - if (isTypedArray(data)) return fromList(TypedArrayConstructor, data); - return typedArrayFrom.call(TypedArrayConstructor, data); - }(), dummy, TypedArrayConstructor); - }); - - if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); - forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) { - if (!(key in TypedArrayConstructor)) { - createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]); - } - }); - TypedArrayConstructor.prototype = TypedArrayConstructorPrototype; - } - - if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) { - createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor); - } - - if (TYPED_ARRAY_TAG) { - createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME); - } - - exported[CONSTRUCTOR_NAME] = TypedArrayConstructor; - - $({ - global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS - }, exported); - - if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) { - createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES); - } - - if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) { - createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES); - } - - setSpecies(CONSTRUCTOR_NAME); - }; -} else module.exports = function () { /* empty */ }; - - -/***/ }), - -/***/ 3832: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/* eslint-disable no-new -- required for testing */ -var global = __webpack_require__(7854); -var fails = __webpack_require__(7293); -var checkCorrectnessOfIteration = __webpack_require__(7072); -var NATIVE_ARRAY_BUFFER_VIEWS = __webpack_require__(260).NATIVE_ARRAY_BUFFER_VIEWS; - -var ArrayBuffer = global.ArrayBuffer; -var Int8Array = global.Int8Array; - -module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () { - Int8Array(1); -}) || !fails(function () { - new Int8Array(-1); -}) || !checkCorrectnessOfIteration(function (iterable) { - new Int8Array(); - new Int8Array(null); - new Int8Array(1.5); - new Int8Array(iterable); -}, true) || fails(function () { - // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill - return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1; -}); - - -/***/ }), - -/***/ 3074: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor; -var speciesConstructor = __webpack_require__(6707); - -module.exports = function (instance, list) { - var C = speciesConstructor(instance, instance.constructor); - var index = 0; - var length = list.length; - var result = new (aTypedArrayConstructor(C))(length); - while (length > index) result[index] = list[index++]; - return result; -}; - - -/***/ }), - -/***/ 7321: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var toObject = __webpack_require__(7908); -var toLength = __webpack_require__(7466); -var getIteratorMethod = __webpack_require__(1246); -var isArrayIteratorMethod = __webpack_require__(7659); -var bind = __webpack_require__(9974); -var aTypedArrayConstructor = __webpack_require__(260).aTypedArrayConstructor; - -module.exports = function from(source /* , mapfn, thisArg */) { - var O = toObject(source); - var argumentsLength = arguments.length; - var mapfn = argumentsLength > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var iteratorMethod = getIteratorMethod(O); - var i, length, result, step, iterator, next; - if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) { - iterator = iteratorMethod.call(O); - next = iterator.next; - O = []; - while (!(step = next.call(iterator)).done) { - O.push(step.value); - } - } - if (mapping && argumentsLength > 2) { - mapfn = bind(mapfn, arguments[2], 2); - } - length = toLength(O.length); - result = new (aTypedArrayConstructor(this))(length); - for (i = 0; length > i; i++) { - result[i] = mapping ? mapfn(O[i], i) : O[i]; - } - return result; -}; - - -/***/ }), - -/***/ 9711: -/***/ (function(module) { - -var id = 0; -var postfix = Math.random(); - -module.exports = function (key) { - return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); -}; - - -/***/ }), - -/***/ 3307: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var NATIVE_SYMBOL = __webpack_require__(133); - -module.exports = NATIVE_SYMBOL - /* global Symbol -- safe */ - && !Symbol.sham - && typeof Symbol.iterator == 'symbol'; - - -/***/ }), - -/***/ 5112: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var shared = __webpack_require__(2309); -var has = __webpack_require__(6656); -var uid = __webpack_require__(9711); -var NATIVE_SYMBOL = __webpack_require__(133); -var USE_SYMBOL_AS_UID = __webpack_require__(3307); - -var WellKnownSymbolsStore = shared('wks'); -var Symbol = global.Symbol; -var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; - -module.exports = function (name) { - if (!has(WellKnownSymbolsStore, name)) { - if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name]; - else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); - } return WellKnownSymbolsStore[name]; -}; - - -/***/ }), - -/***/ 1361: -/***/ (function(module) { - -// a string of all valid unicode whitespaces -module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + - '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - - -/***/ }), - -/***/ 8264: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var global = __webpack_require__(7854); -var arrayBufferModule = __webpack_require__(3331); -var setSpecies = __webpack_require__(6340); - -var ARRAY_BUFFER = 'ArrayBuffer'; -var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER]; -var NativeArrayBuffer = global[ARRAY_BUFFER]; - -// `ArrayBuffer` constructor -// https://tc39.es/ecma262/#sec-arraybuffer-constructor -$({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, { - ArrayBuffer: ArrayBuffer -}); - -setSpecies(ARRAY_BUFFER); - - -/***/ }), - -/***/ 2222: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var fails = __webpack_require__(7293); -var isArray = __webpack_require__(3157); -var isObject = __webpack_require__(111); -var toObject = __webpack_require__(7908); -var toLength = __webpack_require__(7466); -var createProperty = __webpack_require__(6135); -var arraySpeciesCreate = __webpack_require__(5417); -var arrayMethodHasSpeciesSupport = __webpack_require__(1194); -var wellKnownSymbol = __webpack_require__(5112); -var V8_VERSION = __webpack_require__(7392); - -var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); -var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; -var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; - -// We can't use this feature detection in V8 since it causes -// deoptimization and serious performance degradation -// https://github.com/zloirock/core-js/issues/679 -var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { - var array = []; - array[IS_CONCAT_SPREADABLE] = false; - return array.concat()[0] !== array; -}); - -var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); - -var isConcatSpreadable = function (O) { - if (!isObject(O)) return false; - var spreadable = O[IS_CONCAT_SPREADABLE]; - return spreadable !== undefined ? !!spreadable : isArray(O); -}; - -var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; - -// `Array.prototype.concat` method -// https://tc39.es/ecma262/#sec-array.prototype.concat -// with adding support of @@isConcatSpreadable and @@species -$({ target: 'Array', proto: true, forced: FORCED }, { - // eslint-disable-next-line no-unused-vars -- required for `.length` - concat: function concat(arg) { - var O = toObject(this); - var A = arraySpeciesCreate(O, 0); - var n = 0; - var i, k, length, len, E; - for (i = -1, length = arguments.length; i < length; i++) { - E = i === -1 ? O : arguments[i]; - if (isConcatSpreadable(E)) { - len = toLength(E.length); - if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); - } else { - if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - createProperty(A, n++, E); - } - } - A.length = n; - return A; - } -}); - - -/***/ }), - -/***/ 7327: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var $filter = __webpack_require__(2092).filter; -var arrayMethodHasSpeciesSupport = __webpack_require__(1194); - -var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); - -// `Array.prototype.filter` method -// https://tc39.es/ecma262/#sec-array.prototype.filter -// with adding support of @@species -$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { - filter: function filter(callbackfn /* , thisArg */) { - return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); - - -/***/ }), - -/***/ 2772: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var $indexOf = __webpack_require__(1318).indexOf; -var arrayMethodIsStrict = __webpack_require__(9341); - -var nativeIndexOf = [].indexOf; - -var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0; -var STRICT_METHOD = arrayMethodIsStrict('indexOf'); - -// `Array.prototype.indexOf` method -// https://tc39.es/ecma262/#sec-array.prototype.indexof -$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, { - indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { - return NEGATIVE_ZERO - // convert -0 to +0 - ? nativeIndexOf.apply(this, arguments) || 0 - : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); - } -}); - - -/***/ }), - -/***/ 6992: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var toIndexedObject = __webpack_require__(5656); -var addToUnscopables = __webpack_require__(1223); -var Iterators = __webpack_require__(7497); -var InternalStateModule = __webpack_require__(9909); -var defineIterator = __webpack_require__(654); - -var ARRAY_ITERATOR = 'Array Iterator'; -var setInternalState = InternalStateModule.set; -var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); - -// `Array.prototype.entries` method -// https://tc39.es/ecma262/#sec-array.prototype.entries -// `Array.prototype.keys` method -// https://tc39.es/ecma262/#sec-array.prototype.keys -// `Array.prototype.values` method -// https://tc39.es/ecma262/#sec-array.prototype.values -// `Array.prototype[@@iterator]` method -// https://tc39.es/ecma262/#sec-array.prototype-@@iterator -// `CreateArrayIterator` internal method -// https://tc39.es/ecma262/#sec-createarrayiterator -module.exports = defineIterator(Array, 'Array', function (iterated, kind) { - setInternalState(this, { - type: ARRAY_ITERATOR, - target: toIndexedObject(iterated), // target - index: 0, // next index - kind: kind // kind - }); -// `%ArrayIteratorPrototype%.next` method -// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next -}, function () { - var state = getInternalState(this); - var target = state.target; - var kind = state.kind; - var index = state.index++; - if (!target || index >= target.length) { - state.target = undefined; - return { value: undefined, done: true }; - } - if (kind == 'keys') return { value: index, done: false }; - if (kind == 'values') return { value: target[index], done: false }; - return { value: [index, target[index]], done: false }; -}, 'values'); - -// argumentsList[@@iterator] is %ArrayProto_values% -// https://tc39.es/ecma262/#sec-createunmappedargumentsobject -// https://tc39.es/ecma262/#sec-createmappedargumentsobject -Iterators.Arguments = Iterators.Array; - -// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); - - -/***/ }), - -/***/ 1249: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var $map = __webpack_require__(2092).map; -var arrayMethodHasSpeciesSupport = __webpack_require__(1194); - -var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); - -// `Array.prototype.map` method -// https://tc39.es/ecma262/#sec-array.prototype.map -// with adding support of @@species -$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { - map: function map(callbackfn /* , thisArg */) { - return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); - - -/***/ }), - -/***/ 7042: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var isObject = __webpack_require__(111); -var isArray = __webpack_require__(3157); -var toAbsoluteIndex = __webpack_require__(1400); -var toLength = __webpack_require__(7466); -var toIndexedObject = __webpack_require__(5656); -var createProperty = __webpack_require__(6135); -var wellKnownSymbol = __webpack_require__(5112); -var arrayMethodHasSpeciesSupport = __webpack_require__(1194); - -var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); - -var SPECIES = wellKnownSymbol('species'); -var nativeSlice = [].slice; -var max = Math.max; - -// `Array.prototype.slice` method -// https://tc39.es/ecma262/#sec-array.prototype.slice -// fallback for not array-like ES3 strings and DOM objects -$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { - slice: function slice(start, end) { - var O = toIndexedObject(this); - var length = toLength(O.length); - var k = toAbsoluteIndex(start, length); - var fin = toAbsoluteIndex(end === undefined ? length : end, length); - // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible - var Constructor, result, n; - if (isArray(O)) { - Constructor = O.constructor; - // cross-realm fallback - if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { - Constructor = undefined; - } else if (isObject(Constructor)) { - Constructor = Constructor[SPECIES]; - if (Constructor === null) Constructor = undefined; - } - if (Constructor === Array || Constructor === undefined) { - return nativeSlice.call(O, k, fin); - } - } - result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0)); - for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); - result.length = n; - return result; - } -}); - - -/***/ }), - -/***/ 561: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var toAbsoluteIndex = __webpack_require__(1400); -var toInteger = __webpack_require__(9958); -var toLength = __webpack_require__(7466); -var toObject = __webpack_require__(7908); -var arraySpeciesCreate = __webpack_require__(5417); -var createProperty = __webpack_require__(6135); -var arrayMethodHasSpeciesSupport = __webpack_require__(1194); - -var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice'); - -var max = Math.max; -var min = Math.min; -var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; -var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; - -// `Array.prototype.splice` method -// https://tc39.es/ecma262/#sec-array.prototype.splice -// with adding support of @@species -$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { - splice: function splice(start, deleteCount /* , ...items */) { - var O = toObject(this); - var len = toLength(O.length); - var actualStart = toAbsoluteIndex(start, len); - var argumentsLength = arguments.length; - var insertCount, actualDeleteCount, A, k, from, to; - if (argumentsLength === 0) { - insertCount = actualDeleteCount = 0; - } else if (argumentsLength === 1) { - insertCount = 0; - actualDeleteCount = len - actualStart; - } else { - insertCount = argumentsLength - 2; - actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart); - } - if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { - throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); - } - A = arraySpeciesCreate(O, actualDeleteCount); - for (k = 0; k < actualDeleteCount; k++) { - from = actualStart + k; - if (from in O) createProperty(A, k, O[from]); - } - A.length = actualDeleteCount; - if (insertCount < actualDeleteCount) { - for (k = actualStart; k < len - actualDeleteCount; k++) { - from = k + actualDeleteCount; - to = k + insertCount; - if (from in O) O[to] = O[from]; - else delete O[to]; - } - for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; - } else if (insertCount > actualDeleteCount) { - for (k = len - actualDeleteCount; k > actualStart; k--) { - from = k + actualDeleteCount - 1; - to = k + insertCount - 1; - if (from in O) O[to] = O[from]; - else delete O[to]; - } - } - for (k = 0; k < insertCount; k++) { - O[k + actualStart] = arguments[k + 2]; - } - O.length = len - actualDeleteCount + insertCount; - return A; - } -}); - - -/***/ }), - -/***/ 8309: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var DESCRIPTORS = __webpack_require__(9781); -var defineProperty = __webpack_require__(3070).f; - -var FunctionPrototype = Function.prototype; -var FunctionPrototypeToString = FunctionPrototype.toString; -var nameRE = /^\s*function ([^ (]*)/; -var NAME = 'name'; - -// Function instances `.name` property -// https://tc39.es/ecma262/#sec-function-instances-name -if (DESCRIPTORS && !(NAME in FunctionPrototype)) { - defineProperty(FunctionPrototype, NAME, { - configurable: true, - get: function () { - try { - return FunctionPrototypeToString.call(this).match(nameRE)[1]; - } catch (error) { - return ''; - } - } - }); -} - - -/***/ }), - -/***/ 489: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var $ = __webpack_require__(2109); -var fails = __webpack_require__(7293); -var toObject = __webpack_require__(7908); -var nativeGetPrototypeOf = __webpack_require__(9518); -var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544); - -var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); }); - -// `Object.getPrototypeOf` method -// https://tc39.es/ecma262/#sec-object.getprototypeof -$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, { - getPrototypeOf: function getPrototypeOf(it) { - return nativeGetPrototypeOf(toObject(it)); - } -}); - - - -/***/ }), - -/***/ 1539: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); -var redefine = __webpack_require__(1320); -var toString = __webpack_require__(288); - -// `Object.prototype.toString` method -// https://tc39.es/ecma262/#sec-object.prototype.tostring -if (!TO_STRING_TAG_SUPPORT) { - redefine(Object.prototype, 'toString', toString, { unsafe: true }); -} - - -/***/ }), - -/***/ 4916: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var exec = __webpack_require__(2261); - -// `RegExp.prototype.exec` method -// https://tc39.es/ecma262/#sec-regexp.prototype.exec -$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { - exec: exec -}); - - -/***/ }), - -/***/ 9714: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var redefine = __webpack_require__(1320); -var anObject = __webpack_require__(9670); -var fails = __webpack_require__(7293); -var flags = __webpack_require__(7066); - -var TO_STRING = 'toString'; -var RegExpPrototype = RegExp.prototype; -var nativeToString = RegExpPrototype[TO_STRING]; - -var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); -// FF44- RegExp#toString has a wrong name -var INCORRECT_NAME = nativeToString.name != TO_STRING; - -// `RegExp.prototype.toString` method -// https://tc39.es/ecma262/#sec-regexp.prototype.tostring -if (NOT_GENERIC || INCORRECT_NAME) { - redefine(RegExp.prototype, TO_STRING, function toString() { - var R = anObject(this); - var p = String(R.source); - var rf = R.flags; - var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf); - return '/' + p + '/' + f; - }, { unsafe: true }); -} - - -/***/ }), - -/***/ 8783: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var charAt = __webpack_require__(8710).charAt; -var InternalStateModule = __webpack_require__(9909); -var defineIterator = __webpack_require__(654); - -var STRING_ITERATOR = 'String Iterator'; -var setInternalState = InternalStateModule.set; -var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); - -// `String.prototype[@@iterator]` method -// https://tc39.es/ecma262/#sec-string.prototype-@@iterator -defineIterator(String, 'String', function (iterated) { - setInternalState(this, { - type: STRING_ITERATOR, - string: String(iterated), - index: 0 - }); -// `%StringIteratorPrototype%.next` method -// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next -}, function next() { - var state = getInternalState(this); - var string = state.string; - var index = state.index; - var point; - if (index >= string.length) return { value: undefined, done: true }; - point = charAt(string, index); - state.index += point.length; - return { value: point, done: false }; -}); - - -/***/ }), - -/***/ 4723: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); -var anObject = __webpack_require__(9670); -var toLength = __webpack_require__(7466); -var requireObjectCoercible = __webpack_require__(4488); -var advanceStringIndex = __webpack_require__(1530); -var regExpExec = __webpack_require__(7651); - -// @@match logic -fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) { - return [ - // `String.prototype.match` method - // https://tc39.es/ecma262/#sec-string.prototype.match - function match(regexp) { - var O = requireObjectCoercible(this); - var matcher = regexp == undefined ? undefined : regexp[MATCH]; - return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); - }, - // `RegExp.prototype[@@match]` method - // https://tc39.es/ecma262/#sec-regexp.prototype-@@match - function (regexp) { - var res = maybeCallNative(nativeMatch, regexp, this); - if (res.done) return res.value; - - var rx = anObject(regexp); - var S = String(this); - - if (!rx.global) return regExpExec(rx, S); - - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - var A = []; - var n = 0; - var result; - while ((result = regExpExec(rx, S)) !== null) { - var matchStr = String(result[0]); - A[n] = matchStr; - if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); - n++; - } - return n === 0 ? null : A; - } - ]; -}); - - -/***/ }), - -/***/ 5306: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); -var anObject = __webpack_require__(9670); -var toLength = __webpack_require__(7466); -var toInteger = __webpack_require__(9958); -var requireObjectCoercible = __webpack_require__(4488); -var advanceStringIndex = __webpack_require__(1530); -var getSubstitution = __webpack_require__(647); -var regExpExec = __webpack_require__(7651); - -var max = Math.max; -var min = Math.min; - -var maybeToString = function (it) { - return it === undefined ? it : String(it); -}; - -// @@replace logic -fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { - var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; - var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; - var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; - - return [ - // `String.prototype.replace` method - // https://tc39.es/ecma262/#sec-string.prototype.replace - function replace(searchValue, replaceValue) { - var O = requireObjectCoercible(this); - var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; - return replacer !== undefined - ? replacer.call(searchValue, O, replaceValue) - : nativeReplace.call(String(O), searchValue, replaceValue); - }, - // `RegExp.prototype[@@replace]` method - // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace - function (regexp, replaceValue) { - if ( - (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) || - (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) - ) { - var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); - if (res.done) return res.value; - } - - var rx = anObject(regexp); - var S = String(this); - - var functionalReplace = typeof replaceValue === 'function'; - if (!functionalReplace) replaceValue = String(replaceValue); - - var global = rx.global; - if (global) { - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - } - var results = []; - while (true) { - var result = regExpExec(rx, S); - if (result === null) break; - - results.push(result); - if (!global) break; - - var matchStr = String(result[0]); - if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); - } - - var accumulatedResult = ''; - var nextSourcePosition = 0; - for (var i = 0; i < results.length; i++) { - result = results[i]; - - var matched = String(result[0]); - var position = max(min(toInteger(result.index), S.length), 0); - var captures = []; - // NOTE: This is equivalent to - // captures = result.slice(1).map(maybeToString) - // but for some reason `nativeSlice.call(result, 1, result.length)` (called in - // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and - // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. - for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); - var namedCaptures = result.groups; - if (functionalReplace) { - var replacerArgs = [matched].concat(captures, position, S); - if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); - var replacement = String(replaceValue.apply(undefined, replacerArgs)); - } else { - replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); - } - if (position >= nextSourcePosition) { - accumulatedResult += S.slice(nextSourcePosition, position) + replacement; - nextSourcePosition = position + matched.length; - } - } - return accumulatedResult + S.slice(nextSourcePosition); - } - ]; -}); - - -/***/ }), - -/***/ 3123: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); -var isRegExp = __webpack_require__(7850); -var anObject = __webpack_require__(9670); -var requireObjectCoercible = __webpack_require__(4488); -var speciesConstructor = __webpack_require__(6707); -var advanceStringIndex = __webpack_require__(1530); -var toLength = __webpack_require__(7466); -var callRegExpExec = __webpack_require__(7651); -var regexpExec = __webpack_require__(2261); -var fails = __webpack_require__(7293); - -var arrayPush = [].push; -var min = Math.min; -var MAX_UINT32 = 0xFFFFFFFF; - -// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError -var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); - -// @@split logic -fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { - var internalSplit; - if ( - 'abbc'.split(/(b)*/)[1] == 'c' || - // eslint-disable-next-line regexp/no-empty-group -- required for testing - 'test'.split(/(?:)/, -1).length != 4 || - 'ab'.split(/(?:ab)*/).length != 2 || - '.'.split(/(.?)(.?)/).length != 4 || - // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing - '.'.split(/()()/).length > 1 || - ''.split(/.?/).length - ) { - // based on es5-shim implementation, need to rework it - internalSplit = function (separator, limit) { - var string = String(requireObjectCoercible(this)); - var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; - if (lim === 0) return []; - if (separator === undefined) return [string]; - // If `separator` is not a regex, use native split - if (!isRegExp(separator)) { - return nativeSplit.call(string, separator, lim); - } - var output = []; - var flags = (separator.ignoreCase ? 'i' : '') + - (separator.multiline ? 'm' : '') + - (separator.unicode ? 'u' : '') + - (separator.sticky ? 'y' : ''); - var lastLastIndex = 0; - // Make `global` and avoid `lastIndex` issues by working with a copy - var separatorCopy = new RegExp(separator.source, flags + 'g'); - var match, lastIndex, lastLength; - while (match = regexpExec.call(separatorCopy, string)) { - lastIndex = separatorCopy.lastIndex; - if (lastIndex > lastLastIndex) { - output.push(string.slice(lastLastIndex, match.index)); - if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); - lastLength = match[0].length; - lastLastIndex = lastIndex; - if (output.length >= lim) break; - } - if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop - } - if (lastLastIndex === string.length) { - if (lastLength || !separatorCopy.test('')) output.push(''); - } else output.push(string.slice(lastLastIndex)); - return output.length > lim ? output.slice(0, lim) : output; - }; - // Chakra, V8 - } else if ('0'.split(undefined, 0).length) { - internalSplit = function (separator, limit) { - return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); - }; - } else internalSplit = nativeSplit; - - return [ - // `String.prototype.split` method - // https://tc39.es/ecma262/#sec-string.prototype.split - function split(separator, limit) { - var O = requireObjectCoercible(this); - var splitter = separator == undefined ? undefined : separator[SPLIT]; - return splitter !== undefined - ? splitter.call(separator, O, limit) - : internalSplit.call(String(O), separator, limit); - }, - // `RegExp.prototype[@@split]` method - // https://tc39.es/ecma262/#sec-regexp.prototype-@@split - // - // NOTE: This cannot be properly polyfilled in engines that don't support - // the 'y' flag. - function (regexp, limit) { - var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); - if (res.done) return res.value; - - var rx = anObject(regexp); - var S = String(this); - var C = speciesConstructor(rx, RegExp); - - var unicodeMatching = rx.unicode; - var flags = (rx.ignoreCase ? 'i' : '') + - (rx.multiline ? 'm' : '') + - (rx.unicode ? 'u' : '') + - (SUPPORTS_Y ? 'y' : 'g'); - - // ^(? + rx + ) is needed, in combination with some S slicing, to - // simulate the 'y' flag. - var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); - var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; - if (lim === 0) return []; - if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; - var p = 0; - var q = 0; - var A = []; - while (q < S.length) { - splitter.lastIndex = SUPPORTS_Y ? q : 0; - var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); - var e; - if ( - z === null || - (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p - ) { - q = advanceStringIndex(S, q, unicodeMatching); - } else { - A.push(S.slice(p, q)); - if (A.length === lim) return A; - for (var i = 1; i <= z.length - 1; i++) { - A.push(z[i]); - if (A.length === lim) return A; - } - q = p = e; - } - } - A.push(S.slice(p)); - return A; - } - ]; -}, !SUPPORTS_Y); - - -/***/ }), - -/***/ 3210: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var $ = __webpack_require__(2109); -var $trim = __webpack_require__(3111).trim; -var forcedStringTrimMethod = __webpack_require__(6091); - -// `String.prototype.trim` method -// https://tc39.es/ecma262/#sec-string.prototype.trim -$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, { - trim: function trim() { - return $trim(this); - } -}); - - -/***/ }), - -/***/ 2990: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $copyWithin = __webpack_require__(1048); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.copyWithin` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin -exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) { - return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined); -}); - - -/***/ }), - -/***/ 8927: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $every = __webpack_require__(2092).every; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.every` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every -exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) { - return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 3105: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $fill = __webpack_require__(1285); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.fill` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill -// eslint-disable-next-line no-unused-vars -- required for `.length` -exportTypedArrayMethod('fill', function fill(value /* , start, end */) { - return $fill.apply(aTypedArray(this), arguments); -}); - - -/***/ }), - -/***/ 5035: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $filter = __webpack_require__(2092).filter; -var fromSpeciesAndList = __webpack_require__(3074); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.filter` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter -exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) { - var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - return fromSpeciesAndList(this, list); -}); - - -/***/ }), - -/***/ 7174: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $findIndex = __webpack_require__(2092).findIndex; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.findIndex` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex -exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) { - return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 4345: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $find = __webpack_require__(2092).find; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.find` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find -exportTypedArrayMethod('find', function find(predicate /* , thisArg */) { - return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 2846: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $forEach = __webpack_require__(2092).forEach; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.forEach` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach -exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) { - $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 4731: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $includes = __webpack_require__(1318).includes; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.includes` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes -exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) { - return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 7209: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $indexOf = __webpack_require__(1318).indexOf; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.indexOf` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof -exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) { - return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 6319: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var global = __webpack_require__(7854); -var ArrayBufferViewCore = __webpack_require__(260); -var ArrayIterators = __webpack_require__(6992); -var wellKnownSymbol = __webpack_require__(5112); - -var ITERATOR = wellKnownSymbol('iterator'); -var Uint8Array = global.Uint8Array; -var arrayValues = ArrayIterators.values; -var arrayKeys = ArrayIterators.keys; -var arrayEntries = ArrayIterators.entries; -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; -var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR]; - -var CORRECT_ITER_NAME = !!nativeTypedArrayIterator - && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined); - -var typedArrayValues = function values() { - return arrayValues.call(aTypedArray(this)); -}; - -// `%TypedArray%.prototype.entries` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries -exportTypedArrayMethod('entries', function entries() { - return arrayEntries.call(aTypedArray(this)); -}); -// `%TypedArray%.prototype.keys` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys -exportTypedArrayMethod('keys', function keys() { - return arrayKeys.call(aTypedArray(this)); -}); -// `%TypedArray%.prototype.values` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values -exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME); -// `%TypedArray%.prototype[@@iterator]` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator -exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME); - - -/***/ }), - -/***/ 8867: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; -var $join = [].join; - -// `%TypedArray%.prototype.join` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join -// eslint-disable-next-line no-unused-vars -- required for `.length` -exportTypedArrayMethod('join', function join(separator) { - return $join.apply(aTypedArray(this), arguments); -}); - - -/***/ }), - -/***/ 7789: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $lastIndexOf = __webpack_require__(6583); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.lastIndexOf` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof -// eslint-disable-next-line no-unused-vars -- required for `.length` -exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) { - return $lastIndexOf.apply(aTypedArray(this), arguments); -}); - - -/***/ }), - -/***/ 3739: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $map = __webpack_require__(2092).map; -var speciesConstructor = __webpack_require__(6707); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.map` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map -exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) { - return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) { - return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length); - }); -}); - - -/***/ }), - -/***/ 4483: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $reduceRight = __webpack_require__(3671).right; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.reduceRicht` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright -exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) { - return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 9368: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $reduce = __webpack_require__(3671).left; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.reduce` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce -exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) { - return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 2056: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; -var floor = Math.floor; - -// `%TypedArray%.prototype.reverse` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse -exportTypedArrayMethod('reverse', function reverse() { - var that = this; - var length = aTypedArray(that).length; - var middle = floor(length / 2); - var index = 0; - var value; - while (index < middle) { - value = that[index]; - that[index++] = that[--length]; - that[length] = value; - } return that; -}); - - -/***/ }), - -/***/ 3462: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var toLength = __webpack_require__(7466); -var toOffset = __webpack_require__(4590); -var toObject = __webpack_require__(7908); -var fails = __webpack_require__(7293); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -var FORCED = fails(function () { - /* global Int8Array -- safe */ - new Int8Array(1).set({}); -}); - -// `%TypedArray%.prototype.set` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set -exportTypedArrayMethod('set', function set(arrayLike /* , offset */) { - aTypedArray(this); - var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1); - var length = this.length; - var src = toObject(arrayLike); - var len = toLength(src.length); - var index = 0; - if (len + offset > length) throw RangeError('Wrong length'); - while (index < len) this[offset + index] = src[index++]; -}, FORCED); - - -/***/ }), - -/***/ 678: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var speciesConstructor = __webpack_require__(6707); -var fails = __webpack_require__(7293); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; -var $slice = [].slice; - -var FORCED = fails(function () { - /* global Int8Array -- safe */ - new Int8Array(1).slice(); -}); - -// `%TypedArray%.prototype.slice` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice -exportTypedArrayMethod('slice', function slice(start, end) { - var list = $slice.call(aTypedArray(this), start, end); - var C = speciesConstructor(this, this.constructor); - var index = 0; - var length = list.length; - var result = new (aTypedArrayConstructor(C))(length); - while (length > index) result[index] = list[index++]; - return result; -}, FORCED); - - -/***/ }), - -/***/ 7462: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var $some = __webpack_require__(2092).some; - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.some` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some -exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) { - return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); -}); - - -/***/ }), - -/***/ 3824: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; -var $sort = [].sort; - -// `%TypedArray%.prototype.sort` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort -exportTypedArrayMethod('sort', function sort(comparefn) { - return $sort.call(aTypedArray(this), comparefn); -}); - - -/***/ }), - -/***/ 5021: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var ArrayBufferViewCore = __webpack_require__(260); -var toLength = __webpack_require__(7466); -var toAbsoluteIndex = __webpack_require__(1400); -var speciesConstructor = __webpack_require__(6707); - -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; - -// `%TypedArray%.prototype.subarray` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray -exportTypedArrayMethod('subarray', function subarray(begin, end) { - var O = aTypedArray(this); - var length = O.length; - var beginIndex = toAbsoluteIndex(begin, length); - return new (speciesConstructor(O, O.constructor))( - O.buffer, - O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT, - toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex) - ); -}); - - -/***/ }), - -/***/ 2974: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var global = __webpack_require__(7854); -var ArrayBufferViewCore = __webpack_require__(260); -var fails = __webpack_require__(7293); - -var Int8Array = global.Int8Array; -var aTypedArray = ArrayBufferViewCore.aTypedArray; -var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; -var $toLocaleString = [].toLocaleString; -var $slice = [].slice; - -// iOS Safari 6.x fails here -var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () { - $toLocaleString.call(new Int8Array(1)); -}); - -var FORCED = fails(function () { - return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString(); -}) || !fails(function () { - Int8Array.prototype.toLocaleString.call([1, 2]); -}); - -// `%TypedArray%.prototype.toLocaleString` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring -exportTypedArrayMethod('toLocaleString', function toLocaleString() { - return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments); -}, FORCED); - - -/***/ }), - -/***/ 5016: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -var exportTypedArrayMethod = __webpack_require__(260).exportTypedArrayMethod; -var fails = __webpack_require__(7293); -var global = __webpack_require__(7854); - -var Uint8Array = global.Uint8Array; -var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {}; -var arrayToString = [].toString; -var arrayJoin = [].join; - -if (fails(function () { arrayToString.call({}); })) { - arrayToString = function toString() { - return arrayJoin.call(this); - }; -} - -var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString; - -// `%TypedArray%.prototype.toString` method -// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring -exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD); - - -/***/ }), - -/***/ 2472: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var createTypedArrayConstructor = __webpack_require__(9843); - -// `Uint8Array` constructor -// https://tc39.es/ecma262/#sec-typedarray-objects -createTypedArrayConstructor('Uint8', function (init) { - return function Uint8Array(data, byteOffset, length) { - return init(this, data, byteOffset, length); - }; -}); - - -/***/ }), - -/***/ 4747: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var DOMIterables = __webpack_require__(8324); -var forEach = __webpack_require__(8533); -var createNonEnumerableProperty = __webpack_require__(8880); - -for (var COLLECTION_NAME in DOMIterables) { - var Collection = global[COLLECTION_NAME]; - var CollectionPrototype = Collection && Collection.prototype; - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { - createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); - } catch (error) { - CollectionPrototype.forEach = forEach; - } -} - - -/***/ }), - -/***/ 3948: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -var global = __webpack_require__(7854); -var DOMIterables = __webpack_require__(8324); -var ArrayIteratorMethods = __webpack_require__(6992); -var createNonEnumerableProperty = __webpack_require__(8880); -var wellKnownSymbol = __webpack_require__(5112); - -var ITERATOR = wellKnownSymbol('iterator'); -var TO_STRING_TAG = wellKnownSymbol('toStringTag'); -var ArrayValues = ArrayIteratorMethods.values; - -for (var COLLECTION_NAME in DOMIterables) { - var Collection = global[COLLECTION_NAME]; - var CollectionPrototype = Collection && Collection.prototype; - if (CollectionPrototype) { - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype[ITERATOR] !== ArrayValues) try { - createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); - } catch (error) { - CollectionPrototype[ITERATOR] = ArrayValues; - } - if (!CollectionPrototype[TO_STRING_TAG]) { - createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); - } - if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { - createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); - } catch (error) { - CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; - } - } - } -} - - -/***/ }), - -/***/ 1637: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` -__webpack_require__(6992); -var $ = __webpack_require__(2109); -var getBuiltIn = __webpack_require__(5005); -var USE_NATIVE_URL = __webpack_require__(590); -var redefine = __webpack_require__(1320); -var redefineAll = __webpack_require__(2248); -var setToStringTag = __webpack_require__(8003); -var createIteratorConstructor = __webpack_require__(4994); -var InternalStateModule = __webpack_require__(9909); -var anInstance = __webpack_require__(5787); -var hasOwn = __webpack_require__(6656); -var bind = __webpack_require__(9974); -var classof = __webpack_require__(648); -var anObject = __webpack_require__(9670); -var isObject = __webpack_require__(111); -var create = __webpack_require__(30); -var createPropertyDescriptor = __webpack_require__(9114); -var getIterator = __webpack_require__(8554); -var getIteratorMethod = __webpack_require__(1246); -var wellKnownSymbol = __webpack_require__(5112); - -var $fetch = getBuiltIn('fetch'); -var Headers = getBuiltIn('Headers'); -var ITERATOR = wellKnownSymbol('iterator'); -var URL_SEARCH_PARAMS = 'URLSearchParams'; -var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator'; -var setInternalState = InternalStateModule.set; -var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS); -var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR); - -var plus = /\+/g; -var sequences = Array(4); - -var percentSequence = function (bytes) { - return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi')); -}; - -var percentDecode = function (sequence) { - try { - return decodeURIComponent(sequence); - } catch (error) { - return sequence; - } -}; - -var deserialize = function (it) { - var result = it.replace(plus, ' '); - var bytes = 4; - try { - return decodeURIComponent(result); - } catch (error) { - while (bytes) { - result = result.replace(percentSequence(bytes--), percentDecode); - } - return result; - } -}; - -var find = /[!'()~]|%20/g; - -var replace = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+' -}; - -var replacer = function (match) { - return replace[match]; -}; - -var serialize = function (it) { - return encodeURIComponent(it).replace(find, replacer); -}; - -var parseSearchParams = function (result, query) { - if (query) { - var attributes = query.split('&'); - var index = 0; - var attribute, entry; - while (index < attributes.length) { - attribute = attributes[index++]; - if (attribute.length) { - entry = attribute.split('='); - result.push({ - key: deserialize(entry.shift()), - value: deserialize(entry.join('=')) - }); - } - } - } -}; - -var updateSearchParams = function (query) { - this.entries.length = 0; - parseSearchParams(this.entries, query); -}; - -var validateArgumentsLength = function (passed, required) { - if (passed < required) throw TypeError('Not enough arguments'); -}; - -var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) { - setInternalState(this, { - type: URL_SEARCH_PARAMS_ITERATOR, - iterator: getIterator(getInternalParamsState(params).entries), - kind: kind - }); -}, 'Iterator', function next() { - var state = getInternalIteratorState(this); - var kind = state.kind; - var step = state.iterator.next(); - var entry = step.value; - if (!step.done) { - step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value]; - } return step; -}); - -// `URLSearchParams` constructor -// https://url.spec.whatwg.org/#interface-urlsearchparams -var URLSearchParamsConstructor = function URLSearchParams(/* init */) { - anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS); - var init = arguments.length > 0 ? arguments[0] : undefined; - var that = this; - var entries = []; - var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key; - - setInternalState(that, { - type: URL_SEARCH_PARAMS, - entries: entries, - updateURL: function () { /* empty */ }, - updateSearchParams: updateSearchParams - }); - - if (init !== undefined) { - if (isObject(init)) { - iteratorMethod = getIteratorMethod(init); - if (typeof iteratorMethod === 'function') { - iterator = iteratorMethod.call(init); - next = iterator.next; - while (!(step = next.call(iterator)).done) { - entryIterator = getIterator(anObject(step.value)); - entryNext = entryIterator.next; - if ( - (first = entryNext.call(entryIterator)).done || - (second = entryNext.call(entryIterator)).done || - !entryNext.call(entryIterator).done - ) throw TypeError('Expected sequence with length 2'); - entries.push({ key: first.value + '', value: second.value + '' }); - } - } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' }); - } else { - parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + ''); - } - } -}; - -var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype; - -redefineAll(URLSearchParamsPrototype, { - // `URLSearchParams.prototype.append` method - // https://url.spec.whatwg.org/#dom-urlsearchparams-append - append: function append(name, value) { - validateArgumentsLength(arguments.length, 2); - var state = getInternalParamsState(this); - state.entries.push({ key: name + '', value: value + '' }); - state.updateURL(); - }, - // `URLSearchParams.prototype.delete` method - // https://url.spec.whatwg.org/#dom-urlsearchparams-delete - 'delete': function (name) { - validateArgumentsLength(arguments.length, 1); - var state = getInternalParamsState(this); - var entries = state.entries; - var key = name + ''; - var index = 0; - while (index < entries.length) { - if (entries[index].key === key) entries.splice(index, 1); - else index++; - } - state.updateURL(); - }, - // `URLSearchParams.prototype.get` method - // https://url.spec.whatwg.org/#dom-urlsearchparams-get - get: function get(name) { - validateArgumentsLength(arguments.length, 1); - var entries = getInternalParamsState(this).entries; - var key = name + ''; - var index = 0; - for (; index < entries.length; index++) { - if (entries[index].key === key) return entries[index].value; - } - return null; - }, - // `URLSearchParams.prototype.getAll` method - // https://url.spec.whatwg.org/#dom-urlsearchparams-getall - getAll: function getAll(name) { - validateArgumentsLength(arguments.length, 1); - var entries = getInternalParamsState(this).entries; - var key = name + ''; - var result = []; - var index = 0; - for (; index < entries.length; index++) { - if (entries[index].key === key) result.push(entries[index].value); - } - return result; - }, - // `URLSearchParams.prototype.has` method - // https://url.spec.whatwg.org/#dom-urlsearchparams-has - has: function has(name) { - validateArgumentsLength(arguments.length, 1); - var entries = getInternalParamsState(this).entries; - var key = name + ''; - var index = 0; - while (index < entries.length) { - if (entries[index++].key === key) return true; - } - return false; - }, - // `URLSearchParams.prototype.set` method - // https://url.spec.whatwg.org/#dom-urlsearchparams-set - set: function set(name, value) { - validateArgumentsLength(arguments.length, 1); - var state = getInternalParamsState(this); - var entries = state.entries; - var found = false; - var key = name + ''; - var val = value + ''; - var index = 0; - var entry; - for (; index < entries.length; index++) { - entry = entries[index]; - if (entry.key === key) { - if (found) entries.splice(index--, 1); - else { - found = true; - entry.value = val; - } - } - } - if (!found) entries.push({ key: key, value: val }); - state.updateURL(); - }, - // `URLSearchParams.prototype.sort` method - // https://url.spec.whatwg.org/#dom-urlsearchparams-sort - sort: function sort() { - var state = getInternalParamsState(this); - var entries = state.entries; - // Array#sort is not stable in some engines - var slice = entries.slice(); - var entry, entriesIndex, sliceIndex; - entries.length = 0; - for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) { - entry = slice[sliceIndex]; - for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) { - if (entries[entriesIndex].key > entry.key) { - entries.splice(entriesIndex, 0, entry); - break; - } - } - if (entriesIndex === sliceIndex) entries.push(entry); - } - state.updateURL(); - }, - // `URLSearchParams.prototype.forEach` method - forEach: function forEach(callback /* , thisArg */) { - var entries = getInternalParamsState(this).entries; - var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3); - var index = 0; - var entry; - while (index < entries.length) { - entry = entries[index++]; - boundFunction(entry.value, entry.key, this); - } - }, - // `URLSearchParams.prototype.keys` method - keys: function keys() { - return new URLSearchParamsIterator(this, 'keys'); - }, - // `URLSearchParams.prototype.values` method - values: function values() { - return new URLSearchParamsIterator(this, 'values'); - }, - // `URLSearchParams.prototype.entries` method - entries: function entries() { - return new URLSearchParamsIterator(this, 'entries'); - } -}, { enumerable: true }); - -// `URLSearchParams.prototype[@@iterator]` method -redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries); - -// `URLSearchParams.prototype.toString` method -// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior -redefine(URLSearchParamsPrototype, 'toString', function toString() { - var entries = getInternalParamsState(this).entries; - var result = []; - var index = 0; - var entry; - while (index < entries.length) { - entry = entries[index++]; - result.push(serialize(entry.key) + '=' + serialize(entry.value)); - } return result.join('&'); -}, { enumerable: true }); - -setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS); - -$({ global: true, forced: !USE_NATIVE_URL }, { - URLSearchParams: URLSearchParamsConstructor -}); - -// Wrap `fetch` for correct work with polyfilled `URLSearchParams` -// https://github.com/zloirock/core-js/issues/674 -if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') { - $({ global: true, enumerable: true, forced: true }, { - fetch: function fetch(input /* , init */) { - var args = [input]; - var init, body, headers; - if (arguments.length > 1) { - init = arguments[1]; - if (isObject(init)) { - body = init.body; - if (classof(body) === URL_SEARCH_PARAMS) { - headers = init.headers ? new Headers(init.headers) : new Headers(); - if (!headers.has('content-type')) { - headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - init = create(init, { - body: createPropertyDescriptor(0, String(body)), - headers: createPropertyDescriptor(0, headers) - }); - } - } - args.push(init); - } return $fetch.apply(this, args); - } - }); -} - -module.exports = { - URLSearchParams: URLSearchParamsConstructor, - getState: getInternalParamsState -}; - - -/***/ }), - -/***/ 285: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - -// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` -__webpack_require__(8783); -var $ = __webpack_require__(2109); -var DESCRIPTORS = __webpack_require__(9781); -var USE_NATIVE_URL = __webpack_require__(590); -var global = __webpack_require__(7854); -var defineProperties = __webpack_require__(6048); -var redefine = __webpack_require__(1320); -var anInstance = __webpack_require__(5787); -var has = __webpack_require__(6656); -var assign = __webpack_require__(1574); -var arrayFrom = __webpack_require__(8457); -var codeAt = __webpack_require__(8710).codeAt; -var toASCII = __webpack_require__(3197); -var setToStringTag = __webpack_require__(8003); -var URLSearchParamsModule = __webpack_require__(1637); -var InternalStateModule = __webpack_require__(9909); - -var NativeURL = global.URL; -var URLSearchParams = URLSearchParamsModule.URLSearchParams; -var getInternalSearchParamsState = URLSearchParamsModule.getState; -var setInternalState = InternalStateModule.set; -var getInternalURLState = InternalStateModule.getterFor('URL'); -var floor = Math.floor; -var pow = Math.pow; - -var INVALID_AUTHORITY = 'Invalid authority'; -var INVALID_SCHEME = 'Invalid scheme'; -var INVALID_HOST = 'Invalid host'; -var INVALID_PORT = 'Invalid port'; - -var ALPHA = /[A-Za-z]/; -var ALPHANUMERIC = /[\d+-.A-Za-z]/; -var DIGIT = /\d/; -var HEX_START = /^(0x|0X)/; -var OCT = /^[0-7]+$/; -var DEC = /^\d+$/; -var HEX = /^[\dA-Fa-f]+$/; -/* eslint-disable no-control-regex -- safe */ -var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/; -var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/; -var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g; -var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g; -/* eslint-enable no-control-regex -- safe */ -var EOF; - -var parseHost = function (url, input) { - var result, codePoints, index; - if (input.charAt(0) == '[') { - if (input.charAt(input.length - 1) != ']') return INVALID_HOST; - result = parseIPv6(input.slice(1, -1)); - if (!result) return INVALID_HOST; - url.host = result; - // opaque host - } else if (!isSpecial(url)) { - if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST; - result = ''; - codePoints = arrayFrom(input); - for (index = 0; index < codePoints.length; index++) { - result += percentEncode(codePoints[index], C0ControlPercentEncodeSet); - } - url.host = result; - } else { - input = toASCII(input); - if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST; - result = parseIPv4(input); - if (result === null) return INVALID_HOST; - url.host = result; - } -}; - -var parseIPv4 = function (input) { - var parts = input.split('.'); - var partsLength, numbers, index, part, radix, number, ipv4; - if (parts.length && parts[parts.length - 1] == '') { - parts.pop(); - } - partsLength = parts.length; - if (partsLength > 4) return input; - numbers = []; - for (index = 0; index < partsLength; index++) { - part = parts[index]; - if (part == '') return input; - radix = 10; - if (part.length > 1 && part.charAt(0) == '0') { - radix = HEX_START.test(part) ? 16 : 8; - part = part.slice(radix == 8 ? 1 : 2); - } - if (part === '') { - number = 0; - } else { - if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input; - number = parseInt(part, radix); - } - numbers.push(number); - } - for (index = 0; index < partsLength; index++) { - number = numbers[index]; - if (index == partsLength - 1) { - if (number >= pow(256, 5 - partsLength)) return null; - } else if (number > 255) return null; - } - ipv4 = numbers.pop(); - for (index = 0; index < numbers.length; index++) { - ipv4 += numbers[index] * pow(256, 3 - index); - } - return ipv4; -}; - -// eslint-disable-next-line max-statements -- TODO -var parseIPv6 = function (input) { - var address = [0, 0, 0, 0, 0, 0, 0, 0]; - var pieceIndex = 0; - var compress = null; - var pointer = 0; - var value, length, numbersSeen, ipv4Piece, number, swaps, swap; - - var char = function () { - return input.charAt(pointer); - }; - - if (char() == ':') { - if (input.charAt(1) != ':') return; - pointer += 2; - pieceIndex++; - compress = pieceIndex; - } - while (char()) { - if (pieceIndex == 8) return; - if (char() == ':') { - if (compress !== null) return; - pointer++; - pieceIndex++; - compress = pieceIndex; - continue; - } - value = length = 0; - while (length < 4 && HEX.test(char())) { - value = value * 16 + parseInt(char(), 16); - pointer++; - length++; - } - if (char() == '.') { - if (length == 0) return; - pointer -= length; - if (pieceIndex > 6) return; - numbersSeen = 0; - while (char()) { - ipv4Piece = null; - if (numbersSeen > 0) { - if (char() == '.' && numbersSeen < 4) pointer++; - else return; - } - if (!DIGIT.test(char())) return; - while (DIGIT.test(char())) { - number = parseInt(char(), 10); - if (ipv4Piece === null) ipv4Piece = number; - else if (ipv4Piece == 0) return; - else ipv4Piece = ipv4Piece * 10 + number; - if (ipv4Piece > 255) return; - pointer++; - } - address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece; - numbersSeen++; - if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++; - } - if (numbersSeen != 4) return; - break; - } else if (char() == ':') { - pointer++; - if (!char()) return; - } else if (char()) return; - address[pieceIndex++] = value; - } - if (compress !== null) { - swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex != 0 && swaps > 0) { - swap = address[pieceIndex]; - address[pieceIndex--] = address[compress + swaps - 1]; - address[compress + --swaps] = swap; - } - } else if (pieceIndex != 8) return; - return address; -}; - -var findLongestZeroSequence = function (ipv6) { - var maxIndex = null; - var maxLength = 1; - var currStart = null; - var currLength = 0; - var index = 0; - for (; index < 8; index++) { - if (ipv6[index] !== 0) { - if (currLength > maxLength) { - maxIndex = currStart; - maxLength = currLength; - } - currStart = null; - currLength = 0; - } else { - if (currStart === null) currStart = index; - ++currLength; - } - } - if (currLength > maxLength) { - maxIndex = currStart; - maxLength = currLength; - } - return maxIndex; -}; - -var serializeHost = function (host) { - var result, index, compress, ignore0; - // ipv4 - if (typeof host == 'number') { - result = []; - for (index = 0; index < 4; index++) { - result.unshift(host % 256); - host = floor(host / 256); - } return result.join('.'); - // ipv6 - } else if (typeof host == 'object') { - result = ''; - compress = findLongestZeroSequence(host); - for (index = 0; index < 8; index++) { - if (ignore0 && host[index] === 0) continue; - if (ignore0) ignore0 = false; - if (compress === index) { - result += index ? ':' : '::'; - ignore0 = true; - } else { - result += host[index].toString(16); - if (index < 7) result += ':'; - } - } - return '[' + result + ']'; - } return host; -}; - -var C0ControlPercentEncodeSet = {}; -var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, { - ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1 -}); -var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, { - '#': 1, '?': 1, '{': 1, '}': 1 -}); -var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, { - '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1 -}); - -var percentEncode = function (char, set) { - var code = codeAt(char, 0); - return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char); -}; - -var specialSchemes = { - ftp: 21, - file: null, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; - -var isSpecial = function (url) { - return has(specialSchemes, url.scheme); -}; - -var includesCredentials = function (url) { - return url.username != '' || url.password != ''; -}; - -var cannotHaveUsernamePasswordPort = function (url) { - return !url.host || url.cannotBeABaseURL || url.scheme == 'file'; -}; - -var isWindowsDriveLetter = function (string, normalized) { - var second; - return string.length == 2 && ALPHA.test(string.charAt(0)) - && ((second = string.charAt(1)) == ':' || (!normalized && second == '|')); -}; - -var startsWithWindowsDriveLetter = function (string) { - var third; - return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && ( - string.length == 2 || - ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#') - ); -}; - -var shortenURLsPath = function (url) { - var path = url.path; - var pathSize = path.length; - if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) { - path.pop(); - } -}; - -var isSingleDot = function (segment) { - return segment === '.' || segment.toLowerCase() === '%2e'; -}; - -var isDoubleDot = function (segment) { - segment = segment.toLowerCase(); - return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e'; -}; - -// States: -var SCHEME_START = {}; -var SCHEME = {}; -var NO_SCHEME = {}; -var SPECIAL_RELATIVE_OR_AUTHORITY = {}; -var PATH_OR_AUTHORITY = {}; -var RELATIVE = {}; -var RELATIVE_SLASH = {}; -var SPECIAL_AUTHORITY_SLASHES = {}; -var SPECIAL_AUTHORITY_IGNORE_SLASHES = {}; -var AUTHORITY = {}; -var HOST = {}; -var HOSTNAME = {}; -var PORT = {}; -var FILE = {}; -var FILE_SLASH = {}; -var FILE_HOST = {}; -var PATH_START = {}; -var PATH = {}; -var CANNOT_BE_A_BASE_URL_PATH = {}; -var QUERY = {}; -var FRAGMENT = {}; - -// eslint-disable-next-line max-statements -- TODO -var parseURL = function (url, input, stateOverride, base) { - var state = stateOverride || SCHEME_START; - var pointer = 0; - var buffer = ''; - var seenAt = false; - var seenBracket = false; - var seenPasswordToken = false; - var codePoints, char, bufferCodePoints, failure; - - if (!stateOverride) { - url.scheme = ''; - url.username = ''; - url.password = ''; - url.host = null; - url.port = null; - url.path = []; - url.query = null; - url.fragment = null; - url.cannotBeABaseURL = false; - input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, ''); - } - - input = input.replace(TAB_AND_NEW_LINE, ''); - - codePoints = arrayFrom(input); - - while (pointer <= codePoints.length) { - char = codePoints[pointer]; - switch (state) { - case SCHEME_START: - if (char && ALPHA.test(char)) { - buffer += char.toLowerCase(); - state = SCHEME; - } else if (!stateOverride) { - state = NO_SCHEME; - continue; - } else return INVALID_SCHEME; - break; - - case SCHEME: - if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) { - buffer += char.toLowerCase(); - } else if (char == ':') { - if (stateOverride && ( - (isSpecial(url) != has(specialSchemes, buffer)) || - (buffer == 'file' && (includesCredentials(url) || url.port !== null)) || - (url.scheme == 'file' && !url.host) - )) return; - url.scheme = buffer; - if (stateOverride) { - if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null; - return; - } - buffer = ''; - if (url.scheme == 'file') { - state = FILE; - } else if (isSpecial(url) && base && base.scheme == url.scheme) { - state = SPECIAL_RELATIVE_OR_AUTHORITY; - } else if (isSpecial(url)) { - state = SPECIAL_AUTHORITY_SLASHES; - } else if (codePoints[pointer + 1] == '/') { - state = PATH_OR_AUTHORITY; - pointer++; - } else { - url.cannotBeABaseURL = true; - url.path.push(''); - state = CANNOT_BE_A_BASE_URL_PATH; - } - } else if (!stateOverride) { - buffer = ''; - state = NO_SCHEME; - pointer = 0; - continue; - } else return INVALID_SCHEME; - break; - - case NO_SCHEME: - if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME; - if (base.cannotBeABaseURL && char == '#') { - url.scheme = base.scheme; - url.path = base.path.slice(); - url.query = base.query; - url.fragment = ''; - url.cannotBeABaseURL = true; - state = FRAGMENT; - break; - } - state = base.scheme == 'file' ? FILE : RELATIVE; - continue; - - case SPECIAL_RELATIVE_OR_AUTHORITY: - if (char == '/' && codePoints[pointer + 1] == '/') { - state = SPECIAL_AUTHORITY_IGNORE_SLASHES; - pointer++; - } else { - state = RELATIVE; - continue; - } break; - - case PATH_OR_AUTHORITY: - if (char == '/') { - state = AUTHORITY; - break; - } else { - state = PATH; - continue; - } - - case RELATIVE: - url.scheme = base.scheme; - if (char == EOF) { - url.username = base.username; - url.password = base.password; - url.host = base.host; - url.port = base.port; - url.path = base.path.slice(); - url.query = base.query; - } else if (char == '/' || (char == '\\' && isSpecial(url))) { - state = RELATIVE_SLASH; - } else if (char == '?') { - url.username = base.username; - url.password = base.password; - url.host = base.host; - url.port = base.port; - url.path = base.path.slice(); - url.query = ''; - state = QUERY; - } else if (char == '#') { - url.username = base.username; - url.password = base.password; - url.host = base.host; - url.port = base.port; - url.path = base.path.slice(); - url.query = base.query; - url.fragment = ''; - state = FRAGMENT; - } else { - url.username = base.username; - url.password = base.password; - url.host = base.host; - url.port = base.port; - url.path = base.path.slice(); - url.path.pop(); - state = PATH; - continue; - } break; - - case RELATIVE_SLASH: - if (isSpecial(url) && (char == '/' || char == '\\')) { - state = SPECIAL_AUTHORITY_IGNORE_SLASHES; - } else if (char == '/') { - state = AUTHORITY; - } else { - url.username = base.username; - url.password = base.password; - url.host = base.host; - url.port = base.port; - state = PATH; - continue; - } break; - - case SPECIAL_AUTHORITY_SLASHES: - state = SPECIAL_AUTHORITY_IGNORE_SLASHES; - if (char != '/' || buffer.charAt(pointer + 1) != '/') continue; - pointer++; - break; - - case SPECIAL_AUTHORITY_IGNORE_SLASHES: - if (char != '/' && char != '\\') { - state = AUTHORITY; - continue; - } break; - - case AUTHORITY: - if (char == '@') { - if (seenAt) buffer = '%40' + buffer; - seenAt = true; - bufferCodePoints = arrayFrom(buffer); - for (var i = 0; i < bufferCodePoints.length; i++) { - var codePoint = bufferCodePoints[i]; - if (codePoint == ':' && !seenPasswordToken) { - seenPasswordToken = true; - continue; - } - var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet); - if (seenPasswordToken) url.password += encodedCodePoints; - else url.username += encodedCodePoints; - } - buffer = ''; - } else if ( - char == EOF || char == '/' || char == '?' || char == '#' || - (char == '\\' && isSpecial(url)) - ) { - if (seenAt && buffer == '') return INVALID_AUTHORITY; - pointer -= arrayFrom(buffer).length + 1; - buffer = ''; - state = HOST; - } else buffer += char; - break; - - case HOST: - case HOSTNAME: - if (stateOverride && url.scheme == 'file') { - state = FILE_HOST; - continue; - } else if (char == ':' && !seenBracket) { - if (buffer == '') return INVALID_HOST; - failure = parseHost(url, buffer); - if (failure) return failure; - buffer = ''; - state = PORT; - if (stateOverride == HOSTNAME) return; - } else if ( - char == EOF || char == '/' || char == '?' || char == '#' || - (char == '\\' && isSpecial(url)) - ) { - if (isSpecial(url) && buffer == '') return INVALID_HOST; - if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return; - failure = parseHost(url, buffer); - if (failure) return failure; - buffer = ''; - state = PATH_START; - if (stateOverride) return; - continue; - } else { - if (char == '[') seenBracket = true; - else if (char == ']') seenBracket = false; - buffer += char; - } break; - - case PORT: - if (DIGIT.test(char)) { - buffer += char; - } else if ( - char == EOF || char == '/' || char == '?' || char == '#' || - (char == '\\' && isSpecial(url)) || - stateOverride - ) { - if (buffer != '') { - var port = parseInt(buffer, 10); - if (port > 0xFFFF) return INVALID_PORT; - url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port; - buffer = ''; - } - if (stateOverride) return; - state = PATH_START; - continue; - } else return INVALID_PORT; - break; - - case FILE: - url.scheme = 'file'; - if (char == '/' || char == '\\') state = FILE_SLASH; - else if (base && base.scheme == 'file') { - if (char == EOF) { - url.host = base.host; - url.path = base.path.slice(); - url.query = base.query; - } else if (char == '?') { - url.host = base.host; - url.path = base.path.slice(); - url.query = ''; - state = QUERY; - } else if (char == '#') { - url.host = base.host; - url.path = base.path.slice(); - url.query = base.query; - url.fragment = ''; - state = FRAGMENT; - } else { - if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { - url.host = base.host; - url.path = base.path.slice(); - shortenURLsPath(url); - } - state = PATH; - continue; - } - } else { - state = PATH; - continue; - } break; - - case FILE_SLASH: - if (char == '/' || char == '\\') { - state = FILE_HOST; - break; - } - if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { - if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]); - else url.host = base.host; - } - state = PATH; - continue; - - case FILE_HOST: - if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') { - if (!stateOverride && isWindowsDriveLetter(buffer)) { - state = PATH; - } else if (buffer == '') { - url.host = ''; - if (stateOverride) return; - state = PATH_START; - } else { - failure = parseHost(url, buffer); - if (failure) return failure; - if (url.host == 'localhost') url.host = ''; - if (stateOverride) return; - buffer = ''; - state = PATH_START; - } continue; - } else buffer += char; - break; - - case PATH_START: - if (isSpecial(url)) { - state = PATH; - if (char != '/' && char != '\\') continue; - } else if (!stateOverride && char == '?') { - url.query = ''; - state = QUERY; - } else if (!stateOverride && char == '#') { - url.fragment = ''; - state = FRAGMENT; - } else if (char != EOF) { - state = PATH; - if (char != '/') continue; - } break; - - case PATH: - if ( - char == EOF || char == '/' || - (char == '\\' && isSpecial(url)) || - (!stateOverride && (char == '?' || char == '#')) - ) { - if (isDoubleDot(buffer)) { - shortenURLsPath(url); - if (char != '/' && !(char == '\\' && isSpecial(url))) { - url.path.push(''); - } - } else if (isSingleDot(buffer)) { - if (char != '/' && !(char == '\\' && isSpecial(url))) { - url.path.push(''); - } - } else { - if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) { - if (url.host) url.host = ''; - buffer = buffer.charAt(0) + ':'; // normalize windows drive letter - } - url.path.push(buffer); - } - buffer = ''; - if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) { - while (url.path.length > 1 && url.path[0] === '') { - url.path.shift(); - } - } - if (char == '?') { - url.query = ''; - state = QUERY; - } else if (char == '#') { - url.fragment = ''; - state = FRAGMENT; - } - } else { - buffer += percentEncode(char, pathPercentEncodeSet); - } break; - - case CANNOT_BE_A_BASE_URL_PATH: - if (char == '?') { - url.query = ''; - state = QUERY; - } else if (char == '#') { - url.fragment = ''; - state = FRAGMENT; - } else if (char != EOF) { - url.path[0] += percentEncode(char, C0ControlPercentEncodeSet); - } break; - - case QUERY: - if (!stateOverride && char == '#') { - url.fragment = ''; - state = FRAGMENT; - } else if (char != EOF) { - if (char == "'" && isSpecial(url)) url.query += '%27'; - else if (char == '#') url.query += '%23'; - else url.query += percentEncode(char, C0ControlPercentEncodeSet); - } break; - - case FRAGMENT: - if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet); - break; - } - - pointer++; - } -}; - -// `URL` constructor -// https://url.spec.whatwg.org/#url-class -var URLConstructor = function URL(url /* , base */) { - var that = anInstance(this, URLConstructor, 'URL'); - var base = arguments.length > 1 ? arguments[1] : undefined; - var urlString = String(url); - var state = setInternalState(that, { type: 'URL' }); - var baseState, failure; - if (base !== undefined) { - if (base instanceof URLConstructor) baseState = getInternalURLState(base); - else { - failure = parseURL(baseState = {}, String(base)); - if (failure) throw TypeError(failure); - } - } - failure = parseURL(state, urlString, null, baseState); - if (failure) throw TypeError(failure); - var searchParams = state.searchParams = new URLSearchParams(); - var searchParamsState = getInternalSearchParamsState(searchParams); - searchParamsState.updateSearchParams(state.query); - searchParamsState.updateURL = function () { - state.query = String(searchParams) || null; - }; - if (!DESCRIPTORS) { - that.href = serializeURL.call(that); - that.origin = getOrigin.call(that); - that.protocol = getProtocol.call(that); - that.username = getUsername.call(that); - that.password = getPassword.call(that); - that.host = getHost.call(that); - that.hostname = getHostname.call(that); - that.port = getPort.call(that); - that.pathname = getPathname.call(that); - that.search = getSearch.call(that); - that.searchParams = getSearchParams.call(that); - that.hash = getHash.call(that); - } -}; - -var URLPrototype = URLConstructor.prototype; - -var serializeURL = function () { - var url = getInternalURLState(this); - var scheme = url.scheme; - var username = url.username; - var password = url.password; - var host = url.host; - var port = url.port; - var path = url.path; - var query = url.query; - var fragment = url.fragment; - var output = scheme + ':'; - if (host !== null) { - output += '//'; - if (includesCredentials(url)) { - output += username + (password ? ':' + password : '') + '@'; - } - output += serializeHost(host); - if (port !== null) output += ':' + port; - } else if (scheme == 'file') output += '//'; - output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; - if (query !== null) output += '?' + query; - if (fragment !== null) output += '#' + fragment; - return output; -}; - -var getOrigin = function () { - var url = getInternalURLState(this); - var scheme = url.scheme; - var port = url.port; - if (scheme == 'blob') try { - return new URL(scheme.path[0]).origin; - } catch (error) { - return 'null'; - } - if (scheme == 'file' || !isSpecial(url)) return 'null'; - return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : ''); -}; - -var getProtocol = function () { - return getInternalURLState(this).scheme + ':'; -}; - -var getUsername = function () { - return getInternalURLState(this).username; -}; - -var getPassword = function () { - return getInternalURLState(this).password; -}; - -var getHost = function () { - var url = getInternalURLState(this); - var host = url.host; - var port = url.port; - return host === null ? '' - : port === null ? serializeHost(host) - : serializeHost(host) + ':' + port; -}; - -var getHostname = function () { - var host = getInternalURLState(this).host; - return host === null ? '' : serializeHost(host); -}; - -var getPort = function () { - var port = getInternalURLState(this).port; - return port === null ? '' : String(port); -}; - -var getPathname = function () { - var url = getInternalURLState(this); - var path = url.path; - return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; -}; - -var getSearch = function () { - var query = getInternalURLState(this).query; - return query ? '?' + query : ''; -}; - -var getSearchParams = function () { - return getInternalURLState(this).searchParams; -}; - -var getHash = function () { - var fragment = getInternalURLState(this).fragment; - return fragment ? '#' + fragment : ''; -}; - -var accessorDescriptor = function (getter, setter) { - return { get: getter, set: setter, configurable: true, enumerable: true }; -}; - -if (DESCRIPTORS) { - defineProperties(URLPrototype, { - // `URL.prototype.href` accessors pair - // https://url.spec.whatwg.org/#dom-url-href - href: accessorDescriptor(serializeURL, function (href) { - var url = getInternalURLState(this); - var urlString = String(href); - var failure = parseURL(url, urlString); - if (failure) throw TypeError(failure); - getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); - }), - // `URL.prototype.origin` getter - // https://url.spec.whatwg.org/#dom-url-origin - origin: accessorDescriptor(getOrigin), - // `URL.prototype.protocol` accessors pair - // https://url.spec.whatwg.org/#dom-url-protocol - protocol: accessorDescriptor(getProtocol, function (protocol) { - var url = getInternalURLState(this); - parseURL(url, String(protocol) + ':', SCHEME_START); - }), - // `URL.prototype.username` accessors pair - // https://url.spec.whatwg.org/#dom-url-username - username: accessorDescriptor(getUsername, function (username) { - var url = getInternalURLState(this); - var codePoints = arrayFrom(String(username)); - if (cannotHaveUsernamePasswordPort(url)) return; - url.username = ''; - for (var i = 0; i < codePoints.length; i++) { - url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet); - } - }), - // `URL.prototype.password` accessors pair - // https://url.spec.whatwg.org/#dom-url-password - password: accessorDescriptor(getPassword, function (password) { - var url = getInternalURLState(this); - var codePoints = arrayFrom(String(password)); - if (cannotHaveUsernamePasswordPort(url)) return; - url.password = ''; - for (var i = 0; i < codePoints.length; i++) { - url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet); - } - }), - // `URL.prototype.host` accessors pair - // https://url.spec.whatwg.org/#dom-url-host - host: accessorDescriptor(getHost, function (host) { - var url = getInternalURLState(this); - if (url.cannotBeABaseURL) return; - parseURL(url, String(host), HOST); - }), - // `URL.prototype.hostname` accessors pair - // https://url.spec.whatwg.org/#dom-url-hostname - hostname: accessorDescriptor(getHostname, function (hostname) { - var url = getInternalURLState(this); - if (url.cannotBeABaseURL) return; - parseURL(url, String(hostname), HOSTNAME); - }), - // `URL.prototype.port` accessors pair - // https://url.spec.whatwg.org/#dom-url-port - port: accessorDescriptor(getPort, function (port) { - var url = getInternalURLState(this); - if (cannotHaveUsernamePasswordPort(url)) return; - port = String(port); - if (port == '') url.port = null; - else parseURL(url, port, PORT); - }), - // `URL.prototype.pathname` accessors pair - // https://url.spec.whatwg.org/#dom-url-pathname - pathname: accessorDescriptor(getPathname, function (pathname) { - var url = getInternalURLState(this); - if (url.cannotBeABaseURL) return; - url.path = []; - parseURL(url, pathname + '', PATH_START); - }), - // `URL.prototype.search` accessors pair - // https://url.spec.whatwg.org/#dom-url-search - search: accessorDescriptor(getSearch, function (search) { - var url = getInternalURLState(this); - search = String(search); - if (search == '') { - url.query = null; - } else { - if ('?' == search.charAt(0)) search = search.slice(1); - url.query = ''; - parseURL(url, search, QUERY); - } - getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); - }), - // `URL.prototype.searchParams` getter - // https://url.spec.whatwg.org/#dom-url-searchparams - searchParams: accessorDescriptor(getSearchParams), - // `URL.prototype.hash` accessors pair - // https://url.spec.whatwg.org/#dom-url-hash - hash: accessorDescriptor(getHash, function (hash) { - var url = getInternalURLState(this); - hash = String(hash); - if (hash == '') { - url.fragment = null; - return; - } - if ('#' == hash.charAt(0)) hash = hash.slice(1); - url.fragment = ''; - parseURL(url, hash, FRAGMENT); - }) - }); -} - -// `URL.prototype.toJSON` method -// https://url.spec.whatwg.org/#dom-url-tojson -redefine(URLPrototype, 'toJSON', function toJSON() { - return serializeURL.call(this); -}, { enumerable: true }); - -// `URL.prototype.toString` method -// https://url.spec.whatwg.org/#URL-stringification-behavior -redefine(URLPrototype, 'toString', function toString() { - return serializeURL.call(this); -}, { enumerable: true }); - -if (NativeURL) { - var nativeCreateObjectURL = NativeURL.createObjectURL; - var nativeRevokeObjectURL = NativeURL.revokeObjectURL; - // `URL.createObjectURL` method - // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL - // eslint-disable-next-line no-unused-vars -- required for `.length` - if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) { - return nativeCreateObjectURL.apply(NativeURL, arguments); - }); - // `URL.revokeObjectURL` method - // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL - // eslint-disable-next-line no-unused-vars -- required for `.length` - if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) { - return nativeRevokeObjectURL.apply(NativeURL, arguments); - }); -} - -setToStringTag(URLConstructor, 'URL'); - -$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, { - URL: URLConstructor -}); - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ if(__webpack_module_cache__[moduleId]) { -/******/ return __webpack_module_cache__[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ !function() { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/global */ -/******/ !function() { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ }(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ !function() { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ }(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. -!function() { -"use strict"; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Dropzone": function() { return /* reexport */ Dropzone; }, - "default": function() { return /* binding */ dropzone_dist; } -}); - -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js -var es_array_concat = __webpack_require__(2222); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js -var es_array_filter = __webpack_require__(7327); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js -var es_array_index_of = __webpack_require__(2772); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js -var es_array_iterator = __webpack_require__(6992); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js -var es_array_map = __webpack_require__(1249); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js -var es_array_slice = __webpack_require__(7042); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js -var es_array_splice = __webpack_require__(561); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.constructor.js -var es_array_buffer_constructor = __webpack_require__(8264); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js -var es_function_name = __webpack_require__(8309); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js -var es_object_get_prototype_of = __webpack_require__(489); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js -var es_object_to_string = __webpack_require__(1539); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js -var es_regexp_exec = __webpack_require__(4916); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js -var es_regexp_to_string = __webpack_require__(9714); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js -var es_string_iterator = __webpack_require__(8783); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js -var es_string_match = __webpack_require__(4723); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js -var es_string_replace = __webpack_require__(5306); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js -var es_string_split = __webpack_require__(3123); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js -var es_string_trim = __webpack_require__(3210); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js -var es_typed_array_uint8_array = __webpack_require__(2472); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js -var es_typed_array_copy_within = __webpack_require__(2990); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js -var es_typed_array_every = __webpack_require__(8927); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js -var es_typed_array_fill = __webpack_require__(3105); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js -var es_typed_array_filter = __webpack_require__(5035); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js -var es_typed_array_find = __webpack_require__(4345); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js -var es_typed_array_find_index = __webpack_require__(7174); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js -var es_typed_array_for_each = __webpack_require__(2846); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js -var es_typed_array_includes = __webpack_require__(4731); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js -var es_typed_array_index_of = __webpack_require__(7209); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js -var es_typed_array_iterator = __webpack_require__(6319); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js -var es_typed_array_join = __webpack_require__(8867); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js -var es_typed_array_last_index_of = __webpack_require__(7789); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js -var es_typed_array_map = __webpack_require__(3739); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js -var es_typed_array_reduce = __webpack_require__(9368); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js -var es_typed_array_reduce_right = __webpack_require__(4483); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js -var es_typed_array_reverse = __webpack_require__(2056); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js -var es_typed_array_set = __webpack_require__(3462); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js -var es_typed_array_slice = __webpack_require__(678); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js -var es_typed_array_some = __webpack_require__(7462); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js -var es_typed_array_sort = __webpack_require__(3824); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js -var es_typed_array_subarray = __webpack_require__(5021); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js -var es_typed_array_to_locale_string = __webpack_require__(2974); -// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js -var es_typed_array_to_string = __webpack_require__(5016); -// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js -var web_dom_collections_for_each = __webpack_require__(4747); -// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js -var web_dom_collections_iterator = __webpack_require__(3948); -// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js -var web_url = __webpack_require__(285); -;// CONCATENATED MODULE: ./src/emitter.js - - -function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -// The Emitter class provides the ability to call `.on()` on Dropzone to listen -// to events. -// It is strongly based on component's emitter class, and I removed the -// functionality because of the dependency hell with different frameworks. -var Emitter = /*#__PURE__*/function () { - function Emitter() { - _classCallCheck(this, Emitter); - } - - _createClass(Emitter, [{ - key: "on", - value: // Add an event listener for given event - function on(event, fn) { - this._callbacks = this._callbacks || {}; // Create namespace for this event - - if (!this._callbacks[event]) { - this._callbacks[event] = []; - } - - this._callbacks[event].push(fn); - - return this; - } - }, { - key: "emit", - value: function emit(event) { - this._callbacks = this._callbacks || {}; - var callbacks = this._callbacks[event]; - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - if (callbacks) { - var _iterator = _createForOfIteratorHelper(callbacks, true), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var callback = _step.value; - callback.apply(this, args); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } // trigger a corresponding DOM event - - - if (this.element) { - this.element.dispatchEvent(this.makeEvent("dropzone:" + event, { - args: args - })); - } - - return this; - } - }, { - key: "makeEvent", - value: function makeEvent(eventName, detail) { - var params = { - bubbles: true, - cancelable: true, - detail: detail - }; - - if (typeof window.CustomEvent === "function") { - return new CustomEvent(eventName, params); - } else { - // IE 11 support - // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent - var evt = document.createEvent("CustomEvent"); - evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail); - return evt; - } - } // Remove event listener for given event. If fn is not provided, all event - // listeners for that event will be removed. If neither is provided, all - // event listeners will be removed. - - }, { - key: "off", - value: function off(event, fn) { - if (!this._callbacks || arguments.length === 0) { - this._callbacks = {}; - return this; - } // specific event - - - var callbacks = this._callbacks[event]; - - if (!callbacks) { - return this; - } // remove all handlers - - - if (arguments.length === 1) { - delete this._callbacks[event]; - return this; - } // remove specific handler - - - for (var i = 0; i < callbacks.length; i++) { - var callback = callbacks[i]; - - if (callback === fn) { - callbacks.splice(i, 1); - break; - } - } - - return this; - } - }]); - - return Emitter; -}(); - - -;// CONCATENATED MODULE: ./src/preview-template.html -// Module -var code = "
Check
Error
"; -// Exports -/* harmony default export */ var preview_template = (code); -;// CONCATENATED MODULE: ./src/options.js - - - - - -function options_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = options_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } - -function options_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return options_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return options_arrayLikeToArray(o, minLen); } - -function options_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - - - -var defaultOptions = { - /** - * Has to be specified on elements other than form (or when the form - * doesn't have an `action` attribute). You can also - * provide a function that will be called with `files` and - * must return the url (since `v3.12.0`) - */ - url: null, - - /** - * Can be changed to `"put"` if necessary. You can also provide a function - * that will be called with `files` and must return the method (since `v3.12.0`). - */ - method: "post", - - /** - * Will be set on the XHRequest. - */ - withCredentials: false, - - /** - * The timeout for the XHR requests in milliseconds (since `v4.4.0`). - * If set to null or 0, no timeout is going to be set. - */ - timeout: null, - - /** - * How many file uploads to process in parallel (See the - * Enqueuing file uploads documentation section for more info) - */ - parallelUploads: 2, - - /** - * Whether to send multiple files in one request. If - * this it set to true, then the fallback file input element will - * have the `multiple` attribute as well. This option will - * also trigger additional events (like `processingmultiple`). See the events - * documentation section for more information. - */ - uploadMultiple: false, - - /** - * Whether you want files to be uploaded in chunks to your server. This can't be - * used in combination with `uploadMultiple`. - * - * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload. - */ - chunking: false, - - /** - * If `chunking` is enabled, this defines whether **every** file should be chunked, - * even if the file size is below chunkSize. This means, that the additional chunk - * form data will be submitted and the `chunksUploaded` callback will be invoked. - */ - forceChunking: false, - - /** - * If `chunking` is `true`, then this defines the chunk size in bytes. - */ - chunkSize: 2000000, - - /** - * If `true`, the individual chunks of a file are being uploaded simultaneously. - */ - parallelChunkUploads: false, - - /** - * Whether a chunk should be retried if it fails. - */ - retryChunks: false, - - /** - * If `retryChunks` is true, how many times should it be retried. - */ - retryChunksLimit: 3, - - /** - * The maximum filesize (in bytes) that is allowed to be uploaded. - */ - maxFilesize: 256, - - /** - * The name of the file param that gets transferred. - * **NOTE**: If you have the option `uploadMultiple` set to `true`, then - * Dropzone will append `[]` to the name. - */ - paramName: "file", - - /** - * Whether thumbnails for images should be generated - */ - createImageThumbnails: true, - - /** - * In MB. When the filename exceeds this limit, the thumbnail will not be generated. - */ - maxThumbnailFilesize: 10, - - /** - * If `null`, the ratio of the image will be used to calculate it. - */ - thumbnailWidth: 120, - - /** - * The same as `thumbnailWidth`. If both are null, images will not be resized. - */ - thumbnailHeight: 120, - - /** - * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided. - * Can be either `contain` or `crop`. - */ - thumbnailMethod: "crop", - - /** - * If set, images will be resized to these dimensions before being **uploaded**. - * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect - * ratio of the file will be preserved. - * - * The `options.transformFile` function uses these options, so if the `transformFile` function - * is overridden, these options don't do anything. - */ - resizeWidth: null, - - /** - * See `resizeWidth`. - */ - resizeHeight: null, - - /** - * The mime type of the resized image (before it gets uploaded to the server). - * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`. - * See `resizeWidth` for more information. - */ - resizeMimeType: null, - - /** - * The quality of the resized images. See `resizeWidth`. - */ - resizeQuality: 0.8, - - /** - * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided. - * Can be either `contain` or `crop`. - */ - resizeMethod: "contain", - - /** - * The base that is used to calculate the **displayed** filesize. You can - * change this to 1024 if you would rather display kibibytes, mebibytes, - * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte` - * not `1 kilobyte`. You can change this to `1024` if you don't care about - * validity. - */ - filesizeBase: 1000, - - /** - * If not `null` defines how many files this Dropzone handles. If it exceeds, - * the event `maxfilesexceeded` will be called. The dropzone element gets the - * class `dz-max-files-reached` accordingly so you can provide visual - * feedback. - */ - maxFiles: null, - - /** - * An optional object to send additional headers to the server. Eg: - * `{ "My-Awesome-Header": "header value" }` - */ - headers: null, - - /** - * If `true`, the dropzone element itself will be clickable, if `false` - * nothing will be clickable. - * - * You can also pass an HTML element, a CSS selector (for multiple elements) - * or an array of those. In that case, all of those elements will trigger an - * upload when clicked. - */ - clickable: true, - - /** - * Whether hidden files in directories should be ignored. - */ - ignoreHiddenFiles: true, - - /** - * The default implementation of `accept` checks the file's mime type or - * extension against this list. This is a comma separated list of mime - * types or file extensions. - * - * Eg.: `image/*,application/pdf,.psd` - * - * If the Dropzone is `clickable` this option will also be used as - * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept) - * parameter on the hidden file input as well. - */ - acceptedFiles: null, - - /** - * **Deprecated!** - * Use acceptedFiles instead. - */ - acceptedMimeTypes: null, - - /** - * If false, files will be added to the queue but the queue will not be - * processed automatically. - * This can be useful if you need some additional user input before sending - * files (or if you want want all files sent at once). - * If you're ready to send the file simply call `myDropzone.processQueue()`. - * - * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation - * section for more information. - */ - autoProcessQueue: true, - - /** - * If false, files added to the dropzone will not be queued by default. - * You'll have to call `enqueueFile(file)` manually. - */ - autoQueue: true, - - /** - * If `true`, this will add a link to every file preview to remove or cancel (if - * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation` - * and `dictRemoveFile` options are used for the wording. - */ - addRemoveLinks: false, - - /** - * Defines where to display the file previews – if `null` the - * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS - * selector. The element should have the `dropzone-previews` class so - * the previews are displayed properly. - */ - previewsContainer: null, - - /** - * Set this to `true` if you don't want previews to be shown. - */ - disablePreviews: false, - - /** - * This is the element the hidden input field (which is used when clicking on the - * dropzone to trigger file selection) will be appended to. This might - * be important in case you use frameworks to switch the content of your page. - * - * Can be a selector string, or an element directly. - */ - hiddenInputContainer: "body", - - /** - * If null, no capture type will be specified - * If camera, mobile devices will skip the file selection and choose camera - * If microphone, mobile devices will skip the file selection and choose the microphone - * If camcorder, mobile devices will skip the file selection and choose the camera in video mode - * On apple devices multiple must be set to false. AcceptedFiles may need to - * be set to an appropriate mime type (e.g. "image/*", "audio/*", or "video/*"). - */ - capture: null, - - /** - * **Deprecated**. Use `renameFile` instead. - */ - renameFilename: null, - - /** - * A function that is invoked before the file is uploaded to the server and renames the file. - * This function gets the `File` as argument and can use the `file.name`. The actual name of the - * file that gets used during the upload can be accessed through `file.upload.filename`. - */ - renameFile: null, - - /** - * If `true` the fallback will be forced. This is very useful to test your server - * implementations first and make sure that everything works as - * expected without dropzone if you experience problems, and to test - * how your fallbacks will look. - */ - forceFallback: false, - - /** - * The text used before any files are dropped. - */ - dictDefaultMessage: "Drop files here to upload", - - /** - * The text that replaces the default message text it the browser is not supported. - */ - dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", - - /** - * The text that will be added before the fallback form. - * If you provide a fallback element yourself, or if this option is `null` this will - * be ignored. - */ - dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", - - /** - * If the filesize is too big. - * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values. - */ - dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", - - /** - * If the file doesn't match the file type. - */ - dictInvalidFileType: "You can't upload files of this type.", - - /** - * If the server response was invalid. - * `{{statusCode}}` will be replaced with the servers status code. - */ - dictResponseError: "Server responded with {{statusCode}} code.", - - /** - * If `addRemoveLinks` is true, the text to be used for the cancel upload link. - */ - dictCancelUpload: "Cancel upload", - - /** - * The text that is displayed if an upload was manually canceled - */ - dictUploadCanceled: "Upload canceled.", - - /** - * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload. - */ - dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", - - /** - * If `addRemoveLinks` is true, the text to be used to remove a file. - */ - dictRemoveFile: "Remove file", - - /** - * If this is not null, then the user will be prompted before removing a file. - */ - dictRemoveFileConfirmation: null, - - /** - * Displayed if `maxFiles` is st and exceeded. - * The string `{{maxFiles}}` will be replaced by the configuration value. - */ - dictMaxFilesExceeded: "You can not upload any more files.", - - /** - * Allows you to translate the different units. Starting with `tb` for terabytes and going down to - * `b` for bytes. - */ - dictFileSizeUnits: { - tb: "TB", - gb: "GB", - mb: "MB", - kb: "KB", - b: "b" - }, - - /** - * Called when dropzone initialized - * You can add event listeners here - */ - init: function init() {}, - - /** - * Can be an **object** of additional parameters to transfer to the server, **or** a `Function` - * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case - * of a function, this needs to return a map. - * - * The default implementation does nothing for normal uploads, but adds relevant information for - * chunked uploads. - * - * This is the same as adding hidden input fields in the form element. - */ - params: function params(files, xhr, chunk) { - if (chunk) { - return { - dzuuid: chunk.file.upload.uuid, - dzchunkindex: chunk.index, - dztotalfilesize: chunk.file.size, - dzchunksize: this.options.chunkSize, - dztotalchunkcount: chunk.file.upload.totalChunkCount, - dzchunkbyteoffset: chunk.index * this.options.chunkSize - }; - } - }, - - /** - * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File) - * and a `done` function as parameters. - * - * If the done function is invoked without arguments, the file is "accepted" and will - * be processed. If you pass an error message, the file is rejected, and the error - * message will be displayed. - * This function will not be called if the file is too big or doesn't match the mime types. - */ - accept: function accept(file, done) { - return done(); - }, - - /** - * The callback that will be invoked when all chunks have been uploaded for a file. - * It gets the file for which the chunks have been uploaded as the first parameter, - * and the `done` function as second. `done()` needs to be invoked when everything - * needed to finish the upload process is done. - */ - chunksUploaded: function chunksUploaded(file, done) { - done(); - }, - - /** - * Gets called when the browser is not supported. - * The default implementation shows the fallback input field and adds - * a text. - */ - fallback: function fallback() { - // This code should pass in IE7... :( - var messageElement; - this.element.className = "".concat(this.element.className, " dz-browser-not-supported"); - - var _iterator = options_createForOfIteratorHelper(this.element.getElementsByTagName("div"), true), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var child = _step.value; - - if (/(^| )dz-message($| )/.test(child.className)) { - messageElement = child; - child.className = "dz-message"; // Removes the 'dz-default' class - - break; - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - - if (!messageElement) { - messageElement = Dropzone.createElement('
'); - this.element.appendChild(messageElement); - } - - var span = messageElement.getElementsByTagName("span")[0]; - - if (span) { - if (span.textContent != null) { - span.textContent = this.options.dictFallbackMessage; - } else if (span.innerText != null) { - span.innerText = this.options.dictFallbackMessage; - } - } - - return this.element.appendChild(this.getFallbackForm()); - }, - - /** - * Gets called to calculate the thumbnail dimensions. - * - * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing: - * - * - `srcWidth` & `srcHeight` (required) - * - `trgWidth` & `trgHeight` (required) - * - `srcX` & `srcY` (optional, default `0`) - * - `trgX` & `trgY` (optional, default `0`) - * - * Those values are going to be used by `ctx.drawImage()`. - */ - resize: function resize(file, width, height, resizeMethod) { - var info = { - srcX: 0, - srcY: 0, - srcWidth: file.width, - srcHeight: file.height - }; - var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified - - if (width == null && height == null) { - width = info.srcWidth; - height = info.srcHeight; - } else if (width == null) { - width = height * srcRatio; - } else if (height == null) { - height = width / srcRatio; - } // Make sure images aren't upscaled - - - width = Math.min(width, info.srcWidth); - height = Math.min(height, info.srcHeight); - var trgRatio = width / height; - - if (info.srcWidth > width || info.srcHeight > height) { - // Image is bigger and needs rescaling - if (resizeMethod === "crop") { - if (srcRatio > trgRatio) { - info.srcHeight = file.height; - info.srcWidth = info.srcHeight * trgRatio; - } else { - info.srcWidth = file.width; - info.srcHeight = info.srcWidth / trgRatio; - } - } else if (resizeMethod === "contain") { - // Method 'contain' - if (srcRatio > trgRatio) { - height = width / srcRatio; - } else { - width = height * srcRatio; - } - } else { - throw new Error("Unknown resizeMethod '".concat(resizeMethod, "'")); - } - } - - info.srcX = (file.width - info.srcWidth) / 2; - info.srcY = (file.height - info.srcHeight) / 2; - info.trgWidth = width; - info.trgHeight = height; - return info; - }, - - /** - * Can be used to transform the file (for example, resize an image if necessary). - * - * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes - * images according to those dimensions. - * - * Gets the `file` as the first parameter, and a `done()` function as the second, that needs - * to be invoked with the file when the transformation is done. - */ - transformFile: function transformFile(file, done) { - if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) { - return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done); - } else { - return done(file); - } - }, - - /** - * A string that contains the template used for each dropped - * file. Change it to fulfill your needs but make sure to properly - * provide all elements. - * - * If you want to use an actual HTML element instead of providing a String - * as a config option, you could create a div with the id `tpl`, - * put the template inside it and provide the element like this: - * - * document - * .querySelector('#tpl') - * .innerHTML - * - */ - previewTemplate: preview_template, - - /* - Those functions register themselves to the events on init and handle all - the user interface specific stuff. Overwriting them won't break the upload - but can break the way it's displayed. - You can overwrite them if you don't like the default behavior. If you just - want to add an additional event handler, register it on the dropzone object - and don't overwrite those options. - */ - // Those are self explanatory and simply concern the DragnDrop. - drop: function drop(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - dragstart: function dragstart(e) {}, - dragend: function dragend(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - dragenter: function dragenter(e) { - return this.element.classList.add("dz-drag-hover"); - }, - dragover: function dragover(e) { - return this.element.classList.add("dz-drag-hover"); - }, - dragleave: function dragleave(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - paste: function paste(e) {}, - // Called whenever there are no files left in the dropzone anymore, and the - // dropzone should be displayed as if in the initial state. - reset: function reset() { - return this.element.classList.remove("dz-started"); - }, - // Called when a file is added to the queue - // Receives `file` - addedfile: function addedfile(file) { - var _this = this; - - if (this.element === this.previewsContainer) { - this.element.classList.add("dz-started"); - } - - if (this.previewsContainer && !this.options.disablePreviews) { - file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); - file.previewTemplate = file.previewElement; // Backwards compatibility - - this.previewsContainer.appendChild(file.previewElement); - - var _iterator2 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-name]"), true), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var node = _step2.value; - node.textContent = file.name; - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - - var _iterator3 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-size]"), true), - _step3; - - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - node = _step3.value; - node.innerHTML = this.filesize(file.size); - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); - } - - if (this.options.addRemoveLinks) { - file._removeLink = Dropzone.createElement("
".concat(this.options.dictRemoveFile, "")); - file.previewElement.appendChild(file._removeLink); - } - - var removeFileEvent = function removeFileEvent(e) { - e.preventDefault(); - e.stopPropagation(); - - if (file.status === Dropzone.UPLOADING) { - return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function () { - return _this.removeFile(file); - }); - } else { - if (_this.options.dictRemoveFileConfirmation) { - return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function () { - return _this.removeFile(file); - }); - } else { - return _this.removeFile(file); - } - } - }; - - var _iterator4 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-remove]"), true), - _step4; - - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { - var removeLink = _step4.value; - removeLink.addEventListener("click", removeFileEvent); - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); - } - } - }, - // Called whenever a file is removed. - removedfile: function removedfile(file) { - if (file.previewElement != null && file.previewElement.parentNode != null) { - file.previewElement.parentNode.removeChild(file.previewElement); - } - - return this._updateMaxFilesReachedClass(); - }, - // Called when a thumbnail has been generated - // Receives `file` and `dataUrl` - thumbnail: function thumbnail(file, dataUrl) { - if (file.previewElement) { - file.previewElement.classList.remove("dz-file-preview"); - - var _iterator5 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-thumbnail]"), true), - _step5; - - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { - var thumbnailElement = _step5.value; - thumbnailElement.alt = file.name; - thumbnailElement.src = dataUrl; - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); - } - - return setTimeout(function () { - return file.previewElement.classList.add("dz-image-preview"); - }, 1); - } - }, - // Called whenever an error occurs - // Receives `file` and `message` - error: function error(file, message) { - if (file.previewElement) { - file.previewElement.classList.add("dz-error"); - - if (typeof message !== "string" && message.error) { - message = message.error; - } - - var _iterator6 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-errormessage]"), true), - _step6; - - try { - for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { - var node = _step6.value; - node.textContent = message; - } - } catch (err) { - _iterator6.e(err); - } finally { - _iterator6.f(); - } - } - }, - errormultiple: function errormultiple() {}, - // Called when a file gets processed. Since there is a cue, not all added - // files are processed immediately. - // Receives `file` - processing: function processing(file) { - if (file.previewElement) { - file.previewElement.classList.add("dz-processing"); - - if (file._removeLink) { - return file._removeLink.innerHTML = this.options.dictCancelUpload; - } - } - }, - processingmultiple: function processingmultiple() {}, - // Called whenever the upload progress gets updated. - // Receives `file`, `progress` (percentage 0-100) and `bytesSent`. - // To get the total number of bytes of the file, use `file.size` - uploadprogress: function uploadprogress(file, progress, bytesSent) { - if (file.previewElement) { - var _iterator7 = options_createForOfIteratorHelper(file.previewElement.querySelectorAll("[data-dz-uploadprogress]"), true), - _step7; - - try { - for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { - var node = _step7.value; - node.nodeName === "PROGRESS" ? node.value = progress : node.style.width = "".concat(progress, "%"); - } - } catch (err) { - _iterator7.e(err); - } finally { - _iterator7.f(); - } - } - }, - // Called whenever the total upload progress gets updated. - // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent - totaluploadprogress: function totaluploadprogress() {}, - // Called just before the file is sent. Gets the `xhr` object as second - // parameter, so you can modify it (for example to add a CSRF token) and a - // `formData` object to add additional information. - sending: function sending() {}, - sendingmultiple: function sendingmultiple() {}, - // When the complete upload is finished and successful - // Receives `file` - success: function success(file) { - if (file.previewElement) { - return file.previewElement.classList.add("dz-success"); - } - }, - successmultiple: function successmultiple() {}, - // When the upload is canceled. - canceled: function canceled(file) { - return this.emit("error", file, this.options.dictUploadCanceled); - }, - canceledmultiple: function canceledmultiple() {}, - // When the upload is finished, either with success or an error. - // Receives `file` - complete: function complete(file) { - if (file._removeLink) { - file._removeLink.innerHTML = this.options.dictRemoveFile; - } - - if (file.previewElement) { - return file.previewElement.classList.add("dz-complete"); - } - }, - completemultiple: function completemultiple() {}, - maxfilesexceeded: function maxfilesexceeded() {}, - maxfilesreached: function maxfilesreached() {}, - queuecomplete: function queuecomplete() {}, - addedfiles: function addedfiles() {} -}; -/* harmony default export */ var src_options = (defaultOptions); -;// CONCATENATED MODULE: ./src/dropzone.js -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -function dropzone_createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = dropzone_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } - -function dropzone_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return dropzone_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return dropzone_arrayLikeToArray(o, minLen); } - -function dropzone_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -function dropzone_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function dropzone_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function dropzone_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropzone_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropzone_defineProperties(Constructor, staticProps); return Constructor; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - - - - -var Dropzone = /*#__PURE__*/function (_Emitter) { - _inherits(Dropzone, _Emitter); - - var _super = _createSuper(Dropzone); - - function Dropzone(el, options) { - var _this; - - dropzone_classCallCheck(this, Dropzone); - - _this = _super.call(this); - var fallback, left; - _this.element = el; // For backwards compatibility since the version was in the prototype previously - - _this.version = Dropzone.version; - _this.clickableElements = []; - _this.listeners = []; - _this.files = []; // All files - - if (typeof _this.element === "string") { - _this.element = document.querySelector(_this.element); - } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird. - - - if (!_this.element || _this.element.nodeType == null) { - throw new Error("Invalid dropzone element."); - } - - if (_this.element.dropzone) { - throw new Error("Dropzone already attached."); - } // Now add this dropzone to the instances. - - - Dropzone.instances.push(_assertThisInitialized(_this)); // Put the dropzone inside the element itself. - - _this.element.dropzone = _assertThisInitialized(_this); - var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {}; - _this.options = Dropzone.extend({}, src_options, elementOptions, options != null ? options : {}); - _this.options.previewTemplate = _this.options.previewTemplate.replace(/\n*/g, ""); // If the browser failed, just call the fallback and leave - - if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) { - return _possibleConstructorReturn(_this, _this.options.fallback.call(_assertThisInitialized(_this))); - } // @options.url = @element.getAttribute "action" unless @options.url? - - - if (_this.options.url == null) { - _this.options.url = _this.element.getAttribute("action"); - } - - if (!_this.options.url) { - throw new Error("No URL provided."); - } - - if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) { - throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); - } - - if (_this.options.uploadMultiple && _this.options.chunking) { - throw new Error("You cannot set both: uploadMultiple and chunking."); - } // Backwards compatibility - - - if (_this.options.acceptedMimeTypes) { - _this.options.acceptedFiles = _this.options.acceptedMimeTypes; - delete _this.options.acceptedMimeTypes; - } // Backwards compatibility - - - if (_this.options.renameFilename != null) { - _this.options.renameFile = function (file) { - return _this.options.renameFilename.call(_assertThisInitialized(_this), file.name, file); - }; - } - - if (typeof _this.options.method === "string") { - _this.options.method = _this.options.method.toUpperCase(); - } - - if ((fallback = _this.getExistingFallback()) && fallback.parentNode) { - // Remove the fallback - fallback.parentNode.removeChild(fallback); - } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false - - - if (_this.options.previewsContainer !== false) { - if (_this.options.previewsContainer) { - _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, "previewsContainer"); - } else { - _this.previewsContainer = _this.element; - } - } - - if (_this.options.clickable) { - if (_this.options.clickable === true) { - _this.clickableElements = [_this.element]; - } else { - _this.clickableElements = Dropzone.getElements(_this.options.clickable, "clickable"); - } - } - - _this.init(); - - return _this; - } // Returns all files that have been accepted - - - dropzone_createClass(Dropzone, [{ - key: "getAcceptedFiles", - value: function getAcceptedFiles() { - return this.files.filter(function (file) { - return file.accepted; - }).map(function (file) { - return file; - }); - } // Returns all files that have been rejected - // Not sure when that's going to be useful, but added for completeness. - - }, { - key: "getRejectedFiles", - value: function getRejectedFiles() { - return this.files.filter(function (file) { - return !file.accepted; - }).map(function (file) { - return file; - }); - } - }, { - key: "getFilesWithStatus", - value: function getFilesWithStatus(status) { - return this.files.filter(function (file) { - return file.status === status; - }).map(function (file) { - return file; - }); - } // Returns all files that are in the queue - - }, { - key: "getQueuedFiles", - value: function getQueuedFiles() { - return this.getFilesWithStatus(Dropzone.QUEUED); - } - }, { - key: "getUploadingFiles", - value: function getUploadingFiles() { - return this.getFilesWithStatus(Dropzone.UPLOADING); - } - }, { - key: "getAddedFiles", - value: function getAddedFiles() { - return this.getFilesWithStatus(Dropzone.ADDED); - } // Files that are either queued or uploading - - }, { - key: "getActiveFiles", - value: function getActiveFiles() { - return this.files.filter(function (file) { - return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED; - }).map(function (file) { - return file; - }); - } // The function that gets called when Dropzone is initialized. You - // can (and should) setup event listeners inside this function. - - }, { - key: "init", - value: function init() { - var _this2 = this; - - // In case it isn't set already - if (this.element.tagName === "form") { - this.element.setAttribute("enctype", "multipart/form-data"); - } - - if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { - this.element.appendChild(Dropzone.createElement("
"))); - } - - if (this.clickableElements.length) { - var setupHiddenFileInput = function setupHiddenFileInput() { - if (_this2.hiddenFileInput) { - _this2.hiddenFileInput.parentNode.removeChild(_this2.hiddenFileInput); - } - - _this2.hiddenFileInput = document.createElement("input"); - - _this2.hiddenFileInput.setAttribute("type", "file"); - - if (_this2.options.maxFiles === null || _this2.options.maxFiles > 1) { - _this2.hiddenFileInput.setAttribute("multiple", "multiple"); - } - - _this2.hiddenFileInput.className = "dz-hidden-input"; - - if (_this2.options.acceptedFiles !== null) { - _this2.hiddenFileInput.setAttribute("accept", _this2.options.acceptedFiles); - } - - if (_this2.options.capture !== null) { - _this2.hiddenFileInput.setAttribute("capture", _this2.options.capture); - } // Making sure that no one can "tab" into this field. - - - _this2.hiddenFileInput.setAttribute("tabindex", "-1"); // Not setting `display="none"` because some browsers don't accept clicks - // on elements that aren't displayed. - - - _this2.hiddenFileInput.style.visibility = "hidden"; - _this2.hiddenFileInput.style.position = "absolute"; - _this2.hiddenFileInput.style.top = "0"; - _this2.hiddenFileInput.style.left = "0"; - _this2.hiddenFileInput.style.height = "0"; - _this2.hiddenFileInput.style.width = "0"; - Dropzone.getElement(_this2.options.hiddenInputContainer, "hiddenInputContainer").appendChild(_this2.hiddenFileInput); - - _this2.hiddenFileInput.addEventListener("change", function () { - var files = _this2.hiddenFileInput.files; - - if (files.length) { - var _iterator = dropzone_createForOfIteratorHelper(files, true), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var file = _step.value; - - _this2.addFile(file); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - - _this2.emit("addedfiles", files); - - setupHiddenFileInput(); - }); - }; - - setupHiddenFileInput(); - } - - this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself. - // They're not in @setupEventListeners() because they shouldn't be removed - // again when the dropzone gets disabled. - - var _iterator2 = dropzone_createForOfIteratorHelper(this.events, true), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var eventName = _step2.value; - this.on(eventName, this.options[eventName]); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - - this.on("uploadprogress", function () { - return _this2.updateTotalUploadProgress(); - }); - this.on("removedfile", function () { - return _this2.updateTotalUploadProgress(); - }); - this.on("canceled", function (file) { - return _this2.emit("complete", file); - }); // Emit a `queuecomplete` event if all files finished uploading. - - this.on("complete", function (file) { - if (_this2.getAddedFiles().length === 0 && _this2.getUploadingFiles().length === 0 && _this2.getQueuedFiles().length === 0) { - // This needs to be deferred so that `queuecomplete` really triggers after `complete` - return setTimeout(function () { - return _this2.emit("queuecomplete"); - }, 0); - } - }); - - var containsFiles = function containsFiles(e) { - if (e.dataTransfer.types) { - // Because e.dataTransfer.types is an Object in - // IE, we need to iterate like this instead of - // using e.dataTransfer.types.some() - for (var i = 0; i < e.dataTransfer.types.length; i++) { - if (e.dataTransfer.types[i] === "Files") return true; - } - } - - return false; - }; - - var noPropagation = function noPropagation(e) { - // If there are no files, we don't want to stop - // propagation so we don't interfere with other - // drag and drop behaviour. - if (!containsFiles(e)) return; - e.stopPropagation(); - - if (e.preventDefault) { - return e.preventDefault(); - } else { - return e.returnValue = false; - } - }; // Create the listeners - - - this.listeners = [{ - element: this.element, - events: { - dragstart: function dragstart(e) { - return _this2.emit("dragstart", e); - }, - dragenter: function dragenter(e) { - noPropagation(e); - return _this2.emit("dragenter", e); - }, - dragover: function dragover(e) { - // Makes it possible to drag files from chrome's download bar - // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar - // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception) - var efct; - - try { - efct = e.dataTransfer.effectAllowed; - } catch (error) {} - - e.dataTransfer.dropEffect = "move" === efct || "linkMove" === efct ? "move" : "copy"; - noPropagation(e); - return _this2.emit("dragover", e); - }, - dragleave: function dragleave(e) { - return _this2.emit("dragleave", e); - }, - drop: function drop(e) { - noPropagation(e); - return _this2.drop(e); - }, - dragend: function dragend(e) { - return _this2.emit("dragend", e); - } - } // This is disabled right now, because the browsers don't implement it properly. - // "paste": (e) => - // noPropagation e - // @paste e - - }]; - this.clickableElements.forEach(function (clickableElement) { - return _this2.listeners.push({ - element: clickableElement, - events: { - click: function click(evt) { - // Only the actual dropzone or the message element should trigger file selection - if (clickableElement !== _this2.element || evt.target === _this2.element || Dropzone.elementInside(evt.target, _this2.element.querySelector(".dz-message"))) { - _this2.hiddenFileInput.click(); // Forward the click - - } - - return true; - } - } - }); - }); - this.enable(); - return this.options.init.call(this); - } // Not fully tested yet - - }, { - key: "destroy", - value: function destroy() { - this.disable(); - this.removeAllFiles(true); - - if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) { - this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); - this.hiddenFileInput = null; - } - - delete this.element.dropzone; - return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); - } - }, { - key: "updateTotalUploadProgress", - value: function updateTotalUploadProgress() { - var totalUploadProgress; - var totalBytesSent = 0; - var totalBytes = 0; - var activeFiles = this.getActiveFiles(); - - if (activeFiles.length) { - var _iterator3 = dropzone_createForOfIteratorHelper(this.getActiveFiles(), true), - _step3; - - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - var file = _step3.value; - totalBytesSent += file.upload.bytesSent; - totalBytes += file.upload.total; - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); - } - - totalUploadProgress = 100 * totalBytesSent / totalBytes; - } else { - totalUploadProgress = 100; - } - - return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); - } // @options.paramName can be a function taking one parameter rather than a string. - // A parameter name for a file is obtained simply by calling this with an index number. - - }, { - key: "_getParamName", - value: function _getParamName(n) { - if (typeof this.options.paramName === "function") { - return this.options.paramName(n); - } else { - return "".concat(this.options.paramName).concat(this.options.uploadMultiple ? "[".concat(n, "]") : ""); - } - } // If @options.renameFile is a function, - // the function will be used to rename the file.name before appending it to the formData - - }, { - key: "_renameFile", - value: function _renameFile(file) { - if (typeof this.options.renameFile !== "function") { - return file.name; - } - - return this.options.renameFile(file); - } // Returns a form that can be used as fallback if the browser does not support DragnDrop - // - // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided. - // This code has to pass in IE7 :( - - }, { - key: "getFallbackForm", - value: function getFallbackForm() { - var existingFallback, form; - - if (existingFallback = this.getExistingFallback()) { - return existingFallback; - } - - var fieldsString = '
'; - - if (this.options.dictFallbackText) { - fieldsString += "

".concat(this.options.dictFallbackText, "

"); - } - - fieldsString += "
"); - var fields = Dropzone.createElement(fieldsString); - - if (this.element.tagName !== "FORM") { - form = Dropzone.createElement("
")); - form.appendChild(fields); - } else { - // Make sure that the enctype and method attributes are set properly - this.element.setAttribute("enctype", "multipart/form-data"); - this.element.setAttribute("method", this.options.method); - } - - return form != null ? form : fields; - } // Returns the fallback elements if they exist already - // - // This code has to pass in IE7 :( - - }, { - key: "getExistingFallback", - value: function getExistingFallback() { - var getFallback = function getFallback(elements) { - var _iterator4 = dropzone_createForOfIteratorHelper(elements, true), - _step4; - - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { - var el = _step4.value; - - if (/(^| )fallback($| )/.test(el.className)) { - return el; - } - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); - } - }; - - for (var _i = 0, _arr = ["div", "form"]; _i < _arr.length; _i++) { - var tagName = _arr[_i]; - var fallback; - - if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { - return fallback; - } - } - } // Activates all listeners stored in @listeners - - }, { - key: "setupEventListeners", - value: function setupEventListeners() { - return this.listeners.map(function (elementListeners) { - return function () { - var result = []; - - for (var event in elementListeners.events) { - var listener = elementListeners.events[event]; - result.push(elementListeners.element.addEventListener(event, listener, false)); - } - - return result; - }(); - }); - } // Deactivates all listeners stored in @listeners - - }, { - key: "removeEventListeners", - value: function removeEventListeners() { - return this.listeners.map(function (elementListeners) { - return function () { - var result = []; - - for (var event in elementListeners.events) { - var listener = elementListeners.events[event]; - result.push(elementListeners.element.removeEventListener(event, listener, false)); - } - - return result; - }(); - }); - } // Removes all event listeners and cancels all files in the queue or being processed. - - }, { - key: "disable", - value: function disable() { - var _this3 = this; - - this.clickableElements.forEach(function (element) { - return element.classList.remove("dz-clickable"); - }); - this.removeEventListeners(); - this.disabled = true; - return this.files.map(function (file) { - return _this3.cancelUpload(file); - }); - } - }, { - key: "enable", - value: function enable() { - delete this.disabled; - this.clickableElements.forEach(function (element) { - return element.classList.add("dz-clickable"); - }); - return this.setupEventListeners(); - } // Returns a nicely formatted filesize - - }, { - key: "filesize", - value: function filesize(size) { - var selectedSize = 0; - var selectedUnit = "b"; - - if (size > 0) { - var units = ["tb", "gb", "mb", "kb", "b"]; - - for (var i = 0; i < units.length; i++) { - var unit = units[i]; - var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; - - if (size >= cutoff) { - selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); - selectedUnit = unit; - break; - } - } - - selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits - } - - return "".concat(selectedSize, " ").concat(this.options.dictFileSizeUnits[selectedUnit]); - } // Adds or removes the `dz-max-files-reached` class from the form. - - }, { - key: "_updateMaxFilesReachedClass", - value: function _updateMaxFilesReachedClass() { - if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) { - if (this.getAcceptedFiles().length === this.options.maxFiles) { - this.emit("maxfilesreached", this.files); - } - - return this.element.classList.add("dz-max-files-reached"); - } else { - return this.element.classList.remove("dz-max-files-reached"); - } - } - }, { - key: "drop", - value: function drop(e) { - if (!e.dataTransfer) { - return; - } - - this.emit("drop", e); // Convert the FileList to an Array - // This is necessary for IE11 - - var files = []; - - for (var i = 0; i < e.dataTransfer.files.length; i++) { - files[i] = e.dataTransfer.files[i]; - } // Even if it's a folder, files.length will contain the folders. - - - if (files.length) { - var items = e.dataTransfer.items; - - if (items && items.length && items[0].webkitGetAsEntry != null) { - // The browser supports dropping of folders, so handle items instead of files - this._addFilesFromItems(items); - } else { - this.handleFiles(files); - } - } - - this.emit("addedfiles", files); - } - }, { - key: "paste", - value: function paste(e) { - if (__guard__(e != null ? e.clipboardData : undefined, function (x) { - return x.items; - }) == null) { - return; - } - - this.emit("paste", e); - var items = e.clipboardData.items; - - if (items.length) { - return this._addFilesFromItems(items); - } - } - }, { - key: "handleFiles", - value: function handleFiles(files) { - var _iterator5 = dropzone_createForOfIteratorHelper(files, true), - _step5; - - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { - var file = _step5.value; - this.addFile(file); - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); - } - } // When a folder is dropped (or files are pasted), items must be handled - // instead of files. - - }, { - key: "_addFilesFromItems", - value: function _addFilesFromItems(items) { - var _this4 = this; - - return function () { - var result = []; - - var _iterator6 = dropzone_createForOfIteratorHelper(items, true), - _step6; - - try { - for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { - var item = _step6.value; - var entry; - - if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) { - if (entry.isFile) { - result.push(_this4.addFile(item.getAsFile())); - } else if (entry.isDirectory) { - // Append all files from that directory to files - result.push(_this4._addFilesFromDirectory(entry, entry.name)); - } else { - result.push(undefined); - } - } else if (item.getAsFile != null) { - if (item.kind == null || item.kind === "file") { - result.push(_this4.addFile(item.getAsFile())); - } else { - result.push(undefined); - } - } else { - result.push(undefined); - } - } - } catch (err) { - _iterator6.e(err); - } finally { - _iterator6.f(); - } - - return result; - }(); - } // Goes through the directory, and adds each file it finds recursively - - }, { - key: "_addFilesFromDirectory", - value: function _addFilesFromDirectory(directory, path) { - var _this5 = this; - - var dirReader = directory.createReader(); - - var errorHandler = function errorHandler(error) { - return __guardMethod__(console, "log", function (o) { - return o.log(error); - }); - }; - - var readEntries = function readEntries() { - return dirReader.readEntries(function (entries) { - if (entries.length > 0) { - var _iterator7 = dropzone_createForOfIteratorHelper(entries, true), - _step7; - - try { - for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { - var entry = _step7.value; - - if (entry.isFile) { - entry.file(function (file) { - if (_this5.options.ignoreHiddenFiles && file.name.substring(0, 1) === ".") { - return; - } - - file.fullPath = "".concat(path, "/").concat(file.name); - return _this5.addFile(file); - }); - } else if (entry.isDirectory) { - _this5._addFilesFromDirectory(entry, "".concat(path, "/").concat(entry.name)); - } - } // Recursively call readEntries() again, since browser only handle - // the first 100 entries. - // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries - - } catch (err) { - _iterator7.e(err); - } finally { - _iterator7.f(); - } - - readEntries(); - } - - return null; - }, errorHandler); - }; - - return readEntries(); - } // If `done()` is called without argument the file is accepted - // If you call it with an error message, the file is rejected - // (This allows for asynchronous validation) - // - // This function checks the filesize, and if the file.type passes the - // `acceptedFiles` check. - - }, { - key: "accept", - value: function accept(file, done) { - if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) { - done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); - } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { - done(this.options.dictInvalidFileType); - } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) { - done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); - this.emit("maxfilesexceeded", file); - } else { - this.options.accept.call(this, file, done); - } - } - }, { - key: "addFile", - value: function addFile(file) { - var _this6 = this; - - file.upload = { - uuid: Dropzone.uuidv4(), - progress: 0, - // Setting the total upload size to file.size for the beginning - // It's actual different than the size to be transmitted. - total: file.size, - bytesSent: 0, - filename: this._renameFile(file) // Not setting chunking information here, because the acutal data — and - // thus the chunks — might change if `options.transformFile` is set - // and does something to the data. - - }; - this.files.push(file); - file.status = Dropzone.ADDED; - this.emit("addedfile", file); - - this._enqueueThumbnail(file); - - this.accept(file, function (error) { - if (error) { - file.accepted = false; - - _this6._errorProcessing([file], error); // Will set the file.status - - } else { - file.accepted = true; - - if (_this6.options.autoQueue) { - _this6.enqueueFile(file); - } // Will set .accepted = true - - } - - _this6._updateMaxFilesReachedClass(); - }); - } // Wrapper for enqueueFile - - }, { - key: "enqueueFiles", - value: function enqueueFiles(files) { - var _iterator8 = dropzone_createForOfIteratorHelper(files, true), - _step8; - - try { - for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { - var file = _step8.value; - this.enqueueFile(file); - } - } catch (err) { - _iterator8.e(err); - } finally { - _iterator8.f(); - } - - return null; - } - }, { - key: "enqueueFile", - value: function enqueueFile(file) { - var _this7 = this; - - if (file.status === Dropzone.ADDED && file.accepted === true) { - file.status = Dropzone.QUEUED; - - if (this.options.autoProcessQueue) { - return setTimeout(function () { - return _this7.processQueue(); - }, 0); // Deferring the call - } - } else { - throw new Error("This file can't be queued because it has already been processed or was rejected."); - } - } - }, { - key: "_enqueueThumbnail", - value: function _enqueueThumbnail(file) { - var _this8 = this; - - if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { - this._thumbnailQueue.push(file); - - return setTimeout(function () { - return _this8._processThumbnailQueue(); - }, 0); // Deferring the call - } - } - }, { - key: "_processThumbnailQueue", - value: function _processThumbnailQueue() { - var _this9 = this; - - if (this._processingThumbnail || this._thumbnailQueue.length === 0) { - return; - } - - this._processingThumbnail = true; - - var file = this._thumbnailQueue.shift(); - - return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) { - _this9.emit("thumbnail", file, dataUrl); - - _this9._processingThumbnail = false; - return _this9._processThumbnailQueue(); - }); - } // Can be called by the user to remove a file - - }, { - key: "removeFile", - value: function removeFile(file) { - if (file.status === Dropzone.UPLOADING) { - this.cancelUpload(file); - } - - this.files = without(this.files, file); - this.emit("removedfile", file); - - if (this.files.length === 0) { - return this.emit("reset"); - } - } // Removes all files that aren't currently processed from the list - - }, { - key: "removeAllFiles", - value: function removeAllFiles(cancelIfNecessary) { - // Create a copy of files since removeFile() changes the @files array. - if (cancelIfNecessary == null) { - cancelIfNecessary = false; - } - - var _iterator9 = dropzone_createForOfIteratorHelper(this.files.slice(), true), - _step9; - - try { - for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { - var file = _step9.value; - - if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { - this.removeFile(file); - } - } - } catch (err) { - _iterator9.e(err); - } finally { - _iterator9.f(); - } - - return null; - } // Resizes an image before it gets sent to the server. This function is the default behavior of - // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with - // the resized blob. - - }, { - key: "resizeImage", - value: function resizeImage(file, width, height, resizeMethod, callback) { - var _this10 = this; - - return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) { - if (canvas == null) { - // The image has not been resized - return callback(file); - } else { - var resizeMimeType = _this10.options.resizeMimeType; - - if (resizeMimeType == null) { - resizeMimeType = file.type; - } - - var resizedDataURL = canvas.toDataURL(resizeMimeType, _this10.options.resizeQuality); - - if (resizeMimeType === "image/jpeg" || resizeMimeType === "image/jpg") { - // Now add the original EXIF information - resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL); - } - - return callback(Dropzone.dataURItoBlob(resizedDataURL)); - } - }); - } - }, { - key: "createThumbnail", - value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) { - var _this11 = this; - - var fileReader = new FileReader(); - - fileReader.onload = function () { - file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector - - if (file.type === "image/svg+xml") { - if (callback != null) { - callback(fileReader.result); - } - - return; - } - - _this11.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback); - }; - - fileReader.readAsDataURL(file); - } // `mockFile` needs to have these attributes: - // - // { name: 'name', size: 12345, imageUrl: '' } - // - // `callback` will be invoked when the image has been downloaded and displayed. - // `crossOrigin` will be added to the `img` tag when accessing the file. - - }, { - key: "displayExistingFile", - value: function displayExistingFile(mockFile, imageUrl, callback, crossOrigin) { - var _this12 = this; - - var resizeThumbnail = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - this.emit("addedfile", mockFile); - this.emit("complete", mockFile); - - if (!resizeThumbnail) { - this.emit("thumbnail", mockFile, imageUrl); - if (callback) callback(); - } else { - var onDone = function onDone(thumbnail) { - _this12.emit("thumbnail", mockFile, thumbnail); - - if (callback) callback(); - }; - - mockFile.dataURL = imageUrl; - this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, this.options.fixOrientation, onDone, crossOrigin); - } - } - }, { - key: "createThumbnailFromUrl", - value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) { - var _this13 = this; - - // Not using `new Image` here because of a bug in latest Chrome versions. - // See https://github.com/enyo/dropzone/pull/226 - var img = document.createElement("img"); - - if (crossOrigin) { - img.crossOrigin = crossOrigin; - } // fixOrientation is not needed anymore with browsers handling imageOrientation - - - fixOrientation = getComputedStyle(document.body)["imageOrientation"] == "from-image" ? false : fixOrientation; - - img.onload = function () { - var loadExif = function loadExif(callback) { - return callback(1); - }; - - if (typeof EXIF !== "undefined" && EXIF !== null && fixOrientation) { - loadExif = function loadExif(callback) { - return EXIF.getData(img, function () { - return callback(EXIF.getTag(this, "Orientation")); - }); - }; - } - - return loadExif(function (orientation) { - file.width = img.width; - file.height = img.height; - - var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod); - - var canvas = document.createElement("canvas"); - var ctx = canvas.getContext("2d"); - canvas.width = resizeInfo.trgWidth; - canvas.height = resizeInfo.trgHeight; - - if (orientation > 4) { - canvas.width = resizeInfo.trgHeight; - canvas.height = resizeInfo.trgWidth; - } - - switch (orientation) { - case 2: - // horizontal flip - ctx.translate(canvas.width, 0); - ctx.scale(-1, 1); - break; - - case 3: - // 180° rotate left - ctx.translate(canvas.width, canvas.height); - ctx.rotate(Math.PI); - break; - - case 4: - // vertical flip - ctx.translate(0, canvas.height); - ctx.scale(1, -1); - break; - - case 5: - // vertical flip + 90 rotate right - ctx.rotate(0.5 * Math.PI); - ctx.scale(1, -1); - break; - - case 6: - // 90° rotate right - ctx.rotate(0.5 * Math.PI); - ctx.translate(0, -canvas.width); - break; - - case 7: - // horizontal flip + 90 rotate right - ctx.rotate(0.5 * Math.PI); - ctx.translate(canvas.height, -canvas.width); - ctx.scale(-1, 1); - break; - - case 8: - // 90° rotate left - ctx.rotate(-0.5 * Math.PI); - ctx.translate(-canvas.height, 0); - break; - } // This is a bugfix for iOS' scaling bug. - - - drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); - var thumbnail = canvas.toDataURL("image/png"); - - if (callback != null) { - return callback(thumbnail, canvas); - } - }); - }; - - if (callback != null) { - img.onerror = callback; - } - - return img.src = file.dataURL; - } // Goes through the queue and processes files if there aren't too many already. - - }, { - key: "processQueue", - value: function processQueue() { - var parallelUploads = this.options.parallelUploads; - var processingLength = this.getUploadingFiles().length; - var i = processingLength; // There are already at least as many files uploading than should be - - if (processingLength >= parallelUploads) { - return; - } - - var queuedFiles = this.getQueuedFiles(); - - if (!(queuedFiles.length > 0)) { - return; - } - - if (this.options.uploadMultiple) { - // The files should be uploaded in one request - return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); - } else { - while (i < parallelUploads) { - if (!queuedFiles.length) { - return; - } // Nothing left to process - - - this.processFile(queuedFiles.shift()); - i++; - } - } - } // Wrapper for `processFiles` - - }, { - key: "processFile", - value: function processFile(file) { - return this.processFiles([file]); - } // Loads the file, then calls finishedLoading() - - }, { - key: "processFiles", - value: function processFiles(files) { - var _iterator10 = dropzone_createForOfIteratorHelper(files, true), - _step10; - - try { - for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) { - var file = _step10.value; - file.processing = true; // Backwards compatibility - - file.status = Dropzone.UPLOADING; - this.emit("processing", file); - } - } catch (err) { - _iterator10.e(err); - } finally { - _iterator10.f(); - } - - if (this.options.uploadMultiple) { - this.emit("processingmultiple", files); - } - - return this.uploadFiles(files); - } - }, { - key: "_getFilesWithXhr", - value: function _getFilesWithXhr(xhr) { - var files; - return files = this.files.filter(function (file) { - return file.xhr === xhr; - }).map(function (file) { - return file; - }); - } // Cancels the file upload and sets the status to CANCELED - // **if** the file is actually being uploaded. - // If it's still in the queue, the file is being removed from it and the status - // set to CANCELED. - - }, { - key: "cancelUpload", - value: function cancelUpload(file) { - if (file.status === Dropzone.UPLOADING) { - var groupedFiles = this._getFilesWithXhr(file.xhr); - - var _iterator11 = dropzone_createForOfIteratorHelper(groupedFiles, true), - _step11; - - try { - for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) { - var groupedFile = _step11.value; - groupedFile.status = Dropzone.CANCELED; - } - } catch (err) { - _iterator11.e(err); - } finally { - _iterator11.f(); - } - - if (typeof file.xhr !== "undefined") { - file.xhr.abort(); - } - - var _iterator12 = dropzone_createForOfIteratorHelper(groupedFiles, true), - _step12; - - try { - for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) { - var _groupedFile = _step12.value; - this.emit("canceled", _groupedFile); - } - } catch (err) { - _iterator12.e(err); - } finally { - _iterator12.f(); - } - - if (this.options.uploadMultiple) { - this.emit("canceledmultiple", groupedFiles); - } - } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) { - file.status = Dropzone.CANCELED; - this.emit("canceled", file); - - if (this.options.uploadMultiple) { - this.emit("canceledmultiple", [file]); - } - } - - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - } - }, { - key: "resolveOption", - value: function resolveOption(option) { - if (typeof option === "function") { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - return option.apply(this, args); - } - - return option; - } - }, { - key: "uploadFile", - value: function uploadFile(file) { - return this.uploadFiles([file]); - } - }, { - key: "uploadFiles", - value: function uploadFiles(files) { - var _this14 = this; - - this._transformFiles(files, function (transformedFiles) { - if (_this14.options.chunking) { - // Chunking is not allowed to be used with `uploadMultiple` so we know - // that there is only __one__file. - var transformedFile = transformedFiles[0]; - files[0].upload.chunked = _this14.options.chunking && (_this14.options.forceChunking || transformedFile.size > _this14.options.chunkSize); - files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / _this14.options.chunkSize); - } - - if (files[0].upload.chunked) { - // This file should be sent in chunks! - // If the chunking option is set, we **know** that there can only be **one** file, since - // uploadMultiple is not allowed with this option. - var file = files[0]; - var _transformedFile = transformedFiles[0]; - var startedChunkCount = 0; - file.upload.chunks = []; - - var handleNextChunk = function handleNextChunk() { - var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet. - - while (file.upload.chunks[chunkIndex] !== undefined) { - chunkIndex++; - } // This means, that all chunks have already been started. - - - if (chunkIndex >= file.upload.totalChunkCount) return; - startedChunkCount++; - var start = chunkIndex * _this14.options.chunkSize; - var end = Math.min(start + _this14.options.chunkSize, _transformedFile.size); - var dataBlock = { - name: _this14._getParamName(0), - data: _transformedFile.webkitSlice ? _transformedFile.webkitSlice(start, end) : _transformedFile.slice(start, end), - filename: file.upload.filename, - chunkIndex: chunkIndex - }; - file.upload.chunks[chunkIndex] = { - file: file, - index: chunkIndex, - dataBlock: dataBlock, - // In case we want to retry. - status: Dropzone.UPLOADING, - progress: 0, - retries: 0 // The number of times this block has been retried. - - }; - - _this14._uploadData(files, [dataBlock]); - }; - - file.upload.finishedChunkUpload = function (chunk, response) { - var allFinished = true; - chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk - - chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers - - chunk.xhr = null; - - for (var i = 0; i < file.upload.totalChunkCount; i++) { - if (file.upload.chunks[i] === undefined) { - return handleNextChunk(); - } - - if (file.upload.chunks[i].status !== Dropzone.SUCCESS) { - allFinished = false; - } - } - - if (allFinished) { - _this14.options.chunksUploaded(file, function () { - _this14._finished(files, response, null); - }); - } - }; - - if (_this14.options.parallelChunkUploads) { - for (var i = 0; i < file.upload.totalChunkCount; i++) { - handleNextChunk(); - } - } else { - handleNextChunk(); - } - } else { - var dataBlocks = []; - - for (var _i2 = 0; _i2 < files.length; _i2++) { - dataBlocks[_i2] = { - name: _this14._getParamName(_i2), - data: transformedFiles[_i2], - filename: files[_i2].upload.filename - }; - } - - _this14._uploadData(files, dataBlocks); - } - }); - } /// Returns the right chunk for given file and xhr - - }, { - key: "_getChunk", - value: function _getChunk(file, xhr) { - for (var i = 0; i < file.upload.totalChunkCount; i++) { - if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) { - return file.upload.chunks[i]; - } - } - } // This function actually uploads the file(s) to the server. - // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed - // files, or individual chunks for chunked upload). - - }, { - key: "_uploadData", - value: function _uploadData(files, dataBlocks) { - var _this15 = this; - - var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later. - - var _iterator13 = dropzone_createForOfIteratorHelper(files, true), - _step13; - - try { - for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) { - var file = _step13.value; - file.xhr = xhr; - } - } catch (err) { - _iterator13.e(err); - } finally { - _iterator13.f(); - } - - if (files[0].upload.chunked) { - // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk - files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr; - } - - var method = this.resolveOption(this.options.method, files); - var url = this.resolveOption(this.options.url, files); - xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8 - - var timeout = this.resolveOption(this.options.timeout, files); - if (timeout) xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179 - - xhr.withCredentials = !!this.options.withCredentials; - - xhr.onload = function (e) { - _this15._finishedUploading(files, xhr, e); - }; - - xhr.ontimeout = function () { - _this15._handleUploadError(files, xhr, "Request timedout after ".concat(_this15.options.timeout / 1000, " seconds")); - }; - - xhr.onerror = function () { - _this15._handleUploadError(files, xhr); - }; // Some browsers do not have the .upload property - - - var progressObj = xhr.upload != null ? xhr.upload : xhr; - - progressObj.onprogress = function (e) { - return _this15._updateFilesUploadProgress(files, xhr, e); - }; - - var headers = { - Accept: "application/json", - "Cache-Control": "no-cache", - "X-Requested-With": "XMLHttpRequest" - }; - - if (this.options.headers) { - Dropzone.extend(headers, this.options.headers); - } - - for (var headerName in headers) { - var headerValue = headers[headerName]; - - if (headerValue) { - xhr.setRequestHeader(headerName, headerValue); - } - } - - var formData = new FormData(); // Adding all @options parameters - - if (this.options.params) { - var additionalParams = this.options.params; - - if (typeof additionalParams === "function") { - additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null); - } - - for (var key in additionalParams) { - var value = additionalParams[key]; - - if (Array.isArray(value)) { - // The additional parameter contains an array, - // so lets iterate over it to attach each value - // individually. - for (var i = 0; i < value.length; i++) { - formData.append(key, value[i]); - } - } else { - formData.append(key, value); - } - } - } // Let the user add additional data if necessary - - - var _iterator14 = dropzone_createForOfIteratorHelper(files, true), - _step14; - - try { - for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) { - var _file = _step14.value; - this.emit("sending", _file, xhr, formData); - } - } catch (err) { - _iterator14.e(err); - } finally { - _iterator14.f(); - } - - if (this.options.uploadMultiple) { - this.emit("sendingmultiple", files, xhr, formData); - } - - this._addFormElementData(formData); // Finally add the files - // Has to be last because some servers (eg: S3) expect the file to be the last parameter - - - for (var _i3 = 0; _i3 < dataBlocks.length; _i3++) { - var dataBlock = dataBlocks[_i3]; - formData.append(dataBlock.name, dataBlock.data, dataBlock.filename); - } - - this.submitRequest(xhr, formData, files); - } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done. - - }, { - key: "_transformFiles", - value: function _transformFiles(files, done) { - var _this16 = this; - - var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library. - - var doneCounter = 0; - - var _loop = function _loop(i) { - _this16.options.transformFile.call(_this16, files[i], function (transformedFile) { - transformedFiles[i] = transformedFile; - - if (++doneCounter === files.length) { - done(transformedFiles); - } - }); - }; - - for (var i = 0; i < files.length; i++) { - _loop(i); - } - } // Takes care of adding other input elements of the form to the AJAX request - - }, { - key: "_addFormElementData", - value: function _addFormElementData(formData) { - // Take care of other input elements - if (this.element.tagName === "FORM") { - var _iterator15 = dropzone_createForOfIteratorHelper(this.element.querySelectorAll("input, textarea, select, button"), true), - _step15; - - try { - for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) { - var input = _step15.value; - var inputName = input.getAttribute("name"); - var inputType = input.getAttribute("type"); - if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it. - - if (typeof inputName === "undefined" || inputName === null) continue; - - if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { - // Possibly multiple values - var _iterator16 = dropzone_createForOfIteratorHelper(input.options, true), - _step16; - - try { - for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) { - var option = _step16.value; - - if (option.selected) { - formData.append(inputName, option.value); - } - } - } catch (err) { - _iterator16.e(err); - } finally { - _iterator16.f(); - } - } else if (!inputType || inputType !== "checkbox" && inputType !== "radio" || input.checked) { - formData.append(inputName, input.value); - } - } - } catch (err) { - _iterator15.e(err); - } finally { - _iterator15.f(); - } - } - } // Invoked when there is new progress information about given files. - // If e is not provided, it is assumed that the upload is finished. - - }, { - key: "_updateFilesUploadProgress", - value: function _updateFilesUploadProgress(files, xhr, e) { - if (!files[0].upload.chunked) { - // Handle file uploads without chunking - var _iterator17 = dropzone_createForOfIteratorHelper(files, true), - _step17; - - try { - for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) { - var file = _step17.value; - - if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) { - // If both, the `total` and `bytesSent` have already been set, and - // they are equal (meaning progress is at 100%), we can skip this - // file, since an upload progress shouldn't go down. - continue; - } - - if (e) { - file.upload.progress = 100 * e.loaded / e.total; - file.upload.total = e.total; - file.upload.bytesSent = e.loaded; - } else { - // No event, so we're at 100% - file.upload.progress = 100; - file.upload.bytesSent = file.upload.total; - } - - this.emit("uploadprogress", file, file.upload.progress, file.upload.bytesSent); - } - } catch (err) { - _iterator17.e(err); - } finally { - _iterator17.f(); - } - } else { - // Handle chunked file uploads - // Chunked upload is not compatible with uploading multiple files in one - // request, so we know there's only one file. - var _file2 = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk - // progress. - - var chunk = this._getChunk(_file2, xhr); - - if (e) { - chunk.progress = 100 * e.loaded / e.total; - chunk.total = e.total; - chunk.bytesSent = e.loaded; - } else { - // No event, so we're at 100% - chunk.progress = 100; - chunk.bytesSent = chunk.total; - } // Now tally the *file* upload progress from its individual chunks - - - _file2.upload.progress = 0; - _file2.upload.total = 0; - _file2.upload.bytesSent = 0; - - for (var i = 0; i < _file2.upload.totalChunkCount; i++) { - if (_file2.upload.chunks[i] && typeof _file2.upload.chunks[i].progress !== "undefined") { - _file2.upload.progress += _file2.upload.chunks[i].progress; - _file2.upload.total += _file2.upload.chunks[i].total; - _file2.upload.bytesSent += _file2.upload.chunks[i].bytesSent; - } - } // Since the process is a percentage, we need to divide by the amount of - // chunks we've used. - - - _file2.upload.progress = _file2.upload.progress / _file2.upload.totalChunkCount; - this.emit("uploadprogress", _file2, _file2.upload.progress, _file2.upload.bytesSent); - } - } - }, { - key: "_finishedUploading", - value: function _finishedUploading(files, xhr, e) { - var response; - - if (files[0].status === Dropzone.CANCELED) { - return; - } - - if (xhr.readyState !== 4) { - return; - } - - if (xhr.responseType !== "arraybuffer" && xhr.responseType !== "blob") { - response = xhr.responseText; - - if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { - try { - response = JSON.parse(response); - } catch (error) { - e = error; - response = "Invalid JSON response from server."; - } - } - } - - this._updateFilesUploadProgress(files, xhr); - - if (!(200 <= xhr.status && xhr.status < 300)) { - this._handleUploadError(files, xhr, response); - } else { - if (files[0].upload.chunked) { - files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr), response); - } else { - this._finished(files, response, e); - } - } - } - }, { - key: "_handleUploadError", - value: function _handleUploadError(files, xhr, response) { - if (files[0].status === Dropzone.CANCELED) { - return; - } - - if (files[0].upload.chunked && this.options.retryChunks) { - var chunk = this._getChunk(files[0], xhr); - - if (chunk.retries++ < this.options.retryChunksLimit) { - this._uploadData(files, [chunk.dataBlock]); - - return; - } else { - console.warn("Retried this chunk too often. Giving up."); - } - } - - this._errorProcessing(files, response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr); - } - }, { - key: "submitRequest", - value: function submitRequest(xhr, formData, files) { - if (xhr.readyState != 1) { - console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED."); - return; - } - - xhr.send(formData); - } // Called internally when processing is finished. - // Individual callbacks have to be called in the appropriate sections. - - }, { - key: "_finished", - value: function _finished(files, responseText, e) { - var _iterator18 = dropzone_createForOfIteratorHelper(files, true), - _step18; - - try { - for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) { - var file = _step18.value; - file.status = Dropzone.SUCCESS; - this.emit("success", file, responseText, e); - this.emit("complete", file); - } - } catch (err) { - _iterator18.e(err); - } finally { - _iterator18.f(); - } - - if (this.options.uploadMultiple) { - this.emit("successmultiple", files, responseText, e); - this.emit("completemultiple", files); - } - - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - } // Called internally when processing is finished. - // Individual callbacks have to be called in the appropriate sections. - - }, { - key: "_errorProcessing", - value: function _errorProcessing(files, message, xhr) { - var _iterator19 = dropzone_createForOfIteratorHelper(files, true), - _step19; - - try { - for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) { - var file = _step19.value; - file.status = Dropzone.ERROR; - this.emit("error", file, message, xhr); - this.emit("complete", file); - } - } catch (err) { - _iterator19.e(err); - } finally { - _iterator19.f(); - } - - if (this.options.uploadMultiple) { - this.emit("errormultiple", files, message, xhr); - this.emit("completemultiple", files); - } - - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - } - }], [{ - key: "initClass", - value: function initClass() { - // Exposing the emitter class, mainly for tests - this.prototype.Emitter = Emitter; - /* - This is a list of all available events you can register on a dropzone object. - You can register an event handler like this: - dropzone.on("dragEnter", function() { }); - */ - - this.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"]; - this.prototype._thumbnailQueue = []; - this.prototype._processingThumbnail = false; - } // global utility - - }, { - key: "extend", - value: function extend(target) { - for (var _len2 = arguments.length, objects = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - objects[_key2 - 1] = arguments[_key2]; - } - - for (var _i4 = 0, _objects = objects; _i4 < _objects.length; _i4++) { - var object = _objects[_i4]; - - for (var key in object) { - var val = object[key]; - target[key] = val; - } - } - - return target; - } - }, { - key: "uuidv4", - value: function uuidv4() { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, - v = c === "x" ? r : r & 0x3 | 0x8; - return v.toString(16); - }); - } - }]); - - return Dropzone; -}(Emitter); - - -Dropzone.initClass(); -Dropzone.version = "5.9.3"; // This is a map of options for your different dropzones. Add configurations -// to this object for your different dropzone elemens. -// -// Example: -// -// Dropzone.options.myDropzoneElementId = { maxFilesize: 1 }; -// -// To disable autoDiscover for a specific element, you can set `false` as an option: -// -// Dropzone.options.myDisabledElementId = false; -// -// And in html: -// -//
- -Dropzone.options = {}; // Returns the options for an element or undefined if none available. - -Dropzone.optionsForElement = function (element) { - // Get the `Dropzone.options.elementId` for this element if it exists - if (element.getAttribute("id")) { - return Dropzone.options[camelize(element.getAttribute("id"))]; - } else { - return undefined; - } -}; // Holds a list of all dropzone instances - - -Dropzone.instances = []; // Returns the dropzone for given element if any - -Dropzone.forElement = function (element) { - if (typeof element === "string") { - element = document.querySelector(element); - } - - if ((element != null ? element.dropzone : undefined) == null) { - throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); - } - - return element.dropzone; -}; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements. - - -Dropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them - -Dropzone.discover = function () { - var dropzones; - - if (document.querySelectorAll) { - dropzones = document.querySelectorAll(".dropzone"); - } else { - dropzones = []; // IE :( - - var checkElements = function checkElements(elements) { - return function () { - var result = []; - - var _iterator20 = dropzone_createForOfIteratorHelper(elements, true), - _step20; - - try { - for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) { - var el = _step20.value; - - if (/(^| )dropzone($| )/.test(el.className)) { - result.push(dropzones.push(el)); - } else { - result.push(undefined); - } - } - } catch (err) { - _iterator20.e(err); - } finally { - _iterator20.f(); - } - - return result; - }(); - }; - - checkElements(document.getElementsByTagName("div")); - checkElements(document.getElementsByTagName("form")); - } - - return function () { - var result = []; - - var _iterator21 = dropzone_createForOfIteratorHelper(dropzones, true), - _step21; - - try { - for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) { - var dropzone = _step21.value; - - // Create a dropzone unless auto discover has been disabled for specific element - if (Dropzone.optionsForElement(dropzone) !== false) { - result.push(new Dropzone(dropzone)); - } else { - result.push(undefined); - } - } - } catch (err) { - _iterator21.e(err); - } finally { - _iterator21.f(); - } - - return result; - }(); -}; // Some browsers support drag and drog functionality, but not correctly. -// -// So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know. -// But what to do when browsers *theoretically* support an API, but crash -// when using it. -// -// This is a list of regular expressions tested against navigator.userAgent -// -// ** It should only be used on browser that *do* support the API, but -// incorrectly ** - - -Dropzone.blockedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API. -/opera.*(Macintosh|Windows Phone).*version\/12/i]; // Checks if the browser is supported - -Dropzone.isBrowserSupported = function () { - var capableBrowser = true; - - if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { - if (!("classList" in document.createElement("a"))) { - capableBrowser = false; - } else { - if (Dropzone.blacklistedBrowsers !== undefined) { - // Since this has been renamed, this makes sure we don't break older - // configuration. - Dropzone.blockedBrowsers = Dropzone.blacklistedBrowsers; - } // The browser supports the API, but may be blocked. - - - var _iterator22 = dropzone_createForOfIteratorHelper(Dropzone.blockedBrowsers, true), - _step22; - - try { - for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) { - var regex = _step22.value; - - if (regex.test(navigator.userAgent)) { - capableBrowser = false; - continue; - } - } - } catch (err) { - _iterator22.e(err); - } finally { - _iterator22.f(); - } - } - } else { - capableBrowser = false; - } - - return capableBrowser; -}; - -Dropzone.dataURItoBlob = function (dataURI) { - // convert base64 to raw binary data held in a string - // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this - var byteString = atob(dataURI.split(",")[1]); // separate out the mime component - - var mimeString = dataURI.split(",")[0].split(":")[1].split(";")[0]; // write the bytes of the string to an ArrayBuffer - - var ab = new ArrayBuffer(byteString.length); - var ia = new Uint8Array(ab); - - for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) { - ia[i] = byteString.charCodeAt(i); - } // write the ArrayBuffer to a blob - - - return new Blob([ab], { - type: mimeString - }); -}; // Returns an array without the rejected item - - -var without = function without(list, rejectedItem) { - return list.filter(function (item) { - return item !== rejectedItem; - }).map(function (item) { - return item; - }); -}; // abc-def_ghi -> abcDefGhi - - -var camelize = function camelize(str) { - return str.replace(/[\-_](\w)/g, function (match) { - return match.charAt(1).toUpperCase(); - }); -}; // Creates an element from string - - -Dropzone.createElement = function (string) { - var div = document.createElement("div"); - div.innerHTML = string; - return div.childNodes[0]; -}; // Tests if given element is inside (or simply is) the container - - -Dropzone.elementInside = function (element, container) { - if (element === container) { - return true; - } // Coffeescript doesn't support do/while loops - - - while (element = element.parentNode) { - if (element === container) { - return true; - } - } - - return false; -}; - -Dropzone.getElement = function (el, name) { - var element; - - if (typeof el === "string") { - element = document.querySelector(el); - } else if (el.nodeType != null) { - element = el; - } - - if (element == null) { - throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector or a plain HTML element.")); - } - - return element; -}; - -Dropzone.getElements = function (els, name) { - var el, elements; - - if (els instanceof Array) { - elements = []; - - try { - var _iterator23 = dropzone_createForOfIteratorHelper(els, true), - _step23; - - try { - for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) { - el = _step23.value; - elements.push(this.getElement(el, name)); - } - } catch (err) { - _iterator23.e(err); - } finally { - _iterator23.f(); - } - } catch (e) { - elements = null; - } - } else if (typeof els === "string") { - elements = []; - - var _iterator24 = dropzone_createForOfIteratorHelper(document.querySelectorAll(els), true), - _step24; - - try { - for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) { - el = _step24.value; - elements.push(el); - } - } catch (err) { - _iterator24.e(err); - } finally { - _iterator24.f(); - } - } else if (els.nodeType != null) { - elements = [els]; - } - - if (elements == null || !elements.length) { - throw new Error("Invalid `".concat(name, "` option provided. Please provide a CSS selector, a plain HTML element or a list of those.")); - } - - return elements; -}; // Asks the user the question and calls accepted or rejected accordingly -// -// The default implementation just uses `window.confirm` and then calls the -// appropriate callback. - - -Dropzone.confirm = function (question, accepted, rejected) { - if (window.confirm(question)) { - return accepted(); - } else if (rejected != null) { - return rejected(); - } -}; // Validates the mime type like this: -// -// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept - - -Dropzone.isValidFile = function (file, acceptedFiles) { - if (!acceptedFiles) { - return true; - } // If there are no accepted mime types, it's OK - - - acceptedFiles = acceptedFiles.split(","); - var mimeType = file.type; - var baseMimeType = mimeType.replace(/\/.*$/, ""); - - var _iterator25 = dropzone_createForOfIteratorHelper(acceptedFiles, true), - _step25; - - try { - for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) { - var validType = _step25.value; - validType = validType.trim(); - - if (validType.charAt(0) === ".") { - if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { - return true; - } - } else if (/\/\*$/.test(validType)) { - // This is something like a image/* mime type - if (baseMimeType === validType.replace(/\/.*$/, "")) { - return true; - } - } else { - if (mimeType === validType) { - return true; - } - } - } - } catch (err) { - _iterator25.e(err); - } finally { - _iterator25.f(); - } - - return false; -}; // Augment jQuery - - -if (typeof jQuery !== "undefined" && jQuery !== null) { - jQuery.fn.dropzone = function (options) { - return this.each(function () { - return new Dropzone(this, options); - }); - }; -} // Dropzone file status codes - - -Dropzone.ADDED = "added"; -Dropzone.QUEUED = "queued"; // For backwards compatibility. Now, if a file is accepted, it's either queued -// or uploading. - -Dropzone.ACCEPTED = Dropzone.QUEUED; -Dropzone.UPLOADING = "uploading"; -Dropzone.PROCESSING = Dropzone.UPLOADING; // alias - -Dropzone.CANCELED = "canceled"; -Dropzone.ERROR = "error"; -Dropzone.SUCCESS = "success"; -/* - - Bugfix for iOS 6 and 7 - Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios - based on the work of https://github.com/stomita/ios-imagefile-megapixel - - */ -// Detecting vertical squash in loaded image. -// Fixes a bug which squash image vertically while drawing into canvas for some images. -// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel - -var detectVerticalSquash = function detectVerticalSquash(img) { - var iw = img.naturalWidth; - var ih = img.naturalHeight; - var canvas = document.createElement("canvas"); - canvas.width = 1; - canvas.height = ih; - var ctx = canvas.getContext("2d"); - ctx.drawImage(img, 0, 0); - - var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih), - data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically. - - - var sy = 0; - var ey = ih; - var py = ih; - - while (py > sy) { - var alpha = data[(py - 1) * 4 + 3]; - - if (alpha === 0) { - ey = py; - } else { - sy = py; - } - - py = ey + sy >> 1; - } - - var ratio = py / ih; - - if (ratio === 0) { - return 1; - } else { - return ratio; - } -}; // A replacement for context.drawImage -// (args are for source and destination). - - -var drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { - var vertSquashRatio = detectVerticalSquash(img); - return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); -}; // Based on MinifyJpeg -// Source: http://www.perry.cz/files/ExifRestorer.js -// http://elicon.blog57.fc2.com/blog-entry-206.html - - -var ExifRestore = /*#__PURE__*/function () { - function ExifRestore() { - dropzone_classCallCheck(this, ExifRestore); - } - - dropzone_createClass(ExifRestore, null, [{ - key: "initClass", - value: function initClass() { - this.KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - } - }, { - key: "encode64", - value: function encode64(input) { - var output = ""; - var chr1 = undefined; - var chr2 = undefined; - var chr3 = ""; - var enc1 = undefined; - var enc2 = undefined; - var enc3 = undefined; - var enc4 = ""; - var i = 0; - - while (true) { - chr1 = input[i++]; - chr2 = input[i++]; - chr3 = input[i++]; - enc1 = chr1 >> 2; - enc2 = (chr1 & 3) << 4 | chr2 >> 4; - enc3 = (chr2 & 15) << 2 | chr3 >> 6; - enc4 = chr3 & 63; - - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - - output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4); - chr1 = chr2 = chr3 = ""; - enc1 = enc2 = enc3 = enc4 = ""; - - if (!(i < input.length)) { - break; - } - } - - return output; - } - }, { - key: "restore", - value: function restore(origFileBase64, resizedFileBase64) { - if (!origFileBase64.match("data:image/jpeg;base64,")) { - return resizedFileBase64; - } - - var rawImage = this.decode64(origFileBase64.replace("data:image/jpeg;base64,", "")); - var segments = this.slice2Segments(rawImage); - var image = this.exifManipulation(resizedFileBase64, segments); - return "data:image/jpeg;base64,".concat(this.encode64(image)); - } - }, { - key: "exifManipulation", - value: function exifManipulation(resizedFileBase64, segments) { - var exifArray = this.getExifArray(segments); - var newImageArray = this.insertExif(resizedFileBase64, exifArray); - var aBuffer = new Uint8Array(newImageArray); - return aBuffer; - } - }, { - key: "getExifArray", - value: function getExifArray(segments) { - var seg = undefined; - var x = 0; - - while (x < segments.length) { - seg = segments[x]; - - if (seg[0] === 255 & seg[1] === 225) { - return seg; - } - - x++; - } - - return []; - } - }, { - key: "insertExif", - value: function insertExif(resizedFileBase64, exifArray) { - var imageData = resizedFileBase64.replace("data:image/jpeg;base64,", ""); - var buf = this.decode64(imageData); - var separatePoint = buf.indexOf(255, 3); - var mae = buf.slice(0, separatePoint); - var ato = buf.slice(separatePoint); - var array = mae; - array = array.concat(exifArray); - array = array.concat(ato); - return array; - } - }, { - key: "slice2Segments", - value: function slice2Segments(rawImageArray) { - var head = 0; - var segments = []; - - while (true) { - var length; - - if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) { - break; - } - - if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) { - head += 2; - } else { - length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3]; - var endPoint = head + length + 2; - var seg = rawImageArray.slice(head, endPoint); - segments.push(seg); - head = endPoint; - } - - if (head > rawImageArray.length) { - break; - } - } - - return segments; - } - }, { - key: "decode64", - value: function decode64(input) { - var output = ""; - var chr1 = undefined; - var chr2 = undefined; - var chr3 = ""; - var enc1 = undefined; - var enc2 = undefined; - var enc3 = undefined; - var enc4 = ""; - var i = 0; - var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or = - - var base64test = /[^A-Za-z0-9\+\/\=]/g; - - if (base64test.exec(input)) { - console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."); - } - - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - - while (true) { - enc1 = this.KEY_STR.indexOf(input.charAt(i++)); - enc2 = this.KEY_STR.indexOf(input.charAt(i++)); - enc3 = this.KEY_STR.indexOf(input.charAt(i++)); - enc4 = this.KEY_STR.indexOf(input.charAt(i++)); - chr1 = enc1 << 2 | enc2 >> 4; - chr2 = (enc2 & 15) << 4 | enc3 >> 2; - chr3 = (enc3 & 3) << 6 | enc4; - buf.push(chr1); - - if (enc3 !== 64) { - buf.push(chr2); - } - - if (enc4 !== 64) { - buf.push(chr3); - } - - chr1 = chr2 = chr3 = ""; - enc1 = enc2 = enc3 = enc4 = ""; - - if (!(i < input.length)) { - break; - } - } - - return buf; - } - }]); - - return ExifRestore; -}(); - -ExifRestore.initClass(); -/* - * contentloaded.js - * - * Author: Diego Perini (diego.perini at gmail.com) - * Summary: cross-browser wrapper for DOMContentLoaded - * Updated: 20101020 - * License: MIT - * Version: 1.2 - * - * URL: - * http://javascript.nwbox.com/ContentLoaded/ - * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE - */ -// @win window reference -// @fn function reference - -var contentLoaded = function contentLoaded(win, fn) { - var done = false; - var top = true; - var doc = win.document; - var root = doc.documentElement; - var add = doc.addEventListener ? "addEventListener" : "attachEvent"; - var rem = doc.addEventListener ? "removeEventListener" : "detachEvent"; - var pre = doc.addEventListener ? "" : "on"; - - var init = function init(e) { - if (e.type === "readystatechange" && doc.readyState !== "complete") { - return; - } - - (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); - - if (!done && (done = true)) { - return fn.call(win, e.type || e); - } - }; - - var poll = function poll() { - try { - root.doScroll("left"); - } catch (e) { - setTimeout(poll, 50); - return; - } - - return init("poll"); - }; - - if (doc.readyState !== "complete") { - if (doc.createEventObject && root.doScroll) { - try { - top = !win.frameElement; - } catch (error) {} - - if (top) { - poll(); - } - } - - doc[add](pre + "DOMContentLoaded", init, false); - doc[add](pre + "readystatechange", init, false); - return win[add](pre + "load", init, false); - } -}; // As a single function to be able to write tests. - - -Dropzone._autoDiscoverFunction = function () { - if (Dropzone.autoDiscover) { - return Dropzone.discover(); - } -}; - -contentLoaded(window, Dropzone._autoDiscoverFunction); - -function __guard__(value, transform) { - return typeof value !== "undefined" && value !== null ? transform(value) : undefined; -} - -function __guardMethod__(obj, methodName, transform) { - if (typeof obj !== "undefined" && obj !== null && typeof obj[methodName] === "function") { - return transform(obj, methodName); - } else { - return undefined; - } -} - - -;// CONCATENATED MODULE: ./tool/dropzone.dist.js - /// Make Dropzone a global variable. - -window.Dropzone = Dropzone; -/* harmony default export */ var dropzone_dist = (Dropzone); - -}(); -/******/ return __webpack_exports__; -/******/ })() -; -}); \ No newline at end of file diff --git a/enferno/static/js/dropzone/dropzone.min.css b/enferno/static/js/dropzone/dropzone.min.css new file mode 100644 index 000000000..19a8ad27b --- /dev/null +++ b/enferno/static/js/dropzone/dropzone.min.css @@ -0,0 +1,8 @@ +/** + * Minified by jsDelivr using clean-css v5.3.3. + * Original file: /npm/dropzone@5.9.3/dist/dropzone.css + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-moz-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,.3);background:#fff;padding:20px 20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-message .dz-button{background:0 0;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(to bottom,#eee,#ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:#fff}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-ms-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,.8);background-color:rgba(255,255,255,.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,.4);padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05,1.05);-moz-transform:scale(1.05,1.05);-ms-transform:scale(1.05,1.05);-o-transform:scale(1.05,1.05);transform:scale(1.05,1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(.77,0,.175,1);-moz-animation:passing-through 3s cubic-bezier(.77,0,.175,1);-ms-animation:passing-through 3s cubic-bezier(0.77,0,0.175,1);-o-animation:passing-through 3s cubic-bezier(.77,0,.175,1);animation:passing-through 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(.77,0,.175,1);-moz-animation:slide-in 3s cubic-bezier(.77,0,.175,1);-ms-animation:slide-in 3s cubic-bezier(0.77,0,0.175,1);-o-animation:slide-in 3s cubic-bezier(.77,0,.175,1);animation:slide-in 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-error-mark svg,.dropzone .dz-preview .dz-success-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all .2s linear;-moz-transition:all .2s linear;-ms-transition:all .2s linear;-o-transition:all .2s linear;transition:all .2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity .4s ease-in;-moz-transition:opacity .4s ease-in;-ms-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;-moz-animation:pulse 6s ease infinite;-ms-animation:pulse 6s ease infinite;-o-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:rgba(255,255,255,.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:linear-gradient(to bottom,#666,#444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width .3s ease-in-out;-moz-transition:width .3s ease-in-out;-ms-transition:width .3s ease-in-out;-o-transition:width .3s ease-in-out;transition:width .3s ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity .3s ease;-moz-transition:opacity .3s ease;-ms-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:linear-gradient(to bottom,#be2626,#a92222);padding:.5em 1.2em;color:#fff}.dropzone .dz-preview .dz-error-message:after{content:"";position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626} +/*# sourceMappingURL=/sm/28a9a97dadc66a23c9341320eb87d3c6d46e69bf8d35ec4596427e03b98d3d87.map */ \ No newline at end of file diff --git a/enferno/static/js/dropzone/dropzone.min.js b/enferno/static/js/dropzone/dropzone.min.js new file mode 100644 index 000000000..d8cee356a --- /dev/null +++ b/enferno/static/js/dropzone/dropzone.min.js @@ -0,0 +1,2 @@ +// https://cdn.jsdelivr.net/npm/dropzone@5.9.3/dist/min/dropzone.min.js +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={3099:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:function(e,t,n){var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),u=Array.prototype;null==u[a]&&o.f(u,a,{configurable:!0,value:i(null)}),e.exports=function(e){u[a][e]=!0}},1530:function(e,t,n){"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:function(e){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},4019:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:function(e,t,n){"use strict";var r,i=n(4019),o=n(9781),a=n(7854),u=n(111),s=n(6656),l=n(648),c=n(8880),f=n(1320),p=n(3070).f,h=n(9518),d=n(7674),v=n(5112),y=n(9711),g=a.Int8Array,m=g&&g.prototype,b=a.Uint8ClampedArray,x=b&&b.prototype,w=g&&h(g),E=m&&h(m),k=Object.prototype,A=k.isPrototypeOf,S=v("toStringTag"),F=y("TYPED_ARRAY_TAG"),T=i&&!!d&&"Opera"!==l(a.opera),C=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R={BigInt64Array:8,BigUint64Array:8},I=function(e){if(!u(e))return!1;var t=l(e);return s(L,t)||s(R,t)};for(r in L)a[r]||(T=!1);if((!T||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},T))for(r in L)a[r]&&d(a[r],w);if((!T||!E||E===k)&&(E=w.prototype,T))for(r in L)a[r]&&d(a[r].prototype,E);if(T&&h(x)!==E&&d(x,E),o&&!s(E,S))for(r in C=!0,p(E,S,{get:function(){return u(this)?this[F]:void 0}}),L)a[r]&&c(a[r],F,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:T,TYPED_ARRAY_TAG:C&&F,aTypedArray:function(e){if(I(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(d){if(A.call(w,e))return e}else for(var t in L)if(s(L,r)){var n=a[t];if(n&&(e===n||A.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(o){if(n)for(var r in L){var i=a[r];i&&s(i.prototype,e)&&delete i.prototype[e]}E[e]&&!n||f(E,e,n?t:T&&m[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(o){if(d){if(n)for(r in L)(i=a[r])&&s(i,e)&&delete i[e];if(w[e]&&!n)return;try{return f(w,e,n?t:T&&g[e]||t)}catch(e){}}for(r in L)!(i=a[r])||i[e]&&!n||f(i,e,t)}},isView:function(e){if(!u(e))return!1;var t=l(e);return"DataView"===t||s(L,t)||s(R,t)},isTypedArray:I,TypedArray:w,TypedArrayPrototype:E}},3331:function(e,t,n){"use strict";var r=n(7854),i=n(9781),o=n(4019),a=n(8880),u=n(2248),s=n(7293),l=n(5787),c=n(9958),f=n(7466),p=n(7067),h=n(1179),d=n(9518),v=n(7674),y=n(8006).f,g=n(3070).f,m=n(1285),b=n(8003),x=n(9909),w=x.get,E=x.set,k="ArrayBuffer",A="DataView",S="Wrong index",F=r.ArrayBuffer,T=F,C=r.DataView,L=C&&C.prototype,R=Object.prototype,I=r.RangeError,U=h.pack,O=h.unpack,_=function(e){return[255&e]},M=function(e){return[255&e,e>>8&255]},z=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},P=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},j=function(e){return U(e,23,4)},D=function(e){return U(e,52,8)},N=function(e,t){g(e.prototype,t,{get:function(){return w(this)[t]}})},B=function(e,t,n,r){var i=p(n),o=w(e);if(i+t>o.byteLength)throw I(S);var a=w(o.buffer).bytes,u=i+o.byteOffset,s=a.slice(u,u+t);return r?s:s.reverse()},q=function(e,t,n,r,i,o){var a=p(n),u=w(e);if(a+t>u.byteLength)throw I(S);for(var s=w(u.buffer).bytes,l=a+u.byteOffset,c=r(+i),f=0;fG;)(W=Y[G++])in T||a(T,W,F[W]);H.constructor=T}v&&d(L)!==R&&v(L,R);var Q=new C(new T(2)),$=L.setInt8;Q.setInt8(0,2147483648),Q.setInt8(1,2147483649),!Q.getInt8(0)&&Q.getInt8(1)||u(L,{setInt8:function(e,t){$.call(this,e,t<<24>>24)},setUint8:function(e,t){$.call(this,e,t<<24>>24)}},{unsafe:!0})}else T=function(e){l(this,T,k);var t=p(e);E(this,{bytes:m.call(new Array(t),0),byteLength:t}),i||(this.byteLength=t)},C=function(e,t,n){l(this,C,A),l(e,T,A);var r=w(e).byteLength,o=c(t);if(o<0||o>r)throw I("Wrong offset");if(o+(n=void 0===n?r-o:f(n))>r)throw I("Wrong length");E(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},i&&(N(T,"byteLength"),N(C,"buffer"),N(C,"byteLength"),N(C,"byteOffset")),u(C.prototype,{getInt8:function(e){return B(this,1,e)[0]<<24>>24},getUint8:function(e){return B(this,1,e)[0]},getInt16:function(e){var t=B(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=B(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return P(B(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return P(B(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return O(B(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return O(B(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){q(this,1,e,_,t)},setUint8:function(e,t){q(this,1,e,_,t)},setInt16:function(e,t){q(this,2,e,M,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){q(this,2,e,M,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){q(this,4,e,j,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){q(this,8,e,D,t,arguments.length>2?arguments[2]:void 0)}});b(T,k),b(C,A),e.exports={ArrayBuffer:T,DataView:C}},1048:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),u=o(n.length),s=i(e,u),l=i(t,u),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?u:i(c,u))-l,u-s),p=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},1285:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,u=i(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,l=void 0===s?n:i(s,n);l>u;)t[u++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,i=n(9341)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},8457:function(e,t,n){"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),u=n(7466),s=n(6135),l=n(1246);e.exports=function(e){var t,n,c,f,p,h,d=i(e),v="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,m=void 0!==g,b=l(d),x=0;if(m&&(g=r(g,y>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(t=u(d.length));t>x;x++)h=m?g(d[x],x):d[x],s(n,x,h);else for(p=(f=b.call(d)).next,n=new v;!(c=p.call(f)).done;x++)h=m?o(f,g,[c.value,x],!0):c.value,s(n,x,h);return n.length=x,n}},1318:function(e,t,n){var r=n(5656),i=n(7466),o=n(1400),a=function(e){return function(t,n,a){var u,s=r(t),l=i(s.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),i=n(8361),o=n(7908),a=n(7466),u=n(5417),s=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,p=7==e,h=5==e||f;return function(d,v,y,g){for(var m,b,x=o(d),w=i(x),E=r(v,y,3),k=a(w.length),A=0,S=g||u,F=t?S(d,k):n||p?S(d,0):void 0;k>A;A++)if((h||A in w)&&(b=E(m=w[A],A,x),e))if(t)F[A]=b;else if(b)switch(e){case 3:return!0;case 5:return m;case 6:return A;case 2:s.call(F,m)}else switch(e){case 4:return!1;case 7:s.call(F,m)}return f?-1:l||c?c:F}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterOut:l(7)}},6583:function(e,t,n){"use strict";var r=n(5656),i=n(9958),o=n(7466),a=n(9341),u=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf"),f=l||!c;e.exports=f?function(e){if(l)return s.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=u(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:s},1194:function(e,t,n){var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},3671:function(e,t,n){var r=n(3099),i=n(7908),o=n(8361),a=n(7466),u=function(e){return function(t,n,u,s){r(n);var l=i(t),c=o(l),f=a(l.length),p=e?f-1:0,h=e?-1:1;if(u<2)for(;;){if(p in c){s=c[p],p+=h;break}if(p+=h,e?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:f>p;p+=h)p in c&&(s=n(s,c[p],p,l));return s}};e.exports={left:u(!1),right:u(!0)}},5417:function(e,t,n){var r=n(111),i=n(3157),o=n(5112)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},3411:function(e,t,n){var r=n(9670),i=n(9212);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){throw i(e),t}}},7072:function(e,t,n){var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},9920:function(e,t,n){var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),u=a.f,s=o.f,l=0;l=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),u=n(3505),s=n(9920),l=n(4705);e.exports=function(e,t){var n,c,f,p,h,d=e.target,v=e.global,y=e.stat;if(n=v?r:y?r[d]||u(d,{}):(r[d]||{}).prototype)for(c in t){if(p=t[c],f=e.noTargetGet?(h=i(n,c))&&h.value:n[c],!l(v?c:d+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;s(p,f)}(e.sham||f&&f.sham)&&o(p,"sham",!0),a(n,c,p,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:function(e,t,n){"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),a=n(2261),u=n(8880),s=o("species"),l=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),c="$0"==="a".replace(/./,"$0"),f=o("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),h=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var d=o(e),v=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),y=v&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!v||!y||"replace"===e&&(!l||!c||p)||"split"===e&&!h){var g=/./[d],m=n(d,""[e],(function(e,t,n,r,i){return t.exec===a?v&&!i?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=m[0],x=m[1];r(String.prototype,e,b),r(RegExp.prototype,d,2==t?function(e,t){return x.call(e,this,t)}:function(e){return x.call(e,this)})}f&&u(RegExp.prototype[d],"sham",!0)}},9974:function(e,t,n){var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},5005:function(e,t,n){var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},1246:function(e,t,n){var r=n(648),i=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},8554:function(e,t,n){var r=n(9670),i=n(1246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},647:function(e,t,n){var r=n(7908),i=Math.floor,o="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,u=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,s,l,c){var f=n+e.length,p=s.length,h=u;return void 0!==l&&(l=r(l),h=a),o.call(c,h,(function(r,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":a=l[o.slice(1,-1)];break;default:var u=+o;if(0===u)return r;if(u>p){var c=i(u/10);return 0===c?r:c<=p?void 0===s[c-1]?o.charAt(1):s[c-1]+o.charAt(1):r}a=s[u-1]}return void 0===a?"":a}))}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},3501:function(e){e.exports={}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1179:function(e){var t=Math.abs,n=Math.pow,r=Math.floor,i=Math.log,o=Math.LN2;e.exports={pack:function(e,a,u){var s,l,c,f=new Array(u),p=8*u-a-1,h=(1<>1,v=23===a?n(2,-24)-n(2,-77):0,y=e<0||0===e&&1/e<0?1:0,g=0;for((e=t(e))!=e||e===1/0?(l=e!=e?1:0,s=h):(s=r(i(e)/o),e*(c=n(2,-s))<1&&(s--,c*=2),(e+=s+d>=1?v/c:v*n(2,1-d))*c>=2&&(s++,c/=2),s+d>=h?(l=0,s=h):s+d>=1?(l=(e*c-1)*n(2,a),s+=d):(l=e*n(2,d-1)*n(2,a),s=0));a>=8;f[g++]=255&l,l/=256,a-=8);for(s=s<0;f[g++]=255&s,s/=256,p-=8);return f[--g]|=128*y,f},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,a=(1<>1,s=o-7,l=i-1,c=e[l--],f=127&c;for(c>>=7;s>0;f=256*f+e[l],l--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===f)f=1-u;else{if(f===a)return r?NaN:c?-1/0:1/0;r+=n(2,t),f-=u}return(c?-1:1)*r*n(2,f-t)}}},8361:function(e,t,n){var r=n(7293),i=n(4326),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},9587:function(e,t,n){var r=n(111),i=n(7674);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},2788:function(e,t,n){var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:function(e,t,n){var r,i,o,a=n(8536),u=n(7854),s=n(111),l=n(8880),c=n(6656),f=n(5465),p=n(6200),h=n(3501),d=u.WeakMap;if(a){var v=f.state||(f.state=new d),y=v.get,g=v.has,m=v.set;r=function(e,t){return t.facade=e,m.call(v,e,t),t},i=function(e){return y.call(v,e)||{}},o=function(e){return g.call(v,e)}}else{var b=p("state");h[b]=!0,r=function(e,t){return t.facade=e,l(e,b,t),t},i=function(e){return c(e,b)?e[b]:{}},o=function(e){return c(e,b)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:function(e,t,n){var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=u[a(e)];return n==l||n!=s&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=o.data={},s=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},7850:function(e,t,n){var r=n(111),i=n(4326),o=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},9212:function(e,t,n){var r=n(9670);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},3383:function(e,t,n){"use strict";var r,i,o,a=n(7293),u=n(9518),s=n(8880),l=n(6656),c=n(5112),f=n(1913),p=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):h=!0);var d=null==r||a((function(){var e={};return r[p].call(e)!==e}));d&&(r={}),f&&!d||l(r,p)||s(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},7497:function(e){e.exports={}},133:function(e,t,n){var r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},590:function(e,t,n){var r=n(7293),i=n(5112),o=n(1913),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(e,t,n){var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},1574:function(e,t,n){"use strict";var r=n(9781),i=n(7293),o=n(1956),a=n(5181),u=n(5296),s=n(7908),l=n(8361),c=Object.assign,f=Object.defineProperty;e.exports=!c||i((function(){if(r&&1!==c({b:1},c(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||o(c({},t)).join("")!=i}))?function(e,t){for(var n=s(e),i=arguments.length,c=1,f=a.f,p=u.f;i>c;)for(var h,d=l(arguments[c++]),v=f?o(d).concat(f(d)):o(d),y=v.length,g=0;y>g;)h=v[g++],r&&!p.call(d,h)||(n[h]=d[h]);return n}:c},30:function(e,t,n){var r,i=n(9670),o=n(6048),a=n(748),u=n(3501),s=n(490),l=n(317),c=n(6200)("IE_PROTO"),f=function(){},p=function(e){return"