diff -r 20e00017dd60 -r 10974bff4dae web/res/js/popcorn-complete.min.js --- a/web/res/js/popcorn-complete.min.js Fri Dec 11 18:11:13 2015 +0100 +++ b/web/res/js/popcorn-complete.min.js Tue Dec 29 13:25:14 2015 +0100 @@ -1,160 +1,200 @@ /* - * popcorn.js version 1.3 + * popcorn.js version 8ae202a * http://popcornjs.org * * Copyright 2011, Mozilla Foundation * Licensed under the MIT license */ -(function(r,f){function n(a,g){return function(){if(d.plugin.debug)return a.apply(this,arguments);try{return a.apply(this,arguments)}catch(l){d.plugin.errors.push({plugin:g,thrown:l,source:a.toString()});this.emit("pluginerror",d.plugin.errors)}}}if(f.addEventListener){var c=Array.prototype,b=Object.prototype,e=c.forEach,h=c.slice,i=b.hasOwnProperty,j=b.toString,p=r.Popcorn,m=[],o=false,q={events:{hash:{},apis:{}}},s=function(){return r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame|| -r.oRequestAnimationFrame||r.msRequestAnimationFrame||function(a){r.setTimeout(a,16)}}(),d=function(a,g){return new d.p.init(a,g||null)};d.version="1.3";d.isSupported=true;d.instances=[];d.p=d.prototype={init:function(a,g){var l,k=this;if(typeof a==="function")if(f.readyState==="complete")a(f,d);else{m.push(a);if(!o){o=true;var t=function(){f.removeEventListener("DOMContentLoaded",t,false);for(var z=0,C=m.length;z=2?v():k.media.addEventListener("loadeddata",v,false);return this}}};d.p.init.prototype= -d.p;d.byId=function(a){for(var g=d.instances,l=g.length,k=0;k=0;l--){k=a.data.running[g][l];k._natives.end.call(a,null,k)}}return a},enable:function(a,g){if(a.data.disabled[g]){a.data.disabled[g]=false;for(var l=a.data.running[g].length-1,k;l>=0;l--){k=a.data.running[g][l];k._natives.start.call(a,null,k)}}return a},destroy:function(a){var g= -a.data.events,l=a.data.trackEvents,k,t,u,v;for(t in g){k=g[t];for(u in k)delete k[u];g[t]=null}for(v in d.registryByName)d.removePlugin(a,v);l.byStart.length=0;l.byEnd.length=0;if(!a.isDestroyed){a.data.timeUpdate&&a.media.removeEventListener("timeupdate",a.data.timeUpdate,false);a.isDestroyed=true}}});d.guid.counter=1;d.extend(d.p,function(){var a={};d.forEach("load play pause currentTime playbackRate volume duration preload playbackRate autoplay loop controls muted buffered readyState seeking paused played seekable ended".split(/\s+/g), -function(g){a[g]=function(l){var k;if(typeof this.media[g]==="function"){if(l!=null&&/play|pause/.test(g))this.media.currentTime=d.util.toSeconds(l);this.media[g]();return this}if(l!=null){k=this.media[g];this.media[g]=l;k!==l&&this.emit("attrchange",{attribute:g,previousValue:k,currentValue:l});return this}return this.media[g]}});return a}());d.forEach("enable disable".split(" "),function(a){d.p[a]=function(g){return d[a](this,g)}});d.extend(d.p,{roundTime:function(){return Math.round(this.media.currentTime)}, -exec:function(a,g,l){var k=arguments.length,t,u;try{u=d.util.toSeconds(a)}catch(v){}if(typeof u==="number")a=u;if(typeof a==="number"&&k===2){l=g;g=a;a=d.guid("cue")}else if(k===1)g=-1;else if(t=this.getTrackEvent(a)){if(typeof a==="string"&&k===2){if(typeof g==="number")l=t._natives.start;if(typeof g==="function"){l=g;g=t.start}}}else if(k>=2){if(typeof g==="string"){try{u=d.util.toSeconds(g)}catch(z){}g=u}if(typeof g==="number")l=d.nop();if(typeof g==="function"){l=g;g=-1}}d.addTrackEvent(this, -{id:a,start:g,end:g+1,_running:false,_natives:{start:l||d.nop,end:d.nop,type:"cue"}});return this},mute:function(a){a=a==null||a===true?"muted":"unmuted";if(a==="unmuted"){this.media.muted=false;this.media.volume=this.data.state.volume}if(a==="muted"){this.data.state.volume=this.media.volume;this.media.muted=true}this.emit(a);return this},unmute:function(a){return this.mute(a==null?false:!a)},position:function(){return d.position(this.media)},toggle:function(a){return d[this.data.disabled[a]?"enable": -"disable"](this,a)},defaults:function(a,g){if(d.isArray(a)){d.forEach(a,function(l){for(var k in l)this.defaults(k,l[k])},this);return this}if(!this.options.defaults)this.options.defaults={};this.options.defaults[a]||(this.options.defaults[a]={});d.extend(this.options.defaults[a],g);return this}});d.Events={UIEvents:"blur focus focusin focusout load resize scroll unload",MouseEvents:"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave click dblclick",Events:"loadstart progress suspend emptied stalled play pause error loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange"}; -d.Events.Natives=d.Events.UIEvents+" "+d.Events.MouseEvents+" "+d.Events.Events;q.events.apiTypes=["UIEvents","MouseEvents","Events"];(function(a,g){for(var l=q.events.apiTypes,k=a.Natives.split(/\s+/g),t=0,u=k.length;t-1&&this.media.addEventListener(a,function(v){d.forEach(l.data.events[a],function(z){typeof z==="function"&&z.call(l,v)})},false);return this},unlisten:function(a,g){if(this.data.events[a]&&this.data.events[a][g]){delete this.data.events[a][g]; -return this}this.data.events[a]=null;return this}},hooks:{canplayall:{bind:"canplaythrough",add:function(a,g){var l=false;if(this.media.readyState){g.call(this,a);l=true}this.data.hooks.canplayall={fired:l}},handler:function(a,g){if(!this.data.hooks.canplayall.fired){g.call(this,a);this.data.hooks.canplayall.fired=true}}}}};d.forEach([["trigger","emit"],["listen","on"],["unlisten","off"]],function(a){d.p[a[0]]=d.p[a[1]]=d.events.fn[a[0]]});d.addTrackEvent=function(a,g){var l,k;if(g.id)l=a.getTrackEvent(g.id); -if(l){k=true;g=d.extend({},l,g);a.removeTrackEvent(g.id)}if(g&&g._natives&&g._natives.type&&a.options.defaults&&a.options.defaults[g._natives.type])g=d.extend({},a.options.defaults[g._natives.type],g);if(g._natives){g._id=g.id||g._id||d.guid(g._natives.type);a.data.history.push(g._id)}g.start=d.util.toSeconds(g.start,a.options.framerate);g.end=d.util.toSeconds(g.end,a.options.framerate);var t=a.data.trackEvents.byStart,u=a.data.trackEvents.byEnd,v;for(v=t.length-1;v>=0;v--)if(g.start>=t[v].start){t.splice(v+ -1,0,g);break}for(t=u.length-1;t>=0;t--)if(g.end>u[t].end){u.splice(t+1,0,g);break}if(g.end>a.media.currentTime&&g.start<=a.media.currentTime){g._running=true;a.data.running[g._natives.type].push(g);a.data.disabled[g._natives.type]||g._natives.start.call(a,null,g)}v<=a.data.trackEvents.startIndex&&g.start<=a.data.trackEvents.previousUpdateTime&&a.data.trackEvents.startIndex++;t<=a.data.trackEvents.endIndex&&g.end-1;){l=a.data.trackEvents.byStart[v];k=a.data.trackEvents.byEnd[v];if(!l._id){C.push(l); -E.push(k)}if(l._id){l._id!==g&&C.push(l);k._id!==g&&E.push(k);if(l._id===g){z=v;l._natives._teardown&&l._natives._teardown.call(a,l)}}v++}u=a.data.trackEvents.animating.length;v=0;if(u)for(;--u>-1;){l=a.data.trackEvents.animating[v];l._id||B.push(l);l._id&&l._id!==g&&B.push(l);v++}z<=a.data.trackEvents.startIndex&&a.data.trackEvents.startIndex--;z<=a.data.trackEvents.endIndex&&a.data.trackEvents.endIndex--;a.data.trackEvents.byStart=C;a.data.trackEvents.byEnd=E;a.data.trackEvents.animating=B;for(u= -0;ul&&B._running===false){B._running=true;a.data.running[w].push(B);if(!a.data.disabled[w]){k.start.call(a,g,B);a.emit("trackstart",d.extend({},B,{plugin:w,type:"trackstart"}))}}v++}else{d.removeTrackEvent(a,B._id);return}}}else if(k>l){for(;t.byStart[v]&&t.byStart[v].start>l;){B=t.byStart[v];w=(k=B._natives)&& -k.type;if(!k||E[w]||a[w]){if(B._running===true){B._running=false;D=a.data.running[w];D.splice(D.indexOf(B),1);if(!a.data.disabled[w]){k.end.call(a,g,B);a.emit("trackend",d.extend({},B,{plugin:w,type:"trackend"}))}}v--}else{d.removeTrackEvent(a,B._id);return}}for(;t.byEnd[u]&&t.byEnd[u].end>l;){B=t.byEnd[u];w=(k=B._natives)&&k.type;if(!k||E[w]||a[w]){if(B.start<=l&&B._running===false){B._running=true;a.data.running[w].push(B);if(!a.data.disabled[w]){k.start.call(a,g,B);a.emit("trackstart",d.extend({}, -B,{plugin:w,type:"trackstart"}))}}u--}else{d.removeTrackEvent(a,B._id);return}}}t.endIndex=u;t.startIndex=v;t.previousUpdateTime=l;t.byStart.length=0)d.error("'"+a+"' is a protected function name");else{var k=["start","end"],t={},u=typeof g==="function",v=["_setup","_teardown","start","end","frame"],z=function(B,w){B=B||d.nop;w=w|| -d.nop;return function(){B.apply(this,arguments);w.apply(this,arguments)}};d.manifest[a]=l=l||g.manifest||{};v.forEach(function(B){g[B]=n(g[B]||d.nop,a)});var C=function(B,w){if(!w)return this;if(w.ranges&&d.isArray(w.ranges)){d.forEach(w.ranges,function(G){G=d.extend({},w,G);delete G.ranges;this[a](G)},this);return this}var D=w._natives={},F="",I;d.extend(D,B);w._natives.type=a;w._running=false;D.start=D.start||D["in"];D.end=D.end||D.out;if(w.once)D.end=z(D.end,function(){this.removeTrackEvent(w._id)}); -D._teardown=z(function(){var G=h.call(arguments),H=this.data.running[D.type];G.unshift(null);G[1]._running&&H.splice(H.indexOf(w),1)&&D.end.apply(this,G)},D._teardown);w.compose=w.compose&&w.compose.split(" ")||[];w.effect=w.effect&&w.effect.split(" ")||[];w.compose=w.compose.concat(w.effect);w.compose.forEach(function(G){F=d.compositions[G]||{};v.forEach(function(H){D[H]=z(D[H],F[H])})});w._natives.manifest=l;if(!("start"in w))w.start=w["in"]||0;if(!w.end&&w.end!==0)w.end=w.out||Number.MAX_VALUE; -if(!i.call(w,"toString"))w.toString=function(){var G=["start: "+w.start,"end: "+w.end,"id: "+(w.id||w._id)];w.target!=null&&G.push("target: "+w.target);return a+" ( "+G.join(", ")+" )"};if(!w.target){I="options"in l&&l.options;w.target=I&&"target"in I&&I.target}if(w._natives)w._id=d.guid(w._natives.type);w._natives._setup&&w._natives._setup.call(this,w);d.addTrackEvent(this,w);d.forEach(B,function(G,H){H!=="type"&&k.indexOf(H)===-1&&this.on(H,G)},this);return this};d.p[a]=t[a]=function(B,w){var D; -if(B&&!w)w=B;else if(D=this.getTrackEvent(B)){w=d.extend({},D,w);d.addTrackEvent(this,w);return this}else w.id=B;this.data.running[a]=this.data.running[a]||[];D=d.extend({},this.options.defaults&&this.options.defaults[a]||{},w);return C.call(this,u?g.call(this,D):g,D)};l&&d.extend(g,{manifest:l});var E={fn:t[a],definition:g,base:g,parents:[],name:a};d.registry.push(d.extend(t,E,{type:a}));d.registryByName[a]=E;return t}};d.plugin.errors=[];d.plugin.debug=d.version==="1.3";d.removePlugin=function(a, -g){if(!g){g=a;a=d.p;if(d.protect.natives.indexOf(g.toLowerCase())>=0){d.error("'"+g+"' is a protected function name");return}var l=d.registry.length,k;for(k=0;k-1){t=t.split(";");u=0;if(g&&typeof g==="number")u=parseFloat(t[1],10)/g;l[k]=parseInt(t[0],10)+u}k=l[0];return{1:parseFloat(k,10),2:parseInt(k,10)*60+parseFloat(l[1],10),3:parseInt(k,10)*3600+parseInt(l[1],10)*60+parseFloat(l[2],10)}[l.length||1]}};d.p.cue=d.p.exec;d.protect={natives:function(a){return Object.keys?Object.keys(a):function(g){var l,k=[];for(l in g)i.call(g,l)&&k.push(l);return k}(a)}(d.p).map(function(a){return a.toLowerCase()})};d.forEach({listen:"on",unlisten:"off", -trigger:"emit",exec:"cue"},function(a,g){var l=d.p[g];d.p[g]=function(){if(typeof console!=="undefined"&&console.warn){console.warn("Deprecated method '"+g+"', "+(a==null?"do not use.":"use '"+a+"' instead."));d.p[g]=l}return d.p[a].apply(this,[].slice.call(arguments))}});r.Popcorn=d}else{r.Popcorn={isSupported:false};for(c="byId forEach extend effects error guid sizeOf isArray nop position disable enable destroyaddTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId timeUpdate plugin removePlugin compose effect xhr getJSONP getScript".split(/\s+/);c.length;)r.Popcorn[c.shift()]= -function(){}}})(window,window.document);(function(r,f){var n=r.document,c=r.location,b=/:\/\//,e=c.href.replace(c.href.split("/").slice(-1)[0],""),h=function(j,p,m){j=j||0;p=(p||j||0)+1;m=m||1;p=Math.ceil((p-j)/m)||0;var o=0,q=[];for(q.length=p;o= -o["in"]&&j<=o.out)m=q});j+=this.inOuts.ofVideos[m]["in"]-this.inOuts.ofClips[m]["in"];f.addTrackEvent(this.playlist[m],{start:j-1,end:j,_running:false,_natives:{start:p||f.nop,end:f.nop,type:"exec"}});return this},listen:function(j,p){var m=this,o=this.playlist,q=o.length,s=0;if(!p)p=f.nop;if(f.Events.Natives.indexOf(j)>-1)f.forEach(o,function(d){d.listen(j,function(A){A.active=m;if(i.indexOf(j)>-1)p.call(d,A);else++s===q&&p.call(d,A)})});else{this.events[j]||(this.events[j]={});o=p.name||f.guid("__"+ -j);this.events[j][o]=p}return this},unlisten:function(){},trigger:function(j,p){var m=this;if(!(f.Events.Natives.indexOf(j)>-1)){this.events[j]&&f.forEach(this.events[j],function(o){o.call(m,{type:j},p)});return this}}});f.forEach(f.manifest,function(j,p){f.sequence.prototype[p]=function(m){var o={},q=[],s,d,A,y,x;for(s=0;s-1)o[s]=f.extend({},q,{start:d[A],clipIdx:A});if(y>-1)o[s]= -f.extend({},q,{end:d[y],clipIdx:y})}s=Object.keys(o).map(function(g){return+g});q=h(s[0],s[1]);for(s=0;s=0)r.error("'"+n+"' is a protected function name");else{if(typeof c==="function"&&!b){b=c;c=""}if(!(typeof b!=="function"||typeof c!=="string")){var e={};e[n]=function(h,i){if(!h)return this;var j=this;r.xhr({url:h,dataType:c,success:function(p){var m,o,q=0;p=b(p).data||[];if(m=p.length){for(;q=4){o=new Date/1E3;a.dispatchEvent("play");l()}};a.pause=function(){this.paused= -true;a.dispatchEvent("pause")};r.player.defineProperty(a,"currentTime",{get:function(){return q},set:function(k){q=+k;a.dispatchEvent("timeupdate");return q},configurable:true});r.player.defineProperty(a,"volume",{get:function(){return d},set:function(k){d=+k;a.dispatchEvent("volumechange");return d},configurable:true});r.player.defineProperty(a,"muted",{get:function(){return A},set:function(k){A=+k;a.dispatchEvent("volumechange");return A},configurable:true});r.player.defineProperty(a,"readyState", -{get:function(){return s},set:function(k){return s=k},configurable:true});a.addEventListener=function(k,t){y[k]||(y[k]=[]);y[k].push(t);return t};a.removeEventListener=function(k,t){var u,v=y[k];if(v){for(u=y[k].length-1;u>=0;u--)t===v[u]&&v.splice(u,1);return t}};a.dispatchEvent=function(k){var t,u=k.type;if(!u){u=k;if(k=r.events.getInterface(u)){t=document.createEvent(k);t.initEvent(u,true,true,window,1)}}if(y[u])for(k=y[u].length-1;k>=0;k--)y[u][k].call(this,t,this)};a.src=j||"";a.duration=0;a.paused= -true;a.ended=0;p&&p.events&&r.forEach(p.events,function(k,t){a.addEventListener(t,k,false)});if(e._canPlayType(x.nodeName,j)!==false)if(e._setup)e._setup.call(a,p);else{a.readyState=4;a.dispatchEvent("loadedmetadata");a.dispatchEvent("loadeddata");a.dispatchEvent("canplaythrough")}else setTimeout(function(){a.dispatchEvent("error")},0);i=new r.p.init(a,p);if(e._teardown)i.destroy=f(i.destroy,function(){e._teardown.call(a,p)});return i};h.canPlayType=e._canPlayType=e._canPlayType||r.nop;r[b]=r.player.registry[b]= -h}};r.player.registry={};r.player.defineProperty=Object.defineProperty||function(b,e,h){b.__defineGetter__(e,h.get||r.nop);b.__defineSetter__(e,h.set||r.nop)};r.player.playerQueue=function(){var b=[],e=false;return{next:function(){e=false;b.shift();b[0]&&b[0]()},add:function(h){b.push(function(){e=true;h&&h()});!e&&b[0]()}}};r.smart=function(b,e,h){var i=["AUDIO","VIDEO"],j,p=r.dom.find(b),m;j=document.createElement("video");var o={ogg:"video/ogg",ogv:"video/ogg",oga:"audio/ogg",webm:"video/webm", -mp4:"video/mp4",mp3:"audio/mp3"};if(p){if(i.indexOf(p.nodeName)>-1&&!e){if(typeof e==="object")h=e;return r(p,h)}if(typeof e==="string")e=[e];b=0;for(srcLength=e.length;b"+y.title+"

";r.forEach(y.items,function(a,g){if(g"']/g,function(e){return c[e]||e})}function n(b,e){var h=b.container=document.createElement("div"),i=h.style,j=b.media,p=function(){var m=b.position();i.fontSize="18px";i.width=j.offsetWidth+"px";i.top=m.top+j.offsetHeight-h.offsetHeight-40+"px";i.left=m.left+"px";setTimeout(p,10)};h.id=e||"";i.position="absolute";i.color="white";i.textShadow="black 2px 2px 6px";i.fontWeight="bold";i.textAlign="center";p();b.media.parentNode.appendChild(h); -return h}var c={"&":"&","<":"<",">":">",'"':""","'":"'"};r.plugin("text",{manifest:{about:{name:"Popcorn Text Plugin",version:"0.1",author:"@humphd"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},text:{elem:"input",type:"text",label:"Text","default":"Popcorn.js"},escape:{elem:"input",type:"checkbox",label:"Escape"},multiline:{elem:"input",type:"checkbox",label:"Multiline"}}},_setup:function(b){var e,h,i=b._container=document.createElement("div"); -i.style.display="none";if(b.target)if(e=r.dom.find(b.target)){if(["VIDEO","AUDIO"].indexOf(e.nodeName)>-1)e=n(this,b.target+"-overlay")}else e=n(this,b.target);else e=this.container?this.container:n(this);b._target=e;h=b.escape?f(b.text):b.text;h=b.multiline?h.replace(/\r?\n/gm,"
"):h;i.innerHTML=h||"";e.appendChild(i)},start:function(b,e){e._container.style.display="inline"},end:function(b,e){e._container.style.display="none"},_teardown:function(b){var e=b._target;e&&e.removeChild(b._container)}})})(Popcorn);var googleCallback; -(function(r){function f(i,j,p){i=i.type?i.type.toUpperCase():"HYBRID";var m;if(i==="STAMEN-WATERCOLOR"||i==="STAMEN-TERRAIN"||i==="STAMEN-TONER")m=i.replace("STAMEN-","").toLowerCase();p=new google.maps.Map(p,{mapTypeId:m?m:google.maps.MapTypeId[i],mapTypeControlOptions:{mapTypeIds:[]}});m&&p.mapTypes.set(m,new google.maps.StamenMapType(m));p.getDiv().style.display="none";return p}var n=1,c=false,b=false,e,h;googleCallback=function(i){if(typeof google!=="undefined"&&google.maps&&google.maps.Geocoder&& -google.maps.LatLng){e=new google.maps.Geocoder;r.getScript("//maps.stamen.com/js/tile.stamen.js",function(){b=true})}else setTimeout(function(){googleCallback(i)},1)};h=function(){if(document.body){c=true;r.getScript("//maps.google.com/maps/api/js?sensor=false&callback=googleCallback")}else setTimeout(function(){h()},1)};r.plugin("googlemap",function(i){var j,p,m,o=document.getElementById(i.target);i.type=i.type||"ROADMAP";i.zoom=i.zoom||1;i.lat=i.lat||0;i.lng=i.lng||0;c||h();j=document.createElement("div"); -j.id="actualmap"+n;j.style.width=i.width||"100%";j.style.height=i.height?i.height:o&&o.clientHeight?o.clientHeight+"px":"100%";n++;o&&o.appendChild(j);var q=function(){if(b){if(j)if(i.location)e.geocode({address:i.location},function(s,d){if(j&&d===google.maps.GeocoderStatus.OK){i.lat=s[0].geometry.location.lat();i.lng=s[0].geometry.location.lng();m=new google.maps.LatLng(i.lat,i.lng);p=f(i,m,j)}});else{m=new google.maps.LatLng(i.lat,i.lng);p=f(i,m,j)}}else setTimeout(function(){q()},5)};q();return{start:function(s, -d){var A=this,y,x=function(){if(p){d._map=p;p.getDiv().style.display="block";google.maps.event.trigger(p,"resize");p.setCenter(m);if(d.zoom&&typeof d.zoom!=="number")d.zoom=+d.zoom;p.setZoom(d.zoom);if(d.heading&&typeof d.heading!=="number")d.heading=+d.heading;if(d.pitch&&typeof d.pitch!=="number")d.pitch=+d.pitch;if(d.type==="STREETVIEW"){p.setStreetView(y=new google.maps.StreetViewPanorama(j,{position:m,pov:{heading:d.heading=d.heading||0,pitch:d.pitch=d.pitch||0,zoom:d.zoom}}));var a=function(z, -C){var E=google.maps.geometry.spherical.computeHeading;setTimeout(function(){var B=A.media.currentTime;if(typeof d.tween==="object"){for(var w=0,D=z.length;w=F.interval*(w+1)/1E3&&(B<=F.interval*(w+2)/1E3||B>=F.interval*D/1E3)){u.setPosition(new google.maps.LatLng(F.position.lat,F.position.lng));u.setPov({heading:F.pov.heading||E(F,z[w+1])||0,zoom:F.pov.zoom||0,pitch:F.pov.pitch||0})}}a(z,z[0].interval)}else{w=0;for(D=z.length;w=F*(w+1)/1E3&&(B<=F* -(w+2)/1E3||B>=F*D/1E3)){g.setPov({heading:E(z[w],z[w+1])||0,zoom:d.zoom,pitch:d.pitch||0});g.setPosition(l[w])}}a(l,d.interval)}},C)};if(d.location&&typeof d.tween==="string"){var g=y,l=[],k=new google.maps.DirectionsService,t=new google.maps.DirectionsRenderer(g);k.route({origin:d.location,destination:d.tween,travelMode:google.maps.TravelMode.DRIVING},function(z,C){if(C==google.maps.DirectionsStatus.OK){t.setDirections(z);for(var E=z.routes[0].overview_path,B=0,w=E.length;B-1){b.trackedContainer=f(h);b.trackedContainer.element.appendChild(b.anchor)}else h&&h.appendChild(b.anchor); -e.addEventListener("load",function(){e.style.borderStyle="none";b.anchor.href=b.href||b.src||"#";b.anchor.target="_blank";var i,j;e.style.height=h.style.height;e.style.width=h.style.width;b.anchor.appendChild(e);if(b.text){i=e.height/12+"px";j=document.createElement("div");r.extend(j.style,{color:"black",fontSize:i,fontWeight:"bold",position:"relative",textAlign:"center",width:e.style.width||e.width+"px",zIndex:"10"});j.innerHTML=b.text||"";j.style.top=(e.style.height.replace("px","")||e.height)/ -2-j.offsetHeight/2+"px";b.anchor.insertBefore(j,e)}},false);e.src=b.src},start:function(b,e){e.anchor.style.display="inline";e.trackedContainer&&e.trackedContainer.start()},end:function(b,e){e.anchor.style.display="none";e.trackedContainer&&e.trackedContainer.stop()},_teardown:function(b){if(b.trackedContainer)b.trackedContainer.destroy();else b.anchor.parentNode&&b.anchor.parentNode.removeChild(b.anchor)}})})(Popcorn);(function(r){var f=1,n=false;r.plugin("googlefeed",function(c){var b=function(){var j=false,p=0,m=document.getElementsByTagName("link"),o=m.length,q=document.head||document.getElementsByTagName("head")[0],s=document.createElement("link");if(window.GFdynamicFeedControl)n=true;else r.getScript("//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js",function(){n=true});for(;p")); -n=n.replace(/((<(.|\n)+?>)|(\((.*?)\) )|(\[(.*?)\]))/g,"");n=n.split(" ");f._desc.innerHTML=n.slice(0,n.length>=f.numberofwords?f.numberofwords:n.length).join(" ")+" ...";f._fired=true};f.src&&r.getScript("//"+f.lang+".wikipedia.org/w/api.php?action=parse&props=text&redirects&page="+f.src.slice(f.src.lastIndexOf("/")+1)+"&format=json&callback=wikiCallback"+c)},start:function(f,n){var c=function(){if(n._fired){if(n._link&&n._desc)if(document.getElementById(n.target)){document.getElementById(n.target).appendChild(n._link); -document.getElementById(n.target).appendChild(n._desc);n._added=true}}else setTimeout(function(){c()},13)};c()},end:function(f,n){if(n._added){document.getElementById(n.target).removeChild(n._link);document.getElementById(n.target).removeChild(n._desc)}},_teardown:function(f){if(f._added){f._link.parentNode&&document.getElementById(f.target).removeChild(f._link);f._desc.parentNode&&document.getElementById(f.target).removeChild(f._desc);delete f.target}}})})(Popcorn);(function(r){r.plugin("mustache",function(f){var n,c,b,e;r.getScript("http://mustache.github.com/extras/mustache.js");var h=!!f.dynamic,i=typeof f.template,j=typeof f.data,p=document.getElementById(f.target);f.container=p||document.createElement("div");if(i==="function")if(h)b=f.template;else e=f.template(f);else e=i==="string"?f.template:"";if(j==="function")if(h)n=f.data;else c=f.data(f);else c=j==="string"?JSON.parse(f.data):j==="object"?f.data:"";return{start:function(m,o){var q=function(){if(window.Mustache){if(n)c= -n(o);if(b)e=b(o);var s=Mustache.to_html(e,c).replace(/^\s*/mg,"");o.container.innerHTML=s}else setTimeout(function(){q()},10)};q()},end:function(m,o){o.container.innerHTML=""},_teardown:function(){n=c=b=e=null}}},{about:{name:"Popcorn Mustache Plugin",version:"0.1",author:"David Humphrey (@humphd)",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"mustache-container",template:{elem:"input",type:"text", -label:"Template"},data:{elem:"input",type:"text",label:"Data"},dynamic:{elem:"input",type:"checkbox",label:"Dynamic","default":true}}})})(Popcorn);(function(r){function f(c,b){if(c.map)c.map.div.style.display=b;else setTimeout(function(){f(c,b)},10)}var n=1;r.plugin("openmap",function(c){var b,e,h,i,j,p,m,o,q=document.getElementById(c.target);b=document.createElement("div");b.id="openmapdiv"+n;b.style.width="100%";b.style.height="100%";n++;q&&q.appendChild(b);o=function(){if(window.OpenLayers&&window.OpenLayers.Layer.Stamen){if(c.location){location=new OpenLayers.LonLat(0,0);r.getJSONP("//tinygeocoder.com/create-api.php?q="+c.location+"&callback=jsonp", -function(d){e=new OpenLayers.LonLat(d[1],d[0])})}else e=new OpenLayers.LonLat(c.lng,c.lat);c.type=c.type||"ROADMAP";switch(c.type){case "SATELLITE":c.map=new OpenLayers.Map({div:b,maxResolution:0.28125,tileSize:new OpenLayers.Size(512,512)});var s=new OpenLayers.Layer.WorldWind("LANDSAT","//worldwind25.arc.nasa.gov/tile/tile.aspx",2.25,4,{T:"105"});c.map.addLayer(s);i=new OpenLayers.Projection("EPSG:4326");h=new OpenLayers.Projection("EPSG:4326");break;case "TERRAIN":i=new OpenLayers.Projection("EPSG:4326"); -h=new OpenLayers.Projection("EPSG:4326");c.map=new OpenLayers.Map({div:b,projection:h});s=new OpenLayers.Layer.WMS("USGS Terraserver","//terraserver-usa.org/ogcmap.ashx?",{layers:"DRG"});c.map.addLayer(s);break;case "STAMEN-TONER":case "STAMEN-WATERCOLOR":case "STAMEN-TERRAIN":s=c.type.replace("STAMEN-","").toLowerCase();s=new OpenLayers.Layer.Stamen(s);i=new OpenLayers.Projection("EPSG:4326");h=new OpenLayers.Projection("EPSG:900913");e=e.transform(i,h);c.map=new OpenLayers.Map({div:b,projection:h, -displayProjection:i,controls:[new OpenLayers.Control.Navigation,new OpenLayers.Control.PanPanel,new OpenLayers.Control.ZoomPanel]});c.map.addLayer(s);break;default:h=new OpenLayers.Projection("EPSG:900913");i=new OpenLayers.Projection("EPSG:4326");e=e.transform(i,h);c.map=new OpenLayers.Map({div:b,projection:h,displayProjection:i});s=new OpenLayers.Layer.OSM;c.map.addLayer(s)}if(c.map){c.map.setCenter(e,c.zoom||10);c.map.div.style.display="none"}}else setTimeout(function(){o()},50)};o();return{_setup:function(s){window.OpenLayers|| -r.getScript("//openlayers.org/api/OpenLayers.js",function(){r.getScript("//maps.stamen.com/js/tile.stamen.js")});var d=function(){if(s.map){s.zoom=s.zoom||2;if(s.zoom&&typeof s.zoom!=="number")s.zoom=+s.zoom;s.map.setCenter(e,s.zoom);if(s.markers){var A=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style["default"]),y=function(v){clickedFeature=v.feature;if(clickedFeature.attributes.text){m=new OpenLayers.Popup.FramedCloud("featurePopup",clickedFeature.geometry.getBounds().getCenterLonLat(), -new OpenLayers.Size(120,250),clickedFeature.attributes.text,null,true,function(){p.unselect(this.feature)});clickedFeature.popup=m;m.feature=clickedFeature;s.map.addPopup(m)}},x=function(v){feature=v.feature;if(feature.popup){m.feature=null;s.map.removePopup(feature.popup);feature.popup.destroy();feature.popup=null}},a=function(v){r.getJSONP("//tinygeocoder.com/create-api.php?q="+v.location+"&callback=jsonp",function(z){z=(new OpenLayers.Geometry.Point(z[1],z[0])).transform(i,h);var C=OpenLayers.Util.extend({}, -A);if(!v.size||isNaN(v.size))v.size=14;C.pointRadius=v.size;C.graphicOpacity=1;C.externalGraphic=v.icon;z=new OpenLayers.Feature.Vector(z,null,C);if(v.text)z.attributes={text:v.text};j.addFeatures([z])})};j=new OpenLayers.Layer.Vector("Point Layer",{style:A});s.map.addLayer(j);for(var g=0,l=s.markers.length;g0;C--)N[C].end>B&&j.removeTrackEvent(N[C]._id);for(N=0;NB&&j.removeTrackEvent(K[N]._id);j.data.trackEvents.byEnd.push({start:R,end:R});j.data.trackEvents.byStart.push({start:R,end:R})};j.media.addEventListener("durationchange", +j.data.durationChange,false)}if(j.options.frameAnimation){j.data.timeUpdate=function(){g.timeUpdate(j,{});g.forEach(g.manifest,function(B,R){if(r=j.data.running[R]){x=r.length;for(var K=0;K=1?y():j.media.addEventListener("loadedmetadata",y,false);return this}}};g.p.init.prototype=g.p;g.byId=function(a){for(var c=g.instances,l=c.length,j=0;j=0;l--){j=a.data.running[c][l];j._natives.end.call(a, +null,j);a.emit("trackend",g.extend({},j,{plugin:j.type,type:"trackend"}))}return a}},enable:function(a,c){if(a.data.disabled[c]){a.data.disabled[c]=false;if(c in g.registryByName&&a.data.running[c])for(var l=a.data.running[c].length-1,j;l>=0;l--){j=a.data.running[c][l];j._natives.start.call(a,null,j);a.emit("trackstart",g.extend({},j,{plugin:j.type,type:"trackstart",track:j}))}return a}},destroy:function(a){var c=a.data.events,l=a.data.trackEvents,j,s,t,y;for(s in c){j=c[s];for(t in j)delete j[t]; +c[s]=null}for(y in g.registryByName)g.removePlugin(a,y);l.byStart.length=0;l.byEnd.length=0;if(!a.isDestroyed){a.data.timeUpdate&&a.media.removeEventListener("timeupdate",a.data.timeUpdate,false);a.isDestroyed=true}g.instances.splice(g.instances.indexOf(a),1)}});g.guid.counter=1;g.extend(g.p,function(){var a={};g.forEach("load play pause currentTime playbackRate volume duration preload playbackRate autoplay loop controls muted buffered readyState seeking paused played seekable ended".split(/\s+/g), +function(c){a[c]=function(l){var j;if(typeof this.media[c]==="function"){if(l!=null&&/play|pause/.test(c))this.media.currentTime=g.util.toSeconds(l);this.media[c]();return this}if(l!=null){j=this.media[c];this.media[c]=l;j!==l&&this.emit("attrchange",{attribute:c,previousValue:j,currentValue:l});return this}return this.media[c]}});return a}());g.forEach("enable disable".split(" "),function(a){g.p[a]=function(c){return g[a](this,c)}});g.extend(g.p,{roundTime:function(){return Math.round(this.media.currentTime)}, +exec:function(a,c,l){var j=arguments.length,s="trackadded",t,y;try{y=g.util.toSeconds(a)}catch(D){}if(typeof y==="number")a=y;if(typeof a==="number"&&j===2){l=c;c=a;a=g.guid("cue")}else if(j===1)c=-1;else if(t=this.getTrackEvent(a)){this.data.trackEvents.remove(a);k.end(this,t);g.removeTrackEvent.ref(this,a);s="cuechange";if(typeof a==="string"&&j===2){if(typeof c==="number")l=t._natives.start;if(typeof c==="function"){l=c;c=t.start}}}else if(j>=2){if(typeof c==="string"){try{y=g.util.toSeconds(c)}catch(r){}c= +y}if(typeof c==="number")l=l||g.nop();if(typeof c==="function"){l=c;c=-1}}j={id:a,start:c,end:c+1,_running:false,_natives:{start:l||g.nop,end:g.nop,type:"cue"}};if(t)j=g.extend(t,j);if(s==="cuechange"){j._id=j.id||j._id||g.guid(j._natives.type);this.data.trackEvents.add(j);k.start(this,j);this.timeUpdate(this,null,true);g.addTrackEvent.ref(this,j);this.emit(s,g.extend({},j,{id:a,type:s,previousValue:{time:t.start,fn:t._natives.start},currentValue:{time:c,fn:l||g.nop},track:t}))}else g.addTrackEvent(this, +j);return this},mute:function(a){a=a==null||a===true?"muted":"unmuted";if(a==="unmuted"){this.media.muted=false;this.media.volume=this.data.state.volume}if(a==="muted"){this.data.state.volume=this.media.volume;this.media.muted=true}this.emit(a);return this},unmute:function(a){return this.mute(a==null?false:!a)},position:function(){return g.position(this.media)},toggle:function(a){return g[this.data.disabled[a]?"enable":"disable"](this,a)},defaults:function(a,c){if(g.isArray(a)){g.forEach(a,function(l){for(var j in l)this.defaults(j, +l[j])},this);return this}if(!this.options.defaults)this.options.defaults={};this.options.defaults[a]||(this.options.defaults[a]={});g.extend(this.options.defaults[a],c);return this}});g.Events={UIEvents:"blur focus focusin focusout load resize scroll unload",MouseEvents:"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave click dblclick",Events:"loadstart progress suspend emptied stalled play pause error loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange"}; +g.Events.Natives=g.Events.UIEvents+" "+g.Events.MouseEvents+" "+g.Events.Events;z.events.apiTypes=["UIEvents","MouseEvents","Events"];(function(a,c){for(var l=z.events.apiTypes,j=a.Natives.split(/\s+/g),s=0,t=j.length;s-1&&this.media.addEventListener(a,function(D){if(l.data.events[a])for(t=l.data.events[a].slice();t.length;)t.shift().call(l,D)},false);return this},unlisten:function(a,c){var l,j=this.data.events[a];if(j){if(typeof c=== +"string"){for(l=0;la.media.currentTime&&c.start<=a.media.currentTime&&!c._running){c._running=true;a.data.running[c._natives.type].push(c);if(!a.data.disabled[c._natives.type]){c._natives.start.call(a,null,c);a.emit("trackstart",g.extend({},c,{plugin:c._natives.type,type:"trackstart",track:c}))}}};k.end=function(a,c){var l;if((c.end<=a.media.currentTime||c.start> +a.media.currentTime)&&c._running){l=a.data.running[c._natives.type];c._running=false;l.splice(l.indexOf(c),1);if(!a.data.disabled[c._natives.type]){c._natives.end.call(a,null,c);a.emit("trackend",g.extend({},c,{plugin:c._natives.type,type:"trackend",track:c}))}}};d.prototype.where=function(a){return(this.parent.getTrackEvents()||[]).filter(function(c){var l,j;if(!a)return true;for(l in a){j=a[l];if(c[l]&&c[l]===j||c._natives[l]&&c._natives[l]===j)return true}return false})};d.prototype.add=function(a){var c= +this.byStart,l=this.byEnd,j;a&&a._id&&this.parent.data.history.push(a._id);a.start=g.util.toSeconds(a.start,this.parent.options.framerate);a.end=g.util.toSeconds(a.end,this.parent.options.framerate);for(j=c.length-1;j>=0;j--)if(a.start>=c[j].start){c.splice(j+1,0,a);break}for(c=l.length-1;c>=0;c--)if(a.end>l[c].end){l.splice(c+1,0,a);break}j<=this.parent.data.trackEvents.startIndex&&a.start<=this.parent.data.trackEvents.previousUpdateTime&&this.parent.data.trackEvents.startIndex++;c<=this.parent.data.trackEvents.endIndex&& +a.end-1;){c=this.byStart[s];l=this.byEnd[s];if(!c._id){y.push(c);D.push(l)}if(c._id){c._id!==a&&y.push(c);l._id!==a&&D.push(l);if(c._id===a)t=s}s++}j=this.animating.length; +s=0;if(j)for(;--j>-1;){c=this.animating[s];c._id||r.push(c);c._id&&c._id!==a&&r.push(c);s++}t<=this.startIndex&&this.startIndex--;t<=this.endIndex&&this.endIndex--;this.byStart=y;this.byEnd=D;this.animating=r;this.count--;j=this.parent.data.history.length;for(s=0;sl&&x._running===false){x._running=true;a.data.running[p].push(x);if(!a.data.disabled[p]){j.start.call(a,c, +x);a.emit("trackstart",g.extend({},x,{plugin:p,type:"trackstart",track:x}))}}y++}else{g.removeTrackEvent(a,x._id);return}}}else if(j>l){for(;s.byStart[y]&&s.byStart[y].start>l;){x=s.byStart[y];p=(j=x._natives)&&j.type;if(!j||M[p]||a[p]){if(x._running===true){x._running=false;B=a.data.running[p];B.splice(B.indexOf(x),1);if(!a.data.disabled[p]){j.end.call(a,c,x);a.emit("trackend",g.extend({},x,{plugin:p,type:"trackend",track:x}))}}y--}else{g.removeTrackEvent(a,x._id);return}}for(;s.byEnd[t]&&s.byEnd[t].end> +l;){x=s.byEnd[t];p=(j=x._natives)&&j.type;if(!j||M[p]||a[p]){if(x.start<=l&&x._running===false){x._running=true;a.data.running[p].push(x);if(!a.data.disabled[p]){j.start.call(a,c,x);a.emit("trackstart",g.extend({},x,{plugin:p,type:"trackstart",track:x}))}}t--}else{g.removeTrackEvent(a,x._id);return}}}s.endIndex=t;s.startIndex=y;s.previousUpdateTime=l;s.byStart.length= +0)g.error("'"+a+"' is a protected function name");else{var j=typeof c==="function",s=["start","end","type","manifest"],t=["_setup","_teardown","start","end","frame"],y={},D=function(x,p){x=x||g.nop;p=p||g.nop;return function(){x.apply(this,arguments);p.apply(this,arguments)}};g.manifest[a]=l=l||c.manifest||{};t.forEach(function(x){c[x]=b(c[x]||g.nop,a)});var r=function(x,p){if(!p)return this;if(p.ranges&&g.isArray(p.ranges)){g.forEach(p.ranges,function(N){N=g.extend({},p,N);delete N.ranges;this[a](N)}, +this);return this}var B=p._natives={},R="",K;g.extend(B,x);p._natives.type=p._natives.plugin=a;p._running=false;B.start=B.start||B["in"];B.end=B.end||B.out;if(p.once)B.end=D(B.end,function(){this.removeTrackEvent(p._id)});B._teardown=D(function(){var N=n.call(arguments),C=this.data.running[B.type];N.unshift(null);N[1]._running&&C.splice(C.indexOf(p),1)&&B.end.apply(this,N);N[1]._running=false;this.emit("trackend",g.extend({},p,{plugin:B.type,type:"trackend",track:g.getTrackEvent(this,p.id||p._id)}))}, +B._teardown);B._teardown=D(B._teardown,function(){this.emit("trackteardown",g.extend({},p,{plugin:a,type:"trackteardown",track:g.getTrackEvent(this,p.id||p._id)}))});p.compose=p.compose||[];if(typeof p.compose==="string")p.compose=p.compose.split(" ");p.effect=p.effect||[];if(typeof p.effect==="string")p.effect=p.effect.split(" ");p.compose=p.compose.concat(p.effect);p.compose.forEach(function(N){R=g.compositions[N]||{};t.forEach(function(C){B[C]=D(B[C],R[C])})});p._natives.manifest=l;if(!("start"in +p))p.start=p["in"]||0;if(!p.end&&p.end!==0)p.end=p.out||Number.MAX_VALUE;if(!u.call(p,"toString"))p.toString=function(){var N=["start: "+p.start,"end: "+p.end,"id: "+(p.id||p._id)];p.target!=null&&N.push("target: "+p.target);return a+" ( "+N.join(", ")+" )"};if(!p.target){K="options"in l&&l.options;p.target=K&&"target"in K&&K.target}if(!p._id&&p._natives)p._id=g.guid(p._natives.type);if(p instanceof k){if(p._natives){p._id=p.id||p._id||g.guid(p._natives.type);if(p._natives._setup){p._natives._setup.call(this, +p);this.emit("tracksetup",g.extend({},p,{plugin:p._natives.type,type:"tracksetup",track:p}))}}this.data.trackEvents.add(p);k.start(this,p);this.timeUpdate(this,null,true);p._id&&g.addTrackEvent.ref(this,p)}else g.addTrackEvent(this,p);g.forEach(x,function(N,C){s.indexOf(C)===-1&&this.on(C,N)},this);return this};g.p[a]=y[a]=function(x,p){var B,R;if(x&&!p)p=x;else if(B=this.getTrackEvent(x)){R=p;var K={},N;for(N in B)if(u.call(R,N)&&u.call(B,N))K[N]=B[N];if(B._natives._update){this.data.trackEvents.remove(B); +if(u.call(p,"start"))B.start=p.start;if(u.call(p,"end"))B.end=p.end;k.end(this,B);j&&c.call(this,B);B._natives._update.call(this,B,p);this.data.trackEvents.add(B);k.start(this,B)}else{g.extend(B,p);this.data.trackEvents.remove(x);B._natives._teardown&&B._natives._teardown.call(this,B);g.removeTrackEvent.ref(this,x);if(j)r.call(this,c.call(this,B),B);else{B._id=B.id||B._id||g.guid(B._natives.type);if(B._natives&&B._natives._setup){B._natives._setup.call(this,B);this.emit("tracksetup",g.extend({},B, +{plugin:B._natives.type,type:"tracksetup",track:B}))}this.data.trackEvents.add(B);k.start(this,B);this.timeUpdate(this,null,true);g.addTrackEvent.ref(this,B)}this.emit("trackchange",{id:B.id,type:"trackchange",previousValue:K,currentValue:B,track:B});return this}B._natives.type!=="cue"&&this.emit("trackchange",{id:B.id,type:"trackchange",previousValue:K,currentValue:R,track:B});return this}else p.id=x;this.data.running[a]=this.data.running[a]||[];B=g.extend({},this.options.defaults&&this.options.defaults[a]|| +{},p);r.call(this,j?c.call(this,B):c,B);return this};l&&g.extend(c,{manifest:l});var M={fn:y[a],definition:c,base:c,parents:[],name:a};g.registry.push(g.extend(y,M,{type:a}));g.registryByName[a]=M;return y}};g.plugin.errors=[];g.plugin.debug=g.version==="8ae202a";g.removePlugin=function(a,c){if(!c){c=a;a=g.p;if(g.protect.natives.indexOf(c.toLowerCase())>=0){g.error("'"+c+"' is a protected function name");return}var l=g.registry.length,j;for(j=0;j-1){s=s.split(";");t=0;if(c&&typeof c==="number")t=parseFloat(s[1],10)/c;l[j]=parseInt(s[0],10)+t}j=l[0];return{1:parseFloat(j,10),2:parseInt(j,10)*60+parseFloat(l[1],10),3:parseInt(j,10)*3600+parseInt(l[1],10)*60+parseFloat(l[2],10)}[l.length||1]}};g.p.cue=g.p.exec;g.protect={natives:function(a){return Object.keys?Object.keys(a):function(c){var l,j=[];for(l in c)u.call(c,l)&&j.push(l);return j}(a)}(g.p).map(function(a){return a.toLowerCase()})}; +g.forEach({listen:"on",unlisten:"off",trigger:"emit",exec:"cue"},function(a,c){var l=g.p[c];g.p[c]=function(){if(typeof console!=="undefined"&&console.warn){console.warn("Deprecated method '"+c+"', "+(a==null?"do not use.":"use '"+a+"' instead."));g.p[c]=l}return g.p[a].apply(this,[].slice.call(arguments))}});m.Popcorn=g}else{m.Popcorn={isSupported:false};for(f="byId forEach extend effects error guid sizeOf isArray nop position disable enable destroyaddTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId timeUpdate plugin removePlugin compose effect xhr getJSONP getScript".split(/\s+/);f.length;)m.Popcorn[f.shift()]= +function(){}}})(window,window.document);(function(m,i){function k(f){f=typeof f==="string"?f:[f.language,f.region].join("-");var h=f.split("-");return{iso6391:f,language:h[0]||"",region:h[1]||""}}var d=m.navigator,b=k(d.userLanguage||d.language);i.locale={get:function(){return b},set:function(f){b=k(f);i.locale.broadcast();return b},broadcast:function(f){var h=i.instances,e=h.length,n=0,u;for(f=f||"locale:changed";n=0)m.error("'"+k+"' is a protected function name");else{if(typeof d==="function"&&!b){b=d;d=""}if(!(typeof b!=="function"||typeof d!=="string")){var f={};f[k]=function(h,e,n){if(!h)return this;if(typeof e!=="function"&&!n){n=e;e=null}var u=this;m.xhr({url:h,dataType:d,success:function(q){var v,w,o=0;q=b(q,n).data||[];if(v=q.length){for(;o=4){u=new Date/1E3;E.dispatchEvent("play");G()}};E.pause=function(){this.paused=true;E.dispatchEvent("pause")};m.player.defineProperty(E,"currentTime",{get:function(){return q}, +set:function(A){q=+A;E.dispatchEvent("timeupdate");return q},configurable:true});m.player.defineProperty(E,"volume",{get:function(){return w},set:function(A){w=+A;E.dispatchEvent("volumechange");return w},configurable:true});m.player.defineProperty(E,"muted",{get:function(){return o},set:function(A){o=+A;E.dispatchEvent("volumechange");return o},configurable:true});m.player.defineProperty(E,"readyState",{get:function(){return v},set:function(A){return v=A},configurable:true});E.addEventListener=function(A, +O){z[A]||(z[A]=[]);z[A].push(O);return O};E.removeEventListener=function(A,O){var a,c=z[A];if(c){for(a=z[A].length-1;a>=0;a--)O===c[a]&&c.splice(a,1);return O}};E.dispatchEvent=function(A){var O,a=A.type;if(!a){a=A;if(A=m.events.getInterface(a)){O=document.createEvent(A);O.initEvent(a,true,true,window,1)}}if(z[a])for(A=z[a].length-1;A>=0;A--)z[a][A].call(this,O,this)};E.src=h||"";E.duration=0;E.paused=true;E.ended=0;e&&e.events&&m.forEach(e.events,function(A,O){E.addEventListener(O,A,false)});if(d._canPlayType(J.nodeName, +h)!==false)if(d._setup)d._setup.call(E,e);else{E.readyState=4;E.dispatchEvent("loadedmetadata");E.dispatchEvent("loadeddata");E.dispatchEvent("canplaythrough")}else setTimeout(function(){E.dispatchEvent("error")},0);f=new m.p.init(E,e);if(d._teardown)f.destroy=i(f.destroy,function(){d._teardown.call(E,e)});return f};b.canPlayType=d._canPlayType=d._canPlayType||m.nop;m[k]=m.player.registry[k]=b}};m.player.registry={};m.player.defineProperty=Object.defineProperty||function(k,d,b){k.__defineGetter__(d, +b.get||m.nop);k.__defineSetter__(d,b.set||m.nop)};m.player.playerQueue=function(){var k=[],d=false;return{next:function(){d=false;k.shift();k[0]&&k[0]()},add:function(b){k.push(function(){d=true;b&&b()});!d&&k[0]()}}};m.smart=function(k,d,b){var f=typeof k==="string"?m.dom.find(k):k,h,e,n,u,q,v="HTMLYouTubeVideoElement HTMLVimeoVideoElement HTMLSoundCloudAudioElement HTMLNullVideoElement".split(" ");if(f){d=typeof d==="string"?[d]:d;k=0;for(q=d.length;k';k=0;for(q=d.length;k';v+="";e.innerHTML=v;b&&b.events&&b.events.error&&f.addEventListener("error",b.events.error,false);return m("#"+w,b)}else m.error("Specified target `"+k+"` was not found.")}})(Popcorn);(function(m){document.addEventListener("DOMContentLoaded",function(){var i=document.querySelectorAll("[data-timeline-sources]");m.forEach(i,function(k,d){var b=i[d],f,h,e;if(!b.id)b.id=m.guid("__popcorn");if(b.nodeType&&b.nodeType===1){e=m("#"+b.id);f=(b.getAttribute("data-timeline-sources")||"").split(",");f[0]&&m.forEach(f,function(n){h=n.split("!");if(h.length===1){h=n.match(/(.*)[\/\\]([^\/\\]+\.\w+)$/)[2].split(".");h[0]="parse"+h[1].toUpperCase();h[1]=n}f[0]&&e[h[0]]&&e[h[0]](h[1])});e.autoplay()&& +e.play()}})},false)})(Popcorn);(function(m,i){function k(b){var f=k.options;b=f.parser[f.strictMode?"strict":"loose"].exec(b);for(var h={},e=14;e--;)h[f.key[e]]=b[e]||"";h[f.q.name]={};h[f.key[12]].replace(f.q.parser,function(n,u,q){if(u)h[f.q.name][u]=q});return h}k.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, +loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var d={length:0,start:m.nop,end:m.nop};window.MediaError=window.MediaError||function(){function b(f,h){this.code=f||null;this.message=h||""}b.MEDIA_ERR_NONE_ACTIVE=0;b.MEDIA_ERR_ABORTED=1;b.MEDIA_ERR_NETWORK=2;b.MEDIA_ERR_DECODE=3;b.MEDIA_ERR_NONE_SUPPORTED=4;return b}();m._MediaElementProto=function(){var b= +{},f;Object.prototype.__defineGetter__||(b=i.createElement("div"));b._util={type:"HTML5",TIMEUPDATE_MS:250,MIN_WIDTH:300,MIN_HEIGHT:150,isAttributeSet:function(h){return typeof h==="string"||h===true},parseUri:k};b.addEventListener=function(h,e,n){i.addEventListener(this._eventNamespace+h,e,n)};b.removeEventListener=function(h,e,n){i.removeEventListener(this._eventNamespace+h,e,n)};b.dispatchEvent=function(h){var e=i.createEvent("CustomEvent");e.initCustomEvent(this._eventNamespace+h,false,false, +{type:h,target:this.parentNode,data:null});i.dispatchEvent(e)};b.load=m.nop;b.canPlayType=function(){return""};b.getBoundingClientRect=function(){return f.getBoundingClientRect()};b.NETWORK_EMPTY=0;b.NETWORK_IDLE=1;b.NETWORK_LOADING=2;b.NETWORK_NO_SOURCE=3;b.HAVE_NOTHING=0;b.HAVE_METADATA=1;b.HAVE_CURRENT_DATA=2;b.HAVE_FUTURE_DATA=3;b.HAVE_ENOUGH_DATA=4;Object.defineProperties(b,{currentSrc:{get:function(){return this.src!==undefined?this.src:""},configurable:true},parentNode:{get:function(){return f}, +set:function(h){f=h},configurable:true},preload:{get:function(){return"auto"},set:m.nop,configurable:true},controls:{get:function(){return true},set:m.nop,configurable:true},poster:{get:function(){return""},set:m.nop,configurable:true},crossorigin:{get:function(){return""},configurable:true},played:{get:function(){return d},configurable:true},seekable:{get:function(){return d},configurable:true},buffered:{get:function(){return d},configurable:true},defaultMuted:{get:function(){return false},configurable:true}, +defaultPlaybackRate:{get:function(){return 1},configurable:true},style:{get:function(){return this.parentNode.style},configurable:true},id:{get:function(){return this.parentNode.id},configurable:true}});return b}})(Popcorn,window.document);(function(m,i){function k(){return"maybe"}function d(b,f){var h=typeof b==="string"?i.querySelector(b):b,e=i.createElement(f);h.appendChild(e);e._canPlaySrc=k;return e}m.HTMLVideoElement=function(b){return d(b,"video")};m.HTMLVideoElement._canPlaySrc=k;m.HTMLAudioElement=function(b){return d(b,"audio")};m.HTMLAudioElement._canPlaySrc=k})(Popcorn,window.document);(function(m,i,k){function d(){if(i.jwplayer){n=true;for(var v=q.length;v--;){q[v]();delete q[v]}}else setTimeout(d,100)}function b(){if(!u){if(!i.jwplayer){var v=k.createElement("script");v.src="https://jwpsrv.com/library/zaIF4JI9EeK2FSIACpYGxA.js";var w=k.getElementsByTagName("script")[0];w.parentNode.insertBefore(v,w)}u=true;d()}return n}function f(v){q.unshift(v)}function h(v){function w(L){C.unshift(L)}function o(){var L=K.getDuration();if(L==-1||L==undefined)setTimeout(o,0);else{r.duration=L; +y.dispatchEvent("durationchange");M=true;r.readyState=y.HAVE_METADATA;y.dispatchEvent("loadedmetadata");y.dispatchEvent("loadeddata");r.readyState=y.HAVE_FUTURE_DATA;y.dispatchEvent("canplay");for(B=true;C.length;){C[0]();C.shift()}r.readyState=y.HAVE_ENOUGH_DATA;y.dispatchEvent("canplaythrough")}}function z(){if(x)x=false;else if(H){H=false;o()}else l()}function J(){if(r.seeking){r.ended=false;r.seeking=false;y.dispatchEvent("timeupdate");y.dispatchEvent("seeked");y.dispatchEvent("canplay");y.dispatchEvent("canplaythrough")}} +function E(){K.onPause(z);K.onTime(function(){if(!r.ended&&!r.seeking){r.currentTime=K.getPosition();y.dispatchEvent("timeupdate")}});K.onSeek(J);K.onPlay(function(){if(!r.ended)if(S){S=false;if(r.autoplay||!r.paused){r.paused=false;w(a);o()}else{p=H=true;K.pause(true)}}else if(p){p=false;x=true;K.pause(true)}else a()});K.onBufferChange(c);K.onComplete(j);K.play(true)}function g(L){var T={name:"MediaError"};T.message=L.message;T.code=L.code||5;r.error=T;y.dispatchEvent("error")}function G(L){if(y._canPlaySrc(L)){var T= +y._util.parseUri(L).queryKey;r.controls=T.controls=T.controls||r.controls;r.src=L;if(b()){if(M)M&&K&&K.destroy();T={width:"100%",height:"100%",autostart:r.autoplay,controls:r.controls};if(typeof L=="string")T.file=L;else T.sources=L;jwplayer(D.id).setup(T);K=jwplayer(D.id);K.onReady(E);K.onError(g);jwplayer.utils.log=function(F,V){if(typeof console!=="undefined"&&typeof console.log!=="undefined")V?console.log(F,V):console.log(F);F==="No suitable players found and fallback enabled"&&g({message:F,code:4})}; +r.networkState=y.NETWORK_LOADING;y.dispatchEvent("loadstart");y.dispatchEvent("progress")}else f(function(){G(L)})}else{r.error={name:"MediaError",message:"Media Source Not Supported",code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};y.dispatchEvent("error")}}function A(L){r.currentTime=L;if(B){O();K.seek(L)}else w(function(){O();K.seek(L)})}function O(){r.seeking=true;if(r.paused)p=true;y.dispatchEvent("seeking")}function a(){r.paused=false;if(M&&N){N=false;if(r.loop&&!R||!r.loop){R=true;y.dispatchEvent("play")}y.dispatchEvent("playing")}} +function c(){y.dispatchEvent("progress")}function l(){r.paused=true;if(!N){N=true;y.dispatchEvent("pause")}}function j(){if(r.loop)A(0);else{r.ended=true;l();y.dispatchEvent("timeupdate");y.dispatchEvent("ended")}}function s(L){r.volume=L;if(B){K.setVolume(r.volume*100);y.dispatchEvent("volumechange")}else w(function(){s(r.volume)})}function t(L){r.muted=L;if(B){K.setMute(L);y.dispatchEvent("volumechange")}else w(function(){t(r.muted)})}if(!i.postMessage)throw"ERROR: HTMLJWPlayerVideoElement requires window.postMessage"; +var y=new m._MediaElementProto,D=typeof v==="string"?k.querySelector(v):v,r={src:e,networkState:y.NETWORK_EMPTY,readyState:y.HAVE_NOTHING,seeking:false,autoplay:e,preload:e,controls:false,loop:false,poster:e,volume:1,muted:false,currentTime:0,duration:NaN,ended:false,paused:true,error:null},M=false,x=false,p=false,B=false,R=false,K,N=true,C=[],S=true,H=false;y._eventNamespace=m.guid("HTMLJWPlayerVideoElement::");y.parentNode=D;y._util.type="JWPlayer";y.play=function(){y.dispatchEvent("play");r.paused= +false;if(B){if(r.ended){A(0);r.ended=false}K.play(true)}else w(function(){y.play()})};y.pause=function(){r.paused=true;B?K.pause(true):w(function(){y.pause()})};Object.defineProperties(y,{src:{get:function(){return r.src},set:function(L){L&&L!==r.src&&G(L)}},autoplay:{get:function(){return r.autoplay},set:function(L){r.autoplay=y._util.isAttributeSet(L)}},loop:{get:function(){return r.loop},set:function(L){r.loop=y._util.isAttributeSet(L)}},width:{get:function(){return y.parentNode.offsetWidth}}, +height:{get:function(){return y.parentNode.offsetHeight}},currentTime:{get:function(){return r.currentTime},set:function(L){A(L)}},duration:{get:function(){return K.getDuration()}},ended:{get:function(){return r.ended}},paused:{get:function(){return r.paused}},seeking:{get:function(){return r.seeking}},readyState:{get:function(){return r.readyState}},networkState:{get:function(){return r.networkState}},volume:{get:function(){return r.volume},set:function(L){if(L<0||L>1)throw"Volume value must be between 0.0 and 1.0"; +s(L)}},muted:{get:function(){return r.muted},set:function(L){t(y._util.isAttributeSet(L))}},error:{get:function(){return r.error}},buffered:{get:function(){return{start:function(L){if(L===0)return 0;throw"INDEX_SIZE_ERR: DOM Exception 1";},end:function(L){if(L===0){L=K.getDuration();if(!L)return 0;return L*(K.getBuffer()/100)}throw"INDEX_SIZE_ERR: DOM Exception 1";},length:1}}}});y._canPlaySrc=m.HTMLJWPlayerVideoElement._canPlaySrc;y.canPlayType=m.HTMLJWPlayerVideoElement.canPlayType;return y}var e= +"",n=false,u=false,q=[];m.HTMLJWPlayerVideoElement=function(v){return new h(v)};m.HTMLJWPlayerVideoElement._canPlaySrc=function(v){if(typeof v=="string"){if(/.+\.+/g.exec(v))return"probably"}else return"probably"};m.HTMLJWPlayerVideoElement.canPlayType=function(){return"probably"}})(Popcorn,window,document);(function(m,i){function k(h){this.startTime=0;this.currentTime=h.currentTime||0;this.duration=h.duration||NaN;this.playInterval=null;this.paused=true;this.playbackRate=this.defaultPlaybackRate=1;this.ended=h.endedCallback||m.nop}function d(h){function e(a){A.push(a)}function n(){if(!E)return 0;return g.currentTime}function u(a){if(a!==n())if(E){G.seeking=true;o.dispatchEvent("seeking");g.seekTo(a);G.ended=false;G.seeking=false;o.dispatchEvent("timeupdate");o.dispatchEvent("seeked");o.dispatchEvent("canplay"); +o.dispatchEvent("canplaythrough")}else e(function(){u(a)})}function q(){o.dispatchEvent("timeupdate")}function v(){G.paused=true;clearInterval(O);o.dispatchEvent("pause")}function w(){if(G.loop){u(0);o.play()}else{G.ended=true;v();o.dispatchEvent("timeupdate");o.dispatchEvent("ended")}}var o=new m._MediaElementProto,z=typeof h==="string"?i.querySelector(h):h,J=i.createElement("div"),E=false,g,G={src:b,networkState:o.NETWORK_EMPTY,readyState:o.HAVE_NOTHING,autoplay:b,preload:b,controls:b,loop:false, +poster:b,volume:1,muted:false,width:z.width|0?z.width:o._util.MIN_WIDTH,height:z.height|0?z.height:o._util.MIN_HEIGHT,seeking:false,ended:false,paused:1,error:null},A=[],O;o._eventNamespace=m.guid("HTMLNullVideoElement::");o.parentNode=z;o._util.type="NullVideo";o.play=function(){if(E){g.play();if(G.paused){if(G.paused===1){G.paused=false;o.dispatchEvent("play");o.dispatchEvent("playing")}else{if(G.ended){u(0);G.ended=false}if(G.paused){G.paused=false;G.loop||o.dispatchEvent("play");o.dispatchEvent("playing")}}O= +setInterval(q,o._util.TIMEUPDATE_MS)}}else e(function(){o.play()})};o.pause=function(){if(E){g.pause();G.paused||v()}else e(function(){o.pause()})};Object.defineProperties(o,{src:{get:function(){return G.src},set:function(a){if(a&&a!==G.src)if(o._canPlaySrc(a)){G.src=a;if(E)if(E&&g){g.pause();g=null;z.removeChild(J);J=i.createElement("div")}J.width=G.width;J.height=G.height;z.appendChild(J);a=f.exec(a);g=new k({currentTime:+a[1],duration:+a[2],endedCallback:w});o.dispatchEvent("loadstart");o.dispatchEvent("progress"); +o.dispatchEvent("durationchange");E=true;G.networkState=o.NETWORK_IDLE;G.readyState=o.HAVE_METADATA;o.dispatchEvent("loadedmetadata");o.dispatchEvent("loadeddata");G.readyState=o.HAVE_FUTURE_DATA;o.dispatchEvent("canplay");G.readyState=o.HAVE_ENOUGH_DATA;for(o.dispatchEvent("canplaythrough");A.length;){a=A.shift();a()}G.autoplay&&o.play()}else{G.error={name:"MediaError",message:"Media Source Not Supported",code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};o.dispatchEvent("error")}}},autoplay:{get:function(){return G.autoplay}, +set:function(a){G.autoplay=o._util.isAttributeSet(a)}},loop:{get:function(){return G.loop},set:function(a){G.loop=o._util.isAttributeSet(a)}},width:{get:function(){return J.width},set:function(a){J.width=a;G.width=J.width}},height:{get:function(){return J.height},set:function(a){J.height=a;G.height=J.height}},currentTime:{get:function(){return n()},set:function(a){u(a)}},duration:{get:function(){return g?g.duration:NaN}},ended:{get:function(){return G.ended}},paused:{get:function(){return G.paused}}, +seeking:{get:function(){return G.seeking}},readyState:{get:function(){return G.readyState}},networkState:{get:function(){return G.networkState}},volume:{get:function(){return G.volume},set:function(a){if(a<0||a>1)throw"Volume value must be between 0.0 and 1.0";G.volume=a;o.dispatchEvent("volumechange")}},muted:{get:function(){return G.muted},set:function(a){a=o._util.isAttributeSet(a);G.muted=a;o.dispatchEvent("volumechange")}},playbackRate:{get:function(){return g.playbackRate},set:function(a){g.playbackRate= +a;o.dispatchEvent("ratechange")}},error:{get:function(){return G.error}}});o._canPlaySrc=m.HTMLNullVideoElement._canPlaySrc;o.canPlayType=m.HTMLNullVideoElement.canPlayType;return o}var b="",f=/#t=(\d+\.?\d*)?,?(\d+\.?\d*)/;k.prototype={play:function(){var h=this;if(this.paused){this.paused=false;this.startTime=Date.now();this.playInterval=setInterval(function(){h.currentTime+=(Date.now()-h.startTime)/(1E3/h.playbackRate);h.startTime=Date.now();if(h.currentTime>=h.duration){h.pause(h.duration);h.ended()}h.currentTime< +0&&h.pause(0)},16)}},pause:function(){if(!this.paused){this.paused=true;clearInterval(this.playInterval)}},seekTo:function(h){h=h<0?0:h;this.currentTime=h=h>this.duration?this.duration:h}};m.HTMLNullVideoElement=function(h){return new d(h)};m.HTMLNullVideoElement._canPlaySrc=function(h){return f.test(h)?"probably":b};m.HTMLNullVideoElement.canPlayType=function(h){return h==="video/x-nullvideo"?"probably":b}})(Popcorn,document);(function(m,i,k){function d(){if(!u){m.getScript("https://w.soundcloud.com/player/api.js",function(){m.getScript("https://connect.soundcloud.com/sdk.js",function(){n=true;SC.initialize({client_id:"PRaNFlda6Bhf5utPjUsptg"});for(var v=q.length;v--;){q[v]();delete q[v]}})});u=true}return n}function b(v){q.unshift(v)}function f(v){function w(C){B.unshift(C)}function o(){p.bind(SC.Widget.Events.LOAD_PROGRESS,function(C){O({type:"loadProgress",data:C.currentPosition/1E3})});p.bind(SC.Widget.Events.PLAY_PROGRESS, +function(C){O({type:"playProgress",data:C.currentPosition/1E3})});p.bind(SC.Widget.Events.PLAY,function(){O({type:"play"})});p.bind(SC.Widget.Events.PAUSE,function(){O({type:"pause"})});p.bind(SC.Widget.Events.SEEK,function(){p.getPosition(function(C){C=C/1E3;if(r.seeking)if(Math.floor(C)!==Math.floor(r.currentTime))p.seekTo(r.currentTime*1E3);else{r.ended=false;r.seeking=false;t.dispatchEvent("timeupdate");t.dispatchEvent("seeked");t.dispatchEvent("canplay");t.dispatchEvent("canplaythrough")}else O({type:"seek", +data:C})})});p.bind(SC.Widget.Events.FINISH,function(){O({type:"finish"})});M=true;p.getDuration(J)}function z(){p.bind(SC.Widget.Events.PLAY_PROGRESS,function(C){p.setVolume(0);if(C.currentPosition>0){p.unbind(SC.Widget.Events.PLAY_PROGRESS);p.bind(SC.Widget.Events.PAUSE,function(){p.unbind(SC.Widget.Events.PAUSE);p.setVolume(1);p.bind(SC.Widget.Events.SEEK,function(){p.unbind(SC.Widget.Events.SEEK);o()});p.seekTo(0)});p.pause()}});p.play()}function J(C){C/=1E3;var S=r.duration;if(S!==C){r.duration= +C;t.dispatchEvent("durationchange");if(isNaN(S)){r.networkState=t.NETWORK_IDLE;r.readyState=t.HAVE_METADATA;t.dispatchEvent("loadedmetadata");t.dispatchEvent("loadeddata");r.readyState=t.HAVE_FUTURE_DATA;t.dispatchEvent("canplay");r.readyState=t.HAVE_ENOUGH_DATA;t.dispatchEvent("canplaythrough");for(C=B.length;C--;){B[C]();delete B[C]}r.paused&&r.autoplay&&t.play()}}}function E(C){function S(){r.seeking=true;t.dispatchEvent("seeking");p.seekTo(C)}r.currentTime=C;C*=1E3;M?S():addMediaReadyCallback(S)} +function g(){r.paused=true;if(!x){x=true;clearInterval(R);t.dispatchEvent("pause")}}function G(){t.dispatchEvent("timeupdate")}function A(C){r.currentTime=C;C!==N&&t.dispatchEvent("timeupdate");N=C}function O(C){switch(C.type){case "loadProgress":t.dispatchEvent("progress");break;case "playProgress":A(C.data);break;case "play":if(!K){K=setInterval(a,h);r.loop&&t.dispatchEvent("play")}R=setInterval(G,t._util.TIMEUPDATE_MS);r.paused=false;if(x){x=false;r.loop||t.dispatchEvent("play");t.dispatchEvent("playing")}break; +case "pause":g();break;case "finish":if(r.loop){E(0);t.play()}else{r.ended=true;t.pause();g();t.dispatchEvent("timeupdate");t.dispatchEvent("ended")}break;case "seek":A(C.data)}}function a(){r.ended||p.getPosition(function(C){A(C/1E3)})}function c(C){if(t._canPlaySrc(C)){r.src=C;if(M)if(M&&p){clearInterval(K);p.pause();p.unbind(SC.Widget.Events.READY);p.unbind(SC.Widget.Events.LOAD_PROGRESS);p.unbind(SC.Widget.Events.PLAY_PROGRESS);p.unbind(SC.Widget.Events.PLAY);p.unbind(SC.Widget.Events.PAUSE); +p.unbind(SC.Widget.Events.SEEK);p.unbind(SC.Widget.Events.FINISH);y.removeChild(D);D=k.createElement("iframe")}if(d()){M=false;SC.get("/resolve",{url:C},function(S){var H;if(S.errors){H={name:"MediaError"};if(S.errors[0])if(S.errors[0].error_message==="404 - Not Found"){H.message="Video not found.";H.code=MediaError.MEDIA_ERR_NETWORK}r.error=H;t.dispatchEvent("error")}D.id=m.guid("soundcloud-");D.width=r.width;D.height=r.height;D.frameBorder=0;D.webkitAllowFullScreen=true;D.mozAllowFullScreen=true; +D.allowFullScreen=true;s(r.controls);y.appendChild(D);D.onload=function(){D.onload=null;p=SC.Widget(D);p.bind(SC.Widget.Events.READY,z);r.networkState=t.NETWORK_LOADING;t.dispatchEvent("loadstart");t.dispatchEvent("progress")};D.src="https://w.soundcloud.com/player/?url="+S.uri+"&show_artwork=false&buying=false&liking=false&sharing=false&download=false&show_comments=false&show_user=false&single_active=false"})}else b(function(){c(C)})}else{r.error={name:"MediaError",message:"Media Source Not Supported", +code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};t.dispatchEvent("error")}}function l(C){r.volume=C;if(M){p.setVolume(C);t.dispatchEvent("volumechange")}else w(function(){l(C)})}function j(C){if(M)if(C){r.muted=r.volume;l(0)}else{r.muted=0;l(r.muted)}else{r.muted=C?1:0;w(function(){j(C)})}}function s(C){if(M){D.style.position="absolute";D.style.visibility=C?"visible":"hidden"}else{D.style.opacity=C?"1":"0";D.style.pointerEvents=C?"auto":"none"}r.controls=C}if(!i.postMessage)throw"ERROR: HTMLSoundCloudAudioElement requires window.postMessage"; +var t=new m._MediaElementProto,y=typeof v==="string"?m.dom.find(v):v,D=k.createElement("iframe"),r={src:e,networkState:t.NETWORK_EMPTY,readyState:t.HAVE_NOTHING,seeking:false,autoplay:e,preload:e,controls:false,loop:false,poster:e,volume:1,muted:0,currentTime:0,duration:NaN,ended:false,paused:true,width:y.width|0?y.width:t._util.MIN_WIDTH,height:y.height|0?y.height:t._util.MIN_HEIGHT,error:null},M=false,x=true,p,B=[],R,K,N=0;t._eventNamespace=m.guid("HTMLSoundCloudAudioElement::");t.parentNode=y; +t._util.type="SoundCloud";t.play=function(){r.paused=false;if(M){r.ended&&E(0);p.play()}else w(function(){t.play()})};t.pause=function(){r.paused=true;M?p.pause():w(function(){t.pause()})};Object.defineProperties(t,{src:{get:function(){return r.src},set:function(C){C&&C!==r.src&&c(C)}},autoplay:{get:function(){return r.autoplay},set:function(C){r.autoplay=t._util.isAttributeSet(C)}},loop:{get:function(){return r.loop},set:function(C){r.loop=t._util.isAttributeSet(C)}},width:{get:function(){return D.width}, +set:function(C){D.width=C;r.width=D.width}},height:{get:function(){return D.height},set:function(C){D.height=C;r.height=D.height}},currentTime:{get:function(){return r.currentTime},set:function(C){E(C)}},duration:{get:function(){return r.duration}},ended:{get:function(){return r.ended}},paused:{get:function(){return r.paused}},seeking:{get:function(){return r.seeking}},readyState:{get:function(){return r.readyState}},networkState:{get:function(){return r.networkState}},volume:{get:function(){return r.muted> +0?r.muted:r.volume},set:function(C){if(C<0||C>1)throw"Volume value must be between 0.0 and 1.0";l(C)}},muted:{get:function(){return r.muted>0},set:function(C){j(t._util.isAttributeSet(C))}},error:{get:function(){return r.error}},controls:{get:function(){return r.controls},set:function(C){s(!!C)}}});t._canPlaySrc=m.HTMLSoundCloudAudioElement._canPlaySrc;t.canPlayType=m.HTMLSoundCloudAudioElement.canPlayType;return t}var h=16,e="",n=false,u=false,q=[];m.HTMLSoundCloudAudioElement=function(v){return new f(v)}; +m.HTMLSoundCloudAudioElement._canPlaySrc=function(v){return/(?:https?:\/\/www\.|https?:\/\/|www\.|\.|^)(soundcloud)/.test(v)?"probably":e};m.HTMLSoundCloudAudioElement.canPlayType=function(v){return v==="audio/x-soundcloud"?"probably":e}})(Popcorn,window,document);(function(m,i,k){function d(n){var u=this,q=n.src.split("?")[0];if(q.substr(0,2)==="//")q=i.location.protocol+q;"play pause paused seekTo unload getCurrentTime getDuration getVideoEmbedCode getVideoHeight getVideoWidth getVideoUrl getColor setColor setLoop getVolume setVolume addEventListener".split(" ").forEach(function(v){u[v]=function(w){w=JSON.stringify({method:v,value:w});n.contentWindow&&n.contentWindow.postMessage(w,q)}})}function b(n){function u(x){y.unshift(x)}function q(x){var p=c.duration; +if(p!==x){c.duration=x;A.dispatchEvent("durationchange");if(isNaN(p)){c.networkState=A.NETWORK_IDLE;c.readyState=A.HAVE_METADATA;A.dispatchEvent("loadedmetadata");A.dispatchEvent("loadeddata");c.readyState=A.HAVE_FUTURE_DATA;A.dispatchEvent("canplay");c.readyState=A.HAVE_ENOUGH_DATA;A.dispatchEvent("canplaythrough");c.autoplay&&A.play();for(x=y.length;x--;){y[x]();delete y[x]}}}}function v(x){if(l){c.seeking=true;A.dispatchEvent("seeking");s.seekTo(x)}else u(function(){v(x)})}function w(){A.dispatchEvent("timeupdate")} +function o(x){(c.currentTime=x)!==M&&A.dispatchEvent("timeupdate");M=c.currentTime}function z(x){if(x.origin===e){var p;try{p=JSON.parse(x.data)}catch(B){console.warn(B)}if(p.player_id==j)switch(p.event){case "ready":s=new d(a);s.addEventListener("loadProgress");s.addEventListener("pause");s.setVolume(0);s.play();break;case "loadProgress":if(parseFloat(p.data.duration)>0&&!l){l=true;s.pause()}break;case "pause":s.setVolume(1);i.removeEventListener("message",z,false);i.addEventListener("message",J, +false);s.addEventListener("loadProgress");s.addEventListener("playProgress");s.addEventListener("play");s.addEventListener("pause");s.addEventListener("finish");s.addEventListener("seek");s.getDuration();c.networkState=A.NETWORK_LOADING;A.dispatchEvent("loadstart");A.dispatchEvent("progress")}}}function J(x){if(x.origin===e){var p;try{p=JSON.parse(x.data)}catch(B){console.warn(B)}if(p.player_id==j){switch(p.method){case "getCurrentTime":o(parseFloat(p.value));break;case "getDuration":q(parseFloat(p.value)); +break;case "getVolume":x=parseFloat(p.value);if(c.volume!==x){c.volume=x;A.dispatchEvent("volumechange")}}switch(p.event){case "loadProgress":A.dispatchEvent("progress");q(parseFloat(p.data.duration));break;case "playProgress":o(parseFloat(p.data.seconds));break;case "play":c.ended&&v(0);if(!r){r=setInterval(E,f);c.loop&&A.dispatchEvent("play")}D=setInterval(w,A._util.TIMEUPDATE_MS);c.paused=false;if(t){t=false;c.loop||A.dispatchEvent("play");A.dispatchEvent("playing")}break;case "pause":c.paused= +true;if(!t){t=true;clearInterval(D);A.dispatchEvent("pause")}break;case "finish":if(c.loop){v(0);A.play()}else{c.ended=true;A.dispatchEvent("ended")}break;case "seek":o(parseFloat(p.data.seconds));c.seeking=false;A.dispatchEvent("timeupdate");A.dispatchEvent("seeked");A.dispatchEvent("canplay");A.dispatchEvent("canplaythrough")}}}}function E(){s.getCurrentTime()}function g(x){c.volume=x;if(l){s.setVolume(x);A.dispatchEvent("volumechange")}else u(function(){g(x)})}function G(x){if(l)if(x){c.muted= +c.volume;g(0)}else{c.muted=0;g(c.muted)}else{c.muted=x?1:0;u(function(){G(x)})}}if(!i.postMessage)throw"ERROR: HTMLVimeoVideoElement requires window.postMessage";var A=new m._MediaElementProto,O=typeof n==="string"?m.dom.find(n):n,a=k.createElement("iframe"),c={src:h,networkState:A.NETWORK_EMPTY,readyState:A.HAVE_NOTHING,seeking:false,autoplay:h,preload:h,controls:false,loop:false,poster:h,volume:1,muted:0,currentTime:0,duration:NaN,ended:false,paused:true,error:null},l=false,j=m.guid(),s,t=true, +y=[],D,r,M=0;A._eventNamespace=m.guid("HTMLVimeoVideoElement::");A.parentNode=O;A._util.type="Vimeo";A.play=function(){c.paused=false;l?s.play():u(function(){A.play()})};A.pause=function(){c.paused=true;l?s.pause():u(function(){A.pause()})};Object.defineProperties(A,{src:{get:function(){return c.src},set:function(x){if(x&&x!==c.src)if(A._canPlaySrc(x)){c.src=x;if(l)if(l&&s){clearInterval(r);s.pause();i.removeEventListener("message",J,false);O.removeChild(a);a=k.createElement("iframe")}l=false;x=A._util.parseUri(x); +var p=x.queryKey,B,R=["api=1","player_id="+j,"title=0","byline=0","portrait=0"];c.loop=p.loop==="1"||c.loop;delete p.loop;c.autoplay=p.autoplay==="1"||c.autoplay;delete p.autoplay;x=e+"/video/"+/\d+$/.exec(x.path)+"?";for(B in p)p.hasOwnProperty(B)&&R.push(encodeURIComponent(B)+"="+encodeURIComponent(p[B]));x+=R.join("&");a.id=j;a.style.width="100%";a.style.height="100%";a.frameBorder=0;a.webkitAllowFullScreen=true;a.mozAllowFullScreen=true;a.allowFullScreen=true;O.appendChild(a);a.src=x;i.addEventListener("message", +z,false)}else{c.error={name:"MediaError",message:"Media Source Not Supported",code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};A.dispatchEvent("error")}}},autoplay:{get:function(){return c.autoplay},set:function(x){c.autoplay=A._util.isAttributeSet(x)}},loop:{get:function(){return c.loop},set:function(x){c.loop=A._util.isAttributeSet(x)}},width:{get:function(){return A.parentNode.offsetWidth}},height:{get:function(){return A.parentNode.offsetHeight}},currentTime:{get:function(){return c.currentTime}, +set:function(x){v(x)}},duration:{get:function(){return c.duration}},ended:{get:function(){return c.ended}},paused:{get:function(){return c.paused}},seeking:{get:function(){return c.seeking}},readyState:{get:function(){return c.readyState}},networkState:{get:function(){return c.networkState}},volume:{get:function(){return c.muted>0?c.muted:c.volume},set:function(x){if(x<0||x>1)throw"Volume value must be between 0.0 and 1.0";g(x)}},muted:{get:function(){return c.muted>0},set:function(x){G(A._util.isAttributeSet(x))}}, +error:{get:function(){return c.error}}});A._canPlaySrc=m.HTMLVimeoVideoElement._canPlaySrc;A.canPlayType=m.HTMLVimeoVideoElement.canPlayType;return A}var f=16,h="",e="https://player.vimeo.com";m.HTMLVimeoVideoElement=function(n){return new b(n)};m.HTMLVimeoVideoElement._canPlaySrc=function(n){return/player.vimeo.com\/video\/\d+/.test(n)||/vimeo.com\/\d+/.test(n)?"probably":h};m.HTMLVimeoVideoElement.canPlayType=function(n){return n==="video/x-vimeo"?"probably":h}})(Popcorn,window,document);(function(m,i,k){function d(){var z;if(YT.loaded)for(v=true;o.length;){z=o.shift();z()}else setTimeout(d,250)}function b(){var z;if(!w){if(i.YT)d();else{z=k.createElement("script");z.addEventListener("load",d,false);z.src="https://www.youtube.com/iframe_api";k.head.appendChild(z)}w=true}return v}function f(z){o.push(z)}function h(z){function J(I){W.push(I)}function E(){Q.pauseVideo();j("play",E);l("play",K)}function g(){l("pause",N);j("pause",g)}function G(){var I=function(){if(Q.isMuted()){l("play", +c);Q.playVideo()}else setTimeout(I,0)};V=true;Q.mute();I()}function A(I){var P={name:"MediaError"};switch(I.data){case 2:P.message="Invalid video parameter.";P.code=MediaError.MEDIA_ERR_ABORTED;break;case 5:P.message="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";P.code=MediaError.MEDIA_ERR_DECODE;case 100:P.message="Video not found.";P.code=MediaError.MEDIA_ERR_NETWORK;break;case 101:case 150:P.message="Video not usable.";P.code= +MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED;break;default:P.message="Unknown error.";P.code=5}F.error=P;H.dispatchEvent("error")}function O(){l("play",K);l("pause",N);if(F.autoplay||!F.paused){j("play",O);F.paused=false;J(function(){F.paused||K()})}F.muted||Q.unMute();F.readyState=H.HAVE_METADATA;H.dispatchEvent("loadedmetadata");$=setInterval(r,e);H.dispatchEvent("loadeddata");F.readyState=H.HAVE_FUTURE_DATA;H.dispatchEvent("canplay");U=true;for(aa=setInterval(M,50);W.length;){W[0]();W.shift()}F.readyState= +H.HAVE_ENOUGH_DATA;H.dispatchEvent("canplaythrough")}function a(){j("pause",a);if(Q.getCurrentTime()>0)setTimeout(a,0);else if(F.autoplay||!F.paused){l("play",O);Q.playVideo()}else O()}function c(){j("play",c);if(Q.getCurrentTime()===0)setTimeout(c,0);else{l("pause",a);Q.seekTo(0);Q.pauseVideo()}}function l(I,P){H.addEventListener("youtube-"+I,P,false)}function j(I,P){H.removeEventListener("youtube-"+I,P,false)}function s(I){H.dispatchEvent("youtube-"+I)}function t(){F.networkState=H.NETWORK_LOADING; +var I=Q.getDuration();if(F.duration!==I){F.duration=I;H.dispatchEvent("durationchange")}H.dispatchEvent("waiting")}function y(I){switch(I.data){case YT.PlayerState.ENDED:s("ended");break;case YT.PlayerState.PLAYING:s("play");break;case YT.PlayerState.PAUSED:Q.getDuration()!==Q.getCurrentTime()&&s("pause");break;case YT.PlayerState.BUFFERING:s("buffering")}I.data!==YT.PlayerState.BUFFERING&&ba===YT.PlayerState.BUFFERING&&H.dispatchEvent("progress");ba=I.data}function D(I){if(H._canPlaySrc(I)){F.src= +I;if(b()){if(V)if(U){if(V&&Q){j("buffering",t);j("ended",C);j("play",K);j("pause",N);N();Y=U=false;F.currentTime=0;W=[];clearInterval($);clearInterval(aa);Q.stopVideo();Q.clearVideo();Q.destroy();T=k.createElement("div")}}else{J(function(){D(I)});return}L.appendChild(T);var P=H._util.parseUri(I).queryKey;delete P.v;F.autoplay=P.autoplay==="1"||F.autoplay;delete P.autoplay;F.loop=P.loop==="1"||F.loop;delete P.loop;P.rel=P.rel||0;P.modestbranding=P.modestbranding||1;P.iv_load_policy=P.iv_load_policy|| +3;P.disablekb=P.disablekb||1;P.showinfo=P.showinfo||0;var da=i.location.protocol==="file:"?"*":i.location.protocol+"//"+i.location.host;P.origin=P.origin||da;P.controls=P.controls||F.controls?2:0;F.controls=P.controls;P.wmode=P.wmode||"opaque";if(P.html5!==0)P.html5=1;I=u.exec(I)[1];Q=new YT.Player(T,{width:"100%",height:"100%",wmode:P.wmode,videoId:I,playerVars:P,events:{onReady:G,onError:A,onStateChange:y}});F.networkState=H.NETWORK_LOADING;H.dispatchEvent("loadstart");H.dispatchEvent("progress")}else f(function(){D(I)})}else{F.error= +{name:"MediaError",message:"Media Source Not Supported",code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};H.dispatchEvent("error")}}function r(){var I=Q.getCurrentTime();if(F.seeking)q(I-F.currentTime)<1&&R();else{if(q(F.currentTime-I)>e){B();R()}F.currentTime=I}}function M(){var I=Q.getVideoLoadedFraction();if(I&&Z!==I){Z=I;H.dispatchEvent("progress")}}function x(I){if(I!==F.currentTime){F.currentTime=I;if(U){B();Q.seekTo(I)}else J(function(){B();Q.seekTo(I)})}}function p(){H.dispatchEvent("timeupdate")} +function B(){l("pause",g);j("pause",N);F.seeking=true;H.dispatchEvent("seeking")}function R(){F.ended=false;F.seeking=false;H.dispatchEvent("timeupdate");H.dispatchEvent("seeked");H.dispatchEvent("canplay");H.dispatchEvent("canplaythrough")}function K(){if(F.ended){x(0);F.ended=false}ca=setInterval(p,H._util.TIMEUPDATE_MS);F.paused=false;if(X){X=false;if(F.loop&&!Y||!F.loop){Y=true;H.dispatchEvent("play")}H.dispatchEvent("playing")}}function N(){F.paused=true;if(!X){X=true;clearInterval(ca);H.dispatchEvent("pause")}} +function C(){if(F.loop){x(0);H.play()}else{F.ended=true;N();l("play",E);j("play",K);H.dispatchEvent("timeupdate");H.dispatchEvent("ended")}}function S(I){F.muted=I;if(U){Q[I?"mute":"unMute"]();H.dispatchEvent("volumechange")}else J(function(){S(F.muted)})}if(!i.postMessage)throw"ERROR: HTMLYouTubeVideoElement requires window.postMessage";var H=new m._MediaElementProto,L=typeof z==="string"?k.querySelector(z):z,T=k.createElement("div"),F={src:n,networkState:H.NETWORK_EMPTY,readyState:H.HAVE_NOTHING, +seeking:false,autoplay:n,preload:n,controls:false,loop:false,poster:n,volume:1,muted:false,currentTime:0,duration:NaN,ended:false,paused:true,error:null},V=false,U=false,Y=false,Q,X=true,W=[],ba=-1,aa,Z=0,$,ca;H._eventNamespace=m.guid("HTMLYouTubeVideoElement::");H.parentNode=L;H._util.type="YouTube";l("buffering",t);l("ended",C);H.play=function(){F.paused=false;U?Q.playVideo():J(function(){H.play()})};H.pause=function(){F.paused=true;if(U){g();Q.pauseVideo()}else J(function(){H.pause()})};Object.defineProperties(H, +{src:{get:function(){return F.src},set:function(I){I&&I!==F.src&&D(I)}},autoplay:{get:function(){return F.autoplay},set:function(I){F.autoplay=H._util.isAttributeSet(I)}},loop:{get:function(){return F.loop},set:function(I){F.loop=H._util.isAttributeSet(I)}},width:{get:function(){return H.parentNode.offsetWidth}},height:{get:function(){return H.parentNode.offsetHeight}},currentTime:{get:function(){return F.currentTime},set:function(I){x(I)}},duration:{get:function(){return F.duration}},ended:{get:function(){return F.ended}}, +paused:{get:function(){return F.paused}},seeking:{get:function(){return F.seeking}},readyState:{get:function(){return F.readyState}},networkState:{get:function(){return F.networkState}},volume:{get:function(){return F.volume},set:function(I){if(I<0||I>1)throw"Volume value must be between 0.0 and 1.0";F.volume=I;if(U){Q.setVolume(F.volume*100);H.dispatchEvent("volumechange")}else J(function(){H.volume=I})}},muted:{get:function(){return F.muted},set:function(I){S(H._util.isAttributeSet(I))}},error:{get:function(){return F.error}}, +buffered:{get:function(){return{start:function(I){if(I===0)return 0;throw"INDEX_SIZE_ERR: DOM Exception 1";},end:function(I){if(I===0){if(!F.duration)return 0;return F.duration*Z}throw"INDEX_SIZE_ERR: DOM Exception 1";},length:1}},configurable:true}});H._canPlaySrc=m.HTMLYouTubeVideoElement._canPlaySrc;H.canPlayType=m.HTMLYouTubeVideoElement.canPlayType;return H}var e=10,n="",u=/^.*(?:\/|v=)(.{11})/,q=Math.abs,v=false,w=false,o=[];m.HTMLYouTubeVideoElement=function(z){return new h(z)};m.HTMLYouTubeVideoElement._canPlaySrc= +function(z){return/(?:http:\/\/www\.|http:\/\/|www\.|\.|^)(youtu).*(?:\/|v=)(.{11})/.test(z)?"probably":n};m.HTMLYouTubeVideoElement.canPlayType=function(z){return z==="video/x-youtube"?"probably":n}})(Popcorn,window,document);(function(m){var i=function(k,d){var b=0,f=0,h;m.forEach(d.classes,function(e,n){h=[];if(e==="parent")h[0]=document.querySelectorAll("#"+d.target)[0].parentNode;else h=document.querySelectorAll("#"+d.target+" "+e);b=0;for(f=h.length;b"+E.title+"

";m.forEach(E.items,function(G,A){if(A=x.interval*(r+1)/1E3&&(D<=x.interval*(r+2)/1E3||D>=x.interval*M/1E3)){l.setPosition(new google.maps.LatLng(x.position.lat,x.position.lng));l.setPov({heading:x.pov.heading||y(x,s[r+1])||0,zoom:x.pov.zoom||0,pitch:x.pov.pitch|| +0})}}G(s,s[0].interval)}else{r=0;for(M=s.length;r=x*(r+1)/1E3&&(D<=x*(r+2)/1E3||D>=x*M/1E3)){A.setPov({heading:y(s[r],s[r+1])||0,zoom:z.zoom,pitch:z.pitch||0});A.setPosition(O[r])}}G(O,z.interval)}},t)};if(z.location&&typeof z.tween==="string"){var A=E,O=[],a=new google.maps.DirectionsService,c=new google.maps.DirectionsRenderer(A);a.route({origin:z.location,destination:z.tween,travelMode:google.maps.TravelMode.DRIVING},function(s,t){if(t==google.maps.DirectionsStatus.OK){c.setDirections(s); +for(var y=s.routes[0].overview_path,D=0,r=y.length;D-1){b.trackedContainer=i(h);b.trackedContainer.element.appendChild(b.anchor)}else h.appendChild(b.anchor); +f.addEventListener("load",function(){f.style.borderStyle="none";b.anchor.href=b.href||b.src||"#";b.anchor.target="_blank";var e,n;f.style.height=h.style.height;f.style.width=h.style.width;b.anchor.appendChild(f);if(b.text){e=f.height/12+"px";n=document.createElement("div");m.extend(n.style,{color:"black",fontSize:e,fontWeight:"bold",position:"relative",textAlign:"center",width:f.style.width||f.width+"px",zIndex:"10"});n.innerHTML=b.text||"";n.style.top=(f.style.height.replace("px","")||f.height)/ +2-n.offsetHeight/2+"px";b.anchor.insertBefore(n,f)}},false);f.src=b.src;b.toString=function(){var e=b.src||b._natives.manifest.options.src["default"],n=e.replace(/.*\//g,"");return n.length?n:e}},start:function(b,f){f.anchor.style.display="inline";f.trackedContainer&&f.trackedContainer.start()},end:function(b,f){f.anchor.style.display="none";f.trackedContainer&&f.trackedContainer.stop()},_teardown:function(b){if(b.trackedContainer)b.trackedContainer.destroy();else b.anchor.parentNode&&b.anchor.parentNode.removeChild(b.anchor)}})})(Popcorn);(function(m){var i=/(?:http:\/\/www\.|http:\/\/|www\.|\.|^)(youtu|vimeo|soundcloud|baseplayer)/,k={},d={vimeo:false,youtube:false,soundcloud:false,module:false};Object.defineProperty(k,void 0,{get:function(){return d[void 0]},set:function(b){d[void 0]=b}});m.plugin("mediaspawner",{manifest:{about:{name:"Popcorn Media Spawner Plugin",version:"0.1",author:"Matthew Schranz, @mjschranz",website:"mschranz.wordpress.com"},options:{source:{elem:"input",type:"text",label:"Media Source","default":"http://www.youtube.com/watch?v=CXDstfD9eJ0"}, +caption:{elem:"input",type:"text",label:"Media Caption","default":"Popcorn Popping",optional:true},target:"mediaspawner-container",start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},autoplay:{elem:"input",type:"checkbox",label:"Autoplay Video",optional:true},width:{elem:"input",type:"number",label:"Media Width","default":400,units:"px",optional:true},height:{elem:"input",type:"number",label:"Media Height","default":200,units:"px",optional:true}}},_setup:function(b){function f(){function v(){if(n!== +"HTML5"&&!window.Popcorn[n])setTimeout(function(){v()},300);else{b.id=b._container.id;b._container.style.width=b.width+"px";b._container.style.height=b.height+"px";b.popcorn=m.smart("#"+b.id,b.source);n==="HTML5"&&b.popcorn.controls(true);b._container.style.width="0px";b._container.style.height="0px";b._container.style.visibility="hidden";b._container.style.overflow="hidden"}}if(n!=="HTML5"&&!window.Popcorn[n]&&!k[n]){k[n]=true;m.getScript("http://popcornjs.org/code/players/"+n+"/popcorn."+n+".js", +function(){v()})}else v()}function h(){window.Popcorn.player?f():setTimeout(function(){h()},300)}var e=document.getElementById(b.target)||{},n,u,q;if(u=i.exec(b.source)){n=u[1];if(n==="youtu")n="youtube"}else n="HTML5";b._type=n;b._container=document.createElement("div");u=b._container;u.id="mediaSpawnerdiv-"+m.guid();b.width=b.width||400;b.height=b.height||200;if(b.caption){q=document.createElement("div");q.innerHTML=b.caption;q.style.display="none";b._capCont=q;u.appendChild(q)}e&&e.appendChild(u); +if(!window.Popcorn.player&&!k.module){k.module=true;m.getScript("http://popcornjs.org/code/modules/player/popcorn.player.js",h)}else h();b.toString=function(){return b.source||b._natives.manifest.options.source["default"]}},start:function(b,f){if(f._capCont)f._capCont.style.display="";f._container.style.width=f.width+"px";f._container.style.height=f.height+"px";f._container.style.visibility="visible";f._container.style.overflow="visible";f.autoplay&&f.popcorn.play()},end:function(b,f){if(f._capCont)f._capCont.style.display= +"none";f._container.style.width="0px";f._container.style.height="0px";f._container.style.visibility="hidden";f._container.style.overflow="hidden";f.popcorn.pause()},_teardown:function(b){b.popcorn&&b.popcorn.destory&&b.popcorn.destroy();document.getElementById(b.target)&&document.getElementById(b.target).removeChild(b._container)}})})(Popcorn,this);(function(m){m.plugin("mustache",function(i){var k,d,b,f;m.getScript("http://mustache.github.com/extras/mustache.js");var h=!!i.dynamic,e=typeof i.template,n=typeof i.data,u=document.getElementById(i.target);i.container=u||document.createElement("div");if(e==="function")if(h)b=i.template;else f=i.template(i);else f=e==="string"?i.template:"";if(n==="function")if(h)k=i.data;else d=i.data(i);else d=n==="string"?JSON.parse(i.data):n==="object"?i.data:"";return{start:function(q,v){var w=function(){if(window.Mustache){if(k)d= +k(v);if(b)f=b(v);var o=Mustache.to_html(f,d).replace(/^\s*/mg,"");v.container.innerHTML=o}else setTimeout(function(){w()},10)};w()},end:function(q,v){v.container.innerHTML=""},_teardown:function(){k=d=b=f=null}}},{about:{name:"Popcorn Mustache Plugin",version:"0.1",author:"David Humphrey (@humphd)",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"mustache-container",template:{elem:"input",type:"text", +label:"Template"},data:{elem:"input",type:"text",label:"Data"},dynamic:{elem:"input",type:"checkbox",label:"Dynamic","default":true}}})})(Popcorn);(function(m){function i(d,b){if(d.map)d.map.div.style.display=b;else setTimeout(function(){i(d,b)},10)}var k=1;m.plugin("openmap",function(d){var b,f,h,e,n,u,q,v,w=document.getElementById(d.target);b=document.createElement("div");b.id="openmapdiv"+k;b.style.width="100%";b.style.height="100%";k++;w&&w.appendChild(b);v=function(){if(window.OpenLayers&&window.OpenLayers.Layer.Stamen){if(d.location){location=new OpenLayers.LonLat(0,0);m.getJSONP("//tinygeocoder.com/create-api.php?q="+d.location+"&callback=jsonp", +function(z){f=new OpenLayers.LonLat(z[1],z[0])})}else f=new OpenLayers.LonLat(d.lng,d.lat);d.type=d.type||"ROADMAP";switch(d.type){case "SATELLITE":d.map=new OpenLayers.Map({div:b,maxResolution:0.28125,tileSize:new OpenLayers.Size(512,512)});var o=new OpenLayers.Layer.WorldWind("LANDSAT","//worldwind25.arc.nasa.gov/tile/tile.aspx",2.25,4,{T:"105"});d.map.addLayer(o);e=new OpenLayers.Projection("EPSG:4326");h=new OpenLayers.Projection("EPSG:4326");break;case "TERRAIN":e=new OpenLayers.Projection("EPSG:4326"); +h=new OpenLayers.Projection("EPSG:4326");d.map=new OpenLayers.Map({div:b,projection:h});o=new OpenLayers.Layer.WMS("USGS Terraserver","//terraserver-usa.org/ogcmap.ashx?",{layers:"DRG"});d.map.addLayer(o);break;case "STAMEN-TONER":case "STAMEN-WATERCOLOR":case "STAMEN-TERRAIN":o=d.type.replace("STAMEN-","").toLowerCase();o=new OpenLayers.Layer.Stamen(o);e=new OpenLayers.Projection("EPSG:4326");h=new OpenLayers.Projection("EPSG:900913");f=f.transform(e,h);d.map=new OpenLayers.Map({div:b,projection:h, +displayProjection:e,controls:[new OpenLayers.Control.Navigation,new OpenLayers.Control.PanPanel,new OpenLayers.Control.ZoomPanel]});d.map.addLayer(o);break;default:h=new OpenLayers.Projection("EPSG:900913");e=new OpenLayers.Projection("EPSG:4326");f=f.transform(e,h);d.map=new OpenLayers.Map({div:b,projection:h,displayProjection:e});o=new OpenLayers.Layer.OSM;d.map.addLayer(o)}if(d.map){d.map.setCenter(f,d.zoom||10);d.map.div.style.display="none"}}else setTimeout(function(){v()},50)};v();return{_setup:function(o){window.OpenLayers|| +m.getScript("//openlayers.org/api/OpenLayers.js",function(){m.getScript("//maps.stamen.com/js/tile.stamen.js")});var z=function(){if(o.map){o.zoom=o.zoom||2;if(o.zoom&&typeof o.zoom!=="number")o.zoom=+o.zoom;o.map.setCenter(f,o.zoom);if(o.markers){var J=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style["default"]),E=function(j){clickedFeature=j.feature;if(clickedFeature.attributes.text){q=new OpenLayers.Popup.FramedCloud("featurePopup",clickedFeature.geometry.getBounds().getCenterLonLat(), +new OpenLayers.Size(120,250),clickedFeature.attributes.text,null,true,function(){u.unselect(this.feature)});clickedFeature.popup=q;q.feature=clickedFeature;o.map.addPopup(q)}},g=function(j){feature=j.feature;if(feature.popup){q.feature=null;o.map.removePopup(feature.popup);feature.popup.destroy();feature.popup=null}},G=function(j){m.getJSONP("//tinygeocoder.com/create-api.php?q="+j.location+"&callback=jsonp",function(s){s=(new OpenLayers.Geometry.Point(s[1],s[0])).transform(e,h);var t=OpenLayers.Util.extend({}, +J);if(!j.size||isNaN(j.size))j.size=14;t.pointRadius=j.size;t.graphicOpacity=1;t.externalGraphic=j.icon;s=new OpenLayers.Feature.Vector(s,null,t);if(j.text)s.attributes={text:j.text};n.addFeatures([s])})};n=new OpenLayers.Layer.Vector("Point Layer",{style:J});o.map.addLayer(n);for(var A=0,O=o.markers.length;A"+ -n.title+"
"+n.text+"
"+n.innerHTML;return{start:function(i,j){b.style.display="block";if(j.direction==="down")e.scrollTop=e.scrollHeight},end:function(){b.style.display="none"},_teardown:function(){e&&b&&e.removeChild(b)&&!e.firstChild&&c.removeChild(e)}}},{about:{name:"Popcorn Timeline Plugin",version:"0.1",author:"David Seifried @dcseifried",website:"dseifried.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"}, -end:{elem:"input",type:"number",label:"End"},target:"feed-container",title:{elem:"input",type:"text",label:"Title"},text:{elem:"input",type:"text",label:"Text"},innerHTML:{elem:"input",type:"text",label:"HTML Code",optional:true},direction:{elem:"select",options:["DOWN","UP"],label:"Direction",optional:true}}})})(Popcorn);(function(r,f){var n={};r.plugin("documentcloud",{manifest:{about:{name:"Popcorn Document Cloud Plugin",version:"0.1",author:"@humphd, @ChrisDeCairos",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"documentcloud-container",width:{elem:"input",type:"text",label:"Width",optional:true},height:{elem:"input",type:"text",label:"Height",optional:true},src:{elem:"input",type:"url",label:"PDF URL","default":"http://www.documentcloud.org/documents/70050-urbina-day-1-in-progress.html"}, -preload:{elem:"input",type:"checkbox",label:"Preload","default":true},page:{elem:"input",type:"number",label:"Page Number",optional:true},aid:{elem:"input",type:"number",label:"Annotation Id",optional:true}}},_setup:function(c){function b(){function m(v){c._key=v.api.getId();c._changeView=function(z){c.aid?z.pageSet.showAnnotation(z.api.getAnnotation(c.aid)):z.api.setCurrentPage(c.page)}}function o(){n[c._key]={num:1,id:c._containerId};h.loaded=true}h.loaded=false;var q=c.url.replace(/\.html$/,".js"), -s=c.target,d=f.getElementById(s),A=f.createElement("div"),y=r.position(d),x=c.width||y.width;y=c.height||y.height;var a=c.sidebar||true,g=c.text||true,l=c.pdf||true,k=c.showAnnotations||true,t=c.zoom||700,u=c.search||true;if(!function(v){var z=false;r.forEach(h.viewers,function(C){if(C.api.getSchema().canonicalURL===v){m(C);C=n[c._key];c._containerId=C.id;C.num+=1;z=true;h.loaded=true}});return z}(c.url)){A.id=c._containerId=r.guid(s);s="#"+A.id;d.appendChild(A);i.trigger("documentready");h.load(q, -{width:x,height:y,sidebar:a,text:g,pdf:l,showAnnotations:k,zoom:t,search:u,container:s,afterLoad:c.page||c.aid?function(v){m(v);c._changeView(v);A.style.visibility="hidden";v.elements.pages.hide();o()}:function(v){m(v);o();A.style.visibility="hidden";v.elements.pages.hide()}})}}function e(){window.DV.loaded?b():setTimeout(e,25)}var h=window.DV=window.DV||{},i=this;if(h.loading)e();else{h.loading=true;h.recordHit="//www.documentcloud.org/pixel.gif";var j=f.createElement("link"),p=f.getElementsByTagName("head")[0]; -j.rel="stylesheet";j.type="text/css";j.media="screen";j.href="//s3.documentcloud.org/viewer/viewer-datauri.css";p.appendChild(j);h.loaded=false;r.getScript("http://s3.documentcloud.org/viewer/viewer.js",function(){h.loading=false;b()})}},start:function(c,b){var e=f.getElementById(b._containerId),h=DV.viewers[b._key];(b.page||b.aid)&&h&&b._changeView(h);if(e&&h){e.style.visibility="visible";h.elements.pages.show()}},end:function(c,b){var e=f.getElementById(b._containerId);if(e&&DV.viewers[b._key]){e.style.visibility= -"hidden";DV.viewers[b._key].elements.pages.hide()}},_teardown:function(c){var b=f.getElementById(c._containerId);if((c=c._key)&&DV.viewers[c]&&--n[c].num===0){for(DV.viewers[c].api.unload();b.hasChildNodes();)b.removeChild(b.lastChild);b.parentNode.removeChild(b)}}})})(Popcorn,window.document);(function(r){r.parser("parseJSON","JSON",function(f){var n={title:"",remote:"",data:[]};r.forEach(f.data,function(c){n.data.push(c)});return n})})(Popcorn);(function(r){r.parser("parseSBV",function(f){var n={title:"",remote:"",data:[]},c=[],b=0,e=0,h=function(q){q=q.split(":");var s=q.length-1,d;try{d=parseInt(q[s-1],10)*60+parseFloat(q[s],10);if(s===2)d+=parseInt(q[0],10)*3600}catch(A){throw"Bad cue";}return d},i=function(q,s){var d={};d[q]=s;return d};f=f.text.split(/(?:\r\n|\r|\n)/gm);for(e=f.length;b");c.push(i("subtitle",j))}catch(o){for(;b< -e&&f[b];)b++}for(;b=0&&!c[h];)h--;m=h+1;for(h=0;h[\t ]*/); -o.start=n(j[0]);i=j[1].indexOf(" ");if(i!==-1)j[1]=j[1].substr(0,i);for(o.end=n(j[1]);h/g,">");o.text=o.text.replace(/<(\/?(font|b|u|i|s))((\s+(\w|\w[\w\-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)(\/?)>/gi,"<$1$3$7>");o.text=o.text.replace(/\\N/gi,"
");e.push(f("subtitle",o))}b.data=e;return b})})(Popcorn);(function(r){function f(b,e){var h=b.substr(10).split(","),i;i={start:n(h[e.start]),end:n(h[e.end])};if(i.start===-1||i.end===-1)throw"Invalid time";var j=q.call(m,/\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}/gi,""),p=j.replace,m;m=h.length;q=[];for(var o=e.text;o");return i}function n(b){var e=b.split(":");if(b.length!==10||e.length<3)return-1;return parseInt(e[0],10)*3600+parseInt(e[1],10)*60+parseFloat(e[2],10)}function c(b, -e){var h={};h[b]=e;return h}r.parser("parseSSA",function(b){var e={title:"",remote:"",data:[]},h=[],i=0,j;b=b.text.split(/(?:\r\n|\r|\n)/gm);for(j=b.length;i");m.id=i.getAttribute("xml:id")||i.getAttribute("id");m.start=b(i.getAttribute("begin"),j); -m.end=b(i.getAttribute("end"),j);m.target=n(i,p);if(m.end<0){m.end=b(i.getAttribute("duration"),0);if(m.end>=0)m.end+=m.start;else m.end=Number.MAX_VALUE}return{subtitle:m}}function b(i,j){var p;if(!i)return-1;try{return r.util.toSeconds(i)}catch(m){for(var o=i.length-1;o>=0&&i[o]<="9"&&i[o]>="0";)o--;p=o;o=parseFloat(i.substring(0,p));p=i.substring(p);return o*({h:3600,m:60,s:1,ms:0.0010}[p]||-1)+(j||0)}}var e=/^[\s]+|[\s]+$/gm,h=/(?:\r\n|\r|\n)/gm;r.parser("parseTTML",function(i){var j={title:"", -remote:"",data:[]};if(!i.xml||!i.xml.documentElement)return j;i=i.xml.documentElement.firstChild;if(!i)return j;for(;i.nodeName!=="body";)i=i.nextSibling;if(i)j.data=f(i,0);return j})})(Popcorn);(function(r){r.parser("parseTTXT",function(f){var n={title:"",remote:"",data:[]},c=function(j){j=j.split(":");var p=0;try{return parseFloat(j[0],10)*60*60+parseFloat(j[1],10)*60+parseFloat(j[2],10)}catch(m){p=0}return p},b=function(j,p){var m={};m[j]=p;return m};f=f.xml.lastChild.lastChild;for(var e=Number.MAX_VALUE,h=[];f;){if(f.nodeType===1&&f.nodeName==="TextSample"){var i={};i.start=c(f.getAttribute("sampleTime"));i.text=f.getAttribute("text");if(i.text){i.end=e-0.0010;h.push(b("subtitle",i))}e= -i.start}f=f.previousSibling}n.data=h.reverse();return n})})(Popcorn);(function(r){function f(c){var b=c.split(":");c=c.length;var e;if(c!==12&&c!==9)throw"Bad cue";c=b.length-1;try{e=parseInt(b[c-1],10)*60+parseFloat(b[c],10);if(c===2)e+=parseInt(b[0],10)*3600}catch(h){throw"Bad cue";}return e}function n(c,b){var e={};e[c]=b;return e}r.parser("parseVTT",function(c){var b={title:"",remote:"",data:[]},e=[],h=0,i=0,j,p;c=c.text.split(/(?:\r\n|\r|\n)/gm);i=c.length;if(i===0||c[0]!=="WEBVTT")return b;for(h++;h")===-1)throw"Bad cue";m=o.replace(/--\>/," --\> ").split(/[\t ]+/);if(m.length<2)throw"Bad cue";q.id=o;q.start=f(m[0]);q.end=f(m[2]);for(p=q;h");e.push(n("subtitle",p))}catch(s){for(h=h;h"']/g,function(f){return d[f]||f})}function k(b,f){var h=b.container=document.createElement("div"),e=h.style,n=b.media,u=function(){var q=b.position();e.fontSize="18px";e.width=n.offsetWidth+"px";e.top=q.top+n.offsetHeight-h.offsetHeight-40+"px";e.left=q.left+"px";setTimeout(u,10)};h.id=f||"";e.position="absolute";e.color="white";e.textShadow="black 2px 2px 6px";e.fontWeight="bold";e.textAlign="center";u();b.media.parentNode.appendChild(h); +return h}var d={"&":"&","<":"<",">":">",'"':""","'":"'"};m.plugin("text",{manifest:{about:{name:"Popcorn Text Plugin",version:"0.1",author:"@humphd"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},text:{elem:"input",type:"text",label:"Text","default":"Popcorn.js"},escape:{elem:"input",type:"checkbox",label:"Escape"},multiline:{elem:"input",type:"checkbox",label:"Multiline"}}},_setup:function(b){var f,h,e=b._container=document.createElement("div"); +e.style.display="none";if(b.target)if(f=m.dom.find(b.target)){if(["VIDEO","AUDIO"].indexOf(f.nodeName)>-1)f=k(this,b.target+"-overlay")}else f=k(this,b.target);else f=this.container?this.container:k(this);b._target=f;h=b.escape?i(b.text):b.text;h=b.multiline?h.replace(/\r?\n/gm,"
"):h;e.innerHTML=h||"";f.appendChild(e);b.toString=function(){return b.text||b._natives.manifest.options.text["default"]}},start:function(b,f){f._container.style.display="inline"},end:function(b,f){f._container.style.display= +"none"},_teardown:function(b){var f=b._target;f&&f.removeChild(b._container)}})})(Popcorn);(function(m){var i=1;m.plugin("timeline",function(k){var d=document.getElementById(k.target),b=document.createElement("div"),f,h=true;if(d&&!d.firstChild){d.appendChild(f=document.createElement("div"));f.style.width="inherit";f.style.height="inherit";f.style.overflow="auto"}else f=d.firstChild;b.style.display="none";b.id="timelineDiv"+i;k.direction=k.direction||"up";if(k.direction.toLowerCase()==="down")h=false;if(d&&f)h?f.insertBefore(b,f.firstChild):f.appendChild(b);i++;b.innerHTML="

"+ +k.title+"
"+k.text+"
"+k.innerHTML;return{start:function(e,n){b.style.display="block";if(n.direction==="down")f.scrollTop=f.scrollHeight},end:function(){b.style.display="none"},_teardown:function(){f&&b&&f.removeChild(b)&&!f.firstChild&&d.removeChild(f)}}},{about:{name:"Popcorn Timeline Plugin",version:"0.1",author:"David Seifried @dcseifried",website:"dseifried.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"}, +end:{elem:"input",type:"number",label:"End"},target:"feed-container",title:{elem:"input",type:"text",label:"Title"},text:{elem:"input",type:"text",label:"Text"},innerHTML:{elem:"input",type:"text",label:"HTML Code",optional:true},direction:{elem:"select",options:["DOWN","UP"],label:"Direction",optional:true}}})})(Popcorn);(function(m){m.plugin("webpage",{manifest:{about:{name:"Popcorn Webpage Plugin",version:"0.1",author:"@annasob",website:"annasob.wordpress.com"},options:{id:{elem:"input",type:"text",label:"Id",optional:true},start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},src:{elem:"input",type:"url",label:"Webpage URL","default":"http://mozillapopcorn.org"},target:"iframe-container"}},_setup:function(i){var k=document.getElementById(i.target);i.src=i.src.replace(/^(https?:)?(\/\/)?/, +"//");i._iframe=document.createElement("iframe");i._iframe.setAttribute("width","100%");i._iframe.setAttribute("height","100%");i._iframe.id=i.id;i._iframe.src=i.src;i._iframe.style.display="none";k&&k.appendChild(i._iframe)},start:function(i,k){k._iframe.src=k.src;k._iframe.style.display="inline"},end:function(i,k){k._iframe.style.display="none"},_teardown:function(i){document.getElementById(i.target)&&document.getElementById(i.target).removeChild(i._iframe)}})})(Popcorn);var wikiCallback; +(function(m){m.plugin("wikipedia",{manifest:{about:{name:"Popcorn Wikipedia Plugin",version:"0.1",author:"@annasob",website:"annasob.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},lang:{elem:"input",type:"text",label:"Language","default":"english",optional:true},src:{elem:"input",type:"url",label:"Wikipedia URL","default":"http://en.wikipedia.org/wiki/Cat"},title:{elem:"input",type:"text",label:"Title","default":"Cats",optional:true}, +numberofwords:{elem:"input",type:"number",label:"Number of Words","default":"200",optional:true},target:"wikipedia-container"}},_setup:function(i){var k,d=m.guid();if(!i.lang)i.lang="en";i.numberofwords=i.numberofwords||200;window["wikiCallback"+d]=function(b){i._link=document.createElement("a");i._link.setAttribute("href",i.src);i._link.setAttribute("target","_blank");i._link.innerHTML=i.title||b.parse.displaytitle;i._desc=document.createElement("p");k=b.parse.text["*"].substr(b.parse.text["*"].indexOf("

")); +k=k.replace(/((<(.|\n)+?>)|(\((.*?)\) )|(\[(.*?)\]))/g,"");k=k.split(" ");i._desc.innerHTML=k.slice(0,k.length>=i.numberofwords?i.numberofwords:k.length).join(" ")+" ...";i._fired=true};i.src&&m.getScript("//"+i.lang+".wikipedia.org/w/api.php?action=parse&props=text&redirects&page="+i.src.slice(i.src.lastIndexOf("/")+1)+"&format=json&callback=wikiCallback"+d);i.toString=function(){return i.src||i._natives.manifest.options.src["default"]}},start:function(i,k){var d=function(){if(k._fired){if(k._link&& +k._desc)if(document.getElementById(k.target)){document.getElementById(k.target).appendChild(k._link);document.getElementById(k.target).appendChild(k._desc);k._added=true}}else setTimeout(function(){d()},13)};d()},end:function(i,k){if(k._added){document.getElementById(k.target).removeChild(k._link);document.getElementById(k.target).removeChild(k._desc)}},_teardown:function(i){if(i._added){i._link.parentNode&&document.getElementById(i.target).removeChild(i._link);i._desc.parentNode&&document.getElementById(i.target).removeChild(i._desc); +delete i.target}}})})(Popcorn);(function(m){var i={},k=0,d=document.createElement("span"),b=["webkit","Moz","ms","O",""],f=["Transform","TransitionDuration","TransitionTimingFunction"],h={},e;document.getElementsByTagName("head")[0].appendChild(d);for(var n=0,u=f.length;n");d.push(e("subtitle",n))}catch(v){for(;b< +f&&i[b];)b++}for(;b=0&&!u[v];)v--;w=v+1;for(e=0;e[\t ]*/);o.start=k(q[0]);n=q[1].indexOf(" ");if(n!==-1)q[1]=q[1].substr(0,n);for(o.end=k(q[1]);e/g,">");o.text=o.text.replace(/<(\/?(font|b|u|i|s))((\s+(\w|\w[\w\-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)(\/?)>/gi,"<$1$3$7>");o.text=o.text.replace(/\\N/gi,"
");if(b&&b.target)o.target=b.target;h.push(i("subtitle", +o))}f.data=h;return f})})(Popcorn);(function(m){function i(b,f){var h=b.substr(10).split(","),e;e={start:k(h[f.start]),end:k(h[f.end])};if(e.start===-1||e.end===-1)throw"Invalid time";var n=w.call(q,/\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}/gi,""),u=n.replace,q;q=h.length;w=[];for(var v=f.text;v");return e}function k(b){var f=b.split(":");if(b.length!==10||f.length<3)return-1;return parseInt(f[0],10)*3600+parseInt(f[1],10)*60+parseFloat(f[2],10)}function d(b, +f){var h={};h[b]=f;return h}m.parser("parseSSA",function(b){var f={title:"",remote:"",data:[]},h=[],e=0,n;b=b.text.split(/(?:\r\n|\r|\n)/gm);for(n=b.length;e");q.id=e.getAttribute("xml:id")||e.getAttribute("id");q.start=b(e.getAttribute("begin"),n); +q.end=b(e.getAttribute("end"),n);q.target=k(e,u);if(q.end<0){q.end=b(e.getAttribute("duration"),0);if(q.end>=0)q.end+=q.start;else q.end=Number.MAX_VALUE}return{subtitle:q}}function b(e,n){var u;if(!e)return-1;try{return m.util.toSeconds(e)}catch(q){for(var v=e.length-1;v>=0&&e[v]<="9"&&e[v]>="0";)v--;u=v;v=parseFloat(e.substring(0,u));u=e.substring(u);return v*({h:3600,m:60,s:1,ms:0.001}[u]||-1)+(n||0)}}var f=/^[\s]+|[\s]+$/gm,h=/(?:\r\n|\r|\n)/gm;m.parser("parseTTML",function(e){var n={title:"", +remote:"",data:[]};if(!e.xml||!e.xml.documentElement)return n;e=e.xml.documentElement.firstChild;if(!e)return n;for(;e.nodeName!=="body";)e=e.nextSibling;if(e)n.data=i(e,0);return n})})(Popcorn);(function(m){m.parser("parseTTXT",function(i){var k={title:"",remote:"",data:[]},d=function(n){n=n.split(":");var u=0;try{return parseFloat(n[0],10)*60*60+parseFloat(n[1],10)*60+parseFloat(n[2],10)}catch(q){u=0}return u},b=function(n,u){var q={};q[n]=u;return q};i=i.xml.lastChild.lastChild;for(var f=Number.MAX_VALUE,h=[];i;){if(i.nodeType===1&&i.nodeName==="TextSample"){var e={};e.start=d(i.getAttribute("sampleTime"));e.text=i.getAttribute("text");if(e.text){e.end=f-0.001;h.push(b("subtitle",e))}f= +e.start}i=i.previousSibling}k.data=h.reverse();return k})})(Popcorn);(function(m){function i(d){var b=d.split(":");d=d.length;var f;if(d!==12&&d!==9)throw"Bad cue";d=b.length-1;try{f=parseInt(b[d-1],10)*60+parseFloat(b[d],10);if(d===2)f+=parseInt(b[0],10)*3600}catch(h){throw"Bad cue";}return f}function k(d,b){var f={};f[d]=b;return f}m.parser("parseVTT",function(d){var b={title:"",remote:"",data:[]},f=[],h=0,e=0,n,u;d=d.text.split(/(?:\r\n|\r|\n)/gm);e=d.length;if(e===0||d[0]!=="WEBVTT")return b;for(h++;h")===-1)throw"Bad cue";q=v.replace(/--\>/," --\> ").split(/[\t ]+/);if(q.length<2)throw"Bad cue";w.id=v;w.start=i(q[0]);w.end=i(q[2]);for(u=w;h");f.push(k("subtitle",u))}catch(o){for(h=h;h