/* * JavaScript MD5 1.0.1 * https://github.com/blueimp/JavaScript-MD5 * * Copyright 2011, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT * * Based on * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for more info. */ !function(a){"use strict";function b(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function c(a,b){return a<>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<>>9<<4)+14]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b>5]|=(255&a.charCodeAt(b/8))<16&&(e=i(e,8*a.length)),c=0;16>c;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d="0123456789abcdef",e="";for(c=0;c>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}"function"==typeof define&&define.amd?define(function(){return t}):a.md5=t}(this); /*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */ ;(function(){window.bowser=function(b){function c(a){return(a=b.match(a))&&1a.version||a.chrome&&20>a.version||a.firefox&&20>a.version||a.safari&&6>a.version||a.opera&&10>a.version||a.ios&&a.osversion&&6>a.osversion.split(".")[0]?a.c=!0:a.x=!0;return a}("undefined"!== typeof window.navigator?window.navigator.userAgent:"")})(); /** @license * * SoundManager 2: JavaScript Sound for the Web * ---------------------------------------------- * http://schillmania.com/projects/soundmanager2/ * * Copyright (c) 2007, Scott Schiller. All rights reserved. * Code provided under the BSD License: * http://schillmania.com/projects/soundmanager2/license.txt * * V2.97a.20131201 */ (function(g,i){function R(R,ia){function S(b){return c.preferFlash&&r&&!c.ignoreFlash&&c.flash[b]!==i&&c.flash[b]}function n(b){return function(c){var d=this._s;return!d||!d._a?null:b.call(this,c)}}this.setupOptions={url:R||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1E3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0, html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"};this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100};this.flash9Options={isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null, ondataerror:null};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null};this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"', "audio/wav","audio/wave","audio/x-wav"],required:!1}};this.movieID="sm2-container";this.id=ia||"sm2movie";this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.versionNumber="V2.97a.20131201";this.altURL=this.movieURL=this.version=null;this.enabled=this.swfLoaded=!1;this.oMC=null;this.sounds={};this.soundIDs=[];this.didFlashBlock=this.muted=!1;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.features={buffering:!1,peakData:!1,waveformData:!1, eqData:!1,movieStar:!1};this.sandbox={};this.html5={usingFlash:null};this.flash={};this.ignoreFlash=this.html5Only=!1;var Ha,c=this,Ia=null,h=null,T,p=navigator.userAgent,Ja=g.location.href.toString(),l=document,ja,Ka,ka,k,t=[],H=!1,I=!1,j=!1,u=!1,la=!1,J,s,ma,U,na,A,B,C,La,oa,pa,V,qa,W,ra,D,sa,K,ta,X,E,Ma,ua,Na,va,Oa,L=null,wa=null,M,xa,F,Y,Z,m,N=!1,ya=!1,Pa,Qa,Ra,$=0,O=null,aa,Sa=[],P,q=null,Ta,ba,Q,v,ca,za,Ua,o,gb=Array.prototype.slice,x=!1,Aa,r,Ba,Va,y,da,Wa=0,ea=p.match(/(ipad|iphone|ipod)/i), Xa=p.match(/android/i),z=p.match(/msie/i),hb=p.match(/webkit/i),fa=p.match(/safari/i)&&!p.match(/chrome/i),Ca=p.match(/opera/i),Da=p.match(/(mobile|pre\/|xoom)/i)||ea||Xa,Ya=!Ja.match(/usehtml5audio/i)&&!Ja.match(/sm2\-ignorebadua/i)&&fa&&!p.match(/silk/i)&&p.match(/OS X 10_6_([3-7])/i),Ea=l.hasFocus!==i?l.hasFocus():null,ga=fa&&(l.hasFocus===i||!l.hasFocus()),Za=!ga,$a=/(mp3|mp4|mpa|m4a|m4b)/i,Fa=l.location?l.location.protocol.match(/http/i):null,ab=!Fa?"http://":"",bb=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i, cb="mpeg4 aac flv mov mp4 m4v f4v m4a m4b mp4v 3gp 3g2".split(" "),ib=RegExp("\\.("+cb.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.useAltURL=!Fa;var Ga;try{Ga=Audio!==i&&(Ca&&opera!==i&&10>opera.version()?new Audio(null):new Audio).canPlayType!==i}catch(kb){Ga=!1}this.hasHTML5=Ga;this.setup=function(b){var e=!c.url;b!==i&&j&&q&&c.ok();ma(b);b&&(e&&K&&b.url!==i&&c.beginDelayedInit(),!K&&b.url!==i&&"complete"===l.readyState&&setTimeout(D,1));return c}; this.supported=this.ok=function(){return q?j&&!u:c.useHTML5Audio&&c.hasHTML5};this.getMovie=function(b){return T(b)||l[b]||g[b]};this.createSound=function(b,e){function d(){a=Y(a);c.sounds[a.id]=new Ha(a);c.soundIDs.push(a.id);return c.sounds[a.id]}var a,f=null;if(!j||!c.ok())return!1;e!==i&&(b={id:b,url:e});a=s(b);a.url=aa(a.url);void 0===a.id&&(a.id=c.setupOptions.idPrefix+Wa++);if(m(a.id,!0))return c.sounds[a.id];if(ba(a))f=d(),f._setup_html5(a);else{if(c.html5Only||c.html5.usingFlash&&a.url&& a.url.match(/data\:/i))return d();8a.instanceCount?(l(),f=a._setup_html5(),a.setPosition(a._iO.position), f.play()):(w=new Audio(a._iO.url),g=function(){o.remove(w,"ended",g);a._onfinish(a);ca(w);w=null},G=function(){o.remove(w,"canplay",G);try{w.currentTime=a._iO.position/1E3}catch(b){}w.play()},o.add(w,"ended",g),void 0!==a._iO.volume&&(w.volume=Math.max(0,Math.min(1,a._iO.volume/100))),a.muted&&(w.muted=!0),a._iO.position?o.add(w,"canplay",G):w.play()):(f=h._start(a.id,a._iO.loops||1,9===k?a.position:a.position/1E3,a._iO.multiShot||!1),9===k&&!f&&a._iO.onplayerror&&a._iO.onplayerror.apply(a))}return a}; this.stop=function(b){var c=a._iO;1===a.playState&&(a._onbufferchange(0),a._resetOnPosition(0),a.paused=!1,a.isHTML5||(a.playState=0),t(),c.to&&a.clearOnPosition(c.to),a.isHTML5?a._a&&(b=a.position,a.setPosition(0),a.position=b,a._a.pause(),a.playState=0,a._onTimer(),g()):(h._stop(a.id,b),c.serverURL&&a.unload()),a.instanceCount=0,a._iO={},c.onstop&&c.onstop.apply(a));return a};this.setAutoPlay=function(b){a._iO.autoPlay=b;a.isHTML5||(h._setAutoPlay(a.id,b),b&&!a.instanceCount&&1===a.readyState&& a.instanceCount++)};this.getAutoPlay=function(){return a._iO.autoPlay};this.setPosition=function(b){b===i&&(b=0);var c=a.isHTML5?Math.max(b,0):Math.min(a.duration||a._iO.duration,Math.max(b,0));a.position=c;b=a.position/1E3;a._resetOnPosition(a.position);a._iO.position=c;if(a.isHTML5){if(a._a){if(a._html5_canplay){if(a._a.currentTime!==b)try{a._a.currentTime=b,(0===a.playState||a.paused)&&a._a.pause()}catch(e){}}else if(b)return a;a.paused&&a._onTimer(!0)}}else b=9===k?a.position:b,a.readyState&& 2!==a.readyState&&h._setPosition(a.id,b,a.paused||!a.playState,a._iO.multiShot);return a};this.pause=function(b){if(a.paused||0===a.playState&&1!==a.readyState)return a;a.paused=!0;a.isHTML5?(a._setup_html5().pause(),g()):(b||b===i)&&h._pause(a.id,a._iO.multiShot);a._iO.onpause&&a._iO.onpause.apply(a);return a};this.resume=function(){var b=a._iO;if(!a.paused)return a;a.paused=!1;a.playState=1;a.isHTML5?(a._setup_html5().play(),l()):(b.isMovieStar&&!b.serverURL&&a.setPosition(a.position),h._pause(a.id, b.multiShot));!p&&b.onplay?(b.onplay.apply(a),p=!0):b.onresume&&b.onresume.apply(a);return a};this.togglePause=function(){if(0===a.playState)return a.play({position:9===k&&!a.isHTML5?a.position:a.position/1E3}),a;a.paused?a.resume():a.pause();return a};this.setPan=function(b,c){b===i&&(b=0);c===i&&(c=!1);a.isHTML5||h._setPan(a.id,b);a._iO.pan=b;c||(a.pan=b,a.options.pan=b);return a};this.setVolume=function(b,e){b===i&&(b=100);e===i&&(e=!1);a.isHTML5?a._a&&(c.muted&&!a.muted&&(a.muted=!0,a._a.muted= !0),a._a.volume=Math.max(0,Math.min(1,b/100))):h._setVolume(a.id,c.muted&&!a.muted||a.muted?0:b);a._iO.volume=b;e||(a.volume=b,a.options.volume=b);return a};this.mute=function(){a.muted=!0;a.isHTML5?a._a&&(a._a.muted=!0):h._setVolume(a.id,0);return a};this.unmute=function(){a.muted=!1;var b=a._iO.volume!==i;a.isHTML5?a._a&&(a._a.muted=!1):h._setVolume(a.id,b?a._iO.volume:a.options.volume);return a};this.toggleMute=function(){return a.muted?a.unmute():a.mute()};this.onposition=this.onPosition=function(b, c,e){j.push({position:parseInt(b,10),method:c,scope:e!==i?e:a,fired:!1});return a};this.clearOnPosition=function(a,b){var c,a=parseInt(a,10);if(isNaN(a))return!1;for(c=0;c=b)return!1;for(b-=1;0<=b;b--)c=j[b],!c.fired&&a.position>=c.position&&(c.fired=!0,q++,c.method.apply(c.scope,[c.position]));return!0};this._resetOnPosition=function(a){var b, c;b=j.length;if(!b)return!1;for(b-=1;0<=b;b--)c=j[b],c.fired&&a<=c.position&&(c.fired=!1,q--);return!0};u=function(){var b=a._iO,c=b.from,e=b.to,d,f;f=function(){a.clearOnPosition(e,f);a.stop()};d=function(){if(null!==e&&!isNaN(e))a.onPosition(e,f)};null!==c&&!isNaN(c)&&(b.position=c,b.multiShot=!1,d());return b};n=function(){var b,c=a._iO.onposition;if(c)for(b in c)if(c.hasOwnProperty(b))a.onPosition(parseInt(b,10),c[b])};t=function(){var b,c=a._iO.onposition;if(c)for(b in c)c.hasOwnProperty(b)&& a.clearOnPosition(parseInt(b,10))};l=function(){a.isHTML5&&Pa(a)};g=function(){a.isHTML5&&Qa(a)};f=function(b){b||(j=[],q=0);p=!1;a._hasTimer=null;a._a=null;a._html5_canplay=!1;a.bytesLoaded=null;a.bytesTotal=null;a.duration=a._iO&&a._iO.duration?a._iO.duration:null;a.durationEstimate=null;a.buffered=[];a.eqData=[];a.eqData.left=[];a.eqData.right=[];a.failures=0;a.isBuffering=!1;a.instanceOptions={};a.instanceCount=0;a.loaded=!1;a.metadata={};a.readyState=0;a.muted=!1;a.paused=!1;a.peakData={left:0, right:0};a.waveformData={left:[],right:[]};a.playState=0;a.position=null;a.id3={}};f();this._onTimer=function(b){var c,f=!1,i={};if(a._hasTimer||b){if(a._a&&(b||(0opera.version()?new Audio(null): new Audio,c=a._a,c._called_load=!1,x&&(Ia=c);a.isHTML5=!0;a._a=c;c._s=a;G();a._apply_loop(c,b.loops);b.autoLoad||b.autoPlay?a.load():(c.autobuffer=!1,c.preload="auto");return c};G=function(){if(a._a._added_events)return!1;var b;a._a._added_events=!0;for(b in y)y.hasOwnProperty(b)&&a._a&&a._a.addEventListener(b,y[b],!1);return!0};db=function(){var b;a._a._added_events=!1;for(b in y)y.hasOwnProperty(b)&&a._a&&a._a.removeEventListener(b,y[b],!1)};this._onload=function(b){var c=!!b||!a.isHTML5&&8===k&& a.duration;a.loaded=c;a.readyState=c?3:2;a._onbufferchange(0);a._iO.onload&&da(a,function(){a._iO.onload.apply(a,[c])});return!0};this._onbufferchange=function(b){if(0===a.playState||b&&a.isBuffering||!b&&!a.isBuffering)return!1;a.isBuffering=1===b;a._iO.onbufferchange&&a._iO.onbufferchange.apply(a);return!0};this._onsuspend=function(){a._iO.onsuspend&&a._iO.onsuspend.apply(a);return!0};this._onfailure=function(b,c,e){a.failures++;if(a._iO.onfailure&&1===a.failures)a._iO.onfailure(a,b,c,e)};this._onfinish= function(){var b=a._iO.onfinish;a._onbufferchange(0);a._resetOnPosition(0);a.instanceCount&&(a.instanceCount--,a.instanceCount||(t(),a.playState=0,a.paused=!1,a.instanceCount=0,a.instanceOptions={},a._iO={},g(),a.isHTML5&&(a.position=0)),(!a.instanceCount||a._iO.multiShotEvents)&&b&&da(a,function(){b.apply(a)}))};this._whileloading=function(b,c,e,d){var f=a._iO;a.bytesLoaded=b;a.bytesTotal=c;a.duration=Math.floor(e);a.bufferLength=d;a.durationEstimate=!a.isHTML5&&!f.isMovieStar?f.duration?a.duration> f.duration?a.duration:f.duration:parseInt(a.bytesTotal/a.bytesLoaded*a.duration,10):a.duration;a.isHTML5||(a.buffered=[{start:0,end:a.duration}]);(3!==a.readyState||a.isHTML5)&&f.whileloading&&f.whileloading.apply(a)};this._whileplaying=function(b,c,e,d,f){var g=a._iO;if(isNaN(b)||null===b)return!1;a.position=Math.max(0,b);a._processOnPosition();!a.isHTML5&&8opera.version()?new Audio(null):new Audio:null,d,a,f={},g,h;g=c.audioFormats;for(d in g)if(g.hasOwnProperty(d)&& (a="audio/"+d,f[d]=b(g[d].type),f[a]=f[d],d.match($a)?(c.flash[d]=!0,c.flash[a]=!0):(c.flash[d]=!1,c.flash[a]=!1),g[d]&&g[d].related))for(h=g[d].related.length-1;0<=h;h--)f["audio/"+g[d].related[h]]=f[d],c.html5[g[d].related[h]]=f[d],c.flash[g[d].related[h]]=f[d];f.canPlayType=e?b:null;c.html5=s(c.html5,f);c.html5.usingFlash=Ta();q=c.html5.usingFlash;return!0};qa={};M=function(){};Y=function(b){8===k&&1k)&&(c.flashVersion=k=9);c.version=c.versionNumber+(c.html5Only?" (HTML5-only mode)":9===k?" (AS3/Flash 9)":" (AS2/Flash 8)");8'}if(H&&I)return!1;if(c.html5Only)return pa(),c.oMC=T(c.movieID),ka(),I=H=!0,!1;var a=e||c.url,f=c.altURL||a,g=ta(),h=F(),k=null,k=l.getElementsByTagName("html")[0],j,n,m,k=k&&k.dir&&k.dir.match(/rtl/i),b=b===i?c.id:b;pa();c.url=Oa(Fa?a:f);e=c.url;c.wmode=!c.wmode&&c.useHighPerformance?"transparent":c.wmode;if(null!==c.wmode&&(p.match(/msie 8/i)||!z&&!c.useHighPerformance)&& navigator.platform.match(/win32|win64/i))Sa.push(qa.spcWmode),c.wmode=null;g={name:b,id:b,src:e,quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:ab+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:c.wmode,hasPriority:"true"};c.debugFlash&&(g.FlashVars="debug=1");c.wmode||delete g.wmode;if(z)a=l.createElement("div"),n=['',d("movie",e),d("AllowScriptAccess",c.allowScriptAccess),d("quality",g.quality),c.wmode?d("wmode",c.wmode):"",d("bgcolor",c.bgColor),d("hasPriority","true"),c.debugFlash?d("FlashVars",g.FlashVars):"",""].join("");else for(j in a=l.createElement("embed"),g)g.hasOwnProperty(j)&&a.setAttribute(j,g[j]);ua();h=F();if(g=ta())if(c.oMC=T(c.movieID)|| l.createElement("div"),c.oMC.id)m=c.oMC.className,c.oMC.className=(m?m+" ":"movieContainer")+(h?" "+h:""),c.oMC.appendChild(a),z&&(j=c.oMC.appendChild(l.createElement("div")),j.className="sm2-object-box",j.innerHTML=n),I=!0;else{c.oMC.id=c.movieID;c.oMC.className="movieContainer "+h;j=h=null;c.useFlashBlock||(c.useHighPerformance?h={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(h={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},k&& (h.left=Math.abs(parseInt(h.left,10))+"px")));hb&&(c.oMC.style.zIndex=1E4);if(!c.debugFlash)for(m in h)h.hasOwnProperty(m)&&(c.oMC.style[m]=h[m]);try{z||c.oMC.appendChild(a),g.appendChild(c.oMC),z&&(j=c.oMC.appendChild(l.createElement("div")),j.className="sm2-object-box",j.innerHTML=n),I=!0}catch(o){throw Error(M("domError")+" \n"+o.toString());}}return H=!0};W=function(){if(c.html5Only)return X(),!1;if(h||!c.url)return!1;(h=c.getMovie(c.id))||(L?(z?c.oMC.innerHTML=wa:c.oMC.appendChild(L),L=null, H=!0):X(c.id,c.url),h=c.getMovie(c.id));"function"===typeof c.oninitmovie&&setTimeout(c.oninitmovie,1);return!0};C=function(){setTimeout(La,1E3)};oa=function(){g.setTimeout(function(){c.setup({preferFlash:!1}).reboot();c.didFlashBlock=!0;c.beginDelayedInit()},1)};La=function(){var b,e=!1;if(!c.url||N)return!1;N=!0;o.remove(g,"load",C);if(r&&ga&&!Ea)return!1;j||(b=c.getMoviePercent(),0b&&(e=!0));setTimeout(function(){b=c.getMoviePercent();if(e)return N=!1,g.setTimeout(C,1),!1;!j&&Za&&(null=== b?c.useFlashBlock||0===c.flashLoadTimeout?c.useFlashBlock&&xa():!c.useFlashBlock&&P?oa():A({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}}):0!==c.flashLoadTimeout&&(!c.useFlashBlock&&P?oa():va(!0)))},c.flashLoadTimeout)};V=function(){if(Ea||!ga)return o.remove(g,"focus",V),!0;Ea=Za=!0;N=!1;C();o.remove(g,"focus",V);return!0};J=function(b){if(j)return!1;if(c.html5Only)return j=!0,B(),!0;var e=!0,d;if(!c.useFlashBlock||!c.flashLoadTimeout||c.getMoviePercent())j=!0;d={type:!r&&q?"NO_FLASH": "INIT_TIMEOUT"};if(u||b)c.useFlashBlock&&c.oMC&&(c.oMC.className=F()+" "+(null===c.getMoviePercent()?"swf_timedout":"swf_error")),A({type:"ontimeout",error:d,ignoreInit:!0}),E(d),e=!1;u||(c.waitForWindowLoad&&!la?o.add(g,"load",B):B());return e};Ka=function(){var b,e=c.setupOptions;for(b in e)e.hasOwnProperty(b)&&(c[b]===i?c[b]=e[b]:c[b]!==e[b]&&(c.setupOptions[b]=c[b]))};ka=function(){if(j)return!1;if(c.html5Only)return j||(o.remove(g,"load",c.beginDelayedInit),c.enabled=!0,J()),!0;W();try{h._externalInterfaceTest(!1), Ma(!0,c.flashPollingInterval||(c.useHighPerformance?10:50)),c.debugMode||h._disableDebug(),c.enabled=!0,c.html5Only||o.add(g,"unload",ja)}catch(b){return E({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),va(!0),J(),!1}J();o.remove(g,"load",c.beginDelayedInit);return!0};D=function(){if(K)return!1;K=!0;Ka();ua();!r&&c.hasHTML5&&c.setup({useHTML5Audio:!0,preferFlash:!1});Ua();!r&&q&&(Sa.push(qa.needFlash),c.setup({flashLoadTimeout:1}));l.removeEventListener&&l.removeEventListener("DOMContentLoaded",D,!1);W(); return!0};za=function(){"complete"===l.readyState&&(D(),l.detachEvent("onreadystatechange",za));return!0};sa=function(){la=!0;o.remove(g,"load",sa)};ra=function(){if(Da&&(c.setupOptions.useHTML5Audio=!0,c.setupOptions.preferFlash=!1,ea||Xa&&!p.match(/android\s2\.3/i)))ea&&(c.ignoreFlash=!0),x=!0};ra();Ba();o.add(g,"focus",V);o.add(g,"load",C);o.add(g,"load",sa);l.addEventListener?l.addEventListener("DOMContentLoaded",D,!1):l.attachEvent?l.attachEvent("onreadystatechange",za):E({type:"NO_DOM2_EVENTS", fatal:!0})}var ia=null;if(void 0===g.SM2_DEFER||!SM2_DEFER)ia=new R;g.SoundManager=R;g.soundManager=ia})(window); /* json2.js 2015-05-03 */ "object"!==typeof JSON&&(JSON={}); (function(){function m(a){return 10>a?"0"+a:a}function r(){return this.valueOf()}function t(a){u.lastIndex=0;return u.test(a)?'"'+a.replace(u,function(a){var c=w[a];return"string"===typeof c?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function p(a,l){var c,d,h,q,g=e,f,b=l[a];b&&"object"===typeof b&&"function"===typeof b.toJSON&&(b=b.toJSON(a));"function"===typeof k&&(b=k.call(l,a,b));switch(typeof b){case "string":return t(b);case "number":return isFinite(b)?String(b): "null";case "boolean":case "null":return String(b);case "object":if(!b)return"null";e+=n;f=[];if("[object Array]"===Object.prototype.toString.apply(b)){q=b.length;for(c=0;cdocument.w=window'),a.close(),u=a.w.frames[0].document,s=u.createElement("div")}catch(f){s=n.createElement("div"),u=n.body}var l=function(t){return function(){var n=Array.prototype.slice.call(arguments,0);n.unshift(s),u.appendChild(s),s.addBehavior("#default#userData"),s.load(r);var i=t.apply(e,n);return u.removeChild(s),i}},c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g"),h=function(e){return e.replace(/^d/,"___$&").replace(c,"___")};e.set=l(function(t,n,i){return n=h(n),i===undefined?e.remove(n):(t.setAttribute(n,e.serialize(i)),t.save(r),i)}),e.get=l(function(t,n,r){n=h(n);var i=e.deserialize(t.getAttribute(n));return i===undefined?r:i}),e.remove=l(function(e,t){t=h(t),e.removeAttribute(t),e.save(r)}),e.clear=l(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(r);while(t.length)e.removeAttribute(t[0].name);e.save(r)}),e.getAll=function(t){var n={};return e.forEach(function(e,t){n[e]=t}),n},e.forEach=l(function(t,n){var r=t.XMLDocument.documentElement.attributes;for(var i=0,s;s=r[i];++i)n(s.name,e.deserialize(t.getAttribute(s.name)))})}try{var p="__storejs__";e.set(p,p),e.get(p)!=p&&(e.disabled=!0),e.remove(p)}catch(f){e.disabled=!0}return e.enabled=!e.disabled,e}) /** * @name Hermit * @version 2.4.2 * @create 2014-02-07 * @lastmodified 2016-09-25 14:39 * @description Hermit Plugin * @author mufeng (http://mufeng.me) * @url http://mufeng.me/hermit-for-wordpress.html **/ !function(win,doc,undefined){function mobileAutoEventBind(a){mobileAutoGroupID=a,window.addEventListener("touchstart",forceSafariPlayAudio,!1)}function forceSafariPlayAudio(){null!=mobileAutoGroupID?__Event.playEvent(mobileAutoGroupID,0):(window.removeEventListener("touchstart",forceSafariPlayAudio,!1),mobileAutoGroupID=null)}var __H={sm:soundManager,queue:[],current:null,muted:!1,ui:null,identifier:null},log=function(){if(parseInt(hermit.debug)&&win.console)try{var a=arguments[0],b=Array.prototype.slice.call(arguments,1);return"warn"==a?console.warn.apply(console,b):"error"==a?console.error.apply(console,b):console.log.apply(console,b)}catch(c){console.error(c)}},remainTime=parseInt(hermit.remain_time);remainTime=remainTime||0,remainTime=60*remainTime*60*1e3,log("log","Hermit version %s",hermit.version),__H.sm.setup({url:hermit.url,debugMode:!1,preferFlash:!1,wmode:"transparent",movieStarOptions:{bufferTime:3}}),log("log","Hermit initialize");var mobileAutoGroupID=null,__DOM=function(a,b){if(a){if(!(this instanceof __DOM))return new __DOM(a,b);this.__DOM_INIT(a,b)}};__DOM.prototype={__DOM_INIT:function(a,b){return a?a.nodeType?(this[0]=a,this.length=1,this):__DOM.fn.isWindow(a)?(this[0]=win,this.length=1,this):(this.length=0,this.add(__DOM.fn.dom(a,b)),this):this},add:function(a){if(a.length>0){var b=this;__DOM.each(a,function(a,c){c&&c.nodeType&&(b[b.length++]=c)})}return this},get:function(a){return this[a]},each:function(a){__DOM.each(this,a)},attr:function(b,c){return __DOM.fn.isObject(b)?(this.each(function(c,d){for(a in b)d.setAttribute(a,b[a])}),this):c!==undefined?(this.each(function(a,d){d.setAttribute(b,c)}),this):this[0].getAttribute(b)},append:function(a){return this.each(function(b,c){c.appendChild(a)}),this},html:function(a){return"undefined"!=a?(this.each(function(b,c){c.innerHTML=a}),this):this.get(0).innerHTML},on:function(a,b){return this.each(function(c,d){__DOM.fn.bind(a,d,b)}),this},off:function(a,b){return this.each(function(c,d){__DOM.fn.unbind(a,d,b)}),this},hasClass:function(a){return 0<=(" "+this.get(0).className+" ").replace(__DOM.fn.rclass," ").indexOf(" "+a+" ")},addClass:function(a){return a&&"string"==typeof a&&this.each(function(b,c){var d=(a||"").split(__DOM.fn.rspaces);if(1===c.nodeType)if(c.className){for(var e=" "+c.className+" ",f=c.className,g=0,h=d.length;h>g;g++)0>e.indexOf(" "+d[g]+" ")&&(f+=" "+d[g]);c.className=__DOM.fn.trim(f)}else c.className=a}),this},removeClass:function(a){return(a&&"string"==typeof a||void 0===a)&&this.each(function(b,c){var d=(a||"").split(__DOM.fn.rspaces);if(1===c.nodeType&&c.className)if(a){for(var e=(" "+c.className+" ").replace(__DOM.fn.rclass," "),f=0,g=d.length;g>f;f++)e=e.replace(" "+d[f]+" "," ");c.className=__DOM.fn.trim(e)}else c.className=""}),this},width:function(a){if(a!=undefined)return this.each(function(b,c){c.style.width=a}),this},offset:function(){var a=this[0];if(!a)return{top:0,left:0};var b=a.getBoundingClientRect(),c=a.ownerDocument,a=c.body,c=c.documentElement;return{top:b.top+(win.pageYOffset||c.scrollTop||a.scrollTop)-(c.clientTop||a.clientTop||0),left:b.left+(win.pageXOffset||c.scrollLeft||a.scrollLeft)-(c.clientLeft||a.clientLeft||0)}},css:function(a,b){if(b===undefined){var c=this[0];if(c.currentStyle)return c.currentStyle[a];if(win.getComputedStyle){var d=a.replace(/([A-Z])/g,"-$1");return d=a.toLowerCase(),doc.defaultView.getComputedStyle(c,null)[d]}return null}var c=this[0];return c.style[a]=b,this}},__DOM.fn={rclass:/[\n\t]/g,rspaces:/\s+/,trim:function(a){return a.replace(/^(\s|\u00A0)+/,"").replace(/(\s|\u00A0)+$/,"")},isWindow:function(a){return null!=a&&a.window==win},isArray:function(){return"[object Array]"==Object.prototype.toString.call(obj)},isFunction:function(){return"[object Function]"==Object.prototype.toString.call(obj)},isObject:function(a){return"[object Object]"==Object.prototype.toString.call(a)},handleHash:{},bind:doc.addEventListener?function(a,b,c){b.addEventListener(a,function(){c.apply(this,arguments),__DOM.fn.handleHash[a]=__DOM.fn.handleHash[a]||[],__DOM.fn.handleHash[a].push(arguments.callee)},!1)}:doc.attachEvent?function(a,b,c){b.attachEvent("on"+a,function(){c.apply(this,arguments),__DOM.fn.handleHash[a]=__DOM.fn.handleHash[a]||[],__DOM.fn.handleHash[a].push(arguments.callee)})}:void 0,unbind:doc.removeEventListener?function(a,b){if(__DOM.fn.handleHash[a]){var c=0,d=__DOM.fn.handleHash[a].length;for(c;d>c;c+=1)b.removeEventListener(a,__DOM.fn.handleHash[a][c],!1);__DOM.fn.handleHash[a]=null}}:doc.detachEvent?function(a,b){if(__DOM.fn.handleHash[a]){var c=0,d=__DOM.fn.handleHash[a].length;for(c;d>c;c+=1)b.detachEvent("on"+a,__DOM.fn.handleHash[a][c]);__DOM.fn.handleHash[a]=null}}:void 0,dom:function(){function a(k,l){l=l||document;var m=/^[\w\-_#]+$/.test(k);if(!m&&l.querySelectorAll)return b(l.querySelectorAll(k));if(k.indexOf(",")>-1){for(var n=k.split(/,/g),o=[],p=0,q=n.length;p"===e)return c(a,b,!0);var j,k,l,m=[],n=-1,o=(e.match(g)||i)[1],p=!o&&(e.match(f)||i)[1],q=!o&&(e.match(h)||i)[1],r=-1;for(q=q&&q.toLowerCase();j=b[++r];){k=j.parentNode;do if(l=!q||"*"===q||q===k.nodeName.toLowerCase(),l=l&&(!o||k.id===o),l=l&&(!p||RegExp("(^|\\s)"+p+"(\\s|$)").test(k.className)),d||l)break;while(k=k.parentNode);l&&(m[++n]=j)}return a[0]&&m[0]?c(a,m):m}function d(a,b,c){for(var d,e=-1,f=-1,g=[];d=a[++e];)c.test(d[b])&&(g[++f]=d);return g}var e=/(?:[\w\-\\.#]+)+(?:\[\w+?=([\'"])?(?:\\\1|.)+?\1\])?|\*|>/gi,f=/^(?:[\w\-_]+)?\.([\w\-_]+)/,g=/^(?:[\w\-_]+)?#([\w\-_]+)/,h=/^([\w\*\-_]+)/,i=[null,null],j=function(){var a=+new Date,b=function(){var b=1;return function(c){var d=c[a],e=b++;return!d&&(c[a]=e,!0)}}();return function(c){for(var d,e=c.length,f=[],g=-1,h=0;hc&&!1!==b.call(a[c],c,a[c]);c++);else for(name in a)b.call(a[name],name,a[name])},__DOM.fn.ajax.prototype={init:function(a){this.url=a.url||window.location.href,this.method=a.method||"GET",this.before=a.before||new Function,this.dataType=a.dataType||"json",this.send=a.send||null,this.delay=a.delay||20,this.header=a.header||"",this.success=a.success||new Function,this.error=a.error||new Function,this.timeout=a.timeout||!1,this.hasDo=!1,this.sendxmlHttp()},createxmlHttp:function(){var a;try{a=new XMLHttpRequest}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){return log("error","Your browser does not support ajax!"),!1}}}return a},sendxmlHttp:function(){this.isTimeout=!1,this.xmlHttp=this.createxmlHttp(),this.before(),this.xmlHttp.open(this.method,this.url,!0),this.timer=setTimeout(this.bind(this.checkTimeout,this),1e3*this.delay),this.setHeader(this.header),this.requestStatus=0,this.xmlHttp.onreadystatechange=this.bind(function(){switch(this.xmlHttp.readyState){case 1:case 2:case 3:break;case 4:if(!this.hasDo){this.hasDo=!0;try{if(clearTimeout(this.timer),this.xmlHttp.status&&200==this.xmlHttp.status){if(""===this.xmlHttp.responseText.trim())return void this.error();try{this.data=JSON.parse(this.xmlHttp.responseText)}catch(e){this.data=eval("("+this.xmlHttp.responseText+")"),log("error",e+"(Unknown error occurred.)")}this.success.call(null,this.data)}else this.isTimeout?(log("warn","Response timeout.Please try again later"),this.timeout?this.timeout():this.error()):this.isError||(this.data=this.xmlHttp.responseText,this.error())}catch(e){log("error",e+"(Unknown error occurred, may be related to network, please refresh the page to continue.)")}}}},this),this.xmlHttp.send(this.send)},checkTimeout:function(){4!==this.requestStatus&&(this.isTimeout=!0,this.xmlHttp.abort())},setHeader:function(){null==this.send?this.xmlHttp.setRequestHeader("Content-type","charset=UTF-8"):this.xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");var a=this.header.split("&");if(a[0].length)for(var b=0;b0?a.album_author:"(๑• . •๑)";g.html(a.album_title),h.html(l)}else if(a.collect_title!==undefined){var l=a.collect_author.length>0?a.collect_author:"(๑• . •๑)";g.html(a.collect_title),h.html(l)}else g.html(hermit.text_tips);parseInt(hermit.album_source)?i.attr("src",hermit.ajax_url+"?action=hermit_album&s="+encodeURIComponent(d[0].song_cover)):i.attr("src",d[0].song_cover),e.html(""),__DOM.each(d,function(a,d){var f,g=doc.createElement("div"),h=c.telpher("song",b+"-"+a);f=''+(a+1)+''+d.song_title+'- '+d.song_author+"",d.song_length&&(f+=''+__UI.parseTime(d.song_length)+""),__DOM(g).attr({id:h,"class":"hermit-song"}).html(f),d.song_src||__DOM(g).addClass("hermit-deactive"),__H.queue[b].songs.push({ID:h,author:d.song_author,cover:d.song_cover,title:d.song_title,lrc:d.song_lrc,length:d.song_length,sound:null,moving:!1}),e.append(g),new __Player({id:h,index:a,groupID:b,src:d.song_src})}),new __Event(b)},getJson:function(a,b,c){var d,e=hermit.ajax_url+"?action=hermit&scope="+a.type+"&id="+a.id,f=md5(e),g=!1;if(window.store!==undefined&&store.enabled&&(g=!0),g&&remainTime>0){d=store.get(f);var h=(new Date).valueOf(),i=store.get(f+"_date");i&&i!==undefined?(i=parseInt(i),h-i>remainTime&&(d=null)):d=null}d&&d!==undefined?(log("log","[HttpCache]%s",e),b.call(null,d)):(log("log","[HttpRequest]%s",e),__DOM.ajax({url:e,dataType:"json",success:function(a){a.msg?(log("log","[HttpSuccess]%s - %o",e,a),g&&(store.remove(f),store.set(f,a),store.set(f+"_date",(new Date).valueOf())),b.call(null,a)):(log("error","[HttpError]%s",e),c.call(null))},error:function(){log("error","[HttpError]%s",e),c.call(null)},timeout:function(){log("warn","[HttpTimeout]%s",e),c.call(null)}}))},telpher:function(a,b){return"hermit-"+__H.identifier+"-"+a+"-"+b}},__UI.getElement=function(a,b){var c="#hermit-"+__H.identifier+"-"+b+"-"+a;return __DOM(c)},__UI.parseTime=function(a){if(!isFinite(a)||0>a)return"--:--";var b=Math.floor(a/60),a=Math.floor(a)%60;return(10>b?"0"+b:b)+":"+(10>a?"0"+a:a)},__UI.randomString=function(){for(var a="abcdefghijklmnopqrstuvwxyzs",b=5,c="",d=0;d