[SPIP] v3.2.1-->v3.2.3
[lhc/web/www.git] / www / plugins-dist / organiseur / lib / fullcalendar / gcal.min.js
index bb18cc0..b0a949d 100644 (file)
@@ -1,6 +1,6 @@
 /*!
- * FullCalendar v3.5.1 Google Calendar Plugin
+ * FullCalendar v3.9.0
  * Docs & License: https://fullcalendar.io/
- * (c) 2017 Adam Shaw
+ * (c) 2018 Adam Shaw
  */
-!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){function r(e){var r;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(r=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(e))||(r=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(e))?decodeURIComponent(r[1]):void 0}function a(e,r){return e.replace(/(\?.*?)?(#|$)/,function(e,a,t){return(a?a+"&":"?")+r+t})}var t=e.fullCalendar,o=t.Promise,n=t.EventSource,l=t.JsonFeedEventSource,i=t.EventSourceParser,s=t.applyAll,c=n.extend({googleCalendarApiKey:null,googleCalendarId:null,googleCalendarError:null,ajaxSettings:null,fetch:function(r,a,t){var n=this,i=this.buildUrl(),c=this.buildRequestParams(r,a,t),u=this.ajaxSettings,d=u.success;return c?o.construct(function(r,a){e.ajax(e.extend({},l.AJAX_DEFAULTS,u,{url:i,data:c,success:function(t){var o,l;t.error?(n.reportError("Google Calendar API: "+t.error.message,t.error.errors),a()):t.items&&(o=n.gcalItemsToRawEventDefs(t.items,c.timeZone),l=s(d,this,[o].concat(Array.prototype.slice.call(arguments,1))),e.isArray(l)&&(o=l),r(n.parseEventDefs(o)))}}))}):o.reject()},gcalItemsToRawEventDefs:function(e,r){var a=this;return e.map(function(e){return a.gcalItemToRawEventDef(e,r)})},gcalItemToRawEventDef:function(e,r){var t=e.htmlLink||null;return t&&r&&(t=a(t,"ctz="+r)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:t,location:e.location,description:e.description}},buildUrl:function(){return c.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},buildRequestParams:function(r,a,t){var o,n=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return n?(r.hasZone()||(r=r.clone().utc().add(-1,"day")),a.hasZone()||(a=a.clone().utc().add(1,"day")),o=e.extend(this.ajaxSettings.data||{},{key:n,timeMin:r.format(),timeMax:a.format(),singleEvents:!0,maxResults:9999}),t&&"local"!==t&&(o.timeZone=t.replace(" ","_")),o):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},reportError:function(e,r){var a=this.calendar,o=a.opt("googleCalendarError"),n=r||[{message:e}];this.googleCalendarError&&this.googleCalendarError.apply(a,n),o&&o.apply(a,n),t.warn.apply(null,[e].concat(r||[]))},getPrimitive:function(){return this.googleCalendarId},applyManualRawProps:function(e){var a=n.prototype.applyManualRawProps.apply(this,arguments),t=e.googleCalendarId;return null==t&&e.url&&(t=r(e.url)),null!=t&&(this.googleCalendarId=t,a)},applyOtherRawProps:function(e){this.ajaxSettings=e}});c.API_BASE="https://www.googleapis.com/calendar/v3/calendars",c.allowRawProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0}),c.parse=function(e,r){var a;return"object"==typeof e?a=e:"string"==typeof e&&(a={url:e}),!!a&&n.parse.call(this,a,r)},i.registerClass(c),t.GcalEventSource=c});
\ No newline at end of file
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("fullcalendar"),require("jquery")):"function"==typeof define&&define.amd?define(["fullcalendar","jquery"],t):"object"==typeof exports?t(require("fullcalendar"),require("jquery")):t(e.FullCalendar,e.jQuery)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=266)}({1:function(t,r){t.exports=e},2:function(e,t){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};t.__extends=function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}},266:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(267);o.EventSourceParser.registerClass(n.default),o.GcalEventSource=n.default},267:function(e,t,r){function o(e){var t;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}function n(e,t){return e.replace(/(\?.*?)?(#|$)/,function(e,r,o){return(r?r+"&":"?")+t+o})}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),l=r(3),i=r(1),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.parse=function(e,t){var r;return"object"==typeof e?r=e:"string"==typeof e&&(r={url:e}),!!r&&i.EventSource.parse.call(this,r,t)},t.prototype.fetch=function(e,t,r){var o=this,n=this.buildUrl(),a=this.buildRequestParams(e,t,r),u=this.ajaxSettings||{},c=u.success;return a?(this.calendar.pushLoading(),i.Promise.construct(function(e,t){l.ajax(l.extend({},i.JsonFeedEventSource.AJAX_DEFAULTS,u,{url:n,data:a,success:function(r,n,u){var s,p;o.calendar.popLoading(),r.error?(o.reportError("Google Calendar API: "+r.error.message,r.error.errors),t()):r.items&&(s=o.gcalItemsToRawEventDefs(r.items,a.timeZone),p=i.applyAll(c,o,[r,n,u]),l.isArray(p)&&(s=p),e(o.parseEventDefs(s)))},error:function(e,r,n){o.reportError("Google Calendar network failure: "+r,[e,n]),o.calendar.popLoading(),t()}}))})):i.Promise.reject()},t.prototype.gcalItemsToRawEventDefs=function(e,t){var r=this;return e.map(function(e){return r.gcalItemToRawEventDef(e,t)})},t.prototype.gcalItemToRawEventDef=function(e,t){var r=e.htmlLink||null;return r&&t&&(r=n(r,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:r,location:e.location,description:e.description}},t.prototype.buildUrl=function(){return t.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},t.prototype.buildRequestParams=function(e,t,r){var o,n=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return n?(e.hasZone()||(e=e.clone().utc().add(-1,"day")),t.hasZone()||(t=t.clone().utc().add(1,"day")),o=l.extend(this.ajaxSettings.data||{},{key:n,timeMin:e.format(),timeMax:t.format(),singleEvents:!0,maxResults:9999}),r&&"local"!==r&&(o.timeZone=r.replace(" ","_")),o):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},t.prototype.reportError=function(e,t){var r=this.calendar,o=r.opt("googleCalendarError"),n=t||[{message:e}];this.googleCalendarError&&this.googleCalendarError.apply(r,n),o&&o.apply(r,n),i.warn.apply(null,[e].concat(t||[]))},t.prototype.getPrimitive=function(){return this.googleCalendarId},t.prototype.applyManualStandardProps=function(e){var t=i.EventSource.prototype.applyManualStandardProps.apply(this,arguments),r=e.googleCalendarId;return null==r&&e.url&&(r=o(e.url)),null!=r&&(this.googleCalendarId=r,t)},t.prototype.applyMiscProps=function(e){this.ajaxSettings||(this.ajaxSettings={}),l.extend(this.ajaxSettings,e)},t.API_BASE="https://www.googleapis.com/calendar/v3/calendars",t}(i.EventSource);t.default=u,u.defineStandardProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0})},3:function(e,r){e.exports=t}})});
\ No newline at end of file