//>>built
define("mill/jssupport/app","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/when dojo/io-query dojo/string dojo/dom-construct dojo/dom-class dojo/dom-style dojo/store/Memory dojo/sniff dijit/form/_FormWidget dijit/form/CheckBox dijit/form/SimpleTextarea dijit/form/ValidationTextBox dijit/form/FilteringSelect dijit/form/NumberTextBox dijit/registry dijit/Editor dijit/Tooltip mill/jssupport/jsApplication/controlSet/ControlSet mill/jssupport/jsApplication/controlSet/ControlSetContainer mill/jssupport/jsApplication/controlSet/ControlSetGroup mill/jssupport/jsApplication/controls/controlField/ControlField mill/jssupport/jsApplication/controls/fileEditor/FileEditor mill/jssupport/jsApplication/controls/radioButton/RadioButton mill/jssupport/jsApplication/controls/dateTextBoxControl/DateTextBoxControl mill/jssupport/jsApplication/controls/editorControl/EditorControl mill/jssupport/jsApplication/controls/buttonControl/ButtonControl mill/jssupport/jsApplication/controls/textFieldCounter/TextFieldCounter mill/jssupport/jsApplication/controls/treeSelect/TreeSelectWidget mill/jssupport/form/PhoneWidget mill/jssupport/TranslatableNode mill/jssupport/Announcement mill/jssupport/base mill/mill mill/jssupport/layout/LayoutContainer mill/jssupport/layout/GridLayout mill/jssupport/layout/GridLayoutColumn mill/jssupport/layout/layoutContent/ExternalContent mill/jssupport/layout/layoutContent/InternalContent mill/jssupport/layout/layoutContent/LogoHeader mill/jssupport/layout/layoutContent/RemoteUserPane mill/jssupport/layout/layoutContent/AuthorizationForm mill/jssupport/layout/layoutContent/ReportToModeratorForm mill/jssupport/layout/layoutContent/PersonInfoPane mill/jssupport/layout/layoutContent/RestorePasswordForm mill/jssupport/layout/layoutContent/ReportToModeratorInternalForm mill/jssupport/layout/carouselView/CarouselView mill/jssupport/layout/layoutMenu/LayoutMenu mill/jssupport/layout/layoutMenu/MobileMenu mill/jssupport/form/TextField mill/jssupport/form/TextAreaField mill/jssupport/form/FilteringSelectField mill/jssupport/form/CheckBoxField mill/jssupport/form/FileAttachmentField mill/jssupport/form/Attachment".split(" "),
function(K,h,l,L,M,N,V,n,q,p,O,P,w,x,Q,D,R,S,y,E,W,F,X,G,T,z,U,Y,Z,aa,ba,A,H,I,ca,C,r){window.app||(window.app={});h.extend(I,{fullWidth:null,_setFullWidthAttr:function(a){this.fullWidth=a;(a=window.app.getControlField(this))&&a.set("fullWidth",this.fullWidth)}});h.extend(x,{fullWidth:null,_setFullWidthAttr:function(a){this.fullWidth=a;(a=window.app.getControlField(this))&&a.set("fullWidth",this.fullWidth);a.titleWidget.placeAt(a.containerNode)}});h.extend(D,{fullWidth:null,_setFullWidthAttr:function(a){this.fullWidth=
a;(a=window.app.getControlField(this))&&a.set("fullWidth",this.fullWidth)}});h.extend(Q,{fullWidth:null,_setFullWidthAttr:function(a){this.fullWidth=a;(a=window.app.getControlField(this))&&a.set("fullWidth",this.fullWidth)}});h.extend(A,{fullWidth:null,_setFullWidthAttr:function(a){this.fullWidth=a;(a=window.app.getControlField(this))&&a.set("fullWidth",this.fullWidth)}});h.extend(dijit._MasterTooltip,{orientTimer:null,prevCoords:null,checkPosition:function(a){if(this.aroundNode){if(a!==this.aroundNode&&
(this.prevCoords=null),this.prevCoords||(this.prevCoords=dojo.coords(this.aroundNode,!0)),a=dojo.coords(this.aroundNode,!0),a.y!==this.prevCoords.y||a.x!==this.prevCoords.x)this.prevCoords=null,this.orientTimer&&clearInterval(this.orientTimer),this.hide(this.aroundNode)}else this.prevCoords=null,this.orientTimer&&clearInterval(this.orientTimer)},_onShow:function(){P("ie")&&(this.domNode.style.filter="");this.prevCoords=null;this.orientTimer&&clearInterval(this.orientTimer);this.checkPosition(this.aroundNode);
this.orientTimer=setInterval(function(){this.checkPosition(this.aroundNode)}.bind(this),100)},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null);this.prevCoords=null;this.orientTimer&&clearInterval(this.orientTimer)}});return window.app=h.mixin(window.app,{queryString:N.queryToObject(document.location.search.substring(1)),appID:null,handler:null,registerHandler:null,registrationClass:null,accessCategory:null,
controlSets:null,translationPrefix:null,_preventSelfInvoking:!1,_parentWidgetByClass:function(){return function(a,b){for(var d=a.getParent();!d.isInstanceOf(b)&&d.getParent();)d=d.getParent();return d.isInstanceOf(b)?d:null}}(),_nestedWidgetByClass:function(){return function(a,b){return l.filter(a.getChildren(),function(d){return d&&d.isInstanceOf&&d.isInstanceOf(b)})}}(),anonymousDataByIdent:function(){},handlerDataByIdent:function(){},signin:function(){},getLayoutActionTitleIdent:function(){},queryEngine:function(a){return function(b,
d){function c(f){f=l.filter(f,b);a.filter&&(f=l.filter(f,a.filter));var k=d&&d.sort;k&&f.sort("function"===typeof k?k:function(m,t){for(var B,J=0;B=k[J];J+=1){var u=m[B.attribute],v=t[B.attribute];u=null!==u?u.valueOf():u;v=null!==v?v.valueOf():v;if(u!==v)return B.descending===(null===u||u>v)?-1:1}return 0});if(d&&(d.start||d.count)){var g=f.length;f=f.slice(d.start||0,(d.start||0)+(d.count||Infinity));f.total=g}return f}if("object"===typeof b||"undefined"===typeof b){var e=b;b=function(f){for(var k in e)if(e.hasOwnProperty(k)){var g=
e[k];if(g&&g.test&&f[k]){if(!g.test(f[k],f))return!1}else if(g!==f[k])return!1}return!0}}else if("string"===typeof b){if(!this[b])throw Error("No filter function "+b+" was found in store");b=this[b]}else if("function"!==typeof b)throw Error("Can not query with a "+typeof b);c.matches=b;return c}},createStore:function(a){var b=a.data||[];if(a.hasOwnProperty("propTypes")){var d=a.propTypes;h.isArray(d)||(d=[d]);l.forEach(b,function(c){l.forEach(d,function(e){if(c.hasOwnProperty(e.property))switch(e.as){case "number":c[e.property]=
parseInt(c[e.property],10);break;case "string":c[e.property]=c[e.property].toString()}})})}return new O(K(null,{data:b,idProperty:a.idProperty||"ID",queryEngine:this.queryEngine(a)})())},isDeferred:function(a){return null!==a&&h.isObject(a)&&a.hasOwnProperty("promise")&&h.isFunction(a.then)},multipleWidgetById:function(){return function(a){return y.toArray().filter(function(b){return(new RegExp("^"+a+"_\\d+$")).test(b.id)})}}(),getControl:function(a,b){var d="string"===typeof Array.prototype.slice.call(arguments)[1]?
Array.prototype.slice.call(arguments)[1]:"";h.isArray(a)||(a=[a]);var c=l.map(a,function(f){f=y.byId(f)||y.byId(f+d);void 0===f&&window.undefined;return f}),e=0<l.filter(c,function(f){return void 0===f}).length;d&&(b=Array.prototype.slice.call(arguments)[2]);if(!e&&h.isFunction(b))return b.apply(this,c)},getControlWidget:function(){return this.getControl.apply(this,Array.prototype.slice.call(arguments).concat([function(a){return a}]))||null},getControlWidgets:function(a){if(!a)return[];h.isArray(a)||
(a=[a]);return a.map(function(b,d){return b(d,function(c){return c})}.bind(null,this.getControl.bind(this))).filter(function(b){return!!b})},getControlField:function(){return function(a,b){"string"===typeof a&&(a=this.getControl(a,function(d){return d}));return this._parentWidgetByClass(a,b||T)}}(),getControlParentControlSet:function(){return function(a){return this._parentWidgetByClass(a,F)}}(),getControlParentControlSetGroup:function(a){return this._parentWidgetByClass(a,G)},getControlRootControlSet:function(a){for(a=
this.getControlParentControlSetGroup(a);a&&this.getControlParentControlSetGroup(a);)a=this.getControlParentControlSetGroup(a);return a},getControlNestedControlSet:function(a){return this._nestedWidgetByClass(a,F)},getControlNestedControlSetGroup:function(a,b){b?h.isArray(b)||(b=[b]):b=[];return l.filter(this._nestedWidgetByClass(a,G),function(d){return 0>l.indexOf(b,d)})},getControlContentHeader:function(){return function(a){a=this.getControlField(a);if(!a)return null;for(a=a.domNode.previousSibling;a&&
!q.contains(a,"officeFormContentHeader");)a=a.previousSibling;return q.contains(a,"officeFormContentHeader")?a:null}}(),setControlValue:function(){return function(a,b,d){if(h.isArray(a))l.forEach(a,function(f){this.setControlValue(f,b,d)},this);else if("string"===typeof a&&(a=this.getControl(a,function(f){return f})),void 0===b&&(b=a.isInstanceOf(dijit.form.CheckBox)?!1:""),r._isInternalDateObject(b)&&(b=r.formatDate(b)),a&&a.isInstanceOf(dijit.form.DateTextBox)&&""===b&&(b=null),null!==a&&h.isObject(a))if(void 0!==
d&&"string"===typeof d)a.set(d,b);else if(a.isInstanceOf(H)||a.isInstanceOf(A)||a.isInstanceOf(U)||null===a.store||!h.isObject(a.store))a.isInstanceOf(x)?a.set("checked",!!b):a.isInstanceOf(E)?a.onLoadDeferred.then(function(){null===b&&(b="");try{a.set("value",b)}catch(f){window.undefined}}):a.set("value",b);else{var c={};c[a.store.idProperty]=b;var e=a.store.query(c)[0];e||(c[a.store.idProperty]=parseInt(b,10),e=a.store.query(c)[0]);a.set("item",e||"")}}}(),setBundleValue:function(){return function(a,
b){h.isArray(a)||(a=[a]);l.forEach(a,function(d){if(h.isObject(d)){var c=null,e=null;if(h.isFunction(d.isInstanceOf)&&d.isInstanceOf(w))c=r.fieldValue(b,d.id),"[object Date]"===Object.prototype.toString.call(c)&&(c=b[d.id]),d.isInstanceOf(z)?(e={},e[d.id]={value:r.fieldValue(b,d.id+"Reference"),property:"fileReference"},this.setControlValue(d,c),this.setBundleValue(e)):(r._isInternalDateObject(c)&&(c=r.formatDate(c)),this.setControlValue(d,c,null));else for(var f in d)if(d.hasOwnProperty(f)){var k=
d[f];null!==k&&h.isObject(k)&&k.hasOwnProperty("value")?(c=k.value,k.hasOwnProperty("property")&&(e=k.property)):c=k;(k=y.byId(f))?this.setControlValue(k,c,e):window.undefined}}},this)}}(),validateWidgets:function(a,b){"boolean"!==typeof b&&(b=!1);h.isArray(a)||(a=[a]);var d=!1,c=!1;l.forEach(a,function(g){if(g){g._hasBeenBlurred=b;var m=!h.isFunction(g.validate)||g.validate();g.isInstanceOf(x)&&!0===g.get("required")&&(m=g.get("checked"));if(m||g._hasBeenBlurred){var t=this.getControlField(g);t&&
(p.set(t.domNode,{border:m?"none":"solid #d64646 1px"}),q[m?"remove":"add"](t.domNode,"isInvalid"))}m||d||(b&&(dijit.scrollIntoView(g.containerNode||g.domNode),g.focus()),d=!0)}else c||(window.undefined,c=!0)},this);var e=a[0];if(e&&(!d||b)&&(e=this.getControlParentControlSetGroup(e))&&e.hasOwnProperty("contentFormWrapper")){q[d?"add":"remove"](e.contentFormWrapper,"officeFormContentFormWrapperInvalid");var f=app.getControlRootControlSet(e),k=null;if(f&&(k=app.getControlParentControlSetGroup(f))&&
k.hasOwnProperty("contentFormWrapper"))q[d?"add":"remove"](k.contentFormWrapper,"officeFormContentFormWrapperInvalid");e.breadcrumbs&&e.breadcrumbs.initItemsState();f&&f.breadcrumbs&&f.breadcrumbs.initItemsState()}return!d},hideForValue:function(a,b,d){h.isArray(a)||(a=[a]);l.forEach(a,function(c){if(c.isInstanceOf(A))c.set("disabled",!0);else{var e=null,f=null;if(c.isInstanceOf(E))f=new L,c.onLoadDeferred.then(function(){e=c.get("value");f.resolve()});else if(c.isInstanceOf(w))e=c.get("displayedValue")||
c.get("value");else return;M(f,function(){c.isInstanceOf(dijit.form.CheckBox)&&(e=c.get("checked"));var k=c.domNode.parentNode;p.set(c.domNode,{display:"none"});var g=this.getControlField(c);g&&g.hintTextWidget&&g.hintTextWidget.domNode&&p.set(g.hintTextWidget.domNode,{display:"none"});k=n.create("span",null,k,"first");c.isInstanceOf(z)?(h.isArray(b)&&(g=l.filter(b,function(m){return("string"===typeof m.widget?this.getControl(m.widget,function(t){return t}):m.widget)===c},this)[0],null!==g&&h.isObject(g)&&
(c.set("value",g.value),c.set("fileReference",g.fileReference),h.mixin(c,{savedValue:g.value}))),c._hasFileReference()&&(g=c._getURI(),g=n.create("a",{href:g,target:"_blank",style:{textDecoration:"none"}},k),n.create("span",{className:"icon-set-attachment"},g),!1!==d&&I({className:"green padding-0-05em",display:"inline-block",text:"Office.Uploaded"},n.create("span",null,k)))):("string"===typeof e&&e?k.innerHTML=e:!e&&"acMagAbiturient"===r.session.getRemoteUserAccessCategory()&&(c.isInstanceOf(D)||
c.isInstanceOf(R)||c.isInstanceOf(S)||c.isInstanceOf(H))?k.innerHTML=C.getLocalization("Office.NoFieldData")?C.getLocalization("Office.NoFieldData"):"":"boolean"===typeof e&&(g=n.create("span",{innerHTML:"\x26nbsp;"},k),p.set(g,{display:"inline-block",width:"1.25em",margin:"0 .25em",backgroundImage:"url('"+dojo.moduleUrl("mill",e?"jssupport/theme/checkbox-checked.svg":"jssupport/theme/checkbox-unchecked.svg")+"')",backgroundPosition:"50%",backgroundSize:"1.25em",backgroundRepeat:"no-repeat"})),h.mixin(c,
{savedValue:"boolean"===typeof e?c.get("checked"):c.get("value")}));c.hasOwnProperty("savedValueNode")&&c.savedValueNode&&(n.destroy(c.savedValueNode),c.savedValueNode=null);h.mixin(c,{savedValueNode:k});c.hasOwnProperty("charactersRemainingWidget")&&null!==c.charactersRemainingWidget&&h.isObject(c.charactersRemainingWidget)&&c.charactersRemainingWidget.domNode&&p.set(c.charactersRemainingWidget.domNode,{display:"none"})}.bind(this))}},this)},unhideForValue:function(a){h.isArray(a)||(a=[a]);l.forEach(a,
function(b){if(b.isInstanceOf(A))b.set("disabled",!1);else if(b.isInstanceOf(w)){b.hasOwnProperty("savedValueNode")&&b.savedValueNode&&(n.destroy(b.savedValueNode),b.savedValueNode=null);p.set(b.domNode,{display:b.isInstanceOf(z)||b.isInstanceOf(x)?"inline-block":"block"});var d=this.getControlField(b);d&&d.hintTextWidget&&d.hintTextWidget.domNode&&p.set(d.hintTextWidget.domNode,{display:"block"});b.isInstanceOf(z)&&b.reset();b.hasOwnProperty("charactersRemainingWidget")&&null!==b.charactersRemainingWidget&&
h.isObject(b.charactersRemainingWidget)&&b.charactersRemainingWidget.domNode&&p.set(b.charactersRemainingWidget.domNode,{display:"block"})}},this)},hideControlForNode:function(){return function(a,b){if(a)if("string"===typeof a&&(a=this.getControl(a,function(c){return c})),h.isObject(a)&&null!==a){var d=this.getControlField(a);d&&(a=d);if(a&&a.hasOwnProperty("domNode"))q[!0===!!b?"add":"remove"](a.domNode,"hide-on-all")}else if(void 0!==a)q[!0===!!b?"add":"remove"](a,"hide-on-all")}}(),cancelChange:function(){return function(a){h.isArray(a)||
(a=[a]);l.forEach(a,function(b){if(b.isInstanceOf(w)){var d="";b.hasOwnProperty("savedValue")&&(d=b.savedValue);this.setControlValue(b,d)}},this);this.hideForValue(a)}}(),preventSelfInvoking:function(a){if(h.isFunction(a)){if("acForeignStudent"===window.app.accessCategory)return a.call();if(!1===window.app._preventSelfInvoking){window.app._preventSelfInvoking=!0;try{return a.call()}catch(b){window.undefined}finally{window.app._preventSelfInvoking=!1}}}},uniqArrayValues:function(){return function(a,
b){var d=[],c=[];l.forEach(a,function(e){var f=b(e);f&&0>d.indexOf(f)&&(d.push(f),c.push(e))});return c}}(),initEditorControl:function(){return function(a,b,d){a&&h.isObject(a)&&(a.set("_getValueAttr",function(){var c=a.getValue(!0);return this.clearTextValue(c)}.bind(this)),b.set("onClick",function(){a.onChange()}),a.set("onKeyDown",function(){a.onDisplayChanged();this.disabledSaveButton(b,!1,d);b.get("saveIntervalId")||b.set("saveIntervalId",setInterval(function(){b.onClick.call()},5E3))}.bind(this)))}}(),
disabledSaveButton:function(a,b,d){a&&h.isObject(a)&&"boolean"===typeof b&&(this.setControlValue(a,b,"disabled"),this.setControlValue(a,this.getTranslation(b?"ButtonLabelDataSaved":d),"label"),b&&a.get("saveIntervalId")&&(clearInterval(a.get("saveIntervalId")),a.set("saveIntervalId",null)))},getItemFromDataById:function(){return function(a,b,d){if(null!==a&&h.isObject(a))return a.hasOwnProperty(d)?l.filter(a[d],function(c){return String(c.ID)===String(b)})[0]:null}}(),controlOnChangeScriptHandler:function(a,
b,d,c){try{if(h.isObject(c)&&null!==c?(c.hasOwnProperty("controlNames")||(c.controlNames=[]),0<=l.indexOf(c.controlNames,b)?window.undefined:c.controlNames.push(b)):c={},!c.changedControl){var e=this.getControl(b,function(f){return f});null!==e&&a===e&&(d.apply(this,[e]),c.changedControl=e)}}catch(f){window.undefined}},clearTextValue:function(a){function b(g){g&&8===g.nodeType?n.destroy(g):g&&g.childNodes&&dojo.forEach(g.childNodes,function(m){b(m)})}var d=document.createElement("div");d.innerHTML=
a;b(d);a=dojo.query("*",d);for(var c=a.length-1;0<=c;--c){var e=a[c];0>dojo.indexOf("B I U STRIKE STRONG BR UL OL LI P DIV SPAN A".split(" "),e.nodeName)&&(dojo.forEach(e.childNodes,function(g){g&&e.parentNode.insertBefore(g,e)}),e.parentNode.removeChild(e));for(var f=e.attributes,k=f.length-1;0<=k;--k)"target"!==f[k].name&&"href"!==f[k].name&&e.removeAttributeNode(f[k])}return d.innerHTML},combinedTranslationIdent:function(){},getTranslation:function(a){return C.getLocalization(this.combinedTranslationIdent(a))}})});