diff --git a/build/calendar/calendar-coverage.js b/build/calendar/calendar-coverage.js index 3ff098381e2..86cbb3c3e6f 100644 --- a/build/calendar/calendar-coverage.js +++ b/build/calendar/calendar-coverage.js @@ -1,6 +1,6 @@ if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/calendar/calendar.js']) { - __coverage__['build/calendar/calendar.js'] = {"path":"build/calendar/calendar.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0,0,0,0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0,0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0,0],"19":[0,0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0,0],"27":[0,0],"28":[0,0,0,0,0],"29":[0,0],"30":[0,0],"31":[0,0,0,0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0,0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0,0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0],"61":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":20},"end":{"line":1,"column":39}}},"2":{"name":"Calendar","line":41,"loc":{"start":{"line":41,"column":0},"end":{"line":41,"column":20}}},"3":{"name":"(anonymous_3)","line":67,"loc":{"start":{"line":67,"column":18},"end":{"line":67,"column":30}}},"4":{"name":"(anonymous_4)","line":81,"loc":{"start":{"line":81,"column":26},"end":{"line":81,"column":38}}},"5":{"name":"(anonymous_5)","line":102,"loc":{"start":{"line":102,"column":29},"end":{"line":102,"column":46}}},"6":{"name":"(anonymous_6)","line":112,"loc":{"start":{"line":112,"column":25},"end":{"line":112,"column":42}}},"7":{"name":"(anonymous_7)","line":124,"loc":{"start":{"line":124,"column":34},"end":{"line":124,"column":46}}},"8":{"name":"(anonymous_8)","line":137,"loc":{"start":{"line":137,"column":21},"end":{"line":137,"column":41}}},"9":{"name":"(anonymous_9)","line":148,"loc":{"start":{"line":148,"column":24},"end":{"line":148,"column":36}}},"10":{"name":"(anonymous_10)","line":158,"loc":{"start":{"line":158,"column":25},"end":{"line":158,"column":39}}},"11":{"name":"(anonymous_11)","line":168,"loc":{"start":{"line":168,"column":25},"end":{"line":168,"column":37}}},"12":{"name":"(anonymous_12)","line":178,"loc":{"start":{"line":178,"column":23},"end":{"line":178,"column":37}}},"13":{"name":"(anonymous_13)","line":273,"loc":{"start":{"line":273,"column":21},"end":{"line":273,"column":35}}},"14":{"name":"(anonymous_14)","line":373,"loc":{"start":{"line":373,"column":21},"end":{"line":373,"column":37}}},"15":{"name":"(anonymous_15)","line":391,"loc":{"start":{"line":391,"column":24},"end":{"line":391,"column":36}}},"16":{"name":"(anonymous_16)","line":436,"loc":{"start":{"line":436,"column":20},"end":{"line":436,"column":33}}},"17":{"name":"(anonymous_17)","line":450,"loc":{"start":{"line":450,"column":19},"end":{"line":450,"column":32}}},"18":{"name":"(anonymous_18)","line":464,"loc":{"start":{"line":464,"column":15},"end":{"line":464,"column":28}}},"19":{"name":"(anonymous_19)","line":478,"loc":{"start":{"line":478,"column":14},"end":{"line":478,"column":27}}},"20":{"name":"(anonymous_20)","line":540,"loc":{"start":{"line":540,"column":20},"end":{"line":540,"column":35}}},"21":{"name":"(anonymous_21)","line":568,"loc":{"start":{"line":568,"column":20},"end":{"line":568,"column":35}}},"22":{"name":"(anonymous_22)","line":591,"loc":{"start":{"line":591,"column":20},"end":{"line":591,"column":35}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":609,"column":89}},"2":{"start":{"line":14,"column":0},"end":{"line":30,"column":32}},"3":{"start":{"line":41,"column":0},"end":{"line":43,"column":1}},"4":{"start":{"line":42,"column":4},"end":{"line":42,"column":62}},"5":{"start":{"line":45,"column":0},"end":{"line":606,"column":3}},"6":{"start":{"line":68,"column":8},"end":{"line":68,"column":46}},"7":{"start":{"line":70,"column":8},"end":{"line":70,"column":29}},"8":{"start":{"line":71,"column":8},"end":{"line":71,"column":41}},"9":{"start":{"line":72,"column":8},"end":{"line":72,"column":38}},"10":{"start":{"line":82,"column":8},"end":{"line":83,"column":56}},"11":{"start":{"line":85,"column":8},"end":{"line":85,"column":60}},"12":{"start":{"line":86,"column":8},"end":{"line":86,"column":129}},"13":{"start":{"line":87,"column":8},"end":{"line":87,"column":78}},"14":{"start":{"line":88,"column":8},"end":{"line":88,"column":78}},"15":{"start":{"line":89,"column":8},"end":{"line":89,"column":77}},"16":{"start":{"line":90,"column":8},"end":{"line":90,"column":93}},"17":{"start":{"line":93,"column":8},"end":{"line":93,"column":96}},"18":{"start":{"line":103,"column":8},"end":{"line":103,"column":31}},"19":{"start":{"line":113,"column":8},"end":{"line":113,"column":43}},"20":{"start":{"line":114,"column":8},"end":{"line":114,"column":46}},"21":{"start":{"line":115,"column":8},"end":{"line":115,"column":24}},"22":{"start":{"line":116,"column":8},"end":{"line":116,"column":42}},"23":{"start":{"line":125,"column":8},"end":{"line":125,"column":80}},"24":{"start":{"line":126,"column":8},"end":{"line":128,"column":9}},"25":{"start":{"line":127,"column":12},"end":{"line":127,"column":57}},"26":{"start":{"line":138,"column":8},"end":{"line":138,"column":62}},"27":{"start":{"line":140,"column":8},"end":{"line":140,"column":40}},"28":{"start":{"line":149,"column":8},"end":{"line":149,"column":43}},"29":{"start":{"line":159,"column":8},"end":{"line":159,"column":46}},"30":{"start":{"line":160,"column":8},"end":{"line":160,"column":29}},"31":{"start":{"line":169,"column":8},"end":{"line":169,"column":43}},"32":{"start":{"line":170,"column":8},"end":{"line":170,"column":41}},"33":{"start":{"line":179,"column":8},"end":{"line":188,"column":25}},"34":{"start":{"line":190,"column":8},"end":{"line":223,"column":9}},"35":{"start":{"line":192,"column":16},"end":{"line":192,"column":27}},"36":{"start":{"line":193,"column":16},"end":{"line":193,"column":26}},"37":{"start":{"line":194,"column":16},"end":{"line":194,"column":22}},"38":{"start":{"line":196,"column":16},"end":{"line":196,"column":28}},"39":{"start":{"line":197,"column":16},"end":{"line":197,"column":26}},"40":{"start":{"line":198,"column":16},"end":{"line":198,"column":22}},"41":{"start":{"line":200,"column":16},"end":{"line":200,"column":28}},"42":{"start":{"line":201,"column":16},"end":{"line":201,"column":26}},"43":{"start":{"line":202,"column":16},"end":{"line":202,"column":22}},"44":{"start":{"line":204,"column":16},"end":{"line":204,"column":27}},"45":{"start":{"line":205,"column":16},"end":{"line":205,"column":26}},"46":{"start":{"line":206,"column":16},"end":{"line":206,"column":22}},"47":{"start":{"line":208,"column":16},"end":{"line":208,"column":36}},"48":{"start":{"line":209,"column":16},"end":{"line":221,"column":17}},"49":{"start":{"line":210,"column":20},"end":{"line":210,"column":56}},"50":{"start":{"line":211,"column":20},"end":{"line":220,"column":21}},"51":{"start":{"line":212,"column":28},"end":{"line":212,"column":55}},"52":{"start":{"line":213,"column":28},"end":{"line":213,"column":62}},"53":{"start":{"line":214,"column":27},"end":{"line":220,"column":21}},"54":{"start":{"line":215,"column":24},"end":{"line":219,"column":25}},"55":{"start":{"line":216,"column":28},"end":{"line":216,"column":67}},"56":{"start":{"line":218,"column":28},"end":{"line":218,"column":62}},"57":{"start":{"line":222,"column":16},"end":{"line":222,"column":22}},"58":{"start":{"line":226,"column":8},"end":{"line":264,"column":9}},"59":{"start":{"line":228,"column":12},"end":{"line":231,"column":13}},"60":{"start":{"line":229,"column":16},"end":{"line":229,"column":69}},"61":{"start":{"line":230,"column":16},"end":{"line":230,"column":27}},"62":{"start":{"line":233,"column":12},"end":{"line":233,"column":32}},"63":{"start":{"line":235,"column":12},"end":{"line":235,"column":53}},"64":{"start":{"line":236,"column":12},"end":{"line":236,"column":41}},"65":{"start":{"line":237,"column":12},"end":{"line":237,"column":78}},"66":{"start":{"line":238,"column":12},"end":{"line":238,"column":45}},"67":{"start":{"line":239,"column":12},"end":{"line":239,"column":56}},"68":{"start":{"line":241,"column":12},"end":{"line":263,"column":13}},"69":{"start":{"line":252,"column":16},"end":{"line":252,"column":49}},"70":{"start":{"line":253,"column":19},"end":{"line":263,"column":13}},"71":{"start":{"line":254,"column":16},"end":{"line":257,"column":17}},"72":{"start":{"line":255,"column":20},"end":{"line":255,"column":69}},"73":{"start":{"line":256,"column":20},"end":{"line":256,"column":53}},"74":{"start":{"line":258,"column":19},"end":{"line":263,"column":13}},"75":{"start":{"line":259,"column":16},"end":{"line":262,"column":17}},"76":{"start":{"line":260,"column":20},"end":{"line":260,"column":68}},"77":{"start":{"line":261,"column":20},"end":{"line":261,"column":53}},"78":{"start":{"line":274,"column":8},"end":{"line":280,"column":21}},"79":{"start":{"line":282,"column":8},"end":{"line":337,"column":9}},"80":{"start":{"line":284,"column":16},"end":{"line":289,"column":17}},"81":{"start":{"line":285,"column":20},"end":{"line":288,"column":21}},"82":{"start":{"line":286,"column":24},"end":{"line":286,"column":51}},"83":{"start":{"line":287,"column":24},"end":{"line":287,"column":80}},"84":{"start":{"line":290,"column":16},"end":{"line":290,"column":22}},"85":{"start":{"line":292,"column":16},"end":{"line":298,"column":17}},"86":{"start":{"line":293,"column":20},"end":{"line":297,"column":21}},"87":{"start":{"line":294,"column":24},"end":{"line":294,"column":85}},"88":{"start":{"line":296,"column":24},"end":{"line":296,"column":80}},"89":{"start":{"line":299,"column":16},"end":{"line":299,"column":22}},"90":{"start":{"line":301,"column":16},"end":{"line":335,"column":17}},"91":{"start":{"line":302,"column":20},"end":{"line":334,"column":21}},"92":{"start":{"line":303,"column":24},"end":{"line":303,"column":51}},"93":{"start":{"line":304,"column":24},"end":{"line":304,"column":79}},"94":{"start":{"line":305,"column":24},"end":{"line":305,"column":73}},"95":{"start":{"line":306,"column":27},"end":{"line":334,"column":21}},"96":{"start":{"line":307,"column":24},"end":{"line":313,"column":25}},"97":{"start":{"line":308,"column":28},"end":{"line":308,"column":89}},"98":{"start":{"line":309,"column":28},"end":{"line":309,"column":58}},"99":{"start":{"line":311,"column":28},"end":{"line":311,"column":83}},"100":{"start":{"line":312,"column":28},"end":{"line":312,"column":77}},"101":{"start":{"line":314,"column":27},"end":{"line":334,"column":21}},"102":{"start":{"line":315,"column":24},"end":{"line":322,"column":25}},"103":{"start":{"line":316,"column":28},"end":{"line":316,"column":73}},"104":{"start":{"line":317,"column":28},"end":{"line":317,"column":96}},"105":{"start":{"line":318,"column":28},"end":{"line":318,"column":66}},"106":{"start":{"line":320,"column":28},"end":{"line":320,"column":83}},"107":{"start":{"line":321,"column":28},"end":{"line":321,"column":77}},"108":{"start":{"line":323,"column":27},"end":{"line":334,"column":21}},"109":{"start":{"line":324,"column":24},"end":{"line":333,"column":25}},"110":{"start":{"line":325,"column":28},"end":{"line":325,"column":73}},"111":{"start":{"line":326,"column":28},"end":{"line":326,"column":55}},"112":{"start":{"line":327,"column":28},"end":{"line":327,"column":96}},"113":{"start":{"line":328,"column":28},"end":{"line":328,"column":66}},"114":{"start":{"line":330,"column":28},"end":{"line":330,"column":55}},"115":{"start":{"line":331,"column":28},"end":{"line":331,"column":83}},"116":{"start":{"line":332,"column":28},"end":{"line":332,"column":77}},"117":{"start":{"line":336,"column":16},"end":{"line":336,"column":22}},"118":{"start":{"line":339,"column":8},"end":{"line":364,"column":9}},"119":{"start":{"line":347,"column":12},"end":{"line":347,"column":93}},"120":{"start":{"line":348,"column":15},"end":{"line":364,"column":9}},"121":{"start":{"line":355,"column":12},"end":{"line":355,"column":40}},"122":{"start":{"line":356,"column":15},"end":{"line":364,"column":9}},"123":{"start":{"line":363,"column":12},"end":{"line":363,"column":40}},"124":{"start":{"line":374,"column":8},"end":{"line":375,"column":46}},"125":{"start":{"line":377,"column":8},"end":{"line":380,"column":9}},"126":{"start":{"line":379,"column":12},"end":{"line":379,"column":25}},"127":{"start":{"line":382,"column":8},"end":{"line":382,"column":67}},"128":{"start":{"line":392,"column":8},"end":{"line":392,"column":58}},"129":{"start":{"line":394,"column":8},"end":{"line":398,"column":20}},"130":{"start":{"line":400,"column":8},"end":{"line":402,"column":9}},"131":{"start":{"line":401,"column":12},"end":{"line":401,"column":19}},"132":{"start":{"line":404,"column":8},"end":{"line":407,"column":9}},"133":{"start":{"line":405,"column":12},"end":{"line":405,"column":66}},"134":{"start":{"line":406,"column":12},"end":{"line":406,"column":69}},"135":{"start":{"line":409,"column":8},"end":{"line":417,"column":9}},"136":{"start":{"line":410,"column":12},"end":{"line":416,"column":13}},"137":{"start":{"line":411,"column":16},"end":{"line":415,"column":17}},"138":{"start":{"line":412,"column":20},"end":{"line":412,"column":48}},"139":{"start":{"line":414,"column":20},"end":{"line":414,"column":26}},"140":{"start":{"line":419,"column":8},"end":{"line":427,"column":9}},"141":{"start":{"line":420,"column":12},"end":{"line":426,"column":13}},"142":{"start":{"line":421,"column":16},"end":{"line":425,"column":17}},"143":{"start":{"line":422,"column":20},"end":{"line":422,"column":48}},"144":{"start":{"line":424,"column":20},"end":{"line":424,"column":26}},"145":{"start":{"line":437,"column":8},"end":{"line":437,"column":64}},"146":{"start":{"line":438,"column":8},"end":{"line":440,"column":9}},"147":{"start":{"line":439,"column":12},"end":{"line":439,"column":21}},"148":{"start":{"line":441,"column":8},"end":{"line":441,"column":20}},"149":{"start":{"line":451,"column":8},"end":{"line":451,"column":63}},"150":{"start":{"line":452,"column":8},"end":{"line":454,"column":9}},"151":{"start":{"line":453,"column":12},"end":{"line":453,"column":21}},"152":{"start":{"line":455,"column":8},"end":{"line":455,"column":20}},"153":{"start":{"line":465,"column":8},"end":{"line":465,"column":63}},"154":{"start":{"line":466,"column":8},"end":{"line":468,"column":9}},"155":{"start":{"line":467,"column":12},"end":{"line":467,"column":21}},"156":{"start":{"line":469,"column":8},"end":{"line":469,"column":20}},"157":{"start":{"line":479,"column":8},"end":{"line":479,"column":62}},"158":{"start":{"line":480,"column":8},"end":{"line":482,"column":9}},"159":{"start":{"line":481,"column":12},"end":{"line":481,"column":21}},"160":{"start":{"line":483,"column":8},"end":{"line":483,"column":20}},"161":{"start":{"line":542,"column":16},"end":{"line":545,"column":57}},"162":{"start":{"line":547,"column":16},"end":{"line":555,"column":17}},"163":{"start":{"line":550,"column":20},"end":{"line":550,"column":35}},"164":{"start":{"line":551,"column":23},"end":{"line":555,"column":17}},"165":{"start":{"line":552,"column":20},"end":{"line":552,"column":56}},"166":{"start":{"line":553,"column":23},"end":{"line":555,"column":17}},"167":{"start":{"line":554,"column":20},"end":{"line":554,"column":95}},"168":{"start":{"line":569,"column":16},"end":{"line":578,"column":17}},"169":{"start":{"line":570,"column":20},"end":{"line":571,"column":59}},"170":{"start":{"line":572,"column":20},"end":{"line":574,"column":21}},"171":{"start":{"line":573,"column":24},"end":{"line":573,"column":46}},"172":{"start":{"line":575,"column":20},"end":{"line":575,"column":34}},"173":{"start":{"line":577,"column":20},"end":{"line":577,"column":32}},"174":{"start":{"line":592,"column":16},"end":{"line":602,"column":17}},"175":{"start":{"line":593,"column":20},"end":{"line":593,"column":51}},"176":{"start":{"line":595,"column":20},"end":{"line":597,"column":21}},"177":{"start":{"line":596,"column":24},"end":{"line":596,"column":106}},"178":{"start":{"line":599,"column":20},"end":{"line":599,"column":52}},"179":{"start":{"line":601,"column":20},"end":{"line":601,"column":32}}},"branchMap":{"1":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":8}},{"start":{"line":126,"column":8},"end":{"line":126,"column":8}}]},"2":{"line":180,"type":"cond-expr","locations":[{"start":{"line":180,"column":51},"end":{"line":180,"column":55}},{"start":{"line":180,"column":58},"end":{"line":180,"column":101}}]},"3":{"line":190,"type":"switch","locations":[{"start":{"line":191,"column":12},"end":{"line":194,"column":22}},{"start":{"line":195,"column":12},"end":{"line":198,"column":22}},{"start":{"line":199,"column":12},"end":{"line":202,"column":22}},{"start":{"line":203,"column":12},"end":{"line":206,"column":22}},{"start":{"line":207,"column":12},"end":{"line":207,"column":27}},{"start":{"line":207,"column":28},"end":{"line":222,"column":22}}]},"4":{"line":209,"type":"if","locations":[{"start":{"line":209,"column":16},"end":{"line":209,"column":16}},{"start":{"line":209,"column":16},"end":{"line":209,"column":16}}]},"5":{"line":211,"type":"if","locations":[{"start":{"line":211,"column":20},"end":{"line":211,"column":20}},{"start":{"line":211,"column":20},"end":{"line":211,"column":20}}]},"6":{"line":211,"type":"binary-expr","locations":[{"start":{"line":211,"column":24},"end":{"line":211,"column":44}},{"start":{"line":211,"column":48},"end":{"line":211,"column":101}}]},"7":{"line":214,"type":"if","locations":[{"start":{"line":214,"column":27},"end":{"line":214,"column":27}},{"start":{"line":214,"column":27},"end":{"line":214,"column":27}}]},"8":{"line":214,"type":"binary-expr","locations":[{"start":{"line":214,"column":31},"end":{"line":214,"column":53}},{"start":{"line":214,"column":57},"end":{"line":214,"column":86}}]},"9":{"line":215,"type":"if","locations":[{"start":{"line":215,"column":24},"end":{"line":215,"column":24}},{"start":{"line":215,"column":24},"end":{"line":215,"column":24}}]},"10":{"line":226,"type":"if","locations":[{"start":{"line":226,"column":8},"end":{"line":226,"column":8}},{"start":{"line":226,"column":8},"end":{"line":226,"column":8}}]},"11":{"line":226,"type":"binary-expr","locations":[{"start":{"line":226,"column":12},"end":{"line":226,"column":32}},{"start":{"line":226,"column":36},"end":{"line":226,"column":54}},{"start":{"line":226,"column":58},"end":{"line":226,"column":78}},{"start":{"line":226,"column":82},"end":{"line":226,"column":103}}]},"12":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":12},"end":{"line":228,"column":12}},{"start":{"line":228,"column":12},"end":{"line":228,"column":12}}]},"13":{"line":241,"type":"if","locations":[{"start":{"line":241,"column":12},"end":{"line":241,"column":12}},{"start":{"line":241,"column":12},"end":{"line":241,"column":12}}]},"14":{"line":253,"type":"if","locations":[{"start":{"line":253,"column":19},"end":{"line":253,"column":19}},{"start":{"line":253,"column":19},"end":{"line":253,"column":19}}]},"15":{"line":254,"type":"if","locations":[{"start":{"line":254,"column":16},"end":{"line":254,"column":16}},{"start":{"line":254,"column":16},"end":{"line":254,"column":16}}]},"16":{"line":258,"type":"if","locations":[{"start":{"line":258,"column":19},"end":{"line":258,"column":19}},{"start":{"line":258,"column":19},"end":{"line":258,"column":19}}]},"17":{"line":259,"type":"if","locations":[{"start":{"line":259,"column":16},"end":{"line":259,"column":16}},{"start":{"line":259,"column":16},"end":{"line":259,"column":16}}]},"18":{"line":275,"type":"binary-expr","locations":[{"start":{"line":275,"column":31},"end":{"line":275,"column":60}},{"start":{"line":276,"column":32},"end":{"line":276,"column":72}},{"start":{"line":277,"column":32},"end":{"line":277,"column":72}}]},"19":{"line":282,"type":"switch","locations":[{"start":{"line":283,"column":12},"end":{"line":290,"column":22}},{"start":{"line":291,"column":12},"end":{"line":299,"column":22}},{"start":{"line":300,"column":12},"end":{"line":336,"column":22}}]},"20":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":16},"end":{"line":284,"column":16}},{"start":{"line":284,"column":16},"end":{"line":284,"column":16}}]},"21":{"line":285,"type":"if","locations":[{"start":{"line":285,"column":20},"end":{"line":285,"column":20}},{"start":{"line":285,"column":20},"end":{"line":285,"column":20}}]},"22":{"line":292,"type":"if","locations":[{"start":{"line":292,"column":16},"end":{"line":292,"column":16}},{"start":{"line":292,"column":16},"end":{"line":292,"column":16}}]},"23":{"line":293,"type":"if","locations":[{"start":{"line":293,"column":20},"end":{"line":293,"column":20}},{"start":{"line":293,"column":20},"end":{"line":293,"column":20}}]},"24":{"line":301,"type":"if","locations":[{"start":{"line":301,"column":16},"end":{"line":301,"column":16}},{"start":{"line":301,"column":16},"end":{"line":301,"column":16}}]},"25":{"line":302,"type":"if","locations":[{"start":{"line":302,"column":20},"end":{"line":302,"column":20}},{"start":{"line":302,"column":20},"end":{"line":302,"column":20}}]},"26":{"line":302,"type":"binary-expr","locations":[{"start":{"line":302,"column":24},"end":{"line":302,"column":35}},{"start":{"line":302,"column":39},"end":{"line":302,"column":50}},{"start":{"line":302,"column":54},"end":{"line":302,"column":66}}]},"27":{"line":306,"type":"if","locations":[{"start":{"line":306,"column":27},"end":{"line":306,"column":27}},{"start":{"line":306,"column":27},"end":{"line":306,"column":27}}]},"28":{"line":306,"type":"binary-expr","locations":[{"start":{"line":306,"column":33},"end":{"line":306,"column":51}},{"start":{"line":306,"column":55},"end":{"line":306,"column":65}},{"start":{"line":306,"column":71},"end":{"line":306,"column":89}},{"start":{"line":306,"column":93},"end":{"line":306,"column":103}},{"start":{"line":306,"column":109},"end":{"line":306,"column":121}}]},"29":{"line":307,"type":"if","locations":[{"start":{"line":307,"column":24},"end":{"line":307,"column":24}},{"start":{"line":307,"column":24},"end":{"line":307,"column":24}}]},"30":{"line":314,"type":"if","locations":[{"start":{"line":314,"column":27},"end":{"line":314,"column":27}},{"start":{"line":314,"column":27},"end":{"line":314,"column":27}}]},"31":{"line":314,"type":"binary-expr","locations":[{"start":{"line":314,"column":33},"end":{"line":314,"column":51}},{"start":{"line":314,"column":55},"end":{"line":314,"column":65}},{"start":{"line":314,"column":71},"end":{"line":314,"column":89}},{"start":{"line":314,"column":93},"end":{"line":314,"column":103}},{"start":{"line":314,"column":109},"end":{"line":314,"column":120}}]},"32":{"line":315,"type":"if","locations":[{"start":{"line":315,"column":24},"end":{"line":315,"column":24}},{"start":{"line":315,"column":24},"end":{"line":315,"column":24}}]},"33":{"line":323,"type":"if","locations":[{"start":{"line":323,"column":27},"end":{"line":323,"column":27}},{"start":{"line":323,"column":27},"end":{"line":323,"column":27}}]},"34":{"line":324,"type":"if","locations":[{"start":{"line":324,"column":24},"end":{"line":324,"column":24}},{"start":{"line":324,"column":24},"end":{"line":324,"column":24}}]},"35":{"line":339,"type":"if","locations":[{"start":{"line":339,"column":8},"end":{"line":339,"column":8}},{"start":{"line":339,"column":8},"end":{"line":339,"column":8}}]},"36":{"line":348,"type":"if","locations":[{"start":{"line":348,"column":15},"end":{"line":348,"column":15}},{"start":{"line":348,"column":15},"end":{"line":348,"column":15}}]},"37":{"line":356,"type":"if","locations":[{"start":{"line":356,"column":15},"end":{"line":356,"column":15}},{"start":{"line":356,"column":15},"end":{"line":356,"column":15}}]},"38":{"line":377,"type":"if","locations":[{"start":{"line":377,"column":8},"end":{"line":377,"column":8}},{"start":{"line":377,"column":8},"end":{"line":377,"column":8}}]},"39":{"line":377,"type":"binary-expr","locations":[{"start":{"line":377,"column":13},"end":{"line":377,"column":20}},{"start":{"line":377,"column":24},"end":{"line":377,"column":62}},{"start":{"line":378,"column":13},"end":{"line":378,"column":20}},{"start":{"line":378,"column":25},"end":{"line":378,"column":55}}]},"40":{"line":400,"type":"if","locations":[{"start":{"line":400,"column":8},"end":{"line":400,"column":8}},{"start":{"line":400,"column":8},"end":{"line":400,"column":8}}]},"41":{"line":400,"type":"binary-expr","locations":[{"start":{"line":400,"column":12},"end":{"line":400,"column":20}},{"start":{"line":400,"column":24},"end":{"line":400,"column":32}}]},"42":{"line":409,"type":"if","locations":[{"start":{"line":409,"column":8},"end":{"line":409,"column":8}},{"start":{"line":409,"column":8},"end":{"line":409,"column":8}}]},"43":{"line":411,"type":"if","locations":[{"start":{"line":411,"column":16},"end":{"line":411,"column":16}},{"start":{"line":411,"column":16},"end":{"line":411,"column":16}}]},"44":{"line":419,"type":"if","locations":[{"start":{"line":419,"column":8},"end":{"line":419,"column":8}},{"start":{"line":419,"column":8},"end":{"line":419,"column":8}}]},"45":{"line":421,"type":"if","locations":[{"start":{"line":421,"column":16},"end":{"line":421,"column":16}},{"start":{"line":421,"column":16},"end":{"line":421,"column":16}}]},"46":{"line":438,"type":"if","locations":[{"start":{"line":438,"column":8},"end":{"line":438,"column":8}},{"start":{"line":438,"column":8},"end":{"line":438,"column":8}}]},"47":{"line":452,"type":"if","locations":[{"start":{"line":452,"column":8},"end":{"line":452,"column":8}},{"start":{"line":452,"column":8},"end":{"line":452,"column":8}}]},"48":{"line":466,"type":"if","locations":[{"start":{"line":466,"column":8},"end":{"line":466,"column":8}},{"start":{"line":466,"column":8},"end":{"line":466,"column":8}}]},"49":{"line":480,"type":"if","locations":[{"start":{"line":480,"column":8},"end":{"line":480,"column":8}},{"start":{"line":480,"column":8},"end":{"line":480,"column":8}}]},"50":{"line":547,"type":"if","locations":[{"start":{"line":547,"column":16},"end":{"line":547,"column":16}},{"start":{"line":547,"column":16},"end":{"line":547,"column":16}}]},"51":{"line":547,"type":"binary-expr","locations":[{"start":{"line":547,"column":21},"end":{"line":547,"column":29}},{"start":{"line":547,"column":33},"end":{"line":547,"column":73}},{"start":{"line":548,"column":21},"end":{"line":548,"column":29}},{"start":{"line":548,"column":33},"end":{"line":548,"column":76}}]},"52":{"line":551,"type":"if","locations":[{"start":{"line":551,"column":23},"end":{"line":551,"column":23}},{"start":{"line":551,"column":23},"end":{"line":551,"column":23}}]},"53":{"line":551,"type":"binary-expr","locations":[{"start":{"line":551,"column":27},"end":{"line":551,"column":34}},{"start":{"line":551,"column":38},"end":{"line":551,"column":71}}]},"54":{"line":553,"type":"if","locations":[{"start":{"line":553,"column":23},"end":{"line":553,"column":23}},{"start":{"line":553,"column":23},"end":{"line":553,"column":23}}]},"55":{"line":553,"type":"binary-expr","locations":[{"start":{"line":553,"column":27},"end":{"line":553,"column":34}},{"start":{"line":553,"column":38},"end":{"line":553,"column":74}}]},"56":{"line":569,"type":"if","locations":[{"start":{"line":569,"column":16},"end":{"line":569,"column":16}},{"start":{"line":569,"column":16},"end":{"line":569,"column":16}}]},"57":{"line":572,"type":"if","locations":[{"start":{"line":572,"column":20},"end":{"line":572,"column":20}},{"start":{"line":572,"column":20},"end":{"line":572,"column":20}}]},"58":{"line":572,"type":"binary-expr","locations":[{"start":{"line":572,"column":24},"end":{"line":572,"column":31}},{"start":{"line":572,"column":35},"end":{"line":572,"column":75}}]},"59":{"line":592,"type":"if","locations":[{"start":{"line":592,"column":16},"end":{"line":592,"column":16}},{"start":{"line":592,"column":16},"end":{"line":592,"column":16}}]},"60":{"line":595,"type":"if","locations":[{"start":{"line":595,"column":20},"end":{"line":595,"column":20}},{"start":{"line":595,"column":20},"end":{"line":595,"column":20}}]},"61":{"line":595,"type":"binary-expr","locations":[{"start":{"line":595,"column":24},"end":{"line":595,"column":31}},{"start":{"line":595,"column":35},"end":{"line":595,"column":111}}]}},"code":["(function () { YUI.add('calendar', function (Y, NAME) {","","/**"," * The Calendar component is a UI widget that allows users"," * to view dates in a two-dimensional month grid, as well as"," * to select one or more dates, or ranges of dates. Calendar"," * is generated dynamically and relies on the developer to"," * provide for a progressive enhancement alternative."," *"," *"," * @module calendar"," */","","var getCN = Y.ClassNameManager.getClassName,"," CALENDAR = 'calendar',"," KEY_DOWN = 40,"," KEY_UP = 38,"," KEY_LEFT = 37,"," KEY_RIGHT = 39,"," KEY_ENTER = 13,"," KEY_SPACE = 32,"," CAL_DAY_SELECTED = getCN(CALENDAR, 'day-selected'),"," CAL_DAY_HILITED = getCN(CALENDAR, 'day-highlighted'),"," CAL_DAY = getCN(CALENDAR, 'day'),"," CAL_PREVMONTH_DAY = getCN(CALENDAR, 'prevmonth-day'),"," CAL_NEXTMONTH_DAY = getCN(CALENDAR, 'nextmonth-day'),"," CAL_GRID = getCN(CALENDAR, 'grid'),"," ydate = Y.DataType.Date,"," CAL_PANE = getCN(CALENDAR, 'pane'),"," os = Y.UA.os;","","/** Create a calendar view to represent a single or multiple"," * month range of dates, rendered as a grid with date and"," * weekday labels."," *"," * @class Calendar"," * @extends CalendarBase"," * @param config {Object} Configuration object (see Configuration attributes)"," * @constructor"," */","function Calendar() {"," Calendar.superclass.constructor.apply ( this, arguments );","}","","Y.Calendar = Y.extend(Calendar, Y.CalendarBase, {",""," _keyEvents: [],",""," _highlightedDateNode: null,",""," /**"," * A property tracking the last selected date on the calendar, for the"," * purposes of multiple selection."," *"," * @property _lastSelectedDate"," * @type Date"," * @default null"," * @private"," */"," _lastSelectedDate: null,",""," /**"," * Designated initializer. Activates the navigation plugin for the calendar."," *"," * @method initializer"," */"," initializer : function () {"," this.plug(Y.Plugin.CalendarNavigator);",""," this._keyEvents = [];"," this._highlightedDateNode = null;"," this._lastSelectedDate = null;"," },",""," /**"," * Overrides the _bindCalendarEvents placeholder in CalendarBase"," * and binds calendar events during bindUI stage."," * @method _bindCalendarEvents"," * @protected"," */"," _bindCalendarEvents : function () {"," var contentBox = this.get('contentBox'),"," pane = contentBox.one(\".\" + CAL_PANE);",""," pane.on(\"selectstart\", this._preventSelectionStart);"," pane.delegate(\"click\", this._clickCalendar, \".\" + CAL_DAY + \", .\" + CAL_PREVMONTH_DAY + \", .\" + CAL_NEXTMONTH_DAY, this);"," pane.delegate(\"keydown\", this._keydownCalendar, \".\" + CAL_GRID, this);"," pane.delegate(\"focus\", this._focusCalendarGrid, \".\" + CAL_GRID, this);"," pane.delegate(\"focus\", this._focusCalendarCell, \".\" + CAL_DAY, this);"," pane.delegate(\"blur\", this._blurCalendarGrid, \".\" + CAL_GRID + \",.\" + CAL_DAY, this);","",""," this.after(['minimumDateChange', 'maximumDateChange'], this._afterCustomRendererChange);"," },",""," /**"," * Prevents text selection if it is started within the calendar pane"," * @method _preventSelectionStart"," * @param event {Event} The selectstart event"," * @protected"," */"," _preventSelectionStart : function (event) {"," event.preventDefault();"," },",""," /**"," * Highlights a specific date node with keyboard highlight class"," * @method _highlightDateNode"," * @param oDate {Date} Date corresponding the node to be highlighted"," * @protected"," */"," _highlightDateNode : function (oDate) {"," this._unhighlightCurrentDateNode();"," var newNode = this._dateToNode(oDate);"," newNode.focus();"," newNode.addClass(CAL_DAY_HILITED);"," },",""," /**"," * Unhighlights a specific date node currently highlighted with keyboard highlight class"," * @method _unhighlightCurrentDateNode"," * @protected"," */"," _unhighlightCurrentDateNode : function () {"," var allHilitedNodes = this.get(\"contentBox\").all(\".\" + CAL_DAY_HILITED);"," if (allHilitedNodes) {"," allHilitedNodes.removeClass(CAL_DAY_HILITED);"," }"," },",""," /**"," * Returns the grid number for a specific calendar grid (for multi-grid templates)"," * @method _getGridNumber"," * @param gridNode {Node} Node corresponding to a specific grid"," * @protected"," */"," _getGridNumber : function (gridNode) {"," var idParts = gridNode.get(\"id\").split(\"_\").reverse();",""," return parseInt(idParts[0], 10);"," },",""," /**"," * Handler for loss of focus of calendar grid"," * @method _blurCalendarGrid"," * @protected"," */"," _blurCalendarGrid : function () {"," this._unhighlightCurrentDateNode();"," },","",""," /**"," * Handler for gain of focus of calendar cell"," * @method _focusCalendarCell"," * @protected"," */"," _focusCalendarCell : function (ev) {"," this._highlightedDateNode = ev.target;"," ev.stopPropagation();"," },",""," /**"," * Handler for gain of focus of calendar grid"," * @method _focusCalendarGrid"," * @protected"," */"," _focusCalendarGrid : function () {"," this._unhighlightCurrentDateNode();"," this._highlightedDateNode = null;"," },",""," /**"," * Handler for keyboard press on a calendar grid"," * @method _keydownCalendar"," * @protected"," */"," _keydownCalendar : function (ev) {"," var gridNum = this._getGridNumber(ev.target),"," curDate = !this._highlightedDateNode ? null : this._nodeToDate(this._highlightedDateNode),"," keyCode = ev.keyCode,"," dayNum = 0,"," dir = '',"," selMode,"," newDate,"," startDate,"," endDate,"," lastPaneDate;",""," switch(keyCode) {"," case KEY_DOWN:"," dayNum = 7;"," dir = 's';"," break;"," case KEY_UP:"," dayNum = -7;"," dir = 'n';"," break;"," case KEY_LEFT:"," dayNum = -1;"," dir = 'w';"," break;"," case KEY_RIGHT:"," dayNum = 1;"," dir = 'e';"," break;"," case KEY_SPACE: case KEY_ENTER:"," ev.preventDefault();"," if (this._highlightedDateNode) {"," selMode = this.get(\"selectionMode\");"," if (selMode === \"single\" && !this._highlightedDateNode.hasClass(CAL_DAY_SELECTED)) {"," this._clearSelection(true);"," this._addDateToSelection(curDate);"," } else if (selMode === \"multiple\" || selMode === \"multiple-sticky\") {"," if (this._highlightedDateNode.hasClass(CAL_DAY_SELECTED)) {"," this._removeDateFromSelection(curDate);"," } else {"," this._addDateToSelection(curDate);"," }"," }"," }"," break;"," }","",""," if (keyCode === KEY_DOWN || keyCode === KEY_UP || keyCode === KEY_LEFT || keyCode === KEY_RIGHT) {",""," if (!curDate) {"," curDate = ydate.addMonths(this.get(\"date\"), gridNum);"," dayNum = 0;"," }",""," ev.preventDefault();",""," newDate = ydate.addDays(curDate, dayNum);"," startDate = this.get(\"date\");"," endDate = ydate.addMonths(this.get(\"date\"), this._paneNumber - 1);"," lastPaneDate = new Date(endDate);"," endDate.setDate(ydate.daysInMonth(endDate));",""," if (ydate.isInRange(newDate, startDate, endDate)) {","/*"," var paneShift = (newDate.getMonth() - curDate.getMonth()) % 10;",""," if (paneShift != 0) {"," var newGridNum = gridNum + paneShift,"," contentBox = this.get('contentBox'),"," newPane = contentBox.one(\"#\" + this._calendarId + \"_pane_\" + newGridNum);"," newPane.focus();"," }","*/"," this._highlightDateNode(newDate);"," } else if (ydate.isGreater(startDate, newDate)) {"," if (!ydate.isGreaterOrEqual(this.get(\"minimumDate\"), startDate)) {"," this.set(\"date\", ydate.addMonths(startDate, -1));"," this._highlightDateNode(newDate);"," }"," } else if (ydate.isGreater(newDate, endDate)) {"," if (!ydate.isGreaterOrEqual(lastPaneDate, this.get(\"maximumDate\"))) {"," this.set(\"date\", ydate.addMonths(startDate, 1));"," this._highlightDateNode(newDate);"," }"," }"," }"," },",""," /**"," * Handles the calendar clicks based on selection mode."," * @method _clickCalendar"," * @param {Event} ev A click event"," * @private"," */"," _clickCalendar : function (ev) {"," var clickedCell = ev.currentTarget,"," clickedCellIsDay = clickedCell.hasClass(CAL_DAY) &&"," !clickedCell.hasClass(CAL_PREVMONTH_DAY) &&"," !clickedCell.hasClass(CAL_NEXTMONTH_DAY),",""," clickedCellIsSelected = clickedCell.hasClass(CAL_DAY_SELECTED),"," selectedDate;",""," switch (this.get(\"selectionMode\")) {"," case(\"single\"):"," if (clickedCellIsDay) {"," if (!clickedCellIsSelected) {"," this._clearSelection(true);"," this._addDateToSelection(this._nodeToDate(clickedCell));"," }"," }"," break;"," case(\"multiple-sticky\"):"," if (clickedCellIsDay) {"," if (clickedCellIsSelected) {"," this._removeDateFromSelection(this._nodeToDate(clickedCell));"," } else {"," this._addDateToSelection(this._nodeToDate(clickedCell));"," }"," }"," break;"," case(\"multiple\"):"," if (clickedCellIsDay) {"," if (!ev.metaKey && !ev.ctrlKey && !ev.shiftKey) {"," this._clearSelection(true);"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," } else if (((os === 'macintosh' && ev.metaKey) || (os !== 'macintosh' && ev.ctrlKey)) && !ev.shiftKey) {"," if (clickedCellIsSelected) {"," this._removeDateFromSelection(this._nodeToDate(clickedCell));"," this._lastSelectedDate = null;"," } else {"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," } else if (((os === 'macintosh' && ev.metaKey) || (os !== 'macintosh' && ev.ctrlKey)) && ev.shiftKey) {"," if (this._lastSelectedDate) {"," selectedDate = this._nodeToDate(clickedCell);"," this._addDateRangeToSelection(selectedDate, this._lastSelectedDate);"," this._lastSelectedDate = selectedDate;"," } else {"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," } else if (ev.shiftKey) {"," if (this._lastSelectedDate) {"," selectedDate = this._nodeToDate(clickedCell);"," this._clearSelection(true);"," this._addDateRangeToSelection(selectedDate, this._lastSelectedDate);"," this._lastSelectedDate = selectedDate;"," } else {"," this._clearSelection(true);"," this._lastSelectedDate = this._nodeToDate(clickedCell);"," this._addDateToSelection(this._lastSelectedDate);"," }"," }"," }"," break;"," }",""," if (clickedCellIsDay) {"," /**"," * Fired when a specific date cell in the calendar is clicked. The event carries a"," * payload which includes a `cell` property corresponding to the node of the actual"," * date cell, and a `date` property, with the `Date` that was clicked."," *"," * @event dateClick"," */"," this.fire(\"dateClick\", {cell: clickedCell, date: this._nodeToDate(clickedCell)});"," } else if (clickedCell.hasClass(CAL_PREVMONTH_DAY)) {"," /**"," * Fired when any of the previous month's days displayed before the calendar grid"," * are clicked."," *"," * @event prevMonthClick"," */"," this.fire(\"prevMonthClick\");"," } else if (clickedCell.hasClass(CAL_NEXTMONTH_DAY)) {"," /**"," * Fired when any of the next month's days displayed after the calendar grid"," * are clicked."," *"," * @event nextMonthClick"," */"," this.fire(\"nextMonthClick\");"," }"," },",""," /**"," * Overrides CalendarBase.prototype._canBeSelected to disable"," * nodes earlier than minimumDate and later than maximumDate"," * @method _canBeSelected"," * @private"," */"," _canBeSelected : function (date) {"," var minDate = this.get('minimumDate'),"," maxDate = this.get('maximumDate');",""," if ((minDate && !ydate.isGreaterOrEqual(date, minDate)) ||"," (maxDate && ydate.isGreater(date, maxDate))) {"," return false;"," }",""," return Calendar.superclass._canBeSelected.call(this, date);"," },",""," /**"," * Overrides CalendarBase.prototype._renderCustomRules to disable"," * nodes earlier than minimumDate and later than maximumDate"," * @method _renderCustomRules"," * @private"," */"," _renderCustomRules: function () {"," Calendar.superclass._renderCustomRules.call(this);",""," var minDate = this.get('minimumDate'),"," maxDate = this.get('maximumDate'),"," dates = [],"," i, l,"," paneNum;",""," if (!minDate && !maxDate) {"," return;"," }",""," for (paneNum = 0; paneNum < this._paneNumber; paneNum++) {"," paneDate = ydate.addMonths(this.get(\"date\"), paneNum);"," dates = dates.concat(ydate.listOfDatesInMonth(paneDate));"," }",""," if (minDate) {"," for (i = 0, l = dates.length; i < l; i++) {"," if (!ydate.isGreaterOrEqual(dates[i], minDate)) {"," this._disableDate(dates[i]);"," } else {"," break;"," }"," }"," }",""," if (maxDate) {"," for (i = dates.length - 1; i >= 0; i--) {"," if (ydate.isGreater(dates[i], maxDate)) {"," this._disableDate(dates[i]);"," } else {"," break;"," }"," }"," }"," },",""," /**"," * Subtracts one month from the current calendar view."," * @method subtractMonth"," * @return {Calendar} A reference to this object"," * @chainable"," */"," subtractMonth : function (e) {"," this.set(\"date\", ydate.addMonths(this.get(\"date\"), -1));"," if (e) {"," e.halt();"," }"," return this;"," },",""," /**"," * Subtracts one year from the current calendar view."," * @method subtractYear"," * @return {Calendar} A reference to this object"," * @chainable"," */"," subtractYear : function (e) {"," this.set(\"date\", ydate.addYears(this.get(\"date\"), -1));"," if (e) {"," e.halt();"," }"," return this;"," },",""," /**"," * Adds one month to the current calendar view."," * @method addMonth"," * @return {Calendar} A reference to this object"," * @chainable"," */"," addMonth : function (e) {"," this.set(\"date\", ydate.addMonths(this.get(\"date\"), 1));"," if (e) {"," e.halt();"," }"," return this;"," },",""," /**"," * Adds one year to the current calendar view."," * @method addYear"," * @return {Calendar} A reference to this object"," * @chainable"," */"," addYear : function (e) {"," this.set(\"date\", ydate.addYears(this.get(\"date\"), 1));"," if (e) {"," e.halt();"," }"," return this;"," }","}, {"," /**"," * The identity of the widget."," *"," * @property NAME"," * @type String"," * @default 'calendar'"," * @readOnly"," * @protected"," * @static"," */"," NAME: \"calendar\",",""," /**"," * Static property used to define the default attribute configuration of"," * the Widget."," *"," * @property ATTRS"," * @type {Object}"," * @protected"," * @static"," */"," ATTRS: {",""," /**"," * A setting specifying the type of selection the calendar allows."," * Possible values include:"," *
Key Value | Class |
---|---|
line | Y.LineSeries |
column | Y.ColumnSeries |
bar | Y.BarSeries |
area | Y.AreaSeries |
stackedarea | Y.StackedAreaSeries |
stackedline | Y.StackedLineSeries |
stackedcolumn | Y.StackedColumnSeries |
stackedbar | Y.StackedBarSeries |
markerseries | Y.MarkerSeries |
spline | Y.SplineSeries |
areaspline | Y.AreaSplineSeries |
stackedspline | Y.StackedSplineSeries |
stackedareaspline | Y.StackedAreaSplineSeries |
stackedmarkerseries | Y.StackedMarkerSeries |
pie | Y.PieSeries |
combo | Y.ComboSeries |
stackedcombo | Y.StackedComboSeries |
combospline | Y.ComboSplineSeries |
stackedcombospline | Y.StackedComboSplineSeries |
Contains the following properties:
"," *Key Value | Class |
---|---|
line | Y.LineSeries |
column | Y.ColumnSeries |
bar | Y.BarSeries |
area | Y.AreaSeries |
stackedarea | Y.StackedAreaSeries |
stackedline | Y.StackedLineSeries |
stackedcolumn | Y.StackedColumnSeries |
stackedbar | Y.StackedBarSeries |
markerseries | Y.MarkerSeries |
spline | Y.SplineSeries |
areaspline | Y.AreaSplineSeries |
stackedspline | Y.StackedSplineSeries |
stackedareaspline | Y.StackedAreaSplineSeries |
stackedmarkerseries | Y.StackedMarkerSeries |
pie | Y.PieSeries |
combo | Y.ComboSeries |
stackedcombo | Y.StackedComboSeries |
combospline | Y.ComboSplineSeries |
stackedcombospline | Y.StackedComboSplineSeries |
Contains the following properties:
"," *","\t * Any strftime string is supported, such as \"%I:%M:%S %p\". strftime has several format specifiers defined by the Open group at","\t * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html","\t * PHP added a few of its own, defined at http://www.php.net/strftime","\t *
","\t *","\t * This javascript implementation supports all the PHP specifiers and a few more. The full list is below.","\t *
","\t *","\t * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d.","\t *
","\t *"," * Any strftime string is supported, such as \"%I:%M:%S %p\". strftime has several format specifiers defined by the Open group at"," * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html"," * PHP added a few of its own, defined at http://www.php.net/strftime"," *
"," *"," * This javascript implementation supports all the PHP specifiers and a few more. The full list is below."," *
"," *"," * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d."," *
"," *- * Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at - * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html - * PHP added a few of its own, defined at http://www.php.net/strftime - *
- *- * This javascript implementation supports all the PHP specifiers and a few more. The full list is below. - *
- *- * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d. - *
- *+ * Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at + * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html + * PHP added a few of its own, defined at http://www.php.net/strftime + *
+ *+ * This javascript implementation supports all the PHP specifiers and a few more. The full list is below. + *
+ *+ * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d. + *
+ *- * Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at - * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html - * PHP added a few of its own, defined at http://www.php.net/strftime - *
- *- * This javascript implementation supports all the PHP specifiers and a few more. The full list is below. - *
- *- * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d. - *
- *+ * Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at + * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html + * PHP added a few of its own, defined at http://www.php.net/strftime + *
+ *+ * This javascript implementation supports all the PHP specifiers and a few more. The full list is below. + *
+ *+ * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d. + *
+ *","var fulfilled = new Y.Promise(function (fulfill) {"," fulfill('I am a fulfilled promise');","});","","var rejected = new Y.Promise(function (fulfill, reject) {"," reject(new Error('I am a rejected promise'));","});","
","","@class Promise","@constructor","@param {Function} fn A function where to insert the logic that resolves this"," promise. Receives `fulfill` and `reject` functions as parameters."," This function is called synchronously.","**/","function Promise(fn) {"," if (!(this instanceof Promise)) {"," return new Promise(fn);"," }",""," var resolver = new Promise.Resolver(this);",""," /**"," A reference to the resolver object that handles this promise",""," @property _resolver"," @type Object"," @private"," */"," this._resolver = resolver;",""," fn.call(this, function (value) {"," resolver.fulfill(value);"," }, function (reason) {"," resolver.reject(reason);"," });","}","","Y.mix(Promise.prototype, {"," /**"," Schedule execution of a callback to either or both of \"fulfill\" and"," \"reject\" resolutions for this promise. The callbacks are wrapped in a new"," promise and that promise is returned. This allows operation chaining ala"," `functionA().then(functionB).then(functionC)` where `functionA` returns"," a promise, and `functionB` and `functionC` _may_ return promises.",""," Asynchronicity of the callbacks is guaranteed.",""," @method then"," @param {Function} [callback] function to execute if the promise"," resolves successfully"," @param {Function} [errback] function to execute if the promise"," resolves unsuccessfully"," @return {Promise} A promise wrapping the resolution of either \"resolve\" or"," \"reject\" callback"," **/"," then: function (callback, errback) {"," return this._resolver.then(callback, errback);"," },",""," /**"," Returns the current status of the operation. Possible results are"," \"pending\", \"fulfilled\", and \"rejected\".",""," @method getStatus"," @return {String}"," **/"," getStatus: function () {"," return this._resolver.getStatus();"," }","});","","/**","Checks if an object or value is a promise. This is cross-implementation","compatible, so promises returned from other libraries or native components","that are compatible with the Promises A+ spec should be recognized by this","method.","","@method isPromise","@param {Any} obj The object to test","@return {Boolean} Whether the object is a promise or not","@static","**/","Promise.isPromise = function (obj) {"," // We test promises by form to be able to identify other implementations"," // as promises. This is important for cross compatibility and in particular"," // Y.when which should take any kind of promise"," return !!obj && typeof obj.then === 'function';","};","","Y.Promise = Promise;","/**","Represents an asynchronous operation. Provides a","standard API for subscribing to the moment that the operation completes either","successfully (`fulfill()`) or unsuccessfully (`reject()`).","","@class Promise.Resolver","@constructor","@param {Promise} promise The promise instance this resolver will be handling","**/","function Resolver(promise) {"," /**"," List of success callbacks",""," @property _callbacks"," @type Array"," @private"," **/"," this._callbacks = [];",""," /**"," List of failure callbacks",""," @property _errbacks"," @type Array"," @private"," **/"," this._errbacks = [];",""," /**"," The promise for this Resolver.",""," @property promise"," @type Promise"," **/"," this.promise = promise;",""," /**"," The status of the operation. This property may take only one of the following"," values: 'pending', 'fulfilled' or 'rejected'.",""," @property _status"," @type String"," @default 'pending'"," @private"," **/"," this._status = 'pending';","}","","Y.mix(Resolver.prototype, {"," /**"," Resolves the promise, signaling successful completion of the"," represented operation. All \"onFulfilled\" subscriptions are executed and passed"," the value provided to this method. After calling `fulfill()`, `reject()` and"," `notify()` are disabled.",""," @method fulfill"," @param {Any} value Value to pass along to the \"onFulfilled\" subscribers"," **/"," fulfill: function (value) {"," if (this._status === 'pending') {"," this._result = value;"," }",""," if (this._status !== 'rejected') {"," this._notify(this._callbacks, this._result);",""," // Reset the callback list so that future calls to fulfill()"," // won't call the same callbacks again. Promises keep a list"," // of callbacks, they're not the same as events. In practice,"," // calls to fulfill() after the first one should not be made by"," // the user but by then()"," this._callbacks = [];",""," // Once a promise gets fulfilled it can't be rejected, so"," // there is no point in keeping the list. Remove it to help"," // garbage collection"," this._errbacks = null;",""," this._status = 'fulfilled';"," }"," },",""," /**"," Resolves the promise, signaling *un*successful completion of the"," represented operation. All \"onRejected\" subscriptions are executed with"," the value provided to this method. After calling `reject()`, `resolve()`"," and `notify()` are disabled.",""," @method reject"," @param {Any} value Value to pass along to the \"reject\" subscribers"," **/"," reject: function (reason) {"," if (this._status === 'pending') {"," this._result = reason;"," }",""," if (this._status !== 'fulfilled') {"," this._notify(this._errbacks, this._result);",""," // See fulfill()"," this._callbacks = null;"," this._errbacks = [];",""," this._status = 'rejected';"," }"," },",""," /**"," Schedule execution of a callback to either or both of \"resolve\" and"," \"reject\" resolutions for the Resolver. The callbacks"," are wrapped in a new Resolver and that Resolver's corresponding promise"," is returned. This allows operation chaining ala"," `functionA().then(functionB).then(functionC)` where `functionA` returns"," a promise, and `functionB` and `functionC` _may_ return promises.",""," @method then"," @param {Function} [callback] function to execute if the Resolver"," resolves successfully"," @param {Function} [errback] function to execute if the Resolver"," resolves unsuccessfully"," @return {Promise} The promise of a new Resolver wrapping the resolution"," of either \"resolve\" or \"reject\" callback"," **/"," then: function (callback, errback) {"," // When the current promise is fulfilled or rejected, either the"," // callback or errback will be executed via the function pushed onto"," // this._callbacks or this._errbacks. However, to allow then()"," // chaining, the execution of either function needs to be represented"," // by a Resolver (the same Resolver can represent both flow paths), and"," // its promise returned."," var promise = this.promise,"," thenFulfill, thenReject,",""," // using promise constructor allows for customized promises to be"," // returned instead of plain ones"," then = new promise.constructor(function (fulfill, reject) {"," thenFulfill = fulfill;"," thenReject = reject;"," }),",""," callbackList = this._callbacks || [],"," errbackList = this._errbacks || [];",""," // Because the callback and errback are represented by a Resolver, it"," // must be fulfilled or rejected to propagate through the then() chain."," // The same logic applies to resolve() and reject() for fulfillment."," callbackList.push(typeof callback === 'function' ?"," this._wrap(thenFulfill, thenReject, callback) : thenFulfill);"," errbackList.push(typeof errback === 'function' ?"," this._wrap(thenFulfill, thenReject, errback) : thenReject);",""," // If a promise is already fulfilled or rejected, notify the newly added"," // callbacks by calling fulfill() or reject()"," if (this._status === 'fulfilled') {"," this.fulfill(this._result);"," } else if (this._status === 'rejected') {"," this.reject(this._result);"," }",""," return then;"," },",""," /**"," Wraps the callback in Y.soon to guarantee its asynchronous execution. It"," also catches exceptions to turn them into rejections and links promises"," returned from the `then` callback.",""," @method _wrap"," @param {Function} thenFulfill Fulfillment function of the resolver that"," handles this promise"," @param {Function} thenReject Rejection function of the resolver that"," handles this promise"," @param {Function} fn Callback to wrap"," @return {Function}"," @private"," **/"," _wrap: function (thenFulfill, thenReject, fn) {"," // callbacks and errbacks only get one argument"," return function (valueOrReason) {"," var result;",""," // Promises model exception handling through callbacks"," // making both synchronous and asynchronous errors behave"," // the same way"," try {"," // Use the argument coming in to the callback/errback from the"," // resolution of the parent promise."," // The function must be called as a normal function, with no"," // special value for |this|, as per Promises A+"," result = fn(valueOrReason);"," } catch (e) {"," // calling return only to stop here"," return thenReject(e);"," }",""," if (Promise.isPromise(result)) {"," // Returning a promise from a callback makes the current"," // promise sync up with the returned promise"," result.then(thenFulfill, thenReject);"," } else {"," // Non-promise return values always trigger resolve()"," // because callback is affirmative, and errback is"," // recovery. To continue on the rejection path, errbacks"," // must return rejected promises or throw."," thenFulfill(result);"," }"," };"," },",""," /**"," Returns the current status of the Resolver as a string \"pending\","," \"fulfilled\", or \"rejected\".",""," @method getStatus"," @return {String}"," **/"," getStatus: function () {"," return this._status;"," },",""," /**"," Executes an array of callbacks from a specified context, passing a set of"," arguments.",""," @method _notify"," @param {Function[]} subs The array of subscriber callbacks"," @param {Any} result Value to pass the callbacks"," @protected"," **/"," _notify: function (subs, result) {"," // Since callback lists are reset synchronously, the subs list never"," // changes after _notify() receives it. Avoid calling Y.soon() for"," // an empty list"," if (subs.length) {"," // Calling all callbacks after Y.soon to guarantee"," // asynchronicity. Because setTimeout can cause unnecessary"," // delays that *can* become noticeable in some situations"," // (especially in Node.js)"," Y.soon(function () {"," var i, len;",""," for (i = 0, len = subs.length; i < len; ++i) {"," subs[i](result);"," }"," });"," }"," }","","}, true);","","Y.Promise.Resolver = Resolver;","/**","Abstraction API allowing you to interact with promises or raw values as if they","were promises. If a non-promise object is passed in, a new Resolver is created","and scheduled to resolve asynchronously with the provided value.","","In either case, a promise is returned. If either _callback_ or _errback_ are","provided, the promise returned is the one returned from calling","`promise.then(callback, errback)` on the provided or created promise. If neither","are provided, the original promise is returned.","","@for YUI","@method when","@param {Any} promise Promise object or value to wrap in a resolved promise","@param {Function} [callback] callback to execute if the promise is resolved","@param {Function} [errback] callback to execute if the promise is rejected","@return {Promise}","**/","Y.when = function (promise, callback, errback) {"," var value;",""," if (!Y.Promise.isPromise(promise)) {"," value = promise;",""," promise = new Y.Promise(function (fulfill) {"," fulfill(value);"," });"," }",""," return (callback || errback) ? promise.then(callback, errback) : promise;","};","var slice = [].slice;","","/**","Returns a new promise that will be resolved when all operations have completed.","Takes both any numer of values as arguments. If an argument is a not a promise,","it will be wrapped in a new promise, same as in `Y.when()`.","","@for YUI","@method batch","@param {Any} operation* Any number of Y.Promise objects or regular JS values","@return {Promise} Promise to be fulfilled when all provided promises are"," resolved","**/","Y.batch = function () {"," var funcs = slice.call(arguments),"," remaining = funcs.length,"," i = 0,"," length = funcs.length,"," results = [];",""," return new Y.Promise(function (fulfill, reject) {"," var allDone = this;",""," function oneDone(index) {"," return function (value) {"," results[index] = value;",""," remaining--;",""," if (!remaining && allDone.getStatus() !== 'rejected') {"," fulfill(results);"," }"," };"," }",""," if (length < 1) {"," return fulfill(results);"," }",""," for (; i < length; i++) {"," Y.when(funcs[i], oneDone(i), reject);"," }"," });","};","","","}, '@VERSION@', {\"requires\": [\"timers\"]});","","}());"]};
+ __coverage__['build/promise/promise.js'] = {"path":"build/promise/promise.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":38}}},"2":{"name":"Promise","line":55,"loc":{"start":{"line":55,"column":0},"end":{"line":55,"column":21}}},"3":{"name":"(anonymous_3)","line":71,"loc":{"start":{"line":71,"column":18},"end":{"line":71,"column":35}}},"4":{"name":"(anonymous_4)","line":73,"loc":{"start":{"line":73,"column":7},"end":{"line":73,"column":25}}},"5":{"name":"(anonymous_5)","line":96,"loc":{"start":{"line":96,"column":10},"end":{"line":96,"column":39}}},"6":{"name":"(anonymous_6)","line":108,"loc":{"start":{"line":108,"column":15},"end":{"line":108,"column":27}}},"7":{"name":"(anonymous_7)","line":124,"loc":{"start":{"line":124,"column":20},"end":{"line":124,"column":35}}},"8":{"name":"Resolver","line":147,"loc":{"start":{"line":147,"column":0},"end":{"line":147,"column":27}}},"9":{"name":"(anonymous_9)","line":205,"loc":{"start":{"line":205,"column":13},"end":{"line":205,"column":30}}},"10":{"name":"(anonymous_10)","line":237,"loc":{"start":{"line":237,"column":12},"end":{"line":237,"column":30}}},"11":{"name":"(anonymous_11)","line":268,"loc":{"start":{"line":268,"column":10},"end":{"line":268,"column":39}}},"12":{"name":"(anonymous_12)","line":280,"loc":{"start":{"line":280,"column":43},"end":{"line":280,"column":70}}},"13":{"name":"(anonymous_13)","line":325,"loc":{"start":{"line":325,"column":11},"end":{"line":325,"column":50}}},"14":{"name":"(anonymous_14)","line":327,"loc":{"start":{"line":327,"column":15},"end":{"line":327,"column":40}}},"15":{"name":"(anonymous_15)","line":366,"loc":{"start":{"line":366,"column":15},"end":{"line":366,"column":27}}},"16":{"name":"(anonymous_16)","line":379,"loc":{"start":{"line":379,"column":13},"end":{"line":379,"column":37}}},"17":{"name":"(anonymous_17)","line":388,"loc":{"start":{"line":388,"column":19},"end":{"line":388,"column":31}}},"18":{"name":"(anonymous_18)","line":418,"loc":{"start":{"line":418,"column":9},"end":{"line":418,"column":47}}},"19":{"name":"(anonymous_19)","line":424,"loc":{"start":{"line":424,"column":32},"end":{"line":424,"column":51}}},"20":{"name":"(anonymous_20)","line":444,"loc":{"start":{"line":444,"column":10},"end":{"line":444,"column":22}}},"21":{"name":"(anonymous_21)","line":451,"loc":{"start":{"line":451,"column":25},"end":{"line":451,"column":52}}},"22":{"name":"oneDone","line":454,"loc":{"start":{"line":454,"column":8},"end":{"line":454,"column":32}}},"23":{"name":"(anonymous_23)","line":455,"loc":{"start":{"line":455,"column":19},"end":{"line":455,"column":36}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":477,"column":42}},"2":{"start":{"line":55,"column":0},"end":{"line":76,"column":1}},"3":{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},"4":{"start":{"line":57,"column":8},"end":{"line":57,"column":31}},"5":{"start":{"line":60,"column":4},"end":{"line":60,"column":46}},"6":{"start":{"line":69,"column":4},"end":{"line":69,"column":30}},"7":{"start":{"line":71,"column":4},"end":{"line":75,"column":7}},"8":{"start":{"line":72,"column":8},"end":{"line":72,"column":32}},"9":{"start":{"line":74,"column":8},"end":{"line":74,"column":32}},"10":{"start":{"line":78,"column":0},"end":{"line":111,"column":3}},"11":{"start":{"line":97,"column":8},"end":{"line":97,"column":54}},"12":{"start":{"line":109,"column":8},"end":{"line":109,"column":42}},"13":{"start":{"line":124,"column":0},"end":{"line":135,"column":2}},"14":{"start":{"line":125,"column":4},"end":{"line":125,"column":13}},"15":{"start":{"line":131,"column":4},"end":{"line":133,"column":18}},"16":{"start":{"line":132,"column":8},"end":{"line":132,"column":24}},"17":{"start":{"line":134,"column":4},"end":{"line":134,"column":38}},"18":{"start":{"line":137,"column":0},"end":{"line":137,"column":20}},"19":{"start":{"line":147,"column":0},"end":{"line":193,"column":1}},"20":{"start":{"line":155,"column":4},"end":{"line":155,"column":25}},"21":{"start":{"line":164,"column":4},"end":{"line":164,"column":24}},"22":{"start":{"line":172,"column":4},"end":{"line":172,"column":27}},"23":{"start":{"line":183,"column":4},"end":{"line":183,"column":29}},"24":{"start":{"line":192,"column":4},"end":{"line":192,"column":24}},"25":{"start":{"line":195,"column":0},"end":{"line":398,"column":9}},"26":{"start":{"line":206,"column":8},"end":{"line":209,"column":9}},"27":{"start":{"line":207,"column":12},"end":{"line":207,"column":33}},"28":{"start":{"line":208,"column":12},"end":{"line":208,"column":39}},"29":{"start":{"line":211,"column":8},"end":{"line":225,"column":9}},"30":{"start":{"line":212,"column":12},"end":{"line":212,"column":56}},"31":{"start":{"line":219,"column":12},"end":{"line":219,"column":33}},"32":{"start":{"line":224,"column":12},"end":{"line":224,"column":34}},"33":{"start":{"line":238,"column":8},"end":{"line":241,"column":9}},"34":{"start":{"line":239,"column":12},"end":{"line":239,"column":34}},"35":{"start":{"line":240,"column":12},"end":{"line":240,"column":38}},"36":{"start":{"line":243,"column":8},"end":{"line":249,"column":9}},"37":{"start":{"line":244,"column":12},"end":{"line":244,"column":55}},"38":{"start":{"line":247,"column":12},"end":{"line":247,"column":35}},"39":{"start":{"line":248,"column":12},"end":{"line":248,"column":32}},"40":{"start":{"line":275,"column":8},"end":{"line":286,"column":42}},"41":{"start":{"line":281,"column":16},"end":{"line":281,"column":38}},"42":{"start":{"line":282,"column":16},"end":{"line":282,"column":36}},"43":{"start":{"line":291,"column":8},"end":{"line":294,"column":9}},"44":{"start":{"line":292,"column":12},"end":{"line":293,"column":77}},"45":{"start":{"line":295,"column":8},"end":{"line":298,"column":9}},"46":{"start":{"line":296,"column":12},"end":{"line":297,"column":75}},"47":{"start":{"line":302,"column":8},"end":{"line":306,"column":9}},"48":{"start":{"line":303,"column":12},"end":{"line":303,"column":39}},"49":{"start":{"line":304,"column":15},"end":{"line":306,"column":9}},"50":{"start":{"line":305,"column":12},"end":{"line":305,"column":38}},"51":{"start":{"line":308,"column":8},"end":{"line":308,"column":20}},"52":{"start":{"line":327,"column":8},"end":{"line":355,"column":10}},"53":{"start":{"line":328,"column":12},"end":{"line":328,"column":23}},"54":{"start":{"line":333,"column":12},"end":{"line":342,"column":13}},"55":{"start":{"line":338,"column":16},"end":{"line":338,"column":43}},"56":{"start":{"line":341,"column":16},"end":{"line":341,"column":37}},"57":{"start":{"line":344,"column":12},"end":{"line":354,"column":13}},"58":{"start":{"line":347,"column":16},"end":{"line":347,"column":53}},"59":{"start":{"line":353,"column":16},"end":{"line":353,"column":36}},"60":{"start":{"line":367,"column":8},"end":{"line":367,"column":28}},"61":{"start":{"line":383,"column":8},"end":{"line":395,"column":9}},"62":{"start":{"line":388,"column":12},"end":{"line":394,"column":15}},"63":{"start":{"line":389,"column":16},"end":{"line":389,"column":27}},"64":{"start":{"line":391,"column":16},"end":{"line":393,"column":17}},"65":{"start":{"line":392,"column":20},"end":{"line":392,"column":36}},"66":{"start":{"line":400,"column":0},"end":{"line":400,"column":30}},"67":{"start":{"line":418,"column":0},"end":{"line":430,"column":2}},"68":{"start":{"line":419,"column":4},"end":{"line":419,"column":14}},"69":{"start":{"line":421,"column":4},"end":{"line":427,"column":5}},"70":{"start":{"line":422,"column":8},"end":{"line":422,"column":24}},"71":{"start":{"line":424,"column":8},"end":{"line":426,"column":11}},"72":{"start":{"line":425,"column":12},"end":{"line":425,"column":27}},"73":{"start":{"line":429,"column":4},"end":{"line":429,"column":77}},"74":{"start":{"line":431,"column":0},"end":{"line":431,"column":21}},"75":{"start":{"line":444,"column":0},"end":{"line":474,"column":2}},"76":{"start":{"line":445,"column":4},"end":{"line":449,"column":23}},"77":{"start":{"line":451,"column":4},"end":{"line":473,"column":7}},"78":{"start":{"line":452,"column":8},"end":{"line":452,"column":27}},"79":{"start":{"line":454,"column":8},"end":{"line":464,"column":9}},"80":{"start":{"line":455,"column":12},"end":{"line":463,"column":14}},"81":{"start":{"line":456,"column":16},"end":{"line":456,"column":39}},"82":{"start":{"line":458,"column":16},"end":{"line":458,"column":28}},"83":{"start":{"line":460,"column":16},"end":{"line":462,"column":17}},"84":{"start":{"line":461,"column":20},"end":{"line":461,"column":37}},"85":{"start":{"line":466,"column":8},"end":{"line":468,"column":9}},"86":{"start":{"line":467,"column":12},"end":{"line":467,"column":36}},"87":{"start":{"line":470,"column":8},"end":{"line":472,"column":9}},"88":{"start":{"line":471,"column":12},"end":{"line":471,"column":49}}},"branchMap":{"1":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":4},"end":{"line":56,"column":4}},{"start":{"line":56,"column":4},"end":{"line":56,"column":4}}]},"2":{"line":206,"type":"if","locations":[{"start":{"line":206,"column":8},"end":{"line":206,"column":8}},{"start":{"line":206,"column":8},"end":{"line":206,"column":8}}]},"3":{"line":211,"type":"if","locations":[{"start":{"line":211,"column":8},"end":{"line":211,"column":8}},{"start":{"line":211,"column":8},"end":{"line":211,"column":8}}]},"4":{"line":238,"type":"if","locations":[{"start":{"line":238,"column":8},"end":{"line":238,"column":8}},{"start":{"line":238,"column":8},"end":{"line":238,"column":8}}]},"5":{"line":243,"type":"if","locations":[{"start":{"line":243,"column":8},"end":{"line":243,"column":8}},{"start":{"line":243,"column":8},"end":{"line":243,"column":8}}]},"6":{"line":291,"type":"if","locations":[{"start":{"line":291,"column":8},"end":{"line":291,"column":8}},{"start":{"line":291,"column":8},"end":{"line":291,"column":8}}]},"7":{"line":292,"type":"cond-expr","locations":[{"start":{"line":293,"column":16},"end":{"line":293,"column":61}},{"start":{"line":293,"column":64},"end":{"line":293,"column":75}}]},"8":{"line":295,"type":"if","locations":[{"start":{"line":295,"column":8},"end":{"line":295,"column":8}},{"start":{"line":295,"column":8},"end":{"line":295,"column":8}}]},"9":{"line":296,"type":"cond-expr","locations":[{"start":{"line":297,"column":16},"end":{"line":297,"column":60}},{"start":{"line":297,"column":63},"end":{"line":297,"column":73}}]},"10":{"line":302,"type":"if","locations":[{"start":{"line":302,"column":8},"end":{"line":302,"column":8}},{"start":{"line":302,"column":8},"end":{"line":302,"column":8}}]},"11":{"line":304,"type":"if","locations":[{"start":{"line":304,"column":15},"end":{"line":304,"column":15}},{"start":{"line":304,"column":15},"end":{"line":304,"column":15}}]},"12":{"line":344,"type":"if","locations":[{"start":{"line":344,"column":12},"end":{"line":344,"column":12}},{"start":{"line":344,"column":12},"end":{"line":344,"column":12}}]},"13":{"line":383,"type":"if","locations":[{"start":{"line":383,"column":8},"end":{"line":383,"column":8}},{"start":{"line":383,"column":8},"end":{"line":383,"column":8}}]},"14":{"line":421,"type":"if","locations":[{"start":{"line":421,"column":4},"end":{"line":421,"column":4}},{"start":{"line":421,"column":4},"end":{"line":421,"column":4}}]},"15":{"line":429,"type":"cond-expr","locations":[{"start":{"line":429,"column":35},"end":{"line":429,"column":66}},{"start":{"line":429,"column":69},"end":{"line":429,"column":76}}]},"16":{"line":429,"type":"binary-expr","locations":[{"start":{"line":429,"column":12},"end":{"line":429,"column":20}},{"start":{"line":429,"column":24},"end":{"line":429,"column":31}}]},"17":{"line":460,"type":"if","locations":[{"start":{"line":460,"column":16},"end":{"line":460,"column":16}},{"start":{"line":460,"column":16},"end":{"line":460,"column":16}}]},"18":{"line":460,"type":"binary-expr","locations":[{"start":{"line":460,"column":20},"end":{"line":460,"column":30}},{"start":{"line":460,"column":34},"end":{"line":460,"column":68}}]},"19":{"line":466,"type":"if","locations":[{"start":{"line":466,"column":8},"end":{"line":466,"column":8}},{"start":{"line":466,"column":8},"end":{"line":466,"column":8}}]}},"code":["(function () { YUI.add('promise', function (Y, NAME) {","","/**","Wraps the execution of asynchronous operations, providing a promise object that","can be used to subscribe to the various ways the operation may terminate.","","When the operation completes successfully, call the Resolver's `fulfill()`","method, passing any relevant response data for subscribers. If the operation","encounters an error or is unsuccessful in some way, call `reject()`, again","passing any relevant data for subscribers.","","The Resolver object should be shared only with the code resposible for","resolving or rejecting it. Public access for the Resolver is through its","_promise_, which is returned from the Resolver's `promise` property. While both","Resolver and promise allow subscriptions to the Resolver's state changes, the","promise may be exposed to non-controlling code. It is the preferable interface","for adding subscriptions.","","Subscribe to state changes in the Resolver with the promise's","`then(callback, errback)` method. `then()` wraps the passed callbacks in a","new Resolver and returns the corresponding promise, allowing chaining of","asynchronous or synchronous operations. E.g.","`promise.then(someAsyncFunc).then(anotherAsyncFunc)`","","@module promise","@since 3.9.0","**/","","/**","A promise represents a value that may not yet be available. Promises allow","you to chain asynchronous operations, write synchronous looking code and","handle errors throughout the process.","","This constructor takes a function as a parameter where you can insert the logic","that fulfills or rejects this promise. The fulfillment value and the rejection","reason can be any JavaScript value. It's encouraged that rejection reasons be","error objects","","","var fulfilled = new Y.Promise(function (fulfill) {"," fulfill('I am a fulfilled promise');","});","","var rejected = new Y.Promise(function (fulfill, reject) {"," reject(new Error('I am a rejected promise'));","});","
","","@class Promise","@constructor","@param {Function} fn A function where to insert the logic that resolves this"," promise. Receives `fulfill` and `reject` functions as parameters."," This function is called synchronously.","**/","function Promise(fn) {"," if (!(this instanceof Promise)) {"," return new Promise(fn);"," }",""," var resolver = new Promise.Resolver(this);",""," /**"," A reference to the resolver object that handles this promise",""," @property _resolver"," @type Object"," @private"," */"," this._resolver = resolver;",""," fn.call(this, function (value) {"," resolver.fulfill(value);"," }, function (reason) {"," resolver.reject(reason);"," });","}","","Y.mix(Promise.prototype, {"," /**"," Schedule execution of a callback to either or both of \"fulfill\" and"," \"reject\" resolutions for this promise. The callbacks are wrapped in a new"," promise and that promise is returned. This allows operation chaining ala"," `functionA().then(functionB).then(functionC)` where `functionA` returns"," a promise, and `functionB` and `functionC` _may_ return promises.",""," Asynchronicity of the callbacks is guaranteed.",""," @method then"," @param {Function} [callback] function to execute if the promise"," resolves successfully"," @param {Function} [errback] function to execute if the promise"," resolves unsuccessfully"," @return {Promise} A promise wrapping the resolution of either \"resolve\" or"," \"reject\" callback"," **/"," then: function (callback, errback) {"," return this._resolver.then(callback, errback);"," },",""," /**"," Returns the current status of the operation. Possible results are"," \"pending\", \"fulfilled\", and \"rejected\".",""," @method getStatus"," @return {String}"," @deprecated"," **/"," getStatus: function () {"," return this._resolver.getStatus();"," }","});","","/**","Checks if an object or value is a promise. This is cross-implementation","compatible, so promises returned from other libraries or native components","that are compatible with the Promises A+ spec should be recognized by this","method.","","@method isPromise","@param {Any} obj The object to test","@return {Boolean} Whether the object is a promise or not","@static","**/","Promise.isPromise = function (obj) {"," var then;"," // We test promises by structure to be able to identify other"," // implementations' promises. This is important for cross compatibility and"," // In particular Y.when which should recognize any kind of promise"," // Use try...catch when retrieving obj.then. Return false if it throws"," // See Promises/A+ 1.1"," try {"," then = obj.then;"," } catch (_) {}"," return typeof then === 'function';","};","","Y.Promise = Promise;","/**","Represents an asynchronous operation. Provides a","standard API for subscribing to the moment that the operation completes either","successfully (`fulfill()`) or unsuccessfully (`reject()`).","","@class Promise.Resolver","@constructor","@param {Promise} promise The promise instance this resolver will be handling","**/","function Resolver(promise) {"," /**"," List of success callbacks",""," @property _callbacks"," @type Array"," @private"," **/"," this._callbacks = [];",""," /**"," List of failure callbacks",""," @property _errbacks"," @type Array"," @private"," **/"," this._errbacks = [];",""," /**"," The promise for this Resolver.",""," @property promise"," @type Promise"," **/"," this.promise = promise;",""," /**"," The status of the operation. This property may take only one of the following"," values: 'pending', 'fulfilled' or 'rejected'.",""," @property _status"," @type String"," @default 'pending'"," @private"," **/"," this._status = 'pending';",""," /**"," This value that this promise represents.",""," @property _result"," @type Any"," @private"," **/"," this._result = null;","}","","Y.mix(Resolver.prototype, {"," /**"," Resolves the promise, signaling successful completion of the"," represented operation. All \"onFulfilled\" subscriptions are executed and passed"," the value provided to this method. After calling `fulfill()`, `reject()` and"," `notify()` are disabled.",""," @method fulfill"," @param {Any} value Value to pass along to the \"onFulfilled\" subscribers"," **/"," fulfill: function (value) {"," if (this._status === 'pending') {"," this._result = value;"," this._status = 'fulfilled';"," }",""," if (this._status === 'fulfilled') {"," this._notify(this._callbacks, this._result);",""," // Reset the callback list so that future calls to fulfill()"," // won't call the same callbacks again. Promises keep a list"," // of callbacks, they're not the same as events. In practice,"," // calls to fulfill() after the first one should not be made by"," // the user but by then()"," this._callbacks = [];",""," // Once a promise gets fulfilled it can't be rejected, so"," // there is no point in keeping the list. Remove it to help"," // garbage collection"," this._errbacks = null;"," }"," },",""," /**"," Resolves the promise, signaling *un*successful completion of the"," represented operation. All \"onRejected\" subscriptions are executed with"," the value provided to this method. After calling `reject()`, `resolve()`"," and `notify()` are disabled.",""," @method reject"," @param {Any} value Value to pass along to the \"reject\" subscribers"," **/"," reject: function (reason) {"," if (this._status === 'pending') {"," this._result = reason;"," this._status = 'rejected';"," }",""," if (this._status === 'rejected') {"," this._notify(this._errbacks, this._result);",""," // See fulfill()"," this._callbacks = null;"," this._errbacks = [];"," }"," },",""," /**"," Schedule execution of a callback to either or both of \"resolve\" and"," \"reject\" resolutions for the Resolver. The callbacks"," are wrapped in a new Resolver and that Resolver's corresponding promise"," is returned. This allows operation chaining ala"," `functionA().then(functionB).then(functionC)` where `functionA` returns"," a promise, and `functionB` and `functionC` _may_ return promises.",""," @method then"," @param {Function} [callback] function to execute if the Resolver"," resolves successfully"," @param {Function} [errback] function to execute if the Resolver"," resolves unsuccessfully"," @return {Promise} The promise of a new Resolver wrapping the resolution"," of either \"resolve\" or \"reject\" callback"," **/"," then: function (callback, errback) {"," // When the current promise is fulfilled or rejected, either the"," // callback or errback will be executed via the function pushed onto"," // this._callbacks or this._errbacks. However, to allow then()"," // chaining, the execution of either function needs to be represented"," // by a Resolver (the same Resolver can represent both flow paths), and"," // its promise returned."," var promise = this.promise,"," thenFulfill, thenReject,",""," // using promise constructor allows for customized promises to be"," // returned instead of plain ones"," then = new promise.constructor(function (fulfill, reject) {"," thenFulfill = fulfill;"," thenReject = reject;"," }),",""," callbackList = this._callbacks,"," errbackList = this._errbacks;",""," // Because the callback and errback are represented by a Resolver, it"," // must be fulfilled or rejected to propagate through the then() chain."," // The same logic applies to resolve() and reject() for fulfillment."," if (callbackList) {"," callbackList.push(typeof callback === 'function' ?"," this._wrap(thenFulfill, thenReject, callback) : thenFulfill);"," }"," if (errbackList) {"," errbackList.push(typeof errback === 'function' ?"," this._wrap(thenFulfill, thenReject, errback) : thenReject);"," }",""," // If a promise is already fulfilled or rejected, notify the newly added"," // callbacks by calling fulfill() or reject()"," if (this._status === 'fulfilled') {"," this.fulfill(this._result);"," } else if (this._status === 'rejected') {"," this.reject(this._result);"," }",""," return then;"," },",""," /**"," Wraps the callback in Y.soon to guarantee its asynchronous execution. It"," also catches exceptions to turn them into rejections and links promises"," returned from the `then` callback.",""," @method _wrap"," @param {Function} thenFulfill Fulfillment function of the resolver that"," handles this promise"," @param {Function} thenReject Rejection function of the resolver that"," handles this promise"," @param {Function} fn Callback to wrap"," @return {Function}"," @private"," **/"," _wrap: function (thenFulfill, thenReject, fn) {"," // callbacks and errbacks only get one argument"," return function (valueOrReason) {"," var result;",""," // Promises model exception handling through callbacks"," // making both synchronous and asynchronous errors behave"," // the same way"," try {"," // Use the argument coming in to the callback/errback from the"," // resolution of the parent promise."," // The function must be called as a normal function, with no"," // special value for |this|, as per Promises A+"," result = fn(valueOrReason);"," } catch (e) {"," // calling return only to stop here"," return thenReject(e);"," }",""," if (Promise.isPromise(result)) {"," // Returning a promise from a callback makes the current"," // promise sync up with the returned promise"," result.then(thenFulfill, thenReject);"," } else {"," // Non-promise return values always trigger resolve()"," // because callback is affirmative, and errback is"," // recovery. To continue on the rejection path, errbacks"," // must return rejected promises or throw."," thenFulfill(result);"," }"," };"," },",""," /**"," Returns the current status of the Resolver as a string \"pending\","," \"fulfilled\", or \"rejected\".",""," @method getStatus"," @return {String}"," @deprecated"," **/"," getStatus: function () {"," return this._status;"," },",""," /**"," Executes an array of callbacks from a specified context, passing a set of"," arguments.",""," @method _notify"," @param {Function[]} subs The array of subscriber callbacks"," @param {Any} result Value to pass the callbacks"," @protected"," **/"," _notify: function (subs, result) {"," // Since callback lists are reset synchronously, the subs list never"," // changes after _notify() receives it. Avoid calling Y.soon() for"," // an empty list"," if (subs.length) {"," // Calling all callbacks after Y.soon to guarantee"," // asynchronicity. Because setTimeout can cause unnecessary"," // delays that *can* become noticeable in some situations"," // (especially in Node.js)"," Y.soon(function () {"," var i, len;",""," for (i = 0, len = subs.length; i < len; ++i) {"," subs[i](result);"," }"," });"," }"," }","","}, true);","","Y.Promise.Resolver = Resolver;","/**","Abstraction API allowing you to interact with promises or raw values as if they","were promises. If a non-promise object is passed in, a new Resolver is created","and scheduled to resolve asynchronously with the provided value.","","In either case, a promise is returned. If either _callback_ or _errback_ are","provided, the promise returned is the one returned from calling","`promise.then(callback, errback)` on the provided or created promise. If neither","are provided, the original promise is returned.","","@for YUI","@method when","@param {Any} promise Promise object or value to wrap in a resolved promise","@param {Function} [callback] callback to execute if the promise is resolved","@param {Function} [errback] callback to execute if the promise is rejected","@return {Promise}","**/","Y.when = function (promise, callback, errback) {"," var value;",""," if (!Y.Promise.isPromise(promise)) {"," value = promise;",""," promise = new Y.Promise(function (fulfill) {"," fulfill(value);"," });"," }",""," return (callback || errback) ? promise.then(callback, errback) : promise;","};","var slice = [].slice;","","/**","Returns a new promise that will be resolved when all operations have completed.","Takes both any numer of values as arguments. If an argument is a not a promise,","it will be wrapped in a new promise, same as in `Y.when()`.","","@for YUI","@method batch","@param {Any} operation* Any number of Y.Promise objects or regular JS values","@return {Promise} Promise to be fulfilled when all provided promises are"," resolved","**/","Y.batch = function () {"," var funcs = slice.call(arguments),"," remaining = funcs.length,"," i = 0,"," length = funcs.length,"," results = [];",""," return new Y.Promise(function (fulfill, reject) {"," var allDone = this;",""," function oneDone(index) {"," return function (value) {"," results[index] = value;",""," remaining--;",""," if (!remaining && allDone.getStatus() !== 'rejected') {"," fulfill(results);"," }"," };"," }",""," if (length < 1) {"," return fulfill(results);"," }",""," for (; i < length; i++) {"," Y.when(funcs[i], oneDone(i), reject);"," }"," });","};","","","}, '@VERSION@', {\"requires\": [\"timers\"]});","","}());"]};
}
var __cov_bUr1a4oWeLtiaZGIeajdgQ = __coverage__['build/promise/promise.js'];
-__cov_bUr1a4oWeLtiaZGIeajdgQ.s['1']++;YUI.add('promise',function(Y,NAME){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['1']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['2']++;function Promise(fn){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['2']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['3']++;if(!(this instanceof Promise)){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['1'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['4']++;return new Promise(fn);}else{__cov_bUr1a4oWeLtiaZGIeajdgQ.b['1'][1]++;}__cov_bUr1a4oWeLtiaZGIeajdgQ.s['5']++;var resolver=new Promise.Resolver(this);__cov_bUr1a4oWeLtiaZGIeajdgQ.s['6']++;this._resolver=resolver;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['7']++;fn.call(this,function(value){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['3']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['8']++;resolver.fulfill(value);},function(reason){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['4']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['9']++;resolver.reject(reason);});}__cov_bUr1a4oWeLtiaZGIeajdgQ.s['10']++;Y.mix(Promise.prototype,{then:function(callback,errback){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['5']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['11']++;return this._resolver.then(callback,errback);},getStatus:function(){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['6']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['12']++;return this._resolver.getStatus();}});__cov_bUr1a4oWeLtiaZGIeajdgQ.s['13']++;Promise.isPromise=function(obj){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['7']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['14']++;return(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['2'][0]++,!!obj)&&(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['2'][1]++,typeof obj.then==='function');};__cov_bUr1a4oWeLtiaZGIeajdgQ.s['15']++;Y.Promise=Promise;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['16']++;function Resolver(promise){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['8']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['17']++;this._callbacks=[];__cov_bUr1a4oWeLtiaZGIeajdgQ.s['18']++;this._errbacks=[];__cov_bUr1a4oWeLtiaZGIeajdgQ.s['19']++;this.promise=promise;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['20']++;this._status='pending';}__cov_bUr1a4oWeLtiaZGIeajdgQ.s['21']++;Y.mix(Resolver.prototype,{fulfill:function(value){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['9']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['22']++;if(this._status==='pending'){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['3'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['23']++;this._result=value;}else{__cov_bUr1a4oWeLtiaZGIeajdgQ.b['3'][1]++;}__cov_bUr1a4oWeLtiaZGIeajdgQ.s['24']++;if(this._status!=='rejected'){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['4'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['25']++;this._notify(this._callbacks,this._result);__cov_bUr1a4oWeLtiaZGIeajdgQ.s['26']++;this._callbacks=[];__cov_bUr1a4oWeLtiaZGIeajdgQ.s['27']++;this._errbacks=null;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['28']++;this._status='fulfilled';}else{__cov_bUr1a4oWeLtiaZGIeajdgQ.b['4'][1]++;}},reject:function(reason){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['10']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['29']++;if(this._status==='pending'){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['5'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['30']++;this._result=reason;}else{__cov_bUr1a4oWeLtiaZGIeajdgQ.b['5'][1]++;}__cov_bUr1a4oWeLtiaZGIeajdgQ.s['31']++;if(this._status!=='fulfilled'){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['6'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['32']++;this._notify(this._errbacks,this._result);__cov_bUr1a4oWeLtiaZGIeajdgQ.s['33']++;this._callbacks=null;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['34']++;this._errbacks=[];__cov_bUr1a4oWeLtiaZGIeajdgQ.s['35']++;this._status='rejected';}else{__cov_bUr1a4oWeLtiaZGIeajdgQ.b['6'][1]++;}},then:function(callback,errback){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['11']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['36']++;var promise=this.promise,thenFulfill,thenReject,then=new promise.constructor(function(fulfill,reject){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['12']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['37']++;thenFulfill=fulfill;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['38']++;thenReject=reject;}),callbackList=(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['7'][0]++,this._callbacks)||(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['7'][1]++,[]),errbackList=(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['8'][0]++,this._errbacks)||(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['8'][1]++,[]);__cov_bUr1a4oWeLtiaZGIeajdgQ.s['39']++;callbackList.push(typeof callback==='function'?(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['9'][0]++,this._wrap(thenFulfill,thenReject,callback)):(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['9'][1]++,thenFulfill));__cov_bUr1a4oWeLtiaZGIeajdgQ.s['40']++;errbackList.push(typeof errback==='function'?(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['10'][0]++,this._wrap(thenFulfill,thenReject,errback)):(__cov_bUr1a4oWeLtiaZGIeajdgQ.b['10'][1]++,thenReject));__cov_bUr1a4oWeLtiaZGIeajdgQ.s['41']++;if(this._status==='fulfilled'){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['11'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['42']++;this.fulfill(this._result);}else{__cov_bUr1a4oWeLtiaZGIeajdgQ.b['11'][1]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['43']++;if(this._status==='rejected'){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['12'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['44']++;this.reject(this._result);}else{__cov_bUr1a4oWeLtiaZGIeajdgQ.b['12'][1]++;}}__cov_bUr1a4oWeLtiaZGIeajdgQ.s['45']++;return then;},_wrap:function(thenFulfill,thenReject,fn){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['13']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['46']++;return function(valueOrReason){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['14']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['47']++;var result;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['48']++;try{__cov_bUr1a4oWeLtiaZGIeajdgQ.s['49']++;result=fn(valueOrReason);}catch(e){__cov_bUr1a4oWeLtiaZGIeajdgQ.s['50']++;return thenReject(e);}__cov_bUr1a4oWeLtiaZGIeajdgQ.s['51']++;if(Promise.isPromise(result)){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['13'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['52']++;result.then(thenFulfill,thenReject);}else{__cov_bUr1a4oWeLtiaZGIeajdgQ.b['13'][1]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['53']++;thenFulfill(result);}};},getStatus:function(){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['15']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['54']++;return this._status;},_notify:function(subs,result){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['16']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['55']++;if(subs.length){__cov_bUr1a4oWeLtiaZGIeajdgQ.b['14'][0]++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['56']++;Y.soon(function(){__cov_bUr1a4oWeLtiaZGIeajdgQ.f['17']++;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['57']++;var i,len;__cov_bUr1a4oWeLtiaZGIeajdgQ.s['58']++;for(i=0,len=subs.length;iY.SliderBase
."," *"," * @module slider"," * @submodule slider-value-range"," */","","// Constants for compression or performance","var MIN = 'min',"," MAX = 'max',"," VALUE = 'value',","// MINORSTEP = 'minorStep',","// MAJORSTEP = 'majorStep',",""," round = Math.round;","","/**"," * One class of value algorithm that can be built onto SliderBase. By default,"," * values range between 0 and 100, but you can configure these on the"," * built Slider class by setting the min
and max
"," * configurations. Set the initial value (will cause the thumb to move to the"," * appropriate location on the rail) in configuration as well if appropriate."," *"," * @class SliderValueRange"," */","function SliderValueRange() {"," this._initSliderValueRange();","}","","Y.SliderValueRange = Y.mix( SliderValueRange, {",""," // Prototype properties and methods that will be added onto host class"," prototype: {",""," /**"," * Factor used to translate value -> position -> value."," *"," * @property _factor"," * @type {Number}"," * @protected"," */"," _factor: 1,",""," /**"," * Stub for construction logic. Override if extending this class and"," * you need to set something up during the initializer phase."," *"," * @method _initSliderValueRange"," * @protected"," */"," _initSliderValueRange: function () {},",""," /**"," * Override of stub method in SliderBase that is called at the end of"," * its bindUI stage of render(). Subscribes to internal events to"," * trigger UI and related state updates."," *"," * @method _bindValueLogic"," * @protected"," */"," _bindValueLogic: function () {"," this.after( {"," minChange : this._afterMinChange,"," maxChange : this._afterMaxChange,"," valueChange: this._afterValueChange"," } );"," },",""," /**"," * Move the thumb to appropriate position if necessary. Also resets"," * the cached offsets and recalculates the conversion factor to"," * translate position to value."," *"," * @method _syncThumbPosition"," * @protected"," */"," _syncThumbPosition: function () {"," this._calculateFactor();",""," this._setPosition( this.get( VALUE ) );"," },",""," /**"," * Calculates and caches"," * (range between max and min) / (rail length)"," * for fast runtime calculation of position -> value."," *"," * @method _calculateFactor"," * @protected"," */"," _calculateFactor: function () {"," var length = this.get( 'length' ),"," thumbSize = this.thumb.getStyle( this._key.dim ),"," min = this.get( MIN ),"," max = this.get( MAX );",""," // The default thumb width is based on Sam skin's thumb dimension."," // This attempts to allow for rendering off-DOM, then attaching"," // without the need to call syncUI(). It is still recommended"," // to call syncUI() in these cases though, just to be sure."," length = parseFloat( length ) || 150;"," thumbSize = parseFloat( thumbSize ) || 15;",""," this._factor = ( max - min ) / ( length - thumbSize );",""," },",""," /**"," * Dispatch the new position of the thumb into the value setting"," * operations."," *"," * @method _defThumbMoveFn"," * @param e { EventFacade } The host's thumbMove event"," * @protected"," */"," _defThumbMoveFn: function ( e ) {"," // To prevent set('value', x) from looping back around"," if (e.source !== 'set') {"," this.set(VALUE, this._offsetToValue(e.offset));"," }"," },",""," /**"," * Converts a pixel position into a value. Calculates current"," * thumb offset from the leading edge of the rail multiplied by the"," * ratio of (max - min) / (constraining dim)
.
Override this if you want to use a different value mapping"," * algorithm.
"," *"," * @method _offsetToValue"," * @param offset { Number } X or Y pixel offset"," * @return { mixed } Value corresponding to the provided pixel offset"," * @protected"," */"," _offsetToValue: function ( offset ) {",""," var value = round( offset * this._factor ) + this.get( MIN );",""," return round( this._nearestValue( value ) );"," },",""," /**"," * Converts a value into a pixel offset for use in positioning"," * the thumb according to the reverse of the"," *_offsetToValue( xy )
operation."," *"," * @method _valueToOffset"," * @param val { Number } The value to map to pixel X or Y position"," * @return { Number } The pixel offset"," * @protected"," */"," _valueToOffset: function ( value ) {"," var offset = round( ( value - this.get( MIN ) ) / this._factor );",""," return offset;"," },",""," /**"," * Returns the current value. Override this if you want to introduce"," * output formatting. Otherwise equivalent to slider.get( \"value\" );"," *"," * @method getValue"," * @return {Number}"," */"," getValue: function () {"," return this.get( VALUE );"," },",""," /**"," * Updates the current value. Override this if you want to introduce"," * input value parsing or preprocessing. Otherwise equivalent to"," * slider.set( \"value\", v );"," *"," * @method setValue"," * @param val {Number} The new value"," * @return {Slider}"," * @chainable"," */"," setValue: function ( val ) {"," return this.set( VALUE, val );"," },",""," /**"," * Update position according to new min value. If the new min results"," * in the current value being out of range, the value is set to the"," * closer of min or max."," *"," * @method _afterMinChange"," * @param e { EventFacade } The min
attribute change event."," * @protected"," */"," _afterMinChange: function ( e ) {"," this._verifyValue();",""," this._syncThumbPosition();"," },",""," /**"," * Update position according to new max value. If the new max results"," * in the current value being out of range, the value is set to the"," * closer of min or max."," *"," * @method _afterMaxChange"," * @param e { EventFacade } The max
attribute change event."," * @protected"," */"," _afterMaxChange: function ( e ) {"," this._verifyValue();",""," this._syncThumbPosition();"," },",""," /**"," * Verifies that the current value is within the min - max range. If"," * not, value is set to either min or max, depending on which is"," * closer."," *"," * @method _verifyValue"," * @protected"," */"," _verifyValue: function () {"," var value = this.get( VALUE ),"," nearest = this._nearestValue( value );",""," if ( value !== nearest ) {"," // @TODO Can/should valueChange, minChange, etc be queued"," // events? To make dd.set( 'min', n ); execute after minChange"," // subscribers before on/after valueChange subscribers."," this.set( VALUE, nearest );"," }"," },",""," /**"," * Propagate change to the thumb position unless the change originated"," * from the thumbMove event."," *"," * @method _afterValueChange"," * @param e { EventFacade } The valueChange
event."," * @protected"," */"," _afterValueChange: function ( e ) {"," var val = e.newVal;"," this._setPosition( val, { source: 'set' } );"," },",""," /**"," * Positions the thumb and its ARIA attributes in accordance with the"," * translated value."," *"," * @method _setPosition"," * @param value {Number} Value to translate to a pixel position"," * @param [options] {Object} Details object to pass to `_uiMoveThumb`"," * @protected"," */"," _setPosition: function ( value, options ) {"," this._uiMoveThumb( this._valueToOffset( value ), options );"," this.thumb.set('aria-valuenow', value);"," this.thumb.set('aria-valuetext', value);"," },",""," /**"," * Validates new values assigned to min
attribute. Numbers"," * are acceptable. Override this to enforce different rules."," *"," * @method _validateNewMin"," * @param value {Any} Value assigned to min
attribute."," * @return {Boolean} True for numbers. False otherwise."," * @protected"," */"," _validateNewMin: function ( value ) {"," return Y.Lang.isNumber( value );"," },",""," /**"," * Validates new values assigned to max
attribute. Numbers"," * are acceptable. Override this to enforce different rules."," *"," * @method _validateNewMax"," * @param value { mixed } Value assigned to max
attribute."," * @return { Boolean } True for numbers. False otherwise."," * @protected"," */"," _validateNewMax: function ( value ) {"," return Y.Lang.isNumber( value );"," },",""," /**"," * Restricts new values assigned to value
attribute to be"," * between the configured min
and max
."," * Rounds to nearest integer value."," *"," * @method _setNewValue"," * @param value { Number } Value assigned to value
attribute"," * @return { Number } Normalized and constrained value"," * @protected"," */"," _setNewValue: function ( value ) {"," return round( this._nearestValue( value ) );"," },",""," /**"," * Returns the nearest valid value to the value input. If the provided"," * value is outside the min - max range, accounting for min > max"," * scenarios, the nearest of either min or max is returned. Otherwise,"," * the provided value is returned."," *"," * @method _nearestValue"," * @param value { mixed } Value to test against current min - max range"," * @return { Number } Current min, max, or value if within range"," * @protected"," */"," _nearestValue: function ( value ) {"," var min = this.get( MIN ),"," max = this.get( MAX ),"," tmp;",""," // Account for reverse value range (min > max)"," tmp = ( max > min ) ? max : min;"," min = ( max > min ) ? min : max;"," max = tmp;",""," return ( value < min ) ?"," min :"," ( value > max ) ?"," max :"," value;"," }",""," },",""," /**"," * Attributes that will be added onto host class."," *"," * @property ATTRS"," * @type {Object}"," * @static"," * @protected"," */"," ATTRS: {"," /**"," * The value associated with the farthest top, left position of the"," * rail. Can be greater than the configured max
if you"," * want values to increase from right-to-left or bottom-to-top."," *"," * @attribute min"," * @type { Number }"," * @default 0"," */"," min: {"," value : 0,"," validator: '_validateNewMin'"," },",""," /**"," * The value associated with the farthest bottom, right position of"," * the rail. Can be less than the configured min
if"," * you want values to increase from right-to-left or bottom-to-top."," *"," * @attribute max"," * @type { Number }"," * @default 100"," */"," max: {"," value : 100,"," validator: '_validateNewMax'"," },",""," /**"," * amount to increment/decrement the Slider value"," * when the arrow up/down/left/right keys are pressed"," *"," * @attribute minorStep"," * @type {Number}"," * @default 1"," */"," minorStep : {"," value: 1"," },",""," /**"," * amount to increment/decrement the Slider value"," * when the page up/down keys are pressed"," *"," * @attribute majorStep"," * @type {Number}"," * @default 10"," */"," majorStep : {"," value: 10"," },",""," /**"," * The value associated with the thumb's current position on the"," * rail. Defaults to the value inferred from the thumb's current"," * position. Specifying value in the constructor will move the"," * thumb to the position that corresponds to the supplied value."," *"," * @attribute value"," * @type { Number }"," * @default (inferred from current thumb position)"," */"," value: {"," value : 0,"," setter: '_setNewValue'"," }"," }","}, true );","","","}, '@VERSION@', {\"requires\": [\"slider-base\"]});","","}());"]};
+ __coverage__['build/slider-value-range/slider-value-range.js'] = {"path":"build/slider-value-range/slider-value-range.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":49}}},"2":{"name":"SliderValueRange","line":30,"loc":{"start":{"line":30,"column":0},"end":{"line":30,"column":28}}},"3":{"name":"(anonymous_3)","line":55,"loc":{"start":{"line":55,"column":31},"end":{"line":55,"column":43}}},"4":{"name":"(anonymous_4)","line":65,"loc":{"start":{"line":65,"column":25},"end":{"line":65,"column":37}}},"5":{"name":"(anonymous_5)","line":81,"loc":{"start":{"line":81,"column":28},"end":{"line":81,"column":40}}},"6":{"name":"(anonymous_6)","line":95,"loc":{"start":{"line":95,"column":26},"end":{"line":95,"column":38}}},"7":{"name":"(anonymous_7)","line":120,"loc":{"start":{"line":120,"column":25},"end":{"line":120,"column":40}}},"8":{"name":"(anonymous_8)","line":140,"loc":{"start":{"line":140,"column":24},"end":{"line":140,"column":44}}},"9":{"name":"(anonymous_9)","line":157,"loc":{"start":{"line":157,"column":24},"end":{"line":157,"column":43}}},"10":{"name":"(anonymous_10)","line":170,"loc":{"start":{"line":170,"column":18},"end":{"line":170,"column":30}}},"11":{"name":"(anonymous_11)","line":184,"loc":{"start":{"line":184,"column":18},"end":{"line":184,"column":35}}},"12":{"name":"(anonymous_12)","line":197,"loc":{"start":{"line":197,"column":25},"end":{"line":197,"column":40}}},"13":{"name":"(anonymous_13)","line":212,"loc":{"start":{"line":212,"column":25},"end":{"line":212,"column":40}}},"14":{"name":"(anonymous_14)","line":226,"loc":{"start":{"line":226,"column":22},"end":{"line":226,"column":34}}},"15":{"name":"(anonymous_15)","line":246,"loc":{"start":{"line":246,"column":27},"end":{"line":246,"column":42}}},"16":{"name":"(anonymous_16)","line":260,"loc":{"start":{"line":260,"column":22},"end":{"line":260,"column":50}}},"17":{"name":"(anonymous_17)","line":275,"loc":{"start":{"line":275,"column":25},"end":{"line":275,"column":44}}},"18":{"name":"(anonymous_18)","line":288,"loc":{"start":{"line":288,"column":25},"end":{"line":288,"column":44}}},"19":{"name":"(anonymous_19)","line":302,"loc":{"start":{"line":302,"column":22},"end":{"line":302,"column":41}}},"20":{"name":"(anonymous_20)","line":320,"loc":{"start":{"line":320,"column":23},"end":{"line":320,"column":42}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":418,"column":47}},"2":{"start":{"line":13,"column":0},"end":{"line":19,"column":23}},"3":{"start":{"line":30,"column":0},"end":{"line":32,"column":1}},"4":{"start":{"line":31,"column":4},"end":{"line":31,"column":33}},"5":{"start":{"line":34,"column":0},"end":{"line":415,"column":10}},"6":{"start":{"line":66,"column":12},"end":{"line":70,"column":16}},"7":{"start":{"line":82,"column":12},"end":{"line":82,"column":36}},"8":{"start":{"line":84,"column":12},"end":{"line":84,"column":51}},"9":{"start":{"line":96,"column":12},"end":{"line":99,"column":44}},"10":{"start":{"line":105,"column":12},"end":{"line":105,"column":49}},"11":{"start":{"line":106,"column":12},"end":{"line":106,"column":54}},"12":{"start":{"line":108,"column":12},"end":{"line":108,"column":66}},"13":{"start":{"line":122,"column":12},"end":{"line":124,"column":13}},"14":{"start":{"line":123,"column":16},"end":{"line":123,"column":63}},"15":{"start":{"line":142,"column":12},"end":{"line":142,"column":73}},"16":{"start":{"line":144,"column":12},"end":{"line":144,"column":56}},"17":{"start":{"line":158,"column":12},"end":{"line":158,"column":77}},"18":{"start":{"line":160,"column":12},"end":{"line":160,"column":26}},"19":{"start":{"line":171,"column":12},"end":{"line":171,"column":37}},"20":{"start":{"line":185,"column":12},"end":{"line":185,"column":42}},"21":{"start":{"line":198,"column":12},"end":{"line":198,"column":32}},"22":{"start":{"line":200,"column":12},"end":{"line":200,"column":38}},"23":{"start":{"line":213,"column":12},"end":{"line":213,"column":32}},"24":{"start":{"line":215,"column":12},"end":{"line":215,"column":38}},"25":{"start":{"line":227,"column":12},"end":{"line":228,"column":54}},"26":{"start":{"line":230,"column":12},"end":{"line":235,"column":13}},"27":{"start":{"line":234,"column":16},"end":{"line":234,"column":43}},"28":{"start":{"line":247,"column":12},"end":{"line":247,"column":31}},"29":{"start":{"line":248,"column":12},"end":{"line":248,"column":56}},"30":{"start":{"line":261,"column":12},"end":{"line":261,"column":71}},"31":{"start":{"line":262,"column":12},"end":{"line":262,"column":51}},"32":{"start":{"line":263,"column":12},"end":{"line":263,"column":52}},"33":{"start":{"line":276,"column":12},"end":{"line":276,"column":44}},"34":{"start":{"line":289,"column":12},"end":{"line":289,"column":44}},"35":{"start":{"line":303,"column":12},"end":{"line":305,"column":13}},"36":{"start":{"line":304,"column":16},"end":{"line":304,"column":60}},"37":{"start":{"line":306,"column":12},"end":{"line":306,"column":45}},"38":{"start":{"line":321,"column":12},"end":{"line":323,"column":20}},"39":{"start":{"line":326,"column":12},"end":{"line":326,"column":44}},"40":{"start":{"line":327,"column":12},"end":{"line":327,"column":44}},"41":{"start":{"line":328,"column":12},"end":{"line":328,"column":22}},"42":{"start":{"line":330,"column":12},"end":{"line":334,"column":30}}},"branchMap":{"1":{"line":105,"type":"binary-expr","locations":[{"start":{"line":105,"column":21},"end":{"line":105,"column":41}},{"start":{"line":105,"column":45},"end":{"line":105,"column":48}}]},"2":{"line":106,"type":"binary-expr","locations":[{"start":{"line":106,"column":24},"end":{"line":106,"column":47}},{"start":{"line":106,"column":51},"end":{"line":106,"column":53}}]},"3":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":12},"end":{"line":122,"column":12}},{"start":{"line":122,"column":12},"end":{"line":122,"column":12}}]},"4":{"line":230,"type":"if","locations":[{"start":{"line":230,"column":12},"end":{"line":230,"column":12}},{"start":{"line":230,"column":12},"end":{"line":230,"column":12}}]},"5":{"line":303,"type":"if","locations":[{"start":{"line":303,"column":12},"end":{"line":303,"column":12}},{"start":{"line":303,"column":12},"end":{"line":303,"column":12}}]},"6":{"line":326,"type":"cond-expr","locations":[{"start":{"line":326,"column":34},"end":{"line":326,"column":37}},{"start":{"line":326,"column":40},"end":{"line":326,"column":43}}]},"7":{"line":327,"type":"cond-expr","locations":[{"start":{"line":327,"column":34},"end":{"line":327,"column":37}},{"start":{"line":327,"column":40},"end":{"line":327,"column":43}}]},"8":{"line":330,"type":"cond-expr","locations":[{"start":{"line":331,"column":20},"end":{"line":331,"column":23}},{"start":{"line":332,"column":20},"end":{"line":334,"column":29}}]},"9":{"line":332,"type":"cond-expr","locations":[{"start":{"line":333,"column":24},"end":{"line":333,"column":27}},{"start":{"line":334,"column":24},"end":{"line":334,"column":29}}]}},"code":["(function () { YUI.add('slider-value-range', function (Y, NAME) {","","/**"," * Adds value support for Slider as a range of integers between a configured"," * minimum and maximum value. For use with Y.Base.build(..)
to"," * add the plumbing to Y.SliderBase
."," *"," * @module slider"," * @submodule slider-value-range"," */","","// Constants for compression or performance","var MIN = 'min',"," MAX = 'max',"," VALUE = 'value',","// MINORSTEP = 'minorStep',","// MAJORSTEP = 'majorStep',",""," round = Math.round;","","/**"," * One class of value algorithm that can be built onto SliderBase. By default,"," * values range between 0 and 100, but you can configure these on the"," * built Slider class by setting the min
and max
"," * configurations. Set the initial value (will cause the thumb to move to the"," * appropriate location on the rail) in configuration as well if appropriate."," *"," * @class SliderValueRange"," */","function SliderValueRange() {"," this._initSliderValueRange();","}","","Y.SliderValueRange = Y.mix( SliderValueRange, {",""," // Prototype properties and methods that will be added onto host class"," prototype: {",""," /**"," * Factor used to translate value -> position -> value."," *"," * @property _factor"," * @type {Number}"," * @protected"," */"," _factor: 1,",""," /**"," * Stub for construction logic. Override if extending this class and"," * you need to set something up during the initializer phase."," *"," * @method _initSliderValueRange"," * @protected"," */"," _initSliderValueRange: function () {},",""," /**"," * Override of stub method in SliderBase that is called at the end of"," * its bindUI stage of render(). Subscribes to internal events to"," * trigger UI and related state updates."," *"," * @method _bindValueLogic"," * @protected"," */"," _bindValueLogic: function () {"," this.after( {"," minChange : this._afterMinChange,"," maxChange : this._afterMaxChange,"," valueChange: this._afterValueChange"," } );"," },",""," /**"," * Move the thumb to appropriate position if necessary. Also resets"," * the cached offsets and recalculates the conversion factor to"," * translate position to value."," *"," * @method _syncThumbPosition"," * @protected"," */"," _syncThumbPosition: function () {"," this._calculateFactor();",""," this._setPosition( this.get( VALUE ) );"," },",""," /**"," * Calculates and caches"," * (range between max and min) / (rail length)"," * for fast runtime calculation of position -> value."," *"," * @method _calculateFactor"," * @protected"," */"," _calculateFactor: function () {"," var length = this.get( 'length' ),"," thumbSize = this.thumb.getStyle( this._key.dim ),"," min = this.get( MIN ),"," max = this.get( MAX );",""," // The default thumb width is based on Sam skin's thumb dimension."," // This attempts to allow for rendering off-DOM, then attaching"," // without the need to call syncUI(). It is still recommended"," // to call syncUI() in these cases though, just to be sure."," length = parseFloat( length ) || 150;"," thumbSize = parseFloat( thumbSize ) || 15;",""," this._factor = ( max - min ) / ( length - thumbSize );",""," },",""," /**"," * Dispatch the new position of the thumb into the value setting"," * operations."," *"," * @method _defThumbMoveFn"," * @param e { EventFacade } The host's thumbMove event"," * @protected"," */"," _defThumbMoveFn: function ( e ) {"," // To prevent set('value', x) from looping back around"," if (e.source !== 'set') {"," this.set(VALUE, this._offsetToValue(e.offset));"," }"," },",""," /**"," * Converts a pixel position into a value. Calculates current"," * thumb offset from the leading edge of the rail multiplied by the"," * ratio of (max - min) / (constraining dim)
.
Override this if you want to use a different value mapping"," * algorithm.
"," *"," * @method _offsetToValue"," * @param offset { Number } X or Y pixel offset"," * @return { mixed } Value corresponding to the provided pixel offset"," * @protected"," */"," _offsetToValue: function ( offset ) {",""," var value = round( offset * this._factor ) + this.get( MIN );",""," return round( this._nearestValue( value ) );"," },",""," /**"," * Converts a value into a pixel offset for use in positioning"," * the thumb according to the reverse of the"," *_offsetToValue( xy )
operation."," *"," * @method _valueToOffset"," * @param val { Number } The value to map to pixel X or Y position"," * @return { Number } The pixel offset"," * @protected"," */"," _valueToOffset: function ( value ) {"," var offset = round( ( value - this.get( MIN ) ) / this._factor );",""," return offset;"," },",""," /**"," * Returns the current value. Override this if you want to introduce"," * output formatting. Otherwise equivalent to slider.get( \"value\" );"," *"," * @method getValue"," * @return {Number}"," */"," getValue: function () {"," return this.get( VALUE );"," },",""," /**"," * Updates the current value. Override this if you want to introduce"," * input value parsing or preprocessing. Otherwise equivalent to"," * slider.set( \"value\", v );"," *"," * @method setValue"," * @param val {Number} The new value"," * @return {Slider}"," * @chainable"," */"," setValue: function ( val ) {"," return this.set( VALUE, val );"," },",""," /**"," * Update position according to new min value. If the new min results"," * in the current value being out of range, the value is set to the"," * closer of min or max."," *"," * @method _afterMinChange"," * @param e { EventFacade } The min
attribute change event."," * @protected"," */"," _afterMinChange: function ( e ) {"," this._verifyValue();",""," this._syncThumbPosition();"," },",""," /**"," * Update position according to new max value. If the new max results"," * in the current value being out of range, the value is set to the"," * closer of min or max."," *"," * @method _afterMaxChange"," * @param e { EventFacade } The max
attribute change event."," * @protected"," */"," _afterMaxChange: function ( e ) {"," this._verifyValue();",""," this._syncThumbPosition();"," },",""," /**"," * Verifies that the current value is within the min - max range. If"," * not, value is set to either min or max, depending on which is"," * closer."," *"," * @method _verifyValue"," * @protected"," */"," _verifyValue: function () {"," var value = this.get( VALUE ),"," nearest = this._nearestValue( value );",""," if ( value !== nearest ) {"," // @TODO Can/should valueChange, minChange, etc be queued"," // events? To make dd.set( 'min', n ); execute after minChange"," // subscribers before on/after valueChange subscribers."," this.set( VALUE, nearest );"," }"," },",""," /**"," * Propagate change to the thumb position unless the change originated"," * from the thumbMove event."," *"," * @method _afterValueChange"," * @param e { EventFacade } The valueChange
event."," * @protected"," */"," _afterValueChange: function ( e ) {"," var val = e.newVal;"," this._setPosition( val, { source: 'set' } );"," },",""," /**"," * Positions the thumb and its ARIA attributes in accordance with the"," * translated value."," *"," * @method _setPosition"," * @param value {Number} Value to translate to a pixel position"," * @param [options] {Object} Details object to pass to `_uiMoveThumb`"," * @protected"," */"," _setPosition: function ( value, options ) {"," this._uiMoveThumb( this._valueToOffset( value ), options );"," this.thumb.set('aria-valuenow', value);"," this.thumb.set('aria-valuetext', value);"," },",""," /**"," * Validates new values assigned to min
attribute. Numbers"," * are acceptable. Override this to enforce different rules."," *"," * @method _validateNewMin"," * @param value {Any} Value assigned to min
attribute."," * @return {Boolean} True for numbers. False otherwise."," * @protected"," */"," _validateNewMin: function ( value ) {"," return Y.Lang.isNumber( value );"," },",""," /**"," * Validates new values assigned to max
attribute. Numbers"," * are acceptable. Override this to enforce different rules."," *"," * @method _validateNewMax"," * @param value { mixed } Value assigned to max
attribute."," * @return { Boolean } True for numbers. False otherwise."," * @protected"," */"," _validateNewMax: function ( value ) {"," return Y.Lang.isNumber( value );"," },",""," /**"," * Restricts new values assigned to value
attribute to be"," * between the configured min
and max
."," * Rounds to nearest integer value."," *"," * @method _setNewValue"," * @param value { Number } Value assigned to value
attribute"," * @return { Number } Normalized and constrained value"," * @protected"," */"," _setNewValue: function ( value ) {"," if ( Y.Lang.isNumber( value ) ) {"," return round( this._nearestValue( value ) );"," }"," return Y.Attribute.INVALID_VALUE;"," },",""," /**"," * Returns the nearest valid value to the value input. If the provided"," * value is outside the min - max range, accounting for min > max"," * scenarios, the nearest of either min or max is returned. Otherwise,"," * the provided value is returned."," *"," * @method _nearestValue"," * @param value { mixed } Value to test against current min - max range"," * @return { Number } Current min, max, or value if within range"," * @protected"," */"," _nearestValue: function ( value ) {"," var min = this.get( MIN ),"," max = this.get( MAX ),"," tmp;",""," // Account for reverse value range (min > max)"," tmp = ( max > min ) ? max : min;"," min = ( max > min ) ? min : max;"," max = tmp;",""," return ( value < min ) ?"," min :"," ( value > max ) ?"," max :"," value;"," }",""," },",""," /**"," * Attributes that will be added onto host class."," *"," * @property ATTRS"," * @type {Object}"," * @static"," * @protected"," */"," ATTRS: {"," /**"," * The value associated with the farthest top, left position of the"," * rail. Can be greater than the configured max
if you"," * want values to increase from right-to-left or bottom-to-top."," *"," * @attribute min"," * @type { Number }"," * @default 0"," */"," min: {"," value : 0,"," validator: '_validateNewMin'"," },",""," /**"," * The value associated with the farthest bottom, right position of"," * the rail. Can be less than the configured min
if"," * you want values to increase from right-to-left or bottom-to-top."," *"," * @attribute max"," * @type { Number }"," * @default 100"," */"," max: {"," value : 100,"," validator: '_validateNewMax'"," },",""," /**"," * amount to increment/decrement the Slider value"," * when the arrow up/down/left/right keys are pressed"," *"," * @attribute minorStep"," * @type {Number}"," * @default 1"," */"," minorStep : {"," value: 1"," },",""," /**"," * amount to increment/decrement the Slider value"," * when the page up/down keys are pressed"," *"," * @attribute majorStep"," * @type {Number}"," * @default 10"," */"," majorStep : {"," value: 10"," },",""," /**"," * The value associated with the thumb's current position on the"," * rail. Defaults to the value inferred from the thumb's current"," * position. Specifying value in the constructor will move the"," * thumb to the position that corresponds to the supplied value."," *"," * @attribute value"," * @type { Number }"," * @default (inferred from current thumb position)"," */"," value: {"," value : 0,"," setter: '_setNewValue'"," }"," }","}, true );","","","}, '@VERSION@', {\"requires\": [\"slider-base\"]});","","}());"]};
}
var __cov_hPjVhmdw4NNLE4IFeTii3A = __coverage__['build/slider-value-range/slider-value-range.js'];
-__cov_hPjVhmdw4NNLE4IFeTii3A.s['1']++;YUI.add('slider-value-range',function(Y,NAME){__cov_hPjVhmdw4NNLE4IFeTii3A.f['1']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['2']++;var MIN='min',MAX='max',VALUE='value',round=Math.round;__cov_hPjVhmdw4NNLE4IFeTii3A.s['3']++;function SliderValueRange(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['2']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['4']++;this._initSliderValueRange();}__cov_hPjVhmdw4NNLE4IFeTii3A.s['5']++;Y.SliderValueRange=Y.mix(SliderValueRange,{prototype:{_factor:1,_initSliderValueRange:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['3']++;},_bindValueLogic:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['4']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['6']++;this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange});},_syncThumbPosition:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['5']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['7']++;this._calculateFactor();__cov_hPjVhmdw4NNLE4IFeTii3A.s['8']++;this._setPosition(this.get(VALUE));},_calculateFactor:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['6']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['9']++;var length=this.get('length'),thumbSize=this.thumb.getStyle(this._key.dim),min=this.get(MIN),max=this.get(MAX);__cov_hPjVhmdw4NNLE4IFeTii3A.s['10']++;length=(__cov_hPjVhmdw4NNLE4IFeTii3A.b['1'][0]++,parseFloat(length))||(__cov_hPjVhmdw4NNLE4IFeTii3A.b['1'][1]++,150);__cov_hPjVhmdw4NNLE4IFeTii3A.s['11']++;thumbSize=(__cov_hPjVhmdw4NNLE4IFeTii3A.b['2'][0]++,parseFloat(thumbSize))||(__cov_hPjVhmdw4NNLE4IFeTii3A.b['2'][1]++,15);__cov_hPjVhmdw4NNLE4IFeTii3A.s['12']++;this._factor=(max-min)/(length-thumbSize);},_defThumbMoveFn:function(e){__cov_hPjVhmdw4NNLE4IFeTii3A.f['7']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['13']++;if(e.source!=='set'){__cov_hPjVhmdw4NNLE4IFeTii3A.b['3'][0]++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['14']++;this.set(VALUE,this._offsetToValue(e.offset));}else{__cov_hPjVhmdw4NNLE4IFeTii3A.b['3'][1]++;}},_offsetToValue:function(offset){__cov_hPjVhmdw4NNLE4IFeTii3A.f['8']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['15']++;var value=round(offset*this._factor)+this.get(MIN);__cov_hPjVhmdw4NNLE4IFeTii3A.s['16']++;return round(this._nearestValue(value));},_valueToOffset:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['9']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['17']++;var offset=round((value-this.get(MIN))/this._factor);__cov_hPjVhmdw4NNLE4IFeTii3A.s['18']++;return offset;},getValue:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['10']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['19']++;return this.get(VALUE);},setValue:function(val){__cov_hPjVhmdw4NNLE4IFeTii3A.f['11']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['20']++;return this.set(VALUE,val);},_afterMinChange:function(e){__cov_hPjVhmdw4NNLE4IFeTii3A.f['12']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['21']++;this._verifyValue();__cov_hPjVhmdw4NNLE4IFeTii3A.s['22']++;this._syncThumbPosition();},_afterMaxChange:function(e){__cov_hPjVhmdw4NNLE4IFeTii3A.f['13']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['23']++;this._verifyValue();__cov_hPjVhmdw4NNLE4IFeTii3A.s['24']++;this._syncThumbPosition();},_verifyValue:function(){__cov_hPjVhmdw4NNLE4IFeTii3A.f['14']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['25']++;var value=this.get(VALUE),nearest=this._nearestValue(value);__cov_hPjVhmdw4NNLE4IFeTii3A.s['26']++;if(value!==nearest){__cov_hPjVhmdw4NNLE4IFeTii3A.b['4'][0]++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['27']++;this.set(VALUE,nearest);}else{__cov_hPjVhmdw4NNLE4IFeTii3A.b['4'][1]++;}},_afterValueChange:function(e){__cov_hPjVhmdw4NNLE4IFeTii3A.f['15']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['28']++;var val=e.newVal;__cov_hPjVhmdw4NNLE4IFeTii3A.s['29']++;this._setPosition(val,{source:'set'});},_setPosition:function(value,options){__cov_hPjVhmdw4NNLE4IFeTii3A.f['16']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['30']++;this._uiMoveThumb(this._valueToOffset(value),options);__cov_hPjVhmdw4NNLE4IFeTii3A.s['31']++;this.thumb.set('aria-valuenow',value);__cov_hPjVhmdw4NNLE4IFeTii3A.s['32']++;this.thumb.set('aria-valuetext',value);},_validateNewMin:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['17']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['33']++;return Y.Lang.isNumber(value);},_validateNewMax:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['18']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['34']++;return Y.Lang.isNumber(value);},_setNewValue:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['19']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['35']++;return round(this._nearestValue(value));},_nearestValue:function(value){__cov_hPjVhmdw4NNLE4IFeTii3A.f['20']++;__cov_hPjVhmdw4NNLE4IFeTii3A.s['36']++;var min=this.get(MIN),max=this.get(MAX),tmp;__cov_hPjVhmdw4NNLE4IFeTii3A.s['37']++;tmp=max>min?(__cov_hPjVhmdw4NNLE4IFeTii3A.b['5'][0]++,max):(__cov_hPjVhmdw4NNLE4IFeTii3A.b['5'][1]++,min);__cov_hPjVhmdw4NNLE4IFeTii3A.s['38']++;min=max>min?(__cov_hPjVhmdw4NNLE4IFeTii3A.b['6'][0]++,min):(__cov_hPjVhmdw4NNLE4IFeTii3A.b['6'][1]++,max);__cov_hPjVhmdw4NNLE4IFeTii3A.s['39']++;max=tmp;__cov_hPjVhmdw4NNLE4IFeTii3A.s['40']++;return valueoldMode
indicates the TestRunner should work in the YUI <= 2.8 way"," * of internally managing test suites. groups
is an array"," * of test groups indicating which tests to run."," * @return {Void}"," * @method run"," * @static"," */"," run : function (options) {",""," options = options || {};",""," //pointer to runner to avoid scope issues"," var runner = YUITest.TestRunner,"," oldMode = options.oldMode;","",""," //if there's only one suite on the masterSuite, move it up"," if (!oldMode && this.masterSuite.items.length == 1 && this.masterSuite.items[0] instanceof YUITest.TestSuite){"," this.masterSuite = this.masterSuite.items[0];"," }",""," //determine if there are any groups to filter on"," runner._groups = (options.groups instanceof Array) ? \",\" + options.groups.join(\",\") + \",\" : \"\";",""," //initialize the runner"," runner._buildTestTree();"," runner._context = {};"," runner._root._start = new Date();",""," //fire the begin event"," runner.fire(runner.BEGIN_EVENT);",""," //begin the testing"," runner._run();"," }"," });",""," return new TestRunner();",""," }();","","/**"," * The ArrayAssert object provides functions to test JavaScript array objects"," * for a variety of cases."," * @namespace Test"," * @module test"," * @class ArrayAssert"," * @static"," */","","YUITest.ArrayAssert = {",""," //========================================================================="," // Private methods"," //=========================================================================",""," /**"," * Simple indexOf() implementation for an array. Defers to native"," * if available."," * @param {Array} haystack The array to search."," * @param {Variant} needle The value to locate."," * @return {int} The index of the needle if found or -1 if not."," * @method _indexOf"," * @private"," */"," _indexOf: function(haystack, needle){"," if (haystack.indexOf){"," return haystack.indexOf(needle);"," } else {"," for (var i=0; i < haystack.length; i++){"," if (haystack[i] === needle){"," return i;"," }"," }"," return -1;"," }"," },",""," /**"," * Simple some() implementation for an array. Defers to native"," * if available."," * @param {Array} haystack The array to search."," * @param {Function} matcher The function to run on each value."," * @return {Boolean} True if any value, when run through the matcher,"," * returns true."," * @method _some"," * @private"," */"," _some: function(haystack, matcher){"," if (haystack.some){"," return haystack.some(matcher);"," } else {"," for (var i=0; i < haystack.length; i++){"," if (matcher(haystack[i])){"," return true;"," }"," }"," return false;"," }"," },",""," /**"," * Asserts that a value is present in an array. This uses the triple equals"," * sign so no type coercion may occur."," * @param {Object} needle The value that is expected in the array."," * @param {Array} haystack An array of values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method contains"," * @static"," */"," contains : function (needle, haystack,"," message) {",""," YUITest.Assert._increment();",""," if (this._indexOf(haystack, needle) == -1){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value \" + needle + \" (\" + (typeof needle) + \") not found in array [\" + haystack + \"].\"));"," }"," },",""," /**"," * Asserts that a set of values are present in an array. This uses the triple equals"," * sign so no type coercion may occur. For this assertion to pass, all values must"," * be found."," * @param {Object[]} needles An array of values that are expected in the array."," * @param {Array} haystack An array of values to check."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method containsItems"," * @static"," */"," containsItems : function (needles, haystack,"," message) {"," YUITest.Assert._increment();",""," //begin checking values"," for (var i=0; i < needles.length; i++){"," if (this._indexOf(haystack, needles[i]) == -1){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value \" + needles[i] + \" (\" + (typeof needles[i]) + \") not found in array [\" + haystack + \"].\"));"," }"," }"," },",""," /**"," * Asserts that a value matching some condition is present in an array. This uses"," * a function to determine a match."," * @param {Function} matcher A function that returns true if the items matches or false if not."," * @param {Array} haystack An array of values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method containsMatch"," * @static"," */"," containsMatch : function (matcher, haystack,"," message) {",""," YUITest.Assert._increment();"," //check for valid matcher"," if (typeof matcher != \"function\"){"," throw new TypeError(\"ArrayAssert.containsMatch(): First argument must be a function.\");"," }",""," if (!this._some(haystack, matcher)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"No match found in array [\" + haystack + \"].\"));"," }"," },",""," /**"," * Asserts that a value is not present in an array. This uses the triple equals"," * Asserts that a value is not present in an array. This uses the triple equals"," * sign so no type coercion may occur."," * @param {Object} needle The value that is expected in the array."," * @param {Array} haystack An array of values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method doesNotContain"," * @static"," */"," doesNotContain : function (needle, haystack,"," message) {",""," YUITest.Assert._increment();",""," if (this._indexOf(haystack, needle) > -1){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value found in array [\" + haystack + \"].\"));"," }"," },",""," /**"," * Asserts that a set of values are not present in an array. This uses the triple equals"," * sign so no type coercion may occur. For this assertion to pass, all values must"," * not be found."," * @param {Object[]} needles An array of values that are not expected in the array."," * @param {Array} haystack An array of values to check."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method doesNotContainItems"," * @static"," */"," doesNotContainItems : function (needles, haystack,"," message) {",""," YUITest.Assert._increment();",""," for (var i=0; i < needles.length; i++){"," if (this._indexOf(haystack, needles[i]) > -1){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value found in array [\" + haystack + \"].\"));"," }"," }",""," },",""," /**"," * Asserts that no values matching a condition are present in an array. This uses"," * a function to determine a match."," * @param {Function} matcher A function that returns true if the item matches or false if not."," * @param {Array} haystack An array of values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method doesNotContainMatch"," * @static"," */"," doesNotContainMatch : function (matcher, haystack,"," message) {",""," YUITest.Assert._increment();",""," //check for valid matcher"," if (typeof matcher != \"function\"){"," throw new TypeError(\"ArrayAssert.doesNotContainMatch(): First argument must be a function.\");"," }",""," if (this._some(haystack, matcher)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value found in array [\" + haystack + \"].\"));"," }"," },",""," /**"," * Asserts that the given value is contained in an array at the specified index."," * This uses the triple equals sign so no type coercion will occur."," * @param {Object} needle The value to look for."," * @param {Array} haystack The array to search in."," * @param {int} index The index at which the value should exist."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method indexOf"," * @static"," */"," indexOf : function (needle, haystack, index, message) {",""," YUITest.Assert._increment();",""," //try to find the value in the array"," for (var i=0; i < haystack.length; i++){"," if (haystack[i] === needle){"," if (index != i){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value exists at index \" + i + \" but should be at index \" + index + \".\"));"," }"," return;"," }"," }",""," //if it makes it here, it wasn't found at all"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value doesn't exist in array [\" + haystack + \"].\"));"," },",""," /**"," * Asserts that the values in an array are equal, and in the same position,"," * as values in another array. This uses the double equals sign"," * so type coercion may occur. Note that the array objects themselves"," * need not be the same for this test to pass."," * @param {Array} expected An array of the expected values."," * @param {Array} actual Any array of the actual values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method itemsAreEqual"," * @static"," */"," itemsAreEqual : function (expected, actual,"," message) {",""," YUITest.Assert._increment();",""," //first make sure they're array-like (this can probably be improved)"," if (typeof expected != \"object\" || typeof actual != \"object\"){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value should be an array.\"));"," }",""," //next check array length"," if (expected.length != actual.length){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should have a length of \" + expected.length + \" but has a length of \" + actual.length + \".\"));"," }",""," //begin checking values"," for (var i=0; i < expected.length; i++){"," if (expected[i] != actual[i]){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values in position \" + i + \" are not equal.\"), expected[i], actual[i]);"," }"," }"," },",""," /**"," * Asserts that the values in an array are equivalent, and in the same position,"," * as values in another array. This uses a function to determine if the values"," * are equivalent. Note that the array objects themselves"," * need not be the same for this test to pass."," * @param {Array} expected An array of the expected values."," * @param {Array} actual Any array of the actual values."," * @param {Function} comparator A function that returns true if the values are equivalent"," * or false if not."," * @param {String} message (Optional) The message to display if the assertion fails."," * @return {Void}"," * @method itemsAreEquivalent"," * @static"," */"," itemsAreEquivalent : function (expected, actual,"," comparator, message) {",""," YUITest.Assert._increment();",""," //make sure the comparator is valid"," if (typeof comparator != \"function\"){"," throw new TypeError(\"ArrayAssert.itemsAreEquivalent(): Third argument must be a function.\");"," }",""," //first check array length"," if (expected.length != actual.length){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should have a length of \" + expected.length + \" but has a length of \" + actual.length));"," }",""," //begin checking values"," for (var i=0; i < expected.length; i++){"," if (!comparator(expected[i], actual[i])){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values in position \" + i + \" are not equivalent.\"), expected[i], actual[i]);"," }"," }"," },",""," /**"," * Asserts that an array is empty."," * @param {Array} actual The array to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isEmpty"," * @static"," */"," isEmpty : function (actual, message) {"," YUITest.Assert._increment();"," if (actual.length > 0){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should be empty.\"));"," }"," },",""," /**"," * Asserts that an array is not empty."," * @param {Array} actual The array to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNotEmpty"," * @static"," */"," isNotEmpty : function (actual, message) {"," YUITest.Assert._increment();"," if (actual.length === 0){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should not be empty.\"));"," }"," },",""," /**"," * Asserts that the values in an array are the same, and in the same position,"," * as values in another array. This uses the triple equals sign"," * so no type coercion will occur. Note that the array objects themselves"," * need not be the same for this test to pass."," * @param {Array} expected An array of the expected values."," * @param {Array} actual Any array of the actual values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method itemsAreSame"," * @static"," */"," itemsAreSame : function (expected, actual,"," message) {",""," YUITest.Assert._increment();",""," //first check array length"," if (expected.length != actual.length){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should have a length of \" + expected.length + \" but has a length of \" + actual.length));"," }",""," //begin checking values"," for (var i=0; i < expected.length; i++){"," if (expected[i] !== actual[i]){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values in position \" + i + \" are not the same.\"), expected[i], actual[i]);"," }"," }"," },",""," /**"," * Asserts that the given value is contained in an array at the specified index,"," * starting from the back of the array."," * This uses the triple equals sign so no type coercion will occur."," * @param {Object} needle The value to look for."," * @param {Array} haystack The array to search in."," * @param {int} index The index at which the value should exist."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method lastIndexOf"," * @static"," */"," lastIndexOf : function (needle, haystack, index, message) {",""," //try to find the value in the array"," for (var i=haystack.length; i >= 0; i--){"," if (haystack[i] === needle){"," if (index != i){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value exists at index \" + i + \" but should be at index \" + index + \".\"));"," }"," return;"," }"," }",""," //if it makes it here, it wasn't found at all"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value doesn't exist in array.\"));"," }","","};","","/**"," * The Assert object provides functions to test JavaScript values against"," * known and expected results. Whenever a comparison (assertion) fails,"," * an error is thrown."," * @namespace Test"," * @module test"," * @class Assert"," * @static"," */","YUITest.Assert = {",""," /**"," * The number of assertions performed."," * @property _asserts"," * @type int"," * @private"," */"," _asserts: 0,",""," //-------------------------------------------------------------------------"," // Helper Methods"," //-------------------------------------------------------------------------",""," /**"," * Formats a message so that it can contain the original assertion message"," * in addition to the custom message."," * @param {String} customMessage The message passed in by the developer."," * @param {String} defaultMessage The message created by the error by default."," * @return {String} The final error message, containing either or both."," * @protected"," * @static"," * @method _formatMessage"," */"," _formatMessage : function (customMessage, defaultMessage) {"," if (typeof customMessage == \"string\" && customMessage.length > 0){"," return customMessage.replace(\"{message}\", defaultMessage);"," } else {"," return defaultMessage;"," }"," },",""," /**"," * Returns the number of assertions that have been performed."," * @method _getCount"," * @protected"," * @static"," */"," _getCount: function(){"," return this._asserts;"," },",""," /**"," * Increments the number of assertions that have been performed."," * @method _increment"," * @protected"," * @static"," */"," _increment: function(){"," this._asserts++;"," },",""," /**"," * Resets the number of assertions that have been performed to 0."," * @method _reset"," * @protected"," * @static"," */"," _reset: function(){"," this._asserts = 0;"," },",""," //-------------------------------------------------------------------------"," // Generic Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Forces an assertion error to occur."," * @param {String} message (Optional) The message to display with the failure."," * @method fail"," * @static"," */"," fail : function (message) {"," throw new YUITest.AssertionError(YUITest.Assert._formatMessage(message, \"Test force-failed.\"));"," },",""," /**"," * A marker that the test should pass."," * @method pass"," * @static"," */"," pass : function (message) {"," YUITest.Assert._increment();"," },",""," //-------------------------------------------------------------------------"," // Equality Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Asserts that a value is equal to another. This uses the double equals sign"," * so type coercion may occur."," * @param {Object} expected The expected value."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areEqual"," * @static"," */"," areEqual : function (expected, actual, message) {"," YUITest.Assert._increment();"," if (expected != actual) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values should be equal.\"), expected, actual);"," }"," },",""," /**"," * Asserts that a value is not equal to another. This uses the double equals sign"," * so type coercion may occur."," * @param {Object} unexpected The unexpected value."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areNotEqual"," * @static"," */"," areNotEqual : function (unexpected, actual,"," message) {"," YUITest.Assert._increment();"," if (unexpected == actual) {"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Values should not be equal.\"), unexpected);"," }"," },",""," /**"," * Asserts that a value is not the same as another. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} unexpected The unexpected value."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areNotSame"," * @static"," */"," areNotSame : function (unexpected, actual, message) {"," YUITest.Assert._increment();"," if (unexpected === actual) {"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Values should not be the same.\"), unexpected);"," }"," },",""," /**"," * Asserts that a value is the same as another. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} expected The expected value."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areSame"," * @static"," */"," areSame : function (expected, actual, message) {"," YUITest.Assert._increment();"," if (expected !== actual) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values should be the same.\"), expected, actual);"," }"," },",""," //-------------------------------------------------------------------------"," // Boolean Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Asserts that a value is false. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isFalse"," * @static"," */"," isFalse : function (actual, message) {"," YUITest.Assert._increment();"," if (false !== actual) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be false.\"), false, actual);"," }"," },",""," /**"," * Asserts that a value is true. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isTrue"," * @static"," */"," isTrue : function (actual, message) {"," YUITest.Assert._increment();"," if (true !== actual) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be true.\"), true, actual);"," }",""," },",""," //-------------------------------------------------------------------------"," // Special Value Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Asserts that a value is not a number."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNaN"," * @static"," */"," isNaN : function (actual, message){"," YUITest.Assert._increment();"," if (!isNaN(actual)){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be NaN.\"), NaN, actual);"," }"," },",""," /**"," * Asserts that a value is not the special NaN value."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNotNaN"," * @static"," */"," isNotNaN : function (actual, message){"," YUITest.Assert._increment();"," if (isNaN(actual)){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Values should not be NaN.\"), NaN);"," }"," },",""," /**"," * Asserts that a value is not null. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNotNull"," * @static"," */"," isNotNull : function (actual, message) {"," YUITest.Assert._increment();"," if (actual === null) {"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Values should not be null.\"), null);"," }"," },",""," /**"," * Asserts that a value is not undefined. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNotUndefined"," * @static"," */"," isNotUndefined : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual == \"undefined\") {"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should not be undefined.\"), undefined);"," }"," },",""," /**"," * Asserts that a value is null. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNull"," * @static"," */"," isNull : function (actual, message) {"," YUITest.Assert._increment();"," if (actual !== null) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be null.\"), null, actual);"," }"," },",""," /**"," * Asserts that a value is undefined. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isUndefined"," * @static"," */"," isUndefined : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual != \"undefined\") {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be undefined.\"), undefined, actual);"," }"," },",""," //--------------------------------------------------------------------------"," // Instance Assertion Methods"," //--------------------------------------------------------------------------",""," /**"," * Asserts that a value is an array."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isArray"," * @static"," */"," isArray : function (actual, message) {"," YUITest.Assert._increment();"," var shouldFail = false;"," if (Array.isArray){"," shouldFail = !Array.isArray(actual);"," } else {"," shouldFail = Object.prototype.toString.call(actual) != \"[object Array]\";"," }"," if (shouldFail){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be an array.\"), actual);"," }"," },",""," /**"," * Asserts that a value is a Boolean."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isBoolean"," * @static"," */"," isBoolean : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual != \"boolean\"){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be a Boolean.\"), actual);"," }"," },",""," /**"," * Asserts that a value is a function."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isFunction"," * @static"," */"," isFunction : function (actual, message) {"," YUITest.Assert._increment();"," if (!(actual instanceof Function)){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be a function.\"), actual);"," }"," },",""," /**"," * Asserts that a value is an instance of a particular object. This may return"," * incorrect results when comparing objects from one frame to constructors in"," * another frame. For best results, don't use in a cross-frame manner."," * @param {Function} expected The function that the object should be an instance of."," * @param {Object} actual The object to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isInstanceOf"," * @static"," */"," isInstanceOf : function (expected, actual, message) {"," YUITest.Assert._increment();"," if (!(actual instanceof expected)){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value isn't an instance of expected type.\"), expected, actual);"," }"," },",""," /**"," * Asserts that a value is a number."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNumber"," * @static"," */"," isNumber : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual != \"number\"){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be a number.\"), actual);"," }"," },",""," /**"," * Asserts that a value is an object."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isObject"," * @static"," */"," isObject : function (actual, message) {"," YUITest.Assert._increment();"," if (!actual || (typeof actual != \"object\" && typeof actual != \"function\")){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be an object.\"), actual);"," }"," },",""," /**"," * Asserts that a value is a string."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isString"," * @static"," */"," isString : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual != \"string\"){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be a string.\"), actual);"," }"," },",""," /**"," * Asserts that a value is of a particular type."," * @param {String} expectedType The expected type of the variable."," * @param {Object} actualValue The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isTypeOf"," * @static"," */"," isTypeOf : function (expectedType, actualValue, message){"," YUITest.Assert._increment();"," if (typeof actualValue != expectedType){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be of type \" + expectedType + \".\"), expectedType, typeof actualValue);"," }"," },",""," //--------------------------------------------------------------------------"," // Error Detection Methods"," //--------------------------------------------------------------------------",""," /**"," * Asserts that executing a particular method should throw an error of"," * a specific type. This is a replacement for _should.error."," * @param {String|Function|Object} expectedError If a string, this"," * is the error message that the error must have; if a function, this"," * is the constructor that should have been used to create the thrown"," * error; if an object, this is an instance of a particular error type"," * with a specific error message (both must match)."," * @param {Function} method The method to execute that should throw the error."," * @param {String} message (Optional) The message to display if the assertion"," * fails."," * @method throwsError"," * @return {void}"," * @static"," */"," throwsError: function(expectedError, method, message){"," YUITest.Assert._increment();"," var error = false;",""," try {"," method();"," } catch (thrown) {",""," //check to see what type of data we have"," if (typeof expectedError == \"string\"){",""," //if it's a string, check the error message"," if (thrown.message != expectedError){"," error = true;"," }"," } else if (typeof expectedError == \"function\"){",""," //if it's a function, see if the error is an instance of it"," if (!(thrown instanceof expectedError)){"," error = true;"," }",""," } else if (typeof expectedError == \"object\" && expectedError !== null){",""," //if it's an object, check the instance and message"," if (!(thrown instanceof expectedError.constructor) ||"," thrown.message != expectedError.message){"," error = true;"," }",""," } else { //if it gets here, the argument could be wrong"," error = true;"," }",""," if (error){"," throw new YUITest.UnexpectedError(thrown);"," } else {"," return;"," }"," }",""," //if it reaches here, the error wasn't thrown, which is a bad thing"," throw new YUITest.AssertionError(YUITest.Assert._formatMessage(message, \"Error should have been thrown.\"));"," }","","};","/**"," * Error is thrown whenever an assertion fails. It provides methods"," * to more easily get at error information and also provides a base class"," * from which more specific assertion errors can be derived."," *"," * @param {String} message The message to display when the error occurs."," * @namespace Test"," * @module test"," * @class AssertionError"," * @constructor"," */","YUITest.AssertionError = function (message){",""," /**"," * Error message. Must be duplicated to ensure browser receives it."," * @type String"," * @property message"," */"," this.message = message;",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"Assert Error\";","};","","YUITest.AssertionError.prototype = {",""," //restore constructor"," constructor: YUITest.AssertionError,",""," /**"," * Returns a fully formatted error for an assertion failure. This should"," * be overridden by all subclasses to provide specific information."," * @method getMessage"," * @return {String} A string describing the error."," */"," getMessage : function () {"," return this.message;"," },",""," /**"," * Returns a string representation of the error."," * @method toString"," * @return {String} A string representation of the error."," */"," toString : function () {"," return this.name + \": \" + this.getMessage();"," }","","};","/**"," * ComparisonFailure is subclass of Error that is thrown whenever"," * a comparison between two values fails. It provides mechanisms to retrieve"," * both the expected and actual value."," *"," * @param {String} message The message to display when the error occurs."," * @param {Object} expected The expected value."," * @param {Object} actual The actual value that caused the assertion to fail."," * @namespace Test"," * @extends AssertionError"," * @module test"," * @class ComparisonFailure"," * @constructor"," */","YUITest.ComparisonFailure = function (message, expected, actual){",""," //call superclass"," YUITest.AssertionError.call(this, message);",""," /**"," * The expected value."," * @type Object"," * @property expected"," */"," this.expected = expected;",""," /**"," * The actual value."," * @type Object"," * @property actual"," */"," this.actual = actual;",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"ComparisonFailure\";","","};","","//inherit from YUITest.AssertionError","YUITest.ComparisonFailure.prototype = new YUITest.AssertionError;","","//restore constructor","YUITest.ComparisonFailure.prototype.constructor = YUITest.ComparisonFailure;","","/**"," * Returns a fully formatted error for an assertion failure. This message"," * provides information about the expected and actual values."," * @method getMessage"," * @return {String} A string describing the error."," */","YUITest.ComparisonFailure.prototype.getMessage = function(){"," return this.message + \"\\nExpected: \" + this.expected + \" (\" + (typeof this.expected) + \")\" +"," \"\\nActual: \" + this.actual + \" (\" + (typeof this.actual) + \")\";","};","/**"," * An object object containing coverage result formatting methods."," * @namespace Test"," * @module test"," * @class CoverageFormat"," * @static"," */","YUITest.CoverageFormat = {",""," /**"," * Returns the coverage report in JSON format. This is the straight"," * JSON representation of the native coverage report."," * @param {Object} coverage The coverage report object."," * @return {String} A JSON-formatted string of coverage data."," * @method JSON"," * @namespace Test.CoverageFormat"," */"," JSON: function(coverage){"," return YUITest.Util.JSON.stringify(coverage);"," },",""," /**"," * Returns the coverage report in a JSON format compatible with"," * Xdebug. See Xdebug Documentation"," * for more information. Note: function coverage is not available"," * in this format."," * @param {Object} coverage The coverage report object."," * @return {String} A JSON-formatted string of coverage data."," * @method XdebugJSON"," * @namespace Test.CoverageFormat"," */"," XdebugJSON: function(coverage){",""," var report = {};"," for (var prop in coverage){"," if (coverage.hasOwnProperty(prop)){"," report[prop] = coverage[prop].lines;"," }"," }",""," return YUITest.Util.JSON.stringify(coverage);"," }","","};","","","/**"," * The DateAssert object provides functions to test JavaScript Date objects"," * for a variety of cases."," * @namespace Test"," * @module test"," * @class DateAssert"," * @static"," */","","YUITest.DateAssert = {",""," /**"," * Asserts that a date's month, day, and year are equal to another date's."," * @param {Date} expected The expected date."," * @param {Date} actual The actual date to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method datesAreEqual"," * @static"," */"," datesAreEqual : function (expected, actual, message){"," YUITest.Assert._increment();"," if (expected instanceof Date && actual instanceof Date){"," var msg = \"\";",""," //check years first"," if (expected.getFullYear() != actual.getFullYear()){"," msg = \"Years should be equal.\";"," }",""," //now check months"," if (expected.getMonth() != actual.getMonth()){"," msg = \"Months should be equal.\";"," }",""," //last, check the day of the month"," if (expected.getDate() != actual.getDate()){"," msg = \"Days of month should be equal.\";"," }",""," if (msg.length){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, msg), expected, actual);"," }"," } else {"," throw new TypeError(\"YUITest.DateAssert.datesAreEqual(): Expected and actual values must be Date objects.\");"," }"," },",""," /**"," * Asserts that a date's hour, minutes, and seconds are equal to another date's."," * @param {Date} expected The expected date."," * @param {Date} actual The actual date to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method timesAreEqual"," * @static"," */"," timesAreEqual : function (expected, actual, message){"," YUITest.Assert._increment();"," if (expected instanceof Date && actual instanceof Date){"," var msg = \"\";",""," //check hours first"," if (expected.getHours() != actual.getHours()){"," msg = \"Hours should be equal.\";"," }",""," //now check minutes"," if (expected.getMinutes() != actual.getMinutes()){"," msg = \"Minutes should be equal.\";"," }",""," //last, check the seconds"," if (expected.getSeconds() != actual.getSeconds()){"," msg = \"Seconds should be equal.\";"," }",""," if (msg.length){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, msg), expected, actual);"," }"," } else {"," throw new TypeError(\"YUITest.DateAssert.timesAreEqual(): Expected and actual values must be Date objects.\");"," }"," }","","};","/**"," * Creates a new mock object."," * @namespace Test"," * @module test"," * @class Mock"," * @constructor"," * @param {Object} template (Optional) An object whose methods"," * should be stubbed out on the mock object."," */","YUITest.Mock = function(template){",""," //use blank object is nothing is passed in"," template = template || {};",""," var mock,"," name;",""," //try to create mock that keeps prototype chain intact"," //fails in the case of ActiveX objects"," try {"," function f(){}"," f.prototype = template;"," mock = new f();"," } catch (ex) {"," mock = {};"," }",""," //create stubs for all methods"," for (name in template){"," if (template.hasOwnProperty(name)){"," if (typeof template[name] == \"function\"){"," mock[name] = function(name){"," return function(){"," YUITest.Assert.fail(\"Method \" + name + \"() was called but was not expected to be.\");"," };"," }(name);"," }"," }"," }",""," //return it"," return mock;","};","","/**"," * Assigns an expectation to a mock object. This is used to create"," * methods and properties on the mock object that are monitored for"," * calls and changes, respectively."," * @param {Object} mock The object to add the expectation to."," * @param {Object} expectation An object defining the expectation. For"," * properties, the keys \"property\" and \"value\" are required. For a"," * method the \"method\" key defines the method's name, the optional \"args\""," * key provides an array of argument types. The \"returns\" key provides"," * an optional return value. An optional \"run\" key provides a function"," * to be used as the method body. The return value of a mocked method is"," * determined first by the \"returns\" key, then the \"run\" function's return"," * value. If neither \"returns\" nor \"run\" is provided undefined is returned."," * An optional 'error' key defines an error type to be thrown in all cases."," * The \"callCount\" key provides an optional number of times the method is"," * expected to be called (the default is 1)."," * @return {void}"," * @method expect"," * @static"," */","YUITest.Mock.expect = function(mock /*:Object*/, expectation /*:Object*/){",""," //make sure there's a place to store the expectations"," if (!mock.__expectations) {"," mock.__expectations = {};"," }",""," //method expectation"," if (expectation.method){"," var name = expectation.method,"," args = expectation.args || [],"," result = expectation.returns,"," callCount = (typeof expectation.callCount == \"number\") ? expectation.callCount : 1,"," error = expectation.error,"," run = expectation.run || function(){},"," runResult,"," i;",""," //save expectations"," mock.__expectations[name] = expectation;"," expectation.callCount = callCount;"," expectation.actualCallCount = 0;",""," //process arguments"," for (i=0; i < args.length; i++){"," if (!(args[i] instanceof YUITest.Mock.Value)){"," args[i] = YUITest.Mock.Value(YUITest.Assert.areSame, [args[i]], \"Argument \" + i + \" of \" + name + \"() is incorrect.\");"," }"," }",""," //if the method is expected to be called"," if (callCount > 0){"," mock[name] = function(){"," try {"," expectation.actualCallCount++;"," YUITest.Assert.areEqual(args.length, arguments.length, \"Method \" + name + \"() passed incorrect number of arguments.\");"," for (var i=0, len=args.length; i < len; i++){"," args[i].verify(arguments[i]);"," }",""," runResult = run.apply(this, arguments);",""," if (error){"," throw error;"," }"," } catch (ex){"," //route through TestRunner for proper handling"," YUITest.TestRunner._handleError(ex);"," }",""," // Any value provided for 'returns' overrides any value returned"," // by our 'run' function."," return expectation.hasOwnProperty('returns') ? result : runResult;"," };"," } else {",""," //method should fail if called when not expected"," mock[name] = function(){"," try {"," YUITest.Assert.fail(\"Method \" + name + \"() should not have been called.\");"," } catch (ex){"," //route through TestRunner for proper handling"," YUITest.TestRunner._handleError(ex);"," }"," };"," }"," } else if (expectation.property){"," //save expectations"," mock.__expectations[expectation.property] = expectation;"," }","};","","/**"," * Verifies that all expectations of a mock object have been met and"," * throws an assertion error if not."," * @param {Object} mock The object to verify.."," * @return {void}"," * @method verify"," * @static"," */","YUITest.Mock.verify = function(mock){"," try {",""," for (var name in mock.__expectations){"," if (mock.__expectations.hasOwnProperty(name)){"," var expectation = mock.__expectations[name];"," if (expectation.method) {"," YUITest.Assert.areEqual(expectation.callCount, expectation.actualCallCount, \"Method \" + expectation.method + \"() wasn't called the expected number of times.\");"," } else if (expectation.property){"," YUITest.Assert.areEqual(expectation.value, mock[expectation.property], \"Property \" + expectation.property + \" wasn't set to the correct value.\");"," }"," }"," }",""," } catch (ex){"," //route through TestRunner for proper handling"," YUITest.TestRunner._handleError(ex);"," }","};","","/**"," * Creates a new value matcher."," * @param {Function} method The function to call on the value."," * @param {Array} originalArgs (Optional) Array of arguments to pass to the method."," * @param {String} message (Optional) Message to display in case of failure."," * @namespace Test.Mock"," * @module test"," * @class Value"," * @constructor"," */","YUITest.Mock.Value = function(method, originalArgs, message){"," if (this instanceof YUITest.Mock.Value){"," this.verify = function(value){"," var args = [].concat(originalArgs || []);"," args.push(value);"," args.push(message);"," method.apply(null, args);"," };"," } else {"," return new YUITest.Mock.Value(method, originalArgs, message);"," }","};","","/**"," * Predefined matcher to match any value."," * @property Any"," * @static"," * @type Function"," */","YUITest.Mock.Value.Any = YUITest.Mock.Value(function(){});","","/**"," * Predefined matcher to match boolean values."," * @property Boolean"," * @static"," * @type Function"," */","YUITest.Mock.Value.Boolean = YUITest.Mock.Value(YUITest.Assert.isBoolean);","","/**"," * Predefined matcher to match number values."," * @property Number"," * @static"," * @type Function"," */","YUITest.Mock.Value.Number = YUITest.Mock.Value(YUITest.Assert.isNumber);","","/**"," * Predefined matcher to match string values."," * @property String"," * @static"," * @type Function"," */","YUITest.Mock.Value.String = YUITest.Mock.Value(YUITest.Assert.isString);","","/**"," * Predefined matcher to match object values."," * @property Object"," * @static"," * @type Function"," */","YUITest.Mock.Value.Object = YUITest.Mock.Value(YUITest.Assert.isObject);","","/**"," * Predefined matcher to match function values."," * @property Function"," * @static"," * @type Function"," */","YUITest.Mock.Value.Function = YUITest.Mock.Value(YUITest.Assert.isFunction);","","/**"," * The ObjectAssert object provides functions to test JavaScript objects"," * for a variety of cases."," * @namespace Test"," * @module test"," * @class ObjectAssert"," * @static"," */","YUITest.ObjectAssert = {",""," /**"," * Asserts that an object has all of the same properties"," * and property values as the other."," * @param {Object} expected The object with all expected properties and values."," * @param {Object} actual The object to inspect."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areEqual"," * @static"," * @deprecated"," */"," areEqual: function(expected, actual, message) {"," YUITest.Assert._increment();",""," var expectedKeys = YUITest.Object.keys(expected),"," actualKeys = YUITest.Object.keys(actual);",""," //first check keys array length"," if (expectedKeys.length != actualKeys.length){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Object should have \" + expectedKeys.length + \" keys but has \" + actualKeys.length));"," }",""," //then check values"," for (var name in expected){"," if (expected.hasOwnProperty(name)){"," if (expected[name] != actual[name]){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values should be equal for property \" + name), expected[name], actual[name]);"," }"," }"," }"," },",""," /**"," * Asserts that an object has a property with the given name."," * @param {String} propertyName The name of the property to test."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method hasKey"," * @static"," * @deprecated Use ownsOrInheritsKey() instead"," */"," hasKey: function (propertyName, object, message) {"," YUITest.ObjectAssert.ownsOrInheritsKey(propertyName, object, message);"," },",""," /**"," * Asserts that an object has all properties of a reference object."," * @param {Array} properties An array of property names that should be on the object."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method hasKeys"," * @static"," * @deprecated Use ownsOrInheritsKeys() instead"," */"," hasKeys: function (properties, object, message) {"," YUITest.ObjectAssert.ownsOrInheritsKeys(properties, object, message);"," },",""," /**"," * Asserts that a property with the given name exists on an object's prototype."," * @param {String} propertyName The name of the property to test."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method inheritsKey"," * @static"," */"," inheritsKey: function (propertyName, object, message) {"," YUITest.Assert._increment();"," if (!(propertyName in object && !object.hasOwnProperty(propertyName))){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + propertyName + \"' not found on object instance.\"));"," }"," },",""," /**"," * Asserts that all properties exist on an object prototype."," * @param {Array} properties An array of property names that should be on the object."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method inheritsKeys"," * @static"," */"," inheritsKeys: function (properties, object, message) {"," YUITest.Assert._increment();"," for (var i=0; i < properties.length; i++){"," if (!(propertyName in object && !object.hasOwnProperty(properties[i]))){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + properties[i] + \"' not found on object instance.\"));"," }"," }"," },",""," /**"," * Asserts that a property with the given name exists on an object instance (not on its prototype)."," * @param {String} propertyName The name of the property to test."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsKey"," * @static"," */"," ownsKey: function (propertyName, object, message) {"," YUITest.Assert._increment();"," if (!object.hasOwnProperty(propertyName)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + propertyName + \"' not found on object instance.\"));"," }"," },",""," /**"," * Asserts that all properties exist on an object instance (not on its prototype)."," * @param {Array} properties An array of property names that should be on the object."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsKeys"," * @static"," */"," ownsKeys: function (properties, object, message) {"," YUITest.Assert._increment();"," for (var i=0; i < properties.length; i++){"," if (!object.hasOwnProperty(properties[i])){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + properties[i] + \"' not found on object instance.\"));"," }"," }"," },",""," /**"," * Asserts that an object owns no properties."," * @param {Object} object The object to check."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsNoKeys"," * @static"," */"," ownsNoKeys : function (object, message) {"," YUITest.Assert._increment();"," var count = YUITest.Object.keys(object).length;",""," if (count !== 0){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Object owns \" + count + \" properties but should own none.\"));"," }",""," },",""," /**"," * Asserts that an object has a property with the given name."," * @param {String} propertyName The name of the property to test."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsOrInheritsKey"," * @static"," */"," ownsOrInheritsKey: function (propertyName, object, message) {"," YUITest.Assert._increment();"," if (!(propertyName in object)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + propertyName + \"' not found on object.\"));"," }"," },",""," /**"," * Asserts that an object has all properties of a reference object."," * @param {Array} properties An array of property names that should be on the object."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsOrInheritsKeys"," * @static"," */"," ownsOrInheritsKeys: function (properties, object, message) {"," YUITest.Assert._increment();"," for (var i=0; i < properties.length; i++){"," if (!(properties[i] in object)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + properties[i] + \"' not found on object.\"));"," }"," }"," }","};","/**"," * Convenience type for storing and aggregating"," * test result information."," * @private"," * @namespace Test"," * @module test"," * @class Results"," * @constructor"," * @param {String} name The name of the test."," */","YUITest.Results = function(name){",""," /**"," * Name of the test, test case, or test suite."," * @type String"," * @property name"," */"," this.name = name;",""," /**"," * Number of passed tests."," * @type int"," * @property passed"," */"," this.passed = 0;",""," /**"," * Number of failed tests."," * @type int"," * @property failed"," */"," this.failed = 0;",""," /**"," * Number of errors that occur in non-test methods."," * @type int"," * @property errors"," */"," this.errors = 0;",""," /**"," * Number of ignored tests."," * @type int"," * @property ignored"," */"," this.ignored = 0;",""," /**"," * Number of total tests."," * @type int"," * @property total"," */"," this.total = 0;",""," /**"," * Amount of time (ms) it took to complete testing."," * @type int"," * @property duration"," */"," this.duration = 0;","};","","/**"," * Includes results from another results object into this one."," * @param {Test.Results} result The results object to include."," * @method include"," * @return {void}"," */","YUITest.Results.prototype.include = function(results){"," this.passed += results.passed;"," this.failed += results.failed;"," this.ignored += results.ignored;"," this.total += results.total;"," this.errors += results.errors;","};","/**"," * ShouldError is subclass of Error that is thrown whenever"," * a test is expected to throw an error but doesn't."," *"," * @param {String} message The message to display when the error occurs."," * @namespace Test"," * @extends AssertionError"," * @module test"," * @class ShouldError"," * @constructor"," */","YUITest.ShouldError = function (message){",""," //call superclass"," YUITest.AssertionError.call(this, message || \"This test should have thrown an error but didn't.\");",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"ShouldError\";","","};","","//inherit from YUITest.AssertionError","YUITest.ShouldError.prototype = new YUITest.AssertionError();","","//restore constructor","YUITest.ShouldError.prototype.constructor = YUITest.ShouldError;","/**"," * ShouldFail is subclass of AssertionError that is thrown whenever"," * a test was expected to fail but did not."," *"," * @param {String} message The message to display when the error occurs."," * @namespace Test"," * @extends YUITest.AssertionError"," * @module test"," * @class ShouldFail"," * @constructor"," */","YUITest.ShouldFail = function (message){",""," //call superclass"," YUITest.AssertionError.call(this, message || \"This test should fail but didn't.\");",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"ShouldFail\";","","};","","//inherit from YUITest.AssertionError","YUITest.ShouldFail.prototype = new YUITest.AssertionError();","","//restore constructor","YUITest.ShouldFail.prototype.constructor = YUITest.ShouldFail;","/**"," * UnexpectedError is subclass of AssertionError that is thrown whenever"," * an error occurs within the course of a test and the test was not expected"," * to throw an error."," *"," * @param {Error} cause The unexpected error that caused this error to be"," * thrown."," * @namespace Test"," * @extends YUITest.AssertionError"," * @module test"," * @class UnexpectedError"," * @constructor"," */","YUITest.UnexpectedError = function (cause){",""," //call superclass"," YUITest.AssertionError.call(this, \"Unexpected error: \" + cause.message);",""," /**"," * The unexpected error that occurred."," * @type Error"," * @property cause"," */"," this.cause = cause;",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"UnexpectedError\";",""," /**"," * Stack information for the error (if provided)."," * @type String"," * @property stack"," */"," this.stack = cause.stack;","","};","","//inherit from YUITest.AssertionError","YUITest.UnexpectedError.prototype = new YUITest.AssertionError();","","//restore constructor","YUITest.UnexpectedError.prototype.constructor = YUITest.UnexpectedError;","/**"," * UnexpectedValue is subclass of Error that is thrown whenever"," * a value was unexpected in its scope. This typically means that a test"," * was performed to determine that a value was *not* equal to a certain"," * value."," *"," * @param {String} message The message to display when the error occurs."," * @param {Object} unexpected The unexpected value."," * @namespace Test"," * @extends AssertionError"," * @module test"," * @class UnexpectedValue"," * @constructor"," */","YUITest.UnexpectedValue = function (message, unexpected){",""," //call superclass"," YUITest.AssertionError.call(this, message);",""," /**"," * The unexpected value."," * @type Object"," * @property unexpected"," */"," this.unexpected = unexpected;",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"UnexpectedValue\";","","};","","//inherit from YUITest.AssertionError","YUITest.UnexpectedValue.prototype = new YUITest.AssertionError();","","//restore constructor","YUITest.UnexpectedValue.prototype.constructor = YUITest.UnexpectedValue;","","/**"," * Returns a fully formatted error for an assertion failure. This message"," * provides information about the expected and actual values."," * @method getMessage"," * @return {String} A string describing the error."," */","YUITest.UnexpectedValue.prototype.getMessage = function(){"," return this.message + \"\\nUnexpected: \" + this.unexpected + \" (\" + (typeof this.unexpected) + \") \";","};","","/**"," * Represents a stoppage in test execution to wait for an amount of time before"," * continuing."," * @param {Function} segment A function to run when the wait is over."," * @param {int} delay The number of milliseconds to wait before running the code."," * @module test"," * @class Wait"," * @namespace Test"," * @constructor"," *"," */","YUITest.Wait = function (segment, delay) {",""," /**"," * The segment of code to run when the wait is over."," * @type Function"," * @property segment"," */"," this.segment = (typeof segment == \"function\" ? segment : null);",""," /**"," * The delay before running the segment of code."," * @type int"," * @property delay"," */"," this.delay = (typeof delay == \"number\" ? delay : 0);","};","","","//Setting up our aliases..","Y.Test = YUITest;","Y.Object.each(YUITest, function(item, name) {"," var name = name.replace('Test', '');"," Y.Test[name] = item;","});","","} //End of else in top wrapper","","Y.Assert = YUITest.Assert;","Y.Assert.Error = Y.Test.AssertionError;","Y.Assert.ComparisonFailure = Y.Test.ComparisonFailure;","Y.Assert.UnexpectedValue = Y.Test.UnexpectedValue;","Y.Mock = Y.Test.Mock;","Y.ObjectAssert = Y.Test.ObjectAssert;","Y.ArrayAssert = Y.Test.ArrayAssert;","Y.DateAssert = Y.Test.DateAssert;","Y.Test.ResultsFormat = Y.Test.TestFormat;","","var itemsAreEqual = Y.Test.ArrayAssert.itemsAreEqual;","","Y.Test.ArrayAssert.itemsAreEqual = function(expected, actual, message) {"," return itemsAreEqual.call(this, Y.Array(expected), Y.Array(actual), message);","};","","","/**"," * Asserts that a given condition is true. If not, then a Y.Assert.Error object is thrown"," * and the test fails."," * @method assert"," * @param {Boolean} condition The condition to test."," * @param {String} message The message to display if the assertion fails."," * @for YUI"," * @static"," */","Y.assert = function(condition, message){"," Y.Assert._increment();"," if (!condition){"," throw new Y.Assert.Error(Y.Assert._formatMessage(message, \"Assertion failed.\"));"," }","};","","/**"," * Forces an assertion error to occur. Shortcut for Y.Assert.fail()."," * @method fail"," * @param {String} message (Optional) The message to display with the failure."," * @for YUI"," * @static"," */","Y.fail = Y.Assert.fail;","","Y.Test.Runner.once = Y.Test.Runner.subscribe;","","Y.Test.Runner.disableLogging = function() {"," Y.Test.Runner._log = false;","};","","Y.Test.Runner.enableLogging = function() {"," Y.Test.Runner._log = true;","};","","Y.Test.Runner._ignoreEmpty = true;","Y.Test.Runner._log = true;","","Y.Test.Runner.on = Y.Test.Runner.attach;","","//Only allow one instance of YUITest","if (!YUI.YUITest) {",""," if (Y.config.win) {"," Y.config.win.YUITest = YUITest;"," }",""," YUI.YUITest = Y.Test;","",""," //Only setup the listeners once."," var logEvent = function(event) {",""," //data variables"," var message = \"\";"," var messageType = \"\";",""," switch(event.type){"," case this.BEGIN_EVENT:"," message = \"Testing began at \" + (new Date()).toString() + \".\";"," messageType = \"info\";"," break;",""," case this.COMPLETE_EVENT:"," message = Y.Lang.sub(\"Testing completed at \" +"," (new Date()).toString() + \".\\n\" +"," \"Passed:{passed} Failed:{failed} \" +"," \"Total:{total} ({ignored} ignored)\","," event.results);"," messageType = \"info\";"," break;",""," case this.TEST_FAIL_EVENT:"," message = event.testName + \": failed.\\n\" + event.error.getMessage();"," messageType = \"fail\";"," break;",""," case this.TEST_IGNORE_EVENT:"," message = event.testName + \": ignored.\";"," messageType = \"ignore\";"," break;",""," case this.TEST_PASS_EVENT:"," message = event.testName + \": passed.\";"," messageType = \"pass\";"," break;",""," case this.TEST_SUITE_BEGIN_EVENT:"," message = \"Test suite \\\"\" + event.testSuite.name + \"\\\" started.\";"," messageType = \"info\";"," break;",""," case this.TEST_SUITE_COMPLETE_EVENT:"," message = Y.Lang.sub(\"Test suite \\\"\" +"," event.testSuite.name + \"\\\" completed\" + \".\\n\" +"," \"Passed:{passed} Failed:{failed} \" +"," \"Total:{total} ({ignored} ignored)\","," event.results);"," messageType = \"info\";"," break;",""," case this.TEST_CASE_BEGIN_EVENT:"," message = \"Test case \\\"\" + event.testCase.name + \"\\\" started.\";"," messageType = \"info\";"," break;",""," case this.TEST_CASE_COMPLETE_EVENT:"," message = Y.Lang.sub(\"Test case \\\"\" +"," event.testCase.name + \"\\\" completed.\\n\" +"," \"Passed:{passed} Failed:{failed} \" +"," \"Total:{total} ({ignored} ignored)\","," event.results);"," messageType = \"info\";"," break;"," default:"," message = \"Unexpected event \" + event.type;"," messageType = \"info\";"," }",""," if (Y.Test.Runner._log) {"," Y.log(message, messageType, \"TestRunner\");"," }"," };",""," var i, name;",""," for (i in Y.Test.Runner) {"," name = Y.Test.Runner[i];"," if (i.indexOf('_EVENT') > -1) {"," Y.Test.Runner.subscribe(name, logEvent);"," }"," };","","} //End if for YUI.YUITest","","","}, '@VERSION@', {\"requires\": [\"event-simulate\", \"event-custom\", \"json-stringify\"]});","","}());"]};
+ __coverage__['build/test/test.js'] = {"path":"build/test/test.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"210":0,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":0,"254":0,"255":0,"256":0,"257":0,"258":0,"259":0,"260":0,"261":0,"262":0,"263":0,"264":0,"265":0,"266":0,"267":0,"268":0,"269":0,"270":0,"271":0,"272":0,"273":0,"274":0,"275":0,"276":0,"277":0,"278":0,"279":0,"280":0,"281":0,"282":0,"283":0,"284":0,"285":0,"286":0,"287":0,"288":0,"289":0,"290":0,"291":0,"292":0,"293":0,"294":0,"295":0,"296":0,"297":0,"298":0,"299":0,"300":0,"301":0,"302":0,"303":0,"304":0,"305":0,"306":0,"307":0,"308":0,"309":0,"310":0,"311":0,"312":0,"313":0,"314":0,"315":0,"316":0,"317":0,"318":0,"319":0,"320":0,"321":0,"322":0,"323":0,"324":0,"325":0,"326":0,"327":0,"328":0,"329":0,"330":0,"331":0,"332":0,"333":0,"334":0,"335":0,"336":0,"337":0,"338":0,"339":0,"340":0,"341":0,"342":0,"343":0,"344":0,"345":0,"346":0,"347":0,"348":0,"349":0,"350":0,"351":0,"352":0,"353":0,"354":0,"355":0,"356":0,"357":0,"358":0,"359":0,"360":0,"361":0,"362":0,"363":0,"364":0,"365":0,"366":0,"367":0,"368":0,"369":0,"370":0,"371":0,"372":0,"373":0,"374":0,"375":0,"376":0,"377":0,"378":0,"379":0,"380":0,"381":0,"382":0,"383":0,"384":0,"385":0,"386":0,"387":0,"388":0,"389":0,"390":0,"391":0,"392":0,"393":0,"394":0,"395":0,"396":0,"397":0,"398":0,"399":0,"400":0,"401":0,"402":0,"403":0,"404":0,"405":0,"406":0,"407":0,"408":0,"409":0,"410":0,"411":0,"412":0,"413":0,"414":0,"415":0,"416":0,"417":0,"418":0,"419":0,"420":0,"421":0,"422":0,"423":0,"424":0,"425":0,"426":0,"427":0,"428":0,"429":0,"430":0,"431":0,"432":0,"433":0,"434":0,"435":0,"436":0,"437":0,"438":0,"439":0,"440":0,"441":0,"442":0,"443":0,"444":0,"445":0,"446":0,"447":0,"448":0,"449":0,"450":0,"451":0,"452":0,"453":0,"454":0,"455":0,"456":0,"457":0,"458":0,"459":0,"460":0,"461":0,"462":0,"463":0,"464":0,"465":0,"466":0,"467":0,"468":0,"469":0,"470":0,"471":0,"472":0,"473":0,"474":0,"475":0,"476":0,"477":0,"478":0,"479":0,"480":0,"481":0,"482":0,"483":0,"484":0,"485":0,"486":0,"487":0,"488":0,"489":0,"490":0,"491":0,"492":0,"493":0,"494":0,"495":0,"496":0,"497":0,"498":0,"499":0,"500":0,"501":0,"502":0,"503":0,"504":0,"505":0,"506":0,"507":0,"508":0,"509":0,"510":0,"511":0,"512":0,"513":0,"514":0,"515":0,"516":0,"517":0,"518":0,"519":0,"520":0,"521":0,"522":0,"523":0,"524":0,"525":0,"526":0,"527":0,"528":0,"529":0,"530":0,"531":0,"532":0,"533":0,"534":0,"535":0,"536":0,"537":0,"538":0,"539":0,"540":0,"541":0,"542":0,"543":0,"544":0,"545":0,"546":0,"547":0,"548":0,"549":0,"550":0,"551":0,"552":0,"553":0,"554":0,"555":0,"556":0,"557":0,"558":0,"559":0,"560":0,"561":0,"562":0,"563":0,"564":0,"565":0,"566":0,"567":0,"568":0,"569":0,"570":0,"571":0,"572":0,"573":0,"574":0,"575":0,"576":0,"577":0,"578":0,"579":0,"580":0,"581":0,"582":0,"583":0,"584":0,"585":0,"586":0,"587":0,"588":0,"589":0,"590":0,"591":0,"592":0,"593":0,"594":0,"595":0,"596":0,"597":0,"598":0,"599":0,"600":0,"601":0,"602":0,"603":0,"604":0,"605":0,"606":0,"607":0,"608":0,"609":0,"610":0,"611":0,"612":0,"613":0,"614":0,"615":0,"616":0,"617":0,"618":0,"619":0,"620":0,"621":0,"622":0,"623":0,"624":0,"625":0,"626":0,"627":0,"628":0,"629":0,"630":0,"631":0,"632":0,"633":0,"634":0,"635":0,"636":0,"637":0,"638":0,"639":0,"640":0,"641":0,"642":0,"643":0,"644":0,"645":0,"646":0,"647":0,"648":0,"649":0,"650":0,"651":0,"652":0,"653":0,"654":0,"655":0,"656":0,"657":0,"658":0,"659":0,"660":0,"661":0,"662":0,"663":0,"664":0,"665":0,"666":0,"667":0,"668":0,"669":0,"670":0,"671":0,"672":0,"673":0,"674":0,"675":0,"676":0,"677":0,"678":0,"679":0,"680":0,"681":0,"682":0,"683":0,"684":0,"685":0,"686":0,"687":0,"688":0,"689":0,"690":0,"691":0,"692":0,"693":0,"694":0,"695":0,"696":0,"697":0,"698":0,"699":0,"700":0,"701":0,"702":0,"703":0,"704":0,"705":0,"706":0,"707":0,"708":0,"709":0,"710":0,"711":0,"712":0,"713":0,"714":0,"715":0,"716":0,"717":0,"718":0,"719":0,"720":0,"721":0,"722":0,"723":0,"724":0,"725":0,"726":0,"727":0,"728":0,"729":0,"730":0,"731":0,"732":0,"733":0,"734":0,"735":0,"736":0,"737":0,"738":0,"739":0,"740":0,"741":0,"742":0,"743":0,"744":0,"745":0,"746":0,"747":0,"748":0,"749":0,"750":0,"751":0,"752":0,"753":0,"754":0,"755":0,"756":0,"757":0,"758":0,"759":0,"760":0,"761":0,"762":0,"763":0,"764":0,"765":0,"766":0,"767":0,"768":0,"769":0,"770":0,"771":0,"772":0,"773":0,"774":0,"775":0,"776":0,"777":0,"778":0,"779":0,"780":0,"781":0,"782":0,"783":0,"784":0,"785":0,"786":0,"787":0,"788":0,"789":0,"790":0,"791":0,"792":0,"793":0,"794":0,"795":0,"796":0,"797":0,"798":0,"799":0,"800":0,"801":0,"802":0,"803":0,"804":0,"805":0,"806":0,"807":0,"808":0,"809":0,"810":0,"811":0,"812":0,"813":0,"814":0,"815":0,"816":0,"817":0,"818":0,"819":0,"820":0,"821":0,"822":0,"823":0,"824":0,"825":0,"826":0,"827":0,"828":0,"829":0,"830":0,"831":0,"832":0,"833":0,"834":0,"835":0,"836":0,"837":0,"838":0,"839":0,"840":0,"841":0,"842":0,"843":0,"844":0,"845":0,"846":0,"847":0,"848":0,"849":0,"850":0,"851":0,"852":0,"853":0,"854":0,"855":0,"856":0,"857":0,"858":0,"859":0,"860":0,"861":0,"862":0,"863":0,"864":0,"865":0,"866":0,"867":0,"868":0,"869":0,"870":0,"871":0,"872":0,"873":0,"874":0,"875":0,"876":0,"877":0,"878":0,"879":0,"880":0,"881":0,"882":0,"883":0,"884":0,"885":0,"886":0,"887":0,"888":0,"889":0,"890":0,"891":0,"892":0,"893":0,"894":0,"895":0,"896":0,"897":0,"898":0,"899":0,"900":0,"901":0,"902":0,"903":0,"904":0,"905":0,"906":0,"907":0,"908":0,"909":0,"910":0,"911":0,"912":0,"913":0,"914":0,"915":0,"916":0,"917":0,"918":0,"919":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0,0,0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0,0],"33":[0,0,0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0,0],"39":[0,0],"40":[0,0],"41":[0,0,0],"42":[0,0],"43":[0,0],"44":[0,0,0],"45":[0,0,0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0,0],"51":[0,0],"52":[0,0],"53":[0,0,0],"54":[0,0],"55":[0,0],"56":[0,0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0],"61":[0,0],"62":[0,0],"63":[0,0],"64":[0,0],"65":[0,0],"66":[0,0],"67":[0,0],"68":[0,0],"69":[0,0],"70":[0,0],"71":[0,0,0],"72":[0,0],"73":[0,0],"74":[0,0],"75":[0,0],"76":[0,0],"77":[0,0],"78":[0,0],"79":[0,0],"80":[0,0],"81":[0,0],"82":[0,0],"83":[0,0],"84":[0,0,0],"85":[0,0],"86":[0,0],"87":[0,0],"88":[0,0],"89":[0,0],"90":[0,0],"91":[0,0],"92":[0,0],"93":[0,0],"94":[0,0],"95":[0,0],"96":[0,0],"97":[0,0],"98":[0,0],"99":[0,0],"100":[0,0],"101":[0,0],"102":[0,0],"103":[0,0],"104":[0,0],"105":[0,0],"106":[0,0],"107":[0,0],"108":[0,0],"109":[0,0],"110":[0,0],"111":[0,0],"112":[0,0],"113":[0,0],"114":[0,0],"115":[0,0],"116":[0,0],"117":[0,0],"118":[0,0],"119":[0,0],"120":[0,0],"121":[0,0],"122":[0,0],"123":[0,0],"124":[0,0],"125":[0,0],"126":[0,0],"127":[0,0],"128":[0,0,0],"129":[0,0],"130":[0,0],"131":[0,0],"132":[0,0],"133":[0,0],"134":[0,0],"135":[0,0],"136":[0,0],"137":[0,0],"138":[0,0],"139":[0,0],"140":[0,0],"141":[0,0],"142":[0,0],"143":[0,0],"144":[0,0],"145":[0,0,0],"146":[0,0],"147":[0,0],"148":[0,0],"149":[0,0],"150":[0,0],"151":[0,0],"152":[0,0],"153":[0,0],"154":[0,0],"155":[0,0],"156":[0,0],"157":[0,0],"158":[0,0],"159":[0,0],"160":[0,0],"161":[0,0],"162":[0,0],"163":[0,0],"164":[0,0],"165":[0,0],"166":[0,0],"167":[0,0],"168":[0,0],"169":[0,0],"170":[0,0],"171":[0,0],"172":[0,0],"173":[0,0],"174":[0,0],"175":[0,0],"176":[0,0],"177":[0,0],"178":[0,0],"179":[0,0],"180":[0,0],"181":[0,0],"182":[0,0],"183":[0,0],"184":[0,0],"185":[0,0],"186":[0,0],"187":[0,0],"188":[0,0],"189":[0,0],"190":[0,0],"191":[0,0],"192":[0,0],"193":[0,0],"194":[0,0],"195":[0,0],"196":[0,0],"197":[0,0],"198":[0,0],"199":[0,0,0],"200":[0,0],"201":[0,0],"202":[0,0],"203":[0,0],"204":[0,0],"205":[0,0],"206":[0,0],"207":[0,0],"208":[0,0],"209":[0,0],"210":[0,0],"211":[0,0],"212":[0,0],"213":[0,0],"214":[0,0],"215":[0,0],"216":[0,0],"217":[0,0],"218":[0,0],"219":[0,0],"220":[0,0],"221":[0,0],"222":[0,0],"223":[0,0],"224":[0,0],"225":[0,0],"226":[0,0],"227":[0,0],"228":[0,0],"229":[0,0],"230":[0,0],"231":[0,0],"232":[0,0],"233":[0,0],"234":[0,0],"235":[0,0],"236":[0,0],"237":[0,0],"238":[0,0],"239":[0,0],"240":[0,0],"241":[0,0],"242":[0,0],"243":[0,0],"244":[0,0],"245":[0,0],"246":[0,0],"247":[0,0],"248":[0,0],"249":[0,0],"250":[0,0],"251":[0,0],"252":[0,0],"253":[0,0],"254":[0,0],"255":[0,0],"256":[0,0],"257":[0,0],"258":[0,0],"259":[0,0],"260":[0,0],"261":[0,0,0,0,0,0,0,0,0,0],"262":[0,0],"263":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":35}}},"2":{"name":"(anonymous_2)","line":23,"loc":{"start":{"line":23,"column":14},"end":{"line":23,"column":28}}},"3":{"name":"(anonymous_3)","line":46,"loc":{"start":{"line":46,"column":22},"end":{"line":46,"column":32}}},"4":{"name":"(anonymous_4)","line":75,"loc":{"start":{"line":75,"column":12},"end":{"line":75,"column":36}}},"5":{"name":"(anonymous_5)","line":91,"loc":{"start":{"line":91,"column":15},"end":{"line":91,"column":39}}},"6":{"name":"(anonymous_6)","line":102,"loc":{"start":{"line":102,"column":10},"end":{"line":102,"column":25}}},"7":{"name":"(anonymous_7)","line":129,"loc":{"start":{"line":129,"column":12},"end":{"line":129,"column":36}}},"8":{"name":"(anonymous_8)","line":149,"loc":{"start":{"line":149,"column":17},"end":{"line":149,"column":41}}},"9":{"name":"(anonymous_9)","line":165,"loc":{"start":{"line":165,"column":20},"end":{"line":165,"column":36}}},"10":{"name":"(anonymous_10)","line":211,"loc":{"start":{"line":211,"column":10},"end":{"line":211,"column":32}}},"11":{"name":"(anonymous_11)","line":227,"loc":{"start":{"line":227,"column":12},"end":{"line":227,"column":24}}},"12":{"name":"(anonymous_12)","line":235,"loc":{"start":{"line":235,"column":14},"end":{"line":235,"column":26}}},"13":{"name":"(anonymous_13)","line":251,"loc":{"start":{"line":251,"column":19},"end":{"line":251,"column":39}}},"14":{"name":"(anonymous_14)","line":290,"loc":{"start":{"line":290,"column":32},"end":{"line":290,"column":44}}},"15":{"name":"(anonymous_15)","line":306,"loc":{"start":{"line":306,"column":14},"end":{"line":306,"column":24}}},"16":{"name":"(anonymous_16)","line":317,"loc":{"start":{"line":317,"column":13},"end":{"line":317,"column":32}}},"17":{"name":"(anonymous_17)","line":331,"loc":{"start":{"line":331,"column":11},"end":{"line":331,"column":36}}},"18":{"name":"(anonymous_18)","line":360,"loc":{"start":{"line":360,"column":13},"end":{"line":360,"column":63}}},"19":{"name":"(anonymous_19)","line":379,"loc":{"start":{"line":379,"column":18},"end":{"line":379,"column":30}}},"20":{"name":"(anonymous_20)","line":407,"loc":{"start":{"line":407,"column":13},"end":{"line":407,"column":42}}},"21":{"name":"(anonymous_21)","line":419,"loc":{"start":{"line":419,"column":10},"end":{"line":419,"column":29}}},"22":{"name":"(anonymous_22)","line":432,"loc":{"start":{"line":432,"column":10},"end":{"line":432,"column":20}}},"23":{"name":"(anonymous_23)","line":441,"loc":{"start":{"line":441,"column":13},"end":{"line":441,"column":23}}},"24":{"name":"(anonymous_24)","line":450,"loc":{"start":{"line":450,"column":12},"end":{"line":450,"column":24}}},"25":{"name":"(anonymous_25)","line":459,"loc":{"start":{"line":459,"column":14},"end":{"line":459,"column":26}}},"26":{"name":"(anonymous_26)","line":470,"loc":{"start":{"line":470,"column":21},"end":{"line":470,"column":31}}},"27":{"name":"xmlEscape","line":478,"loc":{"start":{"line":478,"column":4},"end":{"line":478,"column":28}}},"28":{"name":"(anonymous_28)","line":480,"loc":{"start":{"line":480,"column":40},"end":{"line":480,"column":55}}},"29":{"name":"(anonymous_29)","line":502,"loc":{"start":{"line":502,"column":14},"end":{"line":502,"column":32}}},"30":{"name":"(anonymous_30)","line":513,"loc":{"start":{"line":513,"column":13},"end":{"line":513,"column":31}}},"31":{"name":"serializeToXML","line":515,"loc":{"start":{"line":515,"column":12},"end":{"line":515,"column":44}}},"32":{"name":"(anonymous_32)","line":552,"loc":{"start":{"line":552,"column":18},"end":{"line":552,"column":36}}},"33":{"name":"serializeToJUnitXML","line":554,"loc":{"start":{"line":554,"column":12},"end":{"line":554,"column":49}}},"34":{"name":"(anonymous_34)","line":629,"loc":{"start":{"line":629,"column":13},"end":{"line":629,"column":31}}},"35":{"name":"serializeToTAP","line":633,"loc":{"start":{"line":633,"column":12},"end":{"line":633,"column":44}}},"36":{"name":"(anonymous_36)","line":718,"loc":{"start":{"line":718,"column":23},"end":{"line":718,"column":45}}},"37":{"name":"(anonymous_37)","line":771,"loc":{"start":{"line":771,"column":19},"end":{"line":771,"column":41}}},"38":{"name":"(anonymous_38)","line":780,"loc":{"start":{"line":780,"column":22},"end":{"line":780,"column":32}}},"39":{"name":"(anonymous_39)","line":790,"loc":{"start":{"line":790,"column":18},"end":{"line":790,"column":29}}},"40":{"name":"(anonymous_40)","line":808,"loc":{"start":{"line":808,"column":17},"end":{"line":808,"column":34}}},"41":{"name":"(anonymous_41)","line":882,"loc":{"start":{"line":882,"column":25},"end":{"line":882,"column":35}}},"42":{"name":"inGroups","line":891,"loc":{"start":{"line":891,"column":8},"end":{"line":891,"column":45}}},"43":{"name":"TestNode","line":915,"loc":{"start":{"line":915,"column":8},"end":{"line":915,"column":37}}},"44":{"name":"(anonymous_44)","line":979,"loc":{"start":{"line":979,"column":26},"end":{"line":979,"column":47}}},"45":{"name":"TestRunner","line":1000,"loc":{"start":{"line":1000,"column":8},"end":{"line":1000,"column":29}}},"46":{"name":"(anonymous_46)","line":1196,"loc":{"start":{"line":1196,"column":36},"end":{"line":1196,"column":67}}},"47":{"name":"(anonymous_47)","line":1221,"loc":{"start":{"line":1221,"column":38},"end":{"line":1221,"column":71}}},"48":{"name":"(anonymous_48)","line":1245,"loc":{"start":{"line":1245,"column":29},"end":{"line":1245,"column":41}}},"49":{"name":"(anonymous_49)","line":1273,"loc":{"start":{"line":1273,"column":40},"end":{"line":1273,"column":56}}},"50":{"name":"(anonymous_50)","line":1307,"loc":{"start":{"line":1307,"column":20},"end":{"line":1307,"column":32}}},"51":{"name":"(anonymous_51)","line":1350,"loc":{"start":{"line":1350,"column":32},"end":{"line":1350,"column":70}}},"52":{"name":"(anonymous_52)","line":1384,"loc":{"start":{"line":1384,"column":19},"end":{"line":1384,"column":31}}},"53":{"name":"(anonymous_53)","line":1431,"loc":{"start":{"line":1431,"column":39},"end":{"line":1431,"column":49}}},"54":{"name":"(anonymous_54)","line":1444,"loc":{"start":{"line":1444,"column":26},"end":{"line":1444,"column":45}}},"55":{"name":"(anonymous_55)","line":1518,"loc":{"start":{"line":1518,"column":69},"end":{"line":1518,"column":79}}},"56":{"name":"(anonymous_56)","line":1602,"loc":{"start":{"line":1602,"column":31},"end":{"line":1602,"column":41}}},"57":{"name":"(anonymous_57)","line":1624,"loc":{"start":{"line":1624,"column":26},"end":{"line":1624,"column":41}}},"58":{"name":"(anonymous_58)","line":1627,"loc":{"start":{"line":1627,"column":37},"end":{"line":1627,"column":47}}},"59":{"name":"(anonymous_59)","line":1644,"loc":{"start":{"line":1644,"column":23},"end":{"line":1644,"column":39}}},"60":{"name":"(anonymous_60)","line":1674,"loc":{"start":{"line":1674,"column":35},"end":{"line":1674,"column":45}}},"61":{"name":"(anonymous_61)","line":1704,"loc":{"start":{"line":1704,"column":21},"end":{"line":1704,"column":31}}},"62":{"name":"(anonymous_62)","line":1715,"loc":{"start":{"line":1715,"column":21},"end":{"line":1715,"column":35}}},"63":{"name":"(anonymous_63)","line":1730,"loc":{"start":{"line":1730,"column":18},"end":{"line":1730,"column":40}}},"64":{"name":"(anonymous_64)","line":1741,"loc":{"start":{"line":1741,"column":20},"end":{"line":1741,"column":32}}},"65":{"name":"(anonymous_65)","line":1751,"loc":{"start":{"line":1751,"column":23},"end":{"line":1751,"column":34}}},"66":{"name":"(anonymous_66)","line":1761,"loc":{"start":{"line":1761,"column":23},"end":{"line":1761,"column":33}}},"67":{"name":"(anonymous_67)","line":1774,"loc":{"start":{"line":1774,"column":24},"end":{"line":1774,"column":40}}},"68":{"name":"(anonymous_68)","line":1796,"loc":{"start":{"line":1796,"column":25},"end":{"line":1796,"column":42}}},"69":{"name":"(anonymous_69)","line":1826,"loc":{"start":{"line":1826,"column":22},"end":{"line":1826,"column":32}}},"70":{"name":"(anonymous_70)","line":1831,"loc":{"start":{"line":1831,"column":23},"end":{"line":1831,"column":33}}},"71":{"name":"(anonymous_71)","line":1847,"loc":{"start":{"line":1847,"column":21},"end":{"line":1847,"column":40}}},"72":{"name":"(anonymous_72)","line":1849,"loc":{"start":{"line":1849,"column":48},"end":{"line":1849,"column":58}}},"73":{"name":"(anonymous_73)","line":1865,"loc":{"start":{"line":1865,"column":18},"end":{"line":1865,"column":37}}},"74":{"name":"(anonymous_74)","line":1923,"loc":{"start":{"line":1923,"column":14},"end":{"line":1923,"column":40}}},"75":{"name":"(anonymous_75)","line":1946,"loc":{"start":{"line":1946,"column":11},"end":{"line":1946,"column":38}}},"76":{"name":"(anonymous_76)","line":1968,"loc":{"start":{"line":1968,"column":15},"end":{"line":1969,"column":36}}},"77":{"name":"(anonymous_77)","line":1988,"loc":{"start":{"line":1988,"column":20},"end":{"line":1989,"column":36}}},"78":{"name":"(anonymous_78)","line":2009,"loc":{"start":{"line":2009,"column":20},"end":{"line":2010,"column":36}}},"79":{"name":"(anonymous_79)","line":2033,"loc":{"start":{"line":2033,"column":21},"end":{"line":2034,"column":36}}},"80":{"name":"(anonymous_80)","line":2053,"loc":{"start":{"line":2053,"column":26},"end":{"line":2054,"column":36}}},"81":{"name":"(anonymous_81)","line":2075,"loc":{"start":{"line":2075,"column":26},"end":{"line":2076,"column":36}}},"82":{"name":"(anonymous_82)","line":2100,"loc":{"start":{"line":2100,"column":14},"end":{"line":2100,"column":58}}},"83":{"name":"(anonymous_83)","line":2129,"loc":{"start":{"line":2129,"column":20},"end":{"line":2130,"column":36}}},"84":{"name":"(anonymous_84)","line":2166,"loc":{"start":{"line":2166,"column":25},"end":{"line":2167,"column":48}}},"85":{"name":"(anonymous_85)","line":2196,"loc":{"start":{"line":2196,"column":14},"end":{"line":2196,"column":41}}},"86":{"name":"(anonymous_86)","line":2210,"loc":{"start":{"line":2210,"column":17},"end":{"line":2210,"column":44}}},"87":{"name":"(anonymous_87)","line":2228,"loc":{"start":{"line":2228,"column":19},"end":{"line":2229,"column":35}}},"88":{"name":"(anonymous_88)","line":2257,"loc":{"start":{"line":2257,"column":18},"end":{"line":2257,"column":62}}},"89":{"name":"(anonymous_89)","line":2282,"loc":{"start":{"line":2282,"column":14},"end":{"line":2282,"column":52}}},"90":{"name":"(anonymous_90)","line":2335,"loc":{"start":{"line":2335,"column":21},"end":{"line":2335,"column":62}}},"91":{"name":"(anonymous_91)","line":2349,"loc":{"start":{"line":2349,"column":15},"end":{"line":2349,"column":25}}},"92":{"name":"(anonymous_92)","line":2359,"loc":{"start":{"line":2359,"column":16},"end":{"line":2359,"column":26}}},"93":{"name":"(anonymous_93)","line":2369,"loc":{"start":{"line":2369,"column":12},"end":{"line":2369,"column":22}}},"94":{"name":"(anonymous_94)","line":2383,"loc":{"start":{"line":2383,"column":11},"end":{"line":2383,"column":30}}},"95":{"name":"(anonymous_95)","line":2392,"loc":{"start":{"line":2392,"column":11},"end":{"line":2392,"column":30}}},"96":{"name":"(anonymous_96)","line":2409,"loc":{"start":{"line":2409,"column":15},"end":{"line":2409,"column":52}}},"97":{"name":"(anonymous_97)","line":2425,"loc":{"start":{"line":2425,"column":18},"end":{"line":2426,"column":34}}},"98":{"name":"(anonymous_98)","line":2442,"loc":{"start":{"line":2442,"column":17},"end":{"line":2442,"column":56}}},"99":{"name":"(anonymous_99)","line":2458,"loc":{"start":{"line":2458,"column":14},"end":{"line":2458,"column":51}}},"100":{"name":"(anonymous_100)","line":2477,"loc":{"start":{"line":2477,"column":14},"end":{"line":2477,"column":41}}},"101":{"name":"(anonymous_101)","line":2492,"loc":{"start":{"line":2492,"column":13},"end":{"line":2492,"column":40}}},"102":{"name":"(anonymous_102)","line":2511,"loc":{"start":{"line":2511,"column":12},"end":{"line":2511,"column":38}}},"103":{"name":"(anonymous_103)","line":2525,"loc":{"start":{"line":2525,"column":15},"end":{"line":2525,"column":41}}},"104":{"name":"(anonymous_104)","line":2540,"loc":{"start":{"line":2540,"column":16},"end":{"line":2540,"column":43}}},"105":{"name":"(anonymous_105)","line":2555,"loc":{"start":{"line":2555,"column":21},"end":{"line":2555,"column":48}}},"106":{"name":"(anonymous_106)","line":2570,"loc":{"start":{"line":2570,"column":13},"end":{"line":2570,"column":40}}},"107":{"name":"(anonymous_107)","line":2585,"loc":{"start":{"line":2585,"column":18},"end":{"line":2585,"column":45}}},"108":{"name":"(anonymous_108)","line":2603,"loc":{"start":{"line":2603,"column":14},"end":{"line":2603,"column":41}}},"109":{"name":"(anonymous_109)","line":2623,"loc":{"start":{"line":2623,"column":16},"end":{"line":2623,"column":43}}},"110":{"name":"(anonymous_110)","line":2637,"loc":{"start":{"line":2637,"column":17},"end":{"line":2637,"column":44}}},"111":{"name":"(anonymous_111)","line":2654,"loc":{"start":{"line":2654,"column":19},"end":{"line":2654,"column":56}}},"112":{"name":"(anonymous_112)","line":2668,"loc":{"start":{"line":2668,"column":15},"end":{"line":2668,"column":42}}},"113":{"name":"(anonymous_113)","line":2682,"loc":{"start":{"line":2682,"column":15},"end":{"line":2682,"column":42}}},"114":{"name":"(anonymous_114)","line":2696,"loc":{"start":{"line":2696,"column":15},"end":{"line":2696,"column":42}}},"115":{"name":"(anonymous_115)","line":2711,"loc":{"start":{"line":2711,"column":15},"end":{"line":2711,"column":60}}},"116":{"name":"(anonymous_116)","line":2737,"loc":{"start":{"line":2737,"column":17},"end":{"line":2737,"column":57}}},"117":{"name":"(anonymous_117)","line":2794,"loc":{"start":{"line":2794,"column":25},"end":{"line":2794,"column":43}}},"118":{"name":"(anonymous_118)","line":2822,"loc":{"start":{"line":2822,"column":17},"end":{"line":2822,"column":29}}},"119":{"name":"(anonymous_119)","line":2831,"loc":{"start":{"line":2831,"column":15},"end":{"line":2831,"column":27}}},"120":{"name":"(anonymous_120)","line":2850,"loc":{"start":{"line":2850,"column":28},"end":{"line":2850,"column":64}}},"121":{"name":"(anonymous_121)","line":2890,"loc":{"start":{"line":2890,"column":49},"end":{"line":2890,"column":59}}},"122":{"name":"(anonymous_122)","line":2911,"loc":{"start":{"line":2911,"column":10},"end":{"line":2911,"column":28}}},"123":{"name":"(anonymous_123)","line":2925,"loc":{"start":{"line":2925,"column":16},"end":{"line":2925,"column":34}}},"124":{"name":"(anonymous_124)","line":2959,"loc":{"start":{"line":2959,"column":20},"end":{"line":2959,"column":56}}},"125":{"name":"(anonymous_125)","line":2995,"loc":{"start":{"line":2995,"column":20},"end":{"line":2995,"column":56}}},"126":{"name":"(anonymous_126)","line":3033,"loc":{"start":{"line":3033,"column":15},"end":{"line":3033,"column":33}}},"127":{"name":"f","line":3044,"loc":{"start":{"line":3044,"column":8},"end":{"line":3044,"column":20}}},"128":{"name":"(anonymous_128)","line":3055,"loc":{"start":{"line":3055,"column":29},"end":{"line":3055,"column":43}}},"129":{"name":"(anonymous_129)","line":3056,"loc":{"start":{"line":3056,"column":27},"end":{"line":3056,"column":37}}},"130":{"name":"(anonymous_130)","line":3088,"loc":{"start":{"line":3088,"column":22},"end":{"line":3088,"column":73}}},"131":{"name":"(anonymous_131)","line":3102,"loc":{"start":{"line":3102,"column":37},"end":{"line":3102,"column":47}}},"132":{"name":"(anonymous_132)","line":3120,"loc":{"start":{"line":3120,"column":25},"end":{"line":3120,"column":35}}},"133":{"name":"(anonymous_133)","line":3145,"loc":{"start":{"line":3145,"column":25},"end":{"line":3145,"column":35}}},"134":{"name":"(anonymous_134)","line":3168,"loc":{"start":{"line":3168,"column":22},"end":{"line":3168,"column":36}}},"135":{"name":"(anonymous_135)","line":3198,"loc":{"start":{"line":3198,"column":21},"end":{"line":3198,"column":60}}},"136":{"name":"(anonymous_136)","line":3200,"loc":{"start":{"line":3200,"column":22},"end":{"line":3200,"column":37}}},"137":{"name":"(anonymous_137)","line":3217,"loc":{"start":{"line":3217,"column":51},"end":{"line":3217,"column":61}}},"138":{"name":"(anonymous_138)","line":3279,"loc":{"start":{"line":3279,"column":14},"end":{"line":3279,"column":50}}},"139":{"name":"(anonymous_139)","line":3309,"loc":{"start":{"line":3309,"column":12},"end":{"line":3309,"column":53}}},"140":{"name":"(anonymous_140)","line":3322,"loc":{"start":{"line":3322,"column":13},"end":{"line":3322,"column":52}}},"141":{"name":"(anonymous_141)","line":3334,"loc":{"start":{"line":3334,"column":17},"end":{"line":3334,"column":58}}},"142":{"name":"(anonymous_142)","line":3349,"loc":{"start":{"line":3349,"column":18},"end":{"line":3349,"column":57}}},"143":{"name":"(anonymous_143)","line":3366,"loc":{"start":{"line":3366,"column":13},"end":{"line":3366,"column":54}}},"144":{"name":"(anonymous_144)","line":3381,"loc":{"start":{"line":3381,"column":14},"end":{"line":3381,"column":53}}},"145":{"name":"(anonymous_145)","line":3397,"loc":{"start":{"line":3397,"column":17},"end":{"line":3397,"column":44}}},"146":{"name":"(anonymous_146)","line":3415,"loc":{"start":{"line":3415,"column":23},"end":{"line":3415,"column":64}}},"147":{"name":"(anonymous_147)","line":3430,"loc":{"start":{"line":3430,"column":24},"end":{"line":3430,"column":63}}},"148":{"name":"(anonymous_148)","line":3449,"loc":{"start":{"line":3449,"column":18},"end":{"line":3449,"column":32}}},"149":{"name":"(anonymous_149)","line":3507,"loc":{"start":{"line":3507,"column":36},"end":{"line":3507,"column":53}}},"150":{"name":"(anonymous_150)","line":3525,"loc":{"start":{"line":3525,"column":22},"end":{"line":3525,"column":40}}},"151":{"name":"(anonymous_151)","line":3555,"loc":{"start":{"line":3555,"column":21},"end":{"line":3555,"column":39}}},"152":{"name":"(anonymous_152)","line":3587,"loc":{"start":{"line":3587,"column":26},"end":{"line":3587,"column":42}}},"153":{"name":"(anonymous_153)","line":3634,"loc":{"start":{"line":3634,"column":26},"end":{"line":3634,"column":56}}},"154":{"name":"(anonymous_154)","line":3667,"loc":{"start":{"line":3667,"column":47},"end":{"line":3667,"column":57}}},"155":{"name":"(anonymous_155)","line":3682,"loc":{"start":{"line":3682,"column":15},"end":{"line":3682,"column":41}}},"156":{"name":"(anonymous_156)","line":3702,"loc":{"start":{"line":3702,"column":23},"end":{"line":3702,"column":44}}},"157":{"name":"(anonymous_157)","line":3721,"loc":{"start":{"line":3721,"column":35},"end":{"line":3721,"column":71}}},"158":{"name":"(anonymous_158)","line":3735,"loc":{"start":{"line":3735,"column":11},"end":{"line":3735,"column":39}}},"159":{"name":"(anonymous_159)","line":3753,"loc":{"start":{"line":3753,"column":31},"end":{"line":3753,"column":42}}},"160":{"name":"(anonymous_160)","line":3757,"loc":{"start":{"line":3757,"column":30},"end":{"line":3757,"column":41}}},"161":{"name":"(anonymous_161)","line":3777,"loc":{"start":{"line":3777,"column":19},"end":{"line":3777,"column":35}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":3862,"column":84}},"2":{"start":{"line":16,"column":0},"end":{"line":3707,"column":1}},"3":{"start":{"line":17,"column":4},"end":{"line":17,"column":25}},"4":{"start":{"line":21,"column":4},"end":{"line":26,"column":6}},"5":{"start":{"line":24,"column":12},"end":{"line":24,"column":31}},"6":{"start":{"line":28,"column":0},"end":{"line":28,"column":20}},"7":{"start":{"line":32,"column":0},"end":{"line":32,"column":26}},"8":{"start":{"line":33,"column":0},"end":{"line":33,"column":24}},"9":{"start":{"line":34,"column":0},"end":{"line":37,"column":2}},"10":{"start":{"line":46,"column":0},"end":{"line":57,"column":2}},"11":{"start":{"line":55,"column":4},"end":{"line":55,"column":24}},"12":{"start":{"line":59,"column":0},"end":{"line":153,"column":2}},"13":{"start":{"line":76,"column":8},"end":{"line":78,"column":9}},"14":{"start":{"line":77,"column":12},"end":{"line":77,"column":38}},"15":{"start":{"line":80,"column":8},"end":{"line":80,"column":44}},"16":{"start":{"line":92,"column":8},"end":{"line":92,"column":43}},"17":{"start":{"line":103,"column":8},"end":{"line":105,"column":9}},"18":{"start":{"line":104,"column":12},"end":{"line":104,"column":36}},"19":{"start":{"line":106,"column":8},"end":{"line":108,"column":9}},"20":{"start":{"line":107,"column":12},"end":{"line":107,"column":32}},"21":{"start":{"line":110,"column":8},"end":{"line":112,"column":9}},"22":{"start":{"line":111,"column":12},"end":{"line":111,"column":69}},"23":{"start":{"line":114,"column":8},"end":{"line":119,"column":9}},"24":{"start":{"line":115,"column":12},"end":{"line":115,"column":54}},"25":{"start":{"line":116,"column":12},"end":{"line":118,"column":13}},"26":{"start":{"line":117,"column":16},"end":{"line":117,"column":46}},"27":{"start":{"line":130,"column":8},"end":{"line":138,"column":9}},"28":{"start":{"line":131,"column":12},"end":{"line":131,"column":48}},"29":{"start":{"line":132,"column":12},"end":{"line":137,"column":13}},"30":{"start":{"line":133,"column":16},"end":{"line":136,"column":17}},"31":{"start":{"line":134,"column":20},"end":{"line":134,"column":42}},"32":{"start":{"line":135,"column":20},"end":{"line":135,"column":26}},"33":{"start":{"line":150,"column":8},"end":{"line":150,"column":43}},"34":{"start":{"line":165,"column":0},"end":{"line":198,"column":2}},"35":{"start":{"line":172,"column":4},"end":{"line":172,"column":19}},"36":{"start":{"line":180,"column":4},"end":{"line":180,"column":20}},"37":{"start":{"line":183,"column":4},"end":{"line":191,"column":5}},"38":{"start":{"line":184,"column":8},"end":{"line":184,"column":25}},"39":{"start":{"line":185,"column":11},"end":{"line":191,"column":5}},"40":{"start":{"line":186,"column":8},"end":{"line":190,"column":9}},"41":{"start":{"line":187,"column":12},"end":{"line":189,"column":13}},"42":{"start":{"line":188,"column":16},"end":{"line":188,"column":40}},"43":{"start":{"line":194,"column":4},"end":{"line":196,"column":5}},"44":{"start":{"line":195,"column":8},"end":{"line":195,"column":47}},"45":{"start":{"line":200,"column":0},"end":{"line":238,"column":2}},"46":{"start":{"line":212,"column":8},"end":{"line":214,"column":9}},"47":{"start":{"line":213,"column":12},"end":{"line":213,"column":40}},"48":{"start":{"line":215,"column":8},"end":{"line":215,"column":20}},"49":{"start":{"line":251,"column":0},"end":{"line":270,"column":2}},"50":{"start":{"line":258,"column":4},"end":{"line":258,"column":22}},"51":{"start":{"line":261,"column":4},"end":{"line":263,"column":5}},"52":{"start":{"line":262,"column":8},"end":{"line":262,"column":36}},"53":{"start":{"line":266,"column":4},"end":{"line":268,"column":5}},"54":{"start":{"line":267,"column":8},"end":{"line":267,"column":46}},"55":{"start":{"line":280,"column":0},"end":{"line":280,"column":38}},"56":{"start":{"line":290,"column":0},"end":{"line":292,"column":2}},"57":{"start":{"line":291,"column":5},"end":{"line":291,"column":78}},"58":{"start":{"line":294,"column":0},"end":{"line":462,"column":2}},"59":{"start":{"line":307,"column":8},"end":{"line":307,"column":79}},"60":{"start":{"line":318,"column":8},"end":{"line":318,"column":43}},"61":{"start":{"line":332,"column":8},"end":{"line":334,"column":46}},"62":{"start":{"line":336,"column":8},"end":{"line":338,"column":9}},"63":{"start":{"line":337,"column":12},"end":{"line":337,"column":52}},"64":{"start":{"line":340,"column":8},"end":{"line":340,"column":47}},"65":{"start":{"line":361,"column":8},"end":{"line":362,"column":20}},"66":{"start":{"line":364,"column":8},"end":{"line":367,"column":9}},"67":{"start":{"line":366,"column":12},"end":{"line":366,"column":67}},"68":{"start":{"line":369,"column":8},"end":{"line":371,"column":9}},"69":{"start":{"line":370,"column":12},"end":{"line":370,"column":52}},"70":{"start":{"line":373,"column":8},"end":{"line":373,"column":42}},"71":{"start":{"line":375,"column":8},"end":{"line":377,"column":9}},"72":{"start":{"line":376,"column":12},"end":{"line":376,"column":28}},"73":{"start":{"line":379,"column":8},"end":{"line":393,"column":22}},"74":{"start":{"line":380,"column":12},"end":{"line":380,"column":20}},"75":{"start":{"line":382,"column":12},"end":{"line":392,"column":13}},"76":{"start":{"line":383,"column":16},"end":{"line":383,"column":35}},"77":{"start":{"line":385,"column":16},"end":{"line":385,"column":36}},"78":{"start":{"line":387,"column":16},"end":{"line":391,"column":17}},"79":{"start":{"line":388,"column":20},"end":{"line":388,"column":52}},"80":{"start":{"line":390,"column":20},"end":{"line":390,"column":79}},"81":{"start":{"line":408,"column":8},"end":{"line":408,"column":36}},"82":{"start":{"line":409,"column":8},"end":{"line":411,"column":9}},"83":{"start":{"line":410,"column":12},"end":{"line":410,"column":106}},"84":{"start":{"line":420,"column":8},"end":{"line":420,"column":37}},"85":{"start":{"line":470,"column":0},"end":{"line":706,"column":4}},"86":{"start":{"line":478,"column":4},"end":{"line":490,"column":5}},"87":{"start":{"line":480,"column":8},"end":{"line":488,"column":11}},"88":{"start":{"line":481,"column":12},"end":{"line":487,"column":13}},"89":{"start":{"line":482,"column":28},"end":{"line":482,"column":42}},"90":{"start":{"line":483,"column":28},"end":{"line":483,"column":42}},"91":{"start":{"line":484,"column":28},"end":{"line":484,"column":44}},"92":{"start":{"line":485,"column":28},"end":{"line":485,"column":44}},"93":{"start":{"line":486,"column":28},"end":{"line":486,"column":43}},"94":{"start":{"line":493,"column":4},"end":{"line":705,"column":6}},"95":{"start":{"line":503,"column":12},"end":{"line":503,"column":56}},"96":{"start":{"line":515,"column":12},"end":{"line":538,"column":13}},"97":{"start":{"line":516,"column":16},"end":{"line":516,"column":91}},"98":{"start":{"line":518,"column":16},"end":{"line":520,"column":17}},"99":{"start":{"line":519,"column":20},"end":{"line":519,"column":68}},"100":{"start":{"line":522,"column":16},"end":{"line":533,"column":17}},"101":{"start":{"line":523,"column":20},"end":{"line":523,"column":112}},"102":{"start":{"line":525,"column":20},"end":{"line":525,"column":167}},"103":{"start":{"line":526,"column":20},"end":{"line":532,"column":21}},"104":{"start":{"line":527,"column":24},"end":{"line":531,"column":25}},"105":{"start":{"line":528,"column":28},"end":{"line":530,"column":29}},"106":{"start":{"line":529,"column":32},"end":{"line":529,"column":69}},"107":{"start":{"line":535,"column":16},"end":{"line":535,"column":49}},"108":{"start":{"line":537,"column":16},"end":{"line":537,"column":27}},"109":{"start":{"line":540,"column":12},"end":{"line":540,"column":90}},"110":{"start":{"line":554,"column":12},"end":{"line":616,"column":13}},"111":{"start":{"line":555,"column":16},"end":{"line":555,"column":29}},"112":{"start":{"line":557,"column":16},"end":{"line":612,"column":17}},"113":{"start":{"line":560,"column":24},"end":{"line":566,"column":25}},"114":{"start":{"line":561,"column":28},"end":{"line":561,"column":129}},"115":{"start":{"line":562,"column":28},"end":{"line":564,"column":29}},"116":{"start":{"line":563,"column":32},"end":{"line":563,"column":143}},"117":{"start":{"line":565,"column":28},"end":{"line":565,"column":48}},"118":{"start":{"line":567,"column":24},"end":{"line":567,"column":30}},"119":{"start":{"line":572,"column":24},"end":{"line":572,"column":194}},"120":{"start":{"line":574,"column":24},"end":{"line":580,"column":25}},"121":{"start":{"line":575,"column":28},"end":{"line":579,"column":29}},"122":{"start":{"line":576,"column":32},"end":{"line":578,"column":33}},"123":{"start":{"line":577,"column":36},"end":{"line":577,"column":78}},"124":{"start":{"line":582,"column":24},"end":{"line":582,"column":46}},"125":{"start":{"line":583,"column":24},"end":{"line":583,"column":30}},"126":{"start":{"line":587,"column":24},"end":{"line":593,"column":25}},"127":{"start":{"line":588,"column":28},"end":{"line":592,"column":29}},"128":{"start":{"line":589,"column":32},"end":{"line":591,"column":33}},"129":{"start":{"line":590,"column":36},"end":{"line":590,"column":78}},"130":{"start":{"line":594,"column":24},"end":{"line":594,"column":30}},"131":{"start":{"line":599,"column":24},"end":{"line":599,"column":45}},"132":{"start":{"line":601,"column":24},"end":{"line":607,"column":25}},"133":{"start":{"line":602,"column":28},"end":{"line":606,"column":29}},"134":{"start":{"line":603,"column":32},"end":{"line":605,"column":33}},"135":{"start":{"line":604,"column":36},"end":{"line":604,"column":78}},"136":{"start":{"line":609,"column":24},"end":{"line":609,"column":47}},"137":{"start":{"line":614,"column":16},"end":{"line":614,"column":27}},"138":{"start":{"line":618,"column":12},"end":{"line":618,"column":95}},"139":{"start":{"line":631,"column":12},"end":{"line":631,"column":35}},"140":{"start":{"line":633,"column":12},"end":{"line":700,"column":13}},"141":{"start":{"line":634,"column":16},"end":{"line":634,"column":30}},"142":{"start":{"line":636,"column":16},"end":{"line":696,"column":17}},"143":{"start":{"line":639,"column":24},"end":{"line":650,"column":25}},"144":{"start":{"line":641,"column":28},"end":{"line":641,"column":85}},"145":{"start":{"line":643,"column":28},"end":{"line":645,"column":29}},"146":{"start":{"line":644,"column":32},"end":{"line":644,"column":79}},"147":{"start":{"line":647,"column":28},"end":{"line":647,"column":41}},"148":{"start":{"line":649,"column":28},"end":{"line":649,"column":74}},"149":{"start":{"line":651,"column":24},"end":{"line":651,"column":30}},"150":{"start":{"line":655,"column":24},"end":{"line":655,"column":128}},"151":{"start":{"line":657,"column":24},"end":{"line":663,"column":25}},"152":{"start":{"line":658,"column":28},"end":{"line":662,"column":29}},"153":{"start":{"line":659,"column":32},"end":{"line":661,"column":33}},"154":{"start":{"line":660,"column":36},"end":{"line":660,"column":74}},"155":{"start":{"line":665,"column":24},"end":{"line":665,"column":71}},"156":{"start":{"line":668,"column":24},"end":{"line":668,"column":30}},"157":{"start":{"line":672,"column":24},"end":{"line":672,"column":129}},"158":{"start":{"line":674,"column":24},"end":{"line":680,"column":25}},"159":{"start":{"line":675,"column":28},"end":{"line":679,"column":29}},"160":{"start":{"line":676,"column":32},"end":{"line":678,"column":33}},"161":{"start":{"line":677,"column":36},"end":{"line":677,"column":74}},"162":{"start":{"line":682,"column":24},"end":{"line":682,"column":72}},"163":{"start":{"line":683,"column":24},"end":{"line":683,"column":30}},"164":{"start":{"line":687,"column":24},"end":{"line":693,"column":25}},"165":{"start":{"line":688,"column":28},"end":{"line":692,"column":29}},"166":{"start":{"line":689,"column":32},"end":{"line":691,"column":33}},"167":{"start":{"line":690,"column":36},"end":{"line":690,"column":74}},"168":{"start":{"line":698,"column":16},"end":{"line":698,"column":28}},"169":{"start":{"line":702,"column":12},"end":{"line":702,"column":74}},"170":{"start":{"line":718,"column":4},"end":{"line":757,"column":6}},"171":{"start":{"line":725,"column":8},"end":{"line":725,"column":23}},"172":{"start":{"line":732,"column":8},"end":{"line":732,"column":55}},"173":{"start":{"line":740,"column":8},"end":{"line":740,"column":36}},"174":{"start":{"line":748,"column":8},"end":{"line":748,"column":26}},"175":{"start":{"line":756,"column":8},"end":{"line":756,"column":28}},"176":{"start":{"line":759,"column":4},"end":{"line":872,"column":6}},"177":{"start":{"line":772,"column":12},"end":{"line":772,"column":39}},"178":{"start":{"line":781,"column":12},"end":{"line":781,"column":40}},"179":{"start":{"line":791,"column":12},"end":{"line":794,"column":13}},"180":{"start":{"line":792,"column":16},"end":{"line":792,"column":62}},"181":{"start":{"line":793,"column":16},"end":{"line":793,"column":34}},"182":{"start":{"line":795,"column":12},"end":{"line":798,"column":13}},"183":{"start":{"line":796,"column":16},"end":{"line":796,"column":66}},"184":{"start":{"line":797,"column":16},"end":{"line":797,"column":36}},"185":{"start":{"line":799,"column":12},"end":{"line":799,"column":32}},"186":{"start":{"line":811,"column":12},"end":{"line":834,"column":13}},"187":{"start":{"line":812,"column":16},"end":{"line":812,"column":60}},"188":{"start":{"line":813,"column":16},"end":{"line":813,"column":43}},"189":{"start":{"line":814,"column":16},"end":{"line":814,"column":55}},"190":{"start":{"line":815,"column":16},"end":{"line":815,"column":55}},"191":{"start":{"line":816,"column":16},"end":{"line":816,"column":41}},"192":{"start":{"line":817,"column":16},"end":{"line":817,"column":54}},"193":{"start":{"line":820,"column":16},"end":{"line":825,"column":17}},"194":{"start":{"line":821,"column":20},"end":{"line":821,"column":95}},"195":{"start":{"line":823,"column":20},"end":{"line":823,"column":68}},"196":{"start":{"line":824,"column":20},"end":{"line":824,"column":56}},"197":{"start":{"line":827,"column":16},"end":{"line":827,"column":54}},"198":{"start":{"line":828,"column":16},"end":{"line":828,"column":57}},"199":{"start":{"line":829,"column":16},"end":{"line":829,"column":57}},"200":{"start":{"line":830,"column":16},"end":{"line":830,"column":43}},"201":{"start":{"line":831,"column":16},"end":{"line":831,"column":56}},"202":{"start":{"line":833,"column":16},"end":{"line":833,"column":52}},"203":{"start":{"line":837,"column":12},"end":{"line":837,"column":41}},"204":{"start":{"line":840,"column":12},"end":{"line":842,"column":13}},"205":{"start":{"line":841,"column":16},"end":{"line":841,"column":61}},"206":{"start":{"line":845,"column":12},"end":{"line":845,"column":56}},"207":{"start":{"line":846,"column":12},"end":{"line":846,"column":57}},"208":{"start":{"line":847,"column":12},"end":{"line":847,"column":67}},"209":{"start":{"line":850,"column":12},"end":{"line":859,"column":13}},"210":{"start":{"line":851,"column":16},"end":{"line":851,"column":47}},"211":{"start":{"line":852,"column":16},"end":{"line":858,"column":17}},"212":{"start":{"line":853,"column":20},"end":{"line":853,"column":64}},"213":{"start":{"line":854,"column":20},"end":{"line":854,"column":42}},"214":{"start":{"line":855,"column":20},"end":{"line":855,"column":38}},"215":{"start":{"line":856,"column":20},"end":{"line":856,"column":40}},"216":{"start":{"line":857,"column":20},"end":{"line":857,"column":50}},"217":{"start":{"line":862,"column":12},"end":{"line":862,"column":40}},"218":{"start":{"line":863,"column":12},"end":{"line":863,"column":42}},"219":{"start":{"line":864,"column":12},"end":{"line":864,"column":42}},"220":{"start":{"line":866,"column":12},"end":{"line":868,"column":13}},"221":{"start":{"line":867,"column":16},"end":{"line":867,"column":36}},"222":{"start":{"line":882,"column":4},"end":{"line":1897,"column":8}},"223":{"start":{"line":891,"column":8},"end":{"line":904,"column":9}},"224":{"start":{"line":892,"column":12},"end":{"line":903,"column":13}},"225":{"start":{"line":893,"column":16},"end":{"line":893,"column":28}},"226":{"start":{"line":895,"column":16},"end":{"line":901,"column":17}},"227":{"start":{"line":896,"column":20},"end":{"line":900,"column":21}},"228":{"start":{"line":897,"column":24},"end":{"line":899,"column":25}},"229":{"start":{"line":898,"column":28},"end":{"line":898,"column":40}},"230":{"start":{"line":902,"column":16},"end":{"line":902,"column":29}},"231":{"start":{"line":915,"column":8},"end":{"line":968,"column":9}},"232":{"start":{"line":922,"column":12},"end":{"line":922,"column":41}},"233":{"start":{"line":929,"column":12},"end":{"line":929,"column":35}},"234":{"start":{"line":936,"column":12},"end":{"line":936,"column":34}},"235":{"start":{"line":943,"column":12},"end":{"line":943,"column":31}},"236":{"start":{"line":950,"column":12},"end":{"line":950,"column":29}},"237":{"start":{"line":957,"column":12},"end":{"line":957,"column":49}},"238":{"start":{"line":960,"column":12},"end":{"line":966,"column":13}},"239":{"start":{"line":961,"column":16},"end":{"line":961,"column":48}},"240":{"start":{"line":962,"column":16},"end":{"line":962,"column":52}},"241":{"start":{"line":963,"column":19},"end":{"line":966,"column":13}},"242":{"start":{"line":964,"column":16},"end":{"line":964,"column":47}},"243":{"start":{"line":965,"column":16},"end":{"line":965,"column":52}},"244":{"start":{"line":970,"column":8},"end":{"line":990,"column":10}},"245":{"start":{"line":980,"column":16},"end":{"line":980,"column":52}},"246":{"start":{"line":981,"column":16},"end":{"line":986,"column":17}},"247":{"start":{"line":982,"column":20},"end":{"line":982,"column":60}},"248":{"start":{"line":984,"column":20},"end":{"line":984,"column":47}},"249":{"start":{"line":985,"column":20},"end":{"line":985,"column":42}},"250":{"start":{"line":987,"column":16},"end":{"line":987,"column":35}},"251":{"start":{"line":988,"column":16},"end":{"line":988,"column":28}},"252":{"start":{"line":1000,"column":8},"end":{"line":1090,"column":9}},"253":{"start":{"line":1003,"column":12},"end":{"line":1003,"column":43}},"254":{"start":{"line":1012,"column":12},"end":{"line":1012,"column":81}},"255":{"start":{"line":1021,"column":12},"end":{"line":1021,"column":29}},"256":{"start":{"line":1030,"column":12},"end":{"line":1030,"column":30}},"257":{"start":{"line":1039,"column":12},"end":{"line":1039,"column":29}},"258":{"start":{"line":1049,"column":12},"end":{"line":1049,"column":34}},"259":{"start":{"line":1058,"column":12},"end":{"line":1058,"column":34}},"260":{"start":{"line":1068,"column":12},"end":{"line":1068,"column":37}},"261":{"start":{"line":1077,"column":12},"end":{"line":1077,"column":33}},"262":{"start":{"line":1088,"column":12},"end":{"line":1088,"column":30}},"263":{"start":{"line":1092,"column":8},"end":{"line":1893,"column":11}},"264":{"start":{"line":1199,"column":16},"end":{"line":1201,"column":29}},"265":{"start":{"line":1204,"column":16},"end":{"line":1208,"column":17}},"266":{"start":{"line":1205,"column":20},"end":{"line":1207,"column":21}},"267":{"start":{"line":1206,"column":24},"end":{"line":1206,"column":47}},"268":{"start":{"line":1224,"column":16},"end":{"line":1224,"column":61}},"269":{"start":{"line":1227,"column":16},"end":{"line":1233,"column":17}},"270":{"start":{"line":1228,"column":20},"end":{"line":1232,"column":21}},"271":{"start":{"line":1229,"column":24},"end":{"line":1229,"column":79}},"272":{"start":{"line":1230,"column":27},"end":{"line":1232,"column":21}},"273":{"start":{"line":1231,"column":24},"end":{"line":1231,"column":78}},"274":{"start":{"line":1247,"column":16},"end":{"line":1247,"column":60}},"275":{"start":{"line":1251,"column":16},"end":{"line":1257,"column":17}},"276":{"start":{"line":1252,"column":20},"end":{"line":1256,"column":21}},"277":{"start":{"line":1253,"column":24},"end":{"line":1253,"column":92}},"278":{"start":{"line":1254,"column":27},"end":{"line":1256,"column":21}},"279":{"start":{"line":1255,"column":24},"end":{"line":1255,"column":91}},"280":{"start":{"line":1274,"column":16},"end":{"line":1274,"column":31}},"281":{"start":{"line":1276,"column":16},"end":{"line":1293,"column":17}},"282":{"start":{"line":1277,"column":20},"end":{"line":1277,"column":45}},"283":{"start":{"line":1279,"column":20},"end":{"line":1282,"column":21}},"284":{"start":{"line":1280,"column":24},"end":{"line":1280,"column":65}},"285":{"start":{"line":1281,"column":24},"end":{"line":1281,"column":80}},"286":{"start":{"line":1284,"column":20},"end":{"line":1292,"column":21}},"287":{"start":{"line":1285,"column":24},"end":{"line":1285,"column":73}},"288":{"start":{"line":1286,"column":24},"end":{"line":1286,"column":75}},"289":{"start":{"line":1287,"column":24},"end":{"line":1287,"column":126}},"290":{"start":{"line":1288,"column":27},"end":{"line":1292,"column":21}},"291":{"start":{"line":1289,"column":24},"end":{"line":1289,"column":72}},"292":{"start":{"line":1290,"column":24},"end":{"line":1290,"column":75}},"293":{"start":{"line":1291,"column":24},"end":{"line":1291,"column":124}},"294":{"start":{"line":1309,"column":16},"end":{"line":1334,"column":17}},"295":{"start":{"line":1310,"column":20},"end":{"line":1310,"column":43}},"296":{"start":{"line":1311,"column":23},"end":{"line":1334,"column":17}},"297":{"start":{"line":1312,"column":20},"end":{"line":1312,"column":53}},"298":{"start":{"line":1313,"column":23},"end":{"line":1334,"column":17}},"299":{"start":{"line":1314,"column":20},"end":{"line":1314,"column":47}},"300":{"start":{"line":1316,"column":20},"end":{"line":1319,"column":21}},"301":{"start":{"line":1317,"column":24},"end":{"line":1317,"column":66}},"302":{"start":{"line":1318,"column":24},"end":{"line":1318,"column":53}},"303":{"start":{"line":1321,"column":20},"end":{"line":1321,"column":62}},"304":{"start":{"line":1323,"column":20},"end":{"line":1333,"column":21}},"305":{"start":{"line":1324,"column":24},"end":{"line":1324,"column":58}},"306":{"start":{"line":1325,"column":24},"end":{"line":1325,"column":84}},"307":{"start":{"line":1326,"column":24},"end":{"line":1326,"column":85}},"308":{"start":{"line":1327,"column":24},"end":{"line":1327,"column":62}},"309":{"start":{"line":1328,"column":24},"end":{"line":1328,"column":46}},"310":{"start":{"line":1329,"column":24},"end":{"line":1329,"column":92}},"311":{"start":{"line":1330,"column":24},"end":{"line":1330,"column":41}},"312":{"start":{"line":1331,"column":27},"end":{"line":1333,"column":21}},"313":{"start":{"line":1332,"column":24},"end":{"line":1332,"column":51}},"314":{"start":{"line":1336,"column":16},"end":{"line":1336,"column":33}},"315":{"start":{"line":1351,"column":16},"end":{"line":1352,"column":55}},"316":{"start":{"line":1353,"column":16},"end":{"line":1371,"column":17}},"317":{"start":{"line":1354,"column":20},"end":{"line":1359,"column":21}},"318":{"start":{"line":1355,"column":24},"end":{"line":1355,"column":73}},"319":{"start":{"line":1356,"column":24},"end":{"line":1356,"column":36}},"320":{"start":{"line":1358,"column":24},"end":{"line":1358,"column":62}},"321":{"start":{"line":1361,"column":20},"end":{"line":1361,"column":42}},"322":{"start":{"line":1362,"column":20},"end":{"line":1362,"column":37}},"323":{"start":{"line":1363,"column":20},"end":{"line":1363,"column":50}},"324":{"start":{"line":1364,"column":20},"end":{"line":1368,"column":21}},"325":{"start":{"line":1365,"column":24},"end":{"line":1365,"column":52}},"326":{"start":{"line":1367,"column":24},"end":{"line":1367,"column":52}},"327":{"start":{"line":1370,"column":20},"end":{"line":1370,"column":37}},"328":{"start":{"line":1373,"column":16},"end":{"line":1373,"column":29}},"329":{"start":{"line":1387,"column":16},"end":{"line":1387,"column":39}},"330":{"start":{"line":1390,"column":16},"end":{"line":1390,"column":40}},"331":{"start":{"line":1392,"column":16},"end":{"line":1441,"column":17}},"332":{"start":{"line":1395,"column":20},"end":{"line":1395,"column":41}},"333":{"start":{"line":1398,"column":20},"end":{"line":1398,"column":44}},"334":{"start":{"line":1400,"column":20},"end":{"line":1400,"column":53}},"335":{"start":{"line":1403,"column":20},"end":{"line":1439,"column":21}},"336":{"start":{"line":1404,"column":24},"end":{"line":1427,"column":25}},"337":{"start":{"line":1405,"column":28},"end":{"line":1405,"column":100}},"338":{"start":{"line":1406,"column":28},"end":{"line":1406,"column":53}},"339":{"start":{"line":1407,"column":28},"end":{"line":1407,"column":74}},"340":{"start":{"line":1408,"column":31},"end":{"line":1427,"column":25}},"341":{"start":{"line":1409,"column":28},"end":{"line":1409,"column":98}},"342":{"start":{"line":1410,"column":28},"end":{"line":1410,"column":53}},"343":{"start":{"line":1424,"column":28},"end":{"line":1426,"column":29}},"344":{"start":{"line":1425,"column":32},"end":{"line":1425,"column":39}},"345":{"start":{"line":1430,"column":24},"end":{"line":1436,"column":25}},"346":{"start":{"line":1431,"column":28},"end":{"line":1433,"column":34}},"347":{"start":{"line":1432,"column":32},"end":{"line":1432,"column":58}},"348":{"start":{"line":1435,"column":28},"end":{"line":1435,"column":40}},"349":{"start":{"line":1438,"column":24},"end":{"line":1438,"column":44}},"350":{"start":{"line":1447,"column":16},"end":{"line":1447,"column":37}},"351":{"start":{"line":1450,"column":16},"end":{"line":1450,"column":38}},"352":{"start":{"line":1453,"column":16},"end":{"line":1458,"column":17}},"353":{"start":{"line":1457,"column":20},"end":{"line":1457,"column":27}},"354":{"start":{"line":1460,"column":16},"end":{"line":1460,"column":47}},"355":{"start":{"line":1461,"column":16},"end":{"line":1461,"column":54}},"356":{"start":{"line":1464,"column":16},"end":{"line":1467,"column":17}},"357":{"start":{"line":1465,"column":20},"end":{"line":1465,"column":54}},"358":{"start":{"line":1466,"column":20},"end":{"line":1466,"column":47}},"359":{"start":{"line":1470,"column":16},"end":{"line":1471,"column":76}},"360":{"start":{"line":1472,"column":16},"end":{"line":1472,"column":75}},"361":{"start":{"line":1475,"column":16},"end":{"line":1475,"column":35}},"362":{"start":{"line":1476,"column":16},"end":{"line":1476,"column":33}},"363":{"start":{"line":1479,"column":16},"end":{"line":1566,"column":17}},"364":{"start":{"line":1482,"column":20},"end":{"line":1482,"column":58}},"365":{"start":{"line":1485,"column":20},"end":{"line":1495,"column":21}},"366":{"start":{"line":1486,"column":24},"end":{"line":1486,"column":81}},"367":{"start":{"line":1489,"column":26},"end":{"line":1495,"column":21}},"368":{"start":{"line":1490,"column":24},"end":{"line":1490,"column":57}},"369":{"start":{"line":1491,"column":24},"end":{"line":1491,"column":38}},"370":{"start":{"line":1492,"column":27},"end":{"line":1495,"column":21}},"371":{"start":{"line":1493,"column":24},"end":{"line":1493,"column":58}},"372":{"start":{"line":1494,"column":24},"end":{"line":1494,"column":38}},"373":{"start":{"line":1500,"column":20},"end":{"line":1503,"column":21}},"374":{"start":{"line":1501,"column":24},"end":{"line":1501,"column":58}},"375":{"start":{"line":1502,"column":24},"end":{"line":1502,"column":51}},"376":{"start":{"line":1506,"column":20},"end":{"line":1564,"column":21}},"377":{"start":{"line":1507,"column":24},"end":{"line":1510,"column":25}},"378":{"start":{"line":1508,"column":28},"end":{"line":1508,"column":43}},"379":{"start":{"line":1509,"column":28},"end":{"line":1509,"column":42}},"380":{"start":{"line":1511,"column":27},"end":{"line":1564,"column":21}},"381":{"start":{"line":1513,"column":24},"end":{"line":1526,"column":25}},"382":{"start":{"line":1514,"column":28},"end":{"line":1525,"column":29}},"383":{"start":{"line":1517,"column":32},"end":{"line":1524,"column":33}},"384":{"start":{"line":1518,"column":36},"end":{"line":1520,"column":53}},"385":{"start":{"line":1519,"column":40},"end":{"line":1519,"column":87}},"386":{"start":{"line":1521,"column":36},"end":{"line":1521,"column":57}},"387":{"start":{"line":1523,"column":36},"end":{"line":1523,"column":109}},"388":{"start":{"line":1528,"column":24},"end":{"line":1528,"column":31}},"389":{"start":{"line":1532,"column":24},"end":{"line":1563,"column":25}},"390":{"start":{"line":1533,"column":28},"end":{"line":1533,"column":72}},"391":{"start":{"line":1534,"column":28},"end":{"line":1534,"column":42}},"392":{"start":{"line":1537,"column":28},"end":{"line":1561,"column":29}},"393":{"start":{"line":1540,"column":32},"end":{"line":1543,"column":33}},"394":{"start":{"line":1541,"column":36},"end":{"line":1541,"column":80}},"395":{"start":{"line":1542,"column":36},"end":{"line":1542,"column":50}},"396":{"start":{"line":1544,"column":35},"end":{"line":1561,"column":29}},"397":{"start":{"line":1547,"column":32},"end":{"line":1550,"column":33}},"398":{"start":{"line":1548,"column":36},"end":{"line":1548,"column":80}},"399":{"start":{"line":1549,"column":36},"end":{"line":1549,"column":50}},"400":{"start":{"line":1552,"column":35},"end":{"line":1561,"column":29}},"401":{"start":{"line":1555,"column":32},"end":{"line":1559,"column":33}},"402":{"start":{"line":1557,"column":36},"end":{"line":1557,"column":80}},"403":{"start":{"line":1558,"column":36},"end":{"line":1558,"column":50}},"404":{"start":{"line":1569,"column":16},"end":{"line":1573,"column":17}},"405":{"start":{"line":1570,"column":20},"end":{"line":1570,"column":116}},"406":{"start":{"line":1572,"column":20},"end":{"line":1572,"column":102}},"407":{"start":{"line":1576,"column":16},"end":{"line":1576,"column":72}},"408":{"start":{"line":1579,"column":16},"end":{"line":1579,"column":40}},"409":{"start":{"line":1582,"column":16},"end":{"line":1582,"column":58}},"410":{"start":{"line":1585,"column":16},"end":{"line":1591,"column":18}},"411":{"start":{"line":1593,"column":16},"end":{"line":1597,"column":17}},"412":{"start":{"line":1594,"column":20},"end":{"line":1594,"column":49}},"413":{"start":{"line":1596,"column":20},"end":{"line":1596,"column":49}},"414":{"start":{"line":1598,"column":16},"end":{"line":1598,"column":44}},"415":{"start":{"line":1601,"column":16},"end":{"line":1607,"column":17}},"416":{"start":{"line":1602,"column":20},"end":{"line":1604,"column":26}},"417":{"start":{"line":1603,"column":24},"end":{"line":1603,"column":50}},"418":{"start":{"line":1606,"column":20},"end":{"line":1606,"column":32}},"419":{"start":{"line":1626,"column":16},"end":{"line":1632,"column":17}},"420":{"start":{"line":1627,"column":20},"end":{"line":1629,"column":23}},"421":{"start":{"line":1628,"column":24},"end":{"line":1628,"column":36}},"422":{"start":{"line":1631,"column":20},"end":{"line":1631,"column":32}},"423":{"start":{"line":1647,"column":16},"end":{"line":1654,"column":78}},"424":{"start":{"line":1657,"column":16},"end":{"line":1691,"column":17}},"425":{"start":{"line":1660,"column":20},"end":{"line":1665,"column":22}},"426":{"start":{"line":1667,"column":20},"end":{"line":1667,"column":50}},"427":{"start":{"line":1668,"column":20},"end":{"line":1668,"column":48}},"428":{"start":{"line":1670,"column":20},"end":{"line":1670,"column":105}},"429":{"start":{"line":1673,"column":20},"end":{"line":1679,"column":21}},"430":{"start":{"line":1674,"column":24},"end":{"line":1676,"column":30}},"431":{"start":{"line":1675,"column":28},"end":{"line":1675,"column":54}},"432":{"start":{"line":1678,"column":24},"end":{"line":1678,"column":36}},"433":{"start":{"line":1684,"column":20},"end":{"line":1684,"column":45}},"434":{"start":{"line":1687,"column":20},"end":{"line":1687,"column":73}},"435":{"start":{"line":1690,"column":20},"end":{"line":1690,"column":43}},"436":{"start":{"line":1705,"column":16},"end":{"line":1705,"column":45}},"437":{"start":{"line":1716,"column":16},"end":{"line":1716,"column":45}},"438":{"start":{"line":1731,"column":16},"end":{"line":1731,"column":49}},"439":{"start":{"line":1732,"column":16},"end":{"line":1732,"column":28}},"440":{"start":{"line":1742,"column":16},"end":{"line":1742,"column":85}},"441":{"start":{"line":1752,"column":16},"end":{"line":1752,"column":37}},"442":{"start":{"line":1762,"column":16},"end":{"line":1762,"column":37}},"443":{"start":{"line":1775,"column":16},"end":{"line":1783,"column":17}},"444":{"start":{"line":1776,"column":20},"end":{"line":1780,"column":21}},"445":{"start":{"line":1777,"column":24},"end":{"line":1777,"column":57}},"446":{"start":{"line":1779,"column":24},"end":{"line":1779,"column":49}},"447":{"start":{"line":1782,"column":20},"end":{"line":1782,"column":32}},"448":{"start":{"line":1797,"column":16},"end":{"line":1797,"column":37}},"449":{"start":{"line":1798,"column":16},"end":{"line":1800,"column":17}},"450":{"start":{"line":1799,"column":20},"end":{"line":1799,"column":50}},"451":{"start":{"line":1801,"column":16},"end":{"line":1803,"column":17}},"452":{"start":{"line":1802,"column":20},"end":{"line":1802,"column":45}},"453":{"start":{"line":1804,"column":16},"end":{"line":1812,"column":17}},"454":{"start":{"line":1805,"column":20},"end":{"line":1809,"column":21}},"455":{"start":{"line":1806,"column":24},"end":{"line":1806,"column":49}},"456":{"start":{"line":1808,"column":24},"end":{"line":1808,"column":41}},"457":{"start":{"line":1811,"column":20},"end":{"line":1811,"column":32}},"458":{"start":{"line":1827,"column":16},"end":{"line":1829,"column":35}},"459":{"start":{"line":1831,"column":16},"end":{"line":1836,"column":18}},"460":{"start":{"line":1832,"column":20},"end":{"line":1834,"column":21}},"461":{"start":{"line":1833,"column":24},"end":{"line":1833,"column":54}},"462":{"start":{"line":1835,"column":20},"end":{"line":1835,"column":32}},"463":{"start":{"line":1848,"column":16},"end":{"line":1852,"column":17}},"464":{"start":{"line":1849,"column":20},"end":{"line":1849,"column":62}},"465":{"start":{"line":1851,"column":20},"end":{"line":1851,"column":71}},"466":{"start":{"line":1867,"column":16},"end":{"line":1867,"column":40}},"467":{"start":{"line":1870,"column":16},"end":{"line":1871,"column":46}},"468":{"start":{"line":1875,"column":16},"end":{"line":1877,"column":17}},"469":{"start":{"line":1876,"column":20},"end":{"line":1876,"column":65}},"470":{"start":{"line":1880,"column":16},"end":{"line":1880,"column":111}},"471":{"start":{"line":1883,"column":16},"end":{"line":1883,"column":40}},"472":{"start":{"line":1884,"column":16},"end":{"line":1884,"column":37}},"473":{"start":{"line":1885,"column":16},"end":{"line":1885,"column":49}},"474":{"start":{"line":1888,"column":16},"end":{"line":1888,"column":48}},"475":{"start":{"line":1891,"column":16},"end":{"line":1891,"column":30}},"476":{"start":{"line":1895,"column":8},"end":{"line":1895,"column":32}},"477":{"start":{"line":1908,"column":0},"end":{"line":2300,"column":2}},"478":{"start":{"line":1924,"column":8},"end":{"line":1933,"column":9}},"479":{"start":{"line":1925,"column":12},"end":{"line":1925,"column":44}},"480":{"start":{"line":1927,"column":12},"end":{"line":1931,"column":13}},"481":{"start":{"line":1928,"column":16},"end":{"line":1930,"column":17}},"482":{"start":{"line":1929,"column":20},"end":{"line":1929,"column":29}},"483":{"start":{"line":1932,"column":12},"end":{"line":1932,"column":22}},"484":{"start":{"line":1947,"column":8},"end":{"line":1956,"column":9}},"485":{"start":{"line":1948,"column":12},"end":{"line":1948,"column":42}},"486":{"start":{"line":1950,"column":12},"end":{"line":1954,"column":13}},"487":{"start":{"line":1951,"column":16},"end":{"line":1953,"column":17}},"488":{"start":{"line":1952,"column":20},"end":{"line":1952,"column":32}},"489":{"start":{"line":1955,"column":12},"end":{"line":1955,"column":25}},"490":{"start":{"line":1971,"column":8},"end":{"line":1971,"column":36}},"491":{"start":{"line":1973,"column":8},"end":{"line":1975,"column":9}},"492":{"start":{"line":1974,"column":12},"end":{"line":1974,"column":161}},"493":{"start":{"line":1990,"column":8},"end":{"line":1990,"column":36}},"494":{"start":{"line":1993,"column":8},"end":{"line":1997,"column":9}},"495":{"start":{"line":1994,"column":12},"end":{"line":1996,"column":13}},"496":{"start":{"line":1995,"column":16},"end":{"line":1995,"column":173}},"497":{"start":{"line":2012,"column":8},"end":{"line":2012,"column":36}},"498":{"start":{"line":2014,"column":8},"end":{"line":2016,"column":9}},"499":{"start":{"line":2015,"column":12},"end":{"line":2015,"column":99}},"500":{"start":{"line":2018,"column":8},"end":{"line":2020,"column":9}},"501":{"start":{"line":2019,"column":12},"end":{"line":2019,"column":119}},"502":{"start":{"line":2036,"column":8},"end":{"line":2036,"column":36}},"503":{"start":{"line":2038,"column":8},"end":{"line":2040,"column":9}},"504":{"start":{"line":2039,"column":12},"end":{"line":2039,"column":116}},"505":{"start":{"line":2056,"column":8},"end":{"line":2056,"column":36}},"506":{"start":{"line":2058,"column":8},"end":{"line":2062,"column":9}},"507":{"start":{"line":2059,"column":12},"end":{"line":2061,"column":13}},"508":{"start":{"line":2060,"column":16},"end":{"line":2060,"column":120}},"509":{"start":{"line":2078,"column":8},"end":{"line":2078,"column":36}},"510":{"start":{"line":2081,"column":8},"end":{"line":2083,"column":9}},"511":{"start":{"line":2082,"column":12},"end":{"line":2082,"column":105}},"512":{"start":{"line":2085,"column":8},"end":{"line":2087,"column":9}},"513":{"start":{"line":2086,"column":12},"end":{"line":2086,"column":116}},"514":{"start":{"line":2102,"column":8},"end":{"line":2102,"column":36}},"515":{"start":{"line":2105,"column":8},"end":{"line":2112,"column":9}},"516":{"start":{"line":2106,"column":12},"end":{"line":2111,"column":13}},"517":{"start":{"line":2107,"column":16},"end":{"line":2109,"column":17}},"518":{"start":{"line":2108,"column":20},"end":{"line":2108,"column":153}},"519":{"start":{"line":2110,"column":16},"end":{"line":2110,"column":23}},"520":{"start":{"line":2115,"column":8},"end":{"line":2115,"column":120}},"521":{"start":{"line":2132,"column":8},"end":{"line":2132,"column":36}},"522":{"start":{"line":2135,"column":8},"end":{"line":2137,"column":9}},"523":{"start":{"line":2136,"column":12},"end":{"line":2136,"column":101}},"524":{"start":{"line":2140,"column":8},"end":{"line":2142,"column":9}},"525":{"start":{"line":2141,"column":12},"end":{"line":2141,"column":172}},"526":{"start":{"line":2145,"column":8},"end":{"line":2149,"column":9}},"527":{"start":{"line":2146,"column":12},"end":{"line":2148,"column":13}},"528":{"start":{"line":2147,"column":16},"end":{"line":2147,"column":163}},"529":{"start":{"line":2169,"column":8},"end":{"line":2169,"column":36}},"530":{"start":{"line":2172,"column":8},"end":{"line":2174,"column":9}},"531":{"start":{"line":2173,"column":12},"end":{"line":2173,"column":104}},"532":{"start":{"line":2177,"column":8},"end":{"line":2179,"column":9}},"533":{"start":{"line":2178,"column":12},"end":{"line":2178,"column":166}},"534":{"start":{"line":2182,"column":8},"end":{"line":2186,"column":9}},"535":{"start":{"line":2183,"column":12},"end":{"line":2185,"column":13}},"536":{"start":{"line":2184,"column":16},"end":{"line":2184,"column":168}},"537":{"start":{"line":2197,"column":8},"end":{"line":2197,"column":36}},"538":{"start":{"line":2198,"column":8},"end":{"line":2200,"column":9}},"539":{"start":{"line":2199,"column":12},"end":{"line":2199,"column":98}},"540":{"start":{"line":2211,"column":8},"end":{"line":2211,"column":36}},"541":{"start":{"line":2212,"column":8},"end":{"line":2214,"column":9}},"542":{"start":{"line":2213,"column":12},"end":{"line":2213,"column":102}},"543":{"start":{"line":2231,"column":8},"end":{"line":2231,"column":36}},"544":{"start":{"line":2234,"column":8},"end":{"line":2236,"column":9}},"545":{"start":{"line":2235,"column":12},"end":{"line":2235,"column":166}},"546":{"start":{"line":2239,"column":8},"end":{"line":2243,"column":9}},"547":{"start":{"line":2240,"column":12},"end":{"line":2242,"column":13}},"548":{"start":{"line":2241,"column":16},"end":{"line":2241,"column":166}},"549":{"start":{"line":2260,"column":8},"end":{"line":2267,"column":9}},"550":{"start":{"line":2261,"column":12},"end":{"line":2266,"column":13}},"551":{"start":{"line":2262,"column":16},"end":{"line":2264,"column":17}},"552":{"start":{"line":2263,"column":20},"end":{"line":2263,"column":153}},"553":{"start":{"line":2265,"column":16},"end":{"line":2265,"column":23}},"554":{"start":{"line":2270,"column":8},"end":{"line":2270,"column":101}},"555":{"start":{"line":2284,"column":8},"end":{"line":2284,"column":36}},"556":{"start":{"line":2286,"column":8},"end":{"line":2288,"column":9}},"557":{"start":{"line":2287,"column":12},"end":{"line":2287,"column":91}},"558":{"start":{"line":2290,"column":8},"end":{"line":2292,"column":9}},"559":{"start":{"line":2291,"column":12},"end":{"line":2291,"column":94}},"560":{"start":{"line":2294,"column":8},"end":{"line":2297,"column":9}},"561":{"start":{"line":2295,"column":12},"end":{"line":2295,"column":92}},"562":{"start":{"line":2296,"column":12},"end":{"line":2296,"column":41}},"563":{"start":{"line":2311,"column":0},"end":{"line":2782,"column":2}},"564":{"start":{"line":2336,"column":8},"end":{"line":2340,"column":9}},"565":{"start":{"line":2337,"column":12},"end":{"line":2337,"column":70}},"566":{"start":{"line":2339,"column":12},"end":{"line":2339,"column":34}},"567":{"start":{"line":2350,"column":8},"end":{"line":2350,"column":29}},"568":{"start":{"line":2360,"column":8},"end":{"line":2360,"column":24}},"569":{"start":{"line":2370,"column":8},"end":{"line":2370,"column":26}},"570":{"start":{"line":2384,"column":8},"end":{"line":2384,"column":103}},"571":{"start":{"line":2393,"column":8},"end":{"line":2393,"column":36}},"572":{"start":{"line":2410,"column":8},"end":{"line":2410,"column":36}},"573":{"start":{"line":2411,"column":8},"end":{"line":2413,"column":9}},"574":{"start":{"line":2412,"column":12},"end":{"line":2412,"column":133}},"575":{"start":{"line":2427,"column":8},"end":{"line":2427,"column":36}},"576":{"start":{"line":2428,"column":8},"end":{"line":2430,"column":9}},"577":{"start":{"line":2429,"column":12},"end":{"line":2429,"column":129}},"578":{"start":{"line":2443,"column":8},"end":{"line":2443,"column":36}},"579":{"start":{"line":2444,"column":8},"end":{"line":2446,"column":9}},"580":{"start":{"line":2445,"column":12},"end":{"line":2445,"column":132}},"581":{"start":{"line":2459,"column":8},"end":{"line":2459,"column":36}},"582":{"start":{"line":2460,"column":8},"end":{"line":2462,"column":9}},"583":{"start":{"line":2461,"column":12},"end":{"line":2461,"column":136}},"584":{"start":{"line":2478,"column":8},"end":{"line":2478,"column":36}},"585":{"start":{"line":2479,"column":8},"end":{"line":2481,"column":9}},"586":{"start":{"line":2480,"column":12},"end":{"line":2480,"column":129}},"587":{"start":{"line":2493,"column":8},"end":{"line":2493,"column":36}},"588":{"start":{"line":2494,"column":8},"end":{"line":2496,"column":9}},"589":{"start":{"line":2495,"column":12},"end":{"line":2495,"column":127}},"590":{"start":{"line":2512,"column":8},"end":{"line":2512,"column":36}},"591":{"start":{"line":2513,"column":8},"end":{"line":2515,"column":9}},"592":{"start":{"line":2514,"column":12},"end":{"line":2514,"column":125}},"593":{"start":{"line":2526,"column":8},"end":{"line":2526,"column":36}},"594":{"start":{"line":2527,"column":8},"end":{"line":2529,"column":9}},"595":{"start":{"line":2528,"column":12},"end":{"line":2528,"column":120}},"596":{"start":{"line":2541,"column":8},"end":{"line":2541,"column":36}},"597":{"start":{"line":2542,"column":8},"end":{"line":2544,"column":9}},"598":{"start":{"line":2543,"column":12},"end":{"line":2543,"column":122}},"599":{"start":{"line":2556,"column":8},"end":{"line":2556,"column":36}},"600":{"start":{"line":2557,"column":8},"end":{"line":2559,"column":9}},"601":{"start":{"line":2558,"column":12},"end":{"line":2558,"column":131}},"602":{"start":{"line":2571,"column":8},"end":{"line":2571,"column":36}},"603":{"start":{"line":2572,"column":8},"end":{"line":2574,"column":9}},"604":{"start":{"line":2573,"column":12},"end":{"line":2573,"column":127}},"605":{"start":{"line":2586,"column":8},"end":{"line":2586,"column":36}},"606":{"start":{"line":2587,"column":8},"end":{"line":2589,"column":9}},"607":{"start":{"line":2588,"column":12},"end":{"line":2588,"column":137}},"608":{"start":{"line":2604,"column":8},"end":{"line":2604,"column":36}},"609":{"start":{"line":2605,"column":8},"end":{"line":2605,"column":31}},"610":{"start":{"line":2606,"column":8},"end":{"line":2610,"column":9}},"611":{"start":{"line":2607,"column":12},"end":{"line":2607,"column":48}},"612":{"start":{"line":2609,"column":12},"end":{"line":2609,"column":84}},"613":{"start":{"line":2611,"column":8},"end":{"line":2613,"column":9}},"614":{"start":{"line":2612,"column":12},"end":{"line":2612,"column":123}},"615":{"start":{"line":2624,"column":8},"end":{"line":2624,"column":36}},"616":{"start":{"line":2625,"column":8},"end":{"line":2627,"column":9}},"617":{"start":{"line":2626,"column":12},"end":{"line":2626,"column":124}},"618":{"start":{"line":2638,"column":8},"end":{"line":2638,"column":36}},"619":{"start":{"line":2639,"column":8},"end":{"line":2641,"column":9}},"620":{"start":{"line":2640,"column":12},"end":{"line":2640,"column":125}},"621":{"start":{"line":2655,"column":8},"end":{"line":2655,"column":36}},"622":{"start":{"line":2656,"column":8},"end":{"line":2658,"column":9}},"623":{"start":{"line":2657,"column":12},"end":{"line":2657,"column":151}},"624":{"start":{"line":2669,"column":8},"end":{"line":2669,"column":36}},"625":{"start":{"line":2670,"column":8},"end":{"line":2672,"column":9}},"626":{"start":{"line":2671,"column":12},"end":{"line":2671,"column":123}},"627":{"start":{"line":2683,"column":8},"end":{"line":2683,"column":36}},"628":{"start":{"line":2684,"column":8},"end":{"line":2686,"column":9}},"629":{"start":{"line":2685,"column":12},"end":{"line":2685,"column":124}},"630":{"start":{"line":2697,"column":8},"end":{"line":2697,"column":36}},"631":{"start":{"line":2698,"column":8},"end":{"line":2700,"column":9}},"632":{"start":{"line":2699,"column":12},"end":{"line":2699,"column":123}},"633":{"start":{"line":2712,"column":8},"end":{"line":2712,"column":36}},"634":{"start":{"line":2713,"column":8},"end":{"line":2715,"column":9}},"635":{"start":{"line":2714,"column":12},"end":{"line":2714,"column":171}},"636":{"start":{"line":2738,"column":8},"end":{"line":2738,"column":36}},"637":{"start":{"line":2739,"column":8},"end":{"line":2739,"column":26}},"638":{"start":{"line":2741,"column":8},"end":{"line":2776,"column":9}},"639":{"start":{"line":2742,"column":12},"end":{"line":2742,"column":21}},"640":{"start":{"line":2746,"column":12},"end":{"line":2769,"column":13}},"641":{"start":{"line":2749,"column":16},"end":{"line":2751,"column":17}},"642":{"start":{"line":2750,"column":20},"end":{"line":2750,"column":33}},"643":{"start":{"line":2752,"column":19},"end":{"line":2769,"column":13}},"644":{"start":{"line":2755,"column":16},"end":{"line":2757,"column":17}},"645":{"start":{"line":2756,"column":20},"end":{"line":2756,"column":33}},"646":{"start":{"line":2759,"column":19},"end":{"line":2769,"column":13}},"647":{"start":{"line":2762,"column":16},"end":{"line":2765,"column":17}},"648":{"start":{"line":2764,"column":20},"end":{"line":2764,"column":33}},"649":{"start":{"line":2768,"column":16},"end":{"line":2768,"column":29}},"650":{"start":{"line":2771,"column":12},"end":{"line":2775,"column":13}},"651":{"start":{"line":2772,"column":16},"end":{"line":2772,"column":58}},"652":{"start":{"line":2774,"column":16},"end":{"line":2774,"column":23}},"653":{"start":{"line":2779,"column":8},"end":{"line":2779,"column":115}},"654":{"start":{"line":2794,"column":0},"end":{"line":2809,"column":2}},"655":{"start":{"line":2801,"column":4},"end":{"line":2801,"column":27}},"656":{"start":{"line":2808,"column":4},"end":{"line":2808,"column":31}},"657":{"start":{"line":2811,"column":0},"end":{"line":2835,"column":2}},"658":{"start":{"line":2823,"column":8},"end":{"line":2823,"column":28}},"659":{"start":{"line":2832,"column":8},"end":{"line":2832,"column":52}},"660":{"start":{"line":2850,"column":0},"end":{"line":2876,"column":2}},"661":{"start":{"line":2853,"column":4},"end":{"line":2853,"column":47}},"662":{"start":{"line":2860,"column":4},"end":{"line":2860,"column":29}},"663":{"start":{"line":2867,"column":4},"end":{"line":2867,"column":25}},"664":{"start":{"line":2874,"column":4},"end":{"line":2874,"column":36}},"665":{"start":{"line":2879,"column":0},"end":{"line":2879,"column":65}},"666":{"start":{"line":2882,"column":0},"end":{"line":2882,"column":76}},"667":{"start":{"line":2890,"column":0},"end":{"line":2893,"column":2}},"668":{"start":{"line":2891,"column":4},"end":{"line":2892,"column":75}},"669":{"start":{"line":2901,"column":0},"end":{"line":2937,"column":2}},"670":{"start":{"line":2912,"column":8},"end":{"line":2912,"column":53}},"671":{"start":{"line":2927,"column":8},"end":{"line":2927,"column":24}},"672":{"start":{"line":2928,"column":8},"end":{"line":2932,"column":9}},"673":{"start":{"line":2929,"column":12},"end":{"line":2931,"column":13}},"674":{"start":{"line":2930,"column":16},"end":{"line":2930,"column":52}},"675":{"start":{"line":2934,"column":8},"end":{"line":2934,"column":53}},"676":{"start":{"line":2949,"column":0},"end":{"line":3023,"column":2}},"677":{"start":{"line":2960,"column":8},"end":{"line":2960,"column":36}},"678":{"start":{"line":2961,"column":8},"end":{"line":2984,"column":9}},"679":{"start":{"line":2962,"column":12},"end":{"line":2962,"column":25}},"680":{"start":{"line":2965,"column":12},"end":{"line":2967,"column":13}},"681":{"start":{"line":2966,"column":16},"end":{"line":2966,"column":47}},"682":{"start":{"line":2970,"column":12},"end":{"line":2972,"column":13}},"683":{"start":{"line":2971,"column":16},"end":{"line":2971,"column":48}},"684":{"start":{"line":2975,"column":12},"end":{"line":2977,"column":13}},"685":{"start":{"line":2976,"column":16},"end":{"line":2976,"column":55}},"686":{"start":{"line":2979,"column":12},"end":{"line":2981,"column":13}},"687":{"start":{"line":2980,"column":16},"end":{"line":2980,"column":115}},"688":{"start":{"line":2983,"column":12},"end":{"line":2983,"column":120}},"689":{"start":{"line":2996,"column":8},"end":{"line":2996,"column":36}},"690":{"start":{"line":2997,"column":8},"end":{"line":3020,"column":9}},"691":{"start":{"line":2998,"column":12},"end":{"line":2998,"column":25}},"692":{"start":{"line":3001,"column":12},"end":{"line":3003,"column":13}},"693":{"start":{"line":3002,"column":16},"end":{"line":3002,"column":47}},"694":{"start":{"line":3006,"column":12},"end":{"line":3008,"column":13}},"695":{"start":{"line":3007,"column":16},"end":{"line":3007,"column":49}},"696":{"start":{"line":3011,"column":12},"end":{"line":3013,"column":13}},"697":{"start":{"line":3012,"column":16},"end":{"line":3012,"column":49}},"698":{"start":{"line":3015,"column":12},"end":{"line":3017,"column":13}},"699":{"start":{"line":3016,"column":16},"end":{"line":3016,"column":115}},"700":{"start":{"line":3019,"column":12},"end":{"line":3019,"column":120}},"701":{"start":{"line":3033,"column":0},"end":{"line":3066,"column":2}},"702":{"start":{"line":3036,"column":4},"end":{"line":3036,"column":30}},"703":{"start":{"line":3038,"column":4},"end":{"line":3039,"column":13}},"704":{"start":{"line":3043,"column":4},"end":{"line":3049,"column":5}},"705":{"start":{"line":3044,"column":8},"end":{"line":3044,"column":22}},"706":{"start":{"line":3045,"column":8},"end":{"line":3045,"column":31}},"707":{"start":{"line":3046,"column":8},"end":{"line":3046,"column":23}},"708":{"start":{"line":3048,"column":8},"end":{"line":3048,"column":18}},"709":{"start":{"line":3052,"column":4},"end":{"line":3062,"column":5}},"710":{"start":{"line":3053,"column":8},"end":{"line":3061,"column":9}},"711":{"start":{"line":3054,"column":12},"end":{"line":3060,"column":13}},"712":{"start":{"line":3055,"column":16},"end":{"line":3059,"column":24}},"713":{"start":{"line":3056,"column":20},"end":{"line":3058,"column":22}},"714":{"start":{"line":3057,"column":24},"end":{"line":3057,"column":108}},"715":{"start":{"line":3065,"column":4},"end":{"line":3065,"column":16}},"716":{"start":{"line":3088,"column":0},"end":{"line":3158,"column":2}},"717":{"start":{"line":3091,"column":4},"end":{"line":3093,"column":5}},"718":{"start":{"line":3092,"column":8},"end":{"line":3092,"column":33}},"719":{"start":{"line":3096,"column":4},"end":{"line":3157,"column":5}},"720":{"start":{"line":3097,"column":8},"end":{"line":3104,"column":14}},"721":{"start":{"line":3107,"column":8},"end":{"line":3107,"column":48}},"722":{"start":{"line":3108,"column":8},"end":{"line":3108,"column":42}},"723":{"start":{"line":3109,"column":8},"end":{"line":3109,"column":40}},"724":{"start":{"line":3112,"column":8},"end":{"line":3116,"column":9}},"725":{"start":{"line":3113,"column":13},"end":{"line":3115,"column":13}},"726":{"start":{"line":3114,"column":16},"end":{"line":3114,"column":134}},"727":{"start":{"line":3119,"column":8},"end":{"line":3153,"column":9}},"728":{"start":{"line":3120,"column":12},"end":{"line":3141,"column":14}},"729":{"start":{"line":3121,"column":16},"end":{"line":3136,"column":17}},"730":{"start":{"line":3122,"column":20},"end":{"line":3122,"column":50}},"731":{"start":{"line":3123,"column":20},"end":{"line":3123,"column":138}},"732":{"start":{"line":3124,"column":20},"end":{"line":3126,"column":21}},"733":{"start":{"line":3125,"column":24},"end":{"line":3125,"column":53}},"734":{"start":{"line":3128,"column":20},"end":{"line":3128,"column":59}},"735":{"start":{"line":3130,"column":20},"end":{"line":3132,"column":21}},"736":{"start":{"line":3131,"column":24},"end":{"line":3131,"column":36}},"737":{"start":{"line":3135,"column":20},"end":{"line":3135,"column":56}},"738":{"start":{"line":3140,"column":16},"end":{"line":3140,"column":82}},"739":{"start":{"line":3145,"column":12},"end":{"line":3152,"column":14}},"740":{"start":{"line":3146,"column":16},"end":{"line":3151,"column":17}},"741":{"start":{"line":3147,"column":20},"end":{"line":3147,"column":94}},"742":{"start":{"line":3150,"column":20},"end":{"line":3150,"column":56}},"743":{"start":{"line":3154,"column":11},"end":{"line":3157,"column":5}},"744":{"start":{"line":3156,"column":8},"end":{"line":3156,"column":64}},"745":{"start":{"line":3168,"column":0},"end":{"line":3186,"column":2}},"746":{"start":{"line":3169,"column":4},"end":{"line":3185,"column":5}},"747":{"start":{"line":3171,"column":8},"end":{"line":3180,"column":9}},"748":{"start":{"line":3172,"column":12},"end":{"line":3179,"column":13}},"749":{"start":{"line":3173,"column":16},"end":{"line":3173,"column":60}},"750":{"start":{"line":3174,"column":16},"end":{"line":3178,"column":17}},"751":{"start":{"line":3175,"column":20},"end":{"line":3175,"column":179}},"752":{"start":{"line":3176,"column":23},"end":{"line":3178,"column":17}},"753":{"start":{"line":3177,"column":20},"end":{"line":3177,"column":165}},"754":{"start":{"line":3184,"column":8},"end":{"line":3184,"column":44}},"755":{"start":{"line":3198,"column":0},"end":{"line":3209,"column":2}},"756":{"start":{"line":3199,"column":4},"end":{"line":3208,"column":5}},"757":{"start":{"line":3200,"column":8},"end":{"line":3205,"column":10}},"758":{"start":{"line":3201,"column":12},"end":{"line":3201,"column":53}},"759":{"start":{"line":3202,"column":12},"end":{"line":3202,"column":29}},"760":{"start":{"line":3203,"column":12},"end":{"line":3203,"column":31}},"761":{"start":{"line":3204,"column":12},"end":{"line":3204,"column":37}},"762":{"start":{"line":3207,"column":8},"end":{"line":3207,"column":69}},"763":{"start":{"line":3217,"column":0},"end":{"line":3217,"column":65}},"764":{"start":{"line":3225,"column":0},"end":{"line":3225,"column":77}},"765":{"start":{"line":3233,"column":0},"end":{"line":3233,"column":76}},"766":{"start":{"line":3241,"column":0},"end":{"line":3241,"column":76}},"767":{"start":{"line":3249,"column":0},"end":{"line":3249,"column":76}},"768":{"start":{"line":3257,"column":0},"end":{"line":3257,"column":78}},"769":{"start":{"line":3267,"column":0},"end":{"line":3438,"column":2}},"770":{"start":{"line":3280,"column":8},"end":{"line":3280,"column":36}},"771":{"start":{"line":3282,"column":8},"end":{"line":3283,"column":53}},"772":{"start":{"line":3286,"column":8},"end":{"line":3288,"column":9}},"773":{"start":{"line":3287,"column":12},"end":{"line":3287,"column":156}},"774":{"start":{"line":3291,"column":8},"end":{"line":3297,"column":9}},"775":{"start":{"line":3292,"column":12},"end":{"line":3296,"column":13}},"776":{"start":{"line":3293,"column":16},"end":{"line":3295,"column":17}},"777":{"start":{"line":3294,"column":20},"end":{"line":3294,"column":173}},"778":{"start":{"line":3310,"column":8},"end":{"line":3310,"column":78}},"779":{"start":{"line":3323,"column":8},"end":{"line":3323,"column":77}},"780":{"start":{"line":3335,"column":8},"end":{"line":3335,"column":36}},"781":{"start":{"line":3336,"column":8},"end":{"line":3338,"column":9}},"782":{"start":{"line":3337,"column":12},"end":{"line":3337,"column":137}},"783":{"start":{"line":3350,"column":8},"end":{"line":3350,"column":36}},"784":{"start":{"line":3351,"column":8},"end":{"line":3355,"column":9}},"785":{"start":{"line":3352,"column":12},"end":{"line":3354,"column":13}},"786":{"start":{"line":3353,"column":16},"end":{"line":3353,"column":142}},"787":{"start":{"line":3367,"column":8},"end":{"line":3367,"column":36}},"788":{"start":{"line":3368,"column":8},"end":{"line":3370,"column":9}},"789":{"start":{"line":3369,"column":12},"end":{"line":3369,"column":137}},"790":{"start":{"line":3382,"column":8},"end":{"line":3382,"column":36}},"791":{"start":{"line":3383,"column":8},"end":{"line":3387,"column":9}},"792":{"start":{"line":3384,"column":12},"end":{"line":3386,"column":13}},"793":{"start":{"line":3385,"column":16},"end":{"line":3385,"column":142}},"794":{"start":{"line":3398,"column":8},"end":{"line":3398,"column":36}},"795":{"start":{"line":3399,"column":8},"end":{"line":3399,"column":55}},"796":{"start":{"line":3401,"column":8},"end":{"line":3403,"column":9}},"797":{"start":{"line":3402,"column":12},"end":{"line":3402,"column":133}},"798":{"start":{"line":3416,"column":8},"end":{"line":3416,"column":36}},"799":{"start":{"line":3417,"column":8},"end":{"line":3419,"column":9}},"800":{"start":{"line":3418,"column":12},"end":{"line":3418,"column":128}},"801":{"start":{"line":3431,"column":8},"end":{"line":3431,"column":36}},"802":{"start":{"line":3432,"column":8},"end":{"line":3436,"column":9}},"803":{"start":{"line":3433,"column":12},"end":{"line":3435,"column":13}},"804":{"start":{"line":3434,"column":16},"end":{"line":3434,"column":133}},"805":{"start":{"line":3449,"column":0},"end":{"line":3499,"column":2}},"806":{"start":{"line":3456,"column":4},"end":{"line":3456,"column":21}},"807":{"start":{"line":3463,"column":4},"end":{"line":3463,"column":20}},"808":{"start":{"line":3470,"column":4},"end":{"line":3470,"column":20}},"809":{"start":{"line":3477,"column":4},"end":{"line":3477,"column":20}},"810":{"start":{"line":3484,"column":4},"end":{"line":3484,"column":21}},"811":{"start":{"line":3491,"column":4},"end":{"line":3491,"column":19}},"812":{"start":{"line":3498,"column":4},"end":{"line":3498,"column":22}},"813":{"start":{"line":3507,"column":0},"end":{"line":3513,"column":2}},"814":{"start":{"line":3508,"column":4},"end":{"line":3508,"column":34}},"815":{"start":{"line":3509,"column":4},"end":{"line":3509,"column":34}},"816":{"start":{"line":3510,"column":4},"end":{"line":3510,"column":36}},"817":{"start":{"line":3511,"column":4},"end":{"line":3511,"column":32}},"818":{"start":{"line":3512,"column":4},"end":{"line":3512,"column":34}},"819":{"start":{"line":3525,"column":0},"end":{"line":3537,"column":2}},"820":{"start":{"line":3528,"column":4},"end":{"line":3528,"column":102}},"821":{"start":{"line":3535,"column":4},"end":{"line":3535,"column":30}},"822":{"start":{"line":3540,"column":0},"end":{"line":3540,"column":61}},"823":{"start":{"line":3543,"column":0},"end":{"line":3543,"column":64}},"824":{"start":{"line":3555,"column":0},"end":{"line":3567,"column":2}},"825":{"start":{"line":3558,"column":4},"end":{"line":3558,"column":86}},"826":{"start":{"line":3565,"column":4},"end":{"line":3565,"column":29}},"827":{"start":{"line":3570,"column":0},"end":{"line":3570,"column":60}},"828":{"start":{"line":3573,"column":0},"end":{"line":3573,"column":62}},"829":{"start":{"line":3587,"column":0},"end":{"line":3613,"column":2}},"830":{"start":{"line":3590,"column":4},"end":{"line":3590,"column":76}},"831":{"start":{"line":3597,"column":4},"end":{"line":3597,"column":23}},"832":{"start":{"line":3604,"column":4},"end":{"line":3604,"column":34}},"833":{"start":{"line":3611,"column":4},"end":{"line":3611,"column":29}},"834":{"start":{"line":3616,"column":0},"end":{"line":3616,"column":65}},"835":{"start":{"line":3619,"column":0},"end":{"line":3619,"column":72}},"836":{"start":{"line":3634,"column":0},"end":{"line":3653,"column":2}},"837":{"start":{"line":3637,"column":4},"end":{"line":3637,"column":47}},"838":{"start":{"line":3644,"column":4},"end":{"line":3644,"column":33}},"839":{"start":{"line":3651,"column":4},"end":{"line":3651,"column":34}},"840":{"start":{"line":3656,"column":0},"end":{"line":3656,"column":65}},"841":{"start":{"line":3659,"column":0},"end":{"line":3659,"column":72}},"842":{"start":{"line":3667,"column":0},"end":{"line":3669,"column":2}},"843":{"start":{"line":3668,"column":4},"end":{"line":3668,"column":102}},"844":{"start":{"line":3682,"column":0},"end":{"line":3697,"column":2}},"845":{"start":{"line":3689,"column":4},"end":{"line":3689,"column":67}},"846":{"start":{"line":3696,"column":4},"end":{"line":3696,"column":56}},"847":{"start":{"line":3701,"column":0},"end":{"line":3701,"column":17}},"848":{"start":{"line":3702,"column":0},"end":{"line":3705,"column":3}},"849":{"start":{"line":3703,"column":4},"end":{"line":3703,"column":40}},"850":{"start":{"line":3704,"column":4},"end":{"line":3704,"column":24}},"851":{"start":{"line":3709,"column":0},"end":{"line":3709,"column":26}},"852":{"start":{"line":3710,"column":0},"end":{"line":3710,"column":39}},"853":{"start":{"line":3711,"column":0},"end":{"line":3711,"column":54}},"854":{"start":{"line":3712,"column":0},"end":{"line":3712,"column":50}},"855":{"start":{"line":3713,"column":0},"end":{"line":3713,"column":21}},"856":{"start":{"line":3714,"column":0},"end":{"line":3714,"column":37}},"857":{"start":{"line":3715,"column":0},"end":{"line":3715,"column":35}},"858":{"start":{"line":3716,"column":0},"end":{"line":3716,"column":33}},"859":{"start":{"line":3717,"column":0},"end":{"line":3717,"column":41}},"860":{"start":{"line":3719,"column":0},"end":{"line":3719,"column":53}},"861":{"start":{"line":3721,"column":0},"end":{"line":3723,"column":2}},"862":{"start":{"line":3722,"column":4},"end":{"line":3722,"column":81}},"863":{"start":{"line":3735,"column":0},"end":{"line":3740,"column":2}},"864":{"start":{"line":3736,"column":4},"end":{"line":3736,"column":26}},"865":{"start":{"line":3737,"column":4},"end":{"line":3739,"column":5}},"866":{"start":{"line":3738,"column":8},"end":{"line":3738,"column":88}},"867":{"start":{"line":3749,"column":0},"end":{"line":3749,"column":23}},"868":{"start":{"line":3751,"column":0},"end":{"line":3751,"column":45}},"869":{"start":{"line":3753,"column":0},"end":{"line":3755,"column":2}},"870":{"start":{"line":3754,"column":4},"end":{"line":3754,"column":31}},"871":{"start":{"line":3757,"column":0},"end":{"line":3759,"column":2}},"872":{"start":{"line":3758,"column":4},"end":{"line":3758,"column":30}},"873":{"start":{"line":3761,"column":0},"end":{"line":3761,"column":34}},"874":{"start":{"line":3762,"column":0},"end":{"line":3762,"column":26}},"875":{"start":{"line":3764,"column":0},"end":{"line":3764,"column":40}},"876":{"start":{"line":3767,"column":0},"end":{"line":3859,"column":1}},"877":{"start":{"line":3769,"column":4},"end":{"line":3771,"column":5}},"878":{"start":{"line":3770,"column":8},"end":{"line":3770,"column":39}},"879":{"start":{"line":3773,"column":4},"end":{"line":3773,"column":25}},"880":{"start":{"line":3777,"column":4},"end":{"line":3848,"column":6}},"881":{"start":{"line":3780,"column":8},"end":{"line":3780,"column":25}},"882":{"start":{"line":3781,"column":8},"end":{"line":3781,"column":29}},"883":{"start":{"line":3783,"column":8},"end":{"line":3843,"column":9}},"884":{"start":{"line":3785,"column":16},"end":{"line":3785,"column":78}},"885":{"start":{"line":3786,"column":16},"end":{"line":3786,"column":37}},"886":{"start":{"line":3787,"column":16},"end":{"line":3787,"column":22}},"887":{"start":{"line":3790,"column":16},"end":{"line":3794,"column":35}},"888":{"start":{"line":3795,"column":16},"end":{"line":3795,"column":37}},"889":{"start":{"line":3796,"column":16},"end":{"line":3796,"column":22}},"890":{"start":{"line":3799,"column":16},"end":{"line":3799,"column":84}},"891":{"start":{"line":3800,"column":16},"end":{"line":3800,"column":37}},"892":{"start":{"line":3801,"column":16},"end":{"line":3801,"column":22}},"893":{"start":{"line":3804,"column":16},"end":{"line":3804,"column":56}},"894":{"start":{"line":3805,"column":16},"end":{"line":3805,"column":39}},"895":{"start":{"line":3806,"column":16},"end":{"line":3806,"column":22}},"896":{"start":{"line":3809,"column":16},"end":{"line":3809,"column":55}},"897":{"start":{"line":3810,"column":16},"end":{"line":3810,"column":37}},"898":{"start":{"line":3811,"column":16},"end":{"line":3811,"column":22}},"899":{"start":{"line":3814,"column":16},"end":{"line":3814,"column":81}},"900":{"start":{"line":3815,"column":16},"end":{"line":3815,"column":37}},"901":{"start":{"line":3816,"column":16},"end":{"line":3816,"column":22}},"902":{"start":{"line":3819,"column":16},"end":{"line":3823,"column":35}},"903":{"start":{"line":3824,"column":16},"end":{"line":3824,"column":37}},"904":{"start":{"line":3825,"column":16},"end":{"line":3825,"column":22}},"905":{"start":{"line":3828,"column":16},"end":{"line":3828,"column":79}},"906":{"start":{"line":3829,"column":16},"end":{"line":3829,"column":37}},"907":{"start":{"line":3830,"column":16},"end":{"line":3830,"column":22}},"908":{"start":{"line":3833,"column":16},"end":{"line":3837,"column":35}},"909":{"start":{"line":3838,"column":16},"end":{"line":3838,"column":37}},"910":{"start":{"line":3839,"column":16},"end":{"line":3839,"column":22}},"911":{"start":{"line":3841,"column":16},"end":{"line":3841,"column":59}},"912":{"start":{"line":3842,"column":16},"end":{"line":3842,"column":37}},"913":{"start":{"line":3845,"column":8},"end":{"line":3847,"column":9}},"914":{"start":{"line":3846,"column":12},"end":{"line":3846,"column":54}},"915":{"start":{"line":3850,"column":4},"end":{"line":3850,"column":16}},"916":{"start":{"line":3852,"column":4},"end":{"line":3857,"column":5}},"917":{"start":{"line":3853,"column":8},"end":{"line":3853,"column":32}},"918":{"start":{"line":3854,"column":8},"end":{"line":3856,"column":9}},"919":{"start":{"line":3855,"column":12},"end":{"line":3855,"column":52}}},"branchMap":{"1":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":0},"end":{"line":16,"column":0}},{"start":{"line":16,"column":0},"end":{"line":16,"column":0}}]},"2":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":8}},{"start":{"line":76,"column":8},"end":{"line":76,"column":8}}]},"3":{"line":103,"type":"if","locations":[{"start":{"line":103,"column":8},"end":{"line":103,"column":8}},{"start":{"line":103,"column":8},"end":{"line":103,"column":8}}]},"4":{"line":106,"type":"if","locations":[{"start":{"line":106,"column":8},"end":{"line":106,"column":8}},{"start":{"line":106,"column":8},"end":{"line":106,"column":8}}]},"5":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":8},"end":{"line":110,"column":8}},{"start":{"line":110,"column":8},"end":{"line":110,"column":8}}]},"6":{"line":114,"type":"if","locations":[{"start":{"line":114,"column":8},"end":{"line":114,"column":8}},{"start":{"line":114,"column":8},"end":{"line":114,"column":8}}]},"7":{"line":130,"type":"if","locations":[{"start":{"line":130,"column":8},"end":{"line":130,"column":8}},{"start":{"line":130,"column":8},"end":{"line":130,"column":8}}]},"8":{"line":133,"type":"if","locations":[{"start":{"line":133,"column":16},"end":{"line":133,"column":16}},{"start":{"line":133,"column":16},"end":{"line":133,"column":16}}]},"9":{"line":183,"type":"if","locations":[{"start":{"line":183,"column":4},"end":{"line":183,"column":4}},{"start":{"line":183,"column":4},"end":{"line":183,"column":4}}]},"10":{"line":185,"type":"if","locations":[{"start":{"line":185,"column":11},"end":{"line":185,"column":11}},{"start":{"line":185,"column":11},"end":{"line":185,"column":11}}]},"11":{"line":187,"type":"if","locations":[{"start":{"line":187,"column":12},"end":{"line":187,"column":12}},{"start":{"line":187,"column":12},"end":{"line":187,"column":12}}]},"12":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":4},"end":{"line":194,"column":4}},{"start":{"line":194,"column":4},"end":{"line":194,"column":4}}]},"13":{"line":194,"type":"binary-expr","locations":[{"start":{"line":194,"column":8},"end":{"line":194,"column":24}},{"start":{"line":194,"column":28},"end":{"line":194,"column":38}}]},"14":{"line":212,"type":"if","locations":[{"start":{"line":212,"column":8},"end":{"line":212,"column":8}},{"start":{"line":212,"column":8},"end":{"line":212,"column":8}}]},"15":{"line":212,"type":"binary-expr","locations":[{"start":{"line":212,"column":12},"end":{"line":212,"column":51}},{"start":{"line":212,"column":55},"end":{"line":212,"column":93}}]},"16":{"line":266,"type":"if","locations":[{"start":{"line":266,"column":4},"end":{"line":266,"column":4}},{"start":{"line":266,"column":4},"end":{"line":266,"column":4}}]},"17":{"line":332,"type":"cond-expr","locations":[{"start":{"line":332,"column":48},"end":{"line":332,"column":55}},{"start":{"line":333,"column":16},"end":{"line":334,"column":45}}]},"18":{"line":333,"type":"cond-expr","locations":[{"start":{"line":333,"column":48},"end":{"line":333,"column":53}},{"start":{"line":334,"column":16},"end":{"line":334,"column":45}}]},"19":{"line":336,"type":"if","locations":[{"start":{"line":336,"column":8},"end":{"line":336,"column":8}},{"start":{"line":336,"column":8},"end":{"line":336,"column":8}}]},"20":{"line":364,"type":"if","locations":[{"start":{"line":364,"column":8},"end":{"line":364,"column":8}},{"start":{"line":364,"column":8},"end":{"line":364,"column":8}}]},"21":{"line":364,"type":"binary-expr","locations":[{"start":{"line":364,"column":13},"end":{"line":364,"column":44}},{"start":{"line":365,"column":13},"end":{"line":365,"column":42}}]},"22":{"line":369,"type":"if","locations":[{"start":{"line":369,"column":8},"end":{"line":369,"column":8}},{"start":{"line":369,"column":8},"end":{"line":369,"column":8}}]},"23":{"line":375,"type":"if","locations":[{"start":{"line":375,"column":8},"end":{"line":375,"column":8}},{"start":{"line":375,"column":8},"end":{"line":375,"column":8}}]},"24":{"line":382,"type":"if","locations":[{"start":{"line":382,"column":12},"end":{"line":382,"column":12}},{"start":{"line":382,"column":12},"end":{"line":382,"column":12}}]},"25":{"line":387,"type":"if","locations":[{"start":{"line":387,"column":16},"end":{"line":387,"column":16}},{"start":{"line":387,"column":16},"end":{"line":387,"column":16}}]},"26":{"line":409,"type":"if","locations":[{"start":{"line":409,"column":8},"end":{"line":409,"column":8}},{"start":{"line":409,"column":8},"end":{"line":409,"column":8}}]},"27":{"line":481,"type":"switch","locations":[{"start":{"line":482,"column":16},"end":{"line":482,"column":42}},{"start":{"line":483,"column":16},"end":{"line":483,"column":42}},{"start":{"line":484,"column":16},"end":{"line":484,"column":44}},{"start":{"line":485,"column":16},"end":{"line":485,"column":44}},{"start":{"line":486,"column":16},"end":{"line":486,"column":43}}]},"28":{"line":518,"type":"if","locations":[{"start":{"line":518,"column":16},"end":{"line":518,"column":16}},{"start":{"line":518,"column":16},"end":{"line":518,"column":16}}]},"29":{"line":522,"type":"if","locations":[{"start":{"line":522,"column":16},"end":{"line":522,"column":16}},{"start":{"line":522,"column":16},"end":{"line":522,"column":16}}]},"30":{"line":527,"type":"if","locations":[{"start":{"line":527,"column":24},"end":{"line":527,"column":24}},{"start":{"line":527,"column":24},"end":{"line":527,"column":24}}]},"31":{"line":528,"type":"if","locations":[{"start":{"line":528,"column":28},"end":{"line":528,"column":28}},{"start":{"line":528,"column":28},"end":{"line":528,"column":28}}]},"32":{"line":528,"type":"binary-expr","locations":[{"start":{"line":528,"column":32},"end":{"line":528,"column":45}},{"start":{"line":528,"column":49},"end":{"line":528,"column":81}},{"start":{"line":528,"column":85},"end":{"line":528,"column":118}}]},"33":{"line":557,"type":"switch","locations":[{"start":{"line":559,"column":20},"end":{"line":567,"column":30}},{"start":{"line":570,"column":20},"end":{"line":583,"column":30}},{"start":{"line":586,"column":20},"end":{"line":594,"column":30}},{"start":{"line":597,"column":20},"end":{"line":609,"column":47}}]},"34":{"line":560,"type":"if","locations":[{"start":{"line":560,"column":24},"end":{"line":560,"column":24}},{"start":{"line":560,"column":24},"end":{"line":560,"column":24}}]},"35":{"line":562,"type":"if","locations":[{"start":{"line":562,"column":28},"end":{"line":562,"column":28}},{"start":{"line":562,"column":28},"end":{"line":562,"column":28}}]},"36":{"line":575,"type":"if","locations":[{"start":{"line":575,"column":28},"end":{"line":575,"column":28}},{"start":{"line":575,"column":28},"end":{"line":575,"column":28}}]},"37":{"line":576,"type":"if","locations":[{"start":{"line":576,"column":32},"end":{"line":576,"column":32}},{"start":{"line":576,"column":32},"end":{"line":576,"column":32}}]},"38":{"line":576,"type":"binary-expr","locations":[{"start":{"line":576,"column":36},"end":{"line":576,"column":49}},{"start":{"line":576,"column":53},"end":{"line":576,"column":85}},{"start":{"line":576,"column":89},"end":{"line":576,"column":122}}]},"39":{"line":588,"type":"if","locations":[{"start":{"line":588,"column":28},"end":{"line":588,"column":28}},{"start":{"line":588,"column":28},"end":{"line":588,"column":28}}]},"40":{"line":589,"type":"if","locations":[{"start":{"line":589,"column":32},"end":{"line":589,"column":32}},{"start":{"line":589,"column":32},"end":{"line":589,"column":32}}]},"41":{"line":589,"type":"binary-expr","locations":[{"start":{"line":589,"column":36},"end":{"line":589,"column":49}},{"start":{"line":589,"column":53},"end":{"line":589,"column":85}},{"start":{"line":589,"column":89},"end":{"line":589,"column":122}}]},"42":{"line":602,"type":"if","locations":[{"start":{"line":602,"column":28},"end":{"line":602,"column":28}},{"start":{"line":602,"column":28},"end":{"line":602,"column":28}}]},"43":{"line":603,"type":"if","locations":[{"start":{"line":603,"column":32},"end":{"line":603,"column":32}},{"start":{"line":603,"column":32},"end":{"line":603,"column":32}}]},"44":{"line":603,"type":"binary-expr","locations":[{"start":{"line":603,"column":36},"end":{"line":603,"column":49}},{"start":{"line":603,"column":53},"end":{"line":603,"column":85}},{"start":{"line":603,"column":89},"end":{"line":603,"column":122}}]},"45":{"line":636,"type":"switch","locations":[{"start":{"line":638,"column":20},"end":{"line":651,"column":30}},{"start":{"line":653,"column":20},"end":{"line":668,"column":30}},{"start":{"line":670,"column":20},"end":{"line":683,"column":30}},{"start":{"line":685,"column":20},"end":{"line":693,"column":25}}]},"46":{"line":639,"type":"if","locations":[{"start":{"line":639,"column":24},"end":{"line":639,"column":24}},{"start":{"line":639,"column":24},"end":{"line":639,"column":24}}]},"47":{"line":643,"type":"if","locations":[{"start":{"line":643,"column":28},"end":{"line":643,"column":28}},{"start":{"line":643,"column":28},"end":{"line":643,"column":28}}]},"48":{"line":658,"type":"if","locations":[{"start":{"line":658,"column":28},"end":{"line":658,"column":28}},{"start":{"line":658,"column":28},"end":{"line":658,"column":28}}]},"49":{"line":659,"type":"if","locations":[{"start":{"line":659,"column":32},"end":{"line":659,"column":32}},{"start":{"line":659,"column":32},"end":{"line":659,"column":32}}]},"50":{"line":659,"type":"binary-expr","locations":[{"start":{"line":659,"column":36},"end":{"line":659,"column":49}},{"start":{"line":659,"column":53},"end":{"line":659,"column":85}},{"start":{"line":659,"column":89},"end":{"line":659,"column":122}}]},"51":{"line":675,"type":"if","locations":[{"start":{"line":675,"column":28},"end":{"line":675,"column":28}},{"start":{"line":675,"column":28},"end":{"line":675,"column":28}}]},"52":{"line":676,"type":"if","locations":[{"start":{"line":676,"column":32},"end":{"line":676,"column":32}},{"start":{"line":676,"column":32},"end":{"line":676,"column":32}}]},"53":{"line":676,"type":"binary-expr","locations":[{"start":{"line":676,"column":36},"end":{"line":676,"column":49}},{"start":{"line":676,"column":53},"end":{"line":676,"column":85}},{"start":{"line":676,"column":89},"end":{"line":676,"column":122}}]},"54":{"line":688,"type":"if","locations":[{"start":{"line":688,"column":28},"end":{"line":688,"column":28}},{"start":{"line":688,"column":28},"end":{"line":688,"column":28}}]},"55":{"line":689,"type":"if","locations":[{"start":{"line":689,"column":32},"end":{"line":689,"column":32}},{"start":{"line":689,"column":32},"end":{"line":689,"column":32}}]},"56":{"line":689,"type":"binary-expr","locations":[{"start":{"line":689,"column":36},"end":{"line":689,"column":49}},{"start":{"line":689,"column":53},"end":{"line":689,"column":85}},{"start":{"line":689,"column":89},"end":{"line":689,"column":122}}]},"57":{"line":732,"type":"binary-expr","locations":[{"start":{"line":732,"column":22},"end":{"line":732,"column":28}},{"start":{"line":732,"column":32},"end":{"line":732,"column":54}}]},"58":{"line":791,"type":"if","locations":[{"start":{"line":791,"column":12},"end":{"line":791,"column":12}},{"start":{"line":791,"column":12},"end":{"line":791,"column":12}}]},"59":{"line":795,"type":"if","locations":[{"start":{"line":795,"column":12},"end":{"line":795,"column":12}},{"start":{"line":795,"column":12},"end":{"line":795,"column":12}}]},"60":{"line":811,"type":"if","locations":[{"start":{"line":811,"column":12},"end":{"line":811,"column":12}},{"start":{"line":811,"column":12},"end":{"line":811,"column":12}}]},"61":{"line":852,"type":"if","locations":[{"start":{"line":852,"column":16},"end":{"line":852,"column":16}},{"start":{"line":852,"column":16},"end":{"line":852,"column":16}}]},"62":{"line":852,"type":"binary-expr","locations":[{"start":{"line":852,"column":20},"end":{"line":852,"column":53}},{"start":{"line":852,"column":58},"end":{"line":852,"column":84}}]},"63":{"line":866,"type":"if","locations":[{"start":{"line":866,"column":12},"end":{"line":866,"column":12}},{"start":{"line":866,"column":12},"end":{"line":866,"column":12}}]},"64":{"line":892,"type":"if","locations":[{"start":{"line":892,"column":12},"end":{"line":892,"column":12}},{"start":{"line":892,"column":12},"end":{"line":892,"column":12}}]},"65":{"line":895,"type":"if","locations":[{"start":{"line":895,"column":16},"end":{"line":895,"column":16}},{"start":{"line":895,"column":16},"end":{"line":895,"column":16}}]},"66":{"line":897,"type":"if","locations":[{"start":{"line":897,"column":24},"end":{"line":897,"column":24}},{"start":{"line":897,"column":24},"end":{"line":897,"column":24}}]},"67":{"line":960,"type":"if","locations":[{"start":{"line":960,"column":12},"end":{"line":960,"column":12}},{"start":{"line":960,"column":12},"end":{"line":960,"column":12}}]},"68":{"line":963,"type":"if","locations":[{"start":{"line":963,"column":19},"end":{"line":963,"column":19}},{"start":{"line":963,"column":19},"end":{"line":963,"column":19}}]},"69":{"line":981,"type":"if","locations":[{"start":{"line":981,"column":16},"end":{"line":981,"column":16}},{"start":{"line":981,"column":16},"end":{"line":981,"column":16}}]},"70":{"line":1205,"type":"if","locations":[{"start":{"line":1205,"column":20},"end":{"line":1205,"column":20}},{"start":{"line":1205,"column":20},"end":{"line":1205,"column":20}}]},"71":{"line":1205,"type":"binary-expr","locations":[{"start":{"line":1205,"column":25},"end":{"line":1205,"column":51}},{"start":{"line":1205,"column":55},"end":{"line":1205,"column":77}},{"start":{"line":1205,"column":82},"end":{"line":1205,"column":117}}]},"72":{"line":1228,"type":"if","locations":[{"start":{"line":1228,"column":20},"end":{"line":1228,"column":20}},{"start":{"line":1228,"column":20},"end":{"line":1228,"column":20}}]},"73":{"line":1230,"type":"if","locations":[{"start":{"line":1230,"column":27},"end":{"line":1230,"column":27}},{"start":{"line":1230,"column":27},"end":{"line":1230,"column":27}}]},"74":{"line":1252,"type":"if","locations":[{"start":{"line":1252,"column":20},"end":{"line":1252,"column":20}},{"start":{"line":1252,"column":20},"end":{"line":1252,"column":20}}]},"75":{"line":1254,"type":"if","locations":[{"start":{"line":1254,"column":27},"end":{"line":1254,"column":27}},{"start":{"line":1254,"column":27},"end":{"line":1254,"column":27}}]},"76":{"line":1276,"type":"if","locations":[{"start":{"line":1276,"column":16},"end":{"line":1276,"column":16}},{"start":{"line":1276,"column":16},"end":{"line":1276,"column":16}}]},"77":{"line":1276,"type":"binary-expr","locations":[{"start":{"line":1276,"column":20},"end":{"line":1276,"column":24}},{"start":{"line":1276,"column":29},"end":{"line":1276,"column":63}}]},"78":{"line":1279,"type":"if","locations":[{"start":{"line":1279,"column":20},"end":{"line":1279,"column":20}},{"start":{"line":1279,"column":20},"end":{"line":1279,"column":20}}]},"79":{"line":1284,"type":"if","locations":[{"start":{"line":1284,"column":20},"end":{"line":1284,"column":20}},{"start":{"line":1284,"column":20},"end":{"line":1284,"column":20}}]},"80":{"line":1288,"type":"if","locations":[{"start":{"line":1288,"column":27},"end":{"line":1288,"column":27}},{"start":{"line":1288,"column":27},"end":{"line":1288,"column":27}}]},"81":{"line":1309,"type":"if","locations":[{"start":{"line":1309,"column":16},"end":{"line":1309,"column":16}},{"start":{"line":1309,"column":16},"end":{"line":1309,"column":16}}]},"82":{"line":1311,"type":"if","locations":[{"start":{"line":1311,"column":23},"end":{"line":1311,"column":23}},{"start":{"line":1311,"column":23},"end":{"line":1311,"column":23}}]},"83":{"line":1313,"type":"if","locations":[{"start":{"line":1313,"column":23},"end":{"line":1313,"column":23}},{"start":{"line":1313,"column":23},"end":{"line":1313,"column":23}}]},"84":{"line":1316,"type":"binary-expr","locations":[{"start":{"line":1316,"column":27},"end":{"line":1316,"column":36}},{"start":{"line":1316,"column":40},"end":{"line":1316,"column":55}},{"start":{"line":1316,"column":59},"end":{"line":1316,"column":83}}]},"85":{"line":1323,"type":"if","locations":[{"start":{"line":1323,"column":20},"end":{"line":1323,"column":20}},{"start":{"line":1323,"column":20},"end":{"line":1323,"column":20}}]},"86":{"line":1331,"type":"if","locations":[{"start":{"line":1331,"column":27},"end":{"line":1331,"column":27}},{"start":{"line":1331,"column":27},"end":{"line":1331,"column":27}}]},"87":{"line":1354,"type":"if","locations":[{"start":{"line":1354,"column":20},"end":{"line":1354,"column":20}},{"start":{"line":1354,"column":20},"end":{"line":1354,"column":20}}]},"88":{"line":1354,"type":"binary-expr","locations":[{"start":{"line":1354,"column":24},"end":{"line":1354,"column":34}},{"start":{"line":1354,"column":38},"end":{"line":1354,"column":71}}]},"89":{"line":1364,"type":"if","locations":[{"start":{"line":1364,"column":20},"end":{"line":1364,"column":20}},{"start":{"line":1364,"column":20},"end":{"line":1364,"column":20}}]},"90":{"line":1392,"type":"if","locations":[{"start":{"line":1392,"column":16},"end":{"line":1392,"column":16}},{"start":{"line":1392,"column":16},"end":{"line":1392,"column":16}}]},"91":{"line":1403,"type":"if","locations":[{"start":{"line":1403,"column":20},"end":{"line":1403,"column":20}},{"start":{"line":1403,"column":20},"end":{"line":1403,"column":20}}]},"92":{"line":1403,"type":"binary-expr","locations":[{"start":{"line":1403,"column":24},"end":{"line":1403,"column":53}},{"start":{"line":1403,"column":57},"end":{"line":1403,"column":76}}]},"93":{"line":1404,"type":"if","locations":[{"start":{"line":1404,"column":24},"end":{"line":1404,"column":24}},{"start":{"line":1404,"column":24},"end":{"line":1404,"column":24}}]},"94":{"line":1408,"type":"if","locations":[{"start":{"line":1408,"column":31},"end":{"line":1408,"column":31}},{"start":{"line":1408,"column":31},"end":{"line":1408,"column":31}}]},"95":{"line":1424,"type":"if","locations":[{"start":{"line":1424,"column":28},"end":{"line":1424,"column":28}},{"start":{"line":1424,"column":28},"end":{"line":1424,"column":28}}]},"96":{"line":1430,"type":"if","locations":[{"start":{"line":1430,"column":24},"end":{"line":1430,"column":24}},{"start":{"line":1430,"column":24},"end":{"line":1430,"column":24}}]},"97":{"line":1453,"type":"if","locations":[{"start":{"line":1453,"column":16},"end":{"line":1453,"column":16}},{"start":{"line":1453,"column":16},"end":{"line":1453,"column":16}}]},"98":{"line":1464,"type":"if","locations":[{"start":{"line":1464,"column":16},"end":{"line":1464,"column":16}},{"start":{"line":1464,"column":16},"end":{"line":1464,"column":16}}]},"99":{"line":1470,"type":"binary-expr","locations":[{"start":{"line":1470,"column":33},"end":{"line":1470,"column":64}},{"start":{"line":1471,"column":36},"end":{"line":1471,"column":75}}]},"100":{"line":1471,"type":"binary-expr","locations":[{"start":{"line":1471,"column":37},"end":{"line":1471,"column":58}},{"start":{"line":1471,"column":62},"end":{"line":1471,"column":64}}]},"101":{"line":1472,"type":"binary-expr","locations":[{"start":{"line":1472,"column":35},"end":{"line":1472,"column":57}},{"start":{"line":1472,"column":61},"end":{"line":1472,"column":63}}]},"102":{"line":1485,"type":"if","locations":[{"start":{"line":1485,"column":20},"end":{"line":1485,"column":20}},{"start":{"line":1485,"column":20},"end":{"line":1485,"column":20}}]},"103":{"line":1485,"type":"binary-expr","locations":[{"start":{"line":1485,"column":23},"end":{"line":1485,"column":54}},{"start":{"line":1485,"column":58},"end":{"line":1485,"column":76}}]},"104":{"line":1489,"type":"if","locations":[{"start":{"line":1489,"column":26},"end":{"line":1489,"column":26}},{"start":{"line":1489,"column":26},"end":{"line":1489,"column":26}}]},"105":{"line":1492,"type":"if","locations":[{"start":{"line":1492,"column":27},"end":{"line":1492,"column":27}},{"start":{"line":1492,"column":27},"end":{"line":1492,"column":27}}]},"106":{"line":1500,"type":"if","locations":[{"start":{"line":1500,"column":20},"end":{"line":1500,"column":20}},{"start":{"line":1500,"column":20},"end":{"line":1500,"column":20}}]},"107":{"line":1506,"type":"if","locations":[{"start":{"line":1506,"column":20},"end":{"line":1506,"column":20}},{"start":{"line":1506,"column":20},"end":{"line":1506,"column":20}}]},"108":{"line":1507,"type":"if","locations":[{"start":{"line":1507,"column":24},"end":{"line":1507,"column":24}},{"start":{"line":1507,"column":24},"end":{"line":1507,"column":24}}]},"109":{"line":1511,"type":"if","locations":[{"start":{"line":1511,"column":27},"end":{"line":1511,"column":27}},{"start":{"line":1511,"column":27},"end":{"line":1511,"column":27}}]},"110":{"line":1513,"type":"if","locations":[{"start":{"line":1513,"column":24},"end":{"line":1513,"column":24}},{"start":{"line":1513,"column":24},"end":{"line":1513,"column":24}}]},"111":{"line":1514,"type":"if","locations":[{"start":{"line":1514,"column":28},"end":{"line":1514,"column":28}},{"start":{"line":1514,"column":28},"end":{"line":1514,"column":28}}]},"112":{"line":1517,"type":"if","locations":[{"start":{"line":1517,"column":32},"end":{"line":1517,"column":32}},{"start":{"line":1517,"column":32},"end":{"line":1517,"column":32}}]},"113":{"line":1532,"type":"if","locations":[{"start":{"line":1532,"column":24},"end":{"line":1532,"column":24}},{"start":{"line":1532,"column":24},"end":{"line":1532,"column":24}}]},"114":{"line":1537,"type":"if","locations":[{"start":{"line":1537,"column":28},"end":{"line":1537,"column":28}},{"start":{"line":1537,"column":28},"end":{"line":1537,"column":28}}]},"115":{"line":1540,"type":"if","locations":[{"start":{"line":1540,"column":32},"end":{"line":1540,"column":32}},{"start":{"line":1540,"column":32},"end":{"line":1540,"column":32}}]},"116":{"line":1544,"type":"if","locations":[{"start":{"line":1544,"column":35},"end":{"line":1544,"column":35}},{"start":{"line":1544,"column":35},"end":{"line":1544,"column":35}}]},"117":{"line":1547,"type":"if","locations":[{"start":{"line":1547,"column":32},"end":{"line":1547,"column":32}},{"start":{"line":1547,"column":32},"end":{"line":1547,"column":32}}]},"118":{"line":1552,"type":"if","locations":[{"start":{"line":1552,"column":35},"end":{"line":1552,"column":35}},{"start":{"line":1552,"column":35},"end":{"line":1552,"column":35}}]},"119":{"line":1552,"type":"binary-expr","locations":[{"start":{"line":1552,"column":39},"end":{"line":1552,"column":69}},{"start":{"line":1552,"column":73},"end":{"line":1552,"column":93}}]},"120":{"line":1555,"type":"if","locations":[{"start":{"line":1555,"column":32},"end":{"line":1555,"column":32}},{"start":{"line":1555,"column":32},"end":{"line":1555,"column":32}}]},"121":{"line":1555,"type":"binary-expr","locations":[{"start":{"line":1555,"column":36},"end":{"line":1555,"column":80}},{"start":{"line":1556,"column":40},"end":{"line":1556,"column":77}}]},"122":{"line":1569,"type":"if","locations":[{"start":{"line":1569,"column":16},"end":{"line":1569,"column":16}},{"start":{"line":1569,"column":16},"end":{"line":1569,"column":16}}]},"123":{"line":1586,"type":"cond-expr","locations":[{"start":{"line":1586,"column":37},"end":{"line":1586,"column":43}},{"start":{"line":1586,"column":46},"end":{"line":1586,"column":52}}]},"124":{"line":1587,"type":"cond-expr","locations":[{"start":{"line":1587,"column":37},"end":{"line":1587,"column":55}},{"start":{"line":1587,"column":58},"end":{"line":1587,"column":71}}]},"125":{"line":1593,"type":"if","locations":[{"start":{"line":1593,"column":16},"end":{"line":1593,"column":16}},{"start":{"line":1593,"column":16},"end":{"line":1593,"column":16}}]},"126":{"line":1601,"type":"if","locations":[{"start":{"line":1601,"column":16},"end":{"line":1601,"column":16}},{"start":{"line":1601,"column":16},"end":{"line":1601,"column":16}}]},"127":{"line":1626,"type":"if","locations":[{"start":{"line":1626,"column":16},"end":{"line":1626,"column":16}},{"start":{"line":1626,"column":16},"end":{"line":1626,"column":16}}]},"128":{"line":1652,"type":"binary-expr","locations":[{"start":{"line":1652,"column":35},"end":{"line":1652,"column":68}},{"start":{"line":1653,"column":36},"end":{"line":1653,"column":76}},{"start":{"line":1654,"column":36},"end":{"line":1654,"column":77}}]},"129":{"line":1654,"type":"binary-expr","locations":[{"start":{"line":1654,"column":37},"end":{"line":1654,"column":60}},{"start":{"line":1654,"column":64},"end":{"line":1654,"column":66}}]},"130":{"line":1657,"type":"if","locations":[{"start":{"line":1657,"column":16},"end":{"line":1657,"column":16}},{"start":{"line":1657,"column":16},"end":{"line":1657,"column":16}}]},"131":{"line":1664,"type":"cond-expr","locations":[{"start":{"line":1664,"column":66},"end":{"line":1664,"column":87}},{"start":{"line":1664,"column":90},"end":{"line":1664,"column":98}}]},"132":{"line":1673,"type":"if","locations":[{"start":{"line":1673,"column":20},"end":{"line":1673,"column":20}},{"start":{"line":1673,"column":20},"end":{"line":1673,"column":20}}]},"133":{"line":1775,"type":"if","locations":[{"start":{"line":1775,"column":16},"end":{"line":1775,"column":16}},{"start":{"line":1775,"column":16},"end":{"line":1775,"column":16}}]},"134":{"line":1775,"type":"binary-expr","locations":[{"start":{"line":1775,"column":20},"end":{"line":1775,"column":34}},{"start":{"line":1775,"column":38},"end":{"line":1775,"column":55}}]},"135":{"line":1776,"type":"if","locations":[{"start":{"line":1776,"column":20},"end":{"line":1776,"column":20}},{"start":{"line":1776,"column":20},"end":{"line":1776,"column":20}}]},"136":{"line":1798,"type":"if","locations":[{"start":{"line":1798,"column":16},"end":{"line":1798,"column":16}},{"start":{"line":1798,"column":16},"end":{"line":1798,"column":16}}]},"137":{"line":1801,"type":"if","locations":[{"start":{"line":1801,"column":16},"end":{"line":1801,"column":16}},{"start":{"line":1801,"column":16},"end":{"line":1801,"column":16}}]},"138":{"line":1804,"type":"if","locations":[{"start":{"line":1804,"column":16},"end":{"line":1804,"column":16}},{"start":{"line":1804,"column":16},"end":{"line":1804,"column":16}}]},"139":{"line":1804,"type":"binary-expr","locations":[{"start":{"line":1804,"column":20},"end":{"line":1804,"column":34}},{"start":{"line":1804,"column":38},"end":{"line":1804,"column":66}}]},"140":{"line":1805,"type":"if","locations":[{"start":{"line":1805,"column":20},"end":{"line":1805,"column":20}},{"start":{"line":1805,"column":20},"end":{"line":1805,"column":20}}]},"141":{"line":1848,"type":"if","locations":[{"start":{"line":1848,"column":16},"end":{"line":1848,"column":16}},{"start":{"line":1848,"column":16},"end":{"line":1848,"column":16}}]},"142":{"line":1849,"type":"binary-expr","locations":[{"start":{"line":1849,"column":37},"end":{"line":1849,"column":44}},{"start":{"line":1849,"column":48},"end":{"line":1849,"column":60}}]},"143":{"line":1867,"type":"binary-expr","locations":[{"start":{"line":1867,"column":26},"end":{"line":1867,"column":33}},{"start":{"line":1867,"column":37},"end":{"line":1867,"column":39}}]},"144":{"line":1875,"type":"if","locations":[{"start":{"line":1875,"column":16},"end":{"line":1875,"column":16}},{"start":{"line":1875,"column":16},"end":{"line":1875,"column":16}}]},"145":{"line":1875,"type":"binary-expr","locations":[{"start":{"line":1875,"column":20},"end":{"line":1875,"column":28}},{"start":{"line":1875,"column":32},"end":{"line":1875,"column":66}},{"start":{"line":1875,"column":70},"end":{"line":1875,"column":124}}]},"146":{"line":1880,"type":"cond-expr","locations":[{"start":{"line":1880,"column":69},"end":{"line":1880,"column":105}},{"start":{"line":1880,"column":108},"end":{"line":1880,"column":110}}]},"147":{"line":1924,"type":"if","locations":[{"start":{"line":1924,"column":8},"end":{"line":1924,"column":8}},{"start":{"line":1924,"column":8},"end":{"line":1924,"column":8}}]},"148":{"line":1928,"type":"if","locations":[{"start":{"line":1928,"column":16},"end":{"line":1928,"column":16}},{"start":{"line":1928,"column":16},"end":{"line":1928,"column":16}}]},"149":{"line":1947,"type":"if","locations":[{"start":{"line":1947,"column":8},"end":{"line":1947,"column":8}},{"start":{"line":1947,"column":8},"end":{"line":1947,"column":8}}]},"150":{"line":1951,"type":"if","locations":[{"start":{"line":1951,"column":16},"end":{"line":1951,"column":16}},{"start":{"line":1951,"column":16},"end":{"line":1951,"column":16}}]},"151":{"line":1973,"type":"if","locations":[{"start":{"line":1973,"column":8},"end":{"line":1973,"column":8}},{"start":{"line":1973,"column":8},"end":{"line":1973,"column":8}}]},"152":{"line":1994,"type":"if","locations":[{"start":{"line":1994,"column":12},"end":{"line":1994,"column":12}},{"start":{"line":1994,"column":12},"end":{"line":1994,"column":12}}]},"153":{"line":2014,"type":"if","locations":[{"start":{"line":2014,"column":8},"end":{"line":2014,"column":8}},{"start":{"line":2014,"column":8},"end":{"line":2014,"column":8}}]},"154":{"line":2018,"type":"if","locations":[{"start":{"line":2018,"column":8},"end":{"line":2018,"column":8}},{"start":{"line":2018,"column":8},"end":{"line":2018,"column":8}}]},"155":{"line":2038,"type":"if","locations":[{"start":{"line":2038,"column":8},"end":{"line":2038,"column":8}},{"start":{"line":2038,"column":8},"end":{"line":2038,"column":8}}]},"156":{"line":2059,"type":"if","locations":[{"start":{"line":2059,"column":12},"end":{"line":2059,"column":12}},{"start":{"line":2059,"column":12},"end":{"line":2059,"column":12}}]},"157":{"line":2081,"type":"if","locations":[{"start":{"line":2081,"column":8},"end":{"line":2081,"column":8}},{"start":{"line":2081,"column":8},"end":{"line":2081,"column":8}}]},"158":{"line":2085,"type":"if","locations":[{"start":{"line":2085,"column":8},"end":{"line":2085,"column":8}},{"start":{"line":2085,"column":8},"end":{"line":2085,"column":8}}]},"159":{"line":2106,"type":"if","locations":[{"start":{"line":2106,"column":12},"end":{"line":2106,"column":12}},{"start":{"line":2106,"column":12},"end":{"line":2106,"column":12}}]},"160":{"line":2107,"type":"if","locations":[{"start":{"line":2107,"column":16},"end":{"line":2107,"column":16}},{"start":{"line":2107,"column":16},"end":{"line":2107,"column":16}}]},"161":{"line":2135,"type":"if","locations":[{"start":{"line":2135,"column":8},"end":{"line":2135,"column":8}},{"start":{"line":2135,"column":8},"end":{"line":2135,"column":8}}]},"162":{"line":2135,"type":"binary-expr","locations":[{"start":{"line":2135,"column":12},"end":{"line":2135,"column":39}},{"start":{"line":2135,"column":43},"end":{"line":2135,"column":68}}]},"163":{"line":2140,"type":"if","locations":[{"start":{"line":2140,"column":8},"end":{"line":2140,"column":8}},{"start":{"line":2140,"column":8},"end":{"line":2140,"column":8}}]},"164":{"line":2146,"type":"if","locations":[{"start":{"line":2146,"column":12},"end":{"line":2146,"column":12}},{"start":{"line":2146,"column":12},"end":{"line":2146,"column":12}}]},"165":{"line":2172,"type":"if","locations":[{"start":{"line":2172,"column":8},"end":{"line":2172,"column":8}},{"start":{"line":2172,"column":8},"end":{"line":2172,"column":8}}]},"166":{"line":2177,"type":"if","locations":[{"start":{"line":2177,"column":8},"end":{"line":2177,"column":8}},{"start":{"line":2177,"column":8},"end":{"line":2177,"column":8}}]},"167":{"line":2183,"type":"if","locations":[{"start":{"line":2183,"column":12},"end":{"line":2183,"column":12}},{"start":{"line":2183,"column":12},"end":{"line":2183,"column":12}}]},"168":{"line":2198,"type":"if","locations":[{"start":{"line":2198,"column":8},"end":{"line":2198,"column":8}},{"start":{"line":2198,"column":8},"end":{"line":2198,"column":8}}]},"169":{"line":2212,"type":"if","locations":[{"start":{"line":2212,"column":8},"end":{"line":2212,"column":8}},{"start":{"line":2212,"column":8},"end":{"line":2212,"column":8}}]},"170":{"line":2234,"type":"if","locations":[{"start":{"line":2234,"column":8},"end":{"line":2234,"column":8}},{"start":{"line":2234,"column":8},"end":{"line":2234,"column":8}}]},"171":{"line":2240,"type":"if","locations":[{"start":{"line":2240,"column":12},"end":{"line":2240,"column":12}},{"start":{"line":2240,"column":12},"end":{"line":2240,"column":12}}]},"172":{"line":2261,"type":"if","locations":[{"start":{"line":2261,"column":12},"end":{"line":2261,"column":12}},{"start":{"line":2261,"column":12},"end":{"line":2261,"column":12}}]},"173":{"line":2262,"type":"if","locations":[{"start":{"line":2262,"column":16},"end":{"line":2262,"column":16}},{"start":{"line":2262,"column":16},"end":{"line":2262,"column":16}}]},"174":{"line":2286,"type":"if","locations":[{"start":{"line":2286,"column":8},"end":{"line":2286,"column":8}},{"start":{"line":2286,"column":8},"end":{"line":2286,"column":8}}]},"175":{"line":2290,"type":"if","locations":[{"start":{"line":2290,"column":8},"end":{"line":2290,"column":8}},{"start":{"line":2290,"column":8},"end":{"line":2290,"column":8}}]},"176":{"line":2290,"type":"binary-expr","locations":[{"start":{"line":2290,"column":12},"end":{"line":2290,"column":38}},{"start":{"line":2290,"column":42},"end":{"line":2290,"column":72}}]},"177":{"line":2294,"type":"if","locations":[{"start":{"line":2294,"column":8},"end":{"line":2294,"column":8}},{"start":{"line":2294,"column":8},"end":{"line":2294,"column":8}}]},"178":{"line":2336,"type":"if","locations":[{"start":{"line":2336,"column":8},"end":{"line":2336,"column":8}},{"start":{"line":2336,"column":8},"end":{"line":2336,"column":8}}]},"179":{"line":2336,"type":"binary-expr","locations":[{"start":{"line":2336,"column":12},"end":{"line":2336,"column":44}},{"start":{"line":2336,"column":48},"end":{"line":2336,"column":72}}]},"180":{"line":2411,"type":"if","locations":[{"start":{"line":2411,"column":8},"end":{"line":2411,"column":8}},{"start":{"line":2411,"column":8},"end":{"line":2411,"column":8}}]},"181":{"line":2428,"type":"if","locations":[{"start":{"line":2428,"column":8},"end":{"line":2428,"column":8}},{"start":{"line":2428,"column":8},"end":{"line":2428,"column":8}}]},"182":{"line":2444,"type":"if","locations":[{"start":{"line":2444,"column":8},"end":{"line":2444,"column":8}},{"start":{"line":2444,"column":8},"end":{"line":2444,"column":8}}]},"183":{"line":2460,"type":"if","locations":[{"start":{"line":2460,"column":8},"end":{"line":2460,"column":8}},{"start":{"line":2460,"column":8},"end":{"line":2460,"column":8}}]},"184":{"line":2479,"type":"if","locations":[{"start":{"line":2479,"column":8},"end":{"line":2479,"column":8}},{"start":{"line":2479,"column":8},"end":{"line":2479,"column":8}}]},"185":{"line":2494,"type":"if","locations":[{"start":{"line":2494,"column":8},"end":{"line":2494,"column":8}},{"start":{"line":2494,"column":8},"end":{"line":2494,"column":8}}]},"186":{"line":2513,"type":"if","locations":[{"start":{"line":2513,"column":8},"end":{"line":2513,"column":8}},{"start":{"line":2513,"column":8},"end":{"line":2513,"column":8}}]},"187":{"line":2527,"type":"if","locations":[{"start":{"line":2527,"column":8},"end":{"line":2527,"column":8}},{"start":{"line":2527,"column":8},"end":{"line":2527,"column":8}}]},"188":{"line":2542,"type":"if","locations":[{"start":{"line":2542,"column":8},"end":{"line":2542,"column":8}},{"start":{"line":2542,"column":8},"end":{"line":2542,"column":8}}]},"189":{"line":2557,"type":"if","locations":[{"start":{"line":2557,"column":8},"end":{"line":2557,"column":8}},{"start":{"line":2557,"column":8},"end":{"line":2557,"column":8}}]},"190":{"line":2572,"type":"if","locations":[{"start":{"line":2572,"column":8},"end":{"line":2572,"column":8}},{"start":{"line":2572,"column":8},"end":{"line":2572,"column":8}}]},"191":{"line":2587,"type":"if","locations":[{"start":{"line":2587,"column":8},"end":{"line":2587,"column":8}},{"start":{"line":2587,"column":8},"end":{"line":2587,"column":8}}]},"192":{"line":2606,"type":"if","locations":[{"start":{"line":2606,"column":8},"end":{"line":2606,"column":8}},{"start":{"line":2606,"column":8},"end":{"line":2606,"column":8}}]},"193":{"line":2611,"type":"if","locations":[{"start":{"line":2611,"column":8},"end":{"line":2611,"column":8}},{"start":{"line":2611,"column":8},"end":{"line":2611,"column":8}}]},"194":{"line":2625,"type":"if","locations":[{"start":{"line":2625,"column":8},"end":{"line":2625,"column":8}},{"start":{"line":2625,"column":8},"end":{"line":2625,"column":8}}]},"195":{"line":2639,"type":"if","locations":[{"start":{"line":2639,"column":8},"end":{"line":2639,"column":8}},{"start":{"line":2639,"column":8},"end":{"line":2639,"column":8}}]},"196":{"line":2656,"type":"if","locations":[{"start":{"line":2656,"column":8},"end":{"line":2656,"column":8}},{"start":{"line":2656,"column":8},"end":{"line":2656,"column":8}}]},"197":{"line":2670,"type":"if","locations":[{"start":{"line":2670,"column":8},"end":{"line":2670,"column":8}},{"start":{"line":2670,"column":8},"end":{"line":2670,"column":8}}]},"198":{"line":2684,"type":"if","locations":[{"start":{"line":2684,"column":8},"end":{"line":2684,"column":8}},{"start":{"line":2684,"column":8},"end":{"line":2684,"column":8}}]},"199":{"line":2684,"type":"binary-expr","locations":[{"start":{"line":2684,"column":12},"end":{"line":2684,"column":19}},{"start":{"line":2684,"column":24},"end":{"line":2684,"column":49}},{"start":{"line":2684,"column":53},"end":{"line":2684,"column":80}}]},"200":{"line":2698,"type":"if","locations":[{"start":{"line":2698,"column":8},"end":{"line":2698,"column":8}},{"start":{"line":2698,"column":8},"end":{"line":2698,"column":8}}]},"201":{"line":2713,"type":"if","locations":[{"start":{"line":2713,"column":8},"end":{"line":2713,"column":8}},{"start":{"line":2713,"column":8},"end":{"line":2713,"column":8}}]},"202":{"line":2746,"type":"if","locations":[{"start":{"line":2746,"column":12},"end":{"line":2746,"column":12}},{"start":{"line":2746,"column":12},"end":{"line":2746,"column":12}}]},"203":{"line":2749,"type":"if","locations":[{"start":{"line":2749,"column":16},"end":{"line":2749,"column":16}},{"start":{"line":2749,"column":16},"end":{"line":2749,"column":16}}]},"204":{"line":2752,"type":"if","locations":[{"start":{"line":2752,"column":19},"end":{"line":2752,"column":19}},{"start":{"line":2752,"column":19},"end":{"line":2752,"column":19}}]},"205":{"line":2755,"type":"if","locations":[{"start":{"line":2755,"column":16},"end":{"line":2755,"column":16}},{"start":{"line":2755,"column":16},"end":{"line":2755,"column":16}}]},"206":{"line":2759,"type":"if","locations":[{"start":{"line":2759,"column":19},"end":{"line":2759,"column":19}},{"start":{"line":2759,"column":19},"end":{"line":2759,"column":19}}]},"207":{"line":2759,"type":"binary-expr","locations":[{"start":{"line":2759,"column":23},"end":{"line":2759,"column":55}},{"start":{"line":2759,"column":59},"end":{"line":2759,"column":81}}]},"208":{"line":2762,"type":"if","locations":[{"start":{"line":2762,"column":16},"end":{"line":2762,"column":16}},{"start":{"line":2762,"column":16},"end":{"line":2762,"column":16}}]},"209":{"line":2762,"type":"binary-expr","locations":[{"start":{"line":2762,"column":20},"end":{"line":2762,"column":66}},{"start":{"line":2763,"column":24},"end":{"line":2763,"column":63}}]},"210":{"line":2771,"type":"if","locations":[{"start":{"line":2771,"column":12},"end":{"line":2771,"column":12}},{"start":{"line":2771,"column":12},"end":{"line":2771,"column":12}}]},"211":{"line":2929,"type":"if","locations":[{"start":{"line":2929,"column":12},"end":{"line":2929,"column":12}},{"start":{"line":2929,"column":12},"end":{"line":2929,"column":12}}]},"212":{"line":2961,"type":"if","locations":[{"start":{"line":2961,"column":8},"end":{"line":2961,"column":8}},{"start":{"line":2961,"column":8},"end":{"line":2961,"column":8}}]},"213":{"line":2961,"type":"binary-expr","locations":[{"start":{"line":2961,"column":12},"end":{"line":2961,"column":36}},{"start":{"line":2961,"column":40},"end":{"line":2961,"column":62}}]},"214":{"line":2965,"type":"if","locations":[{"start":{"line":2965,"column":12},"end":{"line":2965,"column":12}},{"start":{"line":2965,"column":12},"end":{"line":2965,"column":12}}]},"215":{"line":2970,"type":"if","locations":[{"start":{"line":2970,"column":12},"end":{"line":2970,"column":12}},{"start":{"line":2970,"column":12},"end":{"line":2970,"column":12}}]},"216":{"line":2975,"type":"if","locations":[{"start":{"line":2975,"column":12},"end":{"line":2975,"column":12}},{"start":{"line":2975,"column":12},"end":{"line":2975,"column":12}}]},"217":{"line":2979,"type":"if","locations":[{"start":{"line":2979,"column":12},"end":{"line":2979,"column":12}},{"start":{"line":2979,"column":12},"end":{"line":2979,"column":12}}]},"218":{"line":2997,"type":"if","locations":[{"start":{"line":2997,"column":8},"end":{"line":2997,"column":8}},{"start":{"line":2997,"column":8},"end":{"line":2997,"column":8}}]},"219":{"line":2997,"type":"binary-expr","locations":[{"start":{"line":2997,"column":12},"end":{"line":2997,"column":36}},{"start":{"line":2997,"column":40},"end":{"line":2997,"column":62}}]},"220":{"line":3001,"type":"if","locations":[{"start":{"line":3001,"column":12},"end":{"line":3001,"column":12}},{"start":{"line":3001,"column":12},"end":{"line":3001,"column":12}}]},"221":{"line":3006,"type":"if","locations":[{"start":{"line":3006,"column":12},"end":{"line":3006,"column":12}},{"start":{"line":3006,"column":12},"end":{"line":3006,"column":12}}]},"222":{"line":3011,"type":"if","locations":[{"start":{"line":3011,"column":12},"end":{"line":3011,"column":12}},{"start":{"line":3011,"column":12},"end":{"line":3011,"column":12}}]},"223":{"line":3015,"type":"if","locations":[{"start":{"line":3015,"column":12},"end":{"line":3015,"column":12}},{"start":{"line":3015,"column":12},"end":{"line":3015,"column":12}}]},"224":{"line":3036,"type":"binary-expr","locations":[{"start":{"line":3036,"column":15},"end":{"line":3036,"column":23}},{"start":{"line":3036,"column":27},"end":{"line":3036,"column":29}}]},"225":{"line":3053,"type":"if","locations":[{"start":{"line":3053,"column":8},"end":{"line":3053,"column":8}},{"start":{"line":3053,"column":8},"end":{"line":3053,"column":8}}]},"226":{"line":3054,"type":"if","locations":[{"start":{"line":3054,"column":12},"end":{"line":3054,"column":12}},{"start":{"line":3054,"column":12},"end":{"line":3054,"column":12}}]},"227":{"line":3091,"type":"if","locations":[{"start":{"line":3091,"column":4},"end":{"line":3091,"column":4}},{"start":{"line":3091,"column":4},"end":{"line":3091,"column":4}}]},"228":{"line":3096,"type":"if","locations":[{"start":{"line":3096,"column":4},"end":{"line":3096,"column":4}},{"start":{"line":3096,"column":4},"end":{"line":3096,"column":4}}]},"229":{"line":3098,"type":"binary-expr","locations":[{"start":{"line":3098,"column":19},"end":{"line":3098,"column":35}},{"start":{"line":3098,"column":39},"end":{"line":3098,"column":41}}]},"230":{"line":3100,"type":"cond-expr","locations":[{"start":{"line":3100,"column":69},"end":{"line":3100,"column":90}},{"start":{"line":3100,"column":93},"end":{"line":3100,"column":94}}]},"231":{"line":3102,"type":"binary-expr","locations":[{"start":{"line":3102,"column":18},"end":{"line":3102,"column":33}},{"start":{"line":3102,"column":37},"end":{"line":3102,"column":49}}]},"232":{"line":3113,"type":"if","locations":[{"start":{"line":3113,"column":13},"end":{"line":3113,"column":13}},{"start":{"line":3113,"column":13},"end":{"line":3113,"column":13}}]},"233":{"line":3119,"type":"if","locations":[{"start":{"line":3119,"column":8},"end":{"line":3119,"column":8}},{"start":{"line":3119,"column":8},"end":{"line":3119,"column":8}}]},"234":{"line":3130,"type":"if","locations":[{"start":{"line":3130,"column":20},"end":{"line":3130,"column":20}},{"start":{"line":3130,"column":20},"end":{"line":3130,"column":20}}]},"235":{"line":3140,"type":"cond-expr","locations":[{"start":{"line":3140,"column":63},"end":{"line":3140,"column":69}},{"start":{"line":3140,"column":72},"end":{"line":3140,"column":81}}]},"236":{"line":3154,"type":"if","locations":[{"start":{"line":3154,"column":11},"end":{"line":3154,"column":11}},{"start":{"line":3154,"column":11},"end":{"line":3154,"column":11}}]},"237":{"line":3172,"type":"if","locations":[{"start":{"line":3172,"column":12},"end":{"line":3172,"column":12}},{"start":{"line":3172,"column":12},"end":{"line":3172,"column":12}}]},"238":{"line":3174,"type":"if","locations":[{"start":{"line":3174,"column":16},"end":{"line":3174,"column":16}},{"start":{"line":3174,"column":16},"end":{"line":3174,"column":16}}]},"239":{"line":3176,"type":"if","locations":[{"start":{"line":3176,"column":23},"end":{"line":3176,"column":23}},{"start":{"line":3176,"column":23},"end":{"line":3176,"column":23}}]},"240":{"line":3199,"type":"if","locations":[{"start":{"line":3199,"column":4},"end":{"line":3199,"column":4}},{"start":{"line":3199,"column":4},"end":{"line":3199,"column":4}}]},"241":{"line":3201,"type":"binary-expr","locations":[{"start":{"line":3201,"column":33},"end":{"line":3201,"column":45}},{"start":{"line":3201,"column":49},"end":{"line":3201,"column":51}}]},"242":{"line":3286,"type":"if","locations":[{"start":{"line":3286,"column":8},"end":{"line":3286,"column":8}},{"start":{"line":3286,"column":8},"end":{"line":3286,"column":8}}]},"243":{"line":3292,"type":"if","locations":[{"start":{"line":3292,"column":12},"end":{"line":3292,"column":12}},{"start":{"line":3292,"column":12},"end":{"line":3292,"column":12}}]},"244":{"line":3293,"type":"if","locations":[{"start":{"line":3293,"column":16},"end":{"line":3293,"column":16}},{"start":{"line":3293,"column":16},"end":{"line":3293,"column":16}}]},"245":{"line":3336,"type":"if","locations":[{"start":{"line":3336,"column":8},"end":{"line":3336,"column":8}},{"start":{"line":3336,"column":8},"end":{"line":3336,"column":8}}]},"246":{"line":3336,"type":"binary-expr","locations":[{"start":{"line":3336,"column":14},"end":{"line":3336,"column":36}},{"start":{"line":3336,"column":40},"end":{"line":3336,"column":76}}]},"247":{"line":3352,"type":"if","locations":[{"start":{"line":3352,"column":12},"end":{"line":3352,"column":12}},{"start":{"line":3352,"column":12},"end":{"line":3352,"column":12}}]},"248":{"line":3352,"type":"binary-expr","locations":[{"start":{"line":3352,"column":18},"end":{"line":3352,"column":40}},{"start":{"line":3352,"column":44},"end":{"line":3352,"column":81}}]},"249":{"line":3368,"type":"if","locations":[{"start":{"line":3368,"column":8},"end":{"line":3368,"column":8}},{"start":{"line":3368,"column":8},"end":{"line":3368,"column":8}}]},"250":{"line":3384,"type":"if","locations":[{"start":{"line":3384,"column":12},"end":{"line":3384,"column":12}},{"start":{"line":3384,"column":12},"end":{"line":3384,"column":12}}]},"251":{"line":3401,"type":"if","locations":[{"start":{"line":3401,"column":8},"end":{"line":3401,"column":8}},{"start":{"line":3401,"column":8},"end":{"line":3401,"column":8}}]},"252":{"line":3417,"type":"if","locations":[{"start":{"line":3417,"column":8},"end":{"line":3417,"column":8}},{"start":{"line":3417,"column":8},"end":{"line":3417,"column":8}}]},"253":{"line":3433,"type":"if","locations":[{"start":{"line":3433,"column":12},"end":{"line":3433,"column":12}},{"start":{"line":3433,"column":12},"end":{"line":3433,"column":12}}]},"254":{"line":3528,"type":"binary-expr","locations":[{"start":{"line":3528,"column":38},"end":{"line":3528,"column":45}},{"start":{"line":3528,"column":49},"end":{"line":3528,"column":100}}]},"255":{"line":3558,"type":"binary-expr","locations":[{"start":{"line":3558,"column":38},"end":{"line":3558,"column":45}},{"start":{"line":3558,"column":49},"end":{"line":3558,"column":84}}]},"256":{"line":3689,"type":"cond-expr","locations":[{"start":{"line":3689,"column":51},"end":{"line":3689,"column":58}},{"start":{"line":3689,"column":61},"end":{"line":3689,"column":65}}]},"257":{"line":3696,"type":"cond-expr","locations":[{"start":{"line":3696,"column":45},"end":{"line":3696,"column":50}},{"start":{"line":3696,"column":53},"end":{"line":3696,"column":54}}]},"258":{"line":3737,"type":"if","locations":[{"start":{"line":3737,"column":4},"end":{"line":3737,"column":4}},{"start":{"line":3737,"column":4},"end":{"line":3737,"column":4}}]},"259":{"line":3767,"type":"if","locations":[{"start":{"line":3767,"column":0},"end":{"line":3767,"column":0}},{"start":{"line":3767,"column":0},"end":{"line":3767,"column":0}}]},"260":{"line":3769,"type":"if","locations":[{"start":{"line":3769,"column":4},"end":{"line":3769,"column":4}},{"start":{"line":3769,"column":4},"end":{"line":3769,"column":4}}]},"261":{"line":3783,"type":"switch","locations":[{"start":{"line":3784,"column":12},"end":{"line":3787,"column":22}},{"start":{"line":3789,"column":12},"end":{"line":3796,"column":22}},{"start":{"line":3798,"column":12},"end":{"line":3801,"column":22}},{"start":{"line":3803,"column":12},"end":{"line":3806,"column":22}},{"start":{"line":3808,"column":12},"end":{"line":3811,"column":22}},{"start":{"line":3813,"column":12},"end":{"line":3816,"column":22}},{"start":{"line":3818,"column":12},"end":{"line":3825,"column":22}},{"start":{"line":3827,"column":12},"end":{"line":3830,"column":22}},{"start":{"line":3832,"column":12},"end":{"line":3839,"column":22}},{"start":{"line":3840,"column":12},"end":{"line":3842,"column":37}}]},"262":{"line":3845,"type":"if","locations":[{"start":{"line":3845,"column":8},"end":{"line":3845,"column":8}},{"start":{"line":3845,"column":8},"end":{"line":3845,"column":8}}]},"263":{"line":3854,"type":"if","locations":[{"start":{"line":3854,"column":8},"end":{"line":3854,"column":8}},{"start":{"line":3854,"column":8},"end":{"line":3854,"column":8}}]}},"code":["(function () { YUI.add('test', function (Y, NAME) {","","","","/**"," * YUI Test Framework"," * @module test"," * @main test"," */","","/*"," * The root namespace for YUI Test."," */","","//So we only ever have one YUITest object that's shared","if (YUI.YUITest) {"," Y.Test = YUI.YUITest;","} else { //Ends after the YUITest definitions",""," //Make this global for back compat"," YUITest = {"," version: \"@VERSION@\","," guid: function(pre) {"," return Y.guid(pre);"," }"," };","","Y.namespace('Test');","","","//Using internal YUI methods here","YUITest.Object = Y.Object;","YUITest.Array = Y.Array;","YUITest.Util = {"," mix: Y.mix,"," JSON: Y.JSON","};","","/**"," * Simple custom event implementation."," * @namespace Test"," * @module test"," * @class EventTarget"," * @constructor"," */","YUITest.EventTarget = function(){",""," /**"," * Event handlers for the various events."," * @type Object"," * @private"," * @property _handlers"," * @static"," */"," this._handlers = {};","","};","","YUITest.EventTarget.prototype = {",""," //restore prototype"," constructor: YUITest.EventTarget,",""," //-------------------------------------------------------------------------"," // Event Handling"," //-------------------------------------------------------------------------",""," /**"," * Adds a listener for a given event type."," * @param {String} type The type of event to add a listener for."," * @param {Function} listener The function to call when the event occurs."," * @return {void}"," * @method attach"," */"," attach: function(type, listener){"," if (typeof this._handlers[type] == \"undefined\"){"," this._handlers[type] = [];"," }",""," this._handlers[type].push(listener);"," },",""," /**"," * Adds a listener for a given event type."," * @param {String} type The type of event to add a listener for."," * @param {Function} listener The function to call when the event occurs."," * @return {void}"," * @method subscribe"," * @deprecated"," */"," subscribe: function(type, listener){"," this.attach.apply(this, arguments);"," },",""," /**"," * Fires an event based on the passed-in object."," * @param {Object|String} event An object with at least a 'type' attribute"," * or a string indicating the event name."," * @return {void}"," * @method fire"," */"," fire: function(event){"," if (typeof event == \"string\"){"," event = { type: event };"," }"," if (!event.target){"," event.target = this;"," }",""," if (!event.type){"," throw new Error(\"Event object missing 'type' property.\");"," }",""," if (this._handlers[event.type] instanceof Array){"," var handlers = this._handlers[event.type];"," for (var i=0, len=handlers.length; i < len; i++){"," handlers[i].call(this, event);"," }"," }"," },",""," /**"," * Removes a listener for a given event type."," * @param {String} type The type of event to remove a listener from."," * @param {Function} listener The function to remove from the event."," * @return {void}"," * @method detach"," */"," detach: function(type, listener){"," if (this._handlers[type] instanceof Array){"," var handlers = this._handlers[type];"," for (var i=0, len=handlers.length; i < len; i++){"," if (handlers[i] === listener){"," handlers.splice(i, 1);"," break;"," }"," }"," }"," },",""," /**"," * Removes a listener for a given event type."," * @param {String} type The type of event to remove a listener from."," * @param {Function} listener The function to remove from the event."," * @return {void}"," * @method unsubscribe"," * @deprecated"," */"," unsubscribe: function(type, listener){"," this.detach.apply(this, arguments);"," }","","};","","","/**"," * A test suite that can contain a collection of TestCase and TestSuite objects."," * @param {String||Object} data The name of the test suite or an object containing"," * a name property as well as setUp and tearDown methods."," * @namespace Test"," * @module test"," * @class TestSuite"," * @constructor"," */","YUITest.TestSuite = function (data) {",""," /**"," * The name of the test suite."," * @type String"," * @property name"," */"," this.name = \"\";",""," /**"," * Array of test suites and test cases."," * @type Array"," * @property items"," * @private"," */"," this.items = [];",""," //initialize the properties"," if (typeof data == \"string\"){"," this.name = data;"," } else if (data instanceof Object){"," for (var prop in data){"," if (data.hasOwnProperty(prop)){"," this[prop] = data[prop];"," }"," }"," }",""," //double-check name"," if (this.name === \"\" || !this.name) {"," this.name = YUITest.guid(\"testSuite_\");"," }","","};","","YUITest.TestSuite.prototype = {",""," //restore constructor"," constructor: YUITest.TestSuite,",""," /**"," * Adds a test suite or test case to the test suite."," * @param {Test.TestSuite||YUITest.TestCase} testObject The test suite or test case to add."," * @return {Void}"," * @method add"," */"," add : function (testObject) {"," if (testObject instanceof YUITest.TestSuite || testObject instanceof YUITest.TestCase) {"," this.items.push(testObject);"," }"," return this;"," },",""," //-------------------------------------------------------------------------"," // Stub Methods"," //-------------------------------------------------------------------------",""," /**"," * Function to run before each test is executed."," * @return {Void}"," * @method setUp"," */"," setUp : function () {"," },",""," /**"," * Function to run after each test is executed."," * @return {Void}"," * @method tearDown"," */"," tearDown: function () {"," }","","};","/**"," * Test case containing various tests to run."," * @param template An object containing any number of test methods, other methods,"," * an optional name, and anything else the test case needs."," * @module test"," * @class TestCase"," * @namespace Test"," * @constructor"," */","","","","YUITest.TestCase = function (template) {",""," /*"," * Special rules for the test case. Possible subobjects"," * are fail, for tests that should fail, and error, for"," * tests that should throw an error."," */"," this._should = {};",""," //copy over all properties from the template to this object"," for (var prop in template) {"," this[prop] = template[prop];"," }",""," //check for a valid name"," if (typeof this.name != \"string\") {"," this.name = YUITest.guid(\"testCase_\");"," }","","};","","/**","Default delay for a test failure when `wait()` is called without a _delay_.","","@property DEFAULT_WAIT","@type {Number}","@default 10000","@static","**/","YUITest.TestCase.DEFAULT_WAIT = 10000;","","/**","Calls `YUITest.Assert.fail()` with a message indicating `wait()` was called,","but `resume()` was never called."," ","@method _waitTimeout","@static","@protected","**/","YUITest.TestCase._waitTimeout = function () {"," YUITest.Assert.fail(\"Timeout: wait() called but resume() never called.\");","};","","YUITest.TestCase.prototype = {",""," //restore constructor"," constructor: YUITest.TestCase,",""," /**"," * Method to call from an async init method to"," * restart the test case. When called, returns a function"," * that should be called when tests are ready to continue."," * @method callback"," * @return {Function} The function to call as a callback."," */"," callback: function(){"," return YUITest.TestRunner.callback.apply(YUITest.TestRunner,arguments);"," },",""," /**"," * Resumes a paused test and runs the given function."," * @param {Function} segment (Optional) The function to run."," * If omitted, the test automatically passes."," * @return {Void}"," * @method resume"," */"," resume : function (segment) {"," YUITest.TestRunner.resume(segment);"," },",""," /**"," * Causes the test case to wait a specified amount of time and then"," * continue executing the given code."," * @param {Function} segment (Optional) The function to run after the delay."," * If omitted, the TestRunner will wait until resume() is called."," * @param {int} delay (Optional) The number of milliseconds to wait before running"," * the function. If omitted, defaults to `DEFAULT_WAIT` ms (10s)."," * @return {Void}"," * @method wait"," */"," wait : function (segment, delay){"," delay = (typeof segment === 'number') ? segment :"," (typeof delay === 'number') ? delay :"," YUITest.TestCase.DEFAULT_WAIT;",""," if (typeof segment !== 'function') {"," segment = YUITest.TestCase._waitTimeout;"," }",""," throw new YUITest.Wait(segment, delay);"," },",""," /**"," Delays the current test until _condition_ returns a truthy value. If"," _condition_ fails to return a truthy value before _timeout_ milliseconds"," have passed, the test fails. Default _timeout_ is 10s."," "," _condition_ will be executed every _increment_ milliseconds (default 100)."," "," @method waitFor"," @param {Function} condition Function executed to indicate whether to"," execute _segment_"," @param {Function} segment Function to check the success or failure of this"," test"," @param {Number} [timeout=10000] Maximum number of milliseconds to wait for"," _condition_ to return true"," @param {Number} [increment=100] Milliseconds to wait before checking"," _condition_"," **/"," waitFor: function (condition, segment, timeout, increment) {"," var self = this,"," endTime;"," "," if ((typeof condition !== 'function') ||"," (typeof segment !== 'function')) {"," self.fail('waitFor() called with invalid parameters.');"," }"," "," if (typeof timeout !== 'number') {"," timeout = YUITest.TestCase.DEFAULT_WAIT;"," }"," "," endTime = (+new Date()) + timeout;"," "," if (typeof increment !== 'number') {"," increment = 100;"," }"," "," self.wait(function () {"," var now;",""," if (condition.call(self)) {"," segment.call(self);"," } else {"," now = (+new Date());"," "," if (now > endTime) {"," YUITest.TestCase._waitTimeout();"," } else {"," self.waitFor(condition, segment, endTime - now, increment);"," }"," }"," }, increment);"," },",""," //-------------------------------------------------------------------------"," // Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Asserts that a given condition is true. If not, then a YUITest.AssertionError object is thrown"," * and the test fails."," * @method assert"," * @param {Boolean} condition The condition to test."," * @param {String} message The message to display if the assertion fails."," */"," assert : function (condition, message){"," YUITest.Assert._increment();"," if (!condition){"," throw new YUITest.AssertionError(YUITest.Assert._formatMessage(message, \"Assertion failed.\"));"," }"," },",""," /**"," * Forces an assertion error to occur. Shortcut for YUITest.Assert.fail()."," * @method fail"," * @param {String} message (Optional) The message to display with the failure."," */"," fail: function (message) {"," YUITest.Assert.fail(message);"," },",""," //-------------------------------------------------------------------------"," // Stub Methods"," //-------------------------------------------------------------------------",""," /**"," * Function to run once before tests start to run."," * This executes before the first call to setUp()."," * @method init"," */"," init: function(){"," //noop"," },",""," /**"," * Function to run once after tests finish running."," * This executes after the last call to tearDown()."," * @method destroy"," */"," destroy: function(){"," //noop"," },",""," /**"," * Function to run before each test is executed."," * @return {Void}"," * @method setUp"," */"," setUp : function () {"," //noop"," },",""," /**"," * Function to run after each test is executed."," * @return {Void}"," * @method tearDown"," */"," tearDown: function () {"," //noop"," }","};","/**"," * An object object containing test result formatting methods."," * @namespace Test"," * @module test"," * @class TestFormat"," * @static"," */","YUITest.TestFormat = function(){",""," /* (intentionally not documented)"," * Basic XML escaping method. Replaces quotes, less-than, greater-than,"," * apostrophe, and ampersand characters with their corresponding entities."," * @param {String} text The text to encode."," * @return {String} The XML-escaped text."," */"," function xmlEscape(text){",""," return text.replace(/[<>\"'&]/g, function(value){"," switch(value){"," case \"<\": return \"<\";"," case \">\": return \">\";"," case \"\\\"\": return \""\";"," case \"'\": return \"'\";"," case \"&\": return \"&\";"," }"," });",""," }","",""," return {",""," /**"," * Returns test results formatted as a JSON string. Requires JSON utility."," * @param {Object} result The results object created by TestRunner."," * @return {String} A JSON-formatted string of results."," * @method JSON"," * @static"," */"," JSON: function(results) {"," return YUITest.Util.JSON.stringify(results);"," },",""," /**"," * Returns test results formatted as an XML string."," * @param {Object} result The results object created by TestRunner."," * @return {String} An XML-formatted string of results."," * @method XML"," * @static"," */"," XML: function(results) {",""," function serializeToXML(results){"," var xml = \"<\" + results.type + \" name=\\\"\" + xmlEscape(results.name) + \"\\\"\";",""," if (typeof(results.duration)==\"number\"){"," xml += \" duration=\\\"\" + results.duration + \"\\\"\";"," }",""," if (results.type == \"test\"){"," xml += \" result=\\\"\" + results.result + \"\\\" message=\\\"\" + xmlEscape(results.message) + \"\\\">\";"," } else {"," xml += \" passed=\\\"\" + results.passed + \"\\\" failed=\\\"\" + results.failed + \"\\\" ignored=\\\"\" + results.ignored + \"\\\" total=\\\"\" + results.total + \"\\\">\";"," for (var prop in results){"," if (results.hasOwnProperty(prop)){"," if (results[prop] && typeof results[prop] == \"object\" && !(results[prop] instanceof Array)){"," xml += serializeToXML(results[prop]);"," }"," }"," }"," }",""," xml += \"\" + results.type + \">\";",""," return xml;"," }",""," return \"\" + serializeToXML(results);",""," },","",""," /**"," * Returns test results formatted in JUnit XML format."," * @param {Object} result The results object created by TestRunner."," * @return {String} An XML-formatted string of results."," * @method JUnitXML"," * @static"," */"," JUnitXML: function(results) {",""," function serializeToJUnitXML(results){"," var xml = \"\";",""," switch (results.type){"," //equivalent to testcase in JUnit"," case \"test\":"," if (results.result != \"ignore\"){"," xml = \"oldMode
indicates the TestRunner should work in the YUI <= 2.8 way"," * of internally managing test suites. groups
is an array"," * of test groups indicating which tests to run."," * @return {Void}"," * @method run"," * @static"," */"," run : function (options) {",""," options = options || {};",""," //pointer to runner to avoid scope issues"," var runner = YUITest.TestRunner,"," oldMode = options.oldMode;","",""," //if there's only one suite on the masterSuite, move it up"," if (!oldMode && this.masterSuite.items.length == 1 && this.masterSuite.items[0] instanceof YUITest.TestSuite){"," this.masterSuite = this.masterSuite.items[0];"," }",""," //determine if there are any groups to filter on"," runner._groups = (options.groups instanceof Array) ? \",\" + options.groups.join(\",\") + \",\" : \"\";",""," //initialize the runner"," runner._buildTestTree();"," runner._context = {};"," runner._root._start = new Date();",""," //fire the begin event"," runner.fire(runner.BEGIN_EVENT);",""," //begin the testing"," runner._run();"," }"," });",""," return new TestRunner();",""," }();","","/**"," * The ArrayAssert object provides functions to test JavaScript array objects"," * for a variety of cases."," * @namespace Test"," * @module test"," * @class ArrayAssert"," * @static"," */","","YUITest.ArrayAssert = {",""," //========================================================================="," // Private methods"," //=========================================================================",""," /**"," * Simple indexOf() implementation for an array. Defers to native"," * if available."," * @param {Array} haystack The array to search."," * @param {Variant} needle The value to locate."," * @return {int} The index of the needle if found or -1 if not."," * @method _indexOf"," * @private"," */"," _indexOf: function(haystack, needle){"," if (haystack.indexOf){"," return haystack.indexOf(needle);"," } else {"," for (var i=0; i < haystack.length; i++){"," if (haystack[i] === needle){"," return i;"," }"," }"," return -1;"," }"," },",""," /**"," * Simple some() implementation for an array. Defers to native"," * if available."," * @param {Array} haystack The array to search."," * @param {Function} matcher The function to run on each value."," * @return {Boolean} True if any value, when run through the matcher,"," * returns true."," * @method _some"," * @private"," */"," _some: function(haystack, matcher){"," if (haystack.some){"," return haystack.some(matcher);"," } else {"," for (var i=0; i < haystack.length; i++){"," if (matcher(haystack[i])){"," return true;"," }"," }"," return false;"," }"," },",""," /**"," * Asserts that a value is present in an array. This uses the triple equals"," * sign so no type coercion may occur."," * @param {Object} needle The value that is expected in the array."," * @param {Array} haystack An array of values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method contains"," * @static"," */"," contains : function (needle, haystack,"," message) {",""," YUITest.Assert._increment();",""," if (this._indexOf(haystack, needle) == -1){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value \" + needle + \" (\" + (typeof needle) + \") not found in array [\" + haystack + \"].\"));"," }"," },",""," /**"," * Asserts that a set of values are present in an array. This uses the triple equals"," * sign so no type coercion may occur. For this assertion to pass, all values must"," * be found."," * @param {Object[]} needles An array of values that are expected in the array."," * @param {Array} haystack An array of values to check."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method containsItems"," * @static"," */"," containsItems : function (needles, haystack,"," message) {"," YUITest.Assert._increment();",""," //begin checking values"," for (var i=0; i < needles.length; i++){"," if (this._indexOf(haystack, needles[i]) == -1){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value \" + needles[i] + \" (\" + (typeof needles[i]) + \") not found in array [\" + haystack + \"].\"));"," }"," }"," },",""," /**"," * Asserts that a value matching some condition is present in an array. This uses"," * a function to determine a match."," * @param {Function} matcher A function that returns true if the items matches or false if not."," * @param {Array} haystack An array of values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method containsMatch"," * @static"," */"," containsMatch : function (matcher, haystack,"," message) {",""," YUITest.Assert._increment();"," //check for valid matcher"," if (typeof matcher != \"function\"){"," throw new TypeError(\"ArrayAssert.containsMatch(): First argument must be a function.\");"," }",""," if (!this._some(haystack, matcher)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"No match found in array [\" + haystack + \"].\"));"," }"," },",""," /**"," * Asserts that a value is not present in an array. This uses the triple equals"," * Asserts that a value is not present in an array. This uses the triple equals"," * sign so no type coercion may occur."," * @param {Object} needle The value that is expected in the array."," * @param {Array} haystack An array of values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method doesNotContain"," * @static"," */"," doesNotContain : function (needle, haystack,"," message) {",""," YUITest.Assert._increment();",""," if (this._indexOf(haystack, needle) > -1){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value found in array [\" + haystack + \"].\"));"," }"," },",""," /**"," * Asserts that a set of values are not present in an array. This uses the triple equals"," * sign so no type coercion may occur. For this assertion to pass, all values must"," * not be found."," * @param {Object[]} needles An array of values that are not expected in the array."," * @param {Array} haystack An array of values to check."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method doesNotContainItems"," * @static"," */"," doesNotContainItems : function (needles, haystack,"," message) {",""," YUITest.Assert._increment();",""," for (var i=0; i < needles.length; i++){"," if (this._indexOf(haystack, needles[i]) > -1){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value found in array [\" + haystack + \"].\"));"," }"," }",""," },",""," /**"," * Asserts that no values matching a condition are present in an array. This uses"," * a function to determine a match."," * @param {Function} matcher A function that returns true if the item matches or false if not."," * @param {Array} haystack An array of values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method doesNotContainMatch"," * @static"," */"," doesNotContainMatch : function (matcher, haystack,"," message) {",""," YUITest.Assert._increment();",""," //check for valid matcher"," if (typeof matcher != \"function\"){"," throw new TypeError(\"ArrayAssert.doesNotContainMatch(): First argument must be a function.\");"," }",""," if (this._some(haystack, matcher)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value found in array [\" + haystack + \"].\"));"," }"," },",""," /**"," * Asserts that the given value is contained in an array at the specified index."," * This uses the triple equals sign so no type coercion will occur."," * @param {Object} needle The value to look for."," * @param {Array} haystack The array to search in."," * @param {int} index The index at which the value should exist."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method indexOf"," * @static"," */"," indexOf : function (needle, haystack, index, message) {",""," YUITest.Assert._increment();",""," //try to find the value in the array"," for (var i=0; i < haystack.length; i++){"," if (haystack[i] === needle){"," if (index != i){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value exists at index \" + i + \" but should be at index \" + index + \".\"));"," }"," return;"," }"," }",""," //if it makes it here, it wasn't found at all"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value doesn't exist in array [\" + haystack + \"].\"));"," },",""," /**"," * Asserts that the values in an array are equal, and in the same position,"," * as values in another array. This uses the double equals sign"," * so type coercion may occur. Note that the array objects themselves"," * need not be the same for this test to pass."," * @param {Array} expected An array of the expected values."," * @param {Array} actual Any array of the actual values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method itemsAreEqual"," * @static"," */"," itemsAreEqual : function (expected, actual,"," message) {",""," YUITest.Assert._increment();",""," //first make sure they're array-like (this can probably be improved)"," if (typeof expected != \"object\" || typeof actual != \"object\"){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value should be an array.\"));"," }",""," //next check array length"," if (expected.length != actual.length){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should have a length of \" + expected.length + \" but has a length of \" + actual.length + \".\"));"," }",""," //begin checking values"," for (var i=0; i < expected.length; i++){"," if (expected[i] != actual[i]){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values in position \" + i + \" are not equal.\"), expected[i], actual[i]);"," }"," }"," },",""," /**"," * Asserts that the values in an array are equivalent, and in the same position,"," * as values in another array. This uses a function to determine if the values"," * are equivalent. Note that the array objects themselves"," * need not be the same for this test to pass."," * @param {Array} expected An array of the expected values."," * @param {Array} actual Any array of the actual values."," * @param {Function} comparator A function that returns true if the values are equivalent"," * or false if not."," * @param {String} message (Optional) The message to display if the assertion fails."," * @return {Void}"," * @method itemsAreEquivalent"," * @static"," */"," itemsAreEquivalent : function (expected, actual,"," comparator, message) {",""," YUITest.Assert._increment();",""," //make sure the comparator is valid"," if (typeof comparator != \"function\"){"," throw new TypeError(\"ArrayAssert.itemsAreEquivalent(): Third argument must be a function.\");"," }",""," //first check array length"," if (expected.length != actual.length){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should have a length of \" + expected.length + \" but has a length of \" + actual.length));"," }",""," //begin checking values"," for (var i=0; i < expected.length; i++){"," if (!comparator(expected[i], actual[i])){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values in position \" + i + \" are not equivalent.\"), expected[i], actual[i]);"," }"," }"," },",""," /**"," * Asserts that an array is empty."," * @param {Array} actual The array to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isEmpty"," * @static"," */"," isEmpty : function (actual, message) {"," YUITest.Assert._increment();"," if (actual.length > 0){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should be empty.\"));"," }"," },",""," /**"," * Asserts that an array is not empty."," * @param {Array} actual The array to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNotEmpty"," * @static"," */"," isNotEmpty : function (actual, message) {"," YUITest.Assert._increment();"," if (actual.length === 0){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should not be empty.\"));"," }"," },",""," /**"," * Asserts that the values in an array are the same, and in the same position,"," * as values in another array. This uses the triple equals sign"," * so no type coercion will occur. Note that the array objects themselves"," * need not be the same for this test to pass."," * @param {Array} expected An array of the expected values."," * @param {Array} actual Any array of the actual values."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method itemsAreSame"," * @static"," */"," itemsAreSame : function (expected, actual,"," message) {",""," YUITest.Assert._increment();",""," //first check array length"," if (expected.length != actual.length){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Array should have a length of \" + expected.length + \" but has a length of \" + actual.length));"," }",""," //begin checking values"," for (var i=0; i < expected.length; i++){"," if (expected[i] !== actual[i]){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values in position \" + i + \" are not the same.\"), expected[i], actual[i]);"," }"," }"," },",""," /**"," * Asserts that the given value is contained in an array at the specified index,"," * starting from the back of the array."," * This uses the triple equals sign so no type coercion will occur."," * @param {Object} needle The value to look for."," * @param {Array} haystack The array to search in."," * @param {int} index The index at which the value should exist."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method lastIndexOf"," * @static"," */"," lastIndexOf : function (needle, haystack, index, message) {",""," //try to find the value in the array"," for (var i=haystack.length; i >= 0; i--){"," if (haystack[i] === needle){"," if (index != i){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value exists at index \" + i + \" but should be at index \" + index + \".\"));"," }"," return;"," }"," }",""," //if it makes it here, it wasn't found at all"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Value doesn't exist in array.\"));"," },",""," /**"," * Asserts that given array doesn't contain duplicate items."," * @param {Array} array The array to check."," * @param {Function} [comparator=null] A custom function to use to test the equality of two values."," * This function is similar to the one given to {{#crossLink \"Array/unique:method\"}}Y.Array.unique{{/crossLink}}."," * @param {String} [message] The message to display if the assertion fails."," * @method isUnique"," * @static"," */"," isUnique: function (array, comparator, message) {",""," YUITest.Assert._increment();",""," if (!Y.Lang.isArray(array)){"," throw new TypeError(\"ArrayAssert.isUnique(): First argument must be an array\");"," }",""," if (Y.Lang.isValue(comparator) && !Y.Lang.isFunction(comparator)){"," throw new TypeError(\"ArrayAssert.isUnique(): Second argument must be a function\");"," }",""," if (Y.Array.unique(array, comparator).length < array.length){"," message = YUITest.Assert._formatMessage(message, \"Array contains duplicate(s)\");"," YUITest.Assert.fail(message);"," }"," }","","};","","/**"," * The Assert object provides functions to test JavaScript values against"," * known and expected results. Whenever a comparison (assertion) fails,"," * an error is thrown."," * @namespace Test"," * @module test"," * @class Assert"," * @static"," */","YUITest.Assert = {",""," /**"," * The number of assertions performed."," * @property _asserts"," * @type int"," * @private"," */"," _asserts: 0,",""," //-------------------------------------------------------------------------"," // Helper Methods"," //-------------------------------------------------------------------------",""," /**"," * Formats a message so that it can contain the original assertion message"," * in addition to the custom message."," * @param {String} customMessage The message passed in by the developer."," * @param {String} defaultMessage The message created by the error by default."," * @return {String} The final error message, containing either or both."," * @protected"," * @static"," * @method _formatMessage"," */"," _formatMessage : function (customMessage, defaultMessage) {"," if (typeof customMessage == \"string\" && customMessage.length > 0){"," return customMessage.replace(\"{message}\", defaultMessage);"," } else {"," return defaultMessage;"," }"," },",""," /**"," * Returns the number of assertions that have been performed."," * @method _getCount"," * @protected"," * @static"," */"," _getCount: function(){"," return this._asserts;"," },",""," /**"," * Increments the number of assertions that have been performed."," * @method _increment"," * @protected"," * @static"," */"," _increment: function(){"," this._asserts++;"," },",""," /**"," * Resets the number of assertions that have been performed to 0."," * @method _reset"," * @protected"," * @static"," */"," _reset: function(){"," this._asserts = 0;"," },",""," //-------------------------------------------------------------------------"," // Generic Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Forces an assertion error to occur."," * @param {String} message (Optional) The message to display with the failure."," * @method fail"," * @static"," */"," fail : function (message) {"," throw new YUITest.AssertionError(YUITest.Assert._formatMessage(message, \"Test force-failed.\"));"," },",""," /**"," * A marker that the test should pass."," * @method pass"," * @static"," */"," pass : function (message) {"," YUITest.Assert._increment();"," },",""," //-------------------------------------------------------------------------"," // Equality Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Asserts that a value is equal to another. This uses the double equals sign"," * so type coercion may occur."," * @param {Object} expected The expected value."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areEqual"," * @static"," */"," areEqual : function (expected, actual, message) {"," YUITest.Assert._increment();"," if (expected != actual) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values should be equal.\"), expected, actual);"," }"," },",""," /**"," * Asserts that a value is not equal to another. This uses the double equals sign"," * so type coercion may occur."," * @param {Object} unexpected The unexpected value."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areNotEqual"," * @static"," */"," areNotEqual : function (unexpected, actual,"," message) {"," YUITest.Assert._increment();"," if (unexpected == actual) {"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Values should not be equal.\"), unexpected);"," }"," },",""," /**"," * Asserts that a value is not the same as another. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} unexpected The unexpected value."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areNotSame"," * @static"," */"," areNotSame : function (unexpected, actual, message) {"," YUITest.Assert._increment();"," if (unexpected === actual) {"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Values should not be the same.\"), unexpected);"," }"," },",""," /**"," * Asserts that a value is the same as another. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} expected The expected value."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areSame"," * @static"," */"," areSame : function (expected, actual, message) {"," YUITest.Assert._increment();"," if (expected !== actual) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values should be the same.\"), expected, actual);"," }"," },",""," //-------------------------------------------------------------------------"," // Boolean Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Asserts that a value is false. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isFalse"," * @static"," */"," isFalse : function (actual, message) {"," YUITest.Assert._increment();"," if (false !== actual) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be false.\"), false, actual);"," }"," },",""," /**"," * Asserts that a value is true. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isTrue"," * @static"," */"," isTrue : function (actual, message) {"," YUITest.Assert._increment();"," if (true !== actual) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be true.\"), true, actual);"," }",""," },",""," //-------------------------------------------------------------------------"," // Special Value Assertion Methods"," //-------------------------------------------------------------------------",""," /**"," * Asserts that a value is not a number."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNaN"," * @static"," */"," isNaN : function (actual, message){"," YUITest.Assert._increment();"," if (!isNaN(actual)){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be NaN.\"), NaN, actual);"," }"," },",""," /**"," * Asserts that a value is not the special NaN value."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNotNaN"," * @static"," */"," isNotNaN : function (actual, message){"," YUITest.Assert._increment();"," if (isNaN(actual)){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Values should not be NaN.\"), NaN);"," }"," },",""," /**"," * Asserts that a value is not null. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNotNull"," * @static"," */"," isNotNull : function (actual, message) {"," YUITest.Assert._increment();"," if (actual === null) {"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Values should not be null.\"), null);"," }"," },",""," /**"," * Asserts that a value is not undefined. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNotUndefined"," * @static"," */"," isNotUndefined : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual == \"undefined\") {"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should not be undefined.\"), undefined);"," }"," },",""," /**"," * Asserts that a value is null. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNull"," * @static"," */"," isNull : function (actual, message) {"," YUITest.Assert._increment();"," if (actual !== null) {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be null.\"), null, actual);"," }"," },",""," /**"," * Asserts that a value is undefined. This uses the triple equals sign"," * so no type coercion may occur."," * @param {Object} actual The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isUndefined"," * @static"," */"," isUndefined : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual != \"undefined\") {"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be undefined.\"), undefined, actual);"," }"," },",""," //--------------------------------------------------------------------------"," // Instance Assertion Methods"," //--------------------------------------------------------------------------",""," /**"," * Asserts that a value is an array."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isArray"," * @static"," */"," isArray : function (actual, message) {"," YUITest.Assert._increment();"," var shouldFail = false;"," if (Array.isArray){"," shouldFail = !Array.isArray(actual);"," } else {"," shouldFail = Object.prototype.toString.call(actual) != \"[object Array]\";"," }"," if (shouldFail){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be an array.\"), actual);"," }"," },",""," /**"," * Asserts that a value is a Boolean."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isBoolean"," * @static"," */"," isBoolean : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual != \"boolean\"){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be a Boolean.\"), actual);"," }"," },",""," /**"," * Asserts that a value is a function."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isFunction"," * @static"," */"," isFunction : function (actual, message) {"," YUITest.Assert._increment();"," if (!(actual instanceof Function)){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be a function.\"), actual);"," }"," },",""," /**"," * Asserts that a value is an instance of a particular object. This may return"," * incorrect results when comparing objects from one frame to constructors in"," * another frame. For best results, don't use in a cross-frame manner."," * @param {Function} expected The function that the object should be an instance of."," * @param {Object} actual The object to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isInstanceOf"," * @static"," */"," isInstanceOf : function (expected, actual, message) {"," YUITest.Assert._increment();"," if (!(actual instanceof expected)){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value isn't an instance of expected type.\"), expected, actual);"," }"," },",""," /**"," * Asserts that a value is a number."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isNumber"," * @static"," */"," isNumber : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual != \"number\"){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be a number.\"), actual);"," }"," },",""," /**"," * Asserts that a value is an object."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isObject"," * @static"," */"," isObject : function (actual, message) {"," YUITest.Assert._increment();"," if (!actual || (typeof actual != \"object\" && typeof actual != \"function\")){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be an object.\"), actual);"," }"," },",""," /**"," * Asserts that a value is a string."," * @param {Object} actual The value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isString"," * @static"," */"," isString : function (actual, message) {"," YUITest.Assert._increment();"," if (typeof actual != \"string\"){"," throw new YUITest.UnexpectedValue(YUITest.Assert._formatMessage(message, \"Value should be a string.\"), actual);"," }"," },",""," /**"," * Asserts that a value is of a particular type."," * @param {String} expectedType The expected type of the variable."," * @param {Object} actualValue The actual value to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method isTypeOf"," * @static"," */"," isTypeOf : function (expectedType, actualValue, message){"," YUITest.Assert._increment();"," if (typeof actualValue != expectedType){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Value should be of type \" + expectedType + \".\"), expectedType, typeof actualValue);"," }"," },",""," //--------------------------------------------------------------------------"," // Error Detection Methods"," //--------------------------------------------------------------------------",""," /**"," * Asserts that executing a particular method should throw an error of"," * a specific type. This is a replacement for _should.error."," * @param {String|Function|Object} expectedError If a string, this"," * is the error message that the error must have; if a function, this"," * is the constructor that should have been used to create the thrown"," * error; if an object, this is an instance of a particular error type"," * with a specific error message (both must match)."," * @param {Function} method The method to execute that should throw the error."," * @param {String} message (Optional) The message to display if the assertion"," * fails."," * @method throwsError"," * @return {void}"," * @static"," */"," throwsError: function(expectedError, method, message){"," YUITest.Assert._increment();"," var error = false;",""," try {"," method();"," } catch (thrown) {",""," //check to see what type of data we have"," if (typeof expectedError == \"string\"){",""," //if it's a string, check the error message"," if (thrown.message != expectedError){"," error = true;"," }"," } else if (typeof expectedError == \"function\"){",""," //if it's a function, see if the error is an instance of it"," if (!(thrown instanceof expectedError)){"," error = true;"," }",""," } else if (typeof expectedError == \"object\" && expectedError !== null){",""," //if it's an object, check the instance and message"," if (!(thrown instanceof expectedError.constructor) ||"," thrown.message != expectedError.message){"," error = true;"," }",""," } else { //if it gets here, the argument could be wrong"," error = true;"," }",""," if (error){"," throw new YUITest.UnexpectedError(thrown);"," } else {"," return;"," }"," }",""," //if it reaches here, the error wasn't thrown, which is a bad thing"," throw new YUITest.AssertionError(YUITest.Assert._formatMessage(message, \"Error should have been thrown.\"));"," }","","};","/**"," * Error is thrown whenever an assertion fails. It provides methods"," * to more easily get at error information and also provides a base class"," * from which more specific assertion errors can be derived."," *"," * @param {String} message The message to display when the error occurs."," * @namespace Test"," * @module test"," * @class AssertionError"," * @constructor"," */","YUITest.AssertionError = function (message){",""," /**"," * Error message. Must be duplicated to ensure browser receives it."," * @type String"," * @property message"," */"," this.message = message;",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"Assert Error\";","};","","YUITest.AssertionError.prototype = {",""," //restore constructor"," constructor: YUITest.AssertionError,",""," /**"," * Returns a fully formatted error for an assertion failure. This should"," * be overridden by all subclasses to provide specific information."," * @method getMessage"," * @return {String} A string describing the error."," */"," getMessage : function () {"," return this.message;"," },",""," /**"," * Returns a string representation of the error."," * @method toString"," * @return {String} A string representation of the error."," */"," toString : function () {"," return this.name + \": \" + this.getMessage();"," }","","};","/**"," * ComparisonFailure is subclass of Error that is thrown whenever"," * a comparison between two values fails. It provides mechanisms to retrieve"," * both the expected and actual value."," *"," * @param {String} message The message to display when the error occurs."," * @param {Object} expected The expected value."," * @param {Object} actual The actual value that caused the assertion to fail."," * @namespace Test"," * @extends AssertionError"," * @module test"," * @class ComparisonFailure"," * @constructor"," */","YUITest.ComparisonFailure = function (message, expected, actual){",""," //call superclass"," YUITest.AssertionError.call(this, message);",""," /**"," * The expected value."," * @type Object"," * @property expected"," */"," this.expected = expected;",""," /**"," * The actual value."," * @type Object"," * @property actual"," */"," this.actual = actual;",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"ComparisonFailure\";","","};","","//inherit from YUITest.AssertionError","YUITest.ComparisonFailure.prototype = new YUITest.AssertionError;","","//restore constructor","YUITest.ComparisonFailure.prototype.constructor = YUITest.ComparisonFailure;","","/**"," * Returns a fully formatted error for an assertion failure. This message"," * provides information about the expected and actual values."," * @method getMessage"," * @return {String} A string describing the error."," */","YUITest.ComparisonFailure.prototype.getMessage = function(){"," return this.message + \"\\nExpected: \" + this.expected + \" (\" + (typeof this.expected) + \")\" +"," \"\\nActual: \" + this.actual + \" (\" + (typeof this.actual) + \")\";","};","/**"," * An object object containing coverage result formatting methods."," * @namespace Test"," * @module test"," * @class CoverageFormat"," * @static"," */","YUITest.CoverageFormat = {",""," /**"," * Returns the coverage report in JSON format. This is the straight"," * JSON representation of the native coverage report."," * @param {Object} coverage The coverage report object."," * @return {String} A JSON-formatted string of coverage data."," * @method JSON"," * @namespace Test.CoverageFormat"," */"," JSON: function(coverage){"," return YUITest.Util.JSON.stringify(coverage);"," },",""," /**"," * Returns the coverage report in a JSON format compatible with"," * Xdebug. See Xdebug Documentation"," * for more information. Note: function coverage is not available"," * in this format."," * @param {Object} coverage The coverage report object."," * @return {String} A JSON-formatted string of coverage data."," * @method XdebugJSON"," * @namespace Test.CoverageFormat"," */"," XdebugJSON: function(coverage){",""," var report = {};"," for (var prop in coverage){"," if (coverage.hasOwnProperty(prop)){"," report[prop] = coverage[prop].lines;"," }"," }",""," return YUITest.Util.JSON.stringify(coverage);"," }","","};","","","/**"," * The DateAssert object provides functions to test JavaScript Date objects"," * for a variety of cases."," * @namespace Test"," * @module test"," * @class DateAssert"," * @static"," */","","YUITest.DateAssert = {",""," /**"," * Asserts that a date's month, day, and year are equal to another date's."," * @param {Date} expected The expected date."," * @param {Date} actual The actual date to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method datesAreEqual"," * @static"," */"," datesAreEqual : function (expected, actual, message){"," YUITest.Assert._increment();"," if (expected instanceof Date && actual instanceof Date){"," var msg = \"\";",""," //check years first"," if (expected.getFullYear() != actual.getFullYear()){"," msg = \"Years should be equal.\";"," }",""," //now check months"," if (expected.getMonth() != actual.getMonth()){"," msg = \"Months should be equal.\";"," }",""," //last, check the day of the month"," if (expected.getDate() != actual.getDate()){"," msg = \"Days of month should be equal.\";"," }",""," if (msg.length){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, msg), expected, actual);"," }"," } else {"," throw new TypeError(\"YUITest.DateAssert.datesAreEqual(): Expected and actual values must be Date objects.\");"," }"," },",""," /**"," * Asserts that a date's hour, minutes, and seconds are equal to another date's."," * @param {Date} expected The expected date."," * @param {Date} actual The actual date to test."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method timesAreEqual"," * @static"," */"," timesAreEqual : function (expected, actual, message){"," YUITest.Assert._increment();"," if (expected instanceof Date && actual instanceof Date){"," var msg = \"\";",""," //check hours first"," if (expected.getHours() != actual.getHours()){"," msg = \"Hours should be equal.\";"," }",""," //now check minutes"," if (expected.getMinutes() != actual.getMinutes()){"," msg = \"Minutes should be equal.\";"," }",""," //last, check the seconds"," if (expected.getSeconds() != actual.getSeconds()){"," msg = \"Seconds should be equal.\";"," }",""," if (msg.length){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, msg), expected, actual);"," }"," } else {"," throw new TypeError(\"YUITest.DateAssert.timesAreEqual(): Expected and actual values must be Date objects.\");"," }"," }","","};","/**"," * Creates a new mock object."," * @namespace Test"," * @module test"," * @class Mock"," * @constructor"," * @param {Object} template (Optional) An object whose methods"," * should be stubbed out on the mock object."," */","YUITest.Mock = function(template){",""," //use blank object is nothing is passed in"," template = template || {};",""," var mock,"," name;",""," //try to create mock that keeps prototype chain intact"," //fails in the case of ActiveX objects"," try {"," function f(){}"," f.prototype = template;"," mock = new f();"," } catch (ex) {"," mock = {};"," }",""," //create stubs for all methods"," for (name in template){"," if (template.hasOwnProperty(name)){"," if (typeof template[name] == \"function\"){"," mock[name] = function(name){"," return function(){"," YUITest.Assert.fail(\"Method \" + name + \"() was called but was not expected to be.\");"," };"," }(name);"," }"," }"," }",""," //return it"," return mock;","};","","/**"," * Assigns an expectation to a mock object. This is used to create"," * methods and properties on the mock object that are monitored for"," * calls and changes, respectively."," * @param {Object} mock The object to add the expectation to."," * @param {Object} expectation An object defining the expectation. For"," * properties, the keys \"property\" and \"value\" are required. For a"," * method the \"method\" key defines the method's name, the optional \"args\""," * key provides an array of argument types. The \"returns\" key provides"," * an optional return value. An optional \"run\" key provides a function"," * to be used as the method body. The return value of a mocked method is"," * determined first by the \"returns\" key, then the \"run\" function's return"," * value. If neither \"returns\" nor \"run\" is provided undefined is returned."," * An optional 'error' key defines an error type to be thrown in all cases."," * The \"callCount\" key provides an optional number of times the method is"," * expected to be called (the default is 1)."," * @return {void}"," * @method expect"," * @static"," */","YUITest.Mock.expect = function(mock /*:Object*/, expectation /*:Object*/){",""," //make sure there's a place to store the expectations"," if (!mock.__expectations) {"," mock.__expectations = {};"," }",""," //method expectation"," if (expectation.method){"," var name = expectation.method,"," args = expectation.args || [],"," result = expectation.returns,"," callCount = (typeof expectation.callCount == \"number\") ? expectation.callCount : 1,"," error = expectation.error,"," run = expectation.run || function(){},"," runResult,"," i;",""," //save expectations"," mock.__expectations[name] = expectation;"," expectation.callCount = callCount;"," expectation.actualCallCount = 0;",""," //process arguments"," for (i=0; i < args.length; i++){"," if (!(args[i] instanceof YUITest.Mock.Value)){"," args[i] = YUITest.Mock.Value(YUITest.Assert.areSame, [args[i]], \"Argument \" + i + \" of \" + name + \"() is incorrect.\");"," }"," }",""," //if the method is expected to be called"," if (callCount > 0){"," mock[name] = function(){"," try {"," expectation.actualCallCount++;"," YUITest.Assert.areEqual(args.length, arguments.length, \"Method \" + name + \"() passed incorrect number of arguments.\");"," for (var i=0, len=args.length; i < len; i++){"," args[i].verify(arguments[i]);"," }",""," runResult = run.apply(this, arguments);",""," if (error){"," throw error;"," }"," } catch (ex){"," //route through TestRunner for proper handling"," YUITest.TestRunner._handleError(ex);"," }",""," // Any value provided for 'returns' overrides any value returned"," // by our 'run' function."," return expectation.hasOwnProperty('returns') ? result : runResult;"," };"," } else {",""," //method should fail if called when not expected"," mock[name] = function(){"," try {"," YUITest.Assert.fail(\"Method \" + name + \"() should not have been called.\");"," } catch (ex){"," //route through TestRunner for proper handling"," YUITest.TestRunner._handleError(ex);"," }"," };"," }"," } else if (expectation.property){"," //save expectations"," mock.__expectations[expectation.property] = expectation;"," }","};","","/**"," * Verifies that all expectations of a mock object have been met and"," * throws an assertion error if not."," * @param {Object} mock The object to verify.."," * @return {void}"," * @method verify"," * @static"," */","YUITest.Mock.verify = function(mock){"," try {",""," for (var name in mock.__expectations){"," if (mock.__expectations.hasOwnProperty(name)){"," var expectation = mock.__expectations[name];"," if (expectation.method) {"," YUITest.Assert.areEqual(expectation.callCount, expectation.actualCallCount, \"Method \" + expectation.method + \"() wasn't called the expected number of times.\");"," } else if (expectation.property){"," YUITest.Assert.areEqual(expectation.value, mock[expectation.property], \"Property \" + expectation.property + \" wasn't set to the correct value.\");"," }"," }"," }",""," } catch (ex){"," //route through TestRunner for proper handling"," YUITest.TestRunner._handleError(ex);"," }","};","","/**"," * Creates a new value matcher."," * @param {Function} method The function to call on the value."," * @param {Array} originalArgs (Optional) Array of arguments to pass to the method."," * @param {String} message (Optional) Message to display in case of failure."," * @namespace Test.Mock"," * @module test"," * @class Value"," * @constructor"," */","YUITest.Mock.Value = function(method, originalArgs, message){"," if (this instanceof YUITest.Mock.Value){"," this.verify = function(value){"," var args = [].concat(originalArgs || []);"," args.push(value);"," args.push(message);"," method.apply(null, args);"," };"," } else {"," return new YUITest.Mock.Value(method, originalArgs, message);"," }","};","","/**"," * Predefined matcher to match any value."," * @property Any"," * @static"," * @type Function"," */","YUITest.Mock.Value.Any = YUITest.Mock.Value(function(){});","","/**"," * Predefined matcher to match boolean values."," * @property Boolean"," * @static"," * @type Function"," */","YUITest.Mock.Value.Boolean = YUITest.Mock.Value(YUITest.Assert.isBoolean);","","/**"," * Predefined matcher to match number values."," * @property Number"," * @static"," * @type Function"," */","YUITest.Mock.Value.Number = YUITest.Mock.Value(YUITest.Assert.isNumber);","","/**"," * Predefined matcher to match string values."," * @property String"," * @static"," * @type Function"," */","YUITest.Mock.Value.String = YUITest.Mock.Value(YUITest.Assert.isString);","","/**"," * Predefined matcher to match object values."," * @property Object"," * @static"," * @type Function"," */","YUITest.Mock.Value.Object = YUITest.Mock.Value(YUITest.Assert.isObject);","","/**"," * Predefined matcher to match function values."," * @property Function"," * @static"," * @type Function"," */","YUITest.Mock.Value.Function = YUITest.Mock.Value(YUITest.Assert.isFunction);","","/**"," * The ObjectAssert object provides functions to test JavaScript objects"," * for a variety of cases."," * @namespace Test"," * @module test"," * @class ObjectAssert"," * @static"," */","YUITest.ObjectAssert = {",""," /**"," * Asserts that an object has all of the same properties"," * and property values as the other."," * @param {Object} expected The object with all expected properties and values."," * @param {Object} actual The object to inspect."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method areEqual"," * @static"," * @deprecated"," */"," areEqual: function(expected, actual, message) {"," YUITest.Assert._increment();",""," var expectedKeys = YUITest.Object.keys(expected),"," actualKeys = YUITest.Object.keys(actual);",""," //first check keys array length"," if (expectedKeys.length != actualKeys.length){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Object should have \" + expectedKeys.length + \" keys but has \" + actualKeys.length));"," }",""," //then check values"," for (var name in expected){"," if (expected.hasOwnProperty(name)){"," if (expected[name] != actual[name]){"," throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(message, \"Values should be equal for property \" + name), expected[name], actual[name]);"," }"," }"," }"," },",""," /**"," * Asserts that an object has a property with the given name."," * @param {String} propertyName The name of the property to test."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method hasKey"," * @static"," * @deprecated Use ownsOrInheritsKey() instead"," */"," hasKey: function (propertyName, object, message) {"," YUITest.ObjectAssert.ownsOrInheritsKey(propertyName, object, message);"," },",""," /**"," * Asserts that an object has all properties of a reference object."," * @param {Array} properties An array of property names that should be on the object."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method hasKeys"," * @static"," * @deprecated Use ownsOrInheritsKeys() instead"," */"," hasKeys: function (properties, object, message) {"," YUITest.ObjectAssert.ownsOrInheritsKeys(properties, object, message);"," },",""," /**"," * Asserts that a property with the given name exists on an object's prototype."," * @param {String} propertyName The name of the property to test."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method inheritsKey"," * @static"," */"," inheritsKey: function (propertyName, object, message) {"," YUITest.Assert._increment();"," if (!(propertyName in object && !object.hasOwnProperty(propertyName))){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + propertyName + \"' not found on object instance.\"));"," }"," },",""," /**"," * Asserts that all properties exist on an object prototype."," * @param {Array} properties An array of property names that should be on the object."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method inheritsKeys"," * @static"," */"," inheritsKeys: function (properties, object, message) {"," YUITest.Assert._increment();"," for (var i=0; i < properties.length; i++){"," if (!(propertyName in object && !object.hasOwnProperty(properties[i]))){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + properties[i] + \"' not found on object instance.\"));"," }"," }"," },",""," /**"," * Asserts that a property with the given name exists on an object instance (not on its prototype)."," * @param {String} propertyName The name of the property to test."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsKey"," * @static"," */"," ownsKey: function (propertyName, object, message) {"," YUITest.Assert._increment();"," if (!object.hasOwnProperty(propertyName)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + propertyName + \"' not found on object instance.\"));"," }"," },",""," /**"," * Asserts that all properties exist on an object instance (not on its prototype)."," * @param {Array} properties An array of property names that should be on the object."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsKeys"," * @static"," */"," ownsKeys: function (properties, object, message) {"," YUITest.Assert._increment();"," for (var i=0; i < properties.length; i++){"," if (!object.hasOwnProperty(properties[i])){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + properties[i] + \"' not found on object instance.\"));"," }"," }"," },",""," /**"," * Asserts that an object owns no properties."," * @param {Object} object The object to check."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsNoKeys"," * @static"," */"," ownsNoKeys : function (object, message) {"," YUITest.Assert._increment();"," var count = YUITest.Object.keys(object).length;",""," if (count !== 0){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Object owns \" + count + \" properties but should own none.\"));"," }",""," },",""," /**"," * Asserts that an object has a property with the given name."," * @param {String} propertyName The name of the property to test."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsOrInheritsKey"," * @static"," */"," ownsOrInheritsKey: function (propertyName, object, message) {"," YUITest.Assert._increment();"," if (!(propertyName in object)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + propertyName + \"' not found on object.\"));"," }"," },",""," /**"," * Asserts that an object has all properties of a reference object."," * @param {Array} properties An array of property names that should be on the object."," * @param {Object} object The object to search."," * @param {String} message (Optional) The message to display if the assertion fails."," * @method ownsOrInheritsKeys"," * @static"," */"," ownsOrInheritsKeys: function (properties, object, message) {"," YUITest.Assert._increment();"," for (var i=0; i < properties.length; i++){"," if (!(properties[i] in object)){"," YUITest.Assert.fail(YUITest.Assert._formatMessage(message, \"Property '\" + properties[i] + \"' not found on object.\"));"," }"," }"," }","};","/**"," * Convenience type for storing and aggregating"," * test result information."," * @private"," * @namespace Test"," * @module test"," * @class Results"," * @constructor"," * @param {String} name The name of the test."," */","YUITest.Results = function(name){",""," /**"," * Name of the test, test case, or test suite."," * @type String"," * @property name"," */"," this.name = name;",""," /**"," * Number of passed tests."," * @type int"," * @property passed"," */"," this.passed = 0;",""," /**"," * Number of failed tests."," * @type int"," * @property failed"," */"," this.failed = 0;",""," /**"," * Number of errors that occur in non-test methods."," * @type int"," * @property errors"," */"," this.errors = 0;",""," /**"," * Number of ignored tests."," * @type int"," * @property ignored"," */"," this.ignored = 0;",""," /**"," * Number of total tests."," * @type int"," * @property total"," */"," this.total = 0;",""," /**"," * Amount of time (ms) it took to complete testing."," * @type int"," * @property duration"," */"," this.duration = 0;","};","","/**"," * Includes results from another results object into this one."," * @param {Test.Results} result The results object to include."," * @method include"," * @return {void}"," */","YUITest.Results.prototype.include = function(results){"," this.passed += results.passed;"," this.failed += results.failed;"," this.ignored += results.ignored;"," this.total += results.total;"," this.errors += results.errors;","};","/**"," * ShouldError is subclass of Error that is thrown whenever"," * a test is expected to throw an error but doesn't."," *"," * @param {String} message The message to display when the error occurs."," * @namespace Test"," * @extends AssertionError"," * @module test"," * @class ShouldError"," * @constructor"," */","YUITest.ShouldError = function (message){",""," //call superclass"," YUITest.AssertionError.call(this, message || \"This test should have thrown an error but didn't.\");",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"ShouldError\";","","};","","//inherit from YUITest.AssertionError","YUITest.ShouldError.prototype = new YUITest.AssertionError();","","//restore constructor","YUITest.ShouldError.prototype.constructor = YUITest.ShouldError;","/**"," * ShouldFail is subclass of AssertionError that is thrown whenever"," * a test was expected to fail but did not."," *"," * @param {String} message The message to display when the error occurs."," * @namespace Test"," * @extends YUITest.AssertionError"," * @module test"," * @class ShouldFail"," * @constructor"," */","YUITest.ShouldFail = function (message){",""," //call superclass"," YUITest.AssertionError.call(this, message || \"This test should fail but didn't.\");",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"ShouldFail\";","","};","","//inherit from YUITest.AssertionError","YUITest.ShouldFail.prototype = new YUITest.AssertionError();","","//restore constructor","YUITest.ShouldFail.prototype.constructor = YUITest.ShouldFail;","/**"," * UnexpectedError is subclass of AssertionError that is thrown whenever"," * an error occurs within the course of a test and the test was not expected"," * to throw an error."," *"," * @param {Error} cause The unexpected error that caused this error to be"," * thrown."," * @namespace Test"," * @extends YUITest.AssertionError"," * @module test"," * @class UnexpectedError"," * @constructor"," */","YUITest.UnexpectedError = function (cause){",""," //call superclass"," YUITest.AssertionError.call(this, \"Unexpected error: \" + cause.message);",""," /**"," * The unexpected error that occurred."," * @type Error"," * @property cause"," */"," this.cause = cause;",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"UnexpectedError\";",""," /**"," * Stack information for the error (if provided)."," * @type String"," * @property stack"," */"," this.stack = cause.stack;","","};","","//inherit from YUITest.AssertionError","YUITest.UnexpectedError.prototype = new YUITest.AssertionError();","","//restore constructor","YUITest.UnexpectedError.prototype.constructor = YUITest.UnexpectedError;","/**"," * UnexpectedValue is subclass of Error that is thrown whenever"," * a value was unexpected in its scope. This typically means that a test"," * was performed to determine that a value was *not* equal to a certain"," * value."," *"," * @param {String} message The message to display when the error occurs."," * @param {Object} unexpected The unexpected value."," * @namespace Test"," * @extends AssertionError"," * @module test"," * @class UnexpectedValue"," * @constructor"," */","YUITest.UnexpectedValue = function (message, unexpected){",""," //call superclass"," YUITest.AssertionError.call(this, message);",""," /**"," * The unexpected value."," * @type Object"," * @property unexpected"," */"," this.unexpected = unexpected;",""," /**"," * The name of the error that occurred."," * @type String"," * @property name"," */"," this.name = \"UnexpectedValue\";","","};","","//inherit from YUITest.AssertionError","YUITest.UnexpectedValue.prototype = new YUITest.AssertionError();","","//restore constructor","YUITest.UnexpectedValue.prototype.constructor = YUITest.UnexpectedValue;","","/**"," * Returns a fully formatted error for an assertion failure. This message"," * provides information about the expected and actual values."," * @method getMessage"," * @return {String} A string describing the error."," */","YUITest.UnexpectedValue.prototype.getMessage = function(){"," return this.message + \"\\nUnexpected: \" + this.unexpected + \" (\" + (typeof this.unexpected) + \") \";","};","","/**"," * Represents a stoppage in test execution to wait for an amount of time before"," * continuing."," * @param {Function} segment A function to run when the wait is over."," * @param {int} delay The number of milliseconds to wait before running the code."," * @module test"," * @class Wait"," * @namespace Test"," * @constructor"," *"," */","YUITest.Wait = function (segment, delay) {",""," /**"," * The segment of code to run when the wait is over."," * @type Function"," * @property segment"," */"," this.segment = (typeof segment == \"function\" ? segment : null);",""," /**"," * The delay before running the segment of code."," * @type int"," * @property delay"," */"," this.delay = (typeof delay == \"number\" ? delay : 0);","};","","","//Setting up our aliases..","Y.Test = YUITest;","Y.Object.each(YUITest, function(item, name) {"," var name = name.replace('Test', '');"," Y.Test[name] = item;","});","","} //End of else in top wrapper","","Y.Assert = YUITest.Assert;","Y.Assert.Error = Y.Test.AssertionError;","Y.Assert.ComparisonFailure = Y.Test.ComparisonFailure;","Y.Assert.UnexpectedValue = Y.Test.UnexpectedValue;","Y.Mock = Y.Test.Mock;","Y.ObjectAssert = Y.Test.ObjectAssert;","Y.ArrayAssert = Y.Test.ArrayAssert;","Y.DateAssert = Y.Test.DateAssert;","Y.Test.ResultsFormat = Y.Test.TestFormat;","","var itemsAreEqual = Y.Test.ArrayAssert.itemsAreEqual;","","Y.Test.ArrayAssert.itemsAreEqual = function(expected, actual, message) {"," return itemsAreEqual.call(this, Y.Array(expected), Y.Array(actual), message);","};","","","/**"," * Asserts that a given condition is true. If not, then a Y.Assert.Error object is thrown"," * and the test fails."," * @method assert"," * @param {Boolean} condition The condition to test."," * @param {String} message The message to display if the assertion fails."," * @for YUI"," * @static"," */","Y.assert = function(condition, message){"," Y.Assert._increment();"," if (!condition){"," throw new Y.Assert.Error(Y.Assert._formatMessage(message, \"Assertion failed.\"));"," }","};","","/**"," * Forces an assertion error to occur. Shortcut for Y.Assert.fail()."," * @method fail"," * @param {String} message (Optional) The message to display with the failure."," * @for YUI"," * @static"," */","Y.fail = Y.Assert.fail;","","Y.Test.Runner.once = Y.Test.Runner.subscribe;","","Y.Test.Runner.disableLogging = function() {"," Y.Test.Runner._log = false;","};","","Y.Test.Runner.enableLogging = function() {"," Y.Test.Runner._log = true;","};","","Y.Test.Runner._ignoreEmpty = true;","Y.Test.Runner._log = true;","","Y.Test.Runner.on = Y.Test.Runner.attach;","","//Only allow one instance of YUITest","if (!YUI.YUITest) {",""," if (Y.config.win) {"," Y.config.win.YUITest = YUITest;"," }",""," YUI.YUITest = Y.Test;","",""," //Only setup the listeners once."," var logEvent = function(event) {",""," //data variables"," var message = \"\";"," var messageType = \"\";",""," switch(event.type){"," case this.BEGIN_EVENT:"," message = \"Testing began at \" + (new Date()).toString() + \".\";"," messageType = \"info\";"," break;",""," case this.COMPLETE_EVENT:"," message = Y.Lang.sub(\"Testing completed at \" +"," (new Date()).toString() + \".\\n\" +"," \"Passed:{passed} Failed:{failed} \" +"," \"Total:{total} ({ignored} ignored)\","," event.results);"," messageType = \"info\";"," break;",""," case this.TEST_FAIL_EVENT:"," message = event.testName + \": failed.\\n\" + event.error.getMessage();"," messageType = \"fail\";"," break;",""," case this.TEST_IGNORE_EVENT:"," message = event.testName + \": ignored.\";"," messageType = \"ignore\";"," break;",""," case this.TEST_PASS_EVENT:"," message = event.testName + \": passed.\";"," messageType = \"pass\";"," break;",""," case this.TEST_SUITE_BEGIN_EVENT:"," message = \"Test suite \\\"\" + event.testSuite.name + \"\\\" started.\";"," messageType = \"info\";"," break;",""," case this.TEST_SUITE_COMPLETE_EVENT:"," message = Y.Lang.sub(\"Test suite \\\"\" +"," event.testSuite.name + \"\\\" completed\" + \".\\n\" +"," \"Passed:{passed} Failed:{failed} \" +"," \"Total:{total} ({ignored} ignored)\","," event.results);"," messageType = \"info\";"," break;",""," case this.TEST_CASE_BEGIN_EVENT:"," message = \"Test case \\\"\" + event.testCase.name + \"\\\" started.\";"," messageType = \"info\";"," break;",""," case this.TEST_CASE_COMPLETE_EVENT:"," message = Y.Lang.sub(\"Test case \\\"\" +"," event.testCase.name + \"\\\" completed.\\n\" +"," \"Passed:{passed} Failed:{failed} \" +"," \"Total:{total} ({ignored} ignored)\","," event.results);"," messageType = \"info\";"," break;"," default:"," message = \"Unexpected event \" + event.type;"," messageType = \"info\";"," }",""," if (Y.Test.Runner._log) {"," Y.log(message, messageType, \"TestRunner\");"," }"," };",""," var i, name;",""," for (i in Y.Test.Runner) {"," name = Y.Test.Runner[i];"," if (i.indexOf('_EVENT') > -1) {"," Y.Test.Runner.subscribe(name, logEvent);"," }"," };","","} //End if for YUI.YUITest","","","}, '@VERSION@', {\"requires\": [\"event-simulate\", \"event-custom\", \"json-stringify\"]});","","}());"]};
}
var __cov_TeRIN2AFOKo7DPJwb_FdtQ = __coverage__['build/test/test.js'];
-__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['1']++;YUI.add('test',function(Y,NAME){__cov_TeRIN2AFOKo7DPJwb_FdtQ.f['1']++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['2']++;if(YUI.YUITest){__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['1'][0]++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['3']++;Y.Test=YUI.YUITest;}else{__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['1'][1]++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['4']++;YUITest={version:'@VERSION@',guid:function(pre){__cov_TeRIN2AFOKo7DPJwb_FdtQ.f['2']++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['5']++;return Y.guid(pre);}};__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['6']++;Y.namespace('Test');__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['7']++;YUITest.Object=Y.Object;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['8']++;YUITest.Array=Y.Array;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['9']++;YUITest.Util={mix:Y.mix,JSON:Y.JSON};__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['10']++;YUITest.EventTarget=function(){__cov_TeRIN2AFOKo7DPJwb_FdtQ.f['3']++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['11']++;this._handlers={};};__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['12']++;YUITest.EventTarget.prototype={constructor:YUITest.EventTarget,attach:function(type,listener){__cov_TeRIN2AFOKo7DPJwb_FdtQ.f['4']++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['13']++;if(typeof this._handlers[type]=='undefined'){__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['2'][0]++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['14']++;this._handlers[type]=[];}else{__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['2'][1]++;}__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['15']++;this._handlers[type].push(listener);},subscribe:function(type,listener){__cov_TeRIN2AFOKo7DPJwb_FdtQ.f['5']++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['16']++;this.attach.apply(this,arguments);},fire:function(event){__cov_TeRIN2AFOKo7DPJwb_FdtQ.f['6']++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['17']++;if(typeof event=='string'){__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['3'][0]++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['18']++;event={type:event};}else{__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['3'][1]++;}__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['19']++;if(!event.target){__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['4'][0]++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['20']++;event.target=this;}else{__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['4'][1]++;}__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['21']++;if(!event.type){__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['5'][0]++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['22']++;throw new Error('Event object missing \'type\' property.');}else{__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['5'][1]++;}__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['23']++;if(this._handlers[event.type]instanceof Array){__cov_TeRIN2AFOKo7DPJwb_FdtQ.b['6'][0]++;__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['24']++;var handlers=this._handlers[event.type];__cov_TeRIN2AFOKo7DPJwb_FdtQ.s['25']++;for(var i=0,len=handlers.length;i+ The `datatable-keynav` optional module provides navigation within the DataTable using + the keyboard. It is based on the WAI-ARIA suggested keyboard interaction for + the Grid Widget, + though it does not assign aria roles, states or other accessibility features + to the table. +
+ ++ Two attributes control the behaviour of the module. The `keyActions` property + contains a mapping of keys to actions to be performed. It is initially loaded + with a copy of the set of actions stored in the static `Y.DataTable.KeyNav.ARIA_ACTIONS` + table but can easily be modified or completely replaced. +
++ As a key, each entry in the table uses a key code or any of the predefined strings in the + static + `Y.DataTable.KeyNav.KEY_NAMES` table, optionally preceeded by the + `alt`, `ctrl`, `meta` or `shift` modifier keys, each followed by a hyphen. + Multiple modifier keys can be specified, but they always have to be given + in alphabetical order, for example: `'ctrl-shift-up': `. + When a key has an alias in `KEY_NAMES` the alias must be used and not the numerical keycode. +
++ Each entry in the `keyActions` table contains either a function or a string. + The function will be executed when the key combination used as the key for the entry + is detected. It will receive the Event Facade of the `keydown` event as its + only argument. If the argument is a string it will try to resolve it to + a method within that DataTable instance by that name and execute it, ie.: `this[name].call(this, e)`. +
++ If the entry is a string and cannot be resolved into a method, it will assume + it is the name of an event to fire. The event listener will be provided with + references to the focused cell (a Node instance), the row (the `tr` Node) + and column where it is contained. If the cell is a data cell it will also + contain a reference to the record while for header rows it will be null. + The listener will also receive the original EventFacade of the `keydown` + event as its second argument. +
+``` +var dt = new Y.DataTable({...}); + +// Add an event in response to pressing shift-space +dt.keyActions['shift-space'] = 'shiftSpaceEvent'; + +// You can now subscribe to that event +dt.on('shiftSpaceEvent', function (ev, keyEv) { + // The first event facade will contain the following properties: + console.log(ev.cell, ev.row, ev.column, ev.record); + + // The second event facade is the original for keydown: + console.log(keyEv.keyCode, keyEv.shiftKey); + + // The listener may call the keydown event facade methods: + keyEv.preventDefault(); +}); +``` ++ The `keyIntoHeaders` attribute determines whether navigating into the header + cells is possible. If set, the default, the first header cell will initially + receive the focus and navigation in between the header and data sections of + the table is possible. If false, the first data cell will be initially + focused and navigation into the header section is not possible. +
++ The `focusedCell` attribute holds a reference to the cell that has the focus + or that would have the focus if the DataTable gets tabbed into. + Setting `focusedCell` will bring the focus into that cell. +
+ +diff --git a/src/datatable/js/keynav.js b/src/datatable/js/keynav.js new file mode 100644 index 00000000000..d948a95b390 --- /dev/null +++ b/src/datatable/js/keynav.js @@ -0,0 +1,701 @@ +/** + Provides keyboard navigation of DataTable cells and support for adding other + keyboard actions. + + @module datatable + @submodule datatable-keynav +*/ +var arrEach = Y.Array.each, + +/** + A DataTable class extension that provides navigation via keyboard, based on + WAI-ARIA recommendation for the [Grid widget](http://www.w3.org/WAI/PF/aria-practices/#grid) + and extensible to support other actions. + + + @class DataTable.KeyNav + @for DataTable +*/ + DtKeyNav = function (){}; + +/** +Mapping of key codes to friendly key names that can be used in the +[keyActions](#property_keyActions) property and [ARIA_ACTIONS](#property_ARIA_ACTIONS) +property. + +It contains aliases for the following keys: +
The Date module of the DataType Utility allows you to take a `String` or a `Number` (in milliseconds) value and convert it to `Date`. The `parse()` method will accept any `String` or `Number` value supported by JavaScript's `Date()` constructor.
++ The Date module of the DataType Utility allows you to take a `String` or a `Number` (in milliseconds) value and convert it to `Date`. + If no format is provided, the `parse()` method will accept any `String` or `Number` value supported by + JavaScript's `Date()` constructor. +
Under the hood, the data value is converted to a date via the `Date()` constructor:
- -``` -YUI().use("datatype-date", function(Y) { - // These all return dates - var date = Y.Date.parse("December 17, 1995 03:24:00"); - date = Y.Date.parse(948548583); -}); -``` +A choice of a few format specifications has been provided in the dropdown box. +The date in the example above requires no format since it is natively understood +by the `Date()` constructor. Alternatively, `format` could have been given +as `"%b %D, %Y"`
diff --git a/src/datatype/docs/datatype-numberparse.mustache b/src/datatype/docs/datatype-numberparse.mustache index 6428c9c1af9..d947c6f7232 100644 --- a/src/datatype/docs/datatype-numberparse.mustache +++ b/src/datatype/docs/datatype-numberparse.mustache @@ -39,3 +39,40 @@ YUI().use("datatype-number", function(Y) { }); ``` +A configuration argument can be added to deal with these numbers.
+``` +YUI().use("datatype-number", function(Y) { + var output = Y.Number.parse("$100", { + prefix:'$' + }); + // output is 100 + + output = Y.Number.parse("20 dollars", { + suffix: 'dollars' + }); + // output is 20 + + output = Y.Number.parse("3,000,000.12" ,{ + thousandsSeparator: ',' + }); + // output is 3000000.12 + + output = Y.Number.parse(new Date("Jan 1, 2000")); + // output is 946713600000 + +}); +``` ++The following example uses the following configuration: +
+``` +{ + decimalSeparator: ',', + thousandsSeparator: '.', + prefix: '€', + suffix: '(EUR)' +} +``` +- The DataType Utility is a collection of classes that provide type-conversion and + The DataType Utility is a collection of classes that provide type-conversion and string-formatting convenience methods for numbers, dates, and XML documents.
- Y.Date.parse()
accepts any single value supported by the
- JavaScript Date()
constructor and converts it to a Date
- object. Invalid values will return null.
+ Y.Date.parse()
accepts a value and, optionally, a formatting
+ specification and converts it to a Date
+ object. If no format is given, it will pass the value to the
+ JavaScript Date()
constructor. Invalid values will return null.
+The `parser` function can accept the same format specification as `Y.Date.format`. +Ideally, using the same formatting specification, the two operations should +be complementary. The `parser` method, however is more tolerant, it accepts +any number of spaces in between the parts of the date, is case-insensitive +and does not require leading zeros even when the format says so. +
++The `parser` function accepts an optional third argument, a `cutoff` year. +When years are given as two digits, those values below the cutoff year will +have 2000 added to them, those above, 1900. If `cutoff` is passed as null, +the date will be taken as is. The `cutoff` defaults to 30. +
+``` +var date1 = Y.Date.parse("00-1-1", "%F"); // Assumes Jan 1st, 2000 + +var date2 = Y.Date.parse("40-1-1", "%F"); // Assumes Jan 1st, 1940 + +var date3 = Y.Date.parse("140-1-1", "%F"); // No guessing: Jan 1st, 140 + +var date4 = Y.Date.parse("40-1-1", "%F", null); // No guessing: Jan 1st, 40 + +``` ++For the purpose of the calculation, `parser` ignores the parts that do not +provide sufficient information on their own such as the names of the day of the week. +However, they are required to be present in the input string. +
++The `%Z` format or the composite formats that use it, such as `%c` in the `en` locale +have limited support. It relies on a table of time zone names and abbreviations +which would be too heavy to fully load. The module has the table filled with +a minimal set of North American and European abbreviations. +
++It is suggested that the developer uses different formatting specifications when +simply displaying a date and when editing it. For displaying purposes, the format +can add more information (such as the weekday) and extra decoration. For editing +purposes, the format should be simpler so as not to force the user to type so +much, and it should be easier and unambiguous to the parser. +
+An optional configuration can be added, compatible with that of `Y.Number.format`. +If found, any prefix, suffix, thousands separators and whitespaces will be deleted, +the decimal separator will be replaced by a dot and the resulting string parsed. +The `decimalPlaces` property is ignored and is meant for compatibility with `format`. +
+``` +Y.log(Y.Number.parse(" € 123.123.123,176 (EUR) ",{ + prefix: "€", + thousandsSeparator: ".", + decimalSeparator: ",", + decimalPlaces: 2, + suffix: " (EUR)" +})); +```- * Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at - * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html - * PHP added a few of its own, defined at http://www.php.net/strftime - *
- *- * This javascript implementation supports all the PHP specifiers and a few more. The full list is below. - *
- *- * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d. - *
- *+ * Any strftime string is supported, such as "%I:%M:%S %p". strftime has several format specifiers defined by the Open group at + * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html + * PHP added a few of its own, defined at http://www.php.net/strftime + *
+ *+ * This javascript implementation supports all the PHP specifiers and a few more. The full list is below. + *
+ *+ * If not specified, it defaults to the ISO 8601 standard date format: %Y-%m-%d. + *
+ *this is a test
')); Assert.areEqual('P', node.lastChild.nodeName, "Y.DOM.create('this is a test
')"); }, + + test_selectedIndex: function() { + var node = document.createElement("select"); + + Y.DOM.addHTML(node, + '' + + '' + + '' + ); + + Assert.areEqual(node.selectedIndex, 1); + }, testToHex: function() { var rgb = 'rgb(97, 11, 11)', diff --git a/src/loader/js/yui3.js b/src/loader/js/yui3.js index 2fc9ff2818c..5655f8f74f8 100644 --- a/src/loader/js/yui3.js +++ b/src/loader/js/yui3.js @@ -921,6 +921,11 @@ Y.mix(YUI.Env[Y.version].modules, { ], "skinnable": true }, + "datatable-keynav": { + "requires": [ + "datatable-base" + ] + }, "datatable-message": { "lang": [ "en", @@ -1099,7 +1104,11 @@ Y.mix(YUI.Env[Y.version].modules, { ] }, "datatype-number-format": {}, - "datatype-number-parse": {}, + "datatype-number-parse": { + "requires": [ + "escape" + ] + }, "datatype-xml": { "use": [ "datatype-xml-parse", @@ -2961,4 +2970,4 @@ Y.mix(YUI.Env[Y.version].modules, { ] } }); -YUI.Env[Y.version].md5 = '3cf02e5f307a6e9470df4ea0dc7eb41e'; +YUI.Env[Y.version].md5 = '7becfe88413f127e331d461de8ec774c'; diff --git a/src/loader/js/yui3.json b/src/loader/js/yui3.json index d8897b03333..75e25f0b607 100644 --- a/src/loader/js/yui3.json +++ b/src/loader/js/yui3.json @@ -889,6 +889,11 @@ ], "skinnable": true }, + "datatable-keynav": { + "requires": [ + "datatable-base" + ] + }, "datatable-message": { "lang": [ "en", @@ -1067,7 +1072,11 @@ ] }, "datatype-number-format": {}, - "datatype-number-parse": {}, + "datatype-number-parse": { + "requires": [ + "escape" + ] + }, "datatype-xml": { "use": [ "datatype-xml-parse", diff --git a/src/loader/tests/cli/loader.js b/src/loader/tests/cli/loader.js index af6ab037fb0..7cc3885147f 100644 --- a/src/loader/tests/cli/loader.js +++ b/src/loader/tests/cli/loader.js @@ -1225,6 +1225,16 @@ suite.add(new YUITest.TestCase({ //Testing A normal module Assert.isTrue((loader.sorted.indexOf("datatable-highlight")) > -1, "Module (datatable-highlight) not found in sorted array"); }, + "Testing datatable-keynav": function(data) { + var loader = new Y.Loader({ + require: ["datatable-keynav"], + ignoreRegistered: true, + allowRollup: false + }); + loader.calculate(); + //Testing A normal module + Assert.isTrue((loader.sorted.indexOf("datatable-keynav")) > -1, "Module (datatable-keynav) not found in sorted array"); + }, "Testing datatable-message": function(data) { var loader = new Y.Loader({ require: ["datatable-message"], diff --git a/src/number/HISTORY.md b/src/number/HISTORY.md index 3340c455292..d627a634978 100644 --- a/src/number/HISTORY.md +++ b/src/number/HISTORY.md @@ -1,10 +1,8 @@ Number Change History ===================== - @VERSION@ ------ - -* No changes. +* PR #587 Parse can now parse all the formats that format can produce. 3.13.0 ------ diff --git a/src/number/js/number-parse.js b/src/number/js/number-parse.js index ac861195fb5..9cc25c4981d 100755 --- a/src/number/js/number-parse.js +++ b/src/number/js/number-parse.js @@ -6,26 +6,93 @@ * @for Number */ -var LANG = Y.Lang; +var safe = Y.Escape.regex, + SPACES = '\\s*'; Y.mix(Y.namespace("Number"), { + /** + * Returns a parsing function for the given configuration. + * It uses `Y.cached` so it expects the format spec separated into + * individual values. + * The method further uses closure to put together and save the + * regular expresssion just once in the outer function. + * + * @method _buildParser + * @param [prefix] {String} Prefix string to be stripped out. + * @param [suffix] {String} Suffix string to be stripped out. + * @param [separator] {String} Thousands separator to be stripped out. + * @param [decimal] {String} Decimal separator to be replaced by a dot. + * @return {Function} Parsing function. + * @private + */ + _buildParser: Y.cached(function (prefix, suffix, separator, decimal) { + var regexBits = [], + regex; + + if (prefix) { + regexBits.push('^' + SPACES + safe(prefix) + SPACES); + } + if (suffix) { + regexBits.push(SPACES + safe(suffix) + SPACES + '$'); + } + if (separator) { + regexBits.push(safe(separator) + '(?=\\d)'); + } + + regex = new RegExp('(?:' + regexBits.join('|') + ')', 'g'); + + if (decimal === '.') { + decimal = null; + } + return function (val) { + val = val.replace(regex, ''); + + return decimal ? val.replace(decimal, '.') : val; + }; + }), /** * Converts data to type Number. + * If a `config` argument is used, it will strip the `data` of the prefix, + * the suffix and the thousands separator, if any of them are found, + * replace the decimal separator by a dot and parse the resulting string. + * Extra whitespace around the prefix and suffix will be ignored. * * @method parse * @param data {String | Number | Boolean} Data to convert. The following * values return as null: null, undefined, NaN, "". + * @param [config] {Object} Optional configuration values, same as for [Y.Date.format](#method_format). + * @param [config.prefix] {HTML} String to be removed from the start, like a currency designator "$" + * @param [config.decimalPlaces] {Number} Ignored, it is accepted only for compatibility with [Y.Date.format](#method_format). + * @param [config.decimalSeparator] {HTML} Decimal separator. + * @param [config.thousandsSeparator] {HTML} Thousands separator. + * @param [config.suffix] {HTML} String to be removed from the end of the number, like " items". * @return {Number} A number, or null. */ - parse: function(data) { - var number = (data === null || data === "") ? data : +data; - if(LANG.isNumber(number)) { - return number; + + parse: function(data, config) { + var parser; + + if (config && typeof data === 'string') { + parser = this._buildParser(config.prefix, config.suffix, config.thousandsSeparator, config.decimalSeparator); + + data = parser(data); } - else { - Y.log("Could not parse data to type Number", "warn", "number"); - return null; + + if (data !== null && data !== "") { + data = parseFloat(data); + + // catch NaN and ±Infinity + if (!isFinite(data)) { + data = null; + } + } else { + data = null; } + + // on the same line to get stripped for raw/min.js by build system + if (data === null) { Y.log("Could not parse data to type Number", "warn", "number"); } + + return data; } }); diff --git a/src/number/meta/number.json b/src/number/meta/number.json index ee8ae3b6fc5..610f48a6dc9 100644 --- a/src/number/meta/number.json +++ b/src/number/meta/number.json @@ -6,6 +6,7 @@ ] }, "datatype-number-parse": { + "requires": ["escape"] }, "datatype-number-format": { } diff --git a/src/number/tests/unit/assets/number-tests.js b/src/number/tests/unit/assets/number-tests.js index 95f38b2782b..32dd21d9fe1 100644 --- a/src/number/tests/unit/assets/number-tests.js +++ b/src/number/tests/unit/assets/number-tests.js @@ -1,11 +1,11 @@ YUI.add('number-tests', function(Y) { var ASSERT = Y.Assert, ARRAYASSERT = Y.ArrayAssert; - + var testParse = new Y.Test.Case({ name: "Number Parse Tests", - + testUndefined: function() { var number = Y.Number.parse(); ASSERT.isNull(number, "Expected null."); @@ -24,7 +24,7 @@ YUI.add('number-tests', function(Y) { testStrings: function() { var number = Y.Number.parse("0"); ASSERT.areSame(0, number, "Incorrect number 0."); - + number = Y.Number.parse("1"); ASSERT.areSame(1, number, "Incorrect number 1."); @@ -41,9 +41,72 @@ YUI.add('number-tests', function(Y) { number = Y.Number.parse(-1); ASSERT.areSame(-1, number, "Incorrect number -1."); + }, + testWithConfig: function () { + var i, v, values = [ + ["1234.5", {}, 1234.5], + ["1234.5", { + decimalSeparator: '.' + }, 1234.5], + ["$1.234,50", { + prefix: '$', + decimalSeparator:',', + thousandsSeparator: '.' + }, 1234.5], + [" $ 1.234.567,80 ", { + prefix: '$', + decimalSeparator:',', + thousandsSeparator: '.' + }, 1234567.8], + [" 1.234,50 € ", { + suffix: '€', + decimalSeparator:',', + thousandsSeparator: '.' + }, 1234.5], + ["abc 1//234//567--89 def ", { + prefix: 'abc', + suffix: 'def', + decimalSeparator:'--', + thousandsSeparator: '//' + }, 1234567.89], + ["[ 1*234*567|89 ] ", { + prefix: '[', + suffix: ']', + decimalSeparator:'|', + thousandsSeparator: '*' + }, 1234567.89], + ["1234567.89", { + prefix: '[', + suffix: ']', + decimalSeparator:'|', + thousandsSeparator: '*' + }, 1234567.89], + ["123456789", { + prefix: '[', + suffix: ']', + decimalSeparator:'|', + thousandsSeparator: '*' + }, 123456789] + + ]; + for (i = 0; i < values.length; i +=1) { + v = values[i]; + ASSERT.areSame(v[2],Y.Number.parse(v[0], v[1]),i + ': ' + v[1] + Y.dump(v[1])); + + } + + }, + testWithConfigFails: function () { + ASSERT.isNull(Y.Number.parse(null, {}), 'nulls should return null'); + ASSERT.isNull(Y.Number.parse(undefined, {}), 'undefined should return null'); + ASSERT.isNull(Y.Number.parse("", {}), 'empty string should return null'); + ASSERT.isNull(Y.Number.parse(" ", {}), 'non-empty blank string should return null'); + ASSERT.isNull(Y.Number.parse(" asdfa ", {}), 'random characters should return null'); + ASSERT.isNull(Y.Number.parse("$ (USD)", { prefix: '$', suffix: '(USD)' }),'format resulting in empty string should return null'); + ASSERT.isNull(Y.Number.parse("boom,boom", { decimal: ',' }), ' format resulting in random characters should return null'); } }); - + var testFormat = new Y.Test.Case({ name: "Number Format Tests", @@ -63,7 +126,7 @@ YUI.add('number-tests', function(Y) { output = Y.Number.format("1"); ASSERT.areSame("1", output, "Incorrect output 1."); - + output = Y.Number.format("-1"); ASSERT.areSame("-1", output, "Incorrect output -1."); }, @@ -78,23 +141,23 @@ YUI.add('number-tests', function(Y) { output = Y.Number.format(-1); ASSERT.areSame("-1", output, "Incorrect output -1."); }, - + testPrefix: function() { var output = Y.Number.format(123, {prefix:"$"}); ASSERT.areSame("$123", output, "Incorrect prefix."); - + output = Y.Number.format(-123, {prefix:"$"}); ASSERT.areSame("$-123", output, "Incorrect prefix neg."); }, - + testSuffix: function() { var output = Y.Number.format(123, {suffix:" items"}); ASSERT.areSame("123 items", output, "Incorrect suffix."); - + output = Y.Number.format(-123, {suffix:" items"}); ASSERT.areSame("-123 items", output, "Incorrect suffix neg."); }, - + testDecimalPlaces: function() { var output = Y.Number.format(123.123456, {decimalPlaces:5}); ASSERT.areSame("123.12346", output, "Incorrect decimal rounding to 5 places."); @@ -104,7 +167,7 @@ YUI.add('number-tests', function(Y) { output = Y.Number.format(123.123, {decimalPlaces:5}); ASSERT.areSame("123.12300", output, "Incorrect decimal padding to 5 places."); - + output = Y.Number.format(-123.123, {decimalPlaces:5}); ASSERT.areSame("-123.12300", output, "Incorrect decimal padding to 5 places neg."); @@ -116,63 +179,76 @@ YUI.add('number-tests', function(Y) { output = Y.Number.format(123.127, {decimalPlaces:2}); ASSERT.areSame("123.13", output, "Incorrect decimal rounding to 2 places up."); - + output = Y.Number.format(-123.127, {decimalPlaces:2}); ASSERT.areSame("-123.13", output, "Incorrect decimal rounding to 2 places up neg."); output = Y.Number.format(123.123, {decimalPlaces:2}); ASSERT.areSame("123.12", output, "Incorrect decimal rounding to 2 places down."); - + output = Y.Number.format(-123.123, {decimalPlaces:2}); ASSERT.areSame("-123.12", output, "Incorrect decimal rounding to 2 places down neg."); output = Y.Number.format(123.123, {decimalPlaces:1}); ASSERT.areSame("123.1", output, "Incorrect decimal rounding to 1 place."); - + output = Y.Number.format(-123.123, {decimalPlaces:1}); ASSERT.areSame("-123.1", output, "Incorrect decimal rounding to 1 place neg."); output = Y.Number.format(123.123, {decimalPlaces:0}); ASSERT.areSame("123", output, "Incorrect decimal rounding to 0 places."); - + output = Y.Number.format(-123.123, {decimalPlaces:0}); ASSERT.areSame("-123", output, "Incorrect decimal rounding to 0 places neg."); output = Y.Number.format(123.123, {decimalPlaces:-1}); ASSERT.areSame("123.123", output, "Must ignore decimalPlaces < 0."); - + output = Y.Number.format(-123.123, {decimalPlaces:21}); ASSERT.areSame("-123.123", output, "Must ignore decimalPlaces > 20."); }, - + testThousandsSeparator: function() { - var output = Y.Number.format(123123123, {thousandsSeparator:","}); - ASSERT.areSame("123,123,123", output, "Incorrect thousands separation."); - - output = Y.Number.format(-123123123, {thousandsSeparator:","}); - ASSERT.areSame("-123,123,123", output, "Incorrect thousands separation neg."); + var output = Y.Number.format(123456789, {thousandsSeparator:","}); + ASSERT.areSame("123,456,789", output, "Incorrect thousands separation."); + + output = Y.Number.format(-123456789, {thousandsSeparator:","}); + ASSERT.areSame("-123,456,789", output, "Incorrect thousands separation neg."); + + output = Y.Number.format(12345678, {thousandsSeparator:","}); + ASSERT.areSame("12,345,678", output, "Incorrect thousands separation when (number-of-digits % 3) == 2"); + + output = Y.Number.format(1234567, {thousandsSeparator:","}); + ASSERT.areSame("1,234,567", output, "Incorrect thousands separation when (number-of-digits % 3) == 1"); + + output = Y.Number.format(-12345678, {thousandsSeparator:","}); + ASSERT.areSame("-12,345,678", output, "Incorrect thousands separation neg. when (number-of-digits % 3) == 2"); + + var output = Y.Number.format(12.34, {thousandsSeparator:","}); + ASSERT.areSame("12.34", output, "Incorrect thousands separation when number is short."); + }, testComplex: function() { - var output = Y.Number.format(123123123.176,{ + var output = Y.Number.format(123456789.176,{ prefix: "¥", decimalPlaces:2, thousandsSeparator:".", decimalSeparator:"," }); - ASSERT.areSame("¥123.123.123,18", output, "Incorrect Yen formatting neg."); - - output = Y.Number.format(-123123123.176,{ + ASSERT.areSame("¥123.456.789,18", output, "Incorrect Yen formatting neg."); + + output = Y.Number.format(-123456789.176,{ prefix: "¥", decimalPlaces:2, thousandsSeparator:".", decimalSeparator:"," }); - ASSERT.areSame("¥-123.123.123,18", output, "Incorrect Yen formatting neg."); + ASSERT.areSame("¥-123.456.789,18", output, "Incorrect Yen formatting neg."); } }); - - + + var suite = new Y.Test.Suite("Number"); suite.add(testParse); suite.add(testFormat); diff --git a/src/promise/HISTORY.md b/src/promise/HISTORY.md index 8d42aecd330..0a82b09b74e 100644 --- a/src/promise/HISTORY.md +++ b/src/promise/HISTORY.md @@ -4,7 +4,7 @@ Promise Change History @VERSION@ ------ -* No changes. +* Marked `getStatus` as deprecated. 3.13.0 ------ diff --git a/src/promise/js/promise.js b/src/promise/js/promise.js index 71c3bffe0c5..fb5be869bf7 100644 --- a/src/promise/js/promise.js +++ b/src/promise/js/promise.js @@ -101,8 +101,10 @@ Y.mix(Promise.prototype, { @method getStatus @return {String} + @deprecated **/ getStatus: function () { + Y.log('promise.getStatus() will be removed in the future', 'warn', NAME); return this._resolver.getStatus(); } }); @@ -119,10 +121,16 @@ method. @static **/ Promise.isPromise = function (obj) { - // We test promises by form to be able to identify other implementations - // as promises. This is important for cross compatibility and in particular - // Y.when which should take any kind of promise - return !!obj && typeof obj.then === 'function'; + var then; + // We test promises by structure to be able to identify other + // implementations' promises. This is important for cross compatibility and + // In particular Y.when which should recognize any kind of promise + // Use try...catch when retrieving obj.then. Return false if it throws + // See Promises/A+ 1.1 + try { + then = obj.then; + } catch (_) {} + return typeof then === 'function'; }; Y.Promise = Promise; diff --git a/src/promise/js/resolver.js b/src/promise/js/resolver.js index b7c9d1eb899..e1d965bf930 100644 --- a/src/promise/js/resolver.js +++ b/src/promise/js/resolver.js @@ -44,6 +44,15 @@ function Resolver(promise) { @private **/ this._status = 'pending'; + + /** + This value that this promise represents. + + @property _result + @type Any + @private + **/ + this._result = null; } Y.mix(Resolver.prototype, { @@ -59,9 +68,10 @@ Y.mix(Resolver.prototype, { fulfill: function (value) { if (this._status === 'pending') { this._result = value; + this._status = 'fulfilled'; } - if (this._status !== 'rejected') { + if (this._status === 'fulfilled') { this._notify(this._callbacks, this._result); // Reset the callback list so that future calls to fulfill() @@ -75,8 +85,6 @@ Y.mix(Resolver.prototype, { // there is no point in keeping the list. Remove it to help // garbage collection this._errbacks = null; - - this._status = 'fulfilled'; } }, @@ -92,16 +100,16 @@ Y.mix(Resolver.prototype, { reject: function (reason) { if (this._status === 'pending') { this._result = reason; + this._status = 'rejected'; } - if (this._status !== 'fulfilled') { + if (this._status === 'rejected') { + if (!this._errbacks.length) { Y.log('This promise was rejected but no error handlers were registered to it', 'info', NAME); } this._notify(this._errbacks, this._result); // See fulfill() this._callbacks = null; this._errbacks = []; - - this._status = 'rejected'; } }, @@ -138,16 +146,20 @@ Y.mix(Resolver.prototype, { thenReject = reject; }), - callbackList = this._callbacks || [], - errbackList = this._errbacks || []; + callbackList = this._callbacks, + errbackList = this._errbacks; // Because the callback and errback are represented by a Resolver, it // must be fulfilled or rejected to propagate through the then() chain. // The same logic applies to resolve() and reject() for fulfillment. - callbackList.push(typeof callback === 'function' ? - this._wrap(thenFulfill, thenReject, callback) : thenFulfill); - errbackList.push(typeof errback === 'function' ? - this._wrap(thenFulfill, thenReject, errback) : thenReject); + if (callbackList) { + callbackList.push(typeof callback === 'function' ? + this._wrap(thenFulfill, thenReject, callback) : thenFulfill); + } + if (errbackList) { + errbackList.push(typeof errback === 'function' ? + this._wrap(thenFulfill, thenReject, errback) : thenReject); + } // If a promise is already fulfilled or rejected, notify the newly added // callbacks by calling fulfill() or reject() @@ -213,8 +225,10 @@ Y.mix(Resolver.prototype, { @method getStatus @return {String} + @deprecated **/ getStatus: function () { + Y.log('resolver.getStatus() will be removed in the future', 'warn', NAME); return this._status; }, diff --git a/src/promise/tests/unit/assets/promise-tests.js b/src/promise/tests/unit/assets/promise-tests.js index 1081c05836b..12ae6d74a96 100644 --- a/src/promise/tests/unit/assets/promise-tests.js +++ b/src/promise/tests/unit/assets/promise-tests.js @@ -195,7 +195,7 @@ YUI.add('promise-tests', function (Y) { // This test is run only in strict mode '|this| inside a callback must be undefined in strict mode': function () { 'use strict'; - + var test = this, fulfilled, rejected, fulfilledThis, rejectedThis; @@ -225,6 +225,12 @@ YUI.add('promise-tests', function (Y) { suite.add(new Y.Test.Case({ name: 'Promise detection with Promise.isPromise', + _should: { + ignore: { + 'detect object with getters that throw': !Object.create + } + }, + 'detecting YUI promises': function () { Assert.isTrue(isPromise(new Promise(function () {})), 'a YUI promise should be identified as a promise'); }, @@ -255,6 +261,18 @@ YUI.add('promise-tests', function (Y) { Assert.isFalse(isPromise({ then: 5 }), 'almost promises should not be identified as promises'); + }, + + 'detect object with getters that throw': function () { + var nonPromise = Object.create(null, { + then: { + get: function () { + throw new Error('isPromise did not catch an exception thrown by the getter of the `then` property'); + } + } + }); + + Assert.isFalse(isPromise(nonPromise), 'an object with a `then` property that throws should not be identified as a promise'); } })); diff --git a/src/slider/docs/slider-basic.mustache b/src/slider/docs/slider-basic.mustache index f0a5771fcbb..8ca5354337b 100644 --- a/src/slider/docs/slider-basic.mustache +++ b/src/slider/docs/slider-basic.mustache @@ -46,7 +46,7 @@ function updateInput( e ) { var xInput = Y.one( "#horiz_value" ); // Subscribe to the Slider's valueChange event, passing the input as the 'this' -xSlider.on( "valueChange", updateInput, xInput ); +xSlider.after( "valueChange", updateInput, xInput ); ```Y.ArrayAssert.indexOf()
is used to determine if the value has been placed in the
correct location. The final assertions tests that the entire array is expected by using Y.ArrayAssert.itemsAreEqual()
.
+Sometimes you have to make sure that your array doesn't contain any duplicate items.
+ +If you array consists entirely of strings or numbers then Y.ArrayAssert.isUnique()
is pretty straightforward:
However if you have more complex values like objects you might need to provide your own comparison function that the test will use to test equality:
+ +``` + /* + * When comparing objects a comparison function is almost mandatory. + * + * Example: + * var a = {}, b = {}; + * if (a === b) { + * //never true + * } + * + * Therefore if this test didn't provide a comparison function then the test would have passed. + */ + "fail: [{id: 1}, {id: 1}] is not unique": function () { + Y.ArrayAssert.isUnique([{id: 1}, {id: 1}], function (a, b) { + return a.id === b.id; + }); + } + +``` +With all of the tests defined, the last step is to run them:
diff --git a/src/test/js/ArrayAssert.js b/src/test/js/ArrayAssert.js index 90171efcc35..f3f396f70b1 100644 --- a/src/test/js/ArrayAssert.js +++ b/src/test/js/ArrayAssert.js @@ -371,6 +371,33 @@ YUITest.ArrayAssert = { //if it makes it here, it wasn't found at all YUITest.Assert.fail(YUITest.Assert._formatMessage(message, "Value doesn't exist in array.")); + }, + + /** + * Asserts that given array doesn't contain duplicate items. + * @param {Array} array The array to check. + * @param {Function} [comparator=null] A custom function to use to test the equality of two values. + * This function is similar to the one given to {{#crossLink "Array/unique:method"}}Y.Array.unique{{/crossLink}}. + * @param {String} [message] The message to display if the assertion fails. + * @method isUnique + * @static + */ + isUnique: function (array, comparator, message) { + + YUITest.Assert._increment(); + + if (!Y.Lang.isArray(array)){ + throw new TypeError("ArrayAssert.isUnique(): First argument must be an array"); + } + + if (Y.Lang.isValue(comparator) && !Y.Lang.isFunction(comparator)){ + throw new TypeError("ArrayAssert.isUnique(): Second argument must be a function"); + } + + if (Y.Array.unique(array, comparator).length < array.length){ + message = YUITest.Assert._formatMessage(message, "Array contains duplicate(s)"); + YUITest.Assert.fail(message); + } } }; diff --git a/src/test/js/TestCase.js b/src/test/js/TestCase.js index 25dd86874eb..131dfaf03c2 100644 --- a/src/test/js/TestCase.js +++ b/src/test/js/TestCase.js @@ -31,6 +31,27 @@ YUITest.TestCase = function (template) { }; +/** +Default delay for a test failure when `wait()` is called without a _delay_. + +@property DEFAULT_WAIT +@type {Number} +@default 10000 +@static +**/ +YUITest.TestCase.DEFAULT_WAIT = 10000; + +/** +Calls `YUITest.Assert.fail()` with a message indicating `wait()` was called, +but `resume()` was never called. + +@method _waitTimeout +@static +@protected +**/ +YUITest.TestCase._waitTimeout = function () { + YUITest.Assert.fail("Timeout: wait() called but resume() never called."); +}; YUITest.TestCase.prototype = { @@ -65,22 +86,73 @@ YUITest.TestCase.prototype = { * @param {Function} segment (Optional) The function to run after the delay. * If omitted, the TestRunner will wait until resume() is called. * @param {int} delay (Optional) The number of milliseconds to wait before running - * the function. If omitted, defaults to zero. + * the function. If omitted, defaults to `DEFAULT_WAIT` ms (10s). * @return {Void} * @method wait */ wait : function (segment, delay){ + delay = (typeof segment === 'number') ? segment : + (typeof delay === 'number') ? delay : + YUITest.TestCase.DEFAULT_WAIT; - var actualDelay = (typeof segment == "number" ? segment : delay); - actualDelay = (typeof actualDelay == "number" ? actualDelay : 10000); + if (typeof segment !== 'function') { + segment = YUITest.TestCase._waitTimeout; + } - if (typeof segment == "function"){ - throw new YUITest.Wait(segment, actualDelay); - } else { - throw new YUITest.Wait(function(){ - YUITest.Assert.fail("Timeout: wait() called but resume() never called."); - }, actualDelay); + throw new YUITest.Wait(segment, delay); + }, + + /** + Delays the current test until _condition_ returns a truthy value. If + _condition_ fails to return a truthy value before _timeout_ milliseconds + have passed, the test fails. Default _timeout_ is 10s. + + _condition_ will be executed every _increment_ milliseconds (default 100). + + @method waitFor + @param {Function} condition Function executed to indicate whether to + execute _segment_ + @param {Function} segment Function to check the success or failure of this + test + @param {Number} [timeout=10000] Maximum number of milliseconds to wait for + _condition_ to return true + @param {Number} [increment=100] Milliseconds to wait before checking + _condition_ + **/ + waitFor: function (condition, segment, timeout, increment) { + var self = this, + endTime; + + if ((typeof condition !== 'function') || + (typeof segment !== 'function')) { + self.fail('waitFor() called with invalid parameters.'); + } + + if (typeof timeout !== 'number') { + timeout = YUITest.TestCase.DEFAULT_WAIT; + } + + endTime = (+new Date()) + timeout; + + if (typeof increment !== 'number') { + increment = 100; } + + self.wait(function () { + var now; + + if (condition.call(self)) { + segment.call(self); + } else { + now = (+new Date()); + + if (now > endTime) { + YUITest.TestCase._waitTimeout(); + } else { + self.waitFor(condition, segment, endTime - now, increment); + } + } + }, increment); }, //------------------------------------------------------------------------- diff --git a/src/test/tests/unit/assets/arrayassert-tests.js b/src/test/tests/unit/assets/arrayassert-tests.js index 908227af527..2612b1fc6e7 100644 --- a/src/test/tests/unit/assets/arrayassert-tests.js +++ b/src/test/tests/unit/assets/arrayassert-tests.js @@ -293,6 +293,79 @@ YUI.add('arrayassert-tests', function(Y) { } })); + //------------------------------------------------------------------------- + // Test Case for isUnique + //------------------------------------------------------------------------- + + suite.add(new Y.Test.Case({ + + name: "isUnique Assert Tests", + + _should: { + error: { + testNonArray: true, + testNonFunctionComparator: true + }, + fail: { + testDuplicateNumbersArray: true, + testDuplicateNumbersArray: true, + testDuplicateReferencesArray: true, + testWithComparator: true + } + }, + + testEmptyArray: function () { + ArrayAssert.isUnique([]); + }, + + testSingleNumbersArray: function () { + ArrayAssert.isUnique([1, 2, 3]); + }, + + testDuplicateNumbersArray: function () { + ArrayAssert.isUnique([1, 1, 2]); + }, + + testSingleStringsArray: function () { + ArrayAssert.isUnique(['a', 'b', 'c']); + }, + + testDuplicateNumbersArray: function () { + ArrayAssert.isUnique(['a', 'a', 'b']); + }, + + testSingleReferencesArray: function () { + function F() {} + ArrayAssert.isUnique([new F(), new F(), new F()]); + }, + + testDuplicateReferencesArray: function () { + function F() {} + ArrayAssert.isUnique([F, F, F]); + }, + + testNonArray: function () { + ArrayAssert.isUnique(999); + }, + + testNonFunctionComparator: function () { + var comparator = 999; + ArrayAssert.isUnique([1, 2, 3], comparator); + }, + + testComparatorIsUsed: function () { + var used = false; + function compare() { used = true; return false; } + ArrayAssert.isUnique([1, 2, 3], compare); + Assert.isTrue(used); + }, + + testWithComparator: function () { + function F(id) { this.id = id; } + function compare(a, b) { return a.id === b.id; } + ArrayAssert.isUnique([new F(1), new F(1), new F(2)], compare); + } + })); Y.Test.Runner.add(suite); diff --git a/src/test/tests/unit/assets/general-tests.js b/src/test/tests/unit/assets/general-tests.js index 1e5da0c142d..a675acd2cc0 100644 --- a/src/test/tests/unit/assets/general-tests.js +++ b/src/test/tests/unit/assets/general-tests.js @@ -96,6 +96,141 @@ YUI.add('general-tests', function(Y) { } })); + suite.add(new Y.Test.Case({ + name: 'waitFor', + + _should: { + fail: { + 'waitFor() without params should fail': true, + 'waitFor(nonFn, fn) should fail': true, + 'waitFor(fn, nonFn) should fail': true, + 'waitFor(falseFn, fn) should fail': true, + 'waitFor(trueFn, failFn) should fail': true, + 'waitFor(falseFn, yfn, smallTimeout) should fail before default wait time': true + } + }, + + 'waitFor() without params should fail': function () { + this.waitFor(); + }, + + 'waitFor(nonFn, fn) should fail': function () { + this.waitFor('boom', function () {}); + }, + + 'waitFor(fn, nonFn) should fail': function () { + this.waitFor(function () {}, 'boom'); + }, + + '`this` in waitFor(HERE, fn) should be the TestCase': function () { + var self = this, + conditionThis; + + self.waitFor(function () { + conditionThis = this; + return true; + }, function () { + self.assert(self === conditionThis); + }); + }, + + '`this` in waitFor(fn, HERE) should be the TestCase': function () { + var self = this; + + self.waitFor(function () { return true; }, function () { + self.assert(self === this); + }); + }, + + 'waitFor(falseFn, fn) should fail': function () { + this.waitFor(function () { return false; }, function () { + this.assert(true); + }); + }, + + 'waitFor(trueFn, failFn) should fail': function () { + this.waitFor(function () { return true; }, function () { + this.fail('failure === success!'); + }); + }, + + 'waitFor(xfn, yfn) should call xfn multiple times until it returns true': function () { + var remaining = 3; + + this.waitFor(function () { + return !(--remaining); + }, function () { + this.assert(remaining === 0, 'waitFor() conditional function called ' + remaining + ' fewer times than expected'); + }); + }, + + // FIXME: This is an unreliable test because if the process is so busy + // that it can't free up a tick to call teh condition before the + // default 10s is up, the test will fail, which is an indicator of + // success. So, false positive. I can't think of a better way to test + // this, though, and it seems pretty unlikely to end up "failing" in + // that way, so here it is. + 'waitFor(falseFn, yfn, smallTimeout) should fail before default wait time': function () { + var tooLate = (+new Date()) + 2000, + called; + + this.waitFor(function () { + if (called && (+new Date()) > tooLate) { + // Pass === fail + this.assert('condition called well past specified timeout'); + } + + // Hack to avoid race condition with busy event loop not + // freeing up a tick before the full 10s wait timeout. The + // hope is that if the process isn't so bogged down that it + // can call the condition once, it can call it multiple times. + called = true; + + return false; + }, function () { + // Pass === fail + this.assert('segment should not have been called'); + }, 300); + }, + + // FIXME: This is a textbook race condition. It may fail due to process + // load interfering with event loop fidelity. If you can think of a + // better way to test it, please do so. Otherwise, if you think this + // shouldn't even be here, please comment it out so there's a history + // of the issue being avoided. + 'waitFor(xfn, fn, null, smallIncrement) should call xfn more frequently than default increment': function () { + var firstPass = 0, + secondPass = 0, + milestoneReached; + + setTimeout(function () { + milestoneReached = true; + }, 1000); + + this.waitFor(function () { + firstPass++; + + return milestoneReached; + }, function () { + milestoneReached = false; + + setTimeout(function () { + milestoneReached = true; + }, 1000); + + this.waitFor(function () { + secondPass++; + + return milestoneReached; + }, function () { + // TODO: can this be refined in a reasonable way? This is + // pretty arbitrary + this.assert(firstPass > (secondPass * 1.5)); + }, null, 200); + }, null, 20); + } + + })); suite.add(new Y.Test.Case({ name: 'Suite/Case Tests',