сохр
This commit is contained in:
1 parent
588408f675
commit
dca0080fa3
85 files changed
+465
-57
No files matched your search
+6
@@ -0,0 +1,6 @@
|
||||
import{aF as er,p as ct,a2 as un,a5 as li,a6 as tr,a7 as Ye,a9 as nr,ag as ir,a8 as sr,r as N,c as K,s as Ee,w as je,e as ga,F as _,ad as dt,N as ai,aG as pa,a1 as zn,aa as va,o as ut,Z as U,ar as ma,H as xe,P as ya,b as Un,aH as ba,i as _a,aI as wa,O as rr,aJ as Ea,z as Da,aK as Aa,aq as qt,_ as Ne,aL as vt,C as D,D as X,E as w,Y as A,$ as J,aM as oi,R as ie,I as kt,K as ae,L as te,G as Z,a0 as H,J as Dt,ah as Sa,aN as Ca,ai as Ta,aO as Ra,aP as ka,aj as Ma,ak as xa,al as Ia,am as Oa,aQ as Ha,an as Na,aR as Pa,aS as Va,ao as La,av as Ba,aT as Wa,V as fe,aU as ja,ab as Fa,X as se,aV as lr,aW as zt,aX as za,a as Ua,af as ge,A as ar,aY as $a,aZ as Ya,a_ as Ga,S as L,aE as ne,a$ as qa,b0 as Qa,U as or,W as cr,M as Za,b1 as Ke,ae as x,b2 as V,b3 as de,Q as Li,b4 as Xa,az as Qt,b5 as $n,b6 as Ja,b7 as Bi,b8 as R,B as Ka,aB as eo}from"./index-814853ac.js";import{f as to,N as no}from"./news-list-1191eb59.js";import{u as dr,m as ur,a as hr,b as io,c as Wi}from"./group-fb00c02e.js";import{V as ze,a as fr,u as ji,b as so}from"./VBtn-40b20d13.js";import{u as ro,e as gr,c as lo,d as ci,f as ao,h as oo,b as pr}from"./VTextarea-a69e07b3.js";import{V as co,L as uo}from"./load-round-35b24f56.js";import{C as vr,V as mr}from"./VTooltip-4581bbfb.js";import"./VInput-2bda1884.js";import"./VChip-caf2448b.js";const ho=t=>{const{touchstartX:e,touchendX:n,touchstartY:i,touchendY:r}=t,s=.5,l=16;t.offsetX=n-e,t.offsetY=r-i,Math.abs(t.offsetY)<s*Math.abs(t.offsetX)&&(t.left&&n<e-l&&t.left(t),t.right&&n>e+l&&t.right(t)),Math.abs(t.offsetX)<s*Math.abs(t.offsetY)&&(t.up&&r<i-l&&t.up(t),t.down&&r>i+l&&t.down(t))};function fo(t,e){var i;const n=t.changedTouches[0];e.touchstartX=n.clientX,e.touchstartY=n.clientY,(i=e.start)==null||i.call(e,{originalEvent:t,...e})}function go(t,e){var i;const n=t.changedTouches[0];e.touchendX=n.clientX,e.touchendY=n.clientY,(i=e.end)==null||i.call(e,{originalEvent:t,...e}),ho(e)}function po(t,e){var i;const n=t.changedTouches[0];e.touchmoveX=n.clientX,e.touchmoveY=n.clientY,(i=e.move)==null||i.call(e,{originalEvent:t,...e})}function vo(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const e={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:t.left,right:t.right,up:t.up,down:t.down,start:t.start,move:t.move,end:t.end};return{touchstart:n=>fo(n,e),touchend:n=>go(n,e),touchmove:n=>po(n,e)}}function mo(t,e){var a;const n=e.value,i=n!=null&&n.parent?t.parentElement:t,r=(n==null?void 0:n.options)??{passive:!0},s=(a=e.instance)==null?void 0:a.$.uid;if(!i||!s)return;const l=vo(e.value);i._touchHandlers=i._touchHandlers??Object.create(null),i._touchHandlers[s]=l,er(l).forEach(o=>{i.addEventListener(o,l[o],r)})}function yo(t,e){var s,l;const n=(s=e.value)!=null&&s.parent?t.parentElement:t,i=(l=e.instance)==null?void 0:l.$.uid;if(!(n!=null&&n._touchHandlers)||!i)return;const r=n._touchHandlers[i];er(r).forEach(a=>{n.removeEventListener(a,r[a])}),delete n._touchHandlers[i]}const yr={mounted:mo,unmounted:yo},br=Symbol.for("vuetify:v-window"),_r=Symbol.for("vuetify:v-window-group"),wr=ct({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:t=>typeof t=="boolean"||t==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{default:"force"},...un(),...li(),...tr()},"VWindow"),Fi=Ye()({name:"VWindow",directives:{Touch:yr},props:wr(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const{themeClasses:i}=nr(t),{isRtl:r}=ir(),{t:s}=sr(),l=dr(t,_r),a=N(),o=K(()=>r.value?!t.reverse:t.reverse),c=Ee(!1),d=K(()=>{const C=t.direction==="vertical"?"y":"x",B=(o.value?!c.value:c.value)?"-reverse":"";return`v-window-${C}${B}-transition`}),u=Ee(0),h=N(void 0),f=K(()=>l.items.value.findIndex(C=>l.selected.value.includes(C.id)));je(f,(C,k)=>{const B=l.items.value.length,j=B-1;B<=2?c.value=C<k:C===j&&k===0?c.value=!0:C===0&&k===j?c.value=!1:c.value=C<k}),ga(br,{transition:d,isReversed:c,transitionCount:u,transitionHeight:h,rootRef:a});const p=K(()=>t.continuous||f.value!==0),y=K(()=>t.continuous||f.value!==l.items.value.length-1);function m(){p.value&&l.prev()}function b(){y.value&&l.next()}const E=K(()=>{const C=[],k={icon:r.value?t.nextIcon:t.prevIcon,class:`v-window__${o.value?"right":"left"}`,onClick:l.prev,ariaLabel:s("$vuetify.carousel.prev")};C.push(p.value?n.prev?n.prev({props:k}):_(ze,k,null):_("div",null,null));const B={icon:r.value?t.prevIcon:t.nextIcon,class:`v-window__${o.value?"left":"right"}`,onClick:l.next,ariaLabel:s("$vuetify.carousel.next")};return C.push(y.value?n.next?n.next({props:B}):_(ze,B,null):_("div",null,null)),C}),S=K(()=>t.touch===!1?t.touch:{...{left:()=>{o.value?m():b()},right:()=>{o.value?b():m()},start:k=>{let{originalEvent:B}=kLine truncated
|
||||
* vue-cal v4.8.1
|
||||
* (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
|
||||
* @license MIT
|
||||
*/let gt,Zs,Xs,ce,pt={},et={};class Np{constructor(e){De(this,"_vuecal",null),De(this,"selectCell",(n=!1,i,r)=>{this._vuecal.$emit("cell-click",r?{date:i,split:r}:i),this._vuecal.clickToNavigate||n?this._vuecal.switchToNarrowerView():this._vuecal.dblclickToNavigate&&"ontouchstart"in window&&(this._vuecal.domEvents.dblTapACell.taps++,setTimeout(()=>this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.domEvents.dblTapACell.timeout),this._vuecal.domEvents.dblTapACell.taps>=2&&(this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.switchToNarrowerView(),this._vuecal.$emit("cell-dblclick",r?{date:i,split:r}:i)))}),De(this,"keyPressEnterCell",(n,i)=>{this._vuecal.$emit("cell-keypress-enter",i?{date:n,split:i}:n),this._vuecal.switchToNarrowerView()}),De(this,"getPosition",n=>{const{left:i,top:r}=this._vuecal.cellsEl.getBoundingClientRect(),{clientX:s,clientY:l}="ontouchstart"in window&&n.touches?n.touches[0]:n;return{x:s-i,y:l-r}}),De(this,"minutesAtCursor",n=>{let i=0,r={x:0,y:0};const{timeStep:s,timeCellHeight:l,timeFrom:a}=this._vuecal.$props;return typeof n=="number"?i=n:typeof n=="object"&&(r=this.getPosition(n),i=Math.round(r.y*s/parseInt(l)+a)),{minutes:Math.max(Math.min(i,1440),0),cursorCoords:r}}),this._vuecal=e}}let Y,G,Fn;class Pp{constructor(e,n){De(this,"_vuecal",null),De(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""}),this._vuecal=e,Y=n}createAnEvent(e,n,i){if(typeof e=="string"&&(e=Y.stringToDate(e)),!(e instanceof Date))return!1;const r=Y.dateToMinutes(e),s=r+(n=1*n||120),l=Y.addMinutes(new Date(e),n);i.end&&(typeof i.end=="string"&&(i.end=Y.stringToDate(i.end)),i.endTimeMinutes=Y.dateToMinutes(i.end));const a={...this.eventDefaults,_eid:`${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`,start:e,startTimeMinutes:r,end:l,endTimeMinutes:s,segments:null,...i};return typeof this._vuecal.onEventCreate!="function"||this._vuecal.onEventCreate(a,()=>this.deleteAnEvent(a))?(a.startDateF!==a.endDateF&&(a.daysCount=Y.countDays(a.start,a.end)),this._vuecal.mutableEvents.push(a),this._vuecal.addEventsToView([a]),this._vuecal.emitWithEvent("event-create",a),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(a),originalEvent:null}),a):void 0}addEventSegment(e){e.segments||(e.segments={},e.segments[Y.formatDateLite(e.start)]={start:e.start,startTimeMinutes:e.startTimeMinutes,endTimeMinutes:1440,isFirstDay:!0,isLastDay:!1});const n=e.segments[Y.formatDateLite(e.end)];n&&(n.isLastDay=!1,n.endTimeMinutes=1440);const i=Y.addDays(e.end,1),r=Y.formatDateLite(i);return i.setHours(0,0,0,0),e.segments[r]={start:i,startTimeMinutes:0,endTimeMinutes:e.endTimeMinutes,isFirstDay:!1,isLastDay:!0},e.end=Y.addMinutes(i,e.endTimeMinutes),e.daysCount=Object.keys(e.segments).length,r}removeEventSegment(e){let n=Object.keys(e.segments).length;if(n<=1)return Y.formatDateLite(e.end);delete e.segments[Y.formatDateLite(e.end)],n--;const i=Y.subtractDays(e.end,1),r=Y.formatDateLite(i),s=e.segments[r];return n?s&&(s.isLastDay=!0,s.endTimeMinutes=e.endTimeMinutes):e.segments=null,e.daysCount=n||1,e.end=i,r}createEventSegments(e,n,i){const r=n.getTime(),s=i.getTime();let l,a,o,c=e.start.getTime(),d=e.end.getTime(),u=!1;for(e.end.getHours()||e.end.getMinutes()||(d-=1e3),e.segments={},e.repeat?(l=r,a=Math.min(s,e.repeat.until?Y.stringToDate(e.repeat.until).getTime():s)):(l=Math.max(r,c),a=Math.min(s,d));l<=a;){let h=!1;const f=Y.addDays(new Date(l),1).setHours(0,0,0,0);let p,y,m,b;if(e.repeat){const E=new Date(l),S=Y.formatDateLite(E);(u||e.occurrences&&e.occurrences[S])&&(u||(c=e.occurrences[S].start,o=new Date(c).setHours(0,0,0,0),d=e.occurrences[S].end),u=!0,h=!0),p=l===o,y=S===Y.formatDateLite(new Date(d)),m=new Date(p?c:l),b=Y.formatDateLite(m),y&&(u=!1)}else h=!0,p=l===c,y=a===d&&f>a,m=p?e.start:new Date(l),b=Y.formatDateLite(p?e.start:m);h&&(e.segments[b]={start:m,startTimeMinutes:p?e.startTimeMinutes:0,endTimeMinutes:y?e.endTimeMinutes:1440,isFirstDay:p,isLastDay:y}),l=f}return e}deleteAnEvent(e){this._vuecal.emitWithEvent("event-delete",e),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter(n=>n._eid!==e._eid),this._vuecal.view.events=this._vuecal.view.events.filter(n=>n._eid!==e._eid)}checkCellOverlappingEvents(e,n){Fn=e.slice(0),G={},e.forEach(r=>{Fn.shift(),G[r._eid]||(G[r._eid]={overlaps:[],start:r.start,position:0}),G[r._eid].position=0,Fn.forEach(s=>{G[s._eid]||(G[s._eid]={overlaps:[],start:s.start,position:0});const l=this.eventInRange(s,r.start,r.end),a=n.overlapsPerTimeStep?Y.datesInSameTimeStep(r.start,s.start,n.timeStep):1;if(r.background||r.allDay||s.background||s.allDay||!l||!a){let o,c;(o=(G[r._eid]||{overlaps:[]}).overlaps.indexOf(s._eid))>-1&&G[r._eid].overlaps.splice(o,1),(c=(G[s._eid]||{overlaps:[]}).overlaps.indexOf(r._eid))>-1&&G[s.Line truncated
|
||||
A valid view must be one of: ${Js.join(", ")}.`),t="week"),this.enabledViews.includes(t)||(console.warn(`Vue Cal: the provided active-view "${t}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),t=this.enabledViews[0]),t},switchToNarrowerView(t=null){this.transitionDirection="right";const e=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];e&&this.switchView(e,t)},switchView(t,e=null,n=!1){t=this.validateView(t);const i=this.utils.date,r=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&n){if(this.view.id===t)return;const a=this.enabledViews;this.transitionDirection=a.indexOf(this.view.id)>a.indexOf(t)?"left":"right"}const s=this.view.id;switch(this.view.events=[],this.view.id=t,this.view.firstCellDate=null,this.view.lastCellDate=null,e||(e=this.view.selectedDate||this.view.startDate),t){case"years":this.view.startDate=new Date(25*Math.floor(e.getFullYear()/25)||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break;case"year":this.view.startDate=new Date(e.getFullYear(),0,1),this.view.endDate=new Date(e.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break;case"month":{this.view.startDate=new Date(e.getFullYear(),e.getMonth(),1),this.view.endDate=new Date(e.getFullYear(),e.getMonth()+1,1),this.view.endDate.setSeconds(-1);let a=new Date(this.view.startDate);if(a.getDay()!==(this.startWeekOnSunday?0:1)&&(a=i.getPreviousFirstDayOfWeek(a,this.startWeekOnSunday)),this.view.firstCellDate=a,this.view.lastCellDate=i.addDays(a,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const o=this.view.firstCellDate.getDay()!==6||this.startWeekOnSunday?1:2;this.view.firstCellDate=i.addDays(this.view.firstCellDate,o)}if([0,6].includes(this.view.startDate.getDay())){const o=this.view.startDate.getDay()===6?2:1;this.view.startDate=i.addDays(this.view.startDate,o)}if([0,6].includes(this.view.lastCellDate.getDay())){const o=this.view.lastCellDate.getDay()!==0||this.startWeekOnSunday?1:2;this.view.lastCellDate=i.subtractDays(this.view.lastCellDate,o)}if([0,6].includes(this.view.endDate.getDay())){const o=this.view.endDate.getDay()===0?2:1;this.view.endDate=i.subtractDays(this.view.endDate,o)}}break}case"week":{e=i.getPreviousFirstDayOfWeek(e,this.startWeekOnSunday);const a=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?i.addDays(e,1):e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=i.addDays(e,a),this.view.endDate.setSeconds(-1);break}case"day":this.view.startDate=e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(e),this.view.endDate.setHours(23,59,59,0)}this.addEventsToView();const l=this.view.startDate&&this.view.startDate.getTime();if((s!==t||l!==r)&&(this.$emit("update:activeView",t),this.ready)){const a=this.view.startDate,o={view:t,startDate:a,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate,outOfScopeEvents:this.view.outOfScopeEvents.map(this.cleanupEvent)}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:i.getWeek(this.startWeekOnSunday?i.addDays(a,1):a)}:{}};this.$emit("view-change",o)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(t=!0){const e=this.utils.date;this.transitionDirection=t?"right":"left";const n=t?1:-1;let i=null;const{startDate:r,id:s}=this.view;switch(s){case"years":i=new Date(r.getFullYear()+25*n,0,1);break;case"year":i=new Date(r.getFullYear()+1*n,1,1);break;case"month":i=new Date(r.getFullYear(),r.getMonth()+1*n,1);break;case"week":i=e[t?"addDays":"subtractDays"](e.getPreviousFirstDayOfWeek(r,this.startWeekOnSunday),7);break;case"day":i=e[t?"addDays":"subtractDays"](r,1);const l=i.getDay(),a=this.startWeekOnSunday?l:(l||7)-1;if(this.weekDays[a].hide){const o=this.weekDays.map((d,u)=>({...d,i:u}));let c=0;t?([...o.slice(a),...o].find(d=>(c++,!d.hide)).i,c--):[...o,...o.slice(0,a)].reverse().find(d=>(c++,!d.hide)).i,i=e[t?"addDays":"subtractDays"](i,c)}}i&&this.switchView(s,i)},addEventsToView(t=[]){const e=this.utils.event,{startDate:n,endDate:i,firstCellDate:r,lastCellDate:s}=this.view;if(t.length||(this.view.events=[]),!(t=t.length?t:[...this.mutableEvents])||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let l=t.filter(a=>e.eventInRange(a,n,i));this.isYearsOrYearView||this.isMonthView&&!this.eventsOnMonthView||(l=l.map(a=>a.daysCount>1?e.createEventSegments(a,r||n,s||i):a)),this.view.events.push(...l),this.isMonthView&&(this.view.outOfScopeEvents=[],t.forEach(a=>{(e.eventInRange(a,r,n)||e.eventInRange(a,i,s))&&(this.view.events.some(o=>o._eid===a._eid)||this.view.outOfScopeEvents.push(a))}))},findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t},isDOMElementAnEvent(t){return t.classList.contains("vuecal__event")||this.findAncestor(t,"vuecal__event")},onMouseMove(t){const{resizeAnEvent:e,dr
Line truncated
|
||||
Reference in new issue
Block a user