rrule.connector.min.js 1.7 KB

123456
  1. /*!
  2. FullCalendar v5.2.0
  3. Docs & License: https://fullcalendar.io/
  4. (c) 2020 Adam Shaw
  5. */
  6. var FullCalendarRRule=function(e,r,t){"use strict";var n=function(){return(n=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var u in r=arguments[t])Object.prototype.hasOwnProperty.call(r,u)&&(e[u]=r[u]);return e}).apply(this,arguments)},u={rrule:r.identity,duration:r.createDuration},a={parse:function(e,r){if(null!=e.rrule){var u=function(e,r){var u,a=null;if("string"==typeof e){var l=function(e,r){var t=null;function n(e,n,u){var a=r.parse(u);return a?(a.isTimeUnspecified&&(t=!0),n+a.marker.toISOString().replace(/[-:]/g,"").replace(".000","")):e}return{outStr:e=(e=e.replace(/\b(DTSTART:)([^\n]*)/,n)).replace(/\b(UNTIL=)([^;]*)/,n),isTimeUnspecified:t}}(e,r);u=t.rrulestr(l.outStr),a=l.isTimeUnspecified}else if("object"==typeof e&&e){var s=n({},e);if("string"==typeof s.dtstart){var f=r.createMarkerMeta(s.dtstart);f?(s.dtstart=f.marker,a=f.isTimeUnspecified):delete s.dtstart}"string"==typeof s.until&&(s.until=r.createMarker(s.until)),null!=s.freq&&(s.freq=i(s.freq)),null!=s.wkst?s.wkst=i(s.wkst):s.wkst=(r.weekDow-1+7)%7,null!=s.byweekday&&(s.byweekday=function(e){if(Array.isArray(e))return e.map(i);return i(e)}(s.byweekday)),u=new t.RRule(s)}if(u)return{rrule:u,allDayGuess:a};return null}(e.rrule,r);if(u)return{typeData:u.rrule,allDayGuess:u.allDayGuess,duration:e.duration}}return null},expand:function(e,r){return e.between(r.start,r.end,!0).filter((function(e){return e.valueOf()<r.end.valueOf()}))}},l=r.createPlugin({recurringTypes:[a],eventRefiners:u});function i(e){return"string"==typeof e?t.RRule[e.toUpperCase()]:e}return r.globalPlugins.push(l),e.default=l,e}({},FullCalendar,rrule);