<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[8979] sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins: Day Of Event Template: Revert to `On Now` and `Up Next` strings.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/8979">8979</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/8979","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>iandunn</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-06-20 19:11:55 +0000 (Thu, 20 Jun 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Day Of Event Template: Revert to `On Now` and `Up Next` strings.
See https://github.com/WordPress/wordcamp.org/issues/127</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsserviceworkercachingphp">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/service-worker-caching.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatesbootstrapphp">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/bootstrap.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventbuildindexjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/build/index.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventsrcapijs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/api.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventsrccomponentslatestpostsjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/latest-posts.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventsrccomponentsmaincontrollerjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/main-controller.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventsrccomponentsschedulejs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/schedule.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsserviceworkercachingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/service-worker-caching.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/service-worker-caching.php 2019-06-20 15:35:14 UTC (rev 8978)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/service-worker-caching.php 2019-06-20 19:11:55 UTC (rev 8979)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,6 +12,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wp_front_service_worker', __NAMESPACE__ . '\set_navigation_caching_strategy' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+// is prompt to save offline automatically showing on mobile?
+ // if so, not sure we want it to
+ // not really related to this file, but nothing closer at the moment
+ // maybe want it to be eventually, but not until we do more work to really make the site use pwa features well?
+ // otherwise risk giving users bad impression of pwas
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Register caching routes with both service workers.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatesbootstrapphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/bootstrap.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/bootstrap.php 2019-06-20 15:35:14 UTC (rev 8978)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/bootstrap.php 2019-06-20 19:11:55 UTC (rev 8979)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -45,6 +45,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * same back-comapt considerations
</span><span class="cx" style="display: block; padding: 0 10px"> * need to provide a way for organizers to add arbitrary content to this new day-of event page?
</span><span class="cx" style="display: block; padding: 0 10px"> * otherwise we'll be taking away flexibility when we disable the campsite day of template
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * maybe just have the template call `the_content()` above or below the hardcoded stuff?
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $templates['templates/page-day-of.php'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $templates['templates/page-day-of.php'] );
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventbuildindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/build/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/build/index.js 2019-06-20 15:35:14 UTC (rev 8978)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/build/index.js 2019-06-20 19:11:55 UTC (rev 8979)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.sanitize}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:
!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var r=n(4);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t,n){var r=n(16);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){function n(t){return e.exports=n=Object.se
tPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(18),o=n(17);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),s=n.n(o),c=n(8),i=n.n(c),a=n(14),u=n.n(a),l=n(13),p=n.n(l),f=n(12),d=n.n(f),m=n(11),b=n.n(m),h=n(10),O=n.n(h),y=n(7),j=n.n(y),v=n(6);var g=n(2),w=n(5),_=n(9),x=n(1),E=n(3),k=function(e){var t,n,o=e.session,s={link:"#",title:{rendered:Object(x._x)("Tr
ack finished","session title","wordcamporg")},session_date_time:{time:""},session_category:[],_embedded:{"wp:term":{},speakers:[]},meta:{_wcpt_session_type:""}},c=o.session,i=(c=void 0===c?s:c).link,a=void 0===i?"#":i,u=c.title.rendered,l=void 0===u?"":u,p=c.session_date_time.time,f=void 0===p?"":p,d=c.session_category,m=void 0===d?[]:d,b=c._embedded,h=b["wp:term"],O=void 0===h?{}:h,y=b.speakers,j=void 0===y?[]:y,v=c.meta._wcpt_session_type,w=void 0===v?"":v,_=o.track,k=_.name,S=_.slug,P=Object(g.keyBy)(Object(g.flatten)(O),"id"),N=j.filter(function(e){return!!e.id});if(m.length>0){var L=m[0];t=P[L].name,n=P[L].slug}return Object(r.createElement)("div",{className:"wordcamp-schedule-session ".concat(w)},Object(r.createElement)("span",{className:"wordcamp-schedule-session-track ".concat(S)},k),Object(r.createElement)("div&qu
ot;,{className:"wordcamp-schedule-session-details"},Object(r.createElement)("h4",{className:"wordcamp-schedule-session-title"},Object(r.createElement)("a",{href:a},Object(E.stripTagsAndEncodeText)(l))),Object(r.createElement)("span",{className:"wordcamp-schedule-session-time"},f),Object(r.createElement)("span",{className:"wordcamp-schedule-session-speaker"},!!N.length&&N.map(function(e){var t=e.id,n=e.title.rendered,o=e.link;return Object(r.createElement)("a",{key:t,href:o},Object(E.stripTagsAndEncodeText)(n))})),!!t&&Object(r.createElement)("span",{className:"wordcamp-schedule-session-category ".concat(n)},t)))},S=function(e){var t=e.title,n=e.sessionTrackPairs.filter(function(e){return!!e});return Object(r.createElement)("section",null,Object(r.createElement)("h3",null,t),n.map(function(e,t){var n=e.session?e.session.id:t;return n="
".concat(n,"-").concat(e.track.id),Object(r.createElement)(k,{key:n,session:e})}))},P=function(e){var t=function(e){var t=window.dayOfEventConfig.scheduleNowOverride||Date.now(),n=36e5*Object(_.__experimentalGetSettings)().timezone.offset;if(Array.isArray(e.tracks))return e.tracks.map(function(r){var o=Object(g.sortBy)(e.sessions.filter(function(e){return e.session_track.includes(r.id)}),function(e){return e.meta._wcpt_session_time}),s=o.findIndex(function(e){var r=1e3*e.meta._wcpt_session_time-n;return t<r}),c=o[s],i=o[s-1];return{track:r,now:i,next:c}})}({sessions:e.sessionList,tracks:e.trackList}),n=t.map(function(e){return{track:e.track,session:e.now}}).filter(function(e){return!!e.session}),o=t.map(function(e){return{track:e.track,session:e.next}});return Object(r.createElement)(r.Fragment,null,!!n.length&&Object(r.createElement)(S,{sessionTrackPairs:n,title:Object(x._x)("In Progress","title","wordcamporg")}),!!o.length&am
p;&Object(r.createElement)(S,{sessionTrackPairs:o,title:Object(x._x)("Coming Up Next","title","wordcamporg")}))},N=function(e){var t=e.fullScheduleUrl,n=e.isFetching,o=e.sessions,s=e.tracks;return Object(r.createElement)("div",{className:"day-of-event-schedule"},Object(r.createElement)("h2",null,Object(x._x)("Live Schedule","title","wordcamporg")),n&&0===o.length&&Object(r.createElement)(w.Spinner,null),(!n||0<o.length)&&Object(r.createElement)(P,{sessionList:o,trackList:s}),Object(r.createElement)("a",{href:t,className:"full-schedule"},Object(x._x)("View Full Schedule","text","wordcamporg")))},L=function(e){var t=e.post,n=t.link,o=t.date_gmt,s=t.title.rendered,c=t.excerpt.rendered,i=t._embedded["wp:term"];Object(g.keyBy)(Object(g.flatten)(i),"id");return Object(r.createElement)("div",
{className:"wordcamp-latest-post"},Object(r.createElement)("h4",{className:"wordcamp-latest-post-title"},Object(r.createElement)("a",{href:n},Object(E.stripTagsAndEncodeText)(s))),Object(r.createElement)("span",{className:"wordcamp-latest-post-date"},new Date(o).toLocaleDateString()),Object(r.createElement)("div",{className:"wordcamp-latest-post-excerpt"},Object(E.stripTagsAndEncodeText)(c)))},F=function(e){var t=e.archiveUrl,n=e.isFetching,o=e.posts;return Object(r.createElement)("div",{className:"day-of-event-latest-posts"},Object(r.createElement)("h2",null,Object(x._x)("Latest Posts","title","wordcamporg")),n&&0===o.length&&Object(r.createElement)(w.Spinner,null),(!n||0<o.length)&&Object(r.createElement)(r.Fragment,null,o.filter(function(e){return!!e}).map(function(e){return Object(r.createElement)(L,{key:e.id,post:
e})})),Object(r.createElement)("a",{href:t,className:"all-posts"},Object(x._x)("View all Posts","title","wordcamporg")))},T={sessionList:function(){return j()({path:Object(v.addQueryArgs)("wp/v2/sessions",{per_page:100,status:"publish",_embed:!0})})},trackList:function(){return j()({path:Object(v.addQueryArgs)("wp/v2/session_track",{per_page:100,status:"publish"})})},postList:function(){return j()({path:Object(v.addQueryArgs)("wp/v2/posts",{per_page:3,status:"publish",_embed:!0})})}},A=function(e){function t(e){var n;u()(this,t),(n=d()(this,b()(t).call(this,e))).state={};for(var r=0,o=Object.keys(T);r<o.length;r++){var s=o[r];n.state[s]={isFetching:!0,error:null,data:[]}}return n}return O()(t,e),p()(t,[{key:"updateLists",value:function(){for(var e,t=this,n=function(){var n=o[r];e=T[n],t.setState(function(e){return s()({},n,i()({},e[n],{isFetching:!0}))}),e().the
n(function(e){t.setState(s()({},n,{isFetching:!1,data:e}))}).catch(function(e){t.setState(function(t){return i()({},t,s()({},n,i()({},t[n],{isFetching:!1,error:e})))})})},r=0,o=Object.keys(T);r<o.length;r++)n()}},{key:"componentDidMount",value:function(){var e=this;this.updateLists(),this.updateIntervalId=window.setInterval(function(){e.updateLists()},6e4)}},{key:"componentWillUnmount",value:function(){window.clearInterval(this.updateIntervalId)}},{key:"render",value:function(){var e=this.props.config,t=this.state,n=t.postList,o=t.sessionList,s=t.trackList;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(N,{fullScheduleUrl:e.scheduleUrl,isFetching:o.isFetching||s.isFetching,sessions:o.data,tracks:s.data}),Object(r.createElement)(F,{archiveUrl:e.postsArchiveUrl,isfetching:n.isFetching,posts:n.data}))}}]),t}(r.Component);Object(r.render)(Object(r.createElement)(A,{config:window.dayOfEventConfig}),document.getElementById("day-
of-event"))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r}]);
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.sanitize}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:
!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,n){var r=n(4);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t,n){var r=n(16);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){function n(t){return e.exports=n=Object.se
tPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(18),o=n(17);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),s=n.n(o),c=n(8),i=n.n(c),a=n(14),u=n.n(a),l=n(13),p=n.n(l),f=n(12),d=n.n(f),m=n(11),b=n.n(m),h=n(10),O=n.n(h),y=n(7),j=n.n(y),v=n(6);var g=n(2),w=n(5),_=n(9),x=n(1),E=n(3),k=function(e){var t,n,o=e.session,s={link:"#",title:{rendered:Object(x._x)("Tr
ack finished","session title","wordcamporg")},session_date_time:{time:""},session_category:[],_embedded:{"wp:term":{},speakers:[]},meta:{_wcpt_session_type:""}},c=o.session,i=(c=void 0===c?s:c).link,a=void 0===i?"#":i,u=c.title.rendered,l=void 0===u?"":u,p=c.session_date_time.time,f=void 0===p?"":p,d=c.session_category,m=void 0===d?[]:d,b=c._embedded,h=b["wp:term"],O=void 0===h?{}:h,y=b.speakers,j=void 0===y?[]:y,v=c.meta._wcpt_session_type,w=void 0===v?"":v,_=o.track,k=_.name,S=_.slug,N=Object(g.keyBy)(Object(g.flatten)(O),"id"),P=j.filter(function(e){return!!e.id});if(m.length>0){var L=m[0];t=N[L].name,n=N[L].slug}return Object(r.createElement)("div",{className:"wordcamp-schedule-session ".concat(w)},Object(r.createElement)("span",{className:"wordcamp-schedule-session-track ".concat(S)},k),Object(r.createElement)("div&qu
ot;,{className:"wordcamp-schedule-session-details"},Object(r.createElement)("h4",{className:"wordcamp-schedule-session-title"},Object(r.createElement)("a",{href:a},Object(E.stripTagsAndEncodeText)(l))),Object(r.createElement)("span",{className:"wordcamp-schedule-session-time"},f),Object(r.createElement)("span",{className:"wordcamp-schedule-session-speaker"},!!P.length&&P.map(function(e){var t=e.id,n=e.title.rendered,o=e.link;return Object(r.createElement)("a",{key:t,href:o},Object(E.stripTagsAndEncodeText)(n))})),!!t&&Object(r.createElement)("span",{className:"wordcamp-schedule-session-category ".concat(n)},t)))},S=function(e){var t=e.title,n=e.sessionTrackPairs.filter(function(e){return!!e});return Object(r.createElement)("section",null,Object(r.createElement)("h3",null,t),n.map(function(e,t){var n=e.session?e.session.id:t;return n="
".concat(n,"-").concat(e.track.id),Object(r.createElement)(k,{key:n,session:e})}))},N=function(e){var t=function(e){var t=window.dayOfEventConfig.scheduleNowOverride||Date.now(),n=36e5*Object(_.__experimentalGetSettings)().timezone.offset;if(Array.isArray(e.tracks))return e.tracks.map(function(r){var o=Object(g.sortBy)(e.sessions.filter(function(e){return e.session_track.includes(r.id)}),function(e){return e.meta._wcpt_session_time}),s=o.findIndex(function(e){var r=1e3*e.meta._wcpt_session_time-n;return t<r}),c=o[s],i=o[s-1];return{track:r,now:i,next:c}})}({sessions:e.sessionList,tracks:e.trackList}),n=t.map(function(e){return{track:e.track,session:e.now}}).filter(function(e){return!!e.session}),o=t.map(function(e){return{track:e.track,session:e.next}});return Object(r.createElement)(r.Fragment,null,!!n.length&&Object(r.createElement)(S,{sessionTrackPairs:n,title:Object(x._x)("On Now","title","wordcamporg")}),!!o.length&&am
p;Object(r.createElement)(S,{sessionTrackPairs:o,title:Object(x._x)("Up Next","title","wordcamporg")}))},P=function(e){var t=e.fullScheduleUrl,n=e.isFetching,o=e.sessions,s=e.tracks;return Object(r.createElement)("div",{className:"day-of-event-schedule"},Object(r.createElement)("h2",null,Object(x._x)("Live Schedule","title","wordcamporg")),n&&0===o.length&&Object(r.createElement)(w.Spinner,null),(!n||0<o.length)&&Object(r.createElement)(N,{sessionList:o,trackList:s}),Object(r.createElement)("a",{href:t,className:"full-schedule"},Object(x._x)("View Full Schedule","text","wordcamporg")))},L=function(e){var t=e.post,n=t.link,o=t.date_gmt,s=t.title.rendered,c=t.excerpt.rendered,i=t._embedded["wp:term"];Object(g.keyBy)(Object(g.flatten)(i),"id");return Object(r.createElement)("div",{className:&
quot;wordcamp-latest-post"},Object(r.createElement)("h4",{className:"wordcamp-latest-post-title"},Object(r.createElement)("a",{href:n},Object(E.stripTagsAndEncodeText)(s))),Object(r.createElement)("span",{className:"wordcamp-latest-post-date"},new Date(o).toLocaleDateString()),Object(r.createElement)("div",{className:"wordcamp-latest-post-excerpt"},Object(E.stripTagsAndEncodeText)(c)))},F=function(e){var t=e.archiveUrl,n=e.isFetching,o=e.posts;return Object(r.createElement)("div",{className:"day-of-event-latest-posts"},Object(r.createElement)("h2",null,Object(x._x)("Latest Posts","title","wordcamporg")),n&&0===o.length&&Object(r.createElement)(w.Spinner,null),(!n||0<o.length)&&Object(r.createElement)(r.Fragment,null,o.filter(function(e){return!!e}).map(function(e){return Object(r.createElement)(L,{key:e.id,post:e})})),Objec
t(r.createElement)("a",{href:t,className:"all-posts"},Object(x._x)("View all Posts","title","wordcamporg")))},T={sessionList:function(){return j()({path:Object(v.addQueryArgs)("wp/v2/sessions",{per_page:100,status:"publish",_embed:!0})})},trackList:function(){return j()({path:Object(v.addQueryArgs)("wp/v2/session_track",{per_page:100,status:"publish"})})},postList:function(){return j()({path:Object(v.addQueryArgs)("wp/v2/posts",{per_page:3,status:"publish",_embed:!0})})}},A=function(e){function t(e){var n;u()(this,t),(n=d()(this,b()(t).call(this,e))).state={};for(var r=0,o=Object.keys(T);r<o.length;r++){var s=o[r];n.state[s]={isFetching:!0,error:null,data:[]}}return n}return O()(t,e),p()(t,[{key:"updateLists",value:function(){for(var e,t=this,n=function(){var n=o[r];e=T[n],t.setState(function(e){return s()({},n,i()({},e[n],{isFetching:!0}))}),e().then(function(e
){t.setState(s()({},n,{isFetching:!1,data:e}))}).catch(function(e){t.setState(function(t){return i()({},t,s()({},n,i()({},t[n],{isFetching:!1,error:e})))})})},r=0,o=Object.keys(T);r<o.length;r++)n()}},{key:"componentDidMount",value:function(){var e=this;this.updateLists(),this.updateIntervalId=window.setInterval(function(){e.updateLists()},6e4)}},{key:"componentWillUnmount",value:function(){window.clearInterval(this.updateIntervalId)}},{key:"render",value:function(){var e=this.props.config,t=this.state,n=t.postList,o=t.sessionList,s=t.trackList;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(P,{fullScheduleUrl:e.scheduleUrl,isFetching:o.isFetching||s.isFetching,sessions:o.data,tracks:s.data}),Object(r.createElement)(F,{archiveUrl:e.postsArchiveUrl,isfetching:n.isFetching,posts:n.data}))}}]),t}(r.Component);Object(r.render)(Object(r.createElement)(A,{config:window.dayOfEventConfig}),document.getElementById("day-of-event&quo
t;))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r}]);
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventsrcapijs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/api.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/api.js 2019-06-20 15:35:14 UTC (rev 8978)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/api.js 2019-06-20 19:11:55 UTC (rev 8979)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,6 +5,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> import { addQueryArgs } from '@wordpress/url';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> export function fetchSessions() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // todo this is REALLY slow, takes almost 10 seconds on reasonably fast connection
+ // need to pair down to only fields being used, maybe other optimizations discussed in #6
+
</ins><span class="cx" style="display: block; padding: 0 10px"> return apiFetch( {
</span><span class="cx" style="display: block; padding: 0 10px"> path: addQueryArgs( `wp/v2/sessions`, {
</span><span class="cx" style="display: block; padding: 0 10px"> per_page: 100,
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventsrccomponentslatestpostsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/latest-posts.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/latest-posts.js 2019-06-20 15:35:14 UTC (rev 8978)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/latest-posts.js 2019-06-20 19:11:55 UTC (rev 8979)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,6 +26,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> { isFetching && 0 === posts.length &&
</span><span class="cx" style="display: block; padding: 0 10px"> <Spinner />
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ {/* todo not seeing spinner while posts are loading initially */}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> { ( ! isFetching || 0 < posts.length ) &&
</span><span class="cx" style="display: block; padding: 0 10px"> <>
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventsrccomponentsmaincontrollerjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/main-controller.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/main-controller.js 2019-06-20 15:35:14 UTC (rev 8978)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/main-controller.js 2019-06-20 19:11:55 UTC (rev 8979)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -19,6 +19,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // todo need ^ ? should they be class properties instead of separate vars?
</span><span class="cx" style="display: block; padding: 0 10px"> // maybe b/c they're external b/c can't have const class properties?
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+// this wont work when 'coming soon' mode is on, b/c front-end rest api is disabled then?
+ // what's a good way to handle that?
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // todo also unfinished comments on https://github.com/wceu/wordcamp-pwa-page/pull/11
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // todo run linter on everything after removing all the todos, refactoring, etc
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsthemetemplatestemplatesdayofeventsrccomponentsschedulejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/schedule.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/schedule.js 2019-06-20 15:35:14 UTC (rev 8978)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/schedule.js 2019-06-20 19:11:55 UTC (rev 8979)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -58,6 +58,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> const indexOfNextSession = sessionsInTrack.findIndex(
</span><span class="cx" style="display: block; padding: 0 10px"> ( session ) => {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // todo when Schedule block adds session `length` meta fields, should take that into account when calculating what sessions at active
</ins><span class="cx" style="display: block; padding: 0 10px"> const sessionTimeUTC = ( session.meta._wcpt_session_time * 1000 ) - offset; // Convert to UTC, see note above.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return nowUTC < sessionTimeUTC;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -112,16 +113,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> { !! onNowSessions.length &&
</span><span class="cx" style="display: block; padding: 0 10px"> <SessionsGroup
</span><span class="cx" style="display: block; padding: 0 10px"> sessionTrackPairs={ onNowSessions }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- title={ _x( 'In Progress', 'title', 'wordcamporg' ) }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ title={ _x( 'On Now', 'title', 'wordcamporg' ) }
</ins><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ {/* todo "Happening Now" might be a better long-term choice, but need more input. See https://github.com/WordPress/wordcamp.org/issues/127 */}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> { !! upNextSessions.length &&
</span><span class="cx" style="display: block; padding: 0 10px"> <SessionsGroup
</span><span class="cx" style="display: block; padding: 0 10px"> sessionTrackPairs={ upNextSessions }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- title={ _x( 'Coming Up Next', 'title', 'wordcamporg' ) }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ title={ _x( 'Up Next', 'title', 'wordcamporg' ) }
</ins><span class="cx" style="display: block; padding: 0 10px"> />
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ {/* todo "Coming Up Next" might be a better long-term choice, but need more input. See https://github.com/WordPress/wordcamp.org/issues/127 */}
</ins><span class="cx" style="display: block; padding: 0 10px"> </>
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span></span></pre>
</div>
</div>
</body>
</html>