12345678910111213141516 |
- define("ojtranslations/nls/localeElements",{root:{supplemental:{weekData:{firstDay:{"001":1,AE:6,BH:6,BR:0,DZ:6,EG:6,IQ:6,JO:6,KW:6,LB:1,LY:6,MA:6,OM:6,QA:6,SA:0,SD:6,SY:6,TN:0,YE:0,BY:1,BG:1,ES:1,CZ:1,DK:1,AT:1,CH:1,DE:1,LU:1,CY:1,GR:1,AU:0,CA:0,GB:1,IE:0,IN:0,MT:0,NZ:0,PH:0,SG:0,US:0,ZA:0,AR:0,CL:1,CO:0,CR:1,DO:0,EC:1,GT:0,HN:0,MX:0,NI:0,PA:0,PE:0,PR:0,PY:0,SV:0,UY:1,VE:0,EE:1,FI:1,BE:1,FR:1,IL:0,HR:1,HU:1,ID:0,IS:1,IT:1,JP:0,KR:0,LT:1,LV:1,MK:1,MY:1,NO:1,NL:1,PL:1,PT:1,RO:1,RU:1,SK:1,SI:1,AL:1,BA:1,ME:1,RS:1,SE:1,TH:0,TR:1,UA:1,VN:1,CN:0,HK:0,MO:0,TW:0},weekendStart:{"001":6,AE:5,BH:5,DZ:5,EG:5,IQ:5,JO:5,KW:5,LY:5,MA:5,OM:5,QA:5,SA:5,SD:5,SY:5,TN:5,YE:5,IN:0,IL:5},weekendEnd:{"001":0,AE:6,BH:6,DZ:6,EG:6,IQ:6,JO:6,KW:6,LY:6,MA:6,OM:6,QA:6,SA:6,SD:6,SY:6,TN:6,YE:6,IL:6}},prefferedHours:{"001":"H",AE:"h",BH:"h",DZ:"h",EG:"h",IQ:"h",JO:"h",KW:"h",LB:"h",LY:"h",MA:"H",OM:"h",QA:"h",SA:"h",SD:"h",SY:"h",TN:"h",YE:"h",BG:"H",ES:"H",CZ:"H",DK:"H",AT:"H",CH:"H",DE:"H",LU:"H",CY:"h",GR:"h",AU:"h",CA:"h",GB:"H",IE:"H",IN:"h",NZ:"h",PH:"h",SG:"h",US:"h",ZA:"h",AR:"H",BO:"H",CL:"H",CO:"h",CR:"H",CU:"H",DO:"h",EC:"H",GT:"H",HN:"H",MX:"H",NI:"H",PA:"h",PE:"H",PR:"h",SV:"H",UY:"H",VE:"h",EE:"H",FI:"H",BE:"H",FR:"H",IL:"H",HR:"H",ID:"H",IS:"H",IT:"H",JP:"H",KR:"h",LT:"H",LV:"H",MK:"H",MY:"h",NL:"H",PT:"H",RO:"H",RU:"H",SK:"H",SI:"H",AL:"h",BA:"H",ME:"H",RS:"H",SE:"H",TR:"H",UA:"H",CN:"h",HK:"h",MO:"h",TW:"h"},plurals:{ar:function(e){return 0===e?"zero":1===e?"one":2===e?"two":e%100===Math.floor(e%100)&&e%100>=3&&e%100<=10?"few":e%100===Math.floor(e%100)&&e%100>=11&&e%100<=99?"many":"other"},as:function(e){return 0===Math.floor(Math.abs(e))||1===e?"one":"other"},be:function(e){return e%10==1&&e%100!=11?"one":e%10===Math.floor(e%10)&&e%10>=2&&e%10<=4&&!(e%100>=12&&e%100<=14)?"few":e%10==0||e%10===Math.floor(e%10)&&e%10>=5&&e%10<=9||e%100===Math.floor(e%100)&&e%100>=11&&e%100<=14?"many":"other"},bg:function(e){return 1===e?"one":"other"},bn:function(e){return 0===Math.floor(Math.abs(e))||1===e?"one":"other"},bo:function(e){return"other"},brx:function(e){return 1===e?"one":"other"},ca:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},cs:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":t===Math.floor(t)&&t>=2&&t<=4&&0===n?"few":0!==n?"many":"other"},da:function(e){var t=Math.floor(Math.abs(e)),n=parseInt(e.toString().replace(/^[^.]*.?|0+$/g,""),10);return 1===e||0!==n&&(0===t||1===t)?"one":"other"},de:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},el:function(e){return 1===e?"one":"other"},en:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},es:function(e){return 1===e?"one":"other"},et:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},fi:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},fr:function(e){var t=Math.floor(Math.abs(e));return 0===t||1===t?"one":"other"},ga:function(e){return 1===e?"one":2===e?"two":e===Math.floor(e)&&e>=3&&e<=6?"few":e===Math.floor(e)&&e>=7&&e<=10?"many":"other"},gu:function(e){return 0===Math.floor(Math.abs(e))||1===e?"one":"other"},he:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":2===t&&0===n?"two":0!==n||e>=0&&e<=10||e%10!=0?"other":"many"},hi:function(e){return 0===Math.floor(Math.abs(e))||1===e?"one":"other"},hr:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length,i=parseInt(e.toString().replace(/^[^.]*.?/,""),10);return 0===n&&t%10==1&&(t%100!=11||i%10==1&&i%100!=11)?"one":0===n&&t%10===Math.floor(t%10)&&t%10>=2&&t%10<=4&&(!(t%100>=12&&t%100<=14)||i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))?"few":"other"},hu:function(e){return 1===e?"one":"other"},id:function(e){return"other"},is:function(e){var t=Math.floor(Math.abs(e)),n=parseInt(e.toString().replace(/^[^.]*.?|0+$/g,""),10);return 0!==n||t%10!=1||t%100==11&&0===n?"other":"one"},it:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},ja:function(e){return"other"},kn:function(e){return 0===Math.floor(Math.abs(e))||1===e?"one":"other"},ko:function(e){return"other"},kok:function(e){return"other"},ks:function(e){return 1===e?"one":"other"},lt:function(e){var t=parseInt(e.toString().replace(/^[^.]*.?/,""),10);return e%10!=1||e%100>=11&&e%100<=19?e%10===Math.floor(e%10)&&e%10>=2&&e%10<=9&&!(e%100>=11&&e%100<=19)?"few":0!==t?"many":"other":"one"},lv:function(e){var t=e.toString().replace(/^[^.]*.?/,"").length,n=parseInt(e.toString().replace(/^[^.]*.?/,""),10);return e%10==0||e%100===Math.floor(e%100)&&e%100>=11&&e%100<=19||2===t&&n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19?"zero":e%10==1&&(e%100!=11||2===t&&n%10==1&&(n%100!=11||2!==t&&n%10==1))?"one":"other"},mk:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length,i=parseInt(e.toString().replace(/^[^.]*.?/,""),10);return 0!==n||t%10!=1&&i%10!=1?"other":"one"},ml:function(e){return 1===e?"one":"other"},mr:function(e){return 0===Math.floor(Math.abs(e))||1===e?"one":"other"},ms:function(e){return"other"},mt:function(e){return 1===e?"one":0===e||e%100===Math.floor(e%100)&&e%100>=2&&e%100<=10?"few":e%100===Math.floor(e%100)&&e%100>=11&&e%100<=19?"many":"other"},nb:function(e){return 1===e?"one":"other"},ne:function(e){return 1===e?"one":"other"},nl:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},nn:function(e){return 1===e?"one":"other"},no:function(e){return 1===e?"one":"other"},or:function(e){return 1===e?"one":"other"},pa:function(e){return e===Math.floor(e)&&e>=0&&e<=1?"one":"other"},pl:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":0===n&&t%10===Math.floor(t%10)&&t%10>=2&&t%10<=4&&!(t%100>=12&&t%100<=14)?"few":0===n&&1!==t&&(t%10===Math.floor(t%10)&&t%10>=0&&t%10<=1||0===n&&(t%10===Math.floor(t%10)&&t%10>=5&&t%10<=9||0===n&&t%100===Math.floor(t%100)&&t%100>=12&&t%100<=14))?"many":"other"},pt:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length,i=parseInt(e.toString().replace(/^[^.]*.?|0+$/g,""),10);return 1===t&&(0===n||0===t&&1===i)?"one":"other"},"pt-PT":function(e){var t=e.toString().replace(/^[^.]*.?/,"").length;return 1===e&&0===t?"one":"other"},ro:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":0!==n||0===e||1!==e&&e%100===Math.floor(e%100)&&e%100>=1&&e%100<=19?"few":"other"},ru:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 0===n&&t%10==1&&t%100!=11?"one":0===n&&t%10===Math.floor(t%10)&&t%10>=2&&t%10<=4&&!(t%100>=12&&t%100<=14)?"few":0===n&&(t%10==0||0===n&&(t%10===Math.floor(t%10)&&t%10>=5&&t%10<=9||0===n&&t%100===Math.floor(t%100)&&t%100>=11&&t%100<=14))?"many":"other"},sk:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":t===Math.floor(t)&&t>=2&&t<=4&&0===n?"few":0!==n?"many":"other"},sl:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 0===n&&t%100==1?"one":0===n&&t%100==2?"two":0===n&&(t%100===Math.floor(t%100)&&t%100>=3&&t%100<=4||0!==n)?"few":"other"},sq:function(e){return 1===e?"one":"other"},sr:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length,i=parseInt(e.toString().replace(/^[^.]*.?/,""),10);return 0===n&&t%10==1&&(t%100!=11||i%10==1&&i%100!=11)?"one":0===n&&t%10===Math.floor(t%10)&&t%10>=2&&t%10<=4&&(!(t%100>=12&&t%100<=14)||i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))?"few":"other"},sv:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},ta:function(e){return 1===e?"one":"other"},te:function(e){return 1===e?"one":"other"},th:function(e){return"other"},tr:function(e){return 1===e?"one":"other"},uk:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 0===n&&t%10==1&&t%100!=11?"one":0===n&&t%10===Math.floor(t%10)&&t%10>=2&&t%10<=4&&!(t%100>=12&&t%100<=14)?"few":0===n&&(t%10==0||0===n&&(t%10===Math.floor(t%10)&&t%10>=5&&t%10<=9||0===n&&t%100===Math.floor(t%100)&&t%100>=11&&t%100<=14))?"many":"other"},ur:function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*.?/,"").length;return 1===t&&0===n?"one":"other"},vi:function(e){return"other"},zh:function(e){return"other"}},currencyData:{fractions:{IDR:{_rounding:"0",_digits:"0"},JPY:{_rounding:"0",_digits:"0"},KRW:{_rounding:"0",_digits:"0"}}}}},ar:1,"ar-AE":1,"ar-BH":1,"ar-DZ":1,"ar-EG":1,"ar-IQ":1,"ar-JO":1,"ar-KW":1,"ar-LB":1,"ar-LY":1,"ar-MA":1,"ar-OM":1,"ar-QA":1,"ar-SA":1,"ar-SD":1,"ar-SY":1,"ar-TN":1,"ar-YE":1,as:1,be:1,"be-BY":1,bg:1,"bg-BG":1,bn:1,bo:1,"bo-IN":1,brx:1,ca:1,"ca-ES":1,cs:1,"cs-CZ":1,da:1,"da-DK":1,de:1,"de-AT":1,"de-CH":1,"de-DE":1,"de-LU":1,el:1,"el-CY":1,"el-GR":1,en:1,"en-AU":1,"en-CA":1,"en-GB":1,"en-IE":1,"en-IN":1,"en-MT":1,"en-NZ":1,"en-PH":1,"en-SG":1,"en-US":1,"en-ZA":1,es:1,"es-AR":1,"es-BO":1,"es-CL":1,"es-CO":1,"es-CR":1,"es-CU":1,"es-DO":1,"es-EC":1,"es-ES":1,"es-GT":1,"es-HN":1,"es-MX":1,"es-NI":1,"es-PA":1,"es-PE":1,"es-PR":1,"es-PY":1,"es-SV":1,"es-US":1,"es-UY":1,"es-VE":1,et:1,"et-EE":1,fi:1,"fi-FI":1,fr:1,"fr-BE":1,"fr-CA":1,"fr-CH":1,"fr-FR":1,"fr-LU":1,ga:1,"ga-IE":1,gu:1,he:1,"he-IL":1,hi:1,"hi-IN":1,hr:1,"hr-HR":1,hu:1,"hu-HU":1,id:1,"id-ID":1,is:1,"is-IS":1,it:1,"it-CH":1,"it-IT":1,ja:1,"ja-JP":1,kn:1,ko:1,"ko-KR":1,kok:1,ks:1,lt:1,"lt-LT":1,lv:1,"lv-LV":1,mk:1,"mk-MK":1,ml:1,mr:1,ms:1,"ms-MY":1,mt:1,"mt-MT":1,nb:1,"nb-NO":1,ne:1,"ne-IN":1,nl:1,"nl-BE":1,"nl-NL":1,nn:1,"nn-NO":1,no:1,"no-NO":1,or:1,pa:1,pl:1,"pl-PL":1,pt:1,"pt-BR":1,"pt-PT":1,ro:1,"ro-RO":1,ru:1,"ru-RU":1,sk:1,"sk-SK":1,sl:1,"sl-SI":1,sq:1,"sq-AL":1,sr:1,"sr-Cyrl":1,"sr-Cyrl-BA":1,"sr-Cyrl-ME":1,"sr-Cyrl-RS":1,"sr-Latn":1,"sr-Latn-BA":1,"sr-Latn-ME":1,"sr-Latn-RS":1,sv:1,"sv-SE":1,ta:1,te:1,th:1,"th-TH":1,tr:1,"tr-TR":1,uk:1,"uk-UA":1,ur:1,"ur-IN":1,vi:1,"vi-VN":1,zh:1,"zh-Hans":1,"zh-Hans-CN":1,"zh-Hans-SG":1,"zh-Hant":1,"zh-Hant-HK":1,"zh-Hant-MO":1,"zh-Hant-TW":1,__noOverlay:!0,__defaultNoOverlayLocale:"en-US"}),define("ojs/ojmessaging",["ojs/ojcore","jquery"],function(e,t){"use strict";return e.Message=function(e,t,n){this.Init(e,t,n)},e.Message.SEVERITY_TYPE={CONFIRMATION:"confirmation",INFO:"info",WARNING:"warning",ERROR:"error",FATAL:"fatal"},e.Message.SEVERITY_LEVEL={FATAL:5,ERROR:4,WARNING:3,INFO:2,CONFIRMATION:1},e.Object.createSubclass(e.Message,e.Object,"oj.Message"),e.Message.prototype.Init=function(t,n,i){e.Message.superclass.Init.call(this),this.summary=t,this.detail=n,this.severity=i||e.Message.SEVERITY_TYPE.ERROR},e.Message.getSeverityLevel=function(t){var n=t;if(n)if("string"==typeof t){var i=e.Message._LEVEL_TO_TYPE.indexOf(n,1);n=-1===i?e.Message.SEVERITY_LEVEL.ERROR:i}else"number"==typeof n&&(n<e.Message.SEVERITY_LEVEL.CONFIRMATION||n>e.Message.SEVERITY_LEVEL.FATAL)&&(n=e.Message.SEVERITY_LEVEL.ERROR);return n||e.Message.SEVERITY_LEVEL.ERROR},e.Message.getSeverityType=function(t){var n=t;return n&&("string"==typeof n?-1===e.Message._LEVEL_TO_TYPE.indexOf(n,1)&&(n=e.Message.SEVERITY_TYPE.ERROR):"number"==typeof n&&(n=n<e.Message.SEVERITY_LEVEL.CONFIRMATION||n>e.Message.SEVERITY_LEVEL.FATAL?e.Message.SEVERITY_TYPE.ERROR:e.Message._LEVEL_TO_TYPE[t])),n||e.Message.SEVERITY_TYPE.ERROR},e.Message.getMaxSeverity=function(n){var i=-1;return n&&n.length>0&&t.each(n,function(t,n){var r=e.Message.getSeverityLevel(n.severity);i=i<r?r:i}),i},e.Message.isValid=function(t){return!(e.Message.getMaxSeverity(t)>=e.Message.SEVERITY_LEVEL.ERROR)},e.Message._LEVEL_TO_TYPE=["none",e.Message.SEVERITY_TYPE.CONFIRMATION,e.Message.SEVERITY_TYPE.INFO,e.Message.SEVERITY_TYPE.WARNING,e.Message.SEVERITY_TYPE.ERROR,e.Message.SEVERITY_TYPE.FATAL],e.Message,e.ComponentMessage=function(e,t,n,i){this.Init(e,t,n,i)},e.Object.createSubclass(e.ComponentMessage,e.Message,"oj.ComponentMessage"),e.ComponentMessage.DISPLAY={SHOWN:"shown",HIDDEN:"hidden"},e.ComponentMessage._DEFAULT_OPTIONS={display:e.ComponentMessage.DISPLAY.SHOWN,context:""},e.ComponentMessage.prototype.Init=function(n,i,r,o){e.ComponentMessage.superclass.Init.call(this,n,i,r),this._options=t.extend({},e.ComponentMessage._DEFAULT_OPTIONS,o)},e.ComponentMessage.prototype.clone=function(){return new e.ComponentMessage(this.summary,this.detail,this.severity,this._options)},e.ComponentMessage.prototype.canDisplay=function(){return!(this._options&&this._options.display&&this._options.display===e.ComponentMessage.DISPLAY.HIDDEN)},e.ComponentMessage.prototype._forceDisplayToShown=function(){return!(!this._options||e.ComponentMessage.DISPLAY.HIDDEN!==this._options.display||(this._options.display=e.ComponentMessage.DISPLAY.SHOWN,0))},e.ComponentMessage.prototype._isMessageAddedByComponent=function(){return!(!this._options||!this._options.context)},e.Message}),define("ojs/ojlocaledata",["ojs/ojcore","ojL10n!ojtranslations/nls/localeElements"],function(e,t){"use strict";var n={setBundle:function(e){n._bundle=e},getFirstDayOfWeek:function(){return n._getWeekData("firstDay")},getWeekendStart:function(){return n._getWeekData("weekendStart")},getWeekendEnd:function(){return n._getWeekData("weekendEnd")},getDayNames:function(e){(null==e||"abbreviated"!==e&&"narrow"!==e)&&(e="wide");var t=n._getCalendarData().days["stand-alone"][e];return[t.sun,t.mon,t.tue,t.wed,t.thu,t.fri,t.sat]},getMonthNames:function(e){(null==e||"abbreviated"!==e&&"narrow"!==e)&&(e="wide");var t=n._getCalendarData().months["stand-alone"][e];return[t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12]]},isMonthPriorToYear:function(){var e=n._getCalendarData().dateFormats.long.toUpperCase();return e.indexOf("M")<e.indexOf("Y")},_getWeekData:function(e){var t=n.__getBundle(),i=n._getRegion()||"001",r=t.supplemental.weekData[e],o=r[i];return void 0===o&&(o=r["001"]),o},_getCalendarData:function(){var e=n.__getBundle().main;return e[Object.keys(e)[0]].dates.calendars.gregorian},_getRegion:function(){var t=e.Config.getLocale();if(t){var n=t.toUpperCase().split(/-|_/);if(n.length>=2){var i=n[1];if(4!==i.length)return i;if(n.length>=3)return n[2]}}return null},__getBundle:function(){var i=n._bundle;return i||(e.__isAmdLoaderPresent()?(e.Assert.assert(void 0!==t,"LocaleElements module must be loaded"),t):{})},__updateBundle:function(e){t=e}};return n}),define("ojs/ojvalidation-base",["ojs/ojcore","jquery","ojs/ojtranslation","ojs/ojmessaging","ojs/ojlocaledata","ojs/ojlogger"],function(e,t,n,i,r,o){"use strict";e.OraI18nUtils={},e.OraI18nUtils.numeringSystems={latn:"0123456789",arab:"٠١٢٣٤٥٦٧٨٩",thai:"๐๑๒๓๔๕๖๗๘๙"},e.OraI18nUtils.regexTrim=/^\s+|\s+$|\u200f|\u200e/g,e.OraI18nUtils.regexTrimNumber=/\s+|\u200f|\u200e/g,e.OraI18nUtils.regexTrimRightZeros=/0+$/g,e.OraI18nUtils.zeros=["0","00","000"],e.OraI18nUtils._ISO_DATE_REGEXP=/^[+-]?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(Z|[+-]\d{2}(?::?\d{2})?)?)?$|^T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(Z|[+-]\d{2}(?::?\d{2})?)?$/,e.OraI18nUtils.getLocalTimeZoneOffset=function(){var t=(new Date).getTimezoneOffset();return e.OraI18nUtils.getTimeStringFromOffset("Etc/GMT",t,!1,!1)},e.OraI18nUtils.dateToLocalIso=function(t){var n=t;"number"==typeof n&&(n=new Date(n));var i=e.OraI18nUtils.padZeros(n.getFullYear(),4)+"-"+e.OraI18nUtils.padZeros(n.getMonth()+1,2)+"-"+e.OraI18nUtils.padZeros(n.getDate(),2)+"T"+e.OraI18nUtils.padZeros(n.getHours(),2)+":"+e.OraI18nUtils.padZeros(n.getMinutes(),2)+":"+e.OraI18nUtils.padZeros(n.getSeconds(),2);return n.getMilliseconds()>0&&(i+="."+e.OraI18nUtils.trimRightZeros(e.OraI18nUtils.padZeros(n.getMilliseconds(),3))),i},e.OraI18nUtils.partsToIsoString=function(t){var n=e.OraI18nUtils.padZeros(t[0],4)+"-"+e.OraI18nUtils.padZeros(t[1],2)+"-"+e.OraI18nUtils.padZeros(t[2],2)+"T"+e.OraI18nUtils.padZeros(t[3],2)+":"+e.OraI18nUtils.padZeros(t[4],2)+":"+e.OraI18nUtils.padZeros(t[5],2);return t[6]>0&&(n+="."+e.OraI18nUtils.trimRightZeros(e.OraI18nUtils.padZeros(t[6],3))),n},e.OraI18nUtils.isoToLocalDate=function(e){return e&&"string"==typeof e?this._isoToLocalDateIgnoreTimezone(e):null},e.OraI18nUtils._isoToLocalDateIgnoreTimezone=function(t){var n=e.OraI18nUtils._IsoStrParts(t);return new Date(n[0],n[1]-1,n[2],n[3],n[4],n[5],n[6])},e.OraI18nUtils._IsoStrParts=function(t){!1===e.OraI18nUtils._ISO_DATE_REGEXP.test(t)&&e.OraI18nUtils._throwInvalidISOStringSyntax(t);var n,i=t.split("T"),r=t.indexOf("T"),o=new Date,a=!1,s=[o.getFullYear(),o.getMonth()+1,o.getDate(),0,0,0,0];if(""!==i[0]){e.OraI18nUtils.startsWith(i[0],"-")&&(i[0]=i[0].substr(1),a=!0);var l=i[0].split("-");for(n=0;n<l.length;n++){var u=parseInt(l[n],10);if(1===n&&(u<1||u>12)&&e.OraI18nUtils._throwInvalidISOStringRange(t,"month",u,1,12),2===n){var c=e.OraI18nUtils._getDaysInMonth(s[0],s[1]-1);(u<1||u>c)&&e.OraI18nUtils._throwInvalidISOStringRange(t,"day",u,1,c)}s[n]=u}a&&(s[0]=-s[0])}if(-1!==r){var p=i[1].split("."),d=p[0].split(":");for(n=0;n<d.length;n++){var h=parseInt(d[n],10);0===n&&(h<0||h>24)&&e.OraI18nUtils._throwInvalidISOStringRange(t,"hour",h,0,24),1===n&&(h<0||h>59)&&e.OraI18nUtils._throwInvalidISOStringRange(t,"minute",h,0,59),2===n&&(h<0||h>59)&&e.OraI18nUtils._throwInvalidISOStringRange(t,"second",h,0,59),s[3+n]=h}2===p.length&&p[1]&&(s[6]=parseInt(e.OraI18nUtils.zeroPad(p[1],3,!1),10))}return s},e.OraI18nUtils.getISOStrFormatInfo=function(t){var n={format:null,dateTime:null,timeZone:"",isoStrParts:null},i=e.OraI18nUtils._ISO_DATE_REGEXP.exec(t);if(null===i&&e.OraI18nUtils._throwInvalidISOStringSyntax(t),void 0===i[1]&&void 0===i[2])return n.format="local",n.dateTime=t,n.isoStrParts=e.OraI18nUtils._IsoStrParts(n.dateTime),n;n.timeZone=void 0!==i[1]?i[1]:i[2],"Z"===n.timeZone?n.format="zulu":n.format="offset";var r=t.length,o=n.timeZone.length;return n.dateTime=t.substring(0,r-o),n.isoStrParts=e.OraI18nUtils._IsoStrParts(n.dateTime),n},e.OraI18nUtils._isLeapYear=function(e){return e%400==0||e%100!=0&&e%4==0},e.OraI18nUtils._getDaysInMonth=function(t,n){switch(n){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return e.OraI18nUtils._isLeapYear(t)?29:28;default:return 30}},e.OraI18nUtils._throwInvalidISOStringRange=function(e,t,n,i,r){var o=new RangeError("The string "+e+" is not a valid ISO 8601 string: "+n+" is out of range. Enter a value between "+i+" and "+r+" for "+t),a={errorCode:"isoStringOutOfRange",parameterMap:{isoString:e,value:n,minValue:i,maxValue:r,propertyName:t}};throw o.errorInfo=a,o},e.OraI18nUtils._throwInvalidISOStringSyntax=function(e){var t=new Error("The string "+e+" is not a valid ISO 8601 string syntax."),n={errorCode:"invalidISOString",parameterMap:{isoStr:e}};throw t.errorInfo=n,t},e.OraI18nUtils.trim=function(t){return(t+"").replace(e.OraI18nUtils.regexTrim,"")},e.OraI18nUtils.trimRightZeros=function(t){return(t+"").replace(e.OraI18nUtils.regexTrimRightZeros,"")},e.OraI18nUtils.trimNumber=function(t){return(t+"").replace(e.OraI18nUtils.regexTrimNumber,"")},e.OraI18nUtils.startsWith=function(e,t){return 0===e.indexOf(t)},e.OraI18nUtils.toUpper=function(e){return e.split(" ").join(" ").toUpperCase()},e.OraI18nUtils.padZeros=function(t,n){var i=t+"",r=!1;return t<0&&(i=i.substr(1),r=!0),n>1&&i.length<n&&(i=(i=e.OraI18nUtils.zeros[n-2]+i).substr(i.length-n,n)),r&&(i="-"+i),i},e.OraI18nUtils.zeroPad=function(e,t,n){for(var i=""+e,r=i.length;r<t;r+=1)i=n?"0"+i:i+"0";return i},e.OraI18nUtils.getTimeStringFromOffset=function(t,n,i,r){var o=i?n>=0:n<0,a=Math.abs(n),s=Math.floor(a/60),l=a%60,u=o?"-":"+";r&&(s=e.OraI18nUtils.zeroPad(s,2,!0));var c=t+u+s;return(l>0||r)&&(c+=":"+e.OraI18nUtils.zeroPad(l,2,!0)),c},e.OraI18nUtils.getNumberingSystemKey=function(t,n){if(void 0===n)return"latn";var i=e.OraI18nUtils.getNumberingExtension(n),r="symbols-numberSystem-"+i;return void 0===t.numbers[r]&&(i="latn"),i},e.OraI18nUtils.getBCP47Lang=function(e){return e.split("-")[0]},e.OraI18nUtils.getBCP47Region=function(e){var t=e.split("-");return 3===t.length?t[2]:2===t.length&&2===t[1].length?t[1]:"001"},e.OraI18nUtils.getNumberingExtension=function(e){var t=e||"en-US",n=t.indexOf("-u-nu-"),i="latn";return-1!==n&&(i=t.substr(n+6,4)),i},e.OraI18nUtils.haveSamePropertiesLength=function(e){return Object.keys(e).length},e.OraI18nUtils.getLocaleElementsMainNode=function(e){var t=e.main;return t[Object.keys(t)[0]]},e.OraI18nUtils.getLocaleElementsMainNodeKey=function(e){var t=e.main;return Object.keys(t)[0]},e.OraI18nUtils._toBoolean=function(e){if("string"==typeof e)switch(e.toLowerCase().trim()){case"true":case"1":return!0;case"false":case"0":return!1;default:return e}return e},e.OraI18nUtils.getGetOption=function(t,n){if(void 0===t)throw new Error("Internal "+n+" error. Default options missing.");return function(i,r,o,a){if(void 0!==t[i]){var s=t[i];switch(r){case"boolean":s=e.OraI18nUtils._toBoolean(s);break;case"string":s=String(s);break;case"number":s=Number(s);break;default:throw new Error("Internal error. Wrong value type.")}if(void 0!==o&&-1===o.indexOf(s)){for(var l=[],u=0;u<o.length;u++)l.push(o[u]);var c="The value '"+t[i]+"' is out of range for '"+n+"' options property '"+i+"'. Valid values: "+l,p=new RangeError(c),d={errorCode:"optionOutOfRange",parameterMap:{propertyName:i,propertyValue:t[i],propertyValueValid:l,caller:n}};throw p.errorInfo=d,p}return s}return a}},e.OraI18nUtils.matchString=function(t,n,i,r){void 0===r&&(r={sensitivity:"base",usage:"sort"});var o=e.OraI18nUtils.getGetOption(r,"oj.OraI18nUtils.matchString");r.usage=o("usage","string",["sort","search"],"sort"),r.sensitivity=o("sensitivity","string",["base","accent","case","variant"],"base");for(var a=t.length,s=n.length-1,l=0;l<a;l++)for(var u=0;u<3;u++){var c=a-l;if(c=Math.min(c,s+u),0===t.substr(l,c).localeCompare(n,i,r))return[l,l+(c-1)]}return null};var a={fullYear:{pos:0,pad:4},month:{pos:1,pad:2},date:{pos:2,pad:2},hours:{pos:3,pad:2},minutes:{pos:4,pad:2},seconds:{pos:5,pad:2},milliseconds:{pos:6,pad:3},timeZone:{pos:7}};e.OraI18nUtils.isoToDate=function(e){return new Date(this._normalizeIsoString(e))},e.OraI18nUtils._copyTimeOver=function(e,t){if(!e||!t)throw new Error("Provided invalid arguments");var n=this._normalizeIsoString(t),i=e.indexOf("T"),r=n.indexOf("T");return n.substring(0,r)+(-1!==i?e.substring(i):"T00:00:00.000")},e.OraI18nUtils._clearTime=function(e){return this._dateTime(e,{hours:0,minutes:0,seconds:0,milliseconds:0})},e.OraI18nUtils._dateTime=function(e,n,i){if(!e||!n)throw new Error("Invalid argument invocation");var r,o,s=null,l=a,u=this.padZeros,c=this._normalizeIsoString(e),p=/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):?(\d{2})?\.?(\d{3})?(.*)?/.exec(c);if(!p)throw new Error("Unable to capture anything");if(p=p.slice(1),Array.isArray(n)){s={};for(var d=0,h=n.length;d<h;d++){var m=n[d];if(m in l){if(o=p[r=l[m].pos],i&&"timeZone"===m)throw new Error("Dude you tried to ask timezone to be parsed");if(i){var g=parseInt(o,10);s[m]=1===r?g-1:g}else s[m]=o}}}else if(t.isPlainObject(n)){for(var f=Object.keys(n),_=0;_<f.length;_++){var v=f[_],y=l[v];r=y.pos,o=n[v],1===r&&"number"==typeof o&&(o+=1),p[r]=y.pad?u(o,y.pad):o}s=p[0]+"-"+p[1]+"-"+p[2]+"T"+p[3]+":"+p[4]+":"+p[5]+(p.length>6&&p[6]?"."+p[6]+(8===p.length&&p[7]?p[7]:""):"")}return s},e.OraI18nUtils._normalizeIsoString=function(e){if(!e)throw new Error("Provided invalid arguments");var t,n=(new Date).toISOString(),i=n.substring(0,n.indexOf("T")),r=e.indexOf("T"),o=-1===r?e:e.substring(0,r);return(o=o||i)+(-1!==r?(t=e.substring(r)).split(":").length>1?t:t+":00":"T00:00:00.000")},e.OraI18nUtils.formatString=function(e,t){for(var n=t.length,i=e,r=0;r<n;r++){var o="{"+r+"}";i=i.replace(o,t[r])}return i},e.OraI18nUtils.getInitials=function(e,t){var n,i=0,r=0;if(void 0!==e&&e.length>0&&(i=e.charCodeAt(0)),i>=1536&&i<=1791)return"";if(i>=2304&&i<=2431)return e.charAt(0);if(i>=3584&&i<=3711)return e.charAt(0);if(i>=4352&&i<=4607||i>=12592&&i<=12687||i>=43360&&i<=43391||i>=44032&&i<=55295)return e;if(void 0!==t&&t.length>0&&(i=t.charCodeAt(0)),i>=11904&&i<=12255||i>=12288&&i<=12591||i>=12688&&i<=12799||i>=13056&&i<=19903||i>=19968&&i<=40959||i>=63744&&i<=64255)return t;if(i>=55296&&i<=56319){if(t.length<2)return"";if((r=t.charCodeAt(1))<56320||r>57343)return"";if((n=1024*(i-55296)+(r-56320)+65536)>=110592&&n<=110847||n>=127488&&n<=127743||n>=131072&&n<=173791||n>=173824&&n<=177983||n>=177984&&n<=178207||n>=178208&&n<=183983||n>=194560&&n<=195103)return t}return i="",r="",void 0!==e&&e.length>0&&(i=e.charAt(0).toUpperCase()),void 0!==t&&t.length>0&&(r=t.charAt(0).toUpperCase()),i+r},e.Validation={},e.Validation._converterFactories={},e.Validation._validatorFactories={},e.Validation._defaultConverterFactories={},e.Validation._defaultValidatorFactories={},e.Validation._CONTRACTS={converter:{name:"oj.ConverterFactory",type:e.ConverterFactory},validator:{name:"oj.ValidatorFactory",type:e.ValidatorFactory}},e.Validation.converterFactory=function(t,n){var i;return t&&!n?i=e.Validation._getFactory(t,e.Validation._converterFactories):t&&n&&(i=e.Validation._registerFactory(t,n,e.Validation._converterFactories,e.Validation._CONTRACTS.converter)),i},e.Validation.validatorFactory=function(t,n){var i;return t&&!n?i=e.Validation._getFactory(t,e.Validation._validatorFactories):t&&n&&(i=e.Validation._registerFactory(t,n,e.Validation._validatorFactories,e.Validation._CONTRACTS.validator)),i},e.Validation.getDefaultConverterFactory=function(t){return e.Validation._getFactory(t,e.Validation._defaultConverterFactories)},e.Validation.getDefaultValidatorFactory=function(t){return e.Validation._getFactory(t,e.Validation._defaultValidatorFactories)},e.Validation.__registerDefaultConverterFactory=function(t,n){var i=e.Validation._CONTRACTS.converter;e.Validation._registerFactory(t,n,e.Validation._defaultConverterFactories,i),e.Validation._registerFactory(t,n,e.Validation._converterFactories,i)},e.Validation.__registerDefaultValidatorFactory=function(t,n){var i=e.Validation._CONTRACTS.validator;e.Validation._registerFactory(t,n,e.Validation._defaultValidatorFactories,i),e.Validation._registerFactory(t,n,e.Validation._validatorFactories,i)},e.Validation._doImplementsCheck=function(t,n,i){if(n&&!e.Validation._quacksLike(t,n))throw new Error("Factory instance does not implement the methods expected by the factory of type "+i)},e.Validation._getFactory=function(t,n){return e.Assert.assertString(t),(n[t.toLowerCase()]||{}).instance||null},e.Validation._quacksLike=function(t,n){var i=!0;e.Assert.assertObject(t),e.Assert.assertObject(n);for(var r=Object.keys(n),o=0;o<r.length;o++){var a=r[o];if("function"==typeof n[a]&&(!t[a]||"function"!=typeof t[a])){i=!1;break}}return i},e.Validation._registerFactory=function(t,n,i,r){e.Assert.assertString(t),e.Assert.assertObject(n);var o={};o.instance=n,e.Validation._doImplementsCheck(n,r.type,r.name),i[t.toLowerCase()]=o},e.ConverterFactory={CONVERTER_TYPE_NUMBER:"number",CONVERTER_TYPE_DATETIME:"datetime",CONVERTER_TYPE_COLOR:"color",createConverter:function(e){}},e.ValidatorFactory={VALIDATOR_TYPE_REQUIRED:"required",VALIDATOR_TYPE_REGEXP:"regexp",VALIDATOR_TYPE_NUMBERRANGE:"numberRange",VALIDATOR_TYPE_LENGTH:"length",VALIDATOR_TYPE_DATETIMERANGE:"dateTimeRange",VALIDATOR_TYPE_DATERESTRICTION:"dateRestriction",createValidator:function(e){}},e.Converter=function(e){this.Init(e)},e.Object.createSubclass(e.Converter,e.Object,"oj.Converter"),e.Converter.prototype.Init=function(t){e.Converter.superclass.Init.call(this),this._options=t},e.Converter.prototype.getOptions=function(){return this._options||{}},e.Converter.prototype.resolvedOptions=function(){var e={};return t.extend(e,this._options),e},e.ConverterError=function(e,t){var n={summary:e,detail:t,severity:i.SEVERITY_LEVEL.ERROR};this.Init(n)},e.ConverterError.prototype=new Error,e.ConverterError.prototype.Init=function(e){var t=e.detail,n=e.summary;this._message=e,this.name="Converter Error",this.message=t||n},e.ConverterError.prototype.getMessage=function(){return this._message},e.Validator=function(e){this.Init(e)},e.Object.createSubclass(e.Validator,e.Object,"oj.Validator"),e.Validator.prototype.Init=function(t){e.Validator.superclass.Init.call(this)},e.ValidatorError=function(e,t){var n={summary:e,detail:t,severity:i.SEVERITY_LEVEL.ERROR};this.Init(n)},e.ValidatorError.prototype=new Error,e.ValidatorError.prototype.Init=function(e){var t=e.detail,n=e.summary;this._message=e,this.name="Validator Error",this.message=t||n},e.ValidatorError.prototype.getMessage=function(){return this._message},e.RegExpValidator=function(e){this.Init(e)},e.Object.createSubclass(e.RegExpValidator,e.Validator,"oj.RegExpValidator"),e.RegExpValidator._BUNDLE_KEY_DETAIL="oj-validator.regExp.detail",e.RegExpValidator._BUNDLE_KEY_SUMMARY="oj-validator.regExp.summary",e.RegExpValidator.prototype.Init=function(t){e.RegExpValidator.superclass.Init.call(this),this._options=t},e.RegExpValidator.prototype.validate=function(t){var i,r,o,a=this._options&&this._options.pattern||"";if(null==t||""===t)return!0;var s=t.toString(),l="^("+a+")$",u=s.match(l);if(null===u||u[0]!==s){this._options&&(o=this._options.messageSummary||null,i=this._options.messageDetail||null,r=this._options&&this._options.label||"");var c={label:r,pattern:a,value:s},p=o?n.applyParameters(o,c):n.getTranslatedString(this._getSummaryKey(),c),d=i?n.applyParameters(i,c):n.getTranslatedString(this._getDetailKey(),c);throw new e.ValidatorError(p,d)}return!0},e.RegExpValidator.prototype.getHint=function(){var e=null,t={};return this._options&&this._options.hint&&(t={pattern:this._options.pattern},e=n.applyParameters(this._options.hint,t)),e},e.RegExpValidator.prototype._getSummaryKey=function(){return e.RegExpValidator._BUNDLE_KEY_SUMMARY},e.RegExpValidator.prototype._getDetailKey=function(){return e.RegExpValidator._BUNDLE_KEY_DETAIL},e.RequiredValidator=function(e){this.Init(e)},e.Object.createSubclass(e.RequiredValidator,e.Validator,"oj.RequiredValidator"),e.RequiredValidator._BUNDLE_KEY_DETAIL="oj-validator.required.detail",e.RequiredValidator._BUNDLE_KEY_SUMMARY="oj-validator.required.summary",e.RequiredValidator.prototype.Init=function(t){e.RequiredValidator.superclass.Init.call(this),this._options=t},e.RequiredValidator.prototype.validate=function(t){var i,r,o,a,s,l="";if("number"==typeof t&&0===t||t&&0!==t.length)return!0;throw this._options&&(i=this._options.messageDetail||this._options.message||null,a=this._options.messageSummary||null,l=this._options.label||""),s={label:l},o=a?n.applyParameters(a,s):n.getTranslatedString(this._getSummaryKey(),s),r=i?n.applyParameters(i,s):n.getTranslatedString(this._getDetailKey(),s),new e.ValidatorError(o,r)},e.RequiredValidator.prototype.getHint=function(){var e="";return this._options&&this._options.hint&&(e=n.getTranslatedString(this._options.hint)),e},e.RequiredValidator.prototype._getSummaryKey=function(){return e.RequiredValidator._BUNDLE_KEY_SUMMARY},e.RequiredValidator.prototype._getDetailKey=function(){return e.RequiredValidator._BUNDLE_KEY_DETAIL},function(){function t(e,t){return"#"+function(e,t){return function(e,t,n,i){var o=[r(Math.round(e).toString(16)),r(Math.round(t).toString(16)),r(Math.round(n).toString(16))];return i&&o[0].charAt(0)===o[0].charAt(1)&&o[1].charAt(0)===o[1].charAt(1)&&o[2].charAt(0)===o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}(e._r,e._g,e._b,t)}(e,t)}function i(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),
- n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function r(e){return 1===e.length?"0"+e:""+e}e.ColorConverter=function(e){this.Init(e)},e.Object.createSubclass(e.ColorConverter,e.Converter,"oj.ColorConverter"),e.ColorConverter.prototype.Init=function(t){(t=t||{}).format=t.format||"rgb",e.ColorConverter.superclass.Init.call(this,t)},e.ColorConverter.prototype.format=function(r){var o=this._getFormat(),a=null;return"rgb"===o?a=r.toString():"hsl"===o?a=function(e){var t=function(e,t,n){e=i(e,255),t=i(t,255),n=i(n,255);var r,o,a=Math.max(e,t,n),s=Math.min(e,t,n),l=(a+s)/2;if(a===s)r=0,o=0;else{var u=a-s;switch(o=l>.5?u/(2-a-s):u/(a+s),a){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:o,l:l}}(e._r,e._g,e._b),n=Math.round(360*t.h),r=Math.round(100*t.s),o=Math.round(100*t.l);return 1===e._a?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+e._a+")"}(r):"hex"===o?a=t(r):"hex3"===o?a=t(r,!0):"hsv"===o?a=function(e){var t=function(e,t,n){e=i(e,255),t=i(t,255),n=i(n,255);var r,o=Math.max(e,t,n),a=Math.min(e,t,n),s=o,l=o-a,u=0===o?0:l/o;if(o===a)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:u,v:s}}(e._r,e._g,e._b),n=Math.round(360*t.h),r=Math.round(100*t.s),o=Math.round(100*t.v);return 1===e._a?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+e._a+")"}(r):function(){var t=n.getTranslatedString("oj-converter.color.invalidFormat.summary"),i=n.getTranslatedString("oj-converter.color.invalidFormat.detail");throw new e.ConverterError(t,i)}(),a||e.ColorConverter.superclass.format.call(this,r)},e.ColorConverter.prototype.parse=function(t){try{return new e.Color(t)}catch(t){throw function(){var t=n.getTranslatedString("oj-converter.color.invalidSyntax.summary"),i=n.getTranslatedString("oj-converter.color.invalidSyntax.detail");throw new e.ConverterError(t,i)}()}},e.ColorConverter.prototype.getHint=function(){return this._getFormat()},e.ColorConverter.prototype.resolvedOptions=function(){return{format:this._getFormat()}},e.ColorConverter.prototype._getFormat=function(){return e.ColorConverter.superclass.getOptions.call(this).format}}(),e.IntlConverterUtils={},e.IntlConverterUtils.isoToDate=function(t){return e.OraI18nUtils.isoToDate(t)},e.IntlConverterUtils.isoToLocalDate=function(t){return e.OraI18nUtils.isoToLocalDate(t)},e.IntlConverterUtils.dateToLocalIso=function(t){return e.OraI18nUtils.dateToLocalIso(t)},e.IntlConverterUtils.getLocalTimeZoneOffset=function(){return e.OraI18nUtils.getLocalTimeZoneOffset()},e.IntlConverterUtils.getConverterInstance=function(t){var n="",i={},r=null;if(t&&("object"==typeof t&&(t instanceof e.Converter||t.parse&&"function"==typeof t.parse||t.format&&"function"==typeof t.format?r=t:(n=t.type,i=t.options||{})),!r&&(n=n||t)&&"string"==typeof n)){var a=e.Validation.converterFactory(n);return null===a&&o.error("Converter of type "+n+" cannot be found. Make sure the correct converter/validation module is included."),a.createConverter(i)}return r},e.IntlConverterUtils._minMaxIsoString=function(e,t){if(e){var n=(t=t||this.dateToLocalIso(new Date)).indexOf("T");0===e.indexOf("T")&&n>0&&(e=t.substring(0,n)+e)}return e},e.IntlConverterUtils.__getConverterOptionError=function(t,i){e.Assert.assertObject(i);var r,o="",a="",s=i.propertyName;if("optionTypesMismatch"===t){var l=i.requiredPropertyName;r=i.requiredPropertyValueValid,o=n.getTranslatedString("oj-converter.optionTypesMismatch.summary",{propertyName:s,propertyValue:i.propertyValue,requiredPropertyName:l}),a=e.IntlConverterUtils._getOptionValueDetailMessage(l,r)}else"optionTypeInvalid"===t?(s=i.propertyName,r=i.propertyValueValid,o=n.getTranslatedString("oj-converter.optionTypeInvalid.summary",{propertyName:s}),a=e.IntlConverterUtils._getOptionValueDetailMessage(s,r)):"optionOutOfRange"===t?(o=n.getTranslatedString("oj-converter.optionOutOfRange.summary",{propertyName:s,propertyValue:i.propertyValue}),r=i.propertyValueValid,a=e.IntlConverterUtils._getOptionValueDetailMessage(s,r)):"optionValueInvalid"===t&&(o=n.getTranslatedString("oj-converter.optionValueInvalid.summary",{propertyName:s,propertyValue:i.propertyValue}),r=i.propertyValueHint,a=e.IntlConverterUtils._getOptionValueDetailMessage(s,r));return new e.ConverterError(o,a)},e.IntlConverterUtils._getOptionValueDetailMessage=function(e,t){var i;return t?("string"==typeof t?i="oj-converter.optionHint.detail":(i="oj-converter.optionHint.detail-plural",t=t.join(n.getTranslatedString("oj-converter.plural-separator"))),n.getTranslatedString(i,{propertyName:e,propertyValueValid:t})):""},e.IntlConverterUtils.__getNullFormattedValue=function(){return""},e.IntlConverterUtils._copyTimeOver=function(t,n){return e.OraI18nUtils._copyTimeOver(t,n)},e.IntlConverterUtils._clearTime=function(t){return e.OraI18nUtils._clearTime(t)},e.IntlConverterUtils._dateTime=function(t,n,i){return e.OraI18nUtils._dateTime(t,n,i)},e.IntlConverterUtils._normalizeIsoString=function(t){return e.OraI18nUtils._normalizeIsoString(t)},e.IntlConverterUtils.getInitials=function(t,n){return e.OraI18nUtils.getInitials(t,n)},e.LengthValidator=function(e){this.Init(e)},e.LengthValidator.defaults={countBy:"codeUnit"},e.Object.createSubclass(e.LengthValidator,e.Validator,"oj.LengthValidator"),e.LengthValidator.prototype.Init=function(t){var n=t.countBy;if(e.LengthValidator.superclass.Init.call(this),this._min=void 0!==t.min?parseInt(t.min,10):null,this._max=void 0!==t.max?parseInt(t.max,10):null,isNaN(this._min))throw new Error("length validator's min option is not a number. min option is "+t.min);if(isNaN(this._max))throw new Error("length validator's max option is not a number. max option is "+t.min);if(null!==this._min&&this._min<0)throw new Error("length validator's min option cannot be less than 0. min option is "+t.min);if(null!==this._max&&this._max<1)throw new Error("length validator's max option cannot be less than 1. max option is "+t.max);this._countBy=void 0===n?e.LengthValidator.defaults.countBy:n,t&&(this._hint=t.hint||{},this._customMessageSummary=t.messageSummary||{},this._customMessageDetail=t.messageDetail||{})},e.LengthValidator.prototype.getHint=function(){var e,t=null,i=this._hint,r=i.exact,o=i.inRange,a=i.max,s=i.min,l=this._max,u=this._min,c=n;return null!==u&&null!==l?u!==l?(e={min:u,max:l},t=o?c.applyParameters(o,e):c.getTranslatedString("oj-validator.length.hint.inRange",e)):(e={length:u},t=r?c.applyParameters(r,e):c.getTranslatedString("oj-validator.length.hint.exact",e)):null!==u?(e={min:u},t=s?c.applyParameters(s,e):c.getTranslatedString("oj-validator.length.hint.min",e)):null!==l&&(e={max:l},t=a?c.applyParameters(a,e):c.getTranslatedString("oj-validator.length.hint.max",e)),t},e.LengthValidator.prototype.validate=function(t){var i,r=this._customMessageDetail,o=this._customMessageSummary,a="",s=this._max,l=o.tooLong,u=o.tooShort,c=r.tooLong,p=r.tooShort,d=this._min,h="",m=n,g=""+t,f=this._getLength(g);if((null===d||f>=this._min)&&(null===s||f<=this._max))return g;throw f<this._min?(i={value:t,min:d},h=u?m.applyParameters(u,i):m.getTranslatedString("oj-validator.length.messageSummary.tooShort"),a=p?m.applyParameters(p,i):m.getTranslatedString("oj-validator.length.messageDetail.tooShort",i)):(i={value:t,max:s},h=l?m.applyParameters(l,i):m.getTranslatedString("oj-validator.length.messageSummary.tooLong"),a=c?m.applyParameters(c,i):m.getTranslatedString("oj-validator.length.messageDetail.tooLong",i)),new e.ValidatorError(h,a)},e.LengthValidator.prototype._getLength=function(t){var n,i=this._countBy.toLowerCase(),r=t.length,o=0;switch(i){case"codepoint":for(var a=0;a<r;a++)55296==(63488&t.charCodeAt(a))&&(o+=1);e.Assert.assert(o%2==0,"the number of surrogate chars must be an even number."),n=r-o/2;break;case"codeunit":default:n=r}return n},e.ColorConverterFactory=function(){return{createConverter:function(t){return function(t){return new e.ColorConverter(t)}(t)}}}(),e.Validation.__registerDefaultConverterFactory(e.ConverterFactory.CONVERTER_TYPE_COLOR,e.ColorConverterFactory),e.RequiredValidatorFactory=function(){return{createValidator:function(t){return function(t){return new e.RequiredValidator(t)}(t)}}}(),e.Validation.__registerDefaultValidatorFactory(e.ValidatorFactory.VALIDATOR_TYPE_REQUIRED,e.RequiredValidatorFactory),e.RegExpValidatorFactory=function(){return{createValidator:function(t){return function(t){return new e.RegExpValidator(t)}(t)}}}(),e.Validation.__registerDefaultValidatorFactory(e.ValidatorFactory.VALIDATOR_TYPE_REGEXP,e.RegExpValidatorFactory),e.LengthValidatorFactory=function(){return{createValidator:function(t){return function(t){return new e.LengthValidator(t)}(t)}}}(),e.Validation.__registerDefaultValidatorFactory(e.ValidatorFactory.VALIDATOR_TYPE_LENGTH,e.LengthValidatorFactory),e.LocaleData=r;var s={};return s.ColorConverter=e.ColorConverter,s.IntlConverterUtils=e.IntlConverterUtils,s.LengthValidator=e.LengthValidator,s.RegExpValidator=e.RegExpValidator,s.RequiredValidator=e.RequiredValidator,s.Validation=e.Validation,s}),define("ojs/ojvalidation-datetime",["ojs/ojcore","jquery","ojs/ojconfig","ojs/ojtranslation","ojL10n!ojtranslations/nls/localeElements","ojs/ojlocaledata","ojs/ojvalidation-base","ojs/ojlogger"],function(e,t,n,i,r,o,a,s){"use strict";var l;e.DateTimeConverter=function(e){this.Init(e)},e.Object.createSubclass(e.DateTimeConverter,e.Converter,"oj.DateTimeConverter"),e.DateTimeConverter.prototype.Init=function(t){e.DateTimeConverter.superclass.Init.call(this,t)},e.DateTimeConverter.prototype.format=function(t){return e.DateTimeConverter.superclass.format.call(this,t)},e.DateTimeConverter.prototype.isHourInDaySet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.isHourInAMPMSet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.isMinuteSet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.isSecondSet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.isMilliSecondSet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.isYearSet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.isMonthSet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.isDaySet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.isDayNameSet=function(){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.calculateWeek=function(t){e.Assert.failedInAbstractFunction()},e.DateTimeConverter.prototype.parse=function(t){return e.DateTimeConverter.superclass.parse.call(this,t)},e.DateTimeConverter.prototype.compareISODates=function(t,n){return e.DateTimeConverter.superclass.compareISODates.call(this,t,n)},e.DateTimeConverter.prototype.getAvailableTimeZones=function(){return e.DateTimeConverter.superclass.getAvailableTimeZones.call(this)},e.DateRestrictionValidator=function(e){this.Init(e)},e.Object.createSubclass(e.DateRestrictionValidator,e.Validator,"oj.DateRestrictionValidator"),e.DateRestrictionValidator.prototype.Init=function(t){e.DateRestrictionValidator.superclass.Init.call(this),this._dayFormatter=t.dayFormatter,this._converter=a.IntlConverterUtils.getConverterInstance(t.converter),t&&(this._messageSummary=t.messageSummary||null,this._messageDetail=t.messageDetail||null)},e.DateRestrictionValidator.prototype._inDisabled=function(e){var t=this._dayFormatter;if(t){var n=t({fullYear:e.fullYear,month:e.month+1,date:e.date});return n&&n.disabled}return!1},e.DateRestrictionValidator.prototype.validate=function(t){var n="",r="",o=i,s=this._messageSummary,l=this._messageDetail,u=t?this._converter.format(t):t,c=t?a.IntlConverterUtils._dateTime(t,["fullYear","month","date"],!0):null;if(null===t)return t;if(this._inDisabled(c))throw n=s?o.applyParameters(s,{value:u}):o.getTranslatedString("oj-validator.restriction.date.messageSummary",{value:u}),r=l?o.applyParameters(l,{value:u}):o.getTranslatedString("oj-validator.restriction.date.messageDetail",{value:u}),new e.ValidatorError(n,r);return t},e.DateRestrictionValidator.prototype.getHint=function(){return null},e.DateTimeRangeValidator=function(e){this.Init(e)},e.Object.createSubclass(e.DateTimeRangeValidator,e.Validator,"oj.DateTimeRangeValidator"),e.DateTimeRangeValidator.prototype.Init=function(t){if(e.DateTimeRangeValidator.superclass.Init.call(this),this._converter=a.IntlConverterUtils.getConverterInstance(t.converter),!this._converter)throw new Error("oj.DateTimeRangeValidator missing a converter option");this._min=t.min||null,this._max=t.max||null,this._translationKey=t.translationKey||"datetime",t&&(this._hint=t.hint||{},this._customMessageSummary=t.messageSummary||{},this._customMessageDetail=t.messageDetail||{}),i.getTranslatedString("oj-validator.range."+this._translationKey+".messageSummary.rangeOverflow")||(this._translationKey="datetime")},e.DateTimeRangeValidator.prototype.validate=function(t){var n,r,o=this._customMessageSummary,s=this._customMessageDetail,l=s.rangeOverflow,u=s.rangeUnderflow,c=o.rangeOverflow,p=o.rangeUnderflow,d=a.IntlConverterUtils,h=this._min,m=this._max,g="",f="",_=i,v=null,y=t&&this._converter.format(t);if(null===t)return t;if(y=this._converter.format(t),h&&(h=d._minMaxIsoString(h,t),n=this._converter?this._converter.format(h):h),m&&(m=d._minMaxIsoString(m,t),r=this._converter?this._converter.format(m):m),null!==h&&null!==m){if(this._converter.compareISODates(t,h)>=0&&this._converter.compareISODates(t,m)<=0||this._converter.compareISODates(h,m)>0)return t}else if(null!==h){if(this._converter.compareISODates(t,h)>=0)return t}else if(null===m||this._converter.compareISODates(t,m)<=0)return t;throw null!==m&&this._converter.compareISODates(t,m)>0?(v={value:y,max:r},g=c||_.getTranslatedString("oj-validator.range."+this._translationKey+".messageSummary.rangeOverflow"),f=l?_.applyParameters(l,v):_.getTranslatedString("oj-validator.range."+this._translationKey+".messageDetail.rangeOverflow",v)):null!==h&&this._converter.compareISODates(t,h)<0&&(v={value:y,min:n},g=p||_.getTranslatedString("oj-validator.range."+this._translationKey+".messageSummary.rangeUnderflow"),f=u?_.applyParameters(u,v):_.getTranslatedString("oj-validator.range."+this._translationKey+".messageDetail.rangeUnderflow",v)),new e.ValidatorError(g,f)},e.DateTimeRangeValidator.prototype.getHint=function(){var e=null,t=this._hint,n=t.inRange,r=t.min,o=t.max,a=this._min,s=this._max,l=a&&this._converter?this._converter.format(a):a,u=s&&this._converter?this._converter.format(s):s,c=null,p=i;return null!==a&&null!==s?(c={min:l,max:u},e=n?p.applyParameters(n,c):p.getTranslatedString("oj-validator.range."+this._translationKey+".hint.inRange",c)):null!==a?(c={min:l},e=r?p.applyParameters(r,c):p.getTranslatedString("oj-validator.range."+this._translationKey+".hint.min",c)):null!==s&&(c={max:u},e=o?p.applyParameters(o,c):p.getTranslatedString("oj-validator.range."+this._translationKey+".hint.max",c)),e},e.DateTimeConverterFactory=function(){return{createConverter:function(t){return function(t){return new e.IntlDateTimeConverter(t)}(t)}}}(),a.Validation.__registerDefaultConverterFactory(e.ConverterFactory.CONVERTER_TYPE_DATETIME,e.DateTimeConverterFactory),e.DateTimeRangeValidatorFactory=function(){return{createValidator:function(t){return function(t){return new e.DateTimeRangeValidator(t)}(t)}}}(),a.Validation.__registerDefaultValidatorFactory(e.ValidatorFactory.VALIDATOR_TYPE_DATETIMERANGE,e.DateTimeRangeValidatorFactory),e.DateRestrictionValidatorFactory=function(){return{createValidator:function(t){return function(t){return new e.DateRestrictionValidator(t)}(t)}}}(),a.Validation.__registerDefaultValidatorFactory(e.ValidatorFactory.VALIDATOR_TYPE_DATERESTRICTION,e.DateRestrictionValidatorFactory),e.IntlDateTimeConverter=function(e){this.Init(e)},e.Object.createSubclass(e.IntlDateTimeConverter,e.DateTimeConverter,"oj.IntlDateTimeConverter"),e.IntlDateTimeConverter._DEFAULT_DATE=new Date(1998,10,29,15,45,31),e.IntlDateTimeConverter.prototype.Init=function(t){e.IntlDateTimeConverter.superclass.Init.call(this,t)},e.IntlDateTimeConverter.prototype._getWrapped=function(){return this._wrapped||(this._wrapped=l.getInstance()),this._wrapped},e.IntlDateTimeConverter.prototype.format=function(t){var i=o.__getBundle(),r=n.getLocale(),a=this.resolvedOptions();if(null==t||"string"==typeof t&&0===e.StringUtils.trim(""+t).length)return e.IntlConverterUtils.__getNullFormattedValue();try{return this._getWrapped().format(t,i,a,r)}catch(e){throw this._processConverterError(e,t)}},e.IntlDateTimeConverter.prototype.formatRelative=function(e,t){var i=o.__getBundle(),r=n.getLocale();try{return this._getWrapped().formatRelative(e,i,t,r)}catch(t){throw this._processConverterError(t,e)}},e.IntlDateTimeConverter.prototype.getHint=function(){return null},e.IntlDateTimeConverter.prototype._getHintValue=function(){var t="";try{t=this.format(a.IntlConverterUtils.dateToLocalIso(e.IntlDateTimeConverter._DEFAULT_DATE))}catch(n){n instanceof e.ConverterError&&(t="")}return t},e.IntlDateTimeConverter.prototype.getOptions=function(){return e.IntlDateTimeConverter.superclass.getOptions.call(this)},e.IntlDateTimeConverter.prototype.resolvedOptions=function(){var e,t=n.getLocale(),i=this.getOptions();if(t!==this._locale||!this._resolvedOptions){e=o.__getBundle();try{if(!e)return s.error("locale bundle for the current locale %s is unavailable",t),{};this._resolvedOptions=this._getWrapped().resolvedOptions(e,i,t),this._locale=t}catch(e){throw this._processConverterError(e)}}return this._resolvedOptions},e.IntlDateTimeConverter.prototype.isHourInDaySet=function(){var e=this.resolvedOptions(),t=e.hour,n=e.hour12;return!(!t||n)},e.IntlDateTimeConverter.prototype.isHourInAMPMSet=function(){var e=this.resolvedOptions(),t=e.hour,n=e.hour12;return!(!t||!n)},e.IntlDateTimeConverter.prototype.isMinuteSet=function(){return this._isOptionSet("minute")},e.IntlDateTimeConverter.prototype.isSecondSet=function(){return this._isOptionSet("second")},e.IntlDateTimeConverter.prototype.isMilliSecondSet=function(){return this._isOptionSet("millisecond")},e.IntlDateTimeConverter.prototype.isYearSet=function(){return this._isOptionSet("year")},e.IntlDateTimeConverter.prototype.isMonthSet=function(){return this._isOptionSet("month")},e.IntlDateTimeConverter.prototype.isDaySet=function(){return this._isOptionSet("day")},e.IntlDateTimeConverter.prototype.isDayNameSet=function(){return this._isOptionSet("weekday")},e.IntlDateTimeConverter.prototype.calculateWeek=function(e){return this._getWrapped().calculateWeek(e,o.__getBundle(),n.getLocale())},e.IntlDateTimeConverter.prototype.parse=function(e){if(null==e||""===e)return null;var t=o.__getBundle(),i=n.getLocale(),r=this.resolvedOptions();try{var a=this._getWrapped().parse(e,t,r,i),l=a.value;return l&&a.warning&&s.warn("The value "+e+" was leniently parsed to represent a date "+l.toString?l.toString():l),l}catch(t){throw this._processConverterError(t,e)}},e.IntlDateTimeConverter.prototype.compareISODates=function(t,n){var i=e.StringUtils.isString;if(!i(t)||!i(n))throw new Error("Invalid arguments for compareISODates ",t,n);return this._getWrapped().compareISODates(t,n,o.__getBundle())},e.IntlDateTimeConverter.prototype._processConverterError=function(t,n){var r,o,s,l,u=t.errorInfo;if(u){var c=u.errorCode,p=u.parameterMap||{};e.Assert.assertObject(p);var d=p.propertyName;d=i.getTranslatedString("oj-converter.datetime.datetimeOutOfRange."+d),p.propertyName=d,t instanceof TypeError?"optionTypesMismatch"!==c&&"optionTypeInvalid"!==c||(s=a.IntlConverterUtils.__getConverterOptionError(c,p)):t instanceof RangeError?"optionOutOfRange"===c?s=a.IntlConverterUtils.__getConverterOptionError(c,p):"datetimeOutOfRange"===c?(r=i.getTranslatedString("oj-converter.datetime.datetimeOutOfRange.summary",{propertyName:d,value:p.value}),o=i.getTranslatedString("oj-converter.datetime.datetimeOutOfRange.detail",{minValue:p.minValue,maxValue:p.maxValue}),s=new e.ConverterError(r,o)):"isoStringOutOfRange"===c&&(r=i.getTranslatedString("oj-converter.datetime.invalidISOString.invalidRangeSummary",{isoStr:p.isoString,propertyName:d,value:p.value}),o=i.getTranslatedString("oj-converter.datetime.datetimeOutOfRange.detail",{minValue:p.minValue,maxValue:p.maxValue}),s=new e.ConverterError(r,o)):t instanceof SyntaxError?"optionValueInvalid"===c&&(s=a.IntlConverterUtils.__getConverterOptionError(c,p)):t instanceof Error&&("dateFormatMismatch"===c?l="oj-converter.datetime.dateFormatMismatch.summary":"timeFormatMismatch"===c?l="oj-converter.datetime.timeFormatMismatch.summary":"datetimeFormatMismatch"===c?l="oj-converter.datetime.datetimeFormatMismatch.summary":"invalidTimeZoneID"===c?(r=i.getTranslatedString("oj-converter.datetime.invalidTimeZoneID.summary",{timeZoneID:p.timeZoneID}),o=i.getTranslatedString("oj-converter.hint.detail",{exampleValue:this._getHintValue()}),s=new e.ConverterError(r,o)):"nonExistingTime"===c?l="oj-converter.datetime.nonExistingTime.summary":"missingTimeZoneData"===c?l="oj-converter.datetime.missingTimeZoneData.summary":"dateToWeekdayMismatch"===c?(r=i.getTranslatedString("oj-converter.datetime.dateToWeekdayMismatch.summary",{date:p.date,weekday:p.weekday}),o=i.getTranslatedString("oj-converter.datetime.dateToWeekdayMismatch.detail"),s=new e.ConverterError(r,o)):"invalidISOString"===c&&(r=i.getTranslatedString("oj-converter.datetime.invalidISOString.summary",{isoStr:p.isoStr}),o=i.getTranslatedString("oj-converter.datetime.invalidISOString.detail"),s=new e.ConverterError(r,o)),l&&(r=i.getTranslatedString(l,{value:n||p.value,format:p.format}),o=i.getTranslatedString("oj-converter.hint.detail",{exampleValue:this._getHintValue()}),s=new e.ConverterError(r,o)))}return s||(r=t.message,o=t.message,s=new e.ConverterError(r,o)),s},e.IntlDateTimeConverter.prototype._isOptionSet=function(e){return!!this.resolvedOptions()[e]},e.IntlDateTimeConverter.prototype.getAvailableTimeZones=function(){return this._getWrapped().getAvailableTimeZones(o.__getBundle())},e.IntlDateTimeConverter.prototype._getTimePositioning=function(e){var t;return t=null===e?this.resolvedOptions():e,this._getWrapped().getTimePositioning(o.__getBundle(),t,n.getLocale())},l=function(){function t(e){var t=e["two-digit-year-start"];return(void 0===t||isNaN(t))&&(t=1950),t=parseInt(t,10)}function n(t){var n=t._ojLocale_,i=e.OraI18nUtils.getBCP47Region(n);return"h"===t.supplemental.prefferedHours[i]}function i(t,n,i){var r,o,a,s=e.OraI18nUtils.getLocaleElementsMainNode(n),l=e.OraI18nUtils.getGetOption(t,i),u=l("formatType","string",["date","time","datetime"],"date"),c=l("dateFormat","string",["short","medium","long","full"],"short"),p=l("timeFormat","string",["short","medium","long","full"],"short"),d=s.dates.calendars.gregorian,h=d.dateFormats,m=d.timeFormats;switch(c){case"full":r=h.full;break;case"long":r=h.long;break;case"medium":r=h.medium;break;case"short":r=h.short}switch(p){case"full":o=m.full;break;case"long":o=m.long;break;case"medium":o=m.medium;break;case"short":o=m.short}return void 0===r||"datetime"!==u&&"date"!==u||(a=r),void 0===o||"datetime"!==u&&"time"!==u||(Oe&&(o=o.replace(be,"")),a=a?a+" "+o:o),a}function r(e,t){for(var n=0,i=!1,r=0,o=e.length;r<o;r++){var a=e.charAt(r);switch(a){case"'":i?t.push("'"):n+=1,i=!1;break;case"\\":i&&t.push("\\"),i=!i;break;default:t.push(a),i=!1}}return n}function o(e,t,n){var i,r=void 0!==t.year||void 0!==t.month||void 0!==t.weekday||void 0!==t.day,o=void 0!==t.hour||void 0!==t.minute||void 0!==t.second;i=r&&o?"MM/dd/yy hh:mm:ss a":r?"MM/dd/yy":"hh:mm:ss a";var a=new SyntaxError("Unexpected character(s) "+n+' encountered in the pattern "'+e+' An example of a valid pattern is "'+i+'".'),s={errorCode:"optionValueInvalid",parameterMap:{propertyName:"pattern",propertyValue:e,"propertyValueHint ":i}};throw a.errorInfo=s,a}function a(t,n,i,r){for(var o,a=e.OraI18nUtils.getLocaleElementsMainNode(n).dates.calendars.gregorian.dateTimeFormats.availableFormats,s=["weekday","era","year","month","day","hour","minute","second","timeZoneName"],l={"2-digit":0,numeric:1,narrow:2,short:3,long:4},u=-1/0,c=Object.keys(a),p=0;p<c.length;p++){var d=c[p],h=!1,m={};m.pattern=a[d];for(var g=0,f=Se.exec(d);null!==f;){var _=f[0];("h"!==_&&"hh"!==_||r)&&("H"!==_&&"HH"!==_||!r)?void 0!==Re[_]&&(m[Re[_].key]=Re[_].value):h=!0,f=Se.exec(d)}if(!h){for(var v=0;v<s.length;v++){var y=t[s[v]],E=m[s[v]];if(void 0===y&&void 0!==E)g-=20;else if(void 0!==y&&void 0===E)g-=120;else if(void 0!==y&&void 0!==E){var S=l[y],b=l[E],O=Math.max(Math.min(b-S,2),-2);2===O?g-=6:1===O?g-=3:-1===O?g-=6:-2===O&&(g-=8)}}g>u&&(u=g,o=m)}}return void 0!==o?o.pattern:null}function s(e,t,n,i){return void 0!==n?(e[t]=n,i[n]):""}function c(e,t,n){var i;if(Object.keys(t).length>1)return null;for(var r=e.length;r>0;r--)if(void 0!==(i=n[e.substr(0,r)]))return i;return e}function p(t,r,o,l){function u(n){if(void 0!==v){var i=(r=m,a=o,s="symbols-numberSystem-"+e.OraI18nUtils.getNumberingSystemKey(r,a),r.numbers[s].decimal);i=void 0===d&&void 0===h&&void 0===y?"S":"ss"+i+"SSS",n=n.replace("ss",i),void 0===y&&(t.second=void 0)}var r,a,s,l=f("timeZoneName","string",["short","long"]);return void 0!==l&&(n=n.replace(/v/,{short:"z",long:"zzzz"}[l])),n}var p,d,h,m=e.OraI18nUtils.getLocaleElementsMainNode(r),g=e.OraI18nUtils.getLocaleElementsMainNodeKey(r),f=e.OraI18nUtils.getGetOption(t,l),_=f("formatMatcher","string",["basic","munger"],"munger");0===Object.keys(t).length&&(t={year:"numeric",month:"numeric",day:"numeric"});var v=f("millisecond","string",["numeric","2-digit"]),y=f("second","string",["numeric","2-digit"]);void 0!==v&&(d=f("hour","string",["numeric","2-digit"]),h=f("minute","string",["numeric","2-digit"]),t.second="2-digit");var E=function(t,i,r){var o="",a="",l={},u={},c=e.OraI18nUtils.getGetOption(t,r),p=c("era","string",["narrow","short","long"]);o+=s(l,"era",p,{narrow:"GGGGG",short:"GGG",long:"GGGG"}),o+=s(l,"year",p=c("year","string",["2-digit","numeric"]),{"2-digit":"yy",numeric:"y"}),o+=s(l,"month",p=c("month","string",["2-digit","numeric","narrow","short","long"]),{"2-digit":"MM",numeric:"M",narrow:"MMMMM",short:"MMM",long:"MMMM"}),o+=s(l,"weekday",p=c("weekday","string",["narrow","short","long"]),{narrow:"EEEEE",short:"E",long:"EEEE"}),o+=s(l,"day",p=c("day","string",["2-digit","numeric"]),{"2-digit":"dd",numeric:"d"});var d=c("hour12","boolean",[!0,!1]);return void 0===d&&(d=n(i)),a+=s(u,"hour",p=c("hour","string",["2-digit","numeric"]),!0===d?{"2-digit":"hh",numeric:"h"}:{"2-digit":"HH",numeric:"H"}),a+=s(u,"minute",p=c("minute","string",["2-digit","numeric"]),{"2-digit":"mm",numeric:"m"}),a+=s(u,"second",p=c("second","string",["2-digit","numeric"]),{"2-digit":"ss",numeric:"s"}),[o,a+=s(u,"timeZoneName",p=c("timeZoneName","string",["short","long"]),{short:"v",long:"v"}),l,u]}(t,r,l);if(void 0!==le[g]){var S=le[g].dates.calendars.gregorian.dateTimeFormats[E[0]+E[1]];if(void 0!==S)return S=u(S)}if(""===E[0]&&""===E[1])return i(t,r,l);var b=m.dates.calendars.gregorian.dateTimeFormats.availableFormats,O=b[E[0]],C=f("hour12","boolean",[!0,!1]);void 0===C&&(C=n(r)),void 0===O&&""!==E[0]&&(null===(O=c(E[0],E[2],b))&&(O=a(E[2],r,0,C)),null!==O?"basic"!==_&&(O=function(t,n,i){var r=t,o=e.OraI18nUtils.getGetOption(n,i),a=o("year","string",["2-digit","numeric"]),s={"2-digit":"yy",numeric:"yyyy"};if(void 0!==a&&(r=r.replace(/y{1,4}/,s[a])),void 0!==(a=o("month","string",["2-digit","numeric","narrow","short","long"]))&&(void 0!==(s={"2-digit":"MM",numeric:"M",narrow:"MMMMM",short:"MMM",long:"MMMM"})[a]&&s[a].length>2?r=(r=r.replace(/M{3,5}/,s[a])).replace(/L{3,5}/,{"2-digit":"LL",numeric:"L",narrow:"LLLLL",short:"LLL",long:"LLLL"}[a]):"2-digit"===a&&(de.lastIndex=0,de.test(t)&&(r=r.replace("M","MM")),he.test(t)&&(r=r.replace("L","LL")))),void 0!==(a=o("weekday","string",["narrow","short","long"]))&&(r=(r=r.replace(/E{1,5}/,{narrow:"EEEEE",short:"EEE",long:"EEEE"}[a])).replace(/c{1,5}/,{narrow:"ccccc",short:"ccc",long:"cccc"}[a])),void 0!==(a=o("day","string",["2-digit","numeric"]))&&"2-digit"===a){me.lastIndex=0,_e.lastIndex=0;var l=_e.test(t);!0===me.test(t)&&!1===l&&(r=r.replace("d","dd"))}return r}(O,t,l)):O=E[0]);var T=b[E[1]];return void 0===T&&""!==E[1]&&(null===(T=c(E[1],E[3],b))&&(T=a(E[3],r,0,C)),null!==T?"basic"!==_&&(T=function(t,n,i){var r=t;if("2-digit"===e.OraI18nUtils.getGetOption(n,i)("hour","string",["2-digit","numeric"])){ge.lastIndex=0,fe.lastIndex=0;var o=t.replace(fe,""),a=ge.exec(o);if(null!==a){ye.lastIndex=0;var s=ye.exec(a[0]),l=s[0]+s[0];r=t.replace(s[0],l)}}return r}(T,t,l)):T=E[1]),p=O||"",void 0!==T&&(""!==p?p+=" "+T:p=T),void 0===le[g]&&(le[g]={},le[g].dates={},le[g].dates.calendars={},le[g].dates.calendars.gregorian={},le[g].dates.calendars.gregorian.dateTimeFormats={}),le[g].dates.calendars.gregorian.dateTimeFormats[E[0]+E[1]]=p,p=u(p)}function d(e){var t=e.split(" "),n=t[0].split("-"),i=new Date(n[0],n[1]-1,n[2]);return t.length>1&&(n=t[1].split(":"),i.setHours(n[0]),i.setMinutes(n[1])),i.getTime()}function h(e,t,n){var i=new Date(e[0],e[1]-1,e[2],e[3],e[4],e[5]).getTime(),r=t.split("/"),o=r[0],a=r[1],s=n[o];if(void 0===s)return null;if(void 0===(s=s[a]))return null;for(var l,u,c=s.length,p=0;p<c;p++){var h=s[p].usesMetazone._from,m=s[p].usesMetazone._to,g=s[p].usesMetazone._mzone;if(void 0===h&&void 0===m)return g;if(void 0===h&&void 0!==m&&i<=(u=d(m)))return g;if(void 0!==h&&void 0===m&&i>=(l=d(h)))return g;if(void 0!==h&&void 0!==m&&(l=d(h),u=d(m),i>=l&&i<u))return g}}function m(t,n,i,r,o){var a=e.OraI18nUtils.getLocaleElementsMainNode(t),s="",l=i.timeZone,u=e.OraI18nUtils.getGetOption(i,"OraDateTimeConverter")("dst","boolean",[!0,!1],!1);if(void 0===l)return s;var c,p,d=h(n,l,t.supplemental.metazones),m="standard",_=!o,v=g(l,t),y=f(v,n,u,_,!0);if(void 0!==a.dates.timeZoneNames.metazone&&(c=a.dates.timeZoneNames.metazone[d]),void 0===c){var E=v.ofset(y);return e.OraI18nUtils.getTimeStringFromOffset(Ue,E,!0,!0)}p=1===r?c.long:c.short;var S=v.ofset(y);return S<v.ofset(y+1)&&(m="daylight"),void 0!==p&&void 0!==(s=p[m])?s:e.OraI18nUtils.getTimeStringFromOffset(Ue,S,!0,!0)}function g(e,t){return u.getInstance().getZone(e,t)}function f(e,t,n,i,r){var o=Date.UTC(t[0],t[1]-1,t[2],t[3],t[4],t[5]);return e.parse(o,n,i,r)}function _(e){var t=e.split(":");return 2===t.length?(t[0]=parseInt(t[0],10),t[1]=parseInt(t[1],10)):3===e.length?(t[0]=parseInt(e,10),t[1]=0):(t[0]=parseInt(e.substr(0,3),10),t[1]=parseInt(e.substr(3),10)),t}function v(t,n,i,a){function s(e,t){switch(t){case 0:return e[0];case 1:return e[1];case 2:return e[2];case 3:var n=new Date(e[0],e[1]-1,e[2],e[3],e[4],e[5]);return Ce[n.getDay()];default:return}}function l(t,i,r,o,a){var s;switch(o.timePart){case"hour":s=11===o.end1?i[3]%12:i[3],"h"===a||"hh"===a?0===s&&(s=12):"k"!==a&&"kk"!==a||0===s&&(s=24);break;case"minute":s=i[4];break;case"second":s=void 0===n.second&&void 0!==n.millisecond?0:i[5];break;case"millisec":s=i[6]}t.push(r>1?e.OraI18nUtils.padZeros(s,r):s)}function u(n,r,o){var a,s,l,u=r.timeZone,c=S("dst","boolean",[!0,!1],!1),p=!o;if(void 0!==u)l=f(s=g(u,t),n,c,p,!0),a=-s.ofset(l);else if(i.format!==Ae)switch(i.format){case Me:var d=_(i.timeZone),h=d[0],m=d[1];a=60*h+(e.OraI18nUtils.startsWith(i.timeZone,"-")?-m:m);break;case Ie:default:a=0}return a}var c,d,h,v=i.isoStrParts,y=0===i.dateTime.indexOf("T"),E=e.OraI18nUtils.getLocaleElementsMainNode(t),S=e.OraI18nUtils.getGetOption(n,"OraDateTimeConverter.format");d=n.pattern||p(n,t,a,"OraDateTimeConverter.format"),c=[];var b,O,C,T,I,A=0,P=E.dates.calendars.gregorian,D=n.timeZone;for(i.format!==Ae&&void 0!==D&&ee(i,n,t);;){var M=Se.lastIndex,U=Se.exec(d);if(A+=r(d.slice(M,U?U.index:d.length),c),!U)break;if(A%2)c.push(U[0]);else{var N=U[0],L=N.length,R=Re[N];switch(R.token){case"days":h=P[R.token][R.style][R.dLen],c.push(h[s(v,3)]);break;case"months":h=P[R.token][R.style][R.mLen],c.push(h[s(v,1)]);break;case"dayOfMonth":case"monthIndex":c.push((b=c,O=v,C=R.getPartIdx,T=L,I=s(O,C),void b.push(T>1?e.OraI18nUtils.padZeros(I,T):I)));
- break;case"year":h=v[0],2===L&&(h%=100),c.push(e.OraI18nUtils.padZeros(h,L));break;case"time":l(c,v,L,R,N);break;case"ampm":h=v[3]<12?P.dayPeriods.format.wide.am:P.dayPeriods.format.wide.pm,c.push(h);break;case"tzhm":0===(h=u(v,n,y))?"XX"===R.key?c.push("Z"):c.push("+0000"):void 0!==h&&c.push((h<=0?"-":"+")+e.OraI18nUtils.padZeros(Math.floor(Math.abs(h/60)),2)+e.OraI18nUtils.padZeros(Math.floor(Math.abs(h%60)),2));break;case"tzhsepm":0===(h=u(v,n,y))?c.push("Z"):void 0!==h&&c.push((h<=0?"-":"+")+e.OraI18nUtils.padZeros(Math.floor(Math.abs(h/60)),2)+":"+e.OraI18nUtils.padZeros(Math.floor(Math.abs(h%60)),2));break;case"tzh":0===(h=u(v,n,y))?c.push("Z"):void 0!==h&&c.push((h<=0?"-":"+")+e.OraI18nUtils.padZeros(Math.floor(Math.abs(h/60)),2));break;case"tzid":h=void 0!==D?D:i.format===Ie?Ue:"",c.push(h);break;case"tzAbbrev":h=m(t,v,n,0,y),c.push(h);break;case"tzFull":h=m(t,v,n,1,y),c.push(h);break;case"era":h=P.eras.eraAbbr,c.push(h[1]);break;case"slash":c.push("/");break;default:o(d,n,N)}}}return c.join("")}function y(e,t){return e.getFullYear()===t.getFullYear()}function E(e,t){return t.getFullYear()-e.getFullYear()==1}function S(e,t){return y(e,t)&&e.getMonth()===t.getMonth()}function b(e,t){return y(e,t)?t.getMonth()-e.getMonth()==1:!!E(e,t)&&11===e.getMonth()&&0===t.getMonth()}function O(t,n){var i=t.getDate(),r=n.getDate();return b(t,n)&&(r+=e.OraI18nUtils._getDaysInMonth(t.getFullYear,t.getMonth())),r-i}function C(t,n){var i=t._ojLocale_,r=e.OraI18nUtils.getBCP47Region(i),o=t.supplemental.weekData.firstDay,a=o[r];void 0===a&&(a=o["001"]);var s=n-a;return s<0&&(s+=7),s}function T(e,t,n){if(!S(t,n)&&!b(t,n))return!1;var i=O(t,n)+C(e,t.getDay());return i>=7&&i<=13}function I(e,t){return y(e,t)&&S(e,t)&&e.getDate()===t.getDate()}function A(e,t){return!(!S(e,t)&&!b(e,t))&&1===O(e,t)}function P(e,t){return A(t,e)}function D(t,n,i){var r=e.OraI18nUtils._IsoStrParts(t),o=e.OraI18nUtils._IsoStrParts(n);return i?(r=Date.UTC(r[0],r[1]-1,r[2],0,0,0,0),o=Date.UTC(o[0],o[1]-1,o[2],0,0,0,0)):(r=Date.UTC(r[0],r[1]-1,r[2],r[3],r[4],r[5],r[6]),o=Date.UTC(o[0],o[1]-1,o[2],o[3],o[4],o[5],o[6])),r-o}function M(e,t){return e.replace(/\{(\d+)\}/g,function(){return t[arguments[1]]})}function U(t,n,i,r){var o=e.OraI18nUtils.getLocaleElementsMainNode(r).dates.fields,a=e.OraI18nUtils.getGetOption(i,"OraDateTimeConverter.formatRelative")("dateField","string",["day","week","month","year","hour","minute","second"]),s=e.OraI18nUtils.isoToLocalDate(t),l=e.OraI18nUtils.isoToLocalDate(n);switch(a){case"day":return I(s,l)?o.day["relative-type-0"]:A(s,l)?o.day["relative-type-1"]:P(s,l)?o.day["relative-type--1"]:L(t,n,r,"day");case"week":return function(e,t,n){if(t>n){var i=t;t=n,n=i}if(!S(t,n)&&!b(t,n))return!1;var r=O(t,n)+C(e,t.getDay());return r>=0&&r<=6}(r,s,l)?o.week["relative-type-0"]:T(r,s,l)?o.week["relative-type-1"]:function(e,t,n){return T(e,n,t)}(r,s,l)?o.week["relative-type--1"]:L(t,n,r,"week");case"month":return S(s,l)?o.month["relative-type-0"]:b(s,l)?o.month["relative-type-1"]:b(l,s)?o.month["relative-type--1"]:L(t,n,r,"month");case"year":return y(s,l)?o.year["relative-type-0"]:E(s,l)?o.year["relative-type-1"]:function(e,t){return E(t,e)}(s,l)?o.year["relative-type--1"]:L(t,n,r,"year");case"hour":return L(t,n,r,"hour");case"minute":return L(t,n,r,"minute");case"second":return L(t,n,r,"second")}return null}function N(e){return e.split("-")[0]}function L(t,n,i,r){var o,a,s,l=e.OraI18nUtils.getLocaleElementsMainNodeKey(i),u=e.OraI18nUtils.getLocaleElementsMainNode(i),c=N(l),p=i.supplemental.plurals,d=u.dates.fields,h=D(n,t,!1),m=Math.abs(h),g=(a=function(e){return 4800*e/146097}((o=m)/864e5),s=a/12,{year:Math.round(s),month:Math.round(a),week:Math.round(o/6048e5),day:Math.round(o/864e5),hour:Math.round(o/36e5),minute:Math.round(o/6e4),second:Math.round(o/1e3),millisecond:o});if(null===r&&(r=(g.second<Te.s?"second":g.minute<Te.m&&"minute")||g.hour<Te.h&&"hour"||g.day<Te.d&&"day"||g.week<Te.w&&"week"||g.month<Te.M&&"month"||"year"),"second"===r&&g.second<Te.s)return d[r]["relative-type-0"];var f="relativeTimePattern-count-"+p[c](g[r]),_=h<0?"relativeTime-type-past":"relativeTime-type-future",v=d[r][_][f];return void 0===v&&(f="relativeTimePattern-count-other",v=d[r][_][f]),v=M(v,[g[r]])}function R(t,n,i){var r=e.OraI18nUtils.dateToLocalIso(new Date);if("number"==typeof t)t=e.OraI18nUtils.dateToLocalIso(new Date(t));else{if("string"!=typeof t)return null;if(""===e.OraI18nUtils.trim(t))return null}void 0===i&&(i={formatUsing:"displayName"});var o=e.OraI18nUtils.getGetOption(i,"OraDateTimeConverter.formatRelative"),a=o("relativeTime","string",["fromNow","toNow"],"fromNow"),s=o("dateField","string",["day","week","month","year","hour","minute","second"]);if(t=function(t,n,i){var r=i.timeZone;if(e.OraI18nUtils.getISOStrFormatInfo(t).format===Ae&&void 0===r)return t;var o={isoStrFormat:"zulu"};void 0!==r&&(o.timeZone=r,o.dst=!0);var a=ie(t,n,o,"en-US");return o={timeZone:e.OraI18nUtils.getLocalTimeZoneOffset(),isoStrFormat:"local"},ie(a.value,n,o,"en-US").value}(t,n,i),"toNow"===a){var l=r;r=t,t=l}return"calendar"===o("formatUsing","string",["displayName","calendar"],"displayName")?function(t,n,i,r){var o,a,s,l,u=e.OraI18nUtils.getLocaleElementsMainNode(i),c=u.dates.calendars.gregorian.dateTimeFormats.long,p=u.dates.calendars.gregorian.days.format.wide,d=u.dates.fields,h=e.OraI18nUtils.isoToLocalDate(n),m=e.OraI18nUtils.isoToLocalDate(t),g=e.OraI18nUtils.getISOStrFormatInfo(n);if(I(m,h))o=d.day["relative-type-0"];else if(A(m,h))o=d.day["relative-type-1"];else if(P(m,h))o=d.day["relative-type--1"];else{s=h.getDay(),l=Ce[s];var f=D(n,t,!0);if((f/=864e5)<-1&&f>-7)o=d[l]["relative-type--1"];else{if(!(f>1&&f<7))return v(i,{year:"numeric",month:"numeric",day:"numeric"},g,"en-US");o=p[l]}}return r?o:(a=v(i,{hour:"numeric",minute:"numeric"},g,"en-US"),c=M(c=c.replace(/'/g,""),[a,o]))}(r,t,n,o("dateOnly","boolean",[!0,!1],!1)):void 0!==s?U(r,t,i,n):L(r,t,n,null)}function w(e,t){var n=new Error("The weekday "+e+" does not match the date "+t),i={errorCode:"dateToWeekdayMismatch",parameterMap:{weekday:e,date:t}};throw n.errorInfo=i,n}function V(e,t,n){var i,r;2===n?(i='The value "'+e+'" does not match the expected date-time format "'+t+'"',r="datetimeFormatMismatch"):0===n?(i='The value "'+e+'" does not match the expected date format "'+t+'"',r="dateFormatMismatch"):(i='The value "'+e+'" does not match the expected time format "'+t+'"',r="timeFormatMismatch");var o=new Error(i),a={errorCode:r,parameterMap:{value:e,format:t}};throw o.errorInfo=a,o}function j(e,t){if(t<100){var n=e%100;t+=100*Math.floor(e/100)+(t<n?100:0)}return t}function x(t,n){for(var i={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},r=Object.keys(t),o=0;o<r.length;o++){var a=r[o];if(e.OraI18nUtils.trim(e.OraI18nUtils.toUpper(t[a]))===e.OraI18nUtils.trim(n))return i[a]}return-1}function k(t,n){for(var i=Object.keys(t),r=0;r<i.length;r++){var o=i[r];if(e.OraI18nUtils.trim(e.OraI18nUtils.toUpper(t[o]))===e.OraI18nUtils.trim(n))return r}return-1}function B(t,n,i){var r,o,a=e.OraI18nUtils.getLocaleElementsMainNode(t),s=a.dates.calendars.gregorian.days.format,l=a.dates.calendars.gregorian.days["stand-alone"];switch(i){case 0:o=[s.abbreviated,s.wide];break;case 1:o=[l.abbreviated,l.wide]}return n=e.OraI18nUtils.toUpper(n),-1===(r=x(o[0],n))&&(r=x(o[1],n)),r}function F(t,n,i){var r,o=-1,a=e.OraI18nUtils.getLocaleElementsMainNode(t),s=a.dates.calendars.gregorian.months.format,l=a.dates.calendars.gregorian.months["stand-alone"];switch(i){case 0:r=[s.wide,s.abbreviated];break;case 1:r=[l.wide,l.abbreviated];break;case 2:r=[s.wide,s.abbreviated,l.wide,l.abbreviated];break;default:return-1}n=e.OraI18nUtils.toUpper(n);for(var u=0;u<r.length;u++)if(-1!==(o=k(r[u],n)))return o;return o}function H(e,t,n,i,r,o,a){if(t<n||t>i){var s=new RangeError(r+" is out of range. Enter a value between "+o+" and "+a+" for "+e),l={errorCode:"datetimeOutOfRange",parameterMap:{value:r,minValue:o,maxValue:a,propertyName:e}};throw s.errorInfo=l,s}}function G(e,t){for(var n=0;n<e.length;n++)if(void 0!==e[n][t])return n;return 0}function Y(t,n,i,r,o){var a=e.OraI18nUtils.getLocaleElementsMainNode(r).dates.calendars.gregorian.dayPeriods.format.wide.pm;ve.lastIndex=0;var s=0,l=0,u=0,c=0,p=ve.exec(n);switch(null===p&&V(n,i,o),void 0!==p[1]&&(s=parseInt(p[1],10)),void 0!==p[2]&&(l=parseInt(p[2],10)),void 0!==p[3]&&(u=parseInt(p[3],10)),void 0!==p[4]&&(c=parseInt(p[4],10)),ye.lastIndex=0,(p=ye.exec(i))[0]){case"h":12===s&&(s=0),H("hour",s,0,11,s,1,12),-1!==e.OraI18nUtils.toUpper(n).indexOf(e.OraI18nUtils.toUpper(a))&&s<12&&(s+=12);break;case"K":H("hour",s,0,11,s,0,11),-1!==e.OraI18nUtils.toUpper(n).indexOf(e.OraI18nUtils.toUpper(a))&&s<12&&(s+=12);break;case"H":H("hour",s,0,23,s,0,23);break;case"k":24===s&&(s=0),H("hour",s,0,23,s,1,24)}H("minute",l,0,59,l,0,59),H("second",u,0,59,u,0,59),H("millisec",c,0,999,c,0,999),t.setHours(s,l,u,c)}function W(t,n){for(var i=e.OraI18nUtils.getLocaleElementsMainNode(n),r=i.dates.calendars.gregorian.days.format,o=i.dates.calendars.gregorian.days["stand-alone"],a=[r.wide,r.abbreviated,o.wide,o.abbreviated],s=0;s<a.length;s++)for(var l=Object.keys(a[s]),u=0;u<l.length;u++){var c=a[s][l[u]];if(new RegExp(c+"\\b","i").test(t))return c}return null}function Z(n,i,r,o,a){var s=n;n=e.OraI18nUtils.toUpper(n);var l,u,c,p=e.OraI18nUtils.getLocaleElementsMainNode(o),d=p.dates.calendars.gregorian.months.format,h=p.dates.calendars.gregorian.months["stand-alone"],m=[d.wide,d.abbreviated,h.wide,h.abbreviated],g=!1;for(u=0;u<m.length;u++){l=[];var f,_=Object.keys(m[u]);for(f=0;f<_.length;f++)c=e.OraI18nUtils.toUpper(m[u][_[f]]),l.unshift({idx:f,name:c});for(l.sort(function(e,t){return t.idx-e.idx}),f=0;f<l.length;f++)if(c=l[f].name,-1!==n.indexOf(c)){g=!0,n=n.replace(c,"");break}if(g)break}if(!g)return function(n,i,r,o,a){pe.lastIndex=0;var s=pe.exec(n);null===s&&V(n,i,a?2:0);var l,u,c,p,d,h,m=[{y:i.indexOf("y")},{M:i.indexOf("M")},{d:i.indexOf("d")}];m.sort(function(e,t){var n=Object.keys(e)[0],i=Object.keys(t)[0];return e[n]-t[i]});var g=G(m,"d"),f=!1,_=!1;for(h=1;h<=3;h++){var v=s[h];(v.length>2||v>31)&&(l=v,f=!0,p=h-1)}for(f||(p=G(m,"y"),l=s[G(m,"y")+1]),h=0;h<3;h++)if(h!==p&&s[h+1]>12){c=s[h+1],_=!0,d=h;break}if(_){for(h=0;h<3;h++)if(h!==d&&h!==p){u=s[h+1];break}void 0===u&&(u=s[G(m,"M")+1])}else p===G(m,"d")?(c=s[G(m,"y")+1],u=s[G(m,"M")+1]):p===G(m,"M")?(c=s[G(m,"d")+1],u=s[G(m,"y")+1]):(c=s[G(m,"d")+1],u=s[G(m,"M")+1]);u-=1;var y=e.OraI18nUtils._getDaysInMonth(l,u);_&&g!==d&&u>12&&H("month",c,0,11,c,1,12),H("month",u,0,11,u+1,1,12),H("day",c,1,y,c,1,y),H("year",l=j(t(r),parseInt(l,10)),0,9999,l,0,9999);var E=new Date(l,u,c),S=W(n,o);if(null!==S){var b=B(o,S,0);E.getDay()!==b&&w(S,E.getDate())}var O={value:E,offset:"",warning:"lenient parsing was used"};if(a){var C=n.substr(pe.lastIndex);0===C.length?O.value.setHours(0,0,0,0):Y(O.value,C,i,o,2)}return O.value=e.OraI18nUtils.dateToLocalIso(O.value),O}(s,i,r,o,a);var v=F(o,c,2);H("month",v,0,11,v,1,12);var y=W(s,o),E=new RegExp(y+"\\W","i");null!==y&&(n=n.replace(E,"")),ce.lastIndex=0;var S=ce.exec(n);null===S&&V(s,i,a?2:0);var b,O,C,T=[{y:i.indexOf("y")},{d:i.indexOf("d")}];T.sort(function(e,t){var n=Object.keys(e)[0],i=Object.keys(t)[0];return e[n]-t[i]});var I=!1;for(u=1;u<=2;u++){var A=S[u];(A.length>2||A>31)&&(b=A,I=!0,C=u-1)}I||(C=G(T,"y"),b=S[G(T,"y")+1]),O=C===G(T,"d")?S[G(T,"y")+1]:S[G(T,"d")+1],H("year",b=j(t(r),parseInt(b,10)),0,9999,b,0,9999);var P=new Date(b,v,O);if(null!==y){var D=B(o,y,0);P.getDay()!==D&&w(y,P.getDate())}var M=e.OraI18nUtils._getDaysInMonth(b,v);H("day",O,1,M,O,1,M);var U={value:P,offset:"",warning:"lenient parsing was used"};if(a){var N=n.substr(ce.lastIndex);0===N.length?U.value.setHours(0,0,0,0):Y(U.value,N,i,o,2)}return U.value=e.OraI18nUtils.dateToLocalIso(U.value),U}function z(t,n,i,r){switch(J(i,"OraDateTimeConverter.parse")){case 0:return Z(t,n,i,r,!1);case 1:var o=new Date;return Y(o,t,n,r,1),{value:e.OraI18nUtils.dateToLocalIso(o),offset:"",warning:"lenient parsing was used"};case 2:return Z(t,n,i,r,!0)}return null}function q(t,n,i,r,o,a,s,l,u,c,p){var d,h=e.OraI18nUtils.getLocaleElementsMainNode(t).dates.calendars.gregorian[n][o];return H(p,d="months"===n?F(t,i,a):B(t,i,a),s,l,i,h[r][u],h[r][c]),d}function K(e,t,n,i){var r=t;r[n.timePart]=e,"h"===i||"hh"===i?12===e&&(r[n.timePart]=0):"k"!==i&&"kk"!==i||24===e&&(r[n.timePart]=0),H(n.timePart,r[n.timePart],n.start1,n.end1,e,n.start2,n.end2)}function $(n,i,a,s){var l=e.OraI18nUtils.getLocaleElementsMainNode(s),u=l.dates.calendars.gregorian.eras.eraAbbr[1],c=e.OraI18nUtils.trimNumber(u);n=n.replace(u,c);var p=e.OraI18nUtils.getGetOption(a,"OraDateTimeConverter.parse")("lenientParse","string",["none","full"],"full"),d=J(a,"OraDateTimeConverter.parse"),h=function(e,t){for(var n=e.replace(Ee,"\\\\$1"),i=["^"],a=[],s=0,l=0,u=Se.exec(n);null!==u;){var c=n.slice(s,u.index);if(s=Se.lastIndex,(l+=r(c,i))%2)i.push(u[0]);else{var p,d=u[0];void 0!==Re[d]?p=Re[d].regExp:o(e,t,d),p&&i.push(p),a.push(u[0])}u=Se.exec(n)}r(n.slice(s),i),i.push("$");var h={regExp:i.join("").replace(/\s+/g,"\\s+"),groups:a};return h}(i,a),m=new RegExp(h.regExp).exec(n);if(null===m){if("full"===p)return z(n,i,a,s);V(n,i,d)}for(var _,v=h.groups,y=null,E=null,S=null,b=null,O="",C=null,T=!1,I={hour:0,minute:0,second:0,millisec:0},A=l.dates.calendars.gregorian.dayPeriods.format.wide.pm,P=t(a),D=0,M=v.length;D<M;D++){var U=m[D+1];if(U){var N=v[D],L=parseInt(U,10),R=Re[N];switch(R.token){case"months":E=q(s,R.token,U,R.mLen,R.style,R.matchIndex,0,11,"1","12","month name");break;case"days":_=U,b=q(s,R.token,U,R.dLen,R.style,R.matchIndex,0,6,"sun","sat","weekday");break;case"time":K(L,I,R,N);break;case"dayOfMonth":if((S=L)>31&&"full"===p)try{return z(n,i,a,s)}catch(t){var x=e.OraI18nUtils._getDaysInMonth(y,E);H("day",S,1,x,S,1,x)}break;case"monthIndex":if((E=L-1)>11&&"full"===p)try{return z(n,i,a,s)}catch(e){H("month",E,0,11,E+1,1,12)}break;case"year":H("year",y=j(P,L),0,9999,y,0,9999);break;case"ampm":T=-1!==e.OraI18nUtils.toUpper(U).indexOf(e.OraI18nUtils.toUpper(A));break;case"tzhm":O=U.substr(-2),O=U.substr(0,3)+":"+O;break;case"tzhsepm":O=U;break;case"tzh":O=U+":00";break;case"tzid":C=U}}}var k=new Date;null===y&&(y=k.getFullYear()),null===E&&null===S?(E=k.getMonth(),S=k.getDate()):null===S&&(S=1),H("month",E,0,11,E+1,1,12);var B=e.OraI18nUtils._getDaysInMonth(y,E);H("day",S,1,B,S,1,B),k.setFullYear(y,E,S),null!==b&&k.getDay()!==b&&w(_,k.getDate()),T&&I.hour<12&&(I.hour+=12);var F=[y,E+1,S,I.hour,I.minute,I.second,I.millisec],G=e.OraI18nUtils.partsToIsoString(F);if(null!==C){var Y=g(C,s),W=f(Y,F,!1,!0,!0);O=-Y.ofset(W),O=e.OraI18nUtils.getTimeStringFromOffset("",O,!1,!0)}return""!==O&&(G+=O),{value:G}}function X(e,t,n){for(var i=n.replace(Ee,"\\\\$1"),a=["^"],s=0,l=0,u={locale:e,numberingSystem:t,calendar:"gregorian"},c=Se.exec(i);null!==c;){var p=i.slice(l,c.index);if(l=Se.lastIndex,(s+=r(p,a))%2==0){var d=c[0];"/"!==d&&"zzzz"!==d&&"zzz"!==d&&"zz"!==d&&"z"!==d&&(void 0!==Re[d]?(void 0!==Re[d].key&&(u[Re[d].key]=Re[d].value),"kk"===d||"HH"===d||"H"===d||"k"===d?u.hour12=!1:"KK"!==d&&"hh"!==d&&"h"!==d&&"K"!==d||(u.hour12=!0)):o(n,u,d))}c=Se.exec(i)}return u}function J(t,n){if(void 0!==t.pattern)return function(e){var t=X("","",e),n=void 0!==t.year||void 0!==t.month||void 0!==t.weekday||void 0!==t.day,i=void 0!==t.hour||void 0!==t.minute||void 0!==t.second||void 0!==t.millisecond;return n&&i?2:i?1:0}(t.pattern);var i=e.OraI18nUtils.getGetOption(t,n),r=void 0!==i("hour","string",["2-digit","numeric"])||void 0!==i("minute","string",["2-digit","numeric"])||void 0!==i("second","string",["2-digit","numeric"])||void 0!==i("millisecond","string",["numeric"]),o=void 0!==i("year","string",["2-digit","numeric"])||void 0!==i("month","string",["2-digit","numeric","narrow","short","long"])||void 0!==i("day","string",["2-digit","numeric"])||void 0!==i("weekday","string",["narrow","short","long"]);if(o&&r)return 2;if(r)return 1;if(o)return 0;var a=i("formatType","string",["date","time","datetime"],"date");return"datetime"===a?2:"time"===a?1:0}function Q(e,t){var n=f(e,t,!1,!0,!1),i=e.ofset(n),r=e.ofset(n+1);return Math.max(i,r)}function ee(t,n,i){var r,o,a,s,l=t.isoStrParts,u=t.format,c=g(n.timeZone,i);switch(r=Date.UTC(l[0],l[1]-1,l[2],l[3],l[4],l[5]),u){case Me:var p=_(t.timeZone),d=p[0],h=p[1];o=60*d+(d<0?-h:h);break;case Ie:o=0}r-=6e4*((a=Q(c,l))+o);var m=e.OraI18nUtils.getGetOption(n,"OraDateTimeConverter")("dst","boolean",[!0,!1],!1),f=0===t.dateTime.indexOf("T");s=c.parse(r,m,!f,!1),a=-c.ofset(s),a-=o;var v=new Date(Date.UTC(l[0],l[1]-1,l[2],l[3],l[4],l[5])),y=v.getUTCMinutes()+a;v.setUTCHours(v.getUTCHours()+(y/60<<0),y%60),l[0]=v.getUTCFullYear(),l[1]=v.getUTCMonth()+1,l[2]=v.getUTCDate(),l[3]=v.getUTCHours(),l[4]=v.getUTCMinutes(),l[5]=v.getUTCSeconds()}function te(t,n){var i,r="";switch(t){case 0:r=e.OraI18nUtils.padZeros(n[0],4)+"-"+e.OraI18nUtils.padZeros(n[1],2)+"-"+e.OraI18nUtils.padZeros(n[2],2);break;case 1:r="T"+e.OraI18nUtils.padZeros(n[3],2)+":"+e.OraI18nUtils.padZeros(n[4],2)+":"+e.OraI18nUtils.padZeros(n[5],2),(i=n[6])>0&&(r+="."+e.OraI18nUtils.trimRightZeros(e.OraI18nUtils.padZeros(i,3)));break;default:r=e.OraI18nUtils.padZeros(n[0],4)+"-"+e.OraI18nUtils.padZeros(n[1],2)+"-"+e.OraI18nUtils.padZeros(n[2],2)+"T"+e.OraI18nUtils.padZeros(n[3],2)+":"+e.OraI18nUtils.padZeros(n[4],2)+":"+e.OraI18nUtils.padZeros(n[5],2),(i=n[6])>0&&(r+="."+e.OraI18nUtils.trimRightZeros(e.OraI18nUtils.padZeros(i,3)))}return r}function ne(t,n,i,r,o,a){var s=g(t,o),l=f(s,n,i,r,a),u=s.ofset(l);return e.OraI18nUtils.getTimeStringFromOffset("",u,!0,!0)}function ie(t,n,i,r){var o,a,s=e.OraI18nUtils.getNumberingExtension(r);if(void 0===e.OraI18nUtils.numeringSystems[s]&&(s="latn"),"latn"!==s){for(var l=[],u=0;u<t.length;u++){var c=e.OraI18nUtils.numeringSystems[s].indexOf(t[u]);-1!==c?l.push(c):l.push(t[u])}t=l.join("")}(arguments.length<=2||void 0===i)&&(i={year:"numeric",month:"numeric",day:"numeric"});var d,h,m,_={};return!0===e.OraI18nUtils._ISO_DATE_REGEXP.test(t)?(d=t,o=-1===(m=t.indexOf("T"))?0:m>0?2:1):(a=i.pattern||p(i,n,r,"OraDateTimeConverter.parse"),o=J(i,"OraDateTimeConverter.parse"),d=(_=$(t,a,i,n)).value),h=e.OraI18nUtils.getISOStrFormatInfo(d),void 0!==i.timeZone&&h.format!==Ae&&ee(h,i,n),d=function(t,n,i,r){var o,a,s,l=e.OraI18nUtils.getGetOption(i,"OraDateTimeConverter.parse"),u=l("isoStrFormat","string",[Ie,Me,De,Ae,Pe],Pe),c=l("dst","boolean",[!0,!1],!1),p=!0,d=n.isoStrParts,h=n.timeZone,m=i.timeZone,_=n.format,v=i.isoStrFormat,y=te(t,d);if(0===t||"local"===v)return y;switch(1===t&&(p=!1),u){case Me:void 0===m&&_===Me?y+=h:void 0===m&&_===Ae?y+="":void 0===m&&_===Ie?y+="+00:00":void 0!==m&&(y+=s=ne(m,d,c,p,r,!0));break;case Ie:var E=0;if(void 0===m){if(_===Me){s=h.split(":");var S=parseInt(s[0],10),b=parseInt(s[1],10);E=-(E=60*S+(e.OraI18nUtils.startsWith(s[0],"-")?-b:b))}}else a=f(o=g(m,r),d,c,p,!0),E=s=o.ofset(a);if(0!==E){var O=new Date(Date.UTC(d[0],d[1]-1,d[2],d[3],d[4],d[5],d[6]));E=O.getUTCMinutes()+E,O.setUTCHours(O.getUTCHours()+(E/60<<0),E%60),d[0]=O.getUTCFullYear(),d[1]=O.getUTCMonth()+1,d[2]=O.getUTCDate(),d[3]=O.getUTCHours(),d[4]=O.getUTCMinutes(),d[5]=O.getUTCSeconds(),y=te(t,d)}y+="Z";break;case Pe:void 0!==m?y+=s=ne(m,d,c,p,r,!0):(s=h)&&(y+=s)}return y}(o,h,i,n),_.value=d,_}function re(e,r,o,a,s,u,c,d){var h={locale:d,numberingSystem:c,calendar:"gregorian"};if(0===Object.keys(e).length)return h.year="numeric",h.month="numeric",h.day="numeric",h.lenientParse="full",h;void 0!==o&&(h.timeZone=o,void 0!==s&&(h.isoStrFormat=s)),function(e,t){var n=t,i=e("formatUsing","string",["displayName","calendar"]);void 0!==i&&(n.formatUsing=i),void 0!==(i=e("dateField","string",["day","week","month","year","hour","minute","second"]))&&(n.dateField=i),void 0!==(i=e("relativeTime","string",["fromNow","toNow"]))&&(n.relativeTime=i),void 0!==(i=e("dateOnly","boolean",[!0,!1]))&&(n.dateOnly=i)}(r,h);var m=function(e,t,i,r){var o,a=t,s=!1;return void 0!==i&&(a.dst=i),void 0!==(o=e("year","string",["2-digit","numeric"]))&&(a.year=o,s=!0),void 0!==(o=e("era","string",["narrow","short","long"]))&&(a.era=o,s=!0),void 0!==(o=e("month","string",["2-digit","numeric","narrow","short","long"]))&&(a.month=o,s=!0),void 0!==(o=e("day","string",["2-digit","numeric"]))&&(a.day=o,s=!0),void 0!==(o=e("weekday","string",["narrow","short","long"]))&&(a.weekday=o,s=!0),void 0!==(o=e("hour","string",["2-digit","numeric"]))&&(a.hour=o,s=!0,void 0===(o=e("hour12","boolean",[!0,!1]))&&(o=n(r)),a.hour12=o),void 0!==(o=e("minute","string",["2-digit","numeric"]))&&(a.minute=o,s=!0),void 0!==(o=e("second","string",["2-digit","numeric"]))&&(a.second=o,s=!0),void 0!==(o=e("millisecond","string",["numeric"]))&&(a.millisecond=o,s=!0),s}(r,h,a,u);if(h["two-digit-year-start"]=t(e),!m)return function(e,t,n,r){var o=e,a=i(t,n,l.resolvedOptions),s=r("formatType","string",["date","time","datetime"],"date"),u=r("dateFormat","string",["short","medium","long","full"],"short"),c=r("timeFormat","string",["short","medium","long","full"],"short");o.formatType=s,"datetime"!==s&&"date"!==s||(o.dateFormat=u),"datetime"!==s&&"time"!==s||(o.timeFormat=c),o.patternFromOptions=a,o.lenientParse=r("lenientParse","string",["none","full"],"full")}(h,e,u,r),h;if(void 0!==o){var g=r("timeZoneName","string",["short","long"]);void 0!==g&&(h.timeZoneName=g)}return h.lenientParse=r("lenientParse","string",["none","full"],"full"),h.patternFromOptions=p(h,u,d,"OraDateTimeConverter.resolvedOptions"),h}function oe(n,i,r){var o,a,s;(arguments.length<3||void 0===r)&&(r=e.OraI18nUtils.getLocaleElementsMainNodeKey(n)),(arguments.length<2||void 0===i)&&(i={year:"numeric",month:"numeric",day:"numeric"});var l=e.OraI18nUtils.getGetOption(i,"OraDateTimeConverter.resolvedOptions");void 0!==i&&(a=l("isoStrFormat","string",[Ie,Me,De,Ae,Pe],Pe),s=l("dst","boolean",[!0,!1],!1),o=i.timeZone);var u=e.OraI18nUtils.getNumberingExtension(r);return void 0===e.OraI18nUtils.numeringSystems[u]&&(u="latn"),void 0!==i&&void 0!==i.pattern?function(e,n,i,r,o,a,s){var l=X(r,o,a.pattern);return l.pattern=a.pattern,void 0!==e&&(l.isoStrFormat=e),void 0!==n&&(l.timeZone=n),void 0!==i&&(l.dst=i),l["two-digit-year-start"]=t(a),l.lenientParse=s("lenientParse","string",["none","full"],"full"),l}(a,o,s,r,u,i,l):void 0!==i?re(i,l,o,s,a,n,u,r):function(e,t,n){return{calendar:"gregorian",locale:t,numberingSystem:n,year:"numeric",month:"numeric",day:"numeric",patternFromOptions:p({year:"numeric",month:"numeric",day:"numeric"},e,t,"OraDateTimeConverter.resolvedOptions"),lenientParse:"full"}}(n,r,u)}function ae(){return{format:function(t,n,i,r){var o;if("number"==typeof t)o=e.OraI18nUtils.dateToLocalIso(new Date(t));else{if("string"!=typeof t)return null;if(""===(o=e.OraI18nUtils.trim(t)))return null}(arguments.length<=2||void 0===i)&&(i={year:"numeric",month:"numeric",day:"numeric"});var a=v(n,i,e.OraI18nUtils.getISOStrFormatInfo(o),r),s=e.OraI18nUtils.getNumberingExtension(r);if(void 0===e.OraI18nUtils.numeringSystems[s]&&(s="latn"),"latn"!==s){for(var l=[],u=0;u<a.length;u++)a[u]>="0"&&a[u]<="9"?l.push(e.OraI18nUtils.numeringSystems[s][a[u]]):l.push(a[u]);return l.join("")}return a},formatRelative:function(e,t,n){return R(e,t,n)},parse:function(e,t,n,i){return ie(e,t,n,i)},resolvedOptions:function(e,t,n){return oe(e,t,n)},calculateWeek:function(t){var n,i=e.OraI18nUtils.isoToLocalDate(t),r=new Date(i.getTime());return r.setDate(r.getDate()+4-(r.getDay()||7)),n=r.getTime(),r.setMonth(0),r.setDate(1),Math.floor(Math.round((n-r)/864e5)/7)+1},getAvailableTimeZones:function(t){return function(t){function n(n,i,r,o){var a=n.split("/"),s=a[0],l=a[1],u="",c="",p={},d=o[s];void 0!==d&&void 0!==(u=d[l])&&void 0!==(u=u.exemplarCity)&&(u=" "+u);var m=s+"/"+l,g=t.supplemental.metazones,_=h(f,m,g);void 0!==r&&(_=r[_]),null!=_&&void 0!==_.long&&(void 0===(c=_.long.generic)&&(c=_.long.standard),void 0!==c&&(c=" - "+c));var v="("+Ue+")";return 0!==i&&(v="("+(v=e.OraI18nUtils.getTimeStringFromOffset(Ue,i,!0,!0))+")"),void 0===u||void 0===c?null:(p.offsetLocName=v+u+c,p.locName=u+c,p)}function i(e){for(var i,o=Object.keys(e),a=0;a<o.length;a++){var s=o[a],u=n(s,i=Q(r.getZone(s,t),f),l,c);null!==u&&p.push({id:s,displayName:u}),d[s]=i}}var r=u.getInstance(),o={sensitivity:"variant"},a=e.OraI18nUtils.getLocaleElementsMainNodeKey(t),s=e.OraI18nUtils.getLocaleElementsMainNode(t),l=s.dates.timeZoneNames.metazone,c=s.dates.timeZoneNames.zone,p=[],d={},m=t.supplemental.timeZoneData,g=new Date,f=[g.getFullYear(),g.getMonth()+1,g.getDate(),g.getHours(),g.getMinutes(),g.getSeconds()],_=e.OraI18nUtils.getLocaleElementsMainNodeKey(t);if(void 0!==ue[_]){var v=ue[_].availableTimeZones;if(void 0!==v)return v}i(m.zones),i(m.links),p.sort(function(e,t){return d[t.id]-d[e.id]+e.displayName.locName.localeCompare(t.displayName.locName,a,o)});for(var y=p.length,E=0;E<y;E++)p[E].displayName=p[E].displayName.offsetLocName;return void 0===ue[_]&&(ue[_]={},ue[_].availableTimeZones=p),p}(t)},compareISODates:function(t,n,i){var r=function(t,n){var i={isoStrFormat:Ae},r=e.OraI18nUtils.getISOStrFormatInfo(t),o=e.OraI18nUtils.getISOStrFormatInfo(n),a=r.format,s=o.format;return a===Ae||s===Ae?i:(i.isoStrFormat=Ie,i)}(t,n),o=ie(t,i,r,"en-US"),a=ie(n,i,r,"en-US"),s=o.value.replace("Z",""),l=a.value.replace("Z",""),u=e.OraI18nUtils._IsoStrParts(s);u=Date.UTC(u[0],u[1]-1,u[2],u[3],u[4],u[5],u[6]);var c=e.OraI18nUtils._IsoStrParts(l);return u-(c=Date.UTC(c[0],c[1]-1,c[2],c[3],c[4],c[5],c[6]))},isHour12:function(e){return n(e)},getTimePositioning:function(t,n,i){var r=oe(t,n,i),o=r.pattern||r.patternFromOptions;o=(o=o.replace(/'[^']*'/g,"").replace(/[^hHkKma]*/g,"")).replace(/(h|H|k|K)+/,"h").replace(/m+/,"m");var a=N(e.OraI18nUtils.getLocaleElementsMainNodeKey(t)),s="ar"===a||"he"===a,l={},u=0,c=o.length;for(u=0;u<c;u++)l[o.charAt(u)]=u;return s&&(u=l.h,l.h=l.m,l.m=u),l}}}var se,le={},ue={},ce=/(\d{1,4})\D+?(\d{1,4})/g,pe=/(\d{1,4})\D+?(\d{1,4})\D+?(\d{1,4})/g,de=/^[M][^M]|[^M]M[^M]|[^M]M$|^M$/g,he=/^[L][^L]|[^L]L[^L]|[^L]L$|^L$/g,me=/^[d][^d]|[^d]d[^d]|[^d]d$|^d$|^d[^d]/,ge=/(?:^|[^h])h[^h]|[^H]H[^H]|[^k]k[^k]|[^K]K[^K]|^H[^H]|^H$|[^h]h$/,fe=/'.*'/,_e=/'[^d]*d[^d]*'/,ve=/(\d{1,2})(?:\D+?(\d{1,2}))?(?:\D+?(\d{1,2}))?(?:\D+?(\d{1,3}))?/g,ye=/h|H|K|k/g,Ee=/([\^$.*+?|\[\](){}])/g,Se=/ccccc|cccc|ccc|cc|c|EEEEE|EEEE|EEE|EE|E|dd|d|MMMMM|MMMM|MMM|MM|M|LLLLL|LLLL|LLL|LL|L|yyyy|yy|y|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|aa|a|SSS|SS|S|zzzz|zzz|zz|z|v|ZZZ|ZZ|Z|XXX|XX|X|VV|GGGGG|GGGG|GGG|GG|G/g,be=/\s?(?:\(|\[)?z{1,4}(?:\)|\])?/g,Oe=!1,Ce={0:"sun",1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat"},Te={s:46,m:46,h:23,d:7,w:4,M:12},Ie="zulu",Ae="local",Pe="auto",De="invariant",Me="offset",Ue="UTC",Ne="(\\D+|\\d\\d?\\D|\\d\\d?|\\D+\\d\\d?)",Le="(\\D+|\\D+\\d\\d?)",Re={MMM:{token:"months",style:"format",mLen:"abbreviated",matchIndex:0,key:"month",value:"short",regExp:Ne},MMMM:{token:"months",style:"format",mLen:"wide",matchIndex:0,key:"month",value:"long",regExp:Ne},MMMMM:{token:"months",style:"format",mLen:"narrow",matchIndex:0,key:"month",value:"narrow",regExp:Ne},LLL:{token:"months",style:"stand-alone",mLen:"abbreviated",matchIndex:1,key:"month",value:"short",regExp:Ne},LLLL:{token:"months",style:"stand-alone",mLen:"wide",matchIndex:1,key:"month",value:"long",regExp:Ne},LLLLL:{token:"months",style:"stand-alone",mLen:"narrow",matchIndex:1,key:"month",value:"narrow",regExp:Ne},E:{token:"days",style:"format",dLen:"abbreviated",matchIndex:0,key:"weekday",value:"short",regExp:Le},EE:{token:"days",style:"format",dLen:"abbreviated",matchIndex:0,key:"weekday",value:"short",regExp:Le},EEE:{token:"days",style:"format",dLen:"abbreviated",matchIndex:0,key:"weekday",value:"short",regExp:Le},EEEE:{token:"days",style:"format",dLen:"wide",matchIndex:0,key:"weekday",value:"long",regExp:Le},EEEEE:{token:"days",style:"format",dLen:"narrow",matchIndex:0,key:"weekday",value:"narrow",regExp:Le},c:{token:"days",style:"stand-alone",dLen:"abbreviated",matchIndex:1,key:"weekday",value:"short",regExp:Le},cc:{token:"days",style:"stand-alone",dLen:"abbreviated",matchIndex:1,key:"weekday",value:"short",regExp:Le},ccc:{token:"days",style:"stand-alone",dLen:"abbreviated",matchIndex:1,key:"weekday",value:"short",regExp:Le},cccc:{token:"days",style:"stand-alone",dLen:"wide",matchIndex:1,key:"weekday",value:"long",regExp:Le},ccccc:{token:"days",style:"stand-alone",dLen:"narrow",matchIndex:1,key:"weekday",value:"narrow",regExp:Le},h:{token:"time",timePart:"hour",start1:0,end1:11,start2:1,end2:12,key:"hour",value:"numeric",regExp:"(\\d\\d?)"},hh:{token:"time",timePart:"hour",start1:0,end1:11,start2:1,end2:12,key:"hour",value:"2-digit",regExp:"(\\d\\d?)"},K:{token:"time",timePart:"hour",start1:0,end1:11,start2:0,end2:11,key:"hour",value:"numeric",regExp:"(\\d\\d?)"},KK:{token:"time",timePart:"hour",start1:0,end1:11,start2:0,end2:11,key:"hour",value:"2-digit",regExp:"(\\d\\d?)"},H:{token:"time",timePart:"hour",start1:0,end1:23,start2:0,end2:23,key:"hour",value:"numeric",regExp:"(\\d\\d?)"},HH:{token:"time",timePart:"hour",start1:0,end1:23,start2:0,end2:23,key:"hour",value:"2-digit",regExp:"(\\d\\d?)"},k:{token:"time",timePart:"hour",start1:0,end1:23,start2:1,end2:24,key:"hour",value:"numeric",regExp:"(\\d\\d?)"},kk:{token:"time",timePart:"hour",start1:0,end1:23,start2:1,end2:24,key:"hour",value:"2-digit",regExp:"(\\d\\d?)"},m:{token:"time",timePart:"minute",start1:0,end1:59,start2:0,end2:59,key:"minute",value:"numeric",regExp:"(\\d\\d?)"},mm:{token:"time",timePart:"minute",start1:0,end1:59,start2:0,end2:59,key:"minute",value:"2-digit",regExp:"(\\d\\d?)"},s:{token:"time",timePart:"second",start1:0,end1:59,start2:0,end2:59,key:"second",value:"numeric",regExp:"(\\d\\d?)"},ss:{token:"time",timePart:"second",start1:0,end1:59,start2:0,end2:59,key:"second",value:"2-digit",regExp:"(\\d\\d?)"},S:{token:"time",timePart:"millisec",start1:0,end1:999,start2:0,end2:999,key:"millisecond",value:"numeric",regExp:"(\\d{1,3})"},SS:{token:"time",timePart:"millisec",start1:0,end1:999,start2:0,end2:999,key:"millisecond",value:"numeric",regExp:"(\\d{1,3})"},SSS:{token:"time",timePart:"millisec",start1:0,end1:999,start2:0,end2:999,key:"millisecond",value:"numeric",regExp:"(\\d{1,3})"},d:{token:"dayOfMonth",key:"day",value:"numeric",getPartIdx:2,regExp:"(\\d\\d?)"},dd:{token:"dayOfMonth",key:"day",value:"2-digit",getPartIdx:2,regExp:"(\\d\\d?)"},M:{token:"monthIndex",key:"month",value:"numeric",getPartIdx:1,regExp:"(\\d\\d?)"},MM:{token:"monthIndex",key:"month",value:"2-digit",getPartIdx:1,regExp:"(\\d\\d?)"},L:{token:"monthIndex",key:"month",value:"numeric",getPartIdx:1,regExp:"(\\d\\d?)"},LL:{token:"monthIndex",key:"month",value:"2-digit",getPartIdx:1,regExp:"(\\d\\d?)"},y:{token:"year",key:"year",value:"numeric",regExp:"(\\d{1,4})"},yy:{token:"year",key:"year",value:"2-digit",regExp:"(\\d\\d?)"},yyyy:{token:"year",key:"year",value:"numeric",regExp:"(\\d{1,4})"},a:{token:"ampm",key:"hour12",value:!0,regExp:"(\\D*)"},z:{token:"tzAbbrev",regExp:"(.+?)"},v:{token:"tzAbbrev",key:"timeZoneName",value:"short",regExp:"(.+?)"},zz:{token:"tzAbbrev",regExp:"(.+?)"},zzz:{token:"tzAbbrev",regExp:"(.+?)"},zzzz:{token:"tzFull",regExp:"(.+?)"},Z:{token:"tzhm",regExp:"([+-]?\\d{1,4})"},ZZ:{token:"tzhm",regExp:"([+-]?\\d{1,4})"},ZZZ:{token:"tzhm",regExp:"([+-]?\\d{1,4})"},X:{token:"tzh",regExp:"([+-]?\\d{1,2})"},XX:{token:"tzhm",key:"XX",regExp:"([+-]?\\d{1,4})"},XXX:{token:"tzhsepm",regExp:"([+-]?\\d{1,2}:\\d{1,2})"},VV:{token:"tzid",regExp:"(.+?)"},G:{token:"era",key:"era",value:"short",regExp:Le},GG:{token:"era",key:"era",value:"short",regExp:Le},GGG:{token:"era",key:"era",value:"short",regExp:Le},GGGG:{token:"era",key:"era",value:"long",regExp:Le},GGGGG:{token:"era",key:"era",value:"narrow",regExp:Le},"/":{token:"slash",regExp:"(\\/)"}};return{getInstance:function(){return se||(se=ae()),se}}}();var u=function(){function e(e,t){for(var n="",i=Math.abs(e),r=Math.floor(i),o=function(e,t){for(var n=".",i="";t>0;){t-=1,e*=60;var r=Math.floor(e+y);n+=v[r],e-=r,r&&(i+=n,n="")}return i}(i-r,Math.min(t,10));r>0;)n=v[r%60]+n,r=Math.floor(r/60);return e<0&&(n="-"+n),
- n&&o?n+o:(o||"-"!==n)&&(n||o)||"0"}function t(e){return e>96?e-87:e>64?e-29:e-48}function n(e){var n=0,i=e.split("."),r=i[0],o=i[1]||"",a=1,s=0,l=1;for(45===e.charCodeAt(0)&&(n=1,l=-1);n<r.length;n++)s=60*s+t(r.charCodeAt(n));for(n=0;n<o.length;n++)a/=60,s+=t(o.charCodeAt(n))*a;return s*l}function i(e){for(var t=0;t<e.length;t++)e[t]=n(e[t])}function r(e,t){for(var n=[],i=0;i<t.length;i++)n[i]=e[t[i]];return n}function o(e,t){var n=t.split("|"),o=n[1].split(" "),a=n[2].split(""),s=n[3].split(" ");return i(o),i(a),i(s),function(e,t){for(var n=0;n<t;n++)e[n]=Math.round((e[n-1]||0)+e[n]*m);e[t-1]=1/0}(s,a.length),{name:e,abbrs:r(n[0].split(" "),a),offsets:r(o,a),untils:s}}function a(){var e=new Error("The input time does not exist because it falls during the transition to daylight saving time.");throw e.errorInfo={errorCode:"nonExistingTime"},e}function s(t,n){var i=n.zones[t];if(h.test(t)){var r=t.replace(h,"").split(":"),a=60*parseInt(r[0],10),s=0;if(isNaN(a))return;if(2===r.length&&(s=parseInt(r[1],10),isNaN(s)))return;if((a+=a>=0?s:-s)<f||a>_)return;a=e(a,1),i=t.replace("/etc//i","").toUpperCase()+"|"+a+"|0|"}void 0!==i&&this._set(o(t,i))}function l(e){return(e||"").toLowerCase().replace(/\//g,"_")}function u(e,t){var n=l(e);return void 0===d[n]&&function(e,t){var n=new s(e,t),i=l(n.name);d[i]=n}(e,t),d[l(e)]||null}function c(){return{getZone:function(e,t){var n=t.supplemental.timeZoneData;void 0===n&&function(){var e=new Error("TimeZone data is missing. Please call require 'ojs/ojtimezonedata' in order to load the TimeZone data.");throw e.errorInfo={errorCode:"missingTimeZoneData"},e}();var i=u(e,n);if(!i){var r=n.links[e];r&&(i=u(r,n))}return i||function(e){var t=new Error("invalid timeZone ID: "+e),n={errorCode:"invalidTimeZoneID",parameterMap:{timeZoneID:e}};throw t.errorInfo=n,t}(e),i}}}var p,d={},h=/^Etc\/GMT/i,m=6e4,g=60*m,f=-840,_=720,v="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX",y=1e-6;return s.prototype={_set:function(e){this.name=e.name,this.abbrs=e.abbrs,this.untils=e.untils,this.offsets=e.offsets},parse:function(e,t,n,i){for(var r=this.offsets,o=this.untils,s=o.length-1,l=0;l<s;l++){var u=r[l],c=r[l+1],p=o[l],d=p-u*m,h=d-g;if(e>=d&&e<d+g&&u>c){if(!0!==i)return l+1;a()}if(e>=h&&e<d&&u<c)return t?l:l+1;if(e<p-u*m)return!1===n?t?u<c?l:l+1:u<c?l+1:l:l}return s},abbr:function(e){return this.abbrs[e]},ofset:function(e){var t=this.offsets.length;return e>=0&&e<t?parseInt(this.offsets[e],10):parseInt(this.offsets[t-1],10)},len:function(){return this.offsets.length}},{getInstance:function(){return p||(p=c()),p}}}(),c={};return c.DateRestrictionValidator=e.DateRestrictionValidator,c.DateTimeConverter=e.DateTimeConverter,c.DateTimeRangeValidator=e.DateTimeRangeValidator,c.IntlDateTimeConverter=e.IntlDateTimeConverter,c}),define("ojs/ojvalidation-number",["ojs/ojcore","jquery","ojs/ojconfig","ojs/ojtranslation","ojL10n!ojtranslations/nls/localeElements","ojs/ojlocaledata","ojs/ojvalidation-base","ojs/ojlogger"],function(e,t,n,i,r,o,a,s){"use strict";e.NumberConverter=function(){this.Init()},e.Object.createSubclass(e.NumberConverter,e.Converter,"oj.NumberConverter"),e.NumberConverter.prototype.Init=function(t){e.NumberConverter.superclass.Init.call(this,t)},e.NumberConverter.prototype.format=function(t){return e.NumberConverter.superclass.format.call(this,t)},e.NumberConverter.prototype.parse=function(t){return e.NumberConverter.superclass.parse.call(this,t)},e.NumberRangeValidator=function(e){this.Init(e)},e.Object.createSubclass(e.NumberRangeValidator,e.Validator,"oj.NumberRangeValidator"),e.NumberRangeValidator.prototype.Init=function(t){e.NumberRangeValidator.superclass.Init.call(this),t&&(this._min=t.min,this._max=t.max,this._converter=a.IntlConverterUtils.getConverterInstance(t.converter),this._hint=t.hint||{},this._customMessageSummary=t.messageSummary||{},this._customMessageDetail=t.messageDetail||{})},e.NumberRangeValidator.prototype.validate=function(t){var n=t?t.toString():t,r=parseFloat(n),o=this._customMessageSummary,a=this._customMessageDetail,s=a.rangeOverflow,l=a.rangeUnderflow,u=a.exact,c=o.rangeOverflow,p=o.rangeUnderflow,d=void 0!==this._min?parseFloat(this._min):null,h=void 0!==this._max?parseFloat(this._max):null,m=d&&this._converter?this._converter.format(d):d,g=h&&this._converter?this._converter.format(h):h,f="",_="",v=null,y=i;if(null===t)return t;if(null!==d&&null!==h){if(r>=d&&r<=h||d>h)return n}else if(null!==d){if(r>=d)return n}else if(null===h||r<=h)return n;throw null!==h&&null!==d&&d===h?(v={value:t,num:g},_=u?y.applyParameters(u,v):y.getTranslatedString("oj-validator.range.number.messageDetail.exact",v),r>h?f=c||y.getTranslatedString("oj-validator.range.number.messageSummary.rangeOverflow"):r<d&&(f=c?p:y.getTranslatedString("oj-validator.range.number.messageSummary.rangeUnderflow"))):null!==h&&r>h?(v={value:t,max:g},f=c||y.getTranslatedString("oj-validator.range.number.messageSummary.rangeOverflow"),_=s?y.applyParameters(s,v):y.getTranslatedString("oj-validator.range.number.messageDetail.rangeOverflow",v)):(v={value:t,min:m},f=p||y.getTranslatedString("oj-validator.range.number.messageSummary.rangeUnderflow"),_=l?y.applyParameters(l,v):y.getTranslatedString("oj-validator.range.number.messageDetail.rangeUnderflow",v)),new e.ValidatorError(f,_)},e.NumberRangeValidator.prototype.getHint=function(){var e=null,t=this._hint,n=t.inRange,r=t.exact,o=t.min,a=t.max,s=i,l=void 0!==this._min?parseFloat(this._min):null,u=void 0!==this._max?parseFloat(this._max):null,c=l&&this._converter?this._converter.format(l):l,p=u&&this._converter?this._converter.format(u):u;return null!==l&&null!==u?e=l!==u?n?s.applyParameters(n,{min:c,max:p}):s.getTranslatedString("oj-validator.range.number.hint.inRange",{min:c,max:p}):r?s.applyParameters(r,{num:c}):s.getTranslatedString("oj-validator.range.number.hint.exact",{num:c}):null!==l?e=o?s.applyParameters(o,{min:c}):s.getTranslatedString("oj-validator.range.number.hint.min",{min:c}):null!==u&&(e=a?s.applyParameters(a,{max:p}):s.getTranslatedString("oj-validator.range.number.hint.max",{max:p})),e},e.NumberConverterFactory=function(){return{createConverter:function(t){return function(t){return new e.IntlNumberConverter(t)}(t)}}}(),a.Validation.__registerDefaultConverterFactory(e.ConverterFactory.CONVERTER_TYPE_NUMBER,e.NumberConverterFactory),e.NumberRangeValidatorFactory=function(){return{createValidator:function(t){return function(t){return new e.NumberRangeValidator(t)}(t)}}}(),a.Validation.__registerDefaultValidatorFactory(e.ValidatorFactory.VALIDATOR_TYPE_NUMBERRANGE,e.NumberRangeValidatorFactory),e.IntlNumberConverter=function(e){this.Init(e)},e.Object.createSubclass(e.IntlNumberConverter,e.NumberConverter,"oj.IntlNumberConverter"),e.IntlNumberConverter.prototype.Init=function(t){e.IntlNumberConverter.superclass.Init.call(this,t)},e.IntlNumberConverter.prototype._getWrapped=function(){return this._wrapped||(this._wrapped=l.getInstance()),this._wrapped},e.IntlNumberConverter.prototype.format=function(t){if(null==t||"string"==typeof t&&0===e.StringUtils.trim(""+t).length||"number"==typeof t&&isNaN(t))return a.IntlConverterUtils.__getNullFormattedValue();var r,l=n.getLocale(),u=o.__getBundle(),c=this.resolvedOptions();try{r=this._getWrapped().format(t,u,c,l)}catch(e){throw this._processConverterError(e,t)}if("NaN"===r){var p=i.getTranslatedString("oj-converter.number.invalidNumberFormat.summary",{value:t}),d=i.getTranslatedString("oj-converter.number.invalidNumberFormat.detail");s.error(p+" "+d)}return r},e.IntlNumberConverter.prototype.getHint=function(){return null},e.IntlNumberConverter.prototype.getOptions=function(){return e.IntlNumberConverter.superclass.getOptions.call(this)},e.IntlNumberConverter.prototype.parse=function(t){var i,r,a;if(null==t||""===t)return null;i=n.getLocale(),r=o.__getBundle(),a=this.resolvedOptions();try{return this._getWrapped().parse(e.StringUtils.trim(t),r,a,i)}catch(e){throw this._processConverterError(e,t)}},e.IntlNumberConverter.prototype.resolvedOptions=function(){var t,i=n.getLocale();if(i!==this._locale||!this._resolvedOptions){t=e.LocaleData.__getBundle();try{if(!t)return s.error("locale bundle for the current locale %s is unavailable",i),{};this._resolvedOptions=this._getWrapped().resolvedOptions(t,this.getOptions(),i),this._locale=i}catch(e){throw this._processConverterError(e)}}return this._resolvedOptions},e.IntlNumberConverter.prototype._processConverterError=function(t,n){var r,o,s,l,u=t.errorInfo;if(u){var c=u.errorCode,p=u.parameterMap;switch(e.Assert.assertObject(p),c){case"optionTypesMismatch":case"optionTypeInvalid":case"optionOutOfRange":case"optionValueInvalid":r=a.IntlConverterUtils.__getConverterOptionError(c,p);break;case"decimalFormatMismatch":s="oj-converter.number.decimalFormatMismatch.summary";break;case"currencyFormatMismatch":s="oj-converter.number.currencyFormatMismatch.summary";break;case"percentFormatMismatch":s="oj-converter.number.percentFormatMismatch.summary";break;case"unsupportedParseFormat":l=i.getTranslatedString("oj-converter.number.shortLongUnsupportedParse.summary"),o=i.getTranslatedString("oj-converter.number.shortLongUnsupportedParse.detail"),r=new e.ConverterError(l,o)}s&&(l=i.getTranslatedString(s,{value:n||p.value,format:p.format}),o=i.getTranslatedString("oj-converter.hint.detail",{exampleValue:this._getHintValue()}),r=new e.ConverterError(l,o))}return r||(l=t.message,o=t.message,r=new e.ConverterError(l,o)),r},e.IntlNumberConverter.prototype._getHintValue=function(){var t="";try{t=this.format(12345.98765)}catch(n){n instanceof e.ConverterError&&(t="",s.error("error retrieving hint value in format"))}return t};var l=function(){function t(e,t,n){var i;for(i=e.length;i<t;i+=1)e=n?"0"+e:e+"0";return e}function n(e,t,n,i,r){var o=e[t];return void 0!==o?(o=Number(o),(isNaN(o)||o<n||o>i)&&function(e,t,n,i){var r=new RangeError(e+" is out of range. Enter a value between "+t+" and "+n+" for "+i),o={errorCode:"numberOptionOutOfRange",parameterMap:{value:e,minValue:t,maxValue:n,propertyName:i}};throw r.errorInfo=o,r}(o,n,i,t),Math.floor(o)):r}function i(e){var t=e||"en-US",n=t.indexOf("-u-nu-"),i="latn";return-1!==n&&(i=t.substr(n+6,4)),i}function r(t,r,a,l){var u,c=r,p=e.OraI18nUtils.getLocaleElementsMainNode(t),d=function(e,t){if(void 0===t)return"latn";var n=i(t),r="symbols-numberSystem-"+n;return void 0===e.numbers[r]&&(n="latn"),n}(p,l);c.numberingSystemKey=d,c.numberingSystem="symbols-numberSystem-"+d;var h=a.lenientParse;if(c.lenientParse=h||"full",c.style=a.style,void 0!==a.pattern&&a.pattern.length>0)u=a.pattern;else{var m;switch(c.style){case"decimal":m="decimalFormats-numberSystem-";break;case"currency":m="currencyFormats-numberSystem-";break;case"percent":m="percentFormats-numberSystem-";break;default:m="decimalFormats-numberSystem-"}m+=c.numberingSystemKey,u=p.numbers[m].standard;var _=a.decimalFormat;void 0===_&&(_=a.currencyFormat),void 0===_||"decimal"!==c.style&&"currency"!==c.style||(c.shortDecimalFormat=p.numbers["decimalFormats-numberSystem-latn"][_].decimalFormat)}var v=p.numbers[c.numberingSystem].decimal,y=p.numbers[c.numberingSystem].group,E=a.separators;if(void 0!==E){c.separators=E;var T=E.decimal,I=E.group;void 0!==T&&""!==T&&(v=E.decimal),void 0!==I&&(y=E.group)}var A=e.OraI18nUtils.getLocaleElementsMainNodeKey(t),P=A.split("-")[0];if(c.plurals=t.supplemental.plurals,c.lang=P,c.pat=u,c.minusSign=p.numbers[c.numberingSystem].minusSign,c.decimalSeparator=v,c.exponential=p.numbers[c.numberingSystem].exponential,c.groupingSeparator=y,c.currencyDisplay=a.currencyDisplay,void 0!==a.currency&&(c.currencyCode=a.currency.toUpperCase()),void 0!==a.unit&&(c.unit=a.unit.toLowerCase()),function(e,t,n,i){for(var r,a=i,s=!1,l=!1,u=0,c=0,p=!0,d=1;d>=0&&c<t.length;--d){var h=!1,m="",_="",v=-1,y=1,E=0,T=0,I=0,A=-1,P=-1,D=0;p=!0;for(var M=c;M<t.length;++M){var U=t.charAt(M);switch(D){case 0:case 2:if(h){if(U===z){M+1<t.length&&t.charAt(M+1)===z?(M+=1,p?m=m.concat("''"):_=_.concat("''")):h=!1;continue}}else{if(U===G||U===x||U===k||U===B){D=1,M-=1;continue}if(U===q){void 0===e.currency&&o("style"),a.style="currency";var N=M+1<t.length&&t.charAt(M+1)===q;N&&(M+=1),p?m=m.concat(N?"'¤¤":"'¤"):_=_.concat(N?"'¤¤":"'¤");continue}if(U===z){if(U===z){M+1<t.length&&t.charAt(M+1)===z?(M+=1,p?m=m.concat("''"):_=_.concat("''")):h=!0;continue}}else{if(U===Y){0!==D&&0!==d||g(t),c=M+1,M=t.length;continue}if(U===F){a.style="percent",1!==y&&g(t),a.isPercent=!0,y=100,p?m=m.concat("'%"):_=_.concat("'%");continue}if(U===H){1!==y&&g(t),a.style="perMill",a.isPerMill=!0,y=1e3,p?m=m.concat("'‰"):_=_.concat("'‰");continue}if(U===Z){p?m=m.concat("'-"):_=_.concat("'-");continue}}}p?m=m.concat(U):_=_.concat(U);break;case 1:if(1!==d){0===(u-=1)&&(D=2,p=!1);continue}if(u+=1,U===G)T>0?I+=1:E+=1,A>=0&&v<0&&(A+=1);else if(U===x)I>0&&g(t),T+=1,A>=0&&v<0&&(A+=1);else if(U===k)P=A,A=0;else{if(U!==B){if(V=M,j=W,X=t.substr(V,j.length),null!==new RegExp(j,"i").exec(X)){for(l&&g(t),l=!0,r=0,M+=W.length;M<t.length&&t.charAt(M)===x;)r+=1,u+=1,M+=1;(E+T<1||r<1)&&g(t),D=2,p=!1,M-=1;continue}D=2,p=!1,M-=1,u-=1;continue}v>=0&&g(t),v=E+T+I}}}if(0===T&&E>0&&v>=0){var L=v;0===L&&(L+=1),I=E-L,E=L-1,T=1}if((v<0&&I>0||v>=0&&(v<E||v>E+T)||0===A||h)&&g(t),1===d){O=S=m,C=b=_;var R=E+T+I,w=v>=0?v:R;a.minimumIntegerDigits=w-E,a.maximumIntegerDigits=l?E+a.minimumIntegerDigits:K,a.maximumFractionDigits=v>=0?R-v:0,a.minimumFractionDigits=v>=0?E+T-v:0,a.groupingSize=A>0?A:0,a.groupingSize0=P}else O=m,C=_,s=!0}var V,j,X;0===t.length&&(S="",b="",a.minimumIntegerDigits=0,a.maximumIntegerDigits=K,a.minimumFractionDigits=0,a.maximumFractionDigits=$),a.useExponentialNotation=l,a.minExponentDigits=r,(!s||0===O.localeCompare(S)&&0===C.localeCompare(b))&&("currency"===a.style&&"ar"===a.lang?(C=b+"'-",O=S):(C=b,O="'-"+S)),!function(e,t){var n=t,i={};null!==S&&(n.positivePrefix=f(S,e,n,i)),null!==b&&(n.positiveSuffix=f(b,e,n,i)),null!==O&&(n.negativePrefix=f(O,e,n,i)),null!==C&&(n.negativeSuffix=f(C,e,n,i)),void 0!==i.name&&(n.positiveSuffix=" "+i.name,n.positivePrefix="","ar"===n.lang?(n.negativeSuffix=e.numbers[n.numberingSystem].minusSign+" "+i.name,n.negativePrefix=""):(n.negativeSuffix=" "+i.name,n.negativePrefix=e.numbers[n.numberingSystem].minusSign))}(n,a)}(a,u,p,c),void 0===a.pattern&&(c.minimumIntegerDigits=n(a,"minimumIntegerDigits",1,21,c.minimumIntegerDigits),void 0!==a.maximumFractionDigits&&(c.maximumFractionDigits=n(a,"maximumFractionDigits",0,20,c.maximumFractionDigits),c.maximumFractionDigits<c.minimumFractionDigits&&(c.minimumFractionDigits=c.maximumFractionDigits)),void 0!==a.minimumFractionDigits&&(c.minimumFractionDigits=n(a,"minimumFractionDigits",0,20,c.minimumFractionDigits)),c.maximumFractionDigits<c.minimumFractionDigits&&(c.maximumFractionDigits=c.minimumFractionDigits,s.info("maximumFractionDigits is less than minimumFractionDigits, so maximumFractionDigits will be set to minimumFractionDigits")),"currency"===c.style&&void 0===a.minimumFractionDigits)){var D=t.supplemental.currencyData.fractions[a.currency];if(void 0!==D){var M=parseInt(D._digits,10);c.minimumFractionDigits=M,c.maximumFractionDigits=M}}}function o(e){var t=new TypeError('The property "currency" is required when the property "'+e+'" is "currency". An accepted value is a three-letter ISO 4217 currency code.'),n={errorCode:"optionTypesMismatch",parameterMap:{propertyName:e,propertyValue:"currency",requiredPropertyName:"currency",requiredPropertyValueValid:"a three-letter ISO 4217 currency code"}};throw t.errorInfo=n,t}function a(t,n){var i=e.OraI18nUtils.getGetOption(t,n),r=i("style","string",["currency","decimal","percent","unit","perMill"],"decimal");if("decimal"===r||"currency"===r){var a="decimal"===r?"decimalFormat":"currencyFormat";r=i(a,"string",["standard","short","long"]),"OraNumberConverter.parse"===n&&void 0!==r&&"standard"!==r&&function(e){var t=new Error("long and short "+e+" are not supported for parsing"),n={errorCode:"unsupportedParseFormat",parameterMap:{shortFormats:e}};throw t.errorInfo=n,t}(a)}var s=i("currency","string");"currency"===r&&void 0===s&&o("style"),s=i("unit","string"),"unit"===r&&void 0===s&&function(e){var t=new TypeError('The property "unit" is required when the property "'+e+'" is "unit". An accepted value is "byte" or "bit".'),n={errorCode:"optionTypesMismatch",parameterMap:{propertyName:e,propertyValue:"unit",requiredPropertyName:"unit",requiredPropertyValueValid:"byte or bit"}};throw t.errorInfo=n,t}("style"),r=i("roundingMode","string",["UP","DOWN","FLOOR","CEILING","HALF_UP","HALF_DOWN","HALF_EVEN"])}function l(e,n,i){var r=i.groupingSize,o=i.groupingSize0,a=i.decimalSeparator,s=e+"",l=s.split(/e/i),c=l.length>1?parseInt(l[1],10):0,p=(l=(s=l[0]).split(".")).length>1?l[1]:"",d=Math.min(i.maximumFractionDigits,p.length-c);l.length>1&&p.length>c&&(e=u(e,d,n.roundingMode||"DEFAULT")),c=(l=(s=Math.abs(e)+"").split(/e/i)).length>1?parseInt(l[1],10):0,s=(l=(s=l[0]).split("."))[0],p=l.length>1?l[1]:"",c>0?(s+=(p=t(p,c,!1)).slice(0,c),p=p.substr(c)):c<0&&(p=(s=t(s,(c=-c)+1,!0)).slice(-c,s.length)+p,s=s.slice(0,-c)),d>0&&p.length>0?(p=p.length>d?p.slice(0,d):t(p,d,!1),!0===M.test(p)&&(p=p.slice(0,i.minimumFractionDigits)),p=a+p):p=i.minimumFractionDigits>0?a:"",p=t(p,a.length+i.minimumFractionDigits,!1);var h=i.groupingSeparator,m="";!1===n.useGrouping&&void 0===n.pattern&&(h="");var g=(s=t(s,i.minimumIntegerDigits,!0)).length-1;for(p=p.length>1?p:"";g>=0;){if(0===r||r>g)return s.slice(0,g+1)+(m.length?h+m+p:p);m=s.slice(g-r+1,g+1)+(m.length?h+m:""),g-=r,o>0&&(r=o)}return s.slice(0,g+1)+h+m+p}function u(e,t,n){var i,r=n,o=e.toString().split(".");if(void 0===o[1])return Math.abs(e);if("DEFAULT"!==n){if("HALF_UP"===n||"HALF_EVEN"===n||"HALF_DOWN"===n){if("5"===o[1][t]){var a=o[1].substr(t);(a=parseInt(a,10))>5&&(r="HALF_UP")}else r="DEFAULT";e=Math.abs(e)}i=function(e,t,n){if(0===t)return Math[n](e);var i=e.toString().split("e"),r=i[0],o=i[1],a=r+"e"+(o?parseInt(o,10)-t:-t),s=parseFloat(a),l=Math[n](s);return i=l.toString().split("e"),r=i[0],o=i[1],a=r+"e"+(o?parseInt(o,10)+t:t),s=parseFloat(a)}(e,-t,r=function(e,t,n,i){var r=L[t];if("HALF_EVEN"===t){var o;if(0===n){var a=e[0].length;o=parseInt(e[0][a-1],10)}else o=parseInt(e[1][n-1],10);r=o%2==0?L.HALF_DOWN:L.HALF_UP}else"UP"===t&&i<0?r=L.DOWN:"DOWN"===t&&i<0&&(r=L.UP);return r}(o,r,t,e))}else{var s=Math.pow(10,t);if(i=Math.round(e*s)/s,!isFinite(i))return e}return Math.abs(i)}function c(n,r,o,a,s){var u=e.OraI18nUtils.getLocaleElementsMainNode(o);if(!isFinite(n))return n===1/0?u.numbers[a.numberingSystem].infinity:n===-1/0?u.numbers[a.numberingSystem].infinity:"NaN";var c=n;!0===a.isPercent||"percent"===a.style?c*=100:!0===a.isPerMill&&(c*=1e3);var p=r.decimalFormat;void 0===p&&(p=r.currencyFormat);var d=a.style;c="decimal"!==d&&"currency"!==d||void 0===p||"standard"===p?!0===a.useExponentialNotation?function(e,n){var i=e+"",r=0,o=i.split(/e/i),a=o[0];D.lastIndex=0;var s=D.exec(a);null!==s?(r=s[1].length-1,a=s[2]):a=a.replace(".","");var l=o.length>1?parseInt(o[1],10):0,u=parseInt(a,10),c=n.minimumIntegerDigits+n.maximumFractionDigits;if(a.length>c){c-=a.length;var p=Math.pow(10,c);u=Math.round(u*p)}var d=n.minimumIntegerDigits+n.minimumFractionDigits;u=t(u+="",d,!1),l-=-1!==i.indexOf(".")?n.minimumIntegerDigits-i.indexOf(".")+r:d-a.length-n.minimumFractionDigits;var h=Math.abs(l);h=t(h+"",n.minExponentDigits,!0),l<0&&(h=n.minusSign+h);var m=u.slice(0,n.minimumIntegerDigits);return m+=u.slice(n.minimumIntegerDigits).length>0?n.decimalSeparator+u.slice(n.minimumIntegerDigits)+n.exponential+h:n.exponential+h}(c,a):"unit"===d?function(t,n,i,r){var o,a,s=Math.abs(t);s>=j?(o="digital-tera",a=s/j):s>=V?(o="digital-giga",a=s/V):s>=w?(o="digital-mega",a=s/w):s>=R?(o="digital-kilo",a=s/R):(o="digital-",a=s),o+=i.unit;var u=i.lang,c=i.plurals[u](a);c="unitPattern-count-"+c,t<0&&(a=-a);var p=l(a,n,i),d=r.units.narrow[o][c];return p=e.OraI18nUtils.formatString(d,[p])}(c,r,a,u):l(c,r,a):function(e,t,n){var i,r,o,a=Math.abs(e),s=function(e){for(var t=Object.keys(U),n=0;n<t.length;n++)for(var i=t[n],r=U[i].length,o=0;o<r;o++)if(U[i][o]<=e)return[i,U[i][o]];return[e,null]}(a),u="";if(null!==s[1]){var c=n.lang,p=n.plurals[c](Math.floor(a/N[s[0]]));if(i=s[1]+"-count-"+p,void 0===(i=n.shortDecimalFormat[i])&&(p="other",i=s[1]+"-count-"+p,i=n.shortDecimalFormat[i]),o=(r=function(e){var t=0,n=0,i=0,r="";if("0"!==e[0]){for(;"0"!==e[t]&&t<e.length;)t+=1;r=e.substr(0,t),i=t}for(t=i;t<e.length&&"0"===e[t];t++)n+=1;return[r,n]}(i))[1],u=r[0],o<i.length){var d=1*Math.pow(10,o);a/=d=s[1]/d*10}}var h="";return void 0!==i&&(h=i.substr(o+r[0].length)),e<0&&(a=-a),h=u+l(a,t,n)+(h=h.replace(/'\.'/g,"."))}(c,r,a);var h="";h+=n<0&&c-0!=0?a.negativePrefix+c+a.negativeSuffix:a.positivePrefix+c+a.positiveSuffix;var m=i(s);if(void 0===e.OraI18nUtils.numeringSystems[m]&&(m="latn"),"latn"!==m){var g,f=[];for(g=0;g<h.length;g++)h[g]>="0"&&h[g]<="9"?f.push(e.OraI18nUtils.numeringSystems[m][h[g]]):f.push(h[g]);return f.join("")}return h}function p(t,n){var i=n.groupingSeparator,r=n.decimalSeparator,o=n.minusSign,a="",s="",l=e.OraI18nUtils.toUpper(n.exponential),u=e.OraI18nUtils.toUpper(t),c=i;u=(u=u.split(l).join("E")).split(c).join("");var p=c.replace(/\u00A0/g," ");c!==p&&(u=u.split(p).join("")),"."===(u=u.split(r).join(".")).charAt(0)&&(u=u.substr(1),s="."),u=u.replace(o,"-");var d=s+A.exec(u)[2];return e.OraI18nUtils.startsWith(d,"-")?(d=d.substr("-".length),a="-"):e.OraI18nUtils.startsWith(u,"+")&&(d=d.substr("+".length),a="+"),[a,d]}function d(t,n,i,r){return isNaN(t)&&h(i.style,i,r),!0===i.isPercent||"percent"===i.style?t/=100:!0===i.isPerMill&&(t/=1e3),e.OraI18nUtils.getGetOption(n,"OraNumberConverter.parse")("roundDuringParse","boolean",[!0,!1],!1)&&(t=function(e,t,n){var i=t.maximumFractionDigits,r=e<0,o=n.roundingMode||"DEFAULT",a=u(e,i,o);return r?-a:a}(t,i,n)),t}function h(e,t,n){var i,r="Unparsable number "+n+" The expected number pattern is "+t.pat;switch(e){case"decimal":i="decimalFormatMismatch";break;case"currency":i="currencyFormatMismatch";break;case"percent":i="percentFormatMismatch"}var o=new Error(r),a={errorCode:i,parameterMap:{value:n,format:t.pat}};throw o.errorInfo=a,o}function m(t,n,o,a){var s=e.OraI18nUtils.getLocaleElementsMainNode(n),l={},u=function(t,n){var r,o=i(n);if(void 0===e.OraI18nUtils.numeringSystems[o])return t;var a=[];for(r=0;r<t.length;r++){var s=e.OraI18nUtils.numeringSystems[o].indexOf(t[r]);-1!==s?a.push(s):a.push(t[r])}return a.join("")}(t,a);r(n,l,o,a);var c=NaN,m=u.replace(/ /g,"");if(T.test(m))return c=parseFloat(u);var g=function(t,n,i,r){var o,a=e.OraI18nUtils.trimNumber(t),s="",l=!1,u=r.numbers[i.numberingSystem].plusSign,c=new RegExp("^"+u.replace(P,"\\$1"));a=a.replace(c,"");var d=e.OraI18nUtils.trimNumber(i.positivePrefix),m=e.OraI18nUtils.trimNumber(i.positiveSuffix),g=e.OraI18nUtils.trimNumber(i.negativePrefix),f=e.OraI18nUtils.trimNumber(i.negativeSuffix),_=new RegExp("^"+(d||"").replace(P,"\\$1")),v=new RegExp((m||"").replace(P,"\\$1")+"$"),y=new RegExp("^"+(g||"").replace(P,"\\$1")),E=new RegExp((f||"").replace(P,"\\$1")+"$");if(!0===y.test(a)&&!0===E.test(a))a=(a=a.replace(y,"")).replace(E,""),s="-",l=!0;else if(!0===_.test(a)&&!0===v.test(a))a=(a=a.replace(_,"")).replace(v,""),s="+",l=!0;else if("currency"===i.style){var S,b=i.currencyCode,O=b;if(void 0!==r.numbers.currencies[b]&&(O=r.numbers.currencies[b].symbol),void 0===i.currencyDisplay||"symbol"===i.currencyDisplay?S=O:"code"===i.currencyDisplay&&(S=b),void 0!==S){var C=(d||"").replace(S,""),T=(m||"").replace(S,""),I=(g||"").replace(S,""),A=(f||"").replace(S,"");_=new RegExp(("^"+C).replace(P,"\\$1")),v=new RegExp(T.replace(P,"\\$1")+"$"),y=new RegExp(("^"+I).replace(P,"\\$1")),E=new RegExp(A.replace(P,"\\$1")+"$"),!0===y.test(a)&&!0===E.test(a)?(a=(a=a.replace(y,"")).replace(E,""),s="-",l=!0):!0===_.test(a)&&!0===v.test(a)&&(a=(a=a.replace(_,"")).replace(v,""),s="+",l=!0)}}return l?o=[s,a]:"full"===i.lenientParse?(o=p(a,i))[2]=!0:h(i.style,i,t),o}(u,0,l,s),f=g[0],_=g[1];if(f=f||"+",g[2])return d(c=parseFloat(f+_),o,l,t);var v=function(t,n){var i,r,o={},a=n.decimalSeparator,s=n.groupingSeparator,l=t.replace(/ /g,""),u=n.exponential,c=l.indexOf(u.toLowerCase());c<0&&(c=l.indexOf(e.OraI18nUtils.toUpper(u))),c<0?(r=l,o.exponent=null):(r=l.substr(0,c),o.exponent=l.substr(c+u.length));var p=a,d=r.indexOf(p);d<0?(i=r,o.fraction=null):(i=r.substr(0,d),o.fraction=r.substr(d+p.length)),i=i.split(s).join("");var h=s.replace(/\u00A0/g," ");return s!==h&&(i=i.split(h).join("")),o.integer=i,o}(_,l),y=v.integer,E=v.fraction,S=v.exponent,b=f+y;if(null!==E&&(b+="."+E),null!==S){var O=function(t,n){var i,r=n.minusSign,o=n.plusSign,a=e.OraI18nUtils.trimNumber(t);return r=e.OraI18nUtils.trimNumber(r),o=e.OraI18nUtils.trimNumber(o),e.OraI18nUtils.startsWith(a,r)?i=["-",a.substr(r.length)]:e.OraI18nUtils.startsWith(a,e.OraI18nUtils.trimNumber(o))&&(i=["+",a.substr(o.length)]),i||["",a]}(S,l);b+="e"+(O[0]||"+")+O[1]}return I.test(b)?c=parseFloat(b):"full"===l.lenientParse?(b=p(u,l),c=parseFloat(b[0]+b[1])):h(l.style,l,t),d(c,o,l,t)}function g(e){var t=new SyntaxError('Unexpected character(s) encountered in the pattern "'+e+' An example of a valid pattern is "#,##0.###".'),n={errorCode:"optionValueInvalid",parameterMap:{propertyName:"pattern",propertyValue:e,propertyValueHint:"#,##0.###"}};throw t.errorInfo=n,t}function f(e,t,n,i){for(var r="",o=0;o<e.length;){var a=e.charAt(o);if(o+=1,a!==z){switch(a){case q:var s=n.currencyCode,l=s,u=s;void 0!==t.numbers.currencies[s]&&(l=t.numbers.currencies[s].displayName,u=t.numbers.currencies[s].symbol),void 0===n.currencyDisplay||"symbol"===n.currencyDisplay?a=u:"code"===n.currencyDisplay?a=s:(a=l,i.name=a);break;case F:a=t.numbers[n.numberingSystem].percentSign;break;case H:a=t.numbers[n.numberingSystem].perMille;break;case Z:a=t.numbers[n.numberingSystem].minusSign}r=r.concat(a)}}return r}function _(e,t,n){var i={locale:n,style:void 0===e.style?"decimal":e.style,useGrouping:void 0===t.useGrouping||t.useGrouping,numberingSystem:e.numberingSystemKey};i.minimumIntegerDigits=e.minimumIntegerDigits,i.minimumFractionDigits=e.minimumFractionDigits,i.maximumFractionDigits=e.maximumFractionDigits,"decimal"===e.style&&void 0!==t.decimalFormat&&(i.decimalFormat=t.decimalFormat),"currency"===e.style&&void 0!==t.currencyFormat&&(i.currencyFormat=t.currencyFormat),"currency"===e.style&&(i.currency=t.currency,i.currencyDisplay=void 0===t.currencyDisplay?"symbol":t.currencyDisplay),void 0!==t.unit&&(i.unit=t.unit),void 0!==t.pattern&&(i.pattern=t.pattern);var r=t.roundingMode,o=t.roundDuringParse;void 0!==r&&(i.roundingMode=r),void 0!==o&&(i.roundDuringParse=o);var a=e.lenientParse;void 0!==a&&(i.lenientParse=a);var s=e.separators;return void 0!==s&&(i.separators=s),i.virtualKeyboardHint=function(e,t){var n="text";switch(t.style){case"unit":n="text";break;case"currency":case"percent":n=void 0===t.pattern?"text":v(e,t);break;default:n=void 0===t.pattern?"short"===t.decimalFormat||"long"===t.decimalFormat?"text":function(e,t){if(void 0===t.useGrouping||t.useGrouping){if("."===e.decimalSeparator&&""===e.groupingSeparator)return"number"}else if("."===e.decimalSeparator)return"number";return"text"}(e,t):v(e,t)}return n}(e,t),i}function v(e,t){var n;if(n=t.pattern,/[^0-9.#]/i.test(n))return"text";var i=function(e){return-1!==e.indexOf(",")}(t.pattern),r=function(e){return-1!==e.indexOf(".")}(t.pattern);if(i&&r){if(""!==e.groupingSeparator||"."!==e.decimalSeparator)return"text";if(e.groupingSeparator===e.decimalSeparator)return"text"}return r&&!i&&"."!==e.decimalSeparator?"text":!r&&i&&""!==e.groupingSeparator?"text":"number"}function y(){return{format:function(e,t,n,i){(arguments.length<=2||void 0===n)&&(n={useGrouping:!0,style:"decimal"}),a(n,"OraNumberConverter.format");var o={};return r(t,o,n,i),c(e,n,t,o,i)},parse:function(e,t,n,i){return"number"==typeof e?e:"[object Number]"===Object.prototype.toString.call(e)?Number(e):((arguments.length<=2||void 0===n)&&(n={useGrouping:!0,style:"decimal"}),a(n,"OraNumberConverter.parse"),m(e,t,n,i))},resolvedOptions:function(t,n,o){return(arguments.length<3||void 0===o)&&(o=e.OraI18nUtils.getLocaleElementsMainNodeKey(t)),(arguments.length<2||void 0===n)&&(n={useGrouping:!0,style:"decimal"}),_(function(t,n,o){var s={};return a(n,"OraNumberConverter.resolvedOptions"),r(t,s,n,o),s.numberingSystemKey=i(o),void 0===e.OraI18nUtils.numeringSystems[s.numberingSystemKey]&&(s.numberingSystemKey="latn"),s}(t,n,o),n,o)}}}var E,S,b,O,C,T=/^[+-]?infinity$/i,I=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,A=/([^+-.0-9]*)([+-]?\d*\.?\d*(E[+-]?\d+)?).*$/,P=/([\^$.*+?|\[\](){}])/g,D=/(^0\.0*)([^0].*$)/,M=/^0+$/,U={trillion:[1e14,1e13,1e12],billion:[1e11,1e10,1e9],million:[1e8,1e7,1e6],thousand:[1e5,1e4,1e3]},N={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},L={HALF_UP:"ceil",CEILING:"ceil",UP:"ceil",HALF_DOWN:"floor",FLOOR:"floor",DOWN:"floor",DEFAULT:"round"},R=1024,w=1048576,V=1073741824,j=1099511627776,x="0",k=",",B=".",F="%",H="‰",G="#",Y=";",W="E",Z="-",z="'",q="¤",K=2147483647,$=2147483647;return{getInstance:function(){return E||(E=y()),E}}}(),u={};return u.NumberConverter=e.NumberConverter,u.NumberRangeValidator=e.NumberRangeValidator,u.IntlNumberConverter=e.IntlNumberConverter,u}),define("ojs/ojvalidation",["ojs/ojcore","jquery","ojL10n!ojtranslations/nls/localeElements","ojs/ojmessaging","ojs/ojvalidation-datetime","ojs/ojvalidation-number"],function(e,t,n){}),define("dateTimeUtils",["ojs/ojcore","ojs/ojvalidation"],function(){"use strict";function e(){}return e.prototype.DEFAULT_FORMAT_TYPE="datetime",e.prototype.DEFAULT_FORMAT="short",e.prototype.getFormattedDateTime=function(e,t,n,i){var r,o,a,s,a,l,u;return t||(t=this.DEFAULT_FORMAT_TYPE),n||(n=this.DEFAULT_FORMAT),i||(i=this.DEFAULT_FORMAT),o=oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME),s={formatType:t,dateFormat:n,timeFormat:i},a=o.createConverter(s),l=new Date(e),u=oj.IntlConverterUtils.dateToLocalIso(l),r=a.format(u)},e.prototype.validateDate=function(e){var t,n,i,n,r,o,a;r="date",o=this.DEFAULT_FORMAT,a=this.DEFAULT_FORMAT,t=oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME),i={formatType:r,dateFormat:o,timeFormat:a},n=t.createConverter(i);try{return n.parse(e),!0}catch(e){return!1}},e.prototype.validateTime=function(e){var t,n,i,n,r,o,a;r="time",o=this.DEFAULT_FORMAT,a=this.DEFAULT_FORMAT,t=oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME),i={formatType:r,dateFormat:o,timeFormat:a},n=t.createConverter(i);try{return n.parse(e),!0}catch(e){return!1}},new e}),!function(e,t,n,i){"use strict";function r(e,t,n){return setTimeout(u(e,n),t)}function o(e,t,n){return!!Array.isArray(e)&&(a(e,n[t],n),!0)}function a(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function s(t,n,i){var r="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,r,i),t.apply(this,arguments)}}function l(e,t,n){var i,r=t.prototype;i=e.prototype=Object.create(r),i.constructor=e,i._super=r,n&&pe(i,n)}function u(e,t){return function(){return e.apply(t,arguments)}}function c(e,t){return typeof e==me?e.apply(t?t[0]||i:i,t):e}function p(e,t){return e===i?t:e}function d(e,t,n){a(f(t),function(t){e.addEventListener(t,n,!1)})}function h(e,t,n){a(f(t),function(t){e.removeEventListener(t,n,!1)})}function m(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function g(e,t){return e.indexOf(t)>-1}function f(e){return e.trim().split(/\s+/g)}function _(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function v(e){return Array.prototype.slice.call(e,0)}function y(e,t,n){for(var i=[],r=[],o=0;o<e.length;){
- var a=t?e[o][t]:e[o];_(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort(function(e,n){return e[t]>n[t]}):i.sort()),i}function E(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),a=0;a<de.length;){if(n=de[a],r=n?n+o:t,r in e)return r;a++}return i}function S(){return Ee++}function b(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||e}function O(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){c(e.options.enable,[e])&&n.handler(t)},this.init()}function C(e){var t,n=e.options.inputClass;return new(t=n?n:Oe?x:Ce?F:be?G:j)(e,T)}function T(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&Me&&i-r===0,a=t&(Ne|Le)&&i-r===0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,I(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function I(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=D(t)),r>1&&!n.firstMultiple?n.firstMultiple=D(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,l=t.center=M(i);t.timeStamp=_e(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=R(s,l),t.distance=L(s,l),A(n,t),t.offsetDirection=N(t.deltaX,t.deltaY);var u=U(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=fe(u.x)>fe(u.y)?u.x:u.y,t.scale=a?V(a.pointers,i):1,t.rotation=a?w(a.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,P(n,t);var c=e.element;m(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}function A(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==Me&&o.eventType!==Ne||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}function P(e,t){var n,r,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(t.eventType!=Le&&(l>De||s.velocity===i)){var u=t.deltaX-s.deltaX,c=t.deltaY-s.deltaY,p=U(l,u,c);r=p.x,o=p.y,n=fe(p.x)>fe(p.y)?p.x:p.y,a=N(u,c),e.lastInterval=t}else n=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=a}function D(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:ge(e.pointers[n].clientX),clientY:ge(e.pointers[n].clientY)},n++;return{timeStamp:_e(),pointers:t,center:M(t),deltaX:e.deltaX,deltaY:e.deltaY}}function M(e){var t=e.length;if(1===t)return{x:ge(e[0].clientX),y:ge(e[0].clientY)};for(var n=0,i=0,r=0;t>r;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:ge(n/t),y:ge(i/t)}}function U(e,t,n){return{x:t/e||0,y:n/e||0}}function N(e,t){return e===t?Re:fe(e)>=fe(t)?0>e?we:Ve:0>t?je:xe}function L(e,t,n){n||(n=He);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function R(e,t,n){n||(n=He);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}function w(e,t){return R(t[1],t[0],Ge)+R(e[1],e[0],Ge)}function V(e,t){return L(t[0],t[1],Ge)/L(e[0],e[1],Ge)}function j(){this.evEl=We,this.evWin=Ze,this.pressed=!1,O.apply(this,arguments)}function x(){this.evEl=Ke,this.evWin=$e,O.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function k(){this.evTarget=Je,this.evWin=Qe,this.started=!1,O.apply(this,arguments)}function B(e,t){var n=v(e.touches),i=v(e.changedTouches);return t&(Ne|Le)&&(n=y(n.concat(i),"identifier",!0)),[n,i]}function F(){this.evTarget=tt,this.targetIds={},O.apply(this,arguments)}function H(e,t){var n=v(e.touches),i=this.targetIds;if(t&(Me|Ue)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=v(e.changedTouches),s=[],l=this.target;if(o=n.filter(function(e){return m(e.target,l)}),t===Me)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<a.length;)i[a[r].identifier]&&s.push(a[r]),t&(Ne|Le)&&delete i[a[r].identifier],r++;return s.length?[y(o.concat(s),"identifier",!0),s]:void 0}function G(){O.apply(this,arguments);var e=u(this.handler,this);this.touch=new F(this.manager,e),this.mouse=new j(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function Y(e,t){e&Me?(this.primaryTouch=t.changedPointers[0].identifier,W.call(this,t)):e&(Ne|Le)&&W.call(this,t)}function W(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches,r=function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)};setTimeout(r,nt)}}function Z(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(it>=o&&it>=a)return!0}return!1}function z(e,t){this.manager=e,this.set(t)}function q(e){if(g(e,ut))return ut;var t=g(e,ct),n=g(e,pt);return t&&n?ut:t||n?t?ct:pt:g(e,lt)?lt:st}function K(){if(!ot)return!1;var t={},n=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){t[i]=!n||e.CSS.supports("touch-action",i)}),t}function $(e){this.options=pe({},this.defaults,e||{}),this.id=S(),this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=ht,this.simultaneous={},this.requireFail=[]}function X(e){return e&vt?"cancel":e&ft?"end":e>?"move":e&mt?"start":""}function J(e){return e==xe?"down":e==je?"up":e==we?"left":e==Ve?"right":""}function Q(e,t){var n=t.manager;return n?n.get(e):e}function ee(){$.apply(this,arguments)}function te(){ee.apply(this,arguments),this.pX=null,this.pY=null}function ne(){ee.apply(this,arguments)}function ie(){$.apply(this,arguments),this._timer=null,this._input=null}function re(){ee.apply(this,arguments)}function oe(){ee.apply(this,arguments)}function ae(){$.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function se(e,t){return t=t||{},t.recognizers=p(t.recognizers,se.defaults.preset),new le(e,t)}function le(e,t){this.options=pe({},se.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=C(this),this.touchAction=new z(this,this.options.touchAction),ue(this,!0),a(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function ue(e,t){var n=e.element;if(n.style){var i;a(e.options.cssProps,function(r,o){i=E(n.style,o),t?(e.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=e.oldCssProps[i]||""}),t||(e.oldCssProps={})}}function ce(e,n){var i=t.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=n,n.target.dispatchEvent(i)}var pe,de=["","webkit","Moz","MS","ms","o"],he=t.createElement("div"),me="function",ge=Math.round,fe=Math.abs,_e=Date.now;pe="function"!=typeof Object.assign?function(e){if(e===i||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var ve=s(function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&e[r[o]]===i)&&(e[r[o]]=t[r[o]]),o++;return e},"extend","Use `assign`."),ye=s(function(e,t){return ve(e,t,!0)},"merge","Use `assign`."),Ee=1,Se=/mobile|tablet|ip(ad|hone|od)|android/i,be="ontouchstart"in e,Oe=E(e,"PointerEvent")!==i,Ce=be&&Se.test(navigator.userAgent),Te="touch",Ie="pen",Ae="mouse",Pe="kinect",De=25,Me=1,Ue=2,Ne=4,Le=8,Re=1,we=2,Ve=4,je=8,xe=16,ke=we|Ve,Be=je|xe,Fe=ke|Be,He=["x","y"],Ge=["clientX","clientY"];O.prototype={handler:function(){},init:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(b(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&h(this.element,this.evEl,this.domHandler),this.evTarget&&h(this.target,this.evTarget,this.domHandler),this.evWin&&h(b(this.element),this.evWin,this.domHandler)}};var Ye={mousedown:Me,mousemove:Ue,mouseup:Ne},We="mousedown",Ze="mousemove mouseup";l(j,O,{handler:function(e){var t=Ye[e.type];t&Me&&0===e.button&&(this.pressed=!0),t&Ue&&1!==e.which&&(t=Ne),this.pressed&&(t&Ne&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Ae,srcEvent:e}))}});var ze={pointerdown:Me,pointermove:Ue,pointerup:Ne,pointercancel:Le,pointerout:Le},qe={2:Te,3:Ie,4:Ae,5:Pe},Ke="pointerdown",$e="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(Ke="MSPointerDown",$e="MSPointerMove MSPointerUp MSPointerCancel"),l(x,O,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=ze[i],o=qe[e.pointerType]||e.pointerType,a=o==Te,s=_(t,e.pointerId,"pointerId");r&Me&&(0===e.button||a)?0>s&&(t.push(e),s=t.length-1):r&(Ne|Le)&&(n=!0),0>s||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var Xe={touchstart:Me,touchmove:Ue,touchend:Ne,touchcancel:Le},Je="touchstart",Qe="touchstart touchmove touchend touchcancel";l(k,O,{handler:function(e){var t=Xe[e.type];if(t===Me&&(this.started=!0),this.started){var n=B.call(this,e,t);t&(Ne|Le)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Te,srcEvent:e})}}});var et={touchstart:Me,touchmove:Ue,touchend:Ne,touchcancel:Le},tt="touchstart touchmove touchend touchcancel";l(F,O,{handler:function(e){var t=et[e.type],n=H.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Te,srcEvent:e})}});var nt=2500,it=25;l(G,O,{handler:function(e,t,n){var i=n.pointerType==Te,r=n.pointerType==Ae;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Y.call(this,t,n);else if(r&&Z.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var rt=E(he.style,"touchAction"),ot=rt!==i,at="compute",st="auto",lt="manipulation",ut="none",ct="pan-x",pt="pan-y",dt=K();z.prototype={set:function(e){e==at&&(e=this.compute()),ot&&this.manager.element.style&&dt[e]&&(this.manager.element.style[rt]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return a(this.manager.recognizers,function(t){c(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),q(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)return void t.preventDefault();var i=this.actions,r=g(i,ut)&&!dt[ut],o=g(i,pt)&&!dt[pt],a=g(i,ct)&&!dt[ct];if(r){var s=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(s&&l&&u)return}return a&&o?void 0:r||o&&n&ke||a&&n&Be?this.preventSrc(t):void 0},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var ht=1,mt=2,gt=4,ft=8,_t=ft,vt=16,yt=32;$.prototype={defaults:{},set:function(e){return pe(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(o(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=Q(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return o(e,"dropRecognizeWith",this)?this:(e=Q(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(o(e,"requireFailure",this))return this;var t=this.requireFail;return e=Q(e,this),-1===_(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(o(e,"dropRequireFailure",this))return this;e=Q(e,this);var t=_(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,i=this.state;ft>i&&t(n.options.event+X(i)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),i>=ft&&t(n.options.event+X(i))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=yt)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(yt|ht)))return!1;e++}return!0},recognize:function(e){var t=pe({},e);return c(this.options.enable,[this,t])?(this.state&(_t|vt|yt)&&(this.state=ht),this.state=this.process(t),void(this.state&(mt|gt|ft|vt)&&this.tryEmit(t))):(this.reset(),void(this.state=yt))},process:function(e){},getTouchAction:function(){},reset:function(){}},l(ee,$,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=t&(mt|gt),r=this.attrTest(e);return i&&(n&Le||!r)?t|vt:i||r?n&Ne?t|ft:t&mt?t|gt:mt:yt}}),l(te,ee,{defaults:{event:"pan",threshold:10,pointers:1,direction:Fe},getTouchAction:function(){var e=this.options.direction,t=[];return e&ke&&t.push(pt),e&Be&&t.push(ct),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(t.direction&ke?(r=0===o?Re:0>o?we:Ve,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===a?Re:0>a?je:xe,n=a!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return ee.prototype.attrTest.call(this,e)&&(this.state&mt||!(this.state&mt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=J(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),l(ne,ee,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ut]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&mt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),l(ie,$,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[st]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,o=e.deltaTime>t.time;if(this._input=e,!i||!n||e.eventType&(Ne|Le)&&!o)this.reset();else if(e.eventType&Me)this.reset(),this._timer=r(function(){this.state=_t,this.tryEmit()},t.time,this);else if(e.eventType&Ne)return _t;return yt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===_t&&(e&&e.eventType&Ne?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=_e(),this.manager.emit(this.options.event,this._input)))}}),l(re,ee,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ut]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&mt)}}),l(oe,ee,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:ke|Be,pointers:1},getTouchAction:function(){return te.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(ke|Be)?t=e.overallVelocity:n&ke?t=e.overallVelocityX:n&Be&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&fe(t)>this.options.velocity&&e.eventType&Ne},emit:function(e){var t=J(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),l(ae,$,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[lt]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,o=e.deltaTime<t.time;if(this.reset(),e.eventType&Me&&0===this.count)return this.failTimeout();if(i&&o&&n){if(e.eventType!=Ne)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<t.interval,s=!this.pCenter||L(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e;var l=this.count%t.taps;if(0===l)return this.hasRequireFailures()?(this._timer=r(function(){this.state=_t,this.tryEmit()},t.interval,this),mt):_t}return yt},failTimeout:function(){return this._timer=r(function(){this.state=yt},this.options.interval,this),yt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==_t&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),se.VERSION="2.0.8",se.defaults={domEvents:!1,touchAction:at,enable:!0,inputTarget:null,inputClass:null,preset:[[re,{enable:!1}],[ne,{enable:!1},["rotate"]],[oe,{direction:ke}],[te,{direction:ke},["swipe"]],[ae],[ae,{event:"doubletap",taps:2},["tap"]],[ie]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Et=1,St=2;le.prototype={set:function(e){return pe(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?St:Et},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,i=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&_t)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],t.stopped===St||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&n.state&(mt|gt|ft)&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof $)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(o(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(o(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=_(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return a(f(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==i){var n=this.handlers;return a(f(e),function(e){t?n[e]&&n[e].splice(_(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&ce(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&ue(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},pe(se,{INPUT_START:Me,INPUT_MOVE:Ue,INPUT_END:Ne,INPUT_CANCEL:Le,STATE_POSSIBLE:ht,STATE_BEGAN:mt,STATE_CHANGED:gt,STATE_ENDED:ft,STATE_RECOGNIZED:_t,STATE_CANCELLED:vt,STATE_FAILED:yt,DIRECTION_NONE:Re,DIRECTION_LEFT:we,DIRECTION_RIGHT:Ve,DIRECTION_UP:je,DIRECTION_DOWN:xe,DIRECTION_HORIZONTAL:ke,DIRECTION_VERTICAL:Be,DIRECTION_ALL:Fe,Manager:le,Input:O,TouchAction:z,TouchInput:F,MouseInput:j,PointerEventInput:x,TouchMouseInput:G,SingleTouchInput:k,Recognizer:$,AttrRecognizer:ee,Tap:ae,Pan:te,Swipe:oe,Pinch:ne,Rotate:re,Press:ie,on:d,off:h,each:a,merge:ye,extend:ve,assign:pe,inherit:l,bindFn:u,prefixed:E});var bt="undefined"!=typeof e?e:"undefined"!=typeof self?self:{};bt.Hammer=se,"function"==typeof define&&define.amd?define("hammerjs",[],function(){return se}):"undefined"!=typeof module&&module.exports?module.exports=se:e[n]=se}(window,document,"Hammer"),!function(e){"function"==typeof define&&define.amd?define("jqueryui-amd/version",["jquery"],e):e(jQuery)}(function(e){return e.ui=e.ui||{},e.ui.version="1.12.1"}),!function(e){"function"==typeof define&&define.amd?define("jqueryui-amd/widget",["jquery","./version"],e):e(jQuery)}(function(e){var t=0,n=Array.prototype.slice;return e.cleanData=function(t){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{i=e._data(r,"events"),i&&i.remove&&e(r).triggerHandler("remove")}catch(e){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var r,o,a,s={},l=t.split(".")[0];t=t.split(".")[1];var u=l+"-"+t;return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][u.toLowerCase()]=function(t){return!!e.data(t,u)},e[l]=e[l]||{},r=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new o(e,t)},e.extend(o,r,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(i,function(t,i){return e.isFunction(i)?void(s[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function r(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}()):void(s[t]=i)}),o.prototype=e.widget.extend(a,{widgetEventPrefix:r?a.widgetEventPrefix||t:t},s,{constructor:o,namespace:l,widgetName:t,widgetFullName:u}),r?(e.each(r._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,o,n._proto)}),delete r._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,r,o=n.call(arguments,1),a=0,s=o.length;a<s;a++)for(i in o[a])r=o[a][i],o[a].hasOwnProperty(i)&&void 0!==r&&(e.isPlainObject(r)?t[i]=e.isPlainObject(t[i])?e.widget.extend({},t[i],r):e.widget.extend({},r):t[i]=r);return t},e.widget.bridge=function(t,i){var r=i.prototype.widgetFullName||t;e.fn[t]=function(o){var a="string"==typeof o,s=n.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var n,i=e.data(this,r);return"instance"===o?(l=i,!1):i?e.isFunction(i[o])&&"_"!==o.charAt(0)?(n=i[o].apply(i,s),n!==i&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")}):l=void 0:(s.length&&(o=e.widget.extend.apply(null,[o].concat(s))),this.each(function(){var t=e.data(this,r);t?(t.option(o||{}),t._init&&t._init()):e.data(this,r,new i(o,this))})),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(n,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,o,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},i=t.split("."),t=i.shift(),i.length){for(r=a[t]=e.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(t=i.pop(),1===arguments.length)return void 0===r[t]?null:r[t];r[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,i,r;for(n in t)r=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&r&&r.length&&(i=e(r.get()),this._removeClass(r,n),i.addClass(this._classes({element:i,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function n(n,o){var a,s;for(s=0;s<n.length;s++)a=r.classesElementLookup[n[s]]||e(),a=e(t.add?e.unique(a.get().concat(t.element.get())):a.not(t.element).get()),r.classesElementLookup[n[s]]=a,i.push(n[s]),o&&t.classes[n[s]]&&i.push(t.classes[n[s]])}var i=[],r=this;return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&n(t.keys.match(/\S+/g)||[],!0),t.extra&&n(t.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(t){var n=this;e.each(n.classesElementLookup,function(i,r){e.inArray(t.target,r)!==-1&&(n.classesElementLookup[i]=e(r.not(t.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,i){i="boolean"==typeof i?i:n;var r="string"==typeof e||null===e,o={extra:r?t:n,keys:r?e:t,element:r?this.element:e,add:i};return o.element.toggleClass(this._classes(o),i),this},_on:function(t,n,i){var r,o=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=r=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),e.each(i,function(i,a){function s(){if(t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||e.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?r.on(u,c,s):n.on(u,s)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n).off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function n(){return("string"==typeof e?i[e]:e).apply(i,arguments)}var i=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,i){var r,o,a=this.options[t];if(i=i||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(e.isFunction(a)&&a.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,r,o){"string"==typeof r&&(r={effect:r});var a,s=r?r===!0||"number"==typeof r?n:r.effect||n:t;r=r||{},"number"==typeof r&&(r={duration:r}),a=!e.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),a&&e.effects&&e.effects.effect[s]?i[t](r):s!==t&&i[s]?i[s](r.duration,r.easing,o):i.queue(function(n){e(this)[t](),o&&o.call(i[0]),n()})}}),e.widget}),!function(e){"function"==typeof define&&define.amd?define("jqueryui-amd/unique-id",["jquery","./version"],e):e(jQuery)}(function(e){return e.fn.extend({uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}})}),!function(e){"function"==typeof define&&define.amd?define("jqueryui-amd/keycode",["jquery","./version"],e):e(jQuery)}(function(e){return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),!function(e){"function"==typeof define&&define.amd?define("jqueryui-amd/focusable",["jquery","./version"],e):e(jQuery)}(function(e){function t(e){for(var t=e.css("visibility");"inherit"===t;)e=e.parent(),t=e.css("visibility");return"hidden"!==t}return e.ui.focusable=function(n,i){var r,o,a,s,l,u=n.nodeName.toLowerCase();return"area"===u?(r=n.parentNode,o=r.name,!(!n.href||!o||"map"!==r.nodeName.toLowerCase())&&(a=e("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(u)?(s=!n.disabled,s&&(l=e(n).closest("fieldset")[0],l&&(s=!l.disabled))):s="a"===u?n.href||i:i,s&&e(n).is(":visible")&&t(e(n)))},e.extend(e.expr[":"],{focusable:function(t){return e.ui.focusable(t,null!=e.attr(t,"tabindex"))}}),e.ui.focusable}),!function(e){"function"==typeof define&&define.amd?define("jqueryui-amd/tabbable",["jquery","./version","./focusable"],e):e(jQuery)}(function(e){return e.extend(e.expr[":"],{tabbable:function(t){var n=e.attr(t,"tabindex"),i=null!=n;return(!i||n>=0)&&e.ui.focusable(t,i)}})}),function(){"use strict";function e(e){var t=A.has(e);return e=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(e),!t&&e}function t(e){var t=e.isConnected;if(void 0!==t)return t;for(;e&&!(e.__CE_isImportDocument||e instanceof Document);)e=e.parentNode||(window.ShadowRoot&&e instanceof ShadowRoot?e.host:void 0);return!(!e||!(e.__CE_isImportDocument||e instanceof Document))}function n(e,t){for(;t&&t!==e&&!t.nextSibling;)t=t.parentNode;return t&&t!==e?t.nextSibling:null}function i(e,t,r){r=r?r:new Set;for(var o=e;o;){if(o.nodeType===Node.ELEMENT_NODE){var a=o;t(a);var s=a.localName;if("link"===s&&"import"===a.getAttribute("rel")){if(o=a.import,o instanceof Node&&!r.has(o))for(r.add(o),o=o.firstChild;o;o=o.nextSibling)i(o,t,r);o=n(e,a);continue}if("template"===s){o=n(e,a);continue}if(a=a.__CE_shadowRoot)for(a=a.firstChild;a;a=a.nextSibling)i(a,t,r)}o=o.firstChild?o.firstChild:n(e,o)}}function r(e,t,n){e[t]=n}function o(){this.a=new Map,this.s=new Map,this.f=[],this.b=!1}function a(e,t,n){e.a.set(t,n),e.s.set(n.constructor,n)}function s(e,t){e.b=!0,e.f.push(t)}function l(e,t){e.b&&i(t,function(t){return u(e,t)})}function u(e,t){if(e.b&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.f.length;n++)e.f[n](t)}}function c(e,t){var n=[];for(i(t,function(e){return n.push(e)}),t=0;t<n.length;t++){var r=n[t];1===r.__CE_state?e.connectedCallback(r):h(e,r)}}function p(e,t){var n=[];for(i(t,function(e){return n.push(e)}),t=0;t<n.length;t++){var r=n[t];1===r.__CE_state&&e.disconnectedCallback(r)}}function d(e,t,n){n=n?n:{};var r=n.w||new Set,o=n.i||function(t){return h(e,t)},a=[];if(i(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var n=t.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_hasRegistry=!0),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:t.addEventListener("load",function(){var n=t.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var i=new Set(r);i.delete(n),d(e,n,{w:i,i:o})}})}else a.push(t)},r),e.b)for(t=0;t<a.length;t++)u(e,a[t]);for(t=0;t<a.length;t++)o(a[t])}function h(e,n){if(void 0===n.__CE_state){var i=n.ownerDocument;if((i.defaultView||i.__CE_isImportDocument&&i.__CE_hasRegistry)&&(i=e.a.get(n.localName))){i.constructionStack.push(n);var r=i.constructor;try{try{if(new r!==n)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{i.constructionStack.pop()}}catch(e){throw n.__CE_state=2,e}if(n.__CE_state=1,n.__CE_definition=i,i.attributeChangedCallback)for(i=i.observedAttributes,r=0;r<i.length;r++){var o=i[r],a=n.getAttribute(o);null!==a&&e.attributeChangedCallback(n,o,null,a,null)}t(n)&&e.connectedCallback(n)}}}function m(e,t){this.c=e,this.a=t,this.b=void 0,d(this.c,this.a),"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),
- this.b.observe(this.a,{childList:!0,subtree:!0}))}function g(e){e.b&&e.b.disconnect()}function f(){var e=this;this.b=this.a=void 0,this.f=new Promise(function(t){e.b=t,e.a&&t(e.a)})}function _(e){if(e.a)throw Error("Already resolved.");e.a=void 0,e.b&&e.b(void 0)}function v(e){this.j=!1,this.c=e,this.o=new Map,this.l=function(e){return e()},this.g=!1,this.m=[],this.u=new m(e,document)}function y(e){if(!1!==e.g){e.g=!1;for(var t=e.m,n=[],i=new Map,r=0;r<t.length;r++)i.set(t[r].localName,[]);for(d(e.c,document,{i:function(t){if(void 0===t.__CE_state){var r=t.localName,o=i.get(r);o?o.push(t):e.c.a.get(r)&&n.push(t)}}}),r=0;r<n.length;r++)h(e.c,n[r]);for(;0<t.length;){for(var o=t.shift(),r=o.localName,o=i.get(o.localName),a=0;a<o.length;a++)h(e.c,o[a]);(r=e.o.get(r))&&_(r)}}}function E(){var e=le;window.HTMLElement=function(){function t(){var t=this.constructor,n=e.s.get(t);if(!n)throw Error("The custom element being constructed was not registered with `customElements`.");var i=n.constructionStack;if(!i.length)return i=P.call(document,n.localName),Object.setPrototypeOf(i,t.prototype),i.__CE_state=1,i.__CE_definition=n,u(e,i),i;var n=i.length-1,r=i[n];if(r===I)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return i[n]=I,Object.setPrototypeOf(r,t.prototype),u(e,r),r}return t.prototype=ie.prototype,Object.defineProperty(t.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:t}),t}()}function S(e,n,i){function r(n){return function(i){for(var r=[],o=0;o<arguments.length;++o)r[o-0]=arguments[o];for(var o=[],a=[],s=0;s<r.length;s++){var l=r[s];if(l instanceof Element&&t(l)&&a.push(l),l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)o.push(l);else o.push(l)}for(n.apply(this,r),r=0;r<a.length;r++)p(e,a[r]);if(t(this))for(r=0;r<o.length;r++)a=o[r],a instanceof Element&&c(e,a)}}i.h&&(n.prepend=r(i.h)),i.append&&(n.append=r(i.append))}function b(){var e=le;r(Document.prototype,"createElement",function(t){if(this.__CE_hasRegistry){var n=e.a.get(t);if(n)return new n.constructor}return t=P.call(this,t),u(e,t),t}),r(Document.prototype,"importNode",function(t,n){return t=M.call(this,t,n),this.__CE_hasRegistry?d(e,t):l(e,t),t}),r(Document.prototype,"createElementNS",function(t,n){if(this.__CE_hasRegistry&&(null===t||"http://www.w3.org/1999/xhtml"===t)){var i=e.a.get(n);if(i)return new i.constructor}return t=D.call(this,t,n),u(e,t),t}),S(e,Document.prototype,{h:U,append:N})}function O(){function e(e,i){Object.defineProperty(e,"textContent",{enumerable:i.enumerable,configurable:!0,get:i.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)i.set.call(this,e);else{var r=void 0;if(this.firstChild){var o=this.childNodes,a=o.length;if(0<a&&t(this))for(var r=Array(a),s=0;s<a;s++)r[s]=o[s]}if(i.set.call(this,e),r)for(e=0;e<r.length;e++)p(n,r[e])}}})}var n=le;r(Node.prototype,"insertBefore",function(e,i){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=j.call(this,e,i),t(this))for(i=0;i<r.length;i++)c(n,r[i]);return e}return r=t(e),i=j.call(this,e,i),r&&p(n,e),t(this)&&c(n,e),i}),r(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var i=Array.prototype.slice.apply(e.childNodes);if(e=V.call(this,e),t(this))for(var r=0;r<i.length;r++)c(n,i[r]);return e}return i=t(e),r=V.call(this,e),i&&p(n,e),t(this)&&c(n,e),r}),r(Node.prototype,"cloneNode",function(e){return e=w.call(this,e),this.ownerDocument.__CE_hasRegistry?d(n,e):l(n,e),e}),r(Node.prototype,"removeChild",function(e){var i=t(e),r=x.call(this,e);return i&&p(n,e),r}),r(Node.prototype,"replaceChild",function(e,i){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=k.call(this,e,i),t(this))for(p(n,i),i=0;i<r.length;i++)c(n,r[i]);return e}var r=t(e),o=k.call(this,e,i),a=t(this);return a&&p(n,i),r&&p(n,e),a&&c(n,e),o}),B&&B.get?e(Node.prototype,B):s(n,function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var e=[],t=0;t<this.childNodes.length;t++)e.push(this.childNodes[t].textContent);return e.join("")},set:function(e){for(;this.firstChild;)x.call(this,this.firstChild);V.call(this,document.createTextNode(e))}})})}function C(e){function n(n){return function(i){for(var r=[],o=0;o<arguments.length;++o)r[o-0]=arguments[o];for(var o=[],a=[],s=0;s<r.length;s++){var l=r[s];if(l instanceof Element&&t(l)&&a.push(l),l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)o.push(l);else o.push(l)}for(n.apply(this,r),r=0;r<a.length;r++)p(e,a[r]);if(t(this))for(r=0;r<o.length;r++)a=o[r],a instanceof Element&&c(e,a)}}var i=Element.prototype;Q&&(i.before=n(Q)),Q&&(i.after=n(ee)),te&&r(i,"replaceWith",function(n){for(var i=[],r=0;r<arguments.length;++r)i[r-0]=arguments[r];for(var r=[],o=[],a=0;a<i.length;a++){var s=i[a];if(s instanceof Element&&t(s)&&o.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)r.push(s);else r.push(s)}for(a=t(this),te.apply(this,i),i=0;i<o.length;i++)p(e,o[i]);if(a)for(p(e,this),i=0;i<r.length;i++)o=r[i],o instanceof Element&&c(e,o)}),ne&&r(i,"remove",function(){var n=t(this);ne.call(this),n&&p(e,this)})}function T(){function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var r=this,o=void 0;if(t(this)&&(o=[],i(this,function(e){e!==r&&o.push(e)})),n.set.call(this,e),o)for(var s=0;s<o.length;s++){var u=o[s];1===u.__CE_state&&a.disconnectedCallback(u)}return this.ownerDocument.__CE_hasRegistry?d(a,this):l(a,this),e}})}function n(e,n){r(e,"insertAdjacentElement",function(e,i){var r=t(i);return e=n.call(this,e,i),r&&p(a,i),t(e)&&c(a,i),e})}function o(e,t){function n(e,t){for(var n=[];e!==t;e=e.nextSibling)n.push(e);for(t=0;t<n.length;t++)d(a,n[t])}r(e,"insertAdjacentHTML",function(e,i){if(e=e.toLowerCase(),"beforebegin"===e){var r=this.previousSibling;t.call(this,e,i),n(r||this.parentNode.firstChild,this)}else if("afterbegin"===e)r=this.firstChild,t.call(this,e,i),n(this.firstChild,r);else if("beforeend"===e)r=this.lastChild,t.call(this,e,i),n(r||this.firstChild,null);else{if("afterend"!==e)throw new SyntaxError("The value provided ("+String(e)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");r=this.nextSibling,t.call(this,e,i),n(this.nextSibling,r)}})}var a=le;F&&r(Element.prototype,"attachShadow",function(e){return this.__CE_shadowRoot=e=F.call(this,e)}),H&&H.get?e(Element.prototype,H):re&&re.get?e(HTMLElement.prototype,re):s(a,function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return w.call(this,!0).innerHTML},set:function(e){var t="template"===this.localName,n=t?this.content:this,i=D.call(document,this.namespaceURI,this.localName);for(i.innerHTML=e;0<n.childNodes.length;)x.call(n,n.childNodes[0]);for(e=t?i.content:i;0<e.childNodes.length;)V.call(n,e.childNodes[0])}})}),r(Element.prototype,"setAttribute",function(e,t){if(1!==this.__CE_state)return Y.call(this,e,t);var n=G.call(this,e);Y.call(this,e,t),t=G.call(this,e),a.attributeChangedCallback(this,e,n,t,null)}),r(Element.prototype,"setAttributeNS",function(e,t,n){if(1!==this.__CE_state)return z.call(this,e,t,n);var i=Z.call(this,e,t);z.call(this,e,t,n),n=Z.call(this,e,t),a.attributeChangedCallback(this,t,i,n,e)}),r(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return W.call(this,e);var t=G.call(this,e);W.call(this,e),null!==t&&a.attributeChangedCallback(this,e,t,null,null)}),r(Element.prototype,"removeAttributeNS",function(e,t){if(1!==this.__CE_state)return q.call(this,e,t);var n=Z.call(this,e,t);q.call(this,e,t);var i=Z.call(this,e,t);n!==i&&a.attributeChangedCallback(this,t,n,i,e)}),oe?n(HTMLElement.prototype,oe):K?n(Element.prototype,K):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),ae?o(HTMLElement.prototype,ae):$?o(Element.prototype,$):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."),S(a,Element.prototype,{h:X,append:J}),C(a)}var I=new function(){},A=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));o.prototype.connectedCallback=function(e){var t=e.__CE_definition;t.connectedCallback&&t.connectedCallback.call(e)},o.prototype.disconnectedCallback=function(e){var t=e.__CE_definition;t.disconnectedCallback&&t.disconnectedCallback.call(e)},o.prototype.attributeChangedCallback=function(e,t,n,i,r){var o=e.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(t)&&o.attributeChangedCallback.call(e,t,n,i,r)},m.prototype.f=function(e){var t=this.a.readyState;for("interactive"!==t&&"complete"!==t||g(this),t=0;t<e.length;t++)for(var n=e[t].addedNodes,i=0;i<n.length;i++)d(this.c,n[i])},v.prototype.define=function(t,n){var i=this;if(!(n instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!e(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(this.c.a.get(t))throw Error("A custom element with name '"+t+"' has already been defined.");if(this.j)throw Error("A custom element is already being defined.");this.j=!0;var r,o,s,l,u;try{var c=function(e){var t=p[e];if(void 0!==t&&!(t instanceof Function))throw Error("The '"+e+"' callback must be a function.");return t},p=n.prototype;if(!(p instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");r=c("connectedCallback"),o=c("disconnectedCallback"),s=c("adoptedCallback"),l=c("attributeChangedCallback"),u=n.observedAttributes||[]}catch(e){return}finally{this.j=!1}n={localName:t,constructor:n,connectedCallback:r,disconnectedCallback:o,adoptedCallback:s,attributeChangedCallback:l,observedAttributes:u,constructionStack:[]},a(this.c,t,n),this.m.push(n),this.g||(this.g=!0,this.l(function(){return y(i)}))},v.prototype.i=function(e){d(this.c,e)},v.prototype.get=function(e){if(e=this.c.a.get(e))return e.constructor},v.prototype.whenDefined=function(t){if(!e(t))return Promise.reject(new SyntaxError("'"+t+"' is not a valid custom element name."));var n=this.o.get(t);return n?n.f:(n=new f,this.o.set(t,n),this.c.a.get(t)&&!this.m.some(function(e){return e.localName===t})&&_(n),n.f)},v.prototype.v=function(e){g(this.u);var t=this.l;this.l=function(n){return e(function(){return t(n)})}},window.CustomElementRegistry=v,v.prototype.define=v.prototype.define,v.prototype.upgrade=v.prototype.i,v.prototype.get=v.prototype.get,v.prototype.whenDefined=v.prototype.whenDefined,v.prototype.polyfillWrapFlushCallback=v.prototype.v;var P=window.Document.prototype.createElement,D=window.Document.prototype.createElementNS,M=window.Document.prototype.importNode,U=window.Document.prototype.prepend,N=window.Document.prototype.append,L=window.DocumentFragment.prototype.prepend,R=window.DocumentFragment.prototype.append,w=window.Node.prototype.cloneNode,V=window.Node.prototype.appendChild,j=window.Node.prototype.insertBefore,x=window.Node.prototype.removeChild,k=window.Node.prototype.replaceChild,B=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),F=window.Element.prototype.attachShadow,H=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),G=window.Element.prototype.getAttribute,Y=window.Element.prototype.setAttribute,W=window.Element.prototype.removeAttribute,Z=window.Element.prototype.getAttributeNS,z=window.Element.prototype.setAttributeNS,q=window.Element.prototype.removeAttributeNS,K=window.Element.prototype.insertAdjacentElement,$=window.Element.prototype.insertAdjacentHTML,X=window.Element.prototype.prepend,J=window.Element.prototype.append,Q=window.Element.prototype.before,ee=window.Element.prototype.after,te=window.Element.prototype.replaceWith,ne=window.Element.prototype.remove,ie=window.HTMLElement,re=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),oe=window.HTMLElement.prototype.insertAdjacentElement,ae=window.HTMLElement.prototype.insertAdjacentHTML,se=window.customElements;if(!se||se.forcePolyfill||"function"!=typeof se.define||"function"!=typeof se.get){var le=new o;E(),b(),S(le,DocumentFragment.prototype,{h:L,append:R}),O(),T(),document.__CE_hasRegistry=!0;var ue=new v(le);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:ue})}}.call(self),define("customElements",function(){}),define("ojs/ojcustomelement",["ojs/ojcore","require","ojs/ojlogger","ojs/ojcontext","promise","customElements"],function(e,t,n,i){"use strict";e.BaseCustomElementBridge={},e.BaseCustomElementBridge.proto={getClass:function(t){var n=Object.create(HTMLElement.prototype);this.InitializePrototype(n);var i=this.GetMetadata(t);e.BaseCustomElementBridge._enumerateMetadataForKey(n,i,"properties",this.DefinePropertyCallback.bind(this)),e.BaseCustomElementBridge._enumerateMetadataForKey(n,i,"methods",this.DefineMethodCallback.bind(this)),this.AddComponentMethods(n),n.setProperties=function(t){e.BaseCustomElementBridge.getInstance(this)._setProperties(this,t)},Object.defineProperty(n,"set",{value:function(e,t){this.setProperty(e,t)}}),Object.defineProperty(n,"unset",{value:function(e){this.setProperty(e,void 0)}}),n.attributeChangedCallback=this._attributeChangedCallback,n.connectedCallback=this._connectedCallback,n.disconnectedCallback=this._detachedCallback;var r=function(){var e=window.Reflect;return void 0!==e?e.construct(HTMLElement,[],this.constructor):HTMLElement.call(this)},o=this;return Object.defineProperty(r,"observedAttributes",{get:function(){return o.GetAttributes(i)}}),Object.defineProperty(n,"constructor",{value:r,writable:!0,configurable:!0}),r.prototype=n,Object.setPrototypeOf(r,HTMLElement),r},playbackEarlyPropertySets:function(e){this._bCanSetProperty=!0,this.PlaybackEarlyPropertySets(e)},resolveBindingProvider:function(e){this._bpResolve?this._bpResolve(e):this._bpInst=e},resolveDelayedReadyPromise:function(){this.GetDelayedReadyPromise().resolvePromise()},whenCreated:function(){return this._whenCreatedPromise},AddComponentMethods:function(e){},CreateComponent:function(e){},DefineMethodCallback:function(e,t,n){},DefinePropertyCallback:function(e,t,n){},GetDelayedReadyPromise:function(){return this._delayedReady||(this._delayedReady=new e.BaseCustomElementBridge.__DelayedPromise),this._delayedReady},GetAttributes:function(t){return e.BaseCustomElementBridge.getAttributes(t.properties)},GetMetadata:function(t){return t[e.BaseCustomElementBridge.DESC_KEY_META]},GetAliasForProperty:function(e){return e},GetDefaultValue:function(t){return e.BaseCustomElementBridge._consolidateDefaults(t)},GetTrackChildrenOption:function(){return this.METADATA.extension&&this.METADATA.extension._TRACK_CHILDREN?this.METADATA.extension._TRACK_CHILDREN:"none"},HandleAttributeChanged:function(e,t,n,i){},HandleBindingsApplied:function(e,t){},HandleDetached:function(e){},HandleReattached:function(e){},InitializeElement:function(e){},InitializePrototype:function(e){},BatchedPropertySet:function(e,t){for(var n=Object.keys(t),i=0;i<n.length;i++){var r=n[i];e.setProperty(r,t[r])}},GetEventListenerProperty:function(t){var n=e.__AttributeUtils.eventListenerPropertyToEventType(t),i=this._eventListeners[n];if(i)return i.getListener()},GetProperty:function(t,n,i){var r=e.__AttributeUtils.eventListenerPropertyToEventType(n),o=e.BaseCustomElementBridge.__GetPropertyMetadata(n,e.BaseCustomElementBridge.getProperties(this,t));return r||!o||-1===n.indexOf(".")?i[n]:e.BaseCustomElementBridge.__GetProperty(i,n)},InitializeBridge:function(t){var n=e.BaseCustomElementBridge.__GetDescriptor(t.tagName);this.METADATA=this.GetMetadata(n),this._eventListeners={}},PlaybackEarlyPropertySets:function(e){if(this._earlySets)for(;this._earlySets.length;){var t=this._earlySets.shift();e.setProperty(t.property,t.value)}},SaveEarlyPropertySet:function(e,t){return!this.__INITIALIZING_PROPS&&!this._bCanSetProperty&&(this._earlySets||(this._earlySets=[]),this._earlySets.push({property:e,value:t}),!0)},SetEventListenerProperty:function(t,n,i){var r=e.__AttributeUtils.eventListenerPropertyToEventType(n),o=this._eventListeners[r];o||(o=this._createEventListenerWrapper(),this._eventListeners[r]=o,t.addEventListener(r,o)),null==i||i instanceof Function?o.setListener(i):e.BaseCustomElementBridge.__ThrowTypeError(t,n,i,"function")},SetProperty:function(t,n,i,r,o){var a=e.__AttributeUtils.eventListenerPropertyToEventType(n),s=e.BaseCustomElementBridge.__GetPropertyMetadata(n,e.BaseCustomElementBridge.getProperties(this,t));if(a||!s)t[n]=i;else{var l=t.getProperty(n),u=n.split(".")[0],c=r[u];if(e.CollectionUtils.isPlainObject(c)&&(c=e.CollectionUtils.copyInto({},c,void 0,!0)),!e.BaseCustomElementBridge.__CompareOptionValues(n,s,i,l)){var p=-1!==n.indexOf(".");if(p&&(this._SKIP_PROP_CHANGE_EVENT=!0),o?this.ValidateAndSetProperty(this.GetAliasForProperty.bind(this),r,n,i,t):e.BaseCustomElementBridge.__SetProperty(this.GetAliasForProperty.bind(this),r,n,i),this._SKIP_PROP_CHANGE_EVENT=!1,p){var d={};d.path=n,d.value=i,d.previousValue=l;var h=o?"external":"internal";e.BaseCustomElementBridge.__FirePropertyChangeEvent(t,u,r[u],c,h,d)}return{property:u,propertySet:!0,isSubproperty:p}}}return{property:null,propertySet:!1,isSubproperty:!1}},ValidateAndSetProperty:function(t,n,i,r,o){var a=this.ValidatePropertySet(o,i,r);e.BaseCustomElementBridge.__SetProperty(t,n,i,a)},ValidatePropertySet:function(t,i,r){var o=e.BaseCustomElementBridge.getProperties(this,t),a=e.BaseCustomElementBridge.__GetPropertyMetadata(i,o),s=i.split(".");return a?(o[s[0]].readOnly&&this.throwError(t,"Read-only property '"+i+"' cannot be set."),e.BaseCustomElementBridge.checkEnumValues(t,i,r,a),null!=r?e.BaseCustomElementBridge.checkType(t,i,r,a):r):void n.warn(e.BaseCustomElementBridge.getElementInfo(t)+": Ignoring property set for undefined property '"+i+"'.")},_attributeChangedCallback:function(t,n,i){var r=e.BaseCustomElementBridge.getInstance(this);if(r._bCreateCalled){var o=e.__AttributeUtils.attributeToPropertyName(t),a=e.BaseCustomElementBridge.__GetPropertyMetadata(o,e.BaseCustomElementBridge.getProperties(r,this));e.BaseCustomElementBridge.__CheckOverlappingAttribute(this,t),null===i&&(i=void 0);var s={detail:{attribute:t,value:i,previousValue:n}};this.dispatchEvent(new CustomEvent("attribute-changed",s)),e.__AttributeUtils.getExpressionInfo(i).expr||(a&&this.setProperty(o,e.BaseCustomElementBridge.__ParseAttrValue(this,t,o,i,a)),r.HandleAttributeChanged(this,t,n,i))}},_connected:function(t){if(this._bConnected=!0,this._bCreateCalled)this._complete?this.HandleReattached(t):this._registerBusyState(t);else{this._bCreateCalled=!0,this._registerBusyState(t),this._monitorReadyPromise(t),this.InitializeElement(t);var n=this,i=this._getBindingProvider(t);"none"!==e.BaseCustomElementBridge.getTrackChildrenOption(t)&&(i=i.then(function(){return n._whenChildrenCreated(t)})),this._whenCreatedPromise=i.then(function(){try{n.CreateComponent(t)}catch(e){n.throwError(t,"Error while rendering component. "+e)}})}},_connectedCallback:function(){e.BaseCustomElementBridge.getInstance(this)._connected(this)},_detachedCallback:function(){var t=e.BaseCustomElementBridge.getInstance(this);t._bConnected=!1,t._complete?t.HandleDetached(this):t._resolveBusyState(this)},_createEventListenerWrapper:function(){var e,t=function(t){e&&e(t)};return t.setListener=function(t){e=t},t.getListener=function(){return e},t},_monitorReadyPromise:function(e){var t=this,n=function(){t._bConnected&&t._resolveBusyState(e),t._complete=!0};this.GetDelayedReadyPromise().getPromise().then(function(){e.classList.add("oj-complete"),n()},function(){e.classList.add("oj-incomplete"),n()})},_registerBusyState:function(t){var n=i.getContext(t).getBusyContext();this._initCompleteCallback=n.addBusyState({description:e.BaseCustomElementBridge.getElementInfo(t)+" is being upgraded."})},_resolveBusyState:function(e){var t=this._initCompleteCallback;t||this.throwError(e,"Unexpected call to _resolveBusyState()."),this._initCompleteCallback=null,t()},_setProperties:function(e,t){for(var n=[],i={},r=!1,o=Object.keys(t),a=0;a<o.length;a++){var s=o[a];s.indexOf(".")>=0?n.push(s):(i[s]=t[s],r=!0)}r&&this.BatchedPropertySet(e,i);for(var l=0;l<n.length;l++){var u=n[l];e.setProperty(u,t[u])}},throwError:function(t,n){throw this.GetDelayedReadyPromise().rejectPromise(),new Error(e.BaseCustomElementBridge.getElementInfo(t)+": "+n)},_setBpResolver:function(e){this._bpResolve=e},_getBindingProvider:function(t){var n=this._getBindingProviderName(t);return n===e.BaseCustomElementBridge._NO_BINDING_PROVIDER?(this.playbackEarlyPropertySets(t),Promise.resolve(null)):"knockout"===n?this._bpInst?Promise.resolve(this._bpInst):new Promise(this._setBpResolver.bind(this)):void this.throwError(t,"Unknown binding provider '"+n+"'.")},_getBindingProviderName:function(t){var n=t._ojBndgPrv;if(n)return n;if(!(n=t.getAttribute("data-oj-binding-provider")||e.BaseCustomElementBridge._getCompositeBindingProviderName(t))){var i=t.parentElement;null==i?t===document.documentElement?n="knockout":this.throwError(t,"Cannot determine binding provider for a disconnected subtree."):n=this._getBindingProviderName(i)}return Object.defineProperty(t,"_ojBndgPrv",{value:n}),n},_getChildrenToTrack:function(t,n,i){for(var r=t.childNodes,o=0;o<r.length;o++){var a=r[o];e.ElementUtils.isValidCustomElementName(a.localName)?i.push(a):"nearestCustomElement"===n&&this._getChildrenToTrack(a,n,i)}return i},_whenChildrenCreated:function(t){var r=e.BaseCustomElementBridge.getTrackChildrenOption(t),o=i.getContext(t).getBusyContext(),a=this._getChildrenToTrack(t,r,[]).map(function(t){var i=o.addBusyState({description:"Waiting for element "+t.localName+" to be defined."}),r=setInterval(function(){n.warn("Warning: waiting for element "+t.localName+" to be defined.")},2e4);return customElements.whenDefined(t.localName).then(function(){return i(),clearInterval(r),e.BaseCustomElementBridge.getRegistered(t.tagName)?e.BaseCustomElementBridge.getInstance(t).whenCreated():null}).catch(function(e){throw i(),clearInterval(r),new Error("Error defining element "+t.localName+" : "+e)})});return Promise.all(a)}},e.BaseCustomElementBridge.getAttributes=function(t){var n=[];return e.BaseCustomElementBridge._getAttributesFromProperties("",t,n),n},e.BaseCustomElementBridge.getTrackChildrenOption=function(t){var n=e.BaseCustomElementBridge.getInstance(t);return n?n.GetTrackChildrenOption():"none"},e.BaseCustomElementBridge._getAttributesFromProperties=function(t,n,i){if(n)for(var r=Object.keys(n),o=0;o<r.length;o++){var a=r[o],s=n[a];if(!s.readOnly){var l=t+a;i.push(e.__AttributeUtils.propertyNameToAttribute(l)),s.properties&&e.BaseCustomElementBridge._getAttributesFromProperties(l+".",s.properties,i)}}},e.BaseCustomElementBridge.getElementInfo=function(e){return e?e.tagName.toLowerCase()+" with id '"+e.id+"'":""},e.BaseCustomElementBridge.getInstance=function(t){var i=t[e.BaseCustomElementBridge._INSTANCE_KEY];if(!i){var r=e.BaseCustomElementBridge._registry[t.tagName.toLowerCase()];r||n.error(e.BaseCustomElementBridge.getElementInfo(t)+" Attempt to interact with the custom element before it has been registered."),(i=Object.create(r.bridgeProto)).InitializeBridge(t),Object.defineProperty(t,e.BaseCustomElementBridge._INSTANCE_KEY,{value:i})}return i},e.BaseCustomElementBridge.getProperties=function(e,t){return e.METADATA.properties},e.BaseCustomElementBridge.getRegistered=function(t){if(t){var n=e.BaseCustomElementBridge._registry[t.toLowerCase()];if(n)return{composite:n.composite}}return null},e.BaseCustomElementBridge.getSlotMap=function(t){for(var n={},i=t.childNodes,r=0;r<i.length;r++){var o=i[r];if(e.BaseCustomElementBridge.isSlotable(o)){var a=e.BaseCustomElementBridge.getSlotAssignment(o);n[a]||(n[a]=[]),n[a].push(o)}}return n},e.BaseCustomElementBridge.getSlotAssignment=function(e){var t=null!=e.__oj_slots?e.__oj_slots:e.getAttribute&&e.getAttribute("slot");return t||(t=""),t},e.BaseCustomElementBridge.isSlotable=function(e){return 1===e.nodeType||3===e.nodeType&&e.nodeValue.trim()},e.BaseCustomElementBridge._NO_BINDING_PROVIDER="none",e.BaseCustomElementBridge._enumerateMetadataForKey=function(e,t,n,i){if(t&&t[n]){var r=t[n];Object.keys(r).forEach(function(t){i(e,t,r[t])})}},e.BaseCustomElementBridge._getCompositeBindingProviderName=function(t){return e.Composite?e.Composite.getBindingProviderName(t.parentElement):null},e.BaseCustomElementBridge._verifyMetadata=function(t,i){if(i){var r=i.properties;if(r)for(var o=e.BaseCustomElementBridge._GLOBAL_PROPERTIES,a=0;a<o.length;a++)r[o[a]]&&n.error("Error registering composite %s. Redefined global HTML element attribute '%s' in metadata.",t,o[a])}},e.BaseCustomElementBridge.checkEnumValues=function(t,n,i,r){if("string"==typeof i&&r){var o=r.enumValues;o&&-1===o.indexOf(i)&&e.BaseCustomElementBridge.getInstance(t).throwError(t,"Invalid value '"+i+"' found for property '"+n+"'. Expected one of the following '"+o.toString()+"'.")}},e.BaseCustomElementBridge.checkType=function(t,n,i,r){var o=r.type;if(o){var a=(o=o.toLowerCase()).split("|"),s=typeof i;if(1===a.length)("array"===o.substring(0,5)&&!Array.isArray(i)||"object"===o.substring(0,6)&&"object"!==s||"number"===o&&("number"!=typeof i||!isFinite(i))||"string"===o&&"string"!==s)&&e.BaseCustomElementBridge.__ThrowTypeError(t,n,i,o),"boolean"===o&&(i=!!i);else if(2===a.length){var l,u=a.indexOf("string"),c=a.indexOf("promise");-1!==u&&"string"!==s?("function"===(l=0===u?a[1]:a[0])&&"function"!==s||"array"===l.substring(0,5)&&!Array.isArray(i)||"object"===l.substring(0,6)&&"object"!==s)&&e.BaseCustomElementBridge.__ThrowTypeError(t,n,i,o):-1===c||i instanceof Promise||"array"!==(l=0===c?a[1]:a[0]).substring(0,5)||Array.isArray(i)||e.BaseCustomElementBridge.__ThrowTypeError(t,n,i,o)}}return i},e.BaseCustomElementBridge.__CompareOptionValues=function(t,n,i,r){return n.writeback?e.Object.compareValues(i,r):i===r},e.BaseCustomElementBridge.__ThrowTypeError=function(t,n,i,r){e.BaseCustomElementBridge.getInstance(t).throwError(t,"Invalid type '"+typeof i+"' found for property '"+n+"'. Expected value of type '"+r+"'.")},e.BaseCustomElementBridge.__GetDescriptor=function(t){return e.BaseCustomElementBridge._registry[t.toLowerCase()].descriptor},e.BaseCustomElementBridge.__GetCache=function(t){return t?e.BaseCustomElementBridge._registry[t.toLowerCase()].cache:null},e.BaseCustomElementBridge.__CheckOverlappingAttribute=function(t,n){var i=n.split(".");if(i.length>1)for(i.pop();i.length;){var r=i.join(".");t.hasAttribute(r)&&e.BaseCustomElementBridge.getInstance(t).throwError(t,"Cannot set overlapping attributes '"+n+"' and '"+r+"'."),i.pop()}},e.BaseCustomElementBridge.__GetPropertyMetadata=function(e,t){for(var n=t,i=e.split("."),r=0;r<i.length&&(n=n[i[r]])&&(!(i.length>1&&r<i.length-1)||(n=n.properties));r++);return n},e.BaseCustomElementBridge.__InitProperties=function(t,n){var i=e.BaseCustomElementBridge.getInstance(t);i.__INITIALIZING_PROPS=!0;var r=e.BaseCustomElementBridge.getProperties(i,t);if(r)for(var o=t.attributes,a=0;a<o.length;a++){var s=o[a],l=e.__AttributeUtils.attributeToPropertyName(s.nodeName),u=e.BaseCustomElementBridge.__GetPropertyMetadata(l,r);if(u&&!u.readOnly&&(e.BaseCustomElementBridge.__CheckOverlappingAttribute(t,s.nodeName),!e.__AttributeUtils.getExpressionInfo(s.value).expr)){var c=e.BaseCustomElementBridge.__ParseAttrValue(t,s.nodeName,l,s.value,u);i.ValidateAndSetProperty(i.GetAliasForProperty.bind(i),n,l,c,t)}}i.__INITIALIZING_PROPS=!1},e.BaseCustomElementBridge.__SetProperty=function(e,t,n,i){var r,o=t,a=n.split("."),s=e(a[0]);a.length>1&&!t[s]&&(o=r={});for(var l=0;l<a.length;l++){var u=e(a[l]);l===a.length-1?o[u]=i:o[u]||(o[u]={}),o=o[u]}r&&(t[s]=r[s])},e.BaseCustomElementBridge.__GetProperty=function(e,t){for(var n=e,i=t.split("."),r=0;r<i.length;r++){var o=i[r];if(r===i.length-1)return n[o];if(!n[o])return;n=n[o]}},e.BaseCustomElementBridge.__ParseAttrValue=function(t,n,i,r,o){function a(i){var r;try{r=e.__AttributeUtils.coerceValue(t,n,i,s)}catch(e){l.throwError(t,e)}return r}if(null==r)return r;var s=o.type,l=e.BaseCustomElementBridge.getInstance(t),u=e.BaseCustomElementBridge.__GetDescriptor(t.tagName).parseFunction;return u?u(r,i,o,function(e){return a(e)}):a(r)},e.BaseCustomElementBridge.__ProcessEventListeners=function(t){var n=e.CollectionUtils.copyInto({},t,void 0,!0,1);return n.properties=n.properties||{},e.BaseCustomElementBridge._enumerateMetadataForKey(null,n,"properties",function(t,i){var r=e.__AttributeUtils.propertyNameToChangeEventType(i),o=e.__AttributeUtils.eventTypeToEventListenerProperty(r);n.properties[o]={_derived:!0,_eventListener:!0}}),e.BaseCustomElementBridge._enumerateMetadataForKey(null,n,"events",function(t,i){var r=e.__AttributeUtils.eventTypeToEventListenerProperty(i);n.properties[r]={_derived:!0,_eventListener:!0}}),n},e.BaseCustomElementBridge.__Register=function(t,i,r,o){var a=t.toLowerCase();return!e.BaseCustomElementBridge._registry[a]&&(i||n.error("Cannot register "+t+". Missing a descriptor."),e.BaseCustomElementBridge._verifyMetadata(t,i[e.BaseCustomElementBridge.DESC_KEY_META]),e.BaseCustomElementBridge._registry[a]={descriptor:i,bridgeProto:r,composite:o,cache:{}},!0)},e.BaseCustomElementBridge.__FirePropertyChangeEvent=function(t,n,i,r,o,a){var s=e.BaseCustomElementBridge.getInstance(t);if(!s._SKIP_PROP_CHANGE_EVENT){var l={};a&&(l.subproperty=a),l.value=i,l.previousValue=r,l.updatedFrom=o,s.beforePropertyChangedEvent&&s.beforePropertyChangedEvent(t,n,l),("external"!==o||s.__READY_TO_FIRE)&&t.dispatchEvent(new CustomEvent(n+"Changed",{detail:l}))}},e.BaseCustomElementBridge.__DefineDynamicObjectProperty=function(e,t,n,i){Object.defineProperty(e,t,{enumerable:!0,get:n,set:i})};var r=0;e.BaseCustomElementBridge.__GetUnique=function(){var e="_ojcustomelem"+r;return r+=1,e},e.BaseCustomElementBridge._consolidateDefaults=function(t){var n=t.value;if(void 0!==n)return Array.isArray(n)?n.slice():null!==n&&"object"==typeof n?e.CollectionUtils.copyInto({},n,void 0,!0):n;var i=t.properties;if(i){for(var r={},o=Object.keys(i),a=0;a<o.length;a++){var s=e.BaseCustomElementBridge._consolidateDefaults(i[o[a]]);void 0!==s&&(r[o[a]]=s)}return Object.keys(r).length>0?r:void 0}},e.BaseCustomElementBridge._registry={},e.BaseCustomElementBridge.DESC_KEY_CSS="css",e.BaseCustomElementBridge.DESC_KEY_META="metadata",e.BaseCustomElementBridge.DESC_KEY_PARSE_FUN="parseFunction",e.BaseCustomElementBridge.DESC_KEY_VIEW="view",e.BaseCustomElementBridge.DESC_KEY_VIEW_MODEL="viewModel",e.BaseCustomElementBridge._GLOBAL_PROPERTIES=["accesskey","autocapitalize","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","is","itemid","itemprop","itemref","itemscope","itemtype","lang","slot","spellcheck","style","tabindex","title","translate"],e.BaseCustomElementBridge._INSTANCE_KEY="_ojBridge",e.BaseCustomElementBridge.__DelayedPromise=function(){var e,t,n;this.getPromise=function(){return e||(e=new Promise(function(e,i){t=e,n=i})),e},this.rejectPromise=function(e){n&&n(e)},this.resolvePromise=function(e){t&&t(e)}}}),define("ojs/ojcomponentcore",["ojs/ojcore","ojs/ojtranslation","jquery","ojs/ojmessaging","ojs/ojlogger","jqueryui-amd/widget","jqueryui-amd/unique-id","jqueryui-amd/keycode","jqueryui-amd/focusable","jqueryui-amd/tabbable","ojs/ojcustomelement"],function(e,t,n,i,r){"use strict";function o(e,t){var i=function(){var e=n(this),i=e.data(_);if(null!=i)for(var r=0;r<i.length;r++){var o=e.data("oj-"+i[r]);null!=o&&t(o)}},r=n(e);r.hasClass(v)&&i.call(e),r.find("."+v).each(i)}function a(e,t,i){function r(e){if(t&&e.classList.contains(v)){var r=n(e),o=r.data(_);if(null!=o)for(var a=0;a<o.length;a++){var s=r.data("oj-"+o[a]);null!=s&&t(s)}}i&&"oj-defer"===e.tagName.toLowerCase()&&e._activate()}if(!function(e){for(var t=e;t;){if(t.nodeType===Node.DOCUMENT_NODE)return!1;if(t.classList.contains(y))return!0;t=t.parentNode}return!0}(e)){r(e);var o=["."+v];i&&o.push("oj-defer");var a=[];o.forEach(function(e){a.push("."+y+" "+e),a.push("."+E+" "+e)});for(var s=o.join(","),l=a.join(","),u=function(e,t){
- for(var n=[],i=0,r=0;r<t.length;r++){for(var o=t[r];i<e.length&&e[i]!==o;)n.push(e[i]),i+=1;i+=1}for(;i<e.length;)n.push(e[i]),i+=1;return n}(e.querySelectorAll(s),e.querySelectorAll(l)),c=0;c<u.length;c++)r(u[c])}}function s(e){this.getCallback=function(){return e}}function l(e,t,n){return Object.keys(t).forEach(function(i){var r=e[i]||[],o=t[i];n?r=r.concat(o):r.push(o),e[i]=r}),e}function u(t){return e.BaseCustomElementBridge.getRegistered(t.tagName)}function c(t){return!!e.Components.__GetWidgetConstructor(t)}function p(e){return u(e)||c(e)}function d(e,t,n,i,r,o,a){var s=n,l=!1,u={};delete i[r],Object.defineProperty(i,r,{get:function(){if(l)return s;if(null!=e._settingNestedKey)return s;var n=o(a?a():r);return m([t,n,s],u)},set:function(t){s=t,null!=e._settingNestedKey?u[e._settingNestedKey]=!0:l=!0},enumerable:!0})}function h(e){if(1===e.length){var t=e[0];return t instanceof s?t.getCallback():null}for(var n=!1,i=0;i<e.length&&!n;i++){var r=e[i];null!=r&&r instanceof s&&(n=!0)}return n?function(t){var n=[];return e.forEach(function(e){null!=e&&e instanceof s?n.push(e.getCallback()(t)):n.push(e)}),m(n)}:null}function m(e,t){for(var i,r=0;r<e.length;r++){var o=e[r];void 0!==o&&(i=n.isPlainObject(o)?g({},n.isPlainObject(i)?[i,o]:[o],r===e.length-1?null:t,null):o)}return i}function g(e,t,i,r){for(var o=t.length,a=0;a<o;a++)for(var s=t[a],l=Object.keys(s),u=0;u<l.length;u++){var c,p=l[u];if(c=null==i?null:null==r?p:r+"."+p,null==i||!i[c]){var d=s[p];if(void 0!==d)if(n.isPlainObject(d)){var h=n.isPlainObject(e[p])?[e[p],d]:[d];e[p]=g({},h,i,c)}else e[p]=d}}return e}function f(){return!0}e.Components={},e.Components,e.Components._OJ_CONTAINER_ATTR="data-oj-container";var _="oj-component-names",v="oj-component-initnode",y="oj-subtree-hidden",E="oj-pending-subtree-hidden";e.Components.setDefaultOptions=function(t){var n=e.Components._defaultProperties||{};Object.keys(t).forEach(function(i){var r=t[i];if(!e.CollectionUtils.isPlainObject(r))throw new Error("Invalid default options");n[i]=l(n[i]||{},r,!1)}),e.Components._defaultProperties=n},e.Components.getDefaultOptions=function(){return e.Components._defaultProperties||{}},e.Components.createDynamicPropertyGetter=function(e){return new s(e)},e.Components.getWidgetConstructor=function(t,n){return t&&!e.BaseCustomElementBridge.getRegistered(t.tagName)?e.Components.__GetWidgetConstructor(t,n):null},e.Components.__GetWidgetConstructor=function(e,t){var i=n(e),r=i.data(_);if(r&&(null==t?t=r[0]:r.indexOf(t)<0&&(t=void 0),null!=t)){var o=i[t];if("function"==typeof o)return o.bind(i)}return null},e.Components.subtreeAttached=function(t){e.DomUtils.fixResizeListeners(t),o(t,function(e){e.__handleSubtreeAttached()})},e.Components.subtreeDetached=function(e){o(e,function(e){e.__handleSubtreeDetached()})},e.Components.subtreeShown=function(t,i){var r=(i||{}).initialRender;r||e.DomUtils.fixResizeListeners(t);var o=n(t)[0];o.classList.remove(y),a(o,function(e){r?e._NotifyInitShown():e._NotifyShown()},!0)},e.Components.subtreeHidden=function(e){var t=n(e)[0];a(t,function(e){e._NotifyHidden()},!1),t.classList.add(y)},e.Components.markPendingSubtreeHidden=function(e){e.classList.add(E)},e.Components.unmarkPendingSubtreeHidden=function(e){e.classList.remove(E)},e.Components.isComponentInitialized=function(e,t){var i=e.data(_);return!!(n.isArray(i)&&i.indexOf(t)>-1&&e.is("."+v))},e.Components.__getDefaultOptions=function(t){for(var n={},i=e.Components.getDefaultOptions(),r=t.length-1;r>=0;r--){var o=i[t[r]];void 0!==o&&(n=l(n,o,!0))}return n},e.Components.getComponentElementByNode=function(t){return function t(n,i){if(null==n)return null;var r=1===n.nodeType,o=e.Composite&&!i?e.Composite.getContainingComposite(n):null;if(o)return o;if(r&&n.hasAttribute("data-oj-internal"))return n.parentNode instanceof Element&&n.parentNode.hasAttribute("data-oj-surrogate-id")?(n=document.querySelector("[data-oj-popup-"+n.id+"-parent]"),t(n,i)):t(n.parentNode,i);if(p(n))return n;if(r&&n.classList.contains("oj-component")){if(c(n=n.querySelector(".oj-component-initnode:not([data-oj-internal])")||n))return n}else if(r&&n.hasAttribute("data-oj-containerid"))return n=document.getElementById(n.getAttribute("data-oj-containerid")),t(n,i);return t(n.parentNode,i)}(t,!!(arguments.length>1&&arguments[1]))},e.Components.getSubIdByNode=function(t,n){return e.Components.callComponentMethod(t,"getSubIdByNode",n)},e.Components.getNodeBySubId=function(t,n){return e.Components.callComponentMethod(t,"getNodeBySubId",n)},e.Components.getComponentOption=function(t,n){if(!p(t))throw new Error("node is not a component element");return u(t)?t.getProperty?t.getProperty.call(t,n):void 0:e.Components.__GetWidgetConstructor(t)("option",n)},e.Components.setComponentOption=function(t,n,i){if(!p(t))throw new Error("node is not a component element");u(t)?t.setProperty&&t.setProperty.call(t,n,i):e.Components.__GetWidgetConstructor(t)("option",n,i)},e.Components.callComponentMethod=function(t,i,r){if(!p(t))throw new Error("node is not a component element");return u(t)?t[i]?t[i].apply(t,[].slice.call(arguments,2)):void 0:e.Components.__GetWidgetConstructor(t).apply(n(t),[].slice.call(arguments,1))};var S,b={isDefaultPrevented:function(){return!1},preventDefault:function(){this.isDefaultPrevented=f},stopPropagation:function(){this.isPropagationStopped=f},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=f}};n.widget("oj.baseComponent",{options:{contextMenu:null,rootAttributes:null,optionChange:void 0,destroy:void 0},refresh:function(){this._propertyContext=null,this._SetupContextMenu()},_createWidget:function(e,t){e&&(this.OuterWrapper=e._wrapper),this._originalDefaults=this.options||{},this._constructorOptions=e||{},this._super(e,t),this._AfterCreateEvent()},_SetRootAttributes:function(){var e=this.options.rootAttributes;if(e){var t=this.widget();if(null==t)return;var i=e.class;i&&t.addClass(i);var r=e.style;if(r){var o=t.attr("style");o?t.attr("style",o+";"+r):t.attr("style",r)}delete(e=n.extend({},e)).class,delete e.style,t.attr(e),delete e.id;var a=Object.keys(e);if(a.length)throw new Error("Unsupported values passed to rootAttributes option: "+a.toString())}},_create:function(){this._SaveAttributes(this.element),this._InitOptions(this._originalDefaults,this._constructorOptions),delete this._originalDefaults,delete this._constructorOptions,this._ComponentCreate(),this._AfterCreate(),this._SetupResources(),this.element.addClass(v)},_InitOptions:function(e,t){this._setupDefaultOptions(e,t),this._initContextMenuOption(t)},_ComponentCreate:function(){var e,t,n;e=this.element,t=this.widgetName,(n=e.data(_))||(n=[],e.data(_,n)),n.indexOf(t)<0&&n.push(t),this.activeableEventNamespace=this.eventNamespace+"activeable",this.hoverableEventNamespace=this.eventNamespace+"hoverable"},_AfterCreate:function(){this._SetRootAttributes(),this.contextMenuEventNamespace=this.eventNamespace+"contextMenu",this.activeableEventNamespace=this.eventNamespace+"activeable",this.hoverableEventNamespace=this.eventNamespace+"hoverable"},_AfterCreateEvent:n.noop,_setOptionClasses:function(){},_setOptionDisabled:function(){},_classes:function(){return""},_removeClass:function(){return this},_addClass:function(){return this},_toggleClass:function(){return this},_SaveAttributes:function(e){},_SaveAllAttributes:function(e){var t=this;this._savedAttributes=[],n.each(e,function(e,i){var r={},o={element:i,attributes:r},a=i.attributes;t._savedAttributes.push(o),n.each(a,function(e,t){var n=t.name;r[n]={attr:t.value}})})},_GetSavedAttributes:function(e){var t=this._savedAttributes;if(void 0===t)return null;for(var n=e[0],i=0,r=t.length;i<r;i++){var o=t[i];if(o.element===n)return o.attributes}return{}},_RestoreAttributes:function(){},_RestoreAllAttributes:function(){n.each(this._savedAttributes,function(e,t){var i=n(t.element),r=t.attributes;if(1===i.length){var o,a,s=t.element.attributes,l=[];for(o=0,a=s.length;o<a;o++)s[o].name in r||l.push(s[o].name);for(o=0,a=l.length;o<a;o++)i.removeAttr(l[o]);var u=Object.keys(r);for(o=0;o<u.length;o++){var c=u[o];i.attr(c,r[c].attr)}}})},_GetTranslationsSectionName:function(){return this.widgetFullName},_CompareOptionValues:function(t,n,i){return this._IsCustomElement()&&this._getWritebackOption(t)?e.Object.compareValues(n,i):n===i},getTranslatedString:function(e,n){var i={};arguments.length>2?i=Array.prototype.slice.call(arguments,1):2===arguments.length&&("object"==typeof(i=arguments[1])||i instanceof Array||(i=[i]));var r=this.option("translations."+e);return null==r?e:t.applyParameters(r.toString(),i)},getNodeBySubId:function(e){return null!=e&&null!=e.subId||!this.element?null:this.element[0]},getSubIdByNode:function(e){return null},destroy:function(){if(this._IsCustomElement())throw new Error("destroy cannot be called on a custom element");this._trigger("destroy"),e.DomUtils.dispatchEvent(this.element[0],new CustomEvent("_ojDestroy")),this._ReleaseResources(),this._super(),this.element.removeClass(v),this.widget().removeClass("oj-disabled"),this._removeStateClasses(this.element),function(e,t){var n=e.data(_);if(n){var i=n.indexOf(t);i>=0&&(n.splice(i,1),0===n.length&&e.removeData(_))}}(this.element,this.widgetName),this._RestoreAttributes(),this._initialCmDomAttr?this.element.attr("contextmenu",this._initialCmDomAttr):this.element.removeAttr("contextmenu"),this._propertyContext=null},option:function(t,i){if(0===arguments.length)return n.widget.extend({},this.options);var o,a=arguments[0],s=a,l=null,u={};if("string"==typeof a){s={};var c=a.split(".");if(a=c.shift(),c.length){var p;l=c.join(".");try{arguments.length>1&&(this._settingNestedKey=l),p=n.widget.extend({},this.options[a]),s[a]=p}finally{this._settingNestedKey=null}for(o=0;o<c.length-1;o++)p[c[o]]=p[c[o]]||{},p=p[c[o]];if(a=c.pop(),1===arguments.length)return void 0===p[a]?null:p[a];p[a]=i}else{if(1===arguments.length)return void 0===this.options[a]?null:this.options[a];s[a]=i}u=arguments[2]||u}else u=arguments[1]||u;if(null!=l){var d={path:t,value:i};u=n.widget.extend({},u,{subkey:l,subproperty:d})}var h=u?u._context:null,m=!!h&&h.internalSet,g={},f=Object.keys(s);for(o=0;o<f.length;o++){var _=f[o],v=s[_],y=this.options[_];u&&u.changed||!this._CompareOptionValues(_,y,v)?g[_]=v:this._IsCustomElement()&&r.info(e.BaseCustomElementBridge.getElementInfo(this.element[0])+": Ignoring property set for property '"+_+"' with same value.")}return Object.keys(g).length>0&&(m?this._internalSetOptions(g,u):this._setOptions(g,u)),this},_internalSetOptions:function(e,t){for(var n=Object.keys(e),i=0;i<n.length;i++){var r=n[i],o=e[r],a=this.options[r];this.options[r]=o,this._optionChanged(r,o,a,t)}},_setOptions:function(e,t){for(var n=Object.keys(e),i=0;i<n.length;i++){var r=n[i],o=e[r];this._setOption(r,o,t)}return this},_setOption:function(e,t,n){var i=this.options[e];if("disabled"===e)this.options[e]=t,this.widget().toggleClass("oj-disabled",!!t).attr("aria-disabled",t),t&&this._removeStateClasses(this.widget());else{try{var r=null==n?null:n.subkey;null!=r&&(this._settingNestedKey=r),this._super(e,t)}finally{this._settingNestedKey=null}"contextMenu"===e&&this._SetupContextMenu()}return this._optionChanged(e,t,i,n),this},_optionChanged:function(e,t,i,r){var o,a=null,s=!1,l=!1,u=null,c="external",p=null;if(r&&(a=r._context)){if(a.skipEvent)return;u=a.originalEvent,s=void 0===a.writeback?null!=u:a.writeback,l=a.readOnly,p=a.optionMetadata,o=a.extraData,a.internalSet&&(c="internal")}(p=p||{}).writeback=s?"shouldWrite":"shouldNotWrite",l&&(p.readOnly=!0);var d={option:e,previousValue:i,value:t,optionMetadata:p,updatedFrom:c},h=null==r?null:r.subkey;if(h){var m=h.split("."),g=i;m.forEach(function(e){g&&(g=g[e])});var f=r.subproperty;f.previousValue=g,d.subproperty=f}null!=o&&(d=n.extend({},o,d)),this._trigger("optionChange",u,d)},_SetupResources:function(){this._SetupContextMenu()},_ReleaseResources:function(){this._ReleaseContextMenu()},_trigger:function(e,t,n){return this._trigger2(e,t,n).proceed},_trigger2:function(e,t,i){var r=i||{};if(this._IsCustomElement())return this._triggerCustomEvent(e,t,r);var o=this.options[e],a=n.Event(t,b);return a.type=(this.widgetEventPrefix+e).toLowerCase(),a.target=this.element[0],this.element.trigger(a,r),{proceed:!(n.isFunction(o)&&!1===o.apply(this.element[0],[a].concat(r))||a.isDefaultPrevented()),event:a}},_triggerCustomEvent:function(t,i,r){var o,a,s,l={},u=this._getRootElement();if("optionChange"===t){var c=e.CustomElementBridge.getPropertyForAlias(u,r.option);if(!e.CustomElementBridge.isKnownProperty(u,c))return{proceed:!0,event:null};o=e.__AttributeUtils.propertyNameToChangeEventType(c);for(var p=Object.keys(r),d=0;d<p.length;d++){var h=p[d];if("option"!==h)if("optionMetadata"===h)for(var m=Object.keys(r[h]),g=0;g<m.length;g++){var f=m[g];"writeback"!==f&&"component"!==f&&(l[f]=r[h][f])}else l[h]=r[h]}}else{if(o=e.__AttributeUtils.eventTriggerToEventType(t),!e.CustomElementBridge.isKnownEvent(u,o))return{proceed:!0,event:null};a=!0,s=!0,l=this._resolveJQueryObjects(r)}i&&(l.originalEvent=i instanceof n.Event?i.originalEvent:i);var _={detail:l};a&&(_.bubbles=!0),s&&(_.cancelable=!0);var v=new CustomEvent(o,_);return u.dispatchEvent(v),{proceed:!v.defaultPrevented,event:v}},_resolveJQueryObjects:function(t){for(var i=e.CollectionUtils.copyInto({},t),r=Object.keys(i),o=0;o<r.length;o++){var a=r[o],s=i[a];s&&s instanceof n&&(0===s.length?i[a]=null:1===s.length?i[a]=s[0]:i=s.toArray())}return i},_initContextMenuOption:function(e){var t=this.element.attr("contextmenu");this._initialCmDomAttr=t,!t||"contextMenu"in e||this.option("contextMenu",document.getElementById(t),{_context:{internalSet:!0}})},_handleContextMenuGesture:function(t,i,r){if(!this._IsEffectivelyDisabled()){var o;if("OJ-MENU"===t.tagName)o=t;else{var a=e.Components.__GetWidgetConstructor(t,"ojMenu");if(!(o=a&&a("instance")))throw new Error("Invalid JET Menu.")}this._NotifyContextMenuGesture(o,i,r),n(t).is(":visible")&&i.preventDefault()}},_SetupContextMenu:function(){var t=this._GetContextMenu();if(t||(t=this._GetDefaultContextMenu()),t&&void 0===this._contextMenuGestureInit){this._contextMenuGestureInit=t;var n=this;e.GestureUtils.startDetectContextMenuGesture(this.widget()[0],function(e,i){n._handleContextMenuGesture(t,e,i)})}},_ReleaseContextMenu:function(){this._contextMenuGestureInit=void 0,e.GestureUtils.stopDetectContextMenuGesture(this.widget()[0])},_GetContextMenu:function(){if(this._IsCustomElement()){var t=e.BaseCustomElementBridge.getSlotMap(this._getRootElement()).contextMenu;if(t&&t.length>0)return t[0]}else if(this.options.contextMenu)return n(this.options.contextMenu).first()[0];return null},_NotifyContextMenuGesture:function(e,t,n){this._OpenContextMenu(t,n)},_OpenContextMenu:function(t,i,r,o,a){var s=this._GetContextMenu();if(s||(s=this._contextMenuGestureInit&&n(this._contextMenuGestureInit).is(":visible")?this._contextMenuGestureInit:this._GetDefaultContextMenu()),s){var l={mouse:{my:"start top",at:"start bottom",of:t,collision:"flipfit"},touch:{my:"start>40 center",at:"start bottom",of:t,collision:"flipfit"},keyboard:{my:"start top",at:"start bottom",of:"launcher",collision:"flipfit"}},u={launcher:this.element,position:l[i]},c={initialFocus:"menu"},p=a?n.extend(u,r,c):n.extend(!0,u,r,c);if(s.__openingContextMenu=!0,"OJ-MENU"===s.tagName)s.open(t,p,o);else{var d=e.Components.__GetWidgetConstructor(s,"ojMenu");(d&&d("instance")).open(t,p,o);var h=function(e){e.preventDefault()};s.addEventListener("contextmenu",h),window.setTimeout(function(){s.removeEventListener("contextmenu",h)},50)}s.__openingContextMenu=!1}},_GetDefaultContextMenu:function(){return null},_removeStateClasses:function(e){e.removeClass("oj-hover oj-focus oj-focus-highlight oj-active"),e.find(".oj-hover").removeClass("oj-hover"),e.find(".oj-focus").removeClass("oj-focus"),e.find(".oj-focus-highlight").removeClass("oj-focus-highlight"),e.find(".oj-active").removeClass("oj-active")},_isRealMouseEvent:function(){return!e.DomUtils.recentTouchEnd()},_AddHoverable:function(e){var t;n.isPlainObject(e)?t=e.element:(t=e,e={});var i=e.afterToggle||n.noop;t.on("mouseenter"+this.hoverableEventNamespace,this._hoverStartHandler.bind(this,i)).on("mouseleave"+this.hoverableEventNamespace,this._hoverAndActiveEndHandler.bind(this,"oj-hover",i))},_RemoveHoverable:function(e){e&&e.off(this.hoverableEventNamespace)},_AddActiveable:function(t){var i;n.isPlainObject(t)?i=t.element:(i=t,t={});var r=t.afterToggle||n.noop;e.DomUtils.isTouchSupported()&&i.on("touchstart"+this.activeableEventNamespace,this._activeStartHandler.bind(this,r)).on("touchend"+this.activeableEventNamespace+" touchcancel"+this.activeableEventNamespace,this._hoverAndActiveEndHandler.bind(this,"oj-active",r)),i.on("mousedown"+this.activeableEventNamespace,this._activeStartHandler.bind(this,r)).on("mouseup"+this.activeableEventNamespace,this._hoverAndActiveEndHandler.bind(this,"oj-active",r)).on("mouseenter"+this.activeableEventNamespace,this._activeStartHandler.bind(this,r)).on("mouseleave"+this.activeableEventNamespace,this._hoverAndActiveEndHandler.bind(this,"oj-active",r))},_RemoveActiveable:function(e){e&&(e.off(this.activeableEventNamespace),S=null)},_activeStartHandler:function(e,t){var i=n(t.currentTarget);("mouseenter"!==t.type||this._isTargetInActiveElement(t.currentTarget))&&(i.hasClass("oj-disabled")||"touchstart"!==t.type&&!this._isRealMouseEvent(t)||(i.addClass("oj-active"),e(t.type),"mousedown"===t.type&&(S=t.currentTarget,this.document.one("mouseup",function(){S=null}))))},_hoverStartHandler:function(e,t){var i=n(t.currentTarget);!i.hasClass("oj-disabled")&&this._isRealMouseEvent(t)&&(i.addClass("oj-hover"),e(t.type))},_hoverAndActiveEndHandler:function(e,t,i){("oj-active"!==e||"mouseleave"!==i.type||this._isTargetInActiveElement(i.currentTarget))&&(n(i.currentTarget).removeClass(e),t(i.type))},_isTargetInActiveElement:function(e){return S===e||null!=S&&n.contains(S,e)},_hoverable:function(){},_focusable:function(t){n.isPlainObject(t)||(t={element:t}),t.component=this,e.DomUtils.makeFocusable(t)},_UnregisterChildNode:function(e){if(e){n(e).off(this.eventNamespace);var t=this.bindings;t&&(this.bindings=n(t.not(e)))}},_GetReadingDirection:function(){return e.DomUtils.getReadingDirection()},_NotifyAttached:function(){this._propertyContext=null},_NotifyDetached:function(){this._propertyContext=null,this._removeStateClasses(this.widget())},_NotifyInitShown:function(){},_NotifyShown:function(){},_NotifyHidden:function(){},_IsEffectivelyDisabled:function(){return!(!this.options.disabled&&!this._ancestorDisabled)},__setAncestorComponentDisabled:function(e){this._ancestorDisabled=e},_getTranslationSectionLoader:function(){var e=[],i=this,r=0;this._traverseWidgetHierarchy(function(o){var a=0===r?i._GetTranslationsSectionName():o.widgetFullName;r+=1;var s=t.getComponentTranslations(a);null==s||n.isEmptyObject(s)||e.push(a)});var o=e.length;return o>0?function(){if(1===o)return t.getComponentTranslations(e[0]);for(var i={},r=o-1;r>=0;r--)n.widget.extend(i,t.getComponentTranslations(e[r]));return i}:null},_getDynamicPropertyContext:function(){if(!this._propertyContext){var t={};this._propertyContext=t;var n=this.element[0];t.containers=function(t){for(var n=t,i=[];n;){var r=n.getAttribute,o=r?r.call(n,e.Components._OJ_CONTAINER_ATTR):null;null!=o&&i.push(o),n=n.parentNode}return i}(n),t.element=n,t.isCustomElement=this._IsCustomElement()}return this._propertyContext},_setupDefaultOptions:function(e,t){var i=this.options,r=this._getTranslationSectionLoader(),o=t.translations;null==r||void 0!==o&&!n.isPlainObject(o)||d(this,void 0,t.translations,i,"translations",r),this._loadGlobalDefaultOptions(e,t)},_loadGlobalDefaultOptions:function(t,i){var r=this.options,o=[];this._traverseWidgetHierarchy(function(e){o.push(e.widgetName)}),o.push("default");var a=e.Components.__getDefaultOptions(o);if(!n.isEmptyObject(a))for(var s=this,l=function(){return s._getDynamicPropertyContext()},u=Object.keys(a),c=0;c<u.length;c++){var p=u[c],g=i[p];if(void 0===g||n.isPlainObject(g)){var f=a[p];if(f){var _=h(f);if(_)d(this,t[p],g,r,p,_,l);else{var v=[t[p]].concat(f);v.push(g),r[p]=m(v)}}}}},_traverseWidgetHierarchy:function(e){for(var t=this.constructor.prototype;null!=t&&"oj"===t.namespace;)e(t),t=Object.getPrototypeOf(t)},_getRootElement:function(){return this.OuterWrapper||this.element[0]},_IsCustomElement:function(){return null!=e.BaseCustomElementBridge.getRegistered(this._getRootElement().tagName)},_FixRendererContext:function(t){if(this._IsCustomElement()){var n=e.CollectionUtils.copyInto({},t);return delete n.component,n.componentElement=this._getRootElement(),n}return t},_WrapCustomElementRenderer:function(e){return this._IsCustomElement()&&"function"==typeof e?function(t){var n=e(t);return n&&n.insert?n.insert:null}:e},__saveWritebackOptions:function(e){this._writebackOptions=e},_getWritebackOption:function(e){return!(!this._writebackOptions||!this._writebackOptions[e])},__handleSubtreeAttached:function(){this._IsCustomElement()||this._NotifyAttached()},__handleSubtreeDetached:function(){this._IsCustomElement()||this._NotifyDetached()},_VerifyConnectedForSetup:function(){return!1},__handleConnected:function(){this._NotifyAttached(),this.__delayConnectDisconnect(0)||this._SetupResources()},__handleDisconnected:function(){this.__delayConnectDisconnect(1)||this._ReleaseResources(),this._NotifyDetached()},__delayConnectDisconnect:function(e){if(!this._VerifyConnectedForSetup())return!1;if(void 0===this.connectedState){var t=this;Promise.resolve().then(function(){t.connectedState===e&&(0===e?t._SetupResources():t._ReleaseResources()),t.connectedState=void 0})}return this.connectedState=e,!0},__handleWatchedAttribute:function(e,t,n){this._WatchedAttributeChanged(e,t,n)},_WatchedAttributeChanged:function(e,t,n){},__getFocusElement:function(){return this.GetFocusElement()},GetFocusElement:function(){return this.element[0]}}),delete n.fn.baseComponent,e.__registerWidget=function(e,t,i,r){if(n.widget(e,t,i),r){var o=e.split(".")[1];delete n.fn[o]}if("oj.oj"===e.substring(0,5)||"oj._oj"===e.substring(0,6)){var a,s=e.split("."),l=s[0],u=s[1],c=l+"-"+u;a="_"===u.substring(0,1)?"_"+l+"-"+u.substring(3):l+"-"+u.substring(2),n.expr.pseudos[a.toLowerCase()]=function(e){return!!n.data(e,c)}}},e.ComponentMessaging=function(e){this.Init(e)},e.Object.createSubclass(e.ComponentMessaging,e.Object,"oj.ComponentMessaging"),e.ComponentMessaging._DISPLAY_TYPE={NONE:"none",NOTEWINDOW:"notewindow",PLACEHOLDER:"placeholder",INLINE:"inline"},e.ComponentMessaging._DISPLAY_TYPE_TO_CALLBACK={},e.ComponentMessaging.registerMessagingStrategy=function(t,n){t&&"function"==typeof n&&(e.ComponentMessaging._DISPLAY_TYPE_TO_CALLBACK[t]=n)},e.ComponentMessaging.prototype.Init=function(t){e.ComponentMessaging.superclass.Init.call(this),this._component=t,this._activated=!1,this._initializeMessagingStrategies()},e.ComponentMessaging.prototype.activate=function(t,i,r){var o=this;e.Assert.assertObject(r),this._launcher=t,this._contentElement=i,this._messagingContent=e.CollectionUtils.copyInto(this._messagingContent||{},r),this._isActive()?this._reactivate():(n.each(this._strategies,function(e,t){t.activate(o)}),this._activated=!0)},e.ComponentMessaging.prototype.update=function(t){e.Assert.assertObject(t),e.Assert.assertBoolean(this._activated),this._messagingContent=e.CollectionUtils.copyInto(this._messagingContent||{},t),this._activated&&n.each(this._strategies,function(e,n){n.shouldUpdate(t)&&n.update()})},e.ComponentMessaging.prototype.deactivate=function(){n.each(this._strategies,function(e,t){t.deactivate()}),this._activated=!1,this._component=null,this._launcher=null,this._contentElement=null,this._strategies={}},e.ComponentMessaging.prototype.close=function(){this._activated&&n.each(this._strategies,function(e,t){t.close()})},e.ComponentMessaging.prototype._createMessagingStrategy=function(t,n){return new(e.ComponentMessaging._DISPLAY_TYPE_TO_CALLBACK[t]||e.ComponentMessaging._DISPLAY_TYPE_TO_CALLBACK[e.ComponentMessaging._DISPLAY_TYPE.NONE])(n)},e.ComponentMessaging.prototype._getComponent=function(){return this._component||null},e.ComponentMessaging.prototype._getLauncher=function(){return this._launcher||null},e.ComponentMessaging.prototype._getContentElement=function(){return this._contentElement||null},e.ComponentMessaging.prototype._getMessagingContent=function(){return this._messagingContent||{}},e.ComponentMessaging.prototype._isActive=function(){return this._activated},e.ComponentMessaging.prototype._getResolvedMessagingDisplayOptions=function(){for(var t={},i=!1,r=this._component.options.placeholder,o=this._component.options.displayOptions||{},a={},s=Object.keys(o),l=0;l<s.length;l++){var u=s[l],c=o[u];i=!1;var p=u+"";if(Array.isArray(c))for(var d=0;d<c.length;d++){var h=c[d];i||(i=this._resolveDisplayTypeForArtifact(p,h,r,a))}else"string"==typeof c&&(i||(i=this._resolveDisplayTypeForArtifact(p,c,r,a)));i||(a[p]=e.ComponentMessaging._DISPLAY_TYPE.NONE)}return n.each(e.ComponentMessaging._DISPLAY_TYPE,function(e,n){t[n]=[]}),n.each(a,function(e,n){t[n].push(e)}),t},e.ComponentMessaging.prototype._resolveDisplayTypeForArtifact=function(t,n,i,r){var o=!1;switch(n){case e.ComponentMessaging._DISPLAY_TYPE.PLACEHOLDER:"converterHint"===t&&(o||i||(r[t]=n,o=!0));break;case e.ComponentMessaging._DISPLAY_TYPE.INLINE:"messages"===t&&(o||(r[t]=n,o=!0));break;default:o||(r[t]=n,o=!0)}return o},e.ComponentMessaging.prototype._initializeMessagingStrategies=function(){var t=this._getResolvedMessagingDisplayOptions(),n=t[e.ComponentMessaging._DISPLAY_TYPE.NOTEWINDOW],i=t[e.ComponentMessaging._DISPLAY_TYPE.NONE],r=t[e.ComponentMessaging._DISPLAY_TYPE.PLACEHOLDER],o=t[e.ComponentMessaging._DISPLAY_TYPE.INLINE],a={};n.length>0&&(a[e.ComponentMessaging._DISPLAY_TYPE.NOTEWINDOW]=this._createMessagingStrategy(e.ComponentMessaging._DISPLAY_TYPE.NOTEWINDOW,n)),r.length>0&&(a[e.ComponentMessaging._DISPLAY_TYPE.PLACEHOLDER]=this._createMessagingStrategy(e.ComponentMessaging._DISPLAY_TYPE.PLACEHOLDER,r)),o.length>0&&(a[e.ComponentMessaging._DISPLAY_TYPE.INLINE]=this._createMessagingStrategy(e.ComponentMessaging._DISPLAY_TYPE.INLINE,o)),a[e.ComponentMessaging._DISPLAY_TYPE.NONE]=this._createMessagingStrategy(e.ComponentMessaging._DISPLAY_TYPE.NONE,i),this._strategies=a},e.ComponentMessaging.prototype._reactivate=function(){var t,i=this._getResolvedMessagingDisplayOptions(),r=this;n.each(i,function(n,i){n+="",t=r._strategies[n],i&&i.length>0?t?t&&t.reactivate(i):(t=r._createMessagingStrategy(n,i),r._strategies[n]=t,t.activate(r)):t&&e.ComponentMessaging._DISPLAY_TYPE.NONE!==n&&(t.deactivate(),delete r._strategies[n])})},e.MessagingStrategy=function(e){this.Init(e)},e.Object.createSubclass(e.MessagingStrategy,e.Object,"oj.MessagingStrategy"),e.MessagingStrategy.prototype.Init=function(t){e.Assert.assertArray(t),e.MessagingStrategy.superclass.Init.call(this),this._displayOptions=t},e.MessagingStrategy.prototype.activate=function(e){this._componentMessaging=e},e.MessagingStrategy.prototype.deactivate=function(){},e.MessagingStrategy.prototype.close=function(){},e.MessagingStrategy.prototype.reactivate=function(e){this.Init(e)},e.MessagingStrategy.prototype.shouldUpdate=function(e){return!0},e.MessagingStrategy.prototype.update=function(){},e.MessagingStrategy.prototype.GetLauncher=function(){return this._componentMessaging._getLauncher()},e.MessagingStrategy.prototype.GetContentElement=function(){return this._componentMessaging._getContentElement()},e.MessagingStrategy.prototype.GetComponent=function(){return this._componentMessaging._getComponent()},e.MessagingStrategy.prototype.GetMessages=function(){return this.GetValidityState().getMessages()},e.MessagingStrategy.prototype.GetMaxSeverity=function(){return this.GetValidityState().getMaxSeverity()},e.MessagingStrategy.prototype.GetConverterHint=function(){var e=[],t=this._getMessagingContent(),n=t&&t.converterHint;return n&&e.push(n),e},e.MessagingStrategy.prototype.GetValidatorHints=function(){var e=[],t=this._getMessagingContent(),i=t&&t.validatorHint||[];return n.each(i,function(t,n){e.push(n)}),e},e.MessagingStrategy.prototype.GetTitle=function(){var e=this._getMessagingContent();return e&&e.title||""},e.MessagingStrategy.prototype.GetValidityState=function(){var e=this._getMessagingContent();return e&&e.validityState||null},e.MessagingStrategy.prototype.HasMessages=function(){var e=this.GetMessages();return!!(e&&e.length>0)},e.MessagingStrategy.prototype.ShowMessages=function(){return-1!==this._displayOptions.indexOf("messages")},e.MessagingStrategy.prototype.ShowConverterHint=function(){return-1!==this._displayOptions.indexOf("converterHint")},e.MessagingStrategy.prototype.ShowValidatorHint=function(){return-1!==this._displayOptions.indexOf("validatorHint")},e.MessagingStrategy.prototype.ShowTitle=function(){return-1!==this._displayOptions.indexOf("title")||-1!==this._displayOptions.indexOf("helpInstruction")},e.MessagingStrategy.prototype.IsInvalid=function(){return this.GetValidityState().isInvalid()},e.MessagingStrategy.prototype._getMessagingContent=function(){return this._componentMessaging?this._componentMessaging._getMessagingContent():{}},e.DefaultMessagingStrategy=function(e){this.Init(e)},e.ComponentMessaging.registerMessagingStrategy(e.ComponentMessaging._DISPLAY_TYPE.NONE,e.DefaultMessagingStrategy),e.DefaultMessagingStrategy._SELECTOR_STATE_INVALID="oj-invalid",e.DefaultMessagingStrategy._SELECTOR_STATE_WARNING="oj-warning",e.Object.createSubclass(e.DefaultMessagingStrategy,e.MessagingStrategy,"oj.DefaultMessagingStrategy"),e.DefaultMessagingStrategy.prototype.update=function(){e.DefaultMessagingStrategy.superclass.update.call(this);var t=this.GetLauncher(),n=this.GetMaxSeverity(),r=[],o=[],a=!1,s=this.GetComponent().widget();t&&(this.IsInvalid()?(r.push(e.DefaultMessagingStrategy._SELECTOR_STATE_WARNING),o.push(e.DefaultMessagingStrategy._SELECTOR_STATE_INVALID),a=!0):this.HasMessages()&&n===i.SEVERITY_LEVEL.WARNING?(r.push(e.DefaultMessagingStrategy._SELECTOR_STATE_INVALID),o.push(e.DefaultMessagingStrategy._SELECTOR_STATE_WARNING)):(r.push(e.DefaultMessagingStrategy._SELECTOR_STATE_INVALID),r.push(e.DefaultMessagingStrategy._SELECTOR_STATE_WARNING)),s.removeClass(r.join(" ")).addClass(o.join(" ")),this.GetContentElement().attr({"aria-invalid":a}))},e.DefaultMessagingStrategy.prototype.deactivate=function(){this.GetComponent().widget().removeClass(e.DefaultMessagingStrategy._SELECTOR_STATE_INVALID).removeClass(e.DefaultMessagingStrategy._SELECTOR_STATE_WARNING),this.GetContentElement().removeAttr("aria-invalid"),e.DefaultMessagingStrategy.superclass.deactivate.call(this)},e.PlaceholderMessagingStrategy=function(e){this.Init(e)},e.ComponentMessaging.registerMessagingStrategy(e.ComponentMessaging._DISPLAY_TYPE.PLACEHOLDER,e.PlaceholderMessagingStrategy),e.Object.createSubclass(e.PlaceholderMessagingStrategy,e.MessagingStrategy,"oj.PlaceholderMessagingStrategy"),e.PlaceholderMessagingStrategy.prototype.Init=function(t){e.PlaceholderMessagingStrategy.superclass.Init.call(this,t)},e.PlaceholderMessagingStrategy.prototype.activate=function(t){e.PlaceholderMessagingStrategy.superclass.activate.call(this,t),this._refreshPlaceholder()},e.PlaceholderMessagingStrategy.prototype.reactivate=function(t){e.PlaceholderMessagingStrategy.superclass.reactivate.call(this,t),this._refreshPlaceholder()},e.PlaceholderMessagingStrategy.prototype.shouldUpdate=function(e){return!(!e||void 0===e.converterHint)},e.PlaceholderMessagingStrategy.prototype.update=function(){e.PlaceholderMessagingStrategy.superclass.update.call(this),this._refreshPlaceholder()},e.PlaceholderMessagingStrategy.prototype._refreshPlaceholder=function(){var e=this.GetLauncher();if(this.ShowPlaceholderContent()&&e){var t=this.GetConverterHint(),n=t.length?t[0]:"",i={internalMessagingSet:!0};this.GetComponent().option({placeholder:n},{_context:i})}},e.PlaceholderMessagingStrategy.prototype.ShowPlaceholderContent=function(){return this.ShowConverterHint();
- },e.ComponentValidity=function(e,t){this.Init(e,t)},e.ComponentValidity.isInvalid=function(e){return i.getMaxSeverity(e)>=i.SEVERITY_LEVEL.ERROR},e.Object.createSubclass(e.ComponentValidity,e.Object,"oj.ComponentValidity"),e.ComponentValidity.prototype.Init=function(t,n){e.ComponentValidity.superclass.Init.call(this),this._initialize(t,n)},e.ComponentValidity.prototype.isInvalid=function(){return this._invalid},e.ComponentValidity.prototype.getMessages=function(){return this._messages},e.ComponentValidity.prototype.getMaxSeverity=function(){return this._maxSeverity},e.ComponentValidity.prototype.update=function(e,t){this._initialize(e,t)},e.ComponentValidity.prototype._initialize=function(t,n){this._compValid=t,this._compMessages=n,this._messages=this._getImmediateMessages(),this._maxSeverity=i.getMaxSeverity(this._messages),this._invalid=e.ComponentValidity.isInvalid(this._messages)},e.ComponentValidity.prototype._getImmediateMessages=function(){for(var t=this._compMessages||[],n=[],i=0;i<t.length;i++){var r=t[i];r instanceof e.ComponentMessage&&!r.canDisplay()||n.push(r)}return n},e.CustomElementBridge={},e.CustomElementBridge.proto=Object.create(e.BaseCustomElementBridge.proto),e.CollectionUtils.copyInto(e.CustomElementBridge.proto,{AddComponentMethods:function(t){t.setProperty=function(t,n){var i=e.BaseCustomElementBridge.getInstance(this);i.SaveEarlyPropertySet(t,n)||i._setEventProperty(this,t,n)||i._validateAndSetCopyProperty(this,t,n,null)||(e.BaseCustomElementBridge.__GetPropertyMetadata(t,e.BaseCustomElementBridge.getProperties(i,this))?e.CustomElementBridge._getPropertyAccessor(this,t)(n):this[t]=n)},t.getProperty=function(t){var n=e.BaseCustomElementBridge.getInstance(this),i=e.BaseCustomElementBridge.__GetPropertyMetadata(t,e.BaseCustomElementBridge.getProperties(n,this));if(e.__AttributeUtils.eventListenerPropertyToEventType(t)||!i)return this[t];var r=i?i.extension:null;return r&&r._COPY_TO_INNER_ELEM?n._getCopyProperty(this,t,i):e.CustomElementBridge._getPropertyAccessor(this,t)()},t.focus=function(){var t=e.BaseCustomElementBridge.getInstance(this);if(t._WIDGET_INSTANCE){var n=t._WIDGET_INSTANCE.__getFocusElement();n&&(n!==this?n.focus():HTMLElement.prototype.focus.call(this))}else HTMLElement.prototype.focus.call(this)},t.blur=function(){var t=e.BaseCustomElementBridge.getInstance(this);if(t._WIDGET_INSTANCE){var n=t._WIDGET_INSTANCE.__getFocusElement();n&&(n!==this?n.blur():HTMLElement.prototype.blur.call(this))}else HTMLElement.prototype.focus.call(this)}},BatchedPropertySet:function(t,n){var i,r=Object.keys(n),o={};for(i=0;i<r.length;i++){var a=r[i],s=n[a];this._setEventProperty(t,a,s)||this._validateAndSetCopyProperty(t,a,s,null)||(s=this.ValidatePropertySet(t,a,s),o[a=this.GetAliasForProperty(a)]=s)}var l=e.Components.__GetWidgetConstructor(this._WIDGET_ELEM);if(l)l("option",o);else for(i=0;i<r.length;i++){var u=r[i];t.setProperty(u,n[u])}},CreateComponent:function(t){var i=this._INNER_DOM_FUNCTION;if(this._WIDGET_ELEM=e.CustomElementBridge._getWidgetElement(t,i?i(t):this._EXTENSION._INNER_ELEM),this._WIDGET_ELEM!==t){for(var r=this._EXTENSION._GLOBAL_TRANSFER_ATTRS||[],o=0;o<r.length;o++){var a=r[o];t.hasAttribute(a)&&(this._WIDGET_ELEM.setAttribute(a,t.getAttribute(a)),this._removingTransfer=!0,t.removeAttribute(a))}this._copyProperties()}e.Components.unmarkPendingSubtreeHidden(t);var s=n(this._WIDGET_ELEM),l=n(this._WIDGET_ELEM)[this._EXTENSION._WIDGET_NAME].bind(s);l(this._PROPS),this._WIDGET=l,this._WIDGET_INSTANCE=l("instance"),this._WRITEBACK_PROPS&&this._WIDGET_INSTANCE.__saveWritebackOptions(this._WRITEBACK_PROPS),t.hasAttribute("disabled")&&!this._disabledProcessed&&e.CustomElementBridge._removeDisabledAttribute(t);var u=function(e){return function(){var n=document.createEvent("UIEvent");n.initEvent(e,!1,!1),t.dispatchEvent(n)}},c=this._WIDGET_INSTANCE.__getFocusElement();c&&c!==t&&(c.addEventListener("focus",u("focus")),c.addEventListener("blur",u("blur"))),this.__READY_TO_FIRE=!0,this.resolveDelayedReadyPromise()},DefineMethodCallback:function(t,n,i){t[n]=function(){var t=e.BaseCustomElementBridge.getInstance(this),r=i.internalName||n;return t._WIDGET.apply(null,[r].concat([].slice.call(arguments)))}},DefinePropertyCallback:function(t,n,i){var r=i.extension;Object.defineProperty(t,n,{enumerable:!0,get:function(){var t=e.BaseCustomElementBridge.getInstance(this);return i._eventListener?t.GetEventListenerProperty(n):r&&r._COPY_TO_INNER_ELEM?t._getCopyProperty(this,n,i):e.CustomElementBridge._getPropertyAccessor(this,n)()},set:function(t){var r=e.BaseCustomElementBridge.getInstance(this);if(!r.SaveEarlyPropertySet(n,t))if(i._eventListener)r.SetEventListenerProperty(this,n,t);else if(!r._validateAndSetCopyProperty(this,n,t,i)){var o={};if(void 0===t&&(o={_context:{skipEvent:!0}},t=r.GetDefaultValue(i),r.__READY_TO_FIRE)){var a=this[n];e.BaseCustomElementBridge.__FirePropertyChangeEvent(this,n,void 0,a,"external")}e.CustomElementBridge._getPropertyAccessor(this,n,o)(t)}}})},GetAttributes:function(t){var n=e.BaseCustomElementBridge.getAttributes(t.properties);return t.extension._GLOBAL_TRANSFER_ATTRS&&(n=n.concat(t.extension._GLOBAL_TRANSFER_ATTRS)),t.extension._WATCHED_ATTRS&&(n=n.concat(t.extension._WATCHED_ATTRS)),n},GetAliasForProperty:function(e){var t=this._EXTENSION._ALIASED_PROPS;return t&&t[e]?t[e]:e},InitializeElement:function(t){e.BaseCustomElementBridge.proto.InitializeElement.call(this,t),this._EXTENSION._CONTROLS_SUBTREE_HIDDEN&&e.Components.markPendingSubtreeHidden(t),e.BaseCustomElementBridge.__InitProperties(t,this._PROPS)},HandleAttributeChanged:function(e,t,n,i){var r=this._EXTENSION._GLOBAL_TRANSFER_ATTRS,o=r&&-1!==r.indexOf(t),a=this._EXTENSION._WATCHED_ATTRS,s=a&&-1!==a.indexOf(t);o&&this._WIDGET_ELEM?this._removingTransfer?this._removingTransfer&&(this._removingTransfer=!1):(this._WIDGET_ELEM.setAttribute(t,i),this._removingTransfer=!0,e.removeAttribute(t)):s&&n!==i&&this._WIDGET_INSTANCE&&this._WIDGET_INSTANCE.__handleWatchedAttribute(t,n,i)},HandleDetached:function(t){e.BaseCustomElementBridge.proto.HandleDetached.call(this,t),e.Components.__GetWidgetConstructor(this._WIDGET_ELEM)&&this._WIDGET_INSTANCE&&this._WIDGET_INSTANCE.__handleDisconnected()},HandleReattached:function(t){e.BaseCustomElementBridge.proto.HandleReattached.call(this,t),this._WIDGET_INSTANCE&&this._WIDGET_INSTANCE.__handleConnected()},InitializeBridge:function(t){e.BaseCustomElementBridge.proto.InitializeBridge.call(this,t);var n=e.BaseCustomElementBridge.__GetDescriptor(t.tagName);this._INNER_DOM_FUNCTION=n.innerDomFunction,this._EXTENSION=this.METADATA.extension||{},this._PROPS=this._EXTENSION._INNER_ELEM||this._INNER_DOM_FUNCTION?{_wrapper:t}:{},this._setupPropertyAccumulator(t,this._PROPS),this._processProperties(t)},_attributeChangedCallback:function(t,n,i){var o=e.BaseCustomElementBridge.getInstance(this);"disabled"===t&&o._disabledProcessed?null!=i&&(r.warn("Ignoring 'disabled' attribute change after component initialization. Use element property setter instead."),e.CustomElementBridge._removeDisabledAttribute(this)):e.BaseCustomElementBridge.proto._attributeChangedCallback.call(this,t,n,i)},_copyProperties:function(){if(this._COPY_ATTRS)for(var t=0;t<this._COPY_ATTRS.length;t++){var n=this._COPY_ATTRS[t],i=e.__AttributeUtils.attributeToPropertyName(n);if(Object.prototype.hasOwnProperty.call(this._PROPS,i)){var r=this._PROPS[i];this._setCopyProperty(n,r),delete this._PROPS[i]}}},_getCopyProperty:function(t,n,i){var r=e.__AttributeUtils.propertyNameToAttribute(n);if(i.extension._ATTRIBUTE_ONLY){if(this._WIDGET_ELEM.hasAttribute(r)){var o,a=this._WIDGET_ELEM.getAttribute(r);try{o=e.__AttributeUtils.coerceValue(t,r,a,i.type)}catch(e){this.throwError(t,e)}return o}return null}return this._WIDGET_ELEM[n]},_processProperties:function(t){var n=e.BaseCustomElementBridge.getProperties(this,t);if(n)for(var i=Object.keys(n),r=0;r<i.length;r++){var o=i[r],a=n[o];a.writeback&&(this._WRITEBACK_PROPS||(this._WRITEBACK_PROPS={}),this._WRITEBACK_PROPS[o]=!0);var s=a.extension;s&&s._COPY_TO_INNER_ELEM&&(this._COPY_ATTRS||(this._COPY_ATTRS=[]),this._COPY_ATTRS.push(o))}},_setCopyProperty:function(e,t){null==t||!1===t?this._WIDGET_ELEM.removeAttribute(e):!0===t?this._WIDGET_ELEM.setAttribute(e,""):this._WIDGET_ELEM.setAttribute(e,t)},_setupPropertyAccumulator:function(t,n){this._WIDGET=function(i,r,o){if("option"===i)return e.BaseCustomElementBridge.__SetProperty(this.GetAliasForProperty.bind(this),n,r,o),n[r];throw this.throwError(t,"Cannot access methods before element is upgraded.")}},_validateAndSetCopyProperty:function(t,n,i,r){var o=e.__AttributeUtils.propertyNameToAttribute(n),a=this._COPY_ATTRS&&-1!==this._COPY_ATTRS.indexOf(o);if(a)if(i=this.ValidatePropertySet(t,n,i),this._WIDGET_ELEM){r||(r=e.BaseCustomElementBridge.__GetPropertyMetadata(n,e.BaseCustomElementBridge.getProperties(this,t)));var s=this._getCopyProperty(t,n,r);this._setCopyProperty(o,i),e.BaseCustomElementBridge.__FirePropertyChangeEvent(t,n,this._getCopyProperty(t,n,r),s,"external")}else this._PROPS[o]=i;return a},_setEventProperty:function(t,n,i){var r=!1;return e.__AttributeUtils.eventListenerPropertyToEventType(n)&&(t[n]=i,r=!0),r}}),e.CustomElementBridge.getMetadata=function(t){return e.CustomElementBridge._METADATA_MAP[t.toLowerCase()]},e.CustomElementBridge.isKnownEvent=function(t,n){var i=e.BaseCustomElementBridge.getInstance(t);return null!=(i.METADATA.events&&i.METADATA.events[n])},e.CustomElementBridge.isKnownProperty=function(t,n){var i=e.BaseCustomElementBridge.getInstance(t);return null!=(i.METADATA.properties&&i.METADATA.properties[n])},e.CustomElementBridge.getPropertyForAlias=function(t,n){var i=e.BaseCustomElementBridge.getInstance(t)._EXTENSION._COMPONENT_TO_ELEMENT_ALIASES;return i&&i[n]?i[n]:n},e.CustomElementBridge.register=function(t,n){var i=n[e.BaseCustomElementBridge.DESC_KEY_META];i=e.BaseCustomElementBridge.__ProcessEventListeners(i),n[e.BaseCustomElementBridge.DESC_KEY_META]=i,e.CustomElementBridge._METADATA_MAP[t.toLowerCase()]=i;var r=i.extension,o=r&&r._WIDGET_NAME?e.CustomElementBridge.proto:e.DefinitionalElementBridge.proto,a=r._ALIASED_PROPS;a&&(r._COMPONENT_TO_ELEMENT_ALIASES={},Object.keys(a).forEach(function(e){r._COMPONENT_TO_ELEMENT_ALIASES[a[e]]=e})),e.BaseCustomElementBridge.__Register(t,n,o)&&customElements.define(t.toLowerCase(),o.getClass(n))},e.CustomElementBridge._getPropertyAccessor=function(t,n,i){return function(r){var o=e.BaseCustomElementBridge.getInstance(t);return 1===arguments.length?(r=o.ValidatePropertySet(t,n,r),n=o.GetAliasForProperty(n),void o._WIDGET("option",n,r,i)):(n=o.GetAliasForProperty(n),o._WIDGET("option",n))}.bind(t)},e.CustomElementBridge._getWidgetElement=function(t,n){var i=t;if(n){var r=t.firstElementChild;if(r&&r.tagName.toLowerCase()===n)i=r;else{i=document.createElement(n);for(var o=[],a=t.childNodes,s=0;s<a.length;s++)o.push(a[s]);for(t.appendChild(i);o.length;){var l=o.shift();e.BaseCustomElementBridge.getSlotAssignment(l)||i.appendChild(l)}}i.setAttribute("data-oj-internal","")}return i},e.CustomElementBridge._removeDisabledAttribute=function(t){e.BaseCustomElementBridge.getInstance(t)._disabledProcessed=!0,t.removeAttribute("disabled")},e.CustomElementBridge._METADATA_MAP={};var O,C,T,I,A,P,D,M=function(){function e(){}return e.isDataProvider=function(e){return!!e.fetchFirst},e.isTreeDataProvider=function(e){return!!e.getChildDataProvider},e}();return e.DataProviderFeatureChecker=M,e.DefinitionalElementBridge={},e.DefinitionalElementBridge.proto=Object.create(e.BaseCustomElementBridge.proto),e.CollectionUtils.copyInto(e.DefinitionalElementBridge.proto,{beforePropertyChangedEvent:function(e,t,n){var i=t,r=n.value;n.subproperty&&(i=n.subproperty.path,r=n.subproperty.value),this._partialRender(e,i,r)},AddComponentMethods:function(t){t.refresh=function(){e.BaseCustomElementBridge.getInstance(this)._fullRender(this)},t.setProperty=function(t,n){var i=e.BaseCustomElementBridge.getInstance(this);i.SaveEarlyPropertySet(t,n)||i.SetProperty(this,t,n,this,!0)},t.getProperty=function(t){return e.BaseCustomElementBridge.getInstance(this).GetProperty(this,t,this)},t._propsProto.setProperty=function(e,t){this._BRIDGE.SetProperty(this._ELEMENT,e,t,this,!1)},t._propsProto.getProperty=function(e){return this._BRIDGE.GetProperty(this,e,this)}},CreateComponent:function(t){e.Components.unmarkPendingSubtreeHidden(t),!this._INSTANCE&&this._EXTENSION._CONSTRUCTOR&&(this._CONTEXT={element:t,props:this._PROPS_PROXY,unique:e.BaseCustomElementBridge.__GetUnique()},this._CONTEXT.uniqueId=t.id?t.id:this._CONTEXT.unique,this._INSTANCE=new this._EXTENSION._CONSTRUCTOR(this._CONTEXT),this._INSTANCE.createDOM&&this._INSTANCE.createDOM(),this._INSTANCE.updateDOM&&this._INSTANCE.updateDOM()),this.__READY_TO_FIRE=!0,this.resolveDelayedReadyPromise()},DefineMethodCallback:function(t,n,i){t[n]=function(){var t=e.BaseCustomElementBridge.getInstance(this);if(t._INSTANCE){var r=i.internalName||n;return t._INSTANCE[r].apply(t._INSTANCE,arguments)}}},DefinePropertyCallback:function(t,n,i){function o(t,o){if(!this._BRIDGE.SaveEarlyPropertySet(n,t)){var a=this._BRIDGE._PROPS[n];e.BaseCustomElementBridge.__CompareOptionValues(n,i,t,a)?r.info(e.BaseCustomElementBridge.getElementInfo(this._ELEMENT)+": Ignoring property set for property '"+n+"' with same value."):(o&&(t=this._BRIDGE.ValidatePropertySet(this._ELEMENT,n,t)),i._eventListener?(this._BRIDGE.SetEventListenerProperty(this._ELEMENT,n,t),this._BRIDGE._PROPS[n]=t):(this._BRIDGE._PROPS[n]=t,e.BaseCustomElementBridge.__FirePropertyChangeEvent(this._ELEMENT,n,t,a,o?"external":"internal")))}}function a(){var e=this._BRIDGE._PROPS[n];return void 0===e&&(e=this._BRIDGE.GetDefaultValue(i),this._BRIDGE._PROPS[n]=e),e}i._derived||e.BaseCustomElementBridge.__DefineDynamicObjectProperty(t._propsProto,n,function(){return a.bind(this)()},function(e){o.bind(this)(e,!1)}),e.BaseCustomElementBridge.__DefineDynamicObjectProperty(t,n,function(){var t=e.BaseCustomElementBridge.getInstance(this);return a.bind(t._PROPS_PROXY)()},function(t){var n=e.BaseCustomElementBridge.getInstance(this);o.bind(n._PROPS_PROXY)(t,!0)})},InitializeElement:function(t){e.BaseCustomElementBridge.proto.InitializeElement.call(this,t),this._EXTENSION._CONTROLS_SUBTREE_HIDDEN&&e.Components.markPendingSubtreeHidden(t),e.BaseCustomElementBridge.__InitProperties(t,t)},InitializePrototype:function(t){e.BaseCustomElementBridge.proto.InitializePrototype.call(this,t),Object.defineProperty(t,"_propsProto",{value:{}})},InitializeBridge:function(t){e.BaseCustomElementBridge.proto.InitializeBridge.call(this,t),this._EXTENSION=this.METADATA.extension||{},this._PROPS={},t._propsProto&&(this._PROPS_PROXY=Object.create(t._propsProto),this._PROPS_PROXY._BRIDGE=this,this._PROPS_PROXY._ELEMENT=t)},_fullRender:function(e){this._INSTANCE&&this._INSTANCE.updateDOM&&this._INSTANCE.updateDOM()},_partialRender:function(e,t,n){if(this._INSTANCE){var i=this._INSTANCE.handlePropertyChanged;(!i||!i(t,n))&&this._INSTANCE.updateDOM&&this._INSTANCE.updateDOM()}}}),e.DomUtils={},e.DomUtils._HTML_START_TAG="<html>",e.DomUtils._HTML_END_TAG="</html>",e.DomUtils._LEGAL_ELEMENTS={SPAN:1,B:1,I:1,EM:1,BR:1,HR:1,LI:1,OL:1,UL:1,P:1,TT:1,BIG:1,SMALL:1,PRE:1},e.DomUtils._LEGAL_ATTRIBUTES={class:1,style:1},e.DomUtils.isHTMLContent=function(t){return 0===t.indexOf(e.DomUtils._HTML_START_TAG)&&t.lastIndexOf(e.DomUtils._HTML_END_TAG)===t.length-7},e.DomUtils.cleanHtml=function(t){var i=n(document.createElement("span")).get(0);return i.innerHTML=t,t&&t.indexOf("<")>=0&&e.DomUtils._cleanElementHtml(i),i},e.DomUtils._cleanElementHtml=function(t){for(var i=t.childNodes,r=i.length-1;r>=0;r--){var o=i.item(r);if(o&&1===o.nodeType)if(e.DomUtils._LEGAL_ELEMENTS[o.nodeName]){for(var a=o.attributes,s=a.length-1;s>=0;s--){var l=a[s];void 0!==n(o).attr(l.name)&&(e.DomUtils._LEGAL_ATTRIBUTES[l.name]||o.removeAttribute(l.nodeName))}e.DomUtils._cleanElementHtml(o)}else o&&t.removeChild(o)}},e.DomUtils.isAncestor=function(e,t){for(var n=t.parentNode;n;){if(n===e)return!0;n=n.parentNode}return!1},e.DomUtils.isAncestorOrSelf=function(t,n){return n===t||e.DomUtils.isAncestor(t,n)},e.DomUtils.addResizeListener=function(t,i,r){var o=n(t),a=o.data(e.DomUtils._RESIZE_TRACKER_KEY);null==a&&(a=new e.DomUtils._ResizeTracker(t),o.data(e.DomUtils._RESIZE_TRACKER_KEY,a),a.start()),a.addListener(i,r)},e.DomUtils.removeResizeListener=function(t,i){var r=n(t),o=r.data(e.DomUtils._RESIZE_TRACKER_KEY);null!=o&&(o.removeListener(i),o.isEmpty()&&(o.stop(),r.removeData(e.DomUtils._RESIZE_TRACKER_KEY)))},e.DomUtils.fixResizeListeners=function(t){n(t).find(".oj-helper-detect-expansion").parent().each(function(t,i){var r=n(i).data(e.DomUtils._RESIZE_TRACKER_KEY);null!=r&&r.init(!0)})},e.DomUtils.isMetaKeyPressed=function(t){var n=e.AgentUtils.getAgentInfo();return e.AgentUtils.OS.MAC===n.os?t.metaKey:t.ctrlKey},e.DomUtils.dispatchEvent=function(e,t){var n="disabled",i=e[n];try{e[n]=!1,e.dispatchEvent(t)}finally{e[n]=i}},e.DomUtils._invokeAfterPaint=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,0)}).bind(window),e.DomUtils._cancelInvokeAfterPaint=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||function(e){return window.clearTimeout(e)}).bind(window),e.DomUtils._ResizeTracker=function(t){function i(e){var t=!1;if(null!=m.offsetParent){var n=m.offsetWidth,i=m.offsetHeight;d===n&&h===i||(c=u,o(n,i),t=!0,e&&r(!0))}return t}function r(n){var i=t.offsetWidth,r=t.offsetHeight;a.has()&&(n?(null!==p&&e.DomUtils._cancelInvokeAfterPaint(p),p=e.DomUtils._invokeAfterPaint(function(){p=null,a.fire(i,r)})):a.fire(i,r));for(var o=0;o<s.length;o++)s[o].getCallback()(i,r)}function o(e,t){d=e,h=t;var n=m.firstChild.style,i=1;do n.width=e+i+"px",n.height=t+i+"px",m.scrollLeft=i,m.scrollTop=i,i+=1;while((0===m.scrollTop||0===m.scrollLeft)&&i<=5);g.scrollLeft=e,g.scrollTop=t}var a=n.Callbacks(),s=[],l=[],u=2,c=0,p=null,d=null,h=null,m=null,g=null,f=null,_=null;this.addListener=function(t,n){void 0===n||0===n?a.add(t):(s.push(new e.DomUtils._collapsingListenerManager(t,n)),l.push(t))},this.removeListener=function(e){var t=l.indexOf(e);t>=0?(l.splice(t,1),s.splice(t,1)[0].stop()):a.remove(e)},this.isEmpty=function(){return!a.has()&&0===l.length},this.start=function(){if(_=function(e){e.stopPropagation(),i(!0)||c>0&&null!=m.offsetParent&&(0===m.scrollLeft||0===m.scrollTop)&&(c-=1,o(d,h))}.bind(this),t.attachEvent)f=function(){r(!1)}.bind(this),t.attachEvent("onresize",f);else{var e=t.childNodes[0];(m=document.createElement("div")).className="oj-helper-detect-expansion";var n=document.createElement("div");m.appendChild(n),null!=e?t.insertBefore(m,e):t.appendChild(m),m.addEventListener("scroll",_,!1),(g=document.createElement("div")).className="oj-helper-detect-contraction";var a=document.createElement("div");a.style.width="200%",a.style.height="200%",g.appendChild(a),t.insertBefore(g,m),g.addEventListener("scroll",_,!1),this.init(!1)}},this.stop=function(){null!=p&&(e.DomUtils._cancelInvokeAfterPaint(p),p=null),null!=m?(m.removeEventListener("scroll",_),g.removeEventListener("scroll",_),m.parentNode&&t.removeChild(m),g.parentNode&&t.removeChild(g)):t.detachEvent("onresize",f)},this.init=function(e){var t=i(e);e&&!t&&null!=m.offsetParent&&o(d,h)}},e.DomUtils._RESIZE_TRACKER_KEY="_ojResizeTracker",e.DomUtils.isValidIdentifier=function(e){return/^[A-Za-z][0-9A-Z_a-z-]*$/.test(e)},e.DomUtils._collapsingListenerManager=function(e,t){var n=null,i=null,r=function(){e.apply(null,n),i=null},o=function(){n=Array.prototype.slice.call(arguments),null==i&&(i=window.setTimeout(r,t))};this.getCallback=function(){return o},this.stop=function(){null!=i&&(window.clearTimeout(i),i=null)}},e.DomUtils.isTouchSupported=function(){return"ontouchstart"in window||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints>0},e.DomUtils.setInKoCleanExternal=function(t){e.DomUtils._koCleanNode=t},e.DomUtils.unwrap=function(t,n){var i=e.DomUtils._koCleanNode;i&&t.get(0)===i||(n?n.replaceWith(t):t.unwrap())},e.DomUtils.isChromeEvent=function(t){function i(t){var i=t.target,r=n(i),o=i.getBoundingClientRect(),a=e.DomUtils.getScrollBarWidth(),s="ltr"===e.DomUtils.getReadingDirection();return!(!s||"HTML"!==i.nodeName&&"visible"===r.css("overflow-x")||!(t.clientX>o.right-a))||!s&&"HTML"===i.nodeName&&t.clientX>o.left-a||!s&&"visible"!==r.css("overflow-x")&&t.clientX<o.left+a||("HTML"===i.nodeName||"visible"!==r.css("overflow-y"))&&t.clientY>o.bottom-a}if(!("clientX"in t&&"clientY"in t))return!1;var r=e.AgentUtils.getAgentInfo();return e.AgentUtils.OS.ANDROID!==r.os&&e.AgentUtils.OS.IOS!==r.os&&(e.AgentUtils.ENGINE.GECKO===r.engine?function(e){try{return!e.originalTarget.localName}catch(e){return!0}}(t):e.AgentUtils.ENGINE.WEBKIT===r.engine||e.AgentUtils.ENGINE.BLINK===r.engine?i(t):e.AgentUtils.BROWSER.IE===r.browser&&i(t))},e.DomUtils.getScrollBarWidth=function(){var t=e.DomUtils._scrollBarWidth;if(n.isNumeric(t))return t;var i=n("<div></div>");n(document.body).append(i),i.width(50).height(50).css({overflow:"scroll",visibility:"hidden",position:"absolute"});var r=n("<div></div>");r.height(1),i.append(r);var o=r.width(),a=i.width();return i.remove(),t=a-o,e.DomUtils._scrollBarWidth=t,t},e.DomUtils.getReadingDirection=function(){var e=document.documentElement.getAttribute("dir");return e&&(e=e.toLowerCase()),"rtl"===e?"rtl":"ltr"},e.DomUtils.getScrollLeft=function(t){if("rtl"===e.DomUtils.getReadingDirection()){var n=e.AgentUtils.getAgentInfo().browser;return n===e.AgentUtils.BROWSER.FIREFOX||n===e.AgentUtils.BROWSER.IE||n===e.AgentUtils.BROWSER.EDGE?Math.abs(t.scrollLeft):Math.max(0,t.scrollWidth-t.clientWidth-t.scrollLeft)}return t.scrollLeft},e.DomUtils.setScrollLeft=function(t,n){if("rtl"===e.DomUtils.getReadingDirection()){var i=e.AgentUtils.getAgentInfo().browser;i===e.AgentUtils.BROWSER.FIREFOX?t.scrollLeft=-n:i===e.AgentUtils.BROWSER.IE||i===e.AgentUtils.BROWSER.EDGE?t.scrollLeft=n:t.scrollLeft=Math.max(0,t.scrollWidth-t.clientWidth-n)}else t.scrollLeft=n},e.DomUtils.getCSSLengthAsInt=function(e){if(!isNaN(e))return parseInt(e,10);if(e&&e.length>0&&"auto"!==e){var t=parseInt(e,10);return isNaN(t)&&(t=0),t}return 0},e.DomUtils.getCSSLengthAsFloat=function(e){if(!isNaN(e))return parseFloat(e);if(e&&e.length>0){var t=parseFloat(e);return isNaN(t)&&(t=0),t}return 0},e.DomUtils._LOGICAL_PARENT_DATA="oj-logical-parent",e.DomUtils.getLogicalParent=function(t){if(t)return t.data(e.DomUtils._LOGICAL_PARENT_DATA)},e.DomUtils.setLogicalParent=function(t,n){t&&(null===n?t.removeData(e.DomUtils._LOGICAL_PARENT_DATA):t.data(e.DomUtils._LOGICAL_PARENT_DATA,n))},e.DomUtils.isLogicalAncestorOrSelf=function(t,i){e.Assert.assertDomElement(t),e.Assert.assertDomElement(i);for(var r=i;r;){if(r===t)return!0;var o=e.DomUtils.getLogicalParent(n(r));r=o?o[0]:r.parentNode}return!1},e.DomUtils.validateURL=function(e,t){var n=t||["http:","https:"],i=document.createElement("a");i.href=e;var r=i.protocol;if(null!=r&&(r=r.toLowerCase()),n.indexOf(r)<0&&""!==r)throw new Error(r+" is not a valid URL protocol")},e.DomUtils._supressNativeContextMenu=function(){n(document.body).hasClass("oj-hybrid")&&document.body.addEventListener("contextmenu",function(e){e.preventDefault()},!0)},e.DomUtils._supressNativeContextMenu(),e.DomUtils.PRESS_HOLD_THRESHOLD=750,e.DomUtils.recentTouchEnd=function(){function e(){t=Date.now()}var t=0;return document.addEventListener("touchend",e,!0),document.addEventListener("touchcancel",e,!0),function(){return Date.now()-t<500}}(),e.DomUtils.recentTouchStart=function(){var t=0,n=e.DomUtils.PRESS_HOLD_THRESHOLD+50;return document.addEventListener("touchstart",function(){t=Date.now()},!0),function(){return Date.now()-t<n}}(),e.DomUtils.recentPointer=(C=0,T=e.DomUtils.PRESS_HOLD_THRESHOLD+600,document.addEventListener("mousedown",function(){var t=Date.now();(!O||t>C+e.DomUtils.PRESS_HOLD_THRESHOLD)&&(C=t,O=!1)},!0),document.addEventListener("touchstart",function(){C=Date.now(),O=!0},!0),document.addEventListener("mouseup",function(){C=Date.now(),O=!1},!0),document.addEventListener("touchend",function(){C=Date.now(),O=!1},!0),function(){return Date.now()-C<(O?T:600)}),e.DomUtils.makeFocusable=(I=0,A=(e.ThemeUtils.parseJSONFromFontFamily("oj-focus-config")||{}).focusHighlightPolicy,P=function(t,n){switch(t?t():A){case"all":return!0;case"none":return!1;default:return!(e.DomUtils.recentPointer()||n&&n())}},function(e){var t=e.element,i="ojFocusable";if(e.remove){t.removeClass("oj-focus oj-focus-highlight");var r=t.data(i);if(null==r)return;var o=".ojFocusable"+(""+r).split(",").join(" .ojFocusable");t.off(o).removeData(i)}else{var a=e.afterToggle||n.noop,s=e.applyHighlight?function(t){t.addClass("oj-focus"),P(e.getFocusHighlightPolicy,e.recentPointer)&&t.addClass("oj-focus-highlight"),a("focusin")}:function(e){e.addClass("oj-focus"),a("focusin")};(e.setupHandlers||function(r,o){var a=e.component,s=function(e){r(n(e.currentTarget))},l=function(e){o(n(e.currentTarget))};if(a)a._on(t,{focusin:s,focusout:l});else{var u=I;I+=1;var c=t.data(i);t.data(i,null==c?u:c+","+u);var p={},d=".ojFocusable"+u;p["focusin"+d]=s,p["focusout"+d]=l,t.on(p)}})(s,function(e){e.removeClass("oj-focus oj-focus-highlight"),a("focusout")})}}),e.FocusUtils={},e.FocusUtils._TABBABLE=":tabbable,iframe",e.FocusUtils.containsFocus=function(t){var n=document.activeElement;return!(!t||!n)&&e.DomUtils.isAncestorOrSelf(t,n)},e.FocusUtils.focusElement=function(e){e.focus()},e.FocusUtils.focusFirstTabStop=function(t){var n=e.FocusUtils.getFirstTabStop(t);return n&&e.FocusUtils.focusElement(n),n},e.FocusUtils.isFirstActiveElement=function(t){var i=n(t).find(e.FocusUtils._TABBABLE);if(null==i||0===i.length)return!1;var r=i[0];return document.activeElement===r||r.name===document.activeElement.name&&"radio"===r.type&&"radio"===document.activeElement.type},e.FocusUtils.isLastActiveElement=function(t){var i=n(t).find(e.FocusUtils._TABBABLE);if(null==i||0===i.length)return!1;var r=i[i.length-1];return document.activeElement===r||r.name===document.activeElement.name&&"radio"===r.type&&"radio"===document.activeElement.type},e.FocusUtils.getFirstTabStop=function(t){var i=n(t);if(i.is(e.FocusUtils._TABBABLE))return t;var r=i.find(e.FocusUtils._TABBABLE);if(r&&r.length>0){if(r[0].classList.contains("oj-radio")){var o=r.filter(".oj-selected.oj-radio");return o&&o.length?o[0]:r[0]}return r[0]}return null},e.FocusUtils.getLastTabStop=function(t){var i=n(t).find(e.FocusUtils._TABBABLE);if(i&&i.length>0){if(i[i.length-1].classList.contains("oj-radio")){var r=i.filter(".oj-selected.oj-radio");return r&&r.length?r[r.length-1]:i[i.length-1]}return i[i.length-1]}return null},e.FocusUtils.isFocusable=function(t){return!(!n(t).is(":focusable")||"A"===t.nodeName&&!t.hasAttribute("tabindex")&&e.AgentUtils.getAgentInfo().browser===e.AgentUtils.BROWSER.SAFARI)},e.GestureUtils={},e.GestureUtils._EVENT_NAMESPACE=".contextMenu",e.GestureUtils.stopDetectContextMenuGesture=function(t){t._clickListener&&(n(t).off(e.GestureUtils._EVENT_NAMESPACE).removeClass("oj-menu-context-menu-launcher")[0].removeEventListener("click",t._clickListener,!0),clearTimeout(t._contextMenuPressHoldTimer),delete t._clickListener,delete t._contextMenuPressHoldTimer)},e.GestureUtils.startDetectContextMenuGesture=function(t,i){function r(e,r,o){return(c=o)&&n(t).one("touchend"+m,function(){g=!0,setTimeout(function(){g=!1},50)}),"touchstart"===h&&"contextmenu"===e.type||"contextmenu"===h&&"touchstart"===e.type||"keydown"===h&&"contextmenu"===e.type?("keydown"===h&&"contextmenu"===e.type&&e.preventDefault(),h=null,void clearTimeout(l)):void(e.isDefaultPrevented()||e.originalEvent&&e.originalEvent.defaultPrevented||(i(e,r),e.isDefaultPrevented()&&("touchstart"!==e.type&&"contextmenu"!==e.type&&"keydown"!==e.type||(h=e.type,l=setTimeout(function(){h=null},d)))))}var o,a,s,l,u=e.DomUtils.PRESS_HOLD_THRESHOLD,c=!1,p=!1,d=300,h=null,m=e.GestureUtils._EVENT_NAMESPACE,g=!1,f=function(e){c&&(e.preventDefault(),e.stopPropagation(),c=!1)};t._clickListener=f,t.addEventListener("click",f,!0),n(t).on("touchstart"+m+" mousedown"+m,function(e){if("mousedown"!==e.type||!g){if(c=!1,"touchstart"===e.type&&1===e.originalEvent.touches.length){var n=e.originalEvent.touches[0];a=n.pageX,s=n.pageY,p=!0,o=setTimeout(r.bind(void 0,e,"touch",!0),u),t._contextMenuPressHoldTimer=o}return!0}}).on("touchmove"+m,function(e){var t=e.originalEvent.touches[0];return(Math.abs(a-t.pageX)>5||Math.abs(s-t.pageY)>5)&&(p=!1,clearTimeout(o)),!0}).on("touchend"+m+" touchcancel"+m,function(){return p=!1,clearTimeout(o),!0}).on("keydown"+m+" contextmenu"+m,function(e){return("contextmenu"===e.type||121===e.which&&e.shiftKey)&&r(e,p?"touch":"keydown"===e.type?"keyboard":"mouse",!1),!0}),e.DomUtils.isTouchSupported()&&n(t).addClass("oj-menu-context-menu-launcher")},n(document).ready(function(){!function(){var e=document.createElement("div");e.style.border="1px solid",e.style.borderColor="red green",e.style.position="absolute",e.style.top="-999px",e.style.backgroundImage="url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=)";var t=document.body;t.appendChild(e);var n=window.getComputedStyle(e),i=n.backgroundImage;n.borderTopColor!==n.borderRightColor&&(null==i||"none"!==i&&"url (invalid-url:)"!==i)||t.classList.add("oj-hicontrast"),t.removeChild(e)}()}),e.Test={},e.Test.ready=!1,e.Test.domNodeForLocator=function(t){var i=t;if(e.StringUtils.isString(t)){var r=t;try{i=JSON.parse(r)}catch(e){return null}}if(i&&i.element){var o=n(i.element);if(o&&o.length>0){delete i.element;var a=i;return e.Components.getNodeBySubId(o[0],a)}}return null},e.Test.getOpenPopupCount=function(){return e.ZOrderUtils.getOpenPopupCount()},e.Test.findOpenPopups=function(){return e.ZOrderUtils.findOpenPopups()},e.Test.compareStackingContexts=function(t,n){return e.ZOrderUtils.compareStackingContexts(t,n)},n.cleanData=(D=n.cleanData,function(t){for(var n=[],i=0;i<t.length;i++){var r=t[i];if(null==r)break;var o=!1,a=e.Components.__GetWidgetConstructor(r);if(a&&!(o=a("instance")._IsCustomElement())){var s=e.Components.getComponentElementByNode(r);o=s&&e.BaseCustomElementBridge.getRegistered(s.tagName)}o||n.push(r)}n.length>0&&D(n)}),e.Components}),define("ojs/ojanimation",["ojs/ojcore","jquery","ojs/ojthemeutils","ojs/ojlogger","promise","ojs/ojcomponentcore"],function(e,t,n,i){"use strict";return e.AnimationUtils={},e.AnimationUtils,e.AnimationUtils._getName=function(t,n){if(!e.AnimationUtils._nameMap){e.AnimationUtils._nameMap={};var i=e.AnimationUtils._nameMap,r=t.style;i.backfaceVisibility=void 0!==r.webkitBackfaceVisibility?"webkitBackfaceVisibility":"backfaceVisibility",i.transform=void 0!==r.webkitTransform?"webkitTransform":"transform",i.transformOrigin=void 0!==r.webkitTransformOrigin?"webkitTransformOrigin":"transformOrigin",i.transition=void 0!==r.webkitTransition?"webkitTransition":"transition",i.transitionend=void 0!==r.webkitTransition?"webkitTransitionEnd":"transitionend"}return e.AnimationUtils._nameMap[n]||n},e.AnimationUtils._getElementStyle=function(t,n){return t.style[e.AnimationUtils._getName(t,n)]},e.AnimationUtils._setElementStyle=function(t,n,i){t.style[e.AnimationUtils._getName(t,n)]=i},e.AnimationUtils._animate=function(n,i,r,o,a,s){var l=[].concat(a),u=function(t,u){function c(){m||(h&&(window.cancelAnimationFrame(h),h=0),n.removeEventListener(e.AnimationUtils._getName(n,"transitionend"),d),t&&t(!0),m=!0)}function p(){h=0,e.AnimationUtils._applyState(n,r,g>1)}var d=function(t){var n=0===t.propertyName.indexOf("-webkit-")?t.propertyName.substr(8):t.propertyName;n=e.AnimationUtils._getCamelCasePropName(n);var i=l.indexOf(n);i>-1&&(l.length>1?l.splice(i,1):c())},h=0,m=!1;null==r&&(r={}),null==r.css&&(r.css={}),r.css.transition=e.AnimationUtils._createTransitionValue(n,a,o);var g=e.AnimationUtils._saveStyle(n,i,r,o,s||a);e.AnimationUtils._applyState(n,i,g>1),n.addEventListener(e.AnimationUtils._getName(n,"transitionend"),d);
- var f=o.duration,_=o.delay,v=o._skipPromise;null==i?p():(o._noReflow||(e.AnimationUtils._x=n.offsetWidth),h=window.requestAnimationFrame(p));var y=e.AnimationUtils._getTotalTiming(f,_);v||setTimeout(c,y+100)};return o._skipPromise?(u(null),null):new Promise(u).then(function(){i&&i.addClass&&t(n).removeClass(i.addClass),r&&r.addClass&&t(n).removeClass(r.addClass),e.AnimationUtils._restoreStyle(n)})},e.AnimationUtils._saveCssValues=function(t,n,i,r){for(var o=Object.keys(n),a=Object.prototype.hasOwnProperty,s=0;s<o.length;s++){var l=o[s];a.call(i,l)||r&&-1!==r.indexOf(l)||(i[l]=e.AnimationUtils._getElementStyle(t,l))}},e.AnimationUtils._saveStyle=function(t,n,i,r,o){var a=t._ojSavedStyle||{},s=n&&n.css?n.css:{},l=i&&i.css?i.css:{},u=o;r&&"all"===r.persist||(u=null),e.AnimationUtils._saveCssValues(t,s,a,u),e.AnimationUtils._saveCssValues(t,l,a,u),t._ojSavedStyle=a;var c=t._ojEffectCount||0;return c+=1,t._ojEffectCount=c,c},e.AnimationUtils._restoreStyle=function(t){var n=t,i=n._ojEffectCount;if(i>1)n._ojEffectCount=i-1;else{var r=n._ojSavedStyle;if(r){for(var o=Object.keys(r),a=0;a<o.length;a++){var s=o[a];e.AnimationUtils._setElementStyle(n,s,r[s])}delete n._ojSavedStyle,delete n._ojEffectCount}}},e.AnimationUtils._getCamelCasePropName=function(e){if(e.indexOf("-")>=0){for(var t="",n=e.split("-"),i=0;i<n.length;i++){var r=n[i];r&&(t?t+=r.charAt(0).toUpperCase()+r.slice(1):t=r)}return t}return e},e.AnimationUtils._getHyphenatedPropName=function(e){var t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return 0===t.indexOf("webkit")&&(t="-"+t),t},e.AnimationUtils._concatMultiValue=function(t,n,i,r,o){if(n.css[i]){var a=e.AnimationUtils._getElementStyle(t,i);a&&0!==a.indexOf(r)&&(n.css[i]=a+o+n.css[i])}},e.AnimationUtils._splitTransform=function(e){var t=[];if(e&&"none"!==e)for(var n=e,i=n.indexOf(")");i>0;){var r=n.substr(0,i+1);t.push(r.trim()),i=(n=n.slice(i+1)).indexOf(")")}return t},e.AnimationUtils._getTransformFuncName=function(e){var t=e.indexOf("(");return t>=1?e.substr(0,t):e},e.AnimationUtils._applyTransform=function(t,n){for(var i=e.AnimationUtils._getElementStyle(t,"transform"),r=e.AnimationUtils._splitTransform(i),o=e.AnimationUtils._splitTransform(n),a=[],s=0;s<o.length;s++){var l=e.AnimationUtils._getTransformFuncName(o[s]),u=!1;if(l)for(var c=0;c<r.length;c++)0===r[c].indexOf(l+"(")&&(r[c]=o[s],u=!0);u||a.push(o[s])}return(r=r.concat(a)).join(" ")},e.AnimationUtils._applyState=function(n,i,r){if(i){if(i.css){r&&e.AnimationUtils._concatMultiValue(n,i,"transition","all",", "),i.css.transform&&(i.css.transform=e.AnimationUtils._applyTransform(n,i.css.transform));for(var o=i.css,a=Object.keys(o),s=0;s<a.length;s++){var l=a[s];e.AnimationUtils._setElementStyle(n,l,o[l])}}i.addClass&&t(n).addClass(i.addClass),i.removeClass&&t(n).removeClass(i.removeClass)}},e.AnimationUtils._getTimingValue=function(e){var t=parseFloat(e);return isNaN(t)?0:e.indexOf("ms")>-1?t:1e3*t},e.AnimationUtils._getTotalTiming=function(t,n){var i=e.AnimationUtils._getTimingValue(t);return i>0?i+(n?e.AnimationUtils._getTimingValue(n):0):0},e.AnimationUtils._calcCssTime=function(t,n,i){for(var r=t.split(","),o=n.split(","),a=i.split(","),s=r.length,l=o.length,u=a.length,c=0,p=0;p<s;p++){var d=a[p%u],h=o[p%l],m=e.AnimationUtils._getTotalTiming(d,h);c=Math.max(c,m)}return c},e.AnimationUtils._calcEffectTime=function(t){var n,i,r,o=window.getComputedStyle(t);n=o.animationName||o.webkitAnimationName,i=o.animationDelay||o.webkitAnimationDelay,r=o.animationDuration||o.webkitAnimationDuration;var a=e.AnimationUtils._calcCssTime(n,i,r);n=o.transitionProperty||o.webkitTransitionProperty,i=o.transitionDelay||o.webkitTransitionDelay,r=o.transitionDuration||o.webkitTransitionDuration;var s=e.AnimationUtils._calcCssTime(n,i,r);return Math.max(a,s)},e.AnimationUtils._fillEmptyOptions=function(e,t){e.delay=e.delay||t.delay,e.duration=e.duration||t.duration,e.timingFunction=e.timingFunction||t.timingFunction,e.persist=e.persist||t.persist},e.AnimationUtils._triggerEvent=function(e,t,n,i){var r;if(i&&i._trigger)r=!i._trigger(t,null,n);else{var o="oj"+t.substr(0,1).toUpperCase()+t.substr(1),a=new CustomEvent(o,{detail:n,bubbles:!0,cancelable:!0}),s=i||e;s.dispatchEvent&&s.dispatchEvent(a),r=a.defaultPrevented}return r},e.AnimationUtils.startAnimation=function(n,i,r,o){return n=t(n)[0],new Promise(function(a,s){var l=t(n),u="oj-animate-"+i,c=u+"-active",p=!1,d=!1,h=function(){if(p&&d){l.removeClass(u),l.removeClass(c),e.AnimationUtils._restoreStyle(n),a(!0);var t={action:i,element:n};e.AnimationUtils._triggerEvent(n,"animateEnd",t,o)}},m=function(){p=!0,h()},g=function(){d=!0,h()};e.AnimationUtils._saveStyle(n,null,null,null,null);var f={action:i,element:n,endCallback:m};if(!e.AnimationUtils._triggerEvent(n,"animateStart",f,o)){for(var _=[].concat(r),v=[],y={},E=0;E<_.length;E++){var S,b=_[E],O="";null!=b&&"none"!==b&&("string"==typeof b?(O=b,S={}):"object"==typeof b&&(O=b.effect,S=t.extend({},b)),e.AnimationUtils._fillEmptyOptions(S,y),y=t.extend({},S)),O&&e.AnimationUtils[O]&&v.push(e.AnimationUtils[O](n,S))}v.length?Promise.all(v).then(m):m()}l.addClass(u);var C=window.requestAnimationFrame(function(){C=0,l.addClass(c);var t=e.AnimationUtils._calcEffectTime(n);t>0?setTimeout(g,t+100):g()});setTimeout(function(){C&&(window.cancelAnimationFrame(C),C=0,g())},1e3)})},e.AnimationUtils._mergeOptions=function(i,r){return null==e.AnimationUtils._defaultOptions&&(e.AnimationUtils._defaultOptions=n.parseJSONFromFontFamily("oj-animation-effect-default-options")),t.extend({duration:"400ms"},e.AnimationUtils._defaultOptions?e.AnimationUtils._defaultOptions[i]:null,r)},e.AnimationUtils._createTransitionValue=function(t,n,i){var r="";if(n)for(var o=0;o<n.length;o++){var a=e.AnimationUtils._getName(t,n[o]);r+=(o>0?", ":"")+e.AnimationUtils._getHyphenatedPropName(a)+" "+i.duration,i.timingFunction&&(r+=" "+i.timingFunction),i.delay&&(r+=" "+i.delay)}return r},e.AnimationUtils._fade=function(t,n,i,r,o){var a=e.AnimationUtils._mergeOptions(i,n),s={css:{opacity:r}},l={css:{opacity:o}};return a&&(a.startOpacity&&(s.css.opacity=a.startOpacity),a.endOpacity&&(l.css.opacity=a.endOpacity)),e.AnimationUtils._animate(t,s,l,a,["opacity"])},e.AnimationUtils.fadeIn=function(t,n){return e.AnimationUtils._fade(t,n,"fadeIn",0,1)},e.AnimationUtils.fadeOut=function(t,n){return e.AnimationUtils._fade(t,n,"fadeOut",1,0)},e.AnimationUtils.expand=function(t,n){return e.AnimationUtils._expandCollapse(t,n,!0)},e.AnimationUtils.collapse=function(t,n){return e.AnimationUtils._expandCollapse(t,n,!1)},e.AnimationUtils._wrapRowContent=function(e,t){var n,i,r=[],o=e.children,a=[],s=[];for(e._ojSavedHeight=e.style.height,i=0;i<o.length;i++){n=o[i];var l=window.getComputedStyle(n);a.push(l.padding),s.push(l.textAlign),n._ojSavedPadding=n.style.padding}for(i=0;i<o.length;i++){n=o[i];var u=document.createElement("div");u.style.overflow="hidden;";var c=document.createElement("div");for(c.style.display="table-cell",c.style.verticalAlign="middle",c.style.boxSizing="border-box",c.style.height=t,c.style.padding=a[i],c.style.textAlign=s[i],u.appendChild(c);n.firstChild;)c.appendChild(n.firstChild);n.appendChild(u),n.style.padding="0",r.push(u)}return e.style.height="0",r},e.AnimationUtils._unwrapRowContent=function(e){for(var t=e.children,n=0;n<t.length;n++){var i=t[n],r=i.children[0];if(r){var o=r.children[0];if(o)for(;o.firstChild;)i.appendChild(o.firstChild);i.removeChild(r)}i.style.padding=i._ojSavedPadding,delete i._ojSavedPadding}e.style.height=e._ojSavedHeight,delete e._ojSavedHeight},e.AnimationUtils._expandCollapseRow=function(n,i,r){var o,a=n.offsetHeight+"px",s=e.AnimationUtils._wrapRowContent(n,a),l=t.extend({},i);if(r?l.endMaxHeight||(l.endMaxHeight=a):l.startMaxHeight||(l.startMaxHeight=a),l.persist="all",l._noReflow=!0,s.length)for(var u=0;u<s.length;u++)0===u?(l._skipPromise=!1,o=e.AnimationUtils._expandCollapse(s[u],l,r)):(l._skipPromise=!0,e.AnimationUtils._expandCollapse(s[u],l,r));else o=Promise.resolve();return o.then(function(){null!=i&&"all"===i.persist||e.AnimationUtils._unwrapRowContent(n)})},e.AnimationUtils._getSizeLimit=function(e,t,n,i,r){var o=n;if(!o)if(i)o="0";else{var a=r?t.maxWidth:t.maxHeight;o="none"!==a?a:(r?e.offsetWidth:e.offsetHeight)+"px"}return o},e.AnimationUtils._expandCollapse=function(t,n,i){if(t&&"TR"===t.tagName)return e.AnimationUtils._expandCollapseRow(t,n,i);var r=e.AnimationUtils._mergeOptions(i?"expand":"collapse",n),o={css:{}},a={css:{}},s=r.direction||"height",l=o.css,u=a.css,c=window.getComputedStyle(t),p=[];if("both"===s||"height"===s){var d=e.AnimationUtils._getSizeLimit(t,c,r.startMaxHeight,i,!1),h=e.AnimationUtils._getSizeLimit(t,c,r.endMaxHeight,!i,!1);l.maxHeight=d,u.maxHeight=h,p.push("maxHeight")}if("both"===s||"width"===s){var m=e.AnimationUtils._getSizeLimit(t,c,r.startMaxWidth,i,!0),g=e.AnimationUtils._getSizeLimit(t,c,r.endMaxWidth,!i,!0);l.maxWidth=m,u.maxWidth=g,p.push("maxWidth")}l.overflow=r.overflow?r.overflow:"hidden";var f=[].concat(p);return f.push("overflow"),e.AnimationUtils._animate(t,o,a,r,p,f)},e.AnimationUtils.zoomIn=function(t,n){return e.AnimationUtils._zoom(t,n,!0)},e.AnimationUtils.zoomOut=function(t,n){return e.AnimationUtils._zoom(t,n,!1)},e.AnimationUtils._zoom=function(t,n,i){var r,o=e.AnimationUtils._mergeOptions(i?"zoomIn":"zoomOut",n),a={css:{}},s={css:{}},l=o.axis||"both";r="both"===l?"scale":"x"===l?"scaleX":"scaleY";var u=a.css,c=s.css;return u.transform=r+"("+(i?0:1)+") translateZ(0)",c.transform=r+"("+(i?1:0)+") translateZ(0)",u.transformOrigin=o.transformOrigin||"center",e.AnimationUtils._animate(t,a,s,o,["transform"])},e.AnimationUtils.slideIn=function(t,n){return e.AnimationUtils._slide(t,n,!0)},e.AnimationUtils.slideOut=function(t,n){return e.AnimationUtils._slide(t,n,!1)},e.AnimationUtils._slide=function(t,n,i){var r=e.AnimationUtils._mergeOptions(i?"slideIn":"slideOut",n),o={css:{}},a={css:{}},s=r.direction||"start",l="0",u="0",c=o.css,p=a.css;if(r.offsetX||r.offsetY)r.offsetX&&(l=r.offsetX),r.offsetY&&(u=r.offsetY);else{var d="rtl"===e.DomUtils.getReadingDirection();switch(s){case"left":l=(i?t.offsetWidth:-t.offsetWidth)+"px";break;case"right":l=(i?-t.offsetWidth:t.offsetWidth)+"px";break;case"top":u=(i?t.offsetHeight:-t.offsetHeight)+"px";break;case"bottom":u=(i?-t.offsetHeight:t.offsetHeight)+"px";break;case"end":l=(i?-t.offsetWidth:t.offsetWidth)*(d?-1:1)+"px";break;default:l=(i?t.offsetWidth:-t.offsetWidth)*(d?-1:1)+"px"}}return i?(c.transform="translate("+l+","+u+") translateZ(0)",p.transform="translate(0,0) translateZ(0)"):(c.transform="translate(0,0) translateZ(0)",p.transform="translate("+l+","+u+") translateZ(0)"),e.AnimationUtils._animate(t,o,a,r,["transform"])},e.AnimationUtils.ripple=function(n,i){var r=e.AnimationUtils._mergeOptions("ripple",i),o={css:{}},a={css:{}},s=n.offsetWidth,l=n.offsetHeight,u=t("<div>").css({position:"absolute",overflow:"hidden"}),c=t("<div class='oj-animation-effect-ripple oj-animation-rippler'>"),p="static"===window.getComputedStyle(n).position?{left:n.offsetLeft,top:n.offsetTop}:{left:0,top:0};n.insertBefore(u[0],n.firstChild),u.css({left:p.left+"px",top:p.top+"px",width:s+"px",height:l+"px"}),u.prepend(c);var d=o.css,h=a.css;return e.AnimationUtils._setRippleOptions(d,c,u,r),d.transform="scale(0) translateZ(0)",d.opacity=r.startOpacity||c.css("opacity"),h.transform="scale(1) translateZ(0)",h.opacity=r.endOpacity||0,r.persist="all",e.AnimationUtils._animate(c[0],o,a,r,["transform","opacity"]).then(function(){u.remove()})},e.AnimationUtils._setRippleOptions=function(t,n,i,r){var o=t,a=n.width(),s=i.width(),l=i.height();if(r.diameter){var u=r.diameter,c=parseInt(u,10);isNaN(c)||(a="%"===u.charAt(u.length-1)?Math.floor(Math.min(s,l)*(c/100)):c,o.width=a+"px",o.height=a+"px")}var p,d="static"===i.css("position")?i.position():{left:0,top:0};null!=(p=e.AnimationUtils._calcRippleOffset(r.offsetX,a,s,d.left))&&(o.left=p+"px"),null!=(p=e.AnimationUtils._calcRippleOffset(r.offsetY,a,l,d.top))&&(o.top=p+"px"),r.color&&(o.backgroundColor=r.color)},e.AnimationUtils._calcRippleOffset=function(e,t,n,i){var r,o=e||"50%",a=parseInt(o,10);return isNaN(a)||(r="%"===o.charAt(o.length-1)?n*(a/100)-t/2:a-t/2,r=Math.floor(r+i)),r},e.AnimationUtils._removeRipple=function(n,r){var o=r||{},a=o.removeEffect||"fadeOut",s=t(".oj-animation-rippler",n);return 0!==s.length?a in{fadeOut:1,collapse:1,zoomOut:1,slideOut:1}?e.AnimationUtils[a](s,o).then(function(){s.remove()}):s.remove():void i.warn("No rippler so returning")},e.AnimationUtils._calcBackfaceAngle=function(e){var t,n=e.match(/^([+-]?\d*\.?\d*)(.*)$/),r=parseFloat(n[1]),o=n[2];switch(o){case"deg":t=r-180+o;break;case"grad":t=r-200+o;break;case"rad":t=r-3.1416+o;break;case"turn":t=r-.5+o;break;default:i.error("Unknown angle unit in flip animation: "+o)}return t},e.AnimationUtils._flip=function(n,i,r,o,a){if(i&&"children"===i.flipTarget){var s,l=[],u=t(n).children(),c=t.extend({},i);delete c.flipTarget;var p=t.extend({},c);p.startAngle=e.AnimationUtils._calcBackfaceAngle(i.startAngle||o),p.endAngle=e.AnimationUtils._calcBackfaceAngle(i.endAngle||a);for(var d=0;d<u.length;d++)s=t(u[d]).hasClass("oj-animation-backface")?p:c,l.push(e.AnimationUtils._flip(u[d],s,r,o,a));return Promise.all(l)}var h,m={},g={},f={css:m},_={css:g},v="rotateY(",y="2000px",E="hidden",S="center";return(i=e.AnimationUtils._mergeOptions(r,i))&&("x"===i.axis&&(v="rotateX("),i.startAngle&&(o=i.startAngle),i.endAngle&&(a=i.endAngle),i.perspective&&(y=i.perspective),i.backfaceVisibility&&(E=i.backfaceVisibility),i.transformOrigin&&(S=i.transformOrigin)),h="perspective("+y+") "+v,m.transform=h+o+")",m.backfaceVisibility=E,m.transformOrigin=S,g.transform=h+a+")",e.AnimationUtils._animate(n,f,_,i,["transform"],["transform","backfaceVisibility","transformOrigin"])},e.AnimationUtils.flipIn=function(t,n){return e.AnimationUtils._flip(t,n,"flipIn","-180deg","0deg")},e.AnimationUtils.flipOut=function(t,n){return e.AnimationUtils._flip(t,n,"flipOut","0deg","180deg")},e.AnimationUtils.addTransition=function(t,n){var i=e.AnimationUtils._mergeOptions("addTransition",n);return e.AnimationUtils._animate(t,null,null,i,i.transitionProperties)},e.AnimationUtils}),define("ojs/ojjquery-hammer",["ojs/ojcore","jquery","hammerjs","ojs/ojlogger"],function(e,t,n,i){"use strict";var r;n?(t.fn.ojHammer=function(e){switch(e){case"instance":return this.data("ojHammer");case"destroy":return this.each(function(){var e=t(this),n=e.data("ojHammer");n&&(n.destroy(),e.removeData("ojHammer"))});default:return this.each(function(){var i=t(this);i.data("ojHammer")||i.data("ojHammer",new n.Manager(i[0],e))})}},n.Manager.prototype.emit=(r=n.Manager.prototype.emit,function(e,n){r.call(this,e,n),t(this.element).trigger({type:e,gesture:n})})):i.warn("Hammer jQuery extension loaded without Hammer.")}),!function(e){"function"==typeof define&&define.amd?define("jqueryui-amd/position",["jquery","./version"],e):e(jQuery)}(function(e){return function(){function t(e,t,n){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?n/100:1)]}function n(t,n){return parseInt(e.css(t,n),10)||0}function i(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}var r,o=Math.max,a=Math.abs,s=/left|center|right/,l=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,d=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==r)return r;var t,n,i=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=i.children()[0];return e("body").append(i),t=o.offsetWidth,i.css("overflow","scroll"),n=o.offsetWidth,t===n&&(n=i[0].clientWidth),i.remove(),r=t-n},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),r="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth,o="scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight;return{width:o?e.position.scrollbarWidth():0,height:r?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),i=e.isWindow(n[0]),r=!!n[0]&&9===n[0].nodeType,o=!i&&!r;return{element:n,isWindow:i,isDocument:r,offset:o?e(t).offset():{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},e.fn.position=function(r){if(!r||!r.of)return d.apply(this,arguments);r=e.extend({},r);var p,h,m,g,f,_,v=e(r.of),y=e.position.getWithinInfo(r.within),E=e.position.getScrollInfo(y),S=(r.collision||"flip").split(" "),b={};return _=i(v),v[0].preventDefault&&(r.at="left top"),h=_.width,m=_.height,g=_.offset,f=e.extend({},g),e.each(["my","at"],function(){var e,t,n=(r[this]||"").split(" ");1===n.length&&(n=s.test(n[0])?n.concat(["center"]):l.test(n[0])?["center"].concat(n):["center","center"]),n[0]=s.test(n[0])?n[0]:"center",n[1]=l.test(n[1])?n[1]:"center",e=u.exec(n[0]),t=u.exec(n[1]),b[this]=[e?e[0]:0,t?t[0]:0],r[this]=[c.exec(n[0])[0],c.exec(n[1])[0]]}),1===S.length&&(S[1]=S[0]),"right"===r.at[0]?f.left+=h:"center"===r.at[0]&&(f.left+=h/2),"bottom"===r.at[1]?f.top+=m:"center"===r.at[1]&&(f.top+=m/2),p=t(b.at,h,m),f.left+=p[0],f.top+=p[1],this.each(function(){var i,s,l=e(this),u=l.outerWidth(),c=l.outerHeight(),d=n(this,"marginLeft"),_=n(this,"marginTop"),O=u+d+n(this,"marginRight")+E.width,C=c+_+n(this,"marginBottom")+E.height,T=e.extend({},f),I=t(b.my,l.outerWidth(),l.outerHeight());"right"===r.my[0]?T.left-=u:"center"===r.my[0]&&(T.left-=u/2),"bottom"===r.my[1]?T.top-=c:"center"===r.my[1]&&(T.top-=c/2),T.left+=I[0],T.top+=I[1],i={marginLeft:d,marginTop:_},e.each(["left","top"],function(t,n){e.ui.position[S[t]]&&e.ui.position[S[t]][n](T,{targetWidth:h,targetHeight:m,elemWidth:u,elemHeight:c,collisionPosition:i,collisionWidth:O,collisionHeight:C,offset:[p[0]+I[0],p[1]+I[1]],my:r.my,at:r.at,within:y,elem:l})}),r.using&&(s=function(e){var t=g.left-T.left,n=t+h-u,i=g.top-T.top,s=i+m-c,p={target:{element:v,left:g.left,top:g.top,width:h,height:m},element:{element:l,left:T.left,top:T.top,width:u,height:c},horizontal:n<0?"left":t>0?"right":"center",vertical:s<0?"top":i>0?"bottom":"middle"};h<u&&a(t+n)<h&&(p.horizontal="center"),m<c&&a(i+s)<m&&(p.vertical="middle"),o(a(t),a(n))>o(a(i),a(s))?p.important="horizontal":p.important="vertical",r.using.call(this,e,p)}),l.offset(e.extend(T,{using:s}))})},e.ui.position={fit:{left:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollLeft:i.offset.left,a=i.width,s=e.left-t.collisionPosition.marginLeft,l=r-s,u=s+t.collisionWidth-a-r;t.collisionWidth>a?l>0&&u<=0?(n=e.left+l+t.collisionWidth-a-r,e.left+=l-n):u>0&&l<=0?e.left=r:l>u?e.left=r+a-t.collisionWidth:e.left=r:l>0?e.left+=l:u>0?e.left-=u:e.left=o(e.left-s,e.left)},top:function(e,t){var n,i=t.within,r=i.isWindow?i.scrollTop:i.offset.top,a=t.within.height,s=e.top-t.collisionPosition.marginTop,l=r-s,u=s+t.collisionHeight-a-r;t.collisionHeight>a?l>0&&u<=0?(n=e.top+l+t.collisionHeight-a-r,e.top+=l-n):u>0&&l<=0?e.top=r:l>u?e.top=r+a-t.collisionHeight:e.top=r:l>0?e.top+=l:u>0?e.top-=u:e.top=o(e.top-s,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,o=r.offset.left+r.scrollLeft,s=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,p=u+t.collisionWidth-s-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,h="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,m=-2*t.offset[0];c<0?(n=e.left+d+h+m+t.collisionWidth-s-o,(n<0||n<a(c))&&(e.left+=d+h+m)):p>0&&(i=e.left-t.collisionPosition.marginLeft+d+h+m-l,(i>0||a(i)<p)&&(e.left+=d+h+m))},top:function(e,t){var n,i,r=t.within,o=r.offset.top+r.scrollTop,s=r.height,l=r.isWindow?r.scrollTop:r.offset.top,u=e.top-t.collisionPosition.marginTop,c=u-l,p=u+t.collisionHeight-s-l,d="top"===t.my[1],h=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,m="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,g=-2*t.offset[1];c<0?(i=e.top+h+m+g+t.collisionHeight-s-o,(i<0||i<a(c))&&(e.top+=h+m+g)):p>0&&(n=e.top-t.collisionPosition.marginTop+h+m+g-l,(n>0||a(n)<p)&&(e.top+=h+m+g))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.ui.position}),define("ojs/ojpopupcore",["ojs/ojcore","jquery","ojs/ojcontext","ojs/ojcomponentcore","ojs/ojlogger","promise","jqueryui-amd/position"],function(e,t,n,i,r){"use strict";e.PopupService=function(){this.Init()},e.Object.createSubclass(e.PopupService,e.Object,"oj.PopupService"),e.PopupService.prototype.Init=function(){e.PopupService.superclass.Init.call(this)},e.PopupService.getInstance=function(t){return e.PopupService._popupService||(e.PopupService._popupService=new e.PopupServiceImpl),e.PopupService._popupService},e.PopupService.prototype.open=function(t){e.Assert.failedInAbstractFunction()},e.PopupService.prototype.close=function(t){e.Assert.failedInAbstractFunction()},e.PopupService.prototype.changeOptions=function(t){e.Assert.failedInAbstractFunction()},e.PopupService.prototype.triggerOnDescendents=function(t,n,i){e.Assert.failedInAbstractFunction()},e.PopupService.prototype.destroy=function(){e.PopupService._popupService=null},e.PopupService.MODALITY={NONE:"none",MODAL:"modal",MODELESS:"modeless"},e.PopupService.EVENT={POPUP_REMOVE:"ojPopupRemove",POPUP_CLOSE:"ojPopupClose",POPUP_REFRESH:"ojPopupRefresh",POPUP_AUTODISMISS:"ojPopupAutoDismiss",POPUP_BEFORE_OPEN:"ojPopupBeforeOpen",POPUP_AFTER_OPEN:"ojPopupAfterOpen",POPUP_BEFORE_CLOSE:"ojPopupBeforeClose",POPUP_AFTER_CLOSE:"ojPopupAfterClose"},e.PopupService.LAYER_LEVEL={TOP_LEVEL:"topLevel",NEAREST_ANCESTOR:"nearestAncestor"},e.PopupService.OPTION={POPUP:"popup",EVENTS:"events",MODALITY:"modality",LAUNCHER:"launcher",POSITION:"position",LAYER_SELECTORS:"layerSelectors",LAYER_LEVEL:"layerLevel",CONTEXT:"context",CUSTOM_ELEMENT:"customElement"},e.PopupServiceImpl=function(){this.Init()},e.Object.createSubclass(e.PopupServiceImpl,e.PopupService,"oj.PopupServiceImpl"),e.PopupServiceImpl.prototype.open=function(n){e.Assert.assertObject(n);var o=n[e.PopupService.OPTION.POPUP];e.Assert.assertPrototype(o,t);var a=e.ZOrderUtils.getStatus(o);if(a===e.ZOrderUtils.STATUS.UNKNOWN||a===e.ZOrderUtils.STATUS.BEFORE_OPEN||a===e.ZOrderUtils.STATUS.CLOSE){var s=n[e.PopupService.OPTION.LAUNCHER];e.Assert.assertPrototype(s,t);var l=n[e.PopupService.OPTION.POSITION];e.Assert.assertObjectOrNull(l);var u=n[e.PopupService.OPTION.EVENTS];e.Assert.assertObject(u);var c=n[e.PopupService.OPTION.MODALITY];(!c||e.PopupService.MODALITY.MODELESS!==c&&e.PopupService.MODALITY.MODAL!==c)&&(c=e.PopupService.MODALITY.NONE);var p=n[e.PopupService.OPTION.LAYER_SELECTORS];e.Assert.assertString(p);var d=n[e.PopupService.OPTION.CUSTOM_ELEMENT],h=n[e.PopupService.OPTION.LAYER_LEVEL];(!h||e.PopupService.LAYER_LEVEL.TOP_LEVEL!==h&&e.PopupService.LAYER_LEVEL.NEAREST_ANCESTOR!==h)&&(h=e.PopupService.LAYER_LEVEL.NEAREST_ANCESTOR);var m=u[e.PopupService.EVENT.POPUP_BEFORE_OPEN];m&&t.isFunction(m)||(m=e.PopupServiceImpl._defaultBeforeOpenCallback);var g=u[e.PopupService.EVENT.POPUP_AFTER_OPEN];e.ZOrderUtils.setStatus(o,e.ZOrderUtils.STATUS.OPENING),e.DomUtils.setLogicalParent(o,s),e.ZOrderUtils.addToAncestorLayer(o,s,c,p,h,d);var f,_=function(){try{o.removeAttr("aria-hidden"),this._assertEventSink(),i.subtreeShown(o[0])}catch(e){r.error("Error opening popup:\n%o",e)}finally{e.ZOrderUtils.setStatus(o,e.ZOrderUtils.STATUS.OPEN),g&&g(n);var a=e.ZOrderUtils.getFirstAncestorLayer(o);e.Assert.assertPrototype(a,t),e.ZOrderUtils.applyEvents(a,u),!e.ZOrderUtils._getSurrogate(a)&&t.isFunction(u[e.PopupService.EVENT.POPUP_REMOVE])&&(0,u[e.PopupService.EVENT.POPUP_REMOVE])()}};_=_.bind(this);try{f=m(n)}catch(e){r.error("Error before open popup:\n%o",e)}finally{f&&f instanceof Promise?f.then(_):_()}}else this._assertEventSink()},e.PopupServiceImpl._defaultBeforeOpenCallback=function(n){var i=n[e.PopupService.OPTION.POPUP];e.Assert.assertPrototype(i,t);var r=n[e.PopupService.OPTION.POSITION];i.show(),r&&i.position(r)},e.PopupServiceImpl.prototype.close=function(n){e.Assert.assertObject(n);var o=n[e.PopupService.OPTION.POPUP];e.Assert.assertPrototype(o,t);var a=e.ZOrderUtils.getOpenPopupLayer(o);e.Assert.assertPrototype(a,t);var s=n[e.PopupService.OPTION.EVENTS];s?s=t.extend(e.ZOrderUtils.getEvents(a),s):(s=e.ZOrderUtils.getEvents(a),n[e.PopupService.OPTION.EVENTS]=s);var l=e.ZOrderUtils.getStatus(o);if(l!==e.ZOrderUtils.STATUS.OPEN&&l!==e.ZOrderUtils.STATUS.BEFORE_CLOSE||!s)this._assertEventSink();else{var u=s[e.PopupService.EVENT.POPUP_BEFORE_CLOSE];u&&t.isFunction(u)||(u=e.PopupServiceImpl._defaultBeforeCloseCallback);var c=s[e.PopupService.EVENT.POPUP_AFTER_CLOSE];e.ZOrderUtils.setStatus(o,e.ZOrderUtils.STATUS.CLOSING),e.ZOrderUtils.applyEvents(a,{});var p,d=function(){try{o.hide(),o.attr("aria-hidden","true"),o.css({top:"auto",bottom:"auto",left:"auto",right:"auto"}),e.ZOrderUtils.removeFromAncestorLayer(o),e.DomUtils.setLogicalParent(o,null),this._assertEventSink(),i.subtreeHidden(o[0])}catch(e){r.error("Error closing popup:\n%o",e)}finally{e.ZOrderUtils.setStatus(o,e.ZOrderUtils.STATUS.CLOSE),c&&t.isFunction(c)&&c(n)}};d=d.bind(this);try{p=u(n)}catch(e){r.error("Error before close popup:\n%o",e)}finally{p&&p instanceof Promise?p.then(d):d()}}},e.PopupServiceImpl._defaultBeforeCloseCallback=function(n){var i=n[e.PopupService.OPTION.POPUP];e.Assert.assertPrototype(i,t),i.hide()},e.PopupServiceImpl.prototype.changeOptions=function(n){e.Assert.assertObject(n);var i=n[e.PopupService.OPTION.POPUP];if(e.Assert.assertPrototype(i,t),e.ZOrderUtils.getStatus(i)===e.ZOrderUtils.STATUS.OPEN){var r=e.ZOrderUtils.getOpenPopupLayer(i);e.Assert.assertPrototype(r,t);var o=n[e.PopupService.OPTION.EVENTS];o&&e.ZOrderUtils.applyEvents(r,o);var a=n[e.PopupService.OPTION.MODALITY];a&&e.ZOrderUtils.applyModality(r,a);var s=n[e.PopupService.OPTION.LAYER_SELECTORS];e.StringUtils.isEmptyOrUndefined(s)||r.attr("class",s)}},e.PopupServiceImpl.prototype.triggerOnDescendents=function(t,n,i){if(e.ZOrderUtils.isPopupOpen(t)){var r={};r.event=n,r.argsArray=i;var o=e.ZOrderUtils.getFirstAncestorLayer(t);e.ZOrderUtils.postOrderVisit(o,this._triggerOnDescendentsVisitCallback,r)}},e.PopupServiceImpl.prototype._triggerOnDescendentsVisitCallback=function(n,i){var r=i.event,o=i.argsArray,a=e.ZOrderUtils.getEvents(n);return a&&t.isFunction(a[r])&&a[r].apply(this,o),e.ZOrderUtils.VISIT_RESULT.ACCEPT},e.PopupServiceImpl.prototype._assertEventSink=function(){var t,n,i,r=e.ZOrderUtils.hasPopupsOpen(),o=this._callbackEventFilter;if(!r&&o){for(window.removeEventListener("resize",e.PopupServiceImpl._refreshCallback,!0),window.removeEventListener("scroll",e.PopupServiceImpl._refreshCallback,!0),(n=document.documentElement).removeEventListener("mousewheel",e.PopupServiceImpl._refreshCallback,!0),n.removeEventListener("DOMMouseScroll",e.PopupServiceImpl._refreshCallback,!0),this._callbackEventFilter=null,t=0;t<e.PopupServiceImpl._REDISTRIBUTE_EVENTS.length;t++)i=e.PopupServiceImpl._REDISTRIBUTE_EVENTS[t],n.removeEventListener(i,o,!0);var a=this._simpleTapRecognizer;a&&(a.destroy(),this._simpleTapRecognizer=null)}else if(r&&!o){for(window.addEventListener("resize",e.PopupServiceImpl._refreshCallback,!0),window.addEventListener("scroll",e.PopupServiceImpl._refreshCallback,!0),(n=document.documentElement).addEventListener("mousewheel",e.PopupServiceImpl._refreshCallback,!0),n.addEventListener("DOMMouseScroll",e.PopupServiceImpl._refreshCallback,!0),o=this._eventFilterCallback.bind(this),this._callbackEventFilter=o,t=0;t<e.PopupServiceImpl._REDISTRIBUTE_EVENTS.length;t++)i=e.PopupServiceImpl._REDISTRIBUTE_EVENTS[t],n.addEventListener(i,o,!0);e.DomUtils.isTouchSupported()&&(this._simpleTapRecognizer=new e.SimpleTapRecognizer(o))}},e.PopupServiceImpl.prototype._eventFilterCallback=function(n){var i=t(n.target);if(e.ZOrderUtils.hasPopupsOpen()){if(!e.DomUtils.isChromeEvent(n)&&("focus"!==n.type||i.is(":focusable"))){var r=e.ZOrderUtils.getDefaultLayer();if("keydown"!==n.type||!e.ZOrderUtils.hasModalDialogOpen()||e.DomUtils.isAncestor(r[0],i[0])){var o,a=e.ZOrderUtils.getFirstAncestorLayer(i);if(r[0]!==a[0]?a.hasClass(e.PopupServiceImpl._FOCUS_WITHIN_SELECTOR)||((o=this._lastFocusLayer)&&o.removeClass(e.PopupServiceImpl._FOCUS_WITHIN_SELECTOR),a.addClass(e.PopupServiceImpl._FOCUS_WITHIN_SELECTOR),this._lastFocusLayer=a):(o=this._lastFocusLayer)&&(o.removeClass(e.PopupServiceImpl._FOCUS_WITHIN_SELECTOR),this._lastFocusLayer=null),"focus"!==n.type||"-1"!==i.attr("tabindex")){for(var s={},l=e.PopupServiceImpl._COPY_SAFE_EVENT_PROPERTIES,u={},c=0;c<l.length;c++){var p=l[c],d=n[p];void 0===d||t.isFunction(d)||(u[p]=d)}s.event=t.Event(n,u),e.ZOrderUtils.postOrderVisit(r,e.PopupServiceImpl._redistributeVisitCallback,s)}}else e.ZOrderUtils.eatEvent(n)}}else this._assertEventSink()},e.PopupServiceImpl._redistributeVisitCallback=function(n,i){var r=e.ZOrderUtils.getEvents(n),o=i.event;return r&&t.isFunction(r[e.PopupService.EVENT.POPUP_AUTODISMISS])&&r[e.PopupService.EVENT.POPUP_AUTODISMISS](o),e.ZOrderUtils.VISIT_RESULT.ACCEPT},e.PopupServiceImpl._refreshCallback=function(n){var i=e.PopupServiceImpl._refreshTimerId;isNaN(i)&&(e.PopupServiceImpl._refreshTimerId=window.setTimeout(function(){e.PopupServiceImpl._refreshTimerId=Number.NaN;var n=e.ZOrderUtils.getDefaultLayer();t.isFunction(window.requestAnimationFrame)?e.PopupServiceImpl._afRequestId=window.requestAnimationFrame(function(){e.PopupServiceImpl._afRequestId=null,e.ZOrderUtils.postOrderVisit(n,e.PopupServiceImpl._refreshVisitCallback)}):e.ZOrderUtils.postOrderVisit(n,e.PopupServiceImpl._refreshVisitCallback)},e.PopupServiceImpl._REFRESH_DELAY))},e.PopupServiceImpl._refreshVisitCallback=function(n,i){if(i.level>0)return e.ZOrderUtils.VISIT_RESULT.REJECT;var r=e.ZOrderUtils.getEvents(n);return r&&t.isFunction(r[e.PopupService.EVENT.POPUP_REFRESH])&&r[e.PopupService.EVENT.POPUP_REFRESH](),e.ZOrderUtils.VISIT_RESULT.ACCEPT},e.PopupServiceImpl.prototype.destroy=function(){e.PopupServiceImpl.superclass.destroy.call(this)},e.PopupServiceImpl._FOCUS_WITHIN_SELECTOR="oj-focus-within",e.PopupServiceImpl._REDISTRIBUTE_EVENTS=["focus","mousedown","keydown"],e.PopupServiceImpl._COPY_SAFE_EVENT_PROPERTIES=["altKey","bubbles","cancelable","ctrlKey","currentTarget","eventPhase","metaKey","relatedTarget","shiftKey","target","timeStamp","view","which","button","buttons","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","toElement","char","charCode","key","keyCode"],e.PopupServiceImpl._REFRESH_DELAY=10,e.ZOrderUtils={},e.ZOrderUtils.STATUS={UNKNOWN:0,BEFORE_OPEN:.5,OPENING:1,OPEN:2,BEFORE_CLOSE:2.5,CLOSING:3,CLOSE:4},e.ZOrderUtils._STATUS_DATA="oj-popup-status",e.ZOrderUtils.getStatus=function(n){n instanceof Element&&(n=t(n));var i=n.data(e.ZOrderUtils._STATUS_DATA);return isNaN(i)?e.ZOrderUtils.STATUS.UNKNOWN:i},e.ZOrderUtils.setStatus=function(n,i){n instanceof Element&&(n=t(n)),i>e.ZOrderUtils.STATUS.UNKNOWN&&i<=e.ZOrderUtils.STATUS.CLOSE&&n.data(e.ZOrderUtils._STATUS_DATA,i)},e.ZOrderUtils.getFirstAncestorLayer=function(t){if(!t)return e.ZOrderUtils.getDefaultLayer();for(var n=t;n&&n.length>0&&n.attr(e.ZOrderUtils._SURROGATE_ATTR)!==e.ZOrderUtils._DEFAULT_LAYER_ID;){if(e.ZOrderUtils._hasSurrogate(n[0]))return n;n=n.parent()}return e.ZOrderUtils.getDefaultLayer()},e.ZOrderUtils.getDefaultLayer=function(){var n=t(document.getElementById(e.ZOrderUtils._DEFAULT_LAYER_ID));return n.length>0?n:((n=t("<div>")).attr("role","presentation"),n.attr("id",e.ZOrderUtils._DEFAULT_LAYER_ID),n.prependTo(t(document.body)),n)},e.ZOrderUtils.addToAncestorLayer=function(n,r,o,a,s,l){var u=n[0];if(e.ZOrderUtils._hasSurrogate(u.parentNode))throw new Error("JET Popup is already open - id: "+u.getAttribute("id"));
- var c=e.ZOrderUtils.getFirstAncestorLayer(s===e.PopupService.LAYER_LEVEL.TOP_LEVEL?null:r),p=t("<div>"),d=n.attr("id");e.StringUtils.isEmptyOrUndefined(d)?p.uniqueId():p.attr("id",[d,"layer"].join("_")),p.attr("role","presentation"),p.addClass(a),n.after(p),e.ZOrderUtils._createSurrogate(p,l),i.subtreeDetached(u),n.appendTo(p),n.data(e.ZOrderUtils._LAYER_ID_DATA,p.attr("id")),p.appendTo(c),i.subtreeAttached(u),e.ZOrderUtils.applyModality(p,o)},e.ZOrderUtils._getSurrogate=function(t){var n=t.attr(e.ZOrderUtils._SURROGATE_ATTR);if(n)return document.getElementById(n)},e.ZOrderUtils.applyEvents=function(n,r,o){o||(o=t(e.ZOrderUtils._getSurrogate(n))),n.data(e.ZOrderUtils._EVENTS_DATA,r),o.length>0&&r&&t.isFunction(r[e.PopupService.EVENT.POPUP_REMOVE])&&i.setComponentOption(o[0],"beforeDestroy",r[e.PopupService.EVENT.POPUP_REMOVE])},e.ZOrderUtils.getEvents=function(t){return t.data(e.ZOrderUtils._EVENTS_DATA)},e.ZOrderUtils._createSurrogate=function(n,i){var r="script";i&&(r="oj-surrogate");var o=t(document.createElement(r)),a=n.attr("id");e.StringUtils.isEmptyOrUndefined(a)||o.attr("id",[a,"surrogate"].join("_")),i&&o.attr("data-oj-binding-provider","none"),o.insertBefore(n),i||o.ojSurrogate();var s=o.attr("id");return n.attr(e.ZOrderUtils._SURROGATE_ATTR,s),o},e.ZOrderUtils._removeSurrogate=function(n){var r=n.attr(e.ZOrderUtils._SURROGATE_ATTR);n.removeAttr(e.ZOrderUtils._SURROGATE_ATTR);var o=t(document.getElementById(r)),a=o.length>0;return a&&(n.insertAfter(o),i.setComponentOption(o[0],"beforeDestroy",null),o.remove()),a},e.ZOrderUtils.getOpenPopupLayer=function(n){var i=n.parent();if(!i||0===i.length){var r=n.data(e.ZOrderUtils._LAYER_ID_DATA);i=t(document.getElementById(r))}return i},e.ZOrderUtils.removeFromAncestorLayer=function(t){var n=e.ZOrderUtils.getOpenPopupLayer(t);e.ZOrderUtils.preOrderVisit(n,e.ZOrderUtils._closeDescendantPopupsCallback),e.ZOrderUtils._removeOverlayFromAncestorLayer(n),n.removeData(e.ZOrderUtils._EVENTS_DATA),n.removeData(e.ZOrderUtils._MODALITY_DATA),t.removeData(e.ZOrderUtils._LAYER_ID_DATA);var r=t[0];i.subtreeDetached(r),e.ZOrderUtils._removeSurrogate(n)&&r&&r.parentElement?(e.DomUtils.unwrap(t,n),i.subtreeAttached(r)):n.remove()},e.ZOrderUtils._closeDescendantPopupsCallback=function(n,i){if(i.level>0)return e.ZOrderUtils.VISIT_RESULT.REJECT;var r=n.data(e.ZOrderUtils._EVENTS_DATA);return r&&t.isFunction(r[e.PopupService.EVENT.POPUP_CLOSE])&&r[e.PopupService.EVENT.POPUP_CLOSE](),e.ZOrderUtils.VISIT_RESULT.ACCEPT},e.ZOrderUtils.applyModality=function(t,n){var i=t.data(e.ZOrderUtils._MODALITY_DATA);t.data(e.ZOrderUtils._MODALITY_DATA,n),e.StringUtils.isEmptyOrUndefined(i)?e.PopupService.MODALITY.MODAL===n?e.ZOrderUtils._addOverlayToAncestorLayer(t):e.ZOrderUtils._removeOverlayFromAncestorLayer(t):i!==n&&(n!==i&&n===e.PopupService.MODALITY.MODAL?e.ZOrderUtils._addOverlayToAncestorLayer(t):e.ZOrderUtils._removeOverlayFromAncestorLayer(t)),n===e.PopupService.MODALITY.MODAL?t.attr("aria-modal","true"):t.removeAttr("aria-modal")},e.ZOrderUtils.hasModalDialogOpen=function(){for(var n=e.ZOrderUtils.getDefaultLayer().children(),i=n.length-1;i>-1;i--)if(t(n[i]).hasClass(e.ZOrderUtils._OVERLAY_SELECTOR))return!0;return!1},e.ZOrderUtils._addOverlayToAncestorLayer=function(n){var i=t("<div>");i.addClass(e.ZOrderUtils._OVERLAY_SELECTOR),i.addClass(n[0].className),i.attr("role","presentation");var r=n.attr("id");e.StringUtils.isEmptyOrUndefined(r)?i.uniqueId():i.attr("id",[r,"overlay"].join("_")),n.before(i);var o=i.attr("id");n.attr(e.ZOrderUtils._OVERLAY_ATTR,o)},e.ZOrderUtils._removeOverlayFromAncestorLayer=function(n){var i=n.attr(e.ZOrderUtils._OVERLAY_ATTR);e.StringUtils.isEmptyOrUndefined(i)||(n.removeAttr(e.ZOrderUtils._OVERLAY_ATTR),t(document.getElementById(i)).remove())},e.ZOrderUtils.VISIT_RESULT={ACCEPT:0,REJECT:1,COMPLETE:2},e.ZOrderUtils._VISIT_TRAVERSAL={PRE_ORDER:0,POST_ORDER:1},e.ZOrderUtils.postOrderVisit=function(t,n,i){var r=i;i||(r={}),r.level=0,r.type=e.ZOrderUtils._VISIT_TRAVERSAL.POST_ORDER,e.ZOrderUtils._visitTree(t,n,r)},e.ZOrderUtils.preOrderVisit=function(t,n,i){var r=i;i||(r={}),r.level=0,r.type=e.ZOrderUtils._VISIT_TRAVERSAL.PRE_ORDER,e.ZOrderUtils._visitTree(t,n,r)},e.ZOrderUtils._visitTree=function(n,i,r){for(var o=r.level,a=n.children(),s=a.length-1;s>-1;s--){var l=t(a[s]);if(e.ZOrderUtils._hasSurrogate(l[0])){var u;if(r.type===e.ZOrderUtils._VISIT_TRAVERSAL.PRE_ORDER){if((u=i(l,r))===e.ZOrderUtils.VISIT_RESULT.COMPLETE)return u;if(u===e.ZOrderUtils.VISIT_RESULT.REJECT)break}if(r.level=o+1,u=e.ZOrderUtils._visitTree(l,i,r),r.level=o,u===e.ZOrderUtils.VISIT_RESULT.COMPLETE)return u;if(r.type===e.ZOrderUtils._VISIT_TRAVERSAL.POST_ORDER){if((u=i(l,r))===e.ZOrderUtils.VISIT_RESULT.COMPLETE)return u;if(u===e.ZOrderUtils.VISIT_RESULT.REJECT)break}}}return e.ZOrderUtils.VISIT_RESULT.ACCEPT},e.ZOrderUtils._hasSurrogate=function(t){return!(!t||1!==t.nodeType||!t.hasAttribute(e.ZOrderUtils._SURROGATE_ATTR))},e.ZOrderUtils.hasPopupsOpen=function(){return e.ZOrderUtils.getDefaultLayer().children().length>0},e.ZOrderUtils.getOpenPopupCount=function(){var t={popupCount:0},n=e.ZOrderUtils.getDefaultLayer();return e.ZOrderUtils.preOrderVisit(n,e.ZOrderUtils._openPopupCountCallback,t),t.popupCount},e.ZOrderUtils._openPopupCountCallback=function(t,n){return n.popupCount+=1,e.ZOrderUtils.VISIT_RESULT.ACCEPT},e.ZOrderUtils.findOpenPopups=function(){var n={},i=[];n.popups=i;var r=e.ZOrderUtils.getDefaultLayer();return e.ZOrderUtils.preOrderVisit(r,e.ZOrderUtils._openPopupsCallback,n),i=n.popups,t(i)},e.ZOrderUtils._openPopupsCallback=function(t,n){return n.popups.push(t[0]),e.ZOrderUtils.VISIT_RESULT.ACCEPT},e.ZOrderUtils.isAboveTopModalLayer=function(n){if(!n||!e.ZOrderUtils.hasPopupsOpen())return!0;var i=function(){var n={topLayer:null},i=e.ZOrderUtils.getDefaultLayer();if(e.ZOrderUtils.preOrderVisit(i,function(n,i){if(i.level>0)return e.ZOrderUtils.VISIT_RESULT.REJECT;var r=i.topLayer;return r?e.ZOrderUtils.compareStackingContexts(t(n),t(r))>0&&(i.topLayer=n):i.topLayer=n,e.ZOrderUtils.VISIT_RESULT.ACCEPT},n),n.topLayer)return n.topLayer[0]}();if(!i)return!0;var r=function(n){var i={topModalPopup:null};if(n.hasAttribute(e.ZOrderUtils._OVERLAY_ATTR)&&(i.topModalPopup=t(n)),e.ZOrderUtils.postOrderVisit(t(n),function(t,n){return t[0].hasAttribute(e.ZOrderUtils._OVERLAY_ATTR)?(n.topModalPopup=t,e.ZOrderUtils.VISIT_RESULT.COMPLETE):e.ZOrderUtils.VISIT_RESULT.ACCEPT},i),i.topModalPopup)return i.topModalPopup[0]}(i);return!r||e.DomUtils.isAncestorOrSelf(r,n)||e.ZOrderUtils.compareStackingContexts(t(r),t(n))<0},e.ZOrderUtils.compareStackingContexts=function(n,i){function r(n,i){var r,o=["absolute","relative","fixed"],a=n.parents(),s=[];for(r=a.length-1;r>-1;r--)s.push(t(a[r]));(a=s).push(n);var l=[],u=0;for(r=0;r<a.length;r++){var c=a[r],p=c.css("position"),d=e.DomUtils.getCSSLengthAsFloat(c.css("opacity")),h=e.DomUtils.getCSSLengthAsInt(c.css("z-index")),m=t.inArray(c[0],c.parent().children());t.inArray(p,o)>-1&&h>0?(l.push({weight:[u,h,m],order:[m]}),u+=1):d<1?(l.push({weight:[u,1,m],order:[m]}),u+=1):i&&l.push({weight:[0,0,m],order:[m]})}return l}function o(e,t){for(var n=Math.max(e.length,t.length),i=0;i<n;i++){var r=i<e.length?e[i]:0,o=i<t.length?t[i]:0;if(r!==o)return r<o?-1:1}return 0}e.Assert.assertPrototype(n,t),e.Assert.assertPrototype(i,t);var a,s,l=r(n,!1),u=r(i,!1),c=Math.max(l.length,u.length);for(a=0;a<c;a++)if(0!==(s=o(a<l.length?l[a].weight:[-1],a<u.length?u[a].weight:[-1])))return s;for(l=r(n,!0),u=r(i,!0),c=Math.max(l.length,u.length),a=0;a<c;a++)if(0!==(s=o(a<l.length?l[a].order:[-1],a<u.length?u[a].order:[-1])))return s;return 0},e.ZOrderUtils.eatEvent=function(e){e.stopPropagation(),e.preventDefault()},e.ZOrderUtils.isPopupOpen=function(t){var n=t.parent();return!(!n||1!==n.length||!e.ZOrderUtils._hasSurrogate(n[0]))},e.ZOrderUtils._EVENTS_DATA="oj-popup-events",e.ZOrderUtils._MODALITY_DATA="oj-popup-modality",e.ZOrderUtils._DEFAULT_LAYER_ID="__oj_zorder_container",e.ZOrderUtils._SURROGATE_ATTR="data-oj-surrogate-id",e.ZOrderUtils._LAYER_ID_DATA="oj-popup-layer-id",e.ZOrderUtils._OVERLAY_ATTR="data-oj-overlayid",e.ZOrderUtils._OVERLAY_SELECTOR="oj-component-overlay",e.__registerWidget("oj.ojSurrogate",t.oj.baseComponent,{version:"1.0.0",widgetEventPrefix:"oj",options:{beforeDestroy:null},_ComponentCreate:function(){this._super(),this.element.uniqueId()},_invokeBeforeDestroy:function(){var e=this.options.beforeDestroy;this.options.beforeDestroy=null,e&&e()},_destroy:function(){this._invokeBeforeDestroy(),this.element.removeUniqueId(),this._super()},_NotifyDetached:function(){this._invokeBeforeDestroy(),this._super()}}),e.CustomElementBridge.register("oj-surrogate",{metadata:{properties:{beforeDestroy:{type:"function"}},extension:{_WIDGET_NAME:"ojSurrogate"}}}),e.SimpleTapRecognizer=function(e){this._tapCallback=e,this.Init()},e.Object.createSubclass(e.SimpleTapRecognizer,e.Object,"oj.SimpleTapRecognizer"),e.SimpleTapRecognizer.prototype.Init=function(){e.SimpleTapRecognizer.superclass.Init.call(this);var t=this._eventHandler.bind(this);this._eventHandlerCallback=t;for(var n=document.documentElement,i=0;i<e.SimpleTapRecognizer._TOUCHEVENTS.length;i++)n.addEventListener(e.SimpleTapRecognizer._TOUCHEVENTS[i],t,!0)},e.SimpleTapRecognizer.prototype._eventHandler=function(t){var n=this._tapCallback,i=t.type;if("touchstart"===i)this._touchStartEvent=t,this._touchStartEvent._tapStart=(new Date).getTime();else if("touchmove"===i||"touchcancel"===i)this._touchStartEvent=null;else if("touchend"===i){if(this._touchStartEvent){var r=this._touchStartEvent._tapStart;isNaN(r)?n(this._touchStartEvent):(new Date).getTime()-r<e.SimpleTapRecognizer._PRESSHOLDTHRESSHOLD&&n(this._touchStartEvent)}this._touchStartEvent=null}},e.SimpleTapRecognizer.prototype.destroy=function(){this._tapCallback=null;var t=this._eventHandlerCallback;this._eventHandlerCallback=null;for(var n=document.documentElement,i=0;i<e.SimpleTapRecognizer._TOUCHEVENTS.length;i++)n.removeEventListener(e.SimpleTapRecognizer._TOUCHEVENTS[i],t,!0)},e.SimpleTapRecognizer._TOUCHEVENTS=["touchstart","touchmove","touchcancel","touchend"],e.SimpleTapRecognizer._PRESSHOLDTHRESSHOLD=700,e.PopupLiveRegion=function(){this.Init()},e.Object.createSubclass(e.PopupLiveRegion,e.Object,"oj.PopupLiveRegion"),e.PopupLiveRegion.prototype.Init=function(){e.PopupLiveRegion.superclass.Init.call(this),isNaN(e.PopupLiveRegion._refCounter)?e.PopupLiveRegion._refCounter=1:e.PopupLiveRegion._refCounter+=1},e.PopupLiveRegion.prototype.destroy=function(){if(!isNaN(e.PopupLiveRegion._refCounter)&&(e.PopupLiveRegion._refCounter-=1,e.PopupLiveRegion._refCounter<1)){var n=t(document.getElementById(e.PopupLiveRegion._POPUP_LIVE_REGION_ID));n.length>0&&n.remove()}},e.PopupLiveRegion.prototype.announce=function(n){if(!e.StringUtils.isEmpty(n)){var i=e.PopupLiveRegion._getLiveRegion();i.children().remove(),t("<div>").text(n).appendTo(i)}},e.PopupLiveRegion._getLiveRegion=function(){var n=t(document.getElementById(e.PopupLiveRegion._POPUP_LIVE_REGION_ID));return 0===n.length&&((n=t("<div>")).attr({id:e.PopupLiveRegion._POPUP_LIVE_REGION_ID,role:"log","aria-live":"polite","aria-relevant":"additions"}),n.addClass("oj-helper-hidden-accessible"),n.appendTo(document.body)),n},e.PopupLiveRegion._POPUP_LIVE_REGION_ID="__oj_popup_arialiveregion",e.PopupSkipLink=function(n,i,r,o,a){e.Assert.assertPrototype(n,t),e.Assert.assertString(i),e.Assert.assertFunction(r),e.Assert.assertStringOrNull(o),this._options={insertBefore:!1,preventKeyEvents:!0},a&&(this._options=Object.assign({},this._options,a)),this._sibling=n,this._message=i,this._callback=r,this._id=o,this.Init()},e.Object.createSubclass(e.PopupSkipLink,e.Object,"oj.PopupSkipLink"),e.PopupSkipLink.prototype.Init=function(){e.PopupSkipLink.superclass.Init.call(this);var n=this._sibling,i=this._callback,r=this._message,o=this._options.insertBefore,a=this._options.preventKeyEvents;this._message=null;var s=this._id;this._id=null;var l=t(document.getElementById(s));l.length<1&&(l=t("<a>").attr({tabindex:"-1",href:"#",role:"link"})),l.attr("id",s),l.addClass("oj-helper-hidden-accessible"),l.text(r),o?l.insertBefore(n):l.insertAfter(n),l.on("click",e.PopupSkipLink._activateHandler.bind(this,i)),a&&l.on("keydown keyup keypress",e.PopupSkipLink._keyHandler),n.data(e.PopupSkipLink._SKIPLINK_ATTR,l)},e.PopupSkipLink._activateHandler=function(t,n){e.ZOrderUtils.eatEvent(n),window.setImmediate(t)},e.PopupSkipLink._keyHandler=function(n){n.keyCode===t.ui.keyCode.ENTER&&e.ZOrderUtils.eatEvent(n)},e.PopupSkipLink.prototype.destroy=function(){var t=this._sibling;if(delete this._sibling,delete this._callback,t){var n=t.data(e.PopupSkipLink._SKIPLINK_ATTR);t.removeData(e.PopupSkipLink._SKIPLINK_ATTR),n&&(n.off("click keydown keyup keypress"),n.remove())}},e.PopupSkipLink.prototype.getLink=function(){var t,n=this._sibling;return n&&(t=n.data(e.PopupSkipLink._SKIPLINK_ATTR)),t},e.PopupSkipLink._SKIPLINK_ATTR="oj-skiplink",e.PopupWhenReadyMediator=function(e,t,n,i){this._element=e,this._operation=t,this._widgetName=n,this._isCustomElement=!!i,this.Init()},e.Object.createSubclass(e.PopupWhenReadyMediator,e.Object,"oj.PopupWhenReadyMediator"),e.PopupWhenReadyMediator.prototype.Init=function(){e.PopupWhenReadyMediator.superclass.Init.call(this),this._resolvedQueue=[],this._callback=this._eventHandler.bind(this);var t=this._operation,i=["oj"];this._isCustomElement?(i.push(t.charAt(0).toUpperCase()),i.push(t.slice(1))):i.push(t);var r=i.join("");this._eventType=r,this._element.on(r,this._callback);var o=n.getContext(this._element[0]).getBusyContext(),a={description:this._getBusyStateDescription.bind(this,this._element,this._operation,this._widgetName)},s=o.addBusyState(a);this.AddPromiseExecutor(s),this._whenReadyPromise=new Promise(this.AddPromiseExecutor.bind(this))},e.PopupWhenReadyMediator.prototype._getBusyStateDescription=function(e,t,n){return n+" identified by '"+e.attr("id")+"' is busy animating on the '"+t+"' operation."},e.PopupWhenReadyMediator.prototype._deliverResolved=function(e){var t=this._resolvedQueue;this._resolvedQueue=null;var n=e||this._operation;this._operation=null;for(var i=0;i<t.length;i++)try{t[i](n)}catch(e){r.error("Error resolving whenReady promises:\n%o",e)}this._whenReadyPromise=Promise.resolve("none")},e.PopupWhenReadyMediator.prototype.destroy=function(){if(this._resolvedQueue&&this._deliverResolved("none"),this._callback){var e=this._eventType;this._element.off(e,this._callback)}this._callback=null,this._element=null,this._operation=null,this._whenReadyPromise=null,this._widgetName=null,this._eventType=null},e.PopupWhenReadyMediator.prototype.getWhenReadyPromise=function(){return this._whenReadyPromise},e.PopupWhenReadyMediator.prototype._eventHandler=function(e){e.target===this._element[0]&&(this._element.off(e.type,this._callback),this._deliverResolved(),this._callback=null)},e.PopupWhenReadyMediator.prototype._getPendingOperation=function(){return this._operation?this._operation:"none"},e.PopupWhenReadyMediator.prototype.AddPromiseExecutor=function(e,t){this._resolvedQueue&&this._resolvedQueue.push(e)},e.PopupWhenReadyMediator.prototype.isOperationPending=function(e,t,n,i){var o=!1,a=this._widgetName,s=this._getPendingOperation();return t===s?(r.info("An %s instance invoked a '%s' operation while pending animation of the same type of operation. The second request will be ignored.",a,t),o=!0):"none"!==s&&(r.info("An %s instance invoked a '%s' operation while pending animation of a '%s' operation. The second request will be invoked after the pending operation completes.",a,t,s),new Promise(this.AddPromiseExecutor.bind(this)).then(function(){this[n].apply(this,i)}.bind(e)),o=!0),o},e.PositionUtils={},e.PositionUtils.normalizeHorizontalAlignment=function(n,i){for(var r=t.extend({},n),o=0;o<e.PositionUtils._ALIGN_RULE_PROPERTIES.length;o++){var a=e.PositionUtils._ALIGN_RULE_PROPERTIES[o],s=r[a];if(s)if(e.StringUtils.isString(s))r[a]=s.replace("start",i?"right":"left").replace("end",i?"left":"right").replace("<",i?"+":"-").replace(">",i?"-":"+");else for(var l=0;l<e.PositionUtils._SUB_ALIGN_RULE_PROPERTIES.length;l++){var u=e.PositionUtils._SUB_ALIGN_RULE_PROPERTIES[l],c=s[u];e.StringUtils.isString(c)&&(s[u]=c.replace("start",i?"right":"left").replace("end",i?"left":"right").replace("<",i?"+":"-").replace(">",i?"-":"+"))}}return r},e.PositionUtils.normalizePositionOf=function(e,t,n){return"event"===e?n:null==e||"launcher"===e?t:e},e.PositionUtils._normalizeEventForPosition=function(e){t.each(["pageX","pageY"],function(t,n){if(e&&void 0===e[n]&&e.originalEvent){var i,r=e.originalEvent,o=r.type;if(i="touchstart"===o||"touchmove"===o?"touches":"touchend"===o?"changedTouches":null){var a=r[i][0];a&&(e[n]=a[n])}}})},e.PositionUtils._ALIGN_RULE_PROPERTIES=["my","at"],e.PositionUtils._SUB_ALIGN_RULE_PROPERTIES=["vertical","horizontal"],e.PositionUtils.isAligningPositionClipped=function(t){if(t.target&&t.target.height>0&&t.target.width>0){var n=t.target.element;return!e.PositionUtils.isWithinViewport(n)}return!1},e.PositionUtils.isWithinViewport=function(n){function i(t,n){var i;if(["hidden","scroll","auto"].indexOf(n.overflowY)>-1){if(t.bottom-n.top<-1)return!1;if(i="auto"===n.overflowX&&n.scrollWidth>n.innerWidth||"scroll"===n.overflowX?e.DomUtils.getScrollBarWidth():0,n.bottom-i-t.top<1)return!1}return!(["hidden","scroll","auto"].indexOf(n.overflowX)>-1&&(i="auto"===n.overflowY&&n.scrollHeight>n.innerHeight||"scroll"===n.overflowY?e.DomUtils.getScrollBarWidth():0,t.right-(n.left+("rtl"===e.DomUtils.getReadingDirection()?i:0))<-1||t.left-(n.right-("ltr"===e.DomUtils.getReadingDirection()?i:0))>-1))}function r(e){var n=e[0];if(1===n.nodeType){var i=t.extend({},n.getBoundingClientRect());return i.overflowX=e.css("overflow-x"),i.overflowY=e.css("overflow-y"),i.innerHeight=e.innerHeight(),i.innerWidth=e.innerWidth(),i.scrollHeight=n.scrollHeight,i.scrollWidth=n.scrollWidth,i}return{height:0,width:0}}function o(t){return["fixed","absolute","relative"].indexOf(t.css("position"))>-1&&(Math.abs(e.DomUtils.getCSSLengthAsInt(t.css("top")))>0||Math.abs(e.DomUtils.getCSSLengthAsInt(t.css("bottom")))>0||Math.abs(e.DomUtils.getCSSLengthAsInt(t.css("left")))>0||Math.abs(e.DomUtils.getCSSLengthAsInt(t.css("right")))>0)}if(!n)return!1;if(t.isWindow(n[0])||o(n))return!0;for(var a,s=r(n),l=!0,u=n.parent();l&&u&&u.length>0&&"BODY"!==u[0].nodeName&&1===u[0].nodeType&&!o(u);){if("visible"!==(a=u).css("overflow-x")||"visible"!==a.css("overflow-y")){var c=r(u);c.height>0&&c.width>0&&(l=i(s,c))}u=u.parent()}return l},e.PositionUtils._ANIMATION_TRANSFORM_ORIGIN_RULES={"right-top":"right top","right-middle":"right center","right-bottom":"right bottom","left-top":"left top","left-middle":"left center","left-bottom":"left bottom","center-top":"center top","center-middle":"center center","center-bottom":"center bottom"},e.PositionUtils._ALIGN_MNEMONIC_DATA="oj-popup-align-mnemonic",e.PositionUtils.captureTransformOriginAnimationEffectsOption=function(t,n){var i=[n.horizontal,n.vertical].join("-");t.data(e.PositionUtils._ALIGN_MNEMONIC_DATA,i)},e.PositionUtils.addTransformOriginAnimationEffectsOption=function(t,n){var i,r;e.StringUtils.isString(n)?(r=!0,i=n):(r=!1,i=JSON.stringify(n));var o=/#myPosition/g;if(i.match(o)){var a=t.data(e.PositionUtils._ALIGN_MNEMONIC_DATA);e.StringUtils.isEmptyOrUndefined(a)&&(a="center-middle");var s=e.PositionUtils._ANIMATION_TRANSFORM_ORIGIN_RULES[a];i=i.replace(o,s),n=r?i:JSON.parse(i)}return n},e.PositionUtils._JQUI_MNEMONIC_GRP_REGX=/^(\w+)(\+|-)?(\d+)?/,e.PositionUtils._VERTICAL_ENUM_TST_REGX=/^top$|^center$|^bottom$/,e.PositionUtils._HORIZONTAL_ENUM_TST_REGX=/^start$|^left$|^center$|^end$|^right$/,e.PositionUtils._COLLISION_ENUM_TST_REGX=/^none$|^flip$|^flipfit$|^fit$|^flipcenter$/,e.PositionUtils._parsePositionNmnemonic=function(t,n){var i=[null,Number.NaN],r=e.PositionUtils._JQUI_MNEMONIC_GRP_REGX.exec(t);if(r[1]&&n.test(r[1])&&(i[0]=r[1],r[2])){var o=parseInt(r[3],10);isNaN(o)||(o*="-"===r[2]?-1:1,i[1]=o)}return i},e.PositionUtils._parseJSON=function(t){if(e.StringUtils.isString(t)&&/^{/.test(t)&&/}$/.test(t))try{return JSON.parse(t)}catch(e){}return null},e.PositionUtils._coerceMyAtToJet=function(n,i,r,o){var a=e.PositionUtils._parseJSON(i);a&&(i=a),(a=e.PositionUtils._parseJSON(r))&&(r=a),o||(o={});var s,l=t.extend({},o),u={x:0,y:0};if(r&&"x"in r&&"y"in r&&(u.x=e.DomUtils.getCSSLengthAsInt(r.x),u.y=e.DomUtils.getCSSLengthAsInt(r.y)),e.StringUtils.isString(i)){var c=i.split(/\s/);c.length>0&&!e.StringUtils.isEmpty(c[0])&&(s=e.PositionUtils._parsePositionNmnemonic(c[0],e.PositionUtils._HORIZONTAL_ENUM_TST_REGX))[0]&&(l.horizontal=s[0],isNaN(s[1])||(u.x=s[1])),c.length>1&&!e.StringUtils.isEmpty(c[1])&&(s=e.PositionUtils._parsePositionNmnemonic(c[1],e.PositionUtils._VERTICAL_ENUM_TST_REGX))[0]&&(l.vertical=s[0],isNaN(s[1])||(u.y=s[1]))}else i&&("horizontal"in i&&(s=e.PositionUtils._parsePositionNmnemonic(i.horizontal,e.PositionUtils._HORIZONTAL_ENUM_TST_REGX))[0]&&(l.horizontal=s[0],isNaN(s[1])||(u.x=s[1])),"vertical"in i&&(s=e.PositionUtils._parsePositionNmnemonic(i.vertical,e.PositionUtils._VERTICAL_ENUM_TST_REGX))[0]&&(l.vertical=s[0],isNaN(s[1])||(u.y=s[1])));var p={};return p[n]=l,p.offset=u,p},e.PositionUtils._coerceCollisionToJet=function(t,n){var i=n;return e.PositionUtils._COLLISION_ENUM_TST_REGX.test(t)&&(i=t),{collision:i}},e.PositionUtils._coerceOfToJet=function(n,i){var r=e.PositionUtils._parseJSON(n);r&&(n=r);var o=i;return e.StringUtils.isString(n)?o=n:t.isWindow(n)?o="window":n instanceof Element||n instanceof t?((n=t(n)).uniqueId(),o="#"+function(e){for(var t=[],n=/\w|_|-/,i=0;i<e.length;i++){var r=e.substring(i,i+1);n.test(r)?t.push(r):t.push("\\"+r)}return t.join("")}(n.attr("id"))):n instanceof Event||n instanceof t.Event?("pageX"in n||"pageY"in n)&&((o={}).x=e.DomUtils.getCSSLengthAsFloat(n.pageX),o.y=e.DomUtils.getCSSLengthAsFloat(n.pageY)):n&&("x"in n||"y"in n)&&((o={}).x=e.DomUtils.getCSSLengthAsFloat(n.x),o.y=e.DomUtils.getCSSLengthAsFloat(n.y)),{of:o}},e.PositionUtils.coerceToJet=function(n,i){n||(n={});var r=e.PositionUtils._parseJSON(n);r&&(n=r),i||(i={});var o=i.my,a=i.at,s=i.collision,l=i.of,u=e.PositionUtils._coerceMyAtToJet("my",n.my,n.offset,o),c=e.PositionUtils._coerceMyAtToJet("at",n.at,null,a),p={offset:{x:u.offset.x+c.offset.x,y:u.offset.y+c.offset.y}};return delete u.offset,delete c.offset,t.extend({},u,c,p,e.PositionUtils._coerceCollisionToJet(n.collision,s),e.PositionUtils._coerceOfToJet(n.of,l),function(e,n){return{using:t.isFunction(e)?e:n}}(n.using,void 0))},e.PositionUtils.coerceToJqUi=function(n){function i(e,t){var i=[];if(n[e][t]?i.push(n[e][t]):i.push("center"),"my"===e&&n.offset){var r="horizontal"===t?"x":"y",o=n.offset[r];isNaN(o)||0===o||(i.push(o>0?"+":""),i.push(Math.floor(o).toString()))}return i.join("")}var r={};["my","at"].forEach(function(e){if(n[e]){var t=[];t.push(i(e,"horizontal")),t.push(" "),t.push(i(e,"vertical")),r[e]=t.join("")}});var o=n.of;if(e.StringUtils.isString(o))r.of="window"===o?window:o;else if(o&&!e.StringUtils.isString(o)&&"x"in o&&"y"in o){var a=o.x,s=o.y,l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,1,a,s,a,s,!1,!1,!1,!1,0,null),r.of=t.Event(l,{pageX:a,pageY:s})}else r.of=o;return n.collision&&(r.collision=n.collision),n.using&&(r.using=n.using),r},t.ui.position.flipcenter={left:function(n,i){var r=n.left;t.ui.position.flip.left.call(this,n,i);var o=i.within,a=o.isWindow?o.scrollLeft:o.offset.left,s=o.width,l=n.left-i.collisionPosition.marginLeft,u=a-l,c=l+i.collisionWidth-s-a;(u>0||c>0)&&("right"===i.at[0]?r-=i.targetWidth/2:"left"===i.at[0]&&(r+=i.targetWidth/2),r-=("rtl"===e.DomUtils.getReadingDirection()?-1:1)*(i.elemWidth/2),n.left=Math.max(0,r))},top:function(e,n){var i=e.top;t.ui.position.flip.top.call(this,e,n);var r=n.within,o=r.isWindow?r.scrollTop:r.offset.top,a=n.within.height,s=e.top-n.collisionPosition.marginTop,l=o-s,u=s+n.collisionHeight-a-o;(l>0||u>0)&&("top"===n.at[1]?i+=n.targetHeight/2:"bottom"===n.at[1]&&(i-=n.targetHeight/2),i+=n.elemHeight/2,e.top=Math.max(0,i))}};var o=t.ui.position.flip.left;t.ui.position.flip={left:o.bind(this),top:function(e,t){var n,i,r=t.within,o=r.offset.top+r.scrollTop,a=r.height,s=r.isWindow?r.scrollTop:r.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-s,c=l+t.collisionHeight-a-s;n="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,i="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0;var p,d,h=-2*t.offset[1];u<0?((p=e.top+n+i+h+t.collisionHeight-a-o)<0||p<Math.abs(u))&&c<0&&u>c&&(e.top+=n+i+h):c>0&&((d=e.top-t.collisionPosition.marginTop+n+i+h-s)>0||Math.abs(d)<c)&&(e.top+=n+i+h)}}}),define("ojs/ojpopup",["ojs/ojcore","jquery","ojs/ojcontext","ojs/ojthemeutils","ojs/ojcomponentcore","ojs/ojanimation","promise","ojs/ojpopupcore"],function(e,t,n,i,r,o){"use strict";var a,s,l={properties:{autoDismiss:{type:"string",enumValues:["focusLoss","none"],value:"focusLoss"},chrome:{type:"string",enumValues:["default","none"],value:"default"},initialFocus:{type:"string",enumValues:["auto","firstFocusable","none","popup"],value:"auto"},modality:{type:"string",enumValues:["modal","modeless"],value:"modeless"},position:{type:"object",properties:{at:{type:"object",properties:{horizontal:{type:"string",enumValues:["center","end","left","right","start"],value:"start"},vertical:{type:"string",enumValues:["bottom","center","top"],value:"bottom"}}},collision:{type:"string",enumValues:["fit","flip","flipcenter","flipfit","none"],value:"flip"},my:{type:"object",properties:{horizontal:{type:"string",enumValues:["center","end","left","right","start"],value:"start"},vertical:{type:"string",enumValues:["bottom","center","top"],value:"top"}}},of:{type:"string|object"},offset:{type:"object",properties:{x:{type:"number",value:0},y:{type:"number",value:0}}}}},tail:{type:"string",enumValues:["none","simple"],value:"none"},translations:{type:"object",value:{},properties:{ariaCloseSkipLink:{type:"string"},ariaFocusSkipLink:{type:"string"},ariaLiveRegionInitialFocusFirstFocusable:{type:"string"},ariaLiveRegionInitialFocusFirstFocusableTouch:{type:"string"},ariaLiveRegionInitialFocusNone:{type:"string"},ariaLiveRegionInitialFocusNoneTouch:{type:"string"}}}},methods:{open:{},close:{},isOpen:{},refresh:{},setProperty:{},getProperty:{},setProperties:{},getNodeBySubId:{},getSubIdByNode:{}},events:{ojBeforeOpen:{},ojOpen:{},ojBeforeClose:{},ojClose:{},ojFocus:{},ojAnimateStart:{},ojAnimateEnd:{}},extension:{}};a=["oj-left","oj-center","oj-right","oj-top","oj-middle","oj-bottom"],s={"right-top":"oj-right oj-top","right-middle":"oj-right oj-middle","right-bottom":"oj-right oj-bottom","left-top":"oj-left oj-top","left-middle":"oj-left oj-middle","left-bottom":"oj-left oj-bottom","center-top":"oj-center oj-top","center-middle":"oj-left oj-middle","center-bottom":"oj-center oj-bottom"},e.__registerWidget("oj.ojPopup",t.oj.baseComponent,{widgetEventPrefix:"oj",options:{animation:null,autoDismiss:"focusLoss",chrome:"default",initialFocus:"auto",position:{my:{horizontal:"start",vertical:"top"},offset:{x:0,y:0},at:{horizontal:"start",vertical:"bottom"},of:void 0,collision:"flip"},tail:"none",modality:"modeless",role:"tooltip",beforeOpen:null,open:null,beforeClose:null,close:null,focus:null,animateStart:null,animateEnd:null},_ComponentCreate:function(){this._super();var n=this._getRootStyle(),i=this.element;i.hide().addClass(n).attr("aria-hidden","true"),i.addClass("oj-component");var r=t("<div>");r.addClass([n,"content"].join("-")),r.attr("role","presentation"),r.append(i[0].childNodes),r.appendTo(i),this._content=r,this._setChrome(),this._setupFocus(i);var o=this.options;o.position=e.PositionUtils.coerceToJet(o.position)},_AfterCreate:function(){this._super(),this.element.uniqueId(),this._createTail()},_destroy:function(){e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN&&this._closeImplicitly(),this._setWhenReady("none"),this._destroyTail(),delete this._popupServiceEvents;var t=this.element;t.hide().attr("aria-hidden","true").removeUniqueId();var n=this._content;delete this._content,t.append(n[0].childNodes),n.remove();var i=this._closeDelayTimer;i&&(delete this._closeDelayTimer,i()),this._super()},open:function(t,n){if(!this._isOperationPending("open",[t,n])){e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN&&this._closeImplicitly();var i=this.element,r=e.ZOrderUtils.getStatus(i);if(r===e.ZOrderUtils.STATUS.CLOSE||r===e.ZOrderUtils.STATUS.UNKNOWN)if(e.ZOrderUtils.setStatus(i,e.ZOrderUtils.STATUS.BEFORE_OPEN),!1!==this._trigger("beforeOpen")){this._setWhenReady("open"),this._setLauncher(t);var o=this._launcher,a=this.options;(n=n||a.position).of||(this._hasPositionOfLauncherOverride=!0,n.of=o),this._setPosition(n),this._setAutoDismiss(a.autoDismiss),this._addDescribedBy(),this._IsCustomElement()&&i[0].hasAttribute("role")||i.attr("role",a.role);var s=this._getPositionAsJqUi(),l=this._getRootStyle(),u=[l,"layer"].join("-"),c=a.tail;"none"!==c&&(u+=" "+[l,"tail",c].join("-"));var p={};p[e.PopupService.OPTION.POPUP]=i,p[e.PopupService.OPTION.LAUNCHER]=o,p[e.PopupService.OPTION.POSITION]=s,p[e.PopupService.OPTION.EVENTS]=this._getPopupServiceEvents(),p[e.PopupService.OPTION.LAYER_SELECTORS]=u,p[e.PopupService.OPTION.MODALITY]=a.modality,p[e.PopupService.OPTION.CUSTOM_ELEMENT]=this._IsCustomElement(),e.PopupService.getInstance().open(p)}else e.ZOrderUtils.setStatus(this.element,r)}},_beforeOpenHandler:function(t){var n=t[e.PopupService.OPTION.POPUP],i=t[e.PopupService.OPTION.POSITION];n.show(),n.position(i);var r=this.options.animation;if(r&&r.open){var a=r.actionPrefix,s=a?[a,"open"].join("-"):"open";return o.startAnimation(n[0],s,e.PositionUtils.addTransformOriginAnimationEffectsOption(n,r.open),this)}},_afterOpenHandler:function(t){var n=t[e.PopupService.OPTION.POPUP],i=t[e.PopupService.OPTION.LAUNCHER];this._initVoiceOverAssist(),this._trigger("open"),this._intialFocus(),this._on(n,{keydown:this._keyHandler}),i&&i.length>0&&this._on(i,{keydown:this._keyHandler})},_GetContextMenu:function(){if(!this._IsCustomElement())return this._super();var t=e.BaseCustomElementBridge.getSlotMap(this._content[0]).contextMenu;return t&&t.length>0?t[0]:void 0},close:function(){if(!this._isOperationPending("close",[])){var t=this.element,n=e.ZOrderUtils.getStatus(t);if(n===e.ZOrderUtils.STATUS.OPEN)if(e.ZOrderUtils.setStatus(t,e.ZOrderUtils.STATUS.BEFORE_CLOSE),!1!==this._trigger("beforeClose")||this._ignoreBeforeCloseResultant){this._setWhenReady("close");var i=this._launcher;this._off(t,"keydown"),i&&i.length>0&&this._off(i,"keydown"),this._restoreFocus(),this._destroyVoiceOverAssist();var r={};r[e.PopupService.OPTION.POPUP]=t,e.PopupService.getInstance().close(r)}else e.ZOrderUtils.setStatus(t,n)}},_beforeCloseHandler:function(t){var n=t[e.PopupService.OPTION.POPUP],i=this.options.animation;if(!this._ignoreBeforeCloseResultant&&i&&i.close){var r=i.actionPrefix,a=r?[r,"close"].join("-"):"close";return o.startAnimation(n[0],a,e.PositionUtils.addTransformOriginAnimationEffectsOption(n,i.close),this).then(function(){n.hide()})}n.hide()},_afterCloseHandler:function(e){this._removeDescribedBy(),this._setAutoDismiss(),delete this._launcher,this._trigger("close"),this._hasPositionOfLauncherOverride&&(this.options.position.of=null,delete this._hasPositionOfLauncherOverride)},isOpen:function(){var t=e.ZOrderUtils.getStatus(this.element);return t===e.ZOrderUtils.STATUS.OPENING||t===e.ZOrderUtils.STATUS.OPEN||t===e.ZOrderUtils.STATUS.BEFORE_CLOSE||t===e.ZOrderUtils.STATUS.CLOSING},refresh:function(){if(this._super(),e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN&&this._reposition()){var t=this.element;e.PopupService.getInstance().triggerOnDescendents(t,e.PopupService.EVENT.POPUP_REFRESH)}},_setOption:function(t,n){var i=this.options;switch(t){case"tail":n!==i.tail&&this._setTail(n);break;case"chrome":n!==i.chrome&&this._setChrome(n);break;case"position":return this._setPosition(n),void this.refresh();case"autoDismiss":
- e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN&&n!==i.autoDismiss&&this._setAutoDismiss(n);break;case"modality":if(e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN){var r=this.element,o={};o[e.PopupService.OPTION.POPUP]=r,o[e.PopupService.OPTION.MODALITY]=n,e.PopupService.getInstance().changeOptions(o)}}this._superApply(arguments)},_getRootStyle:function(){return"oj-popup"},_setTail:function(e){this._destroyTail(),this._createTail(e),this._reposition()},_createTail:function(n){var i=n||this.options.tail;if("none"!==i){var r=this._getRootStyle(),o=[r,"tail"].join("-"),a=[o,i].join("-"),s=t("<div>").hide();s.addClass(o).addClass(a),s.attr("role","presentation"),this._tailId=s.attr("id",this._getSubId("tail")).attr("id");var l=this.element;if(s.appendTo(l),l.addClass(a),e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN){var u=[r,"layer"].join("-");u+=" "+a;var c={};c[e.PopupService.OPTION.POPUP]=l,c[e.PopupService.OPTION.LAYER_SELECTORS]=u,e.PopupService.getInstance().changeOptions(c)}}},_getTail:function(){var e=this._tailId;return e?t(document.getElementById(e)):null},_destroyTail:function(){var t=this._getTail();t&&t.remove(),delete this._tailId;var n=this.options.tail,i=this._getRootStyle(),r=[i,"tail",n].join("-"),o=this.element;if(o.removeClass(r),e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN){var a=[i,"layer"].join("-"),s={};s[e.PopupService.OPTION.POPUP]=o,s[e.PopupService.OPTION.LAYER_SELECTORS]=a,e.PopupService.getInstance().changeOptions(s)}},_setChrome:function(e){var t=e||this.options.chrome,n=[this._getRootStyle(),"no-chrome"].join("-"),i=this.element;"default"===t&&i.hasClass(n)?i.removeClass(n):"none"!==t||i.hasClass(n)||i.addClass(n)},_setLauncher:function(n){var i=n;if(i?"string"===t.type(i)?i=t(i):1===i.nodeType&&(i=t(i)):i=t(document.activeElement),i instanceof t&&i.length>1)for(var r=this.element,o=0;o<i.length;o++){var a=i[0];if(!e.DomUtils.isAncestorOrSelf(r[0],a)){i=t(a);break}}else i instanceof t&&!(i instanceof t&&0===i.length)||(i=t(document.activeElement));this._launcher=i},_setPosition:function(t){var n=this.options;t&&(n.position=e.PositionUtils.coerceToJet(t,n.position))},_getPositionAsJqUi:function(){var n=this.options,i=e.PositionUtils.coerceToJqUi(n.position),r="rtl"===this._GetReadingDirection(),o=(i=e.PositionUtils.normalizeHorizontalAlignment(i,r)).using;return o=t.isFunction(o)?o:null,i.using=this._usingHandler.bind(this,o),i},_resolveBusyStateAndCloseImplicitly:function(e){e(),delete this._closeDelayTimer,this._closeImplicitly()},_resolveBusyStateAndCancelDelayedClosure:function(e,t){window.clearTimeout(e),t()},_usingHandler:function(t,i,r){var o=r.element.element;if(i.top!==o.css("top")||i.left!==o.css("left")){var l=this._getTail();if(l){l.hide();for(var u=0;u<a.length;u++)l.removeClass(a[u]),o.removeClass(a[u]);if(l.removeAttr("style"),r.target&&0===r.target.height&&0===r.target.width){var c="rtl"===this._GetReadingDirection(),p=e.PositionUtils.normalizeHorizontalAlignment(this.options.position,c).my;if(!e.StringUtils.isEmptyOrUndefined(p)){var d="center"===p.horizontal?p.horizontal:r.horizontal,h="center"===p.vertical?"middle":p.vertical;r.horizontal=d,r.vertical=h}}var m,g,f=[r.horizontal,r.vertical].join("-"),_=s[f];if(l.addClass(_),o.addClass(_),l.show(),"left"===r.horizontal?(m=l.outerWidth(),m-=m+e.DomUtils.getCSSLengthAsInt(l.css("left")),i.left+=m-2):"right"===r.horizontal&&(m=l.outerWidth(),m-=m+e.DomUtils.getCSSLengthAsInt(l.css("right")),i.left-=m-2),"top"===r.vertical?(g=l.outerHeight(),g-=g+e.DomUtils.getCSSLengthAsInt(l.css(r.vertical)),i.top+=g-2):"bottom"===r.vertical&&(g=l.outerHeight(),g-=g+e.DomUtils.getCSSLengthAsInt(l.css(r.vertical)),i.top-=g-2),o.css(i),"center"===r.horizontal&&"middle"!==r.vertical){var v=o.width(),y=Math.round((v/2-l.outerWidth()/2)/v*100);l.css({left:y+"%"})}else if("middle"===r.vertical){var E=o.height(),S=Math.round((E/2-l.outerHeight()/2)/E*100);l.css({top:S+"%"})}}else o.css(i);if(e.PositionUtils.captureTransformOriginAnimationEffectsOption(o,r),t&&t(i,r),"focusLoss"===this.options.autoDismiss&&e.PositionUtils.isAligningPositionClipped(r)){this._ignoreRestoreFocus=!0;var b=n.getContext(this.element[0]).getBusyContext(),O={description:["ojPopup identified by '",this.element.attr("id"),"' is pending implicit closure."].join("")},C=b.addBusyState(O),T=window.setTimeout(this._resolveBusyStateAndCloseImplicitly.bind(this,C),0);this._closeDelayTimer=this._resolveBusyStateAndCancelDelayedClosure.bind(this,T,C)}}},_reposition:function(){var n=this.element,i=this._getPositionAsJqUi();if(e.StringUtils.isString(i.of)){var r=t(i.of);if(0===r.length)return!1;i.of=r}return n.position(i),!0},_intialFocus:function(e){var t=this._deriveInitialFocus();(e||"none"!==t)&&(this.GetFocusElement().focus(),this._trigger("focus"))},GetFocusElement:function(){var n=document.activeElement;if(n&&this._isFocusInPopup(n))return n;var i,r=this._deriveInitialFocus();if("none"===r&&(r="popup"),"firstFocusable"===r){for(var o=this._content.find(":focusable"),a=0;a<o.length;a++)if(e.FocusUtils.isFocusable(o[a])){i=t(o[a]);break}i||(r="popup")}if("popup"===r){var s=this._closeSkipLink;s?i=s.getLink():(i=this.element).attr("tabindex","-1")}return i[0]},_deriveInitialFocus:function(){var t=this.options,n=t.initialFocus;return"auto"===n&&(n="modal"===t.modality?e.DomUtils.isTouchSupported()?"popup":"firstFocusable":"none"),n},_isFocusInPopup:function(t,n){if(t||(t=document.activeElement),!t)return!1;var i=this.element;return n&&(i=i.parent()),e.DomUtils.isAncestorOrSelf(i[0],t)},_isFocusInLauncher:function(t){t||(t=document.activeElement);var n=this._launcher;return e.DomUtils.isAncestorOrSelf(n[0],t)},_restoreFocus:function(){this._ignoreRestoreFocus?delete this._ignoreRestoreFocus:this._isFocusInPopup(null,!0)&&this._launcher.focus()},_keyHandler:function(e){if(!e.isDefaultPrevented()){var n=this._content,i=e.target;if(e.keyCode===t.ui.keyCode.ESCAPE&&(this._isFocusInPopup(i)||this._isFocusInLauncher(i)))e.preventDefault(),this.close();else if(117===e.keyCode)this._isFocusInPopup(i)?"modeless"===this.options.modality?(e.preventDefault(),this._launcher.focus()):this.close():this._isFocusInLauncher(i)&&(e.preventDefault(),this._intialFocus(!0));else if(e.keyCode===t.ui.keyCode.TAB&&this._isFocusInPopup(i)){var r=n.find(":tabbable");if(r.length>0){var o=r[0],a=r[r.length-1],s=this.element;o!==i&&s[0]!==i||!e.shiftKey?a!==i||e.shiftKey||(e.preventDefault(),a===o?(s.attr("tabindex","-1"),s.focus()):t(o).focus()):(e.preventDefault(),o===a&&o===i?(s.attr("tabindex","-1"),s.focus()):t(a).focus())}else e.preventDefault(),"modeless"===this.options.modality?this._launcher.focus():this.close()}}},_setAutoDismiss:function(t){var n=this._focusLossCallback,i=this._getPopupServiceEvents();if(n&&(delete i[e.PopupService.EVENT.POPUP_AUTODISMISS],delete this._focusLossCallback),"focusLoss"===t&&(n=this._dismissalHandler.bind(this),this._focusLossCallback=n,i[e.PopupService.EVENT.POPUP_AUTODISMISS]=n),e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN){var r=this.element,o={};o[e.PopupService.OPTION.POPUP]=r,o[e.PopupService.OPTION.EVENTS]=i,e.PopupService.getInstance().changeOptions(o)}},_dismissalHandler:function(t){if(e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN){var n=this._launcher,i=this.element.parent(),r=t.target,o=this._focusSkipLink;if(o){var a=o.getLink();if(a&&e.DomUtils.isAncestorOrSelf(a[0],r))return}if(!e.DomUtils.isAncestorOrSelf(n[0],r)&&!e.DomUtils.isAncestorOrSelf(i[0],r)){if(e.FocusUtils.isFocusable(r)){if("mousedown"===t.type||"touchstart"===t.type)return;this._ignoreRestoreFocus=!0}this.close()}}},_addDescribedBy:function(){var e=this._launcher,n=this.element.attr("id"),i=e.attr("aria-describedby"),r=i?i.split(/\s+/):[];r.push(n),i=t.trim(r.join(" ")),e.attr("aria-describedby",i)},_removeDescribedBy:function(){var e=this._launcher,n=this.element;if(e&&0!==e.length){var i=n.attr("id"),r=e.attr("aria-describedby"),o=r?r.split(/\s+/):[],a=t.inArray(i,o);-1!==a&&o.splice(a,1),(r=t.trim(o.join(" ")))?e.attr("aria-describedby",r):e.removeAttr("aria-describedby")}},_initVoiceOverAssist:function(){var t,n=e.AgentUtils.getAgentInfo().os===e.AgentUtils.OS.IOS||e.AgentUtils.getAgentInfo().os===e.AgentUtils.OS.ANDROID,i=this._liveRegion;i||(i=new e.PopupLiveRegion,this._liveRegion=i);var r=this._deriveInitialFocus();if(t=n?this.getTranslatedString("none"===r?"ariaLiveRegionInitialFocusNoneTouch":"ariaLiveRegionInitialFocusFirstFocusableTouch"):this.getTranslatedString("none"===r?"ariaLiveRegionInitialFocusNone":"ariaLiveRegionInitialFocusFirstFocusable"),i.announce(t),n){var o=this._getSubId("focusSkipLink"),a=this._launcher,s=this._intialFocus.bind(this,!0);t=this.getTranslatedString("ariaFocusSkipLink"),this._focusSkipLink=new e.PopupSkipLink(a,t,s,o);var l=this._content,u=this._getSubId("closeSkipLink");s=this._closeImplicitly.bind(this),t=this.getTranslatedString("ariaCloseSkipLink"),this._closeSkipLink=new e.PopupSkipLink(l,t,s,u)}},_destroyVoiceOverAssist:function(){this._liveRegion.destroy(),delete this._liveRegion;var e=this._focusSkipLink;e&&(e.destroy(),delete this._focusSkipLink);var t=this._closeSkipLink;t&&(t.destroy(),delete this._closeSkipLink)},_getSubId:function(t){var n=this.element.attr("id");return e.StringUtils.isEmptyOrUndefined(n)&&(n=this.uuid),[n,t].join("_")},_surrogateRemoveHandler:function(){var t=this.element;e.ZOrderUtils.getStatus(t)===e.ZOrderUtils.STATUS.OPEN&&t.remove()},_getPopupServiceEvents:function(){if(!this._popupServiceEvents){var t={};this._popupServiceEvents=t,t[e.PopupService.EVENT.POPUP_CLOSE]=this._closeImplicitly.bind(this),t[e.PopupService.EVENT.POPUP_REMOVE]=this._surrogateRemoveHandler.bind(this),t[e.PopupService.EVENT.POPUP_REFRESH]=this.refresh.bind(this),t[e.PopupService.EVENT.POPUP_BEFORE_OPEN]=this._beforeOpenHandler.bind(this),t[e.PopupService.EVENT.POPUP_AFTER_OPEN]=this._afterOpenHandler.bind(this),t[e.PopupService.EVENT.POPUP_BEFORE_CLOSE]=this._beforeCloseHandler.bind(this),t[e.PopupService.EVENT.POPUP_AFTER_CLOSE]=this._afterCloseHandler.bind(this)}return this._popupServiceEvents},_closeImplicitly:function(){this._ignoreBeforeCloseResultant=!0,this.close(),delete this._ignoreBeforeCloseResultant},_setWhenReady:function(t){var n=this._whenReadyMediator;n&&(n.destroy(),delete this._whenReadyMediator),["open","close"].indexOf(t)<0||(this._whenReadyMediator=new e.PopupWhenReadyMediator(this.element,t,"ojPopup",this._IsCustomElement()))},_isOperationPending:function(e,t){var n=this._whenReadyMediator;return!!n&&n.isOperationPending(this,e,e,t)},_setupFocus:function(e){var n=this;this._focusable({applyHighlight:!0,setupHandlers:function(i,r){n._on(e,{focus:function(e){i(t(e.currentTarget))},blur:function(e){r(t(e.currentTarget))}})}})},_NotifyDetached:function(){e.ZOrderUtils.getStatus(this.element)===e.ZOrderUtils.STATUS.OPEN&&this._closeImplicitly(),this._super()}}),r.setDefaultOptions({ojPopup:{modality:r.createDynamicPropertyGetter(function(){return(i.parseJSONFromFontFamily("oj-popup-option-defaults")||{}).modality}),animation:r.createDynamicPropertyGetter(function(){return(i.parseJSONFromFontFamily("oj-popup-option-defaults")||{}).animation})}}),l.extension._WIDGET_NAME="ojPopup",e.CustomElementBridge.register("oj-popup",{metadata:l})}),define("ojs/ojlabel",["ojs/ojcore","jquery","hammerjs","ojs/ojlogger","ojs/ojcontext","ojs/ojjquery-hammer","ojs/ojcomponentcore","ojs/ojpopup"],function(e,t,n,i,r){"use strict";var o={properties:{for:{type:"string"},help:{type:"object",value:{definition:null,source:null},properties:{definition:{type:"string"},source:{type:"string"}}},labelId:{type:"string"},showRequired:{type:"boolean",value:!1},translations:{type:"object",value:{},properties:{tooltipHelp:{type:"string"},tooltipRequired:{type:"string"}}}},methods:{refresh:{},setProperty:{},getProperty:{},setProperties:{},getNodeBySubId:{},getSubIdByNode:{}},extension:{}};e.__registerWidget("oj.ojLabel",t.oj.baseComponent,{version:"1.0.0",defaultElement:"<label>",widgetEventPrefix:"oj",options:{for:null,help:{definition:null,source:null},labelId:null,showRequired:!1,rootAttributes:null},_BUNDLE_KEY:{_TOOLTIP_HELP:"tooltipHelp",_TOOLTIP_REQUIRED:"tooltipRequired"},widget:function(){return this.uiLabel},refresh:function(){this._super(),this._refreshRequired(),this._refreshHelp(),this._addIdsToDom()},_InitOptions:function(e,t){this._super(e,t),this._isCustomElement=this._IsCustomElement(),this._checkRequiredOption()},_ComponentCreate:function(){this._super(),this._touchEatClickNamespace=this.eventNamespace+"TouchEatClick",this._touchEatContextMenuNamespace=this.eventNamespace+"TouchEatContextMenu",this._helpDefPopupNamespace=this.eventNamespace+"HelpDefPopup",this._bTouchSupported=e.DomUtils.isTouchSupported(),this._drawOnCreate()},_AfterCreate:function(){var e,t,n,o=this,a=this.options.for,s=this.options.showRequired;if(this.OuterWrapper&&(e=this.OuterWrapper.getAttribute("data-oj-input-id"),t=this.OuterWrapper.getAttribute("data-oj-set-id")),e?this.element[0].setAttribute("for",e):t&&(this._targetElement=document.getElementById(t),n=this._targetElement,this._needsHelpIcon()&&o._addHelpSpanIdOnTarget(o.helpSpanId,n),o.options.showRequired&&o._addRequiredDescribedByOnCustomFormElement(n)),a&&this._isCustomElement){var l=r.getContext(this.OuterWrapper).getBusyContext().addBusyState({description:"The oj-label id='"+this.OuterWrapper.id+"' is looking for its form component with id "+a});setTimeout(function(){if(o._targetElement=document.getElementById(a),o._targetElement){if(n=o._targetElement,o._needsHelpIcon()&&o._addHelpSpanIdOnTarget(o.helpSpanId,n),s&&o._addRequiredDescribedByOnCustomFormElement(n),!e)if(o._isElementCustomElement(n)){var t=o.OuterWrapper.id;o._addElementAttribute(n,t,"labelled-by")}else o.element[0].setAttribute("for",a)}else i.info("could not find an element with forOption "+a);l()},0)}else this._isCustomElement&&this.options.labelId&&(this._targetElement=this._getTargetElementFromLabelledAttr("aria-labelledby",this.options.labelId),(n=this._targetElement)&&this._needsHelpIcon()&&this._addHelpSpanIdOnTarget(this.helpSpanId,n))},_SaveAttributes:function(e){this._IsCustomElement()||(this._savedClasses=e.attr("class"))},_RestoreAttributes:function(){this._IsCustomElement()||(this._savedClasses?this.element.attr("class",this._savedClasses):this.element.removeAttr("class"))},_NotifyDetached:function(){this._superApply(arguments),this._handleCloseHelpDefPopup()},_NotifyHidden:function(){this._superApply(arguments),this._handleCloseHelpDefPopup()},_GetTranslationsSectionName:function(){return this._IsCustomElement(),"oj-ojLabel"},_WatchedAttributeChanged:function(e,t,n){switch(this._superApply(arguments),e){case"data-oj-input-id":this.element[0].setAttribute("for",n);break;case"data-oj-set-id":this._targetElement=document.getElementById(n);var i=this._targetElement,o=this._needsHelpIcon(),a=this.options.showRequired;if(o||a){var s=r.getContext(this.OuterWrapper).getBusyContext().addBusyState({description:"The oj-label is writing described-by on its target."}),l=this;setTimeout(function(){o&&l._addHelpSpanIdOnTarget(l.helpSpanId,i),l.options.showRequired&&l._addRequiredDescribedByOnCustomFormElement(i),s()},0)}}},_drawOnCreate:function(){var e,n=null;this.OuterWrapper?(this.uiLabel=t(this.OuterWrapper).append(this.element.wrap(this._createOjLabelGroupDom()).parent()),this.uiLabel.addClass("oj-label oj-component")):this.uiLabel=this.element.wrap(this._createRootDomElement()).closest(".oj-component"),this._addIdsToDom(),e=this.element[0].id,this.helpSpanId=e+"_helpIcon",this.requiredSpanId=e+"_requiredIcon",this._isCustomElement||this._moveLabelStyleClassesToRootDom(),this.options.showRequired&&this._createRequiredIconSpanDom(),this._needsHelpIcon()&&(n=this._createIconSpan(this.helpSpanId,!0),this._createHelp(n))},_addRequiredDescribedByOnCustomFormElement:function(e){e&&this._isElementCustomElementAriaRequiredUnsupported(e)&&this._addElementAttribute(e,this.requiredSpanId,"described-by")},_removeRequiredDescribedByOnCustomFormElement:function(e){e&&this._isElementCustomElementAriaRequiredUnsupported(e)&&this._removeElementAttribute(e,this.requiredSpanId,"described-by")},_addHelpSpanIdOnTarget:function(e,t){var n;n=this._getAriaAttributeForTarget(t),this._addElementAttribute(t,e,n)},_removeHelpSpanIdOnTarget:function(e,t){var n;n=this._getAriaAttributeForTarget(t),this._removeElementAttribute(t,e,n)},_getAriaAttributeForTarget:function(e){return this._isElementCustomElement(e)?"described-by":"group"===e.getAttribute("role")?"aria-labelledby":"aria-describedby"},_getTargetElementFromLabelledAttr:function(e,t){var n;return n="["+e+"~='"+t+"']",document.querySelector(n)},_isElementCustomElement:function(t){return e.Assert.assertDomElement(t),-1!==t.tagName.indexOf("-")},_isElementCustomElementAriaRequiredUnsupported:function(t){var n;e.Assert.assertDomElement(t);var i,r=["oj-radioset","oj-checkboxset"],o=r.length,a=!1;i=t.tagName.toLowerCase();for(var s=0;s<o&&!a;s++)n=r[s],0===i.indexOf(n)&&(a=!0);return a},_addElementAttribute:function(e,t,n){var i,r,o=e.getAttribute(n);-1===(r=o?o.split(/\s+/):[]).indexOf(t)&&r.push(t),i=r.join(" ").trim(),e.setAttribute(n,i)},_removeElementAttribute:function(e,t,n){var i,r,o,a=e.getAttribute(n);-1!==(r=(o=a?a.split(/\s+/):[]).indexOf(t))&&o.splice(r,1),(i=o.join(" ").trim())?e.setAttribute(n,i):e.setAttribute(n,"")},_createHelp:function(e){var n=this.options.help.definition,i=this.options.help.source,r=this._createHelpIconAnchorDomElement(n,i);t(e).prepend(r),this._attachHelpDefToIconAnchor(),this._focusable({element:r,applyHighlight:!0})},_createRequiredIconSpanDom:function(){this._createIconSpan(this.requiredSpanId,!1).appendChild(this._createRequiredIconDomElement())},_checkRequiredOption:function(){var e=this.options.showRequired;if("boolean"!=typeof e)throw new Error("Option 'showRequired' has invalid value set: "+e)},_addIdsToDom:function(){this._isCustomElement&&(this.OuterWrapper.id||t(this.OuterWrapper).uniqueId(),this._refreshLabelId()),null==this.element.attr("id")&&this.element.uniqueId()},_moveLabelStyleClassesToRootDom:function(){var e,t,n,i=this.element.attr("class");if(i){n=(e=i.split(/\s+/)).length;for(var r=0;r<n;r++)(t=e[r]).indexOf("-label")>0&&(this.uiLabel.addClass(t),this.element.removeClass(t))}},_createIconSpan:function(e,t){var n=document.createElement("span");return n.setAttribute("id",e),t?this.uiLabel.find(".oj-label-group").prepend(n):this.element.before(n),n},_createRootDomElement:function(){var e,t,n=this.options.rootAttributes,i="oj-label oj-component";return n&&(e=n.class),e&&(i=i+" "+e),(t=document.createElement("div")).className=i,t.appendChild(this._createOjLabelGroupDom()),t},_createOjLabelGroupDom:function(){var e;return(e=document.createElement("div")).className="oj-label-group",e},_createRequiredIconDomElement:function(){var e=this.getTranslatedString(this._BUNDLE_KEY._TOOLTIP_REQUIRED),t=document.createElement("span");return t.className="oj-label-required-icon oj-component-icon",t.setAttribute("role","img"),t.setAttribute("title",e),t.setAttribute("aria-label",e),t},_createHelpIconAnchorDomElement:function(t,n){var i;if((i=document.createElement("a")).setAttribute("tabindex","0"),i.setAttribute("target","_blank"),i.className="oj-label-help-icon-anchor oj-label-help-icon oj-component-icon oj-clickable-icon-nocontext",n)try{e.DomUtils.validateURL(n),i.setAttribute("href",n)}catch(e){throw new Error(e+". The source option ("+n+") is invalid.")}else i.setAttribute("role","img");return t?i.setAttribute("aria-label",t):i.setAttribute("aria-label",this.getTranslatedString(this._BUNDLE_KEY._TOOLTIP_HELP)),i},_attachHelpDefToIconAnchor:function(){var e,t,n,i=this;0!==(t=this.widget().find(".oj-label-help-icon-anchor")).length&&(this._bTouchSupported&&(this._eatClickOnHelpIconListener&&this.widget().off(this._touchEatClickNamespace),this._eatClickOnHelpIconListener=function(){return!1},t.on("contextmenu"+this._touchEatContextMenuNamespace,!1)),this._openPopupForHelpDefCallbackListener=function(r){null==e&&(e=i._createHelpDefPopupDiv(),n={my:"start bottom",at:"end top",collision:"flipcenter",of:t},e.ojPopup({position:n,modality:"modeless",animation:{open:null,close:null}})),i._handleOpenHelpDefPopup(r,e,t)},this._closePopupForHelpDefCallbackListener=function(){i._handleCloseHelpDefPopup()},this._addShowHelpDefinitionEventHandlers(t))},_createHelpDefPopupDiv:function(){var e,n,i,r,o=this.options.help.definition;return r=o||this.getTranslatedString(this._BUNDLE_KEY._TOOLTIP_HELP),this._helpDefPopupDivId?(i=t(document.getElementById(this._helpDefPopupDivId))).length&&i.find(".oj-help-popup-container").first().text(r):((n=document.createElement("div")).className="oj-help-popup",n.style.display="none",(i=t(n)).uniqueId(),this._helpDefPopupDivId=i.prop("id"),(e=document.createElement("div")).className="oj-help-popup-container",n.appendChild(e),t(e).text(r),document.getElementsByTagName("body")[0].appendChild(n)),i},_addShowHelpDefinitionEventHandlers:function(t){var i;t.on("focusin"+this._helpDefPopupNamespace+" mouseenter"+this._helpDefPopupNamespace,this._openPopupForHelpDefCallbackListener),t.on("mouseleave"+this._helpDefPopupNamespace,this._closePopupForHelpDefCallbackListener),this._bTouchSupported&&(this.options.help.source?(i={recognizers:[[n.Press,{time:e.DomUtils.PRESS_HOLD_THRESHOLD}]]},t.ojHammer(i),this._on(t,{press:this._openPopupForHelpDefCallbackListener})):(i={recognizers:[[n.Tap],[n.Press,{time:e.DomUtils.PRESS_HOLD_THRESHOLD}]]},t.ojHammer(i),this._on(t,{press:this._openPopupForHelpDefCallbackListener,tap:this._openPopupForHelpDefCallbackListener})))},_handleOpenHelpDefPopup:function(t,n,i){if(!n.ojPopup("isOpen"))if(this._bTouchSupported){if("press"===t.type){var r=this.widget();r.on("click"+this._touchEatClickNamespace,this._eatClickOnHelpIconListener);var o=this;n.on("ojclose",function(){r.off(o._touchEatClickNamespace)})}else n.off("ojclose");"press"!==t.type&&"tap"!==t.type&&(e.DomUtils.recentTouchStart()||"focusin"!==t.type&&"mouseenter"!==t.type)||n.ojPopup("open",i)}else n.ojPopup("open",i)},_handleCloseHelpDefPopup:function(){null!=this._helpDefPopupDivId&&t(document.getElementById(this._helpDefPopupDivId)).ojPopup("close")},_removeHelpDefIconEventListeners:function(e){this._bTouchSupported&&(this.widget().off(this._touchEatClickNamespace),e.off(this._touchEatContextMenuNamespace),this._eatClickOnHelpIconListener=null,this._eatContextMenuOnHelpIconListener=null,e.ojHammer("destroy")),e.off(this._helpDefPopupNamespace),this._openPopupForHelpDefCallbackListener=null,this._closePopupForHelpDefCallbackListener=null},_removeHelpDefPopup:function(){var e;null!=this._helpDefPopupDivId&&((e=t(document.getElementById(this._helpDefPopupDivId)))&&(e.ojPopup("destroy"),e.remove()),this._helpDefPopupDivId=null)},_needsHelpIcon:function(){var e,t,n=this.options,i=n.help.source;return(t=""!==i&&null!=i)||(t=""!==(e=n.help.definition)&&null!=e),t},_refreshHelp:function(){var e,t,n=this.helpSpanId,i=this._targetElement;1===(t=this.uiLabel.find(".oj-label-help-icon")).length&&(this._removeHelpDefIconEventListeners(t),this._removeHelpDefPopup(),t.remove()),e=document.getElementById(n),this._needsHelpIcon()?(null==e&&(e=this._createIconSpan(n,!0)),this._createHelp(e),this._isCustomElement&&this._addHelpSpanIdOnTarget(n,i)):null!==e&&(e.parentNode.removeChild(e),this._isCustomElement&&this._removeHelpSpanIdOnTarget(n,i))},_refreshRequired:function(){var e,t,n=this.requiredSpanId;e=document.getElementById(n),this.options.showRequired?e?(t=this.getTranslatedString(this._BUNDLE_KEY._TOOLTIP_REQUIRED),this.uiLabel.find(".oj-label-required-icon").attr("title",t)):(this._createRequiredIconSpanDom(),this._isCustomElement&&this._addRequiredDescribedByOnCustomFormElement(this._targetElement)):(null!==(e=document.getElementById(n))&&e.parentNode.removeChild(e),this._isCustomElement&&this._removeRequiredDescribedByOnCustomFormElement(this._targetElement))},_refreshFor:function(e,t){var n=this.element[0],i=this.OuterWrapper.id;if(e){n.removeAttribute("for"),this.OuterWrapper.removeAttribute("data-oj-input-id");var r=document.getElementById(e);if(r){var o=r.getAttribute("labelled-by");if(o)if(o===i)r.removeAttribute("labelled-by");else{var a=o.split(/\s+/).filter(function(e){return e!==i}).join(" ");r.setAttribute("labelled-by",a)}}}if(this._targetElement=document.getElementById(this.options.for),this._targetElement){var s=this._targetElement;this._isElementCustomElement(s)?(this._addElementAttribute(s,i,"labelled-by"),this._needsHelpIcon()&&this._addHelpSpanIdOnTarget(this.helpSpanId,s),this.options.showRequired&&this._addRequiredDescribedByOnCustomFormElement(s)):n.setAttribute("for",t)}},_refreshLabelId:function(){var e,t;(e=this.options.labelId)?this.element.attr("id",e):(t=this.uiLabel.attr("id"))&&this.element.attr("id",t+"|label")},_setOption:function(e,t){var n=this.options[e];switch(this._superApply(arguments),e){case"showRequired":this._refreshRequired();break;case"help":this._refreshHelp();break;case"for":this._isCustomElement&&this._refreshFor(n,t);break;case"labelId":this._refreshLabelId()}},getNodeBySubId:function(e){var t;return(t=this._super(e))||"oj-label-help-icon"===e.subId&&(t=this.widget().find(".oj-label-help-icon")[0]),t||null},getSubIdByNode:function(e){var t=null;return null!=e&&e===this.widget().find(".oj-label-help-icon")[0]&&(t={subId:"oj-label-help-icon"}),t||this._superApply(arguments)},_destroy:function(){var t=this.uiLabel.find(".oj-label-help-icon");return this._removeHelpDefIconEventListeners(t),this._removeHelpDefPopup(),this.helpSpanId=null,this.requiredSpanId=null,this._isCustomElement=null,e.DomUtils.unwrap(this.element,this.uiLabel),this._super()}}),o.extension._WIDGET_NAME="ojLabel",o.extension._INNER_ELEM="label",o.extension._GLOBAL_TRANSFER_ATTRS=["accesskey"],o.extension._WATCHED_ATTRS=["data-oj-input-id","data-oj-set-id"],e.CustomElementBridge.register("oj-label",{metadata:o})}),define("ojs/ojlabelledbyutils",["ojs/ojcore","jquery","ojs/ojlabel"],function(e,t){"use strict";var n={CUSTOM_LABEL_ELEMENT_ID:"|label",_updateLabelledBy:function(e,t,i,r){var o,a,s,l,u=n.CUSTOM_LABEL_ELEMENT_ID;if(this._IsCustomElement())if(!t&&i)for(a=i.split(/\s+/),l=0;l<a.length;l++)o=a[l],n._addAriaLabelledBy(r,o+u),n._addSetIdOnLabel(o,e.id);else if(t&&!i)for(a=t.split(/\s+/),l=0;l<a.length;l++)o=a[l],n._removeAriaLabelledBy(r,o+u),n._removeDescribedByWithPrefix(e,o+"|");else if(t&&i){for(a=i.split(/\s+/),s=t.split(/\s+/),l=0;l<s.length;l++)o=s[l],-1===i.indexOf(o)&&(n._removeAriaLabelledBy(r,o+u),n._removeDescribedByWithPrefix(e,o+"|"));for(l=0;l<a.length;l++)o=a[l],-1===t.indexOf(o)&&(n._addAriaLabelledBy(r,o+u),n._addSetIdOnLabel(o,e.id))}},_addAriaLabelledBy:function(e,t){e.each(function(){var e,n=this.getAttribute("aria-labelledby");e=n?n.split(/\s+/):[],-1===e.indexOf(t)&&e.push(t),null==(n=e.join(" ").trim())?this.removeAttribute("aria-labelledBy"):this.setAttribute("aria-labelledBy",n)})},_addSetIdOnLabel:function(e,t){var n=document.getElementById(e);n&&!n.getAttribute("data-oj-set-id")&&n.setAttribute("data-oj-set-id",t)},_removeAriaLabelledBy:function(e,t){var n;e.each(function(){var e,i;-1!==(e=(i=(n=this.getAttribute("aria-labelledby"))?n.split(/\s+/):[]).indexOf(t))&&i.splice(e,1),(n=i.join(" ").trim())?this.setAttribute("aria-labelledby",n):this.removeAttribute("aria-labelledby")})},_removeDescribedByWithPrefix:function(e,t){var n;(n=((n=e.getAttribute("described-by"))?n.split(/\s+/):[]).filter(function(e){return-1===e.indexOf(t)}).join(" ").trim())?e.setAttribute("described-by",n):e.removeAttribute("described-by")},_updateDescribedBy:function(e,t){var n,i,r,o;if(this._IsCustomElement())if(!e&&t)for(i=t.split(/\s+/),o=0;o<i.length;o++)n=i[o],this._addAriaDescribedBy(n);else if(e&&!t)for(i=e.split(/\s+/),o=0;o<i.length;o++)n=i[o],this._removeAriaDescribedBy(n);else if(e&&t){for(i=t.split(/\s+/),r=e.split(/\s+/),o=0;o<r.length;o++)n=r[o],-1===t.indexOf(n)&&this._removeAriaDescribedBy(n);for(o=0;o<i.length;o++)n=i[o],-1===e.indexOf(n)&&this._addAriaDescribedBy(n)}},_addAriaDescribedBy:function(e){this._GetContentElement().each(function(){var t,n=this.getAttribute("aria-describedby");t=n?n.split(/\s+/):[],-1===t.indexOf(e)&&t.push(e),null==(n=t.join(" ").trim())?this.removeAttribute("aria-describedby"):this.setAttribute("aria-describedby",n)})},_removeAriaDescribedBy:function(e){this._GetContentElement().each(function(){var t,n,i;-1!==(n=(i=(t=this.getAttribute("aria-describedby"))?t.split(/\s+/):[]).indexOf(e))&&i.splice(n,1),(t=i.join(" ").trim())?this.setAttribute("aria-describedby",t):this.removeAttribute("aria-describedby")})}};return n}),define("ojs/ojeditablevalue",["ojs/ojcore","jquery","hammerjs","ojs/ojtranslation","ojs/ojcontext","ojs/ojthemeutils","ojs/ojcomponentcore","ojs/ojanimation","ojs/ojmessaging","ojs/ojvalidation-base","ojs/ojlogger","ojs/ojlabelledbyutils","ojs/ojjquery-hammer","promise","ojs/ojpopup","ojs/ojlabel"],function(e,t,n,i,r,o,a,s,l,u,c,p){"use strict";e.EditableValueUtils={},e.EditableValueUtils.validationContext={COMPONENT_CREATE:1,CONVERTER_OPTION_CHANGE:2,DISABLED_OPTION_CHANGE:3,READONLY_OPTION_CHANGE:4,REFRESH_METHOD:5,REQUIRED_OPTION_CHANGE:6,RESET_METHOD:7,USER_ACTION:8,VALIDATE_METHOD:9,VALIDATORS_OPTION_CHANGE:10,VALUE_OPTION_CHANGE:11},e.EditableValueUtils.validateMethodOptions={doValueChangeCheck:!1,validationContext:e.EditableValueUtils.validationContext.VALIDATE_METHOD},e.EditableValueUtils.converterOptionOptions={doValueChangeCheck:!1,doNotClearMessages:!0,validationContext:e.EditableValueUtils.validationContext.CONVERTER_OPTION_CHANGE},e.EditableValueUtils.disabledOptionOptions={doValueChangeCheck:!1,doNotClearMessages:!0,validationContext:e.EditableValueUtils.validationContext.DISABLED_OPTION_CHANGE},e.EditableValueUtils.requiredOptionOptions={doValueChangeCheck:!1,doNotClearMessages:!0,validationContext:e.EditableValueUtils.validationContext.REQUIRED_OPTION_CHANGE},e.EditableValueUtils.readOnlyOptionOptions={doValueChangeCheck:!1,doNotClearMessages:!0,validationContext:e.EditableValueUtils.validationContext.READONLY_OPTION_CHANGE},e.EditableValueUtils.refreshMethodOptions={doValueChangeCheck:!1,doNotClearMessages:!0,validationContext:e.EditableValueUtils.validationContext.REFRESH_METHOD},e.EditableValueUtils.validatorsOptionOptions={doValueChangeCheck:!1,doNotClearMessages:!0,validationContext:e.EditableValueUtils.validationContext.VALIDATORS_OPTION_CHANGE},e.EditableValueUtils.VALIDATE_VALUES={VALID:"valid",INVALID:"invalid"},e.EditableValueUtils.getAttributeValue=function(e,t){var n,i={};if(e&&t){var r=e[0];switch(t){case"disabled":n=r.hasAttribute("disabled")?!!r.disabled:void 0;break;case"pattern":n=r.pattern||void 0;break;case"placeholder":n=r.placeholder||void 0;break;case"readonly":n=r.hasAttribute("readonly")?!!r.readOnly:void 0;break;case"required":if(r.hasAttribute("required")){var o=r.required;n=void 0===o||!!o}else n=void 0;break;case"title":n=r.hasAttribute("title")?r.title:void 0;break;case"value":n=e.val()||void 0;break;case"min":case"max":default:n=r.getAttribute(t)||void 0}}return void 0!==n?(i.fromDom=!0,i.value=n):i.fromDom=!1,i},e.EditableValueUtils.initializeOptionsFromDom=function(t,n,i,r){for(var o={},a=0;a<t.length;a++){var s,l,u=t[a],c=u.attribute,p=u.option||c,d=u.coerceDomValue,h=u.validateOption,m=i.element,g=i.options[p];void 0===n[p]&&(g=i.options[p],(l=e.EditableValueUtils.getAttributeValue(m,c)).fromDom&&(s=l.value,d&&("boolean"==typeof d?s=e.EditableValueUtils.coerceDomValueForOption(p,s):"function"==typeof d&&(s=d.call(i,s))),o[p]=s));var f=p in o?o[p]:g;h&&"boolean"==typeof h&&e.EditableValueUtils.validateValueForOption(p,f)}null!=r&&r(o),i.option(o,{_context:{writeback:!0,internalSet:!0}})},e.EditableValueUtils.validateValueForOption=function(e,t){var n=!1;switch(e){case"required":null!==t&&"boolean"!=typeof t&&(n=!0);
- break;case"readOnly":case"disabled":null!==t&&"boolean"!=typeof t&&(n=!0)}if(n)throw new Error("Option '"+e+"' has invalid value set: "+t)},e.EditableValueUtils.coerceDomValueForOption=function(e,t){var n=t;switch(e){case"required":n=!!t}return n},e.EditableValueUtils.setPickerAttributes=function(e,t){if(e&&t){var n=t.class;if(n)for(var i=n.split(" "),r=0,o=i.length;r<o;++r)e[0].classList.add(i[r]);var a=t.style;if(a){var s=e[0],l=s.getAttribute("style");l?s.setAttribute("style",l+";"+a):s.setAttribute("style",a)}}},e.EditableValueUtils.hasNoLabelFlag=function(e){return e[0].hasAttribute("data-oj-no-labelledby")},e.EditableValueUtils._getOjLabelAriaLabelledBy=function(t,n){var i,r=e.EditableValueUtils._getCustomOjLabelElements(t);if(r){i="";for(var o=0;o<r.length;o++){var a=r[o],s=a.getAttribute("label-id");if(!s){var l=a.querySelector("label");l?s=l.getAttribute("id"):(a.setAttribute("label-id",n),s=n)}i+=s,o+1<r.length&&(i+=" ")}}return i},e.EditableValueUtils._getCustomOjLabelElements=function(e){var t=[];if(e)for(var n=e.split(/\s+/),i=0;i<n.length;i++){var r=n[i],o=document.getElementById(r);o?t.push(o):c.info("Cannot find oj-label with id "+o)}return t},e.EditableValueUtils._setInputId=function(t,n,i){if(n){e.EditableValueUtils.setSubIdForCustomLabelFor(t,n);var r=e.EditableValueUtils._getCustomOjLabelElements(i);if(r)for(var o=t.id,a=0;a<r.length;a++)r[a].setAttribute("data-oj-input-id",o)}},e.EditableValueUtils._labelledByChangedForInputComp=function(t,n){var i=e.EditableValueUtils._getCustomOjLabelElements(t);if(i)for(var r=0;r<i.length;r++)i[r].setAttribute("data-oj-input-id",n),this._IsRequired()&&this.options.translations.required&&(this._implicitReqValidator=null,this._getImplicitRequiredValidator())},e.EditableValueUtils.validate=function(){var e;if(e=this._SetValue(this._GetDisplayValue(),null,this._VALIDATE_METHOD_OPTIONS),this._IsCustomElement()){if(e instanceof Promise)return e.then(function(e){return Promise.resolve(e?"valid":"invalid")});e=Promise.resolve(e?"valid":"invalid")}return e},e.EditableValueUtils.setSubIdForCustomLabelFor=function(e,t){e.setAttribute("id",t+"|input")},e.EditableValueUtils._refreshRequired=function(e){var t,n,i,r=this._AriaRequiredUnsupported();this._refreshTheming("required",e),r||(n=this._GetContentElement(),(i=e)&&n?n[0].setAttribute("aria-required",i):n[0].removeAttribute("aria-required")),this._IsCustomElement()||(this.$label||this._createOjLabel(),this.$label&&(this.$label.ojLabel("option","showRequired",e),r&&(t=this._getAriaLabelledById(this.element))&&(e?this._addAriaDescribedBy(t+"_requiredIcon"):this._removeAriaDescribedBy(t+"_requiredIcon"))))},e.EditableValueUtils._AfterSetOptionRequired=function(t){this._refreshRequired(this._IsRequired()),this._runMixedValidationAfterSetOption(e.EditableValueUtils.requiredOptionOptions)},e.EditableValueUtils._AfterSetOptionValidators=function(){var t;this._ResetAllValidators(),this._hasInvalidMessagesShowing()&&(this._clearComponentMessages(),t=this._GetDisplayValue(),this._SetValue(t,null,e.EditableValueUtils.validatorsOptionOptions))},e.EditableValueUtils._AfterSetOptionAsyncValidators=function(){this._AfterSetOptionValidators()},e.EditableValueUtils._AfterSetOptionConverter=function(){this._converter=null,this._converterChangedCounter+=1;var e=this._GetConverter();if(e instanceof Promise){var t=this;this._setBusyStateAsyncConverterLoading();var n=this._converterChangedCounter;this._loadingConverter(e).then(function(){n===t._converterChangedCounter&&t._ResetConverter(),t._clearBusyStateAsyncConverterLoading()})}else this._ResetConverter()},e.EditableValueUtils._AfterCreateConverterCached=function(){this._HasPlaceholderSet()&&(this._SetPlaceholder(this.options.placeholder),this._customPlaceholderSet=!0),this._initComponentMessaging(this._MESSAGING_CONTENT_UPDATE_TYPE.ALL),this._Refresh("value",this.options.value,!1),this.options.messagesShown.length>0&&this._setMessagesOption("messagesShown",this.options.messagesShown,null,!0)},e.EditableValueUtils._ResetConverter=function(){var t;this._getComponentMessaging().update(this._getMessagingContent(this._MESSAGING_CONTENT_UPDATE_TYPE.CONVERTER_HINT)),this._hasInvalidMessagesShowing()?(this._clearComponentMessages(),t=this._GetDisplayValue(),this._SetValue(t,null,e.EditableValueUtils.converterOptionOptions)):this._Refresh("converter",this.options.converter,!0)},e.EditableValueUtils._GetNormalizedValidatorsFromOption=function(){var t,n,i,r,o,a,s=!0,l=[];if(i=this.options.validators)for(t=0;t<i.length;t++)"object"==typeof(n=i[t])?(n.validate&&"function"==typeof n.validate||(s=!1),s||(a=n.type)&&"string"==typeof a&&((o=u.Validation.validatorFactory(a))?((r=e.CollectionUtils.copyInto({},n.options)||{}).converter=r.converter||this._GetConverter(),r.label=r.label||this._getLabelText(),n=o.createValidator(r)):c.error("Unable to locate a validatorFactory for the requested type: "+a)),l.push(n)):c.error("Unable to parse the validator provided:"+n);return l},e.EditableValueUtils._GetNormalizedAsyncValidatorsFromOption=function(){var e,t,n,i=[];for(n=this.options.asyncValidators,e=0;e<n.length;e++)"object"==typeof(t=n[e])?t.validate&&"function"==typeof t.validate&&i.push(t):c.error("Unable to parse the validator provided:"+t);return i},e.EditableValueUtils._GetConverter=function(){var e,t,n,i=this;if(!this._converter){if((e=this.options.converter)instanceof Promise?n=e:(t=u.IntlConverterUtils.getConverterInstance(e))instanceof Promise&&(n=t),n)return n.then(function(e){return i._converter=e,i._converter||null});this._converter=t}return this._converter||null},e.EditableValueUtils._SetBusyState=function(e){void 0===this._resolveBusyStateAsyncMap&&(this._resolveBusyStateAsyncMap=new Map);var t=this._resolveBusyStateAsyncMap.get(e);if(!t){var n=this.element[0],i=r.getContext(n).getBusyContext(),o="The page is waiting for async validators for displayValue "+e;n&&n.id&&(o+=' for "'+n.id+'" '),o+="to finish.",t=i.addBusyState({description:o}),this._resolveBusyStateAsyncMap.set(e,t)}},e.EditableValueUtils._ClearBusyState=function(e){var t;void 0!==this._resolveBusyStateAsyncMap&&(t=this._resolveBusyStateAsyncMap.get(e))&&(t(),this._resolveBusyStateAsyncMap.delete(e))},e.EditableValueUtils._SetBusyStateAsyncValidatorHint=function(e){void 0===this._resolveBusyStateAsyncValidatorHintMap&&(this._resolveBusyStateAsyncValidatorHintMap=new Map);var t=this._resolveBusyStateAsyncValidatorHintMap.get(e);if(!t){var n=this.element[0],i=r.getContext(n).getBusyContext(),o="The page is waiting for async validator hint for counter "+e;n&&n.id&&(o+=' for "'+n.id+'" '),o+="to finish.",t=i.addBusyState({description:o}),this._resolveBusyStateAsyncValidatorHintMap.set(e,t)}},e.EditableValueUtils._ClearBusyStateAsyncValidatorHint=function(e){var t;void 0!==this._resolveBusyStateAsyncValidatorHintMap&&(t=this._resolveBusyStateAsyncValidatorHintMap.get(e))&&(t(),this._resolveBusyStateAsyncValidatorHintMap.delete(e))},e.EditableValueUtils._SetBusyStateAsyncConverterLoading=function(){if(!this._resolveBusyStateAsyncConverterLoading){var e=this.element[0],t=r.getContext(e).getBusyContext(),n="The page is waiting for async converter loading ";e&&e.id&&(n+='for "'+e.id+'" '),n+="to finish.",this._resolveBusyStateAsyncConverterLoading=t.addBusyState({description:n})}},e.EditableValueUtils._ClearBusyStateAsyncConverterLoading=function(){void 0!==this._resolveBusyStateAsyncConverterLoading&&(this._resolveBusyStateAsyncConverterLoading(),delete this._resolveBusyStateAsyncConverterLoading)},e.EditableValueUtils._getShowLoadingDelay=function(){null==this._defaultOptions&&(this._defaultOptions=o.parseJSONFromFontFamily("oj-form-control-option-defaults"));var e=parseInt(this._defaultOptions.showIndicatorDelay,10);return isNaN(e)?0:e},e.EditableValueUtils._SetInputType=function(t){var n="text",i=e.AgentUtils.getAgentInfo();if(i.os===e.AgentUtils.OS.ANDROID||i.os===e.AgentUtils.OS.IOS||i.os===e.AgentUtils.OS.WINDOWSPHONE)if(t.indexOf(this.options.virtualKeyboard)>=0)n=this.options.virtualKeyboard;else{var r=this._GetConverter();if(r&&r.resolvedOptions){var o=r.resolvedOptions();t.indexOf(o.virtualKeyboardHint)>=0&&(n=o.virtualKeyboardHint)}}null==n?this.element[0].removeAttribute("type"):this.element[0].setAttribute("type",n)};var d="invalidShown";e.__registerWidget("oj.editableValue",t.oj.baseComponent,{widgetEventPrefix:"oj",options:{describedBy:null,disabled:!1,displayOptions:{},help:void 0,helpHints:{definition:"",source:""},labelHint:"",messagesCustom:[],messagesHidden:void 0,messagesShown:void 0,title:"",valid:void 0,value:void 0,animateStart:null,animateEnd:null},getNodeBySubId:function(e){var t;if(!(t=this._super(e))&&!this._IsCustomElement()&&"oj-label-help-icon"===e.subId){var n=this._GetLabelElement();n&&(t=n.parent().find(".oj-label-help-icon"))}return t||null},getSubIdByNode:function(e){var n,i,r,o=null;return null!=e&&null!=(n=t(e).closest("a.oj-label-help-icon"))&&null!=(i=n.closest(".oj-label"))&&(r=i.find("label")[0])&&r===this._GetLabelElement()[0]&&(o={subId:"oj-label-help-icon"}),o},isValid:function(){return void 0===this._valid&&(this._valid=!this._hasInvalidMessages()),this._valid},refresh:function(){this._super(),this._doRefresh()},reset:function(){this._clearAllMessages(),this._runDeferredValidation(this._VALIDATION_CONTEXT.RESET_METHOD),this._refreshComponentDisplayValue(this.options.value,!0)},showMessages:function(){var t,n,i,r=[],o=this.options.messagesHidden,a=o.length>0;for(t=0;t<o.length;t++)(n=o[t])instanceof e.ComponentMessage?(n._forceDisplayToShown(),i=n.clone()):i=new l(n.summary,n.detail,n.severity),r.push(i);a&&(this._clearMessages("messagesHidden"),this._updateMessagesOption("messagesShown",r),this._setValidOption(d,null))},_VALIDATION_MODE:{FULL:1,VALIDATORS_ONLY:2,REQUIRED_VALIDATOR_ONLY:3},_VALIDATION_CONTEXT:e.EditableValueUtils.validationContext,_VALIDATE_METHOD_OPTIONS:e.EditableValueUtils.validateMethodOptions,_InitOptions:function(e,t){this._super(e,t)},_ComponentCreate:function(){var e=this.element,t=this._GetSavedAttributes(e);if(this._super(),this.options.messagesCustom=this.options.messagesCustom||[],this.options.messagesHidden=[],this.options.messagesShown=this.options.messagesCustom.length>0?this._cloneMessagesBeforeSet(this.options.messagesCustom):[],this._SetDisabledDom(e),t&&!this._IsCustomElement()){var n=e[0].tagName.toLowerCase();"input"!==n&&"textarea"!==n||["required","title","pattern"].forEach(function(n){n in t&&e.removeAttr(n)})}},_AfterCreate:function(){var t,n,i=this;if(this._super(),this._refreshTheming("disabled",this.options.disabled),this.widget()[0].classList.add("oj-form-control"),this.widget().uniqueId(),this._IsCustomElement()){if(this.options.labelledBy){var r=e.EditableValueUtils._getCustomOjLabelElements(this.options.labelledBy);if(r)for(n=0;n<r.length;n++)r[n].classList.add(this._GetDefaultStyleClass()+"-label")}}else this._createOjLabel();if(t=this.options.describedBy){var o=t.split(/\s+/);for(n=0;n<o.length;n++)this._addAriaDescribedBy(o[n])}this._runDeferredValidation(this._VALIDATION_CONTEXT.COMPONENT_CREATE);var a=this._GetConverter();a instanceof Promise?(this._setBusyStateAsyncConverterLoading(),this._converterChangedCounter=0,this._loadingConverter(a).then(function(){i._AfterCreateConverterCached(),i._clearBusyStateAsyncConverterLoading()})):(this._AfterCreateConverterCached(),this._setValidOption(this._determineValidFromMessagesOptions(),null))},_SaveAttributes:function(e){this._IsCustomElement()||this._SaveAllAttributes(e)},_RestoreAttributes:function(e){this._IsCustomElement()||this._RestoreAllAttributes(e)},_AfterSetOption:function(t,n){switch(t){case"disabled":this._AfterSetOptionDisabledReadOnly(t,e.EditableValueUtils.disabledOptionOptions);break;case"displayOptions":this._initComponentMessaging();break;case"help":this._IsCustomElement()?this._getComponentMessaging().update(this._getMessagingContent(this._MESSAGING_CONTENT_UPDATE_TYPE.TITLE)):this._Refresh(t,this.options[t]);break;case"messagesCustom":this._messagesCustomOptionChanged(n),this._setValidOption(this._determineValidFromMessagesOptions(),null);break;case"placeholder":this._placeholderOptionChanged(n);break;case"title":this._IsCustomElement()||this._getComponentMessaging().update(this._getMessagingContent(this._MESSAGING_CONTENT_UPDATE_TYPE.TITLE));break;case"translations":this.refresh();break;case"value":this._AfterSetOptionValue(t,n)}},_AfterSetOptionDisabledReadOnly:function(e,t){var n=!this.options[e];this._Refresh(e,this.options[e]),n&&this._runMixedValidationAfterSetOption(t)},_AfterSetOptionValue:function(e,t){var n,i=t?t._context:null,r=!1;i&&(r=!!i.originalEvent,n=i.doNotClearMessages||!1),r||(n||this._clearAllMessages(null),this._runDeferredValidation(this._VALIDATION_CONTEXT.VALUE_OPTION_CHANGE)),this._Refresh(e,this.options[e],!0)},_CanSetValue:function(){return!this.options.disabled},_destroy:function(){var e,n,i=this._super();if(this._clearAllMessages(null,!0),this._getComponentMessaging().deactivate(),this.widget().removeUniqueId(),this.$label)for(n=this.$label.length,e=0;e<n;e++)this.$label[e]&&null!=a.__GetWidgetConstructor(this.$label[e])&&t(this.$label[e]).ojLabel("destroy");return i},GetFocusElement:function(){return this._GetContentElement()[0]},_setOption:function(t,n,i){var r,o,a,s,l=!1;switch(t){case"messagesHidden":case"messagesShown":case"rawValue":l=!0;break;case"describedBy":o=this.options.describedBy,a=n,this._updateDescribedBy(o,a);break;case"labelledBy":if(n){var u=e.EditableValueUtils._getCustomOjLabelElements(n);if(u)for(s=0;s<u.length;s++)u[s].classList.add(this._GetDefaultStyleClass()+"-label")}}return l?(c.error(t+" option cannot be set"),this):(r=this._superApply(arguments),this._AfterSetOption(t,i),r)},_GetContentElement:function(){return this.element},_GetLabelElement:function(){var n;if(this.$label)return this.$label;if(e.EditableValueUtils.hasNoLabelFlag(this.widget()))return null;var i=this._getAriaLabelledByElement(this.element);if(null!==i&&0!==i.length)return i;var r=this.element[0].id;return void 0!==r&&0!==(i=t("label[for='"+r+"']")).length?i:0!==(n=this.element.closest("[aria-labelledby]")).length&&null!==(i=this._getAriaLabelledByElement(n))&&0!==i.length?i:null},_GetElementValue:function(){return this.element.val()},_GetMessagingLauncherElement:function(){return this._GetContentElement()},_GetConverter:function(){return null},_GetImplicitSyncValidators:function(){return this._implicitSyncValidators||(this._implicitSyncValidators={}),this._implicitSyncValidators},_GetImplicitAsyncValidators:function(){return this._implicitAsyncValidators||(this._implicitAsyncValidators={}),this._implicitAsyncValidators},_GetDisplayValue:function(e){return this._GetContentElement().val()},_GetNormalizedValidatorsFromOption:function(){return[]},_GetNormalizedAsyncValidatorsFromOption:function(){return[]},_GetAllSyncValidators:function(){var e,t,n,i,r;if(!this._allValidators){e=[],n=this._GetImplicitSyncValidators(),i=[];var o,a=Object.keys(n),s=a.length;if(s>0){for(t=0;t<s;t++)o=a[t],i.push(n[o]);e=e.concat(i)}(r=this._GetNormalizedValidatorsFromOption()).length>0&&(e=e.concat(r)),this._allValidators=e}return this._allValidators||[]},_ResetAllValidators:function(){this._allValidators&&(this._allValidators.length=0),this._allValidators=null,this._allAsyncValidators&&(this._allAsyncValidators.length=0),this._allAsyncValidators=null,this._IsCustomElement()?this._updateValidatorMessagingHint():this._getComponentMessaging().update(this._getMessagingContent(this._MESSAGING_CONTENT_UPDATE_TYPE.VALIDATOR_HINTS))},_getAllAsyncValidators:function(){var e,t,n,i,r;if(!this._allAsyncValidators){e=[],t=this._GetImplicitAsyncValidators(),n=[];var o,a=Object.keys(t),s=a.length;if(s>0){for(i=0;i<s;i++)o=a[i],n.push(t[o]);e=e.concat(n)}(r=this._GetNormalizedAsyncValidatorsFromOption()).length>0&&(e=e.concat(r)),this._allAsyncValidators=e}return this._allAsyncValidators||[]},_getAllAsyncValidatorsWithHint:function(){var e,t,n=this._getAllAsyncValidators(),i=[];if(n.length>0)for(e=0;e<n.length;e++)"hint"in(t=n[e])&&i.push(t);return i},_initAsyncValidatorMessagingHint:function(){var e,t,n=this._getAllAsyncValidatorsWithHint(),i=this;this._asyncValidatorHintCounter=0,n.length>0&&(t=i._getMessagingContent(i._MESSAGING_CONTENT_UPDATE_TYPE.VALIDATOR_HINTS),e=this._asyncValidatorHintCounter,this._setBusyStateAsyncValidatorHint(e),this._addAsyncValidatorsHintsMessagingContent(n,t).then(function(){i._clearBusyStateAsyncValidatorHint(e)}))},_updateValidatorMessagingHint:function(){var e,t=this._getAllAsyncValidatorsWithHint(),n=this._getComponentMessaging(),i=this,r=this._getMessagingContent(this._MESSAGING_CONTENT_UPDATE_TYPE.VALIDATOR_HINTS);t.length>0?(this._asyncValidatorHintCounter+=1,e=this._asyncValidatorHintCounter,this._setBusyStateAsyncValidatorHint(e),this._addAsyncValidatorsHintsMessagingContent(t,r).then(function(){i._clearBusyStateAsyncValidatorHint(e)})):n.update(r)},_addAsyncValidatorsHintsMessagingContent:function(e,t){function n(e){return e.then(function(e){var n,i={};return s._asyncValidatorHintCounter===r?(null!==e&&(a.push(e),i.validatorHint=t.validatorHint.concat(a),o.update(i)),n="resolved"):n="ignore",{v:e,status:n}},function(e){return{e:e,status:"rejected"}})}var i,r=this._asyncValidatorHintCounter,o=this._getComponentMessaging(),a=[],s=this,l=[];for(i=0;i<e.length;i++)l.push(e[i].hint);return new Promise(function(e){Promise.all(l.map(n)).then(function(){e(a)})})},_IsRequired:function(){return!1},_HandleChangeEvent:function(e){var t=this._GetDisplayValue();this._SetValue(t,e)},_SetRawValue:function(e,t){var n={};n._context={originalEvent:t,writeback:!0,internalSet:!0,readOnly:!0},this._CompareOptionValues("rawValue",this.options.rawValue,e)||this.option("rawValue",e,n)},_Refresh:function(e,t,n){var i,r;switch(e){case"converter":var o=this.options.value;this._refreshComponentDisplayValue(o,n);break;case"disabled":this._refreshTheming("disabled",this.options.disabled);break;case"help":this._IsCustomElement()||this.$label&&(i=this.options.help.definition,r=this.options.help.source,this.$label.ojLabel("option","help",{definition:i,source:r}),this._refreshDescribedByForLabel());break;case"value":this._refreshComponentDisplayValue(t,n)}},_NotifyHidden:function(){this._superApply(arguments),this._getComponentMessaging().close()},_NotifyDetached:function(){this._superApply(arguments),this._getComponentMessaging().close()},_ResetComponentState:function(){this.$label&&this.$label.ojLabel("refresh"),this._implicitReqValidator=null,this._converter=null,this._ResetAllValidators()},_SetDisplayValue:function(e){var t=this._GetContentElement();t.val()!==e&&t.val(e)},_SetDisabledDom:function(e){"boolean"==typeof this.options.disabled&&(e[0].disabled=this.options.disabled)},_SetPlaceholder:function(e){var t=this._GetContentElement()[0];t&&(null==e?t.removeAttribute("placeholder"):t.setAttribute("placeholder",e))},_SetPlaceholderOption:function(e){this.options.placeholder=e},_HasPlaceholderSet:function(){return this.options.placeholder},_ClearPlaceholder:function(){this._SetPlaceholderOption(""),this._SetPlaceholder("")},_SetValue:function(e,t,n){var i,r,o,a=!n||"boolean"!=typeof n.doValueChangeCheck||n.doValueChangeCheck,s=this,l=!1;return void 0===e?(c.warn("Attempt to set a value of undefined"),!1):(a&&e===s._getLastDisplayValue()?c.level>c.LEVEL_WARN&&c.info((e.toString,e.toString())):(i=e+"_"+(this._asyncValidatorValidateCounter+1),(r=this._AsyncValidate(e,t,n,i))instanceof Promise?l=r.then(function(e){return o=e,s._afterAsyncValidateUpdateValue(e,t,n)}).then(function(){return s._clearBusyState(i),void 0!==o}):(this._afterAsyncValidateUpdateValue(r,t,n),l=void 0!==r)),l)},_ParseValueShowErrors:function(e,t){var n;this._clearAllMessages(t);try{return this._parseValue(e,t)}catch(e){n=this._processValidationErrors(e),this._updateMessagesOption("messagesShown",n,t),this._setValidOption(d,t)}},_AsyncValidate:function(e,t,n,i){var r,o,a,s=n&&n.validationMode?n.validationMode:this._VALIDATION_MODE.FULL,l=n&&n.validationContext?n.validationContext:this._VALIDATION_CONTEXT.USER_ACTION,u=n&&n.doNotClearMessages||!1;if(void 0!==e){if(this._CanSetValue()){u||this._clearAllMessages(t);try{return this._asyncValidatorValidateCounter+=1,s===this._VALIDATION_MODE.FULL?(this._setLastDisplayValue(e),o=this._parseValue(e,t,!0)):o=e,(a=this._asyncValidateValue(o,t,l))instanceof Promise?(this._setBusyState(i),a.then(function(e){if("valid"===e)return o})):a}catch(e){r=this._processValidationErrors(e,l),this._updateMessagesOption("messagesShown",r,t),this._setValidOption(d,t)}}else c.level>c.LEVEL_WARN&&c.info("Validation skipped and value option not set as component state does not allow setting value. For example if the component is readonly or disabled.");return a}c.warn("Attempt to set a value of undefined")},_afterAsyncValidateUpdateValue:function(e,t,n){var i,r=!1;return void 0!==e&&(n&&!0===n.doNotClearMessages?this.isValid()||!this._hasInvalidComponentMessagesShowing():this.isValid())&&(n&&n._context&&(i=n._context),this._updateValueOption(e,t,n&&n.validationContext,i,n),r=!0),r},_CompareOptionValues:function(t,n,i){return"value"===t||"rawValue"===t?e.Object.compareValues(n,i):0===t.indexOf("messages")?this._messagesEquals(n,i):this._superApply(arguments)},_GetDefaultStyleClass:function(){return e.Assert.failedInAbstractFunction(),""},_MESSAGING_CONTENT_UPDATE_TYPE:{ALL:1,VALIDITY_STATE:2,CONVERTER_HINT:3,VALIDATOR_HINTS:4,TITLE:5},_OPTION_TO_CSS_MAPPING:{disabled:"oj-disabled",required:"oj-required"},_clearAllMessages:function(e,t){t?(this.options.messagesHidden=[],this.options.messagesShown=[],this.options.messagesCustom=[]):(this._clearMessages("messagesHidden",e),this._clearMessages("messagesShown",e),this._clearMessages("messagesCustom",e))},_clearComponentMessages:function(){var t,n=this.options.messagesShown;t=n.length,this._clearMessages("messagesHidden");for(var i=t-1;i>=0;i--)n[i]instanceof e.ComponentMessage&&n.splice(i,1);n.length!==t&&this._setMessagesOption("messagesShown",n,null,!0)},_setMessagesOption:function(e,t,n,i){var r={},o=0===t.length&&0===this.options[e].length;!i&&o||(r._context={originalEvent:n,writeback:!0,internalSet:!0},"messagesCustom"!==e&&(r._context.readOnly=!0),r.changed=i||!o,this._resetValid(),this.option(e,t,r),this._updateMessagingContent())},_setValidOption:function(e,t){var n={};"pending"===e&&"valid"!==this._determineValidFromMessagesOptions()||(n._context={originalEvent:t,writeback:!0,internalSet:!0,readOnly:!0},this.option("valid",e,n))},_clearMessages:function(e,t){this._setMessagesOption(e,[],t)},_cloneMessagesBeforeSet:function(e){var t,n,i,r=[];if(e&&e.length>0)for(t=0;t<e.length;t++)i=e[t],n=new l(i.summary,i.detail,i.severity),n=Object.freeze?Object.freeze(n):n,r.push(n);return r},_createOjLabel:function(){var e,t;this._IsCustomElement()||(this.$label=this._GetLabelElement(),this.$label&&(e=this.options.help.definition,t=this.options.help.source,this.$label.ojLabel({rootAttributes:{class:this._GetDefaultStyleClass()+"-label"},help:{definition:e,source:t}}),this._createDescribedByForLabel()))},_createDescribedByForLabel:function(){var e,t=this.options.help.definition;if(null!=this.options.help.source||null!=t){var n=this.$label[0];n&&(e=n.id),e&&this._addAriaDescribedBy(e+"_helpIcon")}},_refreshDescribedByForLabel:function(){var e,t=this.options.help.definition,n=this.options.help.source,i=this.$label[0];i&&(e=i.id),e&&(null!=n||null!=t?this._addAriaDescribedBy(e+"_helpIcon"):this._removeAriaDescribedBy(e+"_helpIcon"))},_doRefresh:function(){var t,n=!1;this._ResetComponentState(),this._initComponentMessaging(),this._Refresh("disabled",this.options.disabled),this._hasInvalidMessagesShowing()&&(n=!0),this._clearComponentMessages(),n?(t=this._GetDisplayValue(),this._SetValue(t,null,e.EditableValueUtils.refreshMethodOptions)):(this._IsRequired()&&this._runDeferredValidation(e.EditableValueUtils.refreshMethodOptions.validationContext),this._Refresh("value",this.options.value,!0))},_getLastModelValue:function(){return this._oj_lastModelValue},_getLastDisplayValue:function(){return void 0===this._oj_lastElementValue&&(this._oj_lastElementValue=""),this._oj_lastElementValue},_getAriaLabelledByElement:function(e){var n=e[0].getAttribute("aria-labelledby");return void 0!==n?t("label[id='"+n+"']"):null},_getAriaLabelledById:function(e){var t=null,n=this._getAriaLabelledByElement(e);return null!==n&&0!==n.length&&(t=n[0].getAttribute("id")),t},_getMessages:function(){return this.options.messagesShown.concat(this.options.messagesHidden)},_getLabelText:function(){if(this.$label)return this.$label[0].textContent;var t=e.EditableValueUtils._getCustomOjLabelElements(this.options.labelledBy),n=null;if(t)for(var i=0;i<t.length;i++)i>0&&(n+=" "),n=t[i].textContent;return n},_getValidityState:function(){return this._validityState?this._validityState:(this._validityState=new e.ComponentValidity(this.isValid(),this._getMessages()),this._validityState)},_hasInvalidMessages:function(){return!l.isValid(this._getMessages())},_hasInvalidMessagesShowing:function(){return!this.isValid()&&this.options.messagesShown.length>0},_hasInvalidComponentMessagesShowing:function(){for(var t,n,i=this.options.messagesShown,r=0;r<i.length;r++)(n=i[r])instanceof e.ComponentMessage&&n._isMessageAddedByComponent()&&(t=t||[]).push(n);return void 0!==t&&!l.isValid(t)},_initComponentMessaging:function(){var e=this._getComponentMessaging(),t=this._GetMessagingLauncherElement(),n=this._GetContentElement(),i=this._getMessagingContent(this._MESSAGING_CONTENT_UPDATE_TYPE.ALL);this._customPlaceholderSet||this._ClearPlaceholder(),e.activate(t,n,i),this._IsCustomElement()&&(this._initAsyncValidatorMessagingHint(),this._asyncValidatorValidateCounter=0)},_messagesCustomOptionChanged:function(t){var n,i,r=t?t._context:null,o=this.options.messagesCustom,a=this.options.messagesShown,s=[];for(n=0;n<a.length;n++)(i=a[n])instanceof e.ComponentMessage&&i._isMessageAddedByComponent()&&s.push(i);for(n=0;n<o.length;n++)s.push(o[n]);this._setMessagesOption("messagesShown",s,r?r.originalEvent:null,t&&t.changed)},_placeholderOptionChanged:function(e){var t=!(e&&e._context||{}).internalMessagingSet,n=this.options.placeholder;this._SetPlaceholder(n),t?(this._customPlaceholderSet=!0,this._GetConverter()&&this._initComponentMessaging()):this._customPlaceholderSet=!1},_setLastModelValue:function(e){this._oj_lastModelValue=e},_setLastDisplayValue:function(e){this._oj_lastElementValue=e},_updateMessagesOption:function(e,t,n){var i,r,o;if("object"==typeof t&&Array.isArray(t))for(o=this.options[e],r=t.length,i=0;i<r;i++)o.push(t[i]);this._setMessagesOption(e,o,n,!0)},_updateMessagingContent:function(){this._getComponentMessaging().update(this._getMessagingContent(this._MESSAGING_CONTENT_UPDATE_TYPE.VALIDITY_STATE))},_updateValueOption:function(e,t,n,i,r){var o,a,s=i||{};switch(t&&(s.originalEvent=t),n){case this._VALIDATION_CONTEXT.CONVERTER_OPTION_CHANGE:case this._VALIDATION_CONTEXT.DISABLED_OPTION_CHANGE:case this._VALIDATION_CONTEXT.READONLY_OPTION_CHANGE:case this._VALIDATION_CONTEXT.REFRESH_METHOD:case this._VALIDATION_CONTEXT.REQUIRED_OPTION_CHANGE:case this._VALIDATION_CONTEXT.VALIDATE_METHOD:case this._VALIDATION_CONTEXT.VALIDATORS_OPTION_CHANGE:s.writeback=!0,s.doNotClearMessages=!0}if(s.internalSet=!0,r&&r.targetOptions){o={},a=!1;for(var l=0;l<r.targetOptions.length;l++)o[r.targetOptions[l]]=e,a=a||"value"===r.targetOptions[l]}else o={value:e},a=!0;this.option(o,{_context:s}),a&&this._AfterSetOptionValue("value",{_context:s})},_resetValid:function(){this._valid=void 0},_determineValidFromMessagesOptions:function(){var e=this.options.messagesHidden,t=this.options.messagesShown,n="valid";return t&&0!==t.length&&!l.isValid(t)?n=d:e&&0!==e.length&&!l.isValid(e)&&(n="invalidHidden"),n},_formatValue:function(e){var t=e,n=this._GetConverter();return n&&"object"==typeof n&&(n.format&&"function"==typeof n.format?t=n.format(e):c.level>c.LEVEL_WARN&&c.info("converter does not support the format method.")),t},_getComponentMessaging:function(){return this._componentMessaging||(this._componentMessaging=new e.ComponentMessaging(this)),this._componentMessaging},_getHintsForAllValidators:function(e){var t,n,i=[],r="";for(this._IsRequired()&&(n=this._getImplicitRequiredValidator()).getHint&&"function"==typeof n.getHint&&(r=n.getHint())&&i.push(r),t=0;t<e.length;t++)r="","object"==typeof(n=e[t])&&n.getHint&&"function"==typeof n.getHint&&(r=n.getHint())&&i.push(r);return i},_getImplicitRequiredValidator:function(){var t,n,i={};return null==this._implicitReqValidator&&(n={hint:(i=this.options.translations&&this.options.translations.required||{}).hint||null,label:this._getLabelText(),messageSummary:i.messageSummary||null,messageDetail:i.messageDetail||null},t=u.Validation.validatorFactory(e.ValidatorFactory.VALIDATOR_TYPE_REQUIRED),this._implicitReqValidator=t?t.createValidator(n):null),this._implicitReqValidator},_getMessagingContent:function(e){var t,n,i,r={},o="",a=[];if((e=e||this._MESSAGING_CONTENT_UPDATE_TYPE.VALIDITY_STATE)!==this._MESSAGING_CONTENT_UPDATE_TYPE.ALL&&e!==this._MESSAGING_CONTENT_UPDATE_TYPE.VALIDITY_STATE||(i=this._getMessages(),this._getValidityState().update(this.isValid(),i),r.validityState=this._getValidityState()),e!==this._MESSAGING_CONTENT_UPDATE_TYPE.ALL&&e!==this._MESSAGING_CONTENT_UPDATE_TYPE.CONVERTER_HINT||((n=this._GetConverter())&&"object"==typeof n&&n.getHint&&"function"==typeof n.getHint&&(o=n.getHint()||""),r.converterHint=o),e!==this._MESSAGING_CONTENT_UPDATE_TYPE.ALL&&e!==this._MESSAGING_CONTENT_UPDATE_TYPE.VALIDATOR_HINTS||(t=this._GetAllSyncValidators(),a=this._getHintsForAllValidators(t)||[],r.validatorHint=a),e===this._MESSAGING_CONTENT_UPDATE_TYPE.ALL||e===this._MESSAGING_CONTENT_UPDATE_TYPE.TITLE){var s;if(this._IsCustomElement()){var l=this.options.help;null!=l&&(s=l.instruction)}else s=this.options.title;r.title=s||""}return r},_messagesEquals:function(e,n){var i,r=-1,o=!0,a=t.extend([],e),s=t.extend([],n);return a.length===s.length&&(a.forEach(function(e){e instanceof l?i=e:(i=new l(e.summary,e.detail,e.severity),i=Object.freeze?Object.freeze(i):i),r=-1,s.forEach(function(e,t){l.getSeverityLevel(i.severity)===l.getSeverityLevel(e.severity)&&i.summary===e.summary&&i.detail===e.detail&&(r=t)}),r>-1?s.splice(r,1):o=!1}),o)},_parseValue:function(e,t,n){var i=this._GetConverter(),r=e;if(i&&"object"==typeof i)if(i.parse&&"function"==typeof i.parse)try{n&&this._setValidOption("pending",t),r=i.parse(e)}catch(e){throw e}else c.level>c.LEVEL_WARN&&c.info("converter does not support the parse method.");return r},_addValidationError:function(t,n){var r,o,a,s;t instanceof e.ConverterError||t instanceof e.ValidatorError?(o=(a=t.getMessage()).severity||l.SEVERITY_LEVEL.ERROR,s=a.summary||i.getTranslatedString("oj-message.error"),r=a.detail||i.getTranslatedString("oj-converter.detail")):t.summary||t.detail?(o=l.SEVERITY_LEVEL.ERROR,s=t.summary||i.getTranslatedString("oj-message.error"),r=t.detail||i.getTranslatedString("oj-converter.detail")):(o=l.SEVERITY_LEVEL.ERROR,s=i.getTranslatedString("oj-message.error"),r=t.message||i.getTranslatedString("oj-converter.detail")),n.push({summary:s,detail:r,severity:o})},_processValidationErrors:function(t,n,i){var r,o=[],a=t._messages||[],s={};s.context=n||0,s.display=i||e.ComponentMessage.DISPLAY.SHOWN,0===a.length&&this._addValidationError(t,a);for(var l=0;l<a.length;l++)r=a[l],o.push(this._createComponentMessage(r.summary,r.detail,r.severity,s));return o||null},_createComponentMessage:function(t,n,i,r){var o;return o=new e.ComponentMessage(t,n,i,r),o=Object.seal?Object.seal(o):o},_refreshComponentDisplayValue:function(e,t){var n;return(t||e!==this._getLastModelValue())&&(n=this._UpdateElementDisplayValue(e)),n},_refreshTheming:function(e,t){-1!==Object.keys(this._OPTION_TO_CSS_MAPPING).indexOf(e)&&(t?this.widget()[0].classList.add(this._OPTION_TO_CSS_MAPPING[e]):this.widget()[0].classList.remove(this._OPTION_TO_CSS_MAPPING[e]));
- },_runDeferredValidation:function(e){this._CanSetValue()?this._validateValueForRequiredOnly(this.options.value,e):c.level>c.LEVEL_WARN&&c.info("Deferred validation skipped as component is readonly or disabled."),this._setValidOption(this._determineValidFromMessagesOptions(),null)},_runMixedValidationAfterSetOption:function(e){var t,n=!1;this._hasInvalidMessagesShowing()&&(n=!0),this._clearComponentMessages(),n&&(t=this._GetDisplayValue(),this._SetValue(t,null,e)),!n&&this._IsRequired()?this._runDeferredValidation(e.validationContext):this._setValidOption(this._determineValidFromMessagesOptions(),null)},_UpdateElementDisplayValue:function(e,t){var n,i;n=e;try{n=this._formatValue(e);try{this._setLastModelValue(e),this._afterConverterFormat(n)}catch(e){throw e}i=n}catch(r){t||this._afterConverterFormatFailure(r),this._setLastModelValue(e),this._afterConverterFormat(n),i=void 0}return i},_SetLoading:function(){var e=this.widget()[0],t=this.GetFocusElement();e.classList.add("oj-loading"),this._saveAriaLabel=t.getAttribute("aria-label");var n=i.getTranslatedString("oj-ojEditableValue.loading");t.setAttribute("aria-label",n)},_ClearLoading:function(){var e=this.widget()[0],t=this.GetFocusElement();e.classList.remove("oj-loading"),this._saveAriaLabel?t.setAttribute("aria-label",this._saveAriaLabel):t.removeAttribute("aria-label")},_afterConverterFormat:function(e){var t;this._SetDisplayValue(e),t=this._GetDisplayValue(),this._setLastDisplayValue(t),this._SetRawValue(t,null)},_afterConverterFormatFailure:function(e){var t;t=this._processValidationErrors(e),this._updateMessagesOption("messagesShown",t),this._setValidOption(d,null)},_loadingConverter:function(t){var n=this,i=e.EditableValueUtils._getShowLoadingDelay(),r=this._converterChangedCounter,o=setTimeout(function(){r===n._converterChangedCounter&&n._SetLoading()},i);return t.then(function(e){return n._ClearLoading(),clearTimeout(o),e})},_validateValueForRequiredOnly:function(t,n){var i,r;if(this._IsRequired()){r=this._getImplicitRequiredValidator();try{this._setValidOption("pending",null),r.validate(e.StringUtils.trim(t))}catch(t){(i=this._processValidationErrors(t,n,e.ComponentMessage.DISPLAY.HIDDEN))&&this._updateMessagesOption("messagesHidden",i)}}},_validateValue:function(t,n,i){var r,o,a,s,l=this._GetAllSyncValidators(),u=this._IsRequired(),p=!1,h=[];if((u||l.length>0)&&this._setValidOption("pending",n),u){a=this._getImplicitRequiredValidator();try{a.validate(e.StringUtils.trim(t))}catch(e){this._addValidationError(e,h),this._setValidOption(d,n),p=!0}}for(r=0;r<l.length;r++)if("object"==typeof(a=l[r]))if(a.validate&&"function"==typeof a.validate)try{a.validate(t)}catch(e){this._addValidationError(e,h),p||(this._setValidOption(d,n),p=!0)}else c.level>c.LEVEL_WARN&&c.info("validator does not support the validate method.");return h.length>0&&((s=new Error)._messages=h,o=this._processValidationErrors(s,i),this._updateMessagesOption("messagesShown",o,n)),0===h.length},_asyncValidateValue:function(t,n,i){function r(e){return e.then(function(e){var n;return m._asyncValidatorValidateCounter===g?n="resolved":(c.level>c.LEVEL_WARN&&c.info("Validate ignored because new value came in before async validator finished for "+t),n="ignore"),{v:e,status:n}},function(e){var r;return m._asyncValidatorValidateCounter===g?(s=m._processValidationErrors(e,i),m._updateMessagesOption("messagesShown",s,n),p||(m._setValidOption(d,n),p=!0),r="rejected"):(c.level>c.LEVEL_WARN&&c.info("Validate ignored because new value came in before async validator finished for "+t),r="ignore"),{e:e,status:r}})}var o,a,s,l,u=this._getAllAsyncValidators(),p=!1,h=u.length>0,m=this,g=this._asyncValidatorValidateCounter;if(h&&this._setValidOption("pending",n),l=this._validateValue(t,n,i),!h)return l&&this._setValidOption(m._determineValidFromMessagesOptions(),n),l?t:void 0;var f=[];for(o=0;o<u.length;o++)f.push(u[o].validate(e.StringUtils.trim(t)));return new Promise(function(e){Promise.all(f.map(r)).then(function(t){t.filter(function(e){return"ignore"===e.status}).length>0?a="ignoreValidation":(a=p?d:"valid",m._setValidOption(m._determineValidFromMessagesOptions(),n)),e(a)})})},_updateDescribedBy:p._updateDescribedBy,_addAriaDescribedBy:p._addAriaDescribedBy,_removeAriaDescribedBy:p._removeAriaDescribedBy,_setBusyState:e.EditableValueUtils._SetBusyState,_clearBusyState:e.EditableValueUtils._ClearBusyState,_setBusyStateAsyncValidatorHint:e.EditableValueUtils._SetBusyStateAsyncValidatorHint,_clearBusyStateAsyncValidatorHint:e.EditableValueUtils._ClearBusyStateAsyncValidatorHint,_setBusyStateAsyncConverterLoading:e.EditableValueUtils._SetBusyStateAsyncConverterLoading,_clearBusyStateAsyncConverterLoading:e.EditableValueUtils._ClearBusyStateAsyncConverterLoading,_AfterCreateConverterCached:e.EditableValueUtils._AfterCreateConverterCached},!0),a.setDefaultOptions({editableValue:{displayOptions:a.createDynamicPropertyGetter(function(e){var t={messages:e.containers.indexOf("ojDataGrid")>=0||e.containers.indexOf("ojTable")>=0?["notewindow"]:["inline"],converterHint:["placeholder","notewindow"],validatorHint:["notewindow"]};return t[e.isCustomElement?"helpInstruction":"title"]=["notewindow"],t}),help:a.createDynamicPropertyGetter(function(e){return e.isCustomElement?{instruction:""}:{definition:null,source:null}})}}),e.InlineMessagingStrategy=function(e){this.Init(e)},e.ComponentMessaging.registerMessagingStrategy(e.ComponentMessaging._DISPLAY_TYPE.INLINE,e.InlineMessagingStrategy),e.Object.createSubclass(e.InlineMessagingStrategy,e.MessagingStrategy,"oj.InlineMessagingStrategy"),e.InlineMessagingStrategy.prototype.reactivate=function(t){e.InlineMessagingStrategy.superclass.reactivate.call(this,t),this._updateInlineMessage()},e.InlineMessagingStrategy.prototype.shouldUpdate=function(e){return!(!e||void 0===e.validityState)},e.InlineMessagingStrategy.prototype.update=function(){e.InlineMessagingStrategy.superclass.update.call(this),this._updateInlineMessage()},e.InlineMessagingStrategy.prototype.deactivate=function(){this._removeMessagingContentRootDom(),e.InlineMessagingStrategy.superclass.deactivate.call(this)},e.InlineMessagingStrategy.prototype._getDefaultAnimation=function(){if(!e.InlineMessagingStrategy._defaultAnimation){var t=(o.parseJSONFromFontFamily("oj-messaging-inline-option-defaults")||{}).animation;t=t||{},e.InlineMessagingStrategy._defaultAnimation=t}return e.InlineMessagingStrategy._defaultAnimation},e.InlineMessagingStrategy.prototype._replaceAnimationOptions=function(t,n){var i,r;e.StringUtils.isString(t)?(r=!0,i=t+""):(r=!1,i=JSON.stringify(t));for(var o=Object.keys(n),a=0;a<o.length;a++){var s=o[a];i=i.replace(new RegExp(s,"g"),n[s])}return r?i:JSON.parse(i)},e.InlineMessagingStrategy.prototype._determineAnimation=function(e,t){var n,i,r,o=this._getDefaultAnimation();if(o){var a,s=e[0],l=s.innerHTML,u=s.offsetHeight;s.innerHTML=t,a=s.offsetHeight,s.innerHTML=l,"noanimation"!=(n=a>u?"open":a<u?"close":"noanimation")&&(i=o[n])&&(r=this._replaceAnimationOptions(i,{"#oldHeight":u+"px","#newHeight":a+"px"}))}return{action:n,effect:r}},e.InlineMessagingStrategy.prototype._setBusyState=function(){if(!this._resolveBusyState){var e=this.GetComponent(),t=e?e.element:null,n=t?t[0]:null,i=r.getContext(n).getBusyContext(),o="The page is waiting for inline message ";n&&n.id&&(o+='for "'+n.id+'" '),o+="to open/close",this._resolveBusyState=i.addBusyState({description:o})}},e.InlineMessagingStrategy.prototype._clearBusyState=function(){this._resolveBusyState&&(this._resolveBusyState(),this._resolveBusyState=null)},e.InlineMessagingStrategy.prototype._queueAction=function(e){var t=this,n=this.$messagingContentRoot;t._inInlineMessagingAnimation?this._currentContentToShow=e:(this._currentContentToShow=null,this._setBusyState(),this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(function(){if(t._timeoutId=null,n&&n[0]){var i=t._determineAnimation(n,e),r=i.action,o=i.effect;"noanimation"===r?(n[0].innerHTML=e,t._clearBusyState()):("close"===r?n[0].setAttribute("aria-live","off"):n[0].setAttribute("aria-live","polite"),"open"===r&&(n[0].innerHTML=e),t._inInlineMessagingAnimation=!0,s.startAnimation(n[0],"inline-"+r,o,t.GetComponent()).then(function(){var i;t._inInlineMessagingAnimation=!1,"close"===r&&(n[0].setAttribute("aria-live","polite"),n[0].innerHTML=e),null!==t._currentContentToShow?(i=t._currentContentToShow,t._currentContentToShow=null,t._queueAction(i)):t._clearBusyState()}))}else t._clearBusyState()},0))},e.InlineMessagingStrategy.prototype._updateInlineMessage=function(){var e;(e=this._buildInlineHtml())&&null==this.$messagingContentRoot&&this._createInlineMessage(),this.$messagingContentRoot&&this.$messagingContentRoot[0]&&(this.GetComponent()._IsCustomElement()?this._queueAction(e):e?this.$messagingContentRoot[0].innerHTML=e:this._removeMessagingContentRootDom())},e.InlineMessagingStrategy.prototype._createInlineMessage=function(){this.$messagingContentRoot=t(this._getInlineContentHtml()),this._addAriaDescribedBy(this.$messagingContentRoot),this._addAriaLive(this.$messagingContentRoot),this.GetComponent().widget()[0].appendChild(this.$messagingContentRoot[0])},e.InlineMessagingStrategy.prototype._getInlineContentHtml=function(){return"<div class='oj-messaging-inline-container'></div>"},e.InlineMessagingStrategy.prototype._removeMessagingContentRootDom=function(){if(null!=this.$messagingContentRoot){var e=this.$messagingContentRoot[0];this._removeAriaDescribedBy(this.$messagingContentRoot),e.parentNode.removeChild(e),this.$messagingContentRoot=null}},e.InlineMessagingStrategy.prototype._addAriaDescribedBy=function(n){var i,r,o,a,s=(r=this.GetLauncher())[0];e.Assert.assertPrototype(r,t),e.Assert.assertPrototype(n,t),o=n.uniqueId()[0].getAttribute("id"),(a=(i=s.getAttribute("aria-describedby"))?i.split(/\s+/):[]).push(o),null==(i=a.join(" ").trim())?s.removeAttribute("aria-describedby"):s.setAttribute("aria-describedby",i)},e.InlineMessagingStrategy.prototype._addAriaLive=function(n){e.Assert.assertPrototype(n,t),n[0].setAttribute("aria-live","polite")},e.InlineMessagingStrategy.prototype._removeAriaDescribedBy=function(n){var i,r,o,a,s;o=this.GetLauncher(),e.Assert.assertPrototype(o,t),e.Assert.assertPrototype(n,t),a=n[0].getAttribute("id"),-1!==(r=(s=(i=o[0].getAttribute("aria-describedby"))?i.split(/\s+/):[]).indexOf(a))&&s.splice(r,1),(i=s.join(" ").trim())?o[0].setAttribute("aria-describedby",i):o[0].removeAttribute("aria-describedby")},e.InlineMessagingStrategy.prototype._buildInlineHtml=function(){var e;return this.ShowMessages()?(e=this.GetComponent().document[0],this._buildMessagesHtml(e)):""},e.InlineMessagingStrategy.prototype._buildMessagesHtml=function(t){var n,i,r="";return this.HasMessages()&&(i=this.GetMessages(),n=this.GetMaxSeverity(),r=e.PopupMessagingStrategyUtils.buildMessagesHtml(t,i,n,!0)),r},e.PopupMessagingStrategy=function(e){this.Init(e)},e.ComponentMessaging.registerMessagingStrategy(e.ComponentMessaging._DISPLAY_TYPE.NOTEWINDOW,e.PopupMessagingStrategy),e.Object.createSubclass(e.PopupMessagingStrategy,e.MessagingStrategy,"oj.PopupMessagingStrategy"),e.PopupMessagingStrategy._DEFAULTS_BY_COMPONENT={ojRadioset:{position:"launcher",events:{open:"focusin mouseenter press",close:"mouseleave"}},ojCheckboxset:{position:"launcher",events:{open:"focusin mouseenter press",close:"mouseleave"}},ojInputText:{position:"launcher",events:{open:"focusin"}},ojTextArea:{position:"launcher",events:{open:"focusin"}},ojInputPassword:{position:"launcher",events:{open:"focusin"}},ojSwitch:{position:"launcher",events:{open:"focusin mouseenter",close:"mouseleave"}},ojSlider:{position:"launcher",events:{open:"focusin mouseenter",close:"mouseleave"}},ojColorSpectrum:{position:"launcher",events:{open:"focusin mouseenter",close:"mouseleave"}},ojColorPalette:{position:"launcher",events:{open:"focusin mouseenter",close:"mouseleave"}},default:{position:"launcher-wrapper",events:{open:"focusin"}}},e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT="oj-form-control-hint",e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT_CONVERTER="oj-form-control-hint-converter",e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT_VALIDATOR="oj-form-control-hint-validator",e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT_TITLE="oj-form-control-hint-title",e.PopupMessagingStrategy._OPEN_NAMESPACE=".ojPopupMessagingOpen",e.PopupMessagingStrategy._CLOSE_NAMESPACE=".ojPopupMessagingClose",e.PopupMessagingStrategy.prototype.activate=function(t){e.PopupMessagingStrategy.superclass.activate.call(this,t),this._initMessagingPopup()},e.PopupMessagingStrategy.prototype.reactivate=function(t){e.PopupMessagingStrategy.superclass.reactivate.call(this,t),this._updatePopupIfOpenOrComponentHasFocus()},e.PopupMessagingStrategy.prototype.update=function(){e.PopupMessagingStrategy.superclass.update.call(this),this._updatePopupIfOpenOrComponentHasFocus()},e.PopupMessagingStrategy.prototype.deactivate=function(){this._unregisterLauncherEvents(),this._destroyTooltip(),e.PopupMessagingStrategy.superclass.deactivate.call(this)},e.PopupMessagingStrategy.prototype.close=function(){this._closePopup()},e.PopupMessagingStrategy.prototype._closePopup=function(){this._queueAction(function(e){return this._isPopupInitialized()?(e&&this._setActionResolver(this.$messagingContentRoot,"close",e),void this.$messagingContentRoot.ojPopup("close")):void(e&&e(!0))}.bind(this))},e.PopupMessagingStrategy.prototype._initMessagingPopup=function(){this._openPopupCallback||this._registerLauncherEvents()},e.PopupMessagingStrategy.prototype._addAnimateEventListeners=function(e){var t=function(e,t,n){var i=this.GetComponent();i&&i._trigger&&(t.stopPropagation(),i._trigger(e,null,n)||t.preventDefault())};e.on("ojanimatestart.notewindow",t.bind(this,"animateStart")),e.on("ojanimateend.notewindow",t.bind(this,"animateEnd"))},e.PopupMessagingStrategy.prototype._removeAnimateEventListeners=function(e){e.off("ojanimatestart.notewindow"),e.off("ojanimateend.notewindow")},e.PopupMessagingStrategy.prototype._setBusyState=function(e){var t=this.GetComponent(),n=t?t.element:null,i=n?n[0]:null,o=r.getContext(i).getBusyContext(),a="The page is waiting for note window ";return i&&i.id&&(a+='for "'+i.id+'" '),a+="to "+e,o.addBusyState({description:a})},e.PopupMessagingStrategy.prototype._setActionResolver=function(e,t,n){var i;this._actionCount>1&&(i=e.ojPopup("option","animation"),e.ojPopup("option","animation",null));var r=this._setBusyState(t);e.one("oj"+t,function(){i&&e.ojPopup("option","animation",i),r(),n(!0)})},e.PopupMessagingStrategy.prototype._queueAction=function(e){if(this.GetComponent()._IsCustomElement()){var t=this,n=function(e){var n=new Promise(e);return n.then(function(){t._actionCount-=1}),n};this._actionCount?(this._actionCount+=1,this._actionPromise=this._actionPromise.then(function(){return n(e)})):(this._actionCount=1,this._actionPromise=n(e))}else e(null)},e.PopupMessagingStrategy.prototype._openPopup=function(t){this._queueAction(function(n){var i,r,o;if(this._canOpenPopup()&&(r=this._buildPopupHtml(),!e.StringUtils.isEmptyOrUndefined(r))){var a=this._getPopupElement(),s=a.ojPopup("isOpen");if((i=e.PopupMessagingStrategyPoolUtils.getPopupContentNode(a)).innerHTML="",i.innerHTML=r,!s)return o=this.GetLauncher(),t&&"press"===t.type&&this._openPopupOnPressEvent(o),n&&this._setActionResolver(a,"open",n),void a.ojPopup("open",o);s&&a.ojPopup("refresh")}n&&n(!0)}.bind(this))},e.PopupMessagingStrategy.prototype._openPopupOnPressEvent=function(e){this._inPressEvent=!0,e[0].addEventListener("click",this._eatChangeAndClickOnPress,!0),e[0].addEventListener("change",this._eatChangeAndClickOnPress,!0),e.one("touchend",function(){setTimeout(function(){this._inPressEvent=!1},50)})},e.PopupMessagingStrategy.prototype._eatChangeAndClickOnPress=function(e){this._inPressEvent&&(e.preventDefault(),e.stopPropagation(),"click"===e.type&&(this._inPressEvent=!1))},e.PopupMessagingStrategy.prototype._canOpenPopup=function(){var e=this.GetComponent().options,t=e.disabled||!1,n=e.readOnly||!1;return!(t||n)},e.PopupMessagingStrategy.prototype._updatePopupIfOpenOrComponentHasFocus=function(){var t,n,i,r;t=this._buildPopupHtml(),null!=this.GetLauncher()&&(i=this.GetLauncher()[0].contains(document.activeElement),this._isPopupInitialized()?(r=this._getPopupElement()).ojPopup("isOpen")&&(t?((n=e.PopupMessagingStrategyPoolUtils.getPopupContentNode(r)).innerHTML="",n.innerHTML=t,r.ojPopup("refresh")):r.ojPopup("close")):i&&t&&this._openPopup(void 0))},e.PopupMessagingStrategy.prototype._unregisterLauncherEvents=function(){var t=this.GetLauncher();t.off(e.PopupMessagingStrategy._OPEN_NAMESPACE),t.off(e.PopupMessagingStrategy._CLOSE_NAMESPACE),t[0].removeEventListener("click",this._eatChangeAndClickOnPress,!0),t[0].removeEventListener("change",this._eatChangeAndClickOnPress,!0),e.DomUtils.isTouchSupported()&&(t.ojHammer().off("press"),t.ojHammer("destroy"),t.off("contextmenu",this._eatContextMenuOnOpenPopupListener),this._eatContextMenuOnOpenPopupListener=null,this._inPressEvent=null),this._openPopupCallback=null,this._closePopupCallback=null},e.PopupMessagingStrategy.prototype._registerLauncherEvents=function(){var t,i,r,o,a,s,l,u,c=this.GetLauncher();(o=(r=e.PopupMessagingStrategy._DEFAULTS_BY_COMPONENT[this.GetComponent().widgetName])?r.events:e.PopupMessagingStrategy._DEFAULTS_BY_COMPONENT.default.events).open&&((l=this._openPopupCallback)||(l=this._openPopup.bind(this),this._openPopupCallback=l),u=o.open.indexOf("press"),s=this._getNamespacedEvents(o.open.replace("press",""),e.PopupMessagingStrategy._OPEN_NAMESPACE),c.on(s,l),e.DomUtils.isTouchSupported()&&-1!==u&&(this._eatContextMenuOnOpenPopupListener=function(){return!1},c.on("contextmenu",this._eatContextMenuOnOpenPopupListener),a={recognizers:[[n.Press,{time:750}]]},c.ojHammer(a).on("press",l))),o.close&&((i=this._closePopupCallback)||(i=this._closePopup.bind(this),this._closePopupCallback=i),t=this._getNamespacedEvents(o.close,e.PopupMessagingStrategy._CLOSE_NAMESPACE),c.on(t,i))},e.PopupMessagingStrategy.prototype._getNamespacedEvents=function(e,t){var n,i,r;if(""===e||""===t)return e;r=(n=e.split(" ")).length,i=[];for(var o=0;o<r;o++)n[o]&&i.push(n[o]+t);return i.join(" ")},e.PopupMessagingStrategy.prototype._getPopupPosition=function(){var t,n,i;return(t=(n=e.PopupMessagingStrategy._DEFAULTS_BY_COMPONENT[this.GetComponent().widgetName])?n.position:e.PopupMessagingStrategy._DEFAULTS_BY_COMPONENT.default.position)&&("launcher"===t?i=this.GetLauncher():"launcher-wrapper"===t&&(i=this.GetLauncher().parent())),i||(i=this.GetComponent().widget()),{my:"start bottom",at:"end top",collision:"flipcenter",of:i}},e.PopupMessagingStrategy.prototype._getPopupElement=function(){var t,n;if(this.$messagingContentRoot)return this.$messagingContentRoot;if(t=e.PopupMessagingStrategyPoolUtils.getNextFreePopup(),n=this._getPopupPosition(),t.ojPopup("option","position",n),t.ojPopup("option","beforeClose",this._popupBeforeCloseCallback.bind(this)),t.ojPopup("option","close",this._popupCloseCallback.bind(this)),t.ojPopup("option","open",this._popupOpenCallback.bind(this)),this.GetComponent()._IsCustomElement()){var i=(o.parseJSONFromFontFamily("oj-messaging-popup-option-defaults")||{}).animation;i.actionPrefix="notewindow",t.ojPopup("option","animation",i),this._addAnimateEventListeners(t)}else t.ojPopup("option","animation",null);return this.$messagingContentRoot=t,this.$messagingContentRoot},e.PopupMessagingStrategy.prototype._popupOpenCallback=function(e){var n=t(e.target),i=this;window.setTimeout(function(){a.isComponentInitialized(n,"ojPopup")?n.ojPopup("option","autoDismiss","focusLoss"):delete i.$messagingContentRoot},10)},e.PopupMessagingStrategy.prototype._popupBeforeCloseCallback=function(){this._resolveBusyState=this._setBusyState("close")},e.PopupMessagingStrategy.prototype._popupCloseCallback=function(n){var i=this.GetLauncher(),r=t(n.target);this._removeAnimateEventListeners(r),a.isComponentInitialized(r,"ojPopup")&&(r.ojPopup("option","autoDismiss","none"),r.ojPopup("option","open",null),r.ojPopup("option","close",null),r.ojPopup("option","beforeClose",null)),i&&i[0]&&(i[0].removeEventListener("click",this._eatChangeAndClickOnPress,!0),i[0].removeEventListener("change",this._eatChangeAndClickOnPress,!0)),this.$messagingContentRoot=null,this._inPressEvent=null,e.PopupMessagingStrategyPoolUtils.getPopupContentNode(r).innerHTML="",this._resolveBusyState&&(this._resolveBusyState(),this._resolveBusyState=null)},e.PopupMessagingStrategy.prototype._destroyTooltip=function(){this._closePopup(),e.PopupMessagingStrategyPoolUtils.destroyFreePopup()},e.PopupMessagingStrategy.prototype._buildPopupHtml=function(){var t=!1,n=this.GetComponent().document[0],i=[],r="";return this.ShowMessages()&&i.push(this._buildMessagesHtml(n)),(this.ShowConverterHint()||this.ShowValidatorHint()||this.ShowTitle())&&i.push(this._buildHintsHtml(n)),i.forEach(function(i){i&&(t?r=r.concat(e.PopupMessagingStrategyUtils.getSeparatorHtml(n)):t=!0,r=r.concat(i))}),r},e.PopupMessagingStrategy.prototype._buildMessagesHtml=function(t){var n,i="",r=this.GetMaxSeverity();return this.HasMessages()&&(n=this.GetMessages(),i=e.PopupMessagingStrategyUtils.buildMessagesHtml(t,n,r,!1)),i},e.PopupMessagingStrategy.prototype._buildHintsHtml=function(t){var n,i,r=[],o="";if(this.ShowConverterHint()&&(n=(r=this.GetConverterHint()).length?r[0]:"",o+=e.PopupMessagingStrategyUtils.buildHintHtml(t,e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT_CONVERTER,n,!1,e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT)),this.ShowValidatorHint())for(r=this.GetValidatorHints(),i=0;i<r.length;i++)o+=e.PopupMessagingStrategyUtils.buildHintHtml(t,e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT_VALIDATOR,r[i],!1,e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT);return this.ShowTitle()&&(o+=e.PopupMessagingStrategyUtils.buildHintHtml(t,e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT_TITLE,this.GetTitle(),!0,e.PopupMessagingStrategy._SELECTOR_FORMCONTROL_HINT)),o?"<div class='oj-form-control-hints'>"+o+"</div>":""},e.PopupMessagingStrategy.prototype._isPopupInitialized=function(){return!!this.$messagingContentRoot&&a.isComponentInitialized(this.$messagingContentRoot,"ojPopup")},e.PopupMessagingStrategyUtils={},e.PopupMessagingStrategyUtils.buildHintHtml=function(t,n,i,r,o){var a;if(i){a=t.createElement("div");for(var s=o.split(" "),l=0,u=s.length;l<u;++l)a.classList.add(s[l]);a.classList.add(n),e.PopupMessagingStrategyUtils._appendTextDom(a,e.PopupMessagingStrategyUtils._getTextDom(t,i,r))}return a?a.outerHTML:""},e.PopupMessagingStrategyUtils.getSeverityTranslatedString=function(e){var t;switch(e){case l.SEVERITY_LEVEL.FATAL:t=i.getTranslatedString("oj-message.fatal");break;case l.SEVERITY_LEVEL.ERROR:t=i.getTranslatedString("oj-message.error");break;case l.SEVERITY_LEVEL.WARNING:t=i.getTranslatedString("oj-message.warning");break;case l.SEVERITY_LEVEL.INFO:t=i.getTranslatedString("oj-message.info");break;case l.SEVERITY_LEVEL.CONFIRMATION:t=i.getTranslatedString("oj-message.confirmation")}return t},e.PopupMessagingStrategyUtils.getSeparatorHtml=function(e){var n;return(n=t(e.createElement("hr")))?n.get(0).outerHTML:""},e.PopupMessagingStrategyUtils.buildMessagesHtml=function(t,n,i,r){var o,a,s,u,c,p,d,h,m="",g=[],f={};for(a=0;a<n.length;a++)c=(u=n[a])instanceof l?u:new l(u.summary,u.detail,u.severity),f[p=l.getSeverityLevel(c.severity)]||(f[p]=[]),f[p].push(c);for(a=i;a>=l.SEVERITY_LEVEL.CONFIRMATION;a--)for(g=f[a]||[],s=0;s<g.length;s++)u=g[s],p=l.getSeverityLevel(u.severity),d=e.PopupMessagingStrategyUtils.getSeverityTranslatedString(p),h=u.summary||d,o=u.detail||"",m=m.concat(e.PopupMessagingStrategyUtils.buildMessageHtml(t,h,o,p,r));return m},e.PopupMessagingStrategyUtils.buildMessageHtml=function(t,n,i,r,o){var a,s,l,u,c,p=e.PopupMessagingStrategyUtils.getSeverityTranslatedString(r);if((l=t.createElement("div")).classList.add(e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE),o)for(var d=e.PopupMessagingStrategyUtils._getSeveritySelector(r).split(" "),h=0,m=d.length;h<m;++h)l.classList.add(d[h]);u=t.createElement("span");for(var g=e.PopupMessagingStrategyUtils._getSeverityIconSelector(r).split(" "),f=0,_=g.length;f<_;++f)u.classList.add(g[f]);if(null==p?u.removeAttribute("title"):u.setAttribute("title",p),u.setAttribute("role","img"),l.appendChild(u),(a=t.createElement("span")).classList.add(e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_CONTENT),(c=t.createElement("div")).classList.add(e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_SUMMARY),c.textContent=n,a.appendChild(c),i){var v=e.PopupMessagingStrategyUtils._getTextDom(t,i,!0);(s=t.createElement("div")).classList.add(e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_DETAIL),e.PopupMessagingStrategyUtils._appendTextDom(s,v),a.appendChild(s)}return l.appendChild(a),l.outerHTML},e.PopupMessagingStrategyUtils._getSeverityIconSelector=function(t){var n;switch(t){case l.SEVERITY_LEVEL.FATAL:case l.SEVERITY_LEVEL.ERROR:n=e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_ERROR_ICON;break;case l.SEVERITY_LEVEL.WARNING:n=e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_WARNING_ICON;break;case l.SEVERITY_LEVEL.INFO:n=e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_INFO_ICON;break;case l.SEVERITY_LEVEL.CONFIRMATION:n=e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_CONFIRMATION_ICON}return e.PopupMessagingStrategyUtils._DEFAULT_STATUS_ICON_SELECTORS+n},e.PopupMessagingStrategyUtils._getSeveritySelector=function(t){var n;switch(t){case l.SEVERITY_LEVEL.FATAL:case l.SEVERITY_LEVEL.ERROR:n=e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_ERROR;break;case l.SEVERITY_LEVEL.WARNING:n=e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_WARNING;break;case l.SEVERITY_LEVEL.INFO:n=e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_INFO;break;case l.SEVERITY_LEVEL.CONFIRMATION:default:n=e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_CONFIRMATION}return n},e.PopupMessagingStrategyUtils._getTextDom=function(t,n,i){var r=null;return e.StringUtils.isString(n)&&(i&&e.DomUtils.isHTMLContent(n)?r=e.DomUtils.cleanHtml(n.substring(6,n.length-7)):(r=t.createElement("span")).textContent=n),r},e.PopupMessagingStrategyUtils._appendTextDom=function(t,n){e.StringUtils.isString(n)?t.innerHTML=n:t.appendChild(n)},e.PopupMessagingStrategyUtils._DEFAULT_STATUS_ICON_SELECTORS="oj-component-icon oj-message-status-icon ",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE="oj-message",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_SUMMARY="oj-message-summary",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_DETAIL="oj-message-detail",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_CONTENT="oj-message-content",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_ERROR_ICON="oj-message-error-icon",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_WARNING_ICON="oj-message-warning-icon",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_INFO_ICON="oj-message-info-icon",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_CONFIRMATION_ICON="oj-message-confirmation-icon",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_ERROR="oj-message-error",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_WARNING="oj-message-warning",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_INFO="oj-message-info",e.PopupMessagingStrategyUtils._SELECTOR_MESSAGE_CONFIRMATION="oj-message-confirmation",e.PopupMessagingStrategyPoolUtils={},e.PopupMessagingStrategyPoolUtils.getNextFreePopup=function(){var n,i=e.PopupMessagingStrategyPoolUtils._getPool(),r=i.find("."+e.PopupMessagingStrategyPoolUtils._SELECTOR_MESSAGING);return 0===r.length?((n=t(e.PopupMessagingStrategyPoolUtils._getPopupContentHtml()))[0].style.display="none",n.appendTo(i),n.ojPopup({initialFocus:"none",tail:"simple",autoDismiss:"none",modality:"modeless",animation:{open:null,close:null}})):n=t(r[0]),n},e.PopupMessagingStrategyPoolUtils.getPopupContentNode=function(t){return t.find("."+e.PopupMessagingStrategyPoolUtils._SELECTOR_MESSAGING_CONTAINER)[0]},e.PopupMessagingStrategyPoolUtils.destroyFreePopup=function(){var t;if(e.PopupMessagingStrategyPoolUtils._getFreePoolCount()>0){var n=(t=e.PopupMessagingStrategyPoolUtils.getNextFreePopup())[0];t.ojPopup("destroy"),n.parentNode.removeChild(n)}},e.PopupMessagingStrategyPoolUtils._getPool=function(){var n=t("#"+e.PopupMessagingStrategyPoolUtils._MESSAGING_POPUP_POOL_ID);if(n.length>0)return n;var i=(n=t("<div>"))[0];return i.setAttribute("id",e.PopupMessagingStrategyPoolUtils._MESSAGING_POPUP_POOL_ID),i.setAttribute("role","presentation"),document.body.appendChild(i),n},e.PopupMessagingStrategyPoolUtils._getFreePoolCount=function(){return e.PopupMessagingStrategyPoolUtils._getPool().find("."+e.PopupMessagingStrategyPoolUtils._SELECTOR_MESSAGING).length},e.PopupMessagingStrategyPoolUtils._getPopupContentHtml=function(){return'<div class="'+e.PopupMessagingStrategyPoolUtils._SELECTOR_MESSAGING+'"><div class="'+e.PopupMessagingStrategyPoolUtils._SELECTOR_MESSAGING_CONTAINER+'"></div></div>'},e.PopupMessagingStrategyPoolUtils._SELECTOR_MESSAGING_CONTAINER="oj-messaging-popup-container",e.PopupMessagingStrategyPoolUtils._SELECTOR_MESSAGING="oj-messaging-popup",e.PopupMessagingStrategyPoolUtils._MESSAGING_POPUP_POOL_ID="__oj_messaging_popup_pool"}),define("ojs/ojinputtext",["ojs/ojcore","jquery","ojs/ojvalidation-base","ojs/ojlogger","ojs/ojeditablevalue"],function(e,t,n,i){"use strict";var r={properties:{asyncValidators:{type:"Array<Object>",value:[]},autocomplete:{type:"string",value:"on",extension:{_COPY_TO_INNER_ELEM:!0}},autofocus:{type:"boolean",value:!1,extension:{_COPY_TO_INNER_ELEM:!0}},describedBy:{type:"string"},disabled:{type:"boolean",value:!1},displayOptions:{type:"object",properties:{converterHint:{type:"Array<string>|string",value:["placeholder","notewindow"]},helpInstruction:{type:"Array<string>|string",value:["notewindow"]},messages:{type:"Array<string>|string",value:["inline"]},validatorHint:{type:"Array<string>|string",value:["notewindow"]}}},help:{type:"object",properties:{instruction:{type:"string",value:""}}},helpHints:{type:"object",properties:{definition:{type:"string",value:""},source:{type:"string",value:""}}},labelHint:{type:"string",value:""},labelledBy:{type:"string"},messagesCustom:{type:"Array<Object>",writeback:!0,value:[]},name:{type:"string",value:"",extension:{_COPY_TO_INNER_ELEM:!0}},placeholder:{type:"string"},rawValue:{type:"string",writeback:!0,readOnly:!0},readonly:{type:"boolean",value:!1},required:{type:"boolean",value:!1},translations:{type:"object",value:{},properties:{regexp:{type:"object",properties:{messageDetail:{type:"string"},messageSummary:{type:"string"}}},required:{type:"object",properties:{hint:{type:"string"},messageDetail:{type:"string"},messageSummary:{type:"string"}}}}},valid:{type:"string",writeback:!0,enumValues:["invalidHidden","invalidShown","pending","valid"],readOnly:!0},validators:{type:"Array<Object>",value:[]},value:{type:"string",writeback:!0}},methods:{refresh:{},validate:{},reset:{},showMessages:{},setProperty:{},getProperty:{},setProperties:{},getNodeBySubId:{},getSubIdByNode:{}},events:{ojAnimateStart:{},ojAnimateEnd:{}},extension:{}},o={properties:{asyncValidators:{type:"Array<Object>",value:[]},autocomplete:{type:"string",value:"on",extension:{_COPY_TO_INNER_ELEM:!0}},autofocus:{type:"boolean",value:!1,extension:{_COPY_TO_INNER_ELEM:!0}},clearIcon:{type:"string",enumValues:["always","conditional","never"],value:"never"},converter:{type:"object",properties:{type:{type:"string"},options:{type:"object"}}},describedBy:{type:"string"},disabled:{type:"boolean",value:!1},displayOptions:{type:"object",properties:{converterHint:{type:"Array<string>|string",value:["placeholder","notewindow"]},helpInstruction:{type:"Array<string>|string",value:["notewindow"]},messages:{type:"Array<string>|string",value:["inline"]},validatorHint:{type:"Array<string>|string",value:["notewindow"]}}},help:{type:"object",properties:{instruction:{type:"string",value:""}}},helpHints:{type:"object",properties:{definition:{type:"string",value:""},source:{type:"string",
- value:""}}},labelHint:{type:"string",value:""},labelledBy:{type:"string"},list:{type:"string",extension:{_COPY_TO_INNER_ELEM:!0}},messagesCustom:{type:"Array<Object>",writeback:!0,value:[]},name:{type:"string",value:"",extension:{_COPY_TO_INNER_ELEM:!0}},placeholder:{type:"string"},rawValue:{type:"string",writeback:!0,readOnly:!0},readonly:{type:"boolean",value:!1},required:{type:"boolean",value:!1},translations:{type:"object",value:{},properties:{regexp:{type:"object",properties:{messageDetail:{type:"string"},messageSummary:{type:"string"}}},required:{type:"object",properties:{hint:{type:"string"},messageDetail:{type:"string"},messageSummary:{type:"string"}}}}},valid:{type:"string",writeback:!0,enumValues:["invalidHidden","invalidShown","pending","valid"],readOnly:!0},validators:{type:"Array<Object>",value:[]},value:{type:"any",writeback:!0},virtualKeyboard:{type:"string",enumValues:["auto","email","number","search","tel","text","url"],value:"auto"}},methods:{refresh:{},validate:{},reset:{},showMessages:{},setProperty:{},getProperty:{},setProperties:{},getNodeBySubId:{},getSubIdByNode:{}},events:{ojAnimateStart:{},ojAnimateEnd:{}},extension:{}},a={properties:{asyncValidators:{type:"Array<Object>",value:[]},autocomplete:{type:"string",value:"on",extension:{_COPY_TO_INNER_ELEM:!0}},autofocus:{type:"boolean",value:!1,extension:{_COPY_TO_INNER_ELEM:!0}},converter:{type:"object",properties:{type:{type:"string"},options:{type:"object"}}},describedBy:{type:"string"},disabled:{type:"boolean",value:!1},displayOptions:{type:"object",properties:{converterHint:{type:"Array<string>|string",value:["placeholder","notewindow"]},helpInstruction:{type:"Array<string>|string",value:["notewindow"]},messages:{type:"Array<string>|string",value:["inline"]},validatorHint:{type:"Array<string>|string",value:["notewindow"]}}},help:{type:"object",properties:{instruction:{type:"string",value:""}}},helpHints:{type:"object",properties:{definition:{type:"string",value:""},source:{type:"string",value:""}}},labelHint:{type:"string",value:""},labelledBy:{type:"string"},messagesCustom:{type:"Array<Object>",writeback:!0,value:[]},name:{type:"string",value:"",extension:{_COPY_TO_INNER_ELEM:!0}},placeholder:{type:"string"},rawValue:{type:"string",writeback:!0,readOnly:!0},readonly:{type:"boolean",value:!1},required:{type:"boolean",value:!1},resizeBehavior:{type:"string",enumValues:["both","horizontal","none","vertical"],value:"none"},rows:{type:"number",extension:{_COPY_TO_INNER_ELEM:!0}},translations:{type:"object",value:{},properties:{regexp:{type:"object",properties:{messageDetail:{type:"string"},messageSummary:{type:"string"}}},required:{type:"object",properties:{hint:{type:"string"},messageDetail:{type:"string"},messageSummary:{type:"string"}}}}},valid:{type:"string",writeback:!0,enumValues:["invalidHidden","invalidShown","pending","valid"],readOnly:!0},validators:{type:"Array<Object>",value:[]},value:{type:"any",writeback:!0}},methods:{refresh:{},validate:{},reset:{},showMessages:{},setProperty:{},getProperty:{},setProperties:{},getNodeBySubId:{},getSubIdByNode:{}},events:{ojAnimateStart:{},ojAnimateEnd:{}},extension:{}};e.__registerWidget("oj.inputBase",t.oj.editableValue,{version:"1.0.0",widgetEventPrefix:"oj",_ATTR_CHECK:[],_CLASS_NAMES:"",_WIDGET_CLASS_NAMES:"",_ELEMENT_TRIGGER_WRAPPER_CLASS_NAMES:"",_GET_INIT_OPTIONS_PROPS_FOR_WIDGET:[{attribute:"disabled",validateOption:!0},{attribute:"pattern"},{attribute:"placeholder"},{attribute:"value"},{attribute:"readonly",option:"readOnly",validateOption:!0},{attribute:"required",coerceDomValue:!0,validateOption:!0},{attribute:"title"},{attribute:"spellcheck"}],_INPUT_HELPER_KEY:"",_BLUR_HANDLER_KEY:"blur",_KEYDOWN_HANDLER_KEY:"keydown",_KEYUP_HANDLER_KEY:"keyup",_COMPOSITIONSTART_HANDLER_KEY:"compositionstart",_COMPOSITIONEND_HANDLER_KEY:"compositionend",_INPUT_HANDLER_KEY:"input",_DROP_HANDLER_KEY:"drop",options:{asyncValidators:[],autocomplete:void 0,autofocus:!1,labelledBy:null,name:"",placeholder:"",rawValue:void 0,readOnly:!1,required:!1,validators:[]},_SaveAttributes:function(e){var t=this._superApply(arguments);return this._processAttrCheck(),t},_InitOptions:function(t,n){this._super(t,n),this._IsCustomElement()||e.EditableValueUtils.initializeOptionsFromDom(this._GET_INIT_OPTIONS_PROPS_FOR_WIDGET,n,this)},_ComponentCreate:function(){var e=this._superApply(arguments),t=this.options.readOnly;return this._rtl="rtl"===this._GetReadingDirection(),"boolean"==typeof t&&this.element.prop("readonly",t),this._DoWrapElement()?(this._wrapElementInRootDomElement(),this._DoWrapElementAndTriggers()&&this._WrapElement(),this._focusable({element:this._wrapper,applyHighlight:!0})):this._focusable({element:this.element,applyHighlight:!0}),this._defaultRegExpValidator={},this._defaultRegExpAsyncValidator={},this._eventHandlers=null,e},_AfterCreate:function(){var n=this._superApply(arguments),i=this;return this._refreshRequired(this.options.required),this._CLASS_NAMES&&this.element.addClass(this._CLASS_NAMES),this._attachDetachEventHandlers(),this._AppendInputHelper(),t.each(["disabled","readOnly"],function(e,t){i.options[t]&&i._processOptions(t,i.options[t])}),this._IsCustomElement()&&e.EditableValueUtils._setInputId(this._GetContentElement()[0],this.widget()[0].id,this.options.labelledBy),n},_IsRequired:function(){return this.options.required},_AfterSetOptionRequired:e.EditableValueUtils._AfterSetOptionRequired,_AfterSetOptionValidators:e.EditableValueUtils._AfterSetOptionValidators,_AfterSetOptionAsyncValidators:e.EditableValueUtils._AfterSetOptionAsyncValidators,_AfterSetOptionConverter:e.EditableValueUtils._AfterSetOptionConverter,_ResetConverter:e.EditableValueUtils._ResetConverter,_GetConverter:e.EditableValueUtils._GetConverter,_GetNormalizedValidatorsFromOption:e.EditableValueUtils._GetNormalizedValidatorsFromOption,_GetNormalizedAsyncValidatorsFromOption:e.EditableValueUtils._GetNormalizedAsyncValidatorsFromOption,_processOptions:function(e,t){"disabled"===e&&this.element.prop("disabled",t),"readOnly"===e&&(this.element.prop("readonly",t),this._refreshStateTheming("readOnly",t)),"disabled"!==e&&"readOnly"!==e||this._attachDetachEventHandlers()},_setOption:function(t,n,i){var r=this._superApply(arguments);if("disabled"===t||"readOnly"===t)this._processOptions(t,n);else if("pattern"===t)this._defaultRegExpValidator[e.ValidatorFactory.VALIDATOR_TYPE_REGEXP]=this._getImplicitRegExpValidator(),this._AfterSetOptionValidators();else if("labelledBy"===t&&this.options.labelledBy){var o=this._GetContentElement()[0].id;this._labelledByChangedForInputComp(this.options.labelledBy,o)}return r},_AfterSetOption:function(t,n,i){switch(this._superApply(arguments),t){case"readOnly":this._AfterSetOptionDisabledReadOnly(t,e.EditableValueUtils.readOnlyOptionOptions);break;case"required":this._AfterSetOptionRequired(t);break;case"validators":this._AfterSetOptionValidators(t);break;case"asyncValidators":this._AfterSetOptionAsyncValidators(t);break;case"converter":this._AfterSetOptionConverter(t)}},_destroy:function(){var t=this._superApply(arguments);return this.element.off("blur drop keydown keyup compositionstart compositionend input"),this._inputHelper&&this._inputHelper.remove(),this._DoWrapElement()&&!this._IsCustomElement()&&(this._DoWrapElementAndTriggers()?e.DomUtils.unwrap(this.element,this._wrapper):e.DomUtils.unwrap(this.element)),t},_SetLoading:function(){this._super(),this.element.prop("readonly",!0),this._refreshStateTheming("readOnly",!0)},_ClearLoading:function(){this._super(),this.element.prop("readonly",this.options.readOnly),this._refreshStateTheming("readOnly",this.options.readOnly)},_attachDetachEventHandlers:function(){if(this.options.readOnly||this.options.disabled){if(this._eventHandlers)for(var e=[this._BLUR_HANDLER_KEY,this._KEYDOWN_HANDLER_KEY,this._KEYUP_HANDLER_KEY,this._COMPOSITIONSTART_HANDLER_KEY,this._COMPOSITIONEND_HANDLER_KEY,this._INPUT_HANDLER_KEY,this._DROP_HANDLER_KEY],n=0,i=e.length;n<i;n++)this._eventHandlers[e[n]]&&(this.element.off(e[n],this._eventHandlers[e[n]]),delete this._eventHandlers[e[n]])}else{this._eventHandlers={};var r=t.proxy(this._onBlurHandler,this),o=t.proxy(this._onKeyDownHandler,this),a=t.proxy(this._onKeyUpHandler,this),s=t.proxy(this._onCompositionStartHandler,this),l=t.proxy(this._onCompositionEndHandler,this),u=t.proxy(this._onInputHandler,this),c=function(){this.focus()};this.element.on(this._BLUR_HANDLER_KEY,r),this.element.on(this._KEYDOWN_HANDLER_KEY,o),this.element.on(this._KEYUP_HANDLER_KEY,a),this.element.on(this._COMPOSITIONSTART_HANDLER_KEY,s),this.element.on(this._COMPOSITIONEND_HANDLER_KEY,l),this.element.on(this._INPUT_HANDLER_KEY,u),this.element.on(this._DROP_HANDLER_KEY,c),this._eventHandlers[this._BLUR_HANDLER_KEY]=r,this._eventHandlers[this._KEYDOWN_HANDLER_KEY]=o,this._eventHandlers[this._KEYUP_HANDLER_KEY]=a,this._eventHandlers[this._COMPOSITIONSTART_HANDLER_KEY]=s,this._eventHandlers[this._COMPOSITIONEND_HANDLER_KEY]=l,this._eventHandlers[this._INPUT_HANDLER_KEY]=u,this._eventHandlers[this._DROP_HANDLER_KEY]=c}},_OPTION_TO_CSS_MAPPING:{readOnly:"oj-read-only"},_processAttrCheck:function(){for(var e=this._ATTR_CHECK,t=0,n=e.length;t<n;t++){var i=e[t].attr;"setMandatory"in e[t]&&this.element.attr(i,e[t].setMandatory)}},_onBlurHandler:function(e){this._SetValue(this._GetDisplayValue(),e)},_onKeyDownHandler:function(e){},_onKeyUpHandler:function(e){e.keyCode===t.ui.keyCode.ENTER&&this._SetValue(this._GetDisplayValue(),e)},_onCompositionStartHandler:function(){this._isComposing=!0},_onCompositionEndHandler:function(e){this._isComposing=!1,this._SetRawValue(this._GetContentElement().val(),e)},_onInputHandler:function(e){this._isComposing||this._SetRawValue(this._GetContentElement().val(),e)},_DoWrapElement:function(){return this._WIDGET_CLASS_NAMES},_DoWrapElementAndTriggers:function(){return this._ELEMENT_TRIGGER_WRAPPER_CLASS_NAMES},_wrapElementInRootDomElement:function(){this.OuterWrapper?(this._wrapper=t(this.OuterWrapper).addClass(this._WIDGET_CLASS_NAMES),this._wrapper.append(this.element)):(t(this.element).wrap(t("<div>").addClass(this._WIDGET_CLASS_NAMES)),this._wrapper=this.element.parent())},_WrapElement:function(){return t(this.element).wrap(t("<div>").addClass(this._ELEMENT_TRIGGER_WRAPPER_CLASS_NAMES)).parent()},_AppendInputHelper:function(){if(this._INPUT_HELPER_KEY&&this._DoWrapElement()){var e=this.element.attr("aria-describedby")||"",n=this._GetSubId(this._INPUT_HELPER_KEY);e+=" "+n,this.element.attr("aria-describedby",e),this._inputHelper=t("<div class='oj-helper-hidden-accessible' aria-hidden='true' id='"+n+"'>"+this._EscapeXSS(this.getTranslatedString(this._INPUT_HELPER_KEY))+"</div>"),this._AppendInputHelperParent().append(this._inputHelper)}},_EscapeXSS:function(e){return t("<span>"+e+"</span>").text()},_AppendInputHelperParent:function(){return this.widget()},_GetImplicitSyncValidators:function(){var n=this._superApply(arguments);return this.options.pattern&&(this._defaultRegExpValidator[e.ValidatorFactory.VALIDATOR_TYPE_REGEXP]=this._getImplicitRegExpValidator()),t.extend(this._defaultRegExpValidator,n)},_GetImplicitAsyncValidators:function(){var e=this._superApply(arguments);return t.extend(this._defaultRegExpAsyncValidator,e)},_CanSetValue:function(){return!!this._super()&&!this.options.readOnly},_refreshStateTheming:function(e,t){-1!==Object.keys(this._OPTION_TO_CSS_MAPPING).indexOf(e)&&this.widget().toggleClass(this._OPTION_TO_CSS_MAPPING[e],!!t)},_getImplicitRegExpValidator:function(){if(!this.options.pattern)return null;var i={pattern:this.options.pattern,label:this._getLabelText()};return t.extend(i,this.options.translations.regexp||{}),n.Validation.validatorFactory(e.ValidatorFactory.VALIDATOR_TYPE_REGEXP).createValidator(i)},_GetSubId:function(e){return this.uuid+"_"+e},_IsRTL:function(){return this._rtl},refresh:function(){var e=this._superApply(arguments);return this._rtl="rtl"===this._GetReadingDirection(),this._refreshRequired(this.options.required),e},_refreshRequired:e.EditableValueUtils._refreshRequired,_labelledByChangedForInputComp:e.EditableValueUtils._labelledByChangedForInputComp,_ValidateReturnBoolean:e.EditableValueUtils._ValidateReturnBoolean,_ValidateReturnPromise:e.EditableValueUtils._ValidateReturnPromise,getNodeBySubId:function(e){return this._super(e)},validate:e.EditableValueUtils.validate,_AriaRequiredUnsupported:function(){return!1},widget:function(){return this._DoWrapElement()?this._wrapper:this.element}},!0),e.__registerWidget("oj.ojInputPassword",t.oj.inputBase,{version:"1.0.0",defaultElement:"<input>",widgetEventPrefix:"oj",_ATTR_CHECK:[{attr:"type",setMandatory:"password"}],_CLASS_NAMES:"oj-inputpassword-input",_WIDGET_CLASS_NAMES:"oj-inputpassword oj-form-control oj-component",options:{converter:null,pattern:"",value:void 0},getNodeBySubId:function(e){var t=this._superApply(arguments);return t||"oj-inputpassword-input"===e.subId&&(t=this.element?this.element[0]:null),t||null},_GetDefaultStyleClass:function(){return"oj-inputpassword"}}),e.__registerWidget("oj.ojInputText",t.oj.inputBase,{version:"1.0.0",defaultElement:"<input>",widgetEventPrefix:"oj",_ATTR_CHECK:[{attr:"type",setMandatory:"text"}],_CLASS_NAMES:"oj-inputtext-input",_WIDGET_CLASS_NAMES:"oj-inputtext oj-form-control oj-component",_ALLOWED_TYPES:["email","number","search","tel","text","url"],_CLICK_HANDLER_KEY:"click",options:{clearIcon:"never",converter:null,list:"",pattern:"",virtualKeyboard:"auto"},_ComponentCreate:function(){var e=this._super(),t=this.options.clearIcon;return this._processClearIconAttr(t),this._AddHoverable(this._wrapper),this._SetInputType(this._ALLOWED_TYPES),e},_processClearIconAttr:function(e){var t=this._wrapper[0],n=t.querySelector("a.oj-inputtext-clear-icon-btn");if("never"===e||this.options.disabled||this.options.readOnly)n&&t.removeChild(n),t.classList.remove("oj-inputtext-clearicon-visible"),t.classList.remove("oj-inputtext-clearicon-conditional");else{var i,r;null===n&&((n=document.createElement("a")).className="oj-inputtext-clear-icon-btn oj-component-icon oj-clickable-icon-nocontext",n.setAttribute("tabindex","-1"),n.setAttribute("aria-hidden","true"),n.setAttribute("target","_blank"),(i=document.createElement("span")).className="oj-inputtext-clear-icon",n.appendChild(i),t.appendChild(n),n.addEventListener(this._CLICK_HANDLER_KEY,this._onClearIconClickHandler.bind(this))),"always"===e?t.classList.add("oj-inputtext-clearicon-visible"):(t.classList.remove("oj-inputtext-clearicon-visible"),t.classList.add("oj-inputtext-clearicon-conditional"),(r=t.classList.contains("oj-complete")?this.element[0].value:this.options.value)&&""!==r?t.classList.remove("oj-form-control-empty-clearicon"):t.classList.add("oj-form-control-empty-clearicon"))}},_AfterSetOption:function(e,t){switch(this._super(e,t),e){case"clearIcon":case"value":case"disabled":case"readOnly":this._processClearIconAttr(this.options.clearIcon);break;case"virtualKeyboard":this._SetInputType(this._ALLOWED_TYPES)}},_onInputHandler:function(e){this._super(e);var t=e.target,n=this._wrapper[0];"conditional"===this.options.clearIcon&&(""!==t.value?n.classList.remove("oj-form-control-empty-clearicon"):n.classList.add("oj-form-control-empty-clearicon"))},_onClearIconClickHandler:function(e){var t=this.element[0];t.value="",this._SetRawValue(t.value,e),t.focus(),this._wrapper[0].classList.add("oj-form-control-empty-clearicon")},_onBlurHandler:function(t){var n=this._wrapper[0],i=t.relatedTarget;i&&i.classList.contains("oj-inputtext-clear-icon-btn")&&i.parentElement&&e.DomUtils.isAncestorOrSelf(n,i.parentElement)?n.classList.add("oj-focus"):this._super(t)},getNodeBySubId:function(e){var t=this._superApply(arguments);return t||"oj-inputtext-input"===e.subId&&(t=this.element?this.element[0]:null),t||null},_GetDefaultStyleClass:function(){return"oj-inputtext"},_GetTranslationsSectionName:function(){return"oj-inputBase"},_SetInputType:e.EditableValueUtils._SetInputType}),e.__registerWidget("oj.ojTextArea",t.oj.inputBase,{version:"1.0.0",defaultElement:"<textarea>",widgetEventPrefix:"oj",_ATTR_CHECK:[],_CLASS_NAMES:"oj-textarea-input",_WIDGET_CLASS_NAMES:"oj-textarea oj-form-control oj-component",options:{converter:null,pattern:"",resizeBehavior:"none",rows:void 0},_AfterCreate:function(){var e=this._superApply(arguments);return this._GetContentElement()[0].style.resize=this.options.resizeBehavior,e},_setOption:function(e,t,n){var i=this._superApply(arguments);return"resizeBehavior"===e&&(this._GetContentElement()[0].style.resize=t),i},getNodeBySubId:function(e){var t=this._superApply(arguments);return t||"oj-textarea-input"===e.subId&&(t=this.element?this.element[0]:null),t||null},_GetDefaultStyleClass:function(){return"oj-textarea"},_GetTranslationsSectionName:function(){return"oj-inputBase"},_onKeyUpHandler:function(e){}}),r.extension._WIDGET_NAME="ojInputPassword",r.extension._INNER_ELEM="input",r.extension._GLOBAL_TRANSFER_ATTRS=["accesskey","aria-label","tabindex"],r.extension._ALIASED_PROPS={readonly:"readOnly"},e.CustomElementBridge.register("oj-input-password",{metadata:r}),o.extension._WIDGET_NAME="ojInputText",o.extension._INNER_ELEM="input",o.extension._GLOBAL_TRANSFER_ATTRS=["accesskey","aria-label","tabindex"],o.extension._ALIASED_PROPS={readonly:"readOnly"},e.CustomElementBridge.register("oj-input-text",{metadata:o}),a.extension._WIDGET_NAME="ojTextArea",a.extension._INNER_ELEM="textarea",a.extension._GLOBAL_TRANSFER_ATTRS=["accesskey","aria-label","tabindex"],a.extension._ALIASED_PROPS={readonly:"readOnly"},e.CustomElementBridge.register("oj-text-area",{metadata:a})}),define("ccKoOjExtensions",["knockout","CCi18n","dateTimeUtils","numberFormatHelper","currencyHelper","ojs/ojcore","ojs/ojinputtext","ojs/ojvalidation"],function(e,t,n,i,r,o){"use strict";!function(){var i,o,a,s,l,u,c,p,d,h,m=!0,g="CC-propertyEditor-";a=function(t,n){var i,r,o,a;if(o=e.utils.unwrapObservable(n.type),n.prefix=n.prefix||t.prefix,n.unit=n.unit||t.unit,!o&&n.values&&(o="radio"),t.rules)for(i=t.rules(),a=0;a<i.length;a+=1)if(r=i[a],"required"!==r.rule||!r.params||r.condition&&!r.condition()||n.required===!1||(n.required=!0),!o)switch(r.rule){case"number":o="number";break;case"date":o="date-ojet";break;case"bool":o="checkbox"}e.utils.unwrapObservable(n.type)||(n.type=o||"shortText"),n.label||(n.label=t.label)},i=function(){var e=!0,t=$("#"+this.idBase+"field").val();""===t?$("#"+this.idBase+"controlGroup .cc-required-message").css("display","inline-block"):$("#"+this.idBase+"controlGroup .cc-required-message").css("display","none"),e=n.validateDate(t),e===!1?$("#"+this.idBase+"controlGroup .cc-invalid-date").css("display","inline-block"):$("#"+this.idBase+"controlGroup .cc-invalid-date").css("display","none")},o=function(){var e=!0,t=$("#"+this.idBase+"field").val();e=n.validateTime(t),e===!1&&($("#"+this.idBase+"field").val("T00:00:00"),this.property("T00:00:00"))},s=function(e,t){var n;n="currencyMap"===this.type?this.property()[e.id]:this.property,void 0==n||n.isModified()||n.isValid()?n&&n.forcedModified&&n()&&(n.forcedModified=!1):(n.isModified(!0),n.forcedModified=!0)},h=function(e){$("#"+e).focus()},l=function(e,t){var n=$("#"+e).get(0),i=$("#"+t.target.id);"text"==n.type?u(n,i,!1):u(n,i,!0)},u=function(e,n,i){i?(e.type="text",n.text(t.t("ns.common:resources.hideText"))):(e.type="password",n.text(t.t("ns.common:resources.revealText")))},c=function(e,t){var n=$(t.target),i=$(t.target).prev("input"),r=1===t.which||32===t.which||13===t.which;if(r)"block"!=n.css("display")&&"inline-block"!=n.css("display")||(n.toggle(!1),$(t.target).prev("input").attr("disabled",!1),i.select(),i.val(""),i.focus());else if(9===t.which)return!0},p=function(e,t){var n=$(t.target),i=n.next("input");0===n.val().length&&(e&&(n.attr("disabled","true"),i.toggle(!0)),this.validate())},m=function(e,t){"currencyMap"===this.type&&e?(this.property()[e.id](null),$("#"+this.property()[e.id].formId).focus()):(this.property(null),$("#"+this.property.formId).focus())},e.bindingHandlers.propertyEditor={init:function(t,n){e.utils.unwrapObservable(n());return{controlsDescendantBindings:!0}},update:function(n,u,f,_,v){var y,E,S,b,O,C,T,I,A,P=e.utils.unwrapObservable(u()),D=e.observable(!0),M=t.t("ns.common:resources.numberValidation");if(P.property&&e.isObservable(P.property)){C=P.property,C.extend({validatable:!0}),I=e.utils.unwrapObservable(P.id),A=e.utils.unwrapObservable(P.type),y=new Date,E=new Date(y.getFullYear(),y.getMonth(),y.getDate()),T=!P.clearValue,C.extend({validatable:!0}),S={writable:e.observable(!0),visible:e.observable(!0),currentDate:y,minDate:E,valueUpdate:"change",numericValidationErrorMessage:M};for(O in P)P.hasOwnProperty(O)&&("writable"!==O||e.isObservable(P[O])?S[O]=P[O]:S.writable(P[O]));var U=function(t,n){var i,r=null,o=e.contextFor(this);if(i=o.$parent?"currencyMap"===o.$parent.type:"currencyMap"===o.$parents[1].type,r=i?o.$parent.property()[e.dataFor(this).id]:e.dataFor(this),r.numericJetValidation(!0),"rawValue"===n.option||"valid"===n.option){var a=$(t.target).ojInputText("isValid");a?r.numericJetValidation(!0):r.numericJetValidation(!1)}else r.numericJetValidation(!0)},N=e.pureComputed({read:function(){return C()},write:function(t){var n=S.fractionalDigits,i=!1;if("digit"===e.utils.unwrapObservable(S.type)&&(i=!0),void 0!=t)if(n)C(t.toFixed(n));else{var r=t.toString().split(".");if(r&&2==r.length){if(i)return void C(t.toFixed(0));C(r[1].length>3?t.toFixed(3):t)}else C(t)}else C(t)}});a(C,S),P.writable===!1&&S.writable(!1),S.helpText=e.observable(e.utils.unwrapObservable(P.helpText)),S.isRequiredButMissing=e.computed(function(){return S.required&&e.isObservable(S.property.isModified)&&S.property.isModified()&&null==S.property()},S),S.titleText=e.computed(function(){var e="";return e=S.property.hasOwnProperty("isValid")?S.property.isValid()?S.helpText():S.property.error:S.helpText()},S),b={};var L=e.utils.unwrapObservable(S.type);"currency"!==L&&"currencyMap"!==L&&"digit"!==L||("currency"==L||"currency"===L?S.fractionalDigits=r.currencyObject().fractionalDigits:(S.fractionalDigits=0,S.numericValidationErrorMessage=t.t("ns.common:resources.digitValidation")),"currencyMap"!==L&&(L="number")),"enumerated"===L&&S.propertyValuesValue&&(L="complex-enumerated"),b.name=g+L;var R=$(n).closest("form").attr("id");if(R||(R=$(n).parent().attr("id")),S.idBase=R+"-"+b.name+"-"+(I?I+"-":""),"currencyMap"===L)for(O in C())C().hasOwnProperty(O)&&(C()[O].formId=S.idBase+O+"-field");else C.formId=S.idBase+"field";b.data=S,b.if=e.utils.unwrapObservable(P.if)||"undefined"==typeof e.utils.unwrapObservable(P.if),S.required=e.utils.unwrapObservable(S.required||C.required),"currencyMap"===S.type?$.each(S.property(),function(t){S.property()[t].validate=s,S.property()[t].numericJetValidation=e.observable(!0),S.property()[t].addonFocusInput=h}):(S.validate=s,S.numericJetValidation=D,S.addonFocusInput=h),S.clearValueFunction=m,"revealablePassword"===S.type?(S.togglePasswordVisibility=l,S.clickOrKeydownToUpdatePassword=c,S.blurPasswordField=p,S.keyUpInPasswordField=d):"number"===S.type||"currency"===S.type||"digit"===S.type||e.isObservable(S.type)&&"number"===S.type()?(S.customJetOptionChangeListener=U,S.computedValueWithFractions=N):"currencyMap"===S.type&&$.each(S.property(),function(e){S.property()[e].customJetOptionChangeListener=U,S.property()[e].computedValueWithFractions=N}),"date-ojet"===S.type||"time-ojet"===S.type||"date-time-ojet"===S.type?(S.validateOjetDate=i,S.validateOjetTime=o,S.dateTitleText=t.t("ns.common:resources.datePicker"),S.timeTitleText=t.t("ns.common:resources.timePicker")):!e.isObservable(S.type)||"date-ojet"!==S.type()&&"time-ojet"!==S.type()&&"date-time-ojet"!==S.type||(S.validateOjetDate=i,S.validateOjetTime=o,S.dateTitleText=t.t("ns.common:resources.datePicker"),S.timeTitleText=t.t("ns.common:resources.timePicker")),e.bindingHandlers.template.update(n,function(){return b},f,S,v)}}},e.bindingHandlers.ccDateTime={update:function(t,i,r,o,a){var s=i(),l=e.utils.unwrapObservable(s),u=e.utils.unwrapObservable(l.date),c=e.utils.unwrapObservable(l.format),p=e.utils.unwrapObservable(l.dateFormat),d=e.utils.unwrapObservable(l.timeFormat),h=e.utils.unwrapObservable(l.date);h=n.getFormattedDateTime(u,c,p,d),$(t).text(h)}}}(),function(){var t,n,i,o,a=200,s=300,l=100,u=200;o=function(e){0===$(e.target).closest(".popover").length&&n()},n=function(){t&&(t.data("bs.popover").tip().off("keydown"),t.popover("destroy"),t=null,$(document).off("click",o),$(document).off("focusin",o))},i=function(e,t){var n,i,r,o;return o=$(window),n=t.top-o.scrollTop(),i=t.left-o.scrollLeft(),n<l||n<u&&"top"===e?r="bottom":(n>o.height()-l||n>o.height()-u&&"bottom"===e)&&(r="top"),i<a||i<s&&"left"===e?r="right":(i>o.width()-a||i>o.width()-s&&"right"===e)&&(r="left"),r||e},e.bindingHandlers.popeditor={init:function(a,s,l,u,c){var p,d,h,m=s(),g=e.observable(!0),f=m.type,_=e.bindingHandlers.tabTrap;if(d={html:!0,trigger:m.trigger||"manual",content:"<div class='"+m.class+"'></div>",container:m.container||"body",placement:m.placement||"right"},p=$(a),m.plgProperty=e.observable(null),"currencyMap"===f){var v={};$.each(m.property(),function(t){v[t]=e.observable(e.utils.unwrapObservable(this)).extend(m.validate),v[t].jetValidation=e.observable(!0)}),m.plgProperty(v)}"currencyMap"!==f&&(m.validate.validatable=!0),h=c.extend({id:m.id,title:m.title,focusElement:m.focusElement,property:e.observable(e.utils.unwrapObservable(m.property)).extend(m.validate),plgProperty:e.observable(e.utils.unwrapObservable(m.plgProperty)).extend(m.validate),enumeratedValues:e.observable(e.utils.unwrapObservable(m.enumeratedValues)),jetValidation:e.observable(!0),currencyHelper:r,priceListGroups:m.priceListGroups,type:m.type,save:function(){if("currencyMap"!==h.type&&h.property.isValid()&&g())return m.property()!=h.property()&&m.property(h.property()),n(),p.filter(":focusable").length>0?p.focus():p.find(":focusable").focus(),h.property.isModified()&&m.property.notifySubscribers(m.property(),"valueSubmitted"),!1;if("currencyMap"===h.type){var e=!1,t=!1;if($.each(h.plgProperty(),function(n){this.isModified()&&(e=this.isModified(),t=this.isValid())}),e&&t)m.property(h.plgProperty()),m.property.notifySubscribers(h.$parent,"valueSubmitted"),h.close();else if(e&&!t)return!1}},close:function(){return n(),p.filter(":focusable").length>0?p.focus():p.find(":focusable").focus(),!1},focus:function(e){h.focusElement?$(e).find(h.focusElement).focus():$(e).find(":focusable").focus(),_.constrain($(".popover.in"))},customJetOptionChangeListener:function(t,n){var i=null,r=e.contextFor(this),o="currencyMap"===r.type;if(i=o?r.plgProperty()[e.dataFor(this).id]:r,i.jetValidation(!0),"messagesShown"===n.option){var a=$(t.target).ojInputText("isValid");a?i.jetValidation(!0):i.jetValidation(!1)}else i.jetValidation(!0)},computedValueWithFractions:e.pureComputed({read:function(){return h.property()},write:function(e){void 0!=e?"number"===f?h.property(e.toFixed(0)):"price"===f&&h.property(e.toFixed(r.currencyObject().fractionalDigits)):h.property(e)}})}),p.click(function(r){var a;r.preventDefault();var s=m.edgeDetect||"auto";if("auto"===s?d.placement=i(m.placement,p.offset()):"none"===s&&(d.placement=m.placement),p.popover(d),a=p.data("bs.popover").tip(),a.hasClass("in"))n(),p.filter(":focusable").length>0?p.focus():p.find(":focusable").focus();else{if(n(),"currencyMap"===h.type){var l={};$.each(m.property(),function(t){l[t]=e.observable(e.utils.unwrapObservable(this)).extend(m.validate),l[t].jetValidation=e.observable(!0)}),m.plgProperty(l),h.plgProperty(e.utils.unwrapObservable(m.plgProperty)).extend(m.validate),$.each(h.plgProperty(),function(e){h.plgProperty()[e].extend({validatable:!0}),h.plgProperty()[e].errors=null,h.plgProperty()[e].isModified(!1),h.plgProperty()[e].forcedModified=!1})}else h.property(e.utils.unwrapObservable(m.property)),h.property.errors=null,h.property.isModified(!1),h.property.forcedModified=!1;a.addClass(m.class),a.children(".popover-content").attr("data-bind","template: {name: '"+m.type+"', templateUrl: 'templates/popeditors', afterRender: focus}"),m.wideMode?(a.children(".popover-title").attr("data-bind","template: {name: 'wide-header', templateUrl: 'templates/popeditors'}"),a.addClass("cc-pop-wide")):a.children(".popover-title").attr("data-bind","template: {name: 'header', templateUrl: 'templates/popeditors'}"),a.keydown(function(e){27===e.which&&(n(),p.filter(":focusable").length>0?p.focus():p.find(":focusable").focus())}),window.setTimeout(function(){$(document).click(o),$(document).focusin(o)},1),p.popover("show"),t=p,e.applyBindingsToDescendants(h,a[0])}})}},e.bindingHandlers.popover={init:function(t,r,a,s){var l,u,c,p=r();u={html:!0,trigger:p.trigger||"click",content:"<div class='"+p.class+"'></div>",container:p.container||"body",placement:p.placement||"right"},l=$(t),c={model:p.model||s,save:function(){if(c.property.isValid())return p.property()!=c.property()&&p.property(c.property()),n(),l.filter(":focusable").length>0?l.focus():l.find(":focusable").focus(),p.property.notifySubscribers(p.property(),"valueSubmitted"),!1},close:function(){return n(),l.filter(":focusable").length>0?l.focus():l.find(":focusable").focus(),!1},focus:function(e){$(e).find(":focusable").focus(),tabTrap.constrain($(".popover.in"))}},l.click(function(t){var r;u.placement=i(p.placement,l.offset()),l.popover(u),r=l.data("bs.popover").tip(),n(),r.hasClass("in")||(r.children(".popover-content").attr("data-bind","template: {name: '"+p.name+"', templateUrl: '"+p.templateUrl+"', afterRender: focus}"),r.keydown(function(){27===event.which&&n()}),window.setTimeout(function(){$(document).click(o),$(document).focusin(o)},1),l.popover("show"),e.applyBindingsToDescendants(c,r[0]))})}}}(),e.bindingHandlers.textCheck={update:function(t,n,o,a,s){var l=e.utils.unwrapObservable(n()),u=e.utils.unwrapObservable(l.text),c=e.utils.unwrapObservable(l.type),p=e.utils.unwrapObservable(l.prePend),d=e.utils.unwrapObservable(l.nullReplace),h=e.utils.unwrapObservable(l.prependNull);if(!u&&0!==u||isNaN(parseFloat(u)))u=(p&&h?p:"")+(d?d:"");else if("price"==c||"percent"==c||"number"==c||"digit"==c){var m;m="string"==typeof u?parseFloat(u):u,"number"==typeof u||"string"==typeof u&&u.trim().length>0?"price"==c?u=m<0?"-"+(p||"")+r.handleFractionalDigitsAndLocale(Math.abs(m)):(p||"")+r.handleFractionalDigitsAndLocale(m):"percent"==c?u=(p||"")+i.formatNumber(m,2,"decimal"):"number"==c?u=(p||"")+i.formatNumber(m,2,"decimal"):"digit"==c&&(u=(p||"")+i.formatNumber(m,0,"decimal")):u=(p&&h?p:"")+(d?d:"")}else u=(p||"")+u;e.bindingHandlers.text.update(t,function(){return u})}},function(){var n,i,r,o,a,s=200,l=300,u=100,c=200,p=!0;o=function(e){0!==$(e.target).closest(".popover").length||a(e.target,"datepicker")||a(e.relatedTarget,"oj-datepicker")||i()},a=function(e,t){if(e)do if(1==e.nodeType&&$(e).is("[class*="+t+"]"))return!0;while((e=e.parentElement)&&void 0!==e&&1==e.nodeType);return!1},i=function(){n&&(n.data("bs.popover").tip().off("keydown"),n.popover("destroy"),n=null,$(document).off("click",o),$(document).off("focusin",o))},r=function(e,t){var n,i,r,o;return o=$(window),n=t.top-o.scrollTop(),i=t.left-o.scrollLeft(),n<u||n<c&&"top"===e?r="bottom":(n>o.height()-u||n>o.height()-c&&"bottom"===e)&&(r="top"),i<s||i<l&&"left"===e?r="right":(i>o.width()-s||i>o.width()-l&&"right"===e)&&(r="left"),r||e},e.bindingHandlers.datepopover={init:function(a,s,l,u){var c,d,h,m,g,f=s(),_=e.bindingHandlers.tabTrap,v=!1;d={html:!0,trigger:f.trigger||"click",content:"<div class='"+f.class+"'></div>",container:f.container||"body",placement:f.placement||"right"},c=$(a),h={toDate:e.observable(e.utils.unwrapObservable(f.toDate)),fromDate:e.observable(e.utils.unwrapObservable(f.fromDate)),toDateLabel:t.t("ns.reporting:resources.toText")+" "+t.t("ns.reporting:resources.date")+":"+t.t("ns.reporting:resources.descriptionToAccessCalender"),fromDateLabel:t.t("ns.reporting:resources.fromText")+" "+t.t("ns.reporting:resources.date")+":"+t.t("ns.reporting:resources.descriptionToAccessCalender"),
- toDateText:t.t("ns.reporting:resources.toText"),fromDateText:t.t("ns.reporting:resources.fromText"),customDateRangeText:t.t("ns.reporting:resources.customDateRangeText"),errorMessage:f.errorMessage,dataCollectionStartDate:f.dataCollectionStartDate,yesterday:f.yesterday,save:function(e,t){var n=$("#cc-fromDate").ojInputDate("option","placeholder");return n&&(n=n.toUpperCase()),"true"===$("#cc-fromDate").attr("aria-invalid")||"true"===$("#cc-toDate").attr("aria-invalid")?(f.toDate(void 0),f.fromDate(void 0)):(null===h.toDate()?f.toDate(null):f.toDate(moment(h.toDate()).toDate()),null===h.fromDate()?f.fromDate(null):f.fromDate(moment(h.fromDate()).toDate())),!!(p=f.validation())&&(i(),c.filter(":focusable").length>0?c.focus():c.find(":focusable").focus(),f.toDate.notifySubscribers(f.toDate(),"valueSubmitted"),f.fromDate.notifySubscribers(f.fromDate(),"valueSubmitted"),v=!0,!1)},close:function(){return i(),c.filter(":focusable").length>0?c.focus():c.find(":focusable").focus(),!1},focus:function(e){if(f.initFromDate()&&f.initToDate()){var t=$("#cc-fromDate").ojInputDate("option","placeholder");t&&(t=t.toUpperCase()),$("#cc-fromDate").val(ccDate.formatDateAndTime(f.initFromDate(),null,t,null)),$("#cc-toDate").val(ccDate.formatDateAndTime(f.initToDate(),null,t,null)),f.fromDate(f.initFromDate()),f.toDate(f.initToDate())}$(e).find("#cc-toDate").focus(),$(e).find("#cc-fromDate").focus(),_.constrain($(".popover.in"))}};var y=$(f.container);y.on("hidden.bs.popover",function(){v&&(g=null,m=null,f.initFromDate(null),f.initToDate(null))}),c.click(function(t){var a;t.preventDefault(),d.placement=r(f.placement,c.offset()),c.popover(d),a=c.data("bs.popover").tip(),a.hasClass("in")?(i(),c.filter(":focusable").length>0?c.focus():c.find(":focusable").focus()):(i(),""===f.errorMessage()||void 0===f.errorMessage()?(null==f.toDate()||void 0==f.toDate()?h.toDate(null):h.toDate(ccDate.formatDateAndTime(f.toDate(),null,CCConstants.OJET_INPUT_SHORT_DATE_FORMAT,null)),void 0==f.fromDate()||null==f.fromDate()?h.fromDate(null):h.fromDate(ccDate.formatDateAndTime(f.fromDate(),null,CCConstants.OJET_INPUT_SHORT_DATE_FORMAT,null)),h.errorMessage=f.errorMessage):(h.toDate(null),h.fromDate(null),g=null,m=null,f.initToDate(null),f.initFromDate(null),f.toDate(null),f.errorMessage(""),f.fromDate(null)),a.css("z-index",f.zIndex),a.css("min-height",f.minHeight),a.css("min-width",f.minWidth),a.children(".popover-title").attr("data-bind","template: {name: 'datepickerHeader', templateUrl: 'templates/reporting'}"),a.children(".popover-content").attr("data-bind","template: {name: '"+f.name+"', templateUrl: '"+f.templateUrl+"', afterRender: focus}"),a.keydown(function(e){27===e.which&&i()}),window.setTimeout(function(){$(document).click(o),$(document).focusin(o)},1),c.popover("show"),n=c,e.cleanNode(a[0]),e.applyBindingsToDescendants(h,a[0]))})}},e.bindingHandlers.popover={init:function(t,n,a,s){var l,u,c,p=n();u={html:!0,trigger:p.trigger||"click",content:"<div class='"+p.class+"'></div>",container:p.container||"body",placement:p.placement||"right"},l=$(t),c={model:p.model||s,save:function(){if(c.property.isValid())return p.property()!=c.property()&&p.property(c.property()),i(),l.filter(":focusable").length>0?l.focus():l.find(":focusable").focus(),p.property.notifySubscribers(p.property(),"valueSubmitted"),!1},close:function(){return i(),l.filter(":focusable").length>0?l.focus():l.find(":focusable").focus(),!1},focus:function(e){$(e).find(":focusable").focus(),tabTrap.constrain($(".popover.in"))}},l.click(function(t){var n;u.placement=r(p.placement,l.offset()),l.popover(u),n=l.data("bs.popover").tip(),i(),n.hasClass("in")||(n.children(".popover-content").attr("data-bind","template: {name: '"+p.name+"', templateUrl: '"+p.templateUrl+"', afterRender: focus}"),n.children(".popover-title").attr("data-bind","template: {name: 'datepickerHeader', templateUrl: 'templates/reporting'}"),n.keydown(function(){27===event.which&&i()}),window.setTimeout(function(){$(document).click(o),$(document).focusin(o)},1),l.popover("show"),e.applyBindingsToDescendants(c,n[0]))})}}}()});
- //# sourceMappingURL=cc-ko-oj-extensions.js.map
|