@hebcal/rest-api 3.10.1 → 3.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/rest-api v3.10.1 */
1
+ /*! @hebcal/rest-api v3.10.2 */
2
2
  var hebcal__rest_api = (function (exports, core, leyn) {
3
3
  'use strict';
4
4
 
@@ -1920,10 +1920,12 @@ function formatLeyningResult(reading) {
1920
1920
  * @param {boolean} il
1921
1921
  * @param {string} tzid
1922
1922
  * @param {string} mainUrl
1923
+ * @param {string} utmSource
1924
+ * @param {string} utmMedium
1923
1925
  * @return {string[]}
1924
1926
  */
1925
1927
 
1926
- function getLinkAndGuid(ev, il, tzid, mainUrl) {
1928
+ function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {
1927
1929
  let link;
1928
1930
  let guid;
1929
1931
  const dt = ev.eventTime || ev.getDate().greg();
@@ -1935,11 +1937,11 @@ function getLinkAndGuid(ev, il, tzid, mainUrl) {
1935
1937
  const url0 = ev.url();
1936
1938
 
1937
1939
  if (url0) {
1938
- link = appendIsraelAndTracking(url0, il, 'shabbat1c', 'rss').replace(/&/g, '&');
1940
+ link = appendIsraelAndTracking(url0, il, utmSource, utmMedium).replace(/&/g, '&');
1939
1941
  guid = "".concat(url0, "#").concat(anchor);
1940
1942
  } else {
1941
1943
  const url1 = "".concat(mainUrl, "&dt=").concat(dtStr);
1942
- const url = appendIsraelAndTracking(url1, il, 'shabbat1c', 'rss').replace(/&/g, '&');
1944
+ const url = appendIsraelAndTracking(url1, il, utmSource, utmMedium).replace(/&/g, '&');
1943
1945
  guid = url1.replace(/&/g, '&') + "#".concat(anchor);
1944
1946
  link = "".concat(url, "#").concat(anchor);
1945
1947
  }
@@ -1989,7 +1991,7 @@ const localeToLg = {
1989
1991
  */
1990
1992
 
1991
1993
  function eventsToRss2(events, options) {
1992
- const dayFormat = new Intl.DateTimeFormat('en-US', {
1994
+ options.dayFormat = new Intl.DateTimeFormat('en-US', {
1993
1995
  weekday: 'long',
1994
1996
  day: '2-digit',
1995
1997
  month: 'long',
@@ -1997,18 +1999,19 @@ function eventsToRss2(events, options) {
1997
1999
  });
1998
2000
  const location = options.location;
1999
2001
  const mainUrl = options.mainUrl;
2000
- const evPubDate = options.evPubDate;
2001
- const buildDate = options.buildDate || new Date();
2002
+ const buildDate = options.buildDate = options.buildDate || new Date();
2002
2003
  const thisYear = buildDate.getFullYear();
2003
- const lastBuildDate = buildDate.toUTCString();
2004
+ const lastBuildDate = options.lastBuildDate = buildDate.toUTCString();
2004
2005
  const title = options.title || getCalendarTitle(events, options);
2005
2006
  const description = options.description || title;
2006
- const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), options.utmSource, options.utmMedium, options.utmCampaign).replace(/&/g, '&');
2007
+ const utmSource = options.utmSource || 'shabbat1c';
2008
+ const utmMedium = options.utmMedium || 'rss';
2009
+ const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), utmSource, utmMedium, options.utmCampaign).replace(/&/g, '&');
2007
2010
  const selfUrlEsc = options.selfUrl.replace(/&/g, '&');
2008
2011
  const lang = options.lang || localeToLg[options.locale] || options.locale || 'en-US';
2009
2012
  let str = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss version=\"2.0\" xmlns:geo=\"http://www.w3.org/2003/01/geo/wgs84_pos#\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n<channel>\n<title>".concat(title, "</title>\n<link>").concat(mainUrlEsc, "</link>\n<atom:link href=\"").concat(selfUrlEsc, "\" rel=\"self\" type=\"application/rss+xml\" />\n<description>").concat(description, "</description>\n<language>").concat(lang, "</language>\n<copyright>Copyright (c) ").concat(thisYear, " Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>").concat(lastBuildDate, "</lastBuildDate>\n");
2010
2013
  events.forEach(ev => {
2011
- str += eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl);
2014
+ str += eventToRssItem2(ev, options);
2012
2015
  });
2013
2016
  str += '</channel>\n</rss>\n';
2014
2017
  return str;
@@ -2035,6 +2038,16 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
2035
2038
 
2036
2039
  return lastBuildDate;
2037
2040
  }
2041
+ /**
2042
+ * @param {Event} ev
2043
+ * @param {HebrewCalendar.Options} options
2044
+ * @return {string}
2045
+ */
2046
+
2047
+
2048
+ function eventToRssItem2(ev, options) {
2049
+ return eventToRssItem(ev, options.evPubDate, options.lastBuildDate, options.dayFormat, options.location, options.mainUrl, options);
2050
+ }
2038
2051
  /**
2039
2052
  * @param {Event} ev
2040
2053
  * @param {boolean} evPubDate
@@ -2042,17 +2055,19 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
2042
2055
  * @param {Intl.DateTimeFormat} dayFormat
2043
2056
  * @param {Location} location
2044
2057
  * @param {string} mainUrl
2058
+ * @param {HebrewCalendar.Options} [options]
2045
2059
  * @return {string}
2046
2060
  */
2047
2061
 
2048
-
2049
- function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl) {
2062
+ function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, options) {
2050
2063
  let subj = ev.render();
2051
2064
  const evDate = ev.getDate().greg();
2052
2065
  const pubDate = getPubDate(ev, evPubDate, evDate, lastBuildDate);
2053
2066
  const il = location ? location.getIsrael() : false;
2054
2067
  const tzid = location ? location.getTzid() : 'UTC';
2055
- const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl);
2068
+ const utmSource = options && options.utmSource || 'shabbat1c';
2069
+ const utmMedium = options && options.utmMedium || 'rss';
2070
+ const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium);
2056
2071
  const link = linkGuid[0];
2057
2072
  const guid = linkGuid[1];
2058
2073
  const categories = getEventCategories(ev);
@@ -2141,6 +2156,7 @@ exports.eventToClassicApiObject = eventToClassicApiObject;
2141
2156
  exports.eventToCsv = eventToCsv;
2142
2157
  exports.eventToFullCalendar = eventToFullCalendar;
2143
2158
  exports.eventToRssItem = eventToRssItem;
2159
+ exports.eventToRssItem2 = eventToRssItem2;
2144
2160
  exports.eventsToClassicApi = eventsToClassicApi;
2145
2161
  exports.eventsToCsv = eventsToCsv;
2146
2162
  exports.eventsToRss = eventsToRss;
@@ -1,2 +1,2 @@
1
- /*! @hebcal/rest-api v3.10.1 */
2
- var hebcal__rest_api=function(e,t,a){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var r=n(hebcal__leyning),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=function(e){return e&&e.Math==Math&&e},s=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof o&&o)||function(){return this}()||Function("return this")(),h={},c=function(e){try{return!!e()}catch(e){return!0}},l=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=Function.prototype.call,d=u.bind?u.bind(u):function(){return u.apply(u,arguments)},f={},m={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b=g&&!m.call({1:2},1);f.f=b?function(e){var t=g(this,e);return!!t&&t.enumerable}:m;var y,p,S=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,w=v.bind,A=v.call,H=w&&w.bind(A),T=w?function(e){return e&&H(A,e)}:function(e){return e&&function(){return A.apply(e,arguments)}},C=T,I=C({}.toString),R=C("".slice),O=function(e){return R(I(e),8,-1)},E=T,M=c,B=O,D=s.Object,P=E("".split),k=M((function(){return!D("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?P(e,""):D(e)}:D,F=s.TypeError,N=function(e){if(null==e)throw F("Can't call method on "+e);return e},x=k,L=N,G=function(e){return x(L(e))},j=function(e){return"function"==typeof e},Y=j,_=function(e){return"object"==typeof e?null!==e:Y(e)},U=s,z=j,K=function(e){return z(e)?e:void 0},J=function(e,t){return arguments.length<2?K(U[e]):U[e]&&U[e][t]},Z=T({}.isPrototypeOf),W=s,V=J("navigator","userAgent")||"",$=W.process,q=W.Deno,Q=$&&$.versions||q&&q.version,X=Q&&Q.v8;X&&(p=(y=X.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!p&&V&&(!(y=V.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=V.match(/Chrome\/(\d+)/))&&(p=+y[1]);var ee=p,te=c,ae=!!Object.getOwnPropertySymbols&&!te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ee&&ee<41})),ne=ae&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,re=J,oe=j,ie=Z,se=ne,he=s.Object,ce=se?function(e){return"symbol"==typeof e}:function(e){var t=re("Symbol");return oe(t)&&ie(t.prototype,he(e))},le=s.String,ue=j,de=function(e){try{return le(e)}catch(e){return"Object"}},fe=s.TypeError,me=function(e){if(ue(e))return e;throw fe(de(e)+" is not a function")},ge=d,be=j,ye=_,pe=s.TypeError,Se={exports:{}},ve=s,we=Object.defineProperty,Ae=function(e,t){try{we(ve,e,{value:t,configurable:!0,writable:!0})}catch(a){ve[e]=t}return t},He=Ae,Te="__core-js_shared__",Ce=s[Te]||He(Te,{}),Ie=Ce;(Se.exports=function(e,t){return Ie[e]||(Ie[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Re=N,Oe=s.Object,Ee=function(e){return Oe(Re(e))},Me=T({}.hasOwnProperty),Be=Object.hasOwn||function(e,t){return Me(Ee(e),t)},De=T,Pe=0,ke=Math.random(),Fe=De(1..toString),Ne=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Fe(++Pe+ke,36)},xe=s,Le=Se.exports,Ge=Be,je=Ne,Ye=ae,_e=ne,Ue=Le("wks"),ze=xe.Symbol,Ke=ze&&ze.for,Je=_e?ze:ze&&ze.withoutSetter||je,Ze=function(e){if(!Ge(Ue,e)||!Ye&&"string"!=typeof Ue[e]){var t="Symbol."+e;Ye&&Ge(ze,e)?Ue[e]=ze[e]:Ue[e]=_e&&Ke?Ke(t):Je(t)}return Ue[e]},We=d,Ve=_,$e=ce,qe=function(e,t){var a=e[t];return null==a?void 0:me(a)},Qe=function(e,t){var a,n;if("string"===t&&be(a=e.toString)&&!ye(n=ge(a,e)))return n;if(be(a=e.valueOf)&&!ye(n=ge(a,e)))return n;if("string"!==t&&be(a=e.toString)&&!ye(n=ge(a,e)))return n;throw pe("Can't convert object to primitive value")},Xe=Ze,et=s.TypeError,tt=Xe("toPrimitive"),at=function(e,t){if(!Ve(e)||$e(e))return e;var a,n=qe(e,tt);if(n){if(void 0===t&&(t="default"),a=We(n,e,t),!Ve(a)||$e(a))return a;throw et("Can't convert object to primitive value")}return void 0===t&&(t="number"),Qe(e,t)},nt=ce,rt=function(e){var t=at(e,"string");return nt(t)?t:t+""},ot=_,it=s.document,st=ot(it)&&ot(it.createElement),ht=function(e){return st?it.createElement(e):{}},ct=ht,lt=!l&&!c((function(){return 7!=Object.defineProperty(ct("div"),"a",{get:function(){return 7}}).a})),ut=l,dt=d,ft=f,mt=S,gt=G,bt=rt,yt=Be,pt=lt,St=Object.getOwnPropertyDescriptor;h.f=ut?St:function(e,t){if(e=gt(e),t=bt(t),pt)try{return St(e,t)}catch(e){}if(yt(e,t))return mt(!dt(ft.f,e,t),e[t])};var vt={},wt=s,At=_,Ht=wt.String,Tt=wt.TypeError,Ct=function(e){if(At(e))return e;throw Tt(Ht(e)+" is not an object")},It=l,Rt=lt,Ot=Ct,Et=rt,Mt=s.TypeError,Bt=Object.defineProperty;vt.f=It?Bt:function(e,t,a){if(Ot(e),t=Et(t),Ot(a),Rt)try{return Bt(e,t,a)}catch(e){}if("get"in a||"set"in a)throw Mt("Accessors not supported");return"value"in a&&(e[t]=a.value),e};var Dt=vt,Pt=S,kt=l?function(e,t,a){return Dt.f(e,t,Pt(1,a))}:function(e,t,a){return e[t]=a,e},Ft={exports:{}},Nt=j,xt=Ce,Lt=T(Function.toString);Nt(xt.inspectSource)||(xt.inspectSource=function(e){return Lt(e)});var Gt,jt,Yt,_t=xt.inspectSource,Ut=j,zt=_t,Kt=s.WeakMap,Jt=Ut(Kt)&&/native code/.test(zt(Kt)),Zt=Se.exports,Wt=Ne,Vt=Zt("keys"),$t=function(e){return Vt[e]||(Vt[e]=Wt(e))},qt={},Qt=Jt,Xt=s,ea=T,ta=_,aa=kt,na=Be,ra=Ce,oa=$t,ia=qt,sa="Object already initialized",ha=Xt.TypeError,ca=Xt.WeakMap;if(Qt||ra.state){var la=ra.state||(ra.state=new ca),ua=ea(la.get),da=ea(la.has),fa=ea(la.set);Gt=function(e,t){if(da(la,e))throw new ha(sa);return t.facade=e,fa(la,e,t),t},jt=function(e){return ua(la,e)||{}},Yt=function(e){return da(la,e)}}else{var ma=oa("state");ia[ma]=!0,Gt=function(e,t){if(na(e,ma))throw new ha(sa);return t.facade=e,aa(e,ma,t),t},jt=function(e){return na(e,ma)?e[ma]:{}},Yt=function(e){return na(e,ma)}}var ga={set:Gt,get:jt,has:Yt,enforce:function(e){return Yt(e)?jt(e):Gt(e,{})},getterFor:function(e){return function(t){var a;if(!ta(t)||(a=jt(t)).type!==e)throw ha("Incompatible receiver, "+e+" required");return a}}},ba=l,ya=Be,pa=Function.prototype,Sa=ba&&Object.getOwnPropertyDescriptor,va=ya(pa,"name"),wa=va&&"something"===function(){}.name,Aa=va&&(!ba||ba&&Sa(pa,"name").configurable),Ha=s,Ta=j,Ca=Be,Ia=kt,Ra=Ae,Oa=_t,Ea={EXISTS:va,PROPER:wa,CONFIGURABLE:Aa}.CONFIGURABLE,Ma=ga.get,Ba=ga.enforce,Da=String(String).split("String");(Ft.exports=function(e,t,a,n){var r,o=!!n&&!!n.unsafe,i=!!n&&!!n.enumerable,s=!!n&&!!n.noTargetGet,h=n&&void 0!==n.name?n.name:t;Ta(a)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ca(a,"name")||Ea&&a.name!==h)&&Ia(a,"name",h),(r=Ba(a)).source||(r.source=Da.join("string"==typeof h?h:""))),e!==Ha?(o?!s&&e[t]&&(i=!0):delete e[t],i?e[t]=a:Ia(e,t,a)):i?e[t]=a:Ra(t,a)})(Function.prototype,"toString",(function(){return Ta(this)&&Ma(this).source||Oa(this)}));var Pa={},ka=Math.ceil,Fa=Math.floor,Na=function(e){var t=+e;return t!=t||0===t?0:(t>0?Fa:ka)(t)},xa=Na,La=Math.max,Ga=Math.min,ja=Na,Ya=Math.min,_a=function(e){return e>0?Ya(ja(e),9007199254740991):0},Ua=G,za=function(e,t){var a=xa(e);return a<0?La(a+t,0):Ga(a,t)},Ka=function(e){return _a(e.length)},Ja=function(e){return function(t,a,n){var r,o=Ua(t),i=Ka(o),s=za(n,i);if(e&&a!=a){for(;i>s;)if((r=o[s++])!=r)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===a)return e||s||0;return!e&&-1}},Za={includes:Ja(!0),indexOf:Ja(!1)},Wa=Be,Va=G,$a=Za.indexOf,qa=qt,Qa=T([].push),Xa=function(e,t){var a,n=Va(e),r=0,o=[];for(a in n)!Wa(qa,a)&&Wa(n,a)&&Qa(o,a);for(;t.length>r;)Wa(n,a=t[r++])&&(~$a(o,a)||Qa(o,a));return o},en=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tn=Xa,an=en.concat("length","prototype");Pa.f=Object.getOwnPropertyNames||function(e){return tn(e,an)};var nn={};nn.f=Object.getOwnPropertySymbols;var rn=J,on=Pa,sn=nn,hn=Ct,cn=T([].concat),ln=rn("Reflect","ownKeys")||function(e){var t=on.f(hn(e)),a=sn.f;return a?cn(t,a(e)):t},un=Be,dn=ln,fn=h,mn=vt,gn=c,bn=j,yn=/#|\.prototype\./,pn=function(e,t){var a=vn[Sn(e)];return a==An||a!=wn&&(bn(t)?gn(t):!!t)},Sn=pn.normalize=function(e){return String(e).replace(yn,".").toLowerCase()},vn=pn.data={},wn=pn.NATIVE="N",An=pn.POLYFILL="P",Hn=pn,Tn=s,Cn=h.f,In=kt,Rn=Ft.exports,On=Ae,En=function(e,t){for(var a=dn(t),n=mn.f,r=fn.f,o=0;o<a.length;o++){var i=a[o];un(e,i)||n(e,i,r(t,i))}},Mn=Hn,Bn={};Bn[Ze("toStringTag")]="z";var Dn,Pn=s,kn="[object z]"===String(Bn),Fn=j,Nn=O,xn=Ze("toStringTag"),Ln=Pn.Object,Gn="Arguments"==Nn(function(){return arguments}()),jn=kn?Nn:function(e){var t,a,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=Ln(e),xn))?a:Gn?Nn(t):"Object"==(n=Nn(t))&&Fn(t.callee)?"Arguments":n},Yn=s.String,_n=Ct,Un=c,zn=s.RegExp,Kn=Un((function(){var e=zn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Jn=Kn||Un((function(){return!zn("a","y").sticky})),Zn={BROKEN_CARET:Kn||Un((function(){var e=zn("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Jn,UNSUPPORTED_Y:Kn},Wn=Xa,Vn=en,$n=Object.keys||function(e){return Wn(e,Vn)},qn=vt,Qn=Ct,Xn=G,er=$n,tr=l?Object.defineProperties:function(e,t){Qn(e);for(var a,n=Xn(t),r=er(t),o=r.length,i=0;o>i;)qn.f(e,a=r[i++],n[a]);return e},ar=J("document","documentElement"),nr=Ct,rr=tr,or=en,ir=qt,sr=ar,hr=ht,cr=$t("IE_PROTO"),lr=function(){},ur=function(e){return"<script>"+e+"</"+"script>"},dr=function(e){e.write(ur("")),e.close();var t=e.parentWindow.Object;return e=null,t},fr=function(){try{Dn=new ActiveXObject("htmlfile")}catch(e){}var e,t;fr="undefined"!=typeof document?document.domain&&Dn?dr(Dn):((t=hr("iframe")).style.display="none",sr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ur("document.F=Object")),e.close(),e.F):dr(Dn);for(var a=or.length;a--;)delete fr.prototype[or[a]];return fr()};ir[cr]=!0;var mr,gr,br=Object.create||function(e,t){var a;return null!==e?(lr.prototype=nr(e),a=new lr,lr.prototype=null,a[cr]=e):a=fr(),void 0===t?a:rr(a,t)},yr=c,pr=s.RegExp,Sr=yr((function(){var e=pr(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),vr=c,wr=s.RegExp,Ar=vr((function(){var e=wr("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Hr=d,Tr=T,Cr=function(e){if("Symbol"===jn(e))throw TypeError("Cannot convert a Symbol value to a string");return Yn(e)},Ir=function(){var e=_n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Rr=Zn,Or=Se.exports,Er=br,Mr=ga.get,Br=Sr,Dr=Ar,Pr=Or("native-string-replace",String.prototype.replace),kr=RegExp.prototype.exec,Fr=kr,Nr=Tr("".charAt),xr=Tr("".indexOf),Lr=Tr("".replace),Gr=Tr("".slice),jr=(gr=/b*/g,Hr(kr,mr=/a/,"a"),Hr(kr,gr,"a"),0!==mr.lastIndex||0!==gr.lastIndex),Yr=Rr.BROKEN_CARET,_r=void 0!==/()??/.exec("")[1];(jr||_r||Yr||Br||Dr)&&(Fr=function(e){var t,a,n,r,o,i,s,h=this,c=Mr(h),l=Cr(e),u=c.raw;if(u)return u.lastIndex=h.lastIndex,t=Hr(Fr,u,l),h.lastIndex=u.lastIndex,t;var d=c.groups,f=Yr&&h.sticky,m=Hr(Ir,h),g=h.source,b=0,y=l;if(f&&(m=Lr(m,"y",""),-1===xr(m,"g")&&(m+="g"),y=Gr(l,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==Nr(l,h.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,b++),a=new RegExp("^(?:"+g+")",m)),_r&&(a=new RegExp("^"+g+"$(?!\\s)",m)),jr&&(n=h.lastIndex),r=Hr(kr,f?a:h,y),f?r?(r.input=Gr(r.input,b),r[0]=Gr(r[0],b),r.index=h.lastIndex,h.lastIndex+=r[0].length):h.lastIndex=0:jr&&r&&(h.lastIndex=h.global?r.index+r[0].length:n),_r&&r&&r.length>1&&Hr(Pr,r[0],a,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r&&d)for(r.groups=i=Er(null),o=0;o<d.length;o++)i[(s=d[o])[0]]=r[s[1]];return r});(function(e,t){var a,n,r,o,i,s=e.target,h=e.global,c=e.stat;if(a=h?Tn:c?Tn[s]||On(s,{}):(Tn[s]||{}).prototype)for(n in t){if(o=t[n],r=e.noTargetGet?(i=Cn(a,n))&&i.value:a[n],!Mn(h?n:s+(c?".":"#")+n,e.forced)&&void 0!==r){if(typeof o==typeof r)continue;En(o,r)}(e.sham||r&&r.sham)&&In(o,"sham",!0),Rn(a,n,o,e)}})({target:"RegExp",proto:!0,forced:/./.exec!==Fr},{exec:Fr});var Ur={"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:"Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights","Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:"Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt","Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:"Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination","Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":'Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes "Adar Bet" or "Adar Sheni", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon',"Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:"Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai","Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:"Ethiopian Jewish holiday occurring 50 days after Yom Kippur","Simchat Torah":"Day of Celebrating the Torah",Sukkot:"Feast of Booths","Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Note that Hebcal displays modern holidays like Yom HaAtzma'ut according to the Israeli schedule. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Note that Hebcal displays modern holidays like Yom HaZikaron according to the Israeli schedule. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};function zr(e){return e.toLowerCase().replace(/'/g,"").replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-/g,"").replace(/-$/g,"")}function Kr(e){return e<10?"0"+e:String(e)}function Jr(e){return e<0?"-00"+Jr(-e):e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:String(e)}function Zr(e){return Jr(e.getFullYear())+"-"+Kr(e.getMonth()+1)+"-"+Kr(e.getDate())}function Wr(e){const a=e.getDesc();if("Fast begins"===a||"Fast ends"===a)return["zmanim","fast"];switch(e.getFlags()){case t.flags.OMER_COUNT:return["omer"];case t.flags.HEBREW_DATE:return["hebdate"];case t.flags.PARSHA_HASHAVUA:return["parashat"];case t.flags.DAF_YOMI:return["dafyomi"];case t.flags.ROSH_CHODESH:return["roshchodesh"];case t.flags.SPECIAL_SHABBAT:return["holiday","shabbat"];case t.flags.MINOR_FAST:return["holiday","fast"];case t.flags.MAJOR_FAST:return["holiday","fast","major"];case t.flags.MODERN_HOLIDAY:return["holiday","modern"];case t.flags.SHABBAT_MEVARCHIM:return["mevarchim"];case t.flags.MOLAD:return["molad"];case t.flags.USER_EVENT:return["user"];case t.flags.MINOR_HOLIDAY:return["holiday","minor"]}if(e.cholHaMoedDay)return["holiday","major","cholhamoed"];switch(a){case"Havdalah":return["havdalah"];case"Candle lighting":return["candles"];case"Lag BaOmer":case"Leil Selichot":case"Pesach Sheni":case"Erev Purim":case"Purim Katan":case"Shushan Purim":case"Tu B'Av":case"Tu BiShvat":case"Rosh Hashana LaBehemot":return["holiday","minor"];case"Erev Tish'a B'Av":return["holiday","fast","major"];default:return["holiday","major"]}}function Vr(e,t){let a="Hebcal";const n=t.location;if(t.yahrzeit)a+=" Yahrzeits and Anniversaries";else if(n&&n.name){const e=n.name.indexOf(",");a+=" "+(-1==e?n.name:n.name.substring(0,e))}else t.il?a+=" Israel":a+=" Diaspora";if("1"==t.subscribe)return a;if(t.isHebrewYear||0==e.length)a+=" "+t.year;else{const t=e[0].getDate().greg(),n=e[e.length-1].getDate().greg();if(t.getFullYear()!=n.getFullYear())a+=" "+t.getFullYear()+"-"+n.getFullYear();else if(t.getMonth()==n.getMonth()){a+=" "+new Intl.DateTimeFormat("en-US",{month:"long"}).format(t)+" "+t.getFullYear()}else a+=" "+t.getFullYear()}return a}function $r(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a=Ur[e.getDesc()]||Ur[e.basename()]||"";if(t&&a){const e=a.indexOf(".");if(-1!=e)return a.substring(0,e)}return a}const qr=t.flags.DAF_YOMI|t.flags.OMER_COUNT|t.flags.SHABBAT_MEVARCHIM|t.flags.MOLAD|t.flags.USER_EVENT|t.flags.HEBREW_DATE;function Qr(e,a){const n=e.getFlags();if(n&qr)return"";const o=n&t.flags.PARSHA_HASHAVUA?r.getLeyningForParshaHaShavua(e,a):r.getLeyningForHoliday(e,a);let i="";return o&&(o.summary||o.haftara)&&(o.summary&&(i+="Torah: ".concat(o.summary)),o.summary&&o.haftara&&(i+="\n"),o.haftara&&(i+="Haftarah: "+o.haftara,o.reason&&o.reason.haftara&&(i+=" | "+o.reason.haftara))),o&&o.sephardic&&(i+="\nHaftarah for Sephardim: "+o.sephardic),i}function Xr(e,t,a,n,r){"https://www.hebcal.com"!==e.substring(0,22)?a="hebcal.com":t&&-1===e.indexOf("?")&&(e+="?i=on");const o=-1===e.indexOf("?")?"?":"&";return e+o+"utm_source=".concat(a,"&utm_medium=").concat(n)+(r?"&utm_campaign=".concat(r):"")}function eo(e){if(void 0!==e.eventTime)return!0;const a=e.getFlags();if(a&t.flags.HEBREW_DATE){return 1!==e.getDate().getDate()}return!!(a&t.flags.DAF_YOMI)}const to='"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"',ao={dafyomi:"Daf Yomi",hebdate:"Hebrew Date",holiday:"Jewish Holidays",mevarchim:null,molad:null,omer:null,parashat:"Torah Reading",roshchodesh:"Jewish Holidays",user:"Personal"};function no(e,a){const n=e.getDate().greg(),r=n.getDate(),o=n.getMonth()+1,i=String(n.getFullYear()).padStart(4,"0"),s=a.euro?'"'.concat(r,"/").concat(o,"/").concat(i,'"'):'"'.concat(o,"/").concat(r,"/").concat(i,'"');let h="",c="",l="",u='"true"';const d=Boolean(e.eventTime);let f=eo(e)?e.renderBrief(a.locale):e.render(a.locale);if(e.eventTime){const n=t.HebrewCalendar.reformatTimeStr(e.eventTimeStr," PM",a);c=h='"'.concat(n,'"'),l=s,u='"false"'}let m="Jewish Holidays";const g=e.getFlags();if(d&&a.location&&a.location.name){const e=a.location.name,t=e.indexOf(",");m=-1===t?e:e.substring(0,t)}else if(g&t.flags.DAF_YOMI){const e=f.indexOf(": ");-1!=e&&(m=f.substring(0,e),f=f.substring(e+2))}else{const t=ao[Wr(e)[0]];t&&(m=t)}if(f=f.replace(/,/g,"").replace(/"/g,"''"),a.appendHebrewToSubject){const t=e.renderBrief("he");t&&(f+=" / ".concat(t))}let b=e.memo||$r(e,!0);b||void 0===e.linkedEvent||(b=e.linkedEvent.render(a.locale));const y=b.replace(/,/g,";").replace(/"/g,"''"),p=d||g&t.flags.CHAG?4:3;return'"'.concat(f,'",').concat(s,",").concat(h,",").concat(l,",").concat(c,",").concat(u,',"').concat(y,'","').concat(p,'","').concat(m,'"')}var ro={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curacao",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GE:"Georgia",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MP:"Northern Mariana Islands",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PR:"Puerto Rico",PT:"Portugal",PY:"Paraguay",QA:"Qatar",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SK:"Slovakia",SL:"Sierra Leone",SN:"Senegal",SO:"Somalia",SR:"Suriname",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syria",SZ:"Swaziland",TC:"Turks and Caicos Islands",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TM:"Turkmenistan",TN:"Tunisia",TR:"Turkey",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VN:"Vietnam",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"};function oo(e,a){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=Boolean(e.eventTime),i=e.getDate(),s=i.greg(),h="object"==typeof a.location?a.location.getTzid():"UTC",c=o?t.Zmanim.formatISOWithTimeZone(h,e.eventTime):Zr(s),l=Wr(e),u=e.getFlags();let d=eo(e)?e.renderBrief(a.locale):e.render(a.locale);const f=e.getDesc(),m="Havdalah"===f||"Candle lighting"===f;if(m){d+=": "+t.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",a)}const g={title:d,date:c,category:l[0]};l.length>1&&(g.subcat=l[1]),"holiday"===l[0]&&u&t.flags.CHAG&&(g.yomtov=!0),d!=f&&(g.title_orig=f);const b=e.renderBrief("he");if(b&&(g.hebrew=t.Locale.hebrewStripNikkud(b)),!m){if(n){const n=a.il,o=u===t.flags.PARSHA_HASHAVUA,s=o?r.getLeyningForParshaHaShavua(e,n):r.getLeyningForHoliday(e,n);if(s){g.leyning=so(s);const t=i.getFullYear();if(o&&!n&&t>=5745&&t<=5830){const t=r.getTriennialForParshaHaShavua(e);t&&(g.leyning.triennial=io({},t))}}}const o=e.url();if(o){const e=a.utmSource||"js",t=a.utmMedium||"api",n=a.utmCampaign;g.link=Xr(o,a.il,e,t,n)}}const y=e.memo||Ur[e.basename()];return y?g.memo=y:void 0!==e.linkedEvent&&(g.memo=e.linkedEvent.render(a.locale)),g}function io(e,t){return Object.keys(t).forEach((a=>{const n=t[a];if(void 0!==n){e["M"==a?"maftir":a]=r.formatAliyahWithBook(n)}})),e}function so(e){const t={};return e.summary&&(t.torah=e.summary),e.haftara&&(t.haftarah=e.haftara),e.sephardic&&(t.haftarah_sephardic=e.sephardic),e.fullkriyah&&io(t,e.fullkriyah),e.reason&&(["7","8","M"].forEach((a=>{if(e.reason[a]){t["M"==a?"maftir":a]+=" | "+e.reason[a]}})),e.reason.haftara&&(t.haftarah+=" | "+e.reason.haftara)),t}const ho={s:"en",a:"en","he-x-NoNikud":"he",h:"he",ah:"en",sh:"en"};function co(e,t){const a=new Intl.DateTimeFormat("en-US",{weekday:"long",day:"2-digit",month:"long",year:"numeric"}),n=t.location,r=t.mainUrl,o=t.evPubDate,i=t.buildDate||new Date,s=i.getFullYear(),h=i.toUTCString(),c=t.title||Vr(e,t),l=t.description||c,u=Xr(r,n&&n.getIsrael(),t.utmSource,t.utmMedium,t.utmCampaign).replace(/&/g,"&amp;"),d=t.selfUrl.replace(/&/g,"&amp;"),f=t.lang||ho[t.locale]||t.locale||"en-US";let m='<?xml version="1.0" encoding="UTF-8"?>\n<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:atom="http://www.w3.org/2005/Atom">\n<channel>\n<title>'.concat(c,"</title>\n<link>").concat(u,'</link>\n<atom:link href="').concat(d,'" rel="self" type="application/rss+xml" />\n<description>').concat(l,"</description>\n<language>").concat(f,"</language>\n<copyright>Copyright (c) ").concat(s," Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>").concat(h,"</lastBuildDate>\n");return e.forEach((e=>{m+=lo(e,o,h,a,n,r)})),m+="</channel>\n</rss>\n",m}function lo(e,a,n,r,o,i){let s=e.render();const h=e.getDate().greg(),c=function(e,t,a,n){if(t){const t=e.eventTime;return t?t.toUTCString():a.toUTCString().replace(/ \S+ GMT$/," 00:00:00 GMT")}return n}(e,a,h,n),l=!!o&&o.getIsrael(),u=function(e,a,n,r){let o,i;const s=e.eventTime||e.getDate().greg(),h=t.Zmanim.formatISOWithTimeZone(n,s),c=h.substring(0,h.indexOf("T")),l=c.replace(/-/g,""),u=zr(e.getDesc()),d="".concat(l,"-").concat(u),f=e.url();if(f)o=Xr(f,a,"shabbat1c","rss").replace(/&/g,"&amp;"),i="".concat(f,"#").concat(d);else{const e="".concat(r,"&dt=").concat(c),t=Xr(e,a,"shabbat1c","rss").replace(/&/g,"&amp;");i=e.replace(/&/g,"&amp;")+"#".concat(d),o="".concat(t,"#").concat(d)}return[o,i]}(e,l,o?o.getTzid():"UTC",i),d=u[0],f=u[1],m=Wr(e)[0],g=e.getDesc();let b;if("Havdalah"===g||"Candle lighting"===g){const a=s.indexOf(": ");if(-1!=a){const n={location:o,il:l,locale:t.Locale.getLocaleName()},r=t.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",n);s=s.substring(0,a)+": "+r}}else b=e.getFlags()&t.flags.PARSHA_HASHAVUA?Qr(e,l):e.memo||Ur[e.basename()];const y=b||r.format(h),p="candles"==m?"<geo:lat>".concat(o.getLatitude(),"</geo:lat>\n<geo:long>").concat(o.getLongitude(),"</geo:long>\n"):"";return"<item>\n<title>".concat(s,"</title>\n<link>").concat(d,'</link>\n<guid isPermaLink="false">').concat(f,"</guid>\n<description>").concat(y,"</description>\n<category>").concat(m,"</category>\n<pubDate>").concat(c,"</pubDate>\n").concat(p,"</item>\n")}return e.appendIsraelAndTracking=Xr,e.countryNames=ro,e.eventToClassicApiObject=oo,e.eventToCsv=no,e.eventToFullCalendar=function(e,a,n){const r=Wr(e),o=e.getFlags();"holiday"==r[0]&&o&t.flags.CHAG&&r.push("yomtov");const i=Boolean(e.eventTime),s={title:eo(e)?e.renderBrief():e.render(),start:i?t.Zmanim.formatISOWithTimeZone(a,e.eventTime):Zr(e.getDate().greg()),allDay:!i,className:r.join(" ")},h=e.renderBrief("he");h&&(s.hebrew=t.Locale.hebrewStripNikkud(h));const c=e.url();c&&(s.url=Xr(c,n,"js","fc"));const l=e.getDesc();if(!("Havdalah"===l||"Candle lighting"===l)){const a=o&t.flags.PARSHA_HASHAVUA?Qr(e,n):e.memo||Ur[e.basename()];a?s.description=a:void 0!==e.linkedEvent&&(s.description=e.linkedEvent.render())}return s},e.eventToRssItem=lo,e.eventsToClassicApi=function(e,t){let a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n={title:Vr(e,t),date:(new Date).toISOString()},r=t.location;return"object"==typeof r&&"string"==typeof r.name?(n.location={title:r.getName(),city:r.getShortName(),tzid:r.getTzid(),latitude:r.getLatitude(),longitude:r.getLongitude(),cc:r.getCountryCode(),country:ro[r.getCountryCode()]},["admin1","asciiname","geo","zip","state","geonameid"].forEach((e=>{r[e]&&(n.location[e]=r[e])}))):n.location={geo:"none"},n.items=e.map((e=>oo(e,t,a))),n},e.eventsToCsv=function(e,t){return[to].concat(e.map((e=>no(e,t)))).join("\r\n")+"\r\n"},e.eventsToRss=function(e,a,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US",i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];const s=a.getName(),h={location:a,mainUrl:n,selfUrl:r,lang:o,evPubDate:i,title:t.Locale.gettext("Shabbat")+" Times for ".concat(s),description:"Weekly Shabbat candle lighting times for ".concat(s),utmSource:"shabbat1c",utmMedium:"rss"};return co(e,h)},e.eventsToRss2=co,e.getCalendarTitle=Vr,e.getDownloadFilename=function(e){let t="hebcal_"+e.year;if(e.isHebrewYear&&(t+="h"),e.month&&(t+="_"+e.month),e.location){t+="_"+zr(e.location.zip||e.location.asciiname||e.location.getShortName()).replace(/[-]/g,"_")}return t},e.getEventCategories=Wr,e.getHolidayDescription=$r,e.holidayDescription=Ur,e.makeAnchor=zr,e.makeTorahMemoText=Qr,e.pad2=Kr,e.pad4=Jr,e.renderTitleWithoutTime=function(e){return void 0===e.eventTime?e.render():e.renderBrief()},e.shouldRenderBrief=eo,e.timeZoneOffsetStr=function(e,a){return t.Zmanim.timeZoneOffset(e,a)},e.toISOString=Zr,e.toISOStringWithTimezone=function(e,a,n){const r=Zr(e);return a?r+"T"+a+":00"+t.Zmanim.timeZoneOffset(n,e):r},Object.defineProperty(e,"__esModule",{value:!0}),e}({},hebcal);
1
+ /*! @hebcal/rest-api v3.10.2 */
2
+ var hebcal__rest_api=function(e,t,a){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var r=n(hebcal__leyning),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=function(e){return e&&e.Math==Math&&e},s=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof o&&o)||function(){return this}()||Function("return this")(),h={},c=function(e){try{return!!e()}catch(e){return!0}},l=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=Function.prototype.call,d=u.bind?u.bind(u):function(){return u.apply(u,arguments)},f={},m={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,b=g&&!m.call({1:2},1);f.f=b?function(e){var t=g(this,e);return!!t&&t.enumerable}:m;var y,p,S=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,w=v.bind,A=v.call,T=w&&w.bind(A),H=w?function(e){return e&&T(A,e)}:function(e){return e&&function(){return A.apply(e,arguments)}},C=H,I=C({}.toString),R=C("".slice),O=function(e){return R(I(e),8,-1)},M=H,E=c,D=O,B=s.Object,P=M("".split),F=E((function(){return!B("z").propertyIsEnumerable(0)}))?function(e){return"String"==D(e)?P(e,""):B(e)}:B,k=s.TypeError,N=function(e){if(null==e)throw k("Can't call method on "+e);return e},x=F,L=N,G=function(e){return x(L(e))},j=function(e){return"function"==typeof e},Y=j,_=function(e){return"object"==typeof e?null!==e:Y(e)},U=s,z=j,K=function(e){return z(e)?e:void 0},J=function(e,t){return arguments.length<2?K(U[e]):U[e]&&U[e][t]},Z=H({}.isPrototypeOf),W=s,V=J("navigator","userAgent")||"",$=W.process,q=W.Deno,Q=$&&$.versions||q&&q.version,X=Q&&Q.v8;X&&(p=(y=X.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!p&&V&&(!(y=V.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=V.match(/Chrome\/(\d+)/))&&(p=+y[1]);var ee=p,te=c,ae=!!Object.getOwnPropertySymbols&&!te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ee&&ee<41})),ne=ae&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,re=J,oe=j,ie=Z,se=ne,he=s.Object,ce=se?function(e){return"symbol"==typeof e}:function(e){var t=re("Symbol");return oe(t)&&ie(t.prototype,he(e))},le=s.String,ue=j,de=function(e){try{return le(e)}catch(e){return"Object"}},fe=s.TypeError,me=function(e){if(ue(e))return e;throw fe(de(e)+" is not a function")},ge=d,be=j,ye=_,pe=s.TypeError,Se={exports:{}},ve=s,we=Object.defineProperty,Ae=function(e,t){try{we(ve,e,{value:t,configurable:!0,writable:!0})}catch(a){ve[e]=t}return t},Te=Ae,He="__core-js_shared__",Ce=s[He]||Te(He,{}),Ie=Ce;(Se.exports=function(e,t){return Ie[e]||(Ie[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Re=N,Oe=s.Object,Me=function(e){return Oe(Re(e))},Ee=H({}.hasOwnProperty),De=Object.hasOwn||function(e,t){return Ee(Me(e),t)},Be=H,Pe=0,Fe=Math.random(),ke=Be(1..toString),Ne=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ke(++Pe+Fe,36)},xe=s,Le=Se.exports,Ge=De,je=Ne,Ye=ae,_e=ne,Ue=Le("wks"),ze=xe.Symbol,Ke=ze&&ze.for,Je=_e?ze:ze&&ze.withoutSetter||je,Ze=function(e){if(!Ge(Ue,e)||!Ye&&"string"!=typeof Ue[e]){var t="Symbol."+e;Ye&&Ge(ze,e)?Ue[e]=ze[e]:Ue[e]=_e&&Ke?Ke(t):Je(t)}return Ue[e]},We=d,Ve=_,$e=ce,qe=function(e,t){var a=e[t];return null==a?void 0:me(a)},Qe=function(e,t){var a,n;if("string"===t&&be(a=e.toString)&&!ye(n=ge(a,e)))return n;if(be(a=e.valueOf)&&!ye(n=ge(a,e)))return n;if("string"!==t&&be(a=e.toString)&&!ye(n=ge(a,e)))return n;throw pe("Can't convert object to primitive value")},Xe=Ze,et=s.TypeError,tt=Xe("toPrimitive"),at=function(e,t){if(!Ve(e)||$e(e))return e;var a,n=qe(e,tt);if(n){if(void 0===t&&(t="default"),a=We(n,e,t),!Ve(a)||$e(a))return a;throw et("Can't convert object to primitive value")}return void 0===t&&(t="number"),Qe(e,t)},nt=ce,rt=function(e){var t=at(e,"string");return nt(t)?t:t+""},ot=_,it=s.document,st=ot(it)&&ot(it.createElement),ht=function(e){return st?it.createElement(e):{}},ct=ht,lt=!l&&!c((function(){return 7!=Object.defineProperty(ct("div"),"a",{get:function(){return 7}}).a})),ut=l,dt=d,ft=f,mt=S,gt=G,bt=rt,yt=De,pt=lt,St=Object.getOwnPropertyDescriptor;h.f=ut?St:function(e,t){if(e=gt(e),t=bt(t),pt)try{return St(e,t)}catch(e){}if(yt(e,t))return mt(!dt(ft.f,e,t),e[t])};var vt={},wt=s,At=_,Tt=wt.String,Ht=wt.TypeError,Ct=function(e){if(At(e))return e;throw Ht(Tt(e)+" is not an object")},It=l,Rt=lt,Ot=Ct,Mt=rt,Et=s.TypeError,Dt=Object.defineProperty;vt.f=It?Dt:function(e,t,a){if(Ot(e),t=Mt(t),Ot(a),Rt)try{return Dt(e,t,a)}catch(e){}if("get"in a||"set"in a)throw Et("Accessors not supported");return"value"in a&&(e[t]=a.value),e};var Bt=vt,Pt=S,Ft=l?function(e,t,a){return Bt.f(e,t,Pt(1,a))}:function(e,t,a){return e[t]=a,e},kt={exports:{}},Nt=j,xt=Ce,Lt=H(Function.toString);Nt(xt.inspectSource)||(xt.inspectSource=function(e){return Lt(e)});var Gt,jt,Yt,_t=xt.inspectSource,Ut=j,zt=_t,Kt=s.WeakMap,Jt=Ut(Kt)&&/native code/.test(zt(Kt)),Zt=Se.exports,Wt=Ne,Vt=Zt("keys"),$t=function(e){return Vt[e]||(Vt[e]=Wt(e))},qt={},Qt=Jt,Xt=s,ea=H,ta=_,aa=Ft,na=De,ra=Ce,oa=$t,ia=qt,sa="Object already initialized",ha=Xt.TypeError,ca=Xt.WeakMap;if(Qt||ra.state){var la=ra.state||(ra.state=new ca),ua=ea(la.get),da=ea(la.has),fa=ea(la.set);Gt=function(e,t){if(da(la,e))throw new ha(sa);return t.facade=e,fa(la,e,t),t},jt=function(e){return ua(la,e)||{}},Yt=function(e){return da(la,e)}}else{var ma=oa("state");ia[ma]=!0,Gt=function(e,t){if(na(e,ma))throw new ha(sa);return t.facade=e,aa(e,ma,t),t},jt=function(e){return na(e,ma)?e[ma]:{}},Yt=function(e){return na(e,ma)}}var ga={set:Gt,get:jt,has:Yt,enforce:function(e){return Yt(e)?jt(e):Gt(e,{})},getterFor:function(e){return function(t){var a;if(!ta(t)||(a=jt(t)).type!==e)throw ha("Incompatible receiver, "+e+" required");return a}}},ba=l,ya=De,pa=Function.prototype,Sa=ba&&Object.getOwnPropertyDescriptor,va=ya(pa,"name"),wa=va&&"something"===function(){}.name,Aa=va&&(!ba||ba&&Sa(pa,"name").configurable),Ta=s,Ha=j,Ca=De,Ia=Ft,Ra=Ae,Oa=_t,Ma={EXISTS:va,PROPER:wa,CONFIGURABLE:Aa}.CONFIGURABLE,Ea=ga.get,Da=ga.enforce,Ba=String(String).split("String");(kt.exports=function(e,t,a,n){var r,o=!!n&&!!n.unsafe,i=!!n&&!!n.enumerable,s=!!n&&!!n.noTargetGet,h=n&&void 0!==n.name?n.name:t;Ha(a)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ca(a,"name")||Ma&&a.name!==h)&&Ia(a,"name",h),(r=Da(a)).source||(r.source=Ba.join("string"==typeof h?h:""))),e!==Ta?(o?!s&&e[t]&&(i=!0):delete e[t],i?e[t]=a:Ia(e,t,a)):i?e[t]=a:Ra(t,a)})(Function.prototype,"toString",(function(){return Ha(this)&&Ea(this).source||Oa(this)}));var Pa={},Fa=Math.ceil,ka=Math.floor,Na=function(e){var t=+e;return t!=t||0===t?0:(t>0?ka:Fa)(t)},xa=Na,La=Math.max,Ga=Math.min,ja=Na,Ya=Math.min,_a=function(e){return e>0?Ya(ja(e),9007199254740991):0},Ua=G,za=function(e,t){var a=xa(e);return a<0?La(a+t,0):Ga(a,t)},Ka=function(e){return _a(e.length)},Ja=function(e){return function(t,a,n){var r,o=Ua(t),i=Ka(o),s=za(n,i);if(e&&a!=a){for(;i>s;)if((r=o[s++])!=r)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===a)return e||s||0;return!e&&-1}},Za={includes:Ja(!0),indexOf:Ja(!1)},Wa=De,Va=G,$a=Za.indexOf,qa=qt,Qa=H([].push),Xa=function(e,t){var a,n=Va(e),r=0,o=[];for(a in n)!Wa(qa,a)&&Wa(n,a)&&Qa(o,a);for(;t.length>r;)Wa(n,a=t[r++])&&(~$a(o,a)||Qa(o,a));return o},en=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tn=Xa,an=en.concat("length","prototype");Pa.f=Object.getOwnPropertyNames||function(e){return tn(e,an)};var nn={};nn.f=Object.getOwnPropertySymbols;var rn=J,on=Pa,sn=nn,hn=Ct,cn=H([].concat),ln=rn("Reflect","ownKeys")||function(e){var t=on.f(hn(e)),a=sn.f;return a?cn(t,a(e)):t},un=De,dn=ln,fn=h,mn=vt,gn=c,bn=j,yn=/#|\.prototype\./,pn=function(e,t){var a=vn[Sn(e)];return a==An||a!=wn&&(bn(t)?gn(t):!!t)},Sn=pn.normalize=function(e){return String(e).replace(yn,".").toLowerCase()},vn=pn.data={},wn=pn.NATIVE="N",An=pn.POLYFILL="P",Tn=pn,Hn=s,Cn=h.f,In=Ft,Rn=kt.exports,On=Ae,Mn=function(e,t){for(var a=dn(t),n=mn.f,r=fn.f,o=0;o<a.length;o++){var i=a[o];un(e,i)||n(e,i,r(t,i))}},En=Tn,Dn={};Dn[Ze("toStringTag")]="z";var Bn,Pn=s,Fn="[object z]"===String(Dn),kn=j,Nn=O,xn=Ze("toStringTag"),Ln=Pn.Object,Gn="Arguments"==Nn(function(){return arguments}()),jn=Fn?Nn:function(e){var t,a,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=Ln(e),xn))?a:Gn?Nn(t):"Object"==(n=Nn(t))&&kn(t.callee)?"Arguments":n},Yn=s.String,_n=Ct,Un=c,zn=s.RegExp,Kn=Un((function(){var e=zn("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Jn=Kn||Un((function(){return!zn("a","y").sticky})),Zn={BROKEN_CARET:Kn||Un((function(){var e=zn("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Jn,UNSUPPORTED_Y:Kn},Wn=Xa,Vn=en,$n=Object.keys||function(e){return Wn(e,Vn)},qn=vt,Qn=Ct,Xn=G,er=$n,tr=l?Object.defineProperties:function(e,t){Qn(e);for(var a,n=Xn(t),r=er(t),o=r.length,i=0;o>i;)qn.f(e,a=r[i++],n[a]);return e},ar=J("document","documentElement"),nr=Ct,rr=tr,or=en,ir=qt,sr=ar,hr=ht,cr=$t("IE_PROTO"),lr=function(){},ur=function(e){return"<script>"+e+"</"+"script>"},dr=function(e){e.write(ur("")),e.close();var t=e.parentWindow.Object;return e=null,t},fr=function(){try{Bn=new ActiveXObject("htmlfile")}catch(e){}var e,t;fr="undefined"!=typeof document?document.domain&&Bn?dr(Bn):((t=hr("iframe")).style.display="none",sr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ur("document.F=Object")),e.close(),e.F):dr(Bn);for(var a=or.length;a--;)delete fr.prototype[or[a]];return fr()};ir[cr]=!0;var mr,gr,br=Object.create||function(e,t){var a;return null!==e?(lr.prototype=nr(e),a=new lr,lr.prototype=null,a[cr]=e):a=fr(),void 0===t?a:rr(a,t)},yr=c,pr=s.RegExp,Sr=yr((function(){var e=pr(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),vr=c,wr=s.RegExp,Ar=vr((function(){var e=wr("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Tr=d,Hr=H,Cr=function(e){if("Symbol"===jn(e))throw TypeError("Cannot convert a Symbol value to a string");return Yn(e)},Ir=function(){var e=_n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Rr=Zn,Or=Se.exports,Mr=br,Er=ga.get,Dr=Sr,Br=Ar,Pr=Or("native-string-replace",String.prototype.replace),Fr=RegExp.prototype.exec,kr=Fr,Nr=Hr("".charAt),xr=Hr("".indexOf),Lr=Hr("".replace),Gr=Hr("".slice),jr=(gr=/b*/g,Tr(Fr,mr=/a/,"a"),Tr(Fr,gr,"a"),0!==mr.lastIndex||0!==gr.lastIndex),Yr=Rr.BROKEN_CARET,_r=void 0!==/()??/.exec("")[1];(jr||_r||Yr||Dr||Br)&&(kr=function(e){var t,a,n,r,o,i,s,h=this,c=Er(h),l=Cr(e),u=c.raw;if(u)return u.lastIndex=h.lastIndex,t=Tr(kr,u,l),h.lastIndex=u.lastIndex,t;var d=c.groups,f=Yr&&h.sticky,m=Tr(Ir,h),g=h.source,b=0,y=l;if(f&&(m=Lr(m,"y",""),-1===xr(m,"g")&&(m+="g"),y=Gr(l,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==Nr(l,h.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,b++),a=new RegExp("^(?:"+g+")",m)),_r&&(a=new RegExp("^"+g+"$(?!\\s)",m)),jr&&(n=h.lastIndex),r=Tr(Fr,f?a:h,y),f?r?(r.input=Gr(r.input,b),r[0]=Gr(r[0],b),r.index=h.lastIndex,h.lastIndex+=r[0].length):h.lastIndex=0:jr&&r&&(h.lastIndex=h.global?r.index+r[0].length:n),_r&&r&&r.length>1&&Tr(Pr,r[0],a,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r&&d)for(r.groups=i=Mr(null),o=0;o<d.length;o++)i[(s=d[o])[0]]=r[s[1]];return r});(function(e,t){var a,n,r,o,i,s=e.target,h=e.global,c=e.stat;if(a=h?Hn:c?Hn[s]||On(s,{}):(Hn[s]||{}).prototype)for(n in t){if(o=t[n],r=e.noTargetGet?(i=Cn(a,n))&&i.value:a[n],!En(h?n:s+(c?".":"#")+n,e.forced)&&void 0!==r){if(typeof o==typeof r)continue;Mn(o,r)}(e.sham||r&&r.sham)&&In(o,"sham",!0),Rn(a,n,o,e)}})({target:"RegExp",proto:!0,forced:/./.exec!==kr},{exec:kr});var Ur={"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:"Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights","Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:"Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt","Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:"Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination","Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":'Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes "Adar Bet" or "Adar Sheni", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon',"Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:"Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai","Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:"Ethiopian Jewish holiday occurring 50 days after Yom Kippur","Simchat Torah":"Day of Celebrating the Torah",Sukkot:"Feast of Booths","Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Note that Hebcal displays modern holidays like Yom HaAtzma'ut according to the Israeli schedule. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Note that Hebcal displays modern holidays like Yom HaZikaron according to the Israeli schedule. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};function zr(e){return e.toLowerCase().replace(/'/g,"").replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-/g,"").replace(/-$/g,"")}function Kr(e){return e<10?"0"+e:String(e)}function Jr(e){return e<0?"-00"+Jr(-e):e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:String(e)}function Zr(e){return Jr(e.getFullYear())+"-"+Kr(e.getMonth()+1)+"-"+Kr(e.getDate())}function Wr(e){const a=e.getDesc();if("Fast begins"===a||"Fast ends"===a)return["zmanim","fast"];switch(e.getFlags()){case t.flags.OMER_COUNT:return["omer"];case t.flags.HEBREW_DATE:return["hebdate"];case t.flags.PARSHA_HASHAVUA:return["parashat"];case t.flags.DAF_YOMI:return["dafyomi"];case t.flags.ROSH_CHODESH:return["roshchodesh"];case t.flags.SPECIAL_SHABBAT:return["holiday","shabbat"];case t.flags.MINOR_FAST:return["holiday","fast"];case t.flags.MAJOR_FAST:return["holiday","fast","major"];case t.flags.MODERN_HOLIDAY:return["holiday","modern"];case t.flags.SHABBAT_MEVARCHIM:return["mevarchim"];case t.flags.MOLAD:return["molad"];case t.flags.USER_EVENT:return["user"];case t.flags.MINOR_HOLIDAY:return["holiday","minor"]}if(e.cholHaMoedDay)return["holiday","major","cholhamoed"];switch(a){case"Havdalah":return["havdalah"];case"Candle lighting":return["candles"];case"Lag BaOmer":case"Leil Selichot":case"Pesach Sheni":case"Erev Purim":case"Purim Katan":case"Shushan Purim":case"Tu B'Av":case"Tu BiShvat":case"Rosh Hashana LaBehemot":return["holiday","minor"];case"Erev Tish'a B'Av":return["holiday","fast","major"];default:return["holiday","major"]}}function Vr(e,t){let a="Hebcal";const n=t.location;if(t.yahrzeit)a+=" Yahrzeits and Anniversaries";else if(n&&n.name){const e=n.name.indexOf(",");a+=" "+(-1==e?n.name:n.name.substring(0,e))}else t.il?a+=" Israel":a+=" Diaspora";if("1"==t.subscribe)return a;if(t.isHebrewYear||0==e.length)a+=" "+t.year;else{const t=e[0].getDate().greg(),n=e[e.length-1].getDate().greg();if(t.getFullYear()!=n.getFullYear())a+=" "+t.getFullYear()+"-"+n.getFullYear();else if(t.getMonth()==n.getMonth()){a+=" "+new Intl.DateTimeFormat("en-US",{month:"long"}).format(t)+" "+t.getFullYear()}else a+=" "+t.getFullYear()}return a}function $r(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a=Ur[e.getDesc()]||Ur[e.basename()]||"";if(t&&a){const e=a.indexOf(".");if(-1!=e)return a.substring(0,e)}return a}const qr=t.flags.DAF_YOMI|t.flags.OMER_COUNT|t.flags.SHABBAT_MEVARCHIM|t.flags.MOLAD|t.flags.USER_EVENT|t.flags.HEBREW_DATE;function Qr(e,a){const n=e.getFlags();if(n&qr)return"";const o=n&t.flags.PARSHA_HASHAVUA?r.getLeyningForParshaHaShavua(e,a):r.getLeyningForHoliday(e,a);let i="";return o&&(o.summary||o.haftara)&&(o.summary&&(i+="Torah: ".concat(o.summary)),o.summary&&o.haftara&&(i+="\n"),o.haftara&&(i+="Haftarah: "+o.haftara,o.reason&&o.reason.haftara&&(i+=" | "+o.reason.haftara))),o&&o.sephardic&&(i+="\nHaftarah for Sephardim: "+o.sephardic),i}function Xr(e,t,a,n,r){"https://www.hebcal.com"!==e.substring(0,22)?a="hebcal.com":t&&-1===e.indexOf("?")&&(e+="?i=on");const o=-1===e.indexOf("?")?"?":"&";return e+o+"utm_source=".concat(a,"&utm_medium=").concat(n)+(r?"&utm_campaign=".concat(r):"")}function eo(e){if(void 0!==e.eventTime)return!0;const a=e.getFlags();if(a&t.flags.HEBREW_DATE){return 1!==e.getDate().getDate()}return!!(a&t.flags.DAF_YOMI)}const to='"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"',ao={dafyomi:"Daf Yomi",hebdate:"Hebrew Date",holiday:"Jewish Holidays",mevarchim:null,molad:null,omer:null,parashat:"Torah Reading",roshchodesh:"Jewish Holidays",user:"Personal"};function no(e,a){const n=e.getDate().greg(),r=n.getDate(),o=n.getMonth()+1,i=String(n.getFullYear()).padStart(4,"0"),s=a.euro?'"'.concat(r,"/").concat(o,"/").concat(i,'"'):'"'.concat(o,"/").concat(r,"/").concat(i,'"');let h="",c="",l="",u='"true"';const d=Boolean(e.eventTime);let f=eo(e)?e.renderBrief(a.locale):e.render(a.locale);if(e.eventTime){const n=t.HebrewCalendar.reformatTimeStr(e.eventTimeStr," PM",a);c=h='"'.concat(n,'"'),l=s,u='"false"'}let m="Jewish Holidays";const g=e.getFlags();if(d&&a.location&&a.location.name){const e=a.location.name,t=e.indexOf(",");m=-1===t?e:e.substring(0,t)}else if(g&t.flags.DAF_YOMI){const e=f.indexOf(": ");-1!=e&&(m=f.substring(0,e),f=f.substring(e+2))}else{const t=ao[Wr(e)[0]];t&&(m=t)}if(f=f.replace(/,/g,"").replace(/"/g,"''"),a.appendHebrewToSubject){const t=e.renderBrief("he");t&&(f+=" / ".concat(t))}let b=e.memo||$r(e,!0);b||void 0===e.linkedEvent||(b=e.linkedEvent.render(a.locale));const y=b.replace(/,/g,";").replace(/"/g,"''"),p=d||g&t.flags.CHAG?4:3;return'"'.concat(f,'",').concat(s,",").concat(h,",").concat(l,",").concat(c,",").concat(u,',"').concat(y,'","').concat(p,'","').concat(m,'"')}var ro={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"Democratic Republic of the Congo",CF:"Central African Republic",CG:"Republic of the Congo",CH:"Switzerland",CI:"Ivory Coast",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curacao",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GE:"Georgia",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MP:"Northern Mariana Islands",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PR:"Puerto Rico",PT:"Portugal",PY:"Paraguay",QA:"Qatar",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SK:"Slovakia",SL:"Sierra Leone",SN:"Senegal",SO:"Somalia",SR:"Suriname",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syria",SZ:"Swaziland",TC:"Turks and Caicos Islands",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TM:"Turkmenistan",TN:"Tunisia",TR:"Turkey",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VN:"Vietnam",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"};function oo(e,a){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=Boolean(e.eventTime),i=e.getDate(),s=i.greg(),h="object"==typeof a.location?a.location.getTzid():"UTC",c=o?t.Zmanim.formatISOWithTimeZone(h,e.eventTime):Zr(s),l=Wr(e),u=e.getFlags();let d=eo(e)?e.renderBrief(a.locale):e.render(a.locale);const f=e.getDesc(),m="Havdalah"===f||"Candle lighting"===f;if(m){d+=": "+t.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",a)}const g={title:d,date:c,category:l[0]};l.length>1&&(g.subcat=l[1]),"holiday"===l[0]&&u&t.flags.CHAG&&(g.yomtov=!0),d!=f&&(g.title_orig=f);const b=e.renderBrief("he");if(b&&(g.hebrew=t.Locale.hebrewStripNikkud(b)),!m){if(n){const n=a.il,o=u===t.flags.PARSHA_HASHAVUA,s=o?r.getLeyningForParshaHaShavua(e,n):r.getLeyningForHoliday(e,n);if(s){g.leyning=so(s);const t=i.getFullYear();if(o&&!n&&t>=5745&&t<=5830){const t=r.getTriennialForParshaHaShavua(e);t&&(g.leyning.triennial=io({},t))}}}const o=e.url();if(o){const e=a.utmSource||"js",t=a.utmMedium||"api",n=a.utmCampaign;g.link=Xr(o,a.il,e,t,n)}}const y=e.memo||Ur[e.basename()];return y?g.memo=y:void 0!==e.linkedEvent&&(g.memo=e.linkedEvent.render(a.locale)),g}function io(e,t){return Object.keys(t).forEach((a=>{const n=t[a];if(void 0!==n){e["M"==a?"maftir":a]=r.formatAliyahWithBook(n)}})),e}function so(e){const t={};return e.summary&&(t.torah=e.summary),e.haftara&&(t.haftarah=e.haftara),e.sephardic&&(t.haftarah_sephardic=e.sephardic),e.fullkriyah&&io(t,e.fullkriyah),e.reason&&(["7","8","M"].forEach((a=>{if(e.reason[a]){t["M"==a?"maftir":a]+=" | "+e.reason[a]}})),e.reason.haftara&&(t.haftarah+=" | "+e.reason.haftara)),t}const ho={s:"en",a:"en","he-x-NoNikud":"he",h:"he",ah:"en",sh:"en"};function co(e,t){t.dayFormat=new Intl.DateTimeFormat("en-US",{weekday:"long",day:"2-digit",month:"long",year:"numeric"});const a=t.location,n=t.mainUrl,r=t.buildDate=t.buildDate||new Date,o=r.getFullYear(),i=t.lastBuildDate=r.toUTCString(),s=t.title||Vr(e,t),h=t.description||s,c=t.utmSource||"shabbat1c",l=t.utmMedium||"rss",u=Xr(n,a&&a.getIsrael(),c,l,t.utmCampaign).replace(/&/g,"&amp;"),d=t.selfUrl.replace(/&/g,"&amp;"),f=t.lang||ho[t.locale]||t.locale||"en-US";let m='<?xml version="1.0" encoding="UTF-8"?>\n<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:atom="http://www.w3.org/2005/Atom">\n<channel>\n<title>'.concat(s,"</title>\n<link>").concat(u,'</link>\n<atom:link href="').concat(d,'" rel="self" type="application/rss+xml" />\n<description>').concat(h,"</description>\n<language>").concat(f,"</language>\n<copyright>Copyright (c) ").concat(o," Michael J. Radwin. All rights reserved.</copyright>\n<lastBuildDate>").concat(i,"</lastBuildDate>\n");return e.forEach((e=>{m+=lo(e,t)})),m+="</channel>\n</rss>\n",m}function lo(e,t){return uo(e,t.evPubDate,t.lastBuildDate,t.dayFormat,t.location,t.mainUrl,t)}function uo(e,a,n,r,o,i,s){let h=e.render();const c=e.getDate().greg(),l=function(e,t,a,n){if(t){const t=e.eventTime;return t?t.toUTCString():a.toUTCString().replace(/ \S+ GMT$/," 00:00:00 GMT")}return n}(e,a,c,n),u=!!o&&o.getIsrael(),d=function(e,a,n,r,o,i){let s,h;const c=e.eventTime||e.getDate().greg(),l=t.Zmanim.formatISOWithTimeZone(n,c),u=l.substring(0,l.indexOf("T")),d=u.replace(/-/g,""),f=zr(e.getDesc()),m="".concat(d,"-").concat(f),g=e.url();if(g)s=Xr(g,a,o,i).replace(/&/g,"&amp;"),h="".concat(g,"#").concat(m);else{const e="".concat(r,"&dt=").concat(u),t=Xr(e,a,o,i).replace(/&/g,"&amp;");h=e.replace(/&/g,"&amp;")+"#".concat(m),s="".concat(t,"#").concat(m)}return[s,h]}(e,u,o?o.getTzid():"UTC",i,s&&s.utmSource||"shabbat1c",s&&s.utmMedium||"rss"),f=d[0],m=d[1],g=Wr(e)[0],b=e.getDesc();let y;if("Havdalah"===b||"Candle lighting"===b){const a=h.indexOf(": ");if(-1!=a){const n={location:o,il:u,locale:t.Locale.getLocaleName()},r=t.HebrewCalendar.reformatTimeStr(e.eventTimeStr,"pm",n);h=h.substring(0,a)+": "+r}}else y=e.getFlags()&t.flags.PARSHA_HASHAVUA?Qr(e,u):e.memo||Ur[e.basename()];const p=y||r.format(c),S="candles"==g?"<geo:lat>".concat(o.getLatitude(),"</geo:lat>\n<geo:long>").concat(o.getLongitude(),"</geo:long>\n"):"";return"<item>\n<title>".concat(h,"</title>\n<link>").concat(f,'</link>\n<guid isPermaLink="false">').concat(m,"</guid>\n<description>").concat(p,"</description>\n<category>").concat(g,"</category>\n<pubDate>").concat(l,"</pubDate>\n").concat(S,"</item>\n")}return e.appendIsraelAndTracking=Xr,e.countryNames=ro,e.eventToClassicApiObject=oo,e.eventToCsv=no,e.eventToFullCalendar=function(e,a,n){const r=Wr(e),o=e.getFlags();"holiday"==r[0]&&o&t.flags.CHAG&&r.push("yomtov");const i=Boolean(e.eventTime),s={title:eo(e)?e.renderBrief():e.render(),start:i?t.Zmanim.formatISOWithTimeZone(a,e.eventTime):Zr(e.getDate().greg()),allDay:!i,className:r.join(" ")},h=e.renderBrief("he");h&&(s.hebrew=t.Locale.hebrewStripNikkud(h));const c=e.url();c&&(s.url=Xr(c,n,"js","fc"));const l=e.getDesc();if(!("Havdalah"===l||"Candle lighting"===l)){const a=o&t.flags.PARSHA_HASHAVUA?Qr(e,n):e.memo||Ur[e.basename()];a?s.description=a:void 0!==e.linkedEvent&&(s.description=e.linkedEvent.render())}return s},e.eventToRssItem=uo,e.eventToRssItem2=lo,e.eventsToClassicApi=function(e,t){let a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n={title:Vr(e,t),date:(new Date).toISOString()},r=t.location;return"object"==typeof r&&"string"==typeof r.name?(n.location={title:r.getName(),city:r.getShortName(),tzid:r.getTzid(),latitude:r.getLatitude(),longitude:r.getLongitude(),cc:r.getCountryCode(),country:ro[r.getCountryCode()]},["admin1","asciiname","geo","zip","state","geonameid"].forEach((e=>{r[e]&&(n.location[e]=r[e])}))):n.location={geo:"none"},n.items=e.map((e=>oo(e,t,a))),n},e.eventsToCsv=function(e,t){return[to].concat(e.map((e=>no(e,t)))).join("\r\n")+"\r\n"},e.eventsToRss=function(e,a,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"en-US",i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];const s=a.getName(),h={location:a,mainUrl:n,selfUrl:r,lang:o,evPubDate:i,title:t.Locale.gettext("Shabbat")+" Times for ".concat(s),description:"Weekly Shabbat candle lighting times for ".concat(s),utmSource:"shabbat1c",utmMedium:"rss"};return co(e,h)},e.eventsToRss2=co,e.getCalendarTitle=Vr,e.getDownloadFilename=function(e){let t="hebcal_"+e.year;if(e.isHebrewYear&&(t+="h"),e.month&&(t+="_"+e.month),e.location){t+="_"+zr(e.location.zip||e.location.asciiname||e.location.getShortName()).replace(/[-]/g,"_")}return t},e.getEventCategories=Wr,e.getHolidayDescription=$r,e.holidayDescription=Ur,e.makeAnchor=zr,e.makeTorahMemoText=Qr,e.pad2=Kr,e.pad4=Jr,e.renderTitleWithoutTime=function(e){return void 0===e.eventTime?e.render():e.renderBrief()},e.shouldRenderBrief=eo,e.timeZoneOffsetStr=function(e,a){return t.Zmanim.timeZoneOffset(e,a)},e.toISOString=Zr,e.toISOStringWithTimezone=function(e,a,n){const r=Zr(e);return a?r+"T"+a+":00"+t.Zmanim.timeZoneOffset(n,e):r},Object.defineProperty(e,"__esModule",{value:!0}),e}({},hebcal);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/rest-api v3.10.1 */
1
+ /*! @hebcal/rest-api v3.10.2 */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -658,10 +658,12 @@ function formatLeyningResult(reading) {
658
658
  * @param {boolean} il
659
659
  * @param {string} tzid
660
660
  * @param {string} mainUrl
661
+ * @param {string} utmSource
662
+ * @param {string} utmMedium
661
663
  * @return {string[]}
662
664
  */
663
665
 
664
- function getLinkAndGuid(ev, il, tzid, mainUrl) {
666
+ function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {
665
667
  let link;
666
668
  let guid;
667
669
  const dt = ev.eventTime || ev.getDate().greg();
@@ -673,11 +675,11 @@ function getLinkAndGuid(ev, il, tzid, mainUrl) {
673
675
  const url0 = ev.url();
674
676
 
675
677
  if (url0) {
676
- link = appendIsraelAndTracking(url0, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
678
+ link = appendIsraelAndTracking(url0, il, utmSource, utmMedium).replace(/&/g, '&amp;');
677
679
  guid = `${url0}#${anchor}`;
678
680
  } else {
679
681
  const url1 = `${mainUrl}&dt=${dtStr}`;
680
- const url = appendIsraelAndTracking(url1, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
682
+ const url = appendIsraelAndTracking(url1, il, utmSource, utmMedium).replace(/&/g, '&amp;');
681
683
  guid = url1.replace(/&/g, '&amp;') + `#${anchor}`;
682
684
  link = `${url}#${anchor}`;
683
685
  }
@@ -725,7 +727,7 @@ const localeToLg = {
725
727
  */
726
728
 
727
729
  function eventsToRss2(events, options) {
728
- const dayFormat = new Intl.DateTimeFormat('en-US', {
730
+ options.dayFormat = new Intl.DateTimeFormat('en-US', {
729
731
  weekday: 'long',
730
732
  day: '2-digit',
731
733
  month: 'long',
@@ -733,13 +735,14 @@ function eventsToRss2(events, options) {
733
735
  });
734
736
  const location = options.location;
735
737
  const mainUrl = options.mainUrl;
736
- const evPubDate = options.evPubDate;
737
- const buildDate = options.buildDate || new Date();
738
+ const buildDate = options.buildDate = options.buildDate || new Date();
738
739
  const thisYear = buildDate.getFullYear();
739
- const lastBuildDate = buildDate.toUTCString();
740
+ const lastBuildDate = options.lastBuildDate = buildDate.toUTCString();
740
741
  const title = options.title || getCalendarTitle(events, options);
741
742
  const description = options.description || title;
742
- const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), options.utmSource, options.utmMedium, options.utmCampaign).replace(/&/g, '&amp;');
743
+ const utmSource = options.utmSource || 'shabbat1c';
744
+ const utmMedium = options.utmMedium || 'rss';
745
+ const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), utmSource, utmMedium, options.utmCampaign).replace(/&/g, '&amp;');
743
746
  const selfUrlEsc = options.selfUrl.replace(/&/g, '&amp;');
744
747
  const lang = options.lang || localeToLg[options.locale] || options.locale || 'en-US';
745
748
  let str = `<?xml version="1.0" encoding="UTF-8"?>
@@ -754,7 +757,7 @@ function eventsToRss2(events, options) {
754
757
  <lastBuildDate>${lastBuildDate}</lastBuildDate>
755
758
  `;
756
759
  events.forEach(ev => {
757
- str += eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl);
760
+ str += eventToRssItem2(ev, options);
758
761
  });
759
762
  str += '</channel>\n</rss>\n';
760
763
  return str;
@@ -781,6 +784,16 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
781
784
 
782
785
  return lastBuildDate;
783
786
  }
787
+ /**
788
+ * @param {Event} ev
789
+ * @param {HebrewCalendar.Options} options
790
+ * @return {string}
791
+ */
792
+
793
+
794
+ function eventToRssItem2(ev, options) {
795
+ return eventToRssItem(ev, options.evPubDate, options.lastBuildDate, options.dayFormat, options.location, options.mainUrl, options);
796
+ }
784
797
  /**
785
798
  * @param {Event} ev
786
799
  * @param {boolean} evPubDate
@@ -788,17 +801,19 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
788
801
  * @param {Intl.DateTimeFormat} dayFormat
789
802
  * @param {Location} location
790
803
  * @param {string} mainUrl
804
+ * @param {HebrewCalendar.Options} [options]
791
805
  * @return {string}
792
806
  */
793
807
 
794
-
795
- function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl) {
808
+ function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, options) {
796
809
  let subj = ev.render();
797
810
  const evDate = ev.getDate().greg();
798
811
  const pubDate = getPubDate(ev, evPubDate, evDate, lastBuildDate);
799
812
  const il = location ? location.getIsrael() : false;
800
813
  const tzid = location ? location.getTzid() : 'UTC';
801
- const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl);
814
+ const utmSource = options && options.utmSource || 'shabbat1c';
815
+ const utmMedium = options && options.utmMedium || 'rss';
816
+ const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium);
802
817
  const link = linkGuid[0];
803
818
  const guid = linkGuid[1];
804
819
  const categories = getEventCategories(ev);
@@ -895,6 +910,7 @@ exports.eventToClassicApiObject = eventToClassicApiObject;
895
910
  exports.eventToCsv = eventToCsv;
896
911
  exports.eventToFullCalendar = eventToFullCalendar;
897
912
  exports.eventToRssItem = eventToRssItem;
913
+ exports.eventToRssItem2 = eventToRssItem2;
898
914
  exports.eventsToClassicApi = eventsToClassicApi;
899
915
  exports.eventsToCsv = eventsToCsv;
900
916
  exports.eventsToRss = eventsToRss;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/rest-api v3.10.1 */
1
+ /*! @hebcal/rest-api v3.10.2 */
2
2
  import { flags, Zmanim, HebrewCalendar, Locale } from '@hebcal/core';
3
3
  import * as leyn from '@hebcal/leyning';
4
4
 
@@ -634,10 +634,12 @@ function formatLeyningResult(reading) {
634
634
  * @param {boolean} il
635
635
  * @param {string} tzid
636
636
  * @param {string} mainUrl
637
+ * @param {string} utmSource
638
+ * @param {string} utmMedium
637
639
  * @return {string[]}
638
640
  */
639
641
 
640
- function getLinkAndGuid(ev, il, tzid, mainUrl) {
642
+ function getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium) {
641
643
  let link;
642
644
  let guid;
643
645
  const dt = ev.eventTime || ev.getDate().greg();
@@ -649,11 +651,11 @@ function getLinkAndGuid(ev, il, tzid, mainUrl) {
649
651
  const url0 = ev.url();
650
652
 
651
653
  if (url0) {
652
- link = appendIsraelAndTracking(url0, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
654
+ link = appendIsraelAndTracking(url0, il, utmSource, utmMedium).replace(/&/g, '&amp;');
653
655
  guid = `${url0}#${anchor}`;
654
656
  } else {
655
657
  const url1 = `${mainUrl}&dt=${dtStr}`;
656
- const url = appendIsraelAndTracking(url1, il, 'shabbat1c', 'rss').replace(/&/g, '&amp;');
658
+ const url = appendIsraelAndTracking(url1, il, utmSource, utmMedium).replace(/&/g, '&amp;');
657
659
  guid = url1.replace(/&/g, '&amp;') + `#${anchor}`;
658
660
  link = `${url}#${anchor}`;
659
661
  }
@@ -701,7 +703,7 @@ const localeToLg = {
701
703
  */
702
704
 
703
705
  function eventsToRss2(events, options) {
704
- const dayFormat = new Intl.DateTimeFormat('en-US', {
706
+ options.dayFormat = new Intl.DateTimeFormat('en-US', {
705
707
  weekday: 'long',
706
708
  day: '2-digit',
707
709
  month: 'long',
@@ -709,13 +711,14 @@ function eventsToRss2(events, options) {
709
711
  });
710
712
  const location = options.location;
711
713
  const mainUrl = options.mainUrl;
712
- const evPubDate = options.evPubDate;
713
- const buildDate = options.buildDate || new Date();
714
+ const buildDate = options.buildDate = options.buildDate || new Date();
714
715
  const thisYear = buildDate.getFullYear();
715
- const lastBuildDate = buildDate.toUTCString();
716
+ const lastBuildDate = options.lastBuildDate = buildDate.toUTCString();
716
717
  const title = options.title || getCalendarTitle(events, options);
717
718
  const description = options.description || title;
718
- const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), options.utmSource, options.utmMedium, options.utmCampaign).replace(/&/g, '&amp;');
719
+ const utmSource = options.utmSource || 'shabbat1c';
720
+ const utmMedium = options.utmMedium || 'rss';
721
+ const mainUrlEsc = appendIsraelAndTracking(mainUrl, location && location.getIsrael(), utmSource, utmMedium, options.utmCampaign).replace(/&/g, '&amp;');
719
722
  const selfUrlEsc = options.selfUrl.replace(/&/g, '&amp;');
720
723
  const lang = options.lang || localeToLg[options.locale] || options.locale || 'en-US';
721
724
  let str = `<?xml version="1.0" encoding="UTF-8"?>
@@ -730,7 +733,7 @@ function eventsToRss2(events, options) {
730
733
  <lastBuildDate>${lastBuildDate}</lastBuildDate>
731
734
  `;
732
735
  events.forEach(ev => {
733
- str += eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl);
736
+ str += eventToRssItem2(ev, options);
734
737
  });
735
738
  str += '</channel>\n</rss>\n';
736
739
  return str;
@@ -757,6 +760,16 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
757
760
 
758
761
  return lastBuildDate;
759
762
  }
763
+ /**
764
+ * @param {Event} ev
765
+ * @param {HebrewCalendar.Options} options
766
+ * @return {string}
767
+ */
768
+
769
+
770
+ function eventToRssItem2(ev, options) {
771
+ return eventToRssItem(ev, options.evPubDate, options.lastBuildDate, options.dayFormat, options.location, options.mainUrl, options);
772
+ }
760
773
  /**
761
774
  * @param {Event} ev
762
775
  * @param {boolean} evPubDate
@@ -764,17 +777,19 @@ function getPubDate(ev, evPubDate, evDate, lastBuildDate) {
764
777
  * @param {Intl.DateTimeFormat} dayFormat
765
778
  * @param {Location} location
766
779
  * @param {string} mainUrl
780
+ * @param {HebrewCalendar.Options} [options]
767
781
  * @return {string}
768
782
  */
769
783
 
770
-
771
- function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl) {
784
+ function eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, options) {
772
785
  let subj = ev.render();
773
786
  const evDate = ev.getDate().greg();
774
787
  const pubDate = getPubDate(ev, evPubDate, evDate, lastBuildDate);
775
788
  const il = location ? location.getIsrael() : false;
776
789
  const tzid = location ? location.getTzid() : 'UTC';
777
- const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl);
790
+ const utmSource = options && options.utmSource || 'shabbat1c';
791
+ const utmMedium = options && options.utmMedium || 'rss';
792
+ const linkGuid = getLinkAndGuid(ev, il, tzid, mainUrl, utmSource, utmMedium);
778
793
  const link = linkGuid[0];
779
794
  const guid = linkGuid[1];
780
795
  const categories = getEventCategories(ev);
@@ -865,4 +880,4 @@ function eventToFullCalendar(ev, tzid, il) {
865
880
  return result;
866
881
  }
867
882
 
868
- export { appendIsraelAndTracking, countryNames, eventToClassicApiObject, eventToCsv, eventToFullCalendar, eventToRssItem, eventsToClassicApi, eventsToCsv, eventsToRss, eventsToRss2, getCalendarTitle, getDownloadFilename, getEventCategories, getHolidayDescription, holidayDescription, makeAnchor, makeTorahMemoText, pad2, pad4, renderTitleWithoutTime, shouldRenderBrief, timeZoneOffsetStr, toISOString, toISOStringWithTimezone };
883
+ export { appendIsraelAndTracking, countryNames, eventToClassicApiObject, eventToCsv, eventToFullCalendar, eventToRssItem, eventToRssItem2, eventsToClassicApi, eventsToCsv, eventsToRss, eventsToRss2, getCalendarTitle, getDownloadFilename, getEventCategories, getHolidayDescription, holidayDescription, makeAnchor, makeTorahMemoText, pad2, pad4, renderTitleWithoutTime, shouldRenderBrief, timeZoneOffsetStr, toISOString, toISOStringWithTimezone };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/rest-api",
3
- "version": "3.10.1",
3
+ "version": "3.10.2",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal"
package/rest-api.d.ts CHANGED
@@ -40,7 +40,8 @@ declare module '@hebcal/rest-api' {
40
40
  */
41
41
  export function eventsToRss(events: Event[], location: Location, mainUrl: string, selfUrl: string, lang?: string, evPubDate?: boolean): string;
42
42
  export function eventsToRss2(events: Event[], options: HebrewCalendar.Options): string;
43
- export function eventToRssItem(ev: Event, evPubDate: boolean, lastBuildDate: string, dayFormat: Intl.DateTimeFormat, location: Location, baseUrl: string): string;
43
+ export function eventToRssItem(ev: Event, evPubDate: boolean, lastBuildDate: string, dayFormat: Intl.DateTimeFormat, location: Location, baseUrl: string, options?: HebrewCalendar.Options): string;
44
+ export function eventToRssItem2(ev: Event, options: HebrewCalendar.Options): string;
44
45
  export function getDownloadFilename(options: HebrewCalendar.Options): string;
45
46
  export function pad2(number: number): string;
46
47
  export function pad4(number: number): string;