@dcrackel/hematournamentui 1.0.37 → 1.0.38
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.
|
@@ -27541,6 +27541,7 @@ export {
|
|
|
27541
27541
|
di as BaseButton,
|
|
27542
27542
|
jo as BaseIcon,
|
|
27543
27543
|
Wo as BaseInput,
|
|
27544
|
+
KO as BaseModal,
|
|
27544
27545
|
Km as BaseRadioGroup,
|
|
27545
27546
|
Xm as BaseTag,
|
|
27546
27547
|
sr as BaseText,
|
|
@@ -27551,7 +27552,6 @@ export {
|
|
|
27551
27552
|
Ig as FilterUpcomingPast,
|
|
27552
27553
|
QO as GridContainer,
|
|
27553
27554
|
D1 as ImageCropper,
|
|
27554
|
-
KO as Modal,
|
|
27555
27555
|
fO as TextBoxEditor,
|
|
27556
27556
|
ox as TournamentCard,
|
|
27557
27557
|
dg as TournamentCardDetail,
|
|
@@ -180,4 +180,4 @@ img.ProseMirror-separator {
|
|
|
180
180
|
|
|
181
181
|
`);return!o||!a?!1:n.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:o}=t;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();return s===void 0||r.nodeAt(s)?!1:n.commands.exitCode()}}},addInputRules(){return[Wl({find:dD,type:this.type,getAttributes:n=>({language:n[1]})}),Wl({find:uD,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new Mt({key:new vn("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!t||!o)return!1;const{tr:a}=n.state;return a.replaceSelectionWith(this.type.create({language:o})),a.setSelection(ge.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.insertText(t.replace(/\r\n?/g,`
|
|
182
182
|
`)),a.setMeta("paste",!0),n.dispatch(a),!0}}})]}}),pD=_t.create({name:"doc",topNode:!0,content:"block+"});function hD(n={}){return new Mt({view(e){return new mD(e,n)}})}class mD{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=a=>{this[i](a)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.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),t=!e.parent.inlineContent,r;if(t){let s=e.nodeBefore,c=e.nodeAfter;if(s||c){let d=this.editorView.nodeDOM(this.cursorPos-(s?s.nodeSize:0));if(d){let u=d.getBoundingClientRect(),f=s?u.bottom:u.top;s&&c&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!r){let s=this.editorView.coordsAtPos(this.cursorPos);r={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.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",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let o,a;if(!i||i==document.body&&getComputedStyle(i).position=="static")o=-pageXOffset,a=-pageYOffset;else{let s=i.getBoundingClientRect();o=s.left-i.scrollLeft,a=s.top-i.scrollTop}this.element.style.left=r.left-o+"px",this.element.style.top=r.top-a+"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 t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!o){let a=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=of(this.editorView.state.doc,a,this.editorView.dragging.slice);s!=null&&(a=s)}this.setCursor(a),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 gD=ht.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[hD(this.options)]}});class He extends ye{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return He.valid(r)?new He(r):ye.near(r)}content(){return ie.empty}eq(e){return e instanceof He&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new He(e.resolve(t.pos))}getBookmark(){return new dc(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!yD(e)||!vD(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&He.valid(e))return e;let i=e.pos,o=null;for(let a=e.depth;;a--){let s=e.node(a);if(t>0?e.indexAfter(a)<s.childCount:e.index(a)>0){o=s.child(t>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;i+=t;let c=e.doc.resolve(i);if(He.valid(c))return c}for(;;){let a=t>0?o.firstChild:o.lastChild;if(!a){if(o.isAtom&&!o.isText&&!ue.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*t),r=!1;continue e}break}o=a,i+=t;let s=e.doc.resolve(i);if(He.valid(s))return s}return null}}}He.prototype.visible=!1,He.findFrom=He.findGapCursorFrom,ye.jsonID("gapcursor",He);class dc{constructor(e){this.pos=e}map(e){return new dc(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return He.valid(t)?new He(t):ye.near(t)}}function yD(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t-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 vD(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(t);;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 bD(){return new Mt({props:{decorations:CD,createSelectionBetween(n,e,t){return e.pos==t.pos&&He.valid(t)?new He(t):null},handleClick:kD,handleKeyDown:wD,handleDOMEvents:{beforeinput:xD}}})}const wD=Ep({ArrowLeft:Da("horiz",-1),ArrowRight:Da("horiz",1),ArrowUp:Da("vert",-1),ArrowDown:Da("vert",1)});function Da(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){let a=r.selection,s=e>0?a.$to:a.$from,c=a.empty;if(a instanceof ge){if(!o.endOfTextblock(t)||s.depth==0)return!1;c=!1,s=r.doc.resolve(e>0?s.after():s.before())}let d=He.findGapCursorFrom(s,e,c);return d?(i&&i(r.tr.setSelection(new He(d))),!0):!1}}function kD(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!He.valid(r))return!1;let i=n.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&ue.isSelectable(n.state.doc.nodeAt(i.inside))?!1:(n.dispatch(n.state.tr.setSelection(new He(r))),!0)}function xD(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof He))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let i=Q.empty;for(let a=r.length-1;a>=0;a--)i=Q.from(r[a].createAndFill(null,i));let o=n.state.tr.replace(t.pos,t.pos,new ie(i,0,0));return o.setSelection(ge.near(o.doc.resolve(t.pos+1))),n.dispatch(o),!1}function CD(n){if(!(n.selection instanceof He))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ze.create(n.doc,[Lt.widget(n.selection.head,e,{key:"gapcursor"})])}const MD=ht.create({name:"gapCursor",addProseMirrorPlugins(){return[bD()]},extendNodeSchema(n){var e;const t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=ve(ce(n,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}}),SD=_t.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",Ge(this.options.HTMLAttributes,n)]},renderText(){return`
|
|
183
|
-
`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:o}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,c=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:u})=>{if(u&&c&&a){const f=c.filter(p=>s.includes(p.type.name));d.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),TD=_t.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(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,Ge(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>Wl({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Aa=200,it=function(){};it.prototype.append=function(e){return e.length?(e=it.from(e),!this.length&&e||e.length<Aa&&this.leafAppend(e)||this.length<Aa&&e.leafPrepend(this)||this.appendInner(e)):this},it.prototype.prepend=function(e){return e.length?it.from(e).append(this):this},it.prototype.appendInner=function(e){return new DD(this,e)},it.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?it.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},it.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},it.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},it.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,a){return i.push(e(o,a))},t,r),i},it.from=function(e){return e instanceof it?e:e&&e.length?new Yh(e):it.empty};var Yh=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,a,s){for(var c=o;c<a;c++)if(i(this.values[c],s+c)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,a,s){for(var c=o-1;c>=a;c--)if(i(this.values[c],s+c)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Aa)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Aa)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(it);it.empty=new Yh([]);var DD=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,a){var s=this.left.length;if(i<s&&this.left.forEachInner(r,i,Math.min(o,s),a)===!1||o>s&&this.right.forEachInner(r,Math.max(i-s,0),Math.min(this.length,o)-s,a+s)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,a){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(r,i-s,Math.max(o,s)-s,a+s)===!1||o<s&&this.left.forEachInvertedInner(r,Math.min(i,s),o,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(it);const AD=500;class rn{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){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;t&&(i=this.remapping(r,this.items.length),o=i.maps.length);let a=e.tr,s,c,d=[],u=[];return this.items.forEach((f,p)=>{if(!f.step){i||(i=this.remapping(r,p+1),o=i.maps.length),o--,u.push(f);return}if(i){u.push(new Sn(f.map));let h=f.step.map(i.slice(o)),m;h&&a.maybeStep(h).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],d.push(new Sn(m,void 0,void 0,d.length+u.length))),o--,m&&i.appendMap(m,o)}else a.maybeStep(f.step);if(f.selection)return s=i?f.selection.map(i.slice(o)):f.selection,c=new rn(this.items.slice(0,r).append(u.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:a,selection:s}}addTransform(e,t,r,i){let o=[],a=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),p=new Sn(e.mapping.maps[u],f,t),h;(h=c&&c.merge(p))&&(p=h,u?o.pop():s=s.slice(0,s.length-1)),o.push(p),t&&(a++,t=void 0),i||(c=p)}let d=a-r.depth;return d>ED&&(s=OD(s,d),a-=d),new rn(s.append(o),a)}remapping(e,t){let r=new Zr;return this.items.forEach((i,o)=>{let a=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},e,t),r}addMaps(e){return this.eventCount==0?this:new rn(this.items.append(e.map(t=>new Sn(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),o=e.mapping,a=e.steps.length,s=this.eventCount;this.items.forEach(p=>{p.selection&&s--},i);let c=t;this.items.forEach(p=>{let h=o.getMirror(--c);if(h==null)return;a=Math.min(a,h);let m=o.maps[h];if(p.step){let v=e.steps[h].invert(e.docs[h]),w=p.selection&&p.selection.map(o.slice(c+1,h));w&&s++,r.push(new Sn(m,v,w))}else r.push(new Sn(m))},i);let d=[];for(let p=t;p<a;p++)d.push(new Sn(o.maps[p]));let u=this.items.slice(0,i).append(d).append(r),f=new rn(u,s);return f.emptyItemCount()>AD&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach((a,s)=>{if(s>=e)i.push(a),a.selection&&o++;else if(a.step){let c=a.step.map(t.slice(r)),d=c&&c.getMap();if(r--,d&&t.appendMap(d,r),c){let u=a.selection&&a.selection.map(t.slice(r));u&&o++;let f=new Sn(d.invert(),c,u),p,h=i.length-1;(p=i.length&&i[h].merge(f))?i[h]=p:i.push(f)}}else a.map&&r--},this.items.length,0),new rn(it.from(i.reverse()),o)}}rn.empty=new rn(it.empty,0);function OD(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}class Sn{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Sn(t.getMap().invert(),t,this.selection)}}}class sr{constructor(e,t,r,i,o){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const ED=20;function ND(n,e,t,r){let i=t.getMeta(lr),o;if(i)return i.historyState;t.getMeta(BD)&&(n=new sr(n.done,n.undone,null,0,-1));let a=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(a&&a.getMeta(lr))return a.getMeta(lr).redo?new sr(n.done.addTransform(t,void 0,r,Oa(e)),n.undone,jh(t.mapping.maps[t.steps.length-1]),n.prevTime,n.prevComposition):new sr(n.done,n.undone.addTransform(t,void 0,r,Oa(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=t.getMeta("composition"),c=n.prevTime==0||!a&&n.prevComposition!=s&&(n.prevTime<(t.time||0)-r.newGroupDelay||!_D(t,n.prevRanges)),d=a?uc(n.prevRanges,t.mapping):jh(t.mapping.maps[t.steps.length-1]);return new sr(n.done.addTransform(t,c?e.selection.getBookmark():void 0,r,Oa(e)),rn.empty,d,t.time,s??n.prevComposition)}else return(o=t.getMeta("rebased"))?new sr(n.done.rebased(t,o),n.undone.rebased(t,o),uc(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new sr(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),uc(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function _D(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(t=!0)}),t}function jh(n){let e=[];return n.forEach((t,r,i,o)=>e.push(i,o)),e}function uc(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let i=e.map(n[r],1),o=e.map(n[r+1],-1);i<=o&&t.push(i,o)}return t}function Uh(n,e,t,r){let i=Oa(e),o=lr.get(e).spec.config,a=(r?n.undone:n.done).popEvent(e,i);if(!a)return;let s=a.selection.resolve(a.transform.doc),c=(r?n.done:n.undone).addTransform(a.transform,e.selection.getBookmark(),o,i),d=new sr(r?c:a.remaining,r?a.remaining:c,null,0,-1);t(a.transform.setSelection(s).setMeta(lr,{redo:r,historyState:d}).scrollIntoView())}let fc=!1,Wh=null;function Oa(n){let e=n.plugins;if(Wh!=e){fc=!1,Wh=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){fc=!0;break}}return fc}const lr=new vn("history"),BD=new vn("closeHistory");function PD(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new Mt({key:lr,state:{init(){return new sr(rn.empty,rn.empty,null,0,-1)},apply(e,t,r){return ND(t,r,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,i=r=="historyUndo"?qh:r=="historyRedo"?Kh:null;return i?(t.preventDefault(),i(e.state,e.dispatch)):!1}}}})}const qh=(n,e)=>{let t=lr.getState(n);return!t||t.done.eventCount==0?!1:(e&&Uh(t,n,e,!1),!0)},Kh=(n,e)=>{let t=lr.getState(n);return!t||t.undone.eventCount==0?!1:(e&&Uh(t,n,e,!0),!0)},ID=ht.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>qh(n,e),redo:()=>({state:n,dispatch:e})=>Kh(n,e)}},addProseMirrorPlugins(){return[PD(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),RD=_t.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",Ge(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n,state:e})=>{const{$to:t}=e.selection,r=n();return t.parentOffset===0?r.insertContentAt(Math.max(t.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:i,dispatch:o})=>{var a;if(o){const{$to:s}=i.selection,c=s.end();if(s.nodeAfter)s.nodeAfter.isTextblock?i.setSelection(ge.create(i.doc,s.pos+1)):s.nodeAfter.isBlock?i.setSelection(ue.create(i.doc,s.pos)):i.setSelection(ge.create(i.doc,s.pos));else{const d=(a=s.parent.type.contentMatch.defaultType)===null||a===void 0?void 0:a.create();d&&(i.insert(c,d),i.setSelection(ge.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[pS({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),VD=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,$D=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,LD=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,FD=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,zD=nn.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[_r({find:VD,type:this.type}),_r({find:LD,type:this.type})]},addPasteRules(){return[Br({find:$D,type:this.type}),Br({find:FD,type:this.type})]}}),HD=_t.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ge(this.options.HTMLAttributes,n),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)}}}),YD=_t.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ge(this.options.HTMLAttributes,n),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)}}}),Gh=nn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=ba(n,this.type);return Object.entries(t).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),Qh=/^(\d+)\.\s$/,jD=_t.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:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",Ge(this.options.HTMLAttributes,t),0]:["ol",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(YD.name,this.editor.getAttributes(Gh.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=co({find:Qh,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=co({find:Qh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Gh.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),UD=_t.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),WD=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,qD=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,KD=nn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){const n={};return zl()?n["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():n["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),n},addInputRules(){return[_r({find:WD,type:this.type})]},addPasteRules(){return[Br({find:qD,type:this.type})]}}),GD=_t.create({name:"text",group:"inline"}),QD=ht.create({name:"starterKit",addExtensions(){var n,e,t,r,i,o,a,s,c,d,u,f,p,h,m,v,w,x;const C=[];return this.options.blockquote!==!1&&C.push(ZT.configure((n=this.options)===null||n===void 0?void 0:n.blockquote)),this.options.bold!==!1&&C.push(iD.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.bulletList!==!1&&C.push(aD.configure((t=this.options)===null||t===void 0?void 0:t.bulletList)),this.options.code!==!1&&C.push(cD.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&C.push(fD.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&C.push(pD.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&C.push(gD.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&C.push(MD.configure((s=this.options)===null||s===void 0?void 0:s.gapcursor)),this.options.hardBreak!==!1&&C.push(SD.configure((c=this.options)===null||c===void 0?void 0:c.hardBreak)),this.options.heading!==!1&&C.push(TD.configure((d=this.options)===null||d===void 0?void 0:d.heading)),this.options.history!==!1&&C.push(ID.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&C.push(RD.configure((f=this.options)===null||f===void 0?void 0:f.horizontalRule)),this.options.italic!==!1&&C.push(zD.configure((p=this.options)===null||p===void 0?void 0:p.italic)),this.options.listItem!==!1&&C.push(HD.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&C.push(jD.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&C.push(UD.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&C.push(KD.configure((w=this.options)===null||w===void 0?void 0:w.strike)),this.options.text!==!1&&C.push(GD.configure((x=this.options)===null||x===void 0?void 0:x.text)),C}}),JD=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,XD=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,ZD=nn.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:n}){return["mark",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[_r({find:JD,type:this.type})]},addPasteRules(){return[Br({find:XD,type:this.type})]}}),eA=ht.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),tA={components:{EditorContent:QT,BaseButton:Rn},props:{invalid:{type:Boolean,default:!1}},data(){return{}},setup(n,{emit:e}){const t=l.ref("");return{editor:JT({content:"",extensions:[QD,ZD,eA.configure({types:["heading","paragraph"]})],editorProps:{attributes:{class:"focus:outline-none"}},onUpdate({editor:i}){t.value=i.getHTML(),e("update:editorContent",t.value)}}),editorContent:t}},methods:{}},nA={"data-testid":"editor-buttons",class:"w-full flex flex-row pl-2"},rA={class:"w-1/3 border-r border-dropdownSelect flex flex-row justify-between pr-2"},iA={class:"w-1/3 border-r border-dropdownSelect flex flex-row justify-around"},oA={class:"w-1/3 flex flex-row justify-between pl-2"},aA={class:"my-4 my-2 p-4 rounded-xl h-40 bg-tertiary overflow-auto"};function sA(n,e,t,r,i,o){const a=l.resolveComponent("BaseButton"),s=l.resolveComponent("editor-content");return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["border rounded-lg text-secondary text-sm p-4 w-full",t.invalid?"border-alarm":"border-dropdownSelect"])},[l.createElementVNode("div",nA,[l.createElementVNode("div",rA,[l.createVNode(a,{iconName:"fa-h1",label:"",type:"editor",selected:r.editor&&r.editor.isActive("heading",{level:1}),onClick:e[0]||(e[0]=c=>r.editor.chain().toggleHeading({level:1}).run())},null,8,["selected"]),l.createVNode(a,{iconName:"fa-h2",label:"",type:"editor",selected:r.editor&&r.editor.isActive("heading",{level:2}),onClick:e[1]||(e[1]=c=>r.editor.chain().toggleHeading({level:2}).run())},null,8,["selected"]),l.createVNode(a,{iconName:"fa-h3",label:"",type:"editor",selected:r.editor&&r.editor.isActive("heading",{level:3}),onClick:e[2]||(e[2]=c=>r.editor.chain().toggleHeading({level:3}).run())},null,8,["selected"]),l.createVNode(a,{iconName:"fa-paragraph",label:"",type:"editor",selected:r.editor&&r.editor.isActive("paragraph"),onClick:e[3]||(e[3]=c=>r.editor.chain().setParagraph().run())},null,8,["selected"])]),l.createElementVNode("div",iA,[l.createVNode(a,{selected:r.editor&&r.editor.isActive("bold"),iconName:"fa-bold",label:"",type:"editor",onClick:e[4]||(e[4]=c=>r.editor&&r.editor.chain().toggleBold().run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive("italic"),iconName:"fa-italic",label:"",type:"editor",onClick:e[5]||(e[5]=c=>r.editor&&r.editor.chain().toggleItalic().run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive("strike"),iconName:"fa-strikethrough",label:"",type:"editor",onClick:e[6]||(e[6]=c=>r.editor&&r.editor.chain().toggleStrike().run())},null,8,["selected"])]),l.createElementVNode("div",oA,[l.createVNode(a,{selected:r.editor&&r.editor.isActive({textAlign:"left"}),iconName:"fa-align-left",label:"",type:"editor",onClick:e[7]||(e[7]=c=>r.editor.chain().setTextAlign("left").run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive({textAlign:"center"}),iconName:"fa-align-center",label:"",type:"editor",onClick:e[8]||(e[8]=c=>r.editor&&r.editor.chain().setTextAlign("center").run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive({textAlign:"right"}),iconName:"fa-align-right",label:"",type:"editor",onClick:e[9]||(e[9]=c=>r.editor&&r.editor.chain().setTextAlign("right").run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive({textAlign:"justify"}),iconName:"fa-align-justify",label:"",type:"editor",onClick:e[10]||(e[10]=c=>r.editor&&r.editor.chain().setTextAlign("justify").run())},null,8,["selected"])])]),l.createElementVNode("p",aA,[l.createVNode(s,{editor:r.editor,class:"focus:shadow-none focus:outline-none"},null,8,["editor"])])],2)}const Jh=Le(tA,[["render",sA]]),lA={name:"AddTournamentPageOne",components:{BaseText:sn,BaseInput:Mi,ImageCropper:Tu,AddressAutocomplete:Tc,DatePicker:Ts,TextBoxEditor:Jh,BaseRadioGroup:vc,BaseButton:Rn},props:{},data(){return{tournament:{name:"",imageLink:"",address:"",coordinates:"",startDate:"",totalDays:1,description:"",visibility:"",externalLinks:Array},validation:{name:!1,imageLink:!1,address:!1,coordinates:!1,startDate:!1,totalDays:!1,description:!1,visibility:!1},visibilityItems:[{label:"Open",value:"open",description:"Viewable To Everyone"},{label:"Club",value:"club",description:"Viewable Only to Members of Your Club"},{label:"Private",value:"private",description:"Only Viewable by you"}]}},methods:{handleSubmit(){this.setAllValidationStates(!1),this.tournament.name===""&&(this.validation.name=!0),this.tournament.coordinates===""&&(this.validation.address=!0),this.tournament.startDate===""&&(this.validation.startDate=!0),this.tournament.totalDays===""&&(this.validation.totalDays=!0),this.tournament.description===""&&(this.validation.description=!0),this.tournament.visibility===""&&(this.validation.visibility=!0),this.areAnyFieldsAreLeftInvalid||(this.$emit("update:tournament",this.tournament),this.$emit("update:step",2))},setAllValidationStates(n){Object.keys(this.validation).forEach(e=>{this.validation[e]=n})},handleAddressUpdate(n){this.tournament.address=n.address,this.tournament.coordinates=n.coordinates},handleDateUpdate(n){this.tournament.startDate=n,console.log("New Date"),console.log(n),console.log(Ts.props.invalid)},handleEditorUpdate(n){this.tournament.description=n}},computed:{areAnyFieldsAreLeftInvalid(){return Object.values(this.validation).every(n=>n)}}},cA={class:"border border-dropdownSelect rounded-lg p-9 bg-neutral"},dA={class:"w-full flex flex-row justify-center"},uA={class:"w-full flex flex-row justify-center my-4"},fA={class:"w-full flex flex-row justify-center my-4"},pA={class:"w-full flex flex-row justify-center"},hA={class:"w-96"},mA={class:"flex flex-col mb-3"},gA={class:"flex flex-col mb-3"},yA={class:"flex flex-row mb-3"},vA={class:"w-3/4 mr-1"},bA={class:"w-1/4 ml-1"},wA={class:"flex flex-col mb-3"},kA={class:"flex flex-col pb-4"};function xA(n,e,t,r,i,o){const a=l.resolveComponent("BaseText"),s=l.resolveComponent("ImageCropper"),c=l.resolveComponent("BaseInput"),d=l.resolveComponent("AddressAutocomplete"),u=l.resolveComponent("DatePicker"),f=l.resolveComponent("TextBoxEditor"),p=l.resolveComponent("BaseRadioGroup"),h=l.resolveComponent("BaseButton");return l.openBlock(),l.createElementBlock("div",cA,[l.createElementVNode("div",dA,[l.createVNode(a,{color:"quaternary",size:"sm",text:"Step 1 out of 2",weight:"normal","data-testid":"text-step"})]),l.createElementVNode("div",uA,[l.createVNode(a,{color:"primaryHighlight",size:"2xl",text:"Add Tournament",weight:"normal","data-testid":"text-add-tournament"})]),l.createElementVNode("div",fA,[l.createVNode(s,{personID:1})]),l.createElementVNode("div",pA,[l.createElementVNode("section",hA,[l.createElementVNode("div",mA,[l.createVNode(a,{invalid:i.validation.name,size:"sm",text:"Tournament Name",weight:"normal",class:"mb-1",color:"primary","data-testid":"text-tournament-name"},null,8,["invalid"]),l.createVNode(c,{addBorder:!0,invalid:i.validation.name,value:i.tournament.name,placeholder:"Enter Tournament Name",type:"formInput","onUpdate:value":e[0]||(e[0]=m=>i.tournament.name=m)},null,8,["invalid","value"])]),l.createElementVNode("div",gA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.address,size:"sm",text:"Address",weight:"normal",class:"mb-1","data-testid":"text-address"},null,8,["invalid"]),l.createVNode(d,{address:i.tournament.address,invalid:i.validation.address,"onUpdate:address":o.handleAddressUpdate},null,8,["address","invalid","onUpdate:address"])]),l.createElementVNode("div",yA,[l.createElementVNode("div",vA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.startDate,size:"sm",text:"Start Date",weight:"normal",class:"mb-1","data-testid":"text-start-date"},null,8,["invalid"]),l.createVNode(u,{invalid:i.validation.startDate,setDate:i.tournament.startDate,"onUpdate:selectedDate":o.handleDateUpdate},null,8,["invalid","setDate","onUpdate:selectedDate"])]),l.createElementVNode("div",bA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.totalDays,size:"sm",text:"Total Days",weight:"normal",class:"mb-1","data-testid":"text-total-days"},null,8,["invalid"]),l.createVNode(c,{addBorder:!0,invalid:i.validation.totalDays,placeholder:"1",value:`${i.tournament.totalDays}`},null,8,["invalid","value"])])]),l.createElementVNode("div",wA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.description,size:"sm",text:"Description",weight:"normal",class:"mb-1","data-testid":"text-description"},null,8,["invalid"]),l.createVNode(f,{invalid:i.validation.description,"onUpdate:editorContent":o.handleEditorUpdate},null,8,["invalid","onUpdate:editorContent"])]),l.createElementVNode("div",kA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.visibility,size:"sm",text:"Tournament Visibility",weight:"normal",class:"mb-2","data-testid":"text-visibility"},null,8,["invalid"]),l.createVNode(p,{invalid:i.validation.visibility,items:i.visibilityItems,"onUpdate:value":e[1]||(e[1]=m=>i.tournament.visibility=m)},null,8,["invalid","items"])]),l.createElementVNode("div",null,[l.createVNode(h,{class:"w-full",color:"neutral",label:"Continue",size:"sm",type:"secondary",onClick:e[2]||(e[2]=m=>o.handleSubmit())})])])])])}const CA=Le(lA,[["render",xA]]),MA={name:"AddTournamentPageTwo",components:{BaseIcon:Ci,BaseText:sn,BaseButton:Rn,BaseInput:Mi},props:{tournament:Object},data(){return{ferrotasToHost:!1,linkInputVisible:!1,localTournament:JSON.parse(JSON.stringify(this.tournament))}},created(){Array.isArray(this.localTournament.externalLinks)||(this.localTournament.externalLinks=[]),this.localTournament.externalLinks.length===0&&this.localTournament.externalLinks.push({url:"",valid:!0})},methods:{updateLink(n,e){const t=e.target.value;this.localTournament.externalLinks[n].url=t,this.localTournament.externalLinks[n].valid=this.isValidUrl(t)},handleHosting(){this.ferrotasToHost=!this.ferrotasToHost},toggleLinkInput(){this.linkInputVisible=!this.linkInputVisible},addExternalLink(){this.localTournament.externalLinks.push({url:"",valid:!0})},removeLink(n){this.localTournament.externalLinks=this.localTournament.externalLinks.filter(e=>e.url!==n)},handleSubmit(){console.log("submitting ferrotas hosting"),this.areAllLinksValid()&&(console.log(this.localTournament),this.$emit("submit",this.localTournament))},isValidUrl(n){return/^(https?:\/\/)?([\da-z.-]+)\.([\da-z.]+)\.([\/\w\W]+)\/?$/.test(n)},areAllLinksValid(){return this.localTournament.externalLinks.forEach(n=>n.valid=this.isValidUrl(n.url)),this.localTournament.externalLinks.every(n=>n.valid)}}},SA={class:"border border-dropdownSelect rounded-lg p-9 bg-neutral"},TA={class:"w-full flex flex-row justify-center"},DA={class:"w-full flex flex-row justify-center"},AA={class:"w-96"},OA={class:"w-full flex flex-row justify-center text-center my-4"},EA={class:"w-full flex flex-col mb-3"},NA=l.createElementVNode("br",null,null,-1),_A=l.createElementVNode("br",null,null,-1),BA={class:"flex flex-row justify-center"},PA={key:0,class:"flex flex-col mb-3"};function IA(n,e,t,r,i,o){const a=l.resolveComponent("BaseText"),s=l.resolveComponent("BaseButton"),c=l.resolveComponent("BaseInput"),d=l.resolveComponent("BaseIcon");return l.openBlock(),l.createElementBlock("div",SA,[l.createElementVNode("div",TA,[l.createVNode(a,{color:"quaternary",size:"sm",text:"Step 2 out of 4",weight:"normal","data-testid":"text-step"})]),l.createElementVNode("div",DA,[l.createElementVNode("section",AA,[l.createElementVNode("div",OA,[l.createVNode(a,{color:"primaryHighlight",size:"2xl",text:"Do you want Ferrotas to host your tournament?",weight:"normal","data-testid":"text-ferrotas-to-host"})]),l.createElementVNode("div",EA,[l.createVNode(a,{color:"quaternary",size:"sm",text:"If you select 'No', your tournament will be featured on our main calendar. This will include a direct link to your tournament's webpage, making it easy for participants to find all the relevant information on your own site.",weight:"normal","data-testid":"text-select-no"},null,8,["text"]),NA,l.createVNode(a,{color:"quaternary",size:"sm",text:"By selecting 'Yes', you'll gain access to our comprehensive Ferrotas platform. This allows you to manage and conduct your tournament directly through our system, offering a seamless and integrated experience.",weight:"normal","data-testid":"text-select-yes"},null,8,["text"]),_A,l.createVNode(a,{color:"quaternary",size:"sm",text:"Need Assistance? Our support team is always ready to help. Contact us for any queries or guidance you need.",weight:"normal","data-testid":"text-need-help"},null,8,["text"])]),l.createElementVNode("div",BA,[l.createVNode(s,{class:"w-1/2 mr-1",color:"neutral",label:"Yes",selected:"selected",size:"sm",type:"square",onClick:e[0]||(e[0]=u=>o.handleHosting())}),l.createVNode(s,{class:"w-1/2 ml-1",color:"neutral",label:"No",size:"sm",type:"square",onClick:e[1]||(e[1]=u=>o.toggleLinkInput())})]),i.linkInputVisible?(l.openBlock(),l.createElementBlock("section",PA,[l.createVNode(a,{color:"quaternary",size:"sm",text:"Add links to external sites such as Facebook events",weight:"normal",class:"mb-1","data-testid":"text-need-help"}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.localTournament.externalLinks,(u,f)=>(l.openBlock(),l.createElementBlock("div",{key:f,class:"flex flex-row w-full"},[l.createVNode(c,{addBorder:!0,invalid:!u.valid,value:u.url,class:"pb-2 w-full","icon-name":"fa-dash",placeholder:"https://link1.com/yourevent",onInput:p=>o.updateLink(f,p)},null,8,["invalid","value","onInput"]),l.createVNode(d,{class:"mt-1.5 -ml-7 hover:text-primaryHighlight",color:"primary","data-testid":"base-icon","icon-name":"fa-circle-xmark",iconStyle:"fa-solid",size:"xl",onClick:p=>o.removeLink(u.url)},null,8,["onClick"])]))),128)),l.createVNode(s,{class:"w-full mt-3",color:"neutral",label:"Add New Link",size:"sm",type:"primary",onClick:e[2]||(e[2]=u=>o.addExternalLink())})])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[l.createVNode(s,{color:"neutral",label:"Continue",size:"sm",type:"secondary",onClick:e[3]||(e[3]=u=>o.handleSubmit())})])])])])}const RA=Le(MA,[["render",IA]]),VA={name:"AdminLeftMenu",components:{BaseButton:Rn},props:{buttons:{type:Array,default:()=>[]}},methods:{handleButtonClick(n){this.$emit("button-click",n)}}},$A={class:"bg-secondary w-64 h-screen flex flex-col justify-between"},LA=l.createElementVNode("section",{class:"h-28 border-b border-neutral"},[l.createElementVNode("div",{class:"flex flex-col justify-center h-28"},[l.createElementVNode("div",{class:"ml-8"},[l.createElementVNode("img",{class:"w-32",src:"https://ferrotas.com/assets/ferrotas-white-small-720502db.png",alt:"logo"})])])],-1),FA={class:"flex flex-col p-2 h-full"},zA={class:"flex flex-col justify-end p-2 flex-grow"},HA={class:"border-t border-neutral pt-2"};function YA(n,e,t,r,i,o){const a=l.resolveComponent("BaseButton");return l.openBlock(),l.createElementBlock("div",$A,[LA,l.createElementVNode("section",FA,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.buttons,s=>(l.openBlock(),l.createBlock(a,{label:s.label,iconClass:"fa-solid fa-trophy text-white",type:"admin",hover:"admin",onClick:c=>o.handleButtonClick(s)},null,8,["label","onClick"]))),256))]),l.createElementVNode("section",zA,[l.createElementVNode("div",HA,[l.createVNode(a,{iconClass:"fa-solid fa-circle-user text-textSecondary",label:"Account",type:"adminSecondary",onClick:e[0]||(e[0]=s=>o.handleButtonClick(n.button))}),l.createVNode(a,{iconClass:"fa-solid fa-right-to-bracket fa-rotate-180 text-textSecondary",label:"Log Out",type:"adminSecondary",onClick:e[1]||(e[1]=s=>o.handleButtonClick(n.button))})])])])}const jA=Le(VA,[["render",YA]]);_e.AddTournamentPageOne=CA,_e.AddTournamentPageTwo=RA,_e.AddressAutocomplete=Tc,_e.AdminLeftMenu=jA,_e.BaseButton=Rn,_e.BaseIcon=Ci,_e.BaseInput=Mi,_e.BaseRadioGroup=vc,_e.BaseTag=bc,_e.BaseText=sn,_e.Breadcrumb=ym,_e.DatePicker=Ts,_e.DropDownMenu=_a,_e.FilterAndSortBar=Cc,_e.FilterUpcomingPast=Mc,_e.GridContainer=bw,_e.ImageCropper=Tu,_e.Modal=Jm,_e.TextBoxEditor=Jh,_e.TournamentCard=Hd,_e.TournamentCardDetail=wc,_e.TournamentCardHeader=xc,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|
|
183
|
+
`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:o}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,c=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:u})=>{if(u&&c&&a){const f=c.filter(p=>s.includes(p.type.name));d.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),TD=_t.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(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,Ge(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>Wl({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Aa=200,it=function(){};it.prototype.append=function(e){return e.length?(e=it.from(e),!this.length&&e||e.length<Aa&&this.leafAppend(e)||this.length<Aa&&e.leafPrepend(this)||this.appendInner(e)):this},it.prototype.prepend=function(e){return e.length?it.from(e).append(this):this},it.prototype.appendInner=function(e){return new DD(this,e)},it.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?it.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},it.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},it.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},it.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,a){return i.push(e(o,a))},t,r),i},it.from=function(e){return e instanceof it?e:e&&e.length?new Yh(e):it.empty};var Yh=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,a,s){for(var c=o;c<a;c++)if(i(this.values[c],s+c)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,a,s){for(var c=o-1;c>=a;c--)if(i(this.values[c],s+c)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Aa)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Aa)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(it);it.empty=new Yh([]);var DD=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,a){var s=this.left.length;if(i<s&&this.left.forEachInner(r,i,Math.min(o,s),a)===!1||o>s&&this.right.forEachInner(r,Math.max(i-s,0),Math.min(this.length,o)-s,a+s)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,a){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(r,i-s,Math.max(o,s)-s,a+s)===!1||o<s&&this.left.forEachInvertedInner(r,Math.min(i,s),o,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(it);const AD=500;class rn{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){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;t&&(i=this.remapping(r,this.items.length),o=i.maps.length);let a=e.tr,s,c,d=[],u=[];return this.items.forEach((f,p)=>{if(!f.step){i||(i=this.remapping(r,p+1),o=i.maps.length),o--,u.push(f);return}if(i){u.push(new Sn(f.map));let h=f.step.map(i.slice(o)),m;h&&a.maybeStep(h).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],d.push(new Sn(m,void 0,void 0,d.length+u.length))),o--,m&&i.appendMap(m,o)}else a.maybeStep(f.step);if(f.selection)return s=i?f.selection.map(i.slice(o)):f.selection,c=new rn(this.items.slice(0,r).append(u.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:a,selection:s}}addTransform(e,t,r,i){let o=[],a=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),p=new Sn(e.mapping.maps[u],f,t),h;(h=c&&c.merge(p))&&(p=h,u?o.pop():s=s.slice(0,s.length-1)),o.push(p),t&&(a++,t=void 0),i||(c=p)}let d=a-r.depth;return d>ED&&(s=OD(s,d),a-=d),new rn(s.append(o),a)}remapping(e,t){let r=new Zr;return this.items.forEach((i,o)=>{let a=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},e,t),r}addMaps(e){return this.eventCount==0?this:new rn(this.items.append(e.map(t=>new Sn(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),o=e.mapping,a=e.steps.length,s=this.eventCount;this.items.forEach(p=>{p.selection&&s--},i);let c=t;this.items.forEach(p=>{let h=o.getMirror(--c);if(h==null)return;a=Math.min(a,h);let m=o.maps[h];if(p.step){let v=e.steps[h].invert(e.docs[h]),w=p.selection&&p.selection.map(o.slice(c+1,h));w&&s++,r.push(new Sn(m,v,w))}else r.push(new Sn(m))},i);let d=[];for(let p=t;p<a;p++)d.push(new Sn(o.maps[p]));let u=this.items.slice(0,i).append(d).append(r),f=new rn(u,s);return f.emptyItemCount()>AD&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach((a,s)=>{if(s>=e)i.push(a),a.selection&&o++;else if(a.step){let c=a.step.map(t.slice(r)),d=c&&c.getMap();if(r--,d&&t.appendMap(d,r),c){let u=a.selection&&a.selection.map(t.slice(r));u&&o++;let f=new Sn(d.invert(),c,u),p,h=i.length-1;(p=i.length&&i[h].merge(f))?i[h]=p:i.push(f)}}else a.map&&r--},this.items.length,0),new rn(it.from(i.reverse()),o)}}rn.empty=new rn(it.empty,0);function OD(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}class Sn{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Sn(t.getMap().invert(),t,this.selection)}}}class sr{constructor(e,t,r,i,o){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const ED=20;function ND(n,e,t,r){let i=t.getMeta(lr),o;if(i)return i.historyState;t.getMeta(BD)&&(n=new sr(n.done,n.undone,null,0,-1));let a=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(a&&a.getMeta(lr))return a.getMeta(lr).redo?new sr(n.done.addTransform(t,void 0,r,Oa(e)),n.undone,jh(t.mapping.maps[t.steps.length-1]),n.prevTime,n.prevComposition):new sr(n.done,n.undone.addTransform(t,void 0,r,Oa(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=t.getMeta("composition"),c=n.prevTime==0||!a&&n.prevComposition!=s&&(n.prevTime<(t.time||0)-r.newGroupDelay||!_D(t,n.prevRanges)),d=a?uc(n.prevRanges,t.mapping):jh(t.mapping.maps[t.steps.length-1]);return new sr(n.done.addTransform(t,c?e.selection.getBookmark():void 0,r,Oa(e)),rn.empty,d,t.time,s??n.prevComposition)}else return(o=t.getMeta("rebased"))?new sr(n.done.rebased(t,o),n.undone.rebased(t,o),uc(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new sr(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),uc(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function _D(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(t=!0)}),t}function jh(n){let e=[];return n.forEach((t,r,i,o)=>e.push(i,o)),e}function uc(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let i=e.map(n[r],1),o=e.map(n[r+1],-1);i<=o&&t.push(i,o)}return t}function Uh(n,e,t,r){let i=Oa(e),o=lr.get(e).spec.config,a=(r?n.undone:n.done).popEvent(e,i);if(!a)return;let s=a.selection.resolve(a.transform.doc),c=(r?n.done:n.undone).addTransform(a.transform,e.selection.getBookmark(),o,i),d=new sr(r?c:a.remaining,r?a.remaining:c,null,0,-1);t(a.transform.setSelection(s).setMeta(lr,{redo:r,historyState:d}).scrollIntoView())}let fc=!1,Wh=null;function Oa(n){let e=n.plugins;if(Wh!=e){fc=!1,Wh=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){fc=!0;break}}return fc}const lr=new vn("history"),BD=new vn("closeHistory");function PD(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new Mt({key:lr,state:{init(){return new sr(rn.empty,rn.empty,null,0,-1)},apply(e,t,r){return ND(t,r,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,i=r=="historyUndo"?qh:r=="historyRedo"?Kh:null;return i?(t.preventDefault(),i(e.state,e.dispatch)):!1}}}})}const qh=(n,e)=>{let t=lr.getState(n);return!t||t.done.eventCount==0?!1:(e&&Uh(t,n,e,!1),!0)},Kh=(n,e)=>{let t=lr.getState(n);return!t||t.undone.eventCount==0?!1:(e&&Uh(t,n,e,!0),!0)},ID=ht.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>qh(n,e),redo:()=>({state:n,dispatch:e})=>Kh(n,e)}},addProseMirrorPlugins(){return[PD(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),RD=_t.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",Ge(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n,state:e})=>{const{$to:t}=e.selection,r=n();return t.parentOffset===0?r.insertContentAt(Math.max(t.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:i,dispatch:o})=>{var a;if(o){const{$to:s}=i.selection,c=s.end();if(s.nodeAfter)s.nodeAfter.isTextblock?i.setSelection(ge.create(i.doc,s.pos+1)):s.nodeAfter.isBlock?i.setSelection(ue.create(i.doc,s.pos)):i.setSelection(ge.create(i.doc,s.pos));else{const d=(a=s.parent.type.contentMatch.defaultType)===null||a===void 0?void 0:a.create();d&&(i.insert(c,d),i.setSelection(ge.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[pS({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),VD=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,$D=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,LD=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,FD=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,zD=nn.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[_r({find:VD,type:this.type}),_r({find:LD,type:this.type})]},addPasteRules(){return[Br({find:$D,type:this.type}),Br({find:FD,type:this.type})]}}),HD=_t.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ge(this.options.HTMLAttributes,n),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)}}}),YD=_t.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ge(this.options.HTMLAttributes,n),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)}}}),Gh=nn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=ba(n,this.type);return Object.entries(t).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),Qh=/^(\d+)\.\s$/,jD=_t.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:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",Ge(this.options.HTMLAttributes,t),0]:["ol",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(YD.name,this.editor.getAttributes(Gh.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=co({find:Qh,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=co({find:Qh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Gh.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),UD=_t.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),WD=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,qD=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,KD=nn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){const n={};return zl()?n["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():n["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),n},addInputRules(){return[_r({find:WD,type:this.type})]},addPasteRules(){return[Br({find:qD,type:this.type})]}}),GD=_t.create({name:"text",group:"inline"}),QD=ht.create({name:"starterKit",addExtensions(){var n,e,t,r,i,o,a,s,c,d,u,f,p,h,m,v,w,x;const C=[];return this.options.blockquote!==!1&&C.push(ZT.configure((n=this.options)===null||n===void 0?void 0:n.blockquote)),this.options.bold!==!1&&C.push(iD.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.bulletList!==!1&&C.push(aD.configure((t=this.options)===null||t===void 0?void 0:t.bulletList)),this.options.code!==!1&&C.push(cD.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&C.push(fD.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&C.push(pD.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&C.push(gD.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&C.push(MD.configure((s=this.options)===null||s===void 0?void 0:s.gapcursor)),this.options.hardBreak!==!1&&C.push(SD.configure((c=this.options)===null||c===void 0?void 0:c.hardBreak)),this.options.heading!==!1&&C.push(TD.configure((d=this.options)===null||d===void 0?void 0:d.heading)),this.options.history!==!1&&C.push(ID.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&C.push(RD.configure((f=this.options)===null||f===void 0?void 0:f.horizontalRule)),this.options.italic!==!1&&C.push(zD.configure((p=this.options)===null||p===void 0?void 0:p.italic)),this.options.listItem!==!1&&C.push(HD.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&C.push(jD.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&C.push(UD.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&C.push(KD.configure((w=this.options)===null||w===void 0?void 0:w.strike)),this.options.text!==!1&&C.push(GD.configure((x=this.options)===null||x===void 0?void 0:x.text)),C}}),JD=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,XD=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,ZD=nn.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:n}){return["mark",Ge(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[_r({find:JD,type:this.type})]},addPasteRules(){return[Br({find:XD,type:this.type})]}}),eA=ht.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),tA={components:{EditorContent:QT,BaseButton:Rn},props:{invalid:{type:Boolean,default:!1}},data(){return{}},setup(n,{emit:e}){const t=l.ref("");return{editor:JT({content:"",extensions:[QD,ZD,eA.configure({types:["heading","paragraph"]})],editorProps:{attributes:{class:"focus:outline-none"}},onUpdate({editor:i}){t.value=i.getHTML(),e("update:editorContent",t.value)}}),editorContent:t}},methods:{}},nA={"data-testid":"editor-buttons",class:"w-full flex flex-row pl-2"},rA={class:"w-1/3 border-r border-dropdownSelect flex flex-row justify-between pr-2"},iA={class:"w-1/3 border-r border-dropdownSelect flex flex-row justify-around"},oA={class:"w-1/3 flex flex-row justify-between pl-2"},aA={class:"my-4 my-2 p-4 rounded-xl h-40 bg-tertiary overflow-auto"};function sA(n,e,t,r,i,o){const a=l.resolveComponent("BaseButton"),s=l.resolveComponent("editor-content");return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["border rounded-lg text-secondary text-sm p-4 w-full",t.invalid?"border-alarm":"border-dropdownSelect"])},[l.createElementVNode("div",nA,[l.createElementVNode("div",rA,[l.createVNode(a,{iconName:"fa-h1",label:"",type:"editor",selected:r.editor&&r.editor.isActive("heading",{level:1}),onClick:e[0]||(e[0]=c=>r.editor.chain().toggleHeading({level:1}).run())},null,8,["selected"]),l.createVNode(a,{iconName:"fa-h2",label:"",type:"editor",selected:r.editor&&r.editor.isActive("heading",{level:2}),onClick:e[1]||(e[1]=c=>r.editor.chain().toggleHeading({level:2}).run())},null,8,["selected"]),l.createVNode(a,{iconName:"fa-h3",label:"",type:"editor",selected:r.editor&&r.editor.isActive("heading",{level:3}),onClick:e[2]||(e[2]=c=>r.editor.chain().toggleHeading({level:3}).run())},null,8,["selected"]),l.createVNode(a,{iconName:"fa-paragraph",label:"",type:"editor",selected:r.editor&&r.editor.isActive("paragraph"),onClick:e[3]||(e[3]=c=>r.editor.chain().setParagraph().run())},null,8,["selected"])]),l.createElementVNode("div",iA,[l.createVNode(a,{selected:r.editor&&r.editor.isActive("bold"),iconName:"fa-bold",label:"",type:"editor",onClick:e[4]||(e[4]=c=>r.editor&&r.editor.chain().toggleBold().run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive("italic"),iconName:"fa-italic",label:"",type:"editor",onClick:e[5]||(e[5]=c=>r.editor&&r.editor.chain().toggleItalic().run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive("strike"),iconName:"fa-strikethrough",label:"",type:"editor",onClick:e[6]||(e[6]=c=>r.editor&&r.editor.chain().toggleStrike().run())},null,8,["selected"])]),l.createElementVNode("div",oA,[l.createVNode(a,{selected:r.editor&&r.editor.isActive({textAlign:"left"}),iconName:"fa-align-left",label:"",type:"editor",onClick:e[7]||(e[7]=c=>r.editor.chain().setTextAlign("left").run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive({textAlign:"center"}),iconName:"fa-align-center",label:"",type:"editor",onClick:e[8]||(e[8]=c=>r.editor&&r.editor.chain().setTextAlign("center").run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive({textAlign:"right"}),iconName:"fa-align-right",label:"",type:"editor",onClick:e[9]||(e[9]=c=>r.editor&&r.editor.chain().setTextAlign("right").run())},null,8,["selected"]),l.createVNode(a,{selected:r.editor&&r.editor.isActive({textAlign:"justify"}),iconName:"fa-align-justify",label:"",type:"editor",onClick:e[10]||(e[10]=c=>r.editor&&r.editor.chain().setTextAlign("justify").run())},null,8,["selected"])])]),l.createElementVNode("p",aA,[l.createVNode(s,{editor:r.editor,class:"focus:shadow-none focus:outline-none"},null,8,["editor"])])],2)}const Jh=Le(tA,[["render",sA]]),lA={name:"AddTournamentPageOne",components:{BaseText:sn,BaseInput:Mi,ImageCropper:Tu,AddressAutocomplete:Tc,DatePicker:Ts,TextBoxEditor:Jh,BaseRadioGroup:vc,BaseButton:Rn},props:{},data(){return{tournament:{name:"",imageLink:"",address:"",coordinates:"",startDate:"",totalDays:1,description:"",visibility:"",externalLinks:Array},validation:{name:!1,imageLink:!1,address:!1,coordinates:!1,startDate:!1,totalDays:!1,description:!1,visibility:!1},visibilityItems:[{label:"Open",value:"open",description:"Viewable To Everyone"},{label:"Club",value:"club",description:"Viewable Only to Members of Your Club"},{label:"Private",value:"private",description:"Only Viewable by you"}]}},methods:{handleSubmit(){this.setAllValidationStates(!1),this.tournament.name===""&&(this.validation.name=!0),this.tournament.coordinates===""&&(this.validation.address=!0),this.tournament.startDate===""&&(this.validation.startDate=!0),this.tournament.totalDays===""&&(this.validation.totalDays=!0),this.tournament.description===""&&(this.validation.description=!0),this.tournament.visibility===""&&(this.validation.visibility=!0),this.areAnyFieldsAreLeftInvalid||(this.$emit("update:tournament",this.tournament),this.$emit("update:step",2))},setAllValidationStates(n){Object.keys(this.validation).forEach(e=>{this.validation[e]=n})},handleAddressUpdate(n){this.tournament.address=n.address,this.tournament.coordinates=n.coordinates},handleDateUpdate(n){this.tournament.startDate=n,console.log("New Date"),console.log(n),console.log(Ts.props.invalid)},handleEditorUpdate(n){this.tournament.description=n}},computed:{areAnyFieldsAreLeftInvalid(){return Object.values(this.validation).every(n=>n)}}},cA={class:"border border-dropdownSelect rounded-lg p-9 bg-neutral"},dA={class:"w-full flex flex-row justify-center"},uA={class:"w-full flex flex-row justify-center my-4"},fA={class:"w-full flex flex-row justify-center my-4"},pA={class:"w-full flex flex-row justify-center"},hA={class:"w-96"},mA={class:"flex flex-col mb-3"},gA={class:"flex flex-col mb-3"},yA={class:"flex flex-row mb-3"},vA={class:"w-3/4 mr-1"},bA={class:"w-1/4 ml-1"},wA={class:"flex flex-col mb-3"},kA={class:"flex flex-col pb-4"};function xA(n,e,t,r,i,o){const a=l.resolveComponent("BaseText"),s=l.resolveComponent("ImageCropper"),c=l.resolveComponent("BaseInput"),d=l.resolveComponent("AddressAutocomplete"),u=l.resolveComponent("DatePicker"),f=l.resolveComponent("TextBoxEditor"),p=l.resolveComponent("BaseRadioGroup"),h=l.resolveComponent("BaseButton");return l.openBlock(),l.createElementBlock("div",cA,[l.createElementVNode("div",dA,[l.createVNode(a,{color:"quaternary",size:"sm",text:"Step 1 out of 2",weight:"normal","data-testid":"text-step"})]),l.createElementVNode("div",uA,[l.createVNode(a,{color:"primaryHighlight",size:"2xl",text:"Add Tournament",weight:"normal","data-testid":"text-add-tournament"})]),l.createElementVNode("div",fA,[l.createVNode(s,{personID:1})]),l.createElementVNode("div",pA,[l.createElementVNode("section",hA,[l.createElementVNode("div",mA,[l.createVNode(a,{invalid:i.validation.name,size:"sm",text:"Tournament Name",weight:"normal",class:"mb-1",color:"primary","data-testid":"text-tournament-name"},null,8,["invalid"]),l.createVNode(c,{addBorder:!0,invalid:i.validation.name,value:i.tournament.name,placeholder:"Enter Tournament Name",type:"formInput","onUpdate:value":e[0]||(e[0]=m=>i.tournament.name=m)},null,8,["invalid","value"])]),l.createElementVNode("div",gA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.address,size:"sm",text:"Address",weight:"normal",class:"mb-1","data-testid":"text-address"},null,8,["invalid"]),l.createVNode(d,{address:i.tournament.address,invalid:i.validation.address,"onUpdate:address":o.handleAddressUpdate},null,8,["address","invalid","onUpdate:address"])]),l.createElementVNode("div",yA,[l.createElementVNode("div",vA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.startDate,size:"sm",text:"Start Date",weight:"normal",class:"mb-1","data-testid":"text-start-date"},null,8,["invalid"]),l.createVNode(u,{invalid:i.validation.startDate,setDate:i.tournament.startDate,"onUpdate:selectedDate":o.handleDateUpdate},null,8,["invalid","setDate","onUpdate:selectedDate"])]),l.createElementVNode("div",bA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.totalDays,size:"sm",text:"Total Days",weight:"normal",class:"mb-1","data-testid":"text-total-days"},null,8,["invalid"]),l.createVNode(c,{addBorder:!0,invalid:i.validation.totalDays,placeholder:"1",value:`${i.tournament.totalDays}`},null,8,["invalid","value"])])]),l.createElementVNode("div",wA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.description,size:"sm",text:"Description",weight:"normal",class:"mb-1","data-testid":"text-description"},null,8,["invalid"]),l.createVNode(f,{invalid:i.validation.description,"onUpdate:editorContent":o.handleEditorUpdate},null,8,["invalid","onUpdate:editorContent"])]),l.createElementVNode("div",kA,[l.createVNode(a,{color:"primaryHighlight",invalid:i.validation.visibility,size:"sm",text:"Tournament Visibility",weight:"normal",class:"mb-2","data-testid":"text-visibility"},null,8,["invalid"]),l.createVNode(p,{invalid:i.validation.visibility,items:i.visibilityItems,"onUpdate:value":e[1]||(e[1]=m=>i.tournament.visibility=m)},null,8,["invalid","items"])]),l.createElementVNode("div",null,[l.createVNode(h,{class:"w-full",color:"neutral",label:"Continue",size:"sm",type:"secondary",onClick:e[2]||(e[2]=m=>o.handleSubmit())})])])])])}const CA=Le(lA,[["render",xA]]),MA={name:"AddTournamentPageTwo",components:{BaseIcon:Ci,BaseText:sn,BaseButton:Rn,BaseInput:Mi},props:{tournament:Object},data(){return{ferrotasToHost:!1,linkInputVisible:!1,localTournament:JSON.parse(JSON.stringify(this.tournament))}},created(){Array.isArray(this.localTournament.externalLinks)||(this.localTournament.externalLinks=[]),this.localTournament.externalLinks.length===0&&this.localTournament.externalLinks.push({url:"",valid:!0})},methods:{updateLink(n,e){const t=e.target.value;this.localTournament.externalLinks[n].url=t,this.localTournament.externalLinks[n].valid=this.isValidUrl(t)},handleHosting(){this.ferrotasToHost=!this.ferrotasToHost},toggleLinkInput(){this.linkInputVisible=!this.linkInputVisible},addExternalLink(){this.localTournament.externalLinks.push({url:"",valid:!0})},removeLink(n){this.localTournament.externalLinks=this.localTournament.externalLinks.filter(e=>e.url!==n)},handleSubmit(){console.log("submitting ferrotas hosting"),this.areAllLinksValid()&&(console.log(this.localTournament),this.$emit("submit",this.localTournament))},isValidUrl(n){return/^(https?:\/\/)?([\da-z.-]+)\.([\da-z.]+)\.([\/\w\W]+)\/?$/.test(n)},areAllLinksValid(){return this.localTournament.externalLinks.forEach(n=>n.valid=this.isValidUrl(n.url)),this.localTournament.externalLinks.every(n=>n.valid)}}},SA={class:"border border-dropdownSelect rounded-lg p-9 bg-neutral"},TA={class:"w-full flex flex-row justify-center"},DA={class:"w-full flex flex-row justify-center"},AA={class:"w-96"},OA={class:"w-full flex flex-row justify-center text-center my-4"},EA={class:"w-full flex flex-col mb-3"},NA=l.createElementVNode("br",null,null,-1),_A=l.createElementVNode("br",null,null,-1),BA={class:"flex flex-row justify-center"},PA={key:0,class:"flex flex-col mb-3"};function IA(n,e,t,r,i,o){const a=l.resolveComponent("BaseText"),s=l.resolveComponent("BaseButton"),c=l.resolveComponent("BaseInput"),d=l.resolveComponent("BaseIcon");return l.openBlock(),l.createElementBlock("div",SA,[l.createElementVNode("div",TA,[l.createVNode(a,{color:"quaternary",size:"sm",text:"Step 2 out of 4",weight:"normal","data-testid":"text-step"})]),l.createElementVNode("div",DA,[l.createElementVNode("section",AA,[l.createElementVNode("div",OA,[l.createVNode(a,{color:"primaryHighlight",size:"2xl",text:"Do you want Ferrotas to host your tournament?",weight:"normal","data-testid":"text-ferrotas-to-host"})]),l.createElementVNode("div",EA,[l.createVNode(a,{color:"quaternary",size:"sm",text:"If you select 'No', your tournament will be featured on our main calendar. This will include a direct link to your tournament's webpage, making it easy for participants to find all the relevant information on your own site.",weight:"normal","data-testid":"text-select-no"},null,8,["text"]),NA,l.createVNode(a,{color:"quaternary",size:"sm",text:"By selecting 'Yes', you'll gain access to our comprehensive Ferrotas platform. This allows you to manage and conduct your tournament directly through our system, offering a seamless and integrated experience.",weight:"normal","data-testid":"text-select-yes"},null,8,["text"]),_A,l.createVNode(a,{color:"quaternary",size:"sm",text:"Need Assistance? Our support team is always ready to help. Contact us for any queries or guidance you need.",weight:"normal","data-testid":"text-need-help"},null,8,["text"])]),l.createElementVNode("div",BA,[l.createVNode(s,{class:"w-1/2 mr-1",color:"neutral",label:"Yes",selected:"selected",size:"sm",type:"square",onClick:e[0]||(e[0]=u=>o.handleHosting())}),l.createVNode(s,{class:"w-1/2 ml-1",color:"neutral",label:"No",size:"sm",type:"square",onClick:e[1]||(e[1]=u=>o.toggleLinkInput())})]),i.linkInputVisible?(l.openBlock(),l.createElementBlock("section",PA,[l.createVNode(a,{color:"quaternary",size:"sm",text:"Add links to external sites such as Facebook events",weight:"normal",class:"mb-1","data-testid":"text-need-help"}),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.localTournament.externalLinks,(u,f)=>(l.openBlock(),l.createElementBlock("div",{key:f,class:"flex flex-row w-full"},[l.createVNode(c,{addBorder:!0,invalid:!u.valid,value:u.url,class:"pb-2 w-full","icon-name":"fa-dash",placeholder:"https://link1.com/yourevent",onInput:p=>o.updateLink(f,p)},null,8,["invalid","value","onInput"]),l.createVNode(d,{class:"mt-1.5 -ml-7 hover:text-primaryHighlight",color:"primary","data-testid":"base-icon","icon-name":"fa-circle-xmark",iconStyle:"fa-solid",size:"xl",onClick:p=>o.removeLink(u.url)},null,8,["onClick"])]))),128)),l.createVNode(s,{class:"w-full mt-3",color:"neutral",label:"Add New Link",size:"sm",type:"primary",onClick:e[2]||(e[2]=u=>o.addExternalLink())})])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[l.createVNode(s,{color:"neutral",label:"Continue",size:"sm",type:"secondary",onClick:e[3]||(e[3]=u=>o.handleSubmit())})])])])])}const RA=Le(MA,[["render",IA]]),VA={name:"AdminLeftMenu",components:{BaseButton:Rn},props:{buttons:{type:Array,default:()=>[]}},methods:{handleButtonClick(n){this.$emit("button-click",n)}}},$A={class:"bg-secondary w-64 h-screen flex flex-col justify-between"},LA=l.createElementVNode("section",{class:"h-28 border-b border-neutral"},[l.createElementVNode("div",{class:"flex flex-col justify-center h-28"},[l.createElementVNode("div",{class:"ml-8"},[l.createElementVNode("img",{class:"w-32",src:"https://ferrotas.com/assets/ferrotas-white-small-720502db.png",alt:"logo"})])])],-1),FA={class:"flex flex-col p-2 h-full"},zA={class:"flex flex-col justify-end p-2 flex-grow"},HA={class:"border-t border-neutral pt-2"};function YA(n,e,t,r,i,o){const a=l.resolveComponent("BaseButton");return l.openBlock(),l.createElementBlock("div",$A,[LA,l.createElementVNode("section",FA,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.buttons,s=>(l.openBlock(),l.createBlock(a,{label:s.label,iconClass:"fa-solid fa-trophy text-white",type:"admin",hover:"admin",onClick:c=>o.handleButtonClick(s)},null,8,["label","onClick"]))),256))]),l.createElementVNode("section",zA,[l.createElementVNode("div",HA,[l.createVNode(a,{iconClass:"fa-solid fa-circle-user text-textSecondary",label:"Account",type:"adminSecondary",onClick:e[0]||(e[0]=s=>o.handleButtonClick(n.button))}),l.createVNode(a,{iconClass:"fa-solid fa-right-to-bracket fa-rotate-180 text-textSecondary",label:"Log Out",type:"adminSecondary",onClick:e[1]||(e[1]=s=>o.handleButtonClick(n.button))})])])])}const jA=Le(VA,[["render",YA]]);_e.AddTournamentPageOne=CA,_e.AddTournamentPageTwo=RA,_e.AddressAutocomplete=Tc,_e.AdminLeftMenu=jA,_e.BaseButton=Rn,_e.BaseIcon=Ci,_e.BaseInput=Mi,_e.BaseModal=Jm,_e.BaseRadioGroup=vc,_e.BaseTag=bc,_e.BaseText=sn,_e.Breadcrumb=ym,_e.DatePicker=Ts,_e.DropDownMenu=_a,_e.FilterAndSortBar=Cc,_e.FilterUpcomingPast=Mc,_e.GridContainer=bw,_e.ImageCropper=Tu,_e.TextBoxEditor=Jh,_e.TournamentCard=Hd,_e.TournamentCardDetail=wc,_e.TournamentCardHeader=xc,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -10,7 +10,7 @@ export { default as TournamentCardDetail } from './stories/Molecules/Cards/Detai
|
|
|
10
10
|
export { default as TournamentCardHeader } from './stories/Molecules/Cards/Header/TournamentCardHeader.vue';
|
|
11
11
|
export { default as FilterAndSortBar } from './stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.vue';
|
|
12
12
|
export { default as FilterUpcomingPast } from './stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.vue';
|
|
13
|
-
export { default as
|
|
13
|
+
export { default as BaseModal } from './stories/Molecules/Modals/BaseModal/BaseModal.vue';
|
|
14
14
|
|
|
15
15
|
export { default as AddressAutocomplete } from './stories/Organisms/Inputs/AddressAutocomplete/AddressAutocomplete.vue';
|
|
16
16
|
export { default as DatePicker } from './stories/Organisms/Inputs/DatePicker/DatePicker.vue';
|