var MXI_DEBUG=true;(function(b,g){var d={};function c(m,n){var l,j=[];for(var k=0;k0){q(y,function(B,A){if(B!==w){if(s(x[A])===s(B)&&!!~v(s(B),["array","object"])){n(x[A],B)}else{x[A]=B}}})}});return x};var q=function(A,B){var z,x,w,y;if(A){if(s(A.length)==="number"){for(w=0,z=A.length;w0){if(J.length==2){if(typeof(J[1])==C){T[J[0]]=J[1].call(this,P)}else{T[J[0]]=J[1]}}else{if(J.length==3){if(typeof(J[1])===C&&!(J[1].exec&&J[1].test)){T[J[0]]=P?J[1].call(this,P,J[2]):s}else{T[J[0]]=P?P.replace(J[1],J[2]):s}}else{if(J.length==4){T[J[0]]=P?J[3].call(this,P.replace(J[1],J[2])):s}}}}else{T[J]=P?P:s}}break}}if(!!O){break}}return T},str:function(M,L){for(var K in L){if(typeof(L[K])===q&&L[K].length>0){for(var J=0;Ju[t]){o=1;break}}}if(!p){return o}switch(p){case">":case"gt":return(o>0);case">=":case"ge":return(o>=0);case"<=":case"le":return(o<=0);case"==":case"=":case"eq":return(o===0);case"<>":case"!=":case"ne":return(o!==0);case"":case"<":case"lt":return(o<0);default:return null}}var l=(function(){var o={define_property:(function(){return false}()),create_canvas:(function(){var p=document.createElement("canvas");return !!(p.getContext&&p.getContext("2d"))}()),return_response_type:function(p){try{if(m.inArray(p,["","text","document"])!==-1){return true}else{if(window.XMLHttpRequest){var r=new XMLHttpRequest();r.open("get","/");if("responseType" in r){r.responseType=p;if(r.responseType!==p){return false}return true}}}}catch(q){}return false},use_data_uri:(function(){var p=new Image();p.onload=function(){o.use_data_uri=(p.width===1&&p.height===1)};setTimeout(function(){p.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1);return false}()),use_data_uri_over32kb:function(){return o.use_data_uri&&(i.browser!=="IE"||i.version>=9)},use_data_uri_of:function(p){return(o.use_data_uri&&p<33000||o.use_data_uri_over32kb())},use_fileinput:function(){if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)){return false}var p=document.createElement("input");p.setAttribute("type","file");return !p.disabled}};return function(q){var p=[].slice.call(arguments);p.shift();return m.typeOf(o[q])==="function"?o[q].apply(this,p):!!o[q]}}());var n=new k().getResult();var i={can:l,uaParser:k,browser:n.browser.name,version:n.browser.version,os:n.os.name,osVersion:n.os.version,verComp:j,swf_url:"../flash/Moxie.swf",xap_url:"../silverlight/Moxie.xap",global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};i.OS=i.os;if(MXI_DEBUG){i.debug={runtime:true,events:false};i.log=function(){function p(r){o.appendChild(document.createTextNode(r+"\n"))}var q=arguments[0];if(m.typeOf(q)==="string"){q=m.sprintf.apply(this,arguments)}if(window&&window.console&&window.console.log){window.console.log(q)}else{if(document){var o=document.getElementById("moxie-console");if(!o){o=document.createElement("pre");o.id="moxie-console";document.body.appendChild(o)}if(m.inArray(m.typeOf(q),["object","array"])!==-1){p(q)}else{o.appendChild(document.createTextNode(q+"\n"))}}}}}return i});h("moxie/core/I18n",["moxie/core/utils/Basic"],function(j){var i={};return{addI18n:function(k){return j.extend(i,k)},translate:function(k){return i[k]||k},_:function(k){return this.translate(k)},sprintf:function(l){var k=[].slice.call(arguments,1);return l.replace(/%[a-z]/g,function(){var m=k.shift();return j.typeOf(m)!=="undefined"?m:""})}}});h("moxie/core/utils/Mime",["moxie/core/utils/Basic","moxie/core/I18n"],function(l,k){var i="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";var j={mimes:{},extensions:{},addMimeType:function(m){var n=m.split(/,/),o,q,p;for(o=0;o=0;n--){if(q[n].fn===o){q.splice(n,1);break}}}else{q=[]}if(!q.length){delete m[this.uid][p];if(k.isEmptyObj(m[this.uid])){delete m[this.uid]}}}},removeAllEventListeners:function(){if(m[this.uid]){delete m[this.uid]}},dispatchEvent:function(s){var p,q,r,t,u={},v=true,n;if(k.typeOf(s)!=="string"){t=s;if(k.typeOf(t.type)==="string"){s=t.type;if(t.total!==n&&t.loaded!==n){u.total=t.total;u.loaded=t.loaded}u.async=t.async||false}else{throw new i.EventException(i.EventException.UNSPECIFIED_EVENT_TYPE_ERR)}}if(s.indexOf("::")!==-1){(function(w){p=w[0];s=w[1]}(s.split("::")))}else{p=this.uid}s=s.toLowerCase();q=m[p]&&m[p][s];if(q){q.sort(function(x,w){return w.priority-x.priority});r=[].slice.call(arguments);r.shift();u.type=s;r.unshift(u);if(MXI_DEBUG&&j.debug.events){j.log("Event '%s' fired on %u",u.type,p)}var o=[];k.each(q,function(w){r[0].target=w.scope;if(u.async){o.push(function(x){setTimeout(function(){x(w.fn.apply(w.scope,r)===false)},1)})}else{o.push(function(x){x(w.fn.apply(w.scope,r)===false)})}});if(o.length){k.inSeries(o,function(w){v=!w})}}return v},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)},handleEventProps:function(o){var n=this;this.bind(o.join(" "),function(p){var q="on"+p.type.toLowerCase();if(k.typeOf(this[q])==="function"){this[q].apply(this,arguments)}});k.each(o,function(p){p="on"+p.toLowerCase(p);if(k.typeOf(n[p])==="undefined"){n[p]=null}})}})}l.instance=new l();return l});h("moxie/runtime/Runtime",["moxie/core/utils/Env","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/EventTarget"],function(j,n,m,o){var i={},k={};function l(x,u,s,r,q){var w=this,p,v=n.guid(u+"_"),t=q||"browser";x=x||{};k[v]=this;s=n.extend({access_binary:false,access_image_binary:false,display_media:false,do_cors:false,drag_and_drop:false,filter_by_extension:true,resize_image:false,report_upload_progress:false,return_response_headers:false,return_response_type:false,return_status_code:true,send_custom_headers:false,select_file:false,select_folder:false,select_multiple:true,send_binary_string:false,send_browser_cookies:true,send_multipart:true,slice_blob:false,stream_upload:false,summon_file_dialog:false,upload_filesize:true,use_http_method:true},s);if(x.preferred_caps){t=l.getMode(r,x.preferred_caps,t)}if(MXI_DEBUG&&j.debug.runtime){j.log("\tdefault mode: %s",t)}p=(function(){var y={};return{exec:function(B,z,C,A){if(p[z]){if(!y[B]){y[B]={context:this,instance:new p[z]()}}if(y[B].instance[C]){return y[B].instance[C].apply(this,A)}}},removeInstance:function(z){delete y[z]},removeAllInstances:function(){var z=this;n.each(y,function(B,A){if(n.typeOf(B.instance.destroy)==="function"){B.instance.destroy.call(B.context)}z.removeInstance(A)})}}}());n.extend(this,{initialized:false,uid:v,type:u,mode:l.getMode(r,(x.required_caps),t),shimid:v+"_container",clients:0,options:x,can:function(A,B){var y=arguments[2]||s;if(n.typeOf(A)==="string"&&n.typeOf(B)==="undefined"){A=l.parseCaps(A)}if(n.typeOf(A)==="object"){for(var z in A){if(!this.can(z,A[z],y)){return false}}return true}if(n.typeOf(y[A])==="function"){return y[A].call(this,B)}else{return(B===y[A])}},getShimContainer:function(){var y,z=m.get(this.shimid);if(!z){y=this.options.container?m.get(this.options.container):document.body;z=document.createElement("div");z.id=this.shimid;z.className="moxie-shim moxie-shim-"+this.type;n.extend(z.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"});y.appendChild(z);y=null}return z},getShim:function(){return p},shimExec:function(z,A){var y=[].slice.call(arguments,2);return w.getShim().exec.call(this,this.uid,z,A,y)},exec:function(z,A){var y=[].slice.call(arguments,2);if(w[z]&&w[z][A]){return w[z][A].apply(this,y)}return w.shimExec.apply(this,arguments)},destroy:function(){if(!w){return}var y=m.get(this.shimid);if(y){y.parentNode.removeChild(y)}if(p){p.removeAllInstances()}this.unbindAll();delete k[this.uid];this.uid=null;v=w=p=y=null}});if(this.mode&&x.required_caps&&!this.can(x.required_caps)){this.mode=false}}l.order="html5,flash,silverlight,html4";l.getRuntime=function(p){return k[p]?k[p]:false};l.addConstructor=function(q,p){p.prototype=o.instance;i[q]=p};l.getConstructor=function(p){return i[p]||null};l.getInfo=function(p){var q=l.getRuntime(p);if(q){return{uid:q.uid,type:q.type,mode:q.mode,can:function(){return q.can.apply(q,arguments)}}}return null};l.parseCaps=function(p){var q={};if(n.typeOf(p)!=="string"){return p||{}}n.each(p.split(","),function(r){q[r]=true});return q};l.can=function(q,s){var r,p=l.getConstructor(q),t;if(p){r=new p({required_caps:s});t=r.mode;r.destroy();return !!t}return false};l.thatCan=function(r,s){var q=(s||l.order).split(/\s*,\s*/);for(var p in q){if(l.can(q[p],r)){return q[p]}}return null};l.getMode=function(p,s,q){var r=null;if(n.typeOf(q)==="undefined"){q="browser"}if(s&&!n.isEmptyObj(p)){n.each(s,function(v,t){if(p.hasOwnProperty(t)){var u=p[t](v);if(typeof(u)==="string"){u=[u]}if(!r){r=u}else{if(!(r=n.arrayIntersect(r,u))){if(MXI_DEBUG&&j.debug.runtime){j.log("\t\t%c: %v (conflicting mode requested: %s)",t,v,u)}return(r=false)}}}if(MXI_DEBUG&&j.debug.runtime){j.log("\t\t%c: %v (compatible modes: %s)",t,v,r)}});if(r){return n.inArray(q,r)!==-1?q:r[0]}else{if(r===false){return false}}}return q};l.capTrue=function(){return true};l.capFalse=function(){return false};l.capTest=function(p){return function(){return !!p}};return l});h("moxie/runtime/RuntimeClient",["moxie/core/utils/Env","moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/Runtime"],function(j,i,m,l){return function k(){var n;m.extend(this,{connectRuntime:function(r){var p=this,q;function o(s){var u,t;if(!s.length){p.trigger("RuntimeError",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR));n=null;return}u=s.shift().toLowerCase();t=l.getConstructor(u);if(!t){o(s);return}if(MXI_DEBUG&&j.debug.runtime){j.log("Trying runtime: %s",u);j.log(r)}n=new t(r);n.bind("Init",function(){n.initialized=true;if(MXI_DEBUG&&j.debug.runtime){j.log("Runtime '%s' initialized",n.type)}setTimeout(function(){n.clients++;p.trigger("RuntimeInit",n)},1)});n.bind("Error",function(){if(MXI_DEBUG&&j.debug.runtime){j.log("Runtime '%s' failed to initialize",n.type)}n.destroy();o(s)});if(MXI_DEBUG&&j.debug.runtime){j.log("\tselected mode: %s",n.mode)}if(!n.mode){n.trigger("Error");return}n.init()}if(m.typeOf(r)==="string"){q=r}else{if(m.typeOf(r.ruid)==="string"){q=r.ruid}}if(q){n=l.getRuntime(q);if(n){n.clients++;return n}else{throw new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR)}}o((r.runtime_order||l.order).split(/\s*,\s*/))},disconnectRuntime:function(){if(n&&--n.clients<=0){n.destroy()}n=null},getRuntime:function(){if(n&&n.uid){return n}return n=null},exec:function(){if(n){return n.exec.apply(this,arguments)}return null}})}});h("moxie/file/FileInput",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Mime","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/core/I18n","moxie/runtime/Runtime","moxie/runtime/RuntimeClient"],function(j,o,m,l,q,s,k,i,p){var r=["ready","change","cancel","mouseenter","mouseleave","mousedown","mouseup"];function n(w){if(MXI_DEBUG){o.log("Instantiating FileInput...")}var u=this,t,v,x;if(j.inArray(j.typeOf(w),["string","node"])!==-1){w={browse_button:w}}v=l.get(w.browse_button);if(!v){throw new q.DOMException(q.DOMException.NOT_FOUND_ERR)}x={accept:[{title:k.translate("All Files"),extensions:"*"}],name:"file",multiple:false,required_caps:false,container:v.parentNode||document.body};w=j.extend({},x,w);if(typeof(w.required_caps)==="string"){w.required_caps=i.parseCaps(w.required_caps)}if(typeof(w.accept)==="string"){w.accept=m.mimes2extList(w.accept)}t=l.get(w.container);if(!t){t=document.body}if(l.getStyle(t,"position")==="static"){t.style.position="relative"}t=v=null;p.call(u);j.extend(u,{uid:j.guid("uid_"),ruid:null,shimid:null,files:null,init:function(){u.bind("RuntimeInit",function(z,y){u.ruid=y.uid;u.shimid=y.shimid;u.bind("Ready",function(){u.trigger("Refresh")},999);u.bind("Refresh",function(){var D,C,B,A;B=l.get(w.browse_button);A=l.get(y.shimid);if(B){D=l.getPos(B,l.get(w.container));C=l.getSize(B);if(A){j.extend(A.style,{top:D.y+"px",left:D.x+"px",width:C.w+"px",height:C.h+"px"})}}A=B=null});y.exec.call(u,"FileInput","init",w)});u.connectRuntime(j.extend({},w,{required_caps:{select_file:true}}))},disable:function(z){var y=this.getRuntime();if(y){y.exec.call(this,"FileInput","disable",j.typeOf(z)==="undefined"?true:z)}},refresh:function(){u.trigger("Refresh")},destroy:function(){var y=this.getRuntime();if(y){y.exec.call(this,"FileInput","destroy");this.disconnectRuntime()}if(j.typeOf(this.files)==="array"){j.each(this.files,function(z){z.destroy()})}this.files=null;this.unbindAll()}});this.handleEventProps(r)}n.prototype=s.instance;return n});h("moxie/core/utils/Encode",[],function(){var k=function(m){return unescape(encodeURIComponent(m))};var l=function(m){return decodeURIComponent(escape(m))};var j=function(t,y){if(typeof(window.atob)==="function"){return y?l(window.atob(t)):window.atob(t)}var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o,n,m,x,w,v,u,z,s=0,A=0,q="",r=[];if(!t){return t}t+="";do{x=p.indexOf(t.charAt(s++));w=p.indexOf(t.charAt(s++));v=p.indexOf(t.charAt(s++));u=p.indexOf(t.charAt(s++));z=x<<18|w<<12|v<<6|u;o=z>>16&255;n=z>>8&255;m=z&255;if(v==64){r[A++]=String.fromCharCode(o)}else{if(u==64){r[A++]=String.fromCharCode(o,n)}else{r[A++]=String.fromCharCode(o,n,m)}}}while(s>18&63;y=B>>12&63;x=B>>6&63;w=B&63;s[C++]=q.charAt(z)+q.charAt(y)+q.charAt(x)+q.charAt(w)}while(u0){if(x){ac.upload.dispatchEvent(ag)}ac.dispatchEvent(ag)}else{D=true;ac.dispatchEvent("error")}ad()});O.bind("Abort",function(ag){ac.dispatchEvent(ag);ad()});O.bind("Error",function(ag){D=true;Z("readyState",v.DONE);ac.dispatchEvent("readystatechange");L=true;ac.dispatchEvent(ag);ad()});af.exec.call(O,"XMLHttpRequest","send",{url:J,method:P,async:X,user:S,password:G,headers:Q,mimeType:K,encoding:I,responseType:ac.responseType,withCredentials:ac.withCredentials,options:T},ae)}if(typeof(T.required_caps)==="string"){T.required_caps=o.parseCaps(T.required_caps)}T.required_caps=q.extend({},T.required_caps,{return_response_type:ac.responseType});if(ae instanceof z){T.required_caps.send_multipart=true}if(!q.isEmptyObj(Q)){T.required_caps.send_custom_headers=true}if(!H){T.required_caps.do_cors=true}if(T.ruid){ab(O.connectRuntime(T))}else{O.bind("RuntimeInit",function(ag,af){ab(af)});O.bind("RuntimeError",function(ag,af){ac.dispatchEvent("RuntimeError",af)});O.connectRuntime(T)}}function M(){Z("responseText","");Z("responseXML",null);Z("response",null);Z("status",0);Z("statusText","");N=W=null}}v.UNSENT=0;v.OPENED=1;v.HEADERS_RECEIVED=2;v.LOADING=3;v.DONE=4;v.prototype=p.instance;return v});h("moxie/runtime/Transporter",["moxie/core/utils/Basic","moxie/core/utils/Encode","moxie/runtime/RuntimeClient","moxie/core/EventTarget"],function(l,i,j,m){function k(){var r,p,n,s,v,u;j.call(this);l.extend(this,{uid:l.guid("uid_"),state:k.IDLE,result:null,transport:function(A,z,y){var x=this;y=l.extend({chunk_size:204798},y);if((r=y.chunk_size%3)){y.chunk_size+=3-r}u=y.chunk_size;t.call(this);n=A;s=A.length;if(l.typeOf(y)==="string"||y.ruid){q.call(x,z,this.connectRuntime(y))}else{var w=function(C,B){x.unbind("RuntimeInit",w);q.call(x,z,B)};this.bind("RuntimeInit",w);this.connectRuntime(y)}},abort:function(){var w=this;w.state=k.IDLE;if(p){p.exec.call(w,"Transporter","clear");w.trigger("TransportingAborted")}t.call(w)},destroy:function(){this.unbindAll();p=null;this.disconnectRuntime();t.call(this)}});function t(){s=v=0;n=this.result=null}function q(x,y){var w=this;p=y;w.bind("TransportingProgress",function(z){v=z.loaded;if(vy){u=y}x=i.btoa(n.substr(v,u));p.exec.call(w,"Transporter","receive",x,s)}}k.IDLE=0;k.BUSY=1;k.DONE=2;k.prototype=m.instance;return k});h("moxie/image/Image",["moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/file/FileReaderSync","moxie/xhr/XMLHttpRequest","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/runtime/Transporter","moxie/core/utils/Env","moxie/core/EventTarget","moxie/file/Blob","moxie/file/File","moxie/core/utils/Encode"],function(k,n,t,r,u,j,s,m,q,w,l,p,o){var v=["progress","load","error","resize","embedded"];function i(){s.call(this);k.extend(this,{uid:k.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){z.apply(this,arguments)},downsize:function(D){var E={width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90,crop:false,preserveHeaders:true,resample:false};if(typeof(D)==="object"){D=k.extend(E,D)}else{D=k.extend(E,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]})}try{if(!this.size){throw new t.DOMException(t.DOMException.INVALID_STATE_ERR)}if(this.width>i.MAX_RESIZE_WIDTH||this.height>i.MAX_RESIZE_HEIGHT){throw new t.ImageError(t.ImageError.MAX_RESOLUTION_ERR)}this.exec("Image","downsize",D.width,D.height,D.crop,D.preserveHeaders)}catch(C){this.trigger("error",C.code)}},crop:function(E,C,D){this.downsize(E,C,true,D)},getAsCanvas:function(){if(!q.can("create_canvas")){throw new t.RuntimeError(t.RuntimeError.NOT_SUPPORTED_ERR)}var C=this.connectRuntime(this.ruid);return C.exec.call(this,"Image","getAsCanvas")},getAsBlob:function(C,D){if(!this.size){throw new t.DOMException(t.DOMException.INVALID_STATE_ERR)}return this.exec("Image","getAsBlob",C||"image/jpeg",D||90)},getAsDataURL:function(C,D){if(!this.size){throw new t.DOMException(t.DOMException.INVALID_STATE_ERR)}return this.exec("Image","getAsDataURL",C||"image/jpeg",D||90)},getAsBinaryString:function(C,E){var D=this.getAsDataURL(C,E);return o.atob(D.substring(D.indexOf("base64,")+7))},embed:function(G,I){var D=this,H;I=k.extend({width:this.width,height:this.height,type:this.type||"image/jpeg",quality:90},I||{});function F(L,O){var J=this;if(q.can("create_canvas")){var K=J.getAsCanvas();if(K){G.appendChild(K);K=null;J.destroy();D.trigger("embedded");return}}var N=J.getAsDataURL(L,O);if(!N){throw new t.ImageError(t.ImageError.WRONG_FORMAT)}if(q.can("use_data_uri_of",N.length)){G.innerHTML='';J.destroy();D.trigger("embedded")}else{var M=new m();M.bind("TransportingComplete",function(){H=D.connectRuntime(this.result.ruid);D.bind("Embedded",function(){k.extend(H.getShimContainer().style,{top:"0px",left:"0px",width:J.width+"px",height:J.height+"px"});H=null},999);H.exec.call(D,"ImageView","display",this.result.uid,width,height);J.destroy()});M.transport(o.atob(N.substring(N.indexOf("base64,")+7)),L,{required_caps:{display_media:true},runtime_order:"flash,silverlight",container:G})}}try{if(!(G=n.get(G))){throw new t.DOMException(t.DOMException.INVALID_NODE_TYPE_ERR)}if(!this.size){throw new t.DOMException(t.DOMException.INVALID_STATE_ERR)}if(this.width>i.MAX_RESIZE_WIDTH||this.height>i.MAX_RESIZE_HEIGHT){}var C=new i();C.bind("Resize",function(){F.call(this,I.type,I.quality)});C.bind("Load",function(){C.downsize(I)});if(this.meta.thumb&&this.meta.thumb.width>=I.width&&this.meta.thumb.height>=I.height){C.load(this.meta.thumb.data)}else{C.clone(this,false)}return C}catch(E){this.trigger("error",E.code)}},destroy:function(){if(this.ruid){this.getRuntime().exec.call(this,"Image","destroy");this.disconnectRuntime()}this.unbindAll()}});this.handleEventProps(v);this.bind("Load Resize",function(){y.call(this)},999);function y(C){if(!C){C=this.exec("Image","getInfo")}this.size=C.size;this.width=C.width;this.height=C.height;this.type=C.type;this.meta=C.meta;if(this.name===""){this.name=C.name}}function z(E){var D=k.typeOf(E);try{if(E instanceof i){if(!E.size){throw new t.DOMException(t.DOMException.INVALID_STATE_ERR)}x.apply(this,arguments)}else{if(E instanceof l){if(!~k.inArray(E.type,["image/jpeg","image/png"])){throw new t.ImageError(t.ImageError.WRONG_FORMAT)}A.apply(this,arguments)}else{if(k.inArray(D,["blob","file"])!==-1){z.call(this,new p(null,E),arguments[1])}else{if(D==="string"){if(E.substr(0,5)==="data:"){z.call(this,new l(null,{data:E}),arguments[1])}else{B.apply(this,arguments)}}else{if(D==="node"&&E.nodeName.toLowerCase()==="img"){z.call(this,E.src,arguments[1])}else{throw new t.DOMException(t.DOMException.TYPE_MISMATCH_ERR)}}}}}}catch(C){this.trigger("error",C.code)}}function x(C,D){var E=this.connectRuntime(C.ruid);this.ruid=E.uid;E.exec.call(this,"Image","loadFromImage",C,(k.typeOf(D)==="undefined"?true:D))}function A(E,F){var D=this;D.name=E.name||"";function C(G){D.ruid=G.uid;G.exec.call(D,"Image","loadFromBlob",E)}if(E.isDetached()){this.bind("RuntimeInit",function(H,G){C(G)});if(F&&typeof(F.required_caps)==="string"){F.required_caps=j.parseCaps(F.required_caps)}this.connectRuntime(k.extend({required_caps:{access_image_binary:true,resize_image:true}},F))}else{C(this.connectRuntime(E.ruid))}}function B(E,D){var C=this,F;F=new u();F.open("get",E);F.responseType="blob";F.onprogress=function(G){C.trigger(G)};F.onload=function(){A.call(C,F.response,true)};F.onerror=function(G){C.trigger(G)};F.onloadend=function(){F.destroy()};F.bind("RuntimeError",function(H,G){C.trigger("RuntimeError",G)});F.send(null,D)}}i.MAX_RESIZE_WIDTH=8192;i.MAX_RESIZE_HEIGHT=8192;i.prototype=w.instance;return i});h("moxie/runtime/html5/Runtime",["moxie/core/utils/Basic","moxie/core/Exceptions","moxie/runtime/Runtime","moxie/core/utils/Env"],function(n,i,k,j){var m="html5",l={};function o(q){var p=this,t=k.capTest,s=k.capTrue;var r=n.extend({access_binary:t(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return p.can("access_binary")&&!!l.Image},display_media:t(j.can("create_canvas")||j.can("use_data_uri_over32kb")),do_cors:t(window.XMLHttpRequest&&"withCredentials" in new XMLHttpRequest()),drag_and_drop:t(function(){var u=document.createElement("div");return(("draggable" in u)||("ondragstart" in u&&"ondrop" in u))&&(j.browser!=="IE"||j.verComp(j.version,9,">"))}()),filter_by_extension:t(function(){return(j.browser==="Chrome"&&j.verComp(j.version,28,">="))||(j.browser==="IE"&&j.verComp(j.version,10,">="))||(j.browser==="Safari"&&j.verComp(j.version,7,">="))}()),return_response_headers:s,return_response_type:function(u){if(u==="json"&&!!window.JSON){return true}return j.can("return_response_type",u)},return_status_code:s,report_upload_progress:t(window.XMLHttpRequest&&new XMLHttpRequest().upload),resize_image:function(){return p.can("access_binary")&&j.can("create_canvas")},select_file:function(){return j.can("use_fileinput")&&window.File},select_folder:function(){return p.can("select_file")&&j.browser==="Chrome"&&j.verComp(j.version,21,">=")},select_multiple:function(){return p.can("select_file")&&!(j.browser==="Safari"&&j.os==="Windows")&&!(j.os==="iOS"&&j.verComp(j.osVersion,"7.0.0",">")&&j.verComp(j.osVersion,"8.0.0","<"))},send_binary_string:t(window.XMLHttpRequest&&(new XMLHttpRequest().sendAsBinary||(window.Uint8Array&&window.ArrayBuffer))),send_custom_headers:t(window.XMLHttpRequest),send_multipart:function(){return !!(window.XMLHttpRequest&&new XMLHttpRequest().upload&&window.FormData)||p.can("send_binary_string")},slice_blob:t(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return p.can("slice_blob")&&p.can("send_multipart")},summon_file_dialog:function(){return p.can("select_file")&&((j.browser==="Firefox"&&j.verComp(j.version,4,">="))||(j.browser==="Opera"&&j.verComp(j.version,12,">="))||(j.browser==="IE"&&j.verComp(j.version,10,">="))||!!~n.inArray(j.browser,["Chrome","Safari"]))},upload_filesize:s},arguments[2]);k.call(this,q,(arguments[1]||m),r);n.extend(this,{init:function(){this.trigger("Init")},destroy:(function(u){return function(){u.call(p);u=p=null}}(this.destroy))});n.extend(this.getShim(),l)}k.addConstructor(m,o);return l});h("moxie/core/utils/Events",["moxie/core/utils/Basic"],function(o){var p={},l="moxie_"+o.guid();function k(){this.returnValue=false}function j(){this.cancelBubble=true}var m=function(u,q,v,s){var t,r;q=q.toLowerCase();if(u.addEventListener){t=v;u.addEventListener(q,t,false)}else{if(u.attachEvent){t=function(){var w=window.event;if(!w.target){w.target=w.srcElement}w.preventDefault=k;w.stopPropagation=j;v(w)};u.attachEvent("on"+q,t)}}if(!u[l]){u[l]=o.guid()}if(!p.hasOwnProperty(u[l])){p[u[l]]={}}r=p[u[l]];if(!r.hasOwnProperty(q)){r[q]=[]}r[q].push({func:t,orig:v,key:s})};var n=function(v,q,w){var t,s;q=q.toLowerCase();if(v[l]&&p[v[l]]&&p[v[l]][q]){t=p[v[l]][q]}else{return}for(var r=t.length-1;r>=0;r--){if(t[r].orig===w||t[r].key===w){if(v.removeEventListener){v.removeEventListener(q,t[r].func,false)}else{if(v.detachEvent){v.detachEvent("on"+q,t[r].func)}}t[r].orig=null;t[r].func=null;t.splice(r,1);if(w!==s){break}}}if(!t.length){delete p[v[l]][q]}if(o.isEmptyObj(p[v[l]])){delete p[v[l]];try{delete v[l]}catch(u){v[l]=s}}};var i=function(r,q){if(!r||!r[l]){return}o.each(p[r[l]],function(t,s){n(r,s,q)})};return{addEvent:m,removeEvent:n,removeAllEvents:i}});h("moxie/runtime/html5/file/FileInput",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(n,k,p,m,j,l,i){function o(){var q;p.extend(this,{init:function(A){var r=this,y=r.getRuntime(),x,t,u,z,w,v;q=A;u=q.accept.mimes||l.extList2mimes(q.accept,y.can("filter_by_extension"));t=y.getShimContainer();t.innerHTML='";x=m.get(y.uid);p.extend(x.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"});z=m.get(q.browse_button);if(y.can("summon_file_dialog")){if(m.getStyle(z,"position")==="static"){z.style.position="relative"}w=parseInt(m.getStyle(z,"z-index"),10)||1;z.style.zIndex=w;t.style.zIndex=w-1;j.addEvent(z,"click",function(C){var B=m.get(y.uid);if(B&&!B.disabled){B.click()}C.preventDefault()},r.uid)}v=y.can("summon_file_dialog")?z:t;j.addEvent(v,"mouseover",function(){r.trigger("mouseenter")},r.uid);j.addEvent(v,"mouseout",function(){r.trigger("mouseleave")},r.uid);j.addEvent(v,"mousedown",function(){r.trigger("mousedown")},r.uid);j.addEvent(m.get(q.container),"mouseup",function(){r.trigger("mouseup")},r.uid);x.onchange=function s(B){r.files=[];p.each(this.files,function(E){var D="";if(q.directory){if(E.name=="."){return true}}if(E.webkitRelativePath){D="/"+E.webkitRelativePath.replace(/^\//,"")}E=new k(y.uid,E);E.relativePath=D;r.files.push(E)});if(i.browser!=="IE"&&i.browser!=="IEMobile"){this.value=""}else{var C=this.cloneNode(true);this.parentNode.replaceChild(C,this);C.onchange=s}if(r.files.length){r.trigger("change")}};r.trigger({type:"ready",async:true});t=null},disable:function(t){var s=this.getRuntime(),r;if((r=m.get(s.uid))){r.disabled=!!t}},destroy:function(){var s=this.getRuntime(),t=s.getShim(),r=s.getShimContainer();j.removeAllEvents(r,this.uid);j.removeAllEvents(q&&m.get(q.container),this.uid);j.removeAllEvents(q&&m.get(q.browse_button),this.uid);if(r){r.innerHTML=""}t.removeInstance(this.uid);q=r=t=null}})}return(n.FileInput=o)});h("moxie/runtime/html5/file/Blob",["moxie/runtime/html5/Runtime","moxie/file/Blob"],function(j,k){function i(){function l(n,q,m){var o;if(window.File.prototype.slice){try{n.slice();return n.slice(q,m)}catch(p){return n.slice(q,m-q)}}else{if((o=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)){return o.call(n,q,m)}else{return null}}}this.slice=function(){return new k(this.getRuntime().uid,l.apply(this,arguments))}}return(j.Blob=i)});h("moxie/runtime/html5/file/FileDrop",["moxie/runtime/html5/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime"],function(m,j,n,l,i,k){function o(){var r=[],u=[],z,v;n.extend(this,{init:function(C){var B=this,D;z=C;v=B.ruid;u=t(z.accept);D=z.container;i.addEvent(D,"dragover",function(E){if(!s(E)){return}E.preventDefault();E.dataTransfer.dropEffect="copy"},B.uid);i.addEvent(D,"drop",function(E){if(!s(E)){return}E.preventDefault();r=[];if(E.dataTransfer.items&&E.dataTransfer.items[0].webkitGetAsEntry){y(E.dataTransfer.items,function(){B.files=r;B.trigger("drop")})}else{n.each(E.dataTransfer.files,function(F){q(F)});B.files=r;B.trigger("drop")}},B.uid);i.addEvent(D,"dragenter",function(E){B.trigger("dragenter")},B.uid);i.addEvent(D,"dragleave",function(E){B.trigger("dragleave")},B.uid)},destroy:function(){i.removeAllEvents(z&&l.get(z.container),this.uid);v=r=u=z=null}});function s(C){if(!C.dataTransfer||!C.dataTransfer.types){return false}var B=n.toArray(C.dataTransfer.types||[]);return n.inArray("Files",B)!==-1||n.inArray("public.file-url",B)!==-1||n.inArray("application/x-moz-file",B)!==-1}function q(C,B){if(x(C)){var D=new j(v,C);D.relativePath=B||"";r.push(D)}}function t(D){var C=[];for(var B=0;B=")&&m.verComp(m.version,7,"<")),z=m.browser==="Android Browser",E=false;w=G.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase();y=x();y.open(G.method,G.url,G.async,G.user,G.password);if(D instanceof k){if(D.isDetached()){E=true}D=D.getSource()}else{if(D instanceof r){if(D.hasBlob()){if(D.getBlob().isDetached()){D=v.call(F,D);E=true}else{if((C||z)&&j.typeOf(D.getBlob().getSource())==="blob"&&window.FileReader){s.call(F,G,D);return}}}if(D instanceof r){var B=new window.FormData();D.each(function(I,H){if(I instanceof k){B.append(H,I.getSource())}else{B.append(H,I)}});D=B}}}if(y.upload){if(G.withCredentials){y.withCredentials=true}y.addEventListener("load",function(H){F.trigger(H)});y.addEventListener("error",function(H){F.trigger(H)});y.addEventListener("progress",function(H){F.trigger(H)});y.upload.addEventListener("progress",function(H){F.trigger({type:"UploadProgress",loaded:H.loaded,total:H.total})})}else{y.onreadystatechange=function A(){switch(y.readyState){case 1:break;case 2:break;case 3:var J,H;try{if(i.hasSameOrigin(G.url)){J=y.getResponseHeader("Content-Length")||0}if(y.responseText){H=y.responseText.length}}catch(I){J=H=0}F.trigger({type:"progress",lengthComputable:!!J,total:parseInt(J,10),loaded:H});break;case 4:y.onreadystatechange=function(){};if(y.status===0){F.trigger("error")}else{F.trigger("load")}break}}}if(!j.isEmptyObj(G.headers)){j.each(G.headers,function(H,I){y.setRequestHeader(I,H)})}if(""!==G.responseType&&"responseType" in y){if("json"===G.responseType&&!m.can("return_response_type","json")){y.responseType="text"}else{y.responseType=G.responseType}}if(!E){y.send(D)}else{if(y.sendAsBinary){y.sendAsBinary(D)}else{(function(){var H=new Uint8Array(D.length);for(var I=0;Ithis.length()){throw new Error("You are trying to read outside the source boundaries.")}m=this.littleEndian?0:-8*(p-1);for(o=0,q=0;othis.length()){throw new Error("You are trying to write outside the source boundaries.")}m=this.littleEndian?0:-8*(q-1);for(p=0;p>Math.abs(m+p*8))&255)}},BYTE:function(m){return this.read(m,1)},SHORT:function(m){return this.read(m,2)},LONG:function(m){return this.read(m,4)},SLONG:function(m){var n=this.read(m,4);return(n>2147483647?n-4294967296:n)},CHAR:function(m){return String.fromCharCode(this.read(m,1))},STRING:function(m,n){return this.asArray("CHAR",m,n).join("")},asArray:function(p,m,q){var n=[];for(var o=0;o0){o.set(new Uint8Array(m.slice(0,p)),0)}o.set(new Uint8Array(r),p);o.set(new Uint8Array(m.slice(p+q)),p+r.byteLength);this.clear();m=o.buffer;n=new DataView(m);break}default:return m}},length:function(){return m?m.byteLength:0},clear:function(){n=m=null}})}function l(n){k.extend(this,{readByteAt:function(o){return n.charCodeAt(o)},writeByteAt:function(o,p){m(String.fromCharCode(p),o,1)},SEGMENT:function(o,q,p){switch(arguments.length){case 1:return n.substr(o);case 2:return n.substr(o,q);case 3:m(p!==null?p:"",o,q);break;default:return n}},length:function(){return n?n.length:0},clear:function(){n=null}});function m(q,o,p){p=arguments.length===3?p:n.length-o-1;n=n.substr(0,o)+q+n.substr(p+o)}}return j});h("moxie/runtime/html5/image/JPEGHeaders",["moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(k,i){return function j(o){var q=[],p,l,m,n=0;p=new k(o);if(p.SHORT(0)!==65496){p.clear();throw new i.ImageError(i.ImageError.WRONG_FORMAT)}l=2;while(l<=p.length()){m=p.SHORT(l);if(m>=65488&&m<=65495){l+=2;continue}if(m===65498||m===65497){break}n=p.SHORT(l+2)+2;if(m>=65505&&m<=65519){q.push({hex:m,name:"APP"+(m&15),start:l,length:n,segment:p.SEGMENT(l,n)})}l+=n}p.clear();return{headers:q,restore:function(u){var r,t,s;s=new k(u);l=s.SHORT(2)==65504?4+s.SHORT(4):2;for(t=0,r=q.length;t=w.length){break}}},purge:function(){this.headers=q=[]}}}});h("moxie/runtime/html5/image/ExifParser",["moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader","moxie/core/Exceptions"],function(l,k,i){function j(p){var t,u,q,o,s,v;k.call(this,p);u={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"},thumb:{513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength"}};q={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"}};o={tiffHeader:10};s=o.tiffHeader;t={clear:this.clear};l.extend(this,{read:function(){try{return j.prototype.read.apply(this,arguments)}catch(w){throw new i.ImageError(i.ImageError.INVALID_META_ERR)}},write:function(){try{return j.prototype.write.apply(this,arguments)}catch(w){throw new i.ImageError(i.ImageError.INVALID_META_ERR)}},UNDEFINED:function(){return this.BYTE.apply(this,arguments)},RATIONAL:function(w){return this.LONG(w)/this.LONG(w+4)},SRATIONAL:function(w){return this.SLONG(w)/this.SLONG(w+4)},ASCII:function(w){return this.CHAR(w)},TIFF:function(){return v||null},EXIF:function(){var x=null;if(o.exifIFD){try{x=r.call(this,o.exifIFD,u.exif)}catch(z){return null}if(x.ExifVersion&&l.typeOf(x.ExifVersion)==="array"){for(var y=0,w="";y4){y=A.LONG(y)+o.tiffHeader}if(y+J*D>=this.length()){throw new i.ImageError(i.ImageError.INVALID_META_ERR)}if(E==="ASCII"){z[K]=l.trim(A.STRING(y,D).replace(/\0$/,""));continue}else{H=A.asArray(E,y,D);G=(D==1?H[0]:H);if(q.hasOwnProperty(K)&&typeof G!="object"){z[K]=q[K][G]}else{z[K]=G}}}return z}function n(E,G,D){var A,y,x,w=0;if(typeof(G)==="string"){var F=u[E.toLowerCase()];for(var z in F){if(F[z]===G){G=z;break}}}A=o[E.toLowerCase()+"IFD"];y=this.SHORT(A);for(var B=0;B=65472&&y<=65475){x+=5;return{height:z.SHORT(x),width:z.SHORT(x+=2)}}A=z.SHORT(x+=2);x+=A-2}return null}function t(){var y=r.thumb(),x,z;if(y){x=new m(y);z=v(x);x.clear();if(z){z.data=y;return z}}return null}function p(){if(!r||!u||!q){return}r.clear();u.purge();q.clear();w=u=r=q=null}}return l});h("moxie/runtime/html5/image/PNG",["moxie/core/Exceptions","moxie/core/utils/Basic","moxie/runtime/html5/utils/BinaryReader"],function(i,l,k){function j(q){var s,n,p,o;s=new k(q);(function(){var u=0,w=0,v=[35152,20039,3338,6666];for(w=0;wv?v-w:G;var A=0;while(Ap?p-A:G;o.clearRect(0,0,G,G);o.drawImage(I,-A,-w);var t=(A*C/p+r)<<0;var u=Math.ceil(B*C/p);var s=(w*z/v/E+q)<<0;var F=Math.ceil(H*z/v/E);D.drawImage(l,0,0,B,H,t,s,u,F);A+=G}w+=G}l=o=null}function j(n){var m=n.naturalWidth,p=n.naturalHeight;if(m*p>1024*1024){var o=document.createElement("canvas");o.width=o.height=1;var l=o.getContext("2d");l.drawImage(n,-m+1,0);return l.getImageData(0,0,1,1).data[3]===0}else{return false}}function k(p,m,u){var l=document.createElement("canvas");l.width=1;l.height=u;var v=l.getContext("2d");v.drawImage(p,0,0);var o=v.getImageData(0,0,1,u).data;var s=0;var q=u;var t=u;while(t>s){var n=o[(t-1)*4+3];if(n===0){q=t}else{s=t}t=(q+s)>>1}l=null;var r=(t/u);return(r===0)?1:r}return{isSubsampled:j,renderTo:i}});h("moxie/runtime/html5/image/Image",["moxie/runtime/html5/Runtime","moxie/core/utils/Basic","moxie/core/Exceptions","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/runtime/html5/image/ImageInfo","moxie/runtime/html5/image/MegaPixel","moxie/core/utils/Mime","moxie/core/utils/Env"],function(p,i,q,l,j,n,s,r,k,m){function o(){var D=this,C,H,B,x,F,J=false,u=true;i.extend(this,{loadFromBlob:function(M){var L=this,N=L.getRuntime(),K=arguments.length>1?arguments[1]:true;if(!N.can("access_binary")){throw new q.RuntimeError(q.RuntimeError.NOT_SUPPORTED_ERR)}F=M;if(M.isDetached()){x=M.getSource();A.call(this,x);return}else{G.call(this,M.getSource(),function(O){if(K){x=I(O)}A.call(L,O)})}},loadFromImage:function(K,L){this.meta=K.meta;F=new n(null,{name:K.name,size:K.size,type:K.type});A.call(this,L?(x=K.getAsBinaryString()):K.getAsDataURL())},getInfo:function(){var K=this.getRuntime(),L;if(!H&&x&&K.can("access_image_binary")){H=new s(x)}L={width:y().width||0,height:y().height||0,type:F.type||k.getFileMime(F.name),size:x&&x.length||F.size||0,name:F.name||"",meta:H&&H.meta||this.meta||{}};if(L.meta&&L.meta.thumb&&!(L.meta.thumb.data instanceof j)){L.meta.thumb.data=new j(null,{type:"image/jpeg",data:L.meta.thumb.data})}return L},downsize:function(){t.apply(this,arguments)},getAsCanvas:function(){if(B){B.id=this.uid+"_canvas"}return B},getAsBlob:function(K,L){if(K!==this.type){t.call(this,this.width,this.height,false)}return new n(null,{name:F.name||"",type:K,data:D.getAsBinaryString.call(this,K,L)})},getAsDataURL:function(L){var M=arguments[1]||90;if(!J){return C.src}if("image/jpeg"!==L){return B.toDataURL("image/png")}else{try{return B.toDataURL("image/jpeg",M/100)}catch(K){return B.toDataURL("image/jpeg")}}},getAsBinaryString:function(L,N){if(!J){if(!x){x=I(D.getAsDataURL(L,N))}return x}if("image/jpeg"!==L){x=I(D.getAsDataURL(L,N))}else{var M;if(!N){N=90}try{M=B.toDataURL("image/jpeg",N/100)}catch(K){M=B.toDataURL("image/jpeg")}x=I(M);if(H){x=H.stripHeaders(x);if(u){if(H.meta&&H.meta.exif){H.setExif({PixelXDimension:this.width,PixelYDimension:this.height})}x=H.writeHeaders(x)}H.purge();H=null}}J=false;return x},destroy:function(){D=null;v.call(this);this.getRuntime().getShim().removeInstance(this.uid)}});function y(){if(!B&&!C){throw new q.ImageError(q.DOMException.INVALID_STATE_ERR)}return B||C}function I(K){return l.atob(K.substring(K.indexOf("base64,")+7))}function E(L,K){return"data:"+(K||"")+";base64,"+l.btoa(L)}function A(L){var K=this;C=new Image();C.onerror=function(){v.call(this);K.trigger("error",q.ImageError.WRONG_FORMAT)};C.onload=function(){K.trigger("load")};C.src=L.substr(0,5)=="data:"?L:E(L,F.type)}function G(M,N){var L=this,K;if(window.FileReader){K=new FileReader();K.onload=function(){N(this.result)};K.onerror=function(){L.trigger("error",q.ImageError.WRONG_FORMAT)};K.readAsDataURL(M)}else{return N(M.getAsDataURL())}}function t(L,W,R,T){var X=this,O,N,U=0,S=0,Q,V,M,K;u=T;K=(this.meta&&this.meta.tiff&&this.meta.tiff.Orientation)||1;if(i.inArray(K,[5,6,7,8])!==-1){var P=L;L=W;W=P}Q=y();if(!R){O=Math.min(L/Q.width,W/Q.height)}else{L=Math.min(L,Q.width);W=Math.min(W,Q.height);O=Math.max(L/Q.width,W/Q.height)}if(O>1&&!R&&T){this.trigger("Resize");return}if(!B){B=document.createElement("canvas")}V=Math.round(Q.width*O);M=Math.round(Q.height*O);if(R){B.width=L;B.height=W;if(V>L){U=Math.round((V-L)/2)}if(M>W){S=Math.round((M-W)/2)}}else{B.width=V;B.height=M}if(!u){z(B.width,B.height,K)}w.call(this,Q,B,-U,-S,V,M);this.width=B.width;this.height=B.height;J=true;X.trigger("Resize")}function w(N,O,K,Q,M,P){if(m.OS==="iOS"){r.renderTo(N,O,{width:M,height:P,x:K,y:Q})}else{var L=O.getContext("2d");L.drawImage(N,K,Q,M,P)}}function z(N,K,M){switch(M){case 5:case 6:case 7:case 8:B.width=K;B.height=N;break;default:B.width=N;B.height=K}var L=B.getContext("2d");switch(M){case 2:L.translate(N,0);L.scale(-1,1);break;case 3:L.translate(N,K);L.rotate(Math.PI);break;case 4:L.translate(0,K);L.scale(1,-1);break;case 5:L.rotate(0.5*Math.PI);L.scale(1,-1);break;case 6:L.rotate(0.5*Math.PI);L.translate(0,-K);break;case 7:L.rotate(0.5*Math.PI);L.translate(N,-K);L.scale(-1,1);break;case 8:L.rotate(-0.5*Math.PI);L.translate(-N,0);break}}function v(){if(H){H.purge();H=null}x=C=B=F=null;J=false}}return(p.Image=o)});h("moxie/runtime/flash/Runtime",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/runtime/Runtime"],function(j,n,k,q,i){var o="flash",p={};function m(){var t;try{t=navigator.plugins["Shockwave Flash"];t=t.description}catch(v){try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(u){t="0.0"}}t=t.match(/\d+/g);return parseFloat(t[0]+"."+t[1])}function l(v){var u=k.get(v);if(u&&u.nodeName=="OBJECT"){if(n.browser==="IE"){u.style.display="none";(function t(){if(u.readyState==4){s(v)}else{setTimeout(t,10)}})()}else{u.parentNode.removeChild(u)}}}function s(v){var u=k.get(v);if(u){for(var t in u){if(typeof u[t]=="function"){u[t]=null}}u.parentNode.removeChild(u)}}function r(u){var t=this,v;u=j.extend({swf_url:n.swf_url},u);i.call(this,u,o,{access_binary:function(w){return w&&t.mode==="browser"},access_image_binary:function(w){return w&&t.mode==="browser"},display_media:i.capTrue,do_cors:i.capTrue,drag_and_drop:false,report_upload_progress:function(){return t.mode==="client"},resize_image:i.capTrue,return_response_headers:false,return_response_type:function(w){if(w==="json"&&!!window.JSON){return true}return !j.arrayDiff(w,["","text","document"])||t.mode==="browser"},return_status_code:function(w){return t.mode==="browser"||!j.arrayDiff(w,[200,404])},select_file:i.capTrue,select_multiple:i.capTrue,send_binary_string:function(w){return w&&t.mode==="browser"},send_browser_cookies:function(w){return w&&t.mode==="browser"},send_custom_headers:function(w){return w&&t.mode==="browser"},send_multipart:i.capTrue,slice_blob:function(w){return w&&t.mode==="browser"},stream_upload:function(w){return w&&t.mode==="browser"},summon_file_dialog:false,upload_filesize:function(w){return j.parseSizeStr(w)<=2097152||t.mode==="client"},use_http_method:function(w){return !j.arrayDiff(w,["GET","POST"])}},{access_binary:function(w){return w?"browser":"client"},access_image_binary:function(w){return w?"browser":"client"},report_upload_progress:function(w){return w?"browser":"client"},return_response_type:function(w){return j.arrayDiff(w,["","text","json","document"])?"browser":["client","browser"]},return_status_code:function(w){return j.arrayDiff(w,[200,404])?"browser":["client","browser"]},send_binary_string:function(w){return w?"browser":"client"},send_browser_cookies:function(w){return w?"browser":"client"},send_custom_headers:function(w){return w?"browser":"client"},stream_upload:function(w){return w?"client":"browser"},upload_filesize:function(w){return j.parseSizeStr(w)>=2097152?"client":"browser"}},"client");if(m()<10){if(MXI_DEBUG&&n.debug.runtime){n.log("\tFlash didn't meet minimal version requirement (10).")}this.mode=false}j.extend(this,{getShim:function(){return k.get(this.uid)},shimExec:function(x,y){var w=[].slice.call(arguments,2);return t.getShim().exec(this.uid,x,y,w)},init:function(){var x,y,w;w=this.getShimContainer();j.extend(w.style,{position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"});x='';if(n.browser==="IE"){y=document.createElement("div");w.appendChild(y);y.outerHTML=x;y=w=null}else{w.innerHTML=x}v=setTimeout(function(){if(t&&!t.initialized){t.trigger("Error",new q.RuntimeError(q.RuntimeError.NOT_INIT_ERR));if(MXI_DEBUG&&n.debug.runtime){n.log("\tFlash failed to initialize within a specified period of time (typically 5s).")}}},5000)},destroy:(function(w){return function(){l(t.uid);w.call(t);clearTimeout(v);u=v=w=t=null}}(this.destroy))},p)}i.addConstructor(o,r);return p});h("moxie/runtime/flash/file/FileInput",["moxie/runtime/flash/Runtime","moxie/file/File","moxie/core/utils/Basic"],function(j,i,l){var k={init:function(o){var m=this,n=this.getRuntime();this.bind("Change",function(){var p=n.shimExec.call(m,"FileInput","getFiles");m.files=[];l.each(p,function(q){m.files.push(new i(n.uid,q))})},999);this.getRuntime().shimExec.call(this,"FileInput","init",{name:o.name,accept:o.accept,multiple:o.multiple});this.trigger("ready")}};return(j.FileInput=k)});h("moxie/runtime/flash/file/Blob",["moxie/runtime/flash/Runtime","moxie/file/Blob"],function(j,k){var i={slice:function(n,p,l,o){var m=this.getRuntime();if(p<0){p=Math.max(n.size+p,0)}else{if(p>0){p=Math.min(p,n.size)}}if(l<0){l=Math.max(n.size+l,0)}else{if(l>0){l=Math.min(l,n.size)}}n=m.shimExec.call(this,"Blob","slice",p,l,o||"");if(n){n=new k(m.uid,n)}return n}};return(j.Blob=i)});h("moxie/runtime/flash/file/FileReader",["moxie/runtime/flash/Runtime","moxie/core/utils/Encode"],function(k,i){function j(m,n){switch(n){case"readAsText":return i.atob(m,"utf8");case"readAsBinaryString":return i.atob(m);case"readAsDataURL":return m}return null}var l={read:function(o,n){var m=this;m.result="";if(o==="readAsDataURL"){m.result="data:"+(n.type||"")+";base64,"}m.bind("Progress",function(q,p){if(p){m.result+=j(p,o)}},999);return m.getRuntime().shimExec.call(this,"FileReader","readAsBase64",n.uid)}};return(k.FileReader=l)});h("moxie/runtime/flash/file/FileReaderSync",["moxie/runtime/flash/Runtime","moxie/core/utils/Encode"],function(k,i){function j(m,n){switch(n){case"readAsText":return i.atob(m,"utf8");case"readAsBinaryString":return i.atob(m);case"readAsDataURL":return m}return null}var l={read:function(p,o){var m,n=this.getRuntime();m=n.shimExec.call(this,"FileReaderSync","readAsBase64",o.uid);if(!m){return null}if(p==="readAsDataURL"){m="data:"+(o.type||"")+";base64,"+m}return j(m,p,o.type)}};return(k.FileReaderSync=l)});h("moxie/runtime/flash/xhr/XMLHttpRequest",["moxie/runtime/flash/Runtime","moxie/core/utils/Basic","moxie/file/Blob","moxie/file/File","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/runtime/Transporter"],function(j,m,p,i,o,n,l){var k={send:function(x,s){var u=this,y=u.getRuntime();function r(){x.transport=y.mode;y.shimExec.call(u,"XMLHttpRequest","send",x,s)}function t(A,z){y.shimExec.call(u,"XMLHttpRequest","appendBlob",A,z.uid);s=null;r()}function v(A,z){var B=new l();B.bind("TransportingComplete",function(){z(this.result)});B.transport(A.getSource(),A.type,{ruid:y.uid})}if(!m.isEmptyObj(x.headers)){m.each(x.headers,function(z,A){y.shimExec.call(u,"XMLHttpRequest","setRequestHeader",A,z.toString())})}if(s instanceof n){var w;s.each(function(A,z){if(A instanceof p){w=z}else{y.shimExec.call(u,"XMLHttpRequest","append",z,A)}});if(!s.hasBlob()){s=null;r()}else{var q=s.getBlob();if(q.isDetached()){v(q,function(z){q.destroy();t(w,z)})}else{t(w,q)}}}else{if(s instanceof p){if(s.isDetached()){v(s,function(z){s.destroy();s=z.uid;r()})}else{s=s.uid;r()}}else{r()}}},getResponse:function(t){var q,s,r=this.getRuntime();s=r.shimExec.call(this,"XMLHttpRequest","getResponseAsBlob");if(s){s=new i(r.uid,s);if("blob"===t){return s}try{q=new o();if(!!~m.inArray(t,["","text"])){return q.readAsText(s)}else{if("json"===t&&!!window.JSON){return JSON.parse(q.readAsText(s))}}}finally{s.destroy()}}return null},abort:function(r){var q=this.getRuntime();q.shimExec.call(this,"XMLHttpRequest","abort");this.dispatchEvent("readystatechange");this.dispatchEvent("abort")}};return(j.XMLHttpRequest=k)});h("moxie/runtime/flash/runtime/Transporter",["moxie/runtime/flash/Runtime","moxie/file/Blob"],function(i,k){var j={getAsBlob:function(n){var m=this.getRuntime(),l=m.shimExec.call(this,"Transporter","getAsBlob",n);if(l){return new k(m.uid,l)}return null}};return(i.Transporter=j)});h("moxie/runtime/flash/image/Image",["moxie/runtime/flash/Runtime","moxie/core/utils/Basic","moxie/runtime/Transporter","moxie/file/Blob","moxie/file/FileReaderSync"],function(j,l,k,n,m){var i={loadFromBlob:function(r){var q=this,p=q.getRuntime();function o(t){p.shimExec.call(q,"Image","loadFromBlob",t.uid);q=p=null}if(r.isDetached()){var s=new k();s.bind("TransportingComplete",function(){o(s.result.getSource())});s.transport(r.getSource(),r.type,{ruid:p.uid})}else{o(r.getSource())}},loadFromImage:function(p){var o=this.getRuntime();return o.shimExec.call(this,"Image","loadFromImage",p.uid)},getInfo:function(){var o=this.getRuntime(),p=o.shimExec.call(this,"Image","getInfo");if(p.meta&&p.meta.thumb&&!(p.meta.thumb.data instanceof n)){p.meta.thumb.data=new n(o.uid,p.meta.thumb.data)}return p},getAsBlob:function(q,r){var p=this.getRuntime(),o=p.shimExec.call(this,"Image","getAsBlob",q,r);if(o){return new n(p.uid,o)}return null},getAsDataURL:function(){var q=this.getRuntime(),p=q.Image.getAsBlob.apply(this,arguments),o;if(!p){return null}o=new m();return o.readAsDataURL(p)}};return(j.Image=i)});h("moxie/runtime/silverlight/Runtime",["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/runtime/Runtime"],function(j,m,l,p,i){var n="silverlight",o={};function q(z){var C=false,v=null,r,s,t,B,u,x=0;try{try{v=new ActiveXObject("AgControl.AgControl");if(v.IsVersionSupported(z)){C=true}v=null}catch(y){var w=navigator.plugins["Silverlight Plug-In"];if(w){r=w.description;if(r==="1.0.30226.2"){r="2.0.30226.2"}s=r.split(".");while(s.length>3){s.pop()}while(s.length<4){s.push(0)}t=z.split(".");while(t.length>4){t.pop()}do{B=parseInt(t[x],10);u=parseInt(s[x],10);x++}while(x';t=setTimeout(function(){if(r&&!r.initialized){r.trigger("Error",new p.RuntimeError(p.RuntimeError.NOT_INIT_ERR));if(MXI_DEBUG&&m.debug.runtime){m.log("Silverlight failed to initialize within a specified period of time (5-10s).")}}},m.OS!=="Windows"?10000:5000)},destroy:(function(u){return function(){u.call(r);clearTimeout(t);s=t=u=r=null}}(this.destroy))},o)}i.addConstructor(n,k);return o});h("moxie/runtime/silverlight/file/FileInput",["moxie/runtime/silverlight/Runtime","moxie/file/File","moxie/core/utils/Basic"],function(j,i,l){var k={init:function(p){var m=this,o=this.getRuntime();function n(r){var s="";for(var q=0;q="))||(k.browser==="IE"&&k.verComp(k.version,10,">="))||(k.browser==="Safari"&&k.verComp(k.version,7,">="))}()),resize_image:function(){return m.Image&&p.can("access_binary")&&k.can("create_canvas")},report_upload_progress:false,return_response_headers:false,return_response_type:function(t){if(t==="json"&&!!window.JSON){return true}return !!~o.inArray(t,["text","document",""])},return_status_code:function(t){return !o.arrayDiff(t,[200,404])},select_file:function(){return k.can("use_fileinput")},select_multiple:false,send_binary_string:false,send_custom_headers:false,send_multipart:true,slice_blob:false,stream_upload:function(){return p.can("select_file")},summon_file_dialog:function(){return p.can("select_file")&&((k.browser==="Firefox"&&k.verComp(k.version,4,">="))||(k.browser==="Opera"&&k.verComp(k.version,12,">="))||(k.browser==="IE"&&k.verComp(k.version,10,">="))||!!~o.inArray(k.browser,["Chrome","Safari"]))},upload_filesize:r,use_http_method:function(t){return !o.arrayDiff(t,["GET","POST"])}});o.extend(this,{init:function(){this.trigger("Init")},destroy:(function(t){return function(){t.call(p);t=p=null}}(this.destroy))});o.extend(this.getShim(),m)}l.addConstructor(n,j);return m});h("moxie/runtime/html4/file/FileInput",["moxie/runtime/html4/Runtime","moxie/file/File","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Events","moxie/core/utils/Mime","moxie/core/utils/Env"],function(n,k,p,m,j,l,i){function o(){var s,t=[],q;function r(){var w=this,z=w.getRuntime(),y,x,u,B,v,A;A=p.guid("uid_");y=z.getShimContainer();if(s){u=m.get(s+"_form");if(u){p.extend(u.style,{top:"100%"})}}B=document.createElement("form");B.setAttribute("id",A+"_form");B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");p.extend(B.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"});v=document.createElement("input");v.setAttribute("id",A);v.setAttribute("type","file");v.setAttribute("name",q.name||"Filedata");v.setAttribute("accept",t.join(","));p.extend(v.style,{fontSize:"999px",opacity:0});B.appendChild(v);y.appendChild(B);p.extend(v.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"});if(i.browser==="IE"&&i.verComp(i.version,10,"<")){p.extend(v.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"})}v.onchange=function(){var C;if(!this.value){return}if(this.files){C=this.files[0];if(C.size===0){B.parentNode.removeChild(B);return}}else{C={name:this.value}}C=new k(z.uid,C);this.onchange=function(){};r.call(w);w.files=[C];v.setAttribute("id",C.uid);B.setAttribute("id",C.uid+"_form");w.trigger("change");v=B=null};if(z.can("summon_file_dialog")){x=m.get(q.browse_button);j.removeEvent(x,"click",w.uid);j.addEvent(x,"click",function(C){if(v&&!v.disabled){v.click()}C.preventDefault()},w.uid)}s=A;y=u=x=null}p.extend(this,{init:function(x){var u=this,w=u.getRuntime(),v;q=x;t=x.accept.mimes||l.extList2mimes(x.accept,w.can("filter_by_extension"));v=w.getShimContainer();(function(){var y,A,z;y=m.get(x.browse_button);if(w.can("summon_file_dialog")){if(m.getStyle(y,"position")==="static"){y.style.position="relative"}A=parseInt(m.getStyle(y,"z-index"),10)||1;y.style.zIndex=A;v.style.zIndex=A-1}z=w.can("summon_file_dialog")?y:v;j.addEvent(z,"mouseover",function(){u.trigger("mouseenter")},u.uid);j.addEvent(z,"mouseout",function(){u.trigger("mouseleave")},u.uid);j.addEvent(z,"mousedown",function(){u.trigger("mousedown")},u.uid);j.addEvent(m.get(x.container),"mouseup",function(){u.trigger("mouseup")},u.uid);y=null}());r.call(this);v=null;u.trigger({type:"ready",async:true})},disable:function(v){var u;if((u=m.get(s))){u.disabled=!!v}},destroy:function(){var v=this.getRuntime(),w=v.getShim(),u=v.getShimContainer();j.removeAllEvents(u,this.uid);j.removeAllEvents(q&&m.get(q.container),this.uid);j.removeAllEvents(q&&m.get(q.browse_button),this.uid);if(u){u.innerHTML=""}w.removeInstance(this.uid);s=t=q=u=w=null}})}return(n.FileInput=o)});h("moxie/runtime/html4/file/FileReader",["moxie/runtime/html4/Runtime","moxie/runtime/html5/file/FileReader"],function(i,j){return(i.FileReader=j)});h("moxie/runtime/html4/xhr/XMLHttpRequest",["moxie/runtime/html4/Runtime","moxie/core/utils/Basic","moxie/core/utils/Dom","moxie/core/utils/Url","moxie/core/Exceptions","moxie/core/utils/Events","moxie/file/Blob","moxie/xhr/FormData"],function(m,j,l,i,n,p,k,q){function o(){var t,r,u;function s(v){var A=this,y,z,w,x,B=false;if(!u){return}y=u.id.replace(/_iframe$/,"");z=l.get(y+"_form");if(z){w=z.getElementsByTagName("input");x=w.length;while(x--){switch(w[x].getAttribute("type")){case"hidden":w[x].parentNode.removeChild(w[x]);break;case"file":B=true;break}}w=[];if(!B){z.parentNode.removeChild(z)}z=null}setTimeout(function(){p.removeEvent(u,"load",A.uid);if(u.parentNode){u.parentNode.removeChild(u)}var C=A.getRuntime().getShimContainer();if(!C.children.length){C.parentNode.removeChild(C)}C=u=null;v()},1)}j.extend(this,{send:function(D,x){var z=this,C=z.getRuntime(),y,w,B,v;t=r=null;function A(){var E=C.getShimContainer()||document.body,F=document.createElement("div");F.innerHTML='';u=F.firstChild;E.appendChild(u);p.addEvent(u,"load",function(){var H;try{H=u.contentWindow.document||u.contentDocument||window.frames[u.id].document;if(/^4(0[0-9]|1[0-7]|2[2346])\s/.test(H.title)){t=H.title.replace(/^(\d+).*$/,"$1")}else{t=200;r=j.trim(H.body.innerHTML);z.trigger({type:"progress",loaded:r.length,total:r.length});if(v){z.trigger({type:"uploadprogress",loaded:v.size||1025,total:v.size||1025})}}}catch(G){if(i.hasSameOrigin(D.url)){t=404}else{s.call(z,function(){z.trigger("error")});return}}s.call(z,function(){z.trigger("load")})},z.uid)}if(x instanceof q&&x.hasBlob()){v=x.getBlob();y=v.uid;B=l.get(y);w=l.get(y+"_form");if(!w){throw new n.DOMException(n.DOMException.NOT_FOUND_ERR)}}else{y=j.guid("uid_");w=document.createElement("form");w.setAttribute("id",y+"_form");w.setAttribute("method",D.method);w.setAttribute("enctype","multipart/form-data");w.setAttribute("encoding","multipart/form-data");C.getShimContainer().appendChild(w)}w.setAttribute("target",y+"_iframe");if(x instanceof q){x.each(function(G,E){if(G instanceof k){if(B){B.setAttribute("name",E)}}else{var F=document.createElement("input");j.extend(F,{type:"hidden",name:E,value:G});if(B){w.insertBefore(F,B)}else{w.appendChild(F)}}})}w.setAttribute("action",D.url);A();w.submit();z.trigger("loadstart")},getStatus:function(){return t},getResponse:function(v){if("json"===v){if(j.typeOf(r)==="string"&&!!window.JSON){try{return JSON.parse(r.replace(/^\s*]*>/,"").replace(/<\/pre>\s*$/,""))}catch(w){return null}}}else{if("document"===v){}}return r},abort:function(){var v=this;if(u&&u.contentWindow){if(u.contentWindow.stop){u.contentWindow.stop()}else{if(u.contentWindow.document.execCommand){u.contentWindow.document.execCommand("Stop")}else{u.src="about:blank"}}}s.call(this,function(){v.dispatchEvent("abort")})}})}return(m.XMLHttpRequest=o)});h("moxie/runtime/html4/image/Image",["moxie/runtime/html4/Runtime","moxie/runtime/html5/image/Image"],function(j,i){return(j.Image=i)});a(["moxie/core/utils/Basic","moxie/core/utils/Env","moxie/core/I18n","moxie/core/utils/Mime","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/FileInput","moxie/core/utils/Encode","moxie/file/Blob","moxie/file/File","moxie/file/FileDrop","moxie/file/FileReader","moxie/core/utils/Url","moxie/runtime/RuntimeTarget","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/runtime/Transporter","moxie/image/Image","moxie/core/utils/Events"])})(this);(function(a){var d={},c=a.moxie.core.utils.Basic.inArray;(function b(f){var e,g;for(e in f){g=typeof(f[e]);if(g==="object"&&!~c(e,["Exceptions","Env","Mime"])){b(f[e])}else{if(g==="function"){d[e]=f[e]}}}})(a.moxie);d.Env=a.moxie.core.utils.Env;d.Mime=a.moxie.core.utils.Mime;d.Exceptions=a.moxie.core.Exceptions;a.mOxie=d;if(!a.o){a.o=d}return d})(this);