!function(a,b){“use strict”;function c(a,b){for(var c,d=[],f=0;fd
(a++).toString(32)}}(),l=function(a){return a?String.prototype.trim?String.prototype.trim.call(a):a.toString().replace(/^s*/,“”).replace(/s*$/,“”):a},m=function(a){if(“string”!=typeof a)return a;var b,c={t:1099511627776,g:1073741824,m:1048576,k:1024};return a=/^(+)([mgk]?)$/.exec(a.toLowerCase().replace(//g,“”)),b=a,a=+a,c.hasOwnProperty(b)&&(a*=c),a};return{guid:k,typeOf:a,extend:b,each:c,isEmptyObj:d,inSeries:e,inParallel:f,inArray:g,arrayDiff:h,arrayIntersect:i,toArray:j,trim:l,parseSizeStr:m}}),d(“moxie/core/I18n”,,function(a){var b={};return{addI18n:function©{return a.extend(b,c)},translate:function(a){return b||a},_:function(a){return this.translate(a)},sprintf:function(b){var c=[].slice.call(arguments,1);return b.replace(/%/g,function(){var b=c.shift();return“undefined”!==a.typeOf(b)?b:“”})}}}),d(“moxie/core/utils/Mime”,,function(a,b){var c=“application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe”,d={mimes:{},extensions:{},addMimeType:function(a){var b,c,d,e=a.split(/,/);for(b=0;b<e.length;b+=2){for(d=e.split(/ /),c=0;ce[1]
“/”).test(b)&&[].push.apply(d,c.extensions)}):c.extensions&&[].push.apply(d,c.extensions))}),d},mimes2extList:function©{var d=[],e=;return“string”===a.typeOf©&&(c=a.trim©.split(/s*,s*/)),e=this.mimes2exts©,d.push({title:b.translate(“Files”),extensions:e.length?e.join(“,”):“*”}),d.mimes=c,d},getFileExtension:function(a){var b=a&&a.match(/.(+)$/);return b?b.toLowerCase():“”},getFileMime:function(a){return this.mimes||“”}};return d.addMimeType©,d}),d(“moxie/core/utils/Env”,,function(a){function b(a,b,c){var d=0,e=0,f=0,g={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,“#”:-2,p:1,pl:1},h=function(a){return a=(“”+a).replace(//g,“.”),a=a.replace(/(+)/g,“.$1.”).replace(/.{2,}/g,“.”),a.length?a.split(“.”):},i=function(a){return a?isNaN(a)?g||-7:parseInt(a,10):0};for(a=h(a),b=h(b),e=Math.max(a.length,b.length),d=0;e>d;d++)if(a!=b){if(a=i(a),b=i(b),a<b){f=-1;break}if(a>b){f=1;break}}if(!c)return f;switch©{case“>”:case“gt”:return f>0;case“>=”:case“ge”:return f>=0;case“<=”:case“le”:return 0>=f;case“==”:case“=”:case“eq”:return 0===f;case“<>”:case“!=”:case“ne”:return 0!==f;case“”:case“<”:case“lt”:return 0>f;default:return null}}var c=function(a){var b=“”,c=“?”,d=“function”,e=“undefined”,f=“object”,g=“major”,h=“name”,i=“version”,j={has:function(a,b){return-1!==b.toLowerCase().indexOf(a.toLowerCase())},lowerize:function(a){return a.toLowerCase()}},k={rgx:function(){for(var b,c,g,h,i,j,k,l=0,m=arguments;l<m.length;l+=2){var n=m,o=m;if(typeof b===e){b={};for(h in o)i=o,typeof i===f?b[i]=a:b=a}for(c=g=0;cb
“(\s+|$)”);return c.test(a.className)},d=function(a,b){c(a,b)||(a.className=a.className?a.className.replace(/s+$/,“”)+“ ”+b:b)},e=function(a,b){if(a.className){var c=new RegExp(“(^|\s+)”b
“(\s+|$)”);a.className=a.className.replace(c,function(a,b,c){return“ ”===b&&“ ”===c?“ ”:“”})}},f=function(a,b){return a.currentStyle?a.currentStyle:window.getComputedStyle?window.getComputedStyle(a,null):void 0},g=function(b,c){function d(a){var b,c,d=0,e=0;return a&&(c=a.getBoundingClientRect(),b=“CSS1Compat”===j.compatMode?j.documentElement:j.body,d=c.left+b.scrollLeft,e=c.top+b.scrollTop),{x:d,y:e}}var e,f,g,h=0,i=0,j=document;if(b=b,c=c||j.body,b&&b.getBoundingClientRect&&“IE”===a.browser&&(!j.documentMode||j.documentMode<8))return f=d(b),g=d©,{x:f.x-g.x,y:f.y-g.y};for(e=b;e&&e!=c&&e.nodeType;)h+=e.offsetLeft||0,i+=e.offsetTop||0,e=e.offsetParent;for(e=b.parentNode;e&&e!=c&&e.nodeType;)h-=e.scrollLeft||0,i-=e.scrollTop||0,e=e.parentNode;return{x:h,y:i}},h=function(a){return{w:a.offsetWidth||a.clientWidth,h:a.offsetHeight||a.clientHeight}};return{get:b,hasClass:c,addClass:d,removeClass:e,getStyle:f,getPos:g,getSize:h}}),d(“moxie/core/Exceptions”,,function(a){function b(a,b){var c;for(c in a)if(a===b)return c;return null}return{RuntimeError:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+“: RuntimeError ”+this.code}var d={NOT_INIT_ERR:1,NOT_SUPPORTED_ERR:9,JS_ERR:4};return a.extend(c,d),c.prototype=Error.prototype,c}(),OperationNotAllowedException:function(){function b(a){this.code=a,this.name=“OperationNotAllowedException”}return a.extend(b,{NOT_ALLOWED_ERR:1}),b.prototype=Error.prototype,b}(),ImageError:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+“: ImageError ”+this.code}var d={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2};return a.extend(c,d),c.prototype=Error.prototype,c}(),FileException:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+“: FileException ”+this.code}var d={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return a.extend(c,d),c.prototype=Error.prototype,c}(),DOMException:function(){function c(a){this.code=a,this.name=b(d,a),this.message=this.name+“: DOMException ”+this.code}var d={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};return a.extend(c,d),c.prototype=Error.prototype,c}(),EventException:function(){function b(a){this.code=a,this.name=“EventException”}return a.extend(b,{UNSPECIFIED_EVENT_TYPE_ERR:0}),b.prototype=Error.prototype,b}()}}),d(“moxie/core/EventTarget”,,function(a,b){function c(){var c={};b.extend(this,{uid:null,init:function(){this.uid||(this.uid=b.guid(“uid_”))},addEventListener:function(a,d,e,f){var g,h=this;return a=b.trim(a),/s/.test(a)?void b.each(a.split(/s+/),function(a){h.addEventListener(a,d,e,f)}):(a=a.toLowerCase(),e=parseInt(e,10)||0,g=c&&c[a]||[],g.push({fn:d,priority:e,scope:f||this}),c||(c={}),void(c[a]=g))},hasEventListener:function(a){return a?!(!c||!c[a]):!!c},removeEventListener:function(a,d){a=a.toLowerCase();var e,f=c&&c[a];if(f){if(d){for(e=f.length-1;e>=0;e–)if(f.fn===d){f.splice(e,1);break}}else f=[];f.length||(delete c[a],b.isEmptyObj(c)&&delete c)}},removeAllEventListeners:function(){c&&delete c},dispatchEvent:function(d){var e,f,g,h,i,j={},k=!0;if(“string”!==b.typeOf(d)){if(h=d,“string”!==b.typeOf(h.type))throw new a.EventException(a.EventException.UNSPECIFIED_EVENT_TYPE_ERR);d=h.type,h.total!==i&&h.loaded!==i&&(j.total=h.total,j.loaded=h.loaded),j.async=h.async||!1}if(-1!==d.indexOf(“::”)?!function(a){e=a,d=a}(d.split(“::”)):e=this.uid,d=d.toLowerCase(),f=c&&c[d]){f.sort(function(a,b){return b.priority-a.priority}),g=[].slice.call(arguments),g.shift(),j.type=d,g.unshift(j);var l=[];b.each(f,function(a){g.target=a.scope,l.push(j.async?function(b){setTimeout(function(){b(a.fn.apply(a.scope,g)===!1)},1)}:function(b){b(a.fn.apply(a.scope,g)===!1)})}),l.length&&b.inSeries(l,function(a){k=!a})}return k},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},convertEventPropsToHandlers:function(a){var c;“array”!==b.typeOf(a)&&(a=);for(var d=0;dd.type
“;base64,”+b.btoa(n)}this.readyState=h.DONE,this.trigger(“load”),l()}else m(f.connectRuntime(d.ruid));else k(new c.DOMException(c.DOMException.NOT_FOUND_ERR))}var f,j=this;a.extend(this,{uid:a.guid(“uid_”),readyState:h.EMPTY,result:null,error:null,readAsBinaryString:function(a){d.call(this,“readAsBinaryString”,a)},readAsDataURL:function(a){d.call(this,“readAsDataURL”,a)},readAsText:function(a){d.call(this,“readAsText”,a)},abort:function(){this.result=null,-1===a.inArray(this.readyState,)&&(this.readyState===h.LOADING&&(this.readyState=h.DONE),f&&f.getRuntime().exec.call(this,“FileReader”,“abort”),this.trigger(“abort”),this.trigger(“loadend”))},destroy:function(){this.abort(),f&&(f.getRuntime().exec.call(this,“FileReader”,“destroy”),f.disconnectRuntime()),j=f=null}})}var i=;return h.EMPTY=0,h.LOADING=1,h.DONE=2,h.prototype=d.instance,h}),d(“moxie/core/utils/Url”,[],function(){var a=function(b,c){for(var d=,e=d.length,f={80,https:443},g={},h=/^(?:([^:/?#]+):)?(?://()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:/?#]*)(?::(d*))?))?()(?:(()(?:(?:[^?#/]/))()(?:[^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,i=h.exec(b||“”);e–;)i[e]&&(g[d[e]]=i[e]);if(!g.scheme){c&&“string”!=typeof c||(c=a(c||document.location.href)),g.scheme=c.scheme,g.host=c.host,g.port=c.port;var j=“”;/^/.test(g.path)&&(j=c.path,/(/|/+)$/.test(j)?j+=“/”:j=j.replace(//+$/,“/”)),g.path=j+(g.path||“”)}return g.port||(g.port=f||80),g.port=parseInt(g.port,10),g.path||(g.path=“/”),delete g.source,g},b=function(b){var c={80,https:443},d=a(b);return d.scheme+“://”d.host
(d.port!==c?“:”+d.port:“”)d.path
(d.query?d.query:“”)},c=function(b){function c(a){return.join(“/”)}return“string”==typeof b&&(b=a(b)),c(a())===c(b)};return{parseUrl:a,resolveUrl:b,hasSameOrigin:c}}),d(“moxie/file/FileReaderSync”,,function(a,b,c){return function(){function d(a,b){if(!b.isDetached()){var d=this.connectRuntime(b.ruid).exec.call(this,“FileReaderSync”,“read”,a,b);return this.disconnectRuntime(),d}var e=b.getSource();switch(a){case“readAsBinaryString”:return e;case“readAsDataURL”:return“data:”b.type
“;base64,”+c.btoa(e);case“readAsText”:for(var f=“”,g=0,h=e.length;h>g;g++)f+=String.fromCharCode(e); return f}}b.call(this),a.extend(this,{uid:a.guid(“uid_”),readAsBinaryString:function(a){return d.call(this,“readAsBinaryString”,a)},readAsDataURL:function(a){return d.call(this,“readAsDataURL”,a)},readAsText:function(a){return d.call(this,“readAsText”,a)}})}}),d(“moxie/xhr/FormData”,,function(a,b,c){function d(){var a,d=[];b.extend(this,{append:function(e,f){var g=this,h=b.typeOf(f);f instanceof c?a={name:e,value:f}:“array”===h?(e+=“[]”,b.each(f,function(a){g.append(e,a)})):“object”===h?b.each(f,function(a,b){g.append(e+“[”b
“]”,a)}):“null”===h||“undefined”===h||“number”===h&&isNaN(f)?g.append(e,“false”):d.push({name:e,value:f.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return a&&a.value||null},getBlobName:function(){return a&&a.name||null},each:function©{b.each(d,function(a){c(a.value,a.name)}),a&&c(a.value,a.name)},destroy:function(){a=null,d=[]}})}return d}),d(“moxie/xhr/XMLHttpRequest”,,function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){this.uid=a.guid(“uid_”)}function n(){function c(a,b){return A.hasOwnProperty(a)?1===arguments.length?k.can(“define_property”)?A:z:void(k.can(“define_property”)?A=b:z=b):void 0}function i(b){function d(){x&&(x.destroy(),x=null),h.dispatchEvent(“loadend”),h=null}function e(e){x.bind(“LoadStart”,function(a){c(“readyState”,n.LOADING),h.dispatchEvent(“readystatechange”),h.dispatchEvent(a),H&&h.upload.dispatchEvent(a)}),x.bind(“Progress”,function(a){c(“readyState”)!==n.LOADING&&(c(“readyState”,n.LOADING),h.dispatchEvent(“readystatechange”)),h.dispatchEvent(a)}),x.bind(“UploadProgress”,function(a){H&&h.upload.dispatchEvent({type:“progress”,lengthComputable:!1,total:a.total,loaded:a.loaded})}),x.bind(“Load”,function(b){c(“readyState”,n.DONE),c(“status”,Number(e.exec.call(x,“XMLHttpRequest”,“getStatus”)||0)),c(“statusText”,o||“”),c(“response”,e.exec.call(x,“XMLHttpRequest”,“getResponse”,c(“responseType”))),~a.inArray(c(“responseType”),)?c(“responseText”,c(“response”)):“document”===c(“responseType”)&&c(“responseXML”,c(“response”)),O=e.exec.call(x,“XMLHttpRequest”,“getAllResponseHeaders”),h.dispatchEvent(“readystatechange”),c(“status”)>0?(H&&h.upload.dispatchEvent(b),h.dispatchEvent(b)):(J=!0,h.dispatchEvent(“error”)),d()}),x.bind(“Abort”,function(a){h.dispatchEvent(a),d()}),x.bind(“Error”,function(a){J=!0,c(“readyState”,n.DONE),h.dispatchEvent(“readystatechange”),I=!0,h.dispatchEvent(a),d()}),e.exec.call(x,“XMLHttpRequest”,“send”,{url:r,method:s,async:B,user:t,password:u,headers:C,mimeType:E,encoding:D,responseType:h.responseType,withCredentials:h.withCredentials,options:N},b)}var h=this;v=(new Date).getTime(),x=new g,“string”==typeof N.required_caps&&(N.required_caps=f.parseCaps(N.required_caps)),N.required_caps=a.extend({},N.required_caps,{return_response_type:h.responseType}),b instanceof j&&(N.required_caps.send_multipart=!0),K||(N.required_caps.do_cors=!0),N.ruid?e(x.connectRuntime(N)):(x.bind(“RuntimeInit”,function(a,b){e(b)}),x.bind(“RuntimeError”,function(a,b){h.dispatchEvent(“RuntimeError”,b)}),x.connectRuntime(N))}function q(){c(“responseText”,“”),c(“responseXML”,null),c(“response”,null),c(“status”,0),c(“statusText”,“”),v=w=null}var r,s,t,u,v,w,x,y,z=this,A={timeout:0,readyState:n.UNSENT,withCredentials:!1,status:0,statusText:“”,responseType:“”,responseXML:null,responseText:null,response:null},B=!0,C={},D=null,E=null,F=!1,G=!1,H=!1,I=!1,J=!1,K=!1,L=null,M=null,N={},O=“”;a.extend(this,A,{uid:a.guid(“uid_”),upload:new m,open:function(f,g,h,i,j){var k;if(!f||!g)throw new b.DOMException(b.DOMException.SYNTAX_ERR);if(//.test(f)||d.utf8_encode(f)!==f)throw new b.DOMException(b.DOMException.SYNTAX_ERR);if(~a.inArray(f.toUpperCase(),)&&(s=f.toUpperCase()),~a.inArray(s,))throw new b.DOMException(b.DOMException.SECURITY_ERR);if(g=d.utf8_encode(g),k=e.parseUrl(g),K=e.hasSameOrigin(k),r=e.resolveUrl(g),(i||j)&&!K)throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR);if(t=i||k.user,u=j||k.pass,B=h||!0,B===!1&&(c(“timeout”)||c(“withCredentials”)||“”!==c(“responseType”)))throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR);F=!B,G=!1,C={},q.call(this),c(“readyState”,n.OPENED),this.convertEventPropsToHandlers(),this.dispatchEvent(“readystatechange”)},setRequestHeader:function(e,f){var g=;if(c(“readyState”)!==n.OPENED||G)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(//.test(e)||d.utf8_encode(e)!==e)throw new b.DOMException(b.DOMException.SYNTAX_ERR);return e=a.trim(e).toLowerCase(),~a.inArray(e,g)||/^(proxy-|sec-)/.test(e)?!1:(C?C+=“, ”+f:C=f,!0)},getAllResponseHeaders:function(){return O||“”},getResponseHeader:function(b){return b=b.toLowerCase(),J||~a.inArray(b,)?null:O&&“”!==O&&(y||(y={},a.each(O.split(/rn/),function(b){var c=b.split(/:s+/);2===c.length&&(c=a.trim(c),y[c.toLowerCase()]={header:c,value:a.trim(c)})})),y.hasOwnProperty(b))?y.header+“: ”+y.value:null},overrideMimeType:function(d){var e,f;if(~a.inArray(c(“readyState”),))throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(d=a.trim(d.toLowerCase()),/;/.test(d)&&(e=d.match(/^(+)(?:;scharset=)?(.*)$/))&&(d=e,e&&(f=e)),!l.mimes)throw new b.DOMException(b.DOMException.SYNTAX_ERR);L=d,M=f},send:function(c,e){if(N=“string”===a.typeOf(e)?{ruid:e}:e?e:{},this.convertEventPropsToHandlers(p),this.upload.convertEventPropsToHandlers(p),this.readyState!==n.OPENED||G)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);if(c instanceof h)N.ruid=c.ruid,E=c.type||“application/octet-stream”;else if(c instanceof j){if(c.hasBlob()){var f=c.getBlob();N.ruid=f.ruid,E=f.type||“application/octet-stream”}}else“string”==typeof c&&(D=“UTF-8”,E=“text/plain;charset=UTF-8”,c=d.utf8_encode©);this.withCredentials||(this.withCredentials=N.required_caps&&N.required_caps.send_browser_cookies&&!K),H=!F&&this.upload.hasEventListener(),J=!1,I=!c,F||(G=!0),i.call(this,c)},abort:function(){if(J=!0,F=!1,~a.inArray(c(“readyState”),))c(“readyState”,n.UNSENT);else{if(c(“readyState”,n.DONE),G=!1,!x)throw new b.DOMException(b.DOMException.INVALID_STATE_ERR);x.getRuntime().exec.call(x,“XMLHttpRequest”,“abort”,I),I=!0}},destroy:function(){x&&(“function”===a.typeOf(x.destroy)&&x.destroy(),x=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}})}var o={100:“Continue”,101:“Switching Protocols”,102:“Processing”,200:“OK”,201:“Created”,202:“Accepted”,203:“Non-Authoritative Information”,204:“No Content”,205:“Reset Content”,206:“Partial Content”,207:“Multi-Status”,226:“IM Used”,300:“Multiple Choices”,301:“Moved Permanently”,302:“Found”,303:“See Other”,304:“Not Modified”,305:“Use Proxy”,306:“Reserved”,307:“Temporary Redirect”,400:“Bad Request”,401:“Unauthorized”,402:“Payment Required”,403:“Forbidden”,404:“Not Found”,405:“Method Not Allowed”,406:“Not Acceptable”,407:“Proxy Authentication Required”,408:“Request Timeout”,409:“Conflict”,410:“Gone”,411:“Length Required”,412:“Precondition Failed”,413:“Request Entity Too Large”,414:“Request-URI Too Long”,415:“Unsupported Media Type”,416:“Requested Range Not Satisfiable”,417:“Expectation Failed”,422:“Unprocessable Entity”,423:“Locked”,424:“Failed Dependency”,426:“Upgrade Required”,500:“Internal Server Error”,501:“Not Implemented”,502:“Bad Gateway”,503:“Service Unavailable”,504:“Gateway Timeout”,505:“HTTP Version Not Supported”,506:“Variant Also Negotiates”,507:“Insufficient Storage”,510:“Not Extended”};m.prototype=c.instance;var p=;return n.UNSENT=0,n.OPENED=1,n.HEADERS_RECEIVED=2,n.LOADING=3,n.DONE=4,n.prototype=c.instance,n}),d(“moxie/runtime/Transporter”,,function(a,b,c,d){function e(){function d(){k=l=0,j=this.result=null}function f(b,c){var d=this;i=c,d.bind(“TransportingProgress”,function(b){l=b.loaded,k>l&&-1===a.inArray(d.state,)&&g.call(d)},999),d.bind(“TransportingComplete”,function(){l=k,d.state=e.DONE,j=null,d.result=i.exec.call(d,“Transporter”,“getAsBlob”,b||“”)},999),d.state=e.BUSY,d.trigger(“TransportingStarted”),g.call(d)}function g(){var a,c=this,d=k-l;m>d&&(m=d),a=b.btoa(j.substr(l,m)),i.exec.call(c,“Transporter”,“receive”,a,k)}var h,i,j,k,l,m;c.call(this),a.extend(this,{uid:a.guid(“uid_”),state:e.IDLE,result:null,transport:function(b,c,e){var g=this;if(e=a.extend({chunk_size:204798},e),(h=e.chunk_size%3)&&(e.chunk_size+=3-h),m=e.chunk_size,d.call(this),j=b,k=b.length,“string”===a.typeOf(e)||e.ruid)f.call(g,c,this.connectRuntime(e));else{var i=function(a,b){g.unbind(“RuntimeInit”,i),f.call(g,c,b)};this.bind(“RuntimeInit”,i),this.connectRuntime(e)}},abort:function(){var a=this;a.state=e.IDLE,i&&(i.exec.call(a,“Transporter”,“clear”),a.trigger(“TransportingAborted”)),d.call(a)},destroy:function(){this.unbindAll(),i=null,this.disconnectRuntime(),d.call(this)}})}return e.IDLE=0,e.BUSY=1,e.DONE=2,e.prototype=d.instance,e}),d(“moxie/image/Image”,,function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){function d(a){a||(a=this.getRuntime().exec.call(this,“Image”,“getInfo”)),this.size=a.size,this.width=a.width,this.height=a.height,this.type=a.type,this.meta=a.meta,“”===this.name&&(this.name=a.name)}function j(b){var d=a.typeOf(b);try{if(b instanceof n){if(!b.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);p.apply(this,arguments)}else if(b instanceof k){if(!~a.inArray(b.type,))throw new c.ImageError(c.ImageError.WRONG_FORMAT);q.apply(this,arguments)}else if(-1!==a.inArray(d,))j.call(this,new l(null,b),arguments);else if(“string”===d)/^data:*;base64,/.test(b)?j.call(this,new k(null,{data:b}),arguments):r.apply(this,arguments);else{if(“node”!==d||“img”!==b.nodeName.toLowerCase())throw new c.DOMException(c.DOMException.TYPE_MISMATCH_ERR);j.call(this,b.src,arguments)}}catch(e){this.trigger(“error”,e.code)}}function p(b,c){var d=this.connectRuntime(b.ruid);this.ruid=d.uid,d.exec.call(this,“Image”,“loadFromImage”,b,“undefined”===a.typeOf©?!0:c)}function q(b,c){function d(a){e.ruid=a.uid,a.exec.call(e,“Image”,“loadFromBlob”,b)}var e=this;e.name=b.name||“”,b.isDetached()?(this.bind(“RuntimeInit”,function(a,b){d(b)}),c&&“string”==typeof c.required_caps&&(c.required_caps=f.parseCaps(c.required_caps)),this.connectRuntime(a.extend({required_caps:{access_image_binary:!0,resize_image:!0}},c))):d(this.connectRuntime(b.ruid))}function r(a,b){var c,d=this;c=new e,c.open(“get”,a),c.responseType=“blob”,c.onprogress=function(a){d.trigger(a)},c.onload=function(){q.call(d,c.response,!0)},c.onerror=function(a){d.trigger(a)},c.onloadend=function(){c.destroy()},c.bind(“RuntimeError”,function(a,b){d.trigger(“RuntimeError”,b)}),c.send(null,b)}g.call(this),a.extend(this,{uid:a.guid(“uid_”),ruid:null,name:“”,size:0,width:0,height:0,type:“”,meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){this.bind(“Load Resize”,function(){d.call(this)},999),this.convertEventPropsToHandlers(o),j.apply(this,arguments)},downsize:function(b){var d={width:this.width,height:this.height,crop:!1,preserveHeaders:!0};b=“object”==typeof b?a.extend(d,b):a.extend(d,{width:arguments,height:arguments,crop:arguments,preserveHeaders:arguments});try{if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);if(this.width>n.MAX_RESIZE_WIDTH||this.height>n.MAX_RESIZE_HEIGHT)throw new c.ImageError(c.ImageError.MAX_RESOLUTION_ERR);this.getRuntime().exec.call(this,“Image”,“downsize”,b.width,b.height,b.crop,b.preserveHeaders)}catch(e){this.trigger(“error”,e.code)}},crop:function(a,b,c){this.downsize(a,b,!0,c)},getAsCanvas:function(){if(!i.can(“create_canvas”))throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR);var a=this.connectRuntime(this.ruid);return a.exec.call(this,“Image”,“getAsCanvas”)},getAsBlob:function(a,b){if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);return a||(a=“image/jpeg”),“image/jpeg”!==a||b||(b=90),this.getRuntime().exec.call(this,“Image”,“getAsBlob”,a,b)},getAsDataURL:function(a,b){if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);return this.getRuntime().exec.call(this,“Image”,“getAsDataURL”,a,b)},getAsBinaryString:function(a,b){var c=this.getAsDataURL(a,b);return m.atob(c.substring(c.indexOf(“base64,”)+7))},embed:function(d){function e(){if(i.can(“create_canvas”)){var b=f.getAsCanvas();if(b)return d.appendChild(b),b=null,f.destroy(),void o.trigger(“embedded”)}var e=f.getAsDataURL(g,j);if(!e)throw new c.ImageError(c.ImageError.WRONG_FORMAT);if(i.can(“use_data_uri_of”,e.length))d.innerHTML='<img src=“'e
'” width=“'f.width
'” height=“'f.height
'” />',f.destroy(),o.trigger(“embedded”);else{var k=new h;k.bind(“TransportingComplete”,function(){l=o.connectRuntime(this.result.ruid),o.bind(“Embedded”,function(){a.extend(l.getShimContainer().style,{top:“0px”,left:“0px”,width:f.width+“px”,height:f.height+“px”}),l=null},999),l.exec.call(o,“ImageView”,“display”,this.result.uid,q,r),f.destroy()}),k.transport(m.atob(e.substring(e.indexOf(“base64,”)+7)),g,a.extend({},p,{required_caps:{display_media:!0},runtime_order:“flash,silverlight”,container:d}))}}var f,g,j,k,l,o=this,p=arguments||{},q=this.width,r=this.height;try{if(!(d=b.get(d)))throw new c.DOMException(c.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new c.DOMException(c.DOMException.INVALID_STATE_ERR);if(this.width>n.MAX_RESIZE_WIDTH||this.height>n.MAX_RESIZE_HEIGHT)throw new c.ImageError(c.ImageError.MAX_RESOLUTION_ERR);if(g=p.type||this.type||“image/jpeg”,j=p.quality||90,k=“undefined”!==a.typeOf(p.crop)?p.crop:!1,p.width)q=p.width,r=p.height||q;else{var s=b.getSize(d);s.w&&s.h&&(q=s.w,r=s.h)}return f=new n,f.bind(“Resize”,function(){e.call(o)}),f.bind(“Load”,function(){f.downsize(q,r,k,!1)}),f.clone(this,!1),f}catch(t){this.trigger(“error”,t.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,“Image”,“destroy”),this.disconnectRuntime()),this.unbindAll()}})}var o=;return n.MAX_RESIZE_WIDTH=6500,n.MAX_RESIZE_HEIGHT=6500,n.prototype=j.instance,n}),d(“moxie/runtime/html4/Runtime”,,function(a,b,c,d){function e(b){var e=this,h=c.capTest,i=c.capTrue;c.call(this,b,f,{access_binary:h(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:h(g.Image&&(d.can(“create_canvas”)||d.can(“use_data_uri_over32kb”))),do_cors:!1,drag_and_drop:!1,filter_by_extension:h(function(){return“Chrome”===d.browser&&d.version>=28||“IE”===d.browser&&d.version>=10}()),resize_image:function(){return g.Image&&e.can(“access_binary”)&&d.can(“create_canvas”)},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(b){return“json”===b&&window.JSON?!0:!!~a.inArray(b,)},return_status_code:function(b){return!a.arrayDiff(b,)},select_file:function(){return d.can(“use_fileinput”)},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return e.can(“select_file”)},summon_file_dialog:h(function(){return“Firefox”===d.browser&&d.version>=4||“Opera”===d.browser&&d.version>=12||!!~a.inArray(d.browser,)}()),upload_filesize:i,use_http_method:function(b){return!a.arrayDiff(b,)}}),a.extend(this,{init:function(){this.trigger(“Init”)},destroy:function(a){return function(){a.call(e),a=e=null}}(this.destroy)}),a.extend(this.getShim(),g)}var f=“html4”,g={};return c.addConstructor(f,e),g}),d(“moxie/core/utils/Events”,,function(a){function b(){this.returnValue=!1}function c(){this.cancelBubble=!0}var d={},e=“moxie_”+a.guid(),f=function(f,g,h,i){var j,k;g=g.toLowerCase(),f.addEventListener?(j=h,f.addEventListener(g,j,!1)):f.attachEvent&&(j=function(){var a=window.event;a.target||(a.target=a.srcElement),a.preventDefault=b,a.stopPropagation=c,h(a)},f.attachEvent(“on”+g,j)),f||(f=a.guid()),d.hasOwnProperty(f)||(d[f]={}),k=d[f],k.hasOwnProperty(g)||(k=[]),k.push({func:j,orig:h,key:i})},g=function(b,c,f){var g,h;if(c=c.toLowerCase(),b&&d[b]&&d[b][c]){g=d[b][c];for(var i=g.length-1;i>=0&&(g.orig!==f&&g.key!==f||(b.removeEventListener?b.removeEventListener(c,g.func,!1):b.detachEvent&&b.detachEvent(“on”+c,g.func),g.orig=null,g.func=null,g.splice(i,1),f===h));i–);if(g.length||delete d[b][c],a.isEmptyObj(d[b])){delete d[b];try{delete b}catch(j){b=h}}}},h=function(b,c){b&&b&&a.each(d[b],function(a,d){g(b,d,c)})};return{addEvent:f,removeEvent:g,removeAllEvents:h}}),d(“moxie/runtime/html4/file/FileInput”,,function(a,b,c,d,e,f){function g(){function a(){var e,k,l,m,n,o,p=this,q=p.getRuntime();o=b.guid(“uid_”),e=q.getShimContainer(),g&&(l=c.get(g+“_form”),l&&b.extend(l.style,{top:“100%”})),m=document.createElement(“form”),m.setAttribute(“id”,o+“_form”),m.setAttribute(“method”,“post”),m.setAttribute(“enctype”,“multipart/form-data”),m.setAttribute(“encoding”,“multipart/form-data”),b.extend(m.style,{overflow:“hidden”,position:“absolute”,top:0,left:0,width:“100%”,height:“100%”}),n=document.createElement(“input”),n.setAttribute(“id”,o),n.setAttribute(“type”,“file”),n.setAttribute(“name”,h.name||“Filedata”),n.setAttribute(“accept”,j.join(“,”)),b.extend(n.style,{fontSize:“999px”,opacity:0}),m.appendChild(n),e.appendChild(m),b.extend(n.style,{position:“absolute”,top:0,left:0,width:“100%”,height:“100%”}),“IE”===f.browser&&f.version<10&&b.extend(n.style,{filter:“progid:DXImageTransform.Microsoft.Alpha(opacity=0)”}),n.onchange=function(){var b;this.value&&(b=this.files?this.files:{name:this.value},i=,this.onchange=function(){},a.call(p),p.bind(“change”,function d(){var a,b=c.get(o),e=c.get(o+“_form”);p.unbind(“change”,d),p.files.length&&b&&e&&(a=p.files,b.setAttribute(“id”,a.uid),e.setAttribute(“id”,a.uid+“_form”),e.setAttribute(“target”,a.uid+“_iframe”)),b=e=null},998),n=m=null,p.trigger(“change”))},q.can(“summon_file_dialog”)&&(k=c.get(h.browse_button),d.removeEvent(k,“click”,p.uid),d.addEvent(k,“click”,function(a){n&&!n.disabled&&n.click(),a.preventDefault()},p.uid)),g=o,e=l=k=null}var g,h,i=[],j=;b.extend(this,{init:function(b){var f,g=this,i=g.getRuntime();h=b,j=b.accept.mimes||e.extList2mimes(b.accept,i.can(“filter_by_extension”)),f=i.getShimContainer(),function(){var a,e,h;a=c.get(b.browse_button),i.can(“summon_file_dialog”)&&(“static”===c.getStyle(a,“position”)&&(a.style.position=“relative”),e=parseInt(c.getStyle(a,“z-index”),10)||1,a.style.zIndex=e,f.style.zIndex=e-1),h=i.can(“summon_file_dialog”)?a:f,d.addEvent(h,“mouseover”,function(){g.trigger(“mouseenter”)},g.uid),d.addEvent(h,“mouseout”,function(){g.trigger(“mouseleave”)},g.uid),d.addEvent(h,“mousedown”,function(){g.trigger(“mousedown”)},g.uid),d.addEvent(c.get(b.container),“mouseup”,function(){g.trigger(“mouseup”)},g.uid),a=null}(),a.call(this),f=null,g.trigger({type:“ready”,async:!0})},getFiles:function(){return i},disable:function(a){var b;(b=c.get(g))&&(b.disabled=!!a)},destroy:function(){var a=this.getRuntime(),b=a.getShim(),e=a.getShimContainer();d.removeAllEvents(e,this.uid),d.removeAllEvents(h&&c.get(h.container),this.uid),d.removeAllEvents(h&&c.get(h.browse_button),this.uid),e&&(e.innerHTML=“”),b.removeInstance(this.uid),g=i=j=h=e=b=null}})}return a.FileInput=g}),d(“moxie/runtime/html5/Runtime”,,function(a,b,c,d){function e(b){var e=this,h=c.capTest,i=c.capTrue,j=a.extend({access_binary:h(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return e.can(“access_binary”)&&!!g.Image},display_media:h(d.can(“create_canvas”)||d.can(“use_data_uri_over32kb”)),do_cors:h(window.XMLHttpRequest&&“withCredentials”in new XMLHttpRequest),drag_and_drop:h(function(){var a=document.createElement(“div”);return(“draggable”in a||“ondragstart”in a&&“ondrop”in a)&&(“IE”!==d.browser||d.version>9)}()),filter_by_extension:h(function(){return“Chrome”===d.browser&&d.version>=28||“IE”===d.browser&&d.version>=10}()),return_response_headers:i,return_response_type:function(a){return“json”===a&&window.JSON?!0:d.can(“return_response_type”,a)},return_status_code:i,report_upload_progress:h(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return e.can(“access_binary”)&&d.can(“create_canvas”)},select_file:function(){return d.can(“use_fileinput”)&&window.File},select_folder:function(){return e.can(“select_file”)&&“Chrome”===d.browser&&d.version>=21},select_multiple:function(){return!(!e.can(“select_file”)||“Safari”===d.browser&&“Windows”===d.os||“iOS”===d.os&&d.verComp(d.osVersion,“7.0.4”,“<”))},send_binary_string:h(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:h(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||e.can(“send_binary_string”)},slice_blob:h(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return e.can(“slice_blob”)&&e.can(“send_multipart”)},summon_file_dialog:h(function(){return“Firefox”===d.browser&&d.version>=4||“Opera”===d.browser&&d.version>=12||“IE”===d.browser&&d.version>=10||!!~a.inArray(d.browser,)}()),upload_filesize:i},arguments);c.call(this,b,arguments||f,j),a.extend(this,{init:function(){this.trigger(“Init”)},destroy:function(a){return function(){a.call(e),a=e=null}}(this.destroy)}),a.extend(this.getShim(),g)}var f=“html5”,g={};return c.addConstructor(f,e),g}),d(“moxie/runtime/html5/file/FileReader”,,function(a,b,c){function d(){function a(a){return b.atob(a.substring(a.indexOf(“base64,”)+7))}var d,e=!1;c.extend(this,{read:function(a,b){var f=this;d=new window.FileReader,d.addEventListener(“progress”,function(a){f.trigger(a)}),d.addEventListener(“load”,function(a){f.trigger(a)}),d.addEventListener(“error”,function(a){f.trigger(a,d.error)}),d.addEventListener(“loadend”,function(){d=null}),“function”===c.typeOf(d)?(e=!1,d(b.getSource())):“readAsBinaryString”===a&&(e=!0,d.readAsDataURL(b.getSource()))},getResult:function(){return d&&d.result?e?a(d.result):d.result:null},abort:function(){d&&d.abort()},destroy:function(){d=null}})}return a.FileReader=d}),d(“moxie/runtime/html4/file/FileReader”,,function(a,b){return a.FileReader=b}),d(“moxie/runtime/html4/xhr/XMLHttpRequest”,,function(a,b,c,d,e,f,g,h){function i(){function a(a){var b,d,e,g,h=this,i=!1;if(k){if(b=k.id.replace(/_iframe$/,“”),d=c.get(b+“_form”)){for(e=d.getElementsByTagName(“input”),g=e.length;g–;)switch(e.getAttribute(“type”)){case“hidden”:e.parentNode.removeChild(e);break;case“file”:i=!0}e=[],i||d.parentNode.removeChild(d),d=null}setTimeout(function(){f.removeEvent(k,“load”,h.uid),k.parentNode&&k.parentNode.removeChild(k);var b=h.getRuntime().getShimContainer();b.children.length||b.parentNode.removeChild(b),b=k=null,a()},1)}}var i,j,k;b.extend(this,{send:function(l,m){function n(){var c=t.getShimContainer()||document.body,e=document.createElement(“div”);e.innerHTML='<iframe id=“'o
'_iframe” name=“'o
'_iframe” src=“javascript:""” style=“display:none”></iframe>',k=e.firstChild,c.appendChild(k),f.addEvent(k,“load”,function(){var c;try{c=k.contentWindow.document||k.contentDocument||window.frames.document,/^4(0|1|2)s/.test(c.title)?i=c.title.replace(/^(d+).*$/,“$1”):(i=200,j=b.trim(c.body.innerHTML),s.trigger({type:“progress”,loaded:j.length,total:j.length}),r&&s.trigger({type:“uploadprogress”,loaded:r.size||1025,total:r.size||1025}))}catch(e){if(!d.hasSameOrigin(l.url))return void a.call(s,function(){s.trigger(“error”)});i=404}a.call(s,function(){s.trigger(“load”)})},s.uid)}var o,p,q,r,s=this,t=s.getRuntime();if(i=j=null,m instanceof h&&m.hasBlob()){if(r=m.getBlob(),o=r.uid,q=c.get(o),p=c.get(o+“_form”),!p)throw new e.DOMException(e.DOMException.NOT_FOUND_ERR)}else o=b.guid(“uid_”),p=document.createElement(“form”),p.setAttribute(“id”,o+“_form”),p.setAttribute(“method”,l.method),p.setAttribute(“enctype”,“multipart/form-data”),p.setAttribute(“encoding”,“multipart/form-data”),p.setAttribute(“target”,o+“_iframe”),t.getShimContainer().appendChild(p);m instanceof h&&m.each(function(a,c){if(a instanceof g)q&&q.setAttribute(“name”,c);else{var d=document.createElement(“input”);b.extend(d,{type:“hidden”,name:c,value:a}),q?p.insertBefore(d,q):p.appendChild(d)}}),p.setAttribute(“action”,l.url),n(),p.submit(),s.trigger(“loadstart”)},getStatus:function(){return i},getResponse:function(a){if(“json”===a&&“string”===b.typeOf(j)&&window.JSON)try{return d(”moxie/runtime/html5/image/JPEGHeaders“,,function(a){return function b©{var d,e,f,g=[],h=0;if(d=new a,d.init©,65496===d.SHORT(0)){for(e=2;e<=c.length;)if(f=d.SHORT(e),f>=65488&&65495>=f)e+=2;else{if(65498===f||65497===f)break;h=d.SHORT(e+2)+2,f>=65505&&65519>=f&&g.push({hex:f,name:”APP“+(15&f),start:e,length:h,segment:d.SEGMENT(e,h)}),e+=h}return d.init(null),{headers:g,restore:function(a){var b,c;for(d.init(a),e=65504==d.SHORT(2)?4+d.SHORT(4):2,c=0,b=g.length;b>c;c++)d.SEGMENT(e,0,g.segment),e+=g.length;return a=d.SEGMENT(),d.init(null),a},strip:function(a){var c,e,f;for(e=new b(a),c=e.headers,e.purge(),d.init(a),f=c.length;f–;)d.SEGMENT(c.start,c.length,”“);return a=d.SEGMENT(),d.init(null),a},get:function(a){for(var b=[],c=0,d=g.length;d>c;c++)g.name===a.toUpperCase()&&b.push(g.segment);return b},set:function(a,b){var c,d,e,f=[];for(”string“==typeof b?f.push(b):f=b,c=d=0,e=g.length;e>c&&(g.name===a.toUpperCase()&&(g.segment=f,g.length=f.length,d++),!(d>=f.length));c++);},purge:function(){g=[],d.init(null),d=null}}}}}),d(”moxie/runtime/html5/image/ExifParser“,,function(a,c){return function(){function d(a,c){var d,e,f,h,i,l,m,n,o=g.SHORT(a),p=[],q={};for(d=0;o>d;d++)if(m=l=a+12*d+2,f=c,f!==b){switch(h=g.SHORT(m+=2),i=g.LONG(m+=2),m+=4,p=[],h){case 1:case 7:for(i>4&&(m=g.LONG(m)+k.tiffHeader),e=0;i>e;e++)p=g.BYTE(m+e);break;case 2:i>4&&(m=g.LONG(m)+k.tiffHeader),q=g.STRING(m,i-1);continue;case 3:for(i>2&&(m=g.LONG(m)+k.tiffHeader),e=0;i>e;e++)p=g.SHORT(m+2*e);break;case 4:for(i>1&&(m=g.LONG(m)+k.tiffHeader),e=0;i>e;e++)p=g.LONG(m+4*e);break;case 5:for(m=g.LONG(m)+k.tiffHeader,e=0;i>e;e++)p=g.LONG(m+4*e)/g.LONG(m+4*e+4);break;case 9:for(m=g.LONG(m)+k.tiffHeader,e=0;i>e;e++)p=g.SLONG(m+4*e);break;case 10:for(m=g.LONG(m)+k.tiffHeader,e=0;i>e;e++)p=g.SLONG(m+4*e)/g.SLONG(m+4*e+4);break;default:continue}n=1==i?p:p,q=j.hasOwnProperty(f)&&”object“!=typeof n?j[n]:n}return q}function e(){var a=k.tiffHeader;return g.II(18761==g.SHORT(a)),42!==g.SHORT(a+=2)?!1:(k.IFD0=k.tiffHeader+g.LONG(a+=2),i=d(k.IFD0,h.tiff),”ExifIFDPointer“in i&&(k.exifIFD=k.tiffHeader+i.ExifIFDPointer,delete i.ExifIFDPointer),”GPSInfoIFDPointer“in i&&(k.gpsIFD=k.tiffHeader+i.GPSInfoIFDPointer,delete i.GPSInfoIFDPointer),!0)}function f(a,b,c){var d,e,f,i=0;if(”string“==typeof b){var j=h;for(var l in j)if(j===b){b=l;break}}d=k,e=g.SHORT(d);for(var m=0;e>m;m++)if(f=d+12*m+2,g.SHORT(f)==b){i=f+8;break}return i?(g.LONG(i,c),!0):!1}var g,h,i,j,k={};return g=new c,h={tiff:{274:”Orientation“,270:”ImageDescription“,271:”Make“,272:”Model“,305:”Software“,34665:”ExifIFDPointer“,34853:”GPSInfoIFDPointer“},exif:{36864:”ExifVersion“,40961:”ColorSpace“,40962:”PixelXDimension“,40963:”PixelYDimension“,36867:”DateTimeOriginal“,33434:”ExposureTime“,33437:”FNumber“,34855:”ISOSpeedRatings“,37377:”ShutterSpeedValue“,37378:”ApertureValue“,37383:”MeteringMode“,37384:”LightSource“,37385:”Flash“,37386:”FocalLength“,41986:”ExposureMode“,41987:”WhiteBalance“,41990:”SceneCaptureType“,41988:”DigitalZoomRatio“,41992:”Contrast“,41993:”Saturation“,41994:”Sharpness“},gps:{0:”GPSVersionID“,1:”GPSLatitudeRef“,2:”GPSLatitude“,3:”GPSLongitudeRef“,4:”GPSLongitude“}},j={ColorSpace:{1:”sRGB“,0:”Uncalibrated“},MeteringMode:{0:”Unknown“,1:”Average“,2:”CenterWeightedAverage“,3:”Spot“,4:”MultiSpot“,5:”Pattern“,6:”Partial“,255:”Other“},LightSource:{1:”Daylight“,2:”Fliorescent“,3:”Tungsten“,4:”Flash“,9:”Fine weather“,10:”Cloudy weather“,11:”Shade“,12:”Daylight fluorescent (D 5700 - 7100K)“,13:”Day white fluorescent (N 4600 -5400K)“,14:”Cool white fluorescent (W 3900 - 4500K)“,15:”White fluorescent (WW 3200 - 3700K)“,17:”Standard light A“,18:”Standard light B“,19:”Standard light C“,20:”D55“,21:”D65“,22:”D75“,23:”D50“,24:”ISO studio tungsten“,255:”Other“},Flash:{0:”Flash did not fire.“,1:”Flash fired.“,5:”Strobe return light not detected.“,7:”Strobe return light detected.“,9:”Flash fired, compulsory flash mode“,13:”Flash fired, compulsory flash mode, return light not detected“,15:”Flash fired, compulsory flash mode, return light detected“,16:”Flash did not fire, compulsory flash mode“,24:”Flash did not fire, auto mode“,25:”Flash fired, auto mode“,29:”Flash fired, auto mode, return light not detected“,31:”Flash fired, auto mode, return light detected“,32:”No flash function“,65:”Flash fired, red-eye reduction mode“,69:”Flash fired, red-eye reduction mode, return light not detected“,71:”Flash fired, red-eye reduction mode, return light detected“,73:”Flash fired, compulsory flash mode, red-eye reduction mode“,77:”Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected“,79:”Flash fired, compulsory flash mode, red-eye reduction mode, return light detected“,89:”Flash fired, auto mode, red-eye reduction mode“,93:”Flash fired, auto mode, return light not detected, red-eye reduction mode“,95:”Flash fired, auto mode, return light detected, red-eye reduction mode“},ExposureMode:{0:”Auto exposure“,1:”Manual exposure“,2:”Auto bracket“},WhiteBalance:{0:”Auto white balance“,1:”Manual white balance“},SceneCaptureType:{0:”Standard“,1:”Landscape“,2:”Portrait“,3:”Night scene“},Contrast:{0:”Normal“,1:”Soft“,2:”Hard“},Saturation:{0:”Normal“,1:”Low saturation“,2:”High saturation“},Sharpness:{0:”Normal“,1:”Soft“,2:”Hard“},GPSLatitudeRef:{N:”North latitude“,S:”South latitude“},GPSLongitudeRef:{E:”East longitude“,W:”West longitude“}},{init:function(a){return k={tiffHeader:10},a!==b&&a.length?(g.init(a),65505===g.SHORT(0)&&”EXIFx00“===g.STRING(4,5).toUpperCase()?e():!1):!1 },TIFF:function(){return i},EXIF:function(){var b;if(b=d(k.exifIFD,h.exif),b.ExifVersion&&”array“===a.typeOf(b.ExifVersion)){for(var c=0,e=”“;c