@kvass/widgets 1.8.13 → 1.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es2.js CHANGED
@@ -101,4 +101,4 @@ img.ProseMirror-separator {
101
101
 
102
102
  `);return!o||!s?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;const s=i.after();return s===void 0?!1:r.nodeAt(s)?t.commands.command(({tr:a})=>(a.setSelection(le.near(r.resolve(s))),!0)):t.commands.exitCode()}}},addInputRules(){return[Rd({find:QP,type:this.type,getAttributes:t=>({language:t[1]})}),Rd({find:eF,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Ve({key:new at("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i?.mode;if(!n||!o)return!1;const{tr:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
103
103
  `));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(oe.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),nF=rn.create({name:"doc",topNode:!0,content:"block+"});function rF(t={}){return new Ve({view(e){return new iF(e,t)}})}class iF{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=s=>{this[i](s)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let u=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(u){let c=u.getBoundingClientRect(),d=a?c.bottom:c.top;a&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:c.left,right:c.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let o,s;if(!i||i==document.body&&getComputedStyle(i).position=="static")o=-pageXOffset,s=-pageYOffset;else{let a=i.getBoundingClientRect();o=a.left-i.scrollLeft,s=a.top-i.scrollTop}this.element.style.left=r.left-o+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!o){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=yb(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const oF=Ke.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[rF(this.options)]}});class _e extends le{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return _e.valid(r)?new _e(r):le.near(r)}content(){return V.empty}eq(e){return e instanceof _e&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new _e(e.resolve(n.pos))}getBookmark(){return new Th(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!sF(e)||!aF(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&_e.valid(e))return e;let i=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(n>0?e.indexAfter(s)<a.childCount:e.index(s)>0){o=a.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;i+=n;let l=e.doc.resolve(i);if(_e.valid(l))return l}for(;;){let s=n>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!Y.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=s,i+=n;let a=e.doc.resolve(i);if(_e.valid(a))return a}return null}}}_e.prototype.visible=!1;_e.findFrom=_e.findGapCursorFrom;le.jsonID("gapcursor",_e);class Th{constructor(e){this.pos=e}map(e){return new Th(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return _e.valid(n)?new _e(n):le.near(n)}}function sF(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function aF(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function lF(){return new Ve({props:{decorations:pF,createSelectionBetween(t,e,n){return e.pos==n.pos&&_e.valid(n)?new _e(n):null},handleClick:cF,handleKeyDown:uF,handleDOMEvents:{beforeinput:dF}}})}const uF=o0({ArrowLeft:ba("horiz",-1),ArrowRight:ba("horiz",1),ArrowUp:ba("vert",-1),ArrowDown:ba("vert",1)});function ba(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){let s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof oe){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let u=_e.findGapCursorFrom(a,e,l);return u?(i&&i(r.tr.setSelection(new _e(u))),!0):!1}}function cF(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!_e.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Y.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new _e(r))),!0)}function dF(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof _e))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=A.empty;for(let s=r.length-1;s>=0;s--)i=A.from(r[s].createAndFill(null,i));let o=t.state.tr.replace(n.pos,n.pos,new V(i,0,0));return o.setSelection(oe.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function pF(t){if(!(t.selection instanceof _e))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Pe.create(t.doc,[Mt.widget(t.selection.head,e,{key:"gapcursor"})])}const hF=Ke.create({name:"gapCursor",addProseMirrorPlugins(){return[lF()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=pe(j(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),fF=rn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",et(this.options.HTMLAttributes,t)]},renderText(){return`
104
- `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&s){const d=l.filter(h=>a.includes(h.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),mF=rn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,et(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Rd({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var Ul=200,We=function(){};We.prototype.append=function(t){return t.length?(t=We.from(t),!this.length&&t||t.length<Ul&&this.leafAppend(t)||this.length<Ul&&t.leafPrepend(this)||this.appendInner(t)):this};We.prototype.prepend=function(t){return t.length?We.from(t).append(this):this};We.prototype.appendInner=function(t){return new gF(this,t)};We.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?We.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))};We.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};We.prototype.forEach=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)};We.prototype.map=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(t(i,o))},e,n),r};We.from=function(t){return t instanceof We?t:t&&t.length?new Y0(t):We.empty};var Y0=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){for(var a=i-1;a>=o;a--)if(r(this.values[a],s+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Ul)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Ul)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(We);We.empty=new Y0([]);var gF=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;if(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1||i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;if(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1||i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)return!1},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(We);const vF=500;class Xt{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,a,l,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,c.push(d);return}if(i){c.push(new dn(d.map));let p=d.step.map(i.slice(o)),f;p&&s.maybeStep(p).doc&&(f=s.mapping.maps[s.mapping.maps.length-1],u.push(new dn(f,void 0,void 0,u.length+c.length))),o--,f&&i.appendMap(f,o)}else s.maybeStep(d.step);if(d.selection)return a=i?d.selection.map(i.slice(o)):d.selection,l=new Xt(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d=e.steps[c].invert(e.docs[c]),h=new dn(e.mapping.maps[c],d,n),p;(p=l&&l.merge(h))&&(h=p,c?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(s++,n=void 0),i||(l=h)}let u=s-r.depth;return u>bF&&(a=yF(a,u),s-=u),new Xt(a.append(o),s)}remapping(e,n){let r=new Bi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Xt(this.items.append(e.map(n=>new dn(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(h.step){let m=e.steps[p].invert(e.docs[p]),g=h.selection&&h.selection.map(o.slice(l+1,p));g&&a++,r.push(new dn(f,m,g))}else r.push(new dn(f))},i);let u=[];for(let h=n;h<s;h++)u.push(new dn(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),d=new Xt(c,a);return d.emptyItemCount()>vF&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&o++;let d=new dn(u.invert(),l,c),h,p=i.length-1;(h=i.length&&i[p].merge(d))?i[p]=h:i.push(d)}}else s.map&&r--},this.items.length,0),new Xt(We.from(i.reverse()),o)}}Xt.empty=new Xt(We.empty,0);function yF(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class dn{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new dn(n.getMap().invert(),n,this.selection)}}}class nr{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const bF=20;function kF(t,e,n,r){let i=n.getMeta(ei),o;if(i)return i.historyState;n.getMeta(EF)&&(t=new nr(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(ei))return s.getMeta(ei).redo?new nr(t.done.addTransform(n,void 0,r,La(e)),t.undone,Og(n.mapping.maps),t.prevTime,t.prevComposition):new nr(t.done,t.undone.addTransform(n,void 0,r,La(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!wF(n,t.prevRanges)),u=s?Rc(t.prevRanges,n.mapping):Og(n.mapping.maps);return new nr(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,La(e)),Xt.empty,u,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new nr(t.done.rebased(n,o),t.undone.rebased(n,o),Rc(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new nr(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Rc(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function wF(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function Og(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function Rc(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function xF(t,e,n){let r=La(e),i=ei.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),l=new nr(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(ei,{redo:n,historyState:l})}let Pc=!1,Ag=null;function La(t){let e=t.plugins;if(Ag!=e){Pc=!1,Ag=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Pc=!0;break}}return Pc}const ei=new at("history"),EF=new at("closeHistory");function CF(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Ve({key:ei,state:{init(){return new nr(Xt.empty,Xt.empty,null,0,-1)},apply(e,n,r){return kF(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?Q0:r=="historyRedo"?ek:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function Z0(t,e){return(n,r)=>{let i=ei.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=xF(i,n,t);o&&r(o.scrollIntoView())}return!0}}const Q0=Z0(!1),ek=Z0(!0),SF=Ke.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Q0(t,e),redo:()=>({state:t,dispatch:e})=>ek(t,e)}},addProseMirrorPlugins(){return[CF(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),TF=rn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",et(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:i}=n,o=t();return r.parentOffset===0?o.insertContentAt({from:Math.max(r.pos-1,0),to:i.pos},{type:this.name}):x0(n)?o.insertContentAt(i.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({tr:s,dispatch:a})=>{var l;if(a){const{$to:u}=s.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?s.setSelection(oe.create(s.doc,u.pos+1)):u.nodeAfter.isBlock?s.setSelection(Y.create(s.doc,u.pos)):s.setSelection(oe.create(s.doc,u.pos));else{const d=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(s.insert(c,d),s.setSelection(oe.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[RI({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),OF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,AF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,MF=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,_F=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,DF=zn.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",et(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[to({find:OF,type:this.type}),to({find:MF,type:this.type})]},addPasteRules(){return[li({find:AF,type:this.type}),li({find:_F,type:this.type})]}}),NF=rn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",et(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),IF="listItem",Mg="textStyle",_g=/^(\d+)\.\s$/,RF=rn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",et(this.options.HTMLAttributes,n),0]:["ol",et(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(IF,this.editor.getAttributes(Mg)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=bs({find:_g,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=bs({find:_g,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Mg)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),PF=rn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",et(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),FF=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,LF=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,VF=zn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",et(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[to({find:FF,type:this.type})]},addPasteRules(){return[li({find:LF,type:this.type})]}}),BF=rn.create({name:"text",group:"inline"}),$F=Ke.create({name:"starterKit",addExtensions(){var t,e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,g,y;const b=[];return this.options.bold!==!1&&b.push(KP.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&b.push(zP.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&b.push(JP.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(ZP.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(tF.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&b.push(nF.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&b.push(oF.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&b.push(hF.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&b.push(fF.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(mF.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&b.push(SF.configure((c=this.options)===null||c===void 0?void 0:c.history)),this.options.horizontalRule!==!1&&b.push(TF.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(DF.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&b.push(NF.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&b.push(RF.configure((f=this.options)===null||f===void 0?void 0:f.orderedList)),this.options.paragraph!==!1&&b.push(PF.configure((m=this.options)===null||m===void 0?void 0:m.paragraph)),this.options.strike!==!1&&b.push(VF.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&b.push(BF.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}}),jF={class:"k-richtext__menu"},AL=te({__name:"RichText",props:{modelValue:{default:""},disabled:{type:Boolean},actions:{default:()=>["heading2","bold","italic","orderedList","bulletList"]},placeholder:{default:"Write something..."}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=gP({extensions:[$F,$P.configure({placeholder:n.placeholder}),BP.configure({defaultProtocol:"https",protocols:["mailto"],HTMLAttributes:{class:"",rel:"noopener noreferrer nofollow",target:"_blank"}})],editable:!n.disabled,content:n.modelValue,onUpdate:({editor:a})=>{r("update:modelValue",a.getHTML())}}),o=N(()=>!i||!i.value?[]:[{id:"heading2",icon:"fa-pro-regular:heading",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleHeading({level:2}).run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("heading",{level:2})}},{id:"bold",icon:"fa-pro-regular:bold",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleBold().run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("bold")}},{id:"italic",icon:"fa-pro-regular:italic",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleItalic().run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("italic")}},{id:"orderedList",icon:"fa-pro-regular:list-ol",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleOrderedList().run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("orderedList")}},{id:"bulletList",icon:"fa-pro-regular:list-ul",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleBulletList().run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("bulletList")}}].filter(a=>n.actions.includes(a.id))),s=Cn("k-richtext",{variants:{disabled:{true:"k-richtext--disabled"}}});return Ee(()=>n.modelValue,()=>{if(i.value&&i.value.getHTML()!==n.modelValue)return i.value.commands.setContent(n.modelValue)}),(a,l)=>(E(),O("div",{class:Ce($(s)({disabled:a.disabled}))},[H("div",jF,[he($y,{class:"k-richtext__menu-group",modelValue:[],multiple:!0},{default:Z(({getItemProps:u})=>[(E(!0),O(Ie,null,_t(o.value,c=>(E(),B(ze,{disabled:a.disabled,variant:"tertiary",class:"k-richtext__item","data-part":"item","data-state":`${c.isActive()?"on":"off"}`,onClick:()=>c.action(),icon:c.icon},null,8,["disabled","data-state","onClick","icon"]))),256))]),_:1})]),he($(mP),{editor:$(i),class:"k-richtext__editor"},null,8,["editor"])],2))}});function zF(t){return t%4===0&&t%100!==0||t%400===0}function HF(t=""){if(t.length===10){let e=t.replace(".","-").replace("/","-").split("-");if(e.length===3&&e[0].length===4){let n=parseInt(e[0]),r=parseInt(e[1]),i=parseInt(e[2]);if(r===2){if(zF(n)){if(i>29)return!1}else if(i>28)return!1}if((r===4||r===6||r===9||r===11)&&i>30)return!1}return!0}return!0}function _n(t){let e;if(typeof t=="number"&&(e=new Date(t),typeof e=="object"))return!0;if(e=new Date(t),typeof e=="object")return!(e.toString()==="Invalid Date"||!HF(t));var n=/^\d{4}\-\d{1,2}\-\d{1,2}$/;if(!n.test(t))return!1;var r=t.split("-"),i=parseInt(r[2],10),o=parseInt(r[1],10),s=parseInt(r[0],10);if(s<1e3||s>3e3||o==0||o>12)return!1;var a=[31,28,31,30,31,30,31,31,30,31,30,31];return(s%400==0||s%100!=0&&s%4==0)&&(a[1]=29),i>0&&i<=a[o-1]}var Kl={required:function(t){var e;return t==null?!1:(e=String(t).replace(/\s/g,""),e.length>0)},required_if:function(t,e,n){return e=this.getParameters(),this.validator._objectPath(this.validator.input,e[0])===e[1]?this.validator.getRule("required").validate(t):!0},required_unless:function(t,e,n){return e=this.getParameters(),this.validator._objectPath(this.validator.input,e[0])!==e[1]?this.validator.getRule("required").validate(t):!0},required_with:function(t,e,n){return this.validator._objectPath(this.validator.input,e)?this.validator.getRule("required").validate(t):!0},required_with_all:function(t,e,n){e=this.getParameters();for(var r=0;r<e.length;r++)if(!this.validator._objectPath(this.validator.input,e[r]))return!0;return this.validator.getRule("required").validate(t)},required_without:function(t,e,n){return this.validator._objectPath(this.validator.input,e)?!0:this.validator.getRule("required").validate(t)},required_without_all:function(t,e,n){e=this.getParameters();for(var r=0;r<e.length;r++)if(this.validator._objectPath(this.validator.input,e[r]))return!0;return this.validator.getRule("required").validate(t)},boolean:function(t){return t===!0||t===!1||t===0||t===1||t==="0"||t==="1"||t==="true"||t==="false"},size:function(t,e,n){if(t){e=parseFloat(e);var r=this.getSize();return r===e}return!0},string:function(t,e,n){return typeof t=="string"},sometimes:function(t){return!0},min:function(t,e,n){var r=this.getSize();return r>=e},max:function(t,e,n){var r=this.getSize();return r<=e},between:function(t,e,n){e=this.getParameters();var r=this.getSize(),i=parseFloat(e[0],10),o=parseFloat(e[1],10);return r>=i&&r<=o},email:function(t){var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e.test(t)||(e=/^((?:[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]|[^\u0000-\u007F])+@(?:[a-zA-Z0-9]|[^\u0000-\u007F])(?:(?:[a-zA-Z0-9-]|[^\u0000-\u007F]){0,61}(?:[a-zA-Z0-9]|[^\u0000-\u007F]))?(?:\.(?:[a-zA-Z0-9]|[^\u0000-\u007F])(?:(?:[a-zA-Z0-9-]|[^\u0000-\u007F]){0,61}(?:[a-zA-Z0-9]|[^\u0000-\u007F]))?)+)*$/),e.test(t)},numeric:function(t){var e;return e=Number(t),typeof e=="number"&&!isNaN(e)&&typeof t!="boolean"},array:function(t){return t instanceof Array},url:function(t){return/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_\+.~#?&/=]*)/i.test(t)},alpha:function(t){return/^[a-zA-Z]+$/.test(t)},alpha_dash:function(t){return/^[a-zA-Z0-9_\-]+$/.test(t)},alpha_num:function(t){return/^[a-zA-Z0-9]+$/.test(t)},same:function(t,e){var n=this.validator._flattenObject(this.validator.input)[e],r=t;return n===r},different:function(t,e){var n=this.validator._flattenObject(this.validator.input)[e],r=t;return n!==r},in:function(t,e){var n,r;if(t&&(n=this.getParameters()),t&&!(t instanceof Array)){var i=t;for(r=0;r<n.length;r++)if(typeof n[r]=="string"&&(i=String(t)),i===n[r])return!0;return!1}if(t&&t instanceof Array){for(r=0;r<t.length;r++)if(n.indexOf(t[r])<0)return!1}return!0},not_in:function(t,e){for(var n=this.getParameters(),r=n.length,i=!0,o=0;o<r;o++){var s=t;if(typeof n[o]=="string"&&(s=String(t)),s===n[o]){i=!1;break}}return i},accepted:function(t){return t==="on"||t==="yes"||t===1||t==="1"||t===!0},confirmed:function(t,e,n){var r=n+"_confirmation";return this.validator.input[r]===t},integer:function(t){return String(parseInt(t,10))===String(t)},digits:function(t,e){var n=this.validator.getRule("numeric");return!!(n.validate(t)&&String(t.trim()).length===parseInt(e))},digits_between:function(t){var e=this.validator.getRule("numeric"),n=this.getParameters(),r=String(t).length,i=parseFloat(n[0],10),o=parseFloat(n[1],10);return!!(e.validate(t)&&r>=i&&r<=o)},regex:function(t,e){var n=/[g|i|m]{1,3}$/,r=e.match(n);return r=r?r[0]:"",e=e.replace(n,"").slice(1,-1),e=new RegExp(e,r),!!e.test(t)},date:function(t,e){return _n(t)},present:function(t){return typeof t<"u"},after:function(t,e){var n=this.validator.input[e],r=t;return!_n(n)||!_n(r)?!1:new Date(n).getTime()<new Date(r).getTime()},after_or_equal:function(t,e){var n=this.validator.input[e],r=t;return!_n(n)||!_n(r)?!1:new Date(n).getTime()<=new Date(r).getTime()},before:function(t,e){var n=this.validator.input[e],r=t;return!_n(n)||!_n(r)?!1:new Date(n).getTime()>new Date(r).getTime()},before_or_equal:function(t,e){var n=this.validator.input[e],r=t;return!_n(n)||!_n(r)?!1:new Date(n).getTime()>=new Date(r).getTime()},hex:function(t){return/^[0-9a-f]+$/i.test(t)},ipv4:function(t,e,n){if(typeof t!="string")return!1;var r=/^[0-9]+$/;if(octets=t.split("."),octets.length!=4)return!1;for(let o=0;o<octets.length;o++){const s=octets[o];if(!r.test(s))return!1;var i=parseInt(s);if(i>=256)return!1}return!0},ipv6:function(t,e,n){if(typeof t!="string")return!1;var r=/^[0-9a-f]+$/;if(hextets=t.split(":"),colons=t.match(/::/),colons!=null&&t.match(/::/g).length>1||t[0]==":"&&(colons==null||colons!=null&&colons.index!=0)||t[t.length-1]==":"&&(colons==null||colons!=null&&colons.index!=t.length-2)||3>hextets.length)return!1;var i=hextets.length==9&&colons!=null&&(colons.index==0||colons.index==t.length-2);if(hextets.length>8&&!i||hextets.length!=8&&colons==null)return!1;for(let o=0;o<hextets.length;o++){const s=hextets[o];if(s.length!=0&&(!r.test(s)||s.length>4))return!1}return!0},ip:function(t,e,n){return Kl.ipv4(t,e,n)||Kl.ipv6(t,e,n)}},tk=function(){throw new Error("Validator `"+this.name+"` is not defined!")},nk;function rk(t,e,n){this.name=t,this.fn=e,this.passes=null,this._customMessage=void 0,this.async=n}rk.prototype={validate:function(t,e,n,r){var i=this;if(this._setValidatingData(n,t,e),typeof r=="function"){this.callback=r;var o=function(s,a){i.response(s,a)};return this.async?this._apply(t,e,n,o):o(this._apply(t,e,n))}return this._apply(t,e,n)},_apply:function(t,e,n,r){var i=this.isMissed()?tk:this.fn;return i.apply(this,[t,e,n,r])},_setValidatingData:function(t,e,n){this.attribute=t,this.inputValue=e,this.ruleValue=n},getParameters:function(){var t=[];return typeof this.ruleValue=="string"&&(t=this.ruleValue.split(",")),typeof this.ruleValue=="number"&&t.push(this.ruleValue),this.ruleValue instanceof Array&&(t=this.ruleValue),t},getSize:function(){var t=this.inputValue;return t instanceof Array?t.length:typeof t=="number"?t:this.validator._hasNumericRule(this.attribute)?parseFloat(t,10):t.length},_getValueType:function(){return typeof this.inputValue=="number"||this.validator._hasNumericRule(this.attribute)?"numeric":"string"},response:function(t,e){this.passes=t===void 0||t===!0,this._customMessage=e,this.callback(this.passes,e)},setValidator:function(t){this.validator=t},isMissed:function(){return typeof this.fn!="function"},get customMessage(){return this.isMissed()?nk:this._customMessage}};var qF={asyncRules:[],implicitRules:["required","required_if","required_unless","required_with","required_with_all","required_without","required_without_all","accepted","present"],make:function(t,e){var n=this.isAsync(t),r=new rk(t,Kl[t],n);return r.setValidator(e),r},isAsync:function(t){for(var e=0,n=this.asyncRules.length;e<n;e++)if(this.asyncRules[e]===t)return!0;return!1},isImplicit:function(t){return this.implicitRules.indexOf(t)>-1},register:function(t,e){Kl[t]=e},registerImplicit:function(t,e){this.register(t,e),this.implicitRules.push(t)},registerAsync:function(t,e){this.register(t,e),this.asyncRules.push(t)},registerAsyncImplicit:function(t,e){this.registerImplicit(t,e),this.asyncRules.push(t)},registerMissedRuleValidator:function(t,e){tk=t,nk=e}},WF=qF;function UF(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var KF={between:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{min:n[0],max:n[1]})},digits_between:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{min:n[0],max:n[1]})},required_if:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{other:this._getAttributeName(n[0]),value:n[1]})},required_unless:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{other:this._getAttributeName(n[0]),value:n[1]})},required_with:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{field:this._getAttributeName(n[0])})},required_with_all:function(t,e){var n=e.getParameters(),r=this._getAttributeName.bind(this);return this._replacePlaceholders(e,t,{fields:n.map(r).join(", ")})},required_without:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{field:this._getAttributeName(n[0])})},required_without_all:function(t,e){var n=e.getParameters(),r=this._getAttributeName.bind(this);return this._replacePlaceholders(e,t,{fields:n.map(r).join(", ")})},after:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{after:this._getAttributeName(n[0])})},before:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{before:this._getAttributeName(n[0])})},after_or_equal:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{after_or_equal:this._getAttributeName(n[0])})},before_or_equal:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{before_or_equal:this._getAttributeName(n[0])})},same:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{same:this._getAttributeName(n[0])})}};function GF(t){return t.replace(/[_\[]/g," ").replace(/]/g,"")}var ik={replacements:KF,formatter:GF},Dg=ik,Gd=function(t,e){this.lang=t,this.messages=e,this.customMessages={},this.attributeNames={}};Gd.prototype={constructor:Gd,_setCustom:function(t){this.customMessages=t||{}},_setAttributeNames:function(t){this.attributeNames=t},_setAttributeFormatter:function(t){this.attributeFormatter=t},_getAttributeName:function(t){var e=t;return this.attributeNames.hasOwnProperty(t)?this.attributeNames[t]:(this.messages.attributes.hasOwnProperty(t)&&(e=this.messages.attributes[t]),this.attributeFormatter&&(e=this.attributeFormatter(e)),e)},all:function(){return this.messages},render:function(t){if(t.customMessage)return t.customMessage;var e=this._getTemplate(t),n;return Dg.replacements[t.name]?n=Dg.replacements[t.name].apply(this,[e,t]):n=this._replacePlaceholders(t,e,{}),n},_getTemplate:function(t){for(var e=this.messages,n=e.def,r=this.customMessages,i=[t.name+"."+t.attribute,t.name],o=0,s;o<i.length;o++)if(s=i[o],r.hasOwnProperty(s)){n=r[s];break}else if(e.hasOwnProperty(s)){n=e[s];break}return typeof n=="object"&&(n=n[t._getValueType()]),n},_replacePlaceholders:function(t,e,n){var r,i;if(n.attribute=this._getAttributeName(t.attribute),n[t.name]=n[t.name]||t.getParameters().join(","),typeof e=="string"&&typeof n=="object"){r=e;for(i in n)r=r.replace(new RegExp(":"+i,"g"),n[i])}return r}};var JF=Gd,XF={accepted:"The :attribute must be accepted.",after:"The :attribute must be after :after.",after_or_equal:"The :attribute must be equal or after :after_or_equal.",alpha:"The :attribute field must contain only alphabetic characters.",alpha_dash:"The :attribute field may only contain alpha-numeric characters, as well as dashes and underscores.",alpha_num:"The :attribute field must be alphanumeric.",before:"The :attribute must be before :before.",before_or_equal:"The :attribute must be equal or before :before_or_equal.",between:{numeric:"The :attribute field must be between :min and :max.",string:"The :attribute field must be between :min and :max characters."},confirmed:"The :attribute confirmation does not match.",email:"The :attribute format is invalid.",date:"The :attribute is not a valid date format.",def:"The :attribute attribute has errors.",digits:"The :attribute must be :digits digits.",digits_between:"The :attribute field must be between :min and :max digits.",different:"The :attribute and :different must be different.",in:"The selected :attribute is invalid.",integer:"The :attribute must be an integer.",hex:"The :attribute field should have hexadecimal format",min:{numeric:"The :attribute must be at least :min.",string:"The :attribute must be at least :min characters."},max:{numeric:"The :attribute may not be greater than :max.",string:"The :attribute may not be greater than :max characters."},not_in:"The selected :attribute is invalid.",numeric:"The :attribute must be a number.",present:"The :attribute field must be present (but can be empty).",required:"The :attribute field is required.",required_if:"The :attribute field is required when :other is :value.",required_unless:"The :attribute field is required when :other is not :value.",required_with:"The :attribute field is required when :field is not empty.",required_with_all:"The :attribute field is required when :fields are not empty.",required_without:"The :attribute field is required when :field is empty.",required_without_all:"The :attribute field is required when :fields are empty.",same:"The :attribute and :same fields must match.",size:{numeric:"The :attribute must be :size.",string:"The :attribute must be :size characters."},string:"The :attribute must be a string.",url:"The :attribute format is invalid.",regex:"The :attribute format is invalid.",attributes:{}};const YF=hu(XF);var ZF=JF,QF=UF,eL={messages:{},_set:function(t,e){this.messages[t]=e},_setRuleMessage:function(t,e,n){this._load(t),n===void 0&&(n=this.messages[t].def),this.messages[t][e]=n},_load:function(t){if(!this.messages[t])try{var e=QF("./lang/"+t);this._set(t,e)}catch{}},_get:function(t){return this._load(t),this.messages[t]},_make:function(t){return this._load(t),new ZF(t,this.messages[t])}},ok=eL;const sk=hu(ok);var Jd=function(){this.errors={}};Jd.prototype={constructor:Jd,add:function(t,e){this.has(t)||(this.errors[t]=[]),this.errors[t].indexOf(e)===-1&&this.errors[t].push(e)},get:function(t){return this.has(t)?this.errors[t]:[]},first:function(t){return this.has(t)?this.errors[t][0]:!1},all:function(){return this.errors},has:function(t){return!!this.errors.hasOwnProperty(t)}};var tL=Jd;function ak(t,e){this.onResolvedAll=e,this.onFailedOne=t,this.resolvers={},this.resolversCount=0,this.passed=[],this.failed=[],this.firing=!1}ak.prototype={add:function(t){var e=this.resolversCount;return this.resolvers[e]=t,this.resolversCount++,e},resolve:function(t){var e=this.resolvers[t];e.passes===!0?this.passed.push(e):e.passes===!1&&(this.failed.push(e),this.onFailedOne(e)),this.fire()},isAllResolved:function(){return this.passed.length+this.failed.length===this.resolversCount},fire:function(){this.firing&&this.isAllResolved()&&this.onResolvedAll(this.failed.length===0)},enableFiring:function(){this.firing=!0}};var nL=ak,br=WF,mi=ok,rL=tL,iL=ik,oL=nL,Le=function(t,e,n){var r=Le.getDefaultLang();this.input=t||{},this.messages=mi._make(r),this.messages._setCustom(n),this.setAttributeFormatter(Le.prototype.attributeFormatter),this.errors=new rL,this.errorCount=0,this.hasAsync=!1,this.rules=this._parseRules(e)};Le.prototype={constructor:Le,lang:"en",numericRules:["integer","numeric"],attributeFormatter:iL.formatter,check:function(){for(var t in this.rules){var e=this.rules[t],n=this._objectPath(this.input,t);if(!(this._hasRule(t,["sometimes"])&&!this._suppliedWithData(t)))for(var r=0,i=e.length,o,s,a;r<i&&(s=e[r],o=this.getRule(s.name),!(this._isValidatable(o,n)&&(a=o.validate(n,s.value,t),a||this._addFailure(o),this._shouldStopValidating(t,a))));r++);}return this.errorCount===0},checkAsync:function(t,e){var n=this;t=t||function(){},e=e||function(){};var r=function(f,m){n._addFailure(f,m)},i=function(f){f?t():e()},o=new oL(r,i),s=function(f,m,g,y){return function(){var b=o.add(y);y.validate(f,m.value,g,function(){o.resolve(b)})}};for(var a in this.rules){var l=this.rules[a],u=this._objectPath(this.input,a);if(!(this._hasRule(a,["sometimes"])&&!this._suppliedWithData(a)))for(var c=0,d=l.length,h,p;c<d;c++)p=l[c],h=this.getRule(p.name),this._isValidatable(h,u)&&s(u,p,a,h)()}o.enableFiring(),o.fire()},_addFailure:function(t){var e=this.messages.render(t);this.errors.add(t.attribute,e),this.errorCount++},_flattenObject:function(t){var e={};function n(r,i){if(!(!i&&Object.getOwnPropertyNames(r).length===0))if(Object(r)!==r||Array.isArray(r))e[i]=r;else{var o=!0;for(var s in r)o=!1,n(r[s],i?i+"."+s:s);o&&(e[i]={})}}return t&&n(t),e},_objectPath:function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];var n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);for(var o=0,s=n.length;o<s;o++)if(typeof r=="object"&&r!==null&&Object.hasOwnProperty.call(r,n[o]))r=r[n[o]];else return;return r},_parseRules:function(t){var e={};t=this._flattenObject(t);for(var n in t){var r=t[n];this._parseRulesCheck(n,r,e)}return e},_parseRulesCheck:function(t,e,n,r){t.indexOf("*")>-1?this._parsedRulesRecurse(t,e,n,r):this._parseRulesDefault(t,e,n,r)},_parsedRulesRecurse:function(t,e,n,r){var i=t.substr(0,t.indexOf("*")-1),o=this._objectPath(this.input,i);if(o)for(var s=0;s<o.length;s++){var a=r?r.slice():[];a.push(s),this._parseRulesCheck(t.replace("*",s),e,n,a)}},_parseRulesDefault:function(t,e,n,r){var i=[];e instanceof Array&&(e=this._prepareRulesArray(e)),typeof e=="string"&&(e=e.split("|"));for(var o=0,s=e.length,a;o<s;o++)a=typeof e[o]=="string"?this._extractRuleAndRuleValue(e[o]):e[o],a.value&&(a.value=this._replaceWildCards(a.value,r),this._replaceWildCardsMessages(r)),br.isAsync(a.name)&&(this.hasAsync=!0),i.push(a);n[t]=i},_replaceWildCards:function(t,e){if(!e)return t;var n=t;return e.forEach(function(r){Array.isArray(n)&&(n=n[0]);const i=n.indexOf("*");if(i===-1)return n;n=n.substr(0,i)+r+n.substr(i+1)}),Array.isArray(t)&&(t[0]=n,n=t),n},_replaceWildCardsMessages:function(t){var e=this.messages.customMessages,n=this;Object.keys(e).forEach(function(r){if(t){var i=n._replaceWildCards(r,t);e[i]=e[r]}}),this.messages._setCustom(e)},_prepareRulesArray:function(t){for(var e=[],n=0,r=t.length;n<r;n++)if(typeof t[n]=="object")for(var i in t[n])e.push({name:i,value:t[n][i]});else e.push(t[n]);return e},_suppliedWithData:function(t){return this.input.hasOwnProperty(t)},_extractRuleAndRuleValue:function(t){var e={},n;return e.name=t,t.indexOf(":")>=0&&(n=t.split(":"),e.name=n[0],e.value=n.slice(1).join(":")),e},_hasRule:function(t,e){for(var n=this.rules[t]||[],r=0,i=n.length;r<i;r++)if(e.indexOf(n[r].name)>-1)return!0;return!1},_hasNumericRule:function(t){return this._hasRule(t,this.numericRules)},_isValidatable:function(t,e){return Array.isArray(e)||br.isImplicit(t.name)?!0:this.getRule("required").validate(e)},_shouldStopValidating:function(t,e){var n=this.stopOnAttributes;return typeof n>"u"||n===!1||e===!0?!1:n instanceof Array?n.indexOf(t)>-1:!0},setAttributeNames:function(t){this.messages._setAttributeNames(t)},setAttributeFormatter:function(t){this.messages._setAttributeFormatter(t)},getRule:function(t){return br.make(t,this)},stopOnError:function(t){this.stopOnAttributes=t},passes:function(t){var e=this._checkAsync("passes",t);return e?this.checkAsync(t):this.check()},fails:function(t){var e=this._checkAsync("fails",t);return e?this.checkAsync(function(){},t):!this.check()},_checkAsync:function(t,e){var n=typeof e=="function";if(this.hasAsync&&!n)throw t+" expects a callback when async rules are being tested.";return this.hasAsync||n}};Le.setMessages=function(t,e){return mi._set(t,e),this};Le.getMessages=function(t){return mi._get(t)};Le.useLang=function(t){this.prototype.lang=t};Le.getDefaultLang=function(){return this.prototype.lang};Le.setAttributeFormatter=function(t){this.prototype.attributeFormatter=t};Le.stopOnError=function(t){this.prototype.stopOnAttributes=t};Le.register=function(t,e,n,r){var i=Le.getDefaultLang();br.register(t,e),mi._setRuleMessage(i,t,n)};Le.registerImplicit=function(t,e,n,r){var i=Le.getDefaultLang();br.registerImplicit(t,e),mi._setRuleMessage(i,t,n)};Le.registerAsync=function(t,e,n,r){var i=Le.getDefaultLang();br.registerAsync(t,e),mi._setRuleMessage(i,t,n)};Le.registerAsyncImplicit=function(t,e,n){var r=Le.getDefaultLang();br.registerAsyncImplicit(t,e),mi._setRuleMessage(r,t,n)};Le.registerMissedRuleValidator=function(t,e){br.registerMissedRuleValidator(t,e)};var sL=Le;const cr=hu(sL);sk._set("en",YF);cr.useLang("en");const Xd=X(!1),aL=t=>{Xd.value=!Xd.value,sk._set("default",t),cr.useLang("default")},lL=(t,e)=>Object.fromEntries(Object.entries(t).map(([n,r])=>{const i=n.split(".").pop();return[n,e(i)]})),Yd=(t,e={})=>{const{rule:n="required",prefix:r=""}=e;let i={};return Object.entries(t).forEach(([o,s])=>{const a=r+o;if(Dw(s)){s.map((l,u)=>{i=Object.assign(i,Yd(l,{rule:n,prefix:`${a}.${u}.`}))});return}if(_w(s)){i=Object.assign(i,Yd(s,{rule:n,prefix:`${a}.`}));return}i[a]=n}),i},uL=cr.register,cL=cr.registerAsync;function dL(t={}){const{rules:e,labels:n,data:r,customMessages:i,visitImmediate:o=!1}=t;if(i){let m=cr.getMessages("default");Object.entries(i.value).forEach(([g,y])=>m[g]=y),cr.setMessages("default",m)}let s=new cr({},{}),a=()=>Object.fromEntries(Object.keys(e.value).map(m=>[m,{rule:e.value[m],valid:!c.value.get(m).length,error:c.value.first(m)||void 0,visited:l.value[m]}])),l=X(o?Object.fromEntries(Object.keys(e.value).map(m=>[m,!0])):{}),u=X(!0),c=X(s.errors),d=N(()=>a());function h(m){var g;let y=(g=d.value)==null?void 0:g[m];const b={valid:!0,error:void 0};return!y||!y.visited?b:y}let p=()=>{let m=new cr(r.value,e.value);n&&m.setAttributeNames(n.value);const g=()=>{c.value=s.errors,u.value=!0},y=()=>{u.value=!1,c.value=m.errors};m.checkAsync(g,y)};Ee([r,Xd],p,{deep:!0,immediate:!0});const f=m=>{if(!m)return!1;const g=typeof m=="string"?m.split("|"):Array.isArray(m)?m:[],y={required:()=>!0,required_if:(b,k)=>r.value[b]===k,required_unless:(b,k)=>r.value[b]!==k,required_with:b=>b.some(k=>k in r.value),required_with_all:b=>b.every(k=>k in r.value),required_without:b=>b.some(k=>!(k in r.value)),required_without_all:b=>b.every(k=>!(k in r.value))};for(const b of g){if(typeof b=="string"){if(b==="required")return y.required;const[k,...v]=b.split(":");if(y[k]){const w=v.map(x=>["true",!0,"false",!1].includes(x)?JSON.parse(x):x);return y[k](...w)}}if(typeof b=="object"){for(const[k,v]of Object.entries(b))if(y[k])return Array.isArray(v)?y[k](...v):y[k](v)}}return!1};return{onChange:p,errors:c,passes:u,fields:d,bind:m=>({onBlur:()=>l.value[m]=!0,error:h(m).error,required:f(e.value[m])})}}const ML=Object.freeze(Object.defineProperty({__proto__:null,default:dL,generateLabels:lL,generateRules:Yd,register:uL,registerAsync:cL,setLabels:aL},Symbol.toStringTag,{value:"Module"}));export{du as $,Qg as C,AL as E,dL as G,fL as Q,ze as S,sT as U,su as V,hL as X,mE as Z,ni as _,gL as a,N1 as b,bL as c,kL as d,vL as e,wL as f,TL as g,mL as i,OL as k,yL as l,EL as m,xL as p,Ze as q,Yh as r,IE as s,CL as v,ML as x,SL as y};
104
+ `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&s){const d=l.filter(h=>a.includes(h.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),mF=rn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,et(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Rd({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var Ul=200,We=function(){};We.prototype.append=function(t){return t.length?(t=We.from(t),!this.length&&t||t.length<Ul&&this.leafAppend(t)||this.length<Ul&&t.leafPrepend(this)||this.appendInner(t)):this};We.prototype.prepend=function(t){return t.length?We.from(t).append(this):this};We.prototype.appendInner=function(t){return new gF(this,t)};We.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?We.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))};We.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};We.prototype.forEach=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)};We.prototype.map=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(t(i,o))},e,n),r};We.from=function(t){return t instanceof We?t:t&&t.length?new Y0(t):We.empty};var Y0=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){for(var a=i-1;a>=o;a--)if(r(this.values[a],s+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Ul)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Ul)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(We);We.empty=new Y0([]);var gF=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;if(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1||i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;if(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1||i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)return!1},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(We);const vF=500;class Xt{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,a,l,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,c.push(d);return}if(i){c.push(new dn(d.map));let p=d.step.map(i.slice(o)),f;p&&s.maybeStep(p).doc&&(f=s.mapping.maps[s.mapping.maps.length-1],u.push(new dn(f,void 0,void 0,u.length+c.length))),o--,f&&i.appendMap(f,o)}else s.maybeStep(d.step);if(d.selection)return a=i?d.selection.map(i.slice(o)):d.selection,l=new Xt(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d=e.steps[c].invert(e.docs[c]),h=new dn(e.mapping.maps[c],d,n),p;(p=l&&l.merge(h))&&(h=p,c?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(s++,n=void 0),i||(l=h)}let u=s-r.depth;return u>bF&&(a=yF(a,u),s-=u),new Xt(a.append(o),s)}remapping(e,n){let r=new Bi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new Xt(this.items.append(e.map(n=>new dn(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(h.step){let m=e.steps[p].invert(e.docs[p]),g=h.selection&&h.selection.map(o.slice(l+1,p));g&&a++,r.push(new dn(f,m,g))}else r.push(new dn(f))},i);let u=[];for(let h=n;h<s;h++)u.push(new dn(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),d=new Xt(c,a);return d.emptyItemCount()>vF&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&o++;let d=new dn(u.invert(),l,c),h,p=i.length-1;(h=i.length&&i[p].merge(d))?i[p]=h:i.push(d)}}else s.map&&r--},this.items.length,0),new Xt(We.from(i.reverse()),o)}}Xt.empty=new Xt(We.empty,0);function yF(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class dn{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new dn(n.getMap().invert(),n,this.selection)}}}class nr{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const bF=20;function kF(t,e,n,r){let i=n.getMeta(ei),o;if(i)return i.historyState;n.getMeta(EF)&&(t=new nr(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(ei))return s.getMeta(ei).redo?new nr(t.done.addTransform(n,void 0,r,La(e)),t.undone,Og(n.mapping.maps),t.prevTime,t.prevComposition):new nr(t.done,t.undone.addTransform(n,void 0,r,La(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!wF(n,t.prevRanges)),u=s?Rc(t.prevRanges,n.mapping):Og(n.mapping.maps);return new nr(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,La(e)),Xt.empty,u,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new nr(t.done.rebased(n,o),t.undone.rebased(n,o),Rc(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new nr(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Rc(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function wF(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function Og(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function Rc(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function xF(t,e,n){let r=La(e),i=ei.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),l=new nr(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(ei,{redo:n,historyState:l})}let Pc=!1,Ag=null;function La(t){let e=t.plugins;if(Ag!=e){Pc=!1,Ag=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Pc=!0;break}}return Pc}const ei=new at("history"),EF=new at("closeHistory");function CF(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Ve({key:ei,state:{init(){return new nr(Xt.empty,Xt.empty,null,0,-1)},apply(e,n,r){return kF(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?Q0:r=="historyRedo"?ek:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function Z0(t,e){return(n,r)=>{let i=ei.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=xF(i,n,t);o&&r(o.scrollIntoView())}return!0}}const Q0=Z0(!1),ek=Z0(!0),SF=Ke.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Q0(t,e),redo:()=>({state:t,dispatch:e})=>ek(t,e)}},addProseMirrorPlugins(){return[CF(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),TF=rn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",et(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:i}=n,o=t();return r.parentOffset===0?o.insertContentAt({from:Math.max(r.pos-1,0),to:i.pos},{type:this.name}):x0(n)?o.insertContentAt(i.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({tr:s,dispatch:a})=>{var l;if(a){const{$to:u}=s.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?s.setSelection(oe.create(s.doc,u.pos+1)):u.nodeAfter.isBlock?s.setSelection(Y.create(s.doc,u.pos)):s.setSelection(oe.create(s.doc,u.pos));else{const d=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(s.insert(c,d),s.setSelection(oe.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[RI({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),OF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,AF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,MF=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,_F=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,DF=zn.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",et(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[to({find:OF,type:this.type}),to({find:MF,type:this.type})]},addPasteRules(){return[li({find:AF,type:this.type}),li({find:_F,type:this.type})]}}),NF=rn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",et(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),IF="listItem",Mg="textStyle",_g=/^(\d+)\.\s$/,RF=rn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",et(this.options.HTMLAttributes,n),0]:["ol",et(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(IF,this.editor.getAttributes(Mg)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=bs({find:_g,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=bs({find:_g,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Mg)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),PF=rn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",et(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),FF=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,LF=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,VF=zn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",et(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[to({find:FF,type:this.type})]},addPasteRules(){return[li({find:LF,type:this.type})]}}),BF=rn.create({name:"text",group:"inline"}),$F=Ke.create({name:"starterKit",addExtensions(){var t,e,n,r,i,o,s,a,l,u,c,d,h,p,f,m,g,y;const b=[];return this.options.bold!==!1&&b.push(KP.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&b.push(zP.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&b.push(JP.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(ZP.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(tF.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&b.push(nF.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&b.push(oF.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&b.push(hF.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&b.push(fF.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(mF.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&b.push(SF.configure((c=this.options)===null||c===void 0?void 0:c.history)),this.options.horizontalRule!==!1&&b.push(TF.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(DF.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&b.push(NF.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&b.push(RF.configure((f=this.options)===null||f===void 0?void 0:f.orderedList)),this.options.paragraph!==!1&&b.push(PF.configure((m=this.options)===null||m===void 0?void 0:m.paragraph)),this.options.strike!==!1&&b.push(VF.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&b.push(BF.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}}),jF={class:"k-richtext__menu"},AL=te({__name:"RichText",props:{modelValue:{default:""},disabled:{type:Boolean},actions:{default:()=>["heading2","bold","italic","orderedList","bulletList"]},placeholder:{default:"Write something..."}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=gP({extensions:[$F,$P.configure({placeholder:n.placeholder}),BP.configure({defaultProtocol:"https",protocols:["mailto"],HTMLAttributes:{class:"",rel:"noopener noreferrer nofollow",target:"_blank"}})],editable:!n.disabled,content:n.modelValue,onUpdate:({editor:a})=>{r("update:modelValue",a.getHTML())}}),o=N(()=>!i||!i.value?[]:[{id:"heading2",icon:"fa-pro-regular:heading",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleHeading({level:2}).run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("heading",{level:2})}},{id:"bold",icon:"fa-pro-regular:bold",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleBold().run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("bold")}},{id:"italic",icon:"fa-pro-regular:italic",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleItalic().run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("italic")}},{id:"orderedList",icon:"fa-pro-regular:list-ol",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleOrderedList().run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("orderedList")}},{id:"bulletList",icon:"fa-pro-regular:list-ul",action:()=>{var a;return(a=i.value)==null?void 0:a.chain().focus().toggleBulletList().run()},isActive:()=>{var a;return(a=i.value)==null?void 0:a.isActive("bulletList")}}].filter(a=>n.actions.includes(a.id))),s=Cn("k-richtext",{variants:{disabled:{true:"k-richtext--disabled"}}});return Ee(()=>n.modelValue,()=>{if(i.value&&i.value.getHTML()!==n.modelValue)return i.value.commands.setContent(n.modelValue)}),(a,l)=>(E(),O("div",{class:Ce($(s)({disabled:a.disabled}))},[H("div",jF,[he($y,{class:"k-richtext__menu-group",modelValue:[],multiple:!0},{default:Z(({getItemProps:u})=>[(E(!0),O(Ie,null,_t(o.value,c=>(E(),B(ze,{disabled:a.disabled,variant:"tertiary",class:"k-richtext__item","data-part":"item","data-state":`${c.isActive()?"on":"off"}`,onClick:()=>c.action(),icon:c.icon},null,8,["disabled","data-state","onClick","icon"]))),256))]),_:1})]),he($(mP),{editor:$(i),class:"k-richtext__editor"},null,8,["editor"])],2))}});function zF(t){return t%4===0&&t%100!==0||t%400===0}function HF(t=""){if(t.length===10){let e=t.replace(".","-").replace("/","-").split("-");if(e.length===3&&e[0].length===4){let n=parseInt(e[0]),r=parseInt(e[1]),i=parseInt(e[2]);if(r===2){if(zF(n)){if(i>29)return!1}else if(i>28)return!1}if((r===4||r===6||r===9||r===11)&&i>30)return!1}return!0}return!0}function _n(t){let e;if(typeof t=="number"&&(e=new Date(t),typeof e=="object"))return!0;if(e=new Date(t),typeof e=="object")return!(e.toString()==="Invalid Date"||!HF(t));var n=/^\d{4}\-\d{1,2}\-\d{1,2}$/;if(!n.test(t))return!1;var r=t.split("-"),i=parseInt(r[2],10),o=parseInt(r[1],10),s=parseInt(r[0],10);if(s<1e3||s>3e3||o==0||o>12)return!1;var a=[31,28,31,30,31,30,31,31,30,31,30,31];return(s%400==0||s%100!=0&&s%4==0)&&(a[1]=29),i>0&&i<=a[o-1]}var Kl={required:function(t){var e;return t==null?!1:(e=String(t).replace(/\s/g,""),e.length>0)},required_if:function(t,e,n){return e=this.getParameters(),this.validator._objectPath(this.validator.input,e[0])===e[1]?this.validator.getRule("required").validate(t):!0},required_unless:function(t,e,n){return e=this.getParameters(),this.validator._objectPath(this.validator.input,e[0])!==e[1]?this.validator.getRule("required").validate(t):!0},required_with:function(t,e,n){return this.validator._objectPath(this.validator.input,e)?this.validator.getRule("required").validate(t):!0},required_with_all:function(t,e,n){e=this.getParameters();for(var r=0;r<e.length;r++)if(!this.validator._objectPath(this.validator.input,e[r]))return!0;return this.validator.getRule("required").validate(t)},required_without:function(t,e,n){return this.validator._objectPath(this.validator.input,e)?!0:this.validator.getRule("required").validate(t)},required_without_all:function(t,e,n){e=this.getParameters();for(var r=0;r<e.length;r++)if(this.validator._objectPath(this.validator.input,e[r]))return!0;return this.validator.getRule("required").validate(t)},boolean:function(t){return t===!0||t===!1||t===0||t===1||t==="0"||t==="1"||t==="true"||t==="false"},size:function(t,e,n){if(t){e=parseFloat(e);var r=this.getSize();return r===e}return!0},string:function(t,e,n){return typeof t=="string"},sometimes:function(t){return!0},min:function(t,e,n){var r=this.getSize();return r>=e},max:function(t,e,n){var r=this.getSize();return r<=e},between:function(t,e,n){e=this.getParameters();var r=this.getSize(),i=parseFloat(e[0],10),o=parseFloat(e[1],10);return r>=i&&r<=o},email:function(t){var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e.test(t)||(e=/^((?:[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]|[^\u0000-\u007F])+@(?:[a-zA-Z0-9]|[^\u0000-\u007F])(?:(?:[a-zA-Z0-9-]|[^\u0000-\u007F]){0,61}(?:[a-zA-Z0-9]|[^\u0000-\u007F]))?(?:\.(?:[a-zA-Z0-9]|[^\u0000-\u007F])(?:(?:[a-zA-Z0-9-]|[^\u0000-\u007F]){0,61}(?:[a-zA-Z0-9]|[^\u0000-\u007F]))?)+)*$/),e.test(t)},numeric:function(t){var e;return e=Number(t),typeof e=="number"&&!isNaN(e)&&typeof t!="boolean"},array:function(t){return t instanceof Array},url:function(t){return/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_\+.~#?&/=]*)/i.test(t)},alpha:function(t){return/^[a-zA-Z]+$/.test(t)},alpha_dash:function(t){return/^[a-zA-Z0-9_\-]+$/.test(t)},alpha_num:function(t){return/^[a-zA-Z0-9]+$/.test(t)},same:function(t,e){var n=this.validator._flattenObject(this.validator.input)[e],r=t;return n===r},different:function(t,e){var n=this.validator._flattenObject(this.validator.input)[e],r=t;return n!==r},in:function(t,e){var n,r;if(t&&(n=this.getParameters()),t&&!(t instanceof Array)){var i=t;for(r=0;r<n.length;r++)if(typeof n[r]=="string"&&(i=String(t)),i===n[r])return!0;return!1}if(t&&t instanceof Array){for(r=0;r<t.length;r++)if(n.indexOf(t[r])<0)return!1}return!0},not_in:function(t,e){for(var n=this.getParameters(),r=n.length,i=!0,o=0;o<r;o++){var s=t;if(typeof n[o]=="string"&&(s=String(t)),s===n[o]){i=!1;break}}return i},accepted:function(t){return t==="on"||t==="yes"||t===1||t==="1"||t===!0},confirmed:function(t,e,n){var r=n+"_confirmation";return this.validator.input[r]===t},integer:function(t){return String(parseInt(t,10))===String(t)},digits:function(t,e){var n=this.validator.getRule("numeric");return!!(n.validate(t)&&String(t.trim()).length===parseInt(e))},digits_between:function(t){var e=this.validator.getRule("numeric"),n=this.getParameters(),r=String(t).length,i=parseFloat(n[0],10),o=parseFloat(n[1],10);return!!(e.validate(t)&&r>=i&&r<=o)},regex:function(t,e){var n=/[g|i|m]{1,3}$/,r=e.match(n);return r=r?r[0]:"",e=e.replace(n,"").slice(1,-1),e=new RegExp(e,r),!!e.test(t)},date:function(t,e){return _n(t)},present:function(t){return typeof t<"u"},after:function(t,e){var n=this.validator.input[e],r=t;return!_n(n)||!_n(r)?!1:new Date(n).getTime()<new Date(r).getTime()},after_or_equal:function(t,e){var n=this.validator.input[e],r=t;return!_n(n)||!_n(r)?!1:new Date(n).getTime()<=new Date(r).getTime()},before:function(t,e){var n=this.validator.input[e],r=t;return!_n(n)||!_n(r)?!1:new Date(n).getTime()>new Date(r).getTime()},before_or_equal:function(t,e){var n=this.validator.input[e],r=t;return!_n(n)||!_n(r)?!1:new Date(n).getTime()>=new Date(r).getTime()},hex:function(t){return/^[0-9a-f]+$/i.test(t)},ipv4:function(t,e,n){if(typeof t!="string")return!1;var r=/^[0-9]+$/;if(octets=t.split("."),octets.length!=4)return!1;for(let o=0;o<octets.length;o++){const s=octets[o];if(!r.test(s))return!1;var i=parseInt(s);if(i>=256)return!1}return!0},ipv6:function(t,e,n){if(typeof t!="string")return!1;var r=/^[0-9a-f]+$/;if(hextets=t.split(":"),colons=t.match(/::/),colons!=null&&t.match(/::/g).length>1||t[0]==":"&&(colons==null||colons!=null&&colons.index!=0)||t[t.length-1]==":"&&(colons==null||colons!=null&&colons.index!=t.length-2)||3>hextets.length)return!1;var i=hextets.length==9&&colons!=null&&(colons.index==0||colons.index==t.length-2);if(hextets.length>8&&!i||hextets.length!=8&&colons==null)return!1;for(let o=0;o<hextets.length;o++){const s=hextets[o];if(s.length!=0&&(!r.test(s)||s.length>4))return!1}return!0},ip:function(t,e,n){return Kl.ipv4(t,e,n)||Kl.ipv6(t,e,n)}},tk=function(){throw new Error("Validator `"+this.name+"` is not defined!")},nk;function rk(t,e,n){this.name=t,this.fn=e,this.passes=null,this._customMessage=void 0,this.async=n}rk.prototype={validate:function(t,e,n,r){var i=this;if(this._setValidatingData(n,t,e),typeof r=="function"){this.callback=r;var o=function(s,a){i.response(s,a)};return this.async?this._apply(t,e,n,o):o(this._apply(t,e,n))}return this._apply(t,e,n)},_apply:function(t,e,n,r){var i=this.isMissed()?tk:this.fn;return i.apply(this,[t,e,n,r])},_setValidatingData:function(t,e,n){this.attribute=t,this.inputValue=e,this.ruleValue=n},getParameters:function(){var t=[];return typeof this.ruleValue=="string"&&(t=this.ruleValue.split(",")),typeof this.ruleValue=="number"&&t.push(this.ruleValue),this.ruleValue instanceof Array&&(t=this.ruleValue),t},getSize:function(){var t=this.inputValue;return t instanceof Array?t.length:typeof t=="number"?t:this.validator._hasNumericRule(this.attribute)?parseFloat(t,10):t.length},_getValueType:function(){return typeof this.inputValue=="number"||this.validator._hasNumericRule(this.attribute)?"numeric":"string"},response:function(t,e){this.passes=t===void 0||t===!0,this._customMessage=e,this.callback(this.passes,e)},setValidator:function(t){this.validator=t},isMissed:function(){return typeof this.fn!="function"},get customMessage(){return this.isMissed()?nk:this._customMessage}};var qF={asyncRules:[],implicitRules:["required","required_if","required_unless","required_with","required_with_all","required_without","required_without_all","accepted","present"],make:function(t,e){var n=this.isAsync(t),r=new rk(t,Kl[t],n);return r.setValidator(e),r},isAsync:function(t){for(var e=0,n=this.asyncRules.length;e<n;e++)if(this.asyncRules[e]===t)return!0;return!1},isImplicit:function(t){return this.implicitRules.indexOf(t)>-1},register:function(t,e){Kl[t]=e},registerImplicit:function(t,e){this.register(t,e),this.implicitRules.push(t)},registerAsync:function(t,e){this.register(t,e),this.asyncRules.push(t)},registerAsyncImplicit:function(t,e){this.registerImplicit(t,e),this.asyncRules.push(t)},registerMissedRuleValidator:function(t,e){tk=t,nk=e}},WF=qF;function UF(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var KF={between:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{min:n[0],max:n[1]})},digits_between:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{min:n[0],max:n[1]})},required_if:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{other:this._getAttributeName(n[0]),value:n[1]})},required_unless:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{other:this._getAttributeName(n[0]),value:n[1]})},required_with:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{field:this._getAttributeName(n[0])})},required_with_all:function(t,e){var n=e.getParameters(),r=this._getAttributeName.bind(this);return this._replacePlaceholders(e,t,{fields:n.map(r).join(", ")})},required_without:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{field:this._getAttributeName(n[0])})},required_without_all:function(t,e){var n=e.getParameters(),r=this._getAttributeName.bind(this);return this._replacePlaceholders(e,t,{fields:n.map(r).join(", ")})},after:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{after:this._getAttributeName(n[0])})},before:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{before:this._getAttributeName(n[0])})},after_or_equal:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{after_or_equal:this._getAttributeName(n[0])})},before_or_equal:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{before_or_equal:this._getAttributeName(n[0])})},same:function(t,e){var n=e.getParameters();return this._replacePlaceholders(e,t,{same:this._getAttributeName(n[0])})}};function GF(t){return t.replace(/[_\[]/g," ").replace(/]/g,"")}var ik={replacements:KF,formatter:GF},Dg=ik,Gd=function(t,e){this.lang=t,this.messages=e,this.customMessages={},this.attributeNames={}};Gd.prototype={constructor:Gd,_setCustom:function(t){this.customMessages=t||{}},_setAttributeNames:function(t){this.attributeNames=t},_setAttributeFormatter:function(t){this.attributeFormatter=t},_getAttributeName:function(t){var e=t;return this.attributeNames.hasOwnProperty(t)?this.attributeNames[t]:(this.messages.attributes.hasOwnProperty(t)&&(e=this.messages.attributes[t]),this.attributeFormatter&&(e=this.attributeFormatter(e)),e)},all:function(){return this.messages},render:function(t){if(t.customMessage)return t.customMessage;var e=this._getTemplate(t),n;return Dg.replacements[t.name]?n=Dg.replacements[t.name].apply(this,[e,t]):n=this._replacePlaceholders(t,e,{}),n},_getTemplate:function(t){for(var e=this.messages,n=e.def,r=this.customMessages,i=[t.name+"."+t.attribute,t.name],o=0,s;o<i.length;o++)if(s=i[o],r.hasOwnProperty(s)){n=r[s];break}else if(e.hasOwnProperty(s)){n=e[s];break}return typeof n=="object"&&(n=n[t._getValueType()]),n},_replacePlaceholders:function(t,e,n){var r,i;if(n.attribute=this._getAttributeName(t.attribute),n[t.name]=n[t.name]||t.getParameters().join(","),typeof e=="string"&&typeof n=="object"){r=e;for(i in n)r=r.replace(new RegExp(":"+i,"g"),n[i])}return r}};var JF=Gd,XF={accepted:"The :attribute must be accepted.",after:"The :attribute must be after :after.",after_or_equal:"The :attribute must be equal or after :after_or_equal.",alpha:"The :attribute field must contain only alphabetic characters.",alpha_dash:"The :attribute field may only contain alpha-numeric characters, as well as dashes and underscores.",alpha_num:"The :attribute field must be alphanumeric.",before:"The :attribute must be before :before.",before_or_equal:"The :attribute must be equal or before :before_or_equal.",between:{numeric:"The :attribute field must be between :min and :max.",string:"The :attribute field must be between :min and :max characters."},confirmed:"The :attribute confirmation does not match.",email:"The :attribute format is invalid.",date:"The :attribute is not a valid date format.",def:"The :attribute attribute has errors.",digits:"The :attribute must be :digits digits.",digits_between:"The :attribute field must be between :min and :max digits.",different:"The :attribute and :different must be different.",in:"The selected :attribute is invalid.",integer:"The :attribute must be an integer.",hex:"The :attribute field should have hexadecimal format",min:{numeric:"The :attribute must be at least :min.",string:"The :attribute must be at least :min characters."},max:{numeric:"The :attribute may not be greater than :max.",string:"The :attribute may not be greater than :max characters."},not_in:"The selected :attribute is invalid.",numeric:"The :attribute must be a number.",present:"The :attribute field must be present (but can be empty).",required:"The :attribute field is required.",required_if:"The :attribute field is required when :other is :value.",required_unless:"The :attribute field is required when :other is not :value.",required_with:"The :attribute field is required when :field is not empty.",required_with_all:"The :attribute field is required when :fields are not empty.",required_without:"The :attribute field is required when :field is empty.",required_without_all:"The :attribute field is required when :fields are empty.",same:"The :attribute and :same fields must match.",size:{numeric:"The :attribute must be :size.",string:"The :attribute must be :size characters."},string:"The :attribute must be a string.",url:"The :attribute format is invalid.",regex:"The :attribute format is invalid.",attributes:{}};const YF=hu(XF);var ZF=JF,QF=UF,eL={messages:{},_set:function(t,e){this.messages[t]=e},_setRuleMessage:function(t,e,n){this._load(t),n===void 0&&(n=this.messages[t].def),this.messages[t][e]=n},_load:function(t){if(!this.messages[t])try{var e=QF("./lang/"+t);this._set(t,e)}catch{}},_get:function(t){return this._load(t),this.messages[t]},_make:function(t){return this._load(t),new ZF(t,this.messages[t])}},ok=eL;const sk=hu(ok);var Jd=function(){this.errors={}};Jd.prototype={constructor:Jd,add:function(t,e){this.has(t)||(this.errors[t]=[]),this.errors[t].indexOf(e)===-1&&this.errors[t].push(e)},get:function(t){return this.has(t)?this.errors[t]:[]},first:function(t){return this.has(t)?this.errors[t][0]:!1},all:function(){return this.errors},has:function(t){return!!this.errors.hasOwnProperty(t)}};var tL=Jd;function ak(t,e){this.onResolvedAll=e,this.onFailedOne=t,this.resolvers={},this.resolversCount=0,this.passed=[],this.failed=[],this.firing=!1}ak.prototype={add:function(t){var e=this.resolversCount;return this.resolvers[e]=t,this.resolversCount++,e},resolve:function(t){var e=this.resolvers[t];e.passes===!0?this.passed.push(e):e.passes===!1&&(this.failed.push(e),this.onFailedOne(e)),this.fire()},isAllResolved:function(){return this.passed.length+this.failed.length===this.resolversCount},fire:function(){this.firing&&this.isAllResolved()&&this.onResolvedAll(this.failed.length===0)},enableFiring:function(){this.firing=!0}};var nL=ak,br=WF,mi=ok,rL=tL,iL=ik,oL=nL,Le=function(t,e,n){var r=Le.getDefaultLang();this.input=t||{},this.messages=mi._make(r),this.messages._setCustom(n),this.setAttributeFormatter(Le.prototype.attributeFormatter),this.errors=new rL,this.errorCount=0,this.hasAsync=!1,this.rules=this._parseRules(e)};Le.prototype={constructor:Le,lang:"en",numericRules:["integer","numeric"],attributeFormatter:iL.formatter,check:function(){for(var t in this.rules){var e=this.rules[t],n=this._objectPath(this.input,t);if(!(this._hasRule(t,["sometimes"])&&!this._suppliedWithData(t)))for(var r=0,i=e.length,o,s,a;r<i&&(s=e[r],o=this.getRule(s.name),!(this._isValidatable(o,n)&&(a=o.validate(n,s.value,t),a||this._addFailure(o),this._shouldStopValidating(t,a))));r++);}return this.errorCount===0},checkAsync:function(t,e){var n=this;t=t||function(){},e=e||function(){};var r=function(f,m){n._addFailure(f,m)},i=function(f){f?t():e()},o=new oL(r,i),s=function(f,m,g,y){return function(){var b=o.add(y);y.validate(f,m.value,g,function(){o.resolve(b)})}};for(var a in this.rules){var l=this.rules[a],u=this._objectPath(this.input,a);if(!(this._hasRule(a,["sometimes"])&&!this._suppliedWithData(a)))for(var c=0,d=l.length,h,p;c<d;c++)p=l[c],h=this.getRule(p.name),this._isValidatable(h,u)&&s(u,p,a,h)()}o.enableFiring(),o.fire()},_addFailure:function(t){var e=this.messages.render(t);this.errors.add(t.attribute,e),this.errorCount++},_flattenObject:function(t){var e={};function n(r,i){if(!(!i&&Object.getOwnPropertyNames(r).length===0))if(Object(r)!==r||Array.isArray(r))e[i]=r;else{var o=!0;for(var s in r)o=!1,n(r[s],i?i+"."+s:s);o&&(e[i]={})}}return t&&n(t),e},_objectPath:function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];var n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i]);for(var o=0,s=n.length;o<s;o++)if(typeof r=="object"&&r!==null&&Object.hasOwnProperty.call(r,n[o]))r=r[n[o]];else return;return r},_parseRules:function(t){var e={};t=this._flattenObject(t);for(var n in t){var r=t[n];this._parseRulesCheck(n,r,e)}return e},_parseRulesCheck:function(t,e,n,r){t.indexOf("*")>-1?this._parsedRulesRecurse(t,e,n,r):this._parseRulesDefault(t,e,n,r)},_parsedRulesRecurse:function(t,e,n,r){var i=t.substr(0,t.indexOf("*")-1),o=this._objectPath(this.input,i);if(o)for(var s=0;s<o.length;s++){var a=r?r.slice():[];a.push(s),this._parseRulesCheck(t.replace("*",s),e,n,a)}},_parseRulesDefault:function(t,e,n,r){var i=[];e instanceof Array&&(e=this._prepareRulesArray(e)),typeof e=="string"&&(e=e.split("|"));for(var o=0,s=e.length,a;o<s;o++)a=typeof e[o]=="string"?this._extractRuleAndRuleValue(e[o]):e[o],a.value&&(a.value=this._replaceWildCards(a.value,r),this._replaceWildCardsMessages(r)),br.isAsync(a.name)&&(this.hasAsync=!0),i.push(a);n[t]=i},_replaceWildCards:function(t,e){if(!e)return t;var n=t;return e.forEach(function(r){Array.isArray(n)&&(n=n[0]);const i=n.indexOf("*");if(i===-1)return n;n=n.substr(0,i)+r+n.substr(i+1)}),Array.isArray(t)&&(t[0]=n,n=t),n},_replaceWildCardsMessages:function(t){var e=this.messages.customMessages,n=this;Object.keys(e).forEach(function(r){if(t){var i=n._replaceWildCards(r,t);e[i]=e[r]}}),this.messages._setCustom(e)},_prepareRulesArray:function(t){for(var e=[],n=0,r=t.length;n<r;n++)if(typeof t[n]=="object")for(var i in t[n])e.push({name:i,value:t[n][i]});else e.push(t[n]);return e},_suppliedWithData:function(t){return this.input.hasOwnProperty(t)},_extractRuleAndRuleValue:function(t){var e={},n;return e.name=t,t.indexOf(":")>=0&&(n=t.split(":"),e.name=n[0],e.value=n.slice(1).join(":")),e},_hasRule:function(t,e){for(var n=this.rules[t]||[],r=0,i=n.length;r<i;r++)if(e.indexOf(n[r].name)>-1)return!0;return!1},_hasNumericRule:function(t){return this._hasRule(t,this.numericRules)},_isValidatable:function(t,e){return Array.isArray(e)||br.isImplicit(t.name)?!0:this.getRule("required").validate(e)},_shouldStopValidating:function(t,e){var n=this.stopOnAttributes;return typeof n>"u"||n===!1||e===!0?!1:n instanceof Array?n.indexOf(t)>-1:!0},setAttributeNames:function(t){this.messages._setAttributeNames(t)},setAttributeFormatter:function(t){this.messages._setAttributeFormatter(t)},getRule:function(t){return br.make(t,this)},stopOnError:function(t){this.stopOnAttributes=t},passes:function(t){var e=this._checkAsync("passes",t);return e?this.checkAsync(t):this.check()},fails:function(t){var e=this._checkAsync("fails",t);return e?this.checkAsync(function(){},t):!this.check()},_checkAsync:function(t,e){var n=typeof e=="function";if(this.hasAsync&&!n)throw t+" expects a callback when async rules are being tested.";return this.hasAsync||n}};Le.setMessages=function(t,e){return mi._set(t,e),this};Le.getMessages=function(t){return mi._get(t)};Le.useLang=function(t){this.prototype.lang=t};Le.getDefaultLang=function(){return this.prototype.lang};Le.setAttributeFormatter=function(t){this.prototype.attributeFormatter=t};Le.stopOnError=function(t){this.prototype.stopOnAttributes=t};Le.register=function(t,e,n,r){var i=Le.getDefaultLang();br.register(t,e),mi._setRuleMessage(i,t,n)};Le.registerImplicit=function(t,e,n,r){var i=Le.getDefaultLang();br.registerImplicit(t,e),mi._setRuleMessage(i,t,n)};Le.registerAsync=function(t,e,n,r){var i=Le.getDefaultLang();br.registerAsync(t,e),mi._setRuleMessage(i,t,n)};Le.registerAsyncImplicit=function(t,e,n){var r=Le.getDefaultLang();br.registerAsyncImplicit(t,e),mi._setRuleMessage(r,t,n)};Le.registerMissedRuleValidator=function(t,e){br.registerMissedRuleValidator(t,e)};var sL=Le;const cr=hu(sL);sk._set("en",YF);cr.useLang("en");const Xd=X(!1),aL=t=>{Xd.value=!Xd.value,sk._set("default",t),cr.useLang("default")},lL=(t,e)=>Object.fromEntries(Object.entries(t).map(([n,r])=>{const i=n.split(".").pop();return[n,e(i)]})),Yd=(t,e={})=>{const{rule:n="required",prefix:r=""}=e;let i={};return Object.entries(t).forEach(([o,s])=>{const a=r+o;if(Dw(s)){s.map((l,u)=>{i=Object.assign(i,Yd(l,{rule:n,prefix:`${a}.${u}.`}))});return}if(_w(s)){i=Object.assign(i,Yd(s,{rule:n,prefix:`${a}.`}));return}i[a]=n}),i},uL=cr.register,cL=cr.registerAsync;function dL(t={}){const{rules:e,labels:n,data:r,customMessages:i,visitImmediate:o=!1}=t;if(i){let m=cr.getMessages("default");Object.entries(i.value).forEach(([g,y])=>m[g]=y),cr.setMessages("default",m)}let s=new cr({},{}),a=()=>Object.fromEntries(Object.keys(e.value).map(m=>[m,{rule:e.value[m],valid:!c.value.get(m).length,error:c.value.first(m)||void 0,visited:l.value[m]}])),l=X(o?Object.fromEntries(Object.keys(e.value).map(m=>[m,!0])):{}),u=X(!0),c=X(s.errors),d=N(()=>a());function h(m){var g;let y=(g=d.value)==null?void 0:g[m];const b={valid:!0,error:void 0};return!y||!y.visited?b:y}let p=()=>{let m=new cr(r.value,e.value);n&&m.setAttributeNames(n.value);const g=()=>{c.value=s.errors,u.value=!0},y=()=>{u.value=!1,c.value=m.errors};m.checkAsync(g,y)};Ee([r,Xd],p,{deep:!0,immediate:!0});const f=m=>{if(!m)return!1;const g=typeof m=="string"?m.split("|"):Array.isArray(m)?m:[],y={required:()=>!0,required_if:(b,k)=>r.value[b]===k,required_unless:(b,k)=>r.value[b]!==k,required_with:b=>b.some(k=>k in r.value),required_with_all:b=>b.every(k=>k in r.value),required_without:b=>b.some(k=>!(k in r.value)),required_without_all:b=>b.every(k=>!(k in r.value))};for(const b of g){if(typeof b=="string"){if(b==="required")return y.required;const[k,...v]=b.split(":");if(y[k]){const w=v.map(x=>["true",!0,"false",!1].includes(x)?JSON.parse(x):x);return y[k](...w)}}if(typeof b=="object"){for(const[k,v]of Object.entries(b))if(y[k])return Array.isArray(v)?y[k](...v):y[k](v)}}return!1};return{onChange:p,errors:c,passes:u,fields:d,bind:m=>({onBlur:()=>l.value[m]=!0,error:h(m).error,required:f(e.value[m])})}}const ML=Object.freeze(Object.defineProperty({__proto__:null,default:dL,generateLabels:lL,generateRules:Yd,register:uL,registerAsync:cL,setLabels:aL},Symbol.toStringTag,{value:"Module"}));export{du as $,Qg as C,AL as E,dL as G,fL as Q,ze as S,sT as U,su as V,hL as X,mE as Z,ni as _,N1 as a,gL as b,bL as c,kL as d,vL as e,wL as f,TL as g,mL as i,OL as k,yL as l,EL as m,xL as p,Ze as q,Yh as r,IE as s,CL as v,ML as x,SL as y};
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  const Pe="Cancel",Me="Confirm",Re=`
2
- Font associated with selected theme template`,We="Body font",Ne="Heading font",He="Preview",Ye="Preview not available",$e="Back",ze="Highlighted icons",qe="Icon | Icons",Ke="Search in English for icon you are looking for, for example 'Helicopter'.",Ve="Hits",Xe="No icons to match your search.",Ge="Load all elements",Je="Main title",Qe="Secondary title",Ze="Select",et="Select icon",tt={cancel:Pe,confirm:Me,"fa-pro-brands":"Brands icons","fa-pro-duotone":"Duotone icons","fa-pro-light":"Light icons","fa-pro-regular":"Regular icons","fa-pro-solid":"Solid icons",fontAssociatedWithSelectedThemeTemplate:Re,fontForBody:We,fontForHeading:Ne,fontPreview:He,fontPreviewDisabled:Ye,goBack:$e,highlightedIcons:ze,icon:qe,iconSelectWidgetHelpText:Ke,iconsSelectWidgetIconsFound:Ve,iconsSelectWidgetNoIconsMatchYourSearch:Xe,loadAllElements:Ge,primaryTitle:Je,secondaryTitle:Qe,select:Ze,selectIcon:et},rt="Avbryt",nt="Bekreft",ot="Font tilknyttet valgt tema mal",it="Skrifttype for mengdetekst",at="Skrifttype for tittel",st="Forhåndsvisning",ut="Forhåndsvisning ikke tilgjengelig",ft="Gå tilbake",ct="Fremhevede ikoner",lt="Ikon | Ikoner",ht="Søk på engelsk etter ikonet du leter etter. Eks. 'Helicopter'",dt="treff",gt="Ingen ikoner passer søket ditt.",pt="Last inn alle",mt="Hovedtittel",yt="Sekundærtittel",wt="Velg",bt="Velg ikon",vt={cancel:rt,confirm:nt,"fa-pro-brands":"Merkevare ikoner","fa-pro-duotone":"Duofargede ikoner","fa-pro-light":"Tynne ikoner","fa-pro-regular":"Normale ikoner","fa-pro-solid":"Ikoner med heldekkende farge",fontAssociatedWithSelectedThemeTemplate:ot,fontForBody:it,fontForHeading:at,fontPreview:st,fontPreviewDisabled:ut,goBack:ft,highlightedIcons:ct,icon:lt,iconSelectWidgetHelpText:ht,iconsSelectWidgetIconsFound:dt,iconsSelectWidgetNoIconsMatchYourSearch:gt,loadAllElements:pt,primaryTitle:mt,secondaryTitle:yt,select:wt,selectIcon:bt};function Et(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function he(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Te={exports:{}};(function(s,a){(function(o){s.exports=o()})(function(){return function o(u,l,d){function U(x,F){if(!l[x]){if(!u[x]){var P=typeof he=="function"&&he;if(!F&&P)return P(x,!0);if(j)return j(x,!0);throw new Error("Cannot find module '"+x+"'")}F=l[x]={exports:{}},u[x][0].call(F.exports,function(R){var W=u[x][1][R];return U(W||R)},F,F.exports,o,u,l,d)}return l[x].exports}for(var j=typeof he=="function"&&he,S=0;S<d.length;S++)U(d[S]);return U}({1:[function(o,u,l){(function(d,U,j,S,x,F,P,R,W){var y=o("crypto");function T(c,m){m=_(c,m);var r;return(r=m.algorithm!=="passthrough"?y.createHash(m.algorithm):new k).write===void 0&&(r.write=r.update,r.end=r.update),v(m,r).dispatch(c),r.update||r.end(""),r.digest?r.digest(m.encoding==="buffer"?void 0:m.encoding):(c=r.read(),m.encoding!=="buffer"?c.toString(m.encoding):c)}(l=u.exports=T).sha1=function(c){return T(c)},l.keys=function(c){return T(c,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},l.MD5=function(c){return T(c,{algorithm:"md5",encoding:"hex"})},l.keysMD5=function(c){return T(c,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var g=y.getHashes?y.getHashes().slice():["sha1","md5"],E=(g.push("passthrough"),["buffer","hex","binary","base64"]);function _(c,m){var r={};if(r.algorithm=(m=m||{}).algorithm||"sha1",r.encoding=m.encoding||"hex",r.excludeValues=!!m.excludeValues,r.algorithm=r.algorithm.toLowerCase(),r.encoding=r.encoding.toLowerCase(),r.ignoreUnknown=m.ignoreUnknown===!0,r.respectType=m.respectType!==!1,r.respectFunctionNames=m.respectFunctionNames!==!1,r.respectFunctionProperties=m.respectFunctionProperties!==!1,r.unorderedArrays=m.unorderedArrays===!0,r.unorderedSets=m.unorderedSets!==!1,r.unorderedObjects=m.unorderedObjects!==!1,r.replacer=m.replacer||void 0,r.excludeKeys=m.excludeKeys||void 0,c===void 0)throw new Error("Object argument required.");for(var i=0;i<g.length;++i)g[i].toLowerCase()===r.algorithm.toLowerCase()&&(r.algorithm=g[i]);if(g.indexOf(r.algorithm)===-1)throw new Error('Algorithm "'+r.algorithm+'" not supported. supported values: '+g.join(", "));if(E.indexOf(r.encoding)===-1&&r.algorithm!=="passthrough")throw new Error('Encoding "'+r.encoding+'" not supported. supported values: '+E.join(", "));return r}function I(c){if(typeof c=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(c))!=null}function v(c,m,r){r=r||[];function i(t){return m.update?m.update(t,"utf8"):m.write(t,"utf8")}return{dispatch:function(t){return this["_"+((t=c.replacer?c.replacer(t):t)===null?"null":typeof t)](t)},_object:function(t){var h,p=Object.prototype.toString.call(t),O=/\[object (.*)\]/i.exec(p);if(O=(O=O?O[1]:"unknown:["+p+"]").toLowerCase(),0<=(p=r.indexOf(t)))return this.dispatch("[CIRCULAR:"+p+"]");if(r.push(t),j!==void 0&&j.isBuffer&&j.isBuffer(t))return i("buffer:"),i(t);if(O==="object"||O==="function"||O==="asyncfunction")return p=Object.keys(t),c.unorderedObjects&&(p=p.sort()),c.respectType===!1||I(t)||p.splice(0,0,"prototype","__proto__","constructor"),c.excludeKeys&&(p=p.filter(function(C){return!c.excludeKeys(C)})),i("object:"+p.length+":"),h=this,p.forEach(function(C){h.dispatch(C),i(":"),c.excludeValues||h.dispatch(t[C]),i(",")});if(!this["_"+O]){if(c.ignoreUnknown)return i("["+O+"]");throw new Error('Unknown object type "'+O+'"')}this["_"+O](t)},_array:function(t,C){C=C!==void 0?C:c.unorderedArrays!==!1;var p=this;if(i("array:"+t.length+":"),!C||t.length<=1)return t.forEach(function(D){return p.dispatch(D)});var O=[],C=t.map(function(D){var L=new k,N=r.slice();return v(c,L,N).dispatch(D),O=O.concat(N.slice(r.length)),L.read().toString()});return r=r.concat(O),C.sort(),this._array(C,!1)},_date:function(t){return i("date:"+t.toJSON())},_symbol:function(t){return i("symbol:"+t.toString())},_error:function(t){return i("error:"+t.toString())},_boolean:function(t){return i("bool:"+t.toString())},_string:function(t){i("string:"+t.length+":"),i(t.toString())},_function:function(t){i("fn:"),I(t)?this.dispatch("[native]"):this.dispatch(t.toString()),c.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(t.name)),c.respectFunctionProperties&&this._object(t)},_number:function(t){return i("number:"+t.toString())},_xml:function(t){return i("xml:"+t.toString())},_null:function(){return i("Null")},_undefined:function(){return i("Undefined")},_regexp:function(t){return i("regex:"+t.toString())},_uint8array:function(t){return i("uint8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint8clampedarray:function(t){return i("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(t))},_int8array:function(t){return i("int8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint16array:function(t){return i("uint16array:"),this.dispatch(Array.prototype.slice.call(t))},_int16array:function(t){return i("int16array:"),this.dispatch(Array.prototype.slice.call(t))},_uint32array:function(t){return i("uint32array:"),this.dispatch(Array.prototype.slice.call(t))},_int32array:function(t){return i("int32array:"),this.dispatch(Array.prototype.slice.call(t))},_float32array:function(t){return i("float32array:"),this.dispatch(Array.prototype.slice.call(t))},_float64array:function(t){return i("float64array:"),this.dispatch(Array.prototype.slice.call(t))},_arraybuffer:function(t){return i("arraybuffer:"),this.dispatch(new Uint8Array(t))},_url:function(t){return i("url:"+t.toString())},_map:function(t){return i("map:"),t=Array.from(t),this._array(t,c.unorderedSets!==!1)},_set:function(t){return i("set:"),t=Array.from(t),this._array(t,c.unorderedSets!==!1)},_file:function(t){return i("file:"),this.dispatch([t.name,t.size,t.type,t.lastModfied])},_blob:function(){if(c.ignoreUnknown)return i("[blob]");throw Error(`Hashing Blob objects is currently not supported
2
+ Font associated with selected theme template`,We="Body font",Ne="Heading font",He="Preview",Ye="Preview not available",$e="Back",ze="Highlighted icons",qe="Icon | Icons",Ke="Search in English for icon you are looking for, for example 'Helicopter'.",Ve="Hits",Xe="No icons to match your search.",Ge="Load all elements",Je="Main title",Qe="Secondary title",Ze="Select",et="Select icon",tt={cancel:Pe,confirm:Me,"fa-pro-brands":"Brands icons","fa-pro-duotone":"Duotone icons","fa-pro-light":"Light icons","fa-pro-regular":"Regular icons","fa-pro-solid":"Solid icons",fontAssociatedWithSelectedThemeTemplate:Re,fontForBody:We,fontForHeading:Ne,fontPreview:He,fontPreviewDisabled:Ye,goBack:$e,highlightedIcons:ze,icon:qe,iconSelectWidgetHelpText:Ke,iconsSelectWidgetIconsFound:Ve,iconsSelectWidgetNoIconsMatchYourSearch:Xe,loadAllElements:Ge,primaryTitle:Je,secondaryTitle:Qe,select:Ze,selectIcon:et},rt="Avbryt",nt="Bekreft",ot="Font tilknyttet valgt tema mal",it="Skrifttype for mengdetekst",at="Skrifttype for tittel",st="Forhåndsvisning",ut="Forhåndsvisning ikke tilgjengelig",ft="Gå tilbake",ct="Fremhevede ikoner",lt="Ikon | Ikoner",ht="Søk på engelsk etter ikonet du leter etter. Eks. 'Helicopter'",dt="treff",pt="Ingen ikoner passer søket ditt.",gt="Last inn alle",mt="Hovedtittel",yt="Sekundærtittel",wt="Velg",bt="Velg ikon",vt={cancel:rt,confirm:nt,"fa-pro-brands":"Merkevare ikoner","fa-pro-duotone":"Duofargede ikoner","fa-pro-light":"Tynne ikoner","fa-pro-regular":"Normale ikoner","fa-pro-solid":"Ikoner med heldekkende farge",fontAssociatedWithSelectedThemeTemplate:ot,fontForBody:it,fontForHeading:at,fontPreview:st,fontPreviewDisabled:ut,goBack:ft,highlightedIcons:ct,icon:lt,iconSelectWidgetHelpText:ht,iconsSelectWidgetIconsFound:dt,iconsSelectWidgetNoIconsMatchYourSearch:pt,loadAllElements:gt,primaryTitle:mt,secondaryTitle:yt,select:wt,selectIcon:bt};function Et(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function he(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var je={exports:{}};(function(s,a){(function(o){s.exports=o()})(function(){return function o(u,l,d){function U(x,F){if(!l[x]){if(!u[x]){var P=typeof he=="function"&&he;if(!F&&P)return P(x,!0);if(T)return T(x,!0);throw new Error("Cannot find module '"+x+"'")}F=l[x]={exports:{}},u[x][0].call(F.exports,function(R){var W=u[x][1][R];return U(W||R)},F,F.exports,o,u,l,d)}return l[x].exports}for(var T=typeof he=="function"&&he,S=0;S<d.length;S++)U(d[S]);return U}({1:[function(o,u,l){(function(d,U,T,S,x,F,P,R,W){var y=o("crypto");function j(c,m){m=_(c,m);var r;return(r=m.algorithm!=="passthrough"?y.createHash(m.algorithm):new k).write===void 0&&(r.write=r.update,r.end=r.update),v(m,r).dispatch(c),r.update||r.end(""),r.digest?r.digest(m.encoding==="buffer"?void 0:m.encoding):(c=r.read(),m.encoding!=="buffer"?c.toString(m.encoding):c)}(l=u.exports=j).sha1=function(c){return j(c)},l.keys=function(c){return j(c,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},l.MD5=function(c){return j(c,{algorithm:"md5",encoding:"hex"})},l.keysMD5=function(c){return j(c,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var p=y.getHashes?y.getHashes().slice():["sha1","md5"],E=(p.push("passthrough"),["buffer","hex","binary","base64"]);function _(c,m){var r={};if(r.algorithm=(m=m||{}).algorithm||"sha1",r.encoding=m.encoding||"hex",r.excludeValues=!!m.excludeValues,r.algorithm=r.algorithm.toLowerCase(),r.encoding=r.encoding.toLowerCase(),r.ignoreUnknown=m.ignoreUnknown===!0,r.respectType=m.respectType!==!1,r.respectFunctionNames=m.respectFunctionNames!==!1,r.respectFunctionProperties=m.respectFunctionProperties!==!1,r.unorderedArrays=m.unorderedArrays===!0,r.unorderedSets=m.unorderedSets!==!1,r.unorderedObjects=m.unorderedObjects!==!1,r.replacer=m.replacer||void 0,r.excludeKeys=m.excludeKeys||void 0,c===void 0)throw new Error("Object argument required.");for(var i=0;i<p.length;++i)p[i].toLowerCase()===r.algorithm.toLowerCase()&&(r.algorithm=p[i]);if(p.indexOf(r.algorithm)===-1)throw new Error('Algorithm "'+r.algorithm+'" not supported. supported values: '+p.join(", "));if(E.indexOf(r.encoding)===-1&&r.algorithm!=="passthrough")throw new Error('Encoding "'+r.encoding+'" not supported. supported values: '+E.join(", "));return r}function I(c){if(typeof c=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(c))!=null}function v(c,m,r){r=r||[];function i(t){return m.update?m.update(t,"utf8"):m.write(t,"utf8")}return{dispatch:function(t){return this["_"+((t=c.replacer?c.replacer(t):t)===null?"null":typeof t)](t)},_object:function(t){var h,g=Object.prototype.toString.call(t),D=/\[object (.*)\]/i.exec(g);if(D=(D=D?D[1]:"unknown:["+g+"]").toLowerCase(),0<=(g=r.indexOf(t)))return this.dispatch("[CIRCULAR:"+g+"]");if(r.push(t),T!==void 0&&T.isBuffer&&T.isBuffer(t))return i("buffer:"),i(t);if(D==="object"||D==="function"||D==="asyncfunction")return g=Object.keys(t),c.unorderedObjects&&(g=g.sort()),c.respectType===!1||I(t)||g.splice(0,0,"prototype","__proto__","constructor"),c.excludeKeys&&(g=g.filter(function(C){return!c.excludeKeys(C)})),i("object:"+g.length+":"),h=this,g.forEach(function(C){h.dispatch(C),i(":"),c.excludeValues||h.dispatch(t[C]),i(",")});if(!this["_"+D]){if(c.ignoreUnknown)return i("["+D+"]");throw new Error('Unknown object type "'+D+'"')}this["_"+D](t)},_array:function(t,C){C=C!==void 0?C:c.unorderedArrays!==!1;var g=this;if(i("array:"+t.length+":"),!C||t.length<=1)return t.forEach(function(O){return g.dispatch(O)});var D=[],C=t.map(function(O){var L=new k,N=r.slice();return v(c,L,N).dispatch(O),D=D.concat(N.slice(r.length)),L.read().toString()});return r=r.concat(D),C.sort(),this._array(C,!1)},_date:function(t){return i("date:"+t.toJSON())},_symbol:function(t){return i("symbol:"+t.toString())},_error:function(t){return i("error:"+t.toString())},_boolean:function(t){return i("bool:"+t.toString())},_string:function(t){i("string:"+t.length+":"),i(t.toString())},_function:function(t){i("fn:"),I(t)?this.dispatch("[native]"):this.dispatch(t.toString()),c.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(t.name)),c.respectFunctionProperties&&this._object(t)},_number:function(t){return i("number:"+t.toString())},_xml:function(t){return i("xml:"+t.toString())},_null:function(){return i("Null")},_undefined:function(){return i("Undefined")},_regexp:function(t){return i("regex:"+t.toString())},_uint8array:function(t){return i("uint8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint8clampedarray:function(t){return i("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(t))},_int8array:function(t){return i("int8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint16array:function(t){return i("uint16array:"),this.dispatch(Array.prototype.slice.call(t))},_int16array:function(t){return i("int16array:"),this.dispatch(Array.prototype.slice.call(t))},_uint32array:function(t){return i("uint32array:"),this.dispatch(Array.prototype.slice.call(t))},_int32array:function(t){return i("int32array:"),this.dispatch(Array.prototype.slice.call(t))},_float32array:function(t){return i("float32array:"),this.dispatch(Array.prototype.slice.call(t))},_float64array:function(t){return i("float64array:"),this.dispatch(Array.prototype.slice.call(t))},_arraybuffer:function(t){return i("arraybuffer:"),this.dispatch(new Uint8Array(t))},_url:function(t){return i("url:"+t.toString())},_map:function(t){return i("map:"),t=Array.from(t),this._array(t,c.unorderedSets!==!1)},_set:function(t){return i("set:"),t=Array.from(t),this._array(t,c.unorderedSets!==!1)},_file:function(t){return i("file:"),this.dispatch([t.name,t.size,t.type,t.lastModfied])},_blob:function(){if(c.ignoreUnknown)return i("[blob]");throw Error(`Hashing Blob objects is currently not supported
3
3
  (see https://github.com/puleos/object-hash/issues/26)
4
4
  Use "options.replacer" or "options.ignoreUnknown"
5
- `)},_domwindow:function(){return i("domwindow")},_bigint:function(t){return i("bigint:"+t.toString())},_process:function(){return i("process")},_timer:function(){return i("timer")},_pipe:function(){return i("pipe")},_tcp:function(){return i("tcp")},_udp:function(){return i("udp")},_tty:function(){return i("tty")},_statwatcher:function(){return i("statwatcher")},_securecontext:function(){return i("securecontext")},_connection:function(){return i("connection")},_zlib:function(){return i("zlib")},_context:function(){return i("context")},_nodescript:function(){return i("nodescript")},_httpparser:function(){return i("httpparser")},_dataview:function(){return i("dataview")},_signal:function(){return i("signal")},_fsevent:function(){return i("fsevent")},_tlswrap:function(){return i("tlswrap")}}}function k(){return{buf:"",write:function(c){this.buf+=c},end:function(c){this.buf+=c},read:function(){return this.buf}}}l.writeToStream=function(c,m,r){return r===void 0&&(r=m,m={}),v(m=_(c,m),r).dispatch(c)}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(o,u,l){(function(d,U,j,S,x,F,P,R,W){(function(y){var T=typeof Uint8Array<"u"?Uint8Array:Array,g=43,E=47,_=48,I=97,v=65,k=45,c=95;function m(r){return r=r.charCodeAt(0),r===g||r===k?62:r===E||r===c?63:r<_?-1:r<_+10?r-_+26+26:r<v+26?r-v:r<I+26?r-I+26:void 0}y.toByteArray=function(r){var i,t;if(0<r.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var h=r.length,h=r.charAt(h-2)==="="?2:r.charAt(h-1)==="="?1:0,p=new T(3*r.length/4-h),O=0<h?r.length-4:r.length,C=0;function D(L){p[C++]=L}for(i=0;i<O;i+=4,0)D((16711680&(t=m(r.charAt(i))<<18|m(r.charAt(i+1))<<12|m(r.charAt(i+2))<<6|m(r.charAt(i+3))))>>16),D((65280&t)>>8),D(255&t);return h==2?D(255&(t=m(r.charAt(i))<<2|m(r.charAt(i+1))>>4)):h==1&&(D((t=m(r.charAt(i))<<10|m(r.charAt(i+1))<<4|m(r.charAt(i+2))>>2)>>8&255),D(255&t)),p},y.fromByteArray=function(r){var i,t,h,p,O=r.length%3,C="";function D(L){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L)}for(i=0,h=r.length-O;i<h;i+=3)t=(r[i]<<16)+(r[i+1]<<8)+r[i+2],C+=D((p=t)>>18&63)+D(p>>12&63)+D(p>>6&63)+D(63&p);switch(O){case 1:C=(C+=D((t=r[r.length-1])>>2))+D(t<<4&63)+"==";break;case 2:C=(C=(C+=D((t=(r[r.length-2]<<8)+r[r.length-1])>>10))+D(t>>4&63))+D(t<<2&63)+"="}return C}})(l===void 0?this.base64js={}:l)}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(o,u,l){(function(d,U,g,S,x,F,P,R,W){var y=o("base64-js"),T=o("ieee754");function g(e,n,f){if(!(this instanceof g))return new g(e,n,f);var w,b,B,M,Y=typeof e;if(n==="base64"&&Y=="string")for(e=(M=e).trim?M.trim():M.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if(Y=="number")w=X(e);else if(Y=="string")w=g.byteLength(e,n);else{if(Y!="object")throw new Error("First argument needs to be a number, array or string.");w=X(e.length)}if(g._useTypedArrays?b=g._augment(new Uint8Array(w)):((b=this).length=w,b._isBuffer=!0),g._useTypedArrays&&typeof e.byteLength=="number")b._set(e);else if(z(M=e)||g.isBuffer(M)||M&&typeof M=="object"&&typeof M.length=="number")for(B=0;B<w;B++)g.isBuffer(e)?b[B]=e.readUInt8(B):b[B]=e[B];else if(Y=="string")b.write(e,0,n);else if(Y=="number"&&!g._useTypedArrays&&!f)for(B=0;B<w;B++)b[B]=0;return b}function E(e,n,f,w){return g._charsWritten=ee(function(b){for(var B=[],M=0;M<b.length;M++)B.push(255&b.charCodeAt(M));return B}(n),e,f,w)}function _(e,n,f,w){return g._charsWritten=ee(function(b){for(var B,M,Y=[],$=0;$<b.length;$++)M=b.charCodeAt($),B=M>>8,M=M%256,Y.push(M),Y.push(B);return Y}(n),e,f,w)}function I(e,n,f){var w="";f=Math.min(e.length,f);for(var b=n;b<f;b++)w+=String.fromCharCode(e[b]);return w}function v(e,n,f,B){B||(A(typeof f=="boolean","missing or invalid endian"),A(n!=null,"missing offset"),A(n+1<e.length,"Trying to read beyond buffer length"));var b,B=e.length;if(!(B<=n))return f?(b=e[n],n+1<B&&(b|=e[n+1]<<8)):(b=e[n]<<8,n+1<B&&(b|=e[n+1])),b}function k(e,n,f,B){B||(A(typeof f=="boolean","missing or invalid endian"),A(n!=null,"missing offset"),A(n+3<e.length,"Trying to read beyond buffer length"));var b,B=e.length;if(!(B<=n))return f?(n+2<B&&(b=e[n+2]<<16),n+1<B&&(b|=e[n+1]<<8),b|=e[n],n+3<B&&(b+=e[n+3]<<24>>>0)):(n+1<B&&(b=e[n+1]<<16),n+2<B&&(b|=e[n+2]<<8),n+3<B&&(b|=e[n+3]),b+=e[n]<<24>>>0),b}function c(e,n,f,w){if(w||(A(typeof f=="boolean","missing or invalid endian"),A(n!=null,"missing offset"),A(n+1<e.length,"Trying to read beyond buffer length")),!(e.length<=n))return w=v(e,n,f,!0),32768&w?-1*(65535-w+1):w}function m(e,n,f,w){if(w||(A(typeof f=="boolean","missing or invalid endian"),A(n!=null,"missing offset"),A(n+3<e.length,"Trying to read beyond buffer length")),!(e.length<=n))return w=k(e,n,f,!0),2147483648&w?-1*(4294967295-w+1):w}function r(e,n,f,w){return w||(A(typeof f=="boolean","missing or invalid endian"),A(n+3<e.length,"Trying to read beyond buffer length")),T.read(e,n,f,23,4)}function i(e,n,f,w){return w||(A(typeof f=="boolean","missing or invalid endian"),A(n+7<e.length,"Trying to read beyond buffer length")),T.read(e,n,f,52,8)}function t(e,n,f,w,b){if(b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+1<e.length,"trying to write beyond buffer length"),ae(n,65535)),b=e.length,!(b<=f))for(var B=0,M=Math.min(b-f,2);B<M;B++)e[f+B]=(n&255<<8*(w?B:1-B))>>>8*(w?B:1-B)}function h(e,n,f,w,b){if(b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+3<e.length,"trying to write beyond buffer length"),ae(n,4294967295)),b=e.length,!(b<=f))for(var B=0,M=Math.min(b-f,4);B<M;B++)e[f+B]=n>>>8*(w?B:3-B)&255}function p(e,n,f,w,b){b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+1<e.length,"Trying to write beyond buffer length"),re(n,32767,-32768)),e.length<=f||t(e,0<=n?n:65535+n+1,f,w,b)}function O(e,n,f,w,b){b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+3<e.length,"Trying to write beyond buffer length"),re(n,2147483647,-2147483648)),e.length<=f||h(e,0<=n?n:4294967295+n+1,f,w,b)}function C(e,n,f,w,b){b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+3<e.length,"Trying to write beyond buffer length"),se(n,34028234663852886e22,-34028234663852886e22)),e.length<=f||T.write(e,n,f,w,23,4)}function D(e,n,f,w,b){b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+7<e.length,"Trying to write beyond buffer length"),se(n,17976931348623157e292,-17976931348623157e292)),e.length<=f||T.write(e,n,f,w,52,8)}l.Buffer=g,l.SlowBuffer=g,l.INSPECT_MAX_BYTES=50,g.poolSize=8192,g._useTypedArrays=function(){try{var e=new ArrayBuffer(0),n=new Uint8Array(e);return n.foo=function(){return 42},n.foo()===42&&typeof n.subarray=="function"}catch{return!1}}(),g.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},g.isBuffer=function(e){return!(e==null||!e._isBuffer)},g.byteLength=function(e,n){var f;switch(e+="",n||"utf8"){case"hex":f=e.length/2;break;case"utf8":case"utf-8":f=Z(e).length;break;case"ascii":case"binary":case"raw":f=e.length;break;case"base64":f=le(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":f=2*e.length;break;default:throw new Error("Unknown encoding")}return f},g.concat=function(e,n){if(A(z(e),`Usage: Buffer.concat(list, [totalLength])
6
- list should be an Array.`),e.length===0)return new g(0);if(e.length===1)return e[0];if(typeof n!="number")for(b=n=0;b<e.length;b++)n+=e[b].length;for(var f=new g(n),w=0,b=0;b<e.length;b++){var B=e[b];B.copy(f,w),w+=B.length}return f},g.prototype.write=function(e,n,f,w){isFinite(n)?isFinite(f)||(w=f,f=void 0):($=w,w=n,n=f,f=$),n=Number(n)||0;var b,B,M,Y,$=this.length-n;switch((!f||$<(f=Number(f)))&&(f=$),w=String(w||"utf8").toLowerCase()){case"hex":b=function(J,K,Q,G){Q=Number(Q)||0;var V=J.length-Q;(!G||V<(G=Number(G)))&&(G=V),A((V=K.length)%2==0,"Invalid hex string"),V/2<G&&(G=V/2);for(var ue=0;ue<G;ue++){var ve=parseInt(K.substr(2*ue,2),16);A(!isNaN(ve),"Invalid hex string"),J[Q+ue]=ve}return g._charsWritten=2*ue,ue}(this,e,n,f);break;case"utf8":case"utf-8":B=this,M=n,Y=f,b=g._charsWritten=ee(Z(e),B,M,Y);break;case"ascii":case"binary":b=E(this,e,n,f);break;case"base64":B=this,M=n,Y=f,b=g._charsWritten=ee(le(e),B,M,Y);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":b=_(this,e,n,f);break;default:throw new Error("Unknown encoding")}return b},g.prototype.toString=function(e,n,f){var w,b,B,M,Y=this;if(e=String(e||"utf8").toLowerCase(),n=Number(n)||0,(f=f!==void 0?Number(f):Y.length)===n)return"";switch(e){case"hex":w=function($,J,K){var Q=$.length;(!J||J<0)&&(J=0),(!K||K<0||Q<K)&&(K=Q);for(var G="",V=J;V<K;V++)G+=H($[V]);return G}(Y,n,f);break;case"utf8":case"utf-8":w=function($,J,K){var Q="",G="";K=Math.min($.length,K);for(var V=J;V<K;V++)$[V]<=127?(Q+=fe(G)+String.fromCharCode($[V]),G=""):G+="%"+$[V].toString(16);return Q+fe(G)}(Y,n,f);break;case"ascii":case"binary":w=I(Y,n,f);break;case"base64":b=Y,M=f,w=(B=n)===0&&M===b.length?y.fromByteArray(b):y.fromByteArray(b.slice(B,M));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":w=function($,J,K){for(var Q=$.slice(J,K),G="",V=0;V<Q.length;V+=2)G+=String.fromCharCode(Q[V]+256*Q[V+1]);return G}(Y,n,f);break;default:throw new Error("Unknown encoding")}return w},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},g.prototype.copy=function(e,n,f,w){if(n=n||0,(w=w||w===0?w:this.length)!==(f=f||0)&&e.length!==0&&this.length!==0){A(f<=w,"sourceEnd < sourceStart"),A(0<=n&&n<e.length,"targetStart out of bounds"),A(0<=f&&f<this.length,"sourceStart out of bounds"),A(0<=w&&w<=this.length,"sourceEnd out of bounds"),w>this.length&&(w=this.length);var b=(w=e.length-n<w-f?e.length-n+f:w)-f;if(b<100||!g._useTypedArrays)for(var B=0;B<b;B++)e[B+n]=this[B+f];else e._set(this.subarray(f,f+b),n)}},g.prototype.slice=function(e,n){var f=this.length;if(e=N(e,f,0),n=N(n,f,f),g._useTypedArrays)return g._augment(this.subarray(e,n));for(var w=n-e,b=new g(w,void 0,!0),B=0;B<w;B++)b[B]=this[B+e];return b},g.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},g.prototype.set=function(e,n){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,n)},g.prototype.readUInt8=function(e,n){if(n||(A(e!=null,"missing offset"),A(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},g.prototype.readUInt16LE=function(e,n){return v(this,e,!0,n)},g.prototype.readUInt16BE=function(e,n){return v(this,e,!1,n)},g.prototype.readUInt32LE=function(e,n){return k(this,e,!0,n)},g.prototype.readUInt32BE=function(e,n){return k(this,e,!1,n)},g.prototype.readInt8=function(e,n){if(n||(A(e!=null,"missing offset"),A(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},g.prototype.readInt16LE=function(e,n){return c(this,e,!0,n)},g.prototype.readInt16BE=function(e,n){return c(this,e,!1,n)},g.prototype.readInt32LE=function(e,n){return m(this,e,!0,n)},g.prototype.readInt32BE=function(e,n){return m(this,e,!1,n)},g.prototype.readFloatLE=function(e,n){return r(this,e,!0,n)},g.prototype.readFloatBE=function(e,n){return r(this,e,!1,n)},g.prototype.readDoubleLE=function(e,n){return i(this,e,!0,n)},g.prototype.readDoubleBE=function(e,n){return i(this,e,!1,n)},g.prototype.writeUInt8=function(e,n,f){f||(A(e!=null,"missing value"),A(n!=null,"missing offset"),A(n<this.length,"trying to write beyond buffer length"),ae(e,255)),n>=this.length||(this[n]=e)},g.prototype.writeUInt16LE=function(e,n,f){t(this,e,n,!0,f)},g.prototype.writeUInt16BE=function(e,n,f){t(this,e,n,!1,f)},g.prototype.writeUInt32LE=function(e,n,f){h(this,e,n,!0,f)},g.prototype.writeUInt32BE=function(e,n,f){h(this,e,n,!1,f)},g.prototype.writeInt8=function(e,n,f){f||(A(e!=null,"missing value"),A(n!=null,"missing offset"),A(n<this.length,"Trying to write beyond buffer length"),re(e,127,-128)),n>=this.length||(0<=e?this.writeUInt8(e,n,f):this.writeUInt8(255+e+1,n,f))},g.prototype.writeInt16LE=function(e,n,f){p(this,e,n,!0,f)},g.prototype.writeInt16BE=function(e,n,f){p(this,e,n,!1,f)},g.prototype.writeInt32LE=function(e,n,f){O(this,e,n,!0,f)},g.prototype.writeInt32BE=function(e,n,f){O(this,e,n,!1,f)},g.prototype.writeFloatLE=function(e,n,f){C(this,e,n,!0,f)},g.prototype.writeFloatBE=function(e,n,f){C(this,e,n,!1,f)},g.prototype.writeDoubleLE=function(e,n,f){D(this,e,n,!0,f)},g.prototype.writeDoubleBE=function(e,n,f){D(this,e,n,!1,f)},g.prototype.fill=function(e,n,f){if(n=n||0,f=f||this.length,A(typeof(e=typeof(e=e||0)=="string"?e.charCodeAt(0):e)=="number"&&!isNaN(e),"value is not a number"),A(n<=f,"end < start"),f!==n&&this.length!==0){A(0<=n&&n<this.length,"start out of bounds"),A(0<=f&&f<=this.length,"end out of bounds");for(var w=n;w<f;w++)this[w]=e}},g.prototype.inspect=function(){for(var e=[],n=this.length,f=0;f<n;f++)if(e[f]=H(this[f]),f===l.INSPECT_MAX_BYTES){e[f+1]="...";break}return"<Buffer "+e.join(" ")+">"},g.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(g._useTypedArrays)return new g(this).buffer;for(var e=new Uint8Array(this.length),n=0,f=e.length;n<f;n+=1)e[n]=this[n];return e.buffer};var L=g.prototype;function N(e,n,f){return typeof e!="number"?f:n<=(e=~~e)?n:0<=e||0<=(e+=n)?e:0}function X(e){return(e=~~Math.ceil(+e))<0?0:e}function z(e){return(Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"})(e)}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e){for(var n=[],f=0;f<e.length;f++){var w=e.charCodeAt(f);if(w<=127)n.push(e.charCodeAt(f));else for(var b=f,B=(55296<=w&&w<=57343&&f++,encodeURIComponent(e.slice(b,f+1)).substr(1).split("%")),M=0;M<B.length;M++)n.push(parseInt(B[M],16))}return n}function le(e){return y.toByteArray(e)}function ee(e,n,f,w){for(var b=0;b<w&&!(b+f>=n.length||b>=e.length);b++)n[b+f]=e[b];return b}function fe(e){try{return decodeURIComponent(e)}catch{return"�"}}function ae(e,n){A(typeof e=="number","cannot write a non-number as a number"),A(0<=e,"specified a negative value for writing an unsigned value"),A(e<=n,"value is larger than maximum value for type"),A(Math.floor(e)===e,"value has a fractional component")}function re(e,n,f){A(typeof e=="number","cannot write a non-number as a number"),A(e<=n,"value larger than maximum allowed value"),A(f<=e,"value smaller than minimum allowed value"),A(Math.floor(e)===e,"value has a fractional component")}function se(e,n,f){A(typeof e=="number","cannot write a non-number as a number"),A(e<=n,"value larger than maximum allowed value"),A(f<=e,"value smaller than minimum allowed value")}function A(e,n){if(!e)throw new Error(n||"Failed assertion")}g._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=L.get,e.set=L.set,e.write=L.write,e.toString=L.toString,e.toLocaleString=L.toString,e.toJSON=L.toJSON,e.copy=L.copy,e.slice=L.slice,e.readUInt8=L.readUInt8,e.readUInt16LE=L.readUInt16LE,e.readUInt16BE=L.readUInt16BE,e.readUInt32LE=L.readUInt32LE,e.readUInt32BE=L.readUInt32BE,e.readInt8=L.readInt8,e.readInt16LE=L.readInt16LE,e.readInt16BE=L.readInt16BE,e.readInt32LE=L.readInt32LE,e.readInt32BE=L.readInt32BE,e.readFloatLE=L.readFloatLE,e.readFloatBE=L.readFloatBE,e.readDoubleLE=L.readDoubleLE,e.readDoubleBE=L.readDoubleBE,e.writeUInt8=L.writeUInt8,e.writeUInt16LE=L.writeUInt16LE,e.writeUInt16BE=L.writeUInt16BE,e.writeUInt32LE=L.writeUInt32LE,e.writeUInt32BE=L.writeUInt32BE,e.writeInt8=L.writeInt8,e.writeInt16LE=L.writeInt16LE,e.writeInt16BE=L.writeInt16BE,e.writeInt32LE=L.writeInt32LE,e.writeInt32BE=L.writeInt32BE,e.writeFloatLE=L.writeFloatLE,e.writeFloatBE=L.writeFloatBE,e.writeDoubleLE=L.writeDoubleLE,e.writeDoubleBE=L.writeDoubleBE,e.fill=L.fill,e.inspect=L.inspect,e.toArrayBuffer=L.toArrayBuffer,e}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(o,u,l){(function(d,U,y,S,x,F,P,R,W){var y=o("buffer").Buffer,T=4,g=new y(T);g.fill(0),u.exports={hash:function(E,_,I,v){for(var k=_(function(t,h){t.length%T!=0&&(p=t.length+(T-t.length%T),t=y.concat([t,g],p));for(var p,O=[],C=h?t.readInt32BE:t.readInt32LE,D=0;D<t.length;D+=T)O.push(C.call(t,D));return O}(E=y.isBuffer(E)?E:new y(E),v),8*E.length),_=v,c=new y(I),m=_?c.writeInt32BE:c.writeInt32LE,r=0;r<k.length;r++)m.call(c,k[r],4*r,!0);return c}}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(o,u,l){(function(d,U,y,S,x,F,P,R,W){var y=o("buffer").Buffer,T=o("./sha"),g=o("./sha256"),E=o("./rng"),_={sha1:T,sha256:g,md5:o("./md5")},I=64,v=new y(I);function k(t,h){var p=_[t=t||"sha1"],O=[];return p||c("algorithm:",t,"is not yet supported"),{update:function(C){return y.isBuffer(C)||(C=new y(C)),O.push(C),C.length,this},digest:function(C){var D=y.concat(O),D=h?function(L,N,X){y.isBuffer(N)||(N=new y(N)),y.isBuffer(X)||(X=new y(X)),N.length>I?N=L(N):N.length<I&&(N=y.concat([N,v],I));for(var z=new y(I),H=new y(I),Z=0;Z<I;Z++)z[Z]=54^N[Z],H[Z]=92^N[Z];return X=L(y.concat([z,X])),L(y.concat([H,X]))}(p,h,D):p(D);return O=null,C?D.toString(C):D}}}function c(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
7
- `))}v.fill(0),l.createHash=function(t){return k(t)},l.createHmac=k,l.randomBytes=function(t,h){if(!h||!h.call)return new y(E(t));try{h.call(this,void 0,new y(E(t)))}catch(p){h(p)}};var m,r=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],i=function(t){l[t]=function(){c("sorry,",t,"is not implemented yet")}};for(m in r)i(r[m])}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(o,u,l){(function(d,U,j,S,x,F,P,R,W){var y=o("./helpers");function T(c,m){c[m>>5]|=128<<m%32,c[14+(m+64>>>9<<4)]=m;for(var r=1732584193,i=-271733879,t=-1732584194,h=271733878,p=0;p<c.length;p+=16){var O=r,C=i,D=t,L=h,r=E(r,i,t,h,c[p+0],7,-680876936),h=E(h,r,i,t,c[p+1],12,-389564586),t=E(t,h,r,i,c[p+2],17,606105819),i=E(i,t,h,r,c[p+3],22,-1044525330);r=E(r,i,t,h,c[p+4],7,-176418897),h=E(h,r,i,t,c[p+5],12,1200080426),t=E(t,h,r,i,c[p+6],17,-1473231341),i=E(i,t,h,r,c[p+7],22,-45705983),r=E(r,i,t,h,c[p+8],7,1770035416),h=E(h,r,i,t,c[p+9],12,-1958414417),t=E(t,h,r,i,c[p+10],17,-42063),i=E(i,t,h,r,c[p+11],22,-1990404162),r=E(r,i,t,h,c[p+12],7,1804603682),h=E(h,r,i,t,c[p+13],12,-40341101),t=E(t,h,r,i,c[p+14],17,-1502002290),r=_(r,i=E(i,t,h,r,c[p+15],22,1236535329),t,h,c[p+1],5,-165796510),h=_(h,r,i,t,c[p+6],9,-1069501632),t=_(t,h,r,i,c[p+11],14,643717713),i=_(i,t,h,r,c[p+0],20,-373897302),r=_(r,i,t,h,c[p+5],5,-701558691),h=_(h,r,i,t,c[p+10],9,38016083),t=_(t,h,r,i,c[p+15],14,-660478335),i=_(i,t,h,r,c[p+4],20,-405537848),r=_(r,i,t,h,c[p+9],5,568446438),h=_(h,r,i,t,c[p+14],9,-1019803690),t=_(t,h,r,i,c[p+3],14,-187363961),i=_(i,t,h,r,c[p+8],20,1163531501),r=_(r,i,t,h,c[p+13],5,-1444681467),h=_(h,r,i,t,c[p+2],9,-51403784),t=_(t,h,r,i,c[p+7],14,1735328473),r=I(r,i=_(i,t,h,r,c[p+12],20,-1926607734),t,h,c[p+5],4,-378558),h=I(h,r,i,t,c[p+8],11,-2022574463),t=I(t,h,r,i,c[p+11],16,1839030562),i=I(i,t,h,r,c[p+14],23,-35309556),r=I(r,i,t,h,c[p+1],4,-1530992060),h=I(h,r,i,t,c[p+4],11,1272893353),t=I(t,h,r,i,c[p+7],16,-155497632),i=I(i,t,h,r,c[p+10],23,-1094730640),r=I(r,i,t,h,c[p+13],4,681279174),h=I(h,r,i,t,c[p+0],11,-358537222),t=I(t,h,r,i,c[p+3],16,-722521979),i=I(i,t,h,r,c[p+6],23,76029189),r=I(r,i,t,h,c[p+9],4,-640364487),h=I(h,r,i,t,c[p+12],11,-421815835),t=I(t,h,r,i,c[p+15],16,530742520),r=v(r,i=I(i,t,h,r,c[p+2],23,-995338651),t,h,c[p+0],6,-198630844),h=v(h,r,i,t,c[p+7],10,1126891415),t=v(t,h,r,i,c[p+14],15,-1416354905),i=v(i,t,h,r,c[p+5],21,-57434055),r=v(r,i,t,h,c[p+12],6,1700485571),h=v(h,r,i,t,c[p+3],10,-1894986606),t=v(t,h,r,i,c[p+10],15,-1051523),i=v(i,t,h,r,c[p+1],21,-2054922799),r=v(r,i,t,h,c[p+8],6,1873313359),h=v(h,r,i,t,c[p+15],10,-30611744),t=v(t,h,r,i,c[p+6],15,-1560198380),i=v(i,t,h,r,c[p+13],21,1309151649),r=v(r,i,t,h,c[p+4],6,-145523070),h=v(h,r,i,t,c[p+11],10,-1120210379),t=v(t,h,r,i,c[p+2],15,718787259),i=v(i,t,h,r,c[p+9],21,-343485551),r=k(r,O),i=k(i,C),t=k(t,D),h=k(h,L)}return Array(r,i,t,h)}function g(c,m,r,i,t,h){return k((m=k(k(m,c),k(i,h)))<<t|m>>>32-t,r)}function E(c,m,r,i,t,h,p){return g(m&r|~m&i,c,m,t,h,p)}function _(c,m,r,i,t,h,p){return g(m&i|r&~i,c,m,t,h,p)}function I(c,m,r,i,t,h,p){return g(m^r^i,c,m,t,h,p)}function v(c,m,r,i,t,h,p){return g(r^(m|~i),c,m,t,h,p)}function k(c,m){var r=(65535&c)+(65535&m);return(c>>16)+(m>>16)+(r>>16)<<16|65535&r}u.exports=function(c){return y.hash(c,T,16)}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(o,u,l){(function(d,U,j,S,x,F,P,R,W){u.exports=function(y){for(var T,g=new Array(y),E=0;E<y;E++)!(3&E)&&(T=4294967296*Math.random()),g[E]=T>>>((3&E)<<3)&255;return g}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(o,u,l){(function(d,U,j,S,x,F,P,R,W){var y=o("./helpers");function T(_,I){_[I>>5]|=128<<24-I%32,_[15+(I+64>>9<<4)]=I;for(var v,k,c,m=Array(80),r=1732584193,i=-271733879,t=-1732584194,h=271733878,p=-1009589776,O=0;O<_.length;O+=16){for(var C=r,D=i,L=t,N=h,X=p,z=0;z<80;z++){m[z]=z<16?_[O+z]:E(m[z-3]^m[z-8]^m[z-14]^m[z-16],1);var H=g(g(E(r,5),(H=i,k=t,c=h,(v=z)<20?H&k|~H&c:!(v<40)&&v<60?H&k|H&c|k&c:H^k^c)),g(g(p,m[z]),(v=z)<20?1518500249:v<40?1859775393:v<60?-1894007588:-899497514)),p=h,h=t,t=E(i,30),i=r,r=H}r=g(r,C),i=g(i,D),t=g(t,L),h=g(h,N),p=g(p,X)}return Array(r,i,t,h,p)}function g(_,I){var v=(65535&_)+(65535&I);return(_>>16)+(I>>16)+(v>>16)<<16|65535&v}function E(_,I){return _<<I|_>>>32-I}u.exports=function(_){return y.hash(_,T,20,!0)}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(o,u,l){(function(d,U,j,S,x,F,P,R,W){function y(I,v){var k=(65535&I)+(65535&v);return(I>>16)+(v>>16)+(k>>16)<<16|65535&k}function T(I,v){var k,c=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),m=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),r=new Array(64);I[v>>5]|=128<<24-v%32,I[15+(v+64>>9<<4)]=v;for(var i,t,h=0;h<I.length;h+=16){for(var p=m[0],O=m[1],C=m[2],D=m[3],L=m[4],N=m[5],X=m[6],z=m[7],H=0;H<64;H++)r[H]=H<16?I[H+h]:y(y(y((t=r[H-2],E(t,17)^E(t,19)^_(t,10)),r[H-7]),(t=r[H-15],E(t,7)^E(t,18)^_(t,3))),r[H-16]),k=y(y(y(y(z,E(t=L,6)^E(t,11)^E(t,25)),L&N^~L&X),c[H]),r[H]),i=y(E(i=p,2)^E(i,13)^E(i,22),p&O^p&C^O&C),z=X,X=N,N=L,L=y(D,k),D=C,C=O,O=p,p=y(k,i);m[0]=y(p,m[0]),m[1]=y(O,m[1]),m[2]=y(C,m[2]),m[3]=y(D,m[3]),m[4]=y(L,m[4]),m[5]=y(N,m[5]),m[6]=y(X,m[6]),m[7]=y(z,m[7])}return m}var g=o("./helpers"),E=function(I,v){return I>>>v|I<<32-v},_=function(I,v){return I>>>v};u.exports=function(I){return g.hash(I,T,32,!0)}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(o,u,l){(function(d,U,j,S,x,F,P,R,W){l.read=function(y,T,g,E,h){var I,v,k=8*h-E-1,c=(1<<k)-1,m=c>>1,r=-7,i=g?h-1:0,t=g?-1:1,h=y[T+i];for(i+=t,I=h&(1<<-r)-1,h>>=-r,r+=k;0<r;I=256*I+y[T+i],i+=t,r-=8);for(v=I&(1<<-r)-1,I>>=-r,r+=E;0<r;v=256*v+y[T+i],i+=t,r-=8);if(I===0)I=1-m;else{if(I===c)return v?NaN:1/0*(h?-1:1);v+=Math.pow(2,E),I-=m}return(h?-1:1)*v*Math.pow(2,I-E)},l.write=function(y,T,g,E,_,p){var v,k,c=8*p-_-1,m=(1<<c)-1,r=m>>1,i=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,t=E?0:p-1,h=E?1:-1,p=T<0||T===0&&1/T<0?1:0;for(T=Math.abs(T),isNaN(T)||T===1/0?(k=isNaN(T)?1:0,v=m):(v=Math.floor(Math.log(T)/Math.LN2),T*(E=Math.pow(2,-v))<1&&(v--,E*=2),2<=(T+=1<=v+r?i/E:i*Math.pow(2,1-r))*E&&(v++,E/=2),m<=v+r?(k=0,v=m):1<=v+r?(k=(T*E-1)*Math.pow(2,_),v+=r):(k=T*Math.pow(2,r-1)*Math.pow(2,_),v=0));8<=_;y[g+t]=255&k,t+=h,k/=256,_-=8);for(v=v<<_|k,c+=_;0<c;y[g+t]=255&v,t+=h,v/=256,c-=8);y[g+t-h]|=128*p}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(o,u,l){(function(d,U,j,S,x,F,P,R,W){var y,T,g;function E(){}(d=u.exports={}).nextTick=(T=typeof window<"u"&&window.setImmediate,g=typeof window<"u"&&window.postMessage&&window.addEventListener,T?function(_){return window.setImmediate(_)}:g?(y=[],window.addEventListener("message",function(_){var I=_.source;I!==window&&I!==null||_.data!=="process-tick"||(_.stopPropagation(),0<y.length&&y.shift()())},!0),function(_){y.push(_),window.postMessage("process-tick","*")}):function(_){setTimeout(_,0)}),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=E,d.addListener=E,d.once=E,d.off=E,d.removeListener=E,d.removeAllListeners=E,d.emit=E,d.binding=function(_){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(_){throw new Error("process.chdir is not supported")}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(Te);var It=Te.exports;const Ee=Et(It);function q(s){return s!=null&&typeof s=="object"&&s["@@functional/placeholder"]===!0}function ie(s){return function a(o){return arguments.length===0||q(o)?a:s.apply(this,arguments)}}function oe(s){return function a(o,u){switch(arguments.length){case 0:return a;case 1:return q(o)?a:ie(function(l){return s(o,l)});default:return q(o)&&q(u)?a:q(o)?ie(function(l){return s(l,u)}):q(u)?ie(function(l){return s(o,l)}):s(o,u)}}}function Le(s){return function a(o,u,l){switch(arguments.length){case 0:return a;case 1:return q(o)?a:oe(function(d,U){return s(o,d,U)});case 2:return q(o)&&q(u)?a:q(o)?oe(function(d,U){return s(d,u,U)}):q(u)?oe(function(d,U){return s(o,d,U)}):ie(function(d){return s(o,u,d)});default:return q(o)&&q(u)&&q(l)?a:q(o)&&q(u)?oe(function(d,U){return s(d,U,l)}):q(o)&&q(l)?oe(function(d,U){return s(d,u,U)}):q(u)&&q(l)?oe(function(d,U){return s(o,d,U)}):q(o)?ie(function(d){return s(d,u,l)}):q(u)?ie(function(d){return s(o,d,l)}):q(l)?ie(function(d){return s(o,u,d)}):s(o,u,l)}}}function de(s,a){return Object.prototype.hasOwnProperty.call(a,s)}function Ie(s){return Object.prototype.toString.call(s)==="[object Object]"}var Bt=Le(function(a,o,u){var l={},d;for(d in o)de(d,o)&&(l[d]=de(d,u)?a(d,o[d],u[d]):o[d]);for(d in u)de(d,u)&&!de(d,l)&&(l[d]=u[d]);return l}),At=Le(function s(a,o,u){return Bt(function(l,d,U){return Ie(d)&&Ie(U)?s(a,d,U):a(l,d,U)},o,u)}),_t=oe(function(a,o){return At(function(u,l,d){return d},a,o)});let xt={headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"};async function St(s,a={}){const{baseURL:o="",...u}=a;return fetch(`${o}${s}`,_t(xt,u)).then(l=>{if(!l.ok)throw l;return l})}/*!
5
+ `)},_domwindow:function(){return i("domwindow")},_bigint:function(t){return i("bigint:"+t.toString())},_process:function(){return i("process")},_timer:function(){return i("timer")},_pipe:function(){return i("pipe")},_tcp:function(){return i("tcp")},_udp:function(){return i("udp")},_tty:function(){return i("tty")},_statwatcher:function(){return i("statwatcher")},_securecontext:function(){return i("securecontext")},_connection:function(){return i("connection")},_zlib:function(){return i("zlib")},_context:function(){return i("context")},_nodescript:function(){return i("nodescript")},_httpparser:function(){return i("httpparser")},_dataview:function(){return i("dataview")},_signal:function(){return i("signal")},_fsevent:function(){return i("fsevent")},_tlswrap:function(){return i("tlswrap")}}}function k(){return{buf:"",write:function(c){this.buf+=c},end:function(c){this.buf+=c},read:function(){return this.buf}}}l.writeToStream=function(c,m,r){return r===void 0&&(r=m,m={}),v(m=_(c,m),r).dispatch(c)}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(o,u,l){(function(d,U,T,S,x,F,P,R,W){(function(y){var j=typeof Uint8Array<"u"?Uint8Array:Array,p=43,E=47,_=48,I=97,v=65,k=45,c=95;function m(r){return r=r.charCodeAt(0),r===p||r===k?62:r===E||r===c?63:r<_?-1:r<_+10?r-_+26+26:r<v+26?r-v:r<I+26?r-I+26:void 0}y.toByteArray=function(r){var i,t;if(0<r.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var h=r.length,h=r.charAt(h-2)==="="?2:r.charAt(h-1)==="="?1:0,g=new j(3*r.length/4-h),D=0<h?r.length-4:r.length,C=0;function O(L){g[C++]=L}for(i=0;i<D;i+=4,0)O((16711680&(t=m(r.charAt(i))<<18|m(r.charAt(i+1))<<12|m(r.charAt(i+2))<<6|m(r.charAt(i+3))))>>16),O((65280&t)>>8),O(255&t);return h==2?O(255&(t=m(r.charAt(i))<<2|m(r.charAt(i+1))>>4)):h==1&&(O((t=m(r.charAt(i))<<10|m(r.charAt(i+1))<<4|m(r.charAt(i+2))>>2)>>8&255),O(255&t)),g},y.fromByteArray=function(r){var i,t,h,g,D=r.length%3,C="";function O(L){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(L)}for(i=0,h=r.length-D;i<h;i+=3)t=(r[i]<<16)+(r[i+1]<<8)+r[i+2],C+=O((g=t)>>18&63)+O(g>>12&63)+O(g>>6&63)+O(63&g);switch(D){case 1:C=(C+=O((t=r[r.length-1])>>2))+O(t<<4&63)+"==";break;case 2:C=(C=(C+=O((t=(r[r.length-2]<<8)+r[r.length-1])>>10))+O(t>>4&63))+O(t<<2&63)+"="}return C}})(l===void 0?this.base64js={}:l)}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(o,u,l){(function(d,U,p,S,x,F,P,R,W){var y=o("base64-js"),j=o("ieee754");function p(e,n,f){if(!(this instanceof p))return new p(e,n,f);var w,b,B,M,Y=typeof e;if(n==="base64"&&Y=="string")for(e=(M=e).trim?M.trim():M.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if(Y=="number")w=X(e);else if(Y=="string")w=p.byteLength(e,n);else{if(Y!="object")throw new Error("First argument needs to be a number, array or string.");w=X(e.length)}if(p._useTypedArrays?b=p._augment(new Uint8Array(w)):((b=this).length=w,b._isBuffer=!0),p._useTypedArrays&&typeof e.byteLength=="number")b._set(e);else if(z(M=e)||p.isBuffer(M)||M&&typeof M=="object"&&typeof M.length=="number")for(B=0;B<w;B++)p.isBuffer(e)?b[B]=e.readUInt8(B):b[B]=e[B];else if(Y=="string")b.write(e,0,n);else if(Y=="number"&&!p._useTypedArrays&&!f)for(B=0;B<w;B++)b[B]=0;return b}function E(e,n,f,w){return p._charsWritten=ee(function(b){for(var B=[],M=0;M<b.length;M++)B.push(255&b.charCodeAt(M));return B}(n),e,f,w)}function _(e,n,f,w){return p._charsWritten=ee(function(b){for(var B,M,Y=[],$=0;$<b.length;$++)M=b.charCodeAt($),B=M>>8,M=M%256,Y.push(M),Y.push(B);return Y}(n),e,f,w)}function I(e,n,f){var w="";f=Math.min(e.length,f);for(var b=n;b<f;b++)w+=String.fromCharCode(e[b]);return w}function v(e,n,f,B){B||(A(typeof f=="boolean","missing or invalid endian"),A(n!=null,"missing offset"),A(n+1<e.length,"Trying to read beyond buffer length"));var b,B=e.length;if(!(B<=n))return f?(b=e[n],n+1<B&&(b|=e[n+1]<<8)):(b=e[n]<<8,n+1<B&&(b|=e[n+1])),b}function k(e,n,f,B){B||(A(typeof f=="boolean","missing or invalid endian"),A(n!=null,"missing offset"),A(n+3<e.length,"Trying to read beyond buffer length"));var b,B=e.length;if(!(B<=n))return f?(n+2<B&&(b=e[n+2]<<16),n+1<B&&(b|=e[n+1]<<8),b|=e[n],n+3<B&&(b+=e[n+3]<<24>>>0)):(n+1<B&&(b=e[n+1]<<16),n+2<B&&(b|=e[n+2]<<8),n+3<B&&(b|=e[n+3]),b+=e[n]<<24>>>0),b}function c(e,n,f,w){if(w||(A(typeof f=="boolean","missing or invalid endian"),A(n!=null,"missing offset"),A(n+1<e.length,"Trying to read beyond buffer length")),!(e.length<=n))return w=v(e,n,f,!0),32768&w?-1*(65535-w+1):w}function m(e,n,f,w){if(w||(A(typeof f=="boolean","missing or invalid endian"),A(n!=null,"missing offset"),A(n+3<e.length,"Trying to read beyond buffer length")),!(e.length<=n))return w=k(e,n,f,!0),2147483648&w?-1*(4294967295-w+1):w}function r(e,n,f,w){return w||(A(typeof f=="boolean","missing or invalid endian"),A(n+3<e.length,"Trying to read beyond buffer length")),j.read(e,n,f,23,4)}function i(e,n,f,w){return w||(A(typeof f=="boolean","missing or invalid endian"),A(n+7<e.length,"Trying to read beyond buffer length")),j.read(e,n,f,52,8)}function t(e,n,f,w,b){if(b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+1<e.length,"trying to write beyond buffer length"),ae(n,65535)),b=e.length,!(b<=f))for(var B=0,M=Math.min(b-f,2);B<M;B++)e[f+B]=(n&255<<8*(w?B:1-B))>>>8*(w?B:1-B)}function h(e,n,f,w,b){if(b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+3<e.length,"trying to write beyond buffer length"),ae(n,4294967295)),b=e.length,!(b<=f))for(var B=0,M=Math.min(b-f,4);B<M;B++)e[f+B]=n>>>8*(w?B:3-B)&255}function g(e,n,f,w,b){b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+1<e.length,"Trying to write beyond buffer length"),re(n,32767,-32768)),e.length<=f||t(e,0<=n?n:65535+n+1,f,w,b)}function D(e,n,f,w,b){b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+3<e.length,"Trying to write beyond buffer length"),re(n,2147483647,-2147483648)),e.length<=f||h(e,0<=n?n:4294967295+n+1,f,w,b)}function C(e,n,f,w,b){b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+3<e.length,"Trying to write beyond buffer length"),se(n,34028234663852886e22,-34028234663852886e22)),e.length<=f||j.write(e,n,f,w,23,4)}function O(e,n,f,w,b){b||(A(n!=null,"missing value"),A(typeof w=="boolean","missing or invalid endian"),A(f!=null,"missing offset"),A(f+7<e.length,"Trying to write beyond buffer length"),se(n,17976931348623157e292,-17976931348623157e292)),e.length<=f||j.write(e,n,f,w,52,8)}l.Buffer=p,l.SlowBuffer=p,l.INSPECT_MAX_BYTES=50,p.poolSize=8192,p._useTypedArrays=function(){try{var e=new ArrayBuffer(0),n=new Uint8Array(e);return n.foo=function(){return 42},n.foo()===42&&typeof n.subarray=="function"}catch{return!1}}(),p.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.isBuffer=function(e){return!(e==null||!e._isBuffer)},p.byteLength=function(e,n){var f;switch(e+="",n||"utf8"){case"hex":f=e.length/2;break;case"utf8":case"utf-8":f=Z(e).length;break;case"ascii":case"binary":case"raw":f=e.length;break;case"base64":f=le(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":f=2*e.length;break;default:throw new Error("Unknown encoding")}return f},p.concat=function(e,n){if(A(z(e),`Usage: Buffer.concat(list, [totalLength])
6
+ list should be an Array.`),e.length===0)return new p(0);if(e.length===1)return e[0];if(typeof n!="number")for(b=n=0;b<e.length;b++)n+=e[b].length;for(var f=new p(n),w=0,b=0;b<e.length;b++){var B=e[b];B.copy(f,w),w+=B.length}return f},p.prototype.write=function(e,n,f,w){isFinite(n)?isFinite(f)||(w=f,f=void 0):($=w,w=n,n=f,f=$),n=Number(n)||0;var b,B,M,Y,$=this.length-n;switch((!f||$<(f=Number(f)))&&(f=$),w=String(w||"utf8").toLowerCase()){case"hex":b=function(J,K,Q,G){Q=Number(Q)||0;var V=J.length-Q;(!G||V<(G=Number(G)))&&(G=V),A((V=K.length)%2==0,"Invalid hex string"),V/2<G&&(G=V/2);for(var ue=0;ue<G;ue++){var ve=parseInt(K.substr(2*ue,2),16);A(!isNaN(ve),"Invalid hex string"),J[Q+ue]=ve}return p._charsWritten=2*ue,ue}(this,e,n,f);break;case"utf8":case"utf-8":B=this,M=n,Y=f,b=p._charsWritten=ee(Z(e),B,M,Y);break;case"ascii":case"binary":b=E(this,e,n,f);break;case"base64":B=this,M=n,Y=f,b=p._charsWritten=ee(le(e),B,M,Y);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":b=_(this,e,n,f);break;default:throw new Error("Unknown encoding")}return b},p.prototype.toString=function(e,n,f){var w,b,B,M,Y=this;if(e=String(e||"utf8").toLowerCase(),n=Number(n)||0,(f=f!==void 0?Number(f):Y.length)===n)return"";switch(e){case"hex":w=function($,J,K){var Q=$.length;(!J||J<0)&&(J=0),(!K||K<0||Q<K)&&(K=Q);for(var G="",V=J;V<K;V++)G+=H($[V]);return G}(Y,n,f);break;case"utf8":case"utf-8":w=function($,J,K){var Q="",G="";K=Math.min($.length,K);for(var V=J;V<K;V++)$[V]<=127?(Q+=fe(G)+String.fromCharCode($[V]),G=""):G+="%"+$[V].toString(16);return Q+fe(G)}(Y,n,f);break;case"ascii":case"binary":w=I(Y,n,f);break;case"base64":b=Y,M=f,w=(B=n)===0&&M===b.length?y.fromByteArray(b):y.fromByteArray(b.slice(B,M));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":w=function($,J,K){for(var Q=$.slice(J,K),G="",V=0;V<Q.length;V+=2)G+=String.fromCharCode(Q[V]+256*Q[V+1]);return G}(Y,n,f);break;default:throw new Error("Unknown encoding")}return w},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},p.prototype.copy=function(e,n,f,w){if(n=n||0,(w=w||w===0?w:this.length)!==(f=f||0)&&e.length!==0&&this.length!==0){A(f<=w,"sourceEnd < sourceStart"),A(0<=n&&n<e.length,"targetStart out of bounds"),A(0<=f&&f<this.length,"sourceStart out of bounds"),A(0<=w&&w<=this.length,"sourceEnd out of bounds"),w>this.length&&(w=this.length);var b=(w=e.length-n<w-f?e.length-n+f:w)-f;if(b<100||!p._useTypedArrays)for(var B=0;B<b;B++)e[B+n]=this[B+f];else e._set(this.subarray(f,f+b),n)}},p.prototype.slice=function(e,n){var f=this.length;if(e=N(e,f,0),n=N(n,f,f),p._useTypedArrays)return p._augment(this.subarray(e,n));for(var w=n-e,b=new p(w,void 0,!0),B=0;B<w;B++)b[B]=this[B+e];return b},p.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},p.prototype.set=function(e,n){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,n)},p.prototype.readUInt8=function(e,n){if(n||(A(e!=null,"missing offset"),A(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},p.prototype.readUInt16LE=function(e,n){return v(this,e,!0,n)},p.prototype.readUInt16BE=function(e,n){return v(this,e,!1,n)},p.prototype.readUInt32LE=function(e,n){return k(this,e,!0,n)},p.prototype.readUInt32BE=function(e,n){return k(this,e,!1,n)},p.prototype.readInt8=function(e,n){if(n||(A(e!=null,"missing offset"),A(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,n){return c(this,e,!0,n)},p.prototype.readInt16BE=function(e,n){return c(this,e,!1,n)},p.prototype.readInt32LE=function(e,n){return m(this,e,!0,n)},p.prototype.readInt32BE=function(e,n){return m(this,e,!1,n)},p.prototype.readFloatLE=function(e,n){return r(this,e,!0,n)},p.prototype.readFloatBE=function(e,n){return r(this,e,!1,n)},p.prototype.readDoubleLE=function(e,n){return i(this,e,!0,n)},p.prototype.readDoubleBE=function(e,n){return i(this,e,!1,n)},p.prototype.writeUInt8=function(e,n,f){f||(A(e!=null,"missing value"),A(n!=null,"missing offset"),A(n<this.length,"trying to write beyond buffer length"),ae(e,255)),n>=this.length||(this[n]=e)},p.prototype.writeUInt16LE=function(e,n,f){t(this,e,n,!0,f)},p.prototype.writeUInt16BE=function(e,n,f){t(this,e,n,!1,f)},p.prototype.writeUInt32LE=function(e,n,f){h(this,e,n,!0,f)},p.prototype.writeUInt32BE=function(e,n,f){h(this,e,n,!1,f)},p.prototype.writeInt8=function(e,n,f){f||(A(e!=null,"missing value"),A(n!=null,"missing offset"),A(n<this.length,"Trying to write beyond buffer length"),re(e,127,-128)),n>=this.length||(0<=e?this.writeUInt8(e,n,f):this.writeUInt8(255+e+1,n,f))},p.prototype.writeInt16LE=function(e,n,f){g(this,e,n,!0,f)},p.prototype.writeInt16BE=function(e,n,f){g(this,e,n,!1,f)},p.prototype.writeInt32LE=function(e,n,f){D(this,e,n,!0,f)},p.prototype.writeInt32BE=function(e,n,f){D(this,e,n,!1,f)},p.prototype.writeFloatLE=function(e,n,f){C(this,e,n,!0,f)},p.prototype.writeFloatBE=function(e,n,f){C(this,e,n,!1,f)},p.prototype.writeDoubleLE=function(e,n,f){O(this,e,n,!0,f)},p.prototype.writeDoubleBE=function(e,n,f){O(this,e,n,!1,f)},p.prototype.fill=function(e,n,f){if(n=n||0,f=f||this.length,A(typeof(e=typeof(e=e||0)=="string"?e.charCodeAt(0):e)=="number"&&!isNaN(e),"value is not a number"),A(n<=f,"end < start"),f!==n&&this.length!==0){A(0<=n&&n<this.length,"start out of bounds"),A(0<=f&&f<=this.length,"end out of bounds");for(var w=n;w<f;w++)this[w]=e}},p.prototype.inspect=function(){for(var e=[],n=this.length,f=0;f<n;f++)if(e[f]=H(this[f]),f===l.INSPECT_MAX_BYTES){e[f+1]="...";break}return"<Buffer "+e.join(" ")+">"},p.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(p._useTypedArrays)return new p(this).buffer;for(var e=new Uint8Array(this.length),n=0,f=e.length;n<f;n+=1)e[n]=this[n];return e.buffer};var L=p.prototype;function N(e,n,f){return typeof e!="number"?f:n<=(e=~~e)?n:0<=e||0<=(e+=n)?e:0}function X(e){return(e=~~Math.ceil(+e))<0?0:e}function z(e){return(Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"})(e)}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e){for(var n=[],f=0;f<e.length;f++){var w=e.charCodeAt(f);if(w<=127)n.push(e.charCodeAt(f));else for(var b=f,B=(55296<=w&&w<=57343&&f++,encodeURIComponent(e.slice(b,f+1)).substr(1).split("%")),M=0;M<B.length;M++)n.push(parseInt(B[M],16))}return n}function le(e){return y.toByteArray(e)}function ee(e,n,f,w){for(var b=0;b<w&&!(b+f>=n.length||b>=e.length);b++)n[b+f]=e[b];return b}function fe(e){try{return decodeURIComponent(e)}catch{return"�"}}function ae(e,n){A(typeof e=="number","cannot write a non-number as a number"),A(0<=e,"specified a negative value for writing an unsigned value"),A(e<=n,"value is larger than maximum value for type"),A(Math.floor(e)===e,"value has a fractional component")}function re(e,n,f){A(typeof e=="number","cannot write a non-number as a number"),A(e<=n,"value larger than maximum allowed value"),A(f<=e,"value smaller than minimum allowed value"),A(Math.floor(e)===e,"value has a fractional component")}function se(e,n,f){A(typeof e=="number","cannot write a non-number as a number"),A(e<=n,"value larger than maximum allowed value"),A(f<=e,"value smaller than minimum allowed value")}function A(e,n){if(!e)throw new Error(n||"Failed assertion")}p._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=L.get,e.set=L.set,e.write=L.write,e.toString=L.toString,e.toLocaleString=L.toString,e.toJSON=L.toJSON,e.copy=L.copy,e.slice=L.slice,e.readUInt8=L.readUInt8,e.readUInt16LE=L.readUInt16LE,e.readUInt16BE=L.readUInt16BE,e.readUInt32LE=L.readUInt32LE,e.readUInt32BE=L.readUInt32BE,e.readInt8=L.readInt8,e.readInt16LE=L.readInt16LE,e.readInt16BE=L.readInt16BE,e.readInt32LE=L.readInt32LE,e.readInt32BE=L.readInt32BE,e.readFloatLE=L.readFloatLE,e.readFloatBE=L.readFloatBE,e.readDoubleLE=L.readDoubleLE,e.readDoubleBE=L.readDoubleBE,e.writeUInt8=L.writeUInt8,e.writeUInt16LE=L.writeUInt16LE,e.writeUInt16BE=L.writeUInt16BE,e.writeUInt32LE=L.writeUInt32LE,e.writeUInt32BE=L.writeUInt32BE,e.writeInt8=L.writeInt8,e.writeInt16LE=L.writeInt16LE,e.writeInt16BE=L.writeInt16BE,e.writeInt32LE=L.writeInt32LE,e.writeInt32BE=L.writeInt32BE,e.writeFloatLE=L.writeFloatLE,e.writeFloatBE=L.writeFloatBE,e.writeDoubleLE=L.writeDoubleLE,e.writeDoubleBE=L.writeDoubleBE,e.fill=L.fill,e.inspect=L.inspect,e.toArrayBuffer=L.toArrayBuffer,e}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(o,u,l){(function(d,U,y,S,x,F,P,R,W){var y=o("buffer").Buffer,j=4,p=new y(j);p.fill(0),u.exports={hash:function(E,_,I,v){for(var k=_(function(t,h){t.length%j!=0&&(g=t.length+(j-t.length%j),t=y.concat([t,p],g));for(var g,D=[],C=h?t.readInt32BE:t.readInt32LE,O=0;O<t.length;O+=j)D.push(C.call(t,O));return D}(E=y.isBuffer(E)?E:new y(E),v),8*E.length),_=v,c=new y(I),m=_?c.writeInt32BE:c.writeInt32LE,r=0;r<k.length;r++)m.call(c,k[r],4*r,!0);return c}}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(o,u,l){(function(d,U,y,S,x,F,P,R,W){var y=o("buffer").Buffer,j=o("./sha"),p=o("./sha256"),E=o("./rng"),_={sha1:j,sha256:p,md5:o("./md5")},I=64,v=new y(I);function k(t,h){var g=_[t=t||"sha1"],D=[];return g||c("algorithm:",t,"is not yet supported"),{update:function(C){return y.isBuffer(C)||(C=new y(C)),D.push(C),C.length,this},digest:function(C){var O=y.concat(D),O=h?function(L,N,X){y.isBuffer(N)||(N=new y(N)),y.isBuffer(X)||(X=new y(X)),N.length>I?N=L(N):N.length<I&&(N=y.concat([N,v],I));for(var z=new y(I),H=new y(I),Z=0;Z<I;Z++)z[Z]=54^N[Z],H[Z]=92^N[Z];return X=L(y.concat([z,X])),L(y.concat([H,X]))}(g,h,O):g(O);return D=null,C?O.toString(C):O}}}function c(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
7
+ `))}v.fill(0),l.createHash=function(t){return k(t)},l.createHmac=k,l.randomBytes=function(t,h){if(!h||!h.call)return new y(E(t));try{h.call(this,void 0,new y(E(t)))}catch(g){h(g)}};var m,r=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],i=function(t){l[t]=function(){c("sorry,",t,"is not implemented yet")}};for(m in r)i(r[m])}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(o,u,l){(function(d,U,T,S,x,F,P,R,W){var y=o("./helpers");function j(c,m){c[m>>5]|=128<<m%32,c[14+(m+64>>>9<<4)]=m;for(var r=1732584193,i=-271733879,t=-1732584194,h=271733878,g=0;g<c.length;g+=16){var D=r,C=i,O=t,L=h,r=E(r,i,t,h,c[g+0],7,-680876936),h=E(h,r,i,t,c[g+1],12,-389564586),t=E(t,h,r,i,c[g+2],17,606105819),i=E(i,t,h,r,c[g+3],22,-1044525330);r=E(r,i,t,h,c[g+4],7,-176418897),h=E(h,r,i,t,c[g+5],12,1200080426),t=E(t,h,r,i,c[g+6],17,-1473231341),i=E(i,t,h,r,c[g+7],22,-45705983),r=E(r,i,t,h,c[g+8],7,1770035416),h=E(h,r,i,t,c[g+9],12,-1958414417),t=E(t,h,r,i,c[g+10],17,-42063),i=E(i,t,h,r,c[g+11],22,-1990404162),r=E(r,i,t,h,c[g+12],7,1804603682),h=E(h,r,i,t,c[g+13],12,-40341101),t=E(t,h,r,i,c[g+14],17,-1502002290),r=_(r,i=E(i,t,h,r,c[g+15],22,1236535329),t,h,c[g+1],5,-165796510),h=_(h,r,i,t,c[g+6],9,-1069501632),t=_(t,h,r,i,c[g+11],14,643717713),i=_(i,t,h,r,c[g+0],20,-373897302),r=_(r,i,t,h,c[g+5],5,-701558691),h=_(h,r,i,t,c[g+10],9,38016083),t=_(t,h,r,i,c[g+15],14,-660478335),i=_(i,t,h,r,c[g+4],20,-405537848),r=_(r,i,t,h,c[g+9],5,568446438),h=_(h,r,i,t,c[g+14],9,-1019803690),t=_(t,h,r,i,c[g+3],14,-187363961),i=_(i,t,h,r,c[g+8],20,1163531501),r=_(r,i,t,h,c[g+13],5,-1444681467),h=_(h,r,i,t,c[g+2],9,-51403784),t=_(t,h,r,i,c[g+7],14,1735328473),r=I(r,i=_(i,t,h,r,c[g+12],20,-1926607734),t,h,c[g+5],4,-378558),h=I(h,r,i,t,c[g+8],11,-2022574463),t=I(t,h,r,i,c[g+11],16,1839030562),i=I(i,t,h,r,c[g+14],23,-35309556),r=I(r,i,t,h,c[g+1],4,-1530992060),h=I(h,r,i,t,c[g+4],11,1272893353),t=I(t,h,r,i,c[g+7],16,-155497632),i=I(i,t,h,r,c[g+10],23,-1094730640),r=I(r,i,t,h,c[g+13],4,681279174),h=I(h,r,i,t,c[g+0],11,-358537222),t=I(t,h,r,i,c[g+3],16,-722521979),i=I(i,t,h,r,c[g+6],23,76029189),r=I(r,i,t,h,c[g+9],4,-640364487),h=I(h,r,i,t,c[g+12],11,-421815835),t=I(t,h,r,i,c[g+15],16,530742520),r=v(r,i=I(i,t,h,r,c[g+2],23,-995338651),t,h,c[g+0],6,-198630844),h=v(h,r,i,t,c[g+7],10,1126891415),t=v(t,h,r,i,c[g+14],15,-1416354905),i=v(i,t,h,r,c[g+5],21,-57434055),r=v(r,i,t,h,c[g+12],6,1700485571),h=v(h,r,i,t,c[g+3],10,-1894986606),t=v(t,h,r,i,c[g+10],15,-1051523),i=v(i,t,h,r,c[g+1],21,-2054922799),r=v(r,i,t,h,c[g+8],6,1873313359),h=v(h,r,i,t,c[g+15],10,-30611744),t=v(t,h,r,i,c[g+6],15,-1560198380),i=v(i,t,h,r,c[g+13],21,1309151649),r=v(r,i,t,h,c[g+4],6,-145523070),h=v(h,r,i,t,c[g+11],10,-1120210379),t=v(t,h,r,i,c[g+2],15,718787259),i=v(i,t,h,r,c[g+9],21,-343485551),r=k(r,D),i=k(i,C),t=k(t,O),h=k(h,L)}return Array(r,i,t,h)}function p(c,m,r,i,t,h){return k((m=k(k(m,c),k(i,h)))<<t|m>>>32-t,r)}function E(c,m,r,i,t,h,g){return p(m&r|~m&i,c,m,t,h,g)}function _(c,m,r,i,t,h,g){return p(m&i|r&~i,c,m,t,h,g)}function I(c,m,r,i,t,h,g){return p(m^r^i,c,m,t,h,g)}function v(c,m,r,i,t,h,g){return p(r^(m|~i),c,m,t,h,g)}function k(c,m){var r=(65535&c)+(65535&m);return(c>>16)+(m>>16)+(r>>16)<<16|65535&r}u.exports=function(c){return y.hash(c,j,16)}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(o,u,l){(function(d,U,T,S,x,F,P,R,W){u.exports=function(y){for(var j,p=new Array(y),E=0;E<y;E++)!(3&E)&&(j=4294967296*Math.random()),p[E]=j>>>((3&E)<<3)&255;return p}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(o,u,l){(function(d,U,T,S,x,F,P,R,W){var y=o("./helpers");function j(_,I){_[I>>5]|=128<<24-I%32,_[15+(I+64>>9<<4)]=I;for(var v,k,c,m=Array(80),r=1732584193,i=-271733879,t=-1732584194,h=271733878,g=-1009589776,D=0;D<_.length;D+=16){for(var C=r,O=i,L=t,N=h,X=g,z=0;z<80;z++){m[z]=z<16?_[D+z]:E(m[z-3]^m[z-8]^m[z-14]^m[z-16],1);var H=p(p(E(r,5),(H=i,k=t,c=h,(v=z)<20?H&k|~H&c:!(v<40)&&v<60?H&k|H&c|k&c:H^k^c)),p(p(g,m[z]),(v=z)<20?1518500249:v<40?1859775393:v<60?-1894007588:-899497514)),g=h,h=t,t=E(i,30),i=r,r=H}r=p(r,C),i=p(i,O),t=p(t,L),h=p(h,N),g=p(g,X)}return Array(r,i,t,h,g)}function p(_,I){var v=(65535&_)+(65535&I);return(_>>16)+(I>>16)+(v>>16)<<16|65535&v}function E(_,I){return _<<I|_>>>32-I}u.exports=function(_){return y.hash(_,j,20,!0)}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(o,u,l){(function(d,U,T,S,x,F,P,R,W){function y(I,v){var k=(65535&I)+(65535&v);return(I>>16)+(v>>16)+(k>>16)<<16|65535&k}function j(I,v){var k,c=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),m=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),r=new Array(64);I[v>>5]|=128<<24-v%32,I[15+(v+64>>9<<4)]=v;for(var i,t,h=0;h<I.length;h+=16){for(var g=m[0],D=m[1],C=m[2],O=m[3],L=m[4],N=m[5],X=m[6],z=m[7],H=0;H<64;H++)r[H]=H<16?I[H+h]:y(y(y((t=r[H-2],E(t,17)^E(t,19)^_(t,10)),r[H-7]),(t=r[H-15],E(t,7)^E(t,18)^_(t,3))),r[H-16]),k=y(y(y(y(z,E(t=L,6)^E(t,11)^E(t,25)),L&N^~L&X),c[H]),r[H]),i=y(E(i=g,2)^E(i,13)^E(i,22),g&D^g&C^D&C),z=X,X=N,N=L,L=y(O,k),O=C,C=D,D=g,g=y(k,i);m[0]=y(g,m[0]),m[1]=y(D,m[1]),m[2]=y(C,m[2]),m[3]=y(O,m[3]),m[4]=y(L,m[4]),m[5]=y(N,m[5]),m[6]=y(X,m[6]),m[7]=y(z,m[7])}return m}var p=o("./helpers"),E=function(I,v){return I>>>v|I<<32-v},_=function(I,v){return I>>>v};u.exports=function(I){return p.hash(I,j,32,!0)}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(o,u,l){(function(d,U,T,S,x,F,P,R,W){l.read=function(y,j,p,E,h){var I,v,k=8*h-E-1,c=(1<<k)-1,m=c>>1,r=-7,i=p?h-1:0,t=p?-1:1,h=y[j+i];for(i+=t,I=h&(1<<-r)-1,h>>=-r,r+=k;0<r;I=256*I+y[j+i],i+=t,r-=8);for(v=I&(1<<-r)-1,I>>=-r,r+=E;0<r;v=256*v+y[j+i],i+=t,r-=8);if(I===0)I=1-m;else{if(I===c)return v?NaN:1/0*(h?-1:1);v+=Math.pow(2,E),I-=m}return(h?-1:1)*v*Math.pow(2,I-E)},l.write=function(y,j,p,E,_,g){var v,k,c=8*g-_-1,m=(1<<c)-1,r=m>>1,i=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,t=E?0:g-1,h=E?1:-1,g=j<0||j===0&&1/j<0?1:0;for(j=Math.abs(j),isNaN(j)||j===1/0?(k=isNaN(j)?1:0,v=m):(v=Math.floor(Math.log(j)/Math.LN2),j*(E=Math.pow(2,-v))<1&&(v--,E*=2),2<=(j+=1<=v+r?i/E:i*Math.pow(2,1-r))*E&&(v++,E/=2),m<=v+r?(k=0,v=m):1<=v+r?(k=(j*E-1)*Math.pow(2,_),v+=r):(k=j*Math.pow(2,r-1)*Math.pow(2,_),v=0));8<=_;y[p+t]=255&k,t+=h,k/=256,_-=8);for(v=v<<_|k,c+=_;0<c;y[p+t]=255&v,t+=h,v/=256,c-=8);y[p+t-h]|=128*g}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(o,u,l){(function(d,U,T,S,x,F,P,R,W){var y,j,p;function E(){}(d=u.exports={}).nextTick=(j=typeof window<"u"&&window.setImmediate,p=typeof window<"u"&&window.postMessage&&window.addEventListener,j?function(_){return window.setImmediate(_)}:p?(y=[],window.addEventListener("message",function(_){var I=_.source;I!==window&&I!==null||_.data!=="process-tick"||(_.stopPropagation(),0<y.length&&y.shift()())},!0),function(_){y.push(_),window.postMessage("process-tick","*")}):function(_){setTimeout(_,0)}),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=E,d.addListener=E,d.once=E,d.off=E,d.removeListener=E,d.removeAllListeners=E,d.emit=E,d.binding=function(_){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(_){throw new Error("process.chdir is not supported")}}).call(this,o("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},o("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(je);var It=je.exports;const Ee=Et(It);function q(s){return s!=null&&typeof s=="object"&&s["@@functional/placeholder"]===!0}function ie(s){return function a(o){return arguments.length===0||q(o)?a:s.apply(this,arguments)}}function oe(s){return function a(o,u){switch(arguments.length){case 0:return a;case 1:return q(o)?a:ie(function(l){return s(o,l)});default:return q(o)&&q(u)?a:q(o)?ie(function(l){return s(l,u)}):q(u)?ie(function(l){return s(o,l)}):s(o,u)}}}function Le(s){return function a(o,u,l){switch(arguments.length){case 0:return a;case 1:return q(o)?a:oe(function(d,U){return s(o,d,U)});case 2:return q(o)&&q(u)?a:q(o)?oe(function(d,U){return s(d,u,U)}):q(u)?oe(function(d,U){return s(o,d,U)}):ie(function(d){return s(o,u,d)});default:return q(o)&&q(u)&&q(l)?a:q(o)&&q(u)?oe(function(d,U){return s(d,U,l)}):q(o)&&q(l)?oe(function(d,U){return s(d,u,U)}):q(u)&&q(l)?oe(function(d,U){return s(o,d,U)}):q(o)?ie(function(d){return s(d,u,l)}):q(u)?ie(function(d){return s(o,d,l)}):q(l)?ie(function(d){return s(o,u,d)}):s(o,u,l)}}}function de(s,a){return Object.prototype.hasOwnProperty.call(a,s)}function Ie(s){return Object.prototype.toString.call(s)==="[object Object]"}var Bt=Le(function(a,o,u){var l={},d;for(d in o)de(d,o)&&(l[d]=de(d,u)?a(d,o[d],u[d]):o[d]);for(d in u)de(d,u)&&!de(d,l)&&(l[d]=u[d]);return l}),At=Le(function s(a,o,u){return Bt(function(l,d,U){return Ie(d)&&Ie(U)?s(a,d,U):a(l,d,U)},o,u)}),_t=oe(function(a,o){return At(function(u,l,d){return d},a,o)});let xt={headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"};async function St(s,a={}){const{baseURL:o="",...u}=a;return fetch(`${o}${s}`,_t(xt,u)).then(l=>{if(!l.ok)throw l;return l})}/*!
8
8
  * Compressor.js v1.2.1
9
9
  * https://fengyuanchen.github.io/compressorjs
10
10
  *
@@ -12,4 +12,4 @@ list should be an Array.`),e.length===0)return new g(0);if(e.length===1)return e
12
12
  * Released under the MIT license
13
13
  *
14
14
  * Date: 2023-02-28T14:09:41.732Z
15
- */function Be(s,a){var o=Object.keys(s);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(s);a&&(u=u.filter(function(l){return Object.getOwnPropertyDescriptor(s,l).enumerable})),o.push.apply(o,u)}return o}function ge(s){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?Be(Object(o),!0).forEach(function(u){Tt(s,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(o)):Be(Object(o)).forEach(function(u){Object.defineProperty(s,u,Object.getOwnPropertyDescriptor(o,u))})}return s}function Ut(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function Ae(s,a){for(var o=0;o<a.length;o++){var u=a[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,ke(u.key),u)}}function jt(s,a,o){return a&&Ae(s.prototype,a),o&&Ae(s,o),Object.defineProperty(s,"prototype",{writable:!1}),s}function Tt(s,a,o){return a=ke(a),a in s?Object.defineProperty(s,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[a]=o,s}function pe(){return pe=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var o=arguments[a];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u])}return s},pe.apply(this,arguments)}function Lt(s,a){if(typeof s!="object"||s===null)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var u=o.call(s,a);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)}function ke(s){var a=Lt(s,"string");return typeof a=="symbol"?a:String(a)}var Fe={exports:{}};(function(s){typeof window>"u"||function(a){var o=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,u=a.Blob&&function(){try{return!!new Blob}catch{return!1}}(),l=u&&a.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),d=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,U=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,j=(u||d)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(S){var x,F,P,R,W,y,T,g,E;if(x=S.match(U),!x)throw new Error("invalid data URI");for(F=x[2]?x[1]:"text/plain"+(x[3]||";charset=US-ASCII"),P=!!x[4],R=S.slice(x[0].length),P?W=atob(R):W=decodeURIComponent(R),y=new ArrayBuffer(W.length),T=new Uint8Array(y),g=0;g<W.length;g+=1)T[g]=W.charCodeAt(g);return u?new Blob([l?T:y],{type:F}):(E=new d,E.append(y),E.getBlob(F))};a.HTMLCanvasElement&&!o.toBlob&&(o.mozGetAsFile?o.toBlob=function(S,x,F){var P=this;setTimeout(function(){F&&o.toDataURL&&j?S(j(P.toDataURL(x,F))):S(P.mozGetAsFile("blob",x))})}:o.toDataURL&&j&&(o.msToBlob?o.toBlob=function(S,x,F){var P=this;setTimeout(function(){(x&&x!=="image/png"||F)&&o.toDataURL&&j?S(j(P.toDataURL(x,F))):S(P.msToBlob(x))})}:o.toBlob=function(S,x,F){var P=this;setTimeout(function(){S(j(P.toDataURL(x,F)))})})),s.exports?s.exports=j:a.dataURLtoBlob=j}(window)})(Fe);var _e=Fe.exports,kt=function(a){return typeof Blob>"u"?!1:a instanceof Blob||Object.prototype.toString.call(a)==="[object Blob]"},xe={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},Ft=typeof window<"u"&&typeof window.document<"u",te=Ft?window:{},me=function(a){return a>0&&a<1/0},Ct=Array.prototype.slice;function be(s){return Array.from?Array.from(s):Ct.call(s)}var Ot=/^image\/.+$/;function we(s){return Ot.test(s)}function Dt(s){var a=we(s)?s.substr(6):"";return a==="jpeg"&&(a="jpg"),".".concat(a)}var Ce=String.fromCharCode;function Pt(s,a,o){var u="",l;for(o+=a,l=a;l<o;l+=1)u+=Ce(s.getUint8(l));return u}var Mt=te.btoa;function Se(s,a){for(var o=[],u=8192,l=new Uint8Array(s);l.length>0;)o.push(Ce.apply(null,be(l.subarray(0,u)))),l=l.subarray(u);return"data:".concat(a,";base64,").concat(Mt(o.join("")))}function Rt(s){var a=new DataView(s),o;try{var u,l,d;if(a.getUint8(0)===255&&a.getUint8(1)===216)for(var U=a.byteLength,j=2;j+1<U;){if(a.getUint8(j)===255&&a.getUint8(j+1)===225){l=j;break}j+=1}if(l){var S=l+4,x=l+10;if(Pt(a,S,4)==="Exif"){var F=a.getUint16(x);if(u=F===18761,(u||F===19789)&&a.getUint16(x+2,u)===42){var P=a.getUint32(x+4,u);P>=8&&(d=x+P)}}}if(d){var R=a.getUint16(d,u),W,y;for(y=0;y<R;y+=1)if(W=d+y*12+2,a.getUint16(W,u)===274){W+=8,o=a.getUint16(W,u),a.setUint16(W,1,u);break}}}catch{o=1}return o}function Wt(s){var a=0,o=1,u=1;switch(s){case 2:o=-1;break;case 3:a=-180;break;case 4:u=-1;break;case 5:a=90,u=-1;break;case 6:a=90;break;case 7:a=90,o=-1;break;case 8:a=-90;break}return{rotate:a,scaleX:o,scaleY:u}}var Nt=/\.\d*(?:0|9){12}\d*$/;function Ue(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Nt.test(s)?Math.round(s*a)/a:s}function ce(s){var a=s.aspectRatio,o=s.height,u=s.width,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",d=me(u),U=me(o);if(d&&U){var j=o*a;(l==="contain"||l==="none")&&j>u||l==="cover"&&j<u?o=u/a:u=o*a}else d?o=u/a:U&&(u=o*a);return{width:u,height:o}}function Ht(s){for(var a=be(new Uint8Array(s)),o=a.length,u=[],l=0;l+3<o;){var d=a[l],U=a[l+1];if(d===255&&U===218)break;if(d===255&&U===216)l+=2;else{var j=a[l+2]*256+a[l+3],S=l+j+2,x=a.slice(l,S);u.push(x),l=S}}return u.reduce(function(F,P){return P[0]===255&&P[1]===225?F.concat(P):F},[])}function Yt(s,a){var o=be(new Uint8Array(s));if(o[2]!==255||o[3]!==224)return s;var u=o[4]*256+o[5],l=[255,216].concat(a,o.slice(4+u));return new Uint8Array(l)}var $t=te.ArrayBuffer,ye=te.FileReader,ne=te.URL||te.webkitURL,zt=/\.\w+$/,qt=te.Compressor,Kt=function(){function s(a,o){Ut(this,s),this.file=a,this.exif=[],this.image=new Image,this.options=ge(ge({},xe),o),this.aborted=!1,this.result=null,this.init()}return jt(s,[{key:"init",value:function(){var o=this,u=this.file,l=this.options;if(!kt(u)){this.fail(new Error("The first argument must be a File or Blob object."));return}var d=u.type;if(!we(d)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!ne||!ye){this.fail(new Error("The current browser does not support image compression."));return}$t||(l.checkOrientation=!1,l.retainExif=!1);var U=d==="image/jpeg",j=U&&l.checkOrientation,S=U&&l.retainExif;if(ne&&!j&&!S)this.load({url:ne.createObjectURL(u)});else{var x=new ye;this.reader=x,x.onload=function(F){var P=F.target,R=P.result,W={},y=1;j&&(y=Rt(R),y>1&&pe(W,Wt(y))),S&&(o.exif=Ht(R)),j||S?!ne||y>1?W.url=Se(R,d):W.url=ne.createObjectURL(u):W.url=R,o.load(W)},x.onabort=function(){o.fail(new Error("Aborted to read the image with FileReader."))},x.onerror=function(){o.fail(new Error("Failed to read the image with FileReader."))},x.onloadend=function(){o.reader=null},j||S?x.readAsArrayBuffer(u):x.readAsDataURL(u)}}},{key:"load",value:function(o){var u=this,l=this.file,d=this.image;d.onload=function(){u.draw(ge(ge({},o),{},{naturalWidth:d.naturalWidth,naturalHeight:d.naturalHeight}))},d.onabort=function(){u.fail(new Error("Aborted to load the image."))},d.onerror=function(){u.fail(new Error("Failed to load the image."))},te.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(te.navigator.userAgent)&&(d.crossOrigin="anonymous"),d.alt=l.name,d.src=o.url}},{key:"draw",value:function(o){var u=this,l=o.naturalWidth,d=o.naturalHeight,U=o.rotate,j=U===void 0?0:U,S=o.scaleX,x=S===void 0?1:S,F=o.scaleY,P=F===void 0?1:F,R=this.file,W=this.image,y=this.options,T=document.createElement("canvas"),g=T.getContext("2d"),E=Math.abs(j)%180===90,_=(y.resize==="contain"||y.resize==="cover")&&me(y.width)&&me(y.height),I=Math.max(y.maxWidth,0)||1/0,v=Math.max(y.maxHeight,0)||1/0,k=Math.max(y.minWidth,0)||0,c=Math.max(y.minHeight,0)||0,m=l/d,r=y.width,i=y.height;if(E){var t=[v,I];I=t[0],v=t[1];var h=[c,k];k=h[0],c=h[1];var p=[i,r];r=p[0],i=p[1]}_&&(m=r/i);var O=ce({aspectRatio:m,width:I,height:v},"contain");I=O.width,v=O.height;var C=ce({aspectRatio:m,width:k,height:c},"cover");if(k=C.width,c=C.height,_){var D=ce({aspectRatio:m,width:r,height:i},y.resize);r=D.width,i=D.height}else{var L=ce({aspectRatio:m,width:r,height:i}),N=L.width;r=N===void 0?l:N;var X=L.height;i=X===void 0?d:X}r=Math.floor(Ue(Math.min(Math.max(r,k),I))),i=Math.floor(Ue(Math.min(Math.max(i,c),v)));var z=-r/2,H=-i/2,Z=r,le=i,ee=[];if(_){var fe=0,ae=0,re=l,se=d,A=ce({aspectRatio:m,width:l,height:d},{contain:"cover",cover:"contain"}[y.resize]);re=A.width,se=A.height,fe=(l-re)/2,ae=(d-se)/2,ee.push(fe,ae,re,se)}if(ee.push(z,H,Z,le),E){var e=[i,r];r=e[0],i=e[1]}T.width=r,T.height=i,we(y.mimeType)||(y.mimeType=R.type);var n="transparent";R.size>y.convertSize&&y.convertTypes.indexOf(y.mimeType)>=0&&(y.mimeType="image/jpeg");var f=y.mimeType==="image/jpeg";if(f&&(n="#fff"),g.fillStyle=n,g.fillRect(0,0,r,i),y.beforeDraw&&y.beforeDraw.call(this,g,T),!this.aborted&&(g.save(),g.translate(r/2,i/2),g.rotate(j*Math.PI/180),g.scale(x,P),g.drawImage.apply(g,[W].concat(ee)),g.restore(),y.drew&&y.drew.call(this,g,T),!this.aborted)){var w=function(B){if(!u.aborted){var M=function(K){return u.done({naturalWidth:l,naturalHeight:d,result:K})};if(B&&f&&y.retainExif&&u.exif&&u.exif.length>0){var Y=function(K){return M(_e(Se(Yt(K,u.exif),y.mimeType)))};if(B.arrayBuffer)B.arrayBuffer().then(Y).catch(function(){u.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var $=new ye;u.reader=$,$.onload=function(J){var K=J.target;Y(K.result)},$.onabort=function(){u.fail(new Error("Aborted to read the compressed image with FileReader."))},$.onerror=function(){u.fail(new Error("Failed to read the compressed image with FileReader."))},$.onloadend=function(){u.reader=null},$.readAsArrayBuffer(B)}}else M(B)}};T.toBlob?T.toBlob(w,y.mimeType,y.quality):w(_e(T.toDataURL(y.mimeType,y.quality)))}}},{key:"done",value:function(o){var u=o.naturalWidth,l=o.naturalHeight,d=o.result,U=this.file,j=this.image,S=this.options;if(ne&&j.src.indexOf("blob:")===0&&ne.revokeObjectURL(j.src),d)if(S.strict&&!S.retainExif&&d.size>U.size&&S.mimeType===U.type&&!(S.width>u||S.height>l||S.minWidth>u||S.minHeight>l||S.maxWidth<u||S.maxHeight<l))d=U;else{var x=new Date;d.lastModified=x.getTime(),d.lastModifiedDate=x,d.name=U.name,d.name&&d.type!==U.type&&(d.name=d.name.replace(zt,Dt(d.type)))}else d=U;this.result=d,S.success&&S.success.call(this,d)}},{key:"fail",value:function(o){var u=this.options;if(u.error)u.error.call(this,o);else throw o}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=qt,s}},{key:"setDefaults",value:function(o){pe(xe,o)}}]),s}();const Vt={default:{maxWidth:1920},logo:{maxWidth:500,quality:.9},gallery:{maxWidth:2560}},Oe=s=>s instanceof Array?s:[s];function Xt(s,a){return new Promise((o,u)=>{if(!a)return o(s);new Kt(s,{success:l=>o(l),error:l=>u(l),...a})})}function Gt(s={}){let{acl:a="public-read",url:o,...u}=s;return o||(o="/api/file/sign?acl="+a),St(o,u).then(l=>l.json())}function Jt({file:s,url:a,onProgress:o}){return new Promise((u,l)=>{let d=new URLSearchParams(a),U=new XMLHttpRequest;U.upload.addEventListener("progress",o),U.addEventListener("error",l),U.addEventListener("load",function(){u(this)}),U.open("PUT",a),d.get("x-amz-acl")&&U.setRequestHeader("x-amz-acl",d.get("x-amz-acl")),U.send(s)})}function Qt(s){return new Promise(a=>{let o=new FileReader;o.onload=function(u){a(u.target.result)},o.readAsDataURL(s)})}function Zt(s){return s.type.startsWith("image/")?Qt(s).then(a=>new Promise((o,u)=>{let l=new Image;l.onload=()=>o([l.naturalWidth,l.naturalHeight]),l.onerror=d=>u(d),l.src=a})):Promise.resolve()}async function er(s,a){switch(typeof a){case"function":return a(s);case"string":const o=new FormData;return o.append("file",s),window.fetch(a,{method:"POST",credentials:"include",body:o}).then(u=>u.json()).then(Oe).then(u=>u.map(({data:l,name:d,type:U})=>new File([new Uint8Array(l.data)],d,{type:U})));default:return s}}async function tr(s,a,o){let{compression:u,transform:l=F=>F,rename:d,convert:U,...j}=o;const S=await er(s,U).then(Oe),x=await Promise.all(S.map(async F=>{typeof u=="string"&&(u=Vt[u]);let[P,R]=await Promise.all([Gt(j||{}),u?Xt(F,u):Promise.resolve(F)]),W;try{W=await Zt(R)}catch{}return await Jt({file:R,url:P.uploadUrl,onProgress(y){a(Math.floor(y.loaded/y.total*100))}}),l({name:d||R.name,size:R.size,url:P.url,type:R.type,dimensions:W})}));return x.length===1?x[0]:x}function ir(s,a,o={}){let{group:u=1}=o,l=s.match(a);if(l)return l[u]}function rr(s){return new Promise((a,o)=>{setTimeout(a,s)})}function ar(s){return s==="false"?!1:s==="true"?!0:s}async function sr(s,a={}){let{interval:o=200,limit:u=50}=a,l=0,d;for(;l<u&&(l++,!(d=s()));)await rr(o);if(l>=u)throw new Error("Could not resolve");return d}function ur(s,a={type:"text/javascript"}){if(!document||document.querySelector(`script[src="${s}"]`))return;let{type:o}=a,u=document.createElement("script");u.type=o,u.src=s,document.body.appendChild(u)}function fr(s,a=1){const o={en:tt,nb:vt},u=document.documentElement.getAttribute("lang")||"nb";let l=o[u]?.[s]||s;return l.includes("|")&&(l=l.split("|")[a-1]),l}function cr(s){return{validator(a,o){return s instanceof Array?a instanceof Array?a.every(u=>s.includes(u)):s.includes(a):s(a,o)}}}function nr(s){return Object.prototype.toString.call(s)==="[object Object]"}function De(s,a,o={}){if(!a||!nr(a))return s;let{ignoreMissing:u=!1}=o,l={},d=(j,S)=>j.length===S.length&&Ee(j.slice())===Ee(S.slice()),U=function(j,S,x){let F=Object.prototype.toString.call(j),P=Object.prototype.toString.call(S);if(F!==P){l[x]=S;return}if(F==="[object Object]"){let R=De(j,S,o);Object.keys(R).length&&(l[x]=R);return}if(F==="[object Array]"){d(j,S)||(l[x]=S);return}if(F==="[object Function]"){j.toString()!==S.toString()&&(l[x]=S);return}j!==S&&(l[x]=S)};for(let j in s)Object.hasOwn(s,j)&&U(s[j],a[j],j);if(!u)for(let j in a)Object.hasOwn(a,j)&&!(j in s)&&(l[j]=a[j]);return l}function lr(...s){return!!Object.keys(De(...s)).length}const hr=function(){return JSON.parse(JSON.stringify.apply(this,arguments))};function dr(s,a,o){return tr(s,a,o)}function gr(s,a=document.documentElement.getAttribute("lang")||"nb"){return!s&&s!==0?"-":s.toLocaleString(a,{style:"currency",currency:"NOK",minimumFractionDigits:0})}const or=s=>{if(typeof s!="string")return s;try{return JSON.parse(s)}catch{return{}}},pr=(s={},a={})=>o=>or(s)[o]||a[o]||o,je=(s,a={})=>o=>{switch(s){case"currency":const{locale:u,...l}=a;return new Intl.NumberFormat(u,{style:"currency",maximumFractionDigits:0,...l}).format(o);case"number":return new Intl.NumberFormat(a.locale).format(o);case"year":case"years":return[o,new Intl.RelativeTimeFormat(a.locale).formatToParts(o,"year").at(-1).value].join(" ");case"percent":const{maximumFractionDigits:d=0}=a;return[Number(o).toFixed(d),"%"].join("");default:return o}},mr=(s={})=>{const{locale:a,currency:o}=s,u=/(.{1})\d{3}(\D)\d$/,l=je("number",{locale:a})(1000.1);let[d,U,j]=u.exec(l);const S=je("currency",{locale:a,currency:o})(1000.1),x=S.replace(/[\d\s\,\.]/g,""),F={mask:Number,thousandsSeparator:U};return S.match(/^\d/)?{suffix:x,mask:F}:{symbol:x,mask:F}};export{hr as C,De as D,ir as E,ur as L,cr as P,fr as T,sr as W,mr as a,pr as b,gr as c,je as f,Et as g,lr as h,ar as t,dr as u};
15
+ */function Be(s,a){var o=Object.keys(s);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(s);a&&(u=u.filter(function(l){return Object.getOwnPropertyDescriptor(s,l).enumerable})),o.push.apply(o,u)}return o}function pe(s){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?Be(Object(o),!0).forEach(function(u){jt(s,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(o)):Be(Object(o)).forEach(function(u){Object.defineProperty(s,u,Object.getOwnPropertyDescriptor(o,u))})}return s}function Ut(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function Ae(s,a){for(var o=0;o<a.length;o++){var u=a[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,ke(u.key),u)}}function Tt(s,a,o){return a&&Ae(s.prototype,a),o&&Ae(s,o),Object.defineProperty(s,"prototype",{writable:!1}),s}function jt(s,a,o){return a=ke(a),a in s?Object.defineProperty(s,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[a]=o,s}function ge(){return ge=Object.assign?Object.assign.bind():function(s){for(var a=1;a<arguments.length;a++){var o=arguments[a];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u])}return s},ge.apply(this,arguments)}function Lt(s,a){if(typeof s!="object"||s===null)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var u=o.call(s,a);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)}function ke(s){var a=Lt(s,"string");return typeof a=="symbol"?a:String(a)}var Fe={exports:{}};(function(s){typeof window>"u"||function(a){var o=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,u=a.Blob&&function(){try{return!!new Blob}catch{return!1}}(),l=u&&a.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),d=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,U=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,T=(u||d)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(S){var x,F,P,R,W,y,j,p,E;if(x=S.match(U),!x)throw new Error("invalid data URI");for(F=x[2]?x[1]:"text/plain"+(x[3]||";charset=US-ASCII"),P=!!x[4],R=S.slice(x[0].length),P?W=atob(R):W=decodeURIComponent(R),y=new ArrayBuffer(W.length),j=new Uint8Array(y),p=0;p<W.length;p+=1)j[p]=W.charCodeAt(p);return u?new Blob([l?j:y],{type:F}):(E=new d,E.append(y),E.getBlob(F))};a.HTMLCanvasElement&&!o.toBlob&&(o.mozGetAsFile?o.toBlob=function(S,x,F){var P=this;setTimeout(function(){F&&o.toDataURL&&T?S(T(P.toDataURL(x,F))):S(P.mozGetAsFile("blob",x))})}:o.toDataURL&&T&&(o.msToBlob?o.toBlob=function(S,x,F){var P=this;setTimeout(function(){(x&&x!=="image/png"||F)&&o.toDataURL&&T?S(T(P.toDataURL(x,F))):S(P.msToBlob(x))})}:o.toBlob=function(S,x,F){var P=this;setTimeout(function(){S(T(P.toDataURL(x,F)))})})),s.exports?s.exports=T:a.dataURLtoBlob=T}(window)})(Fe);var _e=Fe.exports,kt=function(a){return typeof Blob>"u"?!1:a instanceof Blob||Object.prototype.toString.call(a)==="[object Blob]"},xe={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},Ft=typeof window<"u"&&typeof window.document<"u",te=Ft?window:{},me=function(a){return a>0&&a<1/0},Ct=Array.prototype.slice;function be(s){return Array.from?Array.from(s):Ct.call(s)}var Dt=/^image\/.+$/;function we(s){return Dt.test(s)}function Ot(s){var a=we(s)?s.substr(6):"";return a==="jpeg"&&(a="jpg"),".".concat(a)}var Ce=String.fromCharCode;function Pt(s,a,o){var u="",l;for(o+=a,l=a;l<o;l+=1)u+=Ce(s.getUint8(l));return u}var Mt=te.btoa;function Se(s,a){for(var o=[],u=8192,l=new Uint8Array(s);l.length>0;)o.push(Ce.apply(null,be(l.subarray(0,u)))),l=l.subarray(u);return"data:".concat(a,";base64,").concat(Mt(o.join("")))}function Rt(s){var a=new DataView(s),o;try{var u,l,d;if(a.getUint8(0)===255&&a.getUint8(1)===216)for(var U=a.byteLength,T=2;T+1<U;){if(a.getUint8(T)===255&&a.getUint8(T+1)===225){l=T;break}T+=1}if(l){var S=l+4,x=l+10;if(Pt(a,S,4)==="Exif"){var F=a.getUint16(x);if(u=F===18761,(u||F===19789)&&a.getUint16(x+2,u)===42){var P=a.getUint32(x+4,u);P>=8&&(d=x+P)}}}if(d){var R=a.getUint16(d,u),W,y;for(y=0;y<R;y+=1)if(W=d+y*12+2,a.getUint16(W,u)===274){W+=8,o=a.getUint16(W,u),a.setUint16(W,1,u);break}}}catch{o=1}return o}function Wt(s){var a=0,o=1,u=1;switch(s){case 2:o=-1;break;case 3:a=-180;break;case 4:u=-1;break;case 5:a=90,u=-1;break;case 6:a=90;break;case 7:a=90,o=-1;break;case 8:a=-90;break}return{rotate:a,scaleX:o,scaleY:u}}var Nt=/\.\d*(?:0|9){12}\d*$/;function Ue(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Nt.test(s)?Math.round(s*a)/a:s}function ce(s){var a=s.aspectRatio,o=s.height,u=s.width,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",d=me(u),U=me(o);if(d&&U){var T=o*a;(l==="contain"||l==="none")&&T>u||l==="cover"&&T<u?o=u/a:u=o*a}else d?o=u/a:U&&(u=o*a);return{width:u,height:o}}function Ht(s){for(var a=be(new Uint8Array(s)),o=a.length,u=[],l=0;l+3<o;){var d=a[l],U=a[l+1];if(d===255&&U===218)break;if(d===255&&U===216)l+=2;else{var T=a[l+2]*256+a[l+3],S=l+T+2,x=a.slice(l,S);u.push(x),l=S}}return u.reduce(function(F,P){return P[0]===255&&P[1]===225?F.concat(P):F},[])}function Yt(s,a){var o=be(new Uint8Array(s));if(o[2]!==255||o[3]!==224)return s;var u=o[4]*256+o[5],l=[255,216].concat(a,o.slice(4+u));return new Uint8Array(l)}var $t=te.ArrayBuffer,ye=te.FileReader,ne=te.URL||te.webkitURL,zt=/\.\w+$/,qt=te.Compressor,Kt=function(){function s(a,o){Ut(this,s),this.file=a,this.exif=[],this.image=new Image,this.options=pe(pe({},xe),o),this.aborted=!1,this.result=null,this.init()}return Tt(s,[{key:"init",value:function(){var o=this,u=this.file,l=this.options;if(!kt(u)){this.fail(new Error("The first argument must be a File or Blob object."));return}var d=u.type;if(!we(d)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!ne||!ye){this.fail(new Error("The current browser does not support image compression."));return}$t||(l.checkOrientation=!1,l.retainExif=!1);var U=d==="image/jpeg",T=U&&l.checkOrientation,S=U&&l.retainExif;if(ne&&!T&&!S)this.load({url:ne.createObjectURL(u)});else{var x=new ye;this.reader=x,x.onload=function(F){var P=F.target,R=P.result,W={},y=1;T&&(y=Rt(R),y>1&&ge(W,Wt(y))),S&&(o.exif=Ht(R)),T||S?!ne||y>1?W.url=Se(R,d):W.url=ne.createObjectURL(u):W.url=R,o.load(W)},x.onabort=function(){o.fail(new Error("Aborted to read the image with FileReader."))},x.onerror=function(){o.fail(new Error("Failed to read the image with FileReader."))},x.onloadend=function(){o.reader=null},T||S?x.readAsArrayBuffer(u):x.readAsDataURL(u)}}},{key:"load",value:function(o){var u=this,l=this.file,d=this.image;d.onload=function(){u.draw(pe(pe({},o),{},{naturalWidth:d.naturalWidth,naturalHeight:d.naturalHeight}))},d.onabort=function(){u.fail(new Error("Aborted to load the image."))},d.onerror=function(){u.fail(new Error("Failed to load the image."))},te.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(te.navigator.userAgent)&&(d.crossOrigin="anonymous"),d.alt=l.name,d.src=o.url}},{key:"draw",value:function(o){var u=this,l=o.naturalWidth,d=o.naturalHeight,U=o.rotate,T=U===void 0?0:U,S=o.scaleX,x=S===void 0?1:S,F=o.scaleY,P=F===void 0?1:F,R=this.file,W=this.image,y=this.options,j=document.createElement("canvas"),p=j.getContext("2d"),E=Math.abs(T)%180===90,_=(y.resize==="contain"||y.resize==="cover")&&me(y.width)&&me(y.height),I=Math.max(y.maxWidth,0)||1/0,v=Math.max(y.maxHeight,0)||1/0,k=Math.max(y.minWidth,0)||0,c=Math.max(y.minHeight,0)||0,m=l/d,r=y.width,i=y.height;if(E){var t=[v,I];I=t[0],v=t[1];var h=[c,k];k=h[0],c=h[1];var g=[i,r];r=g[0],i=g[1]}_&&(m=r/i);var D=ce({aspectRatio:m,width:I,height:v},"contain");I=D.width,v=D.height;var C=ce({aspectRatio:m,width:k,height:c},"cover");if(k=C.width,c=C.height,_){var O=ce({aspectRatio:m,width:r,height:i},y.resize);r=O.width,i=O.height}else{var L=ce({aspectRatio:m,width:r,height:i}),N=L.width;r=N===void 0?l:N;var X=L.height;i=X===void 0?d:X}r=Math.floor(Ue(Math.min(Math.max(r,k),I))),i=Math.floor(Ue(Math.min(Math.max(i,c),v)));var z=-r/2,H=-i/2,Z=r,le=i,ee=[];if(_){var fe=0,ae=0,re=l,se=d,A=ce({aspectRatio:m,width:l,height:d},{contain:"cover",cover:"contain"}[y.resize]);re=A.width,se=A.height,fe=(l-re)/2,ae=(d-se)/2,ee.push(fe,ae,re,se)}if(ee.push(z,H,Z,le),E){var e=[i,r];r=e[0],i=e[1]}j.width=r,j.height=i,we(y.mimeType)||(y.mimeType=R.type);var n="transparent";R.size>y.convertSize&&y.convertTypes.indexOf(y.mimeType)>=0&&(y.mimeType="image/jpeg");var f=y.mimeType==="image/jpeg";if(f&&(n="#fff"),p.fillStyle=n,p.fillRect(0,0,r,i),y.beforeDraw&&y.beforeDraw.call(this,p,j),!this.aborted&&(p.save(),p.translate(r/2,i/2),p.rotate(T*Math.PI/180),p.scale(x,P),p.drawImage.apply(p,[W].concat(ee)),p.restore(),y.drew&&y.drew.call(this,p,j),!this.aborted)){var w=function(B){if(!u.aborted){var M=function(K){return u.done({naturalWidth:l,naturalHeight:d,result:K})};if(B&&f&&y.retainExif&&u.exif&&u.exif.length>0){var Y=function(K){return M(_e(Se(Yt(K,u.exif),y.mimeType)))};if(B.arrayBuffer)B.arrayBuffer().then(Y).catch(function(){u.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var $=new ye;u.reader=$,$.onload=function(J){var K=J.target;Y(K.result)},$.onabort=function(){u.fail(new Error("Aborted to read the compressed image with FileReader."))},$.onerror=function(){u.fail(new Error("Failed to read the compressed image with FileReader."))},$.onloadend=function(){u.reader=null},$.readAsArrayBuffer(B)}}else M(B)}};j.toBlob?j.toBlob(w,y.mimeType,y.quality):w(_e(j.toDataURL(y.mimeType,y.quality)))}}},{key:"done",value:function(o){var u=o.naturalWidth,l=o.naturalHeight,d=o.result,U=this.file,T=this.image,S=this.options;if(ne&&T.src.indexOf("blob:")===0&&ne.revokeObjectURL(T.src),d)if(S.strict&&!S.retainExif&&d.size>U.size&&S.mimeType===U.type&&!(S.width>u||S.height>l||S.minWidth>u||S.minHeight>l||S.maxWidth<u||S.maxHeight<l))d=U;else{var x=new Date;d.lastModified=x.getTime(),d.lastModifiedDate=x,d.name=U.name,d.name&&d.type!==U.type&&(d.name=d.name.replace(zt,Ot(d.type)))}else d=U;this.result=d,S.success&&S.success.call(this,d)}},{key:"fail",value:function(o){var u=this.options;if(u.error)u.error.call(this,o);else throw o}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=qt,s}},{key:"setDefaults",value:function(o){ge(xe,o)}}]),s}();const Vt={default:{maxWidth:1920},logo:{maxWidth:500,quality:.9},gallery:{maxWidth:2560}},De=s=>s instanceof Array?s:[s];function Xt(s,a){return new Promise((o,u)=>{if(!a)return o(s);new Kt(s,{success:l=>o(l),error:l=>u(l),...a})})}function Gt(s={}){let{acl:a="public-read",url:o,...u}=s;return o||(o="/api/file/sign?acl="+a),St(o,u).then(l=>l.json())}function Jt({file:s,url:a,onProgress:o}){return new Promise((u,l)=>{let d=new URLSearchParams(a),U=new XMLHttpRequest;U.upload.addEventListener("progress",o),U.addEventListener("error",l),U.addEventListener("load",function(){u(this)}),U.open("PUT",a),d.get("x-amz-acl")&&U.setRequestHeader("x-amz-acl",d.get("x-amz-acl")),U.send(s)})}function Qt(s){return new Promise(a=>{let o=new FileReader;o.onload=function(u){a(u.target.result)},o.readAsDataURL(s)})}function Zt(s){return s.type.startsWith("image/")?Qt(s).then(a=>new Promise((o,u)=>{let l=new Image;l.onload=()=>o([l.naturalWidth,l.naturalHeight]),l.onerror=d=>u(d),l.src=a})):Promise.resolve()}async function er(s,a){switch(typeof a){case"function":return a(s);case"string":const o=new FormData;return o.append("file",s),window.fetch(a,{method:"POST",credentials:"include",body:o}).then(u=>u.json()).then(De).then(u=>u.map(({data:l,name:d,type:U})=>new File([new Uint8Array(l.data)],d,{type:U})));default:return s}}async function tr(s,a,o){let{compression:u,transform:l=F=>F,rename:d,convert:U,...T}=o;const S=await er(s,U).then(De),x=await Promise.all(S.map(async F=>{typeof u=="string"&&(u=Vt[u]);let[P,R]=await Promise.all([Gt(T||{}),u?Xt(F,u):Promise.resolve(F)]),W;try{W=await Zt(R)}catch{}return await Jt({file:R,url:P.uploadUrl,onProgress(y){a(Math.floor(y.loaded/y.total*100))}}),l({name:d||R.name,size:R.size,url:P.url,type:R.type,dimensions:W})}));return x.length===1?x[0]:x}function ir(s,a,o={}){let{group:u=1}=o,l=s.match(a);if(l)return l[u]}function rr(s){return new Promise((a,o)=>{setTimeout(a,s)})}function ar(s){return s==="false"?!1:s==="true"?!0:s}async function sr(s,a={}){let{interval:o=200,limit:u=50}=a,l=0,d;for(;l<u&&(l++,!(d=s()));)await rr(o);if(l>=u)throw new Error("Could not resolve");return d}function ur(s,a={type:"text/javascript"}){if(!document||document.querySelector(`script[src="${s}"]`))return;let{type:o}=a,u=document.createElement("script");u.type=o,u.src=s,document.body.appendChild(u)}function fr(s,a=1){const o={en:tt,nb:vt},u=document.documentElement.getAttribute("lang")||"nb";let l=o[u]?.[s]||s;return l.includes("|")&&(l=l.split("|")[a-1]),l}function cr(s){return{validator(a,o){return s instanceof Array?a instanceof Array?a.every(u=>s.includes(u)):s.includes(a):s(a,o)}}}function nr(s){return Object.prototype.toString.call(s)==="[object Object]"}function Oe(s,a,o={}){if(!a||!nr(a))return s;let{ignoreMissing:u=!1}=o,l={},d=(T,S)=>T.length===S.length&&Ee(T.slice())===Ee(S.slice()),U=function(T,S,x){let F=Object.prototype.toString.call(T),P=Object.prototype.toString.call(S);if(F!==P){l[x]=S;return}if(F==="[object Object]"){let R=Oe(T,S,o);Object.keys(R).length&&(l[x]=R);return}if(F==="[object Array]"){d(T,S)||(l[x]=S);return}if(F==="[object Function]"){T.toString()!==S.toString()&&(l[x]=S);return}T!==S&&(l[x]=S)};for(let T in s)Object.hasOwn(s,T)&&U(s[T],a[T],T);if(!u)for(let T in a)Object.hasOwn(a,T)&&!(T in s)&&(l[T]=a[T]);return l}function lr(...s){return!!Object.keys(Oe(...s)).length}const hr=function(){return JSON.parse(JSON.stringify.apply(this,arguments))};function dr(s,a,o){return tr(s,a,o)}function pr(s,a=document.documentElement.getAttribute("lang")||"nb"){return!s&&s!==0?"-":s.toLocaleString(a,{style:"currency",currency:"NOK",minimumFractionDigits:0})}const or=s=>{if(typeof s!="string")return s;try{return JSON.parse(s)}catch{return{}}},gr=(s={},a={})=>o=>or(s)[o]||a[o]||o,Te=(s,a={})=>o=>{switch(s){case"currency":const{locale:u,...l}=a;return new Intl.NumberFormat(u,{style:"currency",maximumFractionDigits:0,...l}).format(o);case"number":return new Intl.NumberFormat(a.locale).format(o);case"year":case"years":return[o,new Intl.RelativeTimeFormat(a.locale).formatToParts(o,"year").at(-1).value].join(" ");case"percent":const{maximumFractionDigits:d=0}=a;return[Number(o).toFixed(d),"%"].join("");default:return o}},mr=(s={})=>{const{locale:a,currency:o}=s,u=/(.{1})\d{3}(\D)\d$/,l=Te("number",{locale:a})(1000.1);let[d,U,T]=u.exec(l);const S=Te("currency",{locale:a,currency:o})(1000.1),x=S.replace(/[\d\s\,\.]/g,""),F={mask:Number,thousandsSeparator:U};return S.match(/^\d/)?{suffix:x,mask:F}:{symbol:x,mask:F}};function yr(s,a=300){let o;return(...u)=>{clearTimeout(o),o=setTimeout(()=>{s.apply(this,u)},a)}}export{hr as C,yr as D,ir as E,ur as L,cr as P,fr as T,sr as W,mr as a,gr as b,pr as c,Oe as d,Te as f,Et as g,lr as h,ar as t,dr as u};